@ihabdevteam/core 0.387.0 → 0.388.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 +43 -0
- package/dist/components.cjs.js +11 -11
- package/dist/hooks.cjs.js +1 -1
- package/dist/i18n.cjs.js +1 -1
- package/dist/ihabdevteam-core.cjs.js +15 -15
- package/dist/ihabdevteam-core.d.ts +1 -1
- package/dist/packages/core/src/components/Table.js +28 -3
- package/dist/packages/core/src/version.d.ts +1 -1
- package/dist/packages/core/src/version.js +1 -1
- package/dist/utils.cjs.js +1 -1
- package/package.json +1 -1
package/dist/components.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var n=require("react/jsx-runtime"),o=require("react"),
|
|
1
|
+
"use strict";var n=require("react/jsx-runtime"),o=require("react"),qt=require("i18next"),_e=require("react-i18next"),cn=require("react-dom"),Dn=typeof document<"u"?document.currentScript:null;function vd(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(a){if(a!=="default"){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}}),t.default=e,Object.freeze(t)}var Ls=vd(o);function we(...e){return e.filter(Boolean).join(" ")}const $s=new Set,In=(()=>{try{const e=globalThis;return e.process!=null&&e.process.env?.NODE_ENV!=="production"}catch{return!1}})();function At(e,...t){!In||$s.has(e)||($s.add(e),console.warn(...t))}/**
|
|
2
2
|
* @license lucide-react v1.38.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -794,8 +794,8 @@
|
|
|
794
794
|
* This source code is licensed under the ISC license.
|
|
795
795
|
* See the LICENSE file in the root directory of this source tree.
|
|
796
796
|
*/const HC=[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}],["path",{d:"M7 10v12",key:"1qc93n"}]],VC=re("thumbs-up",HC),Or={"alert-triangle":Is,"align-start-vertical":Dd,anchor:oC,armchair:lC,"arrow-down":jd,"arrow-left":Md,"arrow-right":$d,"arrow-right-left":Pd,"audio-lines":Fd,ban:zd,bell:Hd,"book-marked":qd,"book-open":Gd,"bow-arrow":Yd,braces:Xd,bug:Qd,calendar:Zs,"calendar-check":tp,"calendar-days":ap,camera:op,car:cC,"chart-column":lp,"chart-line":up,"chart-pie":dp,check:Fs,"chevron-down":Xs,"chevron-left":Os,"chevron-right":zs,"chevron-up":Js,circle:RC,"clipboard-list":fp,coffee:pC,combine:gp,copy:vp,"chevrons-left-right-ellipsis":xp,"credit-card":Bp,database:Ws,diff:Np,download:Hs,ear:Sp,edit:Tp,"edit-2":Lp,"edit-3":Rp,ellipsis:Vs,eraser:Fp,"external-link":zp,eye:Hp,"file-text":qp,"flip-horizontal":Gp,"folder-open":Yp,"folder-plus":Xp,gamepad:Qp,"gamepad-2":mC,clock:fC,lock:Wh,"search-x":Um,"share-2":Jm,tag:x0,target:gC,percent:vC,gavel:th,"git-merge":qs,globe:rh,"grip-vertical":sh,headphones:ih,heart:ch,home:ph,inbox:xC,info:mh,"key-round":fh,landmark:gh,layers:vh,"layout-dashboard":xh,leaf:Bh,lightbulb:Ah,link:Eh,"link-2":Sh,"link-2-off":Th,list:Lh,"list-checks":Rh,"list-ordered":Ih,loader:Oh,"log-out":Vh,mail:Uh,"map-pin":Kh,menu:OC,"message-circle":Zh,"message-circle-question-mark":Jh,"message-square":em,"message-square-more":BC,"message-square-text":nm,minus:AC,"minus-circle":rm,moon:WC,"more-horizontal":Vs,package:sm,"party-popper":im,pause:cm,pencil:pm,phone:mm,play:fm,"play-circle":gm,plus:vm,printer:xm,"refresh-cw":Bm,repeat:Am,replace:Em,rocket:Sm,"rotate-ccw":Tm,"rotate-cw":Lm,salad:Rm,"scan-search":Im,search:Wm,"circle-alert":Us,"alert-circle":Us,"check-circle":Gs,scissors:Vm,send:Km,settings:Zm,"shield-check":e0,"shopping-cart":n0,shuffle:r0,"skip-back":s0,"skip-forward":i0,sparkles:EC,square:c0,star:p0,store:m0,"sun-medium":f0,table:g0,"table-2":v0,terminal:B0,"text-cursor-input":A0,"text-initial":E0,"thumbs-up":VC,ticket:S0,trash:L0,triangle:IC,"trash-2":T0,"trending-up":R0,"triangle-alert":Is,trophy:I0,type:SC,unlink:O0,upload:W0,user:Fr,"user-plus":q0,"user-round":G0,"user-round-check":Y0,users:X0,"users-round":Q0,volume:TC,"volume-2":Ks,wrench:nC,x:Ys};Object.freeze(Object.keys(Or));function qC(e){return Or[e]??null}const Qs=new Set;function UC(e){return In&&!(e in Or)&&!Qs.has(e)&&(Qs.add(e),console.warn(`[ihabdevteam-core] lucide \uC544\uC774\uCF58 '${e}' \uC774 \uC815\uC801 \uBAA9\uB85D\uC5D0 \uC5C6\uC5B4 \uB80C\uB354\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. utils/lucideIconSet.ts \uC758 STATIC_LUCIDE_ICONS \uC5D0 \uCD94\uAC00\uD558\uC138\uC694.`)),Promise.resolve(null)}const GC=e=>e.replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Za-z])([0-9])/g,"$1-$2").replace(/[_ ]+/g,"-").toLowerCase();function KC(e){const t=e.toLowerCase();if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("data:")||e.includes("/assets/")||/\.(png|jpe?g|gif|webp|avif|bmp|ico)$/i.test(t))return null;const a=(e.split("/").pop()||"").replace(/\.svg$/,"");return a?GC(a):null}const el=new Map;function YC(e){const t=typeof e=="string"?KC(e):null,a=t?qC(t)??el.get(t)??null:null,[r,s]=o.useState(null);return o.useEffect(()=>{if(!t||a)return;let l=!1;return UC(t).then(i=>{el.set(t,i),l||s(i)}),()=>{l=!0}},[t,a]),a??r}/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */function tl(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,r=Array(t);a<t;a++)r[a]=e[a];return r}function ZC(e){if(Array.isArray(e))return e}function XC(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var r,s,l,i,u=[],c=!0,d=!1;try{if(l=(a=a.call(e)).next,t!==0)for(;!(c=(r=l.call(a)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(h){d=!0,s=h}finally{try{if(!c&&a.return!=null&&(i=a.return(),Object(i)!==i))return}finally{if(d)throw s}}return u}}function JC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
797
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QC(e,t){return ZC(e)||XC(e,t)||e1(e,t)||JC()}function e1(e,t){if(e){if(typeof e=="string")return tl(e,t);var a={}.toString.call(e).slice(8,-1);return a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set"?Array.from(e):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?tl(e,t):void 0}}const nl=Object.entries,al=Object.setPrototypeOf,t1=Object.isFrozen,n1=Object.getPrototypeOf,a1=Object.getOwnPropertyDescriptor;let Ot=Object.freeze,Wt=Object.seal,oa=Object.create,rl=typeof Reflect<"u"&&Reflect,zr=rl.apply,Wr=rl.construct;Ot||(Ot=function(t){return t}),Wt||(Wt=function(t){return t}),zr||(zr=function(t,a){for(var r=arguments.length,s=new Array(r>2?r-2:0),l=2;l<r;l++)s[l-2]=arguments[l];return t.apply(a,s)}),Wr||(Wr=function(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),s=1;s<a;s++)r[s-1]=arguments[s];return new t(...r)});const qn=Ft(Array.prototype.forEach),r1=Ft(Array.prototype.lastIndexOf),ol=Ft(Array.prototype.pop),Ba=Ft(Array.prototype.push),o1=Ft(Array.prototype.splice),sa=Array.isArray,ka=Ft(String.prototype.toLowerCase),Hr=Ft(String.prototype.toString),sl=Ft(String.prototype.match),Aa=Ft(String.prototype.replace),ll=Ft(String.prototype.indexOf),s1=Ft(String.prototype.trim),l1=Ft(Number.prototype.toString),i1=Ft(Boolean.prototype.toString),il=typeof BigInt>"u"?null:Ft(BigInt.prototype.toString),ul=typeof Symbol>"u"?null:Ft(Symbol.prototype.toString),nn=Ft(Object.prototype.hasOwnProperty),Na=Ft(Object.prototype.toString),Yt=Ft(RegExp.prototype.test),Un=u1(TypeError);function Ft(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var a=arguments.length,r=new Array(a>1?a-1:0),s=1;s<a;s++)r[s-1]=arguments[s];return zr(e,t,r)}}function u1(e){return function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return Wr(e,a)}}function mt(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ka;if(al&&al(e,null),!sa(t))return e;let r=t.length;for(;r--;){let s=t[r];if(typeof s=="string"){const l=a(s);l!==s&&(t1(t)||(t[r]=l),s=l)}e[s]=!0}return e}function c1(e){for(let t=0;t<e.length;t++)nn(e,t)||(e[t]=null);return e}function cn(e){const t=oa(null);for(const r of nl(e)){var a=QC(r,2);const s=a[0],l=a[1];nn(e,s)&&(sa(l)?t[s]=c1(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=cn(l):t[s]=l)}return t}function d1(e){switch(typeof e){case"string":return e;case"number":return l1(e);case"boolean":return i1(e);case"bigint":return il?il(e):"0";case"symbol":return ul?ul(e):"Symbol()";case"undefined":return Na(e);case"function":case"object":{if(e===null)return Na(e);const t=e,a=gn(t,"toString");if(typeof a=="function"){const r=a(t);return typeof r=="string"?r:Na(r)}return Na(e)}default:return Na(e)}}function gn(e,t){for(;e!==null;){const r=a1(e,t);if(r){if(r.get)return Ft(r.get);if(typeof r.value=="function")return Ft(r.value)}e=n1(e)}function a(){return null}return a}function p1(e){try{return Yt(e,""),!0}catch{return!1}}const cl=Ot(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Vr=Ot(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),qr=Ot(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),h1=Ot(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ur=Ot(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),m1=Ot(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dl=Ot(["#text"]),pl=Ot(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Gr=Ot(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),hl=Ot(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),nr=Ot(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),C1=Wt(/{{[\w\W]*|^[\w\W]*}}/g),f1=Wt(/<%[\w\W]*|^[\w\W]*%>/g),b1=Wt(/\${[\w\W]*/g),g1=Wt(/^data-[\-\w.\u00B7-\uFFFF]+$/),y1=Wt(/^aria-[\-\w]+$/),ml=Wt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),v1=Wt(/^(?:\w+script|data):/i),_1=Wt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),x1=Wt(/^html$/i),w1=Wt(/^[a-z][.\w]*(-[.\w]+)+$/i),Cl=Wt(/<[/\w!]/g),fl=Wt(/<[/\w]/g),B1=Wt(/<\/no(script|embed|frames)/i),k1=Wt(/\/>/i),dn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},bl=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],A1=Ot(mt({},bl)),N1=(function(){const e={};return qn(bl,t=>{e[t]=Wt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Ot(e)})(),E1=function(){return typeof window>"u"?null:window},D1=function(t,a){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";a&&a.hasAttribute(s)&&(r=a.getAttribute(s));const l="dompurify"+(r?"#"+r:"");try{return t.createPolicy(l,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},gl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Fn=function(t,a,r,s){return nn(t,a)&&sa(t[a])?mt(s.base?cn(s.base):{},t[a],s.transform):r},Kr=function(t,a,r){const s=nn(t,a)?t[a]:void 0;return s&&typeof s=="object"?cn(s):r()};function yl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:E1();const t=ge=>yl(ge);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==dn.document||!e.Element)return t.isSupported=!1,t;let a=e.document;const r=a,s=r.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,i=e.Node,u=e.Element,c=e.NodeFilter,d=e.NamedNodeMap;d===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,p=e.trustedTypes,m=u.prototype,g=gn(m,"cloneNode"),y=gn(m,"remove"),C=gn(m,"nextSibling"),b=gn(m,"childNodes"),v=gn(m,"parentNode"),f=gn(m,"shadowRoot"),B=gn(m,"attributes"),_=i&&i.prototype?gn(i.prototype,"nodeType"):null,N=i&&i.prototype?gn(i.prototype,"nodeName"):null,x=i&&i.prototype?gn(i.prototype,"ownerDocument"):null,E=function(j){return _?_(j):j.nodeType},w=function(j){return N?N(j):j.nodeName};if(typeof l=="function"){const ge=a.createElement("template");ge.content&&ge.content.ownerDocument&&(a=ge.content.ownerDocument)}let D,k="",A,R=!1,$=0;const G=function(){if($>0)throw Un('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},T=function(j){G(),$++;try{return D.createHTML(j)}finally{$--}},P=function(j){G(),$++;try{return D.createScriptURL(j)}finally{$--}},L=function(){return R||(A=D1(p,s),R=!0),A},Q=a,Z=Q.implementation,F=Q.createNodeIterator,K=Q.createDocumentFragment,M=Q.getElementsByTagName,q=r.importNode;let Y=gl();t.isSupported=typeof nl=="function"&&typeof v=="function"&&Z&&Z.createHTMLDocument!==void 0;const U=C1,S=f1,I=b1,O=g1,z=y1,se=v1,te=_1,de=w1;let ee=ml,V=null;const ne=mt({},[...cl,...Vr,...qr,...Ur,...dl]);let W=null;const H=mt({},[...pl,...Gr,...hl,...nr]);let ie=Object.seal(oa(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Te=null,ye=null;const he=Object.seal(oa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Se=!0,$e=!0,Ne=!1,ue=!0,xe=!1,ke=!0,Ee=!1,We=!1,He=null,ot=null,Qe=!1,Je=!1,vt=!1,je=!1,Ye=!0,Be=!1;const Ue="user-content-";let qe=!0,pt=!1,_t={},Dt=null;const Bt=mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let st=null;const tt=mt({},["audio","video","img","source","image","track"]);let kt=null;const At=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Tt="http://www.w3.org/1998/Math/MathML",Lt="http://www.w3.org/2000/svg",gt="http://www.w3.org/1999/xhtml";let it=gt,ut=!1,ct=null;const ve=mt({},[Tt,Lt,gt],Hr),Me=Ot(["mi","mo","mn","ms","mtext"]);let Pe=mt({},Me);const Oe=Ot(["annotation-xml"]);let dt=mt({},Oe);const St=mt({},["title","style","font","a","script"]);let yt=null;const wt=["application/xhtml+xml","text/html"],Ct="text/html";let Le=null,at=null;const oe=a.createElement("form"),be=function(j){return j instanceof RegExp||j instanceof Function},Ie=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(at&&at===j)return;(!j||typeof j!="object")&&(j={}),j=cn(j),yt=wt.indexOf(j.PARSER_MEDIA_TYPE)===-1?Ct:j.PARSER_MEDIA_TYPE,Le=yt==="application/xhtml+xml"?Hr:ka,V=Fn(j,"ALLOWED_TAGS",ne,{transform:Le}),W=Fn(j,"ALLOWED_ATTR",H,{transform:Le}),ct=Fn(j,"ALLOWED_NAMESPACES",ve,{transform:Hr}),kt=Fn(j,"ADD_URI_SAFE_ATTR",At,{transform:Le,base:At}),st=Fn(j,"ADD_DATA_URI_TAGS",tt,{transform:Le,base:tt}),Dt=Fn(j,"FORBID_CONTENTS",Bt,{transform:Le}),Te=Fn(j,"FORBID_TAGS",cn({}),{transform:Le}),ye=Fn(j,"FORBID_ATTR",cn({}),{transform:Le}),_t=nn(j,"USE_PROFILES")?j.USE_PROFILES&&typeof j.USE_PROFILES=="object"?cn(j.USE_PROFILES):j.USE_PROFILES:!1,Se=j.ALLOW_ARIA_ATTR!==!1,$e=j.ALLOW_DATA_ATTR!==!1,Ne=j.ALLOW_UNKNOWN_PROTOCOLS||!1,ue=j.ALLOW_SELF_CLOSE_IN_ATTR!==!1,xe=j.SAFE_FOR_TEMPLATES||!1,ke=j.SAFE_FOR_XML!==!1,Ee=j.WHOLE_DOCUMENT||!1,Je=j.RETURN_DOM||!1,vt=j.RETURN_DOM_FRAGMENT||!1,je=j.RETURN_TRUSTED_TYPE||!1,Qe=j.FORCE_BODY||!1,Ye=j.SANITIZE_DOM!==!1,Be=j.SANITIZE_NAMED_PROPS||!1,qe=j.KEEP_CONTENT!==!1,pt=j.IN_PLACE||!1,ee=p1(j.ALLOWED_URI_REGEXP)?j.ALLOWED_URI_REGEXP:ml,it=typeof j.NAMESPACE=="string"?j.NAMESPACE:gt,Pe=Kr(j,"MATHML_TEXT_INTEGRATION_POINTS",()=>mt({},Me)),dt=Kr(j,"HTML_INTEGRATION_POINTS",()=>mt({},Oe));const J=Kr(j,"CUSTOM_ELEMENT_HANDLING",()=>oa(null));if(ie=oa(null),nn(J,"tagNameCheck")&&be(J.tagNameCheck)&&(ie.tagNameCheck=J.tagNameCheck),nn(J,"attributeNameCheck")&&be(J.attributeNameCheck)&&(ie.attributeNameCheck=J.attributeNameCheck),nn(J,"allowCustomizedBuiltInElements")&&typeof J.allowCustomizedBuiltInElements=="boolean"&&(ie.allowCustomizedBuiltInElements=J.allowCustomizedBuiltInElements),Wt(ie),xe&&($e=!1),vt&&(Je=!0),_t&&(V=mt({},dl),W=oa(null),_t.html===!0&&(mt(V,cl),mt(W,pl)),_t.svg===!0&&(mt(V,Vr),mt(W,Gr),mt(W,nr)),_t.svgFilters===!0&&(mt(V,qr),mt(W,Gr),mt(W,nr)),_t.mathMl===!0&&(mt(V,Ur),mt(W,hl),mt(W,nr))),he.tagCheck=null,he.attributeCheck=null,nn(j,"ADD_TAGS")&&(typeof j.ADD_TAGS=="function"?he.tagCheck=j.ADD_TAGS:sa(j.ADD_TAGS)&&(V===ne&&(V=cn(V)),mt(V,j.ADD_TAGS,Le))),nn(j,"ADD_ATTR")&&(typeof j.ADD_ATTR=="function"?he.attributeCheck=j.ADD_ATTR:sa(j.ADD_ATTR)&&(W===H&&(W=cn(W)),mt(W,j.ADD_ATTR,Le))),nn(j,"ADD_FORBID_CONTENTS")&&sa(j.ADD_FORBID_CONTENTS)&&(Dt===Bt&&(Dt=cn(Dt)),mt(Dt,j.ADD_FORBID_CONTENTS,Le)),qe&&(V["#text"]=!0),Ee&&mt(V,["html","head","body"]),V.table&&(mt(V,["tbody"]),delete Te.tbody),j.TRUSTED_TYPES_POLICY){if(typeof j.TRUSTED_TYPES_POLICY.createHTML!="function")throw Un('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof j.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Un('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const me=D;D=j.TRUSTED_TYPES_POLICY;try{k=T("")}catch(ae){throw D=me,ae}}else j.TRUSTED_TYPES_POLICY===null?(D=void 0,k=""):(D===void 0&&(D=L()),D&&typeof k=="string"&&(k=T("")));Ot&&Ot(j),at=j},Xe=mt({},[...Vr,...qr,...h1]),et=mt({},[...Ur,...m1]),rt=function(j,J,me){return J.namespaceURI===gt?j==="svg":J.namespaceURI===Tt?j==="svg"&&(me==="annotation-xml"||Pe[me]):!!Xe[j]},$t=function(j,J,me){return J.namespaceURI===gt?j==="math":J.namespaceURI===Lt?j==="math"&&dt[me]:!!et[j]},_n=function(j,J,me){return J.namespaceURI===Lt&&!dt[me]||J.namespaceURI===Tt&&!Pe[me]?!1:!et[j]&&(St[j]||!Xe[j])},on=function(j){let J=v(j);(!J||!J.tagName)&&(J={namespaceURI:it,tagName:"template"});const me=ka(j.tagName),ae=ka(J.tagName);return ct[j.namespaceURI]?j.namespaceURI===Lt?rt(me,J,ae):j.namespaceURI===Tt?$t(me,J,ae):j.namespaceURI===gt?_n(me,J,ae):!!(yt==="application/xhtml+xml"&&ct[j.namespaceURI]):!1},Rt=function(j){Ba(t.removed,{element:j});try{v(j).removeChild(j)}catch{if(y(j),!v(j))throw Un("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},zt=function(j,J,me){try{j.removeAttributeNode(J)}catch{try{j.removeAttribute(me)}catch{}}},sn=function(j){xt(j);const J=b(j);if(J){const ae=[];qn(J,Ce=>{Ba(ae,Ce)}),qn(ae,Ce=>{try{y(Ce)}catch{}})}const me=B(j);if(me)for(let ae=me.length-1;ae>=0;--ae){const Ce=me[ae],Fe=Ce&&Ce.name;typeof Fe=="string"&&zt(j,Ce,Fe)}},It=function(j,J,me){if(!me)try{me=J.getAttributeNode(j)}catch{me=null}Ba(t.removed,{attribute:me||null,from:J});try{me?J.removeAttributeNode(me):J.removeAttribute(j)}catch{try{J.removeAttribute(j)}catch{}}if(j==="is")if(Je||vt)try{Rt(J)}catch{}else try{J.setAttribute(j,"")}catch{}},xn=function(j){const J=B(j);if(J)for(let me=J.length-1;me>=0;--me){const ae=J[me],Ce=ae&&ae.name;typeof Ce!="string"||W[Le(Ce)]||zt(j,ae,Ce)}},xt=function(j){const J=[j];for(;J.length>0;){const me=J.pop();E(me)===dn.element&&xn(me);const Ce=b(me);if(Ce)for(let Fe=Ce.length-1;Fe>=0;--Fe)J.push(Ce[Fe])}},Pt=function(j,J){return ke?j==="patchsrc"?!0:j==="for"&&J!=="label"&&J!=="output":!1},Ut=function(j){if(!ke)return;const J=[j];for(;J.length>0;){const me=J.pop(),ae=E(me);if(ae===dn.processingInstruction||ae===dn.comment&&Yt(fl,me.data)){try{y(me)}catch{}continue}if(ae===dn.element){const Fe=me,lt=Le(w(me));try{Fe.hasAttribute&&Fe.hasAttribute("patchsrc")&&Fe.removeAttribute("patchsrc"),Fe.hasAttribute&&Fe.hasAttribute("for")&&Pt("for",lt)&&Fe.removeAttribute("for")}catch{}}const Ce=b(me);if(Ce)for(let Fe=Ce.length-1;Fe>=0;--Fe)J.push(Ce[Fe])}},Gt=function(j){let J=null,me=null;if(Qe)j="<remove></remove>"+j;else{const Fe=sl(j,/^[\r\n\t ]+/);me=Fe&&Fe[0]}yt==="application/xhtml+xml"&&it===gt&&(j='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+j+"</body></html>");const ae=D?T(j):j;if(it===gt)try{J=new h().parseFromString(ae,yt)}catch{}if(!J||!J.documentElement){J=Z.createDocument(it,"template",null);try{J.documentElement.innerHTML=ut?k:ae}catch{}}const Ce=J.body||J.documentElement;return j&&me&&Ce.insertBefore(a.createTextNode(me),Ce.childNodes[0]||null),it===gt?M.call(J,Ee?"html":"body")[0]:Ee?J.documentElement:Ce},Pn=function(j){const J=x?x(j):j.ownerDocument;return F.call(J||j,j,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},mn=function(j){return j=Aa(j,U," "),j=Aa(j,S," "),j=Aa(j,I," "),j},Kt=function(j){var J;j.normalize();const me=x?x(j):j.ownerDocument,ae=F.call(me||j,j,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let Ce=ae.nextNode();for(;Ce;)Ce.data=mn(Ce.data),Ce=ae.nextNode();const Fe=(J=j.querySelectorAll)===null||J===void 0?void 0:J.call(j,"template");Fe&&qn(Fe,lt=>{ln(lt.content)&&Kt(lt.content)})},Qt=function(j){const J=N?N(j):null;return typeof J!="string"||Le(J)!=="form"?!1:typeof j.nodeName!="string"||typeof j.textContent!="string"||typeof j.removeChild!="function"||j.attributes!==B(j)||typeof j.removeAttribute!="function"||typeof j.setAttribute!="function"||typeof j.namespaceURI!="string"||typeof j.insertBefore!="function"||typeof j.hasChildNodes!="function"||j.nodeType!==_(j)||j.childNodes!==b(j)},ln=function(j){if(!_||typeof j!="object"||j===null)return!1;try{return _(j)===dn.documentFragment}catch{return!1}},Cn=function(j){if(!_||typeof j!="object"||j===null)return!1;try{return typeof _(j)=="number"}catch{return!1}};function Ht(ge,j,J){ge.length!==0&&qn(ge,me=>{me.call(t,j,J,at)})}const wn=function(j,J){return!!(ke&&j.hasChildNodes()&&!Cn(j.firstElementChild)&&Yt(Cl,j.textContent)&&Yt(Cl,j.innerHTML)||ke&&j.namespaceURI===gt&&A1[J]&&(Cn(j.firstElementChild)||typeof j.textContent=="string"&&Yt(N1[J],j.textContent))||j.nodeType===dn.processingInstruction||ke&&j.nodeType===dn.comment&&Yt(fl,j.data))},pe=function(j,J){if(j instanceof RegExp)return Yt(j,J);if(j instanceof Function){for(var me=arguments.length,ae=new Array(me>2?me-2:0),Ce=2;Ce<me;Ce++)ae[Ce-2]=arguments[Ce];return!!j(J,...ae)}return!1},De=function(j,J,me){if(!Te[J]&&Ae(J)&&pe(ie.tagNameCheck,J))return!1;if(qe&&!Dt[J]){const ae=v(j),Ce=b(j);if(Ce&&ae){const Fe=Ce.length;for(let lt=Fe-1;lt>=0;--lt){const ht=j===me?g(Ce[lt],!0):Ce[lt];ae.insertBefore(ht,C(j))}}}return Rt(j),!0},Re=function(j,J,me,ae){return j.length===0?J:J===me||J===ae?cn(J):J},Ge=function(j,J){return j===J||v(j)!==null?!1:(pt&&xt(j),!0)},ze=function(j,J){if(Ht(Y.beforeSanitizeElements,j,null),Ge(j,J))return!0;if(Qt(j))return Rt(j),!0;const me=Le(w(j));if(V=Re(Y.uponSanitizeElement,V,ne,He),Ht(Y.uponSanitizeElement,j,{tagName:me,allowedTags:V}),Ge(j,J))return!0;if(wn(j,me))return Rt(j),!0;if(Te[me]||!(he.tagCheck instanceof Function&&he.tagCheck(me))&&!V[me]){const Ce=De(j,me,J);return Ce===!1&&Ht(Y.afterSanitizeElements,j,null),Ce}if(E(j)===dn.element&&!on(j)||(me==="noscript"||me==="noembed"||me==="noframes")&&Yt(B1,j.innerHTML))return Rt(j),!0;if(xe&&j.nodeType===dn.text){const Ce=mn(j.textContent);j.textContent!==Ce&&(Ba(t.removed,{element:j.cloneNode()}),j.textContent=Ce)}return Ht(Y.afterSanitizeElements,j,null),!1},X=function(j,J,me){if(ye[J]||Pt(J,j)||Ye&&(J==="id"||J==="name")&&(me in a||me in oe))return!1;const ae=W[J]||he.attributeCheck instanceof Function&&he.attributeCheck(J,j);return $e&&Yt(O,J)||Se&&Yt(z,J)?!0:ae?kt[J]||Yt(ee,Aa(me,te,""))||(J==="src"||J==="xlink:href"||J==="href")&&j!=="script"&&ll(me,"data:")===0&&st[j]||Ne&&!Yt(se,Aa(me,te,""))?!0:!me:Ae(j)&&pe(ie.tagNameCheck,j)&&pe(ie.attributeNameCheck,J,j)||J==="is"&&ie.allowCustomizedBuiltInElements&&pe(ie.tagNameCheck,me)},ce=mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ae=function(j){return!ce[ka(j)]&&Yt(de,j)},Ve=function(j,J,me,ae){if(D&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!me)switch(p.getAttributeType(j,J)){case"TrustedHTML":return T(ae);case"TrustedScriptURL":return P(ae)}return ae},Ke=function(j,J,me,ae){try{me?j.setAttributeNS(me,J,ae):j.setAttribute(J,ae),Qt(j)?Rt(j):ol(t.removed)}catch{It(J,j)}},Ze=function(j){Ht(Y.beforeSanitizeAttributes,j,null);const J=j.attributes;if(!J||Qt(j))return;W=Re(Y.uponSanitizeAttribute,W,H,ot);const me={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0};let ae=J.length;const Ce=Le(j.nodeName);for(;ae--;){const Fe=J[ae],lt=Fe.name,ht=Fe.namespaceURI,en=Fe.value,tn=Le(lt),Pr=en;let Zt=lt==="value"?Pr:s1(Pr);if(me.attrName=tn,me.attrValue=Zt,me.keepAttr=!0,me.forceKeepAttr=void 0,Ht(Y.uponSanitizeAttribute,j,me),Zt=me.attrValue,Be&&(tn==="id"||tn==="name")&&ll(Zt,Ue)!==0&&(It(lt,j,Fe),Zt=Ue+Zt),ke&&Yt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Zt)){It(lt,j,Fe);continue}if(tn==="attributename"&&sl(Zt,"href")){It(lt,j,Fe);continue}if(!me.forceKeepAttr){if(!me.keepAttr){It(lt,j,Fe);continue}if(!ue&&Yt(k1,Zt)){It(lt,j,Fe);continue}if(xe&&(Zt=mn(Zt)),!X(Ce,tn,Zt)){It(lt,j,Fe);continue}Zt=Ve(Ce,tn,ht,Zt),Zt!==Pr&&Ke(j,lt,ht,Zt)}}Ht(Y.afterSanitizeAttributes,j,null)},ft=function(j){let J=null;const me=Pn(j);for(Ht(Y.beforeSanitizeShadowDOM,j,null);J=me.nextNode();)if(Ht(Y.uponSanitizeShadowNode,J,null),ze(J,j),Ze(J),ln(J.content)&&ft(J.content),E(J)===dn.element){const ae=f(J);ln(ae)&&(bt(ae),ft(ae))}Ht(Y.afterSanitizeShadowDOM,j,null)},bt=function(j){const J=[{node:j,shadow:null}];for(;J.length>0;){const me=J.pop();if(me.shadow){ft(me.shadow);continue}const ae=me.node,Fe=E(ae)===dn.element,lt=b(ae);if(lt)for(let ht=lt.length-1;ht>=0;--ht)J.push({node:lt[ht],shadow:null});if(Fe){const ht=N?N(ae):null;if(typeof ht=="string"&&Le(ht)==="template"){const en=ae.content;ln(en)&&J.push({node:en,shadow:null})}}if(Fe){const ht=f(ae);ln(ht)&&J.push({node:null,shadow:ht},{node:ht,shadow:null})}}};return t.sanitize=function(ge){let j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},J=null,me=null,ae=null,Ce=null;if(ut=!ge,ut&&(ge="<!-->"),typeof ge!="string"&&!Cn(ge)&&(ge=d1(ge),typeof ge!="string"))throw Un("dirty is not a string, aborting");if(!t.isSupported)return ge;We?(V=He,W=ot):Ie(j),(Y.uponSanitizeElement.length>0||Y.uponSanitizeAttribute.length>0)&&(V=cn(V)),Y.uponSanitizeAttribute.length>0&&(W=cn(W)),t.removed=[];const Fe=pt&&typeof ge!="string"&&Cn(ge);if(Fe){Ut(ge);const en=w(ge);if(typeof en=="string"){const tn=Le(en);if(!V[tn]||Te[tn])throw sn(ge),Un("root node is forbidden and cannot be sanitized in-place")}if(Qt(ge))throw sn(ge),Un("root node is clobbered and cannot be sanitized in-place");try{bt(ge)}catch(tn){throw sn(ge),tn}}else if(Cn(ge))J=Gt("<!---->"),me=J.ownerDocument.importNode(ge,!0),me.nodeType===dn.element&&me.nodeName==="BODY"||me.nodeName==="HTML"?J=me:J.appendChild(me),bt(me);else{if(!Je&&!xe&&!Ee&&ge.indexOf("<")===-1)return D&&je?T(ge):ge;if(J=Gt(ge),!J)return Je?null:je?k:""}J&&Qe&&Rt(J.firstChild);const lt=Fe?ge:J;try{const en=Pn(lt);for(;ae=en.nextNode();)ze(ae,lt),Ze(ae),ln(ae.content)&&ft(ae.content)}catch(en){throw Fe&&(sn(ge),qn(t.removed,tn=>{tn.element&&xt(tn.element)})),en}if(Fe)return qn(t.removed,en=>{en.element&&xt(en.element)}),xe&&Kt(ge),ge;if(Je){if(xe&&Kt(J),vt)for(Ce=K.call(J.ownerDocument);J.firstChild;)Ce.appendChild(J.firstChild);else Ce=J;return(W.shadowroot||W.shadowrootmode)&&(Ce=q.call(r,Ce,!0)),Ce}let ht=Ee?J.outerHTML:J.innerHTML;return Ee&&V["!doctype"]&&J.ownerDocument&&J.ownerDocument.doctype&&J.ownerDocument.doctype.name&&Yt(x1,J.ownerDocument.doctype.name)&&(ht="<!DOCTYPE "+J.ownerDocument.doctype.name+`>
|
|
798
|
-
`+ht),xe&&(ht=
|
|
797
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QC(e,t){return ZC(e)||XC(e,t)||e1(e,t)||JC()}function e1(e,t){if(e){if(typeof e=="string")return tl(e,t);var a={}.toString.call(e).slice(8,-1);return a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set"?Array.from(e):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?tl(e,t):void 0}}const nl=Object.entries,al=Object.setPrototypeOf,t1=Object.isFrozen,n1=Object.getPrototypeOf,a1=Object.getOwnPropertyDescriptor;let Ot=Object.freeze,Wt=Object.seal,oa=Object.create,rl=typeof Reflect<"u"&&Reflect,zr=rl.apply,Wr=rl.construct;Ot||(Ot=function(t){return t}),Wt||(Wt=function(t){return t}),zr||(zr=function(t,a){for(var r=arguments.length,s=new Array(r>2?r-2:0),l=2;l<r;l++)s[l-2]=arguments[l];return t.apply(a,s)}),Wr||(Wr=function(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),s=1;s<a;s++)r[s-1]=arguments[s];return new t(...r)});const qn=Ft(Array.prototype.forEach),r1=Ft(Array.prototype.lastIndexOf),ol=Ft(Array.prototype.pop),Ba=Ft(Array.prototype.push),o1=Ft(Array.prototype.splice),sa=Array.isArray,ka=Ft(String.prototype.toLowerCase),Hr=Ft(String.prototype.toString),sl=Ft(String.prototype.match),Aa=Ft(String.prototype.replace),ll=Ft(String.prototype.indexOf),s1=Ft(String.prototype.trim),l1=Ft(Number.prototype.toString),i1=Ft(Boolean.prototype.toString),il=typeof BigInt>"u"?null:Ft(BigInt.prototype.toString),ul=typeof Symbol>"u"?null:Ft(Symbol.prototype.toString),an=Ft(Object.prototype.hasOwnProperty),Na=Ft(Object.prototype.toString),Kt=Ft(RegExp.prototype.test),Un=u1(TypeError);function Ft(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var a=arguments.length,r=new Array(a>1?a-1:0),s=1;s<a;s++)r[s-1]=arguments[s];return zr(e,t,r)}}function u1(e){return function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return Wr(e,a)}}function mt(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ka;if(al&&al(e,null),!sa(t))return e;let r=t.length;for(;r--;){let s=t[r];if(typeof s=="string"){const l=a(s);l!==s&&(t1(t)||(t[r]=l),s=l)}e[s]=!0}return e}function c1(e){for(let t=0;t<e.length;t++)an(e,t)||(e[t]=null);return e}function dn(e){const t=oa(null);for(const r of nl(e)){var a=QC(r,2);const s=a[0],l=a[1];an(e,s)&&(sa(l)?t[s]=c1(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=dn(l):t[s]=l)}return t}function d1(e){switch(typeof e){case"string":return e;case"number":return l1(e);case"boolean":return i1(e);case"bigint":return il?il(e):"0";case"symbol":return ul?ul(e):"Symbol()";case"undefined":return Na(e);case"function":case"object":{if(e===null)return Na(e);const t=e,a=yn(t,"toString");if(typeof a=="function"){const r=a(t);return typeof r=="string"?r:Na(r)}return Na(e)}default:return Na(e)}}function yn(e,t){for(;e!==null;){const r=a1(e,t);if(r){if(r.get)return Ft(r.get);if(typeof r.value=="function")return Ft(r.value)}e=n1(e)}function a(){return null}return a}function p1(e){try{return Kt(e,""),!0}catch{return!1}}const cl=Ot(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Vr=Ot(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),qr=Ot(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),h1=Ot(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ur=Ot(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),m1=Ot(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),dl=Ot(["#text"]),pl=Ot(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Gr=Ot(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),hl=Ot(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),nr=Ot(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),C1=Wt(/{{[\w\W]*|^[\w\W]*}}/g),f1=Wt(/<%[\w\W]*|^[\w\W]*%>/g),b1=Wt(/\${[\w\W]*/g),g1=Wt(/^data-[\-\w.\u00B7-\uFFFF]+$/),y1=Wt(/^aria-[\-\w]+$/),ml=Wt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),v1=Wt(/^(?:\w+script|data):/i),_1=Wt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),x1=Wt(/^html$/i),w1=Wt(/^[a-z][.\w]*(-[.\w]+)+$/i),Cl=Wt(/<[/\w!]/g),fl=Wt(/<[/\w]/g),B1=Wt(/<\/no(script|embed|frames)/i),k1=Wt(/\/>/i),pn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},bl=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],A1=Ot(mt({},bl)),N1=(function(){const e={};return qn(bl,t=>{e[t]=Wt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Ot(e)})(),E1=function(){return typeof window>"u"?null:window},D1=function(t,a){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";a&&a.hasAttribute(s)&&(r=a.getAttribute(s));const l="dompurify"+(r?"#"+r:"");try{return t.createPolicy(l,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},gl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Fn=function(t,a,r,s){return an(t,a)&&sa(t[a])?mt(s.base?dn(s.base):{},t[a],s.transform):r},Kr=function(t,a,r){const s=an(t,a)?t[a]:void 0;return s&&typeof s=="object"?dn(s):r()};function yl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:E1();const t=ge=>yl(ge);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==pn.document||!e.Element)return t.isSupported=!1,t;let a=e.document;const r=a,s=r.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,i=e.Node,u=e.Element,c=e.NodeFilter,d=e.NamedNodeMap;d===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,p=e.trustedTypes,m=u.prototype,g=yn(m,"cloneNode"),y=yn(m,"remove"),C=yn(m,"nextSibling"),b=yn(m,"childNodes"),v=yn(m,"parentNode"),f=yn(m,"shadowRoot"),B=yn(m,"attributes"),_=i&&i.prototype?yn(i.prototype,"nodeType"):null,N=i&&i.prototype?yn(i.prototype,"nodeName"):null,x=i&&i.prototype?yn(i.prototype,"ownerDocument"):null,E=function(j){return _?_(j):j.nodeType},w=function(j){return N?N(j):j.nodeName};if(typeof l=="function"){const ge=a.createElement("template");ge.content&&ge.content.ownerDocument&&(a=ge.content.ownerDocument)}let D,k="",A,R=!1,$=0;const G=function(){if($>0)throw Un('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},T=function(j){G(),$++;try{return D.createHTML(j)}finally{$--}},P=function(j){G(),$++;try{return D.createScriptURL(j)}finally{$--}},L=function(){return R||(A=D1(p,s),R=!0),A},Q=a,Z=Q.implementation,F=Q.createNodeIterator,K=Q.createDocumentFragment,M=Q.getElementsByTagName,q=r.importNode;let Y=gl();t.isSupported=typeof nl=="function"&&typeof v=="function"&&Z&&Z.createHTMLDocument!==void 0;const U=C1,S=f1,I=b1,O=g1,z=y1,se=v1,te=_1,de=w1;let ee=ml,V=null;const ne=mt({},[...cl,...Vr,...qr,...Ur,...dl]);let W=null;const H=mt({},[...pl,...Gr,...hl,...nr]);let ie=Object.seal(oa(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Te=null,ye=null;const he=Object.seal(oa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Se=!0,$e=!0,Ne=!1,ue=!0,xe=!1,ke=!0,Ee=!1,We=!1,He=null,ot=null,Qe=!1,Je=!1,vt=!1,je=!1,Ye=!0,Be=!1;const Ue="user-content-";let qe=!0,pt=!1,_t={},Et=null;const wt=mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let st=null;const tt=mt({},["audio","video","img","source","image","track"]);let Bt=null;const kt=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Tt="http://www.w3.org/1998/Math/MathML",Lt="http://www.w3.org/2000/svg",gt="http://www.w3.org/1999/xhtml";let it=gt,ut=!1,ct=null;const ve=mt({},[Tt,Lt,gt],Hr),Me=Ot(["mi","mo","mn","ms","mtext"]);let Pe=mt({},Me);const Oe=Ot(["annotation-xml"]);let dt=mt({},Oe);const Dt=mt({},["title","style","font","a","script"]);let yt=null;const xt=["application/xhtml+xml","text/html"],Ct="text/html";let Le=null,at=null;const oe=a.createElement("form"),fe=function(j){return j instanceof RegExp||j instanceof Function},Ie=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(at&&at===j)return;(!j||typeof j!="object")&&(j={}),j=dn(j),yt=xt.indexOf(j.PARSER_MEDIA_TYPE)===-1?Ct:j.PARSER_MEDIA_TYPE,Le=yt==="application/xhtml+xml"?Hr:ka,V=Fn(j,"ALLOWED_TAGS",ne,{transform:Le}),W=Fn(j,"ALLOWED_ATTR",H,{transform:Le}),ct=Fn(j,"ALLOWED_NAMESPACES",ve,{transform:Hr}),Bt=Fn(j,"ADD_URI_SAFE_ATTR",kt,{transform:Le,base:kt}),st=Fn(j,"ADD_DATA_URI_TAGS",tt,{transform:Le,base:tt}),Et=Fn(j,"FORBID_CONTENTS",wt,{transform:Le}),Te=Fn(j,"FORBID_TAGS",dn({}),{transform:Le}),ye=Fn(j,"FORBID_ATTR",dn({}),{transform:Le}),_t=an(j,"USE_PROFILES")?j.USE_PROFILES&&typeof j.USE_PROFILES=="object"?dn(j.USE_PROFILES):j.USE_PROFILES:!1,Se=j.ALLOW_ARIA_ATTR!==!1,$e=j.ALLOW_DATA_ATTR!==!1,Ne=j.ALLOW_UNKNOWN_PROTOCOLS||!1,ue=j.ALLOW_SELF_CLOSE_IN_ATTR!==!1,xe=j.SAFE_FOR_TEMPLATES||!1,ke=j.SAFE_FOR_XML!==!1,Ee=j.WHOLE_DOCUMENT||!1,Je=j.RETURN_DOM||!1,vt=j.RETURN_DOM_FRAGMENT||!1,je=j.RETURN_TRUSTED_TYPE||!1,Qe=j.FORCE_BODY||!1,Ye=j.SANITIZE_DOM!==!1,Be=j.SANITIZE_NAMED_PROPS||!1,qe=j.KEEP_CONTENT!==!1,pt=j.IN_PLACE||!1,ee=p1(j.ALLOWED_URI_REGEXP)?j.ALLOWED_URI_REGEXP:ml,it=typeof j.NAMESPACE=="string"?j.NAMESPACE:gt,Pe=Kr(j,"MATHML_TEXT_INTEGRATION_POINTS",()=>mt({},Me)),dt=Kr(j,"HTML_INTEGRATION_POINTS",()=>mt({},Oe));const J=Kr(j,"CUSTOM_ELEMENT_HANDLING",()=>oa(null));if(ie=oa(null),an(J,"tagNameCheck")&&fe(J.tagNameCheck)&&(ie.tagNameCheck=J.tagNameCheck),an(J,"attributeNameCheck")&&fe(J.attributeNameCheck)&&(ie.attributeNameCheck=J.attributeNameCheck),an(J,"allowCustomizedBuiltInElements")&&typeof J.allowCustomizedBuiltInElements=="boolean"&&(ie.allowCustomizedBuiltInElements=J.allowCustomizedBuiltInElements),Wt(ie),xe&&($e=!1),vt&&(Je=!0),_t&&(V=mt({},dl),W=oa(null),_t.html===!0&&(mt(V,cl),mt(W,pl)),_t.svg===!0&&(mt(V,Vr),mt(W,Gr),mt(W,nr)),_t.svgFilters===!0&&(mt(V,qr),mt(W,Gr),mt(W,nr)),_t.mathMl===!0&&(mt(V,Ur),mt(W,hl),mt(W,nr))),he.tagCheck=null,he.attributeCheck=null,an(j,"ADD_TAGS")&&(typeof j.ADD_TAGS=="function"?he.tagCheck=j.ADD_TAGS:sa(j.ADD_TAGS)&&(V===ne&&(V=dn(V)),mt(V,j.ADD_TAGS,Le))),an(j,"ADD_ATTR")&&(typeof j.ADD_ATTR=="function"?he.attributeCheck=j.ADD_ATTR:sa(j.ADD_ATTR)&&(W===H&&(W=dn(W)),mt(W,j.ADD_ATTR,Le))),an(j,"ADD_FORBID_CONTENTS")&&sa(j.ADD_FORBID_CONTENTS)&&(Et===wt&&(Et=dn(Et)),mt(Et,j.ADD_FORBID_CONTENTS,Le)),qe&&(V["#text"]=!0),Ee&&mt(V,["html","head","body"]),V.table&&(mt(V,["tbody"]),delete Te.tbody),j.TRUSTED_TYPES_POLICY){if(typeof j.TRUSTED_TYPES_POLICY.createHTML!="function")throw Un('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof j.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Un('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const me=D;D=j.TRUSTED_TYPES_POLICY;try{k=T("")}catch(ae){throw D=me,ae}}else j.TRUSTED_TYPES_POLICY===null?(D=void 0,k=""):(D===void 0&&(D=L()),D&&typeof k=="string"&&(k=T("")));Ot&&Ot(j),at=j},Xe=mt({},[...Vr,...qr,...h1]),et=mt({},[...Ur,...m1]),rt=function(j,J,me){return J.namespaceURI===gt?j==="svg":J.namespaceURI===Tt?j==="svg"&&(me==="annotation-xml"||Pe[me]):!!Xe[j]},$t=function(j,J,me){return J.namespaceURI===gt?j==="math":J.namespaceURI===Lt?j==="math"&&dt[me]:!!et[j]},xn=function(j,J,me){return J.namespaceURI===Lt&&!dt[me]||J.namespaceURI===Tt&&!Pe[me]?!1:!et[j]&&(Dt[j]||!Xe[j])},sn=function(j){let J=v(j);(!J||!J.tagName)&&(J={namespaceURI:it,tagName:"template"});const me=ka(j.tagName),ae=ka(J.tagName);return ct[j.namespaceURI]?j.namespaceURI===Lt?rt(me,J,ae):j.namespaceURI===Tt?$t(me,J,ae):j.namespaceURI===gt?xn(me,J,ae):!!(yt==="application/xhtml+xml"&&ct[j.namespaceURI]):!1},Rt=function(j){Ba(t.removed,{element:j});try{v(j).removeChild(j)}catch{if(y(j),!v(j))throw Un("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},zt=function(j,J,me){try{j.removeAttributeNode(J)}catch{try{j.removeAttribute(me)}catch{}}},ln=function(j){Qt(j);const J=b(j);if(J){const ae=[];qn(J,Ce=>{Ba(ae,Ce)}),qn(ae,Ce=>{try{y(Ce)}catch{}})}const me=B(j);if(me)for(let ae=me.length-1;ae>=0;--ae){const Ce=me[ae],Fe=Ce&&Ce.name;typeof Fe=="string"&&zt(j,Ce,Fe)}},It=function(j,J,me){if(!me)try{me=J.getAttributeNode(j)}catch{me=null}Ba(t.removed,{attribute:me||null,from:J});try{me?J.removeAttributeNode(me):J.removeAttribute(j)}catch{try{J.removeAttribute(j)}catch{}}if(j==="is")if(Je||vt)try{Rt(J)}catch{}else try{J.setAttribute(j,"")}catch{}},wn=function(j){const J=B(j);if(J)for(let me=J.length-1;me>=0;--me){const ae=J[me],Ce=ae&&ae.name;typeof Ce!="string"||W[Le(Ce)]||zt(j,ae,Ce)}},Qt=function(j){const J=[j];for(;J.length>0;){const me=J.pop();E(me)===pn.element&&wn(me);const Ce=b(me);if(Ce)for(let Fe=Ce.length-1;Fe>=0;--Fe)J.push(Ce[Fe])}},St=function(j,J){return ke?j==="patchsrc"?!0:j==="for"&&J!=="label"&&J!=="output":!1},Pt=function(j){if(!ke)return;const J=[j];for(;J.length>0;){const me=J.pop(),ae=E(me);if(ae===pn.processingInstruction||ae===pn.comment&&Kt(fl,me.data)){try{y(me)}catch{}continue}if(ae===pn.element){const Fe=me,lt=Le(w(me));try{Fe.hasAttribute&&Fe.hasAttribute("patchsrc")&&Fe.removeAttribute("patchsrc"),Fe.hasAttribute&&Fe.hasAttribute("for")&&St("for",lt)&&Fe.removeAttribute("for")}catch{}}const Ce=b(me);if(Ce)for(let Fe=Ce.length-1;Fe>=0;--Fe)J.push(Ce[Fe])}},Ht=function(j){let J=null,me=null;if(Qe)j="<remove></remove>"+j;else{const Fe=sl(j,/^[\r\n\t ]+/);me=Fe&&Fe[0]}yt==="application/xhtml+xml"&&it===gt&&(j='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+j+"</body></html>");const ae=D?T(j):j;if(it===gt)try{J=new h().parseFromString(ae,yt)}catch{}if(!J||!J.documentElement){J=Z.createDocument(it,"template",null);try{J.documentElement.innerHTML=ut?k:ae}catch{}}const Ce=J.body||J.documentElement;return j&&me&&Ce.insertBefore(a.createTextNode(me),Ce.childNodes[0]||null),it===gt?M.call(J,Ee?"html":"body")[0]:Ee?J.documentElement:Ce},Yt=function(j){const J=x?x(j):j.ownerDocument;return F.call(J||j,j,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Cn=function(j){return j=Aa(j,U," "),j=Aa(j,S," "),j=Aa(j,I," "),j},Gt=function(j){var J;j.normalize();const me=x?x(j):j.ownerDocument,ae=F.call(me||j,j,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let Ce=ae.nextNode();for(;Ce;)Ce.data=Cn(Ce.data),Ce=ae.nextNode();const Fe=(J=j.querySelectorAll)===null||J===void 0?void 0:J.call(j,"template");Fe&&qn(Fe,lt=>{un(lt.content)&&Gt(lt.content)})},en=function(j){const J=N?N(j):null;return typeof J!="string"||Le(J)!=="form"?!1:typeof j.nodeName!="string"||typeof j.textContent!="string"||typeof j.removeChild!="function"||j.attributes!==B(j)||typeof j.removeAttribute!="function"||typeof j.setAttribute!="function"||typeof j.namespaceURI!="string"||typeof j.insertBefore!="function"||typeof j.hasChildNodes!="function"||j.nodeType!==_(j)||j.childNodes!==b(j)},un=function(j){if(!_||typeof j!="object"||j===null)return!1;try{return _(j)===pn.documentFragment}catch{return!1}},fn=function(j){if(!_||typeof j!="object"||j===null)return!1;try{return typeof _(j)=="number"}catch{return!1}};function Vt(ge,j,J){ge.length!==0&&qn(ge,me=>{me.call(t,j,J,at)})}const Bn=function(j,J){return!!(ke&&j.hasChildNodes()&&!fn(j.firstElementChild)&&Kt(Cl,j.textContent)&&Kt(Cl,j.innerHTML)||ke&&j.namespaceURI===gt&&A1[J]&&(fn(j.firstElementChild)||typeof j.textContent=="string"&&Kt(N1[J],j.textContent))||j.nodeType===pn.processingInstruction||ke&&j.nodeType===pn.comment&&Kt(fl,j.data))},pe=function(j,J){if(j instanceof RegExp)return Kt(j,J);if(j instanceof Function){for(var me=arguments.length,ae=new Array(me>2?me-2:0),Ce=2;Ce<me;Ce++)ae[Ce-2]=arguments[Ce];return!!j(J,...ae)}return!1},De=function(j,J,me){if(!Te[J]&&Ae(J)&&pe(ie.tagNameCheck,J))return!1;if(qe&&!Et[J]){const ae=v(j),Ce=b(j);if(Ce&&ae){const Fe=Ce.length;for(let lt=Fe-1;lt>=0;--lt){const ht=j===me?g(Ce[lt],!0):Ce[lt];ae.insertBefore(ht,C(j))}}}return Rt(j),!0},Re=function(j,J,me,ae){return j.length===0?J:J===me||J===ae?dn(J):J},Ge=function(j,J){return j===J||v(j)!==null?!1:(pt&&Qt(j),!0)},ze=function(j,J){if(Vt(Y.beforeSanitizeElements,j,null),Ge(j,J))return!0;if(en(j))return Rt(j),!0;const me=Le(w(j));if(V=Re(Y.uponSanitizeElement,V,ne,He),Vt(Y.uponSanitizeElement,j,{tagName:me,allowedTags:V}),Ge(j,J))return!0;if(Bn(j,me))return Rt(j),!0;if(Te[me]||!(he.tagCheck instanceof Function&&he.tagCheck(me))&&!V[me]){const Ce=De(j,me,J);return Ce===!1&&Vt(Y.afterSanitizeElements,j,null),Ce}if(E(j)===pn.element&&!sn(j)||(me==="noscript"||me==="noembed"||me==="noframes")&&Kt(B1,j.innerHTML))return Rt(j),!0;if(xe&&j.nodeType===pn.text){const Ce=Cn(j.textContent);j.textContent!==Ce&&(Ba(t.removed,{element:j.cloneNode()}),j.textContent=Ce)}return Vt(Y.afterSanitizeElements,j,null),!1},X=function(j,J,me){if(ye[J]||St(J,j)||Ye&&(J==="id"||J==="name")&&(me in a||me in oe))return!1;const ae=W[J]||he.attributeCheck instanceof Function&&he.attributeCheck(J,j);return $e&&Kt(O,J)||Se&&Kt(z,J)?!0:ae?Bt[J]||Kt(ee,Aa(me,te,""))||(J==="src"||J==="xlink:href"||J==="href")&&j!=="script"&&ll(me,"data:")===0&&st[j]||Ne&&!Kt(se,Aa(me,te,""))?!0:!me:Ae(j)&&pe(ie.tagNameCheck,j)&&pe(ie.attributeNameCheck,J,j)||J==="is"&&ie.allowCustomizedBuiltInElements&&pe(ie.tagNameCheck,me)},ce=mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ae=function(j){return!ce[ka(j)]&&Kt(de,j)},Ve=function(j,J,me,ae){if(D&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!me)switch(p.getAttributeType(j,J)){case"TrustedHTML":return T(ae);case"TrustedScriptURL":return P(ae)}return ae},Ke=function(j,J,me,ae){try{me?j.setAttributeNS(me,J,ae):j.setAttribute(J,ae),en(j)?Rt(j):ol(t.removed)}catch{It(J,j)}},Ze=function(j){Vt(Y.beforeSanitizeAttributes,j,null);const J=j.attributes;if(!J||en(j))return;W=Re(Y.uponSanitizeAttribute,W,H,ot);const me={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0};let ae=J.length;const Ce=Le(j.nodeName);for(;ae--;){const Fe=J[ae],lt=Fe.name,ht=Fe.namespaceURI,tn=Fe.value,nn=Le(lt),Pr=tn;let Zt=lt==="value"?Pr:s1(Pr);if(me.attrName=nn,me.attrValue=Zt,me.keepAttr=!0,me.forceKeepAttr=void 0,Vt(Y.uponSanitizeAttribute,j,me),Zt=me.attrValue,Be&&(nn==="id"||nn==="name")&&ll(Zt,Ue)!==0&&(It(lt,j,Fe),Zt=Ue+Zt),ke&&Kt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Zt)){It(lt,j,Fe);continue}if(nn==="attributename"&&sl(Zt,"href")){It(lt,j,Fe);continue}if(!me.forceKeepAttr){if(!me.keepAttr){It(lt,j,Fe);continue}if(!ue&&Kt(k1,Zt)){It(lt,j,Fe);continue}if(xe&&(Zt=Cn(Zt)),!X(Ce,nn,Zt)){It(lt,j,Fe);continue}Zt=Ve(Ce,nn,ht,Zt),Zt!==Pr&&Ke(j,lt,ht,Zt)}}Vt(Y.afterSanitizeAttributes,j,null)},ft=function(j){let J=null;const me=Yt(j);for(Vt(Y.beforeSanitizeShadowDOM,j,null);J=me.nextNode();)if(Vt(Y.uponSanitizeShadowNode,J,null),ze(J,j),Ze(J),un(J.content)&&ft(J.content),E(J)===pn.element){const ae=f(J);un(ae)&&(bt(ae),ft(ae))}Vt(Y.afterSanitizeShadowDOM,j,null)},bt=function(j){const J=[{node:j,shadow:null}];for(;J.length>0;){const me=J.pop();if(me.shadow){ft(me.shadow);continue}const ae=me.node,Fe=E(ae)===pn.element,lt=b(ae);if(lt)for(let ht=lt.length-1;ht>=0;--ht)J.push({node:lt[ht],shadow:null});if(Fe){const ht=N?N(ae):null;if(typeof ht=="string"&&Le(ht)==="template"){const tn=ae.content;un(tn)&&J.push({node:tn,shadow:null})}}if(Fe){const ht=f(ae);un(ht)&&J.push({node:null,shadow:ht},{node:ht,shadow:null})}}};return t.sanitize=function(ge){let j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},J=null,me=null,ae=null,Ce=null;if(ut=!ge,ut&&(ge="<!-->"),typeof ge!="string"&&!fn(ge)&&(ge=d1(ge),typeof ge!="string"))throw Un("dirty is not a string, aborting");if(!t.isSupported)return ge;We?(V=He,W=ot):Ie(j),(Y.uponSanitizeElement.length>0||Y.uponSanitizeAttribute.length>0)&&(V=dn(V)),Y.uponSanitizeAttribute.length>0&&(W=dn(W)),t.removed=[];const Fe=pt&&typeof ge!="string"&&fn(ge);if(Fe){Pt(ge);const tn=w(ge);if(typeof tn=="string"){const nn=Le(tn);if(!V[nn]||Te[nn])throw ln(ge),Un("root node is forbidden and cannot be sanitized in-place")}if(en(ge))throw ln(ge),Un("root node is clobbered and cannot be sanitized in-place");try{bt(ge)}catch(nn){throw ln(ge),nn}}else if(fn(ge))J=Ht("<!---->"),me=J.ownerDocument.importNode(ge,!0),me.nodeType===pn.element&&me.nodeName==="BODY"||me.nodeName==="HTML"?J=me:J.appendChild(me),bt(me);else{if(!Je&&!xe&&!Ee&&ge.indexOf("<")===-1)return D&&je?T(ge):ge;if(J=Ht(ge),!J)return Je?null:je?k:""}J&&Qe&&Rt(J.firstChild);const lt=Fe?ge:J;try{const tn=Yt(lt);for(;ae=tn.nextNode();)ze(ae,lt),Ze(ae),un(ae.content)&&ft(ae.content)}catch(tn){throw Fe&&(ln(ge),qn(t.removed,nn=>{nn.element&&Qt(nn.element)})),tn}if(Fe)return qn(t.removed,tn=>{tn.element&&Qt(tn.element)}),xe&&Gt(ge),ge;if(Je){if(xe&&Gt(J),vt)for(Ce=K.call(J.ownerDocument);J.firstChild;)Ce.appendChild(J.firstChild);else Ce=J;return(W.shadowroot||W.shadowrootmode)&&(Ce=q.call(r,Ce,!0)),Ce}let ht=Ee?J.outerHTML:J.innerHTML;return Ee&&V["!doctype"]&&J.ownerDocument&&J.ownerDocument.doctype&&J.ownerDocument.doctype.name&&Kt(x1,J.ownerDocument.doctype.name)&&(ht="<!DOCTYPE "+J.ownerDocument.doctype.name+`>
|
|
798
|
+
`+ht),xe&&(ht=Cn(ht)),D&&je?T(ht):ht},t.setConfig=function(){let ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ie(ge),We=!0,He=V,ot=W},t.clearConfig=function(){at=null,We=!1,He=null,ot=null,D=A,k=""},t.isValidAttribute=function(ge,j,J){at||Ie({});const me=Le(ge),ae=Le(j);return X(me,ae,J)},t.addHook=function(ge,j){typeof j=="function"&&an(Y,ge)&&Ba(Y[ge],j)},t.removeHook=function(ge,j){if(an(Y,ge)){if(j!==void 0){const J=r1(Y[ge],j);return J===-1?void 0:o1(Y[ge],J,1)[0]}return ol(Y[ge])}},t.removeHooks=function(ge){an(Y,ge)&&(Y[ge]=[])},t.removeAllHooks=function(){Y=gl()},t}var la=yl();let Yr=null;const S1=1500;function Zr(){Yr?.clear(),Yr=null}function j1(e,{onEnd:t,rate:a=.9}={}){if(typeof window>"u"||typeof SpeechSynthesisUtterance>"u"||!("speechSynthesis"in window)){t?.();return}const r=window.speechSynthesis;Zr();let s=!1;const l=()=>{if(!s){s=!0;try{t?.()}catch{}}};try{r.cancel()}catch{l();return}const i=()=>{Zr();try{r.cancel();const d=new SpeechSynthesisUtterance(e),h=r.getVoices().find(p=>p.lang.startsWith("ko"));h&&(d.voice=h),d.rate=a,d.onend=t?l:null,d.onerror=t?l:null,r.speak(d)}catch{l()}};let u;try{u=r.getVoices()}catch{l();return}if(u.length>0){i();return}const c=setTimeout(i,S1);try{r.addEventListener("voiceschanged",i,{once:!0})}catch{clearTimeout(c),l();return}Yr={clear:()=>{clearTimeout(c),r.removeEventListener("voiceschanged",i)}}}function Xr(){Zr(),typeof window<"u"&&"speechSynthesis"in window&&window.speechSynthesis.cancel()}const T1=/^(?:[a-z]+:)?\/\//i,M1="__ihab_core_asset_base_url__";function L1(){return globalThis[M1]??""}function Jr(e){const t=String(e||"").trim();if(!t)return"";if(T1.test(t)||t.startsWith("data:")||t.startsWith("blob:"))return t;const a=t.startsWith("/")?t:`/${t}`,r=L1();return r?`${r}${a}`:a}const vl="__ihab_core_storage_resolvers__";function Ea(){return globalThis[vl]??null}function $1(e){globalThis[vl]=e}let _l=class extends Error{constructor(t){super(`
|
|
799
799
|
[ihabdevteam-core] ${t}() \uD638\uCD9C \uC2E4\uD328 \u2014 configureStorage()\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
|
|
800
800
|
|
|
801
801
|
\uC571 \uCD08\uAE30\uD654 \uC2DC\uC810(main.tsx \uB4F1)\uC5D0 \uC544\uB798\uC640 \uAC19\uC774 \uD55C \uBC88 \uD638\uCD9C\uD558\uC138\uC694:
|
|
@@ -815,19 +815,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
815
815
|
npm install @supabase/supabase-js
|
|
816
816
|
pnpm add @supabase/supabase-js
|
|
817
817
|
`),this.name="StorageNotConfiguredError"}};function R1(e){$1(e)}function xl(e,t){if(!e)return null;const a=Ea();return a?.resolvePath?a.resolvePath(e,t):t?`${t}/${e}.mp3`:null}async function wl(e){if(!e)return null;const t=Ea();if(!t)throw new _l("getSignedOrPublicUrl");try{return await t.resolveUrl(e)}catch{return null}}async function Bl(e){const t=Ea();if(!t)throw new _l("downloadSound");return t.download(e)}function P1(){return Ea()?.noiseBaseUrl??"/sounds/noise"}function I1(){const e=Number(Ea()?.noiseFileGain);return Number.isFinite(e)&&e>0?e:1}function F1(e){const t=AbortSignal.timeout;if(typeof t=="function")return t.call(AbortSignal,e);const a=new AbortController;return setTimeout(()=>a.abort(),e),a.signal}function O1(e){return e===400||e===404||e===410}const kl="__ihab_core_tts_config__";function Da(){return globalThis[kl]?.urlResolver??null}function ar(){return globalThis[kl]?.fallbackUrlResolver??null}const z1="__ihab_core_pronunciation_resolver__";function W1(){return globalThis[z1]??null}let On=null;const Sa=new WeakMap,Qr=new WeakMap,eo=new WeakMap;let Al=!1;const Nl=e=>Math.max(0,Math.min(1,Number.isFinite(e)?e:0));function H1(){if(Al||typeof document>"u")return;Al=!0;const e=()=>{try{On&&On.state!=="running"&&On.resume()}catch{}};for(const t of["pointerdown","touchend","keydown"])document.addEventListener(t,e,{capture:!0,passive:!0})}function El(){if(On)return On;try{const e=window.AudioContext||window.webkitAudioContext;return e?(On=new e,H1(),On):null}catch{return null}}function to(){try{On?.resume()}catch{}}function no(e,t){const a=Sa.get(t);if(a)return a;try{const r=e.createMediaElementSource(t),s=e.createGain(),l=e.createAnalyser();l.fftSize=1024,l.smoothingTimeConstant=.6,s.gain.value=Nl(Qr.get(t)??t.volume),r.connect(s),s.connect(l),s.connect(e.destination);try{t.volume=1}catch{}const i={gain:s,analyser:l};return Sa.set(t,i),i}catch{return null}}function rr(e){if(!e)return Promise.resolve(null);const t=Sa.get(e);if(t)return Promise.resolve(t.analyser);const a=El();if(!a)return Promise.resolve(null);if(a.state==="running")return Promise.resolve(no(a,e)?.analyser??null);const r=eo.get(e);if(r)return r;const s=Promise.resolve().then(()=>a.resume()).then(()=>a.state==="running"?no(a,e)?.analyser??null:null).catch(()=>null).finally(()=>{eo.delete(e)});return eo.set(e,s),s}function V1(e){if(!e)return null;const t=Sa.get(e);if(t)return t.analyser;const a=El();return a?a.state==="running"?no(a,e)?.analyser??null:(rr(e),null):null}function zn(e,t){const a=Nl(t);Qr.set(e,a);const r=Sa.get(e);if(r){try{e.volume!==1&&(e.volume=1)}catch{}const s=r.gain.gain;try{const l=r.gain.context.currentTime;s.cancelScheduledValues(l),s.setTargetAtTime(a,l,.01)}catch{try{s.value=a}catch{}}return"gain"}try{e.volume=a}catch{}return"element"}function or(e){return Qr.get(e)??e.volume}function q1(e,t){e.getFloatTimeDomainData(t);let a=0;for(let r=0;r<t.length;r++){const s=t[r];a+=s*s}return Math.sqrt(a/t.length)}const U1="__ihab_core_image_config__";function ia(){return globalThis[U1]??null}const Dl="word_image_existence_map_v1",G1="ihab:image-existence-updated";let ja=null;function K1(){ja!==null&&(clearTimeout(ja),ja=null),typeof window<"u"&&window.dispatchEvent(new Event(G1))}function Y1(){ja===null&&(ja=setTimeout(K1,200))}let Gn=null,ao=0;const Ta=new Map;function Z1(){if(Gn)return Gn;try{const e=typeof localStorage<"u"?localStorage.getItem(Dl):null,t=e?JSON.parse(e):null,a={};if(t&&typeof t=="object"&&!Array.isArray(t))for(const[r,s]of Object.entries(t))typeof s=="boolean"&&(a[r]=s);Gn=a}catch{Gn={}}return Gn}let ro=null;function X1(){ro===null&&(ro=setTimeout(()=>{ro=null;try{typeof localStorage<"u"&&Gn&&localStorage.setItem(Dl,JSON.stringify(Gn))}catch{}},200))}function J1(e,t){return`${e}_${t??1}`}async function Q1(e,t,a=!1){const r=Z1(),s=J1(e,t);if(!a&&s in r)return r[s];if(!a&&Ta.has(s))return Ta.get(s);const l=ia();if(!l)return!1;let i;try{i=l(e,t)}catch{return!1}if(!i)return!1;let u;try{u=fetch(i,{method:"HEAD",signal:F1(8e3)})}catch{return!1}const c=u.then(d=>d.ok?!0:O1(d.status)?!1:null,()=>null).then(d=>Ta.get(s)!==c?d??!1:(Ta.delete(s),d===null?!1:(r[s]=d,ao++,X1(),d)));return Ta.set(s,c),c}async function Sl(e,t){const a=ao,r=await Q1(e,t);return ao!==a&&Y1(),r}const jl=90;function Tl(e){let t=0;for(const a of e){const r=a.codePointAt(0)??0;a===`
|
|
818
|
-
`||a==="\r"?t+=2:t+=r<128?1:2}return t}function ef(e){return Tl(e)>90?"LMS":"SMS"}function Ml(e,t=85){const a=Tl(e),r=ef(e),s=r==="SMS"?90:2e3,l=typeof t=="number"?t:null;return{bytes:a,type:r,limit:s,over:a>s,target:l,overTarget:l!==null&&a>l}}const tf=["onset","vowel","coda","glide"],Ll="none",nf={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},af="\uC5C6\uC74C";function rf(e){return tf.includes(e)}function of(e){const t={};for(const[a,r]of Object.entries(e)){const s=rf(a)?a:nf[a];s&&(t[s]=r===af?Ll:r)}return t}const sf={\u314F:{nucleus:"\u314F"},\u3151:{glide:"j",nucleus:"\u314F"},\u3153:{nucleus:"\u3153"},\u3155:{glide:"j",nucleus:"\u3153"},\u3157:{nucleus:"\u3157"},\u315B:{glide:"j",nucleus:"\u3157"},\u315C:{nucleus:"\u315C"},\u3160:{glide:"j",nucleus:"\u315C"},\u3161:{nucleus:"\u3161"},\u3163:{nucleus:"\u3163"},\u3150:{nucleus:"\u3154/\u3150"},\u3152:{glide:"j",nucleus:"\u3154/\u3150"},\u3154:{nucleus:"\u3154/\u3150"},\u3156:{glide:"j",nucleus:"\u3154/\u3150"},\u3158:{glide:"w",nucleus:"\u314F"},\u3159:{glide:"w",nucleus:"\u3154/\u3150"},\u315A:{glide:"w",nucleus:"\u3154/\u3150"},\u315D:{glide:"w",nucleus:"\u3153"},\u315E:{glide:"w",nucleus:"\u3154/\u3150"},\u315F:{glide:"w",nucleus:"\u3163"},\u3162:{glide:"\u0270",nucleus:"\u3163"}},$l=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],Rl=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],lf=["","\u3131","\u3132","\u3133","\u3134","\u3135","\u3136","\u3137","\u3139","\u313A","\u313B","\u313C","\u313D","\u313E","\u313F","\u3140","\u3141","\u3142","\u3144","\u3145","\u3146","\u3147","\u3148","\u314A","\u314B","\u314C","\u314D","\u314E"];function Ma(e){if(!e)return null;const t=e.charCodeAt(0)-44032;return t<0||t>=11172?null:{cho:Math.floor(t/588),jung:Math.floor(t%588/28),jong:t%28}}function uf(e){const t=Ma(e[0]||"");return t?$l[t.cho]:""}function cf(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],a=i=>$l.includes(i),r=i=>Rl.includes(i),s=t.map(i=>a(i)?"cho":r(i)?"jung":Ma(i)?"syl":"other"),l=t.map(i=>Ma(i));if(s.includes("other")){const i=e.toLowerCase();return u=>u.normalize("NFC").toLowerCase().includes(i)}return i=>{const u=[...i.normalize("NFC")];for(let c=0;c+t.length<=u.length;c++){let d=!0;for(let h=0;h<t.length;h++){const p=u[c+h],m=s[h];if(m==="cho"){if(uf(p)!==t[h]){d=!1;break}}else if(m==="jung"){const g=Ma(p);if(!g||Rl[g.jung]!==t[h]){d=!1;break}}else{const g=l[h];if(g&&g.jong===0){const y=Ma(p);if(!y||y.cho!==g.cho||y.jung!==g.jung){d=!1;break}}else if(p!==t[h]){d=!1;break}}}if(d)return!0}return!1}}const df={3:["\u3131","\u3145"],5:["\u3134","\u3148"],6:["\u3134","\u314E"],9:["\u3139","\u3131"],10:["\u3139","\u3141"],11:["\u3139","\u3142"],12:["\u3139","\u3145"],13:["\u3139","\u314C"],14:["\u3139","\u314D"],15:["\u3139","\u314E"],18:["\u3142","\u3145"]};Object.fromEntries(Object.entries(df).map(([e,t])=>[t.join(""),lf[Number(e)]]));const pf="word_pair_index_v2",hf="word_pair_index_sig_v2";let sr=null;function mf(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;for(const t of Object.values(e)){if(t===null||typeof t!="object"||Array.isArray(t))return!1;const a=t;for(const r of["cho","jung","jong"])if(!Array.isArray(a[r])||!a[r].every(s=>typeof s=="string"))return!1}return!0}function Cf(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(pf),t=localStorage.getItem(hf);if(!e||!t)return null;const a=JSON.parse(e);return mf(a)?{index:a,sig:t}:null}catch{return null}}function ff(){if(sr)return sr;const e=Cf();return e?(sr=e.index,e.sig,sr):null}function bf(e,t,a){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+a)/(t+a)))}function gf(e,t){if(!(e>0))return 1;const a=Math.max(1,Math.floor(t));if(e<=a)return e;const r=Math.ceil(e/a);return Math.max(1,Math.ceil(e/r))}const oo=/[ㄱ-ㅎ]/,yf=/[ㅏ-ㅣ]/;function Pl(e){e=e.normalize("NFC");for(let t=e.length-1;t>=0;t--){const a=e[t],r=a.charCodeAt(0);if(r>=44032&&r<=55203||oo.test(a)||yf.test(a))return a}return null}function vf(e){const t=Pl(e);if(!t)return"\uAC00";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC774":"\uAC00":oo.test(t)?"\uC774":"\uAC00"}function _f(e){return`${e}${vf(e)}`}function xf(e){const t=Pl(e);if(!t)return"\uB97C";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC744":"\uB97C":oo.test(t)?"\uC744":"\uB97C"}function wf(e){return`${e}${xf(e)}`}function Bf(e,t,a){const r=e.slice(),[s]=r.splice(t,1);return r.splice(a,0,s),r}function La(e,t=Math.random){const a=e.slice();for(let r=a.length-1;r>0;r--){const s=Math.floor(t()*(r+1));[a[r],a[s]]=[a[s],a[r]]}return a}const kf=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",t=typeof Vt?.t=="function"?Vt.t("common.unknownError",{defaultValue:e}):void 0;return typeof t=="string"&&t?t:e};function Il(e,t){if(t===void 0&&(t=kf()),e instanceof Error)return e.message||t;if(typeof e=="string")return e||t;if(e&&typeof e=="object"){const a=e;for(const r of[a.message,a.error_description,a.error])if(typeof r=="string"&&r)return r}return t}const Af="__ihab_core_word_pool__";function Fl(){return globalThis[Af]??null}const Ol=globalThis;function zl(e,t){const a=r=>{};try{const r=t();r&&typeof r.catch=="function"&&r.catch(a)}catch(r){a(r)}}function Nf(e){zl("time",()=>Ol.__ihabTrainingTimeLogger?.(e))}function Ef(e){zl("completion",()=>Ol.__ihabTrainingCompletionLogger?.(e))}const Df="Asia/Seoul",Sf=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function $a(e){let t;if(e instanceof Date)t=e;else if(typeof e=="string"){const a=e.trim(),r=/^(\d{4}-\d{2}-\d{2})(?:$|[T ])/.exec(a)?.[1];if(r){const l=new Date(`${r}T00:00:00Z`);if(Number.isNaN(l.getTime())||l.toISOString().slice(0,10)!==r)return null}const s=Sf.exec(a);t=new Date(s?`${s[1]}T${s[2]}:${s[3]??"00"}${s[4]?`.${s[4].slice(0,3).padEnd(3,"0")}`:""}+09:00`:a)}else t=new Date(e);return Number.isNaN(t.getTime())?null:t}function jf(e){return $a(e)!==null}const Tf=e=>$a(e);function Wl(e,t){const a=t.startsWith("ko")?"ko-KR":"en-US",r=Tf(e);return r?r.toLocaleDateString(a,{timeZone:Df,year:"numeric",month:"short",day:"numeric"}):""}function Hl(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function Mf(e,t,a){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Hl(a),{year:"numeric",month:"long"}).format(new Date(e,t-1,1))}function so(e,t,a,r){return e("calendar.yearMonth",{year:a,month:r,defaultValue:""})||Mf(a,r,t)}function Ra(){return io(new Date)}function lo(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&$a(e)?.toISOString().slice(0,10)===e?e:Ra()}function ua(){return $f(Ra())}const Lf=540*60*1e3;function Vl(e,t,a){return new Date(Date.UTC(e,t,a)-Lf)}function $f(e){const[t,a,r]=e.split("-").map(Number);return new Date(t,(a||1)-1,r||1)}function io(e){if(e==null||e==="")return"";const t=$a(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function ql(e,t){if(!e)return"";const a=$a(e);if(!a)return"";const r=a.getTime(),s=Math.max(0,Math.floor((Date.now()-r)/1e3)),l=Math.floor(s/60),i=Math.floor(l/60),u=Math.floor(i/24),c=Math.floor(u/7),d=Math.floor(u/30),h=Math.floor(u/365);return l<1?t("store.time.justNow","\uBC29\uAE08 \uC804"):l<60?t("store.time.minutesAgo",{n:l}):i<24?t("store.time.hoursAgo",{n:i}):u<7?t("store.time.daysAgo",{n:u}):c<5?t("store.time.weeksAgo",{n:c}):u<365?t("store.time.monthsAgo",{n:Math.min(d,11)}):t("store.time.yearsAgo",{n:h})}function Ul(e,t={}){const{sep:a=".",pad:r=!0,trailingDot:s=!1,fallback:l="\u2014"}=t;if(!e)return l;const i=io(e instanceof Date?e:String(e));if(!i)return l;const[u,c,d]=i.split("-"),h=r?c:String(Number(c)),p=r?d:String(Number(d));return`${u}${a}${h}${a}${p}${s?".":""}`}function lr(e){if(typeof e=="string"){const t=e.trim();return t&&jf(t)?t:null}if(e instanceof Date)return Number.isNaN(e.getTime())?null:e.toISOString();if(typeof e=="number"&&Number.isFinite(e)){const t=new Date(e);return Number.isNaN(t.getTime())?null:t.toISOString()}return null}function an(e){return typeof e=="string"?e.trim()||null:typeof e=="number"?String(e):null}function Rf(e){for(const t of["correct","isCorrect","heard","judgement"])if(typeof e[t]=="boolean")return e[t];return e.score===1?!0:e.score===0?!1:null}function Pf(e){return Array.isArray(e)?e.map((t,a)=>{const r=t??{};return{index:a,itemId:an(r.contextCode)??an(r.itemId)??an(r.itemCode)??an(r.id),question:an(r.question)??an(r.q)??an(r.sentence)??an(r.text)??an(r.prompt)??an(r.word)??an(r.targetSyllable),answer:an(r.answer),selected:an(r.selectedText)??an(r.selected),correct:Rf(r),shownAt:lr(r.shownAt)??lr(r.shown_at),answeredAt:lr(r.answeredAt)??lr(r.answered_at)}}):[]}const uo=globalThis;async function If(){try{return await uo.__ihabNoiseSettingsStore?.load()??null}catch{return null}}function co(e){const t=a=>{};try{const a=uo.__ihabNoiseSettingsStore?.save(e);a&&typeof a.catch=="function"&&a.catch(t)}catch(a){t(a)}}function ir(e){try{uo.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function Ff(e){if(typeof document<"u"){const t=document.activeElement;let a=null;try{if(a=document.createElement("textarea"),a.value=e,a.setAttribute("readonly",""),a.style.position="fixed",a.style.top="0",a.style.left="0",a.style.opacity="0",a.style.pointerEvents="none",document.body.appendChild(a),a.focus(),a.select(),a.setSelectionRange(0,e.length),document.execCommand("copy"))return!0}catch{}finally{if(a?.parentNode&&a.parentNode.removeChild(a),t&&t!==document.activeElement&&typeof t.focus=="function"&&t.isConnected)try{t.focus({preventScroll:!0})}catch{}}}try{if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function")return await navigator.clipboard.writeText(e),!0}catch{}return!1}function ca(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Gl(e,t){if(!e)return"-";const a=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!a)return e;const r=Number(a[1]),s=Number(a[2]),l=a[1].padStart(2,"0");return s===0?t("date.timeH",{h:r,hh:l,mm:a[2]}):t("date.timeHM",{h:r,hh:l,m:s,mm:a[2]})}function po(e){return(e??0).toLocaleString("ko-KR")}const Of=[{key:"FOOD",label:"\uC74C\uC2DD",icon:"salad",color:"#FF8A65",subs:[{key:"TRKRFD",label:"\uD55C\uAD6D \uC804\uD1B5\uC74C\uC2DD"},{key:"MDKRFD",label:"\uD55C\uAD6D \uD604\uB300\uC74C\uC2DD"},{key:"WRLDFD",label:"\uC138\uACC4\uC758 \uC74C\uC2DD"},{key:"MTRFRT",label:"\uC2DD\uC7AC\uB8CC\uC640 \uACFC\uC77C"},{key:"GEFDKL",label:"\uC74C\uC2DD \uC0C1\uC2DD"}]},{key:"HLTH",label:"\uAC74\uAC15",icon:"heart",color:"#66BB6A",subs:[{key:"HTETHB",label:"\uAC74\uAC15\uD55C \uC2DD\uC2B5\uAD00"},{key:"DISILL",label:"\uBCD1\uACFC \uC9C8\uD658"},{key:"EXCISE",label:"\uC6B4\uB3D9"},{key:"GEHTKL",label:"\uAC74\uAC15\uC0C1\uC2DD"}]},{key:"WETH",label:"\uB0A0\uC528",icon:"sun-medium",color:"#42A5F5",subs:[{key:"GESSKL",label:"\uACC4\uC808\uC0C1\uC2DD"},{key:"SNWRAN",label:"\uB208\uACFC \uBE44"},{key:"WTHFCT",label:"\uC77C\uAE30\uC608\uBCF4"},{key:"GEWTKL",label:"\uB0A0\uC528\uC0C1\uC2DD"}]},{key:"PRSN",label:"\uC778\uBB3C",icon:"user-round",color:"#AB47BC",subs:[{key:"JODYPS",label:"\uC870\uC120\uC2DC\uB300"},{key:"MDKRPS",label:"\uD55C\uAD6D \uADFC\uD604\uB300"},{key:"THKDPS",label:"\uC0BC\uAD6D\uC2DC\uB300"},{key:"WRLART",label:"\uC138\uACC4\uC758 \uC608\uC220\uAC00"},{key:"WRLPSN",label:"\uC138\uACC4\uC758 \uC778\uBB3C"}]},{key:"KRCT",label:"\uD55C\uAD6D\uBB38\uD654",icon:"bow-arrow",color:"#EC407A",subs:[{key:"KRLANG",label:"\uC6B0\uB9AC\uB9D0"},{key:"TRPLCT",label:"\uC804\uD1B5\uB180\uC774"},{key:"HERITG",label:"\uBB38\uD654\uC7AC"},{key:"EVTFES",label:"\uD589\uC0AC\uC640 \uCD95\uC81C"},{key:"GECTKL",label:"\uC0C1\uC2DD"}]},{key:"STRY",label:"\uC774\uC57C\uAE30",icon:"message-circle",color:"#8D6E63",subs:[{key:"FRYTAL",label:"\uB3D9\uD654"},{key:"AMZING",label:"\uC2E0\uAE30\uD55C \uC774\uC57C\uAE30"},{key:"DAYSTR",label:"\uC77C\uC0C1 \uC18D \uC774\uC57C\uAE30"}]},{key:"LOCA",label:"\uC9C0\uC5ED",icon:"map-pin",color:"#26A69A",subs:[{key:"KRLDMK",label:"\uD55C\uAD6D\uC758 \uBA85\uC18C"},{key:"SELNMK",label:"\uC11C\uC6B8\uC758 \uBA85\uC18C"},{key:"WRDTRB",label:"\uC138\uACC4\uC5EC\uD589"},{key:"NAVIGT",label:"\uAE38 \uCC3E\uAE30"}]},{key:"SOAR",label:"\uC0AC\uD68C\uC640 \uC608\uC220",icon:"landmark",color:"#5C6BC0",subs:[{key:"KRSOCI",label:"\uD55C\uAD6D"},{key:"ECONEW",label:"\uACBD\uC81C\uC640 \uB274\uC2A4"},{key:"GENART",label:"\uC608\uC220"},{key:"GELFKL",label:"\uC0DD\uD65C \uC0C1\uC2DD"}]},{key:"NTSC",label:"\uC790\uC5F0\uACFC \uACFC\uD559",icon:"leaf",color:"#9CCC65",subs:[{key:"ANIMAL",label:"\uB3D9\uBB3C"},{key:"PLANTS",label:"\uC2DD\uBB3C"},{key:"ETHPLT",label:"\uC9C0\uAD6C"},{key:"TOLELC",label:"\uB3C4\uAD6C\uC640 \uC804\uC790\uC81C\uD488"},{key:"GESCKL",label:"\uACFC\uD559\uC0C1\uC2DD"}]},{key:"SPRT",label:"\uC2A4\uD3EC\uCE20",icon:"trophy",color:"#FFCA28",subs:[{key:"INVDSP",label:"\uAC1C\uC778\uACBD\uAE30"},{key:"MARART",label:"\uACA9\uD22C\uAE30"},{key:"TEAMSP",label:"\uB2E8\uCCB4\uACBD\uAE30"},{key:"FOOTBL",label:"\uCD95\uAD6C"},{key:"GESPKL",label:"\uC2A4\uD3EC\uCE20 \uC0C1\uC2DD"}]}],zf=[{key:"LISTEN_IN_NOISE",label:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",icon:"audio-lines",desc:"\uC18C\uC74C \uD658\uACBD \uC18D \uBB38\uC7A5 \uC774\uD574 \uD6C8\uB828"},{key:"SHORT_STORY",label:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30 + 4\uBB38\uC81C"},{key:"LONG_STORY",label:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square-text",desc:"\uAE34 \uC774\uC57C\uAE30 \uC2EC\uD654 \uD6C8\uB828"},{key:"ORDERING_SENTENCE",label:"\uBB38\uC7A5 \uC21C\uC11C\uD654 \uD558\uAE30",icon:"align-start-vertical",desc:"\uC21C\uC11C \uBC30\uC5F4 \uD6C8\uB828"}];function Kl(){return Of}function Wf(){return zf}const Hf=[],Vf=[],qf=[],Uf=[];function Gf(){return{LISTEN_IN_NOISE:Hf,SHORT_STORY:Vf,LONG_STORY:qf,ORDERING_SENTENCE:Uf}}const Kf=[{key:"LISTEN_IN_NOISE",label:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",icon:"audio-lines",desc:"\uB2E4\uC591\uD55C \uC18C\uC74C \uD658\uACBD\uC5D0\uC11C \uBB38\uC7A5 \uCCAD\uB825\uC744 \uD6C8\uB828\uD569\uB2C8\uB2E4."},{key:"SHORT_STORY",label:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uBB38\uC81C\uB97C \uD480\uC5B4\uBD05\uB2C8\uB2E4."},{key:"LONG_STORY",label:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square-text",desc:"\uAE34 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uB2E4\uC218\uC758 \uBB38\uC81C\uB97C \uD480\uC5B4\uBD05\uB2C8\uB2E4."},{key:"ORDERING_SENTENCE",label:"\uBB38\uC7A5 \uC21C\uC11C\uD654 \uD558\uAE30",icon:"align-start-vertical",desc:"\uC5EC\uB7EC\uAC1C\uC758 \uC9E7\uC740 \uBB38\uC7A5\uC744 \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uADF8 \uC21C\uC11C\uC5D0 \uB9DE\uAC8C \uBC30\uC5F4\uD569\uB2C8\uB2E4."}],Yl={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function Yf(e){return Kf.map(t=>{const a=Yl[t.key];return a?{...t,label:e(`trainingType.${a}.title`),desc:e(`trainingType.${a}.desc`)}:t})}var Zf={statusFilter:"\uC0C1\uD0DC \uD544\uD130",pageSizeSelect:"\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218",selectedCount:"{{count}}\uAC1C \uC120\uD0DD\uB428",selectedOfMax:"\uCD5C\uB300 {{max}}\uAC1C \uC911 {{count}}\uAC1C",cancel:"\uCDE8\uC18C",info:"\uC124\uBA85",errorState:{message:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",retry:"\uB2E4\uC2DC \uC2DC\uB3C4"},save:"\uC800\uC7A5",confirm:"\uD655\uC778",discardConfirm:{title:"\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?",body:"\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",confirm:"\uC785\uB825 \uCDE8\uC18C"},close:"\uB2EB\uAE30",back:"\uB4A4\uB85C",emptyTrainingName:"\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.",remove:"\uC81C\uAC70",image:"\uC774\uBBF8\uC9C0",delete:"\uC0AD\uC81C",reset:"\uCD08\uAE30\uD654",update:"\uC5C5\uB370\uC774\uD2B8",download:"\uB2E4\uC6B4\uB85C\uB4DC",likeCount:"\uC88B\uC544\uC694 {{count}}",downloadCount:"\uAC00\uC838\uAC04 \uC218 {{count}}",descriptionFor:"{{name}} \uC124\uBA85",search:"\uAC80\uC0C9",empty:"\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",yes:"\uC608",no:"\uC544\uB2C8\uC624",all:"\uC804\uCCB4",none:"\uC5C6\uC74C",days:"{{count}}\uC77C",loadMore:"\uB354\uBCF4\uAE30",more:"\uB354\uBCF4\uAE30",moreFor:"{{name}} \uB354\uBCF4\uAE30",collapseFor:"{{name}} \uC811\uAE30",expandFor:"{{name}} \uD3BC\uCE58\uAE30",sortFor:"{{name}} \uC815\uB82C",retry:"\uB2E4\uC2DC \uC2DC\uB3C4",prevPage:"\uC774\uC804 \uD398\uC774\uC9C0",nextPage:"\uB2E4\uC74C \uD398\uC774\uC9C0",play:"\uC7AC\uC0DD",loading:"\uBD88\uB7EC\uC624\uB294 \uC911",playFor:"{{name}} \uC7AC\uC0DD",pauseFor:"{{name}} \uBA48\uCDA4",pause:"\uBA48\uCDA4",playPause:"\uC7AC\uC0DD / \uBA48\uCDA4",replay:"\uB2E4\uC2DC\uB4E3\uAE30",subscription:"\uC774\uC6A9\uAD8C",done:"\uC644\uB8CC",failed:"\uC2E4\uD328",continue:"\uACC4\uC18D",notification:"\uC54C\uB9BC",emptyList:"\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",noMatches:"\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",menu:"\uBA54\uB274",resetSelection:"\uC120\uD0DD \uCD08\uAE30\uD654",pageSizeLabel:"{{n}}\uAC1C\uC529 \uBCF4\uAE30",totalCountPrefix:"\uCD1D ",totalCountSuffix:"\uAC1C",expand:"\uD3BC\uCE58\uAE30",collapse:"\uC811\uAE30",popup:"\uD31D\uC5C5",codeBlock:"\uCF54\uB4DC \uBE14\uB85D",totalPrefix:"\uCD1D ",copyCode:"\uCF54\uB4DC \uBCF5\uC0AC",copied:"\uBCF5\uC0AC\uB428",col:{problem:"\uBB38\uC81C"},phonetics:{place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"},vowel:{frontHigh:"\uC804\uC124 \uACE0\uBAA8\uC74C",backHighUnrounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C",backHighRounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C",frontMid:"\uC804\uC124 \uC911\uBAA8\uC74C",backMidUnrounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C",backMidRounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C",low:"\uC800\uBAA8\uC74C"},glide:{j:"j\uD65C\uC74C",w:"w\uD65C\uC74C",velar:"\u0270\uD65C\uC74C"}},unknownError:"\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",networkError:"\uB124\uD2B8\uC6CC\uD06C \uC5F0\uACB0\uC774 \uBD88\uC548\uC815\uD569\uB2C8\uB2E4. \uC5F0\uACB0 \uC0C1\uD0DC\uB97C \uD655\uC778\uD55C \uB4A4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694."},Xf={rangeSelect:"\uAE30\uAC04 \uC120\uD0DD",dow:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],weekOrdinal:["\uCCAB\uC9F8","\uB458\uC9F8","\uC14B\uC9F8","\uB137\uC9F8","\uB2E4\uC12F\uC9F8","\uC5EC\uC12F\uC9F8","\uC77C\uACF1\uC9F8"],weekLabel:"{{ord}}\uC8FC",prevMonth:"\uC774\uC804 \uB2EC",addOnDate:"{{date}}\uC5D0 \uBC29\uBB38 \uB4F1\uB85D",nextMonth:"\uB2E4\uC74C \uB2EC",prevWeek:"\uC774\uC804 \uC8FC",nextWeek:"\uB2E4\uC74C \uC8FC",legend:{visited:"\uBC29\uBB38",scheduled:"\uC608\uC57D",noVisit:"\uBBF8\uBC29\uBB38"},periodSelect:"\uAE30\uAC04 \uB2E8\uC704",visitCount:"\uBC29\uBB38 {{count}}\uAC74",statusCount:"{{label}} {{count}}\uAC74"},Jf={planSuffix:"\uC774\uC6A9\uAD8C",labeledPlan:"{{label}} \uC774\uC6A9\uAD8C",couponCode:"\uC774\uC6A9\uAD8C \uCF54\uB4DC",specialLabel:"\uC624\uD508\uD2B9\uAC00",unitDay:"\uC77C",unitYear:"\uB144",remainingDay:"{{n}}\uC77C \uB0A8\uC74C",remainingHour:"{{n}}\uC2DC\uAC04 \uB0A8\uC74C",remainingMinute:"{{n}}\uBD84 \uB0A8\uC74C",remainingSecond:"{{n}}\uCD08 \uB0A8\uC74C",expired:"\uB9CC\uB8CC\uB428",menu:{use:"\uC0AC\uC6A9\uD558\uAE30",refund:"\uD658\uBD88\uD558\uAE30",delete:"\uC0AD\uC81C\uD558\uAE30"}},Qf={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},eb={selected:"\uC120\uD0DD\uB428"},tb={placeholder:"\uC120\uD0DD"},nb={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},ab={biArea:"BI \uC601\uC5ED",biSymbol:"BI \uC2EC\uBCFC",logoMalgwi:"\uB9D0\uADC0 \uB85C\uACE0",logoManager:"\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0",menuOpen:"\uBA54\uB274 \uC5F4\uAE30",utilMenu:"\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274",menuClose:"\uBA54\uB274 \uB2EB\uAE30"},rb={mainMenu:"\uBA54\uC778 \uBA54\uB274",bottomNav:"\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158",goToManager:"\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9",goToMalgwi:"\uB9D0\uADC0\uB85C \uC774\uB3D9",modeLabelManager:"\uB9D0\uADC0 \uB9E4\uB2C8\uC800",modeLabelMalgwi:"\uB9D0\uADC0",training:"\uD6C8\uB828",settings:"\uC124\uC815",notifications:"\uC54C\uB9BC",account:"\uACC4\uC815",help:"\uB3C4\uC6C0\uB9D0",feedback:"\uBC84\uADF8\uC2E0\uACE0",debug:"\uB514\uBC84\uADF8",coupons:"\uCFE0\uD3F0",topic:"\uC8FC\uC81C\uBCC4 \uB4E3\uAE30",trainingType:"\uD6C8\uB828\uBCC4 \uB4E3\uAE30",wordPairs:"\uB300\uB9BD\uC30D \uCC3E\uAE30",wordSearch:"\uB2E8\uC5B4 \uCC3E\uAE30",wordTable:"\uB2E8\uC5B4\uD45C \uB9CC\uB4E4\uAE30",company:"\uC5C5\uCCB4\uC815\uBCF4",more:"\uB354\uBCF4\uAE30",moreMenu:"\uB354\uBCF4\uAE30 \uBA54\uB274",badgeLabel:"{{label}}, {{count}}\uAC1C",badgeInsideLabel:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"},ob={cache:{cleared:"\uCE90\uC2DC\uAC00 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",group:{wordData:{label:"\uB2E8\uC5B4 \uB370\uC774\uD130",sub:"\uB2E8\uC5B4 \uBAA9\uB85D \uBC0F \uBC84\uC804 \uC815\uBCF4"},pairIndex:{label:"\uB2E8\uC5B4\uC30D \uC778\uB371\uC2A4",sub:"\uCD08\uC131\xB7\uC911\uC131\xB7\uC885\uC131 \uB300\uB9BD\uC30D \uBD84\uC11D \uCE90\uC2DC"},imageCache:{label:"\uC774\uBBF8\uC9C0 \uCE90\uC2DC",sub:"\uB2E8\uC5B4\uBCC4 \uC774\uBBF8\uC9C0 \uC874\uC7AC \uC5EC\uBD80 \uD655\uC778 \uACB0\uACFC"}}}},sb={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},lb={security:{password:{currentRequired:"\uD604\uC7AC \uBE44\uBC00\uBC88\uD638\uB97C \uC785\uB825\uD558\uC138\uC694.",newRequired:"\uC0C8 \uBE44\uBC00\uBC88\uD638\uB97C \uC785\uB825\uD558\uC138\uC694.",mismatch:"\uC0C8 \uBE44\uBC00\uBC88\uD638\uAC00 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",changed:"\uBE44\uBC00\uBC88\uD638\uAC00 \uBCC0\uACBD\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}}},ib={settings:"\uC124\uC815",filter:{random:"\uBB34\uC791\uC704",trainOnset:"\uCD08\uC131",trainVowel:"\uBAA8\uC74C",trainCoda:"\uC885\uC131",phonemeGroup:"\uD6C8\uB828 \uC74C\uC808",noLimit:"\uBB34\uAD00",codaExclude:"\uC81C\uC678",gradeLabel:"\uB4F1\uAE09",excludeImageInfo:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC: \uB2E8\uC5B4 \uC911\uC5D0 \uC774\uBBF8\uC9C0\uAC00 \uC788\uB294 \uB2E8\uC5B4\uB9CC \uACB0\uACFC\uC5D0 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",sameStructureInfo:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC: \uC815\uB2F5\uACFC \uC624\uB2F5\uC758 \uC74C\uC808 \uAD6C\uC870(\uAE00\uC790 \uC218\xB7\uBC1B\uCE68 \uC720\uBB34 \uB4F1)\uAC00 \uAC19\uC740 \uACB0\uACFC\uB9CC \uB0A8\uACA8\uC694.",selectSection:"\uC120\uD0DD",excludeImage:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC",sameStructure:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"},noQuestions:"\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",countQuestions:"{{n}}\uBB38\uC81C",countSentences:"{{n}}\uBB38\uC7A5",nextQuestion:"\uB2E4\uC74C \uBB38\uC81C",noiseRatioTitle:"\uC18C\uC74C \uBE44\uC728",noiseRatioValue:"{{ratio}}\uBC30",noiseTypeTitle:"\uC18C\uC74C \uC885\uB958",playVolumeTitle:"\uC804\uCCB4 \uC18C\uB9AC",playSpeedTitle:"\uC7AC\uC0DD \uC18D\uB3C4",meter:{sentence:"\uC7AC\uC0DD",noise:"\uC18C\uC74C",toggle:"\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"},viewResult:"\uACB0\uACFC\uBCF4\uAE30",problemNotice:"{{n}}\uBC88 \uBB38\uC81C \uC785\uB2C8\uB2E4.",trainingSettingsTitle:"\uD6C8\uB828 \uC124\uC815",sentencePreview:"\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30",notHeard:"\uC548 \uB4E4\uB838\uC5B4\uC694.",heardWell:"\uC798 \uB4E4\uB838\uC5B4\uC694.",confirmTitle:"\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694.",noSoundWaveform:"\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",noise:{level:{none:"\uC5C6\uC74C",weak:"\uC57D\uD568",medium:"\uBCF4\uD1B5",strong:"\uAC15\uD568",veryStrong:"\uB9E4\uC6B0 \uAC15\uD568"},type:{none:"\uC5C6\uC74C",default:"\uAE30\uBCF8",street:"\uAE38\uAC70\uB9AC",buzz:"\uC640\uAE00\uC640\uAE00",restaurant:"\uC2DD\uB2F9"}},listenTitle:"\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694.",listenButton:"\uBB38\uC7A5 \uB4E3\uAE30",playSound:"\uC18C\uB9AC \uB4E3\uAE30",playAll:"\uBAA8\uB450 \uB4E3\uAE30",selectInOrder:"\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.",stop:"\uC815\uC9C0",preview:"\uBBF8\uB9AC \uB4E3\uAE30",previewFor:"{{name}} \uBBF8\uB9AC \uB4E3\uAE30",stopFor:"{{name}} \uC815\uC9C0",next:"\uB2E4\uC74C",completed:"\uD6C8\uB828 \uC644\uB8CC",selected:"\uC120\uD0DD\uB428",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD",fontSizeMin:"\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.",fontSizeMax:"\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.",fontSizeDecrease:"\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C",fontSizeIncrease:"\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00",toggleBackground:"\uBC30\uACBD \uC804\uD658",cardInstructions:"\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694.",noCards:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",audioFetchError:"\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",ttsUnavailable:"\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",selectConfirm:"\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694.",orderListDefault:"\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694.",result:{pendingDone:"\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",eyebrow:"\uD6C8\uB828 \uC644\uB8CC",title:"\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.",scoreAria:"{{correct}} / {{total}} \uBB38\uD56D",elapsed:"\uC18C\uC694 \uC2DC\uAC04",tableAriaLabel:"\uBB38\uD56D\uBCC4 \uD310\uC815",colJudge:"\uD310\uC815",colAnswerSelected:"\uC815\uB2F5 \xB7 \uC120\uD0DD",colAnswer:"\uC815\uB2F5",colSelected:"\uC120\uD0DD",heardWell:"\uC798 \uB4E4\uC5C8\uC5B4\uC694",notHeard:"\uBABB \uB4E4\uC5C8\uC5B4\uC694",notJudged:"\uBBF8\uD310\uC815",replay:"\uB2E4\uC2DC\uD558\uAE30",replaySound:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30",replaySoundStop:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4",done:"\uC644\uB8CC",noContent:"(\uB0B4\uC6A9\uC5C6\uC74C)"},up:"\uC704\uB85C",down:"\uC544\uB798\uB85C",prev:"\uC774\uC804",listenLabel:"\uBB38\uC7A5 \uB4E3\uAE30",sourcePlay:"\uC18C\uC2A4 {{n}} \uC7AC\uC0DD",listen:"\uB4E3\uAE30",audioStatus:{synthesizing:"\uC18C\uB9AC\uB97C \uB9CC\uB4E4\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026",preparing:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"}},ub={totalCount:"\uBA85\uC758 \uACE0\uAC1D",loadError:"\uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",device:{title:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30",addButton:"\uAE30\uAE30 \uCD94\uAC00",historyEmpty:"\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",wearing:"\uCE21 \uCC29\uC6A9\uC911",notRegistered:"\uBBF8\uB4F1\uB85D",unit:"\uAC1C",wearingNow:"\uCC29\uC6A9",wear:"\uCC29\uC6A9",unwear:"\uCC29\uC6A9 \uD574\uC81C",wornSince:"{{date}}\uBD80\uD130",historyTitle:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30 \uC774\uB825"},schedule:{registerTitle:" \uACE0\uAC1D\uB2D8 \uBC29\uBB38 \uC608\uC815 \uB4F1\uB85D"},visitHistory:{empty:"\uC544\uC9C1 \uBC29\uBB38 \uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",popupTitle:" \uACE0\uAC1D\uB2D8 \uBC29\uBB38 \uC774\uB825",registerTitle:" \uACE0\uAC1D\uB2D8 \uC2E0\uADDC \uBC29\uBB38 \uB4F1\uB85D"},moreItems:"\uB354 \uC788\uC74C",viewAll:"\uC804\uCCB4 \uBCF4\uAE30",duration:{minSec:"{{m}}\uBD84 {{s}}\uCD08",min:"{{m}}\uBD84",sec:"{{s}}\uCD08"}},cb={plan:{recommendedFor:"\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.",features:"\uD575\uC2EC \uAE30\uB2A5",freePrice:"\uBB34\uB8CC",contact:"\uBB38\uC758\uD558\uAE30",tierFallback:"\uC774\uC6A9\uAD8C",openPromo:"\uC624\uD508 \uD2B9\uAC00"},products:{mgrEnterprise:{tier:{price:"\uBB38\uC758"}}}},db={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},pb={showN:"{{n}}\uAC1C\uC529"},hb={title:"\uD6C8\uB828\uBCC4 \uB4E3\uAE30",subtitle:"\uC6D0\uD558\uB294 \uD6C8\uB828 \uC720\uD615\uC744 \uC120\uD0DD\uD558\uC138\uC694.",listenInNoise:{title:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",desc:"\uB2E4\uC591\uD55C \uC18C\uC74C \uD658\uACBD\uC5D0\uC11C \uBB38\uC7A5 \uCCAD\uB825\uC744 \uD6C8\uB828\uD569\uB2C8\uB2E4."},shortStory:{title:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uB0B4\uC6A9\uC744 \uC774\uD574\uD569\uB2C8\uB2E4."},longStory:{title:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",desc:"\uAE34 \uC774\uC57C\uAE30\uB97C \uC9D1\uC911\uD574\uC11C \uB4E3\uACE0 \uB0B4\uC6A9\uC744 \uD30C\uC545\uD569\uB2C8\uB2E4."},orderingSentence:{title:"\uBB38\uC7A5 \uC21C\uC11C\uD654",desc:"\uB4E4\uC740 \uBB38\uC7A5\uB4E4\uC744 \uC62C\uBC14\uB978 \uC21C\uC11C\uB85C \uBC30\uC5F4\uD569\uB2C8\uB2E4."},SAME_SOUND_PICK:{label:"\uAC19\uC740 \uC18C\uB9AC \uACE0\uB974\uAE30",sub:"\uB4E4\uC740 \uC18C\uB9AC\uC640 \uAC19\uC740 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},SAME_OR_DIFF:{label:"\uAC19\uC740\uC9C0 \uB2E4\uB978\uC9C0 \uB9DE\uD788\uAE30",sub:"\uB450 \uC18C\uB9AC\uAC00 \uAC19\uC740\uC9C0, \uB2E4\uB978\uC9C0 \uAD6C\uBD84\uD558\uC138\uC694."},HEAR_AND_PICK_SAME:{label:"\uC77C\uCE58\uD558\uB294 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",sub:"\uB4E4\uC740 \uC18C\uB9AC\uC758 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},HEAR_AND_PICK_INCLUDED:{label:"\uD55C \uC74C\uC808 \uD3EC\uD568 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",sub:"\uB4E4\uC740 \uC74C\uC808\uC774 \uD3EC\uD568\uB41C \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},STARTS_WITH_SAME_SOUND:{label:"\uCCAB \uC74C\uC808\uC774 \uAC19\uC740 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",sub:"\uB4E4\uC740 \uB2E8\uC5B4\uC640 \uAC19\uC740 \uC18C\uB9AC\uB85C \uC2DC\uC791\uD558\uB294 \uB2E8\uC5B4\uB97C \uACE0\uB974\uC138\uC694."},LISTEN_AND_REMEMBER_ORDER:{label:"\uB4E3\uACE0 \uC21C\uC11C\uB300\uB85C \uAE30\uC5B5\uD558\uAE30",sub:"\uC138 \uB2E8\uC5B4\uB97C \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694."},MERGE_2_SYLLABLES:{label:"\uC74C\uC808 2\uAC1C \uD569\uCE58\uAE30",sub:"\uB450 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},MERGE_3_SYLLABLES:{label:"\uC74C\uC808 3\uAC1C \uD569\uCE58\uAE30",sub:"\uC138 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},MERGE_2_PHONEMES:{label:"\uC74C\uC18C 2\uAC1C \uD569\uCE58\uAE30",sub:"\uB450 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},MERGE_3_PHONEMES:{label:"\uC74C\uC18C 3\uAC1C \uD569\uCE58\uAE30",sub:"\uC138 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},DROP_1_FROM_2SYLL:{label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uD0C8\uB77D",sub:"2\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},DROP_1_FROM_3SYLL:{label:"3\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uD0C8\uB77D",sub:"3\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},DROP_PART_FROM_COMPOUND:{label:"\uD569\uC131\uC5B4\uC5D0\uC11C \uBD80\uBD84 \uD0C8\uB77D",sub:"\uD569\uC131\uC5B4\uC758 \uC77C\uBD80\uB97C \uBE7C\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},DROP_FINAL_CONSONANT_FROM_1SYLL:{label:"1\uC74C\uC808\uC5D0\uC11C \uBC1B\uCE68 \uD0C8\uB77D",sub:"\uBC1B\uCE68\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},REMOVE_CONSONANT_AND_IDENTIFY_PHONEME:{label:"1\uC74C\uC808\uC5D0\uC11C \uC790\uC74C \uD0C8\uB77D",sub:"\uC790\uC74C\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB0A8\uC744\uAE4C\uC694?"},CHANGE_1_SYLL_IN_2SYLL:{label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",sub:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},CHANGE_1_SYLL_IN_3SYLL:{label:"3\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",sub:"3\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},CHANGE_1_PHONEME_IN_1SYLL:{label:"1\uC74C\uC808 \uB2E8\uC5B4 \uC911 1\uAC1C \uC74C\uC18C \uBC14\uAFB8\uAE30",sub:"1\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uC18C\uB9AC\uB97C \uB9CC\uB4DC\uC138\uC694."},CHANGE_1_PHONEME_IN_2SYLL:{label:"2\uC74C\uC808 \uB2E8\uC5B4 \uC911 1\uAC1C \uC74C\uC18C \uBC14\uAFB8\uAE30",sub:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."}},mb={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},Cb={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},fb={defaultName:"\uB2E8\uC5B4 \uD45C",title:"\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30",subtitle:"\uCE78\uC744 \uC124\uC815\uD558\uACE0 \uB2E8\uC5B4\uB97C \uCD94\uAC00\uD558\uC5EC \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4.",filterTitle:"\uD45C \uC124\uC815",filter:{composition:"\uAD6C\uC131",image:"\uC774\uBBF8\uC9C0",word:"\uB2E8\uC5B4",caption:"\uC720\uD615",standardPron:"\uD45C\uC900 \uBC1C\uC74C",colloquialPron:"\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C",paperOrientation:"\uC6A9\uC9C0 \uBC29\uD5A5",landscape:"\uAC00\uB85C",portrait:"\uC138\uB85C",columns:"\uCE78 \uC218",column:"{{count}}\uCE78",itemsPerPageWord:"\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218",itemsPerPagePair:"\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218",itemsPerPageOption:"{{count}}\uAC1C",pageIndicator:"{{current}} / {{total}}",pageNumber:"\uD398\uC774\uC9C0 \uBC88\uD638",pageNumberLeft:"\uC67C\uCABD",pageNumberCenter:"\uC911\uC559",pageNumberRight:"\uC624\uB978\uCABD",border:"\uC678\uACFD\uC120",topInfo:"\uC0C1\uB2E8 \uC815\uBCF4",bottomInfo:"\uD558\uB2E8 \uC815\uBCF4",cutLine:"\uC808\uCDE8\uC120",show:"\uD45C\uC2DC",hide:"\uBBF8\uD45C\uC2DC",dotted:"\uC810\uC120",corner:"\uCF54\uB108"},addWord:"\uCD94\uAC00\uD558\uAE30",copyItem:"\uD55C \uCE78 \uB354",copyItemAria:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354",wordInfo:"{{word}} \uB0B1\uB9D0 \uC815\uBCF4",emptyItems:"\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694.",load:"\uBD88\uB7EC\uC624\uAE30",openNewWindow:"\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30",saveButton:"\uC800\uC7A5\uD558\uAE30",saveAsNewButton:"\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5",print:"\uC778\uC1C4\uD558\uAE30",popupBlocked:"\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694.",printFileNameSingle:"\uB2E8\uC5B4\uD45C",printFileNamePair:"\uB300\uB9BD\uC30D\uD45C",save:{title:"\uB2E8\uC5B4\uD45C \uC800\uC7A5\uD558\uAE30",nameLabel:"\uC774\uB984",desc:"\uC800\uC7A5\uD560 \uB2E8\uC5B4 \uD45C\uC758 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.",placeholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694.",descriptionLabel:"\uC124\uBA85",descriptionPlaceholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694.",duplicateName:"\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4.",nameRequired:"\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694.",autoFillHint:" (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)",copyName:"{{name}} (\uBCF5\uC0AC)"},loadTable:{title:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C \uBD88\uB7EC\uC624\uAE30",empty:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",loadButton:"\uBD88\uB7EC\uC624\uAE30",itemCount:"{{count}}\uAC1C",deleteAriaLabel:"{{name}} \uC0AD\uC81C",viewLabel:"\uBCF4\uAE30 \uBC29\uC2DD",sortLabel:"\uC815\uB82C",sort:{newest:"\uCD5C\uC2E0\uC21C",oldest:"\uC624\uB798\uB41C\uC21C",name:"\uC774\uB984\uC21C",count:"\uB2E8\uC5B4 \uC218"},view:{grid:"\uD45C\uB85C \uBCF4\uAE30",list:"\uB9AC\uC2A4\uD2B8\uB85C \uBCF4\uAE30"}},publisherFilter:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30",groupDeleteMessage:"\uADF8\uB8F9 \uB0B4 \uB2E8\uC5B4\uD45C\uB294 '\uADF8\uB8F9 \uC5C6\uC74C'\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.",groupNamePlaceholder:"\uADF8\uB8F9 \uC774\uB984",scoring:{o:"{{word}} \uB9DE\uC74C",triangle:"{{word}} \uC560\uB9E4",x:"{{word}} \uD2C0\uB9BC",markName:{o:"\uB9DE\uC74C",triangle:"\uC560\uB9E4",x:"\uD2C0\uB9BC"},button:"\uCC44\uC810\uD558\uAE30",pickTitle:"\uB204\uAD6C\uB97C \uCC44\uC810\uD560\uAE4C\uC694?",pickSubtitle:"\u2018{{name}}\u2019 \uD45C\uB85C \uD6C8\uB828\uD55C \uACE0\uAC1D\uC744 \uACE0\uB974\uC138\uC694.",pickSearch:"\uC774\uB984 \uB610\uB294 \uC804\uD654\uBC88\uD638\uB85C \uCC3E\uAE30",pickEmpty:"\uB4F1\uB85D\uB41C \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickNoMatch:"\uCC3E\uB294 \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickAgain:"\uACE0\uAC1D \uB2E4\uC2DC \uACE0\uB974\uAE30",scoringFor:"{{name}} \uB2D8 \uCC44\uC810 \uC911",none:"\uCE78 \uC544\uB798 \u25CB \xB7 \u25B3 \xB7 \u2715 \uB97C \uB20C\uB7EC \uB9E4\uAE30\uC138\uC694. \uB9C8\uC6B0\uC2A4\uB85C\uB294 \uCE78\uC5D0 \uC190\uC744 \uC5B9\uC73C\uBA74, \uC790\uD310\uC73C\uB85C\uB294 \uCE78\uC5D0 \uCD08\uC810\uC774 \uAC00\uBA74 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.",tally:"{{marked}}\uCE78 \uCC44\uC810 \xB7 \u25CB {{o}} \xB7 \u25B3 {{triangle}} \xB7 \u2715 {{x}} \xB7 \uC815\uB2F5\uB960 {{rate}}%",save:"\uCC44\uC810 \uC800\uC7A5",saved:"{{name}} \uB2D8\uC758 \uCC44\uC810 {{count}}\uCE78\uC744 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4.",reviewTitle:"\uBCF5\uC2B5\uD45C\uB97C \uB9CC\uB4E4\uAE4C\uC694?",reviewMessage:"{{name}} \uB2D8\uC774 \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC73C\uB85C \uC0C8 \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4. \uB9DE\uD78C \uCE78\uC740 \uBE60\uC9D1\uB2C8\uB2E4.",reviewConfirm:"\uBCF5\uC2B5\uD45C \uB9CC\uB4E4\uAE30",reviewDescription:"\u2018{{name}}\u2019 \uCC44\uC810\uC5D0\uC11C \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC744 \uBAA8\uC740 \uD45C\uC785\uB2C8\uB2E4.",reviewCreated:"\u2018{{name}}\u2019\uC744(\uB97C) \uB9CC\uB4E4\uC5C8\uC2B5\uB2C8\uB2E4 \u2014 {{count}}\uCE78.",discardTitle:"\uB9E4\uAE34 \uCC44\uC810\uC744 \uBC84\uB9B4\uAE4C\uC694?",discardMessage:"{{count}}\uCE78\uC744 \uB9E4\uACBC\uC9C0\uB9CC \uC544\uC9C1 \uC800\uC7A5\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uB098\uAC00\uBA74 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",discardConfirm:"\uBC84\uB9AC\uACE0 \uB098\uAC00\uAE30"},info:{grade:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09",syllables:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808",pos:"\uD488\uC0AC: {{v}}",wordType:"\uC720\uD615: {{v}}"},pos:{noun:"\uBA85\uC0AC",verb:"\uB3D9\uC0AC",adjective:"\uD615\uC6A9\uC0AC",adverb:"\uBD80\uC0AC",numeral:"\uC218\uC0AC",determiner:"\uAD00\uD615\uC0AC",interjection:"\uAC10\uD0C4\uC0AC",particle:"\uC870\uC0AC",affix:"\uC811\uC0AC",dependentNoun:"\uC758\uC874\uBA85\uC0AC",pronoun:"\uB300\uBA85\uC0AC",auxVerb:"\uBCF4\uC870\uB3D9\uC0AC",auxAdjective:"\uBCF4\uC870\uD615\uC6A9\uC0AC"},reorder:{moved:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40",handle:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)",hint:"Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"},thumbMore:"+{{count}}"},bb={filterTitle:"\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815",filter:{positionAny:"\uBB34\uAD00",positionHead:"\uC5B4\uB450",positionMid:"\uC5B4\uC911",positionTail:"\uC5B4\uB9D0",difficulty:"\uB4F1\uAE09",grade:"{{n}}\uB4F1\uAE09",gradeNone:"\uC5C6\uC74C",syllables:"\uC74C\uC808 \uC218",syllable:"{{n}}\uC74C\uC808",syllable5plus:"5\uC74C\uC808 \uC774\uC0C1",partOfSpeech:"\uD488\uC0AC",pos:{noun:"\uCCB4\uC5B8(\uBA85\uC0AC, \uC218\uC0AC)",verb:"\uC6A9\uC5B8(\uB3D9\uC0AC, \uD615\uC6A9\uC0AC)",modifier:"\uC218\uC2DD\uC5B8(\uBD80\uC0AC, \uAD00\uD615\uC0AC)"},wordType:"\uC720\uD615",field:"\uC758\uBBF8\uBC94\uC8FC",type:{native:"\uACE0\uC720\uC5B4",sino:"\uD55C\uC790\uC5B4",foreign:"\uC678\uB798\uC5B4",mixed:"\uD63C\uC885\uC5B4"},exclude:"\uC81C\uC678",excludeNoImage:"\uC774\uBBF8\uC9C0 \uC5C6\uC74C"},searchButton:"\uAC80\uC0C9\uD558\uAE30",resultUnit:"\uB2E8\uC5B4",remaining:"{{count}}\uAC1C \uB0A8\uC74C",resultDisc:"\uC6D0\uD558\uB294 {{unit}} \uC120\uD0DD\uD558\uC138\uC694. {{max}}\uAC1C\uAE4C\uC9C0 \uC120\uD0DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. ({{selected}}/{{max}})",resultTitlePrefix:"\uCD1D ",resultTitleSuffix:"\uAC1C\uC758 {{unit}} \uAC80\uC0C9\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",emptyResult:"\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",groupCount:"{{count}}\uAC1C",sort:{aria:"\uC815\uB82C",match:"\uC2DC\uC791 \uC6B0\uC120",ganada:"\uAC00\uB098\uB2E4\uC21C \u2191",ganadaDesc:"\uAC00\uB098\uB2E4\uC21C \u2193",syllable:"\uC74C\uC808 \uC218 \u2191",syllableDesc:"\uC74C\uC808 \uC218 \u2193",grade:"\uB4F1\uAE09\uC21C \u2191",gradeDesc:"\uB4F1\uAE09\uC21C \u2193",original:"\uBC1B\uC740 \uC21C\uC11C"},pageSize:"{{count}}\uAC1C\uC529 \uBCF4\uAE30",pageSizeAria:"\uD398\uC774\uC9C0 \uD06C\uAE30"},gb={clearAllSelection:"\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C",divLine:"\uB300\uB9BD\uC120",removePair:"\uB300\uB9BD\uC30D \uBE7C\uAE30",removeWord:"\uB2E8\uC5B4 \uBE7C\uAE30"},yb={title:"\uC8FC\uC81C\uBCC4 \uB4E3\uAE30",subtitle:"\uC8FC\uC81C\uB97C \uC120\uD0DD\uD558\uACE0 \uB4E3\uAE30 \uD6C8\uB828\uC744 \uC2DC\uC791\uD558\uC138\uC694.",noiseTitle:"\uC18C\uC74C \uD558 \uBB38\uC7A5\uB4E3\uAE30",shortStoryTitle:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",FOOD:"\uC74C\uC2DD",HLTH:"\uAC74\uAC15",WETH:"\uB0A0\uC528",PRSN:"\uC778\uBB3C",KRCT:"\uD55C\uAD6D\uBB38\uD654",STRY:"\uC774\uC57C\uAE30",LOCA:"\uC9C0\uC5ED",SOAR:"\uC0AC\uD68C\uC640 \uC608\uC220",NTSC:"\uC790\uC5F0\uACFC \uACFC\uD559",SPRT:"\uC2A4\uD3EC\uCE20",sub:{TRKRFD:"\uD55C\uAD6D \uC804\uD1B5\uC74C\uC2DD",MDKRFD:"\uD55C\uAD6D \uD604\uB300\uC74C\uC2DD",WRLDFD:"\uC138\uACC4\uC758 \uC74C\uC2DD",MTRFRT:"\uC2DD\uC7AC\uB8CC\uC640 \uACFC\uC77C",GEFDKL:"\uC74C\uC2DD \uC0C1\uC2DD",HTETHB:"\uAC74\uAC15\uD55C \uC2DD\uC2B5\uAD00",DISILL:"\uBCD1\uACFC \uC9C8\uD658",EXCISE:"\uC6B4\uB3D9",GEHTKL:"\uAC74\uAC15\uC0C1\uC2DD",GESSKL:"\uACC4\uC808\uC0C1\uC2DD",SNWRAN:"\uB208\uACFC \uBE44",WTHFCT:"\uC77C\uAE30\uC608\uBCF4",GEWTKL:"\uB0A0\uC528\uC0C1\uC2DD",JODYPS:"\uC870\uC120\uC2DC\uB300",MDKRPS:"\uD55C\uAD6D \uADFC\uD604\uB300",THKDPS:"\uC0BC\uAD6D\uC2DC\uB300",WRLART:"\uC138\uACC4\uC758 \uC608\uC220\uAC00",WRLPSN:"\uC138\uACC4\uC758 \uC778\uBB3C",KRLANG:"\uC6B0\uB9AC\uB9D0",TRPLCT:"\uC804\uD1B5\uB180\uC774",HERITG:"\uBB38\uD654\uC7AC",EVTFES:"\uD589\uC0AC\uC640 \uCD95\uC81C",GECTKL:"\uC0C1\uC2DD",FRYTAL:"\uB3D9\uD654",AMZING:"\uC2E0\uAE30\uD55C \uC774\uC57C\uAE30",DAYSTR:"\uC77C\uC0C1 \uC18D \uC774\uC57C\uAE30",KRLDMK:"\uD55C\uAD6D\uC758 \uBA85\uC18C",SELNMK:"\uC11C\uC6B8\uC758 \uBA85\uC18C",WRDTRB:"\uC138\uACC4\uC5EC\uD589",NAVIGT:"\uAE38 \uCC3E\uAE30",KRSOCI:"\uD55C\uAD6D",ECONEW:"\uACBD\uC81C\uC640 \uB274\uC2A4",GENART:"\uC608\uC220",GELFKL:"\uC0DD\uD65C \uC0C1\uC2DD",ANIMAL:"\uB3D9\uBB3C",PLANTS:"\uC2DD\uBB3C",ETHPLT:"\uC9C0\uAD6C",TOLELC:"\uB3C4\uAD6C\uC640 \uC804\uC790\uC81C\uD488",GESCKL:"\uACFC\uD559\uC0C1\uC2DD",INVDSP:"\uAC1C\uC778\uACBD\uAE30",MARART:"\uACA9\uD22C\uAE30",TEAMSP:"\uB2E8\uCCB4\uACBD\uAE30",FOOTBL:"\uCD95\uAD6C",GESPKL:"\uC2A4\uD3EC\uCE20 \uC0C1\uC2DD"}},vb={direction:{left:"\uC88C",right:"\uC6B0",label:"\uBC29\uD5A5"},wornDate:"\uCC29\uC6A9\uC77C",deviceType:"\uC885\uB958",brand:"\uBE0C\uB79C\uB4DC",fitType:"\uCC29\uC6A9\uD615\uD0DC",productName:"\uC81C\uD488\uBA85",addNew:"\uC0C8 \uAE30\uAE30 \uCD94\uAC00",selectFromList:"\uBAA9\uB85D\uC5D0\uC11C \uC120\uD0DD",removeDevice:"\uCC29\uC6A9 \uD574\uC81C",type:{hearingAid:"\uBCF4\uCCAD\uAE30",cochlearImplant:"\uC778\uACF5\uC640\uC6B0",other:"\uAE30\uD0C0"}},_b={stat:{totalCustomers:"\uCD1D \uACE0\uAC1D",monthlyVisits:"\uC774\uB2EC \uCD1D \uBC29\uBB38"},chart:{visitDetail:"\uC0C1\uC138 \uBC29\uBB38 \uD604\uD669",trainingDetail:"\uC0C1\uC138 \uD6C8\uB828 \uD604\uD669",weekly:"\uC8FC\uBCC4",periodMonth:"\uC6D4",periodWeek:"\uC8FC",weeklyPrefix:"\uC8FC\uAC04",monthlyPrefix:"\uC6D4\uAC04",visit:"\uBC29\uBB38",reservation:"\uC608\uC57D",trainingDone:"\uD6C8\uB828 \uC644\uB8CC",trainingInProgress:"\uD6C8\uB828 \uC911",weekRange:"{{start}}~{{end}}",week:"{{n}}\uC8FC"}},xb={phonemeSelect:{vs:"\uB300"},caution:"\uC720\uC758\uC0AC\uD56D",mode:{include:"\uC74C\uC18C \uD3EC\uD568",pick:"\uC74C\uC18C \uB300\uB9BD",contrast:"\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815",infoTitle:"\uB300\uB9BD \uBC29\uC2DD",infoInclude:"\uC74C\uC18C \uD3EC\uD568 \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uBAA8\uB450 \uB4E4\uC5B4\uAC04 \uB2E8\uC5B4\uC640 \uADF8 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694.",infoPick:"\uC74C\uC18C \uB300\uB9BD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uB300\uB9BD\uC30D \uB450 \uB2E8\uC5B4\uC758 \uC2E4\uC81C \uCC28\uC774\uC810\uC77C \uB54C\uB9CC \uB9E4\uCE6D\uB3FC\uC694.",infoContrast:"\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815 \u2014 \uAE30\uC900 \uB2E8\uC5B4\uC640 \uB300\uB9BD \uB2E8\uC5B4\uC758 \uC74C\uC18C\uB97C \uAC01\uAC01 \uC9C1\uC811 \uC120\uD0DD\uD574 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694."},count:"{{n}}\uAC1C",countLabel:"\uC74C\uC18C \uAC1C\uC218",input:{char:"\uAE00\uC790 \uC120\uD0DD",pron:"\uBC1C\uC74C \uC120\uD0DD",infoTitle:"\uC785\uB825 \uBC29\uC2DD",infoChar:"\uAE00\uC790 \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uB2E8\uC5B4(\uAE00\uC790 \uAE30\uC900)\uB97C \uCC3E\uC740 \uD6C4, \uB2E8\uC5B4\uC758 \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4.",infoPron:"\uBC1C\uC74C \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4."},phonemeN:"{{n}}\uBC88 \uC74C\uC808",phonemeSingleLabel:"\uC74C\uC808",phonemeContrastSingleLabel:"\uB300\uB9BD \uC74C\uC808",ordinals:["\uCCAB\uBC88\uC9F8","\uB450\uBC88\uC9F8","\uC138\uBC88\uC9F8","\uB124\uBC88\uC9F8"],phonemeOrdinalLabel:"{{ordinal}} \uC74C\uC808",phonemeContrastOrdinalLabel:"\uB300\uB9BD {{ordinal}} \uC74C\uC808",composition:"\uC815\uB2F5 \uB2E8\uC5B4 \uAD6C\uC131",syllableCount:"\uC74C\uC808 \uC218",syllableN:"{{n}}\uC74C\uC808",syllableNPlus:"{{n}}\uC74C\uC808 \uC774\uC0C1",onset:"\uCD08\uC131",vowel:"\uBAA8\uC74C",coda:"\uC885\uC131",filter:{searchOptionsTitle:"\uB300\uB9BD \uC124\uC815",searchModeLabel:"\uB300\uB9BD \uBC29\uC2DD",countLabel:"\uC785\uB825 \uC74C\uC808 \uAC2F\uC218",inputModeLabel:"\uC785\uB825 \uBC29\uC2DD",phonemeOrder:"\uC785\uB825 \uC74C\uC808 \uC704\uCE58",phonemeOrderInfo:["\uC77C\uCE58: \uB300\uB9BD\uC30D\uC774 \uC815\uD655\uD788 \uAC19\uC740 \uC704\uCE58(\uC74C\uC808)\uC5D0\uC11C\uB9CC \uCC28\uC774 \uB098\uC57C \uB9E4\uCE6D\uB3FC\uC694.","\uBB34\uAD00: \uCC28\uC774 \uB098\uB294 \uC704\uCE58\uB294 \uC0C1\uAD00\uC5C6\uC774 \uB9E4\uCE6D\uB3FC\uC694."],orderAny:"\uBB34\uAD00",orderMatch:"\uC77C\uCE58",difficultyInfo:["1\uB4F1\uAE09 : \uD559\uB839\uC804\uAE30\uC5D0 \uC2B5\uB4DD\uD558\uC5EC \uD3C9\uC0DD\uC5D0 \uAC78\uCCD0 \uC77C\uC0C1 \uC5B8\uC5B4\uC0DD\uD65C\uC744 \uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uB294 \uC5B4\uD718","2\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 1-2\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","3\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 3-4\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","4\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 5-6\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","\uB4F1\uAE09\uC5C6\uC74C : \uAD6D\uB9BD\uAD6D\uC5B4\uC6D0 \uD45C\uC900 \uC5B4\uD718 \uC678 \uACE0\uBE48\uB3C4 \uC0DD\uD65C \uC5B4\uD718, \uC2E0\uC870\uC5B4 \uBC0F \uC678\uB798\uC5B4"],selectLabel:"\uC120\uD0DD",onlyHasImage:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC",onlySameStructure:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"},confirmMessage:"\uC120\uD0DD\uD55C {{unit}} {{count}}\uAC1C\uB97C \uD3EC\uD568\uD55C \uB2E8\uC5B4 \uD45C \uC815\uBCF4\uAC00 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",resetOptions:"\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654",phonemeContrast:"\uB300\uB9BD {{n}}\uBC88 \uC74C\uC808",infoNotes:["\uBBF8\uB9AC\uBCF4\uAE30 \uAE00\uC790\uB294 \uC120\uD0DD\uD55C \uC74C\uC18C\uC758 \uC870\uD569 \uC608\uC2DC\uC785\uB2C8\uB2E4. \uC2E4\uC81C \uAC80\uC0C9\uC740 \uD574\uB2F9 \uC74C\uC18C\uAC00 \uD3EC\uD568\uB41C \uBAA8\uB4E0 \uB2E8\uC5B4\uB97C \uB300\uC0C1\uC73C\uB85C \uD569\uB2C8\uB2E4.","\uCD08\uC131 '\u3147'\uC740 \uC120\uD0DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E8\uC5B4 \uC55E\uC5D0 \uC624\uB294 \u3147\uC740 \uC2E4\uC9C8\uC801\uC73C\uB85C \uBB34\uC74C\uC774\uC5B4\uC11C \uB300\uB9BD\uC30D \uC131\uB9BD\uC5D0 \uC601\uD5A5\uC744 \uC8FC\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uCD08\uC131\uACFC \uC885\uC131\uB9CC \uC120\uD0DD\uD558\uBA74 \uBAA8\uC74C\uC740 '\u314F'\uB85C \uC790\uB3D9 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC74C\uC18C \uAC1C\uC218\uB97C \uB298\uB9AC\uBA74 \uAC01 \uC74C\uC18C \uC0AC\uC774\uC758 \uB300\uB9BD\uC30D\uC744 \uAC80\uC0C9\uD569\uB2C8\uB2E4."]},wb={lead:`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
|
|
818
|
+
`||a==="\r"?t+=2:t+=r<128?1:2}return t}function ef(e){return Tl(e)>90?"LMS":"SMS"}function Ml(e,t=85){const a=Tl(e),r=ef(e),s=r==="SMS"?90:2e3,l=typeof t=="number"?t:null;return{bytes:a,type:r,limit:s,over:a>s,target:l,overTarget:l!==null&&a>l}}const tf=["onset","vowel","coda","glide"],Ll="none",nf={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},af="\uC5C6\uC74C";function rf(e){return tf.includes(e)}function of(e){const t={};for(const[a,r]of Object.entries(e)){const s=rf(a)?a:nf[a];s&&(t[s]=r===af?Ll:r)}return t}const sf={\u314F:{nucleus:"\u314F"},\u3151:{glide:"j",nucleus:"\u314F"},\u3153:{nucleus:"\u3153"},\u3155:{glide:"j",nucleus:"\u3153"},\u3157:{nucleus:"\u3157"},\u315B:{glide:"j",nucleus:"\u3157"},\u315C:{nucleus:"\u315C"},\u3160:{glide:"j",nucleus:"\u315C"},\u3161:{nucleus:"\u3161"},\u3163:{nucleus:"\u3163"},\u3150:{nucleus:"\u3154/\u3150"},\u3152:{glide:"j",nucleus:"\u3154/\u3150"},\u3154:{nucleus:"\u3154/\u3150"},\u3156:{glide:"j",nucleus:"\u3154/\u3150"},\u3158:{glide:"w",nucleus:"\u314F"},\u3159:{glide:"w",nucleus:"\u3154/\u3150"},\u315A:{glide:"w",nucleus:"\u3154/\u3150"},\u315D:{glide:"w",nucleus:"\u3153"},\u315E:{glide:"w",nucleus:"\u3154/\u3150"},\u315F:{glide:"w",nucleus:"\u3163"},\u3162:{glide:"\u0270",nucleus:"\u3163"}},$l=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],Rl=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],lf=["","\u3131","\u3132","\u3133","\u3134","\u3135","\u3136","\u3137","\u3139","\u313A","\u313B","\u313C","\u313D","\u313E","\u313F","\u3140","\u3141","\u3142","\u3144","\u3145","\u3146","\u3147","\u3148","\u314A","\u314B","\u314C","\u314D","\u314E"];function Ma(e){if(!e)return null;const t=e.charCodeAt(0)-44032;return t<0||t>=11172?null:{cho:Math.floor(t/588),jung:Math.floor(t%588/28),jong:t%28}}function uf(e){const t=Ma(e[0]||"");return t?$l[t.cho]:""}function cf(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],a=i=>$l.includes(i),r=i=>Rl.includes(i),s=t.map(i=>a(i)?"cho":r(i)?"jung":Ma(i)?"syl":"other"),l=t.map(i=>Ma(i));if(s.includes("other")){const i=e.toLowerCase();return u=>u.normalize("NFC").toLowerCase().includes(i)}return i=>{const u=[...i.normalize("NFC")];for(let c=0;c+t.length<=u.length;c++){let d=!0;for(let h=0;h<t.length;h++){const p=u[c+h],m=s[h];if(m==="cho"){if(uf(p)!==t[h]){d=!1;break}}else if(m==="jung"){const g=Ma(p);if(!g||Rl[g.jung]!==t[h]){d=!1;break}}else{const g=l[h];if(g&&g.jong===0){const y=Ma(p);if(!y||y.cho!==g.cho||y.jung!==g.jung){d=!1;break}}else if(p!==t[h]){d=!1;break}}}if(d)return!0}return!1}}const df={3:["\u3131","\u3145"],5:["\u3134","\u3148"],6:["\u3134","\u314E"],9:["\u3139","\u3131"],10:["\u3139","\u3141"],11:["\u3139","\u3142"],12:["\u3139","\u3145"],13:["\u3139","\u314C"],14:["\u3139","\u314D"],15:["\u3139","\u314E"],18:["\u3142","\u3145"]};Object.fromEntries(Object.entries(df).map(([e,t])=>[t.join(""),lf[Number(e)]]));const pf="word_pair_index_v2",hf="word_pair_index_sig_v2";let sr=null;function mf(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;for(const t of Object.values(e)){if(t===null||typeof t!="object"||Array.isArray(t))return!1;const a=t;for(const r of["cho","jung","jong"])if(!Array.isArray(a[r])||!a[r].every(s=>typeof s=="string"))return!1}return!0}function Cf(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(pf),t=localStorage.getItem(hf);if(!e||!t)return null;const a=JSON.parse(e);return mf(a)?{index:a,sig:t}:null}catch{return null}}function ff(){if(sr)return sr;const e=Cf();return e?(sr=e.index,e.sig,sr):null}function bf(e,t,a){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+a)/(t+a)))}function gf(e,t){if(!(e>0))return 1;const a=Math.max(1,Math.floor(t));if(e<=a)return e;const r=Math.ceil(e/a);return Math.max(1,Math.ceil(e/r))}const oo=/[ㄱ-ㅎ]/,yf=/[ㅏ-ㅣ]/;function Pl(e){e=e.normalize("NFC");for(let t=e.length-1;t>=0;t--){const a=e[t],r=a.charCodeAt(0);if(r>=44032&&r<=55203||oo.test(a)||yf.test(a))return a}return null}function vf(e){const t=Pl(e);if(!t)return"\uAC00";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC774":"\uAC00":oo.test(t)?"\uC774":"\uAC00"}function _f(e){return`${e}${vf(e)}`}function xf(e){const t=Pl(e);if(!t)return"\uB97C";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC744":"\uB97C":oo.test(t)?"\uC744":"\uB97C"}function wf(e){return`${e}${xf(e)}`}function Bf(e,t,a){const r=e.slice(),[s]=r.splice(t,1);return r.splice(a,0,s),r}function La(e,t=Math.random){const a=e.slice();for(let r=a.length-1;r>0;r--){const s=Math.floor(t()*(r+1));[a[r],a[s]]=[a[s],a[r]]}return a}const kf=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",t=typeof qt?.t=="function"?qt.t("common.unknownError",{defaultValue:e}):void 0;return typeof t=="string"&&t?t:e};function Il(e,t){if(t===void 0&&(t=kf()),e instanceof Error)return e.message||t;if(typeof e=="string")return e||t;if(e&&typeof e=="object"){const a=e;for(const r of[a.message,a.error_description,a.error])if(typeof r=="string"&&r)return r}return t}const Af="__ihab_core_word_pool__";function Fl(){return globalThis[Af]??null}const Ol=globalThis;function zl(e,t){const a=r=>{};try{const r=t();r&&typeof r.catch=="function"&&r.catch(a)}catch(r){a(r)}}function Nf(e){zl("time",()=>Ol.__ihabTrainingTimeLogger?.(e))}function Ef(e){zl("completion",()=>Ol.__ihabTrainingCompletionLogger?.(e))}const Df="Asia/Seoul",Sf=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function $a(e){let t;if(e instanceof Date)t=e;else if(typeof e=="string"){const a=e.trim(),r=/^(\d{4}-\d{2}-\d{2})(?:$|[T ])/.exec(a)?.[1];if(r){const l=new Date(`${r}T00:00:00Z`);if(Number.isNaN(l.getTime())||l.toISOString().slice(0,10)!==r)return null}const s=Sf.exec(a);t=new Date(s?`${s[1]}T${s[2]}:${s[3]??"00"}${s[4]?`.${s[4].slice(0,3).padEnd(3,"0")}`:""}+09:00`:a)}else t=new Date(e);return Number.isNaN(t.getTime())?null:t}function jf(e){return $a(e)!==null}const Tf=e=>$a(e);function Wl(e,t){const a=t.startsWith("ko")?"ko-KR":"en-US",r=Tf(e);return r?r.toLocaleDateString(a,{timeZone:Df,year:"numeric",month:"short",day:"numeric"}):""}function Hl(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function Mf(e,t,a){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Hl(a),{year:"numeric",month:"long"}).format(new Date(e,t-1,1))}function so(e,t,a,r){return e("calendar.yearMonth",{year:a,month:r,defaultValue:""})||Mf(a,r,t)}function Ra(){return io(new Date)}function lo(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&$a(e)?.toISOString().slice(0,10)===e?e:Ra()}function ua(){return $f(Ra())}const Lf=540*60*1e3;function Vl(e,t,a){return new Date(Date.UTC(e,t,a)-Lf)}function $f(e){const[t,a,r]=e.split("-").map(Number);return new Date(t,(a||1)-1,r||1)}function io(e){if(e==null||e==="")return"";const t=$a(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function ql(e,t){if(!e)return"";const a=$a(e);if(!a)return"";const r=a.getTime(),s=Math.max(0,Math.floor((Date.now()-r)/1e3)),l=Math.floor(s/60),i=Math.floor(l/60),u=Math.floor(i/24),c=Math.floor(u/7),d=Math.floor(u/30),h=Math.floor(u/365);return l<1?t("store.time.justNow","\uBC29\uAE08 \uC804"):l<60?t("store.time.minutesAgo",{n:l}):i<24?t("store.time.hoursAgo",{n:i}):u<7?t("store.time.daysAgo",{n:u}):c<5?t("store.time.weeksAgo",{n:c}):u<365?t("store.time.monthsAgo",{n:Math.min(d,11)}):t("store.time.yearsAgo",{n:h})}function Ul(e,t={}){const{sep:a=".",pad:r=!0,trailingDot:s=!1,fallback:l="\u2014"}=t;if(!e)return l;const i=io(e instanceof Date?e:String(e));if(!i)return l;const[u,c,d]=i.split("-"),h=r?c:String(Number(c)),p=r?d:String(Number(d));return`${u}${a}${h}${a}${p}${s?".":""}`}function lr(e){if(typeof e=="string"){const t=e.trim();return t&&jf(t)?t:null}if(e instanceof Date)return Number.isNaN(e.getTime())?null:e.toISOString();if(typeof e=="number"&&Number.isFinite(e)){const t=new Date(e);return Number.isNaN(t.getTime())?null:t.toISOString()}return null}function rn(e){return typeof e=="string"?e.trim()||null:typeof e=="number"?String(e):null}function Rf(e){for(const t of["correct","isCorrect","heard","judgement"])if(typeof e[t]=="boolean")return e[t];return e.score===1?!0:e.score===0?!1:null}function Pf(e){return Array.isArray(e)?e.map((t,a)=>{const r=t??{};return{index:a,itemId:rn(r.contextCode)??rn(r.itemId)??rn(r.itemCode)??rn(r.id),question:rn(r.question)??rn(r.q)??rn(r.sentence)??rn(r.text)??rn(r.prompt)??rn(r.word)??rn(r.targetSyllable),answer:rn(r.answer),selected:rn(r.selectedText)??rn(r.selected),correct:Rf(r),shownAt:lr(r.shownAt)??lr(r.shown_at),answeredAt:lr(r.answeredAt)??lr(r.answered_at)}}):[]}const uo=globalThis;async function If(){try{return await uo.__ihabNoiseSettingsStore?.load()??null}catch{return null}}function co(e){const t=a=>{};try{const a=uo.__ihabNoiseSettingsStore?.save(e);a&&typeof a.catch=="function"&&a.catch(t)}catch(a){t(a)}}function ir(e){try{uo.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function Ff(e){if(typeof document<"u"){const t=document.activeElement;let a=null;try{if(a=document.createElement("textarea"),a.value=e,a.setAttribute("readonly",""),a.style.position="fixed",a.style.top="0",a.style.left="0",a.style.opacity="0",a.style.pointerEvents="none",document.body.appendChild(a),a.focus(),a.select(),a.setSelectionRange(0,e.length),document.execCommand("copy"))return!0}catch{}finally{if(a?.parentNode&&a.parentNode.removeChild(a),t&&t!==document.activeElement&&typeof t.focus=="function"&&t.isConnected)try{t.focus({preventScroll:!0})}catch{}}}try{if(typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function")return await navigator.clipboard.writeText(e),!0}catch{}return!1}function ca(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Gl(e,t){if(!e)return"-";const a=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!a)return e;const r=Number(a[1]),s=Number(a[2]),l=a[1].padStart(2,"0");return s===0?t("date.timeH",{h:r,hh:l,mm:a[2]}):t("date.timeHM",{h:r,hh:l,m:s,mm:a[2]})}function po(e){return(e??0).toLocaleString("ko-KR")}const Of=[{key:"FOOD",label:"\uC74C\uC2DD",icon:"salad",color:"#FF8A65",subs:[{key:"TRKRFD",label:"\uD55C\uAD6D \uC804\uD1B5\uC74C\uC2DD"},{key:"MDKRFD",label:"\uD55C\uAD6D \uD604\uB300\uC74C\uC2DD"},{key:"WRLDFD",label:"\uC138\uACC4\uC758 \uC74C\uC2DD"},{key:"MTRFRT",label:"\uC2DD\uC7AC\uB8CC\uC640 \uACFC\uC77C"},{key:"GEFDKL",label:"\uC74C\uC2DD \uC0C1\uC2DD"}]},{key:"HLTH",label:"\uAC74\uAC15",icon:"heart",color:"#66BB6A",subs:[{key:"HTETHB",label:"\uAC74\uAC15\uD55C \uC2DD\uC2B5\uAD00"},{key:"DISILL",label:"\uBCD1\uACFC \uC9C8\uD658"},{key:"EXCISE",label:"\uC6B4\uB3D9"},{key:"GEHTKL",label:"\uAC74\uAC15\uC0C1\uC2DD"}]},{key:"WETH",label:"\uB0A0\uC528",icon:"sun-medium",color:"#42A5F5",subs:[{key:"GESSKL",label:"\uACC4\uC808\uC0C1\uC2DD"},{key:"SNWRAN",label:"\uB208\uACFC \uBE44"},{key:"WTHFCT",label:"\uC77C\uAE30\uC608\uBCF4"},{key:"GEWTKL",label:"\uB0A0\uC528\uC0C1\uC2DD"}]},{key:"PRSN",label:"\uC778\uBB3C",icon:"user-round",color:"#AB47BC",subs:[{key:"JODYPS",label:"\uC870\uC120\uC2DC\uB300"},{key:"MDKRPS",label:"\uD55C\uAD6D \uADFC\uD604\uB300"},{key:"THKDPS",label:"\uC0BC\uAD6D\uC2DC\uB300"},{key:"WRLART",label:"\uC138\uACC4\uC758 \uC608\uC220\uAC00"},{key:"WRLPSN",label:"\uC138\uACC4\uC758 \uC778\uBB3C"}]},{key:"KRCT",label:"\uD55C\uAD6D\uBB38\uD654",icon:"bow-arrow",color:"#EC407A",subs:[{key:"KRLANG",label:"\uC6B0\uB9AC\uB9D0"},{key:"TRPLCT",label:"\uC804\uD1B5\uB180\uC774"},{key:"HERITG",label:"\uBB38\uD654\uC7AC"},{key:"EVTFES",label:"\uD589\uC0AC\uC640 \uCD95\uC81C"},{key:"GECTKL",label:"\uC0C1\uC2DD"}]},{key:"STRY",label:"\uC774\uC57C\uAE30",icon:"message-circle",color:"#8D6E63",subs:[{key:"FRYTAL",label:"\uB3D9\uD654"},{key:"AMZING",label:"\uC2E0\uAE30\uD55C \uC774\uC57C\uAE30"},{key:"DAYSTR",label:"\uC77C\uC0C1 \uC18D \uC774\uC57C\uAE30"}]},{key:"LOCA",label:"\uC9C0\uC5ED",icon:"map-pin",color:"#26A69A",subs:[{key:"KRLDMK",label:"\uD55C\uAD6D\uC758 \uBA85\uC18C"},{key:"SELNMK",label:"\uC11C\uC6B8\uC758 \uBA85\uC18C"},{key:"WRDTRB",label:"\uC138\uACC4\uC5EC\uD589"},{key:"NAVIGT",label:"\uAE38 \uCC3E\uAE30"}]},{key:"SOAR",label:"\uC0AC\uD68C\uC640 \uC608\uC220",icon:"landmark",color:"#5C6BC0",subs:[{key:"KRSOCI",label:"\uD55C\uAD6D"},{key:"ECONEW",label:"\uACBD\uC81C\uC640 \uB274\uC2A4"},{key:"GENART",label:"\uC608\uC220"},{key:"GELFKL",label:"\uC0DD\uD65C \uC0C1\uC2DD"}]},{key:"NTSC",label:"\uC790\uC5F0\uACFC \uACFC\uD559",icon:"leaf",color:"#9CCC65",subs:[{key:"ANIMAL",label:"\uB3D9\uBB3C"},{key:"PLANTS",label:"\uC2DD\uBB3C"},{key:"ETHPLT",label:"\uC9C0\uAD6C"},{key:"TOLELC",label:"\uB3C4\uAD6C\uC640 \uC804\uC790\uC81C\uD488"},{key:"GESCKL",label:"\uACFC\uD559\uC0C1\uC2DD"}]},{key:"SPRT",label:"\uC2A4\uD3EC\uCE20",icon:"trophy",color:"#FFCA28",subs:[{key:"INVDSP",label:"\uAC1C\uC778\uACBD\uAE30"},{key:"MARART",label:"\uACA9\uD22C\uAE30"},{key:"TEAMSP",label:"\uB2E8\uCCB4\uACBD\uAE30"},{key:"FOOTBL",label:"\uCD95\uAD6C"},{key:"GESPKL",label:"\uC2A4\uD3EC\uCE20 \uC0C1\uC2DD"}]}],zf=[{key:"LISTEN_IN_NOISE",label:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",icon:"audio-lines",desc:"\uC18C\uC74C \uD658\uACBD \uC18D \uBB38\uC7A5 \uC774\uD574 \uD6C8\uB828"},{key:"SHORT_STORY",label:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30 + 4\uBB38\uC81C"},{key:"LONG_STORY",label:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square-text",desc:"\uAE34 \uC774\uC57C\uAE30 \uC2EC\uD654 \uD6C8\uB828"},{key:"ORDERING_SENTENCE",label:"\uBB38\uC7A5 \uC21C\uC11C\uD654 \uD558\uAE30",icon:"align-start-vertical",desc:"\uC21C\uC11C \uBC30\uC5F4 \uD6C8\uB828"}];function Kl(){return Of}function Wf(){return zf}const Hf=[],Vf=[],qf=[],Uf=[];function Gf(){return{LISTEN_IN_NOISE:Hf,SHORT_STORY:Vf,LONG_STORY:qf,ORDERING_SENTENCE:Uf}}const Kf=[{key:"LISTEN_IN_NOISE",label:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",icon:"audio-lines",desc:"\uB2E4\uC591\uD55C \uC18C\uC74C \uD658\uACBD\uC5D0\uC11C \uBB38\uC7A5 \uCCAD\uB825\uC744 \uD6C8\uB828\uD569\uB2C8\uB2E4."},{key:"SHORT_STORY",label:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uBB38\uC81C\uB97C \uD480\uC5B4\uBD05\uB2C8\uB2E4."},{key:"LONG_STORY",label:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",icon:"message-square-text",desc:"\uAE34 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uB2E4\uC218\uC758 \uBB38\uC81C\uB97C \uD480\uC5B4\uBD05\uB2C8\uB2E4."},{key:"ORDERING_SENTENCE",label:"\uBB38\uC7A5 \uC21C\uC11C\uD654 \uD558\uAE30",icon:"align-start-vertical",desc:"\uC5EC\uB7EC\uAC1C\uC758 \uC9E7\uC740 \uBB38\uC7A5\uC744 \uB4E3\uACE0 \uAE30\uC5B5\uD558\uC5EC \uADF8 \uC21C\uC11C\uC5D0 \uB9DE\uAC8C \uBC30\uC5F4\uD569\uB2C8\uB2E4."}],Yl={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function Yf(e){return Kf.map(t=>{const a=Yl[t.key];return a?{...t,label:e(`trainingType.${a}.title`),desc:e(`trainingType.${a}.desc`)}:t})}var Zf={statusFilter:"\uC0C1\uD0DC \uD544\uD130",pageSizeSelect:"\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218",selectedCount:"{{count}}\uAC1C \uC120\uD0DD\uB428",selectedOfMax:"\uCD5C\uB300 {{max}}\uAC1C \uC911 {{count}}\uAC1C",cancel:"\uCDE8\uC18C",info:"\uC124\uBA85",errorState:{message:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",retry:"\uB2E4\uC2DC \uC2DC\uB3C4"},save:"\uC800\uC7A5",confirm:"\uD655\uC778",discardConfirm:{title:"\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?",body:"\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",confirm:"\uC785\uB825 \uCDE8\uC18C"},close:"\uB2EB\uAE30",back:"\uB4A4\uB85C",emptyTrainingName:"\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.",remove:"\uC81C\uAC70",image:"\uC774\uBBF8\uC9C0",delete:"\uC0AD\uC81C",reset:"\uCD08\uAE30\uD654",update:"\uC5C5\uB370\uC774\uD2B8",download:"\uB2E4\uC6B4\uB85C\uB4DC",likeCount:"\uC88B\uC544\uC694 {{count}}",downloadCount:"\uAC00\uC838\uAC04 \uC218 {{count}}",descriptionFor:"{{name}} \uC124\uBA85",search:"\uAC80\uC0C9",empty:"\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",yes:"\uC608",no:"\uC544\uB2C8\uC624",all:"\uC804\uCCB4",none:"\uC5C6\uC74C",days:"{{count}}\uC77C",loadMore:"\uB354\uBCF4\uAE30",more:"\uB354\uBCF4\uAE30",moreFor:"{{name}} \uB354\uBCF4\uAE30",collapseFor:"{{name}} \uC811\uAE30",expandFor:"{{name}} \uD3BC\uCE58\uAE30",sortFor:"{{name}} \uC815\uB82C",retry:"\uB2E4\uC2DC \uC2DC\uB3C4",prevPage:"\uC774\uC804 \uD398\uC774\uC9C0",nextPage:"\uB2E4\uC74C \uD398\uC774\uC9C0",play:"\uC7AC\uC0DD",loading:"\uBD88\uB7EC\uC624\uB294 \uC911",playFor:"{{name}} \uC7AC\uC0DD",pauseFor:"{{name}} \uBA48\uCDA4",pause:"\uBA48\uCDA4",playPause:"\uC7AC\uC0DD / \uBA48\uCDA4",replay:"\uB2E4\uC2DC\uB4E3\uAE30",subscription:"\uC774\uC6A9\uAD8C",done:"\uC644\uB8CC",failed:"\uC2E4\uD328",continue:"\uACC4\uC18D",notification:"\uC54C\uB9BC",emptyList:"\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",noMatches:"\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",menu:"\uBA54\uB274",resetSelection:"\uC120\uD0DD \uCD08\uAE30\uD654",pageSizeLabel:"{{n}}\uAC1C\uC529 \uBCF4\uAE30",totalCountPrefix:"\uCD1D ",totalCountSuffix:"\uAC1C",expand:"\uD3BC\uCE58\uAE30",collapse:"\uC811\uAE30",popup:"\uD31D\uC5C5",codeBlock:"\uCF54\uB4DC \uBE14\uB85D",totalPrefix:"\uCD1D ",copyCode:"\uCF54\uB4DC \uBCF5\uC0AC",copied:"\uBCF5\uC0AC\uB428",col:{problem:"\uBB38\uC81C"},phonetics:{place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"},vowel:{frontHigh:"\uC804\uC124 \uACE0\uBAA8\uC74C",backHighUnrounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C",backHighRounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C",frontMid:"\uC804\uC124 \uC911\uBAA8\uC74C",backMidUnrounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C",backMidRounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C",low:"\uC800\uBAA8\uC74C"},glide:{j:"j\uD65C\uC74C",w:"w\uD65C\uC74C",velar:"\u0270\uD65C\uC74C"}},unknownError:"\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",networkError:"\uB124\uD2B8\uC6CC\uD06C \uC5F0\uACB0\uC774 \uBD88\uC548\uC815\uD569\uB2C8\uB2E4. \uC5F0\uACB0 \uC0C1\uD0DC\uB97C \uD655\uC778\uD55C \uB4A4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694."},Xf={rangeSelect:"\uAE30\uAC04 \uC120\uD0DD",dow:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],weekOrdinal:["\uCCAB\uC9F8","\uB458\uC9F8","\uC14B\uC9F8","\uB137\uC9F8","\uB2E4\uC12F\uC9F8","\uC5EC\uC12F\uC9F8","\uC77C\uACF1\uC9F8"],weekLabel:"{{ord}}\uC8FC",prevMonth:"\uC774\uC804 \uB2EC",addOnDate:"{{date}}\uC5D0 \uBC29\uBB38 \uB4F1\uB85D",nextMonth:"\uB2E4\uC74C \uB2EC",prevWeek:"\uC774\uC804 \uC8FC",nextWeek:"\uB2E4\uC74C \uC8FC",legend:{visited:"\uBC29\uBB38",scheduled:"\uC608\uC57D",noVisit:"\uBBF8\uBC29\uBB38"},periodSelect:"\uAE30\uAC04 \uB2E8\uC704",visitCount:"\uBC29\uBB38 {{count}}\uAC74",statusCount:"{{label}} {{count}}\uAC74"},Jf={planSuffix:"\uC774\uC6A9\uAD8C",labeledPlan:"{{label}} \uC774\uC6A9\uAD8C",couponCode:"\uC774\uC6A9\uAD8C \uCF54\uB4DC",specialLabel:"\uC624\uD508\uD2B9\uAC00",unitDay:"\uC77C",unitYear:"\uB144",remainingDay:"{{n}}\uC77C \uB0A8\uC74C",remainingHour:"{{n}}\uC2DC\uAC04 \uB0A8\uC74C",remainingMinute:"{{n}}\uBD84 \uB0A8\uC74C",remainingSecond:"{{n}}\uCD08 \uB0A8\uC74C",expired:"\uB9CC\uB8CC\uB428",menu:{use:"\uC0AC\uC6A9\uD558\uAE30",refund:"\uD658\uBD88\uD558\uAE30",delete:"\uC0AD\uC81C\uD558\uAE30"}},Qf={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},eb={selected:"\uC120\uD0DD\uB428"},tb={placeholder:"\uC120\uD0DD"},nb={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},ab={biArea:"BI \uC601\uC5ED",biSymbol:"BI \uC2EC\uBCFC",logoMalgwi:"\uB9D0\uADC0 \uB85C\uACE0",logoManager:"\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0",menuOpen:"\uBA54\uB274 \uC5F4\uAE30",utilMenu:"\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274",menuClose:"\uBA54\uB274 \uB2EB\uAE30"},rb={mainMenu:"\uBA54\uC778 \uBA54\uB274",bottomNav:"\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158",goToManager:"\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9",goToMalgwi:"\uB9D0\uADC0\uB85C \uC774\uB3D9",modeLabelManager:"\uB9D0\uADC0 \uB9E4\uB2C8\uC800",modeLabelMalgwi:"\uB9D0\uADC0",training:"\uD6C8\uB828",settings:"\uC124\uC815",notifications:"\uC54C\uB9BC",account:"\uACC4\uC815",help:"\uB3C4\uC6C0\uB9D0",feedback:"\uBC84\uADF8\uC2E0\uACE0",debug:"\uB514\uBC84\uADF8",coupons:"\uCFE0\uD3F0",topic:"\uC8FC\uC81C\uBCC4 \uB4E3\uAE30",trainingType:"\uD6C8\uB828\uBCC4 \uB4E3\uAE30",wordPairs:"\uB300\uB9BD\uC30D \uCC3E\uAE30",wordSearch:"\uB2E8\uC5B4 \uCC3E\uAE30",wordTable:"\uB2E8\uC5B4\uD45C \uB9CC\uB4E4\uAE30",company:"\uC5C5\uCCB4\uC815\uBCF4",more:"\uB354\uBCF4\uAE30",moreMenu:"\uB354\uBCF4\uAE30 \uBA54\uB274",badgeLabel:"{{label}}, {{count}}\uAC1C",badgeInsideLabel:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"},ob={cache:{cleared:"\uCE90\uC2DC\uAC00 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",group:{wordData:{label:"\uB2E8\uC5B4 \uB370\uC774\uD130",sub:"\uB2E8\uC5B4 \uBAA9\uB85D \uBC0F \uBC84\uC804 \uC815\uBCF4"},pairIndex:{label:"\uB2E8\uC5B4\uC30D \uC778\uB371\uC2A4",sub:"\uCD08\uC131\xB7\uC911\uC131\xB7\uC885\uC131 \uB300\uB9BD\uC30D \uBD84\uC11D \uCE90\uC2DC"},imageCache:{label:"\uC774\uBBF8\uC9C0 \uCE90\uC2DC",sub:"\uB2E8\uC5B4\uBCC4 \uC774\uBBF8\uC9C0 \uC874\uC7AC \uC5EC\uBD80 \uD655\uC778 \uACB0\uACFC"}}}},sb={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},lb={security:{password:{currentRequired:"\uD604\uC7AC \uBE44\uBC00\uBC88\uD638\uB97C \uC785\uB825\uD558\uC138\uC694.",newRequired:"\uC0C8 \uBE44\uBC00\uBC88\uD638\uB97C \uC785\uB825\uD558\uC138\uC694.",mismatch:"\uC0C8 \uBE44\uBC00\uBC88\uD638\uAC00 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",changed:"\uBE44\uBC00\uBC88\uD638\uAC00 \uBCC0\uACBD\uB418\uC5C8\uC2B5\uB2C8\uB2E4."}}},ib={settings:"\uC124\uC815",filter:{random:"\uBB34\uC791\uC704",trainOnset:"\uCD08\uC131",trainVowel:"\uBAA8\uC74C",trainCoda:"\uC885\uC131",phonemeGroup:"\uD6C8\uB828 \uC74C\uC808",noLimit:"\uBB34\uAD00",codaExclude:"\uC81C\uC678",gradeLabel:"\uB4F1\uAE09",excludeImageInfo:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC: \uB2E8\uC5B4 \uC911\uC5D0 \uC774\uBBF8\uC9C0\uAC00 \uC788\uB294 \uB2E8\uC5B4\uB9CC \uACB0\uACFC\uC5D0 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",sameStructureInfo:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC: \uC815\uB2F5\uACFC \uC624\uB2F5\uC758 \uC74C\uC808 \uAD6C\uC870(\uAE00\uC790 \uC218\xB7\uBC1B\uCE68 \uC720\uBB34 \uB4F1)\uAC00 \uAC19\uC740 \uACB0\uACFC\uB9CC \uB0A8\uACA8\uC694.",selectSection:"\uC120\uD0DD",excludeImage:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC",sameStructure:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"},noQuestions:"\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",countQuestions:"{{n}}\uBB38\uC81C",countSentences:"{{n}}\uBB38\uC7A5",nextQuestion:"\uB2E4\uC74C \uBB38\uC81C",noiseRatioTitle:"\uC18C\uC74C \uBE44\uC728",noiseRatioValue:"{{ratio}}\uBC30",noiseTypeTitle:"\uC18C\uC74C \uC885\uB958",playVolumeTitle:"\uC804\uCCB4 \uC18C\uB9AC",playSpeedTitle:"\uC7AC\uC0DD \uC18D\uB3C4",meter:{sentence:"\uC7AC\uC0DD",noise:"\uC18C\uC74C",toggle:"\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"},viewResult:"\uACB0\uACFC\uBCF4\uAE30",problemNotice:"{{n}}\uBC88 \uBB38\uC81C \uC785\uB2C8\uB2E4.",trainingSettingsTitle:"\uD6C8\uB828 \uC124\uC815",sentencePreview:"\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30",notHeard:"\uC548 \uB4E4\uB838\uC5B4\uC694.",heardWell:"\uC798 \uB4E4\uB838\uC5B4\uC694.",confirmTitle:"\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694.",noSoundWaveform:"\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",noise:{level:{none:"\uC5C6\uC74C",weak:"\uC57D\uD568",medium:"\uBCF4\uD1B5",strong:"\uAC15\uD568",veryStrong:"\uB9E4\uC6B0 \uAC15\uD568"},type:{none:"\uC5C6\uC74C",default:"\uAE30\uBCF8",street:"\uAE38\uAC70\uB9AC",buzz:"\uC640\uAE00\uC640\uAE00",restaurant:"\uC2DD\uB2F9"}},listenTitle:"\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694.",listenButton:"\uBB38\uC7A5 \uB4E3\uAE30",playSound:"\uC18C\uB9AC \uB4E3\uAE30",playAll:"\uBAA8\uB450 \uB4E3\uAE30",selectInOrder:"\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.",stop:"\uC815\uC9C0",preview:"\uBBF8\uB9AC \uB4E3\uAE30",previewFor:"{{name}} \uBBF8\uB9AC \uB4E3\uAE30",stopFor:"{{name}} \uC815\uC9C0",next:"\uB2E4\uC74C",completed:"\uD6C8\uB828 \uC644\uB8CC",selected:"\uC120\uD0DD\uB428",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD",fontSizeMin:"\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.",fontSizeMax:"\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.",fontSizeDecrease:"\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C",fontSizeIncrease:"\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00",toggleBackground:"\uBC30\uACBD \uC804\uD658",cardInstructions:"\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694.",noCards:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",audioFetchError:"\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",ttsUnavailable:"\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",selectConfirm:"\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694.",orderListDefault:"\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694.",result:{pendingDone:"\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",eyebrow:"\uD6C8\uB828 \uC644\uB8CC",title:"\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.",scoreAria:"{{correct}} / {{total}} \uBB38\uD56D",elapsed:"\uC18C\uC694 \uC2DC\uAC04",tableAriaLabel:"\uBB38\uD56D\uBCC4 \uD310\uC815",colJudge:"\uD310\uC815",colAnswerSelected:"\uC815\uB2F5 \xB7 \uC120\uD0DD",colAnswer:"\uC815\uB2F5",colSelected:"\uC120\uD0DD",heardWell:"\uC798 \uB4E4\uC5C8\uC5B4\uC694",notHeard:"\uBABB \uB4E4\uC5C8\uC5B4\uC694",notJudged:"\uBBF8\uD310\uC815",replay:"\uB2E4\uC2DC\uD558\uAE30",replaySound:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30",replaySoundStop:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4",done:"\uC644\uB8CC",noContent:"(\uB0B4\uC6A9\uC5C6\uC74C)"},up:"\uC704\uB85C",down:"\uC544\uB798\uB85C",prev:"\uC774\uC804",listenLabel:"\uBB38\uC7A5 \uB4E3\uAE30",sourcePlay:"\uC18C\uC2A4 {{n}} \uC7AC\uC0DD",listen:"\uB4E3\uAE30",audioStatus:{synthesizing:"\uC18C\uB9AC\uB97C \uB9CC\uB4E4\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026",preparing:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"}},ub={totalCount:"\uBA85\uC758 \uACE0\uAC1D",loadError:"\uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",device:{title:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30",addButton:"\uAE30\uAE30 \uCD94\uAC00",historyEmpty:"\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",wearing:"\uCE21 \uCC29\uC6A9\uC911",notRegistered:"\uBBF8\uB4F1\uB85D",unit:"\uAC1C",wearingNow:"\uCC29\uC6A9",wear:"\uCC29\uC6A9",unwear:"\uCC29\uC6A9 \uD574\uC81C",wornSince:"{{date}}\uBD80\uD130",historyTitle:"\uCCAD\uAC01\uC7AC\uD65C\uAE30\uAE30 \uC774\uB825"},schedule:{registerTitle:" \uACE0\uAC1D\uB2D8 \uBC29\uBB38 \uC608\uC815 \uB4F1\uB85D"},visitHistory:{empty:"\uC544\uC9C1 \uBC29\uBB38 \uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",popupTitle:" \uACE0\uAC1D\uB2D8 \uBC29\uBB38 \uC774\uB825",registerTitle:" \uACE0\uAC1D\uB2D8 \uC2E0\uADDC \uBC29\uBB38 \uB4F1\uB85D"},moreItems:"\uB354 \uC788\uC74C",viewAll:"\uC804\uCCB4 \uBCF4\uAE30",duration:{minSec:"{{m}}\uBD84 {{s}}\uCD08",min:"{{m}}\uBD84",sec:"{{s}}\uCD08"}},cb={plan:{recommendedFor:"\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.",features:"\uD575\uC2EC \uAE30\uB2A5",freePrice:"\uBB34\uB8CC",contact:"\uBB38\uC758\uD558\uAE30",tierFallback:"\uC774\uC6A9\uAD8C",openPromo:"\uC624\uD508 \uD2B9\uAC00"},products:{mgrEnterprise:{tier:{price:"\uBB38\uC758"}}}},db={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},pb={showN:"{{n}}\uAC1C\uC529"},hb={title:"\uD6C8\uB828\uBCC4 \uB4E3\uAE30",subtitle:"\uC6D0\uD558\uB294 \uD6C8\uB828 \uC720\uD615\uC744 \uC120\uD0DD\uD558\uC138\uC694.",listenInNoise:{title:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",desc:"\uB2E4\uC591\uD55C \uC18C\uC74C \uD658\uACBD\uC5D0\uC11C \uBB38\uC7A5 \uCCAD\uB825\uC744 \uD6C8\uB828\uD569\uB2C8\uB2E4."},shortStory:{title:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",desc:"\uC9E7\uC740 \uC774\uC57C\uAE30\uB97C \uB4E3\uACE0 \uB0B4\uC6A9\uC744 \uC774\uD574\uD569\uB2C8\uB2E4."},longStory:{title:"\uAE34 \uC774\uC57C\uAE30 \uB4E3\uAE30",desc:"\uAE34 \uC774\uC57C\uAE30\uB97C \uC9D1\uC911\uD574\uC11C \uB4E3\uACE0 \uB0B4\uC6A9\uC744 \uD30C\uC545\uD569\uB2C8\uB2E4."},orderingSentence:{title:"\uBB38\uC7A5 \uC21C\uC11C\uD654",desc:"\uB4E4\uC740 \uBB38\uC7A5\uB4E4\uC744 \uC62C\uBC14\uB978 \uC21C\uC11C\uB85C \uBC30\uC5F4\uD569\uB2C8\uB2E4."},SAME_SOUND_PICK:{label:"\uAC19\uC740 \uC18C\uB9AC \uACE0\uB974\uAE30",sub:"\uB4E4\uC740 \uC18C\uB9AC\uC640 \uAC19\uC740 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},SAME_OR_DIFF:{label:"\uAC19\uC740\uC9C0 \uB2E4\uB978\uC9C0 \uB9DE\uD788\uAE30",sub:"\uB450 \uC18C\uB9AC\uAC00 \uAC19\uC740\uC9C0, \uB2E4\uB978\uC9C0 \uAD6C\uBD84\uD558\uC138\uC694."},HEAR_AND_PICK_SAME:{label:"\uC77C\uCE58\uD558\uB294 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",sub:"\uB4E4\uC740 \uC18C\uB9AC\uC758 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},HEAR_AND_PICK_INCLUDED:{label:"\uD55C \uC74C\uC808 \uD3EC\uD568 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",sub:"\uB4E4\uC740 \uC74C\uC808\uC774 \uD3EC\uD568\uB41C \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},STARTS_WITH_SAME_SOUND:{label:"\uCCAB \uC74C\uC808\uC774 \uAC19\uC740 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",sub:"\uB4E4\uC740 \uB2E8\uC5B4\uC640 \uAC19\uC740 \uC18C\uB9AC\uB85C \uC2DC\uC791\uD558\uB294 \uB2E8\uC5B4\uB97C \uACE0\uB974\uC138\uC694."},LISTEN_AND_REMEMBER_ORDER:{label:"\uB4E3\uACE0 \uC21C\uC11C\uB300\uB85C \uAE30\uC5B5\uD558\uAE30",sub:"\uC138 \uB2E8\uC5B4\uB97C \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694."},MERGE_2_SYLLABLES:{label:"\uC74C\uC808 2\uAC1C \uD569\uCE58\uAE30",sub:"\uB450 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},MERGE_3_SYLLABLES:{label:"\uC74C\uC808 3\uAC1C \uD569\uCE58\uAE30",sub:"\uC138 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},MERGE_2_PHONEMES:{label:"\uC74C\uC18C 2\uAC1C \uD569\uCE58\uAE30",sub:"\uB450 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},MERGE_3_PHONEMES:{label:"\uC74C\uC18C 3\uAC1C \uD569\uCE58\uAE30",sub:"\uC138 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},DROP_1_FROM_2SYLL:{label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uD0C8\uB77D",sub:"2\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},DROP_1_FROM_3SYLL:{label:"3\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uD0C8\uB77D",sub:"3\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},DROP_PART_FROM_COMPOUND:{label:"\uD569\uC131\uC5B4\uC5D0\uC11C \uBD80\uBD84 \uD0C8\uB77D",sub:"\uD569\uC131\uC5B4\uC758 \uC77C\uBD80\uB97C \uBE7C\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},DROP_FINAL_CONSONANT_FROM_1SYLL:{label:"1\uC74C\uC808\uC5D0\uC11C \uBC1B\uCE68 \uD0C8\uB77D",sub:"\uBC1B\uCE68\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},REMOVE_CONSONANT_AND_IDENTIFY_PHONEME:{label:"1\uC74C\uC808\uC5D0\uC11C \uC790\uC74C \uD0C8\uB77D",sub:"\uC790\uC74C\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB0A8\uC744\uAE4C\uC694?"},CHANGE_1_SYLL_IN_2SYLL:{label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",sub:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},CHANGE_1_SYLL_IN_3SYLL:{label:"3\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",sub:"3\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},CHANGE_1_PHONEME_IN_1SYLL:{label:"1\uC74C\uC808 \uB2E8\uC5B4 \uC911 1\uAC1C \uC74C\uC18C \uBC14\uAFB8\uAE30",sub:"1\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uC18C\uB9AC\uB97C \uB9CC\uB4DC\uC138\uC694."},CHANGE_1_PHONEME_IN_2SYLL:{label:"2\uC74C\uC808 \uB2E8\uC5B4 \uC911 1\uAC1C \uC74C\uC18C \uBC14\uAFB8\uAE30",sub:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."}},mb={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},Cb={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},fb={defaultName:"\uB2E8\uC5B4 \uD45C",title:"\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30",subtitle:"\uCE78\uC744 \uC124\uC815\uD558\uACE0 \uB2E8\uC5B4\uB97C \uCD94\uAC00\uD558\uC5EC \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4.",filterTitle:"\uD45C \uC124\uC815",filter:{composition:"\uAD6C\uC131",image:"\uC774\uBBF8\uC9C0",word:"\uB2E8\uC5B4",caption:"\uC720\uD615",standardPron:"\uD45C\uC900 \uBC1C\uC74C",colloquialPron:"\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C",paperOrientation:"\uC6A9\uC9C0 \uBC29\uD5A5",landscape:"\uAC00\uB85C",portrait:"\uC138\uB85C",columns:"\uCE78 \uC218",column:"{{count}}\uCE78",itemsPerPageWord:"\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218",itemsPerPagePair:"\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218",itemsPerPageOption:"{{count}}\uAC1C",pageIndicator:"{{current}} / {{total}}",pageNumber:"\uD398\uC774\uC9C0 \uBC88\uD638",pageNumberLeft:"\uC67C\uCABD",pageNumberCenter:"\uC911\uC559",pageNumberRight:"\uC624\uB978\uCABD",border:"\uC678\uACFD\uC120",topInfo:"\uC0C1\uB2E8 \uC815\uBCF4",bottomInfo:"\uD558\uB2E8 \uC815\uBCF4",cutLine:"\uC808\uCDE8\uC120",show:"\uD45C\uC2DC",hide:"\uBBF8\uD45C\uC2DC",dotted:"\uC810\uC120",corner:"\uCF54\uB108"},addWord:"\uCD94\uAC00\uD558\uAE30",copyItem:"\uD55C \uCE78 \uB354",copyItemAria:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354",wordInfo:"{{word}} \uB0B1\uB9D0 \uC815\uBCF4",emptyItems:"\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694.",load:"\uBD88\uB7EC\uC624\uAE30",openNewWindow:"\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30",saveButton:"\uC800\uC7A5\uD558\uAE30",saveAsNewButton:"\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5",print:"\uC778\uC1C4\uD558\uAE30",popupBlocked:"\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694.",printFileNameSingle:"\uB2E8\uC5B4\uD45C",printFileNamePair:"\uB300\uB9BD\uC30D\uD45C",save:{title:"\uB2E8\uC5B4\uD45C \uC800\uC7A5\uD558\uAE30",nameLabel:"\uC774\uB984",desc:"\uC800\uC7A5\uD560 \uB2E8\uC5B4 \uD45C\uC758 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.",placeholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694.",descriptionLabel:"\uC124\uBA85",descriptionPlaceholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694.",duplicateName:"\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4.",nameRequired:"\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694.",autoFillHint:" (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)",copyName:"{{name}} (\uBCF5\uC0AC)"},loadTable:{title:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C \uBD88\uB7EC\uC624\uAE30",empty:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",loadButton:"\uBD88\uB7EC\uC624\uAE30",itemCount:"{{count}}\uAC1C",deleteAriaLabel:"{{name}} \uC0AD\uC81C",viewLabel:"\uBCF4\uAE30 \uBC29\uC2DD",sortLabel:"\uC815\uB82C",sort:{newest:"\uCD5C\uC2E0\uC21C",oldest:"\uC624\uB798\uB41C\uC21C",name:"\uC774\uB984\uC21C",count:"\uB2E8\uC5B4 \uC218"},view:{grid:"\uD45C\uB85C \uBCF4\uAE30",list:"\uB9AC\uC2A4\uD2B8\uB85C \uBCF4\uAE30"}},publisherFilter:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30",groupDeleteMessage:"\uADF8\uB8F9 \uB0B4 \uB2E8\uC5B4\uD45C\uB294 '\uADF8\uB8F9 \uC5C6\uC74C'\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.",groupNamePlaceholder:"\uADF8\uB8F9 \uC774\uB984",scoring:{o:"{{word}} \uB9DE\uC74C",triangle:"{{word}} \uC560\uB9E4",x:"{{word}} \uD2C0\uB9BC",markName:{o:"\uB9DE\uC74C",triangle:"\uC560\uB9E4",x:"\uD2C0\uB9BC"},button:"\uCC44\uC810\uD558\uAE30",pickTitle:"\uB204\uAD6C\uB97C \uCC44\uC810\uD560\uAE4C\uC694?",pickSubtitle:"\u2018{{name}}\u2019 \uD45C\uB85C \uD6C8\uB828\uD55C \uACE0\uAC1D\uC744 \uACE0\uB974\uC138\uC694.",pickSearch:"\uC774\uB984 \uB610\uB294 \uC804\uD654\uBC88\uD638\uB85C \uCC3E\uAE30",pickEmpty:"\uB4F1\uB85D\uB41C \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickNoMatch:"\uCC3E\uB294 \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickAgain:"\uACE0\uAC1D \uB2E4\uC2DC \uACE0\uB974\uAE30",scoringFor:"{{name}} \uB2D8 \uCC44\uC810 \uC911",none:"\uCE78 \uC544\uB798 \u25CB \xB7 \u25B3 \xB7 \u2715 \uB97C \uB20C\uB7EC \uB9E4\uAE30\uC138\uC694. \uB9C8\uC6B0\uC2A4\uB85C\uB294 \uCE78\uC5D0 \uC190\uC744 \uC5B9\uC73C\uBA74, \uC790\uD310\uC73C\uB85C\uB294 \uCE78\uC5D0 \uCD08\uC810\uC774 \uAC00\uBA74 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.",tally:"{{marked}}\uCE78 \uCC44\uC810 \xB7 \u25CB {{o}} \xB7 \u25B3 {{triangle}} \xB7 \u2715 {{x}} \xB7 \uC815\uB2F5\uB960 {{rate}}%",save:"\uCC44\uC810 \uC800\uC7A5",saved:"{{name}} \uB2D8\uC758 \uCC44\uC810 {{count}}\uCE78\uC744 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4.",reviewTitle:"\uBCF5\uC2B5\uD45C\uB97C \uB9CC\uB4E4\uAE4C\uC694?",reviewMessage:"{{name}} \uB2D8\uC774 \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC73C\uB85C \uC0C8 \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4. \uB9DE\uD78C \uCE78\uC740 \uBE60\uC9D1\uB2C8\uB2E4.",reviewConfirm:"\uBCF5\uC2B5\uD45C \uB9CC\uB4E4\uAE30",reviewDescription:"\u2018{{name}}\u2019 \uCC44\uC810\uC5D0\uC11C \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC744 \uBAA8\uC740 \uD45C\uC785\uB2C8\uB2E4.",reviewCreated:"\u2018{{name}}\u2019\uC744(\uB97C) \uB9CC\uB4E4\uC5C8\uC2B5\uB2C8\uB2E4 \u2014 {{count}}\uCE78.",discardTitle:"\uB9E4\uAE34 \uCC44\uC810\uC744 \uBC84\uB9B4\uAE4C\uC694?",discardMessage:"{{count}}\uCE78\uC744 \uB9E4\uACBC\uC9C0\uB9CC \uC544\uC9C1 \uC800\uC7A5\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uB098\uAC00\uBA74 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",discardConfirm:"\uBC84\uB9AC\uACE0 \uB098\uAC00\uAE30"},info:{grade:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09",syllables:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808",pos:"\uD488\uC0AC: {{v}}",wordType:"\uC720\uD615: {{v}}"},pos:{noun:"\uBA85\uC0AC",verb:"\uB3D9\uC0AC",adjective:"\uD615\uC6A9\uC0AC",adverb:"\uBD80\uC0AC",numeral:"\uC218\uC0AC",determiner:"\uAD00\uD615\uC0AC",interjection:"\uAC10\uD0C4\uC0AC",particle:"\uC870\uC0AC",affix:"\uC811\uC0AC",dependentNoun:"\uC758\uC874\uBA85\uC0AC",pronoun:"\uB300\uBA85\uC0AC",auxVerb:"\uBCF4\uC870\uB3D9\uC0AC",auxAdjective:"\uBCF4\uC870\uD615\uC6A9\uC0AC"},reorder:{moved:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40",handle:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)",hint:"Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"},thumbMore:"+{{count}}"},bb={filterTitle:"\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815",filter:{positionAny:"\uBB34\uAD00",positionHead:"\uC5B4\uB450",positionMid:"\uC5B4\uC911",positionTail:"\uC5B4\uB9D0",difficulty:"\uB4F1\uAE09",grade:"{{n}}\uB4F1\uAE09",gradeNone:"\uC5C6\uC74C",syllables:"\uC74C\uC808 \uC218",syllable:"{{n}}\uC74C\uC808",syllable5plus:"5\uC74C\uC808 \uC774\uC0C1",partOfSpeech:"\uD488\uC0AC",pos:{noun:"\uCCB4\uC5B8(\uBA85\uC0AC, \uC218\uC0AC)",verb:"\uC6A9\uC5B8(\uB3D9\uC0AC, \uD615\uC6A9\uC0AC)",modifier:"\uC218\uC2DD\uC5B8(\uBD80\uC0AC, \uAD00\uD615\uC0AC)"},wordType:"\uC720\uD615",field:"\uC758\uBBF8\uBC94\uC8FC",type:{native:"\uACE0\uC720\uC5B4",sino:"\uD55C\uC790\uC5B4",foreign:"\uC678\uB798\uC5B4",mixed:"\uD63C\uC885\uC5B4"},exclude:"\uC81C\uC678",excludeNoImage:"\uC774\uBBF8\uC9C0 \uC5C6\uC74C"},searchButton:"\uAC80\uC0C9\uD558\uAE30",resultUnit:"\uB2E8\uC5B4",remaining:"{{count}}\uAC1C \uB0A8\uC74C",resultDisc:"\uC6D0\uD558\uB294 {{unit}} \uC120\uD0DD\uD558\uC138\uC694. {{max}}\uAC1C\uAE4C\uC9C0 \uC120\uD0DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. ({{selected}}/{{max}})",resultTitlePrefix:"\uCD1D ",resultTitleSuffix:"\uAC1C\uC758 {{unit}} \uAC80\uC0C9\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",emptyResult:"\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",groupCount:"{{count}}\uAC1C",sort:{aria:"\uC815\uB82C",match:"\uC2DC\uC791 \uC6B0\uC120",ganada:"\uAC00\uB098\uB2E4\uC21C \u2191",ganadaDesc:"\uAC00\uB098\uB2E4\uC21C \u2193",syllable:"\uC74C\uC808 \uC218 \u2191",syllableDesc:"\uC74C\uC808 \uC218 \u2193",grade:"\uB4F1\uAE09\uC21C \u2191",gradeDesc:"\uB4F1\uAE09\uC21C \u2193",original:"\uBC1B\uC740 \uC21C\uC11C"},pageSize:"{{count}}\uAC1C\uC529 \uBCF4\uAE30",pageSizeAria:"\uD398\uC774\uC9C0 \uD06C\uAE30"},gb={clearAllSelection:"\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C",divLine:"\uB300\uB9BD\uC120",removePair:"\uB300\uB9BD\uC30D \uBE7C\uAE30",removeWord:"\uB2E8\uC5B4 \uBE7C\uAE30"},yb={title:"\uC8FC\uC81C\uBCC4 \uB4E3\uAE30",subtitle:"\uC8FC\uC81C\uB97C \uC120\uD0DD\uD558\uACE0 \uB4E3\uAE30 \uD6C8\uB828\uC744 \uC2DC\uC791\uD558\uC138\uC694.",noiseTitle:"\uC18C\uC74C \uD558 \uBB38\uC7A5\uB4E3\uAE30",shortStoryTitle:"\uC9E7\uC740 \uC774\uC57C\uAE30 \uB4E3\uAE30",FOOD:"\uC74C\uC2DD",HLTH:"\uAC74\uAC15",WETH:"\uB0A0\uC528",PRSN:"\uC778\uBB3C",KRCT:"\uD55C\uAD6D\uBB38\uD654",STRY:"\uC774\uC57C\uAE30",LOCA:"\uC9C0\uC5ED",SOAR:"\uC0AC\uD68C\uC640 \uC608\uC220",NTSC:"\uC790\uC5F0\uACFC \uACFC\uD559",SPRT:"\uC2A4\uD3EC\uCE20",sub:{TRKRFD:"\uD55C\uAD6D \uC804\uD1B5\uC74C\uC2DD",MDKRFD:"\uD55C\uAD6D \uD604\uB300\uC74C\uC2DD",WRLDFD:"\uC138\uACC4\uC758 \uC74C\uC2DD",MTRFRT:"\uC2DD\uC7AC\uB8CC\uC640 \uACFC\uC77C",GEFDKL:"\uC74C\uC2DD \uC0C1\uC2DD",HTETHB:"\uAC74\uAC15\uD55C \uC2DD\uC2B5\uAD00",DISILL:"\uBCD1\uACFC \uC9C8\uD658",EXCISE:"\uC6B4\uB3D9",GEHTKL:"\uAC74\uAC15\uC0C1\uC2DD",GESSKL:"\uACC4\uC808\uC0C1\uC2DD",SNWRAN:"\uB208\uACFC \uBE44",WTHFCT:"\uC77C\uAE30\uC608\uBCF4",GEWTKL:"\uB0A0\uC528\uC0C1\uC2DD",JODYPS:"\uC870\uC120\uC2DC\uB300",MDKRPS:"\uD55C\uAD6D \uADFC\uD604\uB300",THKDPS:"\uC0BC\uAD6D\uC2DC\uB300",WRLART:"\uC138\uACC4\uC758 \uC608\uC220\uAC00",WRLPSN:"\uC138\uACC4\uC758 \uC778\uBB3C",KRLANG:"\uC6B0\uB9AC\uB9D0",TRPLCT:"\uC804\uD1B5\uB180\uC774",HERITG:"\uBB38\uD654\uC7AC",EVTFES:"\uD589\uC0AC\uC640 \uCD95\uC81C",GECTKL:"\uC0C1\uC2DD",FRYTAL:"\uB3D9\uD654",AMZING:"\uC2E0\uAE30\uD55C \uC774\uC57C\uAE30",DAYSTR:"\uC77C\uC0C1 \uC18D \uC774\uC57C\uAE30",KRLDMK:"\uD55C\uAD6D\uC758 \uBA85\uC18C",SELNMK:"\uC11C\uC6B8\uC758 \uBA85\uC18C",WRDTRB:"\uC138\uACC4\uC5EC\uD589",NAVIGT:"\uAE38 \uCC3E\uAE30",KRSOCI:"\uD55C\uAD6D",ECONEW:"\uACBD\uC81C\uC640 \uB274\uC2A4",GENART:"\uC608\uC220",GELFKL:"\uC0DD\uD65C \uC0C1\uC2DD",ANIMAL:"\uB3D9\uBB3C",PLANTS:"\uC2DD\uBB3C",ETHPLT:"\uC9C0\uAD6C",TOLELC:"\uB3C4\uAD6C\uC640 \uC804\uC790\uC81C\uD488",GESCKL:"\uACFC\uD559\uC0C1\uC2DD",INVDSP:"\uAC1C\uC778\uACBD\uAE30",MARART:"\uACA9\uD22C\uAE30",TEAMSP:"\uB2E8\uCCB4\uACBD\uAE30",FOOTBL:"\uCD95\uAD6C",GESPKL:"\uC2A4\uD3EC\uCE20 \uC0C1\uC2DD"}},vb={direction:{left:"\uC88C",right:"\uC6B0",label:"\uBC29\uD5A5"},wornDate:"\uCC29\uC6A9\uC77C",deviceType:"\uC885\uB958",brand:"\uBE0C\uB79C\uB4DC",fitType:"\uCC29\uC6A9\uD615\uD0DC",productName:"\uC81C\uD488\uBA85",addNew:"\uC0C8 \uAE30\uAE30 \uCD94\uAC00",selectFromList:"\uBAA9\uB85D\uC5D0\uC11C \uC120\uD0DD",removeDevice:"\uCC29\uC6A9 \uD574\uC81C",type:{hearingAid:"\uBCF4\uCCAD\uAE30",cochlearImplant:"\uC778\uACF5\uC640\uC6B0",other:"\uAE30\uD0C0"}},_b={stat:{totalCustomers:"\uCD1D \uACE0\uAC1D",monthlyVisits:"\uC774\uB2EC \uCD1D \uBC29\uBB38"},chart:{visitDetail:"\uC0C1\uC138 \uBC29\uBB38 \uD604\uD669",trainingDetail:"\uC0C1\uC138 \uD6C8\uB828 \uD604\uD669",weekly:"\uC8FC\uBCC4",periodMonth:"\uC6D4",periodWeek:"\uC8FC",weeklyPrefix:"\uC8FC\uAC04",monthlyPrefix:"\uC6D4\uAC04",visit:"\uBC29\uBB38",reservation:"\uC608\uC57D",trainingDone:"\uD6C8\uB828 \uC644\uB8CC",trainingInProgress:"\uD6C8\uB828 \uC911",weekRange:"{{start}}~{{end}}",week:"{{n}}\uC8FC"}},xb={phonemeSelect:{vs:"\uB300"},caution:"\uC720\uC758\uC0AC\uD56D",mode:{include:"\uC74C\uC18C \uD3EC\uD568",pick:"\uC74C\uC18C \uB300\uB9BD",contrast:"\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815",infoTitle:"\uB300\uB9BD \uBC29\uC2DD",infoInclude:"\uC74C\uC18C \uD3EC\uD568 \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uBAA8\uB450 \uB4E4\uC5B4\uAC04 \uB2E8\uC5B4\uC640 \uADF8 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694.",infoPick:"\uC74C\uC18C \uB300\uB9BD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uB300\uB9BD\uC30D \uB450 \uB2E8\uC5B4\uC758 \uC2E4\uC81C \uCC28\uC774\uC810\uC77C \uB54C\uB9CC \uB9E4\uCE6D\uB3FC\uC694.",infoContrast:"\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815 \u2014 \uAE30\uC900 \uB2E8\uC5B4\uC640 \uB300\uB9BD \uB2E8\uC5B4\uC758 \uC74C\uC18C\uB97C \uAC01\uAC01 \uC9C1\uC811 \uC120\uD0DD\uD574 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694."},count:"{{n}}\uAC1C",countLabel:"\uC74C\uC18C \uAC1C\uC218",input:{char:"\uAE00\uC790 \uC120\uD0DD",pron:"\uBC1C\uC74C \uC120\uD0DD",infoTitle:"\uC785\uB825 \uBC29\uC2DD",infoChar:"\uAE00\uC790 \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uB2E8\uC5B4(\uAE00\uC790 \uAE30\uC900)\uB97C \uCC3E\uC740 \uD6C4, \uB2E8\uC5B4\uC758 \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4.",infoPron:"\uBC1C\uC74C \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4."},phonemeN:"{{n}}\uBC88 \uC74C\uC808",phonemeSingleLabel:"\uC74C\uC808",phonemeContrastSingleLabel:"\uB300\uB9BD \uC74C\uC808",ordinals:["\uCCAB\uBC88\uC9F8","\uB450\uBC88\uC9F8","\uC138\uBC88\uC9F8","\uB124\uBC88\uC9F8"],phonemeOrdinalLabel:"{{ordinal}} \uC74C\uC808",phonemeContrastOrdinalLabel:"\uB300\uB9BD {{ordinal}} \uC74C\uC808",composition:"\uC815\uB2F5 \uB2E8\uC5B4 \uAD6C\uC131",syllableCount:"\uC74C\uC808 \uC218",syllableN:"{{n}}\uC74C\uC808",syllableNPlus:"{{n}}\uC74C\uC808 \uC774\uC0C1",onset:"\uCD08\uC131",vowel:"\uBAA8\uC74C",coda:"\uC885\uC131",filter:{searchOptionsTitle:"\uB300\uB9BD \uC124\uC815",searchModeLabel:"\uB300\uB9BD \uBC29\uC2DD",countLabel:"\uC785\uB825 \uC74C\uC808 \uAC2F\uC218",inputModeLabel:"\uC785\uB825 \uBC29\uC2DD",phonemeOrder:"\uC785\uB825 \uC74C\uC808 \uC704\uCE58",phonemeOrderInfo:["\uC77C\uCE58: \uB300\uB9BD\uC30D\uC774 \uC815\uD655\uD788 \uAC19\uC740 \uC704\uCE58(\uC74C\uC808)\uC5D0\uC11C\uB9CC \uCC28\uC774 \uB098\uC57C \uB9E4\uCE6D\uB3FC\uC694.","\uBB34\uAD00: \uCC28\uC774 \uB098\uB294 \uC704\uCE58\uB294 \uC0C1\uAD00\uC5C6\uC774 \uB9E4\uCE6D\uB3FC\uC694."],orderAny:"\uBB34\uAD00",orderMatch:"\uC77C\uCE58",difficultyInfo:["1\uB4F1\uAE09 : \uD559\uB839\uC804\uAE30\uC5D0 \uC2B5\uB4DD\uD558\uC5EC \uD3C9\uC0DD\uC5D0 \uAC78\uCCD0 \uC77C\uC0C1 \uC5B8\uC5B4\uC0DD\uD65C\uC744 \uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uB294 \uC5B4\uD718","2\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 1-2\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","3\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 3-4\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","4\uB4F1\uAE09 : \uCD08\uB4F1\uD559\uAD50 5-6\uD559\uB144 \uB09C\uC774\uB3C4 \uC5B4\uD718","\uB4F1\uAE09\uC5C6\uC74C : \uAD6D\uB9BD\uAD6D\uC5B4\uC6D0 \uD45C\uC900 \uC5B4\uD718 \uC678 \uACE0\uBE48\uB3C4 \uC0DD\uD65C \uC5B4\uD718, \uC2E0\uC870\uC5B4 \uBC0F \uC678\uB798\uC5B4"],selectLabel:"\uC120\uD0DD",onlyHasImage:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC",onlySameStructure:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"},confirmMessage:"\uC120\uD0DD\uD55C {{unit}} {{count}}\uAC1C\uB97C \uD3EC\uD568\uD55C \uB2E8\uC5B4 \uD45C \uC815\uBCF4\uAC00 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",resetOptions:"\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654",phonemeContrast:"\uB300\uB9BD {{n}}\uBC88 \uC74C\uC808",infoNotes:["\uBBF8\uB9AC\uBCF4\uAE30 \uAE00\uC790\uB294 \uC120\uD0DD\uD55C \uC74C\uC18C\uC758 \uC870\uD569 \uC608\uC2DC\uC785\uB2C8\uB2E4. \uC2E4\uC81C \uAC80\uC0C9\uC740 \uD574\uB2F9 \uC74C\uC18C\uAC00 \uD3EC\uD568\uB41C \uBAA8\uB4E0 \uB2E8\uC5B4\uB97C \uB300\uC0C1\uC73C\uB85C \uD569\uB2C8\uB2E4.","\uCD08\uC131 '\u3147'\uC740 \uC120\uD0DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E8\uC5B4 \uC55E\uC5D0 \uC624\uB294 \u3147\uC740 \uC2E4\uC9C8\uC801\uC73C\uB85C \uBB34\uC74C\uC774\uC5B4\uC11C \uB300\uB9BD\uC30D \uC131\uB9BD\uC5D0 \uC601\uD5A5\uC744 \uC8FC\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uCD08\uC131\uACFC \uC885\uC131\uB9CC \uC120\uD0DD\uD558\uBA74 \uBAA8\uC74C\uC740 '\u314F'\uB85C \uC790\uB3D9 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC74C\uC18C \uAC1C\uC218\uB97C \uB298\uB9AC\uBA74 \uAC01 \uC74C\uC18C \uC0AC\uC774\uC758 \uB300\uB9BD\uC30D\uC744 \uAC80\uC0C9\uD569\uB2C8\uB2E4."]},wb={lead:`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
|
|
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"},Bb={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},kb={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"},Ab={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"},Nb={ariaLabel:"\uC120\uD0DD \uD0ED"},Eb={ariaLabel:"\uD0ED"},Db={dragPrompt:"\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC",browseButton:"\uD30C\uC77C \uC120\uD0DD",removeAriaLabel:"{{name}} \uC81C\uAC70"},Sb={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},jb={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"}},Tb={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"},Mb={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"}},Lb={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},$b={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"},Rb={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"},Pb={viewWords:"\uB0B1\uB9D0"},Ib={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},Fb={chooseDate:"\uB0A0\uC9DC \uC120\uD0DD",selectYear:"\uC5F0 \uC120\uD0DD",selectMonth:"\uC6D4 \uC120\uD0DD"},Ob={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},zb={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},Wb={place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},Hb={clearSelection:"\uC120\uD0DD \uD574\uC81C"},Vb={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},qb={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},Ub={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},Gb={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},Kb={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},Yb={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},Zb={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"},Xb={common:Zf,calendar:Xf,passCard:Jf,rating:Qf,colorPicker:eb,dropdown:tb,accordion:nb,header:ab,nav:rb,settings:ob,usage:sb,account:lb,training:ib,customers:ub,payment:cb,coupons:db,visits:pb,trainingType:hb,myWordTable:mb,keyWords:Cb,wordTable:fb,wordSearch:bb,wordPrint:gb,topic:yb,device:vb,manager:_b,wordPairs:xb,footer:wb,date:Bb,wordData:kb,textField:Ab,segmentedControl:Nb,tabs:Eb,fileUpload:Db,avatar:Sb,myHomework:jb,trainingStatus:Tb,store:Mb,progress:Lb,trainingMiss:$b,table:Rb,wordScore:Pb,topBanner:Ib,datePicker:Fb,report:Ob,tooltip:zb,phonemeProfile:Wb,bulkBar:Hb,debug:Vb,badge:qb,loader:Ub,soundCompass:Gb,breadcrumb:Kb,board:Yb,promoBannerBg:Zb},Jb={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",loading:"Loading",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."},Qb={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"]},eg={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"}},tg={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},ng={selected:"selected"},ag={placeholder:"Select"},rg={collapse:"Collapse",expand:"Expand"},og={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},sg={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"},lg={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"}}}},ig={couponButton:"Enter Coupon"},ug={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."}}},cg={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"}},dg={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"}},pg={plan:{recommendedFor:"Recommended for",features:"Key Features",freePrice:"Free",contact:"Contact Us",tierFallback:"Plan",openPromo:"Launch offer"},products:{mgrEnterprise:{tier:{price:"Contact us"}}}},hg={input:{label:"Coupon code",placeholder:"Enter coupon code"},applyButton:"Apply"},mg={showN:"Show {{n}}"},Cg={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."}},fg={newBadge:"Newly created",publishedBadge:"Published",sharedBadge:"Shared"},bg={title:"Key Words",empty:"No key words available."},gg={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",caption:"Form",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",copyItem:"Duplicate",copyItemAria:"Duplicate the word in cell {{n}}",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"},thumbMore:"+{{count}}"},yg={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"},vg={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removeWord:"Remove word"},_g={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"}},xg={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"}},wg={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}}"}},Bg={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."]},kg={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"},Ag={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},Ng={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"},Eg={clearAriaLabel:"Clear input"},Dg={ariaLabel:"Select tab"},Sg={ariaLabel:"Tabs"},jg={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},Tg={ariaLabel:"User avatar"},Mg={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},Lg={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"},$g={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"}},Rg={steps:"Step {{current}} of {{total}}"},Pg={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"},Ig={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},Fg={viewWords:"Words"},Og={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},zg={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},Wg={previewRegion:"Report preview \u2014 scrollable sideways"},Hg={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},Vg={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},qg={clearSelection:"Clear selection"},Ug={showResult:"Show {{type}} result"},Gg={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},Kg={loading:"Loading"},Yg={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},Zg={ariaLabel:"Breadcrumb"},Xg={empty:"No items yet."},Jg={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"},Qg={common:Jb,calendar:Qb,passCard:eg,rating:tg,colorPicker:ng,dropdown:ag,accordion:rg,header:og,nav:sg,settings:lg,usage:ig,account:ug,training:cg,customers:dg,payment:pg,coupons:hg,visits:mg,trainingType:Cg,myWordTable:fg,keyWords:bg,wordTable:gg,wordSearch:yg,wordPrint:vg,topic:_g,device:xg,manager:wg,wordPairs:Bg,footer:kg,date:Ag,wordData:Ng,textField:Eg,segmentedControl:Dg,tabs:Sg,fileUpload:jg,avatar:Tg,myHomework:Mg,trainingStatus:Lg,store:$g,progress:Rg,trainingMiss:Pg,table:Ig,wordScore:Fg,topBanner:Og,datePicker:zg,report:Wg,tooltip:Hg,phonemeProfile:Vg,bulkBar:qg,debug:Ug,badge:Gg,loader:Kg,soundCompass:Yg,breadcrumb:Zg,board:Xg,promoBannerBg:Jg};const ey="0.387.0",ty=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],ho="ko",ny="ihab_display_language";function Zl(){if(typeof window>"u")return ho;try{const e=localStorage.getItem(ny);if(e&&ty.some(t=>t.code===e))return e}catch{}return ho}function Xl(e){try{document.documentElement.lang=e}catch{}}Vt.on("languageChanged",Xl),Xl(Zl()),Vt.use(_e.initReactI18next).init({resources:{ko:{translation:Xb},en:{translation:Qg}},lng:Zl(),fallbackLng:ho,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const ay=new Map;try{Vt.store?.on?.("added",()=>ay.clear())}catch{}let ur=null,Jl=null,Ql=null;function ry(){const e=Fl();if(e&&e.entries.length>0){const t=ff();if(ur&&Jl===e&&Ql===t)return ur;const a=new Set,r=[];for(const s of e.entries)!s.word||a.has(s.word)||(a.add(s.word),r.push({w:s.word,s:s.syllables,p:t?.[s.word]?[...t[s.word].cho??[],...t[s.word].jung??[],...t[s.word].jong??[]]:[],pron:s.pronunciation||s.word,grade:s.grade}));return ur=r,Jl=e,Ql=t,ur}return[]}new Proxy([],{get(e,t){const a=ry(),r=a[t];return typeof r=="function"?r.bind(a):r}});function oy(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 sy(e){if(typeof window>"u")return"";const t=(a,r)=>{typeof r.attrValue=="string"&&oy(r.attrValue)&&(r.keepAttr=!1)};la.addHook("uponSanitizeAttribute",t);try{return la.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{la.removeHook("uponSanitizeAttribute",t)}}function ly(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),[l,i]=o.useState(null),[u,c]=o.useState(null),[d,h]=o.useState(null);return o.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){a(null),s(null),i(null),c(null);return}const p=e.split("/").pop();let m=e;p&&(e.startsWith("/")?m=Jr(e):/^(Logo|Symbol)/i.test(p)?m=Jr(`logo/${p}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),m=e)),i(null),c(null),a(e),s(m)},[e]),o.useEffect(()=>{if(!r)return;let p=!1;async function m(){try{let g=await fetch(r);g.ok||(g=await fetch(r));const y=g.headers.get("content-type")||"";if(p)return;if(y.includes("svg")){i("mask");return}if(y.startsWith("image/")){i("img");return}const C=await fetch(r);if(!C.ok)throw new Error("not ok");const b=await C.text();if(p)return;if(/^\s*<svg[\s>]/i.test(b)){const v=sy(b);if(!v){i("none");return}c(v),i("inline");return}i("none")}catch{p||i("none")}}return m(),()=>{p=!0}},[r]),o.useEffect(()=>{let p=!1,m=null;return l==="mask"&&r&&fetch(r).then(g=>{if(!g.ok)throw new Error("fetch failed");return g.blob()}).then(g=>{p||(m=URL.createObjectURL(g),h(m))}).catch(()=>{p||i("img")}),()=>{p=!0,m&&URL.revokeObjectURL(m),h(null)}},[l,r]),t===e?{iconToUse:r,mode:l,svgText:u,blobUrl:d}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function nt(e){const{icon:t,label:a,className:r,imgClassName:s,maskClassName:l,svgClassName:i,wrapperStyle:u,size:c}=e||{},d=r??"iconRenderer-icon",h=s??"iconRenderer-icon-image",p=l??"iconRenderer-icon-mask",m=i??"iconRenderer-icon-svg",g=typeof t=="string"?t:null,y=YC(g),{iconToUse:C,mode:b,svgText:v,blobUrl:f}=ly(g),B=(w,D={})=>n.jsx("span",{className:d,style:u,...D,children:w}),_=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,N=(w,D={})=>n.jsx("img",{src:w,alt:typeof a=="string"?a:typeof a=="number"?String(a):"",className:h,...D,style:_?{...D.style,..._}:D.style});if(!t)return null;if(typeof t!="string")return B(t);if(t==="none")return B(n.jsx("span",{className:m,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(y)try{return B(o.createElement(y,{className:m,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(C&&C.endsWith(".svg")){if(b==="mask"){const w={"--icon-url":f?`url(${f})`:`url(${C})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return B(n.jsx("span",{className:p,style:w}),{"aria-hidden":"true"})}return b==="img"?B(N(C,{onError:w=>{w.currentTarget.onerror=null,w.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):b==="inline"?B(n.jsx("span",{className:m,dangerouslySetInnerHTML:v?{__html:v}:void 0}),{"aria-hidden":"true"}):B(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return N(Jr(t),{style:u,onError:w=>{w.currentTarget.onerror=null,w.currentTarget.style.display="none"}});const x=typeof c=="number"?c:20,E=`<svg width="${x}" height="${x}" 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 B(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:E}}),{"aria-hidden":"true"})}function ei(e){const[t,a]=o.useState(!1),r=o.useRef(!1),s=o.useRef(!0);o.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]);const l=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,s.current&&a(!1)};i.then(u,u)}},[e]);return{pending:t,press:l}}function iy({icon:e,title:t,message:a,action:r,className:s}){const{pending:l,press:i}=ei(r?.onClick);return n.jsxs("div",{className:we("empty-state",s),children:[e&&n.jsx(nt,{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:l,"aria-busy":l||void 0,children:[r.icon&&n.jsx(nt,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function uy({message:e,hint:t,icon:a="triangle-alert",onRetry:r,retryLabel:s,className:l}){const{t:i}=_e.useTranslation(),{pending:u,press:c}=ei(r);return n.jsxs("div",{className:we("empty-state","error-state",l),role:"alert",children:[n.jsx(nt,{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(nt,{icon:"rotate-cw",className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:s??i("common.errorState.retry",{defaultValue:"\uB2E4\uC2DC \uC2DC\uB3C4"})})]})]})}function cy({icon:e,title:t,description:a,cta:r,tone:s="main",disabled:l=!1,onClick:i,className:u=""}){const c=o.useId(),d=`${c}-title`,h=`${c}-desc`,p=`${c}-cta`,m=()=>{l||i?.()};return n.jsx("section",{role:"button",tabIndex:l?-1:0,"aria-disabled":l||void 0,"aria-labelledby":d,"aria-describedby":`${h} ${p}`,onClick:m,onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),m())},className:we("action-card",`action-card--${s}`,l&&"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(nt,{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:h,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(nt,{icon:"arrow-right",size:18})})]})]})})}function dy({as:e="div",className:t="",children:a,storage:r,...s}){r&&R1({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 l=we("ihabdevteam-core-scope",t);return n.jsx(e,{className:l,...s,children:a})}function py(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 mo(e,t=!0){o.useEffect(()=>{if(!t)return;const a=e.current;if(!a)return;const r=s=>{if(s.key!=="Tab")return;const l=Array.from(a.querySelectorAll(Bn)).filter(py);if(!l.length){s.preventDefault();return}const i=l[0],u=l[l.length-1],c=document.activeElement,d=c===a;s.shiftKey&&(c===i||d)?(s.preventDefault(),u.focus()):!s.shiftKey&&c===u&&(s.preventDefault(),i.focus())};return a.addEventListener("keydown",r),()=>a.removeEventListener("keydown",r)},[e,t])}const Bn='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 bo(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 ti(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 cr(e,t,a){const r=e?.isConnected?e:a?.isConnected?a:null;if(ti(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!r)return null;const s=Array.from(document.querySelectorAll(Bn)).filter(c=>!(e&&e.contains(c))&&ti(c));let l=null,i=null;for(const c of s)r.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_PRECEDING?l=c:i||(i=c);const u=l??i;return u?.focus(),u}function hy({title:e="",lines:t=[],notices:a=null,children:r,variant:s="default",dismissible:l=!1,className:i=""}){const{t:u}=_e.useTranslation(),[c,d]=o.useState(!1),h=o.useRef(null),p=o.useCallback(()=>{const C=h.current;C&&C.contains(document.activeElement)&&cr(C),d(!0)},[]);if(c)return null;const m=`notice-box notice-box--${s} body-2 ${i}`.trim(),g=l&&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:m,role:"note",children:[a.map((C,b)=>n.jsxs("div",{className:"notice-box__inner",children:[C.title?n.jsx("span",{className:"notice-box__title body-3",children:C.title}):null,n.jsx("div",{className:"notice-box__body",children:C.lines&&C.lines.length?n.jsx("div",{children:C.lines.map((v,f)=>n.jsx("span",{className:"notice-box__line body-3",children:v},f))}):C.children??null})]},b)),g]});const y=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((C,b)=>n.jsx("li",{className:"notice-box__line",children:C},b))}):r})]}):n.jsx("div",{className:"notice-box__inner",children:r});return n.jsxs("div",{ref:h,className:m,role:"note",children:[y,g]})}const my={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function da(e){const{t}=_e.useTranslation(),{variant:a="spinner",size:r=24,progress:s=null,label:l}=e||{},i=l||t("loader.loading","Loading");if(a==="bar"){const c=s==null||!Number.isFinite(Number(s)),d=c?0:Math.max(0,Math.min(100,Number(s)));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:my,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"})]})]})}const pa=[];let dr=!1;function ni(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=pa[pa.length-1];t&&(e.stopPropagation(),t())}function Kn(e){return pa.push(e),!dr&&typeof document<"u"&&(document.addEventListener("keydown",ni),dr=!0),()=>{const t=pa.lastIndexOf(e);t>=0&&pa.splice(t,1),pa.length===0&&dr&&typeof document<"u"&&(document.removeEventListener("keydown",ni),dr=!1)}}const ai=o.createContext(null);function Cy(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const ri=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function fy(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 Ls.useSyncExternalStore(t,()=>ri(e),()=>!1)}function by(e){const[t,a]=o.useState(ri(e));return o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const r=window.matchMedia(e),s=i=>a(i.matches),l=r;return l.addEventListener?l.addEventListener("change",s):l.addListener&&l.addListener(s),a(r.matches),()=>{l.removeEventListener?l.removeEventListener("change",s):l.removeListener&&l.removeListener(s)}},[e]),t}const gy=typeof Ls.useSyncExternalStore=="function"?fy:by;function fn(e){const t=o.useContext(ai),a=gy(e);return t&&typeof t.mobile=="boolean"&&Cy(e)?t.mobile:a}const yy="(prefers-reduced-motion: reduce)";function go(){return fn(yy)}const oi={"menu-tooltip":"tooltip-menu","description-tooltip":"tooltip-description","text-box-tooltip":"tooltip-textbox","training-tooltip":"tooltip-training","word-image-tooltip":"tooltip-word-image","info-tooltip":"tooltip-info","noise-settings-tooltip":"noise-settings",tooltip__header:"tooltip-content__header",tooltip__content:"tooltip-content",tooltip__backdrop:"tooltip-backdrop",tooltip__portal:"tooltip-portal","word-table__section":"word-table-block","word-table__content":"word-table-block__content","word-table__card":"word-table-block__card","word-table__card-handle":"word-table-block__card-handle","word-table__card-close":"word-table-block__card-close","word-table__card-actions":"word-table-block__card-actions","word-table__edit-cell":"word-table-block__edit-cell","word-table__pair-divider":"word-table-block__pair-divider","chart-section__legend-dot":"manager-bar-chart-legend-dot","chart-section__legend-item":"manager-bar-chart-legend-item","chart-section__legend":"manager-bar-chart-legend","chart-section__controls":"manager-section-controls","chart-section__sub-row":"barchart-sub-row","chart-section__total":"barchart-total","chart-section":"manager-section","bar-chart__stack-segment":"manager-bar-chart-stack-segment","bar-chart__detail-btn":"manager-bar-chart-detail-btn","bar-chart__gridline":"manager-bar-chart-gridline","bar-chart__loading":"manager-bar-chart-loading","bar-chart__scroll":"manager-bar-chart-scroll","bar-chart__stack":"manager-bar-chart-stack","bar-chart__x-axis":"manager-bar-chart-x-axis","bar-chart__inner":"manager-bar-chart-inner","bar-chart__area":"manager-bar-chart-area","bar-chart__plot":"manager-bar-chart-plot","bar-chart__wrap":"manager-bar-chart-wrap","bar-chart__slot":"manager-bar-chart-slot","bar-chart__col":"manager-bar-chart-col","bar-chart__bar":"manager-bar-chart-bar","stat-chart__card":"manager-stat-card"};function vy(e,t){const a=Object.keys(e).sort((r,s)=>s.length-r.length);for(const r of a){if(!t.startsWith(r))continue;const s=t.slice(r.length);if(!(s!==""&&!s.startsWith("__")&&!s.startsWith("--")))return e[r]+s}return null}function _y(e){return vy(oi,e)}function le(e){if(!e||Object.keys(oi).length===0)return e;const t=[];for(const a of e.split(/\s+/)){if(!a)continue;const r=_y(a);r&&t.push(r)}return t.length?`${e} ${t.join(" ")}`:e}function yn(e){const{anchorRect:t,anchorEl:a,offset:r=20,edgeMargin:s=20,onClose:l,closeOnOutsideClick:i=!0,className:u="",role:c="dialog",ariaLabel:d="",children:h,backdrop:p=!1,isMobilePopup:m=!1,useBorder:g=!0,header:y,focusOnOpen:C}=e||{},b=o.useRef(null),[v,f]=o.useState({position:"fixed",left:0,top:-9999}),[B,_]=o.useState(!1),[N,x]=o.useState("bottom"),[E,w]=o.useState(!1),[D,k]=o.useState(!1),A=!t&&!a,R=o.useRef(null),$=o.useCallback((M=!1,q=!1)=>{if(D&&m)return;const Y=a?a.getBoundingClientRect():t,U=q&&R.current?R.current:Y;if(!U||!b.current)return;const S=b.current,{offsetWidth:I,offsetHeight:O}=S,z=window.innerWidth,se=window.innerHeight,te=z-U.right,de=U.left,ee=U.top,V=se-U.bottom;let ne=0,W=0,H="top";if(ee>=O+r)H="top",W=U.top-r-O,ne=U.left+U.width/2-I/2;else if(V>=O+r)H="bottom",W=U.bottom+r,ne=U.left+U.width/2-I/2;else if(te>=I+r)H="right",ne=U.right+r,W=U.top+U.height/2-O/2;else if(de>=I+r)H="left",ne=U.left-r-I,W=U.top+U.height/2-O/2;else{const he=Math.max(ee,V,te,de);he===ee?(H="top",W=U.top-r-O,ne=U.left+U.width/2-I/2):he===V?(H="bottom",W=U.bottom+r,ne=U.left+U.width/2-I/2):he===te?(H="right",ne=U.right+r,W=U.top+U.height/2-O/2):(H="left",ne=U.left-r-I,W=U.top+U.height/2-O/2)}const ie=Number.isFinite(Number(s))?Number(s):8;ne=Math.min(Math.max(ne,ie),z-I-ie),W=Math.min(Math.max(W,ie),se-O-ie);const Te=Math.round(ne),ye=Math.round(W);M&&b.current?(b.current.style.left=`${Te}px`,b.current.style.top=`${ye}px`,b.current.dataset.placement=H):(x(H||N),f({position:"fixed",left:Te,top:ye}),w(!0))},[D,m,a,t,r,s,N]);o.useEffect(()=>()=>{R.current=null},[a,t]),o.useLayoutEffect(()=>{if(A)return;if(D&&m){f({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),w(!0);return}R.current===null&&(R.current=a?a.getBoundingClientRect():t??null),$(!1,!0);const M=requestAnimationFrame(()=>$(!1,!0));return()=>cancelAnimationFrame(M)},[t,a,r,h,s,A,D,m,$]),o.useEffect(()=>{if(A||D&&m||!b.current||typeof ResizeObserver>"u")return;const M=new ResizeObserver(()=>{t&&$()});return M.observe(b.current),()=>M.disconnect()},[t,h,s,A,D,m,$]),o.useEffect(()=>{if(A||D&&m)return;let M=null;const q=()=>{if(a&&(R.current=a.getBoundingClientRect()),typeof requestAnimationFrame>"u"){$(!0);return}M===null&&(M=requestAnimationFrame(()=>{M=null,$(!0)}))},Y=U=>{if(!a&&l){const S=U.target;if(S&&b.current&&b.current.contains(S))return;try{if(S&&S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}Q.current(!0);return}q()};return window.addEventListener("resize",q),document.addEventListener("scroll",Y,{passive:!0,capture:!0}),()=>{M!==null&&cancelAnimationFrame(M),window.removeEventListener("resize",q),document.removeEventListener("scroll",Y,{capture:!0})}},[t,a,l,r,h,s,A,D,m,$]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const M=window.matchMedia("(max-width: 768px)"),q=()=>k(!!M.matches);q();try{M.addEventListener?M.addEventListener("change",q):M.addListener(q)}catch{try{M.addListener(q)}catch{}}return()=>{try{M.removeEventListener?M.removeEventListener("change",q):M.removeListener(q)}catch{}}},[]);const G=o.useRef(!1),T=o.useRef(null),P=go(),L=o.useCallback((M=!1)=>{if(l&&!(B||G.current)){if(G.current=!0,M){_(!0);try{l&&l()}catch{G.current=!1,_(!1)}return}_(!0),T.current=setTimeout(()=>{T.current=null;try{l&&l()}catch{G.current=!1,_(!1)}},P?0:200)}},[B,l,_,P]);o.useEffect(()=>()=>{T.current&&clearTimeout(T.current)},[]),o.useEffect(()=>{if(A)return;const M=U=>{const S=b.current;if(!S)return;const I=U.target;if(I&&!S.contains(I)){try{if(I.closest&&I.closest("[data-tooltip-ignore]"))return}catch{}i&&L(!0)}},q=U=>{const S=b.current;if(!S)return;const I=U.target;if(I&&!S.contains(I)){try{if(I.closest&&I.closest("[data-tooltip-ignore]"))return}catch{}i&&L(!0)}},Y=U=>{if(U.key==="Tab"){const S=b.current;if(!S)return;const I=S.querySelectorAll(Bn);if(!I||I.length===0)return;const O=I[0],z=I[I.length-1],se=document.activeElement;U.shiftKey?se===O&&(U.preventDefault(),z.focus()):se===z&&(U.preventDefault(),O.focus())}};return document.addEventListener("pointerdown",M,!0),document.addEventListener("click",q,!0),document.addEventListener("keydown",Y),()=>{document.removeEventListener("pointerdown",M,!0),document.removeEventListener("click",q,!0),document.removeEventListener("keydown",Y)}},[l,i,L,A]);const Q=o.useRef(L);o.useEffect(()=>{Q.current=L});const Z=!!l;o.useEffect(()=>{if(!(A||!Z))return Kn(()=>Q.current())},[A,Z]),o.useEffect(()=>{const M=()=>{L(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",M),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",M)}},[L]);const F=o.useRef(null);o.useEffect(()=>{if(A||C===!1||!E)return;const M=b.current;if(!M)return;const q=M.querySelector(Bn);if(q)return F.current=document.activeElement,q.focus({preventScroll:!0}),()=>{const Y=F.current;F.current=null,Y&&document.contains(Y)&&Y.focus({preventScroll:!0})}},[A,C,E]),o.useEffect(()=>{c==="dialog"&&!d&&Nt("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 K=n.jsxs("div",{ref:b,className:le(`tooltip__content ${A?"tooltip__content--inline":""} ${g?"tooltip__content--bordered":""} ${B?"is-closing":""} ${u} ${D&&m?"is-mobile":""}`),role:c,"aria-label":d||void 0,style:A?{}:{...v,visibility:E?"visible":"hidden"},tabIndex:-1,"data-placement":N,"data-left":A?"":v.left,"data-top":A?"":v.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:[y!=null&&n.jsx("div",{className:le("tooltip__header h5"),children:y}),h]});if(A||typeof document>"u")return K;if(p||D&&m){const M=n.jsxs("div",{className:le("tooltip__portal"),children:[n.jsx("div",{className:le("tooltip__backdrop"),onClick:()=>{i&&L(!0)}}),K]});return un.createPortal(M,document.body)}return un.createPortal(K,document.body)}function Dn(e){const{anchorRect:t,text:a,offset:r=8,onClose:s,className:l="",ariaLabel:i}=e||{};return a?n.jsx(yn,{anchorRect:t,offset:r,onClose:s,closeOnOutsideClick:!1,className:le(`info-tooltip ${l}`),ariaLabel:i||a,children:n.jsx("div",{className:le("info-tooltip__content body-3"),children:a})}):null}function Yn(e){const{t}=_e.useTranslation(),{anchorRect:a,title:r,items:s,activeIndex:l=-1,showIndex:i=!0,onClose:u,offset:c=12,closeOnOutsideClick:d=!0}=e||{},h=(Array.isArray(s)?s:s?[s]:[]).map(p=>typeof p=="string"?{text:p}:p);return!h.length&&!r?null:n.jsx(yn,{anchorRect:a,offset:c,onClose:u,closeOnOutsideClick:d,useBorder:!1,className:le("description-tooltip"),ariaLabel:r||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:le("description-tooltip__box"),children:[r&&n.jsx("span",{className:le("description-tooltip__title body-2"),children:r}),n.jsx("ol",{className:le("description-tooltip__items"),children:h.map((p,m)=>n.jsxs("li",{className:le(`description-tooltip__item body-3${m===l?" description-tooltip__item--active":""}`),children:[i&&h.length>1&&n.jsxs("span",{className:le("description-tooltip__index button-1"),children:[m+1,"."]}),p.color&&n.jsx("span",{className:le("description-tooltip__dot"),style:{background:p.color},"aria-hidden":"true"}),n.jsx("span",{children:p.text})]},m))})]})})}function Pa(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let yo=0,si=!1;function li(){si||typeof document>"u"||(si=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(yo=Date.now())},!0),document.addEventListener("touchstart",()=>{yo=Date.now()},{capture:!0,passive:!0}))}li();function ha(e){return!!e&&e.pointerType==="touch"}function ma(e=1e3){return li(),Date.now()-yo<e}function vo(e,t,a,{enabled:r=!0,fallbackOnParent:s=!1}={}){const l=Pa(e),i=Pa(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!r||typeof document>"u")return;const h=p=>{const m=p,g=p.target,y=a.current,C=!!(g&&y&&y.contains(g));if(m.pointerType!=="touch"){C&&(u.current=null);return}if(C){u.current=l.current;return}u.current=null,l.current&&!(g&&g.closest?.(".tooltip__content"))&&i.current(!1,y)};return document.addEventListener("pointerdown",h,!0),()=>document.removeEventListener("pointerdown",h,!0)},[r,a,l,i]);const d=o.useCallback(h=>{const p=u.current;return p===null?!1:(u.current=null,c.current=Date.now(),i.current(!p,h??a.current),!0)},[a,i]);return o.useEffect(()=>{if(!r||!s)return;const h=a.current,p=h?.parentElement;if(!h||!p)return;let m=null;const g=b=>{const v=b.changedTouches?.[0];if(!v)return!1;const f=h.getBoundingClientRect();return v.clientX>=f.left&&v.clientX<=f.right&&v.clientY>=f.top&&v.clientY<=f.bottom},y=b=>{m=g(b)?l.current:null},C=b=>{const v=m;m=null,!(v===null||Date.now()-c.current<700||!g(b))&&(u.current=null,c.current=Date.now(),i.current(!v,h))};return p.addEventListener("touchstart",y,{passive:!0}),p.addEventListener("touchend",C),()=>{p.removeEventListener("touchstart",y),p.removeEventListener("touchend",C)}},[r,s,a,l,i]),{touchPress:d}}function xy(e,t){const{size:a=48,type:r,htmlType:s,href:l,target:i,rel:u,icon:c,rightIcon:d,label:h,count:p,subLabel:m,children:g,ariaLabel:y,variant:C="default",align:b="center",nowrap:v=!1,selected:f,toggleable:B=!1,ariaExpanded:_,ariaControls:N,disabled:x=!1,loading:E=!1,useLabel:w=!0,useBorder:D=!0,useBG:k=!0,useDisabledCovered:A=!1,useDisabledInvisible:R=!1,useDisabledFilled:$=!1,width:G,minWidth:T,onClick:P,onDisabledClick:L,showTooltipInfo:Q=!1,tooltipInfoText:Z=null,tooltipDescription:F=null,tooltipOnly:K=!1,iconSize:M="medium",iconColor:q,shape:Y="rounded",color:U,className:S,...I}=e,O=typeof a=="string"&&isNaN(Number(a))?a.toLowerCase():String(Number(a)||48),z=O.match(/^\d+$/)?`button${O}`:`button-${O}`,se=Number(a),te=!isNaN(se)&&se<40?"button-2":"button-1",de=h??g,ee=x||!!I.disabled,V=ee?A?"disabled-covered":R?"disabled-invisibled":$?"disabled-filled":"disabled":C,ne=V?`button--variant-${V}`:"",W=b?`button--align-${b}`:"",H=v?"button--nowrap":"",ie=Y?`button--shape-${Y}`:"",Te=typeof q=="string"&&q.startsWith("--")?`var(${q})`:q,ye={...G?{width:typeof G=="number"?`${G}px`:G}:{},...T?{minWidth:typeof T=="number"?`${T}px`:T}:{},...D?{}:{"--button-border":ee?"0":"1px solid transparent"},...Te?{"--button-icon-color":Te}:{},...U?{"--color-main":U}:{}},he=w===!1?"":de,Se=Array.isArray(he)?he.length>0:!!he,$e=!!d,Ne=r??(Se||c||$e?"bar":"dot"),ue=`${z}--${Ne}`,xe=o.useRef(null);o.useEffect(()=>{!In||s!==void 0||xe.current?.closest("form")&&Nt(`button-in-form:${typeof de=="string"?de:""}`,'[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 de=="string"&&de?` \uB2E8\uCD94: ${de}`:""))},[s,de]);const ke=o.useRef(t);ke.current=t;const Ee=o.useCallback(Le=>{xe.current=Le;const at=ke.current;typeof at=="function"?at(Le):at&&(at.current=Le)},[]),We=o.useRef(ee),[He,ot]=o.useState(!!f),[Qe,Je]=o.useState(!1),[vt,je]=o.useState(null),Ye=o.useCallback(()=>Je(!1),[]),[Be,Ue]=o.useState(!1),qe=o.useId();o.useEffect(()=>{typeof f=="boolean"&&ot(f)},[f]),o.useEffect(()=>{if(We.current&&!ee&&xe.current){const Le=xe.current;let at=!1;try{at=Le.matches(":focus:not(:focus-visible)")}catch{at=!1}at&&Le.blur(),Le.style.pointerEvents="none";const oe=requestAnimationFrame(()=>{requestAnimationFrame(()=>{xe.current&&(xe.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(oe)}We.current=ee},[ee]);const pt=typeof f=="boolean"?!!f:He,_t=typeof _=="boolean"?void 0:B||typeof f=="boolean"?pt?"true":"false":I["aria-pressed"],Dt=we("button",z,ue,ne,W,H,ie,pt?"is-selected":null,k?null:"button--no-bg",K?"button--tooltip-only":null,S),Bt=`button__icon button__icon--${M}`,st=Array.isArray(m)?m:m!==void 0?[m]:[],tt=()=>{if(Array.isArray(he))return he.map((at,oe)=>{const be=st[oe];return n.jsxs("span",{className:`button__label-text${be!==void 0?" button__label-text--has-sub":""}`,children:[at,be!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:be})]},oe)});const Le=m!==void 0;return n.jsxs("span",{className:`button__label-text${Le?" button__label-text--has-sub":""}`,children:[he,p!=null&&n.jsx("span",{className:"button__count",children:p}),Le&&n.jsx("span",{className:"button__sub-label-text caption-1",children:m})]})},kt=Le=>{typeof f!="boolean"&&!B&&ot(!1),Le.currentTarget.blur()},At=Le=>{ee||(typeof I.onMouseLeave=="function"&&I.onMouseLeave(Le),kt(Le))},Tt=Le=>{if(K&&it&&ut.touchPress(Le.currentTarget),ee){it&&ut.touchPress(Le.currentTarget),Le.preventDefault(),L?.(Le);return}typeof f!="boolean"&&B&&ot(at=>!at),P?.(Le)},Lt=o.useCallback(()=>{(Q||F)&&(Je(!0),je(xe.current?.getBoundingClientRect()??null))},[Q,F]),gt=o.useCallback(()=>{(Q||F)&&(Je(!1),je(null))},[Q,F]),it=!!(Q||F),ut=vo(Qe,Le=>{Le?Lt():gt()},xe,{enabled:it&&(ee||K),fallbackOnParent:it&&ee}),ct={...I};delete ct.disabled,delete ct.className,delete ct.faded,delete ct.useFaded,delete ct.loading,delete ct.onMouseLeave,delete ct.onPointerEnter,delete ct.onPointerLeave,delete ct.onPointerUp,delete ct.onFocus,delete ct.onBlur,ee&&(Object.keys(ct).forEach(Le=>{/^on[A-Z]/.test(Le)&&typeof ct[Le]=="function"&&delete ct[Le]}),ct["aria-disabled"]="true"),E&&(ct["aria-busy"]="true");const ve=(typeof Q=="string"?Q:null)??(typeof Z=="string"?Z:null)??(typeof y=="string"?y:null)??(typeof de=="string"?de:null)??void 0,Me=typeof y=="string"?y:typeof de=="string"?de:ve,Pe=F?[F.title,...F.items??[]].filter(Boolean).join(". "):Q&&ve&&ve!==Me?ve:"",Oe=[typeof I["aria-describedby"]=="string"?I["aria-describedby"]:void 0,Pe?qe:null].filter(Boolean).join(" ")||void 0,dt=()=>n.jsx("span",{className:`${Bt} button__spinner`,"aria-hidden":"true",children:n.jsx(da,{variant:"spinner",size:"100%"})}),St=(Le,at)=>n.jsx(nt,{icon:Le,label:at??Me,className:Bt,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),yt=Le=>E?dt():St(c,Le),wt=()=>Ne==="dot"?n.jsxs(n.Fragment,{children:[yt(),Se&&n.jsx("span",{className:`button__label ${te}`,children:tt()})]}):b==="center"&&(c||E)?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:yt()}),Se&&n.jsx("span",{className:`button__label ${te}`,children:tt()})]}),$e&&n.jsx("span",{className:"button__right",children:St(d)})]}):n.jsxs(n.Fragment,{children:[(c||E)&&n.jsx("span",{className:"button__left",children:yt(y??de)}),Se&&n.jsx("span",{className:`button__label ${te}`,children:tt()}),$e&&n.jsx("span",{className:"button__right",children:St(d)})]}),Ct=!!l&&!ee;return n.jsxs(n.Fragment,{children:[n.jsxs(Ct?"a":"button",{...ct,ref:Ee,...Ct?{href:l,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:s??"button",disabled:ee&&!L&&!Be},className:Dt,"aria-pressed":_t,"aria-expanded":typeof _=="boolean"?_:I["aria-expanded"],"aria-controls":N??I["aria-controls"],"aria-label":Me,"aria-disabled":ee&&(Ct||L||Be)?!0:void 0,"aria-describedby":Oe,style:ye,onClick:Tt,onMouseLeave:At,onPointerEnter:Le=>{ha(Le)||Lt(),!ee&&typeof I.onPointerEnter=="function"&&I.onPointerEnter(Le)},onPointerLeave:Le=>{ha(Le)||gt(),!ee&&typeof I.onPointerLeave=="function"&&I.onPointerLeave(Le)},onPointerUp:Le=>{ee&&it&&ut.touchPress(Le.currentTarget),!ee&&typeof I.onPointerUp=="function"&&I.onPointerUp(Le)},onFocus:Le=>{Ue(!0),ma()||Lt(),!ee&&typeof I.onFocus=="function"&&I.onFocus(Le)},onBlur:Le=>{Ue(!1),ee||kt(Le),gt(),!ee&&typeof I.onBlur=="function"&&I.onBlur(Le)},children:[wt(),Pe?n.jsx("span",{id:qe,hidden:!0,"aria-label":Pe}):null]}),Qe&&F?n.jsx(Yn,{anchorRect:vt,title:F.title,items:F.items,onClose:Ye}):Qe&&ve?n.jsx(Dn,{anchorRect:vt,text:ve,onClose:Ye}):null]})}const fe=o.forwardRef(xy);fe.displayName="Button";function Mt(e,t,a){const r=o.useRef(null);return o.useLayoutEffect(()=>{const s=r.current?.parentElement??null;return t(s,e),()=>a(s)},[e,t,a]),r}const Ia={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},_o=new WeakMap;function xo(e){if(e)return _o.get(e)}function Xt(e,t){e&&(e.style.setProperty(Ia.title,t.title),e.style.setProperty(Ia.description,t.description),_o.set(e,t))}function Jt(e){e&&(e.style.removeProperty(Ia.title),e.style.removeProperty(Ia.description),_o.delete(e))}const ii={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function ui(){const e=Mt(ii,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const ci={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function di(){const e=Mt(ci,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const pi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function hi(){const e=Mt(pi,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const mi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Ci(){const e=Mt(mi,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const fi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function bi(){const e=Mt(fi,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const gi={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function yi(){const e=Mt(gi,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const vi={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function _i(){const e=Mt(vi,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const xi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function wi(){const e=Mt(xi,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const Bi={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function ki(){const e=Mt(Bi,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const Ai={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function Ni(){const e=Mt(Ai,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const Ei={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function Di(){const e=Mt(Ei,Xt,Jt);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 Si={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function ji(){const e=Mt(Si,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const Ti={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function Mi(){const e=Mt(Ti,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Li={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function $i(){const e=Mt(Li,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const rn=(e,t,a)=>({key:e,get label(){return Vt.t(`promoBannerBg.${e}`,t)},textTone:a}),wy=[rn("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),rn("soft","\uC18C\uD504\uD2B8","dark"),rn("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),rn("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),rn("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),rn("warm","\uC6DC(\uAC15\uC870)","dark"),rn("dark","\uB2E4\uD06C","light"),rn("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),rn("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),rn("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),rn("outline","\uC544\uC6C3\uB77C\uC778","dark"),rn("success","\uC131\uACF5/\uC644\uB8CC","light"),rn("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),rn("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],Ri={main:ui,soft:di,sub:hi,deep:Ci,softSub:bi,warm:yi,dark:_i,radial:wi,diagonal:ki,dots:Ni,outline:Di,success:ji,naver:Mi,instagram:$i};function Pi({storageKey:e="fontScale",baseFont:t=20,minScale:a=.8,maxScale:r=1.4,step:s=.1,lineHeightRatio:l=1.4}={}){const i=B=>Math.max(a,Math.min(r,Number(B))),u=B=>{try{const _=localStorage.getItem(B),N=_?Number(_):1;return Number.isFinite(N)?i(N):i(1)}catch{return i(1)}},[c,d]=o.useState(()=>u(e)),[h,p]=o.useState(e);h!==e&&(p(e),d(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const m=B=>{d(typeof B=="function"?_=>i(B(_)):i(B))},g=()=>m(B=>+(B+s).toFixed(6)),y=()=>m(B=>+(B-s).toFixed(6)),C=c<r-Number.EPSILON,b=c>a+Number.EPSILON,v=Math.round(t*c),f=Math.round(v*l);return{scale:c,setScale:m,increase:g,decrease:y,canIncrease:C,canDecrease:b,fontSize:v,lineHeight:f}}function Ii(e,t){const a=Pa(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 ",Fi=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(wo)?e.split(wo).pop()??e:e})(),By=o.createContext(!1),Zn=[];let Oi=null;function ky(e){const t=o.useContext(By);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;Zn.length===0&&(Oi=document.title);const a={text:Fi?`${e}${wo}${Fi}`:e};return Zn.push(a),document.title=a.text,()=>{const r=Zn.lastIndexOf(a);r>=0&&Zn.splice(r,1),document.title=Zn.length?Zn[Zn.length-1].text:Oi??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"}],Ay=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function pn(e,t){return Ay().compare(e,t)}const pr=new Map;function Ny(e){const t=pr.get(e);if(t)return t;const a=[],r=/-?\d+(?:\.\d+)?/g;let s=0;for(let l=r.exec(e);l;l=r.exec(e)){let i=l.index,u=l[0];u[0]==="-"&&i>0&&!/\s/.test(e[i-1])&&(i+=1,u=u.slice(1)),i>s&&a.push(e.slice(s,i)),a.push(Number(u)),s=l.index+l[0].length}return s<e.length&&a.push(e.slice(s)),pr.size>5e3&&pr.clear(),pr.set(e,a),a}function Ey(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 Dy(e,t){const a=d=>d==null||typeof d=="number"&&Number.isNaN(d)?"":String(d).trim(),r=a(e),s=a(t);if(r===s)return 0;const l=(d,h)=>{if(typeof d=="number"&&!Number.isNaN(d))return[d];const p=Ey(h);return p!==null?[p]:Ny(h)},i=l(e,r),u=l(t,s),c=Math.min(i.length,u.length);for(let d=0;d<c;d++){const h=i[d],p=u[d];if(typeof h=="number"&&typeof p=="number"){if(h!==p)return h-p;continue}if(typeof h=="number")return-1;if(typeof p=="number")return 1;const m=pn(h,p);if(m!==0)return m}return i.length!==u.length?i.length-u.length:pn(r,s)}const zi=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function hr(e,t,a){const r=zi(e),s=zi(t);if(r||s)return r===s?0:r?1:-1;const l=Dy(e,t);return a?l:-l}function Sy(e,t,a){const{t:r}=_e.useTranslation(),[s,l]=o.useState(()=>{const y=a?.initialPageSize;return y&&Bo.some(C=>C.value===y)?y:"25"}),[i,u]=o.useState(1),[c,d]=o.useState(t);Object.is(c,t)||(d(t),i!==1&&u(1));const h=o.useMemo(()=>Bo.map(y=>({...y,label:r("visits.showN",{n:y.value})})),[r]),p=o.useCallback(y=>{Bo.some(C=>C.value===y)&&(l(y),u(1))},[]),m=Math.max(1,Math.ceil(e.length/Number(s))),g=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),m);return i!==g&&u(g),{pageRows:o.useMemo(()=>e.slice((g-1)*Number(s),g*Number(s)),[e,g,s]),pageSizeProps:{options:h,value:s,onChange:p},paginationProps:{page:g,total:m,onChange:u},setPage:u}}function jy(e){const[t,a]=o.useState(()=>e?.defaultKey!=null?{key:e.defaultKey,asc:e.defaultAsc??!0}:null),r=o.useRef(t),s=o.useRef(e?.onSortChange);s.current=e?.onSortChange;const l=o.useCallback(c=>{const d=r.current,h=d?.key===c?{key:c,asc:!d.asc}:{key:c,asc:!0};r.current=h,a(h),s.current?.(h)},[]),i=o.useCallback((c,d)=>({label:c,sortDir:t?.key===d?t.asc?"asc":"desc":null,onClick:()=>l(d)}),[t,l]),u=o.useCallback((c,d)=>{if(!t)return c;const{key:h,asc:p}=t;return[...c].sort((m,g)=>hr(d(m,h),d(g,h),p))},[t]);return{sort:t,field:i,sortRows:u}}const vn="\uC804\uCCB4";Object.fromEntries(Object.entries(sf).map(([e,{nucleus:t}])=>[e,t]));const Ty={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"})},My={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"})},Ly={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 $y(e,t){if("place"in t)return Ty[t.place](e);const a=My[t.vowel](e);return t.glide?`${a} \xB7 ${Ly[t.glide](e)}`:a}const Ry=(e,{defaultValue:t})=>t,Wi=(e,t)=>({jamos:e,phonetic:t,tooltip:$y(Ry,t)}),Sn=(e,t)=>t.map(a=>Wi([a],{place:e})),qt=(e,t,a)=>Wi([...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"])]},Py=e=>e===Iy?[]:Array.from(e),Iy="__NO_CODA__",Ao=e=>e.map(t=>t.map(({jamos:a,phonetic:r,tooltip:s})=>({v:a.join(""),phonetic:r,tooltip:s}))),Hi={cho:Ao(ko.cho),jung:Ao(ko.jung),jong:Ao(ko.jong)};Hi.jung.flat().forEach(({v:e})=>{for(const t of Py(e));}),new Set(Hi.cho.flat().map(e=>e.v));function Fy(e,t=!0){const a=Pa(e);o.useEffect(()=>{if(t)return Kn(()=>{a.current?.()})},[t,a])}function Fa(){const[e,t]=o.useState(null),a=o.useCallback(l=>t(l.getBoundingClientRect()),[]),r=o.useCallback(()=>t(null),[]),s=o.useCallback(l=>{const i=l.getBoundingClientRect();t(u=>u?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:a,close:r,toggleAt:s}}function Oy(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),l=o.useRef(null);o.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const i=o.useCallback((c,d)=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{a(c),s(d)},e)},[e]),u=o.useCallback(()=>{l.current&&clearTimeout(l.current),a(null),s(null)},[]);return{payload:t,anchorRect:r,openAfterDelay:i,close:u}}function Vi(e="warning"){const[t,a]=o.useState(""),[r,s]=o.useState(e),[l,i]=o.useState(0),u=o.useCallback((p,m)=>{s(m),a(p),i(g=>g+1)},[]),c=o.useCallback(p=>u(p,"warning"),[u]),d=o.useCallback(p=>u(p,"normal"),[u]),h=o.useCallback(()=>a(""),[]);return{toastMessage:t,toastType:r,toastKey:l,showToast:u,showWarning:c,showNormal:d,clearToast:h}}function Oa(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 za({computeStyle:e,onScroll:t="close",onResize:a="close",ignoreOutsideClickSelector:r}){const[s,l]=o.useState(!1),[i,u]=o.useState({position:"fixed"}),c=o.useRef(null),d=o.useRef(null),h=o.useCallback(()=>{c.current&&u(e(c.current.getBoundingClientRect(),c.current))},[e]);o.useLayoutEffect(()=>{s&&h()},[s,h]),o.useEffect(()=>{if(!s)return;let g=d.current?.offsetHeight??0;g>0&&h();let y=0,C=null;typeof ResizeObserver<"u"&&d.current&&(C=new ResizeObserver(()=>{const E=d.current?.offsetHeight??0;if(E!==g){if(g=E,++y>4){C?.disconnect(),C=null;return}h()}}),C.observe(d.current));const b=E=>{const w=E.target;r&&w.closest?.(r)||c.current?.contains(w)||d.current?.contains(w)||l(!1)};document.addEventListener("mousedown",b),document.addEventListener("pointerdown",b);let v=null;const f=()=>{if(typeof requestAnimationFrame>"u"){h();return}v===null&&(v=requestAnimationFrame(()=>{v=null,h()}))},B=E=>{d.current?.contains(E.target)||(t==="reposition"?f():t==="close"&&l(!1))};t!=="ignore"&&window.addEventListener("scroll",B,!0);const _=()=>{a==="reposition"?f():a==="close"&&l(!1)};let N=null;const x=()=>{_(),N&&clearTimeout(N),N=setTimeout(()=>{N=null,a==="reposition"&&h()},250)};return a!=="ignore"&&(window.addEventListener("resize",_),window.addEventListener("orientationchange",x)),()=>{v!==null&&cancelAnimationFrame(v),C?.disconnect(),document.removeEventListener("mousedown",b),document.removeEventListener("pointerdown",b),t!=="ignore"&&window.removeEventListener("scroll",B,!0),a!=="ignore"&&(window.removeEventListener("resize",_),window.removeEventListener("orientationchange",x)),N&&clearTimeout(N)}},[s,h,t,a,r]),o.useEffect(()=>{if(s)return Kn(()=>l(!1))},[s]);const p=o.useCallback(()=>l(g=>!g),[]),m=o.useCallback(()=>l(!1),[]);return{open:s,setOpen:l,toggle:p,close:m,style:i,triggerRef:c,menuRef:d}}function zy(e,{mode:t="playback",autoStart:a=!1,onPlaySpeaker:r,onComplete:s,playMs:l=1100,feedbackMs:i=1500}={}){const[u,c]=o.useState([]),[d,h]=o.useState(0),[p,m]=o.useState("idle"),[g,y]=o.useState(null),[C,b]=o.useState([]),[v,f]=o.useState(null),[B,_]=o.useState(0),N=o.useRef(0),x=o.useCallback(M=>{N.current=typeof M=="function"?M(N.current):M,_(N.current)},[]),E=o.useRef(r),w=o.useRef(s);o.useEffect(()=>{E.current=r,w.current=s},[r,s]);const D=o.useRef([]),k=()=>{D.current.forEach(clearTimeout),D.current=[]},A=(M,q)=>{D.current.push(setTimeout(q,M))};o.useEffect(()=>()=>k(),[]);const R=u[d]?.id??null,$=o.useRef(null),G=o.useCallback(()=>{k(),m("playing"),b([]),f(null),x(0);let M=0;e.forEach((q,Y)=>{A(M,()=>{h(Y),y(q.id),E.current?.(q)}),A(M+1e3,()=>{y(null),b(U=>[...U,q.id])}),M+=1300}),A(M,()=>{m("done"),w.current?.({score:0,total:e.length})})},[e,x]),T=o.useCallback((M,q)=>{if(q>=M.length){m("done"),w.current?.({score:N.current,total:M.length});return}$.current=null,h(q),f(null),m("playing"),y(M[q].id),E.current?.(M[q]),A(l,()=>{y(null),m("waiting")})},[l]),P=o.useCallback(()=>{k();const M=La(e);c(M),x(0),b([]),T(M,0)},[e,T,x]),L=o.useCallback(()=>{t==="playback"?(c(e),G()):P()},[t,e,G,P]),Q=o.useCallback(()=>{k(),m("idle"),y(null),b([]),f(null),h(0),x(0),c([])},[x]),Z=JSON.stringify(e.map(M=>[M.id,M.label,M.angleDeg,M.deg,M.row,M.shortcut]));o.useEffect(()=>(a?L():Q(),()=>k()),[t,Z,a]);const F=o.useCallback(M=>{p!=="waiting"||t==="playback"||$.current===d||($.current=d,f(M),M===u[d]?.id&&x(q=>q+1),t==="exam"?(m("playing"),A(400,()=>T(u,d+1))):(m("feedback"),A(i,()=>T(u,d+1))))},[p,t,u,d,T,i,x]),K=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:g,playedIds:C,selectedId:v,answerId:R,showFeedback:p==="feedback",clickable:p==="waiting",onSelectSpeaker:F},index:d,total:K,score:B,phase:p,done:p==="done",start:L,reset:Q}}const No=new Map,Eo=new Map,Wy=()=>()=>{},Hy=()=>!0,Vy=()=>!1;function qi(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 qy(e){if(typeof window>"u")return"";const t=(a,r)=>{const s=r.attrName.toLowerCase(),l=r.attrValue.trim();(s==="href"||s==="xlink:href")&&!l.startsWith("#")&&(r.keepAttr=!1),(s==="style"||l.includes("\\")&&l.includes("("))&&(r.keepAttr=!1);const i=l.replace(/url\s*\(\s*(['"]?)#[^)\s'"]+\1\s*\)/gi,"");/url\s*\(/i.test(i)&&(r.keepAttr=!1)};la.addHook("uponSanitizeAttribute",t);try{return la.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{la.removeHook("uponSanitizeAttribute",t)}}function Uy(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])),s=[...a].filter(i=>r.has(i));if(s.length===0)return e;let l=e;for(const i of s){const u=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=`${t}-${i}`;l=l.replace(new RegExp(`id="${u}"`,"g"),`id="${c}"`).replace(new RegExp(`url\\(\\s*(['"]?)#${u}\\1\\s*\\)`,"g"),(d,h)=>`url(${h}#${c}${h})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return l}function Gy(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 Ky(e,t=!0){const a=o.useSyncExternalStore(Wy,Hy,Vy)&&t&&e?qi(e)??No.get(e)??null:null,[r,s]=o.useState({src:e,enabled:t,svg:a});return o.useEffect(()=>{if(!t||!e){s({src:e,enabled:t,svg:null});return}const l=qi(e)??No.get(e)??null;if(l!==null){s({src:e,enabled:t,svg:l});return}let i=!0;return Gy(e).then(u=>{i&&s({src:e,enabled:t,svg:u})}),()=>{i=!1}},[e,t]),r.src===e&&r.enabled===t?r.svg:a}function Yy({title:e,description:t,actionLabel:a,onAction:r,bg:s,color:l,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:d,className:h=""}){const p=s??l??"main",m=o.useRef(null),[g,y]=o.useState("main"),C=fn("(max-width: 767px)"),b=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const B=m.current;if(!B)return;const _=xo(B),N=(x,E,w)=>{if(w!==void 0)B.style.setProperty(E,w),b.current[x]=!0;else if(b.current[x]){const D=_?.[x];D?B.style.setProperty(E,D):B.style.removeProperty(E),b.current[x]=!1}};N("title","--promo-banner-bg-title",c),N("description","--promo-banner-bg-description",d)},[c,d,p]),o.useLayoutEffect(()=>{const B=m.current;if(!B)return;const _=xo(B);y(_?.actionVariant??"main")},[p]);const v=we("promo-banner",`promo-banner--${i}`,h),f=Ri[p];return n.jsxs("div",{ref:m,className:v,role:"note",children:[n.jsx(f,{}),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??g,shape:"pill",useBorder:!0,onClick:r,ariaLabel:a,...C?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:a,minWidth:140}})]})}function Zy({children:e,interval:t=5e3,dotTone:a,className:r="","aria-label":s}){const{t:l}=_e.useTranslation(),i=s??l("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[d,h]=o.useState(0),[p,m]=o.useState(!1),[g,y]=o.useState(!1),[C,b]=o.useState(!1),v=o.useRef(null),f=o.useRef(null),B=o.useRef(null),_=go(),N=p||g||C,x=c>0?Math.min(d,c-1):0;o.useEffect(()=>{if(c<2||t<=0||N||_)return;const w=window.setInterval(()=>h(D=>(Math.min(D,c-1)+1)%c),t);return()=>window.clearInterval(w)},[c,t,N,_]);const E=w=>{f.current!=null&&window.clearTimeout(f.current),f.current=window.setTimeout(()=>{f.current=null,b(!1)},w)};return o.useEffect(()=>()=>{f.current!=null&&window.clearTimeout(f.current)},[]),o.useEffect(()=>{if(!C)return;const w=D=>{D.pointerType==="touch"&&(B.current&&B.current.contains(D.target)||(f.current!=null&&(window.clearTimeout(f.current),f.current=null),b(!1)))};return document.addEventListener("pointerdown",w,!0),()=>document.removeEventListener("pointerdown",w,!0)},[C]),c===0?null:n.jsxs("section",{ref:B,className:we("top-banner",r),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:w=>{v.current=w.pointerType},onPointerDown:w=>{v.current=w.pointerType,w.pointerType==="touch"&&(f.current!=null&&(window.clearTimeout(f.current),f.current=null),b(!0))},onPointerUp:w=>{w.pointerType==="touch"&&E(5e3)},onPointerCancel:w=>{w.pointerType==="touch"&&E(5e3)},onMouseEnter:()=>{v.current!=="touch"&&m(!0)},onMouseLeave:()=>m(!1),onFocus:w=>{let D=!0;try{D=w.target.matches(":focus-visible")}catch{D=!0}y(D)},onBlur:w=>{w.currentTarget.contains(w.relatedTarget)||y(!1)},children:[n.jsx("div",{className:"top-banner__viewport",children:n.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${x*100}%)`},children:u.map((w,D)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":D!==x,...D!==x?{inert:!0}:{},children:w},D))})}),c>1&&n.jsx("div",{className:`top-banner__dots${(a?.[x]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((w,D)=>n.jsx("button",{type:"button",className:`top-banner__dot${D===x?" top-banner__dot--active":""}`,"aria-label":l("topBanner.dotAriaLabel",{count:c,index:D+1,defaultValue:`${c}\uAC1C \uC911 ${D+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":D===x,onClick:()=>h(D)},D))})]})}function Xy({title:e,body:t,open:a=!1,onToggle:r,avatar:s,titleClassName:l="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 h=d.currentTarget.closest('[role="list"]');if(!h)return;const p=Array.from(h.querySelectorAll("[data-accordion-header]")),m=p.indexOf(d.currentTarget);(d.key==="ArrowDown"?p[m+1]:p[m-1])?.focus()}},children:[s&&n.jsx("div",{className:"accordion-item__avatar",children:s}),n.jsx("div",{className:`accordion-item__title ${l}`,children:e}),n.jsx("div",{className:"accordion-item__chevron",children:n.jsx(nt,{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 Jy({items:e=[],defaultOpenIndex:t=0,size:a=72,className:r="",bodyClassName:s}){const[l,i]=o.useState({index:t}),u=(c,d)=>l.id!=null&&c.id!=null?c.id===l.id:l.id==null&&d===l.index;return n.jsx("div",{className:`accordion-group accordion-group--s${a} ${r}`.trim(),role:"list",children:e.map((c,d)=>n.jsx(Xy,{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:s},c.id??d))})}function Qy(){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 e2(){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 t2(){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 jt(e){const{t}=_e.useTranslation(),{type:a="bar",size:r,className:s="","aria-label":l,"aria-hidden":i}=e;if(a==="dot"){const{icon:N,number:x,position:E="top-right",onClick:w,animate:D=!1}=e,k=N??"check",A=x!==void 0?"number":k,R=typeof r=="number"?r:32,$=we("circle-badge",`circle-badge--${A}`,`circle-badge--${E}`,`circle-badge--${R}`,D?"circle-badge--animate":"",w?"circle-badge--clickable":"",s),G=x!==void 0?t("badge.nthSelected",{n:x,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")}[k];return n.jsxs("span",{className:$,onClick:w,onKeyDown:w?T=>{T.key!=="Enter"&&T.key!==" "||(T.preventDefault(),T.currentTarget.click())}:void 0,"aria-label":i?void 0:l??G,"aria-hidden":i||void 0,role:w?"button":i?void 0:"img",tabIndex:w?0:void 0,children:[x!==void 0&&x,x===void 0&&k==="check"&&n.jsx(Qy,{}),x===void 0&&k==="remove"&&n.jsx(e2,{}),x===void 0&&k==="minus"&&n.jsx(t2,{})]})}const{label:u,children:c,variant:d="default",fill:h="filled",minWidth:p,iconLeft:m,iconRight:g,color:y}=e,C=typeof r=="number"?"medium":r??"medium",b={small:"caption-2b",medium:"body-3b",large:"body-2b"}[C]??"body-2b",v={small:12,medium:14,large:16}[C]??14,f=we("badge",`badge--${d}`,`badge--${C}`,h!=="filled"?`badge--${h}`:"",b,s),B=y?.startsWith("--")?`var(${y})`:y,_=p!==void 0||B?{...p!==void 0?{minWidth:typeof p=="number"?`${p}px`:p}:{},...B?{"--badge-color":B}:{}}:void 0;return n.jsxs("span",{className:f,style:_,"aria-label":i?void 0:l,role:l&&!i?"img":void 0,"aria-hidden":i||void 0,children:[m&&n.jsx(nt,{icon:m,size:v,className:"badge__icon"}),u??c,g&&n.jsx(nt,{icon:g,size:v,className:"badge__icon"})]})}function Wa({columns:e=[],onClose:t,className:a="",size:r="medium"}){const{t:s}=_e.useTranslation(),l=r==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const b=[{title:null,columns:e}];let v=e;for(const f of i){const B=v?.[f.ci]?.items?.[f.ii];if(!B||!Array.isArray(B.children)||!B.children.length)break;v=[{title:null,items:B.children}],b.push({title:B.label||null,columns:v})}return b},[e,i]),d=c[c.length-1],h=c.length-1,p=o.useCallback(()=>u(b=>b.slice(0,Math.max(0,Math.min(b.length,h)-1))),[h]),m=o.useRef(null),g=o.useRef(null),y=c.length;o.useEffect(()=>{g.current||(g.current=document.activeElement);let b=0,v=0;const f=()=>{const B=m.current?.querySelector("button:not([disabled])");if(B&&B.offsetParent){B.focus({preventScroll:!0});return}v++<20&&(b=requestAnimationFrame(f))};return b=requestAnimationFrame(f),()=>cancelAnimationFrame(b)},[y]),o.useEffect(()=>()=>{g.current?.focus?.({preventScroll:!0})},[]);const C=o.useCallback((b,v,f)=>{if(b){if(Array.isArray(b.children)&&b.children.length){u(B=>[...B.slice(0,h),{ci:v,ii:f}]);return}try{typeof b.onClick=="function"&&b.onClick()}catch{}try{b&&b.closeOnSelect&&typeof t=="function"&&t()}catch{}}},[t,h]);return n.jsxs("div",{className:le(`menu-tooltip menu-tooltip--${r} ${a}`),children:[(c.length>1||d.title)&&n.jsxs("div",{className:le("menu-tooltip__header"),children:[c.length>1?n.jsx(fe,{htmlType:"button",size:l,type:"dot",icon:"chevron-left",ariaLabel:s("common.back","\uB4A4\uB85C"),onClick:p,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:le("menu-tooltip__title button-1"),children:d.title})]}),n.jsx("div",{className:le("menu-tooltip__columns"),ref:m,children:d.columns&&d.columns.map((b,v)=>n.jsxs("div",{className:le("menu-tooltip__column"),children:[b.title?n.jsx("div",{className:le("menu-tooltip__column-title body-3"),children:b.title}):null,n.jsx("div",{className:le("menu-tooltip__items"),children:(b.items||[]).map((f,B)=>n.jsxs(o.Fragment,{children:[f.separatorBefore&&B>0&&n.jsx("div",{className:le("menu-tooltip__separator"),role:"separator"}),n.jsx(fe,{htmlType:"button",className:le("menu-tooltip__item"),size:l,type:f.label?"bar":"dot",icon:f.selected?"check":f.icon||"none",rightIcon:Array.isArray(f.children)&&f.children.length?"chevron-right":f.badgeCount?n.jsx(jt,{type:"dot",position:"inline",number:Math.min(f.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:f.label,ariaLabel:f.label&&f.badgeCount&&f.badgeCount>0?s("nav.badgeLabel",{label:f.label,count:f.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):f.label,onClick:()=>C(f,v,B),selected:f.selected,disabled:f.disabled,showTooltipInfo:f.tooltip||!1,useBorder:!1,align:"left"})]},B))})]},v))})]})}const Ui=".content-area";function Do(e,t="Nav"){try{const a=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Ui);if(a){a.scrollTop=0;return}const r=document.scrollingElement??document.documentElement;r&&r.scrollHeight<=r.clientHeight&&Nt("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Ui}) \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,mr=10,Gi=e=>e&&e>0?e:0;function Ki({items:e=[],activeKey:t,onChange:a,appMode:r,onAppModeChange:s,moreItems:l=[],scrollContainer:i}){const{t:u}=_e.useTranslation(),c=r==="manager"?"malgwi":"manager",d=r==="manager"?"arrow-left":"arrow-right",h=r==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),p=o.useRef(null),[m,g]=o.useState(0),y=e.length;o.useEffect(()=>{const M=p.current;if(!M)return;const q=()=>{const S=typeof getComputedStyle=="function"?getComputedStyle(M):null,I=M.clientWidth-(parseFloat(S?.paddingLeft??"")||0)-(parseFloat(S?.paddingRight??"")||0),O=M.querySelector(".bottom-nav__left"),z=O?.nextElementSibling,se=(O?.offsetWidth??0)+(O&&z?.classList.contains("bottom-nav__divider")?z.offsetWidth:0);g(Math.max(0,I-se))};if(q(),typeof ResizeObserver>"u")return;const Y=new ResizeObserver(q);Y.observe(M);const U=M.querySelector(".bottom-nav__left");return U&&Y.observe(U),()=>Y.disconnect()},[s]);const C=So+1,b=M=>Math.max(0,Math.floor((M+mr)/(So+mr))),v=y*(So+mr)-mr<=m,f=m<=0||l.length===0&&v?y:Math.min(y,b(m-C)),B=m>0&&f<y,_=B?f:y,N=e.slice(0,_),x=e.slice(_),E=B||l.length>0,w=o.useCallback((M,q)=>({position:"fixed",bottom:window.innerHeight-M.top+8,right:window.innerWidth-M.right,zIndex:Oa(q)}),[]),D=o.useId(),{open:k,toggle:A,close:R,style:$,triggerRef:G,menuRef:T}=za({computeStyle:w,onScroll:"ignore",onResize:"reposition"}),P=o.useCallback((M,q)=>q>0?u("nav.badgeLabel",{label:M,count:q,defaultValue:"{{label}}, {{count}}\uAC1C"}):M,[u]),L=o.useCallback((M,q)=>q>0?u("nav.badgeInsideLabel",{label:M,count:q,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):M,[u]),Q=o.useCallback(()=>s?.(c),[s,c]),Z=o.useMemo(()=>x.find(M=>!!M.key&&M.key===t)??l.find(M=>M.selected||M.key&&M.key===t),[x,t,l]),F=o.useMemo(()=>[{items:[...x.map(M=>({label:M.label,icon:M.icon,badgeCount:M.badgeCount,selected:!!M.key&&M.key===t,closeOnSelect:!0,disabled:M.state==="disabled",onClick:()=>{M.state!=="disabled"&&(M.key&&a&&(a(M.key),Do(i,"BottomNav")),R())}})),...l.map(M=>({label:M.label,icon:M.icon,badgeCount:M.badgeCount,selected:M.selected??(!!M.key&&M.key===t),closeOnSelect:!0,onClick:()=>{M.onClick?.(),R()}}))]}],[x,l,t,a,R]),K=[...x,...l].reduce((M,q)=>M+Gi(q.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:p,"aria-label":u("nav.bottomNav","\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158"),children:[s&&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:h,className:"bottom-nav-item",onClick:Q})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:N.map((M,q)=>{const Y=Gi(M.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:M.icon,ariaLabel:P(M.label,Y),selected:!!M.key&&M.key===t,disabled:M.state==="disabled",className:"bottom-nav-item",onClick:()=>{M.key&&(a?.(M.key),Do(i,"BottomNav"))}}),Y>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(jt,{type:"dot",position:"top-right",number:Math.min(Y,99),size:24})})]},M.key??`__slot-${q}`)})}),E&&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:G,className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:Z?.icon??"ellipsis",ariaLabel:L(Z?.label??u("nav.more","\uB354\uBCF4\uAE30"),K),selected:!!Z,className:"bottom-nav-item",onClick:A,"aria-expanded":k,"aria-controls":k?D:void 0}),K>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(jt,{type:"dot",position:"top-right",number:Math.min(K,99),size:24})}),k&&un.createPortal(n.jsx("div",{id:D,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:le("tooltip__content"),style:$,ref:T,children:n.jsx(Wa,{columns:F,onClose:R})}),document.body)]})})]})]})}function Yi(e){if(typeof e!="string")return!1;let t="";for(const r of e){const s=r.charCodeAt(0);s<=32||s>=127&&s<=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 Zi(e,t,a){return a&&a>0?e("nav.badgeLabel",{label:t,count:a,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function n2(e){const{t}=_e.useTranslation(),{activeKey:a,unreadCount:r,onDebug:s,onNotification:l,onSetting:i,onHelp:u,onFeedback:c,onAccount:d}=e||{},h="default";return s||l||i||u||c||d?n.jsxs("div",{className:"side-nav__footer",children:[s&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:s,selected:a==="debug"}),l&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bell",ariaLabel:Zi(t,t("nav.notifications","\uC54C\uB9BC"),r),onClick:l,selected:a==="notifications"}),!!r&&r>0&&n.jsx(jt,{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:h,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:h,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:h,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:h,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:d,selected:a==="account"})]}):null}function Xi(e){const{t}=_e.useTranslation(),{item:a,itemKey:r,label:s,icon:l,active:i,onClick:u,style:c,state:d,labelStyle:h}=e||{},p=a?.key??r??"",m=a?.label??s??"",g=a?.icon??l??"",y=a?.badge??0,C=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(nt,{icon:g,label:typeof m=="string"?m:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),b=d==="disabled",v=`side-nav__item ${i?"active":""} ${d||""} ${b?"disabled":""} ${a?.child?"side-nav__item--child":""}`,f=o.useCallback(B=>{if(b)return;const _=B.detail>0;if(_)try{B.currentTarget.blur()}catch{}u?.(p,B.currentTarget,_)},[b,p,u]);return n.jsxs("button",{type:"button",className:v,onClick:f,"aria-label":typeof m=="string"?Zi(t,m,y):void 0,"aria-current":i?"page":void 0,style:c,"aria-disabled":b,children:[C,n.jsx("span",{className:"side-nav__label button-1 f",style:h,children:m}),y>0&&n.jsx(jt,{type:"dot",position:"inline",number:Math.min(y,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 Ji(e){const{t}=_e.useTranslation(),{items:a=[],activeKey:r,onChange:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:g,scrollContainer:y}=e||{},C=m==="manager",b=o.useCallback(()=>g?.(C?"malgwi":"manager"),[g,C]),v=o.useRef(null),[f,B]=o.useState(null);o.useEffect(()=>{const w=v.current;if(!w)return;let D=null;const k=()=>{const{scrollHeight:$,clientHeight:G,scrollTop:T}=w;if($<=G+1){B(F=>F===null?F:null);return}const P=Math.max(24,G/$*G),L=G-P,Q=$-G,Z={top:Math.round(T/Q*L),height:Math.round(P)};B(F=>F&&F.top===Z.top&&F.height===Z.height?F:Z)},A=()=>{if(typeof requestAnimationFrame>"u"){k();return}D===null&&(D=requestAnimationFrame(()=>{D=null,k()}))};k(),w.addEventListener("scroll",A,{passive:!0});const R=typeof ResizeObserver<"u"?new ResizeObserver(A):null;R?.observe(w);for(const $ of Array.from(w.children))R?.observe($);return()=>{D!==null&&cancelAnimationFrame(D),w.removeEventListener("scroll",A),R?.disconnect()}},[a]);const _=o.useRef(null),N=o.useCallback(w=>{const D=v.current;D&&(w.preventDefault(),_.current={y:w.clientY,top:D.scrollTop},w.currentTarget.setPointerCapture(w.pointerId))},[]),x=o.useCallback(w=>{const D=v.current,k=_.current;!D||!k||(D.scrollTop=k.top+(w.clientY-k.y)*(D.scrollHeight/D.clientHeight))},[]),E=o.useCallback(w=>{_.current=null,w.currentTarget.hasPointerCapture(w.pointerId)&&w.currentTarget.releasePointerCapture(w.pointerId)},[]);return n.jsxs("nav",{ref:v,"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[f&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:f.top,height:f.height},onPointerDown:N,onPointerMove:x,onPointerUp:E,onPointerCancel:E})}),n.jsxs("div",{className:"side-nav__menu-list",children:[(a||[]).filter(w=>!w.section&&(w.key||w.label)).map((w,D)=>n.jsxs(o.Fragment,{children:[w.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(Xi,{item:w,active:!!w.key&&w.key===r,state:w.disabled?"disabled":void 0,onClick:(k,A,R)=>{if(w.disabled)return;if(w.href){if(Yi(w.href)&&window.open(w.href,"_blank","noopener,noreferrer"),R)try{A?.blur()}catch{}return}if(s?.(w.key),Do(y,"SideNav"),!R)return;try{A?.blur()}catch{}if(typeof window<"u"&&window.matchMedia){if(!window.matchMedia("(min-width: 768px) and (max-width: 1023px)").matches)return}else return;const $=document.querySelector(".header");if($){const G=typeof $.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&G&&$.matches(":hover"))){$.classList.add("header--force-collapsed");const T=()=>{$.classList.remove("header--force-collapsed"),$.removeEventListener("mouseenter",T)};$.addEventListener("mouseenter",T)}}}})]},w.key??`side-nav__item-${D}`)),g&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),g&&n.jsx(Xi,{item:{key:"__mode-switch__",label:C?t("nav.goToMalgwi","\uB9D0\uADC0\uB85C \uC774\uB3D9"):t("nav.goToManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9"),icon:C?"arrow-left":"arrow-right"},onClick:b})]}),n.jsx(n2,{activeKey:r,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p})]})}var Cr='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>',a2='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 Qi({appMode:e}){const{t}=_e.useTranslation(),a=e==="manager",r=a?jo:Cr,s=a2;return n.jsxs("div",{className:"brand-identity__root","aria-label":t("header.biArea","BI \uC601\uC5ED"),children:[n.jsx("img",{src:s,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 eu({activeKey:e,onChange:t,items:a,malgwiItems:r,managerItems:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:g,scrollContainer:y}){const{t:C}=_e.useTranslation(),b=fn("(max-width: 767px)"),v=o.useMemo(()=>(a??[]).filter($=>!$.section&&($.key||$.label)).map($=>({key:$.key,label:typeof $.label=="string"?$.label:void 0,icon:$.icon,state:$.disabled?"disabled":void 0,badgeCount:$.badge})),[a]),f=o.useCallback($=>{const G=a?.find(T=>T.key===$);if(!G?.disabled){if(G?.href){Yi(G.href)&&window.open(G.href,"_blank","noopener,noreferrer");return}t?.($)}},[a,t]),B=o.useMemo(()=>{const $=[];return i&&$.push({key:"debug",icon:"terminal",label:C("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),u&&$.push({key:"notifications",icon:"bell",label:C("nav.notifications","\uC54C\uB9BC"),badgeCount:l,onClick:u}),d&&$.push({key:"settings",icon:"settings",label:C("nav.settings","\uC124\uC815"),onClick:d}),h&&$.push({key:"help",icon:"message-circle-question-mark",label:C("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:h}),p&&$.push({key:"feedback",icon:"bug",label:C("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:p}),c&&$.push({key:"account",icon:"user-round",label:C("nav.account","\uACC4\uC815"),onClick:c}),$},[C,i,u,d,h,p,c,l]),_=o.useCallback(($,G)=>({position:"fixed",top:$.bottom+8,right:Math.max(8,window.innerWidth-$.right),zIndex:Oa(G)}),[]),N=o.useId(),{open:x,toggle:E,close:w,style:D,triggerRef:k,menuRef:A}=za({computeStyle:_,onScroll:"ignore",onResize:"reposition"}),R=o.useMemo(()=>[{items:B.map($=>({label:$.label,icon:$.icon,badgeCount:$.badgeCount,selected:$.selected??(!!$.key&&$.key===e),closeOnSelect:!0,onClick:()=>{$.onClick?.(),w()}}))}],[B,e,w]);return n.jsxs("aside",{className:`header${m==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(Qi,{appMode:m}),n.jsxs("div",{className:"header__menu-button",ref:k,children:[n.jsx(fe,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:u&&l&&l>0?C("nav.badgeInsideLabel",{label:C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:l,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:E,"aria-expanded":x,"aria-controls":x?N:void 0}),!!u&&!!l&&l>0&&n.jsx(jt,{type:"dot",number:Math.min(l,99),size:24,"aria-hidden":!0}),x&&un.createPortal(n.jsx("div",{id:N,role:"group","aria-label":C("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:le("tooltip__content"),style:D,ref:A,children:n.jsx(Wa,{columns:R,onClose:w})}),document.body)]})]}),n.jsx(Ji,{scrollContainer:y,items:a,activeKey:e??void 0,onChange:t,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:g}),b&&n.jsx(Ki,{items:v,activeKey:e??void 0,onChange:f,scrollContainer:y,appMode:m,onAppModeChange:g})]})}const r2=eu,o2=()=>Vt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function tu(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 ca(`${t.toLocaleString("ko-KR")}\uC6D0`)}return ca(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function s2(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function l2(e){if(e.durationDays&&e.durationDays>0){const l=e.durationDays;return l%365===0?`${l/365}\uB144`:`${l}\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 s=a.match(/(\d+)\s*-?\s*(day|year)s?\b/i);return s?s[2].toLowerCase()==="year"?`${s[1]}\uB144`:`${s[1]}\uC77C`:a||o2()}function i2(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 nu(e){return{type:e.type??s2(e),plan:l2(e),label:e.label,price:tu(e.price),originalPrice:tu(e.originalPrice),discountLabel:e.discountLabel}}var u2='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>',c2='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>',au='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 Xn={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},To=new WeakMap;function d2(e){if(e)return To.get(e)}function jn(e,t){e&&(e.style.setProperty(Xn.text,t.text),e.style.setProperty(Xn.sub,t.sub),t.copyrightColor&&e.style.setProperty(Xn.copyright,t.copyrightColor),To.set(e,t))}function Tn(e){e&&(e.style.removeProperty(Xn.text),e.style.removeProperty(Xn.sub),e.style.removeProperty(Xn.copyright),To.delete(e))}const ru={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function ou(e={}){const t=Mt(ru,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("${au}")`}})]})}const su="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",Ca=240;var Ha='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 p2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},h2=100,m2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function lu(e={}){const t=Mt(p2,jn,Tn),a="var(--color-main)",r=270,s=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:m2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*h2/Ca}) translate(${-Ca/2} ${-Ca/2})`,opacity:i,children:n.jsx("path",{d:su,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("${Ha}")`}})]})}const C2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},f2=100,b2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function g2(e={}){const t=Mt(C2,jn,Tn),a="#ffffff",r=270,s=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:b2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*f2/Ca}) translate(${-Ca/2} ${-Ca/2})`,opacity:i,children:n.jsx("path",{d:su,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("${au}")`}})]})}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","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("${Ha}")`}})]})}const _2={Logo_SpeechEar_ko:{"":Cr,_mono:u2},Logo_SpeechEarManager_ko:{"":jo,_mono:c2}};function x2(e,t){if(e)return _2[e]?.[t??""]??void 0}const w2={speechear:Cr,manager:jo},B2={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},iu=10;function k2(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 uu(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 s=Math.floor(e/60);return s>0?t("passCard.remainingMinute",{n:s}):t("passCard.remainingSecond",{n:Math.floor(e)})}function A2(e,t,a){if(e==="manager"){const r=/년/.test(t)||/yr|year/i.test(t)||/1년|365/.test(t),s=a==="\uC624\uD508\uD2B9\uAC00"||a===Vt.t("passCard.specialLabel");return r?n.jsx(v2,{}):s?n.jsx(g2,{}):n.jsx(lu,{})}return n.jsx(ou,{})}function cu({ariaLabel:e,product:t,showPrice:a=!1,plan:r,type:s,endDate:l,remainingSeconds:i,endInclusive:u=!1,state:c="active",bg:d,bgOnly:h=!1,textColor:p,subColor:m,copyrightColor:g,logoSrc:y,label:C,price:b,originalPrice:v,discountLabel:f,onUse:B,onRefund:_,onDelete:N}){const{t:x}=_e.useTranslation(),E=t?nu(t):void 0,w=s??E?.type??"speechear",D=r??E?.plan??x("passCard.planSuffix","\uC774\uC6A9\uAD8C"),k=C??E?.label,A=b??(a?E?.price:void 0),R=v??(a?E?.originalPrice:void 0),$=f??E?.discountLabel,G=o.useMemo(()=>{if(A)return null;const W=t?.durationDays??i2(t?.code);if(!W||W<=0)return i!=null?{percent:null,remainingLabel:uu(i,x)}:null;const H=W*86400;let ie;if(i!=null)ie=i;else if((c==="active"||c==="expired")&&l){const he=new Date(l).getTime();if(Number.isNaN(he))return null;const Se=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(l)),$e=/^(\d{4})-(\d{2})-(\d{2})/.exec(Ra()),Ne=Math.round(Se&&$e?(Date.UTC(+Se[1],+Se[2]-1,+Se[3])-Date.UTC(+$e[1],+$e[2]-1,+$e[3]))/864e5:(he-Date.now())/864e5);ie=Math.max(0,u?Ne+1:Ne)*86400}else c==="expired"?ie=0:ie=H;const Te=k2(ie),ye=Math.max(0,Math.min(100,Math.floor(Math.min(Te,H)/H*100)));return c==="pending"&&ye>=100?null:{percent:ye,remainingLabel:c==="expired"?x("passCard.expired","\uB9CC\uB8CC\uB428"):uu(ie,x)}},[A,c,l,i,u,t?.durationDays,t?.code,x]),T=o.useRef(null),[P,L]=o.useState({}),[Q,Z]=o.useState(null),F=!!(B||_||N),K=o.useRef(!1),M=o.useRef(void 0),[q,Y]=o.useState(y);o.useLayoutEffect(()=>{Y(y)},[y]),o.useLayoutEffect(()=>{const W=T.current;W&&(p!==void 0&&W.style.setProperty("--pass-card-text",p),m!==void 0&&W.style.setProperty("--pass-card-sub",m),g!==void 0&&W.style.setProperty("--pass-card-copyright",g))},[p,m,g]),o.useLayoutEffect(()=>{const W=T.current;if(!W)return;const H=d2(W);if(!y){const ie=B2[w],Te=c==="expired"?"_mono":H?.logoColor??"",ye=x2(ie,Te);Y(ye)}},[d,y,w,c]);const U=W=>{const H=T.current;if(!H)return null;const{left:ie,top:Te,width:ye,height:he}=H.getBoundingClientRect(),Se=(W.clientX-ie)/ye-.5;return{rotateX:-((W.clientY-Te)/he-.5)*iu,rotateY:Se*iu}},S=(W,H)=>{const ie=H*-.7,Te=W*.7+10,ye=20+(Math.abs(W)+Math.abs(H))*.4;return`${ie}px ${Te}px ${ye}px rgba(0, 0, 0, 0.18)`},I=o.useCallback(W=>{if(ma())return;K.current=!0,clearTimeout(M.current),M.current=setTimeout(()=>{K.current=!1},200);const H=U(W);H&&L({transform:`perspective(800px) rotateX(${H.rotateX}deg) rotateY(${H.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(H.rotateX,H.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)"})},[]),O=o.useCallback(W=>{if(ma())return;const H=U(W);if(!H)return;const ie=K.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";L({transform:`perspective(800px) rotateX(${H.rotateX}deg) rotateY(${H.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(H.rotateX,H.rotateY),transition:ie})},[]),z=o.useCallback(()=>{clearTimeout(M.current),K.current=!1,L({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)"})},[]),se=o.useCallback(()=>Z(null),[]),te=o.useMemo(()=>{const W=x("passCard.planSuffix","\uC774\uC6A9\uAD8C"),H=D.replace("\uC774\uC6A9\uAD8C","").replace(W==="\uC774\uC6A9\uAD8C"?"":W,"").trim(),ie=H.match(/^(.*?)(일|년)$/);return ie?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:ie[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:ie[2]==="\uB144"?x("passCard.unitYear","\uB144"):x("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:H})},[D,x]),de=o.useMemo(()=>{const W=ca(A);if(!W)return null;const H=W.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!H)return n.jsx("span",{className:"h1",children:W});const[,ie,Te,ye]=H;return n.jsxs(n.Fragment,{children:[ie&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:ie}),n.jsx("span",{className:"h1 pass-card__price-amount",children:Te}),ye.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:ye.trim()})]})},[A]),ee=o.useCallback(()=>{F&&Z(W=>{if(W)return null;const H=T.current?.getBoundingClientRect();if(!H)return null;const ie=50;return{left:H.left,right:H.right,width:H.width,height:H.height,x:H.x,y:H.y+ie,top:H.top+ie,bottom:H.bottom+ie}})},[F]),V=o.useCallback(W=>{F&&(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),ee())},[F,ee]),ne=[{items:[...B?[{label:x("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{B(),Z(null)},closeOnSelect:!0}]:[],..._?[{label:x("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{_(),Z(null)},closeOnSelect:!0}]:[],...N?[{label:x("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{N(),Z(null)},closeOnSelect:!0}]:[]]}];return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card-frame",children:n.jsxs("div",{ref:T,className:`pass-card pass-card--${c}${F?" pass-card--clickable":""}`,style:P,onMouseEnter:I,onMouseMove:O,onMouseLeave:z,onPointerUp:W=>{W.pointerType==="touch"&&z()},onPointerCancel:W=>{W.pointerType==="touch"&&z()},onClick:ee,onKeyDown:F?V:void 0,role:F?"button":void 0,tabIndex:F?0:void 0,"aria-label":e,"aria-haspopup":F?"menu":void 0,"aria-expanded":F?!!Q:void 0,children:[d??A2(w,D,k),!h&&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:q??w2[w],className:"pass-card__logo",alt:w==="manager"?x("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):x("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),n.jsxs("div",{className:"pass-card__plan",children:[n.jsx("div",{children:te}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:k?x("passCard.labeledPlan",{label:k}):x("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),A?n.jsxs("div",{className:"pass-card__price-area",children:[$&&n.jsx("span",{className:"pass-card__discount body-3",children:$}),n.jsxs("div",{className:"pass-card__price",children:[R&&n.jsx("span",{className:"pass-card__price-original body-3",children:ca(R)}),de]})]}):G?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:G.remainingLabel}),G.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:G.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."})]})]})}),Q&&n.jsx(yn,{anchorRect:Q,onClose:se,ariaLabel:x("tooltip.menu","\uBA54\uB274"),children:n.jsx(Wa,{columns:ne,onClose:se,size:"small"})})]})}const N2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function E2(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,a=Mt(N2,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("${Ha}")`}})]})}const D2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function S2(e={}){const t=Mt(D2,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("${Ha}")`}})]})}function j2(e,t){if(e){if(t==="manager_pro")return n.jsx(S2,{});if(t==="manager_standard")return n.jsx(E2,{});if(t==="manager_lite")return n.jsx(lu,{})}}function T2(e){const t=ca(e);if(!t)return null;const a=t.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!a)return t;const[,r,s,l]=a;return n.jsxs(n.Fragment,{children:[r&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:r}),s,l.trim()&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:l.trim()})]})}function M2(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:s,onSelect:l,period:i="monthly",ownedCodes:u}=e||{},c=_=>!!_&&!!u?.includes(_),d=_=>_.onceOnly??/오픈\s*특가/.test(_.label??""),h=(s.tiers||[]).some(_=>d(_)&&c(_.code)),p=_=>{const N=_.prices?_.prices[i]:_.price;return N?(s.tiers||[]).some(x=>!!x.badge&&x.originals?.[i]===N):!1},m=s.colorToken?`var(--color-${s.colorToken})`:"var(--color-gray)",g=t("payment.plan.freePrice","\uBB34\uB8CC"),y=t("payment.products.mgrEnterprise.tier.price","\uBB38\uC758"),C=_=>_.prices?_.prices[i]:_.price,b=(s.tiers||[]).length>0&&(s.tiers||[]).every(_=>{const N=C(_);return N==="\uBB34\uB8CC"||N===g||N==="0\uC6D0"||typeof N=="string"&&/\d/.test(N)&&!/[1-9]/.test(N)}),v=(s.tiers||[]).length>0&&(s.tiers||[]).every(_=>{const N=C(_);return N==="\uBB38\uC758"||N===y}),f=s.group==="org",B=f?"manager":"speechear";return n.jsxs("div",{className:"payment-plan__card",style:{borderColor:m,"--plan-color":m},children:[s.cardBadge&&n.jsx("div",{className:"payment-plan__card-badge",children:n.jsx(jt,{label:s.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:m},children:s.quote||"\xA0"}),n.jsx("h3",{className:"payment-plan__title-heading h1",children:s.tier??s.title}),n.jsx("p",{className:"payment-plan__subtitle body-3",children:s.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:(s.recommendedFor||[]).map((_,N)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(nt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),_]},N))})]}),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:(s.features||[]).map((_,N)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(nt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),_]},N))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:b?null:v?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:()=>s.tiers?.[0]&&l?.({...s.tiers[0],productId:s.id,productTitle:s.title})}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"payment-plan__pricing-list",children:(s.tiers||[]).map(_=>{const N=_.label||a,x=d(_),E=x||_.openPromo===!0,w=N.replace(/^오픈\s*특가\s*/,"")||a,D=_.prices?_.prices[i]:_.price,k=_.badge?E?`${r}
|
|
823
|
-
${_.badge}`:_.badge:void 0;if(x&&c(_.code))return null;if(!_.badge&&!h)return p(_)?null:n.jsxs("div",{className:`payment-plan__pricing-row payment-plan__pricing-row--static${_.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:_.label})}),n.jsx("div",{className:"payment-plan__pricing-row-price",children:n.jsx("span",{className:"payment-plan__pricing-current h1",children:T2(D)})})]},_.id);const A=s.tier??(f?s.title:void 0),R=n.jsx(cu,{showPrice:!0,product:{type:B,code:_.code,name:w,label:A,price:D,originalPrice:_.originals?.[i]??void 0,discountLabel:k},bg:j2(f,s.id)}),$=()=>l?.({..._,productId:s.id,productTitle:s.title,preview:R});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:$,onKeyDown:l?G=>{G.target===G.currentTarget&&(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),$())}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:R},_.id)})})})})]})}function L2({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 du={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#c9c9c9"};function $2(){const e=Mt(du,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 pu={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function R2(e={}){const t=Mt(pu,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("${Ha}")`}})]})}function hu({keys:e,anchor:t="top-right",scale:a,className:r=""}){const s=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:s.map((l,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:l})]},`${l}-${i}`))})}const Va=(e,t,a)=>e+(t-e)*a;function P2({speakers:e,size:t=300,viewT:a=0,activeSpeakerId:r=null,playedIds:s,selectedId:l=null,answerId:i=null,showFeedback:u=!1,pulseSelected:c=!1,pulseSelectedDuration:d,pulseScale:h,clickable:p=!1,onSelectSpeaker:m,buttonSize:g=40,showIcon:y=!0,onCenterClick:C,centerLabel:b,centerDisabled:v=!1,centerAttention:f=!1,shortcutAnchor:B="top-right",shortcutScale:_,scaleShortcut:N=!1}){const{t:x}=_e.useTranslation(),E=Math.max(0,Math.min(1,a)),w=t/2,D=110/300,k=.18,A=W=>t*(D+(W-1)*k),R=W=>{const H=A(W.row??1),ie=W.angleDeg*Math.PI/180;return{x:w+H*Math.cos(ie),y:w+H*Math.sin(ie)}},$=Math.max(...e.map(W=>W.row??1),1),G=t*.08,T=t*.1,P=t*.24,L=t-2*G,Q=t-T-P,Z=t-P/2,F=o.useMemo(()=>[...new Set(e.map(W=>W.deg))].sort((W,H)=>W-H),[e]),K=F.length,M=Math.max(68,K>1?L/(K-1):0),q=o.useMemo(()=>new Map(F.map((W,H)=>[W,H])),[F]),Y=W=>{const H=q.get(W.deg)??0,ie=w+(H-(K-1)/2)*M,Te=$>1?Math.min(68,Q/($-1)):0,ye=Te*($-1),he=T+(Q-ye)/2,Se=$===1?T+Q*.4:he+($-(W.row??1))*Te;return{x:ie,y:Se}},U=W=>{const H=R(W),ie=Y(W);return{x:Va(H.x,ie.x,E),y:Va(H.y,ie.y,E)}},S={x:w,y:Va(w,Z,E)},I=Math.round(g*1.2),O=Math.round(Math.max(16,Math.min(80,g*.7))),z=[],se=new Map;for(const W of e){const H=W.row??1;se.has(H)||se.set(H,[]),se.get(H).push(W)}for(const[W,H]of se.entries()){if(H.length<2)continue;const ie=[...H].sort((He,ot)=>He.deg-ot.deg),Te=ie.map(He=>U(He)),ye=ie.map(He=>He.deg),he=ye[ye.length-1]-ye[0],Se=he/(ye.length-1),$e=360-he,Ne=ie.length>=3&&Se>0&&$e<=Se*1.5,ue=Math.round(A(W)*1e3)/1e3,xe=(He,ot,Qe,Je)=>{const vt=(ot.angleDeg-He.angleDeg+540)%360-180;if(vt===0)return`L ${Je.x} ${Je.y}`;if(E===0)return`A ${ue} ${ue} 0 0 ${vt>0?1:0} ${Je.x} ${Je.y}`;const je=(He.angleDeg+vt/2)*Math.PI/180,Ye={x:w+ue*Math.cos(je),y:w+ue*Math.sin(je)},Be={x:(Qe.x+Je.x)/2,y:(Qe.y+Je.y)/2},Ue={x:Va(Ye.x,Be.x,E),y:Va(Ye.y,Be.y,E)},qe={x:2*Ue.x-Be.x,y:2*Ue.y-Be.y};return`Q ${qe.x} ${qe.y} ${Je.x} ${Je.y}`},ke=Ne?[...ie,ie[0]]:ie,Ee=Ne?[...Te,Te[0]]:Te;let We=`M ${Ee[0].x} ${Ee[0].y}`;for(let He=1;He<Ee.length;He++)We+=" "+xe(ke[He-1],ke[He],Ee[He-1],Ee[He]);z.push({key:`arc-${W}`,d:We})}const te=o.useMemo(()=>new Set(s??[]),[s]),de=W=>({idle:"",active:x("soundCompass.state.active","\uC18C\uB9AC \uB098\uB294 \uC911"),played:x("soundCompass.state.played","\uB4E4\uC74C"),correct:x("soundCompass.state.correct","\uC815\uB2F5"),wrong:x("soundCompass.state.wrong","\uC624\uB2F5")})[W],ee=W=>{if(r===W.id)return"active";if(u){if(W.id===i)return"correct";if(W.id===l&&l!==i)return"wrong"}return te.has(W.id)?"played":"idle"},V=W=>r===W.id?"loop":u?W.id===i?"loop":null:c&&W.id===l?"once":null,ne=(W,H)=>{switch(W){case"played":case"correct":return n.jsx(Fs,{size:H});case"wrong":return n.jsx(Ys,{size:H});default:return n.jsx(Ks,{size:H})}};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:[E===0&&e.map(W=>{const{x:H,y:ie}=U(W);return n.jsx("line",{x1:S.x,y1:S.y,x2:H,y2:ie,stroke:"#dde3ec",strokeWidth:"1"},W.id)}),z.map(W=>n.jsx("path",{d:W.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},W.key))]}),f&&!v&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:I,height:I,left:S.x-I/2,top:S.y-I/2}}),C?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${v?" sound-compass__center--disabled":""}`,style:{width:I,height:I,left:S.x,top:S.y},"aria-label":b,"aria-disabled":v||void 0,tabIndex:v?-1:0,onClick:v?void 0:C,children:n.jsx(Fr,{size:O,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:I,height:I,left:S.x,top:S.y},children:n.jsx(Fr,{size:O,color:"currentColor",strokeWidth:1.5})}),e.map((W,H)=>{const{x:ie,y:Te}=U(W),ye=ee(W),he=V(W),Se={..._!==void 0||N?{"--shortcut-badge-scale":String(_??Math.max(.75,Math.min(3,g/56)))}:null,pointerEvents:p?"auto":"none",cursor:p?"pointer":"default",zIndex:ye!=="idle"?10:1},$e=g,Ne=Math.round(Math.max(10,Math.min(56,$e*.38))),ue=Math.round(Math.max(7,Math.min(18,$e*.2))),xe=Math.round(Math.max(10,Math.min(56,$e*.4))),ke=y==="answered"&&(ye==="played"||ye==="correct"||ye==="wrong"),Ee=y===!0||ke,We=!ke;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...Se,left:ie-$e/2,top:Te-$e/2},children:[he&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${ye}`+(he==="once"?" sound-compass__pulse--once":""),style:{width:$e,height:$e,...he==="once"&&d!==void 0?{"--sc-pulse-duration-once":`${d}ms`}:null,...h!==void 0?{"--sc-pulse-scale":String(h)}:null}}),n.jsxs("button",{type:"button",tabIndex:p?0:-1,"aria-disabled":p?void 0:!0,onClick:p?()=>m?.(W.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${ye}`,style:{width:$e,height:$e},"aria-label":de(ye)?`${W.label}, ${de(ye)}`:W.label,"aria-pressed":l!=null?W.id===l:void 0,children:[Ee&&ne(ye,Ne),We&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:y===!0?ue:xe},children:H+1})]}),W.shortcut&&n.jsx(hu,{keys:W.shortcut,anchor:B,className:"sound-compass__speaker-shortcut"})]},W.id)})]})})}function I2({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 F2({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 mu({checked:e,onChange:t,name:a,value:r,disabled:s=!1,label:l,className:i=""}){const u=o.useId();return n.jsxs("label",{className:`radio${s?" radio--disabled":""} ${i}`.trim(),htmlFor:u,children:[n.jsx("input",{id:u,type:"radio",name:a,value:r,checked:e,disabled:s,onChange:c=>t?.(c.target.checked)}),n.jsx("span",{className:"radio__dot"}),l&&n.jsx("span",{className:"radio__label body-2",children:l})]})}function O2({options:e,value:t,onChange:a,name:r,disabled:s=!1,direction:l="vertical",className:i="",ariaLabel:u}){const c=o.useId(),d=r??`radio-group-${c}`;return n.jsx("div",{className:`radio-group radio-group--${l} ${i}`.trim(),role:"radiogroup","aria-label":u,children:e.map(h=>n.jsx(mu,{name:d,value:h.value,checked:t===h.value,disabled:s||h.disabled,label:h.label,onChange:p=>{p&&a?.(h.value)}},h.value))})}const z2={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function W2({tone:e="info",title:t,message:a,children:r,dismissible:s=!1,onDismiss:l,live:i,className:u=""}){const{t:c}=_e.useTranslation(),[d,h]=o.useState(!1),p=o.useRef(null),m=o.useCallback(()=>{const f=p.current;f&&f.contains(document.activeElement)&&cr(f),h(!0),l?.()},[l]);if(d)return null;const g=we("alert",`alert--${e}`,u),y=i??(e==="danger"||e==="warning"?"assertive":"polite"),C=y==="assertive"?"alert":y==="polite"?"status":void 0,b=!!t,v=!!(a||r);return n.jsxs("div",{ref:p,className:g,role:C,children:[n.jsxs("div",{className:"alert__body",children:[n.jsxs("div",{className:"alert__header",children:[n.jsx(nt,{icon:z2[e],size:20,className:"alert__icon"}),b&&n.jsx("span",{className:"alert__title body-2",children:t}),!b&&v&&n.jsx("div",{className:"alert__message body-3",children:a||r})]}),b&&v&&n.jsx("div",{className:"alert__message alert__message--indented body-3",children:a||r})]}),s&&n.jsx("button",{type:"button",className:"alert__dismiss",onClick:m,"aria-label":c("common.close","\uB2EB\uAE30"),children:"\xD7"})]})}const H2={ready:"search",guide:"info",error:"circle-alert"};function V2(e,t){const a=t.filter(Boolean);if(a.length===0)return e;const r=[];let s=0,l=0;for(const i of a){const u=e.indexOf(i,s);u<0||(u>s&&r.push(e.slice(s,u)),r.push(n.jsx("strong",{className:"search-summary__em body-2",children:i},l++)),s=u+i.length)}return s<e.length&&r.push(e.slice(s)),r}function q2({status:e="guide",label:t,children:a,emphasis:r,icon:s,className:l=""}){const i=s===!1?null:s??H2[e],u=we("search-summary",`search-summary--${e}`,l),c=t??a,d=typeof c=="string"&&r&&r.length>0?V2(c,r):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[i!=null&&n.jsx(nt,{icon:i,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:d})]})}function qa({title:e,items:t}){const{t:a}=_e.useTranslation(),{anchorRect:r,openAt:s,close:l}=Fa(),i=o.useRef(null),u=vo(!!r,(c,d)=>{c&&d?s(i.current?.querySelector("button")??d):l()},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=>{ha(c)||s(c.currentTarget)},onPointerLeave:c=>{ha(c)||l()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{ma()||s(c.currentTarget)},onBlur:l}),r&&n.jsx(Yn,{title:e,items:t,showIndex:t.length>1,anchorRect:r,onClose:l})]})}function U2({items:e=[],value:t,onChange:a,className:r="",size:s=40}){const l=o.useId(),{t:i}=_e.useTranslation(),u=o.useRef(null),c=e.find(C=>!C.disabled)?.key,d=e.some(C=>C.key===t)?t:c??e[0]?.key,h=e.find(C=>C.key===d&&!C.disabled)?.key??c,p=()=>Array.from(u.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),m=(C,b=p())=>{if(b.length===0)return;const v=(C%b.length+b.length)%b.length;b[v]?.focus(),b[v]?.click()},g=C=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(C.key))return;C.preventDefault();const b=p(),v=b.indexOf(C.currentTarget);C.key==="ArrowRight"||C.key==="ArrowDown"?m(v+1,b):C.key==="ArrowLeft"||C.key==="ArrowUp"?m(v-1,b):C.key==="Home"?m(0,b):m(b.length-1,b)},y=e.find(C=>C.key===d);return n.jsxs("div",{className:`tabs ${r}`.trim(),children:[n.jsx("div",{ref:u,className:`tabs__list tabs__list--${s}`,role:"tablist","aria-label":i("tabs.ariaLabel","\uD0ED"),children:e.map(C=>n.jsx("button",{id:`tabs__tab-${l}-${C.key}`,type:"button",role:"tab","aria-selected":C.key===d,"aria-controls":`tabs__panel-${l}-${C.key}`,disabled:C.disabled,tabIndex:C.key===h?0:-1,className:`tabs__tab body-2${C.key===d?" tabs__tab--active":""}`,onClick:()=>{C.key!==t&&a?.(C.key)},onKeyDown:g,children:C.label},C.key))}),y&&n.jsx("div",{id:`tabs__panel-${l}-${y.key}`,role:"tabpanel","aria-labelledby":`tabs__tab-${l}-${y.key}`,tabIndex:0,className:"tabs__panel",children:y.panel},y.key)]})}const G2={xs:12,sm:16,md:20,lg:28,xl:36};function K2(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 Y2({src:e,name:t,size:a="md",shape:r="circle",className:s=""}){const{t:l}=_e.useTranslation(),[i,u]=o.useState(null),c=!!e&&i===e,d=t?K2(t):"",h=!!e&&!c,p=!h&&!!d,m=t||l("avatar.ariaLabel","\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0");return n.jsxs("span",{className:`avatar avatar--${a} avatar--${r} ${s}`.trim(),role:"img","aria-label":m,children:[h&&n.jsx("img",{className:"avatar__image",src:e,alt:m,onError:()=>u(e??null)}),!h&&p&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:d}),!h&&!p&&n.jsx(nt,{icon:"user-round",size:G2[a],className:"avatar__icon"})]})}function Z2(e,t){if(!t)return!0;const a=t.split(",").map(l=>l.trim()).filter(Boolean);if(a.length===0)return!0;const r=e.name.toLowerCase(),s=e.type.toLowerCase();return a.some(l=>{const i=l.toLowerCase();return i.startsWith(".")?r.endsWith(i):i.endsWith("/*")?s.startsWith(i.slice(0,-1)):s===i})}function X2({onFilesSelected:e,accept:t,multiple:a=!1,disabled:r=!1,showFileList:s=!0,files:l,onRemove:i,className:u=""}){const{t:c}=_e.useTranslation(),d=o.useRef(null),[h,p]=o.useState(!1),[m,g]=o.useState([]),y=l??m,C=x=>{if(!x||x.length===0)return;const E=Array.from(x).filter(D=>Z2(D,t));if(E.length===0)return;const w=a?E:E.slice(0,1);if(l===void 0){const D=a?[...y,...w]:w;g(D),e?.(D)}else e?.(w)},b=x=>{x.preventDefault(),!r&&p(!0)},v=x=>{x.preventDefault(),p(!1)},f=x=>{x.preventDefault(),p(!1),!r&&C(x.dataTransfer.files)},B=x=>{const E=x.target;try{C(E.files)}finally{E.value=""}},_=()=>{r||d.current?.click()},N=x=>{if(!r&&(i?.(x),l===void 0)){const E=y.filter((w,D)=>D!==x);g(E),i||e?.(E)}};return n.jsxs("div",{className:`file-upload ${u}`.trim(),children:[n.jsxs("div",{className:we("file-upload__dropzone",h&&"file-upload__dropzone--dragging",r&&"file-upload__dropzone--disabled"),role:"button",tabIndex:r?-1:0,"aria-disabled":r,onClick:_,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),_())},onDragOver:b,onDragLeave:v,onDrop:f,children:[n.jsx(nt,{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:x=>{x.stopPropagation(),_()},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:B,tabIndex:-1})]}),s&&y.length>0&&n.jsx("ul",{className:"file-upload__list",children:y.map((x,E)=>n.jsxs("li",{className:"file-upload__list-item body-3",children:[n.jsx("span",{className:"file-upload__file-name body-3",children:x.name}),n.jsx("button",{type:"button",className:"file-upload__remove-button","aria-label":c("fileUpload.removeAriaLabel",{name:x.name}),disabled:r,onClick:()=>N(E),children:n.jsx(nt,{icon:"x",size:14})})]},`${x.name}-${E}`))})]})}function J2({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,s)=>{const l=s===e.length-1;return n.jsxs("li",{className:"breadcrumb__item",children:[l?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}),!l&&n.jsx(nt,{icon:"chevron-right",size:14,className:"breadcrumb__separator"})]},s)})})})}const Q2={small:14,medium:20,large:28};function ev({value:e,onChange:t,max:a=5,readOnly:r=!1,size:s="medium",ariaLabel:l,className:i=""}){const{t:u}=_e.useTranslation(),c=r||!t,[d,h]=o.useState(null),p=c?e:Number.isFinite(e)?Math.round(e):0,m=d??p,g=Q2[s],y=x=>{x!==e&&t?.(x)},C=x=>{c||y(x)},b=x=>{c||ma()||h(x)},v=o.useRef(null),f=x=>{const E=Math.min(a,Math.max(1,x));y(E),Array.from(v.current?.querySelectorAll("[data-star]")??[]).find(w=>w.dataset.star===String(E))?.focus()},B=x=>{if(!c){switch(x.key){case"ArrowRight":case"ArrowUp":f((p||0)+1);break;case"ArrowLeft":case"ArrowDown":f((p||1)-1);break;case"Home":f(1);break;case"End":f(a);break;default:return}x.preventDefault()}},_=p>=1&&p<=a?Math.round(p):1,N=()=>{c||h(null)};return n.jsx("div",{className:`rating rating--${s}${c?" rating--readOnly":""} ${i}`.trim(),ref:v,onKeyDown:B,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:a}):l??u("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:N,onPointerUp:x=>{x.pointerType==="touch"&&N()},onPointerCancel:x=>{x.pointerType==="touch"&&N()},children:Array.from({length:a},(x,E)=>{const w=E+1,D=Math.max(0,Math.min(1,m-E)),k=D>0&&D<1,A=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(nt,{icon:"star",size:g,className:"rating__star rating__star--empty"}),D>0&&n.jsx("span",{className:`rating__star-fill${k?" rating__star-fill--half":""}`,style:k?{width:`${D*100}%`}:void 0,children:n.jsx(nt,{icon:"star",size:g,className:"rating__star rating__star--filled"})})]});return c?n.jsx("span",{className:"rating__item","aria-hidden":"true",children:A},w):n.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":p===w,"aria-label":u("rating.starLabel",{n:w}),"data-star":w,tabIndex:w===_?0:-1,onClick:()=>C(w),onMouseEnter:()=>b(w),children:A},w)})})}const tv=20,nv=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function av({value:e,onChange:t,palette:a=nv,size:r=40,className:s="",ariaLabel:l}){const{t:i}=_e.useTranslation();return n.jsx("div",{className:`color-picker ${s}`.trim(),role:"group","aria-label":l,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(nt,{icon:"check",size:tv,className:"color-picker__check"})},u)})})}function Cu({icon:e,label:t,tooltip:a,wrapperStyle:r,color:s,bgColor:l,useHover:i=!0,iconSize:u="medium"}){const{t:c}=_e.useTranslation(),d=u==="small",h=we("category-icon",d?"category-icon--small":""),p=d?16:20,m=o.useRef(null),[g,y]=o.useState(!1),C=o.useMemo(()=>{const w=r&&typeof r=="object"?{...r}:{};return!s&&!l?w:{...w,...s?{color:s,"--t-item-fg":s}:{},...l?{"--t-item-bg":l}:{}}},[r,s,l]),b=a||t,v=i&&!!b,[f,B]=o.useState(null);o.useLayoutEffect(()=>{g&&B(m.current?.getBoundingClientRect()??null)},[g]),o.useEffect(()=>{if(!i&&g)try{y(!1)}catch{}},[i,g]),o.useEffect(()=>{if(!g)return;const w=D=>{const k=m.current;if(!k)return;const A=D.target;A&&!k.contains(A)&&y(!1)};return document.addEventListener("pointerdown",w,!0),()=>document.removeEventListener("pointerdown",w,!0)},[g]);const _=o.useCallback(()=>{i&&y(!0)},[i]),N=o.useCallback(()=>{i&&y(!1)},[i]),x=o.useCallback(()=>y(!1),[]),E=o.useCallback(w=>{if(w.key==="Escape"){y(!1);return}(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),y(D=>!D))},[]);return n.jsxs("span",{ref:m,className:we("category-icon__wrap",v&&"category-icon__wrap--interactive"),onPointerEnter:_,onPointerLeave:N,onFocus:_,onBlur:N,onKeyDown:E,role:"button",tabIndex:0,"aria-label":typeof b=="string"?c("common.descriptionFor",{name:b,defaultValue:`${b} \uC124\uBA85`}):void 0,"aria-haspopup":!!b,"aria-expanded":g,"data-tooltip-ignore":!0,children:[n.jsx(nt,{icon:e,label:t,className:h,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:C,size:p}),g&&b&&n.jsx(Dn,{anchorRect:f,text:typeof b=="string"?b:void 0,offset:8,onClose:x,className:"category-icon__tooltip",ariaLabel:typeof b=="string"?b:void 0})]})}let Wn=null;function Ua(e){if(Wn&&Wn!==e)try{Wn()}catch{}return Wn=e,()=>{Wn===e&&(Wn=null)}}function fr(e){if(Wn===e){Wn=null;try{e()}catch{}}}function Ga(e,t){let a=()=>{};const r=new Promise(u=>{a=u});if(typeof e!="string"||e.trim()===""){Nt("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 s=!1;const l=u=>{if(!s){s=!0;try{t?.(u)}catch{}a(u)}};let i;try{i=new Audio(e)}catch{return l(!1),{el:{},stop:()=>{},done:r}}i.onended=()=>l(!0),i.onerror=()=>l(!1);try{i.play().catch(()=>l(!1))}catch{l(!1)}return{el:i,stop:()=>{try{i.pause()}catch{}l(!1)},done:r}}function rv(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 s=a.sentences||a.items||[],l=r(Array.isArray(s)?s:[]);return l.length===0&&(a.contextCode||a.context_code)&&l.push(String(a.contextCode||a.context_code)),{previewCodes:l,previewBucket:null}}function ov(e,t){const[a,r]=o.useState(!1),[s,l]=o.useState(-1),[i,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),d=o.useRef(!1),h=o.useRef(null),p=o.useRef(null),[m,g]=o.useState(!1),y=o.useRef([]),{previewCodes:C,previewBucket:b}=rv(e,t),v=`${C.join(",")}|${b??""}`,f=o.useMemo(()=>i.key===v?i.urls:[],[i,v]);o.useEffect(()=>{if(!C.length)return;let _=!1;return(async()=>{const N=[],x=[];for(const E of C)try{const w=xl(E,b);if(!w){N.push("");continue}let D=null;try{D=await wl(w)}catch{}if(!D)try{const k=await Bl(w);k&&(D=URL.createObjectURL(k),x.push(D))}catch{}N.push(D??"")}catch{N.push("")}_?x.forEach(E=>{try{URL.revokeObjectURL(E)}catch{}}):(y.current.forEach(E=>{try{URL.revokeObjectURL(E)}catch{}}),y.current=x,u({key:v,urls:N}))})(),()=>{_=!0}},[C.join(","),b]),o.useEffect(()=>()=>{y.current.forEach(_=>{try{URL.revokeObjectURL(_)}catch{}}),y.current=[]},[]);const B=o.useCallback(async _=>{if(_.stopPropagation(),_.preventDefault(),d.current){h.current&&fr(h.current),d.current=!1;try{c.current?.pause()}catch{}r(!1),l(-1);return}if(!f.filter(Boolean).length)return;let N=null;const x=()=>{d.current=!1,N?.stop()};h.current=x;const E=Ua(x);d.current=!0,r(!0);for(let w=0;w<f.length&&d.current;w++){const D=f[w];if(D&&(l(w),N=Ga(D),c.current=N.el,!await N.done))break}E(),h.current===x&&(h.current=null,d.current=!1,r(!1),l(-1))},[f]);return o.useEffect(()=>()=>{h.current&&fr(h.current),d.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:a,playingIndex:s,previewUrls:f,previewHover:m,setPreviewHover:g,previewBtnRef:p,handlePreview:B}}const sv=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 s=r;return s.sentence||s.text||s.context||s.question||s.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:s,depth:l,renderPopup:i,completed:u,completedIds:c,selectedIds:d,tooltipText:h,useDescriptionTooltip:p=!1,onRemove:m,hideCheckBadge:g=!1,showTypeLabel:y=!1,onComplete:C,onSelect:b,onMore:v,countLabelOverride:f,size:B="square"}=e||{},{t:_}=_e.useTranslation(),[N,x]=o.useState(!1),E=o.useRef(null),[w,D]=o.useState(!1);o.useEffect(()=>{E.current?.matches(":hover")&&D(!0)},[]);const{playing:k,playingIndex:A,previewUrls:R,previewHover:$,setPreviewHover:G,previewBtnRef:T,handlePreview:P}=ov(r,a?.key),L=o.useCallback(()=>{b?b():x(!0)},[b]),Q=o.useCallback(()=>x(!1),[]),Z=o.useCallback(()=>D(!0),[]),F=o.useCallback(()=>D(!1),[]),K=o.useCallback(()=>G(!0),[G]),M=o.useCallback(()=>G(!1),[G]),[q,Y]=o.useState(null);o.useLayoutEffect(()=>{$&&Y(T.current?.getBoundingClientRect()??null)},[$,T]);const[U,S]=o.useState(null);o.useLayoutEffect(()=>{w&&!N&&p&&S(E.current?.getBoundingClientRect()??null)},[w,N,p]);const I=o.useCallback(Be=>{Be.target===Be.currentTarget&&(Be.key==="Enter"||Be.key===" ")&&(Be.preventDefault(),L())},[L]),O=r||null,z=o.useMemo(()=>{if(!p)return null;const Be=h?(Array.isArray(h)?h:[h]).filter(Boolean):null,Ue=Be&&Be.length>0?Be:sv(O);return Ue&&Ue.length>0?Ue:null},[p,h,O]),se=o.useCallback(Be=>{Be.stopPropagation(),m?.()},[m]),te=o.useCallback(Be=>Be.stopPropagation(),[]),de=o.useCallback(Be=>{typeof C=="function"&&C(Be)},[C]),ee=u||(c&&r?.id!=null?c.has(String(r.id)):!1),V=!ee&&(d!=null&&r?.id!=null?d.has(String(r.id)):!1);Ii("speechear.popup.close",Q);const ne=Kl(),W=`${a?.label||""} ${t+1}`,H=O?.title||O?.name||W;let ie=a?.icon,Te,ye="",he="";try{const Be=O?.category_0||O?.category_main_code||O?.category_main,Ue=O?.category_1||O?.category_sub_code||O?.category_sub,qe=ne.find(pt=>pt.key===Be);qe?.icon&&(ie=qe.icon),!Te&&qe?.color&&(Te={"--t-item-fg":qe.color}),!Te&&O?.iconColor&&(Te={"--t-item-fg":O.iconColor}),ye=qe?_(`topic.${qe.key}`,{defaultValue:qe.label||""}):"";try{const pt=qe?.subs?.find(_t=>_t.key===Ue);he=pt?_(`topic.sub.${pt.key}`,{defaultValue:pt.label||""}):""}catch{}}catch{}const Se=he?`${ye} / ${he}`:ye||a?.label||H,$e=Be=>_("training.countQuestions",{n:Be,count:Be}),Ne=Be=>_("training.countSentences",{n:Be,count:Be});let ue="";try{if(O)if(a?.key==="LISTEN_IN_NOISE"){let Be=0;Array.isArray(O.items)&&O.items.length>0?Be=O.items.length:Array.isArray(O.sentences)&&O.sentences.length>0?Be=O.sentences.length:O.sentences&&(Be=1),ue=Ne(Be)}else if(a?.key==="SHORT_STORY"){let Be=1;Array.isArray(r?.items)?Be=r.items.length:Array.isArray(r?.raw&&r.raw?.items)?Be=r.raw.items.length:Array.isArray(O?.questions)?Be=O.questions.length:Array.isArray(O?.sentences)&&(Be=O.sentences.length),ue=$e(Be)}else if(a?.key==="LONG_STORY"){let Be=1;if(Array.isArray(O.items)&&O.items.length>0){const Ue=O.items.reduce((qe,pt)=>{const _t=pt.questionItems;return Array.isArray(_t)?qe+_t.length:Array.isArray(pt.questions)?qe+pt.questions.length:qe},0);Be=Ue>0?Ue:O.items.length}else Array.isArray(O.questions)&&O.questions.length>0?Be=O.questions.length:Array.isArray(O.sentences)&&O.sentences.length>0&&(Be=O.sentences.length);ue=$e(Be)}else if(a?.key==="ORDERING_SENTENCE"){let Be=1;Array.isArray(O.items)&&O.items.length>0?Be=O.items.length:Array.isArray(O.sentences)&&O.sentences.length>0&&(Be=O.sentences.length),ue=Ne(Be)}else Array.isArray(O.items)&&(ue=O.items.length>0?$e(O.items.length):"")}catch{}const xe=B==="row",ke=B==="list"||xe,Ee=B==="compact",We=B==="small",He=We&&a?.key?Wf().find(Be=>Be.key===a.key):void 0,ot=He?Yl[He.key]:void 0,Qe=He?ot?_(`trainingType.${ot}.title`,{defaultValue:He.label}):He.label??"":"",Je=y&&a?.label&&a.label!==String(H)?String(a.label):We&&Qe&&Qe!==String(H)?Qe:"",vt=!!Je,je=f!==void 0?f:ue,Ye=[Je,typeof H=="string"?H:"",je].map(Be=>String(Be??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:E,className:`training-block-button${ke?" training-block-button--list":""}${xe?" training-block-button--row":""}${Ee?" training-block-button--compact":""}${We?" training-block-button--small":""}${ee?" training-block-button--completed":""}${V?" training-block-button--selected":""}${vt&&!We?" training-block-button--withType":""}${We&&!vt?" training-block-button--no-type-label":""}`,onClick:L,onPointerEnter:Z,onPointerLeave:F,role:"button",tabIndex:0,onKeyDown:I,"aria-label":typeof s=="string"?s:Ye||void 0,title:!p&&h&&(Array.isArray(h)?h.filter(Boolean).join(`
|
|
824
|
-
`):h)||void 0,children:[n.jsxs("div",{className:"training-block-button__left",children:[y&&a?.label&&a.label!==String(H)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:a.label}),We&&Qe&&Qe!==String(H)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:Qe}),n.jsx(Cu,{icon:ie,label:H,tooltip:Se,wrapperStyle:Te,iconSize:We||Ee?"small":"medium"}),!g&&(ee||V)&&!(m&&w)&&n.jsx(jt,{className:m?"training-block-button__check--removable":void 0,type:"dot",icon:"check",position:"top-left",size:"medium","aria-label":ee?_("training.completed","\uD6C8\uB828 \uC644\uB8CC"):_("training.selected","\uC120\uD0DD\uB428")}),m&&n.jsx(jt,{className:`training-block-button__remove${w?" is-hover":""}`,type:"dot",icon:"remove",position:"top-left",size:"medium","aria-label":_("common.remove","\uC81C\uAC70"),onClick:se}),n.jsx("div",{className:`training-block-button__title ${Ee?"body-3":We?"body-3b":"h3"}`,children:String(H)}),n.jsxs("div",{className:"training-block-button__description",children:[je?n.jsx("div",{className:`training-block-button__count ${We?"caption-2":"caption-1"}`,children:je}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(nt,{icon:"chevron-right",label:_("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:We?12:20})})]}),(ke&&!xe||We)&&R.length>0&&n.jsx("div",{ref:T,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:te,onPointerEnter:K,onPointerLeave:M,children:n.jsx(fe,{htmlType:"button",size:We?28:32,type:"dot",icon:k?"pause":"play",variant:We?"transparent-lightGray":"default",useBorder:!1,selected:k,ariaLabel:String(H).trim()?k?_("training.stopFor",{name:H,defaultValue:`${H} \uC815\uC9C0`}):_("training.previewFor",{name:H,defaultValue:`${H} \uBBF8\uB9AC \uB4E3\uAE30`}):k?_("training.stop","\uC815\uC9C0"):_("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:P})})]}),v&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:Be=>{Be.stopPropagation(),v(Be)},children:n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(H).trim()?_("common.moreFor",{name:H}):_("common.more","\uB354\uBCF4\uAE30")})})]}),$&&n.jsx(Dn,{anchorRect:q,text:k?_("training.stop","\uC815\uC9C0"):_("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:M}),w&&!N&&p&&(z?n.jsx(Yn,{anchorRect:U,items:z,activeIndex:A,onClose:F}):O?.subTitle?n.jsx(Dn,{anchorRect:U,text:O.subTitle,offset:8,onClose:F}):null),N&&i&&i({trainingData:O,typeKey:a?.key??"",onClose:Q,onComplete:de,popupTitle:String(H),popupSubTitle:a?.subTitle,depth:l!=null?String(l):void 0,popupIcon:ie,popupIconTooltip:String(Se),popupWrapperStyle:Te})]})}const fu=200;function lv(e){return e.itemId?(Gf()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function bu({plan:e,groups:t,anchorRect:a,offset:r=12,onClose:s}){const{t:l}=_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):Yf(l).map(c=>{const d=(e?.items??[]).filter(h=>h.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:d.length,data:d.map(lv).filter(h=>h!=null)}}).filter(c=>c.pickedCount>0),[t,e?.items,l]);if(i.length===0)return null;const u=n.jsx("div",{className:le("training-tooltip__box"),children:n.jsx("div",{className:le("training-tooltip__groups"),children:i.flatMap(({key:c,label:d,type:h,data:p},m)=>[m>0?n.jsx("div",{className:le("training-tooltip__divider")},`div-${c}`):null,n.jsxs("div",{className:le("training-tooltip__section"),children:[n.jsx("div",{className:le("training-tooltip__section-header"),children:n.jsx("span",{className:le("training-tooltip__type-label body-3b"),children:d})}),n.jsx("div",{className:le("training-tooltip__items"),children:p.map((g,y)=>n.jsx(Lo,{index:y,type:h,trainingData:g,size:"compact",hideCheckBadge:!0},String(g.id??y)))})]},c)])})});return a?n.jsx(yn,{anchorRect:a,offset:r,onClose:s,closeOnOutsideClick:!1,className:le("training-tooltip"),ariaLabel:l("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const iv=200;function uv({icon:e,count:t,title:a,plan:r,tooltip:s=!0,hoverAccent:l=!1,className:i="",onClick:u,onMouseEnter:c,onMouseLeave:d}){const h=!!u||!!c||s&&!!r,p=we("count-tile",h&&"count-tile--interactive",h&&l&&"count-tile--accent",u&&"count-tile--clickable",i),m=o.useRef(null),[g,y]=o.useState(null),C=o.useRef(null),b=o.useRef(null),v=!!(g&&r&&s),f=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),b.current&&(clearTimeout(b.current),b.current=null)},[]),B=o.useCallback(()=>{f(),y(null)},[f]),_=o.useCallback(()=>{!s||!r||(f(),C.current=setTimeout(()=>{C.current=null,y(m.current?.getBoundingClientRect()??null)},fu))},[s,r,f]),N=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),!b.current&&(b.current=setTimeout(()=>{b.current=null,y(null)},iv))},[]);return o.useEffect(()=>()=>{f()},[f]),o.useEffect(()=>{(!s||!r)&&B()},[s,r,B]),o.useEffect(()=>{if(!v)return;const x=w=>w instanceof Element&&(m.current?.contains(w)||!!w.closest(".training-tooltip")),E=w=>{x(w.target)?f():N()};return document.addEventListener("pointerover",E,!0),()=>document.removeEventListener("pointerover",E,!0)},[v,f,N]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:m,className:p,onClick:u?x=>{B(),u(x)}:void 0,onKeyDown:u?x=>{x.key!=="Enter"&&x.key!==" "||(x.preventDefault(),x.currentTarget.click())}:void 0,onPointerEnter:x=>{x.pointerType==="touch"||x.pointerType==="pen"?B():_()},onMouseEnter:c,onMouseLeave:x=>{N(),d?.(x)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${a} ${t}`,children:[n.jsx(nt,{icon:e,size:20,className:"count-tile__icon"}),n.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:t})]}),g&&r&&n.jsx(bu,{plan:r,anchorRect:g,onClose:B})]})}let Ka=0,gu="",$o="",Ya=0;function yu(){return vu(!1)}function cv(){return vu(!0)}function vu(e){const t=typeof document<"u";Ka===0&&t&&(gu=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(Ya===0&&($o=document.body.style.paddingRight),Ya++,document.body.style.paddingRight="0px"),Ka++;let a=!1;return()=>{a||(a=!0,Ka=Math.max(0,Ka-1),e&&t&&(Ya=Math.max(0,Ya-1),Ya===0&&($o?document.body.style.paddingRight=$o:document.body.style.removeProperty("padding-right"))),Ka===0&&t&&(document.body.style.overflow=gu))}}function dv(){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 pv({open:e,onClose:t,ariaLabel:a,title:r,children:s,size:l="md",closeOnBackdrop:i=!0,closeOnEscape:u=!0,showClose:c=!0,className:d,contentClassName:h}){const{t:p}=_e.useTranslation(),m=o.useId(),g=o.useRef(null),y=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const f=document.activeElement,B=yu(),_=g.current;return fo(_,f),_?.focus(),()=>{B();const N=document.activeElement;(!N||N===document.body||_&&_.contains(N))&&bo(f)?.focus?.()}},[e]);const C=o.useRef(y),b=o.useRef(u);o.useEffect(()=>{C.current=y,b.current=u}),o.useEffect(()=>{if(e)return Kn(()=>{b.current&&C.current()})},[e]);const v=o.useRef(!1);return mo(g,e),!e||typeof document>"u"?null:un.createPortal(n.jsx("div",{className:we("dialog",d),onPointerDown:i?f=>{v.current=f.target===f.currentTarget}:void 0,onMouseDown:f=>{f.target===f.currentTarget&&f.preventDefault()},onClick:i?f=>{const B=v.current;v.current=!1,B&&f.target===f.currentTarget&&y()}:void 0,children:n.jsxs("div",{ref:g,role:"dialog","aria-modal":"true","aria-label":r?void 0:a,"aria-labelledby":r?m:void 0,tabIndex:-1,className:we("dialog__surface",`dialog__surface--${l}`,h),onClick:f=>f.stopPropagation(),children:[r?n.jsx("div",{className:"dialog__header",children:n.jsx("h2",{id:m,className:"dialog__title h4b",children:r})}):null,c?n.jsx("button",{type:"button",className:"dialog__close","aria-label":p("common.close","\uB2EB\uAE30"),onClick:y,children:n.jsx(dv,{})}):null,n.jsx("div",{className:"dialog__body",children:s})]})}),document.body)}function hv({columns:e,rows:t,rowKey:a,title:r,toolbar:s,empty:l,loading:i,caption:u,className:c=""}){const{t:d}=_e.useTranslation(),h=!i&&t.length===0;return n.jsxs("div",{className:we("board",c),children:[r||s?n.jsxs("div",{className:"board__head",children:[r?n.jsx("h2",{className:"board__title",children:r}):n.jsx("span",{}),s?n.jsx("div",{className:"board__toolbar",children:s}):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})}):h?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:l??d("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((p,m)=>n.jsx("tr",{className:"board__row",children:e.map(g=>n.jsx("td",{className:we("board__td",`board__cell--${g.align??"left"}`),children:g.render(p,m)},g.key))},a(p,m)))})]})]})}function mv({name:e,role:t,photo:a,media:r,credentials:s,size:l=190,className:i=""}){return n.jsxs("div",{className:we("person-card",i),children:[n.jsx("div",{className:"person-card__photo",style:{width:l,height:l},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,s?.length?n.jsx("ul",{className:"person-card__credentials",children:s.map(u=>n.jsx("li",{children:u},u))}):null]})}function Cv({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,s)=>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((l,i)=>n.jsx("p",{children:l},i))})]},`${r.label??""}-${s}`))})]},a.title))})}function fv({title:e,kind:t,body:a,badge:r,badgeSrc:s,footer:l,width:i,className:u=""}){const c=r??(s?n.jsx("img",{src:s,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}),l?n.jsx("div",{className:"publication-card__footer",children:l}):null]})}function bv({logo:e,alt:t,onDone:a,durationMs:r=3e3}){const s=Pa(a);return o.useEffect(()=>{const l=setTimeout(()=>s.current?.(),r);return()=>clearTimeout(l)},[r,s]),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 gv({eyebrow:e,eyebrowIndex:t,title:a,description:r,level:s=2,tone:l="dark",className:i=""}){const u=s===1?"h1":"h2";return n.jsxs("div",{className:we("section-header",`section-header--${l}`,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 yv({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 _u(e){return typeof e=="string"?e:e.label}function xu({value:e,onChange:t,suggestions:a,openOnFocus:r=!1,filterSuggestions:s,onSelectSuggestion:l,autoActiveFirst:i=!1}){const u=o.useId(),[c,d]=o.useState(!1),[h,p]=o.useState(-1),m=o.useRef(null),g=o.useMemo(()=>{if(!a.length)return[];const A=e??"";return s===!1?a:A?typeof s=="function"?s(a,A):a.filter(R=>_u(R).toLowerCase().includes(A.toLowerCase())):r?a:[]},[a,e,r,s]),[y,C]=o.useState(!1),b=o.useRef([]),v=y&&g.length===0?b.current:g;o.useEffect(()=>{v.length&&(b.current=v)},[v]);const f=o.useCallback(()=>C(!0),[]),B=o.useCallback(()=>C(!1),[]),_=i?0:-1;o.useEffect(()=>{c||p(_)},[c,_]),o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const N=h<v.length?h:_<v.length?_:-1,x=o.useCallback(A=>{l?l(A):t?.(_u(A)),d(!1)},[t,l]),E=o.useCallback(()=>d(!0),[]),w=o.useCallback(()=>{d(!0),p(_)},[_]),D=o.useCallback(()=>{m.current=setTimeout(()=>d(!1),120)},[]),k=o.useCallback(A=>{A.nativeEvent.isComposing||A.keyCode===229||(A.key==="ArrowDown"?(A.preventDefault(),d(!0),p(R=>Math.min(v.length-1,(R<v.length?R:_)+1))):A.key==="ArrowUp"?(A.preventDefault(),p(R=>Math.max(_,(R<v.length?R:v.length)-1))):A.key==="Enter"?N>=0&&x(v[N]):A.key==="Escape"&&c&&(A.preventDefault(),d(!1)))},[v,N,c,x,_]);return{listId:u,open:c,activeIdx:N,filtered:v,handleFocus:E,handleBlur:D,handleInput:w,handleKeyDown:k,handleSelect:x,handleCompositionStart:f,handleCompositionEnd:B}}const Ro=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Jn(e){const{value:t,defaultValue:a,name:r,inputRef:s,onChange:l,label:i,ariaLabel:u,ariaDescribedBy:c,required:d,placeholder:h,ghostText:p,ghostHint:m,type:g="text",disabled:y=!1,readOnly:C=!1,error:b,helperText:v,maxLength:f,size:B=40,variant:_="input",fullWidth:N=!1,newline:x=!1,multiline:E=!1,rows:w=3,leftIcon:D,rightIcon:k,clearable:A=!1,list:R,showCount:$=!0,className:G="",onFocus:T,onBlur:P,onKeyDown:L,onEnter:Q,inputMode:Z,autoComplete:F,autoFocus:K,suggestions:M,filterSuggestions:q,onSelectSuggestion:Y,autoActiveFirst:U,openOnFocus:S=!1}=e,I=C||y?void 0:M,{t:O}=_e.useTranslation(),z=o.useId();!i&&!u&&Nt(`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 se=`tf-${z}`,te=`tf-helper-${z}`,de=o.useRef(null),ee=xu({value:t??"",onChange:l,suggestions:I??[],openOnFocus:S,filterSuggestions:q,onSelectSuggestion:Y,autoActiveFirst:U}),V=!!I&&ee.open&&ee.filtered.length>0,ne=o.useRef(null),[W,H]=o.useState(null),ie=o.useCallback(()=>{const je=ne.current;if(!je||typeof window>"u")return;const Ye=je.getBoundingClientRect(),Be=230,Ue=window.innerHeight-Ye.bottom<Be+8&&Ye.top>Be+8;H({position:"fixed",left:Ye.left,width:Ye.width,...Ue?{bottom:window.innerHeight-Ye.top+8}:{top:Ye.bottom+8},zIndex:Oa(je)})},[]);Ro(()=>{if(!V)return;ie();let je=null;const Ye=()=>{if(typeof requestAnimationFrame>"u"){ie();return}je===null&&(je=requestAnimationFrame(()=>{je=null,ie()}))},Be=Ue=>{const qe=Ue.target;qe&&qe.nodeType===1&&qe.closest?.(".text-field__suggestions")||Ye()};return window.addEventListener("scroll",Be,!0),window.addEventListener("resize",Ye),()=>{je!==null&&cancelAnimationFrame(je),window.removeEventListener("scroll",Be,!0),window.removeEventListener("resize",Ye)}},[V,ie]);const Te=o.useCallback(je=>{de.current=je,typeof s=="function"?s(je):s&&(s.current=je)},[s]),ye=p?`${p}${m??O("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:h,he=t!==void 0,Se=he&&g==="password",[$e,Ne]=o.useState((a??"").length),ue=he?(t??"").length:$e,xe=o.useRef(t);Ro(()=>{xe.current=t}),o.useEffect(()=>{const je=de.current;if(!Se||!je)return;const Ye=t??"";je.value!==Ye&&(je.value=Ye)},[Se,t]),o.useEffect(()=>{if(!x||!de.current)return;const je=de.current;je.style.height="",je.scrollHeight>je.clientHeight&&(je.style.height=`${je.scrollHeight}px`)},[t,$e,x]);const ke=f!=null&&ue>f,Ee=B===32?16:20,We=we("text-field",`text-field--s${B}`,_==="display"?"text-field--display":"",N?"text-field--full-width":"",y?"text-field--disabled":"",C?"text-field--readonly":"",b?"text-field--error":"",D?"text-field--has-left-icon":"",k||A?"text-field--has-right-icon":"",G),He={id:se,...Se?{}:he?{value:t}:{defaultValue:a},ref:Te,placeholder:ye,name:r,disabled:y,readOnly:C,autoFocus:K,maxLength:f,list:R,inputMode:Z,autoComplete:F,"aria-label":!i&&u?u:void 0,"aria-required":d,"aria-invalid":!!b,"aria-describedby":[v||b?te:null,c].filter(Boolean).join(" ")||void 0,role:I?"combobox":void 0,"aria-autocomplete":I?"list":void 0,"aria-haspopup":I?"listbox":void 0,"aria-expanded":I?V:void 0,"aria-controls":V?ee.listId:void 0,"aria-activedescendant":V&&ee.activeIdx>=0?`${ee.listId}-option-${ee.activeIdx}`:void 0,onChange:je=>{const Ye=je.target;he||Ne(Ye.value.length),l?.(Ye.value),I&&ee.handleInput(),Se&&queueMicrotask(()=>{const Be=xe.current??"";Ye.value!==Be&&(Ye.value=Be)})},onCompositionStart:I?ee.handleCompositionStart:void 0,onCompositionEnd:I?ee.handleCompositionEnd:void 0,onFocus:(je=>{T?.(je),I&&ee.handleFocus()}),onBlur:(je=>{P?.(je),I&&ee.handleBlur()}),onKeyDown:(je=>{const Ye=(je.key==="Tab"&&!je.shiftKey||je.key===" ")&&!je.nativeEvent.isComposing;if(p&&Ye&&!C&&!y&&!(je.currentTarget.value??"").trim()){je.preventDefault();const Be=je.currentTarget;he||(Be.value=p,Ne(p.length)),l?.(p);return}I&&je.key==="Enter"&&!je.nativeEvent.isComposing&&ee.activeIdx>=0?je.preventDefault():Q&&je.key==="Enter"&&!je.nativeEvent.isComposing&&(je.preventDefault(),Q()),L?.(je),I&&ee.handleKeyDown(je)})},ot=A&&!y&&!C&&ue>0,Qe=()=>x?n.jsx("textarea",{...He,className:"text-field__input text-field__input--auto body-2",rows:1}):E?n.jsx("textarea",{...He,className:"text-field__input text-field__input--textarea body-2",rows:w}):n.jsx("input",{...He,type:g,className:"text-field__input body-2"}),Je=_==="display"&&!x&&!E&&!!ye,vt=()=>n.jsxs(n.Fragment,{children:[Qe(),Je&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:ye})]});return n.jsxs("div",{ref:ne,className:We,children:[i&&n.jsxs("label",{htmlFor:se,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:[D&&n.jsx("span",{className:"text-field__icon text-field__icon--left",children:n.jsx(nt,{icon:D,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ee})}),vt(),f!=null&&$&&n.jsxs("span",{className:`text-field__count caption-2${ke?" text-field__count--over":""}`,children:[ue,"/",f]}),ot&&n.jsx(fe,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:O("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:je=>{je.preventDefault()},onClick:()=>{!he&&de.current&&(de.current.value="",Ne(0)),l?.("")},tabIndex:-1}),k&&!ot&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(nt,{icon:k,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ee})})]}),!!I&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:ee.open&&(t??"").length>0&&ee.filtered.length===0?O("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),V&&(typeof document>"u"?null:un.createPortal(n.jsx("ul",{id:ee.listId,className:"text-field__suggestions",role:"listbox",style:W??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:ee.filtered.map((je,Ye)=>n.jsx("li",{id:`${ee.listId}-option-${Ye}`,role:"option","aria-selected":Ye===ee.activeIdx,className:`text-field__suggestion body-2${Ye===ee.activeIdx?" is-active":""}`,onMouseDown:Be=>Be.preventDefault(),onClick:()=>{ee.handleSelect(je),de.current?.focus()},children:typeof je=="string"?je:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:je.label}),je.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:je.hint})]})},typeof je=="string"?`${je}-${Ye}`:je.id))}),document.body)),(v||b)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:te,className:"text-field__helper caption-1",role:b?"alert":void 0,children:b||v})})]})}function bn({options:e,value:t,onChange:a,placeholder:r,disabled:s=!1,block:l=!1,size:i=48,error:u=!1,className:c="",ariaLabel:d,ariaDescribedBy:h}){const{t:p}=_e.useTranslation(),m=r??p("dropdown.placeholder","\uC120\uD0DD"),g=o.useId(),y=o.useId(),C=o.useRef(null),b=o.useCallback((T,P)=>{const L=window.innerHeight-T.bottom<260&&T.top>260;return{position:"fixed",left:T.left,minWidth:T.width,...L?{bottom:window.innerHeight-T.top+6}:{top:T.bottom+6},zIndex:Oa(P)}},[]),{open:v,setOpen:f,toggle:B,style:_,triggerRef:N,menuRef:x}=za({computeStyle:b}),[E,w]=o.useState(-1),D=o.useCallback(()=>w(-1),[]),k=e.find(T=>T.value===t);o.useEffect(()=>{if(v){const T=e.findIndex(P=>P.value===t);w(T>=0?T:e.length?0:-1),requestAnimationFrame(()=>{const P=x.current;if(!P)return;const L=P.querySelectorAll(".dropdown__option")[T];L&&(P.scrollTop=Math.max(0,L.offsetTop-P.clientHeight/2+L.clientHeight/2))})}},[v]),o.useEffect(()=>{v&&w(T=>{if(T>=0&&T<e.length)return T;const P=e.findIndex(L=>L.value===t);return P>=0?P:e.length?0:-1})},[v,e.length]);const A=o.useCallback(()=>{s||B()},[s,B]),R=o.useCallback(T=>{T.disabled||s||(T.value!==t&&a?.(T.value),f(!1))},[a,f,s,t]);o.useEffect(()=>{s&&f(!1)},[s,f]);const $=o.useCallback(T=>{if(!s){if(!v){(T.key==="Enter"||T.key===" "||T.key==="ArrowDown")&&(T.preventDefault(),f(!0));return}if(T.key==="Escape"){T.preventDefault(),f(!1);return}T.key==="ArrowDown"?(T.preventDefault(),w(P=>{let L=P+1;for(;L<e.length&&e[L].disabled;)L++;return L<e.length?L:P})):T.key==="ArrowUp"?(T.preventDefault(),w(P=>{let L=P-1;for(;L>=0&&e[L].disabled;)L--;return L>=0?L:P})):(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),e[E]?R(e[E]):f(!1))}},[s,v,e,E,R,f]),G=v?n.jsx("div",{ref:x,id:g,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:_,onMouseLeave:D,onMouseDown:T=>T.preventDefault(),children:e.map((T,P)=>n.jsxs("button",{id:`${g}-option-${P}`,type:"button",role:"option","aria-selected":T.value===t,className:we("dropdown__option body-2",T.value===t?"dropdown__option--active":"",P===E?"dropdown__option--active":"",T.disabled?"dropdown__option--disabled":""),onMouseDown:L=>L.preventDefault(),onClick:()=>R(T),onMouseEnter:()=>w(P),disabled:T.disabled,children:[n.jsx("span",{className:"dropdown__option-check",children:T.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"})})}),T.label]},T.value))}):null;return n.jsxs("div",{ref:C,className:we("dropdown",`dropdown--s${i}`,v?"dropdown--open":"",l?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:$,children:[n.jsxs("button",{ref:N,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":v,"aria-controls":v?g:void 0,"aria-activedescendant":v&&E>=0?`${g}-option-${E}`:void 0,"aria-label":d,"aria-describedby":[d&&k?y:"",h??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:s,onClick:A,onBlur:T=>{v&&!x.current?.contains(T.relatedTarget)&&f(!1)},children:[n.jsx("span",{id:y,className:`dropdown__trigger-label body-2${k?"":" dropdown__trigger-label--placeholder"}`,children:k?k.label:m}),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"&&un.createPortal(G,C.current?.closest(".ihabdevteam-core-scope")??document.body)]})}function Po({page:e,totalPages:t,onChange:a,prevLabel:r,nextLabel:s,className:l=""}){const{t:i}=_e.useTranslation(),u=r??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=s??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),d=Math.max(1,t),h=()=>a(Math.max(1,Math.min(d,e-1))),p=()=>a(Math.min(d,e+1));return n.jsxs("div",{className:we("pagination",l),children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-left",ariaLabel:u,disabled:e<=1,onClick:h}),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 Za=new Map;function kn(e){const{t}=_e.useTranslation(),{options:a=[],value:r=a.find(_=>!_.disabled)?.key??a[0]?.key,onChange:s=_=>{},className:l="",size:i=40,shape:u="pill",useBG:c=!0,fullWidth:d=!1,minButtonWidth:h,ariaLabel:p}=e||{},m=o.useRef(null),g=a.filter(_=>!_.disabled),y=o.useId(),C=a.map(_=>_.key).join("\xB7");o.useEffect(()=>{if(!(!In||p!=null&&p!=="")){if(Za.set(y,C||"(\uBCF4\uAE30 \uC5C6\uC74C)"),Za.size>1){const _=[...Za.values()].sort();Nt(`segmented-control-unnamed:${_.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${Za.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): ${_.join(" / ")}`)}return()=>{Za.delete(y)}}},[p,C,y]);const b=_=>{if(!g.length)return;const N=Math.max(0,g.findIndex(E=>E.key===r)),x=_==="first"?g[0]:_==="last"?g[g.length-1]:g[(N+_+g.length)%g.length];x&&(s(x.key),Array.from(m.current?.querySelectorAll("[data-segkey]")??[]).find(E=>E.dataset.segkey===x.key)?.focus())},v=_=>{switch(_.key){case"ArrowRight":case"ArrowDown":b(1);break;case"ArrowLeft":case"ArrowUp":b(-1);break;case"Home":b("first");break;case"End":b("last");break;default:return}_.preventDefault()},f=_=>{const N=x=>typeof x=="string"||typeof x=="number";if(!(!N(_.label)||_.count==null||_.count===!1||!N(_.count)))return`${_.label}, ${_.count}`},B=g.some(_=>_.key===r)?r:g[0]?.key;return n.jsx("div",{ref:m,onKeyDown:v,className:we("segmented-control",`segmented-control--${u}`,`segmented-control--${i}`,d&&"segmented-control--full",!c&&"segmented-control--no-bg",h!=null&&"segmented-control--min",l),style:h!=null?{"--segmented-min-button-w":`${h}px`}:void 0,role:"radiogroup","aria-label":p??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:a.map(_=>n.jsx(fe,{htmlType:"button",role:"radio","aria-checked":_.key===r,"data-segkey":_.key,tabIndex:_.key===B?0:-1,label:_.label,count:_.count,ariaLabel:f(_),disabled:_.disabled,className:_.key===r?"is-selected":"",onClick:()=>{_.disabled||s(_.key)},size:i,shape:u,useBorder:!1,useBG:!1},_.key))})}function Io({count:e,search:t,segment:a,filters:r,pageSize:s,pagination:l,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]}),h=!!(t||r?.length||s||l||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,m)=>n.jsx(kn,{size:40,...p},p.ariaLabel??m))]}),h&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(Jn,{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,m)=>n.jsx(bn,{size:40,options:p.options,value:p.value,onChange:p.onChange,ariaLabel:p.ariaLabel},m)),(s||l)&&n.jsxs("div",{className:"toolbar__pager",children:[s&&n.jsx(bn,{size:40,options:s.options,value:s.value,onChange:s.onChange,ariaLabel:s.ariaLabel??c("common.pageSizeSelect","\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218")}),l&&n.jsx(Po,{page:l.page,totalPages:l.total,onChange:l.onChange,prevLabel:l.prevLabel,nextLabel:l.nextLabel})]}),i]})})]})}function wu(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(wu).join(""):""}function vv(e){let t=e.replace(/\r\n/g,`
|
|
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"},Ag={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},Ng={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"},Eg={clearAriaLabel:"Clear input"},Dg={ariaLabel:"Select tab"},Sg={ariaLabel:"Tabs"},jg={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},Tg={ariaLabel:"User avatar"},Mg={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},Lg={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"},$g={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"}},Rg={steps:"Step {{current}} of {{total}}"},Pg={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"},Ig={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},Fg={viewWords:"Words"},Og={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},zg={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},Wg={previewRegion:"Report preview \u2014 scrollable sideways"},Hg={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},Vg={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},qg={clearSelection:"Clear selection"},Ug={showResult:"Show {{type}} result"},Gg={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},Kg={loading:"Loading"},Yg={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},Zg={ariaLabel:"Breadcrumb"},Xg={empty:"No items yet."},Jg={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"},Qg={common:Jb,calendar:Qb,passCard:eg,rating:tg,colorPicker:ng,dropdown:ag,accordion:rg,header:og,nav:sg,settings:lg,usage:ig,account:ug,training:cg,customers:dg,payment:pg,coupons:hg,visits:mg,trainingType:Cg,myWordTable:fg,keyWords:bg,wordTable:gg,wordSearch:yg,wordPrint:vg,topic:_g,device:xg,manager:wg,wordPairs:Bg,footer:kg,date:Ag,wordData:Ng,textField:Eg,segmentedControl:Dg,tabs:Sg,fileUpload:jg,avatar:Tg,myHomework:Mg,trainingStatus:Lg,store:$g,progress:Rg,trainingMiss:Pg,table:Ig,wordScore:Fg,topBanner:Og,datePicker:zg,report:Wg,tooltip:Hg,phonemeProfile:Vg,bulkBar:qg,debug:Ug,badge:Gg,loader:Kg,soundCompass:Yg,breadcrumb:Zg,board:Xg,promoBannerBg:Jg};const ey="0.388.0",ty=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],ho="ko",ny="ihab_display_language";function Zl(){if(typeof window>"u")return ho;try{const e=localStorage.getItem(ny);if(e&&ty.some(t=>t.code===e))return e}catch{}return ho}function Xl(e){try{document.documentElement.lang=e}catch{}}qt.on("languageChanged",Xl),Xl(Zl()),qt.use(_e.initReactI18next).init({resources:{ko:{translation:Xb},en:{translation:Qg}},lng:Zl(),fallbackLng:ho,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const ay=new Map;try{qt.store?.on?.("added",()=>ay.clear())}catch{}let ur=null,Jl=null,Ql=null;function ry(){const e=Fl();if(e&&e.entries.length>0){const t=ff();if(ur&&Jl===e&&Ql===t)return ur;const a=new Set,r=[];for(const s of e.entries)!s.word||a.has(s.word)||(a.add(s.word),r.push({w:s.word,s:s.syllables,p:t?.[s.word]?[...t[s.word].cho??[],...t[s.word].jung??[],...t[s.word].jong??[]]:[],pron:s.pronunciation||s.word,grade:s.grade}));return ur=r,Jl=e,Ql=t,ur}return[]}new Proxy([],{get(e,t){const a=ry(),r=a[t];return typeof r=="function"?r.bind(a):r}});function oy(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 sy(e){if(typeof window>"u")return"";const t=(a,r)=>{typeof r.attrValue=="string"&&oy(r.attrValue)&&(r.keepAttr=!1)};la.addHook("uponSanitizeAttribute",t);try{return la.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{la.removeHook("uponSanitizeAttribute",t)}}function ly(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),[l,i]=o.useState(null),[u,c]=o.useState(null),[d,h]=o.useState(null);return o.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){a(null),s(null),i(null),c(null);return}const p=e.split("/").pop();let m=e;p&&(e.startsWith("/")?m=Jr(e):/^(Logo|Symbol)/i.test(p)?m=Jr(`logo/${p}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),m=e)),i(null),c(null),a(e),s(m)},[e]),o.useEffect(()=>{if(!r)return;let p=!1;async function m(){try{let g=await fetch(r);g.ok||(g=await fetch(r));const y=g.headers.get("content-type")||"";if(p)return;if(y.includes("svg")){i("mask");return}if(y.startsWith("image/")){i("img");return}const C=await fetch(r);if(!C.ok)throw new Error("not ok");const b=await C.text();if(p)return;if(/^\s*<svg[\s>]/i.test(b)){const v=sy(b);if(!v){i("none");return}c(v),i("inline");return}i("none")}catch{p||i("none")}}return m(),()=>{p=!0}},[r]),o.useEffect(()=>{let p=!1,m=null;return l==="mask"&&r&&fetch(r).then(g=>{if(!g.ok)throw new Error("fetch failed");return g.blob()}).then(g=>{p||(m=URL.createObjectURL(g),h(m))}).catch(()=>{p||i("img")}),()=>{p=!0,m&&URL.revokeObjectURL(m),h(null)}},[l,r]),t===e?{iconToUse:r,mode:l,svgText:u,blobUrl:d}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function nt(e){const{icon:t,label:a,className:r,imgClassName:s,maskClassName:l,svgClassName:i,wrapperStyle:u,size:c}=e||{},d=r??"iconRenderer-icon",h=s??"iconRenderer-icon-image",p=l??"iconRenderer-icon-mask",m=i??"iconRenderer-icon-svg",g=typeof t=="string"?t:null,y=YC(g),{iconToUse:C,mode:b,svgText:v,blobUrl:f}=ly(g),B=(w,D={})=>n.jsx("span",{className:d,style:u,...D,children:w}),_=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,N=(w,D={})=>n.jsx("img",{src:w,alt:typeof a=="string"?a:typeof a=="number"?String(a):"",className:h,...D,style:_?{...D.style,..._}:D.style});if(!t)return null;if(typeof t!="string")return B(t);if(t==="none")return B(n.jsx("span",{className:m,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(y)try{return B(o.createElement(y,{className:m,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(C&&C.endsWith(".svg")){if(b==="mask"){const w={"--icon-url":f?`url(${f})`:`url(${C})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return B(n.jsx("span",{className:p,style:w}),{"aria-hidden":"true"})}return b==="img"?B(N(C,{onError:w=>{w.currentTarget.onerror=null,w.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):b==="inline"?B(n.jsx("span",{className:m,dangerouslySetInnerHTML:v?{__html:v}:void 0}),{"aria-hidden":"true"}):B(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return N(Jr(t),{style:u,onError:w=>{w.currentTarget.onerror=null,w.currentTarget.style.display="none"}});const x=typeof c=="number"?c:20,E=`<svg width="${x}" height="${x}" 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 B(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:E}}),{"aria-hidden":"true"})}function ei(e){const[t,a]=o.useState(!1),r=o.useRef(!1),s=o.useRef(!0);o.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]);const l=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,s.current&&a(!1)};i.then(u,u)}},[e]);return{pending:t,press:l}}function iy({icon:e,title:t,message:a,action:r,className:s}){const{pending:l,press:i}=ei(r?.onClick);return n.jsxs("div",{className:we("empty-state",s),children:[e&&n.jsx(nt,{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:l,"aria-busy":l||void 0,children:[r.icon&&n.jsx(nt,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function uy({message:e,hint:t,icon:a="triangle-alert",onRetry:r,retryLabel:s,className:l}){const{t:i}=_e.useTranslation(),{pending:u,press:c}=ei(r);return n.jsxs("div",{className:we("empty-state","error-state",l),role:"alert",children:[n.jsx(nt,{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(nt,{icon:"rotate-cw",className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:s??i("common.errorState.retry",{defaultValue:"\uB2E4\uC2DC \uC2DC\uB3C4"})})]})]})}function cy({icon:e,title:t,description:a,cta:r,tone:s="main",disabled:l=!1,onClick:i,className:u=""}){const c=o.useId(),d=`${c}-title`,h=`${c}-desc`,p=`${c}-cta`,m=()=>{l||i?.()};return n.jsx("section",{role:"button",tabIndex:l?-1:0,"aria-disabled":l||void 0,"aria-labelledby":d,"aria-describedby":`${h} ${p}`,onClick:m,onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),m())},className:we("action-card",`action-card--${s}`,l&&"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(nt,{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:h,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(nt,{icon:"arrow-right",size:18})})]})]})})}function dy({as:e="div",className:t="",children:a,storage:r,...s}){r&&R1({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 l=we("ihabdevteam-core-scope",t);return n.jsx(e,{className:l,...s,children:a})}function py(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 mo(e,t=!0){o.useEffect(()=>{if(!t)return;const a=e.current;if(!a)return;const r=s=>{if(s.key!=="Tab")return;const l=Array.from(a.querySelectorAll(kn)).filter(py);if(!l.length){s.preventDefault();return}const i=l[0],u=l[l.length-1],c=document.activeElement,d=c===a;s.shiftKey&&(c===i||d)?(s.preventDefault(),u.focus()):!s.shiftKey&&c===u&&(s.preventDefault(),i.focus())};return a.addEventListener("keydown",r),()=>a.removeEventListener("keydown",r)},[e,t])}const kn='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 bo(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 ti(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 cr(e,t,a){const r=e?.isConnected?e:a?.isConnected?a:null;if(ti(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!r)return null;const s=Array.from(document.querySelectorAll(kn)).filter(c=>!(e&&e.contains(c))&&ti(c));let l=null,i=null;for(const c of s)r.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_PRECEDING?l=c:i||(i=c);const u=l??i;return u?.focus(),u}function hy({title:e="",lines:t=[],notices:a=null,children:r,variant:s="default",dismissible:l=!1,className:i=""}){const{t:u}=_e.useTranslation(),[c,d]=o.useState(!1),h=o.useRef(null),p=o.useCallback(()=>{const C=h.current;C&&C.contains(document.activeElement)&&cr(C),d(!0)},[]);if(c)return null;const m=`notice-box notice-box--${s} body-2 ${i}`.trim(),g=l&&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:m,role:"note",children:[a.map((C,b)=>n.jsxs("div",{className:"notice-box__inner",children:[C.title?n.jsx("span",{className:"notice-box__title body-3",children:C.title}):null,n.jsx("div",{className:"notice-box__body",children:C.lines&&C.lines.length?n.jsx("div",{children:C.lines.map((v,f)=>n.jsx("span",{className:"notice-box__line body-3",children:v},f))}):C.children??null})]},b)),g]});const y=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((C,b)=>n.jsx("li",{className:"notice-box__line",children:C},b))}):r})]}):n.jsx("div",{className:"notice-box__inner",children:r});return n.jsxs("div",{ref:h,className:m,role:"note",children:[y,g]})}const my={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function da(e){const{t}=_e.useTranslation(),{variant:a="spinner",size:r=24,progress:s=null,label:l}=e||{},i=l||t("loader.loading","Loading");if(a==="bar"){const c=s==null||!Number.isFinite(Number(s)),d=c?0:Math.max(0,Math.min(100,Number(s)));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:my,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"})]})]})}const pa=[];let dr=!1;function ni(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=pa[pa.length-1];t&&(e.stopPropagation(),t())}function Kn(e){return pa.push(e),!dr&&typeof document<"u"&&(document.addEventListener("keydown",ni),dr=!0),()=>{const t=pa.lastIndexOf(e);t>=0&&pa.splice(t,1),pa.length===0&&dr&&typeof document<"u"&&(document.removeEventListener("keydown",ni),dr=!1)}}const ai=o.createContext(null);function Cy(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const ri=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function fy(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 Ls.useSyncExternalStore(t,()=>ri(e),()=>!1)}function by(e){const[t,a]=o.useState(ri(e));return o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const r=window.matchMedia(e),s=i=>a(i.matches),l=r;return l.addEventListener?l.addEventListener("change",s):l.addListener&&l.addListener(s),a(r.matches),()=>{l.removeEventListener?l.removeEventListener("change",s):l.removeListener&&l.removeListener(s)}},[e]),t}const gy=typeof Ls.useSyncExternalStore=="function"?fy:by;function bn(e){const t=o.useContext(ai),a=gy(e);return t&&typeof t.mobile=="boolean"&&Cy(e)?t.mobile:a}const yy="(prefers-reduced-motion: reduce)";function go(){return bn(yy)}const oi={"menu-tooltip":"tooltip-menu","description-tooltip":"tooltip-description","text-box-tooltip":"tooltip-textbox","training-tooltip":"tooltip-training","word-image-tooltip":"tooltip-word-image","info-tooltip":"tooltip-info","noise-settings-tooltip":"noise-settings",tooltip__header:"tooltip-content__header",tooltip__content:"tooltip-content",tooltip__backdrop:"tooltip-backdrop",tooltip__portal:"tooltip-portal","word-table__section":"word-table-block","word-table__content":"word-table-block__content","word-table__card":"word-table-block__card","word-table__card-handle":"word-table-block__card-handle","word-table__card-close":"word-table-block__card-close","word-table__card-actions":"word-table-block__card-actions","word-table__edit-cell":"word-table-block__edit-cell","word-table__pair-divider":"word-table-block__pair-divider","chart-section__legend-dot":"manager-bar-chart-legend-dot","chart-section__legend-item":"manager-bar-chart-legend-item","chart-section__legend":"manager-bar-chart-legend","chart-section__controls":"manager-section-controls","chart-section__sub-row":"barchart-sub-row","chart-section__total":"barchart-total","chart-section":"manager-section","bar-chart__stack-segment":"manager-bar-chart-stack-segment","bar-chart__detail-btn":"manager-bar-chart-detail-btn","bar-chart__gridline":"manager-bar-chart-gridline","bar-chart__loading":"manager-bar-chart-loading","bar-chart__scroll":"manager-bar-chart-scroll","bar-chart__stack":"manager-bar-chart-stack","bar-chart__x-axis":"manager-bar-chart-x-axis","bar-chart__inner":"manager-bar-chart-inner","bar-chart__area":"manager-bar-chart-area","bar-chart__plot":"manager-bar-chart-plot","bar-chart__wrap":"manager-bar-chart-wrap","bar-chart__slot":"manager-bar-chart-slot","bar-chart__col":"manager-bar-chart-col","bar-chart__bar":"manager-bar-chart-bar","stat-chart__card":"manager-stat-card"};function vy(e,t){const a=Object.keys(e).sort((r,s)=>s.length-r.length);for(const r of a){if(!t.startsWith(r))continue;const s=t.slice(r.length);if(!(s!==""&&!s.startsWith("__")&&!s.startsWith("--")))return e[r]+s}return null}function _y(e){return vy(oi,e)}function le(e){if(!e||Object.keys(oi).length===0)return e;const t=[];for(const a of e.split(/\s+/)){if(!a)continue;const r=_y(a);r&&t.push(r)}return t.length?`${e} ${t.join(" ")}`:e}function vn(e){const{anchorRect:t,anchorEl:a,offset:r=20,edgeMargin:s=20,onClose:l,closeOnOutsideClick:i=!0,className:u="",role:c="dialog",ariaLabel:d="",children:h,backdrop:p=!1,isMobilePopup:m=!1,useBorder:g=!0,header:y,focusOnOpen:C}=e||{},b=o.useRef(null),[v,f]=o.useState({position:"fixed",left:0,top:-9999}),[B,_]=o.useState(!1),[N,x]=o.useState("bottom"),[E,w]=o.useState(!1),[D,k]=o.useState(!1),A=!t&&!a,R=o.useRef(null),$=o.useCallback((M=!1,q=!1)=>{if(D&&m)return;const Y=a?a.getBoundingClientRect():t,U=q&&R.current?R.current:Y;if(!U||!b.current)return;const S=b.current,{offsetWidth:I,offsetHeight:O}=S,z=window.innerWidth,se=window.innerHeight,te=z-U.right,de=U.left,ee=U.top,V=se-U.bottom;let ne=0,W=0,H="top";if(ee>=O+r)H="top",W=U.top-r-O,ne=U.left+U.width/2-I/2;else if(V>=O+r)H="bottom",W=U.bottom+r,ne=U.left+U.width/2-I/2;else if(te>=I+r)H="right",ne=U.right+r,W=U.top+U.height/2-O/2;else if(de>=I+r)H="left",ne=U.left-r-I,W=U.top+U.height/2-O/2;else{const he=Math.max(ee,V,te,de);he===ee?(H="top",W=U.top-r-O,ne=U.left+U.width/2-I/2):he===V?(H="bottom",W=U.bottom+r,ne=U.left+U.width/2-I/2):he===te?(H="right",ne=U.right+r,W=U.top+U.height/2-O/2):(H="left",ne=U.left-r-I,W=U.top+U.height/2-O/2)}const ie=Number.isFinite(Number(s))?Number(s):8;ne=Math.min(Math.max(ne,ie),z-I-ie),W=Math.min(Math.max(W,ie),se-O-ie);const Te=Math.round(ne),ye=Math.round(W);M&&b.current?(b.current.style.left=`${Te}px`,b.current.style.top=`${ye}px`,b.current.dataset.placement=H):(x(H||N),f({position:"fixed",left:Te,top:ye}),w(!0))},[D,m,a,t,r,s,N]);o.useEffect(()=>()=>{R.current=null},[a,t]),o.useLayoutEffect(()=>{if(A)return;if(D&&m){f({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),w(!0);return}R.current===null&&(R.current=a?a.getBoundingClientRect():t??null),$(!1,!0);const M=requestAnimationFrame(()=>$(!1,!0));return()=>cancelAnimationFrame(M)},[t,a,r,h,s,A,D,m,$]),o.useEffect(()=>{if(A||D&&m||!b.current||typeof ResizeObserver>"u")return;const M=new ResizeObserver(()=>{t&&$()});return M.observe(b.current),()=>M.disconnect()},[t,h,s,A,D,m,$]),o.useEffect(()=>{if(A||D&&m)return;let M=null;const q=()=>{if(a&&(R.current=a.getBoundingClientRect()),typeof requestAnimationFrame>"u"){$(!0);return}M===null&&(M=requestAnimationFrame(()=>{M=null,$(!0)}))},Y=U=>{if(!a&&l){const S=U.target;if(S&&b.current&&b.current.contains(S))return;try{if(S&&S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}Q.current(!0);return}q()};return window.addEventListener("resize",q),document.addEventListener("scroll",Y,{passive:!0,capture:!0}),()=>{M!==null&&cancelAnimationFrame(M),window.removeEventListener("resize",q),document.removeEventListener("scroll",Y,{capture:!0})}},[t,a,l,r,h,s,A,D,m,$]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const M=window.matchMedia("(max-width: 768px)"),q=()=>k(!!M.matches);q();try{M.addEventListener?M.addEventListener("change",q):M.addListener(q)}catch{try{M.addListener(q)}catch{}}return()=>{try{M.removeEventListener?M.removeEventListener("change",q):M.removeListener(q)}catch{}}},[]);const G=o.useRef(!1),T=o.useRef(null),P=go(),L=o.useCallback((M=!1)=>{if(l&&!(B||G.current)){if(G.current=!0,M){_(!0);try{l&&l()}catch{G.current=!1,_(!1)}return}_(!0),T.current=setTimeout(()=>{T.current=null;try{l&&l()}catch{G.current=!1,_(!1)}},P?0:200)}},[B,l,_,P]);o.useEffect(()=>()=>{T.current&&clearTimeout(T.current)},[]),o.useEffect(()=>{if(A)return;const M=U=>{const S=b.current;if(!S)return;const I=U.target;if(I&&!S.contains(I)){try{if(I.closest&&I.closest("[data-tooltip-ignore]"))return}catch{}i&&L(!0)}},q=U=>{const S=b.current;if(!S)return;const I=U.target;if(I&&!S.contains(I)){try{if(I.closest&&I.closest("[data-tooltip-ignore]"))return}catch{}i&&L(!0)}},Y=U=>{if(U.key==="Tab"){const S=b.current;if(!S)return;const I=S.querySelectorAll(kn);if(!I||I.length===0)return;const O=I[0],z=I[I.length-1],se=document.activeElement;U.shiftKey?se===O&&(U.preventDefault(),z.focus()):se===z&&(U.preventDefault(),O.focus())}};return document.addEventListener("pointerdown",M,!0),document.addEventListener("click",q,!0),document.addEventListener("keydown",Y),()=>{document.removeEventListener("pointerdown",M,!0),document.removeEventListener("click",q,!0),document.removeEventListener("keydown",Y)}},[l,i,L,A]);const Q=o.useRef(L);o.useEffect(()=>{Q.current=L});const Z=!!l;o.useEffect(()=>{if(!(A||!Z))return Kn(()=>Q.current())},[A,Z]),o.useEffect(()=>{const M=()=>{L(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",M),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",M)}},[L]);const F=o.useRef(null);o.useEffect(()=>{if(A||C===!1||!E)return;const M=b.current;if(!M)return;const q=M.querySelector(kn);if(q)return F.current=document.activeElement,q.focus({preventScroll:!0}),()=>{const Y=F.current;F.current=null,Y&&document.contains(Y)&&Y.focus({preventScroll:!0})}},[A,C,E]),o.useEffect(()=>{c==="dialog"&&!d&&At("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 K=n.jsxs("div",{ref:b,className:le(`tooltip__content ${A?"tooltip__content--inline":""} ${g?"tooltip__content--bordered":""} ${B?"is-closing":""} ${u} ${D&&m?"is-mobile":""}`),role:c,"aria-label":d||void 0,style:A?{}:{...v,visibility:E?"visible":"hidden"},tabIndex:-1,"data-placement":N,"data-left":A?"":v.left,"data-top":A?"":v.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:[y!=null&&n.jsx("div",{className:le("tooltip__header h5"),children:y}),h]});if(A||typeof document>"u")return K;if(p||D&&m){const M=n.jsxs("div",{className:le("tooltip__portal"),children:[n.jsx("div",{className:le("tooltip__backdrop"),onClick:()=>{i&&L(!0)}}),K]});return cn.createPortal(M,document.body)}return cn.createPortal(K,document.body)}function Sn(e){const{anchorRect:t,text:a,offset:r=8,onClose:s,className:l="",ariaLabel:i}=e||{};return a?n.jsx(vn,{anchorRect:t,offset:r,onClose:s,closeOnOutsideClick:!1,className:le(`info-tooltip ${l}`),ariaLabel:i||a,children:n.jsx("div",{className:le("info-tooltip__content body-3"),children:a})}):null}function Yn(e){const{t}=_e.useTranslation(),{anchorRect:a,title:r,items:s,activeIndex:l=-1,showIndex:i=!0,onClose:u,offset:c=12,closeOnOutsideClick:d=!0}=e||{},h=(Array.isArray(s)?s:s?[s]:[]).map(p=>typeof p=="string"?{text:p}:p);return!h.length&&!r?null:n.jsx(vn,{anchorRect:a,offset:c,onClose:u,closeOnOutsideClick:d,useBorder:!1,className:le("description-tooltip"),ariaLabel:r||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:le("description-tooltip__box"),children:[r&&n.jsx("span",{className:le("description-tooltip__title body-2"),children:r}),n.jsx("ol",{className:le("description-tooltip__items"),children:h.map((p,m)=>n.jsxs("li",{className:le(`description-tooltip__item body-3${m===l?" description-tooltip__item--active":""}`),children:[i&&h.length>1&&n.jsxs("span",{className:le("description-tooltip__index button-1"),children:[m+1,"."]}),p.color&&n.jsx("span",{className:le("description-tooltip__dot"),style:{background:p.color},"aria-hidden":"true"}),n.jsx("span",{children:p.text})]},m))})]})})}function Pa(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let yo=0,si=!1;function li(){si||typeof document>"u"||(si=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(yo=Date.now())},!0),document.addEventListener("touchstart",()=>{yo=Date.now()},{capture:!0,passive:!0}))}li();function ha(e){return!!e&&e.pointerType==="touch"}function ma(e=1e3){return li(),Date.now()-yo<e}function vo(e,t,a,{enabled:r=!0,fallbackOnParent:s=!1}={}){const l=Pa(e),i=Pa(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!r||typeof document>"u")return;const h=p=>{const m=p,g=p.target,y=a.current,C=!!(g&&y&&y.contains(g));if(m.pointerType!=="touch"){C&&(u.current=null);return}if(C){u.current=l.current;return}u.current=null,l.current&&!(g&&g.closest?.(".tooltip__content"))&&i.current(!1,y)};return document.addEventListener("pointerdown",h,!0),()=>document.removeEventListener("pointerdown",h,!0)},[r,a,l,i]);const d=o.useCallback(h=>{const p=u.current;return p===null?!1:(u.current=null,c.current=Date.now(),i.current(!p,h??a.current),!0)},[a,i]);return o.useEffect(()=>{if(!r||!s)return;const h=a.current,p=h?.parentElement;if(!h||!p)return;let m=null;const g=b=>{const v=b.changedTouches?.[0];if(!v)return!1;const f=h.getBoundingClientRect();return v.clientX>=f.left&&v.clientX<=f.right&&v.clientY>=f.top&&v.clientY<=f.bottom},y=b=>{m=g(b)?l.current:null},C=b=>{const v=m;m=null,!(v===null||Date.now()-c.current<700||!g(b))&&(u.current=null,c.current=Date.now(),i.current(!v,h))};return p.addEventListener("touchstart",y,{passive:!0}),p.addEventListener("touchend",C),()=>{p.removeEventListener("touchstart",y),p.removeEventListener("touchend",C)}},[r,s,a,l,i]),{touchPress:d}}function xy(e,t){const{size:a=48,type:r,htmlType:s,href:l,target:i,rel:u,icon:c,rightIcon:d,label:h,count:p,subLabel:m,children:g,ariaLabel:y,variant:C="default",align:b="center",nowrap:v=!1,selected:f,toggleable:B=!1,ariaExpanded:_,ariaControls:N,disabled:x=!1,loading:E=!1,useLabel:w=!0,useBorder:D=!0,useBG:k=!0,useDisabledCovered:A=!1,useDisabledInvisible:R=!1,useDisabledFilled:$=!1,width:G,minWidth:T,onClick:P,onDisabledClick:L,showTooltipInfo:Q=!1,tooltipInfoText:Z=null,tooltipDescription:F=null,tooltipOnly:K=!1,iconSize:M="medium",iconColor:q,shape:Y="rounded",color:U,className:S,...I}=e,O=typeof a=="string"&&isNaN(Number(a))?a.toLowerCase():String(Number(a)||48),z=O.match(/^\d+$/)?`button${O}`:`button-${O}`,se=Number(a),te=!isNaN(se)&&se<40?"button-2":"button-1",de=h??g,ee=x||!!I.disabled,V=ee?A?"disabled-covered":R?"disabled-invisibled":$?"disabled-filled":"disabled":C,ne=V?`button--variant-${V}`:"",W=b?`button--align-${b}`:"",H=v?"button--nowrap":"",ie=Y?`button--shape-${Y}`:"",Te=typeof q=="string"&&q.startsWith("--")?`var(${q})`:q,ye={...G?{width:typeof G=="number"?`${G}px`:G}:{},...T?{minWidth:typeof T=="number"?`${T}px`:T}:{},...D?{}:{"--button-border":ee?"0":"1px solid transparent"},...Te?{"--button-icon-color":Te}:{},...U?{"--color-main":U}:{}},he=w===!1?"":de,Se=Array.isArray(he)?he.length>0:!!he,$e=!!d,Ne=r??(Se||c||$e?"bar":"dot"),ue=`${z}--${Ne}`,xe=o.useRef(null);o.useEffect(()=>{!In||s!==void 0||xe.current?.closest("form")&&At(`button-in-form:${typeof de=="string"?de:""}`,'[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 de=="string"&&de?` \uB2E8\uCD94: ${de}`:""))},[s,de]);const ke=o.useRef(t);ke.current=t;const Ee=o.useCallback(Le=>{xe.current=Le;const at=ke.current;typeof at=="function"?at(Le):at&&(at.current=Le)},[]),We=o.useRef(ee),[He,ot]=o.useState(!!f),[Qe,Je]=o.useState(!1),[vt,je]=o.useState(null),Ye=o.useCallback(()=>Je(!1),[]),[Be,Ue]=o.useState(!1),qe=o.useId();o.useEffect(()=>{typeof f=="boolean"&&ot(f)},[f]),o.useEffect(()=>{if(We.current&&!ee&&xe.current){const Le=xe.current;let at=!1;try{at=Le.matches(":focus:not(:focus-visible)")}catch{at=!1}at&&Le.blur(),Le.style.pointerEvents="none";const oe=requestAnimationFrame(()=>{requestAnimationFrame(()=>{xe.current&&(xe.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(oe)}We.current=ee},[ee]);const pt=typeof f=="boolean"?!!f:He,_t=typeof _=="boolean"?void 0:B||typeof f=="boolean"?pt?"true":"false":I["aria-pressed"],Et=we("button",z,ue,ne,W,H,ie,pt?"is-selected":null,k?null:"button--no-bg",K?"button--tooltip-only":null,S),wt=`button__icon button__icon--${M}`,st=Array.isArray(m)?m:m!==void 0?[m]:[],tt=()=>{if(Array.isArray(he))return he.map((at,oe)=>{const fe=st[oe];return n.jsxs("span",{className:`button__label-text${fe!==void 0?" button__label-text--has-sub":""}`,children:[at,fe!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:fe})]},oe)});const Le=m!==void 0;return n.jsxs("span",{className:`button__label-text${Le?" button__label-text--has-sub":""}`,children:[he,p!=null&&n.jsx("span",{className:"button__count",children:p}),Le&&n.jsx("span",{className:"button__sub-label-text caption-1",children:m})]})},Bt=Le=>{typeof f!="boolean"&&!B&&ot(!1),Le.currentTarget.blur()},kt=Le=>{ee||(typeof I.onMouseLeave=="function"&&I.onMouseLeave(Le),Bt(Le))},Tt=Le=>{if(K&&it&&ut.touchPress(Le.currentTarget),ee){it&&ut.touchPress(Le.currentTarget),Le.preventDefault(),L?.(Le);return}typeof f!="boolean"&&B&&ot(at=>!at),P?.(Le)},Lt=o.useCallback(()=>{(Q||F)&&(Je(!0),je(xe.current?.getBoundingClientRect()??null))},[Q,F]),gt=o.useCallback(()=>{(Q||F)&&(Je(!1),je(null))},[Q,F]),it=!!(Q||F),ut=vo(Qe,Le=>{Le?Lt():gt()},xe,{enabled:it&&(ee||K),fallbackOnParent:it&&ee}),ct={...I};delete ct.disabled,delete ct.className,delete ct.faded,delete ct.useFaded,delete ct.loading,delete ct.onMouseLeave,delete ct.onPointerEnter,delete ct.onPointerLeave,delete ct.onPointerUp,delete ct.onFocus,delete ct.onBlur,ee&&(Object.keys(ct).forEach(Le=>{/^on[A-Z]/.test(Le)&&typeof ct[Le]=="function"&&delete ct[Le]}),ct["aria-disabled"]="true"),E&&(ct["aria-busy"]="true");const ve=(typeof Q=="string"?Q:null)??(typeof Z=="string"?Z:null)??(typeof y=="string"?y:null)??(typeof de=="string"?de:null)??void 0,Me=typeof y=="string"?y:typeof de=="string"?de:ve,Pe=F?[F.title,...F.items??[]].filter(Boolean).join(". "):Q&&ve&&ve!==Me?ve:"",Oe=[typeof I["aria-describedby"]=="string"?I["aria-describedby"]:void 0,Pe?qe:null].filter(Boolean).join(" ")||void 0,dt=()=>n.jsx("span",{className:`${wt} button__spinner`,"aria-hidden":"true",children:n.jsx(da,{variant:"spinner",size:"100%"})}),Dt=(Le,at)=>n.jsx(nt,{icon:Le,label:at??Me,className:wt,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),yt=Le=>E?dt():Dt(c,Le),xt=()=>Ne==="dot"?n.jsxs(n.Fragment,{children:[yt(),Se&&n.jsx("span",{className:`button__label ${te}`,children:tt()})]}):b==="center"&&(c||E)?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:yt()}),Se&&n.jsx("span",{className:`button__label ${te}`,children:tt()})]}),$e&&n.jsx("span",{className:"button__right",children:Dt(d)})]}):n.jsxs(n.Fragment,{children:[(c||E)&&n.jsx("span",{className:"button__left",children:yt(y??de)}),Se&&n.jsx("span",{className:`button__label ${te}`,children:tt()}),$e&&n.jsx("span",{className:"button__right",children:Dt(d)})]}),Ct=!!l&&!ee;return n.jsxs(n.Fragment,{children:[n.jsxs(Ct?"a":"button",{...ct,ref:Ee,...Ct?{href:l,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:s??"button",disabled:ee&&!L&&!Be},className:Et,"aria-pressed":_t,"aria-expanded":typeof _=="boolean"?_:I["aria-expanded"],"aria-controls":N??I["aria-controls"],"aria-label":Me,"aria-disabled":ee&&(Ct||L||Be)?!0:void 0,"aria-describedby":Oe,style:ye,onClick:Tt,onMouseLeave:kt,onPointerEnter:Le=>{ha(Le)||Lt(),!ee&&typeof I.onPointerEnter=="function"&&I.onPointerEnter(Le)},onPointerLeave:Le=>{ha(Le)||gt(),!ee&&typeof I.onPointerLeave=="function"&&I.onPointerLeave(Le)},onPointerUp:Le=>{ee&&it&&ut.touchPress(Le.currentTarget),!ee&&typeof I.onPointerUp=="function"&&I.onPointerUp(Le)},onFocus:Le=>{Ue(!0),ma()||Lt(),!ee&&typeof I.onFocus=="function"&&I.onFocus(Le)},onBlur:Le=>{Ue(!1),ee||Bt(Le),gt(),!ee&&typeof I.onBlur=="function"&&I.onBlur(Le)},children:[xt(),Pe?n.jsx("span",{id:qe,hidden:!0,"aria-label":Pe}):null]}),Qe&&F?n.jsx(Yn,{anchorRect:vt,title:F.title,items:F.items,onClose:Ye}):Qe&&ve?n.jsx(Sn,{anchorRect:vt,text:ve,onClose:Ye}):null]})}const be=o.forwardRef(xy);be.displayName="Button";function Mt(e,t,a){const r=o.useRef(null);return o.useLayoutEffect(()=>{const s=r.current?.parentElement??null;return t(s,e),()=>a(s)},[e,t,a]),r}const Ia={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},_o=new WeakMap;function xo(e){if(e)return _o.get(e)}function Xt(e,t){e&&(e.style.setProperty(Ia.title,t.title),e.style.setProperty(Ia.description,t.description),_o.set(e,t))}function Jt(e){e&&(e.style.removeProperty(Ia.title),e.style.removeProperty(Ia.description),_o.delete(e))}const ii={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function ui(){const e=Mt(ii,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const ci={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function di(){const e=Mt(ci,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const pi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function hi(){const e=Mt(pi,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const mi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Ci(){const e=Mt(mi,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const fi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function bi(){const e=Mt(fi,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const gi={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function yi(){const e=Mt(gi,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const vi={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function _i(){const e=Mt(vi,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const xi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function wi(){const e=Mt(xi,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const Bi={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function ki(){const e=Mt(Bi,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const Ai={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function Ni(){const e=Mt(Ai,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const Ei={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function Di(){const e=Mt(Ei,Xt,Jt);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 Si={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function ji(){const e=Mt(Si,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const Ti={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function Mi(){const e=Mt(Ti,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Li={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function $i(){const e=Mt(Li,Xt,Jt);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const on=(e,t,a)=>({key:e,get label(){return qt.t(`promoBannerBg.${e}`,t)},textTone:a}),wy=[on("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),on("soft","\uC18C\uD504\uD2B8","dark"),on("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),on("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),on("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),on("warm","\uC6DC(\uAC15\uC870)","dark"),on("dark","\uB2E4\uD06C","light"),on("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),on("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),on("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),on("outline","\uC544\uC6C3\uB77C\uC778","dark"),on("success","\uC131\uACF5/\uC644\uB8CC","light"),on("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),on("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],Ri={main:ui,soft:di,sub:hi,deep:Ci,softSub:bi,warm:yi,dark:_i,radial:wi,diagonal:ki,dots:Ni,outline:Di,success:ji,naver:Mi,instagram:$i};function Pi({storageKey:e="fontScale",baseFont:t=20,minScale:a=.8,maxScale:r=1.4,step:s=.1,lineHeightRatio:l=1.4}={}){const i=B=>Math.max(a,Math.min(r,Number(B))),u=B=>{try{const _=localStorage.getItem(B),N=_?Number(_):1;return Number.isFinite(N)?i(N):i(1)}catch{return i(1)}},[c,d]=o.useState(()=>u(e)),[h,p]=o.useState(e);h!==e&&(p(e),d(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const m=B=>{d(typeof B=="function"?_=>i(B(_)):i(B))},g=()=>m(B=>+(B+s).toFixed(6)),y=()=>m(B=>+(B-s).toFixed(6)),C=c<r-Number.EPSILON,b=c>a+Number.EPSILON,v=Math.round(t*c),f=Math.round(v*l);return{scale:c,setScale:m,increase:g,decrease:y,canIncrease:C,canDecrease:b,fontSize:v,lineHeight:f}}function Ii(e,t){const a=Pa(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 ",Fi=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(wo)?e.split(wo).pop()??e:e})(),By=o.createContext(!1),Zn=[];let Oi=null;function ky(e){const t=o.useContext(By);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;Zn.length===0&&(Oi=document.title);const a={text:Fi?`${e}${wo}${Fi}`:e};return Zn.push(a),document.title=a.text,()=>{const r=Zn.lastIndexOf(a);r>=0&&Zn.splice(r,1),document.title=Zn.length?Zn[Zn.length-1].text:Oi??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"}],Ay=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function hn(e,t){return Ay().compare(e,t)}const pr=new Map;function Ny(e){const t=pr.get(e);if(t)return t;const a=[],r=/-?\d+(?:\.\d+)?/g;let s=0;for(let l=r.exec(e);l;l=r.exec(e)){let i=l.index,u=l[0];u[0]==="-"&&i>0&&!/\s/.test(e[i-1])&&(i+=1,u=u.slice(1)),i>s&&a.push(e.slice(s,i)),a.push(Number(u)),s=l.index+l[0].length}return s<e.length&&a.push(e.slice(s)),pr.size>5e3&&pr.clear(),pr.set(e,a),a}function Ey(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 Dy(e,t){const a=d=>d==null||typeof d=="number"&&Number.isNaN(d)?"":String(d).trim(),r=a(e),s=a(t);if(r===s)return 0;const l=(d,h)=>{if(typeof d=="number"&&!Number.isNaN(d))return[d];const p=Ey(h);return p!==null?[p]:Ny(h)},i=l(e,r),u=l(t,s),c=Math.min(i.length,u.length);for(let d=0;d<c;d++){const h=i[d],p=u[d];if(typeof h=="number"&&typeof p=="number"){if(h!==p)return h-p;continue}if(typeof h=="number")return-1;if(typeof p=="number")return 1;const m=hn(h,p);if(m!==0)return m}return i.length!==u.length?i.length-u.length:hn(r,s)}const zi=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function hr(e,t,a){const r=zi(e),s=zi(t);if(r||s)return r===s?0:r?1:-1;const l=Dy(e,t);return a?l:-l}function Sy(e,t,a){const{t:r}=_e.useTranslation(),[s,l]=o.useState(()=>{const y=a?.initialPageSize;return y&&Bo.some(C=>C.value===y)?y:"25"}),[i,u]=o.useState(1),[c,d]=o.useState(t);Object.is(c,t)||(d(t),i!==1&&u(1));const h=o.useMemo(()=>Bo.map(y=>({...y,label:r("visits.showN",{n:y.value})})),[r]),p=o.useCallback(y=>{Bo.some(C=>C.value===y)&&(l(y),u(1))},[]),m=Math.max(1,Math.ceil(e.length/Number(s))),g=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),m);return i!==g&&u(g),{pageRows:o.useMemo(()=>e.slice((g-1)*Number(s),g*Number(s)),[e,g,s]),pageSizeProps:{options:h,value:s,onChange:p},paginationProps:{page:g,total:m,onChange:u},setPage:u}}function jy(e){const[t,a]=o.useState(()=>e?.defaultKey!=null?{key:e.defaultKey,asc:e.defaultAsc??!0}:null),r=o.useRef(t),s=o.useRef(e?.onSortChange);s.current=e?.onSortChange;const l=o.useCallback(c=>{const d=r.current,h=d?.key===c?{key:c,asc:!d.asc}:{key:c,asc:!0};r.current=h,a(h),s.current?.(h)},[]),i=o.useCallback((c,d)=>({label:c,sortDir:t?.key===d?t.asc?"asc":"desc":null,onClick:()=>l(d)}),[t,l]),u=o.useCallback((c,d)=>{if(!t)return c;const{key:h,asc:p}=t;return[...c].sort((m,g)=>hr(d(m,h),d(g,h),p))},[t]);return{sort:t,field:i,sortRows:u}}const _n="\uC804\uCCB4";Object.fromEntries(Object.entries(sf).map(([e,{nucleus:t}])=>[e,t]));const Ty={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"})},My={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"})},Ly={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 $y(e,t){if("place"in t)return Ty[t.place](e);const a=My[t.vowel](e);return t.glide?`${a} \xB7 ${Ly[t.glide](e)}`:a}const Ry=(e,{defaultValue:t})=>t,Wi=(e,t)=>({jamos:e,phonetic:t,tooltip:$y(Ry,t)}),jn=(e,t)=>t.map(a=>Wi([a],{place:e})),Ut=(e,t,a)=>Wi([...e],a?{vowel:t,glide:a}:{vowel:t}),ko={cho:[jn("labial",["\u3142","\u3143","\u314D","\u3141"]),jn("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),jn("alveolar",["\u3145","\u3146"]),jn("palatal",["\u3148","\u3149","\u314A"]),jn("velar",["\u3131","\u3132","\u314B"]),jn("glottal",["\u314E"])],jung:[[Ut("\u3163","frontHigh"),Ut("\u315F","frontHigh","w"),Ut("\u3162","frontHigh","velar")],[Ut("\u3161","backHighUnrounded")],[Ut("\u315C","backHighRounded"),Ut("\u3160","backHighRounded","j")],[Ut("\u3154\u3150","frontMid"),Ut("\u3156\u3152","frontMid","j"),Ut("\u3159\u315A\u315E","frontMid","w")],[Ut("\u3153","backMidUnrounded"),Ut("\u3155","backMidUnrounded","j"),Ut("\u315D","backMidUnrounded","w")],[Ut("\u3157","backMidRounded"),Ut("\u315B","backMidRounded","j")],[Ut("\u314F","low"),Ut("\u3151","low","j"),Ut("\u3158","low","w")]],jong:[jn("labial",["\u3142","\u3141"]),jn("alveolar",["\u3137","\u3134","\u3139"]),jn("velar",["\u3131","\u3147"])]},Py=e=>e===Iy?[]:Array.from(e),Iy="__NO_CODA__",Ao=e=>e.map(t=>t.map(({jamos:a,phonetic:r,tooltip:s})=>({v:a.join(""),phonetic:r,tooltip:s}))),Hi={cho:Ao(ko.cho),jung:Ao(ko.jung),jong:Ao(ko.jong)};Hi.jung.flat().forEach(({v:e})=>{for(const t of Py(e));}),new Set(Hi.cho.flat().map(e=>e.v));function Fy(e,t=!0){const a=Pa(e);o.useEffect(()=>{if(t)return Kn(()=>{a.current?.()})},[t,a])}function Fa(){const[e,t]=o.useState(null),a=o.useCallback(l=>t(l.getBoundingClientRect()),[]),r=o.useCallback(()=>t(null),[]),s=o.useCallback(l=>{const i=l.getBoundingClientRect();t(u=>u?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:a,close:r,toggleAt:s}}function Oy(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),l=o.useRef(null);o.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const i=o.useCallback((c,d)=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{a(c),s(d)},e)},[e]),u=o.useCallback(()=>{l.current&&clearTimeout(l.current),a(null),s(null)},[]);return{payload:t,anchorRect:r,openAfterDelay:i,close:u}}function Vi(e="warning"){const[t,a]=o.useState(""),[r,s]=o.useState(e),[l,i]=o.useState(0),u=o.useCallback((p,m)=>{s(m),a(p),i(g=>g+1)},[]),c=o.useCallback(p=>u(p,"warning"),[u]),d=o.useCallback(p=>u(p,"normal"),[u]),h=o.useCallback(()=>a(""),[]);return{toastMessage:t,toastType:r,toastKey:l,showToast:u,showWarning:c,showNormal:d,clearToast:h}}function Oa(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 za({computeStyle:e,onScroll:t="close",onResize:a="close",ignoreOutsideClickSelector:r}){const[s,l]=o.useState(!1),[i,u]=o.useState({position:"fixed"}),c=o.useRef(null),d=o.useRef(null),h=o.useCallback(()=>{c.current&&u(e(c.current.getBoundingClientRect(),c.current))},[e]);o.useLayoutEffect(()=>{s&&h()},[s,h]),o.useEffect(()=>{if(!s)return;let g=d.current?.offsetHeight??0;g>0&&h();let y=0,C=null;typeof ResizeObserver<"u"&&d.current&&(C=new ResizeObserver(()=>{const E=d.current?.offsetHeight??0;if(E!==g){if(g=E,++y>4){C?.disconnect(),C=null;return}h()}}),C.observe(d.current));const b=E=>{const w=E.target;r&&w.closest?.(r)||c.current?.contains(w)||d.current?.contains(w)||l(!1)};document.addEventListener("mousedown",b),document.addEventListener("pointerdown",b);let v=null;const f=()=>{if(typeof requestAnimationFrame>"u"){h();return}v===null&&(v=requestAnimationFrame(()=>{v=null,h()}))},B=E=>{d.current?.contains(E.target)||(t==="reposition"?f():t==="close"&&l(!1))};t!=="ignore"&&window.addEventListener("scroll",B,!0);const _=()=>{a==="reposition"?f():a==="close"&&l(!1)};let N=null;const x=()=>{_(),N&&clearTimeout(N),N=setTimeout(()=>{N=null,a==="reposition"&&h()},250)};return a!=="ignore"&&(window.addEventListener("resize",_),window.addEventListener("orientationchange",x)),()=>{v!==null&&cancelAnimationFrame(v),C?.disconnect(),document.removeEventListener("mousedown",b),document.removeEventListener("pointerdown",b),t!=="ignore"&&window.removeEventListener("scroll",B,!0),a!=="ignore"&&(window.removeEventListener("resize",_),window.removeEventListener("orientationchange",x)),N&&clearTimeout(N)}},[s,h,t,a,r]),o.useEffect(()=>{if(s)return Kn(()=>l(!1))},[s]);const p=o.useCallback(()=>l(g=>!g),[]),m=o.useCallback(()=>l(!1),[]);return{open:s,setOpen:l,toggle:p,close:m,style:i,triggerRef:c,menuRef:d}}function zy(e,{mode:t="playback",autoStart:a=!1,onPlaySpeaker:r,onComplete:s,playMs:l=1100,feedbackMs:i=1500}={}){const[u,c]=o.useState([]),[d,h]=o.useState(0),[p,m]=o.useState("idle"),[g,y]=o.useState(null),[C,b]=o.useState([]),[v,f]=o.useState(null),[B,_]=o.useState(0),N=o.useRef(0),x=o.useCallback(M=>{N.current=typeof M=="function"?M(N.current):M,_(N.current)},[]),E=o.useRef(r),w=o.useRef(s);o.useEffect(()=>{E.current=r,w.current=s},[r,s]);const D=o.useRef([]),k=()=>{D.current.forEach(clearTimeout),D.current=[]},A=(M,q)=>{D.current.push(setTimeout(q,M))};o.useEffect(()=>()=>k(),[]);const R=u[d]?.id??null,$=o.useRef(null),G=o.useCallback(()=>{k(),m("playing"),b([]),f(null),x(0);let M=0;e.forEach((q,Y)=>{A(M,()=>{h(Y),y(q.id),E.current?.(q)}),A(M+1e3,()=>{y(null),b(U=>[...U,q.id])}),M+=1300}),A(M,()=>{m("done"),w.current?.({score:0,total:e.length})})},[e,x]),T=o.useCallback((M,q)=>{if(q>=M.length){m("done"),w.current?.({score:N.current,total:M.length});return}$.current=null,h(q),f(null),m("playing"),y(M[q].id),E.current?.(M[q]),A(l,()=>{y(null),m("waiting")})},[l]),P=o.useCallback(()=>{k();const M=La(e);c(M),x(0),b([]),T(M,0)},[e,T,x]),L=o.useCallback(()=>{t==="playback"?(c(e),G()):P()},[t,e,G,P]),Q=o.useCallback(()=>{k(),m("idle"),y(null),b([]),f(null),h(0),x(0),c([])},[x]),Z=JSON.stringify(e.map(M=>[M.id,M.label,M.angleDeg,M.deg,M.row,M.shortcut]));o.useEffect(()=>(a?L():Q(),()=>k()),[t,Z,a]);const F=o.useCallback(M=>{p!=="waiting"||t==="playback"||$.current===d||($.current=d,f(M),M===u[d]?.id&&x(q=>q+1),t==="exam"?(m("playing"),A(400,()=>T(u,d+1))):(m("feedback"),A(i,()=>T(u,d+1))))},[p,t,u,d,T,i,x]),K=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:g,playedIds:C,selectedId:v,answerId:R,showFeedback:p==="feedback",clickable:p==="waiting",onSelectSpeaker:F},index:d,total:K,score:B,phase:p,done:p==="done",start:L,reset:Q}}const No=new Map,Eo=new Map,Wy=()=>()=>{},Hy=()=>!0,Vy=()=>!1;function qi(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 qy(e){if(typeof window>"u")return"";const t=(a,r)=>{const s=r.attrName.toLowerCase(),l=r.attrValue.trim();(s==="href"||s==="xlink:href")&&!l.startsWith("#")&&(r.keepAttr=!1),(s==="style"||l.includes("\\")&&l.includes("("))&&(r.keepAttr=!1);const i=l.replace(/url\s*\(\s*(['"]?)#[^)\s'"]+\1\s*\)/gi,"");/url\s*\(/i.test(i)&&(r.keepAttr=!1)};la.addHook("uponSanitizeAttribute",t);try{return la.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{la.removeHook("uponSanitizeAttribute",t)}}function Uy(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])),s=[...a].filter(i=>r.has(i));if(s.length===0)return e;let l=e;for(const i of s){const u=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=`${t}-${i}`;l=l.replace(new RegExp(`id="${u}"`,"g"),`id="${c}"`).replace(new RegExp(`url\\(\\s*(['"]?)#${u}\\1\\s*\\)`,"g"),(d,h)=>`url(${h}#${c}${h})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return l}function Gy(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 Ky(e,t=!0){const a=o.useSyncExternalStore(Wy,Hy,Vy)&&t&&e?qi(e)??No.get(e)??null:null,[r,s]=o.useState({src:e,enabled:t,svg:a});return o.useEffect(()=>{if(!t||!e){s({src:e,enabled:t,svg:null});return}const l=qi(e)??No.get(e)??null;if(l!==null){s({src:e,enabled:t,svg:l});return}let i=!0;return Gy(e).then(u=>{i&&s({src:e,enabled:t,svg:u})}),()=>{i=!1}},[e,t]),r.src===e&&r.enabled===t?r.svg:a}function Yy({title:e,description:t,actionLabel:a,onAction:r,bg:s,color:l,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:d,className:h=""}){const p=s??l??"main",m=o.useRef(null),[g,y]=o.useState("main"),C=bn("(max-width: 767px)"),b=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const B=m.current;if(!B)return;const _=xo(B),N=(x,E,w)=>{if(w!==void 0)B.style.setProperty(E,w),b.current[x]=!0;else if(b.current[x]){const D=_?.[x];D?B.style.setProperty(E,D):B.style.removeProperty(E),b.current[x]=!1}};N("title","--promo-banner-bg-title",c),N("description","--promo-banner-bg-description",d)},[c,d,p]),o.useLayoutEffect(()=>{const B=m.current;if(!B)return;const _=xo(B);y(_?.actionVariant??"main")},[p]);const v=we("promo-banner",`promo-banner--${i}`,h),f=Ri[p];return n.jsxs("div",{ref:m,className:v,role:"note",children:[n.jsx(f,{}),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(be,{htmlType:"button",size:40,variant:u??g,shape:"pill",useBorder:!0,onClick:r,ariaLabel:a,...C?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:a,minWidth:140}})]})}function Zy({children:e,interval:t=5e3,dotTone:a,className:r="","aria-label":s}){const{t:l}=_e.useTranslation(),i=s??l("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[d,h]=o.useState(0),[p,m]=o.useState(!1),[g,y]=o.useState(!1),[C,b]=o.useState(!1),v=o.useRef(null),f=o.useRef(null),B=o.useRef(null),_=go(),N=p||g||C,x=c>0?Math.min(d,c-1):0;o.useEffect(()=>{if(c<2||t<=0||N||_)return;const w=window.setInterval(()=>h(D=>(Math.min(D,c-1)+1)%c),t);return()=>window.clearInterval(w)},[c,t,N,_]);const E=w=>{f.current!=null&&window.clearTimeout(f.current),f.current=window.setTimeout(()=>{f.current=null,b(!1)},w)};return o.useEffect(()=>()=>{f.current!=null&&window.clearTimeout(f.current)},[]),o.useEffect(()=>{if(!C)return;const w=D=>{D.pointerType==="touch"&&(B.current&&B.current.contains(D.target)||(f.current!=null&&(window.clearTimeout(f.current),f.current=null),b(!1)))};return document.addEventListener("pointerdown",w,!0),()=>document.removeEventListener("pointerdown",w,!0)},[C]),c===0?null:n.jsxs("section",{ref:B,className:we("top-banner",r),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:w=>{v.current=w.pointerType},onPointerDown:w=>{v.current=w.pointerType,w.pointerType==="touch"&&(f.current!=null&&(window.clearTimeout(f.current),f.current=null),b(!0))},onPointerUp:w=>{w.pointerType==="touch"&&E(5e3)},onPointerCancel:w=>{w.pointerType==="touch"&&E(5e3)},onMouseEnter:()=>{v.current!=="touch"&&m(!0)},onMouseLeave:()=>m(!1),onFocus:w=>{let D=!0;try{D=w.target.matches(":focus-visible")}catch{D=!0}y(D)},onBlur:w=>{w.currentTarget.contains(w.relatedTarget)||y(!1)},children:[n.jsx("div",{className:"top-banner__viewport",children:n.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${x*100}%)`},children:u.map((w,D)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":D!==x,...D!==x?{inert:!0}:{},children:w},D))})}),c>1&&n.jsx("div",{className:`top-banner__dots${(a?.[x]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((w,D)=>n.jsx("button",{type:"button",className:`top-banner__dot${D===x?" top-banner__dot--active":""}`,"aria-label":l("topBanner.dotAriaLabel",{count:c,index:D+1,defaultValue:`${c}\uAC1C \uC911 ${D+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":D===x,onClick:()=>h(D)},D))})]})}function Xy({title:e,body:t,open:a=!1,onToggle:r,avatar:s,titleClassName:l="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 h=d.currentTarget.closest('[role="list"]');if(!h)return;const p=Array.from(h.querySelectorAll("[data-accordion-header]")),m=p.indexOf(d.currentTarget);(d.key==="ArrowDown"?p[m+1]:p[m-1])?.focus()}},children:[s&&n.jsx("div",{className:"accordion-item__avatar",children:s}),n.jsx("div",{className:`accordion-item__title ${l}`,children:e}),n.jsx("div",{className:"accordion-item__chevron",children:n.jsx(nt,{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 Jy({items:e=[],defaultOpenIndex:t=0,size:a=72,className:r="",bodyClassName:s}){const[l,i]=o.useState({index:t}),u=(c,d)=>l.id!=null&&c.id!=null?c.id===l.id:l.id==null&&d===l.index;return n.jsx("div",{className:`accordion-group accordion-group--s${a} ${r}`.trim(),role:"list",children:e.map((c,d)=>n.jsx(Xy,{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:s},c.id??d))})}function Qy(){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 e2(){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 t2(){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 jt(e){const{t}=_e.useTranslation(),{type:a="bar",size:r,className:s="","aria-label":l,"aria-hidden":i}=e;if(a==="dot"){const{icon:N,number:x,position:E="top-right",onClick:w,animate:D=!1}=e,k=N??"check",A=x!==void 0?"number":k,R=typeof r=="number"?r:32,$=we("circle-badge",`circle-badge--${A}`,`circle-badge--${E}`,`circle-badge--${R}`,D?"circle-badge--animate":"",w?"circle-badge--clickable":"",s),G=x!==void 0?t("badge.nthSelected",{n:x,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")}[k];return n.jsxs("span",{className:$,onClick:w,onKeyDown:w?T=>{T.key!=="Enter"&&T.key!==" "||(T.preventDefault(),T.currentTarget.click())}:void 0,"aria-label":i?void 0:l??G,"aria-hidden":i||void 0,role:w?"button":i?void 0:"img",tabIndex:w?0:void 0,children:[x!==void 0&&x,x===void 0&&k==="check"&&n.jsx(Qy,{}),x===void 0&&k==="remove"&&n.jsx(e2,{}),x===void 0&&k==="minus"&&n.jsx(t2,{})]})}const{label:u,children:c,variant:d="default",fill:h="filled",minWidth:p,iconLeft:m,iconRight:g,color:y}=e,C=typeof r=="number"?"medium":r??"medium",b={small:"caption-2b",medium:"body-3b",large:"body-2b"}[C]??"body-2b",v={small:12,medium:14,large:16}[C]??14,f=we("badge",`badge--${d}`,`badge--${C}`,h!=="filled"?`badge--${h}`:"",b,s),B=y?.startsWith("--")?`var(${y})`:y,_=p!==void 0||B?{...p!==void 0?{minWidth:typeof p=="number"?`${p}px`:p}:{},...B?{"--badge-color":B}:{}}:void 0;return n.jsxs("span",{className:f,style:_,"aria-label":i?void 0:l,role:l&&!i?"img":void 0,"aria-hidden":i||void 0,children:[m&&n.jsx(nt,{icon:m,size:v,className:"badge__icon"}),u??c,g&&n.jsx(nt,{icon:g,size:v,className:"badge__icon"})]})}function Wa({columns:e=[],onClose:t,className:a="",size:r="medium"}){const{t:s}=_e.useTranslation(),l=r==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const b=[{title:null,columns:e}];let v=e;for(const f of i){const B=v?.[f.ci]?.items?.[f.ii];if(!B||!Array.isArray(B.children)||!B.children.length)break;v=[{title:null,items:B.children}],b.push({title:B.label||null,columns:v})}return b},[e,i]),d=c[c.length-1],h=c.length-1,p=o.useCallback(()=>u(b=>b.slice(0,Math.max(0,Math.min(b.length,h)-1))),[h]),m=o.useRef(null),g=o.useRef(null),y=c.length;o.useEffect(()=>{g.current||(g.current=document.activeElement);let b=0,v=0;const f=()=>{const B=m.current?.querySelector("button:not([disabled])");if(B&&B.offsetParent){B.focus({preventScroll:!0});return}v++<20&&(b=requestAnimationFrame(f))};return b=requestAnimationFrame(f),()=>cancelAnimationFrame(b)},[y]),o.useEffect(()=>()=>{g.current?.focus?.({preventScroll:!0})},[]);const C=o.useCallback((b,v,f)=>{if(b){if(Array.isArray(b.children)&&b.children.length){u(B=>[...B.slice(0,h),{ci:v,ii:f}]);return}try{typeof b.onClick=="function"&&b.onClick()}catch{}try{b&&b.closeOnSelect&&typeof t=="function"&&t()}catch{}}},[t,h]);return n.jsxs("div",{className:le(`menu-tooltip menu-tooltip--${r} ${a}`),children:[(c.length>1||d.title)&&n.jsxs("div",{className:le("menu-tooltip__header"),children:[c.length>1?n.jsx(be,{htmlType:"button",size:l,type:"dot",icon:"chevron-left",ariaLabel:s("common.back","\uB4A4\uB85C"),onClick:p,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:le("menu-tooltip__title button-1"),children:d.title})]}),n.jsx("div",{className:le("menu-tooltip__columns"),ref:m,children:d.columns&&d.columns.map((b,v)=>n.jsxs("div",{className:le("menu-tooltip__column"),children:[b.title?n.jsx("div",{className:le("menu-tooltip__column-title body-3"),children:b.title}):null,n.jsx("div",{className:le("menu-tooltip__items"),children:(b.items||[]).map((f,B)=>n.jsxs(o.Fragment,{children:[f.separatorBefore&&B>0&&n.jsx("div",{className:le("menu-tooltip__separator"),role:"separator"}),n.jsx(be,{htmlType:"button",className:le("menu-tooltip__item"),size:l,type:f.label?"bar":"dot",icon:f.selected?"check":f.icon||"none",rightIcon:Array.isArray(f.children)&&f.children.length?"chevron-right":f.badgeCount?n.jsx(jt,{type:"dot",position:"inline",number:Math.min(f.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:f.label,ariaLabel:f.label&&f.badgeCount&&f.badgeCount>0?s("nav.badgeLabel",{label:f.label,count:f.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):f.label,onClick:()=>C(f,v,B),selected:f.selected,disabled:f.disabled,showTooltipInfo:f.tooltip||!1,useBorder:!1,align:"left"})]},B))})]},v))})]})}const Ui=".content-area";function Do(e,t="Nav"){try{const a=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Ui);if(a){a.scrollTop=0;return}const r=document.scrollingElement??document.documentElement;r&&r.scrollHeight<=r.clientHeight&&At("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Ui}) \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,mr=10,Gi=e=>e&&e>0?e:0;function Ki({items:e=[],activeKey:t,onChange:a,appMode:r,onAppModeChange:s,moreItems:l=[],scrollContainer:i}){const{t:u}=_e.useTranslation(),c=r==="manager"?"malgwi":"manager",d=r==="manager"?"arrow-left":"arrow-right",h=r==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),p=o.useRef(null),[m,g]=o.useState(0),y=e.length;o.useEffect(()=>{const M=p.current;if(!M)return;const q=()=>{const S=typeof getComputedStyle=="function"?getComputedStyle(M):null,I=M.clientWidth-(parseFloat(S?.paddingLeft??"")||0)-(parseFloat(S?.paddingRight??"")||0),O=M.querySelector(".bottom-nav__left"),z=O?.nextElementSibling,se=(O?.offsetWidth??0)+(O&&z?.classList.contains("bottom-nav__divider")?z.offsetWidth:0);g(Math.max(0,I-se))};if(q(),typeof ResizeObserver>"u")return;const Y=new ResizeObserver(q);Y.observe(M);const U=M.querySelector(".bottom-nav__left");return U&&Y.observe(U),()=>Y.disconnect()},[s]);const C=So+1,b=M=>Math.max(0,Math.floor((M+mr)/(So+mr))),v=y*(So+mr)-mr<=m,f=m<=0||l.length===0&&v?y:Math.min(y,b(m-C)),B=m>0&&f<y,_=B?f:y,N=e.slice(0,_),x=e.slice(_),E=B||l.length>0,w=o.useCallback((M,q)=>({position:"fixed",bottom:window.innerHeight-M.top+8,right:window.innerWidth-M.right,zIndex:Oa(q)}),[]),D=o.useId(),{open:k,toggle:A,close:R,style:$,triggerRef:G,menuRef:T}=za({computeStyle:w,onScroll:"ignore",onResize:"reposition"}),P=o.useCallback((M,q)=>q>0?u("nav.badgeLabel",{label:M,count:q,defaultValue:"{{label}}, {{count}}\uAC1C"}):M,[u]),L=o.useCallback((M,q)=>q>0?u("nav.badgeInsideLabel",{label:M,count:q,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):M,[u]),Q=o.useCallback(()=>s?.(c),[s,c]),Z=o.useMemo(()=>x.find(M=>!!M.key&&M.key===t)??l.find(M=>M.selected||M.key&&M.key===t),[x,t,l]),F=o.useMemo(()=>[{items:[...x.map(M=>({label:M.label,icon:M.icon,badgeCount:M.badgeCount,selected:!!M.key&&M.key===t,closeOnSelect:!0,disabled:M.state==="disabled",onClick:()=>{M.state!=="disabled"&&(M.key&&a&&(a(M.key),Do(i,"BottomNav")),R())}})),...l.map(M=>({label:M.label,icon:M.icon,badgeCount:M.badgeCount,selected:M.selected??(!!M.key&&M.key===t),closeOnSelect:!0,onClick:()=>{M.onClick?.(),R()}}))]}],[x,l,t,a,R]),K=[...x,...l].reduce((M,q)=>M+Gi(q.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:p,"aria-label":u("nav.bottomNav","\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158"),children:[s&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__left",children:n.jsx(be,{htmlType:"button",size:52,type:"dot",icon:d,ariaLabel:h,className:"bottom-nav-item",onClick:Q})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:N.map((M,q)=>{const Y=Gi(M.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(be,{htmlType:"button",size:52,type:"dot",icon:M.icon,ariaLabel:P(M.label,Y),selected:!!M.key&&M.key===t,disabled:M.state==="disabled",className:"bottom-nav-item",onClick:()=>{M.key&&(a?.(M.key),Do(i,"BottomNav"))}}),Y>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(jt,{type:"dot",position:"top-right",number:Math.min(Y,99),size:24})})]},M.key??`__slot-${q}`)})}),E&&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:G,className:"bottom-nav__slot",children:[n.jsx(be,{htmlType:"button",size:52,type:"dot",icon:Z?.icon??"ellipsis",ariaLabel:L(Z?.label??u("nav.more","\uB354\uBCF4\uAE30"),K),selected:!!Z,className:"bottom-nav-item",onClick:A,"aria-expanded":k,"aria-controls":k?D:void 0}),K>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(jt,{type:"dot",position:"top-right",number:Math.min(K,99),size:24})}),k&&cn.createPortal(n.jsx("div",{id:D,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:le("tooltip__content"),style:$,ref:T,children:n.jsx(Wa,{columns:F,onClose:R})}),document.body)]})})]})]})}function Yi(e){if(typeof e!="string")return!1;let t="";for(const r of e){const s=r.charCodeAt(0);s<=32||s>=127&&s<=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 Zi(e,t,a){return a&&a>0?e("nav.badgeLabel",{label:t,count:a,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function n2(e){const{t}=_e.useTranslation(),{activeKey:a,unreadCount:r,onDebug:s,onNotification:l,onSetting:i,onHelp:u,onFeedback:c,onAccount:d}=e||{},h="default";return s||l||i||u||c||d?n.jsxs("div",{className:"side-nav__footer",children:[s&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:s,selected:a==="debug"}),l&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bell",ariaLabel:Zi(t,t("nav.notifications","\uC54C\uB9BC"),r),onClick:l,selected:a==="notifications"}),!!r&&r>0&&n.jsx(jt,{type:"dot",number:Math.min(r,99),size:24,"aria-hidden":!0})]}),i&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"settings",ariaLabel:t("nav.settings","\uC124\uC815"),onClick:i,selected:a==="settings"}),u&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"message-circle-question-mark",ariaLabel:t("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:u,selected:a==="help"}),c&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bug",ariaLabel:t("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:c,selected:a==="feedback"}),d&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:d,selected:a==="account"})]}):null}function Xi(e){const{t}=_e.useTranslation(),{item:a,itemKey:r,label:s,icon:l,active:i,onClick:u,style:c,state:d,labelStyle:h}=e||{},p=a?.key??r??"",m=a?.label??s??"",g=a?.icon??l??"",y=a?.badge??0,C=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(nt,{icon:g,label:typeof m=="string"?m:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),b=d==="disabled",v=`side-nav__item ${i?"active":""} ${d||""} ${b?"disabled":""} ${a?.child?"side-nav__item--child":""}`,f=o.useCallback(B=>{if(b)return;const _=B.detail>0;if(_)try{B.currentTarget.blur()}catch{}u?.(p,B.currentTarget,_)},[b,p,u]);return n.jsxs("button",{type:"button",className:v,onClick:f,"aria-label":typeof m=="string"?Zi(t,m,y):void 0,"aria-current":i?"page":void 0,style:c,"aria-disabled":b,children:[C,n.jsx("span",{className:"side-nav__label button-1 f",style:h,children:m}),y>0&&n.jsx(jt,{type:"dot",position:"inline",number:Math.min(y,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 Ji(e){const{t}=_e.useTranslation(),{items:a=[],activeKey:r,onChange:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:g,scrollContainer:y}=e||{},C=m==="manager",b=o.useCallback(()=>g?.(C?"malgwi":"manager"),[g,C]),v=o.useRef(null),[f,B]=o.useState(null);o.useEffect(()=>{const w=v.current;if(!w)return;let D=null;const k=()=>{const{scrollHeight:$,clientHeight:G,scrollTop:T}=w;if($<=G+1){B(F=>F===null?F:null);return}const P=Math.max(24,G/$*G),L=G-P,Q=$-G,Z={top:Math.round(T/Q*L),height:Math.round(P)};B(F=>F&&F.top===Z.top&&F.height===Z.height?F:Z)},A=()=>{if(typeof requestAnimationFrame>"u"){k();return}D===null&&(D=requestAnimationFrame(()=>{D=null,k()}))};k(),w.addEventListener("scroll",A,{passive:!0});const R=typeof ResizeObserver<"u"?new ResizeObserver(A):null;R?.observe(w);for(const $ of Array.from(w.children))R?.observe($);return()=>{D!==null&&cancelAnimationFrame(D),w.removeEventListener("scroll",A),R?.disconnect()}},[a]);const _=o.useRef(null),N=o.useCallback(w=>{const D=v.current;D&&(w.preventDefault(),_.current={y:w.clientY,top:D.scrollTop},w.currentTarget.setPointerCapture(w.pointerId))},[]),x=o.useCallback(w=>{const D=v.current,k=_.current;!D||!k||(D.scrollTop=k.top+(w.clientY-k.y)*(D.scrollHeight/D.clientHeight))},[]),E=o.useCallback(w=>{_.current=null,w.currentTarget.hasPointerCapture(w.pointerId)&&w.currentTarget.releasePointerCapture(w.pointerId)},[]);return n.jsxs("nav",{ref:v,"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[f&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:f.top,height:f.height},onPointerDown:N,onPointerMove:x,onPointerUp:E,onPointerCancel:E})}),n.jsxs("div",{className:"side-nav__menu-list",children:[(a||[]).filter(w=>!w.section&&(w.key||w.label)).map((w,D)=>n.jsxs(o.Fragment,{children:[w.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(Xi,{item:w,active:!!w.key&&w.key===r,state:w.disabled?"disabled":void 0,onClick:(k,A,R)=>{if(w.disabled)return;if(w.href){if(Yi(w.href)&&window.open(w.href,"_blank","noopener,noreferrer"),R)try{A?.blur()}catch{}return}if(s?.(w.key),Do(y,"SideNav"),!R)return;try{A?.blur()}catch{}if(typeof window<"u"&&window.matchMedia){if(!window.matchMedia("(min-width: 768px) and (max-width: 1023px)").matches)return}else return;const $=document.querySelector(".header");if($){const G=typeof $.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&G&&$.matches(":hover"))){$.classList.add("header--force-collapsed");const T=()=>{$.classList.remove("header--force-collapsed"),$.removeEventListener("mouseenter",T)};$.addEventListener("mouseenter",T)}}}})]},w.key??`side-nav__item-${D}`)),g&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),g&&n.jsx(Xi,{item:{key:"__mode-switch__",label:C?t("nav.goToMalgwi","\uB9D0\uADC0\uB85C \uC774\uB3D9"):t("nav.goToManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9"),icon:C?"arrow-left":"arrow-right"},onClick:b})]}),n.jsx(n2,{activeKey:r,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p})]})}var Cr='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>',a2='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 Qi({appMode:e}){const{t}=_e.useTranslation(),a=e==="manager",r=a?jo:Cr,s=a2;return n.jsxs("div",{className:"brand-identity__root","aria-label":t("header.biArea","BI \uC601\uC5ED"),children:[n.jsx("img",{src:s,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 eu({activeKey:e,onChange:t,items:a,malgwiItems:r,managerItems:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:g,scrollContainer:y}){const{t:C}=_e.useTranslation(),b=bn("(max-width: 767px)"),v=o.useMemo(()=>(a??[]).filter($=>!$.section&&($.key||$.label)).map($=>({key:$.key,label:typeof $.label=="string"?$.label:void 0,icon:$.icon,state:$.disabled?"disabled":void 0,badgeCount:$.badge})),[a]),f=o.useCallback($=>{const G=a?.find(T=>T.key===$);if(!G?.disabled){if(G?.href){Yi(G.href)&&window.open(G.href,"_blank","noopener,noreferrer");return}t?.($)}},[a,t]),B=o.useMemo(()=>{const $=[];return i&&$.push({key:"debug",icon:"terminal",label:C("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),u&&$.push({key:"notifications",icon:"bell",label:C("nav.notifications","\uC54C\uB9BC"),badgeCount:l,onClick:u}),d&&$.push({key:"settings",icon:"settings",label:C("nav.settings","\uC124\uC815"),onClick:d}),h&&$.push({key:"help",icon:"message-circle-question-mark",label:C("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:h}),p&&$.push({key:"feedback",icon:"bug",label:C("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:p}),c&&$.push({key:"account",icon:"user-round",label:C("nav.account","\uACC4\uC815"),onClick:c}),$},[C,i,u,d,h,p,c,l]),_=o.useCallback(($,G)=>({position:"fixed",top:$.bottom+8,right:Math.max(8,window.innerWidth-$.right),zIndex:Oa(G)}),[]),N=o.useId(),{open:x,toggle:E,close:w,style:D,triggerRef:k,menuRef:A}=za({computeStyle:_,onScroll:"ignore",onResize:"reposition"}),R=o.useMemo(()=>[{items:B.map($=>({label:$.label,icon:$.icon,badgeCount:$.badgeCount,selected:$.selected??(!!$.key&&$.key===e),closeOnSelect:!0,onClick:()=>{$.onClick?.(),w()}}))}],[B,e,w]);return n.jsxs("aside",{className:`header${m==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(Qi,{appMode:m}),n.jsxs("div",{className:"header__menu-button",ref:k,children:[n.jsx(be,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:u&&l&&l>0?C("nav.badgeInsideLabel",{label:C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:l,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:E,"aria-expanded":x,"aria-controls":x?N:void 0}),!!u&&!!l&&l>0&&n.jsx(jt,{type:"dot",number:Math.min(l,99),size:24,"aria-hidden":!0}),x&&cn.createPortal(n.jsx("div",{id:N,role:"group","aria-label":C("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:le("tooltip__content"),style:D,ref:A,children:n.jsx(Wa,{columns:R,onClose:w})}),document.body)]})]}),n.jsx(Ji,{scrollContainer:y,items:a,activeKey:e??void 0,onChange:t,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:g}),b&&n.jsx(Ki,{items:v,activeKey:e??void 0,onChange:f,scrollContainer:y,appMode:m,onAppModeChange:g})]})}const r2=eu,o2=()=>qt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function tu(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 ca(`${t.toLocaleString("ko-KR")}\uC6D0`)}return ca(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function s2(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function l2(e){if(e.durationDays&&e.durationDays>0){const l=e.durationDays;return l%365===0?`${l/365}\uB144`:`${l}\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 s=a.match(/(\d+)\s*-?\s*(day|year)s?\b/i);return s?s[2].toLowerCase()==="year"?`${s[1]}\uB144`:`${s[1]}\uC77C`:a||o2()}function i2(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 nu(e){return{type:e.type??s2(e),plan:l2(e),label:e.label,price:tu(e.price),originalPrice:tu(e.originalPrice),discountLabel:e.discountLabel}}var u2='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>',c2='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>',au='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 Xn={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},To=new WeakMap;function d2(e){if(e)return To.get(e)}function Tn(e,t){e&&(e.style.setProperty(Xn.text,t.text),e.style.setProperty(Xn.sub,t.sub),t.copyrightColor&&e.style.setProperty(Xn.copyright,t.copyrightColor),To.set(e,t))}function Mn(e){e&&(e.style.removeProperty(Xn.text),e.style.removeProperty(Xn.sub),e.style.removeProperty(Xn.copyright),To.delete(e))}const ru={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function ou(e={}){const t=Mt(ru,Tn,Mn);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("${au}")`}})]})}const su="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",Ca=240;var Ha='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 p2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},h2=100,m2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function lu(e={}){const t=Mt(p2,Tn,Mn),a="var(--color-main)",r=270,s=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:m2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*h2/Ca}) translate(${-Ca/2} ${-Ca/2})`,opacity:i,children:n.jsx("path",{d:su,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("${Ha}")`}})]})}const C2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},f2=100,b2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function g2(e={}){const t=Mt(C2,Tn,Mn),a="#ffffff",r=270,s=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:b2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*f2/Ca}) translate(${-Ca/2} ${-Ca/2})`,opacity:i,children:n.jsx("path",{d:su,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("${au}")`}})]})}const y2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function v2(e={}){const t=Mt(y2,Tn,Mn);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("${Ha}")`}})]})}const _2={Logo_SpeechEar_ko:{"":Cr,_mono:u2},Logo_SpeechEarManager_ko:{"":jo,_mono:c2}};function x2(e,t){if(e)return _2[e]?.[t??""]??void 0}const w2={speechear:Cr,manager:jo},B2={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},iu=10;function k2(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 uu(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 s=Math.floor(e/60);return s>0?t("passCard.remainingMinute",{n:s}):t("passCard.remainingSecond",{n:Math.floor(e)})}function A2(e,t,a){if(e==="manager"){const r=/년/.test(t)||/yr|year/i.test(t)||/1년|365/.test(t),s=a==="\uC624\uD508\uD2B9\uAC00"||a===qt.t("passCard.specialLabel");return r?n.jsx(v2,{}):s?n.jsx(g2,{}):n.jsx(lu,{})}return n.jsx(ou,{})}function cu({ariaLabel:e,product:t,showPrice:a=!1,plan:r,type:s,endDate:l,remainingSeconds:i,endInclusive:u=!1,state:c="active",bg:d,bgOnly:h=!1,textColor:p,subColor:m,copyrightColor:g,logoSrc:y,label:C,price:b,originalPrice:v,discountLabel:f,onUse:B,onRefund:_,onDelete:N}){const{t:x}=_e.useTranslation(),E=t?nu(t):void 0,w=s??E?.type??"speechear",D=r??E?.plan??x("passCard.planSuffix","\uC774\uC6A9\uAD8C"),k=C??E?.label,A=b??(a?E?.price:void 0),R=v??(a?E?.originalPrice:void 0),$=f??E?.discountLabel,G=o.useMemo(()=>{if(A)return null;const W=t?.durationDays??i2(t?.code);if(!W||W<=0)return i!=null?{percent:null,remainingLabel:uu(i,x)}:null;const H=W*86400;let ie;if(i!=null)ie=i;else if((c==="active"||c==="expired")&&l){const he=new Date(l).getTime();if(Number.isNaN(he))return null;const Se=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(l)),$e=/^(\d{4})-(\d{2})-(\d{2})/.exec(Ra()),Ne=Math.round(Se&&$e?(Date.UTC(+Se[1],+Se[2]-1,+Se[3])-Date.UTC(+$e[1],+$e[2]-1,+$e[3]))/864e5:(he-Date.now())/864e5);ie=Math.max(0,u?Ne+1:Ne)*86400}else c==="expired"?ie=0:ie=H;const Te=k2(ie),ye=Math.max(0,Math.min(100,Math.floor(Math.min(Te,H)/H*100)));return c==="pending"&&ye>=100?null:{percent:ye,remainingLabel:c==="expired"?x("passCard.expired","\uB9CC\uB8CC\uB428"):uu(ie,x)}},[A,c,l,i,u,t?.durationDays,t?.code,x]),T=o.useRef(null),[P,L]=o.useState({}),[Q,Z]=o.useState(null),F=!!(B||_||N),K=o.useRef(!1),M=o.useRef(void 0),[q,Y]=o.useState(y);o.useLayoutEffect(()=>{Y(y)},[y]),o.useLayoutEffect(()=>{const W=T.current;W&&(p!==void 0&&W.style.setProperty("--pass-card-text",p),m!==void 0&&W.style.setProperty("--pass-card-sub",m),g!==void 0&&W.style.setProperty("--pass-card-copyright",g))},[p,m,g]),o.useLayoutEffect(()=>{const W=T.current;if(!W)return;const H=d2(W);if(!y){const ie=B2[w],Te=c==="expired"?"_mono":H?.logoColor??"",ye=x2(ie,Te);Y(ye)}},[d,y,w,c]);const U=W=>{const H=T.current;if(!H)return null;const{left:ie,top:Te,width:ye,height:he}=H.getBoundingClientRect(),Se=(W.clientX-ie)/ye-.5;return{rotateX:-((W.clientY-Te)/he-.5)*iu,rotateY:Se*iu}},S=(W,H)=>{const ie=H*-.7,Te=W*.7+10,ye=20+(Math.abs(W)+Math.abs(H))*.4;return`${ie}px ${Te}px ${ye}px rgba(0, 0, 0, 0.18)`},I=o.useCallback(W=>{if(ma())return;K.current=!0,clearTimeout(M.current),M.current=setTimeout(()=>{K.current=!1},200);const H=U(W);H&&L({transform:`perspective(800px) rotateX(${H.rotateX}deg) rotateY(${H.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(H.rotateX,H.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)"})},[]),O=o.useCallback(W=>{if(ma())return;const H=U(W);if(!H)return;const ie=K.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";L({transform:`perspective(800px) rotateX(${H.rotateX}deg) rotateY(${H.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(H.rotateX,H.rotateY),transition:ie})},[]),z=o.useCallback(()=>{clearTimeout(M.current),K.current=!1,L({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)"})},[]),se=o.useCallback(()=>Z(null),[]),te=o.useMemo(()=>{const W=x("passCard.planSuffix","\uC774\uC6A9\uAD8C"),H=D.replace("\uC774\uC6A9\uAD8C","").replace(W==="\uC774\uC6A9\uAD8C"?"":W,"").trim(),ie=H.match(/^(.*?)(일|년)$/);return ie?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:ie[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:ie[2]==="\uB144"?x("passCard.unitYear","\uB144"):x("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:H})},[D,x]),de=o.useMemo(()=>{const W=ca(A);if(!W)return null;const H=W.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!H)return n.jsx("span",{className:"h1",children:W});const[,ie,Te,ye]=H;return n.jsxs(n.Fragment,{children:[ie&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:ie}),n.jsx("span",{className:"h1 pass-card__price-amount",children:Te}),ye.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:ye.trim()})]})},[A]),ee=o.useCallback(()=>{F&&Z(W=>{if(W)return null;const H=T.current?.getBoundingClientRect();if(!H)return null;const ie=50;return{left:H.left,right:H.right,width:H.width,height:H.height,x:H.x,y:H.y+ie,top:H.top+ie,bottom:H.bottom+ie}})},[F]),V=o.useCallback(W=>{F&&(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),ee())},[F,ee]),ne=[{items:[...B?[{label:x("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{B(),Z(null)},closeOnSelect:!0}]:[],..._?[{label:x("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{_(),Z(null)},closeOnSelect:!0}]:[],...N?[{label:x("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{N(),Z(null)},closeOnSelect:!0}]:[]]}];return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card-frame",children:n.jsxs("div",{ref:T,className:`pass-card pass-card--${c}${F?" pass-card--clickable":""}`,style:P,onMouseEnter:I,onMouseMove:O,onMouseLeave:z,onPointerUp:W=>{W.pointerType==="touch"&&z()},onPointerCancel:W=>{W.pointerType==="touch"&&z()},onClick:ee,onKeyDown:F?V:void 0,role:F?"button":void 0,tabIndex:F?0:void 0,"aria-label":e,"aria-haspopup":F?"menu":void 0,"aria-expanded":F?!!Q:void 0,children:[d??A2(w,D,k),!h&&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:q??w2[w],className:"pass-card__logo",alt:w==="manager"?x("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):x("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),n.jsxs("div",{className:"pass-card__plan",children:[n.jsx("div",{children:te}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:k?x("passCard.labeledPlan",{label:k}):x("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),A?n.jsxs("div",{className:"pass-card__price-area",children:[$&&n.jsx("span",{className:"pass-card__discount body-3",children:$}),n.jsxs("div",{className:"pass-card__price",children:[R&&n.jsx("span",{className:"pass-card__price-original body-3",children:ca(R)}),de]})]}):G?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:G.remainingLabel}),G.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:G.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."})]})]})}),Q&&n.jsx(vn,{anchorRect:Q,onClose:se,ariaLabel:x("tooltip.menu","\uBA54\uB274"),children:n.jsx(Wa,{columns:ne,onClose:se,size:"small"})})]})}const N2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function E2(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,a=Mt(N2,Tn,Mn);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("${Ha}")`}})]})}const D2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function S2(e={}){const t=Mt(D2,Tn,Mn);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("${Ha}")`}})]})}function j2(e,t){if(e){if(t==="manager_pro")return n.jsx(S2,{});if(t==="manager_standard")return n.jsx(E2,{});if(t==="manager_lite")return n.jsx(lu,{})}}function T2(e){const t=ca(e);if(!t)return null;const a=t.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!a)return t;const[,r,s,l]=a;return n.jsxs(n.Fragment,{children:[r&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:r}),s,l.trim()&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:l.trim()})]})}function M2(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:s,onSelect:l,period:i="monthly",ownedCodes:u}=e||{},c=_=>!!_&&!!u?.includes(_),d=_=>_.onceOnly??/오픈\s*특가/.test(_.label??""),h=(s.tiers||[]).some(_=>d(_)&&c(_.code)),p=_=>{const N=_.prices?_.prices[i]:_.price;return N?(s.tiers||[]).some(x=>!!x.badge&&x.originals?.[i]===N):!1},m=s.colorToken?`var(--color-${s.colorToken})`:"var(--color-gray)",g=t("payment.plan.freePrice","\uBB34\uB8CC"),y=t("payment.products.mgrEnterprise.tier.price","\uBB38\uC758"),C=_=>_.prices?_.prices[i]:_.price,b=(s.tiers||[]).length>0&&(s.tiers||[]).every(_=>{const N=C(_);return N==="\uBB34\uB8CC"||N===g||N==="0\uC6D0"||typeof N=="string"&&/\d/.test(N)&&!/[1-9]/.test(N)}),v=(s.tiers||[]).length>0&&(s.tiers||[]).every(_=>{const N=C(_);return N==="\uBB38\uC758"||N===y}),f=s.group==="org",B=f?"manager":"speechear";return n.jsxs("div",{className:"payment-plan__card",style:{borderColor:m,"--plan-color":m},children:[s.cardBadge&&n.jsx("div",{className:"payment-plan__card-badge",children:n.jsx(jt,{label:s.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:m},children:s.quote||"\xA0"}),n.jsx("h3",{className:"payment-plan__title-heading h1",children:s.tier??s.title}),n.jsx("p",{className:"payment-plan__subtitle body-3",children:s.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:(s.recommendedFor||[]).map((_,N)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(nt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),_]},N))})]}),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:(s.features||[]).map((_,N)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(nt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),_]},N))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:b?null:v?n.jsx(be,{htmlType:"button",className:"payment-plan__contact-button",label:t("payment.plan.contact",{defaultValue:"\uBB38\uC758\uD558\uAE30"}),variant:"main",size:56,onClick:()=>s.tiers?.[0]&&l?.({...s.tiers[0],productId:s.id,productTitle:s.title})}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"payment-plan__pricing-list",children:(s.tiers||[]).map(_=>{const N=_.label||a,x=d(_),E=x||_.openPromo===!0,w=N.replace(/^오픈\s*특가\s*/,"")||a,D=_.prices?_.prices[i]:_.price,k=_.badge?E?`${r}
|
|
823
|
+
${_.badge}`:_.badge:void 0;if(x&&c(_.code))return null;if(!_.badge&&!h)return p(_)?null:n.jsxs("div",{className:`payment-plan__pricing-row payment-plan__pricing-row--static${_.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:_.label})}),n.jsx("div",{className:"payment-plan__pricing-row-price",children:n.jsx("span",{className:"payment-plan__pricing-current h1",children:T2(D)})})]},_.id);const A=s.tier??(f?s.title:void 0),R=n.jsx(cu,{showPrice:!0,product:{type:B,code:_.code,name:w,label:A,price:D,originalPrice:_.originals?.[i]??void 0,discountLabel:k},bg:j2(f,s.id)}),$=()=>l?.({..._,productId:s.id,productTitle:s.title,preview:R});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:$,onKeyDown:l?G=>{G.target===G.currentTarget&&(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),$())}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:R},_.id)})})})})]})}function L2({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 du={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#c9c9c9"};function $2(){const e=Mt(du,Tn,Mn);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 pu={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function R2(e={}){const t=Mt(pu,Tn,Mn);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("${Ha}")`}})]})}function hu({keys:e,anchor:t="top-right",scale:a,className:r=""}){const s=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:s.map((l,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:l})]},`${l}-${i}`))})}const Va=(e,t,a)=>e+(t-e)*a;function P2({speakers:e,size:t=300,viewT:a=0,activeSpeakerId:r=null,playedIds:s,selectedId:l=null,answerId:i=null,showFeedback:u=!1,pulseSelected:c=!1,pulseSelectedDuration:d,pulseScale:h,clickable:p=!1,onSelectSpeaker:m,buttonSize:g=40,showIcon:y=!0,onCenterClick:C,centerLabel:b,centerDisabled:v=!1,centerAttention:f=!1,shortcutAnchor:B="top-right",shortcutScale:_,scaleShortcut:N=!1}){const{t:x}=_e.useTranslation(),E=Math.max(0,Math.min(1,a)),w=t/2,D=110/300,k=.18,A=W=>t*(D+(W-1)*k),R=W=>{const H=A(W.row??1),ie=W.angleDeg*Math.PI/180;return{x:w+H*Math.cos(ie),y:w+H*Math.sin(ie)}},$=Math.max(...e.map(W=>W.row??1),1),G=t*.08,T=t*.1,P=t*.24,L=t-2*G,Q=t-T-P,Z=t-P/2,F=o.useMemo(()=>[...new Set(e.map(W=>W.deg))].sort((W,H)=>W-H),[e]),K=F.length,M=Math.max(68,K>1?L/(K-1):0),q=o.useMemo(()=>new Map(F.map((W,H)=>[W,H])),[F]),Y=W=>{const H=q.get(W.deg)??0,ie=w+(H-(K-1)/2)*M,Te=$>1?Math.min(68,Q/($-1)):0,ye=Te*($-1),he=T+(Q-ye)/2,Se=$===1?T+Q*.4:he+($-(W.row??1))*Te;return{x:ie,y:Se}},U=W=>{const H=R(W),ie=Y(W);return{x:Va(H.x,ie.x,E),y:Va(H.y,ie.y,E)}},S={x:w,y:Va(w,Z,E)},I=Math.round(g*1.2),O=Math.round(Math.max(16,Math.min(80,g*.7))),z=[],se=new Map;for(const W of e){const H=W.row??1;se.has(H)||se.set(H,[]),se.get(H).push(W)}for(const[W,H]of se.entries()){if(H.length<2)continue;const ie=[...H].sort((He,ot)=>He.deg-ot.deg),Te=ie.map(He=>U(He)),ye=ie.map(He=>He.deg),he=ye[ye.length-1]-ye[0],Se=he/(ye.length-1),$e=360-he,Ne=ie.length>=3&&Se>0&&$e<=Se*1.5,ue=Math.round(A(W)*1e3)/1e3,xe=(He,ot,Qe,Je)=>{const vt=(ot.angleDeg-He.angleDeg+540)%360-180;if(vt===0)return`L ${Je.x} ${Je.y}`;if(E===0)return`A ${ue} ${ue} 0 0 ${vt>0?1:0} ${Je.x} ${Je.y}`;const je=(He.angleDeg+vt/2)*Math.PI/180,Ye={x:w+ue*Math.cos(je),y:w+ue*Math.sin(je)},Be={x:(Qe.x+Je.x)/2,y:(Qe.y+Je.y)/2},Ue={x:Va(Ye.x,Be.x,E),y:Va(Ye.y,Be.y,E)},qe={x:2*Ue.x-Be.x,y:2*Ue.y-Be.y};return`Q ${qe.x} ${qe.y} ${Je.x} ${Je.y}`},ke=Ne?[...ie,ie[0]]:ie,Ee=Ne?[...Te,Te[0]]:Te;let We=`M ${Ee[0].x} ${Ee[0].y}`;for(let He=1;He<Ee.length;He++)We+=" "+xe(ke[He-1],ke[He],Ee[He-1],Ee[He]);z.push({key:`arc-${W}`,d:We})}const te=o.useMemo(()=>new Set(s??[]),[s]),de=W=>({idle:"",active:x("soundCompass.state.active","\uC18C\uB9AC \uB098\uB294 \uC911"),played:x("soundCompass.state.played","\uB4E4\uC74C"),correct:x("soundCompass.state.correct","\uC815\uB2F5"),wrong:x("soundCompass.state.wrong","\uC624\uB2F5")})[W],ee=W=>{if(r===W.id)return"active";if(u){if(W.id===i)return"correct";if(W.id===l&&l!==i)return"wrong"}return te.has(W.id)?"played":"idle"},V=W=>r===W.id?"loop":u?W.id===i?"loop":null:c&&W.id===l?"once":null,ne=(W,H)=>{switch(W){case"played":case"correct":return n.jsx(Fs,{size:H});case"wrong":return n.jsx(Ys,{size:H});default:return n.jsx(Ks,{size:H})}};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:[E===0&&e.map(W=>{const{x:H,y:ie}=U(W);return n.jsx("line",{x1:S.x,y1:S.y,x2:H,y2:ie,stroke:"#dde3ec",strokeWidth:"1"},W.id)}),z.map(W=>n.jsx("path",{d:W.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},W.key))]}),f&&!v&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:I,height:I,left:S.x-I/2,top:S.y-I/2}}),C?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${v?" sound-compass__center--disabled":""}`,style:{width:I,height:I,left:S.x,top:S.y},"aria-label":b,"aria-disabled":v||void 0,tabIndex:v?-1:0,onClick:v?void 0:C,children:n.jsx(Fr,{size:O,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:I,height:I,left:S.x,top:S.y},children:n.jsx(Fr,{size:O,color:"currentColor",strokeWidth:1.5})}),e.map((W,H)=>{const{x:ie,y:Te}=U(W),ye=ee(W),he=V(W),Se={..._!==void 0||N?{"--shortcut-badge-scale":String(_??Math.max(.75,Math.min(3,g/56)))}:null,pointerEvents:p?"auto":"none",cursor:p?"pointer":"default",zIndex:ye!=="idle"?10:1},$e=g,Ne=Math.round(Math.max(10,Math.min(56,$e*.38))),ue=Math.round(Math.max(7,Math.min(18,$e*.2))),xe=Math.round(Math.max(10,Math.min(56,$e*.4))),ke=y==="answered"&&(ye==="played"||ye==="correct"||ye==="wrong"),Ee=y===!0||ke,We=!ke;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...Se,left:ie-$e/2,top:Te-$e/2},children:[he&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${ye}`+(he==="once"?" sound-compass__pulse--once":""),style:{width:$e,height:$e,...he==="once"&&d!==void 0?{"--sc-pulse-duration-once":`${d}ms`}:null,...h!==void 0?{"--sc-pulse-scale":String(h)}:null}}),n.jsxs("button",{type:"button",tabIndex:p?0:-1,"aria-disabled":p?void 0:!0,onClick:p?()=>m?.(W.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${ye}`,style:{width:$e,height:$e},"aria-label":de(ye)?`${W.label}, ${de(ye)}`:W.label,"aria-pressed":l!=null?W.id===l:void 0,children:[Ee&&ne(ye,Ne),We&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:y===!0?ue:xe},children:H+1})]}),W.shortcut&&n.jsx(hu,{keys:W.shortcut,anchor:B,className:"sound-compass__speaker-shortcut"})]},W.id)})]})})}function I2({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 F2({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 mu({checked:e,onChange:t,name:a,value:r,disabled:s=!1,label:l,className:i=""}){const u=o.useId();return n.jsxs("label",{className:`radio${s?" radio--disabled":""} ${i}`.trim(),htmlFor:u,children:[n.jsx("input",{id:u,type:"radio",name:a,value:r,checked:e,disabled:s,onChange:c=>t?.(c.target.checked)}),n.jsx("span",{className:"radio__dot"}),l&&n.jsx("span",{className:"radio__label body-2",children:l})]})}function O2({options:e,value:t,onChange:a,name:r,disabled:s=!1,direction:l="vertical",className:i="",ariaLabel:u}){const c=o.useId(),d=r??`radio-group-${c}`;return n.jsx("div",{className:`radio-group radio-group--${l} ${i}`.trim(),role:"radiogroup","aria-label":u,children:e.map(h=>n.jsx(mu,{name:d,value:h.value,checked:t===h.value,disabled:s||h.disabled,label:h.label,onChange:p=>{p&&a?.(h.value)}},h.value))})}const z2={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function W2({tone:e="info",title:t,message:a,children:r,dismissible:s=!1,onDismiss:l,live:i,className:u=""}){const{t:c}=_e.useTranslation(),[d,h]=o.useState(!1),p=o.useRef(null),m=o.useCallback(()=>{const f=p.current;f&&f.contains(document.activeElement)&&cr(f),h(!0),l?.()},[l]);if(d)return null;const g=we("alert",`alert--${e}`,u),y=i??(e==="danger"||e==="warning"?"assertive":"polite"),C=y==="assertive"?"alert":y==="polite"?"status":void 0,b=!!t,v=!!(a||r);return n.jsxs("div",{ref:p,className:g,role:C,children:[n.jsxs("div",{className:"alert__body",children:[n.jsxs("div",{className:"alert__header",children:[n.jsx(nt,{icon:z2[e],size:20,className:"alert__icon"}),b&&n.jsx("span",{className:"alert__title body-2",children:t}),!b&&v&&n.jsx("div",{className:"alert__message body-3",children:a||r})]}),b&&v&&n.jsx("div",{className:"alert__message alert__message--indented body-3",children:a||r})]}),s&&n.jsx("button",{type:"button",className:"alert__dismiss",onClick:m,"aria-label":c("common.close","\uB2EB\uAE30"),children:"\xD7"})]})}const H2={ready:"search",guide:"info",error:"circle-alert"};function V2(e,t){const a=t.filter(Boolean);if(a.length===0)return e;const r=[];let s=0,l=0;for(const i of a){const u=e.indexOf(i,s);u<0||(u>s&&r.push(e.slice(s,u)),r.push(n.jsx("strong",{className:"search-summary__em body-2",children:i},l++)),s=u+i.length)}return s<e.length&&r.push(e.slice(s)),r}function q2({status:e="guide",label:t,children:a,emphasis:r,icon:s,className:l=""}){const i=s===!1?null:s??H2[e],u=we("search-summary",`search-summary--${e}`,l),c=t??a,d=typeof c=="string"&&r&&r.length>0?V2(c,r):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[i!=null&&n.jsx(nt,{icon:i,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:d})]})}function qa({title:e,items:t}){const{t:a}=_e.useTranslation(),{anchorRect:r,openAt:s,close:l}=Fa(),i=o.useRef(null),u=vo(!!r,(c,d)=>{c&&d?s(i.current?.querySelector("button")??d):l()},i);return n.jsxs("span",{ref:i,style:{display:"contents"},children:[n.jsx(be,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!r,ariaLabel:a("common.info","\uC124\uBA85"),onPointerEnter:c=>{ha(c)||s(c.currentTarget)},onPointerLeave:c=>{ha(c)||l()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{ma()||s(c.currentTarget)},onBlur:l}),r&&n.jsx(Yn,{title:e,items:t,showIndex:t.length>1,anchorRect:r,onClose:l})]})}function U2({items:e=[],value:t,onChange:a,className:r="",size:s=40}){const l=o.useId(),{t:i}=_e.useTranslation(),u=o.useRef(null),c=e.find(C=>!C.disabled)?.key,d=e.some(C=>C.key===t)?t:c??e[0]?.key,h=e.find(C=>C.key===d&&!C.disabled)?.key??c,p=()=>Array.from(u.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),m=(C,b=p())=>{if(b.length===0)return;const v=(C%b.length+b.length)%b.length;b[v]?.focus(),b[v]?.click()},g=C=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(C.key))return;C.preventDefault();const b=p(),v=b.indexOf(C.currentTarget);C.key==="ArrowRight"||C.key==="ArrowDown"?m(v+1,b):C.key==="ArrowLeft"||C.key==="ArrowUp"?m(v-1,b):C.key==="Home"?m(0,b):m(b.length-1,b)},y=e.find(C=>C.key===d);return n.jsxs("div",{className:`tabs ${r}`.trim(),children:[n.jsx("div",{ref:u,className:`tabs__list tabs__list--${s}`,role:"tablist","aria-label":i("tabs.ariaLabel","\uD0ED"),children:e.map(C=>n.jsx("button",{id:`tabs__tab-${l}-${C.key}`,type:"button",role:"tab","aria-selected":C.key===d,"aria-controls":`tabs__panel-${l}-${C.key}`,disabled:C.disabled,tabIndex:C.key===h?0:-1,className:`tabs__tab body-2${C.key===d?" tabs__tab--active":""}`,onClick:()=>{C.key!==t&&a?.(C.key)},onKeyDown:g,children:C.label},C.key))}),y&&n.jsx("div",{id:`tabs__panel-${l}-${y.key}`,role:"tabpanel","aria-labelledby":`tabs__tab-${l}-${y.key}`,tabIndex:0,className:"tabs__panel",children:y.panel},y.key)]})}const G2={xs:12,sm:16,md:20,lg:28,xl:36};function K2(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 Y2({src:e,name:t,size:a="md",shape:r="circle",className:s=""}){const{t:l}=_e.useTranslation(),[i,u]=o.useState(null),c=!!e&&i===e,d=t?K2(t):"",h=!!e&&!c,p=!h&&!!d,m=t||l("avatar.ariaLabel","\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0");return n.jsxs("span",{className:`avatar avatar--${a} avatar--${r} ${s}`.trim(),role:"img","aria-label":m,children:[h&&n.jsx("img",{className:"avatar__image",src:e,alt:m,onError:()=>u(e??null)}),!h&&p&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:d}),!h&&!p&&n.jsx(nt,{icon:"user-round",size:G2[a],className:"avatar__icon"})]})}function Z2(e,t){if(!t)return!0;const a=t.split(",").map(l=>l.trim()).filter(Boolean);if(a.length===0)return!0;const r=e.name.toLowerCase(),s=e.type.toLowerCase();return a.some(l=>{const i=l.toLowerCase();return i.startsWith(".")?r.endsWith(i):i.endsWith("/*")?s.startsWith(i.slice(0,-1)):s===i})}function X2({onFilesSelected:e,accept:t,multiple:a=!1,disabled:r=!1,showFileList:s=!0,files:l,onRemove:i,className:u=""}){const{t:c}=_e.useTranslation(),d=o.useRef(null),[h,p]=o.useState(!1),[m,g]=o.useState([]),y=l??m,C=x=>{if(!x||x.length===0)return;const E=Array.from(x).filter(D=>Z2(D,t));if(E.length===0)return;const w=a?E:E.slice(0,1);if(l===void 0){const D=a?[...y,...w]:w;g(D),e?.(D)}else e?.(w)},b=x=>{x.preventDefault(),!r&&p(!0)},v=x=>{x.preventDefault(),p(!1)},f=x=>{x.preventDefault(),p(!1),!r&&C(x.dataTransfer.files)},B=x=>{const E=x.target;try{C(E.files)}finally{E.value=""}},_=()=>{r||d.current?.click()},N=x=>{if(!r&&(i?.(x),l===void 0)){const E=y.filter((w,D)=>D!==x);g(E),i||e?.(E)}};return n.jsxs("div",{className:`file-upload ${u}`.trim(),children:[n.jsxs("div",{className:we("file-upload__dropzone",h&&"file-upload__dropzone--dragging",r&&"file-upload__dropzone--disabled"),role:"button",tabIndex:r?-1:0,"aria-disabled":r,onClick:_,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),_())},onDragOver:b,onDragLeave:v,onDrop:f,children:[n.jsx(nt,{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:x=>{x.stopPropagation(),_()},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:B,tabIndex:-1})]}),s&&y.length>0&&n.jsx("ul",{className:"file-upload__list",children:y.map((x,E)=>n.jsxs("li",{className:"file-upload__list-item body-3",children:[n.jsx("span",{className:"file-upload__file-name body-3",children:x.name}),n.jsx("button",{type:"button",className:"file-upload__remove-button","aria-label":c("fileUpload.removeAriaLabel",{name:x.name}),disabled:r,onClick:()=>N(E),children:n.jsx(nt,{icon:"x",size:14})})]},`${x.name}-${E}`))})]})}function J2({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,s)=>{const l=s===e.length-1;return n.jsxs("li",{className:"breadcrumb__item",children:[l?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}),!l&&n.jsx(nt,{icon:"chevron-right",size:14,className:"breadcrumb__separator"})]},s)})})})}const Q2={small:14,medium:20,large:28};function ev({value:e,onChange:t,max:a=5,readOnly:r=!1,size:s="medium",ariaLabel:l,className:i=""}){const{t:u}=_e.useTranslation(),c=r||!t,[d,h]=o.useState(null),p=c?e:Number.isFinite(e)?Math.round(e):0,m=d??p,g=Q2[s],y=x=>{x!==e&&t?.(x)},C=x=>{c||y(x)},b=x=>{c||ma()||h(x)},v=o.useRef(null),f=x=>{const E=Math.min(a,Math.max(1,x));y(E),Array.from(v.current?.querySelectorAll("[data-star]")??[]).find(w=>w.dataset.star===String(E))?.focus()},B=x=>{if(!c){switch(x.key){case"ArrowRight":case"ArrowUp":f((p||0)+1);break;case"ArrowLeft":case"ArrowDown":f((p||1)-1);break;case"Home":f(1);break;case"End":f(a);break;default:return}x.preventDefault()}},_=p>=1&&p<=a?Math.round(p):1,N=()=>{c||h(null)};return n.jsx("div",{className:`rating rating--${s}${c?" rating--readOnly":""} ${i}`.trim(),ref:v,onKeyDown:B,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:a}):l??u("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:N,onPointerUp:x=>{x.pointerType==="touch"&&N()},onPointerCancel:x=>{x.pointerType==="touch"&&N()},children:Array.from({length:a},(x,E)=>{const w=E+1,D=Math.max(0,Math.min(1,m-E)),k=D>0&&D<1,A=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(nt,{icon:"star",size:g,className:"rating__star rating__star--empty"}),D>0&&n.jsx("span",{className:`rating__star-fill${k?" rating__star-fill--half":""}`,style:k?{width:`${D*100}%`}:void 0,children:n.jsx(nt,{icon:"star",size:g,className:"rating__star rating__star--filled"})})]});return c?n.jsx("span",{className:"rating__item","aria-hidden":"true",children:A},w):n.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":p===w,"aria-label":u("rating.starLabel",{n:w}),"data-star":w,tabIndex:w===_?0:-1,onClick:()=>C(w),onMouseEnter:()=>b(w),children:A},w)})})}const tv=20,nv=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function av({value:e,onChange:t,palette:a=nv,size:r=40,className:s="",ariaLabel:l}){const{t:i}=_e.useTranslation();return n.jsx("div",{className:`color-picker ${s}`.trim(),role:"group","aria-label":l,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(nt,{icon:"check",size:tv,className:"color-picker__check"})},u)})})}function Cu({icon:e,label:t,tooltip:a,wrapperStyle:r,color:s,bgColor:l,useHover:i=!0,iconSize:u="medium"}){const{t:c}=_e.useTranslation(),d=u==="small",h=we("category-icon",d?"category-icon--small":""),p=d?16:20,m=o.useRef(null),[g,y]=o.useState(!1),C=o.useMemo(()=>{const w=r&&typeof r=="object"?{...r}:{};return!s&&!l?w:{...w,...s?{color:s,"--t-item-fg":s}:{},...l?{"--t-item-bg":l}:{}}},[r,s,l]),b=a||t,v=i&&!!b,[f,B]=o.useState(null);o.useLayoutEffect(()=>{g&&B(m.current?.getBoundingClientRect()??null)},[g]),o.useEffect(()=>{if(!i&&g)try{y(!1)}catch{}},[i,g]),o.useEffect(()=>{if(!g)return;const w=D=>{const k=m.current;if(!k)return;const A=D.target;A&&!k.contains(A)&&y(!1)};return document.addEventListener("pointerdown",w,!0),()=>document.removeEventListener("pointerdown",w,!0)},[g]);const _=o.useCallback(()=>{i&&y(!0)},[i]),N=o.useCallback(()=>{i&&y(!1)},[i]),x=o.useCallback(()=>y(!1),[]),E=o.useCallback(w=>{if(w.key==="Escape"){y(!1);return}(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),y(D=>!D))},[]);return n.jsxs("span",{ref:m,className:we("category-icon__wrap",v&&"category-icon__wrap--interactive"),onPointerEnter:_,onPointerLeave:N,onFocus:_,onBlur:N,onKeyDown:E,role:"button",tabIndex:0,"aria-label":typeof b=="string"?c("common.descriptionFor",{name:b,defaultValue:`${b} \uC124\uBA85`}):void 0,"aria-haspopup":!!b,"aria-expanded":g,"data-tooltip-ignore":!0,children:[n.jsx(nt,{icon:e,label:t,className:h,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:C,size:p}),g&&b&&n.jsx(Sn,{anchorRect:f,text:typeof b=="string"?b:void 0,offset:8,onClose:x,className:"category-icon__tooltip",ariaLabel:typeof b=="string"?b:void 0})]})}let Wn=null;function Ua(e){if(Wn&&Wn!==e)try{Wn()}catch{}return Wn=e,()=>{Wn===e&&(Wn=null)}}function fr(e){if(Wn===e){Wn=null;try{e()}catch{}}}function Ga(e,t){let a=()=>{};const r=new Promise(u=>{a=u});if(typeof e!="string"||e.trim()===""){At("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 s=!1;const l=u=>{if(!s){s=!0;try{t?.(u)}catch{}a(u)}};let i;try{i=new Audio(e)}catch{return l(!1),{el:{},stop:()=>{},done:r}}i.onended=()=>l(!0),i.onerror=()=>l(!1);try{i.play().catch(()=>l(!1))}catch{l(!1)}return{el:i,stop:()=>{try{i.pause()}catch{}l(!1)},done:r}}function rv(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 s=a.sentences||a.items||[],l=r(Array.isArray(s)?s:[]);return l.length===0&&(a.contextCode||a.context_code)&&l.push(String(a.contextCode||a.context_code)),{previewCodes:l,previewBucket:null}}function ov(e,t){const[a,r]=o.useState(!1),[s,l]=o.useState(-1),[i,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),d=o.useRef(!1),h=o.useRef(null),p=o.useRef(null),[m,g]=o.useState(!1),y=o.useRef([]),{previewCodes:C,previewBucket:b}=rv(e,t),v=`${C.join(",")}|${b??""}`,f=o.useMemo(()=>i.key===v?i.urls:[],[i,v]);o.useEffect(()=>{if(!C.length)return;let _=!1;return(async()=>{const N=[],x=[];for(const E of C)try{const w=xl(E,b);if(!w){N.push("");continue}let D=null;try{D=await wl(w)}catch{}if(!D)try{const k=await Bl(w);k&&(D=URL.createObjectURL(k),x.push(D))}catch{}N.push(D??"")}catch{N.push("")}_?x.forEach(E=>{try{URL.revokeObjectURL(E)}catch{}}):(y.current.forEach(E=>{try{URL.revokeObjectURL(E)}catch{}}),y.current=x,u({key:v,urls:N}))})(),()=>{_=!0}},[C.join(","),b]),o.useEffect(()=>()=>{y.current.forEach(_=>{try{URL.revokeObjectURL(_)}catch{}}),y.current=[]},[]);const B=o.useCallback(async _=>{if(_.stopPropagation(),_.preventDefault(),d.current){h.current&&fr(h.current),d.current=!1;try{c.current?.pause()}catch{}r(!1),l(-1);return}if(!f.filter(Boolean).length)return;let N=null;const x=()=>{d.current=!1,N?.stop()};h.current=x;const E=Ua(x);d.current=!0,r(!0);for(let w=0;w<f.length&&d.current;w++){const D=f[w];if(D&&(l(w),N=Ga(D),c.current=N.el,!await N.done))break}E(),h.current===x&&(h.current=null,d.current=!1,r(!1),l(-1))},[f]);return o.useEffect(()=>()=>{h.current&&fr(h.current),d.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:a,playingIndex:s,previewUrls:f,previewHover:m,setPreviewHover:g,previewBtnRef:p,handlePreview:B}}const sv=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 s=r;return s.sentence||s.text||s.context||s.question||s.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:s,depth:l,renderPopup:i,completed:u,completedIds:c,selectedIds:d,tooltipText:h,useDescriptionTooltip:p=!1,onRemove:m,hideCheckBadge:g=!1,showTypeLabel:y=!1,onComplete:C,onSelect:b,onMore:v,countLabelOverride:f,size:B="square"}=e||{},{t:_}=_e.useTranslation(),[N,x]=o.useState(!1),E=o.useRef(null),[w,D]=o.useState(!1);o.useEffect(()=>{E.current?.matches(":hover")&&D(!0)},[]);const{playing:k,playingIndex:A,previewUrls:R,previewHover:$,setPreviewHover:G,previewBtnRef:T,handlePreview:P}=ov(r,a?.key),L=o.useCallback(()=>{b?b():x(!0)},[b]),Q=o.useCallback(()=>x(!1),[]),Z=o.useCallback(()=>D(!0),[]),F=o.useCallback(()=>D(!1),[]),K=o.useCallback(()=>G(!0),[G]),M=o.useCallback(()=>G(!1),[G]),[q,Y]=o.useState(null);o.useLayoutEffect(()=>{$&&Y(T.current?.getBoundingClientRect()??null)},[$,T]);const[U,S]=o.useState(null);o.useLayoutEffect(()=>{w&&!N&&p&&S(E.current?.getBoundingClientRect()??null)},[w,N,p]);const I=o.useCallback(Be=>{Be.target===Be.currentTarget&&(Be.key==="Enter"||Be.key===" ")&&(Be.preventDefault(),L())},[L]),O=r||null,z=o.useMemo(()=>{if(!p)return null;const Be=h?(Array.isArray(h)?h:[h]).filter(Boolean):null,Ue=Be&&Be.length>0?Be:sv(O);return Ue&&Ue.length>0?Ue:null},[p,h,O]),se=o.useCallback(Be=>{Be.stopPropagation(),m?.()},[m]),te=o.useCallback(Be=>Be.stopPropagation(),[]),de=o.useCallback(Be=>{typeof C=="function"&&C(Be)},[C]),ee=u||(c&&r?.id!=null?c.has(String(r.id)):!1),V=!ee&&(d!=null&&r?.id!=null?d.has(String(r.id)):!1);Ii("speechear.popup.close",Q);const ne=Kl(),W=`${a?.label||""} ${t+1}`,H=O?.title||O?.name||W;let ie=a?.icon,Te,ye="",he="";try{const Be=O?.category_0||O?.category_main_code||O?.category_main,Ue=O?.category_1||O?.category_sub_code||O?.category_sub,qe=ne.find(pt=>pt.key===Be);qe?.icon&&(ie=qe.icon),!Te&&qe?.color&&(Te={"--t-item-fg":qe.color}),!Te&&O?.iconColor&&(Te={"--t-item-fg":O.iconColor}),ye=qe?_(`topic.${qe.key}`,{defaultValue:qe.label||""}):"";try{const pt=qe?.subs?.find(_t=>_t.key===Ue);he=pt?_(`topic.sub.${pt.key}`,{defaultValue:pt.label||""}):""}catch{}}catch{}const Se=he?`${ye} / ${he}`:ye||a?.label||H,$e=Be=>_("training.countQuestions",{n:Be,count:Be}),Ne=Be=>_("training.countSentences",{n:Be,count:Be});let ue="";try{if(O)if(a?.key==="LISTEN_IN_NOISE"){let Be=0;Array.isArray(O.items)&&O.items.length>0?Be=O.items.length:Array.isArray(O.sentences)&&O.sentences.length>0?Be=O.sentences.length:O.sentences&&(Be=1),ue=Ne(Be)}else if(a?.key==="SHORT_STORY"){let Be=1;Array.isArray(r?.items)?Be=r.items.length:Array.isArray(r?.raw&&r.raw?.items)?Be=r.raw.items.length:Array.isArray(O?.questions)?Be=O.questions.length:Array.isArray(O?.sentences)&&(Be=O.sentences.length),ue=$e(Be)}else if(a?.key==="LONG_STORY"){let Be=1;if(Array.isArray(O.items)&&O.items.length>0){const Ue=O.items.reduce((qe,pt)=>{const _t=pt.questionItems;return Array.isArray(_t)?qe+_t.length:Array.isArray(pt.questions)?qe+pt.questions.length:qe},0);Be=Ue>0?Ue:O.items.length}else Array.isArray(O.questions)&&O.questions.length>0?Be=O.questions.length:Array.isArray(O.sentences)&&O.sentences.length>0&&(Be=O.sentences.length);ue=$e(Be)}else if(a?.key==="ORDERING_SENTENCE"){let Be=1;Array.isArray(O.items)&&O.items.length>0?Be=O.items.length:Array.isArray(O.sentences)&&O.sentences.length>0&&(Be=O.sentences.length),ue=Ne(Be)}else Array.isArray(O.items)&&(ue=O.items.length>0?$e(O.items.length):"")}catch{}const xe=B==="row",ke=B==="list"||xe,Ee=B==="compact",We=B==="small",He=We&&a?.key?Wf().find(Be=>Be.key===a.key):void 0,ot=He?Yl[He.key]:void 0,Qe=He?ot?_(`trainingType.${ot}.title`,{defaultValue:He.label}):He.label??"":"",Je=y&&a?.label&&a.label!==String(H)?String(a.label):We&&Qe&&Qe!==String(H)?Qe:"",vt=!!Je,je=f!==void 0?f:ue,Ye=[Je,typeof H=="string"?H:"",je].map(Be=>String(Be??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:E,className:`training-block-button${ke?" training-block-button--list":""}${xe?" training-block-button--row":""}${Ee?" training-block-button--compact":""}${We?" training-block-button--small":""}${ee?" training-block-button--completed":""}${V?" training-block-button--selected":""}${vt&&!We?" training-block-button--withType":""}${We&&!vt?" training-block-button--no-type-label":""}`,onClick:L,onPointerEnter:Z,onPointerLeave:F,role:"button",tabIndex:0,onKeyDown:I,"aria-label":typeof s=="string"?s:Ye||void 0,title:!p&&h&&(Array.isArray(h)?h.filter(Boolean).join(`
|
|
824
|
+
`):h)||void 0,children:[n.jsxs("div",{className:"training-block-button__left",children:[y&&a?.label&&a.label!==String(H)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:a.label}),We&&Qe&&Qe!==String(H)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:Qe}),n.jsx(Cu,{icon:ie,label:H,tooltip:Se,wrapperStyle:Te,iconSize:We||Ee?"small":"medium"}),!g&&(ee||V)&&!(m&&w)&&n.jsx(jt,{className:m?"training-block-button__check--removable":void 0,type:"dot",icon:"check",position:"top-left",size:"medium","aria-label":ee?_("training.completed","\uD6C8\uB828 \uC644\uB8CC"):_("training.selected","\uC120\uD0DD\uB428")}),m&&n.jsx(jt,{className:`training-block-button__remove${w?" is-hover":""}`,type:"dot",icon:"remove",position:"top-left",size:"medium","aria-label":_("common.remove","\uC81C\uAC70"),onClick:se}),n.jsx("div",{className:`training-block-button__title ${Ee?"body-3":We?"body-3b":"h3"}`,children:String(H)}),n.jsxs("div",{className:"training-block-button__description",children:[je?n.jsx("div",{className:`training-block-button__count ${We?"caption-2":"caption-1"}`,children:je}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(nt,{icon:"chevron-right",label:_("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:We?12:20})})]}),(ke&&!xe||We)&&R.length>0&&n.jsx("div",{ref:T,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:te,onPointerEnter:K,onPointerLeave:M,children:n.jsx(be,{htmlType:"button",size:We?28:32,type:"dot",icon:k?"pause":"play",variant:We?"transparent-lightGray":"default",useBorder:!1,selected:k,ariaLabel:String(H).trim()?k?_("training.stopFor",{name:H,defaultValue:`${H} \uC815\uC9C0`}):_("training.previewFor",{name:H,defaultValue:`${H} \uBBF8\uB9AC \uB4E3\uAE30`}):k?_("training.stop","\uC815\uC9C0"):_("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:P})})]}),v&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:Be=>{Be.stopPropagation(),v(Be)},children:n.jsx(be,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(H).trim()?_("common.moreFor",{name:H}):_("common.more","\uB354\uBCF4\uAE30")})})]}),$&&n.jsx(Sn,{anchorRect:q,text:k?_("training.stop","\uC815\uC9C0"):_("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:M}),w&&!N&&p&&(z?n.jsx(Yn,{anchorRect:U,items:z,activeIndex:A,onClose:F}):O?.subTitle?n.jsx(Sn,{anchorRect:U,text:O.subTitle,offset:8,onClose:F}):null),N&&i&&i({trainingData:O,typeKey:a?.key??"",onClose:Q,onComplete:de,popupTitle:String(H),popupSubTitle:a?.subTitle,depth:l!=null?String(l):void 0,popupIcon:ie,popupIconTooltip:String(Se),popupWrapperStyle:Te})]})}const fu=200;function lv(e){return e.itemId?(Gf()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function bu({plan:e,groups:t,anchorRect:a,offset:r=12,onClose:s}){const{t:l}=_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):Yf(l).map(c=>{const d=(e?.items??[]).filter(h=>h.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:d.length,data:d.map(lv).filter(h=>h!=null)}}).filter(c=>c.pickedCount>0),[t,e?.items,l]);if(i.length===0)return null;const u=n.jsx("div",{className:le("training-tooltip__box"),children:n.jsx("div",{className:le("training-tooltip__groups"),children:i.flatMap(({key:c,label:d,type:h,data:p},m)=>[m>0?n.jsx("div",{className:le("training-tooltip__divider")},`div-${c}`):null,n.jsxs("div",{className:le("training-tooltip__section"),children:[n.jsx("div",{className:le("training-tooltip__section-header"),children:n.jsx("span",{className:le("training-tooltip__type-label body-3b"),children:d})}),n.jsx("div",{className:le("training-tooltip__items"),children:p.map((g,y)=>n.jsx(Lo,{index:y,type:h,trainingData:g,size:"compact",hideCheckBadge:!0},String(g.id??y)))})]},c)])})});return a?n.jsx(vn,{anchorRect:a,offset:r,onClose:s,closeOnOutsideClick:!1,className:le("training-tooltip"),ariaLabel:l("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const iv=200;function uv({icon:e,count:t,title:a,plan:r,tooltip:s=!0,hoverAccent:l=!1,className:i="",onClick:u,onMouseEnter:c,onMouseLeave:d}){const h=!!u||!!c||s&&!!r,p=we("count-tile",h&&"count-tile--interactive",h&&l&&"count-tile--accent",u&&"count-tile--clickable",i),m=o.useRef(null),[g,y]=o.useState(null),C=o.useRef(null),b=o.useRef(null),v=!!(g&&r&&s),f=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),b.current&&(clearTimeout(b.current),b.current=null)},[]),B=o.useCallback(()=>{f(),y(null)},[f]),_=o.useCallback(()=>{!s||!r||(f(),C.current=setTimeout(()=>{C.current=null,y(m.current?.getBoundingClientRect()??null)},fu))},[s,r,f]),N=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),!b.current&&(b.current=setTimeout(()=>{b.current=null,y(null)},iv))},[]);return o.useEffect(()=>()=>{f()},[f]),o.useEffect(()=>{(!s||!r)&&B()},[s,r,B]),o.useEffect(()=>{if(!v)return;const x=w=>w instanceof Element&&(m.current?.contains(w)||!!w.closest(".training-tooltip")),E=w=>{x(w.target)?f():N()};return document.addEventListener("pointerover",E,!0),()=>document.removeEventListener("pointerover",E,!0)},[v,f,N]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:m,className:p,onClick:u?x=>{B(),u(x)}:void 0,onKeyDown:u?x=>{x.key!=="Enter"&&x.key!==" "||(x.preventDefault(),x.currentTarget.click())}:void 0,onPointerEnter:x=>{x.pointerType==="touch"||x.pointerType==="pen"?B():_()},onMouseEnter:c,onMouseLeave:x=>{N(),d?.(x)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${a} ${t}`,children:[n.jsx(nt,{icon:e,size:20,className:"count-tile__icon"}),n.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:t})]}),g&&r&&n.jsx(bu,{plan:r,anchorRect:g,onClose:B})]})}let Ka=0,gu="",$o="",Ya=0;function yu(){return vu(!1)}function cv(){return vu(!0)}function vu(e){const t=typeof document<"u";Ka===0&&t&&(gu=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(Ya===0&&($o=document.body.style.paddingRight),Ya++,document.body.style.paddingRight="0px"),Ka++;let a=!1;return()=>{a||(a=!0,Ka=Math.max(0,Ka-1),e&&t&&(Ya=Math.max(0,Ya-1),Ya===0&&($o?document.body.style.paddingRight=$o:document.body.style.removeProperty("padding-right"))),Ka===0&&t&&(document.body.style.overflow=gu))}}function dv(){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 pv({open:e,onClose:t,ariaLabel:a,title:r,children:s,size:l="md",closeOnBackdrop:i=!0,closeOnEscape:u=!0,showClose:c=!0,className:d,contentClassName:h}){const{t:p}=_e.useTranslation(),m=o.useId(),g=o.useRef(null),y=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const f=document.activeElement,B=yu(),_=g.current;return fo(_,f),_?.focus(),()=>{B();const N=document.activeElement;(!N||N===document.body||_&&_.contains(N))&&bo(f)?.focus?.()}},[e]);const C=o.useRef(y),b=o.useRef(u);o.useEffect(()=>{C.current=y,b.current=u}),o.useEffect(()=>{if(e)return Kn(()=>{b.current&&C.current()})},[e]);const v=o.useRef(!1);return mo(g,e),!e||typeof document>"u"?null:cn.createPortal(n.jsx("div",{className:we("dialog",d),onPointerDown:i?f=>{v.current=f.target===f.currentTarget}:void 0,onMouseDown:f=>{f.target===f.currentTarget&&f.preventDefault()},onClick:i?f=>{const B=v.current;v.current=!1,B&&f.target===f.currentTarget&&y()}:void 0,children:n.jsxs("div",{ref:g,role:"dialog","aria-modal":"true","aria-label":r?void 0:a,"aria-labelledby":r?m:void 0,tabIndex:-1,className:we("dialog__surface",`dialog__surface--${l}`,h),onClick:f=>f.stopPropagation(),children:[r?n.jsx("div",{className:"dialog__header",children:n.jsx("h2",{id:m,className:"dialog__title h4b",children:r})}):null,c?n.jsx("button",{type:"button",className:"dialog__close","aria-label":p("common.close","\uB2EB\uAE30"),onClick:y,children:n.jsx(dv,{})}):null,n.jsx("div",{className:"dialog__body",children:s})]})}),document.body)}function hv({columns:e,rows:t,rowKey:a,title:r,toolbar:s,empty:l,loading:i,caption:u,className:c=""}){const{t:d}=_e.useTranslation(),h=!i&&t.length===0;return n.jsxs("div",{className:we("board",c),children:[r||s?n.jsxs("div",{className:"board__head",children:[r?n.jsx("h2",{className:"board__title",children:r}):n.jsx("span",{}),s?n.jsx("div",{className:"board__toolbar",children:s}):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})}):h?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:l??d("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((p,m)=>n.jsx("tr",{className:"board__row",children:e.map(g=>n.jsx("td",{className:we("board__td",`board__cell--${g.align??"left"}`),children:g.render(p,m)},g.key))},a(p,m)))})]})]})}function mv({name:e,role:t,photo:a,media:r,credentials:s,size:l=190,className:i=""}){return n.jsxs("div",{className:we("person-card",i),children:[n.jsx("div",{className:"person-card__photo",style:{width:l,height:l},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,s?.length?n.jsx("ul",{className:"person-card__credentials",children:s.map(u=>n.jsx("li",{children:u},u))}):null]})}function Cv({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,s)=>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((l,i)=>n.jsx("p",{children:l},i))})]},`${r.label??""}-${s}`))})]},a.title))})}function fv({title:e,kind:t,body:a,badge:r,badgeSrc:s,footer:l,width:i,className:u=""}){const c=r??(s?n.jsx("img",{src:s,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}),l?n.jsx("div",{className:"publication-card__footer",children:l}):null]})}function bv({logo:e,alt:t,onDone:a,durationMs:r=3e3}){const s=Pa(a);return o.useEffect(()=>{const l=setTimeout(()=>s.current?.(),r);return()=>clearTimeout(l)},[r,s]),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 gv({eyebrow:e,eyebrowIndex:t,title:a,description:r,level:s=2,tone:l="dark",className:i=""}){const u=s===1?"h1":"h2";return n.jsxs("div",{className:we("section-header",`section-header--${l}`,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 yv({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 _u(e){return typeof e=="string"?e:e.label}function xu({value:e,onChange:t,suggestions:a,openOnFocus:r=!1,filterSuggestions:s,onSelectSuggestion:l,autoActiveFirst:i=!1}){const u=o.useId(),[c,d]=o.useState(!1),[h,p]=o.useState(-1),m=o.useRef(null),g=o.useMemo(()=>{if(!a.length)return[];const A=e??"";return s===!1?a:A?typeof s=="function"?s(a,A):a.filter(R=>_u(R).toLowerCase().includes(A.toLowerCase())):r?a:[]},[a,e,r,s]),[y,C]=o.useState(!1),b=o.useRef([]),v=y&&g.length===0?b.current:g;o.useEffect(()=>{v.length&&(b.current=v)},[v]);const f=o.useCallback(()=>C(!0),[]),B=o.useCallback(()=>C(!1),[]),_=i?0:-1;o.useEffect(()=>{c||p(_)},[c,_]),o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const N=h<v.length?h:_<v.length?_:-1,x=o.useCallback(A=>{l?l(A):t?.(_u(A)),d(!1)},[t,l]),E=o.useCallback(()=>d(!0),[]),w=o.useCallback(()=>{d(!0),p(_)},[_]),D=o.useCallback(()=>{m.current=setTimeout(()=>d(!1),120)},[]),k=o.useCallback(A=>{A.nativeEvent.isComposing||A.keyCode===229||(A.key==="ArrowDown"?(A.preventDefault(),d(!0),p(R=>Math.min(v.length-1,(R<v.length?R:_)+1))):A.key==="ArrowUp"?(A.preventDefault(),p(R=>Math.max(_,(R<v.length?R:v.length)-1))):A.key==="Enter"?N>=0&&x(v[N]):A.key==="Escape"&&c&&(A.preventDefault(),d(!1)))},[v,N,c,x,_]);return{listId:u,open:c,activeIdx:N,filtered:v,handleFocus:E,handleBlur:D,handleInput:w,handleKeyDown:k,handleSelect:x,handleCompositionStart:f,handleCompositionEnd:B}}const Ro=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Jn(e){const{value:t,defaultValue:a,name:r,inputRef:s,onChange:l,label:i,ariaLabel:u,ariaDescribedBy:c,required:d,placeholder:h,ghostText:p,ghostHint:m,type:g="text",disabled:y=!1,readOnly:C=!1,error:b,helperText:v,maxLength:f,size:B=40,variant:_="input",fullWidth:N=!1,newline:x=!1,multiline:E=!1,rows:w=3,leftIcon:D,rightIcon:k,clearable:A=!1,list:R,showCount:$=!0,className:G="",onFocus:T,onBlur:P,onKeyDown:L,onEnter:Q,inputMode:Z,autoComplete:F,autoFocus:K,suggestions:M,filterSuggestions:q,onSelectSuggestion:Y,autoActiveFirst:U,openOnFocus:S=!1}=e,I=C||y?void 0:M,{t:O}=_e.useTranslation(),z=o.useId();!i&&!u&&At(`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 se=`tf-${z}`,te=`tf-helper-${z}`,de=o.useRef(null),ee=xu({value:t??"",onChange:l,suggestions:I??[],openOnFocus:S,filterSuggestions:q,onSelectSuggestion:Y,autoActiveFirst:U}),V=!!I&&ee.open&&ee.filtered.length>0,ne=o.useRef(null),[W,H]=o.useState(null),ie=o.useCallback(()=>{const je=ne.current;if(!je||typeof window>"u")return;const Ye=je.getBoundingClientRect(),Be=230,Ue=window.innerHeight-Ye.bottom<Be+8&&Ye.top>Be+8;H({position:"fixed",left:Ye.left,width:Ye.width,...Ue?{bottom:window.innerHeight-Ye.top+8}:{top:Ye.bottom+8},zIndex:Oa(je)})},[]);Ro(()=>{if(!V)return;ie();let je=null;const Ye=()=>{if(typeof requestAnimationFrame>"u"){ie();return}je===null&&(je=requestAnimationFrame(()=>{je=null,ie()}))},Be=Ue=>{const qe=Ue.target;qe&&qe.nodeType===1&&qe.closest?.(".text-field__suggestions")||Ye()};return window.addEventListener("scroll",Be,!0),window.addEventListener("resize",Ye),()=>{je!==null&&cancelAnimationFrame(je),window.removeEventListener("scroll",Be,!0),window.removeEventListener("resize",Ye)}},[V,ie]);const Te=o.useCallback(je=>{de.current=je,typeof s=="function"?s(je):s&&(s.current=je)},[s]),ye=p?`${p}${m??O("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:h,he=t!==void 0,Se=he&&g==="password",[$e,Ne]=o.useState((a??"").length),ue=he?(t??"").length:$e,xe=o.useRef(t);Ro(()=>{xe.current=t}),o.useEffect(()=>{const je=de.current;if(!Se||!je)return;const Ye=t??"";je.value!==Ye&&(je.value=Ye)},[Se,t]),o.useEffect(()=>{if(!x||!de.current)return;const je=de.current;je.style.height="",je.scrollHeight>je.clientHeight&&(je.style.height=`${je.scrollHeight}px`)},[t,$e,x]);const ke=f!=null&&ue>f,Ee=B===32?16:20,We=we("text-field",`text-field--s${B}`,_==="display"?"text-field--display":"",N?"text-field--full-width":"",y?"text-field--disabled":"",C?"text-field--readonly":"",b?"text-field--error":"",D?"text-field--has-left-icon":"",k||A?"text-field--has-right-icon":"",G),He={id:se,...Se?{}:he?{value:t}:{defaultValue:a},ref:Te,placeholder:ye,name:r,disabled:y,readOnly:C,autoFocus:K,maxLength:f,list:R,inputMode:Z,autoComplete:F,"aria-label":!i&&u?u:void 0,"aria-required":d,"aria-invalid":!!b,"aria-describedby":[v||b?te:null,c].filter(Boolean).join(" ")||void 0,role:I?"combobox":void 0,"aria-autocomplete":I?"list":void 0,"aria-haspopup":I?"listbox":void 0,"aria-expanded":I?V:void 0,"aria-controls":V?ee.listId:void 0,"aria-activedescendant":V&&ee.activeIdx>=0?`${ee.listId}-option-${ee.activeIdx}`:void 0,onChange:je=>{const Ye=je.target;he||Ne(Ye.value.length),l?.(Ye.value),I&&ee.handleInput(),Se&&queueMicrotask(()=>{const Be=xe.current??"";Ye.value!==Be&&(Ye.value=Be)})},onCompositionStart:I?ee.handleCompositionStart:void 0,onCompositionEnd:I?ee.handleCompositionEnd:void 0,onFocus:(je=>{T?.(je),I&&ee.handleFocus()}),onBlur:(je=>{P?.(je),I&&ee.handleBlur()}),onKeyDown:(je=>{const Ye=(je.key==="Tab"&&!je.shiftKey||je.key===" ")&&!je.nativeEvent.isComposing;if(p&&Ye&&!C&&!y&&!(je.currentTarget.value??"").trim()){je.preventDefault();const Be=je.currentTarget;he||(Be.value=p,Ne(p.length)),l?.(p);return}I&&je.key==="Enter"&&!je.nativeEvent.isComposing&&ee.activeIdx>=0?je.preventDefault():Q&&je.key==="Enter"&&!je.nativeEvent.isComposing&&(je.preventDefault(),Q()),L?.(je),I&&ee.handleKeyDown(je)})},ot=A&&!y&&!C&&ue>0,Qe=()=>x?n.jsx("textarea",{...He,className:"text-field__input text-field__input--auto body-2",rows:1}):E?n.jsx("textarea",{...He,className:"text-field__input text-field__input--textarea body-2",rows:w}):n.jsx("input",{...He,type:g,className:"text-field__input body-2"}),Je=_==="display"&&!x&&!E&&!!ye,vt=()=>n.jsxs(n.Fragment,{children:[Qe(),Je&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:ye})]});return n.jsxs("div",{ref:ne,className:We,children:[i&&n.jsxs("label",{htmlFor:se,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:[D&&n.jsx("span",{className:"text-field__icon text-field__icon--left",children:n.jsx(nt,{icon:D,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ee})}),vt(),f!=null&&$&&n.jsxs("span",{className:`text-field__count caption-2${ke?" text-field__count--over":""}`,children:[ue,"/",f]}),ot&&n.jsx(be,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:O("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:je=>{je.preventDefault()},onClick:()=>{!he&&de.current&&(de.current.value="",Ne(0)),l?.("")},tabIndex:-1}),k&&!ot&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(nt,{icon:k,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ee})})]}),!!I&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:ee.open&&(t??"").length>0&&ee.filtered.length===0?O("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),V&&(typeof document>"u"?null:cn.createPortal(n.jsx("ul",{id:ee.listId,className:"text-field__suggestions",role:"listbox",style:W??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:ee.filtered.map((je,Ye)=>n.jsx("li",{id:`${ee.listId}-option-${Ye}`,role:"option","aria-selected":Ye===ee.activeIdx,className:`text-field__suggestion body-2${Ye===ee.activeIdx?" is-active":""}`,onMouseDown:Be=>Be.preventDefault(),onClick:()=>{ee.handleSelect(je),de.current?.focus()},children:typeof je=="string"?je:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:je.label}),je.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:je.hint})]})},typeof je=="string"?`${je}-${Ye}`:je.id))}),document.body)),(v||b)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:te,className:"text-field__helper caption-1",role:b?"alert":void 0,children:b||v})})]})}function gn({options:e,value:t,onChange:a,placeholder:r,disabled:s=!1,block:l=!1,size:i=48,error:u=!1,className:c="",ariaLabel:d,ariaDescribedBy:h}){const{t:p}=_e.useTranslation(),m=r??p("dropdown.placeholder","\uC120\uD0DD"),g=o.useId(),y=o.useId(),C=o.useRef(null),b=o.useCallback((T,P)=>{const L=window.innerHeight-T.bottom<260&&T.top>260;return{position:"fixed",left:T.left,minWidth:T.width,...L?{bottom:window.innerHeight-T.top+6}:{top:T.bottom+6},zIndex:Oa(P)}},[]),{open:v,setOpen:f,toggle:B,style:_,triggerRef:N,menuRef:x}=za({computeStyle:b}),[E,w]=o.useState(-1),D=o.useCallback(()=>w(-1),[]),k=e.find(T=>T.value===t);o.useEffect(()=>{if(v){const T=e.findIndex(P=>P.value===t);w(T>=0?T:e.length?0:-1),requestAnimationFrame(()=>{const P=x.current;if(!P)return;const L=P.querySelectorAll(".dropdown__option")[T];L&&(P.scrollTop=Math.max(0,L.offsetTop-P.clientHeight/2+L.clientHeight/2))})}},[v]),o.useEffect(()=>{v&&w(T=>{if(T>=0&&T<e.length)return T;const P=e.findIndex(L=>L.value===t);return P>=0?P:e.length?0:-1})},[v,e.length]);const A=o.useCallback(()=>{s||B()},[s,B]),R=o.useCallback(T=>{T.disabled||s||(T.value!==t&&a?.(T.value),f(!1))},[a,f,s,t]);o.useEffect(()=>{s&&f(!1)},[s,f]);const $=o.useCallback(T=>{if(!s){if(!v){(T.key==="Enter"||T.key===" "||T.key==="ArrowDown")&&(T.preventDefault(),f(!0));return}if(T.key==="Escape"){T.preventDefault(),f(!1);return}T.key==="ArrowDown"?(T.preventDefault(),w(P=>{let L=P+1;for(;L<e.length&&e[L].disabled;)L++;return L<e.length?L:P})):T.key==="ArrowUp"?(T.preventDefault(),w(P=>{let L=P-1;for(;L>=0&&e[L].disabled;)L--;return L>=0?L:P})):(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),e[E]?R(e[E]):f(!1))}},[s,v,e,E,R,f]),G=v?n.jsx("div",{ref:x,id:g,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:_,onMouseLeave:D,onMouseDown:T=>T.preventDefault(),children:e.map((T,P)=>n.jsxs("button",{id:`${g}-option-${P}`,type:"button",role:"option","aria-selected":T.value===t,className:we("dropdown__option body-2",T.value===t?"dropdown__option--active":"",P===E?"dropdown__option--active":"",T.disabled?"dropdown__option--disabled":""),onMouseDown:L=>L.preventDefault(),onClick:()=>R(T),onMouseEnter:()=>w(P),disabled:T.disabled,children:[n.jsx("span",{className:"dropdown__option-check",children:T.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"})})}),T.label]},T.value))}):null;return n.jsxs("div",{ref:C,className:we("dropdown",`dropdown--s${i}`,v?"dropdown--open":"",l?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:$,children:[n.jsxs("button",{ref:N,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":v,"aria-controls":v?g:void 0,"aria-activedescendant":v&&E>=0?`${g}-option-${E}`:void 0,"aria-label":d,"aria-describedby":[d&&k?y:"",h??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:s,onClick:A,onBlur:T=>{v&&!x.current?.contains(T.relatedTarget)&&f(!1)},children:[n.jsx("span",{id:y,className:`dropdown__trigger-label body-2${k?"":" dropdown__trigger-label--placeholder"}`,children:k?k.label:m}),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(G,C.current?.closest(".ihabdevteam-core-scope")??document.body)]})}function Po({page:e,totalPages:t,onChange:a,prevLabel:r,nextLabel:s,className:l=""}){const{t:i}=_e.useTranslation(),u=r??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=s??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),d=Math.max(1,t),h=()=>a(Math.max(1,Math.min(d,e-1))),p=()=>a(Math.min(d,e+1));return n.jsxs("div",{className:we("pagination",l),children:[n.jsx(be,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-left",ariaLabel:u,disabled:e<=1,onClick:h}),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(be,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=t,onClick:p})]})}const Za=new Map;function An(e){const{t}=_e.useTranslation(),{options:a=[],value:r=a.find(_=>!_.disabled)?.key??a[0]?.key,onChange:s=_=>{},className:l="",size:i=40,shape:u="pill",useBG:c=!0,fullWidth:d=!1,minButtonWidth:h,ariaLabel:p}=e||{},m=o.useRef(null),g=a.filter(_=>!_.disabled),y=o.useId(),C=a.map(_=>_.key).join("\xB7");o.useEffect(()=>{if(!(!In||p!=null&&p!=="")){if(Za.set(y,C||"(\uBCF4\uAE30 \uC5C6\uC74C)"),Za.size>1){const _=[...Za.values()].sort();At(`segmented-control-unnamed:${_.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${Za.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): ${_.join(" / ")}`)}return()=>{Za.delete(y)}}},[p,C,y]);const b=_=>{if(!g.length)return;const N=Math.max(0,g.findIndex(E=>E.key===r)),x=_==="first"?g[0]:_==="last"?g[g.length-1]:g[(N+_+g.length)%g.length];x&&(s(x.key),Array.from(m.current?.querySelectorAll("[data-segkey]")??[]).find(E=>E.dataset.segkey===x.key)?.focus())},v=_=>{switch(_.key){case"ArrowRight":case"ArrowDown":b(1);break;case"ArrowLeft":case"ArrowUp":b(-1);break;case"Home":b("first");break;case"End":b("last");break;default:return}_.preventDefault()},f=_=>{const N=x=>typeof x=="string"||typeof x=="number";if(!(!N(_.label)||_.count==null||_.count===!1||!N(_.count)))return`${_.label}, ${_.count}`},B=g.some(_=>_.key===r)?r:g[0]?.key;return n.jsx("div",{ref:m,onKeyDown:v,className:we("segmented-control",`segmented-control--${u}`,`segmented-control--${i}`,d&&"segmented-control--full",!c&&"segmented-control--no-bg",h!=null&&"segmented-control--min",l),style:h!=null?{"--segmented-min-button-w":`${h}px`}:void 0,role:"radiogroup","aria-label":p??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:a.map(_=>n.jsx(be,{htmlType:"button",role:"radio","aria-checked":_.key===r,"data-segkey":_.key,tabIndex:_.key===B?0:-1,label:_.label,count:_.count,ariaLabel:f(_),disabled:_.disabled,className:_.key===r?"is-selected":"",onClick:()=>{_.disabled||s(_.key)},size:i,shape:u,useBorder:!1,useBG:!1},_.key))})}function Io({count:e,search:t,segment:a,filters:r,pageSize:s,pagination:l,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]}),h=!!(t||r?.length||s||l||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,m)=>n.jsx(An,{size:40,...p},p.ariaLabel??m))]}),h&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(Jn,{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,m)=>n.jsx(gn,{size:40,options:p.options,value:p.value,onChange:p.onChange,ariaLabel:p.ariaLabel},m)),(s||l)&&n.jsxs("div",{className:"toolbar__pager",children:[s&&n.jsx(gn,{size:40,options:s.options,value:s.value,onChange:s.onChange,ariaLabel:s.ariaLabel??c("common.pageSizeSelect","\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218")}),l&&n.jsx(Po,{page:l.page,totalPages:l.total,onChange:l.onChange,prevLabel:l.prevLabel,nextLabel:l.nextLabel})]}),i]})})]})}function wu(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(wu).join(""):""}function vv(e){let t=e.replace(/\r\n/g,`
|
|
825
825
|
`).replace(/\r/g,`
|
|
826
826
|
`);t=t.replace(/^\n+/,"").replace(/\n+$/,"");const a=t.split(`
|
|
827
827
|
`).map(l=>l.replace(/\t/g," ")),r=a.filter(l=>l.trim().length>0),s=r.length>0?Math.min(...r.map(l=>l.match(/^ */)?.[0].length??0)):0;return a.map(l=>l.slice(s)).join(`
|
|
828
828
|
`)}const _v=new Set(["pnpm","npm","yarn","node","git","curl","docker","cat","ls","cd","rm","mv","cp","echo","export"]),xv=/^(?: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 wv(e,t){let a=e;const r=[],s=/^(?:sh|bash|zsh|shell|console)$/.test(t.toLowerCase()),l=(i,u)=>r.push({type:i,content:u});for(;a.length>0;){const i=a.match(/^\s+/);if(i){l("whitespace",i[0]),a=a.slice(i[0].length);continue}if(!s&&a.startsWith("//")){const y=a.indexOf(`
|
|
829
829
|
`),C=y===-1?a:a.slice(0,y);l("comment",C),a=a.slice(C.length);continue}if(s&&a.startsWith("#")){const y=a.indexOf(`
|
|
830
|
-
`),C=y===-1?a:a.slice(0,y);l("comment",C),a=a.slice(C.length);continue}const u=a.match(/^\/\*[\s\S]*?\*\//);if(u){l("comment",u[0]),a=a.slice(u[0].length);continue}const c=a.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(c){l("string",c[0]),a=a.slice(c[0].length);continue}const d=a.match(/^\d+(?:\.\d+)?/);if(d){l("number",d[0]),a=a.slice(d[0].length);continue}const h=a.match(xv);if(h){l("keyword",h[0]),a=a.slice(h[0].length);continue}const p=a.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(p){const y=p[0];l(s&&_v.has(y)?"command":"identifier",y),a=a.slice(y.length);continue}const m=a.match(/^[=+\-*/%<>!&|^~?:]+/);if(m){l("operator",m[0]),a=a.slice(m[0].length);continue}const g=a.match(/^[()[\]{};.,]/);if(g){l("punctuation",g[0]),a=a.slice(1);continue}l("other",a[0]),a=a.slice(1)}return r}function Bv({children:e,language:t="bash",title:a="",showCopy:r=!0,size:s="default",className:l=""}){const{t:i}=_e.useTranslation(),[u,c]=o.useState(!1),d=vv(wu(e)),h=o.useRef(null);o.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const p=async()=>{try{if(!await Ff(d))return;c(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>c(!1),2e3)}catch{}},m=wv(d,t),g=s==="small"?"caption-1":"body-3";return n.jsxs("div",{className:we("code-box",s==="small"?"code-box--small":"",l),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:m.map((y,C)=>n.jsx("span",{className:`code-token ${y.type} ${g}`,children:y.content},C))})})]})}function Bu({checked:e,onChange:t,disabled:a=!1,label:r,ariaLabel:s,labelPosition:l="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:[l==="left"&&c,n.jsx("input",{id:u,type:"checkbox",role:"switch",checked:e,disabled:a,onChange:d=>t?.(d.target.checked),"aria-label":!r&&s?s:void 0}),n.jsx("span",{className:"toggle__slider"}),l==="right"&&c]})}function ku({checked:e=!1,onChange:t,disabled:a,indeterminate:r,label:s,size:l="medium",className:i,title:u,ariaLabel:c}){const d=o.useRef(null),h=o.useId(),p=o.useRef(!!r);return p.current=!!r,o.useEffect(()=>{d.current&&(d.current.indeterminate=!!r)}),n.jsxs("label",{className:we("checkbox",l==="small"&&"checkbox--small",l==="large"&&"checkbox--large",a&&"checkbox--disabled",i),htmlFor:h,title:u,children:[n.jsx("input",{ref:d,id:h,type:"checkbox",className:"checkbox__input",checked:e,onChange:m=>{t?.(m.target.checked),d.current&&(d.current.indeterminate=p.current)},disabled:a,"aria-label":!s&&c?c:void 0}),n.jsx("span",{className:"checkbox__box"}),s&&n.jsx("span",{className:"checkbox__label body-3",children:s})]})}function kv({count:e,actions:t,onClear:a,clearLabel:r,visible:s,content:l,max:i}){const{t:u}=_e.useTranslation(),c=s!==void 0?s:e>0,d=r??u("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),h=o.useRef(null),p=o.useRef(null),m=o.useRef(null),g=o.useRef(c);o.useLayoutEffect(()=>{const f=p.current,B=g.current;if(g.current=c,c&&!B){const _=typeof document<"u"?document.activeElement:null;m.current=_&&_!==document.body&&!f?.contains(_)?_:null}else!c&&B&&f&&f.contains(document.activeElement)&&cr(f,m.current)},[c]);const[y,C]=o.useState(!1),b=o.useRef(!1),v=o.useRef(null);return o.useEffect(()=>{const f=h.current;if(!f)return;const B=D=>{b.current=D,C(D)},_=()=>{const D=f.firstElementChild??f,k=Array.from(D.children);if(k.length<2){B(!1);return}const A=k[0].offsetTop,R=k.some(L=>L.offsetTop!==A);if(!b.current){v.current=f.clientWidth,R&&B(!0);return}if(R)return;const $=k[0],G=k[k.length-1],T=G.offsetLeft+G.offsetWidth-$.offsetLeft,P=v.current;(P==null||T<=P)&&B(!1)};if(_(),typeof ResizeObserver>"u")return;const N=new ResizeObserver(_);N.observe(f);const x=f.parentElement;let E=x?.clientWidth??0;const w=new ResizeObserver(()=>{const D=x?.clientWidth??0;D!==E&&(E=D,v.current=null,_())});return x&&w.observe(x),()=>{N.disconnect(),w.disconnect()}},[l,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:h,className:"bulk-bar__count body-2",role:"status",children:l??n.jsx("b",{children:u("common.selectedCount",{count:e})})}),i!==void 0&&n.jsx(jt,{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${y?" bulk-bar__actions--stacked":""}`,children:[n.jsx(fe,{htmlType:"button",size:40,label:d,onClick:a}),t.map((f,B)=>n.jsx(fe,{htmlType:"button",size:40,variant:f.variant??"default",icon:f.icon,label:f.label,onClick:f.onClick},B))]})]})}const Av=[{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 Nv(e){const{onClose:t,className:a}=e;return n.jsx("div",{className:we("item-actions",a),children:Av.map(({key:r,icon:s,closeFirst:l})=>{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:s,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{l&&t(),u.onClick()}},r)})})}function Au(e,t){const a=()=>{if(e){const[C,b]=e.split("-");return{y:+C,m:+b-1}}const[g,y]=lo(t).split("-");return{y:+g,m:+y-1}},[r,s]=o.useState(()=>a().y),[l,i]=o.useState(()=>a().m),u=o.useRef(e);o.useEffect(()=>{if(e===u.current)return;u.current=e;const g=a();s(g.y),i(g.m)},[e]);const c=o.useRef({y:r,m:l});o.useEffect(()=>{c.current={y:r,m:l}},[r,l]);const d=o.useCallback(g=>{const y=c.current.y*12+c.current.m+g,C=Math.floor(y/12),b=y-C*12;c.current={y:C,m:b},s(C),i(b)},[]),h=o.useCallback(()=>d(-1),[d]),p=o.useCallback(()=>d(1),[d]),m=o.useCallback((g,y)=>{c.current={y:g,m:y},s(g),i(y)},[]);return{viewY:r,viewM:l,prevMonth:h,nextMonth:p,setViewYM:m}}function br(e,t){return new Date(e,t+1,0).getDate()}function Ev(e,t){return new Date(e,t,1).getDay()}function Xa(e,t,a){return`${e}-${String(t+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function Dv(e){if(!e)return"";const[t,a,r]=e.split("-");return`${t}. ${a}. ${r}.`}function Sv(e){const t=e.replace(/\D/g,"");if(t.length!==8)return null;const a=+t.slice(0,4),r=+t.slice(4,6),s=+t.slice(6,8);if(r<1||r>12||s<1||s>31)return null;const l=new Date(a,r-1,s);return l.getFullYear()!==a||l.getMonth()!==r-1||l.getDate()!==s?null:Xa(a,r-1,s)}const jv=1900;function Tv(e,t,a,r,s){const l=r?+r.split("-")[0]:Math.min(jv,e),i=s?+s.split("-")[0]:Math.max(t+10,e),u=[];for(let c=l;c<=i;c++)u.push({value:String(c),label:a(c)});return u}function Nu(e,t,a,r){const s=[];for(let l=1;l<=12;l++){const i=`${e}-${String(l).padStart(2,"0")}`;a&&i<a.slice(0,7)||r&&i>r.slice(0,7)||s.push({value:String(l),label:t(e,l)})}return s}function Mv({value:e,onChange:t,size:a=48,min:r,max:s,disabled:l,placeholder:i,className:u,today:c}){const{t:d,i18n:h}=_e.useTranslation(),p=i??d("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),m=o.useMemo(()=>d("calendar.dow",{returnObjects:!0}),[d]),g=lo(c),{viewY:y,viewM:C,prevMonth:b,nextMonth:v,setViewYM:f}=Au(e,c),B=o.useId(),_=o.useCallback((V,ne)=>{const W=window.innerHeight,H=window.innerWidth,ie=typeof document<"u"?document.getElementById(B):null,Te=Math.max(ie?.offsetHeight||0,ie?.scrollHeight||0)||300,ye=Math.max(V.width,ie?.offsetWidth||0,260),he=W-V.bottom,Se=V.top,$e=he<Te&&Se>he,Ne=8,ue=(xe,ke)=>Math.min(Math.max(Ne,xe),Math.max(Ne,ke));return{position:"fixed",left:ue(V.left,H-ye-Ne),width:V.width,minWidth:260,...$e?{top:"auto",bottom:ue(W-V.top+6,W-Te-Ne)}:{bottom:"auto",top:ue(V.bottom+6,W-Te-Ne)},zIndex:Oa(ne)}},[B]),{open:N,setOpen:x,toggle:E,style:w,triggerRef:D,menuRef:k}=za({computeStyle:_,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!N)return;const V=k.current;return(V?.querySelector(".date-picker__day--selected:not(:disabled)")??V?.querySelector(".date-picker__day--today:not(:disabled)")??V?.querySelector(".date-picker__day:not(:disabled)")??V?.querySelector(Bn)??V)?.focus?.(),()=>{const ne=document.activeElement;(!ne||ne===document.body)&&D.current?.focus?.()}},[N,k,D]);const[A,R]=o.useState(1),$=o.useRef(null),G=o.useRef(null);o.useEffect(()=>{if(!N)return;const V=e&&e.slice(0,7)===`${y}-${String(C+1).padStart(2,"0")}`?+e.slice(8):g.slice(0,7)===`${y}-${String(C+1).padStart(2,"0")}`?+g.slice(8):1;R(V)},[N]),o.useEffect(()=>{if(G.current==null)return;const V=G.current;G.current=null,$.current?.querySelector(`[data-day="${V}"]`)?.focus()}),o.useEffect(()=>{R(V=>Math.min(V,br(y,C)))},[y,C]);const T=o.useCallback(V=>{let ne=Xa(V.getFullYear(),V.getMonth(),V.getDate());r&&ne<r&&(ne=r),s&&ne>s&&(ne=s);const[W,H,ie]=ne.split("-").map(Number);(W!==y||H-1!==C)&&f(W,H-1),R(ie),G.current=ie},[r,s,y,C,f]),P=o.useCallback(V=>{const ne=new Date(y,C,A),W=ie=>{ne.setDate(ne.getDate()+ie),T(ne)},H=ie=>{const Te=ne.getFullYear()*12+ne.getMonth()+ie,ye=Math.floor(Te/12),he=Te-ye*12;T(new Date(ye,he,Math.min(ne.getDate(),br(ye,he))))};switch(V.key){case"ArrowLeft":W(-1);break;case"ArrowRight":W(1);break;case"ArrowUp":W(-7);break;case"ArrowDown":W(7);break;case"Home":W(-ne.getDay());break;case"End":W(6-ne.getDay());break;case"PageUp":V.shiftKey?H(-12):H(-1);break;case"PageDown":V.shiftKey?H(12):H(1);break;default:return}V.preventDefault()},[y,C,A,T]),L=o.useCallback(V=>{l||(t(Xa(y,C,V)),x(!1))},[y,C,t,x,l]);o.useEffect(()=>{l&&x(!1)},[l,x]);const Q=V=>{const ne=Xa(y,C,V);return!!(r&&ne<r||s&&ne>s)},Z=(()=>{const V=br(y,C);if(A>=1&&A<=V&&!Q(A))return A;for(let ne=1;ne<=V;ne++)if(!Q(ne))return ne;return-1})(),F=[];for(let V=0;V<Ev(y,C);V++)F.push(null);for(let V=1;V<=br(y,C);V++)F.push(V);const K=a===64?20:a===40?16:18,M=Hl(h.language),q=V=>new Intl.DateTimeFormat(M,{year:"numeric"}).format(new Date(V,0,1)),Y=(V,ne)=>new Intl.DateTimeFormat(M,{month:"long"}).format(new Date(V,ne-1,1)),U=Tv(y,+g.slice(0,4),q,r,s),S=Nu(y,Y,r,s),I=V=>{const ne=Nu(V,Y,r,s);if(ne.length===0)return;const W=ne.some(H=>+H.value===C+1);f(V,W?C:+ne[0].value-1)},[O,z]=o.useState(null);o.useEffect(()=>{z(null)},[e]);const se=o.useCallback(V=>{z(V);const ne=Sv(V);if(!ne||r&&ne<r||s&&ne>s)return;t(ne);const[W,H]=ne.split("-");f(+W,+H-1)},[r,s,t,f]),te=o.useCallback(()=>{z(null)},[]),de=o.useCallback(V=>{V.key==="Enter"?(V.preventDefault(),te(),x(!1)):V.key==="Escape"?(te(),x(!1)):V.key==="ArrowDown"&&!N&&(V.preventDefault(),x(!0))},[te,x,N]),ee=N?un.createPortal(n.jsxs("div",{ref:k,id:B,className:"date-picker__dropdown",style:w,"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:b,"aria-label":d("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(Os,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(bn,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:U,value:String(y),onChange:V=>I(+V),size:40}),n.jsx(bn,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:S,value:String(C+1),onChange:V=>f(y,+V-1),size:40})]}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:v,"aria-label":d("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(zs,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:$,onKeyDown:P,children:[m.map(V=>n.jsx("div",{className:"date-picker__dow caption-1",children:V},V)),F.map((V,ne)=>{if(V===null)return n.jsx("div",{},`e${ne}`);const W=Xa(y,C,V),H=W===e,ie=W===g,Te=Q(V),ye=ne%7;return n.jsx("button",{type:"button",disabled:Te,"data-day":V,tabIndex:V===Z?0:-1,"aria-current":ie?"date":void 0,onClick:()=>!Te&&L(V),className:we("date-picker__day caption-1",H&&"date-picker__day--selected",ie&&!H&&"date-picker__day--today",Te&&"date-picker__day--disabled",ye===0&&"date-picker__day--sun",ye===6&&"date-picker__day--sat"),children:V},V)})]})]}),document.body):null;return n.jsxs("div",{className:we("date-picker",`date-picker--s${a}`,N&&"date-picker--open",u),children:[n.jsxs("div",{className:"date-picker__field",children:[n.jsx("input",{ref:D,type:"text",className:"date-picker__trigger body-2",value:O??Dv(e),placeholder:p,onChange:V=>se(V.target.value),onClick:()=>!l&&!N&&E(),onKeyDown:de,onBlur:te,disabled:l,"aria-haspopup":"dialog","aria-expanded":N,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!l&&E(),disabled:l,tabIndex:-1,"aria-label":p,"aria-haspopup":"dialog","aria-expanded":N,children:n.jsx(Zs,{size:K,className:"date-picker__icon",strokeWidth:1.5})})]}),ee]})}function Lv({items:e,className:t,ariaLabel:a="\uC54C\uB9BC \uAE00",titleLevel:r=4,targetBytes:s}){const l=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=s===void 0?Ml(i.sms):Ml(i.sms,s),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(l,{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,h])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:d}),n.jsx("dd",{children:h})]},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?`${jl}\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 ${jl}\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 $v({src:e,alt:t,className:a,style:r,tone:s,textColor:l}){const i=!s&&!!l,u=Ky(e,i),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return s?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":s},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":l},dangerouslySetInnerHTML:{__html:Uy(qy(u),c)}}):n.jsx("img",{src:e,alt:t,className:we("brand-logo",a),style:r,draggable:!1})}function Eu({children:e,className:t}){const a=o.useRef(null),[r,s]=o.useState(null);return o.useEffect(()=>{s(a.current?.parentElement??null)},[]),o.useEffect(()=>{const l=a.current;if(!l||!r)return;const i=()=>{const c=typeof window<"u"&&window.getComputedStyle(l).position==="absolute"?Math.ceil(l.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(l),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 Fo({items:e,className:t}){return n.jsx("div",{className:le(t?`chart-section__legend ${t}`:"chart-section__legend"),children:e.map((a,r)=>n.jsxs("span",{className:le("chart-section__legend-item"),children:[n.jsx("span",{className:le("chart-section__legend-dot"),style:{background:a.color}}),a.label]},r))})}function Ja({label:e,children:t}){return e?n.jsxs("div",{className:le("chart-section__total chart-section__total--stacked"),children:[n.jsx("span",{className:le("chart-section__total__label body-3"),children:e}),n.jsx("span",{className:le("chart-section__total__value"),children:t})]}):n.jsx("div",{className:le("chart-section__total"),children:t})}function Oo({title:e,titleClassName:t="h3",titleLevel:a=3,icon:r,disc:s,headRight:l,headFloat:i,headSegment:u,headMenuItems:c,collapseBelow:d=420,onClick:h,ariaLabel:p,tooltip:m,totalNum:g,totalUnit:y,totalLabel:C,subRow:b,subRowAlign:v="start",className:f,inGrid:B=!1,children:_}){const{t:N}=_e.useTranslation(),x=o.useRef(null),{anchorRect:E,openAt:w,close:D}=Fa(),k=o.useCallback(()=>{m&&x.current&&w(x.current)},[m,w]),[A,R]=o.useState(!1);Ro(()=>{const S=x.current;if(!S||!u)return;const I=z=>R(z>0&&z<d);if(I(S.clientWidth),typeof ResizeObserver>"u")return;const O=new ResizeObserver(z=>I(z[0].contentRect.width));return O.observe(S),()=>O.disconnect()},[u,d]);const[$,G]=o.useState(null),T=o.useCallback(()=>G(null),[]),P=o.useCallback(S=>{const I=S.currentTarget.getBoundingClientRect();G(O=>O?null:{left:I.left,right:I.right,top:I.top,bottom:I.bottom,width:I.width,height:I.height,x:I.x,y:I.y})},[]),L=!!u&&A;o.useEffect(()=>{L||G(null)},[L]);const Q=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,I)=>I===0?{...S,separatorBefore:!0}:S)]:[],Z=o.useCallback(S=>{if(!h)return;const I=S.target;I&&typeof I.closest=="function"&&I.closest('button, a, input, select, textarea, [role="radiogroup"]')||h()},[h]),F=o.useCallback(S=>{h&&S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),h())},[h]),K=typeof l=="function"?l({collapsed:L}):l,M=g!=null||C?n.jsxs(Ja,{label:C,children:[g!=null&&n.jsx("span",{className:le("chart-section__total__num h0"),children:g}),y&&n.jsx("span",{className:le("chart-section__total__unit h5"),children:y})]}):null,q=K||u?n.jsxs("div",{className:le("chart-section__head-right"),children:[u&&(L?n.jsx(fe,{htmlType:"button",size:32,type:"dot",icon:"ellipsis",ariaLabel:u.ariaLabel??N("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:u.ariaLabel??N("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!$,onClick:P}):n.jsx(kn,{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})),K]}):null,Y=o.useId(),U=a?`h${a}`:"div";return n.jsxs("section",{ref:x,className:le(["chart-section",B&&"chart-section--grid",h&&"chart-section--clickable",f].filter(Boolean).join(" ")),onClick:h?Z:void 0,onKeyDown:h?F:void 0,onPointerEnter:m?k:void 0,onPointerLeave:m?D:void 0,onFocus:m?k:void 0,onBlur:m?D:void 0,role:h?"button":void 0,tabIndex:h?0:void 0,"aria-label":h?p??(typeof e=="string"?e:void 0):void 0,"aria-labelledby":!h&&e!=null?Y:void 0,children:[m&&E&&n.jsx(Dn,{anchorRect:{left:E.left,top:E.top+21,right:E.right,bottom:E.bottom,width:E.width,height:E.height},text:m}),i&&n.jsx(Eu,{children:i}),n.jsxs("div",{className:le("chart-section__head"),children:[n.jsxs("div",{className:le("chart-section__title-row"),children:[r&&n.jsx(nt,{icon:r,label:typeof e=="string"?e:void 0,className:le("chart-section__icon")}),n.jsx(U,{id:Y,className:le(["chart-section__title",t].filter(Boolean).join(" ")),children:e})]}),q,s&&n.jsx("div",{className:le("chart-section__disc body-3"),children:s})]}),(M||b)&&n.jsxs("div",{className:le(["chart-section__sub-row",v!=="start"&&`chart-section__sub-row--${v}`].filter(Boolean).join(" ")),children:[M,b]}),_,$&&n.jsx(yn,{anchorRect:$,onClose:T,ariaLabel:u?.ariaLabel??N("tooltip.menu","\uBA54\uB274"),children:n.jsx(Wa,{columns:[{items:Q}],onClose:T,size:"small"})})]})}const Qa=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,zo=e=>Qa(e.getFullYear(),e.getMonth()+1);function fa(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 Wo=(e,t)=>`${e}#${t}`;function An(e,t){const a=new Date(e,t,1).getDay();return 1+(8-(a===0?7:a))%7}function Rv(){const e=ua();let t=e.getFullYear(),a=e.getMonth(),r=e.getDate();if(r<An(t,a)){const i=new Date(t,a,0);t=i.getFullYear(),a=i.getMonth(),r=i.getDate()}const s=Math.floor((r-An(t,a))/7),l=Qa(t,a+1);return{monthKey:l,value:Wo(l,s)}}function Pv(e){const t=ua(),a=zo(t),r=(c,d)=>Qa(c,d+1),s=new Map;s.set(a,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const d=r(c.date.getFullYear(),c.date.getMonth());s.has(d)||s.set(d,[]),s.get(d).push(c)}for(const[c,d]of[...s.entries()]){const h=fa(c);if(!h)continue;const p=h.year,m=h.month1-1,g=An(p,m);if(!(c===a&&t.getDate()<g)&&!d.some(b=>b.date.getDate()<g))continue;const y=new Date(p,m,0),C=r(y.getFullYear(),y.getMonth());s.has(C)||s.set(C,[])}const l=new Map;for(const[c,d]of s){const h=fa(c);if(!h)continue;const p=h.year,m=h.month1-1,g=new Date(p,m+1,0).getDate(),y=d.reduce((_,N)=>Math.max(_,N.parts?.length??0,N.partsB?.length??0),0),C=d.some(_=>_.partsB),b=new Array(g+1).fill(0),v=new Array(g+1).fill(0),f=Array.from({length:g+1},()=>new Array(y).fill(0)),B=Array.from({length:g+1},()=>new Array(y).fill(0));for(const _ of d){const N=_.date.getDate();if(b[N]+=_.a,v[N]+=_.b,_.parts)for(let x=0;x<y;x++)f[N][x]+=_.parts[x]??0;if(_.partsB)for(let x=0;x<y;x++)B[N][x]+=_.partsB[x]??0}l.set(c,{year:p,month:m,daysInMonth:g,partsLen:y,hasPartsB:C,dayA:b,dayB:v,dayParts:f,dayPartsB:B})}const i=(c,d,h)=>new Date(c,d,h).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,d]of l){const{year:h,month:p,daysInMonth:m,dayA:g,dayB:y,dayParts:C,dayPartsB:b}=d,v=h===t.getFullYear()&&p===t.getMonth(),f=t.getDate(),B=l.get(r(p===11?h+1:h,(p+1)%12)),_=d.partsLen,N=[];for(let E=1;E<=m;E++){const w=v&&E>f;N.push({label:String(E),...w&&g[E]===0&&y[E]===0?{future:!0}:{},a:w&&g[E]===0&&y[E]===0?-1:g[E],b:y[E],..._?{parts:C[E]}:{},..._&&d.hasPartsB?{partsB:b[E]}:{}})}const x=[];for(let E=An(h,p);E<=m;E+=7){const w=Math.max(0,E+6-m),D=w&&B?Math.max(_,B.partsLen):_,k=d.hasPartsB||!!(w&&B?.hasPartsB);let A=0,R=0;const $=new Array(D).fill(0),G=new Array(D).fill(0);for(let P=E;P<=Math.min(E+6,m);P++){A+=g[P],R+=y[P];for(let L=0;L<_;L++)$[L]+=C[P][L],G[L]+=b[P][L]}if(w&&B)for(let P=1;P<=w&&!i(B.year,B.month,P);P++){A+=B.dayA[P],R+=B.dayB[P];for(let L=0;L<B.partsLen;L++)$[L]+=B.dayParts[P][L],G[L]+=B.dayPartsB[P][L]}const T=w?`${(p+1)%12+1}/${w}`:`${E+6}`;x.push({label:`${x.length+1}\uC8FC`,sublabel:`[${E}\uC77C~${T}\uC77C]`,a:A,b:R,...D?{parts:$}:{},...D&&k?{partsB:G}:{}})}u[c]={weekly:x,daily:N}}return u}function Du(){const e=ua(),t=e.getFullYear(),a=e.getMonth()+1,r=[];for(let s=2024;s<=t;s++){const l=s===t?a:12;for(let i=1;i<=l;i++)r.push({value:Qa(s,i),year:s,month:i})}return r.reverse()}Du();function Iv(){return Du()}function Su(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 ju(e){const{t,i18n:a}=_e.useTranslation(),[r,s]=o.useState("week"),l=o.useMemo(()=>Iv().filter(D=>D.value in e),[e]),i=o.useMemo(()=>{const D=[];for(const k of l){const A=new Date(k.year,k.month,0).getDate(),R=An(k.year,k.month-1),$=Math.ceil((A-R+1)/7);for(let G=$-1;G>=0;G--)D.push({value:Wo(k.value,G),monthKey:k.value,year:k.year,month:k.month,week:G})}return D},[l]),u=o.useCallback(D=>`${so(t,a.language,D.year,D.month)} ${Su(t,D.week)}`,[t]),c=o.useMemo(()=>l.map(D=>({value:D.value,label:so(t,a.language,D.year,D.month)})),[t,a.language,l]),d=o.useMemo(()=>i.map(D=>({value:D.value,label:u(D)})),[i,u]),h=o.useMemo(()=>Rv(),[e]),p=o.useMemo(()=>l.find(D=>D.value===h.monthKey)?.value??l[0]?.value??"",[l,h]),m=o.useMemo(()=>i.find(D=>D.value===h.value)?.value??i[0]?.value??"",[i,h]),[g,y]=o.useState(""),[C,b]=o.useState("");o.useEffect(()=>{l.find(D=>D.value===g)||y(p)},[l,g,p]),o.useEffect(()=>{i.find(D=>D.value===C)||b(m)},[i,C,m]);const v=r==="month"?c:d,f=r==="month"?g:C,B=r==="month"?y:b,_=o.useMemo(()=>{const D=t("calendar.dow",{returnObjects:!0});return Array.isArray(D)?D:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),N=v.findIndex(D=>D.value===f),x=o.useCallback(()=>{const D=v.findIndex(k=>k.value===f);D<v.length-1&&B(v[D+1].value)},[v,f,B]),E=o.useCallback(()=>{const D=v.findIndex(k=>k.value===f);D>0&&B(v[D-1].value)},[v,f,B]),w=o.useMemo(()=>[{key:"week",label:t("manager.chart.periodWeek","\uC8FC")},{key:"month",label:t("manager.chart.periodMonth","\uC6D4")}],[t]);return{period:r,setPeriod:s,range:f,setRange:B,activeOptions:v,activeIdx:N,handlePrev:x,handleNext:E,periodOptions:w,monthRange:g,weekRange:C,weekRanges:i,DOW:_}}const Et=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function Mn(e,t=!0){return e.future===!0||t&&e.a===-1}function Fv({data:e,colorA:t,colorB:a,labelA:r,labelB:s,barWidth:l=10,barGap:i=1,height:u=140,maxOverride:c,tightMax:d,seriesColors:h,seriesLabels:p,rateLabels:m,grouped:g=!1,baseline:y,focusableBars:C=!1}){const b=!a,v=!!(h&&h.length>0),f=y,B=o.useMemo(()=>v?Math.max(0,...e.filter(F=>!Mn(F,f==null)).map(F=>g?Math.max(0,...(F.parts??[]).map(Et)):(F.parts??[]).reduce((K,M)=>K+Math.max(0,Et(M)),0))):Math.max(0,...e.filter(F=>!Mn(F,f==null)).flatMap(F=>b?[Et(F.a)]:[Et(F.a),Et(F.b)])),[e,b,v,g]),_=o.useMemo(()=>{if(f==null)return 0;const F=e.filter(K=>!Mn(K,f==null)).flatMap(K=>v?(K.parts??[]).map(Et):b?[Et(K.a)]:[Et(K.a),Et(K.b)]);return Math.max(0,...F.map(K=>Math.abs(K-f)))},[e,f,v,b]),N=o.useMemo(()=>{const F=f!=null?_:B;return c??(d?F>0?F:10:Math.ceil(F/10)*10||10)},[B,_,f,c,d]),x=u,E=v?g?Math.max(1,h.length):1:b?1:2,w={"--bar-width":`${o.useMemo(()=>{const F=Math.max(1,e.length);return Math.max(2,Math.min(l,Math.round(120/(F*E)+6)))},[e.length,E,l])}px`},D={"--bar-group-gap":`${Math.max(0,i)}px`},k=o.useMemo(()=>{const F=Math.round(N/2);return f!=null?[f+N,...F!==N?[f+F]:[],f,...F!==N?[f-F]:[],f-N]:F!==N?[N,F,0]:[N,0]},[N,f]),A=F=>f!=null?1-(F-(f-N))/(2*N):1-F/N,[R,$]=o.useState(null),G=o.useCallback(()=>$(null),[]),T=o.useCallback((F,K)=>{const M=[F.label,F.sublabel].filter(Boolean).join(" ");let q;if(v&&g&&F.rawPartsB)q=(p??[]).map((Y,U)=>{const S=F.rawPartsB[U]??0;return{text:S>0?`${Y}: ${K[U]??0}% (${F.rawParts?.[U]??0}/${S})`:`${Y}: -`,color:(h??[])[U]}});else if(v&&g)q=(p??[]).map((Y,U)=>({text:`${Y}: ${Q(K[U]??0)}`,color:(h??[])[U]}));else if(v){const Y=(p??[]).map((S,I)=>({text:`${S}: ${K[I]??0}`,color:(h??[])[I]})),U=Y.filter((S,I)=>(K[I]??0)>0);q=U.length?U:Y}else m&&!b?q=[{text:`${r} ${Et(F.a)}%`,color:t},{text:`${s} ${Et(F.b)}%`,color:a}]:m&&F.rawB!==void 0?q=[{text:`${m.total} ${F.rawB}`},{text:`${m.done} ${F.rawA??0}`,color:t}]:b?q=[{text:`${r}: ${Et(F.a)}`,color:t}]:q=[{text:`${r}: ${Et(F.a)}`,color:t},{text:`${s}: ${Et(F.b)}`,color:a}];return{title:M,items:q}},[v,g,p,h,m,b,r,s,t,a,f]),P=o.useCallback((F,K,M)=>{const q=F.getBoundingClientRect(),{title:Y,items:U}=T(K,M);$({rect:{left:q.left,top:q.top,right:q.right,bottom:q.bottom,width:q.width,height:q.height},title:Y,items:U})},[T]),L=o.useCallback((F,K)=>{const{title:M,items:q}=T(F,K);return[M,...q.map(Y=>Y.text)].filter(Boolean).join(", ")},[T]),Q=F=>f!=null&&F>f?`+${F}`:`${F}`,Z=R!=null;return o.useEffect(()=>{if(!Z)return;const F=()=>$(null),K=M=>{const q=M.target;q&&typeof q.closest=="function"&&q.closest(".bar-chart__col")||$(null)};return window.addEventListener("scroll",F,!0),document.addEventListener("pointerdown",K,!0),()=>{window.removeEventListener("scroll",F,!0),document.removeEventListener("pointerdown",K,!0)}},[Z]),n.jsxs("div",{className:le("bar-chart__wrap"),style:D,children:[n.jsx("div",{className:le("bar-chart__inner"),children:n.jsx("div",{className:le("bar-chart__scroll"),children:n.jsxs("div",{className:le("bar-chart__area"),children:[n.jsxs("div",{className:le("bar-chart__plot"),style:{height:x},children:[k.slice(0,-1).map((F,K)=>n.jsx("div",{className:le(`bar-chart__gridline${f!=null&&F===f?" bar-chart__gridline--baseline":""}`),style:{top:A(F)*x},children:n.jsx("span",{className:le("bar-chart__gridline__label caption-1"),children:F})},K)),e.map((F,K)=>{const M=Mn(F,f==null),q=x/2,Y=O=>f!=null?Math.min(q,Math.abs(Et(O)-f)/N*q):Math.min(x,Math.max(0,Et(O)/N*x)),U=M?0:Y(F.a),S=M?0:Y(F.b),I=(F.parts??[]).map(Et);return n.jsx("div",{className:le(`bar-chart__col${g&&v?" bar-chart__col--group":""}`),style:{cursor:M?"default":"pointer"},tabIndex:C&&!M?0:void 0,role:C&&!M?"img":void 0,"aria-label":C&&!M?L(F,I):void 0,onMouseEnter:M?void 0:O=>P(O.currentTarget,F,I),onFocus:M||!C?void 0:O=>P(O.currentTarget,F,I),onBlur:C?G:void 0,onMouseLeave:G,children:!M&&(v&&g?(h??[]).map((O,z)=>{const se=I[z]??0;if(f==null)return n.jsx("div",{className:le("bar-chart__bar"),style:{...w,height:Y(se),background:O}},z);const te=Et(se)<f;return n.jsxs("div",{className:le("bar-chart__slot"),style:w,children:[n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--up"),children:!te&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full"),style:{height:Y(se),background:O}})}),n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--down"),children:te&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:Y(se),background:O}})})]},z)}):v?n.jsx("div",{className:le("bar-chart__stack"),style:w,children:(()=>{const O=I.reduce((se,te,de)=>te>0?de:se,-1);let z=x;return I.map((se,te)=>{if(se<=0)return null;const de=Math.min(z,se/N*x);return z-=de,n.jsx("div",{className:le("bar-chart__stack-segment"),style:{height:de,background:(h??[])[te],borderRadius:te===O?"6px 6px 0 0":void 0}},te)})})()}):f!=null?n.jsx(n.Fragment,{children:[{v:Et(F.a),c:t},...b?[]:[{v:Et(F.b),c:a}]].map(({v:O,c:z},se)=>n.jsxs("div",{className:le("bar-chart__slot"),style:w,children:[n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--up"),children:O>=f&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full"),style:{height:Y(O),background:z}})}),n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--down"),children:O<f&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:Y(O),background:z}})})]},se))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:le("bar-chart__bar"),style:{...w,height:U,background:t}}),!b&&n.jsx("div",{className:le("bar-chart__bar"),style:{...w,height:S,background:a}})]}))},K)})]}),n.jsx("div",{className:le("bar-chart__x-axis"),children:e.map((F,K)=>{const M=Mn(F,f==null);return n.jsxs("span",{className:le(`bar-chart__x-axis__label${M?" bar-chart__x-axis__label--future":""}`),children:[n.jsxs("span",{className:le("caption-1 bar-chart__x-axis__main"),children:[F.isToday&&n.jsx("span",{className:le("bar-chart__x-axis__today-dot"),style:{background:t}}),F.label]}),F.sublabel&&n.jsx("span",{className:"caption-1",children:F.sublabel})]},K)})})]})})}),R&&n.jsx(Yn,{anchorRect:R.rect,title:R.title,items:R.items,showIndex:!1,closeOnOutsideClick:!1})]})}function Tu({control:e}){const{t}=_e.useTranslation(),{activeOptions:a,activeIdx:r,range:s,setRange:l,handlePrev:i,handleNext:u,periodOptions:c,period:d,setPeriod:h}=e,p=d==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),m=d==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:le("chart-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(bn,{value:s,onChange:l,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:m,showTooltipInfo:m,disabled:r<=0,onClick:u}),n.jsx(kn,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:d,onChange:g=>h(g),size:40})]})}function Ho(e,t,a,r=!0){const s=new Date(a.getFullYear(),a.getMonth(),a.getDate());return Array.from({length:7},(l,i)=>{const u=new Date(t);u.setDate(t.getDate()+i);const c=(e[zo(u)]?.daily??[])[u.getDate()-1],d=c!=null&&Mn(c,r)||u>s;return{dt:u,entry:c,isFuture:d}})}function Ov(e,t,a,r=!0){const{period:s,monthRange:l,weekRange:i,weekRanges:u,DOW:c}=t,d=ua(),h=d.getFullYear(),p=d.getMonth()+1,m=d.getDate();if(s==="month"){const C=e[l]??{weekly:[],daily:[]},b=fa(l),v=b?b.year:null,f=b?b.month1:null,B=v&&f?An(v,f-1):1;return C.weekly.map((_,N)=>{const x=N+1;let E=_.label,w=!1,D=!1;if(v&&f){const k=B+N*7,A=new Date(v,f-1,k+6),R=A.getMonth()+1,$=A.getDate(),G=R===f?`${$}`:`${R}/${$}`;E=a("manager.chart.weekRange",{start:k,end:G});const T=new Date(h,p-1,m).getTime();w=T>=new Date(v,f-1,k).getTime()&&T<=A.getTime(),D=v>h||v===h&&(f>p||f===p&&k>m)}return{..._,label:E,sublabel:Su(a,x-1),isToday:w,future:_.future===!0||D||void 0,a:D?-1:_.a,b:D?0:_.b}})}const g=u.find(C=>C.value===i);if(!g)return[];const y=new Date(g.year,g.month-1,An(g.year,g.month-1)+g.week*7);return Ho(e,y,d,r).map(({dt:C,entry:b,isFuture:v})=>{const f=C.getMonth()+1,B=C.getDate(),_=C.getFullYear();return{label:f===g.month&&_===g.year?`${B}`:`${f}/${B}`,sublabel:c[C.getDay()]??"",future:v||void 0,a:v?-1:b&&b.a>0?b.a:0,b:v?0:b&&b.b>0?b.b:0,isToday:_===h&&f===p&&B===m,...b?.parts?{parts:v?b.parts.map(()=>0):b.parts}:{},...b?.partsB?{partsB:v?b.partsB.map(()=>0):b.partsB}:{}}})}const zv={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function Wv({focusableBars:e,size:t="medium",barWidth:a,titleKey:r,titleLevel:s,data:l,colorA:i,colorB:u,labelAKey:c,labelBKey:d,showTotal:h=!1,totalUnitKey:p,totalLabelKey:m,control:g,hideControls:y=!1,rate:C=!1,rateAgg:b="dayMean",tightMax:v=!1,avgMode:f=!1,totalFormat:B,series:_,seriesMode:N="stack",loading:x=!1,onDetail:E,headExtra:w,headSegment:D,icon:k,disc:A,onClick:R,cardAriaLabel:$,cardTooltip:G,detailSize:T=32,barGap:P,baseline:L,className:Q,inGrid:Z=!1}){const{t:F}=_e.useTranslation(),K=zv[t],M=ju(l),q=g??M,Y=o.useMemo(()=>Ov(l,q,F,L==null),[l,q,F,L]),U=N==="group"&&!!_&&_.length>0;P!=null&&!U&&Nt("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(!C)return Y;const ee=q.period==="month"?fa(q.monthRange):null,V=ua(),ne=_?.length??0,W=H=>{const ie=[],Te=[],ye=[];for(let he=0;he<ne;he++){let Se=0,$e=0,Ne=0;for(const ue of H){const xe=Et(ue.a[he]),ke=Et(ue.b[he]);ke<=0||(Se+=xe,$e+=ke,Ne+=xe/ke*100)}ie.push(b==="weighted"?$e>0?Math.round(Se/$e*100):0:H.length?Math.round(Ne/H.length):0),Te.push(Se),ye.push($e)}return{pct:ie,ra:Te,rb:ye}};return Y.map((H,ie)=>{let Te=H.a===-1?-1:H.b>0?Math.round(H.a/H.b*100):0;if(ee&&!Mn(H)){const he=ee.year,Se=ee.month1-1,$e=Ho(l,new Date(he,Se,An(he,Se)+ie*7),V).filter(Ne=>!Ne.isFuture);if(b==="weighted"){let Ne=0,ue=0;for(const{entry:xe}of $e)xe&&xe.b>0&&(Ne+=xe.a,ue+=xe.b);Te=ue>0?Math.round(Ne/ue*100):0}else Te=$e.length?Math.round($e.reduce((Ne,{entry:ue})=>Ne+(ue&&ue.b>0?ue.a/ue.b*100:0),0)/$e.length):0}let ye=null;if(U&&!Mn(H)){let he;if(ee){const $e=ee.year,Ne=ee.month1-1;he=Ho(l,new Date($e,Ne,An($e,Ne)+ie*7),V).filter(ue=>!ue.isFuture).map(({entry:ue})=>({a:ue?.parts??[],b:ue?.partsB??[]}))}else he=[{a:H.parts??[],b:H.partsB??[]}];const Se=W(he);ye={parts:Se.pct,rawParts:Se.ra,rawPartsB:Se.rb}}return{...H,a:Te,b:H.a===-1?0:d&&H.parts&&H.parts[1]>0?Math.round(H.parts[0]/H.parts[1]*100):0,rawA:H.a===-1?-1:H.a,rawB:H.b,...ye??{}}})},[Y,C,b,d,q.period,q.monthRange,l,U,_?.length]),I=o.useMemo(()=>{if(C||f){const V=(q.period==="week"?Y:l[q.monthRange]?.daily??[]).filter(W=>W.a!==-1);if(V.length===0)return 0;if(C&&b==="weighted"){let W=0,H=0;for(const ie of V)ie.b>0&&(W+=ie.a,H+=ie.b);return H>0?Math.round(W/H*100):0}const ne=C?V.reduce((W,H)=>W+(H.b>0?H.a/H.b*100:0),0):V.reduce((W,H)=>W+(H.a>0?H.a:0),0);return Math.round(ne/V.length)}const ee=q.period==="month"?l[q.monthRange]?.daily??[]:S;return L!=null?ee.reduce((V,ne)=>V+(Mn(ne,!1)?0:Et(ne.a)+(d?Et(ne.b):0)),0):ee.reduce((V,ne)=>V+(ne.a>0?ne.a:0)+(d&&ne.b>0?ne.b:0),0)},[S,Y,C,b,f,L,d,q.period,q.monthRange,l]),O=_&&_.length>0?_.map(ee=>({color:ee.color,label:ee.label})):[{color:i,label:F(c)},...d?[{color:u,label:F(d)}]:[]],z=t==="small",se=[z?"chart-section--compact":t==="large"?"chart-section--full":void 0,Q].filter(Boolean).join(" ")||void 0,te=r?F(r):"",de=te?F("trainingStatus.detailFor",{name:te,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):F("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Oo,{className:se,inGrid:Z,icon:k,disc:A,onClick:R,ariaLabel:$,tooltip:G,headSegment:D,headMenuItems:E?[{label:de,icon:"list",onClick:E,closeOnSelect:!0}]:void 0,title:F(r),titleLevel:s,titleClassName:z?"h5 chart-section-title--small":void 0,headRight:z?w??void 0:({collapsed:ee})=>n.jsxs(n.Fragment,{children:[!y&&n.jsx(Tu,{control:q}),w,E&&!ee&&n.jsx("span",{className:le("bar-chart__detail-btn"),children:n.jsx(fe,{htmlType:"button",size:T,type:"dot",icon:"list",ariaLabel:de,showTooltipInfo:de,onClick:E})})]}),subRow:n.jsxs(n.Fragment,{children:[h?C||f||m&&B?n.jsx(Ja,{label:z?void 0:`${F(q.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${F(m??c)}`,children:B?(B(I).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((ee,V)=>/\d/.test(ee)?n.jsx("span",{className:le("chart-section__total__num h0"),children:ee},V):n.jsx("span",{className:le("chart-section__total__unit h5"),children:ee},V)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:le("chart-section__total__num h0"),children:I}),p&&n.jsx("span",{className:le("chart-section__total__unit h5"),children:F(p)})]})}):n.jsxs(Ja,{children:[n.jsx("span",{className:le("chart-section__total__num h0"),children:I}),n.jsx("span",{className:le("chart-section__total__unit h5"),children:F(c)}),p&&n.jsx("span",{className:le("chart-section__total__unit h5"),children:F(p)})]}):n.jsx("span",{}),n.jsx(Fo,{items:O,className:"caption-1"})]}),children:x?n.jsx("div",{className:le("bar-chart__wrap bar-chart__loading"),"aria-busy":"true",children:n.jsx("div",{className:le("bar-chart__inner"),children:n.jsxs("div",{className:le("bar-chart__area bar-chart__area--loading"),children:[n.jsx("div",{className:le("bar-chart__plot bar-chart__plot--loading"),style:{height:K.height},children:n.jsx(da,{size:32})}),n.jsx("div",{className:le("bar-chart__x-axis"),"aria-hidden":"true",children:n.jsxs("span",{className:le("bar-chart__x-axis__label"),children:[n.jsx("span",{className:le("caption-1 bar-chart__x-axis__main"),children:"\xA0"}),S.some(ee=>!!ee.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(Fv,{focusableBars:e,data:S,colorA:i,colorB:d?u:void 0,labelA:F(c),labelB:d?F(d):void 0,barWidth:a??K.barWidth,barGap:P,baseline:L,height:K.height,maxOverride:C?100:void 0,tightMax:v,seriesColors:_?.map(ee=>ee.color),seriesLabels:_?.map(ee=>ee.label),rateLabels:C?{total:F("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:F("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:U})})}const Mu=120,Hv={left:38,right:16,top:26,bottom:24};function Vv({points:e=[],range:t,ticks:a=[],axisTitle:r,color:s,height:l=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:d,className:h}){const[p,m]=o.useState(null),[g,y]=o.useState(null);o.useEffect(()=>{if(!g)return;const L=Z=>m(Math.round(Z)||null);if(L(g.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const Q=new ResizeObserver(([Z])=>L(Z.contentRect.width));return Q.observe(g),()=>{Q.disconnect()}},[g]);const{payload:C,anchorRect:b,openAfterDelay:v,close:f}=Oy(Mu),B=o.useCallback((L,Q)=>{L&&v(L,Q.getBoundingClientRect())},[v]),_=p??i,N=l,{left:x,right:E,top:w,bottom:D}={...Hv,...u},[k,A]=t,R=L=>A===k?x:x+(_-x-E)*(L-k)/(A-k),$=L=>w+(N-w-D)*(100-L)/100,G={x:R,y:$,plot:{left:x,right:_-E,top:w,bottom:N-D,width:Math.max(0,_-x-E),height:Math.max(0,N-w-D)}},T=e.filter(L=>!L.hollow),P=s??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:y,className:we("line-chart",h),viewBox:`0 0 ${_} ${N}`,role:"img","aria-label":d??e.map(L=>L.description).filter(Boolean).join(", "),children:[r&&n.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:r}),[0,100].map(L=>n.jsxs("g",{children:[n.jsx("line",{className:"line-chart__grid",x1:x,x2:_-E,y1:$(L),y2:$(L)}),n.jsxs("text",{className:"line-chart__tick",x:x-6,y:$(L)+4,textAnchor:"end",children:[L,"%"]})]},L)),c?.(G),a.map(L=>n.jsx("text",{className:"line-chart__tick",x:R(L.x),y:N-5,textAnchor:"middle",children:L.label},L.x)),T.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:P,points:T.map(L=>`${R(L.x)},${$(L.pct)}`).join(" ")}),e.map(L=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:Q=>B(L.description,Q.currentTarget),onPointerLeave:f,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:R(L.x),cy:$(L.pct),r:12}),n.jsx("circle",{className:we("line-chart__dot-main",L.hollow&&"is-hollow"),cx:R(L.x),cy:$(L.pct),r:4,stroke:P,fill:L.hollow?void 0:P})]},L.x))]}),C!=null&&n.jsx(yn,{anchorRect:b,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:C,children:C})]})}function qv({icon:e,iconSize:t=56,title:a,titleClass:r="h2",description:s,tipGroups:l,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}),s!=null&&n.jsx("p",{className:"game-intro__description body-3",children:s}),l?.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((h,p)=>n.jsxs("span",{className:"game-intro__tip body-3",children:[h.icon!=null&&n.jsx("span",{"aria-hidden":"true",children:h.icon}),n.jsx("span",{children:h.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 Lu=(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")}`},$u=(e,t,a,r)=>({from:Vl(e,t,a),to:new Date(Vl(e,t,a+r).getTime()-1),fromYmd:Lu(e,t,a),toYmd:Lu(e,t,a+r-1)});function Uv(e,t=0){if(e.period==="month"){const s=fa(e.monthRange),l=ua(),i=s?s.year:l.getFullYear(),u=(s?s.month1:l.getMonth()+1)-1+t,c=new Date(Date.UTC(i,u+1,0)).getUTCDate();return $u(i,u,1,c)}const a=e.weekRanges.find(s=>s.value===e.weekRange);if(!a){const s=new Date,l=Ra();return{from:s,to:s,fromYmd:l,toYmd:l}}const r=An(a.year,a.month-1);return $u(a.year,a.month-1,r+(a.week+t)*7,7)}const Vo={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function Ru(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Pu({done:e,total:t,segments:a,color:r="var(--color-main)",size:s="medium",strokeWidth:l,label:i="%",hideCenter:u=!1,hideLabel:c=!1}){const d=typeof s=="number"?s:Vo[s].diameter,h=l??(typeof s=="number"?12:Vo[s].strokeWidth),p=d/2,m=(d-h)/2,g=2*Math.PI*m;if(a&&a.length>0){const v=a.reduce((f,B)=>{const _=f.length>0?f[f.length-1].acc:0,N=Number.isFinite(B.ratio)?B.ratio:0,x=Math.max(0,Math.min(N,1-_));return f.push({color:B.color,rotate:-90+_*360,dash:g*x,acc:_+x}),f},[]);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:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),v.map((f,B)=>f.dash>0&&n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:f.color,strokeWidth:h,strokeDasharray:`${f.dash} ${g}`,strokeLinecap:"round",transform:`rotate(${f.rotate} ${p} ${p})`},B))]})})}const y=(t??0)>0?Math.min((e??0)/t,1):0,C=g*y,b=g-C;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:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),y>0&&n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:r,strokeWidth:h,strokeDasharray:`${C} ${b}`,strokeLinecap:y<.02||y>.98?"butt":"round",transform:`rotate(-90 ${p} ${p})`})]}),!u&&n.jsxs("div",{className:`ring-chart__center${c?"":` ${d<=96?"ring-chart__center--small":s==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${d<=96?"h2":"h1"}`,children:Ru(y)}),!c&&n.jsx("span",{className:`ring-chart__label ${d<=96?"caption-2":"caption-1"}${d<=96||s==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function Gv({titleKey:e,titleLevel:t,headRight:a,icon:r,showTotal:s,totalLabelKey:l,legend:i,loading:u,className:c,inGrid:d=!1,onClick:h,ariaLabel:p,tooltip:m,...g}){const{t:y}=_e.useTranslation();if(!e)return n.jsx(Pu,{...g});const C=(g.total??0)>0?Ru(Math.min((g.done??0)/g.total,1)):0,b=g.size==="small",v=typeof g.size=="number"?g.size:Vo[g.size??"medium"].diameter,f=g.size==="large",B=[c,b?"chart-section--compact":f?"chart-section--full":""].filter(Boolean).join(" ")||void 0,_=r&&n.jsx("span",{className:le("chart-section-icon"),children:n.jsx(nt,{icon:r,className:le("chart-section-icon-inner")})});return n.jsx(Oo,{className:B,inGrid:d,onClick:h,ariaLabel:p,tooltip:m,title:y(e),titleLevel:t,titleClassName:b?"h5 chart-section-title--small":void 0,headRight:_||(b?void 0:a),subRow:(s||i)&&n.jsxs(n.Fragment,{children:[s?n.jsxs(Ja,{label:!b&&l?y(l):void 0,children:[n.jsx("span",{className:le("chart-section__total__num h0"),children:C}),n.jsx("span",{className:le("chart-section__total__unit h5"),children:"%"})]}):n.jsx("span",{}),i&&n.jsx(Fo,{items:i})]}),children:u?n.jsx("div",{className:le("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx("div",{className:"ring-chart ring-chart--loading",style:{width:v,height:v},"aria-busy":"true",children:n.jsx(da,{size:32})})}):n.jsx("div",{className:le("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx(Pu,{...g,hideCenter:g.hideCenter??b})})})}function Kv({label:e,value:t,change:a,changeType:r,icon:s,tooltip:l,onClick:i,children:u}){const c=o.useRef(null),{anchorRect:d,openAt:h,close:p}=Fa(),m=o.useCallback(()=>{l&&c.current&&h(c.current)},[l,h]),g=r??(a===void 0?void 0:a>0?"up":a<0?"down":"neutral"),y=a===void 0?void 0:a>0?`+${a}`:`${a}`,C=o.useCallback(b=>{i&&(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),i())},[i]);return n.jsxs("div",{ref:c,className:le(`stat-chart__card${i?" stat-chart__card--clickable":""}`),onClick:i,onKeyDown:i?C:void 0,onPointerEnter:m,onPointerLeave:p,onFocus:m,onBlur:p,role:i?"button":void 0,tabIndex:i?0:void 0,"aria-label":i?[e,t,y].filter(b=>b!==void 0&&b!=="").join(" "):void 0,children:[l&&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:l}),n.jsxs("div",{className:le("stat-chart__card__label-row"),children:[n.jsx("span",{className:le("stat-chart__card__label h5"),children:e}),s&&n.jsx("span",{className:le("stat-chart__card__icon"),children:n.jsx(nt,{icon:s,className:le("stat-chart__card__icon-inner")})})]}),n.jsxs("div",{className:le("stat-chart__card__content"),children:[n.jsxs("div",{className:le("stat-chart__card__left"),children:[n.jsx("div",{className:le("stat-chart__card__value h2"),children:t}),y&&n.jsx("div",{className:le(`stat-chart__card__change stat-chart__card__change--${g??"neutral"} caption-1`),children:y})]}),u&&n.jsx("div",{className:le("stat-chart__card__body"),children:u})]})]})}function Iu({value:e,onChange:t,min:a=0,max:r=100,step:s=1,orientation:l="horizontal",size:i=24,disabled:u=!1,ariaLabel:c,length:d,className:h,label:p,formatValue:m,labelPos:g,labelAlign:y="right",showMinMax:C=!1,minLabel:b,maxLabel:v,showBgTick:f=!1,showFillTick:B=!1,tickStep:_,tickShape:N="dot"}){t&&!c&&Nt("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 x=Math.min(r,Math.max(a,e)),E=r>a?(x-a)/(r-a):0,w=l==="vertical",D=!t,k=Y=>t?.(Number(Y.target.value)),A=typeof d=="number"?`${d}px`:d,R={"--slider-ratio":String(E),"--slider-thumb":`${i}px`,...A?w?{height:A}:{width:A}:{}},$=_??s,G=(f||B)&&$>0&&r>a?Math.floor((r-a)/$+1e-6):0;if(G>0&&G<=100){const Y=N!=="dash",U=se=>Y?`radial-gradient(circle, ${se} 0.5px, transparent 1px)`:w?`linear-gradient(to bottom, transparent calc(50% - 2px), ${se} calc(50% - 2px), ${se} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${se} calc(50% - 2px), ${se} calc(50% + 2px), transparent calc(50% + 2px))`,S=Y?"2px":"4px",I=[],O=[],z=[];for(let se=0;se<=G;se++){const te=se*$/(r-a);if(te>1+1e-6)break;const de=`${((w?1-te:te)*100).toFixed(4)}%`,ee=te<=E+1e-6;if(ee?!B:!f)continue;const V=ee?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";I.push(U(V)),O.push(w?`${S} var(--slider-thumb)`:`var(--slider-thumb) ${S}`),z.push(w?`center ${de}`:`${de} center`)}I.push(w?"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))"),O.push("100% 100%"),z.push("0 0"),R.backgroundImage=I.join(", "),R.backgroundSize=O.join(", "),R.backgroundPosition=z.join(", "),R.backgroundRepeat="no-repeat"}const T=m?m(x):p==="percent"?`${Math.round(r>a?(x-a)/(r-a)*100:0)}%`:p==="count"?`${x} / ${r}`:x===a&&b?b:x===r&&v?v:void 0,P=n.jsx("input",{type:"range",className:we("slider",`slider--${l}`,D&&"slider--static",!p&&!C&&h),min:a,max:r,step:s,value:x,disabled:u,readOnly:D,tabIndex:D?-1:void 0,"aria-label":c,"aria-valuetext":T,"aria-orientation":l,onChange:k,style:R});if(!p&&!C)return P;const L=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:b??a}),Q=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:v??r}),Z=C?n.jsxs("div",{className:we("slider-track-group",`slider-track-group--${l}`,!p&&h),children:[w?Q:L,P,w?L:Q]}):P;if(!p)return Z;const F=g??(w?"bottom":"right"),K=`${Math.round(r>a?(x-a)/(r-a)*100:0)}%`,M=m?m(x):p==="percent"?K:p==="count"?`${x} / ${r}`:String(x),q=n.jsx("span",{className:"slider-wrap__value body-3b",children:M});return n.jsxs("div",{className:we("slider-wrap",`slider-wrap--${l}`,`slider-wrap--label-${F}`,`slider-wrap--align-${y}`,h),children:[Z,q]})}const Yv=.86,Zv=250,qo=(e,t,a,r)=>Math.round(Math.min(r,Math.max(a,e-t))),Uo=(e,t,a,r)=>{const s=qo(e,t,a,r);return`${s<0?"-":"+"}${Math.abs(s)} dB`};function Go({analyser:e,audioElement:t,orientation:a="horizontal",length:r,label:s,labelPos:l,labelAlign:i="right",floorDb:u=-60,refDb:c=-35,displayMin:d=-5,displayMax:h=25,className:p,ariaLabel:m}){const g=o.useRef(null),y=o.useRef(null),C=o.useRef(null),b=o.useRef(null),[v,f]=o.useState(null);o.useEffect(()=>{const x=P=>{const L=Uo(P,c,d,h);C.current&&(C.current.textContent=L);const Q=g.current;Q&&(Q.setAttribute("aria-valuenow",String(qo(P,c,d,h))),Q.setAttribute("aria-valuetext",L))},E=e??V1(t)??(v&&v.el===t?v.node:null),w=y.current;if(!E||!w){w?.style.setProperty("--meter-level","0"),x(u);let P=!1;return!e&&t&&rr(t).then(L=>{!P&&L&&f({el:t,node:L})}),()=>{P=!0}}to();const D=new Float32Array(E.fftSize);let k=0,A=0,R=0,$=0,G=null;const T=P=>{const L=q1(E,D);k=L>k?L:k*Yv;const Q=k>1e-5?20*Math.log10(k):-1/0,Z=Math.max(u,Q),F=Z-c,K=Math.min(1,Math.max(0,(F-d)/(h-d)));if(w.style.setProperty("--meter-level",K.toFixed(3)),A+=Z,R+=1,P-$>=Zv){const M=A/R;G=G==null?M:G*.6+M*.4,x(G),A=0,R=0,$=P}b.current=requestAnimationFrame(T)};return b.current=requestAnimationFrame(T),()=>{b.current!=null&&cancelAnimationFrame(b.current),b.current=null}},[e,t,v,u,c,d,h]);const B=typeof r=="number"?`${r}px`:r,_=n.jsx("div",{className:"audio-meter__track",style:B?a==="vertical"?{height:B}:{width:B}:{},children:n.jsx("div",{ref:y,className:"audio-meter__fill"})}),N=l??(a==="vertical"?"bottom":"right");return n.jsxs("div",{ref:g,className:we("audio-meter",`audio-meter--${a}`,s&&`audio-meter--label-${N}`,s&&`audio-meter--align-${i}`,p),role:"meter","aria-label":m,"aria-valuemin":d,"aria-valuemax":h,"aria-valuenow":qo(u,c,d,h),"aria-valuetext":Uo(u,c,d,h),children:[_,s&&n.jsx("span",{ref:C,className:"audio-meter__value caption-2",children:Uo(u,c,d,h)})]})}const Fu=260;function Ou({message:e,position:t,duration:a,onClose:r}){const[s,l]=o.useState(!1),[i,u]=o.useState(!1),c=o.useRef(i),d=o.useRef(s);o.useEffect(()=>{c.current=i},[i]),o.useEffect(()=>{d.current=s},[s]);const h=o.useRef(null),p=o.useRef(""),m=o.useRef(r);o.useEffect(()=>{m.current=r});const g=a,y=o.useRef(null),C=o.useRef(0),b=o.useRef(0),v=o.useRef(!1),f=o.useRef(null),B=o.useRef(null),_=o.useRef(null),N=o.useRef(null),x=o.useRef(()=>{});x.current=D=>{D<0||(C.current=Date.now(),b.current=D,y.current=setTimeout(()=>{y.current=null,l(!1),f.current=setTimeout(()=>{u(!1);try{m.current()}catch{}},Fu)},D))};const E=o.useCallback(()=>{v.current||!y.current||(v.current=!0,clearTimeout(y.current),y.current=null,b.current=Math.max(0,b.current-(Date.now()-C.current)))},[]),w=o.useCallback(()=>{v.current&&(v.current=!1,x.current(b.current))},[]);return o.useEffect(()=>{if(e!==p.current&&(y.current&&(clearTimeout(y.current),y.current=null),f.current&&(clearTimeout(f.current),f.current=null)),e){if(d.current)return g>0&&!y.current&&(v.current?b.current=g:x.current(g)),p.current=e,()=>{y.current&&(clearTimeout(y.current),y.current=null),f.current&&(clearTimeout(f.current),f.current=null)};const D=()=>{const k=h.current;if(k)try{k.classList.remove("is-visible"),k.style.transition="none",t==="top"?k.style.transform="translateX(-50%) translateY(-16px)":k.style.transform="translateX(-50%) translateY(16px)",k.style.opacity="0",k.offsetWidth,k.style.transition="",k.classList.add("is-visible"),N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{N.current=null;try{k.style.opacity="",k.style.transform="",k.style.transition=""}catch{}},60)}catch{}};c.current?(D(),l(!0)):(u(!0),B.current=requestAnimationFrame(()=>{_.current=requestAnimationFrame(()=>{D(),l(!0)})})),g>0&&(v.current=!1,x.current(g))}else l(!1),f.current=setTimeout(()=>u(!1),Fu);return p.current=e,()=>{y.current&&clearTimeout(y.current),f.current&&clearTimeout(f.current),B.current&&cancelAnimationFrame(B.current),_.current&&cancelAnimationFrame(_.current),N.current&&clearTimeout(N.current),y.current=null,f.current=null,B.current=null,_.current=null,N.current=null}},[e,g,t]),{mounted:i,showing:s,popupRef:h,pause:E,resume:w}}function ba({message:e="",position:t="top",type:a="normal",onClose:r=()=>{},duration:s=2e3}){const{mounted:l,showing:i,popupRef:u,pause:c,resume:d}=Ou({message:e,position:t,duration:s,onClose:r}),h=o.useRef(null),[p,m]=o.useState(!1);if(o.useEffect(()=>{i?m(!0):l||m(!1)},[i,l]),!l)return null;const g=a==="notice"||a==="warning"?a:"normal",y=n.jsx("div",{ref:u,className:`toast toast--${t} ${i?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:C=>{h.current=C.pointerType},onMouseEnter:()=>{h.current!=="touch"&&c()},onMouseLeave:d,onFocusCapture:c,onBlurCapture:d,children:n.jsx("div",{className:`toast__inner toast__inner--${g} body-2`,"aria-hidden":p||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?un.createPortal(y,document.body):y}const Xv=24;function Jv({value:e,max:t=100,size:a=8,color:r,trackColor:s,label:l,formatValue:i,labelPos:u,labelAlign:c="right",ariaLabel:d,className:h}){const p=Number.isFinite(t)&&t>0?t:1,m=Math.max(0,Math.min(Number.isFinite(e)?e:0,p)),g=m/p*100,y=Number.isFinite(t)&&t>0?t:0,C=u??(a>=Xv?"inside":"bottom"),b=C==="center"?"inside":C,v=b==="inside"&&(c==="left"?g>=15:c==="center"?g>=50:g>=85),f={};return r&&(f["--progress-bar-fill"]=r),s&&(f["--progress-bar-track"]=s),n.jsxs("div",{className:we("progress-bar",`progress-bar--${a}`,`progress-bar--label-${b}`,l&&`progress-bar--align-${c}`,l&&v&&"progress-bar--label-on-fill",h),style:f,children:[n.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":m,"aria-valuemin":0,"aria-valuemax":y,"aria-valuetext":l?i?i(m):l==="percent"?void 0:l==="raw"?String(m):`${m} / ${y}`:void 0,"aria-label":d,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${g}%`}})}),l&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(m):l==="percent"?`${Math.round(g)}%`:l==="raw"?String(m):`${m} / ${y}`})]})}const zu={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},Qv="rgba(255, 255, 255, 0.16)";function Wu({max:e,index:t,inactiveBg:a,inactiveColor:r,transparent:s,variant:l="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=_e.useTranslation(),d=fn("(max-width: 767px)");if(!Number.isInteger(e)||e<=0)return null;const h=Number.isInteger(t)?Math.max(0,Math.min(t,e-1)):0,p=u??c("progress.steps",{current:h+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),m={};if(a&&(m["--pi-inactive-bg"]=a),r&&(m["--pi-inactive-color"]=r),s&&(a||(m["--pi-inactive-bg"]=Qv),r||(m["--pi-inactive-color"]="var(--color-white)")),l==="dot")return n.jsxs("div",{className:"progress-indicator progress-indicator--dot",style:m,role:i?"status":"img","aria-label":i?void 0:p,children:[i&&n.jsx("span",{style:zu,children:p}),Array.from({length:e}).map((y,C)=>n.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${C<h?" done":C===h?" active":""}`},C))]});const g=i?n.jsx("span",{role:"status",style:zu,children:p}):null;return d?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:m,role:"list","aria-label":p,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[h+1," / ",e]})}),g]}):n.jsxs(n.Fragment,{children:[g,n.jsx("div",{className:"progress-indicator",style:m,role:"list","aria-label":p,children:Array.from({length:e}).map((y,C)=>n.jsx("span",{role:"listitem","aria-current":C===h?"step":void 0,className:`progress-indicator-dot ${C<h?" done":C===h?" active":""} body-3`,children:C+1},C))})]})}function e4(e){if(!e)return[];const t=[];let a=0,r="";for(const s of e.trim()){if(s==="("?a++:s===")"&&a--,/\s/.test(s)&&a===0){r&&(t.push(r),r="");continue}r+=s}return r&&t.push(r),t}function t4(e,t,a=0){const r=Array.from({length:Math.max(0,t)},()=>0);for(const s of e){let l=0;for(const i of s){if(l>=r.length)break;const u=Hu(i.span),c=Math.min(u,r.length-l);if(c===1)r[l]=Math.max(r[l],i.width);else{const d=Math.max(0,(i.width-a*(c-1))/c);for(let h=l;h<l+c;h++)r[h]=Math.max(r[h],d)}l+=c}}return r}function Hu(e){const t=typeof e=="number"?e:parseInt(String(e??""),10);return Number.isFinite(t)&&t>=1?Math.floor(t):1}function n4(e,t){const a=/span\s+(\d+)/.exec(`${e??""} ${t??""}`);return a?Hu(parseInt(a[1],10)):1}function a4(e,t){const{isFixed:a,floorOf:r,containerWidth:s}=t,l=e.reduce((p,m,g)=>p+(a(g)?m:0),0),i=e.reduce((p,m,g)=>p+(a(g)?0:m),0),u=s-l;if(!(s>0&&i>0&&u>0))return[...e];const c=u/i,d=e.map((p,m)=>a(m)?p:Math.max(r(m),Math.round(p*c))),h=Math.round(u-d.reduce((p,m,g)=>p+(a(g)?0:m),0));if(h!==0){let p=-1;d.forEach((m,g)=>{!a(g)&&(p<0||m>d[p])&&(p=g)}),p>=0&&(d[p]=Math.max(r(p),d[p]+h))}return d}const r4=16;function o4(e,t=r4){return e.map(a=>{const r=a.sortable&&!a.sorted;return Math.max(a.declaredMin,Math.ceil(a.headWidth+(r?t:0)))})}function s4({children:e,className:t,style:a,span:r,rowLabel:s,onRowClick:l}){const i=r&&r>1?{gridColumn:`span ${r}`,...a}:a;return n.jsx("div",{role:"cell",className:t?`table-cell ${t}`:"table-cell",style:i,"aria-colspan":r&&r>1?r:void 0,children:s&&l?n.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":s,children:e}):e})}function Ko({variant:e="default",children:t,className:a,draggable:r,onClick:s,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:d,colSpan:h,describedBy:p,rowHasButton:m}){const g=o.useCallback(y=>{s&&y.target===y.currentTarget&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),s())},[s]);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":h,className:"table-row__full-cell",children:n.jsx(da,{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":h,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:s,onKeyDown:s?g:void 0,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:s&&!m?0:void 0,"aria-describedby":s&&!m?p:void 0,children:t}),d&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row-expand__cell",children:d})})]})}function l4({dir:e}){return n.jsx(e==="asc"?Js:Xs,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function i4({children:e,onClick:t,className:a,sortDir:r,ariaSort:s,onResizeStart:l}){const i=n.jsxs(n.Fragment,{children:[e,r&&n.jsx(l4,{dir:r})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":s,className:we("table-field body-3",a,r?"table-field--sorted":"",l?"table-field--resizable":""),children:[t?n.jsx("button",{type:"button",className:"table-field__button",children:i}):i,l&&n.jsx("span",{className:"table-field__resizer",onPointerDown:l,onClick:u=>u.stopPropagation(),"aria-hidden":"true"})]})}function Vu(e){return e&&e!=="left"?`table-col--${e}`:void 0}function Yo({fields:e=[],sort:t,sortable:a=!0,headerGroups:r,items:s=[],renderRow:l,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:d,onRowDragStart:h,onRowDragEnd:p,draggingId:m,gridTemplateColumns:g,mobileGridTemplateColumns:y,resizable:C=!0,resizeMode:b="grow",resizeStorageKey:v,size:f="small",title:B,icon:_,count:N,collapsed:x=!1,onToggleCollapse:E,headerActions:w,empty:D,loading:k,dragOver:A=!1,onDragOver:R,onDragLeave:$,onDrop:G,renderExpandedRow:T,expandedId:P}){const{t:L}=_e.useTranslation(),Q=o.useId(),Z=`table-title-${Q}`,F=`table-row-hint-${Q}`,[K,M]=o.useState(null),q=o.useCallback((oe,be)=>{const Ie=e[be];if(!Ie)return;if(Ie.sortValue)return Ie.sortValue(oe);if(Ie.sortKey)return oe[Ie.sortKey];const Xe=l(oe)[be]?.content;return typeof Xe=="string"||typeof Xe=="number"?Xe:void 0},[e,l]),Y=!t&&a&&!e.some(oe=>oe.sortDir!==void 0||oe.onClick),U=o.useCallback(oe=>{const be=e[oe];if(!be||be.sortable===!1)return!1;if(be.sortValue||be.sortKey)return!0;const Ie=s[0];return Ie!==void 0&&q(Ie,oe)!==void 0},[e,s,q]),S=o.useMemo(()=>t?e.map(oe=>{if(!oe.sortKey||oe.sortDir!==void 0)return oe;const be=t.field(String(oe.label??""),oe.sortKey);return{...oe,sortDir:be.sortDir,onClick:oe.onClick??be.onClick}}):Y?e.map((oe,be)=>U(be)?{...oe,sortDir:K?.index===be?K.asc?"asc":"desc":null,onClick:()=>M(Ie=>Ie?.index===be?{index:be,asc:!Ie.asc}:{index:be,asc:!0})}:oe):e,[e,t,Y,K,U]),I=o.useMemo(()=>{if(!Y||!K)return s;const{index:oe,asc:be}=K;return[...s].sort((Ie,Xe)=>hr(q(Ie,oe),q(Xe,oe),be))},[s,Y,K,q]),O=fn("(max-width: 767px)"),z=y&&O?y:null,se=C&&!O,te=o.useRef(se);te.current=se;const de=48,ee=40,V=o.useRef(()=>de),ne=v?`table-cols:${v}`:null,W=o.useRef(null),H=o.useRef(null),ie=o.useRef(null),Te=o.useRef(null),[ye,he]=o.useState(!1),[Se,$e]=o.useState(0),Ne=o.useCallback(()=>{const oe=ie.current;if(!oe)return;const be=Te.current,Ie=W.current;if(be&&(be.style.minWidth="",Ie)){const Xe=Ie.scrollWidth,et=te.current?ee:0;be.style.minWidth=Xe>oe.clientWidth+1?`${Xe+et}px`:""}he(oe.scrollWidth>oe.clientWidth+1),$e(oe.clientWidth)},[]),ue=o.useCallback((oe,be)=>{const Ie=oe.current;Ie&&H.current&&H.current.unobserve(Ie),oe.current=be,be?(!H.current&&typeof ResizeObserver<"u"&&(H.current=new ResizeObserver(()=>Ne())),H.current?.observe(be)):!ie.current&&!Te.current&&(H.current?.disconnect(),H.current=null),Ne()},[Ne]),xe=o.useCallback(oe=>ue(ie,oe),[ue]),ke=o.useCallback(oe=>ue(Te,oe),[ue]);o.useEffect(()=>{Ne()}),o.useEffect(()=>{if(typeof window>"u")return;const oe=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>Ne()):null;return window.addEventListener("resize",Ne),()=>{oe!=null&&cancelAnimationFrame(oe),window.removeEventListener("resize",Ne)}},[Ne]);const Ee=o.useRef(()=>!1),We=o.useRef([]),He=o.useRef(null),ot=oe=>{if(!oe||typeof window>"u")return null;try{const be=JSON.parse(window.localStorage.getItem(oe)??"null");return Array.isArray(be)&&be.length>0&&be.every(Ie=>typeof Ie=="number"&&Number.isFinite(Ie)&&Ie>0)?be:null}catch{return null}},[Qe,Je]=o.useState(()=>ot(ne)),[vt,je]=o.useState(ne),[Ye,Be]=o.useState(()=>ot(ne)!==null);if(vt!==ne){je(ne);const oe=ot(ne);Je(oe),Be(oe!==null)}const Ue=o.useRef(Qe);o.useEffect(()=>{Ue.current=Qe},[Qe]);const qe=o.useCallback(oe=>{const be=He.current;if(!be)return;const Ie=Ue.current;if(Ie){const Xe=[...Ie],et=()=>de;if(be.next!=null&&be.startWNext!=null){const rt=oe.clientX-be.startX,$t=Math.max(et()-be.startW,Math.min(be.startWNext-et(),rt));Xe[be.index]=be.startW+$t,Xe[be.next]=be.startWNext-$t}else Xe[be.index]=Math.max(et(),be.startW+(oe.clientX-be.startX));Ue.current=Xe,Je(Xe)}},[]),pt=o.useCallback(()=>{if(He.current=null,window.removeEventListener("pointermove",qe),window.removeEventListener("pointerup",pt),window.removeEventListener("pointercancel",pt),document.body.style.cursor="",document.body.style.userSelect="",ne&&Ue.current)try{window.localStorage.setItem(ne,JSON.stringify(Ue.current))}catch{}},[qe,ne]),_t=o.useCallback((oe,be)=>{be.preventDefault(),be.stopPropagation();const Ie=W.current;if(!Ie)return;const Xe=Array.from(Ie.children).map(rt=>rt.getBoundingClientRect().width),et=b==="fit"?S.findIndex((rt,$t)=>$t>oe&&rt.resizable!==!1):-1;He.current=et>=0?{index:oe,startX:be.clientX,startW:Xe[oe],next:et,startWNext:Xe[et]}:{index:oe,startX:be.clientX,startW:Xe[oe]},Ue.current=Xe,Je(Xe),Be(!0),window.addEventListener("pointermove",qe),window.addEventListener("pointerup",pt),window.addEventListener("pointercancel",pt),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[qe,pt,b,S]),Dt=o.useCallback(()=>{const oe=W.current,be=oe?.closest(".table-wrap");if(!oe||!be)return null;const Ie=be.style.getPropertyValue("--table-grid-cols");be.style.setProperty("--table-grid-cols",S.map(()=>"max-content").join(" "));const Xe=Array.from(be.querySelectorAll(".table-row")).filter(xt=>!xt.classList.contains("table-row--loading")&&!xt.classList.contains("table-row--empty")),et=xt=>Array.from(xt.children).map(Pt=>{const Ut=window.getComputedStyle(Pt);return{width:Pt.getBoundingClientRect().width,span:n4(Ut.gridColumnStart,Ut.gridColumnEnd)}}),rt=parseFloat(window.getComputedStyle(oe).columnGap)||0,$t=Xe.map(et),_n=et(oe),on=t4([_n,...$t],S.length,rt),Rt=o4(S.map((xt,Pt)=>({declaredMin:V.current(Pt),headWidth:_n[Pt]?.width??0,sortable:xt.sortDir!==void 0||!!xt.onClick,sorted:!!xt.sortDir}))),zt=xt=>Rt[xt]??V.current(xt),sn=S.map((xt,Pt)=>{const Ut=on[Pt],Gt=Ee.current(Pt)?parseFloat(We.current[Pt]):NaN;return Number.isFinite(Gt)&&Math.ceil(Ut)>Gt&&Nt(`table-fixed-col-overflow:${Pt}:${Gt}`,`[ihabdevteam-core] Table \uC758 ${Pt+1}\uBC88\uC9F8 \uC5F4\uC744 ${Gt}px \uB85C \uC815\uD574 \uB450\uC5C8\uB294\uB370 \uC548\uC758 \uB0B4\uC6A9\uC740 ${Math.ceil(Ut)}px \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4 \u2014 \uADF8\uB9CC\uD07C \uC798\uB824 \uB098\uAC11\uB2C8\uB2E4. gridTemplateColumns(\uB610\uB294 fields[].width)\uC758 \uADF8 \uC5F4\uC744 ${Math.ceil(Ut)}px \uC774\uC0C1\uC73C\uB85C \uB298\uB9AC\uC138\uC694.`),Number.isFinite(Gt)?Gt:Math.max(V.current(Pt),Math.ceil(Ut))}),It=window.getComputedStyle(oe),xn=oe.clientWidth-(parseFloat(It.paddingLeft)||0)-(parseFloat(It.paddingRight)||0);return Ie?be.style.setProperty("--table-grid-cols",Ie):be.style.removeProperty("--table-grid-cols"),a4(sn,{isFixed:xt=>Ee.current(xt),floorOf:zt,containerWidth:xn})},[S,b]),Bt=(oe,be)=>oe!==null&&oe.length===be.length&&oe.every((Ie,Xe)=>Ie===be[Xe]),st=o.useRef(Dt);o.useEffect(()=>{st.current=Dt});const[tt,kt]=o.useState(0),At=I.length>0,Tt=`${ne??""}|${tt}|${S.length}|${Se}`,Lt=!Ye&&se&&ne!==null&&!k?`${Tt}|${At?1:0}`:null,gt=o.useRef(null);o.useEffect(()=>{if(Lt===null||!At||gt.current===Tt)return;const oe=st.current();oe&&(gt.current=Tt,Je(be=>Bt(be,oe)?be:oe))},[Lt]);const it=o.useCallback(()=>{if(ne)try{window.localStorage.removeItem(ne)}catch{}Be(!1);const oe=st.current();Je(oe),Ue.current=oe,kt(be=>be+1)},[ne]);o.useEffect(()=>()=>{He.current&&(window.removeEventListener("pointermove",qe),window.removeEventListener("pointerup",pt),window.removeEventListener("pointercancel",pt),document.body.style.cursor="",document.body.style.userSelect="")},[qe,pt]);const ut=S.length>0&&S.every(oe=>oe.width!=null)?S.map(oe=>typeof oe.width=="number"?`${oe.width}px`:String(oe.width)).join(" "):null;S.some(oe=>oe.width!=null)&&!ut&&Nt(`table-field-width:${S.map(oe=>oe.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."),ut&&g&&Nt("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 ct=g??ut??void 0,ve=e4(ct),Me=ve.filter(oe=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(oe));Me.length>0&&Nt(`table-content-track:${g}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${Me.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: ${g})`);const Pe=S.findIndex(oe=>!!oe.sortDir);S.filter(oe=>!!oe.sortDir).length>1&&Nt("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 Oe=oe=>oe===Pe?S[oe].sortDir==="asc"?"ascending":"descending":S[oe].onClick?"none":void 0,dt=oe=>/^\d+(\.\d+)?px$/.test(ve[oe]??""),St=oe=>{const be=ve[oe]??"",Ie=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(be)??/^(\d+(?:\.\d+)?)px$/.exec(be);return Ie?parseFloat(Ie[1]):de};Ee.current=dt,V.current=St,We.current=ve;const yt=oe=>b==="fit"&&!dt(oe)?"fr":"px",wt=Qe&&Qe.length===S.length&&!O,Ct=z??(wt?S.map((oe,be)=>oe.resizable===!1&&ve[be]?ve[be]:`${Qe[be]}${yt(be)}`).join(" "):ct),Le=Ct?{"--table-grid-cols":Ct}:void 0,at=B!==void 0;return n.jsxs("div",{ref:xe,className:`table-wrap table-wrap--${f}${se?" table-wrap--resizable":""}${A?" table-wrap--dragover":""}${x?" table-wrap--collapsed":""}`,style:Le,onDragOver:R,onDragLeave:$,onDrop:G,tabIndex:ye?0:void 0,role:ye?"region":void 0,"aria-label":ye?typeof B=="string"?B:L("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:F,className:"table-row-hint",children:L("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:ke,role:"table","aria-labelledby":at&&typeof B=="string"?Z:void 0,className:"table body-2",children:[at&&n.jsxs("div",{className:we("table-header",E&&"table-header--clickable"),onClick:E,role:"caption",children:[E&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:x?"chevron-right":"chevron-down",ariaLabel:x?L("common.expand","\uD3BC\uCE58\uAE30"):L("common.collapse","\uC811\uAE30"),ariaExpanded:!x,className:"table-header__chevron"}),_&&n.jsx(nt,{icon:_,label:typeof B=="string"?B:void 0,className:"table-header__icon"}),n.jsx("span",{id:Z,className:"table-header__title h5b",children:B}),N!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:N}),w&&n.jsx("span",{className:"table-header__actions",onClick:oe=>oe.stopPropagation(),children:w})]}),!x&&n.jsxs(n.Fragment,{children:[r&&r.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:r.map((oe,be)=>n.jsx("div",{role:"columnheader","aria-colspan":oe.span,className:we("table-field body-3",oe.className),style:{gridColumn:`span ${oe.span}`},children:oe.label},be))}),n.jsxs("div",{role:"presentation",className:we("table-fields-strip",se&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:W,children:S.map((oe,be)=>n.jsx(i4,{onClick:oe.onClick,className:we(oe.className,Vu(oe.align)),sortDir:oe.sortDir,ariaSort:Oe(be),onResizeStart:se&&be<S.length-1&&oe.resizable!==!1&&(b!=="fit"||S.some((Ie,Xe)=>Xe>be&&Ie.resizable!==!1))?Ie=>_t(be,Ie):void 0,children:oe.label},be))}),se&&n.jsx("div",{className:"table-fields__reset-dock",children:n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:L("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:L("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:it})})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:k?n.jsx(Ko,{variant:"loading",colSpan:S.length||void 0}):I.length===0&&D?n.jsx(Ko,{variant:"empty",colSpan:S.length||void 0,children:D}):I.map((oe,be)=>{const Ie=m!=null&&oe.id===m,Xe=!!i&&(u?u(oe):!0),et=P!=null&&oe.id!=null&&(P instanceof Set?P.has(oe.id)||[...P].some(rt=>String(rt)===String(oe.id)):String(oe.id)===String(P));return n.jsx(Ko,{className:`${Xe?" table-row--clickable":""}${h?" table-row--draggable":""}${Ie?" table-row--dragging":""}`.trim(),draggable:!!h,onClick:Xe?()=>i(oe):void 0,colSpan:S.length||void 0,rowHasButton:l(oe).some(rt=>!!rt.rowLabel),describedBy:F,onMouseEnter:c?rt=>c(oe,rt):void 0,onMouseLeave:d?rt=>d(oe,rt):void 0,onDragStart:h?rt=>h(oe,rt):void 0,onDragEnd:p?rt=>p(oe,rt):void 0,expandedContent:et&&T?T(oe):void 0,children:l(oe).map((rt,$t)=>n.jsx(s4,{className:we(rt.className,Vu(S[$t]?.align)),style:rt.style,span:rt.span,rowLabel:Xe?rt.rowLabel:void 0,onRowClick:Xe?()=>i(oe):void 0,children:rt.content},$t))},oe.id!=null?`${typeof oe.id}:${oe.id}`:`__idx:${be}`)})})]})]})]})}const u4={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function qu(e){return e?u4[e]??null:null}function Uu(e){switch(qu(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Gu(e,t){const a=qu(e);return a?t(`device.type.${a}`,{defaultValue:e??""}):e??""}const ga=e=>e==null?"":String(e).trim();function Zo(e,t,a,r){const s=ga(e),l=ga(t),i=ga(a);if(r&&s&&l&&i){const c=`${s.padStart(4,"0")}-${l.padStart(2,"0")}-${i.padStart(2,"0")}`,d=new Date(c);if(!Number.isNaN(d.getTime())&&d.toISOString().slice(0,10)===c){const h=Wl(c,r);if(h)return h}}const u=[s,l,i];for(;u.length>0&&u[u.length-1]==="";)u.pop();return u.join(".")}function c4(e,t,a){const r=ga(e);return r?`${r}-${ga(t).padStart(2,"0")}-${ga(a).padStart(2,"0")}`:""}function Ku(e,t){return t!=="wornAt"?String(e[t]??""):c4(e.wornYear,e.wornMonth,e.wornDay)}function d4({rows:e,loading:t,onSelect:a,onDelete:r,onWear:s,onRelease:l,onAdd:i}){const{t:u,i18n:c}=_e.useTranslation(),d=b=>b==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:h,field:p}=jy(),m=o.useMemo(()=>{if(!h)return e;const{key:b,asc:v}=h;return[...e].sort((f,B)=>{if(b==="worn"){const _=Number(B.worn)-Number(f.worn);return v?_:-_}return hr(Ku(f,b),Ku(B,b),v)})},[e,h]),{pageRows:g,pageSizeProps:y,paginationProps:C}=Sy(m,h);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(Io,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:y,pagination:C,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(Yo,{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:g.map((b,v)=>({id:b.id??`${b.side}-${v}`,row:b})),gridTemplateColumns:`56px 110px 110px minmax(120px, 1fr) 100px minmax(120px, 1fr) 110px${r?" 80px":""}`,renderRow:({row:b})=>[{content:n.jsx("span",{className:"dlp-worn-check",onClick:v=>v.stopPropagation(),children:n.jsx(ku,{checked:b.worn,disabled:b.worn?!l:!s,ariaLabel:b.worn?u("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):u("customers.device.wear","\uCC29\uC6A9"),onChange:v=>{v?s?.(b):l?.(b)}})})},{content:n.jsx("span",{children:d(b.side)})},{content:b.device?n.jsx(jt,{size:"small",variant:Uu(b.device),fill:"soft",label:Gu(b.device,u)}):n.jsx("span",{})},{content:n.jsx("span",{children:b.brand})},{content:n.jsx("span",{children:b.fitType||"-"})},{content:n.jsx("span",{children:b.productName||"-"})},{content:n.jsx("span",{className:"dlp-date",children:Zo(b.wornYear,b.wornMonth,b.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:v=>{v?.stopPropagation(),r(b)}})})}]:[]],onRowClick:({row:b})=>a(b),empty:u("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function Yu(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 p4(e,t){return new Date(e,t+1,0).getDate()}function h4(e,t){return new Date(e,t,1).getDay()}function m4({visits:e=[],onVisitClick:t,onVisitMove:a,onDayClick:r,today:s}){const{t:l,i18n:i}=_e.useTranslation(),u=o.useMemo(()=>l("calendar.dow",{returnObjects:!0}),[l]),c=lo(s),[d,h]=o.useState(()=>Number(c.slice(0,4))),[p,m]=o.useState(()=>Number(c.slice(5,7))-1),[g,y]=o.useState(null),C=o.useRef(null),b=o.useMemo(()=>{const x={};return e.forEach(E=>{x[E.date]||(x[E.date]=[]),x[E.date].push(E)}),x},[e]),v=o.useMemo(()=>{const x=p4(d,p),E=h4(d,p),w=[];for(let D=0;D<E;D++)w.push(null);for(let D=1;D<=x;D++)w.push(D);for(;w.length<35;)w.push(null);return w},[d,p]),f=o.useCallback(()=>{p===0?(h(x=>x-1),m(11)):m(x=>x-1)},[p]),B=o.useCallback(()=>{p===11?(h(x=>x+1),m(0)):m(x=>x+1)},[p]),_=x=>`${d}-${String(p+1).padStart(2,"0")}-${String(x).padStart(2,"0")}`,N=x=>_(x)===c;return n.jsxs("div",{children:[n.jsxs("div",{className:"calendar-nav",children:[n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:f,"aria-label":l("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(nt,{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(l,i.language,d,p+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:B,"aria-label":l("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(nt,{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:l("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:l("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:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]})]}),n.jsxs("div",{className:"calendar-grid",children:[u.map(x=>n.jsx("div",{className:"calendar-day-header body-3",children:x},x)),v.map((x,E)=>{if(x===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${E}`);const w=x,D=_(w),k=b[D]??[],A=Wl(D,i.language),R=g===D;return n.jsxs("div",{className:`calendar-cell${N(w)?" today":""}${R?" drag-over":""}${r?" calendar-cell--clickable":""}`,role:r?"button":void 0,tabIndex:r?0:void 0,"aria-label":r?l("calendar.addOnDate",{date:D}):void 0,"aria-current":N(w)?"date":void 0,onClick:r?()=>r(D):void 0,onKeyDown:r?$=>{$.target===$.currentTarget&&($.key!=="Enter"&&$.key!==" "||($.preventDefault(),r(D)))}:void 0,onDragOver:a?$=>{$.preventDefault(),y(D)}:void 0,onDragLeave:a?$=>{$.currentTarget.contains($.relatedTarget)||y(null)}:void 0,onDrop:a?$=>{$.preventDefault(),C.current!=null&&(a(C.current,D),C.current=null),y(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:w}),k.length>0&&(()=>{const $=[{key:"visited",label:l("calendar.legend.visited","\uBC29\uBB38"),count:k.filter(T=>(T.status??"visited")==="visited").length},{key:"scheduled",label:l("calendar.legend.scheduled","\uC608\uC57D"),count:k.filter(T=>T.status==="scheduled").length},{key:"noVisit",label:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:k.filter(T=>T.status==="noVisit").length}].filter(T=>T.count>0),G=$.length===1&&$[0].key==="visited"?l("calendar.visitCount",{count:k.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):$.map(T=>l("calendar.statusCount",{label:T.label,count:T.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return n.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${A} ${G}`,children:[$.map(T=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${T.key}`,"aria-hidden":"true"},T.key)),k.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:k.map(($,G)=>n.jsxs("div",{draggable:!!a,className:`calendar-visit-badge${$.status==="noVisit"?" calendar-visit-badge--no-visit":$.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${a?" calendar-visit-badge--draggable":""}`,onDragStart:a?T=>{C.current=$.id,T.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:a?()=>{C.current=null,y(null)}:void 0,onClick:t?T=>{T.stopPropagation(),t($)}:void 0,...Yu(t?()=>t($):void 0),"aria-label":[A,$.time?Gl($.time,l):null,$.customer,l($.status==="noVisit"?"calendar.legend.noVisit":$.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[$.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Gl($.time,l)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:$.customer}),$.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},$.id??G))})]},w)})]})]})}const C4={page:"h3",pagePopup:"h4",popup:"h5"};function ya({type:e="page",title:t,headingLevel:a=2,icon:r,action:s,disc:l,children:i,inGrid:u=!1,className:c,style:d}){const h=C4[e],p=t||l||s||r,m=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(nt,{icon:r,label:typeof t=="string"?t:void 0,className:"section__icon"}),n.jsxs("div",{className:"section__title-group",children:[t&&n.jsx(m,{className:`section__title ${h}`,children:t}),l&&n.jsx("div",{className:"section__disc body-3",children:l})]})]}),s&&n.jsx("div",{className:"section__action",children:s})]}),i]})}let Xo=null,Zu=!1;function Xu(){if(Zu||typeof document>"u")return;Zu=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(Xo="keyboard")},!0);const e=()=>{Xo="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}Xu();function gr(){return Xu(),Xo==="keyboard"}const yr=20;function f4(e){const{t}=_e.useTranslation(),{type:a,trainingDatas:r,depth:s,renderPopup:l,completedIds:i,selectedIds:u,onItemComplete:c,size:d,useDescriptionTooltip:h,onRemove:p,onMore:m,sectionType:g="page"}=e||{},[,y]=o.useState(0),C=typeof r<"u"?Array.isArray(r)?r:[]:[],b=C.length,[v,f]=o.useState(Math.min(b,yr)),B=o.useMemo(()=>Array.isArray(s)?[...s,a?.label].filter(Boolean).join(" \xB7 "):[s||"",a?.label].filter(Boolean).join(" \xB7 "),[s,a?.label]);o.useEffect(()=>{f(Math.min(b,yr))},[b]),Ii("speechear.data.updated",()=>y(E=>E+1));const _=o.useRef(null),N=o.useRef(null);function x(){const E=document.activeElement;N.current=gr()&&E&&E.closest?.(".training-block__more")?v:null,f(w=>Math.min(b,w+yr))}return o.useEffect(()=>{const E=N.current;if(E==null)return;N.current=null;const w=document.activeElement;w&&w!==document.body||_.current?.querySelectorAll(".training-block-button")[E]?.focus()},[v]),n.jsxs(ya,{type:g,title:a?.label,icon:a?.icon,disc:a?.desc,className:"training-block",children:[n.jsx("div",{className:"training-list",ref:_,children:(C||[]).slice(0,v).map((E,w)=>{const D=E;return n.jsx(Lo,{index:w,type:a,trainingData:D,depth:B,renderPopup:l,completedIds:i,selectedIds:u,size:d,useDescriptionTooltip:h,onRemove:typeof p=="function"&&u!=null&&D?.id!=null&&u.has(String(D.id))?()=>p(D):void 0,onComplete:typeof c=="function"&&D?.id!=null?()=>c(String(D.id)):void 0,onMore:typeof m=="function"?k=>m(D,k):void 0},D?.id!=null?`${a?.key||"t"}-${String(D.id)}`:`${a?.key||"t"}-${w}`)})}),b>yr&&v<b&&n.jsx("div",{className:"training-block__more",children:n.jsx(fe,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:x,ariaLabel:t("common.loadMore","\uB354\uBCF4\uAE30"),label:t("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function b4(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 g4({gap:e=10,count:t,className:a,children:r}){const s=o.useRef(null),[l,i]=o.useState({width:0,card:0}),u=t??b4(r);o.useLayoutEffect(()=>{const m=s.current;if(!m)return;const g=()=>{const C=m.style.maxWidth;m.style.maxWidth="none";const b=m.clientWidth;m.style.maxWidth=C;const v=m.firstElementChild?.offsetWidth??0;i(f=>f.width===b&&f.card===v?f:{width:b,card:v})};if(g(),typeof ResizeObserver>"u")return;const y=new ResizeObserver(g);return y.observe(m),()=>y.disconnect()},[u,e]);const c=l.card>0?l.card:0,d=c>0?bf(l.width,c,e):0,h=d>0?gf(u,d):0,p={"--block-grid-gap":`${e}px`,...h>0?{"--block-grid-cols":h,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:s,className:we("training-block-grid",h>0&&"training-block-grid--measured",a),style:p,"data-cols":h>0?h:void 0,children:r})}function Jo(e){const t=o.useRef(null),a=o.useRef(e);a.current=e;const[r,s]=o.useState({url:e,loading:!!e,failed:!1}),l=r.url===e?r:{loading:!!e,failed:!1};o.useEffect(()=>{const c=t.current;s({url:e,failed:!1,loading:!!e&&!(c?.complete&&c.naturalWidth>0)})},[e]);const i=o.useCallback(()=>{a.current===e&&s({url:e,loading:!1,failed:!1})},[e]),u=o.useCallback(()=>{a.current===e&&s({url:e,loading:!1,failed:!0})},[e]);return{imgRef:t,loading:l.loading,failed:l.failed,hasImage:!!e&&!l.failed,onLoad:i,onError:u}}var y4='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 v4=y4,Qo=o.forwardRef(function({item:e,disabled:t=!1,onPlayDone:a,selectable:r=!1,selected:s=!1,onSelect:l,flipDelay:i=0,hideLabel:u=!1,hideAudio:c=!1,orderRank:d=null},h){const{t:p}=_e.useTranslation(),m=e.word||e.title||"",g=t||!m,y=e.audio??e.sound??e.audioKey,C=e.subLabel||e.pronunciation||"",b=e.colloquialLabel||"",[v,f]=o.useState({label:m,subLabel:C,colloquialLabel:b,homonum:e.homonum});m&&(v.label!==m||v.subLabel!==C||v.colloquialLabel!==b||!Object.is(v.homonum,e.homonum))&&f({label:m,subLabel:C,colloquialLabel:b,homonum:e.homonum});const B=o.useRef(null),_=fn("(max-width: 767px)"),[N,x]=o.useState(!1),[E,w]=o.useState(!1),D=`${typeof y=="string"?y:y?.src??""}\0${m}`,[k,A]=o.useState({for:"",url:""}),R=k.for===D?k.url:"",$=Fl(),G=e.textOnly??(!e.image&&!!v.label&&!!$&&$.entries.length>0&&!$.byWord.has(v.label)),T=G?"":ia()?.(v.label,v.homonum)??e.image??"",{imgRef:P,loading:L,hasImage:Q,onLoad:Z,onError:F}=Jo(T);o.useEffect(()=>{let z=!1;return(async()=>{if(y){if(typeof y=="string"){if(y.startsWith("http")||y.includes("/")){A({for:D,url:y});return}}else if(typeof y=="object"&&!Array.isArray(y)){const te=y.src;if(te){A({for:D,url:te});return}}}const se=Da();if(se&&m)try{const te=await Promise.resolve(se(m));!z&&te&&A({for:D,url:te})}catch{}})(),()=>{z=!0}},[y,m,D]);const K=o.useRef(!0),M=o.useRef(null);o.useEffect(()=>(K.current=!0,()=>{K.current=!1,M.current&&fr(M.current),M.current=null;try{B.current?.pause()}catch{}B.current=null}),[]);const q=o.useCallback(()=>new Promise(z=>{if(typeof window<"u"&&window.speechSynthesis&&m){x(!0),window.speechSynthesis.cancel();const se=new SpeechSynthesisUtterance(m);se.lang="ko-KR",se.onend=()=>{x(!1);try{a?.()}catch{}z()},se.onerror=()=>{x(!1),z()},window.speechSynthesis.speak(se)}else z()}),[m,a]),Y=o.useCallback(z=>{const se=Ga(z,te=>{if(x(!1),te)try{a?.()}catch{}});return B.current=se.el,se.done},[a]),U=o.useCallback(async()=>{if(t||!K.current)return;const z=()=>{M.current===z&&(M.current=null);try{B.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}x(!1)},se=Ua(z);M.current=z;try{window.speechSynthesis?.cancel()}catch{}try{if(R&&(x(!0),await Y(R)))return;const te=ar();if(te&&m)try{w(!0);const de=await Promise.resolve(te(m));if(!K.current||M.current!==z||(w(!1),de&&(x(!0),await Y(de))))return}catch{}if(!K.current||M.current!==z)return;await q()}finally{M.current===z&&w(!1),se(),M.current===z&&(M.current=null)}},[t,R,m,Y,q]);o.useImperativeHandle(h,()=>({play:()=>U()}),[U]);const S=z=>z.stopPropagation(),I=o.useCallback(z=>{if(z.stopPropagation(),!t){if(N){try{B.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}x(!1);return}U()}},[t,N,U]),O=we("training-word-card",t?"training-word-card--disabled":"",g?"training-word-card--flipped":"",r?"training-word-card--selectable":"",s?"training-word-card--selected":"");return n.jsx("div",{className:O,onClick:r&&!t?l:void 0,role:r?"button":void 0,"aria-pressed":r?s:void 0,tabIndex:r&&!t?0:void 0,"aria-disabled":r&&t?!0:void 0,onKeyDown:r&&!t?z=>{z.target===z.currentTarget&&(z.key==="Enter"||z.key===" "||z.key==="Spacebar")&&(z.preventDefault(),l?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:g?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[s&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:S,children:n.jsx(jt,{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:G?n.jsx("div",{className:"training-word-card__text-face",children:v.label}):Q?n.jsxs(n.Fragment,{children:[L&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:P,className:"training-word-card__image",src:T,alt:v.label||p("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:L?0:1},onLoad:Z,onError:F})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!G&&n.jsx("div",{className:"training-word-card__word",children:v.label}),v.subLabel&&n.jsxs("div",{className:"training-word-card__pronunciation",children:["[",v.subLabel,"]"]}),v.colloquialLabel&&n.jsxs("div",{className:"training-word-card__colloquial caption-1",children:["[",v.colloquialLabel,"]"]})]}),!c&&n.jsx("div",{className:"training-word-card__bottom",onClick:r?S:void 0,children:n.jsx(fe,{htmlType:"button",size:_?40:48,type:_?"dot":"bar",icon:N?"pause":"play",label:_?void 0:p("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:N,loading:E,onClick:I,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("${v4}")`}})})]})})}),_4=260;function Hn(e){const{t}=_e.useTranslation(),{title:a,subtitle:r,headerActions:s,headerSegment:l,children:i,buttons:u,footer:c,footerStart:d,footerEnd:h,footerNote:p,footerNoteDivider:m=!1,footerClassName:g="",footerLayout:y="center",onClose:C,closeDisabled:b=!1,beforeClose:v,closeOnBackdrop:f=!0,className:B="",ariaLabel:_,useTitle:N=!0,inline:x=!1,size:E,layer:w="modal",height:D,fillBody:k=!1,resetScrollKey:A}=e||{},[R,$]=o.useState(!1),G=o.useRef(!1),T=o.useRef(null),P=o.useId(),L=o.useRef(null);o.useEffect(()=>{},[x,a,_,B]),o.useEffect(()=>{A!==void 0&&L.current&&(L.current.scrollTop=0)},[A]);const[Q,Z]=o.useState(!1);o.useEffect(()=>{const V=L.current;if(!V)return;const ne=()=>Z(V.scrollHeight>V.clientHeight+1);if(ne(),typeof ResizeObserver>"u")return;const W=new ResizeObserver(ne);W.observe(V);const H=V.firstElementChild;return H&&W.observe(H),()=>W.disconnect()},[i,A]),o.useEffect(()=>{if(!x)return yu()},[x]);const F=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(x)return;const V=F.current,ne=T.current;return fo(ne,V),ne&&!ne.contains(document.activeElement)&&(ne.querySelector(Bn)??ne).focus(),()=>{const W=document.activeElement;(!W||W===document.body||ne&&ne.contains(W))&&bo(V)?.focus?.()}},[x]),mo(T,!x);const K=o.useRef(!0),M=go(),q=o.useRef(null);o.useEffect(()=>(K.current=!0,()=>{K.current=!1,q.current&&(clearTimeout(q.current),q.current=null)}),[]);const Y=o.useCallback(()=>{!K.current||!G.current||(G.current=!1,$(!1))},[]),U=o.useCallback((V,ne=!1)=>{if(ne&&!K.current||G.current)return;G.current=!0,$(!0);const W=setTimeout(()=>{q.current===W&&(q.current=null);let H;try{H=V?V():void 0}catch{Y();return}H&&typeof H.then=="function"&&H.then(()=>{setTimeout(Y,120)},Y)},M?0:_4);ne&&(q.current=W)},[Y,M]),S=o.useCallback(()=>{b||v&&v()===!1||U(C,!0)},[U,C,b,v]),I=o.useRef(S);o.useEffect(()=>{I.current=S});const O=!x&&!!C;o.useEffect(()=>{if(O)return Kn(()=>I.current())},[O]);const z=O&&f,se=o.useRef(!1),te=V=>{se.current=V.target===V.currentTarget},de=V=>{const ne=se.current;se.current=!1,ne&&V.target===V.currentTarget&&S()},ee=n.jsx("div",{className:`popup ${x?"popup--inline":""} ${w==="belowPagePopup"?"popup--below-page-popup":""} ${R?"popup--closing":""} ${B}`,onPointerDown:z?te:void 0,onClick:z?de:void 0,onMouseDown:x?void 0:V=>{V.target===V.currentTarget&&V.preventDefault()},children:n.jsxs("div",{ref:T,className:`popup-panel${E?` popup-panel--${E}`:""}${D!=null?" popup-panel--has-height":""}${k?" popup-panel--fill-body":""}`,style:D!=null?{"--popup-height":typeof D=="number"?`${D}px`:D}:void 0,tabIndex:-1,role:x?void 0:"dialog","aria-modal":x?void 0:!0,"aria-labelledby":!x&&N&&a?P:void 0,"aria-label":!x&&!(N&&a)?_??(typeof a=="string"?a:void 0):void 0,children:[!N&&(s||C)?n.jsxs("div",{className:"popup-close-float",children:[s,C&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:S,disabled:b,ariaLabel:t("common.close","\uB2EB\uAE30")})]}):a||s||C?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:P,className:"popup-title popup-title--left h2",children:a}):n.jsx("span",{id:P,className:"popup-title popup-title--left h2"}),r&&n.jsx("span",{className:"popup-subtitle body-3",children:r})]}),l&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(kn,{size:40,ariaLabel:l.ariaLabel,options:l.options.map(V=>({key:V.key,label:V.label,disabled:V.disabled})),value:l.value,onChange:l.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[s,C&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:S,disabled:b,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]}):null,n.jsx("div",{className:"popup-content",ref:L,tabIndex:Q?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:U,closeWithAnimation:S}):i})}),p!=null&&p!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${m?" popup-footer-note--divider":""}`,role:"note",children:p}),d||h?n.jsxs("div",{className:`popup-footer popup-footer--bar${g?` ${g}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof d=="function"?d({animateThen:U,closeWithAnimation:S}):d}),n.jsx("div",{className:"popup-footer__end",children:typeof h=="function"?h({animateThen:U,closeWithAnimation:S}):h})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${y!=="center"?` popup-footer--${y}`:""}`,children:u.map((V,ne)=>n.jsx(fe,{htmlType:"button",size:48,variant:V.variant??"default",label:V.label,disabled:V.disabled,onClick:()=>V.onClick?.({animateThen:U,closeWithAnimation:S})},ne))}):c?n.jsx("div",{className:`popup-footer${y!=="center"?` popup-footer--${y}`:""}${g?` ${g}`:""}`,children:typeof c=="function"?c({animateThen:U,closeWithAnimation:S}):c}):null]})});return x||typeof document>"u"?ee:un.createPortal(ee,document.body)}function vr(e){return String(e)}const _r=["o","triangle","x"];function Ju(e,t){return e===t?null:t}const Qu={o:"circle",triangle:"triangle",x:"x"},ec={o:"main",triangle:"warn",x:"danger"};function x4(e){let t=0,a=0,r=0;for(const l of Object.values(e))l==="o"?t++:l==="triangle"?a++:l==="x"&&r++;const s=t+a+r;return{marked:s,o:t,triangle:a,x:r,rate:s===0?null:(t+a*.5)/s}}function es(e){const t={};for(const[a,r]of Object.entries(e))(r==="o"||r==="triangle"||r==="x")&&(t[a]=r);return t}function tc(e){const t=[];let a=0;for(const r of e)t.push(a),a+=r;return t}function w4(e,t){return!t&&e>0}const Qn={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 B4(e="landscape"){Nt("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}=Qn[e],s=document.createElement("style");s.textContent=`@page { size: ${t}; margin: 0; } .word-table { width: ${a} !important; height: ${r} !important; }`,document.head.appendChild(s);const l=()=>{document.head.removeChild(s),window.removeEventListener("afterprint",l)};window.addEventListener("afterprint",l),window.print()}function k4(e,t){if(e.length===0)return[[]];const a=Math.max(1,Math.floor(t)),r=[];for(let s=0;s<e.length;s+=a)r.push(e.slice(s,s+a));return r}const A4={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},13:{cols:5,rows:3},14:{cols:5,rows:3},15:{cols:5,rows:3},16:{cols:6,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},13:{cols:4,rows:4},14:{cols:4,rows:4},15:{cols:4,rows:4},16:{cols:4,rows:4}}};function nc(e,t){const a=A4[e][t];if(a)return a;const r=Math.max(1,Math.ceil(t)),s=Math.max(1,Math.ceil(Math.sqrt(r*.707)));let l,i;return e==="landscape"?(i=s,l=Math.ceil(r/i)):(l=s,i=Math.ceil(r/l)),(e==="landscape"?l<i:i<l)&&([l,i]=[i,l]),{cols:l,rows:i}}function N4(e,t){const a=nc(e==="landscape"?"portrait":"landscape",t),r=Math.max(1,Math.ceil(t));if(r<=1)return a;const s=Qn[e],l=e==="landscape"?s.width/2:s.width,i=e==="landscape"?s.height:s.height/2,u=(m,g)=>Math.min(l/m/lc,i/g/ic),c=Math.max(0,a.cols*a.rows-r),d=u(a.cols,a.rows);let h=a,p=d;for(let m=1;m<=r;m++){const g=Math.ceil(r/m);if(m*g-r>c)continue;const y=u(m,g);y>p&&(h={cols:m,rows:g},p=y)}return p>d*1.05?h:a}const E4={show:"word-table__content--cut-show",dashed:"",corner:"word-table__content--cut-corner",hide:""},ac={\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"},rc={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},ts={\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"},ns={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function oc(e){return Object.fromEntries(Object.entries(ac).map(([t,a])=>[t,ts[t]?e(`wordTable.pos.${ts[t]}`,{defaultValue:a}):a]))}function sc(e){return Object.fromEntries(Object.entries(rc).map(([t,a])=>[t,ns[t]?e(`wordSearch.filter.type.${ns[t]}`,{defaultValue:a}):a]))}const D4={pos:ts,wordType:ns};function as(e,t){return e?e.split("/").map(a=>t[a]??a).join("/"):""}function rs(e,t,a,r){if(r!=="dashed")return{};const s=e%t,l=Math.floor(e/t),i=s<t-1,u=l<a-1;if(!i&&!u)return{};const c="#ddd",d=g=>`repeating-linear-gradient(to ${g}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,h=[],p=[],m=[];return i&&(h.push(d("bottom")),p.push("1px 100%"),m.push("right center")),u&&(h.push(d("right")),p.push("100% 1px"),m.push("center bottom")),{backgroundImage:h.join(", "),backgroundSize:p.join(", "),backgroundPosition:m.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const lc=280,S4=240,j4=280,ic=400,T4=120,M4=280;function uc(e,t){const a=o.useRef(null),[r,s]=o.useState(1),[l,i]=o.useState(0),u=o.useCallback((c,d)=>{if(!(c>0))return;const h=c/e,p=t&&d>0?d/t:1/0,m=Math.min(1,h,p);s(m),i(Math.max(0,(c-e*m)/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 h=new ResizeObserver(([p])=>u(p.contentRect.width,p.contentRect.height));return h.observe(d),()=>h.disconnect()},[u,t]),{scalerRef:a,scale:r,offset:l}}const L4=24,$4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},R4=400,cc=8;function os({label:e,subLabel:t,colloquialLabel:a,captionLabel:r,captionBadge:s,homonum:l,showWord:i=!0,showImage:u=!0,showPronunciation:c=!0,showColloquial:d=!0,showCaption:h=!0,buttonSize:p=40,wordInfo:m,outerScale:g=1}){const{t:y}=_e.useTranslation(),C=o.useRef(null),b=o.useRef(null),v=o.useRef(null),[f,B]=o.useState(1),[_,N]=o.useState(!1),[x,E]=o.useState(!1),[w,D]=o.useState({for:"",url:""}),[k,A]=o.useState(null),R=t&&t.length>0?t:W1()?.(e,l)??"",$=ia()?.(e,l)??"",{imgRef:G,loading:T,failed:P,onLoad:L,onError:Q}=Jo($),Z=o.useCallback(()=>A(b.current?.getBoundingClientRect()??null),[]),F=o.useCallback(()=>A(null),[]),K=vo(!!k,ee=>{ee?Z():F()},b),M=o.useMemo(()=>{if(!m)return null;const ee=[];return m.grade&&ee.push(y("wordTable.info.grade",{n:m.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),m.syllables&&ee.push(y("wordTable.info.syllables",{n:m.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),m.pos&&ee.push(y("wordTable.info.pos",{v:as(m.pos,oc(y)),defaultValue:"\uD488\uC0AC: {{v}}"})),m.wordType&&ee.push(y("wordTable.info.wordType",{v:as(m.wordType,sc(y)),defaultValue:"\uC720\uD615: {{v}}"})),ee.length?ee:null},[m,y]),q=R||e,Y=w.for===q?w.url:"";o.useEffect(()=>{const ee=Da(),V=R||e;if(!ee||!V)return;let ne=!1;return Promise.resolve(ee(V)).then(W=>{!ne&&W&&D({for:V,url:W})}),()=>{ne=!0}},[R,e]);const U=o.useRef(null),S=o.useRef(null);o.useEffect(()=>()=>{v.current?.pause(),S.current?.()},[]);const I=o.useRef(null);o.useEffect(()=>()=>{I.current&&(I.current.cancelled=!0)},[]);const O=o.useCallback(ee=>{if(ee.stopPropagation(),_||x){U.current?.();return}if(!Y){const ne=ar(),W=R||e;if(!ne||!W)return;const H={cancelled:!1,stop:null};I.current=H;const ie=()=>{H.cancelled=!0,H.stop?.(),E(!1),N(!1),S.current?.()};U.current=ie,S.current=Ua(ie),E(!0),Promise.resolve().then(()=>ne(W)).then(Te=>{if(H.cancelled)return;if(!Te){ie();return}D({for:W,url:Te});const ye=Ga(Te,()=>{N(!1),S.current?.()});v.current=ye.el,H.stop=ye.stop,E(!1),N(!0)}).catch(()=>{ie()});return}N(!0);const V=Ga(Y,()=>{N(!1),S.current?.()});v.current=V.el,U.current=V.stop,S.current=Ua(V.stop)},[_,x,Y,R,e]),z=u&&!!$&&!P,se=z&&i?lc:z?j4:S4,te=z&&i?ic:z?M4:T4;o.useEffect(()=>{const ee=C.current;if(!ee||typeof ResizeObserver>"u")return;const V=new ResizeObserver(([ne])=>{const{width:W,height:H}=ne.contentRect;B(Math.min(W/se,H/te))});return V.observe(ee),()=>V.disconnect()},[se,te]);const de=p*g<L4;return n.jsxs("div",{ref:C,className:we("word-table-cell",de&&"word-table-cell--tap-too-small",z?"word-table-cell--with-image":""),"data-ref-w":se,"data-ref-h":te,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${f})`},children:[z&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[T&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:G,className:"word-table-cell__image",src:$,alt:e,draggable:!1,style:{opacity:T?0:1},onLoad:L,onError:Q})]}),h&&(s||r)&&n.jsxs("span",{className:"word-table-cell__caption",children:[s&&n.jsx(jt,{type:"bar",fill:"soft",size:"small",label:s}),r&&n.jsx("span",{className:"word-table-cell__caption-tail h5",children:r})]}),i&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),c&&R&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",R,"]"]}),d&&a&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",a,"]"]})]}),n.jsxs("div",{className:"word-table-cell__side",children:[n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":Y,children:[n.jsx("span",{"data-play-state":"play",style:{display:_?"none":void 0},children:n.jsx(fe,{htmlType:"button",size:p,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,loading:x,showTooltipInfo:x?y("common.loading","\uBD88\uB7EC\uC624\uB294 \uC911"):y("common.play","\uC7AC\uC0DD"),ariaLabel:e?y("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):y("common.play","\uC7AC\uC0DD"),onClick:O})}),n.jsx("span",{"data-play-state":"pause",style:{display:_?void 0:"none"},children:n.jsx(fe,{htmlType:"button",size:p,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:y("common.pause","\uBA48\uCDA4"),ariaLabel:e?y("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):y("common.pause","\uBA48\uCDA4"),onClick:O})})]}),m&&n.jsxs("div",{ref:b,className:"word-table-cell__info-button",onPointerEnter:ee=>{ha(ee)||Z()},onPointerLeave:ee=>{ha(ee)||F()},onFocus:()=>{ma()||Z()},onBlur:F,children:[n.jsx(fe,{htmlType:"button",size:p,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:y("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:ee=>{ee.stopPropagation(),K.touchPress()}}),k&&M&&n.jsx(Yn,{anchorRect:k,items:M,showIndex:!1})]})]})]})}function va({title:e,titleIcon:t,disc:a,className:r,orientation:s="landscape",contentTypes:l=["image","word","standardPron"],baseItem:i,baseContentTypes:u,cutLine:c="show",showOutline:d=!0,showDivLine:h=!0,items:p,editCells:m,count:g,activeCell:y=null,onActivateCell:C,onRemoveCell:b,onRemoveItem:v,onReorder:f,onCopyItem:B,indexOffset:_=0,totalCount:N,renderCellAction:x,showFillerAdd:E=!1,addableCount:w,contentRef:D,buttonSize:k=40,brand:A,code:R,pageNumber:$,pageNumberPosition:G="right",fitHeight:T=!1,scoring:P=!1,marks:L,onMarkClick:Q,scoreIndexOffset:Z=0}){const F=o.useCallback((ve,Me)=>{Q?.(Z+ve,Me)},[Q,Z]),K=(ve,Me)=>{const Pe=L?.[vr(Z+ve)]??null;return n.jsx("div",{className:we("word-table-cell__score",Pe?"word-table-cell__score--marked":""),style:it>1?{transform:`translateX(-50%) scale(${it})`,transformOrigin:"bottom center"}:void 0,children:_r.map(Oe=>n.jsx("span",{className:we("word-table-cell__score-slot",Pe===Oe?"word-table-cell__score-slot--on":""),children:n.jsx(fe,{htmlType:"button",size:k,type:"dot",shape:"pill",icon:Qu[Oe],variant:Pe===Oe?ec[Oe]:"default",selected:Pe===Oe,useBorder:!1,...gt?{}:{tabIndex:-1,role:"img"},showTooltipInfo:M(`wordTable.scoring.markName.${Oe}`,{defaultValue:Oe}),ariaLabel:M(`wordTable.scoring.${Oe}`,{word:Me,defaultValue:`${Me} ${Oe}`}),onClick:gt?dt=>{dt.stopPropagation(),F(ve,Oe)}:void 0})},Oe))})},{t:M}=_e.useTranslation(),q=m!==void 0,Y=e!=null||!!t||!!a,U=fn("(max-width: 767px)"),S=o.useRef(null),[I,O]=o.useState(null),z=p?.length??0,se=N??z,[te,de]=o.useState(null),[ee,V]=o.useState(""),ne=o.useRef(null),W=o.useRef(null),H=o.useRef(null),ie=o.useRef(null),Te=o.useCallback(ve=>{W.current=ve,typeof D=="function"?D(ve):D&&(D.current=ve)},[D]),ye=o.useCallback((ve,Me)=>{ne.current=_+Me,f?.(ve,Me),V(M("wordTable.reorder.moved",{n:_+Me+1,total:se,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[f,M,se,_]);o.useEffect(()=>{const ve=ne.current;ve!=null&&(ne.current=null,(W.current?.closest(".word-table-block__pages")??W.current)?.querySelector(`[data-wordtable-index="${ve}"] .word-table__card-handle button`)?.focus())}),o.useEffect(()=>()=>{ie.current?.()},[]);const he=o.useCallback((ve,Me)=>{if(!f||!ve.altKey||ve.ctrlKey||ve.metaKey)return;const Pe=ve.key==="ArrowRight";if(!Pe&&ve.key!=="ArrowLeft")return;ve.preventDefault();const Oe=Me+(Pe?1:-1),dt=_+Oe;dt<0||dt>=se||ye(Me,Oe)},[f,se,_,ye]),Se=o.useCallback((ve,Me)=>{if(!f||ve.pointerType==="mouse")return;const Pe=ve.target.closest?.("button");if(Pe&&!Pe.closest(".word-table__card-handle"))return;ie.current?.();const Oe={x:ve.clientX,y:ve.clientY};let dt=!1;const St=Ie=>{dt&&Ie.cancelable&&Ie.preventDefault()};let yt=null,wt=null;const Ct=()=>{const Ie=wt;if(!Ie)return;const Xe=document.elementFromPoint?.(Ie.x,Ie.y)?.closest?.("[data-wordtable-cell]"),et=Xe?Number(Xe.dataset.wordtableCell):NaN,rt=Number.isInteger(et)?et:null;H.current=rt,O($t=>$t===rt?$t:rt)},Le=Ie=>{if(!dt){(Math.abs(Ie.clientX-Oe.x)>cc||Math.abs(Ie.clientY-Oe.y)>cc)&&be();return}if(wt={x:Ie.clientX,y:Ie.clientY},typeof requestAnimationFrame>"u"){Ct();return}yt===null&&(yt=requestAnimationFrame(()=>{yt=null,Ct()}))},at=()=>{yt!==null&&(cancelAnimationFrame(yt),yt=null,Ct());const Ie=H.current,Xe=dt;be(),Xe&&Ie!=null&&Ie!==Me&&ye(Me,Ie)},oe=setTimeout(()=>{dt=!0,de(Me),H.current=Me,O(Me),window.addEventListener("touchmove",St,{passive:!1})},R4);function be(){clearTimeout(oe),window.removeEventListener("pointermove",Le),window.removeEventListener("pointerup",at),window.removeEventListener("pointercancel",at),window.removeEventListener("touchmove",St),dt=!1,yt!==null&&(cancelAnimationFrame(yt),yt=null),H.current=null,ie.current=null,de(null),O(null)}ie.current=be,window.addEventListener("pointermove",Le),window.addEventListener("pointerup",at),window.addEventListener("pointercancel",at)},[f,ye]),{width:$e,height:Ne}=Qn[s],ue=typeof T=="number"?T:T&&typeof T=="object"?U?T.narrow:T.wide:null,{scalerRef:xe,scale:ke,offset:Ee}=uc($e,T?Ne:void 0),We=q?m?.length??0:p?.length??0,He=Math.max(g??We,1),ot=!q&&!!i,Qe=N4(s,He),Je=nc(s,He),vt=ot?Qe.cols:Je.cols,je=ot?Qe.rows:Je.rows,Ye=ot&&s==="landscape"?Qe.cols*2:vt,Be=ot&&s==="portrait"?Qe.rows*2:je,Ue=ve=>({word:ve.length===0||ve.includes("word"),image:ve.length===0||ve.includes("image"),pron:ve.length===0||ve.includes("standardPron"),colloq:ve.length===0||ve.includes("colloquialPron"),caption:ve.length===0||ve.includes("caption")}),qe=Ue(l),pt=o.useMemo(()=>{const ve=(p??[]).map(Pe=>Pe.id),Me=ve.every(Pe=>typeof Pe=="string"&&Pe.length>0)&&new Set(ve).size===ve.length;return!Me&&ve.length>0&&Nt("wordTable.cellKeyFallback","[ihab/core] WordTable: items \uC758 id \uAC00 \uACB9\uCE58\uAC70\uB098 \uBE44\uC5B4 \uC788\uC5B4 \uCE78\uC744 \uC790\uB9AC \uBC88\uD638\uB85C \uC13C\uB2E4. \uCE78\uC744 \uBE7C\uAC70\uB098 \uB354\uD560 \uB54C \uB4A4 \uCE78\uB4E4\uC774 \uD1B5\uC9F8\uB85C \uB2E4\uC2DC \uADF8\uB824\uC9C4\uB2E4(\uC18C\uB9AC \uC8FC\uC18C\uB97C \uB2E4\uC2DC \uBC1B\uC544 \uC628\uB2E4). id \uB97C \uD45C \uC548\uC5D0\uC11C \uD558\uB098\uBFD0\uC778 \uAC12\uC73C\uB85C \uC9C0\uC5B4 \uC8FC\uBA74 \uADF8 \uAC12\uC774 \uC0AC\uB77C\uC9C4\uB2E4."),Me?ve:null},[p]),_t=Ue(u??l),Dt=q?(m??[]).some(ve=>ve!==null&&ve.length>1):(p??[]).some(ve=>(ve.words??[]).length>1),Bt=!!A?.show,st=!!A?.show&&A?.top!==!1,tt=!!A?.show&&A?.bottom!==!1,kt=A?.copyright??"\xA9 IHAB, Inc. All rights reserved.",At=le(we("word-table__content",E4[c],d&&"word-table__content--outline",h&&Dt&&"word-table__content--div-line",!Bt&&$&&G!=="none"&&"word-table__content--page-number",st&&"word-table__content--brand-top",tt&&"word-table__content--brand-bottom")),Tt={transform:`scale(${1/ke})`,transformOrigin:"center center"},Lt=k*_r.length+4*(_r.length-1),gt=!!Q,it=gt?Math.max(1,Math.min(1/ke,$e/Ye/Lt)):1,ut=n.jsxs("div",{ref:xe,className:"word-table__scaler",style:{height:Ne*ke},children:[n.jsx("div",{className:we("word-table",P&&!gt&&"word-table--score-readonly",!Y&&r),style:{width:$e,height:Ne,transform:`scale(${ke})`,transformOrigin:"top left",marginLeft:Ee},children:n.jsxs("div",{ref:Te,className:At,style:{gridTemplateColumns:`repeat(${Ye}, 1fr)`,gridTemplateRows:`repeat(${Be}, 1fr)`},children:[q?n.jsx(n.Fragment,{children:(m??[]).map((ve,Me)=>n.jsx("div",{className:le(we("word-table__edit-cell",ve?"word-table__edit-cell--filled":"word-table__edit-cell--empty",y===Me?"word-table__edit-cell--active":"")),style:rs(Me,Ye,Be,c),children:ve?n.jsxs(n.Fragment,{children:[ve.map((Pe,Oe)=>n.jsxs(o.Fragment,{children:[Oe>0&&n.jsx("div",{className:le("word-table__pair-divider")}),n.jsx(os,{outerScale:ke,label:Pe.word,subLabel:Pe.pronunciation,colloquialLabel:Pe.colloquialPronunciation,homonum:Pe.homonum,showWord:qe.word,showImage:qe.image,showPronunciation:qe.pron,showColloquial:qe.colloq,showCaption:qe.caption,buttonSize:k})]},Oe)),P&&K(Me,ve.map(Pe=>Pe.word).join(" / ")),b&&n.jsx("div",{className:le("word-table__card-close"),children:n.jsx(fe,{htmlType:"button",size:k,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:ve.length>1?M("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):M("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:ve.length>1?M("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):M("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>b(Me)})})]}):C&&n.jsx("div",{style:Tt,children:n.jsx(fe,{htmlType:"button",size:k,type:"dot",icon:"plus",variant:"default",ariaLabel:M("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:M("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C(Me)})})},Me))}):n.jsxs(n.Fragment,{children:[ot&&i&&n.jsx("div",{className:le("word-table__card word-table__card--base"),style:{gridColumn:`1 / span ${Qe.cols}`,gridRow:`1 / span ${Qe.rows}`,...rs(0,s==="landscape"?2:1,s==="landscape"?1:2,c)},children:(i.words??[]).map((ve,Me)=>n.jsxs(o.Fragment,{children:[Me>0&&n.jsx("div",{className:le("word-table__pair-divider")}),n.jsx(os,{outerScale:ke,label:ve.label,subLabel:ve.subLabel,colloquialLabel:ve.colloquialLabel,captionLabel:ve.captionLabel,captionBadge:ve.captionBadge,homonum:ve.homonum,showWord:_t.word,showImage:_t.image,showPronunciation:_t.pron,showColloquial:_t.colloq,showCaption:_t.caption,buttonSize:k,wordInfo:ve.grade||ve.syllables!=null||ve.pos||ve.wordType?{grade:ve.grade,syllables:ve.syllables,pos:ve.pos,wordType:ve.wordType}:void 0})]},Me))}),(p??[]).map((ve,Me)=>n.jsxs("div",{"data-wordtable-cell":f?Me:void 0,"data-wordtable-index":f?_+Me:void 0,className:le(`word-table__card${f?" word-table__card--draggable":""}${I===Me?" word-table__card--drag-over":""}${te===Me?" word-table__card--dragging":""}`),style:rs(Me,vt,je,c),draggable:!!f,onPointerDown:f?Pe=>Se(Pe,Me):void 0,onKeyDown:f?Pe=>he(Pe,Me):void 0,onDragStart:f?()=>{S.current=Me}:void 0,onDragOver:f?Pe=>{Pe.preventDefault(),O(Me)}:void 0,onDragLeave:f?()=>O(null):void 0,onDrop:f?Pe=>{Pe.preventDefault(),S.current!==null&&S.current!==Me&&f(S.current,Me),S.current=null,O(null)}:void 0,onDragEnd:f?()=>{S.current=null,O(null)}:void 0,children:[(ve.words??[]).map((Pe,Oe)=>n.jsxs(o.Fragment,{children:[Oe>0&&n.jsx("div",{className:le("word-table__pair-divider")}),n.jsx(os,{outerScale:ke,label:Pe.label,subLabel:Pe.subLabel,colloquialLabel:Pe.colloquialLabel,captionLabel:Pe.captionLabel,captionBadge:Pe.captionBadge,homonum:Pe.homonum,showWord:qe.word,showImage:qe.image,showPronunciation:qe.pron,showColloquial:qe.colloq,showCaption:qe.caption,buttonSize:k,wordInfo:Pe.grade||Pe.syllables!=null||Pe.pos||Pe.wordType?{grade:Pe.grade,syllables:Pe.syllables,pos:Pe.pos,wordType:Pe.wordType}:void 0})]},Oe)),P&&K(Me,(ve.words??[]).map(Pe=>Pe.label).join(" / ")),(x||v||B||f)&&n.jsxs("div",{className:le("word-table__card-actions"),children:[v&&n.jsx("div",{className:le("word-table__card-close"),children:n.jsx(fe,{htmlType:"button",size:k,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(ve.words??[]).length>1?M("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):M("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:(ve.words??[]).length>1?M("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):M("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>v(ve.id)})}),B&&n.jsx("div",{className:le("word-table__card-copy"),children:n.jsx(fe,{htmlType:"button",size:k,type:"dot",icon:"copy",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:M("wordTable.copyItem","\uD55C \uCE78 \uB354"),ariaLabel:M("wordTable.copyItemAria",{n:_+Me+1,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354"}),onClick:()=>B(ve.id,_+Me)})}),x?.(Me,ve),f&&n.jsx("div",{className:le("word-table__card-handle"),children:n.jsx(fe,{htmlType:"button",size:k,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:M("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:M("wordTable.reorder.handle",{word:(ve.words??[]).map(Pe=>Pe.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})})]})]},pt?pt[Me]:Me)),Array.from({length:Math.max(0,vt*je-(p?.length??0))}).map((ve,Me)=>{const Pe=(p?.length??0)+Me<(w??He);return n.jsx("div",{className:le("word-table__card word-table__card--filler"),children:E&&C&&Pe&&n.jsx("div",{style:Tt,children:n.jsx(fe,{htmlType:"button",size:k,type:"dot",icon:"plus",variant:"default",ariaLabel:M("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:M("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C((p?.length??0)+Me)})})},`filler-${Me}`)})]}),st&&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:A?.topLogo?.src??Cr,alt:A?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const ve=[A?.title&&n.jsx("span",{className:"word-table__paper-title",children:A.title},"t"),A?.owner&&n.jsx("span",{className:"word-table__owner",children:A.owner},"o"),R&&n.jsx("span",{className:"word-table__code",children:R},"c")].filter(Boolean);return ve.length===0?null:n.jsx("span",{className:"word-table__ident",children:ve.map((Me,Pe)=>n.jsxs(o.Fragment,{children:[Pe>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Me]},Pe))})})()]})}),tt&&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:[A?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:A.bottomLogo.src,alt:A.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:kt})]}),n.jsxs("span",{className:"word-table__band-end",children:[A?.link&&n.jsx("span",{className:"word-table__link",children:A.link}),$&&G!=="none"&&n.jsx("span",{className:"word-table__page-count",children:M("wordTable.filter.pageIndicator",{current:$.current,total:$.total})})]})]})}),!Bt&&$&&G!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${G}`,children:M("wordTable.filter.pageIndicator",{current:$.current,total:$.total})})]})}),f&&n.jsx("span",{role:"status",style:$4,children:ee})]}),ct=ue==null?ut:n.jsx("div",{className:"word-table__frame",style:{height:ue},children:ut});return Y?n.jsx(ya,{type:"page",icon:t,title:e,disc:a,className:we(le("word-table__section"),r),children:ct}):ct}function P4(e,t,a){const r=[];for(const s of e??[]){if(s.type==="note"||s.type==="input")continue;const l=s.displayLabel??s.label,i=I4(s,t?.[s.label],a);i!==null&&r.push(`${l} ${i}`)}return r.join(" \xB7 ")}function I4(e,t,a){const r=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(s=>s!==vn);return r.length===0?e.allOption?e.allLabel??a:null:r.map(s=>F4(e,s)).join(", ")}function F4(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:s=!1,defaultCollapsed:l=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:d,selected:h={},onSelect:p,align:m,sectionAlign:g,className:y}){const C=(m??(g==="vertical"?"newline":"inline"))==="inline",{t:b}=_e.useTranslation(),[v,f]=o.useState(l),B=i??v,_=()=>{const A=!B;f(A),u?.(A)},N=A=>{if(!s)return;const R=A.target;!R||typeof R.closest!="function"||R.closest(".filter-panel__collapse-toggle")||R.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||_()},x=o.useMemo(()=>r!==void 0||!B?"":P4(d,h,b("common.all","\uC804\uCCB4")),[r,B,d,h,b]),E=r??(x?n.jsx("span",{className:"filter-panel__header-summary body-3",children:x}):null),w=e||a||r||s,D=o.useId(),k=t?`h${t}`:"span";return n.jsxs("div",{className:we("filter-panel",s?"filter-panel--collapsible":"",B?"filter-panel--collapsed":"",y),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?D:void 0,children:[w&&n.jsxs("div",{className:"filter-panel__header",onClick:s?N:void 0,children:[n.jsx("div",{className:"filter-panel__title-row",children:e&&n.jsx(k,{id:D,className:"filter-panel__title h4",children:e})}),n.jsxs("div",{className:"filter-panel__header-actions",children:[B?E:a,s&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:B?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:B?b("common.expand","\uD3BC\uCE58\uAE30"):b("common.collapse","\uC811\uAE30"),showTooltipInfo:B?b("common.expand","\uD3BC\uCE58\uAE30"):b("common.collapse","\uC811\uAE30"),"aria-expanded":!B,onClick:_})]})]}),!B&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:we("filter-panel__sections",C?"filter-panel__sections--row":""),children:d.map(A=>{const R=h[A.label],$=R===void 0||(Array.isArray(R)?R.length===0:!1),G=(A.items??[]).filter(P=>P!=null);A.allOption&&G.some(P=>(typeof P=="string"?P:P.value)===vn)&&Nt(`filter-panel-all-value:${A.label}`,`[FilterPanel] '${A.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${vn}' \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 T=P=>{const L=typeof P=="string"?P:P.value,Q=typeof P!="string"&&!!P.disabled,Z=typeof P!="string"?P.labels:void 0,F=typeof P!="string"?P.displayLabel:void 0,K=typeof P!="string"?P.tooltip:void 0,M=typeof P!="string"?P.descriptionTooltip:void 0,q=typeof P!="string"?P.shape:void 0,Y=Array.isArray(R)?R.includes(L):R===L;return n.jsx(fe,{htmlType:"button",size:"keyboard",label:Z??F??L,type:A.itemType??(Z?"bar":L.length===1?"dot":void 0),selected:Y,disabled:Q,shape:q,showTooltipInfo:!!K,tooltipInfoText:K,tooltipDescription:M,onClick:()=>p?.(L,A.label)},L)};return n.jsxs(o.Fragment,{children:[A.groupLabel&&n.jsxs("div",{className:"filter-panel__group-label-row",children:[n.jsx("div",{className:"filter-panel__group-label body-2",children:A.groupLabel}),A.groupAction]}),n.jsxs("div",{className:we("filter-panel__section",A.layout==="row"?"filter-panel__section--row":"",A.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:A.displayLabel??A.label}),A.labelAction??(A.labelInfo?n.jsx(qa,{...A.labelInfo}):null)]}),A.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:A.content}):A.type==="input"?n.jsx(Jn,{className:"filter-panel__textfield",placeholder:A.placeholder,ariaLabel:A.displayLabel??A.label,value:h[A.label]??"",onChange:P=>p?.(P,A.label),error:A.error}):!A.multiple&&A.display==="segmented"?n.jsx(kn,{ariaLabel:A.displayLabel??A.label,options:[...A.allOption?[{key:vn,label:A.allLabel??b("common.all","\uC804\uCCB4"),disabled:A.allOptionDisabled}]:[],...G.map(P=>{const L=typeof P=="string"?P:P.value,Q=typeof P!="string"?P.displayLabel:void 0,Z=typeof P!="string"?P.disabled:void 0;return{key:L,label:Q??L,disabled:Z}})],value:$&&A.allOption?vn:h[A.label]??"",onChange:P=>p?.(P,A.label),size:32}):!A.multiple&&A.display==="dropdown"?n.jsx(bn,{className:"filter-panel__dropdown",ariaLabel:typeof A.label=="string"?A.label:void 0,size:40,options:[...A.allOption?[{value:vn,label:A.allLabel??b("common.all","\uC804\uCCB4"),disabled:A.allOptionDisabled}]:[],...G.map(P=>{const L=typeof P=="string"?P:P.value,Q=typeof P!="string"?P.displayLabel:void 0,Z=typeof P!="string"?P.disabled:void 0;return{value:L,label:Q??L,disabled:Z}})],value:$&&A.allOption?vn:h[A.label],onChange:P=>p?.(P,A.label)}):n.jsxs("div",{className:A.groups?"filter-panel__item-groups":"filter-panel__items",children:[A.allOption&&!A.groups&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:A.allLabel??b("common.all","\uC804\uCCB4"),selected:$,disabled:A.allOptionDisabled,onClick:()=>p?.(vn,A.label)}),A.groups?A.groups.map((P,L)=>n.jsxs("div",{className:"filter-panel__item-group",children:[L===0&&A.allOption&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:A.allLabel??b("common.all","\uC804\uCCB4"),selected:$,disabled:A.allOptionDisabled,onClick:()=>p?.(vn,A.label)}),P.filter(Q=>Q!=null).map(T)]},L)):G.map(T)]})]})]},A.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const O4=[1,2,3,4,5,6,7,8,9,10,11,12],z4=[8,6,4,2,1],hn="show",Nn="hide",dc=["image","word","caption","standardPron"];function pc(e){return e.some(t=>(t.words??[]).some(a=>!!a.captionBadge||!!a.captionLabel))}function hc(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:"caption",disabled:!t.hasCaption,displayLabel:e("wordTable.filter.caption","\uC720\uD615")},{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 mc(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 Cc(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Nn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function fc(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Nn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function bc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Nn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function gc(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:Nn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function yc(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Nn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function vc(e,t){const a=Math.max(1,Math.min(t.itemCount,t.max??t.itemCount));return{label:e(t.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[a,...z4.filter(r=>r<a)].map(r=>({value:`${r}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:r})})),display:"segmented"}}function _c(e,t){return e>=t?Number.POSITIVE_INFINITY:e}function W4(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:Nn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function xc(e){return e==="left"||e==="center"||e==="right"?e:"none"}function wc(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:Nn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?hn:Nn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?hn:Nn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?hn:Nn}:{}}}function Bc(e,t,a,r){return a===e("wordTable.filter.composition","\uAD6C\uC131")?t===vn?(r.setContentTypes(()=>[]),!0):(r.setContentTypes(s=>s.includes(t)?s.filter(l=>l!==t):[...s,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 H4(e){return"sections"in e}function ss(e){const{t}=_e.useTranslation(),{title:a,className:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c}=e,d={collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c};if(H4(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:h,hasColloquial:p,hasCaption:m,contentTypes:g,orientation:y,showOutline:C,cutLine:b,showDivLine:v,setters:f,showCutLine:B=!1,showDivLine2:_=!1,middleSections:N=[],extraSelected:x={},onExtraSelect:E,showPaperBands:w=!1,showTopInfo:D=!0,showBottomInfo:k=!0}=e,A=[hc(t,{hasImage:h,hasColloquial:p,hasCaption:m??!1}),mc(t),...N,Cc(t),...B?[gc(t)]:[],..._?[yc(t)]:[],...w?[fc(t),bc(t)]:[]],R={...wc(t,{contentTypes:g,orientation:y,showOutline:C,cutLine:b,showDivLine:v,showTopInfo:D,showBottomInfo:k}),...x},$=(G,T)=>{Bc(t,G,T,f)||E?.(G,T)};return n.jsx(Ln,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:A,selected:R,onSelect:$,...d,sectionAlign:"horizontal"})}function ls(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function V4(e){return ls(e).replace(/"/g,""").replace(/'/g,"'")}function is(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let xr=null,_a=null;function q4(e,t,a,r="",s=""){if(e.length===0||_a&&_a.iframe.isConnected&&Date.now()-_a.at<1e4)return;const l=r?is(r):"";xr?.();let i=null;if(l){const d=document.title;document.title=l,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}_a={iframe:u,at:Date.now()},c.open(),c.write(us(e,t,a,!0,l,s)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),_a?.iframe===u&&(_a=null)},0)})}function us(e,t,a,r=!1,s="",l=""){s=s?is(s):"";const i=Array.from(document.styleSheets).flatMap(p=>{try{return Array.from(p.cssRules).map(m=>m.cssText)}catch{return[]}}).join(`
|
|
830
|
+
`),C=y===-1?a:a.slice(0,y);l("comment",C),a=a.slice(C.length);continue}const u=a.match(/^\/\*[\s\S]*?\*\//);if(u){l("comment",u[0]),a=a.slice(u[0].length);continue}const c=a.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(c){l("string",c[0]),a=a.slice(c[0].length);continue}const d=a.match(/^\d+(?:\.\d+)?/);if(d){l("number",d[0]),a=a.slice(d[0].length);continue}const h=a.match(xv);if(h){l("keyword",h[0]),a=a.slice(h[0].length);continue}const p=a.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(p){const y=p[0];l(s&&_v.has(y)?"command":"identifier",y),a=a.slice(y.length);continue}const m=a.match(/^[=+\-*/%<>!&|^~?:]+/);if(m){l("operator",m[0]),a=a.slice(m[0].length);continue}const g=a.match(/^[()[\]{};.,]/);if(g){l("punctuation",g[0]),a=a.slice(1);continue}l("other",a[0]),a=a.slice(1)}return r}function Bv({children:e,language:t="bash",title:a="",showCopy:r=!0,size:s="default",className:l=""}){const{t:i}=_e.useTranslation(),[u,c]=o.useState(!1),d=vv(wu(e)),h=o.useRef(null);o.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const p=async()=>{try{if(!await Ff(d))return;c(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>c(!1),2e3)}catch{}},m=wv(d,t),g=s==="small"?"caption-1":"body-3";return n.jsxs("div",{className:we("code-box",s==="small"?"code-box--small":"",l),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(be,{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:m.map((y,C)=>n.jsx("span",{className:`code-token ${y.type} ${g}`,children:y.content},C))})})]})}function Bu({checked:e,onChange:t,disabled:a=!1,label:r,ariaLabel:s,labelPosition:l="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:[l==="left"&&c,n.jsx("input",{id:u,type:"checkbox",role:"switch",checked:e,disabled:a,onChange:d=>t?.(d.target.checked),"aria-label":!r&&s?s:void 0}),n.jsx("span",{className:"toggle__slider"}),l==="right"&&c]})}function ku({checked:e=!1,onChange:t,disabled:a,indeterminate:r,label:s,size:l="medium",className:i,title:u,ariaLabel:c}){const d=o.useRef(null),h=o.useId(),p=o.useRef(!!r);return p.current=!!r,o.useEffect(()=>{d.current&&(d.current.indeterminate=!!r)}),n.jsxs("label",{className:we("checkbox",l==="small"&&"checkbox--small",l==="large"&&"checkbox--large",a&&"checkbox--disabled",i),htmlFor:h,title:u,children:[n.jsx("input",{ref:d,id:h,type:"checkbox",className:"checkbox__input",checked:e,onChange:m=>{t?.(m.target.checked),d.current&&(d.current.indeterminate=p.current)},disabled:a,"aria-label":!s&&c?c:void 0}),n.jsx("span",{className:"checkbox__box"}),s&&n.jsx("span",{className:"checkbox__label body-3",children:s})]})}function kv({count:e,actions:t,onClear:a,clearLabel:r,visible:s,content:l,max:i}){const{t:u}=_e.useTranslation(),c=s!==void 0?s:e>0,d=r??u("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),h=o.useRef(null),p=o.useRef(null),m=o.useRef(null),g=o.useRef(c);o.useLayoutEffect(()=>{const f=p.current,B=g.current;if(g.current=c,c&&!B){const _=typeof document<"u"?document.activeElement:null;m.current=_&&_!==document.body&&!f?.contains(_)?_:null}else!c&&B&&f&&f.contains(document.activeElement)&&cr(f,m.current)},[c]);const[y,C]=o.useState(!1),b=o.useRef(!1),v=o.useRef(null);return o.useEffect(()=>{const f=h.current;if(!f)return;const B=D=>{b.current=D,C(D)},_=()=>{const D=f.firstElementChild??f,k=Array.from(D.children);if(k.length<2){B(!1);return}const A=k[0].offsetTop,R=k.some(L=>L.offsetTop!==A);if(!b.current){v.current=f.clientWidth,R&&B(!0);return}if(R)return;const $=k[0],G=k[k.length-1],T=G.offsetLeft+G.offsetWidth-$.offsetLeft,P=v.current;(P==null||T<=P)&&B(!1)};if(_(),typeof ResizeObserver>"u")return;const N=new ResizeObserver(_);N.observe(f);const x=f.parentElement;let E=x?.clientWidth??0;const w=new ResizeObserver(()=>{const D=x?.clientWidth??0;D!==E&&(E=D,v.current=null,_())});return x&&w.observe(x),()=>{N.disconnect(),w.disconnect()}},[l,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:h,className:"bulk-bar__count body-2",role:"status",children:l??n.jsx("b",{children:u("common.selectedCount",{count:e})})}),i!==void 0&&n.jsx(jt,{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${y?" bulk-bar__actions--stacked":""}`,children:[n.jsx(be,{htmlType:"button",size:40,label:d,onClick:a}),t.map((f,B)=>n.jsx(be,{htmlType:"button",size:40,variant:f.variant??"default",icon:f.icon,label:f.label,onClick:f.onClick},B))]})]})}const Av=[{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 Nv(e){const{onClose:t,className:a}=e;return n.jsx("div",{className:we("item-actions",a),children:Av.map(({key:r,icon:s,closeFirst:l})=>{const i=e[r];if(!i)return null;const u=r==="publish"?i.published?i.unpublish:i.publish:i;return n.jsx(be,{htmlType:"button",size:40,type:"dot",icon:s,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{l&&t(),u.onClick()}},r)})})}function Au(e,t){const a=()=>{if(e){const[C,b]=e.split("-");return{y:+C,m:+b-1}}const[g,y]=lo(t).split("-");return{y:+g,m:+y-1}},[r,s]=o.useState(()=>a().y),[l,i]=o.useState(()=>a().m),u=o.useRef(e);o.useEffect(()=>{if(e===u.current)return;u.current=e;const g=a();s(g.y),i(g.m)},[e]);const c=o.useRef({y:r,m:l});o.useEffect(()=>{c.current={y:r,m:l}},[r,l]);const d=o.useCallback(g=>{const y=c.current.y*12+c.current.m+g,C=Math.floor(y/12),b=y-C*12;c.current={y:C,m:b},s(C),i(b)},[]),h=o.useCallback(()=>d(-1),[d]),p=o.useCallback(()=>d(1),[d]),m=o.useCallback((g,y)=>{c.current={y:g,m:y},s(g),i(y)},[]);return{viewY:r,viewM:l,prevMonth:h,nextMonth:p,setViewYM:m}}function br(e,t){return new Date(e,t+1,0).getDate()}function Ev(e,t){return new Date(e,t,1).getDay()}function Xa(e,t,a){return`${e}-${String(t+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function Dv(e){if(!e)return"";const[t,a,r]=e.split("-");return`${t}. ${a}. ${r}.`}function Sv(e){const t=e.replace(/\D/g,"");if(t.length!==8)return null;const a=+t.slice(0,4),r=+t.slice(4,6),s=+t.slice(6,8);if(r<1||r>12||s<1||s>31)return null;const l=new Date(a,r-1,s);return l.getFullYear()!==a||l.getMonth()!==r-1||l.getDate()!==s?null:Xa(a,r-1,s)}const jv=1900;function Tv(e,t,a,r,s){const l=r?+r.split("-")[0]:Math.min(jv,e),i=s?+s.split("-")[0]:Math.max(t+10,e),u=[];for(let c=l;c<=i;c++)u.push({value:String(c),label:a(c)});return u}function Nu(e,t,a,r){const s=[];for(let l=1;l<=12;l++){const i=`${e}-${String(l).padStart(2,"0")}`;a&&i<a.slice(0,7)||r&&i>r.slice(0,7)||s.push({value:String(l),label:t(e,l)})}return s}function Mv({value:e,onChange:t,size:a=48,min:r,max:s,disabled:l,placeholder:i,className:u,today:c}){const{t:d,i18n:h}=_e.useTranslation(),p=i??d("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),m=o.useMemo(()=>d("calendar.dow",{returnObjects:!0}),[d]),g=lo(c),{viewY:y,viewM:C,prevMonth:b,nextMonth:v,setViewYM:f}=Au(e,c),B=o.useId(),_=o.useCallback((V,ne)=>{const W=window.innerHeight,H=window.innerWidth,ie=typeof document<"u"?document.getElementById(B):null,Te=Math.max(ie?.offsetHeight||0,ie?.scrollHeight||0)||300,ye=Math.max(V.width,ie?.offsetWidth||0,260),he=W-V.bottom,Se=V.top,$e=he<Te&&Se>he,Ne=8,ue=(xe,ke)=>Math.min(Math.max(Ne,xe),Math.max(Ne,ke));return{position:"fixed",left:ue(V.left,H-ye-Ne),width:V.width,minWidth:260,...$e?{top:"auto",bottom:ue(W-V.top+6,W-Te-Ne)}:{bottom:"auto",top:ue(V.bottom+6,W-Te-Ne)},zIndex:Oa(ne)}},[B]),{open:N,setOpen:x,toggle:E,style:w,triggerRef:D,menuRef:k}=za({computeStyle:_,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!N)return;const V=k.current;return(V?.querySelector(".date-picker__day--selected:not(:disabled)")??V?.querySelector(".date-picker__day--today:not(:disabled)")??V?.querySelector(".date-picker__day:not(:disabled)")??V?.querySelector(kn)??V)?.focus?.(),()=>{const ne=document.activeElement;(!ne||ne===document.body)&&D.current?.focus?.()}},[N,k,D]);const[A,R]=o.useState(1),$=o.useRef(null),G=o.useRef(null);o.useEffect(()=>{if(!N)return;const V=e&&e.slice(0,7)===`${y}-${String(C+1).padStart(2,"0")}`?+e.slice(8):g.slice(0,7)===`${y}-${String(C+1).padStart(2,"0")}`?+g.slice(8):1;R(V)},[N]),o.useEffect(()=>{if(G.current==null)return;const V=G.current;G.current=null,$.current?.querySelector(`[data-day="${V}"]`)?.focus()}),o.useEffect(()=>{R(V=>Math.min(V,br(y,C)))},[y,C]);const T=o.useCallback(V=>{let ne=Xa(V.getFullYear(),V.getMonth(),V.getDate());r&&ne<r&&(ne=r),s&&ne>s&&(ne=s);const[W,H,ie]=ne.split("-").map(Number);(W!==y||H-1!==C)&&f(W,H-1),R(ie),G.current=ie},[r,s,y,C,f]),P=o.useCallback(V=>{const ne=new Date(y,C,A),W=ie=>{ne.setDate(ne.getDate()+ie),T(ne)},H=ie=>{const Te=ne.getFullYear()*12+ne.getMonth()+ie,ye=Math.floor(Te/12),he=Te-ye*12;T(new Date(ye,he,Math.min(ne.getDate(),br(ye,he))))};switch(V.key){case"ArrowLeft":W(-1);break;case"ArrowRight":W(1);break;case"ArrowUp":W(-7);break;case"ArrowDown":W(7);break;case"Home":W(-ne.getDay());break;case"End":W(6-ne.getDay());break;case"PageUp":V.shiftKey?H(-12):H(-1);break;case"PageDown":V.shiftKey?H(12):H(1);break;default:return}V.preventDefault()},[y,C,A,T]),L=o.useCallback(V=>{l||(t(Xa(y,C,V)),x(!1))},[y,C,t,x,l]);o.useEffect(()=>{l&&x(!1)},[l,x]);const Q=V=>{const ne=Xa(y,C,V);return!!(r&&ne<r||s&&ne>s)},Z=(()=>{const V=br(y,C);if(A>=1&&A<=V&&!Q(A))return A;for(let ne=1;ne<=V;ne++)if(!Q(ne))return ne;return-1})(),F=[];for(let V=0;V<Ev(y,C);V++)F.push(null);for(let V=1;V<=br(y,C);V++)F.push(V);const K=a===64?20:a===40?16:18,M=Hl(h.language),q=V=>new Intl.DateTimeFormat(M,{year:"numeric"}).format(new Date(V,0,1)),Y=(V,ne)=>new Intl.DateTimeFormat(M,{month:"long"}).format(new Date(V,ne-1,1)),U=Tv(y,+g.slice(0,4),q,r,s),S=Nu(y,Y,r,s),I=V=>{const ne=Nu(V,Y,r,s);if(ne.length===0)return;const W=ne.some(H=>+H.value===C+1);f(V,W?C:+ne[0].value-1)},[O,z]=o.useState(null);o.useEffect(()=>{z(null)},[e]);const se=o.useCallback(V=>{z(V);const ne=Sv(V);if(!ne||r&&ne<r||s&&ne>s)return;t(ne);const[W,H]=ne.split("-");f(+W,+H-1)},[r,s,t,f]),te=o.useCallback(()=>{z(null)},[]),de=o.useCallback(V=>{V.key==="Enter"?(V.preventDefault(),te(),x(!1)):V.key==="Escape"?(te(),x(!1)):V.key==="ArrowDown"&&!N&&(V.preventDefault(),x(!0))},[te,x,N]),ee=N?cn.createPortal(n.jsxs("div",{ref:k,id:B,className:"date-picker__dropdown",style:w,"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:b,"aria-label":d("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(Os,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(gn,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:U,value:String(y),onChange:V=>I(+V),size:40}),n.jsx(gn,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:S,value:String(C+1),onChange:V=>f(y,+V-1),size:40})]}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:v,"aria-label":d("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(zs,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:$,onKeyDown:P,children:[m.map(V=>n.jsx("div",{className:"date-picker__dow caption-1",children:V},V)),F.map((V,ne)=>{if(V===null)return n.jsx("div",{},`e${ne}`);const W=Xa(y,C,V),H=W===e,ie=W===g,Te=Q(V),ye=ne%7;return n.jsx("button",{type:"button",disabled:Te,"data-day":V,tabIndex:V===Z?0:-1,"aria-current":ie?"date":void 0,onClick:()=>!Te&&L(V),className:we("date-picker__day caption-1",H&&"date-picker__day--selected",ie&&!H&&"date-picker__day--today",Te&&"date-picker__day--disabled",ye===0&&"date-picker__day--sun",ye===6&&"date-picker__day--sat"),children:V},V)})]})]}),document.body):null;return n.jsxs("div",{className:we("date-picker",`date-picker--s${a}`,N&&"date-picker--open",u),children:[n.jsxs("div",{className:"date-picker__field",children:[n.jsx("input",{ref:D,type:"text",className:"date-picker__trigger body-2",value:O??Dv(e),placeholder:p,onChange:V=>se(V.target.value),onClick:()=>!l&&!N&&E(),onKeyDown:de,onBlur:te,disabled:l,"aria-haspopup":"dialog","aria-expanded":N,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!l&&E(),disabled:l,tabIndex:-1,"aria-label":p,"aria-haspopup":"dialog","aria-expanded":N,children:n.jsx(Zs,{size:K,className:"date-picker__icon",strokeWidth:1.5})})]}),ee]})}function Lv({items:e,className:t,ariaLabel:a="\uC54C\uB9BC \uAE00",titleLevel:r=4,targetBytes:s}){const l=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=s===void 0?Ml(i.sms):Ml(i.sms,s),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(l,{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,h])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:d}),n.jsx("dd",{children:h})]},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?`${jl}\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 ${jl}\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 $v({src:e,alt:t,className:a,style:r,tone:s,textColor:l}){const i=!s&&!!l,u=Ky(e,i),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return s?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":s},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":l},dangerouslySetInnerHTML:{__html:Uy(qy(u),c)}}):n.jsx("img",{src:e,alt:t,className:we("brand-logo",a),style:r,draggable:!1})}function Eu({children:e,className:t}){const a=o.useRef(null),[r,s]=o.useState(null);return o.useEffect(()=>{s(a.current?.parentElement??null)},[]),o.useEffect(()=>{const l=a.current;if(!l||!r)return;const i=()=>{const c=typeof window<"u"&&window.getComputedStyle(l).position==="absolute"?Math.ceil(l.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(l),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 Fo({items:e,className:t}){return n.jsx("div",{className:le(t?`chart-section__legend ${t}`:"chart-section__legend"),children:e.map((a,r)=>n.jsxs("span",{className:le("chart-section__legend-item"),children:[n.jsx("span",{className:le("chart-section__legend-dot"),style:{background:a.color}}),a.label]},r))})}function Ja({label:e,children:t}){return e?n.jsxs("div",{className:le("chart-section__total chart-section__total--stacked"),children:[n.jsx("span",{className:le("chart-section__total__label body-3"),children:e}),n.jsx("span",{className:le("chart-section__total__value"),children:t})]}):n.jsx("div",{className:le("chart-section__total"),children:t})}function Oo({title:e,titleClassName:t="h3",titleLevel:a=3,icon:r,disc:s,headRight:l,headFloat:i,headSegment:u,headMenuItems:c,collapseBelow:d=420,onClick:h,ariaLabel:p,tooltip:m,totalNum:g,totalUnit:y,totalLabel:C,subRow:b,subRowAlign:v="start",className:f,inGrid:B=!1,children:_}){const{t:N}=_e.useTranslation(),x=o.useRef(null),{anchorRect:E,openAt:w,close:D}=Fa(),k=o.useCallback(()=>{m&&x.current&&w(x.current)},[m,w]),[A,R]=o.useState(!1);Ro(()=>{const S=x.current;if(!S||!u)return;const I=z=>R(z>0&&z<d);if(I(S.clientWidth),typeof ResizeObserver>"u")return;const O=new ResizeObserver(z=>I(z[0].contentRect.width));return O.observe(S),()=>O.disconnect()},[u,d]);const[$,G]=o.useState(null),T=o.useCallback(()=>G(null),[]),P=o.useCallback(S=>{const I=S.currentTarget.getBoundingClientRect();G(O=>O?null:{left:I.left,right:I.right,top:I.top,bottom:I.bottom,width:I.width,height:I.height,x:I.x,y:I.y})},[]),L=!!u&&A;o.useEffect(()=>{L||G(null)},[L]);const Q=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,I)=>I===0?{...S,separatorBefore:!0}:S)]:[],Z=o.useCallback(S=>{if(!h)return;const I=S.target;I&&typeof I.closest=="function"&&I.closest('button, a, input, select, textarea, [role="radiogroup"]')||h()},[h]),F=o.useCallback(S=>{h&&S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),h())},[h]),K=typeof l=="function"?l({collapsed:L}):l,M=g!=null||C?n.jsxs(Ja,{label:C,children:[g!=null&&n.jsx("span",{className:le("chart-section__total__num h0"),children:g}),y&&n.jsx("span",{className:le("chart-section__total__unit h5"),children:y})]}):null,q=K||u?n.jsxs("div",{className:le("chart-section__head-right"),children:[u&&(L?n.jsx(be,{htmlType:"button",size:32,type:"dot",icon:"ellipsis",ariaLabel:u.ariaLabel??N("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:u.ariaLabel??N("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!$,onClick:P}):n.jsx(An,{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})),K]}):null,Y=o.useId(),U=a?`h${a}`:"div";return n.jsxs("section",{ref:x,className:le(["chart-section",B&&"chart-section--grid",h&&"chart-section--clickable",f].filter(Boolean).join(" ")),onClick:h?Z:void 0,onKeyDown:h?F:void 0,onPointerEnter:m?k:void 0,onPointerLeave:m?D:void 0,onFocus:m?k:void 0,onBlur:m?D:void 0,role:h?"button":void 0,tabIndex:h?0:void 0,"aria-label":h?p??(typeof e=="string"?e:void 0):void 0,"aria-labelledby":!h&&e!=null?Y:void 0,children:[m&&E&&n.jsx(Sn,{anchorRect:{left:E.left,top:E.top+21,right:E.right,bottom:E.bottom,width:E.width,height:E.height},text:m}),i&&n.jsx(Eu,{children:i}),n.jsxs("div",{className:le("chart-section__head"),children:[n.jsxs("div",{className:le("chart-section__title-row"),children:[r&&n.jsx(nt,{icon:r,label:typeof e=="string"?e:void 0,className:le("chart-section__icon")}),n.jsx(U,{id:Y,className:le(["chart-section__title",t].filter(Boolean).join(" ")),children:e})]}),q,s&&n.jsx("div",{className:le("chart-section__disc body-3"),children:s})]}),(M||b)&&n.jsxs("div",{className:le(["chart-section__sub-row",v!=="start"&&`chart-section__sub-row--${v}`].filter(Boolean).join(" ")),children:[M,b]}),_,$&&n.jsx(vn,{anchorRect:$,onClose:T,ariaLabel:u?.ariaLabel??N("tooltip.menu","\uBA54\uB274"),children:n.jsx(Wa,{columns:[{items:Q}],onClose:T,size:"small"})})]})}const Qa=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,zo=e=>Qa(e.getFullYear(),e.getMonth()+1);function fa(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 Wo=(e,t)=>`${e}#${t}`;function Nn(e,t){const a=new Date(e,t,1).getDay();return 1+(8-(a===0?7:a))%7}function Rv(){const e=ua();let t=e.getFullYear(),a=e.getMonth(),r=e.getDate();if(r<Nn(t,a)){const i=new Date(t,a,0);t=i.getFullYear(),a=i.getMonth(),r=i.getDate()}const s=Math.floor((r-Nn(t,a))/7),l=Qa(t,a+1);return{monthKey:l,value:Wo(l,s)}}function Pv(e){const t=ua(),a=zo(t),r=(c,d)=>Qa(c,d+1),s=new Map;s.set(a,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const d=r(c.date.getFullYear(),c.date.getMonth());s.has(d)||s.set(d,[]),s.get(d).push(c)}for(const[c,d]of[...s.entries()]){const h=fa(c);if(!h)continue;const p=h.year,m=h.month1-1,g=Nn(p,m);if(!(c===a&&t.getDate()<g)&&!d.some(b=>b.date.getDate()<g))continue;const y=new Date(p,m,0),C=r(y.getFullYear(),y.getMonth());s.has(C)||s.set(C,[])}const l=new Map;for(const[c,d]of s){const h=fa(c);if(!h)continue;const p=h.year,m=h.month1-1,g=new Date(p,m+1,0).getDate(),y=d.reduce((_,N)=>Math.max(_,N.parts?.length??0,N.partsB?.length??0),0),C=d.some(_=>_.partsB),b=new Array(g+1).fill(0),v=new Array(g+1).fill(0),f=Array.from({length:g+1},()=>new Array(y).fill(0)),B=Array.from({length:g+1},()=>new Array(y).fill(0));for(const _ of d){const N=_.date.getDate();if(b[N]+=_.a,v[N]+=_.b,_.parts)for(let x=0;x<y;x++)f[N][x]+=_.parts[x]??0;if(_.partsB)for(let x=0;x<y;x++)B[N][x]+=_.partsB[x]??0}l.set(c,{year:p,month:m,daysInMonth:g,partsLen:y,hasPartsB:C,dayA:b,dayB:v,dayParts:f,dayPartsB:B})}const i=(c,d,h)=>new Date(c,d,h).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,d]of l){const{year:h,month:p,daysInMonth:m,dayA:g,dayB:y,dayParts:C,dayPartsB:b}=d,v=h===t.getFullYear()&&p===t.getMonth(),f=t.getDate(),B=l.get(r(p===11?h+1:h,(p+1)%12)),_=d.partsLen,N=[];for(let E=1;E<=m;E++){const w=v&&E>f;N.push({label:String(E),...w&&g[E]===0&&y[E]===0?{future:!0}:{},a:w&&g[E]===0&&y[E]===0?-1:g[E],b:y[E],..._?{parts:C[E]}:{},..._&&d.hasPartsB?{partsB:b[E]}:{}})}const x=[];for(let E=Nn(h,p);E<=m;E+=7){const w=Math.max(0,E+6-m),D=w&&B?Math.max(_,B.partsLen):_,k=d.hasPartsB||!!(w&&B?.hasPartsB);let A=0,R=0;const $=new Array(D).fill(0),G=new Array(D).fill(0);for(let P=E;P<=Math.min(E+6,m);P++){A+=g[P],R+=y[P];for(let L=0;L<_;L++)$[L]+=C[P][L],G[L]+=b[P][L]}if(w&&B)for(let P=1;P<=w&&!i(B.year,B.month,P);P++){A+=B.dayA[P],R+=B.dayB[P];for(let L=0;L<B.partsLen;L++)$[L]+=B.dayParts[P][L],G[L]+=B.dayPartsB[P][L]}const T=w?`${(p+1)%12+1}/${w}`:`${E+6}`;x.push({label:`${x.length+1}\uC8FC`,sublabel:`[${E}\uC77C~${T}\uC77C]`,a:A,b:R,...D?{parts:$}:{},...D&&k?{partsB:G}:{}})}u[c]={weekly:x,daily:N}}return u}function Du(){const e=ua(),t=e.getFullYear(),a=e.getMonth()+1,r=[];for(let s=2024;s<=t;s++){const l=s===t?a:12;for(let i=1;i<=l;i++)r.push({value:Qa(s,i),year:s,month:i})}return r.reverse()}Du();function Iv(){return Du()}function Su(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 ju(e){const{t,i18n:a}=_e.useTranslation(),[r,s]=o.useState("week"),l=o.useMemo(()=>Iv().filter(D=>D.value in e),[e]),i=o.useMemo(()=>{const D=[];for(const k of l){const A=new Date(k.year,k.month,0).getDate(),R=Nn(k.year,k.month-1),$=Math.ceil((A-R+1)/7);for(let G=$-1;G>=0;G--)D.push({value:Wo(k.value,G),monthKey:k.value,year:k.year,month:k.month,week:G})}return D},[l]),u=o.useCallback(D=>`${so(t,a.language,D.year,D.month)} ${Su(t,D.week)}`,[t]),c=o.useMemo(()=>l.map(D=>({value:D.value,label:so(t,a.language,D.year,D.month)})),[t,a.language,l]),d=o.useMemo(()=>i.map(D=>({value:D.value,label:u(D)})),[i,u]),h=o.useMemo(()=>Rv(),[e]),p=o.useMemo(()=>l.find(D=>D.value===h.monthKey)?.value??l[0]?.value??"",[l,h]),m=o.useMemo(()=>i.find(D=>D.value===h.value)?.value??i[0]?.value??"",[i,h]),[g,y]=o.useState(""),[C,b]=o.useState("");o.useEffect(()=>{l.find(D=>D.value===g)||y(p)},[l,g,p]),o.useEffect(()=>{i.find(D=>D.value===C)||b(m)},[i,C,m]);const v=r==="month"?c:d,f=r==="month"?g:C,B=r==="month"?y:b,_=o.useMemo(()=>{const D=t("calendar.dow",{returnObjects:!0});return Array.isArray(D)?D:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),N=v.findIndex(D=>D.value===f),x=o.useCallback(()=>{const D=v.findIndex(k=>k.value===f);D<v.length-1&&B(v[D+1].value)},[v,f,B]),E=o.useCallback(()=>{const D=v.findIndex(k=>k.value===f);D>0&&B(v[D-1].value)},[v,f,B]),w=o.useMemo(()=>[{key:"week",label:t("manager.chart.periodWeek","\uC8FC")},{key:"month",label:t("manager.chart.periodMonth","\uC6D4")}],[t]);return{period:r,setPeriod:s,range:f,setRange:B,activeOptions:v,activeIdx:N,handlePrev:x,handleNext:E,periodOptions:w,monthRange:g,weekRange:C,weekRanges:i,DOW:_}}const Nt=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function Ln(e,t=!0){return e.future===!0||t&&e.a===-1}function Fv({data:e,colorA:t,colorB:a,labelA:r,labelB:s,barWidth:l=10,barGap:i=1,height:u=140,maxOverride:c,tightMax:d,seriesColors:h,seriesLabels:p,rateLabels:m,grouped:g=!1,baseline:y,focusableBars:C=!1}){const b=!a,v=!!(h&&h.length>0),f=y,B=o.useMemo(()=>v?Math.max(0,...e.filter(F=>!Ln(F,f==null)).map(F=>g?Math.max(0,...(F.parts??[]).map(Nt)):(F.parts??[]).reduce((K,M)=>K+Math.max(0,Nt(M)),0))):Math.max(0,...e.filter(F=>!Ln(F,f==null)).flatMap(F=>b?[Nt(F.a)]:[Nt(F.a),Nt(F.b)])),[e,b,v,g]),_=o.useMemo(()=>{if(f==null)return 0;const F=e.filter(K=>!Ln(K,f==null)).flatMap(K=>v?(K.parts??[]).map(Nt):b?[Nt(K.a)]:[Nt(K.a),Nt(K.b)]);return Math.max(0,...F.map(K=>Math.abs(K-f)))},[e,f,v,b]),N=o.useMemo(()=>{const F=f!=null?_:B;return c??(d?F>0?F:10:Math.ceil(F/10)*10||10)},[B,_,f,c,d]),x=u,E=v?g?Math.max(1,h.length):1:b?1:2,w={"--bar-width":`${o.useMemo(()=>{const F=Math.max(1,e.length);return Math.max(2,Math.min(l,Math.round(120/(F*E)+6)))},[e.length,E,l])}px`},D={"--bar-group-gap":`${Math.max(0,i)}px`},k=o.useMemo(()=>{const F=Math.round(N/2);return f!=null?[f+N,...F!==N?[f+F]:[],f,...F!==N?[f-F]:[],f-N]:F!==N?[N,F,0]:[N,0]},[N,f]),A=F=>f!=null?1-(F-(f-N))/(2*N):1-F/N,[R,$]=o.useState(null),G=o.useCallback(()=>$(null),[]),T=o.useCallback((F,K)=>{const M=[F.label,F.sublabel].filter(Boolean).join(" ");let q;if(v&&g&&F.rawPartsB)q=(p??[]).map((Y,U)=>{const S=F.rawPartsB[U]??0;return{text:S>0?`${Y}: ${K[U]??0}% (${F.rawParts?.[U]??0}/${S})`:`${Y}: -`,color:(h??[])[U]}});else if(v&&g)q=(p??[]).map((Y,U)=>({text:`${Y}: ${Q(K[U]??0)}`,color:(h??[])[U]}));else if(v){const Y=(p??[]).map((S,I)=>({text:`${S}: ${K[I]??0}`,color:(h??[])[I]})),U=Y.filter((S,I)=>(K[I]??0)>0);q=U.length?U:Y}else m&&!b?q=[{text:`${r} ${Nt(F.a)}%`,color:t},{text:`${s} ${Nt(F.b)}%`,color:a}]:m&&F.rawB!==void 0?q=[{text:`${m.total} ${F.rawB}`},{text:`${m.done} ${F.rawA??0}`,color:t}]:b?q=[{text:`${r}: ${Nt(F.a)}`,color:t}]:q=[{text:`${r}: ${Nt(F.a)}`,color:t},{text:`${s}: ${Nt(F.b)}`,color:a}];return{title:M,items:q}},[v,g,p,h,m,b,r,s,t,a,f]),P=o.useCallback((F,K,M)=>{const q=F.getBoundingClientRect(),{title:Y,items:U}=T(K,M);$({rect:{left:q.left,top:q.top,right:q.right,bottom:q.bottom,width:q.width,height:q.height},title:Y,items:U})},[T]),L=o.useCallback((F,K)=>{const{title:M,items:q}=T(F,K);return[M,...q.map(Y=>Y.text)].filter(Boolean).join(", ")},[T]),Q=F=>f!=null&&F>f?`+${F}`:`${F}`,Z=R!=null;return o.useEffect(()=>{if(!Z)return;const F=()=>$(null),K=M=>{const q=M.target;q&&typeof q.closest=="function"&&q.closest(".bar-chart__col")||$(null)};return window.addEventListener("scroll",F,!0),document.addEventListener("pointerdown",K,!0),()=>{window.removeEventListener("scroll",F,!0),document.removeEventListener("pointerdown",K,!0)}},[Z]),n.jsxs("div",{className:le("bar-chart__wrap"),style:D,children:[n.jsx("div",{className:le("bar-chart__inner"),children:n.jsx("div",{className:le("bar-chart__scroll"),children:n.jsxs("div",{className:le("bar-chart__area"),children:[n.jsxs("div",{className:le("bar-chart__plot"),style:{height:x},children:[k.slice(0,-1).map((F,K)=>n.jsx("div",{className:le(`bar-chart__gridline${f!=null&&F===f?" bar-chart__gridline--baseline":""}`),style:{top:A(F)*x},children:n.jsx("span",{className:le("bar-chart__gridline__label caption-1"),children:F})},K)),e.map((F,K)=>{const M=Ln(F,f==null),q=x/2,Y=O=>f!=null?Math.min(q,Math.abs(Nt(O)-f)/N*q):Math.min(x,Math.max(0,Nt(O)/N*x)),U=M?0:Y(F.a),S=M?0:Y(F.b),I=(F.parts??[]).map(Nt);return n.jsx("div",{className:le(`bar-chart__col${g&&v?" bar-chart__col--group":""}`),style:{cursor:M?"default":"pointer"},tabIndex:C&&!M?0:void 0,role:C&&!M?"img":void 0,"aria-label":C&&!M?L(F,I):void 0,onMouseEnter:M?void 0:O=>P(O.currentTarget,F,I),onFocus:M||!C?void 0:O=>P(O.currentTarget,F,I),onBlur:C?G:void 0,onMouseLeave:G,children:!M&&(v&&g?(h??[]).map((O,z)=>{const se=I[z]??0;if(f==null)return n.jsx("div",{className:le("bar-chart__bar"),style:{...w,height:Y(se),background:O}},z);const te=Nt(se)<f;return n.jsxs("div",{className:le("bar-chart__slot"),style:w,children:[n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--up"),children:!te&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full"),style:{height:Y(se),background:O}})}),n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--down"),children:te&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:Y(se),background:O}})})]},z)}):v?n.jsx("div",{className:le("bar-chart__stack"),style:w,children:(()=>{const O=I.reduce((se,te,de)=>te>0?de:se,-1);let z=x;return I.map((se,te)=>{if(se<=0)return null;const de=Math.min(z,se/N*x);return z-=de,n.jsx("div",{className:le("bar-chart__stack-segment"),style:{height:de,background:(h??[])[te],borderRadius:te===O?"6px 6px 0 0":void 0}},te)})})()}):f!=null?n.jsx(n.Fragment,{children:[{v:Nt(F.a),c:t},...b?[]:[{v:Nt(F.b),c:a}]].map(({v:O,c:z},se)=>n.jsxs("div",{className:le("bar-chart__slot"),style:w,children:[n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--up"),children:O>=f&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full"),style:{height:Y(O),background:z}})}),n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--down"),children:O<f&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:Y(O),background:z}})})]},se))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:le("bar-chart__bar"),style:{...w,height:U,background:t}}),!b&&n.jsx("div",{className:le("bar-chart__bar"),style:{...w,height:S,background:a}})]}))},K)})]}),n.jsx("div",{className:le("bar-chart__x-axis"),children:e.map((F,K)=>{const M=Ln(F,f==null);return n.jsxs("span",{className:le(`bar-chart__x-axis__label${M?" bar-chart__x-axis__label--future":""}`),children:[n.jsxs("span",{className:le("caption-1 bar-chart__x-axis__main"),children:[F.isToday&&n.jsx("span",{className:le("bar-chart__x-axis__today-dot"),style:{background:t}}),F.label]}),F.sublabel&&n.jsx("span",{className:"caption-1",children:F.sublabel})]},K)})})]})})}),R&&n.jsx(Yn,{anchorRect:R.rect,title:R.title,items:R.items,showIndex:!1,closeOnOutsideClick:!1})]})}function Tu({control:e}){const{t}=_e.useTranslation(),{activeOptions:a,activeIdx:r,range:s,setRange:l,handlePrev:i,handleNext:u,periodOptions:c,period:d,setPeriod:h}=e,p=d==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),m=d==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:le("chart-section__controls"),children:[n.jsx(be,{htmlType:"button",size:32,type:"dot",icon:"chevron-left",ariaLabel:p,showTooltipInfo:p,disabled:r===a.length-1,onClick:i}),n.jsx(gn,{value:s,onChange:l,options:a,size:40,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(be,{htmlType:"button",size:32,type:"dot",icon:"chevron-right",ariaLabel:m,showTooltipInfo:m,disabled:r<=0,onClick:u}),n.jsx(An,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:d,onChange:g=>h(g),size:40})]})}function Ho(e,t,a,r=!0){const s=new Date(a.getFullYear(),a.getMonth(),a.getDate());return Array.from({length:7},(l,i)=>{const u=new Date(t);u.setDate(t.getDate()+i);const c=(e[zo(u)]?.daily??[])[u.getDate()-1],d=c!=null&&Ln(c,r)||u>s;return{dt:u,entry:c,isFuture:d}})}function Ov(e,t,a,r=!0){const{period:s,monthRange:l,weekRange:i,weekRanges:u,DOW:c}=t,d=ua(),h=d.getFullYear(),p=d.getMonth()+1,m=d.getDate();if(s==="month"){const C=e[l]??{weekly:[],daily:[]},b=fa(l),v=b?b.year:null,f=b?b.month1:null,B=v&&f?Nn(v,f-1):1;return C.weekly.map((_,N)=>{const x=N+1;let E=_.label,w=!1,D=!1;if(v&&f){const k=B+N*7,A=new Date(v,f-1,k+6),R=A.getMonth()+1,$=A.getDate(),G=R===f?`${$}`:`${R}/${$}`;E=a("manager.chart.weekRange",{start:k,end:G});const T=new Date(h,p-1,m).getTime();w=T>=new Date(v,f-1,k).getTime()&&T<=A.getTime(),D=v>h||v===h&&(f>p||f===p&&k>m)}return{..._,label:E,sublabel:Su(a,x-1),isToday:w,future:_.future===!0||D||void 0,a:D?-1:_.a,b:D?0:_.b}})}const g=u.find(C=>C.value===i);if(!g)return[];const y=new Date(g.year,g.month-1,Nn(g.year,g.month-1)+g.week*7);return Ho(e,y,d,r).map(({dt:C,entry:b,isFuture:v})=>{const f=C.getMonth()+1,B=C.getDate(),_=C.getFullYear();return{label:f===g.month&&_===g.year?`${B}`:`${f}/${B}`,sublabel:c[C.getDay()]??"",future:v||void 0,a:v?-1:b&&b.a>0?b.a:0,b:v?0:b&&b.b>0?b.b:0,isToday:_===h&&f===p&&B===m,...b?.parts?{parts:v?b.parts.map(()=>0):b.parts}:{},...b?.partsB?{partsB:v?b.partsB.map(()=>0):b.partsB}:{}}})}const zv={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function Wv({focusableBars:e,size:t="medium",barWidth:a,titleKey:r,titleLevel:s,data:l,colorA:i,colorB:u,labelAKey:c,labelBKey:d,showTotal:h=!1,totalUnitKey:p,totalLabelKey:m,control:g,hideControls:y=!1,rate:C=!1,rateAgg:b="dayMean",tightMax:v=!1,avgMode:f=!1,totalFormat:B,series:_,seriesMode:N="stack",loading:x=!1,onDetail:E,headExtra:w,headSegment:D,icon:k,disc:A,onClick:R,cardAriaLabel:$,cardTooltip:G,detailSize:T=32,barGap:P,baseline:L,className:Q,inGrid:Z=!1}){const{t:F}=_e.useTranslation(),K=zv[t],M=ju(l),q=g??M,Y=o.useMemo(()=>Ov(l,q,F,L==null),[l,q,F,L]),U=N==="group"&&!!_&&_.length>0;P!=null&&!U&&At("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(!C)return Y;const ee=q.period==="month"?fa(q.monthRange):null,V=ua(),ne=_?.length??0,W=H=>{const ie=[],Te=[],ye=[];for(let he=0;he<ne;he++){let Se=0,$e=0,Ne=0;for(const ue of H){const xe=Nt(ue.a[he]),ke=Nt(ue.b[he]);ke<=0||(Se+=xe,$e+=ke,Ne+=xe/ke*100)}ie.push(b==="weighted"?$e>0?Math.round(Se/$e*100):0:H.length?Math.round(Ne/H.length):0),Te.push(Se),ye.push($e)}return{pct:ie,ra:Te,rb:ye}};return Y.map((H,ie)=>{let Te=H.a===-1?-1:H.b>0?Math.round(H.a/H.b*100):0;if(ee&&!Ln(H)){const he=ee.year,Se=ee.month1-1,$e=Ho(l,new Date(he,Se,Nn(he,Se)+ie*7),V).filter(Ne=>!Ne.isFuture);if(b==="weighted"){let Ne=0,ue=0;for(const{entry:xe}of $e)xe&&xe.b>0&&(Ne+=xe.a,ue+=xe.b);Te=ue>0?Math.round(Ne/ue*100):0}else Te=$e.length?Math.round($e.reduce((Ne,{entry:ue})=>Ne+(ue&&ue.b>0?ue.a/ue.b*100:0),0)/$e.length):0}let ye=null;if(U&&!Ln(H)){let he;if(ee){const $e=ee.year,Ne=ee.month1-1;he=Ho(l,new Date($e,Ne,Nn($e,Ne)+ie*7),V).filter(ue=>!ue.isFuture).map(({entry:ue})=>({a:ue?.parts??[],b:ue?.partsB??[]}))}else he=[{a:H.parts??[],b:H.partsB??[]}];const Se=W(he);ye={parts:Se.pct,rawParts:Se.ra,rawPartsB:Se.rb}}return{...H,a:Te,b:H.a===-1?0:d&&H.parts&&H.parts[1]>0?Math.round(H.parts[0]/H.parts[1]*100):0,rawA:H.a===-1?-1:H.a,rawB:H.b,...ye??{}}})},[Y,C,b,d,q.period,q.monthRange,l,U,_?.length]),I=o.useMemo(()=>{if(C||f){const V=(q.period==="week"?Y:l[q.monthRange]?.daily??[]).filter(W=>W.a!==-1);if(V.length===0)return 0;if(C&&b==="weighted"){let W=0,H=0;for(const ie of V)ie.b>0&&(W+=ie.a,H+=ie.b);return H>0?Math.round(W/H*100):0}const ne=C?V.reduce((W,H)=>W+(H.b>0?H.a/H.b*100:0),0):V.reduce((W,H)=>W+(H.a>0?H.a:0),0);return Math.round(ne/V.length)}const ee=q.period==="month"?l[q.monthRange]?.daily??[]:S;return L!=null?ee.reduce((V,ne)=>V+(Ln(ne,!1)?0:Nt(ne.a)+(d?Nt(ne.b):0)),0):ee.reduce((V,ne)=>V+(ne.a>0?ne.a:0)+(d&&ne.b>0?ne.b:0),0)},[S,Y,C,b,f,L,d,q.period,q.monthRange,l]),O=_&&_.length>0?_.map(ee=>({color:ee.color,label:ee.label})):[{color:i,label:F(c)},...d?[{color:u,label:F(d)}]:[]],z=t==="small",se=[z?"chart-section--compact":t==="large"?"chart-section--full":void 0,Q].filter(Boolean).join(" ")||void 0,te=r?F(r):"",de=te?F("trainingStatus.detailFor",{name:te,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):F("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Oo,{className:se,inGrid:Z,icon:k,disc:A,onClick:R,ariaLabel:$,tooltip:G,headSegment:D,headMenuItems:E?[{label:de,icon:"list",onClick:E,closeOnSelect:!0}]:void 0,title:F(r),titleLevel:s,titleClassName:z?"h5 chart-section-title--small":void 0,headRight:z?w??void 0:({collapsed:ee})=>n.jsxs(n.Fragment,{children:[!y&&n.jsx(Tu,{control:q}),w,E&&!ee&&n.jsx("span",{className:le("bar-chart__detail-btn"),children:n.jsx(be,{htmlType:"button",size:T,type:"dot",icon:"list",ariaLabel:de,showTooltipInfo:de,onClick:E})})]}),subRow:n.jsxs(n.Fragment,{children:[h?C||f||m&&B?n.jsx(Ja,{label:z?void 0:`${F(q.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${F(m??c)}`,children:B?(B(I).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((ee,V)=>/\d/.test(ee)?n.jsx("span",{className:le("chart-section__total__num h0"),children:ee},V):n.jsx("span",{className:le("chart-section__total__unit h5"),children:ee},V)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:le("chart-section__total__num h0"),children:I}),p&&n.jsx("span",{className:le("chart-section__total__unit h5"),children:F(p)})]})}):n.jsxs(Ja,{children:[n.jsx("span",{className:le("chart-section__total__num h0"),children:I}),n.jsx("span",{className:le("chart-section__total__unit h5"),children:F(c)}),p&&n.jsx("span",{className:le("chart-section__total__unit h5"),children:F(p)})]}):n.jsx("span",{}),n.jsx(Fo,{items:O,className:"caption-1"})]}),children:x?n.jsx("div",{className:le("bar-chart__wrap bar-chart__loading"),"aria-busy":"true",children:n.jsx("div",{className:le("bar-chart__inner"),children:n.jsxs("div",{className:le("bar-chart__area bar-chart__area--loading"),children:[n.jsx("div",{className:le("bar-chart__plot bar-chart__plot--loading"),style:{height:K.height},children:n.jsx(da,{size:32})}),n.jsx("div",{className:le("bar-chart__x-axis"),"aria-hidden":"true",children:n.jsxs("span",{className:le("bar-chart__x-axis__label"),children:[n.jsx("span",{className:le("caption-1 bar-chart__x-axis__main"),children:"\xA0"}),S.some(ee=>!!ee.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(Fv,{focusableBars:e,data:S,colorA:i,colorB:d?u:void 0,labelA:F(c),labelB:d?F(d):void 0,barWidth:a??K.barWidth,barGap:P,baseline:L,height:K.height,maxOverride:C?100:void 0,tightMax:v,seriesColors:_?.map(ee=>ee.color),seriesLabels:_?.map(ee=>ee.label),rateLabels:C?{total:F("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:F("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:U})})}const Mu=120,Hv={left:38,right:16,top:26,bottom:24};function Vv({points:e=[],range:t,ticks:a=[],axisTitle:r,color:s,height:l=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:d,className:h}){const[p,m]=o.useState(null),[g,y]=o.useState(null);o.useEffect(()=>{if(!g)return;const L=Z=>m(Math.round(Z)||null);if(L(g.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const Q=new ResizeObserver(([Z])=>L(Z.contentRect.width));return Q.observe(g),()=>{Q.disconnect()}},[g]);const{payload:C,anchorRect:b,openAfterDelay:v,close:f}=Oy(Mu),B=o.useCallback((L,Q)=>{L&&v(L,Q.getBoundingClientRect())},[v]),_=p??i,N=l,{left:x,right:E,top:w,bottom:D}={...Hv,...u},[k,A]=t,R=L=>A===k?x:x+(_-x-E)*(L-k)/(A-k),$=L=>w+(N-w-D)*(100-L)/100,G={x:R,y:$,plot:{left:x,right:_-E,top:w,bottom:N-D,width:Math.max(0,_-x-E),height:Math.max(0,N-w-D)}},T=e.filter(L=>!L.hollow),P=s??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:y,className:we("line-chart",h),viewBox:`0 0 ${_} ${N}`,role:"img","aria-label":d??e.map(L=>L.description).filter(Boolean).join(", "),children:[r&&n.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:r}),[0,100].map(L=>n.jsxs("g",{children:[n.jsx("line",{className:"line-chart__grid",x1:x,x2:_-E,y1:$(L),y2:$(L)}),n.jsxs("text",{className:"line-chart__tick",x:x-6,y:$(L)+4,textAnchor:"end",children:[L,"%"]})]},L)),c?.(G),a.map(L=>n.jsx("text",{className:"line-chart__tick",x:R(L.x),y:N-5,textAnchor:"middle",children:L.label},L.x)),T.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:P,points:T.map(L=>`${R(L.x)},${$(L.pct)}`).join(" ")}),e.map(L=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:Q=>B(L.description,Q.currentTarget),onPointerLeave:f,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:R(L.x),cy:$(L.pct),r:12}),n.jsx("circle",{className:we("line-chart__dot-main",L.hollow&&"is-hollow"),cx:R(L.x),cy:$(L.pct),r:4,stroke:P,fill:L.hollow?void 0:P})]},L.x))]}),C!=null&&n.jsx(vn,{anchorRect:b,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:C,children:C})]})}function qv({icon:e,iconSize:t=56,title:a,titleClass:r="h2",description:s,tipGroups:l,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}),s!=null&&n.jsx("p",{className:"game-intro__description body-3",children:s}),l?.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((h,p)=>n.jsxs("span",{className:"game-intro__tip body-3",children:[h.icon!=null&&n.jsx("span",{"aria-hidden":"true",children:h.icon}),n.jsx("span",{children:h.text})]},p))]},d)),i&&n.jsx(be,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const Lu=(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")}`},$u=(e,t,a,r)=>({from:Vl(e,t,a),to:new Date(Vl(e,t,a+r).getTime()-1),fromYmd:Lu(e,t,a),toYmd:Lu(e,t,a+r-1)});function Uv(e,t=0){if(e.period==="month"){const s=fa(e.monthRange),l=ua(),i=s?s.year:l.getFullYear(),u=(s?s.month1:l.getMonth()+1)-1+t,c=new Date(Date.UTC(i,u+1,0)).getUTCDate();return $u(i,u,1,c)}const a=e.weekRanges.find(s=>s.value===e.weekRange);if(!a){const s=new Date,l=Ra();return{from:s,to:s,fromYmd:l,toYmd:l}}const r=Nn(a.year,a.month-1);return $u(a.year,a.month-1,r+(a.week+t)*7,7)}const Vo={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function Ru(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Pu({done:e,total:t,segments:a,color:r="var(--color-main)",size:s="medium",strokeWidth:l,label:i="%",hideCenter:u=!1,hideLabel:c=!1}){const d=typeof s=="number"?s:Vo[s].diameter,h=l??(typeof s=="number"?12:Vo[s].strokeWidth),p=d/2,m=(d-h)/2,g=2*Math.PI*m;if(a&&a.length>0){const v=a.reduce((f,B)=>{const _=f.length>0?f[f.length-1].acc:0,N=Number.isFinite(B.ratio)?B.ratio:0,x=Math.max(0,Math.min(N,1-_));return f.push({color:B.color,rotate:-90+_*360,dash:g*x,acc:_+x}),f},[]);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:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),v.map((f,B)=>f.dash>0&&n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:f.color,strokeWidth:h,strokeDasharray:`${f.dash} ${g}`,strokeLinecap:"round",transform:`rotate(${f.rotate} ${p} ${p})`},B))]})})}const y=(t??0)>0?Math.min((e??0)/t,1):0,C=g*y,b=g-C;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:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),y>0&&n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:r,strokeWidth:h,strokeDasharray:`${C} ${b}`,strokeLinecap:y<.02||y>.98?"butt":"round",transform:`rotate(-90 ${p} ${p})`})]}),!u&&n.jsxs("div",{className:`ring-chart__center${c?"":` ${d<=96?"ring-chart__center--small":s==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${d<=96?"h2":"h1"}`,children:Ru(y)}),!c&&n.jsx("span",{className:`ring-chart__label ${d<=96?"caption-2":"caption-1"}${d<=96||s==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function Gv({titleKey:e,titleLevel:t,headRight:a,icon:r,showTotal:s,totalLabelKey:l,legend:i,loading:u,className:c,inGrid:d=!1,onClick:h,ariaLabel:p,tooltip:m,...g}){const{t:y}=_e.useTranslation();if(!e)return n.jsx(Pu,{...g});const C=(g.total??0)>0?Ru(Math.min((g.done??0)/g.total,1)):0,b=g.size==="small",v=typeof g.size=="number"?g.size:Vo[g.size??"medium"].diameter,f=g.size==="large",B=[c,b?"chart-section--compact":f?"chart-section--full":""].filter(Boolean).join(" ")||void 0,_=r&&n.jsx("span",{className:le("chart-section-icon"),children:n.jsx(nt,{icon:r,className:le("chart-section-icon-inner")})});return n.jsx(Oo,{className:B,inGrid:d,onClick:h,ariaLabel:p,tooltip:m,title:y(e),titleLevel:t,titleClassName:b?"h5 chart-section-title--small":void 0,headRight:_||(b?void 0:a),subRow:(s||i)&&n.jsxs(n.Fragment,{children:[s?n.jsxs(Ja,{label:!b&&l?y(l):void 0,children:[n.jsx("span",{className:le("chart-section__total__num h0"),children:C}),n.jsx("span",{className:le("chart-section__total__unit h5"),children:"%"})]}):n.jsx("span",{}),i&&n.jsx(Fo,{items:i})]}),children:u?n.jsx("div",{className:le("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx("div",{className:"ring-chart ring-chart--loading",style:{width:v,height:v},"aria-busy":"true",children:n.jsx(da,{size:32})})}):n.jsx("div",{className:le("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx(Pu,{...g,hideCenter:g.hideCenter??b})})})}function Kv({label:e,value:t,change:a,changeType:r,icon:s,tooltip:l,onClick:i,children:u}){const c=o.useRef(null),{anchorRect:d,openAt:h,close:p}=Fa(),m=o.useCallback(()=>{l&&c.current&&h(c.current)},[l,h]),g=r??(a===void 0?void 0:a>0?"up":a<0?"down":"neutral"),y=a===void 0?void 0:a>0?`+${a}`:`${a}`,C=o.useCallback(b=>{i&&(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),i())},[i]);return n.jsxs("div",{ref:c,className:le(`stat-chart__card${i?" stat-chart__card--clickable":""}`),onClick:i,onKeyDown:i?C:void 0,onPointerEnter:m,onPointerLeave:p,onFocus:m,onBlur:p,role:i?"button":void 0,tabIndex:i?0:void 0,"aria-label":i?[e,t,y].filter(b=>b!==void 0&&b!=="").join(" "):void 0,children:[l&&d&&n.jsx(Sn,{anchorRect:{left:d.left,top:d.top+21,right:d.right,bottom:d.bottom,width:d.width,height:d.height},text:l}),n.jsxs("div",{className:le("stat-chart__card__label-row"),children:[n.jsx("span",{className:le("stat-chart__card__label h5"),children:e}),s&&n.jsx("span",{className:le("stat-chart__card__icon"),children:n.jsx(nt,{icon:s,className:le("stat-chart__card__icon-inner")})})]}),n.jsxs("div",{className:le("stat-chart__card__content"),children:[n.jsxs("div",{className:le("stat-chart__card__left"),children:[n.jsx("div",{className:le("stat-chart__card__value h2"),children:t}),y&&n.jsx("div",{className:le(`stat-chart__card__change stat-chart__card__change--${g??"neutral"} caption-1`),children:y})]}),u&&n.jsx("div",{className:le("stat-chart__card__body"),children:u})]})]})}function Iu({value:e,onChange:t,min:a=0,max:r=100,step:s=1,orientation:l="horizontal",size:i=24,disabled:u=!1,ariaLabel:c,length:d,className:h,label:p,formatValue:m,labelPos:g,labelAlign:y="right",showMinMax:C=!1,minLabel:b,maxLabel:v,showBgTick:f=!1,showFillTick:B=!1,tickStep:_,tickShape:N="dot"}){t&&!c&&At("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 x=Math.min(r,Math.max(a,e)),E=r>a?(x-a)/(r-a):0,w=l==="vertical",D=!t,k=Y=>t?.(Number(Y.target.value)),A=typeof d=="number"?`${d}px`:d,R={"--slider-ratio":String(E),"--slider-thumb":`${i}px`,...A?w?{height:A}:{width:A}:{}},$=_??s,G=(f||B)&&$>0&&r>a?Math.floor((r-a)/$+1e-6):0;if(G>0&&G<=100){const Y=N!=="dash",U=se=>Y?`radial-gradient(circle, ${se} 0.5px, transparent 1px)`:w?`linear-gradient(to bottom, transparent calc(50% - 2px), ${se} calc(50% - 2px), ${se} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${se} calc(50% - 2px), ${se} calc(50% + 2px), transparent calc(50% + 2px))`,S=Y?"2px":"4px",I=[],O=[],z=[];for(let se=0;se<=G;se++){const te=se*$/(r-a);if(te>1+1e-6)break;const de=`${((w?1-te:te)*100).toFixed(4)}%`,ee=te<=E+1e-6;if(ee?!B:!f)continue;const V=ee?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";I.push(U(V)),O.push(w?`${S} var(--slider-thumb)`:`var(--slider-thumb) ${S}`),z.push(w?`center ${de}`:`${de} center`)}I.push(w?"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))"),O.push("100% 100%"),z.push("0 0"),R.backgroundImage=I.join(", "),R.backgroundSize=O.join(", "),R.backgroundPosition=z.join(", "),R.backgroundRepeat="no-repeat"}const T=m?m(x):p==="percent"?`${Math.round(r>a?(x-a)/(r-a)*100:0)}%`:p==="count"?`${x} / ${r}`:x===a&&b?b:x===r&&v?v:void 0,P=n.jsx("input",{type:"range",className:we("slider",`slider--${l}`,D&&"slider--static",!p&&!C&&h),min:a,max:r,step:s,value:x,disabled:u,readOnly:D,tabIndex:D?-1:void 0,"aria-label":c,"aria-valuetext":T,"aria-orientation":l,onChange:k,style:R});if(!p&&!C)return P;const L=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:b??a}),Q=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:v??r}),Z=C?n.jsxs("div",{className:we("slider-track-group",`slider-track-group--${l}`,!p&&h),children:[w?Q:L,P,w?L:Q]}):P;if(!p)return Z;const F=g??(w?"bottom":"right"),K=`${Math.round(r>a?(x-a)/(r-a)*100:0)}%`,M=m?m(x):p==="percent"?K:p==="count"?`${x} / ${r}`:String(x),q=n.jsx("span",{className:"slider-wrap__value body-3b",children:M});return n.jsxs("div",{className:we("slider-wrap",`slider-wrap--${l}`,`slider-wrap--label-${F}`,`slider-wrap--align-${y}`,h),children:[Z,q]})}const Yv=.86,Zv=250,qo=(e,t,a,r)=>Math.round(Math.min(r,Math.max(a,e-t))),Uo=(e,t,a,r)=>{const s=qo(e,t,a,r);return`${s<0?"-":"+"}${Math.abs(s)} dB`};function Go({analyser:e,audioElement:t,orientation:a="horizontal",length:r,label:s,labelPos:l,labelAlign:i="right",floorDb:u=-60,refDb:c=-35,displayMin:d=-5,displayMax:h=25,className:p,ariaLabel:m}){const g=o.useRef(null),y=o.useRef(null),C=o.useRef(null),b=o.useRef(null),[v,f]=o.useState(null);o.useEffect(()=>{const x=P=>{const L=Uo(P,c,d,h);C.current&&(C.current.textContent=L);const Q=g.current;Q&&(Q.setAttribute("aria-valuenow",String(qo(P,c,d,h))),Q.setAttribute("aria-valuetext",L))},E=e??V1(t)??(v&&v.el===t?v.node:null),w=y.current;if(!E||!w){w?.style.setProperty("--meter-level","0"),x(u);let P=!1;return!e&&t&&rr(t).then(L=>{!P&&L&&f({el:t,node:L})}),()=>{P=!0}}to();const D=new Float32Array(E.fftSize);let k=0,A=0,R=0,$=0,G=null;const T=P=>{const L=q1(E,D);k=L>k?L:k*Yv;const Q=k>1e-5?20*Math.log10(k):-1/0,Z=Math.max(u,Q),F=Z-c,K=Math.min(1,Math.max(0,(F-d)/(h-d)));if(w.style.setProperty("--meter-level",K.toFixed(3)),A+=Z,R+=1,P-$>=Zv){const M=A/R;G=G==null?M:G*.6+M*.4,x(G),A=0,R=0,$=P}b.current=requestAnimationFrame(T)};return b.current=requestAnimationFrame(T),()=>{b.current!=null&&cancelAnimationFrame(b.current),b.current=null}},[e,t,v,u,c,d,h]);const B=typeof r=="number"?`${r}px`:r,_=n.jsx("div",{className:"audio-meter__track",style:B?a==="vertical"?{height:B}:{width:B}:{},children:n.jsx("div",{ref:y,className:"audio-meter__fill"})}),N=l??(a==="vertical"?"bottom":"right");return n.jsxs("div",{ref:g,className:we("audio-meter",`audio-meter--${a}`,s&&`audio-meter--label-${N}`,s&&`audio-meter--align-${i}`,p),role:"meter","aria-label":m,"aria-valuemin":d,"aria-valuemax":h,"aria-valuenow":qo(u,c,d,h),"aria-valuetext":Uo(u,c,d,h),children:[_,s&&n.jsx("span",{ref:C,className:"audio-meter__value caption-2",children:Uo(u,c,d,h)})]})}const Fu=260;function Ou({message:e,position:t,duration:a,onClose:r}){const[s,l]=o.useState(!1),[i,u]=o.useState(!1),c=o.useRef(i),d=o.useRef(s);o.useEffect(()=>{c.current=i},[i]),o.useEffect(()=>{d.current=s},[s]);const h=o.useRef(null),p=o.useRef(""),m=o.useRef(r);o.useEffect(()=>{m.current=r});const g=a,y=o.useRef(null),C=o.useRef(0),b=o.useRef(0),v=o.useRef(!1),f=o.useRef(null),B=o.useRef(null),_=o.useRef(null),N=o.useRef(null),x=o.useRef(()=>{});x.current=D=>{D<0||(C.current=Date.now(),b.current=D,y.current=setTimeout(()=>{y.current=null,l(!1),f.current=setTimeout(()=>{u(!1);try{m.current()}catch{}},Fu)},D))};const E=o.useCallback(()=>{v.current||!y.current||(v.current=!0,clearTimeout(y.current),y.current=null,b.current=Math.max(0,b.current-(Date.now()-C.current)))},[]),w=o.useCallback(()=>{v.current&&(v.current=!1,x.current(b.current))},[]);return o.useEffect(()=>{if(e!==p.current&&(y.current&&(clearTimeout(y.current),y.current=null),f.current&&(clearTimeout(f.current),f.current=null)),e){if(d.current)return g>0&&!y.current&&(v.current?b.current=g:x.current(g)),p.current=e,()=>{y.current&&(clearTimeout(y.current),y.current=null),f.current&&(clearTimeout(f.current),f.current=null)};const D=()=>{const k=h.current;if(k)try{k.classList.remove("is-visible"),k.style.transition="none",t==="top"?k.style.transform="translateX(-50%) translateY(-16px)":k.style.transform="translateX(-50%) translateY(16px)",k.style.opacity="0",k.offsetWidth,k.style.transition="",k.classList.add("is-visible"),N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{N.current=null;try{k.style.opacity="",k.style.transform="",k.style.transition=""}catch{}},60)}catch{}};c.current?(D(),l(!0)):(u(!0),B.current=requestAnimationFrame(()=>{_.current=requestAnimationFrame(()=>{D(),l(!0)})})),g>0&&(v.current=!1,x.current(g))}else l(!1),f.current=setTimeout(()=>u(!1),Fu);return p.current=e,()=>{y.current&&clearTimeout(y.current),f.current&&clearTimeout(f.current),B.current&&cancelAnimationFrame(B.current),_.current&&cancelAnimationFrame(_.current),N.current&&clearTimeout(N.current),y.current=null,f.current=null,B.current=null,_.current=null,N.current=null}},[e,g,t]),{mounted:i,showing:s,popupRef:h,pause:E,resume:w}}function ba({message:e="",position:t="top",type:a="normal",onClose:r=()=>{},duration:s=2e3}){const{mounted:l,showing:i,popupRef:u,pause:c,resume:d}=Ou({message:e,position:t,duration:s,onClose:r}),h=o.useRef(null),[p,m]=o.useState(!1);if(o.useEffect(()=>{i?m(!0):l||m(!1)},[i,l]),!l)return null;const g=a==="notice"||a==="warning"?a:"normal",y=n.jsx("div",{ref:u,className:`toast toast--${t} ${i?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:C=>{h.current=C.pointerType},onMouseEnter:()=>{h.current!=="touch"&&c()},onMouseLeave:d,onFocusCapture:c,onBlurCapture:d,children:n.jsx("div",{className:`toast__inner toast__inner--${g} body-2`,"aria-hidden":p||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?cn.createPortal(y,document.body):y}const Xv=24;function Jv({value:e,max:t=100,size:a=8,color:r,trackColor:s,label:l,formatValue:i,labelPos:u,labelAlign:c="right",ariaLabel:d,className:h}){const p=Number.isFinite(t)&&t>0?t:1,m=Math.max(0,Math.min(Number.isFinite(e)?e:0,p)),g=m/p*100,y=Number.isFinite(t)&&t>0?t:0,C=u??(a>=Xv?"inside":"bottom"),b=C==="center"?"inside":C,v=b==="inside"&&(c==="left"?g>=15:c==="center"?g>=50:g>=85),f={};return r&&(f["--progress-bar-fill"]=r),s&&(f["--progress-bar-track"]=s),n.jsxs("div",{className:we("progress-bar",`progress-bar--${a}`,`progress-bar--label-${b}`,l&&`progress-bar--align-${c}`,l&&v&&"progress-bar--label-on-fill",h),style:f,children:[n.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":m,"aria-valuemin":0,"aria-valuemax":y,"aria-valuetext":l?i?i(m):l==="percent"?void 0:l==="raw"?String(m):`${m} / ${y}`:void 0,"aria-label":d,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${g}%`}})}),l&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(m):l==="percent"?`${Math.round(g)}%`:l==="raw"?String(m):`${m} / ${y}`})]})}const zu={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},Qv="rgba(255, 255, 255, 0.16)";function Wu({max:e,index:t,inactiveBg:a,inactiveColor:r,transparent:s,variant:l="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=_e.useTranslation(),d=bn("(max-width: 767px)");if(!Number.isInteger(e)||e<=0)return null;const h=Number.isInteger(t)?Math.max(0,Math.min(t,e-1)):0,p=u??c("progress.steps",{current:h+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),m={};if(a&&(m["--pi-inactive-bg"]=a),r&&(m["--pi-inactive-color"]=r),s&&(a||(m["--pi-inactive-bg"]=Qv),r||(m["--pi-inactive-color"]="var(--color-white)")),l==="dot")return n.jsxs("div",{className:"progress-indicator progress-indicator--dot",style:m,role:i?"status":"img","aria-label":i?void 0:p,children:[i&&n.jsx("span",{style:zu,children:p}),Array.from({length:e}).map((y,C)=>n.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${C<h?" done":C===h?" active":""}`},C))]});const g=i?n.jsx("span",{role:"status",style:zu,children:p}):null;return d?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:m,role:"list","aria-label":p,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[h+1," / ",e]})}),g]}):n.jsxs(n.Fragment,{children:[g,n.jsx("div",{className:"progress-indicator",style:m,role:"list","aria-label":p,children:Array.from({length:e}).map((y,C)=>n.jsx("span",{role:"listitem","aria-current":C===h?"step":void 0,className:`progress-indicator-dot ${C<h?" done":C===h?" active":""} body-3`,children:C+1},C))})]})}function e4(e){if(!e)return[];const t=[];let a=0,r="";for(const s of e.trim()){if(s==="("?a++:s===")"&&a--,/\s/.test(s)&&a===0){r&&(t.push(r),r="");continue}r+=s}return r&&t.push(r),t}function t4(e,t,a=0){const r=Array.from({length:Math.max(0,t)},()=>0);for(const s of e){let l=0;for(const i of s){if(l>=r.length)break;const u=Hu(i.span),c=Math.min(u,r.length-l);if(c===1)r[l]=Math.max(r[l],i.width);else{const d=Math.max(0,(i.width-a*(c-1))/c);for(let h=l;h<l+c;h++)r[h]=Math.max(r[h],d)}l+=c}}return r}function Hu(e){const t=typeof e=="number"?e:parseInt(String(e??""),10);return Number.isFinite(t)&&t>=1?Math.floor(t):1}function n4(e,t){const a=/span\s+(\d+)/.exec(`${e??""} ${t??""}`);return a?Hu(parseInt(a[1],10)):1}function a4(e,t){const{isFixed:a,floorOf:r,containerWidth:s}=t,l=e.reduce((p,m,g)=>p+(a(g)?m:0),0),i=e.reduce((p,m,g)=>p+(a(g)?0:m),0),u=s-l;if(!(s>0&&i>0&&u>0))return[...e];const c=u/i,d=e.map((p,m)=>a(m)?p:Math.max(r(m),Math.round(p*c))),h=Math.round(u-d.reduce((p,m,g)=>p+(a(g)?0:m),0));if(h!==0){let p=-1;d.forEach((m,g)=>{!a(g)&&(p<0||m>d[p])&&(p=g)}),p>=0&&(d[p]=Math.max(r(p),d[p]+h))}return d}const r4=16;function o4(e,t=r4){return e.map(a=>{const r=a.sortable&&!a.sorted;return Math.max(a.declaredMin,Math.ceil(a.headWidth+(r?t:0)))})}function s4({children:e,className:t,style:a,span:r,rowLabel:s,onRowClick:l}){const i=r&&r>1?{gridColumn:`span ${r}`,...a}:a;return n.jsx("div",{role:"cell",className:t?`table-cell ${t}`:"table-cell",style:i,"aria-colspan":r&&r>1?r:void 0,children:s&&l?n.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":s,children:e}):e})}function Ko({variant:e="default",children:t,className:a,draggable:r,onClick:s,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:d,colSpan:h,describedBy:p,rowHasButton:m}){const g=o.useCallback(y=>{s&&y.target===y.currentTarget&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),s())},[s]);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":h,className:"table-row__full-cell",children:n.jsx(da,{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":h,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:s,onKeyDown:s?g:void 0,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:s&&!m?0:void 0,"aria-describedby":s&&!m?p:void 0,children:t}),d&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row-expand__cell",children:d})})]})}function l4({dir:e}){return n.jsx(e==="asc"?Js:Xs,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function i4({children:e,onClick:t,className:a,sortDir:r,ariaSort:s,onResizeStart:l}){const i=n.jsxs(n.Fragment,{children:[e,r&&n.jsx(l4,{dir:r})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":s,className:we("table-field body-3",a,r?"table-field--sorted":"",l?"table-field--resizable":""),children:[t?n.jsx("button",{type:"button",className:"table-field__button",children:i}):i,l&&n.jsx("span",{className:"table-field__resizer",onPointerDown:l,onClick:u=>u.stopPropagation(),"aria-hidden":"true"})]})}function Vu(e){return e&&e!=="left"?`table-col--${e}`:void 0}function Yo({fields:e=[],sort:t,sortable:a=!0,headerGroups:r,items:s=[],renderRow:l,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:d,onRowDragStart:h,onRowDragEnd:p,draggingId:m,gridTemplateColumns:g,mobileGridTemplateColumns:y,resizable:C=!0,resizeMode:b="grow",resizeStorageKey:v,size:f="small",title:B,icon:_,count:N,collapsed:x=!1,onToggleCollapse:E,headerActions:w,empty:D,loading:k,dragOver:A=!1,onDragOver:R,onDragLeave:$,onDrop:G,renderExpandedRow:T,expandedId:P}){const{t:L}=_e.useTranslation(),Q=o.useId(),Z=`table-title-${Q}`,F=`table-row-hint-${Q}`,[K,M]=o.useState(null),q=o.useCallback((oe,fe)=>{const Ie=e[fe];if(!Ie)return;if(Ie.sortValue)return Ie.sortValue(oe);if(Ie.sortKey)return oe[Ie.sortKey];const Xe=l(oe)[fe]?.content;return typeof Xe=="string"||typeof Xe=="number"?Xe:void 0},[e,l]),Y=!t&&a&&!e.some(oe=>oe.sortDir!==void 0||oe.onClick),U=o.useCallback(oe=>{const fe=e[oe];if(!fe||fe.sortable===!1)return!1;if(fe.sortValue||fe.sortKey)return!0;const Ie=s[0];return Ie!==void 0&&q(Ie,oe)!==void 0},[e,s,q]),S=o.useMemo(()=>t?e.map(oe=>{if(!oe.sortKey||oe.sortDir!==void 0)return oe;const fe=t.field(String(oe.label??""),oe.sortKey);return{...oe,sortDir:fe.sortDir,onClick:oe.onClick??fe.onClick}}):Y?e.map((oe,fe)=>U(fe)?{...oe,sortDir:K?.index===fe?K.asc?"asc":"desc":null,onClick:()=>M(Ie=>Ie?.index===fe?{index:fe,asc:!Ie.asc}:{index:fe,asc:!0})}:oe):e,[e,t,Y,K,U]),I=o.useMemo(()=>{if(!Y||!K)return s;const{index:oe,asc:fe}=K;return[...s].sort((Ie,Xe)=>hr(q(Ie,oe),q(Xe,oe),fe))},[s,Y,K,q]),O=bn("(max-width: 767px)"),z=y&&O?y:null,se=C&&!O,te=o.useRef(se);te.current=se;const de=48,ee=40,V=o.useRef(()=>de),ne=v?`table-cols:${v}`:null,W=o.useRef(null),H=o.useRef(null),ie=o.useRef(null),Te=o.useRef(null),[ye,he]=o.useState(!1),[Se,$e]=o.useState(0),Ne=o.useCallback(()=>{const oe=ie.current;if(!oe)return;const fe=Te.current,Ie=W.current;if(fe&&(fe.style.minWidth="",Ie)){const Xe=Ie.scrollWidth,et=te.current?ee:0;fe.style.minWidth=Xe>oe.clientWidth+1?`${Xe+et}px`:""}he(oe.scrollWidth>oe.clientWidth+1),$e(oe.clientWidth)},[]),ue=o.useCallback((oe,fe)=>{const Ie=oe.current;Ie&&H.current&&H.current.unobserve(Ie),oe.current=fe,fe?(!H.current&&typeof ResizeObserver<"u"&&(H.current=new ResizeObserver(()=>Ne())),H.current?.observe(fe)):!ie.current&&!Te.current&&(H.current?.disconnect(),H.current=null),Ne()},[Ne]),xe=o.useCallback(oe=>ue(ie,oe),[ue]),ke=o.useCallback(oe=>ue(Te,oe),[ue]);o.useEffect(()=>{Ne()}),o.useEffect(()=>{if(typeof window>"u")return;const oe=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>Ne()):null;return window.addEventListener("resize",Ne),()=>{oe!=null&&cancelAnimationFrame(oe),window.removeEventListener("resize",Ne)}},[Ne]);const Ee=o.useRef(()=>!1),We=o.useRef([]),He=o.useRef(null),ot=oe=>{if(!oe||typeof window>"u")return null;try{const fe=JSON.parse(window.localStorage.getItem(oe)??"null");return Array.isArray(fe)&&fe.length>0&&fe.every(Ie=>typeof Ie=="number"&&Number.isFinite(Ie)&&Ie>0)?fe:null}catch{return null}},[Qe,Je]=o.useState(()=>ot(ne)),[vt,je]=o.useState(ne),[Ye,Be]=o.useState(()=>ot(ne)!==null);if(vt!==ne){je(ne);const oe=ot(ne);Je(oe),Be(oe!==null)}const Ue=o.useRef(Qe);o.useEffect(()=>{Ue.current=Qe},[Qe]);const qe=o.useCallback(oe=>{const fe=He.current;if(!fe)return;const Ie=Ue.current;if(Ie){const Xe=[...Ie],et=()=>de;if(fe.next!=null&&fe.startWNext!=null){const rt=oe.clientX-fe.startX,$t=Math.max(et()-fe.startW,Math.min(fe.startWNext-et(),rt));Xe[fe.index]=fe.startW+$t,Xe[fe.next]=fe.startWNext-$t}else Xe[fe.index]=Math.max(et(),fe.startW+(oe.clientX-fe.startX));Ue.current=Xe,Je(Xe)}},[]),pt=o.useCallback(()=>{if(He.current=null,window.removeEventListener("pointermove",qe),window.removeEventListener("pointerup",pt),window.removeEventListener("pointercancel",pt),document.body.style.cursor="",document.body.style.userSelect="",ne&&Ue.current)try{window.localStorage.setItem(ne,JSON.stringify(Ue.current))}catch{}},[qe,ne]),_t=o.useCallback((oe,fe)=>{fe.preventDefault(),fe.stopPropagation();const Ie=W.current;if(!Ie)return;const Xe=Array.from(Ie.children).map(rt=>rt.getBoundingClientRect().width),et=b==="fit"?S.findIndex((rt,$t)=>$t>oe&&rt.resizable!==!1):-1;He.current=et>=0?{index:oe,startX:fe.clientX,startW:Xe[oe],next:et,startWNext:Xe[et]}:{index:oe,startX:fe.clientX,startW:Xe[oe]},Ue.current=Xe,Je(Xe),Be(!0),window.addEventListener("pointermove",qe),window.addEventListener("pointerup",pt),window.addEventListener("pointercancel",pt),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[qe,pt,b,S]),Et=o.useCallback(()=>{const oe=W.current,fe=oe?.closest(".table-wrap");if(!oe||!fe)return null;const Ie=fe.style.getPropertyValue("--table-grid-cols");fe.style.setProperty("--table-grid-cols",S.map(()=>"max-content").join(" "));const Xe=Array.from(fe.querySelectorAll(".table-row")).filter(St=>!St.classList.contains("table-row--loading")&&!St.classList.contains("table-row--empty")),et=St=>Array.from(St.children).map(Pt=>{const Ht=window.getComputedStyle(Pt);return{width:Pt.getBoundingClientRect().width,span:n4(Ht.gridColumnStart,Ht.gridColumnEnd)}}),rt=parseFloat(window.getComputedStyle(oe).columnGap)||0,$t=Xe.map(et),xn=et(oe),sn=t4([xn,...$t],S.length,rt),Rt=o4(S.map((St,Pt)=>({declaredMin:V.current(Pt),headWidth:xn[Pt]?.width??0,sortable:St.sortDir!==void 0||!!St.onClick,sorted:!!St.sortDir}))),zt=St=>Rt[St]??V.current(St),ln=S.map((St,Pt)=>{const Ht=sn[Pt],Yt=Ee.current(Pt)?parseFloat(We.current[Pt]):NaN;return Number.isFinite(Yt)&&Math.ceil(Ht)>Yt&&At(`table-fixed-col-overflow:${Pt}:${Yt}`,`[ihabdevteam-core] Table \uC758 ${Pt+1}\uBC88\uC9F8 \uC5F4\uC744 ${Yt}px \uB85C \uC815\uD574 \uB450\uC5C8\uB294\uB370 \uC548\uC758 \uB0B4\uC6A9\uC740 ${Math.ceil(Ht)}px \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4 \u2014 \uADF8\uB9CC\uD07C \uC798\uB824 \uB098\uAC11\uB2C8\uB2E4. gridTemplateColumns(\uB610\uB294 fields[].width)\uC758 \uADF8 \uC5F4\uC744 ${Math.ceil(Ht)}px \uC774\uC0C1\uC73C\uB85C \uB298\uB9AC\uC138\uC694.`),Number.isFinite(Yt)?Yt:Math.max(V.current(Pt),Math.ceil(Ht))}),It=window.getComputedStyle(oe),wn=(parseFloat(It.paddingLeft)||0)+(parseFloat(It.paddingRight)||0),Qt=fe.clientWidth-wn;return Ie?fe.style.setProperty("--table-grid-cols",Ie):fe.style.removeProperty("--table-grid-cols"),a4(ln,{isFixed:St=>Ee.current(St),floorOf:zt,containerWidth:Qt})},[S,b]),wt=(oe,fe)=>oe!==null&&oe.length===fe.length&&oe.every((Ie,Xe)=>Ie===fe[Xe]),st=o.useRef(Et);o.useEffect(()=>{st.current=Et});const[tt,Bt]=o.useState(0),kt=I.length>0,Tt=`${ne??""}|${tt}|${S.length}|${Se}`,Lt=!Ye&&se&&ne!==null&&!k?`${Tt}|${kt?1:0}`:null,gt=o.useRef(null);o.useEffect(()=>{if(Lt===null||!kt||gt.current===Tt)return;const oe=st.current();oe&&(gt.current=Tt,Je(fe=>wt(fe,oe)?fe:oe))},[Lt]);const it=o.useCallback(()=>{if(ne)try{window.localStorage.removeItem(ne)}catch{}Be(!1);const oe=st.current();Je(oe),Ue.current=oe,Bt(fe=>fe+1)},[ne]);o.useEffect(()=>()=>{He.current&&(window.removeEventListener("pointermove",qe),window.removeEventListener("pointerup",pt),window.removeEventListener("pointercancel",pt),document.body.style.cursor="",document.body.style.userSelect="")},[qe,pt]);const ut=S.length>0&&S.every(oe=>oe.width!=null)?S.map(oe=>typeof oe.width=="number"?`${oe.width}px`:String(oe.width)).join(" "):null;S.some(oe=>oe.width!=null)&&!ut&&At(`table-field-width:${S.map(oe=>oe.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."),ut&&g&&At("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 ct=g??ut??void 0,ve=e4(ct),Me=ve.filter(oe=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(oe));Me.length>0&&At(`table-content-track:${g}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${Me.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: ${g})`);const Pe=S.findIndex(oe=>!!oe.sortDir);S.filter(oe=>!!oe.sortDir).length>1&&At("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 Oe=oe=>oe===Pe?S[oe].sortDir==="asc"?"ascending":"descending":S[oe].onClick?"none":void 0,dt=oe=>/^\d+(\.\d+)?px$/.test(ve[oe]??""),Dt=oe=>{const fe=ve[oe]??"",Ie=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(fe)??/^(\d+(?:\.\d+)?)px$/.exec(fe);return Ie?parseFloat(Ie[1]):de};Ee.current=dt,V.current=Dt,We.current=ve;const yt=oe=>b==="fit"&&!dt(oe)?"fr":"px",xt=Qe&&Qe.length===S.length&&!O,Ct=z??(xt?S.map((oe,fe)=>oe.resizable===!1&&ve[fe]?ve[fe]:`${Qe[fe]}${yt(fe)}`).join(" "):ct),Le=Ct?{"--table-grid-cols":Ct}:void 0,at=B!==void 0;return n.jsxs("div",{ref:xe,className:`table-wrap table-wrap--${f}${se?" table-wrap--resizable":""}${A?" table-wrap--dragover":""}${x?" table-wrap--collapsed":""}`,style:Le,onDragOver:R,onDragLeave:$,onDrop:G,tabIndex:ye?0:void 0,role:ye?"region":void 0,"aria-label":ye?typeof B=="string"?B:L("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:F,className:"table-row-hint",children:L("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:ke,role:"table","aria-labelledby":at&&typeof B=="string"?Z:void 0,className:"table body-2",children:[at&&n.jsxs("div",{className:we("table-header",E&&"table-header--clickable"),onClick:E,role:"caption",children:[E&&n.jsx(be,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:x?"chevron-right":"chevron-down",ariaLabel:x?L("common.expand","\uD3BC\uCE58\uAE30"):L("common.collapse","\uC811\uAE30"),ariaExpanded:!x,className:"table-header__chevron"}),_&&n.jsx(nt,{icon:_,label:typeof B=="string"?B:void 0,className:"table-header__icon"}),n.jsx("span",{id:Z,className:"table-header__title h5b",children:B}),N!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:N}),w&&n.jsx("span",{className:"table-header__actions",onClick:oe=>oe.stopPropagation(),children:w})]}),!x&&n.jsxs(n.Fragment,{children:[r&&r.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:r.map((oe,fe)=>n.jsx("div",{role:"columnheader","aria-colspan":oe.span,className:we("table-field body-3",oe.className),style:{gridColumn:`span ${oe.span}`},children:oe.label},fe))}),n.jsxs("div",{role:"presentation",className:we("table-fields-strip",se&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:W,children:S.map((oe,fe)=>n.jsx(i4,{onClick:oe.onClick,className:we(oe.className,Vu(oe.align)),sortDir:oe.sortDir,ariaSort:Oe(fe),onResizeStart:se&&fe<S.length-1&&oe.resizable!==!1&&(b!=="fit"||S.some((Ie,Xe)=>Xe>fe&&Ie.resizable!==!1))?Ie=>_t(fe,Ie):void 0,children:oe.label},fe))}),se&&n.jsx("div",{className:"table-fields__reset-dock",children:n.jsx(be,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:L("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:L("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:it})})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:k?n.jsx(Ko,{variant:"loading",colSpan:S.length||void 0}):I.length===0&&D?n.jsx(Ko,{variant:"empty",colSpan:S.length||void 0,children:D}):I.map((oe,fe)=>{const Ie=m!=null&&oe.id===m,Xe=!!i&&(u?u(oe):!0),et=P!=null&&oe.id!=null&&(P instanceof Set?P.has(oe.id)||[...P].some(rt=>String(rt)===String(oe.id)):String(oe.id)===String(P));return n.jsx(Ko,{className:`${Xe?" table-row--clickable":""}${h?" table-row--draggable":""}${Ie?" table-row--dragging":""}`.trim(),draggable:!!h,onClick:Xe?()=>i(oe):void 0,colSpan:S.length||void 0,rowHasButton:l(oe).some(rt=>!!rt.rowLabel),describedBy:F,onMouseEnter:c?rt=>c(oe,rt):void 0,onMouseLeave:d?rt=>d(oe,rt):void 0,onDragStart:h?rt=>h(oe,rt):void 0,onDragEnd:p?rt=>p(oe,rt):void 0,expandedContent:et&&T?T(oe):void 0,children:l(oe).map((rt,$t)=>n.jsx(s4,{className:we(rt.className,Vu(S[$t]?.align)),style:rt.style,span:rt.span,rowLabel:Xe?rt.rowLabel:void 0,onRowClick:Xe?()=>i(oe):void 0,children:rt.content},$t))},oe.id!=null?`${typeof oe.id}:${oe.id}`:`__idx:${fe}`)})})]})]})]})}const u4={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function qu(e){return e?u4[e]??null:null}function Uu(e){switch(qu(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Gu(e,t){const a=qu(e);return a?t(`device.type.${a}`,{defaultValue:e??""}):e??""}const ga=e=>e==null?"":String(e).trim();function Zo(e,t,a,r){const s=ga(e),l=ga(t),i=ga(a);if(r&&s&&l&&i){const c=`${s.padStart(4,"0")}-${l.padStart(2,"0")}-${i.padStart(2,"0")}`,d=new Date(c);if(!Number.isNaN(d.getTime())&&d.toISOString().slice(0,10)===c){const h=Wl(c,r);if(h)return h}}const u=[s,l,i];for(;u.length>0&&u[u.length-1]==="";)u.pop();return u.join(".")}function c4(e,t,a){const r=ga(e);return r?`${r}-${ga(t).padStart(2,"0")}-${ga(a).padStart(2,"0")}`:""}function Ku(e,t){return t!=="wornAt"?String(e[t]??""):c4(e.wornYear,e.wornMonth,e.wornDay)}function d4({rows:e,loading:t,onSelect:a,onDelete:r,onWear:s,onRelease:l,onAdd:i}){const{t:u,i18n:c}=_e.useTranslation(),d=b=>b==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:h,field:p}=jy(),m=o.useMemo(()=>{if(!h)return e;const{key:b,asc:v}=h;return[...e].sort((f,B)=>{if(b==="worn"){const _=Number(B.worn)-Number(f.worn);return v?_:-_}return hr(Ku(f,b),Ku(B,b),v)})},[e,h]),{pageRows:g,pageSizeProps:y,paginationProps:C}=Sy(m,h);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(Io,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:y,pagination:C,actions:i&&n.jsx(be,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),n.jsx(Yo,{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:g.map((b,v)=>({id:b.id??`${b.side}-${v}`,row:b})),gridTemplateColumns:`56px 110px 110px minmax(120px, 1fr) 100px minmax(120px, 1fr) 110px${r?" 80px":""}`,renderRow:({row:b})=>[{content:n.jsx("span",{className:"dlp-worn-check",onClick:v=>v.stopPropagation(),children:n.jsx(ku,{checked:b.worn,disabled:b.worn?!l:!s,ariaLabel:b.worn?u("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):u("customers.device.wear","\uCC29\uC6A9"),onChange:v=>{v?s?.(b):l?.(b)}})})},{content:n.jsx("span",{children:d(b.side)})},{content:b.device?n.jsx(jt,{size:"small",variant:Uu(b.device),fill:"soft",label:Gu(b.device,u)}):n.jsx("span",{})},{content:n.jsx("span",{children:b.brand})},{content:n.jsx("span",{children:b.fitType||"-"})},{content:n.jsx("span",{children:b.productName||"-"})},{content:n.jsx("span",{className:"dlp-date",children:Zo(b.wornYear,b.wornMonth,b.wornDay,c.language)||"-"})},...r?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(be,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:u("common.delete","\uC0AD\uC81C"),onClick:v=>{v?.stopPropagation(),r(b)}})})}]:[]],onRowClick:({row:b})=>a(b),empty:u("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function Yu(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 p4(e,t){return new Date(e,t+1,0).getDate()}function h4(e,t){return new Date(e,t,1).getDay()}function m4({visits:e=[],onVisitClick:t,onVisitMove:a,onDayClick:r,today:s}){const{t:l,i18n:i}=_e.useTranslation(),u=o.useMemo(()=>l("calendar.dow",{returnObjects:!0}),[l]),c=lo(s),[d,h]=o.useState(()=>Number(c.slice(0,4))),[p,m]=o.useState(()=>Number(c.slice(5,7))-1),[g,y]=o.useState(null),C=o.useRef(null),b=o.useMemo(()=>{const x={};return e.forEach(E=>{x[E.date]||(x[E.date]=[]),x[E.date].push(E)}),x},[e]),v=o.useMemo(()=>{const x=p4(d,p),E=h4(d,p),w=[];for(let D=0;D<E;D++)w.push(null);for(let D=1;D<=x;D++)w.push(D);for(;w.length<35;)w.push(null);return w},[d,p]),f=o.useCallback(()=>{p===0?(h(x=>x-1),m(11)):m(x=>x-1)},[p]),B=o.useCallback(()=>{p===11?(h(x=>x+1),m(0)):m(x=>x+1)},[p]),_=x=>`${d}-${String(p+1).padStart(2,"0")}-${String(x).padStart(2,"0")}`,N=x=>_(x)===c;return n.jsxs("div",{children:[n.jsxs("div",{className:"calendar-nav",children:[n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:f,"aria-label":l("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(nt,{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(l,i.language,d,p+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:B,"aria-label":l("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(nt,{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:l("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:l("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:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]})]}),n.jsxs("div",{className:"calendar-grid",children:[u.map(x=>n.jsx("div",{className:"calendar-day-header body-3",children:x},x)),v.map((x,E)=>{if(x===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${E}`);const w=x,D=_(w),k=b[D]??[],A=Wl(D,i.language),R=g===D;return n.jsxs("div",{className:`calendar-cell${N(w)?" today":""}${R?" drag-over":""}${r?" calendar-cell--clickable":""}`,role:r?"button":void 0,tabIndex:r?0:void 0,"aria-label":r?l("calendar.addOnDate",{date:D}):void 0,"aria-current":N(w)?"date":void 0,onClick:r?()=>r(D):void 0,onKeyDown:r?$=>{$.target===$.currentTarget&&($.key!=="Enter"&&$.key!==" "||($.preventDefault(),r(D)))}:void 0,onDragOver:a?$=>{$.preventDefault(),y(D)}:void 0,onDragLeave:a?$=>{$.currentTarget.contains($.relatedTarget)||y(null)}:void 0,onDrop:a?$=>{$.preventDefault(),C.current!=null&&(a(C.current,D),C.current=null),y(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:w}),k.length>0&&(()=>{const $=[{key:"visited",label:l("calendar.legend.visited","\uBC29\uBB38"),count:k.filter(T=>(T.status??"visited")==="visited").length},{key:"scheduled",label:l("calendar.legend.scheduled","\uC608\uC57D"),count:k.filter(T=>T.status==="scheduled").length},{key:"noVisit",label:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:k.filter(T=>T.status==="noVisit").length}].filter(T=>T.count>0),G=$.length===1&&$[0].key==="visited"?l("calendar.visitCount",{count:k.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):$.map(T=>l("calendar.statusCount",{label:T.label,count:T.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return n.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${A} ${G}`,children:[$.map(T=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${T.key}`,"aria-hidden":"true"},T.key)),k.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:k.map(($,G)=>n.jsxs("div",{draggable:!!a,className:`calendar-visit-badge${$.status==="noVisit"?" calendar-visit-badge--no-visit":$.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${a?" calendar-visit-badge--draggable":""}`,onDragStart:a?T=>{C.current=$.id,T.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:a?()=>{C.current=null,y(null)}:void 0,onClick:t?T=>{T.stopPropagation(),t($)}:void 0,...Yu(t?()=>t($):void 0),"aria-label":[A,$.time?Gl($.time,l):null,$.customer,l($.status==="noVisit"?"calendar.legend.noVisit":$.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[$.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Gl($.time,l)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:$.customer}),$.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},$.id??G))})]},w)})]})]})}const C4={page:"h3",pagePopup:"h4",popup:"h5"};function ya({type:e="page",title:t,headingLevel:a=2,icon:r,action:s,disc:l,children:i,inGrid:u=!1,className:c,style:d}){const h=C4[e],p=t||l||s||r,m=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(nt,{icon:r,label:typeof t=="string"?t:void 0,className:"section__icon"}),n.jsxs("div",{className:"section__title-group",children:[t&&n.jsx(m,{className:`section__title ${h}`,children:t}),l&&n.jsx("div",{className:"section__disc body-3",children:l})]})]}),s&&n.jsx("div",{className:"section__action",children:s})]}),i]})}let Xo=null,Zu=!1;function Xu(){if(Zu||typeof document>"u")return;Zu=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(Xo="keyboard")},!0);const e=()=>{Xo="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}Xu();function gr(){return Xu(),Xo==="keyboard"}const yr=20;function f4(e){const{t}=_e.useTranslation(),{type:a,trainingDatas:r,depth:s,renderPopup:l,completedIds:i,selectedIds:u,onItemComplete:c,size:d,useDescriptionTooltip:h,onRemove:p,onMore:m,sectionType:g="page"}=e||{},[,y]=o.useState(0),C=typeof r<"u"?Array.isArray(r)?r:[]:[],b=C.length,[v,f]=o.useState(Math.min(b,yr)),B=o.useMemo(()=>Array.isArray(s)?[...s,a?.label].filter(Boolean).join(" \xB7 "):[s||"",a?.label].filter(Boolean).join(" \xB7 "),[s,a?.label]);o.useEffect(()=>{f(Math.min(b,yr))},[b]),Ii("speechear.data.updated",()=>y(E=>E+1));const _=o.useRef(null),N=o.useRef(null);function x(){const E=document.activeElement;N.current=gr()&&E&&E.closest?.(".training-block__more")?v:null,f(w=>Math.min(b,w+yr))}return o.useEffect(()=>{const E=N.current;if(E==null)return;N.current=null;const w=document.activeElement;w&&w!==document.body||_.current?.querySelectorAll(".training-block-button")[E]?.focus()},[v]),n.jsxs(ya,{type:g,title:a?.label,icon:a?.icon,disc:a?.desc,className:"training-block",children:[n.jsx("div",{className:"training-list",ref:_,children:(C||[]).slice(0,v).map((E,w)=>{const D=E;return n.jsx(Lo,{index:w,type:a,trainingData:D,depth:B,renderPopup:l,completedIds:i,selectedIds:u,size:d,useDescriptionTooltip:h,onRemove:typeof p=="function"&&u!=null&&D?.id!=null&&u.has(String(D.id))?()=>p(D):void 0,onComplete:typeof c=="function"&&D?.id!=null?()=>c(String(D.id)):void 0,onMore:typeof m=="function"?k=>m(D,k):void 0},D?.id!=null?`${a?.key||"t"}-${String(D.id)}`:`${a?.key||"t"}-${w}`)})}),b>yr&&v<b&&n.jsx("div",{className:"training-block__more",children:n.jsx(be,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:x,ariaLabel:t("common.loadMore","\uB354\uBCF4\uAE30"),label:t("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function b4(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 g4({gap:e=10,count:t,className:a,children:r}){const s=o.useRef(null),[l,i]=o.useState({width:0,card:0}),u=t??b4(r);o.useLayoutEffect(()=>{const m=s.current;if(!m)return;const g=()=>{const C=m.style.maxWidth;m.style.maxWidth="none";const b=m.clientWidth;m.style.maxWidth=C;const v=m.firstElementChild?.offsetWidth??0;i(f=>f.width===b&&f.card===v?f:{width:b,card:v})};if(g(),typeof ResizeObserver>"u")return;const y=new ResizeObserver(g);return y.observe(m),()=>y.disconnect()},[u,e]);const c=l.card>0?l.card:0,d=c>0?bf(l.width,c,e):0,h=d>0?gf(u,d):0,p={"--block-grid-gap":`${e}px`,...h>0?{"--block-grid-cols":h,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:s,className:we("training-block-grid",h>0&&"training-block-grid--measured",a),style:p,"data-cols":h>0?h:void 0,children:r})}function Jo(e){const t=o.useRef(null),a=o.useRef(e);a.current=e;const[r,s]=o.useState({url:e,loading:!!e,failed:!1}),l=r.url===e?r:{loading:!!e,failed:!1};o.useEffect(()=>{const c=t.current;s({url:e,failed:!1,loading:!!e&&!(c?.complete&&c.naturalWidth>0)})},[e]);const i=o.useCallback(()=>{a.current===e&&s({url:e,loading:!1,failed:!1})},[e]),u=o.useCallback(()=>{a.current===e&&s({url:e,loading:!1,failed:!0})},[e]);return{imgRef:t,loading:l.loading,failed:l.failed,hasImage:!!e&&!l.failed,onLoad:i,onError:u}}var y4='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 v4=y4,Qo=o.forwardRef(function({item:e,disabled:t=!1,onPlayDone:a,selectable:r=!1,selected:s=!1,onSelect:l,flipDelay:i=0,hideLabel:u=!1,hideAudio:c=!1,orderRank:d=null},h){const{t:p}=_e.useTranslation(),m=e.word||e.title||"",g=t||!m,y=e.audio??e.sound??e.audioKey,C=e.subLabel||e.pronunciation||"",b=e.colloquialLabel||"",[v,f]=o.useState({label:m,subLabel:C,colloquialLabel:b,homonum:e.homonum});m&&(v.label!==m||v.subLabel!==C||v.colloquialLabel!==b||!Object.is(v.homonum,e.homonum))&&f({label:m,subLabel:C,colloquialLabel:b,homonum:e.homonum});const B=o.useRef(null),_=bn("(max-width: 767px)"),[N,x]=o.useState(!1),[E,w]=o.useState(!1),D=`${typeof y=="string"?y:y?.src??""}\0${m}`,[k,A]=o.useState({for:"",url:""}),R=k.for===D?k.url:"",$=Fl(),G=e.textOnly??(!e.image&&!!v.label&&!!$&&$.entries.length>0&&!$.byWord.has(v.label)),T=G?"":ia()?.(v.label,v.homonum)??e.image??"",{imgRef:P,loading:L,hasImage:Q,onLoad:Z,onError:F}=Jo(T);o.useEffect(()=>{let z=!1;return(async()=>{if(y){if(typeof y=="string"){if(y.startsWith("http")||y.includes("/")){A({for:D,url:y});return}}else if(typeof y=="object"&&!Array.isArray(y)){const te=y.src;if(te){A({for:D,url:te});return}}}const se=Da();if(se&&m)try{const te=await Promise.resolve(se(m));!z&&te&&A({for:D,url:te})}catch{}})(),()=>{z=!0}},[y,m,D]);const K=o.useRef(!0),M=o.useRef(null);o.useEffect(()=>(K.current=!0,()=>{K.current=!1,M.current&&fr(M.current),M.current=null;try{B.current?.pause()}catch{}B.current=null}),[]);const q=o.useCallback(()=>new Promise(z=>{if(typeof window<"u"&&window.speechSynthesis&&m){x(!0),window.speechSynthesis.cancel();const se=new SpeechSynthesisUtterance(m);se.lang="ko-KR",se.onend=()=>{x(!1);try{a?.()}catch{}z()},se.onerror=()=>{x(!1),z()},window.speechSynthesis.speak(se)}else z()}),[m,a]),Y=o.useCallback(z=>{const se=Ga(z,te=>{if(x(!1),te)try{a?.()}catch{}});return B.current=se.el,se.done},[a]),U=o.useCallback(async()=>{if(t||!K.current)return;const z=()=>{M.current===z&&(M.current=null);try{B.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}x(!1)},se=Ua(z);M.current=z;try{window.speechSynthesis?.cancel()}catch{}try{if(R&&(x(!0),await Y(R)))return;const te=ar();if(te&&m)try{w(!0);const de=await Promise.resolve(te(m));if(!K.current||M.current!==z||(w(!1),de&&(x(!0),await Y(de))))return}catch{}if(!K.current||M.current!==z)return;await q()}finally{M.current===z&&w(!1),se(),M.current===z&&(M.current=null)}},[t,R,m,Y,q]);o.useImperativeHandle(h,()=>({play:()=>U()}),[U]);const S=z=>z.stopPropagation(),I=o.useCallback(z=>{if(z.stopPropagation(),!t){if(N){try{B.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}x(!1);return}U()}},[t,N,U]),O=we("training-word-card",t?"training-word-card--disabled":"",g?"training-word-card--flipped":"",r?"training-word-card--selectable":"",s?"training-word-card--selected":"");return n.jsx("div",{className:O,onClick:r&&!t?l:void 0,role:r?"button":void 0,"aria-pressed":r?s:void 0,tabIndex:r&&!t?0:void 0,"aria-disabled":r&&t?!0:void 0,onKeyDown:r&&!t?z=>{z.target===z.currentTarget&&(z.key==="Enter"||z.key===" "||z.key==="Spacebar")&&(z.preventDefault(),l?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:g?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[s&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:S,children:n.jsx(jt,{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:G?n.jsx("div",{className:"training-word-card__text-face",children:v.label}):Q?n.jsxs(n.Fragment,{children:[L&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:P,className:"training-word-card__image",src:T,alt:v.label||p("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:L?0:1},onLoad:Z,onError:F})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!G&&n.jsx("div",{className:"training-word-card__word",children:v.label}),v.subLabel&&n.jsxs("div",{className:"training-word-card__pronunciation",children:["[",v.subLabel,"]"]}),v.colloquialLabel&&n.jsxs("div",{className:"training-word-card__colloquial caption-1",children:["[",v.colloquialLabel,"]"]})]}),!c&&n.jsx("div",{className:"training-word-card__bottom",onClick:r?S:void 0,children:n.jsx(be,{htmlType:"button",size:_?40:48,type:_?"dot":"bar",icon:N?"pause":"play",label:_?void 0:p("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:N,loading:E,onClick:I,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("${v4}")`}})})]})})}),_4=260;function Hn(e){const{t}=_e.useTranslation(),{title:a,subtitle:r,headerActions:s,headerSegment:l,children:i,buttons:u,footer:c,footerStart:d,footerEnd:h,footerNote:p,footerNoteDivider:m=!1,footerClassName:g="",footerLayout:y="center",onClose:C,closeDisabled:b=!1,beforeClose:v,closeOnBackdrop:f=!0,className:B="",ariaLabel:_,useTitle:N=!0,inline:x=!1,size:E,layer:w="modal",height:D,fillBody:k=!1,resetScrollKey:A}=e||{},[R,$]=o.useState(!1),G=o.useRef(!1),T=o.useRef(null),P=o.useId(),L=o.useRef(null);o.useEffect(()=>{},[x,a,_,B]),o.useEffect(()=>{A!==void 0&&L.current&&(L.current.scrollTop=0)},[A]);const[Q,Z]=o.useState(!1);o.useEffect(()=>{const V=L.current;if(!V)return;const ne=()=>Z(V.scrollHeight>V.clientHeight+1);if(ne(),typeof ResizeObserver>"u")return;const W=new ResizeObserver(ne);W.observe(V);const H=V.firstElementChild;return H&&W.observe(H),()=>W.disconnect()},[i,A]),o.useEffect(()=>{if(!x)return yu()},[x]);const F=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(x)return;const V=F.current,ne=T.current;return fo(ne,V),ne&&!ne.contains(document.activeElement)&&(ne.querySelector(kn)??ne).focus(),()=>{const W=document.activeElement;(!W||W===document.body||ne&&ne.contains(W))&&bo(V)?.focus?.()}},[x]),mo(T,!x);const K=o.useRef(!0),M=go(),q=o.useRef(null);o.useEffect(()=>(K.current=!0,()=>{K.current=!1,q.current&&(clearTimeout(q.current),q.current=null)}),[]);const Y=o.useCallback(()=>{!K.current||!G.current||(G.current=!1,$(!1))},[]),U=o.useCallback((V,ne=!1)=>{if(ne&&!K.current||G.current)return;G.current=!0,$(!0);const W=setTimeout(()=>{q.current===W&&(q.current=null);let H;try{H=V?V():void 0}catch{Y();return}H&&typeof H.then=="function"&&H.then(()=>{setTimeout(Y,120)},Y)},M?0:_4);ne&&(q.current=W)},[Y,M]),S=o.useCallback(()=>{b||v&&v()===!1||U(C,!0)},[U,C,b,v]),I=o.useRef(S);o.useEffect(()=>{I.current=S});const O=!x&&!!C;o.useEffect(()=>{if(O)return Kn(()=>I.current())},[O]);const z=O&&f,se=o.useRef(!1),te=V=>{se.current=V.target===V.currentTarget},de=V=>{const ne=se.current;se.current=!1,ne&&V.target===V.currentTarget&&S()},ee=n.jsx("div",{className:`popup ${x?"popup--inline":""} ${w==="belowPagePopup"?"popup--below-page-popup":""} ${R?"popup--closing":""} ${B}`,onPointerDown:z?te:void 0,onClick:z?de:void 0,onMouseDown:x?void 0:V=>{V.target===V.currentTarget&&V.preventDefault()},children:n.jsxs("div",{ref:T,className:`popup-panel${E?` popup-panel--${E}`:""}${D!=null?" popup-panel--has-height":""}${k?" popup-panel--fill-body":""}`,style:D!=null?{"--popup-height":typeof D=="number"?`${D}px`:D}:void 0,tabIndex:-1,role:x?void 0:"dialog","aria-modal":x?void 0:!0,"aria-labelledby":!x&&N&&a?P:void 0,"aria-label":!x&&!(N&&a)?_??(typeof a=="string"?a:void 0):void 0,children:[!N&&(s||C)?n.jsxs("div",{className:"popup-close-float",children:[s,C&&n.jsx(be,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:S,disabled:b,ariaLabel:t("common.close","\uB2EB\uAE30")})]}):a||s||C?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:P,className:"popup-title popup-title--left h2",children:a}):n.jsx("span",{id:P,className:"popup-title popup-title--left h2"}),r&&n.jsx("span",{className:"popup-subtitle body-3",children:r})]}),l&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(An,{size:40,ariaLabel:l.ariaLabel,options:l.options.map(V=>({key:V.key,label:V.label,disabled:V.disabled})),value:l.value,onChange:l.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[s,C&&n.jsx(be,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:S,disabled:b,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]}):null,n.jsx("div",{className:"popup-content",ref:L,tabIndex:Q?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:U,closeWithAnimation:S}):i})}),p!=null&&p!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${m?" popup-footer-note--divider":""}`,role:"note",children:p}),d||h?n.jsxs("div",{className:`popup-footer popup-footer--bar${g?` ${g}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof d=="function"?d({animateThen:U,closeWithAnimation:S}):d}),n.jsx("div",{className:"popup-footer__end",children:typeof h=="function"?h({animateThen:U,closeWithAnimation:S}):h})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${y!=="center"?` popup-footer--${y}`:""}`,children:u.map((V,ne)=>n.jsx(be,{htmlType:"button",size:48,variant:V.variant??"default",label:V.label,disabled:V.disabled,onClick:()=>V.onClick?.({animateThen:U,closeWithAnimation:S})},ne))}):c?n.jsx("div",{className:`popup-footer${y!=="center"?` popup-footer--${y}`:""}${g?` ${g}`:""}`,children:typeof c=="function"?c({animateThen:U,closeWithAnimation:S}):c}):null]})});return x||typeof document>"u"?ee:cn.createPortal(ee,document.body)}function vr(e){return String(e)}const _r=["o","triangle","x"];function Ju(e,t){return e===t?null:t}const Qu={o:"circle",triangle:"triangle",x:"x"},ec={o:"main",triangle:"warn",x:"danger"};function x4(e){let t=0,a=0,r=0;for(const l of Object.values(e))l==="o"?t++:l==="triangle"?a++:l==="x"&&r++;const s=t+a+r;return{marked:s,o:t,triangle:a,x:r,rate:s===0?null:(t+a*.5)/s}}function es(e){const t={};for(const[a,r]of Object.entries(e))(r==="o"||r==="triangle"||r==="x")&&(t[a]=r);return t}function tc(e){const t=[];let a=0;for(const r of e)t.push(a),a+=r;return t}function w4(e,t){return!t&&e>0}const Qn={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 B4(e="landscape"){At("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}=Qn[e],s=document.createElement("style");s.textContent=`@page { size: ${t}; margin: 0; } .word-table { width: ${a} !important; height: ${r} !important; }`,document.head.appendChild(s);const l=()=>{document.head.removeChild(s),window.removeEventListener("afterprint",l)};window.addEventListener("afterprint",l),window.print()}function k4(e,t){if(e.length===0)return[[]];const a=Math.max(1,Math.floor(t)),r=[];for(let s=0;s<e.length;s+=a)r.push(e.slice(s,s+a));return r}const A4={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},13:{cols:5,rows:3},14:{cols:5,rows:3},15:{cols:5,rows:3},16:{cols:6,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},13:{cols:4,rows:4},14:{cols:4,rows:4},15:{cols:4,rows:4},16:{cols:4,rows:4}}};function nc(e,t){const a=A4[e][t];if(a)return a;const r=Math.max(1,Math.ceil(t)),s=Math.max(1,Math.ceil(Math.sqrt(r*.707)));let l,i;return e==="landscape"?(i=s,l=Math.ceil(r/i)):(l=s,i=Math.ceil(r/l)),(e==="landscape"?l<i:i<l)&&([l,i]=[i,l]),{cols:l,rows:i}}function N4(e,t){const a=nc(e==="landscape"?"portrait":"landscape",t),r=Math.max(1,Math.ceil(t));if(r<=1)return a;const s=Qn[e],l=e==="landscape"?s.width/2:s.width,i=e==="landscape"?s.height:s.height/2,u=(m,g)=>Math.min(l/m/lc,i/g/ic),c=Math.max(0,a.cols*a.rows-r),d=u(a.cols,a.rows);let h=a,p=d;for(let m=1;m<=r;m++){const g=Math.ceil(r/m);if(m*g-r>c)continue;const y=u(m,g);y>p&&(h={cols:m,rows:g},p=y)}return p>d*1.05?h:a}const E4={show:"word-table__content--cut-show",dashed:"",corner:"word-table__content--cut-corner",hide:""},ac={\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"},rc={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},ts={\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"},ns={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function oc(e){return Object.fromEntries(Object.entries(ac).map(([t,a])=>[t,ts[t]?e(`wordTable.pos.${ts[t]}`,{defaultValue:a}):a]))}function sc(e){return Object.fromEntries(Object.entries(rc).map(([t,a])=>[t,ns[t]?e(`wordSearch.filter.type.${ns[t]}`,{defaultValue:a}):a]))}const D4={pos:ts,wordType:ns};function as(e,t){return e?e.split("/").map(a=>t[a]??a).join("/"):""}function rs(e,t,a,r){if(r!=="dashed")return{};const s=e%t,l=Math.floor(e/t),i=s<t-1,u=l<a-1;if(!i&&!u)return{};const c="#ddd",d=g=>`repeating-linear-gradient(to ${g}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,h=[],p=[],m=[];return i&&(h.push(d("bottom")),p.push("1px 100%"),m.push("right center")),u&&(h.push(d("right")),p.push("100% 1px"),m.push("center bottom")),{backgroundImage:h.join(", "),backgroundSize:p.join(", "),backgroundPosition:m.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const lc=280,S4=240,j4=280,ic=400,T4=120,M4=280;function uc(e,t){const a=o.useRef(null),[r,s]=o.useState(1),[l,i]=o.useState(0),u=o.useCallback((c,d)=>{if(!(c>0))return;const h=c/e,p=t&&d>0?d/t:1/0,m=Math.min(1,h,p);s(m),i(Math.max(0,(c-e*m)/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 h=new ResizeObserver(([p])=>u(p.contentRect.width,p.contentRect.height));return h.observe(d),()=>h.disconnect()},[u,t]),{scalerRef:a,scale:r,offset:l}}const L4=24,$4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},R4=400,cc=8;function os({label:e,subLabel:t,colloquialLabel:a,captionLabel:r,captionBadge:s,homonum:l,showWord:i=!0,showImage:u=!0,showPronunciation:c=!0,showColloquial:d=!0,showCaption:h=!0,buttonSize:p=40,wordInfo:m,outerScale:g=1}){const{t:y}=_e.useTranslation(),C=o.useRef(null),b=o.useRef(null),v=o.useRef(null),[f,B]=o.useState(1),[_,N]=o.useState(!1),[x,E]=o.useState(!1),[w,D]=o.useState({for:"",url:""}),[k,A]=o.useState(null),R=t&&t.length>0?t:W1()?.(e,l)??"",$=ia()?.(e,l)??"",{imgRef:G,loading:T,failed:P,onLoad:L,onError:Q}=Jo($),Z=o.useCallback(()=>A(b.current?.getBoundingClientRect()??null),[]),F=o.useCallback(()=>A(null),[]),K=vo(!!k,ee=>{ee?Z():F()},b),M=o.useMemo(()=>{if(!m)return null;const ee=[];return m.grade&&ee.push(y("wordTable.info.grade",{n:m.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),m.syllables&&ee.push(y("wordTable.info.syllables",{n:m.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),m.pos&&ee.push(y("wordTable.info.pos",{v:as(m.pos,oc(y)),defaultValue:"\uD488\uC0AC: {{v}}"})),m.wordType&&ee.push(y("wordTable.info.wordType",{v:as(m.wordType,sc(y)),defaultValue:"\uC720\uD615: {{v}}"})),ee.length?ee:null},[m,y]),q=R||e,Y=w.for===q?w.url:"";o.useEffect(()=>{const ee=Da(),V=R||e;if(!ee||!V)return;let ne=!1;return Promise.resolve(ee(V)).then(W=>{!ne&&W&&D({for:V,url:W})}),()=>{ne=!0}},[R,e]);const U=o.useRef(null),S=o.useRef(null);o.useEffect(()=>()=>{v.current?.pause(),S.current?.()},[]);const I=o.useRef(null);o.useEffect(()=>()=>{I.current&&(I.current.cancelled=!0)},[]);const O=o.useCallback(ee=>{if(ee.stopPropagation(),_||x){U.current?.();return}if(!Y){const ne=ar(),W=R||e;if(!ne||!W)return;const H={cancelled:!1,stop:null};I.current=H;const ie=()=>{H.cancelled=!0,H.stop?.(),E(!1),N(!1),S.current?.()};U.current=ie,S.current=Ua(ie),E(!0),Promise.resolve().then(()=>ne(W)).then(Te=>{if(H.cancelled)return;if(!Te){ie();return}D({for:W,url:Te});const ye=Ga(Te,()=>{N(!1),S.current?.()});v.current=ye.el,H.stop=ye.stop,E(!1),N(!0)}).catch(()=>{ie()});return}N(!0);const V=Ga(Y,()=>{N(!1),S.current?.()});v.current=V.el,U.current=V.stop,S.current=Ua(V.stop)},[_,x,Y,R,e]),z=u&&!!$&&!P,se=z&&i?lc:z?j4:S4,te=z&&i?ic:z?M4:T4;o.useEffect(()=>{const ee=C.current;if(!ee||typeof ResizeObserver>"u")return;const V=new ResizeObserver(([ne])=>{const{width:W,height:H}=ne.contentRect;B(Math.min(W/se,H/te))});return V.observe(ee),()=>V.disconnect()},[se,te]);const de=p*g<L4;return n.jsxs("div",{ref:C,className:we("word-table-cell",de&&"word-table-cell--tap-too-small",z?"word-table-cell--with-image":""),"data-ref-w":se,"data-ref-h":te,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${f})`},children:[z&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[T&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:G,className:"word-table-cell__image",src:$,alt:e,draggable:!1,style:{opacity:T?0:1},onLoad:L,onError:Q})]}),h&&(s||r)&&n.jsxs("span",{className:"word-table-cell__caption",children:[s&&n.jsx(jt,{type:"bar",fill:"soft",size:"small",label:s}),r&&n.jsx("span",{className:"word-table-cell__caption-tail h5",children:r})]}),i&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),c&&R&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",R,"]"]}),d&&a&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",a,"]"]})]}),n.jsxs("div",{className:"word-table-cell__side",children:[n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":Y,children:[n.jsx("span",{"data-play-state":"play",style:{display:_?"none":void 0},children:n.jsx(be,{htmlType:"button",size:p,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,loading:x,showTooltipInfo:x?y("common.loading","\uBD88\uB7EC\uC624\uB294 \uC911"):y("common.play","\uC7AC\uC0DD"),ariaLabel:e?y("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):y("common.play","\uC7AC\uC0DD"),onClick:O})}),n.jsx("span",{"data-play-state":"pause",style:{display:_?void 0:"none"},children:n.jsx(be,{htmlType:"button",size:p,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:y("common.pause","\uBA48\uCDA4"),ariaLabel:e?y("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):y("common.pause","\uBA48\uCDA4"),onClick:O})})]}),m&&n.jsxs("div",{ref:b,className:"word-table-cell__info-button",onPointerEnter:ee=>{ha(ee)||Z()},onPointerLeave:ee=>{ha(ee)||F()},onFocus:()=>{ma()||Z()},onBlur:F,children:[n.jsx(be,{htmlType:"button",size:p,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:y("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:ee=>{ee.stopPropagation(),K.touchPress()}}),k&&M&&n.jsx(Yn,{anchorRect:k,items:M,showIndex:!1})]})]})]})}function va({title:e,titleIcon:t,disc:a,className:r,orientation:s="landscape",contentTypes:l=["image","word","standardPron"],baseItem:i,baseContentTypes:u,cutLine:c="show",showOutline:d=!0,showDivLine:h=!0,items:p,editCells:m,count:g,activeCell:y=null,onActivateCell:C,onRemoveCell:b,onRemoveItem:v,onReorder:f,onCopyItem:B,indexOffset:_=0,totalCount:N,renderCellAction:x,showFillerAdd:E=!1,addableCount:w,contentRef:D,buttonSize:k=40,brand:A,code:R,pageNumber:$,pageNumberPosition:G="right",fitHeight:T=!1,scoring:P=!1,marks:L,onMarkClick:Q,scoreIndexOffset:Z=0}){const F=o.useCallback((ve,Me)=>{Q?.(Z+ve,Me)},[Q,Z]),K=(ve,Me)=>{const Pe=L?.[vr(Z+ve)]??null;return n.jsx("div",{className:we("word-table-cell__score",Pe?"word-table-cell__score--marked":""),style:it>1?{transform:`translateX(-50%) scale(${it})`,transformOrigin:"bottom center"}:void 0,children:_r.map(Oe=>n.jsx("span",{className:we("word-table-cell__score-slot",Pe===Oe?"word-table-cell__score-slot--on":""),children:n.jsx(be,{htmlType:"button",size:k,type:"dot",shape:"pill",icon:Qu[Oe],variant:Pe===Oe?ec[Oe]:"default",selected:Pe===Oe,useBorder:!1,...gt?{}:{tabIndex:-1,role:"img"},showTooltipInfo:M(`wordTable.scoring.markName.${Oe}`,{defaultValue:Oe}),ariaLabel:M(`wordTable.scoring.${Oe}`,{word:Me,defaultValue:`${Me} ${Oe}`}),onClick:gt?dt=>{dt.stopPropagation(),F(ve,Oe)}:void 0})},Oe))})},{t:M}=_e.useTranslation(),q=m!==void 0,Y=e!=null||!!t||!!a,U=bn("(max-width: 767px)"),S=o.useRef(null),[I,O]=o.useState(null),z=p?.length??0,se=N??z,[te,de]=o.useState(null),[ee,V]=o.useState(""),ne=o.useRef(null),W=o.useRef(null),H=o.useRef(null),ie=o.useRef(null),Te=o.useCallback(ve=>{W.current=ve,typeof D=="function"?D(ve):D&&(D.current=ve)},[D]),ye=o.useCallback((ve,Me)=>{ne.current=_+Me,f?.(ve,Me),V(M("wordTable.reorder.moved",{n:_+Me+1,total:se,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[f,M,se,_]);o.useEffect(()=>{const ve=ne.current;ve!=null&&(ne.current=null,(W.current?.closest(".word-table-block__pages")??W.current)?.querySelector(`[data-wordtable-index="${ve}"] .word-table__card-handle button`)?.focus())}),o.useEffect(()=>()=>{ie.current?.()},[]);const he=o.useCallback((ve,Me)=>{if(!f||!ve.altKey||ve.ctrlKey||ve.metaKey)return;const Pe=ve.key==="ArrowRight";if(!Pe&&ve.key!=="ArrowLeft")return;ve.preventDefault();const Oe=Me+(Pe?1:-1),dt=_+Oe;dt<0||dt>=se||ye(Me,Oe)},[f,se,_,ye]),Se=o.useCallback((ve,Me)=>{if(!f||ve.pointerType==="mouse")return;const Pe=ve.target.closest?.("button");if(Pe&&!Pe.closest(".word-table__card-handle"))return;ie.current?.();const Oe={x:ve.clientX,y:ve.clientY};let dt=!1;const Dt=Ie=>{dt&&Ie.cancelable&&Ie.preventDefault()};let yt=null,xt=null;const Ct=()=>{const Ie=xt;if(!Ie)return;const Xe=document.elementFromPoint?.(Ie.x,Ie.y)?.closest?.("[data-wordtable-cell]"),et=Xe?Number(Xe.dataset.wordtableCell):NaN,rt=Number.isInteger(et)?et:null;H.current=rt,O($t=>$t===rt?$t:rt)},Le=Ie=>{if(!dt){(Math.abs(Ie.clientX-Oe.x)>cc||Math.abs(Ie.clientY-Oe.y)>cc)&&fe();return}if(xt={x:Ie.clientX,y:Ie.clientY},typeof requestAnimationFrame>"u"){Ct();return}yt===null&&(yt=requestAnimationFrame(()=>{yt=null,Ct()}))},at=()=>{yt!==null&&(cancelAnimationFrame(yt),yt=null,Ct());const Ie=H.current,Xe=dt;fe(),Xe&&Ie!=null&&Ie!==Me&&ye(Me,Ie)},oe=setTimeout(()=>{dt=!0,de(Me),H.current=Me,O(Me),window.addEventListener("touchmove",Dt,{passive:!1})},R4);function fe(){clearTimeout(oe),window.removeEventListener("pointermove",Le),window.removeEventListener("pointerup",at),window.removeEventListener("pointercancel",at),window.removeEventListener("touchmove",Dt),dt=!1,yt!==null&&(cancelAnimationFrame(yt),yt=null),H.current=null,ie.current=null,de(null),O(null)}ie.current=fe,window.addEventListener("pointermove",Le),window.addEventListener("pointerup",at),window.addEventListener("pointercancel",at)},[f,ye]),{width:$e,height:Ne}=Qn[s],ue=typeof T=="number"?T:T&&typeof T=="object"?U?T.narrow:T.wide:null,{scalerRef:xe,scale:ke,offset:Ee}=uc($e,T?Ne:void 0),We=q?m?.length??0:p?.length??0,He=Math.max(g??We,1),ot=!q&&!!i,Qe=N4(s,He),Je=nc(s,He),vt=ot?Qe.cols:Je.cols,je=ot?Qe.rows:Je.rows,Ye=ot&&s==="landscape"?Qe.cols*2:vt,Be=ot&&s==="portrait"?Qe.rows*2:je,Ue=ve=>({word:ve.length===0||ve.includes("word"),image:ve.length===0||ve.includes("image"),pron:ve.length===0||ve.includes("standardPron"),colloq:ve.length===0||ve.includes("colloquialPron"),caption:ve.length===0||ve.includes("caption")}),qe=Ue(l),pt=o.useMemo(()=>{const ve=(p??[]).map(Pe=>Pe.id),Me=ve.every(Pe=>typeof Pe=="string"&&Pe.length>0)&&new Set(ve).size===ve.length;return!Me&&ve.length>0&&At("wordTable.cellKeyFallback","[ihab/core] WordTable: items \uC758 id \uAC00 \uACB9\uCE58\uAC70\uB098 \uBE44\uC5B4 \uC788\uC5B4 \uCE78\uC744 \uC790\uB9AC \uBC88\uD638\uB85C \uC13C\uB2E4. \uCE78\uC744 \uBE7C\uAC70\uB098 \uB354\uD560 \uB54C \uB4A4 \uCE78\uB4E4\uC774 \uD1B5\uC9F8\uB85C \uB2E4\uC2DC \uADF8\uB824\uC9C4\uB2E4(\uC18C\uB9AC \uC8FC\uC18C\uB97C \uB2E4\uC2DC \uBC1B\uC544 \uC628\uB2E4). id \uB97C \uD45C \uC548\uC5D0\uC11C \uD558\uB098\uBFD0\uC778 \uAC12\uC73C\uB85C \uC9C0\uC5B4 \uC8FC\uBA74 \uADF8 \uAC12\uC774 \uC0AC\uB77C\uC9C4\uB2E4."),Me?ve:null},[p]),_t=Ue(u??l),Et=q?(m??[]).some(ve=>ve!==null&&ve.length>1):(p??[]).some(ve=>(ve.words??[]).length>1),wt=!!A?.show,st=!!A?.show&&A?.top!==!1,tt=!!A?.show&&A?.bottom!==!1,Bt=A?.copyright??"\xA9 IHAB, Inc. All rights reserved.",kt=le(we("word-table__content",E4[c],d&&"word-table__content--outline",h&&Et&&"word-table__content--div-line",!wt&&$&&G!=="none"&&"word-table__content--page-number",st&&"word-table__content--brand-top",tt&&"word-table__content--brand-bottom")),Tt={transform:`scale(${1/ke})`,transformOrigin:"center center"},Lt=k*_r.length+4*(_r.length-1),gt=!!Q,it=gt?Math.max(1,Math.min(1/ke,$e/Ye/Lt)):1,ut=n.jsxs("div",{ref:xe,className:"word-table__scaler",style:{height:Ne*ke},children:[n.jsx("div",{className:we("word-table",P&&!gt&&"word-table--score-readonly",!Y&&r),style:{width:$e,height:Ne,transform:`scale(${ke})`,transformOrigin:"top left",marginLeft:Ee},children:n.jsxs("div",{ref:Te,className:kt,style:{gridTemplateColumns:`repeat(${Ye}, 1fr)`,gridTemplateRows:`repeat(${Be}, 1fr)`},children:[q?n.jsx(n.Fragment,{children:(m??[]).map((ve,Me)=>n.jsx("div",{className:le(we("word-table__edit-cell",ve?"word-table__edit-cell--filled":"word-table__edit-cell--empty",y===Me?"word-table__edit-cell--active":"")),style:rs(Me,Ye,Be,c),children:ve?n.jsxs(n.Fragment,{children:[ve.map((Pe,Oe)=>n.jsxs(o.Fragment,{children:[Oe>0&&n.jsx("div",{className:le("word-table__pair-divider")}),n.jsx(os,{outerScale:ke,label:Pe.word,subLabel:Pe.pronunciation,colloquialLabel:Pe.colloquialPronunciation,homonum:Pe.homonum,showWord:qe.word,showImage:qe.image,showPronunciation:qe.pron,showColloquial:qe.colloq,showCaption:qe.caption,buttonSize:k})]},Oe)),P&&K(Me,ve.map(Pe=>Pe.word).join(" / ")),b&&n.jsx("div",{className:le("word-table__card-close"),children:n.jsx(be,{htmlType:"button",size:k,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:ve.length>1?M("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):M("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:ve.length>1?M("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):M("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>b(Me)})})]}):C&&n.jsx("div",{style:Tt,children:n.jsx(be,{htmlType:"button",size:k,type:"dot",icon:"plus",variant:"default",ariaLabel:M("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:M("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C(Me)})})},Me))}):n.jsxs(n.Fragment,{children:[ot&&i&&n.jsx("div",{className:le("word-table__card word-table__card--base"),style:{gridColumn:`1 / span ${Qe.cols}`,gridRow:`1 / span ${Qe.rows}`,...rs(0,s==="landscape"?2:1,s==="landscape"?1:2,c)},children:(i.words??[]).map((ve,Me)=>n.jsxs(o.Fragment,{children:[Me>0&&n.jsx("div",{className:le("word-table__pair-divider")}),n.jsx(os,{outerScale:ke,label:ve.label,subLabel:ve.subLabel,colloquialLabel:ve.colloquialLabel,captionLabel:ve.captionLabel,captionBadge:ve.captionBadge,homonum:ve.homonum,showWord:_t.word,showImage:_t.image,showPronunciation:_t.pron,showColloquial:_t.colloq,showCaption:_t.caption,buttonSize:k,wordInfo:ve.grade||ve.syllables!=null||ve.pos||ve.wordType?{grade:ve.grade,syllables:ve.syllables,pos:ve.pos,wordType:ve.wordType}:void 0})]},Me))}),(p??[]).map((ve,Me)=>n.jsxs("div",{"data-wordtable-cell":f?Me:void 0,"data-wordtable-index":f?_+Me:void 0,className:le(`word-table__card${f?" word-table__card--draggable":""}${I===Me?" word-table__card--drag-over":""}${te===Me?" word-table__card--dragging":""}`),style:rs(Me,vt,je,c),draggable:!!f,onPointerDown:f?Pe=>Se(Pe,Me):void 0,onKeyDown:f?Pe=>he(Pe,Me):void 0,onDragStart:f?()=>{S.current=Me}:void 0,onDragOver:f?Pe=>{Pe.preventDefault(),O(Me)}:void 0,onDragLeave:f?()=>O(null):void 0,onDrop:f?Pe=>{Pe.preventDefault(),S.current!==null&&S.current!==Me&&f(S.current,Me),S.current=null,O(null)}:void 0,onDragEnd:f?()=>{S.current=null,O(null)}:void 0,children:[(ve.words??[]).map((Pe,Oe)=>n.jsxs(o.Fragment,{children:[Oe>0&&n.jsx("div",{className:le("word-table__pair-divider")}),n.jsx(os,{outerScale:ke,label:Pe.label,subLabel:Pe.subLabel,colloquialLabel:Pe.colloquialLabel,captionLabel:Pe.captionLabel,captionBadge:Pe.captionBadge,homonum:Pe.homonum,showWord:qe.word,showImage:qe.image,showPronunciation:qe.pron,showColloquial:qe.colloq,showCaption:qe.caption,buttonSize:k,wordInfo:Pe.grade||Pe.syllables!=null||Pe.pos||Pe.wordType?{grade:Pe.grade,syllables:Pe.syllables,pos:Pe.pos,wordType:Pe.wordType}:void 0})]},Oe)),P&&K(Me,(ve.words??[]).map(Pe=>Pe.label).join(" / ")),(x||v||B||f)&&n.jsxs("div",{className:le("word-table__card-actions"),children:[v&&n.jsx("div",{className:le("word-table__card-close"),children:n.jsx(be,{htmlType:"button",size:k,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(ve.words??[]).length>1?M("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):M("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:(ve.words??[]).length>1?M("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):M("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>v(ve.id)})}),B&&n.jsx("div",{className:le("word-table__card-copy"),children:n.jsx(be,{htmlType:"button",size:k,type:"dot",icon:"copy",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:M("wordTable.copyItem","\uD55C \uCE78 \uB354"),ariaLabel:M("wordTable.copyItemAria",{n:_+Me+1,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354"}),onClick:()=>B(ve.id,_+Me)})}),x?.(Me,ve),f&&n.jsx("div",{className:le("word-table__card-handle"),children:n.jsx(be,{htmlType:"button",size:k,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:M("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:M("wordTable.reorder.handle",{word:(ve.words??[]).map(Pe=>Pe.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})})]})]},pt?pt[Me]:Me)),Array.from({length:Math.max(0,vt*je-(p?.length??0))}).map((ve,Me)=>{const Pe=(p?.length??0)+Me<(w??He);return n.jsx("div",{className:le("word-table__card word-table__card--filler"),children:E&&C&&Pe&&n.jsx("div",{style:Tt,children:n.jsx(be,{htmlType:"button",size:k,type:"dot",icon:"plus",variant:"default",ariaLabel:M("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:M("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C((p?.length??0)+Me)})})},`filler-${Me}`)})]}),st&&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:A?.topLogo?.src??Cr,alt:A?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const ve=[A?.title&&n.jsx("span",{className:"word-table__paper-title",children:A.title},"t"),A?.owner&&n.jsx("span",{className:"word-table__owner",children:A.owner},"o"),R&&n.jsx("span",{className:"word-table__code",children:R},"c")].filter(Boolean);return ve.length===0?null:n.jsx("span",{className:"word-table__ident",children:ve.map((Me,Pe)=>n.jsxs(o.Fragment,{children:[Pe>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Me]},Pe))})})()]})}),tt&&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:[A?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:A.bottomLogo.src,alt:A.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:Bt})]}),n.jsxs("span",{className:"word-table__band-end",children:[A?.link&&n.jsx("span",{className:"word-table__link",children:A.link}),$&&G!=="none"&&n.jsx("span",{className:"word-table__page-count",children:M("wordTable.filter.pageIndicator",{current:$.current,total:$.total})})]})]})}),!wt&&$&&G!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${G}`,children:M("wordTable.filter.pageIndicator",{current:$.current,total:$.total})})]})}),f&&n.jsx("span",{role:"status",style:$4,children:ee})]}),ct=ue==null?ut:n.jsx("div",{className:"word-table__frame",style:{height:ue},children:ut});return Y?n.jsx(ya,{type:"page",icon:t,title:e,disc:a,className:we(le("word-table__section"),r),children:ct}):ct}function P4(e,t,a){const r=[];for(const s of e??[]){if(s.type==="note"||s.type==="input")continue;const l=s.displayLabel??s.label,i=I4(s,t?.[s.label],a);i!==null&&r.push(`${l} ${i}`)}return r.join(" \xB7 ")}function I4(e,t,a){const r=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(s=>s!==_n);return r.length===0?e.allOption?e.allLabel??a:null:r.map(s=>F4(e,s)).join(", ")}function F4(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 $n({title:e,titleLevel:t=2,headerAction:a,headerSummary:r,collapsible:s=!1,defaultCollapsed:l=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:d,selected:h={},onSelect:p,align:m,sectionAlign:g,className:y}){const C=(m??(g==="vertical"?"newline":"inline"))==="inline",{t:b}=_e.useTranslation(),[v,f]=o.useState(l),B=i??v,_=()=>{const A=!B;f(A),u?.(A)},N=A=>{if(!s)return;const R=A.target;!R||typeof R.closest!="function"||R.closest(".filter-panel__collapse-toggle")||R.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||_()},x=o.useMemo(()=>r!==void 0||!B?"":P4(d,h,b("common.all","\uC804\uCCB4")),[r,B,d,h,b]),E=r??(x?n.jsx("span",{className:"filter-panel__header-summary body-3",children:x}):null),w=e||a||r||s,D=o.useId(),k=t?`h${t}`:"span";return n.jsxs("div",{className:we("filter-panel",s?"filter-panel--collapsible":"",B?"filter-panel--collapsed":"",y),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?D:void 0,children:[w&&n.jsxs("div",{className:"filter-panel__header",onClick:s?N:void 0,children:[n.jsx("div",{className:"filter-panel__title-row",children:e&&n.jsx(k,{id:D,className:"filter-panel__title h4",children:e})}),n.jsxs("div",{className:"filter-panel__header-actions",children:[B?E:a,s&&n.jsx(be,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:B?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:B?b("common.expand","\uD3BC\uCE58\uAE30"):b("common.collapse","\uC811\uAE30"),showTooltipInfo:B?b("common.expand","\uD3BC\uCE58\uAE30"):b("common.collapse","\uC811\uAE30"),"aria-expanded":!B,onClick:_})]})]}),!B&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:we("filter-panel__sections",C?"filter-panel__sections--row":""),children:d.map(A=>{const R=h[A.label],$=R===void 0||(Array.isArray(R)?R.length===0:!1),G=(A.items??[]).filter(P=>P!=null);A.allOption&&G.some(P=>(typeof P=="string"?P:P.value)===_n)&&At(`filter-panel-all-value:${A.label}`,`[FilterPanel] '${A.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${_n}' \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 T=P=>{const L=typeof P=="string"?P:P.value,Q=typeof P!="string"&&!!P.disabled,Z=typeof P!="string"?P.labels:void 0,F=typeof P!="string"?P.displayLabel:void 0,K=typeof P!="string"?P.tooltip:void 0,M=typeof P!="string"?P.descriptionTooltip:void 0,q=typeof P!="string"?P.shape:void 0,Y=Array.isArray(R)?R.includes(L):R===L;return n.jsx(be,{htmlType:"button",size:"keyboard",label:Z??F??L,type:A.itemType??(Z?"bar":L.length===1?"dot":void 0),selected:Y,disabled:Q,shape:q,showTooltipInfo:!!K,tooltipInfoText:K,tooltipDescription:M,onClick:()=>p?.(L,A.label)},L)};return n.jsxs(o.Fragment,{children:[A.groupLabel&&n.jsxs("div",{className:"filter-panel__group-label-row",children:[n.jsx("div",{className:"filter-panel__group-label body-2",children:A.groupLabel}),A.groupAction]}),n.jsxs("div",{className:we("filter-panel__section",A.layout==="row"?"filter-panel__section--row":"",A.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:A.displayLabel??A.label}),A.labelAction??(A.labelInfo?n.jsx(qa,{...A.labelInfo}):null)]}),A.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:A.content}):A.type==="input"?n.jsx(Jn,{className:"filter-panel__textfield",placeholder:A.placeholder,ariaLabel:A.displayLabel??A.label,value:h[A.label]??"",onChange:P=>p?.(P,A.label),error:A.error}):!A.multiple&&A.display==="segmented"?n.jsx(An,{ariaLabel:A.displayLabel??A.label,options:[...A.allOption?[{key:_n,label:A.allLabel??b("common.all","\uC804\uCCB4"),disabled:A.allOptionDisabled}]:[],...G.map(P=>{const L=typeof P=="string"?P:P.value,Q=typeof P!="string"?P.displayLabel:void 0,Z=typeof P!="string"?P.disabled:void 0;return{key:L,label:Q??L,disabled:Z}})],value:$&&A.allOption?_n:h[A.label]??"",onChange:P=>p?.(P,A.label),size:32}):!A.multiple&&A.display==="dropdown"?n.jsx(gn,{className:"filter-panel__dropdown",ariaLabel:typeof A.label=="string"?A.label:void 0,size:40,options:[...A.allOption?[{value:_n,label:A.allLabel??b("common.all","\uC804\uCCB4"),disabled:A.allOptionDisabled}]:[],...G.map(P=>{const L=typeof P=="string"?P:P.value,Q=typeof P!="string"?P.displayLabel:void 0,Z=typeof P!="string"?P.disabled:void 0;return{value:L,label:Q??L,disabled:Z}})],value:$&&A.allOption?_n:h[A.label],onChange:P=>p?.(P,A.label)}):n.jsxs("div",{className:A.groups?"filter-panel__item-groups":"filter-panel__items",children:[A.allOption&&!A.groups&&n.jsx(be,{htmlType:"button",size:"keyboard",label:A.allLabel??b("common.all","\uC804\uCCB4"),selected:$,disabled:A.allOptionDisabled,onClick:()=>p?.(_n,A.label)}),A.groups?A.groups.map((P,L)=>n.jsxs("div",{className:"filter-panel__item-group",children:[L===0&&A.allOption&&n.jsx(be,{htmlType:"button",size:"keyboard",label:A.allLabel??b("common.all","\uC804\uCCB4"),selected:$,disabled:A.allOptionDisabled,onClick:()=>p?.(_n,A.label)}),P.filter(Q=>Q!=null).map(T)]},L)):G.map(T)]})]})]},A.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const O4=[1,2,3,4,5,6,7,8,9,10,11,12],z4=[8,6,4,2,1],mn="show",En="hide",dc=["image","word","caption","standardPron"];function pc(e){return e.some(t=>(t.words??[]).some(a=>!!a.captionBadge||!!a.captionLabel))}function hc(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:"caption",disabled:!t.hasCaption,displayLabel:e("wordTable.filter.caption","\uC720\uD615")},{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 mc(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 Cc(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:mn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:En,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function fc(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:mn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:En,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function bc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:mn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:En,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function gc(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:mn,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:En,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function yc(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:mn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:En,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function vc(e,t){const a=Math.max(1,Math.min(t.itemCount,t.max??t.itemCount));return{label:e(t.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[a,...z4.filter(r=>r<a)].map(r=>({value:`${r}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:r})})),display:"segmented"}}function _c(e,t){return e>=t?Number.POSITIVE_INFINITY:e}function W4(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:En,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function xc(e){return e==="left"||e==="center"||e==="right"?e:"none"}function wc(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?mn:En,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?mn:En,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?mn:En}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?mn:En}:{}}}function Bc(e,t,a,r){return a===e("wordTable.filter.composition","\uAD6C\uC131")?t===_n?(r.setContentTypes(()=>[]),!0):(r.setContentTypes(s=>s.includes(t)?s.filter(l=>l!==t):[...s,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===mn),!0):a===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(r.setCutLine(t),!0):a===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(r.setShowDivLine(t===mn),!0):a===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(r.setShowTopInfo?.(t===mn),!0):a===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(r.setShowBottomInfo?.(t===mn),!0):!1}function H4(e){return"sections"in e}function ss(e){const{t}=_e.useTranslation(),{title:a,className:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c}=e,d={collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c};if(H4(e))return n.jsx($n,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...d,align:"inline"});const{hasImage:h,hasColloquial:p,hasCaption:m,contentTypes:g,orientation:y,showOutline:C,cutLine:b,showDivLine:v,setters:f,showCutLine:B=!1,showDivLine2:_=!1,middleSections:N=[],extraSelected:x={},onExtraSelect:E,showPaperBands:w=!1,showTopInfo:D=!0,showBottomInfo:k=!0}=e,A=[hc(t,{hasImage:h,hasColloquial:p,hasCaption:m??!1}),mc(t),...N,Cc(t),...B?[gc(t)]:[],..._?[yc(t)]:[],...w?[fc(t),bc(t)]:[]],R={...wc(t,{contentTypes:g,orientation:y,showOutline:C,cutLine:b,showDivLine:v,showTopInfo:D,showBottomInfo:k}),...x},$=(G,T)=>{Bc(t,G,T,f)||E?.(G,T)};return n.jsx($n,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:A,selected:R,onSelect:$,...d,sectionAlign:"horizontal"})}function ls(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function V4(e){return ls(e).replace(/"/g,""").replace(/'/g,"'")}function is(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let xr=null,_a=null;function q4(e,t,a,r="",s=""){if(e.length===0||_a&&_a.iframe.isConnected&&Date.now()-_a.at<1e4)return;const l=r?is(r):"";xr?.();let i=null;if(l){const d=document.title;document.title=l,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}_a={iframe:u,at:Date.now()},c.open(),c.write(us(e,t,a,!0,l,s)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),_a?.iframe===u&&(_a=null)},0)})}function us(e,t,a,r=!1,s="",l=""){s=s?is(s):"";const i=Array.from(document.styleSheets).flatMap(p=>{try{return Array.from(p.cssRules).map(m=>m.cssText)}catch{return[]}}).join(`
|
|
831
831
|
`),u="light",c=(()=>{try{return document.documentElement.lang||""}catch{return""}})(),d=l?`<div class="paper-head">${ls(l)}</div>`:"",h=e.map(p=>{const m=p.cloneNode(!0);return m.querySelectorAll('[data-play-state="play"]').forEach(g=>g.style.display=""),m.querySelectorAll('[data-play-state="pause"]').forEach(g=>g.style.display="none"),m.querySelectorAll(".word-table-cell__score-slot:not(.word-table-cell__score-slot--on)").forEach(g=>g.remove()),m.querySelectorAll(".word-table-cell__spinner").forEach(g=>g.remove()),m.querySelectorAll("img").forEach(g=>{g.style.opacity==="0"&&(g.setAttribute("onload","this.style.opacity=''"),g.setAttribute("onerror","this.style.visibility='hidden'"))}),`<div class="paper-wrap">${d}${m.outerHTML}</div>`}).join(`
|
|
832
832
|
`);return`<!DOCTYPE html>
|
|
833
833
|
<html${c?` lang="${V4(c)}"`:""} data-theme="${u}">
|
|
@@ -1034,10 +1034,10 @@ ${_.badge}`:_.badge:void 0;if(x&&c(_.code))return null;if(!_.badge&&!h)return p(
|
|
|
1034
1034
|
`:""}
|
|
1035
1035
|
<\/script>
|
|
1036
1036
|
</body>
|
|
1037
|
-
</html>`}const U4=1e3;function cs({getElements:e,paperW:t,paperH:a,fileName:r="",onPopupBlocked:s,header:l=""}){const{t:i}=_e.useTranslation(),u=o.useCallback(()=>{q4(e(),t,a,r,l)},[e,t,a,r,l]),c=o.useCallback(()=>{const h=e();if(h.length===0)return;const p=window.open("","_blank");if(!p){s?.();return}p.document.write(us(h,t,a,!1,r,l)),p.document.close()},[e,t,a,r,s,l]),d=o.useCallback(()=>{const h=e();if(h.length===0)return;const p=us(h,t,a,!1,r,l),m=new Blob([p],{type:"text/html;charset=utf-8"}),g=URL.createObjectURL(m),y=(r?is(r):"")||i("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C"),C=Object.assign(document.createElement("a"),{href:g,download:`${y}.html`});document.body.appendChild(C),C.click(),document.body.removeChild(C),setTimeout(()=>URL.revokeObjectURL(g),U4)},[e,t,a,r,l,i]);return{print:u,openNewWindow:c,downloadHtml:d}}function kc(e,t){const{t:a}=_e.useTranslation(),r=t?.paperBands===!0,s=t?.maxItemsPerPage,[l,i]=o.useState("landscape"),[u,c]=o.useState([...dc]),[d,h]=o.useState("show"),[p,m]=o.useState(!0),[g,y]=o.useState(!0),[C,b]=o.useState(!0),[v,f]=o.useState(!0),[B,_]=o.useState(8),[N,x]=o.useState("right"),E=e.length,w=e.some(K=>(K.words??[]).length>1),D=e.some(K=>(K.words??[]).some(M=>!!M.colloquialLabel)),k=pc(e),A=Math.max(1,Math.min(Math.max(E,1),s??Math.max(E,1))),R=Math.min(B,A),$=o.useMemo(()=>k4(e,R),[e,R]),G=$.length>1,T=R,[P,L]=o.useState(!1);o.useEffect(()=>{let K=!1;if(!ia()){L(!1);return}return Promise.all(e.flatMap(M=>(M.words??[]).map(q=>Sl(q.label,q.homonum)))).then(M=>{K||L(M.some(Boolean))},()=>{}),()=>{K=!0}},[e]);const Q=o.useMemo(()=>[hc(a,{hasImage:P,hasColloquial:D,hasCaption:k}),mc(a),...E>0?[vc(a,{hasPairs:w,itemCount:E,max:s})]:[],Cc(a),...T>1?[gc(a)]:[],...w?[yc(a)]:[],...r?[fc(a),bc(a)]:[]],[a,P,D,k,E,w,G,T,r,s]),Z={...wc(a,{contentTypes:u,orientation:l,showOutline:p,cutLine:d,showDivLine:v,showTopInfo:g,showBottomInfo:C}),...E>0?{[a(w?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${R}\uAC1C`}:{},...G?{[a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:N}:{}},F=o.useCallback((K,M)=>{Bc(a,K,M,{setContentTypes:c,setOrientation:i,setShowOutline:m,setCutLine:h,setShowDivLine:f,setShowTopInfo:y,setShowBottomInfo:b})||(M===a("wordTable.filter.itemsPerPagePair","\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218")||M===a("wordTable.filter.itemsPerPageWord","\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218")?_(_c(parseInt(K),E)):M===a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&x(xc(K)))},[a,E]);return{settings:{orientation:l,contentTypes:u,cutLine:d,showOutline:p,showDivLine:v,count:T,showTopInfo:g,showBottomInfo:C},filterSections:Q,filterSelected:Z,handleSelect:F,pages:$,isPaginated:G,pageNumberPosition:N}}function G4({items:e,words:t,baseItem:a,baseContentTypes:r,maxItemsPerPage:s,title:l,subtitle:i,emptyText:u,buttons:c,renderButtons:d,renderFooter:h,footerClassName:p,footerLayout:m,printFileName:g,showSettings:y,autoPrint:C,className:b,onClose:v,scoring:f=!1,onScoreChange:B,printHeader:_,brand:N,code:x,beforeClose:E}){const{t:w}=_e.useTranslation(),D=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(t)?t:[]).filter(H=>typeof H=="string"&&H.length>0).map((H,ie)=>({id:`${H}-${ie}`,words:[{label:H}]})),[e,t]),{settings:k,filterSections:A,filterSelected:R,handleSelect:$,pages:G,isPaginated:T,pageNumberPosition:P}=kc(D,{paperBands:!!N?.show,maxItemsPerPage:s}),L=o.useMemo(()=>tc(G.map(H=>H.length)),[G]),[Q,Z]=o.useState({}),F=o.useCallback((H,ie)=>{Z(Te=>({...Te,[vr(H)]:Ju(Te[vr(H)]??null,ie)}))},[]),K=o.useRef(B);o.useEffect(()=>{K.current=B});const M=o.useRef(Q);o.useEffect(()=>{M.current!==Q&&(M.current=Q,K.current?.(es(Q)))},[Q]);const q=o.useMemo(()=>es(Q),[Q]),Y=o.useRef(null),{toastMessage:U,toastKey:S,showWarning:I,clearToast:O}=Vi("warning"),z=o.useRef([]),se=o.useCallback(()=>T?z.current.filter(H=>H!==null):Y.current?[Y.current]:[],[T]),{print:te,openNewWindow:de}=cs({getElements:se,paperW:Qn[k.orientation].width,paperH:Qn[k.orientation].height,fileName:g??"",header:_??"",onPopupBlocked:()=>I(w("wordTable.popupBlocked","\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694."))}),ee=o.useMemo(()=>h?void 0:d?d({print:te,openNewWindow:de}):g?[{label:w("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>de()},{label:w("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>te()},...c??[]]:c,[h,d,g,c,w,te,de]),V=o.useMemo(()=>h?h({print:te,openNewWindow:de}):void 0,[h,te,de]),ne=o.useRef(!1),W=o.useRef(te);return o.useEffect(()=>{W.current=te},[te]),o.useEffect(()=>{if(!C||ne.current)return;const H=window.setTimeout(()=>{ne.current=!0,W.current()},100);return()=>window.clearTimeout(H)},[C]),n.jsxs(Hn,{title:l??w("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:i,size:"large",className:we("word-table-popup",b),buttons:ee,footer:V,footerClassName:p,footerLayout:m,beforeClose:E,onClose:v,children:[D.length>0?n.jsxs("div",{className:"word-table-popup__body",children:[y&&n.jsx(ss,{sections:A,selected:R,onSelect:$}),T?n.jsx("div",{className:"word-table-popup__pages",children:G.map((H,ie)=>n.jsx(va,{items:H,orientation:k.orientation,contentTypes:k.contentTypes,baseItem:a,baseContentTypes:r,cutLine:k.cutLine,showOutline:k.showOutline,showDivLine:k.showDivLine,count:k.count,contentRef:Te=>{z.current[ie]=Te},pageNumber:{current:ie+1,total:G.length},pageNumberPosition:P,brand:N&&{...N,top:k.showTopInfo,bottom:k.showBottomInfo},code:x,scoring:f,scoreIndexOffset:L[ie],marks:q,onMarkClick:F},ie))}):n.jsx("div",{className:"word-table-popup__table",children:n.jsx(va,{items:D,orientation:k.orientation,contentTypes:k.contentTypes,baseItem:a,baseContentTypes:r,cutLine:k.cutLine,showOutline:k.showOutline,showDivLine:k.showDivLine,count:k.count,contentRef:Y,fitHeight:!0,scoring:f,marks:q,onMarkClick:F,brand:N&&{...N,top:k.showTopInfo,bottom:k.showBottomInfo},code:x})})]}):n.jsx("p",{className:"word-table-popup__empty body-3",children:u??w("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsx(ba,{message:U,position:"top",onClose:O},S)]})}const K4=new Set(["x","triangle"]);function Y4(e,t){const a=[];for(let r=0;r<e.length;r++){const s=t[String(r)];s&&K4.has(s)&&a.push(e[r])}return a}const Z4=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function Ac(e){const t=e.name.trim(),a=e.reviewRound;if(typeof a=="number"&&Number.isFinite(a)&&a>=0){const l=Math.floor(a);if(l===0)return{base:t,round:1};const i=(l===1?/\s*복습\s*\d{2}\.\d{2}$/:new RegExp(`(?:^|\\s)${l}\uCC28\\s*\uBCF5\uC2B5\\s*\\d{2}\\.\\d{2}$`)).exec(t);return{base:i?t.slice(0,i.index).trim():t,round:l+1}}let r=t,s=1;for(;;){const l=Z4.exec(r);if(!l)break;s=Math.max(s,(l[1]?Number(l[1]):1)+1),r=r.slice(0,l.index).trim()}return{base:r,round:s}}function X4(e,t){const[,a,r]=io(t).split("-"),s=`${a}.${r}`,{base:l,round:i}=Ac(typeof e=="string"?{name:e}:e),u=i>=2?`${i}\uCC28 `:"";return`${l||"\uB2E8\uC5B4\uD45C"} ${u}\uBCF5\uC2B5 ${s}`}function J4(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:Ac(e).round}}function Q4(e,t){const a={};for(const[r,s]of Object.entries(t)){if(s!=="o"&&s!=="triangle"&&s!=="x")continue;const l=Number(r),i=e[l];i&&(a[r]=i)}return a}function e_(e){return e.map(t=>t.label).join(" / ")}function t_(e){return e.map(t=>t.homonum!=null?`${t.label}#${t.homonum}`:t.label).join(" / ")}function Nc(e){return e.split(" / ").map(t=>t.replace(/#\d+$/,"")).join(" / ")}function n_(e,t,a){const r=Ul(a);return[e.trim(),r,t.trim()].filter(Boolean).join(" \xB7 ")}function Ec(e,t,a){return a===0?0:(e+t*.5)/a}function a_(e){const t=new Map,a=[...e].sort((s,l)=>s.scoredAt.localeCompare(l.scoredAt));for(const s of a)for(const[l,i]of Object.entries(s.marks)){const u=s.labels?.[l];if(!u)continue;const c=t.get(u)??{o:0,triangle:0,x:0,latest:i,latestAt:s.scoredAt};if(i==="o")c.o++;else if(i==="triangle")c.triangle++;else if(i==="x")c.x++;else continue;c.latest=i,c.latestAt=s.scoredAt,t.set(u,c)}const r=[];for(const[s,l]of t){const i=l.o+l.triangle+l.x;r.push({label:Nc(s),key:s,tried:i,o:l.o,triangle:l.triangle,x:l.x,rate:Ec(l.o,l.triangle,i),latest:l.latest,latestAt:l.latestAt})}return r.sort((s,l)=>s.rate-l.rate||l.tried-s.tried||pn(s.label,l.label)||pn(s.key??s.label,l.key??l.label)),r}function r_(e){const t=new Map;for(const r of e){const s=r.tableId??`name:${r.tableName}`,l=t.get(s)??{tableName:r.tableName,tableId:r.tableId,rows:[]};l.rows.push(r),t.set(s,l)}const a=[];for(const r of t.values()){const s=u=>Object.values(u.marks).filter(c=>c==="o"||c==="triangle"||c==="x").length,l=r.rows.filter(u=>s(u)>0).sort((u,c)=>u.scoredAt.localeCompare(c.scoredAt));if(l.length===0)continue;const i=l.map(u=>{const c=Object.values(u.marks),d=c.filter(p=>p==="o").length,h=c.filter(p=>p==="triangle").length;return Ec(d,h,s(u))});a.push({tableName:r.tableName,tableId:r.tableId,rates:i,times:l.map(u=>u.scoredAt),delta:i.length>=2?i[i.length-1]-i[0]:null})}return a.sort((r,s)=>(s.times[s.times.length-1]??"").localeCompare(r.times[r.times.length-1]??"")),a}function o_(e,t=8){return e.filter(a=>a.latest!=="o").slice(0,t)}function s_(e,t){if(e==null||t==null||e===""||t==="")return 0;if(typeof e=="number"&&typeof t=="number")return e-t;const a=String(e),r=String(t);return+(a>r)-+(a<r)}function l_(e){const t=new Map;let a=0,r=0;const s=e.map((i,u)=>({r:i,at:u})).sort((i,u)=>i.r.answeredAt.localeCompare(u.r.answeredAt)||s_(i.r.id,u.r.id)||i.at-u.at).map(i=>i.r);for(const i of s){if(i.isCorrect==null)continue;const u=i.itemTitle?.trim();if(!u){r++;continue}a++;const c=i.itemId?.trim()||u,d=`${i.trainingType}|${c}`,h=t.get(d)??{trainingType:i.trainingType,itemId:c,title:u,tried:0,wrong:0,latestCorrect:i.isCorrect,latestAt:i.answeredAt,lastSelected:i.selected,setIds:[]};if(h.tried++,i.isCorrect||h.wrong++,h.title=u,h.latestCorrect=i.isCorrect,h.latestAt=i.answeredAt,h.lastSelected=i.selected,i.setId){const p=h.setIds.indexOf(i.setId);p>0&&h.setIds.splice(p,1),p!==0&&h.setIds.unshift(i.setId)}t.set(d,h)}const l=[...t.entries()].map(([i,u])=>({key:i,trainingType:u.trainingType,itemId:u.itemId,title:u.title,tried:u.tried,wrong:u.wrong,rate:u.tried===0?0:(u.tried-u.wrong)/u.tried,latestCorrect:u.latestCorrect,latestAt:u.latestAt,lastSelected:u.lastSelected,setIds:u.setIds}));return l.sort((i,u)=>i.rate-u.rate||u.tried-i.tried||pn(i.title,u.title)),{items:l,counted:a,skippedNoTitle:r}}function i_(e,t=8){return e.filter(a=>!a.latestCorrect).slice(0,t)}function u_(e){const t=new Map;for(const r of e){const s=t.get(r.trainingType)??[];s.push(r),t.set(r.trainingType,s)}const a=[...t.entries()].map(([r,s])=>({trainingType:r,items:s,pending:s.filter(l=>!l.latestCorrect).length}));return a.sort((r,s)=>s.pending-r.pending||r.trainingType.localeCompare(s.trainingType)),a}const ds=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function c_(e){const t=new Map;let a=0;for(const l of e){if(l.latestCorrect)continue;const i=l.setIds[0];if(!i){a++;continue}const u=`${l.trainingType}|${i}`,c=t.get(u)??{setId:i,trainingType:l.trainingType,pending:0};c.pending++,t.set(u,c)}const r=(l,i)=>i.pending-l.pending||l.trainingType.localeCompare(i.trainingType)||l.setId.localeCompare(i.setId),s=[...t.values()];return{sentence:s.filter(l=>ds.includes(l.trainingType)).sort(r),word:s.filter(l=>!ds.includes(l.trainingType)).sort(r),noSet:a}}function d_(e,t,a=5){const r=new Set(t);if(r.size===0)return[];const s=[];for(const l of e){const i=new Set,u=[];for(const c of l.cellLabels)r.has(c)&&!i.has(c)&&(i.add(c),u.push(c));u.length!==0&&s.push({id:l.id,name:l.name,kind:l.kind,covered:u,totalCells:l.cellLabels.length})}return s.sort((l,i)=>i.covered.length-l.covered.length||l.totalCells-i.totalCells||pn(l.name,i.name)),s.slice(0,Math.max(0,a))}function p_(e,t){const a=new Set(e.flatMap(r=>r.covered));return t.filter(r=>!a.has(r))}function h_(e,t){const a=new Map;for(const s of e)for(const l of s.cells){const i=s.labelOf(l);a.has(i)||a.set(i,l)}const r=[];for(const s of t){const l=a.get(s);l!==void 0&&r.push(l)}return r}function ps(e,t,a){return typeof e=="string"&&e?e:t.replace(/\{\{(\w+)\}\}/g,(r,s)=>String(a[s]))}function m_(e,t){const a=Number.isFinite(e)?Math.round(e):0;if(!a||a<=0)return"-";const r=Math.floor(a/60),s=a%60;return t?t(r,s):r>0&&s>0?ps(Vt.t("customers.duration.minSec",{m:r,s,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:r,s}):r>0?ps(Vt.t("customers.duration.min",{m:r,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:r}):ps(Vt.t("customers.duration.sec",{s,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s})}function C_(e,t){const a=[],r=new Set;for(const s of e){const l=t(s);r.has(l)||(r.add(l),a.push({key:l,value:s,pinned:!1}))}return a}function f_(e,t){return e.map(a=>a.key===t?{...a,pinned:!a.pinned}:a)}function b_(e,t){return e.filter(a=>a.key!==t)}function g_(e,t,a){const r=e.filter(d=>d.pinned),s=new Set(r.map(d=>d.key)),l=e.length-r.length,i=[],u=new Set(s);for(const d of t){if(i.length>=l)break;const h=a(d);u.has(h)||(u.add(h),i.push({key:h,value:d,pinned:!1}))}const c=[...i];return e.map(d=>d.pinned?d:c.shift()).filter(d=>d!==void 0)}function y_(e){return e.map(t=>t.value)}function v_(e){const{category:t={},isSelected:a=!1,onClick:r}=e||{},s=t?.key?` icon-grid-menu__button--${t.key}`:"",l=o.useId();return n.jsxs("div",{className:`icon-grid-menu__button-wrapper${s}`,children:[n.jsx("button",{className:`icon-grid-menu__button${a?" icon-grid-menu__button--selected":""}`,"data-key":t?.key,type:"button",onClick:a?void 0:r,"aria-pressed":a,"aria-labelledby":l,children:n.jsx(nt,{icon:t.icon,label:t.label,className:"icon-grid-menu__button-icon",imgClassName:"icon-grid-menu__button-icon-image",maskClassName:"icon-grid-menu__button-icon-mask",svgClassName:"icon-grid-menu__button-icon-svg"})}),n.jsx("span",{id:l,className:"icon-grid-menu__button-label button-1",children:t.label})]})}function __(e){const{categories:t=[],selected:a,onSelect:r,size:s="medium"}=e||{},l=a!==void 0,[i,u]=o.useState(()=>l?null:(t&&t[0]?.key)??null),c=l?a:i,d=o.useRef(r);o.useEffect(()=>{d.current=r});const h=o.useRef(!1),p=(t&&t[0]?.key)??null;o.useEffect(()=>{if(l||h.current||!p)return;h.current=!0;const g=i??p;i==null&&u(g),d.current?.(g)},[l,p]);const m=o.useCallback(g=>{const y=c===g?null:g;h.current=!0,l||u(y),r?.(y)},[c,l,r]);return n.jsx("div",{className:`icon-grid-menu icon-grid-menu--${s}`,children:(t||[]).map(g=>n.jsx(v_,{category:g,isSelected:c===g.key,onClick:()=>m(g.key)},g.key))})}function x_({subs:e=[],selected:t,onSelect:a,size:r="medium"}){const s=r==="small"?32:40;return n.jsx("div",{className:`choice-chips choice-chips--${r}`,children:n.jsx("div",{className:"choice-chips__list",children:e.map(l=>n.jsx(fe,{htmlType:"button",size:s,type:"bar",label:l.label,selected:t===l.key,className:"choice-chips__button",onClick:()=>a?.(l.key)},l.key))})})}function w_({onTermsClick:e,onPrivacyClick:t,contact:a}={}){const r=a?.email??"support@ihab.co.kr",s=a?.tel??"031-380-3724",{t:l}=_e.useTranslation();return n.jsx("footer",{className:"site-footer",children:n.jsxs("div",{className:"safearea",children:[n.jsxs("div",{className:"site-footer__top",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("div",{className:"site-footer__lead h3",children:l("footer.lead",`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
|
|
1037
|
+
</html>`}const U4=1e3;function cs({getElements:e,paperW:t,paperH:a,fileName:r="",onPopupBlocked:s,header:l=""}){const{t:i}=_e.useTranslation(),u=o.useCallback(()=>{q4(e(),t,a,r,l)},[e,t,a,r,l]),c=o.useCallback(()=>{const h=e();if(h.length===0)return;const p=window.open("","_blank");if(!p){s?.();return}p.document.write(us(h,t,a,!1,r,l)),p.document.close()},[e,t,a,r,s,l]),d=o.useCallback(()=>{const h=e();if(h.length===0)return;const p=us(h,t,a,!1,r,l),m=new Blob([p],{type:"text/html;charset=utf-8"}),g=URL.createObjectURL(m),y=(r?is(r):"")||i("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C"),C=Object.assign(document.createElement("a"),{href:g,download:`${y}.html`});document.body.appendChild(C),C.click(),document.body.removeChild(C),setTimeout(()=>URL.revokeObjectURL(g),U4)},[e,t,a,r,l,i]);return{print:u,openNewWindow:c,downloadHtml:d}}function kc(e,t){const{t:a}=_e.useTranslation(),r=t?.paperBands===!0,s=t?.maxItemsPerPage,[l,i]=o.useState("landscape"),[u,c]=o.useState([...dc]),[d,h]=o.useState("show"),[p,m]=o.useState(!0),[g,y]=o.useState(!0),[C,b]=o.useState(!0),[v,f]=o.useState(!0),[B,_]=o.useState(8),[N,x]=o.useState("right"),E=e.length,w=e.some(K=>(K.words??[]).length>1),D=e.some(K=>(K.words??[]).some(M=>!!M.colloquialLabel)),k=pc(e),A=Math.max(1,Math.min(Math.max(E,1),s??Math.max(E,1))),R=Math.min(B,A),$=o.useMemo(()=>k4(e,R),[e,R]),G=$.length>1,T=R,[P,L]=o.useState(!1);o.useEffect(()=>{let K=!1;if(!ia()){L(!1);return}return Promise.all(e.flatMap(M=>(M.words??[]).map(q=>Sl(q.label,q.homonum)))).then(M=>{K||L(M.some(Boolean))},()=>{}),()=>{K=!0}},[e]);const Q=o.useMemo(()=>[hc(a,{hasImage:P,hasColloquial:D,hasCaption:k}),mc(a),...E>0?[vc(a,{hasPairs:w,itemCount:E,max:s})]:[],Cc(a),...T>1?[gc(a)]:[],...w?[yc(a)]:[],...r?[fc(a),bc(a)]:[]],[a,P,D,k,E,w,G,T,r,s]),Z={...wc(a,{contentTypes:u,orientation:l,showOutline:p,cutLine:d,showDivLine:v,showTopInfo:g,showBottomInfo:C}),...E>0?{[a(w?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${R}\uAC1C`}:{},...G?{[a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:N}:{}},F=o.useCallback((K,M)=>{Bc(a,K,M,{setContentTypes:c,setOrientation:i,setShowOutline:m,setCutLine:h,setShowDivLine:f,setShowTopInfo:y,setShowBottomInfo:b})||(M===a("wordTable.filter.itemsPerPagePair","\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218")||M===a("wordTable.filter.itemsPerPageWord","\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218")?_(_c(parseInt(K),E)):M===a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&x(xc(K)))},[a,E]);return{settings:{orientation:l,contentTypes:u,cutLine:d,showOutline:p,showDivLine:v,count:T,showTopInfo:g,showBottomInfo:C},filterSections:Q,filterSelected:Z,handleSelect:F,pages:$,isPaginated:G,pageNumberPosition:N}}function G4({items:e,words:t,baseItem:a,baseContentTypes:r,maxItemsPerPage:s,title:l,subtitle:i,emptyText:u,buttons:c,renderButtons:d,renderFooter:h,footerClassName:p,footerLayout:m,printFileName:g,showSettings:y,autoPrint:C,className:b,onClose:v,scoring:f=!1,onScoreChange:B,printHeader:_,brand:N,code:x,beforeClose:E}){const{t:w}=_e.useTranslation(),D=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(t)?t:[]).filter(H=>typeof H=="string"&&H.length>0).map((H,ie)=>({id:`${H}-${ie}`,words:[{label:H}]})),[e,t]),{settings:k,filterSections:A,filterSelected:R,handleSelect:$,pages:G,isPaginated:T,pageNumberPosition:P}=kc(D,{paperBands:!!N?.show,maxItemsPerPage:s}),L=o.useMemo(()=>tc(G.map(H=>H.length)),[G]),[Q,Z]=o.useState({}),F=o.useCallback((H,ie)=>{Z(Te=>({...Te,[vr(H)]:Ju(Te[vr(H)]??null,ie)}))},[]),K=o.useRef(B);o.useEffect(()=>{K.current=B});const M=o.useRef(Q);o.useEffect(()=>{M.current!==Q&&(M.current=Q,K.current?.(es(Q)))},[Q]);const q=o.useMemo(()=>es(Q),[Q]),Y=o.useRef(null),{toastMessage:U,toastKey:S,showWarning:I,clearToast:O}=Vi("warning"),z=o.useRef([]),se=o.useCallback(()=>T?z.current.filter(H=>H!==null):Y.current?[Y.current]:[],[T]),{print:te,openNewWindow:de}=cs({getElements:se,paperW:Qn[k.orientation].width,paperH:Qn[k.orientation].height,fileName:g??"",header:_??"",onPopupBlocked:()=>I(w("wordTable.popupBlocked","\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694."))}),ee=o.useMemo(()=>h?void 0:d?d({print:te,openNewWindow:de}):g?[{label:w("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>de()},{label:w("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>te()},...c??[]]:c,[h,d,g,c,w,te,de]),V=o.useMemo(()=>h?h({print:te,openNewWindow:de}):void 0,[h,te,de]),ne=o.useRef(!1),W=o.useRef(te);return o.useEffect(()=>{W.current=te},[te]),o.useEffect(()=>{if(!C||ne.current)return;const H=window.setTimeout(()=>{ne.current=!0,W.current()},100);return()=>window.clearTimeout(H)},[C]),n.jsxs(Hn,{title:l??w("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:i,size:"large",className:we("word-table-popup",b),buttons:ee,footer:V,footerClassName:p,footerLayout:m,beforeClose:E,onClose:v,children:[D.length>0?n.jsxs("div",{className:"word-table-popup__body",children:[y&&n.jsx(ss,{sections:A,selected:R,onSelect:$}),T?n.jsx("div",{className:"word-table-popup__pages",children:G.map((H,ie)=>n.jsx(va,{items:H,orientation:k.orientation,contentTypes:k.contentTypes,baseItem:a,baseContentTypes:r,cutLine:k.cutLine,showOutline:k.showOutline,showDivLine:k.showDivLine,count:k.count,contentRef:Te=>{z.current[ie]=Te},pageNumber:{current:ie+1,total:G.length},pageNumberPosition:P,brand:N&&{...N,top:k.showTopInfo,bottom:k.showBottomInfo},code:x,scoring:f,scoreIndexOffset:L[ie],marks:q,onMarkClick:F},ie))}):n.jsx("div",{className:"word-table-popup__table",children:n.jsx(va,{items:D,orientation:k.orientation,contentTypes:k.contentTypes,baseItem:a,baseContentTypes:r,cutLine:k.cutLine,showOutline:k.showOutline,showDivLine:k.showDivLine,count:k.count,contentRef:Y,fitHeight:!0,scoring:f,marks:q,onMarkClick:F,brand:N&&{...N,top:k.showTopInfo,bottom:k.showBottomInfo},code:x})})]}):n.jsx("p",{className:"word-table-popup__empty body-3",children:u??w("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsx(ba,{message:U,position:"top",onClose:O},S)]})}const K4=new Set(["x","triangle"]);function Y4(e,t){const a=[];for(let r=0;r<e.length;r++){const s=t[String(r)];s&&K4.has(s)&&a.push(e[r])}return a}const Z4=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function Ac(e){const t=e.name.trim(),a=e.reviewRound;if(typeof a=="number"&&Number.isFinite(a)&&a>=0){const l=Math.floor(a);if(l===0)return{base:t,round:1};const i=(l===1?/\s*복습\s*\d{2}\.\d{2}$/:new RegExp(`(?:^|\\s)${l}\uCC28\\s*\uBCF5\uC2B5\\s*\\d{2}\\.\\d{2}$`)).exec(t);return{base:i?t.slice(0,i.index).trim():t,round:l+1}}let r=t,s=1;for(;;){const l=Z4.exec(r);if(!l)break;s=Math.max(s,(l[1]?Number(l[1]):1)+1),r=r.slice(0,l.index).trim()}return{base:r,round:s}}function X4(e,t){const[,a,r]=io(t).split("-"),s=`${a}.${r}`,{base:l,round:i}=Ac(typeof e=="string"?{name:e}:e),u=i>=2?`${i}\uCC28 `:"";return`${l||"\uB2E8\uC5B4\uD45C"} ${u}\uBCF5\uC2B5 ${s}`}function J4(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:Ac(e).round}}function Q4(e,t){const a={};for(const[r,s]of Object.entries(t)){if(s!=="o"&&s!=="triangle"&&s!=="x")continue;const l=Number(r),i=e[l];i&&(a[r]=i)}return a}function e_(e){return e.map(t=>t.label).join(" / ")}function t_(e){return e.map(t=>t.homonum!=null?`${t.label}#${t.homonum}`:t.label).join(" / ")}function Nc(e){return e.split(" / ").map(t=>t.replace(/#\d+$/,"")).join(" / ")}function n_(e,t,a){const r=Ul(a);return[e.trim(),r,t.trim()].filter(Boolean).join(" \xB7 ")}function Ec(e,t,a){return a===0?0:(e+t*.5)/a}function a_(e){const t=new Map,a=[...e].sort((s,l)=>s.scoredAt.localeCompare(l.scoredAt));for(const s of a)for(const[l,i]of Object.entries(s.marks)){const u=s.labels?.[l];if(!u)continue;const c=t.get(u)??{o:0,triangle:0,x:0,latest:i,latestAt:s.scoredAt};if(i==="o")c.o++;else if(i==="triangle")c.triangle++;else if(i==="x")c.x++;else continue;c.latest=i,c.latestAt=s.scoredAt,t.set(u,c)}const r=[];for(const[s,l]of t){const i=l.o+l.triangle+l.x;r.push({label:Nc(s),key:s,tried:i,o:l.o,triangle:l.triangle,x:l.x,rate:Ec(l.o,l.triangle,i),latest:l.latest,latestAt:l.latestAt})}return r.sort((s,l)=>s.rate-l.rate||l.tried-s.tried||hn(s.label,l.label)||hn(s.key??s.label,l.key??l.label)),r}function r_(e){const t=new Map;for(const r of e){const s=r.tableId??`name:${r.tableName}`,l=t.get(s)??{tableName:r.tableName,tableId:r.tableId,rows:[]};l.rows.push(r),t.set(s,l)}const a=[];for(const r of t.values()){const s=u=>Object.values(u.marks).filter(c=>c==="o"||c==="triangle"||c==="x").length,l=r.rows.filter(u=>s(u)>0).sort((u,c)=>u.scoredAt.localeCompare(c.scoredAt));if(l.length===0)continue;const i=l.map(u=>{const c=Object.values(u.marks),d=c.filter(p=>p==="o").length,h=c.filter(p=>p==="triangle").length;return Ec(d,h,s(u))});a.push({tableName:r.tableName,tableId:r.tableId,rates:i,times:l.map(u=>u.scoredAt),delta:i.length>=2?i[i.length-1]-i[0]:null})}return a.sort((r,s)=>(s.times[s.times.length-1]??"").localeCompare(r.times[r.times.length-1]??"")),a}function o_(e,t=8){return e.filter(a=>a.latest!=="o").slice(0,t)}function s_(e,t){if(e==null||t==null||e===""||t==="")return 0;if(typeof e=="number"&&typeof t=="number")return e-t;const a=String(e),r=String(t);return+(a>r)-+(a<r)}function l_(e){const t=new Map;let a=0,r=0;const s=e.map((i,u)=>({r:i,at:u})).sort((i,u)=>i.r.answeredAt.localeCompare(u.r.answeredAt)||s_(i.r.id,u.r.id)||i.at-u.at).map(i=>i.r);for(const i of s){if(i.isCorrect==null)continue;const u=i.itemTitle?.trim();if(!u){r++;continue}a++;const c=i.itemId?.trim()||u,d=`${i.trainingType}|${c}`,h=t.get(d)??{trainingType:i.trainingType,itemId:c,title:u,tried:0,wrong:0,latestCorrect:i.isCorrect,latestAt:i.answeredAt,lastSelected:i.selected,setIds:[]};if(h.tried++,i.isCorrect||h.wrong++,h.title=u,h.latestCorrect=i.isCorrect,h.latestAt=i.answeredAt,h.lastSelected=i.selected,i.setId){const p=h.setIds.indexOf(i.setId);p>0&&h.setIds.splice(p,1),p!==0&&h.setIds.unshift(i.setId)}t.set(d,h)}const l=[...t.entries()].map(([i,u])=>({key:i,trainingType:u.trainingType,itemId:u.itemId,title:u.title,tried:u.tried,wrong:u.wrong,rate:u.tried===0?0:(u.tried-u.wrong)/u.tried,latestCorrect:u.latestCorrect,latestAt:u.latestAt,lastSelected:u.lastSelected,setIds:u.setIds}));return l.sort((i,u)=>i.rate-u.rate||u.tried-i.tried||hn(i.title,u.title)),{items:l,counted:a,skippedNoTitle:r}}function i_(e,t=8){return e.filter(a=>!a.latestCorrect).slice(0,t)}function u_(e){const t=new Map;for(const r of e){const s=t.get(r.trainingType)??[];s.push(r),t.set(r.trainingType,s)}const a=[...t.entries()].map(([r,s])=>({trainingType:r,items:s,pending:s.filter(l=>!l.latestCorrect).length}));return a.sort((r,s)=>s.pending-r.pending||r.trainingType.localeCompare(s.trainingType)),a}const ds=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function c_(e){const t=new Map;let a=0;for(const l of e){if(l.latestCorrect)continue;const i=l.setIds[0];if(!i){a++;continue}const u=`${l.trainingType}|${i}`,c=t.get(u)??{setId:i,trainingType:l.trainingType,pending:0};c.pending++,t.set(u,c)}const r=(l,i)=>i.pending-l.pending||l.trainingType.localeCompare(i.trainingType)||l.setId.localeCompare(i.setId),s=[...t.values()];return{sentence:s.filter(l=>ds.includes(l.trainingType)).sort(r),word:s.filter(l=>!ds.includes(l.trainingType)).sort(r),noSet:a}}function d_(e,t,a=5){const r=new Set(t);if(r.size===0)return[];const s=[];for(const l of e){const i=new Set,u=[];for(const c of l.cellLabels)r.has(c)&&!i.has(c)&&(i.add(c),u.push(c));u.length!==0&&s.push({id:l.id,name:l.name,kind:l.kind,covered:u,totalCells:l.cellLabels.length})}return s.sort((l,i)=>i.covered.length-l.covered.length||l.totalCells-i.totalCells||hn(l.name,i.name)),s.slice(0,Math.max(0,a))}function p_(e,t){const a=new Set(e.flatMap(r=>r.covered));return t.filter(r=>!a.has(r))}function h_(e,t){const a=new Map;for(const s of e)for(const l of s.cells){const i=s.labelOf(l);a.has(i)||a.set(i,l)}const r=[];for(const s of t){const l=a.get(s);l!==void 0&&r.push(l)}return r}function ps(e,t,a){return typeof e=="string"&&e?e:t.replace(/\{\{(\w+)\}\}/g,(r,s)=>String(a[s]))}function m_(e,t){const a=Number.isFinite(e)?Math.round(e):0;if(!a||a<=0)return"-";const r=Math.floor(a/60),s=a%60;return t?t(r,s):r>0&&s>0?ps(qt.t("customers.duration.minSec",{m:r,s,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:r,s}):r>0?ps(qt.t("customers.duration.min",{m:r,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:r}):ps(qt.t("customers.duration.sec",{s,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s})}function C_(e,t){const a=[],r=new Set;for(const s of e){const l=t(s);r.has(l)||(r.add(l),a.push({key:l,value:s,pinned:!1}))}return a}function f_(e,t){return e.map(a=>a.key===t?{...a,pinned:!a.pinned}:a)}function b_(e,t){return e.filter(a=>a.key!==t)}function g_(e,t,a){const r=e.filter(d=>d.pinned),s=new Set(r.map(d=>d.key)),l=e.length-r.length,i=[],u=new Set(s);for(const d of t){if(i.length>=l)break;const h=a(d);u.has(h)||(u.add(h),i.push({key:h,value:d,pinned:!1}))}const c=[...i];return e.map(d=>d.pinned?d:c.shift()).filter(d=>d!==void 0)}function y_(e){return e.map(t=>t.value)}function v_(e){const{category:t={},isSelected:a=!1,onClick:r}=e||{},s=t?.key?` icon-grid-menu__button--${t.key}`:"",l=o.useId();return n.jsxs("div",{className:`icon-grid-menu__button-wrapper${s}`,children:[n.jsx("button",{className:`icon-grid-menu__button${a?" icon-grid-menu__button--selected":""}`,"data-key":t?.key,type:"button",onClick:a?void 0:r,"aria-pressed":a,"aria-labelledby":l,children:n.jsx(nt,{icon:t.icon,label:t.label,className:"icon-grid-menu__button-icon",imgClassName:"icon-grid-menu__button-icon-image",maskClassName:"icon-grid-menu__button-icon-mask",svgClassName:"icon-grid-menu__button-icon-svg"})}),n.jsx("span",{id:l,className:"icon-grid-menu__button-label button-1",children:t.label})]})}function __(e){const{categories:t=[],selected:a,onSelect:r,size:s="medium"}=e||{},l=a!==void 0,[i,u]=o.useState(()=>l?null:(t&&t[0]?.key)??null),c=l?a:i,d=o.useRef(r);o.useEffect(()=>{d.current=r});const h=o.useRef(!1),p=(t&&t[0]?.key)??null;o.useEffect(()=>{if(l||h.current||!p)return;h.current=!0;const g=i??p;i==null&&u(g),d.current?.(g)},[l,p]);const m=o.useCallback(g=>{const y=c===g?null:g;h.current=!0,l||u(y),r?.(y)},[c,l,r]);return n.jsx("div",{className:`icon-grid-menu icon-grid-menu--${s}`,children:(t||[]).map(g=>n.jsx(v_,{category:g,isSelected:c===g.key,onClick:()=>m(g.key)},g.key))})}function x_({subs:e=[],selected:t,onSelect:a,size:r="medium"}){const s=r==="small"?32:40;return n.jsx("div",{className:`choice-chips choice-chips--${r}`,children:n.jsx("div",{className:"choice-chips__list",children:e.map(l=>n.jsx(be,{htmlType:"button",size:s,type:"bar",label:l.label,selected:t===l.key,className:"choice-chips__button",onClick:()=>a?.(l.key)},l.key))})})}function w_({onTermsClick:e,onPrivacyClick:t,contact:a}={}){const r=a?.email??"support@ihab.co.kr",s=a?.tel??"031-380-3724",{t:l}=_e.useTranslation();return n.jsx("footer",{className:"site-footer",children:n.jsxs("div",{className:"safearea",children:[n.jsxs("div",{className:"site-footer__top",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("div",{className:"site-footer__lead h3",children:l("footer.lead",`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
|
|
1038
1038
|
\uC2E0\uB8B0\uB97C \uC313\uACE0
|
|
1039
1039
|
\uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`).split(`
|
|
1040
|
-
`).map((i,u,c)=>n.jsxs(o.Fragment,{children:[i,u<c.length-1&&n.jsx("br",{})]},u))})}),n.jsxs("div",{className:"site-footer__links",children:[n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.site.title","\uC0AC\uC774\uD2B8")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:"IHAB"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://speechear.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.malgwi","\uB9D0\uADC0")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.soundDirection","\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/vr-sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.vrSoundDirection","VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/hearing-test-pro",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.hearingTest","\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C")})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.sns.title","SNS")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://blog.naver.com/ihab_official",target:"_blank",rel:"noopener noreferrer",children:l("footer.sns.naverBlog","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.instagram.com/ihab.official.yt/",target:"_blank",rel:"noopener noreferrer",children:"Instagram"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.youtube.com/@%EC%95%84%EC%9D%B4%ED%95%B4%EB%B8%8C-%EA%B3%B5%EC%8B%9D%EC%B1%84%EB%84%90",target:"_blank",rel:"noopener noreferrer",children:"Youtube"})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.policy.title","\uC815\uCC45")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{e&&(i.preventDefault(),e())},children:l("footer.policy.terms","\uC774\uC6A9\uC57D\uAD00")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{t&&(i.preventDefault(),t())},children:l("footer.policy.privacy","\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68")})})]})]})]})]}),n.jsx("hr",{className:"site-footer__rule"}),n.jsxs("div",{className:"site-footer__bottom",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("img",{src:Mo,alt:"IHAB",className:"site-footer__logo"})}),n.jsxs("div",{className:"site-footer__meta",children:[n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.ceo","\uB300\uD45C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.ceoName","\uD55C\uC9C0\uD61C")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.address","\uC8FC\uC18C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.addressValue","\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.bizNo","\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.bizNoValue","526-81-02926")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.support","\uACE0\uAC1D\uC13C\uD130")})," ",n.jsxs("span",{className:"footer-meta caption-1",children:[r," \xA0 ",s]})]})]})]}),n.jsx("div",{className:"site-footer__copyright footer-copyright caption-1",children:"\xA9 IHAB, Inc. All rights reserved."})]})})}function B_({logo:e,logoAlt:t="",logoHref:a,links:r=[],actions:s,className:l,containerClassName:i,renderLink:u,menuLabel:c}){const{t:d}=_e.useTranslation(),h=c??{open:d("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:d("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[p,m]=o.useState(!1),g=o.useId(),y=o.useRef(null);o.useEffect(()=>{if(!p)return;const v=Kn(()=>{const _=document.getElementById(g);_&&_.contains(document.activeElement)&&y.current?.focus(),m(!1)}),f=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,B=_=>{_.matches&&m(!1)};return f&&(f.matches&&m(!1),f.addEventListener?.("change",B)),()=>{v(),f?.removeEventListener?.("change",B)}},[p,g]);const C=i?`${i} landing-header__inner`:"landing-header__inner",b=(v,f)=>u?u(v,{onClick:f}):n.jsx("a",{href:v.href,onClick:f,"aria-current":v.current?"page":void 0,children:v.label});return n.jsxs("header",{className:l?`landing-header ${l}`:"landing-header",children:[n.jsxs("div",{className:C,children:[e!=null&&(()=>{const v=typeof e=="string"?n.jsx("img",{src:e,alt:t,className:"landing-header__logo"}):e;return a?n.jsx("a",{href:a,className:"landing-header__brand",children:v}):n.jsx("div",{className:"landing-header__brand",children:v})})(),r.length>0&&n.jsx("nav",{className:"landing-header__links",children:r.map((v,f)=>n.jsx("span",{children:b(v)},`${f}:${v.href}`))}),n.jsxs("div",{className:"landing-header__actions",children:[s,r.length>0&&n.jsx("button",{ref:y,type:"button",onClick:()=>m(v=>!v),"aria-expanded":p,"aria-controls":g,"aria-label":p?h.close:h.open,className:p?"landing-header__toggle landing-header__toggle--open":"landing-header__toggle",children:n.jsxs("span",{className:"landing-header__burger",children:[n.jsx("span",{}),n.jsx("span",{}),n.jsx("span",{})]})})]})]}),r.length>0&&n.jsx("nav",{id:g,hidden:!p,className:"landing-header__drawer",children:n.jsx("div",{className:i??void 0,children:r.map((v,f)=>n.jsx("span",{className:"landing-header__drawer-item",children:b(v,()=>m(!1))},`${f}:${v.href}`))})})]})}function k_({children:e,action:t,onClick:a,className:r}){const s=a?"bottom-sticky__inner bottom-sticky__inner--clickable":"bottom-sticky__inner";return n.jsx("div",{className:r?`bottom-sticky ${r}`:"bottom-sticky",children:n.jsxs("div",{className:s,onClick:a,...Yu(a),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function A_({mountedRef:e}){const t=o.useRef({phase:"sound",at:0}),a=o.useRef(0),r=o.useRef(null),s=o.useRef(null),l=o.useCallback(()=>{const C=t.current,b=C.phase!=="sound"&&C.at>0;s.current=b?{phase:C.phase,elapsed:Math.max(0,Date.now()-C.at)}:null},[]),i=o.useCallback(()=>{const C=s.current;return s.current=null,C},[]),u=o.useCallback(()=>{a.current+=1,t.current={phase:"sound",at:0}},[]),c=o.useCallback((C,b,v=0)=>{if(!(C>0))return Promise.resolve(!0);const f=a.current;return t.current={phase:b,at:Date.now()-Math.max(0,v)},new Promise(B=>{const _=setTimeout(()=>{r.current===_&&(r.current=null),B(!!e.current&&f===a.current)},C);r.current=_})},[e]),d=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),h=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),p=o.useCallback(()=>{const C=t.current;return C.phase!=="sound"&&C.at>0},[]),m=o.useCallback(()=>a.current,[]),g=o.useCallback(C=>C===a.current,[]),y=o.useCallback(()=>{a.current+=1},[]);return o.useEffect(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]),o.useMemo(()=>({positionRef:t,isRunning:p,generation:m,isCurrent:g,abort:u,waitPad:c,enterSound:d,leave:h,pause:l,resume:i,__bumpGenerationForTest:y}),[p,m,g,u,c,d,h,l,i,y])}const xa=9,N_=e=>Math.round(Math.min(xa,Math.max(0,e))/xa*100),E_=e=>e/100*xa,er=2,Dc=.1,D_=e=>Math.min(er,Math.max(0,e)),S_=.1,j_=e=>Math.round(e*1e6)/1e6;function tr(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return D_(t);const a=Math.min(xa,Math.max(0,Number(e.level)||0))/xa,r=Number(e.mainVolume);return r>0?a>0?j_(Math.min(er,Math.max(S_,a/r))):0:1}const Sc=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function jc(e){return Sc(e)}function hs(e){return Sc(e)*tr(e)}function ms(e,t=I1()){const a=Number.isFinite(t)&&t>0?t:1;return Math.min(1,hs(e)/a)}function ea(e,t){const a={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(a.noiseRatio=tr({level:a.level,mainVolume:a.mainVolume})),a}const ta={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},Cs=o.createContext(null);function wr(){return o.useContext(Cs)}const fs=e=>`${P1()}/${e}`,Tc=e=>Array.from({length:10},(t,a)=>fs(`${e}-${String(a+1).padStart(2,"0")}.mp3`)),Br={get defaultNoise(){return fs("noise1.mp3")},get street(){return Tc("noise2")},get restaurant(){return Tc("noise3")},get buzz(){return fs("noise4.mp3")}};function T_(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return Br.defaultNoise;case"street":return Br.street[t];case"restaurant":return Br.restaurant[t];case"buzz":return Br.buzz;default:return null}}function M_({noisePlayer:e,audioRef:t,playbackStateRef:a,sequencer:r}){const s=o.useRef(e?.registerAnalyser);s.current=e?.registerAnalyser;const l=o.useRef(null),[i,u]=o.useState(null),c=o.useRef(null),d=o.useRef(null),h=o.useRef(null),p=o.useRef(null),m=o.useRef(0),g=o.useRef(null),y=o.useCallback(()=>!!r?.isRunning(),[r]),C=o.useCallback(()=>{p.current!==null&&(cancelAnimationFrame(p.current),p.current=null),g.current!==null&&(clearTimeout(g.current),g.current=null)},[]),b=o.useCallback((N,x=250)=>{const E=l.current;if(!E)return;const w=d.current;if(w){d.current=null;try{E.pause()}catch{}E.src=w,E.load()}if(!E.src)return;m.current+=1,C();try{to(),rr(E).then(R=>{if(l.current===E)try{s.current?.("noise",R)}catch{}})}catch{}const D=E.paused?0:or(E);E.paused&&zn(E,0),E.play().catch(()=>{});const k=performance.now(),A=()=>{const R=Math.min(1,(performance.now()-k)/x);try{zn(E,D+(N-D)*R)}catch{}R<1?p.current=requestAnimationFrame(A):p.current=null};p.current=requestAnimationFrame(A)},[C]),v=o.useCallback((N=250,x)=>{const E=l.current;if(!E||E.paused){x?.();return}const w=++m.current;C();const D=performance.now(),k=or(E),A=()=>{const R=Math.min(1,(performance.now()-D)/N);try{zn(E,k*(1-R))}catch{}if(R<1)p.current=requestAnimationFrame(A);else{p.current=null,g.current!==null&&(clearTimeout(g.current),g.current=null);try{E.pause()}catch{}x?.()}};p.current=requestAnimationFrame(A),g.current=setTimeout(()=>{if(g.current=null,m.current===w){p.current!==null&&(cancelAnimationFrame(p.current),p.current=null);try{E.paused||(zn(E,0),E.pause(),x?.())}catch{}}},N+150)},[C]);o.useEffect(()=>{const N=document.createElement("audio");return N.loop=!0,N.crossOrigin="anonymous",l.current=N,()=>{C();try{N.pause(),N.removeAttribute("src"),N.load()}catch{}l.current=null,c.current=null,d.current=null}},[C]);const f=e?ms(e.settings):0,B=!!e?.settings.enabled&&f>0;o.useEffect(()=>{if(!B)return;let N=0;const x=setInterval(()=>{const E=l.current;if(!E||E.paused){N=0;return}const w=t.current;if(w&&!w.paused&&!w.ended||y()||a.current==="playing"){N=0;return}N+=1,N>=2&&(N=0,v())},400);return()=>clearInterval(x)},[v,B,t,a,y]),o.useEffect(()=>{const N=()=>{const x=l.current;if(document.hidden){if(x&&!x.paused){C();try{x.pause()}catch{}}return}if(!x||!x.paused)return;const E=t.current,w=!!E&&!E.paused&&!E.ended||y()||a.current==="playing",D=h.current;w&&D?.enabled&&D.volume>0&&b(D.volume)};return document.addEventListener("visibilitychange",N),()=>document.removeEventListener("visibilitychange",N)},[C,b,t,a,y]),o.useEffect(()=>{h.current=e?{enabled:e.settings.enabled,volume:f,type:e.settings.type}:null},[e,e?.settings.enabled,f,e?.settings.type]);const _=o.useRef(null);return o.useEffect(()=>()=>{_.current?.(),_.current=null},[]),o.useEffect(()=>{const N=e?.settings,x=l.current;if(!x)return;const E=N?ms(N):0;if(!N||!N.enabled||E===0){v();return}if(c.current!==N.type){const w=T_(N.type);w&&(c.current=N.type,u(w),d.current=w,v(150,()=>{if(d.current!==w)return;d.current=null,x.src=w,x.load();const D=t.current;if(D&&!D.paused||y()){_.current?.();const k=()=>{x.removeEventListener("canplay",k),_.current===A&&(_.current=null);const R=t.current,$=h.current;(R&&!R.paused&&!R.ended||y())&&$?.enabled&&$.volume>0&&b($.volume)},A=()=>x.removeEventListener("canplay",k);_.current=A,x.addEventListener("canplay",k)}}))}else{const w=t.current,D=!!w&&!w.paused&&!w.ended||y()||a.current==="playing";if(D&&d.current)b(E);else if(D&&x.paused&&x.src)b(E);else if(!x.paused)if(!D)v();else{C();const k=or(x),A=performance.now(),R=()=>{const $=Math.min(1,(performance.now()-A)/150);try{zn(x,k+(E-k)*$)}catch{}$<1?p.current=requestAnimationFrame(R):p.current=null};p.current=requestAnimationFrame(R)}}},[e?.settings,e?.settings.enabled,f,e?.settings.type,C,b,v,t,a,h,y]),o.useEffect(()=>{const N=l.current;if(N)try{N.playbackRate=Math.min(1.25,Math.max(.75,e?.settings.speed??1))}catch{}},[e?.settings.speed]),{noiseAudioRef:l,activeNoiseUrl:i,noiseSettingsRef:h,cancelNoiseFade:C,fadeInNoise:b,fadeOutNoise:v}}function L_({ttsText:e,playbackRate:t,mainVolume:a,fillRef:r,waveProgressRef:s,setProgress:l,setPlaybackState:i,setStateLocal:u,fadeInNoise:c,fadeOutNoise:d,noiseSettingsRef:h,onDoneRef:p,handleEndRef:m}){const g=o.useRef(null),y=o.useRef(0),C=o.useRef(null),b=o.useRef(0),v=o.useRef(!1);o.useEffect(()=>()=>{b.current++;try{if(C.current&&(cancelAnimationFrame(C.current),C.current=null),v.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}v.current=!1}}catch{}},[]);const f=(N,x=1)=>{try{const E=(N||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(N||"").length);return Math.max(700,Math.round(E*300/Math.max(.25,x)))}catch{return 1200}},B=o.useCallback(N=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof p.current=="function"&&p.current(!1)}catch{}return}const x=window.speechSynthesis,E=++b.current;try{try{x.cancel()}catch{}const w=N??e,D=Array.isArray(w)?w.filter(T=>!!T):[w||""];D.length===0&&D.push("");const k=Math.max(.3,Math.min(3,t));y.current=D.reduce((T,P)=>T+f(P,k||1),0),g.current=performance.now(),l(0),i("playing"),u("playMode");const A=h.current;A?.enabled&&(A?.volume??0)>0&&c(A.volume);const R=()=>{try{const T=g.current||performance.now(),P=performance.now()-T,L=y.current||1200,Q=Math.min(1,P/L);try{r.current&&(r.current.style.left=`${Q*100}%`),s.current&&s.current.style.setProperty("--progress",String(Q))}catch{}Q<1&&(C.current=requestAnimationFrame(R))}catch{}},$=()=>{if(E===b.current)try{C.current&&(cancelAnimationFrame(C.current),C.current=null),l(1),i("stopped");try{m.current?.()}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{}},G=T=>{const P=new SpeechSynthesisUtterance(D[T]);try{P.rate=k}catch{}try{P.volume=Math.max(0,Math.min(1,a))}catch{}P.onend=()=>{if(E===b.current){if(T<D.length-1){try{G(T+1)}catch{$()}return}$()}},P.onerror=()=>{$()},P.onstart=()=>{if(!(T>0))try{C.current&&(cancelAnimationFrame(C.current),C.current=null),C.current=requestAnimationFrame(R)}catch{}},v.current=!0,x.speak(P)};try{G(0)}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}},[e,t,a,c,r,s,l,i,u,h,p,m]),_=o.useCallback(()=>{b.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}C.current&&(cancelAnimationFrame(C.current),C.current=null),d(),g.current=null}catch{}i("stopped"),u("active"),l(0)},[d,i,u,l]);return{startTTS:B,stopTTS:_}}const $_=.01,R_=.3;async function P_(e,t,a,r=!1){let s=null;try{const l=window.AudioContext||window.webkitAudioContext;s=new l;const i=await s.decodeAudioData(e.slice(0)),u=i.numberOfChannels>0?i.getChannelData(0):null;if(!u)return null;let c=0;if(r){const g=Math.floor(R_*i.sampleRate),y=Math.min(u.length,g);for(;c<y&&Math.abs(u[c])<=$_;)c++;c>=y&&(c=0)}const d=u.length-c,h=a&&a>0?Math.min(d,Math.floor(a*i.sampleRate)):d,p=Math.max(t,h),m=Math.floor(p/t)||1;return new Array(t).fill(0).map((g,y)=>{const C=c+y*m,b=Math.min(C+m,c+p,u.length);let v=0;for(let f=C;f<b;f++){const B=Math.abs(u[f]);B>v&&(v=B)}return v})}catch{return null}finally{try{s?.close?.()}catch{}}}async function Mc(e,t,a,r=!1){try{const s=await fetch(e);if(s.ok===!1)return null;const l=await s.arrayBuffer();return await P_(l,t,a,r)}catch(s){try{const l=Il(s)}catch{}return null}}const bs=45,I_=74,F_=2;function kr(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function Ar(e){return kr(e)/45}const O_=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),Lc=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function $c({durationsSec:e,leadInMs:t=0,tailMs:a=0}){const r=Lc(t),s=Lc(a),l=[];let i=0;return e.forEach((u,c)=>{for(const[d,h]of[["lead",r],["sound",O_(u)],["tail",s]])l.push({kind:d,track:c,startMs:i,durMs:h}),i+=h}),{segments:l,totalMs:i,trackCount:e.length}}function Rc(e,t){const a=(t|0)*3;if(t<0||a+2>=e.segments.length)return null;const[r,s,l]=[e.segments[a],e.segments[a+1],e.segments[a+2]];return{lead:r,sound:s,tail:l,totalMs:r.durMs+s.durMs+l.durMs}}function z_(e,t){const a=Rc(e,t.track);if(!a||!(a.totalMs>0))return 0;const r=a[t.kind],s=Math.min(Math.max(0,Number.isFinite(t.elapsedMs)?t.elapsedMs:0),r.durMs);return Math.max(0,Math.min(1,(r.startMs-a.lead.startMs+s)/a.totalMs))}function W_(e,t,a){const r=Math.max(0,Math.floor(a)),s=Rc(e,t);if(!s||r===0||!(s.totalMs>0)||s.lead.durMs===0&&s.tail.durMs===0||!(s.sound.durMs>0))return{lead:0,sound:r,tail:0};const l=Math.round(s.lead.durMs/s.totalMs*r),i=Math.round(s.tail.durMs/s.totalMs*r),u=Math.max(1,r-l-i),c=l+u+i-r;return{lead:Math.max(0,l-Math.ceil(c/2)),sound:u,tail:Math.max(0,i-Math.floor(c/2))}}function H_({currentTime:e,sources:t,index:a,audioDuration:r}){const s=a||0,l=Array.isArray(t)&&t.length>0?t[s]:void 0,i=l?l.duration||r||0:r||0;if(!(i>0))return 0;const u=Number.isFinite(e)?e:0;return Math.max(0,Math.min(1,u/i))}function V_({phase:e,phaseElapsedMs:t,currentTime:a,trackDurationSec:r,leadInMs:s,tailMs:l}){const i=$c({durationsSec:[r],leadInMs:s,tailMs:l});return z_(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(a)?a:0)*1e3:t})}function q_({bars:e,trackDurationSec:t,leadInMs:a,tailMs:r}){return W_($c({durationsSec:[t],leadInMs:a,tailMs:r}),0,e)}function U_(e,t){if(!Array.isArray(e))return null;const a=t||0;return a<e.length-1?a+1:null}function G_({ended:e,completedByEnd:t}){return!!e||!!t}function K_(e){return e.map((t,a)=>({src:t.src,label:String(a+1),color:void 0,duration:t.duration||0}))}function Y_(e){return e.reduce((t,a)=>t+(a.duration||0),0)}function Z_(e,t,a){const r=Array.isArray(e)?e:e?[e]:[],s=[];for(const l of r)if(l){if(typeof l=="object"&&l!==null&&"src"in l&&l.src){const i=l;s.push({code:i.code??null,src:i.src});continue}if(typeof l=="string"&&(l.startsWith("http")||l.includes("/"))){s.push({code:null,src:l});continue}if(typeof l=="string"||typeof l=="number"){const i=String(l),u=a(i,t);u&&s.push({code:i,resolvedPath:u})}}return s}function X_(e,t){if(!t||e.readyState<1)return!0;const a=e.currentSrc||e.src;return a?Pc(a)!==Pc(t):!0}function Pc(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const Ic=4,J_=Ar(Ic/bs);function Q_(e){const{src:t,segments:a,progress:r=0,waveProgressRef:s,noiseSrc:l,noiseRatio:i=0,noiseSpeed:u=1,totalDuration:c=0,mainVolume:d=1,onReadyChange:h,showSoundWaveForm:p=!0,leadInMs:m=0,tailMs:g=0,trackDurationSec:y=0}=e,C=o.useRef(null),b=o.useRef(null),[v,f]=o.useState(null),[B,_]=o.useState(!1),[N,x]=o.useState(null),[E,w]=o.useState(2),[D,k]=o.useState(0),[A,R]=o.useState(null),[$,G]=o.useState(!1),[T,P]=o.useState(!1),L=3,Q=3,Z=1,F=300,K=o.useRef(0),M=o.useCallback(()=>{const ye=C.current,he=b&&b.current?b.current:ye?ye.closest(".audio-player__wave"):null,Se=he?he.getBoundingClientRect():ye?ye.getBoundingClientRect():null,$e=Se?Se.width:0,Ne=Se?Math.max(100,Se.width):320,ue=Se?Se.height:0,xe=Math.max(Z,Math.min(F,Math.floor((Ne+Q)/(L+Q)))),ke=xe*L,Ee=Math.max(0,xe-1),We=Math.max(0,Ee>0?(Ne-ke)/Ee:Q);return{bars:xe,gap:We,height:ue,width:$e}},[]),q=o.useRef(void 0),Y=o.useRef(null),U=o.useCallback(async(ye,he,{quiet:Se=!1}={})=>{const $e=++K.current,Ne=()=>K.current===$e;try{if(Se||_(!1),q.current=ye,!ye){Ne()&&f(null);return}let ue=he;if(!ue)try{for(let Ee=0;Ee<4&&!(C.current||b.current);Ee++)await new Promise(We=>requestAnimationFrame(We));await new Promise(Ee=>requestAnimationFrame(Ee));const ke=M();ke.height>0&&k(ke.height),ue=ke.bars,w(ke.gap)}catch{ue=120}Y.current=ue;const xe=await Mc(ye,ue);if(!Ne())return;if(!xe){f(null),_(!1);return}f(xe),x(ue),_(!0)}catch{if(!Ne())return;f(null),_(!1)}},[_,f,k,w,x,M]);o.useEffect(()=>{const ye=b.current;if(!ye||typeof ResizeObserver>"u")return;let he=null;const Se=new ResizeObserver(()=>{he!==null&&cancelAnimationFrame(he),he=requestAnimationFrame(()=>{he=null;try{const $e=M();if($e.width<=0||($e.height>0&&k($e.height),Y.current===null||$e.bars===Y.current))return;const Ne=q.current;w($e.gap),Ne?U(Ne,$e.bars,{quiet:!0}).catch(()=>{}):Y.current=$e.bars}catch{}})});return Se.observe(ye),()=>{Se.disconnect(),he!==null&&cancelAnimationFrame(he)}},[M,U]),o.useEffect(()=>{const ye=a&&a[0]&&a[0].src||t||a&&a.length===1&&a[0]&&a[0].src;U(typeof ye=="string"?ye:void 0).catch(()=>{}),P(!1)},[t,a,U]),o.useEffect(()=>{let ye=!1;if(G(!1),R(null),!l||!N)return;const he=c>0?c*(u||1):void 0;return Mc(l,N,he,!0).then(Se=>{ye||(R(Se),Se||G(!0))}).catch(()=>{ye||(R(null),G(!0))}),()=>{ye=!0}},[l,N,c,u]);const S=Math.max(0,Math.min(1,d)),I=o.useMemo(()=>v&&v.length&&Math.max(...v)||1,[v]),O=N||40,z=o.useMemo(()=>q_({bars:O,trackDurationSec:y,leadInMs:m,tailMs:g}),[O,y,m,g]),se=o.useMemo(()=>Array.from({length:O}).map((ye,he)=>{const Se=he>=z.lead&&he<z.lead+z.sound,$e=z.sound>0&&Se?Math.min(O-1,Math.round((he-z.lead)/z.sound*O)):-1,Ne=Se?v&&v[$e]!=null?v[$e]:null:v?0:null,ue=Ne==null?null:Math.min(1,Ne/I*S),xe=ue!=null&&D>0&&kr(ue)<=Ic,ke=ue==null?.15:xe?0:Ar(ue),Ee=xe,We=O>1?he/(O-1):0;return n.jsx("div",{className:Ee?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":ke,"--i":he,"--mix":We}},he)}),[O,v,I,S,D,z]),te={"--progress":String(Math.max(0,Math.min(1,r)))},de=o.useMemo(()=>A&&A.length&&Math.max(...A.map(ye=>Number.isFinite(ye)?Math.abs(ye):0))||1,[A]),ee=S*Math.max(0,i),V=!l||!A||!A.length?1:Math.max(1,ee),ne={"--bar-gap":`${E}px`,"--wave-h":`${kr(V)}px`,"--wave-h1":`${bs}px`},W=B&&(l?!!A||$:!0);o.useEffect(()=>{W&&P(!0)},[W]);const H=T?B:W;o.useEffect(()=>{h?.(H)},[H,h]);const ie=N||40,Te=o.useMemo(()=>Array.from({length:ie}).map((ye,he)=>{const Se=A&&A[he]!=null?A[he]:null,$e=Se==null?0:Math.abs(Se)/de*ee,Ne=Math.max(J_,Ar($e)),ue=ie>1?he/(ie-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":Ne,"--i":he,"--mix":ue}},he)}),[ie,A,de,ee,D]);return n.jsxs("div",{className:"audio-player__wave",ref:b,style:ne,children:[l&&n.jsx("div",{className:`audio-player__wave-noise ${W?"is-ready":""}`,"aria-hidden":"true",children:Te}),p&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${H?"is-ready":""}`,ref:C,children:se}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${H?"is-ready":""}`,ref:s,style:te,children:se})]})]})}const Fc={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function gs(e,t){return new Promise((a,r)=>{const s=document.createElement("audio");let l=!1;const i=()=>{try{s.removeAttribute("src"),s.load()}catch{}},u=()=>{if(l)return;l=!0;const d=isFinite(s.duration)&&s.duration||0;i(),a(d)},c=d=>{l||(l=!0,i(),t.rejectOnError?r(new Error(d)):a(0))};s.addEventListener("loadedmetadata",u),s.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),t.timeoutMs),s.src=e})}const ex=2e3;function Oc(e,t=ex){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.addEventListener("canplay",s,{once:!0}),e.addEventListener("error",s,{once:!0}),setTimeout(s,t)})}function tx({showSoundWaveForm:e,showNoiseWaveForm:t,timeoutMs:a=2500}){const r=o.useRef(!1),s=o.useRef([]),l=o.useCallback(c=>{if(r.current=c,!c||!s.current.length)return;const d=s.current;s.current=[];for(const h of d)h(!0)},[]),i=o.useCallback(()=>{r.current=!1},[]),u=o.useCallback(()=>!e&&!t||r.current?Promise.resolve(!0):new Promise(c=>{const d=p=>{clearTimeout(h),s.current=s.current.filter(m=>m!==d),c(p)},h=setTimeout(()=>d(!0),a);s.current.push(d)}),[e,t,a]);return o.useEffect(()=>()=>{const c=s.current;s.current=[];for(const d of c)d(!1)},[]),{onReadyChange:l,waitForReady:u,markNotReady:i}}function nx(){const e=o.useRef([]),t=o.useCallback(s=>(e.current.push(s),s),[]),a=o.useCallback(s=>{const l=new Set([...s].filter(Boolean));e.current=e.current.filter(i=>{if(l.has(i))return!0;try{URL.revokeObjectURL(i)}catch{}return!1})},[]),r=o.useCallback(()=>{a([])},[a]);return o.useEffect(()=>()=>{for(const s of e.current)try{URL.revokeObjectURL(s)}catch{}e.current=[]},[]),{track:t,keepOnly:a,revokeAll:r}}function ax({offsetY:e=8}={}){const t=o.useRef(null),[a,r]=o.useState(null),s=o.useCallback(()=>r(null),[]),l=o.useCallback(()=>{try{const i=t.current?.getBoundingClientRect();if(!i)return;r({left:i.left,right:i.right,width:i.width,height:i.height,x:i.x,top:i.top+e,bottom:i.bottom+e,y:i.y+e,toJSON:i.toJSON.bind(i)})}catch{}},[e]);return o.useEffect(()=>{if(a)return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[a,s]),{ref:t,rect:a,show:l,hide:s}}function rx(e){if(!e)return 0;const t=e.duration;if(Number.isFinite(t)&&t>0)return t;if(t===0)return 0;try{const a=e.seekable;if(a&&a.length>0){const r=a.end(a.length-1);if(Number.isFinite(r)&&r>0)return r}}catch{}return null}const ox=400,sx=2e3,zc=5;function lx({audioRef:e,fillRef:t,waveProgressRef:a,sourcesRef:r,currentIndexRef:s,sequencer:l,leadInMs:i=0,tailMs:u=0}){const c=o.useRef(null),d=o.useRef(0),h=o.useRef(null),p=o.useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null)},[]),m=o.useCallback(()=>{if(c.current!==null)return;let y=0;const C=()=>{if(In){const b=typeof performance<"u"&&performance.now?performance.now():Date.now();if(y>0&&b-y>ox){const v=h.current===null||b-h.current>sx;if(h.current=b,v&&d.current<zc){d.current+=1;const f=d.current;let B=null;try{B=typeof document<"u"?document.visibilityState:null}catch{}Nt(`progress-ticker-slow-frames#${f}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(b-y)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,B==="hidden"?"\uC774 \uCE78\uC774 **\uC228\uC5B4 \uC788\uC5B4** \uBE0C\uB77C\uC6B0\uC800\uAC00 \uD2C0\uC744 \uC904\uC600\uC2B5\uB2C8\uB2E4 \u2014 \uC7AC\uC0DD\uBC14\xB7\uD30C\uD615\uC740 \uD2C0\uB9C8\uB2E4 \uADF8\uB824\uC9C0\uBBC0\uB85C, \uC9C0\uAE08 \uC7AC\uB294 \uAC12\uC740 **\uC0AC\uB78C\uC774 \uBCF4\uB294 \uD654\uBA74\uACFC \uB2E4\uB985\uB2C8\uB2E4.** \uCE78\uC744 \uC55E\uC73C\uB85C \uAEBC\uB0B4\uACE0 \uB2E4\uC2DC \uC7AC\uC2ED\uC2DC\uC624.":"\uCE78\uC740 \uBCF4\uC774\uB294\uB370 \uD2C0\uC774 \uB290\uB9BD\uB2C8\uB2E4 \u2014 \uAC19\uC740 \uD654\uBA74\uC5D0\uC11C \uBB34\uAC70\uC6B4 \uC77C\uC774 \uB3C4\uB294\uC9C0 \uBCF4\uC2ED\uC2DC\uC624. \uC7AC\uC0DD\uBC14\xB7\uD30C\uD615\uC774 \uB04A\uACA8 \uBCF4\uC774\uB294 \uAC83\uC740 \uC774 \uD0D3\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.",f>=zc?`(${f}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${f}\uBC88\uC9F8)`)}}y=b}try{const b=e.current,v=Array.isArray(r.current)?r.current[s.current||0]:void 0,f=!!v&&Number.isFinite(v.duration)&&(v.duration??0)>0,B=f?0:rx(b),_=t.current,N=(i||0)>0||(u||0)>0,x=N&&(l?.positionRef.current?.phase??"sound")!=="sound";if(B===null&&!x)try{_&&_.style.visibility!=="hidden"&&(_.style.visibility="hidden")}catch{}else{const E=f?v.duration:B||0;In&&x&&!(E>0)&&Nt("progress-ticker-pad-without-duration","[ihab-core] \uB738\uC774 \uB3C4\uB294\uB370 **\uC18C\uB9AC \uAE38\uC774\uB97C \uBAA8\uB985\uB2C8\uB2E4** \u2014 \uC7AC\uC0DD\uBC14\uAC00 \uB738\uB9CC\uC73C\uB85C \uC5B4\uB9BC\uC7A1\uC544 \uC6C0\uC9C1\uC785\uB2C8\uB2E4.","\uC18C\uB9AC \uAE38\uC774 \uC7AC\uAE30(measureAudioDuration)\uAC00 0 \uC744 \uC92C\uAC70\uB098 `<audio>` \uAC00 \uC544\uC9C1 \uC548 \uC2E4\uB838\uC2B5\uB2C8\uB2E4. \uAE38\uC774\uB97C \uC54C\uAC8C \uB418\uBA74 \uB9C8\uCEE4\uAC00 \uADF8 \uC21C\uAC04 **\uB4A4\uB85C \uBB3C\uB7EC\uB0A9\uB2C8\uB2E4**(\uC5B4\uB9BC\uC740 \uB298 \uCC38\uBCF4\uB2E4 \uD07D\uB2C8\uB2E4). \uC774 \uC904\uC774 \uBCF4\uC774\uBA74 \uADF8 \uC790\uB9AC\uB97C \uC54C\uB824 \uC8FC\uC2ED\uC2DC\uC624 \u2014 \uD3C9\uC18C \uAE38\uC5D0\uC11C\uB294 \uC548 \uB098\uC640\uC57C \uD569\uB2C8\uB2E4.");const w=N?V_({phase:l?.positionRef.current?.phase??"sound",phaseElapsedMs:l?.positionRef.current?Math.max(0,Date.now()-l.positionRef.current.at):0,currentTime:b&&typeof b.currentTime=="number"?b.currentTime:0,trackDurationSec:E,leadInMs:i||0,tailMs:u||0}):H_({currentTime:b&&typeof b.currentTime=="number"?b.currentTime:0,sources:r.current,index:s.current,audioDuration:B??0});try{_&&(_.style.visibility&&(_.style.visibility=""),_.style.left=`${w*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(w))}catch{}}}catch{}c.current=requestAnimationFrame(C)};c.current=requestAnimationFrame(C)},[e,t,a,r,s,l,i,u]),g=o.useCallback(y=>{p();try{t.current&&(t.current.style.visibility="",t.current.style.left=`${y*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(y))}catch{}},[p,t,a]);return o.useEffect(()=>p,[p]),{start:m,stop:p,settleTo:g}}function ys({btnLabel:e,soundSrc:t,bucketPath:a,onDone:r,disabled:s=!1,ttsText:l=null,className:i,showSoundWaveForm:u=!0,showNoiseWaveForm:c=!0,leadInMs:d=0,tailMs:h=0}){const{t:p}=_e.useTranslation(),m=e,g=wr(),y=o.useRef(g?.registerAnalyser);o.useEffect(()=>{y.current=g?.registerAnalyser});const C=o.useRef(null),b=o.useRef(null),v=o.useRef(null),f=nx(),B=o.useRef(null),_=o.useRef(!1),N=o.useRef(null),{ref:x,rect:E,show:w,hide:D}=ax();o.useEffect(()=>()=>{y.current?.("main",null),y.current?.("noise",null)},[]);const[k,A]=o.useState(!1),[R,$]=o.useState("idle"),[G,T]=o.useState("stopped"),P=o.useRef("stopped");o.useEffect(()=>{P.current=G},[G]);const[L,Q]=o.useState(0),[Z,F]=o.useState("active"),K=o.useRef(!1);o.useEffect(()=>{if(Z!=="playMode"||!K.current)return;K.current=!1;const X=typeof document<"u"?document.activeElement:null;if(X&&X!==document.body)return;const ce=v.current?.querySelectorAll("button")[1];try{ce?.focus()}catch{}},[Z]);const[M,q]=o.useState(null),[Y,U]=o.useState(null),[S,I]=o.useState(0),[O,z]=o.useState(!1),[se,te]=o.useState(0),de=g?.playbackRate??1,ee=g?.mainVolume??1,V=g?hs(g.settings):0,ne=g?jc(g.settings):ee,[W,H]=o.useState("idle"),[ie,Te]=o.useState(""),[ye]=o.useState("top"),he=o.useRef(null),Se=o.useRef(0),$e=o.useRef(null),Ne=o.useRef(!0),ue=A_({mountedRef:Ne}),xe=o.useRef(null),ke=o.useRef(d),Ee=o.useRef(h);o.useEffect(()=>{ke.current=Math.max(0,d||0)},[d]),o.useEffect(()=>{Ee.current=Math.max(0,h||0)},[h]);const{start:We,stop:He,settleTo:ot}=lx({audioRef:C,fillRef:b,waveProgressRef:$e,sourcesRef:he,currentIndexRef:Se,sequencer:ue,leadInMs:d,tailMs:h}),{onReadyChange:Qe,waitForReady:Je,markNotReady:vt}=tx({showSoundWaveForm:u,showNoiseWaveForm:c}),je=o.useRef(null),Ye=o.useRef(s),Be=o.useRef(r),Ue=o.useRef(null),qe=o.useRef(!1),[pt,_t]=o.useState(!1),Dt=o.useCallback(X=>{qe.current=X,_t(X)},[]),Bt=o.useRef(null),{activeNoiseUrl:st,noiseSettingsRef:tt,fadeInNoise:kt,fadeOutNoise:At}=M_({noisePlayer:g,audioRef:C,playbackStateRef:P,sequencer:ue}),{startTTS:Tt,stopTTS:Lt}=L_({ttsText:l,playbackRate:de,mainVolume:ne,fillRef:b,waveProgressRef:$e,setProgress:Q,setPlaybackState:T,setStateLocal:F,fadeInNoise:kt,fadeOutNoise:At,noiseSettingsRef:tt,onDoneRef:Be,handleEndRef:Bt});o.useEffect(()=>{Pe.current=Lt});const gt=X=>{if(typeof window>"u"||!window.speechSynthesis){try{Te(p("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}Tt(X);return}yt("tts"),Tt(X)},it=Array.isArray(t)?t.filter(Boolean):t?[t]:[],ut=(!it||it.length===0)&&!!l,ct=Array.isArray(M)&&M.length>0?M:Array.isArray(Y)&&Y.length>0?Y:null,ve=Math.max(Array.isArray(ct)?ct.length:0,it.length);o.useEffect(()=>(Ne.current=!0,()=>{Ne.current=!1}),[]);const Me=()=>{ue.abort()},Pe=o.useRef(null),Oe=o.useRef(null),dt=o.useRef(null),St=o.useRef(null);St.current||(St.current=()=>{dt.current=null;const X=C.current;if(Oe.current==="audio"&&X&&(!X.paused||ue.isRunning())){Me();try{X.pause()}catch{}Ne.current&&(T("paused"),He(),At())}else if(Oe.current==="tts")try{Pe.current?.()}catch{}});const yt=X=>{Oe.current=X,dt.current=Ua(St.current)},wt=()=>{dt.current?.(),dt.current=null};o.useEffect(()=>()=>{St.current&&fr(St.current)},[]);const Ct=o.useRef(de);o.useEffect(()=>{Ct.current=de||1},[de]);const Le=o.useCallback(X=>{const ce=Ct.current||1;try{X.defaultPlaybackRate=ce}catch{}try{X.playbackRate=ce}catch{}},[]),at=o.useCallback((X,ce)=>{if(!X_(X,ce)){try{X.currentTime=0}catch{}Le(X);return}X.src=ce,Le(X),X.load(),Le(X)},[Le]),oe=o.useCallback(()=>{Ue.current&&(clearTimeout(Ue.current),Ue.current=null),H("idle")},[]),be=o.useCallback(async(X,ce=3,Ae=50,Ve=0)=>{oe();const Ke=ue.generation(),Ze=!!X&&X.currentTime>0&&!X.ended,ft=Math.max(0,ke.current-Math.max(0,Ve));if(ft>0&&!Ze){yt("audio"),We(),T("playing");const bt=tt.current;if(bt?.enabled&&(bt.volume??0)>0)try{kt(bt.volume)}catch{}if(!await ue.waitPad(ft,"lead",Ve)||!Ne.current||!ue.isCurrent(Ke))return!1}ue.enterSound();for(let bt=0;bt<ce;bt++){if(!Ne.current||!ue.isCurrent(Ke))return!1;try{return yt("audio"),await X.play(),!0}catch(ge){if((ge instanceof Error||typeof ge=="object"&&ge&&"name"in ge?ge.name:void 0)==="AbortError"){if(!ue.isCurrent(Ke))return!1;await new Promise(j=>setTimeout(j,Ae));continue}try{Te(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{Te(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[p,We,ue,kt,tt,oe]),Ie=o.useCallback(X=>{const ce=ue.generation(),Ae=Math.max(0,Ee.current-Math.max(0,X));We();const Ve=tt.current;if(Ve?.enabled&&(Ve.volume??0)>0)try{kt(Ve.volume)}catch{}const Ke=()=>{try{xe.current?.()}catch{}};if(Ae<=0){ue.leave(),Ke();return}ue.waitPad(Ae,"tail",X).then(Ze=>{ue.leave(),Ze&&ue.isCurrent(ce)&&Ke()}).catch(()=>{})},[ue,We,kt,tt]),Xe=o.useCallback(()=>{const X=C.current;if(!X)return;const ce=()=>{T("playing"),F("playMode"),z(!0),We();try{to(),rr(X).then(Ze=>{if(Ne.current)try{y.current?.("main",Ze)}catch{}})}catch{}const Ke=tt.current;Ke?.enabled&&(Ke?.volume??0)>0&&kt(Ke.volume)},Ae=()=>{G_({ended:!!X?.ended,completedByEnd:qe.current})||(T("paused"),He(),At())},Ve=()=>{const Ke=()=>{try{const Ze=he.current,ft=U_(Ze,Se.current);if(ft!==null){Se.current=ft,I(ft),z(!0);const bt=Ze?.[ft]&&Ze[ft].src;if(bt&&X){at(X,bt),be(X).catch(()=>{});return}}}catch{}T("stopped"),Q(1);try{if(X)try{X.currentTime=0}catch{}}catch{}He(),z(!1),At();try{!Ye.current&&Bt.current&&Bt.current()}catch{}};if(xe.current=Ke,Ee.current>0){We(),ue.waitPad(Ee.current,"tail").then(Ze=>{ue.leave(),Ze&&Ke()}).catch(()=>{});return}Ke()};return X.addEventListener("play",ce),X.addEventListener("pause",Ae),X.addEventListener("ended",Ve),()=>{try{X.removeEventListener("play",ce),X.removeEventListener("pause",Ae),X.removeEventListener("ended",Ve),He()}catch{}}},[kt,At,be,tt,We,He,ue]);o.useEffect(()=>Xe(),[Xe]),o.useEffect(()=>{Ye.current=s},[s]),o.useEffect(()=>{Be.current=r},[r]),o.useEffect(()=>{if(s||Z!=="active")return;const X=N.current;if(!X)return;let ce=null;const Ae=requestAnimationFrame(()=>{try{const Ve=X.getTotalLength();if(!Ve)return;const Ke=Ve*.2;X.style.strokeDasharray=`${Ve-Ke} ${Ke}`;const Ze="triFlow_"+Math.random().toString(36).slice(2);ce=document.createElement("style"),ce.textContent=`@keyframes ${Ze}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${Ve}}}`,document.head.appendChild(ce),X.style.animation=`${Ze} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(Ae),ce?.remove()}},[Z,s]),o.useEffect(()=>{he.current=M},[M]),o.useEffect(()=>{Se.current=S},[S]),o.useEffect(()=>{const X=v.current,ce=B.current;if(!X||!ce)return;let Ae=null;const Ve=32,Ke=60,Ze=()=>{try{const bt=Array.from(X.querySelectorAll(":scope > .button"));let ge=0;bt.forEach(Ce=>{if(Ce===ce)return;const Fe=Ce.getBoundingClientRect();ge+=Fe.width});const j=X.getBoundingClientRect().width,J=Math.max(0,Math.floor(j-ge-8)),me=ve;if(!me||J<=0){Array.from(ce.children).forEach(Ce=>{try{Ce.style.width=""}catch{}});return}let ae=Math.floor(J/me);ae>Ke&&(ae=Ke),ae<Ve&&(ae=Math.max(Ve,Math.floor(J/me))),Array.from(ce.querySelectorAll(".button")).forEach(Ce=>{try{Ce.style.width=`${ae}px`}catch{}})}catch{}},ft=requestAnimationFrame(Ze);try{Ae=new ResizeObserver(()=>{requestAnimationFrame(Ze)}),Ae.observe(X),Ae.observe(ce),window.addEventListener("resize",Ze)}catch{}return()=>{try{cancelAnimationFrame(ft)}catch{}try{Ae&&(Ae.disconnect(),Ae=null)}catch{}try{window.removeEventListener("resize",Ze)}catch{}}},[M,Y,ve]),o.useEffect(()=>()=>{try{je.current&&(clearTimeout(je.current),je.current=null),Ue.current&&(clearTimeout(Ue.current),Ue.current=null)}catch{}},[]);const et=(X,ce)=>{q(X),te(ce),vt(),U(K_(X)),he.current=X},rt=()=>{F("playMode"),I(0),z(!0)},$t=async(X,ce)=>{Dt(!1),_.current=!1,at(X,ce),await Oc(X),await Je()!==!1&&(A(!1),rt(),await be(X))},_n=async(X,ce=!1)=>{const Ae=C.current;A(!0),$("measuring_duration");try{const Ve=await gs(X,{timeoutMs:1e4,rejectOnError:!0});et([{src:X,objectUrl:null,duration:Ve}],Ve),$("ready"),ce&&Ae&&await $t(Ae,X)}finally{_.current=!1,A(!1)}},on=async(X,ce=!1)=>{const Ae=C.current;A(!0),$("measuring_duration");try{const Ve=await Promise.all(X.map(Ze=>gs(Ze,{timeoutMs:1e4})));if(!Ne.current)return;const Ke=X.map((Ze,ft)=>({src:Ze,objectUrl:null,duration:Ve[ft]||0}));et(Ke,Y_(Ke)),$("ready"),ce&&Ae&&Ke.length>0&&await $t(Ae,Ke[0].src)}finally{_.current=!1,A(!1)}},Rt=async(X=!1,ce=!0)=>{const Ae=C.current,Ve=t?Array.isArray(t)?t:[t]:[];if(!Ve||Ve.length===0||!Ve.some(Boolean))return!1;if(_.current)return null;_.current=!0,ce&&A(!0),$("resolving");try{const Ke=Z_(t,a,xl),Ze=[];let ft=0;for(const bt of Ke){let ge=bt.src??null,j=null;if(!ge&&bt.resolvedPath){try{$("getting_signed_url"),ge=await wl(bt.resolvedPath)}catch{ge=null}if(!Ne.current)return!1;if(!ge)try{$("downloading");const me=await Bl(bt.resolvedPath);if(!Ne.current)return!1;if(me){const ae=me instanceof Blob?me:new Blob([me]);j=f.track(URL.createObjectURL(ae)),ge=j}}catch{$("error");try{Te(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),F("active")}catch{}}}if(!ge)continue;let J=0;try{$("measuring_duration"),J=await gs(ge,{timeoutMs:3e3})}catch{J=0}if(!Ne.current){if(j)try{URL.revokeObjectURL(j)}catch{}for(const me of Ze)if(me.objectUrl)try{URL.revokeObjectURL(me.objectUrl)}catch{}return!1}ft+=J||0,Ze.push({...bt,src:ge,objectUrl:j,duration:J})}if(et(Ze,ft),Ze.length>0&&X&&Ae){const bt=Ze[0];Dt(!1);try{f.keepOnly(Ze.map(ge=>ge.objectUrl))}catch{}if($("ready"),_.current=!1,bt.src&&Ae)try{if(at(Ae,bt.src),await Oc(Ae),await Je()===!1)return!1;ce&&A(!1),rt(),Ae&&await be(Ae)}catch{ce&&A(!1)}else ce&&A(!1);F("playMode"),I(0),z(!0)}return Ze.length>0}finally{_.current=!1,ce&&A(!1),$(Ke=>Ke==="ready"?"ready":"idle")}},zt=async X=>{const ce=ue.isRunning();if(X.paused&&!ce){if(qe.current){await It();return}const Ae=ue.resume();if(Ae){if(T("playing"),Ae.phase==="tail"){Ie(Ae.elapsed);return}await be(X,3,50,Ae.elapsed);return}await be(X),T("playing")}else ue.pause(),Me(),X.pause(),T("paused"),ce&&(He(),At())},sn=async()=>{const X=C.current;if(!(!X&&!ut)){if(ut){const ce=window.speechSynthesis;if(Z==="active"){const Ae=Da(),Ve=Array.isArray(l)?l.filter(Boolean):l?[l]:[];if(Ae&&Ve.length>0){if(_.current)return;F("load"),A(!0),$("synthesizing"),_.current=!0;try{const Ke=await Promise.all(Ve.map(Ze=>Promise.resolve(Ae(Ze))));Ke.length>1?await on(Ke,!0):await _n(Ke[0],!0)}catch{_.current=!1,A(!1),F("active"),gt(Ve.length>0?Ve:void 0)}return}gt(Ve.length>0?Ve:void 0);return}if(Z==="playMode"){const Ae=!!ce&&(ce.speaking||ce.paused)&&!(X&&(X.currentSrc||X.getAttribute("src")));if(X&&!Ae){await zt(X);return}try{if(ce&&ce.paused)try{yt("tts"),ce.resume(),T("playing")}catch{}else try{ce.pause(),T("paused")}catch{}}catch{}}return}if(Z==="active"){if(s&&Array.isArray(he.current)&&he.current.length>0){const Ae=he.current[0];try{if(Ae.src&&X)try{at(X,Ae.src),rt(),X&&await be(X)}catch{}rt();return}catch{}}F("load");let ce;try{ce=await Rt(!0)}catch{ce=!1}if(ce===!1&&Ne.current){try{Te(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}F("active")}return}if(Z!=="load"&&(Z==="playMode"||Z==="active"))try{X&&await zt(X)}catch(ce){(ce instanceof Error||typeof ce=="object"&&ce&&"name"in ce)&&ce.name}}},It=async()=>{const X=C.current;if(X)try{const ce=he.current;if(Array.isArray(ce)&&ce.length>1){await mn(0);return}Dt(!1);try{X.currentTime=0}catch{}X&&await be(X),T("playing"),F("playMode")}catch{}},xn=()=>{Me(),wt(),Pe.current?.();const X=C.current;try{if(X){try{X.pause()}catch{}try{X.currentTime=0}catch{}}}catch{}At(),T("stopped"),F("active"),Q(0),z(!1)},xt=async(X,{sameSegment:ce=!1}={})=>{Me();const Ae=ue.generation(),Ve=C.current,Ke=he.current?.[X]?.src;try{if(Dt(!1),I(X),z(!0),Se.current=X,!Ke||!Ve||(ce||vt(),at(Ve,Ke),!ce&&await Je()===!1)||!ue.isCurrent(Ae)||(await be(Ve),!ue.isCurrent(Ae)))return;T("playing"),F("playMode")}catch{}},Pt=async()=>{const X=he.current,ce=Se.current||0;if(!X||ce<=0){await It();return}await xt(ce-1)},Ut=async()=>{const X=he.current,ce=Se.current||0;if(!X||ce>=X.length-1){xn();return}await xt(ce+1)},Gt=()=>{if(qe.current)return;const X=200,ce=340;Dt(!0),Me(),wt();try{Q(1)}catch{}ot(1);try{H("hold")}catch{}try{const Ae=C.current,Ve=ut&&!!Ae?.src;if(!ut||Ve){if(Ae){Ae.pause();try{Ae.currentTime=0}catch{}}}else Lt();At()}catch{}try{T("stopped")}catch{}if(z(!1),!Ye.current)try{Ue.current&&(clearTimeout(Ue.current),Ue.current=null),Ue.current=setTimeout(()=>{try{H("out")}catch{}Ue.current=setTimeout(()=>{try{typeof Be.current=="function"&&Be.current(!0)}catch{}try{H("idle")}catch{}Ue.current=null},ce)},X)}catch{}};o.useEffect(()=>{Bt.current=Gt});const Pn=o.useCallback(()=>Te(""),[]),mn=async X=>{(he.current||[])[X]&&await xt(X,{sameSegment:X===Se.current})},Kt=G==="playing",Qt=o.useMemo(()=>{if(!Y||Y.length<=1)return Y;const X=Y[S];return X?[X]:Y},[Y,S]),ln=s===!0;o.useEffect(()=>{try{const X=C.current;X&&typeof X.playbackRate=="number"&&Le(X)}catch{}},[de,Le]);const Cn=o.useRef({raf:null,timer:null});o.useEffect(()=>{const X=C.current;if(!X)return;const ce=Math.max(0,Math.min(1,ne)),Ae=Cn.current,Ve=()=>{Ae.raf!==null&&(cancelAnimationFrame(Ae.raf),Ae.raf=null),Ae.timer!==null&&(clearTimeout(Ae.timer),Ae.timer=null)};Ve();const Ke=or(X);if(X.paused||Math.abs(Ke-ce)<.001||typeof requestAnimationFrame!="function"){try{zn(X,ce)}catch{}return}const Ze=performance.now(),ft=()=>{const bt=Math.min(1,(performance.now()-Ze)/150);try{zn(X,Ke+(ce-Ke)*bt)}catch{}Ae.raf=bt<1?requestAnimationFrame(ft):null};return Ae.raf=requestAnimationFrame(ft),Ae.timer=setTimeout(()=>{Ve();try{zn(X,ce)}catch{}},200),Ve},[ne]);const Ht=W==="hold",wn=W==="out",pe=Z==="playMode"&&!k&&!pt||Ht||wn,De=G!=="stopped"||Ht||wn,Re=G==="paused",Ge=Math.max(0,Math.min(100,(L||0)*100)),ze=we("audio-player__fill",pe?"is-visible":"",De?"is-expanded":"",Re?"is-paused":"",wn?"is-out":"");return n.jsxs("div",{className:`audio-player ${ln?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof m=="string"?m:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${Kt?"is-playing":""} ${k?"is-loading":""} ${Z!=="default"?"is-revealed":""}`,children:[k?n.jsxs("div",{className:"audio-player__loading",role:Fc[R]?"status":void 0,"aria-live":Fc[R]?"polite":"off",children:[n.jsx("span",{className:"audio-player__loading-spinner","aria-hidden":"true"}),n.jsx("span",{className:"audio-player__loading-text",children:p("training.audioStatus.preparing",{defaultValue:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"})})]}):null,Z==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:ln,onClick:()=>{K.current=gr(),D(),sn()},"aria-label":typeof m=="string"?m:p("training.listen","\uB4E3\uAE30"),onMouseEnter:w,onMouseLeave:D,onFocus:w,onBlur:D,children:n.jsx("span",{ref:x,className:"audio-player__button-triangle-wrap",children:n.jsx("svg",{className:"audio-player__button-triangle",viewBox:"0 0 24 24","aria-hidden":"true",children:n.jsx("path",{ref:N,d:"M13.2 7.7 L16.5 9.85 Q20.2 12 16.5 14.15 L10 18.3 Q7 19.7 7 16.3 L7 7.7 Q7 4.3 10 5.7 L13.2 7.7"})})})}):null,E&&n.jsx(Dn,{anchorRect:E,text:typeof m=="string"&&m?m:p("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${Z==="playMode"||Kt?"is-visible":""}`,inert:!(Z==="playMode"||Kt)||void 0,children:[n.jsxs("div",{ref:v,className:"audio-player__buttons",children:[n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:Pt,ariaLabel:p("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:Z!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:Kt?"pause":"play",onClick:sn,ariaLabel:p("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":Kt,width:"60px",variant:"transparent-white",disabled:Z!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:xn,ariaLabel:p("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:Z!=="playMode"}),ve>1?n.jsx("div",{ref:B,className:"audio-player__source-buttons",children:Array.from({length:ve}).map((X,ce)=>n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(ce+1),onClick:()=>{try{mn(ce)}catch{}},ariaLabel:p("training.sourcePlay",{n:ce+1}),variant:"transparent-white",selected:O&&S===ce,disabled:Z!=="playMode"||!(Array.isArray(M)&&M[ce]),showTooltipInfo:!0},ce))}):null,!Array.isArray(M)||M.length<=1?n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:It,ariaLabel:p("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:Z!=="playMode"}):null,n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:Ut,ariaLabel:p("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:Z!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:Gt,ariaLabel:p("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:Z!=="playMode"})]}),n.jsxs("div",{className:"audio-player__slider",children:[n.jsx("div",{className:ze,ref:b,style:{left:`${Ge}%`},"aria-hidden":"true"}),(u||c)&&n.jsx(Q_,{segments:Qt,progress:L,totalDuration:se,waveProgressRef:$e,showSoundWaveForm:u,leadInMs:d,tailMs:h,trackDurationSec:M?.[S]?.duration??0,noiseSrc:c&&g?.settings.enabled&&V>0?st:null,noiseRatio:g?tr(g.settings):0,noiseSpeed:g?.settings.speed??1,mainVolume:ee,onReadyChange:Qe})]})]}),n.jsx("audio",{ref:C,crossOrigin:"anonymous",preload:"auto"})]}),!u&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(nt,{icon:"triangle-alert",size:14}),p("training.noSoundWaveform","\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.")]}),n.jsx(ba,{message:ie,position:ye,onClose:Pn})]})}function Nr(e){const{t}=_e.useTranslation(),{text:a,label:r,anchorRect:s=null,onClose:l,closeOnOutsideClick:i=!0,isMobilePopup:u=!1}=e||{},[c,d]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||"light"}catch{return"light"}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",c)}catch{}},[c]);const{increase:h,decrease:p,canIncrease:m,canDecrease:g,fontSize:y,lineHeight:C}=Pi({storageKey:"tooltip-fontScale"}),b=o.useCallback(()=>d(N=>N==="dark"?"light":"dark"),[]),v=o.useCallback(N=>{try{N.stopPropagation()}catch{}try{typeof l=="function"&&l()}catch{}},[l]),f=Array.isArray(a)?a:typeof a>"u"||a===null?[]:[a],B={fontSize:`${y}px`,lineHeight:`${C}px`,"--tt-line-height":`${C}px`,"--tt-marker-size":"28px"},_=n.jsxs("div",{className:le(`text-box-tooltip__root ${c==="dark"?"is-dark":""}`),children:[n.jsxs("div",{className:le("text-box-tooltip__box"),children:[r&&n.jsx("div",{className:le("text-box-tooltip__label body-2b"),children:r}),n.jsx("div",{className:le("text-box-tooltip__text body-1"),style:B,children:f.map((N,x)=>n.jsxs("div",{className:le("text-box-tooltip__line"),children:[f.length>1?n.jsx("div",{className:le("text-box-tooltip__marker"),children:n.jsx("span",{className:le("text-box-tooltip__line-number button-1"),children:x+1})}):null,n.jsx("span",{className:le("text-box-tooltip__line-text"),children:N})]},x))})]}),n.jsxs("div",{className:le("text-box-tooltip__buttons"),children:[n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"minus",onClick:p,ariaLabel:t("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!g}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"plus",onClick:h,ariaLabel:t("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!m}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:c==="dark"?"moon":"sun-medium",onClick:b,ariaLabel:t("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:c==="dark"?"transparent-white":"transparent-gray"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"x",onClick:v,ariaLabel:t("common.close","\uB2EB\uAE30"),variant:c==="dark"?"transparent-white":"transparent-gray"})]})]});return s?n.jsx(yn,{anchorRect:s,className:le(`text-box-tooltip ${c==="dark"?"is-dark":""}`),onClose:l,closeOnOutsideClick:i,isMobilePopup:u,ariaLabel:r||t("tooltip.textbox","\uBCF8\uBB38"),children:_}):n.jsx("div",{className:le(`text-box-tooltip ${c==="dark"?"is-dark":""}`),children:_})}function Wc({state:e="disabled"}){const{t}=_e.useTranslation();return n.jsxs("div",{className:`ts-bullet ts-bullet--${e}`,"aria-hidden":!0,children:[n.jsx("div",{className:"bullet__dot",children:n.jsx(nt,{icon:"chevron-right",label:t("training.next","\uB2E4\uC74C"),className:"bullet__icon",imgClassName:"bullet__icon-img",maskClassName:"bullet__icon-mask",svgClassName:"bullet__icon-svg",wrapperStyle:{},size:20})}),n.jsx("div",{className:"ts-bullet__line"})]})}function Hc(e,t,a){const r=o.useRef(t),s=o.useRef(a);o.useEffect(()=>{r.current=t,s.current=a}),o.useEffect(()=>{if(!e||typeof document>"u")return;let l=null,i=10;const u=()=>{l=null;const c=r.current(),d=c?Array.from(c.querySelectorAll(Bn)).find(h=>!h.closest('[aria-hidden="true"]')):void 0;if(d){try{d.focus()}catch{}if(document.activeElement===d)return}--i>0&&(l=requestAnimationFrame(u))};return l=requestAnimationFrame(u),()=>{l!==null&&cancelAnimationFrame(l);const c=document.activeElement;if(!c||c===document.body||!document.contains(c)||c.closest(".tooltip__content")){const d=s.current();if(d)try{d.focus()}catch{}}}},[e])}function Vc({title:e,children:t,className:a="",state:r="disabled",usePreviewTextBtn:s=!1,onPreviewTextBtn:l,previewText:i=null,useFaded:u,usePlayAllBtn:c=!1,onPlayAll:d,playAllActive:h=!1}){const{t:p}=_e.useTranslation(),m=fn("(max-width: 767px)"),g=`training-step__title h4 ${u&&r==="disabled"?"training-step__title--faded":""} ${a}`.trim(),y=`training-step__title-row training-step__title-row--${r}`.trim(),C=o.useRef(null),[b,v]=o.useState(!1),[f,B]=o.useState(null),[_,N]=o.useState(null);Hc(b&&!!f,()=>{if(typeof document>"u")return null;const k=Array.from(document.querySelectorAll(".tooltip__content"));for(let A=k.length-1;A>=0;A--)if(k[A].querySelector(".text-box-tooltip__root"))return k[A];return null},()=>C.current?.querySelector("button")??null);const x=o.useRef(l);o.useEffect(()=>{x.current=l});const E=o.useMemo(()=>i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)&&i.every(k=>typeof k=="string"||typeof k=="number")?i.join(""):"",[i]),w=o.useCallback(()=>{v(!1),B(null),N(null)},[]);o.useEffect(()=>{if(!b)return;let k;try{typeof x.current=="function"&&(k=x.current())}catch{}if(k===!1){w();return}N(typeof k<"u"&&k!==null?k:null)},[E]);const D=o.useCallback(()=>{let k;try{typeof l=="function"&&(k=l())}catch{}if(k!==!1){if(N(typeof k<"u"&&k!==null?k:i),!C.current){v(A=>!A);return}if(b)v(!1),B(null),N(null);else{const A=C.current.getBoundingClientRect();B(A),v(!0)}}},[l,i,b]);return n.jsxs("div",{className:y,children:[n.jsx("p",{className:g,children:n.jsx("span",{className:"training-step__title-text",children:e??t})}),s||c?n.jsxs("div",{className:"title-controls",children:[n.jsxs("div",{className:"title-buttons",children:[c&&n.jsx(fe,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"play-circle",label:m?void 0:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),ariaLabel:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),selected:h,onClick:d,variant:r==="disabled"?"disabled":"default",disabled:r==="disabled"||h,onDisabledClick:h&&r!=="disabled"?()=>{}:void 0}),s&&n.jsx("div",{ref:C,children:n.jsx(fe,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"eye",label:m?void 0:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),onClick:D,className:b?"is-selected":void 0,"aria-expanded":b,"aria-haspopup":"dialog",variant:r==="disabled"?"disabled":"default",disabled:!i&&typeof l!="function"})})]}),b&&n.jsx(Nr,{text:_??i,label:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:f,onClose:w,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function vs(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function na({index:e,stepIndex:t,isLast:a=!1,title:r="",titleProps:s={},children:l,className:i="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:d}){const{t:h}=_e.useTranslation(),[p,m]=o.useState(()=>vs(e,t));o.useEffect(()=>{const x=vs(e,t);if(x!==p){const E=setTimeout(()=>m(x),0);return()=>clearTimeout(E)}},[e,t,p]);const g=o.useCallback((...x)=>{vs(e,t)==="done"||p==="done"||typeof u=="function"&&u(...x)},[e,t,p,u]),[y,C]=o.useState(!1),[b,v]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),f=o.useCallback(x=>{if(!x)return null;try{const E=x;if(typeof x=="object"&&(E.currentTarget||E.target)&&(E.nativeEvent||E.type)){const k=E.currentTarget??E.target;if(k&&typeof k.getBoundingClientRect=="function")return k.getBoundingClientRect()}if(x instanceof DOMRect)return x;const w=x;if(w&&typeof w.getBoundingClientRect=="function")return w.getBoundingClientRect();const D=x?.current;return D&&typeof D.getBoundingClientRect=="function"?D.getBoundingClientRect():null}catch{return null}},[]),B=o.useCallback((x,{text:E="",label:w="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:D=!1,alignX:k="center",alignY:A="top"}={})=>{const R=f(x);v({text:E,label:w,anchorRect:R,backdrop:D,alignX:k,alignY:A}),C(!0)},[f]),_=o.useCallback(()=>{C(!1),v(x=>({...x,anchorRect:null}))},[]),N=o.Children.map(l,x=>{if(o.isValidElement(x)){const E=x;if(typeof E.type=="string")return E;const w=E.props??{},D=typeof w.onDone=="function"?w.onDone:g,k=typeof w.disabled=="boolean";let A=p==="disabled";return k&&(A=!!w.disabled),o.cloneElement(E,{onDone:D,disabled:A,showTooltip:B,hideTooltip:_})}return x});return n.jsxs("div",{className:`training-step training-step--${p} ${a?"training-step--last":""} ${i}`,"aria-current":p==="active",children:[n.jsx(Wc,{state:p}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(Vc,{state:p,title:r,...s,useFaded:c}),p==="disabled"&&d&&typeof e=="number"&&typeof t=="number"&&e===t+1&&n.jsx("p",{className:"training-step__locked-hint caption-1",role:"status",children:d}),N]}),y?n.jsx(yn,{anchorRect:b.anchorRect,backdrop:b.backdrop,onClose:_,ariaLabel:h("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(Nr,{text:b.text,onClose:_})}):null]})}function qc({context:e,state:t="disabled",theme:a="light"}){const{t:r}=_e.useTranslation(),[s,l]=o.useState("disabled"),[i,u]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||a}catch{return a}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",i)}catch{}},[i]);const c=()=>u($=>$==="dark"?"light":"dark"),{increase:d,decrease:h,canIncrease:p,canDecrease:m,fontSize:g,lineHeight:y}=Pi({storageKey:"textbox_fontScale"}),[C,b]=o.useState(""),v=o.useRef(null),f=o.useRef(!1),B=o.useCallback(()=>{f.current=gr()&&!!v.current&&v.current.contains(document.activeElement),l("active")},[]),_=o.useCallback(()=>b(""),[]),N=$=>{try{b($)}catch{}},x=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(t!=="disabled"){const $=setTimeout(()=>l(t),0);return()=>clearTimeout($)}},[t]);const E=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[w,D]=o.useState(E);w!==E&&(D(E),l("disabled"));const k=t==="disabled"?s:t,A=k==="disabled"?"training-text-box--disabled":k==="active"?"training-text-box--active":k==="done"?"training-text-box--done":"",R=o.useMemo(()=>({fontSize:`${g}px`,lineHeight:`${y}px`}),[g,y]);return o.useEffect(()=>{if(k==="disabled"||!f.current)return;f.current=!1;const $=document.activeElement;$&&$!==document.body||v.current?.querySelector(".training-text-box__buttons button")?.focus()},[k]),n.jsxs("div",{ref:v,className:`training-text-box ${A} ${k!=="disabled"&&i==="dark"?"is-dark":""}`,children:[k==="disabled"&&n.jsx("div",{className:"training-text-box__preview",children:n.jsx(fe,{htmlType:"button",size:48,type:"bar",onClick:B,icon:"eye",ariaLabel:r("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),label:r("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),useBorder:!1})}),n.jsx("div",{className:"training-text-box__area","aria-hidden":k==="disabled",children:n.jsx("span",{className:"training-text-box__inner h3",style:R,children:E})}),k!=="disabled"&&n.jsxs("div",{className:"training-text-box__buttons","aria-hidden":k==="disabled",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:h,onDisabledClick:()=>N(r("training.fontSizeMin","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.")),ariaLabel:r("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),icon:"minus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!m,useBorder:!1,showTooltipInfo:!0,...!x&&{width:"60px"}}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:d,onDisabledClick:()=>N(r("training.fontSizeMax","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.")),ariaLabel:r("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),icon:"plus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!p,useBorder:!1,showTooltipInfo:!0,...!x&&{width:"60px"}}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:i==="dark"?"moon":"sun-medium",onClick:c,ariaLabel:r("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:i==="dark"?"transparent-white":"transparent-gray"})]}),n.jsx(ba,{message:C,position:"top",onClose:_})]})}function aa(e){return e==="active"||e==="done"}function _s({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,useTitleFaded:l,onDone:i,onChange:u,answer:c,wrongAnswers:d,choices:h,multiSelect:p=!1,correctCount:m=0,useDisabledCovered:g=!1,choiceIcons:y,shuffleChoices:C=!0}){const{t:b}=_e.useTranslation(),v=s??b("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),f=typeof e=="number"?e:-1,B=typeof t!="number"?"disabled":f<t?"done":f===t?"active":"disabled",_=Array.isArray(h)&&h.length?h:typeof c<"u"?[c].concat(Array.isArray(d)?d:[]):void 0,N=d?d.join("||"):"",x=h?h.join("||"):"",[E,w]=o.useState(()=>Array.isArray(_)?C?La(_):_.slice():void 0);o.useEffect(()=>{Array.isArray(_)&&_.length?w(C?La(_):_.slice()):w(void 0)},[c,N,x,C]);const[D,k]=o.useState(null),[A,R]=o.useState(()=>new Set);o.useEffect(()=>{k(null),R(new Set)},[x,c,N]);const $=o.useRef(void 0);o.useEffect(()=>{const P=$.current;typeof P=="number"&&typeof t=="number"&&typeof e=="number"&&P>=e&&t<e&&(k(null),R(new Set)),$.current=t},[t,e]);const G=o.useCallback(P=>{if(!aa(B))return;const L=E?.[P];if(L==null)return;const Q=L;if(p){const Z=new Set(A);Z.has(Q)?Z.delete(Q):Z.add(Q),R(Z),typeof u=="function"&&u({selectedValues:[...Z],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...Z],__ts:Date.now()})}else k(Q),typeof u=="function"&&u({selectedIndex:P,selectedValue:Q,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:P,selectedValue:Q,__ts:Date.now()})},[E,B,p,u,A]),T=`training-step__buttons${Array.isArray(E)&&E.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:v,useTitleFaded:l,children:n.jsx("div",{className:T,children:Array.isArray(E)&&E.length>0?E.map((P,L)=>n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:()=>G(L),ariaLabel:String(P),label:P,useLabel:!0,icon:y?y[String(P)]:void 0,variant:"default",disabled:B==="disabled",selected:p?A.has(P):D===P,useDisabledCovered:g,minWidth:0},String(P))):null})})}function xs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u,demoSelected:c}){const{t:d}=_e.useTranslation(),h=s??d("training.confirmTitle","\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694."),p=typeof e=="number"?e:-1,m=typeof t!="number"?"disabled":p<t?"done":p===t?"active":"disabled",g=u&&typeof u=="object"?u.sentence||"":typeof u=="string"?u:"",y=u&&typeof u=="object"?u.choices:void 0,[C,b]=o.useState(c??null),v=`${String(g)}\0${JSON.stringify(y??null)}`,[f,B]=o.useState(v);f!==v&&(B(v),c==null&&b(null));const[_,N]=o.useState(c);Object.is(_,c)||(N(c),b(c??null));const x=o.useRef(void 0);o.useEffect(()=>{const k=x.current;typeof k=="number"&&typeof t=="number"&&typeof e=="number"&&k>=e&&t<e&&c==null&&b(null),x.current=t},[t,e,c]);const E=o.useCallback(k=>{const A=typeof k=="object"&&k!==null?Object.assign({},k,{__ts:Date.now()}):{value:k,__ts:Date.now()};typeof i=="function"&&i(A),aa(m)&&typeof l=="function"&&l(A)},[i,m,l]),w=o.useCallback(()=>{aa(m)&&(b(!1),E(!1))},[E,m]),D=o.useCallback(()=>{aa(m)&&(b(!0),E(!0))},[E,m]);return n.jsxs(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:h,onDone:l,useTitleFaded:!1,children:[n.jsx(qc,{context:u,state:m}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(y)&&y.length>0?y.slice(0,6).map((k,A)=>n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:()=>{aa(m)&&(b(A),E&&E(A))},disabled:m==="disabled",ariaLabel:String(k),label:k,variant:m,selected:C===A},A)):n.jsxs(n.Fragment,{children:[n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:w,disabled:m==="disabled",icon:"x",ariaLabel:d("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),label:d("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!1}),n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:D,disabled:m==="disabled",icon:"circle",ariaLabel:d("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),label:d("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!0})]})})]})}function ws({index:e,stepIndex:t,isLast:a=!1,title:r,onDone:s,btnLabel:l,soundSrc:i,bucketPath:u,usePreviewTextBtn:c,previewText:d=null,onPreviewTextBtn:h,disabled:p,_pageIndex:m,showSoundWaveForm:g,showNoiseWaveForm:y,leadInMs:C,tailMs:b}){const{t:v}=_e.useTranslation(),f=r??v("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),B=p??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(na,{index:e,stepIndex:t,isLast:a,title:f,onDone:s,titleProps:{usePreviewTextBtn:c,previewText:d,onPreviewTextBtn:h},children:n.jsx(ys,{soundSrc:i,ttsText:i?null:d??f,bucketPath:u,btnLabel:l||v("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:B,className:"training-step__listen-sticky",showSoundWaveForm:g,showNoiseWaveForm:y,leadInMs:C,tailMs:b},`audio-p${m??0}-s${e}`)})}const ix=[];function Bs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=ix}){const{t:c}=_e.useTranslation(),d=s??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),h=U=>typeof U=="string"?U:U&&(U.context||U.sentence||U.question||"")||"",[p,m]=o.useState(Array.isArray(u)?u:[]),[g,y]=o.useState(()=>(p||[]).map((U,S)=>({id:S,text:h(U)}))),C=o.useMemo(()=>typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled",[t,e]),b=C!=="disabled",v=o.useRef(void 0),f=o.useRef(void 0);o.useEffect(()=>{if(v.current===u)return;v.current=u;const U=Array.isArray(u)?u:[];m(U);const S=(I=>{const O=(I||[]).map((de,ee)=>({id:ee,text:h(de)}));if(O.length<=1)return O;const z=(de,ee)=>{if(de.length!==ee.length)return!1;for(let V=0;V<de.length;V++)if(de[V].text!==ee[V].text)return!1;return!0};let se=La(O),te=0;for(;z(se,O)&&te<20;)se=La(O),te+=1;return se})(U);y(S);try{if(typeof i=="function"){const I=S.filter((O,z)=>O.text===h(U[z])).length;i({shuffled:S,score:I,total:(U||[]).length,initial:!0,__ts:Date.now()})}if(typeof l=="function"&&C==="active"){const I=S.filter((O,z)=>O.text===h(U[z])).length;f.current=u,l({shuffled:S,score:I,total:(U||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(C!=="active"||f.current===u||(f.current=u,typeof l!="function"))return;const U=Array.isArray(u)?u:[],S=g.filter((I,O)=>I.text===h(U[O])).length;l({shuffled:g,score:S,total:U.length,initial:!0,__ts:Date.now()})},[C,u]);const B=(U,S)=>{const I=[...g],O=U+S;if(O<0||O>=I.length)return;const z=I[O];I[O]=I[U],I[U]=z,Q(I);try{if(typeof l=="function"&&C==="active"){const se=I.filter((te,de)=>te.text===h(p[de])).length;l({shuffled:I,score:se,total:(p||[]).length,__ts:Date.now()})}}catch{}},[_,N]=o.useState(null),x=o.useRef(null),E=o.useRef(null),w=o.useRef(null),D=o.useRef(null),k=o.useRef(null),A=o.useRef({x:0,y:0}),R=o.useRef(null),$=o.useRef({dx:0,dy:0}),G=()=>{if(R.current!==null)return;const U=()=>{if(!x.current){R.current=null;return}R.current=requestAnimationFrame(U);const S=A.current,I=$.current||{dx:0,dy:0};x.current&&(x.current.style.transform=`translate3d(${S.x-I.dx}px, ${S.y-I.dy}px, 0)`)};R.current=requestAnimationFrame(U)},T=o.useRef(new Map),P=o.useRef(new Map),L=()=>{const U=new Map;return T.current.forEach((S,I)=>{S&&S.getBoundingClientRect&&U.set(I,S.getBoundingClientRect())}),U},Q=U=>{const S=L();y(U);try{if(typeof i=="function"){const I=U.filter((O,z)=>O.text===h(p[z])).length;i({shuffled:U,score:I,total:(p||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const I=L();U.forEach(O=>{const z=S.get(O.id),se=I.get(O.id),te=T.current.get(O.id);if(!te||!z||!se)return;const de=z.top-se.top;de&&(te.style.transition="none",te.style.transform=`translateY(${de}px)`,requestAnimationFrame(()=>{te.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",te.style.transform="";const ee=()=>{te.style.transition="",te.removeEventListener("transitionend",ee)};te.addEventListener("transitionend",ee)}))})})},Z=(U,S)=>{try{try{S.dataTransfer?.setData("text/plain",String(U))}catch{}try{S.dataTransfer&&(S.dataTransfer.effectAllowed="move")}catch{}try{const I=document.createElement("div");I.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(I),S.dataTransfer?.setDragImage(I,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(I)}catch{}})}catch{}}catch{}N(U);try{const I=g[U],O=document.createElement("div");O.className="order-list__dragging-object order-list__dragging-object--visible",O.textContent=I&&I.text?I.text:"",document.body.appendChild(O),x.current=O;const z=T.current.get(I.id);let se=S.clientX||0,te=S.clientY||0;try{if(z&&z.getBoundingClientRect){const H=z.getBoundingClientRect();se=H.left+H.width/2,te=H.top+H.height/2}}catch{}const de=O.getBoundingClientRect(),ee=de.width/2,V=de.height/2;$.current={dx:ee,dy:V},O.style.transition="none",A.current={x:se,y:te},O.style.transform=`translate3d(${se-ee}px, ${te-V}px, 0)`,requestAnimationFrame(()=>{try{O.style.transition=""}catch{}G()});const ne=H=>{const ie=H;A.current={x:ie.clientX,y:ie.clientY},G()};w.current=ne,document.addEventListener("mousemove",ne);const W=H=>{const ie=H;A.current={x:ie.clientX,y:ie.clientY},G()};E.current=W,document.addEventListener("dragover",W);try{S.dataTransfer?.setData("text/plain",String(U));try{S.dataTransfer?.setData("application/json",JSON.stringify({idx:U}))}catch{}}catch{}}catch{}},F=(U,S)=>{S.preventDefault();try{S.dataTransfer&&(S.dataTransfer.dropEffect="move")}catch{}try{k.current!==null&&(clearTimeout(k.current),k.current=null);const I=S.currentTarget&&S.currentTarget.closest?S.currentTarget.closest(".order-list__item"):null;if(I&&D.current!==I){if(D.current)try{D.current.classList.remove("drag-over")}catch{}try{I.classList.add("drag-over")}catch{}D.current=I}}catch{}},K=(U,S)=>{S.preventDefault();const I=S.dataTransfer?.getData("text/plain")||"",O=I?parseInt(I,10):_,z=U;if(typeof O!="number"||isNaN(O)||O===z){N(null),Y(),M();return}const se=Bf(g,O,z);Q(se),N(null),M();try{if(typeof l=="function"&&C==="active"){const te=se.filter((de,ee)=>de.text===h(p[ee])).length;l({shuffled:se,score:te,total:(p||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const te=document.querySelectorAll(".order-list .order-list__item")[z];if(!te)return;const de=te.querySelector(".order-list__slot")||te;try{de.classList.add("pulse"),de.offsetHeight,de.classList.add("to-dark");const ee=()=>{de.classList.remove("pulse","to-dark"),de.removeEventListener("transitionend",ee)};de.addEventListener("transitionend",ee)}catch{}})}catch{}Y()},M=()=>{if(x.current){try{document.body.removeChild(x.current)}catch{}x.current=null}E.current&&(document.removeEventListener("dragover",E.current),E.current=null),w.current&&(document.removeEventListener("mousemove",w.current),w.current=null),R.current!==null&&(cancelAnimationFrame(R.current),R.current=null)},q=()=>{N(null),Y(),M()};o.useEffect(()=>()=>M(),[]);const Y=()=>{try{if(k.current!==null&&(clearTimeout(k.current),k.current=null),D.current){try{D.current.classList.remove("drag-over")}catch{}D.current=null}document.querySelectorAll(".order-list .order-list__item").forEach(U=>U.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const U=Math.max(1,(g||[]).length);g.forEach((S,I)=>{const O=P.current.get(S.id);if(!O)return;let z=50;U>1&&(z=Math.round(I/(U-1)*100));try{O.style.setProperty("--marker-pos",z+"%")}catch{}})}catch{}},[g]),o.useEffect(()=>()=>{M(),k.current!==null&&(clearTimeout(k.current),k.current=null)},[]),n.jsx(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:d,children:n.jsx("div",{className:"order-list",children:g.map((U,S)=>{const I=Math.max(1,(g||[]).length),O=I>1?Math.round(S/(I-1)*100):50;return n.jsx("div",{className:"order-list__item",children:n.jsxs("div",{className:"order-list__slot","data-disabled":C==="disabled","aria-disabled":C==="disabled",children:[C!=="disabled"?n.jsx("div",{className:"order-list__marker caption-1",style:{"--marker-pos":O+"%"},ref:z=>{const se=P.current;z?se.set(U.id,z):se.delete(U.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:S+1})}):null,n.jsxs("div",{ref:z=>{const se=T.current;z?se.set(U.id,z):se.delete(U.id)},className:`order-list__draggable ${_===S?"dragging":""}`,"data-disabled":C==="disabled","aria-disabled":C==="disabled",tabIndex:C==="disabled"?-1:0,draggable:b,onDragStart:b?z=>Z(S,z):void 0,onDragEnter:b?z=>F(S,z):void 0,onDragOver:b?z=>F(S,z):void 0,onDragLeave:b?()=>{try{k.current!==null&&clearTimeout(k.current),k.current=setTimeout(()=>{try{const z=document.querySelectorAll(".order-list .order-list__item");z&&z[S]&&(z[S].classList.remove("drag-over"),D.current===z[S]&&(D.current=null))}catch{}},80)}catch{}}:void 0,onDrop:b?z=>K(S,z):void 0,onDragEnd:b?q:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:U.text}),b?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:()=>B(S,-1),ariaLabel:c("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:S===0,useBorder:!1,useDisabledInvisible:!0}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:()=>B(S,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:S===g.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},U.id)})})})}const ux=8e3;function cx(e,t){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.then(s,s),setTimeout(s,t)})}function Uc({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=[],selectable:c=!1,hideLabel:d=!1,hideAudio:h=!1,maxCards:p,playAllGapMs:m=0}){const{t:g}=_e.useTranslation(),y=s??g("training.cardInstructions","\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694."),C=o.useMemo(()=>Array.isArray(u)?u:u&&u.items||[],[u]),b=p??3,v=(C||[]).slice(0,b);(C||[]).length>b&&console.warn(`TrainingStepCard: ${C.length} items passed but only ${b} shown`);const f=typeof e=="number"?e:-1,B=typeof t!="number"?"disabled":f<t?"done":f===t?"active":"disabled",[_,N]=o.useState(null),x=o.useRef([]),[E,w]=o.useState(!1),D=o.useRef(null),k=o.useRef(!0);o.useEffect(()=>(k.current=!0,()=>{k.current=!1}),[]);const A=o.useMemo(()=>C.map(L=>L?.id??L?.word??"").join("|"),[C]);o.useEffect(()=>{N(null)},[A]);const R=o.useRef(void 0);o.useEffect(()=>{const L=R.current;typeof L=="number"&&typeof t=="number"&&typeof e=="number"&&L>=e&&t<e&&N(null),R.current=t},[t,e]);const $=o.useCallback((L,Q)=>{if(c)return;const Z={item:L,index:Q,__ts:Date.now()};try{typeof i=="function"&&i(Z)}catch{}if(B==="active"&&typeof l=="function")try{l(Z)}catch{}},[c,i,B,l]),G=o.useRef(m);o.useEffect(()=>{G.current=Math.max(0,m||0)},[m]);const T=o.useCallback(async()=>{if(E||B==="disabled")return;w(!0);let L=!1;const Q=new Promise(Z=>{D.current=()=>{L=!0,Z()}});try{for(let Z=0;Z<v.length&&!(!k.current||L);Z++){const F=x.current[Z];if(!F)continue;await Promise.race([cx(F.play(),ux),Q]);const K=Math.max(0,G.current||0);K>0&&Z<v.length-1&&!L&&k.current&&await Promise.race([new Promise(M=>{setTimeout(M,K)}),Q])}}finally{D.current=null,w(!1)}},[E,B,v.length]),P=o.useCallback((L,Q)=>{if(!aa(B))return;N(Q);const Z={selectedValue:L.word||L.title||"",selectedIndex:Q,item:L,__ts:Date.now()};try{typeof i=="function"&&i(Z)}catch{}if(typeof l=="function")try{l(Z)}catch{}},[i,B,l]);return n.jsx(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:y,onDone:l,titleProps:{usePlayAllBtn:!h&&v.length>0,onPlayAll:T,playAllActive:E},children:n.jsx("div",{className:"training-step__cards",onClickCapture:L=>{const Q=D.current;if(!Q)return;const Z=L.target;Z&&typeof Z.closest=="function"&&Z.closest(".training-word-card__bottom")&&Q()},children:v.length===0?n.jsx("div",{className:"training-step__empty",children:g("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):v.map((L,Q)=>n.jsx(Qo,{ref:Z=>{x.current[Q]=Z},item:L,disabled:B==="disabled",onPlayDone:()=>$(L,Q),selectable:c,selected:c&&_===Q,onSelect:c?()=>P(L,Q):void 0,flipDelay:Q*120,hideLabel:d,hideAudio:h},L&&L.id||Q))})})}const dx=160,Gc=()=>{};function $n(e){const t=o.useId();if(!("variant"in e)){const{label:f,sub:B,onClick:_,children:N,align:x="horizontal",icon:E,useFullWidth:w=!1}=e,D=k=>{_&&k.target===k.currentTarget&&(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),_())};return n.jsxs("div",{className:we("panel-row",x==="vertical"?"panel-row--vertical":"",w?"panel-row--label-fixed panel-row--fill":"",_?"panel-row--clickable":""),onClick:_,onKeyDown:_?D:void 0,role:_?"button":void 0,tabIndex:_?0:void 0,children:[E!=null&&n.jsx("div",{className:"panel-row__icon",children:E}),f!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsx("div",{className:"panel-row__label body-3",children:f}),B&&n.jsx("div",{className:"panel-row__sub caption-1",children:B})]}),n.jsx("div",{className:"panel-row__right",children:N})]})}if(e.variant==="description")return n.jsx("div",{className:"panel-row panel-row--block",children:n.jsx("p",{className:"panel-row__description body-3",children:e.children})});if(e.variant==="empty")return n.jsx("div",{className:"panel-row panel-row--empty body-3",children:e.children});if(e.variant==="loading")return n.jsx("div",{className:"panel-row panel-row--loading",children:n.jsx(da,{size:28})});if(e.variant==="custom"&&!e.label)return n.jsx("div",{className:"panel-row panel-row--block",children:e.children});const{variant:a,label:r,sub:s,onClick:l,required:i,error:u,align:c="horizontal",useFullWidth:d=!1,icon:h}=e,p=a==="button"?void 0:l;let m=null;const g=a==="toggle"?`panel-toggle-${t}`:void 0,y=u?`panel-error-${t}`:void 0,C=`panel-helper-${t}`;if(a==="toggle"){const f=e;m=n.jsx(Bu,{checked:f.checked,onChange:f.onChange,id:g})}else if(a==="segmented"){const f=e;m=n.jsx(kn,{options:f.options,value:f.value,onChange:f.onChange,size:f.size??40,ariaLabel:r})}else if(a==="dropdown"){const f=e,B=f.dropdowns?.length?n.jsx("div",{className:`panel-row__dropdown-group${d?" panel-row__dropdown-group--full":""}`,children:f.dropdowns.map((_,N)=>n.jsx("div",{className:d?"panel-row__dropdown-item--full":void 0,children:n.jsx(bn,{options:_.options,value:_.value,onChange:_.onChange,placeholder:_.placeholder,block:d,error:!!u,ariaDescribedBy:y,ariaLabel:_.ariaLabel??([r,_.placeholder].filter(Boolean).join(" ")||void 0)})},N))}):n.jsx(bn,{options:f.options??[],value:f.value??"",onChange:f.onChange??Gc,block:d,error:!!u,ariaLabel:r,ariaDescribedBy:y});m=u?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[B,n.jsx("span",{id:y,className:"caption-1 panel-row__error",role:"alert",children:u})]}):B}else if(a==="button"){const f=e;f.buttons?.length?m=n.jsx("div",{className:"panel-row__button-group",children:f.buttons.map((B,_)=>n.jsx(fe,{htmlType:"button",size:B.btnSize??40,variant:B.btnVariant??"default",disabled:B.disabled,onClick:B.onClick,children:B.label},_))}):m=n.jsx(fe,{htmlType:"button",size:f.btnSize??40,variant:f.btnVariant??"default",disabled:f.disabled,onClick:f.onClick,children:f.buttonLabel})}else if(a==="text"){const f=e;m=n.jsx("span",{className:`panel-row__text body-2${d?" panel-row__text--full":""}`,style:f.valueColor?{color:f.valueColor}:void 0,children:f.value})}else if(a==="input"){const f=e;m=n.jsxs("div",{className:`panel-row__input-wrap${d?" panel-row__input-wrap--full":""}`,children:[n.jsx(Jn,{value:f.value,onChange:f.onChange??Gc,onKeyDown:f.onKeyDown,onEnter:f.onEnter,placeholder:f.placeholder,ghostText:f.ghostText,inputMode:f.inputMode,readOnly:f.readOnly,disabled:f.disabled,type:f.type,autoComplete:f.autoComplete,maxLength:f.maxLength,showCount:f.showCount,multiline:f.multiline,rows:f.rows,fullWidth:d,error:u,ariaLabel:r,required:i,ariaDescribedBy:f.helperText?C:void 0}),f.helperText&&n.jsx("div",{id:C,className:"panel-row__helper caption-1",children:f.helperText})]})}else a==="custom"&&(m=e.children);u&&a!=="input"&&a!=="dropdown"&&(m=n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[m,n.jsx("span",{id:y,className:"caption-1 panel-row__error",role:"alert",children:u})]}));const b=a==="input"||a==="dropdown"||(a==="text"||a==="custom")&&d,v=f=>{p&&f.target===f.currentTarget&&(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),p())};return n.jsxs("div",{className:we("panel-row",c==="vertical"?"panel-row--vertical":"",b?"panel-row--label-fixed":"",a==="text"?"panel-row--text":"",p?"panel-row--clickable":""),onClick:p,onKeyDown:p?v:void 0,role:p?"button":void 0,tabIndex:p?0:void 0,children:[h!=null&&n.jsx("div",{className:"panel-row__icon",children:h}),n.jsxs("div",{className:"panel-row__left",children:[g?n.jsxs("label",{htmlFor:g,className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}):n.jsxs("div",{className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}),s&&n.jsx("div",{className:"panel-row__sub caption-1",children:s})]}),n.jsx("div",{className:"panel-row__right",children:m})]})}function Kc(e){const t=e.productName||e.brand,a=[e.brand,e.fitType].filter(r=>!!r&&r!==t);return[...new Set(a)].join(" \xB7 ")}function px({devices:e,onRelease:t,emptyLabel:a}){const{t:r,i18n:s}=_e.useTranslation();return n.jsx("div",{className:"panel-row panel-row--device",children:["left","right"].map(l=>{const i=e[l],u=l==="left"?r("device.direction.left","\uC88C"):r("device.direction.right","\uC6B0");return n.jsxs("div",{className:"panel-row__device-column",children:[n.jsxs("div",{className:"panel-row__device-head",children:[n.jsx("span",{className:"panel-row__device-side body-2b",children:u}),i&&t&&n.jsx(fe,{htmlType:"button",size:32,type:"dot",icon:"x",ariaLabel:`${u} ${r("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C")}`,showTooltipInfo:r("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"),onClick:()=>t(l)})]}),i?n.jsxs("div",{className:"panel-row__device-info",children:[n.jsxs("span",{className:"panel-row__device-kind",children:[i.device&&n.jsx(jt,{size:"small",variant:Uu(i.device),fill:"soft",label:Gu(i.device,r)}),Kc(i)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:Kc(i)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),Zo(i.wornYear,i.wornMonth,i.wornDay,s.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:r("customers.device.wornSince",{date:Zo(i.wornYear,i.wornMonth,i.wornDay,s.language)})})]}):n.jsx("span",{className:"panel-row__device-empty body-3",children:a??r("customers.device.notRegistered","\uBBF8\uB4F1\uB85D")})]},l)})})}function Er({title:e,titleLevel:t=2,icon:a,disc:r,actions:s,size:l="medium",minHeight:i,maxWidth:u,className:c,scrollable:d,scrollbarGutter:h="auto",compactRows:p=!1,useBorder:m=!0,useBg:g=!0,useRowBorder:y=!0,labelWidth:C,form:b=!1,loading:v,empty:f,children:B}){const _=we("panel",`panel--${l}`,b?"panel--form":"",i!==void 0?"panel--fill":"",m?"":"panel--no-border",g?"":"panel--no-bg",y?"":"panel--no-row-border",p?"panel--compact-rows":"",c),N={};i!==void 0&&(N.minHeight=i),u!==void 0&&(N.maxWidth=typeof u=="number"?`${u}px`:u),C!==void 0&&(N["--panel-label-width"]=typeof C=="number"?`${C}px`:C);const x=t?`h${t}`:"div";return n.jsxs("div",{className:_,style:Object.keys(N).length?N:void 0,children:[(!!e||r!=null)&&n.jsxs("div",{className:we("panel__header",r!=null?"panel__header--with-disc":""),children:[a&&n.jsx(nt,{icon:a,label:typeof e=="string"?e:void 0,className:"panel__icon"}),n.jsxs("div",{className:"panel__title-group",children:[!!e&&n.jsx(x,{className:`panel__title ${r!=null?"body-3b":"h5b"}`,children:e}),r!=null&&n.jsx("p",{className:"panel__disc caption-1",children:r})]}),s&&n.jsx("div",{className:"panel__actions",children:s})]}),v?n.jsx($n,{variant:"loading"}):f!=null&&o.Children.toArray(B).length===0?n.jsx($n,{variant:"empty",children:f}):d?n.jsx("div",{className:we("panel__body--scroll",h==="stable"&&"panel__body--gutter-stable"),children:B}):B]})}function hx({cols:e=2,layout:t="grid",gap:a=1,collapseAt:r,className:s,style:l,children:i}){const u=o.useRef(null),[c,d]=o.useState();o.useEffect(()=>{const p=u.current;if(r===void 0||!p||(d(p.clientWidth),typeof ResizeObserver>"u"))return;const m=new ResizeObserver(([g])=>d(g.contentRect.width));return m.observe(p),()=>m.disconnect()},[r]);const h=r!==void 0&&c!==void 0&&c<=r;return n.jsx("div",{ref:u,className:we("panel-grid",t==="columns"&&"panel-grid--columns",s),style:{"--panel-grid-cols":h?1:e,"--panel-grid-gap":typeof a=="number"?`${a}px`:a,...l},children:i})}function mx(e){return[{label:e("training.noise.level.none","\uC5C6\uC74C"),value:0},{label:e("training.noise.level.weak","\uC57D\uD568"),value:1},{label:e("training.noise.level.medium","\uBCF4\uD1B5"),value:2},{label:e("training.noise.level.strong","\uAC15\uD568"),value:3},{label:e("training.noise.level.veryStrong","\uB9E4\uC6B0 \uAC15\uD568"),value:4}]}function Yc(e){return[{label:e("training.noise.type.default","\uAE30\uBCF8"),value:"defaultNoise",icon:"party-popper"},{label:e("training.noise.type.street","\uAE38\uAC70\uB9AC"),value:"street",icon:"car"},{label:e("training.noise.type.buzz","\uC640\uAE00\uC640\uAE00"),value:"buzz",icon:"message-square-more"},{label:e("training.noise.type.restaurant","\uC2DD\uB2F9"),value:"restaurant",icon:"coffee"}]}mx(Vt.t.bind(Vt)),Yc(Vt.t.bind(Vt));const Dr="none",Cx=.5,fx=1.5,bx=.25;function ks({title:e,valueLabel:t,value:a,min:r,max:s,step:l,tickStep:i,size:u,disabled:c,onChange:d}){return n.jsxs($n,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(Iu,{value:a,onChange:d,min:r,max:s,step:l,size:u,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:c,className:le("noise-settings-tooltip__slider-input")}),n.jsx("div",{className:le(we("noise-settings-tooltip__value","button-1",c?"noise-settings-tooltip__value--disabled":"")),children:t})]})}function Zc({anchorRect:e,onClose:t,hideNoiseRows:a=!1}){const{t:r}=_e.useTranslation(),s=fn("(max-width: 767px)")?40:24,l=wr(),i=tr(l?.settings??ta),u=l?.settings.type??"defaultNoise",c=l?.settings.enabled??!0,d=l?.playbackRate??1,h=l?.mainVolume??1,p=Math.round(h*100),m=o.useCallback(v=>{try{l?.setMainVolume(Math.max(0,Math.min(1,v/100)))}catch{}},[l]),g=o.useCallback(v=>{try{l?.setPlaybackRate(v)}catch{}},[l]),y=o.useCallback(v=>{const f=Math.min(er,Math.max(0,Math.round(v*10)/10));try{l?.setSettings({noiseRatio:f})}catch{}},[l]),C=o.useCallback(v=>{try{v===Dr?l?.setSettings({enabled:!1}):l?.setSettings({type:v,enabled:!0})}catch{}},[l]),b=[{key:Dr,label:r("training.noise.type.none","\uC5C6\uC74C")},...Yc(r).map(v=>({key:v.value,label:v.label}))];return n.jsx(yn,{anchorRect:e,offset:12,onClose:t,ariaLabel:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),isMobilePopup:!1,closeOnOutsideClick:!1,header:n.jsxs("div",{className:le("noise-settings-tooltip__header"),children:[n.jsx("span",{children:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815")}),n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:r("common.close","\uB2EB\uAE30"),onClick:t})]}),children:n.jsxs(Er,{className:le("noise-settings-tooltip"),useBorder:!1,labelWidth:72,children:[n.jsx(ks,{title:r("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${p}%`,value:p,min:0,max:100,step:10,size:s,onChange:m}),n.jsx(ks,{title:r("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${d.toFixed(2)}x`,value:d,min:Cx,max:fx,step:bx,size:s,onChange:g}),!a&&n.jsxs(n.Fragment,{children:[n.jsx($n,{variant:"custom",label:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(kn,{ariaLabel:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:b,value:c?u:Dr,onChange:C})}),n.jsx(ks,{title:r("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:r("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:er,step:Dc,size:s,disabled:!c,onChange:y})]}),a&&n.jsx("div",{className:le("noise-settings-tooltip__width-ghost"),"aria-hidden":"true",inert:!0,children:n.jsx($n,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(kn,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:b,value:Dr,onChange:()=>{}})})})]})})}function Xc({useNoiseSettingBtn:e=!1,onSettings:t,onNext:a,onResult:r,stepIndex:s=0,stepCount:l=0,pageIndex:i=0,pageCount:u=1,resultOpen:c=!1,hideNoiseRows:d=!1}){const{t:h}=_e.useTranslation(),[p,m]=o.useState(!1),[g,y]=o.useState(null),[C,b]=o.useState(!1),v=o.useRef(null),f=o.useRef(null),B=wr(),_=u>0,N=_&&i<u-1,x=!_||i>=u-1,E=s===Math.max(0,l);o.useEffect(()=>{e||(m(!1),y(null))},[e]);const w=o.useCallback(()=>{m(!1),y(null)},[]),D=o.useCallback(()=>{if(p){m(!1),y(null);return}const Q=v?.current?.getBoundingClientRect();Q&&y(Q),t?.(),m(!0)},[p,t]),k=o.useCallback(()=>{if(p){m(!1),y(null);return}const Q=f?.current?.getBoundingClientRect();Q&&y(Q),t?.(),m(!0)},[p,t]),A=fn("(max-width: 767px)"),R=o.useRef(null),[$,G]=o.useState(null),T=o.useCallback(()=>{b(Q=>{const Z=!Q;return G(Z?R.current?.getBoundingClientRect()??null:null),Z})},[]),P=o.useCallback(()=>{b(!1),G(null)},[]);o.useEffect(()=>{c&&(b(!1),G(null))},[c]);const L=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.sentence","\uC7AC\uC0DD")}),n.jsx(Go,{analyser:B?.mainAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.sentence","\uC7AC\uC0DD")})]}),n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.noise","\uC18C\uC74C")}),n.jsx(Go,{analyser:B?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.noise","\uC18C\uC74C")})]})]});return Hc(e&&p,()=>typeof document<"u"?document.querySelector(".noise-settings-tooltip__header")?.closest(".tooltip__content")??null:null,()=>[v.current,f.current].map(Q=>Q?.querySelector("button")??null).find(Q=>!!Q&&Q.getClientRects().length>0)??v.current?.querySelector("button")??null),n.jsxs("div",{className:"pp-bottom",children:[n.jsxs("div",{className:"pp-bottom__left",children:[e?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pp-bottom__settings--desktop",children:n.jsx("div",{ref:v,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:D,className:p?"is-selected":void 0,"aria-expanded":p,"aria-haspopup":"dialog",ariaLabel:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),label:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),minWidth:140})})}),n.jsx("div",{className:"pp-bottom__settings--mobile",children:n.jsx("div",{ref:f,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:56,type:"dot",shape:"pill",icon:"settings",onClick:k,className:p?"is-selected":void 0,"aria-expanded":p,"aria-haspopup":"dialog",ariaLabel:h("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:R,className:"pp-bottom__meter-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:40,type:"dot",shape:"pill",icon:"audio-lines",onClick:T,selected:C,"aria-expanded":A?C:void 0,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&C&&!A&&n.jsx("div",{className:"pp-bottom__meters",children:L})]}),e&&C&&A&&$&&n.jsx(yn,{anchorRect:$,onClose:P,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"),children:n.jsx("div",{className:"pp-bottom__meters pp-bottom__meters--floating",children:L})}),n.jsxs("div",{className:"pp-bottom__right",children:[x&&n.jsx(fe,{htmlType:"button",size:56,type:"bar",icon:"check",onClick:typeof r=="function"?r:a,ariaLabel:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),label:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),variant:"main",disabled:!E}),N&&n.jsx(fe,{htmlType:"button",size:56,type:"bar",rightIcon:"chevron-right",align:"right",onClick:a,ariaLabel:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),label:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),variant:"main",disabled:!E})]}),e&&p&&n.jsx(Zc,{anchorRect:g,onClose:w,hideNoiseRows:d})]})}function Jc({title:e,subtitle:t,desc:a,depth:r,icon:s,wrapperStyle:l,iconTooltip:i,pageIndex:u,pageCount:c,progressMax:d,progressIndex:h,onBack:p,onClose:m}){const{t:g}=_e.useTranslation(),y=fn("(max-width: 767px)"),C=Number.isInteger(h)?h:u||0,b=Number.isInteger(d)?d:c||0,v=p||m,f=Array.isArray(r)?y?r[r.length-1]:r.join(" / "):r,B=typeof e=="string"?e.trim():e,_=typeof t=="string"?t.trim():t,N=!!(B||_),x=N?B||_:g("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),E=f||(B?t:void 0),w=y&&typeof E=="string"&&(E.includes(" \xB7 ")||E.includes(" / "))?E.split(/\s[·/]\s/).pop():E,D=o.useMemo(()=>{const k=l&&typeof l=="object"?{...l}:{};return!("width"in k)&&!("height"in k)&&(k.width="40px",k.height="40px"),k},[l]);return n.jsxs("header",{className:"pp-title training-popup-title",children:[n.jsxs("div",{className:"pp-title__left",children:[v?n.jsx(fe,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:g("common.back","\uB4A4\uB85C"),onClick:v,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:s?n.jsx(Cu,{icon:s,label:e,tooltip:i,wrapperStyle:D}):null}),n.jsxs("div",{className:"pp-title__text",children:[w?n.jsx("span",{className:"pp-title__depth caption-1",children:w}):null,n.jsx("span",{className:`pp-title__title h2${N?"":" pp-title__title--empty"}`,children:x}),a?n.jsx("span",{className:"pp-title__description caption-1",children:a}):null]})]}),n.jsx(Wu,{max:Math.max(0,b??0),index:Math.max(0,C??0)})]})}function gx(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function yx(e){return!e&&e!==0?[]:Array.isArray(e)?e.flatMap(t=>typeof t=="string"?t.split("|").map(a=>a.trim()).filter(Boolean):t||t===0?[String(t)]:[]):typeof e=="string"?e.split("|").map(t=>t.trim()).filter(Boolean):[String(e)]}const Qc=(e,t)=>{if(!t)return t;const a=typeof Vt?.t=="function"?Vt.t(e,{defaultValue:t}):void 0;return typeof a=="string"&&a?a:t};function ed(e,t,a){const r=e,s=r?.title||r?.name||(Array.isArray(t)?t[t.length-1]:void 0)||a||"\uD6C8\uB828",l=Kl().find(u=>u.key===(r?.category_0||r?.category_main_code)),i=l?.subs?.find(u=>u.key===(r?.category_1||r?.category_sub_code));return{title:s,label:r?.title||s,depth:t,icon:l?.icon,wrapperStyle:l?.color?{"--t-item-fg":l.color}:void 0,iconTooltip:[l?Qc(`topic.${l.key}`,l.label):void 0,i?Qc(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function As(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function td(e,t,a){if(!e||typeof e!="object"||Array.isArray(e))return e;const r=e,s=typeof a=="number"&&a>0?a:Date.now();return{...r,...r.shownAt===void 0&&t?{shownAt:t}:{},...r.answeredAt===void 0?{answeredAt:new Date(s).toISOString()}:{}}}function vx(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function _x({idPrefix:e,trainingData:t,depth:a,fallbackTitle:r="\uD6C8\uB828",pages:s=[],emptyMessage:l,buildResults:i,metaPatch:u}){const c=ed(t,a,r),d=typeof u=="function"?u(c)||{}:u||{},h=t?.id||t?.title||s.length;return{id:`${e}:${h}`,meta:{...c,...d},pages:s,emptyMessage:l,buildResults:i}}function xx(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return t.context||t.sentence||t.question||""||""}return""}function wx(e){if(e&&typeof e=="object"){const t=e;if(Array.isArray(t.selectedValues))return t.selectedValues;if(t.selectedValue!==void 0)return t.selectedValue;if(t.selectedIndex!==void 0)return t.selectedIndex;if(t.value!==void 0)return t.value}return e}function Bx(e,t=[]){if(Array.isArray(e))return e.join(", ");if(typeof e=="number"&&Array.isArray(t))return String(t[e]??"");if(typeof e=="string")return e}function nd(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function kx(e,t,a,r){return nd(e,t*a+r)}function Ax({payload:e,selected:t,choices:a=[],correctAnswers:r=[]}){if(e&&typeof e=="object"){const s=e;if(Array.isArray(s.selectedValues))return r.every(l=>s.selectedValues.includes(l))&&s.selectedValues.every(l=>r.includes(l));if(typeof s.correct=="boolean")return s.correct}if(r.length){if(typeof t=="number"&&Array.isArray(a)&&a.length)return r.some(s=>String(s)===String(a[t]));if(typeof t<"u")return r.some(s=>String(s)===String(t))}}function Nx(e){return e?Array.isArray(e.items)?e.items.map(t=>{const a=t;return typeof t=="string"?{sentence:t}:{sentence:a.context||a.sentence||"",contextCode:a.contextCode||a.context_code}}):Array.isArray(e.sentences)?e.sentences.map(t=>{const a=t;return typeof t=="string"?{sentence:t}:{sentence:a.sentence||a.context||"",contextCode:a.contextCode}}):Array.isArray(e.contexts)?e.contexts:e.contextCode?[{contextCode:e.contextCode}]:[]:[]}const ad=o.createContext(null);function Ex(){const e=o.useContext(ad);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function Dx({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,choices:l=[],onDone:i,onChange:u}){const{t:c}=_e.useTranslation(),d=typeof e=="number"?e:-1,h=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",[p,m]=o.useState(()=>l.map(()=>null)),g=JSON.stringify(l),y=l.length;o.useEffect(()=>{m(Array.from({length:y},()=>null))},[g]);const C=o.useRef(void 0);o.useEffect(()=>{const B=C.current;typeof B=="number"&&typeof t=="number"&&typeof e=="number"&&B>=e&&t<e&&m(Array.from({length:y},()=>null)),C.current=t},[t,e,y]);const b=o.useMemo(()=>p.filter(B=>B!==null).length+1,[p]),v=o.useCallback(B=>{if(!aa(h))return;const _=p;let N;if(_[B]!=null){const E=_[B];N=_.map(w=>w!==null&&w>=E?null:w)}else N=[..._],N[B]=b;m(N);const x={selectedOrder:N,words:l,__ts:Date.now()};try{typeof u=="function"&&u(x)}catch{}if(_[B]==null&&N.length>0&&N.every(E=>E!==null))try{typeof i=="function"&&i(x)}catch{}},[h,p,b,u,i,l]),f=s??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:f,onDone:i,children:n.jsx("div",{className:"training-step__cards",children:l.map((B,_)=>n.jsx(Qo,{item:{word:B},disabled:h==="disabled",selectable:!0,selected:p[_]!==null,orderRank:p[_],onSelect:()=>v(_),flipDelay:_*120,hideLabel:!1,hideAudio:!0},`${B}-${_}`))})})}function Sr(e){return null}Sr.__isTrainingPage=!0;function wa(e,t){const a=Ex();return{ctx:a,index:e,stepIndex:a.currentStepIndex,isLast:typeof e=="number"&&typeof t=="number"?e===t-1:!1,onDone:r=>a.handleStepDone(r,e),onChange:r=>a.handleStepChange(r,e)}}function rd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i}=wa(e,t);return n.jsx(ws,{...a,index:r,stepIndex:s,isLast:l,onDone:i})}function od({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(_s,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function sd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(xs,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function ld({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(Bs,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function id({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(Uc,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function Sx({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(Dx,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}const ud=3e4,jx=/^(https?:|blob:|data:audio|\/|\.\/)/;function cd(e){return typeof e=="string"&&jx.test(e)?e:null}const Tx=e=>typeof e=="string"&&e.trim()!==""?e:null,Ns=Symbol("timed-out");function Mx(e,t){if(t<=0)return Promise.resolve(Ns);let a;return Promise.race([Promise.resolve(e),new Promise(r=>{a=setTimeout(()=>r(Ns),t)})]).finally(()=>clearTimeout(a))}function Lx(e){return e?Da()||ar()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function $x(e,t){const a=[],r=cd(t);r&&a.push({kind:"raw",resolve:async()=>r});const s=(e??"").trim();if(!s)return a;for(const[l,i]of[["urlResolver",Da()],["fallbackUrlResolver",ar()]])i&&a.push({kind:l,resolve:async u=>{let c;try{c=await Mx(i(s),u)}catch(h){return Nt(`question-sound-threw-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uB358\uC84C\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`,h),null}return c===Ns?(Nt(`question-sound-slow-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 ${ud}ms \uBC14\uD034 \uC548\uC5D0 \uC548 \uD480\uB838\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB97C \uBC84\uB9AC\uACE0 \uB2E4\uC74C\uC73C\uB85C \uAC04\uB2E4. \uC11C\uBC84 \uD569\uC131\uC744 \uAE30\uB2E4\uB9AC\uB294 \uB9AC\uC878\uBC84\uB77C\uBA74 \uC774 \uC790\uB9AC\uAC00 \uAE38\uC5B4\uC9C4\uB2E4. \uC18C\uB9AC\uAC00 \uC544\uC608 \uC548 \uB098\uBA74 \uC5EC\uAE30\uBD80\uD130 \uBCF4\uB77C.`),null):Tx(c)||(Nt(`question-sound-empty-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uC8FC\uC18C\uB97C \uC548 \uC92C\uB2E4(\uBC1B\uC740 \uAC83: ${JSON.stringify(c)}) \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`),null)}});return a}function Rx(){return Date.now()+ud}const Px=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function Ix(e){Nt("question-sound-none",`[core] "${e}" \uC758 \uC18C\uB9AC \uC8FC\uC18C\uB97C \uD55C \uC790\uB9AC\uC5D0\uC11C\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uBE0C\uB77C\uC6B0\uC800 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4. configureTTS \uAC00 \uAC78\uB824 \uC788\uB294\uC9C0, \uB9AC\uC878\uBC84\uAC00 \uC8FC\uC18C\uB97C \uC8FC\uB294\uC9C0 \uC704 \uC904\uB4E4\uC744 \uBCF4\uB77C.`)}function jr(...e){for(const t of e)if(typeof t=="string"){const a=t.trim();if(a.length)return a}else{if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t)&&t.length)return t.join(", ");if(t&&typeof t=="object"){const a=t,r=[a.text,a.label,a.value];for(const s of r){if(typeof s=="string"&&s.trim().length)return s.trim();if(typeof s=="number"||typeof s=="boolean")return String(s)}}}return null}function Fx(e){return jr(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function Ox(e){return cd(jr(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function dd(e){if(!e)return;if(typeof e.decision=="boolean")return e.decision;if(typeof e.correct=="boolean")return e.correct;if(typeof e.heard=="boolean")return e.heard;if(typeof e.judgement=="boolean")return e.judgement;const t=jr(e?.status,e?.result,e?.judge,e?.note);if(t){const a=t.toLowerCase();if(["ok","true","\uB9DE\uC74C","\uC815\uB2F5"].some(r=>a.includes(r)))return!0;if(["ng","false","\uD2C0\uB9BC","\uC624\uB2F5"].some(r=>a.includes(r)))return!1}}function pd(e){const{score:t,contextsLength:a,results:r=[],subtitle:s,onReplay:l,onClose:i,inline:u=!1,pending:c=!1}=e||{},{t:d}=_e.useTranslation(),h=o.useId(),p=o.useCallback(()=>!c,[c]);o.useEffect(()=>{const k=a??0;if(t!=null&&k>0&&t/k>.5){const A=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("party:trigger",{detail:{count:140,strength:1.6,duration:2200}}))},0);return()=>window.clearTimeout(A)}},[t,a]);const m=o.useCallback(k=>{const A=dd(k),R=jr(k?.wording,k?.label);return A===!0?{variant:"main",label:R??d("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:A===!1?{variant:"danger",label:R??d("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:R??d("training.result.notJudged","\uBBF8\uD310\uC815")}},[d]),g=a??0,y=t??0,C=o.useMemo(()=>Array.isArray(r)?r:[],[r]),b=o.useRef(null),[v,f]=o.useState(null),B=o.useCallback(()=>{b.current?.(),b.current=null,f(null)},[]);o.useEffect(()=>B,[B]);const _=o.useRef(0),N=(k,A)=>{if(!In)return;const R=Math.round(performance.now()-_.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${R}ms ${k}`,A??"")},x=o.useRef(0),E=o.useCallback((k,A,R)=>{B();const $=++x.current,G=()=>x.current===$;_.current=In?performance.now():0,N(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${k}`,{text:A,rawUrl:R}),f(k),b.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),x.current++,Xr()};const T=Z=>{N("\uD2BC\uB2E4",Z);const F=Ga(Z,K=>{N(`\uB05D\uB0AC\uB2E4 \u2014 ${K?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:G()}),K&&G()&&(b.current=null,f(null))});return b.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),x.current++,F.stop(),Xr()},F.done},P=$x(A,R);N("\uCC28\uB840",P.map(Z=>Z.kind));const L=P[0]?.kind==="raw",Q=L?T(R):Promise.resolve(!1);(async()=>{if(await Q||!G())return;const Z=Rx(),F=L?P.slice(1):P;for(let K=0;K<F.length;K++){if(!G())return;N(`${F[K].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const M=await F[K].resolve(Px(Z,F.length-K));if(N(`${F[K].kind} \uAC00 \uB2F5\uD588\uB2E4`,M),!G()||M&&(await T(M)||!G()))return}G()&&(N("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),Ix(A),b.current=()=>{x.current++,Xr()},N("\uB0AD\uB3C5\uD55C\uB2E4"),j1(A,{onEnd:()=>{G()&&(b.current=null,f(null))}}))})()},[B]),w=o.useMemo(()=>C.map(k=>{const A=k??{},R=Fx(A)||d("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:$,label:G}=m(A),T=Array.isArray(A.corrects)?A.corrects:[],P=T.length?T.join(", "):A.answer!=null&&A.answer!==""?String(A.answer):null,L=typeof A.selectedText=="string"?A.selectedText:null,Q=dd(A)===!0,Z=Ox(A),F=!!Z||Lx(R);return{problem:R,variant:$,label:G,answer:P,selectedText:L,isCorrect:Q,sound:Z,canHear:F}}),[C,m,d]),D=o.useMemo(()=>w.some(k=>k.answer!==null||k.selectedText!==null),[w]);return n.jsx(Hn,{onClose:i,closeOnBackdrop:!1,inline:u,ariaLabel:d("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4."),className:"popup--training-result",beforeClose:p,footerClassName:"trp-result__foot",footer:({animateThen:k,closeWithAnimation:A})=>n.jsxs(n.Fragment,{children:[c&&n.jsx("p",{id:h,className:"trp-actions__reason caption-1",role:"status",children:d("training.result.pendingDone","\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsxs("div",{className:"trp-actions",children:[n.jsx(fe,{htmlType:"button",size:56,type:"bar",label:d("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>k(l)}),n.jsx(fe,{htmlType:"button",size:56,type:"bar",label:d("training.result.done","\uC644\uB8CC"),variant:"main",onClick:A,disabled:c,onDisabledClick:c?()=>{}:void 0,"aria-describedby":c?h:void 0})]})]}),children:()=>n.jsxs("div",{className:"trp-result is-on",children:[n.jsxs("header",{className:"trp-result__head",children:[n.jsx("p",{className:"trp-result__eyebrow caption-1",children:d("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")}),n.jsx("h1",{className:"trp-result__title h2",children:d("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.")}),s&&n.jsx("p",{className:"trp-result__subtitle body-3",children:s}),n.jsx("div",{className:"trp-score",children:n.jsxs("div",{className:"trp-score__figure","aria-label":d("training.result.scoreAria",{correct:y,total:g}),children:[n.jsx("span",{className:"trp-score__big",children:y}),n.jsx("span",{className:"trp-score__sep",children:"/"}),n.jsx("span",{className:"trp-score__total",children:g})]})})]}),w.length>0&&n.jsx("section",{className:"trp-result__body",children:n.jsxs("div",{className:`result-table${D?" result-table--answer":""}`,role:"table","aria-label":d("training.result.tableAriaLabel","\uBB38\uD56D\uBCC4 \uD310\uC815"),children:[n.jsxs("div",{className:"result-table__head caption-1",role:"row",children:[n.jsx("span",{role:"columnheader",children:d("common.col.problem","\uBB38\uC81C")}),D&&n.jsx("span",{role:"columnheader",children:d("training.result.colAnswerSelected","\uC815\uB2F5 \xB7 \uC120\uD0DD")}),n.jsx("span",{className:"col-right",role:"columnheader",children:d("training.result.colJudge","\uD310\uC815")})]}),w.map((k,A)=>n.jsxs("div",{className:"result-table__row",role:"row",children:[n.jsxs("div",{className:"trp-row__problem",children:[n.jsx("span",{className:"trp-row__no caption-1",children:String(A+1).padStart(2,"0")}),n.jsx("div",{className:"trp-row__q body-2",children:k.problem}),k.canHear&&n.jsx(fe,{htmlType:"button",size:32,type:"dot",useBorder:!1,icon:v===A?"square":"volume-2",className:"trp-row__replay",ariaLabel:v===A?d("training.result.replaySoundStop",{no:A+1,defaultValue:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4"}):d("training.result.replaySound",{no:A+1,defaultValue:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30"}),onClick:()=>v===A?B():E(A,k.problem,k.sound)})]}),D&&n.jsxs("div",{className:"trp-row__answers",children:[k.answer!==null&&n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:"trp-row__answer-label answer-correct caption-1",children:d("training.result.colAnswer","\uC815\uB2F5")}),n.jsx("span",{className:"trp-row__answer-value body-2",children:k.answer})]}),n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:`trp-row__answer-label answer-selected caption-1 ${k.isCorrect?"is-correct":"is-wrong"}`,children:d("training.result.colSelected","\uC120\uD0DD")}),n.jsx("span",{className:`trp-row__answer-value body-2 ${k.isCorrect?"is-correct":"is-wrong"}`,children:k.selectedText??"\u2014"})]})]}),n.jsx("div",{className:"trp-row__judge",children:n.jsx(jt,{variant:k.variant,label:k.label,fill:"soft",minWidth:80})})]},A))]})})]})})}const Es=new Set;function zx(e){o.useEffect(()=>{if(!e||Es.has(e))return;Es.add(e);const t=()=>typeof document>"u"||document.visibilityState!=="hidden";let a=null,r=null,s=0,l=0;const i=()=>{const h=Date.now();a==null&&(a=h),r==null&&(r=h)},u=()=>{r!=null&&(s+=Date.now()-r,r=null)};t()&&i();const c=()=>{if(u(),a==null)return;const h=s-l;if(h<1e3||l===0&&s<5e3)return;const p=Date.now(),m=p-h;l=s,Nf({trainingType:e,startedAt:new Date(m).toISOString(),endedAt:new Date(p).toISOString()})},d=()=>{t()?i():c()};return typeof document<"u"&&document.addEventListener("visibilitychange",d),typeof window<"u"&&window.addEventListener("pagehide",c),()=>{typeof document<"u"&&document.removeEventListener("visibilitychange",d),typeof window<"u"&&window.removeEventListener("pagehide",c),c(),Es.delete(e)}},[e])}function Tr(e,t){return e&&e.id||`page-${t??0}`}function Mr(e,t){return e&&e.key||`step-${t??0}`}function Lr(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function Wx(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const Hx=300,Vx=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},Rn=Object.freeze({}),hd=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function Ds(e){const t=e,a=t?.results||t?.answers||[],r=Array.isArray(a)&&a.length>0?a.length:null,s=Array.isArray(a)?a.filter(l=>l?.correct===!0||l?.isCorrect===!0||l?.score===1||l?.heard===!0||l?.judgement===!0).length:null;return{results:a,correct:r!=null?s:null,total:r}}const qx=e=>n.jsx(pd,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function Ux(e){const{scenario:t,title:a,subTitle:r,depth:s,icon:l,wrapperStyle:i,iconTooltip:u,pageIndex:c,pageCount:d,stepIndex:h,stepCount:p,onBack:m,onComplete:g,onRoundFinished:y,onNext:C,onSettings:b,useNoiseSetting:v=!0,children:f,ariaLabel:B,label:_,buildResults:N,onResult:x,typeKey:E,entryPoint:w,dailyTotal:D,itemRef:k,renderResultPopup:A,noiseOverride:R,hideNoiseRows:$=!1}=e;zx(E&&!hd.has(E)?E:"");const G=o.useRef(0);o.useEffect(()=>{G.current=Date.now()},[]);const{t:T}=_e.useTranslation(),P=x,L=!!t,Q=t?.id||null,Z=t?.meta||{},F=Array.isArray(t?.pages)?t.pages:[],K=Array.isArray(f)||o.isValidElement(f)&&typeof f!="function"?o.Children.toArray(f).filter(o.isValidElement):[],M=K.length>0,q=pe=>pe===Sr||pe?.__isTrainingPage===!0,Y=M&&K.some(pe=>q(pe.type)),U=Y?K.filter(pe=>q(pe.type)).map((pe,De)=>{const Re=pe.props||{};return{id:`children-page-${De}`,steps:o.Children.toArray(Re.children).filter(o.isValidElement),pageTop:Re.pageTop||Re.top||null,pageBottom:Re.pageBottom||Re.bottom||null}}):[{id:"children-page-0",steps:K}],S=M&&!L&&typeof f!="function",I=S?Math.max(1,U.length):0;o.useEffect(()=>{if(!(typeof document>"u"||!document.body)&&!document.body.classList.contains("ihabdevteam-core-scope"))return document.body.classList.add("ihabdevteam-core-scope"),()=>{document.body.classList.remove("ihabdevteam-core-scope")}},[]),o.useEffect(()=>{if(typeof document>"u"||!document.body)return;const pe=document.body;return pe.dataset.ihabTrainingPopupCount=String(Number(pe.dataset.ihabTrainingPopupCount||"0")+1),pe.classList.add("ihab-training-popup-open"),()=>{const De=Number(pe.dataset.ihabTrainingPopupCount||"1")-1;De>0?pe.dataset.ihabTrainingPopupCount=String(De):(delete pe.dataset.ihabTrainingPopupCount,pe.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!(typeof document>"u"||!document.body))return cv()},[]);const[O,z]=o.useState({...ta,enabled:!1}),se=o.useRef(O);o.useEffect(()=>{se.current=O},[O]);const te=o.useRef(R),de=o.useRef(!1),ee=o.useRef(null);o.useEffect(()=>{let pe=!1;const De=Re=>{if(pe)return;de.current=!0;const Ge=Re?ea({...ta,enabled:!1},Re):{...ta},ze=ee.current;ee.current=null;const X=ze?ea(Ge,ze):Ge;se.current=X,z(X),ze&&!te.current&&co(X),ir(X);const ce=te.current;if(ce){const Ae=typeof ce=="function"?ce(X):ce,Ve=ea(X,Ae);se.current=Ve,z(Ve),ir(Ve)}};return If().then(Re=>{if(pe){const Ge=ee.current;if(ee.current=null,Ge&&!te.current){const ze=Re?ea({...ta,enabled:!1},Re):{...ta};co(ea(ze,Ge))}return}De(Re)}),()=>{pe=!0}},[]);const[V,ne]=o.useState(null),[W,H]=o.useState(null),ie=o.useCallback((pe,De)=>{pe==="main"?ne(De):H(De)},[]),Te=o.useRef(null),ye=o.useRef(null),he=o.useCallback(()=>{ye.current!==null&&(clearTimeout(ye.current),ye.current=null);const pe=Te.current;Te.current=null,pe&&co(pe)},[]);o.useEffect(()=>{if(typeof window>"u")return;const pe=()=>{document.visibilityState==="hidden"&&he()};return window.addEventListener("pagehide",he),document.addEventListener("visibilitychange",pe),()=>{window.removeEventListener("pagehide",he),document.removeEventListener("visibilitychange",pe),he()}},[he]);const Se=o.useCallback(pe=>{const De=ea(se.current,pe);if(se.current=De,z(De),!de.current){ee.current={...ee.current??{},...pe},ir(De);return}te.current||(Te.current=De,ye.current!==null&&clearTimeout(ye.current),ye.current=setTimeout(he,Hx)),ir(De)},[he]),$e=O.mainSpeed,Ne=O.mainVolume,ue=o.useCallback(pe=>Se({mainSpeed:pe}),[Se]),xe=o.useCallback(pe=>Se({mainVolume:pe}),[Se]),ke=o.useMemo(()=>({settings:O,setSettings:Se,registerAnalyser:ie,mainAnalyser:V,noiseAnalyser:W,playbackRate:$e,setPlaybackRate:ue,mainVolume:Ne,setMainVolume:xe}),[O,Se,ie,V,W,$e,ue,Ne,xe]),Ee=o.useRef(null),[We,He]=o.useState(0),ot=o.useRef([]),[Qe,Je]=o.useState("center"),[vt,je]=o.useState(!1),Ye=o.useRef(!1),Be=o.useRef(null),Ue=o.useCallback(pe=>{Ye.current||(Ye.current=!0,je(!0),Be.current=setTimeout(()=>{try{pe()}catch{Ye.current=!1,je(!1)}},Vx()?0:dx))},[]);o.useEffect(()=>()=>{Be.current&&clearTimeout(Be.current)},[]);const qe=o.useRef(m);o.useEffect(()=>{qe.current=m});const pt=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{const pe=Ee.current,De=pt.current;if(fo(pe,De),pe){const Re=Array.from(pe.querySelectorAll(Bn)).filter(Ge=>!Ge.closest('[aria-hidden="true"]'))[0];if(Re)try{Re.focus()}catch{}}return()=>{const Re=document.activeElement;if(!Re||Re===document.body||pe&&pe.contains(Re))try{bo(De)?.focus?.()}catch{}}},[]),o.useEffect(()=>Kn(()=>Ue(()=>{const pe=qe.current;typeof pe=="function"&&pe()})),[Ue]),mo(Ee,!0);const[_t,Dt]=o.useState(!1),Bt=o.useRef(!1),[st,tt]=o.useState(null),kt=o.useRef(0),At=o.useRef(0),Tt=()=>{kt.current+=1,At.current+=1,tt(null)},[Lt,gt]=o.useState(""),[it,ut]=o.useState(()=>Lr()),ct=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!L&&!S||(ut(Lr()),Tt())},[L,Q,S]),o.useEffect(()=>{S&&ut(pe=>{const De=Math.max(0,Math.min(pe.pageIndex,Math.max(0,I-1)));return De!==pe.pageIndex?{...pe,pageIndex:De,stepIndex:0}:pe})},[S,I]);const ve=S?Math.max(0,Math.min(it.pageIndex,I-1)):0,Me=S?U[ve]:null,Pe=S&&Me&&Array.isArray(Me.steps)?Me.steps:[],Oe=L?it.pageIndex:S?ve:typeof c=="number"?c:0,dt=L?F[Math.max(0,Math.min(it.pageIndex,Math.max(0,F.length-1)))]:null,St=L&&dt&&Array.isArray(dt.steps)?dt.steps:[],yt=L?St.length:S?Pe.length:typeof p=="number"?p:0,wt=L||S?Math.max(0,Math.min(it.stepIndex,Math.max(0,yt))):typeof h=="number"?h:0,Ct=L?F.length:S?I:typeof d=="number"?d:0;o.useEffect(()=>{if(!L&&!S)return;const pe=L?Tr(dt,Oe):Me?.id||`children-page-${Oe??0}`,De=new Date().toISOString();for(let Re=0;Re<=wt;Re+=1){const Ge=L?Mr(St[Re],Re):`step-${Re}`,ze=be(pe,Ge);oe.current.has(ze)||oe.current.set(ze,De)}},[L,S,Oe,wt,Me?.id]),o.useLayoutEffect(()=>{const pe=ct.current;if(typeof Oe=="number"&&pe!==null&&Oe!==pe&&Oe>pe)try{gt(T("training.problemNotice",{n:Oe+1}))}catch{}ct.current=typeof Oe=="number"?Oe:ct.current},[Oe,c,T]),o.useLayoutEffect(()=>{const pe=Ee.current;if(!pe)return;const De=()=>pe.querySelector(".page-popup__scroll");let Re=null,Ge=null,ze=null;const X=Ze=>{const ft=De();if(!ft)return;const bt=ft.scrollHeight<=ft.clientHeight;if(Je(bt?"center":"top"),Ze&&!Bt.current){Bt.current=!0;try{Dt(!0)}catch{}try{Ve.disconnect()}catch{}}},ce=()=>{Re!==null&&cancelAnimationFrame(Re),Re=requestAnimationFrame(()=>{Ge!==null&&clearTimeout(Ge),Ge=setTimeout(()=>X(!0),60)})},Ae=()=>{ze!==null&&cancelAnimationFrame(ze),ze=requestAnimationFrame(()=>X(!1))};ce(),window.addEventListener("resize",Ae);const Ve=new MutationObserver(ce);Ve.observe(pe,{childList:!0,subtree:!0,attributes:!0});const Ke=setTimeout(()=>{Bt.current||X(!0)},400);return()=>{window.removeEventListener("resize",Ae),Re!==null&&cancelAnimationFrame(Re),Ge!==null&&clearTimeout(Ge),ze!==null&&cancelAnimationFrame(ze),clearTimeout(Ke);try{Ve.disconnect()}catch{}}},[Ee]);const Le=o.useCallback(pe=>{Ee.current&&(Ee.current._childOnNext=pe)},[]),at=o.useCallback(pe=>{Ee.current&&(Ee.current._childOnResult=pe)},[]),oe=o.useRef(new Map),be=(pe,De)=>`${pe}\0${De}`,Ie=o.useCallback((pe,De,Re)=>{ut(Ge=>{const ze=Ge.answersByPage[pe]||{},X=ze[De],ce=As(Re),Ae=As(X);if(X&&Ae>ce)return Ge;const Ve=td(Re,oe.current.get(be(pe,De)),ce);return{...Ge,answersByPage:{...Ge.answersByPage,[pe]:{...ze,[De]:Ve}}}})},[ut]),Xe=o.useCallback((pe,De,Re)=>{const Ge=Tr(dt,Oe),ze=Mr(pe,De);Ie(Ge,ze,Re)},[dt,Oe,Ie]),et=o.useCallback((pe,De,Re)=>{const Ge=Tr(dt,Oe),ze=Mr(pe,De);Ie(Ge,ze,Re),!Re?.allowChange&&pe?.autoAdvance!==!1&&ut(X=>({...X,stepIndex:Math.max(X.stepIndex,De+1)}))},[dt,Oe,Ie,ut]),rt=o.useCallback((pe,De)=>{const Re=Me?.id||`children-page-${Oe??0}`,Ge=typeof De=="number"?De:wt??0,ze=`step-${Ge}`;Ie(Re,ze,pe),pe?.allowChange||ut(X=>({...X,stepIndex:Math.max(X.stepIndex,Ge+1)}))},[Me,Oe,wt,Ie,ut]),$t=o.useCallback((pe,De)=>{const Re=Me?.id||`children-page-${Oe??0}`,Ge=`step-${typeof De=="number"?De:wt??0}`;Ie(Re,Ge,pe)},[Me,Oe,wt,Ie]),_n=S?{currentPageIndex:Oe??0,currentStepIndex:wt??0,totalStepsInPage:Pe.length,handleStepDone:rt,handleStepChange:$t}:null,on=async()=>{const pe=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:F,flowState:it,answersByPage:it.answersByPage})):null;return typeof P=="function"&&await Promise.resolve(P(pe))||pe},Rt=async()=>{const pe=Me?.id||`children-page-${it.pageIndex}`,De=it.answersByPage[pe]||{},Re=Y?(()=>{const X={};let ce=0;return U.forEach(Ae=>{const Ve=it.answersByPage[Ae.id]||{},Ke=Array.isArray(Ae.steps)?Ae.steps.length:0;for(let Ze=0;Ze<Ke;Ze+=1){const ft=Ve[`step-${Ze}`];typeof ft<"u"&&(X[`step-${ce+Ze}`]=ft)}ce+=Ke}),X})():De;if(typeof N=="function"){const X=await Promise.resolve(N(Re,{pageAnswers:De,answersByPage:it.answersByPage,pages:U,currentPageId:pe}));return typeof P=="function"&&await Promise.resolve(P(X))||X}const Ge=Object.entries(De).map(([X,ce],Ae)=>({index:Ae,key:X,payload:ce})),ze={results:Ge,answers:Ge,score:0};return typeof P=="function"&&await Promise.resolve(P(ze))||ze},zt=()=>{const pe=++kt.current,De=()=>pe!==kt.current;try{if(typeof document<"u"&&document.body){try{document.dispatchEvent(new CustomEvent("speechear-close-tooltips"))}catch{}document.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,cancelable:!0})),document.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0}))}}catch{}if(L){const ze=on();tt(Rn);const X=ze;Promise.resolve(X).then(ce=>{De()||tt(ce||{isEmpty:!0})}).catch(ce=>{!De()&&tt({isEmpty:!0})});return}if(S){const ze=Rt();tt(Rn);const X=ze;Promise.resolve(X).then(ce=>{De()||tt(ce||{isEmpty:!0})}).catch(ce=>{!De()&&tt({isEmpty:!0})});return}const Re=Ee.current&&Ee.current._childOnResult,Ge=ze=>{try{return ze?ze():void 0}catch{return}};if(typeof Re=="function"){const ze=Ge(Re);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:En&&En.tagName.toUpperCase()==="SCRIPT"&&En.src||new URL("components.cjs.js",document.baseURI).href}catch{}ze&&typeof ze.then!="function"?tt(ze):tt(ze&&typeof ze.then=="function"?Rn:{});const X=()=>{De()||tt(ce=>ce===Rn?{}:ce)};Promise.resolve(ze).then(ce=>{ce&&!De()?tt(ce):X()}).catch(ce=>{X()});return}if(typeof P=="function"){const ze=Ge(P);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:En&&En.tagName.toUpperCase()==="SCRIPT"&&En.src||new URL("components.cjs.js",document.baseURI).href}catch{}ze&&typeof ze.then!="function"?tt(ze):tt(ze&&typeof ze.then=="function"?Rn:{});const X=()=>{De()||tt(ce=>ce===Rn?{}:ce)};Promise.resolve(ze).then(ce=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:En&&En.tagName.toUpperCase()==="SCRIPT"&&En.src||new URL("components.cjs.js",document.baseURI).href}catch{}ce&&!De()?tt(ce):X()}).catch(ce=>{console.error("viewResults external handler failed",ce),X()});return}},sn=()=>{if(L){if(typeof Oe=="number"&&typeof Ct=="number"&&Oe<Ct-1){ut(De=>({...De,pageIndex:De.pageIndex+1,stepIndex:0}));return}return zt()}if(S){const De=Pe.length;if(typeof wt=="number"&&wt<De-1){ut(Re=>({...Re,stepIndex:Re.stepIndex+1}));return}if(typeof Oe=="number"&&typeof Ct=="number"&&Oe<Ct-1){ut(Re=>({...Re,pageIndex:Re.pageIndex+1,stepIndex:0}));return}return zt()}if(typeof C=="function"){try{C()}catch{}return}const pe=Ee.current&&Ee.current._childOnNext;if(typeof pe=="function"){try{pe()}catch{}return}},It=L?Z.title||Z.label||B||T("common.popup","\uD31D\uC5C5"):a||_||(Array.isArray(s)?s[s.length-1]:void 0)||B||T("common.popup","\uD31D\uC5C5"),xn=B||It,xt=L?Z.title??Z.label??It:a??_??It,Pt=(pe,De)=>{const Re=Tr(dt,Oe),Ge=Mr(pe,De),ze=it.answersByPage[Re]?.[Ge],X=Wx(pe,{page:dt,pageIndex:Oe,step:pe,stepIndex:De,storedPayload:ze,answersByPage:it.answersByPage,flowState:it}),ce={key:Ge,index:De,stepIndex:wt,isLast:De===St.length-1};switch(pe?.type){case"listen":return n.jsx(ws,{...ce,...X,onDone:Ae=>et(pe,De,Ae)});case"confirm":return n.jsx(_s,{...ce,...X,onDone:Ae=>et(pe,De,Ae),onChange:Ae=>Xe(pe,De,Ae)});case"confirmWithText":return n.jsx(xs,{...ce,...X,onDone:Ae=>et(pe,De,Ae),onChange:Ae=>Xe(pe,De,Ae)});case"orderList":return n.jsx(Bs,{...ce,...X,onDone:Ae=>et(pe,De,Ae),onChange:Ae=>Xe(pe,De,Ae)});default:return null}},Ut=o.useRef(void 0);o.useEffect(()=>{const pe=Ut.current;if(Ut.current=Oe,pe===void 0||pe===Oe||!gr())return;const De=Ee.current;if(!De)return;const Re=document.activeElement;if(!(!Re||Re===document.body||!De.contains(Re)||Re.disabled===!0))return;const Ge=De.querySelector(`.training-steps ${Bn.split(", ").join(", .training-steps ")}`)??Array.from(De.querySelectorAll(Bn)).find(ze=>!ze.closest('[aria-hidden="true"]'));try{Ge?.focus()}catch{}},[Oe]);const Gt=L?F.length>0?n.jsx("div",{className:"training-steps",children:St.map((pe,De)=>Pt(pe,De))},`replay-${We}`):n.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:n.jsx("div",{className:"pp-empty",children:t?.emptyMessage||T("training.noQuestions","\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):null,Pn=S?n.jsxs(ad.Provider,{value:_n,children:[Me?.pageTop?n.jsx("div",{className:"training-page-top",children:Me.pageTop}):null,n.jsx("div",{className:"training-steps",children:Pe.map((pe,De)=>{const Re=pe;return o.cloneElement(Re,{...Re.props,_stepIndex:De,_totalSteps:Pe.length,_stepKey:`step-${De}`,_pageIndex:Oe})})},`replay-${We}`),Me?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:Me.pageBottom}):null]}):null,mn=o.useRef(-1),Kt=o.useCallback(()=>{if(!E)return;const pe=st,{results:De,correct:Re,total:Ge}=Ds(st),ze={correct:Re,total:Ge,attempt:ot.current.length+1,previousAttempts:[...ot.current]};if(mn.current===At.current)return ze;mn.current=At.current,Ef({items:Pf(De),category:hd.has(E)?"sentence":"word",trainingType:E,entryPoint:w??"sentence",itemRef:k??null,correct:Re,total:Ge,score:typeof pe?.score=="number"?pe.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-G.current)/1e3)),dailyTotal:D??null});try{y?.(ze)}catch{}return ze},[E,w,D,k,st,y]);o.useEffect(()=>{!st||st===Rn||st?.isEmpty||(Ds(st).total??0)>0&&Kt()},[st,Kt]);const Qt=o.useCallback(()=>{const pe=Kt();Tt(),Ue(()=>{typeof g=="function"&&g(pe),typeof m=="function"&&m()})},[g,m,Kt,tt,Ue]),ln=o.useCallback(()=>gt(""),[gt]),Cn=o.useCallback(()=>{Ue(()=>{typeof m=="function"&&m()})},[m,Ue]),Ht=n.jsxs("div",{className:`page-popup${vt?" page-popup--closing":""}`,role:"dialog","aria-modal":"true","aria-label":xn,children:[n.jsxs("div",{ref:Ee,className:`page-popup__panel ${_t?"":"page-popup__panel--measuring"} ${Qe==="center"?"page-popup__panel--center":Qe==="top"?"page-popup__panel--top":""}`,children:[n.jsx(Jc,{title:xt,subtitle:L?Z.subtitle||Z.label:Array.isArray(s)?s.join(" / "):void 0,desc:L?void 0:r,depth:L?Z.depth:s,icon:L?Z.icon:l,wrapperStyle:L?Z.wrapperStyle:i,iconTooltip:L?Z.iconTooltip:u,progressMax:Ct,progressIndex:Oe,pageIndex:Oe,pageCount:Ct,onBack:Cn,onClose:Cn}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${Qe==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:S?Pn:L?Gt:typeof f=="function"?f({registerOnNext:Le,registerOnResult:at,panelRef:Ee,setResultOverlay:tt}):f})}),n.jsx(Xc,{onSettings:b,onNext:sn,onResult:zt,useNoiseSettingBtn:!!(L?Z.useNoiseSetting??!0:v),stepIndex:wt,stepCount:yt,pageIndex:Oe,pageCount:Ct,resultOpen:!!(st&&!st.isEmpty),hideNoiseRows:$})]}),st&&!st.isEmpty&&(A??qx)({score:st.score,results:st.results||st.answers||[],contextsLength:st.results?st.results.length:st.answers?st.answers.length:0,onReplay:()=>{if(G.current=Date.now(),st!==Rn){const{correct:pe,total:De}=Ds(st);ot.current.push({correct:pe,total:De})}if(Tt(),He(pe=>pe+1),L){if(ut(Lr()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if(S){ut(Lr());return}try{const pe=Ee.current&&Ee.current._childOnResult;typeof pe=="function"&&pe({replay:!0})}catch{}},onClose:Qt,pending:st===Rn}),st?.isEmpty&&n.jsx("div",{className:"page-popup page-popup--result-empty",role:"dialog","aria-modal":"true","aria-label":T("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC"),children:n.jsxs("div",{className:"page-popup__panel page-popup__panel--center",children:[n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:n.jsx("div",{className:"page-popup__empty",children:T("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")})})}),n.jsx("div",{className:"page-popup__bottom",children:n.jsx(fe,{htmlType:"button",variant:"main",size:48,onClick:Qt,label:T("training.result.done","\uC644\uB8CC")})})]})}),n.jsx(ba,{message:Lt,position:"top",onClose:ln})]}),wn=n.jsx(Cs.Provider,{value:ke,children:Ht});return typeof document<"u"&&document.body?un.createPortal(wn,document.body):wn}const Vn=Ux;Vn.Page=Sr,Vn.ListenStep=rd,Vn.ConfirmStep=od,Vn.ConfirmWithTextStep=sd,Vn.OrderListStep=ld,Vn.CardStep=id,Vn.CardOrderStep=Sx;function Gx({label:e,homonum:t}){const a=ia()?.(e,t)??"",{imgRef:r,loading:s,hasImage:l,onLoad:i,onError:u}=Jo(a);return l?n.jsxs("div",{className:le("word-image-tooltip__cell"),children:[s&&n.jsx("div",{className:le("word-image-tooltip__spinner")}),n.jsx("img",{ref:r,src:a,alt:e,draggable:!1,style:{opacity:s?0:1},onLoad:i,onError:u})]}):n.jsx("div",{className:le("word-image-tooltip__cell word-image-tooltip__cell--text h3"),children:n.jsx("span",{children:e})})}function md({words:e,anchorRect:t}){const a=o.useRef(null),[r,s]=o.useState(null);return o.useLayoutEffect(()=>{if(!t||!a.current)return;const{offsetWidth:l,offsetHeight:i}=a.current,u=window.innerWidth;let c=t.left+t.width/2-l/2,d=t.top-i-8;d<8&&(d=t.bottom+8),c=Math.max(8,Math.min(c,u-l-8)),s({left:c,top:d})},[t]),!t||e.length===0?null:un.createPortal(n.jsx("div",{ref:a,className:le("word-image-tooltip"),style:{visibility:r?"visible":"hidden",left:r?.left??0,top:r?.top??-9999},children:n.jsx("div",{className:le("word-image-tooltip__cells"),children:e.map(l=>n.jsx(Gx,{label:l.label,homonum:l.homonum},`${l.label}_${l.homonum??1}`))})}),document.body)}function Kx({titleIcon:e,resultCount:t,resultUnit:a,searchQuery:r,items:s,groups:l,selected:i=[],onSelect:u,maxSelect:c,onClearSelection:d,onPrint:h,onPrintEmpty:p,className:m,emptyHint:g,showEmptyText:y=!0,sectionType:C="page",disc:b}){const{t:v,i18n:f}=_e.useTranslation(),B=f.language?.startsWith("ko")??!1,{anchorRect:_,openAt:N,close:x}=Fa(),[E,w]=o.useState(null),D=o.useCallback(()=>{x(),w(null)},[x]);Fy(D,!!E);const k=(r??"").trim(),A=/^[^,[\]\s]+$/.test(k)?k:"",R=A.length>0,$=r===void 0&&t===void 0,G=R?"match":$?"original":"ganada",[T,P]=o.useState(()=>G),[L,Q]=o.useState("50"),[Z,F]=o.useState(1),[K,M]=o.useState(R);K!==R&&(M(R),P(G));const q=T==="match"&&!R||T==="original"&&!$?G:T,Y=o.useMemo(()=>[...R?[{value:"match",label:v("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...$?[{value:"original",label:v("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:v("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:v("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:v("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:v("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:v("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:v("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[v,R,$]),U=o.useMemo(()=>["10","25","50","100"].map(ue=>({value:ue,label:v("wordSearch.pageSize",{count:Number(ue),defaultValue:`${ue}\uAC1C\uC529 \uBCF4\uAE30`})})),[v]),S=ue=>ue.words?.[0],I=o.useMemo(()=>{const ue=[...A].length,xe=cf(A),ke=new Map;return Ee=>{let We=ke.get(Ee);return We===void 0&&(We=xe((Ee.words?.[0]?.label??"").slice(0,ue))?0:1,ke.set(Ee,We)),We}},[A]),O=o.useCallback((ue,xe)=>{const ke=He=>S(He)?.label??"",Ee=He=>S(He)?.syllables??[...ke(He)].length,We=He=>(He.words??[]).reduce((ot,Qe)=>{const Je=parseInt(Qe.grade??"",10);return Number.isFinite(Je)&&Je<ot?Je:ot},999);switch(q){case"match":return I(ue)-I(xe)||pn(ke(ue),ke(xe));case"ganada":return pn(ke(ue),ke(xe));case"ganada_desc":return pn(ke(xe),ke(ue));case"syllable":return Ee(ue)-Ee(xe)||pn(ke(ue),ke(xe));case"syllable_desc":return Ee(xe)-Ee(ue)||pn(ke(ue),ke(xe));case"grade":return We(ue)-We(xe)||pn(ke(ue),ke(xe));case"grade_desc":return We(xe)-We(ue)||pn(ke(ue),ke(xe));default:return 0}},[q,I]),z=o.useMemo(()=>s.slice().sort(O),[s,O]),se=Number(L)||10,te=o.useMemo(()=>(l??[]).flatMap(ue=>ue.items.slice().sort(O).map(xe=>({item:xe,label:ue.label}))),[l,O]),de=l?te.length:z.length,ee=Math.max(1,Math.ceil(de/se)),V=Math.min(Z,ee),ne=o.useMemo(()=>z.slice((V-1)*se,V*se),[z,V,se]),W=o.useId(),H=o.useMemo(()=>{if(!l)return null;const ue=te.slice((V-1)*se,V*se),xe=new Map;for(const{item:ke,label:Ee}of ue)xe.has(Ee)||xe.set(Ee,[]),xe.get(Ee).push(ke);return[...xe.entries()].map(([ke,Ee])=>({label:ke,items:Ee}))},[l,te,V,se]);o.useEffect(()=>{F(1)},[T,L,de,r]);const ie=de>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(bn,{size:40,options:Y,value:q,onChange:P,ariaLabel:v("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(bn,{size:40,options:U,value:L,onChange:Q,ariaLabel:v("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(Po,{page:V,totalPages:ee,onChange:F})]}):void 0,Te=ue=>{u&&u(ue)},ye=t!==void 0&&a?n.jsxs(n.Fragment,{children:[v("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),v("wordSearch.resultTitleSuffix",{unit:B?_f(a):a})]}):void 0,he=t!==void 0&&t>0&&c!==void 0&&a?v("wordSearch.resultDisc",{unit:B?wf(a):a,max:c,selected:i.length}):void 0,Se=b??he,$e=l?l.length===0:s.length===0,Ne=$e&&!y&&!g;return n.jsxs(ya,{type:C,className:we("word-search-result-block",m),children:[n.jsxs("div",{className:we("word-search-result-block__inner",Ne&&"word-search-result-block__inner--head-only"),children:[(ye||ie||Se)&&n.jsxs("div",{className:"word-search-result-block__head",children:[n.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&n.jsx(nt,{icon:e,className:"word-search-result-block__head-icon"}),ye&&n.jsx("span",{className:"word-search-result-block__title h3",children:ye})]}),ie&&n.jsx("div",{className:"word-search-result-block__head-actions",children:ie}),Se&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:Se})]}),$e&&(y||g)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[y&&n.jsx("p",{className:"word-search-result-block__empty body-3",children:v("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),g&&n.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:g})]}),l?(H??[]).map(ue=>n.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${W}-${ue.label}`,children:[n.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${W}-${ue.label}`,children:ue.label}),n.jsx("div",{className:"word-search-result-block__items",children:ue.items.map(xe=>{const ke=i.includes(xe.id);return n.jsx("div",{onMouseEnter:Ee=>{N(Ee.currentTarget),w(xe.words??[])},onMouseLeave:D,children:n.jsx(fe,{htmlType:"button",size:"word",align:"grid",label:(xe.words??[]).map(Ee=>Ee.label),subLabel:(xe.words??[]).some(Ee=>Ee.subLabel)?(xe.words??[]).map(Ee=>Ee.subLabel):void 0,selected:ke,onClick:()=>Te(xe.id),minWidth:200})},xe.id)})})]},ue.label)):n.jsx("div",{className:"word-search-result-block__items",children:ne.map(ue=>{const xe=i.includes(ue.id);return n.jsx("div",{onMouseEnter:ke=>{N(ke.currentTarget),w(ue.words??[])},onMouseLeave:D,children:n.jsx(fe,{htmlType:"button",size:"word",align:"grid",label:(ue.words??[]).map(ke=>ke.label),subLabel:(ue.words??[]).some(ke=>ke.subLabel)?(ue.words??[]).map(ke=>ke.subLabel):void 0,selected:xe,onClick:()=>Te(ue.id),minWidth:200})},ue.id)})}),E&&_&&n.jsx(md,{words:E,anchorRect:_})]}),(d||h)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[d&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:v("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:i.length===0,onClick:i.length===0?void 0:d}),h&&n.jsx("div",{onClick:i.length===0?p:void 0,children:n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",label:v("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:i.length===0,onClick:i.length===0?void 0:h})})]})]})}function Yx(e,t){return t.map(a=>{const r=typeof a=="string"?a:a.label,s=typeof a=="string"?void 0:a.displayLabel;return{label:r,value:e[r]??"",displayLabel:s}})}function Zx({sections:e,selectedList:t,count:a,onCountChange:r,maxCount:s=4,minCount:l=1,combinationSections:i,combinationSectionsForSlot:u,onSelect:c,placeholder:d="-",className:h,title:p,titleIcon:m,disc:g,showInfoButton:y=!0,onClearPhoneme:C,onSearch:b,onSearchEmpty:v,searchDisabled:f=!1,searchLabel:B,searchChecking:_=!1,pairMode:N=!1,sectionType:x="page",beforeSearchContent:E,beforeContent:w,afterContent:D,hideCountControl:k=!1,ordinal:A=!1}){const{t:R}=_e.useTranslation(),$=o.useMemo(()=>R("wordPairs.infoNotes",{returnObjects:!0}),[R]),G=o.useMemo(()=>Array.from({length:s-l+1},(S,I)=>{const O=l+I;return{key:String(O),label:R("wordPairs.count",{n:O})}}),[R,s,l]),T=o.useMemo(()=>R("wordPairs.ordinals",{returnObjects:!0}),[R]),P=o.useCallback(S=>A?R("wordPairs.phonemeOrdinalLabel",{ordinal:T[S-1]??S}):a===1?R("wordPairs.phonemeSingleLabel","\uC74C\uC808"):R("wordPairs.phonemeN",{n:S}),[A,T,a,R]),L=o.useCallback(S=>A?R("wordPairs.phonemeContrastOrdinalLabel",{ordinal:T[S-1]??S}):a===1?R("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):R("wordPairs.phonemeContrast",{n:S}),[A,T,a,R]),Q=o.useCallback((S,I)=>I?n.jsxs(n.Fragment,{children:[S,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):S,[]),{anchorRect:Z,toggleAt:F,close:K}=Fa(),M=o.useCallback(S=>r(Number(S)),[r]),q=fn("(max-width: 767px)"),Y=o.useCallback(S=>Yx(S,e).map(({label:I,value:O,displayLabel:z})=>{const se=!!O&&O!=="\uC5C6\uC74C";return n.jsxs("span",{className:we("phoneme-select-block__cell-jamo-part",O?"":"phoneme-select-block__cell-jamo-part--empty",se?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[n.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${O==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:O==="\uC5C6\uC74C"?"x":O||d}),se&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:z??I})]},I)}),[e,d]),U=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:40,type:q?"dot":void 0,icon:"info",label:q?void 0:R("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:R("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:Z?"is-selected":void 0,"aria-expanded":!!Z,"aria-haspopup":"dialog",onClick:S=>F(S.currentTarget)})}),Z&&n.jsx(Yn,{title:R("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:$,anchorRect:Z,onClose:K})]});return n.jsxs(ya,{type:x,title:p,icon:m,disc:g,action:y?U:void 0,className:we("phoneme-select-block",h),children:[w,!k&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(kn,{options:G,value:String(a),onChange:M,size:40,ariaLabel:R("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),n.jsx("div",{className:"phoneme-select-block__cells",children:N?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((S,I)=>{const O=t[I*2]??{};return n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:Y(O)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:P(I+1)})]},I)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:R("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((S,I)=>{const O=t[I*2+1]??{};return n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:Y(O)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:L(I+1)})]},I)})})]}):t.map((S,I)=>n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:Y(S)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:P(I+1)})]},I))}),(i||u)&&n.jsx("div",{className:"phoneme-select-block__panels",children:n.jsx("div",{className:"phoneme-select-block__detail",children:N?n.jsxs("div",{className:"phoneme-select-block__pair-panels",children:[n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((S,I)=>{const O=t[I*2]??{};return n.jsx(Ln,{title:Q(P(I+1),I===0),sections:u?u(O,I*2):i,selected:O,onSelect:c?.(I*2),align:"newline"},I)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((S,I)=>{const O=t[I*2+1]??{};return n.jsx(Ln,{title:L(I+1),sections:u?u(O,I*2+1):i,selected:O,onSelect:c?.(I*2+1),align:"newline"},I)})})]}):t.map((S,I)=>n.jsx(Ln,{title:Q(P(I+1),I===0),sections:u?u(S,I):i,selected:S,onSelect:c?.(I),align:"newline"},I))})}),E&&n.jsx("div",{className:"phoneme-select-block__before-search",children:E}),(C||b||_)&&(()=>{const S=t.every(I=>{const O=of(I);return Object.entries(O).every(([z,se])=>!se||z==="coda"&&se===Ll)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:S?v:void 0,children:[C&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:R("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:S,onClick:S?void 0:C}),b?n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:_?n.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:B??R("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:S||f||_,onDisabledClick:_?()=>{}:void 0,"aria-busy":_||void 0,onClick:b}):_?n.jsxs("div",{className:"phoneme-select-block__checking","aria-busy":"true",children:[n.jsx("div",{className:"phoneme-select-block__spinner"}),n.jsx("span",{className:"button-1 phoneme-select-block__checking-label",children:B??R("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),D]})}function Xx({title:e,sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:d,className:h}){const{t:p}=_e.useTranslation();return n.jsx(Ln,{className:h,title:e??p("wordSearch.filterTitle","\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815"),sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:d,align:"inline"})}function Jx({title:e,headerAction:t,sections:a,selected:r,onSelect:s,className:l}){const{t:i}=_e.useTranslation();return a.length===0?null:n.jsx(Ln,{className:l,title:e??i("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:a,selected:r,onSelect:s,align:"newline"})}function Qx({title:e,mode:t,onModeChange:a,matchMode:r,onMatchModeChange:s,positionCount:l,onPositionCountChange:i,inputMode:u,onInputModeChange:c,className:d}){const{t:h}=_e.useTranslation(),p={searchMode:h("wordPairs.filter.searchModeLabel","\uB300\uB9BD \uBC29\uC2DD"),phonemeOrder:h("wordPairs.filter.phonemeOrder","\uC785\uB825 \uC74C\uC808 \uC704\uCE58"),count:h("wordPairs.filter.countLabel","\uC785\uB825 \uC74C\uC808 \uAC2F\uC218"),inputMode:h("wordPairs.filter.inputModeLabel","\uC785\uB825 \uBC29\uC2DD"),orderAny:h("wordPairs.filter.orderAny","\uBB34\uAD00"),orderMatch:h("wordPairs.filter.orderMatch","\uC77C\uCE58"),include:h("wordPairs.mode.include","\uC74C\uC18C \uD3EC\uD568"),pick:h("wordPairs.mode.pick","\uC74C\uC18C \uB300\uB9BD"),explicit:h("wordPairs.mode.contrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815"),charInput:h("wordPairs.input.char","\uAE00\uC790 \uC120\uD0DD"),pronInput:h("wordPairs.input.pron","\uBC1C\uC74C \uC120\uD0DD")},m=b=>h("wordPairs.count",{n:b}),g=[{label:p.searchMode,items:[p.include,p.pick,p.explicit],display:"segmented",labelAction:n.jsx(qa,{title:h("wordPairs.mode.infoTitle","\uB300\uB9BD \uBC29\uC2DD"),items:[h("wordPairs.mode.infoInclude","\uC74C\uC18C \uD3EC\uD568 \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uBAA8\uB450 \uB4E4\uC5B4\uAC04 \uB2E8\uC5B4\uC640 \uADF8 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694."),h("wordPairs.mode.infoPick","\uC74C\uC18C \uB300\uB9BD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uB300\uB9BD\uC30D \uB450 \uB2E8\uC5B4\uC758 \uC2E4\uC81C \uCC28\uC774\uC810\uC77C \uB54C\uB9CC \uB9E4\uCE6D\uB3FC\uC694."),h("wordPairs.mode.infoContrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815 \u2014 \uAE30\uC900 \uB2E8\uC5B4\uC640 \uB300\uB9BD \uB2E8\uC5B4\uC758 \uC74C\uC18C\uB97C \uAC01\uAC01 \uC9C1\uC811 \uC120\uD0DD\uD574 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694.")]})},{label:p.phonemeOrder,items:[p.orderAny,p.orderMatch],display:"segmented",labelAction:n.jsx(qa,{items:h("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:p.count,items:[m(1),m(2)],display:"segmented"},{label:p.inputMode,items:[p.charInput,p.pronInput],display:"segmented",labelAction:n.jsx(qa,{title:h("wordPairs.input.infoTitle","\uC785\uB825 \uBC29\uC2DD"),items:[h("wordPairs.input.infoChar","\uAE00\uC790 \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uB2E8\uC5B4(\uAE00\uC790 \uAE30\uC900)\uB97C \uCC3E\uC740 \uD6C4, \uB2E8\uC5B4\uC758 \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4."),h("wordPairs.input.infoPron","\uBC1C\uC74C \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4.")]})}],y={[p.searchMode]:t==="explicit"?p.explicit:t==="pick"?p.pick:p.include,[p.phonemeOrder]:r==="ordered"?p.orderMatch:p.orderAny,[p.count]:m(l),[p.inputMode]:u==="phoneme"?p.pronInput:p.charInput},C=(b,v)=>{v===p.searchMode?a(b===p.explicit?"explicit":b===p.pick?"pick":"include"):v===p.phonemeOrder?s(b===p.orderMatch?"ordered":"unordered"):v===p.count?i(b===m(2)?2:1):v===p.inputMode&&c(b===p.pronInput?"phoneme":"word")};return n.jsx(Ln,{className:d,title:e??h("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:g,selected:y,onSelect:C,align:"inline"})}function ew(e){const{title:t,items:a,columns:r,resizeStorageKey:s,gridTemplateColumns:l,mobileGridTemplateColumns:i,searchPlaceholder:u,searchFn:c,defaultSortKey:d,defaultSortAsc:h=!0,selectedId:p,selectedIds:m,onSelect:g,onClose:y,pageSizeOptions:C=[10,25,50,100],initialPageSize:b,emptyText:v,noMatchText:f,countLabel:B,topContent:_,className:N=""}=e,{t:x}=_e.useTranslation(),E=u??x("common.search","\uAC80\uC0C9"),w=v??x("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),D=f??x("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[k,A]=o.useState(""),[R,$]=o.useState(d??r[0]?.key??""),[G,T]=o.useState(h),[P,L]=o.useState(String(b??C[0]??10)),[Q,Z]=o.useState(1);o.useEffect(()=>{Z(1)},[k,P]);const F=c!==null,K=o.useCallback((te,de)=>{if(!de)return!0;const ee=de.toLowerCase();return r.some(V=>{const ne=te[V.key];return ne==null?!1:String(ne).toLowerCase().includes(ee)})},[r]),M=c??K,q=o.useMemo(()=>{const te=F?a.filter(de=>M(de,k)):a;return R?[...te].sort((de,ee)=>{const V=de[R],ne=ee[R];return V===ne?0:hr(V,ne,G)}):te},[a,k,R,G,F,M]),Y=Math.max(1,Math.ceil(q.length/Number(P)));Q>Y&&Z(Y);const U=Math.min(Q,Y),S=q.slice((U-1)*Number(P),U*Number(P)),I=o.useCallback(te=>{R===te?T(de=>!de):($(te),T(!0)),Z(1)},[R]),O=o.useMemo(()=>{if(typeof B=="function"){const te=q.length,de=B(te);if(typeof de=="string"){const ee=de.lastIndexOf(String(te));if(ee>=0)return{prefix:de.slice(0,ee),suffix:de.slice(ee+String(te).length)}}return{label:de}}if(typeof B=="string"&&B.includes("{n}")){const[te,de]=B.split("{n}");return{prefix:te,suffix:de}}return{prefix:x("common.totalCountPrefix","\uCD1D "),suffix:x("common.totalCountSuffix","\uAC1C")}},[B,q.length,x]),z=o.useMemo(()=>r.map(te=>({label:te.label,onClick:te.sortable!==!1?()=>I(te.key):void 0,className:te.className,sortDir:te.sortable!==!1&&R===te.key?G?"asc":"desc":null})),[r,R,G,I]),se=o.useMemo(()=>C.map(te=>({value:String(te),label:x("common.pageSizeLabel",{n:te})})),[C,x]);return n.jsxs(Hn,{className:`popup-list ${N}`,title:t,onClose:y,children:[_,"label"in O&&n.jsx("p",{className:"toolbar__count body-1",children:O.label}),n.jsx(Io,{count:"label"in O?void 0:{value:q.length,prefix:O.prefix,suffix:O.suffix},search:F?{value:k,onChange:A,placeholder:E}:void 0,pageSize:{options:se,value:P,onChange:L},pagination:{page:U,total:Y,onChange:Z}}),n.jsx(Yo,{size:"medium",gridTemplateColumns:l,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:s,fields:z,items:S,onRowClick:g,renderRow:te=>{const de=m!=null?te.id!=null&&m.has(te.id):p!=null&&te.id===p;return r.map(ee=>({content:ee.render?ee.render(te):te[ee.key]??"",className:we(ee.className,de&&"popup-list__row--selected")}))},empty:F&&k!==""&&a.length>0?D:w})]})}function Cd(e){const{title:t,message:a,topContent:r,details:s,children:l,confirmLabel:i,cancelLabel:u,hideCancel:c=!1,extraAction:d,confirmVariant:h="main",confirmDisabled:p=!1,onConfirm:m,closeOnConfirm:g=!0,onClose:y,inline:C,size:b="small",className:v,initialFocus:f="close"}=e,{t:B}=_e.useTranslation(),_=o.useRef(null);o.useEffect(()=>{if(C||f==="close")return;const k=_.current?.closest(".popup-panel"),A=Array.from(k?.querySelectorAll(".popup-footer--buttons button")??[]),R=f==="confirm"?A[A.length-1]:c?void 0:A[d?1:0];R&&!R.disabled&&R.focus()},[]);const N=o.useRef(!1),[x,E]=o.useState(!1),w=k=>{let A=!1;return{close:()=>{A=!0,k()},didClose:()=>A}},D=async k=>{if(N.current)return;N.current=!0;const A=typeof document<"u"?document.activeElement:null;E(!0);let R=!1;try{R=await k()}catch($){typeof console<"u"&&console.error($)}finally{R||(N.current=!1,E(!1),requestAnimationFrame(()=>{const $=document.activeElement;(!$||$===document.body)&&A?.isConnected&&A.focus()}))}};return n.jsxs(Hn,{title:t,onClose:y,closeDisabled:x,inline:C,size:b,className:we("confirm-popup",r!=null&&"confirm-popup--has-top",v),buttons:[...d?[{label:d.label,variant:d.variant??"default",disabled:d.disabled||x,onClick:async({closeWithAnimation:k})=>{await D(async()=>{const A=w(k);await d.onClick(A.close);const R=d.closeOnClick??!0;return R&&k(),R||A.didClose()})}}]:[],...c?[]:[{label:u??B("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:x,onClick:({closeWithAnimation:k})=>k()}],{label:i??B("common.confirm","\uD655\uC778"),variant:h,disabled:p||x,onClick:async({closeWithAnimation:k})=>{await D(async()=>{const A=w(k);return await m(A.close),g&&k(),g||A.didClose()})}}],children:[r!=null&&n.jsx("div",{className:"confirm-popup__top",children:r}),s&&s.length>0&&n.jsx(Er,{children:s.map((k,A)=>n.jsx($n,{label:k.label,children:n.jsx("span",{className:"panel-row__text body-2",children:k.value})},A))}),n.jsx("p",{ref:_,className:"body-2 confirm-popup__message",children:a}),l]})}function tw(e,t,a={}){const{t:r}=_e.useTranslation(),[s,l]=o.useState(!1),i=o.useRef(!1),u=o.useCallback(()=>{i.current=!0},[]),c=o.useCallback(()=>i.current?(i.current=!1,!0):e?(l(!0),!1):!0,[e]),d=s?n.jsx(Cd,{title:a.title??r("common.discardConfirm.title","\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?"),message:a.message??r("common.discardConfirm.body","\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4."),confirmLabel:a.confirmLabel??r("common.discardConfirm.confirm","\uC785\uB825 \uCDE8\uC18C"),confirmVariant:"danger",onConfirm:()=>{l(!1),t()},onClose:()=>l(!1)}):null;return{beforeClose:c,discardPopup:d,allowClose:u}}function nw({onApply:e,onCancel:t}){const{t:a}=_e.useTranslation(),[r,s]=o.useState(""),[l,i]=o.useState(!1),[u,c]=o.useState(null),d=o.useRef(null),h=o.useId();o.useEffect(()=>{d.current?.focus()},[]);const p=o.useCallback(async y=>{const C=r.trim();if(C){i(!0),c(null);try{await e(C),y()}catch(b){c(Il(b)),i(!1),requestAnimationFrame(()=>d.current?.focus())}}},[r,e]),m=o.useCallback((y,C)=>{y.key==="Enter"&&!y.nativeEvent.isComposing&&p(C)},[p]),g=y=>{s(y.target.value),c(null)};return n.jsx(Hn,{className:"coupon-input-popup",title:a("usage.couponButton","\uCFE0\uD3F0 \uC785\uB825"),size:"small",onClose:t,closeDisabled:l,buttons:[{label:a("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:l,onClick:({closeWithAnimation:y})=>y()},{label:a("coupons.applyButton","\uC801\uC6A9"),variant:"main",disabled:!r.trim()||l,onClick:({closeWithAnimation:y})=>{p(y)}}],children:({closeWithAnimation:y})=>n.jsxs(n.Fragment,{children:[n.jsx("input",{ref:d,className:"coupon-input-popup__input body-2","aria-label":a("coupons.input.label","\uCFE0\uD3F0 \uCF54\uB4DC"),"aria-invalid":u?!0:void 0,"aria-errormessage":u?h:void 0,"aria-describedby":u?h:void 0,placeholder:a("coupons.input.placeholder","\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"),value:r,onChange:g,onKeyDown:C=>m(C,y),disabled:l,autoComplete:"off",spellCheck:!1}),u&&n.jsx("p",{id:h,className:"coupon-input-popup__error caption-1",role:"alert",children:u})]})})}const fd=["var(--color-main)","var(--color-sub)"],aw=2e3;function rw(e,t){if(!t.startsWith("var("))return t;try{const a=t.slice(4,-1).trim();return getComputedStyle(e).getPropertyValue(a).trim()||null}catch{return null}}function Ss({active:e=!1,count:t=40,duration:a=2e3,strength:r=1,onComplete:s,trigger:l=0}){const i=o.useMemo(()=>{const C=Math.floor(t/2),b=t-C,v=(f,B)=>Array.from({length:f}).map((_,N)=>{const x=6+Math.random()*12,E=Math.round(Math.min(18,x*Math.min(1.5,1+r*.4))),w=fd[Math.floor(Math.random()*fd.length)],D=Math.random()*300,k=(360+Math.random()*260)*r*1.2,A=(B==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,R=Math.cos(A)*k,$=Math.sin(A)*k*1.35,G=Math.random()*720-360,T=(1200+Math.random()*3e3)*Math.min(1.6,1+r*.3),P=Math.random()>.7?"50%":"3px";return{id:`${B}-${N}`,side:B,size:E,color:w,delay:D,vx:R,vy:$,angularVel:G,life:T,borderRadius:P}});return[...v(C,"left"),...v(b,"right")]},[t,r]),u=o.useRef(null),c=o.useRef({}),d=o.useRef(null),h=o.useRef(s);o.useEffect(()=>{h.current=s},[s]);const p=o.useRef(null),m=o.useRef(null),g=()=>{if(typeof document>"u")return null;let C=document.querySelector("[data-ihab-effect-root]");return C||(C=document.createElement("div"),C.className="app-effect",C.dataset.ihabEffectRoot="",C.style.position="fixed",C.style.inset="0",C.style.pointerEvents="none",C.style.zIndex="99998",document.body.appendChild(C)),C};if(typeof document<"u"&&m.current==null&&(m.current=g()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const K=setTimeout(()=>h.current?.(),0);return()=>clearTimeout(K)}const C=1200,b=performance.now(),v=m.current&&m.current!==document.body?m.current.getBoundingClientRect():null,f=Math.max(60,(window.innerHeight||800)*.05),B=K=>Math.max(40,(K||window.innerWidth)*.02),_=v?.width||window.innerWidth||375,N=v?.height||window.innerHeight||812,x=K=>{const M=[...K].sort((q,Y)=>q-Y);return M[Math.floor(M.length/2)]||1},E=x(i.map(K=>Math.abs(K.vy))),w=x(i.map(K=>Math.abs(K.vx))),D=Math.sqrt(2*C*(N*.72+f))/E,k=E*D/C,A=_*.5/(w*k),R=(K,M,q)=>Math.min(q,Math.max(M,K)),$=R(D,.8,2.4),G=R(A,.7,2.2),T=a>0?a/aw:1,P=i.map(K=>({...K,life:K.life*T,vx:K.vx*G,vy:K.vy*$,startTime:b+K.delay,ended:!1})),L=v?{x:v.left-B(v.width),y:v.top+v.height+f}:{x:-B(window.innerWidth),y:window.innerHeight+f},Q=v?{x:v.left+v.width+B(v.width),y:v.top+v.height+f}:{x:window.innerWidth+B(window.innerWidth),y:window.innerHeight+f},Z=K=>{let M=!1;for(const q of P){const Y=c.current[q.id];if(!Y||!Y)continue;if(K<q.startTime){Y.style.display="none",M=!0;continue}if(!q._inited){const V=q.side==="left"?L.x:Q.x,ne=q.side==="left"?L.y:Q.y;Y.style.left=`${V}px`,Y.style.top=`${ne}px`,Y.style.transform="translate3d(0px, 0px, 0)",Y.style.display="block",Y.style.zIndex="100000",typeof q.color=="string"&&q.color.startsWith("var(")&&(Y.style.background=rw(Y,q.color)??"#FF0060"),q._inited=!0}const U=(K-q.startTime)/1e3;if(U<0)continue;const S=q.life/1e3;if(U>=S){Y.style.opacity="0",Y.style.display="none",q.ended=!0;continue}M=!0;const I=q.side==="left"?L.x:Q.x,O=q.side==="left"?L.y:Q.y,z=I+q.vx*U,se=O+q.vy*U+.5*C*U*U,te=(q.angularVel||0)*U,de=z-I,ee=se-O;Y.style.transform=`translate3d(${de}px, ${ee}px, 0) rotate(${te}deg)`,Y.style.opacity=`${Math.max(0,1-U/S)}`}M?d.current=requestAnimationFrame(Z):h.current?.()};d.current=requestAnimationFrame(Z);const F=setTimeout(()=>{try{if((m.current?m.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const K=document.createElement("div");K.className="party-container",K.style.position="fixed",K.style.inset="0",K.style.pointerEvents="none",K.style.overflow="visible",K.style.zIndex="2147483647";for(const M of i){const q=document.createElement("span");q.className=`confetti confetti--${M.side}`,q.setAttribute("aria-hidden","true"),q.style.display="none",q.style.position="fixed",q.style.left="0px",q.style.top="0px",q.style.width=`${M.size}px`,q.style.height=`${Math.max(4,M.size*.6)}px`,q.style.background=M.color,q.style.borderRadius=M.borderRadius,q.style.transform="translate3d(0,0,0)",q.style.opacity="0",K.appendChild(q),c.current[M.id]=q}(document.body||m.current).appendChild(K),p.current=K}}catch{}},300);return()=>{if(d.current&&cancelAnimationFrame(d.current),clearTimeout(F),p.current){try{p.current.remove()}catch{}p.current=null}}},[e,a,l,i]),!e)return null;const y=n.jsx("div",{className:"party-container",ref:u,children:i.map(C=>n.jsx("span",{"aria-hidden":!0,ref:b=>{c.current[C.id]=b},className:`confetti confetti--${C.side}`,style:{width:`${C.size}px`,height:`${Math.max(4,C.size*.6)}px`,background:C.color,borderRadius:C.borderRadius}},`${C.id}-${l}`))});return typeof document<"u"?un.createPortal(y,m.current||document.body):y}const js=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function ow({trigger:e=0,active:t=!1}){const[a,r]=o.useState(null);o.useEffect(()=>{if(typeof window>"u")return;const l=i=>{const u=i.detail??{};r(c=>({n:(c?.n??0)+1,count:js(u.count),strength:js(u.strength),duration:js(u.duration)}))};return window.addEventListener("party:trigger",l),()=>window.removeEventListener("party:trigger",l)},[]);const s=o.useCallback(()=>r(null),[]);return n.jsxs(n.Fragment,{children:[n.jsx(Ss,{active:t,trigger:e}),a&&n.jsx(Ss,{active:!0,trigger:a.n,count:a.count,strength:a.strength,duration:a.duration,onComplete:s})]})}function sw({title:e,sub:t,rightAction:a,titleAction:r,badge:s,badgeVariant:l="default",documentTitle:i,onBack:u,backLabel:c,wrap:d=!1}){const{t:h}=_e.useTranslation();ky(typeof e=="string"?e:i??null);const p=c??h("common.back","\uB4A4\uB85C");return n.jsxs("div",{className:d?"page-title page-title--wrap":"page-title",children:[n.jsxs("div",{className:"page-title__main",children:[n.jsxs("div",{className:"page-title__title-row",children:[u&&n.jsx(fe,{htmlType:"button",className:"page-title__back",size:48,type:"dot",icon:"chevron-left",iconSize:"large",useBorder:!1,iconColor:"var(--color-text-primary)",ariaLabel:p,showTooltipInfo:p,onClick:u}),n.jsx("h1",{className:"page-title__title h1",children:e}),s&&n.jsx("div",{className:"page-title__badge",children:n.jsx(jt,{label:s,size:"small",variant:l,fill:"outline"})}),r?n.jsx("div",{className:"page-title__title-action",children:r}):null]}),t&&n.jsx("p",{className:"page-title__sub body-2",children:t})]}),a?n.jsx("div",{className:"page-title__action",children:a}):null]})}function lw(e){return e??""}const bd=o.createContext({words:[],loading:!1});function iw(){return o.useContext(bd)}function uw({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c,children:d}){const h=o.useMemo(()=>({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c}),[e,t,a,r,s,l,i,u,c]);return n.jsx(bd.Provider,{value:h,children:d})}function cw({items:e,actions:t,columns:a,flat:r=!1,className:s,style:l}){const i=a??e.length;return n.jsx("section",{className:we("summary-strip",r&&"summary-strip--flat",s),style:{"--summary-strip-cols":String(i),...l},children:n.jsxs("div",{className:"summary-strip__row",children:[n.jsx("div",{className:"summary-strip__items",children:e.map((u,c)=>n.jsxs("div",{className:"summary-strip__item",children:[n.jsx("p",{className:"summary-strip__label caption-1",children:u.label}),n.jsx("p",{className:"summary-strip__value body-3b",title:typeof u.value=="string"||typeof u.value=="number"?String(u.value):void 0,children:u.value})]},c))}),t&&n.jsx("div",{className:"summary-strip__actions",children:t})]})})}const dw=(e,t)=>`${e} / ${t}`;function pw({blocks:e,sectionTitles:t,logo:a,footer:r,pageLabel:s=dw,pageWidth:l,pageHeight:i,margin:u,className:c,style:d}){const{t:h}=_e.useTranslation(),p=o.useRef(null),m=o.useRef(null),g=o.useRef(null),y=o.useRef(null),[C,b]=o.useState(null),[v,f]=o.useState(!1);o.useEffect(()=>{const T=p.current;if(!T)return;const P=()=>f(T.scrollWidth>T.clientWidth+1);if(P(),typeof ResizeObserver>"u")return;const L=new ResizeObserver(P);return L.observe(T),()=>L.disconnect()},[C]);const B=e.map(T=>`${T.id}\0${T.section??""}\0${T.group??""}`).join(""),_=C&&C.shape===B?C.pages:null,[N,x]=o.useState(0);o.useEffect(()=>{const T=y.current;if(!T||typeof ResizeObserver>"u")return;const P=new ResizeObserver(()=>x(T.offsetHeight));return P.observe(T),()=>P.disconnect()},[]);const[E,w]=o.useState(0);o.useEffect(()=>{const T=m.current;if(!T||typeof ResizeObserver>"u")return;let P=null;const L=typeof requestAnimationFrame=="function"?F=>requestAnimationFrame(F):F=>setTimeout(F,16),Q=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:F=>clearTimeout(F),Z=new ResizeObserver(()=>{P==null&&(P=L(()=>{P=null,w(F=>F+1)}))});return Array.from(T.children).forEach(F=>Z.observe(F)),()=>{Z.disconnect(),P!=null&&Q(P)}},[B]),o.useLayoutEffect(()=>{const T=m.current,P=y.current;if(!T||!P)return;const L=S=>S.getBoundingClientRect().height||S.offsetHeight,Q=new Map;g.current?.querySelectorAll("[data-chrome-section]").forEach(S=>{Q.set(S.dataset.chromeSection??"",L(S))});const Z=S=>L(P)-(Q.get(S??"")??0),F=Array.from(T.children).map(S=>L(S)),K=[];e.forEach((S,I)=>{const O=K[K.length-1],z=O?e[O[0]]:void 0;z&&S.group!=null&&z.group===S.group&&z.section===S.section?O.push(I):K.push([I])});const M=[];let q=[],Y=0;const U=()=>{q.length&&M.push(q),q=[],Y=0};K.forEach(S=>{const I=S.reduce((z,se)=>z+F[se],0),O=Z(e[S[0]].section);q.length&&e[q[0]].section!==e[S[0]].section&&U(),I>O?S.forEach(z=>{q.length&&Y+F[z]>O+.01&&U(),q.push(z),Y+=F[z]}):(q.length&&Y+I>O+.01&&U(),S.forEach(z=>q.push(z)),Y+=I)}),U(),b(S=>S&&S.shape===B&&JSON.stringify(S.pages)===JSON.stringify(M)?S:{shape:B,pages:M})},[B,N,l,i,u,E]);const D=Mo,k=D,A=r??n.jsxs(n.Fragment,{children:[n.jsx("img",{src:k,alt:"IHAB",className:"report-doc__logo"}),"\xA9 IHAB, Inc. All rights reserved."]}),R=(T,P,L)=>({header:n.jsxs("div",{className:"report-doc__header",children:[n.jsx("h2",{className:"report-doc__title h3b",children:L!=null&&t?.[L]||null}),a]}),footer:n.jsxs("div",{className:"report-doc__footer caption-1",children:[n.jsx("span",{className:"report-doc__footer-left",children:A}),n.jsx("span",{className:"report-doc__page-no",children:s(T,P)})]})}),$=Array.from(new Set(e.map(T=>T.section??""))),G={...l?{"--report-page-w":l}:null,...i?{"--report-page-h":i}:null,...u?{"--report-margin":u}:null,...d};return n.jsxs("div",{ref:p,className:we("report-doc",c),style:G,tabIndex:v?0:void 0,role:v?"group":void 0,"aria-label":v?h("report.previewRegion","\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30"):void 0,children:[n.jsxs("div",{className:"report-doc__measure","aria-hidden":!0,children:[n.jsx("div",{ref:y,className:"report-doc__ruler"}),n.jsx("div",{ref:g,children:$.map(T=>{const P=R(1,1,T||void 0);return n.jsxs("div",{"data-chrome-section":T,children:[P.header,P.footer]},T)})}),n.jsx("div",{ref:m,className:"report-doc__measure-blocks",children:e.map(T=>n.jsx("div",{children:T.content},T.id))})]}),_&&n.jsx("div",{className:"report-doc__pages",children:_.map((T,P)=>{const{header:L,footer:Q}=R(P+1,_.length,e[T[0]].section);return n.jsxs("section",{className:"report-doc__page",children:[L,T.map(Z=>n.jsx("div",{children:e[Z].content},e[Z].id)),Q]},P)})})]})}function hw({title:e,fields:t,columns:a=4,className:r,style:s}){return n.jsxs("div",{className:we("report-info",r),style:{"--report-info-cols":String(a),...s},children:[e&&n.jsx("p",{className:"report-info__title h5b",children:e}),n.jsx("div",{className:"report-info__grid",children:t.map((l,i)=>n.jsxs("div",{className:"report-info__field body-2",children:[n.jsx("span",{className:"report-info__label body-3",children:l.label}),n.jsx("span",{className:"report-info__value",children:l.value})]},i))})]})}const ra=new Map;let $r=null;const mw=12;function Cw(e){for(let t=e.parentElement;t&&t!==document.body;t=t.parentElement){const a=window.getComputedStyle(t);if(a.transform&&a.transform!=="none"||a.filter&&a.filter!=="none"||a.perspective&&a.perspective!=="none"||/paint|layout|strict|content/.test(a.contain||""))return t}return document}function Rr(){const e=new Map;for(const t of ra.keys()){if(!t.isConnected)continue;const a=Cw(t),r=e.get(a)??[];r.push(t),e.set(a,r)}for(const t of e.values()){t.sort((r,s)=>r.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1);let a=0;for(const r of t){a>0?r.style.setProperty("--update-alert-stack-offset",`${a}px`):r.style.removeProperty("--update-alert-stack-offset");const s=r.getBoundingClientRect().height;s>0&&(a+=s+mw)}}}function fw(e){return typeof window>"u"?()=>{}:(ra.set(e,(ra.get(e)??0)+1),ra.get(e)===1&&typeof ResizeObserver<"u"&&($r??($r=new ResizeObserver(()=>Rr())),$r.observe(e)),Rr(),()=>{const t=(ra.get(e)??1)-1;if(t>0){ra.set(e,t),Rr();return}ra.delete(e),$r?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),Rr()})}function bw({title:e,message:t,actionLabel:a,onAction:r,icon:s,onClose:l,className:i=""}){const{t:u}=_e.useTranslation(),c=a??u("common.update","\uC5C5\uB370\uC774\uD2B8"),d=o.useRef(null),h=o.useRef(!1);return o.useLayoutEffect(()=>{const p=d.current,m=p?.parentElement?.closest(".update-alert-stack")??p,g=m?fw(m):null;return()=>{g?.(),h.current&&p&&p.contains(document.activeElement)&&cr(p)}},[]),n.jsxs("div",{ref:d,className:we("update-alert",i),role:"alert",children:[l&&n.jsx("button",{type:"button",className:"update-alert__close",onClick:()=>{h.current=!0,l()},"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"}),n.jsxs("div",{className:"update-alert__top",children:[n.jsx("div",{className:"update-alert__icon",children:s??n.jsx(Hs,{size:20,strokeWidth:2})}),n.jsxs("div",{className:"update-alert__body",children:[n.jsx("div",{className:"update-alert__title h4",children:e}),n.jsx("div",{className:"update-alert__message body-3",children:t})]})]}),r&&n.jsx(fe,{htmlType:"button",size:32,variant:"main",shape:"pill",className:"update-alert__action",onClick:r,children:c})]})}function gw({title:e,titleLevel:t=3,description:a,topActions:r,children:s,footerLeft:l,footerRight:i,ariaLabel:u,onClick:c,draggable:d,onDragStart:h,onDragEnd:p,className:m}){const g=t?`h${t}`:"div",y=l!=null||i!=null,C=s!=null&&s!==!1,b=o.useCallback(v=>{c&&v.target===v.currentTarget&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),c())},[c]);return n.jsxs("div",{className:we("training-card",c?"training-card--clickable":"",m),onClick:c,onKeyDown:c?b:void 0,role:c?"button":void 0,"aria-label":c?u??(typeof e=="string"?e:void 0):void 0,tabIndex:c?0:void 0,draggable:d,onDragStart:h,onDragEnd:p,children:[n.jsxs("div",{className:"training-card__header",children:[n.jsxs("div",{className:"training-card__title-row",children:[typeof e=="string"?n.jsx(g,{className:"training-card__title h4",children:e}):e,r!=null&&n.jsx("div",{className:"training-card__top-actions",onClick:v=>v.stopPropagation(),children:r})]}),a!=null?typeof a=="string"?n.jsx("p",{className:"training-card__description body-3",children:a}):a:n.jsx("p",{className:"training-card__description body-3","aria-hidden":"true",children:" "})]}),C&&n.jsx("div",{className:"training-card__body",children:s}),y&&n.jsxs("div",{className:"training-card__footer",children:[l!=null&&n.jsx("div",{className:"training-card__footer-left",children:l}),i!=null&&n.jsx("div",{className:"training-card__meta",children:i})]})]})}function yw({title:e,titleLevel:t=3,count:a,collapsed:r=!1,onToggle:s,beforeSort:l,sort:i,actions:u,empty:c=!1,emptyContent:d,dragOver:h=!1,onDragOver:p,onDragLeave:m,onDrop:g,children:y,className:C}){const{t:b}=_e.useTranslation(),v=o.useId(),f=t?`h${t}`:"span",B=s!=null,_=we("training-card-group",h&&"training-card-group--dragover",r&&"training-card-group--collapsed",B&&"training-card-group--collapsible",C);return n.jsxs("div",{className:_,onDragOver:p,onDragLeave:m,onDrop:g,role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?v:void 0,children:[n.jsxs("header",{className:"training-card-group__header",children:[B&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:r?"chevron-right":"chevron-down",ariaLabel:typeof e=="string"&&e?r?b("common.expandFor",{name:e}):b("common.collapseFor",{name:e}):r?b("common.expand","\uD3BC\uCE58\uAE30"):b("common.collapse","\uC811\uAE30"),className:"training-card-group__chevron","aria-expanded":!r,onClick:s}),typeof e=="string"?n.jsx(f,{id:v,className:"training-card-group__title h5b",children:e}):e,a!==void 0&&n.jsx("span",{className:"training-card-group__count body-3b",children:a}),(l!=null||i||u!=null)&&n.jsxs("span",{className:"training-card-group__actions",onClick:N=>N.stopPropagation(),children:[l,i&&n.jsx(bn,{size:40,options:i.options,value:i.value,placeholder:i.placeholder,onChange:i.onChange,ariaLabel:typeof e=="string"&&e?b("common.sortFor",{name:e}):void 0}),u]})]}),!r&&(c?n.jsx("div",{className:"training-card-group__empty body-3",children:d}):n.jsx("div",{className:"training-card-group__grid",children:y}))]})}const vw="speechear:saved_word_tables";function _w(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.id=="string"&&typeof t.name=="string"&&Array.isArray(t.items)}function xw(){try{const e=localStorage.getItem(vw);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(_w):[]}catch{return[]}}function gd(e){return{label:e.word,subLabel:e.pronunciation,colloquialLabel:e.colloquialPronunciation,homonum:e.homonum,grade:e.grade,syllables:[...e.word].length,pos:e.pos,wordType:e.wordType}}function Ts(e){return e.map(t=>t.homonum!=null?`${t.word}#${t.homonum}`:t.word).join("|")}function ww(e){const t=new Set;return e.map(a=>{let r=a.id;for(let s=2;t.has(r);s++)r=`${a.id}~${s}`;return t.add(r),r===a.id?a:{...a,id:r}})}function Bw({title:e,titleIcon:t,disc:a,filterTitle:r,filterCollapsible:s,filterDefaultCollapsed:l,filterCollapsed:i,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:d,code:h,baseItem:p,baseContentTypes:m,cellCapacity:g,maxItemsPerPage:y,items:C,onSaveComplete:b,onLoad:v,onRemoveItem:f,onCopyItem:B,onReset:_,resetLabel:N,saveButtonLabel:x,secondarySaveButtonLabel:E,onReorder:w,showCellCount:D,onAddItem:k,className:A,renderSavePopup:R,renderWordSearch:$,hideControls:G,saveOnly:T,tableName:P,nameValue:L,onNameChange:Q,descriptionValue:Z,onDescriptionChange:F,namePlaceholder:K,descriptionPlaceholder:M,existingNames:q,editingName:Y,onCancel:U,initialItemsPerPage:S,renderCellAction:I,actionsLeftExtra:O}){const{t:z}=_e.useTranslation(),se=N??z("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),te=C===void 0,de=!!Q,[ee,V]=o.useState([]),ne=(L??"").trim(),W=ne||(K??"").trim(),H=(Z??"").trim()||(M??"").trim(),ie=(q??[]).map(ae=>ae.trim().toLowerCase()),Te=[Y?.trim().toLowerCase(),...ee].filter(ae=>!!ae),ye=[...ie];for(const ae of Te){const Ce=ye.indexOf(ae);Ce!==-1&&ye.splice(Ce,1)}const he=ne!==""&&ye.includes(ne.toLowerCase()),[Se,$e]=o.useState(Array(4).fill(null)),[Ne,ue]=o.useState(4),[xe,ke]=o.useState(null),Ee=Se.slice(0,Ne),We=!!d?.show,[He,ot]=o.useState(!0),[Qe,Je]=o.useState(!0),vt=d&&{...d,top:He,bottom:Qe},[je,Ye]=o.useState("landscape"),[Be,Ue]=o.useState([...dc]),[qe,pt]=o.useState("show"),[_t,Dt]=o.useState(!0),[Bt,st]=o.useState(!0),tt=o.useRef(null),kt=o.useRef([]),[At,Tt]=o.useState(S==="all"?Number.POSITIVE_INFINITY:S??8),[Lt,gt]=o.useState("right"),[it,ut]=o.useState(!1),[ct,ve]=o.useState(!1),{toastMessage:Me,toastType:Pe,showWarning:Oe,clearToast:dt}=Vi("warning"),St=o.useCallback(()=>ke(null),[ke]);k&&!te&&!D&&!g&&Nt("word-table-block-add-without-cell-count",'[WordTableBlock] \uD45C\uC2DC \uBAA8\uB4DC\uC5D0\uC11C onAddItem \uC740 cellCapacity \uB098 showCellCount \uC640 \uD568\uAED8 \uC918\uC57C "\uCD94\uAC00\uD558\uAE30" \uCE78\uC774 \uC0DD\uAE34\uB2E4.'),p&&te&&Nt("word-table-block-base-item-in-edit","[WordTableBlock] baseItem \uC740 \uD45C\uC2DC \uBAA8\uB4DC(items \uB97C \uC8FC\uB294 \uAF34)\uC5D0\uC11C\uB9CC \uAC78\uB9B0\uB2E4 \u2014 \uD3B8\uC9D1 \uACA9\uC790\uC5D0\uB294 \uC11C\uC9C0 \uC54A\uB294\uB2E4.");const[yt,wt]=o.useState(()=>Math.max(C?.length??1,1)),Ct=Math.max(g??0,C?.length??0,1),Le=te?Ne:D?Math.max(yt,C?.length??1,1):Ct,{width:at,height:oe}=Qn[je],be=!te&&!D,Ie=Math.max(1,Math.min(Ct,y??Ct)),Xe=Math.min(At,Ie),et=be?Xe:Le,rt=Math.ceil((C?.length??0)/Math.max(1,et)),$t=(C?.length??0)<Ct?Math.floor((C?.length??0)/Math.max(1,et))+1:0,_n=be?Math.max(1,rt,$t):0,on=be?Array.from({length:_n},(ae,Ce)=>(C??[]).slice(Ce*et,(Ce+1)*et)):null,Rt=!!on&&on.length>1,zt=te?Ee.some(ae=>ae!==null&&ae.length>1):(C??[]).some(ae=>(ae.words??[]).length>1),sn=P?.trim()||`${Ul(Ra())} ${zt?z("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):z("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,It=o.useCallback(()=>Rt?kt.current.filter(ae=>ae!==null):tt.current?[tt.current]:[],[Rt]),{print:xn,openNewWindow:xt,downloadHtml:Pt}=cs({getElements:It,paperW:at,paperH:oe,fileName:sn,onPopupBlocked:()=>{Oe(z("wordTable.popupBlocked","\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694."))}}),Ut=ae=>{ue(ae),$e(Ce=>Ce.length>=ae?Ce:[...Ce,...Array(ae-Ce.length).fill(null)]),ke(null)},Gt=ae=>{$e(Ce=>{const Fe=[...Ce];return Fe[ae]=null,Fe}),xe===ae&&ke(null)},Pn=ae=>{if(xe===null)return;const Ce=xe;$e(lt=>{const ht=[...lt];return ht[Ce]=ae.length>0?ae:null,ht});const Fe=Ee.findIndex((lt,ht)=>ht>Ce&<===null);ke(Fe!==-1?Fe:null)},mn=te?Ee.some(ae=>ae?.some(Ce=>!!Ce.colloquialPronunciation)):(C??[]).some(ae=>(ae.words??[]).some(Ce=>!!Ce.colloquialLabel)),Kt=!te&&pc([...p?[p]:[],...C??[]]),Qt=o.useMemo(()=>ia()?te?Se.slice(0,Ne).flatMap(ae=>(ae??[]).map(Ce=>[Ce.word,Ce.homonum])):(ae=>ae.flatMap(Ce=>(Ce.words??[]).map(Fe=>[Fe.label,Fe.homonum])))([...p?[p]:[],...C??[]]):[],[te,Se,Ne,C,p]),[ln,Cn]=o.useState(!1);o.useEffect(()=>{if(Qt.length===0)return;let ae=!1;return Promise.all(Qt.map(([Ce,Fe])=>Sl(Ce,Fe))).then(Ce=>{ae||Cn(Ce.some(Boolean))},()=>{}),()=>{ae=!0}},[Qt]);const Ht=Qt.length>0&&ln,wn=o.useMemo(()=>[...te||D?[{label:z("wordTable.filter.columns","\uCE78 \uC218"),items:O4.map(ae=>({value:`${ae}\uCE78`,displayLabel:z("wordTable.filter.column",{count:ae})})),display:"segmented"}]:[],...be&&(C?.length??0)>0?[vc(z,{hasPairs:zt,itemCount:Ct,max:y})]:[],...Rt?[W4(z)]:[]],[z,te,D,be,C?.length,zt,Ct,y,Rt]),pe={...te||D?{[z("wordTable.filter.columns","\uCE78 \uC218")]:`${Le}\uCE78`}:{},...be&&(C?.length??0)>0?{[z(zt?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${Xe}\uAC1C`}:{},...Rt?{[z("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:Lt}:{}},De=(ae,Ce)=>{Ce===z("wordTable.filter.columns","\uCE78 \uC218")?te?Ut(parseInt(ae)):wt(parseInt(ae)):Ce===z(zt?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")?Tt(_c(parseInt(ae),Ct)):Ce===z("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&>(xc(ae))},Re=te?ww(Ee.filter(ae=>ae!==null&&ae.length>0).map(ae=>({id:Ts(ae),words:ae.map(gd)}))):C??[],Ge=()=>{te&&$e(ae=>ae.length>Ne?ae.slice(0,Ne):ae)},ze=(ae=!1)=>{if(ve(ae),de&&b){const Ce=W.trim().toLowerCase();Ce&&V(Fe=>Fe.includes(Ce)?Fe:[...Fe,Ce]),b(W,Re,H||void 0,ae),Ge();return}if(T&&b){b("",Re,void 0,ae),Ge();return}if(b){ut(!0);return}Pt()},[X,ce]=o.useState(!1),[Ae,Ve]=o.useState(""),Ke=Ae.trim(),Ze=Ke!==""&&ie.includes(Ke.toLowerCase()),ft=()=>{Ve(W?z("wordTable.save.copyName",{name:W,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),ce(!0)},bt=()=>{!Ke||Ze||!b||(b(Ke,Re,H||void 0,!0),Ge(),ce(!1))},ge=Re.length===0,j=ge||de&&(W===""||he),J=()=>{if(ge){Oe(z("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(de&&W===""){Oe(z("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}de&&he&&Oe(z("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},me=n.jsx(va,{items:Re,orientation:je,contentTypes:Be,baseItem:p,baseContentTypes:m,cutLine:qe,showOutline:_t,showDivLine:Bt,count:Le});return n.jsxs(n.Fragment,{children:[n.jsxs(ya,{type:"page",icon:t,title:e,disc:a,className:we("word-table-block",A),children:[X&&n.jsx(Hn,{size:"small",title:E??z("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>ce(!1),footer:({closeWithAnimation:ae})=>n.jsxs(n.Fragment,{children:[n.jsx(fe,{htmlType:"button",size:48,type:"bar",label:z("common.cancel","\uCDE8\uC18C"),onClick:ae}),n.jsx(fe,{htmlType:"button",size:48,type:"bar",variant:"main",label:z("common.save","\uC800\uC7A5"),disabled:!Ke||Ze,onClick:bt})]}),children:n.jsx(Jn,{label:z("wordTable.save.nameLabel","\uC774\uB984"),value:Ae,onChange:Ve,placeholder:z("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),maxLength:40,size:48,fullWidth:!0,autoFocus:!0,onEnter:bt,error:Ze?z("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),it&&b&&R?.({defaultName:typeof e=="string"?e:z("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:me,previewW:at,previewH:oe,items:Re,existingNames:xw().map(ae=>ae.name),saveAsNew:ct,onSave:(ae,Ce)=>{b(ae,Re,Ce,ct),Ge(),ut(!1)},onCancel:()=>ut(!1)}),(te||k)&&xe!==null&&$?.({cellIndex:xe,onConfirm:te?Pn:ae=>{if(k){const Ce=ae[0];if(Ce){const Fe=new Set((C??[]).map(ht=>ht.id));let lt=Ts([Ce]);for(let ht=2;Fe.has(lt);ht++)lt=`${Ts([Ce])}~${ht}`;k({id:lt,words:[gd(Ce)]})}}ke(null)},onClose:St}),!G&&n.jsx(ss,{title:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,hasImage:Ht,hasColloquial:mn,hasCaption:Kt,contentTypes:Be,orientation:je,showOutline:_t,cutLine:qe,showDivLine:Bt,setters:{setContentTypes:Ue,setOrientation:Ye,setShowOutline:Dt,setCutLine:pt,setShowDivLine:st,setShowTopInfo:ot,setShowBottomInfo:Je},showCutLine:(be?et:Le)>1,showDivLine2:zt,middleSections:wn,extraSelected:pe,onExtraSelect:De,showPaperBands:We,showTopInfo:He,showBottomInfo:Qe}),Rt&&on?n.jsx("div",{className:"word-table-block__pages",children:on.map((ae,Ce)=>n.jsx(va,{orientation:je,contentTypes:Be,cutLine:qe,showOutline:_t,showDivLine:Bt,count:et,items:ae,baseItem:p,baseContentTypes:m,onRemoveItem:f,onCopyItem:B,onReorder:w&&((Fe,lt)=>w(Fe+Ce*et,lt+Ce*et)),indexOffset:Ce*et,totalCount:C?.length??0,renderCellAction:I&&((Fe,lt)=>I(Fe+Ce*et,lt)),showFillerAdd:!!k,onActivateCell:k?(Fe=>ke(Fe+Ce*et)):void 0,addableCount:Math.max(0,Math.min(et,Ct-Ce*et)),brand:vt,code:h,contentRef:Fe=>{kt.current[Ce]=Fe},pageNumber:{current:Ce+1,total:on.length},pageNumberPosition:Lt},Ce))}):n.jsx(va,{orientation:je,contentTypes:Be,cutLine:qe,showOutline:_t,showDivLine:Bt,count:Le,items:te?void 0:C??[],baseItem:te?void 0:p,baseContentTypes:m,editCells:te?Ee:void 0,activeCell:xe,onActivateCell:te||k?ke:void 0,onRemoveCell:te?Gt:void 0,onRemoveItem:te?void 0:f,onCopyItem:te?void 0:B,onReorder:te?void 0:w,renderCellAction:te?void 0:I,brand:vt,code:h,showFillerAdd:!!k,contentRef:tt}),!G&&!T&&O!=null&&n.jsx("div",{className:"word-table-block__table-actions",children:O}),de&&!G&&n.jsxs(Er,{size:"medium",labelWidth:64,useBorder:!1,useRowBorder:!1,className:"word-table-block__meta",children:[n.jsx($n,{variant:"custom",label:z("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(Jn,{required:!0,value:L??"",onChange:Q,placeholder:K?K+z("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):z("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:z("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:he?z("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:ae=>{(ae.key==="Tab"&&!ae.shiftKey||ae.key===" ")&&!(L??"").trim()&&(K??"").trim()&&(ae.preventDefault(),Q?.(K??""))}})}),n.jsx($n,{variant:"custom",label:z("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(Jn,{value:Z??"",onChange:F,placeholder:M?M+z("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):z("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:z("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:ae=>{(ae.key==="Tab"&&!ae.shiftKey||ae.key===" ")&&!(Z??"").trim()&&(M??"").trim()&&(ae.preventDefault(),F?.(M??""))}})})]})]}),!G&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!T&&v&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:z("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:v}),!T&&_&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:se,onClick:_}),!T&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:z("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:xt})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[U&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:z("common.cancel","\uCDE8\uC18C"),onClick:U}),!T&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:z("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:xn}),E&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:E,onClick:()=>de?ft():ze(!0),disabled:ge,onDisabledClick:()=>{Oe(z("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."))}}),n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",label:x??z("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>ze(!1),disabled:j,onDisabledClick:J})]})]}),n.jsx(ba,{message:Me,type:Pe,onClose:dt})]})}const kw=8;function yd({items:e,className:t}){const{t:a}=_e.useTranslation(),r=e.length,s=r<=3?1:2,l=kw,i=r>l,u=e.slice(0,i?l-1:l),c=r-u.length,d=Math.ceil(Math.min(r,l)/s)||1,h=s*d;return n.jsx("div",{className:we("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${s}, 1fr)`},children:Array.from({length:h},(p,m)=>{if(i&&m===l-1)return n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--more",children:n.jsx("span",{className:"word-table-thumb__more body-3",children:a("wordTable.thumbMore",{count:c,defaultValue:"+{{count}}"})})},m);const g=u[m];return g?n.jsx("div",{className:"word-table-thumb__cell",children:(g.words?.length?g.words:[{label:g.id}]).map((y,C)=>n.jsxs(o.Fragment,{children:[C>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:y.label})]},C))},m):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},m)})})}function Aw({items:e,name:t,description:a,createdAt:r,code:s,published:l,publishedLabel:i,shared:u,sharedLabel:c,isNew:d,publisherName:h,publishedAt:p,likeCount:m,downloadCount:g,onPublisherClick:y,selected:C,onClick:b,onMore:v,titleNode:f,className:B}){const{t:_}=_e.useTranslation(),N=f!=null,x=h!=null||p!=null||m!=null||g!=null,E=w=>{w.target===w.currentTarget&&!N&&(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),b?.())};return n.jsxs("div",{className:we("word-table-button",C?"word-table-button--selected":"",x?"":"word-table-button--no-footer",B),role:"button",tabIndex:0,"aria-label":s?`${t} (${s})`:t,onClick:N?void 0:b,onKeyDown:E,children:[d&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":_("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(yd,{items:e,className:"word-table-button__thumb"}),n.jsxs("div",{className:"word-table-button__info",children:[n.jsxs("div",{className:"word-table-button__info-text",children:[f??n.jsx("div",{className:"word-table-button__title h4",children:t}),a&&n.jsx("div",{className:"word-table-button__desc body-3",children:a})]}),v&&!N&&n.jsx(fe,{htmlType:"button",className:"word-table-button__more",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:_("common.moreFor",{name:t}),onClick:w=>{w.stopPropagation(),v(w)}})]}),(s||r||l||u)&&n.jsxs("div",{className:"word-table-button__meta-row",children:[n.jsx("span",{className:"word-table-button__meta-left",children:n.jsx("span",{className:"word-table-button__meta caption-1",children:r?ql(r,_):""})}),n.jsxs("span",{className:"word-table-button__meta-right",children:[(l||u)&&n.jsxs("span",{className:"word-table-button__badges",children:[l&&n.jsx(jt,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:i??_("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),u&&n.jsx(jt,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:c??_("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),s&&n.jsx("span",{className:"word-table-button__code caption-1",children:s})]})]}),x&&n.jsxs("div",{className:"word-table-button__footer",children:[n.jsxs("span",{className:"word-table-button__store-by",children:[h&&(y?n.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":_("wordTable.publisherFilter",{name:h,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:w=>{w.stopPropagation(),y()},children:h}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:h})),p&&n.jsx("span",{className:"training-card__date body-4",children:ql(p,_)})]}),n.jsxs("span",{className:"word-table-button__store-stats",children:[m!=null&&n.jsx(jt,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(m),"aria-label":_("common.likeCount",{count:m,defaultValue:`\uC88B\uC544\uC694 ${m}`})}),g!=null&&n.jsx(jt,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(g),"aria-label":_("common.downloadCount",{count:g,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${g}`})})]})]})]})}/**
|
|
1040
|
+
`).map((i,u,c)=>n.jsxs(o.Fragment,{children:[i,u<c.length-1&&n.jsx("br",{})]},u))})}),n.jsxs("div",{className:"site-footer__links",children:[n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.site.title","\uC0AC\uC774\uD2B8")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:"IHAB"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://speechear.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.malgwi","\uB9D0\uADC0")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.soundDirection","\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/vr-sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.vrSoundDirection","VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/hearing-test-pro",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.hearingTest","\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C")})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.sns.title","SNS")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://blog.naver.com/ihab_official",target:"_blank",rel:"noopener noreferrer",children:l("footer.sns.naverBlog","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.instagram.com/ihab.official.yt/",target:"_blank",rel:"noopener noreferrer",children:"Instagram"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.youtube.com/@%EC%95%84%EC%9D%B4%ED%95%B4%EB%B8%8C-%EA%B3%B5%EC%8B%9D%EC%B1%84%EB%84%90",target:"_blank",rel:"noopener noreferrer",children:"Youtube"})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.policy.title","\uC815\uCC45")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{e&&(i.preventDefault(),e())},children:l("footer.policy.terms","\uC774\uC6A9\uC57D\uAD00")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{t&&(i.preventDefault(),t())},children:l("footer.policy.privacy","\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68")})})]})]})]})]}),n.jsx("hr",{className:"site-footer__rule"}),n.jsxs("div",{className:"site-footer__bottom",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("img",{src:Mo,alt:"IHAB",className:"site-footer__logo"})}),n.jsxs("div",{className:"site-footer__meta",children:[n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.ceo","\uB300\uD45C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.ceoName","\uD55C\uC9C0\uD61C")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.address","\uC8FC\uC18C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.addressValue","\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.bizNo","\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.bizNoValue","526-81-02926")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.support","\uACE0\uAC1D\uC13C\uD130")})," ",n.jsxs("span",{className:"footer-meta caption-1",children:[r," \xA0 ",s]})]})]})]}),n.jsx("div",{className:"site-footer__copyright footer-copyright caption-1",children:"\xA9 IHAB, Inc. All rights reserved."})]})})}function B_({logo:e,logoAlt:t="",logoHref:a,links:r=[],actions:s,className:l,containerClassName:i,renderLink:u,menuLabel:c}){const{t:d}=_e.useTranslation(),h=c??{open:d("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:d("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[p,m]=o.useState(!1),g=o.useId(),y=o.useRef(null);o.useEffect(()=>{if(!p)return;const v=Kn(()=>{const _=document.getElementById(g);_&&_.contains(document.activeElement)&&y.current?.focus(),m(!1)}),f=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,B=_=>{_.matches&&m(!1)};return f&&(f.matches&&m(!1),f.addEventListener?.("change",B)),()=>{v(),f?.removeEventListener?.("change",B)}},[p,g]);const C=i?`${i} landing-header__inner`:"landing-header__inner",b=(v,f)=>u?u(v,{onClick:f}):n.jsx("a",{href:v.href,onClick:f,"aria-current":v.current?"page":void 0,children:v.label});return n.jsxs("header",{className:l?`landing-header ${l}`:"landing-header",children:[n.jsxs("div",{className:C,children:[e!=null&&(()=>{const v=typeof e=="string"?n.jsx("img",{src:e,alt:t,className:"landing-header__logo"}):e;return a?n.jsx("a",{href:a,className:"landing-header__brand",children:v}):n.jsx("div",{className:"landing-header__brand",children:v})})(),r.length>0&&n.jsx("nav",{className:"landing-header__links",children:r.map((v,f)=>n.jsx("span",{children:b(v)},`${f}:${v.href}`))}),n.jsxs("div",{className:"landing-header__actions",children:[s,r.length>0&&n.jsx("button",{ref:y,type:"button",onClick:()=>m(v=>!v),"aria-expanded":p,"aria-controls":g,"aria-label":p?h.close:h.open,className:p?"landing-header__toggle landing-header__toggle--open":"landing-header__toggle",children:n.jsxs("span",{className:"landing-header__burger",children:[n.jsx("span",{}),n.jsx("span",{}),n.jsx("span",{})]})})]})]}),r.length>0&&n.jsx("nav",{id:g,hidden:!p,className:"landing-header__drawer",children:n.jsx("div",{className:i??void 0,children:r.map((v,f)=>n.jsx("span",{className:"landing-header__drawer-item",children:b(v,()=>m(!1))},`${f}:${v.href}`))})})]})}function k_({children:e,action:t,onClick:a,className:r}){const s=a?"bottom-sticky__inner bottom-sticky__inner--clickable":"bottom-sticky__inner";return n.jsx("div",{className:r?`bottom-sticky ${r}`:"bottom-sticky",children:n.jsxs("div",{className:s,onClick:a,...Yu(a),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function A_({mountedRef:e}){const t=o.useRef({phase:"sound",at:0}),a=o.useRef(0),r=o.useRef(null),s=o.useRef(null),l=o.useCallback(()=>{const C=t.current,b=C.phase!=="sound"&&C.at>0;s.current=b?{phase:C.phase,elapsed:Math.max(0,Date.now()-C.at)}:null},[]),i=o.useCallback(()=>{const C=s.current;return s.current=null,C},[]),u=o.useCallback(()=>{a.current+=1,t.current={phase:"sound",at:0}},[]),c=o.useCallback((C,b,v=0)=>{if(!(C>0))return Promise.resolve(!0);const f=a.current;return t.current={phase:b,at:Date.now()-Math.max(0,v)},new Promise(B=>{const _=setTimeout(()=>{r.current===_&&(r.current=null),B(!!e.current&&f===a.current)},C);r.current=_})},[e]),d=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),h=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),p=o.useCallback(()=>{const C=t.current;return C.phase!=="sound"&&C.at>0},[]),m=o.useCallback(()=>a.current,[]),g=o.useCallback(C=>C===a.current,[]),y=o.useCallback(()=>{a.current+=1},[]);return o.useEffect(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]),o.useMemo(()=>({positionRef:t,isRunning:p,generation:m,isCurrent:g,abort:u,waitPad:c,enterSound:d,leave:h,pause:l,resume:i,__bumpGenerationForTest:y}),[p,m,g,u,c,d,h,l,i,y])}const xa=9,N_=e=>Math.round(Math.min(xa,Math.max(0,e))/xa*100),E_=e=>e/100*xa,er=2,Dc=.1,D_=e=>Math.min(er,Math.max(0,e)),S_=.1,j_=e=>Math.round(e*1e6)/1e6;function tr(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return D_(t);const a=Math.min(xa,Math.max(0,Number(e.level)||0))/xa,r=Number(e.mainVolume);return r>0?a>0?j_(Math.min(er,Math.max(S_,a/r))):0:1}const Sc=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function jc(e){return Sc(e)}function hs(e){return Sc(e)*tr(e)}function ms(e,t=I1()){const a=Number.isFinite(t)&&t>0?t:1;return Math.min(1,hs(e)/a)}function ea(e,t){const a={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(a.noiseRatio=tr({level:a.level,mainVolume:a.mainVolume})),a}const ta={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},Cs=o.createContext(null);function wr(){return o.useContext(Cs)}const fs=e=>`${P1()}/${e}`,Tc=e=>Array.from({length:10},(t,a)=>fs(`${e}-${String(a+1).padStart(2,"0")}.mp3`)),Br={get defaultNoise(){return fs("noise1.mp3")},get street(){return Tc("noise2")},get restaurant(){return Tc("noise3")},get buzz(){return fs("noise4.mp3")}};function T_(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return Br.defaultNoise;case"street":return Br.street[t];case"restaurant":return Br.restaurant[t];case"buzz":return Br.buzz;default:return null}}function M_({noisePlayer:e,audioRef:t,playbackStateRef:a,sequencer:r}){const s=o.useRef(e?.registerAnalyser);s.current=e?.registerAnalyser;const l=o.useRef(null),[i,u]=o.useState(null),c=o.useRef(null),d=o.useRef(null),h=o.useRef(null),p=o.useRef(null),m=o.useRef(0),g=o.useRef(null),y=o.useCallback(()=>!!r?.isRunning(),[r]),C=o.useCallback(()=>{p.current!==null&&(cancelAnimationFrame(p.current),p.current=null),g.current!==null&&(clearTimeout(g.current),g.current=null)},[]),b=o.useCallback((N,x=250)=>{const E=l.current;if(!E)return;const w=d.current;if(w){d.current=null;try{E.pause()}catch{}E.src=w,E.load()}if(!E.src)return;m.current+=1,C();try{to(),rr(E).then(R=>{if(l.current===E)try{s.current?.("noise",R)}catch{}})}catch{}const D=E.paused?0:or(E);E.paused&&zn(E,0),E.play().catch(()=>{});const k=performance.now(),A=()=>{const R=Math.min(1,(performance.now()-k)/x);try{zn(E,D+(N-D)*R)}catch{}R<1?p.current=requestAnimationFrame(A):p.current=null};p.current=requestAnimationFrame(A)},[C]),v=o.useCallback((N=250,x)=>{const E=l.current;if(!E||E.paused){x?.();return}const w=++m.current;C();const D=performance.now(),k=or(E),A=()=>{const R=Math.min(1,(performance.now()-D)/N);try{zn(E,k*(1-R))}catch{}if(R<1)p.current=requestAnimationFrame(A);else{p.current=null,g.current!==null&&(clearTimeout(g.current),g.current=null);try{E.pause()}catch{}x?.()}};p.current=requestAnimationFrame(A),g.current=setTimeout(()=>{if(g.current=null,m.current===w){p.current!==null&&(cancelAnimationFrame(p.current),p.current=null);try{E.paused||(zn(E,0),E.pause(),x?.())}catch{}}},N+150)},[C]);o.useEffect(()=>{const N=document.createElement("audio");return N.loop=!0,N.crossOrigin="anonymous",l.current=N,()=>{C();try{N.pause(),N.removeAttribute("src"),N.load()}catch{}l.current=null,c.current=null,d.current=null}},[C]);const f=e?ms(e.settings):0,B=!!e?.settings.enabled&&f>0;o.useEffect(()=>{if(!B)return;let N=0;const x=setInterval(()=>{const E=l.current;if(!E||E.paused){N=0;return}const w=t.current;if(w&&!w.paused&&!w.ended||y()||a.current==="playing"){N=0;return}N+=1,N>=2&&(N=0,v())},400);return()=>clearInterval(x)},[v,B,t,a,y]),o.useEffect(()=>{const N=()=>{const x=l.current;if(document.hidden){if(x&&!x.paused){C();try{x.pause()}catch{}}return}if(!x||!x.paused)return;const E=t.current,w=!!E&&!E.paused&&!E.ended||y()||a.current==="playing",D=h.current;w&&D?.enabled&&D.volume>0&&b(D.volume)};return document.addEventListener("visibilitychange",N),()=>document.removeEventListener("visibilitychange",N)},[C,b,t,a,y]),o.useEffect(()=>{h.current=e?{enabled:e.settings.enabled,volume:f,type:e.settings.type}:null},[e,e?.settings.enabled,f,e?.settings.type]);const _=o.useRef(null);return o.useEffect(()=>()=>{_.current?.(),_.current=null},[]),o.useEffect(()=>{const N=e?.settings,x=l.current;if(!x)return;const E=N?ms(N):0;if(!N||!N.enabled||E===0){v();return}if(c.current!==N.type){const w=T_(N.type);w&&(c.current=N.type,u(w),d.current=w,v(150,()=>{if(d.current!==w)return;d.current=null,x.src=w,x.load();const D=t.current;if(D&&!D.paused||y()){_.current?.();const k=()=>{x.removeEventListener("canplay",k),_.current===A&&(_.current=null);const R=t.current,$=h.current;(R&&!R.paused&&!R.ended||y())&&$?.enabled&&$.volume>0&&b($.volume)},A=()=>x.removeEventListener("canplay",k);_.current=A,x.addEventListener("canplay",k)}}))}else{const w=t.current,D=!!w&&!w.paused&&!w.ended||y()||a.current==="playing";if(D&&d.current)b(E);else if(D&&x.paused&&x.src)b(E);else if(!x.paused)if(!D)v();else{C();const k=or(x),A=performance.now(),R=()=>{const $=Math.min(1,(performance.now()-A)/150);try{zn(x,k+(E-k)*$)}catch{}$<1?p.current=requestAnimationFrame(R):p.current=null};p.current=requestAnimationFrame(R)}}},[e?.settings,e?.settings.enabled,f,e?.settings.type,C,b,v,t,a,h,y]),o.useEffect(()=>{const N=l.current;if(N)try{N.playbackRate=Math.min(1.25,Math.max(.75,e?.settings.speed??1))}catch{}},[e?.settings.speed]),{noiseAudioRef:l,activeNoiseUrl:i,noiseSettingsRef:h,cancelNoiseFade:C,fadeInNoise:b,fadeOutNoise:v}}function L_({ttsText:e,playbackRate:t,mainVolume:a,fillRef:r,waveProgressRef:s,setProgress:l,setPlaybackState:i,setStateLocal:u,fadeInNoise:c,fadeOutNoise:d,noiseSettingsRef:h,onDoneRef:p,handleEndRef:m}){const g=o.useRef(null),y=o.useRef(0),C=o.useRef(null),b=o.useRef(0),v=o.useRef(!1);o.useEffect(()=>()=>{b.current++;try{if(C.current&&(cancelAnimationFrame(C.current),C.current=null),v.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}v.current=!1}}catch{}},[]);const f=(N,x=1)=>{try{const E=(N||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(N||"").length);return Math.max(700,Math.round(E*300/Math.max(.25,x)))}catch{return 1200}},B=o.useCallback(N=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof p.current=="function"&&p.current(!1)}catch{}return}const x=window.speechSynthesis,E=++b.current;try{try{x.cancel()}catch{}const w=N??e,D=Array.isArray(w)?w.filter(T=>!!T):[w||""];D.length===0&&D.push("");const k=Math.max(.3,Math.min(3,t));y.current=D.reduce((T,P)=>T+f(P,k||1),0),g.current=performance.now(),l(0),i("playing"),u("playMode");const A=h.current;A?.enabled&&(A?.volume??0)>0&&c(A.volume);const R=()=>{try{const T=g.current||performance.now(),P=performance.now()-T,L=y.current||1200,Q=Math.min(1,P/L);try{r.current&&(r.current.style.left=`${Q*100}%`),s.current&&s.current.style.setProperty("--progress",String(Q))}catch{}Q<1&&(C.current=requestAnimationFrame(R))}catch{}},$=()=>{if(E===b.current)try{C.current&&(cancelAnimationFrame(C.current),C.current=null),l(1),i("stopped");try{m.current?.()}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{}},G=T=>{const P=new SpeechSynthesisUtterance(D[T]);try{P.rate=k}catch{}try{P.volume=Math.max(0,Math.min(1,a))}catch{}P.onend=()=>{if(E===b.current){if(T<D.length-1){try{G(T+1)}catch{$()}return}$()}},P.onerror=()=>{$()},P.onstart=()=>{if(!(T>0))try{C.current&&(cancelAnimationFrame(C.current),C.current=null),C.current=requestAnimationFrame(R)}catch{}},v.current=!0,x.speak(P)};try{G(0)}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}},[e,t,a,c,r,s,l,i,u,h,p,m]),_=o.useCallback(()=>{b.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}C.current&&(cancelAnimationFrame(C.current),C.current=null),d(),g.current=null}catch{}i("stopped"),u("active"),l(0)},[d,i,u,l]);return{startTTS:B,stopTTS:_}}const $_=.01,R_=.3;async function P_(e,t,a,r=!1){let s=null;try{const l=window.AudioContext||window.webkitAudioContext;s=new l;const i=await s.decodeAudioData(e.slice(0)),u=i.numberOfChannels>0?i.getChannelData(0):null;if(!u)return null;let c=0;if(r){const g=Math.floor(R_*i.sampleRate),y=Math.min(u.length,g);for(;c<y&&Math.abs(u[c])<=$_;)c++;c>=y&&(c=0)}const d=u.length-c,h=a&&a>0?Math.min(d,Math.floor(a*i.sampleRate)):d,p=Math.max(t,h),m=Math.floor(p/t)||1;return new Array(t).fill(0).map((g,y)=>{const C=c+y*m,b=Math.min(C+m,c+p,u.length);let v=0;for(let f=C;f<b;f++){const B=Math.abs(u[f]);B>v&&(v=B)}return v})}catch{return null}finally{try{s?.close?.()}catch{}}}async function Mc(e,t,a,r=!1){try{const s=await fetch(e);if(s.ok===!1)return null;const l=await s.arrayBuffer();return await P_(l,t,a,r)}catch(s){try{const l=Il(s)}catch{}return null}}const bs=45,I_=74,F_=2;function kr(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function Ar(e){return kr(e)/45}const O_=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),Lc=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function $c({durationsSec:e,leadInMs:t=0,tailMs:a=0}){const r=Lc(t),s=Lc(a),l=[];let i=0;return e.forEach((u,c)=>{for(const[d,h]of[["lead",r],["sound",O_(u)],["tail",s]])l.push({kind:d,track:c,startMs:i,durMs:h}),i+=h}),{segments:l,totalMs:i,trackCount:e.length}}function Rc(e,t){const a=(t|0)*3;if(t<0||a+2>=e.segments.length)return null;const[r,s,l]=[e.segments[a],e.segments[a+1],e.segments[a+2]];return{lead:r,sound:s,tail:l,totalMs:r.durMs+s.durMs+l.durMs}}function z_(e,t){const a=Rc(e,t.track);if(!a||!(a.totalMs>0))return 0;const r=a[t.kind],s=Math.min(Math.max(0,Number.isFinite(t.elapsedMs)?t.elapsedMs:0),r.durMs);return Math.max(0,Math.min(1,(r.startMs-a.lead.startMs+s)/a.totalMs))}function W_(e,t,a){const r=Math.max(0,Math.floor(a)),s=Rc(e,t);if(!s||r===0||!(s.totalMs>0)||s.lead.durMs===0&&s.tail.durMs===0||!(s.sound.durMs>0))return{lead:0,sound:r,tail:0};const l=Math.round(s.lead.durMs/s.totalMs*r),i=Math.round(s.tail.durMs/s.totalMs*r),u=Math.max(1,r-l-i),c=l+u+i-r;return{lead:Math.max(0,l-Math.ceil(c/2)),sound:u,tail:Math.max(0,i-Math.floor(c/2))}}function H_({currentTime:e,sources:t,index:a,audioDuration:r}){const s=a||0,l=Array.isArray(t)&&t.length>0?t[s]:void 0,i=l?l.duration||r||0:r||0;if(!(i>0))return 0;const u=Number.isFinite(e)?e:0;return Math.max(0,Math.min(1,u/i))}function V_({phase:e,phaseElapsedMs:t,currentTime:a,trackDurationSec:r,leadInMs:s,tailMs:l}){const i=$c({durationsSec:[r],leadInMs:s,tailMs:l});return z_(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(a)?a:0)*1e3:t})}function q_({bars:e,trackDurationSec:t,leadInMs:a,tailMs:r}){return W_($c({durationsSec:[t],leadInMs:a,tailMs:r}),0,e)}function U_(e,t){if(!Array.isArray(e))return null;const a=t||0;return a<e.length-1?a+1:null}function G_({ended:e,completedByEnd:t}){return!!e||!!t}function K_(e){return e.map((t,a)=>({src:t.src,label:String(a+1),color:void 0,duration:t.duration||0}))}function Y_(e){return e.reduce((t,a)=>t+(a.duration||0),0)}function Z_(e,t,a){const r=Array.isArray(e)?e:e?[e]:[],s=[];for(const l of r)if(l){if(typeof l=="object"&&l!==null&&"src"in l&&l.src){const i=l;s.push({code:i.code??null,src:i.src});continue}if(typeof l=="string"&&(l.startsWith("http")||l.includes("/"))){s.push({code:null,src:l});continue}if(typeof l=="string"||typeof l=="number"){const i=String(l),u=a(i,t);u&&s.push({code:i,resolvedPath:u})}}return s}function X_(e,t){if(!t||e.readyState<1)return!0;const a=e.currentSrc||e.src;return a?Pc(a)!==Pc(t):!0}function Pc(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const Ic=4,J_=Ar(Ic/bs);function Q_(e){const{src:t,segments:a,progress:r=0,waveProgressRef:s,noiseSrc:l,noiseRatio:i=0,noiseSpeed:u=1,totalDuration:c=0,mainVolume:d=1,onReadyChange:h,showSoundWaveForm:p=!0,leadInMs:m=0,tailMs:g=0,trackDurationSec:y=0}=e,C=o.useRef(null),b=o.useRef(null),[v,f]=o.useState(null),[B,_]=o.useState(!1),[N,x]=o.useState(null),[E,w]=o.useState(2),[D,k]=o.useState(0),[A,R]=o.useState(null),[$,G]=o.useState(!1),[T,P]=o.useState(!1),L=3,Q=3,Z=1,F=300,K=o.useRef(0),M=o.useCallback(()=>{const ye=C.current,he=b&&b.current?b.current:ye?ye.closest(".audio-player__wave"):null,Se=he?he.getBoundingClientRect():ye?ye.getBoundingClientRect():null,$e=Se?Se.width:0,Ne=Se?Math.max(100,Se.width):320,ue=Se?Se.height:0,xe=Math.max(Z,Math.min(F,Math.floor((Ne+Q)/(L+Q)))),ke=xe*L,Ee=Math.max(0,xe-1),We=Math.max(0,Ee>0?(Ne-ke)/Ee:Q);return{bars:xe,gap:We,height:ue,width:$e}},[]),q=o.useRef(void 0),Y=o.useRef(null),U=o.useCallback(async(ye,he,{quiet:Se=!1}={})=>{const $e=++K.current,Ne=()=>K.current===$e;try{if(Se||_(!1),q.current=ye,!ye){Ne()&&f(null);return}let ue=he;if(!ue)try{for(let Ee=0;Ee<4&&!(C.current||b.current);Ee++)await new Promise(We=>requestAnimationFrame(We));await new Promise(Ee=>requestAnimationFrame(Ee));const ke=M();ke.height>0&&k(ke.height),ue=ke.bars,w(ke.gap)}catch{ue=120}Y.current=ue;const xe=await Mc(ye,ue);if(!Ne())return;if(!xe){f(null),_(!1);return}f(xe),x(ue),_(!0)}catch{if(!Ne())return;f(null),_(!1)}},[_,f,k,w,x,M]);o.useEffect(()=>{const ye=b.current;if(!ye||typeof ResizeObserver>"u")return;let he=null;const Se=new ResizeObserver(()=>{he!==null&&cancelAnimationFrame(he),he=requestAnimationFrame(()=>{he=null;try{const $e=M();if($e.width<=0||($e.height>0&&k($e.height),Y.current===null||$e.bars===Y.current))return;const Ne=q.current;w($e.gap),Ne?U(Ne,$e.bars,{quiet:!0}).catch(()=>{}):Y.current=$e.bars}catch{}})});return Se.observe(ye),()=>{Se.disconnect(),he!==null&&cancelAnimationFrame(he)}},[M,U]),o.useEffect(()=>{const ye=a&&a[0]&&a[0].src||t||a&&a.length===1&&a[0]&&a[0].src;U(typeof ye=="string"?ye:void 0).catch(()=>{}),P(!1)},[t,a,U]),o.useEffect(()=>{let ye=!1;if(G(!1),R(null),!l||!N)return;const he=c>0?c*(u||1):void 0;return Mc(l,N,he,!0).then(Se=>{ye||(R(Se),Se||G(!0))}).catch(()=>{ye||(R(null),G(!0))}),()=>{ye=!0}},[l,N,c,u]);const S=Math.max(0,Math.min(1,d)),I=o.useMemo(()=>v&&v.length&&Math.max(...v)||1,[v]),O=N||40,z=o.useMemo(()=>q_({bars:O,trackDurationSec:y,leadInMs:m,tailMs:g}),[O,y,m,g]),se=o.useMemo(()=>Array.from({length:O}).map((ye,he)=>{const Se=he>=z.lead&&he<z.lead+z.sound,$e=z.sound>0&&Se?Math.min(O-1,Math.round((he-z.lead)/z.sound*O)):-1,Ne=Se?v&&v[$e]!=null?v[$e]:null:v?0:null,ue=Ne==null?null:Math.min(1,Ne/I*S),xe=ue!=null&&D>0&&kr(ue)<=Ic,ke=ue==null?.15:xe?0:Ar(ue),Ee=xe,We=O>1?he/(O-1):0;return n.jsx("div",{className:Ee?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":ke,"--i":he,"--mix":We}},he)}),[O,v,I,S,D,z]),te={"--progress":String(Math.max(0,Math.min(1,r)))},de=o.useMemo(()=>A&&A.length&&Math.max(...A.map(ye=>Number.isFinite(ye)?Math.abs(ye):0))||1,[A]),ee=S*Math.max(0,i),V=!l||!A||!A.length?1:Math.max(1,ee),ne={"--bar-gap":`${E}px`,"--wave-h":`${kr(V)}px`,"--wave-h1":`${bs}px`},W=B&&(l?!!A||$:!0);o.useEffect(()=>{W&&P(!0)},[W]);const H=T?B:W;o.useEffect(()=>{h?.(H)},[H,h]);const ie=N||40,Te=o.useMemo(()=>Array.from({length:ie}).map((ye,he)=>{const Se=A&&A[he]!=null?A[he]:null,$e=Se==null?0:Math.abs(Se)/de*ee,Ne=Math.max(J_,Ar($e)),ue=ie>1?he/(ie-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":Ne,"--i":he,"--mix":ue}},he)}),[ie,A,de,ee,D]);return n.jsxs("div",{className:"audio-player__wave",ref:b,style:ne,children:[l&&n.jsx("div",{className:`audio-player__wave-noise ${W?"is-ready":""}`,"aria-hidden":"true",children:Te}),p&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${H?"is-ready":""}`,ref:C,children:se}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${H?"is-ready":""}`,ref:s,style:te,children:se})]})]})}const Fc={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function gs(e,t){return new Promise((a,r)=>{const s=document.createElement("audio");let l=!1;const i=()=>{try{s.removeAttribute("src"),s.load()}catch{}},u=()=>{if(l)return;l=!0;const d=isFinite(s.duration)&&s.duration||0;i(),a(d)},c=d=>{l||(l=!0,i(),t.rejectOnError?r(new Error(d)):a(0))};s.addEventListener("loadedmetadata",u),s.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),t.timeoutMs),s.src=e})}const ex=2e3;function Oc(e,t=ex){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.addEventListener("canplay",s,{once:!0}),e.addEventListener("error",s,{once:!0}),setTimeout(s,t)})}function tx({showSoundWaveForm:e,showNoiseWaveForm:t,timeoutMs:a=2500}){const r=o.useRef(!1),s=o.useRef([]),l=o.useCallback(c=>{if(r.current=c,!c||!s.current.length)return;const d=s.current;s.current=[];for(const h of d)h(!0)},[]),i=o.useCallback(()=>{r.current=!1},[]),u=o.useCallback(()=>!e&&!t||r.current?Promise.resolve(!0):new Promise(c=>{const d=p=>{clearTimeout(h),s.current=s.current.filter(m=>m!==d),c(p)},h=setTimeout(()=>d(!0),a);s.current.push(d)}),[e,t,a]);return o.useEffect(()=>()=>{const c=s.current;s.current=[];for(const d of c)d(!1)},[]),{onReadyChange:l,waitForReady:u,markNotReady:i}}function nx(){const e=o.useRef([]),t=o.useCallback(s=>(e.current.push(s),s),[]),a=o.useCallback(s=>{const l=new Set([...s].filter(Boolean));e.current=e.current.filter(i=>{if(l.has(i))return!0;try{URL.revokeObjectURL(i)}catch{}return!1})},[]),r=o.useCallback(()=>{a([])},[a]);return o.useEffect(()=>()=>{for(const s of e.current)try{URL.revokeObjectURL(s)}catch{}e.current=[]},[]),{track:t,keepOnly:a,revokeAll:r}}function ax({offsetY:e=8}={}){const t=o.useRef(null),[a,r]=o.useState(null),s=o.useCallback(()=>r(null),[]),l=o.useCallback(()=>{try{const i=t.current?.getBoundingClientRect();if(!i)return;r({left:i.left,right:i.right,width:i.width,height:i.height,x:i.x,top:i.top+e,bottom:i.bottom+e,y:i.y+e,toJSON:i.toJSON.bind(i)})}catch{}},[e]);return o.useEffect(()=>{if(a)return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[a,s]),{ref:t,rect:a,show:l,hide:s}}function rx(e){if(!e)return 0;const t=e.duration;if(Number.isFinite(t)&&t>0)return t;if(t===0)return 0;try{const a=e.seekable;if(a&&a.length>0){const r=a.end(a.length-1);if(Number.isFinite(r)&&r>0)return r}}catch{}return null}const ox=400,sx=2e3,zc=5;function lx({audioRef:e,fillRef:t,waveProgressRef:a,sourcesRef:r,currentIndexRef:s,sequencer:l,leadInMs:i=0,tailMs:u=0}){const c=o.useRef(null),d=o.useRef(0),h=o.useRef(null),p=o.useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null)},[]),m=o.useCallback(()=>{if(c.current!==null)return;let y=0;const C=()=>{if(In){const b=typeof performance<"u"&&performance.now?performance.now():Date.now();if(y>0&&b-y>ox){const v=h.current===null||b-h.current>sx;if(h.current=b,v&&d.current<zc){d.current+=1;const f=d.current;let B=null;try{B=typeof document<"u"?document.visibilityState:null}catch{}At(`progress-ticker-slow-frames#${f}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(b-y)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,B==="hidden"?"\uC774 \uCE78\uC774 **\uC228\uC5B4 \uC788\uC5B4** \uBE0C\uB77C\uC6B0\uC800\uAC00 \uD2C0\uC744 \uC904\uC600\uC2B5\uB2C8\uB2E4 \u2014 \uC7AC\uC0DD\uBC14\xB7\uD30C\uD615\uC740 \uD2C0\uB9C8\uB2E4 \uADF8\uB824\uC9C0\uBBC0\uB85C, \uC9C0\uAE08 \uC7AC\uB294 \uAC12\uC740 **\uC0AC\uB78C\uC774 \uBCF4\uB294 \uD654\uBA74\uACFC \uB2E4\uB985\uB2C8\uB2E4.** \uCE78\uC744 \uC55E\uC73C\uB85C \uAEBC\uB0B4\uACE0 \uB2E4\uC2DC \uC7AC\uC2ED\uC2DC\uC624.":"\uCE78\uC740 \uBCF4\uC774\uB294\uB370 \uD2C0\uC774 \uB290\uB9BD\uB2C8\uB2E4 \u2014 \uAC19\uC740 \uD654\uBA74\uC5D0\uC11C \uBB34\uAC70\uC6B4 \uC77C\uC774 \uB3C4\uB294\uC9C0 \uBCF4\uC2ED\uC2DC\uC624. \uC7AC\uC0DD\uBC14\xB7\uD30C\uD615\uC774 \uB04A\uACA8 \uBCF4\uC774\uB294 \uAC83\uC740 \uC774 \uD0D3\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.",f>=zc?`(${f}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${f}\uBC88\uC9F8)`)}}y=b}try{const b=e.current,v=Array.isArray(r.current)?r.current[s.current||0]:void 0,f=!!v&&Number.isFinite(v.duration)&&(v.duration??0)>0,B=f?0:rx(b),_=t.current,N=(i||0)>0||(u||0)>0,x=N&&(l?.positionRef.current?.phase??"sound")!=="sound";if(B===null&&!x)try{_&&_.style.visibility!=="hidden"&&(_.style.visibility="hidden")}catch{}else{const E=f?v.duration:B||0;In&&x&&!(E>0)&&At("progress-ticker-pad-without-duration","[ihab-core] \uB738\uC774 \uB3C4\uB294\uB370 **\uC18C\uB9AC \uAE38\uC774\uB97C \uBAA8\uB985\uB2C8\uB2E4** \u2014 \uC7AC\uC0DD\uBC14\uAC00 \uB738\uB9CC\uC73C\uB85C \uC5B4\uB9BC\uC7A1\uC544 \uC6C0\uC9C1\uC785\uB2C8\uB2E4.","\uC18C\uB9AC \uAE38\uC774 \uC7AC\uAE30(measureAudioDuration)\uAC00 0 \uC744 \uC92C\uAC70\uB098 `<audio>` \uAC00 \uC544\uC9C1 \uC548 \uC2E4\uB838\uC2B5\uB2C8\uB2E4. \uAE38\uC774\uB97C \uC54C\uAC8C \uB418\uBA74 \uB9C8\uCEE4\uAC00 \uADF8 \uC21C\uAC04 **\uB4A4\uB85C \uBB3C\uB7EC\uB0A9\uB2C8\uB2E4**(\uC5B4\uB9BC\uC740 \uB298 \uCC38\uBCF4\uB2E4 \uD07D\uB2C8\uB2E4). \uC774 \uC904\uC774 \uBCF4\uC774\uBA74 \uADF8 \uC790\uB9AC\uB97C \uC54C\uB824 \uC8FC\uC2ED\uC2DC\uC624 \u2014 \uD3C9\uC18C \uAE38\uC5D0\uC11C\uB294 \uC548 \uB098\uC640\uC57C \uD569\uB2C8\uB2E4.");const w=N?V_({phase:l?.positionRef.current?.phase??"sound",phaseElapsedMs:l?.positionRef.current?Math.max(0,Date.now()-l.positionRef.current.at):0,currentTime:b&&typeof b.currentTime=="number"?b.currentTime:0,trackDurationSec:E,leadInMs:i||0,tailMs:u||0}):H_({currentTime:b&&typeof b.currentTime=="number"?b.currentTime:0,sources:r.current,index:s.current,audioDuration:B??0});try{_&&(_.style.visibility&&(_.style.visibility=""),_.style.left=`${w*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(w))}catch{}}}catch{}c.current=requestAnimationFrame(C)};c.current=requestAnimationFrame(C)},[e,t,a,r,s,l,i,u]),g=o.useCallback(y=>{p();try{t.current&&(t.current.style.visibility="",t.current.style.left=`${y*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(y))}catch{}},[p,t,a]);return o.useEffect(()=>p,[p]),{start:m,stop:p,settleTo:g}}function ys({btnLabel:e,soundSrc:t,bucketPath:a,onDone:r,disabled:s=!1,ttsText:l=null,className:i,showSoundWaveForm:u=!0,showNoiseWaveForm:c=!0,leadInMs:d=0,tailMs:h=0}){const{t:p}=_e.useTranslation(),m=e,g=wr(),y=o.useRef(g?.registerAnalyser);o.useEffect(()=>{y.current=g?.registerAnalyser});const C=o.useRef(null),b=o.useRef(null),v=o.useRef(null),f=nx(),B=o.useRef(null),_=o.useRef(!1),N=o.useRef(null),{ref:x,rect:E,show:w,hide:D}=ax();o.useEffect(()=>()=>{y.current?.("main",null),y.current?.("noise",null)},[]);const[k,A]=o.useState(!1),[R,$]=o.useState("idle"),[G,T]=o.useState("stopped"),P=o.useRef("stopped");o.useEffect(()=>{P.current=G},[G]);const[L,Q]=o.useState(0),[Z,F]=o.useState("active"),K=o.useRef(!1);o.useEffect(()=>{if(Z!=="playMode"||!K.current)return;K.current=!1;const X=typeof document<"u"?document.activeElement:null;if(X&&X!==document.body)return;const ce=v.current?.querySelectorAll("button")[1];try{ce?.focus()}catch{}},[Z]);const[M,q]=o.useState(null),[Y,U]=o.useState(null),[S,I]=o.useState(0),[O,z]=o.useState(!1),[se,te]=o.useState(0),de=g?.playbackRate??1,ee=g?.mainVolume??1,V=g?hs(g.settings):0,ne=g?jc(g.settings):ee,[W,H]=o.useState("idle"),[ie,Te]=o.useState(""),[ye]=o.useState("top"),he=o.useRef(null),Se=o.useRef(0),$e=o.useRef(null),Ne=o.useRef(!0),ue=A_({mountedRef:Ne}),xe=o.useRef(null),ke=o.useRef(d),Ee=o.useRef(h);o.useEffect(()=>{ke.current=Math.max(0,d||0)},[d]),o.useEffect(()=>{Ee.current=Math.max(0,h||0)},[h]);const{start:We,stop:He,settleTo:ot}=lx({audioRef:C,fillRef:b,waveProgressRef:$e,sourcesRef:he,currentIndexRef:Se,sequencer:ue,leadInMs:d,tailMs:h}),{onReadyChange:Qe,waitForReady:Je,markNotReady:vt}=tx({showSoundWaveForm:u,showNoiseWaveForm:c}),je=o.useRef(null),Ye=o.useRef(s),Be=o.useRef(r),Ue=o.useRef(null),qe=o.useRef(!1),[pt,_t]=o.useState(!1),Et=o.useCallback(X=>{qe.current=X,_t(X)},[]),wt=o.useRef(null),{activeNoiseUrl:st,noiseSettingsRef:tt,fadeInNoise:Bt,fadeOutNoise:kt}=M_({noisePlayer:g,audioRef:C,playbackStateRef:P,sequencer:ue}),{startTTS:Tt,stopTTS:Lt}=L_({ttsText:l,playbackRate:de,mainVolume:ne,fillRef:b,waveProgressRef:$e,setProgress:Q,setPlaybackState:T,setStateLocal:F,fadeInNoise:Bt,fadeOutNoise:kt,noiseSettingsRef:tt,onDoneRef:Be,handleEndRef:wt});o.useEffect(()=>{Pe.current=Lt});const gt=X=>{if(typeof window>"u"||!window.speechSynthesis){try{Te(p("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}Tt(X);return}yt("tts"),Tt(X)},it=Array.isArray(t)?t.filter(Boolean):t?[t]:[],ut=(!it||it.length===0)&&!!l,ct=Array.isArray(M)&&M.length>0?M:Array.isArray(Y)&&Y.length>0?Y:null,ve=Math.max(Array.isArray(ct)?ct.length:0,it.length);o.useEffect(()=>(Ne.current=!0,()=>{Ne.current=!1}),[]);const Me=()=>{ue.abort()},Pe=o.useRef(null),Oe=o.useRef(null),dt=o.useRef(null),Dt=o.useRef(null);Dt.current||(Dt.current=()=>{dt.current=null;const X=C.current;if(Oe.current==="audio"&&X&&(!X.paused||ue.isRunning())){Me();try{X.pause()}catch{}Ne.current&&(T("paused"),He(),kt())}else if(Oe.current==="tts")try{Pe.current?.()}catch{}});const yt=X=>{Oe.current=X,dt.current=Ua(Dt.current)},xt=()=>{dt.current?.(),dt.current=null};o.useEffect(()=>()=>{Dt.current&&fr(Dt.current)},[]);const Ct=o.useRef(de);o.useEffect(()=>{Ct.current=de||1},[de]);const Le=o.useCallback(X=>{const ce=Ct.current||1;try{X.defaultPlaybackRate=ce}catch{}try{X.playbackRate=ce}catch{}},[]),at=o.useCallback((X,ce)=>{if(!X_(X,ce)){try{X.currentTime=0}catch{}Le(X);return}X.src=ce,Le(X),X.load(),Le(X)},[Le]),oe=o.useCallback(()=>{Ue.current&&(clearTimeout(Ue.current),Ue.current=null),H("idle")},[]),fe=o.useCallback(async(X,ce=3,Ae=50,Ve=0)=>{oe();const Ke=ue.generation(),Ze=!!X&&X.currentTime>0&&!X.ended,ft=Math.max(0,ke.current-Math.max(0,Ve));if(ft>0&&!Ze){yt("audio"),We(),T("playing");const bt=tt.current;if(bt?.enabled&&(bt.volume??0)>0)try{Bt(bt.volume)}catch{}if(!await ue.waitPad(ft,"lead",Ve)||!Ne.current||!ue.isCurrent(Ke))return!1}ue.enterSound();for(let bt=0;bt<ce;bt++){if(!Ne.current||!ue.isCurrent(Ke))return!1;try{return yt("audio"),await X.play(),!0}catch(ge){if((ge instanceof Error||typeof ge=="object"&&ge&&"name"in ge?ge.name:void 0)==="AbortError"){if(!ue.isCurrent(Ke))return!1;await new Promise(j=>setTimeout(j,Ae));continue}try{Te(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{Te(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[p,We,ue,Bt,tt,oe]),Ie=o.useCallback(X=>{const ce=ue.generation(),Ae=Math.max(0,Ee.current-Math.max(0,X));We();const Ve=tt.current;if(Ve?.enabled&&(Ve.volume??0)>0)try{Bt(Ve.volume)}catch{}const Ke=()=>{try{xe.current?.()}catch{}};if(Ae<=0){ue.leave(),Ke();return}ue.waitPad(Ae,"tail",X).then(Ze=>{ue.leave(),Ze&&ue.isCurrent(ce)&&Ke()}).catch(()=>{})},[ue,We,Bt,tt]),Xe=o.useCallback(()=>{const X=C.current;if(!X)return;const ce=()=>{T("playing"),F("playMode"),z(!0),We();try{to(),rr(X).then(Ze=>{if(Ne.current)try{y.current?.("main",Ze)}catch{}})}catch{}const Ke=tt.current;Ke?.enabled&&(Ke?.volume??0)>0&&Bt(Ke.volume)},Ae=()=>{G_({ended:!!X?.ended,completedByEnd:qe.current})||(T("paused"),He(),kt())},Ve=()=>{const Ke=()=>{try{const Ze=he.current,ft=U_(Ze,Se.current);if(ft!==null){Se.current=ft,I(ft),z(!0);const bt=Ze?.[ft]&&Ze[ft].src;if(bt&&X){at(X,bt),fe(X).catch(()=>{});return}}}catch{}T("stopped"),Q(1);try{if(X)try{X.currentTime=0}catch{}}catch{}He(),z(!1),kt();try{!Ye.current&&wt.current&&wt.current()}catch{}};if(xe.current=Ke,Ee.current>0){We(),ue.waitPad(Ee.current,"tail").then(Ze=>{ue.leave(),Ze&&Ke()}).catch(()=>{});return}Ke()};return X.addEventListener("play",ce),X.addEventListener("pause",Ae),X.addEventListener("ended",Ve),()=>{try{X.removeEventListener("play",ce),X.removeEventListener("pause",Ae),X.removeEventListener("ended",Ve),He()}catch{}}},[Bt,kt,fe,tt,We,He,ue]);o.useEffect(()=>Xe(),[Xe]),o.useEffect(()=>{Ye.current=s},[s]),o.useEffect(()=>{Be.current=r},[r]),o.useEffect(()=>{if(s||Z!=="active")return;const X=N.current;if(!X)return;let ce=null;const Ae=requestAnimationFrame(()=>{try{const Ve=X.getTotalLength();if(!Ve)return;const Ke=Ve*.2;X.style.strokeDasharray=`${Ve-Ke} ${Ke}`;const Ze="triFlow_"+Math.random().toString(36).slice(2);ce=document.createElement("style"),ce.textContent=`@keyframes ${Ze}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${Ve}}}`,document.head.appendChild(ce),X.style.animation=`${Ze} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(Ae),ce?.remove()}},[Z,s]),o.useEffect(()=>{he.current=M},[M]),o.useEffect(()=>{Se.current=S},[S]),o.useEffect(()=>{const X=v.current,ce=B.current;if(!X||!ce)return;let Ae=null;const Ve=32,Ke=60,Ze=()=>{try{const bt=Array.from(X.querySelectorAll(":scope > .button"));let ge=0;bt.forEach(Ce=>{if(Ce===ce)return;const Fe=Ce.getBoundingClientRect();ge+=Fe.width});const j=X.getBoundingClientRect().width,J=Math.max(0,Math.floor(j-ge-8)),me=ve;if(!me||J<=0){Array.from(ce.children).forEach(Ce=>{try{Ce.style.width=""}catch{}});return}let ae=Math.floor(J/me);ae>Ke&&(ae=Ke),ae<Ve&&(ae=Math.max(Ve,Math.floor(J/me))),Array.from(ce.querySelectorAll(".button")).forEach(Ce=>{try{Ce.style.width=`${ae}px`}catch{}})}catch{}},ft=requestAnimationFrame(Ze);try{Ae=new ResizeObserver(()=>{requestAnimationFrame(Ze)}),Ae.observe(X),Ae.observe(ce),window.addEventListener("resize",Ze)}catch{}return()=>{try{cancelAnimationFrame(ft)}catch{}try{Ae&&(Ae.disconnect(),Ae=null)}catch{}try{window.removeEventListener("resize",Ze)}catch{}}},[M,Y,ve]),o.useEffect(()=>()=>{try{je.current&&(clearTimeout(je.current),je.current=null),Ue.current&&(clearTimeout(Ue.current),Ue.current=null)}catch{}},[]);const et=(X,ce)=>{q(X),te(ce),vt(),U(K_(X)),he.current=X},rt=()=>{F("playMode"),I(0),z(!0)},$t=async(X,ce)=>{Et(!1),_.current=!1,at(X,ce),await Oc(X),await Je()!==!1&&(A(!1),rt(),await fe(X))},xn=async(X,ce=!1)=>{const Ae=C.current;A(!0),$("measuring_duration");try{const Ve=await gs(X,{timeoutMs:1e4,rejectOnError:!0});et([{src:X,objectUrl:null,duration:Ve}],Ve),$("ready"),ce&&Ae&&await $t(Ae,X)}finally{_.current=!1,A(!1)}},sn=async(X,ce=!1)=>{const Ae=C.current;A(!0),$("measuring_duration");try{const Ve=await Promise.all(X.map(Ze=>gs(Ze,{timeoutMs:1e4})));if(!Ne.current)return;const Ke=X.map((Ze,ft)=>({src:Ze,objectUrl:null,duration:Ve[ft]||0}));et(Ke,Y_(Ke)),$("ready"),ce&&Ae&&Ke.length>0&&await $t(Ae,Ke[0].src)}finally{_.current=!1,A(!1)}},Rt=async(X=!1,ce=!0)=>{const Ae=C.current,Ve=t?Array.isArray(t)?t:[t]:[];if(!Ve||Ve.length===0||!Ve.some(Boolean))return!1;if(_.current)return null;_.current=!0,ce&&A(!0),$("resolving");try{const Ke=Z_(t,a,xl),Ze=[];let ft=0;for(const bt of Ke){let ge=bt.src??null,j=null;if(!ge&&bt.resolvedPath){try{$("getting_signed_url"),ge=await wl(bt.resolvedPath)}catch{ge=null}if(!Ne.current)return!1;if(!ge)try{$("downloading");const me=await Bl(bt.resolvedPath);if(!Ne.current)return!1;if(me){const ae=me instanceof Blob?me:new Blob([me]);j=f.track(URL.createObjectURL(ae)),ge=j}}catch{$("error");try{Te(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),F("active")}catch{}}}if(!ge)continue;let J=0;try{$("measuring_duration"),J=await gs(ge,{timeoutMs:3e3})}catch{J=0}if(!Ne.current){if(j)try{URL.revokeObjectURL(j)}catch{}for(const me of Ze)if(me.objectUrl)try{URL.revokeObjectURL(me.objectUrl)}catch{}return!1}ft+=J||0,Ze.push({...bt,src:ge,objectUrl:j,duration:J})}if(et(Ze,ft),Ze.length>0&&X&&Ae){const bt=Ze[0];Et(!1);try{f.keepOnly(Ze.map(ge=>ge.objectUrl))}catch{}if($("ready"),_.current=!1,bt.src&&Ae)try{if(at(Ae,bt.src),await Oc(Ae),await Je()===!1)return!1;ce&&A(!1),rt(),Ae&&await fe(Ae)}catch{ce&&A(!1)}else ce&&A(!1);F("playMode"),I(0),z(!0)}return Ze.length>0}finally{_.current=!1,ce&&A(!1),$(Ke=>Ke==="ready"?"ready":"idle")}},zt=async X=>{const ce=ue.isRunning();if(X.paused&&!ce){if(qe.current){await It();return}const Ae=ue.resume();if(Ae){if(T("playing"),Ae.phase==="tail"){Ie(Ae.elapsed);return}await fe(X,3,50,Ae.elapsed);return}await fe(X),T("playing")}else ue.pause(),Me(),X.pause(),T("paused"),ce&&(He(),kt())},ln=async()=>{const X=C.current;if(!(!X&&!ut)){if(ut){const ce=window.speechSynthesis;if(Z==="active"){const Ae=Da(),Ve=Array.isArray(l)?l.filter(Boolean):l?[l]:[];if(Ae&&Ve.length>0){if(_.current)return;F("load"),A(!0),$("synthesizing"),_.current=!0;try{const Ke=await Promise.all(Ve.map(Ze=>Promise.resolve(Ae(Ze))));Ke.length>1?await sn(Ke,!0):await xn(Ke[0],!0)}catch{_.current=!1,A(!1),F("active"),gt(Ve.length>0?Ve:void 0)}return}gt(Ve.length>0?Ve:void 0);return}if(Z==="playMode"){const Ae=!!ce&&(ce.speaking||ce.paused)&&!(X&&(X.currentSrc||X.getAttribute("src")));if(X&&!Ae){await zt(X);return}try{if(ce&&ce.paused)try{yt("tts"),ce.resume(),T("playing")}catch{}else try{ce.pause(),T("paused")}catch{}}catch{}}return}if(Z==="active"){if(s&&Array.isArray(he.current)&&he.current.length>0){const Ae=he.current[0];try{if(Ae.src&&X)try{at(X,Ae.src),rt(),X&&await fe(X)}catch{}rt();return}catch{}}F("load");let ce;try{ce=await Rt(!0)}catch{ce=!1}if(ce===!1&&Ne.current){try{Te(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}F("active")}return}if(Z!=="load"&&(Z==="playMode"||Z==="active"))try{X&&await zt(X)}catch(ce){(ce instanceof Error||typeof ce=="object"&&ce&&"name"in ce)&&ce.name}}},It=async()=>{const X=C.current;if(X)try{const ce=he.current;if(Array.isArray(ce)&&ce.length>1){await Cn(0);return}Et(!1);try{X.currentTime=0}catch{}X&&await fe(X),T("playing"),F("playMode")}catch{}},wn=()=>{Me(),xt(),Pe.current?.();const X=C.current;try{if(X){try{X.pause()}catch{}try{X.currentTime=0}catch{}}}catch{}kt(),T("stopped"),F("active"),Q(0),z(!1)},Qt=async(X,{sameSegment:ce=!1}={})=>{Me();const Ae=ue.generation(),Ve=C.current,Ke=he.current?.[X]?.src;try{if(Et(!1),I(X),z(!0),Se.current=X,!Ke||!Ve||(ce||vt(),at(Ve,Ke),!ce&&await Je()===!1)||!ue.isCurrent(Ae)||(await fe(Ve),!ue.isCurrent(Ae)))return;T("playing"),F("playMode")}catch{}},St=async()=>{const X=he.current,ce=Se.current||0;if(!X||ce<=0){await It();return}await Qt(ce-1)},Pt=async()=>{const X=he.current,ce=Se.current||0;if(!X||ce>=X.length-1){wn();return}await Qt(ce+1)},Ht=()=>{if(qe.current)return;const X=200,ce=340;Et(!0),Me(),xt();try{Q(1)}catch{}ot(1);try{H("hold")}catch{}try{const Ae=C.current,Ve=ut&&!!Ae?.src;if(!ut||Ve){if(Ae){Ae.pause();try{Ae.currentTime=0}catch{}}}else Lt();kt()}catch{}try{T("stopped")}catch{}if(z(!1),!Ye.current)try{Ue.current&&(clearTimeout(Ue.current),Ue.current=null),Ue.current=setTimeout(()=>{try{H("out")}catch{}Ue.current=setTimeout(()=>{try{typeof Be.current=="function"&&Be.current(!0)}catch{}try{H("idle")}catch{}Ue.current=null},ce)},X)}catch{}};o.useEffect(()=>{wt.current=Ht});const Yt=o.useCallback(()=>Te(""),[]),Cn=async X=>{(he.current||[])[X]&&await Qt(X,{sameSegment:X===Se.current})},Gt=G==="playing",en=o.useMemo(()=>{if(!Y||Y.length<=1)return Y;const X=Y[S];return X?[X]:Y},[Y,S]),un=s===!0;o.useEffect(()=>{try{const X=C.current;X&&typeof X.playbackRate=="number"&&Le(X)}catch{}},[de,Le]);const fn=o.useRef({raf:null,timer:null});o.useEffect(()=>{const X=C.current;if(!X)return;const ce=Math.max(0,Math.min(1,ne)),Ae=fn.current,Ve=()=>{Ae.raf!==null&&(cancelAnimationFrame(Ae.raf),Ae.raf=null),Ae.timer!==null&&(clearTimeout(Ae.timer),Ae.timer=null)};Ve();const Ke=or(X);if(X.paused||Math.abs(Ke-ce)<.001||typeof requestAnimationFrame!="function"){try{zn(X,ce)}catch{}return}const Ze=performance.now(),ft=()=>{const bt=Math.min(1,(performance.now()-Ze)/150);try{zn(X,Ke+(ce-Ke)*bt)}catch{}Ae.raf=bt<1?requestAnimationFrame(ft):null};return Ae.raf=requestAnimationFrame(ft),Ae.timer=setTimeout(()=>{Ve();try{zn(X,ce)}catch{}},200),Ve},[ne]);const Vt=W==="hold",Bn=W==="out",pe=Z==="playMode"&&!k&&!pt||Vt||Bn,De=G!=="stopped"||Vt||Bn,Re=G==="paused",Ge=Math.max(0,Math.min(100,(L||0)*100)),ze=we("audio-player__fill",pe?"is-visible":"",De?"is-expanded":"",Re?"is-paused":"",Bn?"is-out":"");return n.jsxs("div",{className:`audio-player ${un?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof m=="string"?m:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${Gt?"is-playing":""} ${k?"is-loading":""} ${Z!=="default"?"is-revealed":""}`,children:[k?n.jsxs("div",{className:"audio-player__loading",role:Fc[R]?"status":void 0,"aria-live":Fc[R]?"polite":"off",children:[n.jsx("span",{className:"audio-player__loading-spinner","aria-hidden":"true"}),n.jsx("span",{className:"audio-player__loading-text",children:p("training.audioStatus.preparing",{defaultValue:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"})})]}):null,Z==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:un,onClick:()=>{K.current=gr(),D(),ln()},"aria-label":typeof m=="string"?m:p("training.listen","\uB4E3\uAE30"),onMouseEnter:w,onMouseLeave:D,onFocus:w,onBlur:D,children:n.jsx("span",{ref:x,className:"audio-player__button-triangle-wrap",children:n.jsx("svg",{className:"audio-player__button-triangle",viewBox:"0 0 24 24","aria-hidden":"true",children:n.jsx("path",{ref:N,d:"M13.2 7.7 L16.5 9.85 Q20.2 12 16.5 14.15 L10 18.3 Q7 19.7 7 16.3 L7 7.7 Q7 4.3 10 5.7 L13.2 7.7"})})})}):null,E&&n.jsx(Sn,{anchorRect:E,text:typeof m=="string"&&m?m:p("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${Z==="playMode"||Gt?"is-visible":""}`,inert:!(Z==="playMode"||Gt)||void 0,children:[n.jsxs("div",{ref:v,className:"audio-player__buttons",children:[n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:St,ariaLabel:p("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:Z!=="playMode"}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:Gt?"pause":"play",onClick:ln,ariaLabel:p("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":Gt,width:"60px",variant:"transparent-white",disabled:Z!=="playMode"}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:wn,ariaLabel:p("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:Z!=="playMode"}),ve>1?n.jsx("div",{ref:B,className:"audio-player__source-buttons",children:Array.from({length:ve}).map((X,ce)=>n.jsx(be,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(ce+1),onClick:()=>{try{Cn(ce)}catch{}},ariaLabel:p("training.sourcePlay",{n:ce+1}),variant:"transparent-white",selected:O&&S===ce,disabled:Z!=="playMode"||!(Array.isArray(M)&&M[ce]),showTooltipInfo:!0},ce))}):null,!Array.isArray(M)||M.length<=1?n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:It,ariaLabel:p("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:Z!=="playMode"}):null,n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:Pt,ariaLabel:p("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:Z!=="playMode"}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:Ht,ariaLabel:p("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:Z!=="playMode"})]}),n.jsxs("div",{className:"audio-player__slider",children:[n.jsx("div",{className:ze,ref:b,style:{left:`${Ge}%`},"aria-hidden":"true"}),(u||c)&&n.jsx(Q_,{segments:en,progress:L,totalDuration:se,waveProgressRef:$e,showSoundWaveForm:u,leadInMs:d,tailMs:h,trackDurationSec:M?.[S]?.duration??0,noiseSrc:c&&g?.settings.enabled&&V>0?st:null,noiseRatio:g?tr(g.settings):0,noiseSpeed:g?.settings.speed??1,mainVolume:ee,onReadyChange:Qe})]})]}),n.jsx("audio",{ref:C,crossOrigin:"anonymous",preload:"auto"})]}),!u&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(nt,{icon:"triangle-alert",size:14}),p("training.noSoundWaveform","\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.")]}),n.jsx(ba,{message:ie,position:ye,onClose:Yt})]})}function Nr(e){const{t}=_e.useTranslation(),{text:a,label:r,anchorRect:s=null,onClose:l,closeOnOutsideClick:i=!0,isMobilePopup:u=!1}=e||{},[c,d]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||"light"}catch{return"light"}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",c)}catch{}},[c]);const{increase:h,decrease:p,canIncrease:m,canDecrease:g,fontSize:y,lineHeight:C}=Pi({storageKey:"tooltip-fontScale"}),b=o.useCallback(()=>d(N=>N==="dark"?"light":"dark"),[]),v=o.useCallback(N=>{try{N.stopPropagation()}catch{}try{typeof l=="function"&&l()}catch{}},[l]),f=Array.isArray(a)?a:typeof a>"u"||a===null?[]:[a],B={fontSize:`${y}px`,lineHeight:`${C}px`,"--tt-line-height":`${C}px`,"--tt-marker-size":"28px"},_=n.jsxs("div",{className:le(`text-box-tooltip__root ${c==="dark"?"is-dark":""}`),children:[n.jsxs("div",{className:le("text-box-tooltip__box"),children:[r&&n.jsx("div",{className:le("text-box-tooltip__label body-2b"),children:r}),n.jsx("div",{className:le("text-box-tooltip__text body-1"),style:B,children:f.map((N,x)=>n.jsxs("div",{className:le("text-box-tooltip__line"),children:[f.length>1?n.jsx("div",{className:le("text-box-tooltip__marker"),children:n.jsx("span",{className:le("text-box-tooltip__line-number button-1"),children:x+1})}):null,n.jsx("span",{className:le("text-box-tooltip__line-text"),children:N})]},x))})]}),n.jsxs("div",{className:le("text-box-tooltip__buttons"),children:[n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"minus",onClick:p,ariaLabel:t("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!g}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"plus",onClick:h,ariaLabel:t("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!m}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:c==="dark"?"moon":"sun-medium",onClick:b,ariaLabel:t("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:c==="dark"?"transparent-white":"transparent-gray"}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"x",onClick:v,ariaLabel:t("common.close","\uB2EB\uAE30"),variant:c==="dark"?"transparent-white":"transparent-gray"})]})]});return s?n.jsx(vn,{anchorRect:s,className:le(`text-box-tooltip ${c==="dark"?"is-dark":""}`),onClose:l,closeOnOutsideClick:i,isMobilePopup:u,ariaLabel:r||t("tooltip.textbox","\uBCF8\uBB38"),children:_}):n.jsx("div",{className:le(`text-box-tooltip ${c==="dark"?"is-dark":""}`),children:_})}function Wc({state:e="disabled"}){const{t}=_e.useTranslation();return n.jsxs("div",{className:`ts-bullet ts-bullet--${e}`,"aria-hidden":!0,children:[n.jsx("div",{className:"bullet__dot",children:n.jsx(nt,{icon:"chevron-right",label:t("training.next","\uB2E4\uC74C"),className:"bullet__icon",imgClassName:"bullet__icon-img",maskClassName:"bullet__icon-mask",svgClassName:"bullet__icon-svg",wrapperStyle:{},size:20})}),n.jsx("div",{className:"ts-bullet__line"})]})}function Hc(e,t,a){const r=o.useRef(t),s=o.useRef(a);o.useEffect(()=>{r.current=t,s.current=a}),o.useEffect(()=>{if(!e||typeof document>"u")return;let l=null,i=10;const u=()=>{l=null;const c=r.current(),d=c?Array.from(c.querySelectorAll(kn)).find(h=>!h.closest('[aria-hidden="true"]')):void 0;if(d){try{d.focus()}catch{}if(document.activeElement===d)return}--i>0&&(l=requestAnimationFrame(u))};return l=requestAnimationFrame(u),()=>{l!==null&&cancelAnimationFrame(l);const c=document.activeElement;if(!c||c===document.body||!document.contains(c)||c.closest(".tooltip__content")){const d=s.current();if(d)try{d.focus()}catch{}}}},[e])}function Vc({title:e,children:t,className:a="",state:r="disabled",usePreviewTextBtn:s=!1,onPreviewTextBtn:l,previewText:i=null,useFaded:u,usePlayAllBtn:c=!1,onPlayAll:d,playAllActive:h=!1}){const{t:p}=_e.useTranslation(),m=bn("(max-width: 767px)"),g=`training-step__title h4 ${u&&r==="disabled"?"training-step__title--faded":""} ${a}`.trim(),y=`training-step__title-row training-step__title-row--${r}`.trim(),C=o.useRef(null),[b,v]=o.useState(!1),[f,B]=o.useState(null),[_,N]=o.useState(null);Hc(b&&!!f,()=>{if(typeof document>"u")return null;const k=Array.from(document.querySelectorAll(".tooltip__content"));for(let A=k.length-1;A>=0;A--)if(k[A].querySelector(".text-box-tooltip__root"))return k[A];return null},()=>C.current?.querySelector("button")??null);const x=o.useRef(l);o.useEffect(()=>{x.current=l});const E=o.useMemo(()=>i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)&&i.every(k=>typeof k=="string"||typeof k=="number")?i.join(""):"",[i]),w=o.useCallback(()=>{v(!1),B(null),N(null)},[]);o.useEffect(()=>{if(!b)return;let k;try{typeof x.current=="function"&&(k=x.current())}catch{}if(k===!1){w();return}N(typeof k<"u"&&k!==null?k:null)},[E]);const D=o.useCallback(()=>{let k;try{typeof l=="function"&&(k=l())}catch{}if(k!==!1){if(N(typeof k<"u"&&k!==null?k:i),!C.current){v(A=>!A);return}if(b)v(!1),B(null),N(null);else{const A=C.current.getBoundingClientRect();B(A),v(!0)}}},[l,i,b]);return n.jsxs("div",{className:y,children:[n.jsx("p",{className:g,children:n.jsx("span",{className:"training-step__title-text",children:e??t})}),s||c?n.jsxs("div",{className:"title-controls",children:[n.jsxs("div",{className:"title-buttons",children:[c&&n.jsx(be,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"play-circle",label:m?void 0:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),ariaLabel:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),selected:h,onClick:d,variant:r==="disabled"?"disabled":"default",disabled:r==="disabled"||h,onDisabledClick:h&&r!=="disabled"?()=>{}:void 0}),s&&n.jsx("div",{ref:C,children:n.jsx(be,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"eye",label:m?void 0:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),onClick:D,className:b?"is-selected":void 0,"aria-expanded":b,"aria-haspopup":"dialog",variant:r==="disabled"?"disabled":"default",disabled:!i&&typeof l!="function"})})]}),b&&n.jsx(Nr,{text:_??i,label:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:f,onClose:w,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function vs(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function na({index:e,stepIndex:t,isLast:a=!1,title:r="",titleProps:s={},children:l,className:i="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:d}){const{t:h}=_e.useTranslation(),[p,m]=o.useState(()=>vs(e,t));o.useEffect(()=>{const x=vs(e,t);if(x!==p){const E=setTimeout(()=>m(x),0);return()=>clearTimeout(E)}},[e,t,p]);const g=o.useCallback((...x)=>{vs(e,t)==="done"||p==="done"||typeof u=="function"&&u(...x)},[e,t,p,u]),[y,C]=o.useState(!1),[b,v]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),f=o.useCallback(x=>{if(!x)return null;try{const E=x;if(typeof x=="object"&&(E.currentTarget||E.target)&&(E.nativeEvent||E.type)){const k=E.currentTarget??E.target;if(k&&typeof k.getBoundingClientRect=="function")return k.getBoundingClientRect()}if(x instanceof DOMRect)return x;const w=x;if(w&&typeof w.getBoundingClientRect=="function")return w.getBoundingClientRect();const D=x?.current;return D&&typeof D.getBoundingClientRect=="function"?D.getBoundingClientRect():null}catch{return null}},[]),B=o.useCallback((x,{text:E="",label:w="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:D=!1,alignX:k="center",alignY:A="top"}={})=>{const R=f(x);v({text:E,label:w,anchorRect:R,backdrop:D,alignX:k,alignY:A}),C(!0)},[f]),_=o.useCallback(()=>{C(!1),v(x=>({...x,anchorRect:null}))},[]),N=o.Children.map(l,x=>{if(o.isValidElement(x)){const E=x;if(typeof E.type=="string")return E;const w=E.props??{},D=typeof w.onDone=="function"?w.onDone:g,k=typeof w.disabled=="boolean";let A=p==="disabled";return k&&(A=!!w.disabled),o.cloneElement(E,{onDone:D,disabled:A,showTooltip:B,hideTooltip:_})}return x});return n.jsxs("div",{className:`training-step training-step--${p} ${a?"training-step--last":""} ${i}`,"aria-current":p==="active",children:[n.jsx(Wc,{state:p}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(Vc,{state:p,title:r,...s,useFaded:c}),p==="disabled"&&d&&typeof e=="number"&&typeof t=="number"&&e===t+1&&n.jsx("p",{className:"training-step__locked-hint caption-1",role:"status",children:d}),N]}),y?n.jsx(vn,{anchorRect:b.anchorRect,backdrop:b.backdrop,onClose:_,ariaLabel:h("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(Nr,{text:b.text,onClose:_})}):null]})}function qc({context:e,state:t="disabled",theme:a="light"}){const{t:r}=_e.useTranslation(),[s,l]=o.useState("disabled"),[i,u]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||a}catch{return a}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",i)}catch{}},[i]);const c=()=>u($=>$==="dark"?"light":"dark"),{increase:d,decrease:h,canIncrease:p,canDecrease:m,fontSize:g,lineHeight:y}=Pi({storageKey:"textbox_fontScale"}),[C,b]=o.useState(""),v=o.useRef(null),f=o.useRef(!1),B=o.useCallback(()=>{f.current=gr()&&!!v.current&&v.current.contains(document.activeElement),l("active")},[]),_=o.useCallback(()=>b(""),[]),N=$=>{try{b($)}catch{}},x=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(t!=="disabled"){const $=setTimeout(()=>l(t),0);return()=>clearTimeout($)}},[t]);const E=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[w,D]=o.useState(E);w!==E&&(D(E),l("disabled"));const k=t==="disabled"?s:t,A=k==="disabled"?"training-text-box--disabled":k==="active"?"training-text-box--active":k==="done"?"training-text-box--done":"",R=o.useMemo(()=>({fontSize:`${g}px`,lineHeight:`${y}px`}),[g,y]);return o.useEffect(()=>{if(k==="disabled"||!f.current)return;f.current=!1;const $=document.activeElement;$&&$!==document.body||v.current?.querySelector(".training-text-box__buttons button")?.focus()},[k]),n.jsxs("div",{ref:v,className:`training-text-box ${A} ${k!=="disabled"&&i==="dark"?"is-dark":""}`,children:[k==="disabled"&&n.jsx("div",{className:"training-text-box__preview",children:n.jsx(be,{htmlType:"button",size:48,type:"bar",onClick:B,icon:"eye",ariaLabel:r("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),label:r("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),useBorder:!1})}),n.jsx("div",{className:"training-text-box__area","aria-hidden":k==="disabled",children:n.jsx("span",{className:"training-text-box__inner h3",style:R,children:E})}),k!=="disabled"&&n.jsxs("div",{className:"training-text-box__buttons","aria-hidden":k==="disabled",children:[n.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:h,onDisabledClick:()=>N(r("training.fontSizeMin","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.")),ariaLabel:r("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),icon:"minus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!m,useBorder:!1,showTooltipInfo:!0,...!x&&{width:"60px"}}),n.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:d,onDisabledClick:()=>N(r("training.fontSizeMax","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.")),ariaLabel:r("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),icon:"plus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!p,useBorder:!1,showTooltipInfo:!0,...!x&&{width:"60px"}}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:i==="dark"?"moon":"sun-medium",onClick:c,ariaLabel:r("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:i==="dark"?"transparent-white":"transparent-gray"})]}),n.jsx(ba,{message:C,position:"top",onClose:_})]})}function aa(e){return e==="active"||e==="done"}function _s({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,useTitleFaded:l,onDone:i,onChange:u,answer:c,wrongAnswers:d,choices:h,multiSelect:p=!1,correctCount:m=0,useDisabledCovered:g=!1,choiceIcons:y,shuffleChoices:C=!0}){const{t:b}=_e.useTranslation(),v=s??b("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),f=typeof e=="number"?e:-1,B=typeof t!="number"?"disabled":f<t?"done":f===t?"active":"disabled",_=Array.isArray(h)&&h.length?h:typeof c<"u"?[c].concat(Array.isArray(d)?d:[]):void 0,N=d?d.join("||"):"",x=h?h.join("||"):"",[E,w]=o.useState(()=>Array.isArray(_)?C?La(_):_.slice():void 0);o.useEffect(()=>{Array.isArray(_)&&_.length?w(C?La(_):_.slice()):w(void 0)},[c,N,x,C]);const[D,k]=o.useState(null),[A,R]=o.useState(()=>new Set);o.useEffect(()=>{k(null),R(new Set)},[x,c,N]);const $=o.useRef(void 0);o.useEffect(()=>{const P=$.current;typeof P=="number"&&typeof t=="number"&&typeof e=="number"&&P>=e&&t<e&&(k(null),R(new Set)),$.current=t},[t,e]);const G=o.useCallback(P=>{if(!aa(B))return;const L=E?.[P];if(L==null)return;const Q=L;if(p){const Z=new Set(A);Z.has(Q)?Z.delete(Q):Z.add(Q),R(Z),typeof u=="function"&&u({selectedValues:[...Z],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...Z],__ts:Date.now()})}else k(Q),typeof u=="function"&&u({selectedIndex:P,selectedValue:Q,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:P,selectedValue:Q,__ts:Date.now()})},[E,B,p,u,A]),T=`training-step__buttons${Array.isArray(E)&&E.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:v,useTitleFaded:l,children:n.jsx("div",{className:T,children:Array.isArray(E)&&E.length>0?E.map((P,L)=>n.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:()=>G(L),ariaLabel:String(P),label:P,useLabel:!0,icon:y?y[String(P)]:void 0,variant:"default",disabled:B==="disabled",selected:p?A.has(P):D===P,useDisabledCovered:g,minWidth:0},String(P))):null})})}function xs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u,demoSelected:c}){const{t:d}=_e.useTranslation(),h=s??d("training.confirmTitle","\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694."),p=typeof e=="number"?e:-1,m=typeof t!="number"?"disabled":p<t?"done":p===t?"active":"disabled",g=u&&typeof u=="object"?u.sentence||"":typeof u=="string"?u:"",y=u&&typeof u=="object"?u.choices:void 0,[C,b]=o.useState(c??null),v=`${String(g)}\0${JSON.stringify(y??null)}`,[f,B]=o.useState(v);f!==v&&(B(v),c==null&&b(null));const[_,N]=o.useState(c);Object.is(_,c)||(N(c),b(c??null));const x=o.useRef(void 0);o.useEffect(()=>{const k=x.current;typeof k=="number"&&typeof t=="number"&&typeof e=="number"&&k>=e&&t<e&&c==null&&b(null),x.current=t},[t,e,c]);const E=o.useCallback(k=>{const A=typeof k=="object"&&k!==null?Object.assign({},k,{__ts:Date.now()}):{value:k,__ts:Date.now()};typeof i=="function"&&i(A),aa(m)&&typeof l=="function"&&l(A)},[i,m,l]),w=o.useCallback(()=>{aa(m)&&(b(!1),E(!1))},[E,m]),D=o.useCallback(()=>{aa(m)&&(b(!0),E(!0))},[E,m]);return n.jsxs(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:h,onDone:l,useTitleFaded:!1,children:[n.jsx(qc,{context:u,state:m}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(y)&&y.length>0?y.slice(0,6).map((k,A)=>n.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:()=>{aa(m)&&(b(A),E&&E(A))},disabled:m==="disabled",ariaLabel:String(k),label:k,variant:m,selected:C===A},A)):n.jsxs(n.Fragment,{children:[n.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:w,disabled:m==="disabled",icon:"x",ariaLabel:d("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),label:d("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!1}),n.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:D,disabled:m==="disabled",icon:"circle",ariaLabel:d("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),label:d("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!0})]})})]})}function ws({index:e,stepIndex:t,isLast:a=!1,title:r,onDone:s,btnLabel:l,soundSrc:i,bucketPath:u,usePreviewTextBtn:c,previewText:d=null,onPreviewTextBtn:h,disabled:p,_pageIndex:m,showSoundWaveForm:g,showNoiseWaveForm:y,leadInMs:C,tailMs:b}){const{t:v}=_e.useTranslation(),f=r??v("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),B=p??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(na,{index:e,stepIndex:t,isLast:a,title:f,onDone:s,titleProps:{usePreviewTextBtn:c,previewText:d,onPreviewTextBtn:h},children:n.jsx(ys,{soundSrc:i,ttsText:i?null:d??f,bucketPath:u,btnLabel:l||v("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:B,className:"training-step__listen-sticky",showSoundWaveForm:g,showNoiseWaveForm:y,leadInMs:C,tailMs:b},`audio-p${m??0}-s${e}`)})}const ix=[];function Bs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=ix}){const{t:c}=_e.useTranslation(),d=s??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),h=U=>typeof U=="string"?U:U&&(U.context||U.sentence||U.question||"")||"",[p,m]=o.useState(Array.isArray(u)?u:[]),[g,y]=o.useState(()=>(p||[]).map((U,S)=>({id:S,text:h(U)}))),C=o.useMemo(()=>typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled",[t,e]),b=C!=="disabled",v=o.useRef(void 0),f=o.useRef(void 0);o.useEffect(()=>{if(v.current===u)return;v.current=u;const U=Array.isArray(u)?u:[];m(U);const S=(I=>{const O=(I||[]).map((de,ee)=>({id:ee,text:h(de)}));if(O.length<=1)return O;const z=(de,ee)=>{if(de.length!==ee.length)return!1;for(let V=0;V<de.length;V++)if(de[V].text!==ee[V].text)return!1;return!0};let se=La(O),te=0;for(;z(se,O)&&te<20;)se=La(O),te+=1;return se})(U);y(S);try{if(typeof i=="function"){const I=S.filter((O,z)=>O.text===h(U[z])).length;i({shuffled:S,score:I,total:(U||[]).length,initial:!0,__ts:Date.now()})}if(typeof l=="function"&&C==="active"){const I=S.filter((O,z)=>O.text===h(U[z])).length;f.current=u,l({shuffled:S,score:I,total:(U||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(C!=="active"||f.current===u||(f.current=u,typeof l!="function"))return;const U=Array.isArray(u)?u:[],S=g.filter((I,O)=>I.text===h(U[O])).length;l({shuffled:g,score:S,total:U.length,initial:!0,__ts:Date.now()})},[C,u]);const B=(U,S)=>{const I=[...g],O=U+S;if(O<0||O>=I.length)return;const z=I[O];I[O]=I[U],I[U]=z,Q(I);try{if(typeof l=="function"&&C==="active"){const se=I.filter((te,de)=>te.text===h(p[de])).length;l({shuffled:I,score:se,total:(p||[]).length,__ts:Date.now()})}}catch{}},[_,N]=o.useState(null),x=o.useRef(null),E=o.useRef(null),w=o.useRef(null),D=o.useRef(null),k=o.useRef(null),A=o.useRef({x:0,y:0}),R=o.useRef(null),$=o.useRef({dx:0,dy:0}),G=()=>{if(R.current!==null)return;const U=()=>{if(!x.current){R.current=null;return}R.current=requestAnimationFrame(U);const S=A.current,I=$.current||{dx:0,dy:0};x.current&&(x.current.style.transform=`translate3d(${S.x-I.dx}px, ${S.y-I.dy}px, 0)`)};R.current=requestAnimationFrame(U)},T=o.useRef(new Map),P=o.useRef(new Map),L=()=>{const U=new Map;return T.current.forEach((S,I)=>{S&&S.getBoundingClientRect&&U.set(I,S.getBoundingClientRect())}),U},Q=U=>{const S=L();y(U);try{if(typeof i=="function"){const I=U.filter((O,z)=>O.text===h(p[z])).length;i({shuffled:U,score:I,total:(p||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const I=L();U.forEach(O=>{const z=S.get(O.id),se=I.get(O.id),te=T.current.get(O.id);if(!te||!z||!se)return;const de=z.top-se.top;de&&(te.style.transition="none",te.style.transform=`translateY(${de}px)`,requestAnimationFrame(()=>{te.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",te.style.transform="";const ee=()=>{te.style.transition="",te.removeEventListener("transitionend",ee)};te.addEventListener("transitionend",ee)}))})})},Z=(U,S)=>{try{try{S.dataTransfer?.setData("text/plain",String(U))}catch{}try{S.dataTransfer&&(S.dataTransfer.effectAllowed="move")}catch{}try{const I=document.createElement("div");I.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(I),S.dataTransfer?.setDragImage(I,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(I)}catch{}})}catch{}}catch{}N(U);try{const I=g[U],O=document.createElement("div");O.className="order-list__dragging-object order-list__dragging-object--visible",O.textContent=I&&I.text?I.text:"",document.body.appendChild(O),x.current=O;const z=T.current.get(I.id);let se=S.clientX||0,te=S.clientY||0;try{if(z&&z.getBoundingClientRect){const H=z.getBoundingClientRect();se=H.left+H.width/2,te=H.top+H.height/2}}catch{}const de=O.getBoundingClientRect(),ee=de.width/2,V=de.height/2;$.current={dx:ee,dy:V},O.style.transition="none",A.current={x:se,y:te},O.style.transform=`translate3d(${se-ee}px, ${te-V}px, 0)`,requestAnimationFrame(()=>{try{O.style.transition=""}catch{}G()});const ne=H=>{const ie=H;A.current={x:ie.clientX,y:ie.clientY},G()};w.current=ne,document.addEventListener("mousemove",ne);const W=H=>{const ie=H;A.current={x:ie.clientX,y:ie.clientY},G()};E.current=W,document.addEventListener("dragover",W);try{S.dataTransfer?.setData("text/plain",String(U));try{S.dataTransfer?.setData("application/json",JSON.stringify({idx:U}))}catch{}}catch{}}catch{}},F=(U,S)=>{S.preventDefault();try{S.dataTransfer&&(S.dataTransfer.dropEffect="move")}catch{}try{k.current!==null&&(clearTimeout(k.current),k.current=null);const I=S.currentTarget&&S.currentTarget.closest?S.currentTarget.closest(".order-list__item"):null;if(I&&D.current!==I){if(D.current)try{D.current.classList.remove("drag-over")}catch{}try{I.classList.add("drag-over")}catch{}D.current=I}}catch{}},K=(U,S)=>{S.preventDefault();const I=S.dataTransfer?.getData("text/plain")||"",O=I?parseInt(I,10):_,z=U;if(typeof O!="number"||isNaN(O)||O===z){N(null),Y(),M();return}const se=Bf(g,O,z);Q(se),N(null),M();try{if(typeof l=="function"&&C==="active"){const te=se.filter((de,ee)=>de.text===h(p[ee])).length;l({shuffled:se,score:te,total:(p||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const te=document.querySelectorAll(".order-list .order-list__item")[z];if(!te)return;const de=te.querySelector(".order-list__slot")||te;try{de.classList.add("pulse"),de.offsetHeight,de.classList.add("to-dark");const ee=()=>{de.classList.remove("pulse","to-dark"),de.removeEventListener("transitionend",ee)};de.addEventListener("transitionend",ee)}catch{}})}catch{}Y()},M=()=>{if(x.current){try{document.body.removeChild(x.current)}catch{}x.current=null}E.current&&(document.removeEventListener("dragover",E.current),E.current=null),w.current&&(document.removeEventListener("mousemove",w.current),w.current=null),R.current!==null&&(cancelAnimationFrame(R.current),R.current=null)},q=()=>{N(null),Y(),M()};o.useEffect(()=>()=>M(),[]);const Y=()=>{try{if(k.current!==null&&(clearTimeout(k.current),k.current=null),D.current){try{D.current.classList.remove("drag-over")}catch{}D.current=null}document.querySelectorAll(".order-list .order-list__item").forEach(U=>U.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const U=Math.max(1,(g||[]).length);g.forEach((S,I)=>{const O=P.current.get(S.id);if(!O)return;let z=50;U>1&&(z=Math.round(I/(U-1)*100));try{O.style.setProperty("--marker-pos",z+"%")}catch{}})}catch{}},[g]),o.useEffect(()=>()=>{M(),k.current!==null&&(clearTimeout(k.current),k.current=null)},[]),n.jsx(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:d,children:n.jsx("div",{className:"order-list",children:g.map((U,S)=>{const I=Math.max(1,(g||[]).length),O=I>1?Math.round(S/(I-1)*100):50;return n.jsx("div",{className:"order-list__item",children:n.jsxs("div",{className:"order-list__slot","data-disabled":C==="disabled","aria-disabled":C==="disabled",children:[C!=="disabled"?n.jsx("div",{className:"order-list__marker caption-1",style:{"--marker-pos":O+"%"},ref:z=>{const se=P.current;z?se.set(U.id,z):se.delete(U.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:S+1})}):null,n.jsxs("div",{ref:z=>{const se=T.current;z?se.set(U.id,z):se.delete(U.id)},className:`order-list__draggable ${_===S?"dragging":""}`,"data-disabled":C==="disabled","aria-disabled":C==="disabled",tabIndex:C==="disabled"?-1:0,draggable:b,onDragStart:b?z=>Z(S,z):void 0,onDragEnter:b?z=>F(S,z):void 0,onDragOver:b?z=>F(S,z):void 0,onDragLeave:b?()=>{try{k.current!==null&&clearTimeout(k.current),k.current=setTimeout(()=>{try{const z=document.querySelectorAll(".order-list .order-list__item");z&&z[S]&&(z[S].classList.remove("drag-over"),D.current===z[S]&&(D.current=null))}catch{}},80)}catch{}}:void 0,onDrop:b?z=>K(S,z):void 0,onDragEnd:b?q:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:U.text}),b?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:()=>B(S,-1),ariaLabel:c("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:S===0,useBorder:!1,useDisabledInvisible:!0}),n.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:()=>B(S,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:S===g.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},U.id)})})})}const ux=8e3;function cx(e,t){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.then(s,s),setTimeout(s,t)})}function Uc({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=[],selectable:c=!1,hideLabel:d=!1,hideAudio:h=!1,maxCards:p,playAllGapMs:m=0}){const{t:g}=_e.useTranslation(),y=s??g("training.cardInstructions","\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694."),C=o.useMemo(()=>Array.isArray(u)?u:u&&u.items||[],[u]),b=p??3,v=(C||[]).slice(0,b);(C||[]).length>b&&console.warn(`TrainingStepCard: ${C.length} items passed but only ${b} shown`);const f=typeof e=="number"?e:-1,B=typeof t!="number"?"disabled":f<t?"done":f===t?"active":"disabled",[_,N]=o.useState(null),x=o.useRef([]),[E,w]=o.useState(!1),D=o.useRef(null),k=o.useRef(!0);o.useEffect(()=>(k.current=!0,()=>{k.current=!1}),[]);const A=o.useMemo(()=>C.map(L=>L?.id??L?.word??"").join("|"),[C]);o.useEffect(()=>{N(null)},[A]);const R=o.useRef(void 0);o.useEffect(()=>{const L=R.current;typeof L=="number"&&typeof t=="number"&&typeof e=="number"&&L>=e&&t<e&&N(null),R.current=t},[t,e]);const $=o.useCallback((L,Q)=>{if(c)return;const Z={item:L,index:Q,__ts:Date.now()};try{typeof i=="function"&&i(Z)}catch{}if(B==="active"&&typeof l=="function")try{l(Z)}catch{}},[c,i,B,l]),G=o.useRef(m);o.useEffect(()=>{G.current=Math.max(0,m||0)},[m]);const T=o.useCallback(async()=>{if(E||B==="disabled")return;w(!0);let L=!1;const Q=new Promise(Z=>{D.current=()=>{L=!0,Z()}});try{for(let Z=0;Z<v.length&&!(!k.current||L);Z++){const F=x.current[Z];if(!F)continue;await Promise.race([cx(F.play(),ux),Q]);const K=Math.max(0,G.current||0);K>0&&Z<v.length-1&&!L&&k.current&&await Promise.race([new Promise(M=>{setTimeout(M,K)}),Q])}}finally{D.current=null,w(!1)}},[E,B,v.length]),P=o.useCallback((L,Q)=>{if(!aa(B))return;N(Q);const Z={selectedValue:L.word||L.title||"",selectedIndex:Q,item:L,__ts:Date.now()};try{typeof i=="function"&&i(Z)}catch{}if(typeof l=="function")try{l(Z)}catch{}},[i,B,l]);return n.jsx(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:y,onDone:l,titleProps:{usePlayAllBtn:!h&&v.length>0,onPlayAll:T,playAllActive:E},children:n.jsx("div",{className:"training-step__cards",onClickCapture:L=>{const Q=D.current;if(!Q)return;const Z=L.target;Z&&typeof Z.closest=="function"&&Z.closest(".training-word-card__bottom")&&Q()},children:v.length===0?n.jsx("div",{className:"training-step__empty",children:g("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):v.map((L,Q)=>n.jsx(Qo,{ref:Z=>{x.current[Q]=Z},item:L,disabled:B==="disabled",onPlayDone:()=>$(L,Q),selectable:c,selected:c&&_===Q,onSelect:c?()=>P(L,Q):void 0,flipDelay:Q*120,hideLabel:d,hideAudio:h},L&&L.id||Q))})})}const dx=160,Gc=()=>{};function Rn(e){const t=o.useId();if(!("variant"in e)){const{label:f,sub:B,onClick:_,children:N,align:x="horizontal",icon:E,useFullWidth:w=!1}=e,D=k=>{_&&k.target===k.currentTarget&&(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),_())};return n.jsxs("div",{className:we("panel-row",x==="vertical"?"panel-row--vertical":"",w?"panel-row--label-fixed panel-row--fill":"",_?"panel-row--clickable":""),onClick:_,onKeyDown:_?D:void 0,role:_?"button":void 0,tabIndex:_?0:void 0,children:[E!=null&&n.jsx("div",{className:"panel-row__icon",children:E}),f!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsx("div",{className:"panel-row__label body-3",children:f}),B&&n.jsx("div",{className:"panel-row__sub caption-1",children:B})]}),n.jsx("div",{className:"panel-row__right",children:N})]})}if(e.variant==="description")return n.jsx("div",{className:"panel-row panel-row--block",children:n.jsx("p",{className:"panel-row__description body-3",children:e.children})});if(e.variant==="empty")return n.jsx("div",{className:"panel-row panel-row--empty body-3",children:e.children});if(e.variant==="loading")return n.jsx("div",{className:"panel-row panel-row--loading",children:n.jsx(da,{size:28})});if(e.variant==="custom"&&!e.label)return n.jsx("div",{className:"panel-row panel-row--block",children:e.children});const{variant:a,label:r,sub:s,onClick:l,required:i,error:u,align:c="horizontal",useFullWidth:d=!1,icon:h}=e,p=a==="button"?void 0:l;let m=null;const g=a==="toggle"?`panel-toggle-${t}`:void 0,y=u?`panel-error-${t}`:void 0,C=`panel-helper-${t}`;if(a==="toggle"){const f=e;m=n.jsx(Bu,{checked:f.checked,onChange:f.onChange,id:g})}else if(a==="segmented"){const f=e;m=n.jsx(An,{options:f.options,value:f.value,onChange:f.onChange,size:f.size??40,ariaLabel:r})}else if(a==="dropdown"){const f=e,B=f.dropdowns?.length?n.jsx("div",{className:`panel-row__dropdown-group${d?" panel-row__dropdown-group--full":""}`,children:f.dropdowns.map((_,N)=>n.jsx("div",{className:d?"panel-row__dropdown-item--full":void 0,children:n.jsx(gn,{options:_.options,value:_.value,onChange:_.onChange,placeholder:_.placeholder,block:d,error:!!u,ariaDescribedBy:y,ariaLabel:_.ariaLabel??([r,_.placeholder].filter(Boolean).join(" ")||void 0)})},N))}):n.jsx(gn,{options:f.options??[],value:f.value??"",onChange:f.onChange??Gc,block:d,error:!!u,ariaLabel:r,ariaDescribedBy:y});m=u?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[B,n.jsx("span",{id:y,className:"caption-1 panel-row__error",role:"alert",children:u})]}):B}else if(a==="button"){const f=e;f.buttons?.length?m=n.jsx("div",{className:"panel-row__button-group",children:f.buttons.map((B,_)=>n.jsx(be,{htmlType:"button",size:B.btnSize??40,variant:B.btnVariant??"default",disabled:B.disabled,onClick:B.onClick,children:B.label},_))}):m=n.jsx(be,{htmlType:"button",size:f.btnSize??40,variant:f.btnVariant??"default",disabled:f.disabled,onClick:f.onClick,children:f.buttonLabel})}else if(a==="text"){const f=e;m=n.jsx("span",{className:`panel-row__text body-2${d?" panel-row__text--full":""}`,style:f.valueColor?{color:f.valueColor}:void 0,children:f.value})}else if(a==="input"){const f=e;m=n.jsxs("div",{className:`panel-row__input-wrap${d?" panel-row__input-wrap--full":""}`,children:[n.jsx(Jn,{value:f.value,onChange:f.onChange??Gc,onKeyDown:f.onKeyDown,onEnter:f.onEnter,placeholder:f.placeholder,ghostText:f.ghostText,inputMode:f.inputMode,readOnly:f.readOnly,disabled:f.disabled,type:f.type,autoComplete:f.autoComplete,maxLength:f.maxLength,showCount:f.showCount,multiline:f.multiline,rows:f.rows,fullWidth:d,error:u,ariaLabel:r,required:i,ariaDescribedBy:f.helperText?C:void 0}),f.helperText&&n.jsx("div",{id:C,className:"panel-row__helper caption-1",children:f.helperText})]})}else a==="custom"&&(m=e.children);u&&a!=="input"&&a!=="dropdown"&&(m=n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[m,n.jsx("span",{id:y,className:"caption-1 panel-row__error",role:"alert",children:u})]}));const b=a==="input"||a==="dropdown"||(a==="text"||a==="custom")&&d,v=f=>{p&&f.target===f.currentTarget&&(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),p())};return n.jsxs("div",{className:we("panel-row",c==="vertical"?"panel-row--vertical":"",b?"panel-row--label-fixed":"",a==="text"?"panel-row--text":"",p?"panel-row--clickable":""),onClick:p,onKeyDown:p?v:void 0,role:p?"button":void 0,tabIndex:p?0:void 0,children:[h!=null&&n.jsx("div",{className:"panel-row__icon",children:h}),n.jsxs("div",{className:"panel-row__left",children:[g?n.jsxs("label",{htmlFor:g,className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}):n.jsxs("div",{className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}),s&&n.jsx("div",{className:"panel-row__sub caption-1",children:s})]}),n.jsx("div",{className:"panel-row__right",children:m})]})}function Kc(e){const t=e.productName||e.brand,a=[e.brand,e.fitType].filter(r=>!!r&&r!==t);return[...new Set(a)].join(" \xB7 ")}function px({devices:e,onRelease:t,emptyLabel:a}){const{t:r,i18n:s}=_e.useTranslation();return n.jsx("div",{className:"panel-row panel-row--device",children:["left","right"].map(l=>{const i=e[l],u=l==="left"?r("device.direction.left","\uC88C"):r("device.direction.right","\uC6B0");return n.jsxs("div",{className:"panel-row__device-column",children:[n.jsxs("div",{className:"panel-row__device-head",children:[n.jsx("span",{className:"panel-row__device-side body-2b",children:u}),i&&t&&n.jsx(be,{htmlType:"button",size:32,type:"dot",icon:"x",ariaLabel:`${u} ${r("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C")}`,showTooltipInfo:r("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"),onClick:()=>t(l)})]}),i?n.jsxs("div",{className:"panel-row__device-info",children:[n.jsxs("span",{className:"panel-row__device-kind",children:[i.device&&n.jsx(jt,{size:"small",variant:Uu(i.device),fill:"soft",label:Gu(i.device,r)}),Kc(i)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:Kc(i)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),Zo(i.wornYear,i.wornMonth,i.wornDay,s.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:r("customers.device.wornSince",{date:Zo(i.wornYear,i.wornMonth,i.wornDay,s.language)})})]}):n.jsx("span",{className:"panel-row__device-empty body-3",children:a??r("customers.device.notRegistered","\uBBF8\uB4F1\uB85D")})]},l)})})}function Er({title:e,titleLevel:t=2,icon:a,disc:r,actions:s,size:l="medium",minHeight:i,maxWidth:u,className:c,scrollable:d,scrollbarGutter:h="auto",compactRows:p=!1,useBorder:m=!0,useBg:g=!0,useRowBorder:y=!0,labelWidth:C,form:b=!1,loading:v,empty:f,children:B}){const _=we("panel",`panel--${l}`,b?"panel--form":"",i!==void 0?"panel--fill":"",m?"":"panel--no-border",g?"":"panel--no-bg",y?"":"panel--no-row-border",p?"panel--compact-rows":"",c),N={};i!==void 0&&(N.minHeight=i),u!==void 0&&(N.maxWidth=typeof u=="number"?`${u}px`:u),C!==void 0&&(N["--panel-label-width"]=typeof C=="number"?`${C}px`:C);const x=t?`h${t}`:"div";return n.jsxs("div",{className:_,style:Object.keys(N).length?N:void 0,children:[(!!e||r!=null)&&n.jsxs("div",{className:we("panel__header",r!=null?"panel__header--with-disc":""),children:[a&&n.jsx(nt,{icon:a,label:typeof e=="string"?e:void 0,className:"panel__icon"}),n.jsxs("div",{className:"panel__title-group",children:[!!e&&n.jsx(x,{className:`panel__title ${r!=null?"body-3b":"h5b"}`,children:e}),r!=null&&n.jsx("p",{className:"panel__disc caption-1",children:r})]}),s&&n.jsx("div",{className:"panel__actions",children:s})]}),v?n.jsx(Rn,{variant:"loading"}):f!=null&&o.Children.toArray(B).length===0?n.jsx(Rn,{variant:"empty",children:f}):d?n.jsx("div",{className:we("panel__body--scroll",h==="stable"&&"panel__body--gutter-stable"),children:B}):B]})}function hx({cols:e=2,layout:t="grid",gap:a=1,collapseAt:r,className:s,style:l,children:i}){const u=o.useRef(null),[c,d]=o.useState();o.useEffect(()=>{const p=u.current;if(r===void 0||!p||(d(p.clientWidth),typeof ResizeObserver>"u"))return;const m=new ResizeObserver(([g])=>d(g.contentRect.width));return m.observe(p),()=>m.disconnect()},[r]);const h=r!==void 0&&c!==void 0&&c<=r;return n.jsx("div",{ref:u,className:we("panel-grid",t==="columns"&&"panel-grid--columns",s),style:{"--panel-grid-cols":h?1:e,"--panel-grid-gap":typeof a=="number"?`${a}px`:a,...l},children:i})}function mx(e){return[{label:e("training.noise.level.none","\uC5C6\uC74C"),value:0},{label:e("training.noise.level.weak","\uC57D\uD568"),value:1},{label:e("training.noise.level.medium","\uBCF4\uD1B5"),value:2},{label:e("training.noise.level.strong","\uAC15\uD568"),value:3},{label:e("training.noise.level.veryStrong","\uB9E4\uC6B0 \uAC15\uD568"),value:4}]}function Yc(e){return[{label:e("training.noise.type.default","\uAE30\uBCF8"),value:"defaultNoise",icon:"party-popper"},{label:e("training.noise.type.street","\uAE38\uAC70\uB9AC"),value:"street",icon:"car"},{label:e("training.noise.type.buzz","\uC640\uAE00\uC640\uAE00"),value:"buzz",icon:"message-square-more"},{label:e("training.noise.type.restaurant","\uC2DD\uB2F9"),value:"restaurant",icon:"coffee"}]}mx(qt.t.bind(qt)),Yc(qt.t.bind(qt));const Dr="none",Cx=.5,fx=1.5,bx=.25;function ks({title:e,valueLabel:t,value:a,min:r,max:s,step:l,tickStep:i,size:u,disabled:c,onChange:d}){return n.jsxs(Rn,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(Iu,{value:a,onChange:d,min:r,max:s,step:l,size:u,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:c,className:le("noise-settings-tooltip__slider-input")}),n.jsx("div",{className:le(we("noise-settings-tooltip__value","button-1",c?"noise-settings-tooltip__value--disabled":"")),children:t})]})}function Zc({anchorRect:e,onClose:t,hideNoiseRows:a=!1}){const{t:r}=_e.useTranslation(),s=bn("(max-width: 767px)")?40:24,l=wr(),i=tr(l?.settings??ta),u=l?.settings.type??"defaultNoise",c=l?.settings.enabled??!0,d=l?.playbackRate??1,h=l?.mainVolume??1,p=Math.round(h*100),m=o.useCallback(v=>{try{l?.setMainVolume(Math.max(0,Math.min(1,v/100)))}catch{}},[l]),g=o.useCallback(v=>{try{l?.setPlaybackRate(v)}catch{}},[l]),y=o.useCallback(v=>{const f=Math.min(er,Math.max(0,Math.round(v*10)/10));try{l?.setSettings({noiseRatio:f})}catch{}},[l]),C=o.useCallback(v=>{try{v===Dr?l?.setSettings({enabled:!1}):l?.setSettings({type:v,enabled:!0})}catch{}},[l]),b=[{key:Dr,label:r("training.noise.type.none","\uC5C6\uC74C")},...Yc(r).map(v=>({key:v.value,label:v.label}))];return n.jsx(vn,{anchorRect:e,offset:12,onClose:t,ariaLabel:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),isMobilePopup:!1,closeOnOutsideClick:!1,header:n.jsxs("div",{className:le("noise-settings-tooltip__header"),children:[n.jsx("span",{children:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815")}),n.jsx(be,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:r("common.close","\uB2EB\uAE30"),onClick:t})]}),children:n.jsxs(Er,{className:le("noise-settings-tooltip"),useBorder:!1,labelWidth:72,children:[n.jsx(ks,{title:r("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${p}%`,value:p,min:0,max:100,step:10,size:s,onChange:m}),n.jsx(ks,{title:r("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${d.toFixed(2)}x`,value:d,min:Cx,max:fx,step:bx,size:s,onChange:g}),!a&&n.jsxs(n.Fragment,{children:[n.jsx(Rn,{variant:"custom",label:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(An,{ariaLabel:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:b,value:c?u:Dr,onChange:C})}),n.jsx(ks,{title:r("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:r("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:er,step:Dc,size:s,disabled:!c,onChange:y})]}),a&&n.jsx("div",{className:le("noise-settings-tooltip__width-ghost"),"aria-hidden":"true",inert:!0,children:n.jsx(Rn,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(An,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:b,value:Dr,onChange:()=>{}})})})]})})}function Xc({useNoiseSettingBtn:e=!1,onSettings:t,onNext:a,onResult:r,stepIndex:s=0,stepCount:l=0,pageIndex:i=0,pageCount:u=1,resultOpen:c=!1,hideNoiseRows:d=!1}){const{t:h}=_e.useTranslation(),[p,m]=o.useState(!1),[g,y]=o.useState(null),[C,b]=o.useState(!1),v=o.useRef(null),f=o.useRef(null),B=wr(),_=u>0,N=_&&i<u-1,x=!_||i>=u-1,E=s===Math.max(0,l);o.useEffect(()=>{e||(m(!1),y(null))},[e]);const w=o.useCallback(()=>{m(!1),y(null)},[]),D=o.useCallback(()=>{if(p){m(!1),y(null);return}const Q=v?.current?.getBoundingClientRect();Q&&y(Q),t?.(),m(!0)},[p,t]),k=o.useCallback(()=>{if(p){m(!1),y(null);return}const Q=f?.current?.getBoundingClientRect();Q&&y(Q),t?.(),m(!0)},[p,t]),A=bn("(max-width: 767px)"),R=o.useRef(null),[$,G]=o.useState(null),T=o.useCallback(()=>{b(Q=>{const Z=!Q;return G(Z?R.current?.getBoundingClientRect()??null:null),Z})},[]),P=o.useCallback(()=>{b(!1),G(null)},[]);o.useEffect(()=>{c&&(b(!1),G(null))},[c]);const L=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.sentence","\uC7AC\uC0DD")}),n.jsx(Go,{analyser:B?.mainAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.sentence","\uC7AC\uC0DD")})]}),n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.noise","\uC18C\uC74C")}),n.jsx(Go,{analyser:B?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.noise","\uC18C\uC74C")})]})]});return Hc(e&&p,()=>typeof document<"u"?document.querySelector(".noise-settings-tooltip__header")?.closest(".tooltip__content")??null:null,()=>[v.current,f.current].map(Q=>Q?.querySelector("button")??null).find(Q=>!!Q&&Q.getClientRects().length>0)??v.current?.querySelector("button")??null),n.jsxs("div",{className:"pp-bottom",children:[n.jsxs("div",{className:"pp-bottom__left",children:[e?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pp-bottom__settings--desktop",children:n.jsx("div",{ref:v,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(be,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:D,className:p?"is-selected":void 0,"aria-expanded":p,"aria-haspopup":"dialog",ariaLabel:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),label:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),minWidth:140})})}),n.jsx("div",{className:"pp-bottom__settings--mobile",children:n.jsx("div",{ref:f,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(be,{htmlType:"button",size:56,type:"dot",shape:"pill",icon:"settings",onClick:k,className:p?"is-selected":void 0,"aria-expanded":p,"aria-haspopup":"dialog",ariaLabel:h("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:R,className:"pp-bottom__meter-trigger","data-tooltip-ignore":!0,children:n.jsx(be,{htmlType:"button",size:40,type:"dot",shape:"pill",icon:"audio-lines",onClick:T,selected:C,"aria-expanded":A?C:void 0,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&C&&!A&&n.jsx("div",{className:"pp-bottom__meters",children:L})]}),e&&C&&A&&$&&n.jsx(vn,{anchorRect:$,onClose:P,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"),children:n.jsx("div",{className:"pp-bottom__meters pp-bottom__meters--floating",children:L})}),n.jsxs("div",{className:"pp-bottom__right",children:[x&&n.jsx(be,{htmlType:"button",size:56,type:"bar",icon:"check",onClick:typeof r=="function"?r:a,ariaLabel:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),label:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),variant:"main",disabled:!E}),N&&n.jsx(be,{htmlType:"button",size:56,type:"bar",rightIcon:"chevron-right",align:"right",onClick:a,ariaLabel:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),label:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),variant:"main",disabled:!E})]}),e&&p&&n.jsx(Zc,{anchorRect:g,onClose:w,hideNoiseRows:d})]})}function Jc({title:e,subtitle:t,desc:a,depth:r,icon:s,wrapperStyle:l,iconTooltip:i,pageIndex:u,pageCount:c,progressMax:d,progressIndex:h,onBack:p,onClose:m}){const{t:g}=_e.useTranslation(),y=bn("(max-width: 767px)"),C=Number.isInteger(h)?h:u||0,b=Number.isInteger(d)?d:c||0,v=p||m,f=Array.isArray(r)?y?r[r.length-1]:r.join(" / "):r,B=typeof e=="string"?e.trim():e,_=typeof t=="string"?t.trim():t,N=!!(B||_),x=N?B||_:g("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),E=f||(B?t:void 0),w=y&&typeof E=="string"&&(E.includes(" \xB7 ")||E.includes(" / "))?E.split(/\s[·/]\s/).pop():E,D=o.useMemo(()=>{const k=l&&typeof l=="object"?{...l}:{};return!("width"in k)&&!("height"in k)&&(k.width="40px",k.height="40px"),k},[l]);return n.jsxs("header",{className:"pp-title training-popup-title",children:[n.jsxs("div",{className:"pp-title__left",children:[v?n.jsx(be,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:g("common.back","\uB4A4\uB85C"),onClick:v,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:s?n.jsx(Cu,{icon:s,label:e,tooltip:i,wrapperStyle:D}):null}),n.jsxs("div",{className:"pp-title__text",children:[w?n.jsx("span",{className:"pp-title__depth caption-1",children:w}):null,n.jsx("span",{className:`pp-title__title h2${N?"":" pp-title__title--empty"}`,children:x}),a?n.jsx("span",{className:"pp-title__description caption-1",children:a}):null]})]}),n.jsx(Wu,{max:Math.max(0,b??0),index:Math.max(0,C??0)})]})}function gx(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function yx(e){return!e&&e!==0?[]:Array.isArray(e)?e.flatMap(t=>typeof t=="string"?t.split("|").map(a=>a.trim()).filter(Boolean):t||t===0?[String(t)]:[]):typeof e=="string"?e.split("|").map(t=>t.trim()).filter(Boolean):[String(e)]}const Qc=(e,t)=>{if(!t)return t;const a=typeof qt?.t=="function"?qt.t(e,{defaultValue:t}):void 0;return typeof a=="string"&&a?a:t};function ed(e,t,a){const r=e,s=r?.title||r?.name||(Array.isArray(t)?t[t.length-1]:void 0)||a||"\uD6C8\uB828",l=Kl().find(u=>u.key===(r?.category_0||r?.category_main_code)),i=l?.subs?.find(u=>u.key===(r?.category_1||r?.category_sub_code));return{title:s,label:r?.title||s,depth:t,icon:l?.icon,wrapperStyle:l?.color?{"--t-item-fg":l.color}:void 0,iconTooltip:[l?Qc(`topic.${l.key}`,l.label):void 0,i?Qc(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function As(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function td(e,t,a){if(!e||typeof e!="object"||Array.isArray(e))return e;const r=e,s=typeof a=="number"&&a>0?a:Date.now();return{...r,...r.shownAt===void 0&&t?{shownAt:t}:{},...r.answeredAt===void 0?{answeredAt:new Date(s).toISOString()}:{}}}function vx(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function _x({idPrefix:e,trainingData:t,depth:a,fallbackTitle:r="\uD6C8\uB828",pages:s=[],emptyMessage:l,buildResults:i,metaPatch:u}){const c=ed(t,a,r),d=typeof u=="function"?u(c)||{}:u||{},h=t?.id||t?.title||s.length;return{id:`${e}:${h}`,meta:{...c,...d},pages:s,emptyMessage:l,buildResults:i}}function xx(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return t.context||t.sentence||t.question||""||""}return""}function wx(e){if(e&&typeof e=="object"){const t=e;if(Array.isArray(t.selectedValues))return t.selectedValues;if(t.selectedValue!==void 0)return t.selectedValue;if(t.selectedIndex!==void 0)return t.selectedIndex;if(t.value!==void 0)return t.value}return e}function Bx(e,t=[]){if(Array.isArray(e))return e.join(", ");if(typeof e=="number"&&Array.isArray(t))return String(t[e]??"");if(typeof e=="string")return e}function nd(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function kx(e,t,a,r){return nd(e,t*a+r)}function Ax({payload:e,selected:t,choices:a=[],correctAnswers:r=[]}){if(e&&typeof e=="object"){const s=e;if(Array.isArray(s.selectedValues))return r.every(l=>s.selectedValues.includes(l))&&s.selectedValues.every(l=>r.includes(l));if(typeof s.correct=="boolean")return s.correct}if(r.length){if(typeof t=="number"&&Array.isArray(a)&&a.length)return r.some(s=>String(s)===String(a[t]));if(typeof t<"u")return r.some(s=>String(s)===String(t))}}function Nx(e){return e?Array.isArray(e.items)?e.items.map(t=>{const a=t;return typeof t=="string"?{sentence:t}:{sentence:a.context||a.sentence||"",contextCode:a.contextCode||a.context_code}}):Array.isArray(e.sentences)?e.sentences.map(t=>{const a=t;return typeof t=="string"?{sentence:t}:{sentence:a.sentence||a.context||"",contextCode:a.contextCode}}):Array.isArray(e.contexts)?e.contexts:e.contextCode?[{contextCode:e.contextCode}]:[]:[]}const ad=o.createContext(null);function Ex(){const e=o.useContext(ad);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function Dx({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,choices:l=[],onDone:i,onChange:u}){const{t:c}=_e.useTranslation(),d=typeof e=="number"?e:-1,h=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",[p,m]=o.useState(()=>l.map(()=>null)),g=JSON.stringify(l),y=l.length;o.useEffect(()=>{m(Array.from({length:y},()=>null))},[g]);const C=o.useRef(void 0);o.useEffect(()=>{const B=C.current;typeof B=="number"&&typeof t=="number"&&typeof e=="number"&&B>=e&&t<e&&m(Array.from({length:y},()=>null)),C.current=t},[t,e,y]);const b=o.useMemo(()=>p.filter(B=>B!==null).length+1,[p]),v=o.useCallback(B=>{if(!aa(h))return;const _=p;let N;if(_[B]!=null){const E=_[B];N=_.map(w=>w!==null&&w>=E?null:w)}else N=[..._],N[B]=b;m(N);const x={selectedOrder:N,words:l,__ts:Date.now()};try{typeof u=="function"&&u(x)}catch{}if(_[B]==null&&N.length>0&&N.every(E=>E!==null))try{typeof i=="function"&&i(x)}catch{}},[h,p,b,u,i,l]),f=s??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(na,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:f,onDone:i,children:n.jsx("div",{className:"training-step__cards",children:l.map((B,_)=>n.jsx(Qo,{item:{word:B},disabled:h==="disabled",selectable:!0,selected:p[_]!==null,orderRank:p[_],onSelect:()=>v(_),flipDelay:_*120,hideLabel:!1,hideAudio:!0},`${B}-${_}`))})})}function Sr(e){return null}Sr.__isTrainingPage=!0;function wa(e,t){const a=Ex();return{ctx:a,index:e,stepIndex:a.currentStepIndex,isLast:typeof e=="number"&&typeof t=="number"?e===t-1:!1,onDone:r=>a.handleStepDone(r,e),onChange:r=>a.handleStepChange(r,e)}}function rd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i}=wa(e,t);return n.jsx(ws,{...a,index:r,stepIndex:s,isLast:l,onDone:i})}function od({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(_s,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function sd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(xs,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function ld({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(Bs,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function id({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(Uc,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function Sx({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=wa(e,t);return n.jsx(Dx,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}const ud=3e4,jx=/^(https?:|blob:|data:audio|\/|\.\/)/;function cd(e){return typeof e=="string"&&jx.test(e)?e:null}const Tx=e=>typeof e=="string"&&e.trim()!==""?e:null,Ns=Symbol("timed-out");function Mx(e,t){if(t<=0)return Promise.resolve(Ns);let a;return Promise.race([Promise.resolve(e),new Promise(r=>{a=setTimeout(()=>r(Ns),t)})]).finally(()=>clearTimeout(a))}function Lx(e){return e?Da()||ar()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function $x(e,t){const a=[],r=cd(t);r&&a.push({kind:"raw",resolve:async()=>r});const s=(e??"").trim();if(!s)return a;for(const[l,i]of[["urlResolver",Da()],["fallbackUrlResolver",ar()]])i&&a.push({kind:l,resolve:async u=>{let c;try{c=await Mx(i(s),u)}catch(h){return At(`question-sound-threw-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uB358\uC84C\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`,h),null}return c===Ns?(At(`question-sound-slow-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 ${ud}ms \uBC14\uD034 \uC548\uC5D0 \uC548 \uD480\uB838\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB97C \uBC84\uB9AC\uACE0 \uB2E4\uC74C\uC73C\uB85C \uAC04\uB2E4. \uC11C\uBC84 \uD569\uC131\uC744 \uAE30\uB2E4\uB9AC\uB294 \uB9AC\uC878\uBC84\uB77C\uBA74 \uC774 \uC790\uB9AC\uAC00 \uAE38\uC5B4\uC9C4\uB2E4. \uC18C\uB9AC\uAC00 \uC544\uC608 \uC548 \uB098\uBA74 \uC5EC\uAE30\uBD80\uD130 \uBCF4\uB77C.`),null):Tx(c)||(At(`question-sound-empty-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uC8FC\uC18C\uB97C \uC548 \uC92C\uB2E4(\uBC1B\uC740 \uAC83: ${JSON.stringify(c)}) \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`),null)}});return a}function Rx(){return Date.now()+ud}const Px=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function Ix(e){At("question-sound-none",`[core] "${e}" \uC758 \uC18C\uB9AC \uC8FC\uC18C\uB97C \uD55C \uC790\uB9AC\uC5D0\uC11C\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uBE0C\uB77C\uC6B0\uC800 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4. configureTTS \uAC00 \uAC78\uB824 \uC788\uB294\uC9C0, \uB9AC\uC878\uBC84\uAC00 \uC8FC\uC18C\uB97C \uC8FC\uB294\uC9C0 \uC704 \uC904\uB4E4\uC744 \uBCF4\uB77C.`)}function jr(...e){for(const t of e)if(typeof t=="string"){const a=t.trim();if(a.length)return a}else{if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t)&&t.length)return t.join(", ");if(t&&typeof t=="object"){const a=t,r=[a.text,a.label,a.value];for(const s of r){if(typeof s=="string"&&s.trim().length)return s.trim();if(typeof s=="number"||typeof s=="boolean")return String(s)}}}return null}function Fx(e){return jr(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function Ox(e){return cd(jr(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function dd(e){if(!e)return;if(typeof e.decision=="boolean")return e.decision;if(typeof e.correct=="boolean")return e.correct;if(typeof e.heard=="boolean")return e.heard;if(typeof e.judgement=="boolean")return e.judgement;const t=jr(e?.status,e?.result,e?.judge,e?.note);if(t){const a=t.toLowerCase();if(["ok","true","\uB9DE\uC74C","\uC815\uB2F5"].some(r=>a.includes(r)))return!0;if(["ng","false","\uD2C0\uB9BC","\uC624\uB2F5"].some(r=>a.includes(r)))return!1}}function pd(e){const{score:t,contextsLength:a,results:r=[],subtitle:s,onReplay:l,onClose:i,inline:u=!1,pending:c=!1}=e||{},{t:d}=_e.useTranslation(),h=o.useId(),p=o.useCallback(()=>!c,[c]);o.useEffect(()=>{const k=a??0;if(t!=null&&k>0&&t/k>.5){const A=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("party:trigger",{detail:{count:140,strength:1.6,duration:2200}}))},0);return()=>window.clearTimeout(A)}},[t,a]);const m=o.useCallback(k=>{const A=dd(k),R=jr(k?.wording,k?.label);return A===!0?{variant:"main",label:R??d("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:A===!1?{variant:"danger",label:R??d("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:R??d("training.result.notJudged","\uBBF8\uD310\uC815")}},[d]),g=a??0,y=t??0,C=o.useMemo(()=>Array.isArray(r)?r:[],[r]),b=o.useRef(null),[v,f]=o.useState(null),B=o.useCallback(()=>{b.current?.(),b.current=null,f(null)},[]);o.useEffect(()=>B,[B]);const _=o.useRef(0),N=(k,A)=>{if(!In)return;const R=Math.round(performance.now()-_.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${R}ms ${k}`,A??"")},x=o.useRef(0),E=o.useCallback((k,A,R)=>{B();const $=++x.current,G=()=>x.current===$;_.current=In?performance.now():0,N(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${k}`,{text:A,rawUrl:R}),f(k),b.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),x.current++,Xr()};const T=Z=>{N("\uD2BC\uB2E4",Z);const F=Ga(Z,K=>{N(`\uB05D\uB0AC\uB2E4 \u2014 ${K?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:G()}),K&&G()&&(b.current=null,f(null))});return b.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),x.current++,F.stop(),Xr()},F.done},P=$x(A,R);N("\uCC28\uB840",P.map(Z=>Z.kind));const L=P[0]?.kind==="raw",Q=L?T(R):Promise.resolve(!1);(async()=>{if(await Q||!G())return;const Z=Rx(),F=L?P.slice(1):P;for(let K=0;K<F.length;K++){if(!G())return;N(`${F[K].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const M=await F[K].resolve(Px(Z,F.length-K));if(N(`${F[K].kind} \uAC00 \uB2F5\uD588\uB2E4`,M),!G()||M&&(await T(M)||!G()))return}G()&&(N("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),Ix(A),b.current=()=>{x.current++,Xr()},N("\uB0AD\uB3C5\uD55C\uB2E4"),j1(A,{onEnd:()=>{G()&&(b.current=null,f(null))}}))})()},[B]),w=o.useMemo(()=>C.map(k=>{const A=k??{},R=Fx(A)||d("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:$,label:G}=m(A),T=Array.isArray(A.corrects)?A.corrects:[],P=T.length?T.join(", "):A.answer!=null&&A.answer!==""?String(A.answer):null,L=typeof A.selectedText=="string"?A.selectedText:null,Q=dd(A)===!0,Z=Ox(A),F=!!Z||Lx(R);return{problem:R,variant:$,label:G,answer:P,selectedText:L,isCorrect:Q,sound:Z,canHear:F}}),[C,m,d]),D=o.useMemo(()=>w.some(k=>k.answer!==null||k.selectedText!==null),[w]);return n.jsx(Hn,{onClose:i,closeOnBackdrop:!1,inline:u,ariaLabel:d("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4."),className:"popup--training-result",beforeClose:p,footerClassName:"trp-result__foot",footer:({animateThen:k,closeWithAnimation:A})=>n.jsxs(n.Fragment,{children:[c&&n.jsx("p",{id:h,className:"trp-actions__reason caption-1",role:"status",children:d("training.result.pendingDone","\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsxs("div",{className:"trp-actions",children:[n.jsx(be,{htmlType:"button",size:56,type:"bar",label:d("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>k(l)}),n.jsx(be,{htmlType:"button",size:56,type:"bar",label:d("training.result.done","\uC644\uB8CC"),variant:"main",onClick:A,disabled:c,onDisabledClick:c?()=>{}:void 0,"aria-describedby":c?h:void 0})]})]}),children:()=>n.jsxs("div",{className:"trp-result is-on",children:[n.jsxs("header",{className:"trp-result__head",children:[n.jsx("p",{className:"trp-result__eyebrow caption-1",children:d("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")}),n.jsx("h1",{className:"trp-result__title h2",children:d("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.")}),s&&n.jsx("p",{className:"trp-result__subtitle body-3",children:s}),n.jsx("div",{className:"trp-score",children:n.jsxs("div",{className:"trp-score__figure","aria-label":d("training.result.scoreAria",{correct:y,total:g}),children:[n.jsx("span",{className:"trp-score__big",children:y}),n.jsx("span",{className:"trp-score__sep",children:"/"}),n.jsx("span",{className:"trp-score__total",children:g})]})})]}),w.length>0&&n.jsx("section",{className:"trp-result__body",children:n.jsxs("div",{className:`result-table${D?" result-table--answer":""}`,role:"table","aria-label":d("training.result.tableAriaLabel","\uBB38\uD56D\uBCC4 \uD310\uC815"),children:[n.jsxs("div",{className:"result-table__head caption-1",role:"row",children:[n.jsx("span",{role:"columnheader",children:d("common.col.problem","\uBB38\uC81C")}),D&&n.jsx("span",{role:"columnheader",children:d("training.result.colAnswerSelected","\uC815\uB2F5 \xB7 \uC120\uD0DD")}),n.jsx("span",{className:"col-right",role:"columnheader",children:d("training.result.colJudge","\uD310\uC815")})]}),w.map((k,A)=>n.jsxs("div",{className:"result-table__row",role:"row",children:[n.jsxs("div",{className:"trp-row__problem",children:[n.jsx("span",{className:"trp-row__no caption-1",children:String(A+1).padStart(2,"0")}),n.jsx("div",{className:"trp-row__q body-2",children:k.problem}),k.canHear&&n.jsx(be,{htmlType:"button",size:32,type:"dot",useBorder:!1,icon:v===A?"square":"volume-2",className:"trp-row__replay",ariaLabel:v===A?d("training.result.replaySoundStop",{no:A+1,defaultValue:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4"}):d("training.result.replaySound",{no:A+1,defaultValue:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30"}),onClick:()=>v===A?B():E(A,k.problem,k.sound)})]}),D&&n.jsxs("div",{className:"trp-row__answers",children:[k.answer!==null&&n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:"trp-row__answer-label answer-correct caption-1",children:d("training.result.colAnswer","\uC815\uB2F5")}),n.jsx("span",{className:"trp-row__answer-value body-2",children:k.answer})]}),n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:`trp-row__answer-label answer-selected caption-1 ${k.isCorrect?"is-correct":"is-wrong"}`,children:d("training.result.colSelected","\uC120\uD0DD")}),n.jsx("span",{className:`trp-row__answer-value body-2 ${k.isCorrect?"is-correct":"is-wrong"}`,children:k.selectedText??"\u2014"})]})]}),n.jsx("div",{className:"trp-row__judge",children:n.jsx(jt,{variant:k.variant,label:k.label,fill:"soft",minWidth:80})})]},A))]})})]})})}const Es=new Set;function zx(e){o.useEffect(()=>{if(!e||Es.has(e))return;Es.add(e);const t=()=>typeof document>"u"||document.visibilityState!=="hidden";let a=null,r=null,s=0,l=0;const i=()=>{const h=Date.now();a==null&&(a=h),r==null&&(r=h)},u=()=>{r!=null&&(s+=Date.now()-r,r=null)};t()&&i();const c=()=>{if(u(),a==null)return;const h=s-l;if(h<1e3||l===0&&s<5e3)return;const p=Date.now(),m=p-h;l=s,Nf({trainingType:e,startedAt:new Date(m).toISOString(),endedAt:new Date(p).toISOString()})},d=()=>{t()?i():c()};return typeof document<"u"&&document.addEventListener("visibilitychange",d),typeof window<"u"&&window.addEventListener("pagehide",c),()=>{typeof document<"u"&&document.removeEventListener("visibilitychange",d),typeof window<"u"&&window.removeEventListener("pagehide",c),c(),Es.delete(e)}},[e])}function Tr(e,t){return e&&e.id||`page-${t??0}`}function Mr(e,t){return e&&e.key||`step-${t??0}`}function Lr(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function Wx(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const Hx=300,Vx=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},Pn=Object.freeze({}),hd=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function Ds(e){const t=e,a=t?.results||t?.answers||[],r=Array.isArray(a)&&a.length>0?a.length:null,s=Array.isArray(a)?a.filter(l=>l?.correct===!0||l?.isCorrect===!0||l?.score===1||l?.heard===!0||l?.judgement===!0).length:null;return{results:a,correct:r!=null?s:null,total:r}}const qx=e=>n.jsx(pd,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function Ux(e){const{scenario:t,title:a,subTitle:r,depth:s,icon:l,wrapperStyle:i,iconTooltip:u,pageIndex:c,pageCount:d,stepIndex:h,stepCount:p,onBack:m,onComplete:g,onRoundFinished:y,onNext:C,onSettings:b,useNoiseSetting:v=!0,children:f,ariaLabel:B,label:_,buildResults:N,onResult:x,typeKey:E,entryPoint:w,dailyTotal:D,itemRef:k,renderResultPopup:A,noiseOverride:R,hideNoiseRows:$=!1}=e;zx(E&&!hd.has(E)?E:"");const G=o.useRef(0);o.useEffect(()=>{G.current=Date.now()},[]);const{t:T}=_e.useTranslation(),P=x,L=!!t,Q=t?.id||null,Z=t?.meta||{},F=Array.isArray(t?.pages)?t.pages:[],K=Array.isArray(f)||o.isValidElement(f)&&typeof f!="function"?o.Children.toArray(f).filter(o.isValidElement):[],M=K.length>0,q=pe=>pe===Sr||pe?.__isTrainingPage===!0,Y=M&&K.some(pe=>q(pe.type)),U=Y?K.filter(pe=>q(pe.type)).map((pe,De)=>{const Re=pe.props||{};return{id:`children-page-${De}`,steps:o.Children.toArray(Re.children).filter(o.isValidElement),pageTop:Re.pageTop||Re.top||null,pageBottom:Re.pageBottom||Re.bottom||null}}):[{id:"children-page-0",steps:K}],S=M&&!L&&typeof f!="function",I=S?Math.max(1,U.length):0;o.useEffect(()=>{if(!(typeof document>"u"||!document.body)&&!document.body.classList.contains("ihabdevteam-core-scope"))return document.body.classList.add("ihabdevteam-core-scope"),()=>{document.body.classList.remove("ihabdevteam-core-scope")}},[]),o.useEffect(()=>{if(typeof document>"u"||!document.body)return;const pe=document.body;return pe.dataset.ihabTrainingPopupCount=String(Number(pe.dataset.ihabTrainingPopupCount||"0")+1),pe.classList.add("ihab-training-popup-open"),()=>{const De=Number(pe.dataset.ihabTrainingPopupCount||"1")-1;De>0?pe.dataset.ihabTrainingPopupCount=String(De):(delete pe.dataset.ihabTrainingPopupCount,pe.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!(typeof document>"u"||!document.body))return cv()},[]);const[O,z]=o.useState({...ta,enabled:!1}),se=o.useRef(O);o.useEffect(()=>{se.current=O},[O]);const te=o.useRef(R),de=o.useRef(!1),ee=o.useRef(null);o.useEffect(()=>{let pe=!1;const De=Re=>{if(pe)return;de.current=!0;const Ge=Re?ea({...ta,enabled:!1},Re):{...ta},ze=ee.current;ee.current=null;const X=ze?ea(Ge,ze):Ge;se.current=X,z(X),ze&&!te.current&&co(X),ir(X);const ce=te.current;if(ce){const Ae=typeof ce=="function"?ce(X):ce,Ve=ea(X,Ae);se.current=Ve,z(Ve),ir(Ve)}};return If().then(Re=>{if(pe){const Ge=ee.current;if(ee.current=null,Ge&&!te.current){const ze=Re?ea({...ta,enabled:!1},Re):{...ta};co(ea(ze,Ge))}return}De(Re)}),()=>{pe=!0}},[]);const[V,ne]=o.useState(null),[W,H]=o.useState(null),ie=o.useCallback((pe,De)=>{pe==="main"?ne(De):H(De)},[]),Te=o.useRef(null),ye=o.useRef(null),he=o.useCallback(()=>{ye.current!==null&&(clearTimeout(ye.current),ye.current=null);const pe=Te.current;Te.current=null,pe&&co(pe)},[]);o.useEffect(()=>{if(typeof window>"u")return;const pe=()=>{document.visibilityState==="hidden"&&he()};return window.addEventListener("pagehide",he),document.addEventListener("visibilitychange",pe),()=>{window.removeEventListener("pagehide",he),document.removeEventListener("visibilitychange",pe),he()}},[he]);const Se=o.useCallback(pe=>{const De=ea(se.current,pe);if(se.current=De,z(De),!de.current){ee.current={...ee.current??{},...pe},ir(De);return}te.current||(Te.current=De,ye.current!==null&&clearTimeout(ye.current),ye.current=setTimeout(he,Hx)),ir(De)},[he]),$e=O.mainSpeed,Ne=O.mainVolume,ue=o.useCallback(pe=>Se({mainSpeed:pe}),[Se]),xe=o.useCallback(pe=>Se({mainVolume:pe}),[Se]),ke=o.useMemo(()=>({settings:O,setSettings:Se,registerAnalyser:ie,mainAnalyser:V,noiseAnalyser:W,playbackRate:$e,setPlaybackRate:ue,mainVolume:Ne,setMainVolume:xe}),[O,Se,ie,V,W,$e,ue,Ne,xe]),Ee=o.useRef(null),[We,He]=o.useState(0),ot=o.useRef([]),[Qe,Je]=o.useState("center"),[vt,je]=o.useState(!1),Ye=o.useRef(!1),Be=o.useRef(null),Ue=o.useCallback(pe=>{Ye.current||(Ye.current=!0,je(!0),Be.current=setTimeout(()=>{try{pe()}catch{Ye.current=!1,je(!1)}},Vx()?0:dx))},[]);o.useEffect(()=>()=>{Be.current&&clearTimeout(Be.current)},[]);const qe=o.useRef(m);o.useEffect(()=>{qe.current=m});const pt=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{const pe=Ee.current,De=pt.current;if(fo(pe,De),pe){const Re=Array.from(pe.querySelectorAll(kn)).filter(Ge=>!Ge.closest('[aria-hidden="true"]'))[0];if(Re)try{Re.focus()}catch{}}return()=>{const Re=document.activeElement;if(!Re||Re===document.body||pe&&pe.contains(Re))try{bo(De)?.focus?.()}catch{}}},[]),o.useEffect(()=>Kn(()=>Ue(()=>{const pe=qe.current;typeof pe=="function"&&pe()})),[Ue]),mo(Ee,!0);const[_t,Et]=o.useState(!1),wt=o.useRef(!1),[st,tt]=o.useState(null),Bt=o.useRef(0),kt=o.useRef(0),Tt=()=>{Bt.current+=1,kt.current+=1,tt(null)},[Lt,gt]=o.useState(""),[it,ut]=o.useState(()=>Lr()),ct=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!L&&!S||(ut(Lr()),Tt())},[L,Q,S]),o.useEffect(()=>{S&&ut(pe=>{const De=Math.max(0,Math.min(pe.pageIndex,Math.max(0,I-1)));return De!==pe.pageIndex?{...pe,pageIndex:De,stepIndex:0}:pe})},[S,I]);const ve=S?Math.max(0,Math.min(it.pageIndex,I-1)):0,Me=S?U[ve]:null,Pe=S&&Me&&Array.isArray(Me.steps)?Me.steps:[],Oe=L?it.pageIndex:S?ve:typeof c=="number"?c:0,dt=L?F[Math.max(0,Math.min(it.pageIndex,Math.max(0,F.length-1)))]:null,Dt=L&&dt&&Array.isArray(dt.steps)?dt.steps:[],yt=L?Dt.length:S?Pe.length:typeof p=="number"?p:0,xt=L||S?Math.max(0,Math.min(it.stepIndex,Math.max(0,yt))):typeof h=="number"?h:0,Ct=L?F.length:S?I:typeof d=="number"?d:0;o.useEffect(()=>{if(!L&&!S)return;const pe=L?Tr(dt,Oe):Me?.id||`children-page-${Oe??0}`,De=new Date().toISOString();for(let Re=0;Re<=xt;Re+=1){const Ge=L?Mr(Dt[Re],Re):`step-${Re}`,ze=fe(pe,Ge);oe.current.has(ze)||oe.current.set(ze,De)}},[L,S,Oe,xt,Me?.id]),o.useLayoutEffect(()=>{const pe=ct.current;if(typeof Oe=="number"&&pe!==null&&Oe!==pe&&Oe>pe)try{gt(T("training.problemNotice",{n:Oe+1}))}catch{}ct.current=typeof Oe=="number"?Oe:ct.current},[Oe,c,T]),o.useLayoutEffect(()=>{const pe=Ee.current;if(!pe)return;const De=()=>pe.querySelector(".page-popup__scroll");let Re=null,Ge=null,ze=null;const X=Ze=>{const ft=De();if(!ft)return;const bt=ft.scrollHeight<=ft.clientHeight;if(Je(bt?"center":"top"),Ze&&!wt.current){wt.current=!0;try{Et(!0)}catch{}try{Ve.disconnect()}catch{}}},ce=()=>{Re!==null&&cancelAnimationFrame(Re),Re=requestAnimationFrame(()=>{Ge!==null&&clearTimeout(Ge),Ge=setTimeout(()=>X(!0),60)})},Ae=()=>{ze!==null&&cancelAnimationFrame(ze),ze=requestAnimationFrame(()=>X(!1))};ce(),window.addEventListener("resize",Ae);const Ve=new MutationObserver(ce);Ve.observe(pe,{childList:!0,subtree:!0,attributes:!0});const Ke=setTimeout(()=>{wt.current||X(!0)},400);return()=>{window.removeEventListener("resize",Ae),Re!==null&&cancelAnimationFrame(Re),Ge!==null&&clearTimeout(Ge),ze!==null&&cancelAnimationFrame(ze),clearTimeout(Ke);try{Ve.disconnect()}catch{}}},[Ee]);const Le=o.useCallback(pe=>{Ee.current&&(Ee.current._childOnNext=pe)},[]),at=o.useCallback(pe=>{Ee.current&&(Ee.current._childOnResult=pe)},[]),oe=o.useRef(new Map),fe=(pe,De)=>`${pe}\0${De}`,Ie=o.useCallback((pe,De,Re)=>{ut(Ge=>{const ze=Ge.answersByPage[pe]||{},X=ze[De],ce=As(Re),Ae=As(X);if(X&&Ae>ce)return Ge;const Ve=td(Re,oe.current.get(fe(pe,De)),ce);return{...Ge,answersByPage:{...Ge.answersByPage,[pe]:{...ze,[De]:Ve}}}})},[ut]),Xe=o.useCallback((pe,De,Re)=>{const Ge=Tr(dt,Oe),ze=Mr(pe,De);Ie(Ge,ze,Re)},[dt,Oe,Ie]),et=o.useCallback((pe,De,Re)=>{const Ge=Tr(dt,Oe),ze=Mr(pe,De);Ie(Ge,ze,Re),!Re?.allowChange&&pe?.autoAdvance!==!1&&ut(X=>({...X,stepIndex:Math.max(X.stepIndex,De+1)}))},[dt,Oe,Ie,ut]),rt=o.useCallback((pe,De)=>{const Re=Me?.id||`children-page-${Oe??0}`,Ge=typeof De=="number"?De:xt??0,ze=`step-${Ge}`;Ie(Re,ze,pe),pe?.allowChange||ut(X=>({...X,stepIndex:Math.max(X.stepIndex,Ge+1)}))},[Me,Oe,xt,Ie,ut]),$t=o.useCallback((pe,De)=>{const Re=Me?.id||`children-page-${Oe??0}`,Ge=`step-${typeof De=="number"?De:xt??0}`;Ie(Re,Ge,pe)},[Me,Oe,xt,Ie]),xn=S?{currentPageIndex:Oe??0,currentStepIndex:xt??0,totalStepsInPage:Pe.length,handleStepDone:rt,handleStepChange:$t}:null,sn=async()=>{const pe=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:F,flowState:it,answersByPage:it.answersByPage})):null;return typeof P=="function"&&await Promise.resolve(P(pe))||pe},Rt=async()=>{const pe=Me?.id||`children-page-${it.pageIndex}`,De=it.answersByPage[pe]||{},Re=Y?(()=>{const X={};let ce=0;return U.forEach(Ae=>{const Ve=it.answersByPage[Ae.id]||{},Ke=Array.isArray(Ae.steps)?Ae.steps.length:0;for(let Ze=0;Ze<Ke;Ze+=1){const ft=Ve[`step-${Ze}`];typeof ft<"u"&&(X[`step-${ce+Ze}`]=ft)}ce+=Ke}),X})():De;if(typeof N=="function"){const X=await Promise.resolve(N(Re,{pageAnswers:De,answersByPage:it.answersByPage,pages:U,currentPageId:pe}));return typeof P=="function"&&await Promise.resolve(P(X))||X}const Ge=Object.entries(De).map(([X,ce],Ae)=>({index:Ae,key:X,payload:ce})),ze={results:Ge,answers:Ge,score:0};return typeof P=="function"&&await Promise.resolve(P(ze))||ze},zt=()=>{const pe=++Bt.current,De=()=>pe!==Bt.current;try{if(typeof document<"u"&&document.body){try{document.dispatchEvent(new CustomEvent("speechear-close-tooltips"))}catch{}document.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,cancelable:!0})),document.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0}))}}catch{}if(L){const ze=sn();tt(Pn);const X=ze;Promise.resolve(X).then(ce=>{De()||tt(ce||{isEmpty:!0})}).catch(ce=>{!De()&&tt({isEmpty:!0})});return}if(S){const ze=Rt();tt(Pn);const X=ze;Promise.resolve(X).then(ce=>{De()||tt(ce||{isEmpty:!0})}).catch(ce=>{!De()&&tt({isEmpty:!0})});return}const Re=Ee.current&&Ee.current._childOnResult,Ge=ze=>{try{return ze?ze():void 0}catch{return}};if(typeof Re=="function"){const ze=Ge(Re);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Dn&&Dn.tagName.toUpperCase()==="SCRIPT"&&Dn.src||new URL("components.cjs.js",document.baseURI).href}catch{}ze&&typeof ze.then!="function"?tt(ze):tt(ze&&typeof ze.then=="function"?Pn:{});const X=()=>{De()||tt(ce=>ce===Pn?{}:ce)};Promise.resolve(ze).then(ce=>{ce&&!De()?tt(ce):X()}).catch(ce=>{X()});return}if(typeof P=="function"){const ze=Ge(P);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Dn&&Dn.tagName.toUpperCase()==="SCRIPT"&&Dn.src||new URL("components.cjs.js",document.baseURI).href}catch{}ze&&typeof ze.then!="function"?tt(ze):tt(ze&&typeof ze.then=="function"?Pn:{});const X=()=>{De()||tt(ce=>ce===Pn?{}:ce)};Promise.resolve(ze).then(ce=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Dn&&Dn.tagName.toUpperCase()==="SCRIPT"&&Dn.src||new URL("components.cjs.js",document.baseURI).href}catch{}ce&&!De()?tt(ce):X()}).catch(ce=>{console.error("viewResults external handler failed",ce),X()});return}},ln=()=>{if(L){if(typeof Oe=="number"&&typeof Ct=="number"&&Oe<Ct-1){ut(De=>({...De,pageIndex:De.pageIndex+1,stepIndex:0}));return}return zt()}if(S){const De=Pe.length;if(typeof xt=="number"&&xt<De-1){ut(Re=>({...Re,stepIndex:Re.stepIndex+1}));return}if(typeof Oe=="number"&&typeof Ct=="number"&&Oe<Ct-1){ut(Re=>({...Re,pageIndex:Re.pageIndex+1,stepIndex:0}));return}return zt()}if(typeof C=="function"){try{C()}catch{}return}const pe=Ee.current&&Ee.current._childOnNext;if(typeof pe=="function"){try{pe()}catch{}return}},It=L?Z.title||Z.label||B||T("common.popup","\uD31D\uC5C5"):a||_||(Array.isArray(s)?s[s.length-1]:void 0)||B||T("common.popup","\uD31D\uC5C5"),wn=B||It,Qt=L?Z.title??Z.label??It:a??_??It,St=(pe,De)=>{const Re=Tr(dt,Oe),Ge=Mr(pe,De),ze=it.answersByPage[Re]?.[Ge],X=Wx(pe,{page:dt,pageIndex:Oe,step:pe,stepIndex:De,storedPayload:ze,answersByPage:it.answersByPage,flowState:it}),ce={key:Ge,index:De,stepIndex:xt,isLast:De===Dt.length-1};switch(pe?.type){case"listen":return n.jsx(ws,{...ce,...X,onDone:Ae=>et(pe,De,Ae)});case"confirm":return n.jsx(_s,{...ce,...X,onDone:Ae=>et(pe,De,Ae),onChange:Ae=>Xe(pe,De,Ae)});case"confirmWithText":return n.jsx(xs,{...ce,...X,onDone:Ae=>et(pe,De,Ae),onChange:Ae=>Xe(pe,De,Ae)});case"orderList":return n.jsx(Bs,{...ce,...X,onDone:Ae=>et(pe,De,Ae),onChange:Ae=>Xe(pe,De,Ae)});default:return null}},Pt=o.useRef(void 0);o.useEffect(()=>{const pe=Pt.current;if(Pt.current=Oe,pe===void 0||pe===Oe||!gr())return;const De=Ee.current;if(!De)return;const Re=document.activeElement;if(!(!Re||Re===document.body||!De.contains(Re)||Re.disabled===!0))return;const Ge=De.querySelector(`.training-steps ${kn.split(", ").join(", .training-steps ")}`)??Array.from(De.querySelectorAll(kn)).find(ze=>!ze.closest('[aria-hidden="true"]'));try{Ge?.focus()}catch{}},[Oe]);const Ht=L?F.length>0?n.jsx("div",{className:"training-steps",children:Dt.map((pe,De)=>St(pe,De))},`replay-${We}`):n.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:n.jsx("div",{className:"pp-empty",children:t?.emptyMessage||T("training.noQuestions","\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):null,Yt=S?n.jsxs(ad.Provider,{value:xn,children:[Me?.pageTop?n.jsx("div",{className:"training-page-top",children:Me.pageTop}):null,n.jsx("div",{className:"training-steps",children:Pe.map((pe,De)=>{const Re=pe;return o.cloneElement(Re,{...Re.props,_stepIndex:De,_totalSteps:Pe.length,_stepKey:`step-${De}`,_pageIndex:Oe})})},`replay-${We}`),Me?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:Me.pageBottom}):null]}):null,Cn=o.useRef(-1),Gt=o.useCallback(()=>{if(!E)return;const pe=st,{results:De,correct:Re,total:Ge}=Ds(st),ze={correct:Re,total:Ge,attempt:ot.current.length+1,previousAttempts:[...ot.current]};if(Cn.current===kt.current)return ze;Cn.current=kt.current,Ef({items:Pf(De),category:hd.has(E)?"sentence":"word",trainingType:E,entryPoint:w??"sentence",itemRef:k??null,correct:Re,total:Ge,score:typeof pe?.score=="number"?pe.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-G.current)/1e3)),dailyTotal:D??null});try{y?.(ze)}catch{}return ze},[E,w,D,k,st,y]);o.useEffect(()=>{!st||st===Pn||st?.isEmpty||(Ds(st).total??0)>0&&Gt()},[st,Gt]);const en=o.useCallback(()=>{const pe=Gt();Tt(),Ue(()=>{typeof g=="function"&&g(pe),typeof m=="function"&&m()})},[g,m,Gt,tt,Ue]),un=o.useCallback(()=>gt(""),[gt]),fn=o.useCallback(()=>{Ue(()=>{typeof m=="function"&&m()})},[m,Ue]),Vt=n.jsxs("div",{className:`page-popup${vt?" page-popup--closing":""}`,role:"dialog","aria-modal":"true","aria-label":wn,children:[n.jsxs("div",{ref:Ee,className:`page-popup__panel ${_t?"":"page-popup__panel--measuring"} ${Qe==="center"?"page-popup__panel--center":Qe==="top"?"page-popup__panel--top":""}`,children:[n.jsx(Jc,{title:Qt,subtitle:L?Z.subtitle||Z.label:Array.isArray(s)?s.join(" / "):void 0,desc:L?void 0:r,depth:L?Z.depth:s,icon:L?Z.icon:l,wrapperStyle:L?Z.wrapperStyle:i,iconTooltip:L?Z.iconTooltip:u,progressMax:Ct,progressIndex:Oe,pageIndex:Oe,pageCount:Ct,onBack:fn,onClose:fn}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${Qe==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:S?Yt:L?Ht:typeof f=="function"?f({registerOnNext:Le,registerOnResult:at,panelRef:Ee,setResultOverlay:tt}):f})}),n.jsx(Xc,{onSettings:b,onNext:ln,onResult:zt,useNoiseSettingBtn:!!(L?Z.useNoiseSetting??!0:v),stepIndex:xt,stepCount:yt,pageIndex:Oe,pageCount:Ct,resultOpen:!!(st&&!st.isEmpty),hideNoiseRows:$})]}),st&&!st.isEmpty&&(A??qx)({score:st.score,results:st.results||st.answers||[],contextsLength:st.results?st.results.length:st.answers?st.answers.length:0,onReplay:()=>{if(G.current=Date.now(),st!==Pn){const{correct:pe,total:De}=Ds(st);ot.current.push({correct:pe,total:De})}if(Tt(),He(pe=>pe+1),L){if(ut(Lr()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if(S){ut(Lr());return}try{const pe=Ee.current&&Ee.current._childOnResult;typeof pe=="function"&&pe({replay:!0})}catch{}},onClose:en,pending:st===Pn}),st?.isEmpty&&n.jsx("div",{className:"page-popup page-popup--result-empty",role:"dialog","aria-modal":"true","aria-label":T("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC"),children:n.jsxs("div",{className:"page-popup__panel page-popup__panel--center",children:[n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:n.jsx("div",{className:"page-popup__empty",children:T("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")})})}),n.jsx("div",{className:"page-popup__bottom",children:n.jsx(be,{htmlType:"button",variant:"main",size:48,onClick:en,label:T("training.result.done","\uC644\uB8CC")})})]})}),n.jsx(ba,{message:Lt,position:"top",onClose:un})]}),Bn=n.jsx(Cs.Provider,{value:ke,children:Vt});return typeof document<"u"&&document.body?cn.createPortal(Bn,document.body):Bn}const Vn=Ux;Vn.Page=Sr,Vn.ListenStep=rd,Vn.ConfirmStep=od,Vn.ConfirmWithTextStep=sd,Vn.OrderListStep=ld,Vn.CardStep=id,Vn.CardOrderStep=Sx;function Gx({label:e,homonum:t}){const a=ia()?.(e,t)??"",{imgRef:r,loading:s,hasImage:l,onLoad:i,onError:u}=Jo(a);return l?n.jsxs("div",{className:le("word-image-tooltip__cell"),children:[s&&n.jsx("div",{className:le("word-image-tooltip__spinner")}),n.jsx("img",{ref:r,src:a,alt:e,draggable:!1,style:{opacity:s?0:1},onLoad:i,onError:u})]}):n.jsx("div",{className:le("word-image-tooltip__cell word-image-tooltip__cell--text h3"),children:n.jsx("span",{children:e})})}function md({words:e,anchorRect:t}){const a=o.useRef(null),[r,s]=o.useState(null);return o.useLayoutEffect(()=>{if(!t||!a.current)return;const{offsetWidth:l,offsetHeight:i}=a.current,u=window.innerWidth;let c=t.left+t.width/2-l/2,d=t.top-i-8;d<8&&(d=t.bottom+8),c=Math.max(8,Math.min(c,u-l-8)),s({left:c,top:d})},[t]),!t||e.length===0?null:cn.createPortal(n.jsx("div",{ref:a,className:le("word-image-tooltip"),style:{visibility:r?"visible":"hidden",left:r?.left??0,top:r?.top??-9999},children:n.jsx("div",{className:le("word-image-tooltip__cells"),children:e.map(l=>n.jsx(Gx,{label:l.label,homonum:l.homonum},`${l.label}_${l.homonum??1}`))})}),document.body)}function Kx({titleIcon:e,resultCount:t,resultUnit:a,searchQuery:r,items:s,groups:l,selected:i=[],onSelect:u,maxSelect:c,onClearSelection:d,onPrint:h,onPrintEmpty:p,className:m,emptyHint:g,showEmptyText:y=!0,sectionType:C="page",disc:b}){const{t:v,i18n:f}=_e.useTranslation(),B=f.language?.startsWith("ko")??!1,{anchorRect:_,openAt:N,close:x}=Fa(),[E,w]=o.useState(null),D=o.useCallback(()=>{x(),w(null)},[x]);Fy(D,!!E);const k=(r??"").trim(),A=/^[^,[\]\s]+$/.test(k)?k:"",R=A.length>0,$=r===void 0&&t===void 0,G=R?"match":$?"original":"ganada",[T,P]=o.useState(()=>G),[L,Q]=o.useState("50"),[Z,F]=o.useState(1),[K,M]=o.useState(R);K!==R&&(M(R),P(G));const q=T==="match"&&!R||T==="original"&&!$?G:T,Y=o.useMemo(()=>[...R?[{value:"match",label:v("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...$?[{value:"original",label:v("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:v("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:v("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:v("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:v("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:v("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:v("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[v,R,$]),U=o.useMemo(()=>["10","25","50","100"].map(ue=>({value:ue,label:v("wordSearch.pageSize",{count:Number(ue),defaultValue:`${ue}\uAC1C\uC529 \uBCF4\uAE30`})})),[v]),S=ue=>ue.words?.[0],I=o.useMemo(()=>{const ue=[...A].length,xe=cf(A),ke=new Map;return Ee=>{let We=ke.get(Ee);return We===void 0&&(We=xe((Ee.words?.[0]?.label??"").slice(0,ue))?0:1,ke.set(Ee,We)),We}},[A]),O=o.useCallback((ue,xe)=>{const ke=He=>S(He)?.label??"",Ee=He=>S(He)?.syllables??[...ke(He)].length,We=He=>(He.words??[]).reduce((ot,Qe)=>{const Je=parseInt(Qe.grade??"",10);return Number.isFinite(Je)&&Je<ot?Je:ot},999);switch(q){case"match":return I(ue)-I(xe)||hn(ke(ue),ke(xe));case"ganada":return hn(ke(ue),ke(xe));case"ganada_desc":return hn(ke(xe),ke(ue));case"syllable":return Ee(ue)-Ee(xe)||hn(ke(ue),ke(xe));case"syllable_desc":return Ee(xe)-Ee(ue)||hn(ke(ue),ke(xe));case"grade":return We(ue)-We(xe)||hn(ke(ue),ke(xe));case"grade_desc":return We(xe)-We(ue)||hn(ke(ue),ke(xe));default:return 0}},[q,I]),z=o.useMemo(()=>s.slice().sort(O),[s,O]),se=Number(L)||10,te=o.useMemo(()=>(l??[]).flatMap(ue=>ue.items.slice().sort(O).map(xe=>({item:xe,label:ue.label}))),[l,O]),de=l?te.length:z.length,ee=Math.max(1,Math.ceil(de/se)),V=Math.min(Z,ee),ne=o.useMemo(()=>z.slice((V-1)*se,V*se),[z,V,se]),W=o.useId(),H=o.useMemo(()=>{if(!l)return null;const ue=te.slice((V-1)*se,V*se),xe=new Map;for(const{item:ke,label:Ee}of ue)xe.has(Ee)||xe.set(Ee,[]),xe.get(Ee).push(ke);return[...xe.entries()].map(([ke,Ee])=>({label:ke,items:Ee}))},[l,te,V,se]);o.useEffect(()=>{F(1)},[T,L,de,r]);const ie=de>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(gn,{size:40,options:Y,value:q,onChange:P,ariaLabel:v("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(gn,{size:40,options:U,value:L,onChange:Q,ariaLabel:v("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(Po,{page:V,totalPages:ee,onChange:F})]}):void 0,Te=ue=>{u&&u(ue)},ye=t!==void 0&&a?n.jsxs(n.Fragment,{children:[v("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),v("wordSearch.resultTitleSuffix",{unit:B?_f(a):a})]}):void 0,he=t!==void 0&&t>0&&c!==void 0&&a?v("wordSearch.resultDisc",{unit:B?wf(a):a,max:c,selected:i.length}):void 0,Se=b??he,$e=l?l.length===0:s.length===0,Ne=$e&&!y&&!g;return n.jsxs(ya,{type:C,className:we("word-search-result-block",m),children:[n.jsxs("div",{className:we("word-search-result-block__inner",Ne&&"word-search-result-block__inner--head-only"),children:[(ye||ie||Se)&&n.jsxs("div",{className:"word-search-result-block__head",children:[n.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&n.jsx(nt,{icon:e,className:"word-search-result-block__head-icon"}),ye&&n.jsx("span",{className:"word-search-result-block__title h3",children:ye})]}),ie&&n.jsx("div",{className:"word-search-result-block__head-actions",children:ie}),Se&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:Se})]}),$e&&(y||g)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[y&&n.jsx("p",{className:"word-search-result-block__empty body-3",children:v("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),g&&n.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:g})]}),l?(H??[]).map(ue=>n.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${W}-${ue.label}`,children:[n.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${W}-${ue.label}`,children:ue.label}),n.jsx("div",{className:"word-search-result-block__items",children:ue.items.map(xe=>{const ke=i.includes(xe.id);return n.jsx("div",{onMouseEnter:Ee=>{N(Ee.currentTarget),w(xe.words??[])},onMouseLeave:D,children:n.jsx(be,{htmlType:"button",size:"word",align:"grid",label:(xe.words??[]).map(Ee=>Ee.label),subLabel:(xe.words??[]).some(Ee=>Ee.subLabel)?(xe.words??[]).map(Ee=>Ee.subLabel):void 0,selected:ke,onClick:()=>Te(xe.id),minWidth:200})},xe.id)})})]},ue.label)):n.jsx("div",{className:"word-search-result-block__items",children:ne.map(ue=>{const xe=i.includes(ue.id);return n.jsx("div",{onMouseEnter:ke=>{N(ke.currentTarget),w(ue.words??[])},onMouseLeave:D,children:n.jsx(be,{htmlType:"button",size:"word",align:"grid",label:(ue.words??[]).map(ke=>ke.label),subLabel:(ue.words??[]).some(ke=>ke.subLabel)?(ue.words??[]).map(ke=>ke.subLabel):void 0,selected:xe,onClick:()=>Te(ue.id),minWidth:200})},ue.id)})}),E&&_&&n.jsx(md,{words:E,anchorRect:_})]}),(d||h)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[d&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:v("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:i.length===0,onClick:i.length===0?void 0:d}),h&&n.jsx("div",{onClick:i.length===0?p:void 0,children:n.jsx(be,{htmlType:"button",size:"56",type:"bar",variant:"main",label:v("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:i.length===0,onClick:i.length===0?void 0:h})})]})]})}function Yx(e,t){return t.map(a=>{const r=typeof a=="string"?a:a.label,s=typeof a=="string"?void 0:a.displayLabel;return{label:r,value:e[r]??"",displayLabel:s}})}function Zx({sections:e,selectedList:t,count:a,onCountChange:r,maxCount:s=4,minCount:l=1,combinationSections:i,combinationSectionsForSlot:u,onSelect:c,placeholder:d="-",className:h,title:p,titleIcon:m,disc:g,showInfoButton:y=!0,onClearPhoneme:C,onSearch:b,onSearchEmpty:v,searchDisabled:f=!1,searchLabel:B,searchChecking:_=!1,pairMode:N=!1,sectionType:x="page",beforeSearchContent:E,beforeContent:w,afterContent:D,hideCountControl:k=!1,ordinal:A=!1}){const{t:R}=_e.useTranslation(),$=o.useMemo(()=>R("wordPairs.infoNotes",{returnObjects:!0}),[R]),G=o.useMemo(()=>Array.from({length:s-l+1},(S,I)=>{const O=l+I;return{key:String(O),label:R("wordPairs.count",{n:O})}}),[R,s,l]),T=o.useMemo(()=>R("wordPairs.ordinals",{returnObjects:!0}),[R]),P=o.useCallback(S=>A?R("wordPairs.phonemeOrdinalLabel",{ordinal:T[S-1]??S}):a===1?R("wordPairs.phonemeSingleLabel","\uC74C\uC808"):R("wordPairs.phonemeN",{n:S}),[A,T,a,R]),L=o.useCallback(S=>A?R("wordPairs.phonemeContrastOrdinalLabel",{ordinal:T[S-1]??S}):a===1?R("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):R("wordPairs.phonemeContrast",{n:S}),[A,T,a,R]),Q=o.useCallback((S,I)=>I?n.jsxs(n.Fragment,{children:[S,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):S,[]),{anchorRect:Z,toggleAt:F,close:K}=Fa(),M=o.useCallback(S=>r(Number(S)),[r]),q=bn("(max-width: 767px)"),Y=o.useCallback(S=>Yx(S,e).map(({label:I,value:O,displayLabel:z})=>{const se=!!O&&O!=="\uC5C6\uC74C";return n.jsxs("span",{className:we("phoneme-select-block__cell-jamo-part",O?"":"phoneme-select-block__cell-jamo-part--empty",se?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[n.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${O==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:O==="\uC5C6\uC74C"?"x":O||d}),se&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:z??I})]},I)}),[e,d]),U=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(be,{htmlType:"button",size:40,type:q?"dot":void 0,icon:"info",label:q?void 0:R("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:R("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:Z?"is-selected":void 0,"aria-expanded":!!Z,"aria-haspopup":"dialog",onClick:S=>F(S.currentTarget)})}),Z&&n.jsx(Yn,{title:R("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:$,anchorRect:Z,onClose:K})]});return n.jsxs(ya,{type:x,title:p,icon:m,disc:g,action:y?U:void 0,className:we("phoneme-select-block",h),children:[w,!k&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(An,{options:G,value:String(a),onChange:M,size:40,ariaLabel:R("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),n.jsx("div",{className:"phoneme-select-block__cells",children:N?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((S,I)=>{const O=t[I*2]??{};return n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:Y(O)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:P(I+1)})]},I)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:R("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((S,I)=>{const O=t[I*2+1]??{};return n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:Y(O)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:L(I+1)})]},I)})})]}):t.map((S,I)=>n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:Y(S)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:P(I+1)})]},I))}),(i||u)&&n.jsx("div",{className:"phoneme-select-block__panels",children:n.jsx("div",{className:"phoneme-select-block__detail",children:N?n.jsxs("div",{className:"phoneme-select-block__pair-panels",children:[n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((S,I)=>{const O=t[I*2]??{};return n.jsx($n,{title:Q(P(I+1),I===0),sections:u?u(O,I*2):i,selected:O,onSelect:c?.(I*2),align:"newline"},I)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((S,I)=>{const O=t[I*2+1]??{};return n.jsx($n,{title:L(I+1),sections:u?u(O,I*2+1):i,selected:O,onSelect:c?.(I*2+1),align:"newline"},I)})})]}):t.map((S,I)=>n.jsx($n,{title:Q(P(I+1),I===0),sections:u?u(S,I):i,selected:S,onSelect:c?.(I),align:"newline"},I))})}),E&&n.jsx("div",{className:"phoneme-select-block__before-search",children:E}),(C||b||_)&&(()=>{const S=t.every(I=>{const O=of(I);return Object.entries(O).every(([z,se])=>!se||z==="coda"&&se===Ll)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:S?v:void 0,children:[C&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:R("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:S,onClick:S?void 0:C}),b?n.jsx(be,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:_?n.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:B??R("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:S||f||_,onDisabledClick:_?()=>{}:void 0,"aria-busy":_||void 0,onClick:b}):_?n.jsxs("div",{className:"phoneme-select-block__checking","aria-busy":"true",children:[n.jsx("div",{className:"phoneme-select-block__spinner"}),n.jsx("span",{className:"button-1 phoneme-select-block__checking-label",children:B??R("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),D]})}function Xx({title:e,sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:d,className:h}){const{t:p}=_e.useTranslation();return n.jsx($n,{className:h,title:e??p("wordSearch.filterTitle","\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815"),sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:d,align:"inline"})}function Jx({title:e,headerAction:t,sections:a,selected:r,onSelect:s,className:l}){const{t:i}=_e.useTranslation();return a.length===0?null:n.jsx($n,{className:l,title:e??i("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:a,selected:r,onSelect:s,align:"newline"})}function Qx({title:e,mode:t,onModeChange:a,matchMode:r,onMatchModeChange:s,positionCount:l,onPositionCountChange:i,inputMode:u,onInputModeChange:c,className:d}){const{t:h}=_e.useTranslation(),p={searchMode:h("wordPairs.filter.searchModeLabel","\uB300\uB9BD \uBC29\uC2DD"),phonemeOrder:h("wordPairs.filter.phonemeOrder","\uC785\uB825 \uC74C\uC808 \uC704\uCE58"),count:h("wordPairs.filter.countLabel","\uC785\uB825 \uC74C\uC808 \uAC2F\uC218"),inputMode:h("wordPairs.filter.inputModeLabel","\uC785\uB825 \uBC29\uC2DD"),orderAny:h("wordPairs.filter.orderAny","\uBB34\uAD00"),orderMatch:h("wordPairs.filter.orderMatch","\uC77C\uCE58"),include:h("wordPairs.mode.include","\uC74C\uC18C \uD3EC\uD568"),pick:h("wordPairs.mode.pick","\uC74C\uC18C \uB300\uB9BD"),explicit:h("wordPairs.mode.contrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815"),charInput:h("wordPairs.input.char","\uAE00\uC790 \uC120\uD0DD"),pronInput:h("wordPairs.input.pron","\uBC1C\uC74C \uC120\uD0DD")},m=b=>h("wordPairs.count",{n:b}),g=[{label:p.searchMode,items:[p.include,p.pick,p.explicit],display:"segmented",labelAction:n.jsx(qa,{title:h("wordPairs.mode.infoTitle","\uB300\uB9BD \uBC29\uC2DD"),items:[h("wordPairs.mode.infoInclude","\uC74C\uC18C \uD3EC\uD568 \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uBAA8\uB450 \uB4E4\uC5B4\uAC04 \uB2E8\uC5B4\uC640 \uADF8 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694."),h("wordPairs.mode.infoPick","\uC74C\uC18C \uB300\uB9BD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uB300\uB9BD\uC30D \uB450 \uB2E8\uC5B4\uC758 \uC2E4\uC81C \uCC28\uC774\uC810\uC77C \uB54C\uB9CC \uB9E4\uCE6D\uB3FC\uC694."),h("wordPairs.mode.infoContrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815 \u2014 \uAE30\uC900 \uB2E8\uC5B4\uC640 \uB300\uB9BD \uB2E8\uC5B4\uC758 \uC74C\uC18C\uB97C \uAC01\uAC01 \uC9C1\uC811 \uC120\uD0DD\uD574 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694.")]})},{label:p.phonemeOrder,items:[p.orderAny,p.orderMatch],display:"segmented",labelAction:n.jsx(qa,{items:h("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:p.count,items:[m(1),m(2)],display:"segmented"},{label:p.inputMode,items:[p.charInput,p.pronInput],display:"segmented",labelAction:n.jsx(qa,{title:h("wordPairs.input.infoTitle","\uC785\uB825 \uBC29\uC2DD"),items:[h("wordPairs.input.infoChar","\uAE00\uC790 \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uB2E8\uC5B4(\uAE00\uC790 \uAE30\uC900)\uB97C \uCC3E\uC740 \uD6C4, \uB2E8\uC5B4\uC758 \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4."),h("wordPairs.input.infoPron","\uBC1C\uC74C \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4.")]})}],y={[p.searchMode]:t==="explicit"?p.explicit:t==="pick"?p.pick:p.include,[p.phonemeOrder]:r==="ordered"?p.orderMatch:p.orderAny,[p.count]:m(l),[p.inputMode]:u==="phoneme"?p.pronInput:p.charInput},C=(b,v)=>{v===p.searchMode?a(b===p.explicit?"explicit":b===p.pick?"pick":"include"):v===p.phonemeOrder?s(b===p.orderMatch?"ordered":"unordered"):v===p.count?i(b===m(2)?2:1):v===p.inputMode&&c(b===p.pronInput?"phoneme":"word")};return n.jsx($n,{className:d,title:e??h("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:g,selected:y,onSelect:C,align:"inline"})}function ew(e){const{title:t,items:a,columns:r,resizeStorageKey:s,gridTemplateColumns:l,mobileGridTemplateColumns:i,searchPlaceholder:u,searchFn:c,defaultSortKey:d,defaultSortAsc:h=!0,selectedId:p,selectedIds:m,onSelect:g,onClose:y,pageSizeOptions:C=[10,25,50,100],initialPageSize:b,emptyText:v,noMatchText:f,countLabel:B,topContent:_,className:N=""}=e,{t:x}=_e.useTranslation(),E=u??x("common.search","\uAC80\uC0C9"),w=v??x("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),D=f??x("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[k,A]=o.useState(""),[R,$]=o.useState(d??r[0]?.key??""),[G,T]=o.useState(h),[P,L]=o.useState(String(b??C[0]??10)),[Q,Z]=o.useState(1);o.useEffect(()=>{Z(1)},[k,P]);const F=c!==null,K=o.useCallback((te,de)=>{if(!de)return!0;const ee=de.toLowerCase();return r.some(V=>{const ne=te[V.key];return ne==null?!1:String(ne).toLowerCase().includes(ee)})},[r]),M=c??K,q=o.useMemo(()=>{const te=F?a.filter(de=>M(de,k)):a;return R?[...te].sort((de,ee)=>{const V=de[R],ne=ee[R];return V===ne?0:hr(V,ne,G)}):te},[a,k,R,G,F,M]),Y=Math.max(1,Math.ceil(q.length/Number(P)));Q>Y&&Z(Y);const U=Math.min(Q,Y),S=q.slice((U-1)*Number(P),U*Number(P)),I=o.useCallback(te=>{R===te?T(de=>!de):($(te),T(!0)),Z(1)},[R]),O=o.useMemo(()=>{if(typeof B=="function"){const te=q.length,de=B(te);if(typeof de=="string"){const ee=de.lastIndexOf(String(te));if(ee>=0)return{prefix:de.slice(0,ee),suffix:de.slice(ee+String(te).length)}}return{label:de}}if(typeof B=="string"&&B.includes("{n}")){const[te,de]=B.split("{n}");return{prefix:te,suffix:de}}return{prefix:x("common.totalCountPrefix","\uCD1D "),suffix:x("common.totalCountSuffix","\uAC1C")}},[B,q.length,x]),z=o.useMemo(()=>r.map(te=>({label:te.label,onClick:te.sortable!==!1?()=>I(te.key):void 0,className:te.className,sortDir:te.sortable!==!1&&R===te.key?G?"asc":"desc":null})),[r,R,G,I]),se=o.useMemo(()=>C.map(te=>({value:String(te),label:x("common.pageSizeLabel",{n:te})})),[C,x]);return n.jsxs(Hn,{className:`popup-list ${N}`,title:t,onClose:y,children:[_,"label"in O&&n.jsx("p",{className:"toolbar__count body-1",children:O.label}),n.jsx(Io,{count:"label"in O?void 0:{value:q.length,prefix:O.prefix,suffix:O.suffix},search:F?{value:k,onChange:A,placeholder:E}:void 0,pageSize:{options:se,value:P,onChange:L},pagination:{page:U,total:Y,onChange:Z}}),n.jsx(Yo,{size:"medium",gridTemplateColumns:l,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:s,fields:z,items:S,onRowClick:g,renderRow:te=>{const de=m!=null?te.id!=null&&m.has(te.id):p!=null&&te.id===p;return r.map(ee=>({content:ee.render?ee.render(te):te[ee.key]??"",className:we(ee.className,de&&"popup-list__row--selected")}))},empty:F&&k!==""&&a.length>0?D:w})]})}function Cd(e){const{title:t,message:a,topContent:r,details:s,children:l,confirmLabel:i,cancelLabel:u,hideCancel:c=!1,extraAction:d,confirmVariant:h="main",confirmDisabled:p=!1,onConfirm:m,closeOnConfirm:g=!0,onClose:y,inline:C,size:b="small",className:v,initialFocus:f="close"}=e,{t:B}=_e.useTranslation(),_=o.useRef(null);o.useEffect(()=>{if(C||f==="close")return;const k=_.current?.closest(".popup-panel"),A=Array.from(k?.querySelectorAll(".popup-footer--buttons button")??[]),R=f==="confirm"?A[A.length-1]:c?void 0:A[d?1:0];R&&!R.disabled&&R.focus()},[]);const N=o.useRef(!1),[x,E]=o.useState(!1),w=k=>{let A=!1;return{close:()=>{A=!0,k()},didClose:()=>A}},D=async k=>{if(N.current)return;N.current=!0;const A=typeof document<"u"?document.activeElement:null;E(!0);let R=!1;try{R=await k()}catch($){typeof console<"u"&&console.error($)}finally{R||(N.current=!1,E(!1),requestAnimationFrame(()=>{const $=document.activeElement;(!$||$===document.body)&&A?.isConnected&&A.focus()}))}};return n.jsxs(Hn,{title:t,onClose:y,closeDisabled:x,inline:C,size:b,className:we("confirm-popup",r!=null&&"confirm-popup--has-top",v),buttons:[...d?[{label:d.label,variant:d.variant??"default",disabled:d.disabled||x,onClick:async({closeWithAnimation:k})=>{await D(async()=>{const A=w(k);await d.onClick(A.close);const R=d.closeOnClick??!0;return R&&k(),R||A.didClose()})}}]:[],...c?[]:[{label:u??B("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:x,onClick:({closeWithAnimation:k})=>k()}],{label:i??B("common.confirm","\uD655\uC778"),variant:h,disabled:p||x,onClick:async({closeWithAnimation:k})=>{await D(async()=>{const A=w(k);return await m(A.close),g&&k(),g||A.didClose()})}}],children:[r!=null&&n.jsx("div",{className:"confirm-popup__top",children:r}),s&&s.length>0&&n.jsx(Er,{children:s.map((k,A)=>n.jsx(Rn,{label:k.label,children:n.jsx("span",{className:"panel-row__text body-2",children:k.value})},A))}),n.jsx("p",{ref:_,className:"body-2 confirm-popup__message",children:a}),l]})}function tw(e,t,a={}){const{t:r}=_e.useTranslation(),[s,l]=o.useState(!1),i=o.useRef(!1),u=o.useCallback(()=>{i.current=!0},[]),c=o.useCallback(()=>i.current?(i.current=!1,!0):e?(l(!0),!1):!0,[e]),d=s?n.jsx(Cd,{title:a.title??r("common.discardConfirm.title","\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?"),message:a.message??r("common.discardConfirm.body","\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4."),confirmLabel:a.confirmLabel??r("common.discardConfirm.confirm","\uC785\uB825 \uCDE8\uC18C"),confirmVariant:"danger",onConfirm:()=>{l(!1),t()},onClose:()=>l(!1)}):null;return{beforeClose:c,discardPopup:d,allowClose:u}}function nw({onApply:e,onCancel:t}){const{t:a}=_e.useTranslation(),[r,s]=o.useState(""),[l,i]=o.useState(!1),[u,c]=o.useState(null),d=o.useRef(null),h=o.useId();o.useEffect(()=>{d.current?.focus()},[]);const p=o.useCallback(async y=>{const C=r.trim();if(C){i(!0),c(null);try{await e(C),y()}catch(b){c(Il(b)),i(!1),requestAnimationFrame(()=>d.current?.focus())}}},[r,e]),m=o.useCallback((y,C)=>{y.key==="Enter"&&!y.nativeEvent.isComposing&&p(C)},[p]),g=y=>{s(y.target.value),c(null)};return n.jsx(Hn,{className:"coupon-input-popup",title:a("usage.couponButton","\uCFE0\uD3F0 \uC785\uB825"),size:"small",onClose:t,closeDisabled:l,buttons:[{label:a("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:l,onClick:({closeWithAnimation:y})=>y()},{label:a("coupons.applyButton","\uC801\uC6A9"),variant:"main",disabled:!r.trim()||l,onClick:({closeWithAnimation:y})=>{p(y)}}],children:({closeWithAnimation:y})=>n.jsxs(n.Fragment,{children:[n.jsx("input",{ref:d,className:"coupon-input-popup__input body-2","aria-label":a("coupons.input.label","\uCFE0\uD3F0 \uCF54\uB4DC"),"aria-invalid":u?!0:void 0,"aria-errormessage":u?h:void 0,"aria-describedby":u?h:void 0,placeholder:a("coupons.input.placeholder","\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"),value:r,onChange:g,onKeyDown:C=>m(C,y),disabled:l,autoComplete:"off",spellCheck:!1}),u&&n.jsx("p",{id:h,className:"coupon-input-popup__error caption-1",role:"alert",children:u})]})})}const fd=["var(--color-main)","var(--color-sub)"],aw=2e3;function rw(e,t){if(!t.startsWith("var("))return t;try{const a=t.slice(4,-1).trim();return getComputedStyle(e).getPropertyValue(a).trim()||null}catch{return null}}function Ss({active:e=!1,count:t=40,duration:a=2e3,strength:r=1,onComplete:s,trigger:l=0}){const i=o.useMemo(()=>{const C=Math.floor(t/2),b=t-C,v=(f,B)=>Array.from({length:f}).map((_,N)=>{const x=6+Math.random()*12,E=Math.round(Math.min(18,x*Math.min(1.5,1+r*.4))),w=fd[Math.floor(Math.random()*fd.length)],D=Math.random()*300,k=(360+Math.random()*260)*r*1.2,A=(B==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,R=Math.cos(A)*k,$=Math.sin(A)*k*1.35,G=Math.random()*720-360,T=(1200+Math.random()*3e3)*Math.min(1.6,1+r*.3),P=Math.random()>.7?"50%":"3px";return{id:`${B}-${N}`,side:B,size:E,color:w,delay:D,vx:R,vy:$,angularVel:G,life:T,borderRadius:P}});return[...v(C,"left"),...v(b,"right")]},[t,r]),u=o.useRef(null),c=o.useRef({}),d=o.useRef(null),h=o.useRef(s);o.useEffect(()=>{h.current=s},[s]);const p=o.useRef(null),m=o.useRef(null),g=()=>{if(typeof document>"u")return null;let C=document.querySelector("[data-ihab-effect-root]");return C||(C=document.createElement("div"),C.className="app-effect",C.dataset.ihabEffectRoot="",C.style.position="fixed",C.style.inset="0",C.style.pointerEvents="none",C.style.zIndex="99998",document.body.appendChild(C)),C};if(typeof document<"u"&&m.current==null&&(m.current=g()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const K=setTimeout(()=>h.current?.(),0);return()=>clearTimeout(K)}const C=1200,b=performance.now(),v=m.current&&m.current!==document.body?m.current.getBoundingClientRect():null,f=Math.max(60,(window.innerHeight||800)*.05),B=K=>Math.max(40,(K||window.innerWidth)*.02),_=v?.width||window.innerWidth||375,N=v?.height||window.innerHeight||812,x=K=>{const M=[...K].sort((q,Y)=>q-Y);return M[Math.floor(M.length/2)]||1},E=x(i.map(K=>Math.abs(K.vy))),w=x(i.map(K=>Math.abs(K.vx))),D=Math.sqrt(2*C*(N*.72+f))/E,k=E*D/C,A=_*.5/(w*k),R=(K,M,q)=>Math.min(q,Math.max(M,K)),$=R(D,.8,2.4),G=R(A,.7,2.2),T=a>0?a/aw:1,P=i.map(K=>({...K,life:K.life*T,vx:K.vx*G,vy:K.vy*$,startTime:b+K.delay,ended:!1})),L=v?{x:v.left-B(v.width),y:v.top+v.height+f}:{x:-B(window.innerWidth),y:window.innerHeight+f},Q=v?{x:v.left+v.width+B(v.width),y:v.top+v.height+f}:{x:window.innerWidth+B(window.innerWidth),y:window.innerHeight+f},Z=K=>{let M=!1;for(const q of P){const Y=c.current[q.id];if(!Y||!Y)continue;if(K<q.startTime){Y.style.display="none",M=!0;continue}if(!q._inited){const V=q.side==="left"?L.x:Q.x,ne=q.side==="left"?L.y:Q.y;Y.style.left=`${V}px`,Y.style.top=`${ne}px`,Y.style.transform="translate3d(0px, 0px, 0)",Y.style.display="block",Y.style.zIndex="100000",typeof q.color=="string"&&q.color.startsWith("var(")&&(Y.style.background=rw(Y,q.color)??"#FF0060"),q._inited=!0}const U=(K-q.startTime)/1e3;if(U<0)continue;const S=q.life/1e3;if(U>=S){Y.style.opacity="0",Y.style.display="none",q.ended=!0;continue}M=!0;const I=q.side==="left"?L.x:Q.x,O=q.side==="left"?L.y:Q.y,z=I+q.vx*U,se=O+q.vy*U+.5*C*U*U,te=(q.angularVel||0)*U,de=z-I,ee=se-O;Y.style.transform=`translate3d(${de}px, ${ee}px, 0) rotate(${te}deg)`,Y.style.opacity=`${Math.max(0,1-U/S)}`}M?d.current=requestAnimationFrame(Z):h.current?.()};d.current=requestAnimationFrame(Z);const F=setTimeout(()=>{try{if((m.current?m.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const K=document.createElement("div");K.className="party-container",K.style.position="fixed",K.style.inset="0",K.style.pointerEvents="none",K.style.overflow="visible",K.style.zIndex="2147483647";for(const M of i){const q=document.createElement("span");q.className=`confetti confetti--${M.side}`,q.setAttribute("aria-hidden","true"),q.style.display="none",q.style.position="fixed",q.style.left="0px",q.style.top="0px",q.style.width=`${M.size}px`,q.style.height=`${Math.max(4,M.size*.6)}px`,q.style.background=M.color,q.style.borderRadius=M.borderRadius,q.style.transform="translate3d(0,0,0)",q.style.opacity="0",K.appendChild(q),c.current[M.id]=q}(document.body||m.current).appendChild(K),p.current=K}}catch{}},300);return()=>{if(d.current&&cancelAnimationFrame(d.current),clearTimeout(F),p.current){try{p.current.remove()}catch{}p.current=null}}},[e,a,l,i]),!e)return null;const y=n.jsx("div",{className:"party-container",ref:u,children:i.map(C=>n.jsx("span",{"aria-hidden":!0,ref:b=>{c.current[C.id]=b},className:`confetti confetti--${C.side}`,style:{width:`${C.size}px`,height:`${Math.max(4,C.size*.6)}px`,background:C.color,borderRadius:C.borderRadius}},`${C.id}-${l}`))});return typeof document<"u"?cn.createPortal(y,m.current||document.body):y}const js=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function ow({trigger:e=0,active:t=!1}){const[a,r]=o.useState(null);o.useEffect(()=>{if(typeof window>"u")return;const l=i=>{const u=i.detail??{};r(c=>({n:(c?.n??0)+1,count:js(u.count),strength:js(u.strength),duration:js(u.duration)}))};return window.addEventListener("party:trigger",l),()=>window.removeEventListener("party:trigger",l)},[]);const s=o.useCallback(()=>r(null),[]);return n.jsxs(n.Fragment,{children:[n.jsx(Ss,{active:t,trigger:e}),a&&n.jsx(Ss,{active:!0,trigger:a.n,count:a.count,strength:a.strength,duration:a.duration,onComplete:s})]})}function sw({title:e,sub:t,rightAction:a,titleAction:r,badge:s,badgeVariant:l="default",documentTitle:i,onBack:u,backLabel:c,wrap:d=!1}){const{t:h}=_e.useTranslation();ky(typeof e=="string"?e:i??null);const p=c??h("common.back","\uB4A4\uB85C");return n.jsxs("div",{className:d?"page-title page-title--wrap":"page-title",children:[n.jsxs("div",{className:"page-title__main",children:[n.jsxs("div",{className:"page-title__title-row",children:[u&&n.jsx(be,{htmlType:"button",className:"page-title__back",size:48,type:"dot",icon:"chevron-left",iconSize:"large",useBorder:!1,iconColor:"var(--color-text-primary)",ariaLabel:p,showTooltipInfo:p,onClick:u}),n.jsx("h1",{className:"page-title__title h1",children:e}),s&&n.jsx("div",{className:"page-title__badge",children:n.jsx(jt,{label:s,size:"small",variant:l,fill:"outline"})}),r?n.jsx("div",{className:"page-title__title-action",children:r}):null]}),t&&n.jsx("p",{className:"page-title__sub body-2",children:t})]}),a?n.jsx("div",{className:"page-title__action",children:a}):null]})}function lw(e){return e??""}const bd=o.createContext({words:[],loading:!1});function iw(){return o.useContext(bd)}function uw({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c,children:d}){const h=o.useMemo(()=>({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c}),[e,t,a,r,s,l,i,u,c]);return n.jsx(bd.Provider,{value:h,children:d})}function cw({items:e,actions:t,columns:a,flat:r=!1,className:s,style:l}){const i=a??e.length;return n.jsx("section",{className:we("summary-strip",r&&"summary-strip--flat",s),style:{"--summary-strip-cols":String(i),...l},children:n.jsxs("div",{className:"summary-strip__row",children:[n.jsx("div",{className:"summary-strip__items",children:e.map((u,c)=>n.jsxs("div",{className:"summary-strip__item",children:[n.jsx("p",{className:"summary-strip__label caption-1",children:u.label}),n.jsx("p",{className:"summary-strip__value body-3b",title:typeof u.value=="string"||typeof u.value=="number"?String(u.value):void 0,children:u.value})]},c))}),t&&n.jsx("div",{className:"summary-strip__actions",children:t})]})})}const dw=(e,t)=>`${e} / ${t}`;function pw({blocks:e,sectionTitles:t,logo:a,footer:r,pageLabel:s=dw,pageWidth:l,pageHeight:i,margin:u,className:c,style:d}){const{t:h}=_e.useTranslation(),p=o.useRef(null),m=o.useRef(null),g=o.useRef(null),y=o.useRef(null),[C,b]=o.useState(null),[v,f]=o.useState(!1);o.useEffect(()=>{const T=p.current;if(!T)return;const P=()=>f(T.scrollWidth>T.clientWidth+1);if(P(),typeof ResizeObserver>"u")return;const L=new ResizeObserver(P);return L.observe(T),()=>L.disconnect()},[C]);const B=e.map(T=>`${T.id}\0${T.section??""}\0${T.group??""}`).join(""),_=C&&C.shape===B?C.pages:null,[N,x]=o.useState(0);o.useEffect(()=>{const T=y.current;if(!T||typeof ResizeObserver>"u")return;const P=new ResizeObserver(()=>x(T.offsetHeight));return P.observe(T),()=>P.disconnect()},[]);const[E,w]=o.useState(0);o.useEffect(()=>{const T=m.current;if(!T||typeof ResizeObserver>"u")return;let P=null;const L=typeof requestAnimationFrame=="function"?F=>requestAnimationFrame(F):F=>setTimeout(F,16),Q=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:F=>clearTimeout(F),Z=new ResizeObserver(()=>{P==null&&(P=L(()=>{P=null,w(F=>F+1)}))});return Array.from(T.children).forEach(F=>Z.observe(F)),()=>{Z.disconnect(),P!=null&&Q(P)}},[B]),o.useLayoutEffect(()=>{const T=m.current,P=y.current;if(!T||!P)return;const L=S=>S.getBoundingClientRect().height||S.offsetHeight,Q=new Map;g.current?.querySelectorAll("[data-chrome-section]").forEach(S=>{Q.set(S.dataset.chromeSection??"",L(S))});const Z=S=>L(P)-(Q.get(S??"")??0),F=Array.from(T.children).map(S=>L(S)),K=[];e.forEach((S,I)=>{const O=K[K.length-1],z=O?e[O[0]]:void 0;z&&S.group!=null&&z.group===S.group&&z.section===S.section?O.push(I):K.push([I])});const M=[];let q=[],Y=0;const U=()=>{q.length&&M.push(q),q=[],Y=0};K.forEach(S=>{const I=S.reduce((z,se)=>z+F[se],0),O=Z(e[S[0]].section);q.length&&e[q[0]].section!==e[S[0]].section&&U(),I>O?S.forEach(z=>{q.length&&Y+F[z]>O+.01&&U(),q.push(z),Y+=F[z]}):(q.length&&Y+I>O+.01&&U(),S.forEach(z=>q.push(z)),Y+=I)}),U(),b(S=>S&&S.shape===B&&JSON.stringify(S.pages)===JSON.stringify(M)?S:{shape:B,pages:M})},[B,N,l,i,u,E]);const D=Mo,k=D,A=r??n.jsxs(n.Fragment,{children:[n.jsx("img",{src:k,alt:"IHAB",className:"report-doc__logo"}),"\xA9 IHAB, Inc. All rights reserved."]}),R=(T,P,L)=>({header:n.jsxs("div",{className:"report-doc__header",children:[n.jsx("h2",{className:"report-doc__title h3b",children:L!=null&&t?.[L]||null}),a]}),footer:n.jsxs("div",{className:"report-doc__footer caption-1",children:[n.jsx("span",{className:"report-doc__footer-left",children:A}),n.jsx("span",{className:"report-doc__page-no",children:s(T,P)})]})}),$=Array.from(new Set(e.map(T=>T.section??""))),G={...l?{"--report-page-w":l}:null,...i?{"--report-page-h":i}:null,...u?{"--report-margin":u}:null,...d};return n.jsxs("div",{ref:p,className:we("report-doc",c),style:G,tabIndex:v?0:void 0,role:v?"group":void 0,"aria-label":v?h("report.previewRegion","\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30"):void 0,children:[n.jsxs("div",{className:"report-doc__measure","aria-hidden":!0,children:[n.jsx("div",{ref:y,className:"report-doc__ruler"}),n.jsx("div",{ref:g,children:$.map(T=>{const P=R(1,1,T||void 0);return n.jsxs("div",{"data-chrome-section":T,children:[P.header,P.footer]},T)})}),n.jsx("div",{ref:m,className:"report-doc__measure-blocks",children:e.map(T=>n.jsx("div",{children:T.content},T.id))})]}),_&&n.jsx("div",{className:"report-doc__pages",children:_.map((T,P)=>{const{header:L,footer:Q}=R(P+1,_.length,e[T[0]].section);return n.jsxs("section",{className:"report-doc__page",children:[L,T.map(Z=>n.jsx("div",{children:e[Z].content},e[Z].id)),Q]},P)})})]})}function hw({title:e,fields:t,columns:a=4,className:r,style:s}){return n.jsxs("div",{className:we("report-info",r),style:{"--report-info-cols":String(a),...s},children:[e&&n.jsx("p",{className:"report-info__title h5b",children:e}),n.jsx("div",{className:"report-info__grid",children:t.map((l,i)=>n.jsxs("div",{className:"report-info__field body-2",children:[n.jsx("span",{className:"report-info__label body-3",children:l.label}),n.jsx("span",{className:"report-info__value",children:l.value})]},i))})]})}const ra=new Map;let $r=null;const mw=12;function Cw(e){for(let t=e.parentElement;t&&t!==document.body;t=t.parentElement){const a=window.getComputedStyle(t);if(a.transform&&a.transform!=="none"||a.filter&&a.filter!=="none"||a.perspective&&a.perspective!=="none"||/paint|layout|strict|content/.test(a.contain||""))return t}return document}function Rr(){const e=new Map;for(const t of ra.keys()){if(!t.isConnected)continue;const a=Cw(t),r=e.get(a)??[];r.push(t),e.set(a,r)}for(const t of e.values()){t.sort((r,s)=>r.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1);let a=0;for(const r of t){a>0?r.style.setProperty("--update-alert-stack-offset",`${a}px`):r.style.removeProperty("--update-alert-stack-offset");const s=r.getBoundingClientRect().height;s>0&&(a+=s+mw)}}}function fw(e){return typeof window>"u"?()=>{}:(ra.set(e,(ra.get(e)??0)+1),ra.get(e)===1&&typeof ResizeObserver<"u"&&($r??($r=new ResizeObserver(()=>Rr())),$r.observe(e)),Rr(),()=>{const t=(ra.get(e)??1)-1;if(t>0){ra.set(e,t),Rr();return}ra.delete(e),$r?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),Rr()})}function bw({title:e,message:t,actionLabel:a,onAction:r,icon:s,onClose:l,className:i=""}){const{t:u}=_e.useTranslation(),c=a??u("common.update","\uC5C5\uB370\uC774\uD2B8"),d=o.useRef(null),h=o.useRef(!1);return o.useLayoutEffect(()=>{const p=d.current,m=p?.parentElement?.closest(".update-alert-stack")??p,g=m?fw(m):null;return()=>{g?.(),h.current&&p&&p.contains(document.activeElement)&&cr(p)}},[]),n.jsxs("div",{ref:d,className:we("update-alert",i),role:"alert",children:[l&&n.jsx("button",{type:"button",className:"update-alert__close",onClick:()=>{h.current=!0,l()},"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"}),n.jsxs("div",{className:"update-alert__top",children:[n.jsx("div",{className:"update-alert__icon",children:s??n.jsx(Hs,{size:20,strokeWidth:2})}),n.jsxs("div",{className:"update-alert__body",children:[n.jsx("div",{className:"update-alert__title h4",children:e}),n.jsx("div",{className:"update-alert__message body-3",children:t})]})]}),r&&n.jsx(be,{htmlType:"button",size:32,variant:"main",shape:"pill",className:"update-alert__action",onClick:r,children:c})]})}function gw({title:e,titleLevel:t=3,description:a,topActions:r,children:s,footerLeft:l,footerRight:i,ariaLabel:u,onClick:c,draggable:d,onDragStart:h,onDragEnd:p,className:m}){const g=t?`h${t}`:"div",y=l!=null||i!=null,C=s!=null&&s!==!1,b=o.useCallback(v=>{c&&v.target===v.currentTarget&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),c())},[c]);return n.jsxs("div",{className:we("training-card",c?"training-card--clickable":"",m),onClick:c,onKeyDown:c?b:void 0,role:c?"button":void 0,"aria-label":c?u??(typeof e=="string"?e:void 0):void 0,tabIndex:c?0:void 0,draggable:d,onDragStart:h,onDragEnd:p,children:[n.jsxs("div",{className:"training-card__header",children:[n.jsxs("div",{className:"training-card__title-row",children:[typeof e=="string"?n.jsx(g,{className:"training-card__title h4",children:e}):e,r!=null&&n.jsx("div",{className:"training-card__top-actions",onClick:v=>v.stopPropagation(),children:r})]}),a!=null?typeof a=="string"?n.jsx("p",{className:"training-card__description body-3",children:a}):a:n.jsx("p",{className:"training-card__description body-3","aria-hidden":"true",children:" "})]}),C&&n.jsx("div",{className:"training-card__body",children:s}),y&&n.jsxs("div",{className:"training-card__footer",children:[l!=null&&n.jsx("div",{className:"training-card__footer-left",children:l}),i!=null&&n.jsx("div",{className:"training-card__meta",children:i})]})]})}function yw({title:e,titleLevel:t=3,count:a,collapsed:r=!1,onToggle:s,beforeSort:l,sort:i,actions:u,empty:c=!1,emptyContent:d,dragOver:h=!1,onDragOver:p,onDragLeave:m,onDrop:g,children:y,className:C}){const{t:b}=_e.useTranslation(),v=o.useId(),f=t?`h${t}`:"span",B=s!=null,_=we("training-card-group",h&&"training-card-group--dragover",r&&"training-card-group--collapsed",B&&"training-card-group--collapsible",C);return n.jsxs("div",{className:_,onDragOver:p,onDragLeave:m,onDrop:g,role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?v:void 0,children:[n.jsxs("header",{className:"training-card-group__header",children:[B&&n.jsx(be,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:r?"chevron-right":"chevron-down",ariaLabel:typeof e=="string"&&e?r?b("common.expandFor",{name:e}):b("common.collapseFor",{name:e}):r?b("common.expand","\uD3BC\uCE58\uAE30"):b("common.collapse","\uC811\uAE30"),className:"training-card-group__chevron","aria-expanded":!r,onClick:s}),typeof e=="string"?n.jsx(f,{id:v,className:"training-card-group__title h5b",children:e}):e,a!==void 0&&n.jsx("span",{className:"training-card-group__count body-3b",children:a}),(l!=null||i||u!=null)&&n.jsxs("span",{className:"training-card-group__actions",onClick:N=>N.stopPropagation(),children:[l,i&&n.jsx(gn,{size:40,options:i.options,value:i.value,placeholder:i.placeholder,onChange:i.onChange,ariaLabel:typeof e=="string"&&e?b("common.sortFor",{name:e}):void 0}),u]})]}),!r&&(c?n.jsx("div",{className:"training-card-group__empty body-3",children:d}):n.jsx("div",{className:"training-card-group__grid",children:y}))]})}const vw="speechear:saved_word_tables";function _w(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.id=="string"&&typeof t.name=="string"&&Array.isArray(t.items)}function xw(){try{const e=localStorage.getItem(vw);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(_w):[]}catch{return[]}}function gd(e){return{label:e.word,subLabel:e.pronunciation,colloquialLabel:e.colloquialPronunciation,homonum:e.homonum,grade:e.grade,syllables:[...e.word].length,pos:e.pos,wordType:e.wordType}}function Ts(e){return e.map(t=>t.homonum!=null?`${t.word}#${t.homonum}`:t.word).join("|")}function ww(e){const t=new Set;return e.map(a=>{let r=a.id;for(let s=2;t.has(r);s++)r=`${a.id}~${s}`;return t.add(r),r===a.id?a:{...a,id:r}})}function Bw({title:e,titleIcon:t,disc:a,filterTitle:r,filterCollapsible:s,filterDefaultCollapsed:l,filterCollapsed:i,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:d,code:h,baseItem:p,baseContentTypes:m,cellCapacity:g,maxItemsPerPage:y,items:C,onSaveComplete:b,onLoad:v,onRemoveItem:f,onCopyItem:B,onReset:_,resetLabel:N,saveButtonLabel:x,secondarySaveButtonLabel:E,onReorder:w,showCellCount:D,onAddItem:k,className:A,renderSavePopup:R,renderWordSearch:$,hideControls:G,saveOnly:T,tableName:P,nameValue:L,onNameChange:Q,descriptionValue:Z,onDescriptionChange:F,namePlaceholder:K,descriptionPlaceholder:M,existingNames:q,editingName:Y,onCancel:U,initialItemsPerPage:S,renderCellAction:I,actionsLeftExtra:O}){const{t:z}=_e.useTranslation(),se=N??z("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),te=C===void 0,de=!!Q,[ee,V]=o.useState([]),ne=(L??"").trim(),W=ne||(K??"").trim(),H=(Z??"").trim()||(M??"").trim(),ie=(q??[]).map(ae=>ae.trim().toLowerCase()),Te=[Y?.trim().toLowerCase(),...ee].filter(ae=>!!ae),ye=[...ie];for(const ae of Te){const Ce=ye.indexOf(ae);Ce!==-1&&ye.splice(Ce,1)}const he=ne!==""&&ye.includes(ne.toLowerCase()),[Se,$e]=o.useState(Array(4).fill(null)),[Ne,ue]=o.useState(4),[xe,ke]=o.useState(null),Ee=Se.slice(0,Ne),We=!!d?.show,[He,ot]=o.useState(!0),[Qe,Je]=o.useState(!0),vt=d&&{...d,top:He,bottom:Qe},[je,Ye]=o.useState("landscape"),[Be,Ue]=o.useState([...dc]),[qe,pt]=o.useState("show"),[_t,Et]=o.useState(!0),[wt,st]=o.useState(!0),tt=o.useRef(null),Bt=o.useRef([]),[kt,Tt]=o.useState(S==="all"?Number.POSITIVE_INFINITY:S??8),[Lt,gt]=o.useState("right"),[it,ut]=o.useState(!1),[ct,ve]=o.useState(!1),{toastMessage:Me,toastType:Pe,showWarning:Oe,clearToast:dt}=Vi("warning"),Dt=o.useCallback(()=>ke(null),[ke]);k&&!te&&!D&&!g&&At("word-table-block-add-without-cell-count",'[WordTableBlock] \uD45C\uC2DC \uBAA8\uB4DC\uC5D0\uC11C onAddItem \uC740 cellCapacity \uB098 showCellCount \uC640 \uD568\uAED8 \uC918\uC57C "\uCD94\uAC00\uD558\uAE30" \uCE78\uC774 \uC0DD\uAE34\uB2E4.'),p&&te&&At("word-table-block-base-item-in-edit","[WordTableBlock] baseItem \uC740 \uD45C\uC2DC \uBAA8\uB4DC(items \uB97C \uC8FC\uB294 \uAF34)\uC5D0\uC11C\uB9CC \uAC78\uB9B0\uB2E4 \u2014 \uD3B8\uC9D1 \uACA9\uC790\uC5D0\uB294 \uC11C\uC9C0 \uC54A\uB294\uB2E4.");const[yt,xt]=o.useState(()=>Math.max(C?.length??1,1)),Ct=Math.max(g??0,C?.length??0,1),Le=te?Ne:D?Math.max(yt,C?.length??1,1):Ct,{width:at,height:oe}=Qn[je],fe=!te&&!D,Ie=Math.max(1,Math.min(Ct,y??Ct)),Xe=Math.min(kt,Ie),et=fe?Xe:Le,rt=Math.ceil((C?.length??0)/Math.max(1,et)),$t=(C?.length??0)<Ct?Math.floor((C?.length??0)/Math.max(1,et))+1:0,xn=fe?Math.max(1,rt,$t):0,sn=fe?Array.from({length:xn},(ae,Ce)=>(C??[]).slice(Ce*et,(Ce+1)*et)):null,Rt=!!sn&&sn.length>1,zt=te?Ee.some(ae=>ae!==null&&ae.length>1):(C??[]).some(ae=>(ae.words??[]).length>1),ln=P?.trim()||`${Ul(Ra())} ${zt?z("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):z("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,It=o.useCallback(()=>Rt?Bt.current.filter(ae=>ae!==null):tt.current?[tt.current]:[],[Rt]),{print:wn,openNewWindow:Qt,downloadHtml:St}=cs({getElements:It,paperW:at,paperH:oe,fileName:ln,onPopupBlocked:()=>{Oe(z("wordTable.popupBlocked","\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694."))}}),Pt=ae=>{ue(ae),$e(Ce=>Ce.length>=ae?Ce:[...Ce,...Array(ae-Ce.length).fill(null)]),ke(null)},Ht=ae=>{$e(Ce=>{const Fe=[...Ce];return Fe[ae]=null,Fe}),xe===ae&&ke(null)},Yt=ae=>{if(xe===null)return;const Ce=xe;$e(lt=>{const ht=[...lt];return ht[Ce]=ae.length>0?ae:null,ht});const Fe=Ee.findIndex((lt,ht)=>ht>Ce&<===null);ke(Fe!==-1?Fe:null)},Cn=te?Ee.some(ae=>ae?.some(Ce=>!!Ce.colloquialPronunciation)):(C??[]).some(ae=>(ae.words??[]).some(Ce=>!!Ce.colloquialLabel)),Gt=!te&&pc([...p?[p]:[],...C??[]]),en=o.useMemo(()=>ia()?te?Se.slice(0,Ne).flatMap(ae=>(ae??[]).map(Ce=>[Ce.word,Ce.homonum])):(ae=>ae.flatMap(Ce=>(Ce.words??[]).map(Fe=>[Fe.label,Fe.homonum])))([...p?[p]:[],...C??[]]):[],[te,Se,Ne,C,p]),[un,fn]=o.useState(!1);o.useEffect(()=>{if(en.length===0)return;let ae=!1;return Promise.all(en.map(([Ce,Fe])=>Sl(Ce,Fe))).then(Ce=>{ae||fn(Ce.some(Boolean))},()=>{}),()=>{ae=!0}},[en]);const Vt=en.length>0&&un,Bn=o.useMemo(()=>[...te||D?[{label:z("wordTable.filter.columns","\uCE78 \uC218"),items:O4.map(ae=>({value:`${ae}\uCE78`,displayLabel:z("wordTable.filter.column",{count:ae})})),display:"segmented"}]:[],...fe&&(C?.length??0)>0?[vc(z,{hasPairs:zt,itemCount:Ct,max:y})]:[],...Rt?[W4(z)]:[]],[z,te,D,fe,C?.length,zt,Ct,y,Rt]),pe={...te||D?{[z("wordTable.filter.columns","\uCE78 \uC218")]:`${Le}\uCE78`}:{},...fe&&(C?.length??0)>0?{[z(zt?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${Xe}\uAC1C`}:{},...Rt?{[z("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:Lt}:{}},De=(ae,Ce)=>{Ce===z("wordTable.filter.columns","\uCE78 \uC218")?te?Pt(parseInt(ae)):xt(parseInt(ae)):Ce===z(zt?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")?Tt(_c(parseInt(ae),Ct)):Ce===z("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&>(xc(ae))},Re=te?ww(Ee.filter(ae=>ae!==null&&ae.length>0).map(ae=>({id:Ts(ae),words:ae.map(gd)}))):C??[],Ge=()=>{te&&$e(ae=>ae.length>Ne?ae.slice(0,Ne):ae)},ze=(ae=!1)=>{if(ve(ae),de&&b){const Ce=W.trim().toLowerCase();Ce&&V(Fe=>Fe.includes(Ce)?Fe:[...Fe,Ce]),b(W,Re,H||void 0,ae),Ge();return}if(T&&b){b("",Re,void 0,ae),Ge();return}if(b){ut(!0);return}St()},[X,ce]=o.useState(!1),[Ae,Ve]=o.useState(""),Ke=Ae.trim(),Ze=Ke!==""&&ie.includes(Ke.toLowerCase()),ft=()=>{Ve(W?z("wordTable.save.copyName",{name:W,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),ce(!0)},bt=()=>{!Ke||Ze||!b||(b(Ke,Re,H||void 0,!0),Ge(),ce(!1))},ge=Re.length===0,j=ge||de&&(W===""||he),J=()=>{if(ge){Oe(z("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(de&&W===""){Oe(z("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}de&&he&&Oe(z("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},me=n.jsx(va,{items:Re,orientation:je,contentTypes:Be,baseItem:p,baseContentTypes:m,cutLine:qe,showOutline:_t,showDivLine:wt,count:Le});return n.jsxs(n.Fragment,{children:[n.jsxs(ya,{type:"page",icon:t,title:e,disc:a,className:we("word-table-block",A),children:[X&&n.jsx(Hn,{size:"small",title:E??z("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>ce(!1),footer:({closeWithAnimation:ae})=>n.jsxs(n.Fragment,{children:[n.jsx(be,{htmlType:"button",size:48,type:"bar",label:z("common.cancel","\uCDE8\uC18C"),onClick:ae}),n.jsx(be,{htmlType:"button",size:48,type:"bar",variant:"main",label:z("common.save","\uC800\uC7A5"),disabled:!Ke||Ze,onClick:bt})]}),children:n.jsx(Jn,{label:z("wordTable.save.nameLabel","\uC774\uB984"),value:Ae,onChange:Ve,placeholder:z("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),maxLength:40,size:48,fullWidth:!0,autoFocus:!0,onEnter:bt,error:Ze?z("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),it&&b&&R?.({defaultName:typeof e=="string"?e:z("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:me,previewW:at,previewH:oe,items:Re,existingNames:xw().map(ae=>ae.name),saveAsNew:ct,onSave:(ae,Ce)=>{b(ae,Re,Ce,ct),Ge(),ut(!1)},onCancel:()=>ut(!1)}),(te||k)&&xe!==null&&$?.({cellIndex:xe,onConfirm:te?Yt:ae=>{if(k){const Ce=ae[0];if(Ce){const Fe=new Set((C??[]).map(ht=>ht.id));let lt=Ts([Ce]);for(let ht=2;Fe.has(lt);ht++)lt=`${Ts([Ce])}~${ht}`;k({id:lt,words:[gd(Ce)]})}}ke(null)},onClose:Dt}),!G&&n.jsx(ss,{title:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,hasImage:Vt,hasColloquial:Cn,hasCaption:Gt,contentTypes:Be,orientation:je,showOutline:_t,cutLine:qe,showDivLine:wt,setters:{setContentTypes:Ue,setOrientation:Ye,setShowOutline:Et,setCutLine:pt,setShowDivLine:st,setShowTopInfo:ot,setShowBottomInfo:Je},showCutLine:(fe?et:Le)>1,showDivLine2:zt,middleSections:Bn,extraSelected:pe,onExtraSelect:De,showPaperBands:We,showTopInfo:He,showBottomInfo:Qe}),Rt&&sn?n.jsx("div",{className:"word-table-block__pages",children:sn.map((ae,Ce)=>n.jsx(va,{orientation:je,contentTypes:Be,cutLine:qe,showOutline:_t,showDivLine:wt,count:et,items:ae,baseItem:p,baseContentTypes:m,onRemoveItem:f,onCopyItem:B,onReorder:w&&((Fe,lt)=>w(Fe+Ce*et,lt+Ce*et)),indexOffset:Ce*et,totalCount:C?.length??0,renderCellAction:I&&((Fe,lt)=>I(Fe+Ce*et,lt)),showFillerAdd:!!k,onActivateCell:k?(Fe=>ke(Fe+Ce*et)):void 0,addableCount:Math.max(0,Math.min(et,Ct-Ce*et)),brand:vt,code:h,contentRef:Fe=>{Bt.current[Ce]=Fe},pageNumber:{current:Ce+1,total:sn.length},pageNumberPosition:Lt},Ce))}):n.jsx(va,{orientation:je,contentTypes:Be,cutLine:qe,showOutline:_t,showDivLine:wt,count:Le,items:te?void 0:C??[],baseItem:te?void 0:p,baseContentTypes:m,editCells:te?Ee:void 0,activeCell:xe,onActivateCell:te||k?ke:void 0,onRemoveCell:te?Ht:void 0,onRemoveItem:te?void 0:f,onCopyItem:te?void 0:B,onReorder:te?void 0:w,renderCellAction:te?void 0:I,brand:vt,code:h,showFillerAdd:!!k,contentRef:tt}),!G&&!T&&O!=null&&n.jsx("div",{className:"word-table-block__table-actions",children:O}),de&&!G&&n.jsxs(Er,{size:"medium",labelWidth:64,useBorder:!1,useRowBorder:!1,className:"word-table-block__meta",children:[n.jsx(Rn,{variant:"custom",label:z("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(Jn,{required:!0,value:L??"",onChange:Q,placeholder:K?K+z("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):z("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:z("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:he?z("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:ae=>{(ae.key==="Tab"&&!ae.shiftKey||ae.key===" ")&&!(L??"").trim()&&(K??"").trim()&&(ae.preventDefault(),Q?.(K??""))}})}),n.jsx(Rn,{variant:"custom",label:z("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(Jn,{value:Z??"",onChange:F,placeholder:M?M+z("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):z("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:z("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:ae=>{(ae.key==="Tab"&&!ae.shiftKey||ae.key===" ")&&!(Z??"").trim()&&(M??"").trim()&&(ae.preventDefault(),F?.(M??""))}})})]})]}),!G&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!T&&v&&n.jsx(be,{htmlType:"button",size:40,type:"bar",label:z("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:v}),!T&&_&&n.jsx(be,{htmlType:"button",size:40,type:"bar",label:se,onClick:_}),!T&&n.jsx(be,{htmlType:"button",size:40,type:"bar",label:z("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:Qt})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[U&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:z("common.cancel","\uCDE8\uC18C"),onClick:U}),!T&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:z("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:wn}),E&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:E,onClick:()=>de?ft():ze(!0),disabled:ge,onDisabledClick:()=>{Oe(z("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."))}}),n.jsx(be,{htmlType:"button",size:"56",type:"bar",variant:"main",label:x??z("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>ze(!1),disabled:j,onDisabledClick:J})]})]}),n.jsx(ba,{message:Me,type:Pe,onClose:dt})]})}const kw=8;function yd({items:e,className:t}){const{t:a}=_e.useTranslation(),r=e.length,s=r<=3?1:2,l=kw,i=r>l,u=e.slice(0,i?l-1:l),c=r-u.length,d=Math.ceil(Math.min(r,l)/s)||1,h=s*d;return n.jsx("div",{className:we("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${s}, 1fr)`},children:Array.from({length:h},(p,m)=>{if(i&&m===l-1)return n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--more",children:n.jsx("span",{className:"word-table-thumb__more body-3",children:a("wordTable.thumbMore",{count:c,defaultValue:"+{{count}}"})})},m);const g=u[m];return g?n.jsx("div",{className:"word-table-thumb__cell",children:(g.words?.length?g.words:[{label:g.id}]).map((y,C)=>n.jsxs(o.Fragment,{children:[C>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:y.label})]},C))},m):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},m)})})}function Aw({items:e,name:t,description:a,createdAt:r,code:s,published:l,publishedLabel:i,shared:u,sharedLabel:c,isNew:d,publisherName:h,publishedAt:p,likeCount:m,downloadCount:g,onPublisherClick:y,selected:C,onClick:b,onMore:v,titleNode:f,className:B}){const{t:_}=_e.useTranslation(),N=f!=null,x=h!=null||p!=null||m!=null||g!=null,E=w=>{w.target===w.currentTarget&&!N&&(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),b?.())};return n.jsxs("div",{className:we("word-table-button",C?"word-table-button--selected":"",x?"":"word-table-button--no-footer",B),role:"button",tabIndex:0,"aria-label":s?`${t} (${s})`:t,onClick:N?void 0:b,onKeyDown:E,children:[d&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":_("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(yd,{items:e,className:"word-table-button__thumb"}),n.jsxs("div",{className:"word-table-button__info",children:[n.jsxs("div",{className:"word-table-button__info-text",children:[f??n.jsx("div",{className:"word-table-button__title h4",children:t}),a&&n.jsx("div",{className:"word-table-button__desc body-3",children:a})]}),v&&!N&&n.jsx(be,{htmlType:"button",className:"word-table-button__more",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:_("common.moreFor",{name:t}),onClick:w=>{w.stopPropagation(),v(w)}})]}),(s||r||l||u)&&n.jsxs("div",{className:"word-table-button__meta-row",children:[n.jsx("span",{className:"word-table-button__meta-left",children:n.jsx("span",{className:"word-table-button__meta caption-1",children:r?ql(r,_):""})}),n.jsxs("span",{className:"word-table-button__meta-right",children:[(l||u)&&n.jsxs("span",{className:"word-table-button__badges",children:[l&&n.jsx(jt,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:i??_("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),u&&n.jsx(jt,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:c??_("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),s&&n.jsx("span",{className:"word-table-button__code caption-1",children:s})]})]}),x&&n.jsxs("div",{className:"word-table-button__footer",children:[n.jsxs("span",{className:"word-table-button__store-by",children:[h&&(y?n.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":_("wordTable.publisherFilter",{name:h,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:w=>{w.stopPropagation(),y()},children:h}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:h})),p&&n.jsx("span",{className:"training-card__date body-4",children:ql(p,_)})]}),n.jsxs("span",{className:"word-table-button__store-stats",children:[m!=null&&n.jsx(jt,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(m),"aria-label":_("common.likeCount",{count:m,defaultValue:`\uC88B\uC544\uC694 ${m}`})}),g!=null&&n.jsx(jt,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(g),"aria-label":_("common.downloadCount",{count:g,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${g}`})})]})]})]})}/**
|
|
1041
1041
|
* @license lucide-react v1.38.0 - ISC
|
|
1042
1042
|
*
|
|
1043
1043
|
* This source code is licensed under the ISC license.
|
|
@@ -1047,4 +1047,4 @@ ${_.badge}`:_.badge:void 0;if(x&&c(_.code))return null;if(!_.badge&&!h)return p(
|
|
|
1047
1047
|
*
|
|
1048
1048
|
* This source code is licensed under the ISC license.
|
|
1049
1049
|
* See the LICENSE file in the root directory of this source tree.
|
|
1050
|
-
*/const Dw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Sw=re("circle-x",Dw);function jw(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function Ms({icon:e,label:t,state:a,pct:r,subText:s}){const{t:l}=_e.useTranslation(),i=a==="done",u=a==="pending",c=a==="error",d=i?100:r??0;return n.jsxs("div",{className:"wdup-phase-card",children:[n.jsx("div",{className:`wdup-phase-card__icon${i?" wdup-phase-card__icon--done":c?" wdup-phase-card__icon--error":""}`,children:i?n.jsx(Gs,{size:22,color:"white",strokeWidth:2.5}):c?n.jsx(Sw,{size:22,color:"white",strokeWidth:2.5}):n.jsx("span",{className:`wdup-phase-card__icon-inner${u?" wdup-phase-card__icon-inner--pending":""}`,children:e})}),n.jsxs("div",{className:"wdup-phase-card__body",children:[n.jsxs("div",{className:"wdup-phase-card__top",children:[n.jsx("span",{className:`wdup-phase-card__label body-2${u?" wdup-phase-card__label--pending":""}`,children:t}),i?n.jsx(jt,{variant:"sub",fill:"soft",size:"small",label:l("common.done","\uC644\uB8CC")}):c?n.jsx(jt,{variant:"danger",fill:"soft",size:"small",label:l("common.failed","\uC2E4\uD328")}):(s||r!==void 0)&&n.jsxs("span",{className:"wdup-phase-card__sub body-3",children:[s,s&&r!==void 0?` \xB7 ${r}%`:r!==void 0?`${r}%`:""]})]}),!u&&n.jsx("div",{className:"wdup-bar",children:n.jsx("div",{className:`wdup-bar__fill${i?" wdup-bar__fill--done":c?" wdup-bar__fill--error":""}${a==="active"&&r===void 0?" wdup-bar__fill--indeterminate":""}`,style:{width:r!==void 0||i||c?`${c?100:d}%`:void 0}})})]})]})}function Tw({title:e,progress:t,onDone:a,onRetry:r,onClose:s,inline:l}){const{t:i}=_e.useTranslation(),{phase:u,error:c,wordCount:d,imagePage:h,imageDone:p,imageTotal:m,pairPercent:g}=t,y=jw(u),C=u==="done",b=!!c;function v(E){return b&&y===E?"error":y>E?"done":y===E?"active":"pending"}const f=v(1),B=v(2),_=v(3),N=u==="image-match"&&m?Math.round((p??0)/m*100):void 0,x=o.useMemo(()=>{if(B!=="done"){if(u==="image-list")return i("wordData.checkingPage",{page:h??1});if(u==="image-match"&&m)return i("wordData.imageCount",{done:po(p),total:po(m)})}},[B,u,h,m,p,i]);return n.jsx(Hn,{inline:l,className:"popup--word-data-update",title:e,footer:b&&r?n.jsx(fe,{htmlType:"button",size:56,variant:"main",onClick:r,children:i("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):b?n.jsx(fe,{htmlType:"button",size:56,variant:"main",onClick:s??a,children:i("common.close","\uB2EB\uAE30")}):n.jsx(fe,{htmlType:"button",size:56,variant:"main",disabled:!C,onClick:a,children:i("common.done","\uC644\uB8CC")}),children:n.jsxs("div",{className:"wdup-cards",children:[n.jsx(Ms,{icon:n.jsx(Ws,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:f,subText:f==="active"?i("wordData.downloadingCount",{n:po(d),count:d}):void 0}),n.jsx(Ms,{icon:n.jsx(Ew,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:B,pct:N,subText:x}),n.jsx(Ms,{icon:n.jsx(qs,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:_,pct:_==="active"?g??0:void 0,subText:void 0})]})})}function Mw({enabled:e=!1,renderResultPopup:t}={}){const{t:a}=_e.useTranslation(),[r,s]=o.useState(null),[l,i]=o.useState(null),u=g=>{let y=null;g==="noise"?y={score:3,contextsLength:5,results:[{sentence:"\uBB38\uC7A5 A",judgement:!0,wording:"\uC798 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 B",judgement:!1,wording:"\uC548 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 C",judgement:!0,wording:"\uC798 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 D",judgement:null,wording:"\uC548 \uD568",useAnswer:!1},{sentence:"\uBB38\uC7A5 E",judgement:!1,wording:"\uC548 \uB4E4\uB9BC",useAnswer:!1}]}:g==="short"?y={score:2,contextsLength:3,results:[{sentence:"\uBE44\uBE54\uBC25 \uC124\uBA85",answer:"\uBE44\uBE54\uBC25",selected:"\uBE44\uBE54\uBC25",selectedText:"\uBE44\uBE54\uBC25",correct:!0},{sentence:"\uBCF4\uC308 \uC124\uBA85",answer:"\uBCF4\uC308",selected:"\uC871\uBC1C",selectedText:"\uC871\uBC1C",correct:!1},{sentence:"\uCE7C\uAD6D\uC218 \uC124\uBA85",answer:"\uCE7C\uAD6D\uC218",selected:void 0,selectedText:void 0,correct:void 0}]}:g==="long"?y={score:4,contextsLength:4,results:[{sentence:"\uAE34 \uC774\uC57C\uAE30 1",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 1",selectedText:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 1",correct:!0},{sentence:"\uAE34 \uC774\uC57C\uAE30 2",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 2",selectedText:"\uC120\uD0DD \uD14D\uC2A4\uD2B8 2",correct:!1},{sentence:"\uAE34 \uC774\uC57C\uAE30 3",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 3",selectedText:void 0,correct:void 0},{sentence:"\uAE34 \uC774\uC57C\uAE30 4",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 4",selectedText:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 4",correct:!0}]}:g==="order"&&(y={score:1,contextsLength:2,results:[{sentence:"\uC21C\uC11C \uBB38\uC81C 1",answer:"1,2,3",selectedText:"1,2,3",correct:!0},{sentence:"\uC21C\uC11C \uBB38\uC81C 2",answer:"A,B,C",selectedText:"B,A,C",correct:!1}]}),i(y),s(g)},c=o.useCallback(()=>{s(null),i(null)},[]),d=o.useCallback(()=>u("noise"),[]),h=o.useCallback(()=>u("short"),[]),p=o.useCallback(()=>u("long"),[]),m=o.useCallback(()=>u("order"),[]);return e?n.jsxs("div",{className:"debug-result-launcher",children:[n.jsxs("div",{className:"debug-buttons",children:[n.jsx("button",{type:"button",className:"debug-button",onClick:d,children:a("debug.showResult",{type:"Noise",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:h,children:a("debug.showResult",{type:"ShortStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:p,children:a("debug.showResult",{type:"LongStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:m,children:a("debug.showResult",{type:"Order",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})})]}),r&&l?t?.({score:l.score,contextsLength:l.contextsLength,results:l.results,onReplay:c,onClose:c}):null]}):null}exports.Accordion=Jy,exports.ActionCard=cy,exports.Alert=W2,exports.AppHeader=r2,exports.AudioMeter=Go,exports.AudioPlayer=ys,exports.Avatar=Y2,exports.Badge=jt,exports.BarChart=Wv,exports.BarChartControls=Tu,exports.Board=hv,exports.BottomNav=Ki,exports.BrandIdentity=Qi,exports.BrandLogo=$v,exports.Breadcrumb=J2,exports.BulkBar=kv,exports.Button=fe,exports.CORE_VERSION=ey,exports.Calendar=m4,exports.CardStep=id,exports.ChartLegend=Fo,exports.ChartSection=Oo,exports.ChartTotal=Ja,exports.Checkbox=ku,exports.ChoiceChips=x_,exports.CircleBadge=I2,exports.CodeBox=Bv,exports.ColorPicker=av,exports.CompanyMeta=yv,exports.ConfirmPopup=Cd,exports.ConfirmStep=od,exports.ConfirmWithTextStep=sd,exports.ContrastFilterPanel=Qx,exports.CoreScope=dy,exports.CountTile=uv,exports.CouponInputPopup=nw,exports.DEFAULT_NOISE_SETTINGS=ta,exports.DatePicker=Mv,exports.DebugResultLauncher=Mw,exports.DescriptionTooltip=Yn,exports.DeviceSideTable=d4,exports.Dialog=pv,exports.Divider=F2,exports.Dropdown=bn,exports.EffectPartyPopper=Ss,exports.EffectPartyPopperHost=ow,exports.EmptyState=iy,exports.ErrorState=uy,exports.FILTER_ALL_VALUE=vn,exports.FileUpload=X2,exports.FilterPanel=Ln,exports.FilterSectionInfo=qa,exports.Footer=w_,exports.GameIntro=qv,exports.Header=eu,exports.Icon=nt,exports.IconGridMenu=__,exports.IconRenderer=nt,exports.InfoTooltip=Dn,exports.ItemActions=Nv,exports.LEVEL_MAX=xa,exports.LINE_CHART_HOVER_DELAY_MS=Mu,exports.LandingBottomSticky=k_,exports.LandingHeader=B_,exports.LineChart=Vv,exports.ListPopup=ew,exports.ListenStep=rd,exports.Loader=da,exports.MARKS=_r,exports.MARK_ICON=Qu,exports.MARK_VARIANT=ec,exports.MediaQueryOverrideContext=ai,exports.MenuTooltip=Wa,exports.NOISE_RATIO_MAX=er,exports.NOISE_RATIO_STEP=Dc,exports.NoisePlayerContext=Cs,exports.NoiseSettingsTooltip=Zc,exports.NoticeBox=hy,exports.NotifyTextPreview=Lv,exports.OrderListStep=ld,exports.PASS_CARD_BG_VARS=Xn,exports.POS_LABEL=ac,exports.PROMO_BANNER_BG_COMPONENTS=Ri,exports.PROMO_BANNER_BG_OPTIONS=wy,exports.PROMO_BANNER_BG_VARS=Ia,exports.Page=Sr,exports.PageTitle=sw,exports.Pagination=Po,exports.Panel=Er,exports.PanelGrid=hx,exports.PanelRow=$n,exports.PanelRowDevice=px,exports.PassCard=cu,exports.PassCardBg=L2,exports.PassCardBgIHAB=$2,exports.PassCardBgLeftColorGrid=R2,exports.PassCardBgTwoCircle=ou,exports.PaymentPlan=M2,exports.PersonCard=mv,exports.PhonemeFilterPanel=Jx,exports.PhonemeSelectBlock=Zx,exports.Popup=Hn,exports.ProgressBar=Jv,exports.ProgressIndicator=Wu,exports.PromoBanner=Yy,exports.PromoBannerBgDark=_i,exports.PromoBannerBgDeep=Ci,exports.PromoBannerBgDiagonal=ki,exports.PromoBannerBgDots=Ni,exports.PromoBannerBgInstagram=$i,exports.PromoBannerBgMain=ui,exports.PromoBannerBgNaver=Mi,exports.PromoBannerBgOutline=Di,exports.PromoBannerBgRadial=wi,exports.PromoBannerBgSoft=di,exports.PromoBannerBgSoftSub=bi,exports.PromoBannerBgSub=hi,exports.PromoBannerBgSuccess=ji,exports.PromoBannerBgWarm=yi,exports.PublicationCard=fv,exports.Radio=mu,exports.RadioGroup=O2,exports.Rating=ev,exports.ReportDocument=pw,exports.ReportInfoPanel=hw,exports.RingChart=Gv,exports.SENTENCE_TRAINING_TYPES=ds,exports.SearchSummary=q2,exports.Section=ya,exports.SectionHeadFloat=Eu,exports.SectionHeader=gv,exports.SegmentedControl=kn,exports.ShortcutBadge=hu,exports.SideNav=Ji,exports.Slider=Iu,exports.SoundCompass=P2,exports.SplashLogo=bv,exports.StatChart=Kv,exports.SummaryStrip=cw,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=fu,exports.Table=Yo,exports.TableFilterPanel=ss,exports.Tabs=U2,exports.TextBoxTooltip=Nr,exports.TextField=Jn,exports.Timeline=Cv,exports.Toast=ba,exports.Toggle=Bu,exports.Toolbar=Io,exports.Tooltip=yn,exports.TooltipInfo=Dn,exports.TooltipTextBox=Nr,exports.TopBanner=Zy,exports.TrainingBlock=f4,exports.TrainingBlockButton=Lo,exports.TrainingBlockGrid=g4,exports.TrainingCard=gw,exports.TrainingCardGroup=yw,exports.TrainingPagePopup=Vn,exports.TrainingPagePopupBottom=Xc,exports.TrainingPagePopupTitle=Jc,exports.TrainingResultPopup=pd,exports.TrainingStep=na,exports.TrainingStepAudioPlayer=ys,exports.TrainingStepBullet=Wc,exports.TrainingStepCard=Uc,exports.TrainingStepConfirm=_s,exports.TrainingStepConfirmWithText=xs,exports.TrainingStepListen=ws,exports.TrainingStepOrderList=Bs,exports.TrainingStepTextBox=qc,exports.TrainingStepTitle=Vc,exports.TrainingTooltip=bu,exports.TrainingWordCard=Qo,exports.UpdateAlert=bw,exports.WAVE_A_MAX=F_,exports.WAVE_H1_PX=bs,exports.WAVE_HMAX_PX=I_,exports.WORD_LABEL_I18N_KEYS=D4,exports.WORD_TABLE_PAPER=Qn,exports.WORD_TYPE_LABEL=rc,exports.WordDataProvider=uw,exports.WordDataUpdatePopup=Tw,exports.WordImageTooltip=md,exports.WordSearchFilterPanel=Xx,exports.WordSearchResultBlock=Kx,exports.WordTable=va,exports.WordTableBlock=Bw,exports.WordTableButton=Aw,exports.WordTablePopup=G4,exports.WordTableThumbnail=yd,exports.buildMonthChartData=Pv,exports.cellKey=t_,exports.cellLabel=e_,exports.cellsForLabels=h_,exports.clearPassCardBgTheme=Tn,exports.clearPromoBannerBgTheme=Jt,exports.closeTrainingPopup=gx,exports.companyTypeLabel=lw,exports.createTrainingScenario=_x,exports.cx=we,exports.deriveNoiseContexts=Nx,exports.derivePassCard=nu,exports.draftValues=y_,exports.effectiveNoiseVolume=hs,exports.effectiveSpeechVolume=jc,exports.expandSlashLabel=as,exports.formatDuration=m_,exports.getControlDateRange=Uv,exports.getPayloadTimestamp=As,exports.getPromoBannerBgTheme=xo,exports.getSelectedFromPayload=wx,exports.getSelectedText=Bx,exports.getStepPayload=nd,exports.getSteppedPayload=kx,exports.injectPassCardBgTheme=jn,exports.injectPromoBannerBgTheme=Xt,exports.isSelectionCorrect=Ax,exports.labelOfCellKey=Nc,exports.labelsForSave=Q4,exports.levelToPct=N_,exports.markAfterClick=Ju,exports.marksForSave=es,exports.mergeNoiseSettings=ea,exports.missesByType=u_,exports.monthKeyOf=Qa,exports.monthKeyOfDate=zo,exports.nextFocus=o_,exports.nextMisses=i_,exports.noiseElementVolume=ms,exports.noiseRatioOf=tr,exports.pageStartIndexes=tc,exports.parseMonthKey=fa,exports.passCardBgIhabTheme=du,exports.passCardBgLeftColorGridTheme=pu,exports.passCardBgTwoCircleTheme=ru,exports.pctToLevel=E_,exports.posLabels=oc,exports.printWordTable=B4,exports.promoBannerBgDarkTheme=vi,exports.promoBannerBgDeepTheme=mi,exports.promoBannerBgDiagonalTheme=Bi,exports.promoBannerBgDotsTheme=Ai,exports.promoBannerBgInstagramTheme=Li,exports.promoBannerBgMainTheme=ii,exports.promoBannerBgNaverTheme=Ti,exports.promoBannerBgOutlineTheme=Ei,exports.promoBannerBgRadialTheme=xi,exports.promoBannerBgSoftSubTheme=fi,exports.promoBannerBgSoftTheme=ci,exports.promoBannerBgSubTheme=pi,exports.promoBannerBgSuccessTheme=Si,exports.promoBannerBgWarmTheme=gi,exports.recommendTables=d_,exports.regenerateUnpinned=g_,exports.removeItem=b_,exports.resolveTrainingItems=vx,exports.resolveTrainingPopupMeta=ed,exports.reviewCells=Y4,exports.reviewMeta=J4,exports.reviewSetPlan=c_,exports.reviewTableName=X4,exports.scoreKey=vr,exports.scoreSheetHeader=n_,exports.shouldConfirmDiscard=w4,exports.splitTrainingVariants=yx,exports.summarize=x4,exports.summarizeMisses=l_,exports.tableTrends=r_,exports.toDraft=C_,exports.toTrainingText=xx,exports.togglePin=f_,exports.uncoveredLabels=p_,exports.useAnchoredMenu=za,exports.useBarChartControl=ju,exports.useCalendarMonth=Au,exports.useComboboxSuggestions=xu,exports.useDiscardGuard=tw,exports.useFitScale=uc,exports.useNoisePlayer=wr,exports.useSoundCompassExam=zy,exports.useToastLifecycle=Ou,exports.useWordData=iw,exports.useWordTableDisplaySettings=kc,exports.useWordTablePrint=cs,exports.waveBarPx=kr,exports.waveBarVal=Ar,exports.weakItems=a_,exports.weekValueOf=Wo,exports.withStepTimes=td,exports.wordTypeLabels=sc;
|
|
1050
|
+
*/const Dw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Sw=re("circle-x",Dw);function jw(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function Ms({icon:e,label:t,state:a,pct:r,subText:s}){const{t:l}=_e.useTranslation(),i=a==="done",u=a==="pending",c=a==="error",d=i?100:r??0;return n.jsxs("div",{className:"wdup-phase-card",children:[n.jsx("div",{className:`wdup-phase-card__icon${i?" wdup-phase-card__icon--done":c?" wdup-phase-card__icon--error":""}`,children:i?n.jsx(Gs,{size:22,color:"white",strokeWidth:2.5}):c?n.jsx(Sw,{size:22,color:"white",strokeWidth:2.5}):n.jsx("span",{className:`wdup-phase-card__icon-inner${u?" wdup-phase-card__icon-inner--pending":""}`,children:e})}),n.jsxs("div",{className:"wdup-phase-card__body",children:[n.jsxs("div",{className:"wdup-phase-card__top",children:[n.jsx("span",{className:`wdup-phase-card__label body-2${u?" wdup-phase-card__label--pending":""}`,children:t}),i?n.jsx(jt,{variant:"sub",fill:"soft",size:"small",label:l("common.done","\uC644\uB8CC")}):c?n.jsx(jt,{variant:"danger",fill:"soft",size:"small",label:l("common.failed","\uC2E4\uD328")}):(s||r!==void 0)&&n.jsxs("span",{className:"wdup-phase-card__sub body-3",children:[s,s&&r!==void 0?` \xB7 ${r}%`:r!==void 0?`${r}%`:""]})]}),!u&&n.jsx("div",{className:"wdup-bar",children:n.jsx("div",{className:`wdup-bar__fill${i?" wdup-bar__fill--done":c?" wdup-bar__fill--error":""}${a==="active"&&r===void 0?" wdup-bar__fill--indeterminate":""}`,style:{width:r!==void 0||i||c?`${c?100:d}%`:void 0}})})]})]})}function Tw({title:e,progress:t,onDone:a,onRetry:r,onClose:s,inline:l}){const{t:i}=_e.useTranslation(),{phase:u,error:c,wordCount:d,imagePage:h,imageDone:p,imageTotal:m,pairPercent:g}=t,y=jw(u),C=u==="done",b=!!c;function v(E){return b&&y===E?"error":y>E?"done":y===E?"active":"pending"}const f=v(1),B=v(2),_=v(3),N=u==="image-match"&&m?Math.round((p??0)/m*100):void 0,x=o.useMemo(()=>{if(B!=="done"){if(u==="image-list")return i("wordData.checkingPage",{page:h??1});if(u==="image-match"&&m)return i("wordData.imageCount",{done:po(p),total:po(m)})}},[B,u,h,m,p,i]);return n.jsx(Hn,{inline:l,className:"popup--word-data-update",title:e,footer:b&&r?n.jsx(be,{htmlType:"button",size:56,variant:"main",onClick:r,children:i("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):b?n.jsx(be,{htmlType:"button",size:56,variant:"main",onClick:s??a,children:i("common.close","\uB2EB\uAE30")}):n.jsx(be,{htmlType:"button",size:56,variant:"main",disabled:!C,onClick:a,children:i("common.done","\uC644\uB8CC")}),children:n.jsxs("div",{className:"wdup-cards",children:[n.jsx(Ms,{icon:n.jsx(Ws,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:f,subText:f==="active"?i("wordData.downloadingCount",{n:po(d),count:d}):void 0}),n.jsx(Ms,{icon:n.jsx(Ew,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:B,pct:N,subText:x}),n.jsx(Ms,{icon:n.jsx(qs,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:_,pct:_==="active"?g??0:void 0,subText:void 0})]})})}function Mw({enabled:e=!1,renderResultPopup:t}={}){const{t:a}=_e.useTranslation(),[r,s]=o.useState(null),[l,i]=o.useState(null),u=g=>{let y=null;g==="noise"?y={score:3,contextsLength:5,results:[{sentence:"\uBB38\uC7A5 A",judgement:!0,wording:"\uC798 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 B",judgement:!1,wording:"\uC548 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 C",judgement:!0,wording:"\uC798 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 D",judgement:null,wording:"\uC548 \uD568",useAnswer:!1},{sentence:"\uBB38\uC7A5 E",judgement:!1,wording:"\uC548 \uB4E4\uB9BC",useAnswer:!1}]}:g==="short"?y={score:2,contextsLength:3,results:[{sentence:"\uBE44\uBE54\uBC25 \uC124\uBA85",answer:"\uBE44\uBE54\uBC25",selected:"\uBE44\uBE54\uBC25",selectedText:"\uBE44\uBE54\uBC25",correct:!0},{sentence:"\uBCF4\uC308 \uC124\uBA85",answer:"\uBCF4\uC308",selected:"\uC871\uBC1C",selectedText:"\uC871\uBC1C",correct:!1},{sentence:"\uCE7C\uAD6D\uC218 \uC124\uBA85",answer:"\uCE7C\uAD6D\uC218",selected:void 0,selectedText:void 0,correct:void 0}]}:g==="long"?y={score:4,contextsLength:4,results:[{sentence:"\uAE34 \uC774\uC57C\uAE30 1",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 1",selectedText:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 1",correct:!0},{sentence:"\uAE34 \uC774\uC57C\uAE30 2",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 2",selectedText:"\uC120\uD0DD \uD14D\uC2A4\uD2B8 2",correct:!1},{sentence:"\uAE34 \uC774\uC57C\uAE30 3",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 3",selectedText:void 0,correct:void 0},{sentence:"\uAE34 \uC774\uC57C\uAE30 4",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 4",selectedText:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 4",correct:!0}]}:g==="order"&&(y={score:1,contextsLength:2,results:[{sentence:"\uC21C\uC11C \uBB38\uC81C 1",answer:"1,2,3",selectedText:"1,2,3",correct:!0},{sentence:"\uC21C\uC11C \uBB38\uC81C 2",answer:"A,B,C",selectedText:"B,A,C",correct:!1}]}),i(y),s(g)},c=o.useCallback(()=>{s(null),i(null)},[]),d=o.useCallback(()=>u("noise"),[]),h=o.useCallback(()=>u("short"),[]),p=o.useCallback(()=>u("long"),[]),m=o.useCallback(()=>u("order"),[]);return e?n.jsxs("div",{className:"debug-result-launcher",children:[n.jsxs("div",{className:"debug-buttons",children:[n.jsx("button",{type:"button",className:"debug-button",onClick:d,children:a("debug.showResult",{type:"Noise",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:h,children:a("debug.showResult",{type:"ShortStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:p,children:a("debug.showResult",{type:"LongStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:m,children:a("debug.showResult",{type:"Order",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})})]}),r&&l?t?.({score:l.score,contextsLength:l.contextsLength,results:l.results,onReplay:c,onClose:c}):null]}):null}exports.Accordion=Jy,exports.ActionCard=cy,exports.Alert=W2,exports.AppHeader=r2,exports.AudioMeter=Go,exports.AudioPlayer=ys,exports.Avatar=Y2,exports.Badge=jt,exports.BarChart=Wv,exports.BarChartControls=Tu,exports.Board=hv,exports.BottomNav=Ki,exports.BrandIdentity=Qi,exports.BrandLogo=$v,exports.Breadcrumb=J2,exports.BulkBar=kv,exports.Button=be,exports.CORE_VERSION=ey,exports.Calendar=m4,exports.CardStep=id,exports.ChartLegend=Fo,exports.ChartSection=Oo,exports.ChartTotal=Ja,exports.Checkbox=ku,exports.ChoiceChips=x_,exports.CircleBadge=I2,exports.CodeBox=Bv,exports.ColorPicker=av,exports.CompanyMeta=yv,exports.ConfirmPopup=Cd,exports.ConfirmStep=od,exports.ConfirmWithTextStep=sd,exports.ContrastFilterPanel=Qx,exports.CoreScope=dy,exports.CountTile=uv,exports.CouponInputPopup=nw,exports.DEFAULT_NOISE_SETTINGS=ta,exports.DatePicker=Mv,exports.DebugResultLauncher=Mw,exports.DescriptionTooltip=Yn,exports.DeviceSideTable=d4,exports.Dialog=pv,exports.Divider=F2,exports.Dropdown=gn,exports.EffectPartyPopper=Ss,exports.EffectPartyPopperHost=ow,exports.EmptyState=iy,exports.ErrorState=uy,exports.FILTER_ALL_VALUE=_n,exports.FileUpload=X2,exports.FilterPanel=$n,exports.FilterSectionInfo=qa,exports.Footer=w_,exports.GameIntro=qv,exports.Header=eu,exports.Icon=nt,exports.IconGridMenu=__,exports.IconRenderer=nt,exports.InfoTooltip=Sn,exports.ItemActions=Nv,exports.LEVEL_MAX=xa,exports.LINE_CHART_HOVER_DELAY_MS=Mu,exports.LandingBottomSticky=k_,exports.LandingHeader=B_,exports.LineChart=Vv,exports.ListPopup=ew,exports.ListenStep=rd,exports.Loader=da,exports.MARKS=_r,exports.MARK_ICON=Qu,exports.MARK_VARIANT=ec,exports.MediaQueryOverrideContext=ai,exports.MenuTooltip=Wa,exports.NOISE_RATIO_MAX=er,exports.NOISE_RATIO_STEP=Dc,exports.NoisePlayerContext=Cs,exports.NoiseSettingsTooltip=Zc,exports.NoticeBox=hy,exports.NotifyTextPreview=Lv,exports.OrderListStep=ld,exports.PASS_CARD_BG_VARS=Xn,exports.POS_LABEL=ac,exports.PROMO_BANNER_BG_COMPONENTS=Ri,exports.PROMO_BANNER_BG_OPTIONS=wy,exports.PROMO_BANNER_BG_VARS=Ia,exports.Page=Sr,exports.PageTitle=sw,exports.Pagination=Po,exports.Panel=Er,exports.PanelGrid=hx,exports.PanelRow=Rn,exports.PanelRowDevice=px,exports.PassCard=cu,exports.PassCardBg=L2,exports.PassCardBgIHAB=$2,exports.PassCardBgLeftColorGrid=R2,exports.PassCardBgTwoCircle=ou,exports.PaymentPlan=M2,exports.PersonCard=mv,exports.PhonemeFilterPanel=Jx,exports.PhonemeSelectBlock=Zx,exports.Popup=Hn,exports.ProgressBar=Jv,exports.ProgressIndicator=Wu,exports.PromoBanner=Yy,exports.PromoBannerBgDark=_i,exports.PromoBannerBgDeep=Ci,exports.PromoBannerBgDiagonal=ki,exports.PromoBannerBgDots=Ni,exports.PromoBannerBgInstagram=$i,exports.PromoBannerBgMain=ui,exports.PromoBannerBgNaver=Mi,exports.PromoBannerBgOutline=Di,exports.PromoBannerBgRadial=wi,exports.PromoBannerBgSoft=di,exports.PromoBannerBgSoftSub=bi,exports.PromoBannerBgSub=hi,exports.PromoBannerBgSuccess=ji,exports.PromoBannerBgWarm=yi,exports.PublicationCard=fv,exports.Radio=mu,exports.RadioGroup=O2,exports.Rating=ev,exports.ReportDocument=pw,exports.ReportInfoPanel=hw,exports.RingChart=Gv,exports.SENTENCE_TRAINING_TYPES=ds,exports.SearchSummary=q2,exports.Section=ya,exports.SectionHeadFloat=Eu,exports.SectionHeader=gv,exports.SegmentedControl=An,exports.ShortcutBadge=hu,exports.SideNav=Ji,exports.Slider=Iu,exports.SoundCompass=P2,exports.SplashLogo=bv,exports.StatChart=Kv,exports.SummaryStrip=cw,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=fu,exports.Table=Yo,exports.TableFilterPanel=ss,exports.Tabs=U2,exports.TextBoxTooltip=Nr,exports.TextField=Jn,exports.Timeline=Cv,exports.Toast=ba,exports.Toggle=Bu,exports.Toolbar=Io,exports.Tooltip=vn,exports.TooltipInfo=Sn,exports.TooltipTextBox=Nr,exports.TopBanner=Zy,exports.TrainingBlock=f4,exports.TrainingBlockButton=Lo,exports.TrainingBlockGrid=g4,exports.TrainingCard=gw,exports.TrainingCardGroup=yw,exports.TrainingPagePopup=Vn,exports.TrainingPagePopupBottom=Xc,exports.TrainingPagePopupTitle=Jc,exports.TrainingResultPopup=pd,exports.TrainingStep=na,exports.TrainingStepAudioPlayer=ys,exports.TrainingStepBullet=Wc,exports.TrainingStepCard=Uc,exports.TrainingStepConfirm=_s,exports.TrainingStepConfirmWithText=xs,exports.TrainingStepListen=ws,exports.TrainingStepOrderList=Bs,exports.TrainingStepTextBox=qc,exports.TrainingStepTitle=Vc,exports.TrainingTooltip=bu,exports.TrainingWordCard=Qo,exports.UpdateAlert=bw,exports.WAVE_A_MAX=F_,exports.WAVE_H1_PX=bs,exports.WAVE_HMAX_PX=I_,exports.WORD_LABEL_I18N_KEYS=D4,exports.WORD_TABLE_PAPER=Qn,exports.WORD_TYPE_LABEL=rc,exports.WordDataProvider=uw,exports.WordDataUpdatePopup=Tw,exports.WordImageTooltip=md,exports.WordSearchFilterPanel=Xx,exports.WordSearchResultBlock=Kx,exports.WordTable=va,exports.WordTableBlock=Bw,exports.WordTableButton=Aw,exports.WordTablePopup=G4,exports.WordTableThumbnail=yd,exports.buildMonthChartData=Pv,exports.cellKey=t_,exports.cellLabel=e_,exports.cellsForLabels=h_,exports.clearPassCardBgTheme=Mn,exports.clearPromoBannerBgTheme=Jt,exports.closeTrainingPopup=gx,exports.companyTypeLabel=lw,exports.createTrainingScenario=_x,exports.cx=we,exports.deriveNoiseContexts=Nx,exports.derivePassCard=nu,exports.draftValues=y_,exports.effectiveNoiseVolume=hs,exports.effectiveSpeechVolume=jc,exports.expandSlashLabel=as,exports.formatDuration=m_,exports.getControlDateRange=Uv,exports.getPayloadTimestamp=As,exports.getPromoBannerBgTheme=xo,exports.getSelectedFromPayload=wx,exports.getSelectedText=Bx,exports.getStepPayload=nd,exports.getSteppedPayload=kx,exports.injectPassCardBgTheme=Tn,exports.injectPromoBannerBgTheme=Xt,exports.isSelectionCorrect=Ax,exports.labelOfCellKey=Nc,exports.labelsForSave=Q4,exports.levelToPct=N_,exports.markAfterClick=Ju,exports.marksForSave=es,exports.mergeNoiseSettings=ea,exports.missesByType=u_,exports.monthKeyOf=Qa,exports.monthKeyOfDate=zo,exports.nextFocus=o_,exports.nextMisses=i_,exports.noiseElementVolume=ms,exports.noiseRatioOf=tr,exports.pageStartIndexes=tc,exports.parseMonthKey=fa,exports.passCardBgIhabTheme=du,exports.passCardBgLeftColorGridTheme=pu,exports.passCardBgTwoCircleTheme=ru,exports.pctToLevel=E_,exports.posLabels=oc,exports.printWordTable=B4,exports.promoBannerBgDarkTheme=vi,exports.promoBannerBgDeepTheme=mi,exports.promoBannerBgDiagonalTheme=Bi,exports.promoBannerBgDotsTheme=Ai,exports.promoBannerBgInstagramTheme=Li,exports.promoBannerBgMainTheme=ii,exports.promoBannerBgNaverTheme=Ti,exports.promoBannerBgOutlineTheme=Ei,exports.promoBannerBgRadialTheme=xi,exports.promoBannerBgSoftSubTheme=fi,exports.promoBannerBgSoftTheme=ci,exports.promoBannerBgSubTheme=pi,exports.promoBannerBgSuccessTheme=Si,exports.promoBannerBgWarmTheme=gi,exports.recommendTables=d_,exports.regenerateUnpinned=g_,exports.removeItem=b_,exports.resolveTrainingItems=vx,exports.resolveTrainingPopupMeta=ed,exports.reviewCells=Y4,exports.reviewMeta=J4,exports.reviewSetPlan=c_,exports.reviewTableName=X4,exports.scoreKey=vr,exports.scoreSheetHeader=n_,exports.shouldConfirmDiscard=w4,exports.splitTrainingVariants=yx,exports.summarize=x4,exports.summarizeMisses=l_,exports.tableTrends=r_,exports.toDraft=C_,exports.toTrainingText=xx,exports.togglePin=f_,exports.uncoveredLabels=p_,exports.useAnchoredMenu=za,exports.useBarChartControl=ju,exports.useCalendarMonth=Au,exports.useComboboxSuggestions=xu,exports.useDiscardGuard=tw,exports.useFitScale=uc,exports.useNoisePlayer=wr,exports.useSoundCompassExam=zy,exports.useToastLifecycle=Ou,exports.useWordData=iw,exports.useWordTableDisplaySettings=kc,exports.useWordTablePrint=cs,exports.waveBarPx=kr,exports.waveBarVal=Ar,exports.weakItems=a_,exports.weekValueOf=Wo,exports.withStepTimes=td,exports.wordTypeLabels=sc;
|