@ihabdevteam/core 0.369.0 → 0.371.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 +130 -0
- package/dist/components.cjs.js +12 -12
- package/dist/components.esm.css +1 -1
- package/dist/hooks.cjs.js +5 -5
- package/dist/i18n.cjs.js +3 -3
- package/dist/ihabdevteam-core.cjs.js +16 -16
- package/dist/ihabdevteam-core.d.ts +2 -5
- package/dist/packages/core/src/components/Table.js +18 -1
- package/dist/packages/core/src/components/Word/WordTableThumbnail.css +9 -0
- package/dist/packages/core/src/components/Word/WordTableThumbnail.d.ts +1 -4
- package/dist/packages/core/src/components/Word/WordTableThumbnail.js +45 -4
- package/dist/packages/core/src/components/Word/wordTableBlockTypes.d.ts +9 -0
- package/dist/packages/core/src/components/Word/wordTableBlockTypes.js +10 -1
- package/dist/packages/core/src/components/wordTableLayout.d.ts +8 -0
- package/dist/packages/core/src/components/wordTableLayout.js +19 -0
- package/dist/packages/core/src/i18n/locales/en.json +2 -1
- package/dist/packages/core/src/i18n/locales/ko.json +2 -1
- package/dist/packages/core/src/version.d.ts +1 -1
- package/dist/packages/core/src/version.js +1 -1
- package/dist/utils.cjs.js +3 -3
- 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"),Vt=require("i18next"),_e=require("react-i18next"),cn=require("react-dom"),En=typeof document<"u"?document.currentScript:null;function hd(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 js=hd(o);function we(...e){return e.filter(Boolean).join(" ")}const Ts=new Set,Pn=(()=>{try{const e=globalThis;return e.process!=null&&e.process.env?.NODE_ENV!=="production"}catch{return!1}})();function
|
|
1
|
+
"use strict";var n=require("react/jsx-runtime"),o=require("react"),Vt=require("i18next"),_e=require("react-i18next"),cn=require("react-dom"),En=typeof document<"u"?document.currentScript:null;function hd(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 js=hd(o);function we(...e){return e.filter(Boolean).join(" ")}const Ts=new Set,Pn=(()=>{try{const e=globalThis;return e.process!=null&&e.process.env?.NODE_ENV!=="production"}catch{return!1}})();function Mt(e,...t){!Pn||Ts.has(e)||(Ts.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 P1=[["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"}]],I1=te("thumbs-up",P1),Fr={"alert-triangle":$s,"align-start-vertical":wd,anchor:Q0,armchair:t1,"arrow-down":kd,"arrow-left":Nd,"arrow-right":Dd,"arrow-right-left":jd,"audio-lines":Md,ban:$d,bell:Pd,"book-marked":Fd,"book-open":zd,"bow-arrow":Hd,braces:qd,bug:Gd,calendar:Gs,"calendar-check":Yd,"calendar-days":Xd,camera:Qd,car:r1,"chart-column":tp,"chart-line":ap,"chart-pie":op,check:Rs,"chevron-down":Ks,"chevron-left":Ps,"chevron-right":Is,"chevron-up":Ys,circle:S1,"clipboard-list":cp,coffee:s1,combine:pp,copy:hp,"chevrons-left-right-ellipsis":fp,"credit-card":bp,database:Fs,diff:xp,download:Os,ear:Bp,edit:Ap,"edit-2":Ep,"edit-3":Sp,ellipsis:zs,eraser:Mp,"external-link":$p,eye:Pp,"file-text":Fp,"flip-horizontal":zp,"folder-open":Hp,"folder-plus":qp,gamepad:Gp,"gamepad-2":i1,clock:c1,lock:Rm,"search-x":Oh,"share-2":Uh,tag:f0,target:p1,percent:h1,gavel:Yp,"git-merge":Ws,globe:Jp,"grip-vertical":em,headphones:nm,heart:rm,home:sm,inbox:f1,info:im,"key-round":cm,landmark:pm,layers:hm,"layout-dashboard":fm,leaf:bm,lightbulb:vm,link:_m,"link-2":Bm,"link-2-off":Am,list:Em,"list-checks":Sm,"list-ordered":Tm,loader:Lm,"log-out":Im,mail:Om,"map-pin":Wm,menu:L1,"message-circle":Vm,"message-circle-question-mark":Um,"message-square":Km,"message-square-more":b1,"message-square-text":Zm,minus:v1,"minus-circle":Jm,moon:R1,"more-horizontal":zs,package:eh,"party-popper":nh,pause:rh,pencil:sh,phone:ih,play:ch,"play-circle":ph,plus:hh,printer:fh,"refresh-cw":bh,repeat:vh,replace:_h,rocket:Bh,"rotate-ccw":Ah,"rotate-cw":Eh,salad:Sh,"scan-search":Th,search:Rh,"circle-alert":Hs,"alert-circle":Hs,"check-circle":Vs,scissors:Ih,send:Wh,settings:Vh,"shield-check":Kh,"shopping-cart":Zh,shuffle:Jh,"skip-back":e0,"skip-forward":n0,sparkles:_1,square:r0,star:s0,store:i0,"sun-medium":c0,table:p0,"table-2":h0,terminal:b0,"text-cursor-input":v0,"text-initial":_0,"thumbs-up":I1,ticket:B0,trash:E0,triangle:T1,"trash-2":A0,"trending-up":S0,"triangle-alert":$s,trophy:T0,type:B1,unlink:L0,upload:R0,user:Ir,"user-plus":F0,"user-round":z0,"user-round-check":H0,users:q0,"users-round":G0,volume:A1,"volume-2":qs,wrench:Z0,x:Us};Object.freeze(Object.keys(Fr));function F1(e){return Fr[e]??null}const Zs=new Set;function O1(e){return Pn&&!(e in Fr)&&!Zs.has(e)&&(Zs.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 z1=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 W1(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?z1(a):null}const Xs=new Map;function H1(e){const t=typeof e=="string"?W1(e):null,a=t?F1(t)??Xs.get(t)??null:null,[r,l]=o.useState(null);return o.useEffect(()=>{if(!t||a)return;let s=!1;return O1(t).then(i=>{Xs.set(t,i),s||l(i)}),()=>{s=!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 Js(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 V1(e){if(Array.isArray(e))return e}function q1(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var r,l,s,i,u=[],c=!0,d=!1;try{if(s=(a=a.call(e)).next,t!==0)for(;!(c=(r=s.call(a)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(m){d=!0,l=m}finally{try{if(!c&&a.return!=null&&(i=a.return(),Object(i)!==i))return}finally{if(d)throw l}}return u}}function U1(){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 G1(e,t){return V1(e)||q1(e,t)||K1(e,t)||U1()}function K1(e,t){if(e){if(typeof e=="string")return Js(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)?Js(e,t):void 0}}const Qs=Object.entries,el=Object.setPrototypeOf,Y1=Object.isFrozen,Z1=Object.getPrototypeOf,X1=Object.getOwnPropertyDescriptor;let Ft=Object.freeze,zt=Object.seal,aa=Object.create,tl=typeof Reflect<"u"&&Reflect,Or=tl.apply,zr=tl.construct;Ft||(Ft=function(t){return t}),zt||(zt=function(t){return t}),Or||(Or=function(t,a){for(var r=arguments.length,l=new Array(r>2?r-2:0),s=2;s<r;s++)l[s-2]=arguments[s];return t.apply(a,l)}),zr||(zr=function(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),l=1;l<a;l++)r[l-1]=arguments[l];return new t(...r)});const Vn=Pt(Array.prototype.forEach),J1=Pt(Array.prototype.lastIndexOf),nl=Pt(Array.prototype.pop),_a=Pt(Array.prototype.push),Q1=Pt(Array.prototype.splice),ra=Array.isArray,wa=Pt(String.prototype.toLowerCase),Wr=Pt(String.prototype.toString),al=Pt(String.prototype.match),Ba=Pt(String.prototype.replace),rl=Pt(String.prototype.indexOf),eC=Pt(String.prototype.trim),tC=Pt(Number.prototype.toString),nC=Pt(Boolean.prototype.toString),ol=typeof BigInt>"u"?null:Pt(BigInt.prototype.toString),sl=typeof Symbol>"u"?null:Pt(Symbol.prototype.toString),on=Pt(Object.prototype.hasOwnProperty),ka=Pt(Object.prototype.toString),Ut=Pt(RegExp.prototype.test),qn=aC(TypeError);function Pt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var a=arguments.length,r=new Array(a>1?a-1:0),l=1;l<a;l++)r[l-1]=arguments[l];return Or(e,t,r)}}function aC(e){return function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return zr(e,a)}}function ct(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wa;if(el&&el(e,null),!ra(t))return e;let r=t.length;for(;r--;){let l=t[r];if(typeof l=="string"){const s=a(l);s!==l&&(Y1(t)||(t[r]=s),l=s)}e[l]=!0}return e}function rC(e){for(let t=0;t<e.length;t++)on(e,t)||(e[t]=null);return e}function dn(e){const t=aa(null);for(const r of Qs(e)){var a=G1(r,2);const l=a[0],s=a[1];on(e,l)&&(ra(s)?t[l]=rC(s):s&&typeof s=="object"&&s.constructor===Object?t[l]=dn(s):t[l]=s)}return t}function oC(e){switch(typeof e){case"string":return e;case"number":return tC(e);case"boolean":return nC(e);case"bigint":return ol?ol(e):"0";case"symbol":return sl?sl(e):"Symbol()";case"undefined":return ka(e);case"function":case"object":{if(e===null)return ka(e);const t=e,a=yn(t,"toString");if(typeof a=="function"){const r=a(t);return typeof r=="string"?r:ka(r)}return ka(e)}default:return ka(e)}}function yn(e,t){for(;e!==null;){const r=X1(e,t);if(r){if(r.get)return Pt(r.get);if(typeof r.value=="function")return Pt(r.value)}e=Z1(e)}function a(){return null}return a}function sC(e){try{return Ut(e,""),!0}catch{return!1}}const ll=Ft(["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"]),Hr=Ft(["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"]),Vr=Ft(["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"]),lC=Ft(["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"]),qr=Ft(["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"]),iC=Ft(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),il=Ft(["#text"]),ul=Ft(["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"]),Ur=Ft(["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"]),cl=Ft(["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"]),Qa=Ft(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),uC=zt(/{{[\w\W]*|^[\w\W]*}}/g),cC=zt(/<%[\w\W]*|^[\w\W]*%>/g),dC=zt(/\${[\w\W]*/g),pC=zt(/^data-[\-\w.\u00B7-\uFFFF]+$/),mC=zt(/^aria-[\-\w]+$/),dl=zt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),hC=zt(/^(?:\w+script|data):/i),CC=zt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fC=zt(/^html$/i),gC=zt(/^[a-z][.\w]*(-[.\w]+)+$/i),pl=zt(/<[/\w!]/g),ml=zt(/<[/\w]/g),bC=zt(/<\/no(script|embed|frames)/i),yC=zt(/\/>/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},hl=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],vC=Ft(ct({},hl)),xC=(function(){const e={};return Vn(hl,t=>{e[t]=zt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Ft(e)})(),_C=function(){return typeof window>"u"?null:window},wC=function(t,a){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const l="data-tt-policy-suffix";a&&a.hasAttribute(l)&&(r=a.getAttribute(l));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Cl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},In=function(t,a,r,l){return on(t,a)&&ra(t[a])?ct(l.base?dn(l.base):{},t[a],l.transform):r},Gr=function(t,a,r){const l=on(t,a)?t[a]:void 0;return l&&typeof l=="object"?dn(l):r()};function fl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_C();const t=ye=>fl(ye);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,l=r.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,i=e.Node,u=e.Element,c=e.NodeFilter,d=e.NamedNodeMap;d===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const m=e.DOMParser,p=e.trustedTypes,C=u.prototype,b=yn(C,"cloneNode"),x=yn(C,"remove"),f=yn(C,"nextSibling"),h=yn(C,"childNodes"),_=yn(C,"parentNode"),g=yn(C,"shadowRoot"),k=yn(C,"attributes"),v=i&&i.prototype?yn(i.prototype,"nodeType"):null,B=i&&i.prototype?yn(i.prototype,"nodeName"):null,y=i&&i.prototype?yn(i.prototype,"ownerDocument"):null,w=function(j){return v?v(j):j.nodeType},A=function(j){return B?B(j):j.nodeName};if(typeof s=="function"){const ye=a.createElement("template");ye.content&&ye.content.ownerDocument&&(a=ye.content.ownerDocument)}let E,D="",N,F=!1,R=0;const K=function(){if(R>0)throw qn('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.')},L=function(j){K(),R++;try{return E.createHTML(j)}finally{R--}},$=function(j){K(),R++;try{return E.createScriptURL(j)}finally{R--}},T=function(){return F||(N=wC(p,l),F=!0),N},J=a,q=J.implementation,O=J.createNodeIterator,Q=J.createDocumentFragment,P=J.getElementsByTagName,V=r.importNode;let W=Cl();t.isSupported=typeof Qs=="function"&&typeof _=="function"&&q&&q.createHTMLDocument!==void 0;const G=uC,S=cC,M=dC,I=pC,Z=mC,le=hC,oe=CC,de=gC;let re=dl,z=null;const ne=ct({},[...ll,...Hr,...Vr,...qr,...il]);let H=null;const U=ct({},[...ul,...Ur,...cl,...Qa]);let pe=Object.seal(aa(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}})),Ee=null,ge=null;const me=Object.seal(aa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ie=!0,be=!0,he=!1,ue=!0,Me=!1,qe=!0,je=!1,Ve=!1,Oe=null,dt=null,rt=!1,nt=!1,pt=!1,Ne=!1,Ue=!0,ke=!1;const He="user-content-";let Be=!0,Se=!1,Le={},Ze=null;const xt=ct({},["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 et=null;const Xe=ct({},["audio","video","img","source","image","track"]);let At=null;const gt=ct({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),_t="http://www.w3.org/1998/Math/MathML",Nt="http://www.w3.org/2000/svg",mt="http://www.w3.org/1999/xhtml";let st=mt,Pe=!1,bt=null;const wt=ct({},[_t,Nt,mt],Wr),lt=Ft(["mi","mo","mn","ms","mtext"]);let jt=ct({},lt);const Ge=Ft(["annotation-xml"]);let yt=ct({},Ge);const $t=ct({},["title","style","font","a","script"]);let Re=null;const ot=["application/xhtml+xml","text/html"],Et="text/html";let Je=null,Dt=null;const ae=a.createElement("form"),ve=function(j){return j instanceof RegExp||j instanceof Function},ze=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Dt&&Dt===j)return;(!j||typeof j!="object")&&(j={}),j=dn(j),Re=ot.indexOf(j.PARSER_MEDIA_TYPE)===-1?Et:j.PARSER_MEDIA_TYPE,Je=Re==="application/xhtml+xml"?Wr:wa,z=In(j,"ALLOWED_TAGS",ne,{transform:Je}),H=In(j,"ALLOWED_ATTR",U,{transform:Je}),bt=In(j,"ALLOWED_NAMESPACES",wt,{transform:Wr}),At=In(j,"ADD_URI_SAFE_ATTR",gt,{transform:Je,base:gt}),et=In(j,"ADD_DATA_URI_TAGS",Xe,{transform:Je,base:Xe}),Ze=In(j,"FORBID_CONTENTS",xt,{transform:Je}),Ee=In(j,"FORBID_TAGS",dn({}),{transform:Je}),ge=In(j,"FORBID_ATTR",dn({}),{transform:Je}),Le=on(j,"USE_PROFILES")?j.USE_PROFILES&&typeof j.USE_PROFILES=="object"?dn(j.USE_PROFILES):j.USE_PROFILES:!1,ie=j.ALLOW_ARIA_ATTR!==!1,be=j.ALLOW_DATA_ATTR!==!1,he=j.ALLOW_UNKNOWN_PROTOCOLS||!1,ue=j.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Me=j.SAFE_FOR_TEMPLATES||!1,qe=j.SAFE_FOR_XML!==!1,je=j.WHOLE_DOCUMENT||!1,nt=j.RETURN_DOM||!1,pt=j.RETURN_DOM_FRAGMENT||!1,Ne=j.RETURN_TRUSTED_TYPE||!1,rt=j.FORCE_BODY||!1,Ue=j.SANITIZE_DOM!==!1,ke=j.SANITIZE_NAMED_PROPS||!1,Be=j.KEEP_CONTENT!==!1,Se=j.IN_PLACE||!1,re=sC(j.ALLOWED_URI_REGEXP)?j.ALLOWED_URI_REGEXP:dl,st=typeof j.NAMESPACE=="string"?j.NAMESPACE:mt,jt=Gr(j,"MATHML_TEXT_INTEGRATION_POINTS",()=>ct({},lt)),yt=Gr(j,"HTML_INTEGRATION_POINTS",()=>ct({},Ge));const X=Gr(j,"CUSTOM_ELEMENT_HANDLING",()=>aa(null));if(pe=aa(null),on(X,"tagNameCheck")&&ve(X.tagNameCheck)&&(pe.tagNameCheck=X.tagNameCheck),on(X,"attributeNameCheck")&&ve(X.attributeNameCheck)&&(pe.attributeNameCheck=X.attributeNameCheck),on(X,"allowCustomizedBuiltInElements")&&typeof X.allowCustomizedBuiltInElements=="boolean"&&(pe.allowCustomizedBuiltInElements=X.allowCustomizedBuiltInElements),zt(pe),Me&&(be=!1),pt&&(nt=!0),Le&&(z=ct({},il),H=aa(null),Le.html===!0&&(ct(z,ll),ct(H,ul)),Le.svg===!0&&(ct(z,Hr),ct(H,Ur),ct(H,Qa)),Le.svgFilters===!0&&(ct(z,Vr),ct(H,Ur),ct(H,Qa)),Le.mathMl===!0&&(ct(z,qr),ct(H,cl),ct(H,Qa))),me.tagCheck=null,me.attributeCheck=null,on(j,"ADD_TAGS")&&(typeof j.ADD_TAGS=="function"?me.tagCheck=j.ADD_TAGS:ra(j.ADD_TAGS)&&(z===ne&&(z=dn(z)),ct(z,j.ADD_TAGS,Je))),on(j,"ADD_ATTR")&&(typeof j.ADD_ATTR=="function"?me.attributeCheck=j.ADD_ATTR:ra(j.ADD_ATTR)&&(H===U&&(H=dn(H)),ct(H,j.ADD_ATTR,Je))),on(j,"ADD_FORBID_CONTENTS")&&ra(j.ADD_FORBID_CONTENTS)&&(Ze===xt&&(Ze=dn(Ze)),ct(Ze,j.ADD_FORBID_CONTENTS,Je)),Be&&(z["#text"]=!0),je&&ct(z,["html","head","body"]),z.table&&(ct(z,["tbody"]),delete Ee.tbody),j.TRUSTED_TYPES_POLICY){if(typeof j.TRUSTED_TYPES_POLICY.createHTML!="function")throw qn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof j.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw qn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Ce=E;E=j.TRUSTED_TYPES_POLICY;try{D=L("")}catch(De){throw E=Ce,De}}else j.TRUSTED_TYPES_POLICY===null?(E=void 0,D=""):(E===void 0&&(E=T()),E&&typeof D=="string"&&(D=L("")));Ft&&Ft(j),Dt=j},Qe=ct({},[...Hr,...Vr,...lC]),ht=ct({},[...qr,...iC]),it=function(j,X,Ce){return X.namespaceURI===mt?j==="svg":X.namespaceURI===_t?j==="svg"&&(Ce==="annotation-xml"||jt[Ce]):!!Qe[j]},It=function(j,X,Ce){return X.namespaceURI===mt?j==="math":X.namespaceURI===Nt?j==="math"&&yt[Ce]:!!ht[j]},Gt=function(j,X,Ce){return X.namespaceURI===Nt&&!yt[Ce]||X.namespaceURI===_t&&!jt[Ce]?!1:!ht[j]&&($t[j]||!Qe[j])},An=function(j){let X=_(j);(!X||!X.tagName)&&(X={namespaceURI:st,tagName:"template"});const Ce=wa(j.tagName),De=wa(X.tagName);return bt[j.namespaceURI]?j.namespaceURI===Nt?it(Ce,X,De):j.namespaceURI===_t?It(Ce,X,De):j.namespaceURI===mt?Gt(Ce,X,De):!!(Re==="application/xhtml+xml"&&bt[j.namespaceURI]):!1},Wt=function(j){_a(t.removed,{element:j});try{_(j).removeChild(j)}catch{if(x(j),!_(j))throw qn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Kt=function(j,X,Ce){try{j.removeAttributeNode(X)}catch{try{j.removeAttribute(Ce)}catch{}}},Bt=function(j){Tt(j);const X=h(j);if(X){const De=[];Vn(X,Ie=>{_a(De,Ie)}),Vn(De,Ie=>{try{x(Ie)}catch{}})}const Ce=k(j);if(Ce)for(let De=Ce.length-1;De>=0;--De){const Ie=Ce[De],Ye=Ie&&Ie.name;typeof Ye=="string"&&Kt(j,Ie,Ye)}},ut=function(j,X,Ce){if(!Ce)try{Ce=X.getAttributeNode(j)}catch{Ce=null}_a(t.removed,{attribute:Ce||null,from:X});try{Ce?X.removeAttributeNode(Ce):X.removeAttribute(j)}catch{try{X.removeAttribute(j)}catch{}}if(j==="is")if(nt||pt)try{Wt(X)}catch{}else try{X.setAttribute(j,"")}catch{}},Ct=function(j){const X=k(j);if(X)for(let Ce=X.length-1;Ce>=0;--Ce){const De=X[Ce],Ie=De&&De.name;typeof Ie!="string"||H[Je(Ie)]||Kt(j,De,Ie)}},Tt=function(j){const X=[j];for(;X.length>0;){const Ce=X.pop();w(Ce)===pn.element&&Ct(Ce);const Ie=h(Ce);if(Ie)for(let Ye=Ie.length-1;Ye>=0;--Ye)X.push(Ie[Ye])}},Yt=function(j,X){return qe?j==="patchsrc"?!0:j==="for"&&X!=="label"&&X!=="output":!1},gn=function(j){if(!qe)return;const X=[j];for(;X.length>0;){const Ce=X.pop(),De=w(Ce);if(De===pn.processingInstruction||De===pn.comment&&Ut(ml,Ce.data)){try{x(Ce)}catch{}continue}if(De===pn.element){const Ye=Ce,vt=Je(A(Ce));try{Ye.hasAttribute&&Ye.hasAttribute("patchsrc")&&Ye.removeAttribute("patchsrc"),Ye.hasAttribute&&Ye.hasAttribute("for")&&Yt("for",vt)&&Ye.removeAttribute("for")}catch{}}const Ie=h(Ce);if(Ie)for(let Ye=Ie.length-1;Ye>=0;--Ye)X.push(Ie[Ye])}},Nn=function(j){let X=null,Ce=null;if(rt)j="<remove></remove>"+j;else{const Ye=al(j,/^[\r\n\t ]+/);Ce=Ye&&Ye[0]}Re==="application/xhtml+xml"&&st===mt&&(j='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+j+"</body></html>");const De=E?L(j):j;if(st===mt)try{X=new m().parseFromString(De,Re)}catch{}if(!X||!X.documentElement){X=q.createDocument(st,"template",null);try{X.documentElement.innerHTML=Pe?D:De}catch{}}const Ie=X.body||X.documentElement;return j&&Ce&&Ie.insertBefore(a.createTextNode(Ce),Ie.childNodes[0]||null),st===mt?P.call(X,je?"html":"body")[0]:je?X.documentElement:Ie},tn=function(j){const X=y?y(j):j.ownerDocument;return O.call(X||j,j,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Zt=function(j){return j=Ba(j,G," "),j=Ba(j,S," "),j=Ba(j,M," "),j},Ht=function(j){var X;j.normalize();const Ce=y?y(j):j.ownerDocument,De=O.call(Ce||j,j,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let Ie=De.nextNode();for(;Ie;)Ie.data=Zt(Ie.data),Ie=De.nextNode();const Ye=(X=j.querySelectorAll)===null||X===void 0?void 0:X.call(j,"template");Ye&&Vn(Ye,vt=>{Xt(vt.content)&&Ht(vt.content)})},bn=function(j){const X=B?B(j):null;return typeof X!="string"||Je(X)!=="form"?!1:typeof j.nodeName!="string"||typeof j.textContent!="string"||typeof j.removeChild!="function"||j.attributes!==k(j)||typeof j.removeAttribute!="function"||typeof j.setAttribute!="function"||typeof j.namespaceURI!="string"||typeof j.insertBefore!="function"||typeof j.hasChildNodes!="function"||j.nodeType!==v(j)||j.childNodes!==h(j)},Xt=function(j){if(!v||typeof j!="object"||j===null)return!1;try{return v(j)===pn.documentFragment}catch{return!1}},un=function(j){if(!v||typeof j!="object"||j===null)return!1;try{return typeof v(j)=="number"}catch{return!1}};function Ot(ye,j,X){ye.length!==0&&Vn(ye,Ce=>{Ce.call(t,j,X,Dt)})}const nn=function(j,X){return!!(qe&&j.hasChildNodes()&&!un(j.firstElementChild)&&Ut(pl,j.textContent)&&Ut(pl,j.innerHTML)||qe&&j.namespaceURI===mt&&vC[X]&&(un(j.firstElementChild)||typeof j.textContent=="string"&&Ut(xC[X],j.textContent))||j.nodeType===pn.processingInstruction||qe&&j.nodeType===pn.comment&&Ut(ml,j.data))},se=function(j,X){if(j instanceof RegExp)return Ut(j,X);if(j instanceof Function){for(var Ce=arguments.length,De=new Array(Ce>2?Ce-2:0),Ie=2;Ie<Ce;Ie++)De[Ie-2]=arguments[Ie];return!!j(X,...De)}return!1},Ae=function(j,X,Ce){if(!Ee[X]&&ee(X)&&se(pe.tagNameCheck,X))return!1;if(Be&&!Ze[X]){const De=_(j),Ie=h(j);if(Ie&&De){const Ye=Ie.length;for(let vt=Ye-1;vt>=0;--vt){const St=j===Ce?b(Ie[vt],!0):Ie[vt];De.insertBefore(St,f(j))}}}return Wt(j),!0},Te=function(j,X,Ce,De){return j.length===0?X:X===Ce||X===De?dn(X):X},Ke=function(j,X){return j===X||_(j)!==null?!1:(Se&&Tt(j),!0)},Fe=function(j,X){if(Ot(W.beforeSanitizeElements,j,null),Ke(j,X))return!0;if(bn(j))return Wt(j),!0;const Ce=Je(A(j));if(z=Te(W.uponSanitizeElement,z,ne,Oe),Ot(W.uponSanitizeElement,j,{tagName:Ce,allowedTags:z}),Ke(j,X))return!0;if(nn(j,Ce))return Wt(j),!0;if(Ee[Ce]||!(me.tagCheck instanceof Function&&me.tagCheck(Ce))&&!z[Ce]){const Ie=Ae(j,Ce,X);return Ie===!1&&Ot(W.afterSanitizeElements,j,null),Ie}if(w(j)===pn.element&&!An(j)||(Ce==="noscript"||Ce==="noembed"||Ce==="noframes")&&Ut(bC,j.innerHTML))return Wt(j),!0;if(Me&&j.nodeType===pn.text){const Ie=Zt(j.textContent);j.textContent!==Ie&&(_a(t.removed,{element:j.cloneNode()}),j.textContent=Ie)}return Ot(W.afterSanitizeElements,j,null),!1},Y=function(j,X,Ce){if(ge[X]||Yt(X,j)||Ue&&(X==="id"||X==="name")&&(Ce in a||Ce in ae))return!1;const De=H[X]||me.attributeCheck instanceof Function&&me.attributeCheck(X,j);return be&&Ut(I,X)||ie&&Ut(Z,X)?!0:De?At[X]||Ut(re,Ba(Ce,oe,""))||(X==="src"||X==="xlink:href"||X==="href")&&j!=="script"&&rl(Ce,"data:")===0&&et[j]||he&&!Ut(le,Ba(Ce,oe,""))?!0:!Ce:ee(j)&&se(pe.tagNameCheck,j)&&se(pe.attributeNameCheck,X,j)||X==="is"&&pe.allowCustomizedBuiltInElements&&se(pe.tagNameCheck,Ce)},ce=ct({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ee=function(j){return!ce[wa(j)]&&Ut(de,j)},xe=function(j,X,Ce,De){if(E&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Ce)switch(p.getAttributeType(j,X)){case"TrustedHTML":return L(De);case"TrustedScriptURL":return $(De)}return De},$e=function(j,X,Ce,De){try{Ce?j.setAttributeNS(Ce,X,De):j.setAttribute(X,De),bn(j)?Wt(j):nl(t.removed)}catch{ut(X,j)}},We=function(j){Ot(W.beforeSanitizeAttributes,j,null);const X=j.attributes;if(!X||bn(j))return;H=Te(W.uponSanitizeAttribute,H,U,dt);const Ce={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0};let De=X.length;const Ie=Je(j.nodeName);for(;De--;){const Ye=X[De],vt=Ye.name,St=Ye.namespaceURI,an=Ye.value,rn=Je(vt),Rr=an;let Jt=vt==="value"?Rr:eC(Rr);if(Ce.attrName=rn,Ce.attrValue=Jt,Ce.keepAttr=!0,Ce.forceKeepAttr=void 0,Ot(W.uponSanitizeAttribute,j,Ce),Jt=Ce.attrValue,ke&&(rn==="id"||rn==="name")&&rl(Jt,He)!==0&&(ut(vt,j,Ye),Jt=He+Jt),qe&&Ut(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Jt)){ut(vt,j,Ye);continue}if(rn==="attributename"&&al(Jt,"href")){ut(vt,j,Ye);continue}if(!Ce.forceKeepAttr){if(!Ce.keepAttr){ut(vt,j,Ye);continue}if(!ue&&Ut(yC,Jt)){ut(vt,j,Ye);continue}if(Me&&(Jt=Zt(Jt)),!Y(Ie,rn,Jt)){ut(vt,j,Ye);continue}Jt=xe(Ie,rn,St,Jt),Jt!==Rr&&$e(j,vt,St,Jt)}}Ot(W.afterSanitizeAttributes,j,null)},at=function(j){let X=null;const Ce=tn(j);for(Ot(W.beforeSanitizeShadowDOM,j,null);X=Ce.nextNode();)if(Ot(W.uponSanitizeShadowNode,X,null),Fe(X,j),We(X),Xt(X.content)&&at(X.content),w(X)===pn.element){const De=g(X);Xt(De)&&(ft(De),at(De))}Ot(W.afterSanitizeShadowDOM,j,null)},ft=function(j){const X=[{node:j,shadow:null}];for(;X.length>0;){const Ce=X.pop();if(Ce.shadow){at(Ce.shadow);continue}const De=Ce.node,Ye=w(De)===pn.element,vt=h(De);if(vt)for(let St=vt.length-1;St>=0;--St)X.push({node:vt[St],shadow:null});if(Ye){const St=B?B(De):null;if(typeof St=="string"&&Je(St)==="template"){const an=De.content;Xt(an)&&X.push({node:an,shadow:null})}}if(Ye){const St=g(De);Xt(St)&&X.push({node:null,shadow:St},{node:St,shadow:null})}}};return t.sanitize=function(ye){let j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=null,Ce=null,De=null,Ie=null;if(Pe=!ye,Pe&&(ye="<!-->"),typeof ye!="string"&&!un(ye)&&(ye=oC(ye),typeof ye!="string"))throw qn("dirty is not a string, aborting");if(!t.isSupported)return ye;Ve?(z=Oe,H=dt):ze(j),(W.uponSanitizeElement.length>0||W.uponSanitizeAttribute.length>0)&&(z=dn(z)),W.uponSanitizeAttribute.length>0&&(H=dn(H)),t.removed=[];const Ye=Se&&typeof ye!="string"&&un(ye);if(Ye){gn(ye);const an=A(ye);if(typeof an=="string"){const rn=Je(an);if(!z[rn]||Ee[rn])throw Bt(ye),qn("root node is forbidden and cannot be sanitized in-place")}if(bn(ye))throw Bt(ye),qn("root node is clobbered and cannot be sanitized in-place");try{ft(ye)}catch(rn){throw Bt(ye),rn}}else if(un(ye))X=Nn("<!---->"),Ce=X.ownerDocument.importNode(ye,!0),Ce.nodeType===pn.element&&Ce.nodeName==="BODY"||Ce.nodeName==="HTML"?X=Ce:X.appendChild(Ce),ft(Ce);else{if(!nt&&!Me&&!je&&ye.indexOf("<")===-1)return E&&Ne?L(ye):ye;if(X=Nn(ye),!X)return nt?null:Ne?D:""}X&&rt&&Wt(X.firstChild);const vt=Ye?ye:X;try{const an=tn(vt);for(;De=an.nextNode();)Fe(De,vt),We(De),Xt(De.content)&&at(De.content)}catch(an){throw Ye&&(Bt(ye),Vn(t.removed,rn=>{rn.element&&Tt(rn.element)})),an}if(Ye)return Vn(t.removed,an=>{an.element&&Tt(an.element)}),Me&&Ht(ye),ye;if(nt){if(Me&&Ht(X),pt)for(Ie=Q.call(X.ownerDocument);X.firstChild;)Ie.appendChild(X.firstChild);else Ie=X;return(H.shadowroot||H.shadowrootmode)&&(Ie=V.call(r,Ie,!0)),Ie}let St=je?X.outerHTML:X.innerHTML;return je&&z["!doctype"]&&X.ownerDocument&&X.ownerDocument.doctype&&X.ownerDocument.doctype.name&&Ut(fC,X.ownerDocument.doctype.name)&&(St="<!DOCTYPE "+X.ownerDocument.doctype.name+`>
|
|
798
|
-
`+
|
|
797
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G1(e,t){return V1(e)||q1(e,t)||K1(e,t)||U1()}function K1(e,t){if(e){if(typeof e=="string")return Js(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)?Js(e,t):void 0}}const Qs=Object.entries,el=Object.setPrototypeOf,Y1=Object.isFrozen,Z1=Object.getPrototypeOf,X1=Object.getOwnPropertyDescriptor;let Ft=Object.freeze,zt=Object.seal,aa=Object.create,tl=typeof Reflect<"u"&&Reflect,Or=tl.apply,zr=tl.construct;Ft||(Ft=function(t){return t}),zt||(zt=function(t){return t}),Or||(Or=function(t,a){for(var r=arguments.length,l=new Array(r>2?r-2:0),s=2;s<r;s++)l[s-2]=arguments[s];return t.apply(a,l)}),zr||(zr=function(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),l=1;l<a;l++)r[l-1]=arguments[l];return new t(...r)});const Vn=Pt(Array.prototype.forEach),J1=Pt(Array.prototype.lastIndexOf),nl=Pt(Array.prototype.pop),_a=Pt(Array.prototype.push),Q1=Pt(Array.prototype.splice),ra=Array.isArray,wa=Pt(String.prototype.toLowerCase),Wr=Pt(String.prototype.toString),al=Pt(String.prototype.match),Ba=Pt(String.prototype.replace),rl=Pt(String.prototype.indexOf),eC=Pt(String.prototype.trim),tC=Pt(Number.prototype.toString),nC=Pt(Boolean.prototype.toString),ol=typeof BigInt>"u"?null:Pt(BigInt.prototype.toString),sl=typeof Symbol>"u"?null:Pt(Symbol.prototype.toString),on=Pt(Object.prototype.hasOwnProperty),ka=Pt(Object.prototype.toString),Ut=Pt(RegExp.prototype.test),qn=aC(TypeError);function Pt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var a=arguments.length,r=new Array(a>1?a-1:0),l=1;l<a;l++)r[l-1]=arguments[l];return Or(e,t,r)}}function aC(e){return function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return zr(e,a)}}function ut(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wa;if(el&&el(e,null),!ra(t))return e;let r=t.length;for(;r--;){let l=t[r];if(typeof l=="string"){const s=a(l);s!==l&&(Y1(t)||(t[r]=s),l=s)}e[l]=!0}return e}function rC(e){for(let t=0;t<e.length;t++)on(e,t)||(e[t]=null);return e}function dn(e){const t=aa(null);for(const r of Qs(e)){var a=G1(r,2);const l=a[0],s=a[1];on(e,l)&&(ra(s)?t[l]=rC(s):s&&typeof s=="object"&&s.constructor===Object?t[l]=dn(s):t[l]=s)}return t}function oC(e){switch(typeof e){case"string":return e;case"number":return tC(e);case"boolean":return nC(e);case"bigint":return ol?ol(e):"0";case"symbol":return sl?sl(e):"Symbol()";case"undefined":return ka(e);case"function":case"object":{if(e===null)return ka(e);const t=e,a=yn(t,"toString");if(typeof a=="function"){const r=a(t);return typeof r=="string"?r:ka(r)}return ka(e)}default:return ka(e)}}function yn(e,t){for(;e!==null;){const r=X1(e,t);if(r){if(r.get)return Pt(r.get);if(typeof r.value=="function")return Pt(r.value)}e=Z1(e)}function a(){return null}return a}function sC(e){try{return Ut(e,""),!0}catch{return!1}}const ll=Ft(["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"]),Hr=Ft(["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"]),Vr=Ft(["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"]),lC=Ft(["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"]),qr=Ft(["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"]),iC=Ft(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),il=Ft(["#text"]),ul=Ft(["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"]),Ur=Ft(["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"]),cl=Ft(["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"]),Qa=Ft(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),uC=zt(/{{[\w\W]*|^[\w\W]*}}/g),cC=zt(/<%[\w\W]*|^[\w\W]*%>/g),dC=zt(/\${[\w\W]*/g),pC=zt(/^data-[\-\w.\u00B7-\uFFFF]+$/),mC=zt(/^aria-[\-\w]+$/),dl=zt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),hC=zt(/^(?:\w+script|data):/i),CC=zt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fC=zt(/^html$/i),gC=zt(/^[a-z][.\w]*(-[.\w]+)+$/i),pl=zt(/<[/\w!]/g),ml=zt(/<[/\w]/g),bC=zt(/<\/no(script|embed|frames)/i),yC=zt(/\/>/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},hl=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],vC=Ft(ut({},hl)),xC=(function(){const e={};return Vn(hl,t=>{e[t]=zt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Ft(e)})(),_C=function(){return typeof window>"u"?null:window},wC=function(t,a){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const l="data-tt-policy-suffix";a&&a.hasAttribute(l)&&(r=a.getAttribute(l));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Cl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},In=function(t,a,r,l){return on(t,a)&&ra(t[a])?ut(l.base?dn(l.base):{},t[a],l.transform):r},Gr=function(t,a,r){const l=on(t,a)?t[a]:void 0;return l&&typeof l=="object"?dn(l):r()};function fl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_C();const t=ye=>fl(ye);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,l=r.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,i=e.Node,u=e.Element,c=e.NodeFilter,d=e.NamedNodeMap;d===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const m=e.DOMParser,p=e.trustedTypes,C=u.prototype,b=yn(C,"cloneNode"),x=yn(C,"remove"),f=yn(C,"nextSibling"),h=yn(C,"childNodes"),_=yn(C,"parentNode"),g=yn(C,"shadowRoot"),k=yn(C,"attributes"),v=i&&i.prototype?yn(i.prototype,"nodeType"):null,B=i&&i.prototype?yn(i.prototype,"nodeName"):null,y=i&&i.prototype?yn(i.prototype,"ownerDocument"):null,w=function(j){return v?v(j):j.nodeType},A=function(j){return B?B(j):j.nodeName};if(typeof s=="function"){const ye=a.createElement("template");ye.content&&ye.content.ownerDocument&&(a=ye.content.ownerDocument)}let E,D="",N,F=!1,R=0;const K=function(){if(R>0)throw qn('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.')},L=function(j){K(),R++;try{return E.createHTML(j)}finally{R--}},$=function(j){K(),R++;try{return E.createScriptURL(j)}finally{R--}},T=function(){return F||(N=wC(p,l),F=!0),N},J=a,q=J.implementation,O=J.createNodeIterator,Q=J.createDocumentFragment,P=J.getElementsByTagName,V=r.importNode;let W=Cl();t.isSupported=typeof Qs=="function"&&typeof _=="function"&&q&&q.createHTMLDocument!==void 0;const G=uC,S=cC,M=dC,I=pC,Z=mC,le=hC,oe=CC,de=gC;let re=dl,z=null;const ne=ut({},[...ll,...Hr,...Vr,...qr,...il]);let H=null;const U=ut({},[...ul,...Ur,...cl,...Qa]);let pe=Object.seal(aa(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}})),Ee=null,ge=null;const me=Object.seal(aa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ie=!0,be=!0,he=!1,ue=!0,Me=!1,Ve=!0,Te=!1,qe=!1,Oe=null,ct=null,rt=!1,nt=!1,mt=!1,Ne=!1,Ue=!0,ke=!1;const He="user-content-";let Be=!0,Se=!1,Le={},Ze=null;const _t=ut({},["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 et=null;const Xe=ut({},["audio","video","img","source","image","track"]);let Nt=null;const gt=ut({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),wt="http://www.w3.org/1998/Math/MathML",Et="http://www.w3.org/2000/svg",ht="http://www.w3.org/1999/xhtml";let st=ht,Pe=!1,bt=null;const Bt=ut({},[wt,Et,ht],Wr),lt=Ft(["mi","mo","mn","ms","mtext"]);let Tt=ut({},lt);const Ge=Ft(["annotation-xml"]);let yt=ut({},Ge);const Rt=ut({},["title","style","font","a","script"]);let Re=null;const ot=["application/xhtml+xml","text/html"],Dt="text/html";let Je=null,St=null;const ae=a.createElement("form"),ve=function(j){return j instanceof RegExp||j instanceof Function},ze=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(St&&St===j)return;(!j||typeof j!="object")&&(j={}),j=dn(j),Re=ot.indexOf(j.PARSER_MEDIA_TYPE)===-1?Dt:j.PARSER_MEDIA_TYPE,Je=Re==="application/xhtml+xml"?Wr:wa,z=In(j,"ALLOWED_TAGS",ne,{transform:Je}),H=In(j,"ALLOWED_ATTR",U,{transform:Je}),bt=In(j,"ALLOWED_NAMESPACES",Bt,{transform:Wr}),Nt=In(j,"ADD_URI_SAFE_ATTR",gt,{transform:Je,base:gt}),et=In(j,"ADD_DATA_URI_TAGS",Xe,{transform:Je,base:Xe}),Ze=In(j,"FORBID_CONTENTS",_t,{transform:Je}),Ee=In(j,"FORBID_TAGS",dn({}),{transform:Je}),ge=In(j,"FORBID_ATTR",dn({}),{transform:Je}),Le=on(j,"USE_PROFILES")?j.USE_PROFILES&&typeof j.USE_PROFILES=="object"?dn(j.USE_PROFILES):j.USE_PROFILES:!1,ie=j.ALLOW_ARIA_ATTR!==!1,be=j.ALLOW_DATA_ATTR!==!1,he=j.ALLOW_UNKNOWN_PROTOCOLS||!1,ue=j.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Me=j.SAFE_FOR_TEMPLATES||!1,Ve=j.SAFE_FOR_XML!==!1,Te=j.WHOLE_DOCUMENT||!1,nt=j.RETURN_DOM||!1,mt=j.RETURN_DOM_FRAGMENT||!1,Ne=j.RETURN_TRUSTED_TYPE||!1,rt=j.FORCE_BODY||!1,Ue=j.SANITIZE_DOM!==!1,ke=j.SANITIZE_NAMED_PROPS||!1,Be=j.KEEP_CONTENT!==!1,Se=j.IN_PLACE||!1,re=sC(j.ALLOWED_URI_REGEXP)?j.ALLOWED_URI_REGEXP:dl,st=typeof j.NAMESPACE=="string"?j.NAMESPACE:ht,Tt=Gr(j,"MATHML_TEXT_INTEGRATION_POINTS",()=>ut({},lt)),yt=Gr(j,"HTML_INTEGRATION_POINTS",()=>ut({},Ge));const X=Gr(j,"CUSTOM_ELEMENT_HANDLING",()=>aa(null));if(pe=aa(null),on(X,"tagNameCheck")&&ve(X.tagNameCheck)&&(pe.tagNameCheck=X.tagNameCheck),on(X,"attributeNameCheck")&&ve(X.attributeNameCheck)&&(pe.attributeNameCheck=X.attributeNameCheck),on(X,"allowCustomizedBuiltInElements")&&typeof X.allowCustomizedBuiltInElements=="boolean"&&(pe.allowCustomizedBuiltInElements=X.allowCustomizedBuiltInElements),zt(pe),Me&&(be=!1),mt&&(nt=!0),Le&&(z=ut({},il),H=aa(null),Le.html===!0&&(ut(z,ll),ut(H,ul)),Le.svg===!0&&(ut(z,Hr),ut(H,Ur),ut(H,Qa)),Le.svgFilters===!0&&(ut(z,Vr),ut(H,Ur),ut(H,Qa)),Le.mathMl===!0&&(ut(z,qr),ut(H,cl),ut(H,Qa))),me.tagCheck=null,me.attributeCheck=null,on(j,"ADD_TAGS")&&(typeof j.ADD_TAGS=="function"?me.tagCheck=j.ADD_TAGS:ra(j.ADD_TAGS)&&(z===ne&&(z=dn(z)),ut(z,j.ADD_TAGS,Je))),on(j,"ADD_ATTR")&&(typeof j.ADD_ATTR=="function"?me.attributeCheck=j.ADD_ATTR:ra(j.ADD_ATTR)&&(H===U&&(H=dn(H)),ut(H,j.ADD_ATTR,Je))),on(j,"ADD_FORBID_CONTENTS")&&ra(j.ADD_FORBID_CONTENTS)&&(Ze===_t&&(Ze=dn(Ze)),ut(Ze,j.ADD_FORBID_CONTENTS,Je)),Be&&(z["#text"]=!0),Te&&ut(z,["html","head","body"]),z.table&&(ut(z,["tbody"]),delete Ee.tbody),j.TRUSTED_TYPES_POLICY){if(typeof j.TRUSTED_TYPES_POLICY.createHTML!="function")throw qn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof j.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw qn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Ce=E;E=j.TRUSTED_TYPES_POLICY;try{D=L("")}catch(De){throw E=Ce,De}}else j.TRUSTED_TYPES_POLICY===null?(E=void 0,D=""):(E===void 0&&(E=T()),E&&typeof D=="string"&&(D=L("")));Ft&&Ft(j),St=j},Qe=ut({},[...Hr,...Vr,...lC]),Ct=ut({},[...qr,...iC]),it=function(j,X,Ce){return X.namespaceURI===ht?j==="svg":X.namespaceURI===wt?j==="svg"&&(Ce==="annotation-xml"||Tt[Ce]):!!Qe[j]},It=function(j,X,Ce){return X.namespaceURI===ht?j==="math":X.namespaceURI===Et?j==="math"&&yt[Ce]:!!Ct[j]},Gt=function(j,X,Ce){return X.namespaceURI===Et&&!yt[Ce]||X.namespaceURI===wt&&!Tt[Ce]?!1:!Ct[j]&&(Rt[j]||!Qe[j])},An=function(j){let X=_(j);(!X||!X.tagName)&&(X={namespaceURI:st,tagName:"template"});const Ce=wa(j.tagName),De=wa(X.tagName);return bt[j.namespaceURI]?j.namespaceURI===Et?it(Ce,X,De):j.namespaceURI===wt?It(Ce,X,De):j.namespaceURI===ht?Gt(Ce,X,De):!!(Re==="application/xhtml+xml"&&bt[j.namespaceURI]):!1},Wt=function(j){_a(t.removed,{element:j});try{_(j).removeChild(j)}catch{if(x(j),!_(j))throw qn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Kt=function(j,X,Ce){try{j.removeAttributeNode(X)}catch{try{j.removeAttribute(Ce)}catch{}}},kt=function(j){vt(j);const X=h(j);if(X){const De=[];Vn(X,Ie=>{_a(De,Ie)}),Vn(De,Ie=>{try{x(Ie)}catch{}})}const Ce=k(j);if(Ce)for(let De=Ce.length-1;De>=0;--De){const Ie=Ce[De],Ye=Ie&&Ie.name;typeof Ye=="string"&&Kt(j,Ie,Ye)}},dt=function(j,X,Ce){if(!Ce)try{Ce=X.getAttributeNode(j)}catch{Ce=null}_a(t.removed,{attribute:Ce||null,from:X});try{Ce?X.removeAttributeNode(Ce):X.removeAttribute(j)}catch{try{X.removeAttribute(j)}catch{}}if(j==="is")if(nt||mt)try{Wt(X)}catch{}else try{X.setAttribute(j,"")}catch{}},pt=function(j){const X=k(j);if(X)for(let Ce=X.length-1;Ce>=0;--Ce){const De=X[Ce],Ie=De&&De.name;typeof Ie!="string"||H[Je(Ie)]||Kt(j,De,Ie)}},vt=function(j){const X=[j];for(;X.length>0;){const Ce=X.pop();w(Ce)===pn.element&&pt(Ce);const Ie=h(Ce);if(Ie)for(let Ye=Ie.length-1;Ye>=0;--Ye)X.push(Ie[Ye])}},Yt=function(j,X){return Ve?j==="patchsrc"?!0:j==="for"&&X!=="label"&&X!=="output":!1},gn=function(j){if(!Ve)return;const X=[j];for(;X.length>0;){const Ce=X.pop(),De=w(Ce);if(De===pn.processingInstruction||De===pn.comment&&Ut(ml,Ce.data)){try{x(Ce)}catch{}continue}if(De===pn.element){const Ye=Ce,xt=Je(A(Ce));try{Ye.hasAttribute&&Ye.hasAttribute("patchsrc")&&Ye.removeAttribute("patchsrc"),Ye.hasAttribute&&Ye.hasAttribute("for")&&Yt("for",xt)&&Ye.removeAttribute("for")}catch{}}const Ie=h(Ce);if(Ie)for(let Ye=Ie.length-1;Ye>=0;--Ye)X.push(Ie[Ye])}},Nn=function(j){let X=null,Ce=null;if(rt)j="<remove></remove>"+j;else{const Ye=al(j,/^[\r\n\t ]+/);Ce=Ye&&Ye[0]}Re==="application/xhtml+xml"&&st===ht&&(j='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+j+"</body></html>");const De=E?L(j):j;if(st===ht)try{X=new m().parseFromString(De,Re)}catch{}if(!X||!X.documentElement){X=q.createDocument(st,"template",null);try{X.documentElement.innerHTML=Pe?D:De}catch{}}const Ie=X.body||X.documentElement;return j&&Ce&&Ie.insertBefore(a.createTextNode(Ce),Ie.childNodes[0]||null),st===ht?P.call(X,Te?"html":"body")[0]:Te?X.documentElement:Ie},tn=function(j){const X=y?y(j):j.ownerDocument;return O.call(X||j,j,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Zt=function(j){return j=Ba(j,G," "),j=Ba(j,S," "),j=Ba(j,M," "),j},Ht=function(j){var X;j.normalize();const Ce=y?y(j):j.ownerDocument,De=O.call(Ce||j,j,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let Ie=De.nextNode();for(;Ie;)Ie.data=Zt(Ie.data),Ie=De.nextNode();const Ye=(X=j.querySelectorAll)===null||X===void 0?void 0:X.call(j,"template");Ye&&Vn(Ye,xt=>{Xt(xt.content)&&Ht(xt.content)})},bn=function(j){const X=B?B(j):null;return typeof X!="string"||Je(X)!=="form"?!1:typeof j.nodeName!="string"||typeof j.textContent!="string"||typeof j.removeChild!="function"||j.attributes!==k(j)||typeof j.removeAttribute!="function"||typeof j.setAttribute!="function"||typeof j.namespaceURI!="string"||typeof j.insertBefore!="function"||typeof j.hasChildNodes!="function"||j.nodeType!==v(j)||j.childNodes!==h(j)},Xt=function(j){if(!v||typeof j!="object"||j===null)return!1;try{return v(j)===pn.documentFragment}catch{return!1}},un=function(j){if(!v||typeof j!="object"||j===null)return!1;try{return typeof v(j)=="number"}catch{return!1}};function Ot(ye,j,X){ye.length!==0&&Vn(ye,Ce=>{Ce.call(t,j,X,St)})}const nn=function(j,X){return!!(Ve&&j.hasChildNodes()&&!un(j.firstElementChild)&&Ut(pl,j.textContent)&&Ut(pl,j.innerHTML)||Ve&&j.namespaceURI===ht&&vC[X]&&(un(j.firstElementChild)||typeof j.textContent=="string"&&Ut(xC[X],j.textContent))||j.nodeType===pn.processingInstruction||Ve&&j.nodeType===pn.comment&&Ut(ml,j.data))},se=function(j,X){if(j instanceof RegExp)return Ut(j,X);if(j instanceof Function){for(var Ce=arguments.length,De=new Array(Ce>2?Ce-2:0),Ie=2;Ie<Ce;Ie++)De[Ie-2]=arguments[Ie];return!!j(X,...De)}return!1},Ae=function(j,X,Ce){if(!Ee[X]&&ee(X)&&se(pe.tagNameCheck,X))return!1;if(Be&&!Ze[X]){const De=_(j),Ie=h(j);if(Ie&&De){const Ye=Ie.length;for(let xt=Ye-1;xt>=0;--xt){const jt=j===Ce?b(Ie[xt],!0):Ie[xt];De.insertBefore(jt,f(j))}}}return Wt(j),!0},je=function(j,X,Ce,De){return j.length===0?X:X===Ce||X===De?dn(X):X},Ke=function(j,X){return j===X||_(j)!==null?!1:(Se&&vt(j),!0)},Fe=function(j,X){if(Ot(W.beforeSanitizeElements,j,null),Ke(j,X))return!0;if(bn(j))return Wt(j),!0;const Ce=Je(A(j));if(z=je(W.uponSanitizeElement,z,ne,Oe),Ot(W.uponSanitizeElement,j,{tagName:Ce,allowedTags:z}),Ke(j,X))return!0;if(nn(j,Ce))return Wt(j),!0;if(Ee[Ce]||!(me.tagCheck instanceof Function&&me.tagCheck(Ce))&&!z[Ce]){const Ie=Ae(j,Ce,X);return Ie===!1&&Ot(W.afterSanitizeElements,j,null),Ie}if(w(j)===pn.element&&!An(j)||(Ce==="noscript"||Ce==="noembed"||Ce==="noframes")&&Ut(bC,j.innerHTML))return Wt(j),!0;if(Me&&j.nodeType===pn.text){const Ie=Zt(j.textContent);j.textContent!==Ie&&(_a(t.removed,{element:j.cloneNode()}),j.textContent=Ie)}return Ot(W.afterSanitizeElements,j,null),!1},Y=function(j,X,Ce){if(ge[X]||Yt(X,j)||Ue&&(X==="id"||X==="name")&&(Ce in a||Ce in ae))return!1;const De=H[X]||me.attributeCheck instanceof Function&&me.attributeCheck(X,j);return be&&Ut(I,X)||ie&&Ut(Z,X)?!0:De?Nt[X]||Ut(re,Ba(Ce,oe,""))||(X==="src"||X==="xlink:href"||X==="href")&&j!=="script"&&rl(Ce,"data:")===0&&et[j]||he&&!Ut(le,Ba(Ce,oe,""))?!0:!Ce:ee(j)&&se(pe.tagNameCheck,j)&&se(pe.attributeNameCheck,X,j)||X==="is"&&pe.allowCustomizedBuiltInElements&&se(pe.tagNameCheck,Ce)},ce=ut({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ee=function(j){return!ce[wa(j)]&&Ut(de,j)},xe=function(j,X,Ce,De){if(E&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Ce)switch(p.getAttributeType(j,X)){case"TrustedHTML":return L(De);case"TrustedScriptURL":return $(De)}return De},$e=function(j,X,Ce,De){try{Ce?j.setAttributeNS(Ce,X,De):j.setAttribute(X,De),bn(j)?Wt(j):nl(t.removed)}catch{dt(X,j)}},We=function(j){Ot(W.beforeSanitizeAttributes,j,null);const X=j.attributes;if(!X||bn(j))return;H=je(W.uponSanitizeAttribute,H,U,ct);const Ce={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0};let De=X.length;const Ie=Je(j.nodeName);for(;De--;){const Ye=X[De],xt=Ye.name,jt=Ye.namespaceURI,an=Ye.value,rn=Je(xt),Rr=an;let Jt=xt==="value"?Rr:eC(Rr);if(Ce.attrName=rn,Ce.attrValue=Jt,Ce.keepAttr=!0,Ce.forceKeepAttr=void 0,Ot(W.uponSanitizeAttribute,j,Ce),Jt=Ce.attrValue,ke&&(rn==="id"||rn==="name")&&rl(Jt,He)!==0&&(dt(xt,j,Ye),Jt=He+Jt),Ve&&Ut(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Jt)){dt(xt,j,Ye);continue}if(rn==="attributename"&&al(Jt,"href")){dt(xt,j,Ye);continue}if(!Ce.forceKeepAttr){if(!Ce.keepAttr){dt(xt,j,Ye);continue}if(!ue&&Ut(yC,Jt)){dt(xt,j,Ye);continue}if(Me&&(Jt=Zt(Jt)),!Y(Ie,rn,Jt)){dt(xt,j,Ye);continue}Jt=xe(Ie,rn,jt,Jt),Jt!==Rr&&$e(j,xt,jt,Jt)}}Ot(W.afterSanitizeAttributes,j,null)},at=function(j){let X=null;const Ce=tn(j);for(Ot(W.beforeSanitizeShadowDOM,j,null);X=Ce.nextNode();)if(Ot(W.uponSanitizeShadowNode,X,null),Fe(X,j),We(X),Xt(X.content)&&at(X.content),w(X)===pn.element){const De=g(X);Xt(De)&&(ft(De),at(De))}Ot(W.afterSanitizeShadowDOM,j,null)},ft=function(j){const X=[{node:j,shadow:null}];for(;X.length>0;){const Ce=X.pop();if(Ce.shadow){at(Ce.shadow);continue}const De=Ce.node,Ye=w(De)===pn.element,xt=h(De);if(xt)for(let jt=xt.length-1;jt>=0;--jt)X.push({node:xt[jt],shadow:null});if(Ye){const jt=B?B(De):null;if(typeof jt=="string"&&Je(jt)==="template"){const an=De.content;Xt(an)&&X.push({node:an,shadow:null})}}if(Ye){const jt=g(De);Xt(jt)&&X.push({node:null,shadow:jt},{node:jt,shadow:null})}}};return t.sanitize=function(ye){let j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=null,Ce=null,De=null,Ie=null;if(Pe=!ye,Pe&&(ye="<!-->"),typeof ye!="string"&&!un(ye)&&(ye=oC(ye),typeof ye!="string"))throw qn("dirty is not a string, aborting");if(!t.isSupported)return ye;qe?(z=Oe,H=ct):ze(j),(W.uponSanitizeElement.length>0||W.uponSanitizeAttribute.length>0)&&(z=dn(z)),W.uponSanitizeAttribute.length>0&&(H=dn(H)),t.removed=[];const Ye=Se&&typeof ye!="string"&&un(ye);if(Ye){gn(ye);const an=A(ye);if(typeof an=="string"){const rn=Je(an);if(!z[rn]||Ee[rn])throw kt(ye),qn("root node is forbidden and cannot be sanitized in-place")}if(bn(ye))throw kt(ye),qn("root node is clobbered and cannot be sanitized in-place");try{ft(ye)}catch(rn){throw kt(ye),rn}}else if(un(ye))X=Nn("<!---->"),Ce=X.ownerDocument.importNode(ye,!0),Ce.nodeType===pn.element&&Ce.nodeName==="BODY"||Ce.nodeName==="HTML"?X=Ce:X.appendChild(Ce),ft(Ce);else{if(!nt&&!Me&&!Te&&ye.indexOf("<")===-1)return E&&Ne?L(ye):ye;if(X=Nn(ye),!X)return nt?null:Ne?D:""}X&&rt&&Wt(X.firstChild);const xt=Ye?ye:X;try{const an=tn(xt);for(;De=an.nextNode();)Fe(De,xt),We(De),Xt(De.content)&&at(De.content)}catch(an){throw Ye&&(kt(ye),Vn(t.removed,rn=>{rn.element&&vt(rn.element)})),an}if(Ye)return Vn(t.removed,an=>{an.element&&vt(an.element)}),Me&&Ht(ye),ye;if(nt){if(Me&&Ht(X),mt)for(Ie=Q.call(X.ownerDocument);X.firstChild;)Ie.appendChild(X.firstChild);else Ie=X;return(H.shadowroot||H.shadowrootmode)&&(Ie=V.call(r,Ie,!0)),Ie}let jt=Te?X.outerHTML:X.innerHTML;return Te&&z["!doctype"]&&X.ownerDocument&&X.ownerDocument.doctype&&X.ownerDocument.doctype.name&&Ut(fC,X.ownerDocument.doctype.name)&&(jt="<!DOCTYPE "+X.ownerDocument.doctype.name+`>
|
|
798
|
+
`+jt),Me&&(jt=Zt(jt)),E&&Ne?L(jt):jt},t.setConfig=function(){let ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ze(ye),qe=!0,Oe=z,ct=H},t.clearConfig=function(){St=null,qe=!1,Oe=null,ct=null,E=N,D=""},t.isValidAttribute=function(ye,j,X){St||ze({});const Ce=Je(ye),De=Je(j);return Y(Ce,De,X)},t.addHook=function(ye,j){typeof j=="function"&&on(W,ye)&&_a(W[ye],j)},t.removeHook=function(ye,j){if(on(W,ye)){if(j!==void 0){const X=J1(W[ye],j);return X===-1?void 0:Q1(W[ye],X,1)[0]}return nl(W[ye])}},t.removeHooks=function(ye){on(W,ye)&&(W[ye]=[])},t.removeAllHooks=function(){W=Cl()},t}var oa=fl();let Kr=null;const BC=1500;function Yr(){Kr?.clear(),Kr=null}function kC(e,{onEnd:t,rate:a=.9}={}){if(typeof window>"u"||typeof SpeechSynthesisUtterance>"u"||!("speechSynthesis"in window)){t?.();return}const r=window.speechSynthesis;Yr();let l=!1;const s=()=>{if(!l){l=!0;try{t?.()}catch{}}};try{r.cancel()}catch{s();return}const i=()=>{Yr();try{r.cancel();const d=new SpeechSynthesisUtterance(e),m=r.getVoices().find(p=>p.lang.startsWith("ko"));m&&(d.voice=m),d.rate=a,d.onend=t?s:null,d.onerror=t?s:null,r.speak(d)}catch{s()}};let u;try{u=r.getVoices()}catch{s();return}if(u.length>0){i();return}const c=setTimeout(i,BC);try{r.addEventListener("voiceschanged",i,{once:!0})}catch{clearTimeout(c),s();return}Kr={clear:()=>{clearTimeout(c),r.removeEventListener("voiceschanged",i)}}}function Zr(){Yr(),typeof window<"u"&&"speechSynthesis"in window&&window.speechSynthesis.cancel()}const AC=/^(?:[a-z]+:)?\/\//i,NC="__ihab_core_asset_base_url__";function EC(){return globalThis[NC]??""}function Xr(e){const t=String(e||"").trim();if(!t)return"";if(AC.test(t)||t.startsWith("data:")||t.startsWith("blob:"))return t;const a=t.startsWith("/")?t:`/${t}`,r=EC();return r?`${r}${a}`:a}const gl="__ihab_core_storage_resolvers__";function Aa(){return globalThis[gl]??null}function DC(e){globalThis[gl]=e}let bl=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 SC(e){DC(e)}function yl(e,t){if(!e)return null;const a=Aa();return a?.resolvePath?a.resolvePath(e,t):t?`${t}/${e}.mp3`:null}async function vl(e){if(!e)return null;const t=Aa();if(!t)throw new bl("getSignedOrPublicUrl");try{return await t.resolveUrl(e)}catch{return null}}async function xl(e){const t=Aa();if(!t)throw new bl("downloadSound");return t.download(e)}function jC(){return Aa()?.noiseBaseUrl??"/sounds/noise"}function TC(){const e=Number(Aa()?.noiseFileGain);return Number.isFinite(e)&&e>0?e:1}function MC(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}const _l="__ihab_core_tts_config__";function Na(){return globalThis[_l]?.urlResolver??null}function Jr(){return globalThis[_l]?.fallbackUrlResolver??null}const LC="__ihab_core_pronunciation_resolver__";function $C(){return globalThis[LC]??null}let Fn=null;const Ea=new WeakMap,Qr=new WeakMap,eo=new WeakMap;let wl=!1;const Bl=e=>Math.max(0,Math.min(1,Number.isFinite(e)?e:0));function RC(){if(wl||typeof document>"u")return;wl=!0;const e=()=>{try{Fn&&Fn.state!=="running"&&Fn.resume()}catch{}};for(const t of["pointerdown","touchend","keydown"])document.addEventListener(t,e,{capture:!0,passive:!0})}function kl(){if(Fn)return Fn;try{const e=window.AudioContext||window.webkitAudioContext;return e?(Fn=new e,RC(),Fn):null}catch{return null}}function to(){try{Fn?.resume()}catch{}}function no(e,t){const a=Ea.get(t);if(a)return a;try{const r=e.createMediaElementSource(t),l=e.createGain(),s=e.createAnalyser();s.fftSize=1024,s.smoothingTimeConstant=.6,l.gain.value=Bl(Qr.get(t)??t.volume),r.connect(l),l.connect(s),l.connect(e.destination);try{t.volume=1}catch{}const i={gain:l,analyser:s};return Ea.set(t,i),i}catch{return null}}function er(e){if(!e)return Promise.resolve(null);const t=Ea.get(e);if(t)return Promise.resolve(t.analyser);const a=kl();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 l=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,l),l}function PC(e){if(!e)return null;const t=Ea.get(e);if(t)return t.analyser;const a=kl();return a?a.state==="running"?no(a,e)?.analyser??null:(er(e),null):null}function On(e,t){const a=Bl(t);Qr.set(e,a);const r=Ea.get(e);if(r){try{e.volume!==1&&(e.volume=1)}catch{}const l=r.gain.gain;try{const s=r.gain.context.currentTime;l.cancelScheduledValues(s),l.setTargetAtTime(a,s,.01)}catch{try{l.value=a}catch{}}return"gain"}try{e.volume=a}catch{}return"element"}function tr(e){return Qr.get(e)??e.volume}function IC(e,t){e.getFloatTimeDomainData(t);let a=0;for(let r=0;r<t.length;r++){const l=t[r];a+=l*l}return Math.sqrt(a/t.length)}const FC="__ihab_core_image_config__";function sa(){return globalThis[FC]??null}const Al="word_image_existence_map_v1",OC="ihab:image-existence-updated";let Da=null;function zC(){Da!==null&&(clearTimeout(Da),Da=null),typeof window<"u"&&window.dispatchEvent(new Event(OC))}function WC(){Da===null&&(Da=setTimeout(zC,200))}let Un=null,ao=0;const Sa=new Map;function HC(){if(Un)return Un;try{const e=typeof localStorage<"u"?localStorage.getItem(Al):null,t=e?JSON.parse(e):null,a={};if(t&&typeof t=="object"&&!Array.isArray(t))for(const[r,l]of Object.entries(t))typeof l=="boolean"&&(a[r]=l);Un=a}catch{Un={}}return Un}let ro=null;function VC(){ro===null&&(ro=setTimeout(()=>{ro=null;try{typeof localStorage<"u"&&Un&&localStorage.setItem(Al,JSON.stringify(Un))}catch{}},200))}function qC(e,t){return`${e}_${t??1}`}async function UC(e,t,a=!1){const r=HC(),l=qC(e,t);if(!a&&l in r)return r[l];if(!a&&Sa.has(l))return Sa.get(l);const s=sa();if(!s)return!1;let i;try{i=s(e,t)}catch{return!1}if(!i)return!1;let u;try{u=fetch(i,{method:"HEAD",signal:MC(8e3)})}catch{return!1}const c=u.then(d=>d.ok?!0:d.status===404||d.status===410?!1:null,()=>null).then(d=>Sa.get(l)!==c?d??!1:(Sa.delete(l),d===null?!1:(r[l]=d,ao++,VC(),d)));return Sa.set(l,c),c}async function Nl(e,t){const a=ao,r=await UC(e,t);return ao!==a&&WC(),r}const El=90;function Dl(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 GC(e){return Dl(e)>90?"LMS":"SMS"}function Sl(e,t=85){const a=Dl(e),r=GC(e),l=r==="SMS"?90:2e3,s=typeof t=="number"?t:null;return{bytes:a,type:r,limit:l,over:a>l,target:s,overTarget:s!==null&&a>s}}const KC=["onset","vowel","coda","glide"],jl="none",YC={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},ZC="\uC5C6\uC74C";function XC(e){return KC.includes(e)}function JC(e){const t={};for(const[a,r]of Object.entries(e)){const l=XC(a)?a:YC[a];l&&(t[l]=r===ZC?jl:r)}return t}const QC={\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"}},Tl=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],Ml=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],ef=["","\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 ja(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 tf(e){const t=ja(e[0]||"");return t?Tl[t.cho]:""}function nf(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],a=i=>Tl.includes(i),r=i=>Ml.includes(i),l=t.map(i=>a(i)?"cho":r(i)?"jung":ja(i)?"syl":"other"),s=t.map(i=>ja(i));if(l.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 m=0;m<t.length;m++){const p=u[c+m],C=l[m];if(C==="cho"){if(tf(p)!==t[m]){d=!1;break}}else if(C==="jung"){const b=ja(p);if(!b||Ml[b.jung]!==t[m]){d=!1;break}}else{const b=s[m];if(b&&b.jong===0){const x=ja(p);if(!x||x.cho!==b.cho||x.jung!==b.jung){d=!1;break}}else if(p!==t[m]){d=!1;break}}}if(d)return!0}return!1}}const af={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(af).map(([e,t])=>[t.join(""),ef[Number(e)]]));const rf="word_pair_index_v2",of="word_pair_index_sig_v2";let nr=null;function sf(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(l=>typeof l=="string"))return!1}return!0}function lf(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(rf),t=localStorage.getItem(of);if(!e||!t)return null;const a=JSON.parse(e);return sf(a)?{index:a,sig:t}:null}catch{return null}}function uf(){if(nr)return nr;const e=lf();return e?(nr=e.index,e.sig,nr):null}function cf(e,t,a){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+a)/(t+a)))}function df(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=/[ㄱ-ㅎ]/,pf=/[ㅏ-ㅣ]/;function Ll(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)||pf.test(a))return a}return null}function mf(e){const t=Ll(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 hf(e){return`${e}${mf(e)}`}function Cf(e){const t=Ll(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 ff(e){return`${e}${Cf(e)}`}function gf(e,t,a){const r=e.slice(),[l]=r.splice(t,1);return r.splice(a,0,l),r}function Ta(e,t=Math.random){const a=e.slice();for(let r=a.length-1;r>0;r--){const l=Math.floor(t()*(r+1));[a[r],a[l]]=[a[l],a[r]]}return a}const bf=()=>{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 $l(e,t){if(t===void 0&&(t=bf()),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 yf="__ihab_core_word_pool__";function Rl(){return globalThis[yf]??null}const Pl=globalThis;function Il(e,t){const a=r=>{};try{const r=t();r&&typeof r.catch=="function"&&r.catch(a)}catch(r){a(r)}}function vf(e){Il("time",()=>Pl.__ihabTrainingTimeLogger?.(e))}function xf(e){Il("completion",()=>Pl.__ihabTrainingCompletionLogger?.(e))}const _f="Asia/Seoul",wf=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function Ma(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 s=new Date(`${r}T00:00:00Z`);if(Number.isNaN(s.getTime())||s.toISOString().slice(0,10)!==r)return null}const l=wf.exec(a);t=new Date(l?`${l[1]}T${l[2]}:${l[3]??"00"}${l[4]?`.${l[4].slice(0,3).padEnd(3,"0")}`:""}+09:00`:a)}else t=new Date(e);return Number.isNaN(t.getTime())?null:t}function Bf(e){return Ma(e)!==null}const kf=e=>Ma(e);function Fl(e,t){const a=t.startsWith("ko")?"ko-KR":"en-US",r=kf(e);return r?r.toLocaleDateString(a,{timeZone:_f,year:"numeric",month:"short",day:"numeric"}):""}function Ol(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function Af(e,t,a){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Ol(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:""})||Af(a,r,t)}function La(){return io(new Date)}function lo(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&Ma(e)?.toISOString().slice(0,10)===e?e:La()}function la(){return Ef(La())}const Nf=540*60*1e3;function zl(e,t,a){return new Date(Date.UTC(e,t,a)-Nf)}function Ef(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=Ma(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function Wl(e,t){if(!e)return"";const a=Ma(e);if(!a)return"";const r=a.getTime(),l=Math.max(0,Math.floor((Date.now()-r)/1e3)),s=Math.floor(l/60),i=Math.floor(s/60),u=Math.floor(i/24),c=Math.floor(u/7),d=Math.floor(u/30),m=Math.floor(u/365);return s<1?t("store.time.justNow","\uBC29\uAE08 \uC804"):s<60?t("store.time.minutesAgo",{n:s}):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:m})}function Hl(e,t={}){const{sep:a=".",pad:r=!0,trailingDot:l=!1,fallback:s="\u2014"}=t;if(!e)return s;const i=io(e instanceof Date?e:String(e));if(!i)return s;const[u,c,d]=i.split("-"),m=r?c:String(Number(c)),p=r?d:String(Number(d));return`${u}${a}${m}${a}${p}${l?".":""}`}function ar(e){if(typeof e=="string"){const t=e.trim();return t&&Bf(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 sn(e){return typeof e=="string"?e.trim()||null:typeof e=="number"?String(e):null}function Df(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 Sf(e){return Array.isArray(e)?e.map((t,a)=>{const r=t??{};return{index:a,itemId:sn(r.contextCode)??sn(r.itemId)??sn(r.itemCode)??sn(r.id),question:sn(r.question)??sn(r.q)??sn(r.sentence)??sn(r.text)??sn(r.prompt)??sn(r.word)??sn(r.targetSyllable),answer:sn(r.answer),selected:sn(r.selectedText)??sn(r.selected),correct:Df(r),shownAt:ar(r.shownAt)??ar(r.shown_at),answeredAt:ar(r.answeredAt)??ar(r.answered_at)}}):[]}const uo=globalThis;async function jf(){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 rr(e){try{uo.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function Tf(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 ia(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Vl(e,t){if(!e)return"-";const a=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!a)return e;const r=Number(a[1]),l=Number(a[2]),s=a[1].padStart(2,"0");return l===0?t("date.timeH",{h:r,hh:s,mm:a[2]}):t("date.timeHM",{h:r,hh:s,m:l,mm:a[2]})}function po(e){return(e??0).toLocaleString("ko-KR")}const Mf=[{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"}]}],Lf=[{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 ql(){return Mf}function $f(){return Lf}const Rf=[],Pf=[],If=[],Ff=[];function Of(){return{LISTEN_IN_NOISE:Rf,SHORT_STORY:Pf,LONG_STORY:If,ORDERING_SENTENCE:Ff}}const zf=[{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."}],Ul={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function Wf(e){return zf.map(t=>{const a=Ul[t.key];return a?{...t,label:e(`trainingType.${a}.title`),desc:e(`trainingType.${a}.desc`)}:t})}var Hf={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",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."},Vf={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"},qf={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"}},Uf={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},Gf={selected:"\uC120\uD0DD\uB428"},Kf={placeholder:"\uC120\uD0DD"},Yf={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},Zf={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"},Xf={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"},Jf={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"}}}},Qf={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},eg={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."}}},tg={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"}},ng={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"}},ag={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"}}}},rg={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},og={showN:"{{n}}\uAC1C\uC529"},sg={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."}},lg={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},ig={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},ug={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",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",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"}},cg={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"},dg={clearAllSelection:"\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C",divLine:"\uB300\uB9BD\uC120",removePair:"\uB300\uB9BD\uC30D \uBE7C\uAE30",removeWord:"\uB2E8\uC5B4 \uBE7C\uAE30"},pg={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"}},mg={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"}},hg={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"}},Cg={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."]},fg={lead:`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
|
|
818
|
+
`||a==="\r"?t+=2:t+=r<128?1:2}return t}function GC(e){return Dl(e)>90?"LMS":"SMS"}function Sl(e,t=85){const a=Dl(e),r=GC(e),l=r==="SMS"?90:2e3,s=typeof t=="number"?t:null;return{bytes:a,type:r,limit:l,over:a>l,target:s,overTarget:s!==null&&a>s}}const KC=["onset","vowel","coda","glide"],jl="none",YC={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},ZC="\uC5C6\uC74C";function XC(e){return KC.includes(e)}function JC(e){const t={};for(const[a,r]of Object.entries(e)){const l=XC(a)?a:YC[a];l&&(t[l]=r===ZC?jl:r)}return t}const QC={\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"}},Tl=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],Ml=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],ef=["","\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 ja(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 tf(e){const t=ja(e[0]||"");return t?Tl[t.cho]:""}function nf(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],a=i=>Tl.includes(i),r=i=>Ml.includes(i),l=t.map(i=>a(i)?"cho":r(i)?"jung":ja(i)?"syl":"other"),s=t.map(i=>ja(i));if(l.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 m=0;m<t.length;m++){const p=u[c+m],C=l[m];if(C==="cho"){if(tf(p)!==t[m]){d=!1;break}}else if(C==="jung"){const b=ja(p);if(!b||Ml[b.jung]!==t[m]){d=!1;break}}else{const b=s[m];if(b&&b.jong===0){const x=ja(p);if(!x||x.cho!==b.cho||x.jung!==b.jung){d=!1;break}}else if(p!==t[m]){d=!1;break}}}if(d)return!0}return!1}}const af={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(af).map(([e,t])=>[t.join(""),ef[Number(e)]]));const rf="word_pair_index_v2",of="word_pair_index_sig_v2";let nr=null;function sf(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(l=>typeof l=="string"))return!1}return!0}function lf(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(rf),t=localStorage.getItem(of);if(!e||!t)return null;const a=JSON.parse(e);return sf(a)?{index:a,sig:t}:null}catch{return null}}function uf(){if(nr)return nr;const e=lf();return e?(nr=e.index,e.sig,nr):null}function cf(e,t,a){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+a)/(t+a)))}function df(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=/[ㄱ-ㅎ]/,pf=/[ㅏ-ㅣ]/;function Ll(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)||pf.test(a))return a}return null}function mf(e){const t=Ll(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 hf(e){return`${e}${mf(e)}`}function Cf(e){const t=Ll(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 ff(e){return`${e}${Cf(e)}`}function gf(e,t,a){const r=e.slice(),[l]=r.splice(t,1);return r.splice(a,0,l),r}function Ta(e,t=Math.random){const a=e.slice();for(let r=a.length-1;r>0;r--){const l=Math.floor(t()*(r+1));[a[r],a[l]]=[a[l],a[r]]}return a}const bf=()=>{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 $l(e,t){if(t===void 0&&(t=bf()),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 yf="__ihab_core_word_pool__";function Rl(){return globalThis[yf]??null}const Pl=globalThis;function Il(e,t){const a=r=>{};try{const r=t();r&&typeof r.catch=="function"&&r.catch(a)}catch(r){a(r)}}function vf(e){Il("time",()=>Pl.__ihabTrainingTimeLogger?.(e))}function xf(e){Il("completion",()=>Pl.__ihabTrainingCompletionLogger?.(e))}const _f="Asia/Seoul",wf=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function Ma(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 s=new Date(`${r}T00:00:00Z`);if(Number.isNaN(s.getTime())||s.toISOString().slice(0,10)!==r)return null}const l=wf.exec(a);t=new Date(l?`${l[1]}T${l[2]}:${l[3]??"00"}${l[4]?`.${l[4].slice(0,3).padEnd(3,"0")}`:""}+09:00`:a)}else t=new Date(e);return Number.isNaN(t.getTime())?null:t}function Bf(e){return Ma(e)!==null}const kf=e=>Ma(e);function Fl(e,t){const a=t.startsWith("ko")?"ko-KR":"en-US",r=kf(e);return r?r.toLocaleDateString(a,{timeZone:_f,year:"numeric",month:"short",day:"numeric"}):""}function Ol(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function Af(e,t,a){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Ol(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:""})||Af(a,r,t)}function La(){return io(new Date)}function lo(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&Ma(e)?.toISOString().slice(0,10)===e?e:La()}function la(){return Ef(La())}const Nf=540*60*1e3;function zl(e,t,a){return new Date(Date.UTC(e,t,a)-Nf)}function Ef(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=Ma(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function Wl(e,t){if(!e)return"";const a=Ma(e);if(!a)return"";const r=a.getTime(),l=Math.max(0,Math.floor((Date.now()-r)/1e3)),s=Math.floor(l/60),i=Math.floor(s/60),u=Math.floor(i/24),c=Math.floor(u/7),d=Math.floor(u/30),m=Math.floor(u/365);return s<1?t("store.time.justNow","\uBC29\uAE08 \uC804"):s<60?t("store.time.minutesAgo",{n:s}):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:m})}function Hl(e,t={}){const{sep:a=".",pad:r=!0,trailingDot:l=!1,fallback:s="\u2014"}=t;if(!e)return s;const i=io(e instanceof Date?e:String(e));if(!i)return s;const[u,c,d]=i.split("-"),m=r?c:String(Number(c)),p=r?d:String(Number(d));return`${u}${a}${m}${a}${p}${l?".":""}`}function ar(e){if(typeof e=="string"){const t=e.trim();return t&&Bf(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 sn(e){return typeof e=="string"?e.trim()||null:typeof e=="number"?String(e):null}function Df(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 Sf(e){return Array.isArray(e)?e.map((t,a)=>{const r=t??{};return{index:a,itemId:sn(r.contextCode)??sn(r.itemId)??sn(r.itemCode)??sn(r.id),question:sn(r.question)??sn(r.q)??sn(r.sentence)??sn(r.text)??sn(r.prompt)??sn(r.word)??sn(r.targetSyllable),answer:sn(r.answer),selected:sn(r.selectedText)??sn(r.selected),correct:Df(r),shownAt:ar(r.shownAt)??ar(r.shown_at),answeredAt:ar(r.answeredAt)??ar(r.answered_at)}}):[]}const uo=globalThis;async function jf(){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 rr(e){try{uo.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function Tf(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 ia(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Vl(e,t){if(!e)return"-";const a=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!a)return e;const r=Number(a[1]),l=Number(a[2]),s=a[1].padStart(2,"0");return l===0?t("date.timeH",{h:r,hh:s,mm:a[2]}):t("date.timeHM",{h:r,hh:s,m:l,mm:a[2]})}function po(e){return(e??0).toLocaleString("ko-KR")}const Mf=[{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"}]}],Lf=[{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 ql(){return Mf}function $f(){return Lf}const Rf=[],Pf=[],If=[],Ff=[];function Of(){return{LISTEN_IN_NOISE:Rf,SHORT_STORY:Pf,LONG_STORY:If,ORDERING_SENTENCE:Ff}}const zf=[{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."}],Ul={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function Wf(e){return zf.map(t=>{const a=Ul[t.key];return a?{...t,label:e(`trainingType.${a}.title`),desc:e(`trainingType.${a}.desc`)}:t})}var Hf={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",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."},Vf={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"},qf={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"}},Uf={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},Gf={selected:"\uC120\uD0DD\uB428"},Kf={placeholder:"\uC120\uD0DD"},Yf={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},Zf={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"},Xf={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"},Jf={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"}}}},Qf={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},eg={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."}}},tg={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"}},ng={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"}},ag={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"}}}},rg={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},og={showN:"{{n}}\uAC1C\uC529"},sg={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."}},lg={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},ig={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},ug={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",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",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}}"},cg={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"},dg={clearAllSelection:"\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C",divLine:"\uB300\uB9BD\uC120",removePair:"\uB300\uB9BD\uC30D \uBE7C\uAE30",removeWord:"\uB2E8\uC5B4 \uBE7C\uAE30"},pg={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"}},mg={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"}},hg={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"}},Cg={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."]},fg={lead:`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
|
|
819
819
|
\uC2E0\uB8B0\uB97C \uC313\uACE0
|
|
820
|
-
\uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`,site:{title:"\uC0AC\uC774\uD2B8",malgwi:"\uB9D0\uADC0",soundDirection:"\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",vrSoundDirection:"VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",hearingTest:"\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C"},sns:{title:"SNS",naverBlog:"\uB124\uC774\uBC84 \uBE14\uB85C\uADF8"},policy:{title:"\uC815\uCC45",terms:"\uC774\uC6A9\uC57D\uAD00",privacy:"\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68"},ceo:"\uB300\uD45C",address:"\uC8FC\uC18C",bizNo:"\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638",support:"\uACE0\uAC1D\uC13C\uD130",ceoName:"\uD55C\uC9C0\uD61C",addressValue:"\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638",bizNoValue:"526-81-02926"},gg={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},bg={phaseWordDownload:"\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC",phaseImageCheck:"\uC774\uBBF8\uC9C0 \uD655\uC778",phasePairAnalysis:"\uB2E8\uC5B4\uC30D \uBD84\uC11D",downloadingCount:"{{n}}\uAC1C \uB2E4\uC6B4\uB85C\uB4DC \uC911",checkingPage:"{{page}}\uD398\uC774\uC9C0 \uBAA9\uB85D \uD655\uC778 \uC911",imageCount:"{{done}} / {{total}}\uAC1C"},yg={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"},vg={ariaLabel:"\uC120\uD0DD \uD0ED"},xg={ariaLabel:"\uD0ED"},_g={dragPrompt:"\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC",browseButton:"\uD30C\uC77C \uC120\uD0DD",removeAriaLabel:"{{name}} \uC81C\uAC70"},wg={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},Bg={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"}},kg={weekly:{title:"\uC8FC\uAC04 \uD6C8\uB828 \uD604\uD669",daily:"\uC624\uB298\uC758 \uB4E3\uAE30"},homework:{title:"\uC219\uC81C \uC9C4\uD589\uD604\uD669",totalRate:"\uC804\uCCB4 \uC644\uB8CC\uC728",done:"\uC644\uB8CC"},today:{tooltipTotal:"\uC804\uCCB4",tooltipDone:"\uC644\uB8CC"},visit:{title:"\uBC29\uBB38 \uC5F0\uB3D9 \uAE30\uB85D"},detail:"\uC0C1\uC138\uBCF4\uAE30",detailFor:"{{name}} \uC0C1\uC138\uBCF4\uAE30"},Ag={time:{justNow:"\uBC29\uAE08 \uC804",minutesAgo:"{{n}}\uBD84 \uC804",hoursAgo:"{{n}}\uC2DC\uAC04 \uC804",daysAgo:"{{n}}\uC77C \uC804",weeksAgo:"{{n}}\uC8FC \uC804",monthsAgo:"{{n}}\uAC1C\uC6D4 \uC804",yearsAgo:"{{n}}\uB144 \uC804"}},Ng={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},Eg={skippedOnly:"\uC61B \uAE30\uB85D {{n}}\uAC74\uC740 \uBB34\uC5C7\uC744 \uD47C \uAC83\uC778\uC9C0 \uC548 \uB0A8\uC544 \uC788\uC5B4 \uC148\uC5D0\uC11C \uBE90\uC2B5\uB2C8\uB2E4.",runs:"{{count}}\uD310"},Dg={resetColumns:"\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654",scrollRegion:"\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C",rowActionHint:"\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4"},Sg={viewWords:"\uB0B1\uB9D0"},jg={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},Tg={chooseDate:"\uB0A0\uC9DC \uC120\uD0DD",selectYear:"\uC5F0 \uC120\uD0DD",selectMonth:"\uC6D4 \uC120\uD0DD"},Mg={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},Lg={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},$g={place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},Rg={clearSelection:"\uC120\uD0DD \uD574\uC81C"},Pg={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},Ig={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},Fg={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},Og={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},zg={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},Wg={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},Hg={main:"\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8",soft:"\uC18C\uD504\uD2B8",sub:"\uC11C\uBE0C \uCEEC\uB7EC",deep:"\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8",softSub:"\uC18C\uD504\uD2B8 \uC11C\uBE0C",warm:"\uC6DC(\uAC15\uC870)",dark:"\uB2E4\uD06C",radial:"\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8",diagonal:"\uB300\uAC01\uC120 \uD328\uD134",dots:"\uB3C4\uD2B8 \uD328\uD134",outline:"\uC544\uC6C3\uB77C\uC778",success:"\uC131\uACF5/\uC644\uB8CC",naver:"\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4",instagram:"\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4"},Vg={common:Hf,calendar:Vf,passCard:qf,rating:Uf,colorPicker:Gf,dropdown:Kf,accordion:Yf,header:Zf,nav:Xf,settings:Jf,usage:Qf,account:eg,training:tg,customers:ng,payment:ag,coupons:rg,visits:og,trainingType:sg,myWordTable:lg,keyWords:ig,wordTable:ug,wordSearch:cg,wordPrint:dg,topic:pg,device:mg,manager:hg,wordPairs:Cg,footer:fg,date:gg,wordData:bg,textField:yg,segmentedControl:vg,tabs:xg,fileUpload:_g,avatar:wg,myHomework:Bg,trainingStatus:kg,store:Ag,progress:Ng,trainingMiss:Eg,table:Dg,wordScore:Sg,topBanner:jg,datePicker:Tg,report:Mg,tooltip:Lg,phonemeProfile:$g,bulkBar:Rg,debug:Pg,badge:Ig,loader:Fg,soundCompass:Og,breadcrumb:zg,board:Wg,promoBannerBg:Hg},qg={statusFilter:"Filter by status",pageSizeSelect:"Items per page",selectedCount_one:"{{count}} selected",selectedCount_other:"{{count}} selected",moreFor:"More options for {{name}}",collapseFor:"Collapse {{name}}",expandFor:"Expand {{name}}",sortFor:"Sort {{name}}",cancel:"Cancel",info:"Info",errorState:{message:"Couldn't load this.",retry:"Try again"},save:"Save",confirm:"Confirm",discardConfirm:{title:"Discard your changes?",body:"If you do not save, everything you have entered will be lost.",confirm:"Discard"},close:"Close",back:"Back",emptyTrainingName:"Training name is empty.",remove:"Remove",image:"Image",delete:"Delete",reset:"Reset",update:"Update",download:"Download",likeCount_one:"{{count}} like",likeCount_other:"{{count}} likes",selectedOfMax:"{{count}} of {{max}}",downloadCount_one:"{{count}} download",downloadCount_other:"{{count}} downloads",descriptionFor:"About {{name}}",search:"Search",empty:"No data.",yes:"Yes",no:"No",all:"All",none:"None",days_one:"{{count}} day",days_other:"{{count}} days",loadMore:"Load More",retry:"Try Again",prevPage:"Previous page",nextPage:"Next page",play:"Play",playFor:"Play {{name}}",pauseFor:"Pause {{name}}",pause:"Pause",playPause:"Play / Pause",replay:"Replay",subscription:"Subscription",done:"Done",failed:"Failed",continue:"Continue",notification:"Notice",emptyList:"No items",noMatches:"No matching items",menu:"Menu",resetSelection:"Reset Selection",pageSizeLabel:"Show {{n}}",totalCountPrefix:"Total: ",totalCountSuffix:"",expand:"Expand",collapse:"Collapse",popup:"Popup",more:"More",codeBlock:"Code block",totalPrefix:"",copyCode:"Copy code",copied:"Copied",col:{problem:"Question"},phonetics:{place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"},vowel:{frontHigh:"Front high vowel",backHighUnrounded:"Back high unrounded vowel",backHighRounded:"Back high rounded vowel",frontMid:"Front mid vowel",backMidUnrounded:"Back mid unrounded vowel",backMidRounded:"Back mid rounded vowel",low:"Low vowel"},glide:{j:"j-glide",w:"w-glide",velar:"\u0270-glide"}},unknownError:"Unknown error",networkError:"The network connection is unstable. Check your connection and try again."},Ug={rangeSelect:"Select period",dow:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekLabel:"Week {{ord}}",prevMonth:"Previous month",addOnDate:"Add a visit on {{date}}",nextMonth:"Next month",prevWeek:"Previous week",nextWeek:"Next week",legend:{visited:"Visited",scheduled:"Scheduled",noVisit:"No Show"},periodSelect:"Period unit",visitCount_one:"{{count}} visit",visitCount_other:"{{count}} visits",statusCount:"{{count}} {{label}}",weekOrdinal:["1","2","3","4","5","6","7"]},Gg={planSuffix:"Plan",labeledPlan:"{{label}} Plan",couponCode:"Pass Code",specialLabel:"Open Special",unitDay:"d",unitYear:"yr",remainingDay:"{{n}}d left",remainingHour:"{{n}}h left",remainingMinute:"{{n}}m left",remainingSecond:"{{n}}s left",expired:"Expired",menu:{use:"Activate",refund:"Refund",delete:"Delete"}},Kg={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},Yg={selected:"selected"},Zg={placeholder:"Select"},Xg={collapse:"Collapse",expand:"Expand"},Jg={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},Qg={mainMenu:"Main menu",bottomNav:"Bottom navigation",goToManager:"Go to Malgwi Manager",goToMalgwi:"Go to Malgwi",modeLabelManager:"Malgwi Manager",modeLabelMalgwi:"Malgwi",training:"Training",settings:"Settings",notifications:"Notifications",account:"Account",help:"Help",feedback:"Report a bug",debug:"Debug",coupons:"Coupons",topic:"By Topic",trainingType:"By Training Type",wordPairs:"Word Pairs",wordSearch:"Word Search",wordTable:"Word Table Creator",company:"Company Info",more:"More",moreMenu:"More menu",badgeLabel:"{{label}}, {{count}}",badgeInsideLabel_one:"{{label}}, {{count}} notification inside",badgeInsideLabel_other:"{{label}}, {{count}} notifications inside"},eb={cache:{cleared:"Cache cleared successfully.",group:{wordData:{label:"Word Data",sub:"Word list and version info"},pairIndex:{label:"Pair Index",sub:"Onset\xB7vowel\xB7coda minimal pair analysis cache"},imageCache:{label:"Image Cache",sub:"Word image existence check results"}}}},tb={couponButton:"Enter Coupon"},nb={security:{password:{currentRequired:"Enter your current password.",newRequired:"Enter a new password.",mismatch:"The new passwords do not match.",changed:"Your password has been changed."}}},ab={settings:"Settings",filter:{random:"Random",trainOnset:"Onset",trainVowel:"Vowel",trainCoda:"Coda",phonemeGroup:"Training phonemes",noLimit:"Any",codaExclude:"Exclude",gradeLabel:"Grade",excludeImageInfo:"Only words with images: keeps only results with a registered word image.",sameStructureInfo:"Only same phoneme structure: keeps only pairs where the correct and wrong answers share the same syllable structure (length, batchim, etc.).",selectSection:"Select",excludeImage:"Only words with images",sameStructure:"Only same phoneme structure"},noQuestions:"No questions available.",countQuestions_one:"{{n}} question",countQuestions_other:"{{n}} questions",countSentences_one:"{{n}} sentence",countSentences_other:"{{n}} sentences",nextQuestion:"Next",noiseRatioTitle:"Noise Ratio",noiseRatioValue:"{{ratio}}\xD7",noiseTypeTitle:"Noise Type",playVolumeTitle:"Volume",playSpeedTitle:"Speed",meter:{sentence:"Playback",noise:"Noise",toggle:"Show Audio Meter"},viewResult:"View Results",problemNotice:"Problem {{n}}.",trainingSettingsTitle:"Training Settings",sentencePreview:"Sentence Preview",notHeard:"Didn't hear it.",heardWell:"Heard it well.",confirmTitle:"Check the sentence and select whether you heard it.",noSoundWaveform:"Waveform is not shown for sound-comparison questions.",noise:{level:{none:"None",weak:"Weak",medium:"Medium",strong:"Strong",veryStrong:"Very Strong"},type:{none:"None",default:"Default",street:"Street",buzz:"Buzzing",restaurant:"Restaurant"}},listenTitle:"Please listen to the sentence.",listenButton:"Listen",playSound:"Play Sound",playAll:"Play All",selectInOrder:"Select the cards in the order you heard.",stop:"Stop",preview:"Preview",previewFor:"Preview {{name}}",stopFor:"Stop {{name}}",next:"Next",completed:"Completed",selected:"Selected",nthSelected:"Selection {{n}}",fontSizeMin:"Font size is at the minimum.",fontSizeMax:"Font size is at the maximum.",fontSizeDecrease:"Decrease font size",fontSizeIncrease:"Increase font size",toggleBackground:"Toggle background",cardInstructions:"Look at the word card, listen to the sound, and check it.",noCards:"No cards.",audioFetchError:"Failed to load the sound source.",ttsUnavailable:"Speech playback isn't available on this device.",selectConfirm:"Look at the question and select the answer.",orderListDefault:"Arrange the sentences in the order you heard.",result:{pendingDone:"Results are still being calculated, so you can't finish yet.",eyebrow:"Training Complete",title:"You've finished all the training!",scoreAria:"{{correct}} / {{total}} questions",elapsed:"Time Elapsed",tableAriaLabel:"Per-question judgement",colJudge:"Judgement",colAnswerSelected:"Answer \xB7 Selected",colAnswer:"Answer",colSelected:"Selected",heardWell:"Heard well",notHeard:"Didn't hear",notJudged:"Not judged",replay:"Replay",replaySound:"Replay item {{no}}",replaySoundStop:"Stop item {{no}}",done:"Done",noContent:"(No content)"},up:"Move up",down:"Move down",prev:"Previous",listenLabel:"Listen",sourcePlay:"Play source {{n}}",listen:"Listen",audioStatus:{synthesizing:"Preparing the sound\u2026",preparing:"Preparing sound\u2026"}},rb={totalCount:" customers",loadError:"Failed to load list",device:{title:"Hearing Devices",addButton:"Add device",historyEmpty:"No device history registered",wearing:" in use",notRegistered:"Not registered",unit:"",wearingNow:"In use",wear:"Wear",unwear:"Remove",wornSince:"Since {{date}}",historyTitle:"Hearing device history"},schedule:{registerTitle:" Register Schedule"},visitHistory:{empty:"No visit history yet",popupTitle:" Visit History",registerTitle:" Register Visit"},moreItems:"more",viewAll:"View All",duration:{minSec:"{{m}}m {{s}}s",min:"{{m}}m",sec:"{{s}}s"}},ob={plan:{recommendedFor:"Recommended for",features:"Key Features",freePrice:"Free",contact:"Contact Us",tierFallback:"Plan",openPromo:"Launch offer"},products:{mgrEnterprise:{tier:{price:"Contact us"}}}},sb={input:{label:"Coupon code",placeholder:"Enter coupon code"},applyButton:"Apply"},lb={showN:"Show {{n}}"},ib={title:"Training by Type",subtitle:"Select the training type you want",listenInNoise:{title:"Sentence Listening in Noise",desc:"Train sentence comprehension in various noise environments."},shortStory:{title:"Short Story Listening",desc:"Listen to short stories and understand the content."},longStory:{title:"Long Story Listening",desc:"Focus on listening to long stories and grasp the content."},orderingSentence:{title:"Sentence Ordering",desc:"Arrange heard sentences in the correct order."},SAME_SOUND_PICK:{label:"Listen & Pick Same Sound",sub:"Pick the word card that matches what you heard."},SAME_OR_DIFF:{label:"Same or Different?",sub:"Decide whether the two sounds are the same or different."},HEAR_AND_PICK_SAME:{label:"Hear & Match Word",sub:"Pick the word card that matches the sound you heard."},HEAR_AND_PICK_INCLUDED:{label:"Find Word Containing Sound",sub:"Pick the word card that contains the syllable you heard."},STARTS_WITH_SAME_SOUND:{label:"Find Word Starting with Same Sound",sub:"Pick a word that starts with the same sound as what you heard."},LISTEN_AND_REMEMBER_ORDER:{label:"Listen & Recall Order",sub:"Select the cards in the order you heard the three words."},MERGE_2_SYLLABLES:{label:"Combine 2 Syllables",sub:"What word do two syllables make?"},MERGE_3_SYLLABLES:{label:"Combine 3 Syllables",sub:"What word do three syllables make?"},MERGE_2_PHONEMES:{label:"Combine 2 Phonemes",sub:"What sound do two phonemes make?"},MERGE_3_PHONEMES:{label:"Combine 3 Phonemes",sub:"What sound do three phonemes make?"},DROP_1_FROM_2SYLL:{label:"Drop 1 Syllable from 2-Syllable",sub:"What sound remains when you remove a syllable from a 2-syllable word?"},DROP_1_FROM_3SYLL:{label:"Drop 1 Syllable from 3-Syllable",sub:"What sound remains when you remove a syllable from a 3-syllable word?"},DROP_PART_FROM_COMPOUND:{label:"Drop Part of Compound Word",sub:"What word remains when you remove part of a compound word?"},DROP_FINAL_CONSONANT_FROM_1SYLL:{label:"Drop Final Consonant",sub:"What sound remains when you remove the final consonant?"},REMOVE_CONSONANT_AND_IDENTIFY_PHONEME:{label:"Drop Consonant",sub:"What sound remains when you remove the consonant?"},CHANGE_1_SYLL_IN_2SYLL:{label:"Change 1 Syllable (2-Syllable)",sub:"Change one syllable in a 2-syllable word to make a new word."},CHANGE_1_SYLL_IN_3SYLL:{label:"Change 1 Syllable (3-Syllable)",sub:"Change one syllable in a 3-syllable word to make a new word."},CHANGE_1_PHONEME_IN_1SYLL:{label:"Change 1 Phoneme (1-Syllable)",sub:"Change one phoneme in a 1-syllable word to make a new sound."},CHANGE_1_PHONEME_IN_2SYLL:{label:"Change 1 Phoneme (2-Syllable)",sub:"Change one phoneme in a 2-syllable word to make a new word."}},ub={newBadge:"Newly created",publishedBadge:"Published",sharedBadge:"Shared"},cb={title:"Key Words",empty:"No key words available."},db={defaultName:"Word Table",title:"Word Table Builder",subtitle:"Set columns and add words to build a table.",filterTitle:"Table Settings",filter:{composition:"Composition",image:"Image",word:"Word",standardPron:"Standard Pronunciation",colloquialPron:"Colloquial Pronunciation",paperOrientation:"Paper Orientation",landscape:"Landscape",portrait:"Portrait",columns:"Columns",column:"{{count}} col",itemsPerPageWord:"Words per page",itemsPerPagePair:"Pairs per page",itemsPerPageOption:"{{count}}",pageIndicator:"{{current}} / {{total}}",pageNumber:"Page Number",pageNumberLeft:"Left",pageNumberCenter:"Center",pageNumberRight:"Right",border:"Border",topInfo:"Header",bottomInfo:"Footer",cutLine:"Cut Line",show:"Show",hide:"Hide",dotted:"Dotted",corner:"Corner"},addWord:"Add",wordInfo:"Info for {{word}}",emptyItems:"Please add at least one word.",load:"Load",openNewWindow:"Open in New Window",saveButton:"Save",saveAsNewButton:"Save as New",print:"Print",popupBlocked:"Popup was blocked. Please allow popups in your browser settings.",printFileNameSingle:"Word Table",printFileNamePair:"Contrast Pair Table",save:{title:"Save Word Table",nameLabel:"Name",desc:"Enter a name for the word table.",placeholder:"Enter a title for this word table.",descriptionLabel:"Description",descriptionPlaceholder:"Enter a description for this word table.",duplicateName:"This name is already in use.",nameRequired:"Please enter a table name.",autoFillHint:" (Press Tab or Space to autofill)",copyName:"{{name}} (copy)"},loadTable:{title:"Load Saved Word Table",empty:"No saved word tables.",loadButton:"Load",itemCount_one:"{{count}} word",itemCount_other:"{{count}} words",deleteAriaLabel:"Delete {{name}}",viewLabel:"View as",sortLabel:"Sort by",sort:{newest:"Newest",oldest:"Oldest",name:"Name",count:"Word Count"},view:{grid:"Grid View",list:"List View"}},publisherFilter:"Show only tables by {{name}}",groupDeleteMessage:"Word tables in this group will be moved to 'No Group'.",groupNamePlaceholder:"Group name",scoring:{o:"{{word}} correct",triangle:"{{word}} partial",x:"{{word}} incorrect",markName:{o:"Correct",triangle:"Partial",x:"Incorrect"},button:"Score",pickTitle:"Who are you scoring?",pickSubtitle:"Choose the customer who trained with \u201C{{name}}\u201D.",pickSearch:"Search by name or phone",pickEmpty:"No customers registered.",pickNoMatch:"No matching customer.",pickAgain:"Choose another",scoringFor:"Scoring {{name}}",none:"Tap \u25CB \xB7 \u25B3 \xB7 \u2715 under a cell to mark it. With a mouse they appear when you hover the cell; with a keyboard, when focus reaches it.",tally:"{{marked}} scored \xB7 \u25CB {{o}} \xB7 \u25B3 {{triangle}} \xB7 \u2715 {{x}} \xB7 {{rate}}%",save:"Save score",saved_one:"Saved {{count}} mark for {{name}}.",saved_other:"Saved {{count}} marks for {{name}}.",reviewTitle:"Create a review table?",reviewMessage_one:"Builds a new table from the {{count}} cell {{name}} got wrong or partial. Correct ones are left out.",reviewMessage_other:"Builds a new table from the {{count}} cells {{name}} got wrong or partial. Correct ones are left out.",reviewConfirm:"Create review table",reviewDescription:"Cells marked wrong or partial in \u201C{{name}}\u201D \u2014 {{count}} of them.",reviewCreated_one:"Created \u201C{{name}}\u201D \u2014 {{count}} cell.",reviewCreated_other:"Created \u201C{{name}}\u201D \u2014 {{count}} cells.",discardTitle:"Discard this scoring?",discardMessage_one:"You marked {{count}} cell but have not saved. Leaving discards it.",discardMessage_other:"You marked {{count}} cells but have not saved. Leaving discards them.",discardConfirm:"Discard and leave"},info:{grade:"Grade: {{n}}",syllables:"Syllables: {{n}}",pos:"Part of speech: {{v}}",wordType:"Type: {{v}}"},pos:{noun:"Noun",verb:"Verb",adjective:"Adjective",adverb:"Adverb",numeral:"Numeral",determiner:"Determiner",interjection:"Interjection",particle:"Particle",affix:"Affix",dependentNoun:"Dependent noun",pronoun:"Pronoun",auxVerb:"Auxiliary verb",auxAdjective:"Auxiliary adjective"},reorder:{moved:"Moved to position {{n}} of {{total}}",handle:"Reorder {{word}} (Alt + arrow keys)",hint:"Alt + \u2190 \u2192 to reorder"}},pb={filterTitle:"Word Search Settings",filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Grade",grade:"Grade {{n}}",gradeNone:"None",syllables:"Syllables",syllable:"{{n}} Syll.",syllable5plus:"5+ Syllables",partOfSpeech:"Part of Speech",pos:{noun:"Noun/Numeral",verb:"Verb/Adjective",modifier:"Adverb/Determiner"},wordType:"Word Type",field:"Semantic Category",type:{native:"Native Korean",sino:"Sino-Korean",foreign:"Loanword",mixed:"Hybrid"},exclude:"Exclude",excludeNoImage:"No Image"},searchButton:"Search",resultUnit:"words",remaining:"{{count}} remaining",resultDisc:"Select {{unit}}. Up to {{max}} items. ({{selected}}/{{max}})",resultTitlePrefix:"",resultTitleSuffix:" {{unit}} found.",emptyResult:"No results found.",groupCount:"{{count}}",sort:{aria:"Sort",match:"Best Match",ganada:"A\u2013Z \u2191",ganadaDesc:"A\u2013Z \u2193",syllable:"Syllables \u2191",syllableDesc:"Syllables \u2193",grade:"Grade \u2191",gradeDesc:"Grade \u2193",original:"Original order"},pageSize:"Show {{count}}",pageSizeAria:"Page size"},mb={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removeWord:"Remove word"},hb={title:"By Topic",subtitle:"Select a topic to start listening training",noiseTitle:"Sentence Listening in Noise",shortStoryTitle:"Short Story Listening",FOOD:"Food",HLTH:"Health",WETH:"Weather",PRSN:"People",KRCT:"Korean Culture",STRY:"Stories",LOCA:"Locations",SOAR:"Society & Arts",NTSC:"Nature & Science",SPRT:"Sports",sub:{TRKRFD:"Traditional Korean Food",MDKRFD:"Modern Korean Food",WRLDFD:"World Cuisine",MTRFRT:"Ingredients & Fruits",GEFDKL:"Food Facts",HTETHB:"Healthy Eating",DISILL:"Diseases",EXCISE:"Exercise",GEHTKL:"Health Facts",GESSKL:"Seasons",SNWRAN:"Snow & Rain",WTHFCT:"Weather Forecast",GEWTKL:"Weather Facts",JODYPS:"Joseon Dynasty",MDKRPS:"Modern Korea",THKDPS:"Three Kingdoms",WRLART:"World Artists",WRLPSN:"World Figures",KRLANG:"Korean Language",TRPLCT:"Traditional Games",HERITG:"Heritage",EVTFES:"Events & Festivals",GECTKL:"General Knowledge",FRYTAL:"Fairy Tales",AMZING:"Amazing Stories",DAYSTR:"Everyday Stories",KRLDMK:"Korean Landmarks",SELNMK:"Seoul Landmarks",WRDTRB:"World Travel",NAVIGT:"Navigation",KRSOCI:"Korea",ECONEW:"Economy & News",GENART:"Arts",GELFKL:"Life Tips",ANIMAL:"Animals",PLANTS:"Plants",ETHPLT:"Earth",TOLELC:"Tools & Electronics",GESCKL:"Science Facts",INVDSP:"Individual Sports",MARART:"Martial Arts",TEAMSP:"Team Sports",FOOTBL:"Soccer",GESPKL:"Sports Facts"}},Cb={direction:{left:"L",right:"R",label:"Side"},wornDate:"Date Worn",deviceType:"Device Type",brand:"Brand",fitType:"Fit Type",productName:"Product Name",addNew:"Add New Device",selectFromList:"Select from List",removeDevice:"Remove",type:{hearingAid:"Hearing Aid",cochlearImplant:"Cochlear Implant",other:"Other"}},fb={stat:{totalCustomers:"Total Customers",monthlyVisits:"This Month's Visits"},chart:{visitDetail:"Visit Details",trainingDetail:"Training Details",weekly:"Weekly",periodMonth:"Month",periodWeek:"Week",weeklyPrefix:"Weekly",monthlyPrefix:"Monthly",visit:"Visits",reservation:"Reservations",trainingDone:"Completed",trainingInProgress:"In Progress",weekRange:"{{start}}\u2013{{end}}",week:"W{{n}}"}},gb={phonemeSelect:{vs:"vs"},caution:"Caution",mode:{include:"Phoneme Include",pick:"Phoneme Contrast",contrast:"Specify Contrast",infoTitle:"Contrast Mode",infoInclude:"Include \u2014 finds words containing all selected phonemes, plus their minimal pair.",infoPick:"Contrast \u2014 matches only if the selected phoneme is the actual point of difference in the pair.",infoContrast:"Specify Contrast \u2014 directly choose phonemes for the base word and the contrasting word to find pairs."},count:"{{n}}",countLabel:"Number of phonemes",input:{char:"Choose Letters",pron:"Choose Sound",infoTitle:"Input mode",infoChar:"Choose Letters \u2014 finds words by the selected phonemes (spelling), then finds their standard-pronunciation contrast pairs.",infoPron:"Choose Sound \u2014 finds standard-pronunciation contrast pairs directly from the selected phonemes."},phonemeN:"Syllable {{n}}",phonemeSingleLabel:"Syllable",phonemeContrastSingleLabel:"Contrast Syllable",ordinals:["First","Second","Third","Fourth"],phonemeOrdinalLabel:"{{ordinal}} Syllable",phonemeContrastOrdinalLabel:"Contrast {{ordinal}} Syllable",composition:"Answer Word Composition",syllableCount:"Syllables",syllableN:"{{n}} syll.",syllableNPlus:"{{n}}+ syll.",onset:"Onset",vowel:"Vowel",coda:"Coda",filter:{searchOptionsTitle:"Contrast Settings",searchModeLabel:"Contrast Mode",countLabel:"Input Syllable Count",inputModeLabel:"Input mode",phonemeOrder:"Input Syllable Position",phonemeOrderInfo:["Match: the pair must differ at exactly the same position (syllable).","Any: the differing position doesn't matter."],orderAny:"Any",orderMatch:"Match",difficultyInfo:["Level 1 \u2014 everyday vocabulary acquired before school age and used for life","Level 2 \u2014 difficulty of grades 1\u20132","Level 3 \u2014 difficulty of grades 3\u20134","Level 4 \u2014 difficulty of grades 5\u20136","No level \u2014 frequent everyday words outside the national standard list, plus coinages and loanwords"],selectLabel:"Select",onlyHasImage:"Only words with images",onlySameStructure:"Only same phoneme structure"},confirmMessage:"The word table with {{count}} selected {{unit}} will be lost.",resetOptions:"Reset Options",phonemeContrast:"Contrast Syllable {{n}}",infoNotes:["The preview character is an example of the selected phoneme combination. The actual search covers all words containing the phoneme.","Initial consonant '\u3147' cannot be selected. \u3147 at the start of a word is effectively silent.","If only onset and coda are selected, the vowel is automatically displayed as '\u314F'.","Increasing the phoneme count searches for minimal pairs between each phoneme."]},bb={lead:`IHAB builds trust
|
|
820
|
+
\uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`,site:{title:"\uC0AC\uC774\uD2B8",malgwi:"\uB9D0\uADC0",soundDirection:"\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",vrSoundDirection:"VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",hearingTest:"\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C"},sns:{title:"SNS",naverBlog:"\uB124\uC774\uBC84 \uBE14\uB85C\uADF8"},policy:{title:"\uC815\uCC45",terms:"\uC774\uC6A9\uC57D\uAD00",privacy:"\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68"},ceo:"\uB300\uD45C",address:"\uC8FC\uC18C",bizNo:"\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638",support:"\uACE0\uAC1D\uC13C\uD130",ceoName:"\uD55C\uC9C0\uD61C",addressValue:"\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638",bizNoValue:"526-81-02926"},gg={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},bg={phaseWordDownload:"\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC",phaseImageCheck:"\uC774\uBBF8\uC9C0 \uD655\uC778",phasePairAnalysis:"\uB2E8\uC5B4\uC30D \uBD84\uC11D",downloadingCount:"{{n}}\uAC1C \uB2E4\uC6B4\uB85C\uB4DC \uC911",checkingPage:"{{page}}\uD398\uC774\uC9C0 \uBAA9\uB85D \uD655\uC778 \uC911",imageCount:"{{done}} / {{total}}\uAC1C"},yg={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"},vg={ariaLabel:"\uC120\uD0DD \uD0ED"},xg={ariaLabel:"\uD0ED"},_g={dragPrompt:"\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC",browseButton:"\uD30C\uC77C \uC120\uD0DD",removeAriaLabel:"{{name}} \uC81C\uAC70"},wg={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},Bg={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"}},kg={weekly:{title:"\uC8FC\uAC04 \uD6C8\uB828 \uD604\uD669",daily:"\uC624\uB298\uC758 \uB4E3\uAE30"},homework:{title:"\uC219\uC81C \uC9C4\uD589\uD604\uD669",totalRate:"\uC804\uCCB4 \uC644\uB8CC\uC728",done:"\uC644\uB8CC"},today:{tooltipTotal:"\uC804\uCCB4",tooltipDone:"\uC644\uB8CC"},visit:{title:"\uBC29\uBB38 \uC5F0\uB3D9 \uAE30\uB85D"},detail:"\uC0C1\uC138\uBCF4\uAE30",detailFor:"{{name}} \uC0C1\uC138\uBCF4\uAE30"},Ag={time:{justNow:"\uBC29\uAE08 \uC804",minutesAgo:"{{n}}\uBD84 \uC804",hoursAgo:"{{n}}\uC2DC\uAC04 \uC804",daysAgo:"{{n}}\uC77C \uC804",weeksAgo:"{{n}}\uC8FC \uC804",monthsAgo:"{{n}}\uAC1C\uC6D4 \uC804",yearsAgo:"{{n}}\uB144 \uC804"}},Ng={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},Eg={skippedOnly:"\uC61B \uAE30\uB85D {{n}}\uAC74\uC740 \uBB34\uC5C7\uC744 \uD47C \uAC83\uC778\uC9C0 \uC548 \uB0A8\uC544 \uC788\uC5B4 \uC148\uC5D0\uC11C \uBE90\uC2B5\uB2C8\uB2E4.",runs:"{{count}}\uD310"},Dg={resetColumns:"\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654",scrollRegion:"\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C",rowActionHint:"\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4"},Sg={viewWords:"\uB0B1\uB9D0"},jg={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},Tg={chooseDate:"\uB0A0\uC9DC \uC120\uD0DD",selectYear:"\uC5F0 \uC120\uD0DD",selectMonth:"\uC6D4 \uC120\uD0DD"},Mg={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},Lg={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},$g={place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},Rg={clearSelection:"\uC120\uD0DD \uD574\uC81C"},Pg={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},Ig={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},Fg={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},Og={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},zg={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},Wg={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},Hg={main:"\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8",soft:"\uC18C\uD504\uD2B8",sub:"\uC11C\uBE0C \uCEEC\uB7EC",deep:"\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8",softSub:"\uC18C\uD504\uD2B8 \uC11C\uBE0C",warm:"\uC6DC(\uAC15\uC870)",dark:"\uB2E4\uD06C",radial:"\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8",diagonal:"\uB300\uAC01\uC120 \uD328\uD134",dots:"\uB3C4\uD2B8 \uD328\uD134",outline:"\uC544\uC6C3\uB77C\uC778",success:"\uC131\uACF5/\uC644\uB8CC",naver:"\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4",instagram:"\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4"},Vg={common:Hf,calendar:Vf,passCard:qf,rating:Uf,colorPicker:Gf,dropdown:Kf,accordion:Yf,header:Zf,nav:Xf,settings:Jf,usage:Qf,account:eg,training:tg,customers:ng,payment:ag,coupons:rg,visits:og,trainingType:sg,myWordTable:lg,keyWords:ig,wordTable:ug,wordSearch:cg,wordPrint:dg,topic:pg,device:mg,manager:hg,wordPairs:Cg,footer:fg,date:gg,wordData:bg,textField:yg,segmentedControl:vg,tabs:xg,fileUpload:_g,avatar:wg,myHomework:Bg,trainingStatus:kg,store:Ag,progress:Ng,trainingMiss:Eg,table:Dg,wordScore:Sg,topBanner:jg,datePicker:Tg,report:Mg,tooltip:Lg,phonemeProfile:$g,bulkBar:Rg,debug:Pg,badge:Ig,loader:Fg,soundCompass:Og,breadcrumb:zg,board:Wg,promoBannerBg:Hg},qg={statusFilter:"Filter by status",pageSizeSelect:"Items per page",selectedCount_one:"{{count}} selected",selectedCount_other:"{{count}} selected",moreFor:"More options for {{name}}",collapseFor:"Collapse {{name}}",expandFor:"Expand {{name}}",sortFor:"Sort {{name}}",cancel:"Cancel",info:"Info",errorState:{message:"Couldn't load this.",retry:"Try again"},save:"Save",confirm:"Confirm",discardConfirm:{title:"Discard your changes?",body:"If you do not save, everything you have entered will be lost.",confirm:"Discard"},close:"Close",back:"Back",emptyTrainingName:"Training name is empty.",remove:"Remove",image:"Image",delete:"Delete",reset:"Reset",update:"Update",download:"Download",likeCount_one:"{{count}} like",likeCount_other:"{{count}} likes",selectedOfMax:"{{count}} of {{max}}",downloadCount_one:"{{count}} download",downloadCount_other:"{{count}} downloads",descriptionFor:"About {{name}}",search:"Search",empty:"No data.",yes:"Yes",no:"No",all:"All",none:"None",days_one:"{{count}} day",days_other:"{{count}} days",loadMore:"Load More",retry:"Try Again",prevPage:"Previous page",nextPage:"Next page",play:"Play",playFor:"Play {{name}}",pauseFor:"Pause {{name}}",pause:"Pause",playPause:"Play / Pause",replay:"Replay",subscription:"Subscription",done:"Done",failed:"Failed",continue:"Continue",notification:"Notice",emptyList:"No items",noMatches:"No matching items",menu:"Menu",resetSelection:"Reset Selection",pageSizeLabel:"Show {{n}}",totalCountPrefix:"Total: ",totalCountSuffix:"",expand:"Expand",collapse:"Collapse",popup:"Popup",more:"More",codeBlock:"Code block",totalPrefix:"",copyCode:"Copy code",copied:"Copied",col:{problem:"Question"},phonetics:{place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"},vowel:{frontHigh:"Front high vowel",backHighUnrounded:"Back high unrounded vowel",backHighRounded:"Back high rounded vowel",frontMid:"Front mid vowel",backMidUnrounded:"Back mid unrounded vowel",backMidRounded:"Back mid rounded vowel",low:"Low vowel"},glide:{j:"j-glide",w:"w-glide",velar:"\u0270-glide"}},unknownError:"Unknown error",networkError:"The network connection is unstable. Check your connection and try again."},Ug={rangeSelect:"Select period",dow:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekLabel:"Week {{ord}}",prevMonth:"Previous month",addOnDate:"Add a visit on {{date}}",nextMonth:"Next month",prevWeek:"Previous week",nextWeek:"Next week",legend:{visited:"Visited",scheduled:"Scheduled",noVisit:"No Show"},periodSelect:"Period unit",visitCount_one:"{{count}} visit",visitCount_other:"{{count}} visits",statusCount:"{{count}} {{label}}",weekOrdinal:["1","2","3","4","5","6","7"]},Gg={planSuffix:"Plan",labeledPlan:"{{label}} Plan",couponCode:"Pass Code",specialLabel:"Open Special",unitDay:"d",unitYear:"yr",remainingDay:"{{n}}d left",remainingHour:"{{n}}h left",remainingMinute:"{{n}}m left",remainingSecond:"{{n}}s left",expired:"Expired",menu:{use:"Activate",refund:"Refund",delete:"Delete"}},Kg={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},Yg={selected:"selected"},Zg={placeholder:"Select"},Xg={collapse:"Collapse",expand:"Expand"},Jg={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},Qg={mainMenu:"Main menu",bottomNav:"Bottom navigation",goToManager:"Go to Malgwi Manager",goToMalgwi:"Go to Malgwi",modeLabelManager:"Malgwi Manager",modeLabelMalgwi:"Malgwi",training:"Training",settings:"Settings",notifications:"Notifications",account:"Account",help:"Help",feedback:"Report a bug",debug:"Debug",coupons:"Coupons",topic:"By Topic",trainingType:"By Training Type",wordPairs:"Word Pairs",wordSearch:"Word Search",wordTable:"Word Table Creator",company:"Company Info",more:"More",moreMenu:"More menu",badgeLabel:"{{label}}, {{count}}",badgeInsideLabel_one:"{{label}}, {{count}} notification inside",badgeInsideLabel_other:"{{label}}, {{count}} notifications inside"},eb={cache:{cleared:"Cache cleared successfully.",group:{wordData:{label:"Word Data",sub:"Word list and version info"},pairIndex:{label:"Pair Index",sub:"Onset\xB7vowel\xB7coda minimal pair analysis cache"},imageCache:{label:"Image Cache",sub:"Word image existence check results"}}}},tb={couponButton:"Enter Coupon"},nb={security:{password:{currentRequired:"Enter your current password.",newRequired:"Enter a new password.",mismatch:"The new passwords do not match.",changed:"Your password has been changed."}}},ab={settings:"Settings",filter:{random:"Random",trainOnset:"Onset",trainVowel:"Vowel",trainCoda:"Coda",phonemeGroup:"Training phonemes",noLimit:"Any",codaExclude:"Exclude",gradeLabel:"Grade",excludeImageInfo:"Only words with images: keeps only results with a registered word image.",sameStructureInfo:"Only same phoneme structure: keeps only pairs where the correct and wrong answers share the same syllable structure (length, batchim, etc.).",selectSection:"Select",excludeImage:"Only words with images",sameStructure:"Only same phoneme structure"},noQuestions:"No questions available.",countQuestions_one:"{{n}} question",countQuestions_other:"{{n}} questions",countSentences_one:"{{n}} sentence",countSentences_other:"{{n}} sentences",nextQuestion:"Next",noiseRatioTitle:"Noise Ratio",noiseRatioValue:"{{ratio}}\xD7",noiseTypeTitle:"Noise Type",playVolumeTitle:"Volume",playSpeedTitle:"Speed",meter:{sentence:"Playback",noise:"Noise",toggle:"Show Audio Meter"},viewResult:"View Results",problemNotice:"Problem {{n}}.",trainingSettingsTitle:"Training Settings",sentencePreview:"Sentence Preview",notHeard:"Didn't hear it.",heardWell:"Heard it well.",confirmTitle:"Check the sentence and select whether you heard it.",noSoundWaveform:"Waveform is not shown for sound-comparison questions.",noise:{level:{none:"None",weak:"Weak",medium:"Medium",strong:"Strong",veryStrong:"Very Strong"},type:{none:"None",default:"Default",street:"Street",buzz:"Buzzing",restaurant:"Restaurant"}},listenTitle:"Please listen to the sentence.",listenButton:"Listen",playSound:"Play Sound",playAll:"Play All",selectInOrder:"Select the cards in the order you heard.",stop:"Stop",preview:"Preview",previewFor:"Preview {{name}}",stopFor:"Stop {{name}}",next:"Next",completed:"Completed",selected:"Selected",nthSelected:"Selection {{n}}",fontSizeMin:"Font size is at the minimum.",fontSizeMax:"Font size is at the maximum.",fontSizeDecrease:"Decrease font size",fontSizeIncrease:"Increase font size",toggleBackground:"Toggle background",cardInstructions:"Look at the word card, listen to the sound, and check it.",noCards:"No cards.",audioFetchError:"Failed to load the sound source.",ttsUnavailable:"Speech playback isn't available on this device.",selectConfirm:"Look at the question and select the answer.",orderListDefault:"Arrange the sentences in the order you heard.",result:{pendingDone:"Results are still being calculated, so you can't finish yet.",eyebrow:"Training Complete",title:"You've finished all the training!",scoreAria:"{{correct}} / {{total}} questions",elapsed:"Time Elapsed",tableAriaLabel:"Per-question judgement",colJudge:"Judgement",colAnswerSelected:"Answer \xB7 Selected",colAnswer:"Answer",colSelected:"Selected",heardWell:"Heard well",notHeard:"Didn't hear",notJudged:"Not judged",replay:"Replay",replaySound:"Replay item {{no}}",replaySoundStop:"Stop item {{no}}",done:"Done",noContent:"(No content)"},up:"Move up",down:"Move down",prev:"Previous",listenLabel:"Listen",sourcePlay:"Play source {{n}}",listen:"Listen",audioStatus:{synthesizing:"Preparing the sound\u2026",preparing:"Preparing sound\u2026"}},rb={totalCount:" customers",loadError:"Failed to load list",device:{title:"Hearing Devices",addButton:"Add device",historyEmpty:"No device history registered",wearing:" in use",notRegistered:"Not registered",unit:"",wearingNow:"In use",wear:"Wear",unwear:"Remove",wornSince:"Since {{date}}",historyTitle:"Hearing device history"},schedule:{registerTitle:" Register Schedule"},visitHistory:{empty:"No visit history yet",popupTitle:" Visit History",registerTitle:" Register Visit"},moreItems:"more",viewAll:"View All",duration:{minSec:"{{m}}m {{s}}s",min:"{{m}}m",sec:"{{s}}s"}},ob={plan:{recommendedFor:"Recommended for",features:"Key Features",freePrice:"Free",contact:"Contact Us",tierFallback:"Plan",openPromo:"Launch offer"},products:{mgrEnterprise:{tier:{price:"Contact us"}}}},sb={input:{label:"Coupon code",placeholder:"Enter coupon code"},applyButton:"Apply"},lb={showN:"Show {{n}}"},ib={title:"Training by Type",subtitle:"Select the training type you want",listenInNoise:{title:"Sentence Listening in Noise",desc:"Train sentence comprehension in various noise environments."},shortStory:{title:"Short Story Listening",desc:"Listen to short stories and understand the content."},longStory:{title:"Long Story Listening",desc:"Focus on listening to long stories and grasp the content."},orderingSentence:{title:"Sentence Ordering",desc:"Arrange heard sentences in the correct order."},SAME_SOUND_PICK:{label:"Listen & Pick Same Sound",sub:"Pick the word card that matches what you heard."},SAME_OR_DIFF:{label:"Same or Different?",sub:"Decide whether the two sounds are the same or different."},HEAR_AND_PICK_SAME:{label:"Hear & Match Word",sub:"Pick the word card that matches the sound you heard."},HEAR_AND_PICK_INCLUDED:{label:"Find Word Containing Sound",sub:"Pick the word card that contains the syllable you heard."},STARTS_WITH_SAME_SOUND:{label:"Find Word Starting with Same Sound",sub:"Pick a word that starts with the same sound as what you heard."},LISTEN_AND_REMEMBER_ORDER:{label:"Listen & Recall Order",sub:"Select the cards in the order you heard the three words."},MERGE_2_SYLLABLES:{label:"Combine 2 Syllables",sub:"What word do two syllables make?"},MERGE_3_SYLLABLES:{label:"Combine 3 Syllables",sub:"What word do three syllables make?"},MERGE_2_PHONEMES:{label:"Combine 2 Phonemes",sub:"What sound do two phonemes make?"},MERGE_3_PHONEMES:{label:"Combine 3 Phonemes",sub:"What sound do three phonemes make?"},DROP_1_FROM_2SYLL:{label:"Drop 1 Syllable from 2-Syllable",sub:"What sound remains when you remove a syllable from a 2-syllable word?"},DROP_1_FROM_3SYLL:{label:"Drop 1 Syllable from 3-Syllable",sub:"What sound remains when you remove a syllable from a 3-syllable word?"},DROP_PART_FROM_COMPOUND:{label:"Drop Part of Compound Word",sub:"What word remains when you remove part of a compound word?"},DROP_FINAL_CONSONANT_FROM_1SYLL:{label:"Drop Final Consonant",sub:"What sound remains when you remove the final consonant?"},REMOVE_CONSONANT_AND_IDENTIFY_PHONEME:{label:"Drop Consonant",sub:"What sound remains when you remove the consonant?"},CHANGE_1_SYLL_IN_2SYLL:{label:"Change 1 Syllable (2-Syllable)",sub:"Change one syllable in a 2-syllable word to make a new word."},CHANGE_1_SYLL_IN_3SYLL:{label:"Change 1 Syllable (3-Syllable)",sub:"Change one syllable in a 3-syllable word to make a new word."},CHANGE_1_PHONEME_IN_1SYLL:{label:"Change 1 Phoneme (1-Syllable)",sub:"Change one phoneme in a 1-syllable word to make a new sound."},CHANGE_1_PHONEME_IN_2SYLL:{label:"Change 1 Phoneme (2-Syllable)",sub:"Change one phoneme in a 2-syllable word to make a new word."}},ub={newBadge:"Newly created",publishedBadge:"Published",sharedBadge:"Shared"},cb={title:"Key Words",empty:"No key words available."},db={defaultName:"Word Table",title:"Word Table Builder",subtitle:"Set columns and add words to build a table.",filterTitle:"Table Settings",filter:{composition:"Composition",image:"Image",word:"Word",standardPron:"Standard Pronunciation",colloquialPron:"Colloquial Pronunciation",paperOrientation:"Paper Orientation",landscape:"Landscape",portrait:"Portrait",columns:"Columns",column:"{{count}} col",itemsPerPageWord:"Words per page",itemsPerPagePair:"Pairs per page",itemsPerPageOption:"{{count}}",pageIndicator:"{{current}} / {{total}}",pageNumber:"Page Number",pageNumberLeft:"Left",pageNumberCenter:"Center",pageNumberRight:"Right",border:"Border",topInfo:"Header",bottomInfo:"Footer",cutLine:"Cut Line",show:"Show",hide:"Hide",dotted:"Dotted",corner:"Corner"},addWord:"Add",wordInfo:"Info for {{word}}",emptyItems:"Please add at least one word.",load:"Load",openNewWindow:"Open in New Window",saveButton:"Save",saveAsNewButton:"Save as New",print:"Print",popupBlocked:"Popup was blocked. Please allow popups in your browser settings.",printFileNameSingle:"Word Table",printFileNamePair:"Contrast Pair Table",save:{title:"Save Word Table",nameLabel:"Name",desc:"Enter a name for the word table.",placeholder:"Enter a title for this word table.",descriptionLabel:"Description",descriptionPlaceholder:"Enter a description for this word table.",duplicateName:"This name is already in use.",nameRequired:"Please enter a table name.",autoFillHint:" (Press Tab or Space to autofill)",copyName:"{{name}} (copy)"},loadTable:{title:"Load Saved Word Table",empty:"No saved word tables.",loadButton:"Load",itemCount_one:"{{count}} word",itemCount_other:"{{count}} words",deleteAriaLabel:"Delete {{name}}",viewLabel:"View as",sortLabel:"Sort by",sort:{newest:"Newest",oldest:"Oldest",name:"Name",count:"Word Count"},view:{grid:"Grid View",list:"List View"}},publisherFilter:"Show only tables by {{name}}",groupDeleteMessage:"Word tables in this group will be moved to 'No Group'.",groupNamePlaceholder:"Group name",scoring:{o:"{{word}} correct",triangle:"{{word}} partial",x:"{{word}} incorrect",markName:{o:"Correct",triangle:"Partial",x:"Incorrect"},button:"Score",pickTitle:"Who are you scoring?",pickSubtitle:"Choose the customer who trained with \u201C{{name}}\u201D.",pickSearch:"Search by name or phone",pickEmpty:"No customers registered.",pickNoMatch:"No matching customer.",pickAgain:"Choose another",scoringFor:"Scoring {{name}}",none:"Tap \u25CB \xB7 \u25B3 \xB7 \u2715 under a cell to mark it. With a mouse they appear when you hover the cell; with a keyboard, when focus reaches it.",tally:"{{marked}} scored \xB7 \u25CB {{o}} \xB7 \u25B3 {{triangle}} \xB7 \u2715 {{x}} \xB7 {{rate}}%",save:"Save score",saved_one:"Saved {{count}} mark for {{name}}.",saved_other:"Saved {{count}} marks for {{name}}.",reviewTitle:"Create a review table?",reviewMessage_one:"Builds a new table from the {{count}} cell {{name}} got wrong or partial. Correct ones are left out.",reviewMessage_other:"Builds a new table from the {{count}} cells {{name}} got wrong or partial. Correct ones are left out.",reviewConfirm:"Create review table",reviewDescription:"Cells marked wrong or partial in \u201C{{name}}\u201D \u2014 {{count}} of them.",reviewCreated_one:"Created \u201C{{name}}\u201D \u2014 {{count}} cell.",reviewCreated_other:"Created \u201C{{name}}\u201D \u2014 {{count}} cells.",discardTitle:"Discard this scoring?",discardMessage_one:"You marked {{count}} cell but have not saved. Leaving discards it.",discardMessage_other:"You marked {{count}} cells but have not saved. Leaving discards them.",discardConfirm:"Discard and leave"},info:{grade:"Grade: {{n}}",syllables:"Syllables: {{n}}",pos:"Part of speech: {{v}}",wordType:"Type: {{v}}"},pos:{noun:"Noun",verb:"Verb",adjective:"Adjective",adverb:"Adverb",numeral:"Numeral",determiner:"Determiner",interjection:"Interjection",particle:"Particle",affix:"Affix",dependentNoun:"Dependent noun",pronoun:"Pronoun",auxVerb:"Auxiliary verb",auxAdjective:"Auxiliary adjective"},reorder:{moved:"Moved to position {{n}} of {{total}}",handle:"Reorder {{word}} (Alt + arrow keys)",hint:"Alt + \u2190 \u2192 to reorder"},thumbMore:"+{{count}}"},pb={filterTitle:"Word Search Settings",filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Grade",grade:"Grade {{n}}",gradeNone:"None",syllables:"Syllables",syllable:"{{n}} Syll.",syllable5plus:"5+ Syllables",partOfSpeech:"Part of Speech",pos:{noun:"Noun/Numeral",verb:"Verb/Adjective",modifier:"Adverb/Determiner"},wordType:"Word Type",field:"Semantic Category",type:{native:"Native Korean",sino:"Sino-Korean",foreign:"Loanword",mixed:"Hybrid"},exclude:"Exclude",excludeNoImage:"No Image"},searchButton:"Search",resultUnit:"words",remaining:"{{count}} remaining",resultDisc:"Select {{unit}}. Up to {{max}} items. ({{selected}}/{{max}})",resultTitlePrefix:"",resultTitleSuffix:" {{unit}} found.",emptyResult:"No results found.",groupCount:"{{count}}",sort:{aria:"Sort",match:"Best Match",ganada:"A\u2013Z \u2191",ganadaDesc:"A\u2013Z \u2193",syllable:"Syllables \u2191",syllableDesc:"Syllables \u2193",grade:"Grade \u2191",gradeDesc:"Grade \u2193",original:"Original order"},pageSize:"Show {{count}}",pageSizeAria:"Page size"},mb={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removeWord:"Remove word"},hb={title:"By Topic",subtitle:"Select a topic to start listening training",noiseTitle:"Sentence Listening in Noise",shortStoryTitle:"Short Story Listening",FOOD:"Food",HLTH:"Health",WETH:"Weather",PRSN:"People",KRCT:"Korean Culture",STRY:"Stories",LOCA:"Locations",SOAR:"Society & Arts",NTSC:"Nature & Science",SPRT:"Sports",sub:{TRKRFD:"Traditional Korean Food",MDKRFD:"Modern Korean Food",WRLDFD:"World Cuisine",MTRFRT:"Ingredients & Fruits",GEFDKL:"Food Facts",HTETHB:"Healthy Eating",DISILL:"Diseases",EXCISE:"Exercise",GEHTKL:"Health Facts",GESSKL:"Seasons",SNWRAN:"Snow & Rain",WTHFCT:"Weather Forecast",GEWTKL:"Weather Facts",JODYPS:"Joseon Dynasty",MDKRPS:"Modern Korea",THKDPS:"Three Kingdoms",WRLART:"World Artists",WRLPSN:"World Figures",KRLANG:"Korean Language",TRPLCT:"Traditional Games",HERITG:"Heritage",EVTFES:"Events & Festivals",GECTKL:"General Knowledge",FRYTAL:"Fairy Tales",AMZING:"Amazing Stories",DAYSTR:"Everyday Stories",KRLDMK:"Korean Landmarks",SELNMK:"Seoul Landmarks",WRDTRB:"World Travel",NAVIGT:"Navigation",KRSOCI:"Korea",ECONEW:"Economy & News",GENART:"Arts",GELFKL:"Life Tips",ANIMAL:"Animals",PLANTS:"Plants",ETHPLT:"Earth",TOLELC:"Tools & Electronics",GESCKL:"Science Facts",INVDSP:"Individual Sports",MARART:"Martial Arts",TEAMSP:"Team Sports",FOOTBL:"Soccer",GESPKL:"Sports Facts"}},Cb={direction:{left:"L",right:"R",label:"Side"},wornDate:"Date Worn",deviceType:"Device Type",brand:"Brand",fitType:"Fit Type",productName:"Product Name",addNew:"Add New Device",selectFromList:"Select from List",removeDevice:"Remove",type:{hearingAid:"Hearing Aid",cochlearImplant:"Cochlear Implant",other:"Other"}},fb={stat:{totalCustomers:"Total Customers",monthlyVisits:"This Month's Visits"},chart:{visitDetail:"Visit Details",trainingDetail:"Training Details",weekly:"Weekly",periodMonth:"Month",periodWeek:"Week",weeklyPrefix:"Weekly",monthlyPrefix:"Monthly",visit:"Visits",reservation:"Reservations",trainingDone:"Completed",trainingInProgress:"In Progress",weekRange:"{{start}}\u2013{{end}}",week:"W{{n}}"}},gb={phonemeSelect:{vs:"vs"},caution:"Caution",mode:{include:"Phoneme Include",pick:"Phoneme Contrast",contrast:"Specify Contrast",infoTitle:"Contrast Mode",infoInclude:"Include \u2014 finds words containing all selected phonemes, plus their minimal pair.",infoPick:"Contrast \u2014 matches only if the selected phoneme is the actual point of difference in the pair.",infoContrast:"Specify Contrast \u2014 directly choose phonemes for the base word and the contrasting word to find pairs."},count:"{{n}}",countLabel:"Number of phonemes",input:{char:"Choose Letters",pron:"Choose Sound",infoTitle:"Input mode",infoChar:"Choose Letters \u2014 finds words by the selected phonemes (spelling), then finds their standard-pronunciation contrast pairs.",infoPron:"Choose Sound \u2014 finds standard-pronunciation contrast pairs directly from the selected phonemes."},phonemeN:"Syllable {{n}}",phonemeSingleLabel:"Syllable",phonemeContrastSingleLabel:"Contrast Syllable",ordinals:["First","Second","Third","Fourth"],phonemeOrdinalLabel:"{{ordinal}} Syllable",phonemeContrastOrdinalLabel:"Contrast {{ordinal}} Syllable",composition:"Answer Word Composition",syllableCount:"Syllables",syllableN:"{{n}} syll.",syllableNPlus:"{{n}}+ syll.",onset:"Onset",vowel:"Vowel",coda:"Coda",filter:{searchOptionsTitle:"Contrast Settings",searchModeLabel:"Contrast Mode",countLabel:"Input Syllable Count",inputModeLabel:"Input mode",phonemeOrder:"Input Syllable Position",phonemeOrderInfo:["Match: the pair must differ at exactly the same position (syllable).","Any: the differing position doesn't matter."],orderAny:"Any",orderMatch:"Match",difficultyInfo:["Level 1 \u2014 everyday vocabulary acquired before school age and used for life","Level 2 \u2014 difficulty of grades 1\u20132","Level 3 \u2014 difficulty of grades 3\u20134","Level 4 \u2014 difficulty of grades 5\u20136","No level \u2014 frequent everyday words outside the national standard list, plus coinages and loanwords"],selectLabel:"Select",onlyHasImage:"Only words with images",onlySameStructure:"Only same phoneme structure"},confirmMessage:"The word table with {{count}} selected {{unit}} will be lost.",resetOptions:"Reset Options",phonemeContrast:"Contrast Syllable {{n}}",infoNotes:["The preview character is an example of the selected phoneme combination. The actual search covers all words containing the phoneme.","Initial consonant '\u3147' cannot be selected. \u3147 at the start of a word is effectively silent.","If only onset and coda are selected, the vowel is automatically displayed as '\u314F'.","Increasing the phoneme count searches for minimal pairs between each phoneme."]},bb={lead:`IHAB builds trust
|
|
821
821
|
through sound
|
|
822
|
-
and aids recovery.`,site:{title:"Site",malgwi:"Malgwi",soundDirection:"Sound Direction System",vrSoundDirection:"VR Sound Direction System",hearingTest:"Hearing Test Pro"},sns:{title:"SNS",naverBlog:"Naver Blog"},policy:{title:"Policy",terms:"Terms of Service",privacy:"Privacy Policy"},ceo:"CEO",address:"Address",bizNo:"Business no.",support:"Support",ceoName:"Ji-hye Han",addressValue:"302, 3F, Haechan Bldg, 32 Sicheong-gil, Chuncheon, Gangwon, Korea",bizNoValue:"526-81-02926"},yb={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},vb={phaseWordDownload:"Download Word Data",phaseImageCheck:"Check Images",phasePairAnalysis:"Analyze Word Pairs",downloadingCount_one:"Downloading {{n}} word",downloadingCount_other:"Downloading {{n}} words",checkingPage:"Checking page {{page}} list",imageCount:"{{done}} / {{total}} items"},xb={clearAriaLabel:"Clear input"},_b={ariaLabel:"Select tab"},wb={ariaLabel:"Tabs"},Bb={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},kb={ariaLabel:"User avatar"},Ab={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},Nb={weekly:{title:"Weekly Training",daily:"Daily Listening"},homework:{title:"Homework Progress",totalRate:"Overall rate",done:"Done"},today:{tooltipTotal:"Total",tooltipDone:"Done"},visit:{title:"Linked Visit Records"},detail:"Details",detailFor:"{{name}} details"},Eb={time:{justNow:"just now",minutesAgo:"{{n}}m ago",hoursAgo:"{{n}}h ago",daysAgo:"{{n}}d ago",weeksAgo:"{{n}}w ago",monthsAgo:"{{n}}mo ago",yearsAgo:"{{n}}y ago"}},Db={steps:"Step {{current}} of {{total}}"},Sb={skippedOnly_one:"{{n}} older record was excluded \u2014 it does not say what was answered.",skippedOnly_other:"{{n}} older records were excluded \u2014 they do not say what was answered.",runs_one:"{{count}} run",runs_other:"{{count}} runs"},jb={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},Tb={viewWords:"Words"},Mb={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},Lb={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},$b={previewRegion:"Report preview \u2014 scrollable sideways"},Rb={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},Pb={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},Ib={clearSelection:"Clear selection"},Fb={showResult:"Show {{type}} result"},Ob={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},zb={loading:"Loading"},Wb={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},Hb={ariaLabel:"Breadcrumb"},Vb={empty:"No items yet."},qb={main:"Main gradient",soft:"Soft",sub:"Sub color",deep:"Deep gradient",softSub:"Soft sub",warm:"Warm (accent)",dark:"Dark",radial:"Radial gradient",diagonal:"Diagonal pattern",dots:"Dot pattern",outline:"Outline",success:"Success / done",naver:"Naver blog notice",instagram:"Instagram notice"},Ub={common:qg,calendar:Ug,passCard:Gg,rating:Kg,colorPicker:Yg,dropdown:Zg,accordion:Xg,header:Jg,nav:Qg,settings:eb,usage:tb,account:nb,training:ab,customers:rb,payment:ob,coupons:sb,visits:lb,trainingType:ib,myWordTable:ub,keyWords:cb,wordTable:db,wordSearch:pb,wordPrint:mb,topic:hb,device:Cb,manager:fb,wordPairs:gb,footer:bb,date:yb,wordData:vb,textField:xb,segmentedControl:_b,tabs:wb,fileUpload:Bb,avatar:kb,myHomework:Ab,trainingStatus:Nb,store:Eb,progress:Db,trainingMiss:Sb,table:jb,wordScore:Tb,topBanner:Mb,datePicker:Lb,report:$b,tooltip:Rb,phonemeProfile:Pb,bulkBar:Ib,debug:Fb,badge:Ob,loader:zb,soundCompass:Wb,breadcrumb:Hb,board:Vb,promoBannerBg:qb};const Gb="0.369.0",Kb=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],mo="ko",Yb="ihab_display_language";function Gl(){if(typeof window>"u")return mo;try{const e=localStorage.getItem(Yb);if(e&&Kb.some(t=>t.code===e))return e}catch{}return mo}function Kl(e){try{document.documentElement.lang=e}catch{}}Vt.on("languageChanged",Kl),Kl(Gl()),Vt.use(_e.initReactI18next).init({resources:{ko:{translation:Vg},en:{translation:Ub}},lng:Gl(),fallbackLng:mo,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const Zb=new Map;try{Vt.store?.on?.("added",()=>Zb.clear())}catch{}let or=null,Yl=null,Zl=null;function Xb(){const e=Rl();if(e&&e.entries.length>0){const t=uf();if(or&&Yl===e&&Zl===t)return or;const a=new Set,r=[];for(const l of e.entries)!l.word||a.has(l.word)||(a.add(l.word),r.push({w:l.word,s:l.syllables,p:t?.[l.word]?[...t[l.word].cho??[],...t[l.word].jung??[],...t[l.word].jong??[]]:[],pron:l.pronunciation||l.word,grade:l.grade}));return or=r,Yl=e,Zl=t,or}return[]}new Proxy([],{get(e,t){const a=Xb(),r=a[t];return typeof r=="function"?r.bind(a):r}});function Jb(e){if(e.includes("\\")&&e.includes("("))return!0;if(!/url\s*\(/i.test(e))return!1;const t=e.replace(/url\(\s*(['"]?)#[^)'"]*\1\s*\)/gi,"");return/url\s*\(/i.test(t)}function Qb(e){if(typeof window>"u")return"";const t=(a,r)=>{typeof r.attrValue=="string"&&Jb(r.attrValue)&&(r.keepAttr=!1)};oa.addHook("uponSanitizeAttribute",t);try{return oa.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{oa.removeHook("uponSanitizeAttribute",t)}}function ey(e){const[t,a]=o.useState(null),[r,l]=o.useState(null),[s,i]=o.useState(null),[u,c]=o.useState(null),[d,m]=o.useState(null);return o.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){a(null),l(null),i(null),c(null);return}const p=e.split("/").pop();let C=e;p&&(e.startsWith("/")?C=Xr(e):/^(Logo|Symbol)/i.test(p)?C=Xr(`logo/${p}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),C=e)),i(null),c(null),a(e),l(C)},[e]),o.useEffect(()=>{if(!r)return;let p=!1;async function C(){try{let b=await fetch(r);b.ok||(b=await fetch(r));const x=b.headers.get("content-type")||"";if(p)return;if(x.includes("svg")){i("mask");return}if(x.startsWith("image/")){i("img");return}const f=await fetch(r);if(!f.ok)throw new Error("not ok");const h=await f.text();if(p)return;if(/^\s*<svg[\s>]/i.test(h)){const _=Qb(h);if(!_){i("none");return}c(_),i("inline");return}i("none")}catch{p||i("none")}}return C(),()=>{p=!0}},[r]),o.useEffect(()=>{let p=!1,C=null;return s==="mask"&&r&&fetch(r).then(b=>{if(!b.ok)throw new Error("fetch failed");return b.blob()}).then(b=>{p||(C=URL.createObjectURL(b),m(C))}).catch(()=>{p||i("img")}),()=>{p=!0,C&&URL.revokeObjectURL(C),m(null)}},[s,r]),t===e?{iconToUse:r,mode:s,svgText:u,blobUrl:d}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function tt(e){const{icon:t,label:a,className:r,imgClassName:l,maskClassName:s,svgClassName:i,wrapperStyle:u,size:c}=e||{},d=r??"iconRenderer-icon",m=l??"iconRenderer-icon-image",p=s??"iconRenderer-icon-mask",C=i??"iconRenderer-icon-svg",b=typeof t=="string"?t:null,x=H1(b),{iconToUse:f,mode:h,svgText:_,blobUrl:g}=ey(b),k=(A,E={})=>n.jsx("span",{className:d,style:u,...E,children:A}),v=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,B=(A,E={})=>n.jsx("img",{src:A,alt:typeof a=="string"?a:typeof a=="number"?String(a):"",className:m,...E,style:v?{...E.style,...v}:E.style});if(!t)return null;if(typeof t!="string")return k(t);if(t==="none")return k(n.jsx("span",{className:C,dangerouslySetInnerHTML:{__html:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true"></svg>'}}),{"aria-hidden":"true"});if(x)try{return k(o.createElement(x,{className:C,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(f&&f.endsWith(".svg")){if(h==="mask"){const A={"--icon-url":g?`url(${g})`:`url(${f})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return k(n.jsx("span",{className:p,style:A}),{"aria-hidden":"true"})}return h==="img"?k(B(f,{onError:A=>{A.currentTarget.onerror=null,A.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):h==="inline"?k(n.jsx("span",{className:C,dangerouslySetInnerHTML:_?{__html:_}:void 0}),{"aria-hidden":"true"}):k(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return B(Xr(t),{style:u,onError:A=>{A.currentTarget.onerror=null,A.currentTarget.style.display="none"}});const y=typeof c=="number"?c:20,w=`<svg width="${y}" height="${y}" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="3" y="3" width="18" height="18" rx="2" ry="2" style="fill:none;stroke:currentColor;stroke-width:2"/></svg>`;return k(n.jsx("span",{className:C,dangerouslySetInnerHTML:{__html:w}}),{"aria-hidden":"true"})}function Xl(e){const[t,a]=o.useState(!1),r=o.useRef(!1),l=o.useRef(!0);o.useEffect(()=>(l.current=!0,()=>{l.current=!1}),[]);const s=o.useCallback(()=>{if(!e||r.current)return;const i=e();if(i&&typeof i.then=="function"){r.current=!0,a(!0);const u=()=>{r.current=!1,l.current&&a(!1)};i.then(u,u)}},[e]);return{pending:t,press:s}}function ty({icon:e,title:t,message:a,action:r,className:l}){const{pending:s,press:i}=Xl(r?.onClick);return n.jsxs("div",{className:we("empty-state",l),children:[e&&n.jsx(tt,{icon:e,size:48,className:"empty-state__icon"}),t&&n.jsx("p",{className:"empty-state__title h4",children:t}),a&&n.jsx("p",{className:"empty-state__message body-3",children:a}),r&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:i,disabled:s,"aria-busy":s||void 0,children:[r.icon&&n.jsx(tt,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function ny({message:e,hint:t,icon:a="triangle-alert",onRetry:r,retryLabel:l,className:s}){const{t:i}=_e.useTranslation(),{pending:u,press:c}=Xl(r);return n.jsxs("div",{className:we("empty-state","error-state",s),role:"alert",children:[n.jsx(tt,{icon:a,size:48,className:"empty-state__icon error-state__icon"}),n.jsx("p",{className:"empty-state__message body-3",children:e??i("common.errorState.message",{defaultValue:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."})}),t&&n.jsx("p",{className:"error-state__hint caption-1",children:t}),r&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:c,disabled:u,"aria-busy":u||void 0,children:[n.jsx(tt,{icon:"rotate-cw",className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:l??i("common.errorState.retry",{defaultValue:"\uB2E4\uC2DC \uC2DC\uB3C4"})})]})]})}function ay({icon:e,title:t,description:a,cta:r,tone:l="main",disabled:s=!1,onClick:i,className:u=""}){const c=o.useId(),d=`${c}-title`,m=`${c}-desc`,p=`${c}-cta`,C=()=>{s||i?.()};return n.jsx("section",{role:"button",tabIndex:s?-1:0,"aria-disabled":s||void 0,"aria-labelledby":d,"aria-describedby":`${m} ${p}`,onClick:C,onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),C())},className:we("action-card",`action-card--${l}`,s&&"action-card--disabled",u),children:n.jsxs("div",{className:"action-card__body",children:[n.jsx("span",{"aria-hidden":!0,className:"action-card__chip",children:n.jsx(tt,{icon:e,size:34})}),n.jsxs("div",{className:"action-card__text",children:[n.jsx("h2",{id:d,className:"action-card__title",children:t}),n.jsx("p",{id:m,className:"action-card__desc",children:a})]}),n.jsxs("div",{className:"action-card__cta",children:[n.jsx("span",{id:p,children:r}),n.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:n.jsx(tt,{icon:"arrow-right",size:18})})]})]})})}function ry({as:e="div",className:t="",children:a,storage:r,...l}){r&&SC({resolveUrl:r.resolveUrl,download:r.download??(()=>Promise.reject(new Error("[ihabdevteam-core] CoreScope: download resolver\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."))),exists:r.exists,resolvePath:r.resolvePath,noiseBaseUrl:r.noiseBaseUrl,noiseFileGain:r.noiseFileGain});const s=we("ihabdevteam-core-scope",t);return n.jsx(e,{className:s,...l,children:a})}function oy(e){if(e.closest('[aria-hidden="true"], [hidden], [inert]'))return!1;for(let t=e;t;t=t.parentElement){const a=window.getComputedStyle(t);if(a.display==="none"||a.visibility==="hidden"||a.visibility==="collapse")return!1}return!0}function ho(e,t=!0){o.useEffect(()=>{if(!t)return;const a=e.current;if(!a)return;const r=l=>{if(l.key!=="Tab")return;const s=Array.from(a.querySelectorAll(_n)).filter(oy);if(!s.length){l.preventDefault();return}const i=s[0],u=s[s.length-1],c=document.activeElement,d=c===a;l.shiftKey&&(c===i||d)?(l.preventDefault(),u.focus()):!l.shiftKey&&c===u&&(l.preventDefault(),i.focus())};return a.addEventListener("keydown",r),()=>a.removeEventListener("keydown",r)},[e,t])}const _n='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',Co=new WeakMap;function fo(e,t){e&&Co.set(e,t)}function go(e){let t=e;for(let a=0;t&&!t.isConnected&&a<10;a++){let r=t;for(;r&&!Co.has(r);)r=r.parentElement;if(!r)return t;t=Co.get(r)??null}return t}function Jl(e){return!(!e||!e.isConnected||e===document.body||typeof e.focus!="function"||e.disabled||e instanceof HTMLInputElement&&e.type==="hidden"||e.closest('[inert],[aria-hidden="true"],[hidden]'))}function sr(e,t,a){const r=e?.isConnected?e:a?.isConnected?a:null;if(Jl(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!r)return null;const l=Array.from(document.querySelectorAll(_n)).filter(c=>!(e&&e.contains(c))&&Jl(c));let s=null,i=null;for(const c of l)r.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_PRECEDING?s=c:i||(i=c);const u=s??i;return u?.focus(),u}function sy({title:e="",lines:t=[],notices:a=null,children:r,variant:l="default",dismissible:s=!1,className:i=""}){const{t:u}=_e.useTranslation(),[c,d]=o.useState(!1),m=o.useRef(null),p=o.useCallback(()=>{const f=m.current;f&&f.contains(document.activeElement)&&sr(f),d(!0)},[]);if(c)return null;const C=`notice-box notice-box--${l} body-2 ${i}`.trim(),b=s&&n.jsx("button",{type:"button",className:"notice-box__dismiss",onClick:p,"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"});if(a&&Array.isArray(a)&&a.length)return n.jsxs("div",{className:C,role:"note",children:[a.map((f,h)=>n.jsxs("div",{className:"notice-box__inner",children:[f.title?n.jsx("span",{className:"notice-box__title body-3",children:f.title}):null,n.jsx("div",{className:"notice-box__body",children:f.lines&&f.lines.length?n.jsx("div",{children:f.lines.map((_,g)=>n.jsx("span",{className:"notice-box__line body-3",children:_},g))}):f.children??null})]},h)),b]});const x=e||t.length?n.jsxs("div",{className:"notice-box__inner",children:[e?n.jsx("span",{className:"notice-box__title body-1",children:e}):null,n.jsx("div",{className:"notice-box__body",children:t.length?n.jsx("ul",{children:t.map((f,h)=>n.jsx("li",{className:"notice-box__line",children:f},h))}):r})]}):n.jsx("div",{className:"notice-box__inner",children:r});return n.jsxs("div",{ref:m,className:C,role:"note",children:[x,b]})}const ua=[];let lr=!1;function Ql(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=ua[ua.length-1];t&&(e.stopPropagation(),t())}function Gn(e){return ua.push(e),!lr&&typeof document<"u"&&(document.addEventListener("keydown",Ql),lr=!0),()=>{const t=ua.lastIndexOf(e);t>=0&&ua.splice(t,1),ua.length===0&&lr&&typeof document<"u"&&(document.removeEventListener("keydown",Ql),lr=!1)}}const ei=o.createContext(null);function ly(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const ti=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function iy(e){const t=o.useCallback(a=>{if(typeof window>"u"||!window.matchMedia)return()=>{};const r=window.matchMedia(e);return r.addEventListener?r.addEventListener("change",a):r.addListener&&r.addListener(a),()=>{r.removeEventListener?r.removeEventListener("change",a):r.removeListener&&r.removeListener(a)}},[e]);return js.useSyncExternalStore(t,()=>ti(e),()=>!1)}function uy(e){const[t,a]=o.useState(ti(e));return o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const r=window.matchMedia(e),l=i=>a(i.matches),s=r;return s.addEventListener?s.addEventListener("change",l):s.addListener&&s.addListener(l),a(r.matches),()=>{s.removeEventListener?s.removeEventListener("change",l):s.removeListener&&s.removeListener(l)}},[e]),t}const cy=typeof js.useSyncExternalStore=="function"?iy:uy;function Cn(e){const t=o.useContext(ei),a=cy(e);return t&&typeof t.mobile=="boolean"&&ly(e)?t.mobile:a}const dy="(prefers-reduced-motion: reduce)";function bo(){return Cn(dy)}function vn(e){const{anchorRect:t,anchorEl:a,offset:r=20,edgeMargin:l=20,onClose:s,closeOnOutsideClick:i=!0,className:u="",role:c="dialog",ariaLabel:d="",children:m,backdrop:p=!1,isMobilePopup:C=!1,useBorder:b=!0,header:x,focusOnOpen:f}=e||{},h=o.useRef(null),[_,g]=o.useState({position:"fixed",left:0,top:-9999}),[k,v]=o.useState(!1),[B,y]=o.useState("bottom"),[w,A]=o.useState(!1),[E,D]=o.useState(!1),N=!t&&!a,F=o.useRef(null),R=o.useCallback((P=!1,V=!1)=>{if(E&&C)return;const W=a?a.getBoundingClientRect():t,G=V&&F.current?F.current:W;if(!G||!h.current)return;const S=h.current,{offsetWidth:M,offsetHeight:I}=S,Z=window.innerWidth,le=window.innerHeight,oe=Z-G.right,de=G.left,re=G.top,z=le-G.bottom;let ne=0,H=0,U="top";if(re>=I+r)U="top",H=G.top-r-I,ne=G.left+G.width/2-M/2;else if(z>=I+r)U="bottom",H=G.bottom+r,ne=G.left+G.width/2-M/2;else if(oe>=M+r)U="right",ne=G.right+r,H=G.top+G.height/2-I/2;else if(de>=M+r)U="left",ne=G.left-r-M,H=G.top+G.height/2-I/2;else{const me=Math.max(re,z,oe,de);me===re?(U="top",H=G.top-r-I,ne=G.left+G.width/2-M/2):me===z?(U="bottom",H=G.bottom+r,ne=G.left+G.width/2-M/2):me===oe?(U="right",ne=G.right+r,H=G.top+G.height/2-I/2):(U="left",ne=G.left-r-M,H=G.top+G.height/2-I/2)}const pe=Number.isFinite(Number(l))?Number(l):8;ne=Math.min(Math.max(ne,pe),Z-M-pe),H=Math.min(Math.max(H,pe),le-I-pe);const Ee=Math.round(ne),ge=Math.round(H);P&&h.current?(h.current.style.left=`${Ee}px`,h.current.style.top=`${ge}px`,h.current.dataset.placement=U):(y(U||B),g({position:"fixed",left:Ee,top:ge}),A(!0))},[E,C,a,t,r,l,B]);o.useEffect(()=>()=>{F.current=null},[a,t]),o.useLayoutEffect(()=>{if(N)return;if(E&&C){g({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),A(!0);return}F.current===null&&(F.current=a?a.getBoundingClientRect():t??null),R(!1,!0);const P=requestAnimationFrame(()=>R(!1,!0));return()=>cancelAnimationFrame(P)},[t,a,r,m,l,N,E,C,R]),o.useEffect(()=>{if(N||E&&C||!h.current||typeof ResizeObserver>"u")return;const P=new ResizeObserver(()=>{t&&R()});return P.observe(h.current),()=>P.disconnect()},[t,m,l,N,E,C,R]),o.useEffect(()=>{if(N||E&&C)return;let P=null;const V=()=>{if(a&&(F.current=a.getBoundingClientRect()),typeof requestAnimationFrame>"u"){R(!0);return}P===null&&(P=requestAnimationFrame(()=>{P=null,R(!0)}))},W=G=>{if(!a&&s){const S=G.target;if(S&&h.current&&h.current.contains(S))return;try{if(S&&S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}J.current(!0);return}V()};return window.addEventListener("resize",V),document.addEventListener("scroll",W,{passive:!0,capture:!0}),()=>{P!==null&&cancelAnimationFrame(P),window.removeEventListener("resize",V),document.removeEventListener("scroll",W,{capture:!0})}},[t,a,s,r,m,l,N,E,C,R]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const P=window.matchMedia("(max-width: 768px)"),V=()=>D(!!P.matches);V();try{P.addEventListener?P.addEventListener("change",V):P.addListener(V)}catch{try{P.addListener(V)}catch{}}return()=>{try{P.removeEventListener?P.removeEventListener("change",V):P.removeListener(V)}catch{}}},[]);const K=o.useRef(!1),L=o.useRef(null),$=bo(),T=o.useCallback((P=!1)=>{if(s&&!(k||K.current)){if(K.current=!0,P){v(!0);try{s&&s()}catch{K.current=!1,v(!1)}return}v(!0),L.current=setTimeout(()=>{L.current=null;try{s&&s()}catch{K.current=!1,v(!1)}},$?0:200)}},[k,s,v,$]);o.useEffect(()=>()=>{L.current&&clearTimeout(L.current)},[]),o.useEffect(()=>{if(N)return;const P=G=>{const S=h.current;if(!S)return;const M=G.target;if(M&&!S.contains(M)){try{if(M.closest&&M.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},V=G=>{const S=h.current;if(!S)return;const M=G.target;if(M&&!S.contains(M)){try{if(M.closest&&M.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},W=G=>{if(G.key==="Tab"){const S=h.current;if(!S)return;const M=S.querySelectorAll(_n);if(!M||M.length===0)return;const I=M[0],Z=M[M.length-1],le=document.activeElement;G.shiftKey?le===I&&(G.preventDefault(),Z.focus()):le===Z&&(G.preventDefault(),I.focus())}};return document.addEventListener("pointerdown",P,!0),document.addEventListener("click",V,!0),document.addEventListener("keydown",W),()=>{document.removeEventListener("pointerdown",P,!0),document.removeEventListener("click",V,!0),document.removeEventListener("keydown",W)}},[s,i,T,N]);const J=o.useRef(T);o.useEffect(()=>{J.current=T});const q=!!s;o.useEffect(()=>{if(!(N||!q))return Gn(()=>J.current())},[N,q]),o.useEffect(()=>{const P=()=>{T(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",P),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",P)}},[T]);const O=o.useRef(null);o.useEffect(()=>{if(N||f===!1||!w)return;const P=h.current;if(!P)return;const V=P.querySelector(_n);if(V)return O.current=document.activeElement,V.focus({preventScroll:!0}),()=>{const W=O.current;O.current=null,W&&document.contains(W)&&W.focus({preventScroll:!0})}},[N,f,w]),o.useEffect(()=>{c==="dialog"&&!d&&Rt("tooltip-no-name",'[ihab/Tooltip] \uC774\uB984 \uC5C6\uB294 role="dialog" \uC785\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. \uB0AD\uB3C5\uAE30\uAC00 "\uB300\uD654\uC0C1\uC790" \uB77C\uACE0\uB9CC \uC77D\uC2B5\uB2C8\uB2E4.')},[c,d]);const Q=n.jsxs("div",{ref:h,className:`tooltip-content ${N?"tooltip-content--inline":""} ${b?"tooltip-content--bordered":""} ${k?"is-closing":""} ${u} ${E&&C?"is-mobile":""}`,role:c,"aria-label":d||void 0,style:N?{}:{..._,visibility:w?"visible":"hidden"},tabIndex:-1,"data-placement":B,"data-left":N?"":_.left,"data-top":N?"":_.top,"data-anchor-left":t?Math.round(t.left):"","data-anchor-top":t?Math.round(t.top):"","data-anchor-width":t?Math.round(t.width):"","data-anchor-height":t?Math.round(t.height):"",children:[x!=null&&n.jsx("div",{className:"tooltip-content__header h5",children:x}),m]});if(N||typeof document>"u")return Q;if(p||E&&C){const P=n.jsxs("div",{className:"tooltip-portal",children:[n.jsx("div",{className:"tooltip-backdrop",onClick:()=>{i&&T(!0)}}),Q]});return cn.createPortal(P,document.body)}return cn.createPortal(Q,document.body)}function Dn(e){const{anchorRect:t,text:a,offset:r=8,onClose:l,className:s="",ariaLabel:i}=e||{};return a?n.jsx(vn,{anchorRect:t,offset:r,onClose:l,closeOnOutsideClick:!1,className:`tooltip-info ${s}`,ariaLabel:i||a,children:n.jsx("div",{className:"tooltip-info__content body-3",children:a})}):null}function Kn(e){const{t}=_e.useTranslation(),{anchorRect:a,title:r,items:l,activeIndex:s=-1,showIndex:i=!0,onClose:u,offset:c=12,closeOnOutsideClick:d=!0}=e||{},m=(Array.isArray(l)?l:l?[l]:[]).map(p=>typeof p=="string"?{text:p}:p);return!m.length&&!r?null:n.jsx(vn,{anchorRect:a,offset:c,onClose:u,closeOnOutsideClick:d,useBorder:!1,className:"tooltip-description",ariaLabel:r||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:"tooltip-description__box",children:[r&&n.jsx("span",{className:"tooltip-description__title body-2",children:r}),n.jsx("ol",{className:"tooltip-description__items",children:m.map((p,C)=>n.jsxs("li",{className:`tooltip-description__item body-3${C===s?" tooltip-description__item--active":""}`,children:[i&&m.length>1&&n.jsxs("span",{className:"tooltip-description__index button-1",children:[C+1,"."]}),p.color&&n.jsx("span",{className:"tooltip-description__dot",style:{background:p.color},"aria-hidden":"true"}),n.jsx("span",{children:p.text})]},C))})]})})}function $a(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let yo=0,ni=!1;function ai(){ni||typeof document>"u"||(ni=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(yo=Date.now())},!0),document.addEventListener("touchstart",()=>{yo=Date.now()},{capture:!0,passive:!0}))}ai();function ca(e){return!!e&&e.pointerType==="touch"}function da(e=1e3){return ai(),Date.now()-yo<e}function vo(e,t,a,{enabled:r=!0,fallbackOnParent:l=!1}={}){const s=$a(e),i=$a(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!r||typeof document>"u")return;const m=p=>{const C=p,b=p.target,x=a.current,f=!!(b&&x&&x.contains(b));if(C.pointerType!=="touch"){f&&(u.current=null);return}if(f){u.current=s.current;return}u.current=null,s.current&&!(b&&b.closest?.(".tooltip-content"))&&i.current(!1,x)};return document.addEventListener("pointerdown",m,!0),()=>document.removeEventListener("pointerdown",m,!0)},[r,a,s,i]);const d=o.useCallback(m=>{const p=u.current;return p===null?!1:(u.current=null,c.current=Date.now(),i.current(!p,m??a.current),!0)},[a,i]);return o.useEffect(()=>{if(!r||!l)return;const m=a.current,p=m?.parentElement;if(!m||!p)return;let C=null;const b=h=>{const _=h.changedTouches?.[0];if(!_)return!1;const g=m.getBoundingClientRect();return _.clientX>=g.left&&_.clientX<=g.right&&_.clientY>=g.top&&_.clientY<=g.bottom},x=h=>{C=b(h)?s.current:null},f=h=>{const _=C;C=null,!(_===null||Date.now()-c.current<700||!b(h))&&(u.current=null,c.current=Date.now(),i.current(!_,m))};return p.addEventListener("touchstart",x,{passive:!0}),p.addEventListener("touchend",f),()=>{p.removeEventListener("touchstart",x),p.removeEventListener("touchend",f)}},[r,l,a,s,i]),{touchPress:d}}function py(e,t){const{size:a=48,type:r,htmlType:l,href:s,target:i,rel:u,icon:c,rightIcon:d,label:m,count:p,subLabel:C,children:b,ariaLabel:x,variant:f="default",align:h="center",nowrap:_=!1,selected:g,toggleable:k=!1,ariaExpanded:v,ariaControls:B,disabled:y=!1,useLabel:w=!0,useBorder:A=!0,useBG:E=!0,useDisabledCovered:D=!1,useDisabledInvisible:N=!1,useDisabledFilled:F=!1,width:R,minWidth:K,onClick:L,onDisabledClick:$,showTooltipInfo:T=!1,tooltipInfoText:J=null,tooltipDescription:q=null,tooltipOnly:O=!1,iconSize:Q="medium",iconColor:P,shape:V="rounded",color:W,className:G,...S}=e,M=typeof a=="string"&&isNaN(Number(a))?a.toLowerCase():String(Number(a)||48),I=M.match(/^\d+$/)?`button${M}`:`button-${M}`,Z=Number(a),le=!isNaN(Z)&&Z<40?"button-2":"button-1",oe=m??b,de=y||!!S.disabled,re=de?D?"disabled-covered":N?"disabled-invisibled":F?"disabled-filled":"disabled":f,z=re?`button--variant-${re}`:"",ne=h?`button--align-${h}`:"",H=_?"button--nowrap":"",U=V?`button--shape-${V}`:"",pe=typeof P=="string"&&P.startsWith("--")?`var(${P})`:P,Ee={...R?{width:typeof R=="number"?`${R}px`:R}:{},...K?{minWidth:typeof K=="number"?`${K}px`:K}:{},...A?{}:{"--button-border":de?"0":"1px solid transparent"},...pe?{"--button-icon-color":pe}:{},...W?{"--color-main":W}:{}},ge=w===!1?"":oe,me=Array.isArray(ge)?ge.length>0:!!ge,ie=!!d,be=r??(me||c||ie?"bar":"dot"),he=`${I}--${be}`,ue=o.useRef(null);o.useEffect(()=>{!Pn||l!==void 0||ue.current?.closest("form")&&Rt(`button-in-form:${typeof oe=="string"?oe:""}`,'[ihab/Button] <form> \uC548\uC778\uB370 htmlType \uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uC774 \uB2E8\uCD94\uB294 type="button" \uC774\uB77C \uD3FC\uC744 \uBCF4\uB0B4\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uBCF4\uB0B4\uB294 \uB2E8\uCD94\uBA74 htmlType="submit" \uC744 \uC8FC\uC138\uC694. \uD3FC\uC5D0 \uBCF4\uB0B4\uB294 \uB2E8\uCD94\uAC00 \uD558\uB098\uB3C4 \uC5C6\uC73C\uBA74 **Enter \uB85C\uB3C4 \uC548 \uBCF4\uB0B4\uC9D1\uB2C8\uB2E4**(\uCE78\uC774 \uB458 \uC774\uC0C1\uC77C \uB54C).'+(typeof oe=="string"&&oe?` \uB2E8\uCD94: ${oe}`:""))},[l,oe]);const Me=o.useRef(t);Me.current=t;const qe=o.useCallback(Re=>{ue.current=Re;const ot=Me.current;typeof ot=="function"?ot(Re):ot&&(ot.current=Re)},[]),je=o.useRef(de),[Ve,Oe]=o.useState(!!g),[dt,rt]=o.useState(!1),[nt,pt]=o.useState(null),Ne=o.useCallback(()=>rt(!1),[]),[Ue,ke]=o.useState(!1),He=o.useId();o.useEffect(()=>{typeof g=="boolean"&&Oe(g)},[g]),o.useEffect(()=>{if(je.current&&!de&&ue.current){const Re=ue.current;let ot=!1;try{ot=Re.matches(":focus:not(:focus-visible)")}catch{ot=!1}ot&&Re.blur(),Re.style.pointerEvents="none";const Et=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ue.current&&(ue.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(Et)}je.current=de},[de]);const Be=typeof g=="boolean"?!!g:Ve,Se=typeof v=="boolean"?void 0:k||typeof g=="boolean"?Be?"true":"false":S["aria-pressed"],Le=we("button",I,he,z,ne,H,U,Be?"is-selected":null,E?null:"button--no-bg",O?"button--tooltip-only":null,G),Ze=`button__icon button__icon--${Q}`,xt=Array.isArray(C)?C:C!==void 0?[C]:[],et=()=>{if(Array.isArray(ge))return ge.map((ot,Et)=>{const Je=xt[Et];return n.jsxs("span",{className:`button__label-text${Je!==void 0?" button__label-text--has-sub":""}`,children:[ot,Je!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:Je})]},Et)});const Re=C!==void 0;return n.jsxs("span",{className:`button__label-text${Re?" button__label-text--has-sub":""}`,children:[ge,p!=null&&n.jsx("span",{className:"button__count",children:p}),Re&&n.jsx("span",{className:"button__sub-label-text caption-1",children:C})]})},Xe=Re=>{typeof g!="boolean"&&!k&&Oe(!1),Re.currentTarget.blur()},At=Re=>{de||(typeof S.onMouseLeave=="function"&&S.onMouseLeave(Re),Xe(Re))},gt=Re=>{if(O&&mt&&st.touchPress(Re.currentTarget),de){mt&&st.touchPress(Re.currentTarget),Re.preventDefault(),$?.(Re);return}typeof g!="boolean"&&k&&Oe(ot=>!ot),L?.(Re)},_t=o.useCallback(()=>{(T||q)&&(rt(!0),pt(ue.current?.getBoundingClientRect()??null))},[T,q]),Nt=o.useCallback(()=>{(T||q)&&(rt(!1),pt(null))},[T,q]),mt=!!(T||q),st=vo(dt,Re=>{Re?_t():Nt()},ue,{enabled:mt&&(de||O),fallbackOnParent:mt&&de}),Pe={...S};delete Pe.disabled,delete Pe.className,delete Pe.faded,delete Pe.useFaded,delete Pe.loading,delete Pe.onMouseLeave,delete Pe.onPointerEnter,delete Pe.onPointerLeave,delete Pe.onPointerUp,delete Pe.onFocus,delete Pe.onBlur,de&&(Object.keys(Pe).forEach(Re=>{/^on[A-Z]/.test(Re)&&typeof Pe[Re]=="function"&&delete Pe[Re]}),Pe["aria-disabled"]="true");const bt=(typeof T=="string"?T:null)??(typeof J=="string"?J:null)??(typeof x=="string"?x:null)??(typeof oe=="string"?oe:null)??void 0,wt=typeof x=="string"?x:typeof oe=="string"?oe:bt,lt=q?[q.title,...q.items??[]].filter(Boolean).join(". "):T&&bt&&bt!==wt?bt:"",jt=[typeof S["aria-describedby"]=="string"?S["aria-describedby"]:void 0,lt?He:null].filter(Boolean).join(" ")||void 0,Ge=(Re,ot)=>n.jsx(tt,{icon:Re,label:ot??wt,className:Ze,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),yt=()=>be==="dot"?n.jsxs(n.Fragment,{children:[Ge(c),me&&n.jsx("span",{className:`button__label ${le}`,children:et()})]}):h==="center"&&c?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:Ge(c)}),me&&n.jsx("span",{className:`button__label ${le}`,children:et()})]}),ie&&n.jsx("span",{className:"button__right",children:Ge(d)})]}):n.jsxs(n.Fragment,{children:[c&&n.jsx("span",{className:"button__left",children:Ge(c,x??oe)}),me&&n.jsx("span",{className:`button__label ${le}`,children:et()}),ie&&n.jsx("span",{className:"button__right",children:Ge(d)})]}),$t=!!s&&!de;return n.jsxs(n.Fragment,{children:[n.jsxs($t?"a":"button",{...Pe,ref:qe,...$t?{href:s,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:l??"button",disabled:de&&!$&&!Ue},className:Le,"aria-pressed":Se,"aria-expanded":typeof v=="boolean"?v:S["aria-expanded"],"aria-controls":B??S["aria-controls"],"aria-label":wt,"aria-disabled":de&&($t||$||Ue)?!0:void 0,"aria-describedby":jt,style:Ee,onClick:gt,onMouseLeave:At,onPointerEnter:Re=>{ca(Re)||_t(),!de&&typeof S.onPointerEnter=="function"&&S.onPointerEnter(Re)},onPointerLeave:Re=>{ca(Re)||Nt(),!de&&typeof S.onPointerLeave=="function"&&S.onPointerLeave(Re)},onPointerUp:Re=>{de&&mt&&st.touchPress(Re.currentTarget),!de&&typeof S.onPointerUp=="function"&&S.onPointerUp(Re)},onFocus:Re=>{ke(!0),da()||_t(),!de&&typeof S.onFocus=="function"&&S.onFocus(Re)},onBlur:Re=>{ke(!1),de||Xe(Re),Nt(),!de&&typeof S.onBlur=="function"&&S.onBlur(Re)},children:[yt(),lt?n.jsx("span",{id:He,hidden:!0,"aria-label":lt}):null]}),dt&&q?n.jsx(Kn,{anchorRect:nt,title:q.title,items:q.items,onClose:Ne}):dt&&bt?n.jsx(Dn,{anchorRect:nt,text:bt,onClose:Ne}):null]})}const fe=o.forwardRef(py);fe.displayName="Button";function Mt(e,t,a){const r=o.useRef(null);return o.useLayoutEffect(()=>{const l=r.current?.parentElement??null;return t(l,e),()=>a(l)},[e,t,a]),r}const Ra={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},xo=new WeakMap;function _o(e){if(e)return xo.get(e)}function Qt(e,t){e&&(e.style.setProperty(Ra.title,t.title),e.style.setProperty(Ra.description,t.description),xo.set(e,t))}function en(e){e&&(e.style.removeProperty(Ra.title),e.style.removeProperty(Ra.description),xo.delete(e))}const ri={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function oi(){const e=Mt(ri,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const si={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function li(){const e=Mt(si,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const ii={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function ui(){const e=Mt(ii,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const ci={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function di(){const e=Mt(ci,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const pi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function mi(){const e=Mt(pi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const hi={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function Ci(){const e=Mt(hi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const fi={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function gi(){const e=Mt(fi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const bi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function yi(){const e=Mt(bi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const vi={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function xi(){const e=Mt(vi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const _i={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function wi(){const e=Mt(_i,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const Bi={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function ki(){const e=Mt(Bi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-outline","aria-hidden":"true",children:n.jsx("span",{className:"promo-banner-bg-outline__dot"})})}const Ai={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Ni(){const e=Mt(Ai,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const Ei={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function Di(){const e=Mt(Ei,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Si={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function ji(){const e=Mt(Si,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const ln=(e,t,a)=>({key:e,get label(){return Vt.t(`promoBannerBg.${e}`,t)},textTone:a}),my=[ln("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),ln("soft","\uC18C\uD504\uD2B8","dark"),ln("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),ln("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),ln("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),ln("warm","\uC6DC(\uAC15\uC870)","dark"),ln("dark","\uB2E4\uD06C","light"),ln("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),ln("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),ln("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),ln("outline","\uC544\uC6C3\uB77C\uC778","dark"),ln("success","\uC131\uACF5/\uC644\uB8CC","light"),ln("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),ln("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],Ti={main:oi,soft:li,sub:ui,deep:di,softSub:mi,warm:Ci,dark:gi,radial:yi,diagonal:xi,dots:wi,outline:ki,success:Ni,naver:Di,instagram:ji};function Mi({storageKey:e="fontScale",baseFont:t=20,minScale:a=.8,maxScale:r=1.4,step:l=.1,lineHeightRatio:s=1.4}={}){const i=k=>Math.max(a,Math.min(r,Number(k))),u=k=>{try{const v=localStorage.getItem(k),B=v?Number(v):1;return Number.isFinite(B)?i(B):i(1)}catch{return i(1)}},[c,d]=o.useState(()=>u(e)),[m,p]=o.useState(e);m!==e&&(p(e),d(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const C=k=>{d(typeof k=="function"?v=>i(k(v)):i(k))},b=()=>C(k=>+(k+l).toFixed(6)),x=()=>C(k=>+(k-l).toFixed(6)),f=c<r-Number.EPSILON,h=c>a+Number.EPSILON,_=Math.round(t*c),g=Math.round(_*s);return{scale:c,setScale:C,increase:b,decrease:x,canIncrease:f,canDecrease:h,fontSize:_,lineHeight:g}}function Li(e,t){const a=$a(t);o.useEffect(()=>{const r=()=>a.current();try{window.addEventListener(e,r)}catch{}return()=>{try{window.removeEventListener(e,r)}catch{}}},[e,a])}const wo=" \xB7 ",$i=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(wo)?e.split(wo).pop()??e:e})(),hy=o.createContext(!1),Yn=[];let Ri=null;function Cy(e){const t=o.useContext(hy);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;Yn.length===0&&(Ri=document.title);const a={text:$i?`${e}${wo}${$i}`:e};return Yn.push(a),document.title=a.text,()=>{const r=Yn.lastIndexOf(a);r>=0&&Yn.splice(r,1),document.title=Yn.length?Yn[Yn.length-1].text:Ri??document.title}},[e,t])}const Bo=[{value:"10",label:"10\uAC1C\uC529 \uBCF4\uAE30"},{value:"25",label:"25\uAC1C\uC529 \uBCF4\uAE30"},{value:"50",label:"50\uAC1C\uC529 \uBCF4\uAE30"},{value:"100",label:"100\uAC1C\uC529 \uBCF4\uAE30"}],fy=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function mn(e,t){return fy().compare(e,t)}const ir=new Map;function gy(e){const t=ir.get(e);if(t)return t;const a=[],r=/-?\d+(?:\.\d+)?/g;let l=0;for(let s=r.exec(e);s;s=r.exec(e)){let i=s.index,u=s[0];u[0]==="-"&&i>0&&!/\s/.test(e[i-1])&&(i+=1,u=u.slice(1)),i>l&&a.push(e.slice(l,i)),a.push(Number(u)),l=s.index+s[0].length}return l<e.length&&a.push(e.slice(l)),ir.size>5e3&&ir.clear(),ir.set(e,a),a}function by(e){if(!/^[\d\s-]+$/.test(e))return null;const t=e.replace(/\D/g,"");return t.length<9||t.length>11?null:t[0]==="0"||t[0]==="1"&&e!==t?t:null}function yy(e,t){const a=d=>d==null||typeof d=="number"&&Number.isNaN(d)?"":String(d).trim(),r=a(e),l=a(t);if(r===l)return 0;const s=(d,m)=>{if(typeof d=="number"&&!Number.isNaN(d))return[d];const p=by(m);return p!==null?[p]:gy(m)},i=s(e,r),u=s(t,l),c=Math.min(i.length,u.length);for(let d=0;d<c;d++){const m=i[d],p=u[d];if(typeof m=="number"&&typeof p=="number"){if(m!==p)return m-p;continue}if(typeof m=="number")return-1;if(typeof p=="number")return 1;const C=mn(m,p);if(C!==0)return C}return i.length!==u.length?i.length-u.length:mn(r,l)}const Pi=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function ur(e,t,a){const r=Pi(e),l=Pi(t);if(r||l)return r===l?0:r?1:-1;const s=yy(e,t);return a?s:-s}function vy(e,t,a){const{t:r}=_e.useTranslation(),[l,s]=o.useState(()=>{const x=a?.initialPageSize;return x&&Bo.some(f=>f.value===x)?x:"25"}),[i,u]=o.useState(1),[c,d]=o.useState(t);Object.is(c,t)||(d(t),i!==1&&u(1));const m=o.useMemo(()=>Bo.map(x=>({...x,label:r("visits.showN",{n:x.value})})),[r]),p=o.useCallback(x=>{Bo.some(f=>f.value===x)&&(s(x),u(1))},[]),C=Math.max(1,Math.ceil(e.length/Number(l))),b=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),C);return i!==b&&u(b),{pageRows:o.useMemo(()=>e.slice((b-1)*Number(l),b*Number(l)),[e,b,l]),pageSizeProps:{options:m,value:l,onChange:p},paginationProps:{page:b,total:C,onChange:u},setPage:u}}function xy(e){const[t,a]=o.useState(()=>e?.defaultKey!=null?{key:e.defaultKey,asc:e.defaultAsc??!0}:null),r=o.useRef(t),l=o.useRef(e?.onSortChange);l.current=e?.onSortChange;const s=o.useCallback(c=>{const d=r.current,m=d?.key===c?{key:c,asc:!d.asc}:{key:c,asc:!0};r.current=m,a(m),l.current?.(m)},[]),i=o.useCallback((c,d)=>({label:c,sortDir:t?.key===d?t.asc?"asc":"desc":null,onClick:()=>s(d)}),[t,s]),u=o.useCallback((c,d)=>{if(!t)return c;const{key:m,asc:p}=t;return[...c].sort((C,b)=>ur(d(C,m),d(b,m),p))},[t]);return{sort:t,field:i,sortRows:u}}const xn="\uC804\uCCB4";Object.fromEntries(Object.entries(QC).map(([e,{nucleus:t}])=>[e,t]));const _y={labial:e=>e("common.phonetics.place.labial",{defaultValue:"\uC591\uC21C\uC74C"}),alveolar:e=>e("common.phonetics.place.alveolar",{defaultValue:"\uCE58\uC870\uC74C"}),palatal:e=>e("common.phonetics.place.palatal",{defaultValue:"\uACBD\uAD6C\uAC1C\uC74C"}),velar:e=>e("common.phonetics.place.velar",{defaultValue:"\uC5F0\uAD6C\uAC1C\uC74C"}),glottal:e=>e("common.phonetics.place.glottal",{defaultValue:"\uC131\uBB38\uC74C"})},wy={frontHigh:e=>e("common.phonetics.vowel.frontHigh",{defaultValue:"\uC804\uC124 \uACE0\uBAA8\uC74C"}),backHighUnrounded:e=>e("common.phonetics.vowel.backHighUnrounded",{defaultValue:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C"}),backHighRounded:e=>e("common.phonetics.vowel.backHighRounded",{defaultValue:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C"}),frontMid:e=>e("common.phonetics.vowel.frontMid",{defaultValue:"\uC804\uC124 \uC911\uBAA8\uC74C"}),backMidUnrounded:e=>e("common.phonetics.vowel.backMidUnrounded",{defaultValue:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C"}),backMidRounded:e=>e("common.phonetics.vowel.backMidRounded",{defaultValue:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C"}),low:e=>e("common.phonetics.vowel.low",{defaultValue:"\uC800\uBAA8\uC74C"})},By={j:e=>e("common.phonetics.glide.j",{defaultValue:"j\uD65C\uC74C"}),w:e=>e("common.phonetics.glide.w",{defaultValue:"w\uD65C\uC74C"}),velar:e=>e("common.phonetics.glide.velar",{defaultValue:"\u0270\uD65C\uC74C"})};function ky(e,t){if("place"in t)return _y[t.place](e);const a=wy[t.vowel](e);return t.glide?`${a} \xB7 ${By[t.glide](e)}`:a}const Ay=(e,{defaultValue:t})=>t,Ii=(e,t)=>({jamos:e,phonetic:t,tooltip:ky(Ay,t)}),Sn=(e,t)=>t.map(a=>Ii([a],{place:e})),qt=(e,t,a)=>Ii([...e],a?{vowel:t,glide:a}:{vowel:t}),ko={cho:[Sn("labial",["\u3142","\u3143","\u314D","\u3141"]),Sn("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),Sn("alveolar",["\u3145","\u3146"]),Sn("palatal",["\u3148","\u3149","\u314A"]),Sn("velar",["\u3131","\u3132","\u314B"]),Sn("glottal",["\u314E"])],jung:[[qt("\u3163","frontHigh"),qt("\u315F","frontHigh","w"),qt("\u3162","frontHigh","velar")],[qt("\u3161","backHighUnrounded")],[qt("\u315C","backHighRounded"),qt("\u3160","backHighRounded","j")],[qt("\u3154\u3150","frontMid"),qt("\u3156\u3152","frontMid","j"),qt("\u3159\u315A\u315E","frontMid","w")],[qt("\u3153","backMidUnrounded"),qt("\u3155","backMidUnrounded","j"),qt("\u315D","backMidUnrounded","w")],[qt("\u3157","backMidRounded"),qt("\u315B","backMidRounded","j")],[qt("\u314F","low"),qt("\u3151","low","j"),qt("\u3158","low","w")]],jong:[Sn("labial",["\u3142","\u3141"]),Sn("alveolar",["\u3137","\u3134","\u3139"]),Sn("velar",["\u3131","\u3147"])]},Ny=e=>e===Ey?[]:Array.from(e),Ey="__NO_CODA__",Ao=e=>e.map(t=>t.map(({jamos:a,phonetic:r,tooltip:l})=>({v:a.join(""),phonetic:r,tooltip:l}))),Fi={cho:Ao(ko.cho),jung:Ao(ko.jung),jong:Ao(ko.jong)};Fi.jung.flat().forEach(({v:e})=>{for(const t of Ny(e));}),new Set(Fi.cho.flat().map(e=>e.v));function Dy(e,t=!0){const a=$a(e);o.useEffect(()=>{if(t)return Gn(()=>{a.current?.()})},[t,a])}function Pa(){const[e,t]=o.useState(null),a=o.useCallback(s=>t(s.getBoundingClientRect()),[]),r=o.useCallback(()=>t(null),[]),l=o.useCallback(s=>{const i=s.getBoundingClientRect();t(u=>u?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:a,close:r,toggleAt:l}}function Sy(e){const[t,a]=o.useState(null),[r,l]=o.useState(null),s=o.useRef(null);o.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const i=o.useCallback((c,d)=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{a(c),l(d)},e)},[e]),u=o.useCallback(()=>{s.current&&clearTimeout(s.current),a(null),l(null)},[]);return{payload:t,anchorRect:r,openAfterDelay:i,close:u}}function Oi(e="warning"){const[t,a]=o.useState(""),[r,l]=o.useState(e),[s,i]=o.useState(0),u=o.useCallback((p,C)=>{l(C),a(p),i(b=>b+1)},[]),c=o.useCallback(p=>u(p,"warning"),[u]),d=o.useCallback(p=>u(p,"normal"),[u]),m=o.useCallback(()=>a(""),[]);return{toastMessage:t,toastType:r,toastKey:s,showToast:u,showWarning:c,showNormal:d,clearToast:m}}function Ia(e){let t=0;if(e&&typeof window<"u"&&typeof window.getComputedStyle=="function")for(let a=e;a&&a!==document.body&&a!==document.documentElement;a=a.parentElement){const r=parseInt(window.getComputedStyle(a).zIndex,10);!Number.isNaN(r)&&r>t&&(t=r)}return t>0?`max(var(--z-menu, 1500), ${t+1})`:"var(--z-menu, 1500)"}function Fa({computeStyle:e,onScroll:t="close",onResize:a="close",ignoreOutsideClickSelector:r}){const[l,s]=o.useState(!1),[i,u]=o.useState({position:"fixed"}),c=o.useRef(null),d=o.useRef(null),m=o.useCallback(()=>{c.current&&u(e(c.current.getBoundingClientRect(),c.current))},[e]);o.useLayoutEffect(()=>{l&&m()},[l,m]),o.useEffect(()=>{if(!l)return;let b=d.current?.offsetHeight??0;b>0&&m();let x=0,f=null;typeof ResizeObserver<"u"&&d.current&&(f=new ResizeObserver(()=>{const w=d.current?.offsetHeight??0;if(w!==b){if(b=w,++x>4){f?.disconnect(),f=null;return}m()}}),f.observe(d.current));const h=w=>{const A=w.target;r&&A.closest?.(r)||c.current?.contains(A)||d.current?.contains(A)||s(!1)};document.addEventListener("mousedown",h),document.addEventListener("pointerdown",h);let _=null;const g=()=>{if(typeof requestAnimationFrame>"u"){m();return}_===null&&(_=requestAnimationFrame(()=>{_=null,m()}))},k=w=>{d.current?.contains(w.target)||(t==="reposition"?g():t==="close"&&s(!1))};t!=="ignore"&&window.addEventListener("scroll",k,!0);const v=()=>{a==="reposition"?g():a==="close"&&s(!1)};let B=null;const y=()=>{v(),B&&clearTimeout(B),B=setTimeout(()=>{B=null,a==="reposition"&&m()},250)};return a!=="ignore"&&(window.addEventListener("resize",v),window.addEventListener("orientationchange",y)),()=>{_!==null&&cancelAnimationFrame(_),f?.disconnect(),document.removeEventListener("mousedown",h),document.removeEventListener("pointerdown",h),t!=="ignore"&&window.removeEventListener("scroll",k,!0),a!=="ignore"&&(window.removeEventListener("resize",v),window.removeEventListener("orientationchange",y)),B&&clearTimeout(B)}},[l,m,t,a,r]),o.useEffect(()=>{if(l)return Gn(()=>s(!1))},[l]);const p=o.useCallback(()=>s(b=>!b),[]),C=o.useCallback(()=>s(!1),[]);return{open:l,setOpen:s,toggle:p,close:C,style:i,triggerRef:c,menuRef:d}}function jy(e,{mode:t="playback",autoStart:a=!1,onPlaySpeaker:r,onComplete:l,playMs:s=1100,feedbackMs:i=1500}={}){const[u,c]=o.useState([]),[d,m]=o.useState(0),[p,C]=o.useState("idle"),[b,x]=o.useState(null),[f,h]=o.useState([]),[_,g]=o.useState(null),[k,v]=o.useState(0),B=o.useRef(0),y=o.useCallback(P=>{B.current=typeof P=="function"?P(B.current):P,v(B.current)},[]),w=o.useRef(r),A=o.useRef(l);o.useEffect(()=>{w.current=r,A.current=l},[r,l]);const E=o.useRef([]),D=()=>{E.current.forEach(clearTimeout),E.current=[]},N=(P,V)=>{E.current.push(setTimeout(V,P))};o.useEffect(()=>()=>D(),[]);const F=u[d]?.id??null,R=o.useRef(null),K=o.useCallback(()=>{D(),C("playing"),h([]),g(null),y(0);let P=0;e.forEach((V,W)=>{N(P,()=>{m(W),x(V.id),w.current?.(V)}),N(P+1e3,()=>{x(null),h(G=>[...G,V.id])}),P+=1300}),N(P,()=>{C("done"),A.current?.({score:0,total:e.length})})},[e,y]),L=o.useCallback((P,V)=>{if(V>=P.length){C("done"),A.current?.({score:B.current,total:P.length});return}R.current=null,m(V),g(null),C("playing"),x(P[V].id),w.current?.(P[V]),N(s,()=>{x(null),C("waiting")})},[s]),$=o.useCallback(()=>{D();const P=Ta(e);c(P),y(0),h([]),L(P,0)},[e,L,y]),T=o.useCallback(()=>{t==="playback"?(c(e),K()):$()},[t,e,K,$]),J=o.useCallback(()=>{D(),C("idle"),x(null),h([]),g(null),m(0),y(0),c([])},[y]),q=JSON.stringify(e.map(P=>[P.id,P.label,P.angleDeg,P.deg,P.row,P.shortcut]));o.useEffect(()=>(a?T():J(),()=>D()),[t,q,a]);const O=o.useCallback(P=>{p!=="waiting"||t==="playback"||R.current===d||(R.current=d,g(P),P===u[d]?.id&&y(V=>V+1),t==="exam"?(C("playing"),N(400,()=>L(u,d+1))):(C("feedback"),N(i,()=>L(u,d+1))))},[p,t,u,d,L,i,y]),Q=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:b,playedIds:f,selectedId:_,answerId:F,showFeedback:p==="feedback",clickable:p==="waiting",onSelectSpeaker:O},index:d,total:Q,score:k,phase:p,done:p==="done",start:T,reset:J}}const No=new Map,Eo=new Map,Ty=()=>()=>{},My=()=>!0,Ly=()=>!1;function zi(e){const t=/^data:image\/svg\+xml(;base64)?,([\s\S]*)$/.exec(e);if(!t)return null;try{if(!t[1])return decodeURIComponent(t[2]);const a=Uint8Array.from(atob(t[2]),r=>r.charCodeAt(0));return new TextDecoder("utf-8").decode(a)}catch{return null}}function $y(e){if(typeof window>"u")return"";const t=(a,r)=>{const l=r.attrName.toLowerCase(),s=r.attrValue.trim();(l==="href"||l==="xlink:href")&&!s.startsWith("#")&&(r.keepAttr=!1),(l==="style"||s.includes("\\")&&s.includes("("))&&(r.keepAttr=!1);const i=s.replace(/url\s*\(\s*(['"]?)#[^)\s'"]+\1\s*\)/gi,"");/url\s*\(/i.test(i)&&(r.keepAttr=!1)};oa.addHook("uponSanitizeAttribute",t);try{return oa.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{oa.removeHook("uponSanitizeAttribute",t)}}function Ry(e,t){const a=new Set;for(const i of e.matchAll(/url\(\s*(['"]?)#([^)\s"']+)\1\s*\)/g))a.add(i[2]);for(const i of e.matchAll(/(?:xlink:)?href="#([^"]+)"/g))a.add(i[1]);const r=new Set([...e.matchAll(/id="([^"]*)"/g)].map(i=>i[1])),l=[...a].filter(i=>r.has(i));if(l.length===0)return e;let s=e;for(const i of l){const u=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=`${t}-${i}`;s=s.replace(new RegExp(`id="${u}"`,"g"),`id="${c}"`).replace(new RegExp(`url\\(\\s*(['"]?)#${u}\\1\\s*\\)`,"g"),(d,m)=>`url(${m}#${c}${m})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return s}function Py(e){const t=Eo.get(e);if(t)return t;const a=fetch(e).then(r=>r.ok?r.text():null).then(r=>(r!=null&&No.set(e,r),r)).catch(()=>null).finally(()=>{Eo.delete(e)});return Eo.set(e,a),a}function Iy(e,t=!0){const a=o.useSyncExternalStore(Ty,My,Ly)&&t&&e?zi(e)??No.get(e)??null:null,[r,l]=o.useState({src:e,enabled:t,svg:a});return o.useEffect(()=>{if(!t||!e){l({src:e,enabled:t,svg:null});return}const s=zi(e)??No.get(e)??null;if(s!==null){l({src:e,enabled:t,svg:s});return}let i=!0;return Py(e).then(u=>{i&&l({src:e,enabled:t,svg:u})}),()=>{i=!1}},[e,t]),r.src===e&&r.enabled===t?r.svg:a}function Fy({title:e,description:t,actionLabel:a,onAction:r,bg:l,color:s,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:d,className:m=""}){const p=l??s??"main",C=o.useRef(null),[b,x]=o.useState("main"),f=Cn("(max-width: 767px)"),h=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const k=C.current;if(!k)return;const v=_o(k),B=(y,w,A)=>{if(A!==void 0)k.style.setProperty(w,A),h.current[y]=!0;else if(h.current[y]){const E=v?.[y];E?k.style.setProperty(w,E):k.style.removeProperty(w),h.current[y]=!1}};B("title","--promo-banner-bg-title",c),B("description","--promo-banner-bg-description",d)},[c,d,p]),o.useLayoutEffect(()=>{const k=C.current;if(!k)return;const v=_o(k);x(v?.actionVariant??"main")},[p]);const _=we("promo-banner",`promo-banner--${i}`,m),g=Ti[p];return n.jsxs("div",{ref:C,className:_,role:"note",children:[n.jsx(g,{}),n.jsxs("div",{className:"promo-banner__text",children:[n.jsx("span",{className:`promo-banner__title ${i==="small"?"body-2":"h2"}`,children:e}),t&&n.jsx("span",{className:"promo-banner__description body-3",children:t})]}),a&&r&&n.jsx(fe,{htmlType:"button",size:40,variant:u??b,shape:"pill",useBorder:!0,onClick:r,ariaLabel:a,...f?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:a,minWidth:140}})]})}function Oy({children:e,interval:t=5e3,dotTone:a,className:r="","aria-label":l}){const{t:s}=_e.useTranslation(),i=l??s("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[d,m]=o.useState(0),[p,C]=o.useState(!1),[b,x]=o.useState(!1),[f,h]=o.useState(!1),_=o.useRef(null),g=o.useRef(null),k=o.useRef(null),v=bo(),B=p||b||f,y=c>0?Math.min(d,c-1):0;o.useEffect(()=>{if(c<2||t<=0||B||v)return;const A=window.setInterval(()=>m(E=>(Math.min(E,c-1)+1)%c),t);return()=>window.clearInterval(A)},[c,t,B,v]);const w=A=>{g.current!=null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null,h(!1)},A)};return o.useEffect(()=>()=>{g.current!=null&&window.clearTimeout(g.current)},[]),o.useEffect(()=>{if(!f)return;const A=E=>{E.pointerType==="touch"&&(k.current&&k.current.contains(E.target)||(g.current!=null&&(window.clearTimeout(g.current),g.current=null),h(!1)))};return document.addEventListener("pointerdown",A,!0),()=>document.removeEventListener("pointerdown",A,!0)},[f]),c===0?null:n.jsxs("section",{ref:k,className:we("top-banner",r),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:A=>{_.current=A.pointerType},onPointerDown:A=>{_.current=A.pointerType,A.pointerType==="touch"&&(g.current!=null&&(window.clearTimeout(g.current),g.current=null),h(!0))},onPointerUp:A=>{A.pointerType==="touch"&&w(5e3)},onPointerCancel:A=>{A.pointerType==="touch"&&w(5e3)},onMouseEnter:()=>{_.current!=="touch"&&C(!0)},onMouseLeave:()=>C(!1),onFocus:A=>{let E=!0;try{E=A.target.matches(":focus-visible")}catch{E=!0}x(E)},onBlur:A=>{A.currentTarget.contains(A.relatedTarget)||x(!1)},children:[n.jsx("div",{className:"top-banner__viewport",children:n.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${y*100}%)`},children:u.map((A,E)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":E!==y,...E!==y?{inert:!0}:{},children:A},E))})}),c>1&&n.jsx("div",{className:`top-banner__dots${(a?.[y]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((A,E)=>n.jsx("button",{type:"button",className:`top-banner__dot${E===y?" top-banner__dot--active":""}`,"aria-label":s("topBanner.dotAriaLabel",{count:c,index:E+1,defaultValue:`${c}\uAC1C \uC911 ${E+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":E===y,onClick:()=>m(E)},E))})]})}function zy({title:e,body:t,open:a=!1,onToggle:r,avatar:l,titleClassName:s="body-2",bodyClassName:i="body-2",className:u=""}){const{t:c}=_e.useTranslation();return n.jsxs("div",{className:`accordion-item ${a?"accordion-item--open":""} ${u}`.trim(),role:"listitem",children:[n.jsxs("div",{className:"accordion-item__header",role:"button",tabIndex:0,"aria-expanded":a,"data-accordion-header":!0,onClick:r,onKeyDown:d=>{if(d.key==="Enter"||d.key===" ")d.preventDefault(),r?.();else if(d.key==="ArrowDown"||d.key==="ArrowUp"){d.preventDefault();const m=d.currentTarget.closest('[role="list"]');if(!m)return;const p=Array.from(m.querySelectorAll("[data-accordion-header]")),C=p.indexOf(d.currentTarget);(d.key==="ArrowDown"?p[C+1]:p[C-1])?.focus()}},children:[l&&n.jsx("div",{className:"accordion-item__avatar",children:l}),n.jsx("div",{className:`accordion-item__title ${s}`,children:e}),n.jsx("div",{className:"accordion-item__chevron",children:n.jsx(tt,{icon:a?"chevron-up":"chevron-down",label:a?c("accordion.collapse","\uC811\uAE30"):c("accordion.expand","\uD3BC\uCE58\uAE30"),className:"accordion-item__chevron-icon",imgClassName:"accordion-item__chevron-image"})})]}),a&&n.jsx("div",{className:`accordion-item__body ${i}`,children:typeof t=="string"?n.jsx("p",{children:t}):t})]})}function Wy({items:e=[],defaultOpenIndex:t=0,size:a=72,className:r="",bodyClassName:l}){const[s,i]=o.useState({index:t}),u=(c,d)=>s.id!=null&&c.id!=null?c.id===s.id:s.id==null&&d===s.index;return n.jsx("div",{className:`accordion-group accordion-group--s${a} ${r}`.trim(),role:"list",children:e.map((c,d)=>n.jsx(zy,{title:c.title,body:c.body,avatar:c.avatar,open:u(c,d),onToggle:()=>i(u(c,d)?{index:-1}:{index:d,id:c.id}),bodyClassName:l},c.id??d))})}function Hy(){return n.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n.jsx("polyline",{points:"2,6 5,9 10,3"})})}function Vy(){return n.jsxs("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:[n.jsx("line",{x1:"3",y1:"3",x2:"9",y2:"9"}),n.jsx("line",{x1:"9",y1:"3",x2:"3",y2:"9"})]})}function qy(){return n.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:n.jsx("line",{x1:"2.5",y1:"6",x2:"9.5",y2:"6"})})}function Lt(e){const{t}=_e.useTranslation(),{type:a="bar",size:r,className:l="","aria-label":s,"aria-hidden":i}=e;if(a==="dot"){const{icon:B,number:y,position:w="top-right",onClick:A,animate:E=!1}=e,D=B??"check",N=y!==void 0?"number":D,F=typeof r=="number"?r:32,R=we("circle-badge",`circle-badge--${N}`,`circle-badge--${w}`,`circle-badge--${F}`,E?"circle-badge--animate":"",A?"circle-badge--clickable":"",l),K=y!==void 0?t("badge.nthSelected",{n:y,defaultValue:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"}):{check:t("badge.selected","\uC120\uD0DD\uB428"),remove:t("badge.remove","\uC81C\uAC70"),minus:t("badge.exclude","\uC81C\uC678")}[D];return n.jsxs("span",{className:R,onClick:A,onKeyDown:A?L=>{L.key!=="Enter"&&L.key!==" "||(L.preventDefault(),L.currentTarget.click())}:void 0,"aria-label":i?void 0:s??K,"aria-hidden":i||void 0,role:A?"button":i?void 0:"img",tabIndex:A?0:void 0,children:[y!==void 0&&y,y===void 0&&D==="check"&&n.jsx(Hy,{}),y===void 0&&D==="remove"&&n.jsx(Vy,{}),y===void 0&&D==="minus"&&n.jsx(qy,{})]})}const{label:u,children:c,variant:d="default",fill:m="filled",minWidth:p,iconLeft:C,iconRight:b,color:x}=e,f=typeof r=="number"?"medium":r??"medium",h={small:"caption-2b",medium:"body-3b",large:"body-2b"}[f]??"body-2b",_={small:12,medium:14,large:16}[f]??14,g=we("badge",`badge--${d}`,`badge--${f}`,m!=="filled"?`badge--${m}`:"",h,l),k=x?.startsWith("--")?`var(${x})`:x,v=p!==void 0||k?{...p!==void 0?{minWidth:typeof p=="number"?`${p}px`:p}:{},...k?{"--badge-color":k}:{}}:void 0;return n.jsxs("span",{className:g,style:v,"aria-label":i?void 0:s,role:s&&!i?"img":void 0,"aria-hidden":i||void 0,children:[C&&n.jsx(tt,{icon:C,size:_,className:"badge__icon"}),u??c,b&&n.jsx(tt,{icon:b,size:_,className:"badge__icon"})]})}function Oa({columns:e=[],onClose:t,className:a="",size:r="medium"}){const{t:l}=_e.useTranslation(),s=r==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const h=[{title:null,columns:e}];let _=e;for(const g of i){const k=_?.[g.ci]?.items?.[g.ii];if(!k||!Array.isArray(k.children)||!k.children.length)break;_=[{title:null,items:k.children}],h.push({title:k.label||null,columns:_})}return h},[e,i]),d=c[c.length-1],m=c.length-1,p=o.useCallback(()=>u(h=>h.slice(0,Math.max(0,Math.min(h.length,m)-1))),[m]),C=o.useRef(null),b=o.useRef(null),x=c.length;o.useEffect(()=>{b.current||(b.current=document.activeElement);let h=0,_=0;const g=()=>{const k=C.current?.querySelector("button:not([disabled])");if(k&&k.offsetParent){k.focus({preventScroll:!0});return}_++<20&&(h=requestAnimationFrame(g))};return h=requestAnimationFrame(g),()=>cancelAnimationFrame(h)},[x]),o.useEffect(()=>()=>{b.current?.focus?.({preventScroll:!0})},[]);const f=o.useCallback((h,_,g)=>{if(h){if(Array.isArray(h.children)&&h.children.length){u(k=>[...k.slice(0,m),{ci:_,ii:g}]);return}try{typeof h.onClick=="function"&&h.onClick()}catch{}try{h&&h.closeOnSelect&&typeof t=="function"&&t()}catch{}}},[t,m]);return n.jsxs("div",{className:`tooltip-menu tooltip-menu--${r} ${a}`,children:[(c.length>1||d.title)&&n.jsxs("div",{className:"tooltip-menu__header",children:[c.length>1?n.jsx(fe,{htmlType:"button",size:s,type:"dot",icon:"chevron-left",ariaLabel:l("common.back","\uB4A4\uB85C"),onClick:p,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:"tooltip-menu__title button-1",children:d.title})]}),n.jsx("div",{className:"tooltip-menu__columns",ref:C,children:d.columns&&d.columns.map((h,_)=>n.jsxs("div",{className:"tooltip-menu__column",children:[h.title?n.jsx("div",{className:"tooltip-menu__column-title body-3",children:h.title}):null,n.jsx("div",{className:"tooltip-menu__items",children:(h.items||[]).map((g,k)=>n.jsxs(o.Fragment,{children:[g.separatorBefore&&k>0&&n.jsx("div",{className:"tooltip-menu__separator",role:"separator"}),n.jsx(fe,{htmlType:"button",className:"tooltip-menu__item",size:s,type:g.label?"bar":"dot",icon:g.selected?"check":g.icon||"none",rightIcon:Array.isArray(g.children)&&g.children.length?"chevron-right":g.badgeCount?n.jsx(Lt,{type:"dot",position:"inline",number:Math.min(g.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:g.label,ariaLabel:g.label&&g.badgeCount&&g.badgeCount>0?l("nav.badgeLabel",{label:g.label,count:g.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):g.label,onClick:()=>f(g,_,k),selected:g.selected,disabled:g.disabled,showTooltipInfo:g.tooltip||!1,useBorder:!1,align:"left"})]},k))})]},_))})]})}const Wi=".content-area";function Do(e,t="Nav"){try{const a=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Wi);if(a){a.scrollTop=0;return}const r=document.scrollingElement??document.documentElement;r&&r.scrollHeight<=r.clientHeight&&Rt("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Wi}) \u2014 \uCC3D\uB3C4 \uAD6C\uB97C \uC218 \uC5C6\uC5B4 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4. scrollContainer \uB85C \uD1B5\uC744 \uC54C\uB824 \uC900\uB2E4.`),window.scrollTo({top:0})}catch{}}const So=52,cr=10,Hi=e=>e&&e>0?e:0;function Vi({items:e=[],activeKey:t,onChange:a,appMode:r,onAppModeChange:l,moreItems:s=[],scrollContainer:i}){const{t:u}=_e.useTranslation(),c=r==="manager"?"malgwi":"manager",d=r==="manager"?"arrow-left":"arrow-right",m=r==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),p=o.useRef(null),[C,b]=o.useState(0),x=e.length;o.useEffect(()=>{const P=p.current;if(!P)return;const V=()=>{const S=typeof getComputedStyle=="function"?getComputedStyle(P):null,M=P.clientWidth-(parseFloat(S?.paddingLeft??"")||0)-(parseFloat(S?.paddingRight??"")||0),I=P.querySelector(".bottom-nav__left"),Z=I?.nextElementSibling,le=(I?.offsetWidth??0)+(I&&Z?.classList.contains("bottom-nav__divider")?Z.offsetWidth:0);b(Math.max(0,M-le))};if(V(),typeof ResizeObserver>"u")return;const W=new ResizeObserver(V);W.observe(P);const G=P.querySelector(".bottom-nav__left");return G&&W.observe(G),()=>W.disconnect()},[l]);const f=So+1,h=P=>Math.max(0,Math.floor((P+cr)/(So+cr))),_=x*(So+cr)-cr<=C,g=C<=0||s.length===0&&_?x:Math.min(x,h(C-f)),k=C>0&&g<x,v=k?g:x,B=e.slice(0,v),y=e.slice(v),w=k||s.length>0,A=o.useCallback((P,V)=>({position:"fixed",bottom:window.innerHeight-P.top+8,right:window.innerWidth-P.right,zIndex:Ia(V)}),[]),E=o.useId(),{open:D,toggle:N,close:F,style:R,triggerRef:K,menuRef:L}=Fa({computeStyle:A,onScroll:"ignore",onResize:"reposition"}),$=o.useCallback((P,V)=>V>0?u("nav.badgeLabel",{label:P,count:V,defaultValue:"{{label}}, {{count}}\uAC1C"}):P,[u]),T=o.useCallback((P,V)=>V>0?u("nav.badgeInsideLabel",{label:P,count:V,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):P,[u]),J=o.useCallback(()=>l?.(c),[l,c]),q=o.useMemo(()=>y.find(P=>!!P.key&&P.key===t)??s.find(P=>P.selected||P.key&&P.key===t),[y,t,s]),O=o.useMemo(()=>[{items:[...y.map(P=>({label:P.label,icon:P.icon,badgeCount:P.badgeCount,selected:!!P.key&&P.key===t,closeOnSelect:!0,disabled:P.state==="disabled",onClick:()=>{P.state!=="disabled"&&(P.key&&a&&(a(P.key),Do(i,"BottomNav")),F())}})),...s.map(P=>({label:P.label,icon:P.icon,badgeCount:P.badgeCount,selected:P.selected??(!!P.key&&P.key===t),closeOnSelect:!0,onClick:()=>{P.onClick?.(),F()}}))]}],[y,s,t,a,F]),Q=[...y,...s].reduce((P,V)=>P+Hi(V.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:p,"aria-label":u("nav.bottomNav","\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158"),children:[l&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__left",children:n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:d,ariaLabel:m,className:"bottom-nav-item",onClick:J})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:B.map((P,V)=>{const W=Hi(P.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:P.icon,ariaLabel:$(P.label,W),selected:!!P.key&&P.key===t,disabled:P.state==="disabled",className:"bottom-nav-item",onClick:()=>{P.key&&(a?.(P.key),Do(i,"BottomNav"))}}),W>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Lt,{type:"dot",position:"top-right",number:Math.min(W,99),size:24})})]},P.key??`__slot-${V}`)})}),w&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"}),n.jsx("div",{className:"bottom-nav__right",children:n.jsxs("div",{ref:K,className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:q?.icon??"ellipsis",ariaLabel:T(q?.label??u("nav.more","\uB354\uBCF4\uAE30"),Q),selected:!!q,className:"bottom-nav-item",onClick:N,"aria-expanded":D,"aria-controls":D?E:void 0}),Q>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Lt,{type:"dot",position:"top-right",number:Math.min(Q,99),size:24})}),D&&cn.createPortal(n.jsx("div",{id:E,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:"tooltip-content",style:R,ref:L,children:n.jsx(Oa,{columns:O,onClose:F})}),document.body)]})})]})]})}function qi(e){if(typeof e!="string")return!1;let t="";for(const r of e){const l=r.charCodeAt(0);l<=32||l>=127&&l<=159||(t+=r)}if(!t)return!1;const a=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(t);return a?["http","https","mailto","tel"].includes(a[1].toLowerCase()):!0}function Ui(e,t,a){return a&&a>0?e("nav.badgeLabel",{label:t,count:a,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function Uy(e){const{t}=_e.useTranslation(),{activeKey:a,unreadCount:r,onDebug:l,onNotification:s,onSetting:i,onHelp:u,onFeedback:c,onAccount:d}=e||{},m="default";return l||s||i||u||c||d?n.jsxs("div",{className:"side-nav__footer",children:[l&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:l,selected:a==="debug"}),s&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"bell",ariaLabel:Ui(t,t("nav.notifications","\uC54C\uB9BC"),r),onClick:s,selected:a==="notifications"}),!!r&&r>0&&n.jsx(Lt,{type:"dot",number:Math.min(r,99),size:24,"aria-hidden":!0})]}),i&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"settings",ariaLabel:t("nav.settings","\uC124\uC815"),onClick:i,selected:a==="settings"}),u&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"message-circle-question-mark",ariaLabel:t("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:u,selected:a==="help"}),c&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"bug",ariaLabel:t("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:c,selected:a==="feedback"}),d&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:d,selected:a==="account"})]}):null}function Gi(e){const{t}=_e.useTranslation(),{item:a,itemKey:r,label:l,icon:s,active:i,onClick:u,style:c,state:d,labelStyle:m}=e||{},p=a?.key??r??"",C=a?.label??l??"",b=a?.icon??s??"",x=a?.badge??0,f=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(tt,{icon:b,label:typeof C=="string"?C:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),h=d==="disabled",_=`side-nav__item ${i?"active":""} ${d||""} ${h?"disabled":""} ${a?.child?"side-nav__item--child":""}`,g=o.useCallback(k=>{if(h)return;const v=k.detail>0;if(v)try{k.currentTarget.blur()}catch{}u?.(p,k.currentTarget,v)},[h,p,u]);return n.jsxs("button",{type:"button",className:_,onClick:g,"aria-label":typeof C=="string"?Ui(t,C,x):void 0,"aria-current":i?"page":void 0,style:c,"aria-disabled":h,children:[f,n.jsx("span",{className:"side-nav__label button-1 f",style:m,children:C}),x>0&&n.jsx(Lt,{type:"dot",position:"inline",number:Math.min(x,99),size:24,"aria-hidden":!0}),d==="loading"&&n.jsx("span",{className:"side-nav__spinner",role:"img","aria-label":t("loader.loading","\uBD88\uB7EC\uC624\uB294 \uC911\u2026")})]})}function Ki(e){const{t}=_e.useTranslation(),{items:a=[],activeKey:r,onChange:l,unreadCount:s,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p,appMode:C,onAppModeChange:b,scrollContainer:x}=e||{},f=C==="manager",h=o.useCallback(()=>b?.(f?"malgwi":"manager"),[b,f]),_=o.useRef(null),[g,k]=o.useState(null);o.useEffect(()=>{const A=_.current;if(!A)return;let E=null;const D=()=>{const{scrollHeight:R,clientHeight:K,scrollTop:L}=A;if(R<=K+1){k(O=>O===null?O:null);return}const $=Math.max(24,K/R*K),T=K-$,J=R-K,q={top:Math.round(L/J*T),height:Math.round($)};k(O=>O&&O.top===q.top&&O.height===q.height?O:q)},N=()=>{if(typeof requestAnimationFrame>"u"){D();return}E===null&&(E=requestAnimationFrame(()=>{E=null,D()}))};D(),A.addEventListener("scroll",N,{passive:!0});const F=typeof ResizeObserver<"u"?new ResizeObserver(N):null;F?.observe(A);for(const R of Array.from(A.children))F?.observe(R);return()=>{E!==null&&cancelAnimationFrame(E),A.removeEventListener("scroll",N),F?.disconnect()}},[a]);const v=o.useRef(null),B=o.useCallback(A=>{const E=_.current;E&&(A.preventDefault(),v.current={y:A.clientY,top:E.scrollTop},A.currentTarget.setPointerCapture(A.pointerId))},[]),y=o.useCallback(A=>{const E=_.current,D=v.current;!E||!D||(E.scrollTop=D.top+(A.clientY-D.y)*(E.scrollHeight/E.clientHeight))},[]),w=o.useCallback(A=>{v.current=null,A.currentTarget.hasPointerCapture(A.pointerId)&&A.currentTarget.releasePointerCapture(A.pointerId)},[]);return n.jsxs("nav",{ref:_,"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[g&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:g.top,height:g.height},onPointerDown:B,onPointerMove:y,onPointerUp:w,onPointerCancel:w})}),n.jsxs("div",{className:"side-nav__menu-list",children:[(a||[]).filter(A=>!A.section&&(A.key||A.label)).map((A,E)=>n.jsxs(o.Fragment,{children:[A.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(Gi,{item:A,active:!!A.key&&A.key===r,state:A.disabled?"disabled":void 0,onClick:(D,N,F)=>{if(A.disabled)return;if(A.href){if(qi(A.href)&&window.open(A.href,"_blank","noopener,noreferrer"),F)try{N?.blur()}catch{}return}if(l?.(A.key),Do(x,"SideNav"),!F)return;try{N?.blur()}catch{}if(typeof window<"u"&&window.matchMedia){if(!window.matchMedia("(min-width: 768px) and (max-width: 1023px)").matches)return}else return;const R=document.querySelector(".header");if(R){const K=typeof R.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&K&&R.matches(":hover"))){R.classList.add("header--force-collapsed");const L=()=>{R.classList.remove("header--force-collapsed"),R.removeEventListener("mouseenter",L)};R.addEventListener("mouseenter",L)}}}})]},A.key??`side-nav__item-${E}`)),b&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),b&&n.jsx(Gi,{item:{key:"__mode-switch__",label:f?t("nav.goToMalgwi","\uB9D0\uADC0\uB85C \uC774\uB3D9"):t("nav.goToManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9"),icon:f?"arrow-left":"arrow-right"},onClick:h})]}),n.jsx(Uy,{activeKey:r,unreadCount:s,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p})]})}var dr='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEar_ko" xmlns="http://www.w3.org/2000/svg" width="583.33" height="240" viewBox="0 0 583.33 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',jo='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEarManager_ko" xmlns="http://www.w3.org/2000/svg" width="1035.43" height="240" viewBox="0 0 1035.43 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/><path d="M644.64,52.32v131.48h-58.24V52.32h58.24ZM634.45,173.81V62.32h-38.25v111.49h38.25ZM713.65,193.61h-10.19v-75.16h-28.64v72.66h-10V46.94h10v61.32h28.64v-62.28h10.19v147.63Z"/><path d="M819.46,171.6c6.6-1.35,12.08-3.11,16.44-5.29v10.19c-4.23,2.31-9.64,4.1-16.24,5.38-6.6,1.28-13.3,1.92-20.09,1.92h-57.28V51.36h10.57v122.25h46.71c6.66,0,13.29-.67,19.89-2.02ZM851.47,193.8V45.98h10.57v147.63l-10.57.19Z"/><path d="M935.66,113.64l48.44,62.28-8.27,6.34-43.06-56.13c-4.36,16.66-10.38,29.92-18.07,39.79-7.69,9.87-16.72,15.83-27.1,17.88v-10.76c8.71-2.05,16.21-8.07,22.49-18.07,6.28-10,11.05-22.97,14.32-38.92,3.27-15.95,5.03-33.86,5.29-53.73h-39.21v-10h88.61v10h-39.02c-.13,18.84-1.6,35.95-4.42,51.32ZM1015.43,193.61h-10.38v-79.39h-37.87v-10.19h37.87v-58.05h10.38v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',Gy='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_SpeechEar" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>';function Yi({appMode:e}){const{t}=_e.useTranslation(),a=e==="manager",r=a?jo:dr,l=Gy;return n.jsxs("div",{className:"brand-identity__root","aria-label":t("header.biArea","BI \uC601\uC5ED"),children:[n.jsx("img",{src:l,alt:t("header.biSymbol","BI \uC2EC\uBCFC"),className:"brand-identity__image brand-identity__image--symbol"}),n.jsx("img",{src:r,alt:a?t("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):t("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0"),className:"brand-identity__image brand-identity__image--logo"})]})}function Zi({activeKey:e,onChange:t,items:a,malgwiItems:r,managerItems:l,unreadCount:s,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p,appMode:C,onAppModeChange:b,scrollContainer:x}){const{t:f}=_e.useTranslation(),h=Cn("(max-width: 767px)"),_=o.useMemo(()=>(a??[]).filter(R=>!R.section&&(R.key||R.label)).map(R=>({key:R.key,label:typeof R.label=="string"?R.label:void 0,icon:R.icon,state:R.disabled?"disabled":void 0,badgeCount:R.badge})),[a]),g=o.useCallback(R=>{const K=a?.find(L=>L.key===R);if(!K?.disabled){if(K?.href){qi(K.href)&&window.open(K.href,"_blank","noopener,noreferrer");return}t?.(R)}},[a,t]),k=o.useMemo(()=>{const R=[];return i&&R.push({key:"debug",icon:"terminal",label:f("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),u&&R.push({key:"notifications",icon:"bell",label:f("nav.notifications","\uC54C\uB9BC"),badgeCount:s,onClick:u}),d&&R.push({key:"settings",icon:"settings",label:f("nav.settings","\uC124\uC815"),onClick:d}),m&&R.push({key:"help",icon:"message-circle-question-mark",label:f("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:m}),p&&R.push({key:"feedback",icon:"bug",label:f("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:p}),c&&R.push({key:"account",icon:"user-round",label:f("nav.account","\uACC4\uC815"),onClick:c}),R},[f,i,u,d,m,p,c,s]),v=o.useCallback((R,K)=>({position:"fixed",top:R.bottom+8,right:Math.max(8,window.innerWidth-R.right),zIndex:Ia(K)}),[]),B=o.useId(),{open:y,toggle:w,close:A,style:E,triggerRef:D,menuRef:N}=Fa({computeStyle:v,onScroll:"ignore",onResize:"reposition"}),F=o.useMemo(()=>[{items:k.map(R=>({label:R.label,icon:R.icon,badgeCount:R.badgeCount,selected:R.selected??(!!R.key&&R.key===e),closeOnSelect:!0,onClick:()=>{R.onClick?.(),A()}}))}],[k,e,A]);return n.jsxs("aside",{className:`header${C==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(Yi,{appMode:C}),n.jsxs("div",{className:"header__menu-button",ref:D,children:[n.jsx(fe,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:u&&s&&s>0?f("nav.badgeInsideLabel",{label:f("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:s,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):f("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:w,"aria-expanded":y,"aria-controls":y?B:void 0}),!!u&&!!s&&s>0&&n.jsx(Lt,{type:"dot",number:Math.min(s,99),size:24,"aria-hidden":!0}),y&&cn.createPortal(n.jsx("div",{id:B,role:"group","aria-label":f("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:"tooltip-content",style:E,ref:N,children:n.jsx(Oa,{columns:F,onClose:A})}),document.body)]})]}),n.jsx(Ki,{scrollContainer:x,items:a,activeKey:e??void 0,onChange:t,unreadCount:s,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p,appMode:C,onAppModeChange:b}),h&&n.jsx(Vi,{items:_,activeKey:e??void 0,onChange:g,scrollContainer:x,appMode:C,onAppModeChange:b})]})}const Ky=Zi,Yy=()=>Vt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function Xi(e){if(!(e==null||e==="")){if(typeof e=="string"&&/^\s*\d[\d,]*\s*$/.test(e)){const t=Number(e.replace(/[,\s]/g,""));if(Number.isFinite(t))return ia(`${t.toLocaleString("ko-KR")}\uC6D0`)}return ia(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function Zy(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function Xy(e){if(e.durationDays&&e.durationDays>0){const s=e.durationDays;return s%365===0?`${s/365}\uB144`:`${s}\uC77C`}const t=(e.code??"").match(/(\d+)(d|y)\b/i);if(t)return t[2].toLowerCase()==="y"?`${t[1]}\uB144`:`${t[1]}\uC77C`;const a=e.name??"",r=a.match(/(\d+\s*(?:년|개월|주|일))\s*(?:이용권)?\s*$/);if(r)return r[1].replace(/\s+/g,"");const l=a.match(/(\d+)\s*-?\s*(day|year)s?\b/i);return l?l[2].toLowerCase()==="year"?`${l[1]}\uB144`:`${l[1]}\uC77C`:a||Yy()}function Jy(e){const t=(e??"").match(/(\d+)(d|y)\b/i);if(!t)return null;const a=Number(t[1]);return t[2].toLowerCase()==="y"?a*365:a}function Ji(e){return{type:e.type??Zy(e),plan:Xy(e),label:e.label,price:Xi(e.price),originalPrice:Xi(e.originalPrice),discountLabel:e.discountLabel}}var Qy='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEar_ko_mono" xmlns="http://www.w3.org/2000/svg" width="583.33" height="240" viewBox="0 0 583.33 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z" fill="%23fff"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z" fill="%23fff"/></g><g id="symbol"><g opacity=".5"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',e2='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEarManager_ko_mono" xmlns="http://www.w3.org/2000/svg" width="1035.43" height="240" viewBox="0 0 1035.43 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z" fill="%23fff"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z" fill="%23fff"/><path d="M644.64,52.32v131.48h-58.24V52.32h58.24ZM634.45,173.81V62.32h-38.25v111.49h38.25ZM713.65,193.61h-10.19v-75.16h-28.64v72.66h-10V46.94h10v61.32h28.64v-62.28h10.19v147.63Z" fill="%23fff"/><path d="M819.46,171.6c6.6-1.35,12.08-3.11,16.44-5.29v10.19c-4.23,2.31-9.64,4.1-16.24,5.38-6.6,1.28-13.3,1.92-20.09,1.92h-57.28V51.36h10.57v122.25h46.71c6.66,0,13.29-.67,19.89-2.02ZM851.47,193.8V45.98h10.57v147.63l-10.57.19Z" fill="%23fff"/><path d="M935.66,113.64l48.44,62.28-8.27,6.34-43.06-56.13c-4.36,16.66-10.38,29.92-18.07,39.79-7.69,9.87-16.72,15.83-27.1,17.88v-10.76c8.71-2.05,16.21-8.07,22.49-18.07,6.28-10,11.05-22.97,14.32-38.92,3.27-15.95,5.03-33.86,5.29-53.73h-39.21v-10h88.61v10h-39.02c-.13,18.84-1.6,35.95-4.42,51.32ZM1015.43,193.61h-10.38v-79.39h-37.87v-10.19h37.87v-58.05h10.38v147.63Z" fill="%23fff"/></g><g id="symbol"><g opacity=".5"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',Qi='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_IHAB_mono" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="%23fff"/></svg>';const Zn={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},To=new WeakMap;function t2(e){if(e)return To.get(e)}function jn(e,t){e&&(e.style.setProperty(Zn.text,t.text),e.style.setProperty(Zn.sub,t.sub),t.copyrightColor&&e.style.setProperty(Zn.copyright,t.copyrightColor),To.set(e,t))}function Tn(e){e&&(e.style.removeProperty(Zn.text),e.style.removeProperty(Zn.sub),e.style.removeProperty(Zn.copyright),To.delete(e))}const eu={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function tu(e={}){const t=Mt(eu,jn,Tn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-two-circle","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-two-circle__c1"}),n.jsx("div",{className:"pass-card-bg-two-circle__c3"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-two-circle__symbol",style:{"--symbol-url":`url("${Qi}")`}})]})}const nu="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71Z",pa=240;var za='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_IHAB" xmlns="http://www.w3.org/2000/svg" width="240" height="240" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 240 240"><defs><linearGradient id="linear-gradient" x1="62.99" y1="62.99" x2="190.71" y2="190.71" gradientUnits="userSpaceOnUse"><stop offset=".2" stop-color="%23499cdf"/><stop offset=".8" stop-color="%234dcdc0"/></linearGradient></defs><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="url(%23linear-gradient)"/></svg>';const n2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},a2=100,r2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function au(e={}){const t=Mt(n2,jn,Tn),a="var(--color-main)",r=270,l=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:r2.map(({scale:s,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${l}) scale(${s*a2/pa}) translate(${-pa/2} ${-pa/2})`,opacity:i,children:n.jsx("path",{d:nu,fill:"none",stroke:a,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move__symbol",style:{"--symbol-url":`url("${za}")`}})]})}const o2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},s2=100,l2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function i2(e={}){const t=Mt(o2,jn,Tn),a="#ffffff",r=270,l=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move-v1","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move-v1__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:l2.map(({scale:s,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${l}) scale(${s*s2/pa}) translate(${-pa/2} ${-pa/2})`,opacity:i,children:n.jsx("path",{d:nu,fill:"none",stroke:a,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move-v1__symbol",style:{"--symbol-url":`url("${Qi}")`}})]})}const u2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function c2(e={}){const t=Mt(u2,jn,Tn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-talk","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--left"}),n.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--right"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk__symbol",style:{"--symbol-url":`url("${za}")`}})]})}const d2={Logo_SpeechEar_ko:{"":dr,_mono:Qy},Logo_SpeechEarManager_ko:{"":jo,_mono:e2}};function p2(e,t){if(e)return d2[e]?.[t??""]??void 0}const m2={speechear:dr,manager:jo},h2={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},ru=10;function C2(e){return e<=0?0:e>=86400?Math.floor(e/86400)*86400:e>=3600?Math.floor(e/3600)*3600:e>=60?Math.floor(e/60)*60:Math.floor(e)}function ou(e,t){if(e<=0)return t("passCard.remainingSecond",{n:0});const a=Math.floor(e/86400);if(a>0)return t("passCard.remainingDay",{n:a});const r=Math.floor(e/3600);if(r>0)return t("passCard.remainingHour",{n:r});const l=Math.floor(e/60);return l>0?t("passCard.remainingMinute",{n:l}):t("passCard.remainingSecond",{n:Math.floor(e)})}function f2(e,t,a){if(e==="manager"){const r=/년/.test(t)||/yr|year/i.test(t)||/1년|365/.test(t),l=a==="\uC624\uD508\uD2B9\uAC00"||a===Vt.t("passCard.specialLabel");return r?n.jsx(c2,{}):l?n.jsx(i2,{}):n.jsx(au,{})}return n.jsx(tu,{})}function su({ariaLabel:e,product:t,showPrice:a=!1,plan:r,type:l,endDate:s,remainingSeconds:i,endInclusive:u=!1,state:c="active",bg:d,bgOnly:m=!1,textColor:p,subColor:C,copyrightColor:b,logoSrc:x,label:f,price:h,originalPrice:_,discountLabel:g,onUse:k,onRefund:v,onDelete:B}){const{t:y}=_e.useTranslation(),w=t?Ji(t):void 0,A=l??w?.type??"speechear",E=r??w?.plan??y("passCard.planSuffix","\uC774\uC6A9\uAD8C"),D=f??w?.label,N=h??(a?w?.price:void 0),F=_??(a?w?.originalPrice:void 0),R=g??w?.discountLabel,K=o.useMemo(()=>{if(N)return null;const H=t?.durationDays??Jy(t?.code);if(!H||H<=0)return i!=null?{percent:null,remainingLabel:ou(i,y)}:null;const U=H*86400;let pe;if(i!=null)pe=i;else if((c==="active"||c==="expired")&&s){const me=new Date(s).getTime();if(Number.isNaN(me))return null;const ie=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(s)),be=/^(\d{4})-(\d{2})-(\d{2})/.exec(La()),he=Math.round(ie&&be?(Date.UTC(+ie[1],+ie[2]-1,+ie[3])-Date.UTC(+be[1],+be[2]-1,+be[3]))/864e5:(me-Date.now())/864e5);pe=Math.max(0,u?he+1:he)*86400}else c==="expired"?pe=0:pe=U;const Ee=C2(pe),ge=Math.max(0,Math.min(100,Math.floor(Math.min(Ee,U)/U*100)));return c==="pending"&&ge>=100?null:{percent:ge,remainingLabel:c==="expired"?y("passCard.expired","\uB9CC\uB8CC\uB428"):ou(pe,y)}},[N,c,s,i,u,t?.durationDays,t?.code,y]),L=o.useRef(null),[$,T]=o.useState({}),[J,q]=o.useState(null),O=!!(k||v||B),Q=o.useRef(!1),P=o.useRef(void 0),[V,W]=o.useState(x);o.useLayoutEffect(()=>{W(x)},[x]),o.useLayoutEffect(()=>{const H=L.current;H&&(p!==void 0&&H.style.setProperty("--pass-card-text",p),C!==void 0&&H.style.setProperty("--pass-card-sub",C),b!==void 0&&H.style.setProperty("--pass-card-copyright",b))},[p,C,b]),o.useLayoutEffect(()=>{const H=L.current;if(!H)return;const U=t2(H);if(!x){const pe=h2[A],Ee=c==="expired"?"_mono":U?.logoColor??"",ge=p2(pe,Ee);W(ge)}},[d,x,A,c]);const G=H=>{const U=L.current;if(!U)return null;const{left:pe,top:Ee,width:ge,height:me}=U.getBoundingClientRect(),ie=(H.clientX-pe)/ge-.5;return{rotateX:-((H.clientY-Ee)/me-.5)*ru,rotateY:ie*ru}},S=(H,U)=>{const pe=U*-.7,Ee=H*.7+10,ge=20+(Math.abs(H)+Math.abs(U))*.4;return`${pe}px ${Ee}px ${ge}px rgba(0, 0, 0, 0.18)`},M=o.useCallback(H=>{if(da())return;Q.current=!0,clearTimeout(P.current),P.current=setTimeout(()=>{Q.current=!1},200);const U=G(H);U&&T({transform:`perspective(800px) rotateX(${U.rotateX}deg) rotateY(${U.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(U.rotateX,U.rotateY),transition:"transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.25s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),I=o.useCallback(H=>{if(da())return;const U=G(H);if(!U)return;const pe=Q.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";T({transform:`perspective(800px) rotateX(${U.rotateX}deg) rotateY(${U.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(U.rotateX,U.rotateY),transition:pe})},[]),Z=o.useCallback(()=>{clearTimeout(P.current),Q.current=!1,T({transform:"perspective(800px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.08)",transition:"transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),le=o.useCallback(()=>q(null),[]),oe=o.useMemo(()=>{const H=y("passCard.planSuffix","\uC774\uC6A9\uAD8C"),U=E.replace("\uC774\uC6A9\uAD8C","").replace(H==="\uC774\uC6A9\uAD8C"?"":H,"").trim(),pe=U.match(/^(.*?)(일|년)$/);return pe?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:pe[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:pe[2]==="\uB144"?y("passCard.unitYear","\uB144"):y("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:U})},[E,y]),de=o.useMemo(()=>{const H=ia(N);if(!H)return null;const U=H.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!U)return n.jsx("span",{className:"h1",children:H});const[,pe,Ee,ge]=U;return n.jsxs(n.Fragment,{children:[pe&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:pe}),n.jsx("span",{className:"h1 pass-card__price-amount",children:Ee}),ge.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:ge.trim()})]})},[N]),re=o.useCallback(()=>{O&&q(H=>{if(H)return null;const U=L.current?.getBoundingClientRect();if(!U)return null;const pe=50;return{left:U.left,right:U.right,width:U.width,height:U.height,x:U.x,y:U.y+pe,top:U.top+pe,bottom:U.bottom+pe}})},[O]),z=o.useCallback(H=>{O&&(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),re())},[O,re]),ne=[{items:[...k?[{label:y("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{k(),q(null)},closeOnSelect:!0}]:[],...v?[{label:y("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{v(),q(null)},closeOnSelect:!0}]:[],...B?[{label:y("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{B(),q(null)},closeOnSelect:!0}]:[]]}];return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card-frame",children:n.jsxs("div",{ref:L,className:`pass-card pass-card--${c}${O?" pass-card--clickable":""}`,style:$,onMouseEnter:M,onMouseMove:I,onMouseLeave:Z,onPointerUp:H=>{H.pointerType==="touch"&&Z()},onPointerCancel:H=>{H.pointerType==="touch"&&Z()},onClick:re,onKeyDown:O?z:void 0,role:O?"button":void 0,tabIndex:O?0:void 0,"aria-label":e,"aria-haspopup":O?"menu":void 0,"aria-expanded":O?!!J:void 0,children:[d??f2(A,E,D),!m&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card__top",children:n.jsxs("div",{className:"pass-card__top-left",children:[n.jsx("img",{src:V??m2[A],className:"pass-card__logo",alt:A==="manager"?y("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):y("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),n.jsxs("div",{className:"pass-card__plan",children:[n.jsx("div",{children:oe}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:D?y("passCard.labeledPlan",{label:D}):y("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),N?n.jsxs("div",{className:"pass-card__price-area",children:[R&&n.jsx("span",{className:"pass-card__discount body-3",children:R}),n.jsxs("div",{className:"pass-card__price",children:[F&&n.jsx("span",{className:"pass-card__price-original body-3",children:ia(F)}),de]})]}):K?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:K.remainingLabel}),K.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:K.percent}),n.jsx("span",{className:"h5b pass-card__usage-symbol",children:"%"})]})]}):n.jsx("div",{className:"pass-card__copyright caption-2","aria-hidden":"true",children:"\xA9 IHAB Corp. All rights reserved."})]})]})}),J&&n.jsx(vn,{anchorRect:J,onClose:le,ariaLabel:y("tooltip.menu","\uBA54\uB274"),children:n.jsx(Oa,{columns:ne,onClose:le,size:"small"})})]})}const g2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function b2(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,a=Mt(g2,jn,Tn);return n.jsxs("div",{ref:a,className:"pass-card-bg pass-card-bg-sound-line","aria-hidden":"true",children:[n.jsxs("svg",{className:"pass-card-bg-sound-line__svg",viewBox:"0 0 500 300",preserveAspectRatio:"xMidYMid slice",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("defs",{children:n.jsxs("linearGradient",{id:t,x1:"0",y1:"0",x2:"1",y2:"0",children:[n.jsx("stop",{offset:"20%",stopColor:"var(--color-main)"}),n.jsx("stop",{offset:"80%",stopColor:"var(--color-sub)"})]})}),n.jsx("g",{transform:"translate(25, 45)",children:n.jsx("path",{d:"M -30 150 C 40 80, 100 220, 160 150 S 280 80, 340 150 S 460 220, 510 150",fill:"none",stroke:`url(#${t})`,strokeWidth:"50",strokeLinecap:"round"})})]}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-line__symbol",style:{"--symbol-url":`url("${za}")`}})]})}const y2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function v2(e={}){const t=Mt(y2,jn,Tn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-talk-v1","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--left"}),n.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--right"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk-v1__symbol",style:{"--symbol-url":`url("${za}")`}})]})}function x2(e,t){if(e){if(t==="manager_pro")return n.jsx(v2,{});if(t==="manager_standard")return n.jsx(b2,{});if(t==="manager_lite")return n.jsx(au,{})}}function _2(e){const t=ia(e);if(!t)return null;const a=t.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!a)return t;const[,r,l,s]=a;return n.jsxs(n.Fragment,{children:[r&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:r}),l,s.trim()&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:s.trim()})]})}function w2(e){const{t}=_e.useTranslation(),a=t("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),r=t("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:l,onSelect:s,period:i="monthly",ownedCodes:u}=e||{},c=v=>!!v&&!!u?.includes(v),d=v=>v.onceOnly??/오픈\s*특가/.test(v.label??""),m=(l.tiers||[]).some(v=>d(v)&&c(v.code)),p=v=>{const B=v.prices?v.prices[i]:v.price;return B?(l.tiers||[]).some(y=>!!y.badge&&y.originals?.[i]===B):!1},C=l.colorToken?`var(--color-${l.colorToken})`:"var(--color-gray)",b=t("payment.plan.freePrice","\uBB34\uB8CC"),x=t("payment.products.mgrEnterprise.tier.price","\uBB38\uC758"),f=v=>v.prices?v.prices[i]:v.price,h=(l.tiers||[]).length>0&&(l.tiers||[]).every(v=>{const B=f(v);return B==="\uBB34\uB8CC"||B===b||B==="0\uC6D0"||typeof B=="string"&&/\d/.test(B)&&!/[1-9]/.test(B)}),_=(l.tiers||[]).length>0&&(l.tiers||[]).every(v=>{const B=f(v);return B==="\uBB38\uC758"||B===x}),g=l.group==="org",k=g?"manager":"speechear";return n.jsxs("div",{className:"payment-plan__card",style:{borderColor:C,"--plan-color":C},children:[l.cardBadge&&n.jsx("div",{className:"payment-plan__card-badge",children:n.jsx(Lt,{label:l.cardBadge,variant:"main",size:"medium",fill:"soft"})}),n.jsxs("div",{className:"payment-plan__title",children:[n.jsx("p",{className:"payment-plan__quote body-3b",style:{color:C},children:l.quote||"\xA0"}),n.jsx("h3",{className:"payment-plan__title-heading h1",children:l.tier??l.title}),n.jsx("p",{className:"payment-plan__subtitle body-3",children:l.subtitle})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.recommendedFor","\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(l.recommendedFor||[]).map((v,B)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(tt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:C}}),v]},B))})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.features","\uD575\uC2EC \uAE30\uB2A5")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(l.features||[]).map((v,B)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(tt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:C}}),v]},B))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:h?null:_?n.jsx(fe,{htmlType:"button",className:"payment-plan__contact-button",label:t("payment.plan.contact",{defaultValue:"\uBB38\uC758\uD558\uAE30"}),variant:"main",size:56,onClick:()=>l.tiers?.[0]&&s?.({...l.tiers[0],productId:l.id,productTitle:l.title})}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"payment-plan__pricing-list",children:(l.tiers||[]).map(v=>{const B=v.label||a,y=d(v),w=y||v.openPromo===!0,A=B.replace(/^오픈\s*특가\s*/,"")||a,E=v.prices?v.prices[i]:v.price,D=v.badge?w?`${r}
|
|
823
|
-
${v.badge}`:v.badge:void 0;if(y&&c(v.code))return null;if(!v.badge&&!m)return p(v)?null:n.jsxs("div",{className:`payment-plan__pricing-row payment-plan__pricing-row--static${v.highlight?" payment-plan__pricing-row--highlight":""}`,children:[n.jsx("div",{className:"payment-plan__pricing-row-title",children:n.jsx("div",{className:"payment-plan__pricing-row-label h5b",children:v.label})}),n.jsx("div",{className:"payment-plan__pricing-row-price",children:n.jsx("span",{className:"payment-plan__pricing-current h1",children:_2(E)})})]},v.id);const N=l.tier??(g?l.title:void 0),F=n.jsx(su,{showPrice:!0,product:{type:k,code:v.code,name:A,label:N,price:E,originalPrice:v.originals?.[i]??void 0,discountLabel:D},bg:x2(g,l.id)}),R=()=>s?.({...v,productId:l.id,productTitle:l.title,preview:F});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:R,onKeyDown:s?K=>{K.target===K.currentTarget&&(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),R())}:void 0,role:s?"button":void 0,tabIndex:s?0:void 0,children:F},v.id)})})})})]})}function B2({variant:e="default"}){return n.jsxs("div",{className:`pass-card-bg pass-card-bg--${e}`,"aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--1"}),n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--2"}),n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--3"})]})}var Mo='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_IHAB_en" xmlns="http://www.w3.org/2000/svg" width="765.08" height="240" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 765.08 240"><defs><linearGradient id="linear-gradient" x1="62.99" y1="62.99" x2="190.71" y2="190.71" gradientUnits="userSpaceOnUse"><stop offset=".2" stop-color="%23499cdf"/><stop offset=".8" stop-color="%234dcdc0"/></linearGradient></defs><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="url(%23linear-gradient)"/><g id="text"><path d="M316.21,190.6h-36.74V50.61h36.74v139.99Z"/><path d="M335.16,50.61h36.74v55.11h51.63v-55.11h36.93v139.99h-36.93v-55.11h-51.63v55.11h-36.74V50.61Z"/><path d="M473.99,190.6l46.6-139.99h50.08l46.41,139.99h-39.64l-8.31-27.46h-46.99l-8.31,27.46h-39.83ZM560.62,135.3l-14.5-46.99h-1.16l-14.31,46.99h29.97Z"/><path d="M631,50.61h59.94c31.9,0,48.73,13.73,48.73,35.19,0,15.47-11.02,27.26-26.88,30.55v1.35c17.6.58,32.29,13.54,32.29,33.45,0,22.82-18.56,39.45-49.11,39.45h-64.97V50.61ZM701.77,93.53c0-8.89-6.96-13.92-17.02-13.92h-17.02v27.84h16.44c10.25,0,17.6-5.03,17.6-13.92ZM706.22,146.51c0-10.25-7.35-16.05-19.14-16.05h-19.34v30.55h18.76c13.15,0,19.72-5.03,19.72-14.5Z"/></g></svg>';const lu={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#c9c9c9"};function k2(){const e=Mt(lu,jn,Tn);return n.jsx("div",{ref:e,className:"pass-card-bg pass-card-bg-ihab","aria-hidden":"true",children:n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-ihab__symbol-top",style:{"--symbol-url":`url("${Mo}")`}})})}const iu={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function A2(e={}){const t=Mt(iu,jn,Tn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-left-color-grid","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-left-color-grid__bar"}),n.jsx("div",{className:"pass-card-bg-left-color-grid__grid"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-left-color-grid__symbol",style:{"--symbol-url":`url("${za}")`}})]})}function uu({keys:e,anchor:t="top-right",scale:a,className:r=""}){const l=Array.isArray(e)?e:[e];return n.jsx("span",{className:we("shortcut-badge",`shortcut-badge--${t}`,r),style:a===void 0?void 0:{"--shortcut-badge-scale":String(a)},children:l.map((s,i)=>n.jsxs("span",{className:"shortcut-badge__group",children:[i>0&&n.jsx("span",{className:"shortcut-badge__plus",children:"+"}),n.jsx("kbd",{className:"shortcut-badge__key",children:s})]},`${s}-${i}`))})}const Wa=(e,t,a)=>e+(t-e)*a;function N2({speakers:e,size:t=300,viewT:a=0,activeSpeakerId:r=null,playedIds:l,selectedId:s=null,answerId:i=null,showFeedback:u=!1,pulseSelected:c=!1,pulseSelectedDuration:d,pulseScale:m,clickable:p=!1,onSelectSpeaker:C,buttonSize:b=40,showIcon:x=!0,onCenterClick:f,centerLabel:h,centerDisabled:_=!1,centerAttention:g=!1,shortcutAnchor:k="top-right",shortcutScale:v,scaleShortcut:B=!1}){const{t:y}=_e.useTranslation(),w=Math.max(0,Math.min(1,a)),A=t/2,E=110/300,D=.18,N=H=>t*(E+(H-1)*D),F=H=>{const U=N(H.row??1),pe=H.angleDeg*Math.PI/180;return{x:A+U*Math.cos(pe),y:A+U*Math.sin(pe)}},R=Math.max(...e.map(H=>H.row??1),1),K=t*.08,L=t*.1,$=t*.24,T=t-2*K,J=t-L-$,q=t-$/2,O=o.useMemo(()=>[...new Set(e.map(H=>H.deg))].sort((H,U)=>H-U),[e]),Q=O.length,P=Math.max(68,Q>1?T/(Q-1):0),V=o.useMemo(()=>new Map(O.map((H,U)=>[H,U])),[O]),W=H=>{const U=V.get(H.deg)??0,pe=A+(U-(Q-1)/2)*P,Ee=R>1?Math.min(68,J/(R-1)):0,ge=Ee*(R-1),me=L+(J-ge)/2,ie=R===1?L+J*.4:me+(R-(H.row??1))*Ee;return{x:pe,y:ie}},G=H=>{const U=F(H),pe=W(H);return{x:Wa(U.x,pe.x,w),y:Wa(U.y,pe.y,w)}},S={x:A,y:Wa(A,q,w)},M=Math.round(b*1.2),I=Math.round(Math.max(16,Math.min(80,b*.7))),Z=[],le=new Map;for(const H of e){const U=H.row??1;le.has(U)||le.set(U,[]),le.get(U).push(H)}for(const[H,U]of le.entries()){if(U.length<2)continue;const pe=[...U].sort((Oe,dt)=>Oe.deg-dt.deg),Ee=pe.map(Oe=>G(Oe)),ge=pe.map(Oe=>Oe.deg),me=ge[ge.length-1]-ge[0],ie=me/(ge.length-1),be=360-me,he=pe.length>=3&&ie>0&&be<=ie*1.5,ue=Math.round(N(H)*1e3)/1e3,Me=(Oe,dt,rt,nt)=>{const pt=(dt.angleDeg-Oe.angleDeg+540)%360-180;if(pt===0)return`L ${nt.x} ${nt.y}`;if(w===0)return`A ${ue} ${ue} 0 0 ${pt>0?1:0} ${nt.x} ${nt.y}`;const Ne=(Oe.angleDeg+pt/2)*Math.PI/180,Ue={x:A+ue*Math.cos(Ne),y:A+ue*Math.sin(Ne)},ke={x:(rt.x+nt.x)/2,y:(rt.y+nt.y)/2},He={x:Wa(Ue.x,ke.x,w),y:Wa(Ue.y,ke.y,w)},Be={x:2*He.x-ke.x,y:2*He.y-ke.y};return`Q ${Be.x} ${Be.y} ${nt.x} ${nt.y}`},qe=he?[...pe,pe[0]]:pe,je=he?[...Ee,Ee[0]]:Ee;let Ve=`M ${je[0].x} ${je[0].y}`;for(let Oe=1;Oe<je.length;Oe++)Ve+=" "+Me(qe[Oe-1],qe[Oe],je[Oe-1],je[Oe]);Z.push({key:`arc-${H}`,d:Ve})}const oe=o.useMemo(()=>new Set(l??[]),[l]),de=H=>({idle:"",active:y("soundCompass.state.active","\uC18C\uB9AC \uB098\uB294 \uC911"),played:y("soundCompass.state.played","\uB4E4\uC74C"),correct:y("soundCompass.state.correct","\uC815\uB2F5"),wrong:y("soundCompass.state.wrong","\uC624\uB2F5")})[H],re=H=>{if(r===H.id)return"active";if(u){if(H.id===i)return"correct";if(H.id===s&&s!==i)return"wrong"}return oe.has(H.id)?"played":"idle"},z=H=>r===H.id?"loop":u?H.id===i?"loop":null:c&&H.id===s?"once":null,ne=(H,U)=>{switch(H){case"played":case"correct":return n.jsx(Rs,{size:U});case"wrong":return n.jsx(Us,{size:U});default:return n.jsx(qs,{size:U})}};return n.jsx("div",{className:"sound-compass",children:n.jsxs("div",{className:"sound-compass__compass-wrap",style:{width:t,height:t},children:[n.jsxs("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,className:"sound-compass__svg",children:[w===0&&e.map(H=>{const{x:U,y:pe}=G(H);return n.jsx("line",{x1:S.x,y1:S.y,x2:U,y2:pe,stroke:"#dde3ec",strokeWidth:"1"},H.id)}),Z.map(H=>n.jsx("path",{d:H.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},H.key))]}),g&&!_&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:M,height:M,left:S.x-M/2,top:S.y-M/2}}),f?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${_?" sound-compass__center--disabled":""}`,style:{width:M,height:M,left:S.x,top:S.y},"aria-label":h,"aria-disabled":_||void 0,tabIndex:_?-1:0,onClick:_?void 0:f,children:n.jsx(Ir,{size:I,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:M,height:M,left:S.x,top:S.y},children:n.jsx(Ir,{size:I,color:"currentColor",strokeWidth:1.5})}),e.map((H,U)=>{const{x:pe,y:Ee}=G(H),ge=re(H),me=z(H),ie={...v!==void 0||B?{"--shortcut-badge-scale":String(v??Math.max(.75,Math.min(3,b/56)))}:null,pointerEvents:p?"auto":"none",cursor:p?"pointer":"default",zIndex:ge!=="idle"?10:1},be=b,he=Math.round(Math.max(10,Math.min(56,be*.38))),ue=Math.round(Math.max(7,Math.min(18,be*.2))),Me=Math.round(Math.max(10,Math.min(56,be*.4))),qe=x==="answered"&&(ge==="played"||ge==="correct"||ge==="wrong"),je=x===!0||qe,Ve=!qe;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...ie,left:pe-be/2,top:Ee-be/2},children:[me&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${ge}`+(me==="once"?" sound-compass__pulse--once":""),style:{width:be,height:be,...me==="once"&&d!==void 0?{"--sc-pulse-duration-once":`${d}ms`}:null,...m!==void 0?{"--sc-pulse-scale":String(m)}:null}}),n.jsxs("button",{type:"button",tabIndex:p?0:-1,"aria-disabled":p?void 0:!0,onClick:p?()=>C?.(H.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${ge}`,style:{width:be,height:be},"aria-label":de(ge)?`${H.label}, ${de(ge)}`:H.label,"aria-pressed":s!=null?H.id===s:void 0,children:[je&&ne(ge,he),Ve&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:x===!0?ue:Me},children:U+1})]}),H.shortcut&&n.jsx(uu,{keys:H.shortcut,anchor:k,className:"sound-compass__speaker-shortcut"})]},H.id)})]})})}function E2({children:e,position:t="top-left",size:a=24,className:r=""}){return n.jsx("span",{className:we("circle-badge","circle-badge--number",`circle-badge--${a}`,`circle-badge--${t}`,r),children:e})}function D2({orientation:e="horizontal",label:t,className:a=""}){const r=we("divider",`divider--${e}`,t&&e==="horizontal"?"divider--labeled":"",a);return e==="vertical"?n.jsx("div",{className:r,role:"separator","aria-orientation":"vertical"}):t?n.jsxs("div",{className:r,role:"separator","aria-orientation":"horizontal",children:[n.jsx("span",{className:"divider__line"}),n.jsx("span",{className:"divider__label caption-1",children:t}),n.jsx("span",{className:"divider__line"})]}):n.jsx("div",{className:r,role:"separator","aria-orientation":"horizontal"})}function cu({checked:e,onChange:t,name:a,value:r,disabled:l=!1,label:s,className:i=""}){const u=o.useId();return n.jsxs("label",{className:`radio${l?" radio--disabled":""} ${i}`.trim(),htmlFor:u,children:[n.jsx("input",{id:u,type:"radio",name:a,value:r,checked:e,disabled:l,onChange:c=>t?.(c.target.checked)}),n.jsx("span",{className:"radio__dot"}),s&&n.jsx("span",{className:"radio__label body-2",children:s})]})}function S2({options:e,value:t,onChange:a,name:r,disabled:l=!1,direction:s="vertical",className:i="",ariaLabel:u}){const c=o.useId(),d=r??`radio-group-${c}`;return n.jsx("div",{className:`radio-group radio-group--${s} ${i}`.trim(),role:"radiogroup","aria-label":u,children:e.map(m=>n.jsx(cu,{name:d,value:m.value,checked:t===m.value,disabled:l||m.disabled,label:m.label,onChange:p=>{p&&a?.(m.value)}},m.value))})}const j2={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function T2({tone:e="info",title:t,message:a,children:r,dismissible:l=!1,onDismiss:s,live:i,className:u=""}){const{t:c}=_e.useTranslation(),[d,m]=o.useState(!1),p=o.useRef(null),C=o.useCallback(()=>{const g=p.current;g&&g.contains(document.activeElement)&&sr(g),m(!0),s?.()},[s]);if(d)return null;const b=we("alert",`alert--${e}`,u),x=i??(e==="danger"||e==="warning"?"assertive":"polite"),f=x==="assertive"?"alert":x==="polite"?"status":void 0,h=!!t,_=!!(a||r);return n.jsxs("div",{ref:p,className:b,role:f,children:[n.jsxs("div",{className:"alert__body",children:[n.jsxs("div",{className:"alert__header",children:[n.jsx(tt,{icon:j2[e],size:20,className:"alert__icon"}),h&&n.jsx("span",{className:"alert__title body-2",children:t}),!h&&_&&n.jsx("div",{className:"alert__message body-3",children:a||r})]}),h&&_&&n.jsx("div",{className:"alert__message alert__message--indented body-3",children:a||r})]}),l&&n.jsx("button",{type:"button",className:"alert__dismiss",onClick:C,"aria-label":c("common.close","\uB2EB\uAE30"),children:"\xD7"})]})}const M2={ready:"search",guide:"info",error:"circle-alert"};function L2(e,t){const a=t.filter(Boolean);if(a.length===0)return e;const r=[];let l=0,s=0;for(const i of a){const u=e.indexOf(i,l);u<0||(u>l&&r.push(e.slice(l,u)),r.push(n.jsx("strong",{className:"search-summary__em body-2",children:i},s++)),l=u+i.length)}return l<e.length&&r.push(e.slice(l)),r}function $2({status:e="guide",label:t,children:a,emphasis:r,icon:l,className:s=""}){const i=l===!1?null:l??M2[e],u=we("search-summary",`search-summary--${e}`,s),c=t??a,d=typeof c=="string"&&r&&r.length>0?L2(c,r):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[i!=null&&n.jsx(tt,{icon:i,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:d})]})}function Ha({title:e,items:t}){const{t:a}=_e.useTranslation(),{anchorRect:r,openAt:l,close:s}=Pa(),i=o.useRef(null),u=vo(!!r,(c,d)=>{c&&d?l(i.current?.querySelector("button")??d):s()},i);return n.jsxs("span",{ref:i,style:{display:"contents"},children:[n.jsx(fe,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!r,ariaLabel:a("common.info","\uC124\uBA85"),onPointerEnter:c=>{ca(c)||l(c.currentTarget)},onPointerLeave:c=>{ca(c)||s()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{da()||l(c.currentTarget)},onBlur:s}),r&&n.jsx(Kn,{title:e,items:t,showIndex:t.length>1,anchorRect:r,onClose:s})]})}function R2({items:e=[],value:t,onChange:a,className:r="",size:l=40}){const s=o.useId(),{t:i}=_e.useTranslation(),u=o.useRef(null),c=e.find(f=>!f.disabled)?.key,d=e.some(f=>f.key===t)?t:c??e[0]?.key,m=e.find(f=>f.key===d&&!f.disabled)?.key??c,p=()=>Array.from(u.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),C=(f,h=p())=>{if(h.length===0)return;const _=(f%h.length+h.length)%h.length;h[_]?.focus(),h[_]?.click()},b=f=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(f.key))return;f.preventDefault();const h=p(),_=h.indexOf(f.currentTarget);f.key==="ArrowRight"||f.key==="ArrowDown"?C(_+1,h):f.key==="ArrowLeft"||f.key==="ArrowUp"?C(_-1,h):f.key==="Home"?C(0,h):C(h.length-1,h)},x=e.find(f=>f.key===d);return n.jsxs("div",{className:`tabs ${r}`.trim(),children:[n.jsx("div",{ref:u,className:`tabs__list tabs__list--${l}`,role:"tablist","aria-label":i("tabs.ariaLabel","\uD0ED"),children:e.map(f=>n.jsx("button",{id:`tabs__tab-${s}-${f.key}`,type:"button",role:"tab","aria-selected":f.key===d,"aria-controls":`tabs__panel-${s}-${f.key}`,disabled:f.disabled,tabIndex:f.key===m?0:-1,className:`tabs__tab body-2${f.key===d?" tabs__tab--active":""}`,onClick:()=>{f.key!==t&&a?.(f.key)},onKeyDown:b,children:f.label},f.key))}),x&&n.jsx("div",{id:`tabs__panel-${s}-${x.key}`,role:"tabpanel","aria-labelledby":`tabs__tab-${s}-${x.key}`,tabIndex:0,className:"tabs__panel",children:x.panel},x.key)]})}const P2={xs:12,sm:16,md:20,lg:28,xl:36};function I2(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"":t.length===1?[...t[0]].slice(0,2).join("").toUpperCase():([...t[0]][0]+[...t[t.length-1]][0]).toUpperCase()}function F2({src:e,name:t,size:a="md",shape:r="circle",className:l=""}){const{t:s}=_e.useTranslation(),[i,u]=o.useState(null),c=!!e&&i===e,d=t?I2(t):"",m=!!e&&!c,p=!m&&!!d,C=t||s("avatar.ariaLabel","\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0");return n.jsxs("span",{className:`avatar avatar--${a} avatar--${r} ${l}`.trim(),role:"img","aria-label":C,children:[m&&n.jsx("img",{className:"avatar__image",src:e,alt:C,onError:()=>u(e??null)}),!m&&p&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:d}),!m&&!p&&n.jsx(tt,{icon:"user-round",size:P2[a],className:"avatar__icon"})]})}function O2(e,t){if(!t)return!0;const a=t.split(",").map(s=>s.trim()).filter(Boolean);if(a.length===0)return!0;const r=e.name.toLowerCase(),l=e.type.toLowerCase();return a.some(s=>{const i=s.toLowerCase();return i.startsWith(".")?r.endsWith(i):i.endsWith("/*")?l.startsWith(i.slice(0,-1)):l===i})}function z2({onFilesSelected:e,accept:t,multiple:a=!1,disabled:r=!1,showFileList:l=!0,files:s,onRemove:i,className:u=""}){const{t:c}=_e.useTranslation(),d=o.useRef(null),[m,p]=o.useState(!1),[C,b]=o.useState([]),x=s??C,f=y=>{if(!y||y.length===0)return;const w=Array.from(y).filter(E=>O2(E,t));if(w.length===0)return;const A=a?w:w.slice(0,1);if(s===void 0){const E=a?[...x,...A]:A;b(E),e?.(E)}else e?.(A)},h=y=>{y.preventDefault(),!r&&p(!0)},_=y=>{y.preventDefault(),p(!1)},g=y=>{y.preventDefault(),p(!1),!r&&f(y.dataTransfer.files)},k=y=>{const w=y.target;try{f(w.files)}finally{w.value=""}},v=()=>{r||d.current?.click()},B=y=>{if(!r&&(i?.(y),s===void 0)){const w=x.filter((A,E)=>E!==y);b(w),i||e?.(w)}};return n.jsxs("div",{className:`file-upload ${u}`.trim(),children:[n.jsxs("div",{className:we("file-upload__dropzone",m&&"file-upload__dropzone--dragging",r&&"file-upload__dropzone--disabled"),role:"button",tabIndex:r?-1:0,"aria-disabled":r,onClick:v,onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),v())},onDragOver:h,onDragLeave:_,onDrop:g,children:[n.jsx(tt,{icon:"upload",size:24,className:"file-upload__icon"}),n.jsx("span",{className:"file-upload__prompt body-2",children:c("fileUpload.dragPrompt","\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC")}),n.jsx("button",{type:"button",className:"file-upload__browse-button body-3",disabled:r,onClick:y=>{y.stopPropagation(),v()},children:c("fileUpload.browseButton","\uD30C\uC77C \uC120\uD0DD")}),n.jsx("input",{ref:d,type:"file",className:"file-upload__input",accept:t,multiple:a,disabled:r,onChange:k,tabIndex:-1})]}),l&&x.length>0&&n.jsx("ul",{className:"file-upload__list",children:x.map((y,w)=>n.jsxs("li",{className:"file-upload__list-item body-3",children:[n.jsx("span",{className:"file-upload__file-name body-3",children:y.name}),n.jsx("button",{type:"button",className:"file-upload__remove-button","aria-label":c("fileUpload.removeAriaLabel",{name:y.name}),disabled:r,onClick:()=>B(w),children:n.jsx(tt,{icon:"x",size:14})})]},`${y.name}-${w}`))})]})}function W2({items:e,className:t=""}){const{t:a}=_e.useTranslation();return n.jsx("nav",{className:`breadcrumb ${t}`.trim(),"aria-label":a("breadcrumb.ariaLabel","\uC774\uB3D9 \uACBD\uB85C"),children:n.jsx("ol",{className:"breadcrumb__list",children:e.map((r,l)=>{const s=l===e.length-1;return n.jsxs("li",{className:"breadcrumb__item",children:[s?n.jsx("span",{className:"breadcrumb__current body-3","aria-current":"page",children:r.label}):r.href?n.jsx("a",{className:"breadcrumb__link body-3",href:r.href,target:r.target,rel:r.rel??(r.target==="_blank"?"noopener noreferrer":void 0),onClick:r.onClick,children:r.label}):r.onClick?n.jsx("button",{type:"button",className:"breadcrumb__link body-3",onClick:r.onClick,children:r.label}):n.jsx("span",{className:"breadcrumb__text body-3",children:r.label}),!s&&n.jsx(tt,{icon:"chevron-right",size:14,className:"breadcrumb__separator"})]},l)})})})}const H2={small:14,medium:20,large:28};function V2({value:e,onChange:t,max:a=5,readOnly:r=!1,size:l="medium",ariaLabel:s,className:i=""}){const{t:u}=_e.useTranslation(),c=r||!t,[d,m]=o.useState(null),p=c?e:Number.isFinite(e)?Math.round(e):0,C=d??p,b=H2[l],x=y=>{y!==e&&t?.(y)},f=y=>{c||x(y)},h=y=>{c||da()||m(y)},_=o.useRef(null),g=y=>{const w=Math.min(a,Math.max(1,y));x(w),Array.from(_.current?.querySelectorAll("[data-star]")??[]).find(A=>A.dataset.star===String(w))?.focus()},k=y=>{if(!c){switch(y.key){case"ArrowRight":case"ArrowUp":g((p||0)+1);break;case"ArrowLeft":case"ArrowDown":g((p||1)-1);break;case"Home":g(1);break;case"End":g(a);break;default:return}y.preventDefault()}},v=p>=1&&p<=a?Math.round(p):1,B=()=>{c||m(null)};return n.jsx("div",{className:`rating rating--${l}${c?" rating--readOnly":""} ${i}`.trim(),ref:_,onKeyDown:k,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:a}):s??u("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:B,onPointerUp:y=>{y.pointerType==="touch"&&B()},onPointerCancel:y=>{y.pointerType==="touch"&&B()},children:Array.from({length:a},(y,w)=>{const A=w+1,E=Math.max(0,Math.min(1,C-w)),D=E>0&&E<1,N=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(tt,{icon:"star",size:b,className:"rating__star rating__star--empty"}),E>0&&n.jsx("span",{className:`rating__star-fill${D?" rating__star-fill--half":""}`,style:D?{width:`${E*100}%`}:void 0,children:n.jsx(tt,{icon:"star",size:b,className:"rating__star rating__star--filled"})})]});return c?n.jsx("span",{className:"rating__item","aria-hidden":"true",children:N},A):n.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":p===A,"aria-label":u("rating.starLabel",{n:A}),"data-star":A,tabIndex:A===v?0:-1,onClick:()=>f(A),onMouseEnter:()=>h(A),children:N},A)})})}const q2=20,U2=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function G2({value:e,onChange:t,palette:a=U2,size:r=40,className:l="",ariaLabel:s}){const{t:i}=_e.useTranslation();return n.jsx("div",{className:`color-picker ${l}`.trim(),role:"group","aria-label":s,children:a.map(u=>{const c=e?.toLowerCase()===u.toLowerCase();return n.jsx("button",{type:"button",className:`color-picker__swatch color-picker__swatch--${r}`,style:{backgroundColor:u},onClick:()=>t(u),"aria-pressed":c,"aria-label":c?`${u} ${i("colorPicker.selected","\uC120\uD0DD\uB428")}`:u,children:c&&n.jsx(tt,{icon:"check",size:q2,className:"color-picker__check"})},u)})})}function du({icon:e,label:t,tooltip:a,wrapperStyle:r,color:l,bgColor:s,useHover:i=!0,iconSize:u="medium"}){const{t:c}=_e.useTranslation(),d=u==="small",m=we("category-icon",d?"category-icon--small":""),p=d?16:20,C=o.useRef(null),[b,x]=o.useState(!1),f=o.useMemo(()=>{const A=r&&typeof r=="object"?{...r}:{};return!l&&!s?A:{...A,...l?{color:l,"--t-item-fg":l}:{},...s?{"--t-item-bg":s}:{}}},[r,l,s]),h=a||t,_=i&&!!h,[g,k]=o.useState(null);o.useLayoutEffect(()=>{b&&k(C.current?.getBoundingClientRect()??null)},[b]),o.useEffect(()=>{if(!i&&b)try{x(!1)}catch{}},[i,b]),o.useEffect(()=>{if(!b)return;const A=E=>{const D=C.current;if(!D)return;const N=E.target;N&&!D.contains(N)&&x(!1)};return document.addEventListener("pointerdown",A,!0),()=>document.removeEventListener("pointerdown",A,!0)},[b]);const v=o.useCallback(()=>{i&&x(!0)},[i]),B=o.useCallback(()=>{i&&x(!1)},[i]),y=o.useCallback(()=>x(!1),[]),w=o.useCallback(A=>{if(A.key==="Escape"){x(!1);return}(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),x(E=>!E))},[]);return n.jsxs("span",{ref:C,className:we("category-icon__wrap",_&&"category-icon__wrap--interactive"),onPointerEnter:v,onPointerLeave:B,onFocus:v,onBlur:B,onKeyDown:w,role:"button",tabIndex:0,"aria-label":typeof h=="string"?c("common.descriptionFor",{name:h,defaultValue:`${h} \uC124\uBA85`}):void 0,"aria-haspopup":!!h,"aria-expanded":b,"data-tooltip-ignore":!0,children:[n.jsx(tt,{icon:e,label:t,className:m,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:f,size:p}),b&&h&&n.jsx(Dn,{anchorRect:g,text:typeof h=="string"?h:void 0,offset:8,onClose:y,className:"category-icon__tooltip",ariaLabel:typeof h=="string"?h:void 0})]})}let zn=null;function pr(e){if(zn&&zn!==e)try{zn()}catch{}return zn=e,()=>{zn===e&&(zn=null)}}function mr(e){if(zn===e){zn=null;try{e()}catch{}}}function hr(e,t){let a=()=>{};const r=new Promise(u=>{a=u});if(typeof e!="string"||e.trim()===""){Rt("one-shot-empty-url","[core] playOneShot \uC5D0 \uBE48 \uC8FC\uC18C\uAC00 \uC654\uB2E4 \u2014 \uC548 \uD2BC\uB2E4. \uBD80\uB974\uB294 \uCABD\uC774 \uC8FC\uC18C\uB97C \uC5BB\uAE30 \uC804\uC5D0 \uBD88\uB800\uB2E4.",new Error("playOneShot(empty)").stack),a(!1);try{t?.(!1)}catch{}return{el:{},stop:()=>{},done:r}}let l=!1;const s=u=>{if(!l){l=!0;try{t?.(u)}catch{}a(u)}};let i;try{i=new Audio(e)}catch{return s(!1),{el:{},stop:()=>{},done:r}}i.onended=()=>s(!0),i.onerror=()=>s(!1);try{i.play().catch(()=>s(!1))}catch{s(!1)}return{el:i,stop:()=>{try{i.pause()}catch{}s(!1)},done:r}}function K2(e,t){if(!e)return{previewCodes:[],previewBucket:null};const a=e,r=i=>i.map(u=>u?.contextCode||u?.context_code).filter(Boolean).map(String);if(t==="LISTEN_IN_NOISE"){const i=a.sentences||a.items||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}if(t==="SHORT_STORY"){const i=a.items||a.sentences||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"SHORT_S"}}if(t==="LONG_STORY"){const i=a.items||a.sentences||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LONG"}}if(t==="ORDERING_SENTENCE"){const i=a.sentences||a.items||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}const l=a.sentences||a.items||[],s=r(Array.isArray(l)?l:[]);return s.length===0&&(a.contextCode||a.context_code)&&s.push(String(a.contextCode||a.context_code)),{previewCodes:s,previewBucket:null}}function Y2(e,t){const[a,r]=o.useState(!1),[l,s]=o.useState(-1),[i,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),d=o.useRef(!1),m=o.useRef(null),p=o.useRef(null),[C,b]=o.useState(!1),x=o.useRef([]),{previewCodes:f,previewBucket:h}=K2(e,t),_=`${f.join(",")}|${h??""}`,g=o.useMemo(()=>i.key===_?i.urls:[],[i,_]);o.useEffect(()=>{if(!f.length)return;let v=!1;return(async()=>{const B=[],y=[];for(const w of f)try{const A=yl(w,h);if(!A){B.push("");continue}let E=null;try{E=await vl(A)}catch{}if(!E)try{const D=await xl(A);D&&(E=URL.createObjectURL(D),y.push(E))}catch{}B.push(E??"")}catch{B.push("")}v?y.forEach(w=>{try{URL.revokeObjectURL(w)}catch{}}):(x.current.forEach(w=>{try{URL.revokeObjectURL(w)}catch{}}),x.current=y,u({key:_,urls:B}))})(),()=>{v=!0}},[f.join(","),h]),o.useEffect(()=>()=>{x.current.forEach(v=>{try{URL.revokeObjectURL(v)}catch{}}),x.current=[]},[]);const k=o.useCallback(async v=>{if(v.stopPropagation(),v.preventDefault(),d.current){m.current&&mr(m.current),d.current=!1;try{c.current?.pause()}catch{}r(!1),s(-1);return}if(!g.filter(Boolean).length)return;let B=null;const y=()=>{d.current=!1,B?.stop()};m.current=y;const w=pr(y);d.current=!0,r(!0);for(let A=0;A<g.length&&d.current;A++){const E=g[A];if(E&&(s(A),B=hr(E),c.current=B.el,!await B.done))break}w(),m.current===y&&(m.current=null,d.current=!1,r(!1),s(-1))},[g]);return o.useEffect(()=>()=>{m.current&&mr(m.current),d.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:a,playingIndex:l,previewUrls:g,previewHover:C,setPreviewHover:b,previewBtnRef:p,handlePreview:k}}const Z2=e=>{if(!e)return[];const t=typeof e.context=="string"&&e.context.trim()||typeof e.sentence=="string"&&e.sentence.trim()||typeof e.text=="string"&&e.text.trim()||"";if(t)return[String(t)];const a=e.sentences||e.items||e.questions||[];return Array.isArray(a)&&a.length>0?a.map(r=>{if(typeof r=="string")return r;if(r&&typeof r=="object"){const l=r;return l.sentence||l.text||l.context||l.question||l.title||""}return""}).filter(r=>typeof r=="string"&&r.trim().length>0).map(r=>r.trim()):[]};function Lo(e){const{index:t,type:a,trainingData:r,ariaLabel:l,depth:s,renderPopup:i,completed:u,completedIds:c,selectedIds:d,tooltipText:m,useDescriptionTooltip:p=!1,onRemove:C,hideCheckBadge:b=!1,showTypeLabel:x=!1,onComplete:f,onSelect:h,onMore:_,countLabelOverride:g,size:k="square"}=e||{},{t:v}=_e.useTranslation(),[B,y]=o.useState(!1),w=o.useRef(null),[A,E]=o.useState(!1);o.useEffect(()=>{w.current?.matches(":hover")&&E(!0)},[]);const{playing:D,playingIndex:N,previewUrls:F,previewHover:R,setPreviewHover:K,previewBtnRef:L,handlePreview:$}=Y2(r,a?.key),T=o.useCallback(()=>{h?h():y(!0)},[h]),J=o.useCallback(()=>y(!1),[]),q=o.useCallback(()=>E(!0),[]),O=o.useCallback(()=>E(!1),[]),Q=o.useCallback(()=>K(!0),[K]),P=o.useCallback(()=>K(!1),[K]),[V,W]=o.useState(null);o.useLayoutEffect(()=>{R&&W(L.current?.getBoundingClientRect()??null)},[R,L]);const[G,S]=o.useState(null);o.useLayoutEffect(()=>{A&&!B&&p&&S(w.current?.getBoundingClientRect()??null)},[A,B,p]);const M=o.useCallback(ke=>{ke.target===ke.currentTarget&&(ke.key==="Enter"||ke.key===" ")&&(ke.preventDefault(),T())},[T]),I=r||null,Z=o.useMemo(()=>{if(!p)return null;const ke=m?(Array.isArray(m)?m:[m]).filter(Boolean):null,He=ke&&ke.length>0?ke:Z2(I);return He&&He.length>0?He:null},[p,m,I]),le=o.useCallback(ke=>{ke.stopPropagation(),C?.()},[C]),oe=o.useCallback(ke=>ke.stopPropagation(),[]),de=o.useCallback(ke=>{typeof f=="function"&&f(ke)},[f]),re=u||(c&&r?.id!=null?c.has(String(r.id)):!1),z=!re&&(d!=null&&r?.id!=null?d.has(String(r.id)):!1);Li("speechear.popup.close",J);const ne=ql(),H=`${a?.label||""} ${t+1}`,U=I?.title||I?.name||H;let pe=a?.icon,Ee,ge="",me="";try{const ke=I?.category_0||I?.category_main_code||I?.category_main,He=I?.category_1||I?.category_sub_code||I?.category_sub,Be=ne.find(Se=>Se.key===ke);Be?.icon&&(pe=Be.icon),!Ee&&Be?.color&&(Ee={"--t-item-fg":Be.color}),!Ee&&I?.iconColor&&(Ee={"--t-item-fg":I.iconColor}),ge=Be?v(`topic.${Be.key}`,{defaultValue:Be.label||""}):"";try{const Se=Be?.subs?.find(Le=>Le.key===He);me=Se?v(`topic.sub.${Se.key}`,{defaultValue:Se.label||""}):""}catch{}}catch{}const ie=me?`${ge} / ${me}`:ge||a?.label||U,be=ke=>v("training.countQuestions",{n:ke,count:ke}),he=ke=>v("training.countSentences",{n:ke,count:ke});let ue="";try{if(I)if(a?.key==="LISTEN_IN_NOISE"){let ke=0;Array.isArray(I.items)&&I.items.length>0?ke=I.items.length:Array.isArray(I.sentences)&&I.sentences.length>0?ke=I.sentences.length:I.sentences&&(ke=1),ue=he(ke)}else if(a?.key==="SHORT_STORY"){let ke=1;Array.isArray(r?.items)?ke=r.items.length:Array.isArray(r?.raw&&r.raw?.items)?ke=r.raw.items.length:Array.isArray(I?.questions)?ke=I.questions.length:Array.isArray(I?.sentences)&&(ke=I.sentences.length),ue=be(ke)}else if(a?.key==="LONG_STORY"){let ke=1;if(Array.isArray(I.items)&&I.items.length>0){const He=I.items.reduce((Be,Se)=>{const Le=Se.questionItems;return Array.isArray(Le)?Be+Le.length:Array.isArray(Se.questions)?Be+Se.questions.length:Be},0);ke=He>0?He:I.items.length}else Array.isArray(I.questions)&&I.questions.length>0?ke=I.questions.length:Array.isArray(I.sentences)&&I.sentences.length>0&&(ke=I.sentences.length);ue=be(ke)}else if(a?.key==="ORDERING_SENTENCE"){let ke=1;Array.isArray(I.items)&&I.items.length>0?ke=I.items.length:Array.isArray(I.sentences)&&I.sentences.length>0&&(ke=I.sentences.length),ue=he(ke)}else Array.isArray(I.items)&&(ue=I.items.length>0?be(I.items.length):"")}catch{}const Me=k==="row",qe=k==="list"||Me,je=k==="compact",Ve=k==="small",Oe=Ve&&a?.key?$f().find(ke=>ke.key===a.key):void 0,dt=Oe?Ul[Oe.key]:void 0,rt=Oe?dt?v(`trainingType.${dt}.title`,{defaultValue:Oe.label}):Oe.label??"":"",nt=x&&a?.label&&a.label!==String(U)?String(a.label):Ve&&rt&&rt!==String(U)?rt:"",pt=!!nt,Ne=g!==void 0?g:ue,Ue=[nt,typeof U=="string"?U:"",Ne].map(ke=>String(ke??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:w,className:`training-block-button${qe?" training-block-button--list":""}${Me?" training-block-button--row":""}${je?" training-block-button--compact":""}${Ve?" training-block-button--small":""}${re?" training-block-button--completed":""}${z?" training-block-button--selected":""}${pt&&!Ve?" training-block-button--withType":""}${Ve&&!pt?" training-block-button--no-type-label":""}`,onClick:T,onPointerEnter:q,onPointerLeave:O,role:"button",tabIndex:0,onKeyDown:M,"aria-label":typeof l=="string"?l:Ue||void 0,title:!p&&m&&(Array.isArray(m)?m.filter(Boolean).join(`
|
|
824
|
-
`):m)||void 0,children:[n.jsxs("div",{className:"training-block-button__left",children:[x&&a?.label&&a.label!==String(U)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:a.label}),Ve&&rt&&rt!==String(U)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:rt}),n.jsx(du,{icon:pe,label:U,tooltip:ie,wrapperStyle:Ee,iconSize:Ve||je?"small":"medium"}),!b&&(re||z)&&!(C&&A)&&n.jsx(Lt,{className:C?"training-block-button__check--removable":void 0,type:"dot",icon:"check",position:"top-left",size:"medium","aria-label":re?v("training.completed","\uD6C8\uB828 \uC644\uB8CC"):v("training.selected","\uC120\uD0DD\uB428")}),C&&n.jsx(Lt,{className:`training-block-button__remove${A?" is-hover":""}`,type:"dot",icon:"remove",position:"top-left",size:"medium","aria-label":v("common.remove","\uC81C\uAC70"),onClick:le}),n.jsx("div",{className:`training-block-button__title ${je?"body-3":Ve?"body-3b":"h3"}`,children:String(U)}),n.jsxs("div",{className:"training-block-button__description",children:[Ne?n.jsx("div",{className:`training-block-button__count ${Ve?"caption-2":"caption-1"}`,children:Ne}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(tt,{icon:"chevron-right",label:v("training.next","\uB2E4\uC74C"),className:"training-block-button__chevron-icon",imgClassName:"training-block-button__chevron-icon-image",maskClassName:"training-block-button__chevron-icon-mask",svgClassName:"training-block-button__chevron-icon-svg",size:Ve?12:20})})]}),(qe&&!Me||Ve)&&F.length>0&&n.jsx("div",{ref:L,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:oe,onPointerEnter:Q,onPointerLeave:P,children:n.jsx(fe,{htmlType:"button",size:Ve?28:32,type:"dot",icon:D?"pause":"play",variant:Ve?"transparent-lightGray":"default",useBorder:!1,selected:D,ariaLabel:String(U).trim()?D?v("training.stopFor",{name:U,defaultValue:`${U} \uC815\uC9C0`}):v("training.previewFor",{name:U,defaultValue:`${U} \uBBF8\uB9AC \uB4E3\uAE30`}):D?v("training.stop","\uC815\uC9C0"):v("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:$})})]}),_&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:ke=>{ke.stopPropagation(),_(ke)},children:n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(U).trim()?v("common.moreFor",{name:U}):v("common.more","\uB354\uBCF4\uAE30")})})]}),R&&n.jsx(Dn,{anchorRect:V,text:D?v("training.stop","\uC815\uC9C0"):v("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:P}),A&&!B&&p&&(Z?n.jsx(Kn,{anchorRect:G,items:Z,activeIndex:N,onClose:O}):I?.subTitle?n.jsx(Dn,{anchorRect:G,text:I.subTitle,offset:8,onClose:O}):null),B&&i&&i({trainingData:I,typeKey:a?.key??"",onClose:J,onComplete:de,popupTitle:String(U),popupSubTitle:a?.subTitle,depth:s!=null?String(s):void 0,popupIcon:pe,popupIconTooltip:String(ie),popupWrapperStyle:Ee})]})}const pu=200;function X2(e){return e.itemId?(Of()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function mu({plan:e,groups:t,anchorRect:a,offset:r=12,onClose:l}){const{t:s}=_e.useTranslation(),i=o.useMemo(()=>t?t.map((c,d)=>({key:c.key??c.type?.key??String(d),label:c.label,type:c.type,data:c.items??[]})).filter(c=>c.data.length>0):Wf(s).map(c=>{const d=(e?.items??[]).filter(m=>m.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:d.length,data:d.map(X2).filter(m=>m!=null)}}).filter(c=>c.pickedCount>0),[t,e?.items,s]);if(i.length===0)return null;const u=n.jsx("div",{className:"tooltip-training__box",children:n.jsx("div",{className:"tooltip-training__groups",children:i.flatMap(({key:c,label:d,type:m,data:p},C)=>[C>0?n.jsx("div",{className:"tooltip-training__divider"},`div-${c}`):null,n.jsxs("div",{className:"tooltip-training__section",children:[n.jsx("div",{className:"tooltip-training__section-header",children:n.jsx("span",{className:"tooltip-training__type-label body-3b",children:d})}),n.jsx("div",{className:"tooltip-training__items",children:p.map((b,x)=>n.jsx(Lo,{index:x,type:m,trainingData:b,size:"compact",hideCheckBadge:!0},String(b.id??x)))})]},c)])})});return a?n.jsx(vn,{anchorRect:a,offset:r,onClose:l,closeOnOutsideClick:!1,className:"tooltip-training",ariaLabel:s("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const J2=200;function Q2({icon:e,count:t,title:a,plan:r,tooltip:l=!0,hoverAccent:s=!1,className:i="",onClick:u,onMouseEnter:c,onMouseLeave:d}){const m=!!u||!!c||l&&!!r,p=we("count-tile",m&&"count-tile--interactive",m&&s&&"count-tile--accent",u&&"count-tile--clickable",i),C=o.useRef(null),[b,x]=o.useState(null),f=o.useRef(null),h=o.useRef(null),_=!!(b&&r&&l),g=o.useCallback(()=>{f.current&&(clearTimeout(f.current),f.current=null),h.current&&(clearTimeout(h.current),h.current=null)},[]),k=o.useCallback(()=>{g(),x(null)},[g]),v=o.useCallback(()=>{!l||!r||(g(),f.current=setTimeout(()=>{f.current=null,x(C.current?.getBoundingClientRect()??null)},pu))},[l,r,g]),B=o.useCallback(()=>{f.current&&(clearTimeout(f.current),f.current=null),!h.current&&(h.current=setTimeout(()=>{h.current=null,x(null)},J2))},[]);return o.useEffect(()=>()=>{g()},[g]),o.useEffect(()=>{(!l||!r)&&k()},[l,r,k]),o.useEffect(()=>{if(!_)return;const y=A=>A instanceof Element&&(C.current?.contains(A)||!!A.closest(".tooltip-training")),w=A=>{y(A.target)?g():B()};return document.addEventListener("pointerover",w,!0),()=>document.removeEventListener("pointerover",w,!0)},[_,g,B]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:C,className:p,onClick:u?y=>{k(),u(y)}:void 0,onKeyDown:u?y=>{y.key!=="Enter"&&y.key!==" "||(y.preventDefault(),y.currentTarget.click())}:void 0,onPointerEnter:y=>{y.pointerType==="touch"||y.pointerType==="pen"?k():v()},onMouseEnter:c,onMouseLeave:y=>{B(),d?.(y)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${a} ${t}`,children:[n.jsx(tt,{icon:e,size:20,className:"count-tile__icon"}),n.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:t})]}),b&&r&&n.jsx(mu,{plan:r,anchorRect:b,onClose:k})]})}let Va=0,hu="",$o="",qa=0;function Cu(){return fu(!1)}function ev(){return fu(!0)}function fu(e){const t=typeof document<"u";Va===0&&t&&(hu=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(qa===0&&($o=document.body.style.paddingRight),qa++,document.body.style.paddingRight="0px"),Va++;let a=!1;return()=>{a||(a=!0,Va=Math.max(0,Va-1),e&&t&&(qa=Math.max(0,qa-1),qa===0&&($o?document.body.style.paddingRight=$o:document.body.style.removeProperty("padding-right"))),Va===0&&t&&(document.body.style.overflow=hu))}}function tv(){return n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round","aria-hidden":!0,children:n.jsx("path",{d:"M6 6l12 12M18 6 6 18"})})}function nv({open:e,onClose:t,ariaLabel:a,title:r,children:l,size:s="md",closeOnBackdrop:i=!0,closeOnEscape:u=!0,showClose:c=!0,className:d,contentClassName:m}){const{t:p}=_e.useTranslation(),C=o.useId(),b=o.useRef(null),x=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const g=document.activeElement,k=Cu(),v=b.current;return fo(v,g),v?.focus(),()=>{k();const B=document.activeElement;(!B||B===document.body||v&&v.contains(B))&&go(g)?.focus?.()}},[e]);const f=o.useRef(x),h=o.useRef(u);o.useEffect(()=>{f.current=x,h.current=u}),o.useEffect(()=>{if(e)return Gn(()=>{h.current&&f.current()})},[e]);const _=o.useRef(!1);return ho(b,e),!e||typeof document>"u"?null:cn.createPortal(n.jsx("div",{className:we("dialog",d),onPointerDown:i?g=>{_.current=g.target===g.currentTarget}:void 0,onMouseDown:g=>{g.target===g.currentTarget&&g.preventDefault()},onClick:i?g=>{const k=_.current;_.current=!1,k&&g.target===g.currentTarget&&x()}:void 0,children:n.jsxs("div",{ref:b,role:"dialog","aria-modal":"true","aria-label":r?void 0:a,"aria-labelledby":r?C:void 0,tabIndex:-1,className:we("dialog__surface",`dialog__surface--${s}`,m),onClick:g=>g.stopPropagation(),children:[r?n.jsx("div",{className:"dialog__header",children:n.jsx("h2",{id:C,className:"dialog__title h4b",children:r})}):null,c?n.jsx("button",{type:"button",className:"dialog__close","aria-label":p("common.close","\uB2EB\uAE30"),onClick:x,children:n.jsx(tv,{})}):null,n.jsx("div",{className:"dialog__body",children:l})]})}),document.body)}function av({columns:e,rows:t,rowKey:a,title:r,toolbar:l,empty:s,loading:i,caption:u,className:c=""}){const{t:d}=_e.useTranslation(),m=!i&&t.length===0;return n.jsxs("div",{className:we("board",c),children:[r||l?n.jsxs("div",{className:"board__head",children:[r?n.jsx("h2",{className:"board__title",children:r}):n.jsx("span",{}),l?n.jsx("div",{className:"board__toolbar",children:l}):null]}):null,n.jsxs("table",{className:"board__table",children:[u?n.jsx("caption",{className:"board__caption",children:u}):null,n.jsx("thead",{children:n.jsx("tr",{children:e.map(p=>n.jsx("th",{scope:"col",className:we("board__th",`board__cell--${p.headerAlign??p.align??"left"}`),style:p.width?{width:p.width}:void 0,children:p.header},p.key))})}),n.jsx("tbody",{children:i?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:i})}):m?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:s??d("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((p,C)=>n.jsx("tr",{className:"board__row",children:e.map(b=>n.jsx("td",{className:we("board__td",`board__cell--${b.align??"left"}`),children:b.render(p,C)},b.key))},a(p,C)))})]})]})}function rv({name:e,role:t,photo:a,media:r,credentials:l,size:s=190,className:i=""}){return n.jsxs("div",{className:we("person-card",i),children:[n.jsx("div",{className:"person-card__photo",style:{width:s,height:s},children:r??(a?n.jsx("img",{src:a,alt:t?`${e} ${t}`:e}):null)}),n.jsx("h3",{className:"person-card__name",children:e}),t?n.jsx("p",{className:"person-card__role",children:t}):null,l?.length?n.jsx("ul",{className:"person-card__credentials",children:l.map(u=>n.jsx("li",{children:u},u))}):null]})}function ov({groups:e,className:t=""}){return n.jsx("div",{className:we("timeline",t),children:e.map(a=>n.jsxs("section",{className:"timeline__group",children:[n.jsx("h3",{className:"timeline__title",children:a.title}),n.jsx("ul",{className:"timeline__rows",children:a.entries.map((r,l)=>n.jsxs("li",{className:"timeline__row",children:[r.label?n.jsx("span",{className:"timeline__label",children:r.label}):null,n.jsx("div",{className:"timeline__items",children:r.items.map((s,i)=>n.jsx("p",{children:s},i))})]},`${r.label??""}-${l}`))})]},a.title))})}function sv({title:e,kind:t,body:a,badge:r,badgeSrc:l,footer:s,width:i,className:u=""}){const c=r??(l?n.jsx("img",{src:l,alt:""}):null);return n.jsxs("div",{className:we("publication-card",u),style:i?{width:i,flexShrink:0}:void 0,children:[c?n.jsx("div",{className:"publication-card__badge","aria-hidden":"true",children:c}):null,n.jsx("h3",{className:"publication-card__title",children:e}),t?n.jsx("p",{className:"publication-card__kind",children:t}):null,n.jsx("p",{className:"publication-card__body",children:a}),s?n.jsx("div",{className:"publication-card__footer",children:s}):null]})}function lv({logo:e,alt:t,onDone:a,durationMs:r=3e3}){const l=$a(a);return o.useEffect(()=>{const s=setTimeout(()=>l.current?.(),r);return()=>clearTimeout(s)},[r,l]),n.jsx("div",{className:"splash-logo",style:{"--splash-logo-duration":`${r}ms`},"aria-hidden":"true",children:n.jsx("img",{src:e,alt:t,className:"splash-logo__image"})})}function iv({eyebrow:e,eyebrowIndex:t,title:a,description:r,level:l=2,tone:s="dark",className:i=""}){const u=l===1?"h1":"h2";return n.jsxs("div",{className:we("section-header",`section-header--${s}`,i),children:[e?n.jsxs("p",{className:"section-header__eyebrow",children:[t?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"section-header__index",children:t}),n.jsx("span",{"aria-hidden":!0,className:"section-header__rule"})]}):null,e]}):null,a?n.jsx(u,{className:"section-header__title",children:a}):null,r?n.jsx("div",{className:"section-header__description",children:r}):null]})}function uv({items:e,className:t=""}){return n.jsx("ul",{className:we("company-meta",t),children:e.map((a,r)=>n.jsxs("li",{className:"company-meta__item",children:[r>0?n.jsx("span",{"aria-hidden":!0,className:"company-meta__divider",children:"|"}):null,a]},a))})}function gu(e){return typeof e=="string"?e:e.label}function bu({value:e,onChange:t,suggestions:a,openOnFocus:r=!1,filterSuggestions:l,onSelectSuggestion:s,autoActiveFirst:i=!1}){const u=o.useId(),[c,d]=o.useState(!1),[m,p]=o.useState(-1),C=o.useRef(null),b=o.useMemo(()=>{if(!a.length)return[];const N=e??"";return l===!1?a:N?typeof l=="function"?l(a,N):a.filter(F=>gu(F).toLowerCase().includes(N.toLowerCase())):r?a:[]},[a,e,r,l]),[x,f]=o.useState(!1),h=o.useRef([]),_=x&&b.length===0?h.current:b;o.useEffect(()=>{_.length&&(h.current=_)},[_]);const g=o.useCallback(()=>f(!0),[]),k=o.useCallback(()=>f(!1),[]),v=i?0:-1;o.useEffect(()=>{c||p(v)},[c,v]),o.useEffect(()=>()=>{C.current&&clearTimeout(C.current)},[]);const B=m<_.length?m:v<_.length?v:-1,y=o.useCallback(N=>{s?s(N):t?.(gu(N)),d(!1)},[t,s]),w=o.useCallback(()=>d(!0),[]),A=o.useCallback(()=>{d(!0),p(v)},[v]),E=o.useCallback(()=>{C.current=setTimeout(()=>d(!1),120)},[]),D=o.useCallback(N=>{N.nativeEvent.isComposing||N.keyCode===229||(N.key==="ArrowDown"?(N.preventDefault(),d(!0),p(F=>Math.min(_.length-1,(F<_.length?F:v)+1))):N.key==="ArrowUp"?(N.preventDefault(),p(F=>Math.max(v,(F<_.length?F:_.length)-1))):N.key==="Enter"?B>=0&&y(_[B]):N.key==="Escape"&&c&&(N.preventDefault(),d(!1)))},[_,B,c,y,v]);return{listId:u,open:c,activeIdx:B,filtered:_,handleFocus:w,handleBlur:E,handleInput:A,handleKeyDown:D,handleSelect:y,handleCompositionStart:g,handleCompositionEnd:k}}const Ro=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Xn(e){const{value:t,defaultValue:a,name:r,inputRef:l,onChange:s,label:i,ariaLabel:u,ariaDescribedBy:c,required:d,placeholder:m,ghostText:p,ghostHint:C,type:b="text",disabled:x=!1,readOnly:f=!1,error:h,helperText:_,maxLength:g,size:k=40,variant:v="input",fullWidth:B=!1,newline:y=!1,multiline:w=!1,rows:A=3,leftIcon:E,rightIcon:D,clearable:N=!1,list:F,showCount:R=!0,className:K="",onFocus:L,onBlur:$,onKeyDown:T,onEnter:J,inputMode:q,autoComplete:O,autoFocus:Q,suggestions:P,filterSuggestions:V,onSelectSuggestion:W,autoActiveFirst:G,openOnFocus:S=!1}=e,M=f||x?void 0:P,{t:I}=_e.useTranslation(),Z=o.useId();!i&&!u&&Rt(`TextField:unnamed:${Z}`,"[ihab/TextField] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 label \uC774\uB098 ariaLabel \uC911 \uD558\uB098\uB97C \uC8FC\uC138\uC694. placeholder \uB294 \uC774\uB984\uC744 \uB300\uC2E0\uD558\uC9C0 \uBABB\uD569\uB2C8\uB2E4.");const le=`tf-${Z}`,oe=`tf-helper-${Z}`,de=o.useRef(null),re=bu({value:t??"",onChange:s,suggestions:M??[],openOnFocus:S,filterSuggestions:V,onSelectSuggestion:W,autoActiveFirst:G}),z=!!M&&re.open&&re.filtered.length>0,ne=o.useRef(null),[H,U]=o.useState(null),pe=o.useCallback(()=>{const Ne=ne.current;if(!Ne||typeof window>"u")return;const Ue=Ne.getBoundingClientRect(),ke=230,He=window.innerHeight-Ue.bottom<ke+8&&Ue.top>ke+8;U({position:"fixed",left:Ue.left,width:Ue.width,...He?{bottom:window.innerHeight-Ue.top+8}:{top:Ue.bottom+8},zIndex:Ia(Ne)})},[]);Ro(()=>{if(!z)return;pe();let Ne=null;const Ue=()=>{if(typeof requestAnimationFrame>"u"){pe();return}Ne===null&&(Ne=requestAnimationFrame(()=>{Ne=null,pe()}))},ke=He=>{const Be=He.target;Be&&Be.nodeType===1&&Be.closest?.(".text-field__suggestions")||Ue()};return window.addEventListener("scroll",ke,!0),window.addEventListener("resize",Ue),()=>{Ne!==null&&cancelAnimationFrame(Ne),window.removeEventListener("scroll",ke,!0),window.removeEventListener("resize",Ue)}},[z,pe]);const Ee=o.useCallback(Ne=>{de.current=Ne,typeof l=="function"?l(Ne):l&&(l.current=Ne)},[l]),ge=p?`${p}${C??I("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:m,me=t!==void 0,ie=me&&b==="password",[be,he]=o.useState((a??"").length),ue=me?(t??"").length:be,Me=o.useRef(t);Ro(()=>{Me.current=t}),o.useEffect(()=>{const Ne=de.current;if(!ie||!Ne)return;const Ue=t??"";Ne.value!==Ue&&(Ne.value=Ue)},[ie,t]),o.useEffect(()=>{if(!y||!de.current)return;const Ne=de.current;Ne.style.height="",Ne.scrollHeight>Ne.clientHeight&&(Ne.style.height=`${Ne.scrollHeight}px`)},[t,be,y]);const qe=g!=null&&ue>g,je=k===32?16:20,Ve=we("text-field",`text-field--s${k}`,v==="display"?"text-field--display":"",B?"text-field--full-width":"",x?"text-field--disabled":"",f?"text-field--readonly":"",h?"text-field--error":"",E?"text-field--has-left-icon":"",D||N?"text-field--has-right-icon":"",K),Oe={id:le,...ie?{}:me?{value:t}:{defaultValue:a},ref:Ee,placeholder:ge,name:r,disabled:x,readOnly:f,autoFocus:Q,maxLength:g,list:F,inputMode:q,autoComplete:O,"aria-label":!i&&u?u:void 0,"aria-required":d,"aria-invalid":!!h,"aria-describedby":[_||h?oe:null,c].filter(Boolean).join(" ")||void 0,role:M?"combobox":void 0,"aria-autocomplete":M?"list":void 0,"aria-haspopup":M?"listbox":void 0,"aria-expanded":M?z:void 0,"aria-controls":z?re.listId:void 0,"aria-activedescendant":z&&re.activeIdx>=0?`${re.listId}-option-${re.activeIdx}`:void 0,onChange:Ne=>{const Ue=Ne.target;me||he(Ue.value.length),s?.(Ue.value),M&&re.handleInput(),ie&&queueMicrotask(()=>{const ke=Me.current??"";Ue.value!==ke&&(Ue.value=ke)})},onCompositionStart:M?re.handleCompositionStart:void 0,onCompositionEnd:M?re.handleCompositionEnd:void 0,onFocus:(Ne=>{L?.(Ne),M&&re.handleFocus()}),onBlur:(Ne=>{$?.(Ne),M&&re.handleBlur()}),onKeyDown:(Ne=>{const Ue=(Ne.key==="Tab"&&!Ne.shiftKey||Ne.key===" ")&&!Ne.nativeEvent.isComposing;if(p&&Ue&&!f&&!x&&!(Ne.currentTarget.value??"").trim()){Ne.preventDefault();const ke=Ne.currentTarget;me||(ke.value=p,he(p.length)),s?.(p);return}M&&Ne.key==="Enter"&&!Ne.nativeEvent.isComposing&&re.activeIdx>=0?Ne.preventDefault():J&&Ne.key==="Enter"&&!Ne.nativeEvent.isComposing&&(Ne.preventDefault(),J()),T?.(Ne),M&&re.handleKeyDown(Ne)})},dt=N&&!x&&!f&&ue>0,rt=()=>y?n.jsx("textarea",{...Oe,className:"text-field__input text-field__input--auto body-2",rows:1}):w?n.jsx("textarea",{...Oe,className:"text-field__input text-field__input--textarea body-2",rows:A}):n.jsx("input",{...Oe,type:b,className:"text-field__input body-2"}),nt=v==="display"&&!y&&!w&&!!ge,pt=()=>n.jsxs(n.Fragment,{children:[rt(),nt&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:ge})]});return n.jsxs("div",{ref:ne,className:Ve,children:[i&&n.jsxs("label",{htmlFor:le,className:"text-field__label caption-1",children:[i,d&&n.jsx("span",{className:"text-field__required",children:"*"})]}),n.jsxs("div",{className:"text-field__wrap",children:[E&&n.jsx("span",{className:"text-field__icon text-field__icon--left",children:n.jsx(tt,{icon:E,label:"",className:"",svgClassName:"text-field__icon-svg",size:je})}),pt(),g!=null&&R&&n.jsxs("span",{className:`text-field__count caption-2${qe?" text-field__count--over":""}`,children:[ue,"/",g]}),dt&&n.jsx(fe,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:I("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:Ne=>{Ne.preventDefault()},onClick:()=>{!me&&de.current&&(de.current.value="",he(0)),s?.("")},tabIndex:-1}),D&&!dt&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(tt,{icon:D,label:"",className:"",svgClassName:"text-field__icon-svg",size:je})})]}),!!M&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:re.open&&(t??"").length>0&&re.filtered.length===0?I("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),z&&(typeof document>"u"?null:cn.createPortal(n.jsx("ul",{id:re.listId,className:"text-field__suggestions",role:"listbox",style:H??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:re.filtered.map((Ne,Ue)=>n.jsx("li",{id:`${re.listId}-option-${Ue}`,role:"option","aria-selected":Ue===re.activeIdx,className:`text-field__suggestion body-2${Ue===re.activeIdx?" is-active":""}`,onMouseDown:ke=>ke.preventDefault(),onClick:()=>{re.handleSelect(Ne),de.current?.focus()},children:typeof Ne=="string"?Ne:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:Ne.label}),Ne.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:Ne.hint})]})},typeof Ne=="string"?`${Ne}-${Ue}`:Ne.id))}),document.body)),(_||h)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:oe,className:"text-field__helper caption-1",role:h?"alert":void 0,children:h||_})})]})}function fn({options:e,value:t,onChange:a,placeholder:r,disabled:l=!1,block:s=!1,size:i=48,error:u=!1,className:c="",ariaLabel:d,ariaDescribedBy:m}){const{t:p}=_e.useTranslation(),C=r??p("dropdown.placeholder","\uC120\uD0DD"),b=o.useId(),x=o.useId(),f=o.useRef(null),h=o.useCallback((L,$)=>{const T=window.innerHeight-L.bottom<260&&L.top>260;return{position:"fixed",left:L.left,minWidth:L.width,...T?{bottom:window.innerHeight-L.top+6}:{top:L.bottom+6},zIndex:Ia($)}},[]),{open:_,setOpen:g,toggle:k,style:v,triggerRef:B,menuRef:y}=Fa({computeStyle:h}),[w,A]=o.useState(-1),E=o.useCallback(()=>A(-1),[]),D=e.find(L=>L.value===t);o.useEffect(()=>{if(_){const L=e.findIndex($=>$.value===t);A(L>=0?L:e.length?0:-1),requestAnimationFrame(()=>{const $=y.current;if(!$)return;const T=$.querySelectorAll(".dropdown__option")[L];T&&($.scrollTop=Math.max(0,T.offsetTop-$.clientHeight/2+T.clientHeight/2))})}},[_]),o.useEffect(()=>{_&&A(L=>{if(L>=0&&L<e.length)return L;const $=e.findIndex(T=>T.value===t);return $>=0?$:e.length?0:-1})},[_,e.length]);const N=o.useCallback(()=>{l||k()},[l,k]),F=o.useCallback(L=>{L.disabled||l||(L.value!==t&&a?.(L.value),g(!1))},[a,g,l,t]);o.useEffect(()=>{l&&g(!1)},[l,g]);const R=o.useCallback(L=>{if(!l){if(!_){(L.key==="Enter"||L.key===" "||L.key==="ArrowDown")&&(L.preventDefault(),g(!0));return}if(L.key==="Escape"){L.preventDefault(),g(!1);return}L.key==="ArrowDown"?(L.preventDefault(),A($=>{let T=$+1;for(;T<e.length&&e[T].disabled;)T++;return T<e.length?T:$})):L.key==="ArrowUp"?(L.preventDefault(),A($=>{let T=$-1;for(;T>=0&&e[T].disabled;)T--;return T>=0?T:$})):(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),e[w]?F(e[w]):g(!1))}},[l,_,e,w,F,g]),K=_?n.jsx("div",{ref:y,id:b,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:v,onMouseLeave:E,onMouseDown:L=>L.preventDefault(),children:e.map((L,$)=>n.jsxs("button",{id:`${b}-option-${$}`,type:"button",role:"option","aria-selected":L.value===t,className:we("dropdown__option body-2",L.value===t?"dropdown__option--active":"",$===w?"dropdown__option--active":"",L.disabled?"dropdown__option--disabled":""),onMouseDown:T=>T.preventDefault(),onClick:()=>F(L),onMouseEnter:()=>A($),disabled:L.disabled,children:[n.jsx("span",{className:"dropdown__option-check",children:L.value===t&&n.jsx("svg",{viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"2 7 5.5 10.5 12 3.5"})})}),L.label]},L.value))}):null;return n.jsxs("div",{ref:f,className:we("dropdown",`dropdown--s${i}`,_?"dropdown--open":"",s?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:R,children:[n.jsxs("button",{ref:B,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":_,"aria-controls":_?b:void 0,"aria-activedescendant":_&&w>=0?`${b}-option-${w}`:void 0,"aria-label":d,"aria-describedby":[d&&D?x:"",m??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:l,onClick:N,onBlur:L=>{_&&!y.current?.contains(L.relatedTarget)&&g(!1)},children:[n.jsx("span",{id:x,className:`dropdown__trigger-label body-2${D?"":" dropdown__trigger-label--placeholder"}`,children:D?D.label:C}),n.jsx("svg",{className:"dropdown__chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"4 6 8 10 12 6"})})]}),typeof document<"u"&&cn.createPortal(K,f.current?.closest(".ihabdevteam-core-scope")??document.body)]})}function Cr({page:e,totalPages:t,onChange:a,prevLabel:r,nextLabel:l,className:s=""}){const{t:i}=_e.useTranslation(),u=r??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=l??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),d=Math.max(1,t),m=()=>a(Math.max(1,Math.min(d,e-1))),p=()=>a(Math.min(d,e+1));return n.jsxs("div",{className:we("pagination",s),children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-left",ariaLabel:u,disabled:e<=1,onClick:m}),n.jsxs("span",{className:"pagination__info body-3","aria-live":"polite","aria-atomic":"true",children:[Math.min(Math.max(1,e),d)," / ",d]}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=t,onClick:p})]})}const Ua=new Map;function wn(e){const{t}=_e.useTranslation(),{options:a=[],value:r=a.find(v=>!v.disabled)?.key??a[0]?.key,onChange:l=v=>{},className:s="",size:i=40,shape:u="pill",useBG:c=!0,fullWidth:d=!1,minButtonWidth:m,ariaLabel:p}=e||{},C=o.useRef(null),b=a.filter(v=>!v.disabled),x=o.useId(),f=a.map(v=>v.key).join("\xB7");o.useEffect(()=>{if(!(!Pn||p!=null&&p!=="")){if(Ua.set(x,f||"(\uBCF4\uAE30 \uC5C6\uC74C)"),Ua.size>1){const v=[...Ua.values()].sort();Rt(`segmented-control-unnamed:${v.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${Ua.size} \uAC1C \uC11C \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uB0AD\uB3C5\uAE30\uB294 \uBAA8\uB450 "\uC120\uD0DD \uD0ED" \uC73C\uB85C \uC77D\uC5B4 \uC5B4\uB290 \uAC83\uC774 \uBB34\uC5C7\uC778\uC9C0 \uAC00\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. ariaLabel \uC744 \uC8FC\uC138\uC694. \uC9C0\uAE08 \uC120 \uAC83(\uBCF4\uAE30 \uC774\uB984\uC73C\uB85C \uC801\uC74C): ${v.join(" / ")}`)}return()=>{Ua.delete(x)}}},[p,f,x]);const h=v=>{if(!b.length)return;const B=Math.max(0,b.findIndex(w=>w.key===r)),y=v==="first"?b[0]:v==="last"?b[b.length-1]:b[(B+v+b.length)%b.length];y&&(l(y.key),Array.from(C.current?.querySelectorAll("[data-segkey]")??[]).find(w=>w.dataset.segkey===y.key)?.focus())},_=v=>{switch(v.key){case"ArrowRight":case"ArrowDown":h(1);break;case"ArrowLeft":case"ArrowUp":h(-1);break;case"Home":h("first");break;case"End":h("last");break;default:return}v.preventDefault()},g=v=>{const B=y=>typeof y=="string"||typeof y=="number";if(!(!B(v.label)||v.count==null||v.count===!1||!B(v.count)))return`${v.label}, ${v.count}`},k=b.some(v=>v.key===r)?r:b[0]?.key;return n.jsx("div",{ref:C,onKeyDown:_,className:we("segmented-control",`segmented-control--${u}`,`segmented-control--${i}`,d&&"segmented-control--full",!c&&"segmented-control--no-bg",m!=null&&"segmented-control--min",s),style:m!=null?{"--segmented-min-button-w":`${m}px`}:void 0,role:"radiogroup","aria-label":p??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:a.map(v=>n.jsx(fe,{htmlType:"button",role:"radio","aria-checked":v.key===r,"data-segkey":v.key,tabIndex:v.key===k?0:-1,label:v.label,count:v.count,ariaLabel:g(v),disabled:v.disabled,className:v.key===r?"is-selected":"",onClick:()=>{v.disabled||l(v.key)},size:i,shape:u,useBorder:!1,useBG:!1},v.key))})}function Po({count:e,search:t,segment:a,filters:r,pageSize:l,pagination:s,actions:i,className:u}){const{t:c}=_e.useTranslation(),d=e!=null&&n.jsxs("p",{className:"toolbar__count body-1",role:"status","aria-atomic":"true",children:[e.prefix??c("common.totalPrefix","\uCD1D "),n.jsx("span",{className:"toolbar__count-highlight",children:e.value}),e.unit,e.suffix]}),m=!!(t||r?.length||l||s||i);return n.jsxs("div",{className:we("toolbar",u),children:[n.jsxs("div",{className:"toolbar__row",children:[d,a&&(Array.isArray(a)?a:[a]).map((p,C)=>n.jsx(wn,{size:40,...p},p.ariaLabel??C))]}),m&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(Xn,{className:"toolbar__search",size:40,value:t.value,onChange:t.onChange,placeholder:t.placeholder??c("common.search","\uAC80\uC0C9"),ariaLabel:t.placeholder??c("common.search","\uAC80\uC0C9"),autoFocus:t.autoFocus,clearable:!0}),r?.map((p,C)=>n.jsx(fn,{size:40,options:p.options,value:p.value,onChange:p.onChange,ariaLabel:p.ariaLabel},C)),(l||s)&&n.jsxs("div",{className:"toolbar__pager",children:[l&&n.jsx(fn,{size:40,options:l.options,value:l.value,onChange:l.onChange,ariaLabel:l.ariaLabel??c("common.pageSizeSelect","\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218")}),s&&n.jsx(Cr,{page:s.page,totalPages:s.total,onChange:s.onChange,prevLabel:s.prevLabel,nextLabel:s.nextLabel})]}),i]})})]})}function yu(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(yu).join(""):""}function cv(e){let t=e.replace(/\r\n/g,`
|
|
822
|
+
and aids recovery.`,site:{title:"Site",malgwi:"Malgwi",soundDirection:"Sound Direction System",vrSoundDirection:"VR Sound Direction System",hearingTest:"Hearing Test Pro"},sns:{title:"SNS",naverBlog:"Naver Blog"},policy:{title:"Policy",terms:"Terms of Service",privacy:"Privacy Policy"},ceo:"CEO",address:"Address",bizNo:"Business no.",support:"Support",ceoName:"Ji-hye Han",addressValue:"302, 3F, Haechan Bldg, 32 Sicheong-gil, Chuncheon, Gangwon, Korea",bizNoValue:"526-81-02926"},yb={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},vb={phaseWordDownload:"Download Word Data",phaseImageCheck:"Check Images",phasePairAnalysis:"Analyze Word Pairs",downloadingCount_one:"Downloading {{n}} word",downloadingCount_other:"Downloading {{n}} words",checkingPage:"Checking page {{page}} list",imageCount:"{{done}} / {{total}} items"},xb={clearAriaLabel:"Clear input"},_b={ariaLabel:"Select tab"},wb={ariaLabel:"Tabs"},Bb={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},kb={ariaLabel:"User avatar"},Ab={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},Nb={weekly:{title:"Weekly Training",daily:"Daily Listening"},homework:{title:"Homework Progress",totalRate:"Overall rate",done:"Done"},today:{tooltipTotal:"Total",tooltipDone:"Done"},visit:{title:"Linked Visit Records"},detail:"Details",detailFor:"{{name}} details"},Eb={time:{justNow:"just now",minutesAgo:"{{n}}m ago",hoursAgo:"{{n}}h ago",daysAgo:"{{n}}d ago",weeksAgo:"{{n}}w ago",monthsAgo:"{{n}}mo ago",yearsAgo:"{{n}}y ago"}},Db={steps:"Step {{current}} of {{total}}"},Sb={skippedOnly_one:"{{n}} older record was excluded \u2014 it does not say what was answered.",skippedOnly_other:"{{n}} older records were excluded \u2014 they do not say what was answered.",runs_one:"{{count}} run",runs_other:"{{count}} runs"},jb={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},Tb={viewWords:"Words"},Mb={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},Lb={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},$b={previewRegion:"Report preview \u2014 scrollable sideways"},Rb={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},Pb={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},Ib={clearSelection:"Clear selection"},Fb={showResult:"Show {{type}} result"},Ob={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},zb={loading:"Loading"},Wb={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},Hb={ariaLabel:"Breadcrumb"},Vb={empty:"No items yet."},qb={main:"Main gradient",soft:"Soft",sub:"Sub color",deep:"Deep gradient",softSub:"Soft sub",warm:"Warm (accent)",dark:"Dark",radial:"Radial gradient",diagonal:"Diagonal pattern",dots:"Dot pattern",outline:"Outline",success:"Success / done",naver:"Naver blog notice",instagram:"Instagram notice"},Ub={common:qg,calendar:Ug,passCard:Gg,rating:Kg,colorPicker:Yg,dropdown:Zg,accordion:Xg,header:Jg,nav:Qg,settings:eb,usage:tb,account:nb,training:ab,customers:rb,payment:ob,coupons:sb,visits:lb,trainingType:ib,myWordTable:ub,keyWords:cb,wordTable:db,wordSearch:pb,wordPrint:mb,topic:hb,device:Cb,manager:fb,wordPairs:gb,footer:bb,date:yb,wordData:vb,textField:xb,segmentedControl:_b,tabs:wb,fileUpload:Bb,avatar:kb,myHomework:Ab,trainingStatus:Nb,store:Eb,progress:Db,trainingMiss:Sb,table:jb,wordScore:Tb,topBanner:Mb,datePicker:Lb,report:$b,tooltip:Rb,phonemeProfile:Pb,bulkBar:Ib,debug:Fb,badge:Ob,loader:zb,soundCompass:Wb,breadcrumb:Hb,board:Vb,promoBannerBg:qb};const Gb="0.371.0",Kb=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],mo="ko",Yb="ihab_display_language";function Gl(){if(typeof window>"u")return mo;try{const e=localStorage.getItem(Yb);if(e&&Kb.some(t=>t.code===e))return e}catch{}return mo}function Kl(e){try{document.documentElement.lang=e}catch{}}Vt.on("languageChanged",Kl),Kl(Gl()),Vt.use(_e.initReactI18next).init({resources:{ko:{translation:Vg},en:{translation:Ub}},lng:Gl(),fallbackLng:mo,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const Zb=new Map;try{Vt.store?.on?.("added",()=>Zb.clear())}catch{}let or=null,Yl=null,Zl=null;function Xb(){const e=Rl();if(e&&e.entries.length>0){const t=uf();if(or&&Yl===e&&Zl===t)return or;const a=new Set,r=[];for(const l of e.entries)!l.word||a.has(l.word)||(a.add(l.word),r.push({w:l.word,s:l.syllables,p:t?.[l.word]?[...t[l.word].cho??[],...t[l.word].jung??[],...t[l.word].jong??[]]:[],pron:l.pronunciation||l.word,grade:l.grade}));return or=r,Yl=e,Zl=t,or}return[]}new Proxy([],{get(e,t){const a=Xb(),r=a[t];return typeof r=="function"?r.bind(a):r}});function Jb(e){if(e.includes("\\")&&e.includes("("))return!0;if(!/url\s*\(/i.test(e))return!1;const t=e.replace(/url\(\s*(['"]?)#[^)'"]*\1\s*\)/gi,"");return/url\s*\(/i.test(t)}function Qb(e){if(typeof window>"u")return"";const t=(a,r)=>{typeof r.attrValue=="string"&&Jb(r.attrValue)&&(r.keepAttr=!1)};oa.addHook("uponSanitizeAttribute",t);try{return oa.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{oa.removeHook("uponSanitizeAttribute",t)}}function ey(e){const[t,a]=o.useState(null),[r,l]=o.useState(null),[s,i]=o.useState(null),[u,c]=o.useState(null),[d,m]=o.useState(null);return o.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){a(null),l(null),i(null),c(null);return}const p=e.split("/").pop();let C=e;p&&(e.startsWith("/")?C=Xr(e):/^(Logo|Symbol)/i.test(p)?C=Xr(`logo/${p}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),C=e)),i(null),c(null),a(e),l(C)},[e]),o.useEffect(()=>{if(!r)return;let p=!1;async function C(){try{let b=await fetch(r);b.ok||(b=await fetch(r));const x=b.headers.get("content-type")||"";if(p)return;if(x.includes("svg")){i("mask");return}if(x.startsWith("image/")){i("img");return}const f=await fetch(r);if(!f.ok)throw new Error("not ok");const h=await f.text();if(p)return;if(/^\s*<svg[\s>]/i.test(h)){const _=Qb(h);if(!_){i("none");return}c(_),i("inline");return}i("none")}catch{p||i("none")}}return C(),()=>{p=!0}},[r]),o.useEffect(()=>{let p=!1,C=null;return s==="mask"&&r&&fetch(r).then(b=>{if(!b.ok)throw new Error("fetch failed");return b.blob()}).then(b=>{p||(C=URL.createObjectURL(b),m(C))}).catch(()=>{p||i("img")}),()=>{p=!0,C&&URL.revokeObjectURL(C),m(null)}},[s,r]),t===e?{iconToUse:r,mode:s,svgText:u,blobUrl:d}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function tt(e){const{icon:t,label:a,className:r,imgClassName:l,maskClassName:s,svgClassName:i,wrapperStyle:u,size:c}=e||{},d=r??"iconRenderer-icon",m=l??"iconRenderer-icon-image",p=s??"iconRenderer-icon-mask",C=i??"iconRenderer-icon-svg",b=typeof t=="string"?t:null,x=H1(b),{iconToUse:f,mode:h,svgText:_,blobUrl:g}=ey(b),k=(A,E={})=>n.jsx("span",{className:d,style:u,...E,children:A}),v=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,B=(A,E={})=>n.jsx("img",{src:A,alt:typeof a=="string"?a:typeof a=="number"?String(a):"",className:m,...E,style:v?{...E.style,...v}:E.style});if(!t)return null;if(typeof t!="string")return k(t);if(t==="none")return k(n.jsx("span",{className:C,dangerouslySetInnerHTML:{__html:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true"></svg>'}}),{"aria-hidden":"true"});if(x)try{return k(o.createElement(x,{className:C,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(f&&f.endsWith(".svg")){if(h==="mask"){const A={"--icon-url":g?`url(${g})`:`url(${f})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return k(n.jsx("span",{className:p,style:A}),{"aria-hidden":"true"})}return h==="img"?k(B(f,{onError:A=>{A.currentTarget.onerror=null,A.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):h==="inline"?k(n.jsx("span",{className:C,dangerouslySetInnerHTML:_?{__html:_}:void 0}),{"aria-hidden":"true"}):k(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return B(Xr(t),{style:u,onError:A=>{A.currentTarget.onerror=null,A.currentTarget.style.display="none"}});const y=typeof c=="number"?c:20,w=`<svg width="${y}" height="${y}" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="3" y="3" width="18" height="18" rx="2" ry="2" style="fill:none;stroke:currentColor;stroke-width:2"/></svg>`;return k(n.jsx("span",{className:C,dangerouslySetInnerHTML:{__html:w}}),{"aria-hidden":"true"})}function Xl(e){const[t,a]=o.useState(!1),r=o.useRef(!1),l=o.useRef(!0);o.useEffect(()=>(l.current=!0,()=>{l.current=!1}),[]);const s=o.useCallback(()=>{if(!e||r.current)return;const i=e();if(i&&typeof i.then=="function"){r.current=!0,a(!0);const u=()=>{r.current=!1,l.current&&a(!1)};i.then(u,u)}},[e]);return{pending:t,press:s}}function ty({icon:e,title:t,message:a,action:r,className:l}){const{pending:s,press:i}=Xl(r?.onClick);return n.jsxs("div",{className:we("empty-state",l),children:[e&&n.jsx(tt,{icon:e,size:48,className:"empty-state__icon"}),t&&n.jsx("p",{className:"empty-state__title h4",children:t}),a&&n.jsx("p",{className:"empty-state__message body-3",children:a}),r&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:i,disabled:s,"aria-busy":s||void 0,children:[r.icon&&n.jsx(tt,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function ny({message:e,hint:t,icon:a="triangle-alert",onRetry:r,retryLabel:l,className:s}){const{t:i}=_e.useTranslation(),{pending:u,press:c}=Xl(r);return n.jsxs("div",{className:we("empty-state","error-state",s),role:"alert",children:[n.jsx(tt,{icon:a,size:48,className:"empty-state__icon error-state__icon"}),n.jsx("p",{className:"empty-state__message body-3",children:e??i("common.errorState.message",{defaultValue:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."})}),t&&n.jsx("p",{className:"error-state__hint caption-1",children:t}),r&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:c,disabled:u,"aria-busy":u||void 0,children:[n.jsx(tt,{icon:"rotate-cw",className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:l??i("common.errorState.retry",{defaultValue:"\uB2E4\uC2DC \uC2DC\uB3C4"})})]})]})}function ay({icon:e,title:t,description:a,cta:r,tone:l="main",disabled:s=!1,onClick:i,className:u=""}){const c=o.useId(),d=`${c}-title`,m=`${c}-desc`,p=`${c}-cta`,C=()=>{s||i?.()};return n.jsx("section",{role:"button",tabIndex:s?-1:0,"aria-disabled":s||void 0,"aria-labelledby":d,"aria-describedby":`${m} ${p}`,onClick:C,onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),C())},className:we("action-card",`action-card--${l}`,s&&"action-card--disabled",u),children:n.jsxs("div",{className:"action-card__body",children:[n.jsx("span",{"aria-hidden":!0,className:"action-card__chip",children:n.jsx(tt,{icon:e,size:34})}),n.jsxs("div",{className:"action-card__text",children:[n.jsx("h2",{id:d,className:"action-card__title",children:t}),n.jsx("p",{id:m,className:"action-card__desc",children:a})]}),n.jsxs("div",{className:"action-card__cta",children:[n.jsx("span",{id:p,children:r}),n.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:n.jsx(tt,{icon:"arrow-right",size:18})})]})]})})}function ry({as:e="div",className:t="",children:a,storage:r,...l}){r&&SC({resolveUrl:r.resolveUrl,download:r.download??(()=>Promise.reject(new Error("[ihabdevteam-core] CoreScope: download resolver\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."))),exists:r.exists,resolvePath:r.resolvePath,noiseBaseUrl:r.noiseBaseUrl,noiseFileGain:r.noiseFileGain});const s=we("ihabdevteam-core-scope",t);return n.jsx(e,{className:s,...l,children:a})}function oy(e){if(e.closest('[aria-hidden="true"], [hidden], [inert]'))return!1;for(let t=e;t;t=t.parentElement){const a=window.getComputedStyle(t);if(a.display==="none"||a.visibility==="hidden"||a.visibility==="collapse")return!1}return!0}function ho(e,t=!0){o.useEffect(()=>{if(!t)return;const a=e.current;if(!a)return;const r=l=>{if(l.key!=="Tab")return;const s=Array.from(a.querySelectorAll(_n)).filter(oy);if(!s.length){l.preventDefault();return}const i=s[0],u=s[s.length-1],c=document.activeElement,d=c===a;l.shiftKey&&(c===i||d)?(l.preventDefault(),u.focus()):!l.shiftKey&&c===u&&(l.preventDefault(),i.focus())};return a.addEventListener("keydown",r),()=>a.removeEventListener("keydown",r)},[e,t])}const _n='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',Co=new WeakMap;function fo(e,t){e&&Co.set(e,t)}function go(e){let t=e;for(let a=0;t&&!t.isConnected&&a<10;a++){let r=t;for(;r&&!Co.has(r);)r=r.parentElement;if(!r)return t;t=Co.get(r)??null}return t}function Jl(e){return!(!e||!e.isConnected||e===document.body||typeof e.focus!="function"||e.disabled||e instanceof HTMLInputElement&&e.type==="hidden"||e.closest('[inert],[aria-hidden="true"],[hidden]'))}function sr(e,t,a){const r=e?.isConnected?e:a?.isConnected?a:null;if(Jl(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!r)return null;const l=Array.from(document.querySelectorAll(_n)).filter(c=>!(e&&e.contains(c))&&Jl(c));let s=null,i=null;for(const c of l)r.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_PRECEDING?s=c:i||(i=c);const u=s??i;return u?.focus(),u}function sy({title:e="",lines:t=[],notices:a=null,children:r,variant:l="default",dismissible:s=!1,className:i=""}){const{t:u}=_e.useTranslation(),[c,d]=o.useState(!1),m=o.useRef(null),p=o.useCallback(()=>{const f=m.current;f&&f.contains(document.activeElement)&&sr(f),d(!0)},[]);if(c)return null;const C=`notice-box notice-box--${l} body-2 ${i}`.trim(),b=s&&n.jsx("button",{type:"button",className:"notice-box__dismiss",onClick:p,"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"});if(a&&Array.isArray(a)&&a.length)return n.jsxs("div",{className:C,role:"note",children:[a.map((f,h)=>n.jsxs("div",{className:"notice-box__inner",children:[f.title?n.jsx("span",{className:"notice-box__title body-3",children:f.title}):null,n.jsx("div",{className:"notice-box__body",children:f.lines&&f.lines.length?n.jsx("div",{children:f.lines.map((_,g)=>n.jsx("span",{className:"notice-box__line body-3",children:_},g))}):f.children??null})]},h)),b]});const x=e||t.length?n.jsxs("div",{className:"notice-box__inner",children:[e?n.jsx("span",{className:"notice-box__title body-1",children:e}):null,n.jsx("div",{className:"notice-box__body",children:t.length?n.jsx("ul",{children:t.map((f,h)=>n.jsx("li",{className:"notice-box__line",children:f},h))}):r})]}):n.jsx("div",{className:"notice-box__inner",children:r});return n.jsxs("div",{ref:m,className:C,role:"note",children:[x,b]})}const ua=[];let lr=!1;function Ql(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=ua[ua.length-1];t&&(e.stopPropagation(),t())}function Gn(e){return ua.push(e),!lr&&typeof document<"u"&&(document.addEventListener("keydown",Ql),lr=!0),()=>{const t=ua.lastIndexOf(e);t>=0&&ua.splice(t,1),ua.length===0&&lr&&typeof document<"u"&&(document.removeEventListener("keydown",Ql),lr=!1)}}const ei=o.createContext(null);function ly(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const ti=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function iy(e){const t=o.useCallback(a=>{if(typeof window>"u"||!window.matchMedia)return()=>{};const r=window.matchMedia(e);return r.addEventListener?r.addEventListener("change",a):r.addListener&&r.addListener(a),()=>{r.removeEventListener?r.removeEventListener("change",a):r.removeListener&&r.removeListener(a)}},[e]);return js.useSyncExternalStore(t,()=>ti(e),()=>!1)}function uy(e){const[t,a]=o.useState(ti(e));return o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const r=window.matchMedia(e),l=i=>a(i.matches),s=r;return s.addEventListener?s.addEventListener("change",l):s.addListener&&s.addListener(l),a(r.matches),()=>{s.removeEventListener?s.removeEventListener("change",l):s.removeListener&&s.removeListener(l)}},[e]),t}const cy=typeof js.useSyncExternalStore=="function"?iy:uy;function Cn(e){const t=o.useContext(ei),a=cy(e);return t&&typeof t.mobile=="boolean"&&ly(e)?t.mobile:a}const dy="(prefers-reduced-motion: reduce)";function bo(){return Cn(dy)}function vn(e){const{anchorRect:t,anchorEl:a,offset:r=20,edgeMargin:l=20,onClose:s,closeOnOutsideClick:i=!0,className:u="",role:c="dialog",ariaLabel:d="",children:m,backdrop:p=!1,isMobilePopup:C=!1,useBorder:b=!0,header:x,focusOnOpen:f}=e||{},h=o.useRef(null),[_,g]=o.useState({position:"fixed",left:0,top:-9999}),[k,v]=o.useState(!1),[B,y]=o.useState("bottom"),[w,A]=o.useState(!1),[E,D]=o.useState(!1),N=!t&&!a,F=o.useRef(null),R=o.useCallback((P=!1,V=!1)=>{if(E&&C)return;const W=a?a.getBoundingClientRect():t,G=V&&F.current?F.current:W;if(!G||!h.current)return;const S=h.current,{offsetWidth:M,offsetHeight:I}=S,Z=window.innerWidth,le=window.innerHeight,oe=Z-G.right,de=G.left,re=G.top,z=le-G.bottom;let ne=0,H=0,U="top";if(re>=I+r)U="top",H=G.top-r-I,ne=G.left+G.width/2-M/2;else if(z>=I+r)U="bottom",H=G.bottom+r,ne=G.left+G.width/2-M/2;else if(oe>=M+r)U="right",ne=G.right+r,H=G.top+G.height/2-I/2;else if(de>=M+r)U="left",ne=G.left-r-M,H=G.top+G.height/2-I/2;else{const me=Math.max(re,z,oe,de);me===re?(U="top",H=G.top-r-I,ne=G.left+G.width/2-M/2):me===z?(U="bottom",H=G.bottom+r,ne=G.left+G.width/2-M/2):me===oe?(U="right",ne=G.right+r,H=G.top+G.height/2-I/2):(U="left",ne=G.left-r-M,H=G.top+G.height/2-I/2)}const pe=Number.isFinite(Number(l))?Number(l):8;ne=Math.min(Math.max(ne,pe),Z-M-pe),H=Math.min(Math.max(H,pe),le-I-pe);const Ee=Math.round(ne),ge=Math.round(H);P&&h.current?(h.current.style.left=`${Ee}px`,h.current.style.top=`${ge}px`,h.current.dataset.placement=U):(y(U||B),g({position:"fixed",left:Ee,top:ge}),A(!0))},[E,C,a,t,r,l,B]);o.useEffect(()=>()=>{F.current=null},[a,t]),o.useLayoutEffect(()=>{if(N)return;if(E&&C){g({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),A(!0);return}F.current===null&&(F.current=a?a.getBoundingClientRect():t??null),R(!1,!0);const P=requestAnimationFrame(()=>R(!1,!0));return()=>cancelAnimationFrame(P)},[t,a,r,m,l,N,E,C,R]),o.useEffect(()=>{if(N||E&&C||!h.current||typeof ResizeObserver>"u")return;const P=new ResizeObserver(()=>{t&&R()});return P.observe(h.current),()=>P.disconnect()},[t,m,l,N,E,C,R]),o.useEffect(()=>{if(N||E&&C)return;let P=null;const V=()=>{if(a&&(F.current=a.getBoundingClientRect()),typeof requestAnimationFrame>"u"){R(!0);return}P===null&&(P=requestAnimationFrame(()=>{P=null,R(!0)}))},W=G=>{if(!a&&s){const S=G.target;if(S&&h.current&&h.current.contains(S))return;try{if(S&&S.closest&&S.closest("[data-tooltip-ignore]"))return}catch{}J.current(!0);return}V()};return window.addEventListener("resize",V),document.addEventListener("scroll",W,{passive:!0,capture:!0}),()=>{P!==null&&cancelAnimationFrame(P),window.removeEventListener("resize",V),document.removeEventListener("scroll",W,{capture:!0})}},[t,a,s,r,m,l,N,E,C,R]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const P=window.matchMedia("(max-width: 768px)"),V=()=>D(!!P.matches);V();try{P.addEventListener?P.addEventListener("change",V):P.addListener(V)}catch{try{P.addListener(V)}catch{}}return()=>{try{P.removeEventListener?P.removeEventListener("change",V):P.removeListener(V)}catch{}}},[]);const K=o.useRef(!1),L=o.useRef(null),$=bo(),T=o.useCallback((P=!1)=>{if(s&&!(k||K.current)){if(K.current=!0,P){v(!0);try{s&&s()}catch{K.current=!1,v(!1)}return}v(!0),L.current=setTimeout(()=>{L.current=null;try{s&&s()}catch{K.current=!1,v(!1)}},$?0:200)}},[k,s,v,$]);o.useEffect(()=>()=>{L.current&&clearTimeout(L.current)},[]),o.useEffect(()=>{if(N)return;const P=G=>{const S=h.current;if(!S)return;const M=G.target;if(M&&!S.contains(M)){try{if(M.closest&&M.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},V=G=>{const S=h.current;if(!S)return;const M=G.target;if(M&&!S.contains(M)){try{if(M.closest&&M.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},W=G=>{if(G.key==="Tab"){const S=h.current;if(!S)return;const M=S.querySelectorAll(_n);if(!M||M.length===0)return;const I=M[0],Z=M[M.length-1],le=document.activeElement;G.shiftKey?le===I&&(G.preventDefault(),Z.focus()):le===Z&&(G.preventDefault(),I.focus())}};return document.addEventListener("pointerdown",P,!0),document.addEventListener("click",V,!0),document.addEventListener("keydown",W),()=>{document.removeEventListener("pointerdown",P,!0),document.removeEventListener("click",V,!0),document.removeEventListener("keydown",W)}},[s,i,T,N]);const J=o.useRef(T);o.useEffect(()=>{J.current=T});const q=!!s;o.useEffect(()=>{if(!(N||!q))return Gn(()=>J.current())},[N,q]),o.useEffect(()=>{const P=()=>{T(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",P),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",P)}},[T]);const O=o.useRef(null);o.useEffect(()=>{if(N||f===!1||!w)return;const P=h.current;if(!P)return;const V=P.querySelector(_n);if(V)return O.current=document.activeElement,V.focus({preventScroll:!0}),()=>{const W=O.current;O.current=null,W&&document.contains(W)&&W.focus({preventScroll:!0})}},[N,f,w]),o.useEffect(()=>{c==="dialog"&&!d&&Mt("tooltip-no-name",'[ihab/Tooltip] \uC774\uB984 \uC5C6\uB294 role="dialog" \uC785\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. \uB0AD\uB3C5\uAE30\uAC00 "\uB300\uD654\uC0C1\uC790" \uB77C\uACE0\uB9CC \uC77D\uC2B5\uB2C8\uB2E4.')},[c,d]);const Q=n.jsxs("div",{ref:h,className:`tooltip-content ${N?"tooltip-content--inline":""} ${b?"tooltip-content--bordered":""} ${k?"is-closing":""} ${u} ${E&&C?"is-mobile":""}`,role:c,"aria-label":d||void 0,style:N?{}:{..._,visibility:w?"visible":"hidden"},tabIndex:-1,"data-placement":B,"data-left":N?"":_.left,"data-top":N?"":_.top,"data-anchor-left":t?Math.round(t.left):"","data-anchor-top":t?Math.round(t.top):"","data-anchor-width":t?Math.round(t.width):"","data-anchor-height":t?Math.round(t.height):"",children:[x!=null&&n.jsx("div",{className:"tooltip-content__header h5",children:x}),m]});if(N||typeof document>"u")return Q;if(p||E&&C){const P=n.jsxs("div",{className:"tooltip-portal",children:[n.jsx("div",{className:"tooltip-backdrop",onClick:()=>{i&&T(!0)}}),Q]});return cn.createPortal(P,document.body)}return cn.createPortal(Q,document.body)}function Dn(e){const{anchorRect:t,text:a,offset:r=8,onClose:l,className:s="",ariaLabel:i}=e||{};return a?n.jsx(vn,{anchorRect:t,offset:r,onClose:l,closeOnOutsideClick:!1,className:`tooltip-info ${s}`,ariaLabel:i||a,children:n.jsx("div",{className:"tooltip-info__content body-3",children:a})}):null}function Kn(e){const{t}=_e.useTranslation(),{anchorRect:a,title:r,items:l,activeIndex:s=-1,showIndex:i=!0,onClose:u,offset:c=12,closeOnOutsideClick:d=!0}=e||{},m=(Array.isArray(l)?l:l?[l]:[]).map(p=>typeof p=="string"?{text:p}:p);return!m.length&&!r?null:n.jsx(vn,{anchorRect:a,offset:c,onClose:u,closeOnOutsideClick:d,useBorder:!1,className:"tooltip-description",ariaLabel:r||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:"tooltip-description__box",children:[r&&n.jsx("span",{className:"tooltip-description__title body-2",children:r}),n.jsx("ol",{className:"tooltip-description__items",children:m.map((p,C)=>n.jsxs("li",{className:`tooltip-description__item body-3${C===s?" tooltip-description__item--active":""}`,children:[i&&m.length>1&&n.jsxs("span",{className:"tooltip-description__index button-1",children:[C+1,"."]}),p.color&&n.jsx("span",{className:"tooltip-description__dot",style:{background:p.color},"aria-hidden":"true"}),n.jsx("span",{children:p.text})]},C))})]})})}function $a(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let yo=0,ni=!1;function ai(){ni||typeof document>"u"||(ni=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(yo=Date.now())},!0),document.addEventListener("touchstart",()=>{yo=Date.now()},{capture:!0,passive:!0}))}ai();function ca(e){return!!e&&e.pointerType==="touch"}function da(e=1e3){return ai(),Date.now()-yo<e}function vo(e,t,a,{enabled:r=!0,fallbackOnParent:l=!1}={}){const s=$a(e),i=$a(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!r||typeof document>"u")return;const m=p=>{const C=p,b=p.target,x=a.current,f=!!(b&&x&&x.contains(b));if(C.pointerType!=="touch"){f&&(u.current=null);return}if(f){u.current=s.current;return}u.current=null,s.current&&!(b&&b.closest?.(".tooltip-content"))&&i.current(!1,x)};return document.addEventListener("pointerdown",m,!0),()=>document.removeEventListener("pointerdown",m,!0)},[r,a,s,i]);const d=o.useCallback(m=>{const p=u.current;return p===null?!1:(u.current=null,c.current=Date.now(),i.current(!p,m??a.current),!0)},[a,i]);return o.useEffect(()=>{if(!r||!l)return;const m=a.current,p=m?.parentElement;if(!m||!p)return;let C=null;const b=h=>{const _=h.changedTouches?.[0];if(!_)return!1;const g=m.getBoundingClientRect();return _.clientX>=g.left&&_.clientX<=g.right&&_.clientY>=g.top&&_.clientY<=g.bottom},x=h=>{C=b(h)?s.current:null},f=h=>{const _=C;C=null,!(_===null||Date.now()-c.current<700||!b(h))&&(u.current=null,c.current=Date.now(),i.current(!_,m))};return p.addEventListener("touchstart",x,{passive:!0}),p.addEventListener("touchend",f),()=>{p.removeEventListener("touchstart",x),p.removeEventListener("touchend",f)}},[r,l,a,s,i]),{touchPress:d}}function py(e,t){const{size:a=48,type:r,htmlType:l,href:s,target:i,rel:u,icon:c,rightIcon:d,label:m,count:p,subLabel:C,children:b,ariaLabel:x,variant:f="default",align:h="center",nowrap:_=!1,selected:g,toggleable:k=!1,ariaExpanded:v,ariaControls:B,disabled:y=!1,useLabel:w=!0,useBorder:A=!0,useBG:E=!0,useDisabledCovered:D=!1,useDisabledInvisible:N=!1,useDisabledFilled:F=!1,width:R,minWidth:K,onClick:L,onDisabledClick:$,showTooltipInfo:T=!1,tooltipInfoText:J=null,tooltipDescription:q=null,tooltipOnly:O=!1,iconSize:Q="medium",iconColor:P,shape:V="rounded",color:W,className:G,...S}=e,M=typeof a=="string"&&isNaN(Number(a))?a.toLowerCase():String(Number(a)||48),I=M.match(/^\d+$/)?`button${M}`:`button-${M}`,Z=Number(a),le=!isNaN(Z)&&Z<40?"button-2":"button-1",oe=m??b,de=y||!!S.disabled,re=de?D?"disabled-covered":N?"disabled-invisibled":F?"disabled-filled":"disabled":f,z=re?`button--variant-${re}`:"",ne=h?`button--align-${h}`:"",H=_?"button--nowrap":"",U=V?`button--shape-${V}`:"",pe=typeof P=="string"&&P.startsWith("--")?`var(${P})`:P,Ee={...R?{width:typeof R=="number"?`${R}px`:R}:{},...K?{minWidth:typeof K=="number"?`${K}px`:K}:{},...A?{}:{"--button-border":de?"0":"1px solid transparent"},...pe?{"--button-icon-color":pe}:{},...W?{"--color-main":W}:{}},ge=w===!1?"":oe,me=Array.isArray(ge)?ge.length>0:!!ge,ie=!!d,be=r??(me||c||ie?"bar":"dot"),he=`${I}--${be}`,ue=o.useRef(null);o.useEffect(()=>{!Pn||l!==void 0||ue.current?.closest("form")&&Mt(`button-in-form:${typeof oe=="string"?oe:""}`,'[ihab/Button] <form> \uC548\uC778\uB370 htmlType \uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uC774 \uB2E8\uCD94\uB294 type="button" \uC774\uB77C \uD3FC\uC744 \uBCF4\uB0B4\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uBCF4\uB0B4\uB294 \uB2E8\uCD94\uBA74 htmlType="submit" \uC744 \uC8FC\uC138\uC694. \uD3FC\uC5D0 \uBCF4\uB0B4\uB294 \uB2E8\uCD94\uAC00 \uD558\uB098\uB3C4 \uC5C6\uC73C\uBA74 **Enter \uB85C\uB3C4 \uC548 \uBCF4\uB0B4\uC9D1\uB2C8\uB2E4**(\uCE78\uC774 \uB458 \uC774\uC0C1\uC77C \uB54C).'+(typeof oe=="string"&&oe?` \uB2E8\uCD94: ${oe}`:""))},[l,oe]);const Me=o.useRef(t);Me.current=t;const Ve=o.useCallback(Re=>{ue.current=Re;const ot=Me.current;typeof ot=="function"?ot(Re):ot&&(ot.current=Re)},[]),Te=o.useRef(de),[qe,Oe]=o.useState(!!g),[ct,rt]=o.useState(!1),[nt,mt]=o.useState(null),Ne=o.useCallback(()=>rt(!1),[]),[Ue,ke]=o.useState(!1),He=o.useId();o.useEffect(()=>{typeof g=="boolean"&&Oe(g)},[g]),o.useEffect(()=>{if(Te.current&&!de&&ue.current){const Re=ue.current;let ot=!1;try{ot=Re.matches(":focus:not(:focus-visible)")}catch{ot=!1}ot&&Re.blur(),Re.style.pointerEvents="none";const Dt=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ue.current&&(ue.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(Dt)}Te.current=de},[de]);const Be=typeof g=="boolean"?!!g:qe,Se=typeof v=="boolean"?void 0:k||typeof g=="boolean"?Be?"true":"false":S["aria-pressed"],Le=we("button",I,he,z,ne,H,U,Be?"is-selected":null,E?null:"button--no-bg",O?"button--tooltip-only":null,G),Ze=`button__icon button__icon--${Q}`,_t=Array.isArray(C)?C:C!==void 0?[C]:[],et=()=>{if(Array.isArray(ge))return ge.map((ot,Dt)=>{const Je=_t[Dt];return n.jsxs("span",{className:`button__label-text${Je!==void 0?" button__label-text--has-sub":""}`,children:[ot,Je!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:Je})]},Dt)});const Re=C!==void 0;return n.jsxs("span",{className:`button__label-text${Re?" button__label-text--has-sub":""}`,children:[ge,p!=null&&n.jsx("span",{className:"button__count",children:p}),Re&&n.jsx("span",{className:"button__sub-label-text caption-1",children:C})]})},Xe=Re=>{typeof g!="boolean"&&!k&&Oe(!1),Re.currentTarget.blur()},Nt=Re=>{de||(typeof S.onMouseLeave=="function"&&S.onMouseLeave(Re),Xe(Re))},gt=Re=>{if(O&&ht&&st.touchPress(Re.currentTarget),de){ht&&st.touchPress(Re.currentTarget),Re.preventDefault(),$?.(Re);return}typeof g!="boolean"&&k&&Oe(ot=>!ot),L?.(Re)},wt=o.useCallback(()=>{(T||q)&&(rt(!0),mt(ue.current?.getBoundingClientRect()??null))},[T,q]),Et=o.useCallback(()=>{(T||q)&&(rt(!1),mt(null))},[T,q]),ht=!!(T||q),st=vo(ct,Re=>{Re?wt():Et()},ue,{enabled:ht&&(de||O),fallbackOnParent:ht&&de}),Pe={...S};delete Pe.disabled,delete Pe.className,delete Pe.faded,delete Pe.useFaded,delete Pe.loading,delete Pe.onMouseLeave,delete Pe.onPointerEnter,delete Pe.onPointerLeave,delete Pe.onPointerUp,delete Pe.onFocus,delete Pe.onBlur,de&&(Object.keys(Pe).forEach(Re=>{/^on[A-Z]/.test(Re)&&typeof Pe[Re]=="function"&&delete Pe[Re]}),Pe["aria-disabled"]="true");const bt=(typeof T=="string"?T:null)??(typeof J=="string"?J:null)??(typeof x=="string"?x:null)??(typeof oe=="string"?oe:null)??void 0,Bt=typeof x=="string"?x:typeof oe=="string"?oe:bt,lt=q?[q.title,...q.items??[]].filter(Boolean).join(". "):T&&bt&&bt!==Bt?bt:"",Tt=[typeof S["aria-describedby"]=="string"?S["aria-describedby"]:void 0,lt?He:null].filter(Boolean).join(" ")||void 0,Ge=(Re,ot)=>n.jsx(tt,{icon:Re,label:ot??Bt,className:Ze,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),yt=()=>be==="dot"?n.jsxs(n.Fragment,{children:[Ge(c),me&&n.jsx("span",{className:`button__label ${le}`,children:et()})]}):h==="center"&&c?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:Ge(c)}),me&&n.jsx("span",{className:`button__label ${le}`,children:et()})]}),ie&&n.jsx("span",{className:"button__right",children:Ge(d)})]}):n.jsxs(n.Fragment,{children:[c&&n.jsx("span",{className:"button__left",children:Ge(c,x??oe)}),me&&n.jsx("span",{className:`button__label ${le}`,children:et()}),ie&&n.jsx("span",{className:"button__right",children:Ge(d)})]}),Rt=!!s&&!de;return n.jsxs(n.Fragment,{children:[n.jsxs(Rt?"a":"button",{...Pe,ref:Ve,...Rt?{href:s,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:l??"button",disabled:de&&!$&&!Ue},className:Le,"aria-pressed":Se,"aria-expanded":typeof v=="boolean"?v:S["aria-expanded"],"aria-controls":B??S["aria-controls"],"aria-label":Bt,"aria-disabled":de&&(Rt||$||Ue)?!0:void 0,"aria-describedby":Tt,style:Ee,onClick:gt,onMouseLeave:Nt,onPointerEnter:Re=>{ca(Re)||wt(),!de&&typeof S.onPointerEnter=="function"&&S.onPointerEnter(Re)},onPointerLeave:Re=>{ca(Re)||Et(),!de&&typeof S.onPointerLeave=="function"&&S.onPointerLeave(Re)},onPointerUp:Re=>{de&&ht&&st.touchPress(Re.currentTarget),!de&&typeof S.onPointerUp=="function"&&S.onPointerUp(Re)},onFocus:Re=>{ke(!0),da()||wt(),!de&&typeof S.onFocus=="function"&&S.onFocus(Re)},onBlur:Re=>{ke(!1),de||Xe(Re),Et(),!de&&typeof S.onBlur=="function"&&S.onBlur(Re)},children:[yt(),lt?n.jsx("span",{id:He,hidden:!0,"aria-label":lt}):null]}),ct&&q?n.jsx(Kn,{anchorRect:nt,title:q.title,items:q.items,onClose:Ne}):ct&&bt?n.jsx(Dn,{anchorRect:nt,text:bt,onClose:Ne}):null]})}const fe=o.forwardRef(py);fe.displayName="Button";function Lt(e,t,a){const r=o.useRef(null);return o.useLayoutEffect(()=>{const l=r.current?.parentElement??null;return t(l,e),()=>a(l)},[e,t,a]),r}const Ra={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},xo=new WeakMap;function _o(e){if(e)return xo.get(e)}function Qt(e,t){e&&(e.style.setProperty(Ra.title,t.title),e.style.setProperty(Ra.description,t.description),xo.set(e,t))}function en(e){e&&(e.style.removeProperty(Ra.title),e.style.removeProperty(Ra.description),xo.delete(e))}const ri={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function oi(){const e=Lt(ri,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const si={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function li(){const e=Lt(si,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const ii={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function ui(){const e=Lt(ii,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const ci={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function di(){const e=Lt(ci,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const pi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function mi(){const e=Lt(pi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const hi={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function Ci(){const e=Lt(hi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const fi={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function gi(){const e=Lt(fi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const bi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function yi(){const e=Lt(bi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const vi={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function xi(){const e=Lt(vi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const _i={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function wi(){const e=Lt(_i,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const Bi={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function ki(){const e=Lt(Bi,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-outline","aria-hidden":"true",children:n.jsx("span",{className:"promo-banner-bg-outline__dot"})})}const Ai={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Ni(){const e=Lt(Ai,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const Ei={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function Di(){const e=Lt(Ei,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Si={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function ji(){const e=Lt(Si,Qt,en);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const ln=(e,t,a)=>({key:e,get label(){return Vt.t(`promoBannerBg.${e}`,t)},textTone:a}),my=[ln("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),ln("soft","\uC18C\uD504\uD2B8","dark"),ln("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),ln("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),ln("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),ln("warm","\uC6DC(\uAC15\uC870)","dark"),ln("dark","\uB2E4\uD06C","light"),ln("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),ln("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),ln("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),ln("outline","\uC544\uC6C3\uB77C\uC778","dark"),ln("success","\uC131\uACF5/\uC644\uB8CC","light"),ln("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),ln("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],Ti={main:oi,soft:li,sub:ui,deep:di,softSub:mi,warm:Ci,dark:gi,radial:yi,diagonal:xi,dots:wi,outline:ki,success:Ni,naver:Di,instagram:ji};function Mi({storageKey:e="fontScale",baseFont:t=20,minScale:a=.8,maxScale:r=1.4,step:l=.1,lineHeightRatio:s=1.4}={}){const i=k=>Math.max(a,Math.min(r,Number(k))),u=k=>{try{const v=localStorage.getItem(k),B=v?Number(v):1;return Number.isFinite(B)?i(B):i(1)}catch{return i(1)}},[c,d]=o.useState(()=>u(e)),[m,p]=o.useState(e);m!==e&&(p(e),d(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const C=k=>{d(typeof k=="function"?v=>i(k(v)):i(k))},b=()=>C(k=>+(k+l).toFixed(6)),x=()=>C(k=>+(k-l).toFixed(6)),f=c<r-Number.EPSILON,h=c>a+Number.EPSILON,_=Math.round(t*c),g=Math.round(_*s);return{scale:c,setScale:C,increase:b,decrease:x,canIncrease:f,canDecrease:h,fontSize:_,lineHeight:g}}function Li(e,t){const a=$a(t);o.useEffect(()=>{const r=()=>a.current();try{window.addEventListener(e,r)}catch{}return()=>{try{window.removeEventListener(e,r)}catch{}}},[e,a])}const wo=" \xB7 ",$i=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(wo)?e.split(wo).pop()??e:e})(),hy=o.createContext(!1),Yn=[];let Ri=null;function Cy(e){const t=o.useContext(hy);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;Yn.length===0&&(Ri=document.title);const a={text:$i?`${e}${wo}${$i}`:e};return Yn.push(a),document.title=a.text,()=>{const r=Yn.lastIndexOf(a);r>=0&&Yn.splice(r,1),document.title=Yn.length?Yn[Yn.length-1].text:Ri??document.title}},[e,t])}const Bo=[{value:"10",label:"10\uAC1C\uC529 \uBCF4\uAE30"},{value:"25",label:"25\uAC1C\uC529 \uBCF4\uAE30"},{value:"50",label:"50\uAC1C\uC529 \uBCF4\uAE30"},{value:"100",label:"100\uAC1C\uC529 \uBCF4\uAE30"}],fy=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function mn(e,t){return fy().compare(e,t)}const ir=new Map;function gy(e){const t=ir.get(e);if(t)return t;const a=[],r=/-?\d+(?:\.\d+)?/g;let l=0;for(let s=r.exec(e);s;s=r.exec(e)){let i=s.index,u=s[0];u[0]==="-"&&i>0&&!/\s/.test(e[i-1])&&(i+=1,u=u.slice(1)),i>l&&a.push(e.slice(l,i)),a.push(Number(u)),l=s.index+s[0].length}return l<e.length&&a.push(e.slice(l)),ir.size>5e3&&ir.clear(),ir.set(e,a),a}function by(e){if(!/^[\d\s-]+$/.test(e))return null;const t=e.replace(/\D/g,"");return t.length<9||t.length>11?null:t[0]==="0"||t[0]==="1"&&e!==t?t:null}function yy(e,t){const a=d=>d==null||typeof d=="number"&&Number.isNaN(d)?"":String(d).trim(),r=a(e),l=a(t);if(r===l)return 0;const s=(d,m)=>{if(typeof d=="number"&&!Number.isNaN(d))return[d];const p=by(m);return p!==null?[p]:gy(m)},i=s(e,r),u=s(t,l),c=Math.min(i.length,u.length);for(let d=0;d<c;d++){const m=i[d],p=u[d];if(typeof m=="number"&&typeof p=="number"){if(m!==p)return m-p;continue}if(typeof m=="number")return-1;if(typeof p=="number")return 1;const C=mn(m,p);if(C!==0)return C}return i.length!==u.length?i.length-u.length:mn(r,l)}const Pi=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function ur(e,t,a){const r=Pi(e),l=Pi(t);if(r||l)return r===l?0:r?1:-1;const s=yy(e,t);return a?s:-s}function vy(e,t,a){const{t:r}=_e.useTranslation(),[l,s]=o.useState(()=>{const x=a?.initialPageSize;return x&&Bo.some(f=>f.value===x)?x:"25"}),[i,u]=o.useState(1),[c,d]=o.useState(t);Object.is(c,t)||(d(t),i!==1&&u(1));const m=o.useMemo(()=>Bo.map(x=>({...x,label:r("visits.showN",{n:x.value})})),[r]),p=o.useCallback(x=>{Bo.some(f=>f.value===x)&&(s(x),u(1))},[]),C=Math.max(1,Math.ceil(e.length/Number(l))),b=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),C);return i!==b&&u(b),{pageRows:o.useMemo(()=>e.slice((b-1)*Number(l),b*Number(l)),[e,b,l]),pageSizeProps:{options:m,value:l,onChange:p},paginationProps:{page:b,total:C,onChange:u},setPage:u}}function xy(e){const[t,a]=o.useState(()=>e?.defaultKey!=null?{key:e.defaultKey,asc:e.defaultAsc??!0}:null),r=o.useRef(t),l=o.useRef(e?.onSortChange);l.current=e?.onSortChange;const s=o.useCallback(c=>{const d=r.current,m=d?.key===c?{key:c,asc:!d.asc}:{key:c,asc:!0};r.current=m,a(m),l.current?.(m)},[]),i=o.useCallback((c,d)=>({label:c,sortDir:t?.key===d?t.asc?"asc":"desc":null,onClick:()=>s(d)}),[t,s]),u=o.useCallback((c,d)=>{if(!t)return c;const{key:m,asc:p}=t;return[...c].sort((C,b)=>ur(d(C,m),d(b,m),p))},[t]);return{sort:t,field:i,sortRows:u}}const xn="\uC804\uCCB4";Object.fromEntries(Object.entries(QC).map(([e,{nucleus:t}])=>[e,t]));const _y={labial:e=>e("common.phonetics.place.labial",{defaultValue:"\uC591\uC21C\uC74C"}),alveolar:e=>e("common.phonetics.place.alveolar",{defaultValue:"\uCE58\uC870\uC74C"}),palatal:e=>e("common.phonetics.place.palatal",{defaultValue:"\uACBD\uAD6C\uAC1C\uC74C"}),velar:e=>e("common.phonetics.place.velar",{defaultValue:"\uC5F0\uAD6C\uAC1C\uC74C"}),glottal:e=>e("common.phonetics.place.glottal",{defaultValue:"\uC131\uBB38\uC74C"})},wy={frontHigh:e=>e("common.phonetics.vowel.frontHigh",{defaultValue:"\uC804\uC124 \uACE0\uBAA8\uC74C"}),backHighUnrounded:e=>e("common.phonetics.vowel.backHighUnrounded",{defaultValue:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C"}),backHighRounded:e=>e("common.phonetics.vowel.backHighRounded",{defaultValue:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C"}),frontMid:e=>e("common.phonetics.vowel.frontMid",{defaultValue:"\uC804\uC124 \uC911\uBAA8\uC74C"}),backMidUnrounded:e=>e("common.phonetics.vowel.backMidUnrounded",{defaultValue:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C"}),backMidRounded:e=>e("common.phonetics.vowel.backMidRounded",{defaultValue:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C"}),low:e=>e("common.phonetics.vowel.low",{defaultValue:"\uC800\uBAA8\uC74C"})},By={j:e=>e("common.phonetics.glide.j",{defaultValue:"j\uD65C\uC74C"}),w:e=>e("common.phonetics.glide.w",{defaultValue:"w\uD65C\uC74C"}),velar:e=>e("common.phonetics.glide.velar",{defaultValue:"\u0270\uD65C\uC74C"})};function ky(e,t){if("place"in t)return _y[t.place](e);const a=wy[t.vowel](e);return t.glide?`${a} \xB7 ${By[t.glide](e)}`:a}const Ay=(e,{defaultValue:t})=>t,Ii=(e,t)=>({jamos:e,phonetic:t,tooltip:ky(Ay,t)}),Sn=(e,t)=>t.map(a=>Ii([a],{place:e})),qt=(e,t,a)=>Ii([...e],a?{vowel:t,glide:a}:{vowel:t}),ko={cho:[Sn("labial",["\u3142","\u3143","\u314D","\u3141"]),Sn("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),Sn("alveolar",["\u3145","\u3146"]),Sn("palatal",["\u3148","\u3149","\u314A"]),Sn("velar",["\u3131","\u3132","\u314B"]),Sn("glottal",["\u314E"])],jung:[[qt("\u3163","frontHigh"),qt("\u315F","frontHigh","w"),qt("\u3162","frontHigh","velar")],[qt("\u3161","backHighUnrounded")],[qt("\u315C","backHighRounded"),qt("\u3160","backHighRounded","j")],[qt("\u3154\u3150","frontMid"),qt("\u3156\u3152","frontMid","j"),qt("\u3159\u315A\u315E","frontMid","w")],[qt("\u3153","backMidUnrounded"),qt("\u3155","backMidUnrounded","j"),qt("\u315D","backMidUnrounded","w")],[qt("\u3157","backMidRounded"),qt("\u315B","backMidRounded","j")],[qt("\u314F","low"),qt("\u3151","low","j"),qt("\u3158","low","w")]],jong:[Sn("labial",["\u3142","\u3141"]),Sn("alveolar",["\u3137","\u3134","\u3139"]),Sn("velar",["\u3131","\u3147"])]},Ny=e=>e===Ey?[]:Array.from(e),Ey="__NO_CODA__",Ao=e=>e.map(t=>t.map(({jamos:a,phonetic:r,tooltip:l})=>({v:a.join(""),phonetic:r,tooltip:l}))),Fi={cho:Ao(ko.cho),jung:Ao(ko.jung),jong:Ao(ko.jong)};Fi.jung.flat().forEach(({v:e})=>{for(const t of Ny(e));}),new Set(Fi.cho.flat().map(e=>e.v));function Dy(e,t=!0){const a=$a(e);o.useEffect(()=>{if(t)return Gn(()=>{a.current?.()})},[t,a])}function Pa(){const[e,t]=o.useState(null),a=o.useCallback(s=>t(s.getBoundingClientRect()),[]),r=o.useCallback(()=>t(null),[]),l=o.useCallback(s=>{const i=s.getBoundingClientRect();t(u=>u?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:a,close:r,toggleAt:l}}function Sy(e){const[t,a]=o.useState(null),[r,l]=o.useState(null),s=o.useRef(null);o.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const i=o.useCallback((c,d)=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{a(c),l(d)},e)},[e]),u=o.useCallback(()=>{s.current&&clearTimeout(s.current),a(null),l(null)},[]);return{payload:t,anchorRect:r,openAfterDelay:i,close:u}}function Oi(e="warning"){const[t,a]=o.useState(""),[r,l]=o.useState(e),[s,i]=o.useState(0),u=o.useCallback((p,C)=>{l(C),a(p),i(b=>b+1)},[]),c=o.useCallback(p=>u(p,"warning"),[u]),d=o.useCallback(p=>u(p,"normal"),[u]),m=o.useCallback(()=>a(""),[]);return{toastMessage:t,toastType:r,toastKey:s,showToast:u,showWarning:c,showNormal:d,clearToast:m}}function Ia(e){let t=0;if(e&&typeof window<"u"&&typeof window.getComputedStyle=="function")for(let a=e;a&&a!==document.body&&a!==document.documentElement;a=a.parentElement){const r=parseInt(window.getComputedStyle(a).zIndex,10);!Number.isNaN(r)&&r>t&&(t=r)}return t>0?`max(var(--z-menu, 1500), ${t+1})`:"var(--z-menu, 1500)"}function Fa({computeStyle:e,onScroll:t="close",onResize:a="close",ignoreOutsideClickSelector:r}){const[l,s]=o.useState(!1),[i,u]=o.useState({position:"fixed"}),c=o.useRef(null),d=o.useRef(null),m=o.useCallback(()=>{c.current&&u(e(c.current.getBoundingClientRect(),c.current))},[e]);o.useLayoutEffect(()=>{l&&m()},[l,m]),o.useEffect(()=>{if(!l)return;let b=d.current?.offsetHeight??0;b>0&&m();let x=0,f=null;typeof ResizeObserver<"u"&&d.current&&(f=new ResizeObserver(()=>{const w=d.current?.offsetHeight??0;if(w!==b){if(b=w,++x>4){f?.disconnect(),f=null;return}m()}}),f.observe(d.current));const h=w=>{const A=w.target;r&&A.closest?.(r)||c.current?.contains(A)||d.current?.contains(A)||s(!1)};document.addEventListener("mousedown",h),document.addEventListener("pointerdown",h);let _=null;const g=()=>{if(typeof requestAnimationFrame>"u"){m();return}_===null&&(_=requestAnimationFrame(()=>{_=null,m()}))},k=w=>{d.current?.contains(w.target)||(t==="reposition"?g():t==="close"&&s(!1))};t!=="ignore"&&window.addEventListener("scroll",k,!0);const v=()=>{a==="reposition"?g():a==="close"&&s(!1)};let B=null;const y=()=>{v(),B&&clearTimeout(B),B=setTimeout(()=>{B=null,a==="reposition"&&m()},250)};return a!=="ignore"&&(window.addEventListener("resize",v),window.addEventListener("orientationchange",y)),()=>{_!==null&&cancelAnimationFrame(_),f?.disconnect(),document.removeEventListener("mousedown",h),document.removeEventListener("pointerdown",h),t!=="ignore"&&window.removeEventListener("scroll",k,!0),a!=="ignore"&&(window.removeEventListener("resize",v),window.removeEventListener("orientationchange",y)),B&&clearTimeout(B)}},[l,m,t,a,r]),o.useEffect(()=>{if(l)return Gn(()=>s(!1))},[l]);const p=o.useCallback(()=>s(b=>!b),[]),C=o.useCallback(()=>s(!1),[]);return{open:l,setOpen:s,toggle:p,close:C,style:i,triggerRef:c,menuRef:d}}function jy(e,{mode:t="playback",autoStart:a=!1,onPlaySpeaker:r,onComplete:l,playMs:s=1100,feedbackMs:i=1500}={}){const[u,c]=o.useState([]),[d,m]=o.useState(0),[p,C]=o.useState("idle"),[b,x]=o.useState(null),[f,h]=o.useState([]),[_,g]=o.useState(null),[k,v]=o.useState(0),B=o.useRef(0),y=o.useCallback(P=>{B.current=typeof P=="function"?P(B.current):P,v(B.current)},[]),w=o.useRef(r),A=o.useRef(l);o.useEffect(()=>{w.current=r,A.current=l},[r,l]);const E=o.useRef([]),D=()=>{E.current.forEach(clearTimeout),E.current=[]},N=(P,V)=>{E.current.push(setTimeout(V,P))};o.useEffect(()=>()=>D(),[]);const F=u[d]?.id??null,R=o.useRef(null),K=o.useCallback(()=>{D(),C("playing"),h([]),g(null),y(0);let P=0;e.forEach((V,W)=>{N(P,()=>{m(W),x(V.id),w.current?.(V)}),N(P+1e3,()=>{x(null),h(G=>[...G,V.id])}),P+=1300}),N(P,()=>{C("done"),A.current?.({score:0,total:e.length})})},[e,y]),L=o.useCallback((P,V)=>{if(V>=P.length){C("done"),A.current?.({score:B.current,total:P.length});return}R.current=null,m(V),g(null),C("playing"),x(P[V].id),w.current?.(P[V]),N(s,()=>{x(null),C("waiting")})},[s]),$=o.useCallback(()=>{D();const P=Ta(e);c(P),y(0),h([]),L(P,0)},[e,L,y]),T=o.useCallback(()=>{t==="playback"?(c(e),K()):$()},[t,e,K,$]),J=o.useCallback(()=>{D(),C("idle"),x(null),h([]),g(null),m(0),y(0),c([])},[y]),q=JSON.stringify(e.map(P=>[P.id,P.label,P.angleDeg,P.deg,P.row,P.shortcut]));o.useEffect(()=>(a?T():J(),()=>D()),[t,q,a]);const O=o.useCallback(P=>{p!=="waiting"||t==="playback"||R.current===d||(R.current=d,g(P),P===u[d]?.id&&y(V=>V+1),t==="exam"?(C("playing"),N(400,()=>L(u,d+1))):(C("feedback"),N(i,()=>L(u,d+1))))},[p,t,u,d,L,i,y]),Q=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:b,playedIds:f,selectedId:_,answerId:F,showFeedback:p==="feedback",clickable:p==="waiting",onSelectSpeaker:O},index:d,total:Q,score:k,phase:p,done:p==="done",start:T,reset:J}}const No=new Map,Eo=new Map,Ty=()=>()=>{},My=()=>!0,Ly=()=>!1;function zi(e){const t=/^data:image\/svg\+xml(;base64)?,([\s\S]*)$/.exec(e);if(!t)return null;try{if(!t[1])return decodeURIComponent(t[2]);const a=Uint8Array.from(atob(t[2]),r=>r.charCodeAt(0));return new TextDecoder("utf-8").decode(a)}catch{return null}}function $y(e){if(typeof window>"u")return"";const t=(a,r)=>{const l=r.attrName.toLowerCase(),s=r.attrValue.trim();(l==="href"||l==="xlink:href")&&!s.startsWith("#")&&(r.keepAttr=!1),(l==="style"||s.includes("\\")&&s.includes("("))&&(r.keepAttr=!1);const i=s.replace(/url\s*\(\s*(['"]?)#[^)\s'"]+\1\s*\)/gi,"");/url\s*\(/i.test(i)&&(r.keepAttr=!1)};oa.addHook("uponSanitizeAttribute",t);try{return oa.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{oa.removeHook("uponSanitizeAttribute",t)}}function Ry(e,t){const a=new Set;for(const i of e.matchAll(/url\(\s*(['"]?)#([^)\s"']+)\1\s*\)/g))a.add(i[2]);for(const i of e.matchAll(/(?:xlink:)?href="#([^"]+)"/g))a.add(i[1]);const r=new Set([...e.matchAll(/id="([^"]*)"/g)].map(i=>i[1])),l=[...a].filter(i=>r.has(i));if(l.length===0)return e;let s=e;for(const i of l){const u=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=`${t}-${i}`;s=s.replace(new RegExp(`id="${u}"`,"g"),`id="${c}"`).replace(new RegExp(`url\\(\\s*(['"]?)#${u}\\1\\s*\\)`,"g"),(d,m)=>`url(${m}#${c}${m})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return s}function Py(e){const t=Eo.get(e);if(t)return t;const a=fetch(e).then(r=>r.ok?r.text():null).then(r=>(r!=null&&No.set(e,r),r)).catch(()=>null).finally(()=>{Eo.delete(e)});return Eo.set(e,a),a}function Iy(e,t=!0){const a=o.useSyncExternalStore(Ty,My,Ly)&&t&&e?zi(e)??No.get(e)??null:null,[r,l]=o.useState({src:e,enabled:t,svg:a});return o.useEffect(()=>{if(!t||!e){l({src:e,enabled:t,svg:null});return}const s=zi(e)??No.get(e)??null;if(s!==null){l({src:e,enabled:t,svg:s});return}let i=!0;return Py(e).then(u=>{i&&l({src:e,enabled:t,svg:u})}),()=>{i=!1}},[e,t]),r.src===e&&r.enabled===t?r.svg:a}function Fy({title:e,description:t,actionLabel:a,onAction:r,bg:l,color:s,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:d,className:m=""}){const p=l??s??"main",C=o.useRef(null),[b,x]=o.useState("main"),f=Cn("(max-width: 767px)"),h=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const k=C.current;if(!k)return;const v=_o(k),B=(y,w,A)=>{if(A!==void 0)k.style.setProperty(w,A),h.current[y]=!0;else if(h.current[y]){const E=v?.[y];E?k.style.setProperty(w,E):k.style.removeProperty(w),h.current[y]=!1}};B("title","--promo-banner-bg-title",c),B("description","--promo-banner-bg-description",d)},[c,d,p]),o.useLayoutEffect(()=>{const k=C.current;if(!k)return;const v=_o(k);x(v?.actionVariant??"main")},[p]);const _=we("promo-banner",`promo-banner--${i}`,m),g=Ti[p];return n.jsxs("div",{ref:C,className:_,role:"note",children:[n.jsx(g,{}),n.jsxs("div",{className:"promo-banner__text",children:[n.jsx("span",{className:`promo-banner__title ${i==="small"?"body-2":"h2"}`,children:e}),t&&n.jsx("span",{className:"promo-banner__description body-3",children:t})]}),a&&r&&n.jsx(fe,{htmlType:"button",size:40,variant:u??b,shape:"pill",useBorder:!0,onClick:r,ariaLabel:a,...f?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:a,minWidth:140}})]})}function Oy({children:e,interval:t=5e3,dotTone:a,className:r="","aria-label":l}){const{t:s}=_e.useTranslation(),i=l??s("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[d,m]=o.useState(0),[p,C]=o.useState(!1),[b,x]=o.useState(!1),[f,h]=o.useState(!1),_=o.useRef(null),g=o.useRef(null),k=o.useRef(null),v=bo(),B=p||b||f,y=c>0?Math.min(d,c-1):0;o.useEffect(()=>{if(c<2||t<=0||B||v)return;const A=window.setInterval(()=>m(E=>(Math.min(E,c-1)+1)%c),t);return()=>window.clearInterval(A)},[c,t,B,v]);const w=A=>{g.current!=null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null,h(!1)},A)};return o.useEffect(()=>()=>{g.current!=null&&window.clearTimeout(g.current)},[]),o.useEffect(()=>{if(!f)return;const A=E=>{E.pointerType==="touch"&&(k.current&&k.current.contains(E.target)||(g.current!=null&&(window.clearTimeout(g.current),g.current=null),h(!1)))};return document.addEventListener("pointerdown",A,!0),()=>document.removeEventListener("pointerdown",A,!0)},[f]),c===0?null:n.jsxs("section",{ref:k,className:we("top-banner",r),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:A=>{_.current=A.pointerType},onPointerDown:A=>{_.current=A.pointerType,A.pointerType==="touch"&&(g.current!=null&&(window.clearTimeout(g.current),g.current=null),h(!0))},onPointerUp:A=>{A.pointerType==="touch"&&w(5e3)},onPointerCancel:A=>{A.pointerType==="touch"&&w(5e3)},onMouseEnter:()=>{_.current!=="touch"&&C(!0)},onMouseLeave:()=>C(!1),onFocus:A=>{let E=!0;try{E=A.target.matches(":focus-visible")}catch{E=!0}x(E)},onBlur:A=>{A.currentTarget.contains(A.relatedTarget)||x(!1)},children:[n.jsx("div",{className:"top-banner__viewport",children:n.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${y*100}%)`},children:u.map((A,E)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":E!==y,...E!==y?{inert:!0}:{},children:A},E))})}),c>1&&n.jsx("div",{className:`top-banner__dots${(a?.[y]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((A,E)=>n.jsx("button",{type:"button",className:`top-banner__dot${E===y?" top-banner__dot--active":""}`,"aria-label":s("topBanner.dotAriaLabel",{count:c,index:E+1,defaultValue:`${c}\uAC1C \uC911 ${E+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":E===y,onClick:()=>m(E)},E))})]})}function zy({title:e,body:t,open:a=!1,onToggle:r,avatar:l,titleClassName:s="body-2",bodyClassName:i="body-2",className:u=""}){const{t:c}=_e.useTranslation();return n.jsxs("div",{className:`accordion-item ${a?"accordion-item--open":""} ${u}`.trim(),role:"listitem",children:[n.jsxs("div",{className:"accordion-item__header",role:"button",tabIndex:0,"aria-expanded":a,"data-accordion-header":!0,onClick:r,onKeyDown:d=>{if(d.key==="Enter"||d.key===" ")d.preventDefault(),r?.();else if(d.key==="ArrowDown"||d.key==="ArrowUp"){d.preventDefault();const m=d.currentTarget.closest('[role="list"]');if(!m)return;const p=Array.from(m.querySelectorAll("[data-accordion-header]")),C=p.indexOf(d.currentTarget);(d.key==="ArrowDown"?p[C+1]:p[C-1])?.focus()}},children:[l&&n.jsx("div",{className:"accordion-item__avatar",children:l}),n.jsx("div",{className:`accordion-item__title ${s}`,children:e}),n.jsx("div",{className:"accordion-item__chevron",children:n.jsx(tt,{icon:a?"chevron-up":"chevron-down",label:a?c("accordion.collapse","\uC811\uAE30"):c("accordion.expand","\uD3BC\uCE58\uAE30"),className:"accordion-item__chevron-icon",imgClassName:"accordion-item__chevron-image"})})]}),a&&n.jsx("div",{className:`accordion-item__body ${i}`,children:typeof t=="string"?n.jsx("p",{children:t}):t})]})}function Wy({items:e=[],defaultOpenIndex:t=0,size:a=72,className:r="",bodyClassName:l}){const[s,i]=o.useState({index:t}),u=(c,d)=>s.id!=null&&c.id!=null?c.id===s.id:s.id==null&&d===s.index;return n.jsx("div",{className:`accordion-group accordion-group--s${a} ${r}`.trim(),role:"list",children:e.map((c,d)=>n.jsx(zy,{title:c.title,body:c.body,avatar:c.avatar,open:u(c,d),onToggle:()=>i(u(c,d)?{index:-1}:{index:d,id:c.id}),bodyClassName:l},c.id??d))})}function Hy(){return n.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:n.jsx("polyline",{points:"2,6 5,9 10,3"})})}function Vy(){return n.jsxs("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:[n.jsx("line",{x1:"3",y1:"3",x2:"9",y2:"9"}),n.jsx("line",{x1:"9",y1:"3",x2:"3",y2:"9"})]})}function qy(){return n.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:n.jsx("line",{x1:"2.5",y1:"6",x2:"9.5",y2:"6"})})}function $t(e){const{t}=_e.useTranslation(),{type:a="bar",size:r,className:l="","aria-label":s,"aria-hidden":i}=e;if(a==="dot"){const{icon:B,number:y,position:w="top-right",onClick:A,animate:E=!1}=e,D=B??"check",N=y!==void 0?"number":D,F=typeof r=="number"?r:32,R=we("circle-badge",`circle-badge--${N}`,`circle-badge--${w}`,`circle-badge--${F}`,E?"circle-badge--animate":"",A?"circle-badge--clickable":"",l),K=y!==void 0?t("badge.nthSelected",{n:y,defaultValue:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"}):{check:t("badge.selected","\uC120\uD0DD\uB428"),remove:t("badge.remove","\uC81C\uAC70"),minus:t("badge.exclude","\uC81C\uC678")}[D];return n.jsxs("span",{className:R,onClick:A,onKeyDown:A?L=>{L.key!=="Enter"&&L.key!==" "||(L.preventDefault(),L.currentTarget.click())}:void 0,"aria-label":i?void 0:s??K,"aria-hidden":i||void 0,role:A?"button":i?void 0:"img",tabIndex:A?0:void 0,children:[y!==void 0&&y,y===void 0&&D==="check"&&n.jsx(Hy,{}),y===void 0&&D==="remove"&&n.jsx(Vy,{}),y===void 0&&D==="minus"&&n.jsx(qy,{})]})}const{label:u,children:c,variant:d="default",fill:m="filled",minWidth:p,iconLeft:C,iconRight:b,color:x}=e,f=typeof r=="number"?"medium":r??"medium",h={small:"caption-2b",medium:"body-3b",large:"body-2b"}[f]??"body-2b",_={small:12,medium:14,large:16}[f]??14,g=we("badge",`badge--${d}`,`badge--${f}`,m!=="filled"?`badge--${m}`:"",h,l),k=x?.startsWith("--")?`var(${x})`:x,v=p!==void 0||k?{...p!==void 0?{minWidth:typeof p=="number"?`${p}px`:p}:{},...k?{"--badge-color":k}:{}}:void 0;return n.jsxs("span",{className:g,style:v,"aria-label":i?void 0:s,role:s&&!i?"img":void 0,"aria-hidden":i||void 0,children:[C&&n.jsx(tt,{icon:C,size:_,className:"badge__icon"}),u??c,b&&n.jsx(tt,{icon:b,size:_,className:"badge__icon"})]})}function Oa({columns:e=[],onClose:t,className:a="",size:r="medium"}){const{t:l}=_e.useTranslation(),s=r==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const h=[{title:null,columns:e}];let _=e;for(const g of i){const k=_?.[g.ci]?.items?.[g.ii];if(!k||!Array.isArray(k.children)||!k.children.length)break;_=[{title:null,items:k.children}],h.push({title:k.label||null,columns:_})}return h},[e,i]),d=c[c.length-1],m=c.length-1,p=o.useCallback(()=>u(h=>h.slice(0,Math.max(0,Math.min(h.length,m)-1))),[m]),C=o.useRef(null),b=o.useRef(null),x=c.length;o.useEffect(()=>{b.current||(b.current=document.activeElement);let h=0,_=0;const g=()=>{const k=C.current?.querySelector("button:not([disabled])");if(k&&k.offsetParent){k.focus({preventScroll:!0});return}_++<20&&(h=requestAnimationFrame(g))};return h=requestAnimationFrame(g),()=>cancelAnimationFrame(h)},[x]),o.useEffect(()=>()=>{b.current?.focus?.({preventScroll:!0})},[]);const f=o.useCallback((h,_,g)=>{if(h){if(Array.isArray(h.children)&&h.children.length){u(k=>[...k.slice(0,m),{ci:_,ii:g}]);return}try{typeof h.onClick=="function"&&h.onClick()}catch{}try{h&&h.closeOnSelect&&typeof t=="function"&&t()}catch{}}},[t,m]);return n.jsxs("div",{className:`tooltip-menu tooltip-menu--${r} ${a}`,children:[(c.length>1||d.title)&&n.jsxs("div",{className:"tooltip-menu__header",children:[c.length>1?n.jsx(fe,{htmlType:"button",size:s,type:"dot",icon:"chevron-left",ariaLabel:l("common.back","\uB4A4\uB85C"),onClick:p,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:"tooltip-menu__title button-1",children:d.title})]}),n.jsx("div",{className:"tooltip-menu__columns",ref:C,children:d.columns&&d.columns.map((h,_)=>n.jsxs("div",{className:"tooltip-menu__column",children:[h.title?n.jsx("div",{className:"tooltip-menu__column-title body-3",children:h.title}):null,n.jsx("div",{className:"tooltip-menu__items",children:(h.items||[]).map((g,k)=>n.jsxs(o.Fragment,{children:[g.separatorBefore&&k>0&&n.jsx("div",{className:"tooltip-menu__separator",role:"separator"}),n.jsx(fe,{htmlType:"button",className:"tooltip-menu__item",size:s,type:g.label?"bar":"dot",icon:g.selected?"check":g.icon||"none",rightIcon:Array.isArray(g.children)&&g.children.length?"chevron-right":g.badgeCount?n.jsx($t,{type:"dot",position:"inline",number:Math.min(g.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:g.label,ariaLabel:g.label&&g.badgeCount&&g.badgeCount>0?l("nav.badgeLabel",{label:g.label,count:g.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):g.label,onClick:()=>f(g,_,k),selected:g.selected,disabled:g.disabled,showTooltipInfo:g.tooltip||!1,useBorder:!1,align:"left"})]},k))})]},_))})]})}const Wi=".content-area";function Do(e,t="Nav"){try{const a=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Wi);if(a){a.scrollTop=0;return}const r=document.scrollingElement??document.documentElement;r&&r.scrollHeight<=r.clientHeight&&Mt("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Wi}) \u2014 \uCC3D\uB3C4 \uAD6C\uB97C \uC218 \uC5C6\uC5B4 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4. scrollContainer \uB85C \uD1B5\uC744 \uC54C\uB824 \uC900\uB2E4.`),window.scrollTo({top:0})}catch{}}const So=52,cr=10,Hi=e=>e&&e>0?e:0;function Vi({items:e=[],activeKey:t,onChange:a,appMode:r,onAppModeChange:l,moreItems:s=[],scrollContainer:i}){const{t:u}=_e.useTranslation(),c=r==="manager"?"malgwi":"manager",d=r==="manager"?"arrow-left":"arrow-right",m=r==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),p=o.useRef(null),[C,b]=o.useState(0),x=e.length;o.useEffect(()=>{const P=p.current;if(!P)return;const V=()=>{const S=typeof getComputedStyle=="function"?getComputedStyle(P):null,M=P.clientWidth-(parseFloat(S?.paddingLeft??"")||0)-(parseFloat(S?.paddingRight??"")||0),I=P.querySelector(".bottom-nav__left"),Z=I?.nextElementSibling,le=(I?.offsetWidth??0)+(I&&Z?.classList.contains("bottom-nav__divider")?Z.offsetWidth:0);b(Math.max(0,M-le))};if(V(),typeof ResizeObserver>"u")return;const W=new ResizeObserver(V);W.observe(P);const G=P.querySelector(".bottom-nav__left");return G&&W.observe(G),()=>W.disconnect()},[l]);const f=So+1,h=P=>Math.max(0,Math.floor((P+cr)/(So+cr))),_=x*(So+cr)-cr<=C,g=C<=0||s.length===0&&_?x:Math.min(x,h(C-f)),k=C>0&&g<x,v=k?g:x,B=e.slice(0,v),y=e.slice(v),w=k||s.length>0,A=o.useCallback((P,V)=>({position:"fixed",bottom:window.innerHeight-P.top+8,right:window.innerWidth-P.right,zIndex:Ia(V)}),[]),E=o.useId(),{open:D,toggle:N,close:F,style:R,triggerRef:K,menuRef:L}=Fa({computeStyle:A,onScroll:"ignore",onResize:"reposition"}),$=o.useCallback((P,V)=>V>0?u("nav.badgeLabel",{label:P,count:V,defaultValue:"{{label}}, {{count}}\uAC1C"}):P,[u]),T=o.useCallback((P,V)=>V>0?u("nav.badgeInsideLabel",{label:P,count:V,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):P,[u]),J=o.useCallback(()=>l?.(c),[l,c]),q=o.useMemo(()=>y.find(P=>!!P.key&&P.key===t)??s.find(P=>P.selected||P.key&&P.key===t),[y,t,s]),O=o.useMemo(()=>[{items:[...y.map(P=>({label:P.label,icon:P.icon,badgeCount:P.badgeCount,selected:!!P.key&&P.key===t,closeOnSelect:!0,disabled:P.state==="disabled",onClick:()=>{P.state!=="disabled"&&(P.key&&a&&(a(P.key),Do(i,"BottomNav")),F())}})),...s.map(P=>({label:P.label,icon:P.icon,badgeCount:P.badgeCount,selected:P.selected??(!!P.key&&P.key===t),closeOnSelect:!0,onClick:()=>{P.onClick?.(),F()}}))]}],[y,s,t,a,F]),Q=[...y,...s].reduce((P,V)=>P+Hi(V.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:p,"aria-label":u("nav.bottomNav","\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158"),children:[l&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__left",children:n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:d,ariaLabel:m,className:"bottom-nav-item",onClick:J})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:B.map((P,V)=>{const W=Hi(P.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:P.icon,ariaLabel:$(P.label,W),selected:!!P.key&&P.key===t,disabled:P.state==="disabled",className:"bottom-nav-item",onClick:()=>{P.key&&(a?.(P.key),Do(i,"BottomNav"))}}),W>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx($t,{type:"dot",position:"top-right",number:Math.min(W,99),size:24})})]},P.key??`__slot-${V}`)})}),w&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"}),n.jsx("div",{className:"bottom-nav__right",children:n.jsxs("div",{ref:K,className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:q?.icon??"ellipsis",ariaLabel:T(q?.label??u("nav.more","\uB354\uBCF4\uAE30"),Q),selected:!!q,className:"bottom-nav-item",onClick:N,"aria-expanded":D,"aria-controls":D?E:void 0}),Q>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx($t,{type:"dot",position:"top-right",number:Math.min(Q,99),size:24})}),D&&cn.createPortal(n.jsx("div",{id:E,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:"tooltip-content",style:R,ref:L,children:n.jsx(Oa,{columns:O,onClose:F})}),document.body)]})})]})]})}function qi(e){if(typeof e!="string")return!1;let t="";for(const r of e){const l=r.charCodeAt(0);l<=32||l>=127&&l<=159||(t+=r)}if(!t)return!1;const a=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(t);return a?["http","https","mailto","tel"].includes(a[1].toLowerCase()):!0}function Ui(e,t,a){return a&&a>0?e("nav.badgeLabel",{label:t,count:a,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function Uy(e){const{t}=_e.useTranslation(),{activeKey:a,unreadCount:r,onDebug:l,onNotification:s,onSetting:i,onHelp:u,onFeedback:c,onAccount:d}=e||{},m="default";return l||s||i||u||c||d?n.jsxs("div",{className:"side-nav__footer",children:[l&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:l,selected:a==="debug"}),s&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"bell",ariaLabel:Ui(t,t("nav.notifications","\uC54C\uB9BC"),r),onClick:s,selected:a==="notifications"}),!!r&&r>0&&n.jsx($t,{type:"dot",number:Math.min(r,99),size:24,"aria-hidden":!0})]}),i&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"settings",ariaLabel:t("nav.settings","\uC124\uC815"),onClick:i,selected:a==="settings"}),u&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"message-circle-question-mark",ariaLabel:t("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:u,selected:a==="help"}),c&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"bug",ariaLabel:t("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:c,selected:a==="feedback"}),d&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:m,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:d,selected:a==="account"})]}):null}function Gi(e){const{t}=_e.useTranslation(),{item:a,itemKey:r,label:l,icon:s,active:i,onClick:u,style:c,state:d,labelStyle:m}=e||{},p=a?.key??r??"",C=a?.label??l??"",b=a?.icon??s??"",x=a?.badge??0,f=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(tt,{icon:b,label:typeof C=="string"?C:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),h=d==="disabled",_=`side-nav__item ${i?"active":""} ${d||""} ${h?"disabled":""} ${a?.child?"side-nav__item--child":""}`,g=o.useCallback(k=>{if(h)return;const v=k.detail>0;if(v)try{k.currentTarget.blur()}catch{}u?.(p,k.currentTarget,v)},[h,p,u]);return n.jsxs("button",{type:"button",className:_,onClick:g,"aria-label":typeof C=="string"?Ui(t,C,x):void 0,"aria-current":i?"page":void 0,style:c,"aria-disabled":h,children:[f,n.jsx("span",{className:"side-nav__label button-1 f",style:m,children:C}),x>0&&n.jsx($t,{type:"dot",position:"inline",number:Math.min(x,99),size:24,"aria-hidden":!0}),d==="loading"&&n.jsx("span",{className:"side-nav__spinner",role:"img","aria-label":t("loader.loading","\uBD88\uB7EC\uC624\uB294 \uC911\u2026")})]})}function Ki(e){const{t}=_e.useTranslation(),{items:a=[],activeKey:r,onChange:l,unreadCount:s,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p,appMode:C,onAppModeChange:b,scrollContainer:x}=e||{},f=C==="manager",h=o.useCallback(()=>b?.(f?"malgwi":"manager"),[b,f]),_=o.useRef(null),[g,k]=o.useState(null);o.useEffect(()=>{const A=_.current;if(!A)return;let E=null;const D=()=>{const{scrollHeight:R,clientHeight:K,scrollTop:L}=A;if(R<=K+1){k(O=>O===null?O:null);return}const $=Math.max(24,K/R*K),T=K-$,J=R-K,q={top:Math.round(L/J*T),height:Math.round($)};k(O=>O&&O.top===q.top&&O.height===q.height?O:q)},N=()=>{if(typeof requestAnimationFrame>"u"){D();return}E===null&&(E=requestAnimationFrame(()=>{E=null,D()}))};D(),A.addEventListener("scroll",N,{passive:!0});const F=typeof ResizeObserver<"u"?new ResizeObserver(N):null;F?.observe(A);for(const R of Array.from(A.children))F?.observe(R);return()=>{E!==null&&cancelAnimationFrame(E),A.removeEventListener("scroll",N),F?.disconnect()}},[a]);const v=o.useRef(null),B=o.useCallback(A=>{const E=_.current;E&&(A.preventDefault(),v.current={y:A.clientY,top:E.scrollTop},A.currentTarget.setPointerCapture(A.pointerId))},[]),y=o.useCallback(A=>{const E=_.current,D=v.current;!E||!D||(E.scrollTop=D.top+(A.clientY-D.y)*(E.scrollHeight/E.clientHeight))},[]),w=o.useCallback(A=>{v.current=null,A.currentTarget.hasPointerCapture(A.pointerId)&&A.currentTarget.releasePointerCapture(A.pointerId)},[]);return n.jsxs("nav",{ref:_,"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[g&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:g.top,height:g.height},onPointerDown:B,onPointerMove:y,onPointerUp:w,onPointerCancel:w})}),n.jsxs("div",{className:"side-nav__menu-list",children:[(a||[]).filter(A=>!A.section&&(A.key||A.label)).map((A,E)=>n.jsxs(o.Fragment,{children:[A.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(Gi,{item:A,active:!!A.key&&A.key===r,state:A.disabled?"disabled":void 0,onClick:(D,N,F)=>{if(A.disabled)return;if(A.href){if(qi(A.href)&&window.open(A.href,"_blank","noopener,noreferrer"),F)try{N?.blur()}catch{}return}if(l?.(A.key),Do(x,"SideNav"),!F)return;try{N?.blur()}catch{}if(typeof window<"u"&&window.matchMedia){if(!window.matchMedia("(min-width: 768px) and (max-width: 1023px)").matches)return}else return;const R=document.querySelector(".header");if(R){const K=typeof R.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&K&&R.matches(":hover"))){R.classList.add("header--force-collapsed");const L=()=>{R.classList.remove("header--force-collapsed"),R.removeEventListener("mouseenter",L)};R.addEventListener("mouseenter",L)}}}})]},A.key??`side-nav__item-${E}`)),b&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),b&&n.jsx(Gi,{item:{key:"__mode-switch__",label:f?t("nav.goToMalgwi","\uB9D0\uADC0\uB85C \uC774\uB3D9"):t("nav.goToManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9"),icon:f?"arrow-left":"arrow-right"},onClick:h})]}),n.jsx(Uy,{activeKey:r,unreadCount:s,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p})]})}var dr='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEar_ko" xmlns="http://www.w3.org/2000/svg" width="583.33" height="240" viewBox="0 0 583.33 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',jo='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEarManager_ko" xmlns="http://www.w3.org/2000/svg" width="1035.43" height="240" viewBox="0 0 1035.43 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z"/><path d="M644.64,52.32v131.48h-58.24V52.32h58.24ZM634.45,173.81V62.32h-38.25v111.49h38.25ZM713.65,193.61h-10.19v-75.16h-28.64v72.66h-10V46.94h10v61.32h28.64v-62.28h10.19v147.63Z"/><path d="M819.46,171.6c6.6-1.35,12.08-3.11,16.44-5.29v10.19c-4.23,2.31-9.64,4.1-16.24,5.38-6.6,1.28-13.3,1.92-20.09,1.92h-57.28V51.36h10.57v122.25h46.71c6.66,0,13.29-.67,19.89-2.02ZM851.47,193.8V45.98h10.57v147.63l-10.57.19Z"/><path d="M935.66,113.64l48.44,62.28-8.27,6.34-43.06-56.13c-4.36,16.66-10.38,29.92-18.07,39.79-7.69,9.87-16.72,15.83-27.1,17.88v-10.76c8.71-2.05,16.21-8.07,22.49-18.07,6.28-10,11.05-22.97,14.32-38.92,3.27-15.95,5.03-33.86,5.29-53.73h-39.21v-10h88.61v10h-39.02c-.13,18.84-1.6,35.95-4.42,51.32ZM1015.43,193.61h-10.38v-79.39h-37.87v-10.19h37.87v-58.05h10.38v147.63Z"/></g><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',Gy='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_SpeechEar" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><g id="symbol"><path d="M183.92,56.08c-8.48-15.54-24.97-26.08-43.92-26.08h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%234dcdc0"/><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23499cdf"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>';function Yi({appMode:e}){const{t}=_e.useTranslation(),a=e==="manager",r=a?jo:dr,l=Gy;return n.jsxs("div",{className:"brand-identity__root","aria-label":t("header.biArea","BI \uC601\uC5ED"),children:[n.jsx("img",{src:l,alt:t("header.biSymbol","BI \uC2EC\uBCFC"),className:"brand-identity__image brand-identity__image--symbol"}),n.jsx("img",{src:r,alt:a?t("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):t("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0"),className:"brand-identity__image brand-identity__image--logo"})]})}function Zi({activeKey:e,onChange:t,items:a,malgwiItems:r,managerItems:l,unreadCount:s,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p,appMode:C,onAppModeChange:b,scrollContainer:x}){const{t:f}=_e.useTranslation(),h=Cn("(max-width: 767px)"),_=o.useMemo(()=>(a??[]).filter(R=>!R.section&&(R.key||R.label)).map(R=>({key:R.key,label:typeof R.label=="string"?R.label:void 0,icon:R.icon,state:R.disabled?"disabled":void 0,badgeCount:R.badge})),[a]),g=o.useCallback(R=>{const K=a?.find(L=>L.key===R);if(!K?.disabled){if(K?.href){qi(K.href)&&window.open(K.href,"_blank","noopener,noreferrer");return}t?.(R)}},[a,t]),k=o.useMemo(()=>{const R=[];return i&&R.push({key:"debug",icon:"terminal",label:f("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),u&&R.push({key:"notifications",icon:"bell",label:f("nav.notifications","\uC54C\uB9BC"),badgeCount:s,onClick:u}),d&&R.push({key:"settings",icon:"settings",label:f("nav.settings","\uC124\uC815"),onClick:d}),m&&R.push({key:"help",icon:"message-circle-question-mark",label:f("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:m}),p&&R.push({key:"feedback",icon:"bug",label:f("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:p}),c&&R.push({key:"account",icon:"user-round",label:f("nav.account","\uACC4\uC815"),onClick:c}),R},[f,i,u,d,m,p,c,s]),v=o.useCallback((R,K)=>({position:"fixed",top:R.bottom+8,right:Math.max(8,window.innerWidth-R.right),zIndex:Ia(K)}),[]),B=o.useId(),{open:y,toggle:w,close:A,style:E,triggerRef:D,menuRef:N}=Fa({computeStyle:v,onScroll:"ignore",onResize:"reposition"}),F=o.useMemo(()=>[{items:k.map(R=>({label:R.label,icon:R.icon,badgeCount:R.badgeCount,selected:R.selected??(!!R.key&&R.key===e),closeOnSelect:!0,onClick:()=>{R.onClick?.(),A()}}))}],[k,e,A]);return n.jsxs("aside",{className:`header${C==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(Yi,{appMode:C}),n.jsxs("div",{className:"header__menu-button",ref:D,children:[n.jsx(fe,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:u&&s&&s>0?f("nav.badgeInsideLabel",{label:f("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:s,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):f("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:w,"aria-expanded":y,"aria-controls":y?B:void 0}),!!u&&!!s&&s>0&&n.jsx($t,{type:"dot",number:Math.min(s,99),size:24,"aria-hidden":!0}),y&&cn.createPortal(n.jsx("div",{id:B,role:"group","aria-label":f("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:"tooltip-content",style:E,ref:N,children:n.jsx(Oa,{columns:F,onClose:A})}),document.body)]})]}),n.jsx(Ki,{scrollContainer:x,items:a,activeKey:e??void 0,onChange:t,unreadCount:s,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:m,onFeedback:p,appMode:C,onAppModeChange:b}),h&&n.jsx(Vi,{items:_,activeKey:e??void 0,onChange:g,scrollContainer:x,appMode:C,onAppModeChange:b})]})}const Ky=Zi,Yy=()=>Vt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function Xi(e){if(!(e==null||e==="")){if(typeof e=="string"&&/^\s*\d[\d,]*\s*$/.test(e)){const t=Number(e.replace(/[,\s]/g,""));if(Number.isFinite(t))return ia(`${t.toLocaleString("ko-KR")}\uC6D0`)}return ia(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function Zy(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function Xy(e){if(e.durationDays&&e.durationDays>0){const s=e.durationDays;return s%365===0?`${s/365}\uB144`:`${s}\uC77C`}const t=(e.code??"").match(/(\d+)(d|y)\b/i);if(t)return t[2].toLowerCase()==="y"?`${t[1]}\uB144`:`${t[1]}\uC77C`;const a=e.name??"",r=a.match(/(\d+\s*(?:년|개월|주|일))\s*(?:이용권)?\s*$/);if(r)return r[1].replace(/\s+/g,"");const l=a.match(/(\d+)\s*-?\s*(day|year)s?\b/i);return l?l[2].toLowerCase()==="year"?`${l[1]}\uB144`:`${l[1]}\uC77C`:a||Yy()}function Jy(e){const t=(e??"").match(/(\d+)(d|y)\b/i);if(!t)return null;const a=Number(t[1]);return t[2].toLowerCase()==="y"?a*365:a}function Ji(e){return{type:e.type??Zy(e),plan:Xy(e),label:e.label,price:Xi(e.price),originalPrice:Xi(e.originalPrice),discountLabel:e.discountLabel}}var Qy='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEar_ko_mono" xmlns="http://www.w3.org/2000/svg" width="583.33" height="240" viewBox="0 0 583.33 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z" fill="%23fff"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z" fill="%23fff"/></g><g id="symbol"><g opacity=".5"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',e2='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_SpeechEarManager_ko_mono" xmlns="http://www.w3.org/2000/svg" width="1035.43" height="240" viewBox="0 0 1035.43 240"><g id="text"><path d="M278.07,115.18V47.71h85.73v67.47h-85.73ZM408.4,173.42v20.18h-125.33v-44.02h96.5v-5.96h-96.88v-20.18h124.18v44.02h-96.11v5.96h97.65ZM305.56,70.97v20.76h30.95v-20.76h-30.95ZM423.39,92.88h-16.53v25.37h-27.68V45.98h27.68v20.18h16.53v26.72Z" fill="%23fff"/><path d="M527.58,113.83v26.33c-7.82,3.59-20.06,5.38-36.71,5.38h-1.73v48.06h-27.68v-48.06h-34.21v-26.33h64.01c16.4,0,28.51-1.79,36.33-5.38ZM435.31,75.77v-26.33h80.35v62.09h-27.68v-35.75h-52.67ZM563.33,193.61h-27.68V45.98h27.68v147.63Z" fill="%23fff"/><path d="M644.64,52.32v131.48h-58.24V52.32h58.24ZM634.45,173.81V62.32h-38.25v111.49h38.25ZM713.65,193.61h-10.19v-75.16h-28.64v72.66h-10V46.94h10v61.32h28.64v-62.28h10.19v147.63Z" fill="%23fff"/><path d="M819.46,171.6c6.6-1.35,12.08-3.11,16.44-5.29v10.19c-4.23,2.31-9.64,4.1-16.24,5.38-6.6,1.28-13.3,1.92-20.09,1.92h-57.28V51.36h10.57v122.25h46.71c6.66,0,13.29-.67,19.89-2.02ZM851.47,193.8V45.98h10.57v147.63l-10.57.19Z" fill="%23fff"/><path d="M935.66,113.64l48.44,62.28-8.27,6.34-43.06-56.13c-4.36,16.66-10.38,29.92-18.07,39.79-7.69,9.87-16.72,15.83-27.1,17.88v-10.76c8.71-2.05,16.21-8.07,22.49-18.07,6.28-10,11.05-22.97,14.32-38.92,3.27-15.95,5.03-33.86,5.29-53.73h-39.21v-10h88.61v10h-39.02c-.13,18.84-1.6,35.95-4.42,51.32ZM1015.43,193.61h-10.38v-79.39h-37.87v-10.19h37.87v-58.05h10.38v147.63Z" fill="%23fff"/></g><g id="symbol"><g opacity=".5"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>',Qi='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_IHAB_mono" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="%23fff"/></svg>';const Zn={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},To=new WeakMap;function t2(e){if(e)return To.get(e)}function jn(e,t){e&&(e.style.setProperty(Zn.text,t.text),e.style.setProperty(Zn.sub,t.sub),t.copyrightColor&&e.style.setProperty(Zn.copyright,t.copyrightColor),To.set(e,t))}function Tn(e){e&&(e.style.removeProperty(Zn.text),e.style.removeProperty(Zn.sub),e.style.removeProperty(Zn.copyright),To.delete(e))}const eu={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function tu(e={}){const t=Lt(eu,jn,Tn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-two-circle","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-two-circle__c1"}),n.jsx("div",{className:"pass-card-bg-two-circle__c3"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-two-circle__symbol",style:{"--symbol-url":`url("${Qi}")`}})]})}const nu="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71Z",pa=240;var za='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_IHAB" xmlns="http://www.w3.org/2000/svg" width="240" height="240" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 240 240"><defs><linearGradient id="linear-gradient" x1="62.99" y1="62.99" x2="190.71" y2="190.71" gradientUnits="userSpaceOnUse"><stop offset=".2" stop-color="%23499cdf"/><stop offset=".8" stop-color="%234dcdc0"/></linearGradient></defs><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="url(%23linear-gradient)"/></svg>';const n2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},a2=100,r2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function au(e={}){const t=Lt(n2,jn,Tn),a="var(--color-main)",r=270,l=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:r2.map(({scale:s,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${l}) scale(${s*a2/pa}) translate(${-pa/2} ${-pa/2})`,opacity:i,children:n.jsx("path",{d:nu,fill:"none",stroke:a,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move__symbol",style:{"--symbol-url":`url("${za}")`}})]})}const o2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},s2=100,l2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function i2(e={}){const t=Lt(o2,jn,Tn),a="#ffffff",r=270,l=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move-v1","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move-v1__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:l2.map(({scale:s,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${l}) scale(${s*s2/pa}) translate(${-pa/2} ${-pa/2})`,opacity:i,children:n.jsx("path",{d:nu,fill:"none",stroke:a,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move-v1__symbol",style:{"--symbol-url":`url("${Qi}")`}})]})}const u2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function c2(e={}){const t=Lt(u2,jn,Tn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-talk","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--left"}),n.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--right"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk__symbol",style:{"--symbol-url":`url("${za}")`}})]})}const d2={Logo_SpeechEar_ko:{"":dr,_mono:Qy},Logo_SpeechEarManager_ko:{"":jo,_mono:e2}};function p2(e,t){if(e)return d2[e]?.[t??""]??void 0}const m2={speechear:dr,manager:jo},h2={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},ru=10;function C2(e){return e<=0?0:e>=86400?Math.floor(e/86400)*86400:e>=3600?Math.floor(e/3600)*3600:e>=60?Math.floor(e/60)*60:Math.floor(e)}function ou(e,t){if(e<=0)return t("passCard.remainingSecond",{n:0});const a=Math.floor(e/86400);if(a>0)return t("passCard.remainingDay",{n:a});const r=Math.floor(e/3600);if(r>0)return t("passCard.remainingHour",{n:r});const l=Math.floor(e/60);return l>0?t("passCard.remainingMinute",{n:l}):t("passCard.remainingSecond",{n:Math.floor(e)})}function f2(e,t,a){if(e==="manager"){const r=/년/.test(t)||/yr|year/i.test(t)||/1년|365/.test(t),l=a==="\uC624\uD508\uD2B9\uAC00"||a===Vt.t("passCard.specialLabel");return r?n.jsx(c2,{}):l?n.jsx(i2,{}):n.jsx(au,{})}return n.jsx(tu,{})}function su({ariaLabel:e,product:t,showPrice:a=!1,plan:r,type:l,endDate:s,remainingSeconds:i,endInclusive:u=!1,state:c="active",bg:d,bgOnly:m=!1,textColor:p,subColor:C,copyrightColor:b,logoSrc:x,label:f,price:h,originalPrice:_,discountLabel:g,onUse:k,onRefund:v,onDelete:B}){const{t:y}=_e.useTranslation(),w=t?Ji(t):void 0,A=l??w?.type??"speechear",E=r??w?.plan??y("passCard.planSuffix","\uC774\uC6A9\uAD8C"),D=f??w?.label,N=h??(a?w?.price:void 0),F=_??(a?w?.originalPrice:void 0),R=g??w?.discountLabel,K=o.useMemo(()=>{if(N)return null;const H=t?.durationDays??Jy(t?.code);if(!H||H<=0)return i!=null?{percent:null,remainingLabel:ou(i,y)}:null;const U=H*86400;let pe;if(i!=null)pe=i;else if((c==="active"||c==="expired")&&s){const me=new Date(s).getTime();if(Number.isNaN(me))return null;const ie=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(s)),be=/^(\d{4})-(\d{2})-(\d{2})/.exec(La()),he=Math.round(ie&&be?(Date.UTC(+ie[1],+ie[2]-1,+ie[3])-Date.UTC(+be[1],+be[2]-1,+be[3]))/864e5:(me-Date.now())/864e5);pe=Math.max(0,u?he+1:he)*86400}else c==="expired"?pe=0:pe=U;const Ee=C2(pe),ge=Math.max(0,Math.min(100,Math.floor(Math.min(Ee,U)/U*100)));return c==="pending"&&ge>=100?null:{percent:ge,remainingLabel:c==="expired"?y("passCard.expired","\uB9CC\uB8CC\uB428"):ou(pe,y)}},[N,c,s,i,u,t?.durationDays,t?.code,y]),L=o.useRef(null),[$,T]=o.useState({}),[J,q]=o.useState(null),O=!!(k||v||B),Q=o.useRef(!1),P=o.useRef(void 0),[V,W]=o.useState(x);o.useLayoutEffect(()=>{W(x)},[x]),o.useLayoutEffect(()=>{const H=L.current;H&&(p!==void 0&&H.style.setProperty("--pass-card-text",p),C!==void 0&&H.style.setProperty("--pass-card-sub",C),b!==void 0&&H.style.setProperty("--pass-card-copyright",b))},[p,C,b]),o.useLayoutEffect(()=>{const H=L.current;if(!H)return;const U=t2(H);if(!x){const pe=h2[A],Ee=c==="expired"?"_mono":U?.logoColor??"",ge=p2(pe,Ee);W(ge)}},[d,x,A,c]);const G=H=>{const U=L.current;if(!U)return null;const{left:pe,top:Ee,width:ge,height:me}=U.getBoundingClientRect(),ie=(H.clientX-pe)/ge-.5;return{rotateX:-((H.clientY-Ee)/me-.5)*ru,rotateY:ie*ru}},S=(H,U)=>{const pe=U*-.7,Ee=H*.7+10,ge=20+(Math.abs(H)+Math.abs(U))*.4;return`${pe}px ${Ee}px ${ge}px rgba(0, 0, 0, 0.18)`},M=o.useCallback(H=>{if(da())return;Q.current=!0,clearTimeout(P.current),P.current=setTimeout(()=>{Q.current=!1},200);const U=G(H);U&&T({transform:`perspective(800px) rotateX(${U.rotateX}deg) rotateY(${U.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(U.rotateX,U.rotateY),transition:"transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.25s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),I=o.useCallback(H=>{if(da())return;const U=G(H);if(!U)return;const pe=Q.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";T({transform:`perspective(800px) rotateX(${U.rotateX}deg) rotateY(${U.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:S(U.rotateX,U.rotateY),transition:pe})},[]),Z=o.useCallback(()=>{clearTimeout(P.current),Q.current=!1,T({transform:"perspective(800px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.08)",transition:"transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),le=o.useCallback(()=>q(null),[]),oe=o.useMemo(()=>{const H=y("passCard.planSuffix","\uC774\uC6A9\uAD8C"),U=E.replace("\uC774\uC6A9\uAD8C","").replace(H==="\uC774\uC6A9\uAD8C"?"":H,"").trim(),pe=U.match(/^(.*?)(일|년)$/);return pe?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:pe[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:pe[2]==="\uB144"?y("passCard.unitYear","\uB144"):y("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:U})},[E,y]),de=o.useMemo(()=>{const H=ia(N);if(!H)return null;const U=H.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!U)return n.jsx("span",{className:"h1",children:H});const[,pe,Ee,ge]=U;return n.jsxs(n.Fragment,{children:[pe&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:pe}),n.jsx("span",{className:"h1 pass-card__price-amount",children:Ee}),ge.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:ge.trim()})]})},[N]),re=o.useCallback(()=>{O&&q(H=>{if(H)return null;const U=L.current?.getBoundingClientRect();if(!U)return null;const pe=50;return{left:U.left,right:U.right,width:U.width,height:U.height,x:U.x,y:U.y+pe,top:U.top+pe,bottom:U.bottom+pe}})},[O]),z=o.useCallback(H=>{O&&(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),re())},[O,re]),ne=[{items:[...k?[{label:y("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{k(),q(null)},closeOnSelect:!0}]:[],...v?[{label:y("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{v(),q(null)},closeOnSelect:!0}]:[],...B?[{label:y("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{B(),q(null)},closeOnSelect:!0}]:[]]}];return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card-frame",children:n.jsxs("div",{ref:L,className:`pass-card pass-card--${c}${O?" pass-card--clickable":""}`,style:$,onMouseEnter:M,onMouseMove:I,onMouseLeave:Z,onPointerUp:H=>{H.pointerType==="touch"&&Z()},onPointerCancel:H=>{H.pointerType==="touch"&&Z()},onClick:re,onKeyDown:O?z:void 0,role:O?"button":void 0,tabIndex:O?0:void 0,"aria-label":e,"aria-haspopup":O?"menu":void 0,"aria-expanded":O?!!J:void 0,children:[d??f2(A,E,D),!m&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card__top",children:n.jsxs("div",{className:"pass-card__top-left",children:[n.jsx("img",{src:V??m2[A],className:"pass-card__logo",alt:A==="manager"?y("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):y("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),n.jsxs("div",{className:"pass-card__plan",children:[n.jsx("div",{children:oe}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:D?y("passCard.labeledPlan",{label:D}):y("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),N?n.jsxs("div",{className:"pass-card__price-area",children:[R&&n.jsx("span",{className:"pass-card__discount body-3",children:R}),n.jsxs("div",{className:"pass-card__price",children:[F&&n.jsx("span",{className:"pass-card__price-original body-3",children:ia(F)}),de]})]}):K?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:K.remainingLabel}),K.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:K.percent}),n.jsx("span",{className:"h5b pass-card__usage-symbol",children:"%"})]})]}):n.jsx("div",{className:"pass-card__copyright caption-2","aria-hidden":"true",children:"\xA9 IHAB Corp. All rights reserved."})]})]})}),J&&n.jsx(vn,{anchorRect:J,onClose:le,ariaLabel:y("tooltip.menu","\uBA54\uB274"),children:n.jsx(Oa,{columns:ne,onClose:le,size:"small"})})]})}const g2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function b2(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,a=Lt(g2,jn,Tn);return n.jsxs("div",{ref:a,className:"pass-card-bg pass-card-bg-sound-line","aria-hidden":"true",children:[n.jsxs("svg",{className:"pass-card-bg-sound-line__svg",viewBox:"0 0 500 300",preserveAspectRatio:"xMidYMid slice",xmlns:"http://www.w3.org/2000/svg",children:[n.jsx("defs",{children:n.jsxs("linearGradient",{id:t,x1:"0",y1:"0",x2:"1",y2:"0",children:[n.jsx("stop",{offset:"20%",stopColor:"var(--color-main)"}),n.jsx("stop",{offset:"80%",stopColor:"var(--color-sub)"})]})}),n.jsx("g",{transform:"translate(25, 45)",children:n.jsx("path",{d:"M -30 150 C 40 80, 100 220, 160 150 S 280 80, 340 150 S 460 220, 510 150",fill:"none",stroke:`url(#${t})`,strokeWidth:"50",strokeLinecap:"round"})})]}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-line__symbol",style:{"--symbol-url":`url("${za}")`}})]})}const y2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function v2(e={}){const t=Lt(y2,jn,Tn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-talk-v1","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--left"}),n.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--right"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk-v1__symbol",style:{"--symbol-url":`url("${za}")`}})]})}function x2(e,t){if(e){if(t==="manager_pro")return n.jsx(v2,{});if(t==="manager_standard")return n.jsx(b2,{});if(t==="manager_lite")return n.jsx(au,{})}}function _2(e){const t=ia(e);if(!t)return null;const a=t.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!a)return t;const[,r,l,s]=a;return n.jsxs(n.Fragment,{children:[r&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:r}),l,s.trim()&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:s.trim()})]})}function w2(e){const{t}=_e.useTranslation(),a=t("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),r=t("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:l,onSelect:s,period:i="monthly",ownedCodes:u}=e||{},c=v=>!!v&&!!u?.includes(v),d=v=>v.onceOnly??/오픈\s*특가/.test(v.label??""),m=(l.tiers||[]).some(v=>d(v)&&c(v.code)),p=v=>{const B=v.prices?v.prices[i]:v.price;return B?(l.tiers||[]).some(y=>!!y.badge&&y.originals?.[i]===B):!1},C=l.colorToken?`var(--color-${l.colorToken})`:"var(--color-gray)",b=t("payment.plan.freePrice","\uBB34\uB8CC"),x=t("payment.products.mgrEnterprise.tier.price","\uBB38\uC758"),f=v=>v.prices?v.prices[i]:v.price,h=(l.tiers||[]).length>0&&(l.tiers||[]).every(v=>{const B=f(v);return B==="\uBB34\uB8CC"||B===b||B==="0\uC6D0"||typeof B=="string"&&/\d/.test(B)&&!/[1-9]/.test(B)}),_=(l.tiers||[]).length>0&&(l.tiers||[]).every(v=>{const B=f(v);return B==="\uBB38\uC758"||B===x}),g=l.group==="org",k=g?"manager":"speechear";return n.jsxs("div",{className:"payment-plan__card",style:{borderColor:C,"--plan-color":C},children:[l.cardBadge&&n.jsx("div",{className:"payment-plan__card-badge",children:n.jsx($t,{label:l.cardBadge,variant:"main",size:"medium",fill:"soft"})}),n.jsxs("div",{className:"payment-plan__title",children:[n.jsx("p",{className:"payment-plan__quote body-3b",style:{color:C},children:l.quote||"\xA0"}),n.jsx("h3",{className:"payment-plan__title-heading h1",children:l.tier??l.title}),n.jsx("p",{className:"payment-plan__subtitle body-3",children:l.subtitle})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.recommendedFor","\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(l.recommendedFor||[]).map((v,B)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(tt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:C}}),v]},B))})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.features","\uD575\uC2EC \uAE30\uB2A5")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(l.features||[]).map((v,B)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(tt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:C}}),v]},B))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:h?null:_?n.jsx(fe,{htmlType:"button",className:"payment-plan__contact-button",label:t("payment.plan.contact",{defaultValue:"\uBB38\uC758\uD558\uAE30"}),variant:"main",size:56,onClick:()=>l.tiers?.[0]&&s?.({...l.tiers[0],productId:l.id,productTitle:l.title})}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"payment-plan__pricing-list",children:(l.tiers||[]).map(v=>{const B=v.label||a,y=d(v),w=y||v.openPromo===!0,A=B.replace(/^오픈\s*특가\s*/,"")||a,E=v.prices?v.prices[i]:v.price,D=v.badge?w?`${r}
|
|
823
|
+
${v.badge}`:v.badge:void 0;if(y&&c(v.code))return null;if(!v.badge&&!m)return p(v)?null:n.jsxs("div",{className:`payment-plan__pricing-row payment-plan__pricing-row--static${v.highlight?" payment-plan__pricing-row--highlight":""}`,children:[n.jsx("div",{className:"payment-plan__pricing-row-title",children:n.jsx("div",{className:"payment-plan__pricing-row-label h5b",children:v.label})}),n.jsx("div",{className:"payment-plan__pricing-row-price",children:n.jsx("span",{className:"payment-plan__pricing-current h1",children:_2(E)})})]},v.id);const N=l.tier??(g?l.title:void 0),F=n.jsx(su,{showPrice:!0,product:{type:k,code:v.code,name:A,label:N,price:E,originalPrice:v.originals?.[i]??void 0,discountLabel:D},bg:x2(g,l.id)}),R=()=>s?.({...v,productId:l.id,productTitle:l.title,preview:F});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:R,onKeyDown:s?K=>{K.target===K.currentTarget&&(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),R())}:void 0,role:s?"button":void 0,tabIndex:s?0:void 0,children:F},v.id)})})})})]})}function B2({variant:e="default"}){return n.jsxs("div",{className:`pass-card-bg pass-card-bg--${e}`,"aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--1"}),n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--2"}),n.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--3"})]})}var Mo='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_IHAB_en" xmlns="http://www.w3.org/2000/svg" width="765.08" height="240" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 765.08 240"><defs><linearGradient id="linear-gradient" x1="62.99" y1="62.99" x2="190.71" y2="190.71" gradientUnits="userSpaceOnUse"><stop offset=".2" stop-color="%23499cdf"/><stop offset=".8" stop-color="%234dcdc0"/></linearGradient></defs><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="url(%23linear-gradient)"/><g id="text"><path d="M316.21,190.6h-36.74V50.61h36.74v139.99Z"/><path d="M335.16,50.61h36.74v55.11h51.63v-55.11h36.93v139.99h-36.93v-55.11h-51.63v55.11h-36.74V50.61Z"/><path d="M473.99,190.6l46.6-139.99h50.08l46.41,139.99h-39.64l-8.31-27.46h-46.99l-8.31,27.46h-39.83ZM560.62,135.3l-14.5-46.99h-1.16l-14.31,46.99h29.97Z"/><path d="M631,50.61h59.94c31.9,0,48.73,13.73,48.73,35.19,0,15.47-11.02,27.26-26.88,30.55v1.35c17.6.58,32.29,13.54,32.29,33.45,0,22.82-18.56,39.45-49.11,39.45h-64.97V50.61ZM701.77,93.53c0-8.89-6.96-13.92-17.02-13.92h-17.02v27.84h16.44c10.25,0,17.6-5.03,17.6-13.92ZM706.22,146.51c0-10.25-7.35-16.05-19.14-16.05h-19.34v30.55h18.76c13.15,0,19.72-5.03,19.72-14.5Z"/></g></svg>';const lu={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#c9c9c9"};function k2(){const e=Lt(lu,jn,Tn);return n.jsx("div",{ref:e,className:"pass-card-bg pass-card-bg-ihab","aria-hidden":"true",children:n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-ihab__symbol-top",style:{"--symbol-url":`url("${Mo}")`}})})}const iu={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function A2(e={}){const t=Lt(iu,jn,Tn);return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-left-color-grid","aria-hidden":"true",children:[n.jsx("div",{className:"pass-card-bg-left-color-grid__bar"}),n.jsx("div",{className:"pass-card-bg-left-color-grid__grid"}),n.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-left-color-grid__symbol",style:{"--symbol-url":`url("${za}")`}})]})}function uu({keys:e,anchor:t="top-right",scale:a,className:r=""}){const l=Array.isArray(e)?e:[e];return n.jsx("span",{className:we("shortcut-badge",`shortcut-badge--${t}`,r),style:a===void 0?void 0:{"--shortcut-badge-scale":String(a)},children:l.map((s,i)=>n.jsxs("span",{className:"shortcut-badge__group",children:[i>0&&n.jsx("span",{className:"shortcut-badge__plus",children:"+"}),n.jsx("kbd",{className:"shortcut-badge__key",children:s})]},`${s}-${i}`))})}const Wa=(e,t,a)=>e+(t-e)*a;function N2({speakers:e,size:t=300,viewT:a=0,activeSpeakerId:r=null,playedIds:l,selectedId:s=null,answerId:i=null,showFeedback:u=!1,pulseSelected:c=!1,pulseSelectedDuration:d,pulseScale:m,clickable:p=!1,onSelectSpeaker:C,buttonSize:b=40,showIcon:x=!0,onCenterClick:f,centerLabel:h,centerDisabled:_=!1,centerAttention:g=!1,shortcutAnchor:k="top-right",shortcutScale:v,scaleShortcut:B=!1}){const{t:y}=_e.useTranslation(),w=Math.max(0,Math.min(1,a)),A=t/2,E=110/300,D=.18,N=H=>t*(E+(H-1)*D),F=H=>{const U=N(H.row??1),pe=H.angleDeg*Math.PI/180;return{x:A+U*Math.cos(pe),y:A+U*Math.sin(pe)}},R=Math.max(...e.map(H=>H.row??1),1),K=t*.08,L=t*.1,$=t*.24,T=t-2*K,J=t-L-$,q=t-$/2,O=o.useMemo(()=>[...new Set(e.map(H=>H.deg))].sort((H,U)=>H-U),[e]),Q=O.length,P=Math.max(68,Q>1?T/(Q-1):0),V=o.useMemo(()=>new Map(O.map((H,U)=>[H,U])),[O]),W=H=>{const U=V.get(H.deg)??0,pe=A+(U-(Q-1)/2)*P,Ee=R>1?Math.min(68,J/(R-1)):0,ge=Ee*(R-1),me=L+(J-ge)/2,ie=R===1?L+J*.4:me+(R-(H.row??1))*Ee;return{x:pe,y:ie}},G=H=>{const U=F(H),pe=W(H);return{x:Wa(U.x,pe.x,w),y:Wa(U.y,pe.y,w)}},S={x:A,y:Wa(A,q,w)},M=Math.round(b*1.2),I=Math.round(Math.max(16,Math.min(80,b*.7))),Z=[],le=new Map;for(const H of e){const U=H.row??1;le.has(U)||le.set(U,[]),le.get(U).push(H)}for(const[H,U]of le.entries()){if(U.length<2)continue;const pe=[...U].sort((Oe,ct)=>Oe.deg-ct.deg),Ee=pe.map(Oe=>G(Oe)),ge=pe.map(Oe=>Oe.deg),me=ge[ge.length-1]-ge[0],ie=me/(ge.length-1),be=360-me,he=pe.length>=3&&ie>0&&be<=ie*1.5,ue=Math.round(N(H)*1e3)/1e3,Me=(Oe,ct,rt,nt)=>{const mt=(ct.angleDeg-Oe.angleDeg+540)%360-180;if(mt===0)return`L ${nt.x} ${nt.y}`;if(w===0)return`A ${ue} ${ue} 0 0 ${mt>0?1:0} ${nt.x} ${nt.y}`;const Ne=(Oe.angleDeg+mt/2)*Math.PI/180,Ue={x:A+ue*Math.cos(Ne),y:A+ue*Math.sin(Ne)},ke={x:(rt.x+nt.x)/2,y:(rt.y+nt.y)/2},He={x:Wa(Ue.x,ke.x,w),y:Wa(Ue.y,ke.y,w)},Be={x:2*He.x-ke.x,y:2*He.y-ke.y};return`Q ${Be.x} ${Be.y} ${nt.x} ${nt.y}`},Ve=he?[...pe,pe[0]]:pe,Te=he?[...Ee,Ee[0]]:Ee;let qe=`M ${Te[0].x} ${Te[0].y}`;for(let Oe=1;Oe<Te.length;Oe++)qe+=" "+Me(Ve[Oe-1],Ve[Oe],Te[Oe-1],Te[Oe]);Z.push({key:`arc-${H}`,d:qe})}const oe=o.useMemo(()=>new Set(l??[]),[l]),de=H=>({idle:"",active:y("soundCompass.state.active","\uC18C\uB9AC \uB098\uB294 \uC911"),played:y("soundCompass.state.played","\uB4E4\uC74C"),correct:y("soundCompass.state.correct","\uC815\uB2F5"),wrong:y("soundCompass.state.wrong","\uC624\uB2F5")})[H],re=H=>{if(r===H.id)return"active";if(u){if(H.id===i)return"correct";if(H.id===s&&s!==i)return"wrong"}return oe.has(H.id)?"played":"idle"},z=H=>r===H.id?"loop":u?H.id===i?"loop":null:c&&H.id===s?"once":null,ne=(H,U)=>{switch(H){case"played":case"correct":return n.jsx(Rs,{size:U});case"wrong":return n.jsx(Us,{size:U});default:return n.jsx(qs,{size:U})}};return n.jsx("div",{className:"sound-compass",children:n.jsxs("div",{className:"sound-compass__compass-wrap",style:{width:t,height:t},children:[n.jsxs("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,className:"sound-compass__svg",children:[w===0&&e.map(H=>{const{x:U,y:pe}=G(H);return n.jsx("line",{x1:S.x,y1:S.y,x2:U,y2:pe,stroke:"#dde3ec",strokeWidth:"1"},H.id)}),Z.map(H=>n.jsx("path",{d:H.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},H.key))]}),g&&!_&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:M,height:M,left:S.x-M/2,top:S.y-M/2}}),f?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${_?" sound-compass__center--disabled":""}`,style:{width:M,height:M,left:S.x,top:S.y},"aria-label":h,"aria-disabled":_||void 0,tabIndex:_?-1:0,onClick:_?void 0:f,children:n.jsx(Ir,{size:I,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:M,height:M,left:S.x,top:S.y},children:n.jsx(Ir,{size:I,color:"currentColor",strokeWidth:1.5})}),e.map((H,U)=>{const{x:pe,y:Ee}=G(H),ge=re(H),me=z(H),ie={...v!==void 0||B?{"--shortcut-badge-scale":String(v??Math.max(.75,Math.min(3,b/56)))}:null,pointerEvents:p?"auto":"none",cursor:p?"pointer":"default",zIndex:ge!=="idle"?10:1},be=b,he=Math.round(Math.max(10,Math.min(56,be*.38))),ue=Math.round(Math.max(7,Math.min(18,be*.2))),Me=Math.round(Math.max(10,Math.min(56,be*.4))),Ve=x==="answered"&&(ge==="played"||ge==="correct"||ge==="wrong"),Te=x===!0||Ve,qe=!Ve;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...ie,left:pe-be/2,top:Ee-be/2},children:[me&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${ge}`+(me==="once"?" sound-compass__pulse--once":""),style:{width:be,height:be,...me==="once"&&d!==void 0?{"--sc-pulse-duration-once":`${d}ms`}:null,...m!==void 0?{"--sc-pulse-scale":String(m)}:null}}),n.jsxs("button",{type:"button",tabIndex:p?0:-1,"aria-disabled":p?void 0:!0,onClick:p?()=>C?.(H.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${ge}`,style:{width:be,height:be},"aria-label":de(ge)?`${H.label}, ${de(ge)}`:H.label,"aria-pressed":s!=null?H.id===s:void 0,children:[Te&&ne(ge,he),qe&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:x===!0?ue:Me},children:U+1})]}),H.shortcut&&n.jsx(uu,{keys:H.shortcut,anchor:k,className:"sound-compass__speaker-shortcut"})]},H.id)})]})})}function E2({children:e,position:t="top-left",size:a=24,className:r=""}){return n.jsx("span",{className:we("circle-badge","circle-badge--number",`circle-badge--${a}`,`circle-badge--${t}`,r),children:e})}function D2({orientation:e="horizontal",label:t,className:a=""}){const r=we("divider",`divider--${e}`,t&&e==="horizontal"?"divider--labeled":"",a);return e==="vertical"?n.jsx("div",{className:r,role:"separator","aria-orientation":"vertical"}):t?n.jsxs("div",{className:r,role:"separator","aria-orientation":"horizontal",children:[n.jsx("span",{className:"divider__line"}),n.jsx("span",{className:"divider__label caption-1",children:t}),n.jsx("span",{className:"divider__line"})]}):n.jsx("div",{className:r,role:"separator","aria-orientation":"horizontal"})}function cu({checked:e,onChange:t,name:a,value:r,disabled:l=!1,label:s,className:i=""}){const u=o.useId();return n.jsxs("label",{className:`radio${l?" radio--disabled":""} ${i}`.trim(),htmlFor:u,children:[n.jsx("input",{id:u,type:"radio",name:a,value:r,checked:e,disabled:l,onChange:c=>t?.(c.target.checked)}),n.jsx("span",{className:"radio__dot"}),s&&n.jsx("span",{className:"radio__label body-2",children:s})]})}function S2({options:e,value:t,onChange:a,name:r,disabled:l=!1,direction:s="vertical",className:i="",ariaLabel:u}){const c=o.useId(),d=r??`radio-group-${c}`;return n.jsx("div",{className:`radio-group radio-group--${s} ${i}`.trim(),role:"radiogroup","aria-label":u,children:e.map(m=>n.jsx(cu,{name:d,value:m.value,checked:t===m.value,disabled:l||m.disabled,label:m.label,onChange:p=>{p&&a?.(m.value)}},m.value))})}const j2={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function T2({tone:e="info",title:t,message:a,children:r,dismissible:l=!1,onDismiss:s,live:i,className:u=""}){const{t:c}=_e.useTranslation(),[d,m]=o.useState(!1),p=o.useRef(null),C=o.useCallback(()=>{const g=p.current;g&&g.contains(document.activeElement)&&sr(g),m(!0),s?.()},[s]);if(d)return null;const b=we("alert",`alert--${e}`,u),x=i??(e==="danger"||e==="warning"?"assertive":"polite"),f=x==="assertive"?"alert":x==="polite"?"status":void 0,h=!!t,_=!!(a||r);return n.jsxs("div",{ref:p,className:b,role:f,children:[n.jsxs("div",{className:"alert__body",children:[n.jsxs("div",{className:"alert__header",children:[n.jsx(tt,{icon:j2[e],size:20,className:"alert__icon"}),h&&n.jsx("span",{className:"alert__title body-2",children:t}),!h&&_&&n.jsx("div",{className:"alert__message body-3",children:a||r})]}),h&&_&&n.jsx("div",{className:"alert__message alert__message--indented body-3",children:a||r})]}),l&&n.jsx("button",{type:"button",className:"alert__dismiss",onClick:C,"aria-label":c("common.close","\uB2EB\uAE30"),children:"\xD7"})]})}const M2={ready:"search",guide:"info",error:"circle-alert"};function L2(e,t){const a=t.filter(Boolean);if(a.length===0)return e;const r=[];let l=0,s=0;for(const i of a){const u=e.indexOf(i,l);u<0||(u>l&&r.push(e.slice(l,u)),r.push(n.jsx("strong",{className:"search-summary__em body-2",children:i},s++)),l=u+i.length)}return l<e.length&&r.push(e.slice(l)),r}function $2({status:e="guide",label:t,children:a,emphasis:r,icon:l,className:s=""}){const i=l===!1?null:l??M2[e],u=we("search-summary",`search-summary--${e}`,s),c=t??a,d=typeof c=="string"&&r&&r.length>0?L2(c,r):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[i!=null&&n.jsx(tt,{icon:i,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:d})]})}function Ha({title:e,items:t}){const{t:a}=_e.useTranslation(),{anchorRect:r,openAt:l,close:s}=Pa(),i=o.useRef(null),u=vo(!!r,(c,d)=>{c&&d?l(i.current?.querySelector("button")??d):s()},i);return n.jsxs("span",{ref:i,style:{display:"contents"},children:[n.jsx(fe,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!r,ariaLabel:a("common.info","\uC124\uBA85"),onPointerEnter:c=>{ca(c)||l(c.currentTarget)},onPointerLeave:c=>{ca(c)||s()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{da()||l(c.currentTarget)},onBlur:s}),r&&n.jsx(Kn,{title:e,items:t,showIndex:t.length>1,anchorRect:r,onClose:s})]})}function R2({items:e=[],value:t,onChange:a,className:r="",size:l=40}){const s=o.useId(),{t:i}=_e.useTranslation(),u=o.useRef(null),c=e.find(f=>!f.disabled)?.key,d=e.some(f=>f.key===t)?t:c??e[0]?.key,m=e.find(f=>f.key===d&&!f.disabled)?.key??c,p=()=>Array.from(u.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),C=(f,h=p())=>{if(h.length===0)return;const _=(f%h.length+h.length)%h.length;h[_]?.focus(),h[_]?.click()},b=f=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(f.key))return;f.preventDefault();const h=p(),_=h.indexOf(f.currentTarget);f.key==="ArrowRight"||f.key==="ArrowDown"?C(_+1,h):f.key==="ArrowLeft"||f.key==="ArrowUp"?C(_-1,h):f.key==="Home"?C(0,h):C(h.length-1,h)},x=e.find(f=>f.key===d);return n.jsxs("div",{className:`tabs ${r}`.trim(),children:[n.jsx("div",{ref:u,className:`tabs__list tabs__list--${l}`,role:"tablist","aria-label":i("tabs.ariaLabel","\uD0ED"),children:e.map(f=>n.jsx("button",{id:`tabs__tab-${s}-${f.key}`,type:"button",role:"tab","aria-selected":f.key===d,"aria-controls":`tabs__panel-${s}-${f.key}`,disabled:f.disabled,tabIndex:f.key===m?0:-1,className:`tabs__tab body-2${f.key===d?" tabs__tab--active":""}`,onClick:()=>{f.key!==t&&a?.(f.key)},onKeyDown:b,children:f.label},f.key))}),x&&n.jsx("div",{id:`tabs__panel-${s}-${x.key}`,role:"tabpanel","aria-labelledby":`tabs__tab-${s}-${x.key}`,tabIndex:0,className:"tabs__panel",children:x.panel},x.key)]})}const P2={xs:12,sm:16,md:20,lg:28,xl:36};function I2(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"":t.length===1?[...t[0]].slice(0,2).join("").toUpperCase():([...t[0]][0]+[...t[t.length-1]][0]).toUpperCase()}function F2({src:e,name:t,size:a="md",shape:r="circle",className:l=""}){const{t:s}=_e.useTranslation(),[i,u]=o.useState(null),c=!!e&&i===e,d=t?I2(t):"",m=!!e&&!c,p=!m&&!!d,C=t||s("avatar.ariaLabel","\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0");return n.jsxs("span",{className:`avatar avatar--${a} avatar--${r} ${l}`.trim(),role:"img","aria-label":C,children:[m&&n.jsx("img",{className:"avatar__image",src:e,alt:C,onError:()=>u(e??null)}),!m&&p&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:d}),!m&&!p&&n.jsx(tt,{icon:"user-round",size:P2[a],className:"avatar__icon"})]})}function O2(e,t){if(!t)return!0;const a=t.split(",").map(s=>s.trim()).filter(Boolean);if(a.length===0)return!0;const r=e.name.toLowerCase(),l=e.type.toLowerCase();return a.some(s=>{const i=s.toLowerCase();return i.startsWith(".")?r.endsWith(i):i.endsWith("/*")?l.startsWith(i.slice(0,-1)):l===i})}function z2({onFilesSelected:e,accept:t,multiple:a=!1,disabled:r=!1,showFileList:l=!0,files:s,onRemove:i,className:u=""}){const{t:c}=_e.useTranslation(),d=o.useRef(null),[m,p]=o.useState(!1),[C,b]=o.useState([]),x=s??C,f=y=>{if(!y||y.length===0)return;const w=Array.from(y).filter(E=>O2(E,t));if(w.length===0)return;const A=a?w:w.slice(0,1);if(s===void 0){const E=a?[...x,...A]:A;b(E),e?.(E)}else e?.(A)},h=y=>{y.preventDefault(),!r&&p(!0)},_=y=>{y.preventDefault(),p(!1)},g=y=>{y.preventDefault(),p(!1),!r&&f(y.dataTransfer.files)},k=y=>{const w=y.target;try{f(w.files)}finally{w.value=""}},v=()=>{r||d.current?.click()},B=y=>{if(!r&&(i?.(y),s===void 0)){const w=x.filter((A,E)=>E!==y);b(w),i||e?.(w)}};return n.jsxs("div",{className:`file-upload ${u}`.trim(),children:[n.jsxs("div",{className:we("file-upload__dropzone",m&&"file-upload__dropzone--dragging",r&&"file-upload__dropzone--disabled"),role:"button",tabIndex:r?-1:0,"aria-disabled":r,onClick:v,onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),v())},onDragOver:h,onDragLeave:_,onDrop:g,children:[n.jsx(tt,{icon:"upload",size:24,className:"file-upload__icon"}),n.jsx("span",{className:"file-upload__prompt body-2",children:c("fileUpload.dragPrompt","\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC")}),n.jsx("button",{type:"button",className:"file-upload__browse-button body-3",disabled:r,onClick:y=>{y.stopPropagation(),v()},children:c("fileUpload.browseButton","\uD30C\uC77C \uC120\uD0DD")}),n.jsx("input",{ref:d,type:"file",className:"file-upload__input",accept:t,multiple:a,disabled:r,onChange:k,tabIndex:-1})]}),l&&x.length>0&&n.jsx("ul",{className:"file-upload__list",children:x.map((y,w)=>n.jsxs("li",{className:"file-upload__list-item body-3",children:[n.jsx("span",{className:"file-upload__file-name body-3",children:y.name}),n.jsx("button",{type:"button",className:"file-upload__remove-button","aria-label":c("fileUpload.removeAriaLabel",{name:y.name}),disabled:r,onClick:()=>B(w),children:n.jsx(tt,{icon:"x",size:14})})]},`${y.name}-${w}`))})]})}function W2({items:e,className:t=""}){const{t:a}=_e.useTranslation();return n.jsx("nav",{className:`breadcrumb ${t}`.trim(),"aria-label":a("breadcrumb.ariaLabel","\uC774\uB3D9 \uACBD\uB85C"),children:n.jsx("ol",{className:"breadcrumb__list",children:e.map((r,l)=>{const s=l===e.length-1;return n.jsxs("li",{className:"breadcrumb__item",children:[s?n.jsx("span",{className:"breadcrumb__current body-3","aria-current":"page",children:r.label}):r.href?n.jsx("a",{className:"breadcrumb__link body-3",href:r.href,target:r.target,rel:r.rel??(r.target==="_blank"?"noopener noreferrer":void 0),onClick:r.onClick,children:r.label}):r.onClick?n.jsx("button",{type:"button",className:"breadcrumb__link body-3",onClick:r.onClick,children:r.label}):n.jsx("span",{className:"breadcrumb__text body-3",children:r.label}),!s&&n.jsx(tt,{icon:"chevron-right",size:14,className:"breadcrumb__separator"})]},l)})})})}const H2={small:14,medium:20,large:28};function V2({value:e,onChange:t,max:a=5,readOnly:r=!1,size:l="medium",ariaLabel:s,className:i=""}){const{t:u}=_e.useTranslation(),c=r||!t,[d,m]=o.useState(null),p=c?e:Number.isFinite(e)?Math.round(e):0,C=d??p,b=H2[l],x=y=>{y!==e&&t?.(y)},f=y=>{c||x(y)},h=y=>{c||da()||m(y)},_=o.useRef(null),g=y=>{const w=Math.min(a,Math.max(1,y));x(w),Array.from(_.current?.querySelectorAll("[data-star]")??[]).find(A=>A.dataset.star===String(w))?.focus()},k=y=>{if(!c){switch(y.key){case"ArrowRight":case"ArrowUp":g((p||0)+1);break;case"ArrowLeft":case"ArrowDown":g((p||1)-1);break;case"Home":g(1);break;case"End":g(a);break;default:return}y.preventDefault()}},v=p>=1&&p<=a?Math.round(p):1,B=()=>{c||m(null)};return n.jsx("div",{className:`rating rating--${l}${c?" rating--readOnly":""} ${i}`.trim(),ref:_,onKeyDown:k,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:a}):s??u("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:B,onPointerUp:y=>{y.pointerType==="touch"&&B()},onPointerCancel:y=>{y.pointerType==="touch"&&B()},children:Array.from({length:a},(y,w)=>{const A=w+1,E=Math.max(0,Math.min(1,C-w)),D=E>0&&E<1,N=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(tt,{icon:"star",size:b,className:"rating__star rating__star--empty"}),E>0&&n.jsx("span",{className:`rating__star-fill${D?" rating__star-fill--half":""}`,style:D?{width:`${E*100}%`}:void 0,children:n.jsx(tt,{icon:"star",size:b,className:"rating__star rating__star--filled"})})]});return c?n.jsx("span",{className:"rating__item","aria-hidden":"true",children:N},A):n.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":p===A,"aria-label":u("rating.starLabel",{n:A}),"data-star":A,tabIndex:A===v?0:-1,onClick:()=>f(A),onMouseEnter:()=>h(A),children:N},A)})})}const q2=20,U2=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function G2({value:e,onChange:t,palette:a=U2,size:r=40,className:l="",ariaLabel:s}){const{t:i}=_e.useTranslation();return n.jsx("div",{className:`color-picker ${l}`.trim(),role:"group","aria-label":s,children:a.map(u=>{const c=e?.toLowerCase()===u.toLowerCase();return n.jsx("button",{type:"button",className:`color-picker__swatch color-picker__swatch--${r}`,style:{backgroundColor:u},onClick:()=>t(u),"aria-pressed":c,"aria-label":c?`${u} ${i("colorPicker.selected","\uC120\uD0DD\uB428")}`:u,children:c&&n.jsx(tt,{icon:"check",size:q2,className:"color-picker__check"})},u)})})}function du({icon:e,label:t,tooltip:a,wrapperStyle:r,color:l,bgColor:s,useHover:i=!0,iconSize:u="medium"}){const{t:c}=_e.useTranslation(),d=u==="small",m=we("category-icon",d?"category-icon--small":""),p=d?16:20,C=o.useRef(null),[b,x]=o.useState(!1),f=o.useMemo(()=>{const A=r&&typeof r=="object"?{...r}:{};return!l&&!s?A:{...A,...l?{color:l,"--t-item-fg":l}:{},...s?{"--t-item-bg":s}:{}}},[r,l,s]),h=a||t,_=i&&!!h,[g,k]=o.useState(null);o.useLayoutEffect(()=>{b&&k(C.current?.getBoundingClientRect()??null)},[b]),o.useEffect(()=>{if(!i&&b)try{x(!1)}catch{}},[i,b]),o.useEffect(()=>{if(!b)return;const A=E=>{const D=C.current;if(!D)return;const N=E.target;N&&!D.contains(N)&&x(!1)};return document.addEventListener("pointerdown",A,!0),()=>document.removeEventListener("pointerdown",A,!0)},[b]);const v=o.useCallback(()=>{i&&x(!0)},[i]),B=o.useCallback(()=>{i&&x(!1)},[i]),y=o.useCallback(()=>x(!1),[]),w=o.useCallback(A=>{if(A.key==="Escape"){x(!1);return}(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),x(E=>!E))},[]);return n.jsxs("span",{ref:C,className:we("category-icon__wrap",_&&"category-icon__wrap--interactive"),onPointerEnter:v,onPointerLeave:B,onFocus:v,onBlur:B,onKeyDown:w,role:"button",tabIndex:0,"aria-label":typeof h=="string"?c("common.descriptionFor",{name:h,defaultValue:`${h} \uC124\uBA85`}):void 0,"aria-haspopup":!!h,"aria-expanded":b,"data-tooltip-ignore":!0,children:[n.jsx(tt,{icon:e,label:t,className:m,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:f,size:p}),b&&h&&n.jsx(Dn,{anchorRect:g,text:typeof h=="string"?h:void 0,offset:8,onClose:y,className:"category-icon__tooltip",ariaLabel:typeof h=="string"?h:void 0})]})}let zn=null;function pr(e){if(zn&&zn!==e)try{zn()}catch{}return zn=e,()=>{zn===e&&(zn=null)}}function mr(e){if(zn===e){zn=null;try{e()}catch{}}}function hr(e,t){let a=()=>{};const r=new Promise(u=>{a=u});if(typeof e!="string"||e.trim()===""){Mt("one-shot-empty-url","[core] playOneShot \uC5D0 \uBE48 \uC8FC\uC18C\uAC00 \uC654\uB2E4 \u2014 \uC548 \uD2BC\uB2E4. \uBD80\uB974\uB294 \uCABD\uC774 \uC8FC\uC18C\uB97C \uC5BB\uAE30 \uC804\uC5D0 \uBD88\uB800\uB2E4.",new Error("playOneShot(empty)").stack),a(!1);try{t?.(!1)}catch{}return{el:{},stop:()=>{},done:r}}let l=!1;const s=u=>{if(!l){l=!0;try{t?.(u)}catch{}a(u)}};let i;try{i=new Audio(e)}catch{return s(!1),{el:{},stop:()=>{},done:r}}i.onended=()=>s(!0),i.onerror=()=>s(!1);try{i.play().catch(()=>s(!1))}catch{s(!1)}return{el:i,stop:()=>{try{i.pause()}catch{}s(!1)},done:r}}function K2(e,t){if(!e)return{previewCodes:[],previewBucket:null};const a=e,r=i=>i.map(u=>u?.contextCode||u?.context_code).filter(Boolean).map(String);if(t==="LISTEN_IN_NOISE"){const i=a.sentences||a.items||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}if(t==="SHORT_STORY"){const i=a.items||a.sentences||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"SHORT_S"}}if(t==="LONG_STORY"){const i=a.items||a.sentences||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LONG"}}if(t==="ORDERING_SENTENCE"){const i=a.sentences||a.items||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}const l=a.sentences||a.items||[],s=r(Array.isArray(l)?l:[]);return s.length===0&&(a.contextCode||a.context_code)&&s.push(String(a.contextCode||a.context_code)),{previewCodes:s,previewBucket:null}}function Y2(e,t){const[a,r]=o.useState(!1),[l,s]=o.useState(-1),[i,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),d=o.useRef(!1),m=o.useRef(null),p=o.useRef(null),[C,b]=o.useState(!1),x=o.useRef([]),{previewCodes:f,previewBucket:h}=K2(e,t),_=`${f.join(",")}|${h??""}`,g=o.useMemo(()=>i.key===_?i.urls:[],[i,_]);o.useEffect(()=>{if(!f.length)return;let v=!1;return(async()=>{const B=[],y=[];for(const w of f)try{const A=yl(w,h);if(!A){B.push("");continue}let E=null;try{E=await vl(A)}catch{}if(!E)try{const D=await xl(A);D&&(E=URL.createObjectURL(D),y.push(E))}catch{}B.push(E??"")}catch{B.push("")}v?y.forEach(w=>{try{URL.revokeObjectURL(w)}catch{}}):(x.current.forEach(w=>{try{URL.revokeObjectURL(w)}catch{}}),x.current=y,u({key:_,urls:B}))})(),()=>{v=!0}},[f.join(","),h]),o.useEffect(()=>()=>{x.current.forEach(v=>{try{URL.revokeObjectURL(v)}catch{}}),x.current=[]},[]);const k=o.useCallback(async v=>{if(v.stopPropagation(),v.preventDefault(),d.current){m.current&&mr(m.current),d.current=!1;try{c.current?.pause()}catch{}r(!1),s(-1);return}if(!g.filter(Boolean).length)return;let B=null;const y=()=>{d.current=!1,B?.stop()};m.current=y;const w=pr(y);d.current=!0,r(!0);for(let A=0;A<g.length&&d.current;A++){const E=g[A];if(E&&(s(A),B=hr(E),c.current=B.el,!await B.done))break}w(),m.current===y&&(m.current=null,d.current=!1,r(!1),s(-1))},[g]);return o.useEffect(()=>()=>{m.current&&mr(m.current),d.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:a,playingIndex:l,previewUrls:g,previewHover:C,setPreviewHover:b,previewBtnRef:p,handlePreview:k}}const Z2=e=>{if(!e)return[];const t=typeof e.context=="string"&&e.context.trim()||typeof e.sentence=="string"&&e.sentence.trim()||typeof e.text=="string"&&e.text.trim()||"";if(t)return[String(t)];const a=e.sentences||e.items||e.questions||[];return Array.isArray(a)&&a.length>0?a.map(r=>{if(typeof r=="string")return r;if(r&&typeof r=="object"){const l=r;return l.sentence||l.text||l.context||l.question||l.title||""}return""}).filter(r=>typeof r=="string"&&r.trim().length>0).map(r=>r.trim()):[]};function Lo(e){const{index:t,type:a,trainingData:r,ariaLabel:l,depth:s,renderPopup:i,completed:u,completedIds:c,selectedIds:d,tooltipText:m,useDescriptionTooltip:p=!1,onRemove:C,hideCheckBadge:b=!1,showTypeLabel:x=!1,onComplete:f,onSelect:h,onMore:_,countLabelOverride:g,size:k="square"}=e||{},{t:v}=_e.useTranslation(),[B,y]=o.useState(!1),w=o.useRef(null),[A,E]=o.useState(!1);o.useEffect(()=>{w.current?.matches(":hover")&&E(!0)},[]);const{playing:D,playingIndex:N,previewUrls:F,previewHover:R,setPreviewHover:K,previewBtnRef:L,handlePreview:$}=Y2(r,a?.key),T=o.useCallback(()=>{h?h():y(!0)},[h]),J=o.useCallback(()=>y(!1),[]),q=o.useCallback(()=>E(!0),[]),O=o.useCallback(()=>E(!1),[]),Q=o.useCallback(()=>K(!0),[K]),P=o.useCallback(()=>K(!1),[K]),[V,W]=o.useState(null);o.useLayoutEffect(()=>{R&&W(L.current?.getBoundingClientRect()??null)},[R,L]);const[G,S]=o.useState(null);o.useLayoutEffect(()=>{A&&!B&&p&&S(w.current?.getBoundingClientRect()??null)},[A,B,p]);const M=o.useCallback(ke=>{ke.target===ke.currentTarget&&(ke.key==="Enter"||ke.key===" ")&&(ke.preventDefault(),T())},[T]),I=r||null,Z=o.useMemo(()=>{if(!p)return null;const ke=m?(Array.isArray(m)?m:[m]).filter(Boolean):null,He=ke&&ke.length>0?ke:Z2(I);return He&&He.length>0?He:null},[p,m,I]),le=o.useCallback(ke=>{ke.stopPropagation(),C?.()},[C]),oe=o.useCallback(ke=>ke.stopPropagation(),[]),de=o.useCallback(ke=>{typeof f=="function"&&f(ke)},[f]),re=u||(c&&r?.id!=null?c.has(String(r.id)):!1),z=!re&&(d!=null&&r?.id!=null?d.has(String(r.id)):!1);Li("speechear.popup.close",J);const ne=ql(),H=`${a?.label||""} ${t+1}`,U=I?.title||I?.name||H;let pe=a?.icon,Ee,ge="",me="";try{const ke=I?.category_0||I?.category_main_code||I?.category_main,He=I?.category_1||I?.category_sub_code||I?.category_sub,Be=ne.find(Se=>Se.key===ke);Be?.icon&&(pe=Be.icon),!Ee&&Be?.color&&(Ee={"--t-item-fg":Be.color}),!Ee&&I?.iconColor&&(Ee={"--t-item-fg":I.iconColor}),ge=Be?v(`topic.${Be.key}`,{defaultValue:Be.label||""}):"";try{const Se=Be?.subs?.find(Le=>Le.key===He);me=Se?v(`topic.sub.${Se.key}`,{defaultValue:Se.label||""}):""}catch{}}catch{}const ie=me?`${ge} / ${me}`:ge||a?.label||U,be=ke=>v("training.countQuestions",{n:ke,count:ke}),he=ke=>v("training.countSentences",{n:ke,count:ke});let ue="";try{if(I)if(a?.key==="LISTEN_IN_NOISE"){let ke=0;Array.isArray(I.items)&&I.items.length>0?ke=I.items.length:Array.isArray(I.sentences)&&I.sentences.length>0?ke=I.sentences.length:I.sentences&&(ke=1),ue=he(ke)}else if(a?.key==="SHORT_STORY"){let ke=1;Array.isArray(r?.items)?ke=r.items.length:Array.isArray(r?.raw&&r.raw?.items)?ke=r.raw.items.length:Array.isArray(I?.questions)?ke=I.questions.length:Array.isArray(I?.sentences)&&(ke=I.sentences.length),ue=be(ke)}else if(a?.key==="LONG_STORY"){let ke=1;if(Array.isArray(I.items)&&I.items.length>0){const He=I.items.reduce((Be,Se)=>{const Le=Se.questionItems;return Array.isArray(Le)?Be+Le.length:Array.isArray(Se.questions)?Be+Se.questions.length:Be},0);ke=He>0?He:I.items.length}else Array.isArray(I.questions)&&I.questions.length>0?ke=I.questions.length:Array.isArray(I.sentences)&&I.sentences.length>0&&(ke=I.sentences.length);ue=be(ke)}else if(a?.key==="ORDERING_SENTENCE"){let ke=1;Array.isArray(I.items)&&I.items.length>0?ke=I.items.length:Array.isArray(I.sentences)&&I.sentences.length>0&&(ke=I.sentences.length),ue=he(ke)}else Array.isArray(I.items)&&(ue=I.items.length>0?be(I.items.length):"")}catch{}const Me=k==="row",Ve=k==="list"||Me,Te=k==="compact",qe=k==="small",Oe=qe&&a?.key?$f().find(ke=>ke.key===a.key):void 0,ct=Oe?Ul[Oe.key]:void 0,rt=Oe?ct?v(`trainingType.${ct}.title`,{defaultValue:Oe.label}):Oe.label??"":"",nt=x&&a?.label&&a.label!==String(U)?String(a.label):qe&&rt&&rt!==String(U)?rt:"",mt=!!nt,Ne=g!==void 0?g:ue,Ue=[nt,typeof U=="string"?U:"",Ne].map(ke=>String(ke??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:w,className:`training-block-button${Ve?" training-block-button--list":""}${Me?" training-block-button--row":""}${Te?" training-block-button--compact":""}${qe?" training-block-button--small":""}${re?" training-block-button--completed":""}${z?" training-block-button--selected":""}${mt&&!qe?" training-block-button--withType":""}${qe&&!mt?" training-block-button--no-type-label":""}`,onClick:T,onPointerEnter:q,onPointerLeave:O,role:"button",tabIndex:0,onKeyDown:M,"aria-label":typeof l=="string"?l:Ue||void 0,title:!p&&m&&(Array.isArray(m)?m.filter(Boolean).join(`
|
|
824
|
+
`):m)||void 0,children:[n.jsxs("div",{className:"training-block-button__left",children:[x&&a?.label&&a.label!==String(U)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:a.label}),qe&&rt&&rt!==String(U)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:rt}),n.jsx(du,{icon:pe,label:U,tooltip:ie,wrapperStyle:Ee,iconSize:qe||Te?"small":"medium"}),!b&&(re||z)&&!(C&&A)&&n.jsx($t,{className:C?"training-block-button__check--removable":void 0,type:"dot",icon:"check",position:"top-left",size:"medium","aria-label":re?v("training.completed","\uD6C8\uB828 \uC644\uB8CC"):v("training.selected","\uC120\uD0DD\uB428")}),C&&n.jsx($t,{className:`training-block-button__remove${A?" is-hover":""}`,type:"dot",icon:"remove",position:"top-left",size:"medium","aria-label":v("common.remove","\uC81C\uAC70"),onClick:le}),n.jsx("div",{className:`training-block-button__title ${Te?"body-3":qe?"body-3b":"h3"}`,children:String(U)}),n.jsxs("div",{className:"training-block-button__description",children:[Ne?n.jsx("div",{className:`training-block-button__count ${qe?"caption-2":"caption-1"}`,children:Ne}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(tt,{icon:"chevron-right",label:v("training.next","\uB2E4\uC74C"),className:"training-block-button__chevron-icon",imgClassName:"training-block-button__chevron-icon-image",maskClassName:"training-block-button__chevron-icon-mask",svgClassName:"training-block-button__chevron-icon-svg",size:qe?12:20})})]}),(Ve&&!Me||qe)&&F.length>0&&n.jsx("div",{ref:L,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:oe,onPointerEnter:Q,onPointerLeave:P,children:n.jsx(fe,{htmlType:"button",size:qe?28:32,type:"dot",icon:D?"pause":"play",variant:qe?"transparent-lightGray":"default",useBorder:!1,selected:D,ariaLabel:String(U).trim()?D?v("training.stopFor",{name:U,defaultValue:`${U} \uC815\uC9C0`}):v("training.previewFor",{name:U,defaultValue:`${U} \uBBF8\uB9AC \uB4E3\uAE30`}):D?v("training.stop","\uC815\uC9C0"):v("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:$})})]}),_&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:ke=>{ke.stopPropagation(),_(ke)},children:n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(U).trim()?v("common.moreFor",{name:U}):v("common.more","\uB354\uBCF4\uAE30")})})]}),R&&n.jsx(Dn,{anchorRect:V,text:D?v("training.stop","\uC815\uC9C0"):v("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:P}),A&&!B&&p&&(Z?n.jsx(Kn,{anchorRect:G,items:Z,activeIndex:N,onClose:O}):I?.subTitle?n.jsx(Dn,{anchorRect:G,text:I.subTitle,offset:8,onClose:O}):null),B&&i&&i({trainingData:I,typeKey:a?.key??"",onClose:J,onComplete:de,popupTitle:String(U),popupSubTitle:a?.subTitle,depth:s!=null?String(s):void 0,popupIcon:pe,popupIconTooltip:String(ie),popupWrapperStyle:Ee})]})}const pu=200;function X2(e){return e.itemId?(Of()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function mu({plan:e,groups:t,anchorRect:a,offset:r=12,onClose:l}){const{t:s}=_e.useTranslation(),i=o.useMemo(()=>t?t.map((c,d)=>({key:c.key??c.type?.key??String(d),label:c.label,type:c.type,data:c.items??[]})).filter(c=>c.data.length>0):Wf(s).map(c=>{const d=(e?.items??[]).filter(m=>m.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:d.length,data:d.map(X2).filter(m=>m!=null)}}).filter(c=>c.pickedCount>0),[t,e?.items,s]);if(i.length===0)return null;const u=n.jsx("div",{className:"tooltip-training__box",children:n.jsx("div",{className:"tooltip-training__groups",children:i.flatMap(({key:c,label:d,type:m,data:p},C)=>[C>0?n.jsx("div",{className:"tooltip-training__divider"},`div-${c}`):null,n.jsxs("div",{className:"tooltip-training__section",children:[n.jsx("div",{className:"tooltip-training__section-header",children:n.jsx("span",{className:"tooltip-training__type-label body-3b",children:d})}),n.jsx("div",{className:"tooltip-training__items",children:p.map((b,x)=>n.jsx(Lo,{index:x,type:m,trainingData:b,size:"compact",hideCheckBadge:!0},String(b.id??x)))})]},c)])})});return a?n.jsx(vn,{anchorRect:a,offset:r,onClose:l,closeOnOutsideClick:!1,className:"tooltip-training",ariaLabel:s("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const J2=200;function Q2({icon:e,count:t,title:a,plan:r,tooltip:l=!0,hoverAccent:s=!1,className:i="",onClick:u,onMouseEnter:c,onMouseLeave:d}){const m=!!u||!!c||l&&!!r,p=we("count-tile",m&&"count-tile--interactive",m&&s&&"count-tile--accent",u&&"count-tile--clickable",i),C=o.useRef(null),[b,x]=o.useState(null),f=o.useRef(null),h=o.useRef(null),_=!!(b&&r&&l),g=o.useCallback(()=>{f.current&&(clearTimeout(f.current),f.current=null),h.current&&(clearTimeout(h.current),h.current=null)},[]),k=o.useCallback(()=>{g(),x(null)},[g]),v=o.useCallback(()=>{!l||!r||(g(),f.current=setTimeout(()=>{f.current=null,x(C.current?.getBoundingClientRect()??null)},pu))},[l,r,g]),B=o.useCallback(()=>{f.current&&(clearTimeout(f.current),f.current=null),!h.current&&(h.current=setTimeout(()=>{h.current=null,x(null)},J2))},[]);return o.useEffect(()=>()=>{g()},[g]),o.useEffect(()=>{(!l||!r)&&k()},[l,r,k]),o.useEffect(()=>{if(!_)return;const y=A=>A instanceof Element&&(C.current?.contains(A)||!!A.closest(".tooltip-training")),w=A=>{y(A.target)?g():B()};return document.addEventListener("pointerover",w,!0),()=>document.removeEventListener("pointerover",w,!0)},[_,g,B]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:C,className:p,onClick:u?y=>{k(),u(y)}:void 0,onKeyDown:u?y=>{y.key!=="Enter"&&y.key!==" "||(y.preventDefault(),y.currentTarget.click())}:void 0,onPointerEnter:y=>{y.pointerType==="touch"||y.pointerType==="pen"?k():v()},onMouseEnter:c,onMouseLeave:y=>{B(),d?.(y)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${a} ${t}`,children:[n.jsx(tt,{icon:e,size:20,className:"count-tile__icon"}),n.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:t})]}),b&&r&&n.jsx(mu,{plan:r,anchorRect:b,onClose:k})]})}let Va=0,hu="",$o="",qa=0;function Cu(){return fu(!1)}function ev(){return fu(!0)}function fu(e){const t=typeof document<"u";Va===0&&t&&(hu=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(qa===0&&($o=document.body.style.paddingRight),qa++,document.body.style.paddingRight="0px"),Va++;let a=!1;return()=>{a||(a=!0,Va=Math.max(0,Va-1),e&&t&&(qa=Math.max(0,qa-1),qa===0&&($o?document.body.style.paddingRight=$o:document.body.style.removeProperty("padding-right"))),Va===0&&t&&(document.body.style.overflow=hu))}}function tv(){return n.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round","aria-hidden":!0,children:n.jsx("path",{d:"M6 6l12 12M18 6 6 18"})})}function nv({open:e,onClose:t,ariaLabel:a,title:r,children:l,size:s="md",closeOnBackdrop:i=!0,closeOnEscape:u=!0,showClose:c=!0,className:d,contentClassName:m}){const{t:p}=_e.useTranslation(),C=o.useId(),b=o.useRef(null),x=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const g=document.activeElement,k=Cu(),v=b.current;return fo(v,g),v?.focus(),()=>{k();const B=document.activeElement;(!B||B===document.body||v&&v.contains(B))&&go(g)?.focus?.()}},[e]);const f=o.useRef(x),h=o.useRef(u);o.useEffect(()=>{f.current=x,h.current=u}),o.useEffect(()=>{if(e)return Gn(()=>{h.current&&f.current()})},[e]);const _=o.useRef(!1);return ho(b,e),!e||typeof document>"u"?null:cn.createPortal(n.jsx("div",{className:we("dialog",d),onPointerDown:i?g=>{_.current=g.target===g.currentTarget}:void 0,onMouseDown:g=>{g.target===g.currentTarget&&g.preventDefault()},onClick:i?g=>{const k=_.current;_.current=!1,k&&g.target===g.currentTarget&&x()}:void 0,children:n.jsxs("div",{ref:b,role:"dialog","aria-modal":"true","aria-label":r?void 0:a,"aria-labelledby":r?C:void 0,tabIndex:-1,className:we("dialog__surface",`dialog__surface--${s}`,m),onClick:g=>g.stopPropagation(),children:[r?n.jsx("div",{className:"dialog__header",children:n.jsx("h2",{id:C,className:"dialog__title h4b",children:r})}):null,c?n.jsx("button",{type:"button",className:"dialog__close","aria-label":p("common.close","\uB2EB\uAE30"),onClick:x,children:n.jsx(tv,{})}):null,n.jsx("div",{className:"dialog__body",children:l})]})}),document.body)}function av({columns:e,rows:t,rowKey:a,title:r,toolbar:l,empty:s,loading:i,caption:u,className:c=""}){const{t:d}=_e.useTranslation(),m=!i&&t.length===0;return n.jsxs("div",{className:we("board",c),children:[r||l?n.jsxs("div",{className:"board__head",children:[r?n.jsx("h2",{className:"board__title",children:r}):n.jsx("span",{}),l?n.jsx("div",{className:"board__toolbar",children:l}):null]}):null,n.jsxs("table",{className:"board__table",children:[u?n.jsx("caption",{className:"board__caption",children:u}):null,n.jsx("thead",{children:n.jsx("tr",{children:e.map(p=>n.jsx("th",{scope:"col",className:we("board__th",`board__cell--${p.headerAlign??p.align??"left"}`),style:p.width?{width:p.width}:void 0,children:p.header},p.key))})}),n.jsx("tbody",{children:i?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:i})}):m?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:s??d("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((p,C)=>n.jsx("tr",{className:"board__row",children:e.map(b=>n.jsx("td",{className:we("board__td",`board__cell--${b.align??"left"}`),children:b.render(p,C)},b.key))},a(p,C)))})]})]})}function rv({name:e,role:t,photo:a,media:r,credentials:l,size:s=190,className:i=""}){return n.jsxs("div",{className:we("person-card",i),children:[n.jsx("div",{className:"person-card__photo",style:{width:s,height:s},children:r??(a?n.jsx("img",{src:a,alt:t?`${e} ${t}`:e}):null)}),n.jsx("h3",{className:"person-card__name",children:e}),t?n.jsx("p",{className:"person-card__role",children:t}):null,l?.length?n.jsx("ul",{className:"person-card__credentials",children:l.map(u=>n.jsx("li",{children:u},u))}):null]})}function ov({groups:e,className:t=""}){return n.jsx("div",{className:we("timeline",t),children:e.map(a=>n.jsxs("section",{className:"timeline__group",children:[n.jsx("h3",{className:"timeline__title",children:a.title}),n.jsx("ul",{className:"timeline__rows",children:a.entries.map((r,l)=>n.jsxs("li",{className:"timeline__row",children:[r.label?n.jsx("span",{className:"timeline__label",children:r.label}):null,n.jsx("div",{className:"timeline__items",children:r.items.map((s,i)=>n.jsx("p",{children:s},i))})]},`${r.label??""}-${l}`))})]},a.title))})}function sv({title:e,kind:t,body:a,badge:r,badgeSrc:l,footer:s,width:i,className:u=""}){const c=r??(l?n.jsx("img",{src:l,alt:""}):null);return n.jsxs("div",{className:we("publication-card",u),style:i?{width:i,flexShrink:0}:void 0,children:[c?n.jsx("div",{className:"publication-card__badge","aria-hidden":"true",children:c}):null,n.jsx("h3",{className:"publication-card__title",children:e}),t?n.jsx("p",{className:"publication-card__kind",children:t}):null,n.jsx("p",{className:"publication-card__body",children:a}),s?n.jsx("div",{className:"publication-card__footer",children:s}):null]})}function lv({logo:e,alt:t,onDone:a,durationMs:r=3e3}){const l=$a(a);return o.useEffect(()=>{const s=setTimeout(()=>l.current?.(),r);return()=>clearTimeout(s)},[r,l]),n.jsx("div",{className:"splash-logo",style:{"--splash-logo-duration":`${r}ms`},"aria-hidden":"true",children:n.jsx("img",{src:e,alt:t,className:"splash-logo__image"})})}function iv({eyebrow:e,eyebrowIndex:t,title:a,description:r,level:l=2,tone:s="dark",className:i=""}){const u=l===1?"h1":"h2";return n.jsxs("div",{className:we("section-header",`section-header--${s}`,i),children:[e?n.jsxs("p",{className:"section-header__eyebrow",children:[t?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"section-header__index",children:t}),n.jsx("span",{"aria-hidden":!0,className:"section-header__rule"})]}):null,e]}):null,a?n.jsx(u,{className:"section-header__title",children:a}):null,r?n.jsx("div",{className:"section-header__description",children:r}):null]})}function uv({items:e,className:t=""}){return n.jsx("ul",{className:we("company-meta",t),children:e.map((a,r)=>n.jsxs("li",{className:"company-meta__item",children:[r>0?n.jsx("span",{"aria-hidden":!0,className:"company-meta__divider",children:"|"}):null,a]},a))})}function gu(e){return typeof e=="string"?e:e.label}function bu({value:e,onChange:t,suggestions:a,openOnFocus:r=!1,filterSuggestions:l,onSelectSuggestion:s,autoActiveFirst:i=!1}){const u=o.useId(),[c,d]=o.useState(!1),[m,p]=o.useState(-1),C=o.useRef(null),b=o.useMemo(()=>{if(!a.length)return[];const N=e??"";return l===!1?a:N?typeof l=="function"?l(a,N):a.filter(F=>gu(F).toLowerCase().includes(N.toLowerCase())):r?a:[]},[a,e,r,l]),[x,f]=o.useState(!1),h=o.useRef([]),_=x&&b.length===0?h.current:b;o.useEffect(()=>{_.length&&(h.current=_)},[_]);const g=o.useCallback(()=>f(!0),[]),k=o.useCallback(()=>f(!1),[]),v=i?0:-1;o.useEffect(()=>{c||p(v)},[c,v]),o.useEffect(()=>()=>{C.current&&clearTimeout(C.current)},[]);const B=m<_.length?m:v<_.length?v:-1,y=o.useCallback(N=>{s?s(N):t?.(gu(N)),d(!1)},[t,s]),w=o.useCallback(()=>d(!0),[]),A=o.useCallback(()=>{d(!0),p(v)},[v]),E=o.useCallback(()=>{C.current=setTimeout(()=>d(!1),120)},[]),D=o.useCallback(N=>{N.nativeEvent.isComposing||N.keyCode===229||(N.key==="ArrowDown"?(N.preventDefault(),d(!0),p(F=>Math.min(_.length-1,(F<_.length?F:v)+1))):N.key==="ArrowUp"?(N.preventDefault(),p(F=>Math.max(v,(F<_.length?F:_.length)-1))):N.key==="Enter"?B>=0&&y(_[B]):N.key==="Escape"&&c&&(N.preventDefault(),d(!1)))},[_,B,c,y,v]);return{listId:u,open:c,activeIdx:B,filtered:_,handleFocus:w,handleBlur:E,handleInput:A,handleKeyDown:D,handleSelect:y,handleCompositionStart:g,handleCompositionEnd:k}}const Ro=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Xn(e){const{value:t,defaultValue:a,name:r,inputRef:l,onChange:s,label:i,ariaLabel:u,ariaDescribedBy:c,required:d,placeholder:m,ghostText:p,ghostHint:C,type:b="text",disabled:x=!1,readOnly:f=!1,error:h,helperText:_,maxLength:g,size:k=40,variant:v="input",fullWidth:B=!1,newline:y=!1,multiline:w=!1,rows:A=3,leftIcon:E,rightIcon:D,clearable:N=!1,list:F,showCount:R=!0,className:K="",onFocus:L,onBlur:$,onKeyDown:T,onEnter:J,inputMode:q,autoComplete:O,autoFocus:Q,suggestions:P,filterSuggestions:V,onSelectSuggestion:W,autoActiveFirst:G,openOnFocus:S=!1}=e,M=f||x?void 0:P,{t:I}=_e.useTranslation(),Z=o.useId();!i&&!u&&Mt(`TextField:unnamed:${Z}`,"[ihab/TextField] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 label \uC774\uB098 ariaLabel \uC911 \uD558\uB098\uB97C \uC8FC\uC138\uC694. placeholder \uB294 \uC774\uB984\uC744 \uB300\uC2E0\uD558\uC9C0 \uBABB\uD569\uB2C8\uB2E4.");const le=`tf-${Z}`,oe=`tf-helper-${Z}`,de=o.useRef(null),re=bu({value:t??"",onChange:s,suggestions:M??[],openOnFocus:S,filterSuggestions:V,onSelectSuggestion:W,autoActiveFirst:G}),z=!!M&&re.open&&re.filtered.length>0,ne=o.useRef(null),[H,U]=o.useState(null),pe=o.useCallback(()=>{const Ne=ne.current;if(!Ne||typeof window>"u")return;const Ue=Ne.getBoundingClientRect(),ke=230,He=window.innerHeight-Ue.bottom<ke+8&&Ue.top>ke+8;U({position:"fixed",left:Ue.left,width:Ue.width,...He?{bottom:window.innerHeight-Ue.top+8}:{top:Ue.bottom+8},zIndex:Ia(Ne)})},[]);Ro(()=>{if(!z)return;pe();let Ne=null;const Ue=()=>{if(typeof requestAnimationFrame>"u"){pe();return}Ne===null&&(Ne=requestAnimationFrame(()=>{Ne=null,pe()}))},ke=He=>{const Be=He.target;Be&&Be.nodeType===1&&Be.closest?.(".text-field__suggestions")||Ue()};return window.addEventListener("scroll",ke,!0),window.addEventListener("resize",Ue),()=>{Ne!==null&&cancelAnimationFrame(Ne),window.removeEventListener("scroll",ke,!0),window.removeEventListener("resize",Ue)}},[z,pe]);const Ee=o.useCallback(Ne=>{de.current=Ne,typeof l=="function"?l(Ne):l&&(l.current=Ne)},[l]),ge=p?`${p}${C??I("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:m,me=t!==void 0,ie=me&&b==="password",[be,he]=o.useState((a??"").length),ue=me?(t??"").length:be,Me=o.useRef(t);Ro(()=>{Me.current=t}),o.useEffect(()=>{const Ne=de.current;if(!ie||!Ne)return;const Ue=t??"";Ne.value!==Ue&&(Ne.value=Ue)},[ie,t]),o.useEffect(()=>{if(!y||!de.current)return;const Ne=de.current;Ne.style.height="",Ne.scrollHeight>Ne.clientHeight&&(Ne.style.height=`${Ne.scrollHeight}px`)},[t,be,y]);const Ve=g!=null&&ue>g,Te=k===32?16:20,qe=we("text-field",`text-field--s${k}`,v==="display"?"text-field--display":"",B?"text-field--full-width":"",x?"text-field--disabled":"",f?"text-field--readonly":"",h?"text-field--error":"",E?"text-field--has-left-icon":"",D||N?"text-field--has-right-icon":"",K),Oe={id:le,...ie?{}:me?{value:t}:{defaultValue:a},ref:Ee,placeholder:ge,name:r,disabled:x,readOnly:f,autoFocus:Q,maxLength:g,list:F,inputMode:q,autoComplete:O,"aria-label":!i&&u?u:void 0,"aria-required":d,"aria-invalid":!!h,"aria-describedby":[_||h?oe:null,c].filter(Boolean).join(" ")||void 0,role:M?"combobox":void 0,"aria-autocomplete":M?"list":void 0,"aria-haspopup":M?"listbox":void 0,"aria-expanded":M?z:void 0,"aria-controls":z?re.listId:void 0,"aria-activedescendant":z&&re.activeIdx>=0?`${re.listId}-option-${re.activeIdx}`:void 0,onChange:Ne=>{const Ue=Ne.target;me||he(Ue.value.length),s?.(Ue.value),M&&re.handleInput(),ie&&queueMicrotask(()=>{const ke=Me.current??"";Ue.value!==ke&&(Ue.value=ke)})},onCompositionStart:M?re.handleCompositionStart:void 0,onCompositionEnd:M?re.handleCompositionEnd:void 0,onFocus:(Ne=>{L?.(Ne),M&&re.handleFocus()}),onBlur:(Ne=>{$?.(Ne),M&&re.handleBlur()}),onKeyDown:(Ne=>{const Ue=(Ne.key==="Tab"&&!Ne.shiftKey||Ne.key===" ")&&!Ne.nativeEvent.isComposing;if(p&&Ue&&!f&&!x&&!(Ne.currentTarget.value??"").trim()){Ne.preventDefault();const ke=Ne.currentTarget;me||(ke.value=p,he(p.length)),s?.(p);return}M&&Ne.key==="Enter"&&!Ne.nativeEvent.isComposing&&re.activeIdx>=0?Ne.preventDefault():J&&Ne.key==="Enter"&&!Ne.nativeEvent.isComposing&&(Ne.preventDefault(),J()),T?.(Ne),M&&re.handleKeyDown(Ne)})},ct=N&&!x&&!f&&ue>0,rt=()=>y?n.jsx("textarea",{...Oe,className:"text-field__input text-field__input--auto body-2",rows:1}):w?n.jsx("textarea",{...Oe,className:"text-field__input text-field__input--textarea body-2",rows:A}):n.jsx("input",{...Oe,type:b,className:"text-field__input body-2"}),nt=v==="display"&&!y&&!w&&!!ge,mt=()=>n.jsxs(n.Fragment,{children:[rt(),nt&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:ge})]});return n.jsxs("div",{ref:ne,className:qe,children:[i&&n.jsxs("label",{htmlFor:le,className:"text-field__label caption-1",children:[i,d&&n.jsx("span",{className:"text-field__required",children:"*"})]}),n.jsxs("div",{className:"text-field__wrap",children:[E&&n.jsx("span",{className:"text-field__icon text-field__icon--left",children:n.jsx(tt,{icon:E,label:"",className:"",svgClassName:"text-field__icon-svg",size:Te})}),mt(),g!=null&&R&&n.jsxs("span",{className:`text-field__count caption-2${Ve?" text-field__count--over":""}`,children:[ue,"/",g]}),ct&&n.jsx(fe,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:I("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:Ne=>{Ne.preventDefault()},onClick:()=>{!me&&de.current&&(de.current.value="",he(0)),s?.("")},tabIndex:-1}),D&&!ct&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(tt,{icon:D,label:"",className:"",svgClassName:"text-field__icon-svg",size:Te})})]}),!!M&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:re.open&&(t??"").length>0&&re.filtered.length===0?I("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),z&&(typeof document>"u"?null:cn.createPortal(n.jsx("ul",{id:re.listId,className:"text-field__suggestions",role:"listbox",style:H??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:re.filtered.map((Ne,Ue)=>n.jsx("li",{id:`${re.listId}-option-${Ue}`,role:"option","aria-selected":Ue===re.activeIdx,className:`text-field__suggestion body-2${Ue===re.activeIdx?" is-active":""}`,onMouseDown:ke=>ke.preventDefault(),onClick:()=>{re.handleSelect(Ne),de.current?.focus()},children:typeof Ne=="string"?Ne:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:Ne.label}),Ne.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:Ne.hint})]})},typeof Ne=="string"?`${Ne}-${Ue}`:Ne.id))}),document.body)),(_||h)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:oe,className:"text-field__helper caption-1",role:h?"alert":void 0,children:h||_})})]})}function fn({options:e,value:t,onChange:a,placeholder:r,disabled:l=!1,block:s=!1,size:i=48,error:u=!1,className:c="",ariaLabel:d,ariaDescribedBy:m}){const{t:p}=_e.useTranslation(),C=r??p("dropdown.placeholder","\uC120\uD0DD"),b=o.useId(),x=o.useId(),f=o.useRef(null),h=o.useCallback((L,$)=>{const T=window.innerHeight-L.bottom<260&&L.top>260;return{position:"fixed",left:L.left,minWidth:L.width,...T?{bottom:window.innerHeight-L.top+6}:{top:L.bottom+6},zIndex:Ia($)}},[]),{open:_,setOpen:g,toggle:k,style:v,triggerRef:B,menuRef:y}=Fa({computeStyle:h}),[w,A]=o.useState(-1),E=o.useCallback(()=>A(-1),[]),D=e.find(L=>L.value===t);o.useEffect(()=>{if(_){const L=e.findIndex($=>$.value===t);A(L>=0?L:e.length?0:-1),requestAnimationFrame(()=>{const $=y.current;if(!$)return;const T=$.querySelectorAll(".dropdown__option")[L];T&&($.scrollTop=Math.max(0,T.offsetTop-$.clientHeight/2+T.clientHeight/2))})}},[_]),o.useEffect(()=>{_&&A(L=>{if(L>=0&&L<e.length)return L;const $=e.findIndex(T=>T.value===t);return $>=0?$:e.length?0:-1})},[_,e.length]);const N=o.useCallback(()=>{l||k()},[l,k]),F=o.useCallback(L=>{L.disabled||l||(L.value!==t&&a?.(L.value),g(!1))},[a,g,l,t]);o.useEffect(()=>{l&&g(!1)},[l,g]);const R=o.useCallback(L=>{if(!l){if(!_){(L.key==="Enter"||L.key===" "||L.key==="ArrowDown")&&(L.preventDefault(),g(!0));return}if(L.key==="Escape"){L.preventDefault(),g(!1);return}L.key==="ArrowDown"?(L.preventDefault(),A($=>{let T=$+1;for(;T<e.length&&e[T].disabled;)T++;return T<e.length?T:$})):L.key==="ArrowUp"?(L.preventDefault(),A($=>{let T=$-1;for(;T>=0&&e[T].disabled;)T--;return T>=0?T:$})):(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),e[w]?F(e[w]):g(!1))}},[l,_,e,w,F,g]),K=_?n.jsx("div",{ref:y,id:b,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:v,onMouseLeave:E,onMouseDown:L=>L.preventDefault(),children:e.map((L,$)=>n.jsxs("button",{id:`${b}-option-${$}`,type:"button",role:"option","aria-selected":L.value===t,className:we("dropdown__option body-2",L.value===t?"dropdown__option--active":"",$===w?"dropdown__option--active":"",L.disabled?"dropdown__option--disabled":""),onMouseDown:T=>T.preventDefault(),onClick:()=>F(L),onMouseEnter:()=>A($),disabled:L.disabled,children:[n.jsx("span",{className:"dropdown__option-check",children:L.value===t&&n.jsx("svg",{viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"2 7 5.5 10.5 12 3.5"})})}),L.label]},L.value))}):null;return n.jsxs("div",{ref:f,className:we("dropdown",`dropdown--s${i}`,_?"dropdown--open":"",s?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:R,children:[n.jsxs("button",{ref:B,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":_,"aria-controls":_?b:void 0,"aria-activedescendant":_&&w>=0?`${b}-option-${w}`:void 0,"aria-label":d,"aria-describedby":[d&&D?x:"",m??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:l,onClick:N,onBlur:L=>{_&&!y.current?.contains(L.relatedTarget)&&g(!1)},children:[n.jsx("span",{id:x,className:`dropdown__trigger-label body-2${D?"":" dropdown__trigger-label--placeholder"}`,children:D?D.label:C}),n.jsx("svg",{className:"dropdown__chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"4 6 8 10 12 6"})})]}),typeof document<"u"&&cn.createPortal(K,f.current?.closest(".ihabdevteam-core-scope")??document.body)]})}function Cr({page:e,totalPages:t,onChange:a,prevLabel:r,nextLabel:l,className:s=""}){const{t:i}=_e.useTranslation(),u=r??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=l??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),d=Math.max(1,t),m=()=>a(Math.max(1,Math.min(d,e-1))),p=()=>a(Math.min(d,e+1));return n.jsxs("div",{className:we("pagination",s),children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-left",ariaLabel:u,disabled:e<=1,onClick:m}),n.jsxs("span",{className:"pagination__info body-3","aria-live":"polite","aria-atomic":"true",children:[Math.min(Math.max(1,e),d)," / ",d]}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=t,onClick:p})]})}const Ua=new Map;function wn(e){const{t}=_e.useTranslation(),{options:a=[],value:r=a.find(v=>!v.disabled)?.key??a[0]?.key,onChange:l=v=>{},className:s="",size:i=40,shape:u="pill",useBG:c=!0,fullWidth:d=!1,minButtonWidth:m,ariaLabel:p}=e||{},C=o.useRef(null),b=a.filter(v=>!v.disabled),x=o.useId(),f=a.map(v=>v.key).join("\xB7");o.useEffect(()=>{if(!(!Pn||p!=null&&p!=="")){if(Ua.set(x,f||"(\uBCF4\uAE30 \uC5C6\uC74C)"),Ua.size>1){const v=[...Ua.values()].sort();Mt(`segmented-control-unnamed:${v.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${Ua.size} \uAC1C \uC11C \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uB0AD\uB3C5\uAE30\uB294 \uBAA8\uB450 "\uC120\uD0DD \uD0ED" \uC73C\uB85C \uC77D\uC5B4 \uC5B4\uB290 \uAC83\uC774 \uBB34\uC5C7\uC778\uC9C0 \uAC00\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. ariaLabel \uC744 \uC8FC\uC138\uC694. \uC9C0\uAE08 \uC120 \uAC83(\uBCF4\uAE30 \uC774\uB984\uC73C\uB85C \uC801\uC74C): ${v.join(" / ")}`)}return()=>{Ua.delete(x)}}},[p,f,x]);const h=v=>{if(!b.length)return;const B=Math.max(0,b.findIndex(w=>w.key===r)),y=v==="first"?b[0]:v==="last"?b[b.length-1]:b[(B+v+b.length)%b.length];y&&(l(y.key),Array.from(C.current?.querySelectorAll("[data-segkey]")??[]).find(w=>w.dataset.segkey===y.key)?.focus())},_=v=>{switch(v.key){case"ArrowRight":case"ArrowDown":h(1);break;case"ArrowLeft":case"ArrowUp":h(-1);break;case"Home":h("first");break;case"End":h("last");break;default:return}v.preventDefault()},g=v=>{const B=y=>typeof y=="string"||typeof y=="number";if(!(!B(v.label)||v.count==null||v.count===!1||!B(v.count)))return`${v.label}, ${v.count}`},k=b.some(v=>v.key===r)?r:b[0]?.key;return n.jsx("div",{ref:C,onKeyDown:_,className:we("segmented-control",`segmented-control--${u}`,`segmented-control--${i}`,d&&"segmented-control--full",!c&&"segmented-control--no-bg",m!=null&&"segmented-control--min",s),style:m!=null?{"--segmented-min-button-w":`${m}px`}:void 0,role:"radiogroup","aria-label":p??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:a.map(v=>n.jsx(fe,{htmlType:"button",role:"radio","aria-checked":v.key===r,"data-segkey":v.key,tabIndex:v.key===k?0:-1,label:v.label,count:v.count,ariaLabel:g(v),disabled:v.disabled,className:v.key===r?"is-selected":"",onClick:()=>{v.disabled||l(v.key)},size:i,shape:u,useBorder:!1,useBG:!1},v.key))})}function Po({count:e,search:t,segment:a,filters:r,pageSize:l,pagination:s,actions:i,className:u}){const{t:c}=_e.useTranslation(),d=e!=null&&n.jsxs("p",{className:"toolbar__count body-1",role:"status","aria-atomic":"true",children:[e.prefix??c("common.totalPrefix","\uCD1D "),n.jsx("span",{className:"toolbar__count-highlight",children:e.value}),e.unit,e.suffix]}),m=!!(t||r?.length||l||s||i);return n.jsxs("div",{className:we("toolbar",u),children:[n.jsxs("div",{className:"toolbar__row",children:[d,a&&(Array.isArray(a)?a:[a]).map((p,C)=>n.jsx(wn,{size:40,...p},p.ariaLabel??C))]}),m&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(Xn,{className:"toolbar__search",size:40,value:t.value,onChange:t.onChange,placeholder:t.placeholder??c("common.search","\uAC80\uC0C9"),ariaLabel:t.placeholder??c("common.search","\uAC80\uC0C9"),autoFocus:t.autoFocus,clearable:!0}),r?.map((p,C)=>n.jsx(fn,{size:40,options:p.options,value:p.value,onChange:p.onChange,ariaLabel:p.ariaLabel},C)),(l||s)&&n.jsxs("div",{className:"toolbar__pager",children:[l&&n.jsx(fn,{size:40,options:l.options,value:l.value,onChange:l.onChange,ariaLabel:l.ariaLabel??c("common.pageSizeSelect","\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218")}),s&&n.jsx(Cr,{page:s.page,totalPages:s.total,onChange:s.onChange,prevLabel:s.prevLabel,nextLabel:s.nextLabel})]}),i]})})]})}function yu(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(yu).join(""):""}function cv(e){let t=e.replace(/\r\n/g,`
|
|
825
825
|
`).replace(/\r/g,`
|
|
826
826
|
`);t=t.replace(/^\n+/,"").replace(/\n+$/,"");const a=t.split(`
|
|
827
827
|
`).map(s=>s.replace(/\t/g," ")),r=a.filter(s=>s.trim().length>0),l=r.length>0?Math.min(...r.map(s=>s.match(/^ */)?.[0].length??0)):0;return a.map(s=>s.slice(l)).join(`
|
|
828
828
|
`)}const dv=new Set(["pnpm","npm","yarn","node","git","curl","docker","cat","ls","cd","rm","mv","cp","echo","export"]),pv=/^(?:const|let|var|function|return|if|else|for|while|switch|case|break|import|from|export|class|new|try|catch|finally|throw|await|async|null|true|false|this|typeof|instanceof)\b/;function mv(e,t){let a=e;const r=[],l=/^(?:sh|bash|zsh|shell|console)$/.test(t.toLowerCase()),s=(i,u)=>r.push({type:i,content:u});for(;a.length>0;){const i=a.match(/^\s+/);if(i){s("whitespace",i[0]),a=a.slice(i[0].length);continue}if(!l&&a.startsWith("//")){const x=a.indexOf(`
|
|
829
829
|
`),f=x===-1?a:a.slice(0,x);s("comment",f),a=a.slice(f.length);continue}if(l&&a.startsWith("#")){const x=a.indexOf(`
|
|
830
|
-
`),f=x===-1?a:a.slice(0,x);s("comment",f),a=a.slice(f.length);continue}const u=a.match(/^\/\*[\s\S]*?\*\//);if(u){s("comment",u[0]),a=a.slice(u[0].length);continue}const c=a.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(c){s("string",c[0]),a=a.slice(c[0].length);continue}const d=a.match(/^\d+(?:\.\d+)?/);if(d){s("number",d[0]),a=a.slice(d[0].length);continue}const m=a.match(pv);if(m){s("keyword",m[0]),a=a.slice(m[0].length);continue}const p=a.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(p){const x=p[0];s(l&&dv.has(x)?"command":"identifier",x),a=a.slice(x.length);continue}const C=a.match(/^[=+\-*/%<>!&|^~?:]+/);if(C){s("operator",C[0]),a=a.slice(C[0].length);continue}const b=a.match(/^[()[\]{};.,]/);if(b){s("punctuation",b[0]),a=a.slice(1);continue}s("other",a[0]),a=a.slice(1)}return r}function hv({children:e,language:t="bash",title:a="",showCopy:r=!0,size:l="default",className:s=""}){const{t:i}=_e.useTranslation(),[u,c]=o.useState(!1),d=cv(yu(e)),m=o.useRef(null);o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const p=async()=>{try{if(!await Tf(d))return;c(!0),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>c(!1),2e3)}catch{}},C=mv(d,t),b=l==="small"?"caption-1":"body-3";return n.jsxs("div",{className:we("code-box",l==="small"?"code-box--small":"",s),children:[(a||r)&&n.jsxs("div",{className:"code-box__header",role:"toolbar","aria-label":i("common.codeBlock","\uCF54\uB4DC \uBE14\uB85D"),children:[n.jsx("div",{className:"code-box__title caption-1",children:a}),r&&n.jsx(fe,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:u?"check":"copy",onClick:p,ariaLabel:u?i("common.copied","\uBCF5\uC0AC\uB428"):i("common.copyCode","\uCF54\uB4DC \uBCF5\uC0AC")})]}),n.jsx("pre",{className:"code-box__inner","data-lang":t,children:n.jsx("code",{children:C.map((x,f)=>n.jsx("span",{className:`code-token ${x.type} ${b}`,children:x.content},f))})})]})}const Cv={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function Ga(e){const{t}=_e.useTranslation(),{variant:a="spinner",size:r=24,progress:l=null,label:s}=e||{},i=s||t("loader.loading","Loading");if(a==="bar"){const c=l==null||!Number.isFinite(Number(l)),d=c?0:Math.max(0,Math.min(100,Number(l)));return n.jsx("div",{className:`loader-bar${c?" loader-bar--indeterminate":""}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c?void 0:d,"aria-label":i,children:n.jsx("div",{className:"loader-bar__inner",style:c?void 0:{width:`${d}%`}})})}const u=typeof r=="number"?`${r}px`:r;return n.jsxs("div",{className:"loader-spinner",style:{width:u,height:u},role:"status","aria-label":i,children:[n.jsx("span",{style:Cv,children:i}),n.jsxs("svg",{className:"loader-spinner__svg",viewBox:"0 0 50 50",width:r,height:r,children:[n.jsx("circle",{className:"loader-spinner__bg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4"}),n.jsx("circle",{className:"loader-spinner__fg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4",strokeLinecap:"round"})]})]})}function vu({checked:e,onChange:t,disabled:a=!1,label:r,ariaLabel:l,labelPosition:s="right",className:i="",id:u}){const c=r&&n.jsx("span",{className:"toggle__label body-3",children:r});return n.jsxs("label",{className:`toggle${a?" toggle--disabled":""} ${i}`.trim(),children:[s==="left"&&c,n.jsx("input",{id:u,type:"checkbox",role:"switch",checked:e,disabled:a,onChange:d=>t?.(d.target.checked),"aria-label":!r&&l?l:void 0}),n.jsx("span",{className:"toggle__slider"}),s==="right"&&c]})}function xu({checked:e=!1,onChange:t,disabled:a,indeterminate:r,label:l,size:s="medium",className:i,title:u,ariaLabel:c}){const d=o.useRef(null),m=o.useId(),p=o.useRef(!!r);return p.current=!!r,o.useEffect(()=>{d.current&&(d.current.indeterminate=!!r)}),n.jsxs("label",{className:we("checkbox",s==="small"&&"checkbox--small",s==="large"&&"checkbox--large",a&&"checkbox--disabled",i),htmlFor:m,title:u,children:[n.jsx("input",{ref:d,id:m,type:"checkbox",className:"checkbox__input",checked:e,onChange:C=>{t?.(C.target.checked),d.current&&(d.current.indeterminate=p.current)},disabled:a,"aria-label":!l&&c?c:void 0}),n.jsx("span",{className:"checkbox__box"}),l&&n.jsx("span",{className:"checkbox__label body-3",children:l})]})}function fv({count:e,actions:t,onClear:a,clearLabel:r,visible:l,content:s,max:i}){const{t:u}=_e.useTranslation(),c=l!==void 0?l:e>0,d=r??u("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),m=o.useRef(null),p=o.useRef(null),C=o.useRef(null),b=o.useRef(c);o.useLayoutEffect(()=>{const g=p.current,k=b.current;if(b.current=c,c&&!k){const v=typeof document<"u"?document.activeElement:null;C.current=v&&v!==document.body&&!g?.contains(v)?v:null}else!c&&k&&g&&g.contains(document.activeElement)&&sr(g,C.current)},[c]);const[x,f]=o.useState(!1),h=o.useRef(!1),_=o.useRef(null);return o.useEffect(()=>{const g=m.current;if(!g)return;const k=E=>{h.current=E,f(E)},v=()=>{const E=g.firstElementChild??g,D=Array.from(E.children);if(D.length<2){k(!1);return}const N=D[0].offsetTop,F=D.some(T=>T.offsetTop!==N);if(!h.current){_.current=g.clientWidth,F&&k(!0);return}if(F)return;const R=D[0],K=D[D.length-1],L=K.offsetLeft+K.offsetWidth-R.offsetLeft,$=_.current;($==null||L<=$)&&k(!1)};if(v(),typeof ResizeObserver>"u")return;const B=new ResizeObserver(v);B.observe(g);const y=g.parentElement;let w=y?.clientWidth??0;const A=new ResizeObserver(()=>{const E=y?.clientWidth??0;E!==w&&(w=E,_.current=null,v())});return y&&A.observe(y),()=>{B.disconnect(),A.disconnect()}},[s,e]),n.jsxs("div",{ref:p,className:`bulk-bar ${c?"bulk-bar--visible":""}`,inert:!c||void 0,"aria-hidden":c?void 0:!0,children:[n.jsx("span",{ref:m,className:"bulk-bar__count body-2",role:"status",children:s??n.jsx("b",{children:u("common.selectedCount",{count:e})})}),i!==void 0&&n.jsx(Lt,{size:"small",fill:"soft",variant:"main",label:`${e} / ${i}`,"aria-label":u("common.selectedOfMax",{count:e,max:i,defaultValue:`\uCD5C\uB300 ${i}\uAC1C \uC911 ${e}\uAC1C`})}),n.jsxs("div",{className:`bulk-bar__actions${x?" bulk-bar__actions--stacked":""}`,children:[n.jsx(fe,{htmlType:"button",size:40,label:d,onClick:a}),t.map((g,k)=>n.jsx(fe,{htmlType:"button",size:40,variant:g.variant??"default",icon:g.icon,label:g.label,onClick:g.onClick},k))]})]})}const gv=[{key:"edit",icon:"edit-2",closeFirst:!0},{key:"duplicate",icon:"copy",closeFirst:!1},{key:"publish",icon:"book-marked",closeFirst:!1},{key:"copyLink",icon:"link",closeFirst:!1},{key:"remove",icon:"trash-2",closeFirst:!0}];function bv(e){const{onClose:t,className:a}=e;return n.jsx("div",{className:we("item-actions",a),children:gv.map(({key:r,icon:l,closeFirst:s})=>{const i=e[r];if(!i)return null;const u=r==="publish"?i.published?i.unpublish:i.publish:i;return n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:l,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{s&&t(),u.onClick()}},r)})})}function _u(e,t){const a=()=>{if(e){const[f,h]=e.split("-");return{y:+f,m:+h-1}}const[b,x]=lo(t).split("-");return{y:+b,m:+x-1}},[r,l]=o.useState(()=>a().y),[s,i]=o.useState(()=>a().m),u=o.useRef(e);o.useEffect(()=>{if(e===u.current)return;u.current=e;const b=a();l(b.y),i(b.m)},[e]);const c=o.useRef({y:r,m:s});o.useEffect(()=>{c.current={y:r,m:s}},[r,s]);const d=o.useCallback(b=>{const x=c.current.y*12+c.current.m+b,f=Math.floor(x/12),h=x-f*12;c.current={y:f,m:h},l(f),i(h)},[]),m=o.useCallback(()=>d(-1),[d]),p=o.useCallback(()=>d(1),[d]),C=o.useCallback((b,x)=>{c.current={y:b,m:x},l(b),i(x)},[]);return{viewY:r,viewM:s,prevMonth:m,nextMonth:p,setViewYM:C}}function fr(e,t){return new Date(e,t+1,0).getDate()}function yv(e,t){return new Date(e,t,1).getDay()}function Ka(e,t,a){return`${e}-${String(t+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function vv(e){if(!e)return"";const[t,a,r]=e.split("-");return`${t}. ${a}. ${r}.`}function xv(e){const t=e.replace(/\D/g,"");if(t.length!==8)return null;const a=+t.slice(0,4),r=+t.slice(4,6),l=+t.slice(6,8);if(r<1||r>12||l<1||l>31)return null;const s=new Date(a,r-1,l);return s.getFullYear()!==a||s.getMonth()!==r-1||s.getDate()!==l?null:Ka(a,r-1,l)}const _v=1900;function wv(e,t,a,r,l){const s=r?+r.split("-")[0]:Math.min(_v,e),i=l?+l.split("-")[0]:Math.max(t+10,e),u=[];for(let c=s;c<=i;c++)u.push({value:String(c),label:a(c)});return u}function wu(e,t,a,r){const l=[];for(let s=1;s<=12;s++){const i=`${e}-${String(s).padStart(2,"0")}`;a&&i<a.slice(0,7)||r&&i>r.slice(0,7)||l.push({value:String(s),label:t(e,s)})}return l}function Bv({value:e,onChange:t,size:a=48,min:r,max:l,disabled:s,placeholder:i,className:u,today:c}){const{t:d,i18n:m}=_e.useTranslation(),p=i??d("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),C=o.useMemo(()=>d("calendar.dow",{returnObjects:!0}),[d]),b=lo(c),{viewY:x,viewM:f,prevMonth:h,nextMonth:_,setViewYM:g}=_u(e,c),k=o.useId(),v=o.useCallback((z,ne)=>{const H=window.innerHeight,U=window.innerWidth,pe=typeof document<"u"?document.getElementById(k):null,Ee=Math.max(pe?.offsetHeight||0,pe?.scrollHeight||0)||300,ge=Math.max(z.width,pe?.offsetWidth||0,260),me=H-z.bottom,ie=z.top,be=me<Ee&&ie>me,he=8,ue=(Me,qe)=>Math.min(Math.max(he,Me),Math.max(he,qe));return{position:"fixed",left:ue(z.left,U-ge-he),width:z.width,minWidth:260,...be?{top:"auto",bottom:ue(H-z.top+6,H-Ee-he)}:{bottom:"auto",top:ue(z.bottom+6,H-Ee-he)},zIndex:Ia(ne)}},[k]),{open:B,setOpen:y,toggle:w,style:A,triggerRef:E,menuRef:D}=Fa({computeStyle:v,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!B)return;const z=D.current;return(z?.querySelector(".date-picker__day--selected:not(:disabled)")??z?.querySelector(".date-picker__day--today:not(:disabled)")??z?.querySelector(".date-picker__day:not(:disabled)")??z?.querySelector(_n)??z)?.focus?.(),()=>{const ne=document.activeElement;(!ne||ne===document.body)&&E.current?.focus?.()}},[B,D,E]);const[N,F]=o.useState(1),R=o.useRef(null),K=o.useRef(null);o.useEffect(()=>{if(!B)return;const z=e&&e.slice(0,7)===`${x}-${String(f+1).padStart(2,"0")}`?+e.slice(8):b.slice(0,7)===`${x}-${String(f+1).padStart(2,"0")}`?+b.slice(8):1;F(z)},[B]),o.useEffect(()=>{if(K.current==null)return;const z=K.current;K.current=null,R.current?.querySelector(`[data-day="${z}"]`)?.focus()}),o.useEffect(()=>{F(z=>Math.min(z,fr(x,f)))},[x,f]);const L=o.useCallback(z=>{let ne=Ka(z.getFullYear(),z.getMonth(),z.getDate());r&&ne<r&&(ne=r),l&&ne>l&&(ne=l);const[H,U,pe]=ne.split("-").map(Number);(H!==x||U-1!==f)&&g(H,U-1),F(pe),K.current=pe},[r,l,x,f,g]),$=o.useCallback(z=>{const ne=new Date(x,f,N),H=pe=>{ne.setDate(ne.getDate()+pe),L(ne)},U=pe=>{const Ee=ne.getFullYear()*12+ne.getMonth()+pe,ge=Math.floor(Ee/12),me=Ee-ge*12;L(new Date(ge,me,Math.min(ne.getDate(),fr(ge,me))))};switch(z.key){case"ArrowLeft":H(-1);break;case"ArrowRight":H(1);break;case"ArrowUp":H(-7);break;case"ArrowDown":H(7);break;case"Home":H(-ne.getDay());break;case"End":H(6-ne.getDay());break;case"PageUp":z.shiftKey?U(-12):U(-1);break;case"PageDown":z.shiftKey?U(12):U(1);break;default:return}z.preventDefault()},[x,f,N,L]),T=o.useCallback(z=>{s||(t(Ka(x,f,z)),y(!1))},[x,f,t,y,s]);o.useEffect(()=>{s&&y(!1)},[s,y]);const J=z=>{const ne=Ka(x,f,z);return!!(r&&ne<r||l&&ne>l)},q=(()=>{const z=fr(x,f);if(N>=1&&N<=z&&!J(N))return N;for(let ne=1;ne<=z;ne++)if(!J(ne))return ne;return-1})(),O=[];for(let z=0;z<yv(x,f);z++)O.push(null);for(let z=1;z<=fr(x,f);z++)O.push(z);const Q=a===64?20:a===40?16:18,P=Ol(m.language),V=z=>new Intl.DateTimeFormat(P,{year:"numeric"}).format(new Date(z,0,1)),W=(z,ne)=>new Intl.DateTimeFormat(P,{month:"long"}).format(new Date(z,ne-1,1)),G=wv(x,+b.slice(0,4),V,r,l),S=wu(x,W,r,l),M=z=>{const ne=wu(z,W,r,l);if(ne.length===0)return;const H=ne.some(U=>+U.value===f+1);g(z,H?f:+ne[0].value-1)},[I,Z]=o.useState(null);o.useEffect(()=>{Z(null)},[e]);const le=o.useCallback(z=>{Z(z);const ne=xv(z);if(!ne||r&&ne<r||l&&ne>l)return;t(ne);const[H,U]=ne.split("-");g(+H,+U-1)},[r,l,t,g]),oe=o.useCallback(()=>{Z(null)},[]),de=o.useCallback(z=>{z.key==="Enter"?(z.preventDefault(),oe(),y(!1)):z.key==="Escape"?(oe(),y(!1)):z.key==="ArrowDown"&&!B&&(z.preventDefault(),y(!0))},[oe,y,B]),re=B?cn.createPortal(n.jsxs("div",{ref:D,id:k,className:"date-picker__dropdown",style:A,"data-tooltip-ignore":!0,role:"dialog","aria-label":d("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),tabIndex:-1,children:[n.jsxs("div",{className:"date-picker__nav",children:[n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:h,"aria-label":d("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(Ps,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(fn,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:G,value:String(x),onChange:z=>M(+z),size:40}),n.jsx(fn,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:S,value:String(f+1),onChange:z=>g(x,+z-1),size:40})]}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:_,"aria-label":d("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(Is,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:R,onKeyDown:$,children:[C.map(z=>n.jsx("div",{className:"date-picker__dow caption-1",children:z},z)),O.map((z,ne)=>{if(z===null)return n.jsx("div",{},`e${ne}`);const H=Ka(x,f,z),U=H===e,pe=H===b,Ee=J(z),ge=ne%7;return n.jsx("button",{type:"button",disabled:Ee,"data-day":z,tabIndex:z===q?0:-1,"aria-current":pe?"date":void 0,onClick:()=>!Ee&&T(z),className:we("date-picker__day caption-1",U&&"date-picker__day--selected",pe&&!U&&"date-picker__day--today",Ee&&"date-picker__day--disabled",ge===0&&"date-picker__day--sun",ge===6&&"date-picker__day--sat"),children:z},z)})]})]}),document.body):null;return n.jsxs("div",{className:we("date-picker",`date-picker--s${a}`,B&&"date-picker--open",u),children:[n.jsxs("div",{className:"date-picker__field",children:[n.jsx("input",{ref:E,type:"text",className:"date-picker__trigger body-2",value:I??vv(e),placeholder:p,onChange:z=>le(z.target.value),onClick:()=>!s&&!B&&w(),onKeyDown:de,onBlur:oe,disabled:s,"aria-haspopup":"dialog","aria-expanded":B,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!s&&w(),disabled:s,tabIndex:-1,"aria-label":p,"aria-haspopup":"dialog","aria-expanded":B,children:n.jsx(Gs,{size:Q,className:"date-picker__icon",strokeWidth:1.5})})]}),re]})}function kv({items:e,className:t,ariaLabel:a="\uC54C\uB9BC \uAE00",titleLevel:r=4,targetBytes:l}){const s=r?`h${r}`:"div";return n.jsx("div",{className:`notify-text-preview${t?` ${t}`:""}`,role:"group","aria-label":a,children:e.map(i=>{const u=l===void 0?Sl(i.sms):Sl(i.sms,l),c=u.type==="LMS";return n.jsxs("section",{className:"notify-text-preview__item",children:[n.jsxs("header",{className:"notify-text-preview__head",children:[n.jsx(s,{className:"notify-text-preview__name h5b",children:i.name}),i.meta&&Object.keys(i.meta).length>0?n.jsx("dl",{className:"notify-text-preview__meta caption-1",children:Object.entries(i.meta).map(([d,m])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:d}),n.jsx("dd",{children:m})]},d))}):null]}),n.jsxs("div",{className:"notify-text-preview__body",children:[n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsxs("div",{className:"notify-text-preview__col-head caption-1",children:[n.jsx("span",{children:"\uBB38\uC790"}),n.jsxs("span",{className:`notify-text-preview__bytes${c?" is-over":u.overTarget?" is-over-target":""}`,title:u.over?`${u.limit}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uBCF4\uB0BC \uB54C \uC798\uB9B0\uB2E4`:c?`${El}\uBC14\uC774\uD2B8\uB97C \uB118\uC5B4 \uC7A5\uBB38\uC774\uB2E4 \u2014 \uD55C \uD1B5 \uAC12\uC774 \uB2E8\uBB38\uC758 \uB450 \uBC30 \uBC18\uC774\uB2E4`:u.overTarget?`\uACA8\uB204\uB294 ${u.target}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uD55C \uAE00\uC790\uB9CC \uB298\uC5B4\uB3C4 ${El}\uC744 \uB118\uC5B4 \uC7A5\uBB38\uC774 \uB41C\uB2E4`:void 0,children:[u.bytes,u.target!==null?` / \uBAA9\uD45C ${u.target}`:"","\uBC14\uC774\uD2B8 \xB7 ",c?"\uC7A5\uBB38":"\uB2E8\uBB38",u.over?" \xB7 \uD55C\uACC4 \uB118\uC74C":c?" \xB7 \uAC12\uC774 \uB450 \uBC30 \uBC18":u.overTarget?" \xB7 \uBAA9\uD45C \uB118\uC74C":""]})]}),n.jsx("pre",{className:"notify-text-preview__text",children:i.sms})]}),i.ata?n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsx("div",{className:"notify-text-preview__col-head caption-1",children:n.jsx("span",{children:"\uC54C\uB9BC\uD1A1"})}),n.jsx("pre",{className:"notify-text-preview__text",children:i.ata})]}):null]})]},i.name)})})}function Av({src:e,alt:t,className:a,style:r,tone:l,textColor:s}){const i=!l&&!!s,u=Iy(e,i),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return l?n.jsx("span",{className:we("brand-logo","brand-logo--tone",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--brand-logo-src":`url("${e}")`,"--brand-logo-tone":l},children:n.jsx("img",{src:e,alt:"","aria-hidden":"true",className:"brand-logo__sizer",draggable:!1})}):i&&u?n.jsx("span",{className:we("brand-logo","brand-logo--inline",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--brand-logo-text-color":s},dangerouslySetInnerHTML:{__html:Ry($y(u),c)}}):n.jsx("img",{src:e,alt:t,className:we("brand-logo",a),style:r,draggable:!1})}function Bu({children:e,className:t}){const a=o.useRef(null),[r,l]=o.useState(null);return o.useEffect(()=>{l(a.current?.parentElement??null)},[]),o.useEffect(()=>{const s=a.current;if(!s||!r)return;const i=()=>{const c=typeof window<"u"&&window.getComputedStyle(s).position==="absolute"?Math.ceil(s.getBoundingClientRect().width):0;c>0?r.style.setProperty("--section-head-float-w",`${c}px`):r.style.removeProperty("--section-head-float-w")};if(i(),typeof ResizeObserver>"u")return()=>{r.style.removeProperty("--section-head-float-w")};const u=new ResizeObserver(()=>i());return u.observe(s),u.observe(r),()=>{u.disconnect(),r.style.removeProperty("--section-head-float-w")}},[r,e]),n.jsx("div",{ref:a,className:we("section-head-float",t),children:e})}function Io({items:e,className:t}){return n.jsx("div",{className:t?`manager-bar-chart-legend ${t}`:"manager-bar-chart-legend",children:e.map((a,r)=>n.jsxs("span",{className:"manager-bar-chart-legend-item",children:[n.jsx("span",{className:"manager-bar-chart-legend-dot",style:{background:a.color}}),a.label]},r))})}function Ya({label:e,children:t}){return e?n.jsxs("div",{className:"barchart-total barchart-total--stacked",children:[n.jsx("span",{className:"barchart-total__label body-3",children:e}),n.jsx("span",{className:"barchart-total__value",children:t})]}):n.jsx("div",{className:"barchart-total",children:t})}function Fo({title:e,titleClassName:t="h3",titleLevel:a=3,icon:r,disc:l,headRight:s,headFloat:i,headSegment:u,headMenuItems:c,collapseBelow:d=420,onClick:m,ariaLabel:p,tooltip:C,totalNum:b,totalUnit:x,totalLabel:f,subRow:h,subRowAlign:_="start",className:g,inGrid:k=!1,children:v}){const{t:B}=_e.useTranslation(),y=o.useRef(null),{anchorRect:w,openAt:A,close:E}=Pa(),D=o.useCallback(()=>{C&&y.current&&A(y.current)},[C,A]),[N,F]=o.useState(!1);Ro(()=>{const S=y.current;if(!S||!u)return;const M=Z=>F(Z>0&&Z<d);if(M(S.clientWidth),typeof ResizeObserver>"u")return;const I=new ResizeObserver(Z=>M(Z[0].contentRect.width));return I.observe(S),()=>I.disconnect()},[u,d]);const[R,K]=o.useState(null),L=o.useCallback(()=>K(null),[]),$=o.useCallback(S=>{const M=S.currentTarget.getBoundingClientRect();K(I=>I?null:{left:M.left,right:M.right,top:M.top,bottom:M.bottom,width:M.width,height:M.height,x:M.x,y:M.y})},[]),T=!!u&&N;o.useEffect(()=>{T||K(null)},[T]);const J=u?[...u.options.map(S=>({label:S.label,icon:S.icon,selected:S.key===u.value,disabled:S.disabled,onClick:()=>u.onChange(S.key),closeOnSelect:!0})),...(c??[]).map((S,M)=>M===0?{...S,separatorBefore:!0}:S)]:[],q=o.useCallback(S=>{if(!m)return;const M=S.target;M&&typeof M.closest=="function"&&M.closest('button, a, input, select, textarea, [role="radiogroup"]')||m()},[m]),O=o.useCallback(S=>{m&&S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),m())},[m]),Q=typeof s=="function"?s({collapsed:T}):s,P=b!=null||f?n.jsxs(Ya,{label:f,children:[b!=null&&n.jsx("span",{className:"barchart-total__num h0",children:b}),x&&n.jsx("span",{className:"barchart-total__unit h5",children:x})]}):null,V=Q||u?n.jsxs("div",{className:"manager-section__head-right",children:[u&&(T?n.jsx(fe,{htmlType:"button",size:32,type:"dot",icon:"ellipsis",ariaLabel:u.ariaLabel??B("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:u.ariaLabel??B("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!R,onClick:$}):n.jsx(wn,{size:32,ariaLabel:u.ariaLabel,options:u.options.map(S=>({key:S.key,label:S.label,disabled:S.disabled})),value:u.value,onChange:u.onChange})),Q]}):null,W=o.useId(),G=a?`h${a}`:"div";return n.jsxs("section",{ref:y,className:["manager-section",k&&"manager-section--grid",m&&"manager-section--clickable",g].filter(Boolean).join(" "),onClick:m?q:void 0,onKeyDown:m?O:void 0,onPointerEnter:C?D:void 0,onPointerLeave:C?E:void 0,onFocus:C?D:void 0,onBlur:C?E:void 0,role:m?"button":void 0,tabIndex:m?0:void 0,"aria-label":m?p??(typeof e=="string"?e:void 0):void 0,"aria-labelledby":!m&&e!=null?W:void 0,children:[C&&w&&n.jsx(Dn,{anchorRect:{left:w.left,top:w.top+21,right:w.right,bottom:w.bottom,width:w.width,height:w.height},text:C}),i&&n.jsx(Bu,{children:i}),n.jsxs("div",{className:"manager-section__head",children:[n.jsxs("div",{className:"manager-section__title-row",children:[r&&n.jsx(tt,{icon:r,label:typeof e=="string"?e:void 0,className:"manager-section__icon"}),n.jsx(G,{id:W,className:["manager-section__title",t].filter(Boolean).join(" "),children:e})]}),V,l&&n.jsx("div",{className:"manager-section__disc body-3",children:l})]}),(P||h)&&n.jsxs("div",{className:["barchart-sub-row",_!=="start"&&`barchart-sub-row--${_}`].filter(Boolean).join(" "),children:[P,h]}),v,R&&n.jsx(vn,{anchorRect:R,onClose:L,ariaLabel:u?.ariaLabel??B("tooltip.menu","\uBA54\uB274"),children:n.jsx(Oa,{columns:[{items:J}],onClose:L,size:"small"})})]})}const Za=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,Oo=e=>Za(e.getFullYear(),e.getMonth()+1);function ma(e){const t=/^(\d{4})-(\d{2})$/.exec(e);if(!t)return null;const a=Number(t[2]);return a>=1&&a<=12?{year:Number(t[1]),month1:a}:null}const zo=(e,t)=>`${e}#${t}`;function Bn(e,t){const a=new Date(e,t,1).getDay();return 1+(8-(a===0?7:a))%7}function Nv(){const e=la();let t=e.getFullYear(),a=e.getMonth(),r=e.getDate();if(r<Bn(t,a)){const i=new Date(t,a,0);t=i.getFullYear(),a=i.getMonth(),r=i.getDate()}const l=Math.floor((r-Bn(t,a))/7),s=Za(t,a+1);return{monthKey:s,value:zo(s,l)}}function Ev(e){const t=la(),a=Oo(t),r=(c,d)=>Za(c,d+1),l=new Map;l.set(a,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const d=r(c.date.getFullYear(),c.date.getMonth());l.has(d)||l.set(d,[]),l.get(d).push(c)}for(const[c,d]of[...l.entries()]){const m=ma(c);if(!m)continue;const p=m.year,C=m.month1-1,b=Bn(p,C);if(!(c===a&&t.getDate()<b)&&!d.some(h=>h.date.getDate()<b))continue;const x=new Date(p,C,0),f=r(x.getFullYear(),x.getMonth());l.has(f)||l.set(f,[])}const s=new Map;for(const[c,d]of l){const m=ma(c);if(!m)continue;const p=m.year,C=m.month1-1,b=new Date(p,C+1,0).getDate(),x=d.reduce((v,B)=>Math.max(v,B.parts?.length??0,B.partsB?.length??0),0),f=d.some(v=>v.partsB),h=new Array(b+1).fill(0),_=new Array(b+1).fill(0),g=Array.from({length:b+1},()=>new Array(x).fill(0)),k=Array.from({length:b+1},()=>new Array(x).fill(0));for(const v of d){const B=v.date.getDate();if(h[B]+=v.a,_[B]+=v.b,v.parts)for(let y=0;y<x;y++)g[B][y]+=v.parts[y]??0;if(v.partsB)for(let y=0;y<x;y++)k[B][y]+=v.partsB[y]??0}s.set(c,{year:p,month:C,daysInMonth:b,partsLen:x,hasPartsB:f,dayA:h,dayB:_,dayParts:g,dayPartsB:k})}const i=(c,d,m)=>new Date(c,d,m).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,d]of s){const{year:m,month:p,daysInMonth:C,dayA:b,dayB:x,dayParts:f,dayPartsB:h}=d,_=m===t.getFullYear()&&p===t.getMonth(),g=t.getDate(),k=s.get(r(p===11?m+1:m,(p+1)%12)),v=d.partsLen,B=[];for(let w=1;w<=C;w++){const A=_&&w>g;B.push({label:String(w),...A&&b[w]===0&&x[w]===0?{future:!0}:{},a:A&&b[w]===0&&x[w]===0?-1:b[w],b:x[w],...v?{parts:f[w]}:{},...v&&d.hasPartsB?{partsB:h[w]}:{}})}const y=[];for(let w=Bn(m,p);w<=C;w+=7){const A=Math.max(0,w+6-C),E=A&&k?Math.max(v,k.partsLen):v,D=d.hasPartsB||!!(A&&k?.hasPartsB);let N=0,F=0;const R=new Array(E).fill(0),K=new Array(E).fill(0);for(let $=w;$<=Math.min(w+6,C);$++){N+=b[$],F+=x[$];for(let T=0;T<v;T++)R[T]+=f[$][T],K[T]+=h[$][T]}if(A&&k)for(let $=1;$<=A&&!i(k.year,k.month,$);$++){N+=k.dayA[$],F+=k.dayB[$];for(let T=0;T<k.partsLen;T++)R[T]+=k.dayParts[$][T],K[T]+=k.dayPartsB[$][T]}const L=A?`${(p+1)%12+1}/${A}`:`${w+6}`;y.push({label:`${y.length+1}\uC8FC`,sublabel:`[${w}\uC77C~${L}\uC77C]`,a:N,b:F,...E?{parts:R}:{},...E&&D?{partsB:K}:{}})}u[c]={weekly:y,daily:B}}return u}function ku(){const e=la(),t=e.getFullYear(),a=e.getMonth()+1,r=[];for(let l=2024;l<=t;l++){const s=l===t?a:12;for(let i=1;i<=s;i++)r.push({value:Za(l,i),year:l,month:i})}return r.reverse()}ku();function Dv(){return ku()}function Au(e,t){const a=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),r=Array.isArray(a)&&typeof a[t]=="string"?a[t]:null;return e("calendar.weekLabel",{ord:r??String(t+1)})}function Nu(e){const{t,i18n:a}=_e.useTranslation(),[r,l]=o.useState("week"),s=o.useMemo(()=>Dv().filter(E=>E.value in e),[e]),i=o.useMemo(()=>{const E=[];for(const D of s){const N=new Date(D.year,D.month,0).getDate(),F=Bn(D.year,D.month-1),R=Math.ceil((N-F+1)/7);for(let K=R-1;K>=0;K--)E.push({value:zo(D.value,K),monthKey:D.value,year:D.year,month:D.month,week:K})}return E},[s]),u=o.useCallback(E=>`${so(t,a.language,E.year,E.month)} ${Au(t,E.week)}`,[t]),c=o.useMemo(()=>s.map(E=>({value:E.value,label:so(t,a.language,E.year,E.month)})),[t,a.language,s]),d=o.useMemo(()=>i.map(E=>({value:E.value,label:u(E)})),[i,u]),m=o.useMemo(()=>Nv(),[e]),p=o.useMemo(()=>s.find(E=>E.value===m.monthKey)?.value??s[0]?.value??"",[s,m]),C=o.useMemo(()=>i.find(E=>E.value===m.value)?.value??i[0]?.value??"",[i,m]),[b,x]=o.useState(""),[f,h]=o.useState("");o.useEffect(()=>{s.find(E=>E.value===b)||x(p)},[s,b,p]),o.useEffect(()=>{i.find(E=>E.value===f)||h(C)},[i,f,C]);const _=r==="month"?c:d,g=r==="month"?b:f,k=r==="month"?x:h,v=o.useMemo(()=>{const E=t("calendar.dow",{returnObjects:!0});return Array.isArray(E)?E:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),B=_.findIndex(E=>E.value===g),y=o.useCallback(()=>{const E=_.findIndex(D=>D.value===g);E<_.length-1&&k(_[E+1].value)},[_,g,k]),w=o.useCallback(()=>{const E=_.findIndex(D=>D.value===g);E>0&&k(_[E-1].value)},[_,g,k]),A=o.useMemo(()=>[{key:"week",label:t("manager.chart.periodWeek","\uC8FC")},{key:"month",label:t("manager.chart.periodMonth","\uC6D4")}],[t]);return{period:r,setPeriod:l,range:g,setRange:k,activeOptions:_,activeIdx:B,handlePrev:y,handleNext:w,periodOptions:A,monthRange:b,weekRange:f,weekRanges:i,DOW:v}}const kt=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function Mn(e,t=!0){return e.future===!0||t&&e.a===-1}function Sv({data:e,colorA:t,colorB:a,labelA:r,labelB:l,barWidth:s=10,barGap:i=1,height:u=140,maxOverride:c,tightMax:d,seriesColors:m,seriesLabels:p,rateLabels:C,grouped:b=!1,baseline:x,focusableBars:f=!1}){const h=!a,_=!!(m&&m.length>0),g=x,k=o.useMemo(()=>_?Math.max(0,...e.filter(O=>!Mn(O,g==null)).map(O=>b?Math.max(0,...(O.parts??[]).map(kt)):(O.parts??[]).reduce((Q,P)=>Q+Math.max(0,kt(P)),0))):Math.max(0,...e.filter(O=>!Mn(O,g==null)).flatMap(O=>h?[kt(O.a)]:[kt(O.a),kt(O.b)])),[e,h,_,b]),v=o.useMemo(()=>{if(g==null)return 0;const O=e.filter(Q=>!Mn(Q,g==null)).flatMap(Q=>_?(Q.parts??[]).map(kt):h?[kt(Q.a)]:[kt(Q.a),kt(Q.b)]);return Math.max(0,...O.map(Q=>Math.abs(Q-g)))},[e,g,_,h]),B=o.useMemo(()=>{const O=g!=null?v:k;return c??(d?O>0?O:10:Math.ceil(O/10)*10||10)},[k,v,g,c,d]),y=u,w=_?b?Math.max(1,m.length):1:h?1:2,A={"--bar-width":`${o.useMemo(()=>{const O=Math.max(1,e.length);return Math.max(2,Math.min(s,Math.round(120/(O*w)+6)))},[e.length,w,s])}px`},E={"--bar-group-gap":`${Math.max(0,i)}px`},D=o.useMemo(()=>{const O=Math.round(B/2);return g!=null?[g+B,...O!==B?[g+O]:[],g,...O!==B?[g-O]:[],g-B]:O!==B?[B,O,0]:[B,0]},[B,g]),N=O=>g!=null?1-(O-(g-B))/(2*B):1-O/B,[F,R]=o.useState(null),K=o.useCallback(()=>R(null),[]),L=o.useCallback((O,Q)=>{const P=[O.label,O.sublabel].filter(Boolean).join(" ");let V;if(_&&b&&O.rawPartsB)V=(p??[]).map((W,G)=>{const S=O.rawPartsB[G]??0;return{text:S>0?`${W}: ${Q[G]??0}% (${O.rawParts?.[G]??0}/${S})`:`${W}: -`,color:(m??[])[G]}});else if(_&&b)V=(p??[]).map((W,G)=>({text:`${W}: ${J(Q[G]??0)}`,color:(m??[])[G]}));else if(_){const W=(p??[]).map((S,M)=>({text:`${S}: ${Q[M]??0}`,color:(m??[])[M]})),G=W.filter((S,M)=>(Q[M]??0)>0);V=G.length?G:W}else C&&!h?V=[{text:`${r} ${kt(O.a)}%`,color:t},{text:`${l} ${kt(O.b)}%`,color:a}]:C&&O.rawB!==void 0?V=[{text:`${C.total} ${O.rawB}`},{text:`${C.done} ${O.rawA??0}`,color:t}]:h?V=[{text:`${r}: ${kt(O.a)}`,color:t}]:V=[{text:`${r}: ${kt(O.a)}`,color:t},{text:`${l}: ${kt(O.b)}`,color:a}];return{title:P,items:V}},[_,b,p,m,C,h,r,l,t,a,g]),$=o.useCallback((O,Q,P)=>{const V=O.getBoundingClientRect(),{title:W,items:G}=L(Q,P);R({rect:{left:V.left,top:V.top,right:V.right,bottom:V.bottom,width:V.width,height:V.height},title:W,items:G})},[L]),T=o.useCallback((O,Q)=>{const{title:P,items:V}=L(O,Q);return[P,...V.map(W=>W.text)].filter(Boolean).join(", ")},[L]),J=O=>g!=null&&O>g?`+${O}`:`${O}`,q=F!=null;return o.useEffect(()=>{if(!q)return;const O=()=>R(null),Q=P=>{const V=P.target;V&&typeof V.closest=="function"&&V.closest(".manager-bar-chart-col")||R(null)};return window.addEventListener("scroll",O,!0),document.addEventListener("pointerdown",Q,!0),()=>{window.removeEventListener("scroll",O,!0),document.removeEventListener("pointerdown",Q,!0)}},[q]),n.jsxs("div",{className:"manager-bar-chart-wrap",style:E,children:[n.jsx("div",{className:"manager-bar-chart-inner",children:n.jsx("div",{className:"manager-bar-chart-scroll",children:n.jsxs("div",{className:"manager-bar-chart-area",children:[n.jsxs("div",{className:"manager-bar-chart-plot",style:{height:y},children:[D.slice(0,-1).map((O,Q)=>n.jsx("div",{className:`manager-bar-chart-gridline${g!=null&&O===g?" manager-bar-chart-gridline--baseline":""}`,style:{top:N(O)*y},children:n.jsx("span",{className:"manager-bar-chart-gridline__label caption-1",children:O})},Q)),e.map((O,Q)=>{const P=Mn(O,g==null),V=y/2,W=I=>g!=null?Math.min(V,Math.abs(kt(I)-g)/B*V):Math.min(y,Math.max(0,kt(I)/B*y)),G=P?0:W(O.a),S=P?0:W(O.b),M=(O.parts??[]).map(kt);return n.jsx("div",{className:`manager-bar-chart-col${b&&_?" manager-bar-chart-col--group":""}`,style:{cursor:P?"default":"pointer"},tabIndex:f&&!P?0:void 0,role:f&&!P?"img":void 0,"aria-label":f&&!P?T(O,M):void 0,onMouseEnter:P?void 0:I=>$(I.currentTarget,O,M),onFocus:P||!f?void 0:I=>$(I.currentTarget,O,M),onBlur:f?K:void 0,onMouseLeave:K,children:!P&&(_&&b?(m??[]).map((I,Z)=>{const le=M[Z]??0;if(g==null)return n.jsx("div",{className:"manager-bar-chart-bar",style:{...A,height:W(le),background:I}},Z);const oe=kt(le)<g;return n.jsxs("div",{className:"manager-bar-chart-slot",style:A,children:[n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--up",children:!oe&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full",style:{height:W(le),background:I}})}),n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--down",children:oe&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full manager-bar-chart-bar--down",style:{height:W(le),background:I}})})]},Z)}):_?n.jsx("div",{className:"manager-bar-chart-stack",style:A,children:(()=>{const I=M.reduce((le,oe,de)=>oe>0?de:le,-1);let Z=y;return M.map((le,oe)=>{if(le<=0)return null;const de=Math.min(Z,le/B*y);return Z-=de,n.jsx("div",{className:"manager-bar-chart-stack-segment",style:{height:de,background:(m??[])[oe],borderRadius:oe===I?"6px 6px 0 0":void 0}},oe)})})()}):g!=null?n.jsx(n.Fragment,{children:[{v:kt(O.a),c:t},...h?[]:[{v:kt(O.b),c:a}]].map(({v:I,c:Z},le)=>n.jsxs("div",{className:"manager-bar-chart-slot",style:A,children:[n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--up",children:I>=g&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full",style:{height:W(I),background:Z}})}),n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--down",children:I<g&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full manager-bar-chart-bar--down",style:{height:W(I),background:Z}})})]},le))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"manager-bar-chart-bar",style:{...A,height:G,background:t}}),!h&&n.jsx("div",{className:"manager-bar-chart-bar",style:{...A,height:S,background:a}})]}))},Q)})]}),n.jsx("div",{className:"manager-bar-chart-x-axis",children:e.map((O,Q)=>{const P=Mn(O,g==null);return n.jsxs("span",{className:`manager-bar-chart-x-axis__label${P?" manager-bar-chart-x-axis__label--future":""}`,children:[n.jsxs("span",{className:"caption-1 manager-bar-chart-x-axis__main",children:[O.isToday&&n.jsx("span",{className:"manager-bar-chart-x-axis__today-dot",style:{background:t}}),O.label]}),O.sublabel&&n.jsx("span",{className:"caption-1",children:O.sublabel})]},Q)})})]})})}),F&&n.jsx(Kn,{anchorRect:F.rect,title:F.title,items:F.items,showIndex:!1,closeOnOutsideClick:!1})]})}function Eu({control:e}){const{t}=_e.useTranslation(),{activeOptions:a,activeIdx:r,range:l,setRange:s,handlePrev:i,handleNext:u,periodOptions:c,period:d,setPeriod:m}=e,p=d==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),C=d==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:"manager-section-controls",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",icon:"chevron-left",ariaLabel:p,showTooltipInfo:p,disabled:r===a.length-1,onClick:i}),n.jsx(fn,{value:l,onChange:s,options:a,size:40,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",icon:"chevron-right",ariaLabel:C,showTooltipInfo:C,disabled:r<=0,onClick:u}),n.jsx(wn,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:d,onChange:b=>m(b),size:40})]})}function Wo(e,t,a,r=!0){const l=new Date(a.getFullYear(),a.getMonth(),a.getDate());return Array.from({length:7},(s,i)=>{const u=new Date(t);u.setDate(t.getDate()+i);const c=(e[Oo(u)]?.daily??[])[u.getDate()-1],d=c!=null&&Mn(c,r)||u>l;return{dt:u,entry:c,isFuture:d}})}function jv(e,t,a,r=!0){const{period:l,monthRange:s,weekRange:i,weekRanges:u,DOW:c}=t,d=la(),m=d.getFullYear(),p=d.getMonth()+1,C=d.getDate();if(l==="month"){const f=e[s]??{weekly:[],daily:[]},h=ma(s),_=h?h.year:null,g=h?h.month1:null,k=_&&g?Bn(_,g-1):1;return f.weekly.map((v,B)=>{const y=B+1;let w=v.label,A=!1,E=!1;if(_&&g){const D=k+B*7,N=new Date(_,g-1,D+6),F=N.getMonth()+1,R=N.getDate(),K=F===g?`${R}`:`${F}/${R}`;w=a("manager.chart.weekRange",{start:D,end:K});const L=new Date(m,p-1,C).getTime();A=L>=new Date(_,g-1,D).getTime()&&L<=N.getTime(),E=_>m||_===m&&(g>p||g===p&&D>C)}return{...v,label:w,sublabel:Au(a,y-1),isToday:A,future:v.future===!0||E||void 0,a:E?-1:v.a,b:E?0:v.b}})}const b=u.find(f=>f.value===i);if(!b)return[];const x=new Date(b.year,b.month-1,Bn(b.year,b.month-1)+b.week*7);return Wo(e,x,d,r).map(({dt:f,entry:h,isFuture:_})=>{const g=f.getMonth()+1,k=f.getDate(),v=f.getFullYear();return{label:g===b.month&&v===b.year?`${k}`:`${g}/${k}`,sublabel:c[f.getDay()]??"",future:_||void 0,a:_?-1:h&&h.a>0?h.a:0,b:_?0:h&&h.b>0?h.b:0,isToday:v===m&&g===p&&k===C,...h?.parts?{parts:_?h.parts.map(()=>0):h.parts}:{},...h?.partsB?{partsB:_?h.partsB.map(()=>0):h.partsB}:{}}})}const Tv={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function Mv({focusableBars:e,size:t="medium",barWidth:a,titleKey:r,titleLevel:l,data:s,colorA:i,colorB:u,labelAKey:c,labelBKey:d,showTotal:m=!1,totalUnitKey:p,totalLabelKey:C,control:b,hideControls:x=!1,rate:f=!1,rateAgg:h="dayMean",tightMax:_=!1,avgMode:g=!1,totalFormat:k,series:v,seriesMode:B="stack",loading:y=!1,onDetail:w,headExtra:A,headSegment:E,icon:D,disc:N,onClick:F,cardAriaLabel:R,cardTooltip:K,detailSize:L=32,barGap:$,baseline:T,className:J,inGrid:q=!1}){const{t:O}=_e.useTranslation(),Q=Tv[t],P=Nu(s),V=b??P,W=o.useMemo(()=>jv(s,V,O,T==null),[s,V,O,T]),G=B==="group"&&!!v&&v.length>0;$!=null&&!G&&Rt("bar-chart-bargap-without-group","[BarChart] barGap \uC740 seriesMode='group' + series \uC5D0\uC11C\uB9CC \uC4F0\uC778\uB2E4 \u2014 \uADF8 \uBC16\uC5D0\uC11C\uB294 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4.");const S=o.useMemo(()=>{if(!f)return W;const re=V.period==="month"?ma(V.monthRange):null,z=la(),ne=v?.length??0,H=U=>{const pe=[],Ee=[],ge=[];for(let me=0;me<ne;me++){let ie=0,be=0,he=0;for(const ue of U){const Me=kt(ue.a[me]),qe=kt(ue.b[me]);qe<=0||(ie+=Me,be+=qe,he+=Me/qe*100)}pe.push(h==="weighted"?be>0?Math.round(ie/be*100):0:U.length?Math.round(he/U.length):0),Ee.push(ie),ge.push(be)}return{pct:pe,ra:Ee,rb:ge}};return W.map((U,pe)=>{let Ee=U.a===-1?-1:U.b>0?Math.round(U.a/U.b*100):0;if(re&&!Mn(U)){const me=re.year,ie=re.month1-1,be=Wo(s,new Date(me,ie,Bn(me,ie)+pe*7),z).filter(he=>!he.isFuture);if(h==="weighted"){let he=0,ue=0;for(const{entry:Me}of be)Me&&Me.b>0&&(he+=Me.a,ue+=Me.b);Ee=ue>0?Math.round(he/ue*100):0}else Ee=be.length?Math.round(be.reduce((he,{entry:ue})=>he+(ue&&ue.b>0?ue.a/ue.b*100:0),0)/be.length):0}let ge=null;if(G&&!Mn(U)){let me;if(re){const be=re.year,he=re.month1-1;me=Wo(s,new Date(be,he,Bn(be,he)+pe*7),z).filter(ue=>!ue.isFuture).map(({entry:ue})=>({a:ue?.parts??[],b:ue?.partsB??[]}))}else me=[{a:U.parts??[],b:U.partsB??[]}];const ie=H(me);ge={parts:ie.pct,rawParts:ie.ra,rawPartsB:ie.rb}}return{...U,a:Ee,b:U.a===-1?0:d&&U.parts&&U.parts[1]>0?Math.round(U.parts[0]/U.parts[1]*100):0,rawA:U.a===-1?-1:U.a,rawB:U.b,...ge??{}}})},[W,f,h,d,V.period,V.monthRange,s,G,v?.length]),M=o.useMemo(()=>{if(f||g){const z=(V.period==="week"?W:s[V.monthRange]?.daily??[]).filter(H=>H.a!==-1);if(z.length===0)return 0;if(f&&h==="weighted"){let H=0,U=0;for(const pe of z)pe.b>0&&(H+=pe.a,U+=pe.b);return U>0?Math.round(H/U*100):0}const ne=f?z.reduce((H,U)=>H+(U.b>0?U.a/U.b*100:0),0):z.reduce((H,U)=>H+(U.a>0?U.a:0),0);return Math.round(ne/z.length)}const re=V.period==="month"?s[V.monthRange]?.daily??[]:S;return T!=null?re.reduce((z,ne)=>z+(Mn(ne,!1)?0:kt(ne.a)+(d?kt(ne.b):0)),0):re.reduce((z,ne)=>z+(ne.a>0?ne.a:0)+(d&&ne.b>0?ne.b:0),0)},[S,W,f,h,g,T,d,V.period,V.monthRange,s]),I=v&&v.length>0?v.map(re=>({color:re.color,label:re.label})):[{color:i,label:O(c)},...d?[{color:u,label:O(d)}]:[]],Z=t==="small",le=[Z?"manager-section--compact":t==="large"?"manager-section--full":void 0,J].filter(Boolean).join(" ")||void 0,oe=r?O(r):"",de=oe?O("trainingStatus.detailFor",{name:oe,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):O("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Fo,{className:le,inGrid:q,icon:D,disc:N,onClick:F,ariaLabel:R,tooltip:K,headSegment:E,headMenuItems:w?[{label:de,icon:"list",onClick:w,closeOnSelect:!0}]:void 0,title:O(r),titleLevel:l,titleClassName:Z?"h5 chart-section-title--small":void 0,headRight:Z?A??void 0:({collapsed:re})=>n.jsxs(n.Fragment,{children:[!x&&n.jsx(Eu,{control:V}),A,w&&!re&&n.jsx("span",{className:"manager-bar-chart-detail-btn",children:n.jsx(fe,{htmlType:"button",size:L,type:"dot",icon:"list",ariaLabel:de,showTooltipInfo:de,onClick:w})})]}),subRow:n.jsxs(n.Fragment,{children:[m?f||g||C&&k?n.jsx(Ya,{label:Z?void 0:`${O(V.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${O(C??c)}`,children:k?(k(M).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((re,z)=>/\d/.test(re)?n.jsx("span",{className:"barchart-total__num h0",children:re},z):n.jsx("span",{className:"barchart-total__unit h5",children:re},z)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"barchart-total__num h0",children:M}),p&&n.jsx("span",{className:"barchart-total__unit h5",children:O(p)})]})}):n.jsxs(Ya,{children:[n.jsx("span",{className:"barchart-total__num h0",children:M}),n.jsx("span",{className:"barchart-total__unit h5",children:O(c)}),p&&n.jsx("span",{className:"barchart-total__unit h5",children:O(p)})]}):n.jsx("span",{}),n.jsx(Io,{items:I,className:"caption-1"})]}),children:y?n.jsx("div",{className:"manager-bar-chart-wrap manager-bar-chart-loading","aria-busy":"true",children:n.jsx("div",{className:"manager-bar-chart-inner",children:n.jsxs("div",{className:"manager-bar-chart-area manager-bar-chart-area--loading",children:[n.jsx("div",{className:"manager-bar-chart-plot manager-bar-chart-plot--loading",style:{height:Q.height},children:n.jsx(Ga,{size:32})}),n.jsx("div",{className:"manager-bar-chart-x-axis","aria-hidden":"true",children:n.jsxs("span",{className:"manager-bar-chart-x-axis__label",children:[n.jsx("span",{className:"caption-1 manager-bar-chart-x-axis__main",children:"\xA0"}),S.some(re=>!!re.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(Sv,{focusableBars:e,data:S,colorA:i,colorB:d?u:void 0,labelA:O(c),labelB:d?O(d):void 0,barWidth:a??Q.barWidth,barGap:$,baseline:T,height:Q.height,maxOverride:f?100:void 0,tightMax:_,seriesColors:v?.map(re=>re.color),seriesLabels:v?.map(re=>re.label),rateLabels:f?{total:O("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:O("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:G})})}const Du=120,Lv={left:38,right:16,top:26,bottom:24};function $v({points:e=[],range:t,ticks:a=[],axisTitle:r,color:l,height:s=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:d,className:m}){const[p,C]=o.useState(null),[b,x]=o.useState(null);o.useEffect(()=>{if(!b)return;const T=q=>C(Math.round(q)||null);if(T(b.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const J=new ResizeObserver(([q])=>T(q.contentRect.width));return J.observe(b),()=>{J.disconnect()}},[b]);const{payload:f,anchorRect:h,openAfterDelay:_,close:g}=Sy(Du),k=o.useCallback((T,J)=>{T&&_(T,J.getBoundingClientRect())},[_]),v=p??i,B=s,{left:y,right:w,top:A,bottom:E}={...Lv,...u},[D,N]=t,F=T=>N===D?y:y+(v-y-w)*(T-D)/(N-D),R=T=>A+(B-A-E)*(100-T)/100,K={x:F,y:R,plot:{left:y,right:v-w,top:A,bottom:B-E,width:Math.max(0,v-y-w),height:Math.max(0,B-A-E)}},L=e.filter(T=>!T.hollow),$=l??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:x,className:we("line-chart",m),viewBox:`0 0 ${v} ${B}`,role:"img","aria-label":d??e.map(T=>T.description).filter(Boolean).join(", "),children:[r&&n.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:r}),[0,100].map(T=>n.jsxs("g",{children:[n.jsx("line",{className:"line-chart__grid",x1:y,x2:v-w,y1:R(T),y2:R(T)}),n.jsxs("text",{className:"line-chart__tick",x:y-6,y:R(T)+4,textAnchor:"end",children:[T,"%"]})]},T)),c?.(K),a.map(T=>n.jsx("text",{className:"line-chart__tick",x:F(T.x),y:B-5,textAnchor:"middle",children:T.label},T.x)),L.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:$,points:L.map(T=>`${F(T.x)},${R(T.pct)}`).join(" ")}),e.map(T=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:J=>k(T.description,J.currentTarget),onPointerLeave:g,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:F(T.x),cy:R(T.pct),r:12}),n.jsx("circle",{className:we("line-chart__dot-main",T.hollow&&"is-hollow"),cx:F(T.x),cy:R(T.pct),r:4,stroke:$,fill:T.hollow?void 0:$})]},T.x))]}),f!=null&&n.jsx(vn,{anchorRect:h,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:f,children:f})]})}function Rv({icon:e,iconSize:t=56,title:a,titleClass:r="h2",description:l,tipGroups:s,start:i,className:u}){return n.jsxs("div",{className:we("game-intro",u),children:[e!=null&&n.jsx("span",{className:"game-intro__icon","aria-hidden":"true",style:{"--game-intro-icon":`${t}px`},children:e}),n.jsx("h2",{className:we("game-intro__title",r),children:a}),l!=null&&n.jsx("p",{className:"game-intro__description body-3",children:l}),s?.map((c,d)=>n.jsxs("div",{className:"game-intro__tips",children:[c.title!=null&&n.jsx("span",{className:"game-intro__tips-title body-3",children:c.title}),c.tips.map((m,p)=>n.jsxs("span",{className:"game-intro__tip body-3",children:[m.icon!=null&&n.jsx("span",{"aria-hidden":"true",children:m.icon}),n.jsx("span",{children:m.text})]},p))]},d)),i&&n.jsx(fe,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const Su=(e,t,a)=>{const r=new Date(Date.UTC(e,t,a));return`${r.getUTCFullYear()}-${String(r.getUTCMonth()+1).padStart(2,"0")}-${String(r.getUTCDate()).padStart(2,"0")}`},ju=(e,t,a,r)=>({from:zl(e,t,a),to:new Date(zl(e,t,a+r).getTime()-1),fromYmd:Su(e,t,a),toYmd:Su(e,t,a+r-1)});function Pv(e,t=0){if(e.period==="month"){const l=ma(e.monthRange),s=la(),i=l?l.year:s.getFullYear(),u=(l?l.month1:s.getMonth()+1)-1+t,c=new Date(Date.UTC(i,u+1,0)).getUTCDate();return ju(i,u,1,c)}const a=e.weekRanges.find(l=>l.value===e.weekRange);if(!a){const l=new Date,s=La();return{from:l,to:l,fromYmd:s,toYmd:s}}const r=Bn(a.year,a.month-1);return ju(a.year,a.month-1,r+(a.week+t)*7,7)}const Ho={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function Tu(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Mu({done:e,total:t,segments:a,color:r="var(--color-main)",size:l="medium",strokeWidth:s,label:i="%",hideCenter:u=!1,hideLabel:c=!1}){const d=typeof l=="number"?l:Ho[l].diameter,m=s??(typeof l=="number"?12:Ho[l].strokeWidth),p=d/2,C=(d-m)/2,b=2*Math.PI*C;if(a&&a.length>0){const _=a.reduce((g,k)=>{const v=g.length>0?g[g.length-1].acc:0,B=Number.isFinite(k.ratio)?k.ratio:0,y=Math.max(0,Math.min(B,1-v));return g.push({color:k.color,rotate:-90+v*360,dash:b*y,acc:v+y}),g},[]);return n.jsx("div",{className:"ring-chart",style:{width:d,height:d},children:n.jsxs("svg",{width:d,height:d,viewBox:`0 0 ${d} ${d}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:p,cy:p,r:C,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:m}),_.map((g,k)=>g.dash>0&&n.jsx("circle",{cx:p,cy:p,r:C,fill:"none",stroke:g.color,strokeWidth:m,strokeDasharray:`${g.dash} ${b}`,strokeLinecap:"round",transform:`rotate(${g.rotate} ${p} ${p})`},k))]})})}const x=(t??0)>0?Math.min((e??0)/t,1):0,f=b*x,h=b-f;return n.jsxs("div",{className:"ring-chart",style:{width:d,height:d},children:[n.jsxs("svg",{width:d,height:d,viewBox:`0 0 ${d} ${d}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:p,cy:p,r:C,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:m}),x>0&&n.jsx("circle",{cx:p,cy:p,r:C,fill:"none",stroke:r,strokeWidth:m,strokeDasharray:`${f} ${h}`,strokeLinecap:x<.02||x>.98?"butt":"round",transform:`rotate(-90 ${p} ${p})`})]}),!u&&n.jsxs("div",{className:`ring-chart__center${c?"":` ${d<=96?"ring-chart__center--small":l==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${d<=96?"h2":"h1"}`,children:Tu(x)}),!c&&n.jsx("span",{className:`ring-chart__label ${d<=96?"caption-2":"caption-1"}${d<=96||l==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function Iv({titleKey:e,titleLevel:t,headRight:a,icon:r,showTotal:l,totalLabelKey:s,legend:i,loading:u,className:c,inGrid:d=!1,onClick:m,ariaLabel:p,tooltip:C,...b}){const{t:x}=_e.useTranslation();if(!e)return n.jsx(Mu,{...b});const f=(b.total??0)>0?Tu(Math.min((b.done??0)/b.total,1)):0,h=b.size==="small",_=typeof b.size=="number"?b.size:Ho[b.size??"medium"].diameter,g=b.size==="large",k=[c,h?"manager-section--compact":g?"manager-section--full":""].filter(Boolean).join(" ")||void 0,v=r&&n.jsx("span",{className:"chart-section-icon",children:n.jsx(tt,{icon:r,className:"chart-section-icon-inner"})});return n.jsx(Fo,{className:k,inGrid:d,onClick:m,ariaLabel:p,tooltip:C,title:x(e),titleLevel:t,titleClassName:h?"h5 chart-section-title--small":void 0,headRight:v||(h?void 0:a),subRow:(l||i)&&n.jsxs(n.Fragment,{children:[l?n.jsxs(Ya,{label:!h&&s?x(s):void 0,children:[n.jsx("span",{className:"barchart-total__num h0",children:f}),n.jsx("span",{className:"barchart-total__unit h5",children:"%"})]}):n.jsx("span",{}),i&&n.jsx(Io,{items:i})]}),children:u?n.jsx("div",{className:"ring-chart-section-body ring-chart-section-body--offset",children:n.jsx("div",{className:"ring-chart ring-chart--loading",style:{width:_,height:_},"aria-busy":"true",children:n.jsx(Ga,{size:32})})}):n.jsx("div",{className:"ring-chart-section-body ring-chart-section-body--offset",children:n.jsx(Mu,{...b,hideCenter:b.hideCenter??h})})})}function Fv({label:e,value:t,change:a,changeType:r,icon:l,tooltip:s,onClick:i,children:u}){const c=o.useRef(null),{anchorRect:d,openAt:m,close:p}=Pa(),C=o.useCallback(()=>{s&&c.current&&m(c.current)},[s,m]),b=r??(a===void 0?void 0:a>0?"up":a<0?"down":"neutral"),x=a===void 0?void 0:a>0?`+${a}`:`${a}`,f=o.useCallback(h=>{i&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),i())},[i]);return n.jsxs("div",{ref:c,className:`manager-stat-card${i?" manager-stat-card--clickable":""}`,onClick:i,onKeyDown:i?f:void 0,onPointerEnter:C,onPointerLeave:p,onFocus:C,onBlur:p,role:i?"button":void 0,tabIndex:i?0:void 0,"aria-label":i?[e,t,x].filter(h=>h!==void 0&&h!=="").join(" "):void 0,children:[s&&d&&n.jsx(Dn,{anchorRect:{left:d.left,top:d.top+21,right:d.right,bottom:d.bottom,width:d.width,height:d.height},text:s}),n.jsxs("div",{className:"manager-stat-card__label-row",children:[n.jsx("span",{className:"manager-stat-card__label h5",children:e}),l&&n.jsx("span",{className:"manager-stat-card__icon",children:n.jsx(tt,{icon:l,className:"manager-stat-card__icon-inner"})})]}),n.jsxs("div",{className:"manager-stat-card__content",children:[n.jsxs("div",{className:"manager-stat-card__left",children:[n.jsx("div",{className:"manager-stat-card__value h2",children:t}),x&&n.jsx("div",{className:`manager-stat-card__change manager-stat-card__change--${b??"neutral"} caption-1`,children:x})]}),u&&n.jsx("div",{className:"manager-stat-card__body",children:u})]})]})}function Lu({value:e,onChange:t,min:a=0,max:r=100,step:l=1,orientation:s="horizontal",size:i=24,disabled:u=!1,ariaLabel:c,length:d,className:m,label:p,formatValue:C,labelPos:b,labelAlign:x="right",showMinMax:f=!1,minLabel:h,maxLabel:_,showBgTick:g=!1,showFillTick:k=!1,tickStep:v,tickShape:B="dot"}){t&&!c&&Rt("Slider:unnamed","[ihab/Slider] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. label prop \uC740 \uAC12 \uD45C\uAE30 \uBC29\uC2DD\uC774\uC9C0 \uC774\uB984\uC774 \uC544\uB2D9\uB2C8\uB2E4.");const y=Math.min(r,Math.max(a,e)),w=r>a?(y-a)/(r-a):0,A=s==="vertical",E=!t,D=W=>t?.(Number(W.target.value)),N=typeof d=="number"?`${d}px`:d,F={"--slider-ratio":String(w),"--slider-thumb":`${i}px`,...N?A?{height:N}:{width:N}:{}},R=v??l,K=(g||k)&&R>0&&r>a?Math.floor((r-a)/R+1e-6):0;if(K>0&&K<=100){const W=B!=="dash",G=le=>W?`radial-gradient(circle, ${le} 0.5px, transparent 1px)`:A?`linear-gradient(to bottom, transparent calc(50% - 2px), ${le} calc(50% - 2px), ${le} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${le} calc(50% - 2px), ${le} calc(50% + 2px), transparent calc(50% + 2px))`,S=W?"2px":"4px",M=[],I=[],Z=[];for(let le=0;le<=K;le++){const oe=le*R/(r-a);if(oe>1+1e-6)break;const de=`${((A?1-oe:oe)*100).toFixed(4)}%`,re=oe<=w+1e-6;if(re?!k:!g)continue;const z=re?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";M.push(G(z)),I.push(A?`${S} var(--slider-thumb)`:`var(--slider-thumb) ${S}`),Z.push(A?`center ${de}`:`${de} center`)}M.push(A?"linear-gradient(to top, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))":"linear-gradient(to right, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))"),I.push("100% 100%"),Z.push("0 0"),F.backgroundImage=M.join(", "),F.backgroundSize=I.join(", "),F.backgroundPosition=Z.join(", "),F.backgroundRepeat="no-repeat"}const L=C?C(y):p==="percent"?`${Math.round(r>a?(y-a)/(r-a)*100:0)}%`:p==="count"?`${y} / ${r}`:y===a&&h?h:y===r&&_?_:void 0,$=n.jsx("input",{type:"range",className:we("slider",`slider--${s}`,E&&"slider--static",!p&&!f&&m),min:a,max:r,step:l,value:y,disabled:u,readOnly:E,tabIndex:E?-1:void 0,"aria-label":c,"aria-valuetext":L,"aria-orientation":s,onChange:D,style:F});if(!p&&!f)return $;const T=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:h??a}),J=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:_??r}),q=f?n.jsxs("div",{className:we("slider-track-group",`slider-track-group--${s}`,!p&&m),children:[A?J:T,$,A?T:J]}):$;if(!p)return q;const O=b??(A?"bottom":"right"),Q=`${Math.round(r>a?(y-a)/(r-a)*100:0)}%`,P=C?C(y):p==="percent"?Q:p==="count"?`${y} / ${r}`:String(y),V=n.jsx("span",{className:"slider-wrap__value body-3b",children:P});return n.jsxs("div",{className:we("slider-wrap",`slider-wrap--${s}`,`slider-wrap--label-${O}`,`slider-wrap--align-${x}`,m),children:[q,V]})}const Ov=.86,zv=250,Vo=(e,t,a,r)=>Math.round(Math.min(r,Math.max(a,e-t))),qo=(e,t,a,r)=>{const l=Vo(e,t,a,r);return`${l<0?"-":"+"}${Math.abs(l)} dB`};function Uo({analyser:e,audioElement:t,orientation:a="horizontal",length:r,label:l,labelPos:s,labelAlign:i="right",floorDb:u=-60,refDb:c=-35,displayMin:d=-5,displayMax:m=25,className:p,ariaLabel:C}){const b=o.useRef(null),x=o.useRef(null),f=o.useRef(null),h=o.useRef(null),[_,g]=o.useState(null);o.useEffect(()=>{const y=$=>{const T=qo($,c,d,m);f.current&&(f.current.textContent=T);const J=b.current;J&&(J.setAttribute("aria-valuenow",String(Vo($,c,d,m))),J.setAttribute("aria-valuetext",T))},w=e??PC(t)??(_&&_.el===t?_.node:null),A=x.current;if(!w||!A){A?.style.setProperty("--meter-level","0"),y(u);let $=!1;return!e&&t&&er(t).then(T=>{!$&&T&&g({el:t,node:T})}),()=>{$=!0}}to();const E=new Float32Array(w.fftSize);let D=0,N=0,F=0,R=0,K=null;const L=$=>{const T=IC(w,E);D=T>D?T:D*Ov;const J=D>1e-5?20*Math.log10(D):-1/0,q=Math.max(u,J),O=q-c,Q=Math.min(1,Math.max(0,(O-d)/(m-d)));if(A.style.setProperty("--meter-level",Q.toFixed(3)),N+=q,F+=1,$-R>=zv){const P=N/F;K=K==null?P:K*.6+P*.4,y(K),N=0,F=0,R=$}h.current=requestAnimationFrame(L)};return h.current=requestAnimationFrame(L),()=>{h.current!=null&&cancelAnimationFrame(h.current),h.current=null}},[e,t,_,u,c,d,m]);const k=typeof r=="number"?`${r}px`:r,v=n.jsx("div",{className:"audio-meter__track",style:k?a==="vertical"?{height:k}:{width:k}:{},children:n.jsx("div",{ref:x,className:"audio-meter__fill"})}),B=s??(a==="vertical"?"bottom":"right");return n.jsxs("div",{ref:b,className:we("audio-meter",`audio-meter--${a}`,l&&`audio-meter--label-${B}`,l&&`audio-meter--align-${i}`,p),role:"meter","aria-label":C,"aria-valuemin":d,"aria-valuemax":m,"aria-valuenow":Vo(u,c,d,m),"aria-valuetext":qo(u,c,d,m),children:[v,l&&n.jsx("span",{ref:f,className:"audio-meter__value caption-2",children:qo(u,c,d,m)})]})}const $u=260;function Ru({message:e,position:t,duration:a,onClose:r}){const[l,s]=o.useState(!1),[i,u]=o.useState(!1),c=o.useRef(i),d=o.useRef(l);o.useEffect(()=>{c.current=i},[i]),o.useEffect(()=>{d.current=l},[l]);const m=o.useRef(null),p=o.useRef(""),C=o.useRef(r);o.useEffect(()=>{C.current=r});const b=a,x=o.useRef(null),f=o.useRef(0),h=o.useRef(0),_=o.useRef(!1),g=o.useRef(null),k=o.useRef(null),v=o.useRef(null),B=o.useRef(null),y=o.useRef(()=>{});y.current=E=>{E<0||(f.current=Date.now(),h.current=E,x.current=setTimeout(()=>{x.current=null,s(!1),g.current=setTimeout(()=>{u(!1);try{C.current()}catch{}},$u)},E))};const w=o.useCallback(()=>{_.current||!x.current||(_.current=!0,clearTimeout(x.current),x.current=null,h.current=Math.max(0,h.current-(Date.now()-f.current)))},[]),A=o.useCallback(()=>{_.current&&(_.current=!1,y.current(h.current))},[]);return o.useEffect(()=>{if(e!==p.current&&(x.current&&(clearTimeout(x.current),x.current=null),g.current&&(clearTimeout(g.current),g.current=null)),e){if(d.current)return b>0&&!x.current&&(_.current?h.current=b:y.current(b)),p.current=e,()=>{x.current&&(clearTimeout(x.current),x.current=null),g.current&&(clearTimeout(g.current),g.current=null)};const E=()=>{const D=m.current;if(D)try{D.classList.remove("is-visible"),D.style.transition="none",t==="top"?D.style.transform="translateX(-50%) translateY(-16px)":D.style.transform="translateX(-50%) translateY(16px)",D.style.opacity="0",D.offsetWidth,D.style.transition="",D.classList.add("is-visible"),B.current&&clearTimeout(B.current),B.current=setTimeout(()=>{B.current=null;try{D.style.opacity="",D.style.transform="",D.style.transition=""}catch{}},60)}catch{}};c.current?(E(),s(!0)):(u(!0),k.current=requestAnimationFrame(()=>{v.current=requestAnimationFrame(()=>{E(),s(!0)})})),b>0&&(_.current=!1,y.current(b))}else s(!1),g.current=setTimeout(()=>u(!1),$u);return p.current=e,()=>{x.current&&clearTimeout(x.current),g.current&&clearTimeout(g.current),k.current&&cancelAnimationFrame(k.current),v.current&&cancelAnimationFrame(v.current),B.current&&clearTimeout(B.current),x.current=null,g.current=null,k.current=null,v.current=null,B.current=null}},[e,b,t]),{mounted:i,showing:l,popupRef:m,pause:w,resume:A}}function ha({message:e="",position:t="top",type:a="normal",onClose:r=()=>{},duration:l=2e3}){const{mounted:s,showing:i,popupRef:u,pause:c,resume:d}=Ru({message:e,position:t,duration:l,onClose:r}),m=o.useRef(null),[p,C]=o.useState(!1);if(o.useEffect(()=>{i?C(!0):s||C(!1)},[i,s]),!s)return null;const b=a==="notice"||a==="warning"?a:"normal",x=n.jsx("div",{ref:u,className:`toast toast--${t} ${i?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:f=>{m.current=f.pointerType},onMouseEnter:()=>{m.current!=="touch"&&c()},onMouseLeave:d,onFocusCapture:c,onBlurCapture:d,children:n.jsx("div",{className:`toast__inner toast__inner--${b} body-2`,"aria-hidden":p||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?cn.createPortal(x,document.body):x}const Wv=24;function Hv({value:e,max:t=100,size:a=8,color:r,trackColor:l,label:s,formatValue:i,labelPos:u,labelAlign:c="right",ariaLabel:d,className:m}){const p=Number.isFinite(t)&&t>0?t:1,C=Math.max(0,Math.min(Number.isFinite(e)?e:0,p)),b=C/p*100,x=Number.isFinite(t)&&t>0?t:0,f=u??(a>=Wv?"inside":"bottom"),h=f==="center"?"inside":f,_=h==="inside"&&(c==="left"?b>=15:c==="center"?b>=50:b>=85),g={};return r&&(g["--progress-bar-fill"]=r),l&&(g["--progress-bar-track"]=l),n.jsxs("div",{className:we("progress-bar",`progress-bar--${a}`,`progress-bar--label-${h}`,s&&`progress-bar--align-${c}`,s&&_&&"progress-bar--label-on-fill",m),style:g,children:[n.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":C,"aria-valuemin":0,"aria-valuemax":x,"aria-valuetext":s?i?i(C):s==="percent"?void 0:s==="raw"?String(C):`${C} / ${x}`:void 0,"aria-label":d,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${b}%`}})}),s&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(C):s==="percent"?`${Math.round(b)}%`:s==="raw"?String(C):`${C} / ${x}`})]})}const Pu={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},Vv="rgba(255, 255, 255, 0.16)";function Iu({max:e,index:t,inactiveBg:a,inactiveColor:r,transparent:l,variant:s="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=_e.useTranslation(),d=Cn("(max-width: 767px)");if(!Number.isInteger(e)||e<=0)return null;const m=Number.isInteger(t)?Math.max(0,Math.min(t,e-1)):0,p=u??c("progress.steps",{current:m+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),C={};if(a&&(C["--pi-inactive-bg"]=a),r&&(C["--pi-inactive-color"]=r),l&&(a||(C["--pi-inactive-bg"]=Vv),r||(C["--pi-inactive-color"]="var(--color-white)")),s==="dot")return n.jsxs("div",{className:"progress-indicator progress-indicator--dot",style:C,role:i?"status":"img","aria-label":i?void 0:p,children:[i&&n.jsx("span",{style:Pu,children:p}),Array.from({length:e}).map((x,f)=>n.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${f<m?" done":f===m?" active":""}`},f))]});const b=i?n.jsx("span",{role:"status",style:Pu,children:p}):null;return d?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:C,role:"list","aria-label":p,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[m+1," / ",e]})}),b]}):n.jsxs(n.Fragment,{children:[b,n.jsx("div",{className:"progress-indicator",style:C,role:"list","aria-label":p,children:Array.from({length:e}).map((x,f)=>n.jsx("span",{role:"listitem","aria-current":f===m?"step":void 0,className:`progress-indicator-dot ${f<m?" done":f===m?" active":""} body-3`,children:f+1},f))})]})}function qv(e){if(!e)return[];const t=[];let a=0,r="";for(const l of e.trim()){if(l==="("?a++:l===")"&&a--,/\s/.test(l)&&a===0){r&&(t.push(r),r="");continue}r+=l}return r&&t.push(r),t}function Uv({children:e,className:t,style:a,rowLabel:r,onRowClick:l}){return n.jsx("div",{role:"cell",className:t?`table-cell ${t}`:"table-cell",style:a,children:r&&l?n.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":r,children:e}):e})}function Go({variant:e="default",children:t,className:a,draggable:r,onClick:l,onMouseEnter:s,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:d,colSpan:m,describedBy:p,rowHasButton:C}){const b=o.useCallback(x=>{l&&x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),l())},[l]);return e==="loading"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--loading",children:n.jsx("div",{role:"cell","aria-colspan":m,className:"table-row__full-cell",children:n.jsx(Ga,{size:28})})})}):e==="empty"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--empty body-3",children:n.jsx("div",{role:"cell","aria-colspan":m,className:"table-row__full-cell",children:t})})}):n.jsxs("div",{role:"presentation",className:"table-row-wrap",children:[n.jsx("div",{className:a?`table-row ${a}`:"table-row",draggable:r,onClick:l,onKeyDown:l?b:void 0,onMouseEnter:s,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:l&&!C?0:void 0,"aria-describedby":l&&!C?p:void 0,children:t}),d&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":m,className:"table-row-expand__cell",children:d})})]})}function Gv({dir:e}){return n.jsx(e==="asc"?Ys:Ks,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function Kv({children:e,onClick:t,className:a,sortDir:r,ariaSort:l,onResizeStart:s}){const i=n.jsxs(n.Fragment,{children:[e,r&&n.jsx(Gv,{dir:r})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":l,className:we("table-field body-3",a,r?"table-field--sorted":"",s?"table-field--resizable":""),children:[t?n.jsx("button",{type:"button",className:"table-field__button",children:i}):i,s&&n.jsx("span",{className:"table-field__resizer",onPointerDown:s,onClick:u=>u.stopPropagation(),"aria-hidden":"true"})]})}function Fu(e){return e&&e!=="left"?`table-col--${e}`:void 0}function Ko({fields:e=[],sort:t,sortable:a=!0,headerGroups:r,items:l=[],renderRow:s,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:d,onRowDragStart:m,onRowDragEnd:p,draggingId:C,gridTemplateColumns:b,mobileGridTemplateColumns:x,resizable:f=!0,resizeMode:h="grow",resizeStorageKey:_,size:g="small",title:k,icon:v,count:B,collapsed:y=!1,onToggleCollapse:w,headerActions:A,empty:E,loading:D,dragOver:N=!1,onDragOver:F,onDragLeave:R,onDrop:K,renderExpandedRow:L,expandedId:$}){const{t:T}=_e.useTranslation(),J=o.useId(),q=`table-title-${J}`,O=`table-row-hint-${J}`,[Q,P]=o.useState(null),V=o.useCallback((ae,ve)=>{const ze=e[ve];if(!ze)return;if(ze.sortValue)return ze.sortValue(ae);if(ze.sortKey)return ae[ze.sortKey];const Qe=s(ae)[ve]?.content;return typeof Qe=="string"||typeof Qe=="number"?Qe:void 0},[e,s]),W=!t&&a&&!e.some(ae=>ae.sortDir!==void 0||ae.onClick),G=o.useCallback(ae=>{const ve=e[ae];if(!ve||ve.sortable===!1)return!1;if(ve.sortValue||ve.sortKey)return!0;const ze=l[0];return ze!==void 0&&V(ze,ae)!==void 0},[e,l,V]),S=o.useMemo(()=>t?e.map(ae=>{if(!ae.sortKey||ae.sortDir!==void 0)return ae;const ve=t.field(String(ae.label??""),ae.sortKey);return{...ae,sortDir:ve.sortDir,onClick:ae.onClick??ve.onClick}}):W?e.map((ae,ve)=>G(ve)?{...ae,sortDir:Q?.index===ve?Q.asc?"asc":"desc":null,onClick:()=>P(ze=>ze?.index===ve?{index:ve,asc:!ze.asc}:{index:ve,asc:!0})}:ae):e,[e,t,W,Q,G]),M=o.useMemo(()=>{if(!W||!Q)return l;const{index:ae,asc:ve}=Q;return[...l].sort((ze,Qe)=>ur(V(ze,ae),V(Qe,ae),ve))},[l,W,Q,V]),I=Cn("(max-width: 767px)"),Z=x&&I?x:null,le=f&&!I,oe=o.useRef(le);oe.current=le;const de=48,re=40,z=o.useRef(()=>de),ne=_?`table-cols:${_}`:null,H=o.useRef(null),U=o.useRef(null),pe=o.useRef(null),Ee=o.useRef(null),[ge,me]=o.useState(!1),[ie,be]=o.useState(0),he=o.useCallback(()=>{const ae=pe.current;if(!ae)return;const ve=Ee.current,ze=H.current;if(ve&&(ve.style.minWidth="",ze)){const Qe=ze.scrollWidth,ht=oe.current?re:0;ve.style.minWidth=Qe>ae.clientWidth+1?`${Qe+ht}px`:""}me(ae.scrollWidth>ae.clientWidth+1),be(ae.clientWidth)},[]),ue=o.useCallback((ae,ve)=>{const ze=ae.current;ze&&U.current&&U.current.unobserve(ze),ae.current=ve,ve?(!U.current&&typeof ResizeObserver<"u"&&(U.current=new ResizeObserver(()=>he())),U.current?.observe(ve)):!pe.current&&!Ee.current&&(U.current?.disconnect(),U.current=null),he()},[he]),Me=o.useCallback(ae=>ue(pe,ae),[ue]),qe=o.useCallback(ae=>ue(Ee,ae),[ue]);o.useEffect(()=>{he()}),o.useEffect(()=>{if(typeof window>"u")return;const ae=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>he()):null;return window.addEventListener("resize",he),()=>{ae!=null&&cancelAnimationFrame(ae),window.removeEventListener("resize",he)}},[he]);const je=o.useRef(()=>!1),Ve=o.useRef([]),Oe=o.useRef(null),dt=ae=>{if(!ae||typeof window>"u")return null;try{const ve=JSON.parse(window.localStorage.getItem(ae)??"null");return Array.isArray(ve)&&ve.length>0&&ve.every(ze=>typeof ze=="number"&&Number.isFinite(ze)&&ze>0)?ve:null}catch{return null}},[rt,nt]=o.useState(()=>dt(ne)),[pt,Ne]=o.useState(ne),[Ue,ke]=o.useState(()=>dt(ne)!==null);if(pt!==ne){Ne(ne);const ae=dt(ne);nt(ae),ke(ae!==null)}const He=o.useRef(rt);o.useEffect(()=>{He.current=rt},[rt]);const Be=o.useCallback(ae=>{const ve=Oe.current;if(!ve)return;const ze=He.current;if(ze){const Qe=[...ze],ht=()=>de;if(ve.next!=null&&ve.startWNext!=null){const it=ae.clientX-ve.startX,It=Math.max(ht()-ve.startW,Math.min(ve.startWNext-ht(),it));Qe[ve.index]=ve.startW+It,Qe[ve.next]=ve.startWNext-It}else Qe[ve.index]=Math.max(ht(),ve.startW+(ae.clientX-ve.startX));He.current=Qe,nt(Qe)}},[]),Se=o.useCallback(()=>{if(Oe.current=null,window.removeEventListener("pointermove",Be),window.removeEventListener("pointerup",Se),window.removeEventListener("pointercancel",Se),document.body.style.cursor="",document.body.style.userSelect="",ne&&He.current)try{window.localStorage.setItem(ne,JSON.stringify(He.current))}catch{}},[Be,ne]),Le=o.useCallback((ae,ve)=>{ve.preventDefault(),ve.stopPropagation();const ze=H.current;if(!ze)return;const Qe=Array.from(ze.children).map(it=>it.getBoundingClientRect().width),ht=h==="fit"?S.findIndex((it,It)=>It>ae&&it.resizable!==!1):-1;Oe.current=ht>=0?{index:ae,startX:ve.clientX,startW:Qe[ae],next:ht,startWNext:Qe[ht]}:{index:ae,startX:ve.clientX,startW:Qe[ae]},He.current=Qe,nt(Qe),ke(!0),window.addEventListener("pointermove",Be),window.addEventListener("pointerup",Se),window.addEventListener("pointercancel",Se),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[Be,Se,h,S]),Ze=o.useCallback(()=>{const ae=H.current,ve=ae?.closest(".table-wrap");if(!ae||!ve)return null;const ze=ve.style.getPropertyValue("--table-grid-cols");ve.style.setProperty("--table-grid-cols",S.map((Bt,ut)=>je.current(ut)?Ve.current[ut]:"max-content").join(" "));const Qe=Array.from(ve.querySelectorAll(".table-row")).filter(Bt=>!Bt.classList.contains("table-row--loading")&&!Bt.classList.contains("table-row--empty")),ht=S.map((Bt,ut)=>{let Ct=ae.children[ut]?.getBoundingClientRect().width??0;for(const Yt of Qe){const gn=Yt.children[ut];gn&&(Ct=Math.max(Ct,gn.getBoundingClientRect().width))}const Tt=je.current(ut)?parseFloat(Ve.current[ut]):NaN;return Number.isFinite(Tt)?Tt:Math.max(z.current(ut),Math.ceil(Ct))}),it=window.getComputedStyle(ae),It=ae.clientWidth-(parseFloat(it.paddingLeft)||0)-(parseFloat(it.paddingRight)||0);ze?ve.style.setProperty("--table-grid-cols",ze):ve.style.removeProperty("--table-grid-cols");let Gt=ht;const An=ht.reduce((Bt,ut,Ct)=>Bt+(je.current(Ct)?ut:0),0),Wt=ht.reduce((Bt,ut,Ct)=>Bt+(je.current(Ct)?0:ut),0),Kt=It-An;if(It>0&&Wt>0&&Kt>0){const Bt=Kt/Wt;Gt=ht.map((Ct,Tt)=>je.current(Tt)?Ct:Math.max(z.current(Tt),Math.round(Ct*Bt)));const ut=Math.round(Kt-Gt.reduce((Ct,Tt,Yt)=>Ct+(je.current(Yt)?0:Tt),0));if(ut!==0){let Ct=-1;Gt.forEach((Tt,Yt)=>{!je.current(Yt)&&(Ct<0||Tt>Gt[Ct])&&(Ct=Yt)}),Ct>=0&&(Gt[Ct]=Math.max(z.current(Ct),Gt[Ct]+ut))}}return Gt},[S,h]),xt=(ae,ve)=>ae!==null&&ae.length===ve.length&&ae.every((ze,Qe)=>ze===ve[Qe]),et=o.useRef(Ze);o.useEffect(()=>{et.current=Ze});const[Xe,At]=o.useState(0),gt=M.length>0,_t=`${ne??""}|${Xe}|${S.length}|${ie}`,Nt=!Ue&&le&&ne!==null&&!D?`${_t}|${gt?1:0}`:null,mt=o.useRef(null);o.useEffect(()=>{if(Nt===null||!gt||mt.current===_t)return;const ae=et.current();ae&&(mt.current=_t,nt(ve=>xt(ve,ae)?ve:ae))},[Nt]);const st=o.useCallback(()=>{if(ne)try{window.localStorage.removeItem(ne)}catch{}ke(!1);const ae=et.current();nt(ae),He.current=ae,At(ve=>ve+1)},[ne]);o.useEffect(()=>()=>{Oe.current&&(window.removeEventListener("pointermove",Be),window.removeEventListener("pointerup",Se),window.removeEventListener("pointercancel",Se),document.body.style.cursor="",document.body.style.userSelect="")},[Be,Se]);const Pe=S.length>0&&S.every(ae=>ae.width!=null)?S.map(ae=>typeof ae.width=="number"?`${ae.width}px`:String(ae.width)).join(" "):null;S.some(ae=>ae.width!=null)&&!Pe&&Rt(`table-field-width:${S.map(ae=>ae.width==null?"-":"w").join("")}`,"[ihabdevteam-core] Table \uC758 fields \uC911 \uC77C\uBD80\uC5D0\uB9CC width \uAC00 \uC788\uC2B5\uB2C8\uB2E4. **\uBAA8\uB4E0 \uC5F4\uC5D0 \uC801\uC5B4\uC57C** \uC4F0\uC785\uB2C8\uB2E4 \u2014 \uC9C0\uAE08\uC740 gridTemplateColumns \uB97C \uC501\uB2C8\uB2E4. \uD55C \uC5F4\uB9CC \uACE0\uC815\uD558\uACE0 \uC2F6\uC73C\uBA74 \uB098\uBA38\uC9C0\uC5D0 `minmax(0, 1fr)` \uCC98\uB7FC \uC801\uC5B4 \uC8FC\uC138\uC694."),Pe&&b&&Rt("table-field-width-conflict","[ihabdevteam-core] Table \uC5D0 fields[].width \uC640 gridTemplateColumns \uAC00 \uB458 \uB2E4 \uC788\uC2B5\uB2C8\uB2E4. gridTemplateColumns \uAC00 \uC774\uAE41\uB2C8\uB2E4 \u2014 \uD55C\uCABD\uB9CC \uB450\uC138\uC694.");const bt=b??Pe??void 0,wt=qv(bt),lt=wt.filter(ae=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(ae));lt.length>0&&Rt(`table-content-track:${b}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${lt.join(", ")})\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uBA38\uB9AC\uC640 \uBAB8\uD1B5\uC740 \uC11C\uB85C \uB2E4\uB978 \uACA9\uC790\uB77C \uADF8 \uD2B8\uB799\uC774 \uAC01\uC790 \uB2E4\uB974\uAC8C \uD480\uB824 \uC5F4\uC774 \uC5B4\uAE0B\uB0A9\uB2C8\uB2E4. px \uC774\uB098 fr \uC744 \uC4F0\uC138\uC694. (\uBC1B\uC740 \uAC12: ${b})`);const jt=S.findIndex(ae=>!!ae.sortDir);S.filter(ae=>!!ae.sortDir).length>1&&Rt("table-multi-sort","[ihabdevteam-core] Table \uC758 fields \uC5D0 sortDir \uC774 \uB458 \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4. aria-sort \uB294 \uD45C \uD558\uB098\uC5D0 \uD55C \uCE78\uB9CC \uAC00\uC9C8 \uC218 \uC788\uC5B4 \uCCAB \uCE78\uB9CC \uBC29\uD5A5\uC73C\uB85C \uC54C\uB9AC\uACE0 \uB098\uBA38\uC9C0\uB294 none \uC73C\uB85C \uB461\uB2C8\uB2E4.");const Ge=ae=>ae===jt?S[ae].sortDir==="asc"?"ascending":"descending":S[ae].onClick?"none":void 0,yt=ae=>/^\d+(\.\d+)?px$/.test(wt[ae]??""),$t=ae=>{const ve=wt[ae]??"",ze=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(ve)??/^(\d+(?:\.\d+)?)px$/.exec(ve);return ze?parseFloat(ze[1]):de};je.current=yt,z.current=$t,Ve.current=wt;const Re=ae=>h==="fit"&&!yt(ae)?"fr":"px",ot=rt&&rt.length===S.length&&!I,Et=Z??(ot?S.map((ae,ve)=>ae.resizable===!1&&wt[ve]?wt[ve]:`${rt[ve]}${Re(ve)}`).join(" "):bt),Je=Et?{"--table-grid-cols":Et}:void 0,Dt=k!==void 0;return n.jsxs("div",{ref:Me,className:`table-wrap table-wrap--${g}${le?" table-wrap--resizable":""}${N?" table-wrap--dragover":""}${y?" table-wrap--collapsed":""}`,style:Je,onDragOver:F,onDragLeave:R,onDrop:K,tabIndex:ge?0:void 0,role:ge?"region":void 0,"aria-label":ge?typeof k=="string"?k:T("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:O,className:"table-row-hint",children:T("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:qe,role:"table","aria-labelledby":Dt&&typeof k=="string"?q:void 0,className:"table body-2",children:[Dt&&n.jsxs("div",{className:we("table-header",w&&"table-header--clickable"),onClick:w,role:"caption",children:[w&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:y?"chevron-right":"chevron-down",ariaLabel:y?T("common.expand","\uD3BC\uCE58\uAE30"):T("common.collapse","\uC811\uAE30"),ariaExpanded:!y,className:"table-header__chevron"}),v&&n.jsx(tt,{icon:v,label:typeof k=="string"?k:void 0,className:"table-header__icon"}),n.jsx("span",{id:q,className:"table-header__title h5b",children:k}),B!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:B}),A&&n.jsx("span",{className:"table-header__actions",onClick:ae=>ae.stopPropagation(),children:A})]}),!y&&n.jsxs(n.Fragment,{children:[r&&r.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:r.map((ae,ve)=>n.jsx("div",{role:"columnheader","aria-colspan":ae.span,className:we("table-field body-3",ae.className),style:{gridColumn:`span ${ae.span}`},children:ae.label},ve))}),n.jsxs("div",{role:"presentation",className:we("table-fields-strip",le&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:H,children:S.map((ae,ve)=>n.jsx(Kv,{onClick:ae.onClick,className:we(ae.className,Fu(ae.align)),sortDir:ae.sortDir,ariaSort:Ge(ve),onResizeStart:le&&ve<S.length-1&&ae.resizable!==!1&&(h!=="fit"||S.some((ze,Qe)=>Qe>ve&&ze.resizable!==!1))?ze=>Le(ve,ze):void 0,children:ae.label},ve))}),le&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:T("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:T("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:st})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:D?n.jsx(Go,{variant:"loading",colSpan:S.length||void 0}):M.length===0&&E?n.jsx(Go,{variant:"empty",colSpan:S.length||void 0,children:E}):M.map((ae,ve)=>{const ze=C!=null&&ae.id===C,Qe=!!i&&(u?u(ae):!0),ht=$!=null&&ae.id!=null&&($ instanceof Set?$.has(ae.id)||[...$].some(it=>String(it)===String(ae.id)):String(ae.id)===String($));return n.jsx(Go,{className:`${Qe?" table-row--clickable":""}${m?" table-row--draggable":""}${ze?" table-row--dragging":""}`.trim(),draggable:!!m,onClick:Qe?()=>i(ae):void 0,colSpan:S.length||void 0,rowHasButton:s(ae).some(it=>!!it.rowLabel),describedBy:O,onMouseEnter:c?it=>c(ae,it):void 0,onMouseLeave:d?it=>d(ae,it):void 0,onDragStart:m?it=>m(ae,it):void 0,onDragEnd:p?it=>p(ae,it):void 0,expandedContent:ht&&L?L(ae):void 0,children:s(ae).map((it,It)=>n.jsx(Uv,{className:we(it.className,Fu(S[It]?.align)),style:it.style,rowLabel:Qe?it.rowLabel:void 0,onRowClick:Qe?()=>i(ae):void 0,children:it.content},It))},ae.id!=null?`${typeof ae.id}:${ae.id}`:`__idx:${ve}`)})})]})]})]})}const Yv={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function Ou(e){return e?Yv[e]??null:null}function zu(e){switch(Ou(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Wu(e,t){const a=Ou(e);return a?t(`device.type.${a}`,{defaultValue:e??""}):e??""}const Ca=e=>e==null?"":String(e).trim();function Yo(e,t,a,r){const l=Ca(e),s=Ca(t),i=Ca(a);if(r&&l&&s&&i){const c=`${l.padStart(4,"0")}-${s.padStart(2,"0")}-${i.padStart(2,"0")}`,d=new Date(c);if(!Number.isNaN(d.getTime())&&d.toISOString().slice(0,10)===c){const m=Fl(c,r);if(m)return m}}const u=[l,s,i];for(;u.length>0&&u[u.length-1]==="";)u.pop();return u.join(".")}function Zv(e,t,a){const r=Ca(e);return r?`${r}-${Ca(t).padStart(2,"0")}-${Ca(a).padStart(2,"0")}`:""}function Hu(e,t){return t!=="wornAt"?String(e[t]??""):Zv(e.wornYear,e.wornMonth,e.wornDay)}function Xv({rows:e,loading:t,onSelect:a,onDelete:r,onWear:l,onRelease:s,onAdd:i}){const{t:u,i18n:c}=_e.useTranslation(),d=h=>h==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:m,field:p}=xy(),C=o.useMemo(()=>{if(!m)return e;const{key:h,asc:_}=m;return[...e].sort((g,k)=>{if(h==="worn"){const v=Number(k.worn)-Number(g.worn);return _?v:-v}return ur(Hu(g,h),Hu(k,h),_)})},[e,m]),{pageRows:b,pageSizeProps:x,paginationProps:f}=vy(C,m);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(Po,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:x,pagination:f,actions:i&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),n.jsx(Ko,{loading:t,resizable:!0,resizeMode:"fit",resizeStorageKey:"customer-device-history-v2",fields:[{...p(u("customers.device.wearingNow","\uCC29\uC6A9"),"worn"),resizable:!1},p(u("device.direction.label","\uBC29\uD5A5"),"side"),p(u("device.deviceType","\uC885\uB958"),"device"),p(u("device.brand","\uBE0C\uB79C\uB4DC"),"brand"),p(u("device.fitType","\uCC29\uC6A9\uD615\uD0DC"),"fitType"),p(u("device.productName","\uC81C\uD488\uBA85"),"productName"),p(u("device.wornDate","\uCC29\uC6A9\uC77C"),"wornAt"),...r?[{label:"",resizable:!1}]:[]],items:b.map((h,_)=>({id:h.id??`${h.side}-${_}`,row:h})),gridTemplateColumns:`56px 110px 110px minmax(120px, 1fr) 100px minmax(120px, 1fr) 110px${r?" 80px":""}`,renderRow:({row:h})=>[{content:n.jsx("span",{className:"dlp-worn-check",onClick:_=>_.stopPropagation(),children:n.jsx(xu,{checked:h.worn,disabled:h.worn?!s:!l,ariaLabel:h.worn?u("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):u("customers.device.wear","\uCC29\uC6A9"),onChange:_=>{_?l?.(h):s?.(h)}})})},{content:n.jsx("span",{children:d(h.side)})},{content:h.device?n.jsx(Lt,{size:"small",variant:zu(h.device),fill:"soft",label:Wu(h.device,u)}):n.jsx("span",{})},{content:n.jsx("span",{children:h.brand})},{content:n.jsx("span",{children:h.fitType||"-"})},{content:n.jsx("span",{children:h.productName||"-"})},{content:n.jsx("span",{className:"dlp-date",children:Yo(h.wornYear,h.wornMonth,h.wornDay,c.language)||"-"})},...r?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(fe,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:u("common.delete","\uC0AD\uC81C"),onClick:_=>{_?.stopPropagation(),r(h)}})})}]:[]],onRowClick:({row:h})=>a(h),empty:u("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function Vu(e,t){return e?{role:t?.role??"button",tabIndex:0,...t?.selected===void 0?{}:{"aria-selected":t.selected},onKeyDown:a=>{a.target===a.currentTarget&&(a.key!=="Enter"&&a.key!==" "||(a.preventDefault(),e(a)))}}:{}}function Jv(e,t){return new Date(e,t+1,0).getDate()}function Qv(e,t){return new Date(e,t,1).getDay()}function e4({visits:e=[],onVisitClick:t,onVisitMove:a,onDayClick:r,today:l}){const{t:s,i18n:i}=_e.useTranslation(),u=o.useMemo(()=>s("calendar.dow",{returnObjects:!0}),[s]),c=lo(l),[d,m]=o.useState(()=>Number(c.slice(0,4))),[p,C]=o.useState(()=>Number(c.slice(5,7))-1),[b,x]=o.useState(null),f=o.useRef(null),h=o.useMemo(()=>{const y={};return e.forEach(w=>{y[w.date]||(y[w.date]=[]),y[w.date].push(w)}),y},[e]),_=o.useMemo(()=>{const y=Jv(d,p),w=Qv(d,p),A=[];for(let E=0;E<w;E++)A.push(null);for(let E=1;E<=y;E++)A.push(E);for(;A.length<35;)A.push(null);return A},[d,p]),g=o.useCallback(()=>{p===0?(m(y=>y-1),C(11)):C(y=>y-1)},[p]),k=o.useCallback(()=>{p===11?(m(y=>y+1),C(0)):C(y=>y+1)},[p]),v=y=>`${d}-${String(p+1).padStart(2,"0")}-${String(y).padStart(2,"0")}`,B=y=>v(y)===c;return n.jsxs("div",{children:[n.jsxs("div",{className:"calendar-nav",children:[n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:g,"aria-label":s("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(tt,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:so(s,i.language,d,p+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:k,"aria-label":s("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(tt,{icon:"chevron-right",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsxs("div",{className:"calendar-nav__legend",children:[n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--main"}),n.jsx("span",{className:"caption-1",children:s("calendar.legend.visited","\uBC29\uBB38")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--sub"}),n.jsx("span",{className:"caption-1",children:s("calendar.legend.scheduled","\uC608\uC57D")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--disabled"}),n.jsx("span",{className:"caption-1",children:s("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]})]}),n.jsxs("div",{className:"calendar-grid",children:[u.map(y=>n.jsx("div",{className:"calendar-day-header body-3",children:y},y)),_.map((y,w)=>{if(y===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${w}`);const A=y,E=v(A),D=h[E]??[],N=Fl(E,i.language),F=b===E;return n.jsxs("div",{className:`calendar-cell${B(A)?" today":""}${F?" drag-over":""}${r?" calendar-cell--clickable":""}`,role:r?"button":void 0,tabIndex:r?0:void 0,"aria-label":r?s("calendar.addOnDate",{date:E}):void 0,"aria-current":B(A)?"date":void 0,onClick:r?()=>r(E):void 0,onKeyDown:r?R=>{R.target===R.currentTarget&&(R.key!=="Enter"&&R.key!==" "||(R.preventDefault(),r(E)))}:void 0,onDragOver:a?R=>{R.preventDefault(),x(E)}:void 0,onDragLeave:a?R=>{R.currentTarget.contains(R.relatedTarget)||x(null)}:void 0,onDrop:a?R=>{R.preventDefault(),f.current!=null&&(a(f.current,E),f.current=null),x(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:A}),D.length>0&&(()=>{const R=[{key:"visited",label:s("calendar.legend.visited","\uBC29\uBB38"),count:D.filter(L=>(L.status??"visited")==="visited").length},{key:"scheduled",label:s("calendar.legend.scheduled","\uC608\uC57D"),count:D.filter(L=>L.status==="scheduled").length},{key:"noVisit",label:s("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:D.filter(L=>L.status==="noVisit").length}].filter(L=>L.count>0),K=R.length===1&&R[0].key==="visited"?s("calendar.visitCount",{count:D.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):R.map(L=>s("calendar.statusCount",{label:L.label,count:L.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return n.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${N} ${K}`,children:[R.map(L=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${L.key}`,"aria-hidden":"true"},L.key)),D.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:D.map((R,K)=>n.jsxs("div",{draggable:!!a,className:`calendar-visit-badge${R.status==="noVisit"?" calendar-visit-badge--no-visit":R.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${a?" calendar-visit-badge--draggable":""}`,onDragStart:a?L=>{f.current=R.id,L.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:a?()=>{f.current=null,x(null)}:void 0,onClick:t?L=>{L.stopPropagation(),t(R)}:void 0,...Vu(t?()=>t(R):void 0),"aria-label":[N,R.time?Vl(R.time,s):null,R.customer,s(R.status==="noVisit"?"calendar.legend.noVisit":R.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[R.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Vl(R.time,s)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:R.customer}),R.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:s("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},R.id??K))})]},A)})]})]})}const t4={page:"h3",pagePopup:"h4",popup:"h5"};function fa({type:e="page",title:t,headingLevel:a=2,icon:r,action:l,disc:s,children:i,inGrid:u=!1,className:c,style:d}){const m=t4[e],p=t||s||l||r,C=a?`h${a}`:"div";return n.jsxs("div",{className:we("section",`section--${e}`,u&&"section--in-grid",c),style:d,children:[p&&n.jsxs("div",{className:"section__header",children:[n.jsxs("div",{className:"section__title-row",children:[r&&n.jsx(tt,{icon:r,label:typeof t=="string"?t:void 0,className:"section__icon"}),n.jsxs("div",{className:"section__title-group",children:[t&&n.jsx(C,{className:`section__title ${m}`,children:t}),s&&n.jsx("div",{className:"section__disc body-3",children:s})]})]}),l&&n.jsx("div",{className:"section__action",children:l})]}),i]})}let Zo=null,qu=!1;function Uu(){if(qu||typeof document>"u")return;qu=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(Zo="keyboard")},!0);const e=()=>{Zo="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}Uu();function gr(){return Uu(),Zo==="keyboard"}const br=20;function n4(e){const{t}=_e.useTranslation(),{type:a,trainingDatas:r,depth:l,renderPopup:s,completedIds:i,selectedIds:u,onItemComplete:c,size:d,useDescriptionTooltip:m,onRemove:p,onMore:C,sectionType:b="page"}=e||{},[,x]=o.useState(0),f=typeof r<"u"?Array.isArray(r)?r:[]:[],h=f.length,[_,g]=o.useState(Math.min(h,br)),k=o.useMemo(()=>Array.isArray(l)?[...l,a?.label].filter(Boolean).join(" \xB7 "):[l||"",a?.label].filter(Boolean).join(" \xB7 "),[l,a?.label]);o.useEffect(()=>{g(Math.min(h,br))},[h]),Li("speechear.data.updated",()=>x(w=>w+1));const v=o.useRef(null),B=o.useRef(null);function y(){const w=document.activeElement;B.current=gr()&&w&&w.closest?.(".training-block__more")?_:null,g(A=>Math.min(h,A+br))}return o.useEffect(()=>{const w=B.current;if(w==null)return;B.current=null;const A=document.activeElement;A&&A!==document.body||v.current?.querySelectorAll(".training-block-button")[w]?.focus()},[_]),n.jsxs(fa,{type:b,title:a?.label,icon:a?.icon,disc:a?.desc,className:"training-block",children:[n.jsx("div",{className:"training-list",ref:v,children:(f||[]).slice(0,_).map((w,A)=>{const E=w;return n.jsx(Lo,{index:A,type:a,trainingData:E,depth:k,renderPopup:s,completedIds:i,selectedIds:u,size:d,useDescriptionTooltip:m,onRemove:typeof p=="function"&&u!=null&&E?.id!=null&&u.has(String(E.id))?()=>p(E):void 0,onComplete:typeof c=="function"&&E?.id!=null?()=>c(String(E.id)):void 0,onMore:typeof C=="function"?D=>C(E,D):void 0},E?.id!=null?`${a?.key||"t"}-${String(E.id)}`:`${a?.key||"t"}-${A}`)})}),h>br&&_<h&&n.jsx("div",{className:"training-block__more",children:n.jsx(fe,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:y,ariaLabel:t("common.loadMore","\uB354\uBCF4\uAE30"),label:t("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function a4(e){let t=0;const a=r=>{Array.isArray(r)?r.forEach(a):r!=null&&r!==!1&&r!==!0&&r!==""&&t++};return a(e),t}function r4({gap:e=10,count:t,className:a,children:r}){const l=o.useRef(null),[s,i]=o.useState({width:0,card:0}),u=t??a4(r);o.useLayoutEffect(()=>{const C=l.current;if(!C)return;const b=()=>{const f=C.style.maxWidth;C.style.maxWidth="none";const h=C.clientWidth;C.style.maxWidth=f;const _=C.firstElementChild?.offsetWidth??0;i(g=>g.width===h&&g.card===_?g:{width:h,card:_})};if(b(),typeof ResizeObserver>"u")return;const x=new ResizeObserver(b);return x.observe(C),()=>x.disconnect()},[u,e]);const c=s.card>0?s.card:0,d=c>0?cf(s.width,c,e):0,m=d>0?df(u,d):0,p={"--block-grid-gap":`${e}px`,...m>0?{"--block-grid-cols":m,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:l,className:we("training-block-grid",m>0&&"training-block-grid--measured",a),style:p,"data-cols":m>0?m:void 0,children:r})}function Xo(e){const t=o.useRef(null),a=o.useRef(e);a.current=e;const[r,l]=o.useState({url:e,loading:!!e,failed:!1}),s=r.url===e?r:{loading:!!e,failed:!1};o.useEffect(()=>{const c=t.current;l({url:e,failed:!1,loading:!!e&&!(c?.complete&&c.naturalWidth>0)})},[e]);const i=o.useCallback(()=>{a.current===e&&l({url:e,loading:!1,failed:!1})},[e]),u=o.useCallback(()=>{a.current===e&&l({url:e,loading:!1,failed:!0})},[e]);return{imgRef:t,loading:s.loading,failed:s.failed,hasImage:!!e&&!s.failed,onLoad:i,onError:u}}var o4='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_SpeechEar_mono" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><g id="symbol"><g opacity=".3"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>';const s4=o4,Jo=o.forwardRef(function({item:e,disabled:t=!1,onPlayDone:a,selectable:r=!1,selected:l=!1,onSelect:s,flipDelay:i=0,hideLabel:u=!1,hideAudio:c=!1,orderRank:d=null},m){const{t:p}=_e.useTranslation(),C=e.word||e.title||"",b=t||!C,x=e.audio??e.sound??e.audioKey,f=e.subLabel||e.pronunciation||"",h=e.colloquialLabel||"",[_,g]=o.useState({label:C,subLabel:f,colloquialLabel:h,homonum:e.homonum});C&&(_.label!==C||_.subLabel!==f||_.colloquialLabel!==h||!Object.is(_.homonum,e.homonum))&&g({label:C,subLabel:f,colloquialLabel:h,homonum:e.homonum});const k=o.useRef(null),v=Cn("(max-width: 767px)"),[B,y]=o.useState(!1),w=`${typeof x=="string"?x:x?.src??""}\0${C}`,[A,E]=o.useState({for:"",url:""}),D=A.for===w?A.url:"",N=Rl(),F=e.textOnly??(!e.image&&!!_.label&&!!N&&N.entries.length>0&&!N.byWord.has(_.label)),R=F?"":sa()?.(_.label,_.homonum)??e.image??"",{imgRef:K,loading:L,hasImage:$,onLoad:T,onError:J}=Xo(R);o.useEffect(()=>{let M=!1;return(async()=>{if(x){if(typeof x=="string"){if(x.startsWith("http")||x.includes("/")){E({for:w,url:x});return}}else if(typeof x=="object"&&!Array.isArray(x)){const Z=x.src;if(Z){E({for:w,url:Z});return}}}const I=Na();if(I&&C)try{const Z=await Promise.resolve(I(C));!M&&Z&&E({for:w,url:Z})}catch{}})(),()=>{M=!0}},[x,C,w]);const q=o.useRef(!0),O=o.useRef(null);o.useEffect(()=>(q.current=!0,()=>{q.current=!1,O.current&&mr(O.current),O.current=null;try{k.current?.pause()}catch{}k.current=null}),[]);const Q=o.useCallback(()=>new Promise(M=>{if(typeof window<"u"&&window.speechSynthesis&&C){y(!0),window.speechSynthesis.cancel();const I=new SpeechSynthesisUtterance(C);I.lang="ko-KR",I.onend=()=>{y(!1);try{a?.()}catch{}M()},I.onerror=()=>{y(!1),M()},window.speechSynthesis.speak(I)}else M()}),[C,a]),P=o.useCallback(M=>{const I=hr(M,Z=>{if(y(!1),Z)try{a?.()}catch{}});return k.current=I.el,I.done},[a]),V=o.useCallback(async()=>{if(t||!q.current)return;const M=()=>{O.current===M&&(O.current=null);try{k.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}y(!1)},I=pr(M);O.current=M;try{window.speechSynthesis?.cancel()}catch{}try{if(D&&(y(!0),await P(D)))return;const Z=Jr();if(Z&&C)try{const le=await Promise.resolve(Z(C));if(!q.current||O.current!==M||le&&(y(!0),await P(le)))return}catch{}if(!q.current||O.current!==M)return;await Q()}finally{I(),O.current===M&&(O.current=null)}},[t,D,C,P,Q]);o.useImperativeHandle(m,()=>({play:()=>V()}),[V]);const W=M=>M.stopPropagation(),G=o.useCallback(M=>{if(M.stopPropagation(),!t){if(B){try{k.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}y(!1);return}V()}},[t,B,V]),S=we("training-word-card",t?"training-word-card--disabled":"",b?"training-word-card--flipped":"",r?"training-word-card--selectable":"",l?"training-word-card--selected":"");return n.jsx("div",{className:S,onClick:r&&!t?s:void 0,role:r?"button":void 0,"aria-pressed":r?l:void 0,tabIndex:r&&!t?0:void 0,"aria-disabled":r&&t?!0:void 0,onKeyDown:r&&!t?M=>{M.target===M.currentTarget&&(M.key==="Enter"||M.key===" "||M.key==="Spacebar")&&(M.preventDefault(),s?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:b?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[l&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:W,children:n.jsx(Lt,{type:"dot",size:40,position:"inline",animate:!0,icon:d!=null?void 0:"check",number:d??void 0,"aria-label":d!=null?p("training.nthSelected",{n:d}):p("training.selected","\uC120\uD0DD\uB428")})}),n.jsx("div",{className:"training-word-card__image-wrap",children:F?n.jsx("div",{className:"training-word-card__text-face",children:_.label}):$?n.jsxs(n.Fragment,{children:[L&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:K,className:"training-word-card__image",src:R,alt:_.label||p("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:L?0:1},onLoad:T,onError:J})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!F&&n.jsx("div",{className:"training-word-card__word",children:_.label}),_.subLabel&&n.jsxs("div",{className:"training-word-card__pronunciation",children:["[",_.subLabel,"]"]}),_.colloquialLabel&&n.jsxs("div",{className:"training-word-card__colloquial caption-1",children:["[",_.colloquialLabel,"]"]})]}),!c&&n.jsx("div",{className:"training-word-card__bottom",onClick:r?W:void 0,children:n.jsx(fe,{htmlType:"button",size:v?40:48,type:v?"dot":"bar",icon:B?"pause":"play",label:v?void 0:p("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:B,onClick:G,disabled:t,ariaLabel:p("training.playSound","\uC18C\uB9AC \uB4E3\uAE30")})})]}),n.jsx("div",{className:"training-word-card__back","aria-hidden":"true",children:n.jsx("span",{className:"training-word-card__disabled-symbol",style:{"--disabled-symbol-src":`url("${s4}")`}})})]})})}),l4=260;function Wn(e){const{t}=_e.useTranslation(),{title:a,subtitle:r,headerActions:l,headerSegment:s,children:i,buttons:u,footer:c,footerStart:d,footerEnd:m,footerNote:p,footerNoteDivider:C=!1,footerClassName:b="",footerLayout:x="center",onClose:f,closeDisabled:h=!1,beforeClose:_,closeOnBackdrop:g=!0,className:k="",ariaLabel:v,useTitle:B=!0,inline:y=!1,size:w,layer:A="modal",height:E,fillBody:D=!1,resetScrollKey:N}=e||{},[F,R]=o.useState(!1),K=o.useRef(!1),L=o.useRef(null),$=o.useId(),T=o.useRef(null);o.useEffect(()=>{},[y,a,v,k]),o.useEffect(()=>{N!==void 0&&T.current&&(T.current.scrollTop=0)},[N]);const[J,q]=o.useState(!1);o.useEffect(()=>{const z=T.current;if(!z)return;const ne=()=>q(z.scrollHeight>z.clientHeight+1);if(ne(),typeof ResizeObserver>"u")return;const H=new ResizeObserver(ne);H.observe(z);const U=z.firstElementChild;return U&&H.observe(U),()=>H.disconnect()},[i,N]),o.useEffect(()=>{if(!y)return Cu()},[y]);const O=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(y)return;const z=O.current,ne=L.current;return fo(ne,z),ne&&!ne.contains(document.activeElement)&&(ne.querySelector(_n)??ne).focus(),()=>{const H=document.activeElement;(!H||H===document.body||ne&&ne.contains(H))&&go(z)?.focus?.()}},[y]),ho(L,!y);const Q=o.useRef(!0),P=bo(),V=o.useRef(null);o.useEffect(()=>(Q.current=!0,()=>{Q.current=!1,V.current&&(clearTimeout(V.current),V.current=null)}),[]);const W=o.useCallback(()=>{!Q.current||!K.current||(K.current=!1,R(!1))},[]),G=o.useCallback((z,ne=!1)=>{if(ne&&!Q.current||K.current)return;K.current=!0,R(!0);const H=setTimeout(()=>{V.current===H&&(V.current=null);let U;try{U=z?z():void 0}catch{W();return}U&&typeof U.then=="function"&&U.then(()=>{setTimeout(W,120)},W)},P?0:l4);ne&&(V.current=H)},[W,P]),S=o.useCallback(()=>{h||_&&_()===!1||G(f,!0)},[G,f,h,_]),M=o.useRef(S);o.useEffect(()=>{M.current=S});const I=!y&&!!f;o.useEffect(()=>{if(I)return Gn(()=>M.current())},[I]);const Z=I&&g,le=o.useRef(!1),oe=z=>{le.current=z.target===z.currentTarget},de=z=>{const ne=le.current;le.current=!1,ne&&z.target===z.currentTarget&&S()},re=n.jsx("div",{className:`popup ${y?"popup--inline":""} ${A==="belowPagePopup"?"popup--below-page-popup":""} ${F?"popup--closing":""} ${k}`,onPointerDown:Z?oe:void 0,onClick:Z?de:void 0,onMouseDown:y?void 0:z=>{z.target===z.currentTarget&&z.preventDefault()},children:n.jsxs("div",{ref:L,className:`popup-panel${w?` popup-panel--${w}`:""}${E!=null?" popup-panel--has-height":""}${D?" popup-panel--fill-body":""}`,style:E!=null?{"--popup-height":typeof E=="number"?`${E}px`:E}:void 0,tabIndex:-1,role:y?void 0:"dialog","aria-modal":y?void 0:!0,"aria-labelledby":!y&&B&&a?$:void 0,"aria-label":!y&&!(B&&a)?v??(typeof a=="string"?a:void 0):void 0,children:[!B&&(l||f)?n.jsxs("div",{className:"popup-close-float",children:[l,f&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:S,disabled:h,ariaLabel:t("common.close","\uB2EB\uAE30")})]}):a||l||f?n.jsxs("div",{className:`popup-header${r?" popup-header--with-subtitle":""}`,children:[n.jsxs("div",{className:"popup-header-main",children:[a?n.jsx("h2",{id:$,className:"popup-title popup-title--left h2",children:a}):n.jsx("span",{id:$,className:"popup-title popup-title--left h2"}),r&&n.jsx("span",{className:"popup-subtitle body-3",children:r})]}),s&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(wn,{size:40,ariaLabel:s.ariaLabel,options:s.options.map(z=>({key:z.key,label:z.label,disabled:z.disabled})),value:s.value,onChange:s.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[l,f&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:S,disabled:h,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]}):null,n.jsx("div",{className:"popup-content",ref:T,tabIndex:J?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:G,closeWithAnimation:S}):i})}),p!=null&&p!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${C?" popup-footer-note--divider":""}`,role:"note",children:p}),d||m?n.jsxs("div",{className:`popup-footer popup-footer--bar${b?` ${b}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof d=="function"?d({animateThen:G,closeWithAnimation:S}):d}),n.jsx("div",{className:"popup-footer__end",children:typeof m=="function"?m({animateThen:G,closeWithAnimation:S}):m})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${x!=="center"?` popup-footer--${x}`:""}`,children:u.map((z,ne)=>n.jsx(fe,{htmlType:"button",size:48,variant:z.variant??"default",label:z.label,disabled:z.disabled,onClick:()=>z.onClick?.({animateThen:G,closeWithAnimation:S})},ne))}):c?n.jsx("div",{className:`popup-footer${x!=="center"?` popup-footer--${x}`:""}${b?` ${b}`:""}`,children:typeof c=="function"?c({animateThen:G,closeWithAnimation:S}):c}):null]})});return y||typeof document>"u"?re:cn.createPortal(re,document.body)}function yr(e){return String(e)}const vr=["o","triangle","x"];function Gu(e,t){return e===t?null:t}const Ku={o:"circle",triangle:"triangle",x:"x"},Yu={o:"main",triangle:"warn",x:"danger"};function i4(e){let t=0,a=0,r=0;for(const s of Object.values(e))s==="o"?t++:s==="triangle"?a++:s==="x"&&r++;const l=t+a+r;return{marked:l,o:t,triangle:a,x:r,rate:l===0?null:(t+a*.5)/l}}function Qo(e){const t={};for(const[a,r]of Object.entries(e))(r==="o"||r==="triangle"||r==="x")&&(t[a]=r);return t}function Zu(e){const t=[];let a=0;for(const r of e)t.push(a),a+=r;return t}function u4(e,t){return!t&&e>0}const ga={landscape:{width:1123,height:794,printSize:"A4 landscape",printW:"297mm",printH:"210mm"},portrait:{width:794,height:1123,printSize:"A4 portrait",printW:"210mm",printH:"297mm"}};function c4(e="landscape"){Rt("print-word-table-deprecated","[printWordTable] @deprecated \u2014 WordTablePopup renderButtons \uC758 print(\uB610\uB294 useWordTablePrint().print)\uB97C \uC4F0\uC138\uC694. \uC804\uC5ED \uC778\uC1C4\uB294 \uD654\uBA74\uC758 \uBAA8\uB4E0 \uB2E8\uC5B4\uD45C\uB97C \uD568\uAED8 \uCC0D\uC2B5\uB2C8\uB2E4.");const{printSize:t,printW:a,printH:r}=ga[e],l=document.createElement("style");l.textContent=`@page { size: ${t}; margin: 0; } .word-table { width: ${a} !important; height: ${r} !important; }`,document.head.appendChild(l);const s=()=>{document.head.removeChild(l),window.removeEventListener("afterprint",s)};window.addEventListener("afterprint",s),window.print()}function Xu(e,t){if(e.length===0)return[[]];const a=Math.max(1,Math.floor(t)),r=[];for(let l=0;l<e.length;l+=a)r.push(e.slice(l,l+a));return r}const d4={landscape:{1:{cols:1,rows:1},2:{cols:2,rows:1},3:{cols:3,rows:1},4:{cols:2,rows:2},5:{cols:3,rows:2},6:{cols:3,rows:2},7:{cols:4,rows:2},8:{cols:4,rows:2},9:{cols:5,rows:2},10:{cols:5,rows:2},11:{cols:4,rows:3},12:{cols:4,rows:3}},portrait:{1:{cols:1,rows:1},2:{cols:1,rows:2},3:{cols:1,rows:3},4:{cols:1,rows:4},5:{cols:1,rows:5},6:{cols:2,rows:3},7:{cols:2,rows:4},8:{cols:2,rows:4},9:{cols:2,rows:5},10:{cols:2,rows:5},11:{cols:3,rows:4},12:{cols:3,rows:4}}};function p4(e,t){const a=d4[e][t];if(a)return a;const r=Math.max(1,Math.ceil(t)),l=Math.max(1,Math.ceil(Math.sqrt(r*.707)));let s,i;return e==="landscape"?(i=l,s=Math.ceil(r/i)):(s=l,i=Math.ceil(r/s)),(e==="landscape"?s<i:i<s)&&([s,i]=[i,s]),{cols:s,rows:i}}const m4={show:"word-table-block__content--cut-show",dashed:"",corner:"word-table-block__content--cut-corner",hide:""},Ju={\uBA85:"\uBA85\uC0AC",\uB3D9:"\uB3D9\uC0AC",\uD615:"\uD615\uC6A9\uC0AC",\uBD80:"\uBD80\uC0AC",\uC218:"\uC218\uC0AC",\uAD00:"\uAD00\uD615\uC0AC",\uAC10:"\uAC10\uD0C4\uC0AC",\uC870:"\uC870\uC0AC",\uC811:"\uC811\uC0AC",\uC758:"\uC758\uC874\uBA85\uC0AC",\uB300:"\uB300\uBA85\uC0AC",\uBCF4\uB3D9:"\uBCF4\uC870\uB3D9\uC0AC",\uBCF4\uD615:"\uBCF4\uC870\uD615\uC6A9\uC0AC"},Qu={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},es={\uBA85:"noun",\uB3D9:"verb",\uD615:"adjective",\uBD80:"adverb",\uC218:"numeral",\uAD00:"determiner",\uAC10:"interjection",\uC870:"particle",\uC811:"affix",\uC758:"dependentNoun",\uB300:"pronoun",\uBCF4\uB3D9:"auxVerb",\uBCF4\uD615:"auxAdjective"},ts={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function ec(e){return Object.fromEntries(Object.entries(Ju).map(([t,a])=>[t,es[t]?e(`wordTable.pos.${es[t]}`,{defaultValue:a}):a]))}function tc(e){return Object.fromEntries(Object.entries(Qu).map(([t,a])=>[t,ts[t]?e(`wordSearch.filter.type.${ts[t]}`,{defaultValue:a}):a]))}const h4={pos:es,wordType:ts};function ns(e,t){return e?e.split("/").map(a=>t[a]??a).join("/"):""}function nc(e,t,a,r){if(r!=="dashed")return{};const l=e%t,s=Math.floor(e/t),i=l<t-1,u=s<a-1;if(!i&&!u)return{};const c="#ddd",d=b=>`repeating-linear-gradient(to ${b}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,m=[],p=[],C=[];return i&&(m.push(d("bottom")),p.push("1px 100%"),C.push("right center")),u&&(m.push(d("right")),p.push("100% 1px"),C.push("center bottom")),{backgroundImage:m.join(", "),backgroundSize:p.join(", "),backgroundPosition:C.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const C4=280,f4=240,g4=280,b4=400,y4=120,v4=280;function ac(e,t){const a=o.useRef(null),[r,l]=o.useState(1),[s,i]=o.useState(0),u=o.useCallback((c,d)=>{if(!(c>0))return;const m=c/e,p=t&&d>0?d/t:1/0,C=Math.min(1,m,p);l(C),i(Math.max(0,(c-e*C)/2))},[e,t]);return o.useEffect(()=>{const c=a.current;if(!c)return;const d=t?c.parentElement??c:c;if(u(d.clientWidth,d.clientHeight),typeof ResizeObserver>"u")return;const m=new ResizeObserver(([p])=>u(p.contentRect.width,p.contentRect.height));return m.observe(d),()=>m.disconnect()},[u,t]),{scalerRef:a,scale:r,offset:s}}const x4=24,_4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},w4=400,rc=8;function oc({label:e,subLabel:t,colloquialLabel:a,homonum:r,showWord:l=!0,showImage:s=!0,showPronunciation:i=!0,showColloquial:u=!0,buttonSize:c=40,wordInfo:d,outerScale:m=1}){const{t:p}=_e.useTranslation(),C=o.useRef(null),b=o.useRef(null),x=o.useRef(null),[f,h]=o.useState(1),[_,g]=o.useState(!1),[k,v]=o.useState({for:"",url:""}),[B,y]=o.useState(null),w=t&&t.length>0?t:$C()?.(e,r)??"",A=sa()?.(e,r)??"",{imgRef:E,loading:D,failed:N,onLoad:F,onError:R}=Xo(A),K=o.useCallback(()=>y(b.current?.getBoundingClientRect()??null),[]),L=o.useCallback(()=>y(null),[]),$=vo(!!B,M=>{M?K():L()},b),T=o.useMemo(()=>{if(!d)return null;const M=[];return d.grade&&M.push(p("wordTable.info.grade",{n:d.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),d.syllables&&M.push(p("wordTable.info.syllables",{n:d.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),d.pos&&M.push(p("wordTable.info.pos",{v:ns(d.pos,ec(p)),defaultValue:"\uD488\uC0AC: {{v}}"})),d.wordType&&M.push(p("wordTable.info.wordType",{v:ns(d.wordType,tc(p)),defaultValue:"\uC720\uD615: {{v}}"})),M.length?M:null},[d,p]),J=w||e,q=k.for===J?k.url:"";o.useEffect(()=>{const M=Na(),I=w||e;if(!M||!I)return;let Z=!1;return Promise.resolve(M(I)).then(le=>{!Z&&le&&v({for:I,url:le})}),()=>{Z=!0}},[w,e]);const O=o.useRef(null),Q=o.useRef(null);o.useEffect(()=>()=>{x.current?.pause(),Q.current?.()},[]);const P=o.useCallback(M=>{if(M.stopPropagation(),_){O.current?.();return}if(!q)return;g(!0);const I=hr(q,()=>{g(!1),Q.current?.()});x.current=I.el,O.current=I.stop,Q.current=pr(I.stop)},[_,q]),V=s&&!!A&&!N,W=V&&l?C4:V?g4:f4,G=V&&l?b4:V?v4:y4;o.useEffect(()=>{const M=C.current;if(!M||typeof ResizeObserver>"u")return;const I=new ResizeObserver(([Z])=>{const{width:le,height:oe}=Z.contentRect;h(Math.min(le/W,oe/G))});return I.observe(M),()=>I.disconnect()},[W,G]);const S=c*m<x4;return n.jsxs("div",{ref:C,className:we("word-table-cell",S&&"word-table-cell--tap-too-small",V?"word-table-cell--with-image":""),"data-ref-w":W,"data-ref-h":G,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${f})`},children:[V&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[D&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:E,className:"word-table-cell__image",src:A,alt:e,draggable:!1,style:{opacity:D?0:1},onLoad:F,onError:R})]}),l&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),i&&w&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",w,"]"]}),u&&a&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",a,"]"]})]}),n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":q,children:[n.jsx("span",{"data-play-state":"play",style:{display:_?"none":void 0},children:n.jsx(fe,{htmlType:"button",size:c,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:p("common.play","\uC7AC\uC0DD"),ariaLabel:e?p("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):p("common.play","\uC7AC\uC0DD"),onClick:P})}),n.jsx("span",{"data-play-state":"pause",style:{display:_?void 0:"none"},children:n.jsx(fe,{htmlType:"button",size:c,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:p("common.pause","\uBA48\uCDA4"),ariaLabel:e?p("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):p("common.pause","\uBA48\uCDA4"),onClick:P})})]}),d&&n.jsxs("div",{ref:b,className:"word-table-cell__info-button",onPointerEnter:M=>{ca(M)||K()},onPointerLeave:M=>{ca(M)||L()},onFocus:()=>{da()||K()},onBlur:L,children:[n.jsx(fe,{htmlType:"button",size:c,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:p("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:M=>{M.stopPropagation(),$.touchPress()}}),B&&T&&n.jsx(Kn,{anchorRect:B,items:T,showIndex:!1})]})]})}function ba({title:e,titleIcon:t,disc:a,className:r,orientation:l="landscape",contentTypes:s=["image","word","standardPron"],cutLine:i="show",showOutline:u=!0,showDivLine:c=!0,items:d,editCells:m,count:p,activeCell:C=null,onActivateCell:b,onRemoveCell:x,onRemoveItem:f,onReorder:h,renderCellAction:_,showFillerAdd:g=!1,contentRef:k,buttonSize:v=40,brand:B,code:y,pageNumber:w,pageNumberPosition:A="right",fitHeight:E=!1,scoring:D=!1,marks:N,onMarkClick:F,scoreIndexOffset:R=0}){const K=o.useCallback((Be,Se)=>{F?.(R+Be,Se)},[F,R]),L=(Be,Se)=>{const Le=N?.[yr(R+Be)]??null;return n.jsx("div",{className:we("word-table-cell__score",Le?"word-table-cell__score--marked":""),style:Ue>1?{transform:`translateX(-50%) scale(${Ue})`,transformOrigin:"bottom center"}:void 0,children:vr.map(Ze=>n.jsx("span",{className:we("word-table-cell__score-slot",Le===Ze?"word-table-cell__score-slot--on":""),children:n.jsx(fe,{htmlType:"button",size:v,type:"dot",shape:"pill",icon:Ku[Ze],variant:Le===Ze?Yu[Ze]:"default",selected:Le===Ze,useBorder:!1,...Ne?{}:{tabIndex:-1,role:"img"},showTooltipInfo:$(`wordTable.scoring.markName.${Ze}`,{defaultValue:Ze}),ariaLabel:$(`wordTable.scoring.${Ze}`,{word:Se,defaultValue:`${Se} ${Ze}`}),onClick:Ne?xt=>{xt.stopPropagation(),K(Be,Ze)}:void 0})},Ze))})},{t:$}=_e.useTranslation(),T=m!==void 0,J=e!=null||!!t||!!a,q=Cn("(max-width: 767px)"),O=o.useRef(null),[Q,P]=o.useState(null),V=d?.length??0,[W,G]=o.useState(null),[S,M]=o.useState(""),I=o.useRef(null),Z=o.useRef(null),le=o.useRef(null),oe=o.useRef(null),de=o.useCallback(Be=>{Z.current=Be,typeof k=="function"?k(Be):k&&(k.current=Be)},[k]),re=o.useCallback((Be,Se)=>{I.current=Se,h?.(Be,Se),M($("wordTable.reorder.moved",{n:Se+1,total:V,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[h,$,V]);o.useEffect(()=>{const Be=I.current;Be!=null&&(I.current=null,Z.current?.querySelectorAll(".word-table-block__card:not(.word-table-block__card--filler)")?.[Be]?.querySelector(".word-table-block__card-handle button")?.focus())}),o.useEffect(()=>()=>{oe.current?.()},[]);const z=o.useCallback((Be,Se)=>{if(!h||!Be.altKey||Be.ctrlKey||Be.metaKey)return;const Le=Be.key==="ArrowRight";if(!Le&&Be.key!=="ArrowLeft")return;Be.preventDefault();const Ze=Se+(Le?1:-1);Ze<0||Ze>=V||re(Se,Ze)},[h,V,re]),ne=o.useCallback((Be,Se)=>{if(!h||Be.pointerType==="mouse")return;const Le=Be.target.closest?.("button");if(Le&&!Le.closest(".word-table-block__card-handle"))return;oe.current?.();const Ze={x:Be.clientX,y:Be.clientY};let xt=!1;const et=Pe=>{xt&&Pe.cancelable&&Pe.preventDefault()};let Xe=null,At=null;const gt=()=>{const Pe=At;if(!Pe)return;const bt=document.elementFromPoint?.(Pe.x,Pe.y)?.closest?.("[data-wordtable-cell]"),wt=bt?Number(bt.dataset.wordtableCell):NaN,lt=Number.isInteger(wt)?wt:null;le.current=lt,P(jt=>jt===lt?jt:lt)},_t=Pe=>{if(!xt){(Math.abs(Pe.clientX-Ze.x)>rc||Math.abs(Pe.clientY-Ze.y)>rc)&&st();return}if(At={x:Pe.clientX,y:Pe.clientY},typeof requestAnimationFrame>"u"){gt();return}Xe===null&&(Xe=requestAnimationFrame(()=>{Xe=null,gt()}))},Nt=()=>{Xe!==null&&(cancelAnimationFrame(Xe),Xe=null,gt());const Pe=le.current,bt=xt;st(),bt&&Pe!=null&&Pe!==Se&&re(Se,Pe)},mt=setTimeout(()=>{xt=!0,G(Se),le.current=Se,P(Se),window.addEventListener("touchmove",et,{passive:!1})},w4);function st(){clearTimeout(mt),window.removeEventListener("pointermove",_t),window.removeEventListener("pointerup",Nt),window.removeEventListener("pointercancel",Nt),window.removeEventListener("touchmove",et),xt=!1,Xe!==null&&(cancelAnimationFrame(Xe),Xe=null),le.current=null,oe.current=null,G(null),P(null)}oe.current=st,window.addEventListener("pointermove",_t),window.addEventListener("pointerup",Nt),window.addEventListener("pointercancel",Nt)},[h,re]),{width:H,height:U}=ga[l],pe=typeof E=="number"?E:E&&typeof E=="object"?q?E.narrow:E.wide:null,{scalerRef:Ee,scale:ge,offset:me}=ac(H,E?U:void 0),ie=T?m?.length??0:d?.length??0,be=Math.max(p??ie,1),{cols:he,rows:ue}=p4(l,be),Me={word:s.length===0||s.includes("word"),image:s.length===0||s.includes("image"),pron:s.length===0||s.includes("standardPron"),colloq:s.length===0||s.includes("colloquialPron")},qe=T?(m??[]).some(Be=>Be!==null&&Be.length>1):(d??[]).some(Be=>(Be.words??[]).length>1),je=!!B?.show,Ve=!!B?.show&&B?.top!==!1,Oe=!!B?.show&&B?.bottom!==!1,dt=B?.copyright??"\xA9 IHAB, Inc. All rights reserved.",rt=we("word-table-block__content",m4[i],u&&"word-table-block__content--outline",c&&qe&&"word-table-block__content--div-line",!je&&w&&A!=="none"&&"word-table-block__content--page-number",Ve&&"word-table-block__content--brand-top",Oe&&"word-table-block__content--brand-bottom"),nt={transform:`scale(${1/ge})`,transformOrigin:"center center"},pt=v*vr.length+4*(vr.length-1),Ne=!!F,Ue=Ne?Math.max(1,Math.min(1/ge,H/he/pt)):1,ke=n.jsxs("div",{ref:Ee,className:"word-table__scaler",style:{height:U*ge},children:[n.jsx("div",{className:we("word-table",D&&!Ne&&"word-table--score-readonly",!J&&r),style:{width:H,height:U,transform:`scale(${ge})`,transformOrigin:"top left",marginLeft:me},children:n.jsxs("div",{ref:de,className:rt,style:{gridTemplateColumns:`repeat(${he}, 1fr)`,gridTemplateRows:`repeat(${ue}, 1fr)`},children:[T?n.jsx(n.Fragment,{children:(m??[]).map((Be,Se)=>n.jsx("div",{className:we("word-table-block__edit-cell",Be?"word-table-block__edit-cell--filled":"word-table-block__edit-cell--empty",C===Se?"word-table-block__edit-cell--active":""),style:nc(Se,he,ue,i),children:Be?n.jsxs(n.Fragment,{children:[Be.map((Le,Ze)=>n.jsxs(o.Fragment,{children:[Ze>0&&n.jsx("div",{className:"word-table-block__pair-divider"}),n.jsx(oc,{outerScale:ge,label:Le.word,subLabel:Le.pronunciation,colloquialLabel:Le.colloquialPronunciation,homonum:Le.homonum,showWord:Me.word,showImage:Me.image,showPronunciation:Me.pron,showColloquial:Me.colloq,buttonSize:v})]},Ze)),D&&L(Se,Be.map(Le=>Le.word).join(" / ")),x&&n.jsx("div",{className:"word-table-block__card-close",children:n.jsx(fe,{htmlType:"button",size:v,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:Be.length>1?$("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):$("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:Be.length>1?$("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):$("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>x(Se)})})]}):b&&n.jsx("div",{style:nt,children:n.jsx(fe,{htmlType:"button",size:"48",type:"bar",icon:"plus",label:$("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>b(Se)})})},Se))}):n.jsxs(n.Fragment,{children:[(d??[]).map((Be,Se)=>n.jsxs("div",{"data-wordtable-cell":h?Se:void 0,className:`word-table-block__card${h?" word-table-block__card--draggable":""}${Q===Se?" word-table-block__card--drag-over":""}${W===Se?" word-table-block__card--dragging":""}`,style:nc(Se,he,ue,i),draggable:!!h,onPointerDown:h?Le=>ne(Le,Se):void 0,onKeyDown:h?Le=>z(Le,Se):void 0,onDragStart:h?()=>{O.current=Se}:void 0,onDragOver:h?Le=>{Le.preventDefault(),P(Se)}:void 0,onDragLeave:h?()=>P(null):void 0,onDrop:h?Le=>{Le.preventDefault(),O.current!==null&&O.current!==Se&&h(O.current,Se),O.current=null,P(null)}:void 0,onDragEnd:h?()=>{O.current=null,P(null)}:void 0,children:[(Be.words??[]).map((Le,Ze)=>n.jsxs(o.Fragment,{children:[Ze>0&&n.jsx("div",{className:"word-table-block__pair-divider"}),n.jsx(oc,{outerScale:ge,label:Le.label,subLabel:Le.subLabel,colloquialLabel:Le.colloquialLabel,homonum:Le.homonum,showWord:Me.word,showImage:Me.image,showPronunciation:Me.pron,showColloquial:Me.colloq,buttonSize:v,wordInfo:Le.grade||Le.syllables!=null||Le.pos||Le.wordType?{grade:Le.grade,syllables:Le.syllables,pos:Le.pos,wordType:Le.wordType}:void 0})]},Ze)),D&&L(Se,(Be.words??[]).map(Le=>Le.label).join(" / ")),h&&n.jsx("div",{className:"word-table-block__card-handle",children:n.jsx(fe,{htmlType:"button",size:v,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:$("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:$("wordTable.reorder.handle",{word:(Be.words??[]).map(Le=>Le.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})}),(_||f)&&n.jsxs("div",{className:"word-table-block__card-actions",children:[_?.(Se,Be),f&&n.jsx("div",{className:"word-table-block__card-close",children:n.jsx(fe,{htmlType:"button",size:v,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(Be.words??[]).length>1?$("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):$("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:(Be.words??[]).length>1?$("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):$("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>f(Be.id)})})]})]},Be.id)),Array.from({length:Math.max(0,he*ue-(d?.length??0))}).map((Be,Se)=>{const Le=(d?.length??0)+Se<be;return n.jsx("div",{className:"word-table-block__card word-table-block__card--filler",children:g&&b&&Le&&n.jsx("div",{style:nt,children:n.jsx(fe,{htmlType:"button",size:v,type:"bar",icon:"plus",label:$("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>b((d?.length??0)+Se)})})},`filler-${Se}`)})]}),Ve&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"word-table__band word-table__band--top",children:[n.jsx("img",{className:"word-table__brand-logo",src:B?.topLogo?.src??dr,alt:B?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const Be=[B?.title&&n.jsx("span",{className:"word-table__paper-title",children:B.title},"t"),B?.owner&&n.jsx("span",{className:"word-table__owner",children:B.owner},"o"),y&&n.jsx("span",{className:"word-table__code",children:y},"c")].filter(Boolean);return Be.length===0?null:n.jsx("span",{className:"word-table__ident",children:Be.map((Se,Le)=>n.jsxs(o.Fragment,{children:[Le>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Se]},Le))})})()]})}),Oe&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"word-table__band word-table__band--bottom",children:[n.jsxs("span",{className:"word-table__brand-by",children:[B?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:B.bottomLogo.src,alt:B.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:dt})]}),n.jsxs("span",{className:"word-table__band-end",children:[B?.link&&n.jsx("span",{className:"word-table__link",children:B.link}),w&&A!=="none"&&n.jsx("span",{className:"word-table__page-count",children:$("wordTable.filter.pageIndicator",{current:w.current,total:w.total})})]})]})}),!je&&w&&A!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${A}`,children:$("wordTable.filter.pageIndicator",{current:w.current,total:w.total})})]})}),h&&n.jsx("span",{role:"status",style:_4,children:S})]}),He=pe==null?ke:n.jsx("div",{className:"word-table__frame",style:{height:pe},children:ke});return J?n.jsx(fa,{type:"page",icon:t,title:e,disc:a,className:we("word-table-block",r),children:He}):He}function B4(e,t,a){const r=[];for(const l of e??[]){if(l.type==="note"||l.type==="input")continue;const s=l.displayLabel??l.label,i=k4(l,t?.[l.label],a);i!==null&&r.push(`${s} ${i}`)}return r.join(" \xB7 ")}function k4(e,t,a){const r=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(l=>l!==xn);return r.length===0?e.allOption?e.allLabel??a:null:r.map(l=>A4(e,l)).join(", ")}function A4(e,t){const a=[...e.items??[],...(e.groups??[]).flat()];for(const r of a)if(r!=null){if(typeof r=="string"){if(r===t)return r;continue}if(r.value===t)return r.displayLabel??r.labels?.join(" ")??r.value}return t}function Ln({title:e,titleLevel:t=2,headerAction:a,headerSummary:r,collapsible:l=!1,defaultCollapsed:s=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:d,selected:m={},onSelect:p,align:C,sectionAlign:b,className:x}){const f=(C??(b==="vertical"?"newline":"inline"))==="inline",{t:h}=_e.useTranslation(),[_,g]=o.useState(s),k=i??_,v=()=>{const N=!k;g(N),u?.(N)},B=N=>{if(!l)return;const F=N.target;!F||typeof F.closest!="function"||F.closest(".filter-panel__collapse-toggle")||F.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||v()},y=o.useMemo(()=>r!==void 0||!k?"":B4(d,m,h("common.all","\uC804\uCCB4")),[r,k,d,m,h]),w=r??(y?n.jsx("span",{className:"filter-panel__header-summary body-3",children:y}):null),A=e||a||r||l,E=o.useId(),D=t?`h${t}`:"span";return n.jsxs("div",{className:we("filter-panel",l?"filter-panel--collapsible":"",k?"filter-panel--collapsed":"",x),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?E:void 0,children:[A&&n.jsxs("div",{className:"filter-panel__header",onClick:l?B:void 0,children:[n.jsx("div",{className:"filter-panel__title-row",children:e&&n.jsx(D,{id:E,className:"filter-panel__title h4",children:e})}),n.jsxs("div",{className:"filter-panel__header-actions",children:[k?w:a,l&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:k?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:k?h("common.expand","\uD3BC\uCE58\uAE30"):h("common.collapse","\uC811\uAE30"),showTooltipInfo:k?h("common.expand","\uD3BC\uCE58\uAE30"):h("common.collapse","\uC811\uAE30"),"aria-expanded":!k,onClick:v})]})]}),!k&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:we("filter-panel__sections",f?"filter-panel__sections--row":""),children:d.map(N=>{const F=m[N.label],R=F===void 0||(Array.isArray(F)?F.length===0:!1),K=(N.items??[]).filter($=>$!=null);N.allOption&&K.some($=>(typeof $=="string"?$:$.value)===xn)&&Rt(`filter-panel-all-value:${N.label}`,`[FilterPanel] '${N.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${xn}' \uC778 \uBCF4\uAE30\uAC00 \uD568\uAED8 \uC788\uB2E4 \u2014 \uB450 \uC120\uD0DD\uC774 \uAD6C\uBCC4\uB418\uC9C0 \uC54A\uB294\uB2E4. \uBCF4\uAE30 \uAC12\uC744 \uBC14\uAFD4\uB77C.`);const L=$=>{const T=typeof $=="string"?$:$.value,J=typeof $!="string"&&!!$.disabled,q=typeof $!="string"?$.labels:void 0,O=typeof $!="string"?$.displayLabel:void 0,Q=typeof $!="string"?$.tooltip:void 0,P=typeof $!="string"?$.descriptionTooltip:void 0,V=typeof $!="string"?$.shape:void 0,W=Array.isArray(F)?F.includes(T):F===T;return n.jsx(fe,{htmlType:"button",size:"keyboard",label:q??O??T,type:N.itemType??(q?"bar":T.length===1?"dot":void 0),selected:W,disabled:J,shape:V,showTooltipInfo:!!Q,tooltipInfoText:Q,tooltipDescription:P,onClick:()=>p?.(T,N.label)},T)};return n.jsxs(o.Fragment,{children:[N.groupLabel&&n.jsxs("div",{className:"filter-panel__group-label-row",children:[n.jsx("div",{className:"filter-panel__group-label body-2",children:N.groupLabel}),N.groupAction]}),n.jsxs("div",{className:we("filter-panel__section",N.layout==="row"?"filter-panel__section--row":"",N.block?"filter-panel__section--block":""),children:[n.jsxs("div",{className:"filter-panel__section-label-row",children:[n.jsx("span",{className:"filter-panel__section-label body-3",children:N.displayLabel??N.label}),N.labelAction??(N.labelInfo?n.jsx(Ha,{...N.labelInfo}):null)]}),N.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:N.content}):N.type==="input"?n.jsx(Xn,{className:"filter-panel__textfield",placeholder:N.placeholder,ariaLabel:N.displayLabel??N.label,value:m[N.label]??"",onChange:$=>p?.($,N.label),error:N.error}):!N.multiple&&N.display==="segmented"?n.jsx(wn,{ariaLabel:N.displayLabel??N.label,options:[...N.allOption?[{key:xn,label:N.allLabel??h("common.all","\uC804\uCCB4"),disabled:N.allOptionDisabled}]:[],...K.map($=>{const T=typeof $=="string"?$:$.value,J=typeof $!="string"?$.displayLabel:void 0,q=typeof $!="string"?$.disabled:void 0;return{key:T,label:J??T,disabled:q}})],value:R&&N.allOption?xn:m[N.label]??"",onChange:$=>p?.($,N.label),size:32}):!N.multiple&&N.display==="dropdown"?n.jsx(fn,{className:"filter-panel__dropdown",ariaLabel:typeof N.label=="string"?N.label:void 0,size:40,options:[...N.allOption?[{value:xn,label:N.allLabel??h("common.all","\uC804\uCCB4"),disabled:N.allOptionDisabled}]:[],...K.map($=>{const T=typeof $=="string"?$:$.value,J=typeof $!="string"?$.displayLabel:void 0,q=typeof $!="string"?$.disabled:void 0;return{value:T,label:J??T,disabled:q}})],value:R&&N.allOption?xn:m[N.label],onChange:$=>p?.($,N.label)}):n.jsxs("div",{className:N.groups?"filter-panel__item-groups":"filter-panel__items",children:[N.allOption&&!N.groups&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:N.allLabel??h("common.all","\uC804\uCCB4"),selected:R,disabled:N.allOptionDisabled,onClick:()=>p?.(xn,N.label)}),N.groups?N.groups.map(($,T)=>n.jsxs("div",{className:"filter-panel__item-group",children:[T===0&&N.allOption&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:N.allLabel??h("common.all","\uC804\uCCB4"),selected:R,disabled:N.allOptionDisabled,onClick:()=>p?.(xn,N.label)}),$.filter(J=>J!=null).map(L)]},T)):K.map(L)]})]})]},N.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const N4=[1,2,3,4,5,6,7,8,9,10,11,12],sc=[8,4,2,1],hn="show",kn="hide";function lc(e,t){return{label:e("wordTable.filter.composition","\uAD6C\uC131"),items:[{value:"image",disabled:!t.hasImage,displayLabel:e("wordTable.filter.image","\uC774\uBBF8\uC9C0")},{value:"word",displayLabel:e("wordTable.filter.word","\uB2E8\uC5B4")},{value:"standardPron",displayLabel:e("wordTable.filter.standardPron","\uD45C\uC900 \uBC1C\uC74C")},{value:"colloquialPron",disabled:!t.hasColloquial,displayLabel:e("wordTable.filter.colloquialPron","\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C")}],multiple:!0,allOption:!0}}function ic(e){return{label:e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5"),items:[{value:"landscape",displayLabel:e("wordTable.filter.landscape","\uAC00\uB85C")},{value:"portrait",displayLabel:e("wordTable.filter.portrait","\uC138\uB85C")}],display:"segmented"}}function uc(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function cc(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function dc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function pc(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:"dashed",displayLabel:e("wordTable.filter.dotted","\uC810\uC120")},{value:"corner",displayLabel:e("wordTable.filter.corner","\uCF54\uB108")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function mc(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function hc(e,t){return{label:e(t.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[t.itemCount,...sc.filter(a=>a<t.itemCount)].map(a=>({value:`${a}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:a})})),display:"segmented"}}function Cc(e,t){return e===t||!sc.includes(e)?Number.POSITIVE_INFINITY:e}function E4(e){return{label:e("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638"),items:[{value:"left",displayLabel:e("wordTable.filter.pageNumberLeft","\uC67C\uCABD")},{value:"center",displayLabel:e("wordTable.filter.pageNumberCenter","\uC911\uC559")},{value:"right",displayLabel:e("wordTable.filter.pageNumberRight","\uC624\uB978\uCABD")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function fc(e){return e==="left"||e==="center"||e==="right"?e:"none"}function gc(e,t){return{[e("wordTable.filter.composition","\uAD6C\uC131")]:t.contentTypes,[e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")]:t.orientation,[e("wordTable.filter.border","\uC678\uACFD\uC120")]:t.showOutline?hn:kn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?hn:kn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?hn:kn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?hn:kn}:{}}}function bc(e,t,a,r){return a===e("wordTable.filter.composition","\uAD6C\uC131")?t===xn?(r.setContentTypes(()=>[]),!0):(r.setContentTypes(l=>l.includes(t)?l.filter(s=>s!==t):[...l,t]),!0):a===e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")?(r.setOrientation(t==="landscape"?"landscape":"portrait"),!0):a===e("wordTable.filter.border","\uC678\uACFD\uC120")?(r.setShowOutline(t===hn),!0):a===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(r.setCutLine(t),!0):a===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(r.setShowDivLine(t===hn),!0):a===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(r.setShowTopInfo?.(t===hn),!0):a===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(r.setShowBottomInfo?.(t===hn),!0):!1}function D4(e){return"sections"in e}function as(e){const{t}=_e.useTranslation(),{title:a,className:r,collapsible:l,defaultCollapsed:s,collapsed:i,onCollapsedChange:u,headerSummary:c}=e,d={collapsible:l,defaultCollapsed:s,collapsed:i,onCollapsedChange:u,headerSummary:c};if(D4(e))return n.jsx(Ln,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...d,align:"inline"});const{hasImage:m,hasColloquial:p,contentTypes:C,orientation:b,showOutline:x,cutLine:f,showDivLine:h,setters:_,showCutLine:g=!1,showDivLine2:k=!1,middleSections:v=[],extraSelected:B={},onExtraSelect:y,showPaperBands:w=!1,showTopInfo:A=!0,showBottomInfo:E=!0}=e,D=[lc(t,{hasImage:m,hasColloquial:p}),ic(t),...v,uc(t),...g?[pc(t)]:[],...k?[mc(t)]:[],...w?[cc(t),dc(t)]:[]],N={...gc(t,{contentTypes:C,orientation:b,showOutline:x,cutLine:f,showDivLine:h,showTopInfo:A,showBottomInfo:E}),...B},F=(R,K)=>{bc(t,R,K,_)||y?.(R,K)};return n.jsx(Ln,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:D,selected:N,onSelect:F,...d,sectionAlign:"horizontal"})}function rs(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function S4(e){return rs(e).replace(/"/g,""").replace(/'/g,"'")}function os(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let xr=null,ya=null;function j4(e,t,a,r="",l=""){if(e.length===0||ya&&ya.iframe.isConnected&&Date.now()-ya.at<1e4)return;const s=r?os(r):"";xr?.();let i=null;if(s){const d=document.title;document.title=s,i=()=>{document.title=d,window.removeEventListener("afterprint",i),xr===i&&(xr=null)},xr=i,window.addEventListener("afterprint",i)}const u=document.createElement("iframe");u.style.cssText="position:fixed;left:-10000px;top:0;width:1200px;height:900px;border:0;",document.body.appendChild(u);const c=u.contentDocument;if(!c){u.remove();return}ya={iframe:u,at:Date.now()},c.open(),c.write(ss(e,t,a,!0,s,l)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),ya?.iframe===u&&(ya=null)},0)})}function ss(e,t,a,r=!1,l="",s=""){l=l?os(l):"";const i=Array.from(document.styleSheets).flatMap(p=>{try{return Array.from(p.cssRules).map(C=>C.cssText)}catch{return[]}}).join(`
|
|
830
|
+
`),f=x===-1?a:a.slice(0,x);s("comment",f),a=a.slice(f.length);continue}const u=a.match(/^\/\*[\s\S]*?\*\//);if(u){s("comment",u[0]),a=a.slice(u[0].length);continue}const c=a.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(c){s("string",c[0]),a=a.slice(c[0].length);continue}const d=a.match(/^\d+(?:\.\d+)?/);if(d){s("number",d[0]),a=a.slice(d[0].length);continue}const m=a.match(pv);if(m){s("keyword",m[0]),a=a.slice(m[0].length);continue}const p=a.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(p){const x=p[0];s(l&&dv.has(x)?"command":"identifier",x),a=a.slice(x.length);continue}const C=a.match(/^[=+\-*/%<>!&|^~?:]+/);if(C){s("operator",C[0]),a=a.slice(C[0].length);continue}const b=a.match(/^[()[\]{};.,]/);if(b){s("punctuation",b[0]),a=a.slice(1);continue}s("other",a[0]),a=a.slice(1)}return r}function hv({children:e,language:t="bash",title:a="",showCopy:r=!0,size:l="default",className:s=""}){const{t:i}=_e.useTranslation(),[u,c]=o.useState(!1),d=cv(yu(e)),m=o.useRef(null);o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const p=async()=>{try{if(!await Tf(d))return;c(!0),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>c(!1),2e3)}catch{}},C=mv(d,t),b=l==="small"?"caption-1":"body-3";return n.jsxs("div",{className:we("code-box",l==="small"?"code-box--small":"",s),children:[(a||r)&&n.jsxs("div",{className:"code-box__header",role:"toolbar","aria-label":i("common.codeBlock","\uCF54\uB4DC \uBE14\uB85D"),children:[n.jsx("div",{className:"code-box__title caption-1",children:a}),r&&n.jsx(fe,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:u?"check":"copy",onClick:p,ariaLabel:u?i("common.copied","\uBCF5\uC0AC\uB428"):i("common.copyCode","\uCF54\uB4DC \uBCF5\uC0AC")})]}),n.jsx("pre",{className:"code-box__inner","data-lang":t,children:n.jsx("code",{children:C.map((x,f)=>n.jsx("span",{className:`code-token ${x.type} ${b}`,children:x.content},f))})})]})}const Cv={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function Ga(e){const{t}=_e.useTranslation(),{variant:a="spinner",size:r=24,progress:l=null,label:s}=e||{},i=s||t("loader.loading","Loading");if(a==="bar"){const c=l==null||!Number.isFinite(Number(l)),d=c?0:Math.max(0,Math.min(100,Number(l)));return n.jsx("div",{className:`loader-bar${c?" loader-bar--indeterminate":""}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c?void 0:d,"aria-label":i,children:n.jsx("div",{className:"loader-bar__inner",style:c?void 0:{width:`${d}%`}})})}const u=typeof r=="number"?`${r}px`:r;return n.jsxs("div",{className:"loader-spinner",style:{width:u,height:u},role:"status","aria-label":i,children:[n.jsx("span",{style:Cv,children:i}),n.jsxs("svg",{className:"loader-spinner__svg",viewBox:"0 0 50 50",width:r,height:r,children:[n.jsx("circle",{className:"loader-spinner__bg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4"}),n.jsx("circle",{className:"loader-spinner__fg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4",strokeLinecap:"round"})]})]})}function vu({checked:e,onChange:t,disabled:a=!1,label:r,ariaLabel:l,labelPosition:s="right",className:i="",id:u}){const c=r&&n.jsx("span",{className:"toggle__label body-3",children:r});return n.jsxs("label",{className:`toggle${a?" toggle--disabled":""} ${i}`.trim(),children:[s==="left"&&c,n.jsx("input",{id:u,type:"checkbox",role:"switch",checked:e,disabled:a,onChange:d=>t?.(d.target.checked),"aria-label":!r&&l?l:void 0}),n.jsx("span",{className:"toggle__slider"}),s==="right"&&c]})}function xu({checked:e=!1,onChange:t,disabled:a,indeterminate:r,label:l,size:s="medium",className:i,title:u,ariaLabel:c}){const d=o.useRef(null),m=o.useId(),p=o.useRef(!!r);return p.current=!!r,o.useEffect(()=>{d.current&&(d.current.indeterminate=!!r)}),n.jsxs("label",{className:we("checkbox",s==="small"&&"checkbox--small",s==="large"&&"checkbox--large",a&&"checkbox--disabled",i),htmlFor:m,title:u,children:[n.jsx("input",{ref:d,id:m,type:"checkbox",className:"checkbox__input",checked:e,onChange:C=>{t?.(C.target.checked),d.current&&(d.current.indeterminate=p.current)},disabled:a,"aria-label":!l&&c?c:void 0}),n.jsx("span",{className:"checkbox__box"}),l&&n.jsx("span",{className:"checkbox__label body-3",children:l})]})}function fv({count:e,actions:t,onClear:a,clearLabel:r,visible:l,content:s,max:i}){const{t:u}=_e.useTranslation(),c=l!==void 0?l:e>0,d=r??u("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),m=o.useRef(null),p=o.useRef(null),C=o.useRef(null),b=o.useRef(c);o.useLayoutEffect(()=>{const g=p.current,k=b.current;if(b.current=c,c&&!k){const v=typeof document<"u"?document.activeElement:null;C.current=v&&v!==document.body&&!g?.contains(v)?v:null}else!c&&k&&g&&g.contains(document.activeElement)&&sr(g,C.current)},[c]);const[x,f]=o.useState(!1),h=o.useRef(!1),_=o.useRef(null);return o.useEffect(()=>{const g=m.current;if(!g)return;const k=E=>{h.current=E,f(E)},v=()=>{const E=g.firstElementChild??g,D=Array.from(E.children);if(D.length<2){k(!1);return}const N=D[0].offsetTop,F=D.some(T=>T.offsetTop!==N);if(!h.current){_.current=g.clientWidth,F&&k(!0);return}if(F)return;const R=D[0],K=D[D.length-1],L=K.offsetLeft+K.offsetWidth-R.offsetLeft,$=_.current;($==null||L<=$)&&k(!1)};if(v(),typeof ResizeObserver>"u")return;const B=new ResizeObserver(v);B.observe(g);const y=g.parentElement;let w=y?.clientWidth??0;const A=new ResizeObserver(()=>{const E=y?.clientWidth??0;E!==w&&(w=E,_.current=null,v())});return y&&A.observe(y),()=>{B.disconnect(),A.disconnect()}},[s,e]),n.jsxs("div",{ref:p,className:`bulk-bar ${c?"bulk-bar--visible":""}`,inert:!c||void 0,"aria-hidden":c?void 0:!0,children:[n.jsx("span",{ref:m,className:"bulk-bar__count body-2",role:"status",children:s??n.jsx("b",{children:u("common.selectedCount",{count:e})})}),i!==void 0&&n.jsx($t,{size:"small",fill:"soft",variant:"main",label:`${e} / ${i}`,"aria-label":u("common.selectedOfMax",{count:e,max:i,defaultValue:`\uCD5C\uB300 ${i}\uAC1C \uC911 ${e}\uAC1C`})}),n.jsxs("div",{className:`bulk-bar__actions${x?" bulk-bar__actions--stacked":""}`,children:[n.jsx(fe,{htmlType:"button",size:40,label:d,onClick:a}),t.map((g,k)=>n.jsx(fe,{htmlType:"button",size:40,variant:g.variant??"default",icon:g.icon,label:g.label,onClick:g.onClick},k))]})]})}const gv=[{key:"edit",icon:"edit-2",closeFirst:!0},{key:"duplicate",icon:"copy",closeFirst:!1},{key:"publish",icon:"book-marked",closeFirst:!1},{key:"copyLink",icon:"link",closeFirst:!1},{key:"remove",icon:"trash-2",closeFirst:!0}];function bv(e){const{onClose:t,className:a}=e;return n.jsx("div",{className:we("item-actions",a),children:gv.map(({key:r,icon:l,closeFirst:s})=>{const i=e[r];if(!i)return null;const u=r==="publish"?i.published?i.unpublish:i.publish:i;return n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:l,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{s&&t(),u.onClick()}},r)})})}function _u(e,t){const a=()=>{if(e){const[f,h]=e.split("-");return{y:+f,m:+h-1}}const[b,x]=lo(t).split("-");return{y:+b,m:+x-1}},[r,l]=o.useState(()=>a().y),[s,i]=o.useState(()=>a().m),u=o.useRef(e);o.useEffect(()=>{if(e===u.current)return;u.current=e;const b=a();l(b.y),i(b.m)},[e]);const c=o.useRef({y:r,m:s});o.useEffect(()=>{c.current={y:r,m:s}},[r,s]);const d=o.useCallback(b=>{const x=c.current.y*12+c.current.m+b,f=Math.floor(x/12),h=x-f*12;c.current={y:f,m:h},l(f),i(h)},[]),m=o.useCallback(()=>d(-1),[d]),p=o.useCallback(()=>d(1),[d]),C=o.useCallback((b,x)=>{c.current={y:b,m:x},l(b),i(x)},[]);return{viewY:r,viewM:s,prevMonth:m,nextMonth:p,setViewYM:C}}function fr(e,t){return new Date(e,t+1,0).getDate()}function yv(e,t){return new Date(e,t,1).getDay()}function Ka(e,t,a){return`${e}-${String(t+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function vv(e){if(!e)return"";const[t,a,r]=e.split("-");return`${t}. ${a}. ${r}.`}function xv(e){const t=e.replace(/\D/g,"");if(t.length!==8)return null;const a=+t.slice(0,4),r=+t.slice(4,6),l=+t.slice(6,8);if(r<1||r>12||l<1||l>31)return null;const s=new Date(a,r-1,l);return s.getFullYear()!==a||s.getMonth()!==r-1||s.getDate()!==l?null:Ka(a,r-1,l)}const _v=1900;function wv(e,t,a,r,l){const s=r?+r.split("-")[0]:Math.min(_v,e),i=l?+l.split("-")[0]:Math.max(t+10,e),u=[];for(let c=s;c<=i;c++)u.push({value:String(c),label:a(c)});return u}function wu(e,t,a,r){const l=[];for(let s=1;s<=12;s++){const i=`${e}-${String(s).padStart(2,"0")}`;a&&i<a.slice(0,7)||r&&i>r.slice(0,7)||l.push({value:String(s),label:t(e,s)})}return l}function Bv({value:e,onChange:t,size:a=48,min:r,max:l,disabled:s,placeholder:i,className:u,today:c}){const{t:d,i18n:m}=_e.useTranslation(),p=i??d("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),C=o.useMemo(()=>d("calendar.dow",{returnObjects:!0}),[d]),b=lo(c),{viewY:x,viewM:f,prevMonth:h,nextMonth:_,setViewYM:g}=_u(e,c),k=o.useId(),v=o.useCallback((z,ne)=>{const H=window.innerHeight,U=window.innerWidth,pe=typeof document<"u"?document.getElementById(k):null,Ee=Math.max(pe?.offsetHeight||0,pe?.scrollHeight||0)||300,ge=Math.max(z.width,pe?.offsetWidth||0,260),me=H-z.bottom,ie=z.top,be=me<Ee&&ie>me,he=8,ue=(Me,Ve)=>Math.min(Math.max(he,Me),Math.max(he,Ve));return{position:"fixed",left:ue(z.left,U-ge-he),width:z.width,minWidth:260,...be?{top:"auto",bottom:ue(H-z.top+6,H-Ee-he)}:{bottom:"auto",top:ue(z.bottom+6,H-Ee-he)},zIndex:Ia(ne)}},[k]),{open:B,setOpen:y,toggle:w,style:A,triggerRef:E,menuRef:D}=Fa({computeStyle:v,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!B)return;const z=D.current;return(z?.querySelector(".date-picker__day--selected:not(:disabled)")??z?.querySelector(".date-picker__day--today:not(:disabled)")??z?.querySelector(".date-picker__day:not(:disabled)")??z?.querySelector(_n)??z)?.focus?.(),()=>{const ne=document.activeElement;(!ne||ne===document.body)&&E.current?.focus?.()}},[B,D,E]);const[N,F]=o.useState(1),R=o.useRef(null),K=o.useRef(null);o.useEffect(()=>{if(!B)return;const z=e&&e.slice(0,7)===`${x}-${String(f+1).padStart(2,"0")}`?+e.slice(8):b.slice(0,7)===`${x}-${String(f+1).padStart(2,"0")}`?+b.slice(8):1;F(z)},[B]),o.useEffect(()=>{if(K.current==null)return;const z=K.current;K.current=null,R.current?.querySelector(`[data-day="${z}"]`)?.focus()}),o.useEffect(()=>{F(z=>Math.min(z,fr(x,f)))},[x,f]);const L=o.useCallback(z=>{let ne=Ka(z.getFullYear(),z.getMonth(),z.getDate());r&&ne<r&&(ne=r),l&&ne>l&&(ne=l);const[H,U,pe]=ne.split("-").map(Number);(H!==x||U-1!==f)&&g(H,U-1),F(pe),K.current=pe},[r,l,x,f,g]),$=o.useCallback(z=>{const ne=new Date(x,f,N),H=pe=>{ne.setDate(ne.getDate()+pe),L(ne)},U=pe=>{const Ee=ne.getFullYear()*12+ne.getMonth()+pe,ge=Math.floor(Ee/12),me=Ee-ge*12;L(new Date(ge,me,Math.min(ne.getDate(),fr(ge,me))))};switch(z.key){case"ArrowLeft":H(-1);break;case"ArrowRight":H(1);break;case"ArrowUp":H(-7);break;case"ArrowDown":H(7);break;case"Home":H(-ne.getDay());break;case"End":H(6-ne.getDay());break;case"PageUp":z.shiftKey?U(-12):U(-1);break;case"PageDown":z.shiftKey?U(12):U(1);break;default:return}z.preventDefault()},[x,f,N,L]),T=o.useCallback(z=>{s||(t(Ka(x,f,z)),y(!1))},[x,f,t,y,s]);o.useEffect(()=>{s&&y(!1)},[s,y]);const J=z=>{const ne=Ka(x,f,z);return!!(r&&ne<r||l&&ne>l)},q=(()=>{const z=fr(x,f);if(N>=1&&N<=z&&!J(N))return N;for(let ne=1;ne<=z;ne++)if(!J(ne))return ne;return-1})(),O=[];for(let z=0;z<yv(x,f);z++)O.push(null);for(let z=1;z<=fr(x,f);z++)O.push(z);const Q=a===64?20:a===40?16:18,P=Ol(m.language),V=z=>new Intl.DateTimeFormat(P,{year:"numeric"}).format(new Date(z,0,1)),W=(z,ne)=>new Intl.DateTimeFormat(P,{month:"long"}).format(new Date(z,ne-1,1)),G=wv(x,+b.slice(0,4),V,r,l),S=wu(x,W,r,l),M=z=>{const ne=wu(z,W,r,l);if(ne.length===0)return;const H=ne.some(U=>+U.value===f+1);g(z,H?f:+ne[0].value-1)},[I,Z]=o.useState(null);o.useEffect(()=>{Z(null)},[e]);const le=o.useCallback(z=>{Z(z);const ne=xv(z);if(!ne||r&&ne<r||l&&ne>l)return;t(ne);const[H,U]=ne.split("-");g(+H,+U-1)},[r,l,t,g]),oe=o.useCallback(()=>{Z(null)},[]),de=o.useCallback(z=>{z.key==="Enter"?(z.preventDefault(),oe(),y(!1)):z.key==="Escape"?(oe(),y(!1)):z.key==="ArrowDown"&&!B&&(z.preventDefault(),y(!0))},[oe,y,B]),re=B?cn.createPortal(n.jsxs("div",{ref:D,id:k,className:"date-picker__dropdown",style:A,"data-tooltip-ignore":!0,role:"dialog","aria-label":d("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),tabIndex:-1,children:[n.jsxs("div",{className:"date-picker__nav",children:[n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:h,"aria-label":d("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(Ps,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(fn,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:G,value:String(x),onChange:z=>M(+z),size:40}),n.jsx(fn,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:S,value:String(f+1),onChange:z=>g(x,+z-1),size:40})]}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:_,"aria-label":d("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(Is,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:R,onKeyDown:$,children:[C.map(z=>n.jsx("div",{className:"date-picker__dow caption-1",children:z},z)),O.map((z,ne)=>{if(z===null)return n.jsx("div",{},`e${ne}`);const H=Ka(x,f,z),U=H===e,pe=H===b,Ee=J(z),ge=ne%7;return n.jsx("button",{type:"button",disabled:Ee,"data-day":z,tabIndex:z===q?0:-1,"aria-current":pe?"date":void 0,onClick:()=>!Ee&&T(z),className:we("date-picker__day caption-1",U&&"date-picker__day--selected",pe&&!U&&"date-picker__day--today",Ee&&"date-picker__day--disabled",ge===0&&"date-picker__day--sun",ge===6&&"date-picker__day--sat"),children:z},z)})]})]}),document.body):null;return n.jsxs("div",{className:we("date-picker",`date-picker--s${a}`,B&&"date-picker--open",u),children:[n.jsxs("div",{className:"date-picker__field",children:[n.jsx("input",{ref:E,type:"text",className:"date-picker__trigger body-2",value:I??vv(e),placeholder:p,onChange:z=>le(z.target.value),onClick:()=>!s&&!B&&w(),onKeyDown:de,onBlur:oe,disabled:s,"aria-haspopup":"dialog","aria-expanded":B,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!s&&w(),disabled:s,tabIndex:-1,"aria-label":p,"aria-haspopup":"dialog","aria-expanded":B,children:n.jsx(Gs,{size:Q,className:"date-picker__icon",strokeWidth:1.5})})]}),re]})}function kv({items:e,className:t,ariaLabel:a="\uC54C\uB9BC \uAE00",titleLevel:r=4,targetBytes:l}){const s=r?`h${r}`:"div";return n.jsx("div",{className:`notify-text-preview${t?` ${t}`:""}`,role:"group","aria-label":a,children:e.map(i=>{const u=l===void 0?Sl(i.sms):Sl(i.sms,l),c=u.type==="LMS";return n.jsxs("section",{className:"notify-text-preview__item",children:[n.jsxs("header",{className:"notify-text-preview__head",children:[n.jsx(s,{className:"notify-text-preview__name h5b",children:i.name}),i.meta&&Object.keys(i.meta).length>0?n.jsx("dl",{className:"notify-text-preview__meta caption-1",children:Object.entries(i.meta).map(([d,m])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:d}),n.jsx("dd",{children:m})]},d))}):null]}),n.jsxs("div",{className:"notify-text-preview__body",children:[n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsxs("div",{className:"notify-text-preview__col-head caption-1",children:[n.jsx("span",{children:"\uBB38\uC790"}),n.jsxs("span",{className:`notify-text-preview__bytes${c?" is-over":u.overTarget?" is-over-target":""}`,title:u.over?`${u.limit}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uBCF4\uB0BC \uB54C \uC798\uB9B0\uB2E4`:c?`${El}\uBC14\uC774\uD2B8\uB97C \uB118\uC5B4 \uC7A5\uBB38\uC774\uB2E4 \u2014 \uD55C \uD1B5 \uAC12\uC774 \uB2E8\uBB38\uC758 \uB450 \uBC30 \uBC18\uC774\uB2E4`:u.overTarget?`\uACA8\uB204\uB294 ${u.target}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uD55C \uAE00\uC790\uB9CC \uB298\uC5B4\uB3C4 ${El}\uC744 \uB118\uC5B4 \uC7A5\uBB38\uC774 \uB41C\uB2E4`:void 0,children:[u.bytes,u.target!==null?` / \uBAA9\uD45C ${u.target}`:"","\uBC14\uC774\uD2B8 \xB7 ",c?"\uC7A5\uBB38":"\uB2E8\uBB38",u.over?" \xB7 \uD55C\uACC4 \uB118\uC74C":c?" \xB7 \uAC12\uC774 \uB450 \uBC30 \uBC18":u.overTarget?" \xB7 \uBAA9\uD45C \uB118\uC74C":""]})]}),n.jsx("pre",{className:"notify-text-preview__text",children:i.sms})]}),i.ata?n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsx("div",{className:"notify-text-preview__col-head caption-1",children:n.jsx("span",{children:"\uC54C\uB9BC\uD1A1"})}),n.jsx("pre",{className:"notify-text-preview__text",children:i.ata})]}):null]})]},i.name)})})}function Av({src:e,alt:t,className:a,style:r,tone:l,textColor:s}){const i=!l&&!!s,u=Iy(e,i),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return l?n.jsx("span",{className:we("brand-logo","brand-logo--tone",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--brand-logo-src":`url("${e}")`,"--brand-logo-tone":l},children:n.jsx("img",{src:e,alt:"","aria-hidden":"true",className:"brand-logo__sizer",draggable:!1})}):i&&u?n.jsx("span",{className:we("brand-logo","brand-logo--inline",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--brand-logo-text-color":s},dangerouslySetInnerHTML:{__html:Ry($y(u),c)}}):n.jsx("img",{src:e,alt:t,className:we("brand-logo",a),style:r,draggable:!1})}function Bu({children:e,className:t}){const a=o.useRef(null),[r,l]=o.useState(null);return o.useEffect(()=>{l(a.current?.parentElement??null)},[]),o.useEffect(()=>{const s=a.current;if(!s||!r)return;const i=()=>{const c=typeof window<"u"&&window.getComputedStyle(s).position==="absolute"?Math.ceil(s.getBoundingClientRect().width):0;c>0?r.style.setProperty("--section-head-float-w",`${c}px`):r.style.removeProperty("--section-head-float-w")};if(i(),typeof ResizeObserver>"u")return()=>{r.style.removeProperty("--section-head-float-w")};const u=new ResizeObserver(()=>i());return u.observe(s),u.observe(r),()=>{u.disconnect(),r.style.removeProperty("--section-head-float-w")}},[r,e]),n.jsx("div",{ref:a,className:we("section-head-float",t),children:e})}function Io({items:e,className:t}){return n.jsx("div",{className:t?`manager-bar-chart-legend ${t}`:"manager-bar-chart-legend",children:e.map((a,r)=>n.jsxs("span",{className:"manager-bar-chart-legend-item",children:[n.jsx("span",{className:"manager-bar-chart-legend-dot",style:{background:a.color}}),a.label]},r))})}function Ya({label:e,children:t}){return e?n.jsxs("div",{className:"barchart-total barchart-total--stacked",children:[n.jsx("span",{className:"barchart-total__label body-3",children:e}),n.jsx("span",{className:"barchart-total__value",children:t})]}):n.jsx("div",{className:"barchart-total",children:t})}function Fo({title:e,titleClassName:t="h3",titleLevel:a=3,icon:r,disc:l,headRight:s,headFloat:i,headSegment:u,headMenuItems:c,collapseBelow:d=420,onClick:m,ariaLabel:p,tooltip:C,totalNum:b,totalUnit:x,totalLabel:f,subRow:h,subRowAlign:_="start",className:g,inGrid:k=!1,children:v}){const{t:B}=_e.useTranslation(),y=o.useRef(null),{anchorRect:w,openAt:A,close:E}=Pa(),D=o.useCallback(()=>{C&&y.current&&A(y.current)},[C,A]),[N,F]=o.useState(!1);Ro(()=>{const S=y.current;if(!S||!u)return;const M=Z=>F(Z>0&&Z<d);if(M(S.clientWidth),typeof ResizeObserver>"u")return;const I=new ResizeObserver(Z=>M(Z[0].contentRect.width));return I.observe(S),()=>I.disconnect()},[u,d]);const[R,K]=o.useState(null),L=o.useCallback(()=>K(null),[]),$=o.useCallback(S=>{const M=S.currentTarget.getBoundingClientRect();K(I=>I?null:{left:M.left,right:M.right,top:M.top,bottom:M.bottom,width:M.width,height:M.height,x:M.x,y:M.y})},[]),T=!!u&&N;o.useEffect(()=>{T||K(null)},[T]);const J=u?[...u.options.map(S=>({label:S.label,icon:S.icon,selected:S.key===u.value,disabled:S.disabled,onClick:()=>u.onChange(S.key),closeOnSelect:!0})),...(c??[]).map((S,M)=>M===0?{...S,separatorBefore:!0}:S)]:[],q=o.useCallback(S=>{if(!m)return;const M=S.target;M&&typeof M.closest=="function"&&M.closest('button, a, input, select, textarea, [role="radiogroup"]')||m()},[m]),O=o.useCallback(S=>{m&&S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),m())},[m]),Q=typeof s=="function"?s({collapsed:T}):s,P=b!=null||f?n.jsxs(Ya,{label:f,children:[b!=null&&n.jsx("span",{className:"barchart-total__num h0",children:b}),x&&n.jsx("span",{className:"barchart-total__unit h5",children:x})]}):null,V=Q||u?n.jsxs("div",{className:"manager-section__head-right",children:[u&&(T?n.jsx(fe,{htmlType:"button",size:32,type:"dot",icon:"ellipsis",ariaLabel:u.ariaLabel??B("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:u.ariaLabel??B("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!R,onClick:$}):n.jsx(wn,{size:32,ariaLabel:u.ariaLabel,options:u.options.map(S=>({key:S.key,label:S.label,disabled:S.disabled})),value:u.value,onChange:u.onChange})),Q]}):null,W=o.useId(),G=a?`h${a}`:"div";return n.jsxs("section",{ref:y,className:["manager-section",k&&"manager-section--grid",m&&"manager-section--clickable",g].filter(Boolean).join(" "),onClick:m?q:void 0,onKeyDown:m?O:void 0,onPointerEnter:C?D:void 0,onPointerLeave:C?E:void 0,onFocus:C?D:void 0,onBlur:C?E:void 0,role:m?"button":void 0,tabIndex:m?0:void 0,"aria-label":m?p??(typeof e=="string"?e:void 0):void 0,"aria-labelledby":!m&&e!=null?W:void 0,children:[C&&w&&n.jsx(Dn,{anchorRect:{left:w.left,top:w.top+21,right:w.right,bottom:w.bottom,width:w.width,height:w.height},text:C}),i&&n.jsx(Bu,{children:i}),n.jsxs("div",{className:"manager-section__head",children:[n.jsxs("div",{className:"manager-section__title-row",children:[r&&n.jsx(tt,{icon:r,label:typeof e=="string"?e:void 0,className:"manager-section__icon"}),n.jsx(G,{id:W,className:["manager-section__title",t].filter(Boolean).join(" "),children:e})]}),V,l&&n.jsx("div",{className:"manager-section__disc body-3",children:l})]}),(P||h)&&n.jsxs("div",{className:["barchart-sub-row",_!=="start"&&`barchart-sub-row--${_}`].filter(Boolean).join(" "),children:[P,h]}),v,R&&n.jsx(vn,{anchorRect:R,onClose:L,ariaLabel:u?.ariaLabel??B("tooltip.menu","\uBA54\uB274"),children:n.jsx(Oa,{columns:[{items:J}],onClose:L,size:"small"})})]})}const Za=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,Oo=e=>Za(e.getFullYear(),e.getMonth()+1);function ma(e){const t=/^(\d{4})-(\d{2})$/.exec(e);if(!t)return null;const a=Number(t[2]);return a>=1&&a<=12?{year:Number(t[1]),month1:a}:null}const zo=(e,t)=>`${e}#${t}`;function Bn(e,t){const a=new Date(e,t,1).getDay();return 1+(8-(a===0?7:a))%7}function Nv(){const e=la();let t=e.getFullYear(),a=e.getMonth(),r=e.getDate();if(r<Bn(t,a)){const i=new Date(t,a,0);t=i.getFullYear(),a=i.getMonth(),r=i.getDate()}const l=Math.floor((r-Bn(t,a))/7),s=Za(t,a+1);return{monthKey:s,value:zo(s,l)}}function Ev(e){const t=la(),a=Oo(t),r=(c,d)=>Za(c,d+1),l=new Map;l.set(a,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const d=r(c.date.getFullYear(),c.date.getMonth());l.has(d)||l.set(d,[]),l.get(d).push(c)}for(const[c,d]of[...l.entries()]){const m=ma(c);if(!m)continue;const p=m.year,C=m.month1-1,b=Bn(p,C);if(!(c===a&&t.getDate()<b)&&!d.some(h=>h.date.getDate()<b))continue;const x=new Date(p,C,0),f=r(x.getFullYear(),x.getMonth());l.has(f)||l.set(f,[])}const s=new Map;for(const[c,d]of l){const m=ma(c);if(!m)continue;const p=m.year,C=m.month1-1,b=new Date(p,C+1,0).getDate(),x=d.reduce((v,B)=>Math.max(v,B.parts?.length??0,B.partsB?.length??0),0),f=d.some(v=>v.partsB),h=new Array(b+1).fill(0),_=new Array(b+1).fill(0),g=Array.from({length:b+1},()=>new Array(x).fill(0)),k=Array.from({length:b+1},()=>new Array(x).fill(0));for(const v of d){const B=v.date.getDate();if(h[B]+=v.a,_[B]+=v.b,v.parts)for(let y=0;y<x;y++)g[B][y]+=v.parts[y]??0;if(v.partsB)for(let y=0;y<x;y++)k[B][y]+=v.partsB[y]??0}s.set(c,{year:p,month:C,daysInMonth:b,partsLen:x,hasPartsB:f,dayA:h,dayB:_,dayParts:g,dayPartsB:k})}const i=(c,d,m)=>new Date(c,d,m).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,d]of s){const{year:m,month:p,daysInMonth:C,dayA:b,dayB:x,dayParts:f,dayPartsB:h}=d,_=m===t.getFullYear()&&p===t.getMonth(),g=t.getDate(),k=s.get(r(p===11?m+1:m,(p+1)%12)),v=d.partsLen,B=[];for(let w=1;w<=C;w++){const A=_&&w>g;B.push({label:String(w),...A&&b[w]===0&&x[w]===0?{future:!0}:{},a:A&&b[w]===0&&x[w]===0?-1:b[w],b:x[w],...v?{parts:f[w]}:{},...v&&d.hasPartsB?{partsB:h[w]}:{}})}const y=[];for(let w=Bn(m,p);w<=C;w+=7){const A=Math.max(0,w+6-C),E=A&&k?Math.max(v,k.partsLen):v,D=d.hasPartsB||!!(A&&k?.hasPartsB);let N=0,F=0;const R=new Array(E).fill(0),K=new Array(E).fill(0);for(let $=w;$<=Math.min(w+6,C);$++){N+=b[$],F+=x[$];for(let T=0;T<v;T++)R[T]+=f[$][T],K[T]+=h[$][T]}if(A&&k)for(let $=1;$<=A&&!i(k.year,k.month,$);$++){N+=k.dayA[$],F+=k.dayB[$];for(let T=0;T<k.partsLen;T++)R[T]+=k.dayParts[$][T],K[T]+=k.dayPartsB[$][T]}const L=A?`${(p+1)%12+1}/${A}`:`${w+6}`;y.push({label:`${y.length+1}\uC8FC`,sublabel:`[${w}\uC77C~${L}\uC77C]`,a:N,b:F,...E?{parts:R}:{},...E&&D?{partsB:K}:{}})}u[c]={weekly:y,daily:B}}return u}function ku(){const e=la(),t=e.getFullYear(),a=e.getMonth()+1,r=[];for(let l=2024;l<=t;l++){const s=l===t?a:12;for(let i=1;i<=s;i++)r.push({value:Za(l,i),year:l,month:i})}return r.reverse()}ku();function Dv(){return ku()}function Au(e,t){const a=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),r=Array.isArray(a)&&typeof a[t]=="string"?a[t]:null;return e("calendar.weekLabel",{ord:r??String(t+1)})}function Nu(e){const{t,i18n:a}=_e.useTranslation(),[r,l]=o.useState("week"),s=o.useMemo(()=>Dv().filter(E=>E.value in e),[e]),i=o.useMemo(()=>{const E=[];for(const D of s){const N=new Date(D.year,D.month,0).getDate(),F=Bn(D.year,D.month-1),R=Math.ceil((N-F+1)/7);for(let K=R-1;K>=0;K--)E.push({value:zo(D.value,K),monthKey:D.value,year:D.year,month:D.month,week:K})}return E},[s]),u=o.useCallback(E=>`${so(t,a.language,E.year,E.month)} ${Au(t,E.week)}`,[t]),c=o.useMemo(()=>s.map(E=>({value:E.value,label:so(t,a.language,E.year,E.month)})),[t,a.language,s]),d=o.useMemo(()=>i.map(E=>({value:E.value,label:u(E)})),[i,u]),m=o.useMemo(()=>Nv(),[e]),p=o.useMemo(()=>s.find(E=>E.value===m.monthKey)?.value??s[0]?.value??"",[s,m]),C=o.useMemo(()=>i.find(E=>E.value===m.value)?.value??i[0]?.value??"",[i,m]),[b,x]=o.useState(""),[f,h]=o.useState("");o.useEffect(()=>{s.find(E=>E.value===b)||x(p)},[s,b,p]),o.useEffect(()=>{i.find(E=>E.value===f)||h(C)},[i,f,C]);const _=r==="month"?c:d,g=r==="month"?b:f,k=r==="month"?x:h,v=o.useMemo(()=>{const E=t("calendar.dow",{returnObjects:!0});return Array.isArray(E)?E:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),B=_.findIndex(E=>E.value===g),y=o.useCallback(()=>{const E=_.findIndex(D=>D.value===g);E<_.length-1&&k(_[E+1].value)},[_,g,k]),w=o.useCallback(()=>{const E=_.findIndex(D=>D.value===g);E>0&&k(_[E-1].value)},[_,g,k]),A=o.useMemo(()=>[{key:"week",label:t("manager.chart.periodWeek","\uC8FC")},{key:"month",label:t("manager.chart.periodMonth","\uC6D4")}],[t]);return{period:r,setPeriod:l,range:g,setRange:k,activeOptions:_,activeIdx:B,handlePrev:y,handleNext:w,periodOptions:A,monthRange:b,weekRange:f,weekRanges:i,DOW:v}}const At=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function Mn(e,t=!0){return e.future===!0||t&&e.a===-1}function Sv({data:e,colorA:t,colorB:a,labelA:r,labelB:l,barWidth:s=10,barGap:i=1,height:u=140,maxOverride:c,tightMax:d,seriesColors:m,seriesLabels:p,rateLabels:C,grouped:b=!1,baseline:x,focusableBars:f=!1}){const h=!a,_=!!(m&&m.length>0),g=x,k=o.useMemo(()=>_?Math.max(0,...e.filter(O=>!Mn(O,g==null)).map(O=>b?Math.max(0,...(O.parts??[]).map(At)):(O.parts??[]).reduce((Q,P)=>Q+Math.max(0,At(P)),0))):Math.max(0,...e.filter(O=>!Mn(O,g==null)).flatMap(O=>h?[At(O.a)]:[At(O.a),At(O.b)])),[e,h,_,b]),v=o.useMemo(()=>{if(g==null)return 0;const O=e.filter(Q=>!Mn(Q,g==null)).flatMap(Q=>_?(Q.parts??[]).map(At):h?[At(Q.a)]:[At(Q.a),At(Q.b)]);return Math.max(0,...O.map(Q=>Math.abs(Q-g)))},[e,g,_,h]),B=o.useMemo(()=>{const O=g!=null?v:k;return c??(d?O>0?O:10:Math.ceil(O/10)*10||10)},[k,v,g,c,d]),y=u,w=_?b?Math.max(1,m.length):1:h?1:2,A={"--bar-width":`${o.useMemo(()=>{const O=Math.max(1,e.length);return Math.max(2,Math.min(s,Math.round(120/(O*w)+6)))},[e.length,w,s])}px`},E={"--bar-group-gap":`${Math.max(0,i)}px`},D=o.useMemo(()=>{const O=Math.round(B/2);return g!=null?[g+B,...O!==B?[g+O]:[],g,...O!==B?[g-O]:[],g-B]:O!==B?[B,O,0]:[B,0]},[B,g]),N=O=>g!=null?1-(O-(g-B))/(2*B):1-O/B,[F,R]=o.useState(null),K=o.useCallback(()=>R(null),[]),L=o.useCallback((O,Q)=>{const P=[O.label,O.sublabel].filter(Boolean).join(" ");let V;if(_&&b&&O.rawPartsB)V=(p??[]).map((W,G)=>{const S=O.rawPartsB[G]??0;return{text:S>0?`${W}: ${Q[G]??0}% (${O.rawParts?.[G]??0}/${S})`:`${W}: -`,color:(m??[])[G]}});else if(_&&b)V=(p??[]).map((W,G)=>({text:`${W}: ${J(Q[G]??0)}`,color:(m??[])[G]}));else if(_){const W=(p??[]).map((S,M)=>({text:`${S}: ${Q[M]??0}`,color:(m??[])[M]})),G=W.filter((S,M)=>(Q[M]??0)>0);V=G.length?G:W}else C&&!h?V=[{text:`${r} ${At(O.a)}%`,color:t},{text:`${l} ${At(O.b)}%`,color:a}]:C&&O.rawB!==void 0?V=[{text:`${C.total} ${O.rawB}`},{text:`${C.done} ${O.rawA??0}`,color:t}]:h?V=[{text:`${r}: ${At(O.a)}`,color:t}]:V=[{text:`${r}: ${At(O.a)}`,color:t},{text:`${l}: ${At(O.b)}`,color:a}];return{title:P,items:V}},[_,b,p,m,C,h,r,l,t,a,g]),$=o.useCallback((O,Q,P)=>{const V=O.getBoundingClientRect(),{title:W,items:G}=L(Q,P);R({rect:{left:V.left,top:V.top,right:V.right,bottom:V.bottom,width:V.width,height:V.height},title:W,items:G})},[L]),T=o.useCallback((O,Q)=>{const{title:P,items:V}=L(O,Q);return[P,...V.map(W=>W.text)].filter(Boolean).join(", ")},[L]),J=O=>g!=null&&O>g?`+${O}`:`${O}`,q=F!=null;return o.useEffect(()=>{if(!q)return;const O=()=>R(null),Q=P=>{const V=P.target;V&&typeof V.closest=="function"&&V.closest(".manager-bar-chart-col")||R(null)};return window.addEventListener("scroll",O,!0),document.addEventListener("pointerdown",Q,!0),()=>{window.removeEventListener("scroll",O,!0),document.removeEventListener("pointerdown",Q,!0)}},[q]),n.jsxs("div",{className:"manager-bar-chart-wrap",style:E,children:[n.jsx("div",{className:"manager-bar-chart-inner",children:n.jsx("div",{className:"manager-bar-chart-scroll",children:n.jsxs("div",{className:"manager-bar-chart-area",children:[n.jsxs("div",{className:"manager-bar-chart-plot",style:{height:y},children:[D.slice(0,-1).map((O,Q)=>n.jsx("div",{className:`manager-bar-chart-gridline${g!=null&&O===g?" manager-bar-chart-gridline--baseline":""}`,style:{top:N(O)*y},children:n.jsx("span",{className:"manager-bar-chart-gridline__label caption-1",children:O})},Q)),e.map((O,Q)=>{const P=Mn(O,g==null),V=y/2,W=I=>g!=null?Math.min(V,Math.abs(At(I)-g)/B*V):Math.min(y,Math.max(0,At(I)/B*y)),G=P?0:W(O.a),S=P?0:W(O.b),M=(O.parts??[]).map(At);return n.jsx("div",{className:`manager-bar-chart-col${b&&_?" manager-bar-chart-col--group":""}`,style:{cursor:P?"default":"pointer"},tabIndex:f&&!P?0:void 0,role:f&&!P?"img":void 0,"aria-label":f&&!P?T(O,M):void 0,onMouseEnter:P?void 0:I=>$(I.currentTarget,O,M),onFocus:P||!f?void 0:I=>$(I.currentTarget,O,M),onBlur:f?K:void 0,onMouseLeave:K,children:!P&&(_&&b?(m??[]).map((I,Z)=>{const le=M[Z]??0;if(g==null)return n.jsx("div",{className:"manager-bar-chart-bar",style:{...A,height:W(le),background:I}},Z);const oe=At(le)<g;return n.jsxs("div",{className:"manager-bar-chart-slot",style:A,children:[n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--up",children:!oe&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full",style:{height:W(le),background:I}})}),n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--down",children:oe&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full manager-bar-chart-bar--down",style:{height:W(le),background:I}})})]},Z)}):_?n.jsx("div",{className:"manager-bar-chart-stack",style:A,children:(()=>{const I=M.reduce((le,oe,de)=>oe>0?de:le,-1);let Z=y;return M.map((le,oe)=>{if(le<=0)return null;const de=Math.min(Z,le/B*y);return Z-=de,n.jsx("div",{className:"manager-bar-chart-stack-segment",style:{height:de,background:(m??[])[oe],borderRadius:oe===I?"6px 6px 0 0":void 0}},oe)})})()}):g!=null?n.jsx(n.Fragment,{children:[{v:At(O.a),c:t},...h?[]:[{v:At(O.b),c:a}]].map(({v:I,c:Z},le)=>n.jsxs("div",{className:"manager-bar-chart-slot",style:A,children:[n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--up",children:I>=g&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full",style:{height:W(I),background:Z}})}),n.jsx("div",{className:"manager-bar-chart-slot__half manager-bar-chart-slot__half--down",children:I<g&&n.jsx("div",{className:"manager-bar-chart-bar manager-bar-chart-bar--full manager-bar-chart-bar--down",style:{height:W(I),background:Z}})})]},le))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"manager-bar-chart-bar",style:{...A,height:G,background:t}}),!h&&n.jsx("div",{className:"manager-bar-chart-bar",style:{...A,height:S,background:a}})]}))},Q)})]}),n.jsx("div",{className:"manager-bar-chart-x-axis",children:e.map((O,Q)=>{const P=Mn(O,g==null);return n.jsxs("span",{className:`manager-bar-chart-x-axis__label${P?" manager-bar-chart-x-axis__label--future":""}`,children:[n.jsxs("span",{className:"caption-1 manager-bar-chart-x-axis__main",children:[O.isToday&&n.jsx("span",{className:"manager-bar-chart-x-axis__today-dot",style:{background:t}}),O.label]}),O.sublabel&&n.jsx("span",{className:"caption-1",children:O.sublabel})]},Q)})})]})})}),F&&n.jsx(Kn,{anchorRect:F.rect,title:F.title,items:F.items,showIndex:!1,closeOnOutsideClick:!1})]})}function Eu({control:e}){const{t}=_e.useTranslation(),{activeOptions:a,activeIdx:r,range:l,setRange:s,handlePrev:i,handleNext:u,periodOptions:c,period:d,setPeriod:m}=e,p=d==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),C=d==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:"manager-section-controls",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",icon:"chevron-left",ariaLabel:p,showTooltipInfo:p,disabled:r===a.length-1,onClick:i}),n.jsx(fn,{value:l,onChange:s,options:a,size:40,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",icon:"chevron-right",ariaLabel:C,showTooltipInfo:C,disabled:r<=0,onClick:u}),n.jsx(wn,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:d,onChange:b=>m(b),size:40})]})}function Wo(e,t,a,r=!0){const l=new Date(a.getFullYear(),a.getMonth(),a.getDate());return Array.from({length:7},(s,i)=>{const u=new Date(t);u.setDate(t.getDate()+i);const c=(e[Oo(u)]?.daily??[])[u.getDate()-1],d=c!=null&&Mn(c,r)||u>l;return{dt:u,entry:c,isFuture:d}})}function jv(e,t,a,r=!0){const{period:l,monthRange:s,weekRange:i,weekRanges:u,DOW:c}=t,d=la(),m=d.getFullYear(),p=d.getMonth()+1,C=d.getDate();if(l==="month"){const f=e[s]??{weekly:[],daily:[]},h=ma(s),_=h?h.year:null,g=h?h.month1:null,k=_&&g?Bn(_,g-1):1;return f.weekly.map((v,B)=>{const y=B+1;let w=v.label,A=!1,E=!1;if(_&&g){const D=k+B*7,N=new Date(_,g-1,D+6),F=N.getMonth()+1,R=N.getDate(),K=F===g?`${R}`:`${F}/${R}`;w=a("manager.chart.weekRange",{start:D,end:K});const L=new Date(m,p-1,C).getTime();A=L>=new Date(_,g-1,D).getTime()&&L<=N.getTime(),E=_>m||_===m&&(g>p||g===p&&D>C)}return{...v,label:w,sublabel:Au(a,y-1),isToday:A,future:v.future===!0||E||void 0,a:E?-1:v.a,b:E?0:v.b}})}const b=u.find(f=>f.value===i);if(!b)return[];const x=new Date(b.year,b.month-1,Bn(b.year,b.month-1)+b.week*7);return Wo(e,x,d,r).map(({dt:f,entry:h,isFuture:_})=>{const g=f.getMonth()+1,k=f.getDate(),v=f.getFullYear();return{label:g===b.month&&v===b.year?`${k}`:`${g}/${k}`,sublabel:c[f.getDay()]??"",future:_||void 0,a:_?-1:h&&h.a>0?h.a:0,b:_?0:h&&h.b>0?h.b:0,isToday:v===m&&g===p&&k===C,...h?.parts?{parts:_?h.parts.map(()=>0):h.parts}:{},...h?.partsB?{partsB:_?h.partsB.map(()=>0):h.partsB}:{}}})}const Tv={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function Mv({focusableBars:e,size:t="medium",barWidth:a,titleKey:r,titleLevel:l,data:s,colorA:i,colorB:u,labelAKey:c,labelBKey:d,showTotal:m=!1,totalUnitKey:p,totalLabelKey:C,control:b,hideControls:x=!1,rate:f=!1,rateAgg:h="dayMean",tightMax:_=!1,avgMode:g=!1,totalFormat:k,series:v,seriesMode:B="stack",loading:y=!1,onDetail:w,headExtra:A,headSegment:E,icon:D,disc:N,onClick:F,cardAriaLabel:R,cardTooltip:K,detailSize:L=32,barGap:$,baseline:T,className:J,inGrid:q=!1}){const{t:O}=_e.useTranslation(),Q=Tv[t],P=Nu(s),V=b??P,W=o.useMemo(()=>jv(s,V,O,T==null),[s,V,O,T]),G=B==="group"&&!!v&&v.length>0;$!=null&&!G&&Mt("bar-chart-bargap-without-group","[BarChart] barGap \uC740 seriesMode='group' + series \uC5D0\uC11C\uB9CC \uC4F0\uC778\uB2E4 \u2014 \uADF8 \uBC16\uC5D0\uC11C\uB294 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4.");const S=o.useMemo(()=>{if(!f)return W;const re=V.period==="month"?ma(V.monthRange):null,z=la(),ne=v?.length??0,H=U=>{const pe=[],Ee=[],ge=[];for(let me=0;me<ne;me++){let ie=0,be=0,he=0;for(const ue of U){const Me=At(ue.a[me]),Ve=At(ue.b[me]);Ve<=0||(ie+=Me,be+=Ve,he+=Me/Ve*100)}pe.push(h==="weighted"?be>0?Math.round(ie/be*100):0:U.length?Math.round(he/U.length):0),Ee.push(ie),ge.push(be)}return{pct:pe,ra:Ee,rb:ge}};return W.map((U,pe)=>{let Ee=U.a===-1?-1:U.b>0?Math.round(U.a/U.b*100):0;if(re&&!Mn(U)){const me=re.year,ie=re.month1-1,be=Wo(s,new Date(me,ie,Bn(me,ie)+pe*7),z).filter(he=>!he.isFuture);if(h==="weighted"){let he=0,ue=0;for(const{entry:Me}of be)Me&&Me.b>0&&(he+=Me.a,ue+=Me.b);Ee=ue>0?Math.round(he/ue*100):0}else Ee=be.length?Math.round(be.reduce((he,{entry:ue})=>he+(ue&&ue.b>0?ue.a/ue.b*100:0),0)/be.length):0}let ge=null;if(G&&!Mn(U)){let me;if(re){const be=re.year,he=re.month1-1;me=Wo(s,new Date(be,he,Bn(be,he)+pe*7),z).filter(ue=>!ue.isFuture).map(({entry:ue})=>({a:ue?.parts??[],b:ue?.partsB??[]}))}else me=[{a:U.parts??[],b:U.partsB??[]}];const ie=H(me);ge={parts:ie.pct,rawParts:ie.ra,rawPartsB:ie.rb}}return{...U,a:Ee,b:U.a===-1?0:d&&U.parts&&U.parts[1]>0?Math.round(U.parts[0]/U.parts[1]*100):0,rawA:U.a===-1?-1:U.a,rawB:U.b,...ge??{}}})},[W,f,h,d,V.period,V.monthRange,s,G,v?.length]),M=o.useMemo(()=>{if(f||g){const z=(V.period==="week"?W:s[V.monthRange]?.daily??[]).filter(H=>H.a!==-1);if(z.length===0)return 0;if(f&&h==="weighted"){let H=0,U=0;for(const pe of z)pe.b>0&&(H+=pe.a,U+=pe.b);return U>0?Math.round(H/U*100):0}const ne=f?z.reduce((H,U)=>H+(U.b>0?U.a/U.b*100:0),0):z.reduce((H,U)=>H+(U.a>0?U.a:0),0);return Math.round(ne/z.length)}const re=V.period==="month"?s[V.monthRange]?.daily??[]:S;return T!=null?re.reduce((z,ne)=>z+(Mn(ne,!1)?0:At(ne.a)+(d?At(ne.b):0)),0):re.reduce((z,ne)=>z+(ne.a>0?ne.a:0)+(d&&ne.b>0?ne.b:0),0)},[S,W,f,h,g,T,d,V.period,V.monthRange,s]),I=v&&v.length>0?v.map(re=>({color:re.color,label:re.label})):[{color:i,label:O(c)},...d?[{color:u,label:O(d)}]:[]],Z=t==="small",le=[Z?"manager-section--compact":t==="large"?"manager-section--full":void 0,J].filter(Boolean).join(" ")||void 0,oe=r?O(r):"",de=oe?O("trainingStatus.detailFor",{name:oe,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):O("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Fo,{className:le,inGrid:q,icon:D,disc:N,onClick:F,ariaLabel:R,tooltip:K,headSegment:E,headMenuItems:w?[{label:de,icon:"list",onClick:w,closeOnSelect:!0}]:void 0,title:O(r),titleLevel:l,titleClassName:Z?"h5 chart-section-title--small":void 0,headRight:Z?A??void 0:({collapsed:re})=>n.jsxs(n.Fragment,{children:[!x&&n.jsx(Eu,{control:V}),A,w&&!re&&n.jsx("span",{className:"manager-bar-chart-detail-btn",children:n.jsx(fe,{htmlType:"button",size:L,type:"dot",icon:"list",ariaLabel:de,showTooltipInfo:de,onClick:w})})]}),subRow:n.jsxs(n.Fragment,{children:[m?f||g||C&&k?n.jsx(Ya,{label:Z?void 0:`${O(V.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${O(C??c)}`,children:k?(k(M).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((re,z)=>/\d/.test(re)?n.jsx("span",{className:"barchart-total__num h0",children:re},z):n.jsx("span",{className:"barchart-total__unit h5",children:re},z)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"barchart-total__num h0",children:M}),p&&n.jsx("span",{className:"barchart-total__unit h5",children:O(p)})]})}):n.jsxs(Ya,{children:[n.jsx("span",{className:"barchart-total__num h0",children:M}),n.jsx("span",{className:"barchart-total__unit h5",children:O(c)}),p&&n.jsx("span",{className:"barchart-total__unit h5",children:O(p)})]}):n.jsx("span",{}),n.jsx(Io,{items:I,className:"caption-1"})]}),children:y?n.jsx("div",{className:"manager-bar-chart-wrap manager-bar-chart-loading","aria-busy":"true",children:n.jsx("div",{className:"manager-bar-chart-inner",children:n.jsxs("div",{className:"manager-bar-chart-area manager-bar-chart-area--loading",children:[n.jsx("div",{className:"manager-bar-chart-plot manager-bar-chart-plot--loading",style:{height:Q.height},children:n.jsx(Ga,{size:32})}),n.jsx("div",{className:"manager-bar-chart-x-axis","aria-hidden":"true",children:n.jsxs("span",{className:"manager-bar-chart-x-axis__label",children:[n.jsx("span",{className:"caption-1 manager-bar-chart-x-axis__main",children:"\xA0"}),S.some(re=>!!re.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(Sv,{focusableBars:e,data:S,colorA:i,colorB:d?u:void 0,labelA:O(c),labelB:d?O(d):void 0,barWidth:a??Q.barWidth,barGap:$,baseline:T,height:Q.height,maxOverride:f?100:void 0,tightMax:_,seriesColors:v?.map(re=>re.color),seriesLabels:v?.map(re=>re.label),rateLabels:f?{total:O("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:O("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:G})})}const Du=120,Lv={left:38,right:16,top:26,bottom:24};function $v({points:e=[],range:t,ticks:a=[],axisTitle:r,color:l,height:s=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:d,className:m}){const[p,C]=o.useState(null),[b,x]=o.useState(null);o.useEffect(()=>{if(!b)return;const T=q=>C(Math.round(q)||null);if(T(b.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const J=new ResizeObserver(([q])=>T(q.contentRect.width));return J.observe(b),()=>{J.disconnect()}},[b]);const{payload:f,anchorRect:h,openAfterDelay:_,close:g}=Sy(Du),k=o.useCallback((T,J)=>{T&&_(T,J.getBoundingClientRect())},[_]),v=p??i,B=s,{left:y,right:w,top:A,bottom:E}={...Lv,...u},[D,N]=t,F=T=>N===D?y:y+(v-y-w)*(T-D)/(N-D),R=T=>A+(B-A-E)*(100-T)/100,K={x:F,y:R,plot:{left:y,right:v-w,top:A,bottom:B-E,width:Math.max(0,v-y-w),height:Math.max(0,B-A-E)}},L=e.filter(T=>!T.hollow),$=l??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:x,className:we("line-chart",m),viewBox:`0 0 ${v} ${B}`,role:"img","aria-label":d??e.map(T=>T.description).filter(Boolean).join(", "),children:[r&&n.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:r}),[0,100].map(T=>n.jsxs("g",{children:[n.jsx("line",{className:"line-chart__grid",x1:y,x2:v-w,y1:R(T),y2:R(T)}),n.jsxs("text",{className:"line-chart__tick",x:y-6,y:R(T)+4,textAnchor:"end",children:[T,"%"]})]},T)),c?.(K),a.map(T=>n.jsx("text",{className:"line-chart__tick",x:F(T.x),y:B-5,textAnchor:"middle",children:T.label},T.x)),L.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:$,points:L.map(T=>`${F(T.x)},${R(T.pct)}`).join(" ")}),e.map(T=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:J=>k(T.description,J.currentTarget),onPointerLeave:g,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:F(T.x),cy:R(T.pct),r:12}),n.jsx("circle",{className:we("line-chart__dot-main",T.hollow&&"is-hollow"),cx:F(T.x),cy:R(T.pct),r:4,stroke:$,fill:T.hollow?void 0:$})]},T.x))]}),f!=null&&n.jsx(vn,{anchorRect:h,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:f,children:f})]})}function Rv({icon:e,iconSize:t=56,title:a,titleClass:r="h2",description:l,tipGroups:s,start:i,className:u}){return n.jsxs("div",{className:we("game-intro",u),children:[e!=null&&n.jsx("span",{className:"game-intro__icon","aria-hidden":"true",style:{"--game-intro-icon":`${t}px`},children:e}),n.jsx("h2",{className:we("game-intro__title",r),children:a}),l!=null&&n.jsx("p",{className:"game-intro__description body-3",children:l}),s?.map((c,d)=>n.jsxs("div",{className:"game-intro__tips",children:[c.title!=null&&n.jsx("span",{className:"game-intro__tips-title body-3",children:c.title}),c.tips.map((m,p)=>n.jsxs("span",{className:"game-intro__tip body-3",children:[m.icon!=null&&n.jsx("span",{"aria-hidden":"true",children:m.icon}),n.jsx("span",{children:m.text})]},p))]},d)),i&&n.jsx(fe,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const Su=(e,t,a)=>{const r=new Date(Date.UTC(e,t,a));return`${r.getUTCFullYear()}-${String(r.getUTCMonth()+1).padStart(2,"0")}-${String(r.getUTCDate()).padStart(2,"0")}`},ju=(e,t,a,r)=>({from:zl(e,t,a),to:new Date(zl(e,t,a+r).getTime()-1),fromYmd:Su(e,t,a),toYmd:Su(e,t,a+r-1)});function Pv(e,t=0){if(e.period==="month"){const l=ma(e.monthRange),s=la(),i=l?l.year:s.getFullYear(),u=(l?l.month1:s.getMonth()+1)-1+t,c=new Date(Date.UTC(i,u+1,0)).getUTCDate();return ju(i,u,1,c)}const a=e.weekRanges.find(l=>l.value===e.weekRange);if(!a){const l=new Date,s=La();return{from:l,to:l,fromYmd:s,toYmd:s}}const r=Bn(a.year,a.month-1);return ju(a.year,a.month-1,r+(a.week+t)*7,7)}const Ho={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function Tu(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Mu({done:e,total:t,segments:a,color:r="var(--color-main)",size:l="medium",strokeWidth:s,label:i="%",hideCenter:u=!1,hideLabel:c=!1}){const d=typeof l=="number"?l:Ho[l].diameter,m=s??(typeof l=="number"?12:Ho[l].strokeWidth),p=d/2,C=(d-m)/2,b=2*Math.PI*C;if(a&&a.length>0){const _=a.reduce((g,k)=>{const v=g.length>0?g[g.length-1].acc:0,B=Number.isFinite(k.ratio)?k.ratio:0,y=Math.max(0,Math.min(B,1-v));return g.push({color:k.color,rotate:-90+v*360,dash:b*y,acc:v+y}),g},[]);return n.jsx("div",{className:"ring-chart",style:{width:d,height:d},children:n.jsxs("svg",{width:d,height:d,viewBox:`0 0 ${d} ${d}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:p,cy:p,r:C,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:m}),_.map((g,k)=>g.dash>0&&n.jsx("circle",{cx:p,cy:p,r:C,fill:"none",stroke:g.color,strokeWidth:m,strokeDasharray:`${g.dash} ${b}`,strokeLinecap:"round",transform:`rotate(${g.rotate} ${p} ${p})`},k))]})})}const x=(t??0)>0?Math.min((e??0)/t,1):0,f=b*x,h=b-f;return n.jsxs("div",{className:"ring-chart",style:{width:d,height:d},children:[n.jsxs("svg",{width:d,height:d,viewBox:`0 0 ${d} ${d}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:p,cy:p,r:C,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:m}),x>0&&n.jsx("circle",{cx:p,cy:p,r:C,fill:"none",stroke:r,strokeWidth:m,strokeDasharray:`${f} ${h}`,strokeLinecap:x<.02||x>.98?"butt":"round",transform:`rotate(-90 ${p} ${p})`})]}),!u&&n.jsxs("div",{className:`ring-chart__center${c?"":` ${d<=96?"ring-chart__center--small":l==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${d<=96?"h2":"h1"}`,children:Tu(x)}),!c&&n.jsx("span",{className:`ring-chart__label ${d<=96?"caption-2":"caption-1"}${d<=96||l==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function Iv({titleKey:e,titleLevel:t,headRight:a,icon:r,showTotal:l,totalLabelKey:s,legend:i,loading:u,className:c,inGrid:d=!1,onClick:m,ariaLabel:p,tooltip:C,...b}){const{t:x}=_e.useTranslation();if(!e)return n.jsx(Mu,{...b});const f=(b.total??0)>0?Tu(Math.min((b.done??0)/b.total,1)):0,h=b.size==="small",_=typeof b.size=="number"?b.size:Ho[b.size??"medium"].diameter,g=b.size==="large",k=[c,h?"manager-section--compact":g?"manager-section--full":""].filter(Boolean).join(" ")||void 0,v=r&&n.jsx("span",{className:"chart-section-icon",children:n.jsx(tt,{icon:r,className:"chart-section-icon-inner"})});return n.jsx(Fo,{className:k,inGrid:d,onClick:m,ariaLabel:p,tooltip:C,title:x(e),titleLevel:t,titleClassName:h?"h5 chart-section-title--small":void 0,headRight:v||(h?void 0:a),subRow:(l||i)&&n.jsxs(n.Fragment,{children:[l?n.jsxs(Ya,{label:!h&&s?x(s):void 0,children:[n.jsx("span",{className:"barchart-total__num h0",children:f}),n.jsx("span",{className:"barchart-total__unit h5",children:"%"})]}):n.jsx("span",{}),i&&n.jsx(Io,{items:i})]}),children:u?n.jsx("div",{className:"ring-chart-section-body ring-chart-section-body--offset",children:n.jsx("div",{className:"ring-chart ring-chart--loading",style:{width:_,height:_},"aria-busy":"true",children:n.jsx(Ga,{size:32})})}):n.jsx("div",{className:"ring-chart-section-body ring-chart-section-body--offset",children:n.jsx(Mu,{...b,hideCenter:b.hideCenter??h})})})}function Fv({label:e,value:t,change:a,changeType:r,icon:l,tooltip:s,onClick:i,children:u}){const c=o.useRef(null),{anchorRect:d,openAt:m,close:p}=Pa(),C=o.useCallback(()=>{s&&c.current&&m(c.current)},[s,m]),b=r??(a===void 0?void 0:a>0?"up":a<0?"down":"neutral"),x=a===void 0?void 0:a>0?`+${a}`:`${a}`,f=o.useCallback(h=>{i&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),i())},[i]);return n.jsxs("div",{ref:c,className:`manager-stat-card${i?" manager-stat-card--clickable":""}`,onClick:i,onKeyDown:i?f:void 0,onPointerEnter:C,onPointerLeave:p,onFocus:C,onBlur:p,role:i?"button":void 0,tabIndex:i?0:void 0,"aria-label":i?[e,t,x].filter(h=>h!==void 0&&h!=="").join(" "):void 0,children:[s&&d&&n.jsx(Dn,{anchorRect:{left:d.left,top:d.top+21,right:d.right,bottom:d.bottom,width:d.width,height:d.height},text:s}),n.jsxs("div",{className:"manager-stat-card__label-row",children:[n.jsx("span",{className:"manager-stat-card__label h5",children:e}),l&&n.jsx("span",{className:"manager-stat-card__icon",children:n.jsx(tt,{icon:l,className:"manager-stat-card__icon-inner"})})]}),n.jsxs("div",{className:"manager-stat-card__content",children:[n.jsxs("div",{className:"manager-stat-card__left",children:[n.jsx("div",{className:"manager-stat-card__value h2",children:t}),x&&n.jsx("div",{className:`manager-stat-card__change manager-stat-card__change--${b??"neutral"} caption-1`,children:x})]}),u&&n.jsx("div",{className:"manager-stat-card__body",children:u})]})]})}function Lu({value:e,onChange:t,min:a=0,max:r=100,step:l=1,orientation:s="horizontal",size:i=24,disabled:u=!1,ariaLabel:c,length:d,className:m,label:p,formatValue:C,labelPos:b,labelAlign:x="right",showMinMax:f=!1,minLabel:h,maxLabel:_,showBgTick:g=!1,showFillTick:k=!1,tickStep:v,tickShape:B="dot"}){t&&!c&&Mt("Slider:unnamed","[ihab/Slider] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. label prop \uC740 \uAC12 \uD45C\uAE30 \uBC29\uC2DD\uC774\uC9C0 \uC774\uB984\uC774 \uC544\uB2D9\uB2C8\uB2E4.");const y=Math.min(r,Math.max(a,e)),w=r>a?(y-a)/(r-a):0,A=s==="vertical",E=!t,D=W=>t?.(Number(W.target.value)),N=typeof d=="number"?`${d}px`:d,F={"--slider-ratio":String(w),"--slider-thumb":`${i}px`,...N?A?{height:N}:{width:N}:{}},R=v??l,K=(g||k)&&R>0&&r>a?Math.floor((r-a)/R+1e-6):0;if(K>0&&K<=100){const W=B!=="dash",G=le=>W?`radial-gradient(circle, ${le} 0.5px, transparent 1px)`:A?`linear-gradient(to bottom, transparent calc(50% - 2px), ${le} calc(50% - 2px), ${le} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${le} calc(50% - 2px), ${le} calc(50% + 2px), transparent calc(50% + 2px))`,S=W?"2px":"4px",M=[],I=[],Z=[];for(let le=0;le<=K;le++){const oe=le*R/(r-a);if(oe>1+1e-6)break;const de=`${((A?1-oe:oe)*100).toFixed(4)}%`,re=oe<=w+1e-6;if(re?!k:!g)continue;const z=re?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";M.push(G(z)),I.push(A?`${S} var(--slider-thumb)`:`var(--slider-thumb) ${S}`),Z.push(A?`center ${de}`:`${de} center`)}M.push(A?"linear-gradient(to top, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))":"linear-gradient(to right, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))"),I.push("100% 100%"),Z.push("0 0"),F.backgroundImage=M.join(", "),F.backgroundSize=I.join(", "),F.backgroundPosition=Z.join(", "),F.backgroundRepeat="no-repeat"}const L=C?C(y):p==="percent"?`${Math.round(r>a?(y-a)/(r-a)*100:0)}%`:p==="count"?`${y} / ${r}`:y===a&&h?h:y===r&&_?_:void 0,$=n.jsx("input",{type:"range",className:we("slider",`slider--${s}`,E&&"slider--static",!p&&!f&&m),min:a,max:r,step:l,value:y,disabled:u,readOnly:E,tabIndex:E?-1:void 0,"aria-label":c,"aria-valuetext":L,"aria-orientation":s,onChange:D,style:F});if(!p&&!f)return $;const T=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:h??a}),J=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:_??r}),q=f?n.jsxs("div",{className:we("slider-track-group",`slider-track-group--${s}`,!p&&m),children:[A?J:T,$,A?T:J]}):$;if(!p)return q;const O=b??(A?"bottom":"right"),Q=`${Math.round(r>a?(y-a)/(r-a)*100:0)}%`,P=C?C(y):p==="percent"?Q:p==="count"?`${y} / ${r}`:String(y),V=n.jsx("span",{className:"slider-wrap__value body-3b",children:P});return n.jsxs("div",{className:we("slider-wrap",`slider-wrap--${s}`,`slider-wrap--label-${O}`,`slider-wrap--align-${x}`,m),children:[q,V]})}const Ov=.86,zv=250,Vo=(e,t,a,r)=>Math.round(Math.min(r,Math.max(a,e-t))),qo=(e,t,a,r)=>{const l=Vo(e,t,a,r);return`${l<0?"-":"+"}${Math.abs(l)} dB`};function Uo({analyser:e,audioElement:t,orientation:a="horizontal",length:r,label:l,labelPos:s,labelAlign:i="right",floorDb:u=-60,refDb:c=-35,displayMin:d=-5,displayMax:m=25,className:p,ariaLabel:C}){const b=o.useRef(null),x=o.useRef(null),f=o.useRef(null),h=o.useRef(null),[_,g]=o.useState(null);o.useEffect(()=>{const y=$=>{const T=qo($,c,d,m);f.current&&(f.current.textContent=T);const J=b.current;J&&(J.setAttribute("aria-valuenow",String(Vo($,c,d,m))),J.setAttribute("aria-valuetext",T))},w=e??PC(t)??(_&&_.el===t?_.node:null),A=x.current;if(!w||!A){A?.style.setProperty("--meter-level","0"),y(u);let $=!1;return!e&&t&&er(t).then(T=>{!$&&T&&g({el:t,node:T})}),()=>{$=!0}}to();const E=new Float32Array(w.fftSize);let D=0,N=0,F=0,R=0,K=null;const L=$=>{const T=IC(w,E);D=T>D?T:D*Ov;const J=D>1e-5?20*Math.log10(D):-1/0,q=Math.max(u,J),O=q-c,Q=Math.min(1,Math.max(0,(O-d)/(m-d)));if(A.style.setProperty("--meter-level",Q.toFixed(3)),N+=q,F+=1,$-R>=zv){const P=N/F;K=K==null?P:K*.6+P*.4,y(K),N=0,F=0,R=$}h.current=requestAnimationFrame(L)};return h.current=requestAnimationFrame(L),()=>{h.current!=null&&cancelAnimationFrame(h.current),h.current=null}},[e,t,_,u,c,d,m]);const k=typeof r=="number"?`${r}px`:r,v=n.jsx("div",{className:"audio-meter__track",style:k?a==="vertical"?{height:k}:{width:k}:{},children:n.jsx("div",{ref:x,className:"audio-meter__fill"})}),B=s??(a==="vertical"?"bottom":"right");return n.jsxs("div",{ref:b,className:we("audio-meter",`audio-meter--${a}`,l&&`audio-meter--label-${B}`,l&&`audio-meter--align-${i}`,p),role:"meter","aria-label":C,"aria-valuemin":d,"aria-valuemax":m,"aria-valuenow":Vo(u,c,d,m),"aria-valuetext":qo(u,c,d,m),children:[v,l&&n.jsx("span",{ref:f,className:"audio-meter__value caption-2",children:qo(u,c,d,m)})]})}const $u=260;function Ru({message:e,position:t,duration:a,onClose:r}){const[l,s]=o.useState(!1),[i,u]=o.useState(!1),c=o.useRef(i),d=o.useRef(l);o.useEffect(()=>{c.current=i},[i]),o.useEffect(()=>{d.current=l},[l]);const m=o.useRef(null),p=o.useRef(""),C=o.useRef(r);o.useEffect(()=>{C.current=r});const b=a,x=o.useRef(null),f=o.useRef(0),h=o.useRef(0),_=o.useRef(!1),g=o.useRef(null),k=o.useRef(null),v=o.useRef(null),B=o.useRef(null),y=o.useRef(()=>{});y.current=E=>{E<0||(f.current=Date.now(),h.current=E,x.current=setTimeout(()=>{x.current=null,s(!1),g.current=setTimeout(()=>{u(!1);try{C.current()}catch{}},$u)},E))};const w=o.useCallback(()=>{_.current||!x.current||(_.current=!0,clearTimeout(x.current),x.current=null,h.current=Math.max(0,h.current-(Date.now()-f.current)))},[]),A=o.useCallback(()=>{_.current&&(_.current=!1,y.current(h.current))},[]);return o.useEffect(()=>{if(e!==p.current&&(x.current&&(clearTimeout(x.current),x.current=null),g.current&&(clearTimeout(g.current),g.current=null)),e){if(d.current)return b>0&&!x.current&&(_.current?h.current=b:y.current(b)),p.current=e,()=>{x.current&&(clearTimeout(x.current),x.current=null),g.current&&(clearTimeout(g.current),g.current=null)};const E=()=>{const D=m.current;if(D)try{D.classList.remove("is-visible"),D.style.transition="none",t==="top"?D.style.transform="translateX(-50%) translateY(-16px)":D.style.transform="translateX(-50%) translateY(16px)",D.style.opacity="0",D.offsetWidth,D.style.transition="",D.classList.add("is-visible"),B.current&&clearTimeout(B.current),B.current=setTimeout(()=>{B.current=null;try{D.style.opacity="",D.style.transform="",D.style.transition=""}catch{}},60)}catch{}};c.current?(E(),s(!0)):(u(!0),k.current=requestAnimationFrame(()=>{v.current=requestAnimationFrame(()=>{E(),s(!0)})})),b>0&&(_.current=!1,y.current(b))}else s(!1),g.current=setTimeout(()=>u(!1),$u);return p.current=e,()=>{x.current&&clearTimeout(x.current),g.current&&clearTimeout(g.current),k.current&&cancelAnimationFrame(k.current),v.current&&cancelAnimationFrame(v.current),B.current&&clearTimeout(B.current),x.current=null,g.current=null,k.current=null,v.current=null,B.current=null}},[e,b,t]),{mounted:i,showing:l,popupRef:m,pause:w,resume:A}}function ha({message:e="",position:t="top",type:a="normal",onClose:r=()=>{},duration:l=2e3}){const{mounted:s,showing:i,popupRef:u,pause:c,resume:d}=Ru({message:e,position:t,duration:l,onClose:r}),m=o.useRef(null),[p,C]=o.useState(!1);if(o.useEffect(()=>{i?C(!0):s||C(!1)},[i,s]),!s)return null;const b=a==="notice"||a==="warning"?a:"normal",x=n.jsx("div",{ref:u,className:`toast toast--${t} ${i?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:f=>{m.current=f.pointerType},onMouseEnter:()=>{m.current!=="touch"&&c()},onMouseLeave:d,onFocusCapture:c,onBlurCapture:d,children:n.jsx("div",{className:`toast__inner toast__inner--${b} body-2`,"aria-hidden":p||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?cn.createPortal(x,document.body):x}const Wv=24;function Hv({value:e,max:t=100,size:a=8,color:r,trackColor:l,label:s,formatValue:i,labelPos:u,labelAlign:c="right",ariaLabel:d,className:m}){const p=Number.isFinite(t)&&t>0?t:1,C=Math.max(0,Math.min(Number.isFinite(e)?e:0,p)),b=C/p*100,x=Number.isFinite(t)&&t>0?t:0,f=u??(a>=Wv?"inside":"bottom"),h=f==="center"?"inside":f,_=h==="inside"&&(c==="left"?b>=15:c==="center"?b>=50:b>=85),g={};return r&&(g["--progress-bar-fill"]=r),l&&(g["--progress-bar-track"]=l),n.jsxs("div",{className:we("progress-bar",`progress-bar--${a}`,`progress-bar--label-${h}`,s&&`progress-bar--align-${c}`,s&&_&&"progress-bar--label-on-fill",m),style:g,children:[n.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":C,"aria-valuemin":0,"aria-valuemax":x,"aria-valuetext":s?i?i(C):s==="percent"?void 0:s==="raw"?String(C):`${C} / ${x}`:void 0,"aria-label":d,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${b}%`}})}),s&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(C):s==="percent"?`${Math.round(b)}%`:s==="raw"?String(C):`${C} / ${x}`})]})}const Pu={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},Vv="rgba(255, 255, 255, 0.16)";function Iu({max:e,index:t,inactiveBg:a,inactiveColor:r,transparent:l,variant:s="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=_e.useTranslation(),d=Cn("(max-width: 767px)");if(!Number.isInteger(e)||e<=0)return null;const m=Number.isInteger(t)?Math.max(0,Math.min(t,e-1)):0,p=u??c("progress.steps",{current:m+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),C={};if(a&&(C["--pi-inactive-bg"]=a),r&&(C["--pi-inactive-color"]=r),l&&(a||(C["--pi-inactive-bg"]=Vv),r||(C["--pi-inactive-color"]="var(--color-white)")),s==="dot")return n.jsxs("div",{className:"progress-indicator progress-indicator--dot",style:C,role:i?"status":"img","aria-label":i?void 0:p,children:[i&&n.jsx("span",{style:Pu,children:p}),Array.from({length:e}).map((x,f)=>n.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${f<m?" done":f===m?" active":""}`},f))]});const b=i?n.jsx("span",{role:"status",style:Pu,children:p}):null;return d?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:C,role:"list","aria-label":p,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[m+1," / ",e]})}),b]}):n.jsxs(n.Fragment,{children:[b,n.jsx("div",{className:"progress-indicator",style:C,role:"list","aria-label":p,children:Array.from({length:e}).map((x,f)=>n.jsx("span",{role:"listitem","aria-current":f===m?"step":void 0,className:`progress-indicator-dot ${f<m?" done":f===m?" active":""} body-3`,children:f+1},f))})]})}function qv(e){if(!e)return[];const t=[];let a=0,r="";for(const l of e.trim()){if(l==="("?a++:l===")"&&a--,/\s/.test(l)&&a===0){r&&(t.push(r),r="");continue}r+=l}return r&&t.push(r),t}function Uv({children:e,className:t,style:a,rowLabel:r,onRowClick:l}){return n.jsx("div",{role:"cell",className:t?`table-cell ${t}`:"table-cell",style:a,children:r&&l?n.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":r,children:e}):e})}function Go({variant:e="default",children:t,className:a,draggable:r,onClick:l,onMouseEnter:s,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:d,colSpan:m,describedBy:p,rowHasButton:C}){const b=o.useCallback(x=>{l&&x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),l())},[l]);return e==="loading"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--loading",children:n.jsx("div",{role:"cell","aria-colspan":m,className:"table-row__full-cell",children:n.jsx(Ga,{size:28})})})}):e==="empty"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--empty body-3",children:n.jsx("div",{role:"cell","aria-colspan":m,className:"table-row__full-cell",children:t})})}):n.jsxs("div",{role:"presentation",className:"table-row-wrap",children:[n.jsx("div",{className:a?`table-row ${a}`:"table-row",draggable:r,onClick:l,onKeyDown:l?b:void 0,onMouseEnter:s,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:l&&!C?0:void 0,"aria-describedby":l&&!C?p:void 0,children:t}),d&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":m,className:"table-row-expand__cell",children:d})})]})}function Gv({dir:e}){return n.jsx(e==="asc"?Ys:Ks,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function Kv({children:e,onClick:t,className:a,sortDir:r,ariaSort:l,onResizeStart:s}){const i=n.jsxs(n.Fragment,{children:[e,r&&n.jsx(Gv,{dir:r})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":l,className:we("table-field body-3",a,r?"table-field--sorted":"",s?"table-field--resizable":""),children:[t?n.jsx("button",{type:"button",className:"table-field__button",children:i}):i,s&&n.jsx("span",{className:"table-field__resizer",onPointerDown:s,onClick:u=>u.stopPropagation(),"aria-hidden":"true"})]})}function Fu(e){return e&&e!=="left"?`table-col--${e}`:void 0}function Ko({fields:e=[],sort:t,sortable:a=!0,headerGroups:r,items:l=[],renderRow:s,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:d,onRowDragStart:m,onRowDragEnd:p,draggingId:C,gridTemplateColumns:b,mobileGridTemplateColumns:x,resizable:f=!0,resizeMode:h="grow",resizeStorageKey:_,size:g="small",title:k,icon:v,count:B,collapsed:y=!1,onToggleCollapse:w,headerActions:A,empty:E,loading:D,dragOver:N=!1,onDragOver:F,onDragLeave:R,onDrop:K,renderExpandedRow:L,expandedId:$}){const{t:T}=_e.useTranslation(),J=o.useId(),q=`table-title-${J}`,O=`table-row-hint-${J}`,[Q,P]=o.useState(null),V=o.useCallback((ae,ve)=>{const ze=e[ve];if(!ze)return;if(ze.sortValue)return ze.sortValue(ae);if(ze.sortKey)return ae[ze.sortKey];const Qe=s(ae)[ve]?.content;return typeof Qe=="string"||typeof Qe=="number"?Qe:void 0},[e,s]),W=!t&&a&&!e.some(ae=>ae.sortDir!==void 0||ae.onClick),G=o.useCallback(ae=>{const ve=e[ae];if(!ve||ve.sortable===!1)return!1;if(ve.sortValue||ve.sortKey)return!0;const ze=l[0];return ze!==void 0&&V(ze,ae)!==void 0},[e,l,V]),S=o.useMemo(()=>t?e.map(ae=>{if(!ae.sortKey||ae.sortDir!==void 0)return ae;const ve=t.field(String(ae.label??""),ae.sortKey);return{...ae,sortDir:ve.sortDir,onClick:ae.onClick??ve.onClick}}):W?e.map((ae,ve)=>G(ve)?{...ae,sortDir:Q?.index===ve?Q.asc?"asc":"desc":null,onClick:()=>P(ze=>ze?.index===ve?{index:ve,asc:!ze.asc}:{index:ve,asc:!0})}:ae):e,[e,t,W,Q,G]),M=o.useMemo(()=>{if(!W||!Q)return l;const{index:ae,asc:ve}=Q;return[...l].sort((ze,Qe)=>ur(V(ze,ae),V(Qe,ae),ve))},[l,W,Q,V]),I=Cn("(max-width: 767px)"),Z=x&&I?x:null,le=f&&!I,oe=o.useRef(le);oe.current=le;const de=48,re=40,z=o.useRef(()=>de),ne=_?`table-cols:${_}`:null,H=o.useRef(null),U=o.useRef(null),pe=o.useRef(null),Ee=o.useRef(null),[ge,me]=o.useState(!1),[ie,be]=o.useState(0),he=o.useCallback(()=>{const ae=pe.current;if(!ae)return;const ve=Ee.current,ze=H.current;if(ve&&(ve.style.minWidth="",ze)){const Qe=ze.scrollWidth,Ct=oe.current?re:0;ve.style.minWidth=Qe>ae.clientWidth+1?`${Qe+Ct}px`:""}me(ae.scrollWidth>ae.clientWidth+1),be(ae.clientWidth)},[]),ue=o.useCallback((ae,ve)=>{const ze=ae.current;ze&&U.current&&U.current.unobserve(ze),ae.current=ve,ve?(!U.current&&typeof ResizeObserver<"u"&&(U.current=new ResizeObserver(()=>he())),U.current?.observe(ve)):!pe.current&&!Ee.current&&(U.current?.disconnect(),U.current=null),he()},[he]),Me=o.useCallback(ae=>ue(pe,ae),[ue]),Ve=o.useCallback(ae=>ue(Ee,ae),[ue]);o.useEffect(()=>{he()}),o.useEffect(()=>{if(typeof window>"u")return;const ae=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>he()):null;return window.addEventListener("resize",he),()=>{ae!=null&&cancelAnimationFrame(ae),window.removeEventListener("resize",he)}},[he]);const Te=o.useRef(()=>!1),qe=o.useRef([]),Oe=o.useRef(null),ct=ae=>{if(!ae||typeof window>"u")return null;try{const ve=JSON.parse(window.localStorage.getItem(ae)??"null");return Array.isArray(ve)&&ve.length>0&&ve.every(ze=>typeof ze=="number"&&Number.isFinite(ze)&&ze>0)?ve:null}catch{return null}},[rt,nt]=o.useState(()=>ct(ne)),[mt,Ne]=o.useState(ne),[Ue,ke]=o.useState(()=>ct(ne)!==null);if(mt!==ne){Ne(ne);const ae=ct(ne);nt(ae),ke(ae!==null)}const He=o.useRef(rt);o.useEffect(()=>{He.current=rt},[rt]);const Be=o.useCallback(ae=>{const ve=Oe.current;if(!ve)return;const ze=He.current;if(ze){const Qe=[...ze],Ct=()=>de;if(ve.next!=null&&ve.startWNext!=null){const it=ae.clientX-ve.startX,It=Math.max(Ct()-ve.startW,Math.min(ve.startWNext-Ct(),it));Qe[ve.index]=ve.startW+It,Qe[ve.next]=ve.startWNext-It}else Qe[ve.index]=Math.max(Ct(),ve.startW+(ae.clientX-ve.startX));He.current=Qe,nt(Qe)}},[]),Se=o.useCallback(()=>{if(Oe.current=null,window.removeEventListener("pointermove",Be),window.removeEventListener("pointerup",Se),window.removeEventListener("pointercancel",Se),document.body.style.cursor="",document.body.style.userSelect="",ne&&He.current)try{window.localStorage.setItem(ne,JSON.stringify(He.current))}catch{}},[Be,ne]),Le=o.useCallback((ae,ve)=>{ve.preventDefault(),ve.stopPropagation();const ze=H.current;if(!ze)return;const Qe=Array.from(ze.children).map(it=>it.getBoundingClientRect().width),Ct=h==="fit"?S.findIndex((it,It)=>It>ae&&it.resizable!==!1):-1;Oe.current=Ct>=0?{index:ae,startX:ve.clientX,startW:Qe[ae],next:Ct,startWNext:Qe[Ct]}:{index:ae,startX:ve.clientX,startW:Qe[ae]},He.current=Qe,nt(Qe),ke(!0),window.addEventListener("pointermove",Be),window.addEventListener("pointerup",Se),window.addEventListener("pointercancel",Se),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[Be,Se,h,S]),Ze=o.useCallback(()=>{const ae=H.current,ve=ae?.closest(".table-wrap");if(!ae||!ve)return null;const ze=ve.style.getPropertyValue("--table-grid-cols");ve.style.setProperty("--table-grid-cols",S.map(()=>"max-content").join(" "));const Qe=Array.from(ve.querySelectorAll(".table-row")).filter(kt=>!kt.classList.contains("table-row--loading")&&!kt.classList.contains("table-row--empty")),Ct=S.map((kt,dt)=>{let pt=ae.children[dt]?.getBoundingClientRect().width??0;for(const Yt of Qe){const gn=Yt.children[dt];gn&&(pt=Math.max(pt,gn.getBoundingClientRect().width))}const vt=Te.current(dt)?parseFloat(qe.current[dt]):NaN;return Number.isFinite(vt)&&Math.ceil(pt)>vt&&Mt(`table-fixed-col-overflow:${dt}:${vt}`,`[ihabdevteam-core] Table \uC758 ${dt+1}\uBC88\uC9F8 \uC5F4\uC744 ${vt}px \uB85C \uC815\uD574 \uB450\uC5C8\uB294\uB370 \uC548\uC758 \uB0B4\uC6A9\uC740 ${Math.ceil(pt)}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(pt)}px \uC774\uC0C1\uC73C\uB85C \uB298\uB9AC\uC138\uC694.`),Number.isFinite(vt)?vt:Math.max(z.current(dt),Math.ceil(pt))}),it=window.getComputedStyle(ae),It=ae.clientWidth-(parseFloat(it.paddingLeft)||0)-(parseFloat(it.paddingRight)||0);ze?ve.style.setProperty("--table-grid-cols",ze):ve.style.removeProperty("--table-grid-cols");let Gt=Ct;const An=Ct.reduce((kt,dt,pt)=>kt+(Te.current(pt)?dt:0),0),Wt=Ct.reduce((kt,dt,pt)=>kt+(Te.current(pt)?0:dt),0),Kt=It-An;if(It>0&&Wt>0&&Kt>0){const kt=Kt/Wt;Gt=Ct.map((pt,vt)=>Te.current(vt)?pt:Math.max(z.current(vt),Math.round(pt*kt)));const dt=Math.round(Kt-Gt.reduce((pt,vt,Yt)=>pt+(Te.current(Yt)?0:vt),0));if(dt!==0){let pt=-1;Gt.forEach((vt,Yt)=>{!Te.current(Yt)&&(pt<0||vt>Gt[pt])&&(pt=Yt)}),pt>=0&&(Gt[pt]=Math.max(z.current(pt),Gt[pt]+dt))}}return Gt},[S,h]),_t=(ae,ve)=>ae!==null&&ae.length===ve.length&&ae.every((ze,Qe)=>ze===ve[Qe]),et=o.useRef(Ze);o.useEffect(()=>{et.current=Ze});const[Xe,Nt]=o.useState(0),gt=M.length>0,wt=`${ne??""}|${Xe}|${S.length}|${ie}`,Et=!Ue&&le&&ne!==null&&!D?`${wt}|${gt?1:0}`:null,ht=o.useRef(null);o.useEffect(()=>{if(Et===null||!gt||ht.current===wt)return;const ae=et.current();ae&&(ht.current=wt,nt(ve=>_t(ve,ae)?ve:ae))},[Et]);const st=o.useCallback(()=>{if(ne)try{window.localStorage.removeItem(ne)}catch{}ke(!1);const ae=et.current();nt(ae),He.current=ae,Nt(ve=>ve+1)},[ne]);o.useEffect(()=>()=>{Oe.current&&(window.removeEventListener("pointermove",Be),window.removeEventListener("pointerup",Se),window.removeEventListener("pointercancel",Se),document.body.style.cursor="",document.body.style.userSelect="")},[Be,Se]);const Pe=S.length>0&&S.every(ae=>ae.width!=null)?S.map(ae=>typeof ae.width=="number"?`${ae.width}px`:String(ae.width)).join(" "):null;S.some(ae=>ae.width!=null)&&!Pe&&Mt(`table-field-width:${S.map(ae=>ae.width==null?"-":"w").join("")}`,"[ihabdevteam-core] Table \uC758 fields \uC911 \uC77C\uBD80\uC5D0\uB9CC width \uAC00 \uC788\uC2B5\uB2C8\uB2E4. **\uBAA8\uB4E0 \uC5F4\uC5D0 \uC801\uC5B4\uC57C** \uC4F0\uC785\uB2C8\uB2E4 \u2014 \uC9C0\uAE08\uC740 gridTemplateColumns \uB97C \uC501\uB2C8\uB2E4. \uD55C \uC5F4\uB9CC \uACE0\uC815\uD558\uACE0 \uC2F6\uC73C\uBA74 \uB098\uBA38\uC9C0\uC5D0 `minmax(0, 1fr)` \uCC98\uB7FC \uC801\uC5B4 \uC8FC\uC138\uC694."),Pe&&b&&Mt("table-field-width-conflict","[ihabdevteam-core] Table \uC5D0 fields[].width \uC640 gridTemplateColumns \uAC00 \uB458 \uB2E4 \uC788\uC2B5\uB2C8\uB2E4. gridTemplateColumns \uAC00 \uC774\uAE41\uB2C8\uB2E4 \u2014 \uD55C\uCABD\uB9CC \uB450\uC138\uC694.");const bt=b??Pe??void 0,Bt=qv(bt),lt=Bt.filter(ae=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(ae));lt.length>0&&Mt(`table-content-track:${b}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${lt.join(", ")})\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uBA38\uB9AC\uC640 \uBAB8\uD1B5\uC740 \uC11C\uB85C \uB2E4\uB978 \uACA9\uC790\uB77C \uADF8 \uD2B8\uB799\uC774 \uAC01\uC790 \uB2E4\uB974\uAC8C \uD480\uB824 \uC5F4\uC774 \uC5B4\uAE0B\uB0A9\uB2C8\uB2E4. px \uC774\uB098 fr \uC744 \uC4F0\uC138\uC694. (\uBC1B\uC740 \uAC12: ${b})`);const Tt=S.findIndex(ae=>!!ae.sortDir);S.filter(ae=>!!ae.sortDir).length>1&&Mt("table-multi-sort","[ihabdevteam-core] Table \uC758 fields \uC5D0 sortDir \uC774 \uB458 \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4. aria-sort \uB294 \uD45C \uD558\uB098\uC5D0 \uD55C \uCE78\uB9CC \uAC00\uC9C8 \uC218 \uC788\uC5B4 \uCCAB \uCE78\uB9CC \uBC29\uD5A5\uC73C\uB85C \uC54C\uB9AC\uACE0 \uB098\uBA38\uC9C0\uB294 none \uC73C\uB85C \uB461\uB2C8\uB2E4.");const Ge=ae=>ae===Tt?S[ae].sortDir==="asc"?"ascending":"descending":S[ae].onClick?"none":void 0,yt=ae=>/^\d+(\.\d+)?px$/.test(Bt[ae]??""),Rt=ae=>{const ve=Bt[ae]??"",ze=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(ve)??/^(\d+(?:\.\d+)?)px$/.exec(ve);return ze?parseFloat(ze[1]):de};Te.current=yt,z.current=Rt,qe.current=Bt;const Re=ae=>h==="fit"&&!yt(ae)?"fr":"px",ot=rt&&rt.length===S.length&&!I,Dt=Z??(ot?S.map((ae,ve)=>ae.resizable===!1&&Bt[ve]?Bt[ve]:`${rt[ve]}${Re(ve)}`).join(" "):bt),Je=Dt?{"--table-grid-cols":Dt}:void 0,St=k!==void 0;return n.jsxs("div",{ref:Me,className:`table-wrap table-wrap--${g}${le?" table-wrap--resizable":""}${N?" table-wrap--dragover":""}${y?" table-wrap--collapsed":""}`,style:Je,onDragOver:F,onDragLeave:R,onDrop:K,tabIndex:ge?0:void 0,role:ge?"region":void 0,"aria-label":ge?typeof k=="string"?k:T("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:O,className:"table-row-hint",children:T("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:Ve,role:"table","aria-labelledby":St&&typeof k=="string"?q:void 0,className:"table body-2",children:[St&&n.jsxs("div",{className:we("table-header",w&&"table-header--clickable"),onClick:w,role:"caption",children:[w&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:y?"chevron-right":"chevron-down",ariaLabel:y?T("common.expand","\uD3BC\uCE58\uAE30"):T("common.collapse","\uC811\uAE30"),ariaExpanded:!y,className:"table-header__chevron"}),v&&n.jsx(tt,{icon:v,label:typeof k=="string"?k:void 0,className:"table-header__icon"}),n.jsx("span",{id:q,className:"table-header__title h5b",children:k}),B!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:B}),A&&n.jsx("span",{className:"table-header__actions",onClick:ae=>ae.stopPropagation(),children:A})]}),!y&&n.jsxs(n.Fragment,{children:[r&&r.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:r.map((ae,ve)=>n.jsx("div",{role:"columnheader","aria-colspan":ae.span,className:we("table-field body-3",ae.className),style:{gridColumn:`span ${ae.span}`},children:ae.label},ve))}),n.jsxs("div",{role:"presentation",className:we("table-fields-strip",le&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:H,children:S.map((ae,ve)=>n.jsx(Kv,{onClick:ae.onClick,className:we(ae.className,Fu(ae.align)),sortDir:ae.sortDir,ariaSort:Ge(ve),onResizeStart:le&&ve<S.length-1&&ae.resizable!==!1&&(h!=="fit"||S.some((ze,Qe)=>Qe>ve&&ze.resizable!==!1))?ze=>Le(ve,ze):void 0,children:ae.label},ve))}),le&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:T("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:T("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:st})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:D?n.jsx(Go,{variant:"loading",colSpan:S.length||void 0}):M.length===0&&E?n.jsx(Go,{variant:"empty",colSpan:S.length||void 0,children:E}):M.map((ae,ve)=>{const ze=C!=null&&ae.id===C,Qe=!!i&&(u?u(ae):!0),Ct=$!=null&&ae.id!=null&&($ instanceof Set?$.has(ae.id)||[...$].some(it=>String(it)===String(ae.id)):String(ae.id)===String($));return n.jsx(Go,{className:`${Qe?" table-row--clickable":""}${m?" table-row--draggable":""}${ze?" table-row--dragging":""}`.trim(),draggable:!!m,onClick:Qe?()=>i(ae):void 0,colSpan:S.length||void 0,rowHasButton:s(ae).some(it=>!!it.rowLabel),describedBy:O,onMouseEnter:c?it=>c(ae,it):void 0,onMouseLeave:d?it=>d(ae,it):void 0,onDragStart:m?it=>m(ae,it):void 0,onDragEnd:p?it=>p(ae,it):void 0,expandedContent:Ct&&L?L(ae):void 0,children:s(ae).map((it,It)=>n.jsx(Uv,{className:we(it.className,Fu(S[It]?.align)),style:it.style,rowLabel:Qe?it.rowLabel:void 0,onRowClick:Qe?()=>i(ae):void 0,children:it.content},It))},ae.id!=null?`${typeof ae.id}:${ae.id}`:`__idx:${ve}`)})})]})]})]})}const Yv={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function Ou(e){return e?Yv[e]??null:null}function zu(e){switch(Ou(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Wu(e,t){const a=Ou(e);return a?t(`device.type.${a}`,{defaultValue:e??""}):e??""}const Ca=e=>e==null?"":String(e).trim();function Yo(e,t,a,r){const l=Ca(e),s=Ca(t),i=Ca(a);if(r&&l&&s&&i){const c=`${l.padStart(4,"0")}-${s.padStart(2,"0")}-${i.padStart(2,"0")}`,d=new Date(c);if(!Number.isNaN(d.getTime())&&d.toISOString().slice(0,10)===c){const m=Fl(c,r);if(m)return m}}const u=[l,s,i];for(;u.length>0&&u[u.length-1]==="";)u.pop();return u.join(".")}function Zv(e,t,a){const r=Ca(e);return r?`${r}-${Ca(t).padStart(2,"0")}-${Ca(a).padStart(2,"0")}`:""}function Hu(e,t){return t!=="wornAt"?String(e[t]??""):Zv(e.wornYear,e.wornMonth,e.wornDay)}function Xv({rows:e,loading:t,onSelect:a,onDelete:r,onWear:l,onRelease:s,onAdd:i}){const{t:u,i18n:c}=_e.useTranslation(),d=h=>h==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:m,field:p}=xy(),C=o.useMemo(()=>{if(!m)return e;const{key:h,asc:_}=m;return[...e].sort((g,k)=>{if(h==="worn"){const v=Number(k.worn)-Number(g.worn);return _?v:-v}return ur(Hu(g,h),Hu(k,h),_)})},[e,m]),{pageRows:b,pageSizeProps:x,paginationProps:f}=vy(C,m);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(Po,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:x,pagination:f,actions:i&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),n.jsx(Ko,{loading:t,resizable:!0,resizeMode:"fit",resizeStorageKey:"customer-device-history-v2",fields:[{...p(u("customers.device.wearingNow","\uCC29\uC6A9"),"worn"),resizable:!1},p(u("device.direction.label","\uBC29\uD5A5"),"side"),p(u("device.deviceType","\uC885\uB958"),"device"),p(u("device.brand","\uBE0C\uB79C\uB4DC"),"brand"),p(u("device.fitType","\uCC29\uC6A9\uD615\uD0DC"),"fitType"),p(u("device.productName","\uC81C\uD488\uBA85"),"productName"),p(u("device.wornDate","\uCC29\uC6A9\uC77C"),"wornAt"),...r?[{label:"",resizable:!1}]:[]],items:b.map((h,_)=>({id:h.id??`${h.side}-${_}`,row:h})),gridTemplateColumns:`56px 110px 110px minmax(120px, 1fr) 100px minmax(120px, 1fr) 110px${r?" 80px":""}`,renderRow:({row:h})=>[{content:n.jsx("span",{className:"dlp-worn-check",onClick:_=>_.stopPropagation(),children:n.jsx(xu,{checked:h.worn,disabled:h.worn?!s:!l,ariaLabel:h.worn?u("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):u("customers.device.wear","\uCC29\uC6A9"),onChange:_=>{_?l?.(h):s?.(h)}})})},{content:n.jsx("span",{children:d(h.side)})},{content:h.device?n.jsx($t,{size:"small",variant:zu(h.device),fill:"soft",label:Wu(h.device,u)}):n.jsx("span",{})},{content:n.jsx("span",{children:h.brand})},{content:n.jsx("span",{children:h.fitType||"-"})},{content:n.jsx("span",{children:h.productName||"-"})},{content:n.jsx("span",{className:"dlp-date",children:Yo(h.wornYear,h.wornMonth,h.wornDay,c.language)||"-"})},...r?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(fe,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:u("common.delete","\uC0AD\uC81C"),onClick:_=>{_?.stopPropagation(),r(h)}})})}]:[]],onRowClick:({row:h})=>a(h),empty:u("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function Vu(e,t){return e?{role:t?.role??"button",tabIndex:0,...t?.selected===void 0?{}:{"aria-selected":t.selected},onKeyDown:a=>{a.target===a.currentTarget&&(a.key!=="Enter"&&a.key!==" "||(a.preventDefault(),e(a)))}}:{}}function Jv(e,t){return new Date(e,t+1,0).getDate()}function Qv(e,t){return new Date(e,t,1).getDay()}function e4({visits:e=[],onVisitClick:t,onVisitMove:a,onDayClick:r,today:l}){const{t:s,i18n:i}=_e.useTranslation(),u=o.useMemo(()=>s("calendar.dow",{returnObjects:!0}),[s]),c=lo(l),[d,m]=o.useState(()=>Number(c.slice(0,4))),[p,C]=o.useState(()=>Number(c.slice(5,7))-1),[b,x]=o.useState(null),f=o.useRef(null),h=o.useMemo(()=>{const y={};return e.forEach(w=>{y[w.date]||(y[w.date]=[]),y[w.date].push(w)}),y},[e]),_=o.useMemo(()=>{const y=Jv(d,p),w=Qv(d,p),A=[];for(let E=0;E<w;E++)A.push(null);for(let E=1;E<=y;E++)A.push(E);for(;A.length<35;)A.push(null);return A},[d,p]),g=o.useCallback(()=>{p===0?(m(y=>y-1),C(11)):C(y=>y-1)},[p]),k=o.useCallback(()=>{p===11?(m(y=>y+1),C(0)):C(y=>y+1)},[p]),v=y=>`${d}-${String(p+1).padStart(2,"0")}-${String(y).padStart(2,"0")}`,B=y=>v(y)===c;return n.jsxs("div",{children:[n.jsxs("div",{className:"calendar-nav",children:[n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:g,"aria-label":s("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(tt,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:so(s,i.language,d,p+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:k,"aria-label":s("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(tt,{icon:"chevron-right",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsxs("div",{className:"calendar-nav__legend",children:[n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--main"}),n.jsx("span",{className:"caption-1",children:s("calendar.legend.visited","\uBC29\uBB38")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--sub"}),n.jsx("span",{className:"caption-1",children:s("calendar.legend.scheduled","\uC608\uC57D")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--disabled"}),n.jsx("span",{className:"caption-1",children:s("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]})]}),n.jsxs("div",{className:"calendar-grid",children:[u.map(y=>n.jsx("div",{className:"calendar-day-header body-3",children:y},y)),_.map((y,w)=>{if(y===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${w}`);const A=y,E=v(A),D=h[E]??[],N=Fl(E,i.language),F=b===E;return n.jsxs("div",{className:`calendar-cell${B(A)?" today":""}${F?" drag-over":""}${r?" calendar-cell--clickable":""}`,role:r?"button":void 0,tabIndex:r?0:void 0,"aria-label":r?s("calendar.addOnDate",{date:E}):void 0,"aria-current":B(A)?"date":void 0,onClick:r?()=>r(E):void 0,onKeyDown:r?R=>{R.target===R.currentTarget&&(R.key!=="Enter"&&R.key!==" "||(R.preventDefault(),r(E)))}:void 0,onDragOver:a?R=>{R.preventDefault(),x(E)}:void 0,onDragLeave:a?R=>{R.currentTarget.contains(R.relatedTarget)||x(null)}:void 0,onDrop:a?R=>{R.preventDefault(),f.current!=null&&(a(f.current,E),f.current=null),x(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:A}),D.length>0&&(()=>{const R=[{key:"visited",label:s("calendar.legend.visited","\uBC29\uBB38"),count:D.filter(L=>(L.status??"visited")==="visited").length},{key:"scheduled",label:s("calendar.legend.scheduled","\uC608\uC57D"),count:D.filter(L=>L.status==="scheduled").length},{key:"noVisit",label:s("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:D.filter(L=>L.status==="noVisit").length}].filter(L=>L.count>0),K=R.length===1&&R[0].key==="visited"?s("calendar.visitCount",{count:D.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):R.map(L=>s("calendar.statusCount",{label:L.label,count:L.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return n.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${N} ${K}`,children:[R.map(L=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${L.key}`,"aria-hidden":"true"},L.key)),D.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:D.map((R,K)=>n.jsxs("div",{draggable:!!a,className:`calendar-visit-badge${R.status==="noVisit"?" calendar-visit-badge--no-visit":R.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${a?" calendar-visit-badge--draggable":""}`,onDragStart:a?L=>{f.current=R.id,L.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:a?()=>{f.current=null,x(null)}:void 0,onClick:t?L=>{L.stopPropagation(),t(R)}:void 0,...Vu(t?()=>t(R):void 0),"aria-label":[N,R.time?Vl(R.time,s):null,R.customer,s(R.status==="noVisit"?"calendar.legend.noVisit":R.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[R.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Vl(R.time,s)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:R.customer}),R.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:s("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},R.id??K))})]},A)})]})]})}const t4={page:"h3",pagePopup:"h4",popup:"h5"};function fa({type:e="page",title:t,headingLevel:a=2,icon:r,action:l,disc:s,children:i,inGrid:u=!1,className:c,style:d}){const m=t4[e],p=t||s||l||r,C=a?`h${a}`:"div";return n.jsxs("div",{className:we("section",`section--${e}`,u&&"section--in-grid",c),style:d,children:[p&&n.jsxs("div",{className:"section__header",children:[n.jsxs("div",{className:"section__title-row",children:[r&&n.jsx(tt,{icon:r,label:typeof t=="string"?t:void 0,className:"section__icon"}),n.jsxs("div",{className:"section__title-group",children:[t&&n.jsx(C,{className:`section__title ${m}`,children:t}),s&&n.jsx("div",{className:"section__disc body-3",children:s})]})]}),l&&n.jsx("div",{className:"section__action",children:l})]}),i]})}let Zo=null,qu=!1;function Uu(){if(qu||typeof document>"u")return;qu=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(Zo="keyboard")},!0);const e=()=>{Zo="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}Uu();function gr(){return Uu(),Zo==="keyboard"}const br=20;function n4(e){const{t}=_e.useTranslation(),{type:a,trainingDatas:r,depth:l,renderPopup:s,completedIds:i,selectedIds:u,onItemComplete:c,size:d,useDescriptionTooltip:m,onRemove:p,onMore:C,sectionType:b="page"}=e||{},[,x]=o.useState(0),f=typeof r<"u"?Array.isArray(r)?r:[]:[],h=f.length,[_,g]=o.useState(Math.min(h,br)),k=o.useMemo(()=>Array.isArray(l)?[...l,a?.label].filter(Boolean).join(" \xB7 "):[l||"",a?.label].filter(Boolean).join(" \xB7 "),[l,a?.label]);o.useEffect(()=>{g(Math.min(h,br))},[h]),Li("speechear.data.updated",()=>x(w=>w+1));const v=o.useRef(null),B=o.useRef(null);function y(){const w=document.activeElement;B.current=gr()&&w&&w.closest?.(".training-block__more")?_:null,g(A=>Math.min(h,A+br))}return o.useEffect(()=>{const w=B.current;if(w==null)return;B.current=null;const A=document.activeElement;A&&A!==document.body||v.current?.querySelectorAll(".training-block-button")[w]?.focus()},[_]),n.jsxs(fa,{type:b,title:a?.label,icon:a?.icon,disc:a?.desc,className:"training-block",children:[n.jsx("div",{className:"training-list",ref:v,children:(f||[]).slice(0,_).map((w,A)=>{const E=w;return n.jsx(Lo,{index:A,type:a,trainingData:E,depth:k,renderPopup:s,completedIds:i,selectedIds:u,size:d,useDescriptionTooltip:m,onRemove:typeof p=="function"&&u!=null&&E?.id!=null&&u.has(String(E.id))?()=>p(E):void 0,onComplete:typeof c=="function"&&E?.id!=null?()=>c(String(E.id)):void 0,onMore:typeof C=="function"?D=>C(E,D):void 0},E?.id!=null?`${a?.key||"t"}-${String(E.id)}`:`${a?.key||"t"}-${A}`)})}),h>br&&_<h&&n.jsx("div",{className:"training-block__more",children:n.jsx(fe,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:y,ariaLabel:t("common.loadMore","\uB354\uBCF4\uAE30"),label:t("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function a4(e){let t=0;const a=r=>{Array.isArray(r)?r.forEach(a):r!=null&&r!==!1&&r!==!0&&r!==""&&t++};return a(e),t}function r4({gap:e=10,count:t,className:a,children:r}){const l=o.useRef(null),[s,i]=o.useState({width:0,card:0}),u=t??a4(r);o.useLayoutEffect(()=>{const C=l.current;if(!C)return;const b=()=>{const f=C.style.maxWidth;C.style.maxWidth="none";const h=C.clientWidth;C.style.maxWidth=f;const _=C.firstElementChild?.offsetWidth??0;i(g=>g.width===h&&g.card===_?g:{width:h,card:_})};if(b(),typeof ResizeObserver>"u")return;const x=new ResizeObserver(b);return x.observe(C),()=>x.disconnect()},[u,e]);const c=s.card>0?s.card:0,d=c>0?cf(s.width,c,e):0,m=d>0?df(u,d):0,p={"--block-grid-gap":`${e}px`,...m>0?{"--block-grid-cols":m,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:l,className:we("training-block-grid",m>0&&"training-block-grid--measured",a),style:p,"data-cols":m>0?m:void 0,children:r})}function Xo(e){const t=o.useRef(null),a=o.useRef(e);a.current=e;const[r,l]=o.useState({url:e,loading:!!e,failed:!1}),s=r.url===e?r:{loading:!!e,failed:!1};o.useEffect(()=>{const c=t.current;l({url:e,failed:!1,loading:!!e&&!(c?.complete&&c.naturalWidth>0)})},[e]);const i=o.useCallback(()=>{a.current===e&&l({url:e,loading:!1,failed:!1})},[e]),u=o.useCallback(()=>{a.current===e&&l({url:e,loading:!1,failed:!0})},[e]);return{imgRef:t,loading:s.loading,failed:s.failed,hasImage:!!e&&!s.failed,onLoad:i,onError:u}}var o4='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Symbol_SpeechEar_mono" xmlns="http://www.w3.org/2000/svg" width="240" height="240" viewBox="0 0 240 240"><g id="symbol"><g opacity=".3"><path d="M80,50c-16.57,0-30,13.43-30,30v80c0,8.66,2.21,16.81,6.08,23.92,7.1,3.88,15.25,6.08,23.92,6.08h80c16.57,0,30-13.43,30-30v-80c0-8.66-2.21-16.81-6.08-23.92-7.1-3.88-15.25-6.08-23.92-6.08h-80Z" fill="%23fff"/></g><path d="M140,30h-60c-27.61,0-50,22.39-50,50v23.38l-19.22,21.15c-1.15,1.26-1.02,3.24.3,4.33,5.82,4.84,12.22,8.56,18.92,11.21.03,18.92,10.56,35.37,26.08,43.84-3.88-7.1-6.08-15.25-6.08-23.92v-80c0-16.57,13.43-30,30-30h80c8.66,0,16.81,2.21,23.92,6.08-8.48-15.54-24.97-26.08-43.92-26.08Z" fill="%23fff"/><path d="M183.92,56.08c3.88,7.1,6.08,15.25,6.08,23.92v80c0,16.57-13.43,30-30,30h-80c-8.66,0-16.81-2.21-23.92-6.08,8.48,15.54,24.97,26.08,43.92,26.08h45.11c2.7,0,4.89,2.19,4.89,4.89,0,2.86,2.45,5.13,5.3,4.88,30.65-2.68,54.7-28.42,54.7-59.77v-60c0-18.95-10.54-35.44-26.08-43.92Z" fill="%23fff"/><rect x="69" y="88" width="12" height="24" rx="6" ry="6" fill="%23fff"/><path d="M111,140c-2.92,0-5.85-.75-8.5-2.28-2.39-1.38-3.21-4.44-1.82-6.83,1.38-2.39,4.44-3.21,6.83-1.82,2.74,1.58,6.21,1.13,8.44-1.1,1.08-1.08,1.76-2.45,1.97-3.95.9-6.37,3.71-12.42,8.14-17.5,2.64-3.02,4.03-6.9,3.93-10.92-.21-8.21-6.78-15.05-14.97-15.56-2.76-.18-5.42.33-7.88,1.51-2.49,1.19-5.48.12-6.66-2.37-1.19-2.49-.12-5.48,2.37-6.66,3.96-1.88,8.38-2.73,12.8-2.46,13.32.83,24.01,11.94,24.34,25.29.16,6.53-2.11,12.83-6.39,17.75-3.15,3.61-5.15,7.87-5.77,12.32-.52,3.67-2.18,7-4.8,9.63-3.27,3.27-7.62,4.97-12.02,4.97Z" fill="%23fff"/></g></svg>';const s4=o4,Jo=o.forwardRef(function({item:e,disabled:t=!1,onPlayDone:a,selectable:r=!1,selected:l=!1,onSelect:s,flipDelay:i=0,hideLabel:u=!1,hideAudio:c=!1,orderRank:d=null},m){const{t:p}=_e.useTranslation(),C=e.word||e.title||"",b=t||!C,x=e.audio??e.sound??e.audioKey,f=e.subLabel||e.pronunciation||"",h=e.colloquialLabel||"",[_,g]=o.useState({label:C,subLabel:f,colloquialLabel:h,homonum:e.homonum});C&&(_.label!==C||_.subLabel!==f||_.colloquialLabel!==h||!Object.is(_.homonum,e.homonum))&&g({label:C,subLabel:f,colloquialLabel:h,homonum:e.homonum});const k=o.useRef(null),v=Cn("(max-width: 767px)"),[B,y]=o.useState(!1),w=`${typeof x=="string"?x:x?.src??""}\0${C}`,[A,E]=o.useState({for:"",url:""}),D=A.for===w?A.url:"",N=Rl(),F=e.textOnly??(!e.image&&!!_.label&&!!N&&N.entries.length>0&&!N.byWord.has(_.label)),R=F?"":sa()?.(_.label,_.homonum)??e.image??"",{imgRef:K,loading:L,hasImage:$,onLoad:T,onError:J}=Xo(R);o.useEffect(()=>{let M=!1;return(async()=>{if(x){if(typeof x=="string"){if(x.startsWith("http")||x.includes("/")){E({for:w,url:x});return}}else if(typeof x=="object"&&!Array.isArray(x)){const Z=x.src;if(Z){E({for:w,url:Z});return}}}const I=Na();if(I&&C)try{const Z=await Promise.resolve(I(C));!M&&Z&&E({for:w,url:Z})}catch{}})(),()=>{M=!0}},[x,C,w]);const q=o.useRef(!0),O=o.useRef(null);o.useEffect(()=>(q.current=!0,()=>{q.current=!1,O.current&&mr(O.current),O.current=null;try{k.current?.pause()}catch{}k.current=null}),[]);const Q=o.useCallback(()=>new Promise(M=>{if(typeof window<"u"&&window.speechSynthesis&&C){y(!0),window.speechSynthesis.cancel();const I=new SpeechSynthesisUtterance(C);I.lang="ko-KR",I.onend=()=>{y(!1);try{a?.()}catch{}M()},I.onerror=()=>{y(!1),M()},window.speechSynthesis.speak(I)}else M()}),[C,a]),P=o.useCallback(M=>{const I=hr(M,Z=>{if(y(!1),Z)try{a?.()}catch{}});return k.current=I.el,I.done},[a]),V=o.useCallback(async()=>{if(t||!q.current)return;const M=()=>{O.current===M&&(O.current=null);try{k.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}y(!1)},I=pr(M);O.current=M;try{window.speechSynthesis?.cancel()}catch{}try{if(D&&(y(!0),await P(D)))return;const Z=Jr();if(Z&&C)try{const le=await Promise.resolve(Z(C));if(!q.current||O.current!==M||le&&(y(!0),await P(le)))return}catch{}if(!q.current||O.current!==M)return;await Q()}finally{I(),O.current===M&&(O.current=null)}},[t,D,C,P,Q]);o.useImperativeHandle(m,()=>({play:()=>V()}),[V]);const W=M=>M.stopPropagation(),G=o.useCallback(M=>{if(M.stopPropagation(),!t){if(B){try{k.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}y(!1);return}V()}},[t,B,V]),S=we("training-word-card",t?"training-word-card--disabled":"",b?"training-word-card--flipped":"",r?"training-word-card--selectable":"",l?"training-word-card--selected":"");return n.jsx("div",{className:S,onClick:r&&!t?s:void 0,role:r?"button":void 0,"aria-pressed":r?l:void 0,tabIndex:r&&!t?0:void 0,"aria-disabled":r&&t?!0:void 0,onKeyDown:r&&!t?M=>{M.target===M.currentTarget&&(M.key==="Enter"||M.key===" "||M.key==="Spacebar")&&(M.preventDefault(),s?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:b?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[l&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:W,children:n.jsx($t,{type:"dot",size:40,position:"inline",animate:!0,icon:d!=null?void 0:"check",number:d??void 0,"aria-label":d!=null?p("training.nthSelected",{n:d}):p("training.selected","\uC120\uD0DD\uB428")})}),n.jsx("div",{className:"training-word-card__image-wrap",children:F?n.jsx("div",{className:"training-word-card__text-face",children:_.label}):$?n.jsxs(n.Fragment,{children:[L&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:K,className:"training-word-card__image",src:R,alt:_.label||p("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:L?0:1},onLoad:T,onError:J})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!F&&n.jsx("div",{className:"training-word-card__word",children:_.label}),_.subLabel&&n.jsxs("div",{className:"training-word-card__pronunciation",children:["[",_.subLabel,"]"]}),_.colloquialLabel&&n.jsxs("div",{className:"training-word-card__colloquial caption-1",children:["[",_.colloquialLabel,"]"]})]}),!c&&n.jsx("div",{className:"training-word-card__bottom",onClick:r?W:void 0,children:n.jsx(fe,{htmlType:"button",size:v?40:48,type:v?"dot":"bar",icon:B?"pause":"play",label:v?void 0:p("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:B,onClick:G,disabled:t,ariaLabel:p("training.playSound","\uC18C\uB9AC \uB4E3\uAE30")})})]}),n.jsx("div",{className:"training-word-card__back","aria-hidden":"true",children:n.jsx("span",{className:"training-word-card__disabled-symbol",style:{"--disabled-symbol-src":`url("${s4}")`}})})]})})}),l4=260;function Wn(e){const{t}=_e.useTranslation(),{title:a,subtitle:r,headerActions:l,headerSegment:s,children:i,buttons:u,footer:c,footerStart:d,footerEnd:m,footerNote:p,footerNoteDivider:C=!1,footerClassName:b="",footerLayout:x="center",onClose:f,closeDisabled:h=!1,beforeClose:_,closeOnBackdrop:g=!0,className:k="",ariaLabel:v,useTitle:B=!0,inline:y=!1,size:w,layer:A="modal",height:E,fillBody:D=!1,resetScrollKey:N}=e||{},[F,R]=o.useState(!1),K=o.useRef(!1),L=o.useRef(null),$=o.useId(),T=o.useRef(null);o.useEffect(()=>{},[y,a,v,k]),o.useEffect(()=>{N!==void 0&&T.current&&(T.current.scrollTop=0)},[N]);const[J,q]=o.useState(!1);o.useEffect(()=>{const z=T.current;if(!z)return;const ne=()=>q(z.scrollHeight>z.clientHeight+1);if(ne(),typeof ResizeObserver>"u")return;const H=new ResizeObserver(ne);H.observe(z);const U=z.firstElementChild;return U&&H.observe(U),()=>H.disconnect()},[i,N]),o.useEffect(()=>{if(!y)return Cu()},[y]);const O=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(y)return;const z=O.current,ne=L.current;return fo(ne,z),ne&&!ne.contains(document.activeElement)&&(ne.querySelector(_n)??ne).focus(),()=>{const H=document.activeElement;(!H||H===document.body||ne&&ne.contains(H))&&go(z)?.focus?.()}},[y]),ho(L,!y);const Q=o.useRef(!0),P=bo(),V=o.useRef(null);o.useEffect(()=>(Q.current=!0,()=>{Q.current=!1,V.current&&(clearTimeout(V.current),V.current=null)}),[]);const W=o.useCallback(()=>{!Q.current||!K.current||(K.current=!1,R(!1))},[]),G=o.useCallback((z,ne=!1)=>{if(ne&&!Q.current||K.current)return;K.current=!0,R(!0);const H=setTimeout(()=>{V.current===H&&(V.current=null);let U;try{U=z?z():void 0}catch{W();return}U&&typeof U.then=="function"&&U.then(()=>{setTimeout(W,120)},W)},P?0:l4);ne&&(V.current=H)},[W,P]),S=o.useCallback(()=>{h||_&&_()===!1||G(f,!0)},[G,f,h,_]),M=o.useRef(S);o.useEffect(()=>{M.current=S});const I=!y&&!!f;o.useEffect(()=>{if(I)return Gn(()=>M.current())},[I]);const Z=I&&g,le=o.useRef(!1),oe=z=>{le.current=z.target===z.currentTarget},de=z=>{const ne=le.current;le.current=!1,ne&&z.target===z.currentTarget&&S()},re=n.jsx("div",{className:`popup ${y?"popup--inline":""} ${A==="belowPagePopup"?"popup--below-page-popup":""} ${F?"popup--closing":""} ${k}`,onPointerDown:Z?oe:void 0,onClick:Z?de:void 0,onMouseDown:y?void 0:z=>{z.target===z.currentTarget&&z.preventDefault()},children:n.jsxs("div",{ref:L,className:`popup-panel${w?` popup-panel--${w}`:""}${E!=null?" popup-panel--has-height":""}${D?" popup-panel--fill-body":""}`,style:E!=null?{"--popup-height":typeof E=="number"?`${E}px`:E}:void 0,tabIndex:-1,role:y?void 0:"dialog","aria-modal":y?void 0:!0,"aria-labelledby":!y&&B&&a?$:void 0,"aria-label":!y&&!(B&&a)?v??(typeof a=="string"?a:void 0):void 0,children:[!B&&(l||f)?n.jsxs("div",{className:"popup-close-float",children:[l,f&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:S,disabled:h,ariaLabel:t("common.close","\uB2EB\uAE30")})]}):a||l||f?n.jsxs("div",{className:`popup-header${r?" popup-header--with-subtitle":""}`,children:[n.jsxs("div",{className:"popup-header-main",children:[a?n.jsx("h2",{id:$,className:"popup-title popup-title--left h2",children:a}):n.jsx("span",{id:$,className:"popup-title popup-title--left h2"}),r&&n.jsx("span",{className:"popup-subtitle body-3",children:r})]}),s&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(wn,{size:40,ariaLabel:s.ariaLabel,options:s.options.map(z=>({key:z.key,label:z.label,disabled:z.disabled})),value:s.value,onChange:s.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[l,f&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:S,disabled:h,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]}):null,n.jsx("div",{className:"popup-content",ref:T,tabIndex:J?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:G,closeWithAnimation:S}):i})}),p!=null&&p!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${C?" popup-footer-note--divider":""}`,role:"note",children:p}),d||m?n.jsxs("div",{className:`popup-footer popup-footer--bar${b?` ${b}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof d=="function"?d({animateThen:G,closeWithAnimation:S}):d}),n.jsx("div",{className:"popup-footer__end",children:typeof m=="function"?m({animateThen:G,closeWithAnimation:S}):m})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${x!=="center"?` popup-footer--${x}`:""}`,children:u.map((z,ne)=>n.jsx(fe,{htmlType:"button",size:48,variant:z.variant??"default",label:z.label,disabled:z.disabled,onClick:()=>z.onClick?.({animateThen:G,closeWithAnimation:S})},ne))}):c?n.jsx("div",{className:`popup-footer${x!=="center"?` popup-footer--${x}`:""}${b?` ${b}`:""}`,children:typeof c=="function"?c({animateThen:G,closeWithAnimation:S}):c}):null]})});return y||typeof document>"u"?re:cn.createPortal(re,document.body)}function yr(e){return String(e)}const vr=["o","triangle","x"];function Gu(e,t){return e===t?null:t}const Ku={o:"circle",triangle:"triangle",x:"x"},Yu={o:"main",triangle:"warn",x:"danger"};function i4(e){let t=0,a=0,r=0;for(const s of Object.values(e))s==="o"?t++:s==="triangle"?a++:s==="x"&&r++;const l=t+a+r;return{marked:l,o:t,triangle:a,x:r,rate:l===0?null:(t+a*.5)/l}}function Qo(e){const t={};for(const[a,r]of Object.entries(e))(r==="o"||r==="triangle"||r==="x")&&(t[a]=r);return t}function Zu(e){const t=[];let a=0;for(const r of e)t.push(a),a+=r;return t}function u4(e,t){return!t&&e>0}const ga={landscape:{width:1123,height:794,printSize:"A4 landscape",printW:"297mm",printH:"210mm"},portrait:{width:794,height:1123,printSize:"A4 portrait",printW:"210mm",printH:"297mm"}};function c4(e="landscape"){Mt("print-word-table-deprecated","[printWordTable] @deprecated \u2014 WordTablePopup renderButtons \uC758 print(\uB610\uB294 useWordTablePrint().print)\uB97C \uC4F0\uC138\uC694. \uC804\uC5ED \uC778\uC1C4\uB294 \uD654\uBA74\uC758 \uBAA8\uB4E0 \uB2E8\uC5B4\uD45C\uB97C \uD568\uAED8 \uCC0D\uC2B5\uB2C8\uB2E4.");const{printSize:t,printW:a,printH:r}=ga[e],l=document.createElement("style");l.textContent=`@page { size: ${t}; margin: 0; } .word-table { width: ${a} !important; height: ${r} !important; }`,document.head.appendChild(l);const s=()=>{document.head.removeChild(l),window.removeEventListener("afterprint",s)};window.addEventListener("afterprint",s),window.print()}function Xu(e,t){if(e.length===0)return[[]];const a=Math.max(1,Math.floor(t)),r=[];for(let l=0;l<e.length;l+=a)r.push(e.slice(l,l+a));return r}const d4={landscape:{1:{cols:1,rows:1},2:{cols:2,rows:1},3:{cols:3,rows:1},4:{cols:2,rows:2},5:{cols:3,rows:2},6:{cols:3,rows:2},7:{cols:4,rows:2},8:{cols:4,rows:2},9:{cols:5,rows:2},10:{cols:5,rows:2},11:{cols:4,rows:3},12:{cols:4,rows:3},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 p4(e,t){const a=d4[e][t];if(a)return a;const r=Math.max(1,Math.ceil(t)),l=Math.max(1,Math.ceil(Math.sqrt(r*.707)));let s,i;return e==="landscape"?(i=l,s=Math.ceil(r/i)):(s=l,i=Math.ceil(r/s)),(e==="landscape"?s<i:i<s)&&([s,i]=[i,s]),{cols:s,rows:i}}const m4={show:"word-table-block__content--cut-show",dashed:"",corner:"word-table-block__content--cut-corner",hide:""},Ju={\uBA85:"\uBA85\uC0AC",\uB3D9:"\uB3D9\uC0AC",\uD615:"\uD615\uC6A9\uC0AC",\uBD80:"\uBD80\uC0AC",\uC218:"\uC218\uC0AC",\uAD00:"\uAD00\uD615\uC0AC",\uAC10:"\uAC10\uD0C4\uC0AC",\uC870:"\uC870\uC0AC",\uC811:"\uC811\uC0AC",\uC758:"\uC758\uC874\uBA85\uC0AC",\uB300:"\uB300\uBA85\uC0AC",\uBCF4\uB3D9:"\uBCF4\uC870\uB3D9\uC0AC",\uBCF4\uD615:"\uBCF4\uC870\uD615\uC6A9\uC0AC"},Qu={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},es={\uBA85:"noun",\uB3D9:"verb",\uD615:"adjective",\uBD80:"adverb",\uC218:"numeral",\uAD00:"determiner",\uAC10:"interjection",\uC870:"particle",\uC811:"affix",\uC758:"dependentNoun",\uB300:"pronoun",\uBCF4\uB3D9:"auxVerb",\uBCF4\uD615:"auxAdjective"},ts={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function ec(e){return Object.fromEntries(Object.entries(Ju).map(([t,a])=>[t,es[t]?e(`wordTable.pos.${es[t]}`,{defaultValue:a}):a]))}function tc(e){return Object.fromEntries(Object.entries(Qu).map(([t,a])=>[t,ts[t]?e(`wordSearch.filter.type.${ts[t]}`,{defaultValue:a}):a]))}const h4={pos:es,wordType:ts};function ns(e,t){return e?e.split("/").map(a=>t[a]??a).join("/"):""}function nc(e,t,a,r){if(r!=="dashed")return{};const l=e%t,s=Math.floor(e/t),i=l<t-1,u=s<a-1;if(!i&&!u)return{};const c="#ddd",d=b=>`repeating-linear-gradient(to ${b}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,m=[],p=[],C=[];return i&&(m.push(d("bottom")),p.push("1px 100%"),C.push("right center")),u&&(m.push(d("right")),p.push("100% 1px"),C.push("center bottom")),{backgroundImage:m.join(", "),backgroundSize:p.join(", "),backgroundPosition:C.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const C4=280,f4=240,g4=280,b4=400,y4=120,v4=280;function ac(e,t){const a=o.useRef(null),[r,l]=o.useState(1),[s,i]=o.useState(0),u=o.useCallback((c,d)=>{if(!(c>0))return;const m=c/e,p=t&&d>0?d/t:1/0,C=Math.min(1,m,p);l(C),i(Math.max(0,(c-e*C)/2))},[e,t]);return o.useEffect(()=>{const c=a.current;if(!c)return;const d=t?c.parentElement??c:c;if(u(d.clientWidth,d.clientHeight),typeof ResizeObserver>"u")return;const m=new ResizeObserver(([p])=>u(p.contentRect.width,p.contentRect.height));return m.observe(d),()=>m.disconnect()},[u,t]),{scalerRef:a,scale:r,offset:s}}const x4=24,_4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},w4=400,rc=8;function oc({label:e,subLabel:t,colloquialLabel:a,homonum:r,showWord:l=!0,showImage:s=!0,showPronunciation:i=!0,showColloquial:u=!0,buttonSize:c=40,wordInfo:d,outerScale:m=1}){const{t:p}=_e.useTranslation(),C=o.useRef(null),b=o.useRef(null),x=o.useRef(null),[f,h]=o.useState(1),[_,g]=o.useState(!1),[k,v]=o.useState({for:"",url:""}),[B,y]=o.useState(null),w=t&&t.length>0?t:$C()?.(e,r)??"",A=sa()?.(e,r)??"",{imgRef:E,loading:D,failed:N,onLoad:F,onError:R}=Xo(A),K=o.useCallback(()=>y(b.current?.getBoundingClientRect()??null),[]),L=o.useCallback(()=>y(null),[]),$=vo(!!B,M=>{M?K():L()},b),T=o.useMemo(()=>{if(!d)return null;const M=[];return d.grade&&M.push(p("wordTable.info.grade",{n:d.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),d.syllables&&M.push(p("wordTable.info.syllables",{n:d.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),d.pos&&M.push(p("wordTable.info.pos",{v:ns(d.pos,ec(p)),defaultValue:"\uD488\uC0AC: {{v}}"})),d.wordType&&M.push(p("wordTable.info.wordType",{v:ns(d.wordType,tc(p)),defaultValue:"\uC720\uD615: {{v}}"})),M.length?M:null},[d,p]),J=w||e,q=k.for===J?k.url:"";o.useEffect(()=>{const M=Na(),I=w||e;if(!M||!I)return;let Z=!1;return Promise.resolve(M(I)).then(le=>{!Z&&le&&v({for:I,url:le})}),()=>{Z=!0}},[w,e]);const O=o.useRef(null),Q=o.useRef(null);o.useEffect(()=>()=>{x.current?.pause(),Q.current?.()},[]);const P=o.useCallback(M=>{if(M.stopPropagation(),_){O.current?.();return}if(!q)return;g(!0);const I=hr(q,()=>{g(!1),Q.current?.()});x.current=I.el,O.current=I.stop,Q.current=pr(I.stop)},[_,q]),V=s&&!!A&&!N,W=V&&l?C4:V?g4:f4,G=V&&l?b4:V?v4:y4;o.useEffect(()=>{const M=C.current;if(!M||typeof ResizeObserver>"u")return;const I=new ResizeObserver(([Z])=>{const{width:le,height:oe}=Z.contentRect;h(Math.min(le/W,oe/G))});return I.observe(M),()=>I.disconnect()},[W,G]);const S=c*m<x4;return n.jsxs("div",{ref:C,className:we("word-table-cell",S&&"word-table-cell--tap-too-small",V?"word-table-cell--with-image":""),"data-ref-w":W,"data-ref-h":G,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${f})`},children:[V&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[D&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:E,className:"word-table-cell__image",src:A,alt:e,draggable:!1,style:{opacity:D?0:1},onLoad:F,onError:R})]}),l&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),i&&w&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",w,"]"]}),u&&a&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",a,"]"]})]}),n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":q,children:[n.jsx("span",{"data-play-state":"play",style:{display:_?"none":void 0},children:n.jsx(fe,{htmlType:"button",size:c,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:p("common.play","\uC7AC\uC0DD"),ariaLabel:e?p("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):p("common.play","\uC7AC\uC0DD"),onClick:P})}),n.jsx("span",{"data-play-state":"pause",style:{display:_?void 0:"none"},children:n.jsx(fe,{htmlType:"button",size:c,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:p("common.pause","\uBA48\uCDA4"),ariaLabel:e?p("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):p("common.pause","\uBA48\uCDA4"),onClick:P})})]}),d&&n.jsxs("div",{ref:b,className:"word-table-cell__info-button",onPointerEnter:M=>{ca(M)||K()},onPointerLeave:M=>{ca(M)||L()},onFocus:()=>{da()||K()},onBlur:L,children:[n.jsx(fe,{htmlType:"button",size:c,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:p("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:M=>{M.stopPropagation(),$.touchPress()}}),B&&T&&n.jsx(Kn,{anchorRect:B,items:T,showIndex:!1})]})]})}function ba({title:e,titleIcon:t,disc:a,className:r,orientation:l="landscape",contentTypes:s=["image","word","standardPron"],cutLine:i="show",showOutline:u=!0,showDivLine:c=!0,items:d,editCells:m,count:p,activeCell:C=null,onActivateCell:b,onRemoveCell:x,onRemoveItem:f,onReorder:h,renderCellAction:_,showFillerAdd:g=!1,contentRef:k,buttonSize:v=40,brand:B,code:y,pageNumber:w,pageNumberPosition:A="right",fitHeight:E=!1,scoring:D=!1,marks:N,onMarkClick:F,scoreIndexOffset:R=0}){const K=o.useCallback((Be,Se)=>{F?.(R+Be,Se)},[F,R]),L=(Be,Se)=>{const Le=N?.[yr(R+Be)]??null;return n.jsx("div",{className:we("word-table-cell__score",Le?"word-table-cell__score--marked":""),style:Ue>1?{transform:`translateX(-50%) scale(${Ue})`,transformOrigin:"bottom center"}:void 0,children:vr.map(Ze=>n.jsx("span",{className:we("word-table-cell__score-slot",Le===Ze?"word-table-cell__score-slot--on":""),children:n.jsx(fe,{htmlType:"button",size:v,type:"dot",shape:"pill",icon:Ku[Ze],variant:Le===Ze?Yu[Ze]:"default",selected:Le===Ze,useBorder:!1,...Ne?{}:{tabIndex:-1,role:"img"},showTooltipInfo:$(`wordTable.scoring.markName.${Ze}`,{defaultValue:Ze}),ariaLabel:$(`wordTable.scoring.${Ze}`,{word:Se,defaultValue:`${Se} ${Ze}`}),onClick:Ne?_t=>{_t.stopPropagation(),K(Be,Ze)}:void 0})},Ze))})},{t:$}=_e.useTranslation(),T=m!==void 0,J=e!=null||!!t||!!a,q=Cn("(max-width: 767px)"),O=o.useRef(null),[Q,P]=o.useState(null),V=d?.length??0,[W,G]=o.useState(null),[S,M]=o.useState(""),I=o.useRef(null),Z=o.useRef(null),le=o.useRef(null),oe=o.useRef(null),de=o.useCallback(Be=>{Z.current=Be,typeof k=="function"?k(Be):k&&(k.current=Be)},[k]),re=o.useCallback((Be,Se)=>{I.current=Se,h?.(Be,Se),M($("wordTable.reorder.moved",{n:Se+1,total:V,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[h,$,V]);o.useEffect(()=>{const Be=I.current;Be!=null&&(I.current=null,Z.current?.querySelectorAll(".word-table-block__card:not(.word-table-block__card--filler)")?.[Be]?.querySelector(".word-table-block__card-handle button")?.focus())}),o.useEffect(()=>()=>{oe.current?.()},[]);const z=o.useCallback((Be,Se)=>{if(!h||!Be.altKey||Be.ctrlKey||Be.metaKey)return;const Le=Be.key==="ArrowRight";if(!Le&&Be.key!=="ArrowLeft")return;Be.preventDefault();const Ze=Se+(Le?1:-1);Ze<0||Ze>=V||re(Se,Ze)},[h,V,re]),ne=o.useCallback((Be,Se)=>{if(!h||Be.pointerType==="mouse")return;const Le=Be.target.closest?.("button");if(Le&&!Le.closest(".word-table-block__card-handle"))return;oe.current?.();const Ze={x:Be.clientX,y:Be.clientY};let _t=!1;const et=Pe=>{_t&&Pe.cancelable&&Pe.preventDefault()};let Xe=null,Nt=null;const gt=()=>{const Pe=Nt;if(!Pe)return;const bt=document.elementFromPoint?.(Pe.x,Pe.y)?.closest?.("[data-wordtable-cell]"),Bt=bt?Number(bt.dataset.wordtableCell):NaN,lt=Number.isInteger(Bt)?Bt:null;le.current=lt,P(Tt=>Tt===lt?Tt:lt)},wt=Pe=>{if(!_t){(Math.abs(Pe.clientX-Ze.x)>rc||Math.abs(Pe.clientY-Ze.y)>rc)&&st();return}if(Nt={x:Pe.clientX,y:Pe.clientY},typeof requestAnimationFrame>"u"){gt();return}Xe===null&&(Xe=requestAnimationFrame(()=>{Xe=null,gt()}))},Et=()=>{Xe!==null&&(cancelAnimationFrame(Xe),Xe=null,gt());const Pe=le.current,bt=_t;st(),bt&&Pe!=null&&Pe!==Se&&re(Se,Pe)},ht=setTimeout(()=>{_t=!0,G(Se),le.current=Se,P(Se),window.addEventListener("touchmove",et,{passive:!1})},w4);function st(){clearTimeout(ht),window.removeEventListener("pointermove",wt),window.removeEventListener("pointerup",Et),window.removeEventListener("pointercancel",Et),window.removeEventListener("touchmove",et),_t=!1,Xe!==null&&(cancelAnimationFrame(Xe),Xe=null),le.current=null,oe.current=null,G(null),P(null)}oe.current=st,window.addEventListener("pointermove",wt),window.addEventListener("pointerup",Et),window.addEventListener("pointercancel",Et)},[h,re]),{width:H,height:U}=ga[l],pe=typeof E=="number"?E:E&&typeof E=="object"?q?E.narrow:E.wide:null,{scalerRef:Ee,scale:ge,offset:me}=ac(H,E?U:void 0),ie=T?m?.length??0:d?.length??0,be=Math.max(p??ie,1),{cols:he,rows:ue}=p4(l,be),Me={word:s.length===0||s.includes("word"),image:s.length===0||s.includes("image"),pron:s.length===0||s.includes("standardPron"),colloq:s.length===0||s.includes("colloquialPron")},Ve=T?(m??[]).some(Be=>Be!==null&&Be.length>1):(d??[]).some(Be=>(Be.words??[]).length>1),Te=!!B?.show,qe=!!B?.show&&B?.top!==!1,Oe=!!B?.show&&B?.bottom!==!1,ct=B?.copyright??"\xA9 IHAB, Inc. All rights reserved.",rt=we("word-table-block__content",m4[i],u&&"word-table-block__content--outline",c&&Ve&&"word-table-block__content--div-line",!Te&&w&&A!=="none"&&"word-table-block__content--page-number",qe&&"word-table-block__content--brand-top",Oe&&"word-table-block__content--brand-bottom"),nt={transform:`scale(${1/ge})`,transformOrigin:"center center"},mt=v*vr.length+4*(vr.length-1),Ne=!!F,Ue=Ne?Math.max(1,Math.min(1/ge,H/he/mt)):1,ke=n.jsxs("div",{ref:Ee,className:"word-table__scaler",style:{height:U*ge},children:[n.jsx("div",{className:we("word-table",D&&!Ne&&"word-table--score-readonly",!J&&r),style:{width:H,height:U,transform:`scale(${ge})`,transformOrigin:"top left",marginLeft:me},children:n.jsxs("div",{ref:de,className:rt,style:{gridTemplateColumns:`repeat(${he}, 1fr)`,gridTemplateRows:`repeat(${ue}, 1fr)`},children:[T?n.jsx(n.Fragment,{children:(m??[]).map((Be,Se)=>n.jsx("div",{className:we("word-table-block__edit-cell",Be?"word-table-block__edit-cell--filled":"word-table-block__edit-cell--empty",C===Se?"word-table-block__edit-cell--active":""),style:nc(Se,he,ue,i),children:Be?n.jsxs(n.Fragment,{children:[Be.map((Le,Ze)=>n.jsxs(o.Fragment,{children:[Ze>0&&n.jsx("div",{className:"word-table-block__pair-divider"}),n.jsx(oc,{outerScale:ge,label:Le.word,subLabel:Le.pronunciation,colloquialLabel:Le.colloquialPronunciation,homonum:Le.homonum,showWord:Me.word,showImage:Me.image,showPronunciation:Me.pron,showColloquial:Me.colloq,buttonSize:v})]},Ze)),D&&L(Se,Be.map(Le=>Le.word).join(" / ")),x&&n.jsx("div",{className:"word-table-block__card-close",children:n.jsx(fe,{htmlType:"button",size:v,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:Be.length>1?$("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):$("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:Be.length>1?$("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):$("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>x(Se)})})]}):b&&n.jsx("div",{style:nt,children:n.jsx(fe,{htmlType:"button",size:"48",type:"bar",icon:"plus",label:$("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>b(Se)})})},Se))}):n.jsxs(n.Fragment,{children:[(d??[]).map((Be,Se)=>n.jsxs("div",{"data-wordtable-cell":h?Se:void 0,className:`word-table-block__card${h?" word-table-block__card--draggable":""}${Q===Se?" word-table-block__card--drag-over":""}${W===Se?" word-table-block__card--dragging":""}`,style:nc(Se,he,ue,i),draggable:!!h,onPointerDown:h?Le=>ne(Le,Se):void 0,onKeyDown:h?Le=>z(Le,Se):void 0,onDragStart:h?()=>{O.current=Se}:void 0,onDragOver:h?Le=>{Le.preventDefault(),P(Se)}:void 0,onDragLeave:h?()=>P(null):void 0,onDrop:h?Le=>{Le.preventDefault(),O.current!==null&&O.current!==Se&&h(O.current,Se),O.current=null,P(null)}:void 0,onDragEnd:h?()=>{O.current=null,P(null)}:void 0,children:[(Be.words??[]).map((Le,Ze)=>n.jsxs(o.Fragment,{children:[Ze>0&&n.jsx("div",{className:"word-table-block__pair-divider"}),n.jsx(oc,{outerScale:ge,label:Le.label,subLabel:Le.subLabel,colloquialLabel:Le.colloquialLabel,homonum:Le.homonum,showWord:Me.word,showImage:Me.image,showPronunciation:Me.pron,showColloquial:Me.colloq,buttonSize:v,wordInfo:Le.grade||Le.syllables!=null||Le.pos||Le.wordType?{grade:Le.grade,syllables:Le.syllables,pos:Le.pos,wordType:Le.wordType}:void 0})]},Ze)),D&&L(Se,(Be.words??[]).map(Le=>Le.label).join(" / ")),h&&n.jsx("div",{className:"word-table-block__card-handle",children:n.jsx(fe,{htmlType:"button",size:v,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:$("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:$("wordTable.reorder.handle",{word:(Be.words??[]).map(Le=>Le.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})}),(_||f)&&n.jsxs("div",{className:"word-table-block__card-actions",children:[_?.(Se,Be),f&&n.jsx("div",{className:"word-table-block__card-close",children:n.jsx(fe,{htmlType:"button",size:v,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(Be.words??[]).length>1?$("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):$("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:(Be.words??[]).length>1?$("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):$("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),onClick:()=>f(Be.id)})})]})]},Be.id)),Array.from({length:Math.max(0,he*ue-(d?.length??0))}).map((Be,Se)=>{const Le=(d?.length??0)+Se<be;return n.jsx("div",{className:"word-table-block__card word-table-block__card--filler",children:g&&b&&Le&&n.jsx("div",{style:nt,children:n.jsx(fe,{htmlType:"button",size:v,type:"bar",icon:"plus",label:$("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>b((d?.length??0)+Se)})})},`filler-${Se}`)})]}),qe&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"word-table__band word-table__band--top",children:[n.jsx("img",{className:"word-table__brand-logo",src:B?.topLogo?.src??dr,alt:B?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const Be=[B?.title&&n.jsx("span",{className:"word-table__paper-title",children:B.title},"t"),B?.owner&&n.jsx("span",{className:"word-table__owner",children:B.owner},"o"),y&&n.jsx("span",{className:"word-table__code",children:y},"c")].filter(Boolean);return Be.length===0?null:n.jsx("span",{className:"word-table__ident",children:Be.map((Se,Le)=>n.jsxs(o.Fragment,{children:[Le>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Se]},Le))})})()]})}),Oe&&n.jsx(n.Fragment,{children:n.jsxs("div",{className:"word-table__band word-table__band--bottom",children:[n.jsxs("span",{className:"word-table__brand-by",children:[B?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:B.bottomLogo.src,alt:B.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:ct})]}),n.jsxs("span",{className:"word-table__band-end",children:[B?.link&&n.jsx("span",{className:"word-table__link",children:B.link}),w&&A!=="none"&&n.jsx("span",{className:"word-table__page-count",children:$("wordTable.filter.pageIndicator",{current:w.current,total:w.total})})]})]})}),!Te&&w&&A!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${A}`,children:$("wordTable.filter.pageIndicator",{current:w.current,total:w.total})})]})}),h&&n.jsx("span",{role:"status",style:_4,children:S})]}),He=pe==null?ke:n.jsx("div",{className:"word-table__frame",style:{height:pe},children:ke});return J?n.jsx(fa,{type:"page",icon:t,title:e,disc:a,className:we("word-table-block",r),children:He}):He}function B4(e,t,a){const r=[];for(const l of e??[]){if(l.type==="note"||l.type==="input")continue;const s=l.displayLabel??l.label,i=k4(l,t?.[l.label],a);i!==null&&r.push(`${s} ${i}`)}return r.join(" \xB7 ")}function k4(e,t,a){const r=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(l=>l!==xn);return r.length===0?e.allOption?e.allLabel??a:null:r.map(l=>A4(e,l)).join(", ")}function A4(e,t){const a=[...e.items??[],...(e.groups??[]).flat()];for(const r of a)if(r!=null){if(typeof r=="string"){if(r===t)return r;continue}if(r.value===t)return r.displayLabel??r.labels?.join(" ")??r.value}return t}function Ln({title:e,titleLevel:t=2,headerAction:a,headerSummary:r,collapsible:l=!1,defaultCollapsed:s=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:d,selected:m={},onSelect:p,align:C,sectionAlign:b,className:x}){const f=(C??(b==="vertical"?"newline":"inline"))==="inline",{t:h}=_e.useTranslation(),[_,g]=o.useState(s),k=i??_,v=()=>{const N=!k;g(N),u?.(N)},B=N=>{if(!l)return;const F=N.target;!F||typeof F.closest!="function"||F.closest(".filter-panel__collapse-toggle")||F.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||v()},y=o.useMemo(()=>r!==void 0||!k?"":B4(d,m,h("common.all","\uC804\uCCB4")),[r,k,d,m,h]),w=r??(y?n.jsx("span",{className:"filter-panel__header-summary body-3",children:y}):null),A=e||a||r||l,E=o.useId(),D=t?`h${t}`:"span";return n.jsxs("div",{className:we("filter-panel",l?"filter-panel--collapsible":"",k?"filter-panel--collapsed":"",x),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?E:void 0,children:[A&&n.jsxs("div",{className:"filter-panel__header",onClick:l?B:void 0,children:[n.jsx("div",{className:"filter-panel__title-row",children:e&&n.jsx(D,{id:E,className:"filter-panel__title h4",children:e})}),n.jsxs("div",{className:"filter-panel__header-actions",children:[k?w:a,l&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:k?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:k?h("common.expand","\uD3BC\uCE58\uAE30"):h("common.collapse","\uC811\uAE30"),showTooltipInfo:k?h("common.expand","\uD3BC\uCE58\uAE30"):h("common.collapse","\uC811\uAE30"),"aria-expanded":!k,onClick:v})]})]}),!k&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:we("filter-panel__sections",f?"filter-panel__sections--row":""),children:d.map(N=>{const F=m[N.label],R=F===void 0||(Array.isArray(F)?F.length===0:!1),K=(N.items??[]).filter($=>$!=null);N.allOption&&K.some($=>(typeof $=="string"?$:$.value)===xn)&&Mt(`filter-panel-all-value:${N.label}`,`[FilterPanel] '${N.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${xn}' \uC778 \uBCF4\uAE30\uAC00 \uD568\uAED8 \uC788\uB2E4 \u2014 \uB450 \uC120\uD0DD\uC774 \uAD6C\uBCC4\uB418\uC9C0 \uC54A\uB294\uB2E4. \uBCF4\uAE30 \uAC12\uC744 \uBC14\uAFD4\uB77C.`);const L=$=>{const T=typeof $=="string"?$:$.value,J=typeof $!="string"&&!!$.disabled,q=typeof $!="string"?$.labels:void 0,O=typeof $!="string"?$.displayLabel:void 0,Q=typeof $!="string"?$.tooltip:void 0,P=typeof $!="string"?$.descriptionTooltip:void 0,V=typeof $!="string"?$.shape:void 0,W=Array.isArray(F)?F.includes(T):F===T;return n.jsx(fe,{htmlType:"button",size:"keyboard",label:q??O??T,type:N.itemType??(q?"bar":T.length===1?"dot":void 0),selected:W,disabled:J,shape:V,showTooltipInfo:!!Q,tooltipInfoText:Q,tooltipDescription:P,onClick:()=>p?.(T,N.label)},T)};return n.jsxs(o.Fragment,{children:[N.groupLabel&&n.jsxs("div",{className:"filter-panel__group-label-row",children:[n.jsx("div",{className:"filter-panel__group-label body-2",children:N.groupLabel}),N.groupAction]}),n.jsxs("div",{className:we("filter-panel__section",N.layout==="row"?"filter-panel__section--row":"",N.block?"filter-panel__section--block":""),children:[n.jsxs("div",{className:"filter-panel__section-label-row",children:[n.jsx("span",{className:"filter-panel__section-label body-3",children:N.displayLabel??N.label}),N.labelAction??(N.labelInfo?n.jsx(Ha,{...N.labelInfo}):null)]}),N.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:N.content}):N.type==="input"?n.jsx(Xn,{className:"filter-panel__textfield",placeholder:N.placeholder,ariaLabel:N.displayLabel??N.label,value:m[N.label]??"",onChange:$=>p?.($,N.label),error:N.error}):!N.multiple&&N.display==="segmented"?n.jsx(wn,{ariaLabel:N.displayLabel??N.label,options:[...N.allOption?[{key:xn,label:N.allLabel??h("common.all","\uC804\uCCB4"),disabled:N.allOptionDisabled}]:[],...K.map($=>{const T=typeof $=="string"?$:$.value,J=typeof $!="string"?$.displayLabel:void 0,q=typeof $!="string"?$.disabled:void 0;return{key:T,label:J??T,disabled:q}})],value:R&&N.allOption?xn:m[N.label]??"",onChange:$=>p?.($,N.label),size:32}):!N.multiple&&N.display==="dropdown"?n.jsx(fn,{className:"filter-panel__dropdown",ariaLabel:typeof N.label=="string"?N.label:void 0,size:40,options:[...N.allOption?[{value:xn,label:N.allLabel??h("common.all","\uC804\uCCB4"),disabled:N.allOptionDisabled}]:[],...K.map($=>{const T=typeof $=="string"?$:$.value,J=typeof $!="string"?$.displayLabel:void 0,q=typeof $!="string"?$.disabled:void 0;return{value:T,label:J??T,disabled:q}})],value:R&&N.allOption?xn:m[N.label],onChange:$=>p?.($,N.label)}):n.jsxs("div",{className:N.groups?"filter-panel__item-groups":"filter-panel__items",children:[N.allOption&&!N.groups&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:N.allLabel??h("common.all","\uC804\uCCB4"),selected:R,disabled:N.allOptionDisabled,onClick:()=>p?.(xn,N.label)}),N.groups?N.groups.map(($,T)=>n.jsxs("div",{className:"filter-panel__item-group",children:[T===0&&N.allOption&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:N.allLabel??h("common.all","\uC804\uCCB4"),selected:R,disabled:N.allOptionDisabled,onClick:()=>p?.(xn,N.label)}),$.filter(J=>J!=null).map(L)]},T)):K.map(L)]})]})]},N.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const N4=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],sc=[8,4,2,1],hn="show",kn="hide";function lc(e,t){return{label:e("wordTable.filter.composition","\uAD6C\uC131"),items:[{value:"image",disabled:!t.hasImage,displayLabel:e("wordTable.filter.image","\uC774\uBBF8\uC9C0")},{value:"word",displayLabel:e("wordTable.filter.word","\uB2E8\uC5B4")},{value:"standardPron",displayLabel:e("wordTable.filter.standardPron","\uD45C\uC900 \uBC1C\uC74C")},{value:"colloquialPron",disabled:!t.hasColloquial,displayLabel:e("wordTable.filter.colloquialPron","\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C")}],multiple:!0,allOption:!0}}function ic(e){return{label:e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5"),items:[{value:"landscape",displayLabel:e("wordTable.filter.landscape","\uAC00\uB85C")},{value:"portrait",displayLabel:e("wordTable.filter.portrait","\uC138\uB85C")}],display:"segmented"}}function uc(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function cc(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function dc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function pc(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:"dashed",displayLabel:e("wordTable.filter.dotted","\uC810\uC120")},{value:"corner",displayLabel:e("wordTable.filter.corner","\uCF54\uB108")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function mc(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:hn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function hc(e,t){return{label:e(t.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[t.itemCount,...sc.filter(a=>a<t.itemCount)].map(a=>({value:`${a}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:a})})),display:"segmented"}}function Cc(e,t){return e===t||!sc.includes(e)?Number.POSITIVE_INFINITY:e}function E4(e){return{label:e("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638"),items:[{value:"left",displayLabel:e("wordTable.filter.pageNumberLeft","\uC67C\uCABD")},{value:"center",displayLabel:e("wordTable.filter.pageNumberCenter","\uC911\uC559")},{value:"right",displayLabel:e("wordTable.filter.pageNumberRight","\uC624\uB978\uCABD")},{value:kn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function fc(e){return e==="left"||e==="center"||e==="right"?e:"none"}function gc(e,t){return{[e("wordTable.filter.composition","\uAD6C\uC131")]:t.contentTypes,[e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")]:t.orientation,[e("wordTable.filter.border","\uC678\uACFD\uC120")]:t.showOutline?hn:kn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?hn:kn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?hn:kn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?hn:kn}:{}}}function bc(e,t,a,r){return a===e("wordTable.filter.composition","\uAD6C\uC131")?t===xn?(r.setContentTypes(()=>[]),!0):(r.setContentTypes(l=>l.includes(t)?l.filter(s=>s!==t):[...l,t]),!0):a===e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")?(r.setOrientation(t==="landscape"?"landscape":"portrait"),!0):a===e("wordTable.filter.border","\uC678\uACFD\uC120")?(r.setShowOutline(t===hn),!0):a===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(r.setCutLine(t),!0):a===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(r.setShowDivLine(t===hn),!0):a===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(r.setShowTopInfo?.(t===hn),!0):a===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(r.setShowBottomInfo?.(t===hn),!0):!1}function D4(e){return"sections"in e}function as(e){const{t}=_e.useTranslation(),{title:a,className:r,collapsible:l,defaultCollapsed:s,collapsed:i,onCollapsedChange:u,headerSummary:c}=e,d={collapsible:l,defaultCollapsed:s,collapsed:i,onCollapsedChange:u,headerSummary:c};if(D4(e))return n.jsx(Ln,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...d,align:"inline"});const{hasImage:m,hasColloquial:p,contentTypes:C,orientation:b,showOutline:x,cutLine:f,showDivLine:h,setters:_,showCutLine:g=!1,showDivLine2:k=!1,middleSections:v=[],extraSelected:B={},onExtraSelect:y,showPaperBands:w=!1,showTopInfo:A=!0,showBottomInfo:E=!0}=e,D=[lc(t,{hasImage:m,hasColloquial:p}),ic(t),...v,uc(t),...g?[pc(t)]:[],...k?[mc(t)]:[],...w?[cc(t),dc(t)]:[]],N={...gc(t,{contentTypes:C,orientation:b,showOutline:x,cutLine:f,showDivLine:h,showTopInfo:A,showBottomInfo:E}),...B},F=(R,K)=>{bc(t,R,K,_)||y?.(R,K)};return n.jsx(Ln,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:D,selected:N,onSelect:F,...d,sectionAlign:"horizontal"})}function rs(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function S4(e){return rs(e).replace(/"/g,""").replace(/'/g,"'")}function os(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let xr=null,ya=null;function j4(e,t,a,r="",l=""){if(e.length===0||ya&&ya.iframe.isConnected&&Date.now()-ya.at<1e4)return;const s=r?os(r):"";xr?.();let i=null;if(s){const d=document.title;document.title=s,i=()=>{document.title=d,window.removeEventListener("afterprint",i),xr===i&&(xr=null)},xr=i,window.addEventListener("afterprint",i)}const u=document.createElement("iframe");u.style.cssText="position:fixed;left:-10000px;top:0;width:1200px;height:900px;border:0;",document.body.appendChild(u);const c=u.contentDocument;if(!c){u.remove();return}ya={iframe:u,at:Date.now()},c.open(),c.write(ss(e,t,a,!0,s,l)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),ya?.iframe===u&&(ya=null)},0)})}function ss(e,t,a,r=!1,l="",s=""){l=l?os(l):"";const i=Array.from(document.styleSheets).flatMap(p=>{try{return Array.from(p.cssRules).map(C=>C.cssText)}catch{return[]}}).join(`
|
|
831
831
|
`),u="light",c=(()=>{try{return document.documentElement.lang||""}catch{return""}})(),d=s?`<div class="paper-head">${rs(s)}</div>`:"",m=e.map(p=>{const C=p.cloneNode(!0);return C.querySelectorAll('[data-play-state="play"]').forEach(b=>b.style.display=""),C.querySelectorAll('[data-play-state="pause"]').forEach(b=>b.style.display="none"),C.querySelectorAll(".word-table-cell__score-slot:not(.word-table-cell__score-slot--on)").forEach(b=>b.remove()),C.querySelectorAll(".word-table-cell__spinner").forEach(b=>b.remove()),C.querySelectorAll("img").forEach(b=>{b.style.opacity==="0"&&(b.setAttribute("onload","this.style.opacity=''"),b.setAttribute("onerror","this.style.visibility='hidden'"))}),`<div class="paper-wrap">${d}${C.outerHTML}</div>`}).join(`
|
|
832
832
|
`);return`<!DOCTYPE html>
|
|
833
833
|
<html${c?` lang="${S4(c)}"`:""} data-theme="${u}">
|
|
@@ -1037,14 +1037,14 @@ ${v.badge}`:v.badge:void 0;if(y&&c(v.code))return null;if(!v.badge&&!m)return p(
|
|
|
1037
1037
|
</html>`}const T4=1e3;function ls({getElements:e,paperW:t,paperH:a,fileName:r="",onPopupBlocked:l,header:s=""}){const{t:i}=_e.useTranslation(),u=o.useCallback(()=>{j4(e(),t,a,r,s)},[e,t,a,r,s]),c=o.useCallback(()=>{const m=e();if(m.length===0)return;const p=window.open("","_blank");if(!p){l?.();return}p.document.write(ss(m,t,a,!1,r,s)),p.document.close()},[e,t,a,r,l,s]),d=o.useCallback(()=>{const m=e();if(m.length===0)return;const p=ss(m,t,a,!1,r,s),C=new Blob([p],{type:"text/html;charset=utf-8"}),b=URL.createObjectURL(C),x=(r?os(r):"")||i("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C"),f=Object.assign(document.createElement("a"),{href:b,download:`${x}.html`});document.body.appendChild(f),f.click(),document.body.removeChild(f),setTimeout(()=>URL.revokeObjectURL(b),T4)},[e,t,a,r,s,i]);return{print:u,openNewWindow:c,downloadHtml:d}}function yc(e,t){const{t:a}=_e.useTranslation(),r=t?.paperBands===!0,[l,s]=o.useState("landscape"),[i,u]=o.useState(["image","word","standardPron"]),[c,d]=o.useState("show"),[m,p]=o.useState(!0),[C,b]=o.useState(!0),[x,f]=o.useState(!0),[h,_]=o.useState(!0),[g,k]=o.useState(8),[v,B]=o.useState("right"),y=e.length,w=e.some(J=>(J.words??[]).length>1),A=e.some(J=>(J.words??[]).some(q=>!!q.colloquialLabel)),E=Math.min(g,Math.max(y,1)),D=o.useMemo(()=>Xu(e,E),[e,E]),N=D.length>1,F=E,[R,K]=o.useState(!1);o.useEffect(()=>{let J=!1;if(!sa()){K(!1);return}return Promise.all(e.flatMap(q=>(q.words??[]).map(O=>Nl(O.label,O.homonum)))).then(q=>{J||K(q.some(Boolean))},()=>{}),()=>{J=!0}},[e]);const L=o.useMemo(()=>[lc(a,{hasImage:R,hasColloquial:A}),ic(a),...y>0?[hc(a,{hasPairs:w,itemCount:y})]:[],uc(a),...F>1?[pc(a)]:[],...w?[mc(a)]:[],...r?[cc(a),dc(a)]:[]],[a,R,A,y,w,N,F,r]),$={...gc(a,{contentTypes:i,orientation:l,showOutline:m,cutLine:c,showDivLine:h,showTopInfo:C,showBottomInfo:x}),...y>0?{[a(w?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${E}\uAC1C`}:{},...N?{[a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:v}:{}},T=o.useCallback((J,q)=>{bc(a,J,q,{setContentTypes:u,setOrientation:s,setShowOutline:p,setCutLine:d,setShowDivLine:_,setShowTopInfo:b,setShowBottomInfo:f})||(q===a("wordTable.filter.itemsPerPagePair","\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218")||q===a("wordTable.filter.itemsPerPageWord","\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218")?k(Cc(parseInt(J),y)):q===a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&B(fc(J)))},[a,y]);return{settings:{orientation:l,contentTypes:i,cutLine:c,showOutline:m,showDivLine:h,count:F,showTopInfo:C,showBottomInfo:x},filterSections:L,filterSelected:$,handleSelect:T,pages:D,isPaginated:N,pageNumberPosition:v}}function M4({items:e,words:t,title:a,subtitle:r,emptyText:l,buttons:s,renderButtons:i,renderFooter:u,footerClassName:c,footerLayout:d,printFileName:m,showSettings:p,autoPrint:C,className:b,onClose:x,scoring:f=!1,onScoreChange:h,printHeader:_,brand:g,code:k,beforeClose:v}){const{t:B}=_e.useTranslation(),y=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(t)?t:[]).filter(z=>typeof z=="string"&&z.length>0).map((z,ne)=>({id:`${z}-${ne}`,words:[{label:z}]})),[e,t]),{settings:w,filterSections:A,filterSelected:E,handleSelect:D,pages:N,isPaginated:F,pageNumberPosition:R}=yc(y,{paperBands:!!g?.show}),K=o.useMemo(()=>Zu(N.map(z=>z.length)),[N]),[L,$]=o.useState({}),T=o.useCallback((z,ne)=>{$(H=>({...H,[yr(z)]:Gu(H[yr(z)]??null,ne)}))},[]),J=o.useRef(h);o.useEffect(()=>{J.current=h});const q=o.useRef(L);o.useEffect(()=>{q.current!==L&&(q.current=L,J.current?.(Qo(L)))},[L]);const O=o.useMemo(()=>Qo(L),[L]),Q=o.useRef(null),{toastMessage:P,toastKey:V,showWarning:W,clearToast:G}=Oi("warning"),S=o.useRef([]),M=o.useCallback(()=>F?S.current.filter(z=>z!==null):Q.current?[Q.current]:[],[F]),{print:I,openNewWindow:Z}=ls({getElements:M,paperW:ga[w.orientation].width,paperH:ga[w.orientation].height,fileName:m??"",header:_??"",onPopupBlocked:()=>W(B("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."))}),le=o.useMemo(()=>u?void 0:i?i({print:I,openNewWindow:Z}):m?[{label:B("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>Z()},{label:B("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>I()},...s??[]]:s,[u,i,m,s,B,I,Z]),oe=o.useMemo(()=>u?u({print:I,openNewWindow:Z}):void 0,[u,I,Z]),de=o.useRef(!1),re=o.useRef(I);return o.useEffect(()=>{re.current=I},[I]),o.useEffect(()=>{if(!C||de.current)return;const z=window.setTimeout(()=>{de.current=!0,re.current()},100);return()=>window.clearTimeout(z)},[C]),n.jsxs(Wn,{title:a??B("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:r,size:"large",className:we("word-table-popup",b),buttons:le,footer:oe,footerClassName:c,footerLayout:d,beforeClose:v,onClose:x,children:[y.length>0?n.jsxs("div",{className:"word-table-popup__body",children:[p&&n.jsx(as,{sections:A,selected:E,onSelect:D}),F?n.jsx("div",{className:"word-table-popup__pages",children:N.map((z,ne)=>n.jsx(ba,{items:z,orientation:w.orientation,contentTypes:w.contentTypes,cutLine:w.cutLine,showOutline:w.showOutline,showDivLine:w.showDivLine,count:w.count,contentRef:H=>{S.current[ne]=H},pageNumber:{current:ne+1,total:N.length},pageNumberPosition:R,brand:g&&{...g,top:w.showTopInfo,bottom:w.showBottomInfo},code:k,scoring:f,scoreIndexOffset:K[ne],marks:O,onMarkClick:T},ne))}):n.jsx("div",{className:"word-table-popup__table",children:n.jsx(ba,{items:y,orientation:w.orientation,contentTypes:w.contentTypes,cutLine:w.cutLine,showOutline:w.showOutline,showDivLine:w.showDivLine,count:w.count,contentRef:Q,fitHeight:!0,scoring:f,marks:O,onMarkClick:T,brand:g&&{...g,top:w.showTopInfo,bottom:w.showBottomInfo},code:k})})]}):n.jsx("p",{className:"word-table-popup__empty body-3",children:l??B("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsx(ha,{message:P,position:"top",onClose:G},V)]})}const L4=new Set(["x","triangle"]);function $4(e,t){const a=[];for(let r=0;r<e.length;r++){const l=t[String(r)];l&&L4.has(l)&&a.push(e[r])}return a}const R4=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function vc(e){const t=e.name.trim(),a=e.reviewRound;if(typeof a=="number"&&Number.isFinite(a)&&a>=0){const s=Math.floor(a);if(s===0)return{base:t,round:1};const i=(s===1?/\s*복습\s*\d{2}\.\d{2}$/:new RegExp(`(?:^|\\s)${s}\uCC28\\s*\uBCF5\uC2B5\\s*\\d{2}\\.\\d{2}$`)).exec(t);return{base:i?t.slice(0,i.index).trim():t,round:s+1}}let r=t,l=1;for(;;){const s=R4.exec(r);if(!s)break;l=Math.max(l,(s[1]?Number(s[1]):1)+1),r=r.slice(0,s.index).trim()}return{base:r,round:l}}function P4(e,t){const[,a,r]=io(t).split("-"),l=`${a}.${r}`,{base:s,round:i}=vc(typeof e=="string"?{name:e}:e),u=i>=2?`${i}\uCC28 `:"";return`${s||"\uB2E8\uC5B4\uD45C"} ${u}\uBCF5\uC2B5 ${l}`}function I4(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:vc(e).round}}function F4(e,t){const a={};for(const[r,l]of Object.entries(t)){if(l!=="o"&&l!=="triangle"&&l!=="x")continue;const s=Number(r),i=e[s];i&&(a[r]=i)}return a}function O4(e){return e.map(t=>t.label).join(" / ")}function z4(e){return e.map(t=>t.homonum!=null?`${t.label}#${t.homonum}`:t.label).join(" / ")}function xc(e){return e.split(" / ").map(t=>t.replace(/#\d+$/,"")).join(" / ")}function W4(e,t,a){const r=Hl(a);return[e.trim(),r,t.trim()].filter(Boolean).join(" \xB7 ")}function _c(e,t,a){return a===0?0:(e+t*.5)/a}function H4(e){const t=new Map,a=[...e].sort((l,s)=>l.scoredAt.localeCompare(s.scoredAt));for(const l of a)for(const[s,i]of Object.entries(l.marks)){const u=l.labels?.[s];if(!u)continue;const c=t.get(u)??{o:0,triangle:0,x:0,latest:i,latestAt:l.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=l.scoredAt,t.set(u,c)}const r=[];for(const[l,s]of t){const i=s.o+s.triangle+s.x;r.push({label:xc(l),key:l,tried:i,o:s.o,triangle:s.triangle,x:s.x,rate:_c(s.o,s.triangle,i),latest:s.latest,latestAt:s.latestAt})}return r.sort((l,s)=>l.rate-s.rate||s.tried-l.tried||mn(l.label,s.label)||mn(l.key??l.label,s.key??s.label)),r}function V4(e){const t=new Map;for(const r of e){const l=r.tableId??`name:${r.tableName}`,s=t.get(l)??{tableName:r.tableName,tableId:r.tableId,rows:[]};s.rows.push(r),t.set(l,s)}const a=[];for(const r of t.values()){const l=u=>Object.values(u.marks).filter(c=>c==="o"||c==="triangle"||c==="x").length,s=r.rows.filter(u=>l(u)>0).sort((u,c)=>u.scoredAt.localeCompare(c.scoredAt));if(s.length===0)continue;const i=s.map(u=>{const c=Object.values(u.marks),d=c.filter(p=>p==="o").length,m=c.filter(p=>p==="triangle").length;return _c(d,m,l(u))});a.push({tableName:r.tableName,tableId:r.tableId,rates:i,times:s.map(u=>u.scoredAt),delta:i.length>=2?i[i.length-1]-i[0]:null})}return a.sort((r,l)=>(l.times[l.times.length-1]??"").localeCompare(r.times[r.times.length-1]??"")),a}function q4(e,t=8){return e.filter(a=>a.latest!=="o").slice(0,t)}function U4(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 G4(e){const t=new Map;let a=0,r=0;const l=e.map((i,u)=>({r:i,at:u})).sort((i,u)=>i.r.answeredAt.localeCompare(u.r.answeredAt)||U4(i.r.id,u.r.id)||i.at-u.at).map(i=>i.r);for(const i of l){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}`,m=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(m.tried++,i.isCorrect||m.wrong++,m.title=u,m.latestCorrect=i.isCorrect,m.latestAt=i.answeredAt,m.lastSelected=i.selected,i.setId){const p=m.setIds.indexOf(i.setId);p>0&&m.setIds.splice(p,1),p!==0&&m.setIds.unshift(i.setId)}t.set(d,m)}const s=[...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 s.sort((i,u)=>i.rate-u.rate||u.tried-i.tried||mn(i.title,u.title)),{items:s,counted:a,skippedNoTitle:r}}function K4(e,t=8){return e.filter(a=>!a.latestCorrect).slice(0,t)}function Y4(e){const t=new Map;for(const r of e){const l=t.get(r.trainingType)??[];l.push(r),t.set(r.trainingType,l)}const a=[...t.entries()].map(([r,l])=>({trainingType:r,items:l,pending:l.filter(s=>!s.latestCorrect).length}));return a.sort((r,l)=>l.pending-r.pending||r.trainingType.localeCompare(l.trainingType)),a}const is=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function Z4(e){const t=new Map;let a=0;for(const s of e){if(s.latestCorrect)continue;const i=s.setIds[0];if(!i){a++;continue}const u=`${s.trainingType}|${i}`,c=t.get(u)??{setId:i,trainingType:s.trainingType,pending:0};c.pending++,t.set(u,c)}const r=(s,i)=>i.pending-s.pending||s.trainingType.localeCompare(i.trainingType)||s.setId.localeCompare(i.setId),l=[...t.values()];return{sentence:l.filter(s=>is.includes(s.trainingType)).sort(r),word:l.filter(s=>!is.includes(s.trainingType)).sort(r),noSet:a}}function X4(e,t,a=5){const r=new Set(t);if(r.size===0)return[];const l=[];for(const s of e){const i=new Set,u=[];for(const c of s.cellLabels)r.has(c)&&!i.has(c)&&(i.add(c),u.push(c));u.length!==0&&l.push({id:s.id,name:s.name,kind:s.kind,covered:u,totalCells:s.cellLabels.length})}return l.sort((s,i)=>i.covered.length-s.covered.length||s.totalCells-i.totalCells||mn(s.name,i.name)),l.slice(0,Math.max(0,a))}function J4(e,t){const a=new Set(e.flatMap(r=>r.covered));return t.filter(r=>!a.has(r))}function Q4(e,t){const a=new Map;for(const l of e)for(const s of l.cells){const i=l.labelOf(s);a.has(i)||a.set(i,s)}const r=[];for(const l of t){const s=a.get(l);s!==void 0&&r.push(s)}return r}function us(e,t,a){return typeof e=="string"&&e?e:t.replace(/\{\{(\w+)\}\}/g,(r,l)=>String(a[l]))}function ex(e,t){const a=Number.isFinite(e)?Math.round(e):0;if(!a||a<=0)return"-";const r=Math.floor(a/60),l=a%60;return t?t(r,l):r>0&&l>0?us(Vt.t("customers.duration.minSec",{m:r,s:l,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:r,s:l}):r>0?us(Vt.t("customers.duration.min",{m:r,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:r}):us(Vt.t("customers.duration.sec",{s:l,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s:l})}function tx(e,t){const a=[],r=new Set;for(const l of e){const s=t(l);r.has(s)||(r.add(s),a.push({key:s,value:l,pinned:!1}))}return a}function nx(e,t){return e.map(a=>a.key===t?{...a,pinned:!a.pinned}:a)}function ax(e,t){return e.filter(a=>a.key!==t)}function rx(e,t,a){const r=e.filter(d=>d.pinned),l=new Set(r.map(d=>d.key)),s=e.length-r.length,i=[],u=new Set(l);for(const d of t){if(i.length>=s)break;const m=a(d);u.has(m)||(u.add(m),i.push({key:m,value:d,pinned:!1}))}const c=[...i];return e.map(d=>d.pinned?d:c.shift()).filter(d=>d!==void 0)}function ox(e){return e.map(t=>t.value)}function sx(e){const{category:t={},isSelected:a=!1,onClick:r}=e||{},l=t?.key?` icon-grid-menu__button--${t.key}`:"",s=o.useId();return n.jsxs("div",{className:`icon-grid-menu__button-wrapper${l}`,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":s,children:n.jsx(tt,{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:s,className:"icon-grid-menu__button-label button-1",children:t.label})]})}function lx(e){const{categories:t=[],selected:a,onSelect:r,size:l="medium"}=e||{},s=a!==void 0,[i,u]=o.useState(()=>s?null:(t&&t[0]?.key)??null),c=s?a:i,d=o.useRef(r);o.useEffect(()=>{d.current=r});const m=o.useRef(!1),p=(t&&t[0]?.key)??null;o.useEffect(()=>{if(s||m.current||!p)return;m.current=!0;const b=i??p;i==null&&u(b),d.current?.(b)},[s,p]);const C=o.useCallback(b=>{const x=c===b?null:b;m.current=!0,s||u(x),r?.(x)},[c,s,r]);return n.jsx("div",{className:`icon-grid-menu icon-grid-menu--${l}`,children:(t||[]).map(b=>n.jsx(sx,{category:b,isSelected:c===b.key,onClick:()=>C(b.key)},b.key))})}function ix({subs:e=[],selected:t,onSelect:a,size:r="medium"}){const l=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(s=>n.jsx(fe,{htmlType:"button",size:l,type:"bar",label:s.label,selected:t===s.key,className:"choice-chips__button",onClick:()=>a?.(s.key)},s.key))})})}function ux({onTermsClick:e,onPrivacyClick:t,contact:a}={}){const r=a?.email??"support@ihab.co.kr",l=a?.tel??"031-380-3724",{t:s}=_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:s("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:s("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:s("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:s("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:s("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:s("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:s("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:s("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:s("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:s("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:s("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:s("footer.ceo","\uB300\uD45C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:s("footer.ceoName","\uD55C\uC9C0\uD61C")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:s("footer.address","\uC8FC\uC18C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:s("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:s("footer.bizNo","\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638")})," ",n.jsx("span",{className:"footer-meta caption-1",children:s("footer.bizNoValue","526-81-02926")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:s("footer.support","\uACE0\uAC1D\uC13C\uD130")})," ",n.jsxs("span",{className:"footer-meta caption-1",children:[r," \xA0 ",l]})]})]})]}),n.jsx("div",{className:"site-footer__copyright footer-copyright caption-1",children:"\xA9 IHAB, Inc. All rights reserved."})]})})}function cx({logo:e,logoAlt:t="",logoHref:a,links:r=[],actions:l,className:s,containerClassName:i,renderLink:u,menuLabel:c}){const{t:d}=_e.useTranslation(),m=c??{open:d("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:d("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[p,C]=o.useState(!1),b=o.useId(),x=o.useRef(null);o.useEffect(()=>{if(!p)return;const _=Gn(()=>{const v=document.getElementById(b);v&&v.contains(document.activeElement)&&x.current?.focus(),C(!1)}),g=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,k=v=>{v.matches&&C(!1)};return g&&(g.matches&&C(!1),g.addEventListener?.("change",k)),()=>{_(),g?.removeEventListener?.("change",k)}},[p,b]);const f=i?`${i} landing-header__inner`:"landing-header__inner",h=(_,g)=>u?u(_,{onClick:g}):n.jsx("a",{href:_.href,onClick:g,"aria-current":_.current?"page":void 0,children:_.label});return n.jsxs("header",{className:s?`landing-header ${s}`:"landing-header",children:[n.jsxs("div",{className:f,children:[e!=null&&(()=>{const _=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:_}):n.jsx("div",{className:"landing-header__brand",children:_})})(),r.length>0&&n.jsx("nav",{className:"landing-header__links",children:r.map((_,g)=>n.jsx("span",{children:h(_)},`${g}:${_.href}`))}),n.jsxs("div",{className:"landing-header__actions",children:[l,r.length>0&&n.jsx("button",{ref:x,type:"button",onClick:()=>C(_=>!_),"aria-expanded":p,"aria-controls":b,"aria-label":p?m.close:m.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:b,hidden:!p,className:"landing-header__drawer",children:n.jsx("div",{className:i??void 0,children:r.map((_,g)=>n.jsx("span",{className:"landing-header__drawer-item",children:h(_,()=>C(!1))},`${g}:${_.href}`))})})]})}function dx({children:e,action:t,onClick:a,className:r}){const l=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:l,onClick:a,...Vu(a),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function px({mountedRef:e}){const t=o.useRef({phase:"sound",at:0}),a=o.useRef(0),r=o.useRef(null),l=o.useRef(null),s=o.useCallback(()=>{const f=t.current,h=f.phase!=="sound"&&f.at>0;l.current=h?{phase:f.phase,elapsed:Math.max(0,Date.now()-f.at)}:null},[]),i=o.useCallback(()=>{const f=l.current;return l.current=null,f},[]),u=o.useCallback(()=>{a.current+=1,t.current={phase:"sound",at:0}},[]),c=o.useCallback((f,h,_=0)=>{if(!(f>0))return Promise.resolve(!0);const g=a.current;return t.current={phase:h,at:Date.now()-Math.max(0,_)},new Promise(k=>{const v=setTimeout(()=>{r.current===v&&(r.current=null),k(!!e.current&&g===a.current)},f);r.current=v})},[e]),d=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),m=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),p=o.useCallback(()=>{const f=t.current;return f.phase!=="sound"&&f.at>0},[]),C=o.useCallback(()=>a.current,[]),b=o.useCallback(f=>f===a.current,[]),x=o.useCallback(()=>{a.current+=1},[]);return o.useEffect(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]),o.useMemo(()=>({positionRef:t,isRunning:p,generation:C,isCurrent:b,abort:u,waitPad:c,enterSound:d,leave:m,pause:s,resume:i,__bumpGenerationForTest:x}),[p,C,b,u,c,d,m,s,i,x])}const va=9,mx=e=>Math.round(Math.min(va,Math.max(0,e))/va*100),hx=e=>e/100*va,Xa=2,wc=.1,Cx=e=>Math.min(Xa,Math.max(0,e)),fx=.1,gx=e=>Math.round(e*1e6)/1e6;function Ja(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return Cx(t);const a=Math.min(va,Math.max(0,Number(e.level)||0))/va,r=Number(e.mainVolume);return r>0?a>0?gx(Math.min(Xa,Math.max(fx,a/r))):0:1}const Bc=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function kc(e){return Bc(e)}function cs(e){return Bc(e)*Ja(e)}function ds(e,t=TC()){const a=Number.isFinite(t)&&t>0?t:1;return Math.min(1,cs(e)/a)}function Jn(e,t){const a={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(a.noiseRatio=Ja({level:a.level,mainVolume:a.mainVolume})),a}const Qn={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},ps=o.createContext(null);function _r(){return o.useContext(ps)}const ms=e=>`${jC()}/${e}`,Ac=e=>Array.from({length:10},(t,a)=>ms(`${e}-${String(a+1).padStart(2,"0")}.mp3`)),wr={get defaultNoise(){return ms("noise1.mp3")},get street(){return Ac("noise2")},get restaurant(){return Ac("noise3")},get buzz(){return ms("noise4.mp3")}};function bx(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return wr.defaultNoise;case"street":return wr.street[t];case"restaurant":return wr.restaurant[t];case"buzz":return wr.buzz;default:return null}}function yx({noisePlayer:e,audioRef:t,playbackStateRef:a,sequencer:r}){const l=o.useRef(e?.registerAnalyser);l.current=e?.registerAnalyser;const s=o.useRef(null),[i,u]=o.useState(null),c=o.useRef(null),d=o.useRef(null),m=o.useRef(null),p=o.useRef(null),C=o.useRef(0),b=o.useRef(null),x=o.useCallback(()=>!!r?.isRunning(),[r]),f=o.useCallback(()=>{p.current!==null&&(cancelAnimationFrame(p.current),p.current=null),b.current!==null&&(clearTimeout(b.current),b.current=null)},[]),h=o.useCallback((B,y=250)=>{const w=s.current;if(!w)return;const A=d.current;if(A){d.current=null;try{w.pause()}catch{}w.src=A,w.load()}if(!w.src)return;C.current+=1,f();try{to(),er(w).then(F=>{if(s.current===w)try{l.current?.("noise",F)}catch{}})}catch{}const E=w.paused?0:tr(w);w.paused&&On(w,0),w.play().catch(()=>{});const D=performance.now(),N=()=>{const F=Math.min(1,(performance.now()-D)/y);try{On(w,E+(B-E)*F)}catch{}F<1?p.current=requestAnimationFrame(N):p.current=null};p.current=requestAnimationFrame(N)},[f]),_=o.useCallback((B=250,y)=>{const w=s.current;if(!w||w.paused){y?.();return}const A=++C.current;f();const E=performance.now(),D=tr(w),N=()=>{const F=Math.min(1,(performance.now()-E)/B);try{On(w,D*(1-F))}catch{}if(F<1)p.current=requestAnimationFrame(N);else{p.current=null,b.current!==null&&(clearTimeout(b.current),b.current=null);try{w.pause()}catch{}y?.()}};p.current=requestAnimationFrame(N),b.current=setTimeout(()=>{if(b.current=null,C.current===A){p.current!==null&&(cancelAnimationFrame(p.current),p.current=null);try{w.paused||(On(w,0),w.pause(),y?.())}catch{}}},B+150)},[f]);o.useEffect(()=>{const B=document.createElement("audio");return B.loop=!0,B.crossOrigin="anonymous",s.current=B,()=>{f();try{B.pause(),B.removeAttribute("src"),B.load()}catch{}s.current=null,c.current=null,d.current=null}},[f]);const g=e?ds(e.settings):0,k=!!e?.settings.enabled&&g>0;o.useEffect(()=>{if(!k)return;let B=0;const y=setInterval(()=>{const w=s.current;if(!w||w.paused){B=0;return}const A=t.current;if(A&&!A.paused&&!A.ended||x()||a.current==="playing"){B=0;return}B+=1,B>=2&&(B=0,_())},400);return()=>clearInterval(y)},[_,k,t,a,x]),o.useEffect(()=>{const B=()=>{const y=s.current;if(document.hidden){if(y&&!y.paused){f();try{y.pause()}catch{}}return}if(!y||!y.paused)return;const w=t.current,A=!!w&&!w.paused&&!w.ended||x()||a.current==="playing",E=m.current;A&&E?.enabled&&E.volume>0&&h(E.volume)};return document.addEventListener("visibilitychange",B),()=>document.removeEventListener("visibilitychange",B)},[f,h,t,a,x]),o.useEffect(()=>{m.current=e?{enabled:e.settings.enabled,volume:g,type:e.settings.type}:null},[e,e?.settings.enabled,g,e?.settings.type]);const v=o.useRef(null);return o.useEffect(()=>()=>{v.current?.(),v.current=null},[]),o.useEffect(()=>{const B=e?.settings,y=s.current;if(!y)return;const w=B?ds(B):0;if(!B||!B.enabled||w===0){_();return}if(c.current!==B.type){const A=bx(B.type);A&&(c.current=B.type,u(A),d.current=A,_(150,()=>{if(d.current!==A)return;d.current=null,y.src=A,y.load();const E=t.current;if(E&&!E.paused||x()){v.current?.();const D=()=>{y.removeEventListener("canplay",D),v.current===N&&(v.current=null);const F=t.current,R=m.current;(F&&!F.paused&&!F.ended||x())&&R?.enabled&&R.volume>0&&h(R.volume)},N=()=>y.removeEventListener("canplay",D);v.current=N,y.addEventListener("canplay",D)}}))}else{const A=t.current,E=!!A&&!A.paused&&!A.ended||x()||a.current==="playing";if(E&&d.current)h(w);else if(E&&y.paused&&y.src)h(w);else if(!y.paused)if(!E)_();else{f();const D=tr(y),N=performance.now(),F=()=>{const R=Math.min(1,(performance.now()-N)/150);try{On(y,D+(w-D)*R)}catch{}R<1?p.current=requestAnimationFrame(F):p.current=null};p.current=requestAnimationFrame(F)}}},[e?.settings,e?.settings.enabled,g,e?.settings.type,f,h,_,t,a,m,x]),o.useEffect(()=>{const B=s.current;if(B)try{B.playbackRate=Math.min(1.25,Math.max(.75,e?.settings.speed??1))}catch{}},[e?.settings.speed]),{noiseAudioRef:s,activeNoiseUrl:i,noiseSettingsRef:m,cancelNoiseFade:f,fadeInNoise:h,fadeOutNoise:_}}function vx({ttsText:e,playbackRate:t,mainVolume:a,fillRef:r,waveProgressRef:l,setProgress:s,setPlaybackState:i,setStateLocal:u,fadeInNoise:c,fadeOutNoise:d,noiseSettingsRef:m,onDoneRef:p,handleEndRef:C}){const b=o.useRef(null),x=o.useRef(0),f=o.useRef(null),h=o.useRef(0),_=o.useRef(!1);o.useEffect(()=>()=>{h.current++;try{if(f.current&&(cancelAnimationFrame(f.current),f.current=null),_.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}_.current=!1}}catch{}},[]);const g=(B,y=1)=>{try{const w=(B||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(B||"").length);return Math.max(700,Math.round(w*300/Math.max(.25,y)))}catch{return 1200}},k=o.useCallback(B=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof p.current=="function"&&p.current(!1)}catch{}return}const y=window.speechSynthesis,w=++h.current;try{try{y.cancel()}catch{}const A=B??e,E=Array.isArray(A)?A.filter(L=>!!L):[A||""];E.length===0&&E.push("");const D=Math.max(.3,Math.min(3,t));x.current=E.reduce((L,$)=>L+g($,D||1),0),b.current=performance.now(),s(0),i("playing"),u("playMode");const N=m.current;N?.enabled&&(N?.volume??0)>0&&c(N.volume);const F=()=>{try{const L=b.current||performance.now(),$=performance.now()-L,T=x.current||1200,J=Math.min(1,$/T);try{r.current&&(r.current.style.left=`${J*100}%`),l.current&&l.current.style.setProperty("--progress",String(J))}catch{}J<1&&(f.current=requestAnimationFrame(F))}catch{}},R=()=>{if(w===h.current)try{f.current&&(cancelAnimationFrame(f.current),f.current=null),s(1),i("stopped");try{C.current?.()}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{}},K=L=>{const $=new SpeechSynthesisUtterance(E[L]);try{$.rate=D}catch{}try{$.volume=Math.max(0,Math.min(1,a))}catch{}$.onend=()=>{if(w===h.current){if(L<E.length-1){try{K(L+1)}catch{R()}return}R()}},$.onerror=()=>{R()},$.onstart=()=>{if(!(L>0))try{f.current&&(cancelAnimationFrame(f.current),f.current=null),f.current=requestAnimationFrame(F)}catch{}},_.current=!0,y.speak($)};try{K(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,l,s,i,u,m,p,C]),v=o.useCallback(()=>{h.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}f.current&&(cancelAnimationFrame(f.current),f.current=null),d(),b.current=null}catch{}i("stopped"),u("active"),s(0)},[d,i,u,s]);return{startTTS:k,stopTTS:v}}const xx=.01,_x=.3;async function wx(e,t,a,r=!1){let l=null;try{const s=window.AudioContext||window.webkitAudioContext;l=new s;const i=await l.decodeAudioData(e.slice(0)),u=i.numberOfChannels>0?i.getChannelData(0):null;if(!u)return null;let c=0;if(r){const b=Math.floor(_x*i.sampleRate),x=Math.min(u.length,b);for(;c<x&&Math.abs(u[c])<=xx;)c++;c>=x&&(c=0)}const d=u.length-c,m=a&&a>0?Math.min(d,Math.floor(a*i.sampleRate)):d,p=Math.max(t,m),C=Math.floor(p/t)||1;return new Array(t).fill(0).map((b,x)=>{const f=c+x*C,h=Math.min(f+C,c+p,u.length);let _=0;for(let g=f;g<h;g++){const k=Math.abs(u[g]);k>_&&(_=k)}return _})}catch{return null}finally{try{l?.close?.()}catch{}}}async function Nc(e,t,a,r=!1){try{const l=await fetch(e);if(l.ok===!1)return null;const s=await l.arrayBuffer();return await wx(s,t,a,r)}catch(l){try{const s=$l(l)}catch{}return null}}const hs=45,Bx=74,kx=2;function Br(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function kr(e){return Br(e)/45}const Ax=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),Ec=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function Dc({durationsSec:e,leadInMs:t=0,tailMs:a=0}){const r=Ec(t),l=Ec(a),s=[];let i=0;return e.forEach((u,c)=>{for(const[d,m]of[["lead",r],["sound",Ax(u)],["tail",l]])s.push({kind:d,track:c,startMs:i,durMs:m}),i+=m}),{segments:s,totalMs:i,trackCount:e.length}}function Sc(e,t){const a=(t|0)*3;if(t<0||a+2>=e.segments.length)return null;const[r,l,s]=[e.segments[a],e.segments[a+1],e.segments[a+2]];return{lead:r,sound:l,tail:s,totalMs:r.durMs+l.durMs+s.durMs}}function Nx(e,t){const a=Sc(e,t.track);if(!a||!(a.totalMs>0))return 0;const r=a[t.kind],l=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+l)/a.totalMs))}function Ex(e,t,a){const r=Math.max(0,Math.floor(a)),l=Sc(e,t);if(!l||r===0||!(l.totalMs>0)||l.lead.durMs===0&&l.tail.durMs===0||!(l.sound.durMs>0))return{lead:0,sound:r,tail:0};const s=Math.round(l.lead.durMs/l.totalMs*r),i=Math.round(l.tail.durMs/l.totalMs*r),u=Math.max(1,r-s-i),c=s+u+i-r;return{lead:Math.max(0,s-Math.ceil(c/2)),sound:u,tail:Math.max(0,i-Math.floor(c/2))}}function Dx({currentTime:e,sources:t,index:a,audioDuration:r}){const l=a||0,s=Array.isArray(t)&&t.length>0?t[l]:void 0,i=s?s.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 Sx({phase:e,phaseElapsedMs:t,currentTime:a,trackDurationSec:r,leadInMs:l,tailMs:s}){const i=Dc({durationsSec:[r],leadInMs:l,tailMs:s});return Nx(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(a)?a:0)*1e3:t})}function jx({bars:e,trackDurationSec:t,leadInMs:a,tailMs:r}){return Ex(Dc({durationsSec:[t],leadInMs:a,tailMs:r}),0,e)}function Tx(e,t){if(!Array.isArray(e))return null;const a=t||0;return a<e.length-1?a+1:null}function Mx({ended:e,completedByEnd:t}){return!!e||!!t}function Lx(e){return e.map((t,a)=>({src:t.src,label:String(a+1),color:void 0,duration:t.duration||0}))}function $x(e){return e.reduce((t,a)=>t+(a.duration||0),0)}function Rx(e,t,a){const r=Array.isArray(e)?e:e?[e]:[],l=[];for(const s of r)if(s){if(typeof s=="object"&&s!==null&&"src"in s&&s.src){const i=s;l.push({code:i.code??null,src:i.src});continue}if(typeof s=="string"&&(s.startsWith("http")||s.includes("/"))){l.push({code:null,src:s});continue}if(typeof s=="string"||typeof s=="number"){const i=String(s),u=a(i,t);u&&l.push({code:i,resolvedPath:u})}}return l}function Px(e,t){if(!t||e.readyState<1)return!0;const a=e.currentSrc||e.src;return a?jc(a)!==jc(t):!0}function jc(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const Tc=4,Ix=kr(Tc/hs);function Fx(e){const{src:t,segments:a,progress:r=0,waveProgressRef:l,noiseSrc:s,noiseRatio:i=0,noiseSpeed:u=1,totalDuration:c=0,mainVolume:d=1,onReadyChange:m,showSoundWaveForm:p=!0,leadInMs:C=0,tailMs:b=0,trackDurationSec:x=0}=e,f=o.useRef(null),h=o.useRef(null),[_,g]=o.useState(null),[k,v]=o.useState(!1),[B,y]=o.useState(null),[w,A]=o.useState(2),[E,D]=o.useState(0),[N,F]=o.useState(null),[R,K]=o.useState(!1),[L,$]=o.useState(!1),T=3,J=3,q=1,O=300,Q=o.useRef(0),P=o.useCallback(()=>{const ge=f.current,me=h&&h.current?h.current:ge?ge.closest(".audio-player__wave"):null,ie=me?me.getBoundingClientRect():ge?ge.getBoundingClientRect():null,be=ie?ie.width:0,he=ie?Math.max(100,ie.width):320,ue=ie?ie.height:0,Me=Math.max(q,Math.min(O,Math.floor((he+J)/(T+J)))),qe=Me*T,je=Math.max(0,Me-1),Ve=Math.max(0,je>0?(he-qe)/je:J);return{bars:Me,gap:Ve,height:ue,width:be}},[]),V=o.useRef(void 0),W=o.useRef(null),G=o.useCallback(async(ge,me,{quiet:ie=!1}={})=>{const be=++Q.current,he=()=>Q.current===be;try{if(ie||v(!1),V.current=ge,!ge){he()&&g(null);return}let ue=me;if(!ue)try{for(let je=0;je<4&&!(f.current||h.current);je++)await new Promise(Ve=>requestAnimationFrame(Ve));await new Promise(je=>requestAnimationFrame(je));const qe=P();qe.height>0&&D(qe.height),ue=qe.bars,A(qe.gap)}catch{ue=120}W.current=ue;const Me=await Nc(ge,ue);if(!he())return;if(!Me){g(null),v(!1);return}g(Me),y(ue),v(!0)}catch{if(!he())return;g(null),v(!1)}},[v,g,D,A,y,P]);o.useEffect(()=>{const ge=h.current;if(!ge||typeof ResizeObserver>"u")return;let me=null;const ie=new ResizeObserver(()=>{me!==null&&cancelAnimationFrame(me),me=requestAnimationFrame(()=>{me=null;try{const be=P();if(be.width<=0||(be.height>0&&D(be.height),W.current===null||be.bars===W.current))return;const he=V.current;A(be.gap),he?G(he,be.bars,{quiet:!0}).catch(()=>{}):W.current=be.bars}catch{}})});return ie.observe(ge),()=>{ie.disconnect(),me!==null&&cancelAnimationFrame(me)}},[P,G]),o.useEffect(()=>{const ge=a&&a[0]&&a[0].src||t||a&&a.length===1&&a[0]&&a[0].src;G(typeof ge=="string"?ge:void 0).catch(()=>{}),$(!1)},[t,a,G]),o.useEffect(()=>{let ge=!1;if(K(!1),F(null),!s||!B)return;const me=c>0?c*(u||1):void 0;return Nc(s,B,me,!0).then(ie=>{ge||(F(ie),ie||K(!0))}).catch(()=>{ge||(F(null),K(!0))}),()=>{ge=!0}},[s,B,c,u]);const S=Math.max(0,Math.min(1,d)),M=o.useMemo(()=>_&&_.length&&Math.max(..._)||1,[_]),I=B||40,Z=o.useMemo(()=>jx({bars:I,trackDurationSec:x,leadInMs:C,tailMs:b}),[I,x,C,b]),le=o.useMemo(()=>Array.from({length:I}).map((ge,me)=>{const ie=me>=Z.lead&&me<Z.lead+Z.sound,be=Z.sound>0&&ie?Math.min(I-1,Math.round((me-Z.lead)/Z.sound*I)):-1,he=ie?_&&_[be]!=null?_[be]:null:_?0:null,ue=he==null?null:Math.min(1,he/M*S),Me=ue!=null&&E>0&&Br(ue)<=Tc,qe=ue==null?.15:Me?0:kr(ue),je=Me,Ve=I>1?me/(I-1):0;return n.jsx("div",{className:je?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":qe,"--i":me,"--mix":Ve}},me)}),[I,_,M,S,E,Z]),oe={"--progress":String(Math.max(0,Math.min(1,r)))},de=o.useMemo(()=>N&&N.length&&Math.max(...N.map(ge=>Number.isFinite(ge)?Math.abs(ge):0))||1,[N]),re=S*Math.max(0,i),z=!s||!N||!N.length?1:Math.max(1,re),ne={"--bar-gap":`${w}px`,"--wave-h":`${Br(z)}px`,"--wave-h1":`${hs}px`},H=k&&(s?!!N||R:!0);o.useEffect(()=>{H&&$(!0)},[H]);const U=L?k:H;o.useEffect(()=>{m?.(U)},[U,m]);const pe=B||40,Ee=o.useMemo(()=>Array.from({length:pe}).map((ge,me)=>{const ie=N&&N[me]!=null?N[me]:null,be=ie==null?0:Math.abs(ie)/de*re,he=Math.max(Ix,kr(be)),ue=pe>1?me/(pe-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":he,"--i":me,"--mix":ue}},me)}),[pe,N,de,re,E]);return n.jsxs("div",{className:"audio-player__wave",ref:h,style:ne,children:[s&&n.jsx("div",{className:`audio-player__wave-noise ${H?"is-ready":""}`,"aria-hidden":"true",children:Ee}),p&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${U?"is-ready":""}`,ref:f,children:le}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${U?"is-ready":""}`,ref:l,style:oe,children:le})]})]})}const Mc={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function Cs(e,t){return new Promise((a,r)=>{const l=document.createElement("audio");let s=!1;const i=()=>{try{l.removeAttribute("src"),l.load()}catch{}},u=()=>{if(s)return;s=!0;const d=isFinite(l.duration)&&l.duration||0;i(),a(d)},c=d=>{s||(s=!0,i(),t.rejectOnError?r(new Error(d)):a(0))};l.addEventListener("loadedmetadata",u),l.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),t.timeoutMs),l.src=e})}const Ox=2e3;function Lc(e,t=Ox){return new Promise(a=>{let r=!1;const l=()=>{r||(r=!0,a())};e.addEventListener("canplay",l,{once:!0}),e.addEventListener("error",l,{once:!0}),setTimeout(l,t)})}function zx({showSoundWaveForm:e,showNoiseWaveForm:t,timeoutMs:a=2500}){const r=o.useRef(!1),l=o.useRef([]),s=o.useCallback(c=>{if(r.current=c,!c||!l.current.length)return;const d=l.current;l.current=[];for(const m of d)m(!0)},[]),i=o.useCallback(()=>{r.current=!1},[]),u=o.useCallback(()=>!e&&!t||r.current?Promise.resolve(!0):new Promise(c=>{const d=p=>{clearTimeout(m),l.current=l.current.filter(C=>C!==d),c(p)},m=setTimeout(()=>d(!0),a);l.current.push(d)}),[e,t,a]);return o.useEffect(()=>()=>{const c=l.current;l.current=[];for(const d of c)d(!1)},[]),{onReadyChange:s,waitForReady:u,markNotReady:i}}function Wx(){const e=o.useRef([]),t=o.useCallback(l=>(e.current.push(l),l),[]),a=o.useCallback(l=>{const s=new Set([...l].filter(Boolean));e.current=e.current.filter(i=>{if(s.has(i))return!0;try{URL.revokeObjectURL(i)}catch{}return!1})},[]),r=o.useCallback(()=>{a([])},[a]);return o.useEffect(()=>()=>{for(const l of e.current)try{URL.revokeObjectURL(l)}catch{}e.current=[]},[]),{track:t,keepOnly:a,revokeAll:r}}function Hx({offsetY:e=8}={}){const t=o.useRef(null),[a,r]=o.useState(null),l=o.useCallback(()=>r(null),[]),s=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",l),()=>document.removeEventListener("mousedown",l)},[a,l]),{ref:t,rect:a,show:s,hide:l}}function Vx(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 qx=400,Ux=2e3,$c=5;function Gx({audioRef:e,fillRef:t,waveProgressRef:a,sourcesRef:r,currentIndexRef:l,sequencer:s,leadInMs:i=0,tailMs:u=0}){const c=o.useRef(null),d=o.useRef(0),m=o.useRef(null),p=o.useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null)},[]),C=o.useCallback(()=>{if(c.current!==null)return;let x=0;const f=()=>{if(Pn){const h=typeof performance<"u"&&performance.now?performance.now():Date.now();if(x>0&&h-x>qx){const _=m.current===null||h-m.current>Ux;if(m.current=h,_&&d.current<$c){d.current+=1;const g=d.current;let k=null;try{k=typeof document<"u"?document.visibilityState:null}catch{}Rt(`progress-ticker-slow-frames#${g}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(h-x)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,k==="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.",g>=$c?`(${g}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${g}\uBC88\uC9F8)`)}}x=h}try{const h=e.current,_=Array.isArray(r.current)?r.current[l.current||0]:void 0,g=!!_&&Number.isFinite(_.duration)&&(_.duration??0)>0,k=g?0:Vx(h),v=t.current,B=(i||0)>0||(u||0)>0,y=B&&(s?.positionRef.current?.phase??"sound")!=="sound";if(k===null&&!y)try{v&&v.style.visibility!=="hidden"&&(v.style.visibility="hidden")}catch{}else{const w=g?_.duration:k||0;Pn&&y&&!(w>0)&&Rt("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 A=B?Sx({phase:s?.positionRef.current?.phase??"sound",phaseElapsedMs:s?.positionRef.current?Math.max(0,Date.now()-s.positionRef.current.at):0,currentTime:h&&typeof h.currentTime=="number"?h.currentTime:0,trackDurationSec:w,leadInMs:i||0,tailMs:u||0}):Dx({currentTime:h&&typeof h.currentTime=="number"?h.currentTime:0,sources:r.current,index:l.current,audioDuration:k??0});try{v&&(v.style.visibility&&(v.style.visibility=""),v.style.left=`${A*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(A))}catch{}}}catch{}c.current=requestAnimationFrame(f)};c.current=requestAnimationFrame(f)},[e,t,a,r,l,s,i,u]),b=o.useCallback(x=>{p();try{t.current&&(t.current.style.visibility="",t.current.style.left=`${x*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(x))}catch{}},[p,t,a]);return o.useEffect(()=>p,[p]),{start:C,stop:p,settleTo:b}}function fs({btnLabel:e,soundSrc:t,bucketPath:a,onDone:r,disabled:l=!1,ttsText:s=null,className:i,showSoundWaveForm:u=!0,showNoiseWaveForm:c=!0,leadInMs:d=0,tailMs:m=0}){const{t:p}=_e.useTranslation(),C=e,b=_r(),x=o.useRef(b?.registerAnalyser);o.useEffect(()=>{x.current=b?.registerAnalyser});const f=o.useRef(null),h=o.useRef(null),_=o.useRef(null),g=Wx(),k=o.useRef(null),v=o.useRef(!1),B=o.useRef(null),{ref:y,rect:w,show:A,hide:E}=Hx();o.useEffect(()=>()=>{x.current?.("main",null),x.current?.("noise",null)},[]);const[D,N]=o.useState(!1),[F,R]=o.useState("idle"),[K,L]=o.useState("stopped"),$=o.useRef("stopped");o.useEffect(()=>{$.current=K},[K]);const[T,J]=o.useState(0),[q,O]=o.useState("active"),Q=o.useRef(!1);o.useEffect(()=>{if(q!=="playMode"||!Q.current)return;Q.current=!1;const Y=typeof document<"u"?document.activeElement:null;if(Y&&Y!==document.body)return;const ce=_.current?.querySelectorAll("button")[1];try{ce?.focus()}catch{}},[q]);const[P,V]=o.useState(null),[W,G]=o.useState(null),[S,M]=o.useState(0),[I,Z]=o.useState(!1),[le,oe]=o.useState(0),de=b?.playbackRate??1,re=b?.mainVolume??1,z=b?cs(b.settings):0,ne=b?kc(b.settings):re,[H,U]=o.useState("idle"),[pe,Ee]=o.useState(""),[ge]=o.useState("top"),me=o.useRef(null),ie=o.useRef(0),be=o.useRef(null),he=o.useRef(!0),ue=px({mountedRef:he}),Me=o.useRef(null),qe=o.useRef(d),je=o.useRef(m);o.useEffect(()=>{qe.current=Math.max(0,d||0)},[d]),o.useEffect(()=>{je.current=Math.max(0,m||0)},[m]);const{start:Ve,stop:Oe,settleTo:dt}=Gx({audioRef:f,fillRef:h,waveProgressRef:be,sourcesRef:me,currentIndexRef:ie,sequencer:ue,leadInMs:d,tailMs:m}),{onReadyChange:rt,waitForReady:nt,markNotReady:pt}=zx({showSoundWaveForm:u,showNoiseWaveForm:c}),Ne=o.useRef(null),Ue=o.useRef(l),ke=o.useRef(r),He=o.useRef(null),Be=o.useRef(!1),[Se,Le]=o.useState(!1),Ze=o.useCallback(Y=>{Be.current=Y,Le(Y)},[]),xt=o.useRef(null),{activeNoiseUrl:et,noiseSettingsRef:Xe,fadeInNoise:At,fadeOutNoise:gt}=yx({noisePlayer:b,audioRef:f,playbackStateRef:$,sequencer:ue}),{startTTS:_t,stopTTS:Nt}=vx({ttsText:s,playbackRate:de,mainVolume:ne,fillRef:h,waveProgressRef:be,setProgress:J,setPlaybackState:L,setStateLocal:O,fadeInNoise:At,fadeOutNoise:gt,noiseSettingsRef:Xe,onDoneRef:ke,handleEndRef:xt});o.useEffect(()=>{jt.current=Nt});const mt=Y=>{if(typeof window>"u"||!window.speechSynthesis){try{Ee(p("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}_t(Y);return}Re("tts"),_t(Y)},st=Array.isArray(t)?t.filter(Boolean):t?[t]:[],Pe=(!st||st.length===0)&&!!s,bt=Array.isArray(P)&&P.length>0?P:Array.isArray(W)&&W.length>0?W:null,wt=Math.max(Array.isArray(bt)?bt.length:0,st.length);o.useEffect(()=>(he.current=!0,()=>{he.current=!1}),[]);const lt=()=>{ue.abort()},jt=o.useRef(null),Ge=o.useRef(null),yt=o.useRef(null),$t=o.useRef(null);$t.current||($t.current=()=>{yt.current=null;const Y=f.current;if(Ge.current==="audio"&&Y&&(!Y.paused||ue.isRunning())){lt();try{Y.pause()}catch{}he.current&&(L("paused"),Oe(),gt())}else if(Ge.current==="tts")try{jt.current?.()}catch{}});const Re=Y=>{Ge.current=Y,yt.current=pr($t.current)},ot=()=>{yt.current?.(),yt.current=null};o.useEffect(()=>()=>{$t.current&&mr($t.current)},[]);const Et=o.useRef(de);o.useEffect(()=>{Et.current=de||1},[de]);const Je=o.useCallback(Y=>{const ce=Et.current||1;try{Y.defaultPlaybackRate=ce}catch{}try{Y.playbackRate=ce}catch{}},[]),Dt=o.useCallback((Y,ce)=>{if(!Px(Y,ce)){try{Y.currentTime=0}catch{}Je(Y);return}Y.src=ce,Je(Y),Y.load(),Je(Y)},[Je]),ae=o.useCallback(()=>{He.current&&(clearTimeout(He.current),He.current=null),U("idle")},[]),ve=o.useCallback(async(Y,ce=3,ee=50,xe=0)=>{ae();const $e=ue.generation(),We=!!Y&&Y.currentTime>0&&!Y.ended,at=Math.max(0,qe.current-Math.max(0,xe));if(at>0&&!We){Re("audio"),Ve(),L("playing");const ft=Xe.current;if(ft?.enabled&&(ft.volume??0)>0)try{At(ft.volume)}catch{}if(!await ue.waitPad(at,"lead",xe)||!he.current||!ue.isCurrent($e))return!1}ue.enterSound();for(let ft=0;ft<ce;ft++){if(!he.current||!ue.isCurrent($e))return!1;try{return Re("audio"),await Y.play(),!0}catch(ye){if((ye instanceof Error||typeof ye=="object"&&ye&&"name"in ye?ye.name:void 0)==="AbortError"){if(!ue.isCurrent($e))return!1;await new Promise(j=>setTimeout(j,ee));continue}try{Ee(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{Ee(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[p,Ve,ue,At,Xe,ae]),ze=o.useCallback(Y=>{const ce=ue.generation(),ee=Math.max(0,je.current-Math.max(0,Y));Ve();const xe=Xe.current;if(xe?.enabled&&(xe.volume??0)>0)try{At(xe.volume)}catch{}const $e=()=>{try{Me.current?.()}catch{}};if(ee<=0){ue.leave(),$e();return}ue.waitPad(ee,"tail",Y).then(We=>{ue.leave(),We&&ue.isCurrent(ce)&&$e()}).catch(()=>{})},[ue,Ve,At,Xe]),Qe=o.useCallback(()=>{const Y=f.current;if(!Y)return;const ce=()=>{L("playing"),O("playMode"),Z(!0),Ve();try{to(),er(Y).then(We=>{if(he.current)try{x.current?.("main",We)}catch{}})}catch{}const $e=Xe.current;$e?.enabled&&($e?.volume??0)>0&&At($e.volume)},ee=()=>{Mx({ended:!!Y?.ended,completedByEnd:Be.current})||(L("paused"),Oe(),gt())},xe=()=>{const $e=()=>{try{const We=me.current,at=Tx(We,ie.current);if(at!==null){ie.current=at,M(at),Z(!0);const ft=We?.[at]&&We[at].src;if(ft&&Y){Dt(Y,ft),ve(Y).catch(()=>{});return}}}catch{}L("stopped"),J(1);try{if(Y)try{Y.currentTime=0}catch{}}catch{}Oe(),Z(!1),gt();try{!Ue.current&&xt.current&&xt.current()}catch{}};if(Me.current=$e,je.current>0){Ve(),ue.waitPad(je.current,"tail").then(We=>{ue.leave(),We&&$e()}).catch(()=>{});return}$e()};return Y.addEventListener("play",ce),Y.addEventListener("pause",ee),Y.addEventListener("ended",xe),()=>{try{Y.removeEventListener("play",ce),Y.removeEventListener("pause",ee),Y.removeEventListener("ended",xe),Oe()}catch{}}},[At,gt,ve,Xe,Ve,Oe,ue]);o.useEffect(()=>Qe(),[Qe]),o.useEffect(()=>{Ue.current=l},[l]),o.useEffect(()=>{ke.current=r},[r]),o.useEffect(()=>{if(l||q!=="active")return;const Y=B.current;if(!Y)return;let ce=null;const ee=requestAnimationFrame(()=>{try{const xe=Y.getTotalLength();if(!xe)return;const $e=xe*.2;Y.style.strokeDasharray=`${xe-$e} ${$e}`;const We="triFlow_"+Math.random().toString(36).slice(2);ce=document.createElement("style"),ce.textContent=`@keyframes ${We}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${xe}}}`,document.head.appendChild(ce),Y.style.animation=`${We} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(ee),ce?.remove()}},[q,l]),o.useEffect(()=>{me.current=P},[P]),o.useEffect(()=>{ie.current=S},[S]),o.useEffect(()=>{const Y=_.current,ce=k.current;if(!Y||!ce)return;let ee=null;const xe=32,$e=60,We=()=>{try{const ft=Array.from(Y.querySelectorAll(":scope > .button"));let ye=0;ft.forEach(Ie=>{if(Ie===ce)return;const Ye=Ie.getBoundingClientRect();ye+=Ye.width});const j=Y.getBoundingClientRect().width,X=Math.max(0,Math.floor(j-ye-8)),Ce=wt;if(!Ce||X<=0){Array.from(ce.children).forEach(Ie=>{try{Ie.style.width=""}catch{}});return}let De=Math.floor(X/Ce);De>$e&&(De=$e),De<xe&&(De=Math.max(xe,Math.floor(X/Ce))),Array.from(ce.querySelectorAll(".button")).forEach(Ie=>{try{Ie.style.width=`${De}px`}catch{}})}catch{}},at=requestAnimationFrame(We);try{ee=new ResizeObserver(()=>{requestAnimationFrame(We)}),ee.observe(Y),ee.observe(ce),window.addEventListener("resize",We)}catch{}return()=>{try{cancelAnimationFrame(at)}catch{}try{ee&&(ee.disconnect(),ee=null)}catch{}try{window.removeEventListener("resize",We)}catch{}}},[P,W,wt]),o.useEffect(()=>()=>{try{Ne.current&&(clearTimeout(Ne.current),Ne.current=null),He.current&&(clearTimeout(He.current),He.current=null)}catch{}},[]);const ht=(Y,ce)=>{V(Y),oe(ce),pt(),G(Lx(Y)),me.current=Y},it=()=>{O("playMode"),M(0),Z(!0)},It=async(Y,ce)=>{Ze(!1),v.current=!1,Dt(Y,ce),await Lc(Y),await nt()!==!1&&(N(!1),it(),await ve(Y))},Gt=async(Y,ce=!1)=>{const ee=f.current;N(!0),R("measuring_duration");try{const xe=await Cs(Y,{timeoutMs:1e4,rejectOnError:!0});ht([{src:Y,objectUrl:null,duration:xe}],xe),R("ready"),ce&&ee&&await It(ee,Y)}finally{v.current=!1,N(!1)}},An=async(Y,ce=!1)=>{const ee=f.current;N(!0),R("measuring_duration");try{const xe=await Promise.all(Y.map(We=>Cs(We,{timeoutMs:1e4})));if(!he.current)return;const $e=Y.map((We,at)=>({src:We,objectUrl:null,duration:xe[at]||0}));ht($e,$x($e)),R("ready"),ce&&ee&&$e.length>0&&await It(ee,$e[0].src)}finally{v.current=!1,N(!1)}},Wt=async(Y=!1,ce=!0)=>{const ee=f.current,xe=t?Array.isArray(t)?t:[t]:[];if(!xe||xe.length===0||!xe.some(Boolean))return!1;if(v.current)return null;v.current=!0,ce&&N(!0),R("resolving");try{const $e=Rx(t,a,yl),We=[];let at=0;for(const ft of $e){let ye=ft.src??null,j=null;if(!ye&&ft.resolvedPath){try{R("getting_signed_url"),ye=await vl(ft.resolvedPath)}catch{ye=null}if(!he.current)return!1;if(!ye)try{R("downloading");const Ce=await xl(ft.resolvedPath);if(!he.current)return!1;if(Ce){const De=Ce instanceof Blob?Ce:new Blob([Ce]);j=g.track(URL.createObjectURL(De)),ye=j}}catch{R("error");try{Ee(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),O("active")}catch{}}}if(!ye)continue;let X=0;try{R("measuring_duration"),X=await Cs(ye,{timeoutMs:3e3})}catch{X=0}if(!he.current){if(j)try{URL.revokeObjectURL(j)}catch{}for(const Ce of We)if(Ce.objectUrl)try{URL.revokeObjectURL(Ce.objectUrl)}catch{}return!1}at+=X||0,We.push({...ft,src:ye,objectUrl:j,duration:X})}if(ht(We,at),We.length>0&&Y&&ee){const ft=We[0];Ze(!1);try{g.keepOnly(We.map(ye=>ye.objectUrl))}catch{}if(R("ready"),v.current=!1,ft.src&&ee)try{if(Dt(ee,ft.src),await Lc(ee),await nt()===!1)return!1;ce&&N(!1),it(),ee&&await ve(ee)}catch{ce&&N(!1)}else ce&&N(!1);O("playMode"),M(0),Z(!0)}return We.length>0}finally{v.current=!1,ce&&N(!1),R($e=>$e==="ready"?"ready":"idle")}},Kt=async Y=>{const ce=ue.isRunning();if(Y.paused&&!ce){if(Be.current){await ut();return}const ee=ue.resume();if(ee){if(L("playing"),ee.phase==="tail"){ze(ee.elapsed);return}await ve(Y,3,50,ee.elapsed);return}await ve(Y),L("playing")}else ue.pause(),lt(),Y.pause(),L("paused"),ce&&(Oe(),gt())},Bt=async()=>{const Y=f.current;if(!(!Y&&!Pe)){if(Pe){const ce=window.speechSynthesis;if(q==="active"){const ee=Na(),xe=Array.isArray(s)?s.filter(Boolean):s?[s]:[];if(ee&&xe.length>0){if(v.current)return;O("load"),N(!0),R("synthesizing"),v.current=!0;try{const $e=await Promise.all(xe.map(We=>Promise.resolve(ee(We))));$e.length>1?await An($e,!0):await Gt($e[0],!0)}catch{v.current=!1,N(!1),O("active"),mt(xe.length>0?xe:void 0)}return}mt(xe.length>0?xe:void 0);return}if(q==="playMode"){const ee=!!ce&&(ce.speaking||ce.paused)&&!(Y&&(Y.currentSrc||Y.getAttribute("src")));if(Y&&!ee){await Kt(Y);return}try{if(ce&&ce.paused)try{Re("tts"),ce.resume(),L("playing")}catch{}else try{ce.pause(),L("paused")}catch{}}catch{}}return}if(q==="active"){if(l&&Array.isArray(me.current)&&me.current.length>0){const ee=me.current[0];try{if(ee.src&&Y)try{Dt(Y,ee.src),it(),Y&&await ve(Y)}catch{}it();return}catch{}}O("load");let ce;try{ce=await Wt(!0)}catch{ce=!1}if(ce===!1&&he.current){try{Ee(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}O("active")}return}if(q!=="load"&&(q==="playMode"||q==="active"))try{Y&&await Kt(Y)}catch(ce){(ce instanceof Error||typeof ce=="object"&&ce&&"name"in ce)&&ce.name}}},ut=async()=>{const Y=f.current;if(Y)try{const ce=me.current;if(Array.isArray(ce)&&ce.length>1){await Zt(0);return}Ze(!1);try{Y.currentTime=0}catch{}Y&&await ve(Y),L("playing"),O("playMode")}catch{}},Ct=()=>{lt(),ot(),jt.current?.();const Y=f.current;try{if(Y){try{Y.pause()}catch{}try{Y.currentTime=0}catch{}}}catch{}gt(),L("stopped"),O("active"),J(0),Z(!1)},Tt=async(Y,{sameSegment:ce=!1}={})=>{lt();const ee=ue.generation(),xe=f.current,$e=me.current?.[Y]?.src;try{if(Ze(!1),M(Y),Z(!0),ie.current=Y,!$e||!xe||(ce||pt(),Dt(xe,$e),!ce&&await nt()===!1)||!ue.isCurrent(ee)||(await ve(xe),!ue.isCurrent(ee)))return;L("playing"),O("playMode")}catch{}},Yt=async()=>{const Y=me.current,ce=ie.current||0;if(!Y||ce<=0){await ut();return}await Tt(ce-1)},gn=async()=>{const Y=me.current,ce=ie.current||0;if(!Y||ce>=Y.length-1){Ct();return}await Tt(ce+1)},Nn=()=>{if(Be.current)return;const Y=200,ce=340;Ze(!0),lt(),ot();try{J(1)}catch{}dt(1);try{U("hold")}catch{}try{const ee=f.current,xe=Pe&&!!ee?.src;if(!Pe||xe){if(ee){ee.pause();try{ee.currentTime=0}catch{}}}else Nt();gt()}catch{}try{L("stopped")}catch{}if(Z(!1),!Ue.current)try{He.current&&(clearTimeout(He.current),He.current=null),He.current=setTimeout(()=>{try{U("out")}catch{}He.current=setTimeout(()=>{try{typeof ke.current=="function"&&ke.current(!0)}catch{}try{U("idle")}catch{}He.current=null},ce)},Y)}catch{}};o.useEffect(()=>{xt.current=Nn});const tn=o.useCallback(()=>Ee(""),[]),Zt=async Y=>{(me.current||[])[Y]&&await Tt(Y,{sameSegment:Y===ie.current})},Ht=K==="playing",bn=o.useMemo(()=>{if(!W||W.length<=1)return W;const Y=W[S];return Y?[Y]:W},[W,S]),Xt=l===!0;o.useEffect(()=>{try{const Y=f.current;Y&&typeof Y.playbackRate=="number"&&Je(Y)}catch{}},[de,Je]);const un=o.useRef({raf:null,timer:null});o.useEffect(()=>{const Y=f.current;if(!Y)return;const ce=Math.max(0,Math.min(1,ne)),ee=un.current,xe=()=>{ee.raf!==null&&(cancelAnimationFrame(ee.raf),ee.raf=null),ee.timer!==null&&(clearTimeout(ee.timer),ee.timer=null)};xe();const $e=tr(Y);if(Y.paused||Math.abs($e-ce)<.001||typeof requestAnimationFrame!="function"){try{On(Y,ce)}catch{}return}const We=performance.now(),at=()=>{const ft=Math.min(1,(performance.now()-We)/150);try{On(Y,$e+(ce-$e)*ft)}catch{}ee.raf=ft<1?requestAnimationFrame(at):null};return ee.raf=requestAnimationFrame(at),ee.timer=setTimeout(()=>{xe();try{On(Y,ce)}catch{}},200),xe},[ne]);const Ot=H==="hold",nn=H==="out",se=q==="playMode"&&!D&&!Se||Ot||nn,Ae=K!=="stopped"||Ot||nn,Te=K==="paused",Ke=Math.max(0,Math.min(100,(T||0)*100)),Fe=we("audio-player__fill",se?"is-visible":"",Ae?"is-expanded":"",Te?"is-paused":"",nn?"is-out":"");return n.jsxs("div",{className:`audio-player ${Xt?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof C=="string"?C:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${Ht?"is-playing":""} ${D?"is-loading":""} ${q!=="default"?"is-revealed":""}`,children:[D?n.jsxs("div",{className:"audio-player__loading",role:Mc[F]?"status":void 0,"aria-live":Mc[F]?"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,q==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:Xt,onClick:()=>{Q.current=gr(),E(),Bt()},"aria-label":typeof C=="string"?C:p("training.listen","\uB4E3\uAE30"),onMouseEnter:A,onMouseLeave:E,onFocus:A,onBlur:E,children:n.jsx("span",{ref:y,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:B,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,w&&n.jsx(Dn,{anchorRect:w,text:typeof C=="string"&&C?C:p("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${q==="playMode"||Ht?"is-visible":""}`,inert:!(q==="playMode"||Ht)||void 0,children:[n.jsxs("div",{ref:_,className:"audio-player__buttons",children:[n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:Yt,ariaLabel:p("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:q!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:Ht?"pause":"play",onClick:Bt,ariaLabel:p("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":Ht,width:"60px",variant:"transparent-white",disabled:q!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:Ct,ariaLabel:p("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:q!=="playMode"}),wt>1?n.jsx("div",{ref:k,className:"audio-player__source-buttons",children:Array.from({length:wt}).map((Y,ce)=>n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(ce+1),onClick:()=>{try{Zt(ce)}catch{}},ariaLabel:p("training.sourcePlay",{n:ce+1}),variant:"transparent-white",selected:I&&S===ce,disabled:q!=="playMode"||!(Array.isArray(P)&&P[ce]),showTooltipInfo:!0},ce))}):null,!Array.isArray(P)||P.length<=1?n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:ut,ariaLabel:p("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:q!=="playMode"}):null,n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:gn,ariaLabel:p("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:q!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:Nn,ariaLabel:p("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:q!=="playMode"})]}),n.jsxs("div",{className:"audio-player__slider",children:[n.jsx("div",{className:Fe,ref:h,style:{left:`${Ke}%`},"aria-hidden":"true"}),(u||c)&&n.jsx(Fx,{segments:bn,progress:T,totalDuration:le,waveProgressRef:be,showSoundWaveForm:u,leadInMs:d,tailMs:m,trackDurationSec:P?.[S]?.duration??0,noiseSrc:c&&b?.settings.enabled&&z>0?et:null,noiseRatio:b?Ja(b.settings):0,noiseSpeed:b?.settings.speed??1,mainVolume:re,onReadyChange:rt})]})]}),n.jsx("audio",{ref:f,crossOrigin:"anonymous",preload:"auto"})]}),!u&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(tt,{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(ha,{message:pe,position:ge,onClose:tn})]})}function Ar(e){const{t}=_e.useTranslation(),{text:a,label:r,anchorRect:l=null,onClose:s,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:m,decrease:p,canIncrease:C,canDecrease:b,fontSize:x,lineHeight:f}=Mi({storageKey:"tooltip-fontScale"}),h=o.useCallback(()=>d(B=>B==="dark"?"light":"dark"),[]),_=o.useCallback(B=>{try{B.stopPropagation()}catch{}try{typeof s=="function"&&s()}catch{}},[s]),g=Array.isArray(a)?a:typeof a>"u"||a===null?[]:[a],k={fontSize:`${x}px`,lineHeight:`${f}px`,"--tt-line-height":`${f}px`,"--tt-marker-size":"28px"},v=n.jsxs("div",{className:`tooltip-textbox__root ${c==="dark"?"is-dark":""}`,children:[n.jsxs("div",{className:"tooltip-textbox__box",children:[r&&n.jsx("div",{className:"tooltip-textbox__label body-2b",children:r}),n.jsx("div",{className:"tooltip-textbox__text body-1",style:k,children:g.map((B,y)=>n.jsxs("div",{className:"tooltip-textbox__line",children:[g.length>1?n.jsx("div",{className:"tooltip-textbox__marker",children:n.jsx("span",{className:"tooltip-textbox__line-number button-1",children:y+1})}):null,n.jsx("span",{className:"tooltip-textbox__line-text",children:B})]},y))})]}),n.jsxs("div",{className:"tooltip-textbox__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:!b}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"plus",onClick:m,ariaLabel:t("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!C}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:c==="dark"?"moon":"sun-medium",onClick:h,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:_,ariaLabel:t("common.close","\uB2EB\uAE30"),variant:c==="dark"?"transparent-white":"transparent-gray"})]})]});return l?n.jsx(vn,{anchorRect:l,className:`tooltip-textbox ${c==="dark"?"is-dark":""}`,onClose:s,closeOnOutsideClick:i,isMobilePopup:u,ariaLabel:r||t("tooltip.textbox","\uBCF8\uBB38"),children:v}):n.jsx("div",{className:`tooltip-textbox ${c==="dark"?"is-dark":""}`,children:v})}function Rc({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(tt,{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 Pc(e,t,a){const r=o.useRef(t),l=o.useRef(a);o.useEffect(()=>{r.current=t,l.current=a}),o.useEffect(()=>{if(!e||typeof document>"u")return;let s=null,i=10;const u=()=>{s=null;const c=r.current(),d=c?Array.from(c.querySelectorAll(_n)).find(m=>!m.closest('[aria-hidden="true"]')):void 0;if(d){try{d.focus()}catch{}if(document.activeElement===d)return}--i>0&&(s=requestAnimationFrame(u))};return s=requestAnimationFrame(u),()=>{s!==null&&cancelAnimationFrame(s);const c=document.activeElement;if(!c||c===document.body||!document.contains(c)||c.closest(".tooltip-content")){const d=l.current();if(d)try{d.focus()}catch{}}}},[e])}function Ic({title:e,children:t,className:a="",state:r="disabled",usePreviewTextBtn:l=!1,onPreviewTextBtn:s,previewText:i=null,useFaded:u,usePlayAllBtn:c=!1,onPlayAll:d,playAllActive:m=!1}){const{t:p}=_e.useTranslation(),C=Cn("(max-width: 767px)"),b=`training-step__title h4 ${u&&r==="disabled"?"training-step__title--faded":""} ${a}`.trim(),x=`training-step__title-row training-step__title-row--${r}`.trim(),f=o.useRef(null),[h,_]=o.useState(!1),[g,k]=o.useState(null),[v,B]=o.useState(null);Pc(h&&!!g,()=>{if(typeof document>"u")return null;const D=Array.from(document.querySelectorAll(".tooltip-content"));for(let N=D.length-1;N>=0;N--)if(D[N].querySelector(".tooltip-textbox__root"))return D[N];return null},()=>f.current?.querySelector("button")??null);const y=o.useRef(s);o.useEffect(()=>{y.current=s});const w=o.useMemo(()=>i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)&&i.every(D=>typeof D=="string"||typeof D=="number")?i.join(""):"",[i]),A=o.useCallback(()=>{_(!1),k(null),B(null)},[]);o.useEffect(()=>{if(!h)return;let D;try{typeof y.current=="function"&&(D=y.current())}catch{}if(D===!1){A();return}B(typeof D<"u"&&D!==null?D:null)},[w]);const E=o.useCallback(()=>{let D;try{typeof s=="function"&&(D=s())}catch{}if(D!==!1){if(B(typeof D<"u"&&D!==null?D:i),!f.current){_(N=>!N);return}if(h)_(!1),k(null),B(null);else{const N=f.current.getBoundingClientRect();k(N),_(!0)}}},[s,i,h]);return n.jsxs("div",{className:x,children:[n.jsx("p",{className:b,children:n.jsx("span",{className:"training-step__title-text",children:e??t})}),l||c?n.jsxs("div",{className:"title-controls",children:[n.jsxs("div",{className:"title-buttons",children:[c&&n.jsx(fe,{htmlType:"button",size:32,type:C?"dot":"bar",icon:"play-circle",label:C?void 0:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),ariaLabel:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),selected:m,onClick:d,variant:r==="disabled"?"disabled":"default",disabled:r==="disabled"||m,onDisabledClick:m&&r!=="disabled"?()=>{}:void 0}),l&&n.jsx("div",{ref:f,children:n.jsx(fe,{htmlType:"button",size:32,type:C?"dot":"bar",icon:"eye",label:C?void 0:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),onClick:E,className:h?"is-selected":void 0,"aria-expanded":h,"aria-haspopup":"dialog",variant:r==="disabled"?"disabled":"default",disabled:!i&&typeof s!="function"})})]}),h&&n.jsx(Ar,{text:v??i,label:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:g,onClose:A,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function gs(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function ea({index:e,stepIndex:t,isLast:a=!1,title:r="",titleProps:l={},children:s,className:i="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:d}){const{t:m}=_e.useTranslation(),[p,C]=o.useState(()=>gs(e,t));o.useEffect(()=>{const y=gs(e,t);if(y!==p){const w=setTimeout(()=>C(y),0);return()=>clearTimeout(w)}},[e,t,p]);const b=o.useCallback((...y)=>{gs(e,t)==="done"||p==="done"||typeof u=="function"&&u(...y)},[e,t,p,u]),[x,f]=o.useState(!1),[h,_]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),g=o.useCallback(y=>{if(!y)return null;try{const w=y;if(typeof y=="object"&&(w.currentTarget||w.target)&&(w.nativeEvent||w.type)){const D=w.currentTarget??w.target;if(D&&typeof D.getBoundingClientRect=="function")return D.getBoundingClientRect()}if(y instanceof DOMRect)return y;const A=y;if(A&&typeof A.getBoundingClientRect=="function")return A.getBoundingClientRect();const E=y?.current;return E&&typeof E.getBoundingClientRect=="function"?E.getBoundingClientRect():null}catch{return null}},[]),k=o.useCallback((y,{text:w="",label:A="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:E=!1,alignX:D="center",alignY:N="top"}={})=>{const F=g(y);_({text:w,label:A,anchorRect:F,backdrop:E,alignX:D,alignY:N}),f(!0)},[g]),v=o.useCallback(()=>{f(!1),_(y=>({...y,anchorRect:null}))},[]),B=o.Children.map(s,y=>{if(o.isValidElement(y)){const w=y;if(typeof w.type=="string")return w;const A=w.props??{},E=typeof A.onDone=="function"?A.onDone:b,D=typeof A.disabled=="boolean";let N=p==="disabled";return D&&(N=!!A.disabled),o.cloneElement(w,{onDone:E,disabled:N,showTooltip:k,hideTooltip:v})}return y});return n.jsxs("div",{className:`training-step training-step--${p} ${a?"training-step--last":""} ${i}`,"aria-current":p==="active",children:[n.jsx(Rc,{state:p}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(Ic,{state:p,title:r,...l,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}),B]}),x?n.jsx(vn,{anchorRect:h.anchorRect,backdrop:h.backdrop,onClose:v,ariaLabel:m("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(Ar,{text:h.text,onClose:v})}):null]})}function Fc({context:e,state:t="disabled",theme:a="light"}){const{t:r}=_e.useTranslation(),[l,s]=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(R=>R==="dark"?"light":"dark"),{increase:d,decrease:m,canIncrease:p,canDecrease:C,fontSize:b,lineHeight:x}=Mi({storageKey:"textbox_fontScale"}),[f,h]=o.useState(""),_=o.useRef(null),g=o.useRef(!1),k=o.useCallback(()=>{g.current=gr()&&!!_.current&&_.current.contains(document.activeElement),s("active")},[]),v=o.useCallback(()=>h(""),[]),B=R=>{try{h(R)}catch{}},y=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(t!=="disabled"){const R=setTimeout(()=>s(t),0);return()=>clearTimeout(R)}},[t]);const w=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[A,E]=o.useState(w);A!==w&&(E(w),s("disabled"));const D=t==="disabled"?l:t,N=D==="disabled"?"training-text-box--disabled":D==="active"?"training-text-box--active":D==="done"?"training-text-box--done":"",F=o.useMemo(()=>({fontSize:`${b}px`,lineHeight:`${x}px`}),[b,x]);return o.useEffect(()=>{if(D==="disabled"||!g.current)return;g.current=!1;const R=document.activeElement;R&&R!==document.body||_.current?.querySelector(".training-text-box__buttons button")?.focus()},[D]),n.jsxs("div",{ref:_,className:`training-text-box ${N} ${D!=="disabled"&&i==="dark"?"is-dark":""}`,children:[D==="disabled"&&n.jsx("div",{className:"training-text-box__preview",children:n.jsx(fe,{htmlType:"button",size:48,type:"bar",onClick:k,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":D==="disabled",children:n.jsx("span",{className:"training-text-box__inner h3",style:F,children:w})}),D!=="disabled"&&n.jsxs("div",{className:"training-text-box__buttons","aria-hidden":D==="disabled",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:m,onDisabledClick:()=>B(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:!C,useBorder:!1,showTooltipInfo:!0,...!y&&{width:"60px"}}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:d,onDisabledClick:()=>B(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,...!y&&{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(ha,{message:f,position:"top",onClose:v})]})}function ta(e){return e==="active"||e==="done"}function bs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:l,useTitleFaded:s,onDone:i,onChange:u,answer:c,wrongAnswers:d,choices:m,multiSelect:p=!1,correctCount:C=0,useDisabledCovered:b=!1,choiceIcons:x,shuffleChoices:f=!0}){const{t:h}=_e.useTranslation(),_=l??h("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),g=typeof e=="number"?e:-1,k=typeof t!="number"?"disabled":g<t?"done":g===t?"active":"disabled",v=Array.isArray(m)&&m.length?m:typeof c<"u"?[c].concat(Array.isArray(d)?d:[]):void 0,B=d?d.join("||"):"",y=m?m.join("||"):"",[w,A]=o.useState(()=>Array.isArray(v)?f?Ta(v):v.slice():void 0);o.useEffect(()=>{Array.isArray(v)&&v.length?A(f?Ta(v):v.slice()):A(void 0)},[c,B,y,f]);const[E,D]=o.useState(null),[N,F]=o.useState(()=>new Set);o.useEffect(()=>{D(null),F(new Set)},[y,c,B]);const R=o.useRef(void 0);o.useEffect(()=>{const $=R.current;typeof $=="number"&&typeof t=="number"&&typeof e=="number"&&$>=e&&t<e&&(D(null),F(new Set)),R.current=t},[t,e]);const K=o.useCallback($=>{if(!ta(k))return;const T=w?.[$];if(T==null)return;const J=T;if(p){const q=new Set(N);q.has(J)?q.delete(J):q.add(J),F(q),typeof u=="function"&&u({selectedValues:[...q],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...q],__ts:Date.now()})}else D(J),typeof u=="function"&&u({selectedIndex:$,selectedValue:J,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:$,selectedValue:J,__ts:Date.now()})},[w,k,p,u,N]),L=`training-step__buttons${Array.isArray(w)&&w.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:_,useTitleFaded:s,children:n.jsx("div",{className:L,children:Array.isArray(w)&&w.length>0?w.map(($,T)=>n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:()=>K(T),ariaLabel:String($),label:$,useLabel:!0,icon:x?x[String($)]:void 0,variant:"default",disabled:k==="disabled",selected:p?N.has($):E===$,useDisabledCovered:b,minWidth:0},String($))):null})})}function ys({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:l,onDone:s,onChange:i,context:u,demoSelected:c}){const{t:d}=_e.useTranslation(),m=l??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,C=typeof t!="number"?"disabled":p<t?"done":p===t?"active":"disabled",b=u&&typeof u=="object"?u.sentence||"":typeof u=="string"?u:"",x=u&&typeof u=="object"?u.choices:void 0,[f,h]=o.useState(c??null),_=`${String(b)}\0${JSON.stringify(x??null)}`,[g,k]=o.useState(_);g!==_&&(k(_),c==null&&h(null));const[v,B]=o.useState(c);Object.is(v,c)||(B(c),h(c??null));const y=o.useRef(void 0);o.useEffect(()=>{const D=y.current;typeof D=="number"&&typeof t=="number"&&typeof e=="number"&&D>=e&&t<e&&c==null&&h(null),y.current=t},[t,e,c]);const w=o.useCallback(D=>{const N=typeof D=="object"&&D!==null?Object.assign({},D,{__ts:Date.now()}):{value:D,__ts:Date.now()};typeof i=="function"&&i(N),ta(C)&&typeof s=="function"&&s(N)},[i,C,s]),A=o.useCallback(()=>{ta(C)&&(h(!1),w(!1))},[w,C]),E=o.useCallback(()=>{ta(C)&&(h(!0),w(!0))},[w,C]);return n.jsxs(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:m,onDone:s,useTitleFaded:!1,children:[n.jsx(Fc,{context:u,state:C}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(x)&&x.length>0?x.slice(0,6).map((D,N)=>n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:()=>{ta(C)&&(h(N),w&&w(N))},disabled:C==="disabled",ariaLabel:String(D),label:D,variant:C,selected:f===N},N)):n.jsxs(n.Fragment,{children:[n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:A,disabled:C==="disabled",icon:"x",ariaLabel:d("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),label:d("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:f===!1}),n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:E,disabled:C==="disabled",icon:"circle",ariaLabel:d("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),label:d("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:f===!0})]})})]})}function vs({index:e,stepIndex:t,isLast:a=!1,title:r,onDone:l,btnLabel:s,soundSrc:i,bucketPath:u,usePreviewTextBtn:c,previewText:d=null,onPreviewTextBtn:m,disabled:p,_pageIndex:C,showSoundWaveForm:b,showNoiseWaveForm:x,leadInMs:f,tailMs:h}){const{t:_}=_e.useTranslation(),g=r??_("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),k=p??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(ea,{index:e,stepIndex:t,isLast:a,title:g,onDone:l,titleProps:{usePreviewTextBtn:c,previewText:d,onPreviewTextBtn:m},children:n.jsx(fs,{soundSrc:i,ttsText:i?null:d??g,bucketPath:u,btnLabel:s||_("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:k,className:"training-step__listen-sticky",showSoundWaveForm:b,showNoiseWaveForm:x,leadInMs:f,tailMs:h},`audio-p${C??0}-s${e}`)})}const Kx=[];function xs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:l,onDone:s,onChange:i,context:u=Kx}){const{t:c}=_e.useTranslation(),d=l??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),m=G=>typeof G=="string"?G:G&&(G.context||G.sentence||G.question||"")||"",[p,C]=o.useState(Array.isArray(u)?u:[]),[b,x]=o.useState(()=>(p||[]).map((G,S)=>({id:S,text:m(G)}))),f=o.useMemo(()=>typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled",[t,e]),h=f!=="disabled",_=o.useRef(void 0),g=o.useRef(void 0);o.useEffect(()=>{if(_.current===u)return;_.current=u;const G=Array.isArray(u)?u:[];C(G);const S=(M=>{const I=(M||[]).map((de,re)=>({id:re,text:m(de)}));if(I.length<=1)return I;const Z=(de,re)=>{if(de.length!==re.length)return!1;for(let z=0;z<de.length;z++)if(de[z].text!==re[z].text)return!1;return!0};let le=Ta(I),oe=0;for(;Z(le,I)&&oe<20;)le=Ta(I),oe+=1;return le})(G);x(S);try{if(typeof i=="function"){const M=S.filter((I,Z)=>I.text===m(G[Z])).length;i({shuffled:S,score:M,total:(G||[]).length,initial:!0,__ts:Date.now()})}if(typeof s=="function"&&f==="active"){const M=S.filter((I,Z)=>I.text===m(G[Z])).length;g.current=u,s({shuffled:S,score:M,total:(G||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(f!=="active"||g.current===u||(g.current=u,typeof s!="function"))return;const G=Array.isArray(u)?u:[],S=b.filter((M,I)=>M.text===m(G[I])).length;s({shuffled:b,score:S,total:G.length,initial:!0,__ts:Date.now()})},[f,u]);const k=(G,S)=>{const M=[...b],I=G+S;if(I<0||I>=M.length)return;const Z=M[I];M[I]=M[G],M[G]=Z,J(M);try{if(typeof s=="function"&&f==="active"){const le=M.filter((oe,de)=>oe.text===m(p[de])).length;s({shuffled:M,score:le,total:(p||[]).length,__ts:Date.now()})}}catch{}},[v,B]=o.useState(null),y=o.useRef(null),w=o.useRef(null),A=o.useRef(null),E=o.useRef(null),D=o.useRef(null),N=o.useRef({x:0,y:0}),F=o.useRef(null),R=o.useRef({dx:0,dy:0}),K=()=>{if(F.current!==null)return;const G=()=>{if(!y.current){F.current=null;return}F.current=requestAnimationFrame(G);const S=N.current,M=R.current||{dx:0,dy:0};y.current&&(y.current.style.transform=`translate3d(${S.x-M.dx}px, ${S.y-M.dy}px, 0)`)};F.current=requestAnimationFrame(G)},L=o.useRef(new Map),$=o.useRef(new Map),T=()=>{const G=new Map;return L.current.forEach((S,M)=>{S&&S.getBoundingClientRect&&G.set(M,S.getBoundingClientRect())}),G},J=G=>{const S=T();x(G);try{if(typeof i=="function"){const M=G.filter((I,Z)=>I.text===m(p[Z])).length;i({shuffled:G,score:M,total:(p||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const M=T();G.forEach(I=>{const Z=S.get(I.id),le=M.get(I.id),oe=L.current.get(I.id);if(!oe||!Z||!le)return;const de=Z.top-le.top;de&&(oe.style.transition="none",oe.style.transform=`translateY(${de}px)`,requestAnimationFrame(()=>{oe.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",oe.style.transform="";const re=()=>{oe.style.transition="",oe.removeEventListener("transitionend",re)};oe.addEventListener("transitionend",re)}))})})},q=(G,S)=>{try{try{S.dataTransfer?.setData("text/plain",String(G))}catch{}try{S.dataTransfer&&(S.dataTransfer.effectAllowed="move")}catch{}try{const M=document.createElement("div");M.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(M),S.dataTransfer?.setDragImage(M,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(M)}catch{}})}catch{}}catch{}B(G);try{const M=b[G],I=document.createElement("div");I.className="order-list__dragging-object order-list__dragging-object--visible",I.textContent=M&&M.text?M.text:"",document.body.appendChild(I),y.current=I;const Z=L.current.get(M.id);let le=S.clientX||0,oe=S.clientY||0;try{if(Z&&Z.getBoundingClientRect){const U=Z.getBoundingClientRect();le=U.left+U.width/2,oe=U.top+U.height/2}}catch{}const de=I.getBoundingClientRect(),re=de.width/2,z=de.height/2;R.current={dx:re,dy:z},I.style.transition="none",N.current={x:le,y:oe},I.style.transform=`translate3d(${le-re}px, ${oe-z}px, 0)`,requestAnimationFrame(()=>{try{I.style.transition=""}catch{}K()});const ne=U=>{const pe=U;N.current={x:pe.clientX,y:pe.clientY},K()};A.current=ne,document.addEventListener("mousemove",ne);const H=U=>{const pe=U;N.current={x:pe.clientX,y:pe.clientY},K()};w.current=H,document.addEventListener("dragover",H);try{S.dataTransfer?.setData("text/plain",String(G));try{S.dataTransfer?.setData("application/json",JSON.stringify({idx:G}))}catch{}}catch{}}catch{}},O=(G,S)=>{S.preventDefault();try{S.dataTransfer&&(S.dataTransfer.dropEffect="move")}catch{}try{D.current!==null&&(clearTimeout(D.current),D.current=null);const M=S.currentTarget&&S.currentTarget.closest?S.currentTarget.closest(".order-list__item"):null;if(M&&E.current!==M){if(E.current)try{E.current.classList.remove("drag-over")}catch{}try{M.classList.add("drag-over")}catch{}E.current=M}}catch{}},Q=(G,S)=>{S.preventDefault();const M=S.dataTransfer?.getData("text/plain")||"",I=M?parseInt(M,10):v,Z=G;if(typeof I!="number"||isNaN(I)||I===Z){B(null),W(),P();return}const le=gf(b,I,Z);J(le),B(null),P();try{if(typeof s=="function"&&f==="active"){const oe=le.filter((de,re)=>de.text===m(p[re])).length;s({shuffled:le,score:oe,total:(p||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const oe=document.querySelectorAll(".order-list .order-list__item")[Z];if(!oe)return;const de=oe.querySelector(".order-list__slot")||oe;try{de.classList.add("pulse"),de.offsetHeight,de.classList.add("to-dark");const re=()=>{de.classList.remove("pulse","to-dark"),de.removeEventListener("transitionend",re)};de.addEventListener("transitionend",re)}catch{}})}catch{}W()},P=()=>{if(y.current){try{document.body.removeChild(y.current)}catch{}y.current=null}w.current&&(document.removeEventListener("dragover",w.current),w.current=null),A.current&&(document.removeEventListener("mousemove",A.current),A.current=null),F.current!==null&&(cancelAnimationFrame(F.current),F.current=null)},V=()=>{B(null),W(),P()};o.useEffect(()=>()=>P(),[]);const W=()=>{try{if(D.current!==null&&(clearTimeout(D.current),D.current=null),E.current){try{E.current.classList.remove("drag-over")}catch{}E.current=null}document.querySelectorAll(".order-list .order-list__item").forEach(G=>G.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const G=Math.max(1,(b||[]).length);b.forEach((S,M)=>{const I=$.current.get(S.id);if(!I)return;let Z=50;G>1&&(Z=Math.round(M/(G-1)*100));try{I.style.setProperty("--marker-pos",Z+"%")}catch{}})}catch{}},[b]),o.useEffect(()=>()=>{P(),D.current!==null&&(clearTimeout(D.current),D.current=null)},[]),n.jsx(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:d,children:n.jsx("div",{className:"order-list",children:b.map((G,S)=>{const M=Math.max(1,(b||[]).length),I=M>1?Math.round(S/(M-1)*100):50;return n.jsx("div",{className:"order-list__item",children:n.jsxs("div",{className:"order-list__slot","data-disabled":f==="disabled","aria-disabled":f==="disabled",children:[f!=="disabled"?n.jsx("div",{className:"order-list__marker caption-1",style:{"--marker-pos":I+"%"},ref:Z=>{const le=$.current;Z?le.set(G.id,Z):le.delete(G.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:S+1})}):null,n.jsxs("div",{ref:Z=>{const le=L.current;Z?le.set(G.id,Z):le.delete(G.id)},className:`order-list__draggable ${v===S?"dragging":""}`,"data-disabled":f==="disabled","aria-disabled":f==="disabled",tabIndex:f==="disabled"?-1:0,draggable:h,onDragStart:h?Z=>q(S,Z):void 0,onDragEnter:h?Z=>O(S,Z):void 0,onDragOver:h?Z=>O(S,Z):void 0,onDragLeave:h?()=>{try{D.current!==null&&clearTimeout(D.current),D.current=setTimeout(()=>{try{const Z=document.querySelectorAll(".order-list .order-list__item");Z&&Z[S]&&(Z[S].classList.remove("drag-over"),E.current===Z[S]&&(E.current=null))}catch{}},80)}catch{}}:void 0,onDrop:h?Z=>Q(S,Z):void 0,onDragEnd:h?V:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:G.text}),h?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:()=>k(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:()=>k(S,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:S===b.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},G.id)})})})}const Yx=8e3;function Zx(e,t){return new Promise(a=>{let r=!1;const l=()=>{r||(r=!0,a())};e.then(l,l),setTimeout(l,t)})}function Oc({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:l,onDone:s,onChange:i,context:u=[],selectable:c=!1,hideLabel:d=!1,hideAudio:m=!1,maxCards:p,playAllGapMs:C=0}){const{t:b}=_e.useTranslation(),x=l??b("training.cardInstructions","\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694."),f=o.useMemo(()=>Array.isArray(u)?u:u&&u.items||[],[u]),h=p??3,_=(f||[]).slice(0,h);(f||[]).length>h&&console.warn(`TrainingStepCard: ${f.length} items passed but only ${h} shown`);const g=typeof e=="number"?e:-1,k=typeof t!="number"?"disabled":g<t?"done":g===t?"active":"disabled",[v,B]=o.useState(null),y=o.useRef([]),[w,A]=o.useState(!1),E=o.useRef(null),D=o.useRef(!0);o.useEffect(()=>(D.current=!0,()=>{D.current=!1}),[]);const N=o.useMemo(()=>f.map(T=>T?.id??T?.word??"").join("|"),[f]);o.useEffect(()=>{B(null)},[N]);const F=o.useRef(void 0);o.useEffect(()=>{const T=F.current;typeof T=="number"&&typeof t=="number"&&typeof e=="number"&&T>=e&&t<e&&B(null),F.current=t},[t,e]);const R=o.useCallback((T,J)=>{if(c)return;const q={item:T,index:J,__ts:Date.now()};try{typeof i=="function"&&i(q)}catch{}if(k==="active"&&typeof s=="function")try{s(q)}catch{}},[c,i,k,s]),K=o.useRef(C);o.useEffect(()=>{K.current=Math.max(0,C||0)},[C]);const L=o.useCallback(async()=>{if(w||k==="disabled")return;A(!0);let T=!1;const J=new Promise(q=>{E.current=()=>{T=!0,q()}});try{for(let q=0;q<_.length&&!(!D.current||T);q++){const O=y.current[q];if(!O)continue;await Promise.race([Zx(O.play(),Yx),J]);const Q=Math.max(0,K.current||0);Q>0&&q<_.length-1&&!T&&D.current&&await Promise.race([new Promise(P=>{setTimeout(P,Q)}),J])}}finally{E.current=null,A(!1)}},[w,k,_.length]),$=o.useCallback((T,J)=>{if(!ta(k))return;B(J);const q={selectedValue:T.word||T.title||"",selectedIndex:J,item:T,__ts:Date.now()};try{typeof i=="function"&&i(q)}catch{}if(typeof s=="function")try{s(q)}catch{}},[i,k,s]);return n.jsx(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:x,onDone:s,titleProps:{usePlayAllBtn:!m&&_.length>0,onPlayAll:L,playAllActive:w},children:n.jsx("div",{className:"training-step__cards",onClickCapture:T=>{const J=E.current;if(!J)return;const q=T.target;q&&typeof q.closest=="function"&&q.closest(".training-word-card__bottom")&&J()},children:_.length===0?n.jsx("div",{className:"training-step__empty",children:b("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):_.map((T,J)=>n.jsx(Jo,{ref:q=>{y.current[J]=q},item:T,disabled:k==="disabled",onPlayDone:()=>R(T,J),selectable:c,selected:c&&v===J,onSelect:c?()=>$(T,J):void 0,flipDelay:J*120,hideLabel:d,hideAudio:m},T&&T.id||J))})})}const Xx=160,zc=()=>{};function $n(e){const t=o.useId();if(!("variant"in e)){const{label:g,sub:k,onClick:v,children:B,align:y="horizontal",icon:w,useFullWidth:A=!1}=e,E=D=>{v&&D.target===D.currentTarget&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),v())};return n.jsxs("div",{className:we("panel-row",y==="vertical"?"panel-row--vertical":"",A?"panel-row--label-fixed panel-row--fill":"",v?"panel-row--clickable":""),onClick:v,onKeyDown:v?E:void 0,role:v?"button":void 0,tabIndex:v?0:void 0,children:[w!=null&&n.jsx("div",{className:"panel-row__icon",children:w}),g!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsx("div",{className:"panel-row__label body-3",children:g}),k&&n.jsx("div",{className:"panel-row__sub caption-1",children:k})]}),n.jsx("div",{className:"panel-row__right",children:B})]})}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(Ga,{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:l,onClick:s,required:i,error:u,align:c="horizontal",useFullWidth:d=!1,icon:m}=e,p=a==="button"?void 0:s;let C=null;const b=a==="toggle"?`panel-toggle-${t}`:void 0,x=u?`panel-error-${t}`:void 0,f=`panel-helper-${t}`;if(a==="toggle"){const g=e;C=n.jsx(vu,{checked:g.checked,onChange:g.onChange,id:b})}else if(a==="segmented"){const g=e;C=n.jsx(wn,{options:g.options,value:g.value,onChange:g.onChange,size:g.size??40,ariaLabel:r})}else if(a==="dropdown"){const g=e,k=g.dropdowns?.length?n.jsx("div",{className:`panel-row__dropdown-group${d?" panel-row__dropdown-group--full":""}`,children:g.dropdowns.map((v,B)=>n.jsx("div",{className:d?"panel-row__dropdown-item--full":void 0,children:n.jsx(fn,{options:v.options,value:v.value,onChange:v.onChange,placeholder:v.placeholder,block:d,error:!!u,ariaDescribedBy:x,ariaLabel:v.ariaLabel??([r,v.placeholder].filter(Boolean).join(" ")||void 0)})},B))}):n.jsx(fn,{options:g.options??[],value:g.value??"",onChange:g.onChange??zc,block:d,error:!!u,ariaLabel:r,ariaDescribedBy:x});C=u?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[k,n.jsx("span",{id:x,className:"caption-1 panel-row__error",role:"alert",children:u})]}):k}else if(a==="button"){const g=e;g.buttons?.length?C=n.jsx("div",{className:"panel-row__button-group",children:g.buttons.map((k,v)=>n.jsx(fe,{htmlType:"button",size:k.btnSize??40,variant:k.btnVariant??"default",disabled:k.disabled,onClick:k.onClick,children:k.label},v))}):C=n.jsx(fe,{htmlType:"button",size:g.btnSize??40,variant:g.btnVariant??"default",disabled:g.disabled,onClick:g.onClick,children:g.buttonLabel})}else if(a==="text"){const g=e;C=n.jsx("span",{className:`panel-row__text body-2${d?" panel-row__text--full":""}`,style:g.valueColor?{color:g.valueColor}:void 0,children:g.value})}else if(a==="input"){const g=e;C=n.jsxs("div",{className:`panel-row__input-wrap${d?" panel-row__input-wrap--full":""}`,children:[n.jsx(Xn,{value:g.value,onChange:g.onChange??zc,onKeyDown:g.onKeyDown,onEnter:g.onEnter,placeholder:g.placeholder,ghostText:g.ghostText,inputMode:g.inputMode,readOnly:g.readOnly,disabled:g.disabled,type:g.type,autoComplete:g.autoComplete,maxLength:g.maxLength,showCount:g.showCount,multiline:g.multiline,rows:g.rows,fullWidth:d,error:u,ariaLabel:r,required:i,ariaDescribedBy:g.helperText?f:void 0}),g.helperText&&n.jsx("div",{id:f,className:"panel-row__helper caption-1",children:g.helperText})]})}else a==="custom"&&(C=e.children);u&&a!=="input"&&a!=="dropdown"&&(C=n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[C,n.jsx("span",{id:x,className:"caption-1 panel-row__error",role:"alert",children:u})]}));const h=a==="input"||a==="dropdown"||(a==="text"||a==="custom")&&d,_=g=>{p&&g.target===g.currentTarget&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),p())};return n.jsxs("div",{className:we("panel-row",c==="vertical"?"panel-row--vertical":"",h?"panel-row--label-fixed":"",a==="text"?"panel-row--text":"",p?"panel-row--clickable":""),onClick:p,onKeyDown:p?_:void 0,role:p?"button":void 0,tabIndex:p?0:void 0,children:[m!=null&&n.jsx("div",{className:"panel-row__icon",children:m}),n.jsxs("div",{className:"panel-row__left",children:[b?n.jsxs("label",{htmlFor:b,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:"*"})]}),l&&n.jsx("div",{className:"panel-row__sub caption-1",children:l})]}),n.jsx("div",{className:"panel-row__right",children:C})]})}function Wc(e){const t=e.productName||e.brand,a=[e.brand,e.fitType].filter(r=>!!r&&r!==t);return[...new Set(a)].join(" \xB7 ")}function Jx({devices:e,onRelease:t,emptyLabel:a}){const{t:r,i18n:l}=_e.useTranslation();return n.jsx("div",{className:"panel-row panel-row--device",children:["left","right"].map(s=>{const i=e[s],u=s==="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(s)})]}),i?n.jsxs("div",{className:"panel-row__device-info",children:[n.jsxs("span",{className:"panel-row__device-kind",children:[i.device&&n.jsx(Lt,{size:"small",variant:zu(i.device),fill:"soft",label:Wu(i.device,r)}),Wc(i)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:Wc(i)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),Yo(i.wornYear,i.wornMonth,i.wornDay,l.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:r("customers.device.wornSince",{date:Yo(i.wornYear,i.wornMonth,i.wornDay,l.language)})})]}):n.jsx("span",{className:"panel-row__device-empty body-3",children:a??r("customers.device.notRegistered","\uBBF8\uB4F1\uB85D")})]},s)})})}function Nr({title:e,titleLevel:t=2,icon:a,disc:r,actions:l,size:s="medium",minHeight:i,maxWidth:u,className:c,scrollable:d,scrollbarGutter:m="auto",compactRows:p=!1,useBorder:C=!0,useBg:b=!0,useRowBorder:x=!0,labelWidth:f,form:h=!1,loading:_,empty:g,children:k}){const v=we("panel",`panel--${s}`,h?"panel--form":"",i!==void 0?"panel--fill":"",C?"":"panel--no-border",b?"":"panel--no-bg",x?"":"panel--no-row-border",p?"panel--compact-rows":"",c),B={};i!==void 0&&(B.minHeight=i),u!==void 0&&(B.maxWidth=typeof u=="number"?`${u}px`:u),f!==void 0&&(B["--panel-label-width"]=typeof f=="number"?`${f}px`:f);const y=t?`h${t}`:"div";return n.jsxs("div",{className:v,style:Object.keys(B).length?B:void 0,children:[(!!e||r!=null)&&n.jsxs("div",{className:we("panel__header",r!=null?"panel__header--with-disc":""),children:[a&&n.jsx(tt,{icon:a,label:typeof e=="string"?e:void 0,className:"panel__icon"}),n.jsxs("div",{className:"panel__title-group",children:[!!e&&n.jsx(y,{className:`panel__title ${r!=null?"body-3b":"h5b"}`,children:e}),r!=null&&n.jsx("p",{className:"panel__disc caption-1",children:r})]}),l&&n.jsx("div",{className:"panel__actions",children:l})]}),_?n.jsx($n,{variant:"loading"}):g!=null&&o.Children.toArray(k).length===0?n.jsx($n,{variant:"empty",children:g}):d?n.jsx("div",{className:we("panel__body--scroll",m==="stable"&&"panel__body--gutter-stable"),children:k}):k]})}function Qx({cols:e=2,layout:t="grid",gap:a=1,collapseAt:r,className:l,style:s,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 C=new ResizeObserver(([b])=>d(b.contentRect.width));return C.observe(p),()=>C.disconnect()},[r]);const m=r!==void 0&&c!==void 0&&c<=r;return n.jsx("div",{ref:u,className:we("panel-grid",t==="columns"&&"panel-grid--columns",l),style:{"--panel-grid-cols":m?1:e,"--panel-grid-gap":typeof a=="number"?`${a}px`:a,...s},children:i})}function e_(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 Hc(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"}]}e_(Vt.t.bind(Vt)),Hc(Vt.t.bind(Vt));const Er="none",t_=.5,n_=1.5,a_=.25;function _s({title:e,valueLabel:t,value:a,min:r,max:l,step:s,tickStep:i,size:u,disabled:c,onChange:d}){return n.jsxs($n,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(Lu,{value:a,onChange:d,min:r,max:l,step:s,size:u,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:c,className:"noise-settings__slider-input"}),n.jsx("div",{className:we("noise-settings__value","button-1",c?"noise-settings__value--disabled":""),children:t})]})}function Vc({anchorRect:e,onClose:t,hideNoiseRows:a=!1}){const{t:r}=_e.useTranslation(),l=Cn("(max-width: 767px)")?40:24,s=_r(),i=Ja(s?.settings??Qn),u=s?.settings.type??"defaultNoise",c=s?.settings.enabled??!0,d=s?.playbackRate??1,m=s?.mainVolume??1,p=Math.round(m*100),C=o.useCallback(_=>{try{s?.setMainVolume(Math.max(0,Math.min(1,_/100)))}catch{}},[s]),b=o.useCallback(_=>{try{s?.setPlaybackRate(_)}catch{}},[s]),x=o.useCallback(_=>{const g=Math.min(Xa,Math.max(0,Math.round(_*10)/10));try{s?.setSettings({noiseRatio:g})}catch{}},[s]),f=o.useCallback(_=>{try{_===Er?s?.setSettings({enabled:!1}):s?.setSettings({type:_,enabled:!0})}catch{}},[s]),h=[{key:Er,label:r("training.noise.type.none","\uC5C6\uC74C")},...Hc(r).map(_=>({key:_.value,label:_.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:"noise-settings__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(Nr,{className:"noise-settings",useBorder:!1,labelWidth:72,children:[n.jsx(_s,{title:r("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${p}%`,value:p,min:0,max:100,step:10,size:l,onChange:C}),n.jsx(_s,{title:r("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${d.toFixed(2)}x`,value:d,min:t_,max:n_,step:a_,size:l,onChange:b}),!a&&n.jsxs(n.Fragment,{children:[n.jsx($n,{variant:"custom",label:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(wn,{ariaLabel:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:h,value:c?u:Er,onChange:f})}),n.jsx(_s,{title:r("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:r("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:Xa,step:wc,size:l,disabled:!c,onChange:x})]}),a&&n.jsx("div",{className:"noise-settings__width-ghost","aria-hidden":"true",inert:!0,children:n.jsx($n,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(wn,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:h,value:Er,onChange:()=>{}})})})]})})}function qc({useNoiseSettingBtn:e=!1,onSettings:t,onNext:a,onResult:r,stepIndex:l=0,stepCount:s=0,pageIndex:i=0,pageCount:u=1,resultOpen:c=!1,hideNoiseRows:d=!1}){const{t:m}=_e.useTranslation(),[p,C]=o.useState(!1),[b,x]=o.useState(null),[f,h]=o.useState(!1),_=o.useRef(null),g=o.useRef(null),k=_r(),v=u>0,B=v&&i<u-1,y=!v||i>=u-1,w=l===Math.max(0,s);o.useEffect(()=>{e||(C(!1),x(null))},[e]);const A=o.useCallback(()=>{C(!1),x(null)},[]),E=o.useCallback(()=>{if(p){C(!1),x(null);return}const J=_?.current?.getBoundingClientRect();J&&x(J),t?.(),C(!0)},[p,t]),D=o.useCallback(()=>{if(p){C(!1),x(null);return}const J=g?.current?.getBoundingClientRect();J&&x(J),t?.(),C(!0)},[p,t]),N=Cn("(max-width: 767px)"),F=o.useRef(null),[R,K]=o.useState(null),L=o.useCallback(()=>{h(J=>{const q=!J;return K(q?F.current?.getBoundingClientRect()??null:null),q})},[]),$=o.useCallback(()=>{h(!1),K(null)},[]);o.useEffect(()=>{c&&(h(!1),K(null))},[c]);const T=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:m("training.meter.sentence","\uC7AC\uC0DD")}),n.jsx(Uo,{analyser:k?.mainAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:m("training.meter.sentence","\uC7AC\uC0DD")})]}),n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:m("training.meter.noise","\uC18C\uC74C")}),n.jsx(Uo,{analyser:k?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:m("training.meter.noise","\uC18C\uC74C")})]})]});return Pc(e&&p,()=>typeof document<"u"?document.querySelector(".noise-settings__header")?.closest(".tooltip-content")??null:null,()=>[_.current,g.current].map(J=>J?.querySelector("button")??null).find(J=>!!J&&J.getClientRects().length>0)??_.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:_,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:E,className:p?"is-selected":void 0,"aria-expanded":p,"aria-haspopup":"dialog",ariaLabel:m("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),label:m("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),minWidth:140})})}),n.jsx("div",{className:"pp-bottom__settings--mobile",children:n.jsx("div",{ref:g,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:56,type:"dot",shape:"pill",icon:"settings",onClick:D,className:p?"is-selected":void 0,"aria-expanded":p,"aria-haspopup":"dialog",ariaLabel:m("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:F,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:L,selected:f,"aria-expanded":N?f:void 0,ariaLabel:m("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&f&&!N&&n.jsx("div",{className:"pp-bottom__meters",children:T})]}),e&&f&&N&&R&&n.jsx(vn,{anchorRect:R,onClose:$,ariaLabel:m("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"),children:n.jsx("div",{className:"pp-bottom__meters pp-bottom__meters--floating",children:T})}),n.jsxs("div",{className:"pp-bottom__right",children:[y&&n.jsx(fe,{htmlType:"button",size:56,type:"bar",icon:"check",onClick:typeof r=="function"?r:a,ariaLabel:m("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),label:m("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),variant:"main",disabled:!w}),B&&n.jsx(fe,{htmlType:"button",size:56,type:"bar",rightIcon:"chevron-right",align:"right",onClick:a,ariaLabel:m("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),label:m("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),variant:"main",disabled:!w})]}),e&&p&&n.jsx(Vc,{anchorRect:b,onClose:A,hideNoiseRows:d})]})}function Uc({title:e,subtitle:t,desc:a,depth:r,icon:l,wrapperStyle:s,iconTooltip:i,pageIndex:u,pageCount:c,progressMax:d,progressIndex:m,onBack:p,onClose:C}){const{t:b}=_e.useTranslation(),x=Cn("(max-width: 767px)"),f=Number.isInteger(m)?m:u||0,h=Number.isInteger(d)?d:c||0,_=p||C,g=Array.isArray(r)?x?r[r.length-1]:r.join(" / "):r,k=typeof e=="string"?e.trim():e,v=typeof t=="string"?t.trim():t,B=!!(k||v),y=B?k||v:b("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),w=g||(k?t:void 0),A=x&&typeof w=="string"&&(w.includes(" \xB7 ")||w.includes(" / "))?w.split(/\s[·/]\s/).pop():w,E=o.useMemo(()=>{const D=s&&typeof s=="object"?{...s}:{};return!("width"in D)&&!("height"in D)&&(D.width="40px",D.height="40px"),D},[s]);return n.jsxs("header",{className:"pp-title training-popup-title",children:[n.jsxs("div",{className:"pp-title__left",children:[_?n.jsx(fe,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:b("common.back","\uB4A4\uB85C"),onClick:_,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:l?n.jsx(du,{icon:l,label:e,tooltip:i,wrapperStyle:E}):null}),n.jsxs("div",{className:"pp-title__text",children:[A?n.jsx("span",{className:"pp-title__depth caption-1",children:A}):null,n.jsx("span",{className:`pp-title__title h2${B?"":" pp-title__title--empty"}`,children:y}),a?n.jsx("span",{className:"pp-title__description caption-1",children:a}):null]})]}),n.jsx(Iu,{max:Math.max(0,h??0),index:Math.max(0,f??0)})]})}function r_(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function o_(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 Gc=(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 Kc(e,t,a){const r=e,l=r?.title||r?.name||(Array.isArray(t)?t[t.length-1]:void 0)||a||"\uD6C8\uB828",s=ql().find(u=>u.key===(r?.category_0||r?.category_main_code)),i=s?.subs?.find(u=>u.key===(r?.category_1||r?.category_sub_code));return{title:l,label:r?.title||l,depth:t,icon:s?.icon,wrapperStyle:s?.color?{"--t-item-fg":s.color}:void 0,iconTooltip:[s?Gc(`topic.${s.key}`,s.label):void 0,i?Gc(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function ws(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function Yc(e,t,a){if(!e||typeof e!="object"||Array.isArray(e))return e;const r=e,l=typeof a=="number"&&a>0?a:Date.now();return{...r,...r.shownAt===void 0&&t?{shownAt:t}:{},...r.answeredAt===void 0?{answeredAt:new Date(l).toISOString()}:{}}}function s_(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function l_({idPrefix:e,trainingData:t,depth:a,fallbackTitle:r="\uD6C8\uB828",pages:l=[],emptyMessage:s,buildResults:i,metaPatch:u}){const c=Kc(t,a,r),d=typeof u=="function"?u(c)||{}:u||{},m=t?.id||t?.title||l.length;return{id:`${e}:${m}`,meta:{...c,...d},pages:l,emptyMessage:s,buildResults:i}}function i_(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return t.context||t.sentence||t.question||""||""}return""}function u_(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 c_(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 Zc(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function d_(e,t,a,r){return Zc(e,t*a+r)}function p_({payload:e,selected:t,choices:a=[],correctAnswers:r=[]}){if(e&&typeof e=="object"){const l=e;if(Array.isArray(l.selectedValues))return r.every(s=>l.selectedValues.includes(s))&&l.selectedValues.every(s=>r.includes(s));if(typeof l.correct=="boolean")return l.correct}if(r.length){if(typeof t=="number"&&Array.isArray(a)&&a.length)return r.some(l=>String(l)===String(a[t]));if(typeof t<"u")return r.some(l=>String(l)===String(t))}}function m_(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 Xc=o.createContext(null);function h_(){const e=o.useContext(Xc);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function C_({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:l,choices:s=[],onDone:i,onChange:u}){const{t:c}=_e.useTranslation(),d=typeof e=="number"?e:-1,m=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",[p,C]=o.useState(()=>s.map(()=>null)),b=JSON.stringify(s),x=s.length;o.useEffect(()=>{C(Array.from({length:x},()=>null))},[b]);const f=o.useRef(void 0);o.useEffect(()=>{const k=f.current;typeof k=="number"&&typeof t=="number"&&typeof e=="number"&&k>=e&&t<e&&C(Array.from({length:x},()=>null)),f.current=t},[t,e,x]);const h=o.useMemo(()=>p.filter(k=>k!==null).length+1,[p]),_=o.useCallback(k=>{if(!ta(m))return;const v=p;let B;if(v[k]!=null){const w=v[k];B=v.map(A=>A!==null&&A>=w?null:A)}else B=[...v],B[k]=h;C(B);const y={selectedOrder:B,words:s,__ts:Date.now()};try{typeof u=="function"&&u(y)}catch{}if(v[k]==null&&B.length>0&&B.every(w=>w!==null))try{typeof i=="function"&&i(y)}catch{}},[m,p,h,u,i,s]),g=l??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:g,onDone:i,children:n.jsx("div",{className:"training-step__cards",children:s.map((k,v)=>n.jsx(Jo,{item:{word:k},disabled:m==="disabled",selectable:!0,selected:p[v]!==null,orderRank:p[v],onSelect:()=>_(v),flipDelay:v*120,hideLabel:!1,hideAudio:!0},`${k}-${v}`))})})}function Dr(e){return null}Dr.__isTrainingPage=!0;function xa(e,t){const a=h_();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 Jc({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:l,isLast:s,onDone:i}=xa(e,t);return n.jsx(vs,{...a,index:r,stepIndex:l,isLast:s,onDone:i})}function Qc({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:l,isLast:s,onDone:i,onChange:u}=xa(e,t);return n.jsx(bs,{...a,index:r,stepIndex:l,isLast:s,onDone:i,onChange:u})}function ed({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:l,isLast:s,onDone:i,onChange:u}=xa(e,t);return n.jsx(ys,{...a,index:r,stepIndex:l,isLast:s,onDone:i,onChange:u})}function td({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:l,isLast:s,onDone:i,onChange:u}=xa(e,t);return n.jsx(xs,{...a,index:r,stepIndex:l,isLast:s,onDone:i,onChange:u})}function nd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:l,isLast:s,onDone:i,onChange:u}=xa(e,t);return n.jsx(Oc,{...a,index:r,stepIndex:l,isLast:s,onDone:i,onChange:u})}function f_({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:l,isLast:s,onDone:i,onChange:u}=xa(e,t);return n.jsx(C_,{...a,index:r,stepIndex:l,isLast:s,onDone:i,onChange:u})}const ad=3e4,g_=/^(https?:|blob:|data:audio|\/|\.\/)/;function rd(e){return typeof e=="string"&&g_.test(e)?e:null}const b_=e=>typeof e=="string"&&e.trim()!==""?e:null,Bs=Symbol("timed-out");function y_(e,t){if(t<=0)return Promise.resolve(Bs);let a;return Promise.race([Promise.resolve(e),new Promise(r=>{a=setTimeout(()=>r(Bs),t)})]).finally(()=>clearTimeout(a))}function v_(e){return e?Na()||Jr()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function x_(e,t){const a=[],r=rd(t);r&&a.push({kind:"raw",resolve:async()=>r});const l=(e??"").trim();if(!l)return a;for(const[s,i]of[["urlResolver",Na()],["fallbackUrlResolver",Jr()]])i&&a.push({kind:s,resolve:async u=>{let c;try{c=await y_(i(l),u)}catch(m){return Rt(`question-sound-threw-${s}`,`[core] configureTTS \uC758 ${s} \uAC00 \uB358\uC84C\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`,m),null}return c===Bs?(Rt(`question-sound-slow-${s}`,`[core] configureTTS \uC758 ${s} \uAC00 ${ad}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):b_(c)||(Rt(`question-sound-empty-${s}`,`[core] configureTTS \uC758 ${s} \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 __(){return Date.now()+ad}const w_=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function B_(e){Rt("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 Sr(...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 l of r){if(typeof l=="string"&&l.trim().length)return l.trim();if(typeof l=="number"||typeof l=="boolean")return String(l)}}}return null}function k_(e){return Sr(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function A_(e){return rd(Sr(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function od(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=Sr(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 sd(e){const{score:t,contextsLength:a,results:r=[],subtitle:l,onReplay:s,onClose:i,inline:u=!1,pending:c=!1}=e||{},{t:d}=_e.useTranslation(),m=o.useId(),p=o.useCallback(()=>!c,[c]);o.useEffect(()=>{const D=a??0;if(t!=null&&D>0&&t/D>.5){const N=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("party:trigger",{detail:{count:140,strength:1.6,duration:2200}}))},0);return()=>window.clearTimeout(N)}},[t,a]);const C=o.useCallback(D=>{const N=od(D),F=Sr(D?.wording,D?.label);return N===!0?{variant:"main",label:F??d("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:N===!1?{variant:"danger",label:F??d("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:F??d("training.result.notJudged","\uBBF8\uD310\uC815")}},[d]),b=a??0,x=t??0,f=o.useMemo(()=>Array.isArray(r)?r:[],[r]),h=o.useRef(null),[_,g]=o.useState(null),k=o.useCallback(()=>{h.current?.(),h.current=null,g(null)},[]);o.useEffect(()=>k,[k]);const v=o.useRef(0),B=(D,N)=>{if(!Pn)return;const F=Math.round(performance.now()-v.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${F}ms ${D}`,N??"")},y=o.useRef(0),w=o.useCallback((D,N,F)=>{k();const R=++y.current,K=()=>y.current===R;v.current=Pn?performance.now():0,B(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${D}`,{text:N,rawUrl:F}),g(D),h.current=()=>{B("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),y.current++,Zr()};const L=q=>{B("\uD2BC\uB2E4",q);const O=hr(q,Q=>{B(`\uB05D\uB0AC\uB2E4 \u2014 ${Q?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:K()}),Q&&K()&&(h.current=null,g(null))});return h.current=()=>{B("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),y.current++,O.stop(),Zr()},O.done},$=x_(N,F);B("\uCC28\uB840",$.map(q=>q.kind));const T=$[0]?.kind==="raw",J=T?L(F):Promise.resolve(!1);(async()=>{if(await J||!K())return;const q=__(),O=T?$.slice(1):$;for(let Q=0;Q<O.length;Q++){if(!K())return;B(`${O[Q].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const P=await O[Q].resolve(w_(q,O.length-Q));if(B(`${O[Q].kind} \uAC00 \uB2F5\uD588\uB2E4`,P),!K()||P&&(await L(P)||!K()))return}K()&&(B("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),B_(N),h.current=()=>{y.current++,Zr()},B("\uB0AD\uB3C5\uD55C\uB2E4"),kC(N,{onEnd:()=>{K()&&(h.current=null,g(null))}}))})()},[k]),A=o.useMemo(()=>f.map(D=>{const N=D??{},F=k_(N)||d("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:R,label:K}=C(N),L=Array.isArray(N.corrects)?N.corrects:[],$=L.length?L.join(", "):N.answer!=null&&N.answer!==""?String(N.answer):null,T=typeof N.selectedText=="string"?N.selectedText:null,J=od(N)===!0,q=A_(N),O=!!q||v_(F);return{problem:F,variant:R,label:K,answer:$,selectedText:T,isCorrect:J,sound:q,canHear:O}}),[f,C,d]),E=o.useMemo(()=>A.some(D=>D.answer!==null||D.selectedText!==null),[A]);return n.jsx(Wn,{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:D,closeWithAnimation:N})=>n.jsxs(n.Fragment,{children:[c&&n.jsx("p",{id:m,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:()=>D(s)}),n.jsx(fe,{htmlType:"button",size:56,type:"bar",label:d("training.result.done","\uC644\uB8CC"),variant:"main",onClick:N,disabled:c,onDisabledClick:c?()=>{}:void 0,"aria-describedby":c?m: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.")}),l&&n.jsx("p",{className:"trp-result__subtitle body-3",children:l}),n.jsx("div",{className:"trp-score",children:n.jsxs("div",{className:"trp-score__figure","aria-label":d("training.result.scoreAria",{correct:x,total:b}),children:[n.jsx("span",{className:"trp-score__big",children:x}),n.jsx("span",{className:"trp-score__sep",children:"/"}),n.jsx("span",{className:"trp-score__total",children:b})]})})]}),A.length>0&&n.jsx("section",{className:"trp-result__body",children:n.jsxs("div",{className:`result-table${E?" 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")}),E&&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")})]}),A.map((D,N)=>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(N+1).padStart(2,"0")}),n.jsx("div",{className:"trp-row__q body-2",children:D.problem}),D.canHear&&n.jsx(fe,{htmlType:"button",size:32,type:"dot",useBorder:!1,icon:_===N?"square":"volume-2",className:"trp-row__replay",ariaLabel:_===N?d("training.result.replaySoundStop",{no:N+1,defaultValue:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4"}):d("training.result.replaySound",{no:N+1,defaultValue:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30"}),onClick:()=>_===N?k():w(N,D.problem,D.sound)})]}),E&&n.jsxs("div",{className:"trp-row__answers",children:[D.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:D.answer})]}),n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:`trp-row__answer-label answer-selected caption-1 ${D.isCorrect?"is-correct":"is-wrong"}`,children:d("training.result.colSelected","\uC120\uD0DD")}),n.jsx("span",{className:`trp-row__answer-value body-2 ${D.isCorrect?"is-correct":"is-wrong"}`,children:D.selectedText??"\u2014"})]})]}),n.jsx("div",{className:"trp-row__judge",children:n.jsx(Lt,{variant:D.variant,label:D.label,fill:"soft",minWidth:80})})]},N))]})})]})})}const ks=new Set;function N_(e){o.useEffect(()=>{if(!e||ks.has(e))return;ks.add(e);const t=()=>typeof document>"u"||document.visibilityState!=="hidden";let a=null,r=null,l=0,s=0;const i=()=>{const m=Date.now();a==null&&(a=m),r==null&&(r=m)},u=()=>{r!=null&&(l+=Date.now()-r,r=null)};t()&&i();const c=()=>{if(u(),a==null)return;const m=l-s;if(m<1e3||s===0&&l<5e3)return;const p=Date.now(),C=p-m;s=l,vf({trainingType:e,startedAt:new Date(C).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(),ks.delete(e)}},[e])}function jr(e,t){return e&&e.id||`page-${t??0}`}function Tr(e,t){return e&&e.key||`step-${t??0}`}function Mr(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function E_(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const D_=300,S_=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},Rn=Object.freeze({}),ld=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function As(e){const t=e,a=t?.results||t?.answers||[],r=Array.isArray(a)&&a.length>0?a.length:null,l=Array.isArray(a)?a.filter(s=>s?.correct===!0||s?.isCorrect===!0||s?.score===1||s?.heard===!0||s?.judgement===!0).length:null;return{results:a,correct:r!=null?l:null,total:r}}const j_=e=>n.jsx(sd,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function T_(e){const{scenario:t,title:a,subTitle:r,depth:l,icon:s,wrapperStyle:i,iconTooltip:u,pageIndex:c,pageCount:d,stepIndex:m,stepCount:p,onBack:C,onComplete:b,onRoundFinished:x,onNext:f,onSettings:h,useNoiseSetting:_=!0,children:g,ariaLabel:k,label:v,buildResults:B,onResult:y,typeKey:w,entryPoint:A,dailyTotal:E,itemRef:D,renderResultPopup:N,noiseOverride:F,hideNoiseRows:R=!1}=e;N_(w&&!ld.has(w)?w:"");const K=o.useRef(0);o.useEffect(()=>{K.current=Date.now()},[]);const{t:L}=_e.useTranslation(),$=y,T=!!t,J=t?.id||null,q=t?.meta||{},O=Array.isArray(t?.pages)?t.pages:[],Q=Array.isArray(g)||o.isValidElement(g)&&typeof g!="function"?o.Children.toArray(g).filter(o.isValidElement):[],P=Q.length>0,V=se=>se===Dr||se?.__isTrainingPage===!0,W=P&&Q.some(se=>V(se.type)),G=W?Q.filter(se=>V(se.type)).map((se,Ae)=>{const Te=se.props||{};return{id:`children-page-${Ae}`,steps:o.Children.toArray(Te.children).filter(o.isValidElement),pageTop:Te.pageTop||Te.top||null,pageBottom:Te.pageBottom||Te.bottom||null}}):[{id:"children-page-0",steps:Q}],S=P&&!T&&typeof g!="function",M=S?Math.max(1,G.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 se=document.body;return se.dataset.ihabTrainingPopupCount=String(Number(se.dataset.ihabTrainingPopupCount||"0")+1),se.classList.add("ihab-training-popup-open"),()=>{const Ae=Number(se.dataset.ihabTrainingPopupCount||"1")-1;Ae>0?se.dataset.ihabTrainingPopupCount=String(Ae):(delete se.dataset.ihabTrainingPopupCount,se.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!(typeof document>"u"||!document.body))return ev()},[]);const[I,Z]=o.useState({...Qn,enabled:!1}),le=o.useRef(I);o.useEffect(()=>{le.current=I},[I]);const oe=o.useRef(F),de=o.useRef(!1),re=o.useRef(null);o.useEffect(()=>{let se=!1;const Ae=Te=>{if(se)return;de.current=!0;const Ke=Te?Jn({...Qn,enabled:!1},Te):{...Qn},Fe=re.current;re.current=null;const Y=Fe?Jn(Ke,Fe):Ke;le.current=Y,Z(Y),Fe&&!oe.current&&co(Y),rr(Y);const ce=oe.current;if(ce){const ee=typeof ce=="function"?ce(Y):ce,xe=Jn(Y,ee);le.current=xe,Z(xe),rr(xe)}};return jf().then(Te=>{if(se){const Ke=re.current;if(re.current=null,Ke&&!oe.current){const Fe=Te?Jn({...Qn,enabled:!1},Te):{...Qn};co(Jn(Fe,Ke))}return}Ae(Te)}),()=>{se=!0}},[]);const[z,ne]=o.useState(null),[H,U]=o.useState(null),pe=o.useCallback((se,Ae)=>{se==="main"?ne(Ae):U(Ae)},[]),Ee=o.useRef(null),ge=o.useRef(null),me=o.useCallback(()=>{ge.current!==null&&(clearTimeout(ge.current),ge.current=null);const se=Ee.current;Ee.current=null,se&&co(se)},[]);o.useEffect(()=>{if(typeof window>"u")return;const se=()=>{document.visibilityState==="hidden"&&me()};return window.addEventListener("pagehide",me),document.addEventListener("visibilitychange",se),()=>{window.removeEventListener("pagehide",me),document.removeEventListener("visibilitychange",se),me()}},[me]);const ie=o.useCallback(se=>{const Ae=Jn(le.current,se);if(le.current=Ae,Z(Ae),!de.current){re.current={...re.current??{},...se},rr(Ae);return}oe.current||(Ee.current=Ae,ge.current!==null&&clearTimeout(ge.current),ge.current=setTimeout(me,D_)),rr(Ae)},[me]),be=I.mainSpeed,he=I.mainVolume,ue=o.useCallback(se=>ie({mainSpeed:se}),[ie]),Me=o.useCallback(se=>ie({mainVolume:se}),[ie]),qe=o.useMemo(()=>({settings:I,setSettings:ie,registerAnalyser:pe,mainAnalyser:z,noiseAnalyser:H,playbackRate:be,setPlaybackRate:ue,mainVolume:he,setMainVolume:Me}),[I,ie,pe,z,H,be,ue,he,Me]),je=o.useRef(null),[Ve,Oe]=o.useState(0),dt=o.useRef([]),[rt,nt]=o.useState("center"),[pt,Ne]=o.useState(!1),Ue=o.useRef(!1),ke=o.useRef(null),He=o.useCallback(se=>{Ue.current||(Ue.current=!0,Ne(!0),ke.current=setTimeout(()=>{try{se()}catch{Ue.current=!1,Ne(!1)}},S_()?0:Xx))},[]);o.useEffect(()=>()=>{ke.current&&clearTimeout(ke.current)},[]);const Be=o.useRef(C);o.useEffect(()=>{Be.current=C});const Se=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{const se=je.current,Ae=Se.current;if(fo(se,Ae),se){const Te=Array.from(se.querySelectorAll(_n)).filter(Ke=>!Ke.closest('[aria-hidden="true"]'))[0];if(Te)try{Te.focus()}catch{}}return()=>{const Te=document.activeElement;if(!Te||Te===document.body||se&&se.contains(Te))try{go(Ae)?.focus?.()}catch{}}},[]),o.useEffect(()=>Gn(()=>He(()=>{const se=Be.current;typeof se=="function"&&se()})),[He]),ho(je,!0);const[Le,Ze]=o.useState(!1),xt=o.useRef(!1),[et,Xe]=o.useState(null),At=o.useRef(0),gt=o.useRef(0),_t=()=>{At.current+=1,gt.current+=1,Xe(null)},[Nt,mt]=o.useState(""),[st,Pe]=o.useState(()=>Mr()),bt=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!T&&!S||(Pe(Mr()),_t())},[T,J,S]),o.useEffect(()=>{S&&Pe(se=>{const Ae=Math.max(0,Math.min(se.pageIndex,Math.max(0,M-1)));return Ae!==se.pageIndex?{...se,pageIndex:Ae,stepIndex:0}:se})},[S,M]);const wt=S?Math.max(0,Math.min(st.pageIndex,M-1)):0,lt=S?G[wt]:null,jt=S&<&&Array.isArray(lt.steps)?lt.steps:[],Ge=T?st.pageIndex:S?wt:typeof c=="number"?c:0,yt=T?O[Math.max(0,Math.min(st.pageIndex,Math.max(0,O.length-1)))]:null,$t=T&&yt&&Array.isArray(yt.steps)?yt.steps:[],Re=T?$t.length:S?jt.length:typeof p=="number"?p:0,ot=T||S?Math.max(0,Math.min(st.stepIndex,Math.max(0,Re))):typeof m=="number"?m:0,Et=T?O.length:S?M:typeof d=="number"?d:0;o.useEffect(()=>{if(!T&&!S)return;const se=T?jr(yt,Ge):lt?.id||`children-page-${Ge??0}`,Ae=new Date().toISOString();for(let Te=0;Te<=ot;Te+=1){const Ke=T?Tr($t[Te],Te):`step-${Te}`,Fe=ve(se,Ke);ae.current.has(Fe)||ae.current.set(Fe,Ae)}},[T,S,Ge,ot,lt?.id]),o.useLayoutEffect(()=>{const se=bt.current;if(typeof Ge=="number"&&se!==null&&Ge!==se&&Ge>se)try{mt(L("training.problemNotice",{n:Ge+1}))}catch{}bt.current=typeof Ge=="number"?Ge:bt.current},[Ge,c,L]),o.useLayoutEffect(()=>{const se=je.current;if(!se)return;const Ae=()=>se.querySelector(".page-popup__scroll");let Te=null,Ke=null,Fe=null;const Y=We=>{const at=Ae();if(!at)return;const ft=at.scrollHeight<=at.clientHeight;if(nt(ft?"center":"top"),We&&!xt.current){xt.current=!0;try{Ze(!0)}catch{}try{xe.disconnect()}catch{}}},ce=()=>{Te!==null&&cancelAnimationFrame(Te),Te=requestAnimationFrame(()=>{Ke!==null&&clearTimeout(Ke),Ke=setTimeout(()=>Y(!0),60)})},ee=()=>{Fe!==null&&cancelAnimationFrame(Fe),Fe=requestAnimationFrame(()=>Y(!1))};ce(),window.addEventListener("resize",ee);const xe=new MutationObserver(ce);xe.observe(se,{childList:!0,subtree:!0,attributes:!0});const $e=setTimeout(()=>{xt.current||Y(!0)},400);return()=>{window.removeEventListener("resize",ee),Te!==null&&cancelAnimationFrame(Te),Ke!==null&&clearTimeout(Ke),Fe!==null&&cancelAnimationFrame(Fe),clearTimeout($e);try{xe.disconnect()}catch{}}},[je]);const Je=o.useCallback(se=>{je.current&&(je.current._childOnNext=se)},[]),Dt=o.useCallback(se=>{je.current&&(je.current._childOnResult=se)},[]),ae=o.useRef(new Map),ve=(se,Ae)=>`${se}\0${Ae}`,ze=o.useCallback((se,Ae,Te)=>{Pe(Ke=>{const Fe=Ke.answersByPage[se]||{},Y=Fe[Ae],ce=ws(Te),ee=ws(Y);if(Y&&ee>ce)return Ke;const xe=Yc(Te,ae.current.get(ve(se,Ae)),ce);return{...Ke,answersByPage:{...Ke.answersByPage,[se]:{...Fe,[Ae]:xe}}}})},[Pe]),Qe=o.useCallback((se,Ae,Te)=>{const Ke=jr(yt,Ge),Fe=Tr(se,Ae);ze(Ke,Fe,Te)},[yt,Ge,ze]),ht=o.useCallback((se,Ae,Te)=>{const Ke=jr(yt,Ge),Fe=Tr(se,Ae);ze(Ke,Fe,Te),!Te?.allowChange&&se?.autoAdvance!==!1&&Pe(Y=>({...Y,stepIndex:Math.max(Y.stepIndex,Ae+1)}))},[yt,Ge,ze,Pe]),it=o.useCallback((se,Ae)=>{const Te=lt?.id||`children-page-${Ge??0}`,Ke=typeof Ae=="number"?Ae:ot??0,Fe=`step-${Ke}`;ze(Te,Fe,se),se?.allowChange||Pe(Y=>({...Y,stepIndex:Math.max(Y.stepIndex,Ke+1)}))},[lt,Ge,ot,ze,Pe]),It=o.useCallback((se,Ae)=>{const Te=lt?.id||`children-page-${Ge??0}`,Ke=`step-${typeof Ae=="number"?Ae:ot??0}`;ze(Te,Ke,se)},[lt,Ge,ot,ze]),Gt=S?{currentPageIndex:Ge??0,currentStepIndex:ot??0,totalStepsInPage:jt.length,handleStepDone:it,handleStepChange:It}:null,An=async()=>{const se=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:O,flowState:st,answersByPage:st.answersByPage})):null;return typeof $=="function"&&await Promise.resolve($(se))||se},Wt=async()=>{const se=lt?.id||`children-page-${st.pageIndex}`,Ae=st.answersByPage[se]||{},Te=W?(()=>{const Y={};let ce=0;return G.forEach(ee=>{const xe=st.answersByPage[ee.id]||{},$e=Array.isArray(ee.steps)?ee.steps.length:0;for(let We=0;We<$e;We+=1){const at=xe[`step-${We}`];typeof at<"u"&&(Y[`step-${ce+We}`]=at)}ce+=$e}),Y})():Ae;if(typeof B=="function"){const Y=await Promise.resolve(B(Te,{pageAnswers:Ae,answersByPage:st.answersByPage,pages:G,currentPageId:se}));return typeof $=="function"&&await Promise.resolve($(Y))||Y}const Ke=Object.entries(Ae).map(([Y,ce],ee)=>({index:ee,key:Y,payload:ce})),Fe={results:Ke,answers:Ke,score:0};return typeof $=="function"&&await Promise.resolve($(Fe))||Fe},Kt=()=>{const se=++At.current,Ae=()=>se!==At.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(T){const Fe=An();Xe(Rn);const Y=Fe;Promise.resolve(Y).then(ce=>{Ae()||Xe(ce||{isEmpty:!0})}).catch(ce=>{!Ae()&&Xe({isEmpty:!0})});return}if(S){const Fe=Wt();Xe(Rn);const Y=Fe;Promise.resolve(Y).then(ce=>{Ae()||Xe(ce||{isEmpty:!0})}).catch(ce=>{!Ae()&&Xe({isEmpty:!0})});return}const Te=je.current&&je.current._childOnResult,Ke=Fe=>{try{return Fe?Fe():void 0}catch{return}};if(typeof Te=="function"){const Fe=Ke(Te);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{}Fe&&typeof Fe.then!="function"?Xe(Fe):Xe(Fe&&typeof Fe.then=="function"?Rn:{});const Y=()=>{Ae()||Xe(ce=>ce===Rn?{}:ce)};Promise.resolve(Fe).then(ce=>{ce&&!Ae()?Xe(ce):Y()}).catch(ce=>{Y()});return}if(typeof $=="function"){const Fe=Ke($);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{}Fe&&typeof Fe.then!="function"?Xe(Fe):Xe(Fe&&typeof Fe.then=="function"?Rn:{});const Y=()=>{Ae()||Xe(ce=>ce===Rn?{}:ce)};Promise.resolve(Fe).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&&!Ae()?Xe(ce):Y()}).catch(ce=>{console.error("viewResults external handler failed",ce),Y()});return}},Bt=()=>{if(T){if(typeof Ge=="number"&&typeof Et=="number"&&Ge<Et-1){Pe(Ae=>({...Ae,pageIndex:Ae.pageIndex+1,stepIndex:0}));return}return Kt()}if(S){const Ae=jt.length;if(typeof ot=="number"&&ot<Ae-1){Pe(Te=>({...Te,stepIndex:Te.stepIndex+1}));return}if(typeof Ge=="number"&&typeof Et=="number"&&Ge<Et-1){Pe(Te=>({...Te,pageIndex:Te.pageIndex+1,stepIndex:0}));return}return Kt()}if(typeof f=="function"){try{f()}catch{}return}const se=je.current&&je.current._childOnNext;if(typeof se=="function"){try{se()}catch{}return}},ut=T?q.title||q.label||k||L("common.popup","\uD31D\uC5C5"):a||v||(Array.isArray(l)?l[l.length-1]:void 0)||k||L("common.popup","\uD31D\uC5C5"),Ct=k||ut,Tt=T?q.title??q.label??ut:a??v??ut,Yt=(se,Ae)=>{const Te=jr(yt,Ge),Ke=Tr(se,Ae),Fe=st.answersByPage[Te]?.[Ke],Y=E_(se,{page:yt,pageIndex:Ge,step:se,stepIndex:Ae,storedPayload:Fe,answersByPage:st.answersByPage,flowState:st}),ce={key:Ke,index:Ae,stepIndex:ot,isLast:Ae===$t.length-1};switch(se?.type){case"listen":return n.jsx(vs,{...ce,...Y,onDone:ee=>ht(se,Ae,ee)});case"confirm":return n.jsx(bs,{...ce,...Y,onDone:ee=>ht(se,Ae,ee),onChange:ee=>Qe(se,Ae,ee)});case"confirmWithText":return n.jsx(ys,{...ce,...Y,onDone:ee=>ht(se,Ae,ee),onChange:ee=>Qe(se,Ae,ee)});case"orderList":return n.jsx(xs,{...ce,...Y,onDone:ee=>ht(se,Ae,ee),onChange:ee=>Qe(se,Ae,ee)});default:return null}},gn=o.useRef(void 0);o.useEffect(()=>{const se=gn.current;if(gn.current=Ge,se===void 0||se===Ge||!gr())return;const Ae=je.current;if(!Ae)return;const Te=document.activeElement;if(!(!Te||Te===document.body||!Ae.contains(Te)||Te.disabled===!0))return;const Ke=Ae.querySelector(`.training-steps ${_n.split(", ").join(", .training-steps ")}`)??Array.from(Ae.querySelectorAll(_n)).find(Fe=>!Fe.closest('[aria-hidden="true"]'));try{Ke?.focus()}catch{}},[Ge]);const Nn=T?O.length>0?n.jsx("div",{className:"training-steps",children:$t.map((se,Ae)=>Yt(se,Ae))},`replay-${Ve}`):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||L("training.noQuestions","\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):null,tn=S?n.jsxs(Xc.Provider,{value:Gt,children:[lt?.pageTop?n.jsx("div",{className:"training-page-top",children:lt.pageTop}):null,n.jsx("div",{className:"training-steps",children:jt.map((se,Ae)=>{const Te=se;return o.cloneElement(Te,{...Te.props,_stepIndex:Ae,_totalSteps:jt.length,_stepKey:`step-${Ae}`,_pageIndex:Ge})})},`replay-${Ve}`),lt?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:lt.pageBottom}):null]}):null,Zt=o.useRef(-1),Ht=o.useCallback(()=>{if(!w)return;const se=et,{results:Ae,correct:Te,total:Ke}=As(et),Fe={correct:Te,total:Ke,attempt:dt.current.length+1,previousAttempts:[...dt.current]};if(Zt.current===gt.current)return Fe;Zt.current=gt.current,xf({items:Sf(Ae),category:ld.has(w)?"sentence":"word",trainingType:w,entryPoint:A??"sentence",itemRef:D??null,correct:Te,total:Ke,score:typeof se?.score=="number"?se.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-K.current)/1e3)),dailyTotal:E??null});try{x?.(Fe)}catch{}return Fe},[w,A,E,D,et,x]);o.useEffect(()=>{!et||et===Rn||et?.isEmpty||(As(et).total??0)>0&&Ht()},[et,Ht]);const bn=o.useCallback(()=>{const se=Ht();_t(),He(()=>{typeof b=="function"&&b(se),typeof C=="function"&&C()})},[b,C,Ht,Xe,He]),Xt=o.useCallback(()=>mt(""),[mt]),un=o.useCallback(()=>{He(()=>{typeof C=="function"&&C()})},[C,He]),Ot=n.jsxs("div",{className:`page-popup${pt?" page-popup--closing":""}`,role:"dialog","aria-modal":"true","aria-label":Ct,children:[n.jsxs("div",{ref:je,className:`page-popup__panel ${Le?"":"page-popup__panel--measuring"} ${rt==="center"?"page-popup__panel--center":rt==="top"?"page-popup__panel--top":""}`,children:[n.jsx(Uc,{title:Tt,subtitle:T?q.subtitle||q.label:Array.isArray(l)?l.join(" / "):void 0,desc:T?void 0:r,depth:T?q.depth:l,icon:T?q.icon:s,wrapperStyle:T?q.wrapperStyle:i,iconTooltip:T?q.iconTooltip:u,progressMax:Et,progressIndex:Ge,pageIndex:Ge,pageCount:Et,onBack:un,onClose:un}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${rt==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:S?tn:T?Nn:typeof g=="function"?g({registerOnNext:Je,registerOnResult:Dt,panelRef:je,setResultOverlay:Xe}):g})}),n.jsx(qc,{onSettings:h,onNext:Bt,onResult:Kt,useNoiseSettingBtn:!!(T?q.useNoiseSetting??!0:_),stepIndex:ot,stepCount:Re,pageIndex:Ge,pageCount:Et,resultOpen:!!(et&&!et.isEmpty),hideNoiseRows:R})]}),et&&!et.isEmpty&&(N??j_)({score:et.score,results:et.results||et.answers||[],contextsLength:et.results?et.results.length:et.answers?et.answers.length:0,onReplay:()=>{if(K.current=Date.now(),et!==Rn){const{correct:se,total:Ae}=As(et);dt.current.push({correct:se,total:Ae})}if(_t(),Oe(se=>se+1),T){if(Pe(Mr()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if(S){Pe(Mr());return}try{const se=je.current&&je.current._childOnResult;typeof se=="function"&&se({replay:!0})}catch{}},onClose:bn,pending:et===Rn}),et?.isEmpty&&n.jsx("div",{className:"page-popup page-popup--result-empty",role:"dialog","aria-modal":"true","aria-label":L("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:L("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:bn,label:L("training.result.done","\uC644\uB8CC")})})]})}),n.jsx(ha,{message:Nt,position:"top",onClose:Xt})]}),nn=n.jsx(ps.Provider,{value:qe,children:Ot});return typeof document<"u"&&document.body?cn.createPortal(nn,document.body):nn}const Hn=T_;Hn.Page=Dr,Hn.ListenStep=Jc,Hn.ConfirmStep=Qc,Hn.ConfirmWithTextStep=ed,Hn.OrderListStep=td,Hn.CardStep=nd,Hn.CardOrderStep=f_;function M_({label:e,homonum:t}){const a=sa()?.(e,t)??"",{imgRef:r,loading:l,hasImage:s,onLoad:i,onError:u}=Xo(a);return s?n.jsxs("div",{className:"tooltip-word-image__cell",children:[l&&n.jsx("div",{className:"tooltip-word-image__spinner"}),n.jsx("img",{ref:r,src:a,alt:e,draggable:!1,style:{opacity:l?0:1},onLoad:i,onError:u})]}):n.jsx("div",{className:"tooltip-word-image__cell tooltip-word-image__cell--text h3",children:n.jsx("span",{children:e})})}function id({words:e,anchorRect:t}){const a=o.useRef(null),[r,l]=o.useState(null);return o.useLayoutEffect(()=>{if(!t||!a.current)return;const{offsetWidth:s,offsetHeight:i}=a.current,u=window.innerWidth;let c=t.left+t.width/2-s/2,d=t.top-i-8;d<8&&(d=t.bottom+8),c=Math.max(8,Math.min(c,u-s-8)),l({left:c,top:d})},[t]),!t||e.length===0?null:cn.createPortal(n.jsx("div",{ref:a,className:"tooltip-word-image",style:{visibility:r?"visible":"hidden",left:r?.left??0,top:r?.top??-9999},children:n.jsx("div",{className:"tooltip-word-image__cells",children:e.map(s=>n.jsx(M_,{label:s.label,homonum:s.homonum},`${s.label}_${s.homonum??1}`))})}),document.body)}function L_({titleIcon:e,resultCount:t,resultUnit:a,searchQuery:r,items:l,groups:s,selected:i=[],onSelect:u,maxSelect:c,onClearSelection:d,onPrint:m,onPrintEmpty:p,className:C,emptyHint:b,sectionType:x="page",disc:f}){const{t:h,i18n:_}=_e.useTranslation(),g=_.language?.startsWith("ko")??!1,{anchorRect:k,openAt:v,close:B}=Pa(),[y,w]=o.useState(null),A=o.useCallback(()=>{B(),w(null)},[B]);Dy(A,!!y);const E=(r??"").trim(),D=/^[^,[\]\s]+$/.test(E)?E:"",N=D.length>0,F=r===void 0&&t===void 0,R=N?"match":F?"original":"ganada",[K,L]=o.useState(()=>R),[$,T]=o.useState("50"),[J,q]=o.useState(1),[O,Q]=o.useState(N);O!==N&&(Q(N),L(R));const P=K==="match"&&!N||K==="original"&&!F?R:K,V=o.useMemo(()=>[...N?[{value:"match",label:h("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...F?[{value:"original",label:h("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:h("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:h("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:h("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:h("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:h("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:h("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[h,N,F]),W=o.useMemo(()=>["10","25","50","100"].map(ie=>({value:ie,label:h("wordSearch.pageSize",{count:Number(ie),defaultValue:`${ie}\uAC1C\uC529 \uBCF4\uAE30`})})),[h]),G=ie=>ie.words?.[0],S=o.useMemo(()=>{const ie=[...D].length,be=nf(D),he=new Map;return ue=>{let Me=he.get(ue);return Me===void 0&&(Me=be((ue.words?.[0]?.label??"").slice(0,ie))?0:1,he.set(ue,Me)),Me}},[D]),M=o.useCallback((ie,be)=>{const he=qe=>G(qe)?.label??"",ue=qe=>G(qe)?.syllables??[...he(qe)].length,Me=qe=>(qe.words??[]).reduce((je,Ve)=>{const Oe=parseInt(Ve.grade??"",10);return Number.isFinite(Oe)&&Oe<je?Oe:je},999);switch(P){case"match":return S(ie)-S(be)||mn(he(ie),he(be));case"ganada":return mn(he(ie),he(be));case"ganada_desc":return mn(he(be),he(ie));case"syllable":return ue(ie)-ue(be)||mn(he(ie),he(be));case"syllable_desc":return ue(be)-ue(ie)||mn(he(ie),he(be));case"grade":return Me(ie)-Me(be)||mn(he(ie),he(be));case"grade_desc":return Me(be)-Me(ie)||mn(he(ie),he(be));default:return 0}},[P,S]),I=o.useMemo(()=>l.slice().sort(M),[l,M]),Z=Number($)||10,le=o.useMemo(()=>(s??[]).flatMap(ie=>ie.items.slice().sort(M).map(be=>({item:be,label:ie.label}))),[s,M]),oe=s?le.length:I.length,de=Math.max(1,Math.ceil(oe/Z)),re=Math.min(J,de),z=o.useMemo(()=>I.slice((re-1)*Z,re*Z),[I,re,Z]),ne=o.useId(),H=o.useMemo(()=>{if(!s)return null;const ie=le.slice((re-1)*Z,re*Z),be=new Map;for(const{item:he,label:ue}of ie)be.has(ue)||be.set(ue,[]),be.get(ue).push(he);return[...be.entries()].map(([he,ue])=>({label:he,items:ue}))},[s,le,re,Z]);o.useEffect(()=>{q(1)},[K,$,oe,r]);const U=oe>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(fn,{size:40,options:V,value:P,onChange:L,ariaLabel:h("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(fn,{size:40,options:W,value:$,onChange:T,ariaLabel:h("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(Cr,{page:re,totalPages:de,onChange:q})]}):void 0,pe=ie=>{u&&u(ie)},Ee=t!==void 0&&a?n.jsxs(n.Fragment,{children:[h("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),h("wordSearch.resultTitleSuffix",{unit:g?hf(a):a})]}):void 0,ge=t!==void 0&&t>0&&c!==void 0&&a?h("wordSearch.resultDisc",{unit:g?ff(a):a,max:c,selected:i.length}):void 0,me=f??ge;return n.jsxs(fa,{type:x,className:we("word-search-result-block",C),children:[n.jsxs("div",{className:"word-search-result-block__inner",children:[(Ee||U||me)&&n.jsxs("div",{className:"word-search-result-block__head",children:[n.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&n.jsx(tt,{icon:e,className:"word-search-result-block__head-icon"}),Ee&&n.jsx("span",{className:"word-search-result-block__title h3",children:Ee})]}),U&&n.jsx("div",{className:"word-search-result-block__head-actions",children:U}),me&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:me})]}),(s?s.length===0:l.length===0)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[n.jsx("p",{className:"word-search-result-block__empty body-3",children:h("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),b&&n.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:b})]}),s?(H??[]).map(ie=>n.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${ne}-${ie.label}`,children:[n.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${ne}-${ie.label}`,children:ie.label}),n.jsx("div",{className:"word-search-result-block__items",children:ie.items.map(be=>{const he=i.includes(be.id);return n.jsx("div",{onMouseEnter:ue=>{v(ue.currentTarget),w(be.words??[])},onMouseLeave:A,children:n.jsx(fe,{htmlType:"button",size:"word",align:"grid",label:(be.words??[]).map(ue=>ue.label),subLabel:(be.words??[]).some(ue=>ue.subLabel)?(be.words??[]).map(ue=>ue.subLabel):void 0,selected:he,onClick:()=>pe(be.id),minWidth:200})},be.id)})})]},ie.label)):n.jsx("div",{className:"word-search-result-block__items",children:z.map(ie=>{const be=i.includes(ie.id);return n.jsx("div",{onMouseEnter:he=>{v(he.currentTarget),w(ie.words??[])},onMouseLeave:A,children:n.jsx(fe,{htmlType:"button",size:"word",align:"grid",label:(ie.words??[]).map(he=>he.label),subLabel:(ie.words??[]).some(he=>he.subLabel)?(ie.words??[]).map(he=>he.subLabel):void 0,selected:be,onClick:()=>pe(ie.id),minWidth:200})},ie.id)})}),y&&k&&n.jsx(id,{words:y,anchorRect:k})]}),de>1&&n.jsx("div",{className:"word-search-result-block__pagination-bottom",children:n.jsx(Cr,{page:re,totalPages:de,onChange:q})}),(d||m)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[d&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:h("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:i.length===0,onClick:i.length===0?void 0:d}),m&&n.jsx("div",{onClick:i.length===0?p:void 0,children:n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",label:h("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:i.length===0,onClick:i.length===0?void 0:m})})]})]})}function $_(e,t){return t.map(a=>{const r=typeof a=="string"?a:a.label,l=typeof a=="string"?void 0:a.displayLabel;return{label:r,value:e[r]??"",displayLabel:l}})}function R_({sections:e,selectedList:t,count:a,onCountChange:r,maxCount:l=4,minCount:s=1,combinationSections:i,combinationSectionsForSlot:u,onSelect:c,placeholder:d="-",className:m,title:p,titleIcon:C,disc:b,showInfoButton:x=!0,onClearPhoneme:f,onSearch:h,onSearchEmpty:_,searchDisabled:g=!1,searchLabel:k,searchChecking:v=!1,pairMode:B=!1,sectionType:y="page",beforeSearchContent:w,beforeContent:A,afterContent:E,hideCountControl:D=!1,ordinal:N=!1}){const{t:F}=_e.useTranslation(),R=o.useMemo(()=>F("wordPairs.infoNotes",{returnObjects:!0}),[F]),K=o.useMemo(()=>Array.from({length:l-s+1},(S,M)=>{const I=s+M;return{key:String(I),label:F("wordPairs.count",{n:I})}}),[F,l,s]),L=o.useMemo(()=>F("wordPairs.ordinals",{returnObjects:!0}),[F]),$=o.useCallback(S=>N?F("wordPairs.phonemeOrdinalLabel",{ordinal:L[S-1]??S}):a===1?F("wordPairs.phonemeSingleLabel","\uC74C\uC808"):F("wordPairs.phonemeN",{n:S}),[N,L,a,F]),T=o.useCallback(S=>N?F("wordPairs.phonemeContrastOrdinalLabel",{ordinal:L[S-1]??S}):a===1?F("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):F("wordPairs.phonemeContrast",{n:S}),[N,L,a,F]),J=o.useCallback((S,M)=>M?n.jsxs(n.Fragment,{children:[S,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):S,[]),{anchorRect:q,toggleAt:O,close:Q}=Pa(),P=o.useCallback(S=>r(Number(S)),[r]),V=Cn("(max-width: 767px)"),W=o.useCallback(S=>$_(S,e).map(({label:M,value:I,displayLabel:Z})=>{const le=!!I&&I!=="\uC5C6\uC74C";return n.jsxs("span",{className:we("phoneme-select-block__cell-jamo-part",I?"":"phoneme-select-block__cell-jamo-part--empty",le?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[n.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${I==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:I==="\uC5C6\uC74C"?"x":I||d}),le&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:Z??M})]},M)}),[e,d]),G=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:40,type:V?"dot":void 0,icon:"info",label:V?void 0:F("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:F("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:q?"is-selected":void 0,"aria-expanded":!!q,"aria-haspopup":"dialog",onClick:S=>O(S.currentTarget)})}),q&&n.jsx(Kn,{title:F("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:R,anchorRect:q,onClose:Q})]});return n.jsxs(fa,{type:y,title:p,icon:C,disc:b,action:x?G:void 0,className:we("phoneme-select-block",m),children:[A,!D&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(wn,{options:K,value:String(a),onChange:P,size:40,ariaLabel:F("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),n.jsx("div",{className:"phoneme-select-block__cells",children:B?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((S,M)=>{const I=t[M*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:W(I)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:$(M+1)})]},M)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:F("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((S,M)=>{const I=t[M*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:W(I)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:T(M+1)})]},M)})})]}):t.map((S,M)=>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:W(S)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:$(M+1)})]},M))}),(i||u)&&n.jsx("div",{className:"phoneme-select-block__panels",children:n.jsx("div",{className:"phoneme-select-block__detail",children:B?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,M)=>{const I=t[M*2]??{};return n.jsx(Ln,{title:J($(M+1),M===0),sections:u?u(I,M*2):i,selected:I,onSelect:c?.(M*2),align:"newline"},M)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((S,M)=>{const I=t[M*2+1]??{};return n.jsx(Ln,{title:T(M+1),sections:u?u(I,M*2+1):i,selected:I,onSelect:c?.(M*2+1),align:"newline"},M)})})]}):t.map((S,M)=>n.jsx(Ln,{title:J($(M+1),M===0),sections:u?u(S,M):i,selected:S,onSelect:c?.(M),align:"newline"},M))})}),w&&n.jsx("div",{className:"phoneme-select-block__before-search",children:w}),(f||h||v)&&(()=>{const S=t.every(M=>{const I=JC(M);return Object.entries(I).every(([Z,le])=>!le||Z==="coda"&&le===jl)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:S?_:void 0,children:[f&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:F("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:S,onClick:S?void 0:f}),h?n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:v?n.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:k??F("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:S||g||v,onDisabledClick:v?()=>{}:void 0,"aria-busy":v||void 0,onClick:h}):v?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:k??F("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),E]})}function P_({title:e,sections:t,selected:a,onSelect:r,collapsible:l,defaultCollapsed:s,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:d,className:m}){const{t:p}=_e.useTranslation();return n.jsx(Ln,{className:m,title:e??p("wordSearch.filterTitle","\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815"),sections:t,selected:a,onSelect:r,collapsible:l,defaultCollapsed:s,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:d,align:"inline"})}function I_({title:e,headerAction:t,sections:a,selected:r,onSelect:l,className:s}){const{t:i}=_e.useTranslation();return a.length===0?null:n.jsx(Ln,{className:s,title:e??i("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:a,selected:r,onSelect:l,align:"newline"})}function F_({title:e,mode:t,onModeChange:a,matchMode:r,onMatchModeChange:l,positionCount:s,onPositionCountChange:i,inputMode:u,onInputModeChange:c,className:d}){const{t:m}=_e.useTranslation(),p={searchMode:m("wordPairs.filter.searchModeLabel","\uB300\uB9BD \uBC29\uC2DD"),phonemeOrder:m("wordPairs.filter.phonemeOrder","\uC785\uB825 \uC74C\uC808 \uC704\uCE58"),count:m("wordPairs.filter.countLabel","\uC785\uB825 \uC74C\uC808 \uAC2F\uC218"),inputMode:m("wordPairs.filter.inputModeLabel","\uC785\uB825 \uBC29\uC2DD"),orderAny:m("wordPairs.filter.orderAny","\uBB34\uAD00"),orderMatch:m("wordPairs.filter.orderMatch","\uC77C\uCE58"),include:m("wordPairs.mode.include","\uC74C\uC18C \uD3EC\uD568"),pick:m("wordPairs.mode.pick","\uC74C\uC18C \uB300\uB9BD"),explicit:m("wordPairs.mode.contrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815"),charInput:m("wordPairs.input.char","\uAE00\uC790 \uC120\uD0DD"),pronInput:m("wordPairs.input.pron","\uBC1C\uC74C \uC120\uD0DD")},C=h=>m("wordPairs.count",{n:h}),b=[{label:p.searchMode,items:[p.include,p.pick,p.explicit],display:"segmented",labelAction:n.jsx(Ha,{title:m("wordPairs.mode.infoTitle","\uB300\uB9BD \uBC29\uC2DD"),items:[m("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."),m("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."),m("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(Ha,{items:m("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:p.count,items:[C(1),C(2)],display:"segmented"},{label:p.inputMode,items:[p.charInput,p.pronInput],display:"segmented",labelAction:n.jsx(Ha,{title:m("wordPairs.input.infoTitle","\uC785\uB825 \uBC29\uC2DD"),items:[m("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."),m("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.")]})}],x={[p.searchMode]:t==="explicit"?p.explicit:t==="pick"?p.pick:p.include,[p.phonemeOrder]:r==="ordered"?p.orderMatch:p.orderAny,[p.count]:C(s),[p.inputMode]:u==="phoneme"?p.pronInput:p.charInput},f=(h,_)=>{_===p.searchMode?a(h===p.explicit?"explicit":h===p.pick?"pick":"include"):_===p.phonemeOrder?l(h===p.orderMatch?"ordered":"unordered"):_===p.count?i(h===C(2)?2:1):_===p.inputMode&&c(h===p.pronInput?"phoneme":"word")};return n.jsx(Ln,{className:d,title:e??m("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:b,selected:x,onSelect:f,align:"inline"})}function O_(e){const{title:t,items:a,columns:r,resizeStorageKey:l,gridTemplateColumns:s,mobileGridTemplateColumns:i,searchPlaceholder:u,searchFn:c,defaultSortKey:d,defaultSortAsc:m=!0,selectedId:p,selectedIds:C,onSelect:b,onClose:x,pageSizeOptions:f=[10,25,50,100],initialPageSize:h,emptyText:_,noMatchText:g,countLabel:k,topContent:v,className:B=""}=e,{t:y}=_e.useTranslation(),w=u??y("common.search","\uAC80\uC0C9"),A=_??y("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),E=g??y("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[D,N]=o.useState(""),[F,R]=o.useState(d??r[0]?.key??""),[K,L]=o.useState(m),[$,T]=o.useState(String(h??f[0]??10)),[J,q]=o.useState(1);o.useEffect(()=>{q(1)},[D,$]);const O=c!==null,Q=o.useCallback((oe,de)=>{if(!de)return!0;const re=de.toLowerCase();return r.some(z=>{const ne=oe[z.key];return ne==null?!1:String(ne).toLowerCase().includes(re)})},[r]),P=c??Q,V=o.useMemo(()=>{const oe=O?a.filter(de=>P(de,D)):a;return F?[...oe].sort((de,re)=>{const z=de[F],ne=re[F];return z===ne?0:ur(z,ne,K)}):oe},[a,D,F,K,O,P]),W=Math.max(1,Math.ceil(V.length/Number($)));J>W&&q(W);const G=Math.min(J,W),S=V.slice((G-1)*Number($),G*Number($)),M=o.useCallback(oe=>{F===oe?L(de=>!de):(R(oe),L(!0)),q(1)},[F]),I=o.useMemo(()=>{if(typeof k=="function"){const oe=V.length,de=k(oe);if(typeof de=="string"){const re=de.lastIndexOf(String(oe));if(re>=0)return{prefix:de.slice(0,re),suffix:de.slice(re+String(oe).length)}}return{label:de}}if(typeof k=="string"&&k.includes("{n}")){const[oe,de]=k.split("{n}");return{prefix:oe,suffix:de}}return{prefix:y("common.totalCountPrefix","\uCD1D "),suffix:y("common.totalCountSuffix","\uAC1C")}},[k,V.length,y]),Z=o.useMemo(()=>r.map(oe=>({label:oe.label,onClick:oe.sortable!==!1?()=>M(oe.key):void 0,className:oe.className,sortDir:oe.sortable!==!1&&F===oe.key?K?"asc":"desc":null})),[r,F,K,M]),le=o.useMemo(()=>f.map(oe=>({value:String(oe),label:y("common.pageSizeLabel",{n:oe})})),[f,y]);return n.jsxs(Wn,{className:`popup-list ${B}`,title:t,onClose:x,children:[v,"label"in I&&n.jsx("p",{className:"toolbar__count body-1",children:I.label}),n.jsx(Po,{count:"label"in I?void 0:{value:V.length,prefix:I.prefix,suffix:I.suffix},search:O?{value:D,onChange:N,placeholder:w}:void 0,pageSize:{options:le,value:$,onChange:T},pagination:{page:G,total:W,onChange:q}}),n.jsx(Ko,{size:"medium",gridTemplateColumns:s,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:l,fields:Z,items:S,onRowClick:b,renderRow:oe=>{const de=C!=null?oe.id!=null&&C.has(oe.id):p!=null&&oe.id===p;return r.map(re=>({content:re.render?re.render(oe):oe[re.key]??"",className:we(re.className,de&&"popup-list__row--selected")}))},empty:O&&D!==""&&a.length>0?E:A})]})}function ud(e){const{title:t,message:a,topContent:r,details:l,children:s,confirmLabel:i,cancelLabel:u,hideCancel:c=!1,extraAction:d,confirmVariant:m="main",confirmDisabled:p=!1,onConfirm:C,closeOnConfirm:b=!0,onClose:x,inline:f,size:h="small",className:_,initialFocus:g="close"}=e,{t:k}=_e.useTranslation(),v=o.useRef(null);o.useEffect(()=>{if(f||g==="close")return;const D=v.current?.closest(".popup-panel"),N=Array.from(D?.querySelectorAll(".popup-footer--buttons button")??[]),F=g==="confirm"?N[N.length-1]:c?void 0:N[d?1:0];F&&!F.disabled&&F.focus()},[]);const B=o.useRef(!1),[y,w]=o.useState(!1),A=D=>{let N=!1;return{close:()=>{N=!0,D()},didClose:()=>N}},E=async D=>{if(B.current)return;B.current=!0;const N=typeof document<"u"?document.activeElement:null;w(!0);let F=!1;try{F=await D()}catch(R){typeof console<"u"&&console.error(R)}finally{F||(B.current=!1,w(!1),requestAnimationFrame(()=>{const R=document.activeElement;(!R||R===document.body)&&N?.isConnected&&N.focus()}))}};return n.jsxs(Wn,{title:t,onClose:x,closeDisabled:y,inline:f,size:h,className:we("confirm-popup",r!=null&&"confirm-popup--has-top",_),buttons:[...d?[{label:d.label,variant:d.variant??"default",disabled:d.disabled||y,onClick:async({closeWithAnimation:D})=>{await E(async()=>{const N=A(D);await d.onClick(N.close);const F=d.closeOnClick??!0;return F&&D(),F||N.didClose()})}}]:[],...c?[]:[{label:u??k("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:y,onClick:({closeWithAnimation:D})=>D()}],{label:i??k("common.confirm","\uD655\uC778"),variant:m,disabled:p||y,onClick:async({closeWithAnimation:D})=>{await E(async()=>{const N=A(D);return await C(N.close),b&&D(),b||N.didClose()})}}],children:[r!=null&&n.jsx("div",{className:"confirm-popup__top",children:r}),l&&l.length>0&&n.jsx(Nr,{children:l.map((D,N)=>n.jsx($n,{label:D.label,children:n.jsx("span",{className:"panel-row__text body-2",children:D.value})},N))}),n.jsx("p",{ref:v,className:"body-2 confirm-popup__message",children:a}),s]})}function z_(e,t,a={}){const{t:r}=_e.useTranslation(),[l,s]=o.useState(!1),i=o.useRef(!1),u=o.useCallback(()=>{i.current=!0},[]),c=o.useCallback(()=>i.current?(i.current=!1,!0):e?(s(!0),!1):!0,[e]),d=l?n.jsx(ud,{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:()=>{s(!1),t()},onClose:()=>s(!1)}):null;return{beforeClose:c,discardPopup:d,allowClose:u}}function W_({onApply:e,onCancel:t}){const{t:a}=_e.useTranslation(),[r,l]=o.useState(""),[s,i]=o.useState(!1),[u,c]=o.useState(null),d=o.useRef(null),m=o.useId();o.useEffect(()=>{d.current?.focus()},[]);const p=o.useCallback(async x=>{const f=r.trim();if(f){i(!0),c(null);try{await e(f),x()}catch(h){c($l(h)),i(!1),requestAnimationFrame(()=>d.current?.focus())}}},[r,e]),C=o.useCallback((x,f)=>{x.key==="Enter"&&!x.nativeEvent.isComposing&&p(f)},[p]),b=x=>{l(x.target.value),c(null)};return n.jsx(Wn,{className:"coupon-input-popup",title:a("usage.couponButton","\uCFE0\uD3F0 \uC785\uB825"),size:"small",onClose:t,closeDisabled:s,buttons:[{label:a("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:s,onClick:({closeWithAnimation:x})=>x()},{label:a("coupons.applyButton","\uC801\uC6A9"),variant:"main",disabled:!r.trim()||s,onClick:({closeWithAnimation:x})=>{p(x)}}],children:({closeWithAnimation:x})=>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?m:void 0,"aria-describedby":u?m:void 0,placeholder:a("coupons.input.placeholder","\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"),value:r,onChange:b,onKeyDown:f=>C(f,x),disabled:s,autoComplete:"off",spellCheck:!1}),u&&n.jsx("p",{id:m,className:"coupon-input-popup__error caption-1",role:"alert",children:u})]})})}const cd=["var(--color-main)","var(--color-sub)"],H_=2e3;function V_(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 Ns({active:e=!1,count:t=40,duration:a=2e3,strength:r=1,onComplete:l,trigger:s=0}){const i=o.useMemo(()=>{const f=Math.floor(t/2),h=t-f,_=(g,k)=>Array.from({length:g}).map((v,B)=>{const y=6+Math.random()*12,w=Math.round(Math.min(18,y*Math.min(1.5,1+r*.4))),A=cd[Math.floor(Math.random()*cd.length)],E=Math.random()*300,D=(360+Math.random()*260)*r*1.2,N=(k==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,F=Math.cos(N)*D,R=Math.sin(N)*D*1.35,K=Math.random()*720-360,L=(1200+Math.random()*3e3)*Math.min(1.6,1+r*.3),$=Math.random()>.7?"50%":"3px";return{id:`${k}-${B}`,side:k,size:w,color:A,delay:E,vx:F,vy:R,angularVel:K,life:L,borderRadius:$}});return[..._(f,"left"),..._(h,"right")]},[t,r]),u=o.useRef(null),c=o.useRef({}),d=o.useRef(null),m=o.useRef(l);o.useEffect(()=>{m.current=l},[l]);const p=o.useRef(null),C=o.useRef(null),b=()=>{if(typeof document>"u")return null;let f=document.querySelector("[data-ihab-effect-root]");return f||(f=document.createElement("div"),f.className="app-effect",f.dataset.ihabEffectRoot="",f.style.position="fixed",f.style.inset="0",f.style.pointerEvents="none",f.style.zIndex="99998",document.body.appendChild(f)),f};if(typeof document<"u"&&C.current==null&&(C.current=b()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const Q=setTimeout(()=>m.current?.(),0);return()=>clearTimeout(Q)}const f=1200,h=performance.now(),_=C.current&&C.current!==document.body?C.current.getBoundingClientRect():null,g=Math.max(60,(window.innerHeight||800)*.05),k=Q=>Math.max(40,(Q||window.innerWidth)*.02),v=_?.width||window.innerWidth||375,B=_?.height||window.innerHeight||812,y=Q=>{const P=[...Q].sort((V,W)=>V-W);return P[Math.floor(P.length/2)]||1},w=y(i.map(Q=>Math.abs(Q.vy))),A=y(i.map(Q=>Math.abs(Q.vx))),E=Math.sqrt(2*f*(B*.72+g))/w,D=w*E/f,N=v*.5/(A*D),F=(Q,P,V)=>Math.min(V,Math.max(P,Q)),R=F(E,.8,2.4),K=F(N,.7,2.2),L=a>0?a/H_:1,$=i.map(Q=>({...Q,life:Q.life*L,vx:Q.vx*K,vy:Q.vy*R,startTime:h+Q.delay,ended:!1})),T=_?{x:_.left-k(_.width),y:_.top+_.height+g}:{x:-k(window.innerWidth),y:window.innerHeight+g},J=_?{x:_.left+_.width+k(_.width),y:_.top+_.height+g}:{x:window.innerWidth+k(window.innerWidth),y:window.innerHeight+g},q=Q=>{let P=!1;for(const V of $){const W=c.current[V.id];if(!W||!W)continue;if(Q<V.startTime){W.style.display="none",P=!0;continue}if(!V._inited){const z=V.side==="left"?T.x:J.x,ne=V.side==="left"?T.y:J.y;W.style.left=`${z}px`,W.style.top=`${ne}px`,W.style.transform="translate3d(0px, 0px, 0)",W.style.display="block",W.style.zIndex="100000",typeof V.color=="string"&&V.color.startsWith("var(")&&(W.style.background=V_(W,V.color)??"#FF0060"),V._inited=!0}const G=(Q-V.startTime)/1e3;if(G<0)continue;const S=V.life/1e3;if(G>=S){W.style.opacity="0",W.style.display="none",V.ended=!0;continue}P=!0;const M=V.side==="left"?T.x:J.x,I=V.side==="left"?T.y:J.y,Z=M+V.vx*G,le=I+V.vy*G+.5*f*G*G,oe=(V.angularVel||0)*G,de=Z-M,re=le-I;W.style.transform=`translate3d(${de}px, ${re}px, 0) rotate(${oe}deg)`,W.style.opacity=`${Math.max(0,1-G/S)}`}P?d.current=requestAnimationFrame(q):m.current?.()};d.current=requestAnimationFrame(q);const O=setTimeout(()=>{try{if((C.current?C.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const Q=document.createElement("div");Q.className="party-container",Q.style.position="fixed",Q.style.inset="0",Q.style.pointerEvents="none",Q.style.overflow="visible",Q.style.zIndex="2147483647";for(const P of i){const V=document.createElement("span");V.className=`confetti confetti--${P.side}`,V.setAttribute("aria-hidden","true"),V.style.display="none",V.style.position="fixed",V.style.left="0px",V.style.top="0px",V.style.width=`${P.size}px`,V.style.height=`${Math.max(4,P.size*.6)}px`,V.style.background=P.color,V.style.borderRadius=P.borderRadius,V.style.transform="translate3d(0,0,0)",V.style.opacity="0",Q.appendChild(V),c.current[P.id]=V}(document.body||C.current).appendChild(Q),p.current=Q}}catch{}},300);return()=>{if(d.current&&cancelAnimationFrame(d.current),clearTimeout(O),p.current){try{p.current.remove()}catch{}p.current=null}}},[e,a,s,i]),!e)return null;const x=n.jsx("div",{className:"party-container",ref:u,children:i.map(f=>n.jsx("span",{"aria-hidden":!0,ref:h=>{c.current[f.id]=h},className:`confetti confetti--${f.side}`,style:{width:`${f.size}px`,height:`${Math.max(4,f.size*.6)}px`,background:f.color,borderRadius:f.borderRadius}},`${f.id}-${s}`))});return typeof document<"u"?cn.createPortal(x,C.current||document.body):x}const Es=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function q_({trigger:e=0,active:t=!1}){const[a,r]=o.useState(null);o.useEffect(()=>{if(typeof window>"u")return;const s=i=>{const u=i.detail??{};r(c=>({n:(c?.n??0)+1,count:Es(u.count),strength:Es(u.strength),duration:Es(u.duration)}))};return window.addEventListener("party:trigger",s),()=>window.removeEventListener("party:trigger",s)},[]);const l=o.useCallback(()=>r(null),[]);return n.jsxs(n.Fragment,{children:[n.jsx(Ns,{active:t,trigger:e}),a&&n.jsx(Ns,{active:!0,trigger:a.n,count:a.count,strength:a.strength,duration:a.duration,onComplete:l})]})}function U_({title:e,sub:t,rightAction:a,titleAction:r,badge:l,badgeVariant:s="default",documentTitle:i,onBack:u,backLabel:c,wrap:d=!1}){const{t:m}=_e.useTranslation();Cy(typeof e=="string"?e:i??null);const p=c??m("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}),l&&n.jsx("div",{className:"page-title__badge",children:n.jsx(Lt,{label:l,size:"small",variant:s,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 G_(e){return e??""}const dd=o.createContext({words:[],loading:!1});function K_(){return o.useContext(dd)}function Y_({words:e,loading:t,error:a,statusMessage:r,localVersion:l,remoteVersion:s,progress:i,clearAndRefetch:u,checkRemoteVersion:c,children:d}){const m=o.useMemo(()=>({words:e,loading:t,error:a,statusMessage:r,localVersion:l,remoteVersion:s,progress:i,clearAndRefetch:u,checkRemoteVersion:c}),[e,t,a,r,l,s,i,u,c]);return n.jsx(dd.Provider,{value:m,children:d})}function Z_({items:e,actions:t,columns:a,flat:r=!1,className:l,style:s}){const i=a??e.length;return n.jsx("section",{className:we("summary-strip",r&&"summary-strip--flat",l),style:{"--summary-strip-cols":String(i),...s},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 X_=(e,t)=>`${e} / ${t}`;function J_({blocks:e,sectionTitles:t,logo:a,footer:r,pageLabel:l=X_,pageWidth:s,pageHeight:i,margin:u,className:c,style:d}){const{t:m}=_e.useTranslation(),p=o.useRef(null),C=o.useRef(null),b=o.useRef(null),x=o.useRef(null),[f,h]=o.useState(null),[_,g]=o.useState(!1);o.useEffect(()=>{const L=p.current;if(!L)return;const $=()=>g(L.scrollWidth>L.clientWidth+1);if($(),typeof ResizeObserver>"u")return;const T=new ResizeObserver($);return T.observe(L),()=>T.disconnect()},[f]);const k=e.map(L=>`${L.id}\0${L.section??""}\0${L.group??""}`).join(""),v=f&&f.shape===k?f.pages:null,[B,y]=o.useState(0);o.useEffect(()=>{const L=x.current;if(!L||typeof ResizeObserver>"u")return;const $=new ResizeObserver(()=>y(L.offsetHeight));return $.observe(L),()=>$.disconnect()},[]);const[w,A]=o.useState(0);o.useEffect(()=>{const L=C.current;if(!L||typeof ResizeObserver>"u")return;let $=null;const T=typeof requestAnimationFrame=="function"?O=>requestAnimationFrame(O):O=>setTimeout(O,16),J=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:O=>clearTimeout(O),q=new ResizeObserver(()=>{$==null&&($=T(()=>{$=null,A(O=>O+1)}))});return Array.from(L.children).forEach(O=>q.observe(O)),()=>{q.disconnect(),$!=null&&J($)}},[k]),o.useLayoutEffect(()=>{const L=C.current,$=x.current;if(!L||!$)return;const T=S=>S.getBoundingClientRect().height||S.offsetHeight,J=new Map;b.current?.querySelectorAll("[data-chrome-section]").forEach(S=>{J.set(S.dataset.chromeSection??"",T(S))});const q=S=>T($)-(J.get(S??"")??0),O=Array.from(L.children).map(S=>T(S)),Q=[];e.forEach((S,M)=>{const I=Q[Q.length-1],Z=I?e[I[0]]:void 0;Z&&S.group!=null&&Z.group===S.group&&Z.section===S.section?I.push(M):Q.push([M])});const P=[];let V=[],W=0;const G=()=>{V.length&&P.push(V),V=[],W=0};Q.forEach(S=>{const M=S.reduce((Z,le)=>Z+O[le],0),I=q(e[S[0]].section);V.length&&e[V[0]].section!==e[S[0]].section&&G(),M>I?S.forEach(Z=>{V.length&&W+O[Z]>I+.01&&G(),V.push(Z),W+=O[Z]}):(V.length&&W+M>I+.01&&G(),S.forEach(Z=>V.push(Z)),W+=M)}),G(),h(S=>S&&S.shape===k&&JSON.stringify(S.pages)===JSON.stringify(P)?S:{shape:k,pages:P})},[k,B,s,i,u,w]);const E=Mo,D=E,N=r??n.jsxs(n.Fragment,{children:[n.jsx("img",{src:D,alt:"IHAB",className:"report-doc__logo"}),"\xA9 IHAB, Inc. All rights reserved."]}),F=(L,$,T)=>({header:n.jsxs("div",{className:"report-doc__header",children:[n.jsx("h2",{className:"report-doc__title h3b",children:T!=null&&t?.[T]||null}),a]}),footer:n.jsxs("div",{className:"report-doc__footer caption-1",children:[n.jsx("span",{className:"report-doc__footer-left",children:N}),n.jsx("span",{className:"report-doc__page-no",children:l(L,$)})]})}),R=Array.from(new Set(e.map(L=>L.section??""))),K={...s?{"--report-page-w":s}: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:K,tabIndex:_?0:void 0,role:_?"group":void 0,"aria-label":_?m("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:x,className:"report-doc__ruler"}),n.jsx("div",{ref:b,children:R.map(L=>{const $=F(1,1,L||void 0);return n.jsxs("div",{"data-chrome-section":L,children:[$.header,$.footer]},L)})}),n.jsx("div",{ref:C,className:"report-doc__measure-blocks",children:e.map(L=>n.jsx("div",{children:L.content},L.id))})]}),v&&n.jsx("div",{className:"report-doc__pages",children:v.map((L,$)=>{const{header:T,footer:J}=F($+1,v.length,e[L[0]].section);return n.jsxs("section",{className:"report-doc__page",children:[T,L.map(q=>n.jsx("div",{children:e[q].content},e[q].id)),J]},$)})})]})}function Q_({title:e,fields:t,columns:a=4,className:r,style:l}){return n.jsxs("div",{className:we("report-info",r),style:{"--report-info-cols":String(a),...l},children:[e&&n.jsx("p",{className:"report-info__title h5b",children:e}),n.jsx("div",{className:"report-info__grid",children:t.map((s,i)=>n.jsxs("div",{className:"report-info__field body-2",children:[n.jsx("span",{className:"report-info__label body-3",children:s.label}),n.jsx("span",{className:"report-info__value",children:s.value})]},i))})]})}const na=new Map;let Lr=null;const ew=12;function tw(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 $r(){const e=new Map;for(const t of na.keys()){if(!t.isConnected)continue;const a=tw(t),r=e.get(a)??[];r.push(t),e.set(a,r)}for(const t of e.values()){t.sort((r,l)=>r.compareDocumentPosition(l)&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 l=r.getBoundingClientRect().height;l>0&&(a+=l+ew)}}}function nw(e){return typeof window>"u"?()=>{}:(na.set(e,(na.get(e)??0)+1),na.get(e)===1&&typeof ResizeObserver<"u"&&(Lr??(Lr=new ResizeObserver(()=>$r())),Lr.observe(e)),$r(),()=>{const t=(na.get(e)??1)-1;if(t>0){na.set(e,t),$r();return}na.delete(e),Lr?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),$r()})}function aw({title:e,message:t,actionLabel:a,onAction:r,icon:l,onClose:s,className:i=""}){const{t:u}=_e.useTranslation(),c=a??u("common.update","\uC5C5\uB370\uC774\uD2B8"),d=o.useRef(null),m=o.useRef(!1);return o.useLayoutEffect(()=>{const p=d.current,C=p?.parentElement?.closest(".update-alert-stack")??p,b=C?nw(C):null;return()=>{b?.(),m.current&&p&&p.contains(document.activeElement)&&sr(p)}},[]),n.jsxs("div",{ref:d,className:we("update-alert",i),role:"alert",children:[s&&n.jsx("button",{type:"button",className:"update-alert__close",onClick:()=>{m.current=!0,s()},"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:l??n.jsx(Os,{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 rw({title:e,titleLevel:t=3,description:a,topActions:r,children:l,footerLeft:s,footerRight:i,ariaLabel:u,onClick:c,draggable:d,onDragStart:m,onDragEnd:p,className:C}){const b=t?`h${t}`:"div",x=s!=null||i!=null,f=l!=null&&l!==!1,h=o.useCallback(_=>{c&&_.target===_.currentTarget&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),c())},[c]);return n.jsxs("div",{className:we("training-card",c?"training-card--clickable":"",C),onClick:c,onKeyDown:c?h: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:m,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(b,{className:"training-card__title h4",children:e}):e,r!=null&&n.jsx("div",{className:"training-card__top-actions",onClick:_=>_.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:" "})]}),f&&n.jsx("div",{className:"training-card__body",children:l}),x&&n.jsxs("div",{className:"training-card__footer",children:[s!=null&&n.jsx("div",{className:"training-card__footer-left",children:s}),i!=null&&n.jsx("div",{className:"training-card__meta",children:i})]})]})}function ow({title:e,titleLevel:t=3,count:a,collapsed:r=!1,onToggle:l,beforeSort:s,sort:i,actions:u,empty:c=!1,emptyContent:d,dragOver:m=!1,onDragOver:p,onDragLeave:C,onDrop:b,children:x,className:f}){const{t:h}=_e.useTranslation(),_=o.useId(),g=t?`h${t}`:"span",k=l!=null,v=we("training-card-group",m&&"training-card-group--dragover",r&&"training-card-group--collapsed",k&&"training-card-group--collapsible",f);return n.jsxs("div",{className:v,onDragOver:p,onDragLeave:C,onDrop:b,role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?_:void 0,children:[n.jsxs("header",{className:"training-card-group__header",children:[k&&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?h("common.expandFor",{name:e}):h("common.collapseFor",{name:e}):r?h("common.expand","\uD3BC\uCE58\uAE30"):h("common.collapse","\uC811\uAE30"),className:"training-card-group__chevron","aria-expanded":!r,onClick:l}),typeof e=="string"?n.jsx(g,{id:_,className:"training-card-group__title h5b",children:e}):e,a!==void 0&&n.jsx("span",{className:"training-card-group__count body-3b",children:a}),(s!=null||i||u!=null)&&n.jsxs("span",{className:"training-card-group__actions",onClick:B=>B.stopPropagation(),children:[s,i&&n.jsx(fn,{size:40,options:i.options,value:i.value,placeholder:i.placeholder,onChange:i.onChange,ariaLabel:typeof e=="string"&&e?h("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:x}))]})}const sw="speechear:saved_word_tables";function lw(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 iw(){try{const e=localStorage.getItem(sw);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(lw):[]}catch{return[]}}function pd(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 Ds(e){return e.map(t=>t.homonum!=null?`${t.word}#${t.homonum}`:t.word).join("|")}function uw(e){const t=new Set;return e.map(a=>{let r=a.id;for(let l=2;t.has(r);l++)r=`${a.id}~${l}`;return t.add(r),r===a.id?a:{...a,id:r}})}function cw({title:e,titleIcon:t,disc:a,filterTitle:r,filterCollapsible:l,filterDefaultCollapsed:s,filterCollapsed:i,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:d,code:m,items:p,onSaveComplete:C,onLoad:b,onRemoveItem:x,onReset:f,resetLabel:h,saveButtonLabel:_,secondarySaveButtonLabel:g,onReorder:k,showCellCount:v,onAddItem:B,className:y,renderSavePopup:w,renderWordSearch:A,hideControls:E,saveOnly:D,tableName:N,nameValue:F,onNameChange:R,descriptionValue:K,onDescriptionChange:L,namePlaceholder:$,descriptionPlaceholder:T,existingNames:J,editingName:q,onCancel:O,initialItemsPerPage:Q,renderCellAction:P,actionsLeftExtra:V}){const{t:W}=_e.useTranslation(),G=h??W("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),S=p===void 0,M=!!R,[I,Z]=o.useState([]),le=(F??"").trim(),oe=le||($??"").trim(),de=(K??"").trim()||(T??"").trim(),re=(J??[]).map(ee=>ee.trim().toLowerCase()),z=[q?.trim().toLowerCase(),...I].filter(ee=>!!ee),ne=[...re];for(const ee of z){const xe=ne.indexOf(ee);xe!==-1&&ne.splice(xe,1)}const H=le!==""&&ne.includes(le.toLowerCase()),[U,pe]=o.useState(Array(4).fill(null)),[Ee,ge]=o.useState(4),[me,ie]=o.useState(null),be=U.slice(0,Ee),he=!!d?.show,[ue,Me]=o.useState(!0),[qe,je]=o.useState(!0),Ve=d&&{...d,top:ue,bottom:qe},[Oe,dt]=o.useState("landscape"),[rt,nt]=o.useState(["image","word","standardPron"]),[pt,Ne]=o.useState("show"),[Ue,ke]=o.useState(!0),[He,Be]=o.useState(!0),Se=o.useRef(null),Le=o.useRef([]),[Ze,xt]=o.useState(Q==="all"?Number.POSITIVE_INFINITY:Q??8),[et,Xe]=o.useState("right"),[At,gt]=o.useState(!1),[_t,Nt]=o.useState(!1),{toastMessage:mt,toastType:st,showWarning:Pe,clearToast:bt}=Oi("warning"),wt=o.useCallback(()=>ie(null),[ie]);B&&!S&&!v&&Rt("word-table-block-add-without-cell-count",'[WordTableBlock] \uD45C\uC2DC \uBAA8\uB4DC\uC5D0\uC11C onAddItem \uC740 showCellCount \uC640 \uD568\uAED8 \uC918\uC57C "\uCD94\uAC00\uD558\uAE30" \uCE78\uC774 \uC0DD\uAE34\uB2E4.');const[lt,jt]=o.useState(()=>Math.max(p?.length??1,1)),Ge=S?Ee:v?Math.max(lt,p?.length??1,1):Math.max(p?.length??0,1),{width:yt,height:$t}=ga[Oe],Re=!S&&!v,ot=p?.length??0,Et=Math.min(Ze,Math.max(ot,1)),Je=Re?Et:Ge,Dt=Re?Xu(p??[],Je):null,ae=!!Dt&&Dt.length>1,ve=S?be.some(ee=>ee!==null&&ee.length>1):(p??[]).some(ee=>(ee.words??[]).length>1),ze=N?.trim()||`${Hl(La())} ${ve?W("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):W("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,Qe=o.useCallback(()=>ae?Le.current.filter(ee=>ee!==null):Se.current?[Se.current]:[],[ae]),{print:ht,openNewWindow:it,downloadHtml:It}=ls({getElements:Qe,paperW:yt,paperH:$t,fileName:ze,onPopupBlocked:()=>{Pe(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."))}}),Gt=ee=>{ge(ee),pe(xe=>xe.length>=ee?xe:[...xe,...Array(ee-xe.length).fill(null)]),ie(null)},An=ee=>{pe(xe=>{const $e=[...xe];return $e[ee]=null,$e}),me===ee&&ie(null)},Wt=ee=>{if(me===null)return;const xe=me;pe(We=>{const at=[...We];return at[xe]=ee.length>0?ee:null,at});const $e=be.findIndex((We,at)=>at>xe&&We===null);ie($e!==-1?$e:null)},Kt=S?be.some(ee=>ee?.some(xe=>!!xe.colloquialPronunciation)):(p??[]).some(ee=>(ee.words??[]).some(xe=>!!xe.colloquialLabel)),Bt=o.useMemo(()=>sa()?S?U.slice(0,Ee).flatMap(ee=>(ee??[]).map(xe=>[xe.word,xe.homonum])):(p??[]).flatMap(ee=>(ee.words??[]).map(xe=>[xe.label,xe.homonum])):[],[S,U,Ee,p]),[ut,Ct]=o.useState(!1);o.useEffect(()=>{if(Bt.length===0)return;let ee=!1;return Promise.all(Bt.map(([xe,$e])=>Nl(xe,$e))).then(xe=>{ee||Ct(xe.some(Boolean))},()=>{}),()=>{ee=!0}},[Bt]);const Tt=Bt.length>0&&ut,Yt=o.useMemo(()=>[...S||v?[{label:W("wordTable.filter.columns","\uCE78 \uC218"),items:N4.map(ee=>({value:`${ee}\uCE78`,displayLabel:W("wordTable.filter.column",{count:ee})})),display:"segmented"}]:[],...Re&&(p?.length??0)>0?[hc(W,{hasPairs:ve,itemCount:ot})]:[],...ae?[E4(W)]:[]],[W,S,v,Re,p?.length,ve,ot,ae]),gn={...S||v?{[W("wordTable.filter.columns","\uCE78 \uC218")]:`${Ge}\uCE78`}:{},...Re&&(p?.length??0)>0?{[W(ve?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${Et}\uAC1C`}:{},...ae?{[W("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:et}:{}},Nn=(ee,xe)=>{xe===W("wordTable.filter.columns","\uCE78 \uC218")?S?Gt(parseInt(ee)):jt(parseInt(ee)):xe===W(ve?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")?xt(Cc(parseInt(ee),ot)):xe===W("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&Xe(fc(ee))},tn=S?uw(be.filter(ee=>ee!==null&&ee.length>0).map(ee=>({id:Ds(ee),words:ee.map(pd)}))):p??[],Zt=()=>{S&&pe(ee=>ee.length>Ee?ee.slice(0,Ee):ee)},Ht=(ee=!1)=>{if(Nt(ee),M&&C){const xe=oe.trim().toLowerCase();xe&&Z($e=>$e.includes(xe)?$e:[...$e,xe]),C(oe,tn,de||void 0,ee),Zt();return}if(D&&C){C("",tn,void 0,ee),Zt();return}if(C){gt(!0);return}It()},[bn,Xt]=o.useState(!1),[un,Ot]=o.useState(""),nn=un.trim(),se=nn!==""&&re.includes(nn.toLowerCase()),Ae=()=>{Ot(oe?W("wordTable.save.copyName",{name:oe,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),Xt(!0)},Te=()=>{!nn||se||!C||(C(nn,tn,de||void 0,!0),Zt(),Xt(!1))},Ke=tn.length===0,Fe=Ke||M&&(oe===""||H),Y=()=>{if(Ke){Pe(W("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(M&&oe===""){Pe(W("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}M&&H&&Pe(W("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},ce=n.jsx(ba,{items:tn,orientation:Oe,contentTypes:rt,cutLine:pt,showOutline:Ue,showDivLine:He,count:Ge});return n.jsxs(n.Fragment,{children:[n.jsxs(fa,{type:"page",icon:t,title:e,disc:a,className:we("word-table-block",y),children:[bn&&n.jsx(Wn,{size:"small",title:g??W("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>Xt(!1),footer:({closeWithAnimation:ee})=>n.jsxs(n.Fragment,{children:[n.jsx(fe,{htmlType:"button",size:48,type:"bar",label:W("common.cancel","\uCDE8\uC18C"),onClick:ee}),n.jsx(fe,{htmlType:"button",size:48,type:"bar",variant:"main",label:W("common.save","\uC800\uC7A5"),disabled:!nn||se,onClick:Te})]}),children:n.jsx(Xn,{label:W("wordTable.save.nameLabel","\uC774\uB984"),value:un,onChange:Ot,placeholder:W("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:Te,error:se?W("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),At&&C&&w?.({defaultName:typeof e=="string"?e:W("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:ce,previewW:yt,previewH:$t,items:tn,existingNames:iw().map(ee=>ee.name),saveAsNew:_t,onSave:(ee,xe)=>{C(ee,tn,xe,_t),Zt(),gt(!1)},onCancel:()=>gt(!1)}),(S||B)&&me!==null&&A?.({cellIndex:me,onConfirm:S?Wt:ee=>{if(B){const xe=ee[0];if(xe){const $e=new Set((p??[]).map(at=>at.id));let We=Ds([xe]);for(let at=2;$e.has(We);at++)We=`${Ds([xe])}~${at}`;B({id:We,words:[pd(xe)]})}}ie(null)},onClose:wt}),!E&&n.jsx(as,{title:r,collapsible:l,defaultCollapsed:s,collapsed:i,onCollapsedChange:u,headerSummary:c,hasImage:Tt,hasColloquial:Kt,contentTypes:rt,orientation:Oe,showOutline:Ue,cutLine:pt,showDivLine:He,setters:{setContentTypes:nt,setOrientation:dt,setShowOutline:ke,setCutLine:Ne,setShowDivLine:Be,setShowTopInfo:Me,setShowBottomInfo:je},showCutLine:(Re?Je:Ge)>1,showDivLine2:ve,middleSections:Yt,extraSelected:gn,onExtraSelect:Nn,showPaperBands:he,showTopInfo:ue,showBottomInfo:qe}),ae&&Dt?n.jsx("div",{className:"word-table-block__pages",children:Dt.map((ee,xe)=>n.jsx(ba,{orientation:Oe,contentTypes:rt,cutLine:pt,showOutline:Ue,showDivLine:He,count:Je,items:ee,onRemoveItem:x,onReorder:k&&(($e,We)=>k($e+xe*Je,We+xe*Je)),renderCellAction:P&&(($e,We)=>P($e+xe*Je,We)),brand:Ve,code:m,contentRef:$e=>{Le.current[xe]=$e},pageNumber:{current:xe+1,total:Dt.length},pageNumberPosition:et},xe))}):n.jsx(ba,{orientation:Oe,contentTypes:rt,cutLine:pt,showOutline:Ue,showDivLine:He,count:Ge,items:S?void 0:p??[],editCells:S?be:void 0,activeCell:me,onActivateCell:S||B?ie:void 0,onRemoveCell:S?An:void 0,onRemoveItem:S?void 0:x,onReorder:S?void 0:k,renderCellAction:S?void 0:P,brand:Ve,code:m,showFillerAdd:!!B,contentRef:Se}),!E&&!D&&V!=null&&n.jsx("div",{className:"word-table-block__table-actions",children:V}),M&&!E&&n.jsxs(Nr,{size:"medium",labelWidth:64,useBorder:!1,useRowBorder:!1,className:"word-table-block__meta",children:[n.jsx($n,{variant:"custom",label:W("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(Xn,{required:!0,value:F??"",onChange:R,placeholder:$?$+W("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):W("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:W("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:H?W("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:ee=>{(ee.key==="Tab"&&!ee.shiftKey||ee.key===" ")&&!(F??"").trim()&&($??"").trim()&&(ee.preventDefault(),R?.($??""))}})}),n.jsx($n,{variant:"custom",label:W("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(Xn,{value:K??"",onChange:L,placeholder:T?T+W("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):W("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:W("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:ee=>{(ee.key==="Tab"&&!ee.shiftKey||ee.key===" ")&&!(K??"").trim()&&(T??"").trim()&&(ee.preventDefault(),L?.(T??""))}})})]})]}),!E&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!D&&b&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:W("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:b}),!D&&f&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:G,onClick:f}),!D&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:W("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:it})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[O&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:W("common.cancel","\uCDE8\uC18C"),onClick:O}),!D&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:W("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:ht}),g&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:g,onClick:()=>M?Ae():Ht(!0),disabled:Ke,onDisabledClick:()=>{Pe(W("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:_??W("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>Ht(!1),disabled:Fe,onDisabledClick:Y})]})]}),n.jsx(ha,{message:mt,type:st,onClose:bt})]})}function md({items:e,className:t}){const a=e.length,r=a<=3?1:2,l=Math.ceil(a/r)||1,s=r*l;return n.jsx("div",{className:we("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${r}, 1fr)`},children:Array.from({length:s},(i,u)=>{const c=e[u];return c?n.jsx("div",{className:"word-table-thumb__cell",children:(c.words?.length?c.words:[{label:c.id}]).map((d,m)=>n.jsxs(o.Fragment,{children:[m>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:d.label})]},m))},u):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},u)})})}function dw({items:e,name:t,description:a,createdAt:r,code:l,published:s,publishedLabel:i,shared:u,sharedLabel:c,isNew:d,publisherName:m,publishedAt:p,likeCount:C,downloadCount:b,onPublisherClick:x,selected:f,onClick:h,onMore:_,titleNode:g,className:k}){const{t:v}=_e.useTranslation(),B=g!=null,y=m!=null||p!=null||C!=null||b!=null,w=A=>{A.target===A.currentTarget&&!B&&(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),h?.())};return n.jsxs("div",{className:we("word-table-button",f?"word-table-button--selected":"",y?"":"word-table-button--no-footer",k),role:"button",tabIndex:0,"aria-label":l?`${t} (${l})`:t,onClick:B?void 0:h,onKeyDown:w,children:[d&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":v("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(md,{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:[g??n.jsx("div",{className:"word-table-button__title h4",children:t}),a&&n.jsx("div",{className:"word-table-button__desc body-3",children:a})]}),_&&!B&&n.jsx(fe,{htmlType:"button",className:"word-table-button__more",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:v("common.moreFor",{name:t}),onClick:A=>{A.stopPropagation(),_(A)}})]}),(l||r||s||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?Wl(r,v):""})}),n.jsxs("span",{className:"word-table-button__meta-right",children:[(s||u)&&n.jsxs("span",{className:"word-table-button__badges",children:[s&&n.jsx(Lt,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:i??v("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),u&&n.jsx(Lt,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:c??v("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),l&&n.jsx("span",{className:"word-table-button__code caption-1",children:l})]})]}),y&&n.jsxs("div",{className:"word-table-button__footer",children:[n.jsxs("span",{className:"word-table-button__store-by",children:[m&&(x?n.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":v("wordTable.publisherFilter",{name:m,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:A=>{A.stopPropagation(),x()},children:m}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:m})),p&&n.jsx("span",{className:"training-card__date body-4",children:Wl(p,v)})]}),n.jsxs("span",{className:"word-table-button__store-stats",children:[C!=null&&n.jsx(Lt,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(C),"aria-label":v("common.likeCount",{count:C,defaultValue:`\uC88B\uC544\uC694 ${C}`})}),b!=null&&n.jsx(Lt,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(b),"aria-label":v("common.downloadCount",{count:b,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${b}`})})]})]})]})}/**
|
|
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:s("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:s("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:s("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:s("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:s("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:s("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:s("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:s("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:s("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:s("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:s("footer.ceo","\uB300\uD45C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:s("footer.ceoName","\uD55C\uC9C0\uD61C")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:s("footer.address","\uC8FC\uC18C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:s("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:s("footer.bizNo","\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638")})," ",n.jsx("span",{className:"footer-meta caption-1",children:s("footer.bizNoValue","526-81-02926")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:s("footer.support","\uACE0\uAC1D\uC13C\uD130")})," ",n.jsxs("span",{className:"footer-meta caption-1",children:[r," \xA0 ",l]})]})]})]}),n.jsx("div",{className:"site-footer__copyright footer-copyright caption-1",children:"\xA9 IHAB, Inc. All rights reserved."})]})})}function cx({logo:e,logoAlt:t="",logoHref:a,links:r=[],actions:l,className:s,containerClassName:i,renderLink:u,menuLabel:c}){const{t:d}=_e.useTranslation(),m=c??{open:d("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:d("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[p,C]=o.useState(!1),b=o.useId(),x=o.useRef(null);o.useEffect(()=>{if(!p)return;const _=Gn(()=>{const v=document.getElementById(b);v&&v.contains(document.activeElement)&&x.current?.focus(),C(!1)}),g=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,k=v=>{v.matches&&C(!1)};return g&&(g.matches&&C(!1),g.addEventListener?.("change",k)),()=>{_(),g?.removeEventListener?.("change",k)}},[p,b]);const f=i?`${i} landing-header__inner`:"landing-header__inner",h=(_,g)=>u?u(_,{onClick:g}):n.jsx("a",{href:_.href,onClick:g,"aria-current":_.current?"page":void 0,children:_.label});return n.jsxs("header",{className:s?`landing-header ${s}`:"landing-header",children:[n.jsxs("div",{className:f,children:[e!=null&&(()=>{const _=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:_}):n.jsx("div",{className:"landing-header__brand",children:_})})(),r.length>0&&n.jsx("nav",{className:"landing-header__links",children:r.map((_,g)=>n.jsx("span",{children:h(_)},`${g}:${_.href}`))}),n.jsxs("div",{className:"landing-header__actions",children:[l,r.length>0&&n.jsx("button",{ref:x,type:"button",onClick:()=>C(_=>!_),"aria-expanded":p,"aria-controls":b,"aria-label":p?m.close:m.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:b,hidden:!p,className:"landing-header__drawer",children:n.jsx("div",{className:i??void 0,children:r.map((_,g)=>n.jsx("span",{className:"landing-header__drawer-item",children:h(_,()=>C(!1))},`${g}:${_.href}`))})})]})}function dx({children:e,action:t,onClick:a,className:r}){const l=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:l,onClick:a,...Vu(a),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function px({mountedRef:e}){const t=o.useRef({phase:"sound",at:0}),a=o.useRef(0),r=o.useRef(null),l=o.useRef(null),s=o.useCallback(()=>{const f=t.current,h=f.phase!=="sound"&&f.at>0;l.current=h?{phase:f.phase,elapsed:Math.max(0,Date.now()-f.at)}:null},[]),i=o.useCallback(()=>{const f=l.current;return l.current=null,f},[]),u=o.useCallback(()=>{a.current+=1,t.current={phase:"sound",at:0}},[]),c=o.useCallback((f,h,_=0)=>{if(!(f>0))return Promise.resolve(!0);const g=a.current;return t.current={phase:h,at:Date.now()-Math.max(0,_)},new Promise(k=>{const v=setTimeout(()=>{r.current===v&&(r.current=null),k(!!e.current&&g===a.current)},f);r.current=v})},[e]),d=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),m=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),p=o.useCallback(()=>{const f=t.current;return f.phase!=="sound"&&f.at>0},[]),C=o.useCallback(()=>a.current,[]),b=o.useCallback(f=>f===a.current,[]),x=o.useCallback(()=>{a.current+=1},[]);return o.useEffect(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]),o.useMemo(()=>({positionRef:t,isRunning:p,generation:C,isCurrent:b,abort:u,waitPad:c,enterSound:d,leave:m,pause:s,resume:i,__bumpGenerationForTest:x}),[p,C,b,u,c,d,m,s,i,x])}const va=9,mx=e=>Math.round(Math.min(va,Math.max(0,e))/va*100),hx=e=>e/100*va,Xa=2,wc=.1,Cx=e=>Math.min(Xa,Math.max(0,e)),fx=.1,gx=e=>Math.round(e*1e6)/1e6;function Ja(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return Cx(t);const a=Math.min(va,Math.max(0,Number(e.level)||0))/va,r=Number(e.mainVolume);return r>0?a>0?gx(Math.min(Xa,Math.max(fx,a/r))):0:1}const Bc=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function kc(e){return Bc(e)}function cs(e){return Bc(e)*Ja(e)}function ds(e,t=TC()){const a=Number.isFinite(t)&&t>0?t:1;return Math.min(1,cs(e)/a)}function Jn(e,t){const a={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(a.noiseRatio=Ja({level:a.level,mainVolume:a.mainVolume})),a}const Qn={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},ps=o.createContext(null);function _r(){return o.useContext(ps)}const ms=e=>`${jC()}/${e}`,Ac=e=>Array.from({length:10},(t,a)=>ms(`${e}-${String(a+1).padStart(2,"0")}.mp3`)),wr={get defaultNoise(){return ms("noise1.mp3")},get street(){return Ac("noise2")},get restaurant(){return Ac("noise3")},get buzz(){return ms("noise4.mp3")}};function bx(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return wr.defaultNoise;case"street":return wr.street[t];case"restaurant":return wr.restaurant[t];case"buzz":return wr.buzz;default:return null}}function yx({noisePlayer:e,audioRef:t,playbackStateRef:a,sequencer:r}){const l=o.useRef(e?.registerAnalyser);l.current=e?.registerAnalyser;const s=o.useRef(null),[i,u]=o.useState(null),c=o.useRef(null),d=o.useRef(null),m=o.useRef(null),p=o.useRef(null),C=o.useRef(0),b=o.useRef(null),x=o.useCallback(()=>!!r?.isRunning(),[r]),f=o.useCallback(()=>{p.current!==null&&(cancelAnimationFrame(p.current),p.current=null),b.current!==null&&(clearTimeout(b.current),b.current=null)},[]),h=o.useCallback((B,y=250)=>{const w=s.current;if(!w)return;const A=d.current;if(A){d.current=null;try{w.pause()}catch{}w.src=A,w.load()}if(!w.src)return;C.current+=1,f();try{to(),er(w).then(F=>{if(s.current===w)try{l.current?.("noise",F)}catch{}})}catch{}const E=w.paused?0:tr(w);w.paused&&On(w,0),w.play().catch(()=>{});const D=performance.now(),N=()=>{const F=Math.min(1,(performance.now()-D)/y);try{On(w,E+(B-E)*F)}catch{}F<1?p.current=requestAnimationFrame(N):p.current=null};p.current=requestAnimationFrame(N)},[f]),_=o.useCallback((B=250,y)=>{const w=s.current;if(!w||w.paused){y?.();return}const A=++C.current;f();const E=performance.now(),D=tr(w),N=()=>{const F=Math.min(1,(performance.now()-E)/B);try{On(w,D*(1-F))}catch{}if(F<1)p.current=requestAnimationFrame(N);else{p.current=null,b.current!==null&&(clearTimeout(b.current),b.current=null);try{w.pause()}catch{}y?.()}};p.current=requestAnimationFrame(N),b.current=setTimeout(()=>{if(b.current=null,C.current===A){p.current!==null&&(cancelAnimationFrame(p.current),p.current=null);try{w.paused||(On(w,0),w.pause(),y?.())}catch{}}},B+150)},[f]);o.useEffect(()=>{const B=document.createElement("audio");return B.loop=!0,B.crossOrigin="anonymous",s.current=B,()=>{f();try{B.pause(),B.removeAttribute("src"),B.load()}catch{}s.current=null,c.current=null,d.current=null}},[f]);const g=e?ds(e.settings):0,k=!!e?.settings.enabled&&g>0;o.useEffect(()=>{if(!k)return;let B=0;const y=setInterval(()=>{const w=s.current;if(!w||w.paused){B=0;return}const A=t.current;if(A&&!A.paused&&!A.ended||x()||a.current==="playing"){B=0;return}B+=1,B>=2&&(B=0,_())},400);return()=>clearInterval(y)},[_,k,t,a,x]),o.useEffect(()=>{const B=()=>{const y=s.current;if(document.hidden){if(y&&!y.paused){f();try{y.pause()}catch{}}return}if(!y||!y.paused)return;const w=t.current,A=!!w&&!w.paused&&!w.ended||x()||a.current==="playing",E=m.current;A&&E?.enabled&&E.volume>0&&h(E.volume)};return document.addEventListener("visibilitychange",B),()=>document.removeEventListener("visibilitychange",B)},[f,h,t,a,x]),o.useEffect(()=>{m.current=e?{enabled:e.settings.enabled,volume:g,type:e.settings.type}:null},[e,e?.settings.enabled,g,e?.settings.type]);const v=o.useRef(null);return o.useEffect(()=>()=>{v.current?.(),v.current=null},[]),o.useEffect(()=>{const B=e?.settings,y=s.current;if(!y)return;const w=B?ds(B):0;if(!B||!B.enabled||w===0){_();return}if(c.current!==B.type){const A=bx(B.type);A&&(c.current=B.type,u(A),d.current=A,_(150,()=>{if(d.current!==A)return;d.current=null,y.src=A,y.load();const E=t.current;if(E&&!E.paused||x()){v.current?.();const D=()=>{y.removeEventListener("canplay",D),v.current===N&&(v.current=null);const F=t.current,R=m.current;(F&&!F.paused&&!F.ended||x())&&R?.enabled&&R.volume>0&&h(R.volume)},N=()=>y.removeEventListener("canplay",D);v.current=N,y.addEventListener("canplay",D)}}))}else{const A=t.current,E=!!A&&!A.paused&&!A.ended||x()||a.current==="playing";if(E&&d.current)h(w);else if(E&&y.paused&&y.src)h(w);else if(!y.paused)if(!E)_();else{f();const D=tr(y),N=performance.now(),F=()=>{const R=Math.min(1,(performance.now()-N)/150);try{On(y,D+(w-D)*R)}catch{}R<1?p.current=requestAnimationFrame(F):p.current=null};p.current=requestAnimationFrame(F)}}},[e?.settings,e?.settings.enabled,g,e?.settings.type,f,h,_,t,a,m,x]),o.useEffect(()=>{const B=s.current;if(B)try{B.playbackRate=Math.min(1.25,Math.max(.75,e?.settings.speed??1))}catch{}},[e?.settings.speed]),{noiseAudioRef:s,activeNoiseUrl:i,noiseSettingsRef:m,cancelNoiseFade:f,fadeInNoise:h,fadeOutNoise:_}}function vx({ttsText:e,playbackRate:t,mainVolume:a,fillRef:r,waveProgressRef:l,setProgress:s,setPlaybackState:i,setStateLocal:u,fadeInNoise:c,fadeOutNoise:d,noiseSettingsRef:m,onDoneRef:p,handleEndRef:C}){const b=o.useRef(null),x=o.useRef(0),f=o.useRef(null),h=o.useRef(0),_=o.useRef(!1);o.useEffect(()=>()=>{h.current++;try{if(f.current&&(cancelAnimationFrame(f.current),f.current=null),_.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}_.current=!1}}catch{}},[]);const g=(B,y=1)=>{try{const w=(B||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(B||"").length);return Math.max(700,Math.round(w*300/Math.max(.25,y)))}catch{return 1200}},k=o.useCallback(B=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof p.current=="function"&&p.current(!1)}catch{}return}const y=window.speechSynthesis,w=++h.current;try{try{y.cancel()}catch{}const A=B??e,E=Array.isArray(A)?A.filter(L=>!!L):[A||""];E.length===0&&E.push("");const D=Math.max(.3,Math.min(3,t));x.current=E.reduce((L,$)=>L+g($,D||1),0),b.current=performance.now(),s(0),i("playing"),u("playMode");const N=m.current;N?.enabled&&(N?.volume??0)>0&&c(N.volume);const F=()=>{try{const L=b.current||performance.now(),$=performance.now()-L,T=x.current||1200,J=Math.min(1,$/T);try{r.current&&(r.current.style.left=`${J*100}%`),l.current&&l.current.style.setProperty("--progress",String(J))}catch{}J<1&&(f.current=requestAnimationFrame(F))}catch{}},R=()=>{if(w===h.current)try{f.current&&(cancelAnimationFrame(f.current),f.current=null),s(1),i("stopped");try{C.current?.()}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{}},K=L=>{const $=new SpeechSynthesisUtterance(E[L]);try{$.rate=D}catch{}try{$.volume=Math.max(0,Math.min(1,a))}catch{}$.onend=()=>{if(w===h.current){if(L<E.length-1){try{K(L+1)}catch{R()}return}R()}},$.onerror=()=>{R()},$.onstart=()=>{if(!(L>0))try{f.current&&(cancelAnimationFrame(f.current),f.current=null),f.current=requestAnimationFrame(F)}catch{}},_.current=!0,y.speak($)};try{K(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,l,s,i,u,m,p,C]),v=o.useCallback(()=>{h.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}f.current&&(cancelAnimationFrame(f.current),f.current=null),d(),b.current=null}catch{}i("stopped"),u("active"),s(0)},[d,i,u,s]);return{startTTS:k,stopTTS:v}}const xx=.01,_x=.3;async function wx(e,t,a,r=!1){let l=null;try{const s=window.AudioContext||window.webkitAudioContext;l=new s;const i=await l.decodeAudioData(e.slice(0)),u=i.numberOfChannels>0?i.getChannelData(0):null;if(!u)return null;let c=0;if(r){const b=Math.floor(_x*i.sampleRate),x=Math.min(u.length,b);for(;c<x&&Math.abs(u[c])<=xx;)c++;c>=x&&(c=0)}const d=u.length-c,m=a&&a>0?Math.min(d,Math.floor(a*i.sampleRate)):d,p=Math.max(t,m),C=Math.floor(p/t)||1;return new Array(t).fill(0).map((b,x)=>{const f=c+x*C,h=Math.min(f+C,c+p,u.length);let _=0;for(let g=f;g<h;g++){const k=Math.abs(u[g]);k>_&&(_=k)}return _})}catch{return null}finally{try{l?.close?.()}catch{}}}async function Nc(e,t,a,r=!1){try{const l=await fetch(e);if(l.ok===!1)return null;const s=await l.arrayBuffer();return await wx(s,t,a,r)}catch(l){try{const s=$l(l)}catch{}return null}}const hs=45,Bx=74,kx=2;function Br(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function kr(e){return Br(e)/45}const Ax=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),Ec=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function Dc({durationsSec:e,leadInMs:t=0,tailMs:a=0}){const r=Ec(t),l=Ec(a),s=[];let i=0;return e.forEach((u,c)=>{for(const[d,m]of[["lead",r],["sound",Ax(u)],["tail",l]])s.push({kind:d,track:c,startMs:i,durMs:m}),i+=m}),{segments:s,totalMs:i,trackCount:e.length}}function Sc(e,t){const a=(t|0)*3;if(t<0||a+2>=e.segments.length)return null;const[r,l,s]=[e.segments[a],e.segments[a+1],e.segments[a+2]];return{lead:r,sound:l,tail:s,totalMs:r.durMs+l.durMs+s.durMs}}function Nx(e,t){const a=Sc(e,t.track);if(!a||!(a.totalMs>0))return 0;const r=a[t.kind],l=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+l)/a.totalMs))}function Ex(e,t,a){const r=Math.max(0,Math.floor(a)),l=Sc(e,t);if(!l||r===0||!(l.totalMs>0)||l.lead.durMs===0&&l.tail.durMs===0||!(l.sound.durMs>0))return{lead:0,sound:r,tail:0};const s=Math.round(l.lead.durMs/l.totalMs*r),i=Math.round(l.tail.durMs/l.totalMs*r),u=Math.max(1,r-s-i),c=s+u+i-r;return{lead:Math.max(0,s-Math.ceil(c/2)),sound:u,tail:Math.max(0,i-Math.floor(c/2))}}function Dx({currentTime:e,sources:t,index:a,audioDuration:r}){const l=a||0,s=Array.isArray(t)&&t.length>0?t[l]:void 0,i=s?s.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 Sx({phase:e,phaseElapsedMs:t,currentTime:a,trackDurationSec:r,leadInMs:l,tailMs:s}){const i=Dc({durationsSec:[r],leadInMs:l,tailMs:s});return Nx(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(a)?a:0)*1e3:t})}function jx({bars:e,trackDurationSec:t,leadInMs:a,tailMs:r}){return Ex(Dc({durationsSec:[t],leadInMs:a,tailMs:r}),0,e)}function Tx(e,t){if(!Array.isArray(e))return null;const a=t||0;return a<e.length-1?a+1:null}function Mx({ended:e,completedByEnd:t}){return!!e||!!t}function Lx(e){return e.map((t,a)=>({src:t.src,label:String(a+1),color:void 0,duration:t.duration||0}))}function $x(e){return e.reduce((t,a)=>t+(a.duration||0),0)}function Rx(e,t,a){const r=Array.isArray(e)?e:e?[e]:[],l=[];for(const s of r)if(s){if(typeof s=="object"&&s!==null&&"src"in s&&s.src){const i=s;l.push({code:i.code??null,src:i.src});continue}if(typeof s=="string"&&(s.startsWith("http")||s.includes("/"))){l.push({code:null,src:s});continue}if(typeof s=="string"||typeof s=="number"){const i=String(s),u=a(i,t);u&&l.push({code:i,resolvedPath:u})}}return l}function Px(e,t){if(!t||e.readyState<1)return!0;const a=e.currentSrc||e.src;return a?jc(a)!==jc(t):!0}function jc(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const Tc=4,Ix=kr(Tc/hs);function Fx(e){const{src:t,segments:a,progress:r=0,waveProgressRef:l,noiseSrc:s,noiseRatio:i=0,noiseSpeed:u=1,totalDuration:c=0,mainVolume:d=1,onReadyChange:m,showSoundWaveForm:p=!0,leadInMs:C=0,tailMs:b=0,trackDurationSec:x=0}=e,f=o.useRef(null),h=o.useRef(null),[_,g]=o.useState(null),[k,v]=o.useState(!1),[B,y]=o.useState(null),[w,A]=o.useState(2),[E,D]=o.useState(0),[N,F]=o.useState(null),[R,K]=o.useState(!1),[L,$]=o.useState(!1),T=3,J=3,q=1,O=300,Q=o.useRef(0),P=o.useCallback(()=>{const ge=f.current,me=h&&h.current?h.current:ge?ge.closest(".audio-player__wave"):null,ie=me?me.getBoundingClientRect():ge?ge.getBoundingClientRect():null,be=ie?ie.width:0,he=ie?Math.max(100,ie.width):320,ue=ie?ie.height:0,Me=Math.max(q,Math.min(O,Math.floor((he+J)/(T+J)))),Ve=Me*T,Te=Math.max(0,Me-1),qe=Math.max(0,Te>0?(he-Ve)/Te:J);return{bars:Me,gap:qe,height:ue,width:be}},[]),V=o.useRef(void 0),W=o.useRef(null),G=o.useCallback(async(ge,me,{quiet:ie=!1}={})=>{const be=++Q.current,he=()=>Q.current===be;try{if(ie||v(!1),V.current=ge,!ge){he()&&g(null);return}let ue=me;if(!ue)try{for(let Te=0;Te<4&&!(f.current||h.current);Te++)await new Promise(qe=>requestAnimationFrame(qe));await new Promise(Te=>requestAnimationFrame(Te));const Ve=P();Ve.height>0&&D(Ve.height),ue=Ve.bars,A(Ve.gap)}catch{ue=120}W.current=ue;const Me=await Nc(ge,ue);if(!he())return;if(!Me){g(null),v(!1);return}g(Me),y(ue),v(!0)}catch{if(!he())return;g(null),v(!1)}},[v,g,D,A,y,P]);o.useEffect(()=>{const ge=h.current;if(!ge||typeof ResizeObserver>"u")return;let me=null;const ie=new ResizeObserver(()=>{me!==null&&cancelAnimationFrame(me),me=requestAnimationFrame(()=>{me=null;try{const be=P();if(be.width<=0||(be.height>0&&D(be.height),W.current===null||be.bars===W.current))return;const he=V.current;A(be.gap),he?G(he,be.bars,{quiet:!0}).catch(()=>{}):W.current=be.bars}catch{}})});return ie.observe(ge),()=>{ie.disconnect(),me!==null&&cancelAnimationFrame(me)}},[P,G]),o.useEffect(()=>{const ge=a&&a[0]&&a[0].src||t||a&&a.length===1&&a[0]&&a[0].src;G(typeof ge=="string"?ge:void 0).catch(()=>{}),$(!1)},[t,a,G]),o.useEffect(()=>{let ge=!1;if(K(!1),F(null),!s||!B)return;const me=c>0?c*(u||1):void 0;return Nc(s,B,me,!0).then(ie=>{ge||(F(ie),ie||K(!0))}).catch(()=>{ge||(F(null),K(!0))}),()=>{ge=!0}},[s,B,c,u]);const S=Math.max(0,Math.min(1,d)),M=o.useMemo(()=>_&&_.length&&Math.max(..._)||1,[_]),I=B||40,Z=o.useMemo(()=>jx({bars:I,trackDurationSec:x,leadInMs:C,tailMs:b}),[I,x,C,b]),le=o.useMemo(()=>Array.from({length:I}).map((ge,me)=>{const ie=me>=Z.lead&&me<Z.lead+Z.sound,be=Z.sound>0&&ie?Math.min(I-1,Math.round((me-Z.lead)/Z.sound*I)):-1,he=ie?_&&_[be]!=null?_[be]:null:_?0:null,ue=he==null?null:Math.min(1,he/M*S),Me=ue!=null&&E>0&&Br(ue)<=Tc,Ve=ue==null?.15:Me?0:kr(ue),Te=Me,qe=I>1?me/(I-1):0;return n.jsx("div",{className:Te?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":Ve,"--i":me,"--mix":qe}},me)}),[I,_,M,S,E,Z]),oe={"--progress":String(Math.max(0,Math.min(1,r)))},de=o.useMemo(()=>N&&N.length&&Math.max(...N.map(ge=>Number.isFinite(ge)?Math.abs(ge):0))||1,[N]),re=S*Math.max(0,i),z=!s||!N||!N.length?1:Math.max(1,re),ne={"--bar-gap":`${w}px`,"--wave-h":`${Br(z)}px`,"--wave-h1":`${hs}px`},H=k&&(s?!!N||R:!0);o.useEffect(()=>{H&&$(!0)},[H]);const U=L?k:H;o.useEffect(()=>{m?.(U)},[U,m]);const pe=B||40,Ee=o.useMemo(()=>Array.from({length:pe}).map((ge,me)=>{const ie=N&&N[me]!=null?N[me]:null,be=ie==null?0:Math.abs(ie)/de*re,he=Math.max(Ix,kr(be)),ue=pe>1?me/(pe-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":he,"--i":me,"--mix":ue}},me)}),[pe,N,de,re,E]);return n.jsxs("div",{className:"audio-player__wave",ref:h,style:ne,children:[s&&n.jsx("div",{className:`audio-player__wave-noise ${H?"is-ready":""}`,"aria-hidden":"true",children:Ee}),p&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${U?"is-ready":""}`,ref:f,children:le}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${U?"is-ready":""}`,ref:l,style:oe,children:le})]})]})}const Mc={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function Cs(e,t){return new Promise((a,r)=>{const l=document.createElement("audio");let s=!1;const i=()=>{try{l.removeAttribute("src"),l.load()}catch{}},u=()=>{if(s)return;s=!0;const d=isFinite(l.duration)&&l.duration||0;i(),a(d)},c=d=>{s||(s=!0,i(),t.rejectOnError?r(new Error(d)):a(0))};l.addEventListener("loadedmetadata",u),l.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),t.timeoutMs),l.src=e})}const Ox=2e3;function Lc(e,t=Ox){return new Promise(a=>{let r=!1;const l=()=>{r||(r=!0,a())};e.addEventListener("canplay",l,{once:!0}),e.addEventListener("error",l,{once:!0}),setTimeout(l,t)})}function zx({showSoundWaveForm:e,showNoiseWaveForm:t,timeoutMs:a=2500}){const r=o.useRef(!1),l=o.useRef([]),s=o.useCallback(c=>{if(r.current=c,!c||!l.current.length)return;const d=l.current;l.current=[];for(const m of d)m(!0)},[]),i=o.useCallback(()=>{r.current=!1},[]),u=o.useCallback(()=>!e&&!t||r.current?Promise.resolve(!0):new Promise(c=>{const d=p=>{clearTimeout(m),l.current=l.current.filter(C=>C!==d),c(p)},m=setTimeout(()=>d(!0),a);l.current.push(d)}),[e,t,a]);return o.useEffect(()=>()=>{const c=l.current;l.current=[];for(const d of c)d(!1)},[]),{onReadyChange:s,waitForReady:u,markNotReady:i}}function Wx(){const e=o.useRef([]),t=o.useCallback(l=>(e.current.push(l),l),[]),a=o.useCallback(l=>{const s=new Set([...l].filter(Boolean));e.current=e.current.filter(i=>{if(s.has(i))return!0;try{URL.revokeObjectURL(i)}catch{}return!1})},[]),r=o.useCallback(()=>{a([])},[a]);return o.useEffect(()=>()=>{for(const l of e.current)try{URL.revokeObjectURL(l)}catch{}e.current=[]},[]),{track:t,keepOnly:a,revokeAll:r}}function Hx({offsetY:e=8}={}){const t=o.useRef(null),[a,r]=o.useState(null),l=o.useCallback(()=>r(null),[]),s=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",l),()=>document.removeEventListener("mousedown",l)},[a,l]),{ref:t,rect:a,show:s,hide:l}}function Vx(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 qx=400,Ux=2e3,$c=5;function Gx({audioRef:e,fillRef:t,waveProgressRef:a,sourcesRef:r,currentIndexRef:l,sequencer:s,leadInMs:i=0,tailMs:u=0}){const c=o.useRef(null),d=o.useRef(0),m=o.useRef(null),p=o.useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null)},[]),C=o.useCallback(()=>{if(c.current!==null)return;let x=0;const f=()=>{if(Pn){const h=typeof performance<"u"&&performance.now?performance.now():Date.now();if(x>0&&h-x>qx){const _=m.current===null||h-m.current>Ux;if(m.current=h,_&&d.current<$c){d.current+=1;const g=d.current;let k=null;try{k=typeof document<"u"?document.visibilityState:null}catch{}Mt(`progress-ticker-slow-frames#${g}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(h-x)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,k==="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.",g>=$c?`(${g}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${g}\uBC88\uC9F8)`)}}x=h}try{const h=e.current,_=Array.isArray(r.current)?r.current[l.current||0]:void 0,g=!!_&&Number.isFinite(_.duration)&&(_.duration??0)>0,k=g?0:Vx(h),v=t.current,B=(i||0)>0||(u||0)>0,y=B&&(s?.positionRef.current?.phase??"sound")!=="sound";if(k===null&&!y)try{v&&v.style.visibility!=="hidden"&&(v.style.visibility="hidden")}catch{}else{const w=g?_.duration:k||0;Pn&&y&&!(w>0)&&Mt("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 A=B?Sx({phase:s?.positionRef.current?.phase??"sound",phaseElapsedMs:s?.positionRef.current?Math.max(0,Date.now()-s.positionRef.current.at):0,currentTime:h&&typeof h.currentTime=="number"?h.currentTime:0,trackDurationSec:w,leadInMs:i||0,tailMs:u||0}):Dx({currentTime:h&&typeof h.currentTime=="number"?h.currentTime:0,sources:r.current,index:l.current,audioDuration:k??0});try{v&&(v.style.visibility&&(v.style.visibility=""),v.style.left=`${A*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(A))}catch{}}}catch{}c.current=requestAnimationFrame(f)};c.current=requestAnimationFrame(f)},[e,t,a,r,l,s,i,u]),b=o.useCallback(x=>{p();try{t.current&&(t.current.style.visibility="",t.current.style.left=`${x*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(x))}catch{}},[p,t,a]);return o.useEffect(()=>p,[p]),{start:C,stop:p,settleTo:b}}function fs({btnLabel:e,soundSrc:t,bucketPath:a,onDone:r,disabled:l=!1,ttsText:s=null,className:i,showSoundWaveForm:u=!0,showNoiseWaveForm:c=!0,leadInMs:d=0,tailMs:m=0}){const{t:p}=_e.useTranslation(),C=e,b=_r(),x=o.useRef(b?.registerAnalyser);o.useEffect(()=>{x.current=b?.registerAnalyser});const f=o.useRef(null),h=o.useRef(null),_=o.useRef(null),g=Wx(),k=o.useRef(null),v=o.useRef(!1),B=o.useRef(null),{ref:y,rect:w,show:A,hide:E}=Hx();o.useEffect(()=>()=>{x.current?.("main",null),x.current?.("noise",null)},[]);const[D,N]=o.useState(!1),[F,R]=o.useState("idle"),[K,L]=o.useState("stopped"),$=o.useRef("stopped");o.useEffect(()=>{$.current=K},[K]);const[T,J]=o.useState(0),[q,O]=o.useState("active"),Q=o.useRef(!1);o.useEffect(()=>{if(q!=="playMode"||!Q.current)return;Q.current=!1;const Y=typeof document<"u"?document.activeElement:null;if(Y&&Y!==document.body)return;const ce=_.current?.querySelectorAll("button")[1];try{ce?.focus()}catch{}},[q]);const[P,V]=o.useState(null),[W,G]=o.useState(null),[S,M]=o.useState(0),[I,Z]=o.useState(!1),[le,oe]=o.useState(0),de=b?.playbackRate??1,re=b?.mainVolume??1,z=b?cs(b.settings):0,ne=b?kc(b.settings):re,[H,U]=o.useState("idle"),[pe,Ee]=o.useState(""),[ge]=o.useState("top"),me=o.useRef(null),ie=o.useRef(0),be=o.useRef(null),he=o.useRef(!0),ue=px({mountedRef:he}),Me=o.useRef(null),Ve=o.useRef(d),Te=o.useRef(m);o.useEffect(()=>{Ve.current=Math.max(0,d||0)},[d]),o.useEffect(()=>{Te.current=Math.max(0,m||0)},[m]);const{start:qe,stop:Oe,settleTo:ct}=Gx({audioRef:f,fillRef:h,waveProgressRef:be,sourcesRef:me,currentIndexRef:ie,sequencer:ue,leadInMs:d,tailMs:m}),{onReadyChange:rt,waitForReady:nt,markNotReady:mt}=zx({showSoundWaveForm:u,showNoiseWaveForm:c}),Ne=o.useRef(null),Ue=o.useRef(l),ke=o.useRef(r),He=o.useRef(null),Be=o.useRef(!1),[Se,Le]=o.useState(!1),Ze=o.useCallback(Y=>{Be.current=Y,Le(Y)},[]),_t=o.useRef(null),{activeNoiseUrl:et,noiseSettingsRef:Xe,fadeInNoise:Nt,fadeOutNoise:gt}=yx({noisePlayer:b,audioRef:f,playbackStateRef:$,sequencer:ue}),{startTTS:wt,stopTTS:Et}=vx({ttsText:s,playbackRate:de,mainVolume:ne,fillRef:h,waveProgressRef:be,setProgress:J,setPlaybackState:L,setStateLocal:O,fadeInNoise:Nt,fadeOutNoise:gt,noiseSettingsRef:Xe,onDoneRef:ke,handleEndRef:_t});o.useEffect(()=>{Tt.current=Et});const ht=Y=>{if(typeof window>"u"||!window.speechSynthesis){try{Ee(p("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}wt(Y);return}Re("tts"),wt(Y)},st=Array.isArray(t)?t.filter(Boolean):t?[t]:[],Pe=(!st||st.length===0)&&!!s,bt=Array.isArray(P)&&P.length>0?P:Array.isArray(W)&&W.length>0?W:null,Bt=Math.max(Array.isArray(bt)?bt.length:0,st.length);o.useEffect(()=>(he.current=!0,()=>{he.current=!1}),[]);const lt=()=>{ue.abort()},Tt=o.useRef(null),Ge=o.useRef(null),yt=o.useRef(null),Rt=o.useRef(null);Rt.current||(Rt.current=()=>{yt.current=null;const Y=f.current;if(Ge.current==="audio"&&Y&&(!Y.paused||ue.isRunning())){lt();try{Y.pause()}catch{}he.current&&(L("paused"),Oe(),gt())}else if(Ge.current==="tts")try{Tt.current?.()}catch{}});const Re=Y=>{Ge.current=Y,yt.current=pr(Rt.current)},ot=()=>{yt.current?.(),yt.current=null};o.useEffect(()=>()=>{Rt.current&&mr(Rt.current)},[]);const Dt=o.useRef(de);o.useEffect(()=>{Dt.current=de||1},[de]);const Je=o.useCallback(Y=>{const ce=Dt.current||1;try{Y.defaultPlaybackRate=ce}catch{}try{Y.playbackRate=ce}catch{}},[]),St=o.useCallback((Y,ce)=>{if(!Px(Y,ce)){try{Y.currentTime=0}catch{}Je(Y);return}Y.src=ce,Je(Y),Y.load(),Je(Y)},[Je]),ae=o.useCallback(()=>{He.current&&(clearTimeout(He.current),He.current=null),U("idle")},[]),ve=o.useCallback(async(Y,ce=3,ee=50,xe=0)=>{ae();const $e=ue.generation(),We=!!Y&&Y.currentTime>0&&!Y.ended,at=Math.max(0,Ve.current-Math.max(0,xe));if(at>0&&!We){Re("audio"),qe(),L("playing");const ft=Xe.current;if(ft?.enabled&&(ft.volume??0)>0)try{Nt(ft.volume)}catch{}if(!await ue.waitPad(at,"lead",xe)||!he.current||!ue.isCurrent($e))return!1}ue.enterSound();for(let ft=0;ft<ce;ft++){if(!he.current||!ue.isCurrent($e))return!1;try{return Re("audio"),await Y.play(),!0}catch(ye){if((ye instanceof Error||typeof ye=="object"&&ye&&"name"in ye?ye.name:void 0)==="AbortError"){if(!ue.isCurrent($e))return!1;await new Promise(j=>setTimeout(j,ee));continue}try{Ee(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{Ee(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[p,qe,ue,Nt,Xe,ae]),ze=o.useCallback(Y=>{const ce=ue.generation(),ee=Math.max(0,Te.current-Math.max(0,Y));qe();const xe=Xe.current;if(xe?.enabled&&(xe.volume??0)>0)try{Nt(xe.volume)}catch{}const $e=()=>{try{Me.current?.()}catch{}};if(ee<=0){ue.leave(),$e();return}ue.waitPad(ee,"tail",Y).then(We=>{ue.leave(),We&&ue.isCurrent(ce)&&$e()}).catch(()=>{})},[ue,qe,Nt,Xe]),Qe=o.useCallback(()=>{const Y=f.current;if(!Y)return;const ce=()=>{L("playing"),O("playMode"),Z(!0),qe();try{to(),er(Y).then(We=>{if(he.current)try{x.current?.("main",We)}catch{}})}catch{}const $e=Xe.current;$e?.enabled&&($e?.volume??0)>0&&Nt($e.volume)},ee=()=>{Mx({ended:!!Y?.ended,completedByEnd:Be.current})||(L("paused"),Oe(),gt())},xe=()=>{const $e=()=>{try{const We=me.current,at=Tx(We,ie.current);if(at!==null){ie.current=at,M(at),Z(!0);const ft=We?.[at]&&We[at].src;if(ft&&Y){St(Y,ft),ve(Y).catch(()=>{});return}}}catch{}L("stopped"),J(1);try{if(Y)try{Y.currentTime=0}catch{}}catch{}Oe(),Z(!1),gt();try{!Ue.current&&_t.current&&_t.current()}catch{}};if(Me.current=$e,Te.current>0){qe(),ue.waitPad(Te.current,"tail").then(We=>{ue.leave(),We&&$e()}).catch(()=>{});return}$e()};return Y.addEventListener("play",ce),Y.addEventListener("pause",ee),Y.addEventListener("ended",xe),()=>{try{Y.removeEventListener("play",ce),Y.removeEventListener("pause",ee),Y.removeEventListener("ended",xe),Oe()}catch{}}},[Nt,gt,ve,Xe,qe,Oe,ue]);o.useEffect(()=>Qe(),[Qe]),o.useEffect(()=>{Ue.current=l},[l]),o.useEffect(()=>{ke.current=r},[r]),o.useEffect(()=>{if(l||q!=="active")return;const Y=B.current;if(!Y)return;let ce=null;const ee=requestAnimationFrame(()=>{try{const xe=Y.getTotalLength();if(!xe)return;const $e=xe*.2;Y.style.strokeDasharray=`${xe-$e} ${$e}`;const We="triFlow_"+Math.random().toString(36).slice(2);ce=document.createElement("style"),ce.textContent=`@keyframes ${We}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${xe}}}`,document.head.appendChild(ce),Y.style.animation=`${We} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(ee),ce?.remove()}},[q,l]),o.useEffect(()=>{me.current=P},[P]),o.useEffect(()=>{ie.current=S},[S]),o.useEffect(()=>{const Y=_.current,ce=k.current;if(!Y||!ce)return;let ee=null;const xe=32,$e=60,We=()=>{try{const ft=Array.from(Y.querySelectorAll(":scope > .button"));let ye=0;ft.forEach(Ie=>{if(Ie===ce)return;const Ye=Ie.getBoundingClientRect();ye+=Ye.width});const j=Y.getBoundingClientRect().width,X=Math.max(0,Math.floor(j-ye-8)),Ce=Bt;if(!Ce||X<=0){Array.from(ce.children).forEach(Ie=>{try{Ie.style.width=""}catch{}});return}let De=Math.floor(X/Ce);De>$e&&(De=$e),De<xe&&(De=Math.max(xe,Math.floor(X/Ce))),Array.from(ce.querySelectorAll(".button")).forEach(Ie=>{try{Ie.style.width=`${De}px`}catch{}})}catch{}},at=requestAnimationFrame(We);try{ee=new ResizeObserver(()=>{requestAnimationFrame(We)}),ee.observe(Y),ee.observe(ce),window.addEventListener("resize",We)}catch{}return()=>{try{cancelAnimationFrame(at)}catch{}try{ee&&(ee.disconnect(),ee=null)}catch{}try{window.removeEventListener("resize",We)}catch{}}},[P,W,Bt]),o.useEffect(()=>()=>{try{Ne.current&&(clearTimeout(Ne.current),Ne.current=null),He.current&&(clearTimeout(He.current),He.current=null)}catch{}},[]);const Ct=(Y,ce)=>{V(Y),oe(ce),mt(),G(Lx(Y)),me.current=Y},it=()=>{O("playMode"),M(0),Z(!0)},It=async(Y,ce)=>{Ze(!1),v.current=!1,St(Y,ce),await Lc(Y),await nt()!==!1&&(N(!1),it(),await ve(Y))},Gt=async(Y,ce=!1)=>{const ee=f.current;N(!0),R("measuring_duration");try{const xe=await Cs(Y,{timeoutMs:1e4,rejectOnError:!0});Ct([{src:Y,objectUrl:null,duration:xe}],xe),R("ready"),ce&&ee&&await It(ee,Y)}finally{v.current=!1,N(!1)}},An=async(Y,ce=!1)=>{const ee=f.current;N(!0),R("measuring_duration");try{const xe=await Promise.all(Y.map(We=>Cs(We,{timeoutMs:1e4})));if(!he.current)return;const $e=Y.map((We,at)=>({src:We,objectUrl:null,duration:xe[at]||0}));Ct($e,$x($e)),R("ready"),ce&&ee&&$e.length>0&&await It(ee,$e[0].src)}finally{v.current=!1,N(!1)}},Wt=async(Y=!1,ce=!0)=>{const ee=f.current,xe=t?Array.isArray(t)?t:[t]:[];if(!xe||xe.length===0||!xe.some(Boolean))return!1;if(v.current)return null;v.current=!0,ce&&N(!0),R("resolving");try{const $e=Rx(t,a,yl),We=[];let at=0;for(const ft of $e){let ye=ft.src??null,j=null;if(!ye&&ft.resolvedPath){try{R("getting_signed_url"),ye=await vl(ft.resolvedPath)}catch{ye=null}if(!he.current)return!1;if(!ye)try{R("downloading");const Ce=await xl(ft.resolvedPath);if(!he.current)return!1;if(Ce){const De=Ce instanceof Blob?Ce:new Blob([Ce]);j=g.track(URL.createObjectURL(De)),ye=j}}catch{R("error");try{Ee(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),O("active")}catch{}}}if(!ye)continue;let X=0;try{R("measuring_duration"),X=await Cs(ye,{timeoutMs:3e3})}catch{X=0}if(!he.current){if(j)try{URL.revokeObjectURL(j)}catch{}for(const Ce of We)if(Ce.objectUrl)try{URL.revokeObjectURL(Ce.objectUrl)}catch{}return!1}at+=X||0,We.push({...ft,src:ye,objectUrl:j,duration:X})}if(Ct(We,at),We.length>0&&Y&&ee){const ft=We[0];Ze(!1);try{g.keepOnly(We.map(ye=>ye.objectUrl))}catch{}if(R("ready"),v.current=!1,ft.src&&ee)try{if(St(ee,ft.src),await Lc(ee),await nt()===!1)return!1;ce&&N(!1),it(),ee&&await ve(ee)}catch{ce&&N(!1)}else ce&&N(!1);O("playMode"),M(0),Z(!0)}return We.length>0}finally{v.current=!1,ce&&N(!1),R($e=>$e==="ready"?"ready":"idle")}},Kt=async Y=>{const ce=ue.isRunning();if(Y.paused&&!ce){if(Be.current){await dt();return}const ee=ue.resume();if(ee){if(L("playing"),ee.phase==="tail"){ze(ee.elapsed);return}await ve(Y,3,50,ee.elapsed);return}await ve(Y),L("playing")}else ue.pause(),lt(),Y.pause(),L("paused"),ce&&(Oe(),gt())},kt=async()=>{const Y=f.current;if(!(!Y&&!Pe)){if(Pe){const ce=window.speechSynthesis;if(q==="active"){const ee=Na(),xe=Array.isArray(s)?s.filter(Boolean):s?[s]:[];if(ee&&xe.length>0){if(v.current)return;O("load"),N(!0),R("synthesizing"),v.current=!0;try{const $e=await Promise.all(xe.map(We=>Promise.resolve(ee(We))));$e.length>1?await An($e,!0):await Gt($e[0],!0)}catch{v.current=!1,N(!1),O("active"),ht(xe.length>0?xe:void 0)}return}ht(xe.length>0?xe:void 0);return}if(q==="playMode"){const ee=!!ce&&(ce.speaking||ce.paused)&&!(Y&&(Y.currentSrc||Y.getAttribute("src")));if(Y&&!ee){await Kt(Y);return}try{if(ce&&ce.paused)try{Re("tts"),ce.resume(),L("playing")}catch{}else try{ce.pause(),L("paused")}catch{}}catch{}}return}if(q==="active"){if(l&&Array.isArray(me.current)&&me.current.length>0){const ee=me.current[0];try{if(ee.src&&Y)try{St(Y,ee.src),it(),Y&&await ve(Y)}catch{}it();return}catch{}}O("load");let ce;try{ce=await Wt(!0)}catch{ce=!1}if(ce===!1&&he.current){try{Ee(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}O("active")}return}if(q!=="load"&&(q==="playMode"||q==="active"))try{Y&&await Kt(Y)}catch(ce){(ce instanceof Error||typeof ce=="object"&&ce&&"name"in ce)&&ce.name}}},dt=async()=>{const Y=f.current;if(Y)try{const ce=me.current;if(Array.isArray(ce)&&ce.length>1){await Zt(0);return}Ze(!1);try{Y.currentTime=0}catch{}Y&&await ve(Y),L("playing"),O("playMode")}catch{}},pt=()=>{lt(),ot(),Tt.current?.();const Y=f.current;try{if(Y){try{Y.pause()}catch{}try{Y.currentTime=0}catch{}}}catch{}gt(),L("stopped"),O("active"),J(0),Z(!1)},vt=async(Y,{sameSegment:ce=!1}={})=>{lt();const ee=ue.generation(),xe=f.current,$e=me.current?.[Y]?.src;try{if(Ze(!1),M(Y),Z(!0),ie.current=Y,!$e||!xe||(ce||mt(),St(xe,$e),!ce&&await nt()===!1)||!ue.isCurrent(ee)||(await ve(xe),!ue.isCurrent(ee)))return;L("playing"),O("playMode")}catch{}},Yt=async()=>{const Y=me.current,ce=ie.current||0;if(!Y||ce<=0){await dt();return}await vt(ce-1)},gn=async()=>{const Y=me.current,ce=ie.current||0;if(!Y||ce>=Y.length-1){pt();return}await vt(ce+1)},Nn=()=>{if(Be.current)return;const Y=200,ce=340;Ze(!0),lt(),ot();try{J(1)}catch{}ct(1);try{U("hold")}catch{}try{const ee=f.current,xe=Pe&&!!ee?.src;if(!Pe||xe){if(ee){ee.pause();try{ee.currentTime=0}catch{}}}else Et();gt()}catch{}try{L("stopped")}catch{}if(Z(!1),!Ue.current)try{He.current&&(clearTimeout(He.current),He.current=null),He.current=setTimeout(()=>{try{U("out")}catch{}He.current=setTimeout(()=>{try{typeof ke.current=="function"&&ke.current(!0)}catch{}try{U("idle")}catch{}He.current=null},ce)},Y)}catch{}};o.useEffect(()=>{_t.current=Nn});const tn=o.useCallback(()=>Ee(""),[]),Zt=async Y=>{(me.current||[])[Y]&&await vt(Y,{sameSegment:Y===ie.current})},Ht=K==="playing",bn=o.useMemo(()=>{if(!W||W.length<=1)return W;const Y=W[S];return Y?[Y]:W},[W,S]),Xt=l===!0;o.useEffect(()=>{try{const Y=f.current;Y&&typeof Y.playbackRate=="number"&&Je(Y)}catch{}},[de,Je]);const un=o.useRef({raf:null,timer:null});o.useEffect(()=>{const Y=f.current;if(!Y)return;const ce=Math.max(0,Math.min(1,ne)),ee=un.current,xe=()=>{ee.raf!==null&&(cancelAnimationFrame(ee.raf),ee.raf=null),ee.timer!==null&&(clearTimeout(ee.timer),ee.timer=null)};xe();const $e=tr(Y);if(Y.paused||Math.abs($e-ce)<.001||typeof requestAnimationFrame!="function"){try{On(Y,ce)}catch{}return}const We=performance.now(),at=()=>{const ft=Math.min(1,(performance.now()-We)/150);try{On(Y,$e+(ce-$e)*ft)}catch{}ee.raf=ft<1?requestAnimationFrame(at):null};return ee.raf=requestAnimationFrame(at),ee.timer=setTimeout(()=>{xe();try{On(Y,ce)}catch{}},200),xe},[ne]);const Ot=H==="hold",nn=H==="out",se=q==="playMode"&&!D&&!Se||Ot||nn,Ae=K!=="stopped"||Ot||nn,je=K==="paused",Ke=Math.max(0,Math.min(100,(T||0)*100)),Fe=we("audio-player__fill",se?"is-visible":"",Ae?"is-expanded":"",je?"is-paused":"",nn?"is-out":"");return n.jsxs("div",{className:`audio-player ${Xt?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof C=="string"?C:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${Ht?"is-playing":""} ${D?"is-loading":""} ${q!=="default"?"is-revealed":""}`,children:[D?n.jsxs("div",{className:"audio-player__loading",role:Mc[F]?"status":void 0,"aria-live":Mc[F]?"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,q==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:Xt,onClick:()=>{Q.current=gr(),E(),kt()},"aria-label":typeof C=="string"?C:p("training.listen","\uB4E3\uAE30"),onMouseEnter:A,onMouseLeave:E,onFocus:A,onBlur:E,children:n.jsx("span",{ref:y,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:B,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,w&&n.jsx(Dn,{anchorRect:w,text:typeof C=="string"&&C?C:p("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${q==="playMode"||Ht?"is-visible":""}`,inert:!(q==="playMode"||Ht)||void 0,children:[n.jsxs("div",{ref:_,className:"audio-player__buttons",children:[n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:Yt,ariaLabel:p("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:q!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:Ht?"pause":"play",onClick:kt,ariaLabel:p("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":Ht,width:"60px",variant:"transparent-white",disabled:q!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:pt,ariaLabel:p("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:q!=="playMode"}),Bt>1?n.jsx("div",{ref:k,className:"audio-player__source-buttons",children:Array.from({length:Bt}).map((Y,ce)=>n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(ce+1),onClick:()=>{try{Zt(ce)}catch{}},ariaLabel:p("training.sourcePlay",{n:ce+1}),variant:"transparent-white",selected:I&&S===ce,disabled:q!=="playMode"||!(Array.isArray(P)&&P[ce]),showTooltipInfo:!0},ce))}):null,!Array.isArray(P)||P.length<=1?n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:dt,ariaLabel:p("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:q!=="playMode"}):null,n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:gn,ariaLabel:p("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:q!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:Nn,ariaLabel:p("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:q!=="playMode"})]}),n.jsxs("div",{className:"audio-player__slider",children:[n.jsx("div",{className:Fe,ref:h,style:{left:`${Ke}%`},"aria-hidden":"true"}),(u||c)&&n.jsx(Fx,{segments:bn,progress:T,totalDuration:le,waveProgressRef:be,showSoundWaveForm:u,leadInMs:d,tailMs:m,trackDurationSec:P?.[S]?.duration??0,noiseSrc:c&&b?.settings.enabled&&z>0?et:null,noiseRatio:b?Ja(b.settings):0,noiseSpeed:b?.settings.speed??1,mainVolume:re,onReadyChange:rt})]})]}),n.jsx("audio",{ref:f,crossOrigin:"anonymous",preload:"auto"})]}),!u&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(tt,{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(ha,{message:pe,position:ge,onClose:tn})]})}function Ar(e){const{t}=_e.useTranslation(),{text:a,label:r,anchorRect:l=null,onClose:s,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:m,decrease:p,canIncrease:C,canDecrease:b,fontSize:x,lineHeight:f}=Mi({storageKey:"tooltip-fontScale"}),h=o.useCallback(()=>d(B=>B==="dark"?"light":"dark"),[]),_=o.useCallback(B=>{try{B.stopPropagation()}catch{}try{typeof s=="function"&&s()}catch{}},[s]),g=Array.isArray(a)?a:typeof a>"u"||a===null?[]:[a],k={fontSize:`${x}px`,lineHeight:`${f}px`,"--tt-line-height":`${f}px`,"--tt-marker-size":"28px"},v=n.jsxs("div",{className:`tooltip-textbox__root ${c==="dark"?"is-dark":""}`,children:[n.jsxs("div",{className:"tooltip-textbox__box",children:[r&&n.jsx("div",{className:"tooltip-textbox__label body-2b",children:r}),n.jsx("div",{className:"tooltip-textbox__text body-1",style:k,children:g.map((B,y)=>n.jsxs("div",{className:"tooltip-textbox__line",children:[g.length>1?n.jsx("div",{className:"tooltip-textbox__marker",children:n.jsx("span",{className:"tooltip-textbox__line-number button-1",children:y+1})}):null,n.jsx("span",{className:"tooltip-textbox__line-text",children:B})]},y))})]}),n.jsxs("div",{className:"tooltip-textbox__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:!b}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"plus",onClick:m,ariaLabel:t("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!C}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:c==="dark"?"moon":"sun-medium",onClick:h,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:_,ariaLabel:t("common.close","\uB2EB\uAE30"),variant:c==="dark"?"transparent-white":"transparent-gray"})]})]});return l?n.jsx(vn,{anchorRect:l,className:`tooltip-textbox ${c==="dark"?"is-dark":""}`,onClose:s,closeOnOutsideClick:i,isMobilePopup:u,ariaLabel:r||t("tooltip.textbox","\uBCF8\uBB38"),children:v}):n.jsx("div",{className:`tooltip-textbox ${c==="dark"?"is-dark":""}`,children:v})}function Rc({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(tt,{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 Pc(e,t,a){const r=o.useRef(t),l=o.useRef(a);o.useEffect(()=>{r.current=t,l.current=a}),o.useEffect(()=>{if(!e||typeof document>"u")return;let s=null,i=10;const u=()=>{s=null;const c=r.current(),d=c?Array.from(c.querySelectorAll(_n)).find(m=>!m.closest('[aria-hidden="true"]')):void 0;if(d){try{d.focus()}catch{}if(document.activeElement===d)return}--i>0&&(s=requestAnimationFrame(u))};return s=requestAnimationFrame(u),()=>{s!==null&&cancelAnimationFrame(s);const c=document.activeElement;if(!c||c===document.body||!document.contains(c)||c.closest(".tooltip-content")){const d=l.current();if(d)try{d.focus()}catch{}}}},[e])}function Ic({title:e,children:t,className:a="",state:r="disabled",usePreviewTextBtn:l=!1,onPreviewTextBtn:s,previewText:i=null,useFaded:u,usePlayAllBtn:c=!1,onPlayAll:d,playAllActive:m=!1}){const{t:p}=_e.useTranslation(),C=Cn("(max-width: 767px)"),b=`training-step__title h4 ${u&&r==="disabled"?"training-step__title--faded":""} ${a}`.trim(),x=`training-step__title-row training-step__title-row--${r}`.trim(),f=o.useRef(null),[h,_]=o.useState(!1),[g,k]=o.useState(null),[v,B]=o.useState(null);Pc(h&&!!g,()=>{if(typeof document>"u")return null;const D=Array.from(document.querySelectorAll(".tooltip-content"));for(let N=D.length-1;N>=0;N--)if(D[N].querySelector(".tooltip-textbox__root"))return D[N];return null},()=>f.current?.querySelector("button")??null);const y=o.useRef(s);o.useEffect(()=>{y.current=s});const w=o.useMemo(()=>i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)&&i.every(D=>typeof D=="string"||typeof D=="number")?i.join(""):"",[i]),A=o.useCallback(()=>{_(!1),k(null),B(null)},[]);o.useEffect(()=>{if(!h)return;let D;try{typeof y.current=="function"&&(D=y.current())}catch{}if(D===!1){A();return}B(typeof D<"u"&&D!==null?D:null)},[w]);const E=o.useCallback(()=>{let D;try{typeof s=="function"&&(D=s())}catch{}if(D!==!1){if(B(typeof D<"u"&&D!==null?D:i),!f.current){_(N=>!N);return}if(h)_(!1),k(null),B(null);else{const N=f.current.getBoundingClientRect();k(N),_(!0)}}},[s,i,h]);return n.jsxs("div",{className:x,children:[n.jsx("p",{className:b,children:n.jsx("span",{className:"training-step__title-text",children:e??t})}),l||c?n.jsxs("div",{className:"title-controls",children:[n.jsxs("div",{className:"title-buttons",children:[c&&n.jsx(fe,{htmlType:"button",size:32,type:C?"dot":"bar",icon:"play-circle",label:C?void 0:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),ariaLabel:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),selected:m,onClick:d,variant:r==="disabled"?"disabled":"default",disabled:r==="disabled"||m,onDisabledClick:m&&r!=="disabled"?()=>{}:void 0}),l&&n.jsx("div",{ref:f,children:n.jsx(fe,{htmlType:"button",size:32,type:C?"dot":"bar",icon:"eye",label:C?void 0:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),onClick:E,className:h?"is-selected":void 0,"aria-expanded":h,"aria-haspopup":"dialog",variant:r==="disabled"?"disabled":"default",disabled:!i&&typeof s!="function"})})]}),h&&n.jsx(Ar,{text:v??i,label:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:g,onClose:A,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function gs(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function ea({index:e,stepIndex:t,isLast:a=!1,title:r="",titleProps:l={},children:s,className:i="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:d}){const{t:m}=_e.useTranslation(),[p,C]=o.useState(()=>gs(e,t));o.useEffect(()=>{const y=gs(e,t);if(y!==p){const w=setTimeout(()=>C(y),0);return()=>clearTimeout(w)}},[e,t,p]);const b=o.useCallback((...y)=>{gs(e,t)==="done"||p==="done"||typeof u=="function"&&u(...y)},[e,t,p,u]),[x,f]=o.useState(!1),[h,_]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),g=o.useCallback(y=>{if(!y)return null;try{const w=y;if(typeof y=="object"&&(w.currentTarget||w.target)&&(w.nativeEvent||w.type)){const D=w.currentTarget??w.target;if(D&&typeof D.getBoundingClientRect=="function")return D.getBoundingClientRect()}if(y instanceof DOMRect)return y;const A=y;if(A&&typeof A.getBoundingClientRect=="function")return A.getBoundingClientRect();const E=y?.current;return E&&typeof E.getBoundingClientRect=="function"?E.getBoundingClientRect():null}catch{return null}},[]),k=o.useCallback((y,{text:w="",label:A="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:E=!1,alignX:D="center",alignY:N="top"}={})=>{const F=g(y);_({text:w,label:A,anchorRect:F,backdrop:E,alignX:D,alignY:N}),f(!0)},[g]),v=o.useCallback(()=>{f(!1),_(y=>({...y,anchorRect:null}))},[]),B=o.Children.map(s,y=>{if(o.isValidElement(y)){const w=y;if(typeof w.type=="string")return w;const A=w.props??{},E=typeof A.onDone=="function"?A.onDone:b,D=typeof A.disabled=="boolean";let N=p==="disabled";return D&&(N=!!A.disabled),o.cloneElement(w,{onDone:E,disabled:N,showTooltip:k,hideTooltip:v})}return y});return n.jsxs("div",{className:`training-step training-step--${p} ${a?"training-step--last":""} ${i}`,"aria-current":p==="active",children:[n.jsx(Rc,{state:p}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(Ic,{state:p,title:r,...l,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}),B]}),x?n.jsx(vn,{anchorRect:h.anchorRect,backdrop:h.backdrop,onClose:v,ariaLabel:m("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(Ar,{text:h.text,onClose:v})}):null]})}function Fc({context:e,state:t="disabled",theme:a="light"}){const{t:r}=_e.useTranslation(),[l,s]=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(R=>R==="dark"?"light":"dark"),{increase:d,decrease:m,canIncrease:p,canDecrease:C,fontSize:b,lineHeight:x}=Mi({storageKey:"textbox_fontScale"}),[f,h]=o.useState(""),_=o.useRef(null),g=o.useRef(!1),k=o.useCallback(()=>{g.current=gr()&&!!_.current&&_.current.contains(document.activeElement),s("active")},[]),v=o.useCallback(()=>h(""),[]),B=R=>{try{h(R)}catch{}},y=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(t!=="disabled"){const R=setTimeout(()=>s(t),0);return()=>clearTimeout(R)}},[t]);const w=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[A,E]=o.useState(w);A!==w&&(E(w),s("disabled"));const D=t==="disabled"?l:t,N=D==="disabled"?"training-text-box--disabled":D==="active"?"training-text-box--active":D==="done"?"training-text-box--done":"",F=o.useMemo(()=>({fontSize:`${b}px`,lineHeight:`${x}px`}),[b,x]);return o.useEffect(()=>{if(D==="disabled"||!g.current)return;g.current=!1;const R=document.activeElement;R&&R!==document.body||_.current?.querySelector(".training-text-box__buttons button")?.focus()},[D]),n.jsxs("div",{ref:_,className:`training-text-box ${N} ${D!=="disabled"&&i==="dark"?"is-dark":""}`,children:[D==="disabled"&&n.jsx("div",{className:"training-text-box__preview",children:n.jsx(fe,{htmlType:"button",size:48,type:"bar",onClick:k,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":D==="disabled",children:n.jsx("span",{className:"training-text-box__inner h3",style:F,children:w})}),D!=="disabled"&&n.jsxs("div",{className:"training-text-box__buttons","aria-hidden":D==="disabled",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:m,onDisabledClick:()=>B(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:!C,useBorder:!1,showTooltipInfo:!0,...!y&&{width:"60px"}}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:d,onDisabledClick:()=>B(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,...!y&&{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(ha,{message:f,position:"top",onClose:v})]})}function ta(e){return e==="active"||e==="done"}function bs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:l,useTitleFaded:s,onDone:i,onChange:u,answer:c,wrongAnswers:d,choices:m,multiSelect:p=!1,correctCount:C=0,useDisabledCovered:b=!1,choiceIcons:x,shuffleChoices:f=!0}){const{t:h}=_e.useTranslation(),_=l??h("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),g=typeof e=="number"?e:-1,k=typeof t!="number"?"disabled":g<t?"done":g===t?"active":"disabled",v=Array.isArray(m)&&m.length?m:typeof c<"u"?[c].concat(Array.isArray(d)?d:[]):void 0,B=d?d.join("||"):"",y=m?m.join("||"):"",[w,A]=o.useState(()=>Array.isArray(v)?f?Ta(v):v.slice():void 0);o.useEffect(()=>{Array.isArray(v)&&v.length?A(f?Ta(v):v.slice()):A(void 0)},[c,B,y,f]);const[E,D]=o.useState(null),[N,F]=o.useState(()=>new Set);o.useEffect(()=>{D(null),F(new Set)},[y,c,B]);const R=o.useRef(void 0);o.useEffect(()=>{const $=R.current;typeof $=="number"&&typeof t=="number"&&typeof e=="number"&&$>=e&&t<e&&(D(null),F(new Set)),R.current=t},[t,e]);const K=o.useCallback($=>{if(!ta(k))return;const T=w?.[$];if(T==null)return;const J=T;if(p){const q=new Set(N);q.has(J)?q.delete(J):q.add(J),F(q),typeof u=="function"&&u({selectedValues:[...q],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...q],__ts:Date.now()})}else D(J),typeof u=="function"&&u({selectedIndex:$,selectedValue:J,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:$,selectedValue:J,__ts:Date.now()})},[w,k,p,u,N]),L=`training-step__buttons${Array.isArray(w)&&w.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:_,useTitleFaded:s,children:n.jsx("div",{className:L,children:Array.isArray(w)&&w.length>0?w.map(($,T)=>n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:()=>K(T),ariaLabel:String($),label:$,useLabel:!0,icon:x?x[String($)]:void 0,variant:"default",disabled:k==="disabled",selected:p?N.has($):E===$,useDisabledCovered:b,minWidth:0},String($))):null})})}function ys({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:l,onDone:s,onChange:i,context:u,demoSelected:c}){const{t:d}=_e.useTranslation(),m=l??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,C=typeof t!="number"?"disabled":p<t?"done":p===t?"active":"disabled",b=u&&typeof u=="object"?u.sentence||"":typeof u=="string"?u:"",x=u&&typeof u=="object"?u.choices:void 0,[f,h]=o.useState(c??null),_=`${String(b)}\0${JSON.stringify(x??null)}`,[g,k]=o.useState(_);g!==_&&(k(_),c==null&&h(null));const[v,B]=o.useState(c);Object.is(v,c)||(B(c),h(c??null));const y=o.useRef(void 0);o.useEffect(()=>{const D=y.current;typeof D=="number"&&typeof t=="number"&&typeof e=="number"&&D>=e&&t<e&&c==null&&h(null),y.current=t},[t,e,c]);const w=o.useCallback(D=>{const N=typeof D=="object"&&D!==null?Object.assign({},D,{__ts:Date.now()}):{value:D,__ts:Date.now()};typeof i=="function"&&i(N),ta(C)&&typeof s=="function"&&s(N)},[i,C,s]),A=o.useCallback(()=>{ta(C)&&(h(!1),w(!1))},[w,C]),E=o.useCallback(()=>{ta(C)&&(h(!0),w(!0))},[w,C]);return n.jsxs(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:m,onDone:s,useTitleFaded:!1,children:[n.jsx(Fc,{context:u,state:C}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(x)&&x.length>0?x.slice(0,6).map((D,N)=>n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:()=>{ta(C)&&(h(N),w&&w(N))},disabled:C==="disabled",ariaLabel:String(D),label:D,variant:C,selected:f===N},N)):n.jsxs(n.Fragment,{children:[n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:A,disabled:C==="disabled",icon:"x",ariaLabel:d("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),label:d("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:f===!1}),n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:E,disabled:C==="disabled",icon:"circle",ariaLabel:d("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),label:d("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:f===!0})]})})]})}function vs({index:e,stepIndex:t,isLast:a=!1,title:r,onDone:l,btnLabel:s,soundSrc:i,bucketPath:u,usePreviewTextBtn:c,previewText:d=null,onPreviewTextBtn:m,disabled:p,_pageIndex:C,showSoundWaveForm:b,showNoiseWaveForm:x,leadInMs:f,tailMs:h}){const{t:_}=_e.useTranslation(),g=r??_("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),k=p??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(ea,{index:e,stepIndex:t,isLast:a,title:g,onDone:l,titleProps:{usePreviewTextBtn:c,previewText:d,onPreviewTextBtn:m},children:n.jsx(fs,{soundSrc:i,ttsText:i?null:d??g,bucketPath:u,btnLabel:s||_("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:k,className:"training-step__listen-sticky",showSoundWaveForm:b,showNoiseWaveForm:x,leadInMs:f,tailMs:h},`audio-p${C??0}-s${e}`)})}const Kx=[];function xs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:l,onDone:s,onChange:i,context:u=Kx}){const{t:c}=_e.useTranslation(),d=l??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),m=G=>typeof G=="string"?G:G&&(G.context||G.sentence||G.question||"")||"",[p,C]=o.useState(Array.isArray(u)?u:[]),[b,x]=o.useState(()=>(p||[]).map((G,S)=>({id:S,text:m(G)}))),f=o.useMemo(()=>typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled",[t,e]),h=f!=="disabled",_=o.useRef(void 0),g=o.useRef(void 0);o.useEffect(()=>{if(_.current===u)return;_.current=u;const G=Array.isArray(u)?u:[];C(G);const S=(M=>{const I=(M||[]).map((de,re)=>({id:re,text:m(de)}));if(I.length<=1)return I;const Z=(de,re)=>{if(de.length!==re.length)return!1;for(let z=0;z<de.length;z++)if(de[z].text!==re[z].text)return!1;return!0};let le=Ta(I),oe=0;for(;Z(le,I)&&oe<20;)le=Ta(I),oe+=1;return le})(G);x(S);try{if(typeof i=="function"){const M=S.filter((I,Z)=>I.text===m(G[Z])).length;i({shuffled:S,score:M,total:(G||[]).length,initial:!0,__ts:Date.now()})}if(typeof s=="function"&&f==="active"){const M=S.filter((I,Z)=>I.text===m(G[Z])).length;g.current=u,s({shuffled:S,score:M,total:(G||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(f!=="active"||g.current===u||(g.current=u,typeof s!="function"))return;const G=Array.isArray(u)?u:[],S=b.filter((M,I)=>M.text===m(G[I])).length;s({shuffled:b,score:S,total:G.length,initial:!0,__ts:Date.now()})},[f,u]);const k=(G,S)=>{const M=[...b],I=G+S;if(I<0||I>=M.length)return;const Z=M[I];M[I]=M[G],M[G]=Z,J(M);try{if(typeof s=="function"&&f==="active"){const le=M.filter((oe,de)=>oe.text===m(p[de])).length;s({shuffled:M,score:le,total:(p||[]).length,__ts:Date.now()})}}catch{}},[v,B]=o.useState(null),y=o.useRef(null),w=o.useRef(null),A=o.useRef(null),E=o.useRef(null),D=o.useRef(null),N=o.useRef({x:0,y:0}),F=o.useRef(null),R=o.useRef({dx:0,dy:0}),K=()=>{if(F.current!==null)return;const G=()=>{if(!y.current){F.current=null;return}F.current=requestAnimationFrame(G);const S=N.current,M=R.current||{dx:0,dy:0};y.current&&(y.current.style.transform=`translate3d(${S.x-M.dx}px, ${S.y-M.dy}px, 0)`)};F.current=requestAnimationFrame(G)},L=o.useRef(new Map),$=o.useRef(new Map),T=()=>{const G=new Map;return L.current.forEach((S,M)=>{S&&S.getBoundingClientRect&&G.set(M,S.getBoundingClientRect())}),G},J=G=>{const S=T();x(G);try{if(typeof i=="function"){const M=G.filter((I,Z)=>I.text===m(p[Z])).length;i({shuffled:G,score:M,total:(p||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const M=T();G.forEach(I=>{const Z=S.get(I.id),le=M.get(I.id),oe=L.current.get(I.id);if(!oe||!Z||!le)return;const de=Z.top-le.top;de&&(oe.style.transition="none",oe.style.transform=`translateY(${de}px)`,requestAnimationFrame(()=>{oe.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",oe.style.transform="";const re=()=>{oe.style.transition="",oe.removeEventListener("transitionend",re)};oe.addEventListener("transitionend",re)}))})})},q=(G,S)=>{try{try{S.dataTransfer?.setData("text/plain",String(G))}catch{}try{S.dataTransfer&&(S.dataTransfer.effectAllowed="move")}catch{}try{const M=document.createElement("div");M.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(M),S.dataTransfer?.setDragImage(M,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(M)}catch{}})}catch{}}catch{}B(G);try{const M=b[G],I=document.createElement("div");I.className="order-list__dragging-object order-list__dragging-object--visible",I.textContent=M&&M.text?M.text:"",document.body.appendChild(I),y.current=I;const Z=L.current.get(M.id);let le=S.clientX||0,oe=S.clientY||0;try{if(Z&&Z.getBoundingClientRect){const U=Z.getBoundingClientRect();le=U.left+U.width/2,oe=U.top+U.height/2}}catch{}const de=I.getBoundingClientRect(),re=de.width/2,z=de.height/2;R.current={dx:re,dy:z},I.style.transition="none",N.current={x:le,y:oe},I.style.transform=`translate3d(${le-re}px, ${oe-z}px, 0)`,requestAnimationFrame(()=>{try{I.style.transition=""}catch{}K()});const ne=U=>{const pe=U;N.current={x:pe.clientX,y:pe.clientY},K()};A.current=ne,document.addEventListener("mousemove",ne);const H=U=>{const pe=U;N.current={x:pe.clientX,y:pe.clientY},K()};w.current=H,document.addEventListener("dragover",H);try{S.dataTransfer?.setData("text/plain",String(G));try{S.dataTransfer?.setData("application/json",JSON.stringify({idx:G}))}catch{}}catch{}}catch{}},O=(G,S)=>{S.preventDefault();try{S.dataTransfer&&(S.dataTransfer.dropEffect="move")}catch{}try{D.current!==null&&(clearTimeout(D.current),D.current=null);const M=S.currentTarget&&S.currentTarget.closest?S.currentTarget.closest(".order-list__item"):null;if(M&&E.current!==M){if(E.current)try{E.current.classList.remove("drag-over")}catch{}try{M.classList.add("drag-over")}catch{}E.current=M}}catch{}},Q=(G,S)=>{S.preventDefault();const M=S.dataTransfer?.getData("text/plain")||"",I=M?parseInt(M,10):v,Z=G;if(typeof I!="number"||isNaN(I)||I===Z){B(null),W(),P();return}const le=gf(b,I,Z);J(le),B(null),P();try{if(typeof s=="function"&&f==="active"){const oe=le.filter((de,re)=>de.text===m(p[re])).length;s({shuffled:le,score:oe,total:(p||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const oe=document.querySelectorAll(".order-list .order-list__item")[Z];if(!oe)return;const de=oe.querySelector(".order-list__slot")||oe;try{de.classList.add("pulse"),de.offsetHeight,de.classList.add("to-dark");const re=()=>{de.classList.remove("pulse","to-dark"),de.removeEventListener("transitionend",re)};de.addEventListener("transitionend",re)}catch{}})}catch{}W()},P=()=>{if(y.current){try{document.body.removeChild(y.current)}catch{}y.current=null}w.current&&(document.removeEventListener("dragover",w.current),w.current=null),A.current&&(document.removeEventListener("mousemove",A.current),A.current=null),F.current!==null&&(cancelAnimationFrame(F.current),F.current=null)},V=()=>{B(null),W(),P()};o.useEffect(()=>()=>P(),[]);const W=()=>{try{if(D.current!==null&&(clearTimeout(D.current),D.current=null),E.current){try{E.current.classList.remove("drag-over")}catch{}E.current=null}document.querySelectorAll(".order-list .order-list__item").forEach(G=>G.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const G=Math.max(1,(b||[]).length);b.forEach((S,M)=>{const I=$.current.get(S.id);if(!I)return;let Z=50;G>1&&(Z=Math.round(M/(G-1)*100));try{I.style.setProperty("--marker-pos",Z+"%")}catch{}})}catch{}},[b]),o.useEffect(()=>()=>{P(),D.current!==null&&(clearTimeout(D.current),D.current=null)},[]),n.jsx(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:d,children:n.jsx("div",{className:"order-list",children:b.map((G,S)=>{const M=Math.max(1,(b||[]).length),I=M>1?Math.round(S/(M-1)*100):50;return n.jsx("div",{className:"order-list__item",children:n.jsxs("div",{className:"order-list__slot","data-disabled":f==="disabled","aria-disabled":f==="disabled",children:[f!=="disabled"?n.jsx("div",{className:"order-list__marker caption-1",style:{"--marker-pos":I+"%"},ref:Z=>{const le=$.current;Z?le.set(G.id,Z):le.delete(G.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:S+1})}):null,n.jsxs("div",{ref:Z=>{const le=L.current;Z?le.set(G.id,Z):le.delete(G.id)},className:`order-list__draggable ${v===S?"dragging":""}`,"data-disabled":f==="disabled","aria-disabled":f==="disabled",tabIndex:f==="disabled"?-1:0,draggable:h,onDragStart:h?Z=>q(S,Z):void 0,onDragEnter:h?Z=>O(S,Z):void 0,onDragOver:h?Z=>O(S,Z):void 0,onDragLeave:h?()=>{try{D.current!==null&&clearTimeout(D.current),D.current=setTimeout(()=>{try{const Z=document.querySelectorAll(".order-list .order-list__item");Z&&Z[S]&&(Z[S].classList.remove("drag-over"),E.current===Z[S]&&(E.current=null))}catch{}},80)}catch{}}:void 0,onDrop:h?Z=>Q(S,Z):void 0,onDragEnd:h?V:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:G.text}),h?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:()=>k(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:()=>k(S,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:S===b.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},G.id)})})})}const Yx=8e3;function Zx(e,t){return new Promise(a=>{let r=!1;const l=()=>{r||(r=!0,a())};e.then(l,l),setTimeout(l,t)})}function Oc({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:l,onDone:s,onChange:i,context:u=[],selectable:c=!1,hideLabel:d=!1,hideAudio:m=!1,maxCards:p,playAllGapMs:C=0}){const{t:b}=_e.useTranslation(),x=l??b("training.cardInstructions","\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694."),f=o.useMemo(()=>Array.isArray(u)?u:u&&u.items||[],[u]),h=p??3,_=(f||[]).slice(0,h);(f||[]).length>h&&console.warn(`TrainingStepCard: ${f.length} items passed but only ${h} shown`);const g=typeof e=="number"?e:-1,k=typeof t!="number"?"disabled":g<t?"done":g===t?"active":"disabled",[v,B]=o.useState(null),y=o.useRef([]),[w,A]=o.useState(!1),E=o.useRef(null),D=o.useRef(!0);o.useEffect(()=>(D.current=!0,()=>{D.current=!1}),[]);const N=o.useMemo(()=>f.map(T=>T?.id??T?.word??"").join("|"),[f]);o.useEffect(()=>{B(null)},[N]);const F=o.useRef(void 0);o.useEffect(()=>{const T=F.current;typeof T=="number"&&typeof t=="number"&&typeof e=="number"&&T>=e&&t<e&&B(null),F.current=t},[t,e]);const R=o.useCallback((T,J)=>{if(c)return;const q={item:T,index:J,__ts:Date.now()};try{typeof i=="function"&&i(q)}catch{}if(k==="active"&&typeof s=="function")try{s(q)}catch{}},[c,i,k,s]),K=o.useRef(C);o.useEffect(()=>{K.current=Math.max(0,C||0)},[C]);const L=o.useCallback(async()=>{if(w||k==="disabled")return;A(!0);let T=!1;const J=new Promise(q=>{E.current=()=>{T=!0,q()}});try{for(let q=0;q<_.length&&!(!D.current||T);q++){const O=y.current[q];if(!O)continue;await Promise.race([Zx(O.play(),Yx),J]);const Q=Math.max(0,K.current||0);Q>0&&q<_.length-1&&!T&&D.current&&await Promise.race([new Promise(P=>{setTimeout(P,Q)}),J])}}finally{E.current=null,A(!1)}},[w,k,_.length]),$=o.useCallback((T,J)=>{if(!ta(k))return;B(J);const q={selectedValue:T.word||T.title||"",selectedIndex:J,item:T,__ts:Date.now()};try{typeof i=="function"&&i(q)}catch{}if(typeof s=="function")try{s(q)}catch{}},[i,k,s]);return n.jsx(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:x,onDone:s,titleProps:{usePlayAllBtn:!m&&_.length>0,onPlayAll:L,playAllActive:w},children:n.jsx("div",{className:"training-step__cards",onClickCapture:T=>{const J=E.current;if(!J)return;const q=T.target;q&&typeof q.closest=="function"&&q.closest(".training-word-card__bottom")&&J()},children:_.length===0?n.jsx("div",{className:"training-step__empty",children:b("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):_.map((T,J)=>n.jsx(Jo,{ref:q=>{y.current[J]=q},item:T,disabled:k==="disabled",onPlayDone:()=>R(T,J),selectable:c,selected:c&&v===J,onSelect:c?()=>$(T,J):void 0,flipDelay:J*120,hideLabel:d,hideAudio:m},T&&T.id||J))})})}const Xx=160,zc=()=>{};function $n(e){const t=o.useId();if(!("variant"in e)){const{label:g,sub:k,onClick:v,children:B,align:y="horizontal",icon:w,useFullWidth:A=!1}=e,E=D=>{v&&D.target===D.currentTarget&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),v())};return n.jsxs("div",{className:we("panel-row",y==="vertical"?"panel-row--vertical":"",A?"panel-row--label-fixed panel-row--fill":"",v?"panel-row--clickable":""),onClick:v,onKeyDown:v?E:void 0,role:v?"button":void 0,tabIndex:v?0:void 0,children:[w!=null&&n.jsx("div",{className:"panel-row__icon",children:w}),g!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsx("div",{className:"panel-row__label body-3",children:g}),k&&n.jsx("div",{className:"panel-row__sub caption-1",children:k})]}),n.jsx("div",{className:"panel-row__right",children:B})]})}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(Ga,{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:l,onClick:s,required:i,error:u,align:c="horizontal",useFullWidth:d=!1,icon:m}=e,p=a==="button"?void 0:s;let C=null;const b=a==="toggle"?`panel-toggle-${t}`:void 0,x=u?`panel-error-${t}`:void 0,f=`panel-helper-${t}`;if(a==="toggle"){const g=e;C=n.jsx(vu,{checked:g.checked,onChange:g.onChange,id:b})}else if(a==="segmented"){const g=e;C=n.jsx(wn,{options:g.options,value:g.value,onChange:g.onChange,size:g.size??40,ariaLabel:r})}else if(a==="dropdown"){const g=e,k=g.dropdowns?.length?n.jsx("div",{className:`panel-row__dropdown-group${d?" panel-row__dropdown-group--full":""}`,children:g.dropdowns.map((v,B)=>n.jsx("div",{className:d?"panel-row__dropdown-item--full":void 0,children:n.jsx(fn,{options:v.options,value:v.value,onChange:v.onChange,placeholder:v.placeholder,block:d,error:!!u,ariaDescribedBy:x,ariaLabel:v.ariaLabel??([r,v.placeholder].filter(Boolean).join(" ")||void 0)})},B))}):n.jsx(fn,{options:g.options??[],value:g.value??"",onChange:g.onChange??zc,block:d,error:!!u,ariaLabel:r,ariaDescribedBy:x});C=u?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[k,n.jsx("span",{id:x,className:"caption-1 panel-row__error",role:"alert",children:u})]}):k}else if(a==="button"){const g=e;g.buttons?.length?C=n.jsx("div",{className:"panel-row__button-group",children:g.buttons.map((k,v)=>n.jsx(fe,{htmlType:"button",size:k.btnSize??40,variant:k.btnVariant??"default",disabled:k.disabled,onClick:k.onClick,children:k.label},v))}):C=n.jsx(fe,{htmlType:"button",size:g.btnSize??40,variant:g.btnVariant??"default",disabled:g.disabled,onClick:g.onClick,children:g.buttonLabel})}else if(a==="text"){const g=e;C=n.jsx("span",{className:`panel-row__text body-2${d?" panel-row__text--full":""}`,style:g.valueColor?{color:g.valueColor}:void 0,children:g.value})}else if(a==="input"){const g=e;C=n.jsxs("div",{className:`panel-row__input-wrap${d?" panel-row__input-wrap--full":""}`,children:[n.jsx(Xn,{value:g.value,onChange:g.onChange??zc,onKeyDown:g.onKeyDown,onEnter:g.onEnter,placeholder:g.placeholder,ghostText:g.ghostText,inputMode:g.inputMode,readOnly:g.readOnly,disabled:g.disabled,type:g.type,autoComplete:g.autoComplete,maxLength:g.maxLength,showCount:g.showCount,multiline:g.multiline,rows:g.rows,fullWidth:d,error:u,ariaLabel:r,required:i,ariaDescribedBy:g.helperText?f:void 0}),g.helperText&&n.jsx("div",{id:f,className:"panel-row__helper caption-1",children:g.helperText})]})}else a==="custom"&&(C=e.children);u&&a!=="input"&&a!=="dropdown"&&(C=n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[C,n.jsx("span",{id:x,className:"caption-1 panel-row__error",role:"alert",children:u})]}));const h=a==="input"||a==="dropdown"||(a==="text"||a==="custom")&&d,_=g=>{p&&g.target===g.currentTarget&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),p())};return n.jsxs("div",{className:we("panel-row",c==="vertical"?"panel-row--vertical":"",h?"panel-row--label-fixed":"",a==="text"?"panel-row--text":"",p?"panel-row--clickable":""),onClick:p,onKeyDown:p?_:void 0,role:p?"button":void 0,tabIndex:p?0:void 0,children:[m!=null&&n.jsx("div",{className:"panel-row__icon",children:m}),n.jsxs("div",{className:"panel-row__left",children:[b?n.jsxs("label",{htmlFor:b,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:"*"})]}),l&&n.jsx("div",{className:"panel-row__sub caption-1",children:l})]}),n.jsx("div",{className:"panel-row__right",children:C})]})}function Wc(e){const t=e.productName||e.brand,a=[e.brand,e.fitType].filter(r=>!!r&&r!==t);return[...new Set(a)].join(" \xB7 ")}function Jx({devices:e,onRelease:t,emptyLabel:a}){const{t:r,i18n:l}=_e.useTranslation();return n.jsx("div",{className:"panel-row panel-row--device",children:["left","right"].map(s=>{const i=e[s],u=s==="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(s)})]}),i?n.jsxs("div",{className:"panel-row__device-info",children:[n.jsxs("span",{className:"panel-row__device-kind",children:[i.device&&n.jsx($t,{size:"small",variant:zu(i.device),fill:"soft",label:Wu(i.device,r)}),Wc(i)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:Wc(i)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),Yo(i.wornYear,i.wornMonth,i.wornDay,l.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:r("customers.device.wornSince",{date:Yo(i.wornYear,i.wornMonth,i.wornDay,l.language)})})]}):n.jsx("span",{className:"panel-row__device-empty body-3",children:a??r("customers.device.notRegistered","\uBBF8\uB4F1\uB85D")})]},s)})})}function Nr({title:e,titleLevel:t=2,icon:a,disc:r,actions:l,size:s="medium",minHeight:i,maxWidth:u,className:c,scrollable:d,scrollbarGutter:m="auto",compactRows:p=!1,useBorder:C=!0,useBg:b=!0,useRowBorder:x=!0,labelWidth:f,form:h=!1,loading:_,empty:g,children:k}){const v=we("panel",`panel--${s}`,h?"panel--form":"",i!==void 0?"panel--fill":"",C?"":"panel--no-border",b?"":"panel--no-bg",x?"":"panel--no-row-border",p?"panel--compact-rows":"",c),B={};i!==void 0&&(B.minHeight=i),u!==void 0&&(B.maxWidth=typeof u=="number"?`${u}px`:u),f!==void 0&&(B["--panel-label-width"]=typeof f=="number"?`${f}px`:f);const y=t?`h${t}`:"div";return n.jsxs("div",{className:v,style:Object.keys(B).length?B:void 0,children:[(!!e||r!=null)&&n.jsxs("div",{className:we("panel__header",r!=null?"panel__header--with-disc":""),children:[a&&n.jsx(tt,{icon:a,label:typeof e=="string"?e:void 0,className:"panel__icon"}),n.jsxs("div",{className:"panel__title-group",children:[!!e&&n.jsx(y,{className:`panel__title ${r!=null?"body-3b":"h5b"}`,children:e}),r!=null&&n.jsx("p",{className:"panel__disc caption-1",children:r})]}),l&&n.jsx("div",{className:"panel__actions",children:l})]}),_?n.jsx($n,{variant:"loading"}):g!=null&&o.Children.toArray(k).length===0?n.jsx($n,{variant:"empty",children:g}):d?n.jsx("div",{className:we("panel__body--scroll",m==="stable"&&"panel__body--gutter-stable"),children:k}):k]})}function Qx({cols:e=2,layout:t="grid",gap:a=1,collapseAt:r,className:l,style:s,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 C=new ResizeObserver(([b])=>d(b.contentRect.width));return C.observe(p),()=>C.disconnect()},[r]);const m=r!==void 0&&c!==void 0&&c<=r;return n.jsx("div",{ref:u,className:we("panel-grid",t==="columns"&&"panel-grid--columns",l),style:{"--panel-grid-cols":m?1:e,"--panel-grid-gap":typeof a=="number"?`${a}px`:a,...s},children:i})}function e_(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 Hc(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"}]}e_(Vt.t.bind(Vt)),Hc(Vt.t.bind(Vt));const Er="none",t_=.5,n_=1.5,a_=.25;function _s({title:e,valueLabel:t,value:a,min:r,max:l,step:s,tickStep:i,size:u,disabled:c,onChange:d}){return n.jsxs($n,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(Lu,{value:a,onChange:d,min:r,max:l,step:s,size:u,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:c,className:"noise-settings__slider-input"}),n.jsx("div",{className:we("noise-settings__value","button-1",c?"noise-settings__value--disabled":""),children:t})]})}function Vc({anchorRect:e,onClose:t,hideNoiseRows:a=!1}){const{t:r}=_e.useTranslation(),l=Cn("(max-width: 767px)")?40:24,s=_r(),i=Ja(s?.settings??Qn),u=s?.settings.type??"defaultNoise",c=s?.settings.enabled??!0,d=s?.playbackRate??1,m=s?.mainVolume??1,p=Math.round(m*100),C=o.useCallback(_=>{try{s?.setMainVolume(Math.max(0,Math.min(1,_/100)))}catch{}},[s]),b=o.useCallback(_=>{try{s?.setPlaybackRate(_)}catch{}},[s]),x=o.useCallback(_=>{const g=Math.min(Xa,Math.max(0,Math.round(_*10)/10));try{s?.setSettings({noiseRatio:g})}catch{}},[s]),f=o.useCallback(_=>{try{_===Er?s?.setSettings({enabled:!1}):s?.setSettings({type:_,enabled:!0})}catch{}},[s]),h=[{key:Er,label:r("training.noise.type.none","\uC5C6\uC74C")},...Hc(r).map(_=>({key:_.value,label:_.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:"noise-settings__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(Nr,{className:"noise-settings",useBorder:!1,labelWidth:72,children:[n.jsx(_s,{title:r("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${p}%`,value:p,min:0,max:100,step:10,size:l,onChange:C}),n.jsx(_s,{title:r("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${d.toFixed(2)}x`,value:d,min:t_,max:n_,step:a_,size:l,onChange:b}),!a&&n.jsxs(n.Fragment,{children:[n.jsx($n,{variant:"custom",label:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(wn,{ariaLabel:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:h,value:c?u:Er,onChange:f})}),n.jsx(_s,{title:r("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:r("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:Xa,step:wc,size:l,disabled:!c,onChange:x})]}),a&&n.jsx("div",{className:"noise-settings__width-ghost","aria-hidden":"true",inert:!0,children:n.jsx($n,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(wn,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:h,value:Er,onChange:()=>{}})})})]})})}function qc({useNoiseSettingBtn:e=!1,onSettings:t,onNext:a,onResult:r,stepIndex:l=0,stepCount:s=0,pageIndex:i=0,pageCount:u=1,resultOpen:c=!1,hideNoiseRows:d=!1}){const{t:m}=_e.useTranslation(),[p,C]=o.useState(!1),[b,x]=o.useState(null),[f,h]=o.useState(!1),_=o.useRef(null),g=o.useRef(null),k=_r(),v=u>0,B=v&&i<u-1,y=!v||i>=u-1,w=l===Math.max(0,s);o.useEffect(()=>{e||(C(!1),x(null))},[e]);const A=o.useCallback(()=>{C(!1),x(null)},[]),E=o.useCallback(()=>{if(p){C(!1),x(null);return}const J=_?.current?.getBoundingClientRect();J&&x(J),t?.(),C(!0)},[p,t]),D=o.useCallback(()=>{if(p){C(!1),x(null);return}const J=g?.current?.getBoundingClientRect();J&&x(J),t?.(),C(!0)},[p,t]),N=Cn("(max-width: 767px)"),F=o.useRef(null),[R,K]=o.useState(null),L=o.useCallback(()=>{h(J=>{const q=!J;return K(q?F.current?.getBoundingClientRect()??null:null),q})},[]),$=o.useCallback(()=>{h(!1),K(null)},[]);o.useEffect(()=>{c&&(h(!1),K(null))},[c]);const T=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:m("training.meter.sentence","\uC7AC\uC0DD")}),n.jsx(Uo,{analyser:k?.mainAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:m("training.meter.sentence","\uC7AC\uC0DD")})]}),n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:m("training.meter.noise","\uC18C\uC74C")}),n.jsx(Uo,{analyser:k?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:m("training.meter.noise","\uC18C\uC74C")})]})]});return Pc(e&&p,()=>typeof document<"u"?document.querySelector(".noise-settings__header")?.closest(".tooltip-content")??null:null,()=>[_.current,g.current].map(J=>J?.querySelector("button")??null).find(J=>!!J&&J.getClientRects().length>0)??_.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:_,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:E,className:p?"is-selected":void 0,"aria-expanded":p,"aria-haspopup":"dialog",ariaLabel:m("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),label:m("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),minWidth:140})})}),n.jsx("div",{className:"pp-bottom__settings--mobile",children:n.jsx("div",{ref:g,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:56,type:"dot",shape:"pill",icon:"settings",onClick:D,className:p?"is-selected":void 0,"aria-expanded":p,"aria-haspopup":"dialog",ariaLabel:m("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:F,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:L,selected:f,"aria-expanded":N?f:void 0,ariaLabel:m("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&f&&!N&&n.jsx("div",{className:"pp-bottom__meters",children:T})]}),e&&f&&N&&R&&n.jsx(vn,{anchorRect:R,onClose:$,ariaLabel:m("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"),children:n.jsx("div",{className:"pp-bottom__meters pp-bottom__meters--floating",children:T})}),n.jsxs("div",{className:"pp-bottom__right",children:[y&&n.jsx(fe,{htmlType:"button",size:56,type:"bar",icon:"check",onClick:typeof r=="function"?r:a,ariaLabel:m("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),label:m("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),variant:"main",disabled:!w}),B&&n.jsx(fe,{htmlType:"button",size:56,type:"bar",rightIcon:"chevron-right",align:"right",onClick:a,ariaLabel:m("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),label:m("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),variant:"main",disabled:!w})]}),e&&p&&n.jsx(Vc,{anchorRect:b,onClose:A,hideNoiseRows:d})]})}function Uc({title:e,subtitle:t,desc:a,depth:r,icon:l,wrapperStyle:s,iconTooltip:i,pageIndex:u,pageCount:c,progressMax:d,progressIndex:m,onBack:p,onClose:C}){const{t:b}=_e.useTranslation(),x=Cn("(max-width: 767px)"),f=Number.isInteger(m)?m:u||0,h=Number.isInteger(d)?d:c||0,_=p||C,g=Array.isArray(r)?x?r[r.length-1]:r.join(" / "):r,k=typeof e=="string"?e.trim():e,v=typeof t=="string"?t.trim():t,B=!!(k||v),y=B?k||v:b("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),w=g||(k?t:void 0),A=x&&typeof w=="string"&&(w.includes(" \xB7 ")||w.includes(" / "))?w.split(/\s[·/]\s/).pop():w,E=o.useMemo(()=>{const D=s&&typeof s=="object"?{...s}:{};return!("width"in D)&&!("height"in D)&&(D.width="40px",D.height="40px"),D},[s]);return n.jsxs("header",{className:"pp-title training-popup-title",children:[n.jsxs("div",{className:"pp-title__left",children:[_?n.jsx(fe,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:b("common.back","\uB4A4\uB85C"),onClick:_,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:l?n.jsx(du,{icon:l,label:e,tooltip:i,wrapperStyle:E}):null}),n.jsxs("div",{className:"pp-title__text",children:[A?n.jsx("span",{className:"pp-title__depth caption-1",children:A}):null,n.jsx("span",{className:`pp-title__title h2${B?"":" pp-title__title--empty"}`,children:y}),a?n.jsx("span",{className:"pp-title__description caption-1",children:a}):null]})]}),n.jsx(Iu,{max:Math.max(0,h??0),index:Math.max(0,f??0)})]})}function r_(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function o_(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 Gc=(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 Kc(e,t,a){const r=e,l=r?.title||r?.name||(Array.isArray(t)?t[t.length-1]:void 0)||a||"\uD6C8\uB828",s=ql().find(u=>u.key===(r?.category_0||r?.category_main_code)),i=s?.subs?.find(u=>u.key===(r?.category_1||r?.category_sub_code));return{title:l,label:r?.title||l,depth:t,icon:s?.icon,wrapperStyle:s?.color?{"--t-item-fg":s.color}:void 0,iconTooltip:[s?Gc(`topic.${s.key}`,s.label):void 0,i?Gc(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function ws(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function Yc(e,t,a){if(!e||typeof e!="object"||Array.isArray(e))return e;const r=e,l=typeof a=="number"&&a>0?a:Date.now();return{...r,...r.shownAt===void 0&&t?{shownAt:t}:{},...r.answeredAt===void 0?{answeredAt:new Date(l).toISOString()}:{}}}function s_(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function l_({idPrefix:e,trainingData:t,depth:a,fallbackTitle:r="\uD6C8\uB828",pages:l=[],emptyMessage:s,buildResults:i,metaPatch:u}){const c=Kc(t,a,r),d=typeof u=="function"?u(c)||{}:u||{},m=t?.id||t?.title||l.length;return{id:`${e}:${m}`,meta:{...c,...d},pages:l,emptyMessage:s,buildResults:i}}function i_(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return t.context||t.sentence||t.question||""||""}return""}function u_(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 c_(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 Zc(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function d_(e,t,a,r){return Zc(e,t*a+r)}function p_({payload:e,selected:t,choices:a=[],correctAnswers:r=[]}){if(e&&typeof e=="object"){const l=e;if(Array.isArray(l.selectedValues))return r.every(s=>l.selectedValues.includes(s))&&l.selectedValues.every(s=>r.includes(s));if(typeof l.correct=="boolean")return l.correct}if(r.length){if(typeof t=="number"&&Array.isArray(a)&&a.length)return r.some(l=>String(l)===String(a[t]));if(typeof t<"u")return r.some(l=>String(l)===String(t))}}function m_(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 Xc=o.createContext(null);function h_(){const e=o.useContext(Xc);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function C_({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:l,choices:s=[],onDone:i,onChange:u}){const{t:c}=_e.useTranslation(),d=typeof e=="number"?e:-1,m=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",[p,C]=o.useState(()=>s.map(()=>null)),b=JSON.stringify(s),x=s.length;o.useEffect(()=>{C(Array.from({length:x},()=>null))},[b]);const f=o.useRef(void 0);o.useEffect(()=>{const k=f.current;typeof k=="number"&&typeof t=="number"&&typeof e=="number"&&k>=e&&t<e&&C(Array.from({length:x},()=>null)),f.current=t},[t,e,x]);const h=o.useMemo(()=>p.filter(k=>k!==null).length+1,[p]),_=o.useCallback(k=>{if(!ta(m))return;const v=p;let B;if(v[k]!=null){const w=v[k];B=v.map(A=>A!==null&&A>=w?null:A)}else B=[...v],B[k]=h;C(B);const y={selectedOrder:B,words:s,__ts:Date.now()};try{typeof u=="function"&&u(y)}catch{}if(v[k]==null&&B.length>0&&B.every(w=>w!==null))try{typeof i=="function"&&i(y)}catch{}},[m,p,h,u,i,s]),g=l??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(ea,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:g,onDone:i,children:n.jsx("div",{className:"training-step__cards",children:s.map((k,v)=>n.jsx(Jo,{item:{word:k},disabled:m==="disabled",selectable:!0,selected:p[v]!==null,orderRank:p[v],onSelect:()=>_(v),flipDelay:v*120,hideLabel:!1,hideAudio:!0},`${k}-${v}`))})})}function Dr(e){return null}Dr.__isTrainingPage=!0;function xa(e,t){const a=h_();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 Jc({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:l,isLast:s,onDone:i}=xa(e,t);return n.jsx(vs,{...a,index:r,stepIndex:l,isLast:s,onDone:i})}function Qc({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:l,isLast:s,onDone:i,onChange:u}=xa(e,t);return n.jsx(bs,{...a,index:r,stepIndex:l,isLast:s,onDone:i,onChange:u})}function ed({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:l,isLast:s,onDone:i,onChange:u}=xa(e,t);return n.jsx(ys,{...a,index:r,stepIndex:l,isLast:s,onDone:i,onChange:u})}function td({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:l,isLast:s,onDone:i,onChange:u}=xa(e,t);return n.jsx(xs,{...a,index:r,stepIndex:l,isLast:s,onDone:i,onChange:u})}function nd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:l,isLast:s,onDone:i,onChange:u}=xa(e,t);return n.jsx(Oc,{...a,index:r,stepIndex:l,isLast:s,onDone:i,onChange:u})}function f_({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:l,isLast:s,onDone:i,onChange:u}=xa(e,t);return n.jsx(C_,{...a,index:r,stepIndex:l,isLast:s,onDone:i,onChange:u})}const ad=3e4,g_=/^(https?:|blob:|data:audio|\/|\.\/)/;function rd(e){return typeof e=="string"&&g_.test(e)?e:null}const b_=e=>typeof e=="string"&&e.trim()!==""?e:null,Bs=Symbol("timed-out");function y_(e,t){if(t<=0)return Promise.resolve(Bs);let a;return Promise.race([Promise.resolve(e),new Promise(r=>{a=setTimeout(()=>r(Bs),t)})]).finally(()=>clearTimeout(a))}function v_(e){return e?Na()||Jr()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function x_(e,t){const a=[],r=rd(t);r&&a.push({kind:"raw",resolve:async()=>r});const l=(e??"").trim();if(!l)return a;for(const[s,i]of[["urlResolver",Na()],["fallbackUrlResolver",Jr()]])i&&a.push({kind:s,resolve:async u=>{let c;try{c=await y_(i(l),u)}catch(m){return Mt(`question-sound-threw-${s}`,`[core] configureTTS \uC758 ${s} \uAC00 \uB358\uC84C\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`,m),null}return c===Bs?(Mt(`question-sound-slow-${s}`,`[core] configureTTS \uC758 ${s} \uAC00 ${ad}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):b_(c)||(Mt(`question-sound-empty-${s}`,`[core] configureTTS \uC758 ${s} \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 __(){return Date.now()+ad}const w_=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function B_(e){Mt("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 Sr(...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 l of r){if(typeof l=="string"&&l.trim().length)return l.trim();if(typeof l=="number"||typeof l=="boolean")return String(l)}}}return null}function k_(e){return Sr(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function A_(e){return rd(Sr(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function od(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=Sr(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 sd(e){const{score:t,contextsLength:a,results:r=[],subtitle:l,onReplay:s,onClose:i,inline:u=!1,pending:c=!1}=e||{},{t:d}=_e.useTranslation(),m=o.useId(),p=o.useCallback(()=>!c,[c]);o.useEffect(()=>{const D=a??0;if(t!=null&&D>0&&t/D>.5){const N=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("party:trigger",{detail:{count:140,strength:1.6,duration:2200}}))},0);return()=>window.clearTimeout(N)}},[t,a]);const C=o.useCallback(D=>{const N=od(D),F=Sr(D?.wording,D?.label);return N===!0?{variant:"main",label:F??d("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:N===!1?{variant:"danger",label:F??d("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:F??d("training.result.notJudged","\uBBF8\uD310\uC815")}},[d]),b=a??0,x=t??0,f=o.useMemo(()=>Array.isArray(r)?r:[],[r]),h=o.useRef(null),[_,g]=o.useState(null),k=o.useCallback(()=>{h.current?.(),h.current=null,g(null)},[]);o.useEffect(()=>k,[k]);const v=o.useRef(0),B=(D,N)=>{if(!Pn)return;const F=Math.round(performance.now()-v.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${F}ms ${D}`,N??"")},y=o.useRef(0),w=o.useCallback((D,N,F)=>{k();const R=++y.current,K=()=>y.current===R;v.current=Pn?performance.now():0,B(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${D}`,{text:N,rawUrl:F}),g(D),h.current=()=>{B("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),y.current++,Zr()};const L=q=>{B("\uD2BC\uB2E4",q);const O=hr(q,Q=>{B(`\uB05D\uB0AC\uB2E4 \u2014 ${Q?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:K()}),Q&&K()&&(h.current=null,g(null))});return h.current=()=>{B("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),y.current++,O.stop(),Zr()},O.done},$=x_(N,F);B("\uCC28\uB840",$.map(q=>q.kind));const T=$[0]?.kind==="raw",J=T?L(F):Promise.resolve(!1);(async()=>{if(await J||!K())return;const q=__(),O=T?$.slice(1):$;for(let Q=0;Q<O.length;Q++){if(!K())return;B(`${O[Q].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const P=await O[Q].resolve(w_(q,O.length-Q));if(B(`${O[Q].kind} \uAC00 \uB2F5\uD588\uB2E4`,P),!K()||P&&(await L(P)||!K()))return}K()&&(B("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),B_(N),h.current=()=>{y.current++,Zr()},B("\uB0AD\uB3C5\uD55C\uB2E4"),kC(N,{onEnd:()=>{K()&&(h.current=null,g(null))}}))})()},[k]),A=o.useMemo(()=>f.map(D=>{const N=D??{},F=k_(N)||d("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:R,label:K}=C(N),L=Array.isArray(N.corrects)?N.corrects:[],$=L.length?L.join(", "):N.answer!=null&&N.answer!==""?String(N.answer):null,T=typeof N.selectedText=="string"?N.selectedText:null,J=od(N)===!0,q=A_(N),O=!!q||v_(F);return{problem:F,variant:R,label:K,answer:$,selectedText:T,isCorrect:J,sound:q,canHear:O}}),[f,C,d]),E=o.useMemo(()=>A.some(D=>D.answer!==null||D.selectedText!==null),[A]);return n.jsx(Wn,{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:D,closeWithAnimation:N})=>n.jsxs(n.Fragment,{children:[c&&n.jsx("p",{id:m,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:()=>D(s)}),n.jsx(fe,{htmlType:"button",size:56,type:"bar",label:d("training.result.done","\uC644\uB8CC"),variant:"main",onClick:N,disabled:c,onDisabledClick:c?()=>{}:void 0,"aria-describedby":c?m: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.")}),l&&n.jsx("p",{className:"trp-result__subtitle body-3",children:l}),n.jsx("div",{className:"trp-score",children:n.jsxs("div",{className:"trp-score__figure","aria-label":d("training.result.scoreAria",{correct:x,total:b}),children:[n.jsx("span",{className:"trp-score__big",children:x}),n.jsx("span",{className:"trp-score__sep",children:"/"}),n.jsx("span",{className:"trp-score__total",children:b})]})})]}),A.length>0&&n.jsx("section",{className:"trp-result__body",children:n.jsxs("div",{className:`result-table${E?" 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")}),E&&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")})]}),A.map((D,N)=>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(N+1).padStart(2,"0")}),n.jsx("div",{className:"trp-row__q body-2",children:D.problem}),D.canHear&&n.jsx(fe,{htmlType:"button",size:32,type:"dot",useBorder:!1,icon:_===N?"square":"volume-2",className:"trp-row__replay",ariaLabel:_===N?d("training.result.replaySoundStop",{no:N+1,defaultValue:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4"}):d("training.result.replaySound",{no:N+1,defaultValue:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30"}),onClick:()=>_===N?k():w(N,D.problem,D.sound)})]}),E&&n.jsxs("div",{className:"trp-row__answers",children:[D.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:D.answer})]}),n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:`trp-row__answer-label answer-selected caption-1 ${D.isCorrect?"is-correct":"is-wrong"}`,children:d("training.result.colSelected","\uC120\uD0DD")}),n.jsx("span",{className:`trp-row__answer-value body-2 ${D.isCorrect?"is-correct":"is-wrong"}`,children:D.selectedText??"\u2014"})]})]}),n.jsx("div",{className:"trp-row__judge",children:n.jsx($t,{variant:D.variant,label:D.label,fill:"soft",minWidth:80})})]},N))]})})]})})}const ks=new Set;function N_(e){o.useEffect(()=>{if(!e||ks.has(e))return;ks.add(e);const t=()=>typeof document>"u"||document.visibilityState!=="hidden";let a=null,r=null,l=0,s=0;const i=()=>{const m=Date.now();a==null&&(a=m),r==null&&(r=m)},u=()=>{r!=null&&(l+=Date.now()-r,r=null)};t()&&i();const c=()=>{if(u(),a==null)return;const m=l-s;if(m<1e3||s===0&&l<5e3)return;const p=Date.now(),C=p-m;s=l,vf({trainingType:e,startedAt:new Date(C).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(),ks.delete(e)}},[e])}function jr(e,t){return e&&e.id||`page-${t??0}`}function Tr(e,t){return e&&e.key||`step-${t??0}`}function Mr(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function E_(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const D_=300,S_=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},Rn=Object.freeze({}),ld=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function As(e){const t=e,a=t?.results||t?.answers||[],r=Array.isArray(a)&&a.length>0?a.length:null,l=Array.isArray(a)?a.filter(s=>s?.correct===!0||s?.isCorrect===!0||s?.score===1||s?.heard===!0||s?.judgement===!0).length:null;return{results:a,correct:r!=null?l:null,total:r}}const j_=e=>n.jsx(sd,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function T_(e){const{scenario:t,title:a,subTitle:r,depth:l,icon:s,wrapperStyle:i,iconTooltip:u,pageIndex:c,pageCount:d,stepIndex:m,stepCount:p,onBack:C,onComplete:b,onRoundFinished:x,onNext:f,onSettings:h,useNoiseSetting:_=!0,children:g,ariaLabel:k,label:v,buildResults:B,onResult:y,typeKey:w,entryPoint:A,dailyTotal:E,itemRef:D,renderResultPopup:N,noiseOverride:F,hideNoiseRows:R=!1}=e;N_(w&&!ld.has(w)?w:"");const K=o.useRef(0);o.useEffect(()=>{K.current=Date.now()},[]);const{t:L}=_e.useTranslation(),$=y,T=!!t,J=t?.id||null,q=t?.meta||{},O=Array.isArray(t?.pages)?t.pages:[],Q=Array.isArray(g)||o.isValidElement(g)&&typeof g!="function"?o.Children.toArray(g).filter(o.isValidElement):[],P=Q.length>0,V=se=>se===Dr||se?.__isTrainingPage===!0,W=P&&Q.some(se=>V(se.type)),G=W?Q.filter(se=>V(se.type)).map((se,Ae)=>{const je=se.props||{};return{id:`children-page-${Ae}`,steps:o.Children.toArray(je.children).filter(o.isValidElement),pageTop:je.pageTop||je.top||null,pageBottom:je.pageBottom||je.bottom||null}}):[{id:"children-page-0",steps:Q}],S=P&&!T&&typeof g!="function",M=S?Math.max(1,G.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 se=document.body;return se.dataset.ihabTrainingPopupCount=String(Number(se.dataset.ihabTrainingPopupCount||"0")+1),se.classList.add("ihab-training-popup-open"),()=>{const Ae=Number(se.dataset.ihabTrainingPopupCount||"1")-1;Ae>0?se.dataset.ihabTrainingPopupCount=String(Ae):(delete se.dataset.ihabTrainingPopupCount,se.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!(typeof document>"u"||!document.body))return ev()},[]);const[I,Z]=o.useState({...Qn,enabled:!1}),le=o.useRef(I);o.useEffect(()=>{le.current=I},[I]);const oe=o.useRef(F),de=o.useRef(!1),re=o.useRef(null);o.useEffect(()=>{let se=!1;const Ae=je=>{if(se)return;de.current=!0;const Ke=je?Jn({...Qn,enabled:!1},je):{...Qn},Fe=re.current;re.current=null;const Y=Fe?Jn(Ke,Fe):Ke;le.current=Y,Z(Y),Fe&&!oe.current&&co(Y),rr(Y);const ce=oe.current;if(ce){const ee=typeof ce=="function"?ce(Y):ce,xe=Jn(Y,ee);le.current=xe,Z(xe),rr(xe)}};return jf().then(je=>{if(se){const Ke=re.current;if(re.current=null,Ke&&!oe.current){const Fe=je?Jn({...Qn,enabled:!1},je):{...Qn};co(Jn(Fe,Ke))}return}Ae(je)}),()=>{se=!0}},[]);const[z,ne]=o.useState(null),[H,U]=o.useState(null),pe=o.useCallback((se,Ae)=>{se==="main"?ne(Ae):U(Ae)},[]),Ee=o.useRef(null),ge=o.useRef(null),me=o.useCallback(()=>{ge.current!==null&&(clearTimeout(ge.current),ge.current=null);const se=Ee.current;Ee.current=null,se&&co(se)},[]);o.useEffect(()=>{if(typeof window>"u")return;const se=()=>{document.visibilityState==="hidden"&&me()};return window.addEventListener("pagehide",me),document.addEventListener("visibilitychange",se),()=>{window.removeEventListener("pagehide",me),document.removeEventListener("visibilitychange",se),me()}},[me]);const ie=o.useCallback(se=>{const Ae=Jn(le.current,se);if(le.current=Ae,Z(Ae),!de.current){re.current={...re.current??{},...se},rr(Ae);return}oe.current||(Ee.current=Ae,ge.current!==null&&clearTimeout(ge.current),ge.current=setTimeout(me,D_)),rr(Ae)},[me]),be=I.mainSpeed,he=I.mainVolume,ue=o.useCallback(se=>ie({mainSpeed:se}),[ie]),Me=o.useCallback(se=>ie({mainVolume:se}),[ie]),Ve=o.useMemo(()=>({settings:I,setSettings:ie,registerAnalyser:pe,mainAnalyser:z,noiseAnalyser:H,playbackRate:be,setPlaybackRate:ue,mainVolume:he,setMainVolume:Me}),[I,ie,pe,z,H,be,ue,he,Me]),Te=o.useRef(null),[qe,Oe]=o.useState(0),ct=o.useRef([]),[rt,nt]=o.useState("center"),[mt,Ne]=o.useState(!1),Ue=o.useRef(!1),ke=o.useRef(null),He=o.useCallback(se=>{Ue.current||(Ue.current=!0,Ne(!0),ke.current=setTimeout(()=>{try{se()}catch{Ue.current=!1,Ne(!1)}},S_()?0:Xx))},[]);o.useEffect(()=>()=>{ke.current&&clearTimeout(ke.current)},[]);const Be=o.useRef(C);o.useEffect(()=>{Be.current=C});const Se=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{const se=Te.current,Ae=Se.current;if(fo(se,Ae),se){const je=Array.from(se.querySelectorAll(_n)).filter(Ke=>!Ke.closest('[aria-hidden="true"]'))[0];if(je)try{je.focus()}catch{}}return()=>{const je=document.activeElement;if(!je||je===document.body||se&&se.contains(je))try{go(Ae)?.focus?.()}catch{}}},[]),o.useEffect(()=>Gn(()=>He(()=>{const se=Be.current;typeof se=="function"&&se()})),[He]),ho(Te,!0);const[Le,Ze]=o.useState(!1),_t=o.useRef(!1),[et,Xe]=o.useState(null),Nt=o.useRef(0),gt=o.useRef(0),wt=()=>{Nt.current+=1,gt.current+=1,Xe(null)},[Et,ht]=o.useState(""),[st,Pe]=o.useState(()=>Mr()),bt=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!T&&!S||(Pe(Mr()),wt())},[T,J,S]),o.useEffect(()=>{S&&Pe(se=>{const Ae=Math.max(0,Math.min(se.pageIndex,Math.max(0,M-1)));return Ae!==se.pageIndex?{...se,pageIndex:Ae,stepIndex:0}:se})},[S,M]);const Bt=S?Math.max(0,Math.min(st.pageIndex,M-1)):0,lt=S?G[Bt]:null,Tt=S&<&&Array.isArray(lt.steps)?lt.steps:[],Ge=T?st.pageIndex:S?Bt:typeof c=="number"?c:0,yt=T?O[Math.max(0,Math.min(st.pageIndex,Math.max(0,O.length-1)))]:null,Rt=T&&yt&&Array.isArray(yt.steps)?yt.steps:[],Re=T?Rt.length:S?Tt.length:typeof p=="number"?p:0,ot=T||S?Math.max(0,Math.min(st.stepIndex,Math.max(0,Re))):typeof m=="number"?m:0,Dt=T?O.length:S?M:typeof d=="number"?d:0;o.useEffect(()=>{if(!T&&!S)return;const se=T?jr(yt,Ge):lt?.id||`children-page-${Ge??0}`,Ae=new Date().toISOString();for(let je=0;je<=ot;je+=1){const Ke=T?Tr(Rt[je],je):`step-${je}`,Fe=ve(se,Ke);ae.current.has(Fe)||ae.current.set(Fe,Ae)}},[T,S,Ge,ot,lt?.id]),o.useLayoutEffect(()=>{const se=bt.current;if(typeof Ge=="number"&&se!==null&&Ge!==se&&Ge>se)try{ht(L("training.problemNotice",{n:Ge+1}))}catch{}bt.current=typeof Ge=="number"?Ge:bt.current},[Ge,c,L]),o.useLayoutEffect(()=>{const se=Te.current;if(!se)return;const Ae=()=>se.querySelector(".page-popup__scroll");let je=null,Ke=null,Fe=null;const Y=We=>{const at=Ae();if(!at)return;const ft=at.scrollHeight<=at.clientHeight;if(nt(ft?"center":"top"),We&&!_t.current){_t.current=!0;try{Ze(!0)}catch{}try{xe.disconnect()}catch{}}},ce=()=>{je!==null&&cancelAnimationFrame(je),je=requestAnimationFrame(()=>{Ke!==null&&clearTimeout(Ke),Ke=setTimeout(()=>Y(!0),60)})},ee=()=>{Fe!==null&&cancelAnimationFrame(Fe),Fe=requestAnimationFrame(()=>Y(!1))};ce(),window.addEventListener("resize",ee);const xe=new MutationObserver(ce);xe.observe(se,{childList:!0,subtree:!0,attributes:!0});const $e=setTimeout(()=>{_t.current||Y(!0)},400);return()=>{window.removeEventListener("resize",ee),je!==null&&cancelAnimationFrame(je),Ke!==null&&clearTimeout(Ke),Fe!==null&&cancelAnimationFrame(Fe),clearTimeout($e);try{xe.disconnect()}catch{}}},[Te]);const Je=o.useCallback(se=>{Te.current&&(Te.current._childOnNext=se)},[]),St=o.useCallback(se=>{Te.current&&(Te.current._childOnResult=se)},[]),ae=o.useRef(new Map),ve=(se,Ae)=>`${se}\0${Ae}`,ze=o.useCallback((se,Ae,je)=>{Pe(Ke=>{const Fe=Ke.answersByPage[se]||{},Y=Fe[Ae],ce=ws(je),ee=ws(Y);if(Y&&ee>ce)return Ke;const xe=Yc(je,ae.current.get(ve(se,Ae)),ce);return{...Ke,answersByPage:{...Ke.answersByPage,[se]:{...Fe,[Ae]:xe}}}})},[Pe]),Qe=o.useCallback((se,Ae,je)=>{const Ke=jr(yt,Ge),Fe=Tr(se,Ae);ze(Ke,Fe,je)},[yt,Ge,ze]),Ct=o.useCallback((se,Ae,je)=>{const Ke=jr(yt,Ge),Fe=Tr(se,Ae);ze(Ke,Fe,je),!je?.allowChange&&se?.autoAdvance!==!1&&Pe(Y=>({...Y,stepIndex:Math.max(Y.stepIndex,Ae+1)}))},[yt,Ge,ze,Pe]),it=o.useCallback((se,Ae)=>{const je=lt?.id||`children-page-${Ge??0}`,Ke=typeof Ae=="number"?Ae:ot??0,Fe=`step-${Ke}`;ze(je,Fe,se),se?.allowChange||Pe(Y=>({...Y,stepIndex:Math.max(Y.stepIndex,Ke+1)}))},[lt,Ge,ot,ze,Pe]),It=o.useCallback((se,Ae)=>{const je=lt?.id||`children-page-${Ge??0}`,Ke=`step-${typeof Ae=="number"?Ae:ot??0}`;ze(je,Ke,se)},[lt,Ge,ot,ze]),Gt=S?{currentPageIndex:Ge??0,currentStepIndex:ot??0,totalStepsInPage:Tt.length,handleStepDone:it,handleStepChange:It}:null,An=async()=>{const se=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:O,flowState:st,answersByPage:st.answersByPage})):null;return typeof $=="function"&&await Promise.resolve($(se))||se},Wt=async()=>{const se=lt?.id||`children-page-${st.pageIndex}`,Ae=st.answersByPage[se]||{},je=W?(()=>{const Y={};let ce=0;return G.forEach(ee=>{const xe=st.answersByPage[ee.id]||{},$e=Array.isArray(ee.steps)?ee.steps.length:0;for(let We=0;We<$e;We+=1){const at=xe[`step-${We}`];typeof at<"u"&&(Y[`step-${ce+We}`]=at)}ce+=$e}),Y})():Ae;if(typeof B=="function"){const Y=await Promise.resolve(B(je,{pageAnswers:Ae,answersByPage:st.answersByPage,pages:G,currentPageId:se}));return typeof $=="function"&&await Promise.resolve($(Y))||Y}const Ke=Object.entries(Ae).map(([Y,ce],ee)=>({index:ee,key:Y,payload:ce})),Fe={results:Ke,answers:Ke,score:0};return typeof $=="function"&&await Promise.resolve($(Fe))||Fe},Kt=()=>{const se=++Nt.current,Ae=()=>se!==Nt.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(T){const Fe=An();Xe(Rn);const Y=Fe;Promise.resolve(Y).then(ce=>{Ae()||Xe(ce||{isEmpty:!0})}).catch(ce=>{!Ae()&&Xe({isEmpty:!0})});return}if(S){const Fe=Wt();Xe(Rn);const Y=Fe;Promise.resolve(Y).then(ce=>{Ae()||Xe(ce||{isEmpty:!0})}).catch(ce=>{!Ae()&&Xe({isEmpty:!0})});return}const je=Te.current&&Te.current._childOnResult,Ke=Fe=>{try{return Fe?Fe():void 0}catch{return}};if(typeof je=="function"){const Fe=Ke(je);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{}Fe&&typeof Fe.then!="function"?Xe(Fe):Xe(Fe&&typeof Fe.then=="function"?Rn:{});const Y=()=>{Ae()||Xe(ce=>ce===Rn?{}:ce)};Promise.resolve(Fe).then(ce=>{ce&&!Ae()?Xe(ce):Y()}).catch(ce=>{Y()});return}if(typeof $=="function"){const Fe=Ke($);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{}Fe&&typeof Fe.then!="function"?Xe(Fe):Xe(Fe&&typeof Fe.then=="function"?Rn:{});const Y=()=>{Ae()||Xe(ce=>ce===Rn?{}:ce)};Promise.resolve(Fe).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&&!Ae()?Xe(ce):Y()}).catch(ce=>{console.error("viewResults external handler failed",ce),Y()});return}},kt=()=>{if(T){if(typeof Ge=="number"&&typeof Dt=="number"&&Ge<Dt-1){Pe(Ae=>({...Ae,pageIndex:Ae.pageIndex+1,stepIndex:0}));return}return Kt()}if(S){const Ae=Tt.length;if(typeof ot=="number"&&ot<Ae-1){Pe(je=>({...je,stepIndex:je.stepIndex+1}));return}if(typeof Ge=="number"&&typeof Dt=="number"&&Ge<Dt-1){Pe(je=>({...je,pageIndex:je.pageIndex+1,stepIndex:0}));return}return Kt()}if(typeof f=="function"){try{f()}catch{}return}const se=Te.current&&Te.current._childOnNext;if(typeof se=="function"){try{se()}catch{}return}},dt=T?q.title||q.label||k||L("common.popup","\uD31D\uC5C5"):a||v||(Array.isArray(l)?l[l.length-1]:void 0)||k||L("common.popup","\uD31D\uC5C5"),pt=k||dt,vt=T?q.title??q.label??dt:a??v??dt,Yt=(se,Ae)=>{const je=jr(yt,Ge),Ke=Tr(se,Ae),Fe=st.answersByPage[je]?.[Ke],Y=E_(se,{page:yt,pageIndex:Ge,step:se,stepIndex:Ae,storedPayload:Fe,answersByPage:st.answersByPage,flowState:st}),ce={key:Ke,index:Ae,stepIndex:ot,isLast:Ae===Rt.length-1};switch(se?.type){case"listen":return n.jsx(vs,{...ce,...Y,onDone:ee=>Ct(se,Ae,ee)});case"confirm":return n.jsx(bs,{...ce,...Y,onDone:ee=>Ct(se,Ae,ee),onChange:ee=>Qe(se,Ae,ee)});case"confirmWithText":return n.jsx(ys,{...ce,...Y,onDone:ee=>Ct(se,Ae,ee),onChange:ee=>Qe(se,Ae,ee)});case"orderList":return n.jsx(xs,{...ce,...Y,onDone:ee=>Ct(se,Ae,ee),onChange:ee=>Qe(se,Ae,ee)});default:return null}},gn=o.useRef(void 0);o.useEffect(()=>{const se=gn.current;if(gn.current=Ge,se===void 0||se===Ge||!gr())return;const Ae=Te.current;if(!Ae)return;const je=document.activeElement;if(!(!je||je===document.body||!Ae.contains(je)||je.disabled===!0))return;const Ke=Ae.querySelector(`.training-steps ${_n.split(", ").join(", .training-steps ")}`)??Array.from(Ae.querySelectorAll(_n)).find(Fe=>!Fe.closest('[aria-hidden="true"]'));try{Ke?.focus()}catch{}},[Ge]);const Nn=T?O.length>0?n.jsx("div",{className:"training-steps",children:Rt.map((se,Ae)=>Yt(se,Ae))},`replay-${qe}`):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||L("training.noQuestions","\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):null,tn=S?n.jsxs(Xc.Provider,{value:Gt,children:[lt?.pageTop?n.jsx("div",{className:"training-page-top",children:lt.pageTop}):null,n.jsx("div",{className:"training-steps",children:Tt.map((se,Ae)=>{const je=se;return o.cloneElement(je,{...je.props,_stepIndex:Ae,_totalSteps:Tt.length,_stepKey:`step-${Ae}`,_pageIndex:Ge})})},`replay-${qe}`),lt?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:lt.pageBottom}):null]}):null,Zt=o.useRef(-1),Ht=o.useCallback(()=>{if(!w)return;const se=et,{results:Ae,correct:je,total:Ke}=As(et),Fe={correct:je,total:Ke,attempt:ct.current.length+1,previousAttempts:[...ct.current]};if(Zt.current===gt.current)return Fe;Zt.current=gt.current,xf({items:Sf(Ae),category:ld.has(w)?"sentence":"word",trainingType:w,entryPoint:A??"sentence",itemRef:D??null,correct:je,total:Ke,score:typeof se?.score=="number"?se.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-K.current)/1e3)),dailyTotal:E??null});try{x?.(Fe)}catch{}return Fe},[w,A,E,D,et,x]);o.useEffect(()=>{!et||et===Rn||et?.isEmpty||(As(et).total??0)>0&&Ht()},[et,Ht]);const bn=o.useCallback(()=>{const se=Ht();wt(),He(()=>{typeof b=="function"&&b(se),typeof C=="function"&&C()})},[b,C,Ht,Xe,He]),Xt=o.useCallback(()=>ht(""),[ht]),un=o.useCallback(()=>{He(()=>{typeof C=="function"&&C()})},[C,He]),Ot=n.jsxs("div",{className:`page-popup${mt?" page-popup--closing":""}`,role:"dialog","aria-modal":"true","aria-label":pt,children:[n.jsxs("div",{ref:Te,className:`page-popup__panel ${Le?"":"page-popup__panel--measuring"} ${rt==="center"?"page-popup__panel--center":rt==="top"?"page-popup__panel--top":""}`,children:[n.jsx(Uc,{title:vt,subtitle:T?q.subtitle||q.label:Array.isArray(l)?l.join(" / "):void 0,desc:T?void 0:r,depth:T?q.depth:l,icon:T?q.icon:s,wrapperStyle:T?q.wrapperStyle:i,iconTooltip:T?q.iconTooltip:u,progressMax:Dt,progressIndex:Ge,pageIndex:Ge,pageCount:Dt,onBack:un,onClose:un}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${rt==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:S?tn:T?Nn:typeof g=="function"?g({registerOnNext:Je,registerOnResult:St,panelRef:Te,setResultOverlay:Xe}):g})}),n.jsx(qc,{onSettings:h,onNext:kt,onResult:Kt,useNoiseSettingBtn:!!(T?q.useNoiseSetting??!0:_),stepIndex:ot,stepCount:Re,pageIndex:Ge,pageCount:Dt,resultOpen:!!(et&&!et.isEmpty),hideNoiseRows:R})]}),et&&!et.isEmpty&&(N??j_)({score:et.score,results:et.results||et.answers||[],contextsLength:et.results?et.results.length:et.answers?et.answers.length:0,onReplay:()=>{if(K.current=Date.now(),et!==Rn){const{correct:se,total:Ae}=As(et);ct.current.push({correct:se,total:Ae})}if(wt(),Oe(se=>se+1),T){if(Pe(Mr()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if(S){Pe(Mr());return}try{const se=Te.current&&Te.current._childOnResult;typeof se=="function"&&se({replay:!0})}catch{}},onClose:bn,pending:et===Rn}),et?.isEmpty&&n.jsx("div",{className:"page-popup page-popup--result-empty",role:"dialog","aria-modal":"true","aria-label":L("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:L("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:bn,label:L("training.result.done","\uC644\uB8CC")})})]})}),n.jsx(ha,{message:Et,position:"top",onClose:Xt})]}),nn=n.jsx(ps.Provider,{value:Ve,children:Ot});return typeof document<"u"&&document.body?cn.createPortal(nn,document.body):nn}const Hn=T_;Hn.Page=Dr,Hn.ListenStep=Jc,Hn.ConfirmStep=Qc,Hn.ConfirmWithTextStep=ed,Hn.OrderListStep=td,Hn.CardStep=nd,Hn.CardOrderStep=f_;function M_({label:e,homonum:t}){const a=sa()?.(e,t)??"",{imgRef:r,loading:l,hasImage:s,onLoad:i,onError:u}=Xo(a);return s?n.jsxs("div",{className:"tooltip-word-image__cell",children:[l&&n.jsx("div",{className:"tooltip-word-image__spinner"}),n.jsx("img",{ref:r,src:a,alt:e,draggable:!1,style:{opacity:l?0:1},onLoad:i,onError:u})]}):n.jsx("div",{className:"tooltip-word-image__cell tooltip-word-image__cell--text h3",children:n.jsx("span",{children:e})})}function id({words:e,anchorRect:t}){const a=o.useRef(null),[r,l]=o.useState(null);return o.useLayoutEffect(()=>{if(!t||!a.current)return;const{offsetWidth:s,offsetHeight:i}=a.current,u=window.innerWidth;let c=t.left+t.width/2-s/2,d=t.top-i-8;d<8&&(d=t.bottom+8),c=Math.max(8,Math.min(c,u-s-8)),l({left:c,top:d})},[t]),!t||e.length===0?null:cn.createPortal(n.jsx("div",{ref:a,className:"tooltip-word-image",style:{visibility:r?"visible":"hidden",left:r?.left??0,top:r?.top??-9999},children:n.jsx("div",{className:"tooltip-word-image__cells",children:e.map(s=>n.jsx(M_,{label:s.label,homonum:s.homonum},`${s.label}_${s.homonum??1}`))})}),document.body)}function L_({titleIcon:e,resultCount:t,resultUnit:a,searchQuery:r,items:l,groups:s,selected:i=[],onSelect:u,maxSelect:c,onClearSelection:d,onPrint:m,onPrintEmpty:p,className:C,emptyHint:b,sectionType:x="page",disc:f}){const{t:h,i18n:_}=_e.useTranslation(),g=_.language?.startsWith("ko")??!1,{anchorRect:k,openAt:v,close:B}=Pa(),[y,w]=o.useState(null),A=o.useCallback(()=>{B(),w(null)},[B]);Dy(A,!!y);const E=(r??"").trim(),D=/^[^,[\]\s]+$/.test(E)?E:"",N=D.length>0,F=r===void 0&&t===void 0,R=N?"match":F?"original":"ganada",[K,L]=o.useState(()=>R),[$,T]=o.useState("50"),[J,q]=o.useState(1),[O,Q]=o.useState(N);O!==N&&(Q(N),L(R));const P=K==="match"&&!N||K==="original"&&!F?R:K,V=o.useMemo(()=>[...N?[{value:"match",label:h("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...F?[{value:"original",label:h("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:h("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:h("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:h("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:h("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:h("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:h("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[h,N,F]),W=o.useMemo(()=>["10","25","50","100"].map(ie=>({value:ie,label:h("wordSearch.pageSize",{count:Number(ie),defaultValue:`${ie}\uAC1C\uC529 \uBCF4\uAE30`})})),[h]),G=ie=>ie.words?.[0],S=o.useMemo(()=>{const ie=[...D].length,be=nf(D),he=new Map;return ue=>{let Me=he.get(ue);return Me===void 0&&(Me=be((ue.words?.[0]?.label??"").slice(0,ie))?0:1,he.set(ue,Me)),Me}},[D]),M=o.useCallback((ie,be)=>{const he=Ve=>G(Ve)?.label??"",ue=Ve=>G(Ve)?.syllables??[...he(Ve)].length,Me=Ve=>(Ve.words??[]).reduce((Te,qe)=>{const Oe=parseInt(qe.grade??"",10);return Number.isFinite(Oe)&&Oe<Te?Oe:Te},999);switch(P){case"match":return S(ie)-S(be)||mn(he(ie),he(be));case"ganada":return mn(he(ie),he(be));case"ganada_desc":return mn(he(be),he(ie));case"syllable":return ue(ie)-ue(be)||mn(he(ie),he(be));case"syllable_desc":return ue(be)-ue(ie)||mn(he(ie),he(be));case"grade":return Me(ie)-Me(be)||mn(he(ie),he(be));case"grade_desc":return Me(be)-Me(ie)||mn(he(ie),he(be));default:return 0}},[P,S]),I=o.useMemo(()=>l.slice().sort(M),[l,M]),Z=Number($)||10,le=o.useMemo(()=>(s??[]).flatMap(ie=>ie.items.slice().sort(M).map(be=>({item:be,label:ie.label}))),[s,M]),oe=s?le.length:I.length,de=Math.max(1,Math.ceil(oe/Z)),re=Math.min(J,de),z=o.useMemo(()=>I.slice((re-1)*Z,re*Z),[I,re,Z]),ne=o.useId(),H=o.useMemo(()=>{if(!s)return null;const ie=le.slice((re-1)*Z,re*Z),be=new Map;for(const{item:he,label:ue}of ie)be.has(ue)||be.set(ue,[]),be.get(ue).push(he);return[...be.entries()].map(([he,ue])=>({label:he,items:ue}))},[s,le,re,Z]);o.useEffect(()=>{q(1)},[K,$,oe,r]);const U=oe>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(fn,{size:40,options:V,value:P,onChange:L,ariaLabel:h("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(fn,{size:40,options:W,value:$,onChange:T,ariaLabel:h("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(Cr,{page:re,totalPages:de,onChange:q})]}):void 0,pe=ie=>{u&&u(ie)},Ee=t!==void 0&&a?n.jsxs(n.Fragment,{children:[h("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),h("wordSearch.resultTitleSuffix",{unit:g?hf(a):a})]}):void 0,ge=t!==void 0&&t>0&&c!==void 0&&a?h("wordSearch.resultDisc",{unit:g?ff(a):a,max:c,selected:i.length}):void 0,me=f??ge;return n.jsxs(fa,{type:x,className:we("word-search-result-block",C),children:[n.jsxs("div",{className:"word-search-result-block__inner",children:[(Ee||U||me)&&n.jsxs("div",{className:"word-search-result-block__head",children:[n.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&n.jsx(tt,{icon:e,className:"word-search-result-block__head-icon"}),Ee&&n.jsx("span",{className:"word-search-result-block__title h3",children:Ee})]}),U&&n.jsx("div",{className:"word-search-result-block__head-actions",children:U}),me&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:me})]}),(s?s.length===0:l.length===0)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[n.jsx("p",{className:"word-search-result-block__empty body-3",children:h("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),b&&n.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:b})]}),s?(H??[]).map(ie=>n.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${ne}-${ie.label}`,children:[n.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${ne}-${ie.label}`,children:ie.label}),n.jsx("div",{className:"word-search-result-block__items",children:ie.items.map(be=>{const he=i.includes(be.id);return n.jsx("div",{onMouseEnter:ue=>{v(ue.currentTarget),w(be.words??[])},onMouseLeave:A,children:n.jsx(fe,{htmlType:"button",size:"word",align:"grid",label:(be.words??[]).map(ue=>ue.label),subLabel:(be.words??[]).some(ue=>ue.subLabel)?(be.words??[]).map(ue=>ue.subLabel):void 0,selected:he,onClick:()=>pe(be.id),minWidth:200})},be.id)})})]},ie.label)):n.jsx("div",{className:"word-search-result-block__items",children:z.map(ie=>{const be=i.includes(ie.id);return n.jsx("div",{onMouseEnter:he=>{v(he.currentTarget),w(ie.words??[])},onMouseLeave:A,children:n.jsx(fe,{htmlType:"button",size:"word",align:"grid",label:(ie.words??[]).map(he=>he.label),subLabel:(ie.words??[]).some(he=>he.subLabel)?(ie.words??[]).map(he=>he.subLabel):void 0,selected:be,onClick:()=>pe(ie.id),minWidth:200})},ie.id)})}),y&&k&&n.jsx(id,{words:y,anchorRect:k})]}),de>1&&n.jsx("div",{className:"word-search-result-block__pagination-bottom",children:n.jsx(Cr,{page:re,totalPages:de,onChange:q})}),(d||m)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[d&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:h("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:i.length===0,onClick:i.length===0?void 0:d}),m&&n.jsx("div",{onClick:i.length===0?p:void 0,children:n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",label:h("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:i.length===0,onClick:i.length===0?void 0:m})})]})]})}function $_(e,t){return t.map(a=>{const r=typeof a=="string"?a:a.label,l=typeof a=="string"?void 0:a.displayLabel;return{label:r,value:e[r]??"",displayLabel:l}})}function R_({sections:e,selectedList:t,count:a,onCountChange:r,maxCount:l=4,minCount:s=1,combinationSections:i,combinationSectionsForSlot:u,onSelect:c,placeholder:d="-",className:m,title:p,titleIcon:C,disc:b,showInfoButton:x=!0,onClearPhoneme:f,onSearch:h,onSearchEmpty:_,searchDisabled:g=!1,searchLabel:k,searchChecking:v=!1,pairMode:B=!1,sectionType:y="page",beforeSearchContent:w,beforeContent:A,afterContent:E,hideCountControl:D=!1,ordinal:N=!1}){const{t:F}=_e.useTranslation(),R=o.useMemo(()=>F("wordPairs.infoNotes",{returnObjects:!0}),[F]),K=o.useMemo(()=>Array.from({length:l-s+1},(S,M)=>{const I=s+M;return{key:String(I),label:F("wordPairs.count",{n:I})}}),[F,l,s]),L=o.useMemo(()=>F("wordPairs.ordinals",{returnObjects:!0}),[F]),$=o.useCallback(S=>N?F("wordPairs.phonemeOrdinalLabel",{ordinal:L[S-1]??S}):a===1?F("wordPairs.phonemeSingleLabel","\uC74C\uC808"):F("wordPairs.phonemeN",{n:S}),[N,L,a,F]),T=o.useCallback(S=>N?F("wordPairs.phonemeContrastOrdinalLabel",{ordinal:L[S-1]??S}):a===1?F("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):F("wordPairs.phonemeContrast",{n:S}),[N,L,a,F]),J=o.useCallback((S,M)=>M?n.jsxs(n.Fragment,{children:[S,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):S,[]),{anchorRect:q,toggleAt:O,close:Q}=Pa(),P=o.useCallback(S=>r(Number(S)),[r]),V=Cn("(max-width: 767px)"),W=o.useCallback(S=>$_(S,e).map(({label:M,value:I,displayLabel:Z})=>{const le=!!I&&I!=="\uC5C6\uC74C";return n.jsxs("span",{className:we("phoneme-select-block__cell-jamo-part",I?"":"phoneme-select-block__cell-jamo-part--empty",le?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[n.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${I==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:I==="\uC5C6\uC74C"?"x":I||d}),le&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:Z??M})]},M)}),[e,d]),G=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:40,type:V?"dot":void 0,icon:"info",label:V?void 0:F("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:F("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:q?"is-selected":void 0,"aria-expanded":!!q,"aria-haspopup":"dialog",onClick:S=>O(S.currentTarget)})}),q&&n.jsx(Kn,{title:F("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:R,anchorRect:q,onClose:Q})]});return n.jsxs(fa,{type:y,title:p,icon:C,disc:b,action:x?G:void 0,className:we("phoneme-select-block",m),children:[A,!D&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(wn,{options:K,value:String(a),onChange:P,size:40,ariaLabel:F("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),n.jsx("div",{className:"phoneme-select-block__cells",children:B?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((S,M)=>{const I=t[M*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:W(I)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:$(M+1)})]},M)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:F("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((S,M)=>{const I=t[M*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:W(I)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:T(M+1)})]},M)})})]}):t.map((S,M)=>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:W(S)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:$(M+1)})]},M))}),(i||u)&&n.jsx("div",{className:"phoneme-select-block__panels",children:n.jsx("div",{className:"phoneme-select-block__detail",children:B?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,M)=>{const I=t[M*2]??{};return n.jsx(Ln,{title:J($(M+1),M===0),sections:u?u(I,M*2):i,selected:I,onSelect:c?.(M*2),align:"newline"},M)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((S,M)=>{const I=t[M*2+1]??{};return n.jsx(Ln,{title:T(M+1),sections:u?u(I,M*2+1):i,selected:I,onSelect:c?.(M*2+1),align:"newline"},M)})})]}):t.map((S,M)=>n.jsx(Ln,{title:J($(M+1),M===0),sections:u?u(S,M):i,selected:S,onSelect:c?.(M),align:"newline"},M))})}),w&&n.jsx("div",{className:"phoneme-select-block__before-search",children:w}),(f||h||v)&&(()=>{const S=t.every(M=>{const I=JC(M);return Object.entries(I).every(([Z,le])=>!le||Z==="coda"&&le===jl)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:S?_:void 0,children:[f&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:F("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:S,onClick:S?void 0:f}),h?n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:v?n.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:k??F("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:S||g||v,onDisabledClick:v?()=>{}:void 0,"aria-busy":v||void 0,onClick:h}):v?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:k??F("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),E]})}function P_({title:e,sections:t,selected:a,onSelect:r,collapsible:l,defaultCollapsed:s,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:d,className:m}){const{t:p}=_e.useTranslation();return n.jsx(Ln,{className:m,title:e??p("wordSearch.filterTitle","\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815"),sections:t,selected:a,onSelect:r,collapsible:l,defaultCollapsed:s,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:d,align:"inline"})}function I_({title:e,headerAction:t,sections:a,selected:r,onSelect:l,className:s}){const{t:i}=_e.useTranslation();return a.length===0?null:n.jsx(Ln,{className:s,title:e??i("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:a,selected:r,onSelect:l,align:"newline"})}function F_({title:e,mode:t,onModeChange:a,matchMode:r,onMatchModeChange:l,positionCount:s,onPositionCountChange:i,inputMode:u,onInputModeChange:c,className:d}){const{t:m}=_e.useTranslation(),p={searchMode:m("wordPairs.filter.searchModeLabel","\uB300\uB9BD \uBC29\uC2DD"),phonemeOrder:m("wordPairs.filter.phonemeOrder","\uC785\uB825 \uC74C\uC808 \uC704\uCE58"),count:m("wordPairs.filter.countLabel","\uC785\uB825 \uC74C\uC808 \uAC2F\uC218"),inputMode:m("wordPairs.filter.inputModeLabel","\uC785\uB825 \uBC29\uC2DD"),orderAny:m("wordPairs.filter.orderAny","\uBB34\uAD00"),orderMatch:m("wordPairs.filter.orderMatch","\uC77C\uCE58"),include:m("wordPairs.mode.include","\uC74C\uC18C \uD3EC\uD568"),pick:m("wordPairs.mode.pick","\uC74C\uC18C \uB300\uB9BD"),explicit:m("wordPairs.mode.contrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815"),charInput:m("wordPairs.input.char","\uAE00\uC790 \uC120\uD0DD"),pronInput:m("wordPairs.input.pron","\uBC1C\uC74C \uC120\uD0DD")},C=h=>m("wordPairs.count",{n:h}),b=[{label:p.searchMode,items:[p.include,p.pick,p.explicit],display:"segmented",labelAction:n.jsx(Ha,{title:m("wordPairs.mode.infoTitle","\uB300\uB9BD \uBC29\uC2DD"),items:[m("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."),m("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."),m("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(Ha,{items:m("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:p.count,items:[C(1),C(2)],display:"segmented"},{label:p.inputMode,items:[p.charInput,p.pronInput],display:"segmented",labelAction:n.jsx(Ha,{title:m("wordPairs.input.infoTitle","\uC785\uB825 \uBC29\uC2DD"),items:[m("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."),m("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.")]})}],x={[p.searchMode]:t==="explicit"?p.explicit:t==="pick"?p.pick:p.include,[p.phonemeOrder]:r==="ordered"?p.orderMatch:p.orderAny,[p.count]:C(s),[p.inputMode]:u==="phoneme"?p.pronInput:p.charInput},f=(h,_)=>{_===p.searchMode?a(h===p.explicit?"explicit":h===p.pick?"pick":"include"):_===p.phonemeOrder?l(h===p.orderMatch?"ordered":"unordered"):_===p.count?i(h===C(2)?2:1):_===p.inputMode&&c(h===p.pronInput?"phoneme":"word")};return n.jsx(Ln,{className:d,title:e??m("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:b,selected:x,onSelect:f,align:"inline"})}function O_(e){const{title:t,items:a,columns:r,resizeStorageKey:l,gridTemplateColumns:s,mobileGridTemplateColumns:i,searchPlaceholder:u,searchFn:c,defaultSortKey:d,defaultSortAsc:m=!0,selectedId:p,selectedIds:C,onSelect:b,onClose:x,pageSizeOptions:f=[10,25,50,100],initialPageSize:h,emptyText:_,noMatchText:g,countLabel:k,topContent:v,className:B=""}=e,{t:y}=_e.useTranslation(),w=u??y("common.search","\uAC80\uC0C9"),A=_??y("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),E=g??y("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[D,N]=o.useState(""),[F,R]=o.useState(d??r[0]?.key??""),[K,L]=o.useState(m),[$,T]=o.useState(String(h??f[0]??10)),[J,q]=o.useState(1);o.useEffect(()=>{q(1)},[D,$]);const O=c!==null,Q=o.useCallback((oe,de)=>{if(!de)return!0;const re=de.toLowerCase();return r.some(z=>{const ne=oe[z.key];return ne==null?!1:String(ne).toLowerCase().includes(re)})},[r]),P=c??Q,V=o.useMemo(()=>{const oe=O?a.filter(de=>P(de,D)):a;return F?[...oe].sort((de,re)=>{const z=de[F],ne=re[F];return z===ne?0:ur(z,ne,K)}):oe},[a,D,F,K,O,P]),W=Math.max(1,Math.ceil(V.length/Number($)));J>W&&q(W);const G=Math.min(J,W),S=V.slice((G-1)*Number($),G*Number($)),M=o.useCallback(oe=>{F===oe?L(de=>!de):(R(oe),L(!0)),q(1)},[F]),I=o.useMemo(()=>{if(typeof k=="function"){const oe=V.length,de=k(oe);if(typeof de=="string"){const re=de.lastIndexOf(String(oe));if(re>=0)return{prefix:de.slice(0,re),suffix:de.slice(re+String(oe).length)}}return{label:de}}if(typeof k=="string"&&k.includes("{n}")){const[oe,de]=k.split("{n}");return{prefix:oe,suffix:de}}return{prefix:y("common.totalCountPrefix","\uCD1D "),suffix:y("common.totalCountSuffix","\uAC1C")}},[k,V.length,y]),Z=o.useMemo(()=>r.map(oe=>({label:oe.label,onClick:oe.sortable!==!1?()=>M(oe.key):void 0,className:oe.className,sortDir:oe.sortable!==!1&&F===oe.key?K?"asc":"desc":null})),[r,F,K,M]),le=o.useMemo(()=>f.map(oe=>({value:String(oe),label:y("common.pageSizeLabel",{n:oe})})),[f,y]);return n.jsxs(Wn,{className:`popup-list ${B}`,title:t,onClose:x,children:[v,"label"in I&&n.jsx("p",{className:"toolbar__count body-1",children:I.label}),n.jsx(Po,{count:"label"in I?void 0:{value:V.length,prefix:I.prefix,suffix:I.suffix},search:O?{value:D,onChange:N,placeholder:w}:void 0,pageSize:{options:le,value:$,onChange:T},pagination:{page:G,total:W,onChange:q}}),n.jsx(Ko,{size:"medium",gridTemplateColumns:s,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:l,fields:Z,items:S,onRowClick:b,renderRow:oe=>{const de=C!=null?oe.id!=null&&C.has(oe.id):p!=null&&oe.id===p;return r.map(re=>({content:re.render?re.render(oe):oe[re.key]??"",className:we(re.className,de&&"popup-list__row--selected")}))},empty:O&&D!==""&&a.length>0?E:A})]})}function ud(e){const{title:t,message:a,topContent:r,details:l,children:s,confirmLabel:i,cancelLabel:u,hideCancel:c=!1,extraAction:d,confirmVariant:m="main",confirmDisabled:p=!1,onConfirm:C,closeOnConfirm:b=!0,onClose:x,inline:f,size:h="small",className:_,initialFocus:g="close"}=e,{t:k}=_e.useTranslation(),v=o.useRef(null);o.useEffect(()=>{if(f||g==="close")return;const D=v.current?.closest(".popup-panel"),N=Array.from(D?.querySelectorAll(".popup-footer--buttons button")??[]),F=g==="confirm"?N[N.length-1]:c?void 0:N[d?1:0];F&&!F.disabled&&F.focus()},[]);const B=o.useRef(!1),[y,w]=o.useState(!1),A=D=>{let N=!1;return{close:()=>{N=!0,D()},didClose:()=>N}},E=async D=>{if(B.current)return;B.current=!0;const N=typeof document<"u"?document.activeElement:null;w(!0);let F=!1;try{F=await D()}catch(R){typeof console<"u"&&console.error(R)}finally{F||(B.current=!1,w(!1),requestAnimationFrame(()=>{const R=document.activeElement;(!R||R===document.body)&&N?.isConnected&&N.focus()}))}};return n.jsxs(Wn,{title:t,onClose:x,closeDisabled:y,inline:f,size:h,className:we("confirm-popup",r!=null&&"confirm-popup--has-top",_),buttons:[...d?[{label:d.label,variant:d.variant??"default",disabled:d.disabled||y,onClick:async({closeWithAnimation:D})=>{await E(async()=>{const N=A(D);await d.onClick(N.close);const F=d.closeOnClick??!0;return F&&D(),F||N.didClose()})}}]:[],...c?[]:[{label:u??k("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:y,onClick:({closeWithAnimation:D})=>D()}],{label:i??k("common.confirm","\uD655\uC778"),variant:m,disabled:p||y,onClick:async({closeWithAnimation:D})=>{await E(async()=>{const N=A(D);return await C(N.close),b&&D(),b||N.didClose()})}}],children:[r!=null&&n.jsx("div",{className:"confirm-popup__top",children:r}),l&&l.length>0&&n.jsx(Nr,{children:l.map((D,N)=>n.jsx($n,{label:D.label,children:n.jsx("span",{className:"panel-row__text body-2",children:D.value})},N))}),n.jsx("p",{ref:v,className:"body-2 confirm-popup__message",children:a}),s]})}function z_(e,t,a={}){const{t:r}=_e.useTranslation(),[l,s]=o.useState(!1),i=o.useRef(!1),u=o.useCallback(()=>{i.current=!0},[]),c=o.useCallback(()=>i.current?(i.current=!1,!0):e?(s(!0),!1):!0,[e]),d=l?n.jsx(ud,{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:()=>{s(!1),t()},onClose:()=>s(!1)}):null;return{beforeClose:c,discardPopup:d,allowClose:u}}function W_({onApply:e,onCancel:t}){const{t:a}=_e.useTranslation(),[r,l]=o.useState(""),[s,i]=o.useState(!1),[u,c]=o.useState(null),d=o.useRef(null),m=o.useId();o.useEffect(()=>{d.current?.focus()},[]);const p=o.useCallback(async x=>{const f=r.trim();if(f){i(!0),c(null);try{await e(f),x()}catch(h){c($l(h)),i(!1),requestAnimationFrame(()=>d.current?.focus())}}},[r,e]),C=o.useCallback((x,f)=>{x.key==="Enter"&&!x.nativeEvent.isComposing&&p(f)},[p]),b=x=>{l(x.target.value),c(null)};return n.jsx(Wn,{className:"coupon-input-popup",title:a("usage.couponButton","\uCFE0\uD3F0 \uC785\uB825"),size:"small",onClose:t,closeDisabled:s,buttons:[{label:a("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:s,onClick:({closeWithAnimation:x})=>x()},{label:a("coupons.applyButton","\uC801\uC6A9"),variant:"main",disabled:!r.trim()||s,onClick:({closeWithAnimation:x})=>{p(x)}}],children:({closeWithAnimation:x})=>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?m:void 0,"aria-describedby":u?m:void 0,placeholder:a("coupons.input.placeholder","\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"),value:r,onChange:b,onKeyDown:f=>C(f,x),disabled:s,autoComplete:"off",spellCheck:!1}),u&&n.jsx("p",{id:m,className:"coupon-input-popup__error caption-1",role:"alert",children:u})]})})}const cd=["var(--color-main)","var(--color-sub)"],H_=2e3;function V_(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 Ns({active:e=!1,count:t=40,duration:a=2e3,strength:r=1,onComplete:l,trigger:s=0}){const i=o.useMemo(()=>{const f=Math.floor(t/2),h=t-f,_=(g,k)=>Array.from({length:g}).map((v,B)=>{const y=6+Math.random()*12,w=Math.round(Math.min(18,y*Math.min(1.5,1+r*.4))),A=cd[Math.floor(Math.random()*cd.length)],E=Math.random()*300,D=(360+Math.random()*260)*r*1.2,N=(k==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,F=Math.cos(N)*D,R=Math.sin(N)*D*1.35,K=Math.random()*720-360,L=(1200+Math.random()*3e3)*Math.min(1.6,1+r*.3),$=Math.random()>.7?"50%":"3px";return{id:`${k}-${B}`,side:k,size:w,color:A,delay:E,vx:F,vy:R,angularVel:K,life:L,borderRadius:$}});return[..._(f,"left"),..._(h,"right")]},[t,r]),u=o.useRef(null),c=o.useRef({}),d=o.useRef(null),m=o.useRef(l);o.useEffect(()=>{m.current=l},[l]);const p=o.useRef(null),C=o.useRef(null),b=()=>{if(typeof document>"u")return null;let f=document.querySelector("[data-ihab-effect-root]");return f||(f=document.createElement("div"),f.className="app-effect",f.dataset.ihabEffectRoot="",f.style.position="fixed",f.style.inset="0",f.style.pointerEvents="none",f.style.zIndex="99998",document.body.appendChild(f)),f};if(typeof document<"u"&&C.current==null&&(C.current=b()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const Q=setTimeout(()=>m.current?.(),0);return()=>clearTimeout(Q)}const f=1200,h=performance.now(),_=C.current&&C.current!==document.body?C.current.getBoundingClientRect():null,g=Math.max(60,(window.innerHeight||800)*.05),k=Q=>Math.max(40,(Q||window.innerWidth)*.02),v=_?.width||window.innerWidth||375,B=_?.height||window.innerHeight||812,y=Q=>{const P=[...Q].sort((V,W)=>V-W);return P[Math.floor(P.length/2)]||1},w=y(i.map(Q=>Math.abs(Q.vy))),A=y(i.map(Q=>Math.abs(Q.vx))),E=Math.sqrt(2*f*(B*.72+g))/w,D=w*E/f,N=v*.5/(A*D),F=(Q,P,V)=>Math.min(V,Math.max(P,Q)),R=F(E,.8,2.4),K=F(N,.7,2.2),L=a>0?a/H_:1,$=i.map(Q=>({...Q,life:Q.life*L,vx:Q.vx*K,vy:Q.vy*R,startTime:h+Q.delay,ended:!1})),T=_?{x:_.left-k(_.width),y:_.top+_.height+g}:{x:-k(window.innerWidth),y:window.innerHeight+g},J=_?{x:_.left+_.width+k(_.width),y:_.top+_.height+g}:{x:window.innerWidth+k(window.innerWidth),y:window.innerHeight+g},q=Q=>{let P=!1;for(const V of $){const W=c.current[V.id];if(!W||!W)continue;if(Q<V.startTime){W.style.display="none",P=!0;continue}if(!V._inited){const z=V.side==="left"?T.x:J.x,ne=V.side==="left"?T.y:J.y;W.style.left=`${z}px`,W.style.top=`${ne}px`,W.style.transform="translate3d(0px, 0px, 0)",W.style.display="block",W.style.zIndex="100000",typeof V.color=="string"&&V.color.startsWith("var(")&&(W.style.background=V_(W,V.color)??"#FF0060"),V._inited=!0}const G=(Q-V.startTime)/1e3;if(G<0)continue;const S=V.life/1e3;if(G>=S){W.style.opacity="0",W.style.display="none",V.ended=!0;continue}P=!0;const M=V.side==="left"?T.x:J.x,I=V.side==="left"?T.y:J.y,Z=M+V.vx*G,le=I+V.vy*G+.5*f*G*G,oe=(V.angularVel||0)*G,de=Z-M,re=le-I;W.style.transform=`translate3d(${de}px, ${re}px, 0) rotate(${oe}deg)`,W.style.opacity=`${Math.max(0,1-G/S)}`}P?d.current=requestAnimationFrame(q):m.current?.()};d.current=requestAnimationFrame(q);const O=setTimeout(()=>{try{if((C.current?C.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const Q=document.createElement("div");Q.className="party-container",Q.style.position="fixed",Q.style.inset="0",Q.style.pointerEvents="none",Q.style.overflow="visible",Q.style.zIndex="2147483647";for(const P of i){const V=document.createElement("span");V.className=`confetti confetti--${P.side}`,V.setAttribute("aria-hidden","true"),V.style.display="none",V.style.position="fixed",V.style.left="0px",V.style.top="0px",V.style.width=`${P.size}px`,V.style.height=`${Math.max(4,P.size*.6)}px`,V.style.background=P.color,V.style.borderRadius=P.borderRadius,V.style.transform="translate3d(0,0,0)",V.style.opacity="0",Q.appendChild(V),c.current[P.id]=V}(document.body||C.current).appendChild(Q),p.current=Q}}catch{}},300);return()=>{if(d.current&&cancelAnimationFrame(d.current),clearTimeout(O),p.current){try{p.current.remove()}catch{}p.current=null}}},[e,a,s,i]),!e)return null;const x=n.jsx("div",{className:"party-container",ref:u,children:i.map(f=>n.jsx("span",{"aria-hidden":!0,ref:h=>{c.current[f.id]=h},className:`confetti confetti--${f.side}`,style:{width:`${f.size}px`,height:`${Math.max(4,f.size*.6)}px`,background:f.color,borderRadius:f.borderRadius}},`${f.id}-${s}`))});return typeof document<"u"?cn.createPortal(x,C.current||document.body):x}const Es=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function q_({trigger:e=0,active:t=!1}){const[a,r]=o.useState(null);o.useEffect(()=>{if(typeof window>"u")return;const s=i=>{const u=i.detail??{};r(c=>({n:(c?.n??0)+1,count:Es(u.count),strength:Es(u.strength),duration:Es(u.duration)}))};return window.addEventListener("party:trigger",s),()=>window.removeEventListener("party:trigger",s)},[]);const l=o.useCallback(()=>r(null),[]);return n.jsxs(n.Fragment,{children:[n.jsx(Ns,{active:t,trigger:e}),a&&n.jsx(Ns,{active:!0,trigger:a.n,count:a.count,strength:a.strength,duration:a.duration,onComplete:l})]})}function U_({title:e,sub:t,rightAction:a,titleAction:r,badge:l,badgeVariant:s="default",documentTitle:i,onBack:u,backLabel:c,wrap:d=!1}){const{t:m}=_e.useTranslation();Cy(typeof e=="string"?e:i??null);const p=c??m("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}),l&&n.jsx("div",{className:"page-title__badge",children:n.jsx($t,{label:l,size:"small",variant:s,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 G_(e){return e??""}const dd=o.createContext({words:[],loading:!1});function K_(){return o.useContext(dd)}function Y_({words:e,loading:t,error:a,statusMessage:r,localVersion:l,remoteVersion:s,progress:i,clearAndRefetch:u,checkRemoteVersion:c,children:d}){const m=o.useMemo(()=>({words:e,loading:t,error:a,statusMessage:r,localVersion:l,remoteVersion:s,progress:i,clearAndRefetch:u,checkRemoteVersion:c}),[e,t,a,r,l,s,i,u,c]);return n.jsx(dd.Provider,{value:m,children:d})}function Z_({items:e,actions:t,columns:a,flat:r=!1,className:l,style:s}){const i=a??e.length;return n.jsx("section",{className:we("summary-strip",r&&"summary-strip--flat",l),style:{"--summary-strip-cols":String(i),...s},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 X_=(e,t)=>`${e} / ${t}`;function J_({blocks:e,sectionTitles:t,logo:a,footer:r,pageLabel:l=X_,pageWidth:s,pageHeight:i,margin:u,className:c,style:d}){const{t:m}=_e.useTranslation(),p=o.useRef(null),C=o.useRef(null),b=o.useRef(null),x=o.useRef(null),[f,h]=o.useState(null),[_,g]=o.useState(!1);o.useEffect(()=>{const L=p.current;if(!L)return;const $=()=>g(L.scrollWidth>L.clientWidth+1);if($(),typeof ResizeObserver>"u")return;const T=new ResizeObserver($);return T.observe(L),()=>T.disconnect()},[f]);const k=e.map(L=>`${L.id}\0${L.section??""}\0${L.group??""}`).join(""),v=f&&f.shape===k?f.pages:null,[B,y]=o.useState(0);o.useEffect(()=>{const L=x.current;if(!L||typeof ResizeObserver>"u")return;const $=new ResizeObserver(()=>y(L.offsetHeight));return $.observe(L),()=>$.disconnect()},[]);const[w,A]=o.useState(0);o.useEffect(()=>{const L=C.current;if(!L||typeof ResizeObserver>"u")return;let $=null;const T=typeof requestAnimationFrame=="function"?O=>requestAnimationFrame(O):O=>setTimeout(O,16),J=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:O=>clearTimeout(O),q=new ResizeObserver(()=>{$==null&&($=T(()=>{$=null,A(O=>O+1)}))});return Array.from(L.children).forEach(O=>q.observe(O)),()=>{q.disconnect(),$!=null&&J($)}},[k]),o.useLayoutEffect(()=>{const L=C.current,$=x.current;if(!L||!$)return;const T=S=>S.getBoundingClientRect().height||S.offsetHeight,J=new Map;b.current?.querySelectorAll("[data-chrome-section]").forEach(S=>{J.set(S.dataset.chromeSection??"",T(S))});const q=S=>T($)-(J.get(S??"")??0),O=Array.from(L.children).map(S=>T(S)),Q=[];e.forEach((S,M)=>{const I=Q[Q.length-1],Z=I?e[I[0]]:void 0;Z&&S.group!=null&&Z.group===S.group&&Z.section===S.section?I.push(M):Q.push([M])});const P=[];let V=[],W=0;const G=()=>{V.length&&P.push(V),V=[],W=0};Q.forEach(S=>{const M=S.reduce((Z,le)=>Z+O[le],0),I=q(e[S[0]].section);V.length&&e[V[0]].section!==e[S[0]].section&&G(),M>I?S.forEach(Z=>{V.length&&W+O[Z]>I+.01&&G(),V.push(Z),W+=O[Z]}):(V.length&&W+M>I+.01&&G(),S.forEach(Z=>V.push(Z)),W+=M)}),G(),h(S=>S&&S.shape===k&&JSON.stringify(S.pages)===JSON.stringify(P)?S:{shape:k,pages:P})},[k,B,s,i,u,w]);const E=Mo,D=E,N=r??n.jsxs(n.Fragment,{children:[n.jsx("img",{src:D,alt:"IHAB",className:"report-doc__logo"}),"\xA9 IHAB, Inc. All rights reserved."]}),F=(L,$,T)=>({header:n.jsxs("div",{className:"report-doc__header",children:[n.jsx("h2",{className:"report-doc__title h3b",children:T!=null&&t?.[T]||null}),a]}),footer:n.jsxs("div",{className:"report-doc__footer caption-1",children:[n.jsx("span",{className:"report-doc__footer-left",children:N}),n.jsx("span",{className:"report-doc__page-no",children:l(L,$)})]})}),R=Array.from(new Set(e.map(L=>L.section??""))),K={...s?{"--report-page-w":s}: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:K,tabIndex:_?0:void 0,role:_?"group":void 0,"aria-label":_?m("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:x,className:"report-doc__ruler"}),n.jsx("div",{ref:b,children:R.map(L=>{const $=F(1,1,L||void 0);return n.jsxs("div",{"data-chrome-section":L,children:[$.header,$.footer]},L)})}),n.jsx("div",{ref:C,className:"report-doc__measure-blocks",children:e.map(L=>n.jsx("div",{children:L.content},L.id))})]}),v&&n.jsx("div",{className:"report-doc__pages",children:v.map((L,$)=>{const{header:T,footer:J}=F($+1,v.length,e[L[0]].section);return n.jsxs("section",{className:"report-doc__page",children:[T,L.map(q=>n.jsx("div",{children:e[q].content},e[q].id)),J]},$)})})]})}function Q_({title:e,fields:t,columns:a=4,className:r,style:l}){return n.jsxs("div",{className:we("report-info",r),style:{"--report-info-cols":String(a),...l},children:[e&&n.jsx("p",{className:"report-info__title h5b",children:e}),n.jsx("div",{className:"report-info__grid",children:t.map((s,i)=>n.jsxs("div",{className:"report-info__field body-2",children:[n.jsx("span",{className:"report-info__label body-3",children:s.label}),n.jsx("span",{className:"report-info__value",children:s.value})]},i))})]})}const na=new Map;let Lr=null;const ew=12;function tw(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 $r(){const e=new Map;for(const t of na.keys()){if(!t.isConnected)continue;const a=tw(t),r=e.get(a)??[];r.push(t),e.set(a,r)}for(const t of e.values()){t.sort((r,l)=>r.compareDocumentPosition(l)&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 l=r.getBoundingClientRect().height;l>0&&(a+=l+ew)}}}function nw(e){return typeof window>"u"?()=>{}:(na.set(e,(na.get(e)??0)+1),na.get(e)===1&&typeof ResizeObserver<"u"&&(Lr??(Lr=new ResizeObserver(()=>$r())),Lr.observe(e)),$r(),()=>{const t=(na.get(e)??1)-1;if(t>0){na.set(e,t),$r();return}na.delete(e),Lr?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),$r()})}function aw({title:e,message:t,actionLabel:a,onAction:r,icon:l,onClose:s,className:i=""}){const{t:u}=_e.useTranslation(),c=a??u("common.update","\uC5C5\uB370\uC774\uD2B8"),d=o.useRef(null),m=o.useRef(!1);return o.useLayoutEffect(()=>{const p=d.current,C=p?.parentElement?.closest(".update-alert-stack")??p,b=C?nw(C):null;return()=>{b?.(),m.current&&p&&p.contains(document.activeElement)&&sr(p)}},[]),n.jsxs("div",{ref:d,className:we("update-alert",i),role:"alert",children:[s&&n.jsx("button",{type:"button",className:"update-alert__close",onClick:()=>{m.current=!0,s()},"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:l??n.jsx(Os,{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 rw({title:e,titleLevel:t=3,description:a,topActions:r,children:l,footerLeft:s,footerRight:i,ariaLabel:u,onClick:c,draggable:d,onDragStart:m,onDragEnd:p,className:C}){const b=t?`h${t}`:"div",x=s!=null||i!=null,f=l!=null&&l!==!1,h=o.useCallback(_=>{c&&_.target===_.currentTarget&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),c())},[c]);return n.jsxs("div",{className:we("training-card",c?"training-card--clickable":"",C),onClick:c,onKeyDown:c?h: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:m,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(b,{className:"training-card__title h4",children:e}):e,r!=null&&n.jsx("div",{className:"training-card__top-actions",onClick:_=>_.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:" "})]}),f&&n.jsx("div",{className:"training-card__body",children:l}),x&&n.jsxs("div",{className:"training-card__footer",children:[s!=null&&n.jsx("div",{className:"training-card__footer-left",children:s}),i!=null&&n.jsx("div",{className:"training-card__meta",children:i})]})]})}function ow({title:e,titleLevel:t=3,count:a,collapsed:r=!1,onToggle:l,beforeSort:s,sort:i,actions:u,empty:c=!1,emptyContent:d,dragOver:m=!1,onDragOver:p,onDragLeave:C,onDrop:b,children:x,className:f}){const{t:h}=_e.useTranslation(),_=o.useId(),g=t?`h${t}`:"span",k=l!=null,v=we("training-card-group",m&&"training-card-group--dragover",r&&"training-card-group--collapsed",k&&"training-card-group--collapsible",f);return n.jsxs("div",{className:v,onDragOver:p,onDragLeave:C,onDrop:b,role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?_:void 0,children:[n.jsxs("header",{className:"training-card-group__header",children:[k&&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?h("common.expandFor",{name:e}):h("common.collapseFor",{name:e}):r?h("common.expand","\uD3BC\uCE58\uAE30"):h("common.collapse","\uC811\uAE30"),className:"training-card-group__chevron","aria-expanded":!r,onClick:l}),typeof e=="string"?n.jsx(g,{id:_,className:"training-card-group__title h5b",children:e}):e,a!==void 0&&n.jsx("span",{className:"training-card-group__count body-3b",children:a}),(s!=null||i||u!=null)&&n.jsxs("span",{className:"training-card-group__actions",onClick:B=>B.stopPropagation(),children:[s,i&&n.jsx(fn,{size:40,options:i.options,value:i.value,placeholder:i.placeholder,onChange:i.onChange,ariaLabel:typeof e=="string"&&e?h("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:x}))]})}const sw="speechear:saved_word_tables";function lw(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 iw(){try{const e=localStorage.getItem(sw);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(lw):[]}catch{return[]}}function pd(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 Ds(e){return e.map(t=>t.homonum!=null?`${t.word}#${t.homonum}`:t.word).join("|")}function uw(e){const t=new Set;return e.map(a=>{let r=a.id;for(let l=2;t.has(r);l++)r=`${a.id}~${l}`;return t.add(r),r===a.id?a:{...a,id:r}})}function cw({title:e,titleIcon:t,disc:a,filterTitle:r,filterCollapsible:l,filterDefaultCollapsed:s,filterCollapsed:i,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:d,code:m,items:p,onSaveComplete:C,onLoad:b,onRemoveItem:x,onReset:f,resetLabel:h,saveButtonLabel:_,secondarySaveButtonLabel:g,onReorder:k,showCellCount:v,onAddItem:B,className:y,renderSavePopup:w,renderWordSearch:A,hideControls:E,saveOnly:D,tableName:N,nameValue:F,onNameChange:R,descriptionValue:K,onDescriptionChange:L,namePlaceholder:$,descriptionPlaceholder:T,existingNames:J,editingName:q,onCancel:O,initialItemsPerPage:Q,renderCellAction:P,actionsLeftExtra:V}){const{t:W}=_e.useTranslation(),G=h??W("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),S=p===void 0,M=!!R,[I,Z]=o.useState([]),le=(F??"").trim(),oe=le||($??"").trim(),de=(K??"").trim()||(T??"").trim(),re=(J??[]).map(ee=>ee.trim().toLowerCase()),z=[q?.trim().toLowerCase(),...I].filter(ee=>!!ee),ne=[...re];for(const ee of z){const xe=ne.indexOf(ee);xe!==-1&&ne.splice(xe,1)}const H=le!==""&&ne.includes(le.toLowerCase()),[U,pe]=o.useState(Array(4).fill(null)),[Ee,ge]=o.useState(4),[me,ie]=o.useState(null),be=U.slice(0,Ee),he=!!d?.show,[ue,Me]=o.useState(!0),[Ve,Te]=o.useState(!0),qe=d&&{...d,top:ue,bottom:Ve},[Oe,ct]=o.useState("landscape"),[rt,nt]=o.useState(["image","word","standardPron"]),[mt,Ne]=o.useState("show"),[Ue,ke]=o.useState(!0),[He,Be]=o.useState(!0),Se=o.useRef(null),Le=o.useRef([]),[Ze,_t]=o.useState(Q==="all"?Number.POSITIVE_INFINITY:Q??8),[et,Xe]=o.useState("right"),[Nt,gt]=o.useState(!1),[wt,Et]=o.useState(!1),{toastMessage:ht,toastType:st,showWarning:Pe,clearToast:bt}=Oi("warning"),Bt=o.useCallback(()=>ie(null),[ie]);B&&!S&&!v&&Mt("word-table-block-add-without-cell-count",'[WordTableBlock] \uD45C\uC2DC \uBAA8\uB4DC\uC5D0\uC11C onAddItem \uC740 showCellCount \uC640 \uD568\uAED8 \uC918\uC57C "\uCD94\uAC00\uD558\uAE30" \uCE78\uC774 \uC0DD\uAE34\uB2E4.');const[lt,Tt]=o.useState(()=>Math.max(p?.length??1,1)),Ge=S?Ee:v?Math.max(lt,p?.length??1,1):Math.max(p?.length??0,1),{width:yt,height:Rt}=ga[Oe],Re=!S&&!v,ot=p?.length??0,Dt=Math.min(Ze,Math.max(ot,1)),Je=Re?Dt:Ge,St=Re?Xu(p??[],Je):null,ae=!!St&&St.length>1,ve=S?be.some(ee=>ee!==null&&ee.length>1):(p??[]).some(ee=>(ee.words??[]).length>1),ze=N?.trim()||`${Hl(La())} ${ve?W("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):W("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,Qe=o.useCallback(()=>ae?Le.current.filter(ee=>ee!==null):Se.current?[Se.current]:[],[ae]),{print:Ct,openNewWindow:it,downloadHtml:It}=ls({getElements:Qe,paperW:yt,paperH:Rt,fileName:ze,onPopupBlocked:()=>{Pe(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."))}}),Gt=ee=>{ge(ee),pe(xe=>xe.length>=ee?xe:[...xe,...Array(ee-xe.length).fill(null)]),ie(null)},An=ee=>{pe(xe=>{const $e=[...xe];return $e[ee]=null,$e}),me===ee&&ie(null)},Wt=ee=>{if(me===null)return;const xe=me;pe(We=>{const at=[...We];return at[xe]=ee.length>0?ee:null,at});const $e=be.findIndex((We,at)=>at>xe&&We===null);ie($e!==-1?$e:null)},Kt=S?be.some(ee=>ee?.some(xe=>!!xe.colloquialPronunciation)):(p??[]).some(ee=>(ee.words??[]).some(xe=>!!xe.colloquialLabel)),kt=o.useMemo(()=>sa()?S?U.slice(0,Ee).flatMap(ee=>(ee??[]).map(xe=>[xe.word,xe.homonum])):(p??[]).flatMap(ee=>(ee.words??[]).map(xe=>[xe.label,xe.homonum])):[],[S,U,Ee,p]),[dt,pt]=o.useState(!1);o.useEffect(()=>{if(kt.length===0)return;let ee=!1;return Promise.all(kt.map(([xe,$e])=>Nl(xe,$e))).then(xe=>{ee||pt(xe.some(Boolean))},()=>{}),()=>{ee=!0}},[kt]);const vt=kt.length>0&&dt,Yt=o.useMemo(()=>[...S||v?[{label:W("wordTable.filter.columns","\uCE78 \uC218"),items:N4.map(ee=>({value:`${ee}\uCE78`,displayLabel:W("wordTable.filter.column",{count:ee})})),display:"segmented"}]:[],...Re&&(p?.length??0)>0?[hc(W,{hasPairs:ve,itemCount:ot})]:[],...ae?[E4(W)]:[]],[W,S,v,Re,p?.length,ve,ot,ae]),gn={...S||v?{[W("wordTable.filter.columns","\uCE78 \uC218")]:`${Ge}\uCE78`}:{},...Re&&(p?.length??0)>0?{[W(ve?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${Dt}\uAC1C`}:{},...ae?{[W("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:et}:{}},Nn=(ee,xe)=>{xe===W("wordTable.filter.columns","\uCE78 \uC218")?S?Gt(parseInt(ee)):Tt(parseInt(ee)):xe===W(ve?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")?_t(Cc(parseInt(ee),ot)):xe===W("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&Xe(fc(ee))},tn=S?uw(be.filter(ee=>ee!==null&&ee.length>0).map(ee=>({id:Ds(ee),words:ee.map(pd)}))):p??[],Zt=()=>{S&&pe(ee=>ee.length>Ee?ee.slice(0,Ee):ee)},Ht=(ee=!1)=>{if(Et(ee),M&&C){const xe=oe.trim().toLowerCase();xe&&Z($e=>$e.includes(xe)?$e:[...$e,xe]),C(oe,tn,de||void 0,ee),Zt();return}if(D&&C){C("",tn,void 0,ee),Zt();return}if(C){gt(!0);return}It()},[bn,Xt]=o.useState(!1),[un,Ot]=o.useState(""),nn=un.trim(),se=nn!==""&&re.includes(nn.toLowerCase()),Ae=()=>{Ot(oe?W("wordTable.save.copyName",{name:oe,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),Xt(!0)},je=()=>{!nn||se||!C||(C(nn,tn,de||void 0,!0),Zt(),Xt(!1))},Ke=tn.length===0,Fe=Ke||M&&(oe===""||H),Y=()=>{if(Ke){Pe(W("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(M&&oe===""){Pe(W("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}M&&H&&Pe(W("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},ce=n.jsx(ba,{items:tn,orientation:Oe,contentTypes:rt,cutLine:mt,showOutline:Ue,showDivLine:He,count:Ge});return n.jsxs(n.Fragment,{children:[n.jsxs(fa,{type:"page",icon:t,title:e,disc:a,className:we("word-table-block",y),children:[bn&&n.jsx(Wn,{size:"small",title:g??W("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>Xt(!1),footer:({closeWithAnimation:ee})=>n.jsxs(n.Fragment,{children:[n.jsx(fe,{htmlType:"button",size:48,type:"bar",label:W("common.cancel","\uCDE8\uC18C"),onClick:ee}),n.jsx(fe,{htmlType:"button",size:48,type:"bar",variant:"main",label:W("common.save","\uC800\uC7A5"),disabled:!nn||se,onClick:je})]}),children:n.jsx(Xn,{label:W("wordTable.save.nameLabel","\uC774\uB984"),value:un,onChange:Ot,placeholder:W("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:je,error:se?W("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),Nt&&C&&w?.({defaultName:typeof e=="string"?e:W("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:ce,previewW:yt,previewH:Rt,items:tn,existingNames:iw().map(ee=>ee.name),saveAsNew:wt,onSave:(ee,xe)=>{C(ee,tn,xe,wt),Zt(),gt(!1)},onCancel:()=>gt(!1)}),(S||B)&&me!==null&&A?.({cellIndex:me,onConfirm:S?Wt:ee=>{if(B){const xe=ee[0];if(xe){const $e=new Set((p??[]).map(at=>at.id));let We=Ds([xe]);for(let at=2;$e.has(We);at++)We=`${Ds([xe])}~${at}`;B({id:We,words:[pd(xe)]})}}ie(null)},onClose:Bt}),!E&&n.jsx(as,{title:r,collapsible:l,defaultCollapsed:s,collapsed:i,onCollapsedChange:u,headerSummary:c,hasImage:vt,hasColloquial:Kt,contentTypes:rt,orientation:Oe,showOutline:Ue,cutLine:mt,showDivLine:He,setters:{setContentTypes:nt,setOrientation:ct,setShowOutline:ke,setCutLine:Ne,setShowDivLine:Be,setShowTopInfo:Me,setShowBottomInfo:Te},showCutLine:(Re?Je:Ge)>1,showDivLine2:ve,middleSections:Yt,extraSelected:gn,onExtraSelect:Nn,showPaperBands:he,showTopInfo:ue,showBottomInfo:Ve}),ae&&St?n.jsx("div",{className:"word-table-block__pages",children:St.map((ee,xe)=>n.jsx(ba,{orientation:Oe,contentTypes:rt,cutLine:mt,showOutline:Ue,showDivLine:He,count:Je,items:ee,onRemoveItem:x,onReorder:k&&(($e,We)=>k($e+xe*Je,We+xe*Je)),renderCellAction:P&&(($e,We)=>P($e+xe*Je,We)),brand:qe,code:m,contentRef:$e=>{Le.current[xe]=$e},pageNumber:{current:xe+1,total:St.length},pageNumberPosition:et},xe))}):n.jsx(ba,{orientation:Oe,contentTypes:rt,cutLine:mt,showOutline:Ue,showDivLine:He,count:Ge,items:S?void 0:p??[],editCells:S?be:void 0,activeCell:me,onActivateCell:S||B?ie:void 0,onRemoveCell:S?An:void 0,onRemoveItem:S?void 0:x,onReorder:S?void 0:k,renderCellAction:S?void 0:P,brand:qe,code:m,showFillerAdd:!!B,contentRef:Se}),!E&&!D&&V!=null&&n.jsx("div",{className:"word-table-block__table-actions",children:V}),M&&!E&&n.jsxs(Nr,{size:"medium",labelWidth:64,useBorder:!1,useRowBorder:!1,className:"word-table-block__meta",children:[n.jsx($n,{variant:"custom",label:W("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(Xn,{required:!0,value:F??"",onChange:R,placeholder:$?$+W("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):W("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:W("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:H?W("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:ee=>{(ee.key==="Tab"&&!ee.shiftKey||ee.key===" ")&&!(F??"").trim()&&($??"").trim()&&(ee.preventDefault(),R?.($??""))}})}),n.jsx($n,{variant:"custom",label:W("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(Xn,{value:K??"",onChange:L,placeholder:T?T+W("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):W("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:W("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:ee=>{(ee.key==="Tab"&&!ee.shiftKey||ee.key===" ")&&!(K??"").trim()&&(T??"").trim()&&(ee.preventDefault(),L?.(T??""))}})})]})]}),!E&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!D&&b&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:W("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:b}),!D&&f&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:G,onClick:f}),!D&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:W("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:it})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[O&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:W("common.cancel","\uCDE8\uC18C"),onClick:O}),!D&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:W("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:Ct}),g&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:g,onClick:()=>M?Ae():Ht(!0),disabled:Ke,onDisabledClick:()=>{Pe(W("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:_??W("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>Ht(!1),disabled:Fe,onDisabledClick:Y})]})]}),n.jsx(ha,{message:ht,type:st,onClose:bt})]})}const dw=8;function md({items:e,className:t}){const{t:a}=_e.useTranslation(),r=e.length,l=r<=3?1:2,s=dw,i=r>s,u=e.slice(0,i?s-1:s),c=r-u.length,d=Math.ceil(Math.min(r,s)/l)||1,m=l*d;return n.jsx("div",{className:we("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${l}, 1fr)`},children:Array.from({length:m},(p,C)=>{if(i&&C===s-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}}"})})},C);const b=u[C];return b?n.jsx("div",{className:"word-table-thumb__cell",children:(b.words?.length?b.words:[{label:b.id}]).map((x,f)=>n.jsxs(o.Fragment,{children:[f>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:x.label})]},f))},C):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},C)})})}function pw({items:e,name:t,description:a,createdAt:r,code:l,published:s,publishedLabel:i,shared:u,sharedLabel:c,isNew:d,publisherName:m,publishedAt:p,likeCount:C,downloadCount:b,onPublisherClick:x,selected:f,onClick:h,onMore:_,titleNode:g,className:k}){const{t:v}=_e.useTranslation(),B=g!=null,y=m!=null||p!=null||C!=null||b!=null,w=A=>{A.target===A.currentTarget&&!B&&(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),h?.())};return n.jsxs("div",{className:we("word-table-button",f?"word-table-button--selected":"",y?"":"word-table-button--no-footer",k),role:"button",tabIndex:0,"aria-label":l?`${t} (${l})`:t,onClick:B?void 0:h,onKeyDown:w,children:[d&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":v("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(md,{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:[g??n.jsx("div",{className:"word-table-button__title h4",children:t}),a&&n.jsx("div",{className:"word-table-button__desc body-3",children:a})]}),_&&!B&&n.jsx(fe,{htmlType:"button",className:"word-table-button__more",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:v("common.moreFor",{name:t}),onClick:A=>{A.stopPropagation(),_(A)}})]}),(l||r||s||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?Wl(r,v):""})}),n.jsxs("span",{className:"word-table-button__meta-right",children:[(s||u)&&n.jsxs("span",{className:"word-table-button__badges",children:[s&&n.jsx($t,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:i??v("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),u&&n.jsx($t,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:c??v("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),l&&n.jsx("span",{className:"word-table-button__code caption-1",children:l})]})]}),y&&n.jsxs("div",{className:"word-table-button__footer",children:[n.jsxs("span",{className:"word-table-button__store-by",children:[m&&(x?n.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":v("wordTable.publisherFilter",{name:m,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:A=>{A.stopPropagation(),x()},children:m}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:m})),p&&n.jsx("span",{className:"training-card__date body-4",children:Wl(p,v)})]}),n.jsxs("span",{className:"word-table-button__store-stats",children:[C!=null&&n.jsx($t,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(C),"aria-label":v("common.likeCount",{count:C,defaultValue:`\uC88B\uC544\uC694 ${C}`})}),b!=null&&n.jsx($t,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(b),"aria-label":v("common.downloadCount",{count:b,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${b}`})})]})]})]})}/**
|
|
1041
1041
|
* @license lucide-react v1.38.0 - ISC
|
|
1042
1042
|
*
|
|
1043
1043
|
* This source code is licensed under the ISC license.
|
|
1044
1044
|
* See the LICENSE file in the root directory of this source tree.
|
|
1045
|
-
*/const
|
|
1045
|
+
*/const mw=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],hw=te("image",mw);/**
|
|
1046
1046
|
* @license lucide-react v1.38.0 - ISC
|
|
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 hw=[["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"}]],Cw=te("circle-x",hw);function fw(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function Ss({icon:e,label:t,state:a,pct:r,subText:l}){const{t:s}=_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(Vs,{size:22,color:"white",strokeWidth:2.5}):c?n.jsx(Cw,{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(Lt,{variant:"sub",fill:"soft",size:"small",label:s("common.done","\uC644\uB8CC")}):c?n.jsx(Lt,{variant:"danger",fill:"soft",size:"small",label:s("common.failed","\uC2E4\uD328")}):(l||r!==void 0)&&n.jsxs("span",{className:"wdup-phase-card__sub body-3",children:[l,l&&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 gw({title:e,progress:t,onDone:a,onRetry:r,onClose:l,inline:s}){const{t:i}=_e.useTranslation(),{phase:u,error:c,wordCount:d,imagePage:m,imageDone:p,imageTotal:C,pairPercent:b}=t,x=fw(u),f=u==="done",h=!!c;function _(w){return h&&x===w?"error":x>w?"done":x===w?"active":"pending"}const g=_(1),k=_(2),v=_(3),B=u==="image-match"&&C?Math.round((p??0)/C*100):void 0,y=o.useMemo(()=>{if(k!=="done"){if(u==="image-list")return i("wordData.checkingPage",{page:m??1});if(u==="image-match"&&C)return i("wordData.imageCount",{done:po(p),total:po(C)})}},[k,u,m,C,p,i]);return n.jsx(Wn,{inline:s,className:"popup--word-data-update",title:e,footer:h&&r?n.jsx(fe,{htmlType:"button",size:56,variant:"main",onClick:r,children:i("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):h?n.jsx(fe,{htmlType:"button",size:56,variant:"main",onClick:l??a,children:i("common.close","\uB2EB\uAE30")}):n.jsx(fe,{htmlType:"button",size:56,variant:"main",disabled:!f,onClick:a,children:i("common.done","\uC644\uB8CC")}),children:n.jsxs("div",{className:"wdup-cards",children:[n.jsx(Ss,{icon:n.jsx(Fs,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:g,subText:g==="active"?i("wordData.downloadingCount",{n:po(d),count:d}):void 0}),n.jsx(Ss,{icon:n.jsx(mw,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:k,pct:B,subText:y}),n.jsx(Ss,{icon:n.jsx(Ws,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:v,pct:v==="active"?b??0:void 0,subText:void 0})]})})}function bw({enabled:e=!1,renderResultPopup:t}={}){const{t:a}=_e.useTranslation(),[r,l]=o.useState(null),[s,i]=o.useState(null),u=b=>{let x=null;b==="noise"?x={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}]}:b==="short"?x={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}]}:b==="long"?x={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}]}:b==="order"&&(x={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(x),l(b)},c=o.useCallback(()=>{l(null),i(null)},[]),d=o.useCallback(()=>u("noise"),[]),m=o.useCallback(()=>u("short"),[]),p=o.useCallback(()=>u("long"),[]),C=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:m,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:C,children:a("debug.showResult",{type:"Order",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})})]}),r&&s?t?.({score:s.score,contextsLength:s.contextsLength,results:s.results,onReplay:c,onClose:c}):null]}):null}exports.Accordion=Wy,exports.ActionCard=ay,exports.Alert=T2,exports.AppHeader=Ky,exports.AudioMeter=Uo,exports.AudioPlayer=fs,exports.Avatar=F2,exports.Badge=Lt,exports.BarChart=Mv,exports.BarChartControls=Eu,exports.Board=av,exports.BottomNav=Vi,exports.BrandIdentity=Yi,exports.BrandLogo=Av,exports.Breadcrumb=W2,exports.BulkBar=fv,exports.Button=fe,exports.CORE_VERSION=Gb,exports.Calendar=e4,exports.CardStep=nd,exports.ChartLegend=Io,exports.ChartSection=Fo,exports.ChartTotal=Ya,exports.Checkbox=xu,exports.ChoiceChips=ix,exports.CircleBadge=E2,exports.CodeBox=hv,exports.ColorPicker=G2,exports.CompanyMeta=uv,exports.ConfirmPopup=ud,exports.ConfirmStep=Qc,exports.ConfirmWithTextStep=ed,exports.ContrastFilterPanel=F_,exports.CoreScope=ry,exports.CountTile=Q2,exports.CouponInputPopup=W_,exports.DEFAULT_NOISE_SETTINGS=Qn,exports.DatePicker=Bv,exports.DebugResultLauncher=bw,exports.DescriptionTooltip=Kn,exports.DeviceSideTable=Xv,exports.Dialog=nv,exports.Divider=D2,exports.Dropdown=fn,exports.EffectPartyPopper=Ns,exports.EffectPartyPopperHost=q_,exports.EmptyState=ty,exports.ErrorState=ny,exports.FILTER_ALL_VALUE=xn,exports.FileUpload=z2,exports.FilterPanel=Ln,exports.FilterSectionInfo=Ha,exports.Footer=ux,exports.GameIntro=Rv,exports.Header=Zi,exports.Icon=tt,exports.IconGridMenu=lx,exports.IconRenderer=tt,exports.InfoTooltip=Dn,exports.ItemActions=bv,exports.LEVEL_MAX=va,exports.LINE_CHART_HOVER_DELAY_MS=Du,exports.LandingBottomSticky=dx,exports.LandingHeader=cx,exports.LineChart=$v,exports.ListPopup=O_,exports.ListenStep=Jc,exports.Loader=Ga,exports.MARKS=vr,exports.MARK_ICON=Ku,exports.MARK_VARIANT=Yu,exports.MediaQueryOverrideContext=ei,exports.MenuTooltip=Oa,exports.NOISE_RATIO_MAX=Xa,exports.NOISE_RATIO_STEP=wc,exports.NoisePlayerContext=ps,exports.NoiseSettingsTooltip=Vc,exports.NoticeBox=sy,exports.NotifyTextPreview=kv,exports.OrderListStep=td,exports.PASS_CARD_BG_VARS=Zn,exports.POS_LABEL=Ju,exports.PROMO_BANNER_BG_COMPONENTS=Ti,exports.PROMO_BANNER_BG_OPTIONS=my,exports.PROMO_BANNER_BG_VARS=Ra,exports.Page=Dr,exports.PageTitle=U_,exports.Pagination=Cr,exports.Panel=Nr,exports.PanelGrid=Qx,exports.PanelRow=$n,exports.PanelRowDevice=Jx,exports.PassCard=su,exports.PassCardBg=B2,exports.PassCardBgIHAB=k2,exports.PassCardBgLeftColorGrid=A2,exports.PassCardBgTwoCircle=tu,exports.PaymentPlan=w2,exports.PersonCard=rv,exports.PhonemeFilterPanel=I_,exports.PhonemeSelectBlock=R_,exports.Popup=Wn,exports.ProgressBar=Hv,exports.ProgressIndicator=Iu,exports.PromoBanner=Fy,exports.PromoBannerBgDark=gi,exports.PromoBannerBgDeep=di,exports.PromoBannerBgDiagonal=xi,exports.PromoBannerBgDots=wi,exports.PromoBannerBgInstagram=ji,exports.PromoBannerBgMain=oi,exports.PromoBannerBgNaver=Di,exports.PromoBannerBgOutline=ki,exports.PromoBannerBgRadial=yi,exports.PromoBannerBgSoft=li,exports.PromoBannerBgSoftSub=mi,exports.PromoBannerBgSub=ui,exports.PromoBannerBgSuccess=Ni,exports.PromoBannerBgWarm=Ci,exports.PublicationCard=sv,exports.Radio=cu,exports.RadioGroup=S2,exports.Rating=V2,exports.ReportDocument=J_,exports.ReportInfoPanel=Q_,exports.RingChart=Iv,exports.SENTENCE_TRAINING_TYPES=is,exports.SearchSummary=$2,exports.Section=fa,exports.SectionHeadFloat=Bu,exports.SectionHeader=iv,exports.SegmentedControl=wn,exports.ShortcutBadge=uu,exports.SideNav=Ki,exports.Slider=Lu,exports.SoundCompass=N2,exports.SplashLogo=lv,exports.StatChart=Fv,exports.SummaryStrip=Z_,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=pu,exports.Table=Ko,exports.TableFilterPanel=as,exports.Tabs=R2,exports.TextBoxTooltip=Ar,exports.TextField=Xn,exports.Timeline=ov,exports.Toast=ha,exports.Toggle=vu,exports.Toolbar=Po,exports.Tooltip=vn,exports.TooltipInfo=Dn,exports.TooltipTextBox=Ar,exports.TopBanner=Oy,exports.TrainingBlock=n4,exports.TrainingBlockButton=Lo,exports.TrainingBlockGrid=r4,exports.TrainingCard=rw,exports.TrainingCardGroup=ow,exports.TrainingPagePopup=Hn,exports.TrainingPagePopupBottom=qc,exports.TrainingPagePopupTitle=Uc,exports.TrainingResultPopup=sd,exports.TrainingStep=ea,exports.TrainingStepAudioPlayer=fs,exports.TrainingStepBullet=Rc,exports.TrainingStepCard=Oc,exports.TrainingStepConfirm=bs,exports.TrainingStepConfirmWithText=ys,exports.TrainingStepListen=vs,exports.TrainingStepOrderList=xs,exports.TrainingStepTextBox=Fc,exports.TrainingStepTitle=Ic,exports.TrainingTooltip=mu,exports.TrainingWordCard=Jo,exports.UpdateAlert=aw,exports.WAVE_A_MAX=kx,exports.WAVE_H1_PX=hs,exports.WAVE_HMAX_PX=Bx,exports.WORD_LABEL_I18N_KEYS=h4,exports.WORD_TABLE_PAPER=ga,exports.WORD_TYPE_LABEL=Qu,exports.WordDataProvider=Y_,exports.WordDataUpdatePopup=gw,exports.WordImageTooltip=id,exports.WordSearchFilterPanel=P_,exports.WordSearchResultBlock=L_,exports.WordTable=ba,exports.WordTableBlock=cw,exports.WordTableButton=dw,exports.WordTablePopup=M4,exports.WordTableThumbnail=md,exports.buildMonthChartData=Ev,exports.cellKey=z4,exports.cellLabel=O4,exports.cellsForLabels=Q4,exports.clearPassCardBgTheme=Tn,exports.clearPromoBannerBgTheme=en,exports.closeTrainingPopup=r_,exports.companyTypeLabel=G_,exports.createTrainingScenario=l_,exports.cx=we,exports.deriveNoiseContexts=m_,exports.derivePassCard=Ji,exports.draftValues=ox,exports.effectiveNoiseVolume=cs,exports.effectiveSpeechVolume=kc,exports.expandSlashLabel=ns,exports.formatDuration=ex,exports.getControlDateRange=Pv,exports.getPayloadTimestamp=ws,exports.getPromoBannerBgTheme=_o,exports.getSelectedFromPayload=u_,exports.getSelectedText=c_,exports.getStepPayload=Zc,exports.getSteppedPayload=d_,exports.injectPassCardBgTheme=jn,exports.injectPromoBannerBgTheme=Qt,exports.isSelectionCorrect=p_,exports.labelOfCellKey=xc,exports.labelsForSave=F4,exports.levelToPct=mx,exports.markAfterClick=Gu,exports.marksForSave=Qo,exports.mergeNoiseSettings=Jn,exports.missesByType=Y4,exports.monthKeyOf=Za,exports.monthKeyOfDate=Oo,exports.nextFocus=q4,exports.nextMisses=K4,exports.noiseElementVolume=ds,exports.noiseRatioOf=Ja,exports.pageStartIndexes=Zu,exports.parseMonthKey=ma,exports.passCardBgIhabTheme=lu,exports.passCardBgLeftColorGridTheme=iu,exports.passCardBgTwoCircleTheme=eu,exports.pctToLevel=hx,exports.posLabels=ec,exports.printWordTable=c4,exports.promoBannerBgDarkTheme=fi,exports.promoBannerBgDeepTheme=ci,exports.promoBannerBgDiagonalTheme=vi,exports.promoBannerBgDotsTheme=_i,exports.promoBannerBgInstagramTheme=Si,exports.promoBannerBgMainTheme=ri,exports.promoBannerBgNaverTheme=Ei,exports.promoBannerBgOutlineTheme=Bi,exports.promoBannerBgRadialTheme=bi,exports.promoBannerBgSoftSubTheme=pi,exports.promoBannerBgSoftTheme=si,exports.promoBannerBgSubTheme=ii,exports.promoBannerBgSuccessTheme=Ai,exports.promoBannerBgWarmTheme=hi,exports.recommendTables=X4,exports.regenerateUnpinned=rx,exports.removeItem=ax,exports.resolveTrainingItems=s_,exports.resolveTrainingPopupMeta=Kc,exports.reviewCells=$4,exports.reviewMeta=I4,exports.reviewSetPlan=Z4,exports.reviewTableName=P4,exports.scoreKey=yr,exports.scoreSheetHeader=W4,exports.shouldConfirmDiscard=u4,exports.splitTrainingVariants=o_,exports.summarize=i4,exports.summarizeMisses=G4,exports.tableTrends=V4,exports.toDraft=tx,exports.toTrainingText=i_,exports.togglePin=nx,exports.uncoveredLabels=J4,exports.useAnchoredMenu=Fa,exports.useBarChartControl=Nu,exports.useCalendarMonth=_u,exports.useComboboxSuggestions=bu,exports.useDiscardGuard=z_,exports.useFitScale=ac,exports.useNoisePlayer=_r,exports.useSoundCompassExam=jy,exports.useToastLifecycle=Ru,exports.useWordData=K_,exports.useWordTableDisplaySettings=yc,exports.useWordTablePrint=ls,exports.waveBarPx=Br,exports.waveBarVal=kr,exports.weakItems=H4,exports.weekValueOf=zo,exports.withStepTimes=Yc,exports.wordTypeLabels=tc;
|
|
1050
|
+
*/const Cw=[["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"}]],fw=te("circle-x",Cw);function gw(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function Ss({icon:e,label:t,state:a,pct:r,subText:l}){const{t:s}=_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(Vs,{size:22,color:"white",strokeWidth:2.5}):c?n.jsx(fw,{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($t,{variant:"sub",fill:"soft",size:"small",label:s("common.done","\uC644\uB8CC")}):c?n.jsx($t,{variant:"danger",fill:"soft",size:"small",label:s("common.failed","\uC2E4\uD328")}):(l||r!==void 0)&&n.jsxs("span",{className:"wdup-phase-card__sub body-3",children:[l,l&&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 bw({title:e,progress:t,onDone:a,onRetry:r,onClose:l,inline:s}){const{t:i}=_e.useTranslation(),{phase:u,error:c,wordCount:d,imagePage:m,imageDone:p,imageTotal:C,pairPercent:b}=t,x=gw(u),f=u==="done",h=!!c;function _(w){return h&&x===w?"error":x>w?"done":x===w?"active":"pending"}const g=_(1),k=_(2),v=_(3),B=u==="image-match"&&C?Math.round((p??0)/C*100):void 0,y=o.useMemo(()=>{if(k!=="done"){if(u==="image-list")return i("wordData.checkingPage",{page:m??1});if(u==="image-match"&&C)return i("wordData.imageCount",{done:po(p),total:po(C)})}},[k,u,m,C,p,i]);return n.jsx(Wn,{inline:s,className:"popup--word-data-update",title:e,footer:h&&r?n.jsx(fe,{htmlType:"button",size:56,variant:"main",onClick:r,children:i("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):h?n.jsx(fe,{htmlType:"button",size:56,variant:"main",onClick:l??a,children:i("common.close","\uB2EB\uAE30")}):n.jsx(fe,{htmlType:"button",size:56,variant:"main",disabled:!f,onClick:a,children:i("common.done","\uC644\uB8CC")}),children:n.jsxs("div",{className:"wdup-cards",children:[n.jsx(Ss,{icon:n.jsx(Fs,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:g,subText:g==="active"?i("wordData.downloadingCount",{n:po(d),count:d}):void 0}),n.jsx(Ss,{icon:n.jsx(hw,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:k,pct:B,subText:y}),n.jsx(Ss,{icon:n.jsx(Ws,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:v,pct:v==="active"?b??0:void 0,subText:void 0})]})})}function yw({enabled:e=!1,renderResultPopup:t}={}){const{t:a}=_e.useTranslation(),[r,l]=o.useState(null),[s,i]=o.useState(null),u=b=>{let x=null;b==="noise"?x={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}]}:b==="short"?x={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}]}:b==="long"?x={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}]}:b==="order"&&(x={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(x),l(b)},c=o.useCallback(()=>{l(null),i(null)},[]),d=o.useCallback(()=>u("noise"),[]),m=o.useCallback(()=>u("short"),[]),p=o.useCallback(()=>u("long"),[]),C=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:m,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:C,children:a("debug.showResult",{type:"Order",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})})]}),r&&s?t?.({score:s.score,contextsLength:s.contextsLength,results:s.results,onReplay:c,onClose:c}):null]}):null}exports.Accordion=Wy,exports.ActionCard=ay,exports.Alert=T2,exports.AppHeader=Ky,exports.AudioMeter=Uo,exports.AudioPlayer=fs,exports.Avatar=F2,exports.Badge=$t,exports.BarChart=Mv,exports.BarChartControls=Eu,exports.Board=av,exports.BottomNav=Vi,exports.BrandIdentity=Yi,exports.BrandLogo=Av,exports.Breadcrumb=W2,exports.BulkBar=fv,exports.Button=fe,exports.CORE_VERSION=Gb,exports.Calendar=e4,exports.CardStep=nd,exports.ChartLegend=Io,exports.ChartSection=Fo,exports.ChartTotal=Ya,exports.Checkbox=xu,exports.ChoiceChips=ix,exports.CircleBadge=E2,exports.CodeBox=hv,exports.ColorPicker=G2,exports.CompanyMeta=uv,exports.ConfirmPopup=ud,exports.ConfirmStep=Qc,exports.ConfirmWithTextStep=ed,exports.ContrastFilterPanel=F_,exports.CoreScope=ry,exports.CountTile=Q2,exports.CouponInputPopup=W_,exports.DEFAULT_NOISE_SETTINGS=Qn,exports.DatePicker=Bv,exports.DebugResultLauncher=yw,exports.DescriptionTooltip=Kn,exports.DeviceSideTable=Xv,exports.Dialog=nv,exports.Divider=D2,exports.Dropdown=fn,exports.EffectPartyPopper=Ns,exports.EffectPartyPopperHost=q_,exports.EmptyState=ty,exports.ErrorState=ny,exports.FILTER_ALL_VALUE=xn,exports.FileUpload=z2,exports.FilterPanel=Ln,exports.FilterSectionInfo=Ha,exports.Footer=ux,exports.GameIntro=Rv,exports.Header=Zi,exports.Icon=tt,exports.IconGridMenu=lx,exports.IconRenderer=tt,exports.InfoTooltip=Dn,exports.ItemActions=bv,exports.LEVEL_MAX=va,exports.LINE_CHART_HOVER_DELAY_MS=Du,exports.LandingBottomSticky=dx,exports.LandingHeader=cx,exports.LineChart=$v,exports.ListPopup=O_,exports.ListenStep=Jc,exports.Loader=Ga,exports.MARKS=vr,exports.MARK_ICON=Ku,exports.MARK_VARIANT=Yu,exports.MediaQueryOverrideContext=ei,exports.MenuTooltip=Oa,exports.NOISE_RATIO_MAX=Xa,exports.NOISE_RATIO_STEP=wc,exports.NoisePlayerContext=ps,exports.NoiseSettingsTooltip=Vc,exports.NoticeBox=sy,exports.NotifyTextPreview=kv,exports.OrderListStep=td,exports.PASS_CARD_BG_VARS=Zn,exports.POS_LABEL=Ju,exports.PROMO_BANNER_BG_COMPONENTS=Ti,exports.PROMO_BANNER_BG_OPTIONS=my,exports.PROMO_BANNER_BG_VARS=Ra,exports.Page=Dr,exports.PageTitle=U_,exports.Pagination=Cr,exports.Panel=Nr,exports.PanelGrid=Qx,exports.PanelRow=$n,exports.PanelRowDevice=Jx,exports.PassCard=su,exports.PassCardBg=B2,exports.PassCardBgIHAB=k2,exports.PassCardBgLeftColorGrid=A2,exports.PassCardBgTwoCircle=tu,exports.PaymentPlan=w2,exports.PersonCard=rv,exports.PhonemeFilterPanel=I_,exports.PhonemeSelectBlock=R_,exports.Popup=Wn,exports.ProgressBar=Hv,exports.ProgressIndicator=Iu,exports.PromoBanner=Fy,exports.PromoBannerBgDark=gi,exports.PromoBannerBgDeep=di,exports.PromoBannerBgDiagonal=xi,exports.PromoBannerBgDots=wi,exports.PromoBannerBgInstagram=ji,exports.PromoBannerBgMain=oi,exports.PromoBannerBgNaver=Di,exports.PromoBannerBgOutline=ki,exports.PromoBannerBgRadial=yi,exports.PromoBannerBgSoft=li,exports.PromoBannerBgSoftSub=mi,exports.PromoBannerBgSub=ui,exports.PromoBannerBgSuccess=Ni,exports.PromoBannerBgWarm=Ci,exports.PublicationCard=sv,exports.Radio=cu,exports.RadioGroup=S2,exports.Rating=V2,exports.ReportDocument=J_,exports.ReportInfoPanel=Q_,exports.RingChart=Iv,exports.SENTENCE_TRAINING_TYPES=is,exports.SearchSummary=$2,exports.Section=fa,exports.SectionHeadFloat=Bu,exports.SectionHeader=iv,exports.SegmentedControl=wn,exports.ShortcutBadge=uu,exports.SideNav=Ki,exports.Slider=Lu,exports.SoundCompass=N2,exports.SplashLogo=lv,exports.StatChart=Fv,exports.SummaryStrip=Z_,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=pu,exports.Table=Ko,exports.TableFilterPanel=as,exports.Tabs=R2,exports.TextBoxTooltip=Ar,exports.TextField=Xn,exports.Timeline=ov,exports.Toast=ha,exports.Toggle=vu,exports.Toolbar=Po,exports.Tooltip=vn,exports.TooltipInfo=Dn,exports.TooltipTextBox=Ar,exports.TopBanner=Oy,exports.TrainingBlock=n4,exports.TrainingBlockButton=Lo,exports.TrainingBlockGrid=r4,exports.TrainingCard=rw,exports.TrainingCardGroup=ow,exports.TrainingPagePopup=Hn,exports.TrainingPagePopupBottom=qc,exports.TrainingPagePopupTitle=Uc,exports.TrainingResultPopup=sd,exports.TrainingStep=ea,exports.TrainingStepAudioPlayer=fs,exports.TrainingStepBullet=Rc,exports.TrainingStepCard=Oc,exports.TrainingStepConfirm=bs,exports.TrainingStepConfirmWithText=ys,exports.TrainingStepListen=vs,exports.TrainingStepOrderList=xs,exports.TrainingStepTextBox=Fc,exports.TrainingStepTitle=Ic,exports.TrainingTooltip=mu,exports.TrainingWordCard=Jo,exports.UpdateAlert=aw,exports.WAVE_A_MAX=kx,exports.WAVE_H1_PX=hs,exports.WAVE_HMAX_PX=Bx,exports.WORD_LABEL_I18N_KEYS=h4,exports.WORD_TABLE_PAPER=ga,exports.WORD_TYPE_LABEL=Qu,exports.WordDataProvider=Y_,exports.WordDataUpdatePopup=bw,exports.WordImageTooltip=id,exports.WordSearchFilterPanel=P_,exports.WordSearchResultBlock=L_,exports.WordTable=ba,exports.WordTableBlock=cw,exports.WordTableButton=pw,exports.WordTablePopup=M4,exports.WordTableThumbnail=md,exports.buildMonthChartData=Ev,exports.cellKey=z4,exports.cellLabel=O4,exports.cellsForLabels=Q4,exports.clearPassCardBgTheme=Tn,exports.clearPromoBannerBgTheme=en,exports.closeTrainingPopup=r_,exports.companyTypeLabel=G_,exports.createTrainingScenario=l_,exports.cx=we,exports.deriveNoiseContexts=m_,exports.derivePassCard=Ji,exports.draftValues=ox,exports.effectiveNoiseVolume=cs,exports.effectiveSpeechVolume=kc,exports.expandSlashLabel=ns,exports.formatDuration=ex,exports.getControlDateRange=Pv,exports.getPayloadTimestamp=ws,exports.getPromoBannerBgTheme=_o,exports.getSelectedFromPayload=u_,exports.getSelectedText=c_,exports.getStepPayload=Zc,exports.getSteppedPayload=d_,exports.injectPassCardBgTheme=jn,exports.injectPromoBannerBgTheme=Qt,exports.isSelectionCorrect=p_,exports.labelOfCellKey=xc,exports.labelsForSave=F4,exports.levelToPct=mx,exports.markAfterClick=Gu,exports.marksForSave=Qo,exports.mergeNoiseSettings=Jn,exports.missesByType=Y4,exports.monthKeyOf=Za,exports.monthKeyOfDate=Oo,exports.nextFocus=q4,exports.nextMisses=K4,exports.noiseElementVolume=ds,exports.noiseRatioOf=Ja,exports.pageStartIndexes=Zu,exports.parseMonthKey=ma,exports.passCardBgIhabTheme=lu,exports.passCardBgLeftColorGridTheme=iu,exports.passCardBgTwoCircleTheme=eu,exports.pctToLevel=hx,exports.posLabels=ec,exports.printWordTable=c4,exports.promoBannerBgDarkTheme=fi,exports.promoBannerBgDeepTheme=ci,exports.promoBannerBgDiagonalTheme=vi,exports.promoBannerBgDotsTheme=_i,exports.promoBannerBgInstagramTheme=Si,exports.promoBannerBgMainTheme=ri,exports.promoBannerBgNaverTheme=Ei,exports.promoBannerBgOutlineTheme=Bi,exports.promoBannerBgRadialTheme=bi,exports.promoBannerBgSoftSubTheme=pi,exports.promoBannerBgSoftTheme=si,exports.promoBannerBgSubTheme=ii,exports.promoBannerBgSuccessTheme=Ai,exports.promoBannerBgWarmTheme=hi,exports.recommendTables=X4,exports.regenerateUnpinned=rx,exports.removeItem=ax,exports.resolveTrainingItems=s_,exports.resolveTrainingPopupMeta=Kc,exports.reviewCells=$4,exports.reviewMeta=I4,exports.reviewSetPlan=Z4,exports.reviewTableName=P4,exports.scoreKey=yr,exports.scoreSheetHeader=W4,exports.shouldConfirmDiscard=u4,exports.splitTrainingVariants=o_,exports.summarize=i4,exports.summarizeMisses=G4,exports.tableTrends=V4,exports.toDraft=tx,exports.toTrainingText=i_,exports.togglePin=nx,exports.uncoveredLabels=J4,exports.useAnchoredMenu=Fa,exports.useBarChartControl=Nu,exports.useCalendarMonth=_u,exports.useComboboxSuggestions=bu,exports.useDiscardGuard=z_,exports.useFitScale=ac,exports.useNoisePlayer=_r,exports.useSoundCompassExam=jy,exports.useToastLifecycle=Ru,exports.useWordData=K_,exports.useWordTableDisplaySettings=yc,exports.useWordTablePrint=ls,exports.waveBarPx=Br,exports.waveBarVal=kr,exports.weakItems=H4,exports.weekValueOf=zo,exports.withStepTimes=Yc,exports.wordTypeLabels=tc;
|