@ihabdevteam/core 0.402.0 → 0.404.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.
@@ -1,24 +1,24 @@
1
- "use strict";var n=require("react/jsx-runtime"),o=require("react"),Gt=require("i18next"),xe=require("react-i18next"),dn=require("react-dom"),Tn=typeof document<"u"?document.currentScript:null;function Bd(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 Ps=Bd(o);function ke(...e){return e.filter(Boolean).join(" ")}const Is=new Set,zn=(()=>{try{const e=globalThis;return e.process!=null&&e.process.env?.NODE_ENV!=="production"}catch{return!1}})();function kt(e,...t){!zn||Is.has(e)||(Is.add(e),console.warn(...t))}/**
1
+ "use strict";var n=require("react/jsx-runtime"),o=require("react"),Kt=require("i18next"),_e=require("react-i18next"),hn=require("react-dom"),Tn=typeof document<"u"?document.currentScript:null;function Bd(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 Ps=Bd(o);function Be(...e){return e.filter(Boolean).join(" ")}const Fs=new Set,zn=(()=>{try{const e=globalThis;return e.process!=null&&e.process.env?.NODE_ENV!=="production"}catch{return!1}})();function At(e,...t){!zn||Fs.has(e)||(Fs.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.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const Fs=(...e)=>e.filter((t,a,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===a).join(" ").trim();/**
6
+ */const Is=(...e)=>e.filter((t,a,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===a).join(" ").trim();/**
7
7
  * @license lucide-react v1.38.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const Ad=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
11
+ */const kd=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
12
12
  * @license lucide-react v1.38.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const kd=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,r)=>r?r.toUpperCase():a.toLowerCase());/**
16
+ */const Ad=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,r)=>r?r.toUpperCase():a.toLowerCase());/**
17
17
  * @license lucide-react v1.38.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const Os=e=>{const t=kd(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
21
+ */const Os=e=>{const t=Ad(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
22
22
  * @license lucide-react v1.38.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
@@ -28,12 +28,12 @@
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const Nd=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},Ed=o.createContext({}),Dd=()=>o.useContext(Ed),Sd=o.forwardRef(({color:e,size:t,strokeWidth:a,absoluteStrokeWidth:r,className:s="",children:l,iconNode:i,...u},c)=>{const{size:d=24,strokeWidth:h=2,absoluteStrokeWidth:p=!1,color:C="currentColor",className:g=""}=Dd()??{},_=r??p?Number(a??h)*24/Number(t??d):a??h;return o.createElement("svg",{ref:c,...Wr,width:t??d??Wr.width,height:t??d??Wr.height,stroke:e??C,strokeWidth:_,className:Fs("lucide",g,s),...!l&&!Nd(u)&&{"aria-hidden":"true"},...u},[...i.map(([m,f])=>o.createElement(m,f)),...Array.isArray(l)?l:[l]])});/**
31
+ */const Nd=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},Ed=o.createContext({}),Dd=()=>o.useContext(Ed),Sd=o.forwardRef(({color:e,size:t,strokeWidth:a,absoluteStrokeWidth:r,className:s="",children:l,iconNode:i,...u},c)=>{const{size:d=24,strokeWidth:h=2,absoluteStrokeWidth:p=!1,color:m="currentColor",className:g=""}=Dd()??{},y=r??p?Number(a??h)*24/Number(t??d):a??h;return o.createElement("svg",{ref:c,...Wr,width:t??d??Wr.width,height:t??d??Wr.height,stroke:e??m,strokeWidth:y,className:Is("lucide",g,s),...!l&&!Nd(u)&&{"aria-hidden":"true"},...u},[...i.map(([C,f])=>o.createElement(C,f)),...Array.isArray(l)?l:[l]])});/**
32
32
  * @license lucide-react v1.38.0 - ISC
33
33
  *
34
34
  * This source code is licensed under the ISC license.
35
35
  * See the LICENSE file in the root directory of this source tree.
36
- */const re=(e,t)=>{const a=o.forwardRef(({className:r,...s},l)=>o.createElement(Sd,{ref:l,iconNode:t,className:Fs(`lucide-${Ad(Os(e))}`,`lucide-${e}`,r),...s}));return a.displayName=Os(e),a};/**
36
+ */const re=(e,t)=>{const a=o.forwardRef(({className:r,...s},l)=>o.createElement(Sd,{ref:l,iconNode:t,className:Is(`lucide-${kd(Os(e))}`,`lucide-${e}`,r),...s}));return a.displayName=Os(e),a};/**
37
37
  * @license lucide-react v1.38.0 - ISC
38
38
  *
39
39
  * This source code is licensed under the ISC license.
@@ -58,7 +58,7 @@
58
58
  *
59
59
  * This source code is licensed under the ISC license.
60
60
  * See the LICENSE file in the root directory of this source tree.
61
- */const Id=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Fd=re("arrow-right",Id);/**
61
+ */const Fd=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Id=re("arrow-right",Fd);/**
62
62
  * @license lucide-react v1.38.0 - ISC
63
63
  *
64
64
  * This source code is licensed under the ISC license.
@@ -168,7 +168,7 @@
168
168
  *
169
169
  * This source code is licensed under the ISC license.
170
170
  * See the LICENSE file in the root directory of this source tree.
171
- */const Ap=[["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"m17 7 5 5-5 5",key:"1xlxn0"}],["path",{d:"m7 7-5 5 5 5",key:"19njba"}],["path",{d:"M8 12h.01",key:"czm47f"}]],kp=re("chevrons-left-right-ellipsis",Ap);/**
171
+ */const kp=[["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"m17 7 5 5-5 5",key:"1xlxn0"}],["path",{d:"m7 7-5 5 5 5",key:"19njba"}],["path",{d:"M8 12h.01",key:"czm47f"}]],Ap=re("chevrons-left-right-ellipsis",kp);/**
172
172
  * @license lucide-react v1.38.0 - ISC
173
173
  *
174
174
  * This source code is licensed under the ISC license.
@@ -203,12 +203,12 @@
203
203
  *
204
204
  * This source code is licensed under the ISC license.
205
205
  * See the LICENSE file in the root directory of this source tree.
206
- */const Pp=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],Ip=re("pen",Pp);/**
206
+ */const Pp=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],Fp=re("pen",Pp);/**
207
207
  * @license lucide-react v1.38.0 - ISC
208
208
  *
209
209
  * This source code is licensed under the ISC license.
210
210
  * See the LICENSE file in the root directory of this source tree.
211
- */const Fp=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],Op=re("pen-line",Fp);/**
211
+ */const Ip=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],Op=re("pen-line",Ip);/**
212
212
  * @license lucide-react v1.38.0 - ISC
213
213
  *
214
214
  * This source code is licensed under the ISC license.
@@ -313,7 +313,7 @@
313
313
  *
314
314
  * This source code is licensed under the ISC license.
315
315
  * See the LICENSE file in the root directory of this source tree.
316
- */const Ah=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],kh=re("layout-dashboard",Ah);/**
316
+ */const kh=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],Ah=re("layout-dashboard",kh);/**
317
317
  * @license lucide-react v1.38.0 - ISC
318
318
  *
319
319
  * This source code is licensed under the ISC license.
@@ -343,12 +343,12 @@
343
343
  *
344
344
  * This source code is licensed under the ISC license.
345
345
  * See the LICENSE file in the root directory of this source tree.
346
- */const Ph=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],Ih=re("list",Ph);/**
346
+ */const Ph=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],Fh=re("list",Ph);/**
347
347
  * @license lucide-react v1.38.0 - ISC
348
348
  *
349
349
  * This source code is licensed under the ISC license.
350
350
  * See the LICENSE file in the root directory of this source tree.
351
- */const Fh=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],Oh=re("list-checks",Fh);/**
351
+ */const Ih=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],Oh=re("list-checks",Ih);/**
352
352
  * @license lucide-react v1.38.0 - ISC
353
353
  *
354
354
  * This source code is licensed under the ISC license.
@@ -448,7 +448,7 @@
448
448
  *
449
449
  * This source code is licensed under the ISC license.
450
450
  * See the LICENSE file in the root directory of this source tree.
451
- */const Am=[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]],km=re("printer",Am);/**
451
+ */const km=[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]],Am=re("printer",km);/**
452
452
  * @license lucide-react v1.38.0 - ISC
453
453
  *
454
454
  * This source code is licensed under the ISC license.
@@ -478,12 +478,12 @@
478
478
  *
479
479
  * This source code is licensed under the ISC license.
480
480
  * See the LICENSE file in the root directory of this source tree.
481
- */const Pm=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Im=re("rotate-cw",Pm);/**
481
+ */const Pm=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Fm=re("rotate-cw",Pm);/**
482
482
  * @license lucide-react v1.38.0 - ISC
483
483
  *
484
484
  * This source code is licensed under the ISC license.
485
485
  * See the LICENSE file in the root directory of this source tree.
486
- */const Fm=[["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 21a9 9 0 0 0 9-9H3a9 9 0 0 0 9 9Z",key:"4rw317"}],["path",{d:"M11.38 12a2.4 2.4 0 0 1-.4-4.77 2.4 2.4 0 0 1 3.2-2.77 2.4 2.4 0 0 1 3.47-.63 2.4 2.4 0 0 1 3.37 3.37 2.4 2.4 0 0 1-1.1 3.7 2.51 2.51 0 0 1 .03 1.1",key:"10xrj0"}],["path",{d:"m13 12 4-4",key:"1hckqy"}],["path",{d:"M10.9 7.25A3.99 3.99 0 0 0 4 10c0 .73.2 1.41.54 2",key:"1p4srx"}]],Om=re("salad",Fm);/**
486
+ */const Im=[["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 21a9 9 0 0 0 9-9H3a9 9 0 0 0 9 9Z",key:"4rw317"}],["path",{d:"M11.38 12a2.4 2.4 0 0 1-.4-4.77 2.4 2.4 0 0 1 3.2-2.77 2.4 2.4 0 0 1 3.47-.63 2.4 2.4 0 0 1 3.37 3.37 2.4 2.4 0 0 1-1.1 3.7 2.51 2.51 0 0 1 .03 1.1",key:"10xrj0"}],["path",{d:"m13 12 4-4",key:"1hckqy"}],["path",{d:"M10.9 7.25A3.99 3.99 0 0 0 4 10c0 .73.2 1.41.54 2",key:"1p4srx"}]],Om=re("salad",Im);/**
487
487
  * @license lucide-react v1.38.0 - ISC
488
488
  *
489
489
  * This source code is licensed under the ISC license.
@@ -588,7 +588,7 @@
588
588
  *
589
589
  * This source code is licensed under the ISC license.
590
590
  * See the LICENSE file in the root directory of this source tree.
591
- */const AC=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],kC=re("tag",AC);/**
591
+ */const kC=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],AC=re("tag",kC);/**
592
592
  * @license lucide-react v1.38.0 - ISC
593
593
  *
594
594
  * This source code is licensed under the ISC license.
@@ -618,12 +618,12 @@
618
618
  *
619
619
  * This source code is licensed under the ISC license.
620
620
  * See the LICENSE file in the root directory of this source tree.
621
- */const PC=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],IC=re("trash",PC);/**
621
+ */const PC=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],FC=re("trash",PC);/**
622
622
  * @license lucide-react v1.38.0 - ISC
623
623
  *
624
624
  * This source code is licensed under the ISC license.
625
625
  * See the LICENSE file in the root directory of this source tree.
626
- */const FC=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],OC=re("trending-up",FC);/**
626
+ */const IC=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],OC=re("trending-up",IC);/**
627
627
  * @license lucide-react v1.38.0 - ISC
628
628
  *
629
629
  * This source code is licensed under the ISC license.
@@ -733,7 +733,7 @@
733
733
  *
734
734
  * This source code is licensed under the ISC license.
735
735
  * See the LICENSE file in the root directory of this source tree.
736
- */const A0=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],k0=re("inbox",A0);/**
736
+ */const k0=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],A0=re("inbox",k0);/**
737
737
  * @license lucide-react v1.38.0 - ISC
738
738
  *
739
739
  * This source code is licensed under the ISC license.
@@ -768,12 +768,12 @@
768
768
  *
769
769
  * This source code is licensed under the ISC license.
770
770
  * See the LICENSE file in the root directory of this source tree.
771
- */const I0=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],tl=re("chevron-up",I0);/**
771
+ */const F0=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],tl=re("chevron-up",F0);/**
772
772
  * @license lucide-react v1.38.0 - ISC
773
773
  *
774
774
  * This source code is licensed under the ISC license.
775
775
  * See the LICENSE file in the root directory of this source tree.
776
- */const F0=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],O0=re("circle",F0);/**
776
+ */const I0=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],O0=re("circle",I0);/**
777
777
  * @license lucide-react v1.38.0 - ISC
778
778
  *
779
779
  * This source code is licensed under the ISC license.
@@ -793,9 +793,9 @@
793
793
  *
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
- */const G0=[["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"}]],K0=re("thumbs-up",G0),Vr={"alert-triangle":zs,"align-start-vertical":Md,anchor:u0,armchair:d0,"arrow-down":$d,"arrow-left":Pd,"arrow-right":Fd,"arrow-right-left":zd,"audio-lines":Hd,ban:qd,bell:Gd,"book-marked":Yd,"book-open":Xd,"bow-arrow":Qd,braces:tp,bug:ap,calendar:Qs,"calendar-check":op,"calendar-days":lp,camera:up,car:m0,"chart-column":dp,"chart-line":hp,"chart-pie":Cp,check:Ws,"chevron-down":el,"chevron-left":Hs,"chevron-right":Vs,"chevron-up":tl,circle:O0,"clipboard-list":vp,coffee:f0,combine:xp,copy:Bp,"chevrons-left-right-ellipsis":kp,"credit-card":Ep,database:qs,diff:jp,download:Us,ear:Lp,edit:Rp,"edit-2":Ip,"edit-3":Op,ellipsis:Gs,eraser:Hp,"external-link":qp,eye:Gp,"file-text":Yp,"flip-horizontal":Xp,"folder-open":Qp,"folder-plus":th,gamepad:ah,"gamepad-2":g0,clock:v0,lock:Uh,"search-x":Zm,"share-2":nC,tag:kC,target:x0,percent:B0,gavel:oh,"git-merge":Ks,globe:ih,"grip-vertical":ch,headphones:ph,heart:mh,home:fh,inbox:k0,info:gh,"key-round":vh,landmark:xh,layers:Bh,"layout-dashboard":kh,leaf:Eh,lightbulb:Sh,link:Th,"link-2":Lh,"link-2-off":Rh,list:Ih,"list-checks":Oh,"list-ordered":Wh,loader:Vh,"log-out":Kh,mail:Zh,"map-pin":Jh,menu:V0,"message-circle":em,"message-circle-question-mark":nm,"message-square":rm,"message-square-more":E0,"message-square-text":sm,minus:S0,"minus-circle":im,moon:U0,"more-horizontal":Gs,package:cm,"party-popper":pm,pause:mm,pencil:fm,phone:gm,play:vm,"play-circle":xm,plus:Bm,printer:km,"refresh-cw":Em,repeat:Sm,replace:Tm,rocket:Lm,"rotate-ccw":Rm,"rotate-cw":Im,salad:Om,"scan-search":Wm,search:Um,"circle-alert":Ys,"alert-circle":Ys,"check-circle":Zs,scissors:Km,send:Jm,settings:eC,"shield-check":rC,"shopping-cart":sC,shuffle:iC,"skip-back":cC,"skip-forward":pC,sparkles:T0,square:mC,star:fC,store:gC,"sun-medium":vC,table:xC,"table-2":BC,terminal:EC,"text-cursor-input":SC,"text-initial":TC,"thumbs-up":K0,ticket:LC,trash:IC,triangle:W0,"trash-2":RC,"trending-up":OC,"triangle-alert":zs,trophy:WC,type:L0,unlink:VC,upload:UC,user:Hr,"user-plus":YC,"user-round":XC,"user-round-check":QC,users:t0,"users-round":a0,volume:R0,"volume-2":Xs,wrench:s0,x:Js};Object.freeze(Object.keys(Vr));function Y0(e){return Vr[e]??null}const nl=new Set;function Z0(e){return zn&&!(e in Vr)&&!nl.has(e)&&(nl.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 X0=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 J0(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?X0(a):null}const al=new Map;function Q0(e){const t=typeof e=="string"?J0(e):null,a=t?Y0(t)??al.get(t)??null:null,[r,s]=o.useState(null);return o.useEffect(()=>{if(!t||a)return;let l=!1;return Z0(t).then(i=>{al.set(t,i),l||s(i)}),()=>{l=!0}},[t,a]),a??r}/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */function rl(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 e1(e){if(Array.isArray(e))return e}function t1(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var r,s,l,i,u=[],c=!0,d=!1;try{if(l=(a=a.call(e)).next,t!==0)for(;!(c=(r=l.call(a)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(h){d=!0,s=h}finally{try{if(!c&&a.return!=null&&(i=a.return(),Object(i)!==i))return}finally{if(d)throw s}}return u}}function n1(){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 a1(e,t){return e1(e)||t1(e,t)||r1(e,t)||n1()}function r1(e,t){if(e){if(typeof e=="string")return rl(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)?rl(e,t):void 0}}const ol=Object.entries,sl=Object.setPrototypeOf,o1=Object.isFrozen,s1=Object.getPrototypeOf,l1=Object.getOwnPropertyDescriptor;let Ot=Object.freeze,Vt=Object.seal,ua=Object.create,ll=typeof Reflect<"u"&&Reflect,qr=ll.apply,Ur=ll.construct;Ot||(Ot=function(t){return t}),Vt||(Vt=function(t){return t}),qr||(qr=function(t,a){for(var r=arguments.length,s=new Array(r>2?r-2:0),l=2;l<r;l++)s[l-2]=arguments[l];return t.apply(a,s)}),Ur||(Ur=function(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),s=1;s<a;s++)r[s-1]=arguments[s];return new t(...r)});const Zn=Ft(Array.prototype.forEach),i1=Ft(Array.prototype.lastIndexOf),il=Ft(Array.prototype.pop),ka=Ft(Array.prototype.push),u1=Ft(Array.prototype.splice),ca=Array.isArray,Na=Ft(String.prototype.toLowerCase),Gr=Ft(String.prototype.toString),ul=Ft(String.prototype.match),Ea=Ft(String.prototype.replace),cl=Ft(String.prototype.indexOf),c1=Ft(String.prototype.trim),d1=Ft(Number.prototype.toString),p1=Ft(Boolean.prototype.toString),dl=typeof BigInt>"u"?null:Ft(BigInt.prototype.toString),pl=typeof Symbol>"u"?null:Ft(Symbol.prototype.toString),on=Ft(Object.prototype.hasOwnProperty),Da=Ft(Object.prototype.toString),Xt=Ft(RegExp.prototype.test),Xn=h1(TypeError);function Ft(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var a=arguments.length,r=new Array(a>1?a-1:0),s=1;s<a;s++)r[s-1]=arguments[s];return qr(e,t,r)}}function h1(e){return function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return Ur(e,a)}}function Ct(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Na;if(sl&&sl(e,null),!ca(t))return e;let r=t.length;for(;r--;){let s=t[r];if(typeof s=="string"){const l=a(s);l!==s&&(o1(t)||(t[r]=l),s=l)}e[s]=!0}return e}function m1(e){for(let t=0;t<e.length;t++)on(e,t)||(e[t]=null);return e}function pn(e){const t=ua(null);for(const r of ol(e)){var a=a1(r,2);const s=a[0],l=a[1];on(e,s)&&(ca(l)?t[s]=m1(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=pn(l):t[s]=l)}return t}function C1(e){switch(typeof e){case"string":return e;case"number":return d1(e);case"boolean":return p1(e);case"bigint":return dl?dl(e):"0";case"symbol":return pl?pl(e):"Symbol()";case"undefined":return Da(e);case"function":case"object":{if(e===null)return Da(e);const t=e,a=wn(t,"toString");if(typeof a=="function"){const r=a(t);return typeof r=="string"?r:Da(r)}return Da(e)}default:return Da(e)}}function wn(e,t){for(;e!==null;){const r=l1(e,t);if(r){if(r.get)return Ft(r.get);if(typeof r.value=="function")return Ft(r.value)}e=s1(e)}function a(){return null}return a}function f1(e){try{return Xt(e,""),!0}catch{return!1}}const hl=Ot(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Kr=Ot(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Yr=Ot(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),b1=Ot(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Zr=Ot(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),g1=Ot(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ml=Ot(["#text"]),Cl=Ot(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Xr=Ot(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),fl=Ot(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),or=Ot(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),y1=Vt(/{{[\w\W]*|^[\w\W]*}}/g),v1=Vt(/<%[\w\W]*|^[\w\W]*%>/g),_1=Vt(/\${[\w\W]*/g),x1=Vt(/^data-[\-\w.\u00B7-\uFFFF]+$/),w1=Vt(/^aria-[\-\w]+$/),bl=Vt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B1=Vt(/^(?:\w+script|data):/i),A1=Vt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),k1=Vt(/^html$/i),N1=Vt(/^[a-z][.\w]*(-[.\w]+)+$/i),gl=Vt(/<[/\w!]/g),yl=Vt(/<[/\w]/g),E1=Vt(/<\/no(script|embed|frames)/i),D1=Vt(/\/>/i),hn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},vl=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],S1=Ot(Ct({},vl)),j1=(function(){const e={};return Zn(vl,t=>{e[t]=Vt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Ot(e)})(),T1=function(){return typeof window>"u"?null:window},M1=function(t,a){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";a&&a.hasAttribute(s)&&(r=a.getAttribute(s));const l="dompurify"+(r?"#"+r:"");try{return t.createPolicy(l,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},_l=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Wn=function(t,a,r,s){return on(t,a)&&ca(t[a])?Ct(s.base?pn(s.base):{},t[a],s.transform):r},Jr=function(t,a,r){const s=on(t,a)?t[a]:void 0;return s&&typeof s=="object"?pn(s):r()};function xl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:T1();const t=fe=>xl(fe);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==hn.document||!e.Element)return t.isSupported=!1,t;let a=e.document;const r=a,s=r.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,i=e.Node,u=e.Element,c=e.NodeFilter,d=e.NamedNodeMap;d===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,p=e.trustedTypes,C=u.prototype,g=wn(C,"cloneNode"),_=wn(C,"remove"),m=wn(C,"nextSibling"),f=wn(C,"childNodes"),v=wn(C,"parentNode"),b=wn(C,"shadowRoot"),w=wn(C,"attributes"),y=i&&i.prototype?wn(i.prototype,"nodeType"):null,B=i&&i.prototype?wn(i.prototype,"nodeName"):null,x=i&&i.prototype?wn(i.prototype,"ownerDocument"):null,N=function(S){return y?y(S):S.nodeType},A=function(S){return B?B(S):S.nodeName};if(typeof l=="function"){const fe=a.createElement("template");fe.content&&fe.content.ownerDocument&&(a=fe.content.ownerDocument)}let D,E="",k,R=!1,$=0;const G=function(){if($>0)throw Xn('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},T=function(S){G(),$++;try{return D.createHTML(S)}finally{$--}},P=function(S){G(),$++;try{return D.createScriptURL(S)}finally{$--}},M=function(){return R||(k=M1(p,s),R=!0),k},ee=a,Q=ee.implementation,F=ee.createNodeIterator,Z=ee.createDocumentFragment,L=ee.getElementsByTagName,V=r.importNode;let U=_l();t.isSupported=typeof ol=="function"&&typeof v=="function"&&Q&&Q.createHTMLDocument!==void 0;const q=y1,j=v1,I=_1,O=x1,Y=w1,K=B1,ie=A1,te=N1;let ne=bl,z=null;const ae=Ct({},[...hl,...Kr,...Yr,...Zr,...ml]);let H=null;const W=Ct({},[...Cl,...Xr,...fl,...or]);let ue=Object.seal(ua(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}})),Be=null,ye=null;const he=Object.seal(ua(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ne=!0,Re=!0,Me=!1,se=!0,Ee=!1,$e=!0,Ae=!1,Fe=!1,Ve=null,ct=null,ot=!1,Xe=!1,ft=!1,Le=!1,qe=!0,Se=!1;const He="user-content-";let Qe=!0,it=!1,bt={},wt=null;const Et=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 at=null;const st=Ct({},["audio","video","img","source","image","track"]);let Bt=null;const At=Ct({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Mt="http://www.w3.org/1998/Math/MathML",Rt="http://www.w3.org/2000/svg",_t="http://www.w3.org/1999/xhtml";let dt=_t,ut=!1,lt=null;const xt=Ct({},[Mt,Rt,_t],Gr),pt=Ot(["mi","mo","mn","ms","mtext"]);let be=Ct({},pt);const ve=Ot(["annotation-xml"]);let we=Ct({},ve);const tt=Ct({},["title","style","font","a","script"]);let gt=null;const Nt=["application/xhtml+xml","text/html"],yt="text/html";let Te=null,nt=null;const oe=a.createElement("form"),ge=function(S){return S instanceof RegExp||S instanceof Function},Oe=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(nt&&nt===S)return;(!S||typeof S!="object")&&(S={}),S=pn(S),gt=Nt.indexOf(S.PARSER_MEDIA_TYPE)===-1?yt:S.PARSER_MEDIA_TYPE,Te=gt==="application/xhtml+xml"?Gr:Na,z=Wn(S,"ALLOWED_TAGS",ae,{transform:Te}),H=Wn(S,"ALLOWED_ATTR",W,{transform:Te}),lt=Wn(S,"ALLOWED_NAMESPACES",xt,{transform:Gr}),Bt=Wn(S,"ADD_URI_SAFE_ATTR",At,{transform:Te,base:At}),at=Wn(S,"ADD_DATA_URI_TAGS",st,{transform:Te,base:st}),wt=Wn(S,"FORBID_CONTENTS",Et,{transform:Te}),Be=Wn(S,"FORBID_TAGS",pn({}),{transform:Te}),ye=Wn(S,"FORBID_ATTR",pn({}),{transform:Te}),bt=on(S,"USE_PROFILES")?S.USE_PROFILES&&typeof S.USE_PROFILES=="object"?pn(S.USE_PROFILES):S.USE_PROFILES:!1,Ne=S.ALLOW_ARIA_ATTR!==!1,Re=S.ALLOW_DATA_ATTR!==!1,Me=S.ALLOW_UNKNOWN_PROTOCOLS||!1,se=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ee=S.SAFE_FOR_TEMPLATES||!1,$e=S.SAFE_FOR_XML!==!1,Ae=S.WHOLE_DOCUMENT||!1,Xe=S.RETURN_DOM||!1,ft=S.RETURN_DOM_FRAGMENT||!1,Le=S.RETURN_TRUSTED_TYPE||!1,ot=S.FORCE_BODY||!1,qe=S.SANITIZE_DOM!==!1,Se=S.SANITIZE_NAMED_PROPS||!1,Qe=S.KEEP_CONTENT!==!1,it=S.IN_PLACE||!1,ne=f1(S.ALLOWED_URI_REGEXP)?S.ALLOWED_URI_REGEXP:bl,dt=typeof S.NAMESPACE=="string"?S.NAMESPACE:_t,be=Jr(S,"MATHML_TEXT_INTEGRATION_POINTS",()=>Ct({},pt)),we=Jr(S,"HTML_INTEGRATION_POINTS",()=>Ct({},ve));const J=Jr(S,"CUSTOM_ELEMENT_HANDLING",()=>ua(null));if(ue=ua(null),on(J,"tagNameCheck")&&ge(J.tagNameCheck)&&(ue.tagNameCheck=J.tagNameCheck),on(J,"attributeNameCheck")&&ge(J.attributeNameCheck)&&(ue.attributeNameCheck=J.attributeNameCheck),on(J,"allowCustomizedBuiltInElements")&&typeof J.allowCustomizedBuiltInElements=="boolean"&&(ue.allowCustomizedBuiltInElements=J.allowCustomizedBuiltInElements),Vt(ue),Ee&&(Re=!1),ft&&(Xe=!0),bt&&(z=Ct({},ml),H=ua(null),bt.html===!0&&(Ct(z,hl),Ct(H,Cl)),bt.svg===!0&&(Ct(z,Kr),Ct(H,Xr),Ct(H,or)),bt.svgFilters===!0&&(Ct(z,Yr),Ct(H,Xr),Ct(H,or)),bt.mathMl===!0&&(Ct(z,Zr),Ct(H,fl),Ct(H,or))),he.tagCheck=null,he.attributeCheck=null,on(S,"ADD_TAGS")&&(typeof S.ADD_TAGS=="function"?he.tagCheck=S.ADD_TAGS:ca(S.ADD_TAGS)&&(z===ae&&(z=pn(z)),Ct(z,S.ADD_TAGS,Te))),on(S,"ADD_ATTR")&&(typeof S.ADD_ATTR=="function"?he.attributeCheck=S.ADD_ATTR:ca(S.ADD_ATTR)&&(H===W&&(H=pn(H)),Ct(H,S.ADD_ATTR,Te))),on(S,"ADD_FORBID_CONTENTS")&&ca(S.ADD_FORBID_CONTENTS)&&(wt===Et&&(wt=pn(wt)),Ct(wt,S.ADD_FORBID_CONTENTS,Te)),Qe&&(z["#text"]=!0),Ae&&Ct(z,["html","head","body"]),z.table&&(Ct(z,["tbody"]),delete Be.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw Xn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Xn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const me=D;D=S.TRUSTED_TYPES_POLICY;try{E=T("")}catch(Pe){throw D=me,Pe}}else S.TRUSTED_TYPES_POLICY===null?(D=void 0,E=""):(D===void 0&&(D=M()),D&&typeof E=="string"&&(E=T("")));Ot&&Ot(S),nt=S},Je=Ct({},[...Kr,...Yr,...b1]),et=Ct({},[...Zr,...g1]),Ge=function(S,J,me){return J.namespaceURI===_t?S==="svg":J.namespaceURI===Mt?S==="svg"&&(me==="annotation-xml"||be[me]):!!Je[S]},Lt=function(S,J,me){return J.namespaceURI===_t?S==="math":J.namespaceURI===Rt?S==="math"&&we[me]:!!et[S]},nn=function(S,J,me){return J.namespaceURI===Rt&&!we[me]||J.namespaceURI===Mt&&!be[me]?!1:!et[S]&&(tt[S]||!Je[S])},fn=function(S){let J=v(S);(!J||!J.tagName)&&(J={namespaceURI:dt,tagName:"template"});const me=Na(S.tagName),Pe=Na(J.tagName);return lt[S.namespaceURI]?S.namespaceURI===Rt?Ge(me,J,Pe):S.namespaceURI===Mt?Lt(me,J,Pe):S.namespaceURI===_t?nn(me,J,Pe):!!(gt==="application/xhtml+xml"&&lt[S.namespaceURI]):!1},Pt=function(S){ka(t.removed,{element:S});try{v(S).removeChild(S)}catch{if(_(S),!v(S))throw Xn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Wt=function(S,J,me){try{S.removeAttributeNode(J)}catch{try{S.removeAttribute(me)}catch{}}},Ht=function(S){an(S);const J=f(S);if(J){const Pe=[];Zn(J,ce=>{ka(Pe,ce)}),Zn(Pe,ce=>{try{_(ce)}catch{}})}const me=w(S);if(me)for(let Pe=me.length-1;Pe>=0;--Pe){const ce=me[Pe],_e=ce&&ce.name;typeof _e=="string"&&Wt(S,ce,_e)}},It=function(S,J,me){if(!me)try{me=J.getAttributeNode(S)}catch{me=null}ka(t.removed,{attribute:me||null,from:J});try{me?J.removeAttributeNode(me):J.removeAttribute(S)}catch{try{J.removeAttribute(S)}catch{}}if(S==="is")if(Xe||ft)try{Pt(J)}catch{}else try{J.setAttribute(S,"")}catch{}},kn=function(S){const J=w(S);if(J)for(let me=J.length-1;me>=0;--me){const Pe=J[me],ce=Pe&&Pe.name;typeof ce!="string"||H[Te(ce)]||Wt(S,Pe,ce)}},an=function(S){const J=[S];for(;J.length>0;){const me=J.pop();N(me)===hn.element&&kn(me);const ce=f(me);if(ce)for(let _e=ce.length-1;_e>=0;--_e)J.push(ce[_e])}},jt=function(S,J){return $e?S==="patchsrc"?!0:S==="for"&&J!=="label"&&J!=="output":!1},$t=function(S){if(!$e)return;const J=[S];for(;J.length>0;){const me=J.pop(),Pe=N(me);if(Pe===hn.processingInstruction||Pe===hn.comment&&Xt(yl,me.data)){try{_(me)}catch{}continue}if(Pe===hn.element){const _e=me,Ye=Te(A(me));try{_e.hasAttribute&&_e.hasAttribute("patchsrc")&&_e.removeAttribute("patchsrc"),_e.hasAttribute&&_e.hasAttribute("for")&&jt("for",Ye)&&_e.removeAttribute("for")}catch{}}const ce=f(me);if(ce)for(let _e=ce.length-1;_e>=0;--_e)J.push(ce[_e])}},qt=function(S){let J=null,me=null;if(ot)S="<remove></remove>"+S;else{const _e=ul(S,/^[\r\n\t ]+/);me=_e&&_e[0]}gt==="application/xhtml+xml"&&dt===_t&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const Pe=D?T(S):S;if(dt===_t)try{J=new h().parseFromString(Pe,gt)}catch{}if(!J||!J.documentElement){J=Q.createDocument(dt,"template",null);try{J.documentElement.innerHTML=ut?E:Pe}catch{}}const ce=J.body||J.documentElement;return S&&me&&ce.insertBefore(a.createTextNode(me),ce.childNodes[0]||null),dt===_t?L.call(J,Ae?"html":"body")[0]:Ae?J.documentElement:ce},Jt=function(S){const J=x?x(S):S.ownerDocument;return F.call(J||S,S,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},bn=function(S){return S=Ea(S,q," "),S=Ea(S,j," "),S=Ea(S,I," "),S},Yt=function(S){var J;S.normalize();const me=x?x(S):S.ownerDocument,Pe=F.call(me||S,S,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let ce=Pe.nextNode();for(;ce;)ce.data=bn(ce.data),ce=Pe.nextNode();const _e=(J=S.querySelectorAll)===null||J===void 0?void 0:J.call(S,"template");_e&&Zn(_e,Ye=>{Zt(Ye.content)&&Yt(Ye.content)})},xn=function(S){const J=B?B(S):null;return typeof J!="string"||Te(J)!=="form"?!1:typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||S.attributes!==w(S)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function"||S.nodeType!==y(S)||S.childNodes!==f(S)},Zt=function(S){if(!y||typeof S!="object"||S===null)return!1;try{return y(S)===hn.documentFragment}catch{return!1}},gn=function(S){if(!y||typeof S!="object"||S===null)return!1;try{return typeof y(S)=="number"}catch{return!1}};function Ut(fe,S,J){fe.length!==0&&Zn(fe,me=>{me.call(t,S,J,nt)})}const Nn=function(S,J){return!!($e&&S.hasChildNodes()&&!gn(S.firstElementChild)&&Xt(gl,S.textContent)&&Xt(gl,S.innerHTML)||$e&&S.namespaceURI===_t&&S1[J]&&(gn(S.firstElementChild)||typeof S.textContent=="string"&&Xt(j1[J],S.textContent))||S.nodeType===hn.processingInstruction||$e&&S.nodeType===hn.comment&&Xt(yl,S.data))},de=function(S,J){if(S instanceof RegExp)return Xt(S,J);if(S instanceof Function){for(var me=arguments.length,Pe=new Array(me>2?me-2:0),ce=2;ce<me;ce++)Pe[ce-2]=arguments[ce];return!!S(J,...Pe)}return!1},je=function(S,J,me){if(!Be[J]&&De(J)&&de(ue.tagNameCheck,J))return!1;if(Qe&&!wt[J]){const Pe=v(S),ce=f(S);if(ce&&Pe){const _e=ce.length;for(let Ye=_e-1;Ye>=0;--Ye){const ht=S===me?g(ce[Ye],!0):ce[Ye];Pe.insertBefore(ht,m(S))}}}return Pt(S),!0},Ie=function(S,J,me,Pe){return S.length===0?J:J===me||J===Pe?pn(J):J},Ue=function(S,J){return S===J||v(S)!==null?!1:(it&&an(S),!0)},ze=function(S,J){if(Ut(U.beforeSanitizeElements,S,null),Ue(S,J))return!0;if(xn(S))return Pt(S),!0;const me=Te(A(S));if(z=Ie(U.uponSanitizeElement,z,ae,Ve),Ut(U.uponSanitizeElement,S,{tagName:me,allowedTags:z}),Ue(S,J))return!0;if(Nn(S,me))return Pt(S),!0;if(Be[me]||!(he.tagCheck instanceof Function&&he.tagCheck(me))&&!z[me]){const ce=je(S,me,J);return ce===!1&&Ut(U.afterSanitizeElements,S,null),ce}if(N(S)===hn.element&&!fn(S)||(me==="noscript"||me==="noembed"||me==="noframes")&&Xt(E1,S.innerHTML))return Pt(S),!0;if(Ee&&S.nodeType===hn.text){const ce=bn(S.textContent);S.textContent!==ce&&(ka(t.removed,{element:S.cloneNode()}),S.textContent=ce)}return Ut(U.afterSanitizeElements,S,null),!1},X=function(S,J,me){if(ye[J]||jt(J,S)||qe&&(J==="id"||J==="name")&&(me in a||me in oe))return!1;const Pe=H[J]||he.attributeCheck instanceof Function&&he.attributeCheck(J,S);return Re&&Xt(O,J)||Ne&&Xt(Y,J)?!0:Pe?Bt[J]||Xt(ne,Ea(me,ie,""))||(J==="src"||J==="xlink:href"||J==="href")&&S!=="script"&&cl(me,"data:")===0&&at[S]||Me&&!Xt(K,Ea(me,ie,""))?!0:!me:De(S)&&de(ue.tagNameCheck,S)&&de(ue.attributeNameCheck,J,S)||J==="is"&&ue.allowCustomizedBuiltInElements&&de(ue.tagNameCheck,me)},pe=Ct({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),De=function(S){return!pe[Na(S)]&&Xt(te,S)},We=function(S,J,me,Pe){if(D&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!me)switch(p.getAttributeType(S,J)){case"TrustedHTML":return T(Pe);case"TrustedScriptURL":return P(Pe)}return Pe},Ze=function(S,J,me,Pe){try{me?S.setAttributeNS(me,J,Pe):S.setAttribute(J,Pe),xn(S)?Pt(S):il(t.removed)}catch{It(J,S)}},Ke=function(S){Ut(U.beforeSanitizeAttributes,S,null);const J=S.attributes;if(!J||xn(S))return;H=Ie(U.uponSanitizeAttribute,H,W,ct);const me={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0};let Pe=J.length;const ce=Te(S.nodeName);for(;Pe--;){const _e=J[Pe],Ye=_e.name,ht=_e.namespaceURI,Dt=_e.value,rn=Te(Ye),zr=Dt;let Qt=Ye==="value"?zr:c1(zr);if(me.attrName=rn,me.attrValue=Qt,me.keepAttr=!0,me.forceKeepAttr=void 0,Ut(U.uponSanitizeAttribute,S,me),Qt=me.attrValue,Se&&(rn==="id"||rn==="name")&&cl(Qt,He)!==0&&(It(Ye,S,_e),Qt=He+Qt),$e&&Xt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Qt)){It(Ye,S,_e);continue}if(rn==="attributename"&&ul(Qt,"href")){It(Ye,S,_e);continue}if(!me.forceKeepAttr){if(!me.keepAttr){It(Ye,S,_e);continue}if(!se&&Xt(D1,Qt)){It(Ye,S,_e);continue}if(Ee&&(Qt=bn(Qt)),!X(ce,rn,Qt)){It(Ye,S,_e);continue}Qt=We(ce,rn,ht,Qt),Qt!==zr&&Ze(S,Ye,ht,Qt)}}Ut(U.afterSanitizeAttributes,S,null)},mt=function(S){let J=null;const me=Jt(S);for(Ut(U.beforeSanitizeShadowDOM,S,null);J=me.nextNode();)if(Ut(U.uponSanitizeShadowNode,J,null),ze(J,S),Ke(J),Zt(J.content)&&mt(J.content),N(J)===hn.element){const Pe=b(J);Zt(Pe)&&(vt(Pe),mt(Pe))}Ut(U.afterSanitizeShadowDOM,S,null)},vt=function(S){const J=[{node:S,shadow:null}];for(;J.length>0;){const me=J.pop();if(me.shadow){mt(me.shadow);continue}const Pe=me.node,_e=N(Pe)===hn.element,Ye=f(Pe);if(Ye)for(let ht=Ye.length-1;ht>=0;--ht)J.push({node:Ye[ht],shadow:null});if(_e){const ht=B?B(Pe):null;if(typeof ht=="string"&&Te(ht)==="template"){const Dt=Pe.content;Zt(Dt)&&J.push({node:Dt,shadow:null})}}if(_e){const ht=b(Pe);Zt(ht)&&J.push({node:null,shadow:ht},{node:ht,shadow:null})}}};return t.sanitize=function(fe){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},J=null,me=null,Pe=null,ce=null;if(ut=!fe,ut&&(fe="<!-->"),typeof fe!="string"&&!gn(fe)&&(fe=C1(fe),typeof fe!="string"))throw Xn("dirty is not a string, aborting");if(!t.isSupported)return fe;Fe?(z=Ve,H=ct):Oe(S),(U.uponSanitizeElement.length>0||U.uponSanitizeAttribute.length>0)&&(z=pn(z)),U.uponSanitizeAttribute.length>0&&(H=pn(H)),t.removed=[];const _e=it&&typeof fe!="string"&&gn(fe);if(_e){$t(fe);const Dt=A(fe);if(typeof Dt=="string"){const rn=Te(Dt);if(!z[rn]||Be[rn])throw Ht(fe),Xn("root node is forbidden and cannot be sanitized in-place")}if(xn(fe))throw Ht(fe),Xn("root node is clobbered and cannot be sanitized in-place");try{vt(fe)}catch(rn){throw Ht(fe),rn}}else if(gn(fe))J=qt("<!---->"),me=J.ownerDocument.importNode(fe,!0),me.nodeType===hn.element&&me.nodeName==="BODY"||me.nodeName==="HTML"?J=me:J.appendChild(me),vt(me);else{if(!Xe&&!Ee&&!Ae&&fe.indexOf("<")===-1)return D&&Le?T(fe):fe;if(J=qt(fe),!J)return Xe?null:Le?E:""}J&&ot&&Pt(J.firstChild);const Ye=_e?fe:J;try{const Dt=Jt(Ye);for(;Pe=Dt.nextNode();)ze(Pe,Ye),Ke(Pe),Zt(Pe.content)&&mt(Pe.content)}catch(Dt){throw _e&&(Ht(fe),Zn(t.removed,rn=>{rn.element&&an(rn.element)})),Dt}if(_e)return Zn(t.removed,Dt=>{Dt.element&&an(Dt.element)}),Ee&&Yt(fe),fe;if(Xe){if(Ee&&Yt(J),ft)for(ce=Z.call(J.ownerDocument);J.firstChild;)ce.appendChild(J.firstChild);else ce=J;return(H.shadowroot||H.shadowrootmode)&&(ce=V.call(r,ce,!0)),ce}let ht=Ae?J.outerHTML:J.innerHTML;return Ae&&z["!doctype"]&&J.ownerDocument&&J.ownerDocument.doctype&&J.ownerDocument.doctype.name&&Xt(k1,J.ownerDocument.doctype.name)&&(ht="<!DOCTYPE "+J.ownerDocument.doctype.name+`>
798
- `+ht),Ee&&(ht=bn(ht)),D&&Le?T(ht):ht},t.setConfig=function(){let fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Oe(fe),Fe=!0,Ve=z,ct=H},t.clearConfig=function(){nt=null,Fe=!1,Ve=null,ct=null,D=k,E=""},t.isValidAttribute=function(fe,S,J){nt||Oe({});const me=Te(fe),Pe=Te(S);return X(me,Pe,J)},t.addHook=function(fe,S){typeof S=="function"&&on(U,fe)&&ka(U[fe],S)},t.removeHook=function(fe,S){if(on(U,fe)){if(S!==void 0){const J=i1(U[fe],S);return J===-1?void 0:u1(U[fe],J,1)[0]}return il(U[fe])}},t.removeHooks=function(fe){on(U,fe)&&(U[fe]=[])},t.removeAllHooks=function(){U=_l()},t}var da=xl();let Qr=null;const L1=1500;function eo(){Qr?.clear(),Qr=null}function $1(e,{onEnd:t,rate:a=.9}={}){if(typeof window>"u"||typeof SpeechSynthesisUtterance>"u"||!("speechSynthesis"in window)){t?.();return}const r=window.speechSynthesis;eo();let s=!1;const l=()=>{if(!s){s=!0;try{t?.()}catch{}}};try{r.cancel()}catch{l();return}const i=()=>{eo();try{r.cancel();const d=new SpeechSynthesisUtterance(e),h=r.getVoices().find(p=>p.lang.startsWith("ko"));h&&(d.voice=h),d.rate=a,d.onend=t?l:null,d.onerror=t?l:null,r.speak(d)}catch{l()}};let u;try{u=r.getVoices()}catch{l();return}if(u.length>0){i();return}const c=setTimeout(i,L1);try{r.addEventListener("voiceschanged",i,{once:!0})}catch{clearTimeout(c),l();return}Qr={clear:()=>{clearTimeout(c),r.removeEventListener("voiceschanged",i)}}}function to(){eo(),typeof window<"u"&&"speechSynthesis"in window&&window.speechSynthesis.cancel()}const R1=/^(?:[a-z]+:)?\/\//i,P1="__ihab_core_asset_base_url__";function I1(){return globalThis[P1]??""}function no(e){const t=String(e||"").trim();if(!t)return"";if(R1.test(t)||t.startsWith("data:")||t.startsWith("blob:"))return t;const a=t.startsWith("/")?t:`/${t}`,r=I1();return r?`${r}${a}`:a}const wl="__ihab_core_storage_resolvers__";function Sa(){return globalThis[wl]??null}function F1(e){globalThis[wl]=e}let Bl=class extends Error{constructor(t){super(`
796
+ */const G0=[["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"}]],K0=re("thumbs-up",G0),Vr={"alert-triangle":zs,"align-start-vertical":Md,anchor:u0,armchair:d0,"arrow-down":$d,"arrow-left":Pd,"arrow-right":Id,"arrow-right-left":zd,"audio-lines":Hd,ban:qd,bell:Gd,"book-marked":Yd,"book-open":Xd,"bow-arrow":Qd,braces:tp,bug:ap,calendar:Qs,"calendar-check":op,"calendar-days":lp,camera:up,car:m0,"chart-column":dp,"chart-line":hp,"chart-pie":Cp,check:Ws,"chevron-down":el,"chevron-left":Hs,"chevron-right":Vs,"chevron-up":tl,circle:O0,"clipboard-list":vp,coffee:f0,combine:xp,copy:Bp,"chevrons-left-right-ellipsis":Ap,"credit-card":Ep,database:qs,diff:jp,download:Us,ear:Lp,edit:Rp,"edit-2":Fp,"edit-3":Op,ellipsis:Gs,eraser:Hp,"external-link":qp,eye:Gp,"file-text":Yp,"flip-horizontal":Xp,"folder-open":Qp,"folder-plus":th,gamepad:ah,"gamepad-2":g0,clock:v0,lock:Uh,"search-x":Zm,"share-2":nC,tag:AC,target:x0,percent:B0,gavel:oh,"git-merge":Ks,globe:ih,"grip-vertical":ch,headphones:ph,heart:mh,home:fh,inbox:A0,info:gh,"key-round":vh,landmark:xh,layers:Bh,"layout-dashboard":Ah,leaf:Eh,lightbulb:Sh,link:Th,"link-2":Lh,"link-2-off":Rh,list:Fh,"list-checks":Oh,"list-ordered":Wh,loader:Vh,"log-out":Kh,mail:Zh,"map-pin":Jh,menu:V0,"message-circle":em,"message-circle-question-mark":nm,"message-square":rm,"message-square-more":E0,"message-square-text":sm,minus:S0,"minus-circle":im,moon:U0,"more-horizontal":Gs,package:cm,"party-popper":pm,pause:mm,pencil:fm,phone:gm,play:vm,"play-circle":xm,plus:Bm,printer:Am,"refresh-cw":Em,repeat:Sm,replace:Tm,rocket:Lm,"rotate-ccw":Rm,"rotate-cw":Fm,salad:Om,"scan-search":Wm,search:Um,"circle-alert":Ys,"alert-circle":Ys,"check-circle":Zs,scissors:Km,send:Jm,settings:eC,"shield-check":rC,"shopping-cart":sC,shuffle:iC,"skip-back":cC,"skip-forward":pC,sparkles:T0,square:mC,star:fC,store:gC,"sun-medium":vC,table:xC,"table-2":BC,terminal:EC,"text-cursor-input":SC,"text-initial":TC,"thumbs-up":K0,ticket:LC,trash:FC,triangle:W0,"trash-2":RC,"trending-up":OC,"triangle-alert":zs,trophy:WC,type:L0,unlink:VC,upload:UC,user:Hr,"user-plus":YC,"user-round":XC,"user-round-check":QC,users:t0,"users-round":a0,volume:R0,"volume-2":Xs,wrench:s0,x:Js};Object.freeze(Object.keys(Vr));function Y0(e){return Vr[e]??null}const nl=new Set;function Z0(e){return zn&&!(e in Vr)&&!nl.has(e)&&(nl.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 X0=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 J0(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?X0(a):null}const al=new Map;function Q0(e){const t=typeof e=="string"?J0(e):null,a=t?Y0(t)??al.get(t)??null:null,[r,s]=o.useState(null);return o.useEffect(()=>{if(!t||a)return;let l=!1;return Z0(t).then(i=>{al.set(t,i),l||s(i)}),()=>{l=!0}},[t,a]),a??r}/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */function rl(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 e1(e){if(Array.isArray(e))return e}function t1(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var r,s,l,i,u=[],c=!0,d=!1;try{if(l=(a=a.call(e)).next,t!==0)for(;!(c=(r=l.call(a)).done)&&(u.push(r.value),u.length!==t);c=!0);}catch(h){d=!0,s=h}finally{try{if(!c&&a.return!=null&&(i=a.return(),Object(i)!==i))return}finally{if(d)throw s}}return u}}function n1(){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 a1(e,t){return e1(e)||t1(e,t)||r1(e,t)||n1()}function r1(e,t){if(e){if(typeof e=="string")return rl(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)?rl(e,t):void 0}}const ol=Object.entries,sl=Object.setPrototypeOf,o1=Object.isFrozen,s1=Object.getPrototypeOf,l1=Object.getOwnPropertyDescriptor;let Wt=Object.freeze,Vt=Object.seal,ua=Object.create,ll=typeof Reflect<"u"&&Reflect,qr=ll.apply,Ur=ll.construct;Wt||(Wt=function(t){return t}),Vt||(Vt=function(t){return t}),qr||(qr=function(t,a){for(var r=arguments.length,s=new Array(r>2?r-2:0),l=2;l<r;l++)s[l-2]=arguments[l];return t.apply(a,s)}),Ur||(Ur=function(t){for(var a=arguments.length,r=new Array(a>1?a-1:0),s=1;s<a;s++)r[s-1]=arguments[s];return new t(...r)});const Zn=Ot(Array.prototype.forEach),i1=Ot(Array.prototype.lastIndexOf),il=Ot(Array.prototype.pop),Aa=Ot(Array.prototype.push),u1=Ot(Array.prototype.splice),ca=Array.isArray,Na=Ot(String.prototype.toLowerCase),Gr=Ot(String.prototype.toString),ul=Ot(String.prototype.match),Ea=Ot(String.prototype.replace),cl=Ot(String.prototype.indexOf),c1=Ot(String.prototype.trim),d1=Ot(Number.prototype.toString),p1=Ot(Boolean.prototype.toString),dl=typeof BigInt>"u"?null:Ot(BigInt.prototype.toString),pl=typeof Symbol>"u"?null:Ot(Symbol.prototype.toString),rn=Ot(Object.prototype.hasOwnProperty),Da=Ot(Object.prototype.toString),Xt=Ot(RegExp.prototype.test),Xn=h1(TypeError);function Ot(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var a=arguments.length,r=new Array(a>1?a-1:0),s=1;s<a;s++)r[s-1]=arguments[s];return qr(e,t,r)}}function h1(e){return function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return Ur(e,a)}}function bt(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Na;if(sl&&sl(e,null),!ca(t))return e;let r=t.length;for(;r--;){let s=t[r];if(typeof s=="string"){const l=a(s);l!==s&&(o1(t)||(t[r]=l),s=l)}e[s]=!0}return e}function m1(e){for(let t=0;t<e.length;t++)rn(e,t)||(e[t]=null);return e}function mn(e){const t=ua(null);for(const r of ol(e)){var a=a1(r,2);const s=a[0],l=a[1];rn(e,s)&&(ca(l)?t[s]=m1(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=mn(l):t[s]=l)}return t}function C1(e){switch(typeof e){case"string":return e;case"number":return d1(e);case"boolean":return p1(e);case"bigint":return dl?dl(e):"0";case"symbol":return pl?pl(e):"Symbol()";case"undefined":return Da(e);case"function":case"object":{if(e===null)return Da(e);const t=e,a=wn(t,"toString");if(typeof a=="function"){const r=a(t);return typeof r=="string"?r:Da(r)}return Da(e)}default:return Da(e)}}function wn(e,t){for(;e!==null;){const r=l1(e,t);if(r){if(r.get)return Ot(r.get);if(typeof r.value=="function")return Ot(r.value)}e=s1(e)}function a(){return null}return a}function f1(e){try{return Xt(e,""),!0}catch{return!1}}const hl=Wt(["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"]),Kr=Wt(["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"]),Yr=Wt(["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"]),b1=Wt(["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"]),Zr=Wt(["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"]),g1=Wt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ml=Wt(["#text"]),Cl=Wt(["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"]),Xr=Wt(["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"]),fl=Wt(["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"]),or=Wt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),y1=Vt(/{{[\w\W]*|^[\w\W]*}}/g),v1=Vt(/<%[\w\W]*|^[\w\W]*%>/g),_1=Vt(/\${[\w\W]*/g),x1=Vt(/^data-[\-\w.\u00B7-\uFFFF]+$/),w1=Vt(/^aria-[\-\w]+$/),bl=Vt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),B1=Vt(/^(?:\w+script|data):/i),k1=Vt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),A1=Vt(/^html$/i),N1=Vt(/^[a-z][.\w]*(-[.\w]+)+$/i),gl=Vt(/<[/\w!]/g),yl=Vt(/<[/\w]/g),E1=Vt(/<\/no(script|embed|frames)/i),D1=Vt(/\/>/i),Cn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},vl=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],S1=Wt(bt({},vl)),j1=(function(){const e={};return Zn(vl,t=>{e[t]=Vt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Wt(e)})(),T1=function(){return typeof window>"u"?null:window},M1=function(t,a){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";a&&a.hasAttribute(s)&&(r=a.getAttribute(s));const l="dompurify"+(r?"#"+r:"");try{return t.createPolicy(l,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},_l=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Wn=function(t,a,r,s){return rn(t,a)&&ca(t[a])?bt(s.base?mn(s.base):{},t[a],s.transform):r},Jr=function(t,a,r){const s=rn(t,a)?t[a]:void 0;return s&&typeof s=="object"?mn(s):r()};function xl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:T1();const t=ge=>xl(ge);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==Cn.document||!e.Element)return t.isSupported=!1,t;let a=e.document;const r=a,s=r.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,i=e.Node,u=e.Element,c=e.NodeFilter,d=e.NamedNodeMap;d===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,p=e.trustedTypes,m=u.prototype,g=wn(m,"cloneNode"),y=wn(m,"remove"),C=wn(m,"nextSibling"),f=wn(m,"childNodes"),_=wn(m,"parentNode"),b=wn(m,"shadowRoot"),w=wn(m,"attributes"),v=i&&i.prototype?wn(i.prototype,"nodeType"):null,k=i&&i.prototype?wn(i.prototype,"nodeName"):null,x=i&&i.prototype?wn(i.prototype,"ownerDocument"):null,A=function(S){return v?v(S):S.nodeType},B=function(S){return k?k(S):S.nodeName};if(typeof l=="function"){const ge=a.createElement("template");ge.content&&ge.content.ownerDocument&&(a=ge.content.ownerDocument)}let E,D="",N,$=!1,L=0;const U=function(){if(L>0)throw Xn('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.')},M=function(S){U(),L++;try{return E.createHTML(S)}finally{L--}},P=function(S){U(),L++;try{return E.createScriptURL(S)}finally{L--}},T=function(){return $||(N=M1(p,s),$=!0),N},ee=a,te=ee.implementation,I=ee.createNodeIterator,Y=ee.createDocumentFragment,R=ee.getElementsByTagName,q=r.importNode;let Z=_l();t.isSupported=typeof ol=="function"&&typeof _=="function"&&te&&te.createHTMLDocument!==void 0;const z=y1,j=v1,F=_1,O=x1,G=w1,ie=B1,K=k1,pe=N1;let X=bl,H=null;const ne=bt({},[...hl,...Kr,...Yr,...Zr,...ml]);let V=null;const W=bt({},[...Cl,...Xr,...fl,...or]);let oe=Object.seal(ua(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}})),xe=null,be=null;const me=Object.seal(ua(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ke=!0,Le=!0,Me=!1,le=!0,ve=!1,$e=!0,Ae=!1,Ie=!1,ze=null,dt=null,st=!1,et=!1,gt=!1,Se=!1,Ge=!0,we=!1;const qe="user-content-";let Ye=!0,mt=!1,wt={},yt=null;const Et=bt({},["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 at=null;const rt=bt({},["audio","video","img","source","image","track"]);let Dt=null;const Bt=bt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Lt="http://www.w3.org/1998/Math/MathML",It="http://www.w3.org/2000/svg",xt="http://www.w3.org/1999/xhtml";let lt=xt,Ct=!1,it=null;const _t=bt({},[Lt,It,xt],Gr),ut=Wt(["mi","mo","mn","ms","mtext"]);let St=bt({},ut);const ue=Wt(["annotation-xml"]);let Te=bt({},ue);const Ne=bt({},["title","style","font","a","script"]);let tt=null;const pt=["application/xhtml+xml","text/html"],jt="text/html";let je=null,nt=null;const ae=a.createElement("form"),ye=function(S){return S instanceof RegExp||S instanceof Function},He=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(nt&&nt===S)return;(!S||typeof S!="object")&&(S={}),S=mn(S),tt=pt.indexOf(S.PARSER_MEDIA_TYPE)===-1?jt:S.PARSER_MEDIA_TYPE,je=tt==="application/xhtml+xml"?Gr:Na,H=Wn(S,"ALLOWED_TAGS",ne,{transform:je}),V=Wn(S,"ALLOWED_ATTR",W,{transform:je}),it=Wn(S,"ALLOWED_NAMESPACES",_t,{transform:Gr}),Dt=Wn(S,"ADD_URI_SAFE_ATTR",Bt,{transform:je,base:Bt}),at=Wn(S,"ADD_DATA_URI_TAGS",rt,{transform:je,base:rt}),yt=Wn(S,"FORBID_CONTENTS",Et,{transform:je}),xe=Wn(S,"FORBID_TAGS",mn({}),{transform:je}),be=Wn(S,"FORBID_ATTR",mn({}),{transform:je}),wt=rn(S,"USE_PROFILES")?S.USE_PROFILES&&typeof S.USE_PROFILES=="object"?mn(S.USE_PROFILES):S.USE_PROFILES:!1,ke=S.ALLOW_ARIA_ATTR!==!1,Le=S.ALLOW_DATA_ATTR!==!1,Me=S.ALLOW_UNKNOWN_PROTOCOLS||!1,le=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ve=S.SAFE_FOR_TEMPLATES||!1,$e=S.SAFE_FOR_XML!==!1,Ae=S.WHOLE_DOCUMENT||!1,et=S.RETURN_DOM||!1,gt=S.RETURN_DOM_FRAGMENT||!1,Se=S.RETURN_TRUSTED_TYPE||!1,st=S.FORCE_BODY||!1,Ge=S.SANITIZE_DOM!==!1,we=S.SANITIZE_NAMED_PROPS||!1,Ye=S.KEEP_CONTENT!==!1,mt=S.IN_PLACE||!1,X=f1(S.ALLOWED_URI_REGEXP)?S.ALLOWED_URI_REGEXP:bl,lt=typeof S.NAMESPACE=="string"?S.NAMESPACE:xt,St=Jr(S,"MATHML_TEXT_INTEGRATION_POINTS",()=>bt({},ut)),Te=Jr(S,"HTML_INTEGRATION_POINTS",()=>bt({},ue));const Q=Jr(S,"CUSTOM_ELEMENT_HANDLING",()=>ua(null));if(oe=ua(null),rn(Q,"tagNameCheck")&&ye(Q.tagNameCheck)&&(oe.tagNameCheck=Q.tagNameCheck),rn(Q,"attributeNameCheck")&&ye(Q.attributeNameCheck)&&(oe.attributeNameCheck=Q.attributeNameCheck),rn(Q,"allowCustomizedBuiltInElements")&&typeof Q.allowCustomizedBuiltInElements=="boolean"&&(oe.allowCustomizedBuiltInElements=Q.allowCustomizedBuiltInElements),Vt(oe),ve&&(Le=!1),gt&&(et=!0),wt&&(H=bt({},ml),V=ua(null),wt.html===!0&&(bt(H,hl),bt(V,Cl)),wt.svg===!0&&(bt(H,Kr),bt(V,Xr),bt(V,or)),wt.svgFilters===!0&&(bt(H,Yr),bt(V,Xr),bt(V,or)),wt.mathMl===!0&&(bt(H,Zr),bt(V,fl),bt(V,or))),me.tagCheck=null,me.attributeCheck=null,rn(S,"ADD_TAGS")&&(typeof S.ADD_TAGS=="function"?me.tagCheck=S.ADD_TAGS:ca(S.ADD_TAGS)&&(H===ne&&(H=mn(H)),bt(H,S.ADD_TAGS,je))),rn(S,"ADD_ATTR")&&(typeof S.ADD_ATTR=="function"?me.attributeCheck=S.ADD_ATTR:ca(S.ADD_ATTR)&&(V===W&&(V=mn(V)),bt(V,S.ADD_ATTR,je))),rn(S,"ADD_FORBID_CONTENTS")&&ca(S.ADD_FORBID_CONTENTS)&&(yt===Et&&(yt=mn(yt)),bt(yt,S.ADD_FORBID_CONTENTS,je)),Ye&&(H["#text"]=!0),Ae&&bt(H,["html","head","body"]),H.table&&(bt(H,["tbody"]),delete xe.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw Xn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Xn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Ce=E;E=S.TRUSTED_TYPES_POLICY;try{D=M("")}catch(Re){throw E=Ce,Re}}else S.TRUSTED_TYPES_POLICY===null?(E=void 0,D=""):(E===void 0&&(E=T()),E&&typeof D=="string"&&(D=M("")));Wt&&Wt(S),nt=S},Ke=bt({},[...Kr,...Yr,...b1]),vt=bt({},[...Zr,...g1]),Ue=function(S,Q,Ce){return Q.namespaceURI===xt?S==="svg":Q.namespaceURI===Lt?S==="svg"&&(Ce==="annotation-xml"||St[Ce]):!!Ke[S]},ht=function(S,Q,Ce){return Q.namespaceURI===xt?S==="math":Q.namespaceURI===It?S==="math"&&Te[Ce]:!!vt[S]},cn=function(S,Q,Ce){return Q.namespaceURI===It&&!Te[Ce]||Q.namespaceURI===Lt&&!St[Ce]?!1:!vt[S]&&(Ne[S]||!Ke[S])},dn=function(S){let Q=_(S);(!Q||!Q.tagName)&&(Q={namespaceURI:lt,tagName:"template"});const Ce=Na(S.tagName),Re=Na(Q.tagName);return it[S.namespaceURI]?S.namespaceURI===It?Ue(Ce,Q,Re):S.namespaceURI===Lt?ht(Ce,Q,Re):S.namespaceURI===xt?cn(Ce,Q,Re):!!(tt==="application/xhtml+xml"&&it[S.namespaceURI]):!1},zt=function(S){Aa(t.removed,{element:S});try{_(S).removeChild(S)}catch{if(y(S),!_(S))throw Xn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},qt=function(S,Q,Ce){try{S.removeAttributeNode(Q)}catch{try{S.removeAttribute(Ce)}catch{}}},Ht=function(S){an(S);const Q=f(S);if(Q){const Re=[];Zn(Q,We=>{Aa(Re,We)}),Zn(Re,We=>{try{y(We)}catch{}})}const Ce=w(S);if(Ce)for(let Re=Ce.length-1;Re>=0;--Re){const We=Ce[Re],he=We&&We.name;typeof he=="string"&&qt(S,We,he)}},Nt=function(S,Q,Ce){if(!Ce)try{Ce=Q.getAttributeNode(S)}catch{Ce=null}Aa(t.removed,{attribute:Ce||null,from:Q});try{Ce?Q.removeAttributeNode(Ce):Q.removeAttribute(S)}catch{try{Q.removeAttribute(S)}catch{}}if(S==="is")if(et||gt)try{zt(Q)}catch{}else try{Q.setAttribute(S,"")}catch{}},An=function(S){const Q=w(S);if(Q)for(let Ce=Q.length-1;Ce>=0;--Ce){const Re=Q[Ce],We=Re&&Re.name;typeof We!="string"||V[je(We)]||qt(S,Re,We)}},an=function(S){const Q=[S];for(;Q.length>0;){const Ce=Q.pop();A(Ce)===Cn.element&&An(Ce);const We=f(Ce);if(We)for(let he=We.length-1;he>=0;--he)Q.push(We[he])}},$t=function(S,Q){return $e?S==="patchsrc"?!0:S==="for"&&Q!=="label"&&Q!=="output":!1},Pt=function(S){if(!$e)return;const Q=[S];for(;Q.length>0;){const Ce=Q.pop(),Re=A(Ce);if(Re===Cn.processingInstruction||Re===Cn.comment&&Xt(yl,Ce.data)){try{y(Ce)}catch{}continue}if(Re===Cn.element){const he=Ce,Pe=je(B(Ce));try{he.hasAttribute&&he.hasAttribute("patchsrc")&&he.removeAttribute("patchsrc"),he.hasAttribute&&he.hasAttribute("for")&&$t("for",Pe)&&he.removeAttribute("for")}catch{}}const We=f(Ce);if(We)for(let he=We.length-1;he>=0;--he)Q.push(We[he])}},Ut=function(S){let Q=null,Ce=null;if(st)S="<remove></remove>"+S;else{const he=ul(S,/^[\r\n\t ]+/);Ce=he&&he[0]}tt==="application/xhtml+xml"&&lt===xt&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const Re=E?M(S):S;if(lt===xt)try{Q=new h().parseFromString(Re,tt)}catch{}if(!Q||!Q.documentElement){Q=te.createDocument(lt,"template",null);try{Q.documentElement.innerHTML=Ct?D:Re}catch{}}const We=Q.body||Q.documentElement;return S&&Ce&&We.insertBefore(a.createTextNode(Ce),We.childNodes[0]||null),lt===xt?R.call(Q,Ae?"html":"body")[0]:Ae?Q.documentElement:We},Jt=function(S){const Q=x?x(S):S.ownerDocument;return I.call(Q||S,S,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},gn=function(S){return S=Ea(S,z," "),S=Ea(S,j," "),S=Ea(S,F," "),S},Zt=function(S){var Q;S.normalize();const Ce=x?x(S):S.ownerDocument,Re=I.call(Ce||S,S,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let We=Re.nextNode();for(;We;)We.data=gn(We.data),We=Re.nextNode();const he=(Q=S.querySelectorAll)===null||Q===void 0?void 0:Q.call(S,"template");he&&Zn(he,Pe=>{pn(Pe.content)&&Zt(Pe.content)})},xn=function(S){const Q=k?k(S):null;return typeof Q!="string"||je(Q)!=="form"?!1:typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||S.attributes!==w(S)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function"||S.nodeType!==v(S)||S.childNodes!==f(S)},pn=function(S){if(!v||typeof S!="object"||S===null)return!1;try{return v(S)===Cn.documentFragment}catch{return!1}},Qt=function(S){if(!v||typeof S!="object"||S===null)return!1;try{return typeof v(S)=="number"}catch{return!1}};function Gt(ge,S,Q){ge.length!==0&&Zn(ge,Ce=>{Ce.call(t,S,Q,nt)})}const Nn=function(S,Q){return!!($e&&S.hasChildNodes()&&!Qt(S.firstElementChild)&&Xt(gl,S.textContent)&&Xt(gl,S.innerHTML)||$e&&S.namespaceURI===xt&&S1[Q]&&(Qt(S.firstElementChild)||typeof S.textContent=="string"&&Xt(j1[Q],S.textContent))||S.nodeType===Cn.processingInstruction||$e&&S.nodeType===Cn.comment&&Xt(yl,S.data))},de=function(S,Q){if(S instanceof RegExp)return Xt(S,Q);if(S instanceof Function){for(var Ce=arguments.length,Re=new Array(Ce>2?Ce-2:0),We=2;We<Ce;We++)Re[We-2]=arguments[We];return!!S(Q,...Re)}return!1},Ee=function(S,Q,Ce){if(!xe[Q]&&De(Q)&&de(oe.tagNameCheck,Q))return!1;if(Ye&&!yt[Q]){const Re=_(S),We=f(S);if(We&&Re){const he=We.length;for(let Pe=he-1;Pe>=0;--Pe){const Qe=S===Ce?g(We[Pe],!0):We[Pe];Re.insertBefore(Qe,C(S))}}}return zt(S),!0},Fe=function(S,Q,Ce,Re){return S.length===0?Q:Q===Ce||Q===Re?mn(Q):Q},Ze=function(S,Q){return S===Q||_(S)!==null?!1:(mt&&an(S),!0)},Oe=function(S,Q){if(Gt(Z.beforeSanitizeElements,S,null),Ze(S,Q))return!0;if(xn(S))return zt(S),!0;const Ce=je(B(S));if(H=Fe(Z.uponSanitizeElement,H,ne,ze),Gt(Z.uponSanitizeElement,S,{tagName:Ce,allowedTags:H}),Ze(S,Q))return!0;if(Nn(S,Ce))return zt(S),!0;if(xe[Ce]||!(me.tagCheck instanceof Function&&me.tagCheck(Ce))&&!H[Ce]){const We=Ee(S,Ce,Q);return We===!1&&Gt(Z.afterSanitizeElements,S,null),We}if(A(S)===Cn.element&&!dn(S)||(Ce==="noscript"||Ce==="noembed"||Ce==="noframes")&&Xt(E1,S.innerHTML))return zt(S),!0;if(ve&&S.nodeType===Cn.text){const We=gn(S.textContent);S.textContent!==We&&(Aa(t.removed,{element:S.cloneNode()}),S.textContent=We)}return Gt(Z.afterSanitizeElements,S,null),!1},J=function(S,Q,Ce){if(be[Q]||$t(Q,S)||Ge&&(Q==="id"||Q==="name")&&(Ce in a||Ce in ae))return!1;const Re=V[Q]||me.attributeCheck instanceof Function&&me.attributeCheck(Q,S);return Le&&Xt(O,Q)||ke&&Xt(G,Q)?!0:Re?Dt[Q]||Xt(X,Ea(Ce,K,""))||(Q==="src"||Q==="xlink:href"||Q==="href")&&S!=="script"&&cl(Ce,"data:")===0&&at[S]||Me&&!Xt(ie,Ea(Ce,K,""))?!0:!Ce:De(S)&&de(oe.tagNameCheck,S)&&de(oe.attributeNameCheck,Q,S)||Q==="is"&&oe.allowCustomizedBuiltInElements&&de(oe.tagNameCheck,Ce)},ce=bt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),De=function(S){return!ce[Na(S)]&&Xt(pe,S)},Ve=function(S,Q,Ce,Re){if(E&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Ce)switch(p.getAttributeType(S,Q)){case"TrustedHTML":return M(Re);case"TrustedScriptURL":return P(Re)}return Re},Xe=function(S,Q,Ce,Re){try{Ce?S.setAttributeNS(Ce,Q,Re):S.setAttribute(Q,Re),xn(S)?zt(S):il(t.removed)}catch{Nt(Q,S)}},Je=function(S){Gt(Z.beforeSanitizeAttributes,S,null);const Q=S.attributes;if(!Q||xn(S))return;V=Fe(Z.uponSanitizeAttribute,V,W,dt);const Ce={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0};let Re=Q.length;const We=je(S.nodeName);for(;Re--;){const he=Q[Re],Pe=he.name,Qe=he.namespaceURI,kt=he.value,Tt=je(Pe),zr=kt;let en=Pe==="value"?zr:c1(zr);if(Ce.attrName=Tt,Ce.attrValue=en,Ce.keepAttr=!0,Ce.forceKeepAttr=void 0,Gt(Z.uponSanitizeAttribute,S,Ce),en=Ce.attrValue,we&&(Tt==="id"||Tt==="name")&&cl(en,qe)!==0&&(Nt(Pe,S,he),en=qe+en),$e&&Xt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,en)){Nt(Pe,S,he);continue}if(Tt==="attributename"&&ul(en,"href")){Nt(Pe,S,he);continue}if(!Ce.forceKeepAttr){if(!Ce.keepAttr){Nt(Pe,S,he);continue}if(!le&&Xt(D1,en)){Nt(Pe,S,he);continue}if(ve&&(en=gn(en)),!J(We,Tt,en)){Nt(Pe,S,he);continue}en=Ve(We,Tt,Qe,en),en!==zr&&Xe(S,Pe,Qe,en)}}Gt(Z.afterSanitizeAttributes,S,null)},ct=function(S){let Q=null;const Ce=Jt(S);for(Gt(Z.beforeSanitizeShadowDOM,S,null);Q=Ce.nextNode();)if(Gt(Z.uponSanitizeShadowNode,Q,null),Oe(Q,S),Je(Q),pn(Q.content)&&ct(Q.content),A(Q)===Cn.element){const Re=b(Q);pn(Re)&&(ft(Re),ct(Re))}Gt(Z.afterSanitizeShadowDOM,S,null)},ft=function(S){const Q=[{node:S,shadow:null}];for(;Q.length>0;){const Ce=Q.pop();if(Ce.shadow){ct(Ce.shadow);continue}const Re=Ce.node,he=A(Re)===Cn.element,Pe=f(Re);if(Pe)for(let Qe=Pe.length-1;Qe>=0;--Qe)Q.push({node:Pe[Qe],shadow:null});if(he){const Qe=k?k(Re):null;if(typeof Qe=="string"&&je(Qe)==="template"){const kt=Re.content;pn(kt)&&Q.push({node:kt,shadow:null})}}if(he){const Qe=b(Re);pn(Qe)&&Q.push({node:null,shadow:Qe},{node:Qe,shadow:null})}}};return t.sanitize=function(ge){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Q=null,Ce=null,Re=null,We=null;if(Ct=!ge,Ct&&(ge="<!-->"),typeof ge!="string"&&!Qt(ge)&&(ge=C1(ge),typeof ge!="string"))throw Xn("dirty is not a string, aborting");if(!t.isSupported)return ge;Ie?(H=ze,V=dt):He(S),(Z.uponSanitizeElement.length>0||Z.uponSanitizeAttribute.length>0)&&(H=mn(H)),Z.uponSanitizeAttribute.length>0&&(V=mn(V)),t.removed=[];const he=mt&&typeof ge!="string"&&Qt(ge);if(he){Pt(ge);const kt=B(ge);if(typeof kt=="string"){const Tt=je(kt);if(!H[Tt]||xe[Tt])throw Ht(ge),Xn("root node is forbidden and cannot be sanitized in-place")}if(xn(ge))throw Ht(ge),Xn("root node is clobbered and cannot be sanitized in-place");try{ft(ge)}catch(Tt){throw Ht(ge),Tt}}else if(Qt(ge))Q=Ut("<!---->"),Ce=Q.ownerDocument.importNode(ge,!0),Ce.nodeType===Cn.element&&Ce.nodeName==="BODY"||Ce.nodeName==="HTML"?Q=Ce:Q.appendChild(Ce),ft(Ce);else{if(!et&&!ve&&!Ae&&ge.indexOf("<")===-1)return E&&Se?M(ge):ge;if(Q=Ut(ge),!Q)return et?null:Se?D:""}Q&&st&&zt(Q.firstChild);const Pe=he?ge:Q;try{const kt=Jt(Pe);for(;Re=kt.nextNode();)Oe(Re,Pe),Je(Re),pn(Re.content)&&ct(Re.content)}catch(kt){throw he&&(Ht(ge),Zn(t.removed,Tt=>{Tt.element&&an(Tt.element)})),kt}if(he)return Zn(t.removed,kt=>{kt.element&&an(kt.element)}),ve&&Zt(ge),ge;if(et){if(ve&&Zt(Q),gt)for(We=Y.call(Q.ownerDocument);Q.firstChild;)We.appendChild(Q.firstChild);else We=Q;return(V.shadowroot||V.shadowrootmode)&&(We=q.call(r,We,!0)),We}let Qe=Ae?Q.outerHTML:Q.innerHTML;return Ae&&H["!doctype"]&&Q.ownerDocument&&Q.ownerDocument.doctype&&Q.ownerDocument.doctype.name&&Xt(A1,Q.ownerDocument.doctype.name)&&(Qe="<!DOCTYPE "+Q.ownerDocument.doctype.name+`>
798
+ `+Qe),ve&&(Qe=gn(Qe)),E&&Se?M(Qe):Qe},t.setConfig=function(){let ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};He(ge),Ie=!0,ze=H,dt=V},t.clearConfig=function(){nt=null,Ie=!1,ze=null,dt=null,E=N,D=""},t.isValidAttribute=function(ge,S,Q){nt||He({});const Ce=je(ge),Re=je(S);return J(Ce,Re,Q)},t.addHook=function(ge,S){typeof S=="function"&&rn(Z,ge)&&Aa(Z[ge],S)},t.removeHook=function(ge,S){if(rn(Z,ge)){if(S!==void 0){const Q=i1(Z[ge],S);return Q===-1?void 0:u1(Z[ge],Q,1)[0]}return il(Z[ge])}},t.removeHooks=function(ge){rn(Z,ge)&&(Z[ge]=[])},t.removeAllHooks=function(){Z=_l()},t}var da=xl();let Qr=null;const L1=1500;function eo(){Qr?.clear(),Qr=null}function $1(e,{onEnd:t,rate:a=.9}={}){if(typeof window>"u"||typeof SpeechSynthesisUtterance>"u"||!("speechSynthesis"in window)){t?.();return}const r=window.speechSynthesis;eo();let s=!1;const l=()=>{if(!s){s=!0;try{t?.()}catch{}}};try{r.cancel()}catch{l();return}const i=()=>{eo();try{r.cancel();const d=new SpeechSynthesisUtterance(e),h=r.getVoices().find(p=>p.lang.startsWith("ko"));h&&(d.voice=h),d.rate=a,d.onend=t?l:null,d.onerror=t?l:null,r.speak(d)}catch{l()}};let u;try{u=r.getVoices()}catch{l();return}if(u.length>0){i();return}const c=setTimeout(i,L1);try{r.addEventListener("voiceschanged",i,{once:!0})}catch{clearTimeout(c),l();return}Qr={clear:()=>{clearTimeout(c),r.removeEventListener("voiceschanged",i)}}}function to(){eo(),typeof window<"u"&&"speechSynthesis"in window&&window.speechSynthesis.cancel()}const R1=/^(?:[a-z]+:)?\/\//i,P1="__ihab_core_asset_base_url__";function F1(){return globalThis[P1]??""}function no(e){const t=String(e||"").trim();if(!t)return"";if(R1.test(t)||t.startsWith("data:")||t.startsWith("blob:"))return t;const a=t.startsWith("/")?t:`/${t}`,r=F1();return r?`${r}${a}`:a}const wl="__ihab_core_storage_resolvers__";function Sa(){return globalThis[wl]??null}function I1(e){globalThis[wl]=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:
@@ -814,21 +814,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
814
814
  \uC124\uCE58 \uBA85\uB839\uC5B4 (\uC2A4\uD1A0\uB9AC\uC9C0 SDK \uBBF8\uC124\uCE58 \uC2DC):
815
815
  npm install @supabase/supabase-js
816
816
  pnpm add @supabase/supabase-js
817
- `),this.name="StorageNotConfiguredError"}};function O1(e){F1(e)}function Al(e,t){if(!e)return null;const a=Sa();return a?.resolvePath?a.resolvePath(e,t):t?`${t}/${e}.mp3`:null}async function kl(e){if(!e)return null;const t=Sa();if(!t)throw new Bl("getSignedOrPublicUrl");try{return await t.resolveUrl(e)}catch{return null}}async function Nl(e){const t=Sa();if(!t)throw new Bl("downloadSound");return t.download(e)}function z1(){return Sa()?.noiseBaseUrl??"/sounds/noise"}function W1(){const e=Number(Sa()?.noiseFileGain);return Number.isFinite(e)&&e>0?e:1}function H1(e){const t=AbortSignal.timeout;if(typeof t=="function")return t.call(AbortSignal,e);const a=new AbortController;return setTimeout(()=>a.abort(),e),a.signal}function V1(e){return e===400||e===404||e===410}const El="__ihab_core_tts_config__";function ja(){return globalThis[El]?.urlResolver??null}function sr(){return globalThis[El]?.fallbackUrlResolver??null}const q1="__ihab_core_pronunciation_resolver__";function U1(){return globalThis[q1]??null}let Hn=null;const Ta=new WeakMap,ao=new WeakMap,ro=new WeakMap;let Dl=!1;const Sl=e=>Math.max(0,Math.min(1,Number.isFinite(e)?e:0));function G1(){if(Dl||typeof document>"u")return;Dl=!0;const e=()=>{try{Hn&&Hn.state!=="running"&&Hn.resume()}catch{}};for(const t of["pointerdown","touchend","keydown"])document.addEventListener(t,e,{capture:!0,passive:!0})}function jl(){if(Hn)return Hn;try{const e=window.AudioContext||window.webkitAudioContext;return e?(Hn=new e,G1(),Hn):null}catch{return null}}function oo(){try{Hn?.resume()}catch{}}function so(e,t){const a=Ta.get(t);if(a)return a;try{const r=e.createMediaElementSource(t),s=e.createGain(),l=e.createAnalyser();l.fftSize=1024,l.smoothingTimeConstant=.6,s.gain.value=Sl(ao.get(t)??t.volume),r.connect(s),s.connect(l),s.connect(e.destination);try{t.volume=1}catch{}const i={gain:s,analyser:l};return Ta.set(t,i),i}catch{return null}}function lr(e){if(!e)return Promise.resolve(null);const t=Ta.get(e);if(t)return Promise.resolve(t.analyser);const a=jl();if(!a)return Promise.resolve(null);if(a.state==="running")return Promise.resolve(so(a,e)?.analyser??null);const r=ro.get(e);if(r)return r;const s=Promise.resolve().then(()=>a.resume()).then(()=>a.state==="running"?so(a,e)?.analyser??null:null).catch(()=>null).finally(()=>{ro.delete(e)});return ro.set(e,s),s}function K1(e){if(!e)return null;const t=Ta.get(e);if(t)return t.analyser;const a=jl();return a?a.state==="running"?so(a,e)?.analyser??null:(lr(e),null):null}function Vn(e,t){const a=Sl(t);ao.set(e,a);const r=Ta.get(e);if(r){try{e.volume!==1&&(e.volume=1)}catch{}const s=r.gain.gain;try{const l=r.gain.context.currentTime;s.cancelScheduledValues(l),s.setTargetAtTime(a,l,.01)}catch{try{s.value=a}catch{}}return"gain"}try{e.volume=a}catch{}return"element"}function ir(e){return ao.get(e)??e.volume}function Y1(e,t){e.getFloatTimeDomainData(t);let a=0;for(let r=0;r<t.length;r++){const s=t[r];a+=s*s}return Math.sqrt(a/t.length)}const Z1="__ihab_core_image_config__";function pa(){return globalThis[Z1]??null}const Tl="word_image_existence_map_v1",X1="ihab:image-existence-updated";let Ma=null;function J1(){Ma!==null&&(clearTimeout(Ma),Ma=null),typeof window<"u"&&window.dispatchEvent(new Event(X1))}function Q1(){Ma===null&&(Ma=setTimeout(J1,200))}let Jn=null,lo=0;const La=new Map;function ef(){if(Jn)return Jn;try{const e=typeof localStorage<"u"?localStorage.getItem(Tl):null,t=e?JSON.parse(e):null,a={};if(t&&typeof t=="object"&&!Array.isArray(t))for(const[r,s]of Object.entries(t))typeof s=="boolean"&&(a[r]=s);Jn=a}catch{Jn={}}return Jn}let io=null;function tf(){io===null&&(io=setTimeout(()=>{io=null;try{typeof localStorage<"u"&&Jn&&localStorage.setItem(Tl,JSON.stringify(Jn))}catch{}},200))}function nf(e,t){return`${e}_${t??1}`}async function af(e,t,a=!1){const r=ef(),s=nf(e,t);if(!a&&s in r)return r[s];if(!a&&La.has(s))return La.get(s);const l=pa();if(!l)return!1;let i;try{i=l(e,t)}catch{return!1}if(!i)return!1;let u;try{u=fetch(i,{method:"HEAD",signal:H1(8e3)})}catch{return!1}const c=u.then(d=>d.ok?!0:V1(d.status)?!1:null,()=>null).then(d=>La.get(s)!==c?d??!1:(La.delete(s),d===null?!1:(r[s]=d,lo++,tf(),d)));return La.set(s,c),c}async function Ml(e,t){const a=lo,r=await af(e,t);return lo!==a&&Q1(),r}const Ll=90;function $l(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 rf(e){return $l(e)>90?"LMS":"SMS"}function Rl(e,t=85){const a=$l(e),r=rf(e),s=r==="SMS"?90:2e3,l=typeof t=="number"?t:null;return{bytes:a,type:r,limit:s,over:a>s,target:l,overTarget:l!==null&&a>l}}const of=["onset","vowel","coda","glide"],Pl="none",sf={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},lf="\uC5C6\uC74C";function uf(e){return of.includes(e)}function cf(e){const t={};for(const[a,r]of Object.entries(e)){const s=uf(a)?a:sf[a];s&&(t[s]=r===lf?Pl:r)}return t}const df={\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"}},Il=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],Fl=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],pf=["","\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 $a(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 hf(e){const t=$a(e[0]||"");return t?Il[t.cho]:""}function mf(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],a=i=>Il.includes(i),r=i=>Fl.includes(i),s=t.map(i=>a(i)?"cho":r(i)?"jung":$a(i)?"syl":"other"),l=t.map(i=>$a(i));if(s.includes("other")){const i=e.toLowerCase();return u=>u.normalize("NFC").toLowerCase().includes(i)}return i=>{const u=[...i.normalize("NFC")];for(let c=0;c+t.length<=u.length;c++){let d=!0;for(let h=0;h<t.length;h++){const p=u[c+h],C=s[h];if(C==="cho"){if(hf(p)!==t[h]){d=!1;break}}else if(C==="jung"){const g=$a(p);if(!g||Fl[g.jung]!==t[h]){d=!1;break}}else{const g=l[h];if(g&&g.jong===0){const _=$a(p);if(!_||_.cho!==g.cho||_.jung!==g.jung){d=!1;break}}else if(p!==t[h]){d=!1;break}}}if(d)return!0}return!1}}const Cf={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(Cf).map(([e,t])=>[t.join(""),pf[Number(e)]]));const ff="word_pair_index_v2",bf="word_pair_index_sig_v2";let ur=null;function gf(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;for(const t of Object.values(e)){if(t===null||typeof t!="object"||Array.isArray(t))return!1;const a=t;for(const r of["cho","jung","jong"])if(!Array.isArray(a[r])||!a[r].every(s=>typeof s=="string"))return!1}return!0}function yf(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(ff),t=localStorage.getItem(bf);if(!e||!t)return null;const a=JSON.parse(e);return gf(a)?{index:a,sig:t}:null}catch{return null}}function vf(){if(ur)return ur;const e=yf();return e?(ur=e.index,e.sig,ur):null}function _f(e,t,a){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+a)/(t+a)))}function xf(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 uo=/[ㄱ-ㅎ]/,wf=/[ㅏ-ㅣ]/;function Ol(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||uo.test(a)||wf.test(a))return a}return null}function Bf(e){const t=Ol(e);if(!t)return"\uAC00";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC774":"\uAC00":uo.test(t)?"\uC774":"\uAC00"}function Af(e){return`${e}${Bf(e)}`}function kf(e){const t=Ol(e);if(!t)return"\uB97C";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC744":"\uB97C":uo.test(t)?"\uC744":"\uB97C"}function Nf(e){return`${e}${kf(e)}`}function Ef(e,t,a){const r=e.slice(),[s]=r.splice(t,1);return r.splice(a,0,s),r}function Ra(e,t=Math.random){const a=e.slice();for(let r=a.length-1;r>0;r--){const s=Math.floor(t()*(r+1));[a[r],a[s]]=[a[s],a[r]]}return a}const Df=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",t=typeof Gt?.t=="function"?Gt.t("common.unknownError",{defaultValue:e}):void 0;return typeof t=="string"&&t?t:e};function zl(e,t){if(t===void 0&&(t=Df()),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 Sf="__ihab_core_word_pool__";function Wl(){return globalThis[Sf]??null}const Hl=globalThis;function Vl(e,t){const a=r=>{};try{const r=t();r&&typeof r.catch=="function"&&r.catch(a)}catch(r){a(r)}}function jf(e){Vl("time",()=>Hl.__ihabTrainingTimeLogger?.(e))}function Tf(e){Vl("completion",()=>Hl.__ihabTrainingCompletionLogger?.(e))}const Mf="Asia/Seoul",Lf=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function Pa(e){let t;if(e instanceof Date)t=e;else if(typeof e=="string"){const a=e.trim(),r=/^(\d{4}-\d{2}-\d{2})(?:$|[T ])/.exec(a)?.[1];if(r){const l=new Date(`${r}T00:00:00Z`);if(Number.isNaN(l.getTime())||l.toISOString().slice(0,10)!==r)return null}const s=Lf.exec(a);t=new Date(s?`${s[1]}T${s[2]}:${s[3]??"00"}${s[4]?`.${s[4].slice(0,3).padEnd(3,"0")}`:""}+09:00`:a)}else t=new Date(e);return Number.isNaN(t.getTime())?null:t}function $f(e){return Pa(e)!==null}const Rf=e=>Pa(e);function ql(e,t){const a=t.startsWith("ko")?"ko-KR":"en-US",r=Rf(e);return r?r.toLocaleDateString(a,{timeZone:Mf,year:"numeric",month:"short",day:"numeric"}):""}function Ul(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function Pf(e,t,a){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Ul(a),{year:"numeric",month:"long"}).format(new Date(e,t-1,1))}function co(e,t,a,r){return e("calendar.yearMonth",{year:a,month:r,defaultValue:""})||Pf(a,r,t)}function Ia(){return po(new Date)}function cr(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&Pa(e)?.toISOString().slice(0,10)===e?e:Ia()}function ha(){return Ff(Ia())}const If=540*60*1e3;function Gl(e,t,a){return new Date(Date.UTC(e,t,a)-If)}function Ff(e){const[t,a,r]=e.split("-").map(Number);return new Date(t,(a||1)-1,r||1)}function po(e){if(e==null||e==="")return"";const t=Pa(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function Kl(e,t){if(!e)return"";const a=Pa(e);if(!a)return"";const r=a.getTime(),s=Math.max(0,Math.floor((Date.now()-r)/1e3)),l=Math.floor(s/60),i=Math.floor(l/60),u=Math.floor(i/24),c=Math.floor(u/7),d=Math.floor(u/30),h=Math.floor(u/365);return l<1?t("store.time.justNow","\uBC29\uAE08 \uC804"):l<60?t("store.time.minutesAgo",{n:l}):i<24?t("store.time.hoursAgo",{n:i}):u<7?t("store.time.daysAgo",{n:u}):c<5?t("store.time.weeksAgo",{n:c}):u<365?t("store.time.monthsAgo",{n:Math.min(d,11)}):t("store.time.yearsAgo",{n:h})}function Yl(e,t={}){const{sep:a=".",pad:r=!0,trailingDot:s=!1,fallback:l="\u2014"}=t;if(!e)return l;const i=po(e instanceof Date?e:String(e));if(!i)return l;const[u,c,d]=i.split("-"),h=r?c:String(Number(c)),p=r?d:String(Number(d));return`${u}${a}${h}${a}${p}${s?".":""}`}function dr(e){if(typeof e=="string"){const t=e.trim();return t&&$f(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 Of(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 zf(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:Of(r),shownAt:dr(r.shownAt)??dr(r.shown_at),answeredAt:dr(r.answeredAt)??dr(r.answered_at)}}):[]}const ho=globalThis;async function Wf(){try{return await ho.__ihabNoiseSettingsStore?.load()??null}catch{return null}}function mo(e){const t=a=>{};try{const a=ho.__ihabNoiseSettingsStore?.save(e);a&&typeof a.catch=="function"&&a.catch(t)}catch(a){t(a)}}function pr(e){try{ho.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function Hf(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 ma(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Zl(e,t){if(!e)return"-";const a=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!a)return e;const r=Number(a[1]),s=Number(a[2]),l=a[1].padStart(2,"0");return s===0?t("date.timeH",{h:r,hh:l,mm:a[2]}):t("date.timeHM",{h:r,hh:l,m:s,mm:a[2]})}function Co(e){return(e??0).toLocaleString("ko-KR")}const Vf=[{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"}]}],qf=[{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 Xl(){return Vf}function Uf(){return qf}const Gf=[],Kf=[],Yf=[],Zf=[];function Xf(){return{LISTEN_IN_NOISE:Gf,SHORT_STORY:Kf,LONG_STORY:Yf,ORDERING_SENTENCE:Zf}}const Jf=[{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."}],Jl={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function Qf(e){return Jf.map(t=>{const a=Jl[t.key];return a?{...t,label:e(`trainingType.${a}.title`),desc:e(`trainingType.${a}.desc`)}:t})}var eb={statusFilter:"\uC0C1\uD0DC \uD544\uD130",pageSizeSelect:"\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218",selectedCount:"{{count}}\uAC1C \uC120\uD0DD\uB428",selectedOfMax:"\uCD5C\uB300 {{max}}\uAC1C \uC911 {{count}}\uAC1C",cancel:"\uCDE8\uC18C",info:"\uC124\uBA85",errorState:{message:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",retry:"\uB2E4\uC2DC \uC2DC\uB3C4"},save:"\uC800\uC7A5",confirm:"\uD655\uC778",discardConfirm:{title:"\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?",body:"\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",confirm:"\uC785\uB825 \uCDE8\uC18C"},close:"\uB2EB\uAE30",back:"\uB4A4\uB85C",emptyTrainingName:"\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.",remove:"\uC81C\uAC70",image:"\uC774\uBBF8\uC9C0",delete:"\uC0AD\uC81C",reset:"\uCD08\uAE30\uD654",update:"\uC5C5\uB370\uC774\uD2B8",download:"\uB2E4\uC6B4\uB85C\uB4DC",likeCount:"\uC88B\uC544\uC694 {{count}}",downloadCount:"\uAC00\uC838\uAC04 \uC218 {{count}}",descriptionFor:"{{name}} \uC124\uBA85",search:"\uAC80\uC0C9",empty:"\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",yes:"\uC608",no:"\uC544\uB2C8\uC624",all:"\uC804\uCCB4",none:"\uC5C6\uC74C",days:"{{count}}\uC77C",loadMore:"\uB354\uBCF4\uAE30",more:"\uB354\uBCF4\uAE30",moreFor:"{{name}} \uB354\uBCF4\uAE30",collapseFor:"{{name}} \uC811\uAE30",expandFor:"{{name}} \uD3BC\uCE58\uAE30",sortFor:"{{name}} \uC815\uB82C",retry:"\uB2E4\uC2DC \uC2DC\uB3C4",prevPage:"\uC774\uC804 \uD398\uC774\uC9C0",nextPage:"\uB2E4\uC74C \uD398\uC774\uC9C0",play:"\uC7AC\uC0DD",loading:"\uBD88\uB7EC\uC624\uB294 \uC911",playFor:"{{name}} \uC7AC\uC0DD",pauseFor:"{{name}} \uBA48\uCDA4",pause:"\uBA48\uCDA4",playPause:"\uC7AC\uC0DD / \uBA48\uCDA4",replay:"\uB2E4\uC2DC\uB4E3\uAE30",subscription:"\uC774\uC6A9\uAD8C",done:"\uC644\uB8CC",failed:"\uC2E4\uD328",continue:"\uACC4\uC18D",notification:"\uC54C\uB9BC",emptyList:"\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",noMatches:"\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",menu:"\uBA54\uB274",resetSelection:"\uC120\uD0DD \uCD08\uAE30\uD654",pageSizeLabel:"{{n}}\uAC1C\uC529 \uBCF4\uAE30",totalCountPrefix:"\uCD1D ",totalCountSuffix:"\uAC1C",expand:"\uD3BC\uCE58\uAE30",collapse:"\uC811\uAE30",popup:"\uD31D\uC5C5",codeBlock:"\uCF54\uB4DC \uBE14\uB85D",totalPrefix:"\uCD1D ",copyCode:"\uCF54\uB4DC \uBCF5\uC0AC",copied:"\uBCF5\uC0AC\uB428",col:{problem:"\uBB38\uC81C"},phonetics:{place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"},vowel:{frontHigh:"\uC804\uC124 \uACE0\uBAA8\uC74C",backHighUnrounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C",backHighRounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C",frontMid:"\uC804\uC124 \uC911\uBAA8\uC74C",backMidUnrounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C",backMidRounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C",low:"\uC800\uBAA8\uC74C"},glide:{j:"j\uD65C\uC74C",w:"w\uD65C\uC74C",velar:"\u0270\uD65C\uC74C"}},unknownError:"\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",networkError:"\uB124\uD2B8\uC6CC\uD06C \uC5F0\uACB0\uC774 \uBD88\uC548\uC815\uD569\uB2C8\uB2E4. \uC5F0\uACB0 \uC0C1\uD0DC\uB97C \uD655\uC778\uD55C \uB4A4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694."},tb={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"},nb={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"}},ab={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},rb={selected:"\uC120\uD0DD\uB428"},ob={placeholder:"\uC120\uD0DD"},sb={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},lb={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"},ib={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"},ub={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"}}}},cb={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},db={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."}}},pb={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"}},hb={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"},consent:{record:"\uB3D9\uC758 \uBC1B\uAE30",kinds:"\uBC1B\uC740 \uAC08\uB798",methodTitle:"\uBC1B\uC740 \uBC29\uBC95",sourceTitle:"\uC218\uC9D1 \uCD9C\uCC98",day:"\uBC1B\uC740 \uB0A0",note:"\uBA54\uBAA8",notePlaceholder:"\uC758\uB8B0\uAE30\uAD00 \uC774\uB984 \uB4F1 \u2014 \uBBFC\uAC10\uD55C \uB0B4\uC6A9\uC740 \uC801\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4",submit:"\uC800\uC7A5\uD558\uAE30",allTaken:"\uC138 \uAC08\uB798\uB97C \uC774\uBBF8 \uB2E4 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uBC1B\uC73C\uB824\uBA74 \uBA3C\uC800 \uCCA0\uD68C\uD558\uC138\uC694.",kind:{personal:"\uC77C\uBC18 \uAC1C\uC778\uC815\uBCF4",sensitive:"\uBBFC\uAC10\uC815\uBCF4(\uCCAD\uB825\xB7\uC9C4\uB2E8)",marketing:"\uAD11\uACE0\uC131 \uC815\uBCF4 \uC218\uC2E0"},method:{paper:"\uC11C\uBA74",verbal:"\uAD6C\uB450",electronic:"\uC804\uC790"},source:{self:"\uBCF8\uC778",guardian:"\uBCF4\uD638\uC790",referral:"\uC758\uB8B0\uAE30\uAD00"}}},mb={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"}}}},Cb={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},fb={showN:"{{n}}\uAC1C\uC529"},bb={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."}},gb={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},yb={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},vb={defaultName:"\uB2E8\uC5B4 \uD45C",title:"\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30",subtitle:"\uCE78\uC744 \uC124\uC815\uD558\uACE0 \uB2E8\uC5B4\uB97C \uCD94\uAC00\uD558\uC5EC \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4.",filterTitle:"\uD45C \uC124\uC815",filter:{composition:"\uAD6C\uC131",image:"\uC774\uBBF8\uC9C0",word:"\uB2E8\uC5B4",caption:"\uC720\uD615",standardPron:"\uD45C\uC900 \uBC1C\uC74C",colloquialPron:"\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C",paperOrientation:"\uC6A9\uC9C0 \uBC29\uD5A5",landscape:"\uAC00\uB85C",portrait:"\uC138\uB85C",columns:"\uCE78 \uC218",column:"{{count}}\uCE78",itemsPerPageWord:"\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218",itemsPerPagePair:"\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218",itemsPerPageOption:"{{count}}\uAC1C",pageIndicator:"{{current}} / {{total}}",pageNumber:"\uD398\uC774\uC9C0 \uBC88\uD638",pageNumberLeft:"\uC67C\uCABD",pageNumberCenter:"\uC911\uC559",pageNumberRight:"\uC624\uB978\uCABD",border:"\uC678\uACFD\uC120",topInfo:"\uC0C1\uB2E8 \uC815\uBCF4",bottomInfo:"\uD558\uB2E8 \uC815\uBCF4",cutLine:"\uC808\uCDE8\uC120",show:"\uD45C\uC2DC",hide:"\uBBF8\uD45C\uC2DC",dotted:"\uC810\uC120",corner:"\uCF54\uB108"},addWord:"\uCD94\uAC00\uD558\uAE30",copyItem:"\uD55C \uCE78 \uB354",copyItemAria:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354",wordInfo:"{{word}} \uB0B1\uB9D0 \uC815\uBCF4",emptyItems:"\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694.",load:"\uBD88\uB7EC\uC624\uAE30",openNewWindow:"\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30",saveButton:"\uC800\uC7A5\uD558\uAE30",saveAsNewButton:"\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5",print:"\uC778\uC1C4\uD558\uAE30",popupBlocked:"\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694.",printFileNameSingle:"\uB2E8\uC5B4\uD45C",printFileNamePair:"\uB300\uB9BD\uC30D\uD45C",save:{title:"\uB2E8\uC5B4\uD45C \uC800\uC7A5\uD558\uAE30",nameLabel:"\uC774\uB984",desc:"\uC800\uC7A5\uD560 \uB2E8\uC5B4 \uD45C\uC758 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.",placeholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694.",descriptionLabel:"\uC124\uBA85",descriptionPlaceholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694.",duplicateName:"\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4.",nameRequired:"\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694.",autoFillHint:" (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)",copyName:"{{name}} (\uBCF5\uC0AC)"},loadTable:{title:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C \uBD88\uB7EC\uC624\uAE30",empty:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",loadButton:"\uBD88\uB7EC\uC624\uAE30",itemCount:"{{count}}\uAC1C",deleteAriaLabel:"{{name}} \uC0AD\uC81C",viewLabel:"\uBCF4\uAE30 \uBC29\uC2DD",sortLabel:"\uC815\uB82C",sort:{newest:"\uCD5C\uC2E0\uC21C",oldest:"\uC624\uB798\uB41C\uC21C",name:"\uC774\uB984\uC21C",count:"\uB2E8\uC5B4 \uC218"},view:{grid:"\uD45C\uB85C \uBCF4\uAE30",list:"\uB9AC\uC2A4\uD2B8\uB85C \uBCF4\uAE30"}},publisherFilter:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30",groupDeleteMessage:"\uADF8\uB8F9 \uB0B4 \uB2E8\uC5B4\uD45C\uB294 '\uADF8\uB8F9 \uC5C6\uC74C'\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.",groupNamePlaceholder:"\uADF8\uB8F9 \uC774\uB984",scoring:{o:"{{word}} \uB9DE\uC74C",triangle:"{{word}} \uC560\uB9E4",x:"{{word}} \uD2C0\uB9BC",markName:{o:"\uB9DE\uC74C",triangle:"\uC560\uB9E4",x:"\uD2C0\uB9BC"},button:"\uCC44\uC810\uD558\uAE30",pickTitle:"\uB204\uAD6C\uB97C \uCC44\uC810\uD560\uAE4C\uC694?",pickSubtitle:"\u2018{{name}}\u2019 \uD45C\uB85C \uD6C8\uB828\uD55C \uACE0\uAC1D\uC744 \uACE0\uB974\uC138\uC694.",pickSearch:"\uC774\uB984 \uB610\uB294 \uC804\uD654\uBC88\uD638\uB85C \uCC3E\uAE30",pickEmpty:"\uB4F1\uB85D\uB41C \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickNoMatch:"\uCC3E\uB294 \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickAgain:"\uACE0\uAC1D \uB2E4\uC2DC \uACE0\uB974\uAE30",scoringFor:"{{name}} \uB2D8 \uCC44\uC810 \uC911",none:"\uCE78 \uC544\uB798 \u25CB \xB7 \u25B3 \xB7 \u2715 \uB97C \uB20C\uB7EC \uB9E4\uAE30\uC138\uC694. \uB9C8\uC6B0\uC2A4\uB85C\uB294 \uCE78\uC5D0 \uC190\uC744 \uC5B9\uC73C\uBA74, \uC790\uD310\uC73C\uB85C\uB294 \uCE78\uC5D0 \uCD08\uC810\uC774 \uAC00\uBA74 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.",tally:"{{marked}}\uCE78 \uCC44\uC810 \xB7 \u25CB {{o}} \xB7 \u25B3 {{triangle}} \xB7 \u2715 {{x}} \xB7 \uC815\uB2F5\uB960 {{rate}}%",save:"\uCC44\uC810 \uC800\uC7A5",saved:"{{name}} \uB2D8\uC758 \uCC44\uC810 {{count}}\uCE78\uC744 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4.",reviewTitle:"\uBCF5\uC2B5\uD45C\uB97C \uB9CC\uB4E4\uAE4C\uC694?",reviewMessage:"{{name}} \uB2D8\uC774 \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC73C\uB85C \uC0C8 \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4. \uB9DE\uD78C \uCE78\uC740 \uBE60\uC9D1\uB2C8\uB2E4.",reviewConfirm:"\uBCF5\uC2B5\uD45C \uB9CC\uB4E4\uAE30",reviewDescription:"\u2018{{name}}\u2019 \uCC44\uC810\uC5D0\uC11C \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC744 \uBAA8\uC740 \uD45C\uC785\uB2C8\uB2E4.",reviewCreated:"\u2018{{name}}\u2019\uC744(\uB97C) \uB9CC\uB4E4\uC5C8\uC2B5\uB2C8\uB2E4 \u2014 {{count}}\uCE78.",discardTitle:"\uB9E4\uAE34 \uCC44\uC810\uC744 \uBC84\uB9B4\uAE4C\uC694?",discardMessage:"{{count}}\uCE78\uC744 \uB9E4\uACBC\uC9C0\uB9CC \uC544\uC9C1 \uC800\uC7A5\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uB098\uAC00\uBA74 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",discardConfirm:"\uBC84\uB9AC\uACE0 \uB098\uAC00\uAE30"},info:{grade:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09",syllables:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808",pos:"\uD488\uC0AC: {{v}}",wordType:"\uC720\uD615: {{v}}"},pos:{noun:"\uBA85\uC0AC",verb:"\uB3D9\uC0AC",adjective:"\uD615\uC6A9\uC0AC",adverb:"\uBD80\uC0AC",numeral:"\uC218\uC0AC",determiner:"\uAD00\uD615\uC0AC",interjection:"\uAC10\uD0C4\uC0AC",particle:"\uC870\uC0AC",affix:"\uC811\uC0AC",dependentNoun:"\uC758\uC874\uBA85\uC0AC",pronoun:"\uB300\uBA85\uC0AC",auxVerb:"\uBCF4\uC870\uB3D9\uC0AC",auxAdjective:"\uBCF4\uC870\uD615\uC6A9\uC0AC"},reorder:{moved:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40",handle:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)",hint:"Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"},thumbMore:"+{{count}}",replaceItem:"\uB2E4\uB978 \uB2E8\uC5B4\uB85C",replacePair:"\uB2E4\uB978 \uC30D\uC73C\uB85C",replaceItemAria:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C",replacePairAria:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C",thumbMoreAria:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}"},_b={filterTitle:"\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815",filter:{positionAny:"\uBB34\uAD00",positionHead:"\uC5B4\uB450",positionMid:"\uC5B4\uC911",positionTail:"\uC5B4\uB9D0",difficulty:"\uB09C\uC774\uB3C4",grade:"{{n}}\uB4F1\uAE09",age:"{{n}}\uC138",difficultyInfoAge:"3\uC138~7\uC138: \uAC00\uC7A5 \uC26C\uC6B4 \uB0B1\uB9D0(1\uB4F1\uAE09)\uC744 \uB610\uB798\uBCC4\uB85C \uB098\uB208 \uAC83\uC785\uB2C8\uB2E4.",difficultyInfoGrade:"2~4\uB4F1\uAE09: \uADF8\uBCF4\uB2E4 \uC5B4\uB824\uC6B4 \uB0B1\uB9D0\uC774\uACE0, \uB098\uC774\uB85C\uB294 \uB098\uB204\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",difficultyInfoNone:"\uC5C6\uC74C: \uB09C\uC774\uB3C4\uAC00 \uB9E4\uACA8\uC9C0\uC9C0 \uC54A\uC740 \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",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"},xb={clearAllSelection:"\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C",divLine:"\uB300\uB9BD\uC120",removePair:"\uB300\uB9BD\uC30D \uBE7C\uAE30",removePairFor:"{{name}} \uB300\uB9BD\uC30D \uBE7C\uAE30",removeWord:"\uB2E8\uC5B4 \uBE7C\uAE30",removeWordFor:"{{name}} \uBE7C\uAE30"},wb={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"}},Bb={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"}},Ab={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"}},kb={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",onlyHighUsage:"\uD65C\uC6A9\uB3C4 \uB192\uC740 \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."]},Nb={lead:`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
817
+ `),this.name="StorageNotConfiguredError"}};function O1(e){I1(e)}function kl(e,t){if(!e)return null;const a=Sa();return a?.resolvePath?a.resolvePath(e,t):t?`${t}/${e}.mp3`:null}async function Al(e){if(!e)return null;const t=Sa();if(!t)throw new Bl("getSignedOrPublicUrl");try{return await t.resolveUrl(e)}catch{return null}}async function Nl(e){const t=Sa();if(!t)throw new Bl("downloadSound");return t.download(e)}function z1(){return Sa()?.noiseBaseUrl??"/sounds/noise"}function W1(){const e=Number(Sa()?.noiseFileGain);return Number.isFinite(e)&&e>0?e:1}function H1(e){const t=AbortSignal.timeout;if(typeof t=="function")return t.call(AbortSignal,e);const a=new AbortController;return setTimeout(()=>a.abort(),e),a.signal}function V1(e){return e===400||e===404||e===410}const El="__ihab_core_tts_config__";function ja(){return globalThis[El]?.urlResolver??null}function sr(){return globalThis[El]?.fallbackUrlResolver??null}const q1="__ihab_core_pronunciation_resolver__";function U1(){return globalThis[q1]??null}let Hn=null;const Ta=new WeakMap,ao=new WeakMap,ro=new WeakMap;let Dl=!1;const Sl=e=>Math.max(0,Math.min(1,Number.isFinite(e)?e:0));function G1(){if(Dl||typeof document>"u")return;Dl=!0;const e=()=>{try{Hn&&Hn.state!=="running"&&Hn.resume()}catch{}};for(const t of["pointerdown","touchend","keydown"])document.addEventListener(t,e,{capture:!0,passive:!0})}function jl(){if(Hn)return Hn;try{const e=window.AudioContext||window.webkitAudioContext;return e?(Hn=new e,G1(),Hn):null}catch{return null}}function oo(){try{Hn?.resume()}catch{}}function so(e,t){const a=Ta.get(t);if(a)return a;try{const r=e.createMediaElementSource(t),s=e.createGain(),l=e.createAnalyser();l.fftSize=1024,l.smoothingTimeConstant=.6,s.gain.value=Sl(ao.get(t)??t.volume),r.connect(s),s.connect(l),s.connect(e.destination);try{t.volume=1}catch{}const i={gain:s,analyser:l};return Ta.set(t,i),i}catch{return null}}function lr(e){if(!e)return Promise.resolve(null);const t=Ta.get(e);if(t)return Promise.resolve(t.analyser);const a=jl();if(!a)return Promise.resolve(null);if(a.state==="running")return Promise.resolve(so(a,e)?.analyser??null);const r=ro.get(e);if(r)return r;const s=Promise.resolve().then(()=>a.resume()).then(()=>a.state==="running"?so(a,e)?.analyser??null:null).catch(()=>null).finally(()=>{ro.delete(e)});return ro.set(e,s),s}function K1(e){if(!e)return null;const t=Ta.get(e);if(t)return t.analyser;const a=jl();return a?a.state==="running"?so(a,e)?.analyser??null:(lr(e),null):null}function Vn(e,t){const a=Sl(t);ao.set(e,a);const r=Ta.get(e);if(r){try{e.volume!==1&&(e.volume=1)}catch{}const s=r.gain.gain;try{const l=r.gain.context.currentTime;s.cancelScheduledValues(l),s.setTargetAtTime(a,l,.01)}catch{try{s.value=a}catch{}}return"gain"}try{e.volume=a}catch{}return"element"}function ir(e){return ao.get(e)??e.volume}function Y1(e,t){e.getFloatTimeDomainData(t);let a=0;for(let r=0;r<t.length;r++){const s=t[r];a+=s*s}return Math.sqrt(a/t.length)}const Z1="__ihab_core_image_config__";function pa(){return globalThis[Z1]??null}const Tl="word_image_existence_map_v1",X1="ihab:image-existence-updated";let Ma=null;function J1(){Ma!==null&&(clearTimeout(Ma),Ma=null),typeof window<"u"&&window.dispatchEvent(new Event(X1))}function Q1(){Ma===null&&(Ma=setTimeout(J1,200))}let Jn=null,lo=0;const La=new Map;function ef(){if(Jn)return Jn;try{const e=typeof localStorage<"u"?localStorage.getItem(Tl):null,t=e?JSON.parse(e):null,a={};if(t&&typeof t=="object"&&!Array.isArray(t))for(const[r,s]of Object.entries(t))typeof s=="boolean"&&(a[r]=s);Jn=a}catch{Jn={}}return Jn}let io=null;function tf(){io===null&&(io=setTimeout(()=>{io=null;try{typeof localStorage<"u"&&Jn&&localStorage.setItem(Tl,JSON.stringify(Jn))}catch{}},200))}function nf(e,t){return`${e}_${t??1}`}async function af(e,t,a=!1){const r=ef(),s=nf(e,t);if(!a&&s in r)return r[s];if(!a&&La.has(s))return La.get(s);const l=pa();if(!l)return!1;let i;try{i=l(e,t)}catch{return!1}if(!i)return!1;let u;try{u=fetch(i,{method:"HEAD",signal:H1(8e3)})}catch{return!1}const c=u.then(d=>d.ok?!0:V1(d.status)?!1:null,()=>null).then(d=>La.get(s)!==c?d??!1:(La.delete(s),d===null?!1:(r[s]=d,lo++,tf(),d)));return La.set(s,c),c}async function Ml(e,t){const a=lo,r=await af(e,t);return lo!==a&&Q1(),r}const Ll=90;function $l(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 rf(e){return $l(e)>90?"LMS":"SMS"}function Rl(e,t=85){const a=$l(e),r=rf(e),s=r==="SMS"?90:2e3,l=typeof t=="number"?t:null;return{bytes:a,type:r,limit:s,over:a>s,target:l,overTarget:l!==null&&a>l}}const of=["onset","vowel","coda","glide"],Pl="none",sf={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},lf="\uC5C6\uC74C";function uf(e){return of.includes(e)}function cf(e){const t={};for(const[a,r]of Object.entries(e)){const s=uf(a)?a:sf[a];s&&(t[s]=r===lf?Pl:r)}return t}const df={\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"}},Fl=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],Il=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],pf=["","\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 $a(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 hf(e){const t=$a(e[0]||"");return t?Fl[t.cho]:""}function mf(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],a=i=>Fl.includes(i),r=i=>Il.includes(i),s=t.map(i=>a(i)?"cho":r(i)?"jung":$a(i)?"syl":"other"),l=t.map(i=>$a(i));if(s.includes("other")){const i=e.toLowerCase();return u=>u.normalize("NFC").toLowerCase().includes(i)}return i=>{const u=[...i.normalize("NFC")];for(let c=0;c+t.length<=u.length;c++){let d=!0;for(let h=0;h<t.length;h++){const p=u[c+h],m=s[h];if(m==="cho"){if(hf(p)!==t[h]){d=!1;break}}else if(m==="jung"){const g=$a(p);if(!g||Il[g.jung]!==t[h]){d=!1;break}}else{const g=l[h];if(g&&g.jong===0){const y=$a(p);if(!y||y.cho!==g.cho||y.jung!==g.jung){d=!1;break}}else if(p!==t[h]){d=!1;break}}}if(d)return!0}return!1}}const Cf={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(Cf).map(([e,t])=>[t.join(""),pf[Number(e)]]));const ff="word_pair_index_v2",bf="word_pair_index_sig_v2";let ur=null;function gf(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;for(const t of Object.values(e)){if(t===null||typeof t!="object"||Array.isArray(t))return!1;const a=t;for(const r of["cho","jung","jong"])if(!Array.isArray(a[r])||!a[r].every(s=>typeof s=="string"))return!1}return!0}function yf(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(ff),t=localStorage.getItem(bf);if(!e||!t)return null;const a=JSON.parse(e);return gf(a)?{index:a,sig:t}:null}catch{return null}}function vf(){if(ur)return ur;const e=yf();return e?(ur=e.index,e.sig,ur):null}function _f(e,t,a){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+a)/(t+a)))}function xf(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 uo=/[ㄱ-ㅎ]/,wf=/[ㅏ-ㅣ]/;function Ol(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||uo.test(a)||wf.test(a))return a}return null}function Bf(e){const t=Ol(e);if(!t)return"\uAC00";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC774":"\uAC00":uo.test(t)?"\uC774":"\uAC00"}function kf(e){return`${e}${Bf(e)}`}function Af(e){const t=Ol(e);if(!t)return"\uB97C";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC744":"\uB97C":uo.test(t)?"\uC744":"\uB97C"}function Nf(e){return`${e}${Af(e)}`}function Ef(e,t,a){const r=e.slice(),[s]=r.splice(t,1);return r.splice(a,0,s),r}function Ra(e,t=Math.random){const a=e.slice();for(let r=a.length-1;r>0;r--){const s=Math.floor(t()*(r+1));[a[r],a[s]]=[a[s],a[r]]}return a}const Df=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",t=typeof Kt?.t=="function"?Kt.t("common.unknownError",{defaultValue:e}):void 0;return typeof t=="string"&&t?t:e};function zl(e,t){if(t===void 0&&(t=Df()),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 Sf="__ihab_core_word_pool__";function Wl(){return globalThis[Sf]??null}const Hl=globalThis;function Vl(e,t){const a=r=>{};try{const r=t();r&&typeof r.catch=="function"&&r.catch(a)}catch(r){a(r)}}function jf(e){Vl("time",()=>Hl.__ihabTrainingTimeLogger?.(e))}function Tf(e){Vl("completion",()=>Hl.__ihabTrainingCompletionLogger?.(e))}const Mf="Asia/Seoul",Lf=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function Pa(e){let t;if(e instanceof Date)t=e;else if(typeof e=="string"){const a=e.trim(),r=/^(\d{4}-\d{2}-\d{2})(?:$|[T ])/.exec(a)?.[1];if(r){const l=new Date(`${r}T00:00:00Z`);if(Number.isNaN(l.getTime())||l.toISOString().slice(0,10)!==r)return null}const s=Lf.exec(a);t=new Date(s?`${s[1]}T${s[2]}:${s[3]??"00"}${s[4]?`.${s[4].slice(0,3).padEnd(3,"0")}`:""}+09:00`:a)}else t=new Date(e);return Number.isNaN(t.getTime())?null:t}function $f(e){return Pa(e)!==null}const Rf=e=>Pa(e);function ql(e,t){const a=t.startsWith("ko")?"ko-KR":"en-US",r=Rf(e);return r?r.toLocaleDateString(a,{timeZone:Mf,year:"numeric",month:"short",day:"numeric"}):""}function Ul(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function Pf(e,t,a){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Ul(a),{year:"numeric",month:"long"}).format(new Date(e,t-1,1))}function co(e,t,a,r){return e("calendar.yearMonth",{year:a,month:r,defaultValue:""})||Pf(a,r,t)}function Fa(){return po(new Date)}function cr(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&Pa(e)?.toISOString().slice(0,10)===e?e:Fa()}function ha(){return If(Fa())}const Ff=540*60*1e3;function Gl(e,t,a){return new Date(Date.UTC(e,t,a)-Ff)}function If(e){const[t,a,r]=e.split("-").map(Number);return new Date(t,(a||1)-1,r||1)}function po(e){if(e==null||e==="")return"";const t=Pa(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function Kl(e,t){if(!e)return"";const a=Pa(e);if(!a)return"";const r=a.getTime(),s=Math.max(0,Math.floor((Date.now()-r)/1e3)),l=Math.floor(s/60),i=Math.floor(l/60),u=Math.floor(i/24),c=Math.floor(u/7),d=Math.floor(u/30),h=Math.floor(u/365);return l<1?t("store.time.justNow","\uBC29\uAE08 \uC804"):l<60?t("store.time.minutesAgo",{n:l}):i<24?t("store.time.hoursAgo",{n:i}):u<7?t("store.time.daysAgo",{n:u}):c<5?t("store.time.weeksAgo",{n:c}):u<365?t("store.time.monthsAgo",{n:Math.min(d,11)}):t("store.time.yearsAgo",{n:h})}function Yl(e,t={}){const{sep:a=".",pad:r=!0,trailingDot:s=!1,fallback:l="\u2014"}=t;if(!e)return l;const i=po(e instanceof Date?e:String(e));if(!i)return l;const[u,c,d]=i.split("-"),h=r?c:String(Number(c)),p=r?d:String(Number(d));return`${u}${a}${h}${a}${p}${s?".":""}`}function dr(e){if(typeof e=="string"){const t=e.trim();return t&&$f(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 on(e){return typeof e=="string"?e.trim()||null:typeof e=="number"?String(e):null}function Of(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 zf(e){return Array.isArray(e)?e.map((t,a)=>{const r=t??{};return{index:a,itemId:on(r.contextCode)??on(r.itemId)??on(r.itemCode)??on(r.id),question:on(r.question)??on(r.q)??on(r.sentence)??on(r.text)??on(r.prompt)??on(r.word)??on(r.targetSyllable),answer:on(r.answer),selected:on(r.selectedText)??on(r.selected),correct:Of(r),shownAt:dr(r.shownAt)??dr(r.shown_at),answeredAt:dr(r.answeredAt)??dr(r.answered_at)}}):[]}const ho=globalThis;async function Wf(){try{return await ho.__ihabNoiseSettingsStore?.load()??null}catch{return null}}function mo(e){const t=a=>{};try{const a=ho.__ihabNoiseSettingsStore?.save(e);a&&typeof a.catch=="function"&&a.catch(t)}catch(a){t(a)}}function pr(e){try{ho.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function Hf(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 ma(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Zl(e,t){if(!e)return"-";const a=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!a)return e;const r=Number(a[1]),s=Number(a[2]),l=a[1].padStart(2,"0");return s===0?t("date.timeH",{h:r,hh:l,mm:a[2]}):t("date.timeHM",{h:r,hh:l,m:s,mm:a[2]})}function Co(e){return(e??0).toLocaleString("ko-KR")}const Vf=[{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"}]}],qf=[{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 Xl(){return Vf}function Uf(){return qf}const Gf=[],Kf=[],Yf=[],Zf=[];function Xf(){return{LISTEN_IN_NOISE:Gf,SHORT_STORY:Kf,LONG_STORY:Yf,ORDERING_SENTENCE:Zf}}const Jf=[{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."}],Jl={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function Qf(e){return Jf.map(t=>{const a=Jl[t.key];return a?{...t,label:e(`trainingType.${a}.title`),desc:e(`trainingType.${a}.desc`)}:t})}var eb={statusFilter:"\uC0C1\uD0DC \uD544\uD130",pageSizeSelect:"\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218",selectedCount:"{{count}}\uAC1C \uC120\uD0DD\uB428",selectedOfMax:"\uCD5C\uB300 {{max}}\uAC1C \uC911 {{count}}\uAC1C",cancel:"\uCDE8\uC18C",info:"\uC124\uBA85",errorState:{message:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",retry:"\uB2E4\uC2DC \uC2DC\uB3C4"},save:"\uC800\uC7A5",confirm:"\uD655\uC778",discardConfirm:{title:"\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?",body:"\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",confirm:"\uC785\uB825 \uCDE8\uC18C"},close:"\uB2EB\uAE30",back:"\uB4A4\uB85C",emptyTrainingName:"\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.",remove:"\uC81C\uAC70",image:"\uC774\uBBF8\uC9C0",delete:"\uC0AD\uC81C",reset:"\uCD08\uAE30\uD654",update:"\uC5C5\uB370\uC774\uD2B8",download:"\uB2E4\uC6B4\uB85C\uB4DC",likeCount:"\uC88B\uC544\uC694 {{count}}",downloadCount:"\uAC00\uC838\uAC04 \uC218 {{count}}",descriptionFor:"{{name}} \uC124\uBA85",search:"\uAC80\uC0C9",empty:"\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",yes:"\uC608",no:"\uC544\uB2C8\uC624",all:"\uC804\uCCB4",none:"\uC5C6\uC74C",days:"{{count}}\uC77C",loadMore:"\uB354\uBCF4\uAE30",more:"\uB354\uBCF4\uAE30",moreFor:"{{name}} \uB354\uBCF4\uAE30",collapseFor:"{{name}} \uC811\uAE30",expandFor:"{{name}} \uD3BC\uCE58\uAE30",sortFor:"{{name}} \uC815\uB82C",retry:"\uB2E4\uC2DC \uC2DC\uB3C4",prevPage:"\uC774\uC804 \uD398\uC774\uC9C0",nextPage:"\uB2E4\uC74C \uD398\uC774\uC9C0",play:"\uC7AC\uC0DD",loading:"\uBD88\uB7EC\uC624\uB294 \uC911",playFor:"{{name}} \uC7AC\uC0DD",pauseFor:"{{name}} \uBA48\uCDA4",pause:"\uBA48\uCDA4",playPause:"\uC7AC\uC0DD / \uBA48\uCDA4",replay:"\uB2E4\uC2DC\uB4E3\uAE30",subscription:"\uC774\uC6A9\uAD8C",done:"\uC644\uB8CC",failed:"\uC2E4\uD328",continue:"\uACC4\uC18D",notification:"\uC54C\uB9BC",emptyList:"\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",noMatches:"\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",menu:"\uBA54\uB274",resetSelection:"\uC120\uD0DD \uCD08\uAE30\uD654",pageSizeLabel:"{{n}}\uAC1C\uC529 \uBCF4\uAE30",totalCountPrefix:"\uCD1D ",totalCountSuffix:"\uAC1C",expand:"\uD3BC\uCE58\uAE30",collapse:"\uC811\uAE30",popup:"\uD31D\uC5C5",codeBlock:"\uCF54\uB4DC \uBE14\uB85D",totalPrefix:"\uCD1D ",copyCode:"\uCF54\uB4DC \uBCF5\uC0AC",copied:"\uBCF5\uC0AC\uB428",col:{problem:"\uBB38\uC81C"},phonetics:{place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"},vowel:{frontHigh:"\uC804\uC124 \uACE0\uBAA8\uC74C",backHighUnrounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C",backHighRounded:"\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C",frontMid:"\uC804\uC124 \uC911\uBAA8\uC74C",backMidUnrounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C",backMidRounded:"\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C",low:"\uC800\uBAA8\uC74C"},glide:{j:"j\uD65C\uC74C",w:"w\uD65C\uC74C",velar:"\u0270\uD65C\uC74C"}},unknownError:"\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",networkError:"\uB124\uD2B8\uC6CC\uD06C \uC5F0\uACB0\uC774 \uBD88\uC548\uC815\uD569\uB2C8\uB2E4. \uC5F0\uACB0 \uC0C1\uD0DC\uB97C \uD655\uC778\uD55C \uB4A4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694."},tb={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"},nb={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"}},ab={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},rb={selected:"\uC120\uD0DD\uB428"},ob={placeholder:"\uC120\uD0DD"},sb={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},lb={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"},ib={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"},ub={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"}}}},cb={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},db={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."}}},pb={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"}},hb={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"},consent:{record:"\uB3D9\uC758 \uBC1B\uAE30",kinds:"\uBC1B\uC740 \uAC08\uB798",methodTitle:"\uBC1B\uC740 \uBC29\uBC95",sourceTitle:"\uC218\uC9D1 \uCD9C\uCC98",day:"\uBC1B\uC740 \uB0A0",note:"\uBA54\uBAA8",notePlaceholder:"\uC758\uB8B0\uAE30\uAD00 \uC774\uB984 \uB4F1 \u2014 \uBBFC\uAC10\uD55C \uB0B4\uC6A9\uC740 \uC801\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4",submit:"\uC800\uC7A5\uD558\uAE30",allTaken:"\uC138 \uAC08\uB798\uB97C \uC774\uBBF8 \uB2E4 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uBC1B\uC73C\uB824\uBA74 \uBA3C\uC800 \uCCA0\uD68C\uD558\uC138\uC694.",kind:{personal:"\uC77C\uBC18 \uAC1C\uC778\uC815\uBCF4",sensitive:"\uBBFC\uAC10\uC815\uBCF4(\uCCAD\uB825\xB7\uC9C4\uB2E8)",marketing:"\uAD11\uACE0\uC131 \uC815\uBCF4 \uC218\uC2E0"},method:{paper:"\uC11C\uBA74",verbal:"\uAD6C\uB450",electronic:"\uC804\uC790"},source:{self:"\uBCF8\uC778",guardian:"\uBCF4\uD638\uC790",referral:"\uC758\uB8B0\uAE30\uAD00"}}},mb={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"}}}},Cb={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},fb={showN:"{{n}}\uAC1C\uC529"},bb={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."}},gb={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},yb={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},vb={defaultName:"\uB2E8\uC5B4 \uD45C",title:"\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30",subtitle:"\uCE78\uC744 \uC124\uC815\uD558\uACE0 \uB2E8\uC5B4\uB97C \uCD94\uAC00\uD558\uC5EC \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4.",filterTitle:"\uD45C \uC124\uC815",filter:{composition:"\uAD6C\uC131",image:"\uC774\uBBF8\uC9C0",word:"\uB2E8\uC5B4",caption:"\uC720\uD615",standardPron:"\uD45C\uC900 \uBC1C\uC74C",colloquialPron:"\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C",paperOrientation:"\uC6A9\uC9C0 \uBC29\uD5A5",landscape:"\uAC00\uB85C",portrait:"\uC138\uB85C",columns:"\uCE78 \uC218",column:"{{count}}\uCE78",itemsPerPageWord:"\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218",itemsPerPagePair:"\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218",itemsPerPageOption:"{{count}}\uAC1C",pageIndicator:"{{current}} / {{total}}",pageNumber:"\uD398\uC774\uC9C0 \uBC88\uD638",pageNumberLeft:"\uC67C\uCABD",pageNumberCenter:"\uC911\uC559",pageNumberRight:"\uC624\uB978\uCABD",border:"\uC678\uACFD\uC120",topInfo:"\uC0C1\uB2E8 \uC815\uBCF4",bottomInfo:"\uD558\uB2E8 \uC815\uBCF4",cutLine:"\uC808\uCDE8\uC120",show:"\uD45C\uC2DC",hide:"\uBBF8\uD45C\uC2DC",dotted:"\uC810\uC120",corner:"\uCF54\uB108"},addWord:"\uCD94\uAC00\uD558\uAE30",copyItem:"\uD55C \uCE78 \uB354",copyItemAria:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354",wordInfo:"{{word}} \uB0B1\uB9D0 \uC815\uBCF4",emptyItems:"\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694.",load:"\uBD88\uB7EC\uC624\uAE30",openNewWindow:"\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30",saveButton:"\uC800\uC7A5\uD558\uAE30",saveAsNewButton:"\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5",print:"\uC778\uC1C4\uD558\uAE30",popupBlocked:"\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694.",printFileNameSingle:"\uB2E8\uC5B4\uD45C",printFileNamePair:"\uB300\uB9BD\uC30D\uD45C",save:{title:"\uB2E8\uC5B4\uD45C \uC800\uC7A5\uD558\uAE30",nameLabel:"\uC774\uB984",desc:"\uC800\uC7A5\uD560 \uB2E8\uC5B4 \uD45C\uC758 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.",placeholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694.",descriptionLabel:"\uC124\uBA85",descriptionPlaceholder:"\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694.",duplicateName:"\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4.",nameRequired:"\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694.",autoFillHint:" (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)",copyName:"{{name}} (\uBCF5\uC0AC)"},loadTable:{title:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C \uBD88\uB7EC\uC624\uAE30",empty:"\uC800\uC7A5\uB41C \uB2E8\uC5B4 \uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",loadButton:"\uBD88\uB7EC\uC624\uAE30",itemCount:"{{count}}\uAC1C",deleteAriaLabel:"{{name}} \uC0AD\uC81C",viewLabel:"\uBCF4\uAE30 \uBC29\uC2DD",sortLabel:"\uC815\uB82C",sort:{newest:"\uCD5C\uC2E0\uC21C",oldest:"\uC624\uB798\uB41C\uC21C",name:"\uC774\uB984\uC21C",count:"\uB2E8\uC5B4 \uC218"},view:{grid:"\uD45C\uB85C \uBCF4\uAE30",list:"\uB9AC\uC2A4\uD2B8\uB85C \uBCF4\uAE30"}},publisherFilter:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30",groupDeleteMessage:"\uADF8\uB8F9 \uB0B4 \uB2E8\uC5B4\uD45C\uB294 '\uADF8\uB8F9 \uC5C6\uC74C'\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.",groupNamePlaceholder:"\uADF8\uB8F9 \uC774\uB984",scoring:{o:"{{word}} \uB9DE\uC74C",triangle:"{{word}} \uC560\uB9E4",x:"{{word}} \uD2C0\uB9BC",markName:{o:"\uB9DE\uC74C",triangle:"\uC560\uB9E4",x:"\uD2C0\uB9BC"},button:"\uCC44\uC810\uD558\uAE30",pickTitle:"\uB204\uAD6C\uB97C \uCC44\uC810\uD560\uAE4C\uC694?",pickSubtitle:"\u2018{{name}}\u2019 \uD45C\uB85C \uD6C8\uB828\uD55C \uACE0\uAC1D\uC744 \uACE0\uB974\uC138\uC694.",pickSearch:"\uC774\uB984 \uB610\uB294 \uC804\uD654\uBC88\uD638\uB85C \uCC3E\uAE30",pickEmpty:"\uB4F1\uB85D\uB41C \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickNoMatch:"\uCC3E\uB294 \uACE0\uAC1D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.",pickAgain:"\uACE0\uAC1D \uB2E4\uC2DC \uACE0\uB974\uAE30",scoringFor:"{{name}} \uB2D8 \uCC44\uC810 \uC911",none:"\uCE78 \uC544\uB798 \u25CB \xB7 \u25B3 \xB7 \u2715 \uB97C \uB20C\uB7EC \uB9E4\uAE30\uC138\uC694. \uB9C8\uC6B0\uC2A4\uB85C\uB294 \uCE78\uC5D0 \uC190\uC744 \uC5B9\uC73C\uBA74, \uC790\uD310\uC73C\uB85C\uB294 \uCE78\uC5D0 \uCD08\uC810\uC774 \uAC00\uBA74 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.",tally:"{{marked}}\uCE78 \uCC44\uC810 \xB7 \u25CB {{o}} \xB7 \u25B3 {{triangle}} \xB7 \u2715 {{x}} \xB7 \uC815\uB2F5\uB960 {{rate}}%",save:"\uCC44\uC810 \uC800\uC7A5",saved:"{{name}} \uB2D8\uC758 \uCC44\uC810 {{count}}\uCE78\uC744 \uC800\uC7A5\uD588\uC2B5\uB2C8\uB2E4.",reviewTitle:"\uBCF5\uC2B5\uD45C\uB97C \uB9CC\uB4E4\uAE4C\uC694?",reviewMessage:"{{name}} \uB2D8\uC774 \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC73C\uB85C \uC0C8 \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4. \uB9DE\uD78C \uCE78\uC740 \uBE60\uC9D1\uB2C8\uB2E4.",reviewConfirm:"\uBCF5\uC2B5\uD45C \uB9CC\uB4E4\uAE30",reviewDescription:"\u2018{{name}}\u2019 \uCC44\uC810\uC5D0\uC11C \uD2C0\uB9AC\uAC70\uB098 \uC560\uB9E4\uD588\uB358 {{count}}\uCE78\uC744 \uBAA8\uC740 \uD45C\uC785\uB2C8\uB2E4.",reviewCreated:"\u2018{{name}}\u2019\uC744(\uB97C) \uB9CC\uB4E4\uC5C8\uC2B5\uB2C8\uB2E4 \u2014 {{count}}\uCE78.",discardTitle:"\uB9E4\uAE34 \uCC44\uC810\uC744 \uBC84\uB9B4\uAE4C\uC694?",discardMessage:"{{count}}\uCE78\uC744 \uB9E4\uACBC\uC9C0\uB9CC \uC544\uC9C1 \uC800\uC7A5\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uB098\uAC00\uBA74 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4.",discardConfirm:"\uBC84\uB9AC\uACE0 \uB098\uAC00\uAE30"},info:{grade:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09",syllables:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808",pos:"\uD488\uC0AC: {{v}}",wordType:"\uC720\uD615: {{v}}"},pos:{noun:"\uBA85\uC0AC",verb:"\uB3D9\uC0AC",adjective:"\uD615\uC6A9\uC0AC",adverb:"\uBD80\uC0AC",numeral:"\uC218\uC0AC",determiner:"\uAD00\uD615\uC0AC",interjection:"\uAC10\uD0C4\uC0AC",particle:"\uC870\uC0AC",affix:"\uC811\uC0AC",dependentNoun:"\uC758\uC874\uBA85\uC0AC",pronoun:"\uB300\uBA85\uC0AC",auxVerb:"\uBCF4\uC870\uB3D9\uC0AC",auxAdjective:"\uBCF4\uC870\uD615\uC6A9\uC0AC"},reorder:{moved:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40",handle:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)",hint:"Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"},thumbMore:"+{{count}}",replaceItem:"\uB2E4\uB978 \uB2E8\uC5B4\uB85C",replacePair:"\uB2E4\uB978 \uC30D\uC73C\uB85C",replaceItemAria:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C",replacePairAria:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C",thumbMoreAria:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}",pickForm:"\uB2E4\uB978 \uAF34\uB85C",pickFormAria:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C",pickFormBaseAria:"\uAE30\uBCF8\uD615 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"},_b={filterTitle:"\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815",filter:{positionAny:"\uBB34\uAD00",positionHead:"\uC5B4\uB450",positionMid:"\uC5B4\uC911",positionTail:"\uC5B4\uB9D0",difficulty:"\uB09C\uC774\uB3C4",grade:"{{n}}\uB4F1\uAE09",age:"{{n}}\uC138",difficultyInfoAge:"3\uC138~7\uC138: \uAC00\uC7A5 \uC26C\uC6B4 \uB0B1\uB9D0(1\uB4F1\uAE09)\uC744 \uB610\uB798\uBCC4\uB85C \uB098\uB208 \uAC83\uC785\uB2C8\uB2E4.",difficultyInfoGrade:"2~4\uB4F1\uAE09: \uADF8\uBCF4\uB2E4 \uC5B4\uB824\uC6B4 \uB0B1\uB9D0\uC774\uACE0, \uB098\uC774\uB85C\uB294 \uB098\uB204\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",difficultyInfoNone:"\uC5C6\uC74C: \uB09C\uC774\uB3C4\uAC00 \uB9E4\uACA8\uC9C0\uC9C0 \uC54A\uC740 \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",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"},xb={clearAllSelection:"\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C",divLine:"\uB300\uB9BD\uC120",removePair:"\uB300\uB9BD\uC30D \uBE7C\uAE30",removePairFor:"{{name}} \uB300\uB9BD\uC30D \uBE7C\uAE30",removeWord:"\uB2E8\uC5B4 \uBE7C\uAE30",removeWordFor:"{{name}} \uBE7C\uAE30"},wb={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"}},Bb={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"}},kb={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"}},Ab={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",onlyHighUsage:"\uD65C\uC6A9\uB3C4 \uB192\uC740 \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."]},Nb={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"},Eb={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},Db={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"},Sb={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"},jb={ariaLabel:"\uC120\uD0DD \uD0ED"},Tb={ariaLabel:"\uD0ED"},Mb={dragPrompt:"\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC",browseButton:"\uD30C\uC77C \uC120\uD0DD",removeAriaLabel:"{{name}} \uC81C\uAC70"},Lb={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},$b={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"}},Rb={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"},Pb={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"}},Ib={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},Fb={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"},Ob={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"},zb={viewWords:"\uB0B1\uB9D0"},Wb={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},Hb={chooseDate:"\uB0A0\uC9DC \uC120\uD0DD",selectYear:"\uC5F0 \uC120\uD0DD",selectMonth:"\uC6D4 \uC120\uD0DD"},Vb={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},qb={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},Ub={place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},Gb={clearSelection:"\uC120\uD0DD \uD574\uC81C"},Kb={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},Yb={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},Zb={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},Xb={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},Jb={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},Qb={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},eg={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"},tg={common:eb,calendar:tb,passCard:nb,rating:ab,colorPicker:rb,dropdown:ob,accordion:sb,header:lb,nav:ib,settings:ub,usage:cb,account:db,training:pb,customers:hb,payment:mb,coupons:Cb,visits:fb,trainingType:bb,myWordTable:gb,keyWords:yb,wordTable:vb,wordSearch:_b,wordPrint:xb,topic:wb,device:Bb,manager:Ab,wordPairs:kb,footer:Nb,date:Eb,wordData:Db,textField:Sb,segmentedControl:jb,tabs:Tb,fileUpload:Mb,avatar:Lb,myHomework:$b,trainingStatus:Rb,store:Pb,progress:Ib,trainingMiss:Fb,table:Ob,wordScore:zb,topBanner:Wb,datePicker:Hb,report:Vb,tooltip:qb,phonemeProfile:Ub,bulkBar:Gb,debug:Kb,badge:Yb,loader:Zb,soundCompass:Xb,breadcrumb:Jb,board:Qb,promoBannerBg:eg},ng={statusFilter:"Filter by status",pageSizeSelect:"Items per page",selectedCount_one:"{{count}} selected",selectedCount_other:"{{count}} selected",moreFor:"More options for {{name}}",collapseFor:"Collapse {{name}}",expandFor:"Expand {{name}}",sortFor:"Sort {{name}}",cancel:"Cancel",info:"Info",errorState:{message:"Couldn't load this.",retry:"Try again"},save:"Save",confirm:"Confirm",discardConfirm:{title:"Discard your changes?",body:"If you do not save, everything you have entered will be lost.",confirm:"Discard"},close:"Close",back:"Back",emptyTrainingName:"Training name is empty.",remove:"Remove",image:"Image",delete:"Delete",reset:"Reset",update:"Update",download:"Download",likeCount_one:"{{count}} like",likeCount_other:"{{count}} likes",selectedOfMax:"{{count}} of {{max}}",downloadCount_one:"{{count}} download",downloadCount_other:"{{count}} downloads",descriptionFor:"About {{name}}",search:"Search",empty:"No data.",yes:"Yes",no:"No",all:"All",none:"None",days_one:"{{count}} day",days_other:"{{count}} days",loadMore:"Load More",retry:"Try Again",prevPage:"Previous page",nextPage:"Next page",play:"Play",loading:"Loading",playFor:"Play {{name}}",pauseFor:"Pause {{name}}",pause:"Pause",playPause:"Play / Pause",replay:"Replay",subscription:"Subscription",done:"Done",failed:"Failed",continue:"Continue",notification:"Notice",emptyList:"No items",noMatches:"No matching items",menu:"Menu",resetSelection:"Reset Selection",pageSizeLabel:"Show {{n}}",totalCountPrefix:"Total: ",totalCountSuffix:"",expand:"Expand",collapse:"Collapse",popup:"Popup",more:"More",codeBlock:"Code block",totalPrefix:"",copyCode:"Copy code",copied:"Copied",col:{problem:"Question"},phonetics:{place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"},vowel:{frontHigh:"Front high vowel",backHighUnrounded:"Back high unrounded vowel",backHighRounded:"Back high rounded vowel",frontMid:"Front mid vowel",backMidUnrounded:"Back mid unrounded vowel",backMidRounded:"Back mid rounded vowel",low:"Low vowel"},glide:{j:"j-glide",w:"w-glide",velar:"\u0270-glide"}},unknownError:"Unknown error",networkError:"The network connection is unstable. Check your connection and try again."},ag={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"]},rg={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"}},og={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},sg={selected:"selected"},lg={placeholder:"Select"},ig={collapse:"Collapse",expand:"Expand"},ug={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},cg={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"},dg={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"}}}},pg={couponButton:"Enter Coupon"},hg={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."}}},mg={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"}},Cg={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"},consent:{record:"Record consent",kinds:"Kinds given",methodTitle:"How it was given",sourceTitle:"Who gave it",day:"Date given",note:"Note",notePlaceholder:"Referring clinic and the like \u2014 do not write anything sensitive",submit:"Save",allTaken:"All three kinds are already on record. Revoke one first to record it again.",kind:{personal:"General personal data",sensitive:"Sensitive data (hearing, diagnosis)",marketing:"Marketing messages"},method:{paper:"On paper",verbal:"Spoken",electronic:"Electronic"},source:{self:"The customer",guardian:"A guardian",referral:"A referring body"}}},fg={plan:{recommendedFor:"Recommended for",features:"Key Features",freePrice:"Free",contact:"Contact Us",tierFallback:"Plan",openPromo:"Launch offer"},products:{mgrEnterprise:{tier:{price:"Contact us"}}}},bg={input:{label:"Coupon code",placeholder:"Enter coupon code"},applyButton:"Apply"},gg={showN:"Show {{n}}"},yg={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."}},vg={newBadge:"Newly created",publishedBadge:"Published",sharedBadge:"Shared"},_g={title:"Key Words",empty:"No key words available."},xg={defaultName:"Word Table",title:"Word Table Builder",subtitle:"Set columns and add words to build a table.",filterTitle:"Table Settings",filter:{composition:"Composition",image:"Image",word:"Word",caption:"Form",standardPron:"Standard Pronunciation",colloquialPron:"Colloquial Pronunciation",paperOrientation:"Paper Orientation",landscape:"Landscape",portrait:"Portrait",columns:"Columns",column:"{{count}} col",itemsPerPageWord:"Words per page",itemsPerPagePair:"Pairs per page",itemsPerPageOption:"{{count}}",pageIndicator:"{{current}} / {{total}}",pageNumber:"Page Number",pageNumberLeft:"Left",pageNumberCenter:"Center",pageNumberRight:"Right",border:"Border",topInfo:"Header",bottomInfo:"Footer",cutLine:"Cut Line",show:"Show",hide:"Hide",dotted:"Dotted",corner:"Corner"},addWord:"Add",copyItem:"Duplicate",copyItemAria:"Duplicate the word in cell {{n}}",wordInfo:"Info for {{word}}",emptyItems:"Please add at least one word.",load:"Load",openNewWindow:"Open in New Window",saveButton:"Save",saveAsNewButton:"Save as New",print:"Print",popupBlocked:"Popup was blocked. Please allow popups in your browser settings.",printFileNameSingle:"Word Table",printFileNamePair:"Contrast Pair Table",save:{title:"Save Word Table",nameLabel:"Name",desc:"Enter a name for the word table.",placeholder:"Enter a title for this word table.",descriptionLabel:"Description",descriptionPlaceholder:"Enter a description for this word table.",duplicateName:"This name is already in use.",nameRequired:"Please enter a table name.",autoFillHint:" (Press Tab or Space to autofill)",copyName:"{{name}} (copy)"},loadTable:{title:"Load Saved Word Table",empty:"No saved word tables.",loadButton:"Load",itemCount_one:"{{count}} word",itemCount_other:"{{count}} words",deleteAriaLabel:"Delete {{name}}",viewLabel:"View as",sortLabel:"Sort by",sort:{newest:"Newest",oldest:"Oldest",name:"Name",count:"Word Count"},view:{grid:"Grid View",list:"List View"}},publisherFilter:"Show only tables by {{name}}",groupDeleteMessage:"Word tables in this group will be moved to 'No Group'.",groupNamePlaceholder:"Group name",scoring:{o:"{{word}} correct",triangle:"{{word}} partial",x:"{{word}} incorrect",markName:{o:"Correct",triangle:"Partial",x:"Incorrect"},button:"Score",pickTitle:"Who are you scoring?",pickSubtitle:"Choose the customer who trained with \u201C{{name}}\u201D.",pickSearch:"Search by name or phone",pickEmpty:"No customers registered.",pickNoMatch:"No matching customer.",pickAgain:"Choose another",scoringFor:"Scoring {{name}}",none:"Tap \u25CB \xB7 \u25B3 \xB7 \u2715 under a cell to mark it. With a mouse they appear when you hover the cell; with a keyboard, when focus reaches it.",tally:"{{marked}} scored \xB7 \u25CB {{o}} \xB7 \u25B3 {{triangle}} \xB7 \u2715 {{x}} \xB7 {{rate}}%",save:"Save score",saved_one:"Saved {{count}} mark for {{name}}.",saved_other:"Saved {{count}} marks for {{name}}.",reviewTitle:"Create a review table?",reviewMessage_one:"Builds a new table from the {{count}} cell {{name}} got wrong or partial. Correct ones are left out.",reviewMessage_other:"Builds a new table from the {{count}} cells {{name}} got wrong or partial. Correct ones are left out.",reviewConfirm:"Create review table",reviewDescription:"Cells marked wrong or partial in \u201C{{name}}\u201D \u2014 {{count}} of them.",reviewCreated_one:"Created \u201C{{name}}\u201D \u2014 {{count}} cell.",reviewCreated_other:"Created \u201C{{name}}\u201D \u2014 {{count}} cells.",discardTitle:"Discard this scoring?",discardMessage_one:"You marked {{count}} cell but have not saved. Leaving discards it.",discardMessage_other:"You marked {{count}} cells but have not saved. Leaving discards them.",discardConfirm:"Discard and leave"},info:{grade:"Grade: {{n}}",syllables:"Syllables: {{n}}",pos:"Part of speech: {{v}}",wordType:"Type: {{v}}"},pos:{noun:"Noun",verb:"Verb",adjective:"Adjective",adverb:"Adverb",numeral:"Numeral",determiner:"Determiner",interjection:"Interjection",particle:"Particle",affix:"Affix",dependentNoun:"Dependent noun",pronoun:"Pronoun",auxVerb:"Auxiliary verb",auxAdjective:"Auxiliary adjective"},reorder:{moved:"Moved to position {{n}} of {{total}}",handle:"Reorder {{word}} (Alt + arrow keys)",hint:"Alt + \u2190 \u2192 to reorder"},thumbMore:"+{{count}}",replaceItem:"Other words",replacePair:"Other pairs",replaceItemAria:"Swap cell {{n}} only",replacePairAria:"Swap pair {{n}} only",thumbMoreAria_one:"1 more cell: {{words}}",thumbMoreAria_other:"{{count}} more cells: {{words}}"},wg={filterTitle:"Word Search Settings",filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Difficulty",grade:"Grade {{n}}",age:"Age {{n}}",difficultyInfoAge:"Age 3\u20137: the easiest words (grade 1), split by age.",difficultyInfoGrade:"Grades 2\u20134: harder words, not split by age.",difficultyInfoNone:"None: words with no difficulty assigned.",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"},Bg={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removePairFor:"Remove the pair {{name}}",removeWord:"Remove word",removeWordFor:"Remove {{name}}"},Ag={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"}},kg={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"}},Ng={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}}"}},Eg={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",onlyHighUsage:"High-use words only",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."]},Dg={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"},Eb={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},Db={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"},Sb={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"},jb={ariaLabel:"\uC120\uD0DD \uD0ED"},Tb={ariaLabel:"\uD0ED"},Mb={dragPrompt:"\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC",browseButton:"\uD30C\uC77C \uC120\uD0DD",removeAriaLabel:"{{name}} \uC81C\uAC70"},Lb={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},$b={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"}},Rb={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"},Pb={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"}},Fb={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},Ib={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"},Ob={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"},zb={viewWords:"\uB0B1\uB9D0"},Wb={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},Hb={chooseDate:"\uB0A0\uC9DC \uC120\uD0DD",selectYear:"\uC5F0 \uC120\uD0DD",selectMonth:"\uC6D4 \uC120\uD0DD"},Vb={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},qb={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},Ub={place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},Gb={clearSelection:"\uC120\uD0DD \uD574\uC81C"},Kb={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},Yb={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},Zb={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},Xb={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},Jb={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},Qb={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},eg={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"},tg={common:eb,calendar:tb,passCard:nb,rating:ab,colorPicker:rb,dropdown:ob,accordion:sb,header:lb,nav:ib,settings:ub,usage:cb,account:db,training:pb,customers:hb,payment:mb,coupons:Cb,visits:fb,trainingType:bb,myWordTable:gb,keyWords:yb,wordTable:vb,wordSearch:_b,wordPrint:xb,topic:wb,device:Bb,manager:kb,wordPairs:Ab,footer:Nb,date:Eb,wordData:Db,textField:Sb,segmentedControl:jb,tabs:Tb,fileUpload:Mb,avatar:Lb,myHomework:$b,trainingStatus:Rb,store:Pb,progress:Fb,trainingMiss:Ib,table:Ob,wordScore:zb,topBanner:Wb,datePicker:Hb,report:Vb,tooltip:qb,phonemeProfile:Ub,bulkBar:Gb,debug:Kb,badge:Yb,loader:Zb,soundCompass:Xb,breadcrumb:Jb,board:Qb,promoBannerBg:eg},ng={statusFilter:"Filter by status",pageSizeSelect:"Items per page",selectedCount_one:"{{count}} selected",selectedCount_other:"{{count}} selected",moreFor:"More options for {{name}}",collapseFor:"Collapse {{name}}",expandFor:"Expand {{name}}",sortFor:"Sort {{name}}",cancel:"Cancel",info:"Info",errorState:{message:"Couldn't load this.",retry:"Try again"},save:"Save",confirm:"Confirm",discardConfirm:{title:"Discard your changes?",body:"If you do not save, everything you have entered will be lost.",confirm:"Discard"},close:"Close",back:"Back",emptyTrainingName:"Training name is empty.",remove:"Remove",image:"Image",delete:"Delete",reset:"Reset",update:"Update",download:"Download",likeCount_one:"{{count}} like",likeCount_other:"{{count}} likes",selectedOfMax:"{{count}} of {{max}}",downloadCount_one:"{{count}} download",downloadCount_other:"{{count}} downloads",descriptionFor:"About {{name}}",search:"Search",empty:"No data.",yes:"Yes",no:"No",all:"All",none:"None",days_one:"{{count}} day",days_other:"{{count}} days",loadMore:"Load More",retry:"Try Again",prevPage:"Previous page",nextPage:"Next page",play:"Play",loading:"Loading",playFor:"Play {{name}}",pauseFor:"Pause {{name}}",pause:"Pause",playPause:"Play / Pause",replay:"Replay",subscription:"Subscription",done:"Done",failed:"Failed",continue:"Continue",notification:"Notice",emptyList:"No items",noMatches:"No matching items",menu:"Menu",resetSelection:"Reset Selection",pageSizeLabel:"Show {{n}}",totalCountPrefix:"Total: ",totalCountSuffix:"",expand:"Expand",collapse:"Collapse",popup:"Popup",more:"More",codeBlock:"Code block",totalPrefix:"",copyCode:"Copy code",copied:"Copied",col:{problem:"Question"},phonetics:{place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"},vowel:{frontHigh:"Front high vowel",backHighUnrounded:"Back high unrounded vowel",backHighRounded:"Back high rounded vowel",frontMid:"Front mid vowel",backMidUnrounded:"Back mid unrounded vowel",backMidRounded:"Back mid rounded vowel",low:"Low vowel"},glide:{j:"j-glide",w:"w-glide",velar:"\u0270-glide"}},unknownError:"Unknown error",networkError:"The network connection is unstable. Check your connection and try again."},ag={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"]},rg={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"}},og={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},sg={selected:"selected"},lg={placeholder:"Select"},ig={collapse:"Collapse",expand:"Expand"},ug={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},cg={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"},dg={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"}}}},pg={couponButton:"Enter Coupon"},hg={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."}}},mg={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"}},Cg={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"},consent:{record:"Record consent",kinds:"Kinds given",methodTitle:"How it was given",sourceTitle:"Who gave it",day:"Date given",note:"Note",notePlaceholder:"Referring clinic and the like \u2014 do not write anything sensitive",submit:"Save",allTaken:"All three kinds are already on record. Revoke one first to record it again.",kind:{personal:"General personal data",sensitive:"Sensitive data (hearing, diagnosis)",marketing:"Marketing messages"},method:{paper:"On paper",verbal:"Spoken",electronic:"Electronic"},source:{self:"The customer",guardian:"A guardian",referral:"A referring body"}}},fg={plan:{recommendedFor:"Recommended for",features:"Key Features",freePrice:"Free",contact:"Contact Us",tierFallback:"Plan",openPromo:"Launch offer"},products:{mgrEnterprise:{tier:{price:"Contact us"}}}},bg={input:{label:"Coupon code",placeholder:"Enter coupon code"},applyButton:"Apply"},gg={showN:"Show {{n}}"},yg={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."}},vg={newBadge:"Newly created",publishedBadge:"Published",sharedBadge:"Shared"},_g={title:"Key Words",empty:"No key words available."},xg={defaultName:"Word Table",title:"Word Table Builder",subtitle:"Set columns and add words to build a table.",filterTitle:"Table Settings",filter:{composition:"Composition",image:"Image",word:"Word",caption:"Form",standardPron:"Standard Pronunciation",colloquialPron:"Colloquial Pronunciation",paperOrientation:"Paper Orientation",landscape:"Landscape",portrait:"Portrait",columns:"Columns",column:"{{count}} col",itemsPerPageWord:"Words per page",itemsPerPagePair:"Pairs per page",itemsPerPageOption:"{{count}}",pageIndicator:"{{current}} / {{total}}",pageNumber:"Page Number",pageNumberLeft:"Left",pageNumberCenter:"Center",pageNumberRight:"Right",border:"Border",topInfo:"Header",bottomInfo:"Footer",cutLine:"Cut Line",show:"Show",hide:"Hide",dotted:"Dotted",corner:"Corner"},addWord:"Add",copyItem:"Duplicate",copyItemAria:"Duplicate the word in cell {{n}}",wordInfo:"Info for {{word}}",emptyItems:"Please add at least one word.",load:"Load",openNewWindow:"Open in New Window",saveButton:"Save",saveAsNewButton:"Save as New",print:"Print",popupBlocked:"Popup was blocked. Please allow popups in your browser settings.",printFileNameSingle:"Word Table",printFileNamePair:"Contrast Pair Table",save:{title:"Save Word Table",nameLabel:"Name",desc:"Enter a name for the word table.",placeholder:"Enter a title for this word table.",descriptionLabel:"Description",descriptionPlaceholder:"Enter a description for this word table.",duplicateName:"This name is already in use.",nameRequired:"Please enter a table name.",autoFillHint:" (Press Tab or Space to autofill)",copyName:"{{name}} (copy)"},loadTable:{title:"Load Saved Word Table",empty:"No saved word tables.",loadButton:"Load",itemCount_one:"{{count}} word",itemCount_other:"{{count}} words",deleteAriaLabel:"Delete {{name}}",viewLabel:"View as",sortLabel:"Sort by",sort:{newest:"Newest",oldest:"Oldest",name:"Name",count:"Word Count"},view:{grid:"Grid View",list:"List View"}},publisherFilter:"Show only tables by {{name}}",groupDeleteMessage:"Word tables in this group will be moved to 'No Group'.",groupNamePlaceholder:"Group name",scoring:{o:"{{word}} correct",triangle:"{{word}} partial",x:"{{word}} incorrect",markName:{o:"Correct",triangle:"Partial",x:"Incorrect"},button:"Score",pickTitle:"Who are you scoring?",pickSubtitle:"Choose the customer who trained with \u201C{{name}}\u201D.",pickSearch:"Search by name or phone",pickEmpty:"No customers registered.",pickNoMatch:"No matching customer.",pickAgain:"Choose another",scoringFor:"Scoring {{name}}",none:"Tap \u25CB \xB7 \u25B3 \xB7 \u2715 under a cell to mark it. With a mouse they appear when you hover the cell; with a keyboard, when focus reaches it.",tally:"{{marked}} scored \xB7 \u25CB {{o}} \xB7 \u25B3 {{triangle}} \xB7 \u2715 {{x}} \xB7 {{rate}}%",save:"Save score",saved_one:"Saved {{count}} mark for {{name}}.",saved_other:"Saved {{count}} marks for {{name}}.",reviewTitle:"Create a review table?",reviewMessage_one:"Builds a new table from the {{count}} cell {{name}} got wrong or partial. Correct ones are left out.",reviewMessage_other:"Builds a new table from the {{count}} cells {{name}} got wrong or partial. Correct ones are left out.",reviewConfirm:"Create review table",reviewDescription:"Cells marked wrong or partial in \u201C{{name}}\u201D \u2014 {{count}} of them.",reviewCreated_one:"Created \u201C{{name}}\u201D \u2014 {{count}} cell.",reviewCreated_other:"Created \u201C{{name}}\u201D \u2014 {{count}} cells.",discardTitle:"Discard this scoring?",discardMessage_one:"You marked {{count}} cell but have not saved. Leaving discards it.",discardMessage_other:"You marked {{count}} cells but have not saved. Leaving discards them.",discardConfirm:"Discard and leave"},info:{grade:"Grade: {{n}}",syllables:"Syllables: {{n}}",pos:"Part of speech: {{v}}",wordType:"Type: {{v}}"},pos:{noun:"Noun",verb:"Verb",adjective:"Adjective",adverb:"Adverb",numeral:"Numeral",determiner:"Determiner",interjection:"Interjection",particle:"Particle",affix:"Affix",dependentNoun:"Dependent noun",pronoun:"Pronoun",auxVerb:"Auxiliary verb",auxAdjective:"Auxiliary adjective"},reorder:{moved:"Moved to position {{n}} of {{total}}",handle:"Reorder {{word}} (Alt + arrow keys)",hint:"Alt + \u2190 \u2192 to reorder"},thumbMore:"+{{count}}",replaceItem:"Other words",replacePair:"Other pairs",replaceItemAria:"Swap cell {{n}} only",replacePairAria:"Swap pair {{n}} only",thumbMoreAria_one:"1 more cell: {{words}}",thumbMoreAria_other:"{{count}} more cells: {{words}}",pickForm:"Other forms",pickFormAria:"Change the form in cell {{n}}",pickFormBaseAria:"Change the form of the base word"},wg={filterTitle:"Word Search Settings",filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Difficulty",grade:"Grade {{n}}",age:"Age {{n}}",difficultyInfoAge:"Age 3\u20137: the easiest words (grade 1), split by age.",difficultyInfoGrade:"Grades 2\u20134: harder words, not split by age.",difficultyInfoNone:"None: words with no difficulty assigned.",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"},Bg={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removePairFor:"Remove the pair {{name}}",removeWord:"Remove word",removeWordFor:"Remove {{name}}"},kg={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"}},Ag={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"}},Ng={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}}"}},Eg={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",onlyHighUsage:"High-use words only",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."]},Dg={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"},Sg={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},jg={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"},Tg={clearAriaLabel:"Clear input"},Mg={ariaLabel:"Select tab"},Lg={ariaLabel:"Tabs"},$g={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},Rg={ariaLabel:"User avatar"},Pg={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},Ig={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"},Fg={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"}},Og={steps:"Step {{current}} of {{total}}"},zg={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"},Wg={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},Hg={viewWords:"Words"},Vg={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},qg={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},Ug={previewRegion:"Report preview \u2014 scrollable sideways"},Gg={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},Kg={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},Yg={clearSelection:"Clear selection"},Zg={showResult:"Show {{type}} result"},Xg={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},Jg={loading:"Loading"},Qg={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},ey={ariaLabel:"Breadcrumb"},ty={empty:"No items yet."},ny={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"},ay={common:ng,calendar:ag,passCard:rg,rating:og,colorPicker:sg,dropdown:lg,accordion:ig,header:ug,nav:cg,settings:dg,usage:pg,account:hg,training:mg,customers:Cg,payment:fg,coupons:bg,visits:gg,trainingType:yg,myWordTable:vg,keyWords:_g,wordTable:xg,wordSearch:wg,wordPrint:Bg,topic:Ag,device:kg,manager:Ng,wordPairs:Eg,footer:Dg,date:Sg,wordData:jg,textField:Tg,segmentedControl:Mg,tabs:Lg,fileUpload:$g,avatar:Rg,myHomework:Pg,trainingStatus:Ig,store:Fg,progress:Og,trainingMiss:zg,table:Wg,wordScore:Hg,topBanner:Vg,datePicker:qg,report:Ug,tooltip:Gg,phonemeProfile:Kg,bulkBar:Yg,debug:Zg,badge:Xg,loader:Jg,soundCompass:Qg,breadcrumb:ey,board:ty,promoBannerBg:ny};const ry="0.402.0",oy=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],fo="ko",sy="ihab_display_language";function Ql(){if(typeof window>"u")return fo;try{const e=localStorage.getItem(sy);if(e&&oy.some(t=>t.code===e))return e}catch{}return fo}function ei(e){try{document.documentElement.lang=e}catch{}}Gt.on("languageChanged",ei),ei(Ql()),Gt.use(xe.initReactI18next).init({resources:{ko:{translation:tg},en:{translation:ay}},lng:Ql(),fallbackLng:fo,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const ly=new Map;try{Gt.store?.on?.("added",()=>ly.clear())}catch{}let hr=null,ti=null,ni=null;function iy(){const e=Wl();if(e&&e.entries.length>0){const t=vf();if(hr&&ti===e&&ni===t)return hr;const a=new Set,r=[];for(const s of e.entries)!s.word||a.has(s.word)||(a.add(s.word),r.push({w:s.word,s:s.syllables,p:t?.[s.word]?[...t[s.word].cho??[],...t[s.word].jung??[],...t[s.word].jong??[]]:[],pron:s.pronunciation||s.word,grade:s.grade}));return hr=r,ti=e,ni=t,hr}return[]}new Proxy([],{get(e,t){const a=iy(),r=a[t];return typeof r=="function"?r.bind(a):r}});function uy(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 cy(e){if(typeof window>"u")return"";const t=(a,r)=>{typeof r.attrValue=="string"&&uy(r.attrValue)&&(r.keepAttr=!1)};da.addHook("uponSanitizeAttribute",t);try{return da.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{da.removeHook("uponSanitizeAttribute",t)}}function dy(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),[l,i]=o.useState(null),[u,c]=o.useState(null),[d,h]=o.useState(null);return o.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){a(null),s(null),i(null),c(null);return}const p=e.split("/").pop();let C=e;p&&(e.startsWith("/")?C=no(e):/^(Logo|Symbol)/i.test(p)?C=no(`logo/${p}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),C=e)),i(null),c(null),a(e),s(C)},[e]),o.useEffect(()=>{if(!r)return;let p=!1;async function C(){try{let g=await fetch(r);g.ok||(g=await fetch(r));const _=g.headers.get("content-type")||"";if(p)return;if(_.includes("svg")){i("mask");return}if(_.startsWith("image/")){i("img");return}const m=await fetch(r);if(!m.ok)throw new Error("not ok");const f=await m.text();if(p)return;if(/^\s*<svg[\s>]/i.test(f)){const v=cy(f);if(!v){i("none");return}c(v),i("inline");return}i("none")}catch{p||i("none")}}return C(),()=>{p=!0}},[r]),o.useEffect(()=>{let p=!1,C=null;return l==="mask"&&r&&fetch(r).then(g=>{if(!g.ok)throw new Error("fetch failed");return g.blob()}).then(g=>{p||(C=URL.createObjectURL(g),h(C))}).catch(()=>{p||i("img")}),()=>{p=!0,C&&URL.revokeObjectURL(C),h(null)}},[l,r]),t===e?{iconToUse:r,mode:l,svgText:u,blobUrl:d}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function rt(e){const{icon:t,label:a,className:r,imgClassName:s,maskClassName:l,svgClassName:i,wrapperStyle:u,size:c}=e||{},d=r??"iconRenderer-icon",h=s??"iconRenderer-icon-image",p=l??"iconRenderer-icon-mask",C=i??"iconRenderer-icon-svg",g=typeof t=="string"?t:null,_=Q0(g),{iconToUse:m,mode:f,svgText:v,blobUrl:b}=dy(g),w=(A,D={})=>n.jsx("span",{className:d,style:u,...D,children:A}),y=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,B=(A,D={})=>n.jsx("img",{src:A,alt:typeof a=="string"?a:typeof a=="number"?String(a):"",className:h,...D,style:y?{...D.style,...y}:D.style});if(!t)return null;if(typeof t!="string")return w(t);if(t==="none")return w(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(_)try{return w(o.createElement(_,{className:C,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(m&&m.endsWith(".svg")){if(f==="mask"){const A={"--icon-url":b?`url(${b})`:`url(${m})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return w(n.jsx("span",{className:p,style:A}),{"aria-hidden":"true"})}return f==="img"?w(B(m,{onError:A=>{A.currentTarget.onerror=null,A.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):f==="inline"?w(n.jsx("span",{className:C,dangerouslySetInnerHTML:v?{__html:v}:void 0}),{"aria-hidden":"true"}):w(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return B(no(t),{style:u,onError:A=>{A.currentTarget.onerror=null,A.currentTarget.style.display="none"}});const x=typeof c=="number"?c:20,N=`<svg width="${x}" height="${x}" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="3" y="3" width="18" height="18" rx="2" ry="2" style="fill:none;stroke:currentColor;stroke-width:2"/></svg>`;return w(n.jsx("span",{className:C,dangerouslySetInnerHTML:{__html:N}}),{"aria-hidden":"true"})}function ai(e){const[t,a]=o.useState(!1),r=o.useRef(!1),s=o.useRef(!0);o.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]);const l=o.useCallback(()=>{if(!e||r.current)return;const i=e();if(i&&typeof i.then=="function"){r.current=!0,a(!0);const u=()=>{r.current=!1,s.current&&a(!1)};i.then(u,u)}},[e]);return{pending:t,press:l}}function py({icon:e,title:t,message:a,action:r,className:s}){const{pending:l,press:i}=ai(r?.onClick);return n.jsxs("div",{className:ke("empty-state",s),children:[e&&n.jsx(rt,{icon:e,size:48,className:"empty-state__icon"}),t&&n.jsx("p",{className:"empty-state__title h4",children:t}),a&&n.jsx("p",{className:"empty-state__message body-3",children:a}),r&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:i,disabled:l,"aria-busy":l||void 0,children:[r.icon&&n.jsx(rt,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function hy({message:e,hint:t,icon:a="triangle-alert",onRetry:r,retryLabel:s,className:l}){const{t:i}=xe.useTranslation(),{pending:u,press:c}=ai(r);return n.jsxs("div",{className:ke("empty-state","error-state",l),role:"alert",children:[n.jsx(rt,{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(rt,{icon:"rotate-cw",className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:s??i("common.errorState.retry",{defaultValue:"\uB2E4\uC2DC \uC2DC\uB3C4"})})]})]})}function my({icon:e,title:t,description:a,cta:r,tone:s="main",disabled:l=!1,onClick:i,className:u=""}){const c=o.useId(),d=`${c}-title`,h=`${c}-desc`,p=`${c}-cta`,C=()=>{l||i?.()};return n.jsx("section",{role:"button",tabIndex:l?-1:0,"aria-disabled":l||void 0,"aria-labelledby":d,"aria-describedby":`${h} ${p}`,onClick:C,onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),C())},className:ke("action-card",`action-card--${s}`,l&&"action-card--disabled",u),children:n.jsxs("div",{className:"action-card__body",children:[n.jsx("span",{"aria-hidden":!0,className:"action-card__chip",children:n.jsx(rt,{icon:e,size:34})}),n.jsxs("div",{className:"action-card__text",children:[n.jsx("h2",{id:d,className:"action-card__title",children:t}),n.jsx("p",{id:h,className:"action-card__desc",children:a})]}),n.jsxs("div",{className:"action-card__cta",children:[n.jsx("span",{id:p,children:r}),n.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:n.jsx(rt,{icon:"arrow-right",size:18})})]})]})})}function Cy({as:e="div",className:t="",children:a,storage:r,...s}){r&&O1({resolveUrl:r.resolveUrl,download:r.download??(()=>Promise.reject(new Error("[ihabdevteam-core] CoreScope: download resolver\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."))),exists:r.exists,resolvePath:r.resolvePath,noiseBaseUrl:r.noiseBaseUrl,noiseFileGain:r.noiseFileGain});const l=ke("ihabdevteam-core-scope",t);return n.jsx(e,{className:l,...s,children:a})}function fy(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 bo(e,t=!0){o.useEffect(()=>{if(!t)return;const a=e.current;if(!a)return;const r=s=>{if(s.key!=="Tab")return;const l=Array.from(a.querySelectorAll(En)).filter(fy);if(!l.length){s.preventDefault();return}const i=l[0],u=l[l.length-1],c=document.activeElement,d=c===a;s.shiftKey&&(c===i||d)?(s.preventDefault(),u.focus()):!s.shiftKey&&c===u&&(s.preventDefault(),i.focus())};return a.addEventListener("keydown",r),()=>a.removeEventListener("keydown",r)},[e,t])}const En='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',go=new WeakMap;function yo(e,t){e&&go.set(e,t)}function vo(e){let t=e;for(let a=0;t&&!t.isConnected&&a<10;a++){let r=t;for(;r&&!go.has(r);)r=r.parentElement;if(!r)return t;t=go.get(r)??null}return t}function ri(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 mr(e,t,a){const r=e?.isConnected?e:a?.isConnected?a:null;if(ri(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!r)return null;const s=Array.from(document.querySelectorAll(En)).filter(c=>!(e&&e.contains(c))&&ri(c));let l=null,i=null;for(const c of s)r.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_PRECEDING?l=c:i||(i=c);const u=l??i;return u?.focus(),u}function by({title:e="",lines:t=[],notices:a=null,children:r,variant:s="default",dismissible:l=!1,className:i=""}){const{t:u}=xe.useTranslation(),[c,d]=o.useState(!1),h=o.useRef(null),p=o.useCallback(()=>{const m=h.current;m&&m.contains(document.activeElement)&&mr(m),d(!0)},[]);if(c)return null;const C=`notice-box notice-box--${s} body-2 ${i}`.trim(),g=l&&n.jsx("button",{type:"button",className:"notice-box__dismiss",onClick:p,"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"});if(a&&Array.isArray(a)&&a.length)return n.jsxs("div",{className:C,role:"note",children:[a.map((m,f)=>n.jsxs("div",{className:"notice-box__inner",children:[m.title?n.jsx("span",{className:"notice-box__title body-3",children:m.title}):null,n.jsx("div",{className:"notice-box__body",children:m.lines&&m.lines.length?n.jsx("div",{children:m.lines.map((v,b)=>n.jsx("span",{className:"notice-box__line body-3",children:v},b))}):m.children??null})]},f)),g]});const _=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((m,f)=>n.jsx("li",{className:"notice-box__line",children:m},f))}):r})]}):n.jsx("div",{className:"notice-box__inner",children:r});return n.jsxs("div",{ref:h,className:C,role:"note",children:[_,g]})}const gy={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function Ca(e){const{t}=xe.useTranslation(),{variant:a="spinner",size:r=24,progress:s=null,label:l}=e||{},i=l||t("loader.loading","Loading");if(a==="bar"){const c=s==null||!Number.isFinite(Number(s)),d=c?0:Math.max(0,Math.min(100,Number(s)));return n.jsx("div",{className:`loader-bar${c?" loader-bar--indeterminate":""}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c?void 0:d,"aria-label":i,children:n.jsx("div",{className:"loader-bar__inner",style:c?void 0:{width:`${d}%`}})})}const u=typeof r=="number"?`${r}px`:r;return n.jsxs("div",{className:"loader-spinner",style:{width:u,height:u},role:"status","aria-label":i,children:[n.jsx("span",{style:gy,children:i}),n.jsxs("svg",{className:"loader-spinner__svg",viewBox:"0 0 50 50",width:r,height:r,children:[n.jsx("circle",{className:"loader-spinner__bg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4"}),n.jsx("circle",{className:"loader-spinner__fg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4",strokeLinecap:"round"})]})]})}const fa=[];let Cr=!1;function oi(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=fa[fa.length-1];t&&(e.stopPropagation(),t())}function Qn(e){return fa.push(e),!Cr&&typeof document<"u"&&(document.addEventListener("keydown",oi),Cr=!0),()=>{const t=fa.lastIndexOf(e);t>=0&&fa.splice(t,1),fa.length===0&&Cr&&typeof document<"u"&&(document.removeEventListener("keydown",oi),Cr=!1)}}const si=o.createContext(null);function yy(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const li=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function vy(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 Ps.useSyncExternalStore(t,()=>li(e),()=>!1)}function _y(e){const[t,a]=o.useState(li(e));return o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const r=window.matchMedia(e),s=i=>a(i.matches),l=r;return l.addEventListener?l.addEventListener("change",s):l.addListener&&l.addListener(s),a(r.matches),()=>{l.removeEventListener?l.removeEventListener("change",s):l.removeListener&&l.removeListener(s)}},[e]),t}const xy=typeof Ps.useSyncExternalStore=="function"?vy:_y;function yn(e){const t=o.useContext(si),a=xy(e);return t&&typeof t.mobile=="boolean"&&yy(e)?t.mobile:a}const wy="(prefers-reduced-motion: reduce)";function _o(){return yn(wy)}const ii={"menu-tooltip":"tooltip-menu","description-tooltip":"tooltip-description","text-box-tooltip":"tooltip-textbox","training-tooltip":"tooltip-training","word-image-tooltip":"tooltip-word-image","info-tooltip":"tooltip-info","noise-settings-tooltip":"noise-settings",tooltip__header:"tooltip-content__header",tooltip__content:"tooltip-content",tooltip__backdrop:"tooltip-backdrop",tooltip__portal:"tooltip-portal","word-table__section":"word-table-block","word-table__content":"word-table-block__content","word-table__card":"word-table-block__card","word-table__card-handle":"word-table-block__card-handle","word-table__card-close":"word-table-block__card-close","word-table__card-actions":"word-table-block__card-actions","word-table__edit-cell":"word-table-block__edit-cell","word-table__pair-divider":"word-table-block__pair-divider","chart-section__legend-dot":"manager-bar-chart-legend-dot","chart-section__legend-item":"manager-bar-chart-legend-item","chart-section__legend":"manager-bar-chart-legend","chart-section__controls":"manager-section-controls","chart-section__sub-row":"barchart-sub-row","chart-section__total":"barchart-total","chart-section":"manager-section","bar-chart__stack-segment":"manager-bar-chart-stack-segment","bar-chart__detail-btn":"manager-bar-chart-detail-btn","bar-chart__gridline":"manager-bar-chart-gridline","bar-chart__loading":"manager-bar-chart-loading","bar-chart__scroll":"manager-bar-chart-scroll","bar-chart__stack":"manager-bar-chart-stack","bar-chart__x-axis":"manager-bar-chart-x-axis","bar-chart__inner":"manager-bar-chart-inner","bar-chart__area":"manager-bar-chart-area","bar-chart__plot":"manager-bar-chart-plot","bar-chart__wrap":"manager-bar-chart-wrap","bar-chart__slot":"manager-bar-chart-slot","bar-chart__col":"manager-bar-chart-col","bar-chart__bar":"manager-bar-chart-bar","stat-chart__card":"manager-stat-card"};function By(e,t){const a=Object.keys(e).sort((r,s)=>s.length-r.length);for(const r of a){if(!t.startsWith(r))continue;const s=t.slice(r.length);if(!(s!==""&&!s.startsWith("__")&&!s.startsWith("--")))return e[r]+s}return null}function Ay(e){return By(ii,e)}function le(e){if(!e||Object.keys(ii).length===0)return e;const t=[];for(const a of e.split(/\s+/)){if(!a)continue;const r=Ay(a);r&&t.push(r)}return t.length?`${e} ${t.join(" ")}`:e}function Bn(e){const{anchorRect:t,anchorEl:a,offset:r=20,edgeMargin:s=20,onClose:l,closeOnOutsideClick:i=!0,className:u="",role:c="dialog",ariaLabel:d="",children:h,backdrop:p=!1,isMobilePopup:C=!1,useBorder:g=!0,header:_,focusOnOpen:m}=e||{},f=o.useRef(null),[v,b]=o.useState({position:"fixed",left:0,top:-9999}),[w,y]=o.useState(!1),[B,x]=o.useState("bottom"),[N,A]=o.useState(!1),[D,E]=o.useState(!1),k=!t&&!a,R=o.useRef(null),$=o.useCallback((L=!1,V=!1)=>{if(D&&C)return;const U=a?a.getBoundingClientRect():t,q=V&&R.current?R.current:U;if(!q||!f.current)return;const j=f.current,{offsetWidth:I,offsetHeight:O}=j,Y=window.innerWidth,K=window.innerHeight,ie=Y-q.right,te=q.left,ne=q.top,z=K-q.bottom;let ae=0,H=0,W="top";if(ne>=O+r)W="top",H=q.top-r-O,ae=q.left+q.width/2-I/2;else if(z>=O+r)W="bottom",H=q.bottom+r,ae=q.left+q.width/2-I/2;else if(ie>=I+r)W="right",ae=q.right+r,H=q.top+q.height/2-O/2;else if(te>=I+r)W="left",ae=q.left-r-I,H=q.top+q.height/2-O/2;else{const he=Math.max(ne,z,ie,te);he===ne?(W="top",H=q.top-r-O,ae=q.left+q.width/2-I/2):he===z?(W="bottom",H=q.bottom+r,ae=q.left+q.width/2-I/2):he===ie?(W="right",ae=q.right+r,H=q.top+q.height/2-O/2):(W="left",ae=q.left-r-I,H=q.top+q.height/2-O/2)}const ue=Number.isFinite(Number(s))?Number(s):8;ae=Math.min(Math.max(ae,ue),Y-I-ue),H=Math.min(Math.max(H,ue),K-O-ue);const Be=Math.round(ae),ye=Math.round(H);L&&f.current?(f.current.style.left=`${Be}px`,f.current.style.top=`${ye}px`,f.current.dataset.placement=W):(x(W||B),b({position:"fixed",left:Be,top:ye}),A(!0))},[D,C,a,t,r,s,B]);o.useEffect(()=>()=>{R.current=null},[a,t]),o.useLayoutEffect(()=>{if(k)return;if(D&&C){b({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),A(!0);return}R.current===null&&(R.current=a?a.getBoundingClientRect():t??null),$(!1,!0);const L=requestAnimationFrame(()=>$(!1,!0));return()=>cancelAnimationFrame(L)},[t,a,r,h,s,k,D,C,$]),o.useEffect(()=>{if(k||D&&C||!f.current||typeof ResizeObserver>"u")return;const L=new ResizeObserver(()=>{t&&$()});return L.observe(f.current),()=>L.disconnect()},[t,h,s,k,D,C,$]),o.useEffect(()=>{if(k||D&&C)return;let L=null;const V=()=>{if(a&&(R.current=a.getBoundingClientRect()),typeof requestAnimationFrame>"u"){$(!0);return}L===null&&(L=requestAnimationFrame(()=>{L=null,$(!0)}))},U=q=>{if(!a&&l){const j=q.target;if(j&&f.current&&f.current.contains(j))return;try{if(j&&j.closest&&j.closest("[data-tooltip-ignore]"))return}catch{}ee.current(!0);return}V()};return window.addEventListener("resize",V),document.addEventListener("scroll",U,{passive:!0,capture:!0}),()=>{L!==null&&cancelAnimationFrame(L),window.removeEventListener("resize",V),document.removeEventListener("scroll",U,{capture:!0})}},[t,a,l,r,h,s,k,D,C,$]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const L=window.matchMedia("(max-width: 768px)"),V=()=>E(!!L.matches);V();try{L.addEventListener?L.addEventListener("change",V):L.addListener(V)}catch{try{L.addListener(V)}catch{}}return()=>{try{L.removeEventListener?L.removeEventListener("change",V):L.removeListener(V)}catch{}}},[]);const G=o.useRef(!1),T=o.useRef(null),P=_o(),M=o.useCallback((L=!1)=>{if(l&&!(w||G.current)){if(G.current=!0,L){y(!0);try{l&&l()}catch{G.current=!1,y(!1)}return}y(!0),T.current=setTimeout(()=>{T.current=null;try{l&&l()}catch{G.current=!1,y(!1)}},P?0:200)}},[w,l,y,P]);o.useEffect(()=>()=>{T.current&&clearTimeout(T.current)},[]),o.useEffect(()=>{if(k)return;const L=q=>{const j=f.current;if(!j)return;const I=q.target;if(I&&!j.contains(I)){try{if(I.closest&&I.closest("[data-tooltip-ignore]"))return}catch{}i&&M(!0)}},V=q=>{const j=f.current;if(!j)return;const I=q.target;if(I&&!j.contains(I)){try{if(I.closest&&I.closest("[data-tooltip-ignore]"))return}catch{}i&&M(!0)}},U=q=>{if(q.key==="Tab"){const j=f.current;if(!j)return;const I=j.querySelectorAll(En);if(!I||I.length===0)return;const O=I[0],Y=I[I.length-1],K=document.activeElement;q.shiftKey?K===O&&(q.preventDefault(),Y.focus()):K===Y&&(q.preventDefault(),O.focus())}};return document.addEventListener("pointerdown",L,!0),document.addEventListener("click",V,!0),document.addEventListener("keydown",U),()=>{document.removeEventListener("pointerdown",L,!0),document.removeEventListener("click",V,!0),document.removeEventListener("keydown",U)}},[l,i,M,k]);const ee=o.useRef(M);o.useEffect(()=>{ee.current=M});const Q=!!l;o.useEffect(()=>{if(!(k||!Q))return Qn(()=>ee.current())},[k,Q]),o.useEffect(()=>{const L=()=>{M(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",L),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",L)}},[M]);const F=o.useRef(null);o.useEffect(()=>{if(k||m===!1||!N)return;const L=f.current;if(!L)return;const V=L.querySelector(En);if(V)return F.current=document.activeElement,V.focus({preventScroll:!0}),()=>{const U=F.current;F.current=null,U&&document.contains(U)&&U.focus({preventScroll:!0})}},[k,m,N]),o.useEffect(()=>{c==="dialog"&&!d&&kt("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 Z=n.jsxs("div",{ref:f,className:le(`tooltip__content ${k?"tooltip__content--inline":""} ${g?"tooltip__content--bordered":""} ${w?"is-closing":""} ${u} ${D&&C?"is-mobile":""}`),role:c,"aria-label":d||void 0,style:k?{}:{...v,visibility:N?"visible":"hidden"},tabIndex:-1,"data-placement":B,"data-left":k?"":v.left,"data-top":k?"":v.top,"data-anchor-left":t?Math.round(t.left):"","data-anchor-top":t?Math.round(t.top):"","data-anchor-width":t?Math.round(t.width):"","data-anchor-height":t?Math.round(t.height):"",children:[_!=null&&n.jsx("div",{className:le("tooltip__header h5"),children:_}),h]});if(k||typeof document>"u")return Z;if(p||D&&C){const L=n.jsxs("div",{className:le("tooltip__portal"),children:[n.jsx("div",{className:le("tooltip__backdrop"),onClick:()=>{i&&M(!0)}}),Z]});return dn.createPortal(L,document.body)}return dn.createPortal(Z,document.body)}function Mn(e){const{anchorRect:t,text:a,offset:r=8,onClose:s,className:l="",ariaLabel:i}=e||{};return a?n.jsx(Bn,{anchorRect:t,offset:r,onClose:s,closeOnOutsideClick:!1,className:le(`info-tooltip ${l}`),ariaLabel:i||a,children:n.jsx("div",{className:le("info-tooltip__content body-3"),children:a})}):null}function qn(e){const{t}=xe.useTranslation(),{anchorRect:a,title:r,items:s,activeIndex:l=-1,showIndex:i=!0,onClose:u,offset:c=12,closeOnOutsideClick:d=!0}=e||{},h=(Array.isArray(s)?s:s?[s]:[]).map(p=>typeof p=="string"?{text:p}:p);return!h.length&&!r?null:n.jsx(Bn,{anchorRect:a,offset:c,onClose:u,closeOnOutsideClick:d,useBorder:!1,className:le("description-tooltip"),ariaLabel:r||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:le("description-tooltip__box"),children:[r&&n.jsx("span",{className:le("description-tooltip__title body-2"),children:r}),n.jsx("ol",{className:le("description-tooltip__items"),children:h.map((p,C)=>n.jsxs("li",{className:le(`description-tooltip__item body-3${C===l?" description-tooltip__item--active":""}`),children:[i&&h.length>1&&n.jsxs("span",{className:le("description-tooltip__index button-1"),children:[C+1,"."]}),p.color&&n.jsx("span",{className:le("description-tooltip__dot"),style:{background:p.color},"aria-hidden":"true"}),n.jsx("span",{children:p.text})]},C))})]})})}function Fa(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let xo=0,ui=!1;function ci(){ui||typeof document>"u"||(ui=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(xo=Date.now())},!0),document.addEventListener("touchstart",()=>{xo=Date.now()},{capture:!0,passive:!0}))}ci();function Un(e){return!!e&&e.pointerType==="touch"}function ea(e=1e3){return ci(),Date.now()-xo<e}function fr(e,t,a,{enabled:r=!0,fallbackOnParent:s=!1}={}){const l=Fa(e),i=Fa(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!r||typeof document>"u")return;const h=p=>{const C=p,g=p.target,_=a.current,m=!!(g&&_&&_.contains(g));if(C.pointerType!=="touch"){m&&(u.current=null);return}if(m){u.current=l.current;return}u.current=null,l.current&&!(g&&g.closest?.(".tooltip__content"))&&i.current(!1,_)};return document.addEventListener("pointerdown",h,!0),()=>document.removeEventListener("pointerdown",h,!0)},[r,a,l,i]);const d=o.useCallback(h=>{const p=u.current;return p===null?!1:(u.current=null,c.current=Date.now(),i.current(!p,h??a.current),!0)},[a,i]);return o.useEffect(()=>{if(!r||!s)return;const h=a.current,p=h?.parentElement;if(!h||!p)return;let C=null;const g=f=>{const v=f.changedTouches?.[0];if(!v)return!1;const b=h.getBoundingClientRect();return v.clientX>=b.left&&v.clientX<=b.right&&v.clientY>=b.top&&v.clientY<=b.bottom},_=f=>{C=g(f)?l.current:null},m=f=>{const v=C;C=null,!(v===null||Date.now()-c.current<700||!g(f))&&(u.current=null,c.current=Date.now(),i.current(!v,h))};return p.addEventListener("touchstart",_,{passive:!0}),p.addEventListener("touchend",m),()=>{p.removeEventListener("touchstart",_),p.removeEventListener("touchend",m)}},[r,s,a,l,i]),{touchPress:d}}function ky(e,t){const{size:a=48,type:r,htmlType:s,href:l,target:i,rel:u,icon:c,rightIcon:d,label:h,count:p,subLabel:C,children:g,ariaLabel:_,variant:m="default",align:f="center",nowrap:v=!1,selected:b,toggleable:w=!1,ariaExpanded:y,ariaControls:B,disabled:x=!1,loading:N=!1,useLabel:A=!0,useBorder:D=!0,useBG:E=!0,useDisabledCovered:k=!1,useDisabledInvisible:R=!1,useDisabledFilled:$=!1,width:G,minWidth:T,onClick:P,onDisabledClick:M,showTooltipInfo:ee=!1,tooltipInfoText:Q=null,tooltipDescription:F=null,tooltipOnly:Z=!1,iconSize:L="medium",iconColor:V,shape:U="rounded",color:q,className:j,...I}=e,O=typeof a=="string"&&isNaN(Number(a))?a.toLowerCase():String(Number(a)||48),Y=O.match(/^\d+$/)?`button${O}`:`button-${O}`,K=Number(a),ie=!isNaN(K)&&K<40?"button-2":"button-1",te=h??g,ne=x||!!I.disabled,z=ne?k?"disabled-covered":R?"disabled-invisibled":$?"disabled-filled":"disabled":m,ae=z?`button--variant-${z}`:"",H=f?`button--align-${f}`:"",W=v?"button--nowrap":"",ue=U?`button--shape-${U}`:"",Be=typeof V=="string"&&V.startsWith("--")?`var(${V})`:V,ye={...G?{width:typeof G=="number"?`${G}px`:G}:{},...T?{minWidth:typeof T=="number"?`${T}px`:T}:{},...D?{}:{"--button-border":ne?"0":"1px solid transparent"},...Be?{"--button-icon-color":Be}:{},...q?{"--color-main":q}:{}},he=A===!1?"":te,Ne=Array.isArray(he)?he.length>0:!!he,Re=!!d,Me=r??(Ne||c||Re?"bar":"dot"),se=`${Y}--${Me}`,Ee=o.useRef(null);o.useEffect(()=>{!zn||s!==void 0||Ee.current?.closest("form")&&kt(`button-in-form:${typeof te=="string"?te:""}`,'[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 te=="string"&&te?` \uB2E8\uCD94: ${te}`:""))},[s,te]);const $e=o.useRef(t);$e.current=t;const Ae=o.useCallback(Te=>{Ee.current=Te;const nt=$e.current;typeof nt=="function"?nt(Te):nt&&(nt.current=Te)},[]),Fe=o.useRef(ne),[Ve,ct]=o.useState(!!b),[ot,Xe]=o.useState(!1),[ft,Le]=o.useState(null),qe=o.useCallback(()=>Xe(!1),[]),[Se,He]=o.useState(!1),Qe=o.useId();o.useEffect(()=>{typeof b=="boolean"&&ct(b)},[b]),o.useEffect(()=>{if(Fe.current&&!ne&&Ee.current){const Te=Ee.current;let nt=!1;try{nt=Te.matches(":focus:not(:focus-visible)")}catch{nt=!1}nt&&Te.blur(),Te.style.pointerEvents="none";const oe=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Ee.current&&(Ee.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(oe)}Fe.current=ne},[ne]);const it=typeof b=="boolean"?!!b:Ve,bt=typeof y=="boolean"?void 0:w||typeof b=="boolean"?it?"true":"false":I["aria-pressed"],wt=ke("button",Y,se,ae,H,W,ue,it?"is-selected":null,E?null:"button--no-bg",Z?"button--tooltip-only":null,j),Et=`button__icon button__icon--${L}`,at=Array.isArray(C)?C:C!==void 0?[C]:[],st=()=>{if(Array.isArray(he))return he.map((nt,oe)=>{const ge=at[oe];return n.jsxs("span",{className:`button__label-text${ge!==void 0?" button__label-text--has-sub":""}`,children:[nt,ge!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:ge})]},oe)});const Te=C!==void 0;return n.jsxs("span",{className:`button__label-text${Te?" button__label-text--has-sub":""}`,children:[he,p!=null&&n.jsx("span",{className:"button__count",children:p}),Te&&n.jsx("span",{className:"button__sub-label-text caption-1",children:C})]})},Bt=Te=>{typeof b!="boolean"&&!w&&ct(!1),Te.currentTarget.blur()},At=Te=>{ne||(typeof I.onMouseLeave=="function"&&I.onMouseLeave(Te),Bt(Te))},Mt=Te=>{if(Z&&dt&&ut.touchPress(Te.currentTarget),ne){dt&&ut.touchPress(Te.currentTarget),Te.preventDefault(),M?.(Te);return}typeof b!="boolean"&&w&&ct(nt=>!nt),P?.(Te)},Rt=o.useCallback(()=>{(ee||F)&&(Xe(!0),Le(Ee.current?.getBoundingClientRect()??null))},[ee,F]),_t=o.useCallback(()=>{(ee||F)&&(Xe(!1),Le(null))},[ee,F]),dt=!!(ee||F),ut=fr(ot,Te=>{Te?Rt():_t()},Ee,{enabled:dt&&(ne||Z),fallbackOnParent:dt&&ne}),lt={...I};delete lt.disabled,delete lt.className,delete lt.faded,delete lt.useFaded,delete lt.loading,delete lt.onMouseLeave,delete lt.onPointerEnter,delete lt.onPointerLeave,delete lt.onPointerUp,delete lt.onFocus,delete lt.onBlur,ne&&(Object.keys(lt).forEach(Te=>{/^on[A-Z]/.test(Te)&&typeof lt[Te]=="function"&&delete lt[Te]}),lt["aria-disabled"]="true"),N&&(lt["aria-busy"]="true");const xt=(typeof ee=="string"?ee:null)??(typeof Q=="string"?Q:null)??(typeof _=="string"?_:null)??(typeof te=="string"?te:null)??void 0,pt=typeof _=="string"?_:typeof te=="string"?te:xt,be=F?[F.title,...F.items??[]].filter(Boolean).join(". "):ee&&xt&&xt!==pt?xt:"",ve=[typeof I["aria-describedby"]=="string"?I["aria-describedby"]:void 0,be?Qe:null].filter(Boolean).join(" ")||void 0,we=()=>n.jsx("span",{className:`${Et} button__spinner`,"aria-hidden":"true",children:n.jsx(Ca,{variant:"spinner",size:"100%"})}),tt=(Te,nt)=>n.jsx(rt,{icon:Te,label:nt??pt,className:Et,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),gt=Te=>N?we():tt(c,Te),Nt=()=>Me==="dot"?n.jsxs(n.Fragment,{children:[gt(),Ne&&n.jsx("span",{className:`button__label ${ie}`,children:st()})]}):f==="center"&&(c||N)?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:gt()}),Ne&&n.jsx("span",{className:`button__label ${ie}`,children:st()})]}),Re&&n.jsx("span",{className:"button__right",children:tt(d)})]}):n.jsxs(n.Fragment,{children:[(c||N)&&n.jsx("span",{className:"button__left",children:gt(_??te)}),Ne&&n.jsx("span",{className:`button__label ${ie}`,children:st()}),Re&&n.jsx("span",{className:"button__right",children:tt(d)})]}),yt=!!l&&!ne;return n.jsxs(n.Fragment,{children:[n.jsxs(yt?"a":"button",{...lt,ref:Ae,...yt?{href:l,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:s??"button",disabled:ne&&!M&&!Se},className:wt,"aria-pressed":bt,"aria-expanded":typeof y=="boolean"?y:I["aria-expanded"],"aria-controls":B??I["aria-controls"],"aria-label":pt,"aria-disabled":ne&&(yt||M||Se)?!0:void 0,"aria-describedby":ve,style:ye,onClick:Mt,onMouseLeave:At,onPointerEnter:Te=>{Un(Te)||Rt(),!ne&&typeof I.onPointerEnter=="function"&&I.onPointerEnter(Te)},onPointerLeave:Te=>{Un(Te)||_t(),!ne&&typeof I.onPointerLeave=="function"&&I.onPointerLeave(Te)},onPointerUp:Te=>{ne&&dt&&ut.touchPress(Te.currentTarget),!ne&&typeof I.onPointerUp=="function"&&I.onPointerUp(Te)},onFocus:Te=>{He(!0),ea()||Rt(),!ne&&typeof I.onFocus=="function"&&I.onFocus(Te)},onBlur:Te=>{He(!1),ne||Bt(Te),_t(),!ne&&typeof I.onBlur=="function"&&I.onBlur(Te)},children:[Nt(),be?n.jsx("span",{id:Qe,hidden:!0,"aria-label":be}):null]}),ot&&F?n.jsx(qn,{anchorRect:ft,title:F.title,items:F.items,onClose:qe}):ot&&xt?n.jsx(Mn,{anchorRect:ft,text:xt,onClose:qe}):null]})}const Ce=o.forwardRef(ky);Ce.displayName="Button";function Tt(e,t,a){const r=o.useRef(null);return o.useLayoutEffect(()=>{const s=r.current?.parentElement??null;return t(s,e),()=>a(s)},[e,t,a]),r}const Oa={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},wo=new WeakMap;function Bo(e){if(e)return wo.get(e)}function en(e,t){e&&(e.style.setProperty(Oa.title,t.title),e.style.setProperty(Oa.description,t.description),wo.set(e,t))}function tn(e){e&&(e.style.removeProperty(Oa.title),e.style.removeProperty(Oa.description),wo.delete(e))}const di={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function pi(){const e=Tt(di,en,tn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const hi={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function mi(){const e=Tt(hi,en,tn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const Ci={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function fi(){const e=Tt(Ci,en,tn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const bi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function gi(){const e=Tt(bi,en,tn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const yi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function vi(){const e=Tt(yi,en,tn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const _i={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function xi(){const e=Tt(_i,en,tn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const wi={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function Bi(){const e=Tt(wi,en,tn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const Ai={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function ki(){const e=Tt(Ai,en,tn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const Ni={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function Ei(){const e=Tt(Ni,en,tn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const Di={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function Si(){const e=Tt(Di,en,tn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const ji={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function Ti(){const e=Tt(ji,en,tn);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 Mi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Li(){const e=Tt(Mi,en,tn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const $i={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function Ri(){const e=Tt($i,en,tn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Pi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function Ii(){const e=Tt(Pi,en,tn);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 Gt.t(`promoBannerBg.${e}`,t)},textTone:a}),Ny=[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")],Fi={main:pi,soft:mi,sub:fi,deep:gi,softSub:vi,warm:xi,dark:Bi,radial:ki,diagonal:Ei,dots:Si,outline:Ti,success:Li,naver:Ri,instagram:Ii};function Oi({storageKey:e="fontScale",baseFont:t=20,minScale:a=.8,maxScale:r=1.4,step:s=.1,lineHeightRatio:l=1.4}={}){const i=w=>Math.max(a,Math.min(r,Number(w))),u=w=>{try{const y=localStorage.getItem(w),B=y?Number(y):1;return Number.isFinite(B)?i(B):i(1)}catch{return i(1)}},[c,d]=o.useState(()=>u(e)),[h,p]=o.useState(e);h!==e&&(p(e),d(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const C=w=>{d(typeof w=="function"?y=>i(w(y)):i(w))},g=()=>C(w=>+(w+s).toFixed(6)),_=()=>C(w=>+(w-s).toFixed(6)),m=c<r-Number.EPSILON,f=c>a+Number.EPSILON,v=Math.round(t*c),b=Math.round(v*l);return{scale:c,setScale:C,increase:g,decrease:_,canIncrease:m,canDecrease:f,fontSize:v,lineHeight:b}}function zi(e,t){const a=Fa(t);o.useEffect(()=>{const r=()=>a.current();try{window.addEventListener(e,r)}catch{}return()=>{try{window.removeEventListener(e,r)}catch{}}},[e,a])}const Ao=" \xB7 ",Wi=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(Ao)?e.split(Ao).pop()??e:e})(),Ey=o.createContext(!1),ta=[];let Hi=null;function Dy(e){const t=o.useContext(Ey);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;ta.length===0&&(Hi=document.title);const a={text:Wi?`${e}${Ao}${Wi}`:e};return ta.push(a),document.title=a.text,()=>{const r=ta.lastIndexOf(a);r>=0&&ta.splice(r,1),document.title=ta.length?ta[ta.length-1].text:Hi??document.title}},[e,t])}const ko=[{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"}],Sy=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function mn(e,t){return Sy().compare(e,t)}const br=new Map;function jy(e){const t=br.get(e);if(t)return t;const a=[],r=/-?\d+(?:\.\d+)?/g;let s=0;for(let l=r.exec(e);l;l=r.exec(e)){let i=l.index,u=l[0];u[0]==="-"&&i>0&&!/\s/.test(e[i-1])&&(i+=1,u=u.slice(1)),i>s&&a.push(e.slice(s,i)),a.push(Number(u)),s=l.index+l[0].length}return s<e.length&&a.push(e.slice(s)),br.size>5e3&&br.clear(),br.set(e,a),a}function Ty(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 My(e,t){const a=d=>d==null||typeof d=="number"&&Number.isNaN(d)?"":String(d).trim(),r=a(e),s=a(t);if(r===s)return 0;const l=(d,h)=>{if(typeof d=="number"&&!Number.isNaN(d))return[d];const p=Ty(h);return p!==null?[p]:jy(h)},i=l(e,r),u=l(t,s),c=Math.min(i.length,u.length);for(let d=0;d<c;d++){const h=i[d],p=u[d];if(typeof h=="number"&&typeof p=="number"){if(h!==p)return h-p;continue}if(typeof h=="number")return-1;if(typeof p=="number")return 1;const C=mn(h,p);if(C!==0)return C}return i.length!==u.length?i.length-u.length:mn(r,s)}const Vi=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function gr(e,t,a){const r=Vi(e),s=Vi(t);if(r||s)return r===s?0:r?1:-1;const l=My(e,t);return a?l:-l}function Ly(e,t,a){const{t:r}=xe.useTranslation(),[s,l]=o.useState(()=>{const _=a?.initialPageSize;return _&&ko.some(m=>m.value===_)?_:"25"}),[i,u]=o.useState(1),[c,d]=o.useState(t);Object.is(c,t)||(d(t),i!==1&&u(1));const h=o.useMemo(()=>ko.map(_=>({..._,label:r("visits.showN",{n:_.value})})),[r]),p=o.useCallback(_=>{ko.some(m=>m.value===_)&&(l(_),u(1))},[]),C=Math.max(1,Math.ceil(e.length/Number(s))),g=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),C);return i!==g&&u(g),{pageRows:o.useMemo(()=>e.slice((g-1)*Number(s),g*Number(s)),[e,g,s]),pageSizeProps:{options:h,value:s,onChange:p},paginationProps:{page:g,total:C,onChange:u},setPage:u}}function $y(e){const[t,a]=o.useState(()=>e?.defaultKey!=null?{key:e.defaultKey,asc:e.defaultAsc??!0}:null),r=o.useRef(t),s=o.useRef(e?.onSortChange);s.current=e?.onSortChange;const l=o.useCallback(c=>{const d=r.current,h=d?.key===c?{key:c,asc:!d.asc}:{key:c,asc:!0};r.current=h,a(h),s.current?.(h)},[]),i=o.useCallback((c,d)=>({label:c,sortDir:t?.key===d?t.asc?"asc":"desc":null,onClick:()=>l(d)}),[t,l]),u=o.useCallback((c,d)=>{if(!t)return c;const{key:h,asc:p}=t;return[...c].sort((C,g)=>gr(d(C,h),d(g,h),p))},[t]);return{sort:t,field:i,sortRows:u}}const An="\uC804\uCCB4";Object.fromEntries(Object.entries(df).map(([e,{nucleus:t}])=>[e,t]));const Ry={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"})},Py={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"})},Iy={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 Fy(e,t){if("place"in t)return Ry[t.place](e);const a=Py[t.vowel](e);return t.glide?`${a} \xB7 ${Iy[t.glide](e)}`:a}const Oy=(e,{defaultValue:t})=>t,qi=(e,t)=>({jamos:e,phonetic:t,tooltip:Fy(Oy,t)}),Ln=(e,t)=>t.map(a=>qi([a],{place:e})),Kt=(e,t,a)=>qi([...e],a?{vowel:t,glide:a}:{vowel:t}),No={cho:[Ln("labial",["\u3142","\u3143","\u314D","\u3141"]),Ln("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),Ln("alveolar",["\u3145","\u3146"]),Ln("palatal",["\u3148","\u3149","\u314A"]),Ln("velar",["\u3131","\u3132","\u314B"]),Ln("glottal",["\u314E"])],jung:[[Kt("\u3163","frontHigh"),Kt("\u315F","frontHigh","w"),Kt("\u3162","frontHigh","velar")],[Kt("\u3161","backHighUnrounded")],[Kt("\u315C","backHighRounded"),Kt("\u3160","backHighRounded","j")],[Kt("\u3154\u3150","frontMid"),Kt("\u3156\u3152","frontMid","j"),Kt("\u3159\u315A\u315E","frontMid","w")],[Kt("\u3153","backMidUnrounded"),Kt("\u3155","backMidUnrounded","j"),Kt("\u315D","backMidUnrounded","w")],[Kt("\u3157","backMidRounded"),Kt("\u315B","backMidRounded","j")],[Kt("\u314F","low"),Kt("\u3151","low","j"),Kt("\u3158","low","w")]],jong:[Ln("labial",["\u3142","\u3141"]),Ln("alveolar",["\u3137","\u3134","\u3139"]),Ln("velar",["\u3131","\u3147"])]},zy=e=>e===Wy?[]:Array.from(e),Wy="__NO_CODA__",Eo=e=>e.map(t=>t.map(({jamos:a,phonetic:r,tooltip:s})=>({v:a.join(""),phonetic:r,tooltip:s}))),Ui={cho:Eo(No.cho),jung:Eo(No.jung),jong:Eo(No.jong)};Ui.jung.flat().forEach(({v:e})=>{for(const t of zy(e));}),new Set(Ui.cho.flat().map(e=>e.v));function Hy(e,t=!0){const a=Fa(e);o.useEffect(()=>{if(t)return Qn(()=>{a.current?.()})},[t,a])}function za(){const[e,t]=o.useState(null),a=o.useCallback(l=>t(l.getBoundingClientRect()),[]),r=o.useCallback(()=>t(null),[]),s=o.useCallback(l=>{const i=l.getBoundingClientRect();t(u=>u?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:a,close:r,toggleAt:s}}function Vy(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),l=o.useRef(null);o.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const i=o.useCallback((c,d)=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{a(c),s(d)},e)},[e]),u=o.useCallback(()=>{l.current&&clearTimeout(l.current),a(null),s(null)},[]);return{payload:t,anchorRect:r,openAfterDelay:i,close:u}}function Gi(e="warning"){const[t,a]=o.useState(""),[r,s]=o.useState(e),[l,i]=o.useState(0),u=o.useCallback((p,C)=>{s(C),a(p),i(g=>g+1)},[]),c=o.useCallback(p=>u(p,"warning"),[u]),d=o.useCallback(p=>u(p,"normal"),[u]),h=o.useCallback(()=>a(""),[]);return{toastMessage:t,toastType:r,toastKey:l,showToast:u,showWarning:c,showNormal:d,clearToast:h}}function Wa(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 Ha({computeStyle:e,onScroll:t="close",onResize:a="close",ignoreOutsideClickSelector:r}){const[s,l]=o.useState(!1),[i,u]=o.useState({position:"fixed"}),c=o.useRef(null),d=o.useRef(null),h=o.useCallback(()=>{c.current&&u(e(c.current.getBoundingClientRect(),c.current))},[e]);o.useLayoutEffect(()=>{s&&h()},[s,h]),o.useEffect(()=>{if(!s)return;let g=d.current?.offsetHeight??0;g>0&&h();let _=0,m=null;typeof ResizeObserver<"u"&&d.current&&(m=new ResizeObserver(()=>{const N=d.current?.offsetHeight??0;if(N!==g){if(g=N,++_>4){m?.disconnect(),m=null;return}h()}}),m.observe(d.current));const f=N=>{const A=N.target;r&&A.closest?.(r)||c.current?.contains(A)||d.current?.contains(A)||l(!1)};document.addEventListener("mousedown",f),document.addEventListener("pointerdown",f);let v=null;const b=()=>{if(typeof requestAnimationFrame>"u"){h();return}v===null&&(v=requestAnimationFrame(()=>{v=null,h()}))},w=N=>{d.current?.contains(N.target)||(t==="reposition"?b():t==="close"&&l(!1))};t!=="ignore"&&window.addEventListener("scroll",w,!0);const y=()=>{a==="reposition"?b():a==="close"&&l(!1)};let B=null;const x=()=>{y(),B&&clearTimeout(B),B=setTimeout(()=>{B=null,a==="reposition"&&h()},250)};return a!=="ignore"&&(window.addEventListener("resize",y),window.addEventListener("orientationchange",x)),()=>{v!==null&&cancelAnimationFrame(v),m?.disconnect(),document.removeEventListener("mousedown",f),document.removeEventListener("pointerdown",f),t!=="ignore"&&window.removeEventListener("scroll",w,!0),a!=="ignore"&&(window.removeEventListener("resize",y),window.removeEventListener("orientationchange",x)),B&&clearTimeout(B)}},[s,h,t,a,r]),o.useEffect(()=>{if(s)return Qn(()=>l(!1))},[s]);const p=o.useCallback(()=>l(g=>!g),[]),C=o.useCallback(()=>l(!1),[]);return{open:s,setOpen:l,toggle:p,close:C,style:i,triggerRef:c,menuRef:d}}function qy(e,{mode:t="playback",autoStart:a=!1,onPlaySpeaker:r,onComplete:s,playMs:l=1100,feedbackMs:i=1500}={}){const[u,c]=o.useState([]),[d,h]=o.useState(0),[p,C]=o.useState("idle"),[g,_]=o.useState(null),[m,f]=o.useState([]),[v,b]=o.useState(null),[w,y]=o.useState(0),B=o.useRef(0),x=o.useCallback(L=>{B.current=typeof L=="function"?L(B.current):L,y(B.current)},[]),N=o.useRef(r),A=o.useRef(s);o.useEffect(()=>{N.current=r,A.current=s},[r,s]);const D=o.useRef([]),E=()=>{D.current.forEach(clearTimeout),D.current=[]},k=(L,V)=>{D.current.push(setTimeout(V,L))};o.useEffect(()=>()=>E(),[]);const R=u[d]?.id??null,$=o.useRef(null),G=o.useCallback(()=>{E(),C("playing"),f([]),b(null),x(0);let L=0;e.forEach((V,U)=>{k(L,()=>{h(U),_(V.id),N.current?.(V)}),k(L+1e3,()=>{_(null),f(q=>[...q,V.id])}),L+=1300}),k(L,()=>{C("done"),A.current?.({score:0,total:e.length})})},[e,x]),T=o.useCallback((L,V)=>{if(V>=L.length){C("done"),A.current?.({score:B.current,total:L.length});return}$.current=null,h(V),b(null),C("playing"),_(L[V].id),N.current?.(L[V]),k(l,()=>{_(null),C("waiting")})},[l]),P=o.useCallback(()=>{E();const L=Ra(e);c(L),x(0),f([]),T(L,0)},[e,T,x]),M=o.useCallback(()=>{t==="playback"?(c(e),G()):P()},[t,e,G,P]),ee=o.useCallback(()=>{E(),C("idle"),_(null),f([]),b(null),h(0),x(0),c([])},[x]),Q=JSON.stringify(e.map(L=>[L.id,L.label,L.angleDeg,L.deg,L.row,L.shortcut]));o.useEffect(()=>(a?M():ee(),()=>E()),[t,Q,a]);const F=o.useCallback(L=>{p!=="waiting"||t==="playback"||$.current===d||($.current=d,b(L),L===u[d]?.id&&x(V=>V+1),t==="exam"?(C("playing"),k(400,()=>T(u,d+1))):(C("feedback"),k(i,()=>T(u,d+1))))},[p,t,u,d,T,i,x]),Z=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:g,playedIds:m,selectedId:v,answerId:R,showFeedback:p==="feedback",clickable:p==="waiting",onSelectSpeaker:F},index:d,total:Z,score:w,phase:p,done:p==="done",start:M,reset:ee}}const Do=new Map,So=new Map,Uy=()=>()=>{},Gy=()=>!0,Ky=()=>!1;function Ki(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 Yy(e){if(typeof window>"u")return"";const t=(a,r)=>{const s=r.attrName.toLowerCase(),l=r.attrValue.trim();(s==="href"||s==="xlink:href")&&!l.startsWith("#")&&(r.keepAttr=!1),(s==="style"||l.includes("\\")&&l.includes("("))&&(r.keepAttr=!1);const i=l.replace(/url\s*\(\s*(['"]?)#[^)\s'"]+\1\s*\)/gi,"");/url\s*\(/i.test(i)&&(r.keepAttr=!1)};da.addHook("uponSanitizeAttribute",t);try{return da.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{da.removeHook("uponSanitizeAttribute",t)}}function Zy(e,t){const a=new Set;for(const i of e.matchAll(/url\(\s*(['"]?)#([^)\s"']+)\1\s*\)/g))a.add(i[2]);for(const i of e.matchAll(/(?:xlink:)?href="#([^"]+)"/g))a.add(i[1]);const r=new Set([...e.matchAll(/id="([^"]*)"/g)].map(i=>i[1])),s=[...a].filter(i=>r.has(i));if(s.length===0)return e;let l=e;for(const i of s){const u=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=`${t}-${i}`;l=l.replace(new RegExp(`id="${u}"`,"g"),`id="${c}"`).replace(new RegExp(`url\\(\\s*(['"]?)#${u}\\1\\s*\\)`,"g"),(d,h)=>`url(${h}#${c}${h})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return l}function Xy(e){const t=So.get(e);if(t)return t;const a=fetch(e).then(r=>r.ok?r.text():null).then(r=>(r!=null&&Do.set(e,r),r)).catch(()=>null).finally(()=>{So.delete(e)});return So.set(e,a),a}function Jy(e,t=!0){const a=o.useSyncExternalStore(Uy,Gy,Ky)&&t&&e?Ki(e)??Do.get(e)??null:null,[r,s]=o.useState({src:e,enabled:t,svg:a});return o.useEffect(()=>{if(!t||!e){s({src:e,enabled:t,svg:null});return}const l=Ki(e)??Do.get(e)??null;if(l!==null){s({src:e,enabled:t,svg:l});return}let i=!0;return Xy(e).then(u=>{i&&s({src:e,enabled:t,svg:u})}),()=>{i=!1}},[e,t]),r.src===e&&r.enabled===t?r.svg:a}function Qy({title:e,description:t,actionLabel:a,onAction:r,bg:s,color:l,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:d,className:h=""}){const p=s??l??"main",C=o.useRef(null),[g,_]=o.useState("main"),m=yn("(max-width: 767px)"),f=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const w=C.current;if(!w)return;const y=Bo(w),B=(x,N,A)=>{if(A!==void 0)w.style.setProperty(N,A),f.current[x]=!0;else if(f.current[x]){const D=y?.[x];D?w.style.setProperty(N,D):w.style.removeProperty(N),f.current[x]=!1}};B("title","--promo-banner-bg-title",c),B("description","--promo-banner-bg-description",d)},[c,d,p]),o.useLayoutEffect(()=>{const w=C.current;if(!w)return;const y=Bo(w);_(y?.actionVariant??"main")},[p]);const v=ke("promo-banner",`promo-banner--${i}`,h),b=Fi[p];return n.jsxs("div",{ref:C,className:v,role:"note",children:[n.jsx(b,{}),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(Ce,{htmlType:"button",size:40,variant:u??g,shape:"pill",useBorder:!0,onClick:r,ariaLabel:a,...m?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:a,minWidth:140}})]})}function e2({children:e,interval:t=5e3,dotTone:a,className:r="","aria-label":s}){const{t:l}=xe.useTranslation(),i=s??l("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[d,h]=o.useState(0),[p,C]=o.useState(!1),[g,_]=o.useState(!1),[m,f]=o.useState(!1),v=o.useRef(null),b=o.useRef(null),w=o.useRef(null),y=_o(),B=p||g||m,x=c>0?Math.min(d,c-1):0;o.useEffect(()=>{if(c<2||t<=0||B||y)return;const A=window.setInterval(()=>h(D=>(Math.min(D,c-1)+1)%c),t);return()=>window.clearInterval(A)},[c,t,B,y]);const N=A=>{b.current!=null&&window.clearTimeout(b.current),b.current=window.setTimeout(()=>{b.current=null,f(!1)},A)};return o.useEffect(()=>()=>{b.current!=null&&window.clearTimeout(b.current)},[]),o.useEffect(()=>{if(!m)return;const A=D=>{D.pointerType==="touch"&&(w.current&&w.current.contains(D.target)||(b.current!=null&&(window.clearTimeout(b.current),b.current=null),f(!1)))};return document.addEventListener("pointerdown",A,!0),()=>document.removeEventListener("pointerdown",A,!0)},[m]),c===0?null:n.jsxs("section",{ref:w,className:ke("top-banner",r),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:A=>{v.current=A.pointerType},onPointerDown:A=>{v.current=A.pointerType,A.pointerType==="touch"&&(b.current!=null&&(window.clearTimeout(b.current),b.current=null),f(!0))},onPointerUp:A=>{A.pointerType==="touch"&&N(5e3)},onPointerCancel:A=>{A.pointerType==="touch"&&N(5e3)},onMouseEnter:()=>{v.current!=="touch"&&C(!0)},onMouseLeave:()=>C(!1),onFocus:A=>{let D=!0;try{D=A.target.matches(":focus-visible")}catch{D=!0}_(D)},onBlur:A=>{A.currentTarget.contains(A.relatedTarget)||_(!1)},children:[n.jsx("div",{className:"top-banner__viewport",children:n.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${x*100}%)`},children:u.map((A,D)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":D!==x,...D!==x?{inert:!0}:{},children:A},D))})}),c>1&&n.jsx("div",{className:`top-banner__dots${(a?.[x]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((A,D)=>n.jsx("button",{type:"button",className:`top-banner__dot${D===x?" top-banner__dot--active":""}`,"aria-label":l("topBanner.dotAriaLabel",{count:c,index:D+1,defaultValue:`${c}\uAC1C \uC911 ${D+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":D===x,onClick:()=>h(D)},D))})]})}function t2({title:e,body:t,open:a=!1,onToggle:r,avatar:s,titleClassName:l="body-2",bodyClassName:i="body-2",className:u=""}){const{t:c}=xe.useTranslation();return n.jsxs("div",{className:`accordion-item ${a?"accordion-item--open":""} ${u}`.trim(),role:"listitem",children:[n.jsxs("div",{className:"accordion-item__header",role:"button",tabIndex:0,"aria-expanded":a,"data-accordion-header":!0,onClick:r,onKeyDown:d=>{if(d.key==="Enter"||d.key===" ")d.preventDefault(),r?.();else if(d.key==="ArrowDown"||d.key==="ArrowUp"){d.preventDefault();const h=d.currentTarget.closest('[role="list"]');if(!h)return;const p=Array.from(h.querySelectorAll("[data-accordion-header]")),C=p.indexOf(d.currentTarget);(d.key==="ArrowDown"?p[C+1]:p[C-1])?.focus()}},children:[s&&n.jsx("div",{className:"accordion-item__avatar",children:s}),n.jsx("div",{className:`accordion-item__title ${l}`,children:e}),n.jsx("div",{className:"accordion-item__chevron",children:n.jsx(rt,{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 n2({items:e=[],defaultOpenIndex:t=0,size:a=72,className:r="",bodyClassName:s}){const[l,i]=o.useState({index:t}),u=(c,d)=>l.id!=null&&c.id!=null?c.id===l.id:l.id==null&&d===l.index;return n.jsx("div",{className:`accordion-group accordion-group--s${a} ${r}`.trim(),role:"list",children:e.map((c,d)=>n.jsx(t2,{title:c.title,body:c.body,avatar:c.avatar,open:u(c,d),onToggle:()=>i(u(c,d)?{index:-1}:{index:d,id:c.id}),bodyClassName:s},c.id??d))})}function a2(){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 r2(){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 o2(){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 Dn({children:e,icon:t,number:a,position:r="top-left",size:s=24,animate:l=!1,onClick:i,"aria-label":u,"aria-hidden":c,className:d=""}){const{t:h}=xe.useTranslation(),p=t??"check",C=a!==void 0,g=e!==void 0||C?"number":p,_=e!==void 0?void 0:C?h("badge.nthSelected",{n:a,defaultValue:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"}):{check:h("badge.selected","\uC120\uD0DD\uB428"),remove:h("badge.remove","\uC81C\uAC70"),minus:h("badge.exclude","\uC81C\uC678")}[p],m=c?void 0:u??_;return n.jsxs("span",{className:ke("circle-badge",`circle-badge--${g}`,`circle-badge--${s}`,`circle-badge--${r}`,l?"circle-badge--animate":"",i?"circle-badge--clickable":"",d),onClick:i,onKeyDown:i?f=>{f.key!=="Enter"&&f.key!==" "||(f.preventDefault(),f.currentTarget.click())}:void 0,"aria-label":m,"aria-hidden":c||void 0,role:i?"button":m?"img":void 0,tabIndex:i?0:void 0,children:[e??(C?a:null),e===void 0&&!C&&p==="check"&&n.jsx(a2,{}),e===void 0&&!C&&p==="remove"&&n.jsx(r2,{}),e===void 0&&!C&&p==="minus"&&n.jsx(o2,{})]})}function Va({columns:e=[],onClose:t,className:a="",size:r="medium"}){const{t:s}=xe.useTranslation(),l=r==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const f=[{title:null,columns:e}];let v=e;for(const b of i){const w=v?.[b.ci]?.items?.[b.ii];if(!w||!Array.isArray(w.children)||!w.children.length)break;v=[{title:null,items:w.children}],f.push({title:w.label||null,columns:v})}return f},[e,i]),d=c[c.length-1],h=c.length-1,p=o.useCallback(()=>u(f=>f.slice(0,Math.max(0,Math.min(f.length,h)-1))),[h]),C=o.useRef(null),g=o.useRef(null),_=c.length;o.useEffect(()=>{g.current||(g.current=document.activeElement);let f=0,v=0;const b=()=>{const w=C.current?.querySelector("button:not([disabled])");if(w&&w.offsetParent){w.focus({preventScroll:!0});return}v++<20&&(f=requestAnimationFrame(b))};return f=requestAnimationFrame(b),()=>cancelAnimationFrame(f)},[_]),o.useEffect(()=>()=>{g.current?.focus?.({preventScroll:!0})},[]);const m=o.useCallback((f,v,b)=>{if(f){if(Array.isArray(f.children)&&f.children.length){u(w=>[...w.slice(0,h),{ci:v,ii:b}]);return}try{typeof f.onClick=="function"&&f.onClick()}catch{}try{f&&f.closeOnSelect&&typeof t=="function"&&t()}catch{}}},[t,h]);return n.jsxs("div",{className:le(`menu-tooltip menu-tooltip--${r} ${a}`),children:[(c.length>1||d.title)&&n.jsxs("div",{className:le("menu-tooltip__header"),children:[c.length>1?n.jsx(Ce,{htmlType:"button",size:l,type:"dot",icon:"chevron-left",ariaLabel:s("common.back","\uB4A4\uB85C"),onClick:p,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:le("menu-tooltip__title button-1"),children:d.title})]}),n.jsx("div",{className:le("menu-tooltip__columns"),ref:C,children:d.columns&&d.columns.map((f,v)=>{const b=(f.items||[]).some(w=>!!w.icon||w.selected!==void 0);return n.jsxs("div",{className:le("menu-tooltip__column"),children:[f.title?n.jsx("div",{className:le("menu-tooltip__column-title body-3"),children:f.title}):null,n.jsx("div",{className:le("menu-tooltip__items"),children:(f.items||[]).map((w,y)=>n.jsxs(o.Fragment,{children:[w.separatorBefore&&y>0&&n.jsx("div",{className:le("menu-tooltip__separator"),role:"separator"}),n.jsx(Ce,{htmlType:"button",className:le("menu-tooltip__item"),size:l,type:w.label?"bar":"dot",icon:w.selected?"check":w.icon||(b||!w.label?"none":void 0),rightIcon:Array.isArray(w.children)&&w.children.length?"chevron-right":w.badgeCount?n.jsx(Dn,{position:"inline",number:Math.min(w.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:w.label,ariaLabel:w.label&&w.badgeCount&&w.badgeCount>0?s("nav.badgeLabel",{label:w.label,count:w.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):w.label,onClick:()=>m(w,v,y),selected:w.selected,disabled:w.disabled,showTooltipInfo:w.tooltip||!1,useBorder:!1,align:"left"})]},y))})]},v)})})]})}const Yi=".content-area";function jo(e,t="Nav"){try{const a=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Yi);if(a){a.scrollTop=0;return}const r=document.scrollingElement??document.documentElement;r&&r.scrollHeight<=r.clientHeight&&kt("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Yi}) \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 To=52,yr=10,Zi=e=>e&&e>0?e:0;function Xi({items:e=[],activeKey:t,onChange:a,appMode:r,onAppModeChange:s,moreItems:l=[],scrollContainer:i}){const{t:u}=xe.useTranslation(),c=r==="manager"?"malgwi":"manager",d=r==="manager"?"arrow-left":"arrow-right",h=r==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),p=o.useRef(null),[C,g]=o.useState(0),_=e.length;o.useEffect(()=>{const L=p.current;if(!L)return;const V=()=>{const j=typeof getComputedStyle=="function"?getComputedStyle(L):null,I=L.clientWidth-(parseFloat(j?.paddingLeft??"")||0)-(parseFloat(j?.paddingRight??"")||0),O=L.querySelector(".bottom-nav__left"),Y=O?.nextElementSibling,K=(O?.offsetWidth??0)+(O&&Y?.classList.contains("bottom-nav__divider")?Y.offsetWidth:0);g(Math.max(0,I-K))};if(V(),typeof ResizeObserver>"u")return;const U=new ResizeObserver(V);U.observe(L);const q=L.querySelector(".bottom-nav__left");return q&&U.observe(q),()=>U.disconnect()},[s]);const m=To+1,f=L=>Math.max(0,Math.floor((L+yr)/(To+yr))),v=_*(To+yr)-yr<=C,b=C<=0||l.length===0&&v?_:Math.min(_,f(C-m)),w=C>0&&b<_,y=w?b:_,B=e.slice(0,y),x=e.slice(y),N=w||l.length>0,A=o.useCallback((L,V)=>({position:"fixed",bottom:window.innerHeight-L.top+8,right:window.innerWidth-L.right,zIndex:Wa(V)}),[]),D=o.useId(),{open:E,toggle:k,close:R,style:$,triggerRef:G,menuRef:T}=Ha({computeStyle:A,onScroll:"ignore",onResize:"reposition"}),P=o.useCallback((L,V)=>V>0?u("nav.badgeLabel",{label:L,count:V,defaultValue:"{{label}}, {{count}}\uAC1C"}):L,[u]),M=o.useCallback((L,V)=>V>0?u("nav.badgeInsideLabel",{label:L,count:V,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):L,[u]),ee=o.useCallback(()=>s?.(c),[s,c]),Q=o.useMemo(()=>x.find(L=>!!L.key&&L.key===t)??l.find(L=>L.selected||L.key&&L.key===t),[x,t,l]),F=o.useMemo(()=>[{items:[...x.map(L=>({label:L.label,icon:L.icon,badgeCount:L.badgeCount,selected:!!L.key&&L.key===t,closeOnSelect:!0,disabled:L.state==="disabled",onClick:()=>{L.state!=="disabled"&&(L.key&&a&&(a(L.key),jo(i,"BottomNav")),R())}})),...l.map(L=>({label:L.label,icon:L.icon,badgeCount:L.badgeCount,selected:L.selected??(!!L.key&&L.key===t),closeOnSelect:!0,onClick:()=>{L.onClick?.(),R()}}))]}],[x,l,t,a,R]),Z=[...x,...l].reduce((L,V)=>L+Zi(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:[s&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__left",children:n.jsx(Ce,{htmlType:"button",size:52,type:"dot",icon:d,ariaLabel:h,className:"bottom-nav-item",onClick:ee})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:B.map((L,V)=>{const U=Zi(L.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(Ce,{htmlType:"button",size:52,type:"dot",icon:L.icon,ariaLabel:P(L.label,U),selected:!!L.key&&L.key===t,disabled:L.state==="disabled",className:"bottom-nav-item",onClick:()=>{L.key&&(a?.(L.key),jo(i,"BottomNav"))}}),U>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Dn,{position:"top-right",number:Math.min(U,99),size:24})})]},L.key??`__slot-${V}`)})}),N&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"}),n.jsx("div",{className:"bottom-nav__right",children:n.jsxs("div",{ref:G,className:"bottom-nav__slot",children:[n.jsx(Ce,{htmlType:"button",size:52,type:"dot",icon:Q?.icon??"ellipsis",ariaLabel:M(Q?.label??u("nav.more","\uB354\uBCF4\uAE30"),Z),selected:!!Q,className:"bottom-nav-item",onClick:k,"aria-expanded":E,"aria-controls":E?D:void 0}),Z>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Dn,{position:"top-right",number:Math.min(Z,99),size:24})}),E&&dn.createPortal(n.jsx("div",{id:D,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:le("tooltip__content"),style:$,ref:T,children:n.jsx(Va,{columns:F,onClose:R})}),document.body)]})})]})]})}function Ji(e){if(typeof e!="string")return!1;let t="";for(const r of e){const s=r.charCodeAt(0);s<=32||s>=127&&s<=159||(t+=r)}if(!t)return!1;const a=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(t);return a?["http","https","mailto","tel"].includes(a[1].toLowerCase()):!0}function Qi(e,t,a){return a&&a>0?e("nav.badgeLabel",{label:t,count:a,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function s2(e){const{t}=xe.useTranslation(),{activeKey:a,unreadCount:r,onDebug:s,onNotification:l,onSetting:i,onHelp:u,onFeedback:c,onAccount:d}=e||{},h="default";return s||l||i||u||c||d?n.jsxs("div",{className:"side-nav__footer",children:[s&&n.jsx(Ce,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:s,selected:a==="debug"}),l&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(Ce,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bell",ariaLabel:Qi(t,t("nav.notifications","\uC54C\uB9BC"),r),onClick:l,selected:a==="notifications"}),!!r&&r>0&&n.jsx(Dn,{number:Math.min(r,99),size:24,"aria-hidden":!0})]}),i&&n.jsx(Ce,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"settings",ariaLabel:t("nav.settings","\uC124\uC815"),onClick:i,selected:a==="settings"}),u&&n.jsx(Ce,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"message-circle-question-mark",ariaLabel:t("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:u,selected:a==="help"}),c&&n.jsx(Ce,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bug",ariaLabel:t("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:c,selected:a==="feedback"}),d&&n.jsx(Ce,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:d,selected:a==="account"})]}):null}function eu(e){const{t}=xe.useTranslation(),{item:a,itemKey:r,label:s,icon:l,active:i,onClick:u,style:c,state:d,labelStyle:h}=e||{},p=a?.key??r??"",C=a?.label??s??"",g=a?.icon??l??"",_=a?.badge??0,m=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(rt,{icon:g,label:typeof C=="string"?C:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),f=d==="disabled",v=`side-nav__item ${i?"active":""} ${d||""} ${f?"disabled":""} ${a?.child?"side-nav__item--child":""}`,b=o.useCallback(w=>{if(f)return;const y=w.detail>0;if(y)try{w.currentTarget.blur()}catch{}u?.(p,w.currentTarget,y)},[f,p,u]);return n.jsxs("button",{type:"button",className:v,onClick:b,"aria-label":typeof C=="string"?Qi(t,C,_):void 0,"aria-current":i?"page":void 0,style:c,"aria-disabled":f,children:[m,n.jsx("span",{className:"side-nav__label button-1 f",style:h,children:C}),_>0&&n.jsx(Dn,{position:"inline",number:Math.min(_,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 tu(e){const{t}=xe.useTranslation(),{items:a=[],activeKey:r,onChange:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:C,onAppModeChange:g,scrollContainer:_}=e||{},m=C==="manager",f=o.useCallback(()=>g?.(m?"malgwi":"manager"),[g,m]),v=o.useRef(null),[b,w]=o.useState(null);o.useEffect(()=>{const A=v.current;if(!A)return;let D=null;const E=()=>{const{scrollHeight:$,clientHeight:G,scrollTop:T}=A;if($<=G+1){w(F=>F===null?F:null);return}const P=Math.max(24,G/$*G),M=G-P,ee=$-G,Q={top:Math.round(T/ee*M),height:Math.round(P)};w(F=>F&&F.top===Q.top&&F.height===Q.height?F:Q)},k=()=>{if(typeof requestAnimationFrame>"u"){E();return}D===null&&(D=requestAnimationFrame(()=>{D=null,E()}))};E(),A.addEventListener("scroll",k,{passive:!0});const R=typeof ResizeObserver<"u"?new ResizeObserver(k):null;R?.observe(A);for(const $ of Array.from(A.children))R?.observe($);return()=>{D!==null&&cancelAnimationFrame(D),A.removeEventListener("scroll",k),R?.disconnect()}},[a]);const y=o.useRef(null),B=o.useCallback(A=>{const D=v.current;D&&(A.preventDefault(),y.current={y:A.clientY,top:D.scrollTop},A.currentTarget.setPointerCapture(A.pointerId))},[]),x=o.useCallback(A=>{const D=v.current,E=y.current;!D||!E||(D.scrollTop=E.top+(A.clientY-E.y)*(D.scrollHeight/D.clientHeight))},[]),N=o.useCallback(A=>{y.current=null,A.currentTarget.hasPointerCapture(A.pointerId)&&A.currentTarget.releasePointerCapture(A.pointerId)},[]);return n.jsxs("nav",{ref:v,"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[b&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:b.top,height:b.height},onPointerDown:B,onPointerMove:x,onPointerUp:N,onPointerCancel:N})}),n.jsxs("div",{className:"side-nav__menu-list",children:[(a||[]).filter(A=>!A.section&&(A.key||A.label)).map((A,D)=>n.jsxs(o.Fragment,{children:[A.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(eu,{item:A,active:!!A.key&&A.key===r,state:A.disabled?"disabled":void 0,onClick:(E,k,R)=>{if(A.disabled)return;if(A.href){if(Ji(A.href)&&window.open(A.href,"_blank","noopener,noreferrer"),R)try{k?.blur()}catch{}return}if(s?.(A.key),jo(_,"SideNav"),!R)return;try{k?.blur()}catch{}if(typeof window<"u"&&window.matchMedia){if(!window.matchMedia("(min-width: 768px) and (max-width: 1023px)").matches)return}else return;const $=document.querySelector(".header");if($){const G=typeof $.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&G&&$.matches(":hover"))){$.classList.add("header--force-collapsed");const T=()=>{$.classList.remove("header--force-collapsed"),$.removeEventListener("mouseenter",T)};$.addEventListener("mouseenter",T)}}}})]},A.key??`side-nav__item-${D}`)),g&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),g&&n.jsx(eu,{item:{key:"__mode-switch__",label:m?t("nav.goToMalgwi","\uB9D0\uADC0\uB85C \uC774\uB3D9"):t("nav.goToManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9"),icon:m?"arrow-left":"arrow-right"},onClick:f})]}),n.jsx(s2,{activeKey:r,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p})]})}var vr='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>',Mo='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>',l2='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 nu({appMode:e}){const{t}=xe.useTranslation(),a=e==="manager",r=a?Mo:vr,s=l2;return n.jsxs("div",{className:"brand-identity__root","aria-label":t("header.biArea","BI \uC601\uC5ED"),children:[n.jsx("img",{src:s,alt:t("header.biSymbol","BI \uC2EC\uBCFC"),className:"brand-identity__image brand-identity__image--symbol"}),n.jsx("img",{src:r,alt:a?t("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):t("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0"),className:"brand-identity__image brand-identity__image--logo"})]})}function au({activeKey:e,onChange:t,items:a,malgwiItems:r,managerItems:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:C,onAppModeChange:g,scrollContainer:_}){const{t:m}=xe.useTranslation(),f=yn("(max-width: 767px)"),v=o.useMemo(()=>(a??[]).filter($=>!$.section&&($.key||$.label)).map($=>({key:$.key,label:typeof $.label=="string"?$.label:void 0,icon:$.icon,state:$.disabled?"disabled":void 0,badgeCount:$.badge})),[a]),b=o.useCallback($=>{const G=a?.find(T=>T.key===$);if(!G?.disabled){if(G?.href){Ji(G.href)&&window.open(G.href,"_blank","noopener,noreferrer");return}t?.($)}},[a,t]),w=o.useMemo(()=>{const $=[];return i&&$.push({key:"debug",icon:"terminal",label:m("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),u&&$.push({key:"notifications",icon:"bell",label:m("nav.notifications","\uC54C\uB9BC"),badgeCount:l,onClick:u}),d&&$.push({key:"settings",icon:"settings",label:m("nav.settings","\uC124\uC815"),onClick:d}),h&&$.push({key:"help",icon:"message-circle-question-mark",label:m("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:h}),p&&$.push({key:"feedback",icon:"bug",label:m("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:p}),c&&$.push({key:"account",icon:"user-round",label:m("nav.account","\uACC4\uC815"),onClick:c}),$},[m,i,u,d,h,p,c,l]),y=o.useCallback(($,G)=>({position:"fixed",top:$.bottom+8,right:Math.max(8,window.innerWidth-$.right),zIndex:Wa(G)}),[]),B=o.useId(),{open:x,toggle:N,close:A,style:D,triggerRef:E,menuRef:k}=Ha({computeStyle:y,onScroll:"ignore",onResize:"reposition"}),R=o.useMemo(()=>[{items:w.map($=>({label:$.label,icon:$.icon,badgeCount:$.badgeCount,selected:$.selected??(!!$.key&&$.key===e),closeOnSelect:!0,onClick:()=>{$.onClick?.(),A()}}))}],[w,e,A]);return n.jsxs("aside",{className:`header${C==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(nu,{appMode:C}),n.jsxs("div",{className:"header__menu-button",ref:E,children:[n.jsx(Ce,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:u&&l&&l>0?m("nav.badgeInsideLabel",{label:m("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:l,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):m("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:N,"aria-expanded":x,"aria-controls":x?B:void 0}),!!u&&!!l&&l>0&&n.jsx(Dn,{number:Math.min(l,99),size:24,"aria-hidden":!0}),x&&dn.createPortal(n.jsx("div",{id:B,role:"group","aria-label":m("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:le("tooltip__content"),style:D,ref:k,children:n.jsx(Va,{columns:R,onClose:A})}),document.body)]})]}),n.jsx(tu,{scrollContainer:_,items:a,activeKey:e??void 0,onChange:t,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:C,onAppModeChange:g}),f&&n.jsx(Xi,{items:v,activeKey:e??void 0,onChange:b,scrollContainer:_,appMode:C,onAppModeChange:g})]})}const i2=au;function un(e){const{type:t="dot",size:a,className:r="","aria-label":s,"aria-hidden":l,role:i}=e;(e.icon!==void 0||e.number!==void 0||e.position!==void 0||e.animate!==void 0||e.onClick!==void 0)&&kt("badge-circle-props","[ihab/core] Badge \uAC00 \uC6D0\uD615 \uBC43\uC9C0\uC758 \uD504\uB86D(icon \xB7 number \xB7 position \xB7 animate \xB7 onClick)\uC744 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uC6D0\uD615\uC740 \uC774\uC81C CircleBadge \uAC00 \uADF8\uB9BD\uB2C8\uB2E4 \u2014 Badge \uC758 dot \uB294 \uC791\uC740 \uC54C\uC57D \uC774\uB984\uD45C\uC785\uB2C8\uB2E4. \uADF8 \uC790\uB9AC\uB97C <CircleBadge \u2026/> \uB85C \uBC14\uAFB8\uC138\uC694."),i&&l&&kt("badge-role-with-hidden",`[ihab/core] Badge \uAC00 role="${i}" \uACFC aria-hidden \uC744 \uD568\uAED8 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uC228\uAE34 \uAC83\uC740 \uB0AD\uB3C5\uAE30\uC5D0 \uB07C\uC5B4\uB4E4 \uC218 \uC5C6\uC5B4 \uC544\uBB34\uAC83\uB3C4 \uC548 \uC77D\uD799\uB2C8\uB2E4 \u2014 \uB458 \uC911 \uD558\uB098\uB9CC \uC8FC\uC138\uC694.`);const{label:u,children:c,variant:d="default",fill:h="filled",minWidth:p,iconLeft:C,iconRight:g,color:_}=e,m=t==="bar",f=typeof a=="number"?"medium":a??"medium",v=(m?{small:"caption-2",medium:"body-3",large:"body-2"}:{small:"caption-2b",medium:"body-3b",large:"body-2b"})[f]??(m?"body-2":"body-2b"),b={small:12,medium:14,large:16}[f]??14,w=ke("badge",m?"badge--bar":"",`badge--${d}`,`badge--${f}`,h!=="filled"?`badge--${h}`:"",v,r),y=_?.startsWith("--")?`var(${_})`:_,B=p!==void 0||y?{...p!==void 0?{minWidth:typeof p=="number"?`${p}px`:p}:{},...y?{"--badge-color":y}:{}}:void 0;return n.jsxs("span",{className:w,style:B,"aria-label":l?void 0:s,role:i??(s&&!l?"img":void 0),"aria-hidden":l||void 0,children:[C&&n.jsx(rt,{icon:C,size:b,className:"badge__icon"}),u??c,g&&n.jsx(rt,{icon:g,size:b,className:"badge__icon"})]})}const u2=()=>Gt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function ru(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 ma(`${t.toLocaleString("ko-KR")}\uC6D0`)}return ma(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function c2(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function d2(e){if(e.durationDays&&e.durationDays>0){const l=e.durationDays;return l%365===0?`${l/365}\uB144`:`${l}\uC77C`}const t=(e.code??"").match(/(\d+)(d|y)\b/i);if(t)return t[2].toLowerCase()==="y"?`${t[1]}\uB144`:`${t[1]}\uC77C`;const a=e.name??"",r=a.match(/(\d+\s*(?:년|개월|주|일))\s*(?:이용권)?\s*$/);if(r)return r[1].replace(/\s+/g,"");const s=a.match(/(\d+)\s*-?\s*(day|year)s?\b/i);return s?s[2].toLowerCase()==="year"?`${s[1]}\uB144`:`${s[1]}\uC77C`:a||u2()}function p2(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 ou(e){return{type:e.type??c2(e),plan:d2(e),label:e.label,price:ru(e.price),originalPrice:ru(e.originalPrice),discountLabel:e.discountLabel}}var h2='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>',m2='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>',su='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 na={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},Lo=new WeakMap;function C2(e){if(e)return Lo.get(e)}function $n(e,t){e&&(e.style.setProperty(na.text,t.text),e.style.setProperty(na.sub,t.sub),t.copyrightColor&&e.style.setProperty(na.copyright,t.copyrightColor),Lo.set(e,t))}function Rn(e){e&&(e.style.removeProperty(na.text),e.style.removeProperty(na.sub),e.style.removeProperty(na.copyright),Lo.delete(e))}const lu={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function iu(e={}){const t=Tt(lu,$n,Rn);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("${su}")`}})]})}const uu="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",ba=240;var qa='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 f2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},b2=100,g2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function cu(e={}){const t=Tt(f2,$n,Rn),a="var(--color-main)",r=270,s=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:g2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*b2/ba}) translate(${-ba/2} ${-ba/2})`,opacity:i,children:n.jsx("path",{d:uu,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("${qa}")`}})]})}const y2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},v2=100,_2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function x2(e={}){const t=Tt(y2,$n,Rn),a="#ffffff",r=270,s=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move-v1","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move-v1__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:_2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*v2/ba}) translate(${-ba/2} ${-ba/2})`,opacity:i,children:n.jsx("path",{d:uu,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("${su}")`}})]})}const w2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function B2(e={}){const t=Tt(w2,$n,Rn);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("${qa}")`}})]})}const A2={Logo_SpeechEar_ko:{"":vr,_mono:h2},Logo_SpeechEarManager_ko:{"":Mo,_mono:m2}};function k2(e,t){if(e)return A2[e]?.[t??""]??void 0}const N2={speechear:vr,manager:Mo},E2={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},du=10;function D2(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 pu(e,t){if(e<=0)return t("passCard.remainingSecond",{n:0});const a=Math.floor(e/86400);if(a>0)return t("passCard.remainingDay",{n:a});const r=Math.floor(e/3600);if(r>0)return t("passCard.remainingHour",{n:r});const s=Math.floor(e/60);return s>0?t("passCard.remainingMinute",{n:s}):t("passCard.remainingSecond",{n:Math.floor(e)})}function S2(e,t,a){if(e==="manager"){const r=/년/.test(t)||/yr|year/i.test(t)||/1년|365/.test(t),s=a==="\uC624\uD508\uD2B9\uAC00"||a===Gt.t("passCard.specialLabel");return r?n.jsx(B2,{}):s?n.jsx(x2,{}):n.jsx(cu,{})}return n.jsx(iu,{})}function hu({ariaLabel:e,product:t,showPrice:a=!1,plan:r,type:s,endDate:l,remainingSeconds:i,endInclusive:u=!1,state:c="active",bg:d,bgOnly:h=!1,textColor:p,subColor:C,copyrightColor:g,logoSrc:_,label:m,price:f,originalPrice:v,discountLabel:b,onUse:w,onRefund:y,onDelete:B}){const{t:x}=xe.useTranslation(),N=t?ou(t):void 0,A=s??N?.type??"speechear",D=r??N?.plan??x("passCard.planSuffix","\uC774\uC6A9\uAD8C"),E=m??N?.label,k=f??(a?N?.price:void 0),R=v??(a?N?.originalPrice:void 0),$=b??N?.discountLabel,G=o.useMemo(()=>{if(k)return null;const H=t?.durationDays??p2(t?.code);if(!H||H<=0)return i!=null?{percent:null,remainingLabel:pu(i,x)}:null;const W=H*86400;let ue;if(i!=null)ue=i;else if((c==="active"||c==="expired")&&l){const he=new Date(l).getTime();if(Number.isNaN(he))return null;const Ne=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(l)),Re=/^(\d{4})-(\d{2})-(\d{2})/.exec(Ia()),Me=Math.round(Ne&&Re?(Date.UTC(+Ne[1],+Ne[2]-1,+Ne[3])-Date.UTC(+Re[1],+Re[2]-1,+Re[3]))/864e5:(he-Date.now())/864e5);ue=Math.max(0,u?Me+1:Me)*86400}else c==="expired"?ue=0:ue=W;const Be=D2(ue),ye=Math.max(0,Math.min(100,Math.floor(Math.min(Be,W)/W*100)));return c==="pending"&&ye>=100?null:{percent:ye,remainingLabel:c==="expired"?x("passCard.expired","\uB9CC\uB8CC\uB428"):pu(ue,x)}},[k,c,l,i,u,t?.durationDays,t?.code,x]),T=o.useRef(null),[P,M]=o.useState({}),[ee,Q]=o.useState(null),F=!!(w||y||B),Z=o.useRef(!1),L=o.useRef(void 0),[V,U]=o.useState(_);o.useLayoutEffect(()=>{U(_)},[_]),o.useLayoutEffect(()=>{const H=T.current;H&&(p!==void 0&&H.style.setProperty("--pass-card-text",p),C!==void 0&&H.style.setProperty("--pass-card-sub",C),g!==void 0&&H.style.setProperty("--pass-card-copyright",g))},[p,C,g]),o.useLayoutEffect(()=>{const H=T.current;if(!H)return;const W=C2(H);if(!_){const ue=E2[A],Be=c==="expired"?"_mono":W?.logoColor??"",ye=k2(ue,Be);U(ye)}},[d,_,A,c]);const q=H=>{const W=T.current;if(!W)return null;const{left:ue,top:Be,width:ye,height:he}=W.getBoundingClientRect(),Ne=(H.clientX-ue)/ye-.5;return{rotateX:-((H.clientY-Be)/he-.5)*du,rotateY:Ne*du}},j=(H,W)=>{const ue=W*-.7,Be=H*.7+10,ye=20+(Math.abs(H)+Math.abs(W))*.4;return`${ue}px ${Be}px ${ye}px rgba(0, 0, 0, 0.18)`},I=o.useCallback(H=>{if(ea())return;Z.current=!0,clearTimeout(L.current),L.current=setTimeout(()=>{Z.current=!1},200);const W=q(H);W&&M({transform:`perspective(800px) rotateX(${W.rotateX}deg) rotateY(${W.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:j(W.rotateX,W.rotateY),transition:"transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.25s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),O=o.useCallback(H=>{if(ea())return;const W=q(H);if(!W)return;const ue=Z.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";M({transform:`perspective(800px) rotateX(${W.rotateX}deg) rotateY(${W.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:j(W.rotateX,W.rotateY),transition:ue})},[]),Y=o.useCallback(()=>{clearTimeout(L.current),Z.current=!1,M({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)"})},[]),K=o.useCallback(()=>Q(null),[]),ie=o.useMemo(()=>{const H=x("passCard.planSuffix","\uC774\uC6A9\uAD8C"),W=D.replace("\uC774\uC6A9\uAD8C","").replace(H==="\uC774\uC6A9\uAD8C"?"":H,"").trim(),ue=W.match(/^(.*?)(일|년)$/);return ue?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:ue[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:ue[2]==="\uB144"?x("passCard.unitYear","\uB144"):x("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:W})},[D,x]),te=o.useMemo(()=>{const H=ma(k);if(!H)return null;const W=H.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!W)return n.jsx("span",{className:"h1",children:H});const[,ue,Be,ye]=W;return n.jsxs(n.Fragment,{children:[ue&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:ue}),n.jsx("span",{className:"h1 pass-card__price-amount",children:Be}),ye.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:ye.trim()})]})},[k]),ne=o.useCallback(()=>{F&&Q(H=>{if(H)return null;const W=T.current?.getBoundingClientRect();if(!W)return null;const ue=50;return{left:W.left,right:W.right,width:W.width,height:W.height,x:W.x,y:W.y+ue,top:W.top+ue,bottom:W.bottom+ue}})},[F]),z=o.useCallback(H=>{F&&(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),ne())},[F,ne]),ae=[{items:[...w?[{label:x("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{w(),Q(null)},closeOnSelect:!0}]:[],...y?[{label:x("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{y(),Q(null)},closeOnSelect:!0}]:[],...B?[{label:x("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:T,className:`pass-card pass-card--${c}${F?" pass-card--clickable":""}`,style:P,onMouseEnter:I,onMouseMove:O,onMouseLeave:Y,onPointerUp:H=>{H.pointerType==="touch"&&Y()},onPointerCancel:H=>{H.pointerType==="touch"&&Y()},onClick:ne,onKeyDown:F?z:void 0,role:F?"button":void 0,tabIndex:F?0:void 0,"aria-label":e,"aria-haspopup":F?"menu":void 0,"aria-expanded":F?!!ee:void 0,children:[d??S2(A,D,E),!h&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card__top",children:n.jsxs("div",{className:"pass-card__top-left",children:[n.jsx("img",{src:V??N2[A],className:"pass-card__logo",alt:A==="manager"?x("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):x("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),n.jsxs("div",{className:"pass-card__plan",children:[n.jsx("div",{children:ie}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:E?x("passCard.labeledPlan",{label:E}):x("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),k?n.jsxs("div",{className:"pass-card__price-area",children:[$&&n.jsx("span",{className:"pass-card__discount body-3",children:$}),n.jsxs("div",{className:"pass-card__price",children:[R&&n.jsx("span",{className:"pass-card__price-original body-3",children:ma(R)}),te]})]}):G?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:G.remainingLabel}),G.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:G.percent}),n.jsx("span",{className:"h5b pass-card__usage-symbol",children:"%"})]})]}):n.jsx("div",{className:"pass-card__copyright caption-2","aria-hidden":"true",children:"\xA9 IHAB Corp. All rights reserved."})]})]})}),ee&&n.jsx(Bn,{anchorRect:ee,onClose:K,ariaLabel:x("tooltip.menu","\uBA54\uB274"),children:n.jsx(Va,{columns:ae,onClose:K,size:"small"})})]})}const j2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function T2(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,a=Tt(j2,$n,Rn);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("${qa}")`}})]})}const M2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function L2(e={}){const t=Tt(M2,$n,Rn);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("${qa}")`}})]})}function $2(e,t){if(e){if(t==="manager_pro")return n.jsx(L2,{});if(t==="manager_standard")return n.jsx(T2,{});if(t==="manager_lite")return n.jsx(cu,{})}}function R2(e){const t=ma(e);if(!t)return null;const a=t.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!a)return t;const[,r,s,l]=a;return n.jsxs(n.Fragment,{children:[r&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:r}),s,l.trim()&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:l.trim()})]})}function P2(e){const{t}=xe.useTranslation(),a=t("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),r=t("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:s,onSelect:l,period:i="monthly",ownedCodes:u}=e||{},c=y=>!!y&&!!u?.includes(y),d=y=>y.onceOnly??/오픈\s*특가/.test(y.label??""),h=(s.tiers||[]).some(y=>d(y)&&c(y.code)),p=y=>{const B=y.prices?y.prices[i]:y.price;return B?(s.tiers||[]).some(x=>!!x.badge&&x.originals?.[i]===B):!1},C=s.colorToken?`var(--color-${s.colorToken})`:"var(--color-gray)",g=t("payment.plan.freePrice","\uBB34\uB8CC"),_=t("payment.products.mgrEnterprise.tier.price","\uBB38\uC758"),m=y=>y.prices?y.prices[i]:y.price,f=(s.tiers||[]).length>0&&(s.tiers||[]).every(y=>{const B=m(y);return B==="\uBB34\uB8CC"||B===g||B==="0\uC6D0"||typeof B=="string"&&/\d/.test(B)&&!/[1-9]/.test(B)}),v=(s.tiers||[]).length>0&&(s.tiers||[]).every(y=>{const B=m(y);return B==="\uBB38\uC758"||B===_}),b=s.group==="org",w=b?"manager":"speechear";return n.jsxs("div",{className:"payment-plan__card",style:{borderColor:C,"--plan-color":C},children:[s.cardBadge&&n.jsx("div",{className:"payment-plan__card-badge",children:n.jsx(un,{label:s.cardBadge,variant:"main",size:"medium",fill:"soft"})}),n.jsxs("div",{className:"payment-plan__title",children:[n.jsx("p",{className:"payment-plan__quote body-3b",style:{color:C},children:s.quote||"\xA0"}),n.jsx("h3",{className:"payment-plan__title-heading h1",children:s.tier??s.title}),n.jsx("p",{className:"payment-plan__subtitle body-3",children:s.subtitle})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.recommendedFor","\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(s.recommendedFor||[]).map((y,B)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(rt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:C}}),y]},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:(s.features||[]).map((y,B)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(rt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:C}}),y]},B))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:f?null:v?n.jsx(Ce,{htmlType:"button",className:"payment-plan__contact-button",label:t("payment.plan.contact",{defaultValue:"\uBB38\uC758\uD558\uAE30"}),variant:"main",size:56,onClick:()=>s.tiers?.[0]&&l?.({...s.tiers[0],productId:s.id,productTitle:s.title})}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"payment-plan__pricing-list",children:(s.tiers||[]).map(y=>{const B=y.label||a,x=d(y),N=x||y.openPromo===!0,A=B.replace(/^오픈\s*특가\s*/,"")||a,D=y.prices?y.prices[i]:y.price,E=y.badge?N?`${r}
823
- ${y.badge}`:y.badge:void 0;if(x&&c(y.code))return null;if(!y.badge&&!h)return p(y)?null:n.jsxs("div",{className:`payment-plan__pricing-row payment-plan__pricing-row--static${y.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:y.label})}),n.jsx("div",{className:"payment-plan__pricing-row-price",children:n.jsx("span",{className:"payment-plan__pricing-current h1",children:R2(D)})})]},y.id);const k=s.tier??(b?s.title:void 0),R=n.jsx(hu,{showPrice:!0,product:{type:w,code:y.code,name:A,label:k,price:D,originalPrice:y.originals?.[i]??void 0,discountLabel:E},bg:$2(b,s.id)}),$=()=>l?.({...y,productId:s.id,productTitle:s.title,preview:R});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:$,onKeyDown:l?G=>{G.target===G.currentTarget&&(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),$())}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:R},y.id)})})})})]})}function I2({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 $o='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 mu={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#c9c9c9"};function F2(){const e=Tt(mu,$n,Rn);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("${$o}")`}})})}const Cu={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function O2(e={}){const t=Tt(Cu,$n,Rn);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("${qa}")`}})]})}function fu({keys:e,anchor:t="top-right",scale:a,className:r=""}){const s=Array.isArray(e)?e:[e];return n.jsx("span",{className:ke("shortcut-badge",`shortcut-badge--${t}`,r),style:a===void 0?void 0:{"--shortcut-badge-scale":String(a)},children:s.map((l,i)=>n.jsxs("span",{className:"shortcut-badge__group",children:[i>0&&n.jsx("span",{className:"shortcut-badge__plus",children:"+"}),n.jsx("kbd",{className:"shortcut-badge__key",children:l})]},`${l}-${i}`))})}const Ua=(e,t,a)=>e+(t-e)*a;function z2({speakers:e,size:t=300,viewT:a=0,activeSpeakerId:r=null,playedIds:s,selectedId:l=null,answerId:i=null,showFeedback:u=!1,pulseSelected:c=!1,pulseSelectedDuration:d,pulseScale:h,clickable:p=!1,onSelectSpeaker:C,buttonSize:g=40,showIcon:_=!0,onCenterClick:m,centerLabel:f,centerDisabled:v=!1,centerAttention:b=!1,shortcutAnchor:w="top-right",shortcutScale:y,scaleShortcut:B=!1}){const{t:x}=xe.useTranslation(),N=Math.max(0,Math.min(1,a)),A=t/2,D=110/300,E=.18,k=H=>t*(D+(H-1)*E),R=H=>{const W=k(H.row??1),ue=H.angleDeg*Math.PI/180;return{x:A+W*Math.cos(ue),y:A+W*Math.sin(ue)}},$=Math.max(...e.map(H=>H.row??1),1),G=t*.08,T=t*.1,P=t*.24,M=t-2*G,ee=t-T-P,Q=t-P/2,F=o.useMemo(()=>[...new Set(e.map(H=>H.deg))].sort((H,W)=>H-W),[e]),Z=F.length,L=Math.max(68,Z>1?M/(Z-1):0),V=o.useMemo(()=>new Map(F.map((H,W)=>[H,W])),[F]),U=H=>{const W=V.get(H.deg)??0,ue=A+(W-(Z-1)/2)*L,Be=$>1?Math.min(68,ee/($-1)):0,ye=Be*($-1),he=T+(ee-ye)/2,Ne=$===1?T+ee*.4:he+($-(H.row??1))*Be;return{x:ue,y:Ne}},q=H=>{const W=R(H),ue=U(H);return{x:Ua(W.x,ue.x,N),y:Ua(W.y,ue.y,N)}},j={x:A,y:Ua(A,Q,N)},I=Math.round(g*1.2),O=Math.round(Math.max(16,Math.min(80,g*.7))),Y=[],K=new Map;for(const H of e){const W=H.row??1;K.has(W)||K.set(W,[]),K.get(W).push(H)}for(const[H,W]of K.entries()){if(W.length<2)continue;const ue=[...W].sort((Ve,ct)=>Ve.deg-ct.deg),Be=ue.map(Ve=>q(Ve)),ye=ue.map(Ve=>Ve.deg),he=ye[ye.length-1]-ye[0],Ne=he/(ye.length-1),Re=360-he,Me=ue.length>=3&&Ne>0&&Re<=Ne*1.5,se=Math.round(k(H)*1e3)/1e3,Ee=(Ve,ct,ot,Xe)=>{const ft=(ct.angleDeg-Ve.angleDeg+540)%360-180;if(ft===0)return`L ${Xe.x} ${Xe.y}`;if(N===0)return`A ${se} ${se} 0 0 ${ft>0?1:0} ${Xe.x} ${Xe.y}`;const Le=(Ve.angleDeg+ft/2)*Math.PI/180,qe={x:A+se*Math.cos(Le),y:A+se*Math.sin(Le)},Se={x:(ot.x+Xe.x)/2,y:(ot.y+Xe.y)/2},He={x:Ua(qe.x,Se.x,N),y:Ua(qe.y,Se.y,N)},Qe={x:2*He.x-Se.x,y:2*He.y-Se.y};return`Q ${Qe.x} ${Qe.y} ${Xe.x} ${Xe.y}`},$e=Me?[...ue,ue[0]]:ue,Ae=Me?[...Be,Be[0]]:Be;let Fe=`M ${Ae[0].x} ${Ae[0].y}`;for(let Ve=1;Ve<Ae.length;Ve++)Fe+=" "+Ee($e[Ve-1],$e[Ve],Ae[Ve-1],Ae[Ve]);Y.push({key:`arc-${H}`,d:Fe})}const ie=o.useMemo(()=>new Set(s??[]),[s]),te=H=>({idle:"",active:x("soundCompass.state.active","\uC18C\uB9AC \uB098\uB294 \uC911"),played:x("soundCompass.state.played","\uB4E4\uC74C"),correct:x("soundCompass.state.correct","\uC815\uB2F5"),wrong:x("soundCompass.state.wrong","\uC624\uB2F5")})[H],ne=H=>{if(r===H.id)return"active";if(u){if(H.id===i)return"correct";if(H.id===l&&l!==i)return"wrong"}return ie.has(H.id)?"played":"idle"},z=H=>r===H.id?"loop":u?H.id===i?"loop":null:c&&H.id===l?"once":null,ae=(H,W)=>{switch(H){case"played":case"correct":return n.jsx(Ws,{size:W});case"wrong":return n.jsx(Js,{size:W});default:return n.jsx(Xs,{size:W})}};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:[N===0&&e.map(H=>{const{x:W,y:ue}=q(H);return n.jsx("line",{x1:j.x,y1:j.y,x2:W,y2:ue,stroke:"#dde3ec",strokeWidth:"1"},H.id)}),Y.map(H=>n.jsx("path",{d:H.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},H.key))]}),b&&!v&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:I,height:I,left:j.x-I/2,top:j.y-I/2}}),m?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${v?" sound-compass__center--disabled":""}`,style:{width:I,height:I,left:j.x,top:j.y},"aria-label":f,"aria-disabled":v||void 0,tabIndex:v?-1:0,onClick:v?void 0:m,children:n.jsx(Hr,{size:O,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:I,height:I,left:j.x,top:j.y},children:n.jsx(Hr,{size:O,color:"currentColor",strokeWidth:1.5})}),e.map((H,W)=>{const{x:ue,y:Be}=q(H),ye=ne(H),he=z(H),Ne={...y!==void 0||B?{"--shortcut-badge-scale":String(y??Math.max(.75,Math.min(3,g/56)))}:null,pointerEvents:p?"auto":"none",cursor:p?"pointer":"default",zIndex:ye!=="idle"?10:1},Re=g,Me=Math.round(Math.max(10,Math.min(56,Re*.38))),se=Math.round(Math.max(7,Math.min(18,Re*.2))),Ee=Math.round(Math.max(10,Math.min(56,Re*.4))),$e=_==="answered"&&(ye==="played"||ye==="correct"||ye==="wrong"),Ae=_===!0||$e,Fe=!$e;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...Ne,left:ue-Re/2,top:Be-Re/2},children:[he&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${ye}`+(he==="once"?" sound-compass__pulse--once":""),style:{width:Re,height:Re,...he==="once"&&d!==void 0?{"--sc-pulse-duration-once":`${d}ms`}:null,...h!==void 0?{"--sc-pulse-scale":String(h)}:null}}),n.jsxs("button",{type:"button",tabIndex:p?0:-1,"aria-disabled":p?void 0:!0,onClick:p?()=>C?.(H.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${ye}`,style:{width:Re,height:Re},"aria-label":te(ye)?`${H.label}, ${te(ye)}`:H.label,"aria-pressed":l!=null?H.id===l:void 0,children:[Ae&&ae(ye,Me),Fe&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:_===!0?se:Ee},children:W+1})]}),H.shortcut&&n.jsx(fu,{keys:H.shortcut,anchor:w,className:"sound-compass__speaker-shortcut"})]},H.id)})]})})}function W2({orientation:e="horizontal",label:t,className:a=""}){const r=ke("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 bu({checked:e,onChange:t,name:a,value:r,disabled:s=!1,label:l,className:i=""}){const u=o.useId();return n.jsxs("label",{className:`radio${s?" radio--disabled":""} ${i}`.trim(),htmlFor:u,children:[n.jsx("input",{id:u,type:"radio",name:a,value:r,checked:e,disabled:s,onChange:c=>t?.(c.target.checked)}),n.jsx("span",{className:"radio__dot"}),l&&n.jsx("span",{className:"radio__label body-2",children:l})]})}function H2({options:e,value:t,onChange:a,name:r,disabled:s=!1,direction:l="vertical",className:i="",ariaLabel:u}){const c=o.useId(),d=r??`radio-group-${c}`;return n.jsx("div",{className:`radio-group radio-group--${l} ${i}`.trim(),role:"radiogroup","aria-label":u,children:e.map(h=>n.jsx(bu,{name:d,value:h.value,checked:t===h.value,disabled:s||h.disabled,label:h.label,onChange:p=>{p&&a?.(h.value)}},h.value))})}const V2={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function q2({tone:e="info",title:t,message:a,children:r,dismissible:s=!1,onDismiss:l,live:i,className:u=""}){const{t:c}=xe.useTranslation(),[d,h]=o.useState(!1),p=o.useRef(null),C=o.useCallback(()=>{const b=p.current;b&&b.contains(document.activeElement)&&mr(b),h(!0),l?.()},[l]);if(d)return null;const g=ke("alert",`alert--${e}`,u),_=i??(e==="danger"||e==="warning"?"assertive":"polite"),m=_==="assertive"?"alert":_==="polite"?"status":void 0,f=!!t,v=!!(a||r);return n.jsxs("div",{ref:p,className:g,role:m,children:[n.jsxs("div",{className:"alert__body",children:[n.jsxs("div",{className:"alert__header",children:[n.jsx(rt,{icon:V2[e],size:20,className:"alert__icon"}),f&&n.jsx("span",{className:"alert__title body-2",children:t}),!f&&v&&n.jsx("div",{className:"alert__message body-3",children:a||r})]}),f&&v&&n.jsx("div",{className:"alert__message alert__message--indented body-3",children:a||r})]}),s&&n.jsx("button",{type:"button",className:"alert__dismiss",onClick:C,"aria-label":c("common.close","\uB2EB\uAE30"),children:"\xD7"})]})}const U2={ready:"search",guide:"info",error:"circle-alert"};function G2(e,t){const a=t.filter(Boolean);if(a.length===0)return e;const r=[];let s=0,l=0;for(const i of a){const u=e.indexOf(i,s);u<0||(u>s&&r.push(e.slice(s,u)),r.push(n.jsx("strong",{className:"search-summary__em body-2",children:i},l++)),s=u+i.length)}return s<e.length&&r.push(e.slice(s)),r}function K2({status:e="guide",label:t,children:a,emphasis:r,icon:s,className:l=""}){const i=s===!1?null:s??U2[e],u=ke("search-summary",`search-summary--${e}`,l),c=t??a,d=typeof c=="string"&&r&&r.length>0?G2(c,r):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[i!=null&&n.jsx(rt,{icon:i,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:d})]})}function Ga({title:e,items:t}){const{t:a}=xe.useTranslation(),{anchorRect:r,openAt:s,close:l}=za(),i=o.useRef(null),u=fr(!!r,(c,d)=>{c&&d?s(i.current?.querySelector("button")??d):l()},i);return n.jsxs("span",{ref:i,style:{display:"contents"},children:[n.jsx(Ce,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!r,ariaLabel:a("common.info","\uC124\uBA85"),onPointerEnter:c=>{Un(c)||s(c.currentTarget)},onPointerLeave:c=>{Un(c)||l()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{ea()||s(c.currentTarget)},onBlur:l}),r&&n.jsx(qn,{title:e,items:t,showIndex:t.length>1,anchorRect:r,onClose:l})]})}function Y2({items:e=[],value:t,onChange:a,className:r="",size:s=40}){const l=o.useId(),{t:i}=xe.useTranslation(),u=o.useRef(null),c=e.find(m=>!m.disabled)?.key,d=e.some(m=>m.key===t)?t:c??e[0]?.key,h=e.find(m=>m.key===d&&!m.disabled)?.key??c,p=()=>Array.from(u.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),C=(m,f=p())=>{if(f.length===0)return;const v=(m%f.length+f.length)%f.length;f[v]?.focus(),f[v]?.click()},g=m=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(m.key))return;m.preventDefault();const f=p(),v=f.indexOf(m.currentTarget);m.key==="ArrowRight"||m.key==="ArrowDown"?C(v+1,f):m.key==="ArrowLeft"||m.key==="ArrowUp"?C(v-1,f):m.key==="Home"?C(0,f):C(f.length-1,f)},_=e.find(m=>m.key===d);return n.jsxs("div",{className:`tabs ${r}`.trim(),children:[n.jsx("div",{ref:u,className:`tabs__list tabs__list--${s}`,role:"tablist","aria-label":i("tabs.ariaLabel","\uD0ED"),children:e.map(m=>n.jsx("button",{id:`tabs__tab-${l}-${m.key}`,type:"button",role:"tab","aria-selected":m.key===d,"aria-controls":`tabs__panel-${l}-${m.key}`,disabled:m.disabled,tabIndex:m.key===h?0:-1,className:`tabs__tab body-2${m.key===d?" tabs__tab--active":""}`,onClick:()=>{m.key!==t&&a?.(m.key)},onKeyDown:g,children:m.label},m.key))}),_&&n.jsx("div",{id:`tabs__panel-${l}-${_.key}`,role:"tabpanel","aria-labelledby":`tabs__tab-${l}-${_.key}`,tabIndex:0,className:"tabs__panel",children:_.panel},_.key)]})}const Z2={xs:12,sm:16,md:20,lg:28,xl:36};function X2(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 J2({src:e,name:t,size:a="md",shape:r="circle",className:s=""}){const{t:l}=xe.useTranslation(),[i,u]=o.useState(null),c=!!e&&i===e,d=t?X2(t):"",h=!!e&&!c,p=!h&&!!d,C=t||l("avatar.ariaLabel","\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0");return n.jsxs("span",{className:`avatar avatar--${a} avatar--${r} ${s}`.trim(),role:"img","aria-label":C,children:[h&&n.jsx("img",{className:"avatar__image",src:e,alt:C,onError:()=>u(e??null)}),!h&&p&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:d}),!h&&!p&&n.jsx(rt,{icon:"user-round",size:Z2[a],className:"avatar__icon"})]})}function Q2(e,t){if(!t)return!0;const a=t.split(",").map(l=>l.trim()).filter(Boolean);if(a.length===0)return!0;const r=e.name.toLowerCase(),s=e.type.toLowerCase();return a.some(l=>{const i=l.toLowerCase();return i.startsWith(".")?r.endsWith(i):i.endsWith("/*")?s.startsWith(i.slice(0,-1)):s===i})}function ev({onFilesSelected:e,accept:t,multiple:a=!1,disabled:r=!1,showFileList:s=!0,files:l,onRemove:i,className:u=""}){const{t:c}=xe.useTranslation(),d=o.useRef(null),[h,p]=o.useState(!1),[C,g]=o.useState([]),_=l??C,m=x=>{if(!x||x.length===0)return;const N=Array.from(x).filter(D=>Q2(D,t));if(N.length===0)return;const A=a?N:N.slice(0,1);if(l===void 0){const D=a?[..._,...A]:A;g(D),e?.(D)}else e?.(A)},f=x=>{x.preventDefault(),!r&&p(!0)},v=x=>{x.preventDefault(),p(!1)},b=x=>{x.preventDefault(),p(!1),!r&&m(x.dataTransfer.files)},w=x=>{const N=x.target;try{m(N.files)}finally{N.value=""}},y=()=>{r||d.current?.click()},B=x=>{if(!r&&(i?.(x),l===void 0)){const N=_.filter((A,D)=>D!==x);g(N),i||e?.(N)}};return n.jsxs("div",{className:`file-upload ${u}`.trim(),children:[n.jsxs("div",{className:ke("file-upload__dropzone",h&&"file-upload__dropzone--dragging",r&&"file-upload__dropzone--disabled"),role:"button",tabIndex:r?-1:0,"aria-disabled":r,onClick:y,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),y())},onDragOver:f,onDragLeave:v,onDrop:b,children:[n.jsx(rt,{icon:"upload",size:24,className:"file-upload__icon"}),n.jsx("span",{className:"file-upload__prompt body-2",children:c("fileUpload.dragPrompt","\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC")}),n.jsx("button",{type:"button",className:"file-upload__browse-button body-3",disabled:r,onClick:x=>{x.stopPropagation(),y()},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:w,tabIndex:-1})]}),s&&_.length>0&&n.jsx("ul",{className:"file-upload__list",children:_.map((x,N)=>n.jsxs("li",{className:"file-upload__list-item body-3",children:[n.jsx("span",{className:"file-upload__file-name body-3",children:x.name}),n.jsx("button",{type:"button",className:"file-upload__remove-button","aria-label":c("fileUpload.removeAriaLabel",{name:x.name}),disabled:r,onClick:()=>B(N),children:n.jsx(rt,{icon:"x",size:14})})]},`${x.name}-${N}`))})]})}function tv({items:e,className:t=""}){const{t:a}=xe.useTranslation();return n.jsx("nav",{className:`breadcrumb ${t}`.trim(),"aria-label":a("breadcrumb.ariaLabel","\uC774\uB3D9 \uACBD\uB85C"),children:n.jsx("ol",{className:"breadcrumb__list",children:e.map((r,s)=>{const l=s===e.length-1;return n.jsxs("li",{className:"breadcrumb__item",children:[l?n.jsx("span",{className:"breadcrumb__current body-3","aria-current":"page",children:r.label}):r.href?n.jsx("a",{className:"breadcrumb__link body-3",href:r.href,target:r.target,rel:r.rel??(r.target==="_blank"?"noopener noreferrer":void 0),onClick:r.onClick,children:r.label}):r.onClick?n.jsx("button",{type:"button",className:"breadcrumb__link body-3",onClick:r.onClick,children:r.label}):n.jsx("span",{className:"breadcrumb__text body-3",children:r.label}),!l&&n.jsx(rt,{icon:"chevron-right",size:14,className:"breadcrumb__separator"})]},s)})})})}const nv={small:14,medium:20,large:28};function av({value:e,onChange:t,max:a=5,readOnly:r=!1,size:s="medium",ariaLabel:l,className:i=""}){const{t:u}=xe.useTranslation(),c=r||!t,[d,h]=o.useState(null),p=c?e:Number.isFinite(e)?Math.round(e):0,C=d??p,g=nv[s],_=x=>{x!==e&&t?.(x)},m=x=>{c||_(x)},f=x=>{c||ea()||h(x)},v=o.useRef(null),b=x=>{const N=Math.min(a,Math.max(1,x));_(N),Array.from(v.current?.querySelectorAll("[data-star]")??[]).find(A=>A.dataset.star===String(N))?.focus()},w=x=>{if(!c){switch(x.key){case"ArrowRight":case"ArrowUp":b((p||0)+1);break;case"ArrowLeft":case"ArrowDown":b((p||1)-1);break;case"Home":b(1);break;case"End":b(a);break;default:return}x.preventDefault()}},y=p>=1&&p<=a?Math.round(p):1,B=()=>{c||h(null)};return n.jsx("div",{className:`rating rating--${s}${c?" rating--readOnly":""} ${i}`.trim(),ref:v,onKeyDown:w,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:a}):l??u("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:B,onPointerUp:x=>{x.pointerType==="touch"&&B()},onPointerCancel:x=>{x.pointerType==="touch"&&B()},children:Array.from({length:a},(x,N)=>{const A=N+1,D=Math.max(0,Math.min(1,C-N)),E=D>0&&D<1,k=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(rt,{icon:"star",size:g,className:"rating__star rating__star--empty"}),D>0&&n.jsx("span",{className:`rating__star-fill${E?" rating__star-fill--half":""}`,style:E?{width:`${D*100}%`}:void 0,children:n.jsx(rt,{icon:"star",size:g,className:"rating__star rating__star--filled"})})]});return c?n.jsx("span",{className:"rating__item","aria-hidden":"true",children:k},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===y?0:-1,onClick:()=>m(A),onMouseEnter:()=>f(A),children:k},A)})})}const rv=20,ov=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function sv({value:e,onChange:t,palette:a=ov,size:r=40,className:s="",ariaLabel:l}){const{t:i}=xe.useTranslation();return n.jsx("div",{className:`color-picker ${s}`.trim(),role:"group","aria-label":l,children:a.map(u=>{const c=e?.toLowerCase()===u.toLowerCase();return n.jsx("button",{type:"button",className:`color-picker__swatch color-picker__swatch--${r}`,style:{backgroundColor:u},onClick:()=>t(u),"aria-pressed":c,"aria-label":c?`${u} ${i("colorPicker.selected","\uC120\uD0DD\uB428")}`:u,children:c&&n.jsx(rt,{icon:"check",size:rv,className:"color-picker__check"})},u)})})}function gu({icon:e,label:t,tooltip:a,wrapperStyle:r,color:s,bgColor:l,useHover:i=!0,iconSize:u="medium"}){const{t:c}=xe.useTranslation(),d=u==="small",h=ke("category-icon",d?"category-icon--small":""),p=d?16:20,C=o.useRef(null),[g,_]=o.useState(!1),m=o.useMemo(()=>{const A=r&&typeof r=="object"?{...r}:{};return!s&&!l?A:{...A,...s?{color:s,"--t-item-fg":s}:{},...l?{"--t-item-bg":l}:{}}},[r,s,l]),f=a||t,v=i&&!!f,[b,w]=o.useState(null);o.useLayoutEffect(()=>{g&&w(C.current?.getBoundingClientRect()??null)},[g]),o.useEffect(()=>{if(!i&&g)try{_(!1)}catch{}},[i,g]),o.useEffect(()=>{if(!g)return;const A=D=>{const E=C.current;if(!E)return;const k=D.target;k&&!E.contains(k)&&_(!1)};return document.addEventListener("pointerdown",A,!0),()=>document.removeEventListener("pointerdown",A,!0)},[g]);const y=o.useCallback(()=>{i&&_(!0)},[i]),B=o.useCallback(()=>{i&&_(!1)},[i]),x=o.useCallback(()=>_(!1),[]),N=o.useCallback(A=>{if(A.key==="Escape"){_(!1);return}(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),_(D=>!D))},[]);return n.jsxs("span",{ref:C,className:ke("category-icon__wrap",v&&"category-icon__wrap--interactive"),onPointerEnter:y,onPointerLeave:B,onFocus:y,onBlur:B,onKeyDown:N,role:"button",tabIndex:0,"aria-label":typeof f=="string"?c("common.descriptionFor",{name:f,defaultValue:`${f} \uC124\uBA85`}):void 0,"aria-haspopup":!!f,"aria-expanded":g,"data-tooltip-ignore":!0,children:[n.jsx(rt,{icon:e,label:t,className:h,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:m,size:p}),g&&f&&n.jsx(Mn,{anchorRect:b,text:typeof f=="string"?f:void 0,offset:8,onClose:x,className:"category-icon__tooltip",ariaLabel:typeof f=="string"?f:void 0})]})}let Gn=null;function Ka(e){if(Gn&&Gn!==e)try{Gn()}catch{}return Gn=e,()=>{Gn===e&&(Gn=null)}}function _r(e){if(Gn===e){Gn=null;try{e()}catch{}}}function Ya(e,t){let a=()=>{};const r=new Promise(u=>{a=u});if(typeof e!="string"||e.trim()===""){kt("one-shot-empty-url","[core] playOneShot \uC5D0 \uBE48 \uC8FC\uC18C\uAC00 \uC654\uB2E4 \u2014 \uC548 \uD2BC\uB2E4. \uBD80\uB974\uB294 \uCABD\uC774 \uC8FC\uC18C\uB97C \uC5BB\uAE30 \uC804\uC5D0 \uBD88\uB800\uB2E4.",new Error("playOneShot(empty)").stack),a(!1);try{t?.(!1)}catch{}return{el:{},stop:()=>{},done:r}}let s=!1;const l=u=>{if(!s){s=!0;try{t?.(u)}catch{}a(u)}};let i;try{i=new Audio(e)}catch{return l(!1),{el:{},stop:()=>{},done:r}}i.onended=()=>l(!0),i.onerror=()=>l(!1);try{i.play().catch(()=>l(!1))}catch{l(!1)}return{el:i,stop:()=>{try{i.pause()}catch{}l(!1)},done:r}}function lv(e,t){if(!e)return{previewCodes:[],previewBucket:null};const a=e,r=i=>i.map(u=>u?.contextCode||u?.context_code).filter(Boolean).map(String);if(t==="LISTEN_IN_NOISE"){const i=a.sentences||a.items||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}if(t==="SHORT_STORY"){const i=a.items||a.sentences||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"SHORT_S"}}if(t==="LONG_STORY"){const i=a.items||a.sentences||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LONG"}}if(t==="ORDERING_SENTENCE"){const i=a.sentences||a.items||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}const s=a.sentences||a.items||[],l=r(Array.isArray(s)?s:[]);return l.length===0&&(a.contextCode||a.context_code)&&l.push(String(a.contextCode||a.context_code)),{previewCodes:l,previewBucket:null}}function iv(e,t){const[a,r]=o.useState(!1),[s,l]=o.useState(-1),[i,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),d=o.useRef(!1),h=o.useRef(null),p=o.useRef(null),[C,g]=o.useState(!1),_=o.useRef([]),{previewCodes:m,previewBucket:f}=lv(e,t),v=`${m.join(",")}|${f??""}`,b=o.useMemo(()=>i.key===v?i.urls:[],[i,v]);o.useEffect(()=>{if(!m.length)return;let y=!1;return(async()=>{const B=[],x=[];for(const N of m)try{const A=Al(N,f);if(!A){B.push("");continue}let D=null;try{D=await kl(A)}catch{}if(!D)try{const E=await Nl(A);E&&(D=URL.createObjectURL(E),x.push(D))}catch{}B.push(D??"")}catch{B.push("")}y?x.forEach(N=>{try{URL.revokeObjectURL(N)}catch{}}):(_.current.forEach(N=>{try{URL.revokeObjectURL(N)}catch{}}),_.current=x,u({key:v,urls:B}))})(),()=>{y=!0}},[m.join(","),f]),o.useEffect(()=>()=>{_.current.forEach(y=>{try{URL.revokeObjectURL(y)}catch{}}),_.current=[]},[]);const w=o.useCallback(async y=>{if(y.stopPropagation(),y.preventDefault(),d.current){h.current&&_r(h.current),d.current=!1;try{c.current?.pause()}catch{}r(!1),l(-1);return}if(!b.filter(Boolean).length)return;let B=null;const x=()=>{d.current=!1,B?.stop()};h.current=x;const N=Ka(x);d.current=!0,r(!0);for(let A=0;A<b.length&&d.current;A++){const D=b[A];if(D&&(l(A),B=Ya(D),c.current=B.el,!await B.done))break}N(),h.current===x&&(h.current=null,d.current=!1,r(!1),l(-1))},[b]);return o.useEffect(()=>()=>{h.current&&_r(h.current),d.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:a,playingIndex:s,previewUrls:b,previewHover:C,setPreviewHover:g,previewBtnRef:p,handlePreview:w}}const uv=e=>{if(!e)return[];const t=typeof e.context=="string"&&e.context.trim()||typeof e.sentence=="string"&&e.sentence.trim()||typeof e.text=="string"&&e.text.trim()||"";if(t)return[String(t)];const a=e.sentences||e.items||e.questions||[];return Array.isArray(a)&&a.length>0?a.map(r=>{if(typeof r=="string")return r;if(r&&typeof r=="object"){const s=r;return s.sentence||s.text||s.context||s.question||s.title||""}return""}).filter(r=>typeof r=="string"&&r.trim().length>0).map(r=>r.trim()):[]};function Ro(e){const{index:t,type:a,trainingData:r,ariaLabel:s,depth:l,renderPopup:i,completed:u,completedIds:c,selectedIds:d,tooltipText:h,useDescriptionTooltip:p=!1,onRemove:C,hideCheckBadge:g=!1,showTypeLabel:_=!1,onComplete:m,onSelect:f,onMore:v,countLabelOverride:b,size:w="square"}=e||{},{t:y}=xe.useTranslation(),[B,x]=o.useState(!1),N=o.useRef(null),[A,D]=o.useState(!1);o.useEffect(()=>{N.current?.matches(":hover")&&D(!0)},[]);const{playing:E,playingIndex:k,previewUrls:R,previewHover:$,setPreviewHover:G,previewBtnRef:T,handlePreview:P}=iv(r,a?.key),M=o.useCallback(()=>{f?f():x(!0)},[f]),ee=o.useCallback(()=>x(!1),[]),Q=o.useCallback(()=>D(!0),[]),F=o.useCallback(()=>D(!1),[]),Z=o.useCallback(()=>G(!0),[G]),L=o.useCallback(()=>G(!1),[G]),[V,U]=o.useState(null);o.useLayoutEffect(()=>{$&&U(T.current?.getBoundingClientRect()??null)},[$,T]);const[q,j]=o.useState(null);o.useLayoutEffect(()=>{A&&!B&&p&&j(N.current?.getBoundingClientRect()??null)},[A,B,p]);const I=o.useCallback(Se=>{Se.target===Se.currentTarget&&(Se.key==="Enter"||Se.key===" ")&&(Se.preventDefault(),M())},[M]),O=r||null,Y=o.useMemo(()=>{if(!p)return null;const Se=h?(Array.isArray(h)?h:[h]).filter(Boolean):null,He=Se&&Se.length>0?Se:uv(O);return He&&He.length>0?He:null},[p,h,O]),K=o.useCallback(Se=>{Se.stopPropagation(),C?.()},[C]),ie=o.useCallback(Se=>Se.stopPropagation(),[]),te=o.useCallback(Se=>{typeof m=="function"&&m(Se)},[m]),ne=u||(c&&r?.id!=null?c.has(String(r.id)):!1),z=!ne&&(d!=null&&r?.id!=null?d.has(String(r.id)):!1);zi("speechear.popup.close",ee);const ae=Xl(),H=`${a?.label||""} ${t+1}`,W=O?.title||O?.name||H;let ue=a?.icon,Be,ye="",he="";try{const Se=O?.category_0||O?.category_main_code||O?.category_main,He=O?.category_1||O?.category_sub_code||O?.category_sub,Qe=ae.find(it=>it.key===Se);Qe?.icon&&(ue=Qe.icon),!Be&&Qe?.color&&(Be={"--t-item-fg":Qe.color}),!Be&&O?.iconColor&&(Be={"--t-item-fg":O.iconColor}),ye=Qe?y(`topic.${Qe.key}`,{defaultValue:Qe.label||""}):"";try{const it=Qe?.subs?.find(bt=>bt.key===He);he=it?y(`topic.sub.${it.key}`,{defaultValue:it.label||""}):""}catch{}}catch{}const Ne=he?`${ye} / ${he}`:ye||a?.label||W,Re=Se=>y("training.countQuestions",{n:Se,count:Se}),Me=Se=>y("training.countSentences",{n:Se,count:Se});let se="";try{if(O)if(a?.key==="LISTEN_IN_NOISE"){let Se=0;Array.isArray(O.items)&&O.items.length>0?Se=O.items.length:Array.isArray(O.sentences)&&O.sentences.length>0?Se=O.sentences.length:O.sentences&&(Se=1),se=Me(Se)}else if(a?.key==="SHORT_STORY"){let Se=1;Array.isArray(r?.items)?Se=r.items.length:Array.isArray(r?.raw&&r.raw?.items)?Se=r.raw.items.length:Array.isArray(O?.questions)?Se=O.questions.length:Array.isArray(O?.sentences)&&(Se=O.sentences.length),se=Re(Se)}else if(a?.key==="LONG_STORY"){let Se=1;if(Array.isArray(O.items)&&O.items.length>0){const He=O.items.reduce((Qe,it)=>{const bt=it.questionItems;return Array.isArray(bt)?Qe+bt.length:Array.isArray(it.questions)?Qe+it.questions.length:Qe},0);Se=He>0?He:O.items.length}else Array.isArray(O.questions)&&O.questions.length>0?Se=O.questions.length:Array.isArray(O.sentences)&&O.sentences.length>0&&(Se=O.sentences.length);se=Re(Se)}else if(a?.key==="ORDERING_SENTENCE"){let Se=1;Array.isArray(O.items)&&O.items.length>0?Se=O.items.length:Array.isArray(O.sentences)&&O.sentences.length>0&&(Se=O.sentences.length),se=Me(Se)}else Array.isArray(O.items)&&(se=O.items.length>0?Re(O.items.length):"")}catch{}const Ee=w==="row",$e=w==="list"||Ee,Ae=w==="compact",Fe=w==="small",Ve=Fe&&a?.key?Uf().find(Se=>Se.key===a.key):void 0,ct=Ve?Jl[Ve.key]:void 0,ot=Ve?ct?y(`trainingType.${ct}.title`,{defaultValue:Ve.label}):Ve.label??"":"",Xe=_&&a?.label&&a.label!==String(W)?String(a.label):Fe&&ot&&ot!==String(W)?ot:"",ft=!!Xe,Le=b!==void 0?b:se,qe=[Xe,typeof W=="string"?W:"",Le].map(Se=>String(Se??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:N,className:`training-block-button${$e?" training-block-button--list":""}${Ee?" training-block-button--row":""}${Ae?" training-block-button--compact":""}${Fe?" training-block-button--small":""}${ne?" training-block-button--completed":""}${z?" training-block-button--selected":""}${ft&&!Fe?" training-block-button--withType":""}${Fe&&!ft?" training-block-button--no-type-label":""}`,onClick:M,onPointerEnter:Q,onPointerLeave:F,role:"button",tabIndex:0,onKeyDown:I,"aria-label":typeof s=="string"?s:qe||void 0,title:!p&&h&&(Array.isArray(h)?h.filter(Boolean).join(`
824
- `):h)||void 0,children:[n.jsxs("div",{className:"training-block-button__left",children:[_&&a?.label&&a.label!==String(W)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:a.label}),Fe&&ot&&ot!==String(W)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:ot}),n.jsx(gu,{icon:ue,label:W,tooltip:Ne,wrapperStyle:Be,iconSize:Fe||Ae?"small":"medium"}),!g&&(ne||z)&&!(C&&A)&&n.jsx(Dn,{className:C?"training-block-button__check--removable":void 0,icon:"check",position:"top-left",size:32,"aria-label":ne?y("training.completed","\uD6C8\uB828 \uC644\uB8CC"):y("training.selected","\uC120\uD0DD\uB428")}),C&&n.jsx(Dn,{className:`training-block-button__remove${A?" is-hover":""}`,icon:"remove",position:"top-left",size:32,"aria-label":y("common.remove","\uC81C\uAC70"),onClick:K}),n.jsx("div",{className:`training-block-button__title ${Ae?"body-3":Fe?"body-3b":"h3"}`,children:String(W)}),n.jsxs("div",{className:"training-block-button__description",children:[Le?n.jsx("div",{className:`training-block-button__count ${Fe?"caption-2":"caption-1"}`,children:Le}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(rt,{icon:"chevron-right",label:y("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:Fe?12:20})})]}),($e&&!Ee||Fe)&&R.length>0&&n.jsx("div",{ref:T,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:ie,onPointerEnter:Z,onPointerLeave:L,children:n.jsx(Ce,{htmlType:"button",size:Fe?28:32,type:"dot",icon:E?"pause":"play",variant:Fe?"transparent-lightGray":"default",useBorder:!1,selected:E,ariaLabel:String(W).trim()?E?y("training.stopFor",{name:W,defaultValue:`${W} \uC815\uC9C0`}):y("training.previewFor",{name:W,defaultValue:`${W} \uBBF8\uB9AC \uB4E3\uAE30`}):E?y("training.stop","\uC815\uC9C0"):y("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:P})})]}),v&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:Se=>{Se.stopPropagation(),v(Se)},children:n.jsx(Ce,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(W).trim()?y("common.moreFor",{name:W}):y("common.more","\uB354\uBCF4\uAE30")})})]}),$&&n.jsx(Mn,{anchorRect:V,text:E?y("training.stop","\uC815\uC9C0"):y("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:L}),A&&!B&&p&&(Y?n.jsx(qn,{anchorRect:q,items:Y,activeIndex:k,onClose:F}):O?.subTitle?n.jsx(Mn,{anchorRect:q,text:O.subTitle,offset:8,onClose:F}):null),B&&i&&i({trainingData:O,typeKey:a?.key??"",onClose:ee,onComplete:te,popupTitle:String(W),popupSubTitle:a?.subTitle,depth:l!=null?String(l):void 0,popupIcon:ue,popupIconTooltip:String(Ne),popupWrapperStyle:Be})]})}const yu=200;function cv(e){return e.itemId?(Xf()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function vu({plan:e,groups:t,anchorRect:a,offset:r=12,onClose:s}){const{t:l}=xe.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):Qf(l).map(c=>{const d=(e?.items??[]).filter(h=>h.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:d.length,data:d.map(cv).filter(h=>h!=null)}}).filter(c=>c.pickedCount>0),[t,e?.items,l]);if(i.length===0)return null;const u=n.jsx("div",{className:le("training-tooltip__box"),children:n.jsx("div",{className:le("training-tooltip__groups"),children:i.flatMap(({key:c,label:d,type:h,data:p},C)=>[C>0?n.jsx("div",{className:le("training-tooltip__divider")},`div-${c}`):null,n.jsxs("div",{className:le("training-tooltip__section"),children:[n.jsx("div",{className:le("training-tooltip__section-header"),children:n.jsx("span",{className:le("training-tooltip__type-label body-3b"),children:d})}),n.jsx("div",{className:le("training-tooltip__items"),children:p.map((g,_)=>n.jsx(Ro,{index:_,type:h,trainingData:g,size:"compact",hideCheckBadge:!0},String(g.id??_)))})]},c)])})});return a?n.jsx(Bn,{anchorRect:a,offset:r,onClose:s,closeOnOutsideClick:!1,className:le("training-tooltip"),ariaLabel:l("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const dv=200;function pv({icon:e,count:t,title:a,plan:r,tooltip:s=!0,hoverAccent:l=!1,className:i="",onClick:u,onMouseEnter:c,onMouseLeave:d}){const h=!!u||!!c||s&&!!r,p=ke("count-tile",h&&"count-tile--interactive",h&&l&&"count-tile--accent",u&&"count-tile--clickable",i),C=o.useRef(null),[g,_]=o.useState(null),m=o.useRef(null),f=o.useRef(null),v=!!(g&&r&&s),b=o.useCallback(()=>{m.current&&(clearTimeout(m.current),m.current=null),f.current&&(clearTimeout(f.current),f.current=null)},[]),w=o.useCallback(()=>{b(),_(null)},[b]),y=o.useCallback(()=>{!s||!r||(b(),m.current=setTimeout(()=>{m.current=null,_(C.current?.getBoundingClientRect()??null)},yu))},[s,r,b]),B=o.useCallback(()=>{m.current&&(clearTimeout(m.current),m.current=null),!f.current&&(f.current=setTimeout(()=>{f.current=null,_(null)},dv))},[]);return o.useEffect(()=>()=>{b()},[b]),o.useEffect(()=>{(!s||!r)&&w()},[s,r,w]),o.useEffect(()=>{if(!v)return;const x=A=>A instanceof Element&&(C.current?.contains(A)||!!A.closest(".training-tooltip")),N=A=>{x(A.target)?b():B()};return document.addEventListener("pointerover",N,!0),()=>document.removeEventListener("pointerover",N,!0)},[v,b,B]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:C,className:p,onClick:u?x=>{w(),u(x)}:void 0,onKeyDown:u?x=>{x.key!=="Enter"&&x.key!==" "||(x.preventDefault(),x.currentTarget.click())}:void 0,onPointerEnter:x=>{x.pointerType==="touch"||x.pointerType==="pen"?w():y()},onMouseEnter:c,onMouseLeave:x=>{B(),d?.(x)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${a} ${t}`,children:[n.jsx(rt,{icon:e,size:20,className:"count-tile__icon"}),n.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:t})]}),g&&r&&n.jsx(vu,{plan:r,anchorRect:g,onClose:w})]})}let Za=0,_u="",Po="",Xa=0;function xu(){return wu(!1)}function hv(){return wu(!0)}function wu(e){const t=typeof document<"u";Za===0&&t&&(_u=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(Xa===0&&(Po=document.body.style.paddingRight),Xa++,document.body.style.paddingRight="0px"),Za++;let a=!1;return()=>{a||(a=!0,Za=Math.max(0,Za-1),e&&t&&(Xa=Math.max(0,Xa-1),Xa===0&&(Po?document.body.style.paddingRight=Po:document.body.style.removeProperty("padding-right"))),Za===0&&t&&(document.body.style.overflow=_u))}}function mv(){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 Cv({open:e,onClose:t,ariaLabel:a,title:r,children:s,size:l="md",closeOnBackdrop:i=!0,closeOnEscape:u=!0,showClose:c=!0,className:d,contentClassName:h}){const{t:p}=xe.useTranslation(),C=o.useId(),g=o.useRef(null),_=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const b=document.activeElement,w=xu(),y=g.current;return yo(y,b),y?.focus(),()=>{w();const B=document.activeElement;(!B||B===document.body||y&&y.contains(B))&&vo(b)?.focus?.()}},[e]);const m=o.useRef(_),f=o.useRef(u);o.useEffect(()=>{m.current=_,f.current=u}),o.useEffect(()=>{if(e)return Qn(()=>{f.current&&m.current()})},[e]);const v=o.useRef(!1);return bo(g,e),!e||typeof document>"u"?null:dn.createPortal(n.jsx("div",{className:ke("dialog",d),onPointerDown:i?b=>{v.current=b.target===b.currentTarget}:void 0,onMouseDown:b=>{b.target===b.currentTarget&&b.preventDefault()},onClick:i?b=>{const w=v.current;v.current=!1,w&&b.target===b.currentTarget&&_()}:void 0,children:n.jsxs("div",{ref:g,role:"dialog","aria-modal":"true","aria-label":r?void 0:a,"aria-labelledby":r?C:void 0,tabIndex:-1,className:ke("dialog__surface",`dialog__surface--${l}`,h),onClick:b=>b.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:_,children:n.jsx(mv,{})}):null,n.jsx("div",{className:"dialog__body",children:s})]})}),document.body)}function fv({columns:e,rows:t,rowKey:a,title:r,toolbar:s,empty:l,loading:i,caption:u,className:c=""}){const{t:d}=xe.useTranslation(),h=!i&&t.length===0;return n.jsxs("div",{className:ke("board",c),children:[r||s?n.jsxs("div",{className:"board__head",children:[r?n.jsx("h2",{className:"board__title",children:r}):n.jsx("span",{}),s?n.jsx("div",{className:"board__toolbar",children:s}):null]}):null,n.jsxs("table",{className:"board__table",children:[u?n.jsx("caption",{className:"board__caption",children:u}):null,n.jsx("thead",{children:n.jsx("tr",{children:e.map(p=>n.jsx("th",{scope:"col",className:ke("board__th",`board__cell--${p.headerAlign??p.align??"left"}`),style:p.width?{width:p.width}:void 0,children:p.header},p.key))})}),n.jsx("tbody",{children:i?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:i})}):h?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:l??d("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((p,C)=>n.jsx("tr",{className:"board__row",children:e.map(g=>n.jsx("td",{className:ke("board__td",`board__cell--${g.align??"left"}`),children:g.render(p,C)},g.key))},a(p,C)))})]})]})}function bv({name:e,role:t,photo:a,media:r,credentials:s,size:l=190,className:i=""}){return n.jsxs("div",{className:ke("person-card",i),children:[n.jsx("div",{className:"person-card__photo",style:{width:l,height:l},children:r??(a?n.jsx("img",{src:a,alt:t?`${e} ${t}`:e}):null)}),n.jsx("h3",{className:"person-card__name",children:e}),t?n.jsx("p",{className:"person-card__role",children:t}):null,s?.length?n.jsx("ul",{className:"person-card__credentials",children:s.map(u=>n.jsx("li",{children:u},u))}):null]})}function gv({groups:e,className:t=""}){return n.jsx("div",{className:ke("timeline",t),children:e.map(a=>n.jsxs("section",{className:"timeline__group",children:[n.jsx("h3",{className:"timeline__title",children:a.title}),n.jsx("ul",{className:"timeline__rows",children:a.entries.map((r,s)=>n.jsxs("li",{className:"timeline__row",children:[r.label?n.jsx("span",{className:"timeline__label",children:r.label}):null,n.jsx("div",{className:"timeline__items",children:r.items.map((l,i)=>n.jsx("p",{children:l},i))})]},`${r.label??""}-${s}`))})]},a.title))})}function yv({title:e,kind:t,body:a,badge:r,badgeSrc:s,footer:l,width:i,className:u=""}){const c=r??(s?n.jsx("img",{src:s,alt:""}):null);return n.jsxs("div",{className:ke("publication-card",u),style:i?{width:i,flexShrink:0}:void 0,children:[c?n.jsx("div",{className:"publication-card__badge","aria-hidden":"true",children:c}):null,n.jsx("h3",{className:"publication-card__title",children:e}),t?n.jsx("p",{className:"publication-card__kind",children:t}):null,n.jsx("p",{className:"publication-card__body",children:a}),l?n.jsx("div",{className:"publication-card__footer",children:l}):null]})}function vv({logo:e,alt:t,onDone:a,durationMs:r=3e3}){const s=Fa(a);return o.useEffect(()=>{const l=setTimeout(()=>s.current?.(),r);return()=>clearTimeout(l)},[r,s]),n.jsx("div",{className:"splash-logo",style:{"--splash-logo-duration":`${r}ms`},"aria-hidden":"true",children:n.jsx("img",{src:e,alt:t,className:"splash-logo__image"})})}function _v({eyebrow:e,eyebrowIndex:t,title:a,description:r,level:s=2,tone:l="dark",className:i=""}){const u=s===1?"h1":"h2";return n.jsxs("div",{className:ke("section-header",`section-header--${l}`,i),children:[e?n.jsxs("p",{className:"section-header__eyebrow",children:[t?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"section-header__index",children:t}),n.jsx("span",{"aria-hidden":!0,className:"section-header__rule"})]}):null,e]}):null,a?n.jsx(u,{className:"section-header__title",children:a}):null,r?n.jsx("div",{className:"section-header__description",children:r}):null]})}function xv({items:e,className:t=""}){return n.jsx("ul",{className:ke("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))})}const Ja=new Map;function vn(e){const{t}=xe.useTranslation(),{options:a=[],value:r=a.find(y=>!y.disabled)?.key??a[0]?.key,onChange:s=y=>{},className:l="",size:i=40,shape:u="pill",useBG:c=!0,fullWidth:d=!1,minButtonWidth:h,ariaLabel:p}=e||{},C=o.useRef(null),g=a.filter(y=>!y.disabled),_=o.useId(),m=a.map(y=>y.key).join("\xB7");o.useEffect(()=>{if(!(!zn||p!=null&&p!=="")){if(Ja.set(_,m||"(\uBCF4\uAE30 \uC5C6\uC74C)"),Ja.size>1){const y=[...Ja.values()].sort();kt(`segmented-control-unnamed:${y.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${Ja.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): ${y.join(" / ")}`)}return()=>{Ja.delete(_)}}},[p,m,_]);const f=y=>{if(!g.length)return;const B=Math.max(0,g.findIndex(N=>N.key===r)),x=y==="first"?g[0]:y==="last"?g[g.length-1]:g[(B+y+g.length)%g.length];x&&(s(x.key),Array.from(C.current?.querySelectorAll("[data-segkey]")??[]).find(N=>N.dataset.segkey===x.key)?.focus())},v=y=>{switch(y.key){case"ArrowRight":case"ArrowDown":f(1);break;case"ArrowLeft":case"ArrowUp":f(-1);break;case"Home":f("first");break;case"End":f("last");break;default:return}y.preventDefault()},b=y=>{const B=x=>typeof x=="string"||typeof x=="number";if(!(!B(y.label)||y.count==null||y.count===!1||!B(y.count)))return`${y.label}, ${y.count}`},w=g.some(y=>y.key===r)?r:g[0]?.key;return n.jsx("div",{ref:C,onKeyDown:v,className:ke("segmented-control",`segmented-control--${u}`,`segmented-control--${i}`,d&&"segmented-control--full",!c&&"segmented-control--no-bg",h!=null&&"segmented-control--min",l),style:h!=null?{"--segmented-min-button-w":`${h}px`}:void 0,role:"radiogroup","aria-label":p??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:a.map(y=>n.jsx(Ce,{htmlType:"button",role:"radio","aria-checked":y.key===r,"data-segkey":y.key,tabIndex:y.key===w?0:-1,label:y.label,count:y.count,ariaLabel:b(y),disabled:y.disabled,className:y.key===r?"is-selected":"",onClick:()=>{y.disabled||s(y.key)},size:i,shape:u,useBorder:!1,useBG:!1},y.key))})}const wv=260;function Pn(e){const{t}=xe.useTranslation(),{title:a,subtitle:r,headerActions:s,headerSegment:l,children:i,buttons:u,footer:c,footerStart:d,footerEnd:h,footerNote:p,footerNoteDivider:C=!1,footerClassName:g="",footerLayout:_="center",onClose:m,closeDisabled:f=!1,beforeClose:v,closeOnBackdrop:b=!0,className:w="",ariaLabel:y,useTitle:B=!0,inline:x=!1,size:N,layer:A="modal",height:D,fillBody:E=!1,resetScrollKey:k}=e||{},[R,$]=o.useState(!1),G=o.useRef(!1),T=o.useRef(null),P=o.useId(),M=o.useRef(null);o.useEffect(()=>{},[x,a,y,w]),o.useEffect(()=>{k!==void 0&&M.current&&(M.current.scrollTop=0)},[k]);const[ee,Q]=o.useState(!1);o.useEffect(()=>{const z=M.current;if(!z)return;const ae=()=>Q(z.scrollHeight>z.clientHeight+1);if(ae(),typeof ResizeObserver>"u")return;const H=new ResizeObserver(ae);H.observe(z);const W=z.firstElementChild;return W&&H.observe(W),()=>H.disconnect()},[i,k]),o.useEffect(()=>{if(!x)return xu()},[x]);const F=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(x)return;const z=F.current,ae=T.current;return yo(ae,z),ae&&!ae.contains(document.activeElement)&&(ae.querySelector(En)??ae).focus(),()=>{const H=document.activeElement;(!H||H===document.body||ae&&ae.contains(H))&&vo(z)?.focus?.()}},[x]),bo(T,!x);const Z=o.useRef(!0),L=_o(),V=o.useRef(null);o.useEffect(()=>(Z.current=!0,()=>{Z.current=!1,V.current&&(clearTimeout(V.current),V.current=null)}),[]);const U=o.useCallback(()=>{!Z.current||!G.current||(G.current=!1,$(!1))},[]),q=o.useCallback((z,ae=!1)=>{if(ae&&!Z.current||G.current)return;G.current=!0,$(!0);const H=setTimeout(()=>{V.current===H&&(V.current=null);let W;try{W=z?z():void 0}catch{U();return}W&&typeof W.then=="function"&&W.then(()=>{setTimeout(U,120)},U)},L?0:wv);ae&&(V.current=H)},[U,L]),j=o.useCallback(()=>{f||v&&v()===!1||q(m,!0)},[q,m,f,v]),I=o.useRef(j);o.useEffect(()=>{I.current=j});const O=!x&&!!m;o.useEffect(()=>{if(O)return Qn(()=>I.current())},[O]);const Y=O&&b,K=o.useRef(!1),ie=z=>{K.current=z.target===z.currentTarget},te=z=>{const ae=K.current;K.current=!1,ae&&z.target===z.currentTarget&&j()},ne=n.jsx("div",{className:`popup ${x?"popup--inline":""} ${A==="belowPagePopup"?"popup--below-page-popup":""} ${R?"popup--closing":""} ${w}`,onPointerDown:Y?ie:void 0,onClick:Y?te:void 0,onMouseDown:x?void 0:z=>{z.target===z.currentTarget&&z.preventDefault()},children:n.jsxs("div",{ref:T,className:`popup-panel${N?` popup-panel--${N}`:""}${D!=null?" popup-panel--has-height":""}${E?" popup-panel--fill-body":""}`,style:D!=null?{"--popup-height":typeof D=="number"?`${D}px`:D}:void 0,tabIndex:-1,role:x?void 0:"dialog","aria-modal":x?void 0:!0,"aria-labelledby":!x&&B&&a?P:void 0,"aria-label":!x&&!(B&&a)?y??(typeof a=="string"?a:void 0):void 0,children:[!B&&(s||m)?n.jsxs("div",{className:"popup-close-float",children:[s,m&&n.jsx(Ce,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:j,disabled:f,ariaLabel:t("common.close","\uB2EB\uAE30")})]}):a||s||m?n.jsxs("div",{className:`popup-header${r?" popup-header--with-subtitle":""}`,children:[n.jsxs("div",{className:"popup-header-main",children:[a?n.jsx("h2",{id:P,className:"popup-title popup-title--left h2",children:a}):n.jsx("span",{id:P,className:"popup-title popup-title--left h2"}),r&&n.jsx("span",{className:"popup-subtitle body-3",children:r})]}),n.jsxs("div",{className:"popup-header-aside",children:[l&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(vn,{size:40,ariaLabel:l.ariaLabel,options:l.options.map(z=>({key:z.key,label:z.label,disabled:z.disabled})),value:l.value,onChange:l.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[s,m&&n.jsx(Ce,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:j,disabled:f,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]})]}):null,n.jsx("div",{className:"popup-content",ref:M,tabIndex:ee?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:q,closeWithAnimation:j}):i})}),p!=null&&p!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${C?" popup-footer-note--divider":""}`,role:"note",children:p}),d||h?n.jsxs("div",{className:`popup-footer popup-footer--bar${g?` ${g}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof d=="function"?d({animateThen:q,closeWithAnimation:j}):d}),n.jsx("div",{className:"popup-footer__end",children:typeof h=="function"?h({animateThen:q,closeWithAnimation:j}):h})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${_!=="center"?` popup-footer--${_}`:""}`,children:u.map((z,ae)=>n.jsx(Ce,{htmlType:"button",size:48,variant:z.variant??"default",label:z.label,disabled:z.disabled,onClick:()=>z.onClick?.({animateThen:q,closeWithAnimation:j})},ae))}):c?n.jsx("div",{className:`popup-footer${_!=="center"?` popup-footer--${_}`:""}${g?` ${g}`:""}`,children:typeof c=="function"?c({animateThen:q,closeWithAnimation:j}):c}):null]})});return x||typeof document>"u"?ne:dn.createPortal(ne,document.body)}function Bu({checked:e,onChange:t,disabled:a=!1,label:r,ariaLabel:s,labelPosition:l="right",className:i="",id:u}){const c=r&&n.jsx("span",{className:"toggle__label body-3",children:r});return n.jsxs("label",{className:`toggle${a?" toggle--disabled":""} ${i}`.trim(),children:[l==="left"&&c,n.jsx("input",{id:u,type:"checkbox",role:"switch",checked:e,disabled:a,onChange:d=>t?.(d.target.checked),"aria-label":!r&&s?s:void 0}),n.jsx("span",{className:"toggle__slider"}),l==="right"&&c]})}function _n({options:e,value:t,onChange:a,placeholder:r,disabled:s=!1,block:l=!1,size:i=48,error:u=!1,className:c="",ariaLabel:d,ariaDescribedBy:h}){const{t:p}=xe.useTranslation(),C=r??p("dropdown.placeholder","\uC120\uD0DD"),g=o.useId(),_=o.useId(),m=o.useRef(null),f=o.useCallback((T,P)=>{const M=window.innerHeight-T.bottom<260&&T.top>260;return{position:"fixed",left:T.left,minWidth:T.width,...M?{bottom:window.innerHeight-T.top+6}:{top:T.bottom+6},zIndex:Wa(P)}},[]),{open:v,setOpen:b,toggle:w,style:y,triggerRef:B,menuRef:x}=Ha({computeStyle:f}),[N,A]=o.useState(-1),D=o.useCallback(()=>A(-1),[]),E=e.find(T=>T.value===t);o.useEffect(()=>{if(v){const T=e.findIndex(P=>P.value===t);A(T>=0?T:e.length?0:-1),requestAnimationFrame(()=>{const P=x.current;if(!P)return;const M=P.querySelectorAll(".dropdown__option")[T];M&&(P.scrollTop=Math.max(0,M.offsetTop-P.clientHeight/2+M.clientHeight/2))})}},[v]),o.useEffect(()=>{v&&A(T=>{if(T>=0&&T<e.length)return T;const P=e.findIndex(M=>M.value===t);return P>=0?P:e.length?0:-1})},[v,e.length]);const k=o.useCallback(()=>{s||w()},[s,w]),R=o.useCallback(T=>{T.disabled||s||(T.value!==t&&a?.(T.value),b(!1))},[a,b,s,t]);o.useEffect(()=>{s&&b(!1)},[s,b]);const $=o.useCallback(T=>{if(!s){if(!v){(T.key==="Enter"||T.key===" "||T.key==="ArrowDown")&&(T.preventDefault(),b(!0));return}if(T.key==="Escape"){T.preventDefault(),b(!1);return}T.key==="ArrowDown"?(T.preventDefault(),A(P=>{let M=P+1;for(;M<e.length&&e[M].disabled;)M++;return M<e.length?M:P})):T.key==="ArrowUp"?(T.preventDefault(),A(P=>{let M=P-1;for(;M>=0&&e[M].disabled;)M--;return M>=0?M:P})):(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),e[N]?R(e[N]):b(!1))}},[s,v,e,N,R,b]),G=v?n.jsx("div",{ref:x,id:g,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:y,onMouseLeave:D,onMouseDown:T=>T.preventDefault(),children:e.map((T,P)=>n.jsxs("button",{id:`${g}-option-${P}`,type:"button",role:"option","aria-selected":T.value===t,className:ke("dropdown__option body-2",T.value===t?"dropdown__option--active":"",P===N?"dropdown__option--active":"",T.disabled?"dropdown__option--disabled":""),onMouseDown:M=>M.preventDefault(),onClick:()=>R(T),onMouseEnter:()=>A(P),disabled:T.disabled,children:[n.jsx("span",{className:"dropdown__option-check",children:T.value===t&&n.jsx("svg",{viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"2 7 5.5 10.5 12 3.5"})})}),T.label]},T.value))}):null;return n.jsxs("div",{ref:m,className:ke("dropdown",`dropdown--s${i}`,v?"dropdown--open":"",l?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:$,children:[n.jsxs("button",{ref:B,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":v,"aria-controls":v?g:void 0,"aria-activedescendant":v&&N>=0?`${g}-option-${N}`:void 0,"aria-label":d,"aria-describedby":[d&&E?_:"",h??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:s,onClick:k,onBlur:T=>{v&&!x.current?.contains(T.relatedTarget)&&b(!1)},children:[n.jsx("span",{id:_,className:`dropdown__trigger-label body-2${E?"":" dropdown__trigger-label--placeholder"}`,children:E?E.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"&&dn.createPortal(G,m.current?.closest(".ihabdevteam-core-scope")??document.body)]})}const Bv={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function Au(e){return e?Bv[e]??null:null}function ku(e){switch(Au(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Nu(e,t){const a=Au(e);return a?t(`device.type.${a}`,{defaultValue:e??""}):e??""}const ga=e=>e==null?"":String(e).trim();function Io(e,t,a,r){const s=ga(e),l=ga(t),i=ga(a);if(r&&s&&l&&i){const c=`${s.padStart(4,"0")}-${l.padStart(2,"0")}-${i.padStart(2,"0")}`,d=new Date(c);if(!Number.isNaN(d.getTime())&&d.toISOString().slice(0,10)===c){const h=ql(c,r);if(h)return h}}const u=[s,l,i];for(;u.length>0&&u[u.length-1]==="";)u.pop();return u.join(".")}function Av(e,t,a){const r=ga(e);return r?`${r}-${ga(t).padStart(2,"0")}-${ga(a).padStart(2,"0")}`:""}function Eu(e){return typeof e=="string"?e:e.label}function Du({value:e,onChange:t,suggestions:a,openOnFocus:r=!1,filterSuggestions:s,onSelectSuggestion:l,autoActiveFirst:i=!1}){const u=o.useId(),[c,d]=o.useState(!1),[h,p]=o.useState(-1),C=o.useRef(null),g=o.useMemo(()=>{if(!a.length)return[];const k=e??"";return s===!1?a:k?typeof s=="function"?s(a,k):a.filter(R=>Eu(R).toLowerCase().includes(k.toLowerCase())):r?a:[]},[a,e,r,s]),[_,m]=o.useState(!1),f=o.useRef([]),v=_&&g.length===0?f.current:g;o.useEffect(()=>{v.length&&(f.current=v)},[v]);const b=o.useCallback(()=>m(!0),[]),w=o.useCallback(()=>m(!1),[]),y=i?0:-1;o.useEffect(()=>{c||p(y)},[c,y]),o.useEffect(()=>()=>{C.current&&clearTimeout(C.current)},[]);const B=h<v.length?h:y<v.length?y:-1,x=o.useCallback(k=>{l?l(k):t?.(Eu(k)),d(!1)},[t,l]),N=o.useCallback(()=>d(!0),[]),A=o.useCallback(()=>{d(!0),p(y)},[y]),D=o.useCallback(()=>{C.current=setTimeout(()=>d(!1),120)},[]),E=o.useCallback(k=>{k.nativeEvent.isComposing||k.keyCode===229||(k.key==="ArrowDown"?(k.preventDefault(),d(!0),p(R=>Math.min(v.length-1,(R<v.length?R:y)+1))):k.key==="ArrowUp"?(k.preventDefault(),p(R=>Math.max(y,(R<v.length?R:v.length)-1))):k.key==="Enter"?B>=0&&x(v[B]):k.key==="Escape"&&c&&(k.preventDefault(),d(!1)))},[v,B,c,x,y]);return{listId:u,open:c,activeIdx:B,filtered:v,handleFocus:N,handleBlur:D,handleInput:A,handleKeyDown:E,handleSelect:x,handleCompositionStart:b,handleCompositionEnd:w}}const Fo=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Kn(e){const{value:t,defaultValue:a,name:r,inputRef:s,onChange:l,label:i,ariaLabel:u,ariaDescribedBy:c,required:d,placeholder:h,ghostText:p,ghostHint:C,type:g="text",disabled:_=!1,readOnly:m=!1,error:f,helperText:v,maxLength:b,size:w=40,variant:y="input",fullWidth:B=!1,newline:x=!1,multiline:N=!1,rows:A=3,leftIcon:D,rightIcon:E,clearable:k=!1,list:R,showCount:$=!0,className:G="",onFocus:T,onBlur:P,onKeyDown:M,onEnter:ee,inputMode:Q,autoComplete:F,autoFocus:Z,suggestions:L,filterSuggestions:V,onSelectSuggestion:U,autoActiveFirst:q,openOnFocus:j=!1}=e,I=m||_?void 0:L,{t:O}=xe.useTranslation(),Y=o.useId();!i&&!u&&kt(`TextField:unnamed:${Y}`,"[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 K=`tf-${Y}`,ie=`tf-helper-${Y}`,te=o.useRef(null),ne=Du({value:t??"",onChange:l,suggestions:I??[],openOnFocus:j,filterSuggestions:V,onSelectSuggestion:U,autoActiveFirst:q}),z=!!I&&ne.open&&ne.filtered.length>0,ae=o.useRef(null),[H,W]=o.useState(null),ue=o.useCallback(()=>{const Le=ae.current;if(!Le||typeof window>"u")return;const qe=Le.getBoundingClientRect(),Se=230,He=window.innerHeight-qe.bottom<Se+8&&qe.top>Se+8;W({position:"fixed",left:qe.left,width:qe.width,...He?{bottom:window.innerHeight-qe.top+8}:{top:qe.bottom+8},zIndex:Wa(Le)})},[]);Fo(()=>{if(!z)return;ue();let Le=null;const qe=()=>{if(typeof requestAnimationFrame>"u"){ue();return}Le===null&&(Le=requestAnimationFrame(()=>{Le=null,ue()}))},Se=He=>{const Qe=He.target;Qe&&Qe.nodeType===1&&Qe.closest?.(".text-field__suggestions")||qe()};return window.addEventListener("scroll",Se,!0),window.addEventListener("resize",qe),()=>{Le!==null&&cancelAnimationFrame(Le),window.removeEventListener("scroll",Se,!0),window.removeEventListener("resize",qe)}},[z,ue]);const Be=o.useCallback(Le=>{te.current=Le,typeof s=="function"?s(Le):s&&(s.current=Le)},[s]),ye=p?`${p}${C??O("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:h,he=t!==void 0,Ne=he&&g==="password",[Re,Me]=o.useState((a??"").length),se=he?(t??"").length:Re,Ee=o.useRef(t);Fo(()=>{Ee.current=t}),o.useEffect(()=>{const Le=te.current;if(!Ne||!Le)return;const qe=t??"";Le.value!==qe&&(Le.value=qe)},[Ne,t]),o.useEffect(()=>{if(!x||!te.current)return;const Le=te.current;Le.style.height="",Le.scrollHeight>Le.clientHeight&&(Le.style.height=`${Le.scrollHeight}px`)},[t,Re,x]);const $e=b!=null&&se>b,Ae=w===32?16:20,Fe=ke("text-field",`text-field--s${w}`,y==="display"?"text-field--display":"",B?"text-field--full-width":"",_?"text-field--disabled":"",m?"text-field--readonly":"",f?"text-field--error":"",D?"text-field--has-left-icon":"",E||k?"text-field--has-right-icon":"",G),Ve={id:K,...Ne?{}:he?{value:t}:{defaultValue:a},ref:Be,placeholder:ye,name:r,disabled:_,readOnly:m,autoFocus:Z,maxLength:b,list:R,inputMode:Q,autoComplete:F,"aria-label":!i&&u?u:void 0,"aria-required":d,"aria-invalid":!!f,"aria-describedby":[v||f?ie:null,c].filter(Boolean).join(" ")||void 0,role:I?"combobox":void 0,"aria-autocomplete":I?"list":void 0,"aria-haspopup":I?"listbox":void 0,"aria-expanded":I?z:void 0,"aria-controls":z?ne.listId:void 0,"aria-activedescendant":z&&ne.activeIdx>=0?`${ne.listId}-option-${ne.activeIdx}`:void 0,onChange:Le=>{const qe=Le.target;he||Me(qe.value.length),l?.(qe.value),I&&ne.handleInput(),Ne&&queueMicrotask(()=>{const Se=Ee.current??"";qe.value!==Se&&(qe.value=Se)})},onCompositionStart:I?ne.handleCompositionStart:void 0,onCompositionEnd:I?ne.handleCompositionEnd:void 0,onFocus:(Le=>{T?.(Le),I&&ne.handleFocus()}),onBlur:(Le=>{P?.(Le),I&&ne.handleBlur()}),onKeyDown:(Le=>{const qe=(Le.key==="Tab"&&!Le.shiftKey||Le.key===" ")&&!Le.nativeEvent.isComposing;if(p&&qe&&!m&&!_&&!(Le.currentTarget.value??"").trim()){Le.preventDefault();const Se=Le.currentTarget;he||(Se.value=p,Me(p.length)),l?.(p);return}I&&Le.key==="Enter"&&!Le.nativeEvent.isComposing&&ne.activeIdx>=0?Le.preventDefault():ee&&Le.key==="Enter"&&!Le.nativeEvent.isComposing&&(Le.preventDefault(),ee()),M?.(Le),I&&ne.handleKeyDown(Le)})},ct=k&&!_&&!m&&se>0,ot=()=>x?n.jsx("textarea",{...Ve,className:"text-field__input text-field__input--auto body-2",rows:1}):N?n.jsx("textarea",{...Ve,className:"text-field__input text-field__input--textarea body-2",rows:A}):n.jsx("input",{...Ve,type:g,className:"text-field__input body-2"}),Xe=y==="display"&&!x&&!N&&!!ye,ft=()=>n.jsxs(n.Fragment,{children:[ot(),Xe&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:ye})]});return n.jsxs("div",{ref:ae,className:Fe,children:[i&&n.jsxs("label",{htmlFor:K,className:"text-field__label caption-1",children:[i,d&&n.jsx("span",{className:"text-field__required",children:"*"})]}),n.jsxs("div",{className:"text-field__wrap",children:[D&&n.jsx("span",{className:"text-field__icon text-field__icon--left",children:n.jsx(rt,{icon:D,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ae})}),ft(),b!=null&&$&&n.jsxs("span",{className:`text-field__count caption-2${$e?" text-field__count--over":""}`,children:[se,"/",b]}),ct&&n.jsx(Ce,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:O("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:Le=>{Le.preventDefault()},onClick:()=>{!he&&te.current&&(te.current.value="",Me(0)),l?.("")},tabIndex:-1}),E&&!ct&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(rt,{icon:E,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ae})})]}),!!I&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:ne.open&&(t??"").length>0&&ne.filtered.length===0?O("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),z&&(typeof document>"u"?null:dn.createPortal(n.jsx("ul",{id:ne.listId,className:"text-field__suggestions",role:"listbox",style:H??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:ne.filtered.map((Le,qe)=>n.jsx("li",{id:`${ne.listId}-option-${qe}`,role:"option","aria-selected":qe===ne.activeIdx,className:`text-field__suggestion body-2${qe===ne.activeIdx?" is-active":""}`,onMouseDown:Se=>Se.preventDefault(),onClick:()=>{ne.handleSelect(Le),te.current?.focus()},children:typeof Le=="string"?Le:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:Le.label}),Le.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:Le.hint})]})},typeof Le=="string"?`${Le}-${qe}`:Le.id))}),document.body)),(v||f)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:ie,className:"text-field__helper caption-1",role:f?"alert":void 0,children:f||v})})]})}const zt=40,Su=()=>{};function cn(e){const t=o.useId();if(!("variant"in e)){const{label:b,sub:w,onClick:y,children:B,align:x="horizontal",icon:N,useFullWidth:A=!1}=e,D=E=>{y&&E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),y())};return n.jsxs("div",{className:ke("panel-row",x==="vertical"?"panel-row--vertical":"",A?"panel-row--label-fixed panel-row--fill":"",y?"panel-row--clickable":""),onClick:y,onKeyDown:y?D:void 0,role:y?"button":void 0,tabIndex:y?0:void 0,children:[N!=null&&n.jsx("div",{className:"panel-row__icon",children:N}),b!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsx("div",{className:"panel-row__label body-3",children:b}),w&&n.jsx("div",{className:"panel-row__sub caption-1",children:w})]}),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(Ca,{size:28})});if(e.variant==="custom"&&!e.label)return n.jsx("div",{className:"panel-row panel-row--block",children:e.children});const{variant:a,label:r,sub:s,onClick:l,required:i,error:u,align:c="horizontal",useFullWidth:d=!1,icon:h}=e,p=a==="button"?void 0:l;let C=null;const g=a==="toggle"?`panel-toggle-${t}`:void 0,_=u?`panel-error-${t}`:void 0,m=`panel-helper-${t}`;if(a==="toggle"){const b=e;C=n.jsx(Bu,{checked:b.checked,onChange:b.onChange,id:g})}else if(a==="segmented"){const b=e;C=n.jsx(vn,{options:b.options,value:b.value,onChange:b.onChange,size:b.size??zt,ariaLabel:r})}else if(a==="dropdown"){const b=e,w=b.dropdowns?.length?n.jsx("div",{className:`panel-row__dropdown-group${d?" panel-row__dropdown-group--full":""}`,children:b.dropdowns.map((y,B)=>n.jsx("div",{className:d?"panel-row__dropdown-item--full":void 0,children:n.jsx(_n,{options:y.options,value:y.value,onChange:y.onChange,size:zt,placeholder:y.placeholder,block:d,error:!!u,ariaDescribedBy:_,ariaLabel:y.ariaLabel??([r,y.placeholder].filter(Boolean).join(" ")||void 0)})},B))}):n.jsx(_n,{options:b.options??[],value:b.value??"",onChange:b.onChange??Su,size:zt,block:d,error:!!u,ariaLabel:r,ariaDescribedBy:_});C=u?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[w,n.jsx("span",{id:_,className:"caption-1 panel-row__error",role:"alert",children:u})]}):w}else if(a==="button"){const b=e;b.buttons?.length?C=n.jsx("div",{className:"panel-row__button-group",children:b.buttons.map((w,y)=>n.jsx(Ce,{htmlType:"button",size:w.btnSize??zt,variant:w.btnVariant??"default",disabled:w.disabled,onClick:w.onClick,children:w.label},y))}):C=n.jsx(Ce,{htmlType:"button",size:b.btnSize??zt,variant:b.btnVariant??"default",disabled:b.disabled,onClick:b.onClick,children:b.buttonLabel})}else if(a==="text"){const b=e;C=n.jsx("span",{className:`panel-row__text body-2${d?" panel-row__text--full":""}`,style:b.valueColor?{color:b.valueColor}:void 0,children:b.value})}else if(a==="input"){const b=e;C=n.jsxs("div",{className:`panel-row__input-wrap${d?" panel-row__input-wrap--full":""}`,children:[n.jsx(Kn,{size:zt,value:b.value,onChange:b.onChange??Su,onKeyDown:b.onKeyDown,onEnter:b.onEnter,placeholder:b.placeholder,ghostText:b.ghostText,inputMode:b.inputMode,readOnly:b.readOnly,disabled:b.disabled,type:b.type,autoComplete:b.autoComplete,maxLength:b.maxLength,showCount:b.showCount,multiline:b.multiline,rows:b.rows,fullWidth:d,error:u,ariaLabel:r,required:i,ariaDescribedBy:b.helperText?m:void 0}),b.helperText&&n.jsx("div",{id:m,className:"panel-row__helper caption-1",children:b.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:_,className:"caption-1 panel-row__error",role:"alert",children:u})]}));const f=a==="input"||a==="dropdown"||(a==="text"||a==="custom")&&d,v=b=>{p&&b.target===b.currentTarget&&(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),p())};return n.jsxs("div",{className:ke("panel-row",c==="vertical"?"panel-row--vertical":"",f?"panel-row--label-fixed":"",a==="text"?"panel-row--text":"",p?"panel-row--clickable":""),onClick:p,onKeyDown:p?v:void 0,role:p?"button":void 0,tabIndex:p?0:void 0,children:[h!=null&&n.jsx("div",{className:"panel-row__icon",children:h}),n.jsxs("div",{className:"panel-row__left",children:[g?n.jsxs("label",{htmlFor:g,className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}):n.jsxs("div",{className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}),s&&n.jsx("div",{className:"panel-row__sub caption-1",children:s})]}),n.jsx("div",{className:"panel-row__right",children:C})]})}function ju(e){const t=e.productName||e.brand,a=[e.brand,e.fitType].filter(r=>!!r&&r!==t);return[...new Set(a)].join(" \xB7 ")}function kv({devices:e,onRelease:t,emptyLabel:a}){const{t:r,i18n:s}=xe.useTranslation();return n.jsx("div",{className:"panel-row panel-row--device",children:["left","right"].map(l=>{const i=e[l],u=l==="left"?r("device.direction.left","\uC88C"):r("device.direction.right","\uC6B0");return n.jsxs("div",{className:"panel-row__device-column",children:[n.jsxs("div",{className:"panel-row__device-head",children:[n.jsx("span",{className:"panel-row__device-side body-2b",children:u}),i&&t&&n.jsx(Ce,{htmlType:"button",size:32,type:"dot",icon:"x",ariaLabel:`${u} ${r("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C")}`,showTooltipInfo:r("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"),onClick:()=>t(l)})]}),i?n.jsxs("div",{className:"panel-row__device-info",children:[n.jsxs("span",{className:"panel-row__device-kind",children:[i.device&&n.jsx(un,{size:"small",variant:ku(i.device),fill:"soft",label:Nu(i.device,r)}),ju(i)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:ju(i)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),Io(i.wornYear,i.wornMonth,i.wornDay,s.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:r("customers.device.wornSince",{date:Io(i.wornYear,i.wornMonth,i.wornDay,s.language)})})]}):n.jsx("span",{className:"panel-row__device-empty body-3",children:a??r("customers.device.notRegistered","\uBBF8\uB4F1\uB85D")})]},l)})})}function Qa({title:e,titleLevel:t=2,icon:a,disc:r,actions:s,size:l="medium",minHeight:i,maxWidth:u,className:c,scrollable:d,scrollbarGutter:h="auto",compactRows:p=!1,useBorder:C=!0,useBg:g=!0,useRowBorder:_=!0,labelWidth:m,form:f=!1,loading:v,empty:b,children:w}){const y=ke("panel",`panel--${l}`,f?"panel--form":"",i!==void 0?"panel--fill":"",C?"":"panel--no-border",g?"":"panel--no-bg",_?"":"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),m!==void 0&&(B["--panel-label-width"]=typeof m=="number"?`${m}px`:m);const x=t?`h${t}`:"div";return n.jsxs("div",{className:y,style:Object.keys(B).length?B:void 0,children:[(!!e||r!=null)&&n.jsxs("div",{className:ke("panel__header",r!=null?"panel__header--with-disc":""),children:[a&&n.jsx(rt,{icon:a,label:typeof e=="string"?e:void 0,className:"panel__icon"}),n.jsxs("div",{className:"panel__title-group",children:[!!e&&n.jsx(x,{className:`panel__title ${r!=null?"body-3b":"h5b"}`,children:e}),r!=null&&n.jsx("p",{className:"panel__disc caption-1",children:r})]}),s&&n.jsx("div",{className:"panel__actions",children:s})]}),v?n.jsx(cn,{variant:"loading"}):b!=null&&o.Children.toArray(w).length===0?n.jsx(cn,{variant:"empty",children:b}):d?n.jsx("div",{className:ke("panel__body--scroll",h==="stable"&&"panel__body--gutter-stable"),children:w}):w]})}function Nv({cols:e=2,layout:t="grid",gap:a=1,collapseAt:r,className:s,style:l,children:i}){const u=o.useRef(null),[c,d]=o.useState();o.useEffect(()=>{const p=u.current;if(r===void 0||!p||(d(p.clientWidth),typeof ResizeObserver>"u"))return;const C=new ResizeObserver(([g])=>d(g.contentRect.width));return C.observe(p),()=>C.disconnect()},[r]);const h=r!==void 0&&c!==void 0&&c<=r;return n.jsx("div",{ref:u,className:ke("panel-grid",t==="columns"&&"panel-grid--columns",s),style:{"--panel-grid-cols":h?1:e,"--panel-grid-gap":typeof a=="number"?`${a}px`:a,...l},children:i})}function Oo({checked:e=!1,onChange:t,disabled:a,indeterminate:r,label:s,size:l="medium",className:i,title:u,ariaLabel:c}){const d=o.useRef(null),h=o.useId(),p=o.useRef(!!r);return p.current=!!r,o.useEffect(()=>{d.current&&(d.current.indeterminate=!!r)}),n.jsxs("label",{className:ke("checkbox",l==="small"&&"checkbox--small",l==="large"&&"checkbox--large",a&&"checkbox--disabled",i),htmlFor:h,title:u,children:[n.jsx("input",{ref:d,id:h,type:"checkbox",className:"checkbox__input",checked:e,onChange:C=>{t?.(C.target.checked),d.current&&(d.current.indeterminate=p.current)},disabled:a,"aria-label":!s&&c?c:void 0}),n.jsx("span",{className:"checkbox__box"}),s&&n.jsx("span",{className:"checkbox__label body-3",children:s})]})}function Tu(e,t){const a=()=>{if(e){const[m,f]=e.split("-");return{y:+m,m:+f-1}}const[g,_]=cr(t).split("-");return{y:+g,m:+_-1}},[r,s]=o.useState(()=>a().y),[l,i]=o.useState(()=>a().m),u=o.useRef(e);o.useEffect(()=>{if(e===u.current)return;u.current=e;const g=a();s(g.y),i(g.m)},[e]);const c=o.useRef({y:r,m:l});o.useEffect(()=>{c.current={y:r,m:l}},[r,l]);const d=o.useCallback(g=>{const _=c.current.y*12+c.current.m+g,m=Math.floor(_/12),f=_-m*12;c.current={y:m,m:f},s(m),i(f)},[]),h=o.useCallback(()=>d(-1),[d]),p=o.useCallback(()=>d(1),[d]),C=o.useCallback((g,_)=>{c.current={y:g,m:_},s(g),i(_)},[]);return{viewY:r,viewM:l,prevMonth:h,nextMonth:p,setViewYM:C}}function xr(e,t){return new Date(e,t+1,0).getDate()}function Ev(e,t){return new Date(e,t,1).getDay()}function er(e,t,a){return`${e}-${String(t+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function Dv(e){if(!e)return"";const[t,a,r]=e.split("-");return`${t}. ${a}. ${r}.`}function Sv(e){const t=e.replace(/\D/g,"");if(t.length!==8)return null;const a=+t.slice(0,4),r=+t.slice(4,6),s=+t.slice(6,8);if(r<1||r>12||s<1||s>31)return null;const l=new Date(a,r-1,s);return l.getFullYear()!==a||l.getMonth()!==r-1||l.getDate()!==s?null:er(a,r-1,s)}const jv=1900;function Tv(e,t,a,r,s){const l=r?+r.split("-")[0]:Math.min(jv,e),i=s?+s.split("-")[0]:Math.max(t+10,e),u=[];for(let c=l;c<=i;c++)u.push({value:String(c),label:a(c)});return u}function Mu(e,t,a,r){const s=[];for(let l=1;l<=12;l++){const i=`${e}-${String(l).padStart(2,"0")}`;a&&i<a.slice(0,7)||r&&i>r.slice(0,7)||s.push({value:String(l),label:t(e,l)})}return s}function Lu({value:e,onChange:t,size:a=48,min:r,max:s,disabled:l,placeholder:i,className:u,today:c}){const{t:d,i18n:h}=xe.useTranslation(),p=i??d("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),C=o.useMemo(()=>d("calendar.dow",{returnObjects:!0}),[d]),g=cr(c),{viewY:_,viewM:m,prevMonth:f,nextMonth:v,setViewYM:b}=Tu(e,c),w=o.useId(),y=o.useCallback((z,ae)=>{const H=window.innerHeight,W=window.innerWidth,ue=typeof document<"u"?document.getElementById(w):null,Be=Math.max(ue?.offsetHeight||0,ue?.scrollHeight||0)||300,ye=Math.max(z.width,ue?.offsetWidth||0,260),he=H-z.bottom,Ne=z.top,Re=he<Be&&Ne>he,Me=8,se=(Ee,$e)=>Math.min(Math.max(Me,Ee),Math.max(Me,$e));return{position:"fixed",left:se(z.left,W-ye-Me),width:z.width,minWidth:260,...Re?{top:"auto",bottom:se(H-z.top+6,H-Be-Me)}:{bottom:"auto",top:se(z.bottom+6,H-Be-Me)},zIndex:Wa(ae)}},[w]),{open:B,setOpen:x,toggle:N,style:A,triggerRef:D,menuRef:E}=Ha({computeStyle:y,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!B)return;const z=E.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(En)??z)?.focus?.(),()=>{const ae=document.activeElement;(!ae||ae===document.body)&&D.current?.focus?.()}},[B,E,D]);const[k,R]=o.useState(1),$=o.useRef(null),G=o.useRef(null);o.useEffect(()=>{if(!B)return;const z=e&&e.slice(0,7)===`${_}-${String(m+1).padStart(2,"0")}`?+e.slice(8):g.slice(0,7)===`${_}-${String(m+1).padStart(2,"0")}`?+g.slice(8):1;R(z)},[B]),o.useEffect(()=>{if(G.current==null)return;const z=G.current;G.current=null,$.current?.querySelector(`[data-day="${z}"]`)?.focus()}),o.useEffect(()=>{R(z=>Math.min(z,xr(_,m)))},[_,m]);const T=o.useCallback(z=>{let ae=er(z.getFullYear(),z.getMonth(),z.getDate());r&&ae<r&&(ae=r),s&&ae>s&&(ae=s);const[H,W,ue]=ae.split("-").map(Number);(H!==_||W-1!==m)&&b(H,W-1),R(ue),G.current=ue},[r,s,_,m,b]),P=o.useCallback(z=>{const ae=new Date(_,m,k),H=ue=>{ae.setDate(ae.getDate()+ue),T(ae)},W=ue=>{const Be=ae.getFullYear()*12+ae.getMonth()+ue,ye=Math.floor(Be/12),he=Be-ye*12;T(new Date(ye,he,Math.min(ae.getDate(),xr(ye,he))))};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(-ae.getDay());break;case"End":H(6-ae.getDay());break;case"PageUp":z.shiftKey?W(-12):W(-1);break;case"PageDown":z.shiftKey?W(12):W(1);break;default:return}z.preventDefault()},[_,m,k,T]),M=o.useCallback(z=>{l||(t(er(_,m,z)),x(!1))},[_,m,t,x,l]);o.useEffect(()=>{l&&x(!1)},[l,x]);const ee=z=>{const ae=er(_,m,z);return!!(r&&ae<r||s&&ae>s)},Q=(()=>{const z=xr(_,m);if(k>=1&&k<=z&&!ee(k))return k;for(let ae=1;ae<=z;ae++)if(!ee(ae))return ae;return-1})(),F=[];for(let z=0;z<Ev(_,m);z++)F.push(null);for(let z=1;z<=xr(_,m);z++)F.push(z);const Z=a===64?20:a===40?16:18,L=Ul(h.language),V=z=>new Intl.DateTimeFormat(L,{year:"numeric"}).format(new Date(z,0,1)),U=(z,ae)=>new Intl.DateTimeFormat(L,{month:"long"}).format(new Date(z,ae-1,1)),q=Tv(_,+g.slice(0,4),V,r,s),j=Mu(_,U,r,s),I=z=>{const ae=Mu(z,U,r,s);if(ae.length===0)return;const H=ae.some(W=>+W.value===m+1);b(z,H?m:+ae[0].value-1)},[O,Y]=o.useState(null);o.useEffect(()=>{Y(null)},[e]);const K=o.useCallback(z=>{Y(z);const ae=Sv(z);if(!ae||r&&ae<r||s&&ae>s)return;t(ae);const[H,W]=ae.split("-");b(+H,+W-1)},[r,s,t,b]),ie=o.useCallback(()=>{Y(null)},[]),te=o.useCallback(z=>{z.key==="Enter"?(z.preventDefault(),ie(),x(!1)):z.key==="Escape"?(ie(),x(!1)):z.key==="ArrowDown"&&!B&&(z.preventDefault(),x(!0))},[ie,x,B]),ne=B?dn.createPortal(n.jsxs("div",{ref:E,id:w,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:f,"aria-label":d("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(Hs,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(_n,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:q,value:String(_),onChange:z=>I(+z),size:40}),n.jsx(_n,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:j,value:String(m+1),onChange:z=>b(_,+z-1),size:40})]}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:v,"aria-label":d("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(Vs,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:$,onKeyDown:P,children:[C.map(z=>n.jsx("div",{className:"date-picker__dow caption-1",children:z},z)),F.map((z,ae)=>{if(z===null)return n.jsx("div",{},`e${ae}`);const H=er(_,m,z),W=H===e,ue=H===g,Be=ee(z),ye=ae%7;return n.jsx("button",{type:"button",disabled:Be,"data-day":z,tabIndex:z===Q?0:-1,"aria-current":ue?"date":void 0,onClick:()=>!Be&&M(z),className:ke("date-picker__day caption-1",W&&"date-picker__day--selected",ue&&!W&&"date-picker__day--today",Be&&"date-picker__day--disabled",ye===0&&"date-picker__day--sun",ye===6&&"date-picker__day--sat"),children:z},z)})]})]}),document.body):null;return n.jsxs("div",{className:ke("date-picker",`date-picker--s${a}`,B&&"date-picker--open",u),children:[n.jsxs("div",{className:"date-picker__field",children:[n.jsx("input",{ref:D,type:"text",className:"date-picker__trigger body-2",value:O??Dv(e),placeholder:p,onChange:z=>K(z.target.value),onClick:()=>!l&&!B&&N(),onKeyDown:te,onBlur:ie,disabled:l,"aria-haspopup":"dialog","aria-expanded":B,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!l&&N(),disabled:l,tabIndex:-1,"aria-label":p,"aria-haspopup":"dialog","aria-expanded":B,children:n.jsx(Qs,{size:Z,className:"date-picker__icon",strokeWidth:1.5})})]}),ne]})}const $u=["personal","sensitive","marketing"];function Mv({takenKinds:e,busy:t,today:a,onClose:r,onSubmit:s,className:l}){const{t:i}=xe.useTranslation(),[u]=o.useState(()=>cr(a)),[c,d]=o.useState([]),[h,p]=o.useState("paper"),[C,g]=o.useState("self"),[_,m]=o.useState(u),[f,v]=o.useState(""),b=$u.filter(y=>!e.includes(y)),w={personal:i("customers.consent.kind.personal","\uC77C\uBC18 \uAC1C\uC778\uC815\uBCF4"),sensitive:i("customers.consent.kind.sensitive","\uBBFC\uAC10\uC815\uBCF4(\uCCAD\uB825\xB7\uC9C4\uB2E8)"),marketing:i("customers.consent.kind.marketing","\uAD11\uACE0\uC131 \uC815\uBCF4 \uC218\uC2E0")};return n.jsx(Pn,{title:i("customers.consent.record","\uB3D9\uC758 \uBC1B\uAE30"),closeDisabled:t,onClose:r,className:l,footer:()=>n.jsx(Ce,{htmlType:"button",size:48,variant:"main",disabled:t||c.length===0,label:i("customers.consent.submit","\uC800\uC7A5\uD558\uAE30"),onClick:()=>s({kinds:c,method:h,source:C,consentedAt:_||null,note:f.trim()||null})}),children:n.jsxs(Qa,{useBorder:!1,useRowBorder:!1,labelWidth:96,children:[n.jsx(cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.kinds","\uBC1B\uC740 \uAC08\uB798"),children:n.jsxs("div",{className:"consent-record-popup__kinds",children:[b.map(y=>n.jsx(Oo,{checked:c.includes(y),disabled:t,label:w[y],onChange:B=>d(x=>B?[...x,y]:x.filter(N=>N!==y))},y)),b.length===0&&n.jsx("p",{className:"body-3 consent-record-popup__none",children:i("customers.consent.allTaken","\uC138 \uAC08\uB798\uB97C \uC774\uBBF8 \uB2E4 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uBC1B\uC73C\uB824\uBA74 \uBA3C\uC800 \uCCA0\uD68C\uD558\uC138\uC694.")})]})}),n.jsx(cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),children:n.jsx(vn,{size:40,fullWidth:!0,ariaLabel:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),options:[{key:"paper",label:i("customers.consent.method.paper","\uC11C\uBA74")},{key:"verbal",label:i("customers.consent.method.verbal","\uAD6C\uB450")},{key:"electronic",label:i("customers.consent.method.electronic","\uC804\uC790")}],value:h,onChange:y=>p(String(y))})}),n.jsx(cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),children:n.jsx(vn,{size:40,fullWidth:!0,ariaLabel:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),options:[{key:"self",label:i("customers.consent.source.self","\uBCF8\uC778")},{key:"guardian",label:i("customers.consent.source.guardian","\uBCF4\uD638\uC790")},{key:"referral",label:i("customers.consent.source.referral","\uC758\uB8B0\uAE30\uAD00")}],value:C,onChange:y=>g(String(y))})}),n.jsx(cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.day","\uBC1B\uC740 \uB0A0"),children:n.jsx(Lu,{size:48,value:_,max:u,today:a,onChange:y=>m(y??"")})}),n.jsx(cn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.note","\uBA54\uBAA8"),children:n.jsx(Kn,{size:48,fullWidth:!0,value:f,onChange:v,disabled:t,ariaLabel:i("customers.consent.note","\uBA54\uBAA8"),placeholder:i("customers.consent.notePlaceholder","\uC758\uB8B0\uAE30\uAD00 \uC774\uB984 \uB4F1 \u2014 \uBBFC\uAC10\uD55C \uB0B4\uC6A9\uC740 \uC801\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4")})})]})})}function zo({page:e,totalPages:t,onChange:a,prevLabel:r,nextLabel:s,className:l=""}){const{t:i}=xe.useTranslation(),u=r??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=s??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),d=Math.max(1,t),h=()=>a(Math.max(1,Math.min(d,e-1))),p=()=>a(Math.min(d,e+1));return n.jsxs("div",{className:ke("pagination",l),children:[n.jsx(Ce,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-left",ariaLabel:u,disabled:e<=1,onClick:h}),n.jsxs("span",{className:"pagination__info body-3","aria-live":"polite","aria-atomic":"true",children:[Math.min(Math.max(1,e),d)," / ",d]}),n.jsx(Ce,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=t,onClick:p})]})}function Wo({count:e,search:t,segment:a,filters:r,pageSize:s,pagination:l,actions:i,className:u}){const{t:c}=xe.useTranslation(),d=e!=null&&n.jsxs("p",{className:"toolbar__count body-1",role:"status","aria-atomic":"true",children:[e.prefix??c("common.totalPrefix","\uCD1D "),n.jsx("span",{className:"toolbar__count-highlight",children:e.value}),e.unit,e.suffix]}),h=!!(t||r?.length||s||l||i);return n.jsxs("div",{className:ke("toolbar",u),children:[n.jsxs("div",{className:"toolbar__row",children:[d,a&&(Array.isArray(a)?a:[a]).map((p,C)=>n.jsx(vn,{size:zt,...p},p.ariaLabel??C))]}),h&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(Kn,{className:"toolbar__search",size:zt,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(_n,{size:zt,options:p.options,value:p.value,onChange:p.onChange,ariaLabel:p.ariaLabel},C)),(s||l)&&n.jsxs("div",{className:"toolbar__pager",children:[s&&n.jsx(_n,{size:zt,options:s.options,value:s.value,onChange:s.onChange,ariaLabel:s.ariaLabel??c("common.pageSizeSelect","\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218")}),l&&n.jsx(zo,{page:l.page,totalPages:l.total,onChange:l.onChange,prevLabel:l.prevLabel,nextLabel:l.nextLabel})]}),i]})})]})}function Ru(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(Ru).join(""):""}function Lv(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"},Sg={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},jg={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"},Tg={clearAriaLabel:"Clear input"},Mg={ariaLabel:"Select tab"},Lg={ariaLabel:"Tabs"},$g={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},Rg={ariaLabel:"User avatar"},Pg={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},Fg={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"},Ig={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"}},Og={steps:"Step {{current}} of {{total}}"},zg={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"},Wg={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},Hg={viewWords:"Words"},Vg={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},qg={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},Ug={previewRegion:"Report preview \u2014 scrollable sideways"},Gg={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},Kg={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},Yg={clearSelection:"Clear selection"},Zg={showResult:"Show {{type}} result"},Xg={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},Jg={loading:"Loading"},Qg={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},ey={ariaLabel:"Breadcrumb"},ty={empty:"No items yet."},ny={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"},ay={common:ng,calendar:ag,passCard:rg,rating:og,colorPicker:sg,dropdown:lg,accordion:ig,header:ug,nav:cg,settings:dg,usage:pg,account:hg,training:mg,customers:Cg,payment:fg,coupons:bg,visits:gg,trainingType:yg,myWordTable:vg,keyWords:_g,wordTable:xg,wordSearch:wg,wordPrint:Bg,topic:kg,device:Ag,manager:Ng,wordPairs:Eg,footer:Dg,date:Sg,wordData:jg,textField:Tg,segmentedControl:Mg,tabs:Lg,fileUpload:$g,avatar:Rg,myHomework:Pg,trainingStatus:Fg,store:Ig,progress:Og,trainingMiss:zg,table:Wg,wordScore:Hg,topBanner:Vg,datePicker:qg,report:Ug,tooltip:Gg,phonemeProfile:Kg,bulkBar:Yg,debug:Zg,badge:Xg,loader:Jg,soundCompass:Qg,breadcrumb:ey,board:ty,promoBannerBg:ny};const ry="0.404.0",oy=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],fo="ko",sy="ihab_display_language";function Ql(){if(typeof window>"u")return fo;try{const e=localStorage.getItem(sy);if(e&&oy.some(t=>t.code===e))return e}catch{}return fo}function ei(e){try{document.documentElement.lang=e}catch{}}Kt.on("languageChanged",ei),ei(Ql()),Kt.use(_e.initReactI18next).init({resources:{ko:{translation:tg},en:{translation:ay}},lng:Ql(),fallbackLng:fo,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const ly=new Map;try{Kt.store?.on?.("added",()=>ly.clear())}catch{}let hr=null,ti=null,ni=null;function iy(){const e=Wl();if(e&&e.entries.length>0){const t=vf();if(hr&&ti===e&&ni===t)return hr;const a=new Set,r=[];for(const s of e.entries)!s.word||a.has(s.word)||(a.add(s.word),r.push({w:s.word,s:s.syllables,p:t?.[s.word]?[...t[s.word].cho??[],...t[s.word].jung??[],...t[s.word].jong??[]]:[],pron:s.pronunciation||s.word,grade:s.grade}));return hr=r,ti=e,ni=t,hr}return[]}new Proxy([],{get(e,t){const a=iy(),r=a[t];return typeof r=="function"?r.bind(a):r}});function uy(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 cy(e){if(typeof window>"u")return"";const t=(a,r)=>{typeof r.attrValue=="string"&&uy(r.attrValue)&&(r.keepAttr=!1)};da.addHook("uponSanitizeAttribute",t);try{return da.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{da.removeHook("uponSanitizeAttribute",t)}}function dy(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),[l,i]=o.useState(null),[u,c]=o.useState(null),[d,h]=o.useState(null);return o.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){a(null),s(null),i(null),c(null);return}const p=e.split("/").pop();let m=e;p&&(e.startsWith("/")?m=no(e):/^(Logo|Symbol)/i.test(p)?m=no(`logo/${p}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),m=e)),i(null),c(null),a(e),s(m)},[e]),o.useEffect(()=>{if(!r)return;let p=!1;async function m(){try{let g=await fetch(r);g.ok||(g=await fetch(r));const y=g.headers.get("content-type")||"";if(p)return;if(y.includes("svg")){i("mask");return}if(y.startsWith("image/")){i("img");return}const C=await fetch(r);if(!C.ok)throw new Error("not ok");const f=await C.text();if(p)return;if(/^\s*<svg[\s>]/i.test(f)){const _=cy(f);if(!_){i("none");return}c(_),i("inline");return}i("none")}catch{p||i("none")}}return m(),()=>{p=!0}},[r]),o.useEffect(()=>{let p=!1,m=null;return l==="mask"&&r&&fetch(r).then(g=>{if(!g.ok)throw new Error("fetch failed");return g.blob()}).then(g=>{p||(m=URL.createObjectURL(g),h(m))}).catch(()=>{p||i("img")}),()=>{p=!0,m&&URL.revokeObjectURL(m),h(null)}},[l,r]),t===e?{iconToUse:r,mode:l,svgText:u,blobUrl:d}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function ot(e){const{icon:t,label:a,className:r,imgClassName:s,maskClassName:l,svgClassName:i,wrapperStyle:u,size:c}=e||{},d=r??"iconRenderer-icon",h=s??"iconRenderer-icon-image",p=l??"iconRenderer-icon-mask",m=i??"iconRenderer-icon-svg",g=typeof t=="string"?t:null,y=Q0(g),{iconToUse:C,mode:f,svgText:_,blobUrl:b}=dy(g),w=(B,E={})=>n.jsx("span",{className:d,style:u,...E,children:B}),v=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,k=(B,E={})=>n.jsx("img",{src:B,alt:typeof a=="string"?a:typeof a=="number"?String(a):"",className:h,...E,style:v?{...E.style,...v}:E.style});if(!t)return null;if(typeof t!="string")return w(t);if(t==="none")return w(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true"></svg>'}}),{"aria-hidden":"true"});if(y)try{return w(o.createElement(y,{className:m,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(C&&C.endsWith(".svg")){if(f==="mask"){const B={"--icon-url":b?`url(${b})`:`url(${C})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return w(n.jsx("span",{className:p,style:B}),{"aria-hidden":"true"})}return f==="img"?w(k(C,{onError:B=>{B.currentTarget.onerror=null,B.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):f==="inline"?w(n.jsx("span",{className:m,dangerouslySetInnerHTML:_?{__html:_}:void 0}),{"aria-hidden":"true"}):w(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return k(no(t),{style:u,onError:B=>{B.currentTarget.onerror=null,B.currentTarget.style.display="none"}});const x=typeof c=="number"?c:20,A=`<svg width="${x}" height="${x}" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="3" y="3" width="18" height="18" rx="2" ry="2" style="fill:none;stroke:currentColor;stroke-width:2"/></svg>`;return w(n.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:A}}),{"aria-hidden":"true"})}function ai(e){const[t,a]=o.useState(!1),r=o.useRef(!1),s=o.useRef(!0);o.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]);const l=o.useCallback(()=>{if(!e||r.current)return;const i=e();if(i&&typeof i.then=="function"){r.current=!0,a(!0);const u=()=>{r.current=!1,s.current&&a(!1)};i.then(u,u)}},[e]);return{pending:t,press:l}}function py({icon:e,title:t,message:a,action:r,className:s}){const{pending:l,press:i}=ai(r?.onClick);return n.jsxs("div",{className:Be("empty-state",s),children:[e&&n.jsx(ot,{icon:e,size:48,className:"empty-state__icon"}),t&&n.jsx("p",{className:"empty-state__title h4",children:t}),a&&n.jsx("p",{className:"empty-state__message body-3",children:a}),r&&n.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:i,disabled:l,"aria-busy":l||void 0,children:[r.icon&&n.jsx(ot,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function hy({message:e,hint:t,icon:a="triangle-alert",onRetry:r,retryLabel:s,className:l}){const{t:i}=_e.useTranslation(),{pending:u,press:c}=ai(r);return n.jsxs("div",{className:Be("empty-state","error-state",l),role:"alert",children:[n.jsx(ot,{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(ot,{icon:"rotate-cw",className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:s??i("common.errorState.retry",{defaultValue:"\uB2E4\uC2DC \uC2DC\uB3C4"})})]})]})}function my({icon:e,title:t,description:a,cta:r,tone:s="main",disabled:l=!1,onClick:i,className:u=""}){const c=o.useId(),d=`${c}-title`,h=`${c}-desc`,p=`${c}-cta`,m=()=>{l||i?.()};return n.jsx("section",{role:"button",tabIndex:l?-1:0,"aria-disabled":l||void 0,"aria-labelledby":d,"aria-describedby":`${h} ${p}`,onClick:m,onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),m())},className:Be("action-card",`action-card--${s}`,l&&"action-card--disabled",u),children:n.jsxs("div",{className:"action-card__body",children:[n.jsx("span",{"aria-hidden":!0,className:"action-card__chip",children:n.jsx(ot,{icon:e,size:34})}),n.jsxs("div",{className:"action-card__text",children:[n.jsx("h2",{id:d,className:"action-card__title",children:t}),n.jsx("p",{id:h,className:"action-card__desc",children:a})]}),n.jsxs("div",{className:"action-card__cta",children:[n.jsx("span",{id:p,children:r}),n.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:n.jsx(ot,{icon:"arrow-right",size:18})})]})]})})}function Cy({as:e="div",className:t="",children:a,storage:r,...s}){r&&O1({resolveUrl:r.resolveUrl,download:r.download??(()=>Promise.reject(new Error("[ihabdevteam-core] CoreScope: download resolver\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."))),exists:r.exists,resolvePath:r.resolvePath,noiseBaseUrl:r.noiseBaseUrl,noiseFileGain:r.noiseFileGain});const l=Be("ihabdevteam-core-scope",t);return n.jsx(e,{className:l,...s,children:a})}function fy(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 bo(e,t=!0){o.useEffect(()=>{if(!t)return;const a=e.current;if(!a)return;const r=s=>{if(s.key!=="Tab")return;const l=Array.from(a.querySelectorAll(En)).filter(fy);if(!l.length){s.preventDefault();return}const i=l[0],u=l[l.length-1],c=document.activeElement,d=c===a;s.shiftKey&&(c===i||d)?(s.preventDefault(),u.focus()):!s.shiftKey&&c===u&&(s.preventDefault(),i.focus())};return a.addEventListener("keydown",r),()=>a.removeEventListener("keydown",r)},[e,t])}const En='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',go=new WeakMap;function yo(e,t){e&&go.set(e,t)}function vo(e){let t=e;for(let a=0;t&&!t.isConnected&&a<10;a++){let r=t;for(;r&&!go.has(r);)r=r.parentElement;if(!r)return t;t=go.get(r)??null}return t}function ri(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 mr(e,t,a){const r=e?.isConnected?e:a?.isConnected?a:null;if(ri(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!r)return null;const s=Array.from(document.querySelectorAll(En)).filter(c=>!(e&&e.contains(c))&&ri(c));let l=null,i=null;for(const c of s)r.compareDocumentPosition(c)&Node.DOCUMENT_POSITION_PRECEDING?l=c:i||(i=c);const u=l??i;return u?.focus(),u}function by({title:e="",lines:t=[],notices:a=null,children:r,variant:s="default",dismissible:l=!1,className:i=""}){const{t:u}=_e.useTranslation(),[c,d]=o.useState(!1),h=o.useRef(null),p=o.useCallback(()=>{const C=h.current;C&&C.contains(document.activeElement)&&mr(C),d(!0)},[]);if(c)return null;const m=`notice-box notice-box--${s} body-2 ${i}`.trim(),g=l&&n.jsx("button",{type:"button",className:"notice-box__dismiss",onClick:p,"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"});if(a&&Array.isArray(a)&&a.length)return n.jsxs("div",{className:m,role:"note",children:[a.map((C,f)=>n.jsxs("div",{className:"notice-box__inner",children:[C.title?n.jsx("span",{className:"notice-box__title body-3",children:C.title}):null,n.jsx("div",{className:"notice-box__body",children:C.lines&&C.lines.length?n.jsx("div",{children:C.lines.map((_,b)=>n.jsx("span",{className:"notice-box__line body-3",children:_},b))}):C.children??null})]},f)),g]});const y=e||t.length?n.jsxs("div",{className:"notice-box__inner",children:[e?n.jsx("span",{className:"notice-box__title body-1",children:e}):null,n.jsx("div",{className:"notice-box__body",children:t.length?n.jsx("ul",{children:t.map((C,f)=>n.jsx("li",{className:"notice-box__line",children:C},f))}):r})]}):n.jsx("div",{className:"notice-box__inner",children:r});return n.jsxs("div",{ref:h,className:m,role:"note",children:[y,g]})}const gy={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function Ca(e){const{t}=_e.useTranslation(),{variant:a="spinner",size:r=24,progress:s=null,label:l}=e||{},i=l||t("loader.loading","Loading");if(a==="bar"){const c=s==null||!Number.isFinite(Number(s)),d=c?0:Math.max(0,Math.min(100,Number(s)));return n.jsx("div",{className:`loader-bar${c?" loader-bar--indeterminate":""}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c?void 0:d,"aria-label":i,children:n.jsx("div",{className:"loader-bar__inner",style:c?void 0:{width:`${d}%`}})})}const u=typeof r=="number"?`${r}px`:r;return n.jsxs("div",{className:"loader-spinner",style:{width:u,height:u},role:"status","aria-label":i,children:[n.jsx("span",{style:gy,children:i}),n.jsxs("svg",{className:"loader-spinner__svg",viewBox:"0 0 50 50",width:r,height:r,children:[n.jsx("circle",{className:"loader-spinner__bg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4"}),n.jsx("circle",{className:"loader-spinner__fg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4",strokeLinecap:"round"})]})]})}const fa=[];let Cr=!1;function oi(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=fa[fa.length-1];t&&(e.stopPropagation(),t())}function Qn(e){return fa.push(e),!Cr&&typeof document<"u"&&(document.addEventListener("keydown",oi),Cr=!0),()=>{const t=fa.lastIndexOf(e);t>=0&&fa.splice(t,1),fa.length===0&&Cr&&typeof document<"u"&&(document.removeEventListener("keydown",oi),Cr=!1)}}const si=o.createContext(null);function yy(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const li=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function vy(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 Ps.useSyncExternalStore(t,()=>li(e),()=>!1)}function _y(e){const[t,a]=o.useState(li(e));return o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const r=window.matchMedia(e),s=i=>a(i.matches),l=r;return l.addEventListener?l.addEventListener("change",s):l.addListener&&l.addListener(s),a(r.matches),()=>{l.removeEventListener?l.removeEventListener("change",s):l.removeListener&&l.removeListener(s)}},[e]),t}const xy=typeof Ps.useSyncExternalStore=="function"?vy:_y;function yn(e){const t=o.useContext(si),a=xy(e);return t&&typeof t.mobile=="boolean"&&yy(e)?t.mobile:a}const wy="(prefers-reduced-motion: reduce)";function _o(){return yn(wy)}const ii={"menu-tooltip":"tooltip-menu","description-tooltip":"tooltip-description","text-box-tooltip":"tooltip-textbox","training-tooltip":"tooltip-training","word-image-tooltip":"tooltip-word-image","info-tooltip":"tooltip-info","noise-settings-tooltip":"noise-settings",tooltip__header:"tooltip-content__header",tooltip__content:"tooltip-content",tooltip__backdrop:"tooltip-backdrop",tooltip__portal:"tooltip-portal","word-table__section":"word-table-block","word-table__content":"word-table-block__content","word-table__card":"word-table-block__card","word-table__card-handle":"word-table-block__card-handle","word-table__card-close":"word-table-block__card-close","word-table__card-actions":"word-table-block__card-actions","word-table__edit-cell":"word-table-block__edit-cell","word-table__pair-divider":"word-table-block__pair-divider","chart-section__legend-dot":"manager-bar-chart-legend-dot","chart-section__legend-item":"manager-bar-chart-legend-item","chart-section__legend":"manager-bar-chart-legend","chart-section__controls":"manager-section-controls","chart-section__sub-row":"barchart-sub-row","chart-section__total":"barchart-total","chart-section":"manager-section","bar-chart__stack-segment":"manager-bar-chart-stack-segment","bar-chart__detail-btn":"manager-bar-chart-detail-btn","bar-chart__gridline":"manager-bar-chart-gridline","bar-chart__loading":"manager-bar-chart-loading","bar-chart__scroll":"manager-bar-chart-scroll","bar-chart__stack":"manager-bar-chart-stack","bar-chart__x-axis":"manager-bar-chart-x-axis","bar-chart__inner":"manager-bar-chart-inner","bar-chart__area":"manager-bar-chart-area","bar-chart__plot":"manager-bar-chart-plot","bar-chart__wrap":"manager-bar-chart-wrap","bar-chart__slot":"manager-bar-chart-slot","bar-chart__col":"manager-bar-chart-col","bar-chart__bar":"manager-bar-chart-bar","stat-chart__card":"manager-stat-card"};function By(e,t){const a=Object.keys(e).sort((r,s)=>s.length-r.length);for(const r of a){if(!t.startsWith(r))continue;const s=t.slice(r.length);if(!(s!==""&&!s.startsWith("__")&&!s.startsWith("--")))return e[r]+s}return null}function ky(e){return By(ii,e)}function se(e){if(!e||Object.keys(ii).length===0)return e;const t=[];for(const a of e.split(/\s+/)){if(!a)continue;const r=ky(a);r&&t.push(r)}return t.length?`${e} ${t.join(" ")}`:e}function Bn(e){const{anchorRect:t,anchorEl:a,offset:r=20,edgeMargin:s=20,onClose:l,closeOnOutsideClick:i=!0,className:u="",role:c="dialog",ariaLabel:d="",children:h,backdrop:p=!1,isMobilePopup:m=!1,useBorder:g=!0,header:y,focusOnOpen:C}=e||{},f=o.useRef(null),[_,b]=o.useState({position:"fixed",left:0,top:-9999}),[w,v]=o.useState(!1),[k,x]=o.useState("bottom"),[A,B]=o.useState(!1),[E,D]=o.useState(!1),N=!t&&!a,$=o.useRef(null),L=o.useCallback((R=!1,q=!1)=>{if(E&&m)return;const Z=a?a.getBoundingClientRect():t,z=q&&$.current?$.current:Z;if(!z||!f.current)return;const j=f.current,{offsetWidth:F,offsetHeight:O}=j,G=window.innerWidth,ie=window.innerHeight,K=G-z.right,pe=z.left,X=z.top,H=ie-z.bottom;let ne=0,V=0,W="top";if(X>=O+r)W="top",V=z.top-r-O,ne=z.left+z.width/2-F/2;else if(H>=O+r)W="bottom",V=z.bottom+r,ne=z.left+z.width/2-F/2;else if(K>=F+r)W="right",ne=z.right+r,V=z.top+z.height/2-O/2;else if(pe>=F+r)W="left",ne=z.left-r-F,V=z.top+z.height/2-O/2;else{const me=Math.max(X,H,K,pe);me===X?(W="top",V=z.top-r-O,ne=z.left+z.width/2-F/2):me===H?(W="bottom",V=z.bottom+r,ne=z.left+z.width/2-F/2):me===K?(W="right",ne=z.right+r,V=z.top+z.height/2-O/2):(W="left",ne=z.left-r-F,V=z.top+z.height/2-O/2)}const oe=Number.isFinite(Number(s))?Number(s):8;ne=Math.min(Math.max(ne,oe),G-F-oe),V=Math.min(Math.max(V,oe),ie-O-oe);const xe=Math.round(ne),be=Math.round(V);R&&f.current?(f.current.style.left=`${xe}px`,f.current.style.top=`${be}px`,f.current.dataset.placement=W):(x(W||k),b({position:"fixed",left:xe,top:be}),B(!0))},[E,m,a,t,r,s,k]);o.useEffect(()=>()=>{$.current=null},[a,t]),o.useLayoutEffect(()=>{if(N)return;if(E&&m){b({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),B(!0);return}$.current===null&&($.current=a?a.getBoundingClientRect():t??null),L(!1,!0);const R=requestAnimationFrame(()=>L(!1,!0));return()=>cancelAnimationFrame(R)},[t,a,r,h,s,N,E,m,L]),o.useEffect(()=>{if(N||E&&m||!f.current||typeof ResizeObserver>"u")return;const R=new ResizeObserver(()=>{t&&L()});return R.observe(f.current),()=>R.disconnect()},[t,h,s,N,E,m,L]),o.useEffect(()=>{if(N||E&&m)return;let R=null;const q=()=>{if(a&&($.current=a.getBoundingClientRect()),typeof requestAnimationFrame>"u"){L(!0);return}R===null&&(R=requestAnimationFrame(()=>{R=null,L(!0)}))},Z=z=>{if(!a&&l){const j=z.target;if(j&&f.current&&f.current.contains(j))return;try{if(j&&j.closest&&j.closest("[data-tooltip-ignore]"))return}catch{}ee.current(!0);return}q()};return window.addEventListener("resize",q),document.addEventListener("scroll",Z,{passive:!0,capture:!0}),()=>{R!==null&&cancelAnimationFrame(R),window.removeEventListener("resize",q),document.removeEventListener("scroll",Z,{capture:!0})}},[t,a,l,r,h,s,N,E,m,L]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const R=window.matchMedia("(max-width: 768px)"),q=()=>D(!!R.matches);q();try{R.addEventListener?R.addEventListener("change",q):R.addListener(q)}catch{try{R.addListener(q)}catch{}}return()=>{try{R.removeEventListener?R.removeEventListener("change",q):R.removeListener(q)}catch{}}},[]);const U=o.useRef(!1),M=o.useRef(null),P=_o(),T=o.useCallback((R=!1)=>{if(l&&!(w||U.current)){if(U.current=!0,R){v(!0);try{l&&l()}catch{U.current=!1,v(!1)}return}v(!0),M.current=setTimeout(()=>{M.current=null;try{l&&l()}catch{U.current=!1,v(!1)}},P?0:200)}},[w,l,v,P]);o.useEffect(()=>()=>{M.current&&clearTimeout(M.current)},[]),o.useEffect(()=>{if(N)return;const R=z=>{const j=f.current;if(!j)return;const F=z.target;if(F&&!j.contains(F)){try{if(F.closest&&F.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},q=z=>{const j=f.current;if(!j)return;const F=z.target;if(F&&!j.contains(F)){try{if(F.closest&&F.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},Z=z=>{if(z.key==="Tab"){const j=f.current;if(!j)return;const F=j.querySelectorAll(En);if(!F||F.length===0)return;const O=F[0],G=F[F.length-1],ie=document.activeElement;z.shiftKey?ie===O&&(z.preventDefault(),G.focus()):ie===G&&(z.preventDefault(),O.focus())}};return document.addEventListener("pointerdown",R,!0),document.addEventListener("click",q,!0),document.addEventListener("keydown",Z),()=>{document.removeEventListener("pointerdown",R,!0),document.removeEventListener("click",q,!0),document.removeEventListener("keydown",Z)}},[l,i,T,N]);const ee=o.useRef(T);o.useEffect(()=>{ee.current=T});const te=!!l;o.useEffect(()=>{if(!(N||!te))return Qn(()=>ee.current())},[N,te]),o.useEffect(()=>{const R=()=>{T(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",R),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",R)}},[T]);const I=o.useRef(null);o.useEffect(()=>{if(N||C===!1||!A)return;const R=f.current;if(!R)return;const q=R.querySelector(En);if(q)return I.current=document.activeElement,q.focus({preventScroll:!0}),()=>{const Z=I.current;I.current=null,Z&&document.contains(Z)&&Z.focus({preventScroll:!0})}},[N,C,A]),o.useEffect(()=>{c==="dialog"&&!d&&At("tooltip-no-name",'[ihab/Tooltip] \uC774\uB984 \uC5C6\uB294 role="dialog" \uC785\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. \uB0AD\uB3C5\uAE30\uAC00 "\uB300\uD654\uC0C1\uC790" \uB77C\uACE0\uB9CC \uC77D\uC2B5\uB2C8\uB2E4.')},[c,d]);const Y=n.jsxs("div",{ref:f,className:se(`tooltip__content ${N?"tooltip__content--inline":""} ${g?"tooltip__content--bordered":""} ${w?"is-closing":""} ${u} ${E&&m?"is-mobile":""}`),role:c,"aria-label":d||void 0,style:N?{}:{..._,visibility:A?"visible":"hidden"},tabIndex:-1,"data-placement":k,"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:[y!=null&&n.jsx("div",{className:se("tooltip__header h5"),children:y}),h]});if(N||typeof document>"u")return Y;if(p||E&&m){const R=n.jsxs("div",{className:se("tooltip__portal"),children:[n.jsx("div",{className:se("tooltip__backdrop"),onClick:()=>{i&&T(!0)}}),Y]});return hn.createPortal(R,document.body)}return hn.createPortal(Y,document.body)}function Mn(e){const{anchorRect:t,text:a,offset:r=8,onClose:s,className:l="",ariaLabel:i}=e||{};return a?n.jsx(Bn,{anchorRect:t,offset:r,onClose:s,closeOnOutsideClick:!1,className:se(`info-tooltip ${l}`),ariaLabel:i||a,children:n.jsx("div",{className:se("info-tooltip__content body-3"),children:a})}):null}function qn(e){const{t}=_e.useTranslation(),{anchorRect:a,title:r,items:s,activeIndex:l=-1,showIndex:i=!0,onClose:u,offset:c=12,closeOnOutsideClick:d=!0}=e||{},h=(Array.isArray(s)?s:s?[s]:[]).map(p=>typeof p=="string"?{text:p}:p);return!h.length&&!r?null:n.jsx(Bn,{anchorRect:a,offset:c,onClose:u,closeOnOutsideClick:d,useBorder:!1,className:se("description-tooltip"),ariaLabel:r||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:se("description-tooltip__box"),children:[r&&n.jsx("span",{className:se("description-tooltip__title body-2"),children:r}),n.jsx("ol",{className:se("description-tooltip__items"),children:h.map((p,m)=>n.jsxs("li",{className:se(`description-tooltip__item body-3${m===l?" description-tooltip__item--active":""}`),children:[i&&h.length>1&&n.jsxs("span",{className:se("description-tooltip__index button-1"),children:[m+1,"."]}),p.color&&n.jsx("span",{className:se("description-tooltip__dot"),style:{background:p.color},"aria-hidden":"true"}),n.jsx("span",{children:p.text})]},m))})]})})}function Ia(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let xo=0,ui=!1;function ci(){ui||typeof document>"u"||(ui=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(xo=Date.now())},!0),document.addEventListener("touchstart",()=>{xo=Date.now()},{capture:!0,passive:!0}))}ci();function Un(e){return!!e&&e.pointerType==="touch"}function ea(e=1e3){return ci(),Date.now()-xo<e}function fr(e,t,a,{enabled:r=!0,fallbackOnParent:s=!1}={}){const l=Ia(e),i=Ia(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!r||typeof document>"u")return;const h=p=>{const m=p,g=p.target,y=a.current,C=!!(g&&y&&y.contains(g));if(m.pointerType!=="touch"){C&&(u.current=null);return}if(C){u.current=l.current;return}u.current=null,l.current&&!(g&&g.closest?.(".tooltip__content"))&&i.current(!1,y)};return document.addEventListener("pointerdown",h,!0),()=>document.removeEventListener("pointerdown",h,!0)},[r,a,l,i]);const d=o.useCallback(h=>{const p=u.current;return p===null?!1:(u.current=null,c.current=Date.now(),i.current(!p,h??a.current),!0)},[a,i]);return o.useEffect(()=>{if(!r||!s)return;const h=a.current,p=h?.parentElement;if(!h||!p)return;let m=null;const g=f=>{const _=f.changedTouches?.[0];if(!_)return!1;const b=h.getBoundingClientRect();return _.clientX>=b.left&&_.clientX<=b.right&&_.clientY>=b.top&&_.clientY<=b.bottom},y=f=>{m=g(f)?l.current:null},C=f=>{const _=m;m=null,!(_===null||Date.now()-c.current<700||!g(f))&&(u.current=null,c.current=Date.now(),i.current(!_,h))};return p.addEventListener("touchstart",y,{passive:!0}),p.addEventListener("touchend",C),()=>{p.removeEventListener("touchstart",y),p.removeEventListener("touchend",C)}},[r,s,a,l,i]),{touchPress:d}}function Ay(e,t){const{size:a=48,type:r,htmlType:s,href:l,target:i,rel:u,icon:c,rightIcon:d,label:h,count:p,subLabel:m,children:g,ariaLabel:y,variant:C="default",align:f="center",nowrap:_=!1,selected:b,toggleable:w=!1,ariaExpanded:v,ariaControls:k,disabled:x=!1,loading:A=!1,useLabel:B=!0,useBorder:E=!0,useBG:D=!0,useDisabledCovered:N=!1,useDisabledInvisible:$=!1,useDisabledFilled:L=!1,width:U,minWidth:M,onClick:P,onDisabledClick:T,showTooltipInfo:ee=!1,tooltipInfoText:te=null,tooltipDescription:I=null,tooltipOnly:Y=!1,iconSize:R="medium",iconColor:q,shape:Z="rounded",color:z,className:j,...F}=e,O=typeof a=="string"&&isNaN(Number(a))?a.toLowerCase():String(Number(a)||48),G=O.match(/^\d+$/)?`button${O}`:`button-${O}`,ie=Number(a),K=!isNaN(ie)&&ie<40?"button-2":"button-1",pe=h??g,X=x||!!F.disabled,H=X?N?"disabled-covered":$?"disabled-invisibled":L?"disabled-filled":"disabled":C,ne=H?`button--variant-${H}`:"",V=f?`button--align-${f}`:"",W=_?"button--nowrap":"",oe=Z?`button--shape-${Z}`:"",xe=typeof q=="string"&&q.startsWith("--")?`var(${q})`:q,be={...U?{width:typeof U=="number"?`${U}px`:U}:{},...M?{minWidth:typeof M=="number"?`${M}px`:M}:{},...E?{}:{"--button-border":X?"0":"1px solid transparent"},...xe?{"--button-icon-color":xe}:{},...z?{"--color-main":z}:{}},me=B===!1?"":pe,ke=Array.isArray(me)?me.length>0:!!me,Le=!!d,Me=r??(ke||c||Le?"bar":"dot"),le=`${G}--${Me}`,ve=o.useRef(null);o.useEffect(()=>{!zn||s!==void 0||ve.current?.closest("form")&&At(`button-in-form:${typeof pe=="string"?pe:""}`,'[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 pe=="string"&&pe?` \uB2E8\uCD94: ${pe}`:""))},[s,pe]);const $e=o.useRef(t);$e.current=t;const Ae=o.useCallback(je=>{ve.current=je;const nt=$e.current;typeof nt=="function"?nt(je):nt&&(nt.current=je)},[]),Ie=o.useRef(X),[ze,dt]=o.useState(!!b),[st,et]=o.useState(!1),[gt,Se]=o.useState(null),Ge=o.useCallback(()=>et(!1),[]),[we,qe]=o.useState(!1),Ye=o.useId();o.useEffect(()=>{typeof b=="boolean"&&dt(b)},[b]),o.useEffect(()=>{if(Ie.current&&!X&&ve.current){const je=ve.current;let nt=!1;try{nt=je.matches(":focus:not(:focus-visible)")}catch{nt=!1}nt&&je.blur(),je.style.pointerEvents="none";const ae=requestAnimationFrame(()=>{requestAnimationFrame(()=>{ve.current&&(ve.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(ae)}Ie.current=X},[X]);const mt=typeof b=="boolean"?!!b:ze,wt=typeof v=="boolean"?void 0:w||typeof b=="boolean"?mt?"true":"false":F["aria-pressed"],yt=Be("button",G,le,ne,V,W,oe,mt?"is-selected":null,D?null:"button--no-bg",Y?"button--tooltip-only":null,j),Et=`button__icon button__icon--${R}`,at=Array.isArray(m)?m:m!==void 0?[m]:[],rt=()=>{if(Array.isArray(me))return me.map((nt,ae)=>{const ye=at[ae];return n.jsxs("span",{className:`button__label-text${ye!==void 0?" button__label-text--has-sub":""}`,children:[nt,ye!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:ye})]},ae)});const je=m!==void 0;return n.jsxs("span",{className:`button__label-text${je?" button__label-text--has-sub":""}`,children:[me,p!=null&&n.jsx("span",{className:"button__count",children:p}),je&&n.jsx("span",{className:"button__sub-label-text caption-1",children:m})]})},Dt=je=>{typeof b!="boolean"&&!w&&dt(!1),je.currentTarget.blur()},Bt=je=>{X||(typeof F.onMouseLeave=="function"&&F.onMouseLeave(je),Dt(je))},Lt=je=>{if(Y&&lt&&Ct.touchPress(je.currentTarget),X){lt&&Ct.touchPress(je.currentTarget),je.preventDefault(),T?.(je);return}typeof b!="boolean"&&w&&dt(nt=>!nt),P?.(je)},It=o.useCallback(()=>{(ee||I)&&(et(!0),Se(ve.current?.getBoundingClientRect()??null))},[ee,I]),xt=o.useCallback(()=>{(ee||I)&&(et(!1),Se(null))},[ee,I]),lt=!!(ee||I),Ct=fr(st,je=>{je?It():xt()},ve,{enabled:lt&&(X||Y),fallbackOnParent:lt&&X}),it={...F};delete it.disabled,delete it.className,delete it.faded,delete it.useFaded,delete it.loading,delete it.onMouseLeave,delete it.onPointerEnter,delete it.onPointerLeave,delete it.onPointerUp,delete it.onFocus,delete it.onBlur,X&&(Object.keys(it).forEach(je=>{/^on[A-Z]/.test(je)&&typeof it[je]=="function"&&delete it[je]}),it["aria-disabled"]="true"),A&&(it["aria-busy"]="true");const _t=(typeof ee=="string"?ee:null)??(typeof te=="string"?te:null)??(typeof y=="string"?y:null)??(typeof pe=="string"?pe:null)??void 0,ut=typeof y=="string"?y:typeof pe=="string"?pe:_t,St=I?[I.title,...I.items??[]].filter(Boolean).join(". "):ee&&_t&&_t!==ut?_t:"",ue=[typeof F["aria-describedby"]=="string"?F["aria-describedby"]:void 0,St?Ye:null].filter(Boolean).join(" ")||void 0,Te=()=>n.jsx("span",{className:`${Et} button__spinner`,"aria-hidden":"true",children:n.jsx(Ca,{variant:"spinner",size:"100%"})}),Ne=(je,nt)=>n.jsx(ot,{icon:je,label:nt??ut,className:Et,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),tt=je=>A?Te():Ne(c,je),pt=()=>Me==="dot"?n.jsxs(n.Fragment,{children:[tt(),ke&&n.jsx("span",{className:`button__label ${K}`,children:rt()})]}):f==="center"&&(c||A)?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"button__center-group",children:[n.jsx("span",{className:"button__left",children:tt()}),ke&&n.jsx("span",{className:`button__label ${K}`,children:rt()})]}),Le&&n.jsx("span",{className:"button__right",children:Ne(d)})]}):n.jsxs(n.Fragment,{children:[(c||A)&&n.jsx("span",{className:"button__left",children:tt(y??pe)}),ke&&n.jsx("span",{className:`button__label ${K}`,children:rt()}),Le&&n.jsx("span",{className:"button__right",children:Ne(d)})]}),jt=!!l&&!X;return n.jsxs(n.Fragment,{children:[n.jsxs(jt?"a":"button",{...it,ref:Ae,...jt?{href:l,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:s??"button",disabled:X&&!T&&!we},className:yt,"aria-pressed":wt,"aria-expanded":typeof v=="boolean"?v:F["aria-expanded"],"aria-controls":k??F["aria-controls"],"aria-label":ut,"aria-disabled":X&&(jt||T||we)?!0:void 0,"aria-describedby":ue,style:be,onClick:Lt,onMouseLeave:Bt,onPointerEnter:je=>{Un(je)||It(),!X&&typeof F.onPointerEnter=="function"&&F.onPointerEnter(je)},onPointerLeave:je=>{Un(je)||xt(),!X&&typeof F.onPointerLeave=="function"&&F.onPointerLeave(je)},onPointerUp:je=>{X&&lt&&Ct.touchPress(je.currentTarget),!X&&typeof F.onPointerUp=="function"&&F.onPointerUp(je)},onFocus:je=>{qe(!0),ea()||It(),!X&&typeof F.onFocus=="function"&&F.onFocus(je)},onBlur:je=>{qe(!1),X||Dt(je),xt(),!X&&typeof F.onBlur=="function"&&F.onBlur(je)},children:[pt(),St?n.jsx("span",{id:Ye,hidden:!0,"aria-label":St}):null]}),st&&I?n.jsx(qn,{anchorRect:gt,title:I.title,items:I.items,onClose:Ge}):st&&_t?n.jsx(Mn,{anchorRect:gt,text:_t,onClose:Ge}):null]})}const fe=o.forwardRef(Ay);fe.displayName="Button";function Rt(e,t,a){const r=o.useRef(null);return o.useLayoutEffect(()=>{const s=r.current?.parentElement??null;return t(s,e),()=>a(s)},[e,t,a]),r}const Oa={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},wo=new WeakMap;function Bo(e){if(e)return wo.get(e)}function tn(e,t){e&&(e.style.setProperty(Oa.title,t.title),e.style.setProperty(Oa.description,t.description),wo.set(e,t))}function nn(e){e&&(e.style.removeProperty(Oa.title),e.style.removeProperty(Oa.description),wo.delete(e))}const di={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function pi(){const e=Rt(di,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const hi={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function mi(){const e=Rt(hi,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const Ci={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function fi(){const e=Rt(Ci,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const bi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function gi(){const e=Rt(bi,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const yi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function vi(){const e=Rt(yi,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const _i={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function xi(){const e=Rt(_i,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const wi={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function Bi(){const e=Rt(wi,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const ki={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Ai(){const e=Rt(ki,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const Ni={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function Ei(){const e=Rt(Ni,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const Di={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function Si(){const e=Rt(Di,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const ji={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function Ti(){const e=Rt(ji,tn,nn);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 Mi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Li(){const e=Rt(Mi,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const $i={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function Ri(){const e=Rt($i,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Pi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function Fi(){const e=Rt(Pi,tn,nn);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const sn=(e,t,a)=>({key:e,get label(){return Kt.t(`promoBannerBg.${e}`,t)},textTone:a}),Ny=[sn("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),sn("soft","\uC18C\uD504\uD2B8","dark"),sn("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),sn("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),sn("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),sn("warm","\uC6DC(\uAC15\uC870)","dark"),sn("dark","\uB2E4\uD06C","light"),sn("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),sn("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),sn("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),sn("outline","\uC544\uC6C3\uB77C\uC778","dark"),sn("success","\uC131\uACF5/\uC644\uB8CC","light"),sn("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),sn("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],Ii={main:pi,soft:mi,sub:fi,deep:gi,softSub:vi,warm:xi,dark:Bi,radial:Ai,diagonal:Ei,dots:Si,outline:Ti,success:Li,naver:Ri,instagram:Fi};function Oi({storageKey:e="fontScale",baseFont:t=20,minScale:a=.8,maxScale:r=1.4,step:s=.1,lineHeightRatio:l=1.4}={}){const i=w=>Math.max(a,Math.min(r,Number(w))),u=w=>{try{const v=localStorage.getItem(w),k=v?Number(v):1;return Number.isFinite(k)?i(k):i(1)}catch{return i(1)}},[c,d]=o.useState(()=>u(e)),[h,p]=o.useState(e);h!==e&&(p(e),d(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const m=w=>{d(typeof w=="function"?v=>i(w(v)):i(w))},g=()=>m(w=>+(w+s).toFixed(6)),y=()=>m(w=>+(w-s).toFixed(6)),C=c<r-Number.EPSILON,f=c>a+Number.EPSILON,_=Math.round(t*c),b=Math.round(_*l);return{scale:c,setScale:m,increase:g,decrease:y,canIncrease:C,canDecrease:f,fontSize:_,lineHeight:b}}function zi(e,t){const a=Ia(t);o.useEffect(()=>{const r=()=>a.current();try{window.addEventListener(e,r)}catch{}return()=>{try{window.removeEventListener(e,r)}catch{}}},[e,a])}const ko=" \xB7 ",Wi=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(ko)?e.split(ko).pop()??e:e})(),Ey=o.createContext(!1),ta=[];let Hi=null;function Dy(e){const t=o.useContext(Ey);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;ta.length===0&&(Hi=document.title);const a={text:Wi?`${e}${ko}${Wi}`:e};return ta.push(a),document.title=a.text,()=>{const r=ta.lastIndexOf(a);r>=0&&ta.splice(r,1),document.title=ta.length?ta[ta.length-1].text:Hi??document.title}},[e,t])}const Ao=[{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"}],Sy=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function fn(e,t){return Sy().compare(e,t)}const br=new Map;function jy(e){const t=br.get(e);if(t)return t;const a=[],r=/-?\d+(?:\.\d+)?/g;let s=0;for(let l=r.exec(e);l;l=r.exec(e)){let i=l.index,u=l[0];u[0]==="-"&&i>0&&!/\s/.test(e[i-1])&&(i+=1,u=u.slice(1)),i>s&&a.push(e.slice(s,i)),a.push(Number(u)),s=l.index+l[0].length}return s<e.length&&a.push(e.slice(s)),br.size>5e3&&br.clear(),br.set(e,a),a}function Ty(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 My(e,t){const a=d=>d==null||typeof d=="number"&&Number.isNaN(d)?"":String(d).trim(),r=a(e),s=a(t);if(r===s)return 0;const l=(d,h)=>{if(typeof d=="number"&&!Number.isNaN(d))return[d];const p=Ty(h);return p!==null?[p]:jy(h)},i=l(e,r),u=l(t,s),c=Math.min(i.length,u.length);for(let d=0;d<c;d++){const h=i[d],p=u[d];if(typeof h=="number"&&typeof p=="number"){if(h!==p)return h-p;continue}if(typeof h=="number")return-1;if(typeof p=="number")return 1;const m=fn(h,p);if(m!==0)return m}return i.length!==u.length?i.length-u.length:fn(r,s)}const Vi=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function gr(e,t,a){const r=Vi(e),s=Vi(t);if(r||s)return r===s?0:r?1:-1;const l=My(e,t);return a?l:-l}function Ly(e,t,a){const{t:r}=_e.useTranslation(),[s,l]=o.useState(()=>{const y=a?.initialPageSize;return y&&Ao.some(C=>C.value===y)?y:"25"}),[i,u]=o.useState(1),[c,d]=o.useState(t);Object.is(c,t)||(d(t),i!==1&&u(1));const h=o.useMemo(()=>Ao.map(y=>({...y,label:r("visits.showN",{n:y.value})})),[r]),p=o.useCallback(y=>{Ao.some(C=>C.value===y)&&(l(y),u(1))},[]),m=Math.max(1,Math.ceil(e.length/Number(s))),g=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),m);return i!==g&&u(g),{pageRows:o.useMemo(()=>e.slice((g-1)*Number(s),g*Number(s)),[e,g,s]),pageSizeProps:{options:h,value:s,onChange:p},paginationProps:{page:g,total:m,onChange:u},setPage:u}}function $y(e){const[t,a]=o.useState(()=>e?.defaultKey!=null?{key:e.defaultKey,asc:e.defaultAsc??!0}:null),r=o.useRef(t),s=o.useRef(e?.onSortChange);s.current=e?.onSortChange;const l=o.useCallback(c=>{const d=r.current,h=d?.key===c?{key:c,asc:!d.asc}:{key:c,asc:!0};r.current=h,a(h),s.current?.(h)},[]),i=o.useCallback((c,d)=>({label:c,sortDir:t?.key===d?t.asc?"asc":"desc":null,onClick:()=>l(d)}),[t,l]),u=o.useCallback((c,d)=>{if(!t)return c;const{key:h,asc:p}=t;return[...c].sort((m,g)=>gr(d(m,h),d(g,h),p))},[t]);return{sort:t,field:i,sortRows:u}}const kn="\uC804\uCCB4";Object.fromEntries(Object.entries(df).map(([e,{nucleus:t}])=>[e,t]));const Ry={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"})},Py={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"})},Fy={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 Iy(e,t){if("place"in t)return Ry[t.place](e);const a=Py[t.vowel](e);return t.glide?`${a} \xB7 ${Fy[t.glide](e)}`:a}const Oy=(e,{defaultValue:t})=>t,qi=(e,t)=>({jamos:e,phonetic:t,tooltip:Iy(Oy,t)}),Ln=(e,t)=>t.map(a=>qi([a],{place:e})),Yt=(e,t,a)=>qi([...e],a?{vowel:t,glide:a}:{vowel:t}),No={cho:[Ln("labial",["\u3142","\u3143","\u314D","\u3141"]),Ln("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),Ln("alveolar",["\u3145","\u3146"]),Ln("palatal",["\u3148","\u3149","\u314A"]),Ln("velar",["\u3131","\u3132","\u314B"]),Ln("glottal",["\u314E"])],jung:[[Yt("\u3163","frontHigh"),Yt("\u315F","frontHigh","w"),Yt("\u3162","frontHigh","velar")],[Yt("\u3161","backHighUnrounded")],[Yt("\u315C","backHighRounded"),Yt("\u3160","backHighRounded","j")],[Yt("\u3154\u3150","frontMid"),Yt("\u3156\u3152","frontMid","j"),Yt("\u3159\u315A\u315E","frontMid","w")],[Yt("\u3153","backMidUnrounded"),Yt("\u3155","backMidUnrounded","j"),Yt("\u315D","backMidUnrounded","w")],[Yt("\u3157","backMidRounded"),Yt("\u315B","backMidRounded","j")],[Yt("\u314F","low"),Yt("\u3151","low","j"),Yt("\u3158","low","w")]],jong:[Ln("labial",["\u3142","\u3141"]),Ln("alveolar",["\u3137","\u3134","\u3139"]),Ln("velar",["\u3131","\u3147"])]},zy=e=>e===Wy?[]:Array.from(e),Wy="__NO_CODA__",Eo=e=>e.map(t=>t.map(({jamos:a,phonetic:r,tooltip:s})=>({v:a.join(""),phonetic:r,tooltip:s}))),Ui={cho:Eo(No.cho),jung:Eo(No.jung),jong:Eo(No.jong)};Ui.jung.flat().forEach(({v:e})=>{for(const t of zy(e));}),new Set(Ui.cho.flat().map(e=>e.v));function Hy(e,t=!0){const a=Ia(e);o.useEffect(()=>{if(t)return Qn(()=>{a.current?.()})},[t,a])}function za(){const[e,t]=o.useState(null),a=o.useCallback(l=>t(l.getBoundingClientRect()),[]),r=o.useCallback(()=>t(null),[]),s=o.useCallback(l=>{const i=l.getBoundingClientRect();t(u=>u?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:a,close:r,toggleAt:s}}function Vy(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),l=o.useRef(null);o.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const i=o.useCallback((c,d)=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{a(c),s(d)},e)},[e]),u=o.useCallback(()=>{l.current&&clearTimeout(l.current),a(null),s(null)},[]);return{payload:t,anchorRect:r,openAfterDelay:i,close:u}}function Gi(e="warning"){const[t,a]=o.useState(""),[r,s]=o.useState(e),[l,i]=o.useState(0),u=o.useCallback((p,m)=>{s(m),a(p),i(g=>g+1)},[]),c=o.useCallback(p=>u(p,"warning"),[u]),d=o.useCallback(p=>u(p,"normal"),[u]),h=o.useCallback(()=>a(""),[]);return{toastMessage:t,toastType:r,toastKey:l,showToast:u,showWarning:c,showNormal:d,clearToast:h}}function Wa(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 Ha({computeStyle:e,onScroll:t="close",onResize:a="close",ignoreOutsideClickSelector:r}){const[s,l]=o.useState(!1),[i,u]=o.useState({position:"fixed"}),c=o.useRef(null),d=o.useRef(null),h=o.useCallback(()=>{c.current&&u(e(c.current.getBoundingClientRect(),c.current))},[e]);o.useLayoutEffect(()=>{s&&h()},[s,h]),o.useEffect(()=>{if(!s)return;let g=d.current?.offsetHeight??0;g>0&&h();let y=0,C=null;typeof ResizeObserver<"u"&&d.current&&(C=new ResizeObserver(()=>{const A=d.current?.offsetHeight??0;if(A!==g){if(g=A,++y>4){C?.disconnect(),C=null;return}h()}}),C.observe(d.current));const f=A=>{const B=A.target;r&&B.closest?.(r)||c.current?.contains(B)||d.current?.contains(B)||l(!1)};document.addEventListener("mousedown",f),document.addEventListener("pointerdown",f);let _=null;const b=()=>{if(typeof requestAnimationFrame>"u"){h();return}_===null&&(_=requestAnimationFrame(()=>{_=null,h()}))},w=A=>{d.current?.contains(A.target)||(t==="reposition"?b():t==="close"&&l(!1))};t!=="ignore"&&window.addEventListener("scroll",w,!0);const v=()=>{a==="reposition"?b():a==="close"&&l(!1)};let k=null;const x=()=>{v(),k&&clearTimeout(k),k=setTimeout(()=>{k=null,a==="reposition"&&h()},250)};return a!=="ignore"&&(window.addEventListener("resize",v),window.addEventListener("orientationchange",x)),()=>{_!==null&&cancelAnimationFrame(_),C?.disconnect(),document.removeEventListener("mousedown",f),document.removeEventListener("pointerdown",f),t!=="ignore"&&window.removeEventListener("scroll",w,!0),a!=="ignore"&&(window.removeEventListener("resize",v),window.removeEventListener("orientationchange",x)),k&&clearTimeout(k)}},[s,h,t,a,r]),o.useEffect(()=>{if(s)return Qn(()=>l(!1))},[s]);const p=o.useCallback(()=>l(g=>!g),[]),m=o.useCallback(()=>l(!1),[]);return{open:s,setOpen:l,toggle:p,close:m,style:i,triggerRef:c,menuRef:d}}function qy(e,{mode:t="playback",autoStart:a=!1,onPlaySpeaker:r,onComplete:s,playMs:l=1100,feedbackMs:i=1500}={}){const[u,c]=o.useState([]),[d,h]=o.useState(0),[p,m]=o.useState("idle"),[g,y]=o.useState(null),[C,f]=o.useState([]),[_,b]=o.useState(null),[w,v]=o.useState(0),k=o.useRef(0),x=o.useCallback(R=>{k.current=typeof R=="function"?R(k.current):R,v(k.current)},[]),A=o.useRef(r),B=o.useRef(s);o.useEffect(()=>{A.current=r,B.current=s},[r,s]);const E=o.useRef([]),D=()=>{E.current.forEach(clearTimeout),E.current=[]},N=(R,q)=>{E.current.push(setTimeout(q,R))};o.useEffect(()=>()=>D(),[]);const $=u[d]?.id??null,L=o.useRef(null),U=o.useCallback(()=>{D(),m("playing"),f([]),b(null),x(0);let R=0;e.forEach((q,Z)=>{N(R,()=>{h(Z),y(q.id),A.current?.(q)}),N(R+1e3,()=>{y(null),f(z=>[...z,q.id])}),R+=1300}),N(R,()=>{m("done"),B.current?.({score:0,total:e.length})})},[e,x]),M=o.useCallback((R,q)=>{if(q>=R.length){m("done"),B.current?.({score:k.current,total:R.length});return}L.current=null,h(q),b(null),m("playing"),y(R[q].id),A.current?.(R[q]),N(l,()=>{y(null),m("waiting")})},[l]),P=o.useCallback(()=>{D();const R=Ra(e);c(R),x(0),f([]),M(R,0)},[e,M,x]),T=o.useCallback(()=>{t==="playback"?(c(e),U()):P()},[t,e,U,P]),ee=o.useCallback(()=>{D(),m("idle"),y(null),f([]),b(null),h(0),x(0),c([])},[x]),te=JSON.stringify(e.map(R=>[R.id,R.label,R.angleDeg,R.deg,R.row,R.shortcut]));o.useEffect(()=>(a?T():ee(),()=>D()),[t,te,a]);const I=o.useCallback(R=>{p!=="waiting"||t==="playback"||L.current===d||(L.current=d,b(R),R===u[d]?.id&&x(q=>q+1),t==="exam"?(m("playing"),N(400,()=>M(u,d+1))):(m("feedback"),N(i,()=>M(u,d+1))))},[p,t,u,d,M,i,x]),Y=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:g,playedIds:C,selectedId:_,answerId:$,showFeedback:p==="feedback",clickable:p==="waiting",onSelectSpeaker:I},index:d,total:Y,score:w,phase:p,done:p==="done",start:T,reset:ee}}const Do=new Map,So=new Map,Uy=()=>()=>{},Gy=()=>!0,Ky=()=>!1;function Ki(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 Yy(e){if(typeof window>"u")return"";const t=(a,r)=>{const s=r.attrName.toLowerCase(),l=r.attrValue.trim();(s==="href"||s==="xlink:href")&&!l.startsWith("#")&&(r.keepAttr=!1),(s==="style"||l.includes("\\")&&l.includes("("))&&(r.keepAttr=!1);const i=l.replace(/url\s*\(\s*(['"]?)#[^)\s'"]+\1\s*\)/gi,"");/url\s*\(/i.test(i)&&(r.keepAttr=!1)};da.addHook("uponSanitizeAttribute",t);try{return da.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{da.removeHook("uponSanitizeAttribute",t)}}function Zy(e,t){const a=new Set;for(const i of e.matchAll(/url\(\s*(['"]?)#([^)\s"']+)\1\s*\)/g))a.add(i[2]);for(const i of e.matchAll(/(?:xlink:)?href="#([^"]+)"/g))a.add(i[1]);const r=new Set([...e.matchAll(/id="([^"]*)"/g)].map(i=>i[1])),s=[...a].filter(i=>r.has(i));if(s.length===0)return e;let l=e;for(const i of s){const u=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=`${t}-${i}`;l=l.replace(new RegExp(`id="${u}"`,"g"),`id="${c}"`).replace(new RegExp(`url\\(\\s*(['"]?)#${u}\\1\\s*\\)`,"g"),(d,h)=>`url(${h}#${c}${h})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return l}function Xy(e){const t=So.get(e);if(t)return t;const a=fetch(e).then(r=>r.ok?r.text():null).then(r=>(r!=null&&Do.set(e,r),r)).catch(()=>null).finally(()=>{So.delete(e)});return So.set(e,a),a}function Jy(e,t=!0){const a=o.useSyncExternalStore(Uy,Gy,Ky)&&t&&e?Ki(e)??Do.get(e)??null:null,[r,s]=o.useState({src:e,enabled:t,svg:a});return o.useEffect(()=>{if(!t||!e){s({src:e,enabled:t,svg:null});return}const l=Ki(e)??Do.get(e)??null;if(l!==null){s({src:e,enabled:t,svg:l});return}let i=!0;return Xy(e).then(u=>{i&&s({src:e,enabled:t,svg:u})}),()=>{i=!1}},[e,t]),r.src===e&&r.enabled===t?r.svg:a}function Qy({title:e,description:t,actionLabel:a,onAction:r,bg:s,color:l,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:d,className:h=""}){const p=s??l??"main",m=o.useRef(null),[g,y]=o.useState("main"),C=yn("(max-width: 767px)"),f=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const w=m.current;if(!w)return;const v=Bo(w),k=(x,A,B)=>{if(B!==void 0)w.style.setProperty(A,B),f.current[x]=!0;else if(f.current[x]){const E=v?.[x];E?w.style.setProperty(A,E):w.style.removeProperty(A),f.current[x]=!1}};k("title","--promo-banner-bg-title",c),k("description","--promo-banner-bg-description",d)},[c,d,p]),o.useLayoutEffect(()=>{const w=m.current;if(!w)return;const v=Bo(w);y(v?.actionVariant??"main")},[p]);const _=Be("promo-banner",`promo-banner--${i}`,h),b=Ii[p];return n.jsxs("div",{ref:m,className:_,role:"note",children:[n.jsx(b,{}),n.jsxs("div",{className:"promo-banner__text",children:[n.jsx("span",{className:`promo-banner__title ${i==="small"?"body-2":"h2"}`,children:e}),t&&n.jsx("span",{className:"promo-banner__description body-3",children:t})]}),a&&r&&n.jsx(fe,{htmlType:"button",size:40,variant:u??g,shape:"pill",useBorder:!0,onClick:r,ariaLabel:a,...C?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:a,minWidth:140}})]})}function e2({children:e,interval:t=5e3,dotTone:a,className:r="","aria-label":s}){const{t:l}=_e.useTranslation(),i=s??l("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[d,h]=o.useState(0),[p,m]=o.useState(!1),[g,y]=o.useState(!1),[C,f]=o.useState(!1),_=o.useRef(null),b=o.useRef(null),w=o.useRef(null),v=_o(),k=p||g||C,x=c>0?Math.min(d,c-1):0;o.useEffect(()=>{if(c<2||t<=0||k||v)return;const B=window.setInterval(()=>h(E=>(Math.min(E,c-1)+1)%c),t);return()=>window.clearInterval(B)},[c,t,k,v]);const A=B=>{b.current!=null&&window.clearTimeout(b.current),b.current=window.setTimeout(()=>{b.current=null,f(!1)},B)};return o.useEffect(()=>()=>{b.current!=null&&window.clearTimeout(b.current)},[]),o.useEffect(()=>{if(!C)return;const B=E=>{E.pointerType==="touch"&&(w.current&&w.current.contains(E.target)||(b.current!=null&&(window.clearTimeout(b.current),b.current=null),f(!1)))};return document.addEventListener("pointerdown",B,!0),()=>document.removeEventListener("pointerdown",B,!0)},[C]),c===0?null:n.jsxs("section",{ref:w,className:Be("top-banner",r),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:B=>{_.current=B.pointerType},onPointerDown:B=>{_.current=B.pointerType,B.pointerType==="touch"&&(b.current!=null&&(window.clearTimeout(b.current),b.current=null),f(!0))},onPointerUp:B=>{B.pointerType==="touch"&&A(5e3)},onPointerCancel:B=>{B.pointerType==="touch"&&A(5e3)},onMouseEnter:()=>{_.current!=="touch"&&m(!0)},onMouseLeave:()=>m(!1),onFocus:B=>{let E=!0;try{E=B.target.matches(":focus-visible")}catch{E=!0}y(E)},onBlur:B=>{B.currentTarget.contains(B.relatedTarget)||y(!1)},children:[n.jsx("div",{className:"top-banner__viewport",children:n.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${x*100}%)`},children:u.map((B,E)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":E!==x,...E!==x?{inert:!0}:{},children:B},E))})}),c>1&&n.jsx("div",{className:`top-banner__dots${(a?.[x]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((B,E)=>n.jsx("button",{type:"button",className:`top-banner__dot${E===x?" top-banner__dot--active":""}`,"aria-label":l("topBanner.dotAriaLabel",{count:c,index:E+1,defaultValue:`${c}\uAC1C \uC911 ${E+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":E===x,onClick:()=>h(E)},E))})]})}function t2({title:e,body:t,open:a=!1,onToggle:r,avatar:s,titleClassName:l="body-2",bodyClassName:i="body-2",className:u=""}){const{t:c}=_e.useTranslation();return n.jsxs("div",{className:`accordion-item ${a?"accordion-item--open":""} ${u}`.trim(),role:"listitem",children:[n.jsxs("div",{className:"accordion-item__header",role:"button",tabIndex:0,"aria-expanded":a,"data-accordion-header":!0,onClick:r,onKeyDown:d=>{if(d.key==="Enter"||d.key===" ")d.preventDefault(),r?.();else if(d.key==="ArrowDown"||d.key==="ArrowUp"){d.preventDefault();const h=d.currentTarget.closest('[role="list"]');if(!h)return;const p=Array.from(h.querySelectorAll("[data-accordion-header]")),m=p.indexOf(d.currentTarget);(d.key==="ArrowDown"?p[m+1]:p[m-1])?.focus()}},children:[s&&n.jsx("div",{className:"accordion-item__avatar",children:s}),n.jsx("div",{className:`accordion-item__title ${l}`,children:e}),n.jsx("div",{className:"accordion-item__chevron",children:n.jsx(ot,{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 n2({items:e=[],defaultOpenIndex:t=0,size:a=72,className:r="",bodyClassName:s}){const[l,i]=o.useState({index:t}),u=(c,d)=>l.id!=null&&c.id!=null?c.id===l.id:l.id==null&&d===l.index;return n.jsx("div",{className:`accordion-group accordion-group--s${a} ${r}`.trim(),role:"list",children:e.map((c,d)=>n.jsx(t2,{title:c.title,body:c.body,avatar:c.avatar,open:u(c,d),onToggle:()=>i(u(c,d)?{index:-1}:{index:d,id:c.id}),bodyClassName:s},c.id??d))})}function a2(){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 r2(){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 o2(){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 Dn({children:e,icon:t,number:a,position:r="top-left",size:s=24,animate:l=!1,onClick:i,"aria-label":u,"aria-hidden":c,className:d=""}){const{t:h}=_e.useTranslation(),p=t??"check",m=a!==void 0,g=e!==void 0||m?"number":p,y=e!==void 0?void 0:m?h("badge.nthSelected",{n:a,defaultValue:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"}):{check:h("badge.selected","\uC120\uD0DD\uB428"),remove:h("badge.remove","\uC81C\uAC70"),minus:h("badge.exclude","\uC81C\uC678")}[p],C=c?void 0:u??y;return n.jsxs("span",{className:Be("circle-badge",`circle-badge--${g}`,`circle-badge--${s}`,`circle-badge--${r}`,l?"circle-badge--animate":"",i?"circle-badge--clickable":"",d),onClick:i,onKeyDown:i?f=>{f.key!=="Enter"&&f.key!==" "||(f.preventDefault(),f.currentTarget.click())}:void 0,"aria-label":C,"aria-hidden":c||void 0,role:i?"button":C?"img":void 0,tabIndex:i?0:void 0,children:[e??(m?a:null),e===void 0&&!m&&p==="check"&&n.jsx(a2,{}),e===void 0&&!m&&p==="remove"&&n.jsx(r2,{}),e===void 0&&!m&&p==="minus"&&n.jsx(o2,{})]})}function Va({columns:e=[],onClose:t,className:a="",size:r="medium"}){const{t:s}=_e.useTranslation(),l=r==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const f=[{title:null,columns:e}];let _=e;for(const b of i){const w=_?.[b.ci]?.items?.[b.ii];if(!w||!Array.isArray(w.children)||!w.children.length)break;_=[{title:null,items:w.children}],f.push({title:w.label||null,columns:_})}return f},[e,i]),d=c[c.length-1],h=c.length-1,p=o.useCallback(()=>u(f=>f.slice(0,Math.max(0,Math.min(f.length,h)-1))),[h]),m=o.useRef(null),g=o.useRef(null),y=c.length;o.useEffect(()=>{g.current||(g.current=document.activeElement);let f=0,_=0;const b=()=>{const w=m.current?.querySelector("button:not([disabled])");if(w&&w.offsetParent){w.focus({preventScroll:!0});return}_++<20&&(f=requestAnimationFrame(b))};return f=requestAnimationFrame(b),()=>cancelAnimationFrame(f)},[y]),o.useEffect(()=>()=>{g.current?.focus?.({preventScroll:!0})},[]);const C=o.useCallback((f,_,b)=>{if(f){if(Array.isArray(f.children)&&f.children.length){u(w=>[...w.slice(0,h),{ci:_,ii:b}]);return}try{typeof f.onClick=="function"&&f.onClick()}catch{}try{f&&f.closeOnSelect&&typeof t=="function"&&t()}catch{}}},[t,h]);return n.jsxs("div",{className:se(`menu-tooltip menu-tooltip--${r} ${a}`),children:[(c.length>1||d.title)&&n.jsxs("div",{className:se("menu-tooltip__header"),children:[c.length>1?n.jsx(fe,{htmlType:"button",size:l,type:"dot",icon:"chevron-left",ariaLabel:s("common.back","\uB4A4\uB85C"),onClick:p,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:se("menu-tooltip__title button-1"),children:d.title})]}),n.jsx("div",{className:se("menu-tooltip__columns"),ref:m,children:d.columns&&d.columns.map((f,_)=>{const b=(f.items||[]).some(w=>!!w.icon||w.selected!==void 0);return n.jsxs("div",{className:se("menu-tooltip__column"),children:[f.title?n.jsx("div",{className:se("menu-tooltip__column-title body-3"),children:f.title}):null,n.jsx("div",{className:se("menu-tooltip__items"),children:(f.items||[]).map((w,v)=>n.jsxs(o.Fragment,{children:[w.separatorBefore&&v>0&&n.jsx("div",{className:se("menu-tooltip__separator"),role:"separator"}),n.jsx(fe,{htmlType:"button",className:se("menu-tooltip__item"),size:l,type:w.label?"bar":"dot",icon:w.selected?"check":w.icon||(b||!w.label?"none":void 0),rightIcon:Array.isArray(w.children)&&w.children.length?"chevron-right":w.badgeCount?n.jsx(Dn,{position:"inline",number:Math.min(w.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:w.label,ariaLabel:w.label&&w.badgeCount&&w.badgeCount>0?s("nav.badgeLabel",{label:w.label,count:w.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):w.label,onClick:()=>C(w,_,v),selected:w.selected,disabled:w.disabled,showTooltipInfo:w.tooltip||!1,useBorder:!1,align:"left"})]},v))})]},_)})})]})}const Yi=".content-area";function jo(e,t="Nav"){try{const a=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Yi);if(a){a.scrollTop=0;return}const r=document.scrollingElement??document.documentElement;r&&r.scrollHeight<=r.clientHeight&&At("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Yi}) \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 To=52,yr=10,Zi=e=>e&&e>0?e:0;function Xi({items:e=[],activeKey:t,onChange:a,appMode:r,onAppModeChange:s,moreItems:l=[],scrollContainer:i}){const{t:u}=_e.useTranslation(),c=r==="manager"?"malgwi":"manager",d=r==="manager"?"arrow-left":"arrow-right",h=r==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),p=o.useRef(null),[m,g]=o.useState(0),y=e.length;o.useEffect(()=>{const R=p.current;if(!R)return;const q=()=>{const j=typeof getComputedStyle=="function"?getComputedStyle(R):null,F=R.clientWidth-(parseFloat(j?.paddingLeft??"")||0)-(parseFloat(j?.paddingRight??"")||0),O=R.querySelector(".bottom-nav__left"),G=O?.nextElementSibling,ie=(O?.offsetWidth??0)+(O&&G?.classList.contains("bottom-nav__divider")?G.offsetWidth:0);g(Math.max(0,F-ie))};if(q(),typeof ResizeObserver>"u")return;const Z=new ResizeObserver(q);Z.observe(R);const z=R.querySelector(".bottom-nav__left");return z&&Z.observe(z),()=>Z.disconnect()},[s]);const C=To+1,f=R=>Math.max(0,Math.floor((R+yr)/(To+yr))),_=y*(To+yr)-yr<=m,b=m<=0||l.length===0&&_?y:Math.min(y,f(m-C)),w=m>0&&b<y,v=w?b:y,k=e.slice(0,v),x=e.slice(v),A=w||l.length>0,B=o.useCallback((R,q)=>({position:"fixed",bottom:window.innerHeight-R.top+8,right:window.innerWidth-R.right,zIndex:Wa(q)}),[]),E=o.useId(),{open:D,toggle:N,close:$,style:L,triggerRef:U,menuRef:M}=Ha({computeStyle:B,onScroll:"ignore",onResize:"reposition"}),P=o.useCallback((R,q)=>q>0?u("nav.badgeLabel",{label:R,count:q,defaultValue:"{{label}}, {{count}}\uAC1C"}):R,[u]),T=o.useCallback((R,q)=>q>0?u("nav.badgeInsideLabel",{label:R,count:q,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):R,[u]),ee=o.useCallback(()=>s?.(c),[s,c]),te=o.useMemo(()=>x.find(R=>!!R.key&&R.key===t)??l.find(R=>R.selected||R.key&&R.key===t),[x,t,l]),I=o.useMemo(()=>[{items:[...x.map(R=>({label:R.label,icon:R.icon,badgeCount:R.badgeCount,selected:!!R.key&&R.key===t,closeOnSelect:!0,disabled:R.state==="disabled",onClick:()=>{R.state!=="disabled"&&(R.key&&a&&(a(R.key),jo(i,"BottomNav")),$())}})),...l.map(R=>({label:R.label,icon:R.icon,badgeCount:R.badgeCount,selected:R.selected??(!!R.key&&R.key===t),closeOnSelect:!0,onClick:()=>{R.onClick?.(),$()}}))]}],[x,l,t,a,$]),Y=[...x,...l].reduce((R,q)=>R+Zi(q.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:p,"aria-label":u("nav.bottomNav","\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158"),children:[s&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__left",children:n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:d,ariaLabel:h,className:"bottom-nav-item",onClick:ee})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:k.map((R,q)=>{const Z=Zi(R.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:R.icon,ariaLabel:P(R.label,Z),selected:!!R.key&&R.key===t,disabled:R.state==="disabled",className:"bottom-nav-item",onClick:()=>{R.key&&(a?.(R.key),jo(i,"BottomNav"))}}),Z>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Dn,{position:"top-right",number:Math.min(Z,99),size:24})})]},R.key??`__slot-${q}`)})}),A&&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:U,className:"bottom-nav__slot",children:[n.jsx(fe,{htmlType:"button",size:52,type:"dot",icon:te?.icon??"ellipsis",ariaLabel:T(te?.label??u("nav.more","\uB354\uBCF4\uAE30"),Y),selected:!!te,className:"bottom-nav-item",onClick:N,"aria-expanded":D,"aria-controls":D?E:void 0}),Y>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Dn,{position:"top-right",number:Math.min(Y,99),size:24})}),D&&hn.createPortal(n.jsx("div",{id:E,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:se("tooltip__content"),style:L,ref:M,children:n.jsx(Va,{columns:I,onClose:$})}),document.body)]})})]})]})}function Ji(e){if(typeof e!="string")return!1;let t="";for(const r of e){const s=r.charCodeAt(0);s<=32||s>=127&&s<=159||(t+=r)}if(!t)return!1;const a=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(t);return a?["http","https","mailto","tel"].includes(a[1].toLowerCase()):!0}function Qi(e,t,a){return a&&a>0?e("nav.badgeLabel",{label:t,count:a,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function s2(e){const{t}=_e.useTranslation(),{activeKey:a,unreadCount:r,onDebug:s,onNotification:l,onSetting:i,onHelp:u,onFeedback:c,onAccount:d}=e||{},h="default";return s||l||i||u||c||d?n.jsxs("div",{className:"side-nav__footer",children:[s&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:s,selected:a==="debug"}),l&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bell",ariaLabel:Qi(t,t("nav.notifications","\uC54C\uB9BC"),r),onClick:l,selected:a==="notifications"}),!!r&&r>0&&n.jsx(Dn,{number:Math.min(r,99),size:24,"aria-hidden":!0})]}),i&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"settings",ariaLabel:t("nav.settings","\uC124\uC815"),onClick:i,selected:a==="settings"}),u&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"message-circle-question-mark",ariaLabel:t("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:u,selected:a==="help"}),c&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bug",ariaLabel:t("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:c,selected:a==="feedback"}),d&&n.jsx(fe,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:d,selected:a==="account"})]}):null}function eu(e){const{t}=_e.useTranslation(),{item:a,itemKey:r,label:s,icon:l,active:i,onClick:u,style:c,state:d,labelStyle:h}=e||{},p=a?.key??r??"",m=a?.label??s??"",g=a?.icon??l??"",y=a?.badge??0,C=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(ot,{icon:g,label:typeof m=="string"?m:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),f=d==="disabled",_=`side-nav__item ${i?"active":""} ${d||""} ${f?"disabled":""} ${a?.child?"side-nav__item--child":""}`,b=o.useCallback(w=>{if(f)return;const v=w.detail>0;if(v)try{w.currentTarget.blur()}catch{}u?.(p,w.currentTarget,v)},[f,p,u]);return n.jsxs("button",{type:"button",className:_,onClick:b,"aria-label":typeof m=="string"?Qi(t,m,y):void 0,"aria-current":i?"page":void 0,style:c,"aria-disabled":f,children:[C,n.jsx("span",{className:"side-nav__label button-1 f",style:h,children:m}),y>0&&n.jsx(Dn,{position:"inline",number:Math.min(y,99),size:24,"aria-hidden":!0}),d==="loading"&&n.jsx("span",{className:"side-nav__spinner",role:"img","aria-label":t("loader.loading","\uBD88\uB7EC\uC624\uB294 \uC911\u2026")})]})}function tu(e){const{t}=_e.useTranslation(),{items:a=[],activeKey:r,onChange:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:g,scrollContainer:y}=e||{},C=m==="manager",f=o.useCallback(()=>g?.(C?"malgwi":"manager"),[g,C]),_=o.useRef(null),[b,w]=o.useState(null);o.useEffect(()=>{const B=_.current;if(!B)return;let E=null;const D=()=>{const{scrollHeight:L,clientHeight:U,scrollTop:M}=B;if(L<=U+1){w(I=>I===null?I:null);return}const P=Math.max(24,U/L*U),T=U-P,ee=L-U,te={top:Math.round(M/ee*T),height:Math.round(P)};w(I=>I&&I.top===te.top&&I.height===te.height?I:te)},N=()=>{if(typeof requestAnimationFrame>"u"){D();return}E===null&&(E=requestAnimationFrame(()=>{E=null,D()}))};D(),B.addEventListener("scroll",N,{passive:!0});const $=typeof ResizeObserver<"u"?new ResizeObserver(N):null;$?.observe(B);for(const L of Array.from(B.children))$?.observe(L);return()=>{E!==null&&cancelAnimationFrame(E),B.removeEventListener("scroll",N),$?.disconnect()}},[a]);const v=o.useRef(null),k=o.useCallback(B=>{const E=_.current;E&&(B.preventDefault(),v.current={y:B.clientY,top:E.scrollTop},B.currentTarget.setPointerCapture(B.pointerId))},[]),x=o.useCallback(B=>{const E=_.current,D=v.current;!E||!D||(E.scrollTop=D.top+(B.clientY-D.y)*(E.scrollHeight/E.clientHeight))},[]),A=o.useCallback(B=>{v.current=null,B.currentTarget.hasPointerCapture(B.pointerId)&&B.currentTarget.releasePointerCapture(B.pointerId)},[]);return n.jsxs("nav",{ref:_,"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[b&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:b.top,height:b.height},onPointerDown:k,onPointerMove:x,onPointerUp:A,onPointerCancel:A})}),n.jsxs("div",{className:"side-nav__menu-list",children:[(a||[]).filter(B=>!B.section&&(B.key||B.label)).map((B,E)=>n.jsxs(o.Fragment,{children:[B.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(eu,{item:B,active:!!B.key&&B.key===r,state:B.disabled?"disabled":void 0,onClick:(D,N,$)=>{if(B.disabled)return;if(B.href){if(Ji(B.href)&&window.open(B.href,"_blank","noopener,noreferrer"),$)try{N?.blur()}catch{}return}if(s?.(B.key),jo(y,"SideNav"),!$)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 L=document.querySelector(".header");if(L){const U=typeof L.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&U&&L.matches(":hover"))){L.classList.add("header--force-collapsed");const M=()=>{L.classList.remove("header--force-collapsed"),L.removeEventListener("mouseenter",M)};L.addEventListener("mouseenter",M)}}}})]},B.key??`side-nav__item-${E}`)),g&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),g&&n.jsx(eu,{item:{key:"__mode-switch__",label:C?t("nav.goToMalgwi","\uB9D0\uADC0\uB85C \uC774\uB3D9"):t("nav.goToManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9"),icon:C?"arrow-left":"arrow-right"},onClick:f})]}),n.jsx(s2,{activeKey:r,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p})]})}var vr='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>',Mo='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>',l2='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 nu({appMode:e}){const{t}=_e.useTranslation(),a=e==="manager",r=a?Mo:vr,s=l2;return n.jsxs("div",{className:"brand-identity__root","aria-label":t("header.biArea","BI \uC601\uC5ED"),children:[n.jsx("img",{src:s,alt:t("header.biSymbol","BI \uC2EC\uBCFC"),className:"brand-identity__image brand-identity__image--symbol"}),n.jsx("img",{src:r,alt:a?t("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):t("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0"),className:"brand-identity__image brand-identity__image--logo"})]})}function au({activeKey:e,onChange:t,items:a,malgwiItems:r,managerItems:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:g,scrollContainer:y}){const{t:C}=_e.useTranslation(),f=yn("(max-width: 767px)"),_=o.useMemo(()=>(a??[]).filter(L=>!L.section&&(L.key||L.label)).map(L=>({key:L.key,label:typeof L.label=="string"?L.label:void 0,icon:L.icon,state:L.disabled?"disabled":void 0,badgeCount:L.badge})),[a]),b=o.useCallback(L=>{const U=a?.find(M=>M.key===L);if(!U?.disabled){if(U?.href){Ji(U.href)&&window.open(U.href,"_blank","noopener,noreferrer");return}t?.(L)}},[a,t]),w=o.useMemo(()=>{const L=[];return i&&L.push({key:"debug",icon:"terminal",label:C("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),u&&L.push({key:"notifications",icon:"bell",label:C("nav.notifications","\uC54C\uB9BC"),badgeCount:l,onClick:u}),d&&L.push({key:"settings",icon:"settings",label:C("nav.settings","\uC124\uC815"),onClick:d}),h&&L.push({key:"help",icon:"message-circle-question-mark",label:C("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:h}),p&&L.push({key:"feedback",icon:"bug",label:C("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:p}),c&&L.push({key:"account",icon:"user-round",label:C("nav.account","\uACC4\uC815"),onClick:c}),L},[C,i,u,d,h,p,c,l]),v=o.useCallback((L,U)=>({position:"fixed",top:L.bottom+8,right:Math.max(8,window.innerWidth-L.right),zIndex:Wa(U)}),[]),k=o.useId(),{open:x,toggle:A,close:B,style:E,triggerRef:D,menuRef:N}=Ha({computeStyle:v,onScroll:"ignore",onResize:"reposition"}),$=o.useMemo(()=>[{items:w.map(L=>({label:L.label,icon:L.icon,badgeCount:L.badgeCount,selected:L.selected??(!!L.key&&L.key===e),closeOnSelect:!0,onClick:()=>{L.onClick?.(),B()}}))}],[w,e,B]);return n.jsxs("aside",{className:`header${m==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(nu,{appMode:m}),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&&l&&l>0?C("nav.badgeInsideLabel",{label:C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:l,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:A,"aria-expanded":x,"aria-controls":x?k:void 0}),!!u&&!!l&&l>0&&n.jsx(Dn,{number:Math.min(l,99),size:24,"aria-hidden":!0}),x&&hn.createPortal(n.jsx("div",{id:k,role:"group","aria-label":C("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:se("tooltip__content"),style:E,ref:N,children:n.jsx(Va,{columns:$,onClose:B})}),document.body)]})]}),n.jsx(tu,{scrollContainer:y,items:a,activeKey:e??void 0,onChange:t,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:d,onHelp:h,onFeedback:p,appMode:m,onAppModeChange:g}),f&&n.jsx(Xi,{items:_,activeKey:e??void 0,onChange:b,scrollContainer:y,appMode:m,onAppModeChange:g})]})}const i2=au;function ln(e){const{type:t="dot",size:a,className:r="","aria-label":s,"aria-hidden":l,role:i}=e;(e.icon!==void 0||e.number!==void 0||e.position!==void 0||e.animate!==void 0||e.onClick!==void 0)&&At("badge-circle-props","[ihab/core] Badge \uAC00 \uC6D0\uD615 \uBC43\uC9C0\uC758 \uD504\uB86D(icon \xB7 number \xB7 position \xB7 animate \xB7 onClick)\uC744 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uC6D0\uD615\uC740 \uC774\uC81C CircleBadge \uAC00 \uADF8\uB9BD\uB2C8\uB2E4 \u2014 Badge \uC758 dot \uB294 \uC791\uC740 \uC54C\uC57D \uC774\uB984\uD45C\uC785\uB2C8\uB2E4. \uADF8 \uC790\uB9AC\uB97C <CircleBadge \u2026/> \uB85C \uBC14\uAFB8\uC138\uC694."),i&&l&&At("badge-role-with-hidden",`[ihab/core] Badge \uAC00 role="${i}" \uACFC aria-hidden \uC744 \uD568\uAED8 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uC228\uAE34 \uAC83\uC740 \uB0AD\uB3C5\uAE30\uC5D0 \uB07C\uC5B4\uB4E4 \uC218 \uC5C6\uC5B4 \uC544\uBB34\uAC83\uB3C4 \uC548 \uC77D\uD799\uB2C8\uB2E4 \u2014 \uB458 \uC911 \uD558\uB098\uB9CC \uC8FC\uC138\uC694.`);const{label:u,children:c,variant:d="default",fill:h="filled",minWidth:p,iconLeft:m,iconRight:g,color:y}=e,C=t==="bar",f=typeof a=="number"?"medium":a??"medium",_=(C?{small:"caption-2",medium:"body-3",large:"body-2"}:{small:"caption-2b",medium:"body-3b",large:"body-2b"})[f]??(C?"body-2":"body-2b"),b={small:12,medium:14,large:16}[f]??14,w=Be("badge",C?"badge--bar":"",`badge--${d}`,`badge--${f}`,h!=="filled"?`badge--${h}`:"",_,r),v=y?.startsWith("--")?`var(${y})`:y,k=p!==void 0||v?{...p!==void 0?{minWidth:typeof p=="number"?`${p}px`:p}:{},...v?{"--badge-color":v}:{}}:void 0;return n.jsxs("span",{className:w,style:k,"aria-label":l?void 0:s,role:i??(s&&!l?"img":void 0),"aria-hidden":l||void 0,children:[m&&n.jsx(ot,{icon:m,size:b,className:"badge__icon"}),u??c,g&&n.jsx(ot,{icon:g,size:b,className:"badge__icon"})]})}const u2=()=>Kt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function ru(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 ma(`${t.toLocaleString("ko-KR")}\uC6D0`)}return ma(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function c2(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function d2(e){if(e.durationDays&&e.durationDays>0){const l=e.durationDays;return l%365===0?`${l/365}\uB144`:`${l}\uC77C`}const t=(e.code??"").match(/(\d+)(d|y)\b/i);if(t)return t[2].toLowerCase()==="y"?`${t[1]}\uB144`:`${t[1]}\uC77C`;const a=e.name??"",r=a.match(/(\d+\s*(?:년|개월|주|일))\s*(?:이용권)?\s*$/);if(r)return r[1].replace(/\s+/g,"");const s=a.match(/(\d+)\s*-?\s*(day|year)s?\b/i);return s?s[2].toLowerCase()==="year"?`${s[1]}\uB144`:`${s[1]}\uC77C`:a||u2()}function p2(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 ou(e){return{type:e.type??c2(e),plan:d2(e),label:e.label,price:ru(e.price),originalPrice:ru(e.originalPrice),discountLabel:e.discountLabel}}var h2='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>',m2='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>',su='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 na={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},Lo=new WeakMap;function C2(e){if(e)return Lo.get(e)}function $n(e,t){e&&(e.style.setProperty(na.text,t.text),e.style.setProperty(na.sub,t.sub),t.copyrightColor&&e.style.setProperty(na.copyright,t.copyrightColor),Lo.set(e,t))}function Rn(e){e&&(e.style.removeProperty(na.text),e.style.removeProperty(na.sub),e.style.removeProperty(na.copyright),Lo.delete(e))}const lu={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function iu(e={}){const t=Rt(lu,$n,Rn);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("${su}")`}})]})}const uu="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",ba=240;var qa='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 f2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},b2=100,g2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function cu(e={}){const t=Rt(f2,$n,Rn),a="var(--color-main)",r=270,s=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:g2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*b2/ba}) translate(${-ba/2} ${-ba/2})`,opacity:i,children:n.jsx("path",{d:uu,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("${qa}")`}})]})}const y2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},v2=100,_2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function x2(e={}){const t=Rt(y2,$n,Rn),a="#ffffff",r=270,s=170;return n.jsxs("div",{ref:t,className:"pass-card-bg pass-card-bg-sound-move-v1","aria-hidden":"true",children:[n.jsx("svg",{className:"pass-card-bg-sound-move-v1__svg",viewBox:"0 0 300 189",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg",children:_2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*v2/ba}) translate(${-ba/2} ${-ba/2})`,opacity:i,children:n.jsx("path",{d:uu,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("${su}")`}})]})}const w2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function B2(e={}){const t=Rt(w2,$n,Rn);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("${qa}")`}})]})}const k2={Logo_SpeechEar_ko:{"":vr,_mono:h2},Logo_SpeechEarManager_ko:{"":Mo,_mono:m2}};function A2(e,t){if(e)return k2[e]?.[t??""]??void 0}const N2={speechear:vr,manager:Mo},E2={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},du=10;function D2(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 pu(e,t){if(e<=0)return t("passCard.remainingSecond",{n:0});const a=Math.floor(e/86400);if(a>0)return t("passCard.remainingDay",{n:a});const r=Math.floor(e/3600);if(r>0)return t("passCard.remainingHour",{n:r});const s=Math.floor(e/60);return s>0?t("passCard.remainingMinute",{n:s}):t("passCard.remainingSecond",{n:Math.floor(e)})}function S2(e,t,a){if(e==="manager"){const r=/년/.test(t)||/yr|year/i.test(t)||/1년|365/.test(t),s=a==="\uC624\uD508\uD2B9\uAC00"||a===Kt.t("passCard.specialLabel");return r?n.jsx(B2,{}):s?n.jsx(x2,{}):n.jsx(cu,{})}return n.jsx(iu,{})}function hu({ariaLabel:e,product:t,showPrice:a=!1,plan:r,type:s,endDate:l,remainingSeconds:i,endInclusive:u=!1,state:c="active",bg:d,bgOnly:h=!1,textColor:p,subColor:m,copyrightColor:g,logoSrc:y,label:C,price:f,originalPrice:_,discountLabel:b,onUse:w,onRefund:v,onDelete:k}){const{t:x}=_e.useTranslation(),A=t?ou(t):void 0,B=s??A?.type??"speechear",E=r??A?.plan??x("passCard.planSuffix","\uC774\uC6A9\uAD8C"),D=C??A?.label,N=f??(a?A?.price:void 0),$=_??(a?A?.originalPrice:void 0),L=b??A?.discountLabel,U=o.useMemo(()=>{if(N)return null;const V=t?.durationDays??p2(t?.code);if(!V||V<=0)return i!=null?{percent:null,remainingLabel:pu(i,x)}:null;const W=V*86400;let oe;if(i!=null)oe=i;else if((c==="active"||c==="expired")&&l){const me=new Date(l).getTime();if(Number.isNaN(me))return null;const ke=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(l)),Le=/^(\d{4})-(\d{2})-(\d{2})/.exec(Fa()),Me=Math.round(ke&&Le?(Date.UTC(+ke[1],+ke[2]-1,+ke[3])-Date.UTC(+Le[1],+Le[2]-1,+Le[3]))/864e5:(me-Date.now())/864e5);oe=Math.max(0,u?Me+1:Me)*86400}else c==="expired"?oe=0:oe=W;const xe=D2(oe),be=Math.max(0,Math.min(100,Math.floor(Math.min(xe,W)/W*100)));return c==="pending"&&be>=100?null:{percent:be,remainingLabel:c==="expired"?x("passCard.expired","\uB9CC\uB8CC\uB428"):pu(oe,x)}},[N,c,l,i,u,t?.durationDays,t?.code,x]),M=o.useRef(null),[P,T]=o.useState({}),[ee,te]=o.useState(null),I=!!(w||v||k),Y=o.useRef(!1),R=o.useRef(void 0),[q,Z]=o.useState(y);o.useLayoutEffect(()=>{Z(y)},[y]),o.useLayoutEffect(()=>{const V=M.current;V&&(p!==void 0&&V.style.setProperty("--pass-card-text",p),m!==void 0&&V.style.setProperty("--pass-card-sub",m),g!==void 0&&V.style.setProperty("--pass-card-copyright",g))},[p,m,g]),o.useLayoutEffect(()=>{const V=M.current;if(!V)return;const W=C2(V);if(!y){const oe=E2[B],xe=c==="expired"?"_mono":W?.logoColor??"",be=A2(oe,xe);Z(be)}},[d,y,B,c]);const z=V=>{const W=M.current;if(!W)return null;const{left:oe,top:xe,width:be,height:me}=W.getBoundingClientRect(),ke=(V.clientX-oe)/be-.5;return{rotateX:-((V.clientY-xe)/me-.5)*du,rotateY:ke*du}},j=(V,W)=>{const oe=W*-.7,xe=V*.7+10,be=20+(Math.abs(V)+Math.abs(W))*.4;return`${oe}px ${xe}px ${be}px rgba(0, 0, 0, 0.18)`},F=o.useCallback(V=>{if(ea())return;Y.current=!0,clearTimeout(R.current),R.current=setTimeout(()=>{Y.current=!1},200);const W=z(V);W&&T({transform:`perspective(800px) rotateX(${W.rotateX}deg) rotateY(${W.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:j(W.rotateX,W.rotateY),transition:"transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.25s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),O=o.useCallback(V=>{if(ea())return;const W=z(V);if(!W)return;const oe=Y.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";T({transform:`perspective(800px) rotateX(${W.rotateX}deg) rotateY(${W.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:j(W.rotateX,W.rotateY),transition:oe})},[]),G=o.useCallback(()=>{clearTimeout(R.current),Y.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)"})},[]),ie=o.useCallback(()=>te(null),[]),K=o.useMemo(()=>{const V=x("passCard.planSuffix","\uC774\uC6A9\uAD8C"),W=E.replace("\uC774\uC6A9\uAD8C","").replace(V==="\uC774\uC6A9\uAD8C"?"":V,"").trim(),oe=W.match(/^(.*?)(일|년)$/);return oe?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:oe[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:oe[2]==="\uB144"?x("passCard.unitYear","\uB144"):x("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:W})},[E,x]),pe=o.useMemo(()=>{const V=ma(N);if(!V)return null;const W=V.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!W)return n.jsx("span",{className:"h1",children:V});const[,oe,xe,be]=W;return n.jsxs(n.Fragment,{children:[oe&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:oe}),n.jsx("span",{className:"h1 pass-card__price-amount",children:xe}),be.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:be.trim()})]})},[N]),X=o.useCallback(()=>{I&&te(V=>{if(V)return null;const W=M.current?.getBoundingClientRect();if(!W)return null;const oe=50;return{left:W.left,right:W.right,width:W.width,height:W.height,x:W.x,y:W.y+oe,top:W.top+oe,bottom:W.bottom+oe}})},[I]),H=o.useCallback(V=>{I&&(V.key==="Enter"||V.key===" ")&&(V.preventDefault(),X())},[I,X]),ne=[{items:[...w?[{label:x("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{w(),te(null)},closeOnSelect:!0}]:[],...v?[{label:x("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{v(),te(null)},closeOnSelect:!0}]:[],...k?[{label:x("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{k(),te(null)},closeOnSelect:!0}]:[]]}];return n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card-frame",children:n.jsxs("div",{ref:M,className:`pass-card pass-card--${c}${I?" pass-card--clickable":""}`,style:P,onMouseEnter:F,onMouseMove:O,onMouseLeave:G,onPointerUp:V=>{V.pointerType==="touch"&&G()},onPointerCancel:V=>{V.pointerType==="touch"&&G()},onClick:X,onKeyDown:I?H:void 0,role:I?"button":void 0,tabIndex:I?0:void 0,"aria-label":e,"aria-haspopup":I?"menu":void 0,"aria-expanded":I?!!ee:void 0,children:[d??S2(B,E,D),!h&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pass-card__top",children:n.jsxs("div",{className:"pass-card__top-left",children:[n.jsx("img",{src:q??N2[B],className:"pass-card__logo",alt:B==="manager"?x("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):x("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),n.jsxs("div",{className:"pass-card__plan",children:[n.jsx("div",{children:K}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:D?x("passCard.labeledPlan",{label:D}):x("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),N?n.jsxs("div",{className:"pass-card__price-area",children:[L&&n.jsx("span",{className:"pass-card__discount body-3",children:L}),n.jsxs("div",{className:"pass-card__price",children:[$&&n.jsx("span",{className:"pass-card__price-original body-3",children:ma($)}),pe]})]}):U?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:U.remainingLabel}),U.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:U.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."})]})]})}),ee&&n.jsx(Bn,{anchorRect:ee,onClose:ie,ariaLabel:x("tooltip.menu","\uBA54\uB274"),children:n.jsx(Va,{columns:ne,onClose:ie,size:"small"})})]})}const j2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function T2(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,a=Rt(j2,$n,Rn);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("${qa}")`}})]})}const M2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function L2(e={}){const t=Rt(M2,$n,Rn);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("${qa}")`}})]})}function $2(e,t){if(e){if(t==="manager_pro")return n.jsx(L2,{});if(t==="manager_standard")return n.jsx(T2,{});if(t==="manager_lite")return n.jsx(cu,{})}}function R2(e){const t=ma(e);if(!t)return null;const a=t.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!a)return t;const[,r,s,l]=a;return n.jsxs(n.Fragment,{children:[r&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:r}),s,l.trim()&&n.jsx("span",{className:"payment-plan__pricing-symbol h4",children:l.trim()})]})}function P2(e){const{t}=_e.useTranslation(),a=t("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),r=t("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:s,onSelect:l,period:i="monthly",ownedCodes:u}=e||{},c=v=>!!v&&!!u?.includes(v),d=v=>v.onceOnly??/오픈\s*특가/.test(v.label??""),h=(s.tiers||[]).some(v=>d(v)&&c(v.code)),p=v=>{const k=v.prices?v.prices[i]:v.price;return k?(s.tiers||[]).some(x=>!!x.badge&&x.originals?.[i]===k):!1},m=s.colorToken?`var(--color-${s.colorToken})`:"var(--color-gray)",g=t("payment.plan.freePrice","\uBB34\uB8CC"),y=t("payment.products.mgrEnterprise.tier.price","\uBB38\uC758"),C=v=>v.prices?v.prices[i]:v.price,f=(s.tiers||[]).length>0&&(s.tiers||[]).every(v=>{const k=C(v);return k==="\uBB34\uB8CC"||k===g||k==="0\uC6D0"||typeof k=="string"&&/\d/.test(k)&&!/[1-9]/.test(k)}),_=(s.tiers||[]).length>0&&(s.tiers||[]).every(v=>{const k=C(v);return k==="\uBB38\uC758"||k===y}),b=s.group==="org",w=b?"manager":"speechear";return n.jsxs("div",{className:"payment-plan__card",style:{borderColor:m,"--plan-color":m},children:[s.cardBadge&&n.jsx("div",{className:"payment-plan__card-badge",children:n.jsx(ln,{label:s.cardBadge,variant:"main",size:"medium",fill:"soft"})}),n.jsxs("div",{className:"payment-plan__title",children:[n.jsx("p",{className:"payment-plan__quote body-3b",style:{color:m},children:s.quote||"\xA0"}),n.jsx("h3",{className:"payment-plan__title-heading h1",children:s.tier??s.title}),n.jsx("p",{className:"payment-plan__subtitle body-3",children:s.subtitle})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.recommendedFor","\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(s.recommendedFor||[]).map((v,k)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(ot,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),v]},k))})]}),n.jsxs("div",{className:"payment-plan__box",children:[n.jsx("span",{className:"payment-plan__box-title body-3b",children:t("payment.plan.features","\uD575\uC2EC \uAE30\uB2A5")}),n.jsx("ul",{className:"payment-plan__feature-list",children:(s.features||[]).map((v,k)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(ot,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),v]},k))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:f?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:()=>s.tiers?.[0]&&l?.({...s.tiers[0],productId:s.id,productTitle:s.title})}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"payment-plan__pricing-list",children:(s.tiers||[]).map(v=>{const k=v.label||a,x=d(v),A=x||v.openPromo===!0,B=k.replace(/^오픈\s*특가\s*/,"")||a,E=v.prices?v.prices[i]:v.price,D=v.badge?A?`${r}
823
+ ${v.badge}`:v.badge:void 0;if(x&&c(v.code))return null;if(!v.badge&&!h)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:R2(E)})})]},v.id);const N=s.tier??(b?s.title:void 0),$=n.jsx(hu,{showPrice:!0,product:{type:w,code:v.code,name:B,label:N,price:E,originalPrice:v.originals?.[i]??void 0,discountLabel:D},bg:$2(b,s.id)}),L=()=>l?.({...v,productId:s.id,productTitle:s.title,preview:$});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:L,onKeyDown:l?U=>{U.target===U.currentTarget&&(U.key==="Enter"||U.key===" ")&&(U.preventDefault(),L())}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:$},v.id)})})})})]})}function F2({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 $o='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 mu={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#c9c9c9"};function I2(){const e=Rt(mu,$n,Rn);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("${$o}")`}})})}const Cu={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function O2(e={}){const t=Rt(Cu,$n,Rn);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("${qa}")`}})]})}function fu({keys:e,anchor:t="top-right",scale:a,className:r=""}){const s=Array.isArray(e)?e:[e];return n.jsx("span",{className:Be("shortcut-badge",`shortcut-badge--${t}`,r),style:a===void 0?void 0:{"--shortcut-badge-scale":String(a)},children:s.map((l,i)=>n.jsxs("span",{className:"shortcut-badge__group",children:[i>0&&n.jsx("span",{className:"shortcut-badge__plus",children:"+"}),n.jsx("kbd",{className:"shortcut-badge__key",children:l})]},`${l}-${i}`))})}const Ua=(e,t,a)=>e+(t-e)*a;function z2({speakers:e,size:t=300,viewT:a=0,activeSpeakerId:r=null,playedIds:s,selectedId:l=null,answerId:i=null,showFeedback:u=!1,pulseSelected:c=!1,pulseSelectedDuration:d,pulseScale:h,clickable:p=!1,onSelectSpeaker:m,buttonSize:g=40,showIcon:y=!0,onCenterClick:C,centerLabel:f,centerDisabled:_=!1,centerAttention:b=!1,shortcutAnchor:w="top-right",shortcutScale:v,scaleShortcut:k=!1}){const{t:x}=_e.useTranslation(),A=Math.max(0,Math.min(1,a)),B=t/2,E=110/300,D=.18,N=V=>t*(E+(V-1)*D),$=V=>{const W=N(V.row??1),oe=V.angleDeg*Math.PI/180;return{x:B+W*Math.cos(oe),y:B+W*Math.sin(oe)}},L=Math.max(...e.map(V=>V.row??1),1),U=t*.08,M=t*.1,P=t*.24,T=t-2*U,ee=t-M-P,te=t-P/2,I=o.useMemo(()=>[...new Set(e.map(V=>V.deg))].sort((V,W)=>V-W),[e]),Y=I.length,R=Math.max(68,Y>1?T/(Y-1):0),q=o.useMemo(()=>new Map(I.map((V,W)=>[V,W])),[I]),Z=V=>{const W=q.get(V.deg)??0,oe=B+(W-(Y-1)/2)*R,xe=L>1?Math.min(68,ee/(L-1)):0,be=xe*(L-1),me=M+(ee-be)/2,ke=L===1?M+ee*.4:me+(L-(V.row??1))*xe;return{x:oe,y:ke}},z=V=>{const W=$(V),oe=Z(V);return{x:Ua(W.x,oe.x,A),y:Ua(W.y,oe.y,A)}},j={x:B,y:Ua(B,te,A)},F=Math.round(g*1.2),O=Math.round(Math.max(16,Math.min(80,g*.7))),G=[],ie=new Map;for(const V of e){const W=V.row??1;ie.has(W)||ie.set(W,[]),ie.get(W).push(V)}for(const[V,W]of ie.entries()){if(W.length<2)continue;const oe=[...W].sort((ze,dt)=>ze.deg-dt.deg),xe=oe.map(ze=>z(ze)),be=oe.map(ze=>ze.deg),me=be[be.length-1]-be[0],ke=me/(be.length-1),Le=360-me,Me=oe.length>=3&&ke>0&&Le<=ke*1.5,le=Math.round(N(V)*1e3)/1e3,ve=(ze,dt,st,et)=>{const gt=(dt.angleDeg-ze.angleDeg+540)%360-180;if(gt===0)return`L ${et.x} ${et.y}`;if(A===0)return`A ${le} ${le} 0 0 ${gt>0?1:0} ${et.x} ${et.y}`;const Se=(ze.angleDeg+gt/2)*Math.PI/180,Ge={x:B+le*Math.cos(Se),y:B+le*Math.sin(Se)},we={x:(st.x+et.x)/2,y:(st.y+et.y)/2},qe={x:Ua(Ge.x,we.x,A),y:Ua(Ge.y,we.y,A)},Ye={x:2*qe.x-we.x,y:2*qe.y-we.y};return`Q ${Ye.x} ${Ye.y} ${et.x} ${et.y}`},$e=Me?[...oe,oe[0]]:oe,Ae=Me?[...xe,xe[0]]:xe;let Ie=`M ${Ae[0].x} ${Ae[0].y}`;for(let ze=1;ze<Ae.length;ze++)Ie+=" "+ve($e[ze-1],$e[ze],Ae[ze-1],Ae[ze]);G.push({key:`arc-${V}`,d:Ie})}const K=o.useMemo(()=>new Set(s??[]),[s]),pe=V=>({idle:"",active:x("soundCompass.state.active","\uC18C\uB9AC \uB098\uB294 \uC911"),played:x("soundCompass.state.played","\uB4E4\uC74C"),correct:x("soundCompass.state.correct","\uC815\uB2F5"),wrong:x("soundCompass.state.wrong","\uC624\uB2F5")})[V],X=V=>{if(r===V.id)return"active";if(u){if(V.id===i)return"correct";if(V.id===l&&l!==i)return"wrong"}return K.has(V.id)?"played":"idle"},H=V=>r===V.id?"loop":u?V.id===i?"loop":null:c&&V.id===l?"once":null,ne=(V,W)=>{switch(V){case"played":case"correct":return n.jsx(Ws,{size:W});case"wrong":return n.jsx(Js,{size:W});default:return n.jsx(Xs,{size:W})}};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:[A===0&&e.map(V=>{const{x:W,y:oe}=z(V);return n.jsx("line",{x1:j.x,y1:j.y,x2:W,y2:oe,stroke:"#dde3ec",strokeWidth:"1"},V.id)}),G.map(V=>n.jsx("path",{d:V.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},V.key))]}),b&&!_&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:F,height:F,left:j.x-F/2,top:j.y-F/2}}),C?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${_?" sound-compass__center--disabled":""}`,style:{width:F,height:F,left:j.x,top:j.y},"aria-label":f,"aria-disabled":_||void 0,tabIndex:_?-1:0,onClick:_?void 0:C,children:n.jsx(Hr,{size:O,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:F,height:F,left:j.x,top:j.y},children:n.jsx(Hr,{size:O,color:"currentColor",strokeWidth:1.5})}),e.map((V,W)=>{const{x:oe,y:xe}=z(V),be=X(V),me=H(V),ke={...v!==void 0||k?{"--shortcut-badge-scale":String(v??Math.max(.75,Math.min(3,g/56)))}:null,pointerEvents:p?"auto":"none",cursor:p?"pointer":"default",zIndex:be!=="idle"?10:1},Le=g,Me=Math.round(Math.max(10,Math.min(56,Le*.38))),le=Math.round(Math.max(7,Math.min(18,Le*.2))),ve=Math.round(Math.max(10,Math.min(56,Le*.4))),$e=y==="answered"&&(be==="played"||be==="correct"||be==="wrong"),Ae=y===!0||$e,Ie=!$e;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...ke,left:oe-Le/2,top:xe-Le/2},children:[me&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${be}`+(me==="once"?" sound-compass__pulse--once":""),style:{width:Le,height:Le,...me==="once"&&d!==void 0?{"--sc-pulse-duration-once":`${d}ms`}:null,...h!==void 0?{"--sc-pulse-scale":String(h)}:null}}),n.jsxs("button",{type:"button",tabIndex:p?0:-1,"aria-disabled":p?void 0:!0,onClick:p?()=>m?.(V.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${be}`,style:{width:Le,height:Le},"aria-label":pe(be)?`${V.label}, ${pe(be)}`:V.label,"aria-pressed":l!=null?V.id===l:void 0,children:[Ae&&ne(be,Me),Ie&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:y===!0?le:ve},children:W+1})]}),V.shortcut&&n.jsx(fu,{keys:V.shortcut,anchor:w,className:"sound-compass__speaker-shortcut"})]},V.id)})]})})}function W2({orientation:e="horizontal",label:t,className:a=""}){const r=Be("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 bu({checked:e,onChange:t,name:a,value:r,disabled:s=!1,label:l,className:i=""}){const u=o.useId();return n.jsxs("label",{className:`radio${s?" radio--disabled":""} ${i}`.trim(),htmlFor:u,children:[n.jsx("input",{id:u,type:"radio",name:a,value:r,checked:e,disabled:s,onChange:c=>t?.(c.target.checked)}),n.jsx("span",{className:"radio__dot"}),l&&n.jsx("span",{className:"radio__label body-2",children:l})]})}function H2({options:e,value:t,onChange:a,name:r,disabled:s=!1,direction:l="vertical",className:i="",ariaLabel:u}){const c=o.useId(),d=r??`radio-group-${c}`;return n.jsx("div",{className:`radio-group radio-group--${l} ${i}`.trim(),role:"radiogroup","aria-label":u,children:e.map(h=>n.jsx(bu,{name:d,value:h.value,checked:t===h.value,disabled:s||h.disabled,label:h.label,onChange:p=>{p&&a?.(h.value)}},h.value))})}const V2={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function q2({tone:e="info",title:t,message:a,children:r,dismissible:s=!1,onDismiss:l,live:i,className:u=""}){const{t:c}=_e.useTranslation(),[d,h]=o.useState(!1),p=o.useRef(null),m=o.useCallback(()=>{const b=p.current;b&&b.contains(document.activeElement)&&mr(b),h(!0),l?.()},[l]);if(d)return null;const g=Be("alert",`alert--${e}`,u),y=i??(e==="danger"||e==="warning"?"assertive":"polite"),C=y==="assertive"?"alert":y==="polite"?"status":void 0,f=!!t,_=!!(a||r);return n.jsxs("div",{ref:p,className:g,role:C,children:[n.jsxs("div",{className:"alert__body",children:[n.jsxs("div",{className:"alert__header",children:[n.jsx(ot,{icon:V2[e],size:20,className:"alert__icon"}),f&&n.jsx("span",{className:"alert__title body-2",children:t}),!f&&_&&n.jsx("div",{className:"alert__message body-3",children:a||r})]}),f&&_&&n.jsx("div",{className:"alert__message alert__message--indented body-3",children:a||r})]}),s&&n.jsx("button",{type:"button",className:"alert__dismiss",onClick:m,"aria-label":c("common.close","\uB2EB\uAE30"),children:"\xD7"})]})}const U2={ready:"search",guide:"info",error:"circle-alert"};function G2(e,t){const a=t.filter(Boolean);if(a.length===0)return e;const r=[];let s=0,l=0;for(const i of a){const u=e.indexOf(i,s);u<0||(u>s&&r.push(e.slice(s,u)),r.push(n.jsx("strong",{className:"search-summary__em body-2",children:i},l++)),s=u+i.length)}return s<e.length&&r.push(e.slice(s)),r}function K2({status:e="guide",label:t,children:a,emphasis:r,icon:s,className:l=""}){const i=s===!1?null:s??U2[e],u=Be("search-summary",`search-summary--${e}`,l),c=t??a,d=typeof c=="string"&&r&&r.length>0?G2(c,r):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[i!=null&&n.jsx(ot,{icon:i,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:d})]})}function Ga({title:e,items:t}){const{t:a}=_e.useTranslation(),{anchorRect:r,openAt:s,close:l}=za(),i=o.useRef(null),u=fr(!!r,(c,d)=>{c&&d?s(i.current?.querySelector("button")??d):l()},i);return n.jsxs("span",{ref:i,style:{display:"contents"},children:[n.jsx(fe,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!r,ariaLabel:a("common.info","\uC124\uBA85"),onPointerEnter:c=>{Un(c)||s(c.currentTarget)},onPointerLeave:c=>{Un(c)||l()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{ea()||s(c.currentTarget)},onBlur:l}),r&&n.jsx(qn,{title:e,items:t,showIndex:t.length>1,anchorRect:r,onClose:l})]})}function Y2({items:e=[],value:t,onChange:a,className:r="",size:s=40}){const l=o.useId(),{t:i}=_e.useTranslation(),u=o.useRef(null),c=e.find(C=>!C.disabled)?.key,d=e.some(C=>C.key===t)?t:c??e[0]?.key,h=e.find(C=>C.key===d&&!C.disabled)?.key??c,p=()=>Array.from(u.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),m=(C,f=p())=>{if(f.length===0)return;const _=(C%f.length+f.length)%f.length;f[_]?.focus(),f[_]?.click()},g=C=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(C.key))return;C.preventDefault();const f=p(),_=f.indexOf(C.currentTarget);C.key==="ArrowRight"||C.key==="ArrowDown"?m(_+1,f):C.key==="ArrowLeft"||C.key==="ArrowUp"?m(_-1,f):C.key==="Home"?m(0,f):m(f.length-1,f)},y=e.find(C=>C.key===d);return n.jsxs("div",{className:`tabs ${r}`.trim(),children:[n.jsx("div",{ref:u,className:`tabs__list tabs__list--${s}`,role:"tablist","aria-label":i("tabs.ariaLabel","\uD0ED"),children:e.map(C=>n.jsx("button",{id:`tabs__tab-${l}-${C.key}`,type:"button",role:"tab","aria-selected":C.key===d,"aria-controls":`tabs__panel-${l}-${C.key}`,disabled:C.disabled,tabIndex:C.key===h?0:-1,className:`tabs__tab body-2${C.key===d?" tabs__tab--active":""}`,onClick:()=>{C.key!==t&&a?.(C.key)},onKeyDown:g,children:C.label},C.key))}),y&&n.jsx("div",{id:`tabs__panel-${l}-${y.key}`,role:"tabpanel","aria-labelledby":`tabs__tab-${l}-${y.key}`,tabIndex:0,className:"tabs__panel",children:y.panel},y.key)]})}const Z2={xs:12,sm:16,md:20,lg:28,xl:36};function X2(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 J2({src:e,name:t,size:a="md",shape:r="circle",className:s=""}){const{t:l}=_e.useTranslation(),[i,u]=o.useState(null),c=!!e&&i===e,d=t?X2(t):"",h=!!e&&!c,p=!h&&!!d,m=t||l("avatar.ariaLabel","\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0");return n.jsxs("span",{className:`avatar avatar--${a} avatar--${r} ${s}`.trim(),role:"img","aria-label":m,children:[h&&n.jsx("img",{className:"avatar__image",src:e,alt:m,onError:()=>u(e??null)}),!h&&p&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:d}),!h&&!p&&n.jsx(ot,{icon:"user-round",size:Z2[a],className:"avatar__icon"})]})}function Q2(e,t){if(!t)return!0;const a=t.split(",").map(l=>l.trim()).filter(Boolean);if(a.length===0)return!0;const r=e.name.toLowerCase(),s=e.type.toLowerCase();return a.some(l=>{const i=l.toLowerCase();return i.startsWith(".")?r.endsWith(i):i.endsWith("/*")?s.startsWith(i.slice(0,-1)):s===i})}function ev({onFilesSelected:e,accept:t,multiple:a=!1,disabled:r=!1,showFileList:s=!0,files:l,onRemove:i,className:u=""}){const{t:c}=_e.useTranslation(),d=o.useRef(null),[h,p]=o.useState(!1),[m,g]=o.useState([]),y=l??m,C=x=>{if(!x||x.length===0)return;const A=Array.from(x).filter(E=>Q2(E,t));if(A.length===0)return;const B=a?A:A.slice(0,1);if(l===void 0){const E=a?[...y,...B]:B;g(E),e?.(E)}else e?.(B)},f=x=>{x.preventDefault(),!r&&p(!0)},_=x=>{x.preventDefault(),p(!1)},b=x=>{x.preventDefault(),p(!1),!r&&C(x.dataTransfer.files)},w=x=>{const A=x.target;try{C(A.files)}finally{A.value=""}},v=()=>{r||d.current?.click()},k=x=>{if(!r&&(i?.(x),l===void 0)){const A=y.filter((B,E)=>E!==x);g(A),i||e?.(A)}};return n.jsxs("div",{className:`file-upload ${u}`.trim(),children:[n.jsxs("div",{className:Be("file-upload__dropzone",h&&"file-upload__dropzone--dragging",r&&"file-upload__dropzone--disabled"),role:"button",tabIndex:r?-1:0,"aria-disabled":r,onClick:v,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),v())},onDragOver:f,onDragLeave:_,onDrop:b,children:[n.jsx(ot,{icon:"upload",size:24,className:"file-upload__icon"}),n.jsx("span",{className:"file-upload__prompt body-2",children:c("fileUpload.dragPrompt","\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC")}),n.jsx("button",{type:"button",className:"file-upload__browse-button body-3",disabled:r,onClick:x=>{x.stopPropagation(),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:w,tabIndex:-1})]}),s&&y.length>0&&n.jsx("ul",{className:"file-upload__list",children:y.map((x,A)=>n.jsxs("li",{className:"file-upload__list-item body-3",children:[n.jsx("span",{className:"file-upload__file-name body-3",children:x.name}),n.jsx("button",{type:"button",className:"file-upload__remove-button","aria-label":c("fileUpload.removeAriaLabel",{name:x.name}),disabled:r,onClick:()=>k(A),children:n.jsx(ot,{icon:"x",size:14})})]},`${x.name}-${A}`))})]})}function tv({items:e,className:t=""}){const{t:a}=_e.useTranslation();return n.jsx("nav",{className:`breadcrumb ${t}`.trim(),"aria-label":a("breadcrumb.ariaLabel","\uC774\uB3D9 \uACBD\uB85C"),children:n.jsx("ol",{className:"breadcrumb__list",children:e.map((r,s)=>{const l=s===e.length-1;return n.jsxs("li",{className:"breadcrumb__item",children:[l?n.jsx("span",{className:"breadcrumb__current body-3","aria-current":"page",children:r.label}):r.href?n.jsx("a",{className:"breadcrumb__link body-3",href:r.href,target:r.target,rel:r.rel??(r.target==="_blank"?"noopener noreferrer":void 0),onClick:r.onClick,children:r.label}):r.onClick?n.jsx("button",{type:"button",className:"breadcrumb__link body-3",onClick:r.onClick,children:r.label}):n.jsx("span",{className:"breadcrumb__text body-3",children:r.label}),!l&&n.jsx(ot,{icon:"chevron-right",size:14,className:"breadcrumb__separator"})]},s)})})})}const nv={small:14,medium:20,large:28};function av({value:e,onChange:t,max:a=5,readOnly:r=!1,size:s="medium",ariaLabel:l,className:i=""}){const{t:u}=_e.useTranslation(),c=r||!t,[d,h]=o.useState(null),p=c?e:Number.isFinite(e)?Math.round(e):0,m=d??p,g=nv[s],y=x=>{x!==e&&t?.(x)},C=x=>{c||y(x)},f=x=>{c||ea()||h(x)},_=o.useRef(null),b=x=>{const A=Math.min(a,Math.max(1,x));y(A),Array.from(_.current?.querySelectorAll("[data-star]")??[]).find(B=>B.dataset.star===String(A))?.focus()},w=x=>{if(!c){switch(x.key){case"ArrowRight":case"ArrowUp":b((p||0)+1);break;case"ArrowLeft":case"ArrowDown":b((p||1)-1);break;case"Home":b(1);break;case"End":b(a);break;default:return}x.preventDefault()}},v=p>=1&&p<=a?Math.round(p):1,k=()=>{c||h(null)};return n.jsx("div",{className:`rating rating--${s}${c?" rating--readOnly":""} ${i}`.trim(),ref:_,onKeyDown:w,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:a}):l??u("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:k,onPointerUp:x=>{x.pointerType==="touch"&&k()},onPointerCancel:x=>{x.pointerType==="touch"&&k()},children:Array.from({length:a},(x,A)=>{const B=A+1,E=Math.max(0,Math.min(1,m-A)),D=E>0&&E<1,N=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(ot,{icon:"star",size:g,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(ot,{icon:"star",size:g,className:"rating__star rating__star--filled"})})]});return c?n.jsx("span",{className:"rating__item","aria-hidden":"true",children:N},B):n.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":p===B,"aria-label":u("rating.starLabel",{n:B}),"data-star":B,tabIndex:B===v?0:-1,onClick:()=>C(B),onMouseEnter:()=>f(B),children:N},B)})})}const rv=20,ov=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function sv({value:e,onChange:t,palette:a=ov,size:r=40,className:s="",ariaLabel:l}){const{t:i}=_e.useTranslation();return n.jsx("div",{className:`color-picker ${s}`.trim(),role:"group","aria-label":l,children:a.map(u=>{const c=e?.toLowerCase()===u.toLowerCase();return n.jsx("button",{type:"button",className:`color-picker__swatch color-picker__swatch--${r}`,style:{backgroundColor:u},onClick:()=>t(u),"aria-pressed":c,"aria-label":c?`${u} ${i("colorPicker.selected","\uC120\uD0DD\uB428")}`:u,children:c&&n.jsx(ot,{icon:"check",size:rv,className:"color-picker__check"})},u)})})}function gu({icon:e,label:t,tooltip:a,wrapperStyle:r,color:s,bgColor:l,useHover:i=!0,iconSize:u="medium"}){const{t:c}=_e.useTranslation(),d=u==="small",h=Be("category-icon",d?"category-icon--small":""),p=d?16:20,m=o.useRef(null),[g,y]=o.useState(!1),C=o.useMemo(()=>{const B=r&&typeof r=="object"?{...r}:{};return!s&&!l?B:{...B,...s?{color:s,"--t-item-fg":s}:{},...l?{"--t-item-bg":l}:{}}},[r,s,l]),f=a||t,_=i&&!!f,[b,w]=o.useState(null);o.useLayoutEffect(()=>{g&&w(m.current?.getBoundingClientRect()??null)},[g]),o.useEffect(()=>{if(!i&&g)try{y(!1)}catch{}},[i,g]),o.useEffect(()=>{if(!g)return;const B=E=>{const D=m.current;if(!D)return;const N=E.target;N&&!D.contains(N)&&y(!1)};return document.addEventListener("pointerdown",B,!0),()=>document.removeEventListener("pointerdown",B,!0)},[g]);const v=o.useCallback(()=>{i&&y(!0)},[i]),k=o.useCallback(()=>{i&&y(!1)},[i]),x=o.useCallback(()=>y(!1),[]),A=o.useCallback(B=>{if(B.key==="Escape"){y(!1);return}(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),y(E=>!E))},[]);return n.jsxs("span",{ref:m,className:Be("category-icon__wrap",_&&"category-icon__wrap--interactive"),onPointerEnter:v,onPointerLeave:k,onFocus:v,onBlur:k,onKeyDown:A,role:"button",tabIndex:0,"aria-label":typeof f=="string"?c("common.descriptionFor",{name:f,defaultValue:`${f} \uC124\uBA85`}):void 0,"aria-haspopup":!!f,"aria-expanded":g,"data-tooltip-ignore":!0,children:[n.jsx(ot,{icon:e,label:t,className:h,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:C,size:p}),g&&f&&n.jsx(Mn,{anchorRect:b,text:typeof f=="string"?f:void 0,offset:8,onClose:x,className:"category-icon__tooltip",ariaLabel:typeof f=="string"?f:void 0})]})}let Gn=null;function Ka(e){if(Gn&&Gn!==e)try{Gn()}catch{}return Gn=e,()=>{Gn===e&&(Gn=null)}}function _r(e){if(Gn===e){Gn=null;try{e()}catch{}}}function Ya(e,t){let a=()=>{};const r=new Promise(u=>{a=u});if(typeof e!="string"||e.trim()===""){At("one-shot-empty-url","[core] playOneShot \uC5D0 \uBE48 \uC8FC\uC18C\uAC00 \uC654\uB2E4 \u2014 \uC548 \uD2BC\uB2E4. \uBD80\uB974\uB294 \uCABD\uC774 \uC8FC\uC18C\uB97C \uC5BB\uAE30 \uC804\uC5D0 \uBD88\uB800\uB2E4.",new Error("playOneShot(empty)").stack),a(!1);try{t?.(!1)}catch{}return{el:{},stop:()=>{},done:r}}let s=!1;const l=u=>{if(!s){s=!0;try{t?.(u)}catch{}a(u)}};let i;try{i=new Audio(e)}catch{return l(!1),{el:{},stop:()=>{},done:r}}i.onended=()=>l(!0),i.onerror=()=>l(!1);try{i.play().catch(()=>l(!1))}catch{l(!1)}return{el:i,stop:()=>{try{i.pause()}catch{}l(!1)},done:r}}function lv(e,t){if(!e)return{previewCodes:[],previewBucket:null};const a=e,r=i=>i.map(u=>u?.contextCode||u?.context_code).filter(Boolean).map(String);if(t==="LISTEN_IN_NOISE"){const i=a.sentences||a.items||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}if(t==="SHORT_STORY"){const i=a.items||a.sentences||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"SHORT_S"}}if(t==="LONG_STORY"){const i=a.items||a.sentences||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LONG"}}if(t==="ORDERING_SENTENCE"){const i=a.sentences||a.items||[],u=Array.isArray(i)&&i.length>0?r(i):[];return u.length===0&&(a.contextCode||a.context_code)&&u.push(String(a.contextCode||a.context_code)),{previewCodes:u,previewBucket:"LIN_D"}}const s=a.sentences||a.items||[],l=r(Array.isArray(s)?s:[]);return l.length===0&&(a.contextCode||a.context_code)&&l.push(String(a.contextCode||a.context_code)),{previewCodes:l,previewBucket:null}}function iv(e,t){const[a,r]=o.useState(!1),[s,l]=o.useState(-1),[i,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),d=o.useRef(!1),h=o.useRef(null),p=o.useRef(null),[m,g]=o.useState(!1),y=o.useRef([]),{previewCodes:C,previewBucket:f}=lv(e,t),_=`${C.join(",")}|${f??""}`,b=o.useMemo(()=>i.key===_?i.urls:[],[i,_]);o.useEffect(()=>{if(!C.length)return;let v=!1;return(async()=>{const k=[],x=[];for(const A of C)try{const B=kl(A,f);if(!B){k.push("");continue}let E=null;try{E=await Al(B)}catch{}if(!E)try{const D=await Nl(B);D&&(E=URL.createObjectURL(D),x.push(E))}catch{}k.push(E??"")}catch{k.push("")}v?x.forEach(A=>{try{URL.revokeObjectURL(A)}catch{}}):(y.current.forEach(A=>{try{URL.revokeObjectURL(A)}catch{}}),y.current=x,u({key:_,urls:k}))})(),()=>{v=!0}},[C.join(","),f]),o.useEffect(()=>()=>{y.current.forEach(v=>{try{URL.revokeObjectURL(v)}catch{}}),y.current=[]},[]);const w=o.useCallback(async v=>{if(v.stopPropagation(),v.preventDefault(),d.current){h.current&&_r(h.current),d.current=!1;try{c.current?.pause()}catch{}r(!1),l(-1);return}if(!b.filter(Boolean).length)return;let k=null;const x=()=>{d.current=!1,k?.stop()};h.current=x;const A=Ka(x);d.current=!0,r(!0);for(let B=0;B<b.length&&d.current;B++){const E=b[B];if(E&&(l(B),k=Ya(E),c.current=k.el,!await k.done))break}A(),h.current===x&&(h.current=null,d.current=!1,r(!1),l(-1))},[b]);return o.useEffect(()=>()=>{h.current&&_r(h.current),d.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:a,playingIndex:s,previewUrls:b,previewHover:m,setPreviewHover:g,previewBtnRef:p,handlePreview:w}}const uv=e=>{if(!e)return[];const t=typeof e.context=="string"&&e.context.trim()||typeof e.sentence=="string"&&e.sentence.trim()||typeof e.text=="string"&&e.text.trim()||"";if(t)return[String(t)];const a=e.sentences||e.items||e.questions||[];return Array.isArray(a)&&a.length>0?a.map(r=>{if(typeof r=="string")return r;if(r&&typeof r=="object"){const s=r;return s.sentence||s.text||s.context||s.question||s.title||""}return""}).filter(r=>typeof r=="string"&&r.trim().length>0).map(r=>r.trim()):[]};function Ro(e){const{index:t,type:a,trainingData:r,ariaLabel:s,depth:l,renderPopup:i,completed:u,completedIds:c,selectedIds:d,tooltipText:h,useDescriptionTooltip:p=!1,onRemove:m,hideCheckBadge:g=!1,showTypeLabel:y=!1,onComplete:C,onSelect:f,onMore:_,countLabelOverride:b,size:w="square"}=e||{},{t:v}=_e.useTranslation(),[k,x]=o.useState(!1),A=o.useRef(null),[B,E]=o.useState(!1);o.useEffect(()=>{A.current?.matches(":hover")&&E(!0)},[]);const{playing:D,playingIndex:N,previewUrls:$,previewHover:L,setPreviewHover:U,previewBtnRef:M,handlePreview:P}=iv(r,a?.key),T=o.useCallback(()=>{f?f():x(!0)},[f]),ee=o.useCallback(()=>x(!1),[]),te=o.useCallback(()=>E(!0),[]),I=o.useCallback(()=>E(!1),[]),Y=o.useCallback(()=>U(!0),[U]),R=o.useCallback(()=>U(!1),[U]),[q,Z]=o.useState(null);o.useLayoutEffect(()=>{L&&Z(M.current?.getBoundingClientRect()??null)},[L,M]);const[z,j]=o.useState(null);o.useLayoutEffect(()=>{B&&!k&&p&&j(A.current?.getBoundingClientRect()??null)},[B,k,p]);const F=o.useCallback(we=>{we.target===we.currentTarget&&(we.key==="Enter"||we.key===" ")&&(we.preventDefault(),T())},[T]),O=r||null,G=o.useMemo(()=>{if(!p)return null;const we=h?(Array.isArray(h)?h:[h]).filter(Boolean):null,qe=we&&we.length>0?we:uv(O);return qe&&qe.length>0?qe:null},[p,h,O]),ie=o.useCallback(we=>{we.stopPropagation(),m?.()},[m]),K=o.useCallback(we=>we.stopPropagation(),[]),pe=o.useCallback(we=>{typeof C=="function"&&C(we)},[C]),X=u||(c&&r?.id!=null?c.has(String(r.id)):!1),H=!X&&(d!=null&&r?.id!=null?d.has(String(r.id)):!1);zi("speechear.popup.close",ee);const ne=Xl(),V=`${a?.label||""} ${t+1}`,W=O?.title||O?.name||V;let oe=a?.icon,xe,be="",me="";try{const we=O?.category_0||O?.category_main_code||O?.category_main,qe=O?.category_1||O?.category_sub_code||O?.category_sub,Ye=ne.find(mt=>mt.key===we);Ye?.icon&&(oe=Ye.icon),!xe&&Ye?.color&&(xe={"--t-item-fg":Ye.color}),!xe&&O?.iconColor&&(xe={"--t-item-fg":O.iconColor}),be=Ye?v(`topic.${Ye.key}`,{defaultValue:Ye.label||""}):"";try{const mt=Ye?.subs?.find(wt=>wt.key===qe);me=mt?v(`topic.sub.${mt.key}`,{defaultValue:mt.label||""}):""}catch{}}catch{}const ke=me?`${be} / ${me}`:be||a?.label||W,Le=we=>v("training.countQuestions",{n:we,count:we}),Me=we=>v("training.countSentences",{n:we,count:we});let le="";try{if(O)if(a?.key==="LISTEN_IN_NOISE"){let we=0;Array.isArray(O.items)&&O.items.length>0?we=O.items.length:Array.isArray(O.sentences)&&O.sentences.length>0?we=O.sentences.length:O.sentences&&(we=1),le=Me(we)}else if(a?.key==="SHORT_STORY"){let we=1;Array.isArray(r?.items)?we=r.items.length:Array.isArray(r?.raw&&r.raw?.items)?we=r.raw.items.length:Array.isArray(O?.questions)?we=O.questions.length:Array.isArray(O?.sentences)&&(we=O.sentences.length),le=Le(we)}else if(a?.key==="LONG_STORY"){let we=1;if(Array.isArray(O.items)&&O.items.length>0){const qe=O.items.reduce((Ye,mt)=>{const wt=mt.questionItems;return Array.isArray(wt)?Ye+wt.length:Array.isArray(mt.questions)?Ye+mt.questions.length:Ye},0);we=qe>0?qe:O.items.length}else Array.isArray(O.questions)&&O.questions.length>0?we=O.questions.length:Array.isArray(O.sentences)&&O.sentences.length>0&&(we=O.sentences.length);le=Le(we)}else if(a?.key==="ORDERING_SENTENCE"){let we=1;Array.isArray(O.items)&&O.items.length>0?we=O.items.length:Array.isArray(O.sentences)&&O.sentences.length>0&&(we=O.sentences.length),le=Me(we)}else Array.isArray(O.items)&&(le=O.items.length>0?Le(O.items.length):"")}catch{}const ve=w==="row",$e=w==="list"||ve,Ae=w==="compact",Ie=w==="small",ze=Ie&&a?.key?Uf().find(we=>we.key===a.key):void 0,dt=ze?Jl[ze.key]:void 0,st=ze?dt?v(`trainingType.${dt}.title`,{defaultValue:ze.label}):ze.label??"":"",et=y&&a?.label&&a.label!==String(W)?String(a.label):Ie&&st&&st!==String(W)?st:"",gt=!!et,Se=b!==void 0?b:le,Ge=[et,typeof W=="string"?W:"",Se].map(we=>String(we??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:A,className:`training-block-button${$e?" training-block-button--list":""}${ve?" training-block-button--row":""}${Ae?" training-block-button--compact":""}${Ie?" training-block-button--small":""}${X?" training-block-button--completed":""}${H?" training-block-button--selected":""}${gt&&!Ie?" training-block-button--withType":""}${Ie&&!gt?" training-block-button--no-type-label":""}`,onClick:T,onPointerEnter:te,onPointerLeave:I,role:"button",tabIndex:0,onKeyDown:F,"aria-label":typeof s=="string"?s:Ge||void 0,title:!p&&h&&(Array.isArray(h)?h.filter(Boolean).join(`
824
+ `):h)||void 0,children:[n.jsxs("div",{className:"training-block-button__left",children:[y&&a?.label&&a.label!==String(W)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:a.label}),Ie&&st&&st!==String(W)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:st}),n.jsx(gu,{icon:oe,label:W,tooltip:ke,wrapperStyle:xe,iconSize:Ie||Ae?"small":"medium"}),!g&&(X||H)&&!(m&&B)&&n.jsx(Dn,{className:m?"training-block-button__check--removable":void 0,icon:"check",position:"top-left",size:32,"aria-label":X?v("training.completed","\uD6C8\uB828 \uC644\uB8CC"):v("training.selected","\uC120\uD0DD\uB428")}),m&&n.jsx(Dn,{className:`training-block-button__remove${B?" is-hover":""}`,icon:"remove",position:"top-left",size:32,"aria-label":v("common.remove","\uC81C\uAC70"),onClick:ie}),n.jsx("div",{className:`training-block-button__title ${Ae?"body-3":Ie?"body-3b":"h3"}`,children:String(W)}),n.jsxs("div",{className:"training-block-button__description",children:[Se?n.jsx("div",{className:`training-block-button__count ${Ie?"caption-2":"caption-1"}`,children:Se}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(ot,{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:Ie?12:20})})]}),($e&&!ve||Ie)&&$.length>0&&n.jsx("div",{ref:M,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:K,onPointerEnter:Y,onPointerLeave:R,children:n.jsx(fe,{htmlType:"button",size:Ie?28:32,type:"dot",icon:D?"pause":"play",variant:Ie?"transparent-lightGray":"default",useBorder:!1,selected:D,ariaLabel:String(W).trim()?D?v("training.stopFor",{name:W,defaultValue:`${W} \uC815\uC9C0`}):v("training.previewFor",{name:W,defaultValue:`${W} \uBBF8\uB9AC \uB4E3\uAE30`}):D?v("training.stop","\uC815\uC9C0"):v("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:P})})]}),_&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:we=>{we.stopPropagation(),_(we)},children:n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(W).trim()?v("common.moreFor",{name:W}):v("common.more","\uB354\uBCF4\uAE30")})})]}),L&&n.jsx(Mn,{anchorRect:q,text:D?v("training.stop","\uC815\uC9C0"):v("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:R}),B&&!k&&p&&(G?n.jsx(qn,{anchorRect:z,items:G,activeIndex:N,onClose:I}):O?.subTitle?n.jsx(Mn,{anchorRect:z,text:O.subTitle,offset:8,onClose:I}):null),k&&i&&i({trainingData:O,typeKey:a?.key??"",onClose:ee,onComplete:pe,popupTitle:String(W),popupSubTitle:a?.subTitle,depth:l!=null?String(l):void 0,popupIcon:oe,popupIconTooltip:String(ke),popupWrapperStyle:xe})]})}const yu=200;function cv(e){return e.itemId?(Xf()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function vu({plan:e,groups:t,anchorRect:a,offset:r=12,onClose:s}){const{t:l}=_e.useTranslation(),i=o.useMemo(()=>t?t.map((c,d)=>({key:c.key??c.type?.key??String(d),label:c.label,type:c.type,data:c.items??[]})).filter(c=>c.data.length>0):Qf(l).map(c=>{const d=(e?.items??[]).filter(h=>h.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:d.length,data:d.map(cv).filter(h=>h!=null)}}).filter(c=>c.pickedCount>0),[t,e?.items,l]);if(i.length===0)return null;const u=n.jsx("div",{className:se("training-tooltip__box"),children:n.jsx("div",{className:se("training-tooltip__groups"),children:i.flatMap(({key:c,label:d,type:h,data:p},m)=>[m>0?n.jsx("div",{className:se("training-tooltip__divider")},`div-${c}`):null,n.jsxs("div",{className:se("training-tooltip__section"),children:[n.jsx("div",{className:se("training-tooltip__section-header"),children:n.jsx("span",{className:se("training-tooltip__type-label body-3b"),children:d})}),n.jsx("div",{className:se("training-tooltip__items"),children:p.map((g,y)=>n.jsx(Ro,{index:y,type:h,trainingData:g,size:"compact",hideCheckBadge:!0},String(g.id??y)))})]},c)])})});return a?n.jsx(Bn,{anchorRect:a,offset:r,onClose:s,closeOnOutsideClick:!1,className:se("training-tooltip"),ariaLabel:l("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const dv=200;function pv({icon:e,count:t,title:a,plan:r,tooltip:s=!0,hoverAccent:l=!1,className:i="",onClick:u,onMouseEnter:c,onMouseLeave:d}){const h=!!u||!!c||s&&!!r,p=Be("count-tile",h&&"count-tile--interactive",h&&l&&"count-tile--accent",u&&"count-tile--clickable",i),m=o.useRef(null),[g,y]=o.useState(null),C=o.useRef(null),f=o.useRef(null),_=!!(g&&r&&s),b=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),f.current&&(clearTimeout(f.current),f.current=null)},[]),w=o.useCallback(()=>{b(),y(null)},[b]),v=o.useCallback(()=>{!s||!r||(b(),C.current=setTimeout(()=>{C.current=null,y(m.current?.getBoundingClientRect()??null)},yu))},[s,r,b]),k=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),!f.current&&(f.current=setTimeout(()=>{f.current=null,y(null)},dv))},[]);return o.useEffect(()=>()=>{b()},[b]),o.useEffect(()=>{(!s||!r)&&w()},[s,r,w]),o.useEffect(()=>{if(!_)return;const x=B=>B instanceof Element&&(m.current?.contains(B)||!!B.closest(".training-tooltip")),A=B=>{x(B.target)?b():k()};return document.addEventListener("pointerover",A,!0),()=>document.removeEventListener("pointerover",A,!0)},[_,b,k]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:m,className:p,onClick:u?x=>{w(),u(x)}:void 0,onKeyDown:u?x=>{x.key!=="Enter"&&x.key!==" "||(x.preventDefault(),x.currentTarget.click())}:void 0,onPointerEnter:x=>{x.pointerType==="touch"||x.pointerType==="pen"?w():v()},onMouseEnter:c,onMouseLeave:x=>{k(),d?.(x)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${a} ${t}`,children:[n.jsx(ot,{icon:e,size:20,className:"count-tile__icon"}),n.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:t})]}),g&&r&&n.jsx(vu,{plan:r,anchorRect:g,onClose:w})]})}let Za=0,_u="",Po="",Xa=0;function xu(){return wu(!1)}function hv(){return wu(!0)}function wu(e){const t=typeof document<"u";Za===0&&t&&(_u=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(Xa===0&&(Po=document.body.style.paddingRight),Xa++,document.body.style.paddingRight="0px"),Za++;let a=!1;return()=>{a||(a=!0,Za=Math.max(0,Za-1),e&&t&&(Xa=Math.max(0,Xa-1),Xa===0&&(Po?document.body.style.paddingRight=Po:document.body.style.removeProperty("padding-right"))),Za===0&&t&&(document.body.style.overflow=_u))}}function mv(){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 Cv({open:e,onClose:t,ariaLabel:a,title:r,children:s,size:l="md",closeOnBackdrop:i=!0,closeOnEscape:u=!0,showClose:c=!0,className:d,contentClassName:h}){const{t:p}=_e.useTranslation(),m=o.useId(),g=o.useRef(null),y=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const b=document.activeElement,w=xu(),v=g.current;return yo(v,b),v?.focus(),()=>{w();const k=document.activeElement;(!k||k===document.body||v&&v.contains(k))&&vo(b)?.focus?.()}},[e]);const C=o.useRef(y),f=o.useRef(u);o.useEffect(()=>{C.current=y,f.current=u}),o.useEffect(()=>{if(e)return Qn(()=>{f.current&&C.current()})},[e]);const _=o.useRef(!1);return bo(g,e),!e||typeof document>"u"?null:hn.createPortal(n.jsx("div",{className:Be("dialog",d),onPointerDown:i?b=>{_.current=b.target===b.currentTarget}:void 0,onMouseDown:b=>{b.target===b.currentTarget&&b.preventDefault()},onClick:i?b=>{const w=_.current;_.current=!1,w&&b.target===b.currentTarget&&y()}:void 0,children:n.jsxs("div",{ref:g,role:"dialog","aria-modal":"true","aria-label":r?void 0:a,"aria-labelledby":r?m:void 0,tabIndex:-1,className:Be("dialog__surface",`dialog__surface--${l}`,h),onClick:b=>b.stopPropagation(),children:[r?n.jsx("div",{className:"dialog__header",children:n.jsx("h2",{id:m,className:"dialog__title h4b",children:r})}):null,c?n.jsx("button",{type:"button",className:"dialog__close","aria-label":p("common.close","\uB2EB\uAE30"),onClick:y,children:n.jsx(mv,{})}):null,n.jsx("div",{className:"dialog__body",children:s})]})}),document.body)}function fv({columns:e,rows:t,rowKey:a,title:r,toolbar:s,empty:l,loading:i,caption:u,className:c=""}){const{t:d}=_e.useTranslation(),h=!i&&t.length===0;return n.jsxs("div",{className:Be("board",c),children:[r||s?n.jsxs("div",{className:"board__head",children:[r?n.jsx("h2",{className:"board__title",children:r}):n.jsx("span",{}),s?n.jsx("div",{className:"board__toolbar",children:s}):null]}):null,n.jsxs("table",{className:"board__table",children:[u?n.jsx("caption",{className:"board__caption",children:u}):null,n.jsx("thead",{children:n.jsx("tr",{children:e.map(p=>n.jsx("th",{scope:"col",className:Be("board__th",`board__cell--${p.headerAlign??p.align??"left"}`),style:p.width?{width:p.width}:void 0,children:p.header},p.key))})}),n.jsx("tbody",{children:i?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:i})}):h?n.jsx("tr",{children:n.jsx("td",{className:"board__state",colSpan:e.length,children:l??d("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((p,m)=>n.jsx("tr",{className:"board__row",children:e.map(g=>n.jsx("td",{className:Be("board__td",`board__cell--${g.align??"left"}`),children:g.render(p,m)},g.key))},a(p,m)))})]})]})}function bv({name:e,role:t,photo:a,media:r,credentials:s,size:l=190,className:i=""}){return n.jsxs("div",{className:Be("person-card",i),children:[n.jsx("div",{className:"person-card__photo",style:{width:l,height:l},children:r??(a?n.jsx("img",{src:a,alt:t?`${e} ${t}`:e}):null)}),n.jsx("h3",{className:"person-card__name",children:e}),t?n.jsx("p",{className:"person-card__role",children:t}):null,s?.length?n.jsx("ul",{className:"person-card__credentials",children:s.map(u=>n.jsx("li",{children:u},u))}):null]})}function gv({groups:e,className:t=""}){return n.jsx("div",{className:Be("timeline",t),children:e.map(a=>n.jsxs("section",{className:"timeline__group",children:[n.jsx("h3",{className:"timeline__title",children:a.title}),n.jsx("ul",{className:"timeline__rows",children:a.entries.map((r,s)=>n.jsxs("li",{className:"timeline__row",children:[r.label?n.jsx("span",{className:"timeline__label",children:r.label}):null,n.jsx("div",{className:"timeline__items",children:r.items.map((l,i)=>n.jsx("p",{children:l},i))})]},`${r.label??""}-${s}`))})]},a.title))})}function yv({title:e,kind:t,body:a,badge:r,badgeSrc:s,footer:l,width:i,className:u=""}){const c=r??(s?n.jsx("img",{src:s,alt:""}):null);return n.jsxs("div",{className:Be("publication-card",u),style:i?{width:i,flexShrink:0}:void 0,children:[c?n.jsx("div",{className:"publication-card__badge","aria-hidden":"true",children:c}):null,n.jsx("h3",{className:"publication-card__title",children:e}),t?n.jsx("p",{className:"publication-card__kind",children:t}):null,n.jsx("p",{className:"publication-card__body",children:a}),l?n.jsx("div",{className:"publication-card__footer",children:l}):null]})}function vv({logo:e,alt:t,onDone:a,durationMs:r=3e3}){const s=Ia(a);return o.useEffect(()=>{const l=setTimeout(()=>s.current?.(),r);return()=>clearTimeout(l)},[r,s]),n.jsx("div",{className:"splash-logo",style:{"--splash-logo-duration":`${r}ms`},"aria-hidden":"true",children:n.jsx("img",{src:e,alt:t,className:"splash-logo__image"})})}function _v({eyebrow:e,eyebrowIndex:t,title:a,description:r,level:s=2,tone:l="dark",className:i=""}){const u=s===1?"h1":"h2";return n.jsxs("div",{className:Be("section-header",`section-header--${l}`,i),children:[e?n.jsxs("p",{className:"section-header__eyebrow",children:[t?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"section-header__index",children:t}),n.jsx("span",{"aria-hidden":!0,className:"section-header__rule"})]}):null,e]}):null,a?n.jsx(u,{className:"section-header__title",children:a}):null,r?n.jsx("div",{className:"section-header__description",children:r}):null]})}function xv({items:e,className:t=""}){return n.jsx("ul",{className:Be("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))})}const Ja=new Map;function vn(e){const{t}=_e.useTranslation(),{options:a=[],value:r=a.find(v=>!v.disabled)?.key??a[0]?.key,onChange:s=v=>{},className:l="",size:i=40,shape:u="pill",useBG:c=!0,fullWidth:d=!1,minButtonWidth:h,ariaLabel:p}=e||{},m=o.useRef(null),g=a.filter(v=>!v.disabled),y=o.useId(),C=a.map(v=>v.key).join("\xB7");o.useEffect(()=>{if(!(!zn||p!=null&&p!=="")){if(Ja.set(y,C||"(\uBCF4\uAE30 \uC5C6\uC74C)"),Ja.size>1){const v=[...Ja.values()].sort();At(`segmented-control-unnamed:${v.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${Ja.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()=>{Ja.delete(y)}}},[p,C,y]);const f=v=>{if(!g.length)return;const k=Math.max(0,g.findIndex(A=>A.key===r)),x=v==="first"?g[0]:v==="last"?g[g.length-1]:g[(k+v+g.length)%g.length];x&&(s(x.key),Array.from(m.current?.querySelectorAll("[data-segkey]")??[]).find(A=>A.dataset.segkey===x.key)?.focus())},_=v=>{switch(v.key){case"ArrowRight":case"ArrowDown":f(1);break;case"ArrowLeft":case"ArrowUp":f(-1);break;case"Home":f("first");break;case"End":f("last");break;default:return}v.preventDefault()},b=v=>{const k=x=>typeof x=="string"||typeof x=="number";if(!(!k(v.label)||v.count==null||v.count===!1||!k(v.count)))return`${v.label}, ${v.count}`},w=g.some(v=>v.key===r)?r:g[0]?.key;return n.jsx("div",{ref:m,onKeyDown:_,className:Be("segmented-control",`segmented-control--${u}`,`segmented-control--${i}`,d&&"segmented-control--full",!c&&"segmented-control--no-bg",h!=null&&"segmented-control--min",l),style:h!=null?{"--segmented-min-button-w":`${h}px`}:void 0,role:"radiogroup","aria-label":p??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:a.map(v=>n.jsx(fe,{htmlType:"button",role:"radio","aria-checked":v.key===r,"data-segkey":v.key,tabIndex:v.key===w?0:-1,label:v.label,count:v.count,ariaLabel:b(v),disabled:v.disabled,className:v.key===r?"is-selected":"",onClick:()=>{v.disabled||s(v.key)},size:i,shape:u,useBorder:!1,useBG:!1},v.key))})}const wv=260;function Pn(e){const{t}=_e.useTranslation(),{title:a,subtitle:r,headerActions:s,headerSegment:l,children:i,buttons:u,footer:c,footerStart:d,footerEnd:h,footerNote:p,footerNoteDivider:m=!1,footerClassName:g="",footerLayout:y="center",onClose:C,closeDisabled:f=!1,beforeClose:_,closeOnBackdrop:b=!0,className:w="",ariaLabel:v,useTitle:k=!0,inline:x=!1,size:A,layer:B="modal",height:E,fillBody:D=!1,resetScrollKey:N}=e||{},[$,L]=o.useState(!1),U=o.useRef(!1),M=o.useRef(null),P=o.useId(),T=o.useRef(null);o.useEffect(()=>{},[x,a,v,w]),o.useEffect(()=>{N!==void 0&&T.current&&(T.current.scrollTop=0)},[N]);const[ee,te]=o.useState(!1);o.useEffect(()=>{const H=T.current;if(!H)return;const ne=()=>te(H.scrollHeight>H.clientHeight+1);if(ne(),typeof ResizeObserver>"u")return;const V=new ResizeObserver(ne);V.observe(H);const W=H.firstElementChild;return W&&V.observe(W),()=>V.disconnect()},[i,N]),o.useEffect(()=>{if(!x)return xu()},[x]);const I=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(x)return;const H=I.current,ne=M.current;return yo(ne,H),ne&&!ne.contains(document.activeElement)&&(ne.querySelector(En)??ne).focus(),()=>{const V=document.activeElement;(!V||V===document.body||ne&&ne.contains(V))&&vo(H)?.focus?.()}},[x]),bo(M,!x);const Y=o.useRef(!0),R=_o(),q=o.useRef(null);o.useEffect(()=>(Y.current=!0,()=>{Y.current=!1,q.current&&(clearTimeout(q.current),q.current=null)}),[]);const Z=o.useCallback(()=>{!Y.current||!U.current||(U.current=!1,L(!1))},[]),z=o.useCallback((H,ne=!1)=>{if(ne&&!Y.current||U.current)return;U.current=!0,L(!0);const V=setTimeout(()=>{q.current===V&&(q.current=null);let W;try{W=H?H():void 0}catch{Z();return}W&&typeof W.then=="function"&&W.then(()=>{setTimeout(Z,120)},Z)},R?0:wv);ne&&(q.current=V)},[Z,R]),j=o.useCallback(()=>{f||_&&_()===!1||z(C,!0)},[z,C,f,_]),F=o.useRef(j);o.useEffect(()=>{F.current=j});const O=!x&&!!C;o.useEffect(()=>{if(O)return Qn(()=>F.current())},[O]);const G=O&&b,ie=o.useRef(!1),K=H=>{ie.current=H.target===H.currentTarget},pe=H=>{const ne=ie.current;ie.current=!1,ne&&H.target===H.currentTarget&&j()},X=n.jsx("div",{className:`popup ${x?"popup--inline":""} ${B==="belowPagePopup"?"popup--below-page-popup":""} ${$?"popup--closing":""} ${w}`,onPointerDown:G?K:void 0,onClick:G?pe:void 0,onMouseDown:x?void 0:H=>{H.target===H.currentTarget&&H.preventDefault()},children:n.jsxs("div",{ref:M,className:`popup-panel${A?` popup-panel--${A}`:""}${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:x?void 0:"dialog","aria-modal":x?void 0:!0,"aria-labelledby":!x&&k&&a?P:void 0,"aria-label":!x&&!(k&&a)?v??(typeof a=="string"?a:void 0):void 0,children:[!k&&(s||C)?n.jsxs("div",{className:"popup-close-float",children:[s,C&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:j,disabled:f,ariaLabel:t("common.close","\uB2EB\uAE30")})]}):a||s||C?n.jsxs("div",{className:`popup-header${r?" popup-header--with-subtitle":""}`,children:[n.jsxs("div",{className:"popup-header-main",children:[a?n.jsx("h2",{id:P,className:"popup-title popup-title--left h2",children:a}):n.jsx("span",{id:P,className:"popup-title popup-title--left h2"}),r&&n.jsx("span",{className:"popup-subtitle body-3",children:r})]}),n.jsxs("div",{className:"popup-header-aside",children:[l&&n.jsx("div",{className:"popup-header-segment",children:n.jsx(vn,{size:40,ariaLabel:l.ariaLabel,options:l.options.map(H=>({key:H.key,label:H.label,disabled:H.disabled})),value:l.value,onChange:l.onChange})}),n.jsxs("div",{className:"popup-header-actions",children:[s,C&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:j,disabled:f,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]})]}):null,n.jsx("div",{className:"popup-content",ref:T,tabIndex:ee?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:z,closeWithAnimation:j}):i})}),p!=null&&p!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${m?" popup-footer-note--divider":""}`,role:"note",children:p}),d||h?n.jsxs("div",{className:`popup-footer popup-footer--bar${g?` ${g}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof d=="function"?d({animateThen:z,closeWithAnimation:j}):d}),n.jsx("div",{className:"popup-footer__end",children:typeof h=="function"?h({animateThen:z,closeWithAnimation:j}):h})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${y!=="center"?` popup-footer--${y}`:""}`,children:u.map((H,ne)=>n.jsx(fe,{htmlType:"button",size:48,variant:H.variant??"default",label:H.label,disabled:H.disabled,onClick:()=>H.onClick?.({animateThen:z,closeWithAnimation:j})},ne))}):c?n.jsx("div",{className:`popup-footer${y!=="center"?` popup-footer--${y}`:""}${g?` ${g}`:""}`,children:typeof c=="function"?c({animateThen:z,closeWithAnimation:j}):c}):null]})});return x||typeof document>"u"?X:hn.createPortal(X,document.body)}function Bu({checked:e,onChange:t,disabled:a=!1,label:r,ariaLabel:s,labelPosition:l="right",className:i="",id:u}){const c=r&&n.jsx("span",{className:"toggle__label body-3",children:r});return n.jsxs("label",{className:`toggle${a?" toggle--disabled":""} ${i}`.trim(),children:[l==="left"&&c,n.jsx("input",{id:u,type:"checkbox",role:"switch",checked:e,disabled:a,onChange:d=>t?.(d.target.checked),"aria-label":!r&&s?s:void 0}),n.jsx("span",{className:"toggle__slider"}),l==="right"&&c]})}const Ft=40;function _n({options:e,value:t,onChange:a,placeholder:r,disabled:s=!1,block:l=!1,size:i=Ft,error:u=!1,className:c="",ariaLabel:d,ariaDescribedBy:h}){const{t:p}=_e.useTranslation(),m=r??p("dropdown.placeholder","\uC120\uD0DD"),g=o.useId(),y=o.useId(),C=o.useRef(null),f=o.useCallback((M,P)=>{const T=window.innerHeight-M.bottom<260&&M.top>260;return{position:"fixed",left:M.left,minWidth:M.width,...T?{bottom:window.innerHeight-M.top+6}:{top:M.bottom+6},zIndex:Wa(P)}},[]),{open:_,setOpen:b,toggle:w,style:v,triggerRef:k,menuRef:x}=Ha({computeStyle:f}),[A,B]=o.useState(-1),E=o.useCallback(()=>B(-1),[]),D=e.find(M=>M.value===t);o.useEffect(()=>{if(_){const M=e.findIndex(P=>P.value===t);B(M>=0?M:e.length?0:-1),requestAnimationFrame(()=>{const P=x.current;if(!P)return;const T=P.querySelectorAll(".dropdown__option")[M];T&&(P.scrollTop=Math.max(0,T.offsetTop-P.clientHeight/2+T.clientHeight/2))})}},[_]),o.useEffect(()=>{_&&B(M=>{if(M>=0&&M<e.length)return M;const P=e.findIndex(T=>T.value===t);return P>=0?P:e.length?0:-1})},[_,e.length]);const N=o.useCallback(()=>{s||w()},[s,w]),$=o.useCallback(M=>{M.disabled||s||(M.value!==t&&a?.(M.value),b(!1))},[a,b,s,t]);o.useEffect(()=>{s&&b(!1)},[s,b]);const L=o.useCallback(M=>{if(!s){if(!_){(M.key==="Enter"||M.key===" "||M.key==="ArrowDown")&&(M.preventDefault(),b(!0));return}if(M.key==="Escape"){M.preventDefault(),b(!1);return}M.key==="ArrowDown"?(M.preventDefault(),B(P=>{let T=P+1;for(;T<e.length&&e[T].disabled;)T++;return T<e.length?T:P})):M.key==="ArrowUp"?(M.preventDefault(),B(P=>{let T=P-1;for(;T>=0&&e[T].disabled;)T--;return T>=0?T:P})):(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),e[A]?$(e[A]):b(!1))}},[s,_,e,A,$,b]),U=_?n.jsx("div",{ref:x,id:g,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:v,onMouseLeave:E,onMouseDown:M=>M.preventDefault(),children:e.map((M,P)=>n.jsxs("button",{id:`${g}-option-${P}`,type:"button",role:"option","aria-selected":M.value===t,className:Be("dropdown__option body-2",M.value===t?"dropdown__option--active":"",P===A?"dropdown__option--active":"",M.disabled?"dropdown__option--disabled":""),onMouseDown:T=>T.preventDefault(),onClick:()=>$(M),onMouseEnter:()=>B(P),disabled:M.disabled,children:[n.jsx("span",{className:"dropdown__option-check",children:M.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"})})}),M.label]},M.value))}):null;return n.jsxs("div",{ref:C,className:Be("dropdown",`dropdown--s${i}`,_?"dropdown--open":"",l?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:L,children:[n.jsxs("button",{ref:k,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":_,"aria-controls":_?g:void 0,"aria-activedescendant":_&&A>=0?`${g}-option-${A}`:void 0,"aria-label":d,"aria-describedby":[d&&D?y:"",h??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:s,onClick:N,onBlur:M=>{_&&!x.current?.contains(M.relatedTarget)&&b(!1)},children:[n.jsx("span",{id:y,className:`dropdown__trigger-label body-2${D?"":" dropdown__trigger-label--placeholder"}`,children:D?D.label:m}),n.jsx("svg",{className:"dropdown__chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:n.jsx("polyline",{points:"4 6 8 10 12 6"})})]}),typeof document<"u"&&hn.createPortal(U,C.current?.closest(".ihabdevteam-core-scope")??document.body)]})}const Bv={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function ku(e){return e?Bv[e]??null:null}function Au(e){switch(ku(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Nu(e,t){const a=ku(e);return a?t(`device.type.${a}`,{defaultValue:e??""}):e??""}const ga=e=>e==null?"":String(e).trim();function Fo(e,t,a,r){const s=ga(e),l=ga(t),i=ga(a);if(r&&s&&l&&i){const c=`${s.padStart(4,"0")}-${l.padStart(2,"0")}-${i.padStart(2,"0")}`,d=new Date(c);if(!Number.isNaN(d.getTime())&&d.toISOString().slice(0,10)===c){const h=ql(c,r);if(h)return h}}const u=[s,l,i];for(;u.length>0&&u[u.length-1]==="";)u.pop();return u.join(".")}function kv(e,t,a){const r=ga(e);return r?`${r}-${ga(t).padStart(2,"0")}-${ga(a).padStart(2,"0")}`:""}function Eu(e){return typeof e=="string"?e:e.label}function Du({value:e,onChange:t,suggestions:a,openOnFocus:r=!1,filterSuggestions:s,onSelectSuggestion:l,autoActiveFirst:i=!1}){const u=o.useId(),[c,d]=o.useState(!1),[h,p]=o.useState(-1),m=o.useRef(null),g=o.useMemo(()=>{if(!a.length)return[];const N=e??"";return s===!1?a:N?typeof s=="function"?s(a,N):a.filter($=>Eu($).toLowerCase().includes(N.toLowerCase())):r?a:[]},[a,e,r,s]),[y,C]=o.useState(!1),f=o.useRef([]),_=y&&g.length===0?f.current:g;o.useEffect(()=>{_.length&&(f.current=_)},[_]);const b=o.useCallback(()=>C(!0),[]),w=o.useCallback(()=>C(!1),[]),v=i?0:-1;o.useEffect(()=>{c||p(v)},[c,v]),o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const k=h<_.length?h:v<_.length?v:-1,x=o.useCallback(N=>{l?l(N):t?.(Eu(N)),d(!1)},[t,l]),A=o.useCallback(()=>d(!0),[]),B=o.useCallback(()=>{d(!0),p(v)},[v]),E=o.useCallback(()=>{m.current=setTimeout(()=>d(!1),120)},[]),D=o.useCallback(N=>{N.nativeEvent.isComposing||N.keyCode===229||(N.key==="ArrowDown"?(N.preventDefault(),d(!0),p($=>Math.min(_.length-1,($<_.length?$:v)+1))):N.key==="ArrowUp"?(N.preventDefault(),p($=>Math.max(v,($<_.length?$:_.length)-1))):N.key==="Enter"?k>=0&&x(_[k]):N.key==="Escape"&&c&&(N.preventDefault(),d(!1)))},[_,k,c,x,v]);return{listId:u,open:c,activeIdx:k,filtered:_,handleFocus:A,handleBlur:E,handleInput:B,handleKeyDown:D,handleSelect:x,handleCompositionStart:b,handleCompositionEnd:w}}const Io=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Kn(e){const{value:t,defaultValue:a,name:r,inputRef:s,onChange:l,label:i,ariaLabel:u,ariaDescribedBy:c,required:d,placeholder:h,ghostText:p,ghostHint:m,type:g="text",disabled:y=!1,readOnly:C=!1,error:f,helperText:_,maxLength:b,size:w=40,variant:v="input",fullWidth:k=!1,newline:x=!1,multiline:A=!1,rows:B=3,leftIcon:E,rightIcon:D,clearable:N=!1,list:$,showCount:L=!0,className:U="",onFocus:M,onBlur:P,onKeyDown:T,onEnter:ee,inputMode:te,autoComplete:I,autoFocus:Y,suggestions:R,filterSuggestions:q,onSelectSuggestion:Z,autoActiveFirst:z,openOnFocus:j=!1}=e,F=C||y?void 0:R,{t:O}=_e.useTranslation(),G=o.useId();!i&&!u&&At(`TextField:unnamed:${G}`,"[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 ie=`tf-${G}`,K=`tf-helper-${G}`,pe=o.useRef(null),X=Du({value:t??"",onChange:l,suggestions:F??[],openOnFocus:j,filterSuggestions:q,onSelectSuggestion:Z,autoActiveFirst:z}),H=!!F&&X.open&&X.filtered.length>0,ne=o.useRef(null),[V,W]=o.useState(null),oe=o.useCallback(()=>{const Se=ne.current;if(!Se||typeof window>"u")return;const Ge=Se.getBoundingClientRect(),we=230,qe=window.innerHeight-Ge.bottom<we+8&&Ge.top>we+8;W({position:"fixed",left:Ge.left,width:Ge.width,...qe?{bottom:window.innerHeight-Ge.top+8}:{top:Ge.bottom+8},zIndex:Wa(Se)})},[]);Io(()=>{if(!H)return;oe();let Se=null;const Ge=()=>{if(typeof requestAnimationFrame>"u"){oe();return}Se===null&&(Se=requestAnimationFrame(()=>{Se=null,oe()}))},we=qe=>{const Ye=qe.target;Ye&&Ye.nodeType===1&&Ye.closest?.(".text-field__suggestions")||Ge()};return window.addEventListener("scroll",we,!0),window.addEventListener("resize",Ge),()=>{Se!==null&&cancelAnimationFrame(Se),window.removeEventListener("scroll",we,!0),window.removeEventListener("resize",Ge)}},[H,oe]);const xe=o.useCallback(Se=>{pe.current=Se,typeof s=="function"?s(Se):s&&(s.current=Se)},[s]),be=p?`${p}${m??O("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:h,me=t!==void 0,ke=me&&g==="password",[Le,Me]=o.useState((a??"").length),le=me?(t??"").length:Le,ve=o.useRef(t);Io(()=>{ve.current=t}),o.useEffect(()=>{const Se=pe.current;if(!ke||!Se)return;const Ge=t??"";Se.value!==Ge&&(Se.value=Ge)},[ke,t]),o.useEffect(()=>{if(!x||!pe.current)return;const Se=pe.current;Se.style.height="",Se.scrollHeight>Se.clientHeight&&(Se.style.height=`${Se.scrollHeight}px`)},[t,Le,x]);const $e=b!=null&&le>b,Ae=w===32?16:20,Ie=Be("text-field",`text-field--s${w}`,v==="display"?"text-field--display":"",k?"text-field--full-width":"",y?"text-field--disabled":"",C?"text-field--readonly":"",f?"text-field--error":"",E?"text-field--has-left-icon":"",D||N?"text-field--has-right-icon":"",U),ze={id:ie,...ke?{}:me?{value:t}:{defaultValue:a},ref:xe,placeholder:be,name:r,disabled:y,readOnly:C,autoFocus:Y,maxLength:b,list:$,inputMode:te,autoComplete:I,"aria-label":!i&&u?u:void 0,"aria-required":d,"aria-invalid":!!f,"aria-describedby":[_||f?K:null,c].filter(Boolean).join(" ")||void 0,role:F?"combobox":void 0,"aria-autocomplete":F?"list":void 0,"aria-haspopup":F?"listbox":void 0,"aria-expanded":F?H:void 0,"aria-controls":H?X.listId:void 0,"aria-activedescendant":H&&X.activeIdx>=0?`${X.listId}-option-${X.activeIdx}`:void 0,onChange:Se=>{const Ge=Se.target;me||Me(Ge.value.length),l?.(Ge.value),F&&X.handleInput(),ke&&queueMicrotask(()=>{const we=ve.current??"";Ge.value!==we&&(Ge.value=we)})},onCompositionStart:F?X.handleCompositionStart:void 0,onCompositionEnd:F?X.handleCompositionEnd:void 0,onFocus:(Se=>{M?.(Se),F&&X.handleFocus()}),onBlur:(Se=>{P?.(Se),F&&X.handleBlur()}),onKeyDown:(Se=>{const Ge=(Se.key==="Tab"&&!Se.shiftKey||Se.key===" ")&&!Se.nativeEvent.isComposing;if(p&&Ge&&!C&&!y&&!(Se.currentTarget.value??"").trim()){Se.preventDefault();const we=Se.currentTarget;me||(we.value=p,Me(p.length)),l?.(p);return}F&&Se.key==="Enter"&&!Se.nativeEvent.isComposing&&X.activeIdx>=0?Se.preventDefault():ee&&Se.key==="Enter"&&!Se.nativeEvent.isComposing&&(Se.preventDefault(),ee()),T?.(Se),F&&X.handleKeyDown(Se)})},dt=N&&!y&&!C&&le>0,st=()=>x?n.jsx("textarea",{...ze,className:"text-field__input text-field__input--auto body-2",rows:1}):A?n.jsx("textarea",{...ze,className:"text-field__input text-field__input--textarea body-2",rows:B}):n.jsx("input",{...ze,type:g,className:"text-field__input body-2"}),et=v==="display"&&!x&&!A&&!!be,gt=()=>n.jsxs(n.Fragment,{children:[st(),et&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:be})]});return n.jsxs("div",{ref:ne,className:Ie,children:[i&&n.jsxs("label",{htmlFor:ie,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(ot,{icon:E,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ae})}),gt(),b!=null&&L&&n.jsxs("span",{className:`text-field__count caption-2${$e?" text-field__count--over":""}`,children:[le,"/",b]}),dt&&n.jsx(fe,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:O("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:Se=>{Se.preventDefault()},onClick:()=>{!me&&pe.current&&(pe.current.value="",Me(0)),l?.("")},tabIndex:-1}),D&&!dt&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(ot,{icon:D,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ae})})]}),!!F&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:X.open&&(t??"").length>0&&X.filtered.length===0?O("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),H&&(typeof document>"u"?null:hn.createPortal(n.jsx("ul",{id:X.listId,className:"text-field__suggestions",role:"listbox",style:V??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:X.filtered.map((Se,Ge)=>n.jsx("li",{id:`${X.listId}-option-${Ge}`,role:"option","aria-selected":Ge===X.activeIdx,className:`text-field__suggestion body-2${Ge===X.activeIdx?" is-active":""}`,onMouseDown:we=>we.preventDefault(),onClick:()=>{X.handleSelect(Se),pe.current?.focus()},children:typeof Se=="string"?Se:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:Se.label}),Se.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:Se.hint})]})},typeof Se=="string"?`${Se}-${Ge}`:Se.id))}),document.body)),(_||f)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:K,className:"text-field__helper caption-1",role:f?"alert":void 0,children:f||_})})]})}const Su=()=>{};function un(e){const t=o.useId();if(!("variant"in e)){const{label:b,sub:w,onClick:v,children:k,align:x="horizontal",icon:A,useFullWidth:B=!1}=e,E=D=>{v&&D.target===D.currentTarget&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),v())};return n.jsxs("div",{className:Be("panel-row",x==="vertical"?"panel-row--vertical":"",B?"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:[A!=null&&n.jsx("div",{className:"panel-row__icon",children:A}),b!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsx("div",{className:"panel-row__label body-3",children:b}),w&&n.jsx("div",{className:"panel-row__sub caption-1",children:w})]}),n.jsx("div",{className:"panel-row__right",children:k})]})}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(Ca,{size:28})});if(e.variant==="custom"&&!e.label)return n.jsx("div",{className:"panel-row panel-row--block",children:e.children});const{variant:a,label:r,sub:s,onClick:l,required:i,error:u,align:c="horizontal",useFullWidth:d=!1,icon:h}=e,p=a==="button"?void 0:l;let m=null;const g=a==="toggle"?`panel-toggle-${t}`:void 0,y=u?`panel-error-${t}`:void 0,C=`panel-helper-${t}`;if(a==="toggle"){const b=e;m=n.jsx(Bu,{checked:b.checked,onChange:b.onChange,id:g})}else if(a==="segmented"){const b=e;m=n.jsx(vn,{options:b.options,value:b.value,onChange:b.onChange,size:b.size??Ft,ariaLabel:r})}else if(a==="dropdown"){const b=e,w=b.dropdowns?.length?n.jsx("div",{className:`panel-row__dropdown-group${d?" panel-row__dropdown-group--full":""}`,children:b.dropdowns.map((v,k)=>n.jsx("div",{className:d?"panel-row__dropdown-item--full":void 0,children:n.jsx(_n,{options:v.options,value:v.value,onChange:v.onChange,size:Ft,placeholder:v.placeholder,block:d,error:!!u,ariaDescribedBy:y,ariaLabel:v.ariaLabel??([r,v.placeholder].filter(Boolean).join(" ")||void 0)})},k))}):n.jsx(_n,{options:b.options??[],value:b.value??"",onChange:b.onChange??Su,size:Ft,block:d,error:!!u,ariaLabel:r,ariaDescribedBy:y});m=u?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[w,n.jsx("span",{id:y,className:"caption-1 panel-row__error",role:"alert",children:u})]}):w}else if(a==="button"){const b=e;b.buttons?.length?m=n.jsx("div",{className:"panel-row__button-group",children:b.buttons.map((w,v)=>n.jsx(fe,{htmlType:"button",size:w.btnSize??Ft,variant:w.btnVariant??"default",disabled:w.disabled,onClick:w.onClick,children:w.label},v))}):m=n.jsx(fe,{htmlType:"button",size:b.btnSize??Ft,variant:b.btnVariant??"default",disabled:b.disabled,onClick:b.onClick,children:b.buttonLabel})}else if(a==="text"){const b=e;m=n.jsx("span",{className:`panel-row__text body-2${d?" panel-row__text--full":""}`,style:b.valueColor?{color:b.valueColor}:void 0,children:b.value})}else if(a==="input"){const b=e;m=n.jsxs("div",{className:`panel-row__input-wrap${d?" panel-row__input-wrap--full":""}`,children:[n.jsx(Kn,{size:Ft,value:b.value,onChange:b.onChange??Su,onKeyDown:b.onKeyDown,onEnter:b.onEnter,placeholder:b.placeholder,ghostText:b.ghostText,inputMode:b.inputMode,readOnly:b.readOnly,disabled:b.disabled,type:b.type,autoComplete:b.autoComplete,maxLength:b.maxLength,showCount:b.showCount,multiline:b.multiline,rows:b.rows,fullWidth:d,error:u,ariaLabel:r,required:i,ariaDescribedBy:b.helperText?C:void 0}),b.helperText&&n.jsx("div",{id:C,className:"panel-row__helper caption-1",children:b.helperText})]})}else a==="custom"&&(m=e.children);u&&a!=="input"&&a!=="dropdown"&&(m=n.jsxs("div",{className:`panel-row__dropdown-error-wrap${d?" panel-row__dropdown-error-wrap--full":""}`,children:[m,n.jsx("span",{id:y,className:"caption-1 panel-row__error",role:"alert",children:u})]}));const f=a==="input"||a==="dropdown"||(a==="text"||a==="custom")&&d,_=b=>{p&&b.target===b.currentTarget&&(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),p())};return n.jsxs("div",{className:Be("panel-row",c==="vertical"?"panel-row--vertical":"",f?"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:[h!=null&&n.jsx("div",{className:"panel-row__icon",children:h}),n.jsxs("div",{className:"panel-row__left",children:[g?n.jsxs("label",{htmlFor:g,className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}):n.jsxs("div",{className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}),s&&n.jsx("div",{className:"panel-row__sub caption-1",children:s})]}),n.jsx("div",{className:"panel-row__right",children:m})]})}function ju(e){const t=e.productName||e.brand,a=[e.brand,e.fitType].filter(r=>!!r&&r!==t);return[...new Set(a)].join(" \xB7 ")}function Av({devices:e,onRelease:t,emptyLabel:a}){const{t:r,i18n:s}=_e.useTranslation();return n.jsx("div",{className:"panel-row panel-row--device",children:["left","right"].map(l=>{const i=e[l],u=l==="left"?r("device.direction.left","\uC88C"):r("device.direction.right","\uC6B0");return n.jsxs("div",{className:"panel-row__device-column",children:[n.jsxs("div",{className:"panel-row__device-head",children:[n.jsx("span",{className:"panel-row__device-side body-2b",children:u}),i&&t&&n.jsx(fe,{htmlType:"button",size:32,type:"dot",icon:"x",ariaLabel:`${u} ${r("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C")}`,showTooltipInfo:r("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"),onClick:()=>t(l)})]}),i?n.jsxs("div",{className:"panel-row__device-info",children:[n.jsxs("span",{className:"panel-row__device-kind",children:[i.device&&n.jsx(ln,{size:"small",variant:Au(i.device),fill:"soft",label:Nu(i.device,r)}),ju(i)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:ju(i)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),Fo(i.wornYear,i.wornMonth,i.wornDay,s.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:r("customers.device.wornSince",{date:Fo(i.wornYear,i.wornMonth,i.wornDay,s.language)})})]}):n.jsx("span",{className:"panel-row__device-empty body-3",children:a??r("customers.device.notRegistered","\uBBF8\uB4F1\uB85D")})]},l)})})}function Qa({title:e,titleLevel:t=2,icon:a,disc:r,actions:s,size:l="medium",minHeight:i,maxWidth:u,className:c,scrollable:d,scrollbarGutter:h="auto",compactRows:p=!1,useBorder:m=!0,useBg:g=!0,useRowBorder:y=!0,labelWidth:C,form:f=!1,loading:_,empty:b,children:w}){const v=Be("panel",`panel--${l}`,f?"panel--form":"",i!==void 0?"panel--fill":"",m?"":"panel--no-border",g?"":"panel--no-bg",y?"":"panel--no-row-border",p?"panel--compact-rows":"",c),k={};i!==void 0&&(k.minHeight=i),u!==void 0&&(k.maxWidth=typeof u=="number"?`${u}px`:u),C!==void 0&&(k["--panel-label-width"]=typeof C=="number"?`${C}px`:C);const x=t?`h${t}`:"div";return n.jsxs("div",{className:v,style:Object.keys(k).length?k:void 0,children:[(!!e||r!=null)&&n.jsxs("div",{className:Be("panel__header",r!=null?"panel__header--with-disc":""),children:[a&&n.jsx(ot,{icon:a,label:typeof e=="string"?e:void 0,className:"panel__icon"}),n.jsxs("div",{className:"panel__title-group",children:[!!e&&n.jsx(x,{className:`panel__title ${r!=null?"body-3b":"h5b"}`,children:e}),r!=null&&n.jsx("p",{className:"panel__disc caption-1",children:r})]}),s&&n.jsx("div",{className:"panel__actions",children:s})]}),_?n.jsx(un,{variant:"loading"}):b!=null&&o.Children.toArray(w).length===0?n.jsx(un,{variant:"empty",children:b}):d?n.jsx("div",{className:Be("panel__body--scroll",h==="stable"&&"panel__body--gutter-stable"),children:w}):w]})}function Nv({cols:e=2,layout:t="grid",gap:a=1,collapseAt:r,className:s,style:l,children:i}){const u=o.useRef(null),[c,d]=o.useState();o.useEffect(()=>{const p=u.current;if(r===void 0||!p||(d(p.clientWidth),typeof ResizeObserver>"u"))return;const m=new ResizeObserver(([g])=>d(g.contentRect.width));return m.observe(p),()=>m.disconnect()},[r]);const h=r!==void 0&&c!==void 0&&c<=r;return n.jsx("div",{ref:u,className:Be("panel-grid",t==="columns"&&"panel-grid--columns",s),style:{"--panel-grid-cols":h?1:e,"--panel-grid-gap":typeof a=="number"?`${a}px`:a,...l},children:i})}function Oo({checked:e=!1,onChange:t,disabled:a,indeterminate:r,label:s,size:l="medium",className:i,title:u,ariaLabel:c}){const d=o.useRef(null),h=o.useId(),p=o.useRef(!!r);return p.current=!!r,o.useEffect(()=>{d.current&&(d.current.indeterminate=!!r)}),n.jsxs("label",{className:Be("checkbox",l==="small"&&"checkbox--small",l==="large"&&"checkbox--large",a&&"checkbox--disabled",i),htmlFor:h,title:u,children:[n.jsx("input",{ref:d,id:h,type:"checkbox",className:"checkbox__input",checked:e,onChange:m=>{t?.(m.target.checked),d.current&&(d.current.indeterminate=p.current)},disabled:a,"aria-label":!s&&c?c:void 0}),n.jsx("span",{className:"checkbox__box"}),s&&n.jsx("span",{className:"checkbox__label body-3",children:s})]})}function Tu(e,t){const a=()=>{if(e){const[C,f]=e.split("-");return{y:+C,m:+f-1}}const[g,y]=cr(t).split("-");return{y:+g,m:+y-1}},[r,s]=o.useState(()=>a().y),[l,i]=o.useState(()=>a().m),u=o.useRef(e);o.useEffect(()=>{if(e===u.current)return;u.current=e;const g=a();s(g.y),i(g.m)},[e]);const c=o.useRef({y:r,m:l});o.useEffect(()=>{c.current={y:r,m:l}},[r,l]);const d=o.useCallback(g=>{const y=c.current.y*12+c.current.m+g,C=Math.floor(y/12),f=y-C*12;c.current={y:C,m:f},s(C),i(f)},[]),h=o.useCallback(()=>d(-1),[d]),p=o.useCallback(()=>d(1),[d]),m=o.useCallback((g,y)=>{c.current={y:g,m:y},s(g),i(y)},[]);return{viewY:r,viewM:l,prevMonth:h,nextMonth:p,setViewYM:m}}function xr(e,t){return new Date(e,t+1,0).getDate()}function Ev(e,t){return new Date(e,t,1).getDay()}function er(e,t,a){return`${e}-${String(t+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function Dv(e){if(!e)return"";const[t,a,r]=e.split("-");return`${t}. ${a}. ${r}.`}function Sv(e){const t=e.replace(/\D/g,"");if(t.length!==8)return null;const a=+t.slice(0,4),r=+t.slice(4,6),s=+t.slice(6,8);if(r<1||r>12||s<1||s>31)return null;const l=new Date(a,r-1,s);return l.getFullYear()!==a||l.getMonth()!==r-1||l.getDate()!==s?null:er(a,r-1,s)}const jv=1900;function Tv(e,t,a,r,s){const l=r?+r.split("-")[0]:Math.min(jv,e),i=s?+s.split("-")[0]:Math.max(t+10,e),u=[];for(let c=l;c<=i;c++)u.push({value:String(c),label:a(c)});return u}function Mu(e,t,a,r){const s=[];for(let l=1;l<=12;l++){const i=`${e}-${String(l).padStart(2,"0")}`;a&&i<a.slice(0,7)||r&&i>r.slice(0,7)||s.push({value:String(l),label:t(e,l)})}return s}function Lu({value:e,onChange:t,size:a=Ft,min:r,max:s,disabled:l,placeholder:i,className:u,today:c}){const{t:d,i18n:h}=_e.useTranslation(),p=i??d("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),m=o.useMemo(()=>d("calendar.dow",{returnObjects:!0}),[d]),g=cr(c),{viewY:y,viewM:C,prevMonth:f,nextMonth:_,setViewYM:b}=Tu(e,c),w=o.useId(),v=o.useCallback((H,ne)=>{const V=window.innerHeight,W=window.innerWidth,oe=typeof document<"u"?document.getElementById(w):null,xe=Math.max(oe?.offsetHeight||0,oe?.scrollHeight||0)||300,be=Math.max(H.width,oe?.offsetWidth||0,260),me=V-H.bottom,ke=H.top,Le=me<xe&&ke>me,Me=8,le=(ve,$e)=>Math.min(Math.max(Me,ve),Math.max(Me,$e));return{position:"fixed",left:le(H.left,W-be-Me),width:H.width,minWidth:260,...Le?{top:"auto",bottom:le(V-H.top+6,V-xe-Me)}:{bottom:"auto",top:le(H.bottom+6,V-xe-Me)},zIndex:Wa(ne)}},[w]),{open:k,setOpen:x,toggle:A,style:B,triggerRef:E,menuRef:D}=Ha({computeStyle:v,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!k)return;const H=D.current;return(H?.querySelector(".date-picker__day--selected:not(:disabled)")??H?.querySelector(".date-picker__day--today:not(:disabled)")??H?.querySelector(".date-picker__day:not(:disabled)")??H?.querySelector(En)??H)?.focus?.(),()=>{const ne=document.activeElement;(!ne||ne===document.body)&&E.current?.focus?.()}},[k,D,E]);const[N,$]=o.useState(1),L=o.useRef(null),U=o.useRef(null);o.useEffect(()=>{if(!k)return;const H=e&&e.slice(0,7)===`${y}-${String(C+1).padStart(2,"0")}`?+e.slice(8):g.slice(0,7)===`${y}-${String(C+1).padStart(2,"0")}`?+g.slice(8):1;$(H)},[k]),o.useEffect(()=>{if(U.current==null)return;const H=U.current;U.current=null,L.current?.querySelector(`[data-day="${H}"]`)?.focus()}),o.useEffect(()=>{$(H=>Math.min(H,xr(y,C)))},[y,C]);const M=o.useCallback(H=>{let ne=er(H.getFullYear(),H.getMonth(),H.getDate());r&&ne<r&&(ne=r),s&&ne>s&&(ne=s);const[V,W,oe]=ne.split("-").map(Number);(V!==y||W-1!==C)&&b(V,W-1),$(oe),U.current=oe},[r,s,y,C,b]),P=o.useCallback(H=>{const ne=new Date(y,C,N),V=oe=>{ne.setDate(ne.getDate()+oe),M(ne)},W=oe=>{const xe=ne.getFullYear()*12+ne.getMonth()+oe,be=Math.floor(xe/12),me=xe-be*12;M(new Date(be,me,Math.min(ne.getDate(),xr(be,me))))};switch(H.key){case"ArrowLeft":V(-1);break;case"ArrowRight":V(1);break;case"ArrowUp":V(-7);break;case"ArrowDown":V(7);break;case"Home":V(-ne.getDay());break;case"End":V(6-ne.getDay());break;case"PageUp":H.shiftKey?W(-12):W(-1);break;case"PageDown":H.shiftKey?W(12):W(1);break;default:return}H.preventDefault()},[y,C,N,M]),T=o.useCallback(H=>{l||(t(er(y,C,H)),x(!1))},[y,C,t,x,l]);o.useEffect(()=>{l&&x(!1)},[l,x]);const ee=H=>{const ne=er(y,C,H);return!!(r&&ne<r||s&&ne>s)},te=(()=>{const H=xr(y,C);if(N>=1&&N<=H&&!ee(N))return N;for(let ne=1;ne<=H;ne++)if(!ee(ne))return ne;return-1})(),I=[];for(let H=0;H<Ev(y,C);H++)I.push(null);for(let H=1;H<=xr(y,C);H++)I.push(H);const Y=a===64?20:a===40?16:18,R=Ul(h.language),q=H=>new Intl.DateTimeFormat(R,{year:"numeric"}).format(new Date(H,0,1)),Z=(H,ne)=>new Intl.DateTimeFormat(R,{month:"long"}).format(new Date(H,ne-1,1)),z=Tv(y,+g.slice(0,4),q,r,s),j=Mu(y,Z,r,s),F=H=>{const ne=Mu(H,Z,r,s);if(ne.length===0)return;const V=ne.some(W=>+W.value===C+1);b(H,V?C:+ne[0].value-1)},[O,G]=o.useState(null);o.useEffect(()=>{G(null)},[e]);const ie=o.useCallback(H=>{G(H);const ne=Sv(H);if(!ne||r&&ne<r||s&&ne>s)return;t(ne);const[V,W]=ne.split("-");b(+V,+W-1)},[r,s,t,b]),K=o.useCallback(()=>{G(null)},[]),pe=o.useCallback(H=>{H.key==="Enter"?(H.preventDefault(),K(),x(!1)):H.key==="Escape"?(K(),x(!1)):H.key==="ArrowDown"&&!k&&(H.preventDefault(),x(!0))},[K,x,k]),X=k?hn.createPortal(n.jsxs("div",{ref:D,id:w,className:"date-picker__dropdown",style:B,"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:f,"aria-label":d("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(Hs,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(_n,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:z,value:String(y),onChange:H=>F(+H),size:40}),n.jsx(_n,{className:"date-picker__nav-dropdown",ariaLabel:d("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:j,value:String(C+1),onChange:H=>b(y,+H-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(Vs,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:L,onKeyDown:P,children:[m.map(H=>n.jsx("div",{className:"date-picker__dow caption-1",children:H},H)),I.map((H,ne)=>{if(H===null)return n.jsx("div",{},`e${ne}`);const V=er(y,C,H),W=V===e,oe=V===g,xe=ee(H),be=ne%7;return n.jsx("button",{type:"button",disabled:xe,"data-day":H,tabIndex:H===te?0:-1,"aria-current":oe?"date":void 0,onClick:()=>!xe&&T(H),className:Be("date-picker__day caption-1",W&&"date-picker__day--selected",oe&&!W&&"date-picker__day--today",xe&&"date-picker__day--disabled",be===0&&"date-picker__day--sun",be===6&&"date-picker__day--sat"),children:H},H)})]})]}),document.body):null;return n.jsxs("div",{className:Be("date-picker",`date-picker--s${a}`,k&&"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:O??Dv(e),placeholder:p,onChange:H=>ie(H.target.value),onClick:()=>!l&&!k&&A(),onKeyDown:pe,onBlur:K,disabled:l,"aria-haspopup":"dialog","aria-expanded":k,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!l&&A(),disabled:l,tabIndex:-1,"aria-label":p,"aria-haspopup":"dialog","aria-expanded":k,children:n.jsx(Qs,{size:Y,className:"date-picker__icon",strokeWidth:1.5})})]}),X]})}const $u=["personal","sensitive","marketing"];function Mv({takenKinds:e,busy:t,today:a,onClose:r,onSubmit:s,className:l}){const{t:i}=_e.useTranslation(),[u]=o.useState(()=>cr(a)),[c,d]=o.useState([]),[h,p]=o.useState("paper"),[m,g]=o.useState("self"),[y,C]=o.useState(u),[f,_]=o.useState(""),b=$u.filter(v=>!e.includes(v)),w={personal:i("customers.consent.kind.personal","\uC77C\uBC18 \uAC1C\uC778\uC815\uBCF4"),sensitive:i("customers.consent.kind.sensitive","\uBBFC\uAC10\uC815\uBCF4(\uCCAD\uB825\xB7\uC9C4\uB2E8)"),marketing:i("customers.consent.kind.marketing","\uAD11\uACE0\uC131 \uC815\uBCF4 \uC218\uC2E0")};return n.jsx(Pn,{title:i("customers.consent.record","\uB3D9\uC758 \uBC1B\uAE30"),closeDisabled:t,onClose:r,className:l,footer:()=>n.jsx(fe,{htmlType:"button",size:48,variant:"main",disabled:t||c.length===0,label:i("customers.consent.submit","\uC800\uC7A5\uD558\uAE30"),onClick:()=>s({kinds:c,method:h,source:m,consentedAt:y||null,note:f.trim()||null})}),children:n.jsxs(Qa,{useBorder:!1,useRowBorder:!1,labelWidth:96,children:[n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.kinds","\uBC1B\uC740 \uAC08\uB798"),children:n.jsxs("div",{className:"consent-record-popup__kinds",children:[b.map(v=>n.jsx(Oo,{checked:c.includes(v),disabled:t,label:w[v],onChange:k=>d(x=>k?[...x,v]:x.filter(A=>A!==v))},v)),b.length===0&&n.jsx("p",{className:"body-3 consent-record-popup__none",children:i("customers.consent.allTaken","\uC138 \uAC08\uB798\uB97C \uC774\uBBF8 \uB2E4 \uBC1B\uC558\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uBC1B\uC73C\uB824\uBA74 \uBA3C\uC800 \uCCA0\uD68C\uD558\uC138\uC694.")})]})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),children:n.jsx(vn,{size:40,fullWidth:!0,ariaLabel:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),options:[{key:"paper",label:i("customers.consent.method.paper","\uC11C\uBA74")},{key:"verbal",label:i("customers.consent.method.verbal","\uAD6C\uB450")},{key:"electronic",label:i("customers.consent.method.electronic","\uC804\uC790")}],value:h,onChange:v=>p(String(v))})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),children:n.jsx(vn,{size:40,fullWidth:!0,ariaLabel:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),options:[{key:"self",label:i("customers.consent.source.self","\uBCF8\uC778")},{key:"guardian",label:i("customers.consent.source.guardian","\uBCF4\uD638\uC790")},{key:"referral",label:i("customers.consent.source.referral","\uC758\uB8B0\uAE30\uAD00")}],value:m,onChange:v=>g(String(v))})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.day","\uBC1B\uC740 \uB0A0"),children:n.jsx(Lu,{size:48,value:y,max:u,today:a,onChange:v=>C(v??"")})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.note","\uBA54\uBAA8"),children:n.jsx(Kn,{size:48,fullWidth:!0,value:f,onChange:_,disabled:t,ariaLabel:i("customers.consent.note","\uBA54\uBAA8"),placeholder:i("customers.consent.notePlaceholder","\uC758\uB8B0\uAE30\uAD00 \uC774\uB984 \uB4F1 \u2014 \uBBFC\uAC10\uD55C \uB0B4\uC6A9\uC740 \uC801\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4")})})]})})}function zo({page:e,totalPages:t,onChange:a,prevLabel:r,nextLabel:s,className:l=""}){const{t:i}=_e.useTranslation(),u=r??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=s??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),d=Math.max(1,t),h=()=>a(Math.max(1,Math.min(d,e-1))),p=()=>a(Math.min(d,e+1));return n.jsxs("div",{className:Be("pagination",l),children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-left",ariaLabel:u,disabled:e<=1,onClick:h}),n.jsxs("span",{className:"pagination__info body-3","aria-live":"polite","aria-atomic":"true",children:[Math.min(Math.max(1,e),d)," / ",d]}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=t,onClick:p})]})}function Wo({count:e,search:t,segment:a,filters:r,pageSize:s,pagination:l,actions:i,className:u}){const{t:c}=_e.useTranslation(),d=e!=null&&n.jsxs("p",{className:"toolbar__count body-1",role:"status","aria-atomic":"true",children:[e.prefix??c("common.totalPrefix","\uCD1D "),n.jsx("span",{className:"toolbar__count-highlight",children:e.value}),e.unit,e.suffix]}),h=!!(t||r?.length||s||l||i);return n.jsxs("div",{className:Be("toolbar",u),children:[n.jsxs("div",{className:"toolbar__row",children:[d,a&&(Array.isArray(a)?a:[a]).map((p,m)=>n.jsx(vn,{size:Ft,...p},p.ariaLabel??m))]}),h&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(Kn,{className:"toolbar__search",size:Ft,value:t.value,onChange:t.onChange,placeholder:t.placeholder??c("common.search","\uAC80\uC0C9"),ariaLabel:t.placeholder??c("common.search","\uAC80\uC0C9"),autoFocus:t.autoFocus,clearable:!0}),r?.map((p,m)=>n.jsx(_n,{size:Ft,options:p.options,value:p.value,onChange:p.onChange,ariaLabel:p.ariaLabel},m)),(s||l)&&n.jsxs("div",{className:"toolbar__pager",children:[s&&n.jsx(_n,{size:Ft,options:s.options,value:s.value,onChange:s.onChange,ariaLabel:s.ariaLabel??c("common.pageSizeSelect","\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218")}),l&&n.jsx(zo,{page:l.page,totalPages:l.total,onChange:l.onChange,prevLabel:l.prevLabel,nextLabel:l.nextLabel})]}),i]})})]})}function Ru(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(Ru).join(""):""}function Lv(e){let t=e.replace(/\r\n/g,`
825
825
  `).replace(/\r/g,`
826
826
  `);t=t.replace(/^\n+/,"").replace(/\n+$/,"");const a=t.split(`
827
827
  `).map(l=>l.replace(/\t/g," ")),r=a.filter(l=>l.trim().length>0),s=r.length>0?Math.min(...r.map(l=>l.match(/^ */)?.[0].length??0)):0;return a.map(l=>l.slice(s)).join(`
828
- `)}const $v=new Set(["pnpm","npm","yarn","node","git","curl","docker","cat","ls","cd","rm","mv","cp","echo","export"]),Rv=/^(?: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 Pv(e,t){let a=e;const r=[],s=/^(?:sh|bash|zsh|shell|console)$/.test(t.toLowerCase()),l=(i,u)=>r.push({type:i,content:u});for(;a.length>0;){const i=a.match(/^\s+/);if(i){l("whitespace",i[0]),a=a.slice(i[0].length);continue}if(!s&&a.startsWith("//")){const _=a.indexOf(`
829
- `),m=_===-1?a:a.slice(0,_);l("comment",m),a=a.slice(m.length);continue}if(s&&a.startsWith("#")){const _=a.indexOf(`
830
- `),m=_===-1?a:a.slice(0,_);l("comment",m),a=a.slice(m.length);continue}const u=a.match(/^\/\*[\s\S]*?\*\//);if(u){l("comment",u[0]),a=a.slice(u[0].length);continue}const c=a.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(c){l("string",c[0]),a=a.slice(c[0].length);continue}const d=a.match(/^\d+(?:\.\d+)?/);if(d){l("number",d[0]),a=a.slice(d[0].length);continue}const h=a.match(Rv);if(h){l("keyword",h[0]),a=a.slice(h[0].length);continue}const p=a.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(p){const _=p[0];l(s&&$v.has(_)?"command":"identifier",_),a=a.slice(_.length);continue}const C=a.match(/^[=+\-*/%<>!&|^~?:]+/);if(C){l("operator",C[0]),a=a.slice(C[0].length);continue}const g=a.match(/^[()[\]{};.,]/);if(g){l("punctuation",g[0]),a=a.slice(1);continue}l("other",a[0]),a=a.slice(1)}return r}function Iv({children:e,language:t="bash",title:a="",showCopy:r=!0,size:s="default",className:l=""}){const{t:i}=xe.useTranslation(),[u,c]=o.useState(!1),d=Lv(Ru(e)),h=o.useRef(null);o.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const p=async()=>{try{if(!await Hf(d))return;c(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>c(!1),2e3)}catch{}},C=Pv(d,t),g=s==="small"?"caption-1":"body-3";return n.jsxs("div",{className:ke("code-box",s==="small"?"code-box--small":"",l),children:[(a||r)&&n.jsxs("div",{className:"code-box__header",role:"toolbar","aria-label":i("common.codeBlock","\uCF54\uB4DC \uBE14\uB85D"),children:[n.jsx("div",{className:"code-box__title caption-1",children:a}),r&&n.jsx(Ce,{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((_,m)=>n.jsx("span",{className:`code-token ${_.type} ${g}`,children:_.content},m))})})]})}function Fv({count:e,actions:t,onClear:a,clearLabel:r,visible:s,content:l,max:i}){const{t:u}=xe.useTranslation(),c=s!==void 0?s:e>0,d=r??u("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),h=o.useRef(null),p=o.useRef(null),C=o.useRef(null),g=o.useRef(c);o.useLayoutEffect(()=>{const b=p.current,w=g.current;if(g.current=c,c&&!w){const y=typeof document<"u"?document.activeElement:null;C.current=y&&y!==document.body&&!b?.contains(y)?y:null}else!c&&w&&b&&b.contains(document.activeElement)&&mr(b,C.current)},[c]);const[_,m]=o.useState(!1),f=o.useRef(!1),v=o.useRef(null);return o.useEffect(()=>{const b=h.current;if(!b)return;const w=D=>{f.current=D,m(D)},y=()=>{const D=b.firstElementChild??b,E=Array.from(D.children);if(E.length<2){w(!1);return}const k=E[0].offsetTop,R=E.some(M=>M.offsetTop!==k);if(!f.current){v.current=b.clientWidth,R&&w(!0);return}if(R)return;const $=E[0],G=E[E.length-1],T=G.offsetLeft+G.offsetWidth-$.offsetLeft,P=v.current;(P==null||T<=P)&&w(!1)};if(y(),typeof ResizeObserver>"u")return;const B=new ResizeObserver(y);B.observe(b);const x=b.parentElement;let N=x?.clientWidth??0;const A=new ResizeObserver(()=>{const D=x?.clientWidth??0;D!==N&&(N=D,v.current=null,y())});return x&&A.observe(x),()=>{B.disconnect(),A.disconnect()}},[l,e]),n.jsxs("div",{ref:p,className:`bulk-bar ${c?"bulk-bar--visible":""}`,inert:!c||void 0,"aria-hidden":c?void 0:!0,children:[n.jsx("span",{ref:h,className:"bulk-bar__count body-2",role:"status",children:l??n.jsx("b",{children:u("common.selectedCount",{count:e})})}),i!==void 0&&n.jsx(un,{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${_?" bulk-bar__actions--stacked":""}`,children:[n.jsx(Ce,{htmlType:"button",size:40,label:d,onClick:a}),t.map((b,w)=>n.jsx(Ce,{htmlType:"button",size:40,variant:b.variant??"default",icon:b.icon,label:b.label,onClick:b.onClick},w))]})]})}const Ov=[{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 zv(e){const{onClose:t,className:a}=e;return n.jsx("div",{className:ke("item-actions",a),children:Ov.map(({key:r,icon:s,closeFirst:l})=>{const i=e[r];if(!i)return null;const u=r==="publish"?i.published?i.unpublish:i.publish:i;return n.jsx(Ce,{htmlType:"button",size:40,type:"dot",icon:s,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{l&&t(),u.onClick()}},r)})})}function Wv({items:e,className:t,ariaLabel:a="\uC54C\uB9BC \uAE00",titleLevel:r=4,targetBytes:s}){const l=r?`h${r}`:"div";return n.jsx("div",{className:`notify-text-preview${t?` ${t}`:""}`,role:"group","aria-label":a,children:e.map(i=>{const u=s===void 0?Rl(i.sms):Rl(i.sms,s),c=u.type==="LMS";return n.jsxs("section",{className:"notify-text-preview__item",children:[n.jsxs("header",{className:"notify-text-preview__head",children:[n.jsx(l,{className:"notify-text-preview__name h5b",children:i.name}),i.meta&&Object.keys(i.meta).length>0?n.jsx("dl",{className:"notify-text-preview__meta caption-1",children:Object.entries(i.meta).map(([d,h])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:d}),n.jsx("dd",{children:h})]},d))}):null]}),n.jsxs("div",{className:"notify-text-preview__body",children:[n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsxs("div",{className:"notify-text-preview__col-head caption-1",children:[n.jsx("span",{children:"\uBB38\uC790"}),n.jsxs("span",{className:`notify-text-preview__bytes${c?" is-over":u.overTarget?" is-over-target":""}`,title:u.over?`${u.limit}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uBCF4\uB0BC \uB54C \uC798\uB9B0\uB2E4`:c?`${Ll}\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 ${Ll}\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 Hv({src:e,alt:t,className:a,style:r,tone:s,textColor:l}){const i=!s&&!!l,u=Jy(e,i),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return s?n.jsx("span",{className:ke("brand-logo","brand-logo--tone",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--brand-logo-src":`url("${e}")`,"--brand-logo-tone":s},children:n.jsx("img",{src:e,alt:"","aria-hidden":"true",className:"brand-logo__sizer",draggable:!1})}):i&&u?n.jsx("span",{className:ke("brand-logo","brand-logo--inline",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--brand-logo-text-color":l},dangerouslySetInnerHTML:{__html:Zy(Yy(u),c)}}):n.jsx("img",{src:e,alt:t,className:ke("brand-logo",a),style:r,draggable:!1})}function Pu({children:e,className:t}){const a=o.useRef(null),[r,s]=o.useState(null);return o.useEffect(()=>{s(a.current?.parentElement??null)},[]),o.useEffect(()=>{const l=a.current;if(!l||!r)return;const i=()=>{const c=typeof window<"u"&&window.getComputedStyle(l).position==="absolute"?Math.ceil(l.getBoundingClientRect().width):0;c>0?r.style.setProperty("--section-head-float-w",`${c}px`):r.style.removeProperty("--section-head-float-w")};if(i(),typeof ResizeObserver>"u")return()=>{r.style.removeProperty("--section-head-float-w")};const u=new ResizeObserver(()=>i());return u.observe(l),u.observe(r),()=>{u.disconnect(),r.style.removeProperty("--section-head-float-w")}},[r,e]),n.jsx("div",{ref:a,className:ke("section-head-float",t),children:e})}function Ho({items:e,className:t}){return n.jsx("div",{className:le(t?`chart-section__legend ${t}`:"chart-section__legend"),children:e.map((a,r)=>n.jsxs("span",{className:le("chart-section__legend-item"),children:[n.jsx("span",{className:le("chart-section__legend-dot"),style:{background:a.color}}),a.label]},r))})}function tr({label:e,children:t}){return e?n.jsxs("div",{className:le("chart-section__total chart-section__total--stacked"),children:[n.jsx("span",{className:le("chart-section__total__label body-3"),children:e}),n.jsx("span",{className:le("chart-section__total__value"),children:t})]}):n.jsx("div",{className:le("chart-section__total"),children:t})}function Vo({title:e,titleClassName:t="h3",titleLevel:a=3,icon:r,disc:s,headRight:l,headFloat:i,headSegment:u,headMenuItems:c,collapseBelow:d=420,onClick:h,ariaLabel:p,tooltip:C,totalNum:g,totalUnit:_,totalLabel:m,subRow:f,subRowAlign:v="start",className:b,inGrid:w=!1,children:y}){const{t:B}=xe.useTranslation(),x=o.useRef(null),{anchorRect:N,openAt:A,close:D}=za(),E=o.useCallback(()=>{C&&x.current&&A(x.current)},[C,A]),[k,R]=o.useState(!1);Fo(()=>{const j=x.current;if(!j||!u)return;const I=Y=>R(Y>0&&Y<d);if(I(j.clientWidth),typeof ResizeObserver>"u")return;const O=new ResizeObserver(Y=>I(Y[0].contentRect.width));return O.observe(j),()=>O.disconnect()},[u,d]);const[$,G]=o.useState(null),T=o.useCallback(()=>G(null),[]),P=o.useCallback(j=>{const I=j.currentTarget.getBoundingClientRect();G(O=>O?null:{left:I.left,right:I.right,top:I.top,bottom:I.bottom,width:I.width,height:I.height,x:I.x,y:I.y})},[]),M=!!u&&k;o.useEffect(()=>{M||G(null)},[M]);const ee=u?[...u.options.map(j=>({label:j.label,icon:j.icon,selected:j.key===u.value,disabled:j.disabled,onClick:()=>u.onChange(j.key),closeOnSelect:!0})),...(c??[]).map((j,I)=>I===0?{...j,separatorBefore:!0}:j)]:[],Q=o.useCallback(j=>{if(!h)return;const I=j.target;I&&typeof I.closest=="function"&&I.closest('button, a, input, select, textarea, [role="radiogroup"]')||h()},[h]),F=o.useCallback(j=>{h&&j.target===j.currentTarget&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),h())},[h]),Z=typeof l=="function"?l({collapsed:M}):l,L=g!=null||m?n.jsxs(tr,{label:m,children:[g!=null&&n.jsx("span",{className:le("chart-section__total__num h0"),children:g}),_&&n.jsx("span",{className:le("chart-section__total__unit h5"),children:_})]}):null,V=Z||u?n.jsxs("div",{className:le("chart-section__head-right"),children:[u&&(M?n.jsx(Ce,{htmlType:"button",size:zt,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":!!$,onClick:P}):n.jsx(vn,{size:zt,ariaLabel:u.ariaLabel,options:u.options.map(j=>({key:j.key,label:j.label,disabled:j.disabled})),value:u.value,onChange:u.onChange})),Z]}):null,U=o.useId(),q=a?`h${a}`:"div";return n.jsxs("section",{ref:x,className:le(["chart-section",w&&"chart-section--grid",h&&"chart-section--clickable",b].filter(Boolean).join(" ")),onClick:h?Q:void 0,onKeyDown:h?F:void 0,onPointerEnter:C?E:void 0,onPointerLeave:C?D:void 0,onFocus:C?E:void 0,onBlur:C?D:void 0,role:h?"button":void 0,tabIndex:h?0:void 0,"aria-label":h?p??(typeof e=="string"?e:void 0):void 0,"aria-labelledby":!h&&e!=null?U:void 0,children:[C&&N&&n.jsx(Mn,{anchorRect:{left:N.left,top:N.top+21,right:N.right,bottom:N.bottom,width:N.width,height:N.height},text:C}),i&&n.jsx(Pu,{children:i}),n.jsxs("div",{className:le("chart-section__head"),children:[n.jsxs("div",{className:le("chart-section__title-row"),children:[r&&n.jsx(rt,{icon:r,label:typeof e=="string"?e:void 0,className:le("chart-section__icon")}),n.jsx(q,{id:U,className:le(["chart-section__title",t].filter(Boolean).join(" ")),children:e})]}),V,s&&n.jsx("div",{className:le("chart-section__disc body-3"),children:s})]}),(L||f)&&n.jsxs("div",{className:le(["chart-section__sub-row",v!=="start"&&`chart-section__sub-row--${v}`].filter(Boolean).join(" ")),children:[L,f]}),y,$&&n.jsx(Bn,{anchorRect:$,onClose:T,ariaLabel:u?.ariaLabel??B("tooltip.menu","\uBA54\uB274"),children:n.jsx(Va,{columns:[{items:ee}],onClose:T,size:"small"})})]})}const nr=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,qo=e=>nr(e.getFullYear(),e.getMonth()+1);function ya(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 Uo=(e,t)=>`${e}#${t}`;function Sn(e,t){const a=new Date(e,t,1).getDay();return 1+(8-(a===0?7:a))%7}function Vv(){const e=ha();let t=e.getFullYear(),a=e.getMonth(),r=e.getDate();if(r<Sn(t,a)){const i=new Date(t,a,0);t=i.getFullYear(),a=i.getMonth(),r=i.getDate()}const s=Math.floor((r-Sn(t,a))/7),l=nr(t,a+1);return{monthKey:l,value:Uo(l,s)}}function qv(e){const t=ha(),a=qo(t),r=(c,d)=>nr(c,d+1),s=new Map;s.set(a,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const d=r(c.date.getFullYear(),c.date.getMonth());s.has(d)||s.set(d,[]),s.get(d).push(c)}for(const[c,d]of[...s.entries()]){const h=ya(c);if(!h)continue;const p=h.year,C=h.month1-1,g=Sn(p,C);if(!(c===a&&t.getDate()<g)&&!d.some(f=>f.date.getDate()<g))continue;const _=new Date(p,C,0),m=r(_.getFullYear(),_.getMonth());s.has(m)||s.set(m,[])}const l=new Map;for(const[c,d]of s){const h=ya(c);if(!h)continue;const p=h.year,C=h.month1-1,g=new Date(p,C+1,0).getDate(),_=d.reduce((y,B)=>Math.max(y,B.parts?.length??0,B.partsB?.length??0),0),m=d.some(y=>y.partsB),f=new Array(g+1).fill(0),v=new Array(g+1).fill(0),b=Array.from({length:g+1},()=>new Array(_).fill(0)),w=Array.from({length:g+1},()=>new Array(_).fill(0));for(const y of d){const B=y.date.getDate();if(f[B]+=y.a,v[B]+=y.b,y.parts)for(let x=0;x<_;x++)b[B][x]+=y.parts[x]??0;if(y.partsB)for(let x=0;x<_;x++)w[B][x]+=y.partsB[x]??0}l.set(c,{year:p,month:C,daysInMonth:g,partsLen:_,hasPartsB:m,dayA:f,dayB:v,dayParts:b,dayPartsB:w})}const i=(c,d,h)=>new Date(c,d,h).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,d]of l){const{year:h,month:p,daysInMonth:C,dayA:g,dayB:_,dayParts:m,dayPartsB:f}=d,v=h===t.getFullYear()&&p===t.getMonth(),b=t.getDate(),w=l.get(r(p===11?h+1:h,(p+1)%12)),y=d.partsLen,B=[];for(let N=1;N<=C;N++){const A=v&&N>b;B.push({label:String(N),...A&&g[N]===0&&_[N]===0?{future:!0}:{},a:A&&g[N]===0&&_[N]===0?-1:g[N],b:_[N],...y?{parts:m[N]}:{},...y&&d.hasPartsB?{partsB:f[N]}:{}})}const x=[];for(let N=Sn(h,p);N<=C;N+=7){const A=Math.max(0,N+6-C),D=A&&w?Math.max(y,w.partsLen):y,E=d.hasPartsB||!!(A&&w?.hasPartsB);let k=0,R=0;const $=new Array(D).fill(0),G=new Array(D).fill(0);for(let P=N;P<=Math.min(N+6,C);P++){k+=g[P],R+=_[P];for(let M=0;M<y;M++)$[M]+=m[P][M],G[M]+=f[P][M]}if(A&&w)for(let P=1;P<=A&&!i(w.year,w.month,P);P++){k+=w.dayA[P],R+=w.dayB[P];for(let M=0;M<w.partsLen;M++)$[M]+=w.dayParts[P][M],G[M]+=w.dayPartsB[P][M]}const T=A?`${(p+1)%12+1}/${A}`:`${N+6}`;x.push({label:`${x.length+1}\uC8FC`,sublabel:`[${N}\uC77C~${T}\uC77C]`,a:k,b:R,...D?{parts:$}:{},...D&&E?{partsB:G}:{}})}u[c]={weekly:x,daily:B}}return u}function Iu(){const e=ha(),t=e.getFullYear(),a=e.getMonth()+1,r=[];for(let s=2024;s<=t;s++){const l=s===t?a:12;for(let i=1;i<=l;i++)r.push({value:nr(s,i),year:s,month:i})}return r.reverse()}Iu();function Uv(){return Iu()}function Fu(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 Ou(e){const{t,i18n:a}=xe.useTranslation(),[r,s]=o.useState("week"),l=o.useMemo(()=>Uv().filter(D=>D.value in e),[e]),i=o.useMemo(()=>{const D=[];for(const E of l){const k=new Date(E.year,E.month,0).getDate(),R=Sn(E.year,E.month-1),$=Math.ceil((k-R+1)/7);for(let G=$-1;G>=0;G--)D.push({value:Uo(E.value,G),monthKey:E.value,year:E.year,month:E.month,week:G})}return D},[l]),u=o.useCallback(D=>`${co(t,a.language,D.year,D.month)} ${Fu(t,D.week)}`,[t]),c=o.useMemo(()=>l.map(D=>({value:D.value,label:co(t,a.language,D.year,D.month)})),[t,a.language,l]),d=o.useMemo(()=>i.map(D=>({value:D.value,label:u(D)})),[i,u]),h=o.useMemo(()=>Vv(),[e]),p=o.useMemo(()=>l.find(D=>D.value===h.monthKey)?.value??l[0]?.value??"",[l,h]),C=o.useMemo(()=>i.find(D=>D.value===h.value)?.value??i[0]?.value??"",[i,h]),[g,_]=o.useState(""),[m,f]=o.useState("");o.useEffect(()=>{l.find(D=>D.value===g)||_(p)},[l,g,p]),o.useEffect(()=>{i.find(D=>D.value===m)||f(C)},[i,m,C]);const v=r==="month"?c:d,b=r==="month"?g:m,w=r==="month"?_:f,y=o.useMemo(()=>{const D=t("calendar.dow",{returnObjects:!0});return Array.isArray(D)?D:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),B=v.findIndex(D=>D.value===b),x=o.useCallback(()=>{const D=v.findIndex(E=>E.value===b);D<v.length-1&&w(v[D+1].value)},[v,b,w]),N=o.useCallback(()=>{const D=v.findIndex(E=>E.value===b);D>0&&w(v[D-1].value)},[v,b,w]),A=o.useMemo(()=>[{key:"week",label:t("manager.chart.periodWeek","\uC8FC")},{key:"month",label:t("manager.chart.periodMonth","\uC6D4")}],[t]);return{period:r,setPeriod:s,range:b,setRange:w,activeOptions:v,activeIdx:B,handlePrev:x,handleNext:N,periodOptions:A,monthRange:g,weekRange:m,weekRanges:i,DOW:y}}const St=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function In(e,t=!0){return e.future===!0||t&&e.a===-1}function Gv({data:e,colorA:t,colorB:a,labelA:r,labelB:s,barWidth:l=10,barGap:i=1,height:u=140,maxOverride:c,tightMax:d,seriesColors:h,seriesLabels:p,rateLabels:C,grouped:g=!1,baseline:_,focusableBars:m=!1}){const f=!a,v=!!(h&&h.length>0),b=_,w=o.useMemo(()=>v?Math.max(0,...e.filter(F=>!In(F,b==null)).map(F=>g?Math.max(0,...(F.parts??[]).map(St)):(F.parts??[]).reduce((Z,L)=>Z+Math.max(0,St(L)),0))):Math.max(0,...e.filter(F=>!In(F,b==null)).flatMap(F=>f?[St(F.a)]:[St(F.a),St(F.b)])),[e,f,v,g]),y=o.useMemo(()=>{if(b==null)return 0;const F=e.filter(Z=>!In(Z,b==null)).flatMap(Z=>v?(Z.parts??[]).map(St):f?[St(Z.a)]:[St(Z.a),St(Z.b)]);return Math.max(0,...F.map(Z=>Math.abs(Z-b)))},[e,b,v,f]),B=o.useMemo(()=>{const F=b!=null?y:w;return c??(d?F>0?F:10:Math.ceil(F/10)*10||10)},[w,y,b,c,d]),x=u,N=v?g?Math.max(1,h.length):1:f?1:2,A={"--bar-width":`${o.useMemo(()=>{const F=Math.max(1,e.length);return Math.max(2,Math.min(l,Math.round(120/(F*N)+6)))},[e.length,N,l])}px`},D={"--bar-group-gap":`${Math.max(0,i)}px`},E=o.useMemo(()=>{const F=Math.round(B/2);return b!=null?[b+B,...F!==B?[b+F]:[],b,...F!==B?[b-F]:[],b-B]:F!==B?[B,F,0]:[B,0]},[B,b]),k=F=>b!=null?1-(F-(b-B))/(2*B):1-F/B,[R,$]=o.useState(null),G=o.useCallback(()=>$(null),[]),T=o.useCallback((F,Z)=>{const L=[F.label,F.sublabel].filter(Boolean).join(" ");let V;if(v&&g&&F.rawPartsB)V=(p??[]).map((U,q)=>{const j=F.rawPartsB[q]??0;return{text:j>0?`${U}: ${Z[q]??0}% (${F.rawParts?.[q]??0}/${j})`:`${U}: -`,color:(h??[])[q]}});else if(v&&g)V=(p??[]).map((U,q)=>({text:`${U}: ${ee(Z[q]??0)}`,color:(h??[])[q]}));else if(v){const U=(p??[]).map((j,I)=>({text:`${j}: ${Z[I]??0}`,color:(h??[])[I]})),q=U.filter((j,I)=>(Z[I]??0)>0);V=q.length?q:U}else C&&!f?V=[{text:`${r} ${St(F.a)}%`,color:t},{text:`${s} ${St(F.b)}%`,color:a}]:C&&F.rawB!==void 0?V=[{text:`${C.total} ${F.rawB}`},{text:`${C.done} ${F.rawA??0}`,color:t}]:f?V=[{text:`${r}: ${St(F.a)}`,color:t}]:V=[{text:`${r}: ${St(F.a)}`,color:t},{text:`${s}: ${St(F.b)}`,color:a}];return{title:L,items:V}},[v,g,p,h,C,f,r,s,t,a,b]),P=o.useCallback((F,Z,L)=>{const V=F.getBoundingClientRect(),{title:U,items:q}=T(Z,L);$({rect:{left:V.left,top:V.top,right:V.right,bottom:V.bottom,width:V.width,height:V.height},title:U,items:q})},[T]),M=o.useCallback((F,Z)=>{const{title:L,items:V}=T(F,Z);return[L,...V.map(U=>U.text)].filter(Boolean).join(", ")},[T]),ee=F=>b!=null&&F>b?`+${F}`:`${F}`,Q=R!=null;return o.useEffect(()=>{if(!Q)return;const F=()=>$(null),Z=L=>{const V=L.target;V&&typeof V.closest=="function"&&V.closest(".bar-chart__col")||$(null)};return window.addEventListener("scroll",F,!0),document.addEventListener("pointerdown",Z,!0),()=>{window.removeEventListener("scroll",F,!0),document.removeEventListener("pointerdown",Z,!0)}},[Q]),n.jsxs("div",{className:le("bar-chart__wrap"),style:D,children:[n.jsx("div",{className:le("bar-chart__inner"),children:n.jsx("div",{className:le("bar-chart__scroll"),children:n.jsxs("div",{className:le("bar-chart__area"),children:[n.jsxs("div",{className:le("bar-chart__plot"),style:{height:x},children:[E.slice(0,-1).map((F,Z)=>n.jsx("div",{className:le(`bar-chart__gridline${b!=null&&F===b?" bar-chart__gridline--baseline":""}`),style:{top:k(F)*x},children:n.jsx("span",{className:le("bar-chart__gridline__label caption-1"),children:F})},Z)),e.map((F,Z)=>{const L=In(F,b==null),V=x/2,U=O=>b!=null?Math.min(V,Math.abs(St(O)-b)/B*V):Math.min(x,Math.max(0,St(O)/B*x)),q=L?0:U(F.a),j=L?0:U(F.b),I=(F.parts??[]).map(St);return n.jsx("div",{className:le(`bar-chart__col${g&&v?" bar-chart__col--group":""}`),style:{cursor:L?"default":"pointer"},tabIndex:m&&!L?0:void 0,role:m&&!L?"img":void 0,"aria-label":m&&!L?M(F,I):void 0,onMouseEnter:L?void 0:O=>P(O.currentTarget,F,I),onFocus:L||!m?void 0:O=>P(O.currentTarget,F,I),onBlur:m?G:void 0,onMouseLeave:G,children:!L&&(v&&g?(h??[]).map((O,Y)=>{const K=I[Y]??0;if(b==null)return n.jsx("div",{className:le("bar-chart__bar"),style:{...A,height:U(K),background:O}},Y);const ie=St(K)<b;return n.jsxs("div",{className:le("bar-chart__slot"),style:A,children:[n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--up"),children:!ie&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full"),style:{height:U(K),background:O}})}),n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--down"),children:ie&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:U(K),background:O}})})]},Y)}):v?n.jsx("div",{className:le("bar-chart__stack"),style:A,children:(()=>{const O=I.reduce((K,ie,te)=>ie>0?te:K,-1);let Y=x;return I.map((K,ie)=>{if(K<=0)return null;const te=Math.min(Y,K/B*x);return Y-=te,n.jsx("div",{className:le("bar-chart__stack-segment"),style:{height:te,background:(h??[])[ie],borderRadius:ie===O?"6px 6px 0 0":void 0}},ie)})})()}):b!=null?n.jsx(n.Fragment,{children:[{v:St(F.a),c:t},...f?[]:[{v:St(F.b),c:a}]].map(({v:O,c:Y},K)=>n.jsxs("div",{className:le("bar-chart__slot"),style:A,children:[n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--up"),children:O>=b&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full"),style:{height:U(O),background:Y}})}),n.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--down"),children:O<b&&n.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:U(O),background:Y}})})]},K))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:le("bar-chart__bar"),style:{...A,height:q,background:t}}),!f&&n.jsx("div",{className:le("bar-chart__bar"),style:{...A,height:j,background:a}})]}))},Z)})]}),n.jsx("div",{className:le("bar-chart__x-axis"),children:e.map((F,Z)=>{const L=In(F,b==null);return n.jsxs("span",{className:le(`bar-chart__x-axis__label${L?" bar-chart__x-axis__label--future":""}`),children:[n.jsxs("span",{className:le("caption-1 bar-chart__x-axis__main"),children:[F.isToday&&n.jsx("span",{className:le("bar-chart__x-axis__today-dot"),style:{background:t}}),F.label]}),F.sublabel&&n.jsx("span",{className:"caption-1",children:F.sublabel})]},Z)})})]})})}),R&&n.jsx(qn,{anchorRect:R.rect,title:R.title,items:R.items,showIndex:!1,closeOnOutsideClick:!1})]})}function zu({control:e}){const{t}=xe.useTranslation(),{activeOptions:a,activeIdx:r,range:s,setRange:l,handlePrev:i,handleNext:u,periodOptions:c,period:d,setPeriod:h}=e,p=d==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),C=d==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:le("chart-section__controls"),children:[n.jsx(Ce,{htmlType:"button",size:zt,type:"dot",icon:"chevron-left",ariaLabel:p,showTooltipInfo:p,disabled:r===a.length-1,onClick:i}),n.jsx(_n,{value:s,onChange:l,options:a,size:zt,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(Ce,{htmlType:"button",size:zt,type:"dot",icon:"chevron-right",ariaLabel:C,showTooltipInfo:C,disabled:r<=0,onClick:u}),n.jsx(vn,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:d,onChange:g=>h(g),size:zt})]})}function Go(e,t,a,r=!0){const s=new Date(a.getFullYear(),a.getMonth(),a.getDate());return Array.from({length:7},(l,i)=>{const u=new Date(t);u.setDate(t.getDate()+i);const c=(e[qo(u)]?.daily??[])[u.getDate()-1],d=c!=null&&In(c,r)||u>s;return{dt:u,entry:c,isFuture:d}})}function Kv(e,t,a,r=!0){const{period:s,monthRange:l,weekRange:i,weekRanges:u,DOW:c}=t,d=ha(),h=d.getFullYear(),p=d.getMonth()+1,C=d.getDate();if(s==="month"){const m=e[l]??{weekly:[],daily:[]},f=ya(l),v=f?f.year:null,b=f?f.month1:null,w=v&&b?Sn(v,b-1):1;return m.weekly.map((y,B)=>{const x=B+1;let N=y.label,A=!1,D=!1;if(v&&b){const E=w+B*7,k=new Date(v,b-1,E+6),R=k.getMonth()+1,$=k.getDate(),G=R===b?`${$}`:`${R}/${$}`;N=a("manager.chart.weekRange",{start:E,end:G});const T=new Date(h,p-1,C).getTime();A=T>=new Date(v,b-1,E).getTime()&&T<=k.getTime(),D=v>h||v===h&&(b>p||b===p&&E>C)}return{...y,label:N,sublabel:Fu(a,x-1),isToday:A,future:y.future===!0||D||void 0,a:D?-1:y.a,b:D?0:y.b}})}const g=u.find(m=>m.value===i);if(!g)return[];const _=new Date(g.year,g.month-1,Sn(g.year,g.month-1)+g.week*7);return Go(e,_,d,r).map(({dt:m,entry:f,isFuture:v})=>{const b=m.getMonth()+1,w=m.getDate(),y=m.getFullYear();return{label:b===g.month&&y===g.year?`${w}`:`${b}/${w}`,sublabel:c[m.getDay()]??"",future:v||void 0,a:v?-1:f&&f.a>0?f.a:0,b:v?0:f&&f.b>0?f.b:0,isToday:y===h&&b===p&&w===C,...f?.parts?{parts:v?f.parts.map(()=>0):f.parts}:{},...f?.partsB?{partsB:v?f.partsB.map(()=>0):f.partsB}:{}}})}const Yv={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function Zv({focusableBars:e,size:t="medium",barWidth:a,titleKey:r,titleLevel:s,data:l,colorA:i,colorB:u,labelAKey:c,labelBKey:d,showTotal:h=!1,totalUnitKey:p,totalLabelKey:C,control:g,hideControls:_=!1,rate:m=!1,rateAgg:f="dayMean",tightMax:v=!1,avgMode:b=!1,totalFormat:w,series:y,seriesMode:B="stack",loading:x=!1,onDetail:N,headExtra:A,headSegment:D,icon:E,disc:k,onClick:R,cardAriaLabel:$,cardTooltip:G,detailSize:T=zt,barGap:P,baseline:M,className:ee,inGrid:Q=!1}){const{t:F}=xe.useTranslation(),Z=Yv[t],L=Ou(l),V=g??L,U=o.useMemo(()=>Kv(l,V,F,M==null),[l,V,F,M]),q=B==="group"&&!!y&&y.length>0;P!=null&&!q&&kt("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 j=o.useMemo(()=>{if(!m)return U;const ne=V.period==="month"?ya(V.monthRange):null,z=ha(),ae=y?.length??0,H=W=>{const ue=[],Be=[],ye=[];for(let he=0;he<ae;he++){let Ne=0,Re=0,Me=0;for(const se of W){const Ee=St(se.a[he]),$e=St(se.b[he]);$e<=0||(Ne+=Ee,Re+=$e,Me+=Ee/$e*100)}ue.push(f==="weighted"?Re>0?Math.round(Ne/Re*100):0:W.length?Math.round(Me/W.length):0),Be.push(Ne),ye.push(Re)}return{pct:ue,ra:Be,rb:ye}};return U.map((W,ue)=>{let Be=W.a===-1?-1:W.b>0?Math.round(W.a/W.b*100):0;if(ne&&!In(W)){const he=ne.year,Ne=ne.month1-1,Re=Go(l,new Date(he,Ne,Sn(he,Ne)+ue*7),z).filter(Me=>!Me.isFuture);if(f==="weighted"){let Me=0,se=0;for(const{entry:Ee}of Re)Ee&&Ee.b>0&&(Me+=Ee.a,se+=Ee.b);Be=se>0?Math.round(Me/se*100):0}else Be=Re.length?Math.round(Re.reduce((Me,{entry:se})=>Me+(se&&se.b>0?se.a/se.b*100:0),0)/Re.length):0}let ye=null;if(q&&!In(W)){let he;if(ne){const Re=ne.year,Me=ne.month1-1;he=Go(l,new Date(Re,Me,Sn(Re,Me)+ue*7),z).filter(se=>!se.isFuture).map(({entry:se})=>({a:se?.parts??[],b:se?.partsB??[]}))}else he=[{a:W.parts??[],b:W.partsB??[]}];const Ne=H(he);ye={parts:Ne.pct,rawParts:Ne.ra,rawPartsB:Ne.rb}}return{...W,a:Be,b:W.a===-1?0:d&&W.parts&&W.parts[1]>0?Math.round(W.parts[0]/W.parts[1]*100):0,rawA:W.a===-1?-1:W.a,rawB:W.b,...ye??{}}})},[U,m,f,d,V.period,V.monthRange,l,q,y?.length]),I=o.useMemo(()=>{if(m||b){const z=(V.period==="week"?U:l[V.monthRange]?.daily??[]).filter(H=>H.a!==-1);if(z.length===0)return 0;if(m&&f==="weighted"){let H=0,W=0;for(const ue of z)ue.b>0&&(H+=ue.a,W+=ue.b);return W>0?Math.round(H/W*100):0}const ae=m?z.reduce((H,W)=>H+(W.b>0?W.a/W.b*100:0),0):z.reduce((H,W)=>H+(W.a>0?W.a:0),0);return Math.round(ae/z.length)}const ne=V.period==="month"?l[V.monthRange]?.daily??[]:j;return M!=null?ne.reduce((z,ae)=>z+(In(ae,!1)?0:St(ae.a)+(d?St(ae.b):0)),0):ne.reduce((z,ae)=>z+(ae.a>0?ae.a:0)+(d&&ae.b>0?ae.b:0),0)},[j,U,m,f,b,M,d,V.period,V.monthRange,l]),O=y&&y.length>0?y.map(ne=>({color:ne.color,label:ne.label})):[{color:i,label:F(c)},...d?[{color:u,label:F(d)}]:[]],Y=t==="small",K=[Y?"chart-section--compact":t==="large"?"chart-section--full":void 0,ee].filter(Boolean).join(" ")||void 0,ie=r?F(r):"",te=ie?F("trainingStatus.detailFor",{name:ie,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):F("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Vo,{className:K,inGrid:Q,icon:E,disc:k,onClick:R,ariaLabel:$,tooltip:G,headSegment:D,headMenuItems:N?[{label:te,icon:"list",onClick:N,closeOnSelect:!0}]:void 0,title:F(r),titleLevel:s,titleClassName:Y?"h5 chart-section-title--small":void 0,headRight:Y?A??void 0:({collapsed:ne})=>n.jsxs(n.Fragment,{children:[!_&&n.jsx(zu,{control:V}),A,N&&!ne&&n.jsx("span",{className:le("bar-chart__detail-btn"),children:n.jsx(Ce,{htmlType:"button",size:T,type:"dot",icon:"list",ariaLabel:te,showTooltipInfo:te,onClick:N})})]}),subRow:n.jsxs(n.Fragment,{children:[h?m||b||C&&w?n.jsx(tr,{label:Y?void 0:`${F(V.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${F(C??c)}`,children:w?(w(I).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((ne,z)=>/\d/.test(ne)?n.jsx("span",{className:le("chart-section__total__num h0"),children:ne},z):n.jsx("span",{className:le("chart-section__total__unit h5"),children:ne},z)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:le("chart-section__total__num h0"),children:I}),p&&n.jsx("span",{className:le("chart-section__total__unit h5"),children:F(p)})]})}):n.jsxs(tr,{children:[n.jsx("span",{className:le("chart-section__total__num h0"),children:I}),n.jsx("span",{className:le("chart-section__total__unit h5"),children:F(c)}),p&&n.jsx("span",{className:le("chart-section__total__unit h5"),children:F(p)})]}):n.jsx("span",{}),n.jsx(Ho,{items:O,className:"caption-1"})]}),children:x?n.jsx("div",{className:le("bar-chart__wrap bar-chart__loading"),"aria-busy":"true",children:n.jsx("div",{className:le("bar-chart__inner"),children:n.jsxs("div",{className:le("bar-chart__area bar-chart__area--loading"),children:[n.jsx("div",{className:le("bar-chart__plot bar-chart__plot--loading"),style:{height:Z.height},children:n.jsx(Ca,{size:32})}),n.jsx("div",{className:le("bar-chart__x-axis"),"aria-hidden":"true",children:n.jsxs("span",{className:le("bar-chart__x-axis__label"),children:[n.jsx("span",{className:le("caption-1 bar-chart__x-axis__main"),children:"\xA0"}),j.some(ne=>!!ne.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(Gv,{focusableBars:e,data:j,colorA:i,colorB:d?u:void 0,labelA:F(c),labelB:d?F(d):void 0,barWidth:a??Z.barWidth,barGap:P,baseline:M,height:Z.height,maxOverride:m?100:void 0,tightMax:v,seriesColors:y?.map(ne=>ne.color),seriesLabels:y?.map(ne=>ne.label),rateLabels:m?{total:F("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:F("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:q})})}const Wu=120,Xv={left:38,right:16,top:26,bottom:24};function Jv({points:e=[],range:t,ticks:a=[],axisTitle:r,color:s,height:l=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:d,className:h}){const[p,C]=o.useState(null),[g,_]=o.useState(null);o.useEffect(()=>{if(!g)return;const M=Q=>C(Math.round(Q)||null);if(M(g.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const ee=new ResizeObserver(([Q])=>M(Q.contentRect.width));return ee.observe(g),()=>{ee.disconnect()}},[g]);const{payload:m,anchorRect:f,openAfterDelay:v,close:b}=Vy(Wu),w=o.useCallback((M,ee)=>{M&&v(M,ee.getBoundingClientRect())},[v]),y=p??i,B=l,{left:x,right:N,top:A,bottom:D}={...Xv,...u},[E,k]=t,R=M=>k===E?x:x+(y-x-N)*(M-E)/(k-E),$=M=>A+(B-A-D)*(100-M)/100,G={x:R,y:$,plot:{left:x,right:y-N,top:A,bottom:B-D,width:Math.max(0,y-x-N),height:Math.max(0,B-A-D)}},T=e.filter(M=>!M.hollow),P=s??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:_,className:ke("line-chart",h),viewBox:`0 0 ${y} ${B}`,role:"img","aria-label":d??e.map(M=>M.description).filter(Boolean).join(", "),children:[r&&n.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:r}),[0,100].map(M=>n.jsxs("g",{children:[n.jsx("line",{className:"line-chart__grid",x1:x,x2:y-N,y1:$(M),y2:$(M)}),n.jsxs("text",{className:"line-chart__tick",x:x-6,y:$(M)+4,textAnchor:"end",children:[M,"%"]})]},M)),c?.(G),a.map(M=>n.jsx("text",{className:"line-chart__tick",x:R(M.x),y:B-5,textAnchor:"middle",children:M.label},M.x)),T.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:P,points:T.map(M=>`${R(M.x)},${$(M.pct)}`).join(" ")}),e.map(M=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:ee=>w(M.description,ee.currentTarget),onPointerLeave:b,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:R(M.x),cy:$(M.pct),r:12}),n.jsx("circle",{className:ke("line-chart__dot-main",M.hollow&&"is-hollow"),cx:R(M.x),cy:$(M.pct),r:4,stroke:P,fill:M.hollow?void 0:P})]},M.x))]}),m!=null&&n.jsx(Bn,{anchorRect:f,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:m,children:m})]})}function Qv({icon:e,iconSize:t=56,title:a,titleClass:r="h2",description:s,tipGroups:l,start:i,className:u}){return n.jsxs("div",{className:ke("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:ke("game-intro__title",r),children:a}),s!=null&&n.jsx("p",{className:"game-intro__description body-3",children:s}),l?.map((c,d)=>n.jsxs("div",{className:"game-intro__tips",children:[c.title!=null&&n.jsx("span",{className:"game-intro__tips-title body-3",children:c.title}),c.tips.map((h,p)=>n.jsxs("span",{className:"game-intro__tip body-3",children:[h.icon!=null&&n.jsx("span",{"aria-hidden":"true",children:h.icon}),n.jsx("span",{children:h.text})]},p))]},d)),i&&n.jsx(Ce,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const Hu=(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")}`},Vu=(e,t,a,r)=>({from:Gl(e,t,a),to:new Date(Gl(e,t,a+r).getTime()-1),fromYmd:Hu(e,t,a),toYmd:Hu(e,t,a+r-1)});function e4(e,t=0){if(e.period==="month"){const s=ya(e.monthRange),l=ha(),i=s?s.year:l.getFullYear(),u=(s?s.month1:l.getMonth()+1)-1+t,c=new Date(Date.UTC(i,u+1,0)).getUTCDate();return Vu(i,u,1,c)}const a=e.weekRanges.find(s=>s.value===e.weekRange);if(!a){const s=new Date,l=Ia();return{from:s,to:s,fromYmd:l,toYmd:l}}const r=Sn(a.year,a.month-1);return Vu(a.year,a.month-1,r+(a.week+t)*7,7)}const Ko={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function qu(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Uu({done:e,total:t,segments:a,color:r="var(--color-main)",size:s="medium",strokeWidth:l,label:i="%",hideCenter:u=!1,hideLabel:c=!1}){const d=typeof s=="number"?s:Ko[s].diameter,h=l??(typeof s=="number"?12:Ko[s].strokeWidth),p=d/2,C=(d-h)/2,g=2*Math.PI*C;if(a&&a.length>0){const v=a.reduce((b,w)=>{const y=b.length>0?b[b.length-1].acc:0,B=Number.isFinite(w.ratio)?w.ratio:0,x=Math.max(0,Math.min(B,1-y));return b.push({color:w.color,rotate:-90+y*360,dash:g*x,acc:y+x}),b},[]);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:h}),v.map((b,w)=>b.dash>0&&n.jsx("circle",{cx:p,cy:p,r:C,fill:"none",stroke:b.color,strokeWidth:h,strokeDasharray:`${b.dash} ${g}`,strokeLinecap:"round",transform:`rotate(${b.rotate} ${p} ${p})`},w))]})})}const _=(t??0)>0?Math.min((e??0)/t,1):0,m=g*_,f=g-m;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:h}),_>0&&n.jsx("circle",{cx:p,cy:p,r:C,fill:"none",stroke:r,strokeWidth:h,strokeDasharray:`${m} ${f}`,strokeLinecap:_<.02||_>.98?"butt":"round",transform:`rotate(-90 ${p} ${p})`})]}),!u&&n.jsxs("div",{className:`ring-chart__center${c?"":` ${d<=96?"ring-chart__center--small":s==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${d<=96?"h2":"h1"}`,children:qu(_)}),!c&&n.jsx("span",{className:`ring-chart__label ${d<=96?"caption-2":"caption-1"}${d<=96||s==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function t4({titleKey:e,titleLevel:t,headRight:a,icon:r,showTotal:s,totalLabelKey:l,legend:i,loading:u,className:c,inGrid:d=!1,onClick:h,ariaLabel:p,tooltip:C,...g}){const{t:_}=xe.useTranslation();if(!e)return n.jsx(Uu,{...g});const m=(g.total??0)>0?qu(Math.min((g.done??0)/g.total,1)):0,f=g.size==="small",v=typeof g.size=="number"?g.size:Ko[g.size??"medium"].diameter,b=g.size==="large",w=[c,f?"chart-section--compact":b?"chart-section--full":""].filter(Boolean).join(" ")||void 0,y=r&&n.jsx("span",{className:le("chart-section-icon"),children:n.jsx(rt,{icon:r,className:le("chart-section-icon-inner")})});return n.jsx(Vo,{className:w,inGrid:d,onClick:h,ariaLabel:p,tooltip:C,title:_(e),titleLevel:t,titleClassName:f?"h5 chart-section-title--small":void 0,headRight:y||(f?void 0:a),subRow:(s||i)&&n.jsxs(n.Fragment,{children:[s?n.jsxs(tr,{label:!f&&l?_(l):void 0,children:[n.jsx("span",{className:le("chart-section__total__num h0"),children:m}),n.jsx("span",{className:le("chart-section__total__unit h5"),children:"%"})]}):n.jsx("span",{}),i&&n.jsx(Ho,{items:i})]}),children:u?n.jsx("div",{className:le("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx("div",{className:"ring-chart ring-chart--loading",style:{width:v,height:v},"aria-busy":"true",children:n.jsx(Ca,{size:32})})}):n.jsx("div",{className:le("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx(Uu,{...g,hideCenter:g.hideCenter??f})})})}function n4({label:e,value:t,change:a,changeType:r,icon:s,tooltip:l,onClick:i,children:u}){const c=o.useRef(null),{anchorRect:d,openAt:h,close:p}=za(),C=o.useCallback(()=>{l&&c.current&&h(c.current)},[l,h]),g=r??(a===void 0?void 0:a>0?"up":a<0?"down":"neutral"),_=a===void 0?void 0:a>0?`+${a}`:`${a}`,m=o.useCallback(f=>{i&&(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),i())},[i]);return n.jsxs("div",{ref:c,className:le(`stat-chart__card${i?" stat-chart__card--clickable":""}`),onClick:i,onKeyDown:i?m: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,_].filter(f=>f!==void 0&&f!=="").join(" "):void 0,children:[l&&d&&n.jsx(Mn,{anchorRect:{left:d.left,top:d.top+21,right:d.right,bottom:d.bottom,width:d.width,height:d.height},text:l}),n.jsxs("div",{className:le("stat-chart__card__label-row"),children:[n.jsx("span",{className:le("stat-chart__card__label h5"),children:e}),s&&n.jsx("span",{className:le("stat-chart__card__icon"),children:n.jsx(rt,{icon:s,className:le("stat-chart__card__icon-inner")})})]}),n.jsxs("div",{className:le("stat-chart__card__content"),children:[n.jsxs("div",{className:le("stat-chart__card__left"),children:[n.jsx("div",{className:le("stat-chart__card__value h2"),children:t}),_&&n.jsx("div",{className:le(`stat-chart__card__change stat-chart__card__change--${g??"neutral"} caption-1`),children:_})]}),u&&n.jsx("div",{className:le("stat-chart__card__body"),children:u})]})]})}function Gu({value:e,onChange:t,min:a=0,max:r=100,step:s=1,orientation:l="horizontal",size:i=24,disabled:u=!1,ariaLabel:c,length:d,className:h,label:p,formatValue:C,labelPos:g,labelAlign:_="right",showMinMax:m=!1,minLabel:f,maxLabel:v,showBgTick:b=!1,showFillTick:w=!1,tickStep:y,tickShape:B="dot"}){t&&!c&&kt("Slider:unnamed","[ihab/Slider] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. label prop \uC740 \uAC12 \uD45C\uAE30 \uBC29\uC2DD\uC774\uC9C0 \uC774\uB984\uC774 \uC544\uB2D9\uB2C8\uB2E4.");const x=Math.min(r,Math.max(a,e)),N=r>a?(x-a)/(r-a):0,A=l==="vertical",D=!t,E=U=>t?.(Number(U.target.value)),k=typeof d=="number"?`${d}px`:d,R={"--slider-ratio":String(N),"--slider-thumb":`${i}px`,...k?A?{height:k}:{width:k}:{}},$=y??s,G=(b||w)&&$>0&&r>a?Math.floor((r-a)/$+1e-6):0;if(G>0&&G<=100){const U=B!=="dash",q=K=>U?`radial-gradient(circle, ${K} 0.5px, transparent 1px)`:A?`linear-gradient(to bottom, transparent calc(50% - 2px), ${K} calc(50% - 2px), ${K} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${K} calc(50% - 2px), ${K} calc(50% + 2px), transparent calc(50% + 2px))`,j=U?"2px":"4px",I=[],O=[],Y=[];for(let K=0;K<=G;K++){const ie=K*$/(r-a);if(ie>1+1e-6)break;const te=`${((A?1-ie:ie)*100).toFixed(4)}%`,ne=ie<=N+1e-6;if(ne?!w:!b)continue;const z=ne?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";I.push(q(z)),O.push(A?`${j} var(--slider-thumb)`:`var(--slider-thumb) ${j}`),Y.push(A?`center ${te}`:`${te} center`)}I.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))"),O.push("100% 100%"),Y.push("0 0"),R.backgroundImage=I.join(", "),R.backgroundSize=O.join(", "),R.backgroundPosition=Y.join(", "),R.backgroundRepeat="no-repeat"}const T=C?C(x):p==="percent"?`${Math.round(r>a?(x-a)/(r-a)*100:0)}%`:p==="count"?`${x} / ${r}`:x===a&&f?f:x===r&&v?v:void 0,P=n.jsx("input",{type:"range",className:ke("slider",`slider--${l}`,D&&"slider--static",!p&&!m&&h),min:a,max:r,step:s,value:x,disabled:u,readOnly:D,tabIndex:D?-1:void 0,"aria-label":c,"aria-valuetext":T,"aria-orientation":l,onChange:E,style:R});if(!p&&!m)return P;const M=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:f??a}),ee=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:v??r}),Q=m?n.jsxs("div",{className:ke("slider-track-group",`slider-track-group--${l}`,!p&&h),children:[A?ee:M,P,A?M:ee]}):P;if(!p)return Q;const F=g??(A?"bottom":"right"),Z=`${Math.round(r>a?(x-a)/(r-a)*100:0)}%`,L=C?C(x):p==="percent"?Z:p==="count"?`${x} / ${r}`:String(x),V=n.jsx("span",{className:"slider-wrap__value body-3b",children:L});return n.jsxs("div",{className:ke("slider-wrap",`slider-wrap--${l}`,`slider-wrap--label-${F}`,`slider-wrap--align-${_}`,h),children:[Q,V]})}const a4=.86,r4=250,Yo=(e,t,a,r)=>Math.round(Math.min(r,Math.max(a,e-t))),Zo=(e,t,a,r)=>{const s=Yo(e,t,a,r);return`${s<0?"-":"+"}${Math.abs(s)} dB`};function Xo({analyser:e,audioElement:t,orientation:a="horizontal",length:r,label:s,labelPos:l,labelAlign:i="right",floorDb:u=-60,refDb:c=-35,displayMin:d=-5,displayMax:h=25,className:p,ariaLabel:C}){const g=o.useRef(null),_=o.useRef(null),m=o.useRef(null),f=o.useRef(null),[v,b]=o.useState(null);o.useEffect(()=>{const x=P=>{const M=Zo(P,c,d,h);m.current&&(m.current.textContent=M);const ee=g.current;ee&&(ee.setAttribute("aria-valuenow",String(Yo(P,c,d,h))),ee.setAttribute("aria-valuetext",M))},N=e??K1(t)??(v&&v.el===t?v.node:null),A=_.current;if(!N||!A){A?.style.setProperty("--meter-level","0"),x(u);let P=!1;return!e&&t&&lr(t).then(M=>{!P&&M&&b({el:t,node:M})}),()=>{P=!0}}oo();const D=new Float32Array(N.fftSize);let E=0,k=0,R=0,$=0,G=null;const T=P=>{const M=Y1(N,D);E=M>E?M:E*a4;const ee=E>1e-5?20*Math.log10(E):-1/0,Q=Math.max(u,ee),F=Q-c,Z=Math.min(1,Math.max(0,(F-d)/(h-d)));if(A.style.setProperty("--meter-level",Z.toFixed(3)),k+=Q,R+=1,P-$>=r4){const L=k/R;G=G==null?L:G*.6+L*.4,x(G),k=0,R=0,$=P}f.current=requestAnimationFrame(T)};return f.current=requestAnimationFrame(T),()=>{f.current!=null&&cancelAnimationFrame(f.current),f.current=null}},[e,t,v,u,c,d,h]);const w=typeof r=="number"?`${r}px`:r,y=n.jsx("div",{className:"audio-meter__track",style:w?a==="vertical"?{height:w}:{width:w}:{},children:n.jsx("div",{ref:_,className:"audio-meter__fill"})}),B=l??(a==="vertical"?"bottom":"right");return n.jsxs("div",{ref:g,className:ke("audio-meter",`audio-meter--${a}`,s&&`audio-meter--label-${B}`,s&&`audio-meter--align-${i}`,p),role:"meter","aria-label":C,"aria-valuemin":d,"aria-valuemax":h,"aria-valuenow":Yo(u,c,d,h),"aria-valuetext":Zo(u,c,d,h),children:[y,s&&n.jsx("span",{ref:m,className:"audio-meter__value caption-2",children:Zo(u,c,d,h)})]})}const Ku=260;function Yu({message:e,position:t,duration:a,onClose:r}){const[s,l]=o.useState(!1),[i,u]=o.useState(!1),c=o.useRef(i),d=o.useRef(s);o.useEffect(()=>{c.current=i},[i]),o.useEffect(()=>{d.current=s},[s]);const h=o.useRef(null),p=o.useRef(""),C=o.useRef(r);o.useEffect(()=>{C.current=r});const g=a,_=o.useRef(null),m=o.useRef(0),f=o.useRef(0),v=o.useRef(!1),b=o.useRef(null),w=o.useRef(null),y=o.useRef(null),B=o.useRef(null),x=o.useRef(()=>{});x.current=D=>{D<0||(m.current=Date.now(),f.current=D,_.current=setTimeout(()=>{_.current=null,l(!1),b.current=setTimeout(()=>{u(!1);try{C.current()}catch{}},Ku)},D))};const N=o.useCallback(()=>{v.current||!_.current||(v.current=!0,clearTimeout(_.current),_.current=null,f.current=Math.max(0,f.current-(Date.now()-m.current)))},[]),A=o.useCallback(()=>{v.current&&(v.current=!1,x.current(f.current))},[]);return o.useEffect(()=>{if(e!==p.current&&(_.current&&(clearTimeout(_.current),_.current=null),b.current&&(clearTimeout(b.current),b.current=null)),e){if(d.current)return g>0&&!_.current&&(v.current?f.current=g:x.current(g)),p.current=e,()=>{_.current&&(clearTimeout(_.current),_.current=null),b.current&&(clearTimeout(b.current),b.current=null)};const D=()=>{const E=h.current;if(E)try{E.classList.remove("is-visible"),E.style.transition="none",t==="top"?E.style.transform="translateX(-50%) translateY(-16px)":E.style.transform="translateX(-50%) translateY(16px)",E.style.opacity="0",E.offsetWidth,E.style.transition="",E.classList.add("is-visible"),B.current&&clearTimeout(B.current),B.current=setTimeout(()=>{B.current=null;try{E.style.opacity="",E.style.transform="",E.style.transition=""}catch{}},60)}catch{}};c.current?(D(),l(!0)):(u(!0),w.current=requestAnimationFrame(()=>{y.current=requestAnimationFrame(()=>{D(),l(!0)})})),g>0&&(v.current=!1,x.current(g))}else l(!1),b.current=setTimeout(()=>u(!1),Ku);return p.current=e,()=>{_.current&&clearTimeout(_.current),b.current&&clearTimeout(b.current),w.current&&cancelAnimationFrame(w.current),y.current&&cancelAnimationFrame(y.current),B.current&&clearTimeout(B.current),_.current=null,b.current=null,w.current=null,y.current=null,B.current=null}},[e,g,t]),{mounted:i,showing:s,popupRef:h,pause:N,resume:A}}function va({message:e="",position:t="top",type:a="normal",onClose:r=()=>{},duration:s=2e3}){const{mounted:l,showing:i,popupRef:u,pause:c,resume:d}=Yu({message:e,position:t,duration:s,onClose:r}),h=o.useRef(null),[p,C]=o.useState(!1);if(o.useEffect(()=>{i?C(!0):l||C(!1)},[i,l]),!l)return null;const g=a==="notice"||a==="warning"?a:"normal",_=n.jsx("div",{ref:u,className:`toast toast--${t} ${i?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:m=>{h.current=m.pointerType},onMouseEnter:()=>{h.current!=="touch"&&c()},onMouseLeave:d,onFocusCapture:c,onBlurCapture:d,children:n.jsx("div",{className:`toast__inner toast__inner--${g} body-2`,"aria-hidden":p||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?dn.createPortal(_,document.body):_}const o4=24;function s4({value:e,max:t=100,size:a=8,color:r,trackColor:s,label:l,formatValue:i,labelPos:u,labelAlign:c="right",ariaLabel:d,className:h}){const p=Number.isFinite(t)&&t>0?t:1,C=Math.max(0,Math.min(Number.isFinite(e)?e:0,p)),g=C/p*100,_=Number.isFinite(t)&&t>0?t:0,m=u??(a>=o4?"inside":"bottom"),f=m==="center"?"inside":m,v=f==="inside"&&(c==="left"?g>=15:c==="center"?g>=50:g>=85),b={};return r&&(b["--progress-bar-fill"]=r),s&&(b["--progress-bar-track"]=s),n.jsxs("div",{className:ke("progress-bar",`progress-bar--${a}`,`progress-bar--label-${f}`,l&&`progress-bar--align-${c}`,l&&v&&"progress-bar--label-on-fill",h),style:b,children:[n.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":C,"aria-valuemin":0,"aria-valuemax":_,"aria-valuetext":l?i?i(C):l==="percent"?void 0:l==="raw"?String(C):`${C} / ${_}`:void 0,"aria-label":d,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${g}%`}})}),l&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(C):l==="percent"?`${Math.round(g)}%`:l==="raw"?String(C):`${C} / ${_}`})]})}const Zu={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},l4="rgba(255, 255, 255, 0.16)";function Xu({max:e,index:t,inactiveBg:a,inactiveColor:r,transparent:s,variant:l="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=xe.useTranslation(),d=yn("(max-width: 767px)");if(!Number.isInteger(e)||e<=0)return null;const h=Number.isInteger(t)?Math.max(0,Math.min(t,e-1)):0,p=u??c("progress.steps",{current:h+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),C={};if(a&&(C["--pi-inactive-bg"]=a),r&&(C["--pi-inactive-color"]=r),s&&(a||(C["--pi-inactive-bg"]=l4),r||(C["--pi-inactive-color"]="var(--color-white)")),l==="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:Zu,children:p}),Array.from({length:e}).map((_,m)=>n.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${m<h?" done":m===h?" active":""}`},m))]});const g=i?n.jsx("span",{role:"status",style:Zu,children:p}):null;return d?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:C,role:"list","aria-label":p,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[h+1," / ",e]})}),g]}):n.jsxs(n.Fragment,{children:[g,n.jsx("div",{className:"progress-indicator",style:C,role:"list","aria-label":p,children:Array.from({length:e}).map((_,m)=>n.jsx("span",{role:"listitem","aria-current":m===h?"step":void 0,className:`progress-indicator-dot ${m<h?" done":m===h?" active":""} body-3`,children:m+1},m))})]})}function i4(e){if(!e)return[];const t=[];let a=0,r="";for(const s of e.trim()){if(s==="("?a++:s===")"&&a--,/\s/.test(s)&&a===0){r&&(t.push(r),r="");continue}r+=s}return r&&t.push(r),t}function u4(e,t,a=0){const r=Array.from({length:Math.max(0,t)},()=>0);for(const s of e){let l=0;for(const i of s){if(l>=r.length)break;const u=Ju(i.span),c=Math.min(u,r.length-l);if(c===1)r[l]=Math.max(r[l],i.width);else{const d=Math.max(0,(i.width-a*(c-1))/c);for(let h=l;h<l+c;h++)r[h]=Math.max(r[h],d)}l+=c}}return r}function Ju(e){const t=typeof e=="number"?e:parseInt(String(e??""),10);return Number.isFinite(t)&&t>=1?Math.floor(t):1}function c4(e,t){const a=/span\s+(\d+)/.exec(`${e??""} ${t??""}`);return a?Ju(parseInt(a[1],10)):1}function d4(e,t){const{isFixed:a,floorOf:r,containerWidth:s}=t,l=e.reduce((p,C,g)=>p+(a(g)?C:0),0),i=e.reduce((p,C,g)=>p+(a(g)?0:C),0),u=s-l;if(!(s>0&&i>0&&u>0))return[...e];const c=u/i,d=e.map((p,C)=>a(C)?p:Math.max(r(C),Math.round(p*c))),h=Math.round(u-d.reduce((p,C,g)=>p+(a(g)?0:C),0));if(h!==0){let p=-1;d.forEach((C,g)=>{!a(g)&&(p<0||C>d[p])&&(p=g)}),p>=0&&(d[p]=Math.max(r(p),d[p]+h))}return d}const p4=16;function h4(e,t=p4){return e.map(a=>{const r=a.sortable&&!a.sorted;return Math.max(a.declaredMin,Math.ceil(a.headWidth+(r?t:0)))})}function m4({children:e,className:t,style:a,span:r,rowLabel:s,onRowClick:l}){const i=r&&r>1?{gridColumn:`span ${r}`,...a}:a;return n.jsx("div",{role:"cell",className:t?`table-cell ${t}`:"table-cell",style:i,"aria-colspan":r&&r>1?r:void 0,children:s&&l?n.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":s,children:e}):e})}function Jo({variant:e="default",children:t,className:a,draggable:r,onClick:s,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:d,colSpan:h,describedBy:p,rowHasButton:C}){const g=o.useCallback(_=>{s&&_.target===_.currentTarget&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),s())},[s]);return e==="loading"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--loading",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:n.jsx(Ca,{size:28})})})}):e==="empty"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--empty body-3",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:t})})}):n.jsxs("div",{role:"presentation",className:"table-row-wrap",children:[n.jsx("div",{className:a?`table-row ${a}`:"table-row",draggable:r,onClick:s,onKeyDown:s?g:void 0,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:s&&!C?0:void 0,"aria-describedby":s&&!C?p:void 0,children:t}),d&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row-expand__cell",children:d})})]})}function C4({dir:e}){return n.jsx(e==="asc"?tl:el,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function f4({children:e,onClick:t,className:a,sortDir:r,ariaSort:s,onResizeStart:l}){const i=n.jsxs(n.Fragment,{children:[e,r&&n.jsx(C4,{dir:r})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":s,className:ke("table-field body-3",a,r?"table-field--sorted":"",l?"table-field--resizable":""),children:[t?n.jsx("button",{type:"button",className:"table-field__button",children:i}):i,l&&n.jsx("span",{className:"table-field__resizer",onPointerDown:l,onClick:u=>u.stopPropagation(),"aria-hidden":"true"})]})}function Qu(e){return e&&e!=="left"?`table-col--${e}`:void 0}function Qo({fields:e=[],sort:t,sortable:a=!0,headerGroups:r,items:s=[],renderRow:l,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:d,onRowDragStart:h,onRowDragEnd:p,draggingId:C,gridTemplateColumns:g,mobileGridTemplateColumns:_,resizable:m=!0,resizeMode:f="grow",resizeStorageKey:v,size:b="small",title:w,icon:y,count:B,collapsed:x=!1,onToggleCollapse:N,headerActions:A,empty:D,loading:E,dragOver:k=!1,onDragOver:R,onDragLeave:$,onDrop:G,renderExpandedRow:T,expandedId:P}){const{t:M}=xe.useTranslation(),ee=o.useId(),Q=`table-title-${ee}`,F=`table-row-hint-${ee}`,[Z,L]=o.useState(null),V=o.useCallback((oe,ge)=>{const Oe=e[ge];if(!Oe)return;if(Oe.sortValue)return Oe.sortValue(oe);if(Oe.sortKey)return oe[Oe.sortKey];const Je=l(oe)[ge]?.content;return typeof Je=="string"||typeof Je=="number"?Je:void 0},[e,l]),U=!t&&a&&!e.some(oe=>oe.sortDir!==void 0||oe.onClick),q=o.useCallback(oe=>{const ge=e[oe];if(!ge||ge.sortable===!1)return!1;if(ge.sortValue||ge.sortKey)return!0;const Oe=s[0];return Oe!==void 0&&V(Oe,oe)!==void 0},[e,s,V]),j=o.useMemo(()=>t?e.map(oe=>{if(!oe.sortKey||oe.sortDir!==void 0)return oe;const ge=t.field(String(oe.label??""),oe.sortKey);return{...oe,sortDir:ge.sortDir,onClick:oe.onClick??ge.onClick}}):U?e.map((oe,ge)=>q(ge)?{...oe,sortDir:Z?.index===ge?Z.asc?"asc":"desc":null,onClick:()=>L(Oe=>Oe?.index===ge?{index:ge,asc:!Oe.asc}:{index:ge,asc:!0})}:oe):e,[e,t,U,Z,q]),I=o.useMemo(()=>{if(!U||!Z)return s;const{index:oe,asc:ge}=Z;return[...s].sort((Oe,Je)=>gr(V(Oe,oe),V(Je,oe),ge))},[s,U,Z,V]),O=yn("(max-width: 767px)"),Y=_&&O?_:null,K=m&&!O,ie=o.useRef(K);ie.current=K;const te=48,ne=40,z=o.useRef(()=>te),ae=v?`table-cols:${v}`:null,H=o.useRef(null),W=o.useRef(null),ue=o.useRef(null),Be=o.useRef(null),[ye,he]=o.useState(!1),[Ne,Re]=o.useState(0),Me=o.useCallback(()=>{const oe=ue.current;if(!oe)return;const ge=Be.current,Oe=H.current;if(ge&&(ge.style.minWidth="",Oe)){const Je=Oe.scrollWidth,et=ie.current?ne:0;ge.style.minWidth=Je>oe.clientWidth+1?`${Je+et}px`:""}he(oe.scrollWidth>oe.clientWidth+1),Re(oe.clientWidth)},[]),se=o.useCallback((oe,ge)=>{const Oe=oe.current;Oe&&W.current&&W.current.unobserve(Oe),oe.current=ge,ge?(!W.current&&typeof ResizeObserver<"u"&&(W.current=new ResizeObserver(()=>Me())),W.current?.observe(ge)):!ue.current&&!Be.current&&(W.current?.disconnect(),W.current=null),Me()},[Me]),Ee=o.useCallback(oe=>se(ue,oe),[se]),$e=o.useCallback(oe=>se(Be,oe),[se]);o.useEffect(()=>{Me()}),o.useEffect(()=>{if(typeof window>"u")return;const oe=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>Me()):null;return window.addEventListener("resize",Me),()=>{oe!=null&&cancelAnimationFrame(oe),window.removeEventListener("resize",Me)}},[Me]);const Ae=o.useRef(()=>!1),Fe=o.useRef([]),Ve=o.useRef(null),ct=oe=>{if(!oe||typeof window>"u")return null;try{const ge=JSON.parse(window.localStorage.getItem(oe)??"null");return Array.isArray(ge)&&ge.length>0&&ge.every(Oe=>typeof Oe=="number"&&Number.isFinite(Oe)&&Oe>0)?ge:null}catch{return null}},[ot,Xe]=o.useState(()=>ct(ae)),[ft,Le]=o.useState(ae),[qe,Se]=o.useState(()=>ct(ae)!==null);if(ft!==ae){Le(ae);const oe=ct(ae);Xe(oe),Se(oe!==null)}const He=o.useRef(ot);o.useEffect(()=>{He.current=ot},[ot]);const Qe=o.useCallback(oe=>{const ge=Ve.current;if(!ge)return;const Oe=He.current;if(Oe){const Je=[...Oe],et=()=>te;if(ge.next!=null&&ge.startWNext!=null){const Ge=oe.clientX-ge.startX,Lt=Math.max(et()-ge.startW,Math.min(ge.startWNext-et(),Ge));Je[ge.index]=ge.startW+Lt,Je[ge.next]=ge.startWNext-Lt}else Je[ge.index]=Math.max(et(),ge.startW+(oe.clientX-ge.startX));He.current=Je,Xe(Je)}},[]),it=o.useCallback(()=>{if(Ve.current=null,window.removeEventListener("pointermove",Qe),window.removeEventListener("pointerup",it),window.removeEventListener("pointercancel",it),document.body.style.cursor="",document.body.style.userSelect="",ae&&He.current)try{window.localStorage.setItem(ae,JSON.stringify(He.current))}catch{}},[Qe,ae]),bt=o.useCallback((oe,ge)=>{ge.preventDefault(),ge.stopPropagation();const Oe=H.current;if(!Oe)return;const Je=Array.from(Oe.children).map(Ge=>Ge.getBoundingClientRect().width),et=f==="fit"?j.findIndex((Ge,Lt)=>Lt>oe&&Ge.resizable!==!1):-1;Ve.current=et>=0?{index:oe,startX:ge.clientX,startW:Je[oe],next:et,startWNext:Je[et]}:{index:oe,startX:ge.clientX,startW:Je[oe]},He.current=Je,Xe(Je),Se(!0),window.addEventListener("pointermove",Qe),window.addEventListener("pointerup",it),window.addEventListener("pointercancel",it),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[Qe,it,f,j]),wt=o.useCallback(()=>{const oe=H.current,ge=oe?.closest(".table-wrap");if(!oe||!ge)return null;const Oe=ge.style.getPropertyValue("--table-grid-cols");ge.style.setProperty("--table-grid-cols",j.map(()=>"max-content").join(" "));const Je=Array.from(ge.querySelectorAll(".table-row")).filter(jt=>!jt.classList.contains("table-row--loading")&&!jt.classList.contains("table-row--empty")),et=jt=>Array.from(jt.children).map($t=>{const qt=window.getComputedStyle($t);return{width:$t.getBoundingClientRect().width,span:c4(qt.gridColumnStart,qt.gridColumnEnd)}}),Ge=parseFloat(window.getComputedStyle(oe).columnGap)||0,Lt=Je.map(et),nn=et(oe),fn=u4([nn,...Lt],j.length,Ge),Pt=h4(j.map((jt,$t)=>({declaredMin:z.current($t),headWidth:nn[$t]?.width??0,sortable:jt.sortDir!==void 0||!!jt.onClick,sorted:!!jt.sortDir}))),Wt=jt=>Pt[jt]??z.current(jt),Ht=j.map((jt,$t)=>{const qt=fn[$t],Jt=Ae.current($t)?parseFloat(Fe.current[$t]):NaN;return Number.isFinite(Jt)&&Math.ceil(qt)>Jt&&kt(`table-fixed-col-overflow:${$t}:${Jt}`,`[ihabdevteam-core] Table \uC758 ${$t+1}\uBC88\uC9F8 \uC5F4\uC744 ${Jt}px \uB85C \uC815\uD574 \uB450\uC5C8\uB294\uB370 \uC548\uC758 \uB0B4\uC6A9\uC740 ${Math.ceil(qt)}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(qt)}px \uC774\uC0C1\uC73C\uB85C \uB298\uB9AC\uC138\uC694.`),Number.isFinite(Jt)?Jt:Math.max(z.current($t),Math.ceil(qt))}),It=window.getComputedStyle(oe),kn=(parseFloat(It.paddingLeft)||0)+(parseFloat(It.paddingRight)||0),an=ge.clientWidth-kn;return Oe?ge.style.setProperty("--table-grid-cols",Oe):ge.style.removeProperty("--table-grid-cols"),d4(Ht,{isFixed:jt=>Ae.current(jt),floorOf:Wt,containerWidth:an})},[j,f]),Et=(oe,ge)=>oe!==null&&oe.length===ge.length&&oe.every((Oe,Je)=>Oe===ge[Je]),at=o.useRef(wt);o.useEffect(()=>{at.current=wt});const[st,Bt]=o.useState(0),At=I.length>0,Mt=`${ae??""}|${st}|${j.length}|${Ne}`,Rt=!qe&&K&&ae!==null&&!E?`${Mt}|${At?1:0}`:null,_t=o.useRef(null);o.useEffect(()=>{if(Rt===null||!At||_t.current===Mt)return;const oe=at.current();oe&&(_t.current=Mt,Xe(ge=>Et(ge,oe)?ge:oe))},[Rt]);const dt=o.useCallback(()=>{if(ae)try{window.localStorage.removeItem(ae)}catch{}Se(!1);const oe=at.current();Xe(oe),He.current=oe,Bt(ge=>ge+1)},[ae]);o.useEffect(()=>()=>{Ve.current&&(window.removeEventListener("pointermove",Qe),window.removeEventListener("pointerup",it),window.removeEventListener("pointercancel",it),document.body.style.cursor="",document.body.style.userSelect="")},[Qe,it]);const ut=j.length>0&&j.every(oe=>oe.width!=null)?j.map(oe=>typeof oe.width=="number"?`${oe.width}px`:String(oe.width)).join(" "):null;j.some(oe=>oe.width!=null)&&!ut&&kt(`table-field-width:${j.map(oe=>oe.width==null?"-":"w").join("")}`,"[ihabdevteam-core] Table \uC758 fields \uC911 \uC77C\uBD80\uC5D0\uB9CC width \uAC00 \uC788\uC2B5\uB2C8\uB2E4. **\uBAA8\uB4E0 \uC5F4\uC5D0 \uC801\uC5B4\uC57C** \uC4F0\uC785\uB2C8\uB2E4 \u2014 \uC9C0\uAE08\uC740 gridTemplateColumns \uB97C \uC501\uB2C8\uB2E4. \uD55C \uC5F4\uB9CC \uACE0\uC815\uD558\uACE0 \uC2F6\uC73C\uBA74 \uB098\uBA38\uC9C0\uC5D0 `minmax(0, 1fr)` \uCC98\uB7FC \uC801\uC5B4 \uC8FC\uC138\uC694."),ut&&g&&kt("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 lt=g??ut??void 0,xt=i4(lt),pt=xt.filter(oe=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(oe));pt.length>0&&kt(`table-content-track:${g}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${pt.join(", ")})\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uBA38\uB9AC\uC640 \uBAB8\uD1B5\uC740 \uC11C\uB85C \uB2E4\uB978 \uACA9\uC790\uB77C \uADF8 \uD2B8\uB799\uC774 \uAC01\uC790 \uB2E4\uB974\uAC8C \uD480\uB824 \uC5F4\uC774 \uC5B4\uAE0B\uB0A9\uB2C8\uB2E4. px \uC774\uB098 fr \uC744 \uC4F0\uC138\uC694. (\uBC1B\uC740 \uAC12: ${g})`);const be=j.findIndex(oe=>!!oe.sortDir);j.filter(oe=>!!oe.sortDir).length>1&&kt("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 ve=oe=>oe===be?j[oe].sortDir==="asc"?"ascending":"descending":j[oe].onClick?"none":void 0,we=oe=>/^\d+(\.\d+)?px$/.test(xt[oe]??""),tt=oe=>{const ge=xt[oe]??"",Oe=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(ge)??/^(\d+(?:\.\d+)?)px$/.exec(ge);return Oe?parseFloat(Oe[1]):te};Ae.current=we,z.current=tt,Fe.current=xt;const gt=oe=>f==="fit"&&!we(oe)?"fr":"px",Nt=ot&&ot.length===j.length&&!O,yt=Y??(Nt?j.map((oe,ge)=>oe.resizable===!1&&xt[ge]?xt[ge]:`${ot[ge]}${gt(ge)}`).join(" "):lt),Te=yt?{"--table-grid-cols":yt}:void 0,nt=w!==void 0;return n.jsxs("div",{ref:Ee,className:`table-wrap table-wrap--${b}${K?" table-wrap--resizable":""}${k?" table-wrap--dragover":""}${x?" table-wrap--collapsed":""}`,style:Te,onDragOver:R,onDragLeave:$,onDrop:G,tabIndex:ye?0:void 0,role:ye?"region":void 0,"aria-label":ye?typeof w=="string"?w:M("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:F,className:"table-row-hint",children:M("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:$e,role:"table","aria-labelledby":nt&&typeof w=="string"?Q:void 0,className:"table body-2",children:[nt&&n.jsxs("div",{className:ke("table-header",N&&"table-header--clickable"),onClick:N,role:"caption",children:[N&&n.jsx(Ce,{htmlType:"button",size:zt,type:"dot",variant:"transparent-gray",useBorder:!1,icon:x?"chevron-right":"chevron-down",ariaLabel:x?M("common.expand","\uD3BC\uCE58\uAE30"):M("common.collapse","\uC811\uAE30"),ariaExpanded:!x,className:"table-header__chevron"}),y&&n.jsx(rt,{icon:y,label:typeof w=="string"?w:void 0,className:"table-header__icon"}),n.jsx("span",{id:Q,className:"table-header__title h5b",children:w}),B!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:B}),A&&n.jsx("span",{className:"table-header__actions",onClick:oe=>oe.stopPropagation(),children:A})]}),!x&&n.jsxs(n.Fragment,{children:[r&&r.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:r.map((oe,ge)=>n.jsx("div",{role:"columnheader","aria-colspan":oe.span,className:ke("table-field body-3",oe.className),style:{gridColumn:`span ${oe.span}`},children:oe.label},ge))}),n.jsxs("div",{role:"presentation",className:ke("table-fields-strip",K&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:H,children:j.map((oe,ge)=>n.jsx(f4,{onClick:oe.onClick,className:ke(oe.className,Qu(oe.align)),sortDir:oe.sortDir,ariaSort:ve(ge),onResizeStart:K&&ge<j.length-1&&oe.resizable!==!1&&(f!=="fit"||j.some((Oe,Je)=>Je>ge&&Oe.resizable!==!1))?Oe=>bt(ge,Oe):void 0,children:oe.label},ge))}),K&&n.jsx("div",{className:"table-fields__reset-dock",children:n.jsx(Ce,{htmlType:"button",size:zt,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:M("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:M("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:dt})})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:E?n.jsx(Jo,{variant:"loading",colSpan:j.length||void 0}):I.length===0&&D?n.jsx(Jo,{variant:"empty",colSpan:j.length||void 0,children:D}):I.map((oe,ge)=>{const Oe=C!=null&&oe.id===C,Je=!!i&&(u?u(oe):!0),et=P!=null&&oe.id!=null&&(P instanceof Set?P.has(oe.id)||[...P].some(Ge=>String(Ge)===String(oe.id)):String(oe.id)===String(P));return n.jsx(Jo,{className:`${Je?" table-row--clickable":""}${h?" table-row--draggable":""}${Oe?" table-row--dragging":""}`.trim(),draggable:!!h,onClick:Je?()=>i(oe):void 0,colSpan:j.length||void 0,rowHasButton:l(oe).some(Ge=>!!Ge.rowLabel),describedBy:F,onMouseEnter:c?Ge=>c(oe,Ge):void 0,onMouseLeave:d?Ge=>d(oe,Ge):void 0,onDragStart:h?Ge=>h(oe,Ge):void 0,onDragEnd:p?Ge=>p(oe,Ge):void 0,expandedContent:et&&T?T(oe):void 0,children:l(oe).map((Ge,Lt)=>n.jsx(m4,{className:ke(Ge.className,Qu(j[Lt]?.align)),style:Ge.style,span:Ge.span,rowLabel:Je?Ge.rowLabel:void 0,onRowClick:Je?()=>i(oe):void 0,children:Ge.content},Lt))},oe.id!=null?`${typeof oe.id}:${oe.id}`:`__idx:${ge}`)})})]})]})]})}function ec(e,t){return t!=="wornAt"?String(e[t]??""):Av(e.wornYear,e.wornMonth,e.wornDay)}function b4({rows:e,loading:t,onSelect:a,onDelete:r,onWear:s,onRelease:l,onAdd:i}){const{t:u,i18n:c}=xe.useTranslation(),d=f=>f==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:h,field:p}=$y(),C=o.useMemo(()=>{if(!h)return e;const{key:f,asc:v}=h;return[...e].sort((b,w)=>{if(f==="worn"){const y=Number(w.worn)-Number(b.worn);return v?y:-y}return gr(ec(b,f),ec(w,f),v)})},[e,h]),{pageRows:g,pageSizeProps:_,paginationProps:m}=Ly(C,h);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(Wo,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:_,pagination:m,actions:i&&n.jsx(Ce,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),n.jsx(Qo,{loading:t,resizable:!0,resizeMode:"fit",resizeStorageKey:"customer-device-history-v2",fields:[{...p(u("customers.device.wearingNow","\uCC29\uC6A9"),"worn"),resizable:!1},p(u("device.direction.label","\uBC29\uD5A5"),"side"),p(u("device.deviceType","\uC885\uB958"),"device"),p(u("device.brand","\uBE0C\uB79C\uB4DC"),"brand"),p(u("device.fitType","\uCC29\uC6A9\uD615\uD0DC"),"fitType"),p(u("device.productName","\uC81C\uD488\uBA85"),"productName"),p(u("device.wornDate","\uCC29\uC6A9\uC77C"),"wornAt"),...r?[{label:"",resizable:!1}]:[]],items:g.map((f,v)=>({id:f.id??`${f.side}-${v}`,row:f})),gridTemplateColumns:`56px 110px 110px minmax(120px, 1fr) 100px minmax(120px, 1fr) 110px${r?" 80px":""}`,renderRow:({row:f})=>[{content:n.jsx("span",{className:"dlp-worn-check",onClick:v=>v.stopPropagation(),children:n.jsx(Oo,{checked:f.worn,disabled:f.worn?!l:!s,ariaLabel:f.worn?u("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):u("customers.device.wear","\uCC29\uC6A9"),onChange:v=>{v?s?.(f):l?.(f)}})})},{content:n.jsx("span",{children:d(f.side)})},{content:f.device?n.jsx(un,{size:"small",variant:ku(f.device),fill:"soft",label:Nu(f.device,u)}):n.jsx("span",{})},{content:n.jsx("span",{children:f.brand})},{content:n.jsx("span",{children:f.fitType||"-"})},{content:n.jsx("span",{children:f.productName||"-"})},{content:n.jsx("span",{className:"dlp-date",children:Io(f.wornYear,f.wornMonth,f.wornDay,c.language)||"-"})},...r?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(Ce,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:u("common.delete","\uC0AD\uC81C"),onClick:v=>{v?.stopPropagation(),r(f)}})})}]:[]],onRowClick:({row:f})=>a(f),empty:u("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function tc(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 g4(e,t){return new Date(e,t+1,0).getDate()}function y4(e,t){return new Date(e,t,1).getDay()}function v4({visits:e=[],onVisitClick:t,onVisitMove:a,onDayClick:r,today:s}){const{t:l,i18n:i}=xe.useTranslation(),u=o.useMemo(()=>l("calendar.dow",{returnObjects:!0}),[l]),c=cr(s),[d,h]=o.useState(()=>Number(c.slice(0,4))),[p,C]=o.useState(()=>Number(c.slice(5,7))-1),[g,_]=o.useState(null),m=o.useRef(null),f=o.useMemo(()=>{const x={};return e.forEach(N=>{x[N.date]||(x[N.date]=[]),x[N.date].push(N)}),x},[e]),v=o.useMemo(()=>{const x=g4(d,p),N=y4(d,p),A=[];for(let D=0;D<N;D++)A.push(null);for(let D=1;D<=x;D++)A.push(D);for(;A.length<35;)A.push(null);return A},[d,p]),b=o.useCallback(()=>{p===0?(h(x=>x-1),C(11)):C(x=>x-1)},[p]),w=o.useCallback(()=>{p===11?(h(x=>x+1),C(0)):C(x=>x+1)},[p]),y=x=>`${d}-${String(p+1).padStart(2,"0")}-${String(x).padStart(2,"0")}`,B=x=>y(x)===c;return n.jsxs("div",{children:[n.jsxs("div",{className:"calendar-nav",children:[n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:b,"aria-label":l("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(rt,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:co(l,i.language,d,p+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:w,"aria-label":l("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(rt,{icon:"chevron-right",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsxs("div",{className:"calendar-nav__legend",children:[n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--main"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.visited","\uBC29\uBB38")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--sub"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.scheduled","\uC608\uC57D")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--disabled"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]})]}),n.jsxs("div",{className:"calendar-grid",children:[u.map(x=>n.jsx("div",{className:"calendar-day-header body-3",children:x},x)),v.map((x,N)=>{if(x===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${N}`);const A=x,D=y(A),E=f[D]??[],k=ql(D,i.language),R=g===D;return n.jsxs("div",{className:`calendar-cell${B(A)?" today":""}${R?" drag-over":""}${r?" calendar-cell--clickable":""}`,role:r?"button":void 0,tabIndex:r?0:void 0,"aria-label":r?l("calendar.addOnDate",{date:D}):void 0,"aria-current":B(A)?"date":void 0,onClick:r?()=>r(D):void 0,onKeyDown:r?$=>{$.target===$.currentTarget&&($.key!=="Enter"&&$.key!==" "||($.preventDefault(),r(D)))}:void 0,onDragOver:a?$=>{$.preventDefault(),_(D)}:void 0,onDragLeave:a?$=>{$.currentTarget.contains($.relatedTarget)||_(null)}:void 0,onDrop:a?$=>{$.preventDefault(),m.current!=null&&(a(m.current,D),m.current=null),_(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:A}),E.length>0&&(()=>{const $=[{key:"visited",label:l("calendar.legend.visited","\uBC29\uBB38"),count:E.filter(T=>(T.status??"visited")==="visited").length},{key:"scheduled",label:l("calendar.legend.scheduled","\uC608\uC57D"),count:E.filter(T=>T.status==="scheduled").length},{key:"noVisit",label:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:E.filter(T=>T.status==="noVisit").length}].filter(T=>T.count>0),G=$.length===1&&$[0].key==="visited"?l("calendar.visitCount",{count:E.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):$.map(T=>l("calendar.statusCount",{label:T.label,count:T.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return n.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${k} ${G}`,children:[$.map(T=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${T.key}`,"aria-hidden":"true"},T.key)),E.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:E.map(($,G)=>n.jsxs("div",{draggable:!!a,className:`calendar-visit-badge${$.status==="noVisit"?" calendar-visit-badge--no-visit":$.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${a?" calendar-visit-badge--draggable":""}`,onDragStart:a?T=>{m.current=$.id,T.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:a?()=>{m.current=null,_(null)}:void 0,onClick:t?T=>{T.stopPropagation(),t($)}:void 0,...tc(t?()=>t($):void 0),"aria-label":[k,$.time?Zl($.time,l):null,$.customer,l($.status==="noVisit"?"calendar.legend.noVisit":$.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[$.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Zl($.time,l)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:$.customer}),$.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},$.id??G))})]},A)})]})]})}const _4={page:"h3",pagePopup:"h4",popup:"h5"};function _a({type:e="page",title:t,headingLevel:a=2,icon:r,action:s,disc:l,children:i,inGrid:u=!1,className:c,style:d}){const h=_4[e],p=t||l||s||r,C=a?`h${a}`:"div";return n.jsxs("div",{className:ke("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(rt,{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 ${h}`,children:t}),l&&n.jsx("div",{className:"section__disc body-3",children:l})]})]}),s&&n.jsx("div",{className:"section__action",children:s})]}),i]})}let es=null,nc=!1;function ac(){if(nc||typeof document>"u")return;nc=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(es="keyboard")},!0);const e=()=>{es="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}ac();function wr(){return ac(),es==="keyboard"}const Br=20;function x4(e){const{t}=xe.useTranslation(),{type:a,trainingDatas:r,depth:s,renderPopup:l,completedIds:i,selectedIds:u,onItemComplete:c,size:d,useDescriptionTooltip:h,onRemove:p,onMore:C,sectionType:g="page"}=e||{},[,_]=o.useState(0),m=typeof r<"u"?Array.isArray(r)?r:[]:[],f=m.length,[v,b]=o.useState(Math.min(f,Br)),w=o.useMemo(()=>Array.isArray(s)?[...s,a?.label].filter(Boolean).join(" \xB7 "):[s||"",a?.label].filter(Boolean).join(" \xB7 "),[s,a?.label]);o.useEffect(()=>{b(Math.min(f,Br))},[f]),zi("speechear.data.updated",()=>_(N=>N+1));const y=o.useRef(null),B=o.useRef(null);function x(){const N=document.activeElement;B.current=wr()&&N&&N.closest?.(".training-block__more")?v:null,b(A=>Math.min(f,A+Br))}return o.useEffect(()=>{const N=B.current;if(N==null)return;B.current=null;const A=document.activeElement;A&&A!==document.body||y.current?.querySelectorAll(".training-block-button")[N]?.focus()},[v]),n.jsxs(_a,{type:g,title:a?.label,icon:a?.icon,disc:a?.desc,className:"training-block",children:[n.jsx("div",{className:"training-list",ref:y,children:(m||[]).slice(0,v).map((N,A)=>{const D=N;return n.jsx(Ro,{index:A,type:a,trainingData:D,depth:w,renderPopup:l,completedIds:i,selectedIds:u,size:d,useDescriptionTooltip:h,onRemove:typeof p=="function"&&u!=null&&D?.id!=null&&u.has(String(D.id))?()=>p(D):void 0,onComplete:typeof c=="function"&&D?.id!=null?()=>c(String(D.id)):void 0,onMore:typeof C=="function"?E=>C(D,E):void 0},D?.id!=null?`${a?.key||"t"}-${String(D.id)}`:`${a?.key||"t"}-${A}`)})}),f>Br&&v<f&&n.jsx("div",{className:"training-block__more",children:n.jsx(Ce,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:x,ariaLabel:t("common.loadMore","\uB354\uBCF4\uAE30"),label:t("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function w4(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 B4({gap:e=10,count:t,className:a,children:r}){const s=o.useRef(null),[l,i]=o.useState({width:0,card:0}),u=t??w4(r);o.useLayoutEffect(()=>{const C=s.current;if(!C)return;const g=()=>{const m=C.style.maxWidth;C.style.maxWidth="none";const f=C.clientWidth;C.style.maxWidth=m;const v=C.firstElementChild?.offsetWidth??0;i(b=>b.width===f&&b.card===v?b:{width:f,card:v})};if(g(),typeof ResizeObserver>"u")return;const _=new ResizeObserver(g);return _.observe(C),()=>_.disconnect()},[u,e]);const c=l.card>0?l.card:0,d=c>0?_f(l.width,c,e):0,h=d>0?xf(u,d):0,p={"--block-grid-gap":`${e}px`,...h>0?{"--block-grid-cols":h,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:s,className:ke("training-block-grid",h>0&&"training-block-grid--measured",a),style:p,"data-cols":h>0?h:void 0,children:r})}function ts(e){const t=o.useRef(null),a=o.useRef(e);a.current=e;const[r,s]=o.useState({url:e,loading:!!e,failed:!1}),l=r.url===e?r:{loading:!!e,failed:!1};o.useEffect(()=>{const c=t.current;s({url:e,failed:!1,loading:!!e&&!(c?.complete&&c.naturalWidth>0)})},[e]);const i=o.useCallback(()=>{a.current===e&&s({url:e,loading:!1,failed:!1})},[e]),u=o.useCallback(()=>{a.current===e&&s({url:e,loading:!1,failed:!0})},[e]);return{imgRef:t,loading:l.loading,failed:l.failed,hasImage:!!e&&!l.failed,onLoad:i,onError:u}}var A4='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 k4=A4,ns=o.forwardRef(function({item:e,disabled:t=!1,onPlayDone:a,selectable:r=!1,selected:s=!1,onSelect:l,flipDelay:i=0,hideLabel:u=!1,hideAudio:c=!1,orderRank:d=null},h){const{t:p}=xe.useTranslation(),C=e.word||e.title||"",g=t||!C,_=e.audio??e.sound??e.audioKey,m=e.subLabel||e.pronunciation||"",f=e.colloquialLabel||"",[v,b]=o.useState({label:C,subLabel:m,colloquialLabel:f,homonum:e.homonum});C&&(v.label!==C||v.subLabel!==m||v.colloquialLabel!==f||!Object.is(v.homonum,e.homonum))&&b({label:C,subLabel:m,colloquialLabel:f,homonum:e.homonum});const w=o.useRef(null),y=yn("(max-width: 767px)"),[B,x]=o.useState(!1),[N,A]=o.useState(!1),D=`${typeof _=="string"?_:_?.src??""}\0${C}`,[E,k]=o.useState({for:"",url:""}),R=E.for===D?E.url:"",$=Wl(),G=e.textOnly??(!e.image&&!!v.label&&!!$&&$.entries.length>0&&!$.byWord.has(v.label)),T=G?"":pa()?.(v.label,v.homonum)??e.image??"",{imgRef:P,loading:M,hasImage:ee,onLoad:Q,onError:F}=ts(T);o.useEffect(()=>{let Y=!1;return(async()=>{if(_){if(typeof _=="string"){if(_.startsWith("http")||_.includes("/")){k({for:D,url:_});return}}else if(typeof _=="object"&&!Array.isArray(_)){const ie=_.src;if(ie){k({for:D,url:ie});return}}}const K=ja();if(K&&C)try{const ie=await Promise.resolve(K(C));!Y&&ie&&k({for:D,url:ie})}catch{}})(),()=>{Y=!0}},[_,C,D]);const Z=o.useRef(!0),L=o.useRef(null);o.useEffect(()=>(Z.current=!0,()=>{Z.current=!1,L.current&&_r(L.current),L.current=null;try{w.current?.pause()}catch{}w.current=null}),[]);const V=o.useCallback(()=>new Promise(Y=>{if(typeof window<"u"&&window.speechSynthesis&&C){x(!0),window.speechSynthesis.cancel();const K=new SpeechSynthesisUtterance(C);K.lang="ko-KR",K.onend=()=>{x(!1);try{a?.()}catch{}Y()},K.onerror=()=>{x(!1),Y()},window.speechSynthesis.speak(K)}else Y()}),[C,a]),U=o.useCallback(Y=>{const K=Ya(Y,ie=>{if(x(!1),ie)try{a?.()}catch{}});return w.current=K.el,K.done},[a]),q=o.useCallback(async()=>{if(t||!Z.current)return;const Y=()=>{L.current===Y&&(L.current=null);try{w.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}x(!1)},K=Ka(Y);L.current=Y;try{window.speechSynthesis?.cancel()}catch{}try{if(R&&(x(!0),await U(R)))return;const ie=sr();if(ie&&C)try{A(!0);const te=await Promise.resolve(ie(C));if(!Z.current||L.current!==Y||(A(!1),te&&(x(!0),await U(te))))return}catch{}if(!Z.current||L.current!==Y)return;await V()}finally{L.current===Y&&A(!1),K(),L.current===Y&&(L.current=null)}},[t,R,C,U,V]);o.useImperativeHandle(h,()=>({play:()=>q()}),[q]);const j=Y=>Y.stopPropagation(),I=o.useCallback(Y=>{if(Y.stopPropagation(),!t){if(B){try{w.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}x(!1);return}q()}},[t,B,q]),O=ke("training-word-card",t?"training-word-card--disabled":"",g?"training-word-card--flipped":"",r?"training-word-card--selectable":"",s?"training-word-card--selected":"");return n.jsx("div",{className:O,onClick:r&&!t?l:void 0,role:r?"button":void 0,"aria-pressed":r?s:void 0,tabIndex:r&&!t?0:void 0,"aria-disabled":r&&t?!0:void 0,onKeyDown:r&&!t?Y=>{Y.target===Y.currentTarget&&(Y.key==="Enter"||Y.key===" "||Y.key==="Spacebar")&&(Y.preventDefault(),l?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:g?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[s&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:j,children:n.jsx(Dn,{size:40,position:"inline",animate:!0,icon:d!=null?void 0:"check",number:d??void 0,"aria-label":d!=null?p("training.nthSelected",{n:d}):p("training.selected","\uC120\uD0DD\uB428")})}),n.jsx("div",{className:"training-word-card__image-wrap",children:G?n.jsx("div",{className:"training-word-card__text-face",children:v.label}):ee?n.jsxs(n.Fragment,{children:[M&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:P,className:"training-word-card__image",src:T,alt:v.label||p("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:M?0:1},onLoad:Q,onError:F})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!G&&n.jsx("div",{className:"training-word-card__word",children:v.label}),v.subLabel&&n.jsxs("div",{className:"training-word-card__pronunciation",children:["[",v.subLabel,"]"]}),v.colloquialLabel&&n.jsxs("div",{className:"training-word-card__colloquial caption-1",children:["[",v.colloquialLabel,"]"]})]}),!c&&n.jsx("div",{className:"training-word-card__bottom",onClick:r?j:void 0,children:n.jsx(Ce,{htmlType:"button",size:y?40:48,type:y?"dot":"bar",icon:B?"pause":"play",label:y?void 0:p("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:B,loading:N,onClick:I,disabled:t,ariaLabel:p("training.playSound","\uC18C\uB9AC \uB4E3\uAE30")})})]}),n.jsx("div",{className:"training-word-card__back","aria-hidden":"true",children:n.jsx("span",{className:"training-word-card__disabled-symbol",style:{"--disabled-symbol-src":`url("${k4}")`}})})]})})});function Ar(e){return String(e)}const kr=["o","triangle","x"];function rc(e,t){return e===t?null:t}const oc={o:"circle",triangle:"triangle",x:"x"},sc={o:"main",triangle:"warn",x:"danger"};function N4(e){let t=0,a=0,r=0;for(const l of Object.values(e))l==="o"?t++:l==="triangle"?a++:l==="x"&&r++;const s=t+a+r;return{marked:s,o:t,triangle:a,x:r,rate:s===0?null:(t+a*.5)/s}}function as(e){const t={};for(const[a,r]of Object.entries(e))(r==="o"||r==="triangle"||r==="x")&&(t[a]=r);return t}function lc(e){const t=[];let a=0;for(const r of e)t.push(a),a+=r;return t}function E4(e,t){return!t&&e>0}const aa={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 D4(e="landscape"){kt("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}=aa[e],s=document.createElement("style");s.textContent=`@page { size: ${t}; margin: 0; } .word-table { width: ${a} !important; height: ${r} !important; }`,document.head.appendChild(s);const l=()=>{document.head.removeChild(s),window.removeEventListener("afterprint",l)};window.addEventListener("afterprint",l),window.print()}function S4(e,t){if(e.length===0)return[[]];const a=Math.max(1,Math.floor(t)),r=[];for(let s=0;s<e.length;s+=a)r.push(e.slice(s,s+a));return r}const j4={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 ic(e,t){const a=j4[e][t];if(a)return a;const r=Math.max(1,Math.ceil(t)),s=Math.max(1,Math.ceil(Math.sqrt(r*.707)));let l,i;return e==="landscape"?(i=s,l=Math.ceil(r/i)):(l=s,i=Math.ceil(r/l)),(e==="landscape"?l<i:i<l)&&([l,i]=[i,l]),{cols:l,rows:i}}function T4(e,t){const a=ic(e==="landscape"?"portrait":"landscape",t),r=Math.max(1,Math.ceil(t));if(r<=1)return a;const s=aa[e],l=e==="landscape"?s.width/2:s.width,i=e==="landscape"?s.height:s.height/2,u=(C,g)=>Math.min(l/C/hc,i/g/mc),c=Math.max(0,a.cols*a.rows-r),d=u(a.cols,a.rows);let h=a,p=d;for(let C=1;C<=r;C++){const g=Math.ceil(r/C);if(C*g-r>c)continue;const _=u(C,g);_>p&&(h={cols:C,rows:g},p=_)}return p>d*1.05?h:a}const M4={show:"word-table__content--cut-show",dashed:"",corner:"word-table__content--cut-corner",hide:""},uc={\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"},cc={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},rs={\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"},os={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function dc(e){return Object.fromEntries(Object.entries(uc).map(([t,a])=>[t,rs[t]?e(`wordTable.pos.${rs[t]}`,{defaultValue:a}):a]))}function pc(e){return Object.fromEntries(Object.entries(cc).map(([t,a])=>[t,os[t]?e(`wordSearch.filter.type.${os[t]}`,{defaultValue:a}):a]))}const L4={pos:rs,wordType:os};function ss(e,t){return e?e.split("/").map(a=>t[a]??a).join("/"):""}function ls(e,t,a,r){if(r!=="dashed")return{};const s=e%t,l=Math.floor(e/t),i=s<t-1,u=l<a-1;if(!i&&!u)return{};const c="#ddd",d=g=>`repeating-linear-gradient(to ${g}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,h=[],p=[],C=[];return i&&(h.push(d("bottom")),p.push("1px 100%"),C.push("right center")),u&&(h.push(d("right")),p.push("100% 1px"),C.push("center bottom")),{backgroundImage:h.join(", "),backgroundSize:p.join(", "),backgroundPosition:C.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const hc=280,$4=240,R4=280,mc=400,P4=120,I4=280;function Cc(e,t){const a=o.useRef(null),[r,s]=o.useState(1),[l,i]=o.useState(0),u=o.useCallback((c,d)=>{if(!(c>0))return;const h=c/e,p=t&&d>0?d/t:1/0,C=Math.min(1,h,p);s(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 h=new ResizeObserver(([p])=>u(p.contentRect.width,p.contentRect.height));return h.observe(d),()=>h.disconnect()},[u,t]),{scalerRef:a,scale:r,offset:l}}const F4=24,O4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},z4=400,fc=8;function W4(e){return e<=1?"100%":`repeat(${e}, calc((100% - ${e-1} * var(--wt-cell-gap, 0px)) / ${e}))`}function is({label:e,subLabel:t,colloquialLabel:a,captionLabel:r,captionBadge:s,imageLabel:l,homonum:i,showWord:u=!0,showImage:c=!0,showPronunciation:d=!0,showColloquial:h=!0,showCaption:p=!0,buttonSize:C=40,wordInfo:g,outerScale:_=1}){const{t:m}=xe.useTranslation(),f=o.useRef(null),v=o.useRef(null),b=o.useRef(null),[w,y]=o.useState(1),[B,x]=o.useState(!1),[N,A]=o.useState(!1),[D,E]=o.useState({for:"",url:""}),[k,R]=o.useState(null),$=t&&t.length>0?t:U1()?.(e,i)??"",G=pa()?.(l||e,i)??"",{imgRef:T,loading:P,failed:M,onLoad:ee,onError:Q}=ts(G),F=o.useCallback(()=>R(v.current?.getBoundingClientRect()??null),[]),Z=o.useCallback(()=>R(null),[]),L=fr(!!k,z=>{z?F():Z()},v),V=o.useMemo(()=>{if(!g)return null;const z=[];return g.grade&&z.push(m("wordTable.info.grade",{n:g.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),g.syllables&&z.push(m("wordTable.info.syllables",{n:g.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),g.pos&&z.push(m("wordTable.info.pos",{v:ss(g.pos,dc(m)),defaultValue:"\uD488\uC0AC: {{v}}"})),g.wordType&&z.push(m("wordTable.info.wordType",{v:ss(g.wordType,pc(m)),defaultValue:"\uC720\uD615: {{v}}"})),z.length?z:null},[g,m]),U=$||e,q=D.for===U?D.url:"";o.useEffect(()=>{const z=ja(),ae=$||e;if(!z||!ae)return;let H=!1;return Promise.resolve(z(ae)).then(W=>{!H&&W&&E({for:ae,url:W})}),()=>{H=!0}},[$,e]);const j=o.useRef(null),I=o.useRef(null);o.useEffect(()=>()=>{b.current?.pause(),I.current?.()},[]);const O=o.useRef(null);o.useEffect(()=>()=>{O.current&&(O.current.cancelled=!0)},[]);const Y=o.useCallback(z=>{if(z.stopPropagation(),B||N){j.current?.();return}if(!q){const H=sr(),W=$||e;if(!H||!W)return;const ue={cancelled:!1,stop:null};O.current=ue;const Be=()=>{ue.cancelled=!0,ue.stop?.(),A(!1),x(!1),I.current?.()};j.current=Be,I.current=Ka(Be),A(!0),Promise.resolve().then(()=>H(W)).then(ye=>{if(ue.cancelled)return;if(!ye){Be();return}E({for:W,url:ye});const he=Ya(ye,()=>{x(!1),I.current?.()});b.current=he.el,ue.stop=he.stop,A(!1),x(!0)}).catch(()=>{Be()});return}x(!0);const ae=Ya(q,()=>{x(!1),I.current?.()});b.current=ae.el,j.current=ae.stop,I.current=Ka(ae.stop)},[B,N,q,$,e]),K=c&&!!G&&!M,ie=K&&u?hc:K?R4:$4,te=K&&u?mc:K?I4:P4;o.useEffect(()=>{const z=f.current;if(!z||typeof ResizeObserver>"u")return;const ae=new ResizeObserver(([H])=>{const{width:W,height:ue}=H.contentRect;y(Math.min(W/ie,ue/te))});return ae.observe(z),()=>ae.disconnect()},[ie,te]);const ne=C*_<F4;return n.jsxs("div",{ref:f,className:ke("word-table-cell",ne&&"word-table-cell--tap-too-small",K?"word-table-cell--with-image":""),"data-ref-w":ie,"data-ref-h":te,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${w})`},children:[K&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[P&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:T,className:"word-table-cell__image",src:G,alt:e,draggable:!1,style:{opacity:P?0:1},onLoad:ee,onError:Q})]}),p&&(s||r)&&n.jsxs("span",{className:"word-table-cell__caption",children:[s&&n.jsx(un,{fill:"soft",size:"small",label:s}),r&&n.jsx("span",{className:"word-table-cell__caption-tail h5",children:r})]}),u&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),d&&$&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",$,"]"]}),h&&a&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",a,"]"]})]}),n.jsxs("div",{className:"word-table-cell__side",children:[n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":q,children:[n.jsx("span",{"data-play-state":"play",style:{display:B?"none":void 0},children:n.jsx(Ce,{htmlType:"button",size:C,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,loading:N,showTooltipInfo:N?m("common.loading","\uBD88\uB7EC\uC624\uB294 \uC911"):m("common.play","\uC7AC\uC0DD"),ariaLabel:e?m("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):m("common.play","\uC7AC\uC0DD"),onClick:Y})}),n.jsx("span",{"data-play-state":"pause",style:{display:B?void 0:"none"},children:n.jsx(Ce,{htmlType:"button",size:C,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:m("common.pause","\uBA48\uCDA4"),ariaLabel:e?m("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):m("common.pause","\uBA48\uCDA4"),onClick:Y})})]}),g&&n.jsxs("div",{ref:v,className:"word-table-cell__info-button",onPointerEnter:z=>{Un(z)||F()},onPointerLeave:z=>{Un(z)||Z()},onFocus:()=>{ea()||F()},onBlur:Z,children:[n.jsx(Ce,{htmlType:"button",size:C,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:m("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:z=>{z.stopPropagation(),L.touchPress()}}),k&&V&&n.jsx(qn,{anchorRect:k,items:V,showIndex:!1})]})]})]})}function xa({title:e,titleIcon:t,disc:a,className:r,orientation:s="landscape",contentTypes:l=["image","word","standardPron"],baseItem:i,baseContentTypes:u,cutLine:c="show",showOutline:d=!0,showDivLine:h=!0,items:p,editCells:C,count:g,activeCell:_=null,onActivateCell:m,onRemoveCell:f,onRemoveItem:v,onReorder:b,onCopyItem:w,onReplaceItem:y,indexOffset:B=0,totalCount:x,renderCellAction:N,showFillerAdd:A=!1,addableCount:D,contentRef:E,buttonSize:k=40,brand:R,code:$,pageNumber:G,pageNumberPosition:T="right",fitHeight:P=!1,scoring:M=!1,marks:ee,onMarkClick:Q,scoreIndexOffset:F=0}){const Z=o.useCallback((be,ve)=>{Q?.(F+be,ve)},[Q,F]),L=(be,ve)=>{const we=be.filter(Boolean).join(" / ");return we?ve?U("wordPrint.removePairFor",{name:we,defaultValue:`${we} \uB300\uB9BD\uC30D \uBE7C\uAE30`}):U("wordPrint.removeWordFor",{name:we,defaultValue:`${we} \uBE7C\uAE30`}):ve?U("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):U("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30")},V=(be,ve)=>{const we=ee?.[Ar(F+be)]??null;return n.jsx("div",{className:ke("word-table-cell__score",we?"word-table-cell__score--marked":""),style:lt>1?{transform:`translateX(-50%) scale(${lt})`,transformOrigin:"bottom center"}:void 0,children:kr.map(tt=>n.jsx("span",{className:ke("word-table-cell__score-slot",we===tt?"word-table-cell__score-slot--on":""),children:n.jsx(Ce,{htmlType:"button",size:k,type:"dot",shape:"pill",icon:oc[tt],variant:we===tt?sc[tt]:"default",selected:we===tt,useBorder:!1,...ut?{}:{tabIndex:-1,role:"img"},showTooltipInfo:U(`wordTable.scoring.markName.${tt}`,{defaultValue:tt}),ariaLabel:U(`wordTable.scoring.${tt}`,{word:ve,defaultValue:`${ve} ${tt}`}),onClick:ut?gt=>{gt.stopPropagation(),Z(be,tt)}:void 0})},tt))})},{t:U}=xe.useTranslation(),q=C!==void 0,j=e!=null||!!t||!!a,I=yn("(max-width: 767px)"),O=o.useRef(null),[Y,K]=o.useState(null),ie=p?.length??0,te=x??ie,[ne,z]=o.useState(null),[ae,H]=o.useState(""),W=o.useRef(null),ue=o.useRef(null),Be=o.useRef(null),ye=o.useRef(null),he=o.useCallback(be=>{ue.current=be,typeof E=="function"?E(be):E&&(E.current=be)},[E]),Ne=o.useCallback((be,ve)=>{W.current=B+ve,b?.(be,ve),H(U("wordTable.reorder.moved",{n:B+ve+1,total:te,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[b,U,te,B]);o.useEffect(()=>{const be=W.current;be!=null&&(W.current=null,(ue.current?.closest(".word-table-block__pages")??ue.current)?.querySelector(`[data-wordtable-index="${be}"] .word-table__card-handle button`)?.focus())}),o.useEffect(()=>()=>{ye.current?.()},[]);const Re=o.useCallback((be,ve)=>{if(!b||!be.altKey||be.ctrlKey||be.metaKey)return;const we=be.key==="ArrowRight";if(!we&&be.key!=="ArrowLeft")return;be.preventDefault();const tt=ve+(we?1:-1),gt=B+tt;gt<0||gt>=te||Ne(ve,tt)},[b,te,B,Ne]),Me=o.useCallback((be,ve)=>{if(!b||be.pointerType==="mouse")return;const we=be.target.closest?.("button");if(we&&!we.closest(".word-table__card-handle"))return;ye.current?.();const tt={x:be.clientX,y:be.clientY};let gt=!1;const Nt=et=>{gt&&et.cancelable&&et.preventDefault()};let yt=null,Te=null;const nt=()=>{const et=Te;if(!et)return;const Ge=document.elementFromPoint?.(et.x,et.y)?.closest?.("[data-wordtable-cell]"),Lt=Ge?Number(Ge.dataset.wordtableCell):NaN,nn=Number.isInteger(Lt)?Lt:null;Be.current=nn,K(fn=>fn===nn?fn:nn)},oe=et=>{if(!gt){(Math.abs(et.clientX-tt.x)>fc||Math.abs(et.clientY-tt.y)>fc)&&Je();return}if(Te={x:et.clientX,y:et.clientY},typeof requestAnimationFrame>"u"){nt();return}yt===null&&(yt=requestAnimationFrame(()=>{yt=null,nt()}))},ge=()=>{yt!==null&&(cancelAnimationFrame(yt),yt=null,nt());const et=Be.current,Ge=gt;Je(),Ge&&et!=null&&et!==ve&&Ne(ve,et)},Oe=setTimeout(()=>{gt=!0,z(ve),Be.current=ve,K(ve),window.addEventListener("touchmove",Nt,{passive:!1})},z4);function Je(){clearTimeout(Oe),window.removeEventListener("pointermove",oe),window.removeEventListener("pointerup",ge),window.removeEventListener("pointercancel",ge),window.removeEventListener("touchmove",Nt),gt=!1,yt!==null&&(cancelAnimationFrame(yt),yt=null),Be.current=null,ye.current=null,z(null),K(null)}ye.current=Je,window.addEventListener("pointermove",oe),window.addEventListener("pointerup",ge),window.addEventListener("pointercancel",ge)},[b,Ne]),{width:se,height:Ee}=aa[s],$e=typeof P=="number"?P:P&&typeof P=="object"?I?P.narrow:P.wide:null,{scalerRef:Ae,scale:Fe,offset:Ve}=Cc(se,P?Ee:void 0),ct=q?C?.length??0:p?.length??0,ot=Math.max(g??ct,1),Xe=!q&&!!i,ft=T4(s,ot),Le=ic(s,ot),qe=Xe?ft.cols:Le.cols,Se=Xe?ft.rows:Le.rows,He=Xe&&s==="landscape"?ft.cols*2:qe,Qe=Xe&&s==="portrait"?ft.rows*2:Se,it=be=>({word:be.length===0||be.includes("word"),image:be.length===0||be.includes("image"),pron:be.length===0||be.includes("standardPron"),colloq:be.length===0||be.includes("colloquialPron"),caption:be.length===0||be.includes("caption")}),bt=it(l),wt=o.useMemo(()=>{const be=(p??[]).map(we=>we.id),ve=be.every(we=>typeof we=="string"&&we.length>0)&&new Set(be).size===be.length;return!ve&&be.length>0&&kt("wordTable.cellKeyFallback","[ihab/core] WordTable: items \uC758 id \uAC00 \uACB9\uCE58\uAC70\uB098 \uBE44\uC5B4 \uC788\uC5B4 \uCE78\uC744 \uC790\uB9AC \uBC88\uD638\uB85C \uC13C\uB2E4. \uCE78\uC744 \uBE7C\uAC70\uB098 \uB354\uD560 \uB54C \uB4A4 \uCE78\uB4E4\uC774 \uD1B5\uC9F8\uB85C \uB2E4\uC2DC \uADF8\uB824\uC9C4\uB2E4(\uC18C\uB9AC \uC8FC\uC18C\uB97C \uB2E4\uC2DC \uBC1B\uC544 \uC628\uB2E4). id \uB97C \uD45C \uC548\uC5D0\uC11C \uD558\uB098\uBFD0\uC778 \uAC12\uC73C\uB85C \uC9C0\uC5B4 \uC8FC\uBA74 \uADF8 \uAC12\uC774 \uC0AC\uB77C\uC9C4\uB2E4."),ve?be:null},[p]),Et=it(u??l),at=q?(C??[]).some(be=>be!==null&&be.length>1):(p??[]).some(be=>(be.words??[]).length>1),st=!!R?.show,Bt=!!R?.show&&R?.top!==!1,At=!!R?.show&&R?.bottom!==!1,Mt=R?.copyright??"\xA9 IHAB, Inc. All rights reserved.",Rt=le(ke("word-table__content",M4[c],d&&"word-table__content--outline",h&&at&&"word-table__content--div-line",!st&&G&&T!=="none"&&"word-table__content--page-number",Bt&&"word-table__content--brand-top",At&&"word-table__content--brand-bottom")),_t={transform:`scale(${1/Fe})`,transformOrigin:"center center"},dt=k*kr.length+4*(kr.length-1),ut=!!Q,lt=ut?Math.max(1,Math.min(1/Fe,se/He/dt)):1,xt=n.jsxs("div",{ref:Ae,className:"word-table__scaler",style:{height:Ee*Fe},children:[n.jsx("div",{className:ke("word-table",M&&!ut&&"word-table--score-readonly",!j&&r),style:{width:se,height:Ee,transform:`scale(${Fe})`,transformOrigin:"top left",marginLeft:Ve},children:n.jsxs("div",{ref:he,className:Rt,style:{gridTemplateColumns:`repeat(${He}, 1fr)`,gridTemplateRows:W4(Qe)},children:[q?n.jsx(n.Fragment,{children:(C??[]).map((be,ve)=>n.jsx("div",{className:le(ke("word-table__edit-cell",be?"word-table__edit-cell--filled":"word-table__edit-cell--empty",_===ve?"word-table__edit-cell--active":"")),style:ls(ve,He,Qe,c),children:be?n.jsxs(n.Fragment,{children:[be.map((we,tt)=>n.jsxs(o.Fragment,{children:[tt>0&&n.jsx("div",{className:le("word-table__pair-divider")}),n.jsx(is,{outerScale:Fe,label:we.word,subLabel:we.pronunciation,colloquialLabel:we.colloquialPronunciation,homonum:we.homonum,showWord:bt.word,showImage:bt.image,showPronunciation:bt.pron,showColloquial:bt.colloq,showCaption:bt.caption,buttonSize:k})]},tt)),M&&V(ve,be.map(we=>we.word).join(" / ")),f&&n.jsx("div",{className:le("word-table__card-close"),children:n.jsx(Ce,{htmlType:"button",size:k,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:be.length>1?U("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):U("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:L(be.map(we=>we.word),be.length>1),onClick:()=>f(ve)})})]}):m&&n.jsx("div",{className:le("word-table__card-add"),style:_t,children:n.jsx(Ce,{htmlType:"button",size:k,type:"dot",icon:"plus",variant:"default",ariaLabel:U("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:U("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>m(ve)})})},ve))}):n.jsxs(n.Fragment,{children:[Xe&&i&&n.jsx("div",{className:le("word-table__card word-table__card--base"),style:{gridColumn:`1 / span ${ft.cols}`,gridRow:`1 / span ${ft.rows}`,...ls(0,s==="landscape"?2:1,s==="landscape"?1:2,c)},children:(i.words??[]).map((be,ve)=>n.jsxs(o.Fragment,{children:[ve>0&&n.jsx("div",{className:le("word-table__pair-divider")}),n.jsx(is,{outerScale:Fe,label:be.label,subLabel:be.subLabel,colloquialLabel:be.colloquialLabel,captionLabel:be.captionLabel,captionBadge:be.captionBadge,imageLabel:be.imageLabel,homonum:be.homonum,showWord:Et.word,showImage:Et.image,showPronunciation:Et.pron,showColloquial:Et.colloq,showCaption:Et.caption,buttonSize:k,wordInfo:be.grade||be.syllables!=null||be.pos||be.wordType?{grade:be.grade,syllables:be.syllables,pos:be.pos,wordType:be.wordType}:void 0})]},ve))}),(p??[]).map((be,ve)=>n.jsxs("div",{"data-wordtable-cell":b?ve:void 0,"data-wordtable-index":b?B+ve:void 0,className:le(`word-table__card${b?" word-table__card--draggable":""}${Y===ve?" word-table__card--drag-over":""}${ne===ve?" word-table__card--dragging":""}`),style:ls(ve,qe,Se,c),draggable:!!b,onPointerDown:b?we=>Me(we,ve):void 0,onKeyDown:b?we=>Re(we,ve):void 0,onDragStart:b?()=>{O.current=ve}:void 0,onDragOver:b?we=>{we.preventDefault(),K(ve)}:void 0,onDragLeave:b?()=>K(null):void 0,onDrop:b?we=>{we.preventDefault(),O.current!==null&&O.current!==ve&&b(O.current,ve),O.current=null,K(null)}:void 0,onDragEnd:b?()=>{O.current=null,K(null)}:void 0,children:[(be.words??[]).map((we,tt)=>n.jsxs(o.Fragment,{children:[tt>0&&n.jsx("div",{className:le("word-table__pair-divider")}),n.jsx(is,{outerScale:Fe,label:we.label,subLabel:we.subLabel,colloquialLabel:we.colloquialLabel,captionLabel:we.captionLabel,captionBadge:we.captionBadge,imageLabel:we.imageLabel,homonum:we.homonum,showWord:bt.word,showImage:bt.image,showPronunciation:bt.pron,showColloquial:bt.colloq,showCaption:bt.caption,buttonSize:k,wordInfo:we.grade||we.syllables!=null||we.pos||we.wordType?{grade:we.grade,syllables:we.syllables,pos:we.pos,wordType:we.wordType}:void 0})]},tt)),M&&V(ve,(be.words??[]).map(we=>we.label).join(" / ")),(N||v||w||y||b)&&n.jsxs("div",{className:le("word-table__card-actions"),children:[v&&n.jsx("div",{className:le("word-table__card-close"),children:n.jsx(Ce,{htmlType:"button",size:k,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(be.words??[]).length>1?U("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):U("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:L((be.words??[]).map(we=>we.label),(be.words??[]).length>1),onClick:()=>v(be.id)})}),w&&n.jsx("div",{className:le("word-table__card-copy"),children:n.jsx(Ce,{htmlType:"button",size:k,type:"dot",icon:"copy",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:U("wordTable.copyItem","\uD55C \uCE78 \uB354"),ariaLabel:U("wordTable.copyItemAria",{n:B+ve+1,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354"}),onClick:()=>w(be.id,B+ve)})}),y&&n.jsx("div",{className:le("word-table__card-replace"),children:n.jsx(Ce,{htmlType:"button",size:k,type:"dot",icon:"refresh-cw",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(be.words??[]).length>1?U("wordTable.replacePair","\uB2E4\uB978 \uC30D\uC73C\uB85C"):U("wordTable.replaceItem","\uB2E4\uB978 \uB2E8\uC5B4\uB85C"),ariaLabel:(be.words??[]).length>1?U("wordTable.replacePairAria",{n:B+ve+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C"}):U("wordTable.replaceItemAria",{n:B+ve+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C"}),onClick:()=>y(be.id,B+ve)})}),N?.(ve,be),b&&n.jsx("div",{className:le("word-table__card-handle"),children:n.jsx(Ce,{htmlType:"button",size:k,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:U("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:U("wordTable.reorder.handle",{word:(be.words??[]).map(we=>we.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})})]})]},wt?wt[ve]:ve)),Array.from({length:Math.max(0,qe*Se-(p?.length??0))}).map((be,ve)=>{const we=(p?.length??0)+ve<(D??ot);return n.jsx("div",{className:le("word-table__card word-table__card--filler"),children:A&&m&&we&&n.jsx("div",{className:le("word-table__card-add"),style:_t,children:n.jsx(Ce,{htmlType:"button",size:k,type:"dot",icon:"plus",variant:"default",ariaLabel:U("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:U("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>m((p?.length??0)+ve)})})},`filler-${ve}`)})]}),Bt&&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:R?.topLogo?.src??vr,alt:R?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const be=[R?.title&&n.jsx("span",{className:"word-table__paper-title",children:R.title},"t"),R?.owner&&n.jsx("span",{className:"word-table__owner",children:R.owner},"o"),$&&n.jsx("span",{className:"word-table__code",children:$},"c")].filter(Boolean);return be.length===0?null:n.jsx("span",{className:"word-table__ident",children:be.map((ve,we)=>n.jsxs(o.Fragment,{children:[we>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),ve]},we))})})()]})}),At&&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:[R?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:R.bottomLogo.src,alt:R.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:Mt})]}),n.jsxs("span",{className:"word-table__band-end",children:[R?.link&&n.jsx("span",{className:"word-table__link",children:R.link}),G&&T!=="none"&&n.jsx("span",{className:"word-table__page-count",children:U("wordTable.filter.pageIndicator",{current:G.current,total:G.total})})]})]})}),!st&&G&&T!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${T}`,children:U("wordTable.filter.pageIndicator",{current:G.current,total:G.total})})]})}),b&&n.jsx("span",{role:"status",style:O4,children:ae})]}),pt=$e==null?xt:n.jsx("div",{className:"word-table__frame",style:{height:$e},children:xt});return j?n.jsx(_a,{type:"page",icon:t,title:e,disc:a,className:ke(le("word-table__section"),r),children:pt}):pt}function H4(e,t,a){const r=[];for(const s of e??[]){if(s.type==="note"||s.type==="input")continue;const l=s.displayLabel??s.label,i=V4(s,t?.[s.label],a);i!==null&&r.push(`${l} ${i}`)}return r.join(" \xB7 ")}function V4(e,t,a){const r=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(s=>s!==An);return r.length===0?e.allOption?e.allLabel??a:null:r.map(s=>q4(e,s)).join(", ")}function q4(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 Fn({title:e,titleLevel:t=2,headerAction:a,headerSummary:r,collapsible:s=!1,defaultCollapsed:l=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:d,selected:h={},onSelect:p,align:C,sectionAlign:g,className:_}){const m=(C??(g==="vertical"?"newline":"inline"))==="inline",{t:f}=xe.useTranslation(),[v,b]=o.useState(l),w=i??v,y=()=>{const k=!w;b(k),u?.(k)},B=k=>{if(!s)return;const R=k.target;!R||typeof R.closest!="function"||R.closest(".filter-panel__collapse-toggle")||R.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||y()},x=o.useMemo(()=>r!==void 0||!w?"":H4(d,h,f("common.all","\uC804\uCCB4")),[r,w,d,h,f]),N=r??(x?n.jsx("span",{className:"filter-panel__header-summary body-3",children:x}):null),A=e||a||r||s,D=o.useId(),E=t?`h${t}`:"span";return n.jsxs("div",{className:ke("filter-panel",s?"filter-panel--collapsible":"",w?"filter-panel--collapsed":"",_),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?D:void 0,children:[A&&n.jsxs("div",{className:"filter-panel__header",onClick:s?B:void 0,children:[n.jsx("div",{className:"filter-panel__title-row",children:e&&n.jsx(E,{id:D,className:"filter-panel__title h4",children:e})}),n.jsxs("div",{className:"filter-panel__header-actions",children:[w?N:a,s&&n.jsx(Ce,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:w?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:w?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),showTooltipInfo:w?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),"aria-expanded":!w,onClick:y})]})]}),!w&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:ke("filter-panel__sections",m?"filter-panel__sections--row":""),children:d.map(k=>{const R=h[k.label],$=R===void 0||(Array.isArray(R)?R.length===0:!1),G=(k.items??[]).filter(P=>P!=null);k.allOption&&G.some(P=>(typeof P=="string"?P:P.value)===An)&&kt(`filter-panel-all-value:${k.label}`,`[FilterPanel] '${k.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${An}' \uC778 \uBCF4\uAE30\uAC00 \uD568\uAED8 \uC788\uB2E4 \u2014 \uB450 \uC120\uD0DD\uC774 \uAD6C\uBCC4\uB418\uC9C0 \uC54A\uB294\uB2E4. \uBCF4\uAE30 \uAC12\uC744 \uBC14\uAFD4\uB77C.`);const T=P=>{const M=typeof P=="string"?P:P.value,ee=typeof P!="string"&&!!P.disabled,Q=typeof P!="string"?P.labels:void 0,F=typeof P!="string"?P.displayLabel:void 0,Z=typeof P!="string"?P.tooltip:void 0,L=typeof P!="string"?P.descriptionTooltip:void 0,V=typeof P!="string"?P.shape:void 0,U=Array.isArray(R)?R.includes(M):R===M;return n.jsx(Ce,{htmlType:"button",size:"keyboard",label:Q??F??M,type:k.itemType??(Q?"bar":M.length===1?"dot":void 0),selected:U,disabled:ee,shape:V,showTooltipInfo:!!Z,tooltipInfoText:Z,tooltipDescription:L,onClick:()=>p?.(M,k.label)},M)};return n.jsxs(o.Fragment,{children:[k.groupLabel&&n.jsxs("div",{className:"filter-panel__group-label-row",children:[n.jsx("div",{className:"filter-panel__group-label body-2",children:k.groupLabel}),k.groupAction]}),n.jsxs("div",{className:ke("filter-panel__section",k.layout==="row"?"filter-panel__section--row":"",k.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:k.displayLabel??k.label}),k.labelAction??(k.labelInfo?n.jsx(Ga,{...k.labelInfo}):null)]}),k.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:k.content}):k.type==="input"?n.jsx(Kn,{className:"filter-panel__textfield",placeholder:k.placeholder,ariaLabel:k.displayLabel??k.label,value:h[k.label]??"",onChange:P=>p?.(P,k.label),error:k.error}):!k.multiple&&k.display==="segmented"?n.jsx(vn,{ariaLabel:k.displayLabel??k.label,options:[...k.allOption?[{key:An,label:k.allLabel??f("common.all","\uC804\uCCB4"),disabled:k.allOptionDisabled}]:[],...G.map(P=>{const M=typeof P=="string"?P:P.value,ee=typeof P!="string"?P.displayLabel:void 0,Q=typeof P!="string"?P.disabled:void 0;return{key:M,label:ee??M,disabled:Q}})],value:$&&k.allOption?An:h[k.label]??"",onChange:P=>p?.(P,k.label),size:32}):!k.multiple&&k.display==="dropdown"?n.jsx(_n,{className:"filter-panel__dropdown",ariaLabel:typeof k.label=="string"?k.label:void 0,size:40,options:[...k.allOption?[{value:An,label:k.allLabel??f("common.all","\uC804\uCCB4"),disabled:k.allOptionDisabled}]:[],...G.map(P=>{const M=typeof P=="string"?P:P.value,ee=typeof P!="string"?P.displayLabel:void 0,Q=typeof P!="string"?P.disabled:void 0;return{value:M,label:ee??M,disabled:Q}})],value:$&&k.allOption?An:h[k.label],onChange:P=>p?.(P,k.label)}):n.jsxs("div",{className:k.groups?"filter-panel__item-groups":"filter-panel__items",children:[k.allOption&&!k.groups&&n.jsx(Ce,{htmlType:"button",size:"keyboard",label:k.allLabel??f("common.all","\uC804\uCCB4"),selected:$,disabled:k.allOptionDisabled,onClick:()=>p?.(An,k.label)}),k.groups?k.groups.map((P,M)=>n.jsxs("div",{className:"filter-panel__item-group",children:[M===0&&k.allOption&&n.jsx(Ce,{htmlType:"button",size:"keyboard",label:k.allLabel??f("common.all","\uC804\uCCB4"),selected:$,disabled:k.allOptionDisabled,onClick:()=>p?.(An,k.label)}),P.filter(ee=>ee!=null).map(T)]},M)):G.map(T)]})]})]},k.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const U4=[1,2,3,4,5,6,7,8,9,10,11,12],G4=[8,6,4,2,1],Cn="show",jn="hide",bc=["image","word","caption","standardPron"];function gc(e){return e.some(t=>(t.words??[]).some(a=>!!a.captionBadge||!!a.captionLabel))}function yc(e,t){return{label:e("wordTable.filter.composition","\uAD6C\uC131"),items:[{value:"image",disabled:!t.hasImage,displayLabel:e("wordTable.filter.image","\uC774\uBBF8\uC9C0")},{value:"word",displayLabel:e("wordTable.filter.word","\uB2E8\uC5B4")},{value:"caption",disabled:!t.hasCaption,displayLabel:e("wordTable.filter.caption","\uC720\uD615")},{value:"standardPron",displayLabel:e("wordTable.filter.standardPron","\uD45C\uC900 \uBC1C\uC74C")},{value:"colloquialPron",disabled:!t.hasColloquial,displayLabel:e("wordTable.filter.colloquialPron","\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C")}],multiple:!0,allOption:!0}}function vc(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 _c(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:Cn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function xc(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:Cn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function wc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:Cn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Bc(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:Cn,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:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Ac(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:Cn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function kc(e,t){const a=Math.max(1,Math.min(t.itemCount,t.max??t.itemCount));return{label:e(t.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[a,...G4.filter(r=>r<a)].map(r=>({value:`${r}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:r})})),display:"segmented"}}function Nc(e,t){return e>=t?Number.POSITIVE_INFINITY:e}function K4(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:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Ec(e){return e==="left"||e==="center"||e==="right"?e:"none"}function Dc(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?Cn:jn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?Cn:jn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?Cn:jn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?Cn:jn}:{}}}function Sc(e,t,a,r){return a===e("wordTable.filter.composition","\uAD6C\uC131")?t===An?(r.setContentTypes(()=>[]),!0):(r.setContentTypes(s=>s.includes(t)?s.filter(l=>l!==t):[...s,t]),!0):a===e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")?(r.setOrientation(t==="landscape"?"landscape":"portrait"),!0):a===e("wordTable.filter.border","\uC678\uACFD\uC120")?(r.setShowOutline(t===Cn),!0):a===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(r.setCutLine(t),!0):a===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(r.setShowDivLine(t===Cn),!0):a===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(r.setShowTopInfo?.(t===Cn),!0):a===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(r.setShowBottomInfo?.(t===Cn),!0):!1}function Y4(e){return"sections"in e}function us(e){const{t}=xe.useTranslation(),{title:a,className:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c}=e,d={collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c};if(Y4(e))return n.jsx(Fn,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...d,align:"inline"});const{hasImage:h,hasColloquial:p,hasCaption:C,contentTypes:g,orientation:_,showOutline:m,cutLine:f,showDivLine:v,setters:b,showCutLine:w=!1,showDivLine2:y=!1,middleSections:B=[],extraSelected:x={},onExtraSelect:N,showPaperBands:A=!1,showTopInfo:D=!0,showBottomInfo:E=!0}=e,k=[yc(t,{hasImage:h,hasColloquial:p,hasCaption:C??!1}),vc(t),...B,_c(t),...w?[Bc(t)]:[],...y?[Ac(t)]:[],...A?[xc(t),wc(t)]:[]],R={...Dc(t,{contentTypes:g,orientation:_,showOutline:m,cutLine:f,showDivLine:v,showTopInfo:D,showBottomInfo:E}),...x},$=(G,T)=>{Sc(t,G,T,b)||N?.(G,T)};return n.jsx(Fn,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:k,selected:R,onSelect:$,...d,sectionAlign:"horizontal"})}function cs(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Z4(e){return cs(e).replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function ds(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let Nr=null,wa=null;function X4(e,t,a,r="",s=""){if(e.length===0||wa&&wa.iframe.isConnected&&Date.now()-wa.at<1e4)return;const l=r?ds(r):"";Nr?.();let i=null;if(l){const d=document.title;document.title=l,i=()=>{document.title=d,window.removeEventListener("afterprint",i),Nr===i&&(Nr=null)},Nr=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}wa={iframe:u,at:Date.now()},c.open(),c.write(ps(e,t,a,!0,l,s)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),wa?.iframe===u&&(wa=null)},0)})}function ps(e,t,a,r=!1,s="",l=""){s=s?ds(s):"";const i=Array.from(document.styleSheets).flatMap(p=>{try{return Array.from(p.cssRules).map(C=>C.cssText)}catch{return[]}}).join(`
831
- `),u="light",c=(()=>{try{return document.documentElement.lang||""}catch{return""}})(),d=l?`<div class="paper-head">${cs(l)}</div>`:"",h=e.map(p=>{const C=p.cloneNode(!0);return C.querySelectorAll('[data-play-state="play"]').forEach(g=>g.style.display=""),C.querySelectorAll('[data-play-state="pause"]').forEach(g=>g.style.display="none"),C.querySelectorAll(".word-table-cell__score-slot:not(.word-table-cell__score-slot--on)").forEach(g=>g.remove()),C.querySelectorAll(".word-table-cell__spinner").forEach(g=>g.remove()),C.querySelectorAll("img").forEach(g=>{g.style.opacity==="0"&&(g.setAttribute("onload","this.style.opacity=''"),g.setAttribute("onerror","this.style.visibility='hidden'"))}),`<div class="paper-wrap">${d}${C.outerHTML}</div>`}).join(`
828
+ `)}const $v=new Set(["pnpm","npm","yarn","node","git","curl","docker","cat","ls","cd","rm","mv","cp","echo","export"]),Rv=/^(?: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 Pv(e,t){let a=e;const r=[],s=/^(?:sh|bash|zsh|shell|console)$/.test(t.toLowerCase()),l=(i,u)=>r.push({type:i,content:u});for(;a.length>0;){const i=a.match(/^\s+/);if(i){l("whitespace",i[0]),a=a.slice(i[0].length);continue}if(!s&&a.startsWith("//")){const y=a.indexOf(`
829
+ `),C=y===-1?a:a.slice(0,y);l("comment",C),a=a.slice(C.length);continue}if(s&&a.startsWith("#")){const y=a.indexOf(`
830
+ `),C=y===-1?a:a.slice(0,y);l("comment",C),a=a.slice(C.length);continue}const u=a.match(/^\/\*[\s\S]*?\*\//);if(u){l("comment",u[0]),a=a.slice(u[0].length);continue}const c=a.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(c){l("string",c[0]),a=a.slice(c[0].length);continue}const d=a.match(/^\d+(?:\.\d+)?/);if(d){l("number",d[0]),a=a.slice(d[0].length);continue}const h=a.match(Rv);if(h){l("keyword",h[0]),a=a.slice(h[0].length);continue}const p=a.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(p){const y=p[0];l(s&&$v.has(y)?"command":"identifier",y),a=a.slice(y.length);continue}const m=a.match(/^[=+\-*/%<>!&|^~?:]+/);if(m){l("operator",m[0]),a=a.slice(m[0].length);continue}const g=a.match(/^[()[\]{};.,]/);if(g){l("punctuation",g[0]),a=a.slice(1);continue}l("other",a[0]),a=a.slice(1)}return r}function Fv({children:e,language:t="bash",title:a="",showCopy:r=!0,size:s="default",className:l=""}){const{t:i}=_e.useTranslation(),[u,c]=o.useState(!1),d=Lv(Ru(e)),h=o.useRef(null);o.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const p=async()=>{try{if(!await Hf(d))return;c(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>c(!1),2e3)}catch{}},m=Pv(d,t),g=s==="small"?"caption-1":"body-3";return n.jsxs("div",{className:Be("code-box",s==="small"?"code-box--small":"",l),children:[(a||r)&&n.jsxs("div",{className:"code-box__header",role:"toolbar","aria-label":i("common.codeBlock","\uCF54\uB4DC \uBE14\uB85D"),children:[n.jsx("div",{className:"code-box__title caption-1",children:a}),r&&n.jsx(fe,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:u?"check":"copy",onClick:p,ariaLabel:u?i("common.copied","\uBCF5\uC0AC\uB428"):i("common.copyCode","\uCF54\uB4DC \uBCF5\uC0AC")})]}),n.jsx("pre",{className:"code-box__inner","data-lang":t,children:n.jsx("code",{children:m.map((y,C)=>n.jsx("span",{className:`code-token ${y.type} ${g}`,children:y.content},C))})})]})}function Iv({count:e,actions:t,onClear:a,clearLabel:r,visible:s,content:l,max:i}){const{t:u}=_e.useTranslation(),c=s!==void 0?s:e>0,d=r??u("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),h=o.useRef(null),p=o.useRef(null),m=o.useRef(null),g=o.useRef(c);o.useLayoutEffect(()=>{const b=p.current,w=g.current;if(g.current=c,c&&!w){const v=typeof document<"u"?document.activeElement:null;m.current=v&&v!==document.body&&!b?.contains(v)?v:null}else!c&&w&&b&&b.contains(document.activeElement)&&mr(b,m.current)},[c]);const[y,C]=o.useState(!1),f=o.useRef(!1),_=o.useRef(null);return o.useEffect(()=>{const b=h.current;if(!b)return;const w=E=>{f.current=E,C(E)},v=()=>{const E=b.firstElementChild??b,D=Array.from(E.children);if(D.length<2){w(!1);return}const N=D[0].offsetTop,$=D.some(T=>T.offsetTop!==N);if(!f.current){_.current=b.clientWidth,$&&w(!0);return}if($)return;const L=D[0],U=D[D.length-1],M=U.offsetLeft+U.offsetWidth-L.offsetLeft,P=_.current;(P==null||M<=P)&&w(!1)};if(v(),typeof ResizeObserver>"u")return;const k=new ResizeObserver(v);k.observe(b);const x=b.parentElement;let A=x?.clientWidth??0;const B=new ResizeObserver(()=>{const E=x?.clientWidth??0;E!==A&&(A=E,_.current=null,v())});return x&&B.observe(x),()=>{k.disconnect(),B.disconnect()}},[l,e]),n.jsxs("div",{ref:p,className:`bulk-bar ${c?"bulk-bar--visible":""}`,inert:!c||void 0,"aria-hidden":c?void 0:!0,children:[n.jsx("span",{ref:h,className:"bulk-bar__count body-2",role:"status",children:l??n.jsx("b",{children:u("common.selectedCount",{count:e})})}),i!==void 0&&n.jsx(ln,{size:"small",fill:"soft",variant:"main",label:`${e} / ${i}`,"aria-label":u("common.selectedOfMax",{count:e,max:i,defaultValue:`\uCD5C\uB300 ${i}\uAC1C \uC911 ${e}\uAC1C`})}),n.jsxs("div",{className:`bulk-bar__actions${y?" bulk-bar__actions--stacked":""}`,children:[n.jsx(fe,{htmlType:"button",size:40,label:d,onClick:a}),t.map((b,w)=>n.jsx(fe,{htmlType:"button",size:40,variant:b.variant??"default",icon:b.icon,label:b.label,onClick:b.onClick},w))]})]})}const Ov=[{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 zv(e){const{onClose:t,className:a}=e;return n.jsx("div",{className:Be("item-actions",a),children:Ov.map(({key:r,icon:s,closeFirst:l})=>{const i=e[r];if(!i)return null;const u=r==="publish"?i.published?i.unpublish:i.publish:i;return n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:s,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{l&&t(),u.onClick()}},r)})})}function Wv({items:e,className:t,ariaLabel:a="\uC54C\uB9BC \uAE00",titleLevel:r=4,targetBytes:s}){const l=r?`h${r}`:"div";return n.jsx("div",{className:`notify-text-preview${t?` ${t}`:""}`,role:"group","aria-label":a,children:e.map(i=>{const u=s===void 0?Rl(i.sms):Rl(i.sms,s),c=u.type==="LMS";return n.jsxs("section",{className:"notify-text-preview__item",children:[n.jsxs("header",{className:"notify-text-preview__head",children:[n.jsx(l,{className:"notify-text-preview__name h5b",children:i.name}),i.meta&&Object.keys(i.meta).length>0?n.jsx("dl",{className:"notify-text-preview__meta caption-1",children:Object.entries(i.meta).map(([d,h])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:d}),n.jsx("dd",{children:h})]},d))}):null]}),n.jsxs("div",{className:"notify-text-preview__body",children:[n.jsxs("div",{className:"notify-text-preview__col",children:[n.jsxs("div",{className:"notify-text-preview__col-head caption-1",children:[n.jsx("span",{children:"\uBB38\uC790"}),n.jsxs("span",{className:`notify-text-preview__bytes${c?" is-over":u.overTarget?" is-over-target":""}`,title:u.over?`${u.limit}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uBCF4\uB0BC \uB54C \uC798\uB9B0\uB2E4`:c?`${Ll}\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 ${Ll}\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 Hv({src:e,alt:t,className:a,style:r,tone:s,textColor:l}){const i=!s&&!!l,u=Jy(e,i),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return s?n.jsx("span",{className:Be("brand-logo","brand-logo--tone",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--brand-logo-src":`url("${e}")`,"--brand-logo-tone":s},children:n.jsx("img",{src:e,alt:"","aria-hidden":"true",className:"brand-logo__sizer",draggable:!1})}):i&&u?n.jsx("span",{className:Be("brand-logo","brand-logo--inline",a),role:t?"img":void 0,"aria-label":t||void 0,"aria-hidden":t?void 0:!0,style:{...r,"--brand-logo-text-color":l},dangerouslySetInnerHTML:{__html:Zy(Yy(u),c)}}):n.jsx("img",{src:e,alt:t,className:Be("brand-logo",a),style:r,draggable:!1})}function Pu({children:e,className:t}){const a=o.useRef(null),[r,s]=o.useState(null);return o.useEffect(()=>{s(a.current?.parentElement??null)},[]),o.useEffect(()=>{const l=a.current;if(!l||!r)return;const i=()=>{const c=typeof window<"u"&&window.getComputedStyle(l).position==="absolute"?Math.ceil(l.getBoundingClientRect().width):0;c>0?r.style.setProperty("--section-head-float-w",`${c}px`):r.style.removeProperty("--section-head-float-w")};if(i(),typeof ResizeObserver>"u")return()=>{r.style.removeProperty("--section-head-float-w")};const u=new ResizeObserver(()=>i());return u.observe(l),u.observe(r),()=>{u.disconnect(),r.style.removeProperty("--section-head-float-w")}},[r,e]),n.jsx("div",{ref:a,className:Be("section-head-float",t),children:e})}function Ho({items:e,className:t}){return n.jsx("div",{className:se(t?`chart-section__legend ${t}`:"chart-section__legend"),children:e.map((a,r)=>n.jsxs("span",{className:se("chart-section__legend-item"),children:[n.jsx("span",{className:se("chart-section__legend-dot"),style:{background:a.color}}),a.label]},r))})}function tr({label:e,children:t}){return e?n.jsxs("div",{className:se("chart-section__total chart-section__total--stacked"),children:[n.jsx("span",{className:se("chart-section__total__label body-3"),children:e}),n.jsx("span",{className:se("chart-section__total__value"),children:t})]}):n.jsx("div",{className:se("chart-section__total"),children:t})}function Vo({title:e,titleClassName:t="h3",titleLevel:a=3,icon:r,disc:s,headRight:l,headFloat:i,headSegment:u,headMenuItems:c,collapseBelow:d=420,onClick:h,ariaLabel:p,tooltip:m,totalNum:g,totalUnit:y,totalLabel:C,subRow:f,subRowAlign:_="start",className:b,inGrid:w=!1,children:v}){const{t:k}=_e.useTranslation(),x=o.useRef(null),{anchorRect:A,openAt:B,close:E}=za(),D=o.useCallback(()=>{m&&x.current&&B(x.current)},[m,B]),[N,$]=o.useState(!1);Io(()=>{const j=x.current;if(!j||!u)return;const F=G=>$(G>0&&G<d);if(F(j.clientWidth),typeof ResizeObserver>"u")return;const O=new ResizeObserver(G=>F(G[0].contentRect.width));return O.observe(j),()=>O.disconnect()},[u,d]);const[L,U]=o.useState(null),M=o.useCallback(()=>U(null),[]),P=o.useCallback(j=>{const F=j.currentTarget.getBoundingClientRect();U(O=>O?null:{left:F.left,right:F.right,top:F.top,bottom:F.bottom,width:F.width,height:F.height,x:F.x,y:F.y})},[]),T=!!u&&N;o.useEffect(()=>{T||U(null)},[T]);const ee=u?[...u.options.map(j=>({label:j.label,icon:j.icon,selected:j.key===u.value,disabled:j.disabled,onClick:()=>u.onChange(j.key),closeOnSelect:!0})),...(c??[]).map((j,F)=>F===0?{...j,separatorBefore:!0}:j)]:[],te=o.useCallback(j=>{if(!h)return;const F=j.target;F&&typeof F.closest=="function"&&F.closest('button, a, input, select, textarea, [role="radiogroup"]')||h()},[h]),I=o.useCallback(j=>{h&&j.target===j.currentTarget&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),h())},[h]),Y=typeof l=="function"?l({collapsed:T}):l,R=g!=null||C?n.jsxs(tr,{label:C,children:[g!=null&&n.jsx("span",{className:se("chart-section__total__num h0"),children:g}),y&&n.jsx("span",{className:se("chart-section__total__unit h5"),children:y})]}):null,q=Y||u?n.jsxs("div",{className:se("chart-section__head-right"),children:[u&&(T?n.jsx(fe,{htmlType:"button",size:Ft,type:"dot",icon:"ellipsis",ariaLabel:u.ariaLabel??k("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:u.ariaLabel??k("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!L,onClick:P}):n.jsx(vn,{size:Ft,ariaLabel:u.ariaLabel,options:u.options.map(j=>({key:j.key,label:j.label,disabled:j.disabled})),value:u.value,onChange:u.onChange})),Y]}):null,Z=o.useId(),z=a?`h${a}`:"div";return n.jsxs("section",{ref:x,className:se(["chart-section",w&&"chart-section--grid",h&&"chart-section--clickable",b].filter(Boolean).join(" ")),onClick:h?te:void 0,onKeyDown:h?I:void 0,onPointerEnter:m?D:void 0,onPointerLeave:m?E:void 0,onFocus:m?D:void 0,onBlur:m?E:void 0,role:h?"button":void 0,tabIndex:h?0:void 0,"aria-label":h?p??(typeof e=="string"?e:void 0):void 0,"aria-labelledby":!h&&e!=null?Z:void 0,children:[m&&A&&n.jsx(Mn,{anchorRect:{left:A.left,top:A.top+21,right:A.right,bottom:A.bottom,width:A.width,height:A.height},text:m}),i&&n.jsx(Pu,{children:i}),n.jsxs("div",{className:se("chart-section__head"),children:[n.jsxs("div",{className:se("chart-section__title-row"),children:[r&&n.jsx(ot,{icon:r,label:typeof e=="string"?e:void 0,className:se("chart-section__icon")}),n.jsx(z,{id:Z,className:se(["chart-section__title",t].filter(Boolean).join(" ")),children:e})]}),q,s&&n.jsx("div",{className:se("chart-section__disc body-3"),children:s})]}),(R||f)&&n.jsxs("div",{className:se(["chart-section__sub-row",_!=="start"&&`chart-section__sub-row--${_}`].filter(Boolean).join(" ")),children:[R,f]}),v,L&&n.jsx(Bn,{anchorRect:L,onClose:M,ariaLabel:u?.ariaLabel??k("tooltip.menu","\uBA54\uB274"),children:n.jsx(Va,{columns:[{items:ee}],onClose:M,size:"small"})})]})}const nr=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,qo=e=>nr(e.getFullYear(),e.getMonth()+1);function ya(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 Uo=(e,t)=>`${e}#${t}`;function Sn(e,t){const a=new Date(e,t,1).getDay();return 1+(8-(a===0?7:a))%7}function Vv(){const e=ha();let t=e.getFullYear(),a=e.getMonth(),r=e.getDate();if(r<Sn(t,a)){const i=new Date(t,a,0);t=i.getFullYear(),a=i.getMonth(),r=i.getDate()}const s=Math.floor((r-Sn(t,a))/7),l=nr(t,a+1);return{monthKey:l,value:Uo(l,s)}}function qv(e){const t=ha(),a=qo(t),r=(c,d)=>nr(c,d+1),s=new Map;s.set(a,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const d=r(c.date.getFullYear(),c.date.getMonth());s.has(d)||s.set(d,[]),s.get(d).push(c)}for(const[c,d]of[...s.entries()]){const h=ya(c);if(!h)continue;const p=h.year,m=h.month1-1,g=Sn(p,m);if(!(c===a&&t.getDate()<g)&&!d.some(f=>f.date.getDate()<g))continue;const y=new Date(p,m,0),C=r(y.getFullYear(),y.getMonth());s.has(C)||s.set(C,[])}const l=new Map;for(const[c,d]of s){const h=ya(c);if(!h)continue;const p=h.year,m=h.month1-1,g=new Date(p,m+1,0).getDate(),y=d.reduce((v,k)=>Math.max(v,k.parts?.length??0,k.partsB?.length??0),0),C=d.some(v=>v.partsB),f=new Array(g+1).fill(0),_=new Array(g+1).fill(0),b=Array.from({length:g+1},()=>new Array(y).fill(0)),w=Array.from({length:g+1},()=>new Array(y).fill(0));for(const v of d){const k=v.date.getDate();if(f[k]+=v.a,_[k]+=v.b,v.parts)for(let x=0;x<y;x++)b[k][x]+=v.parts[x]??0;if(v.partsB)for(let x=0;x<y;x++)w[k][x]+=v.partsB[x]??0}l.set(c,{year:p,month:m,daysInMonth:g,partsLen:y,hasPartsB:C,dayA:f,dayB:_,dayParts:b,dayPartsB:w})}const i=(c,d,h)=>new Date(c,d,h).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,d]of l){const{year:h,month:p,daysInMonth:m,dayA:g,dayB:y,dayParts:C,dayPartsB:f}=d,_=h===t.getFullYear()&&p===t.getMonth(),b=t.getDate(),w=l.get(r(p===11?h+1:h,(p+1)%12)),v=d.partsLen,k=[];for(let A=1;A<=m;A++){const B=_&&A>b;k.push({label:String(A),...B&&g[A]===0&&y[A]===0?{future:!0}:{},a:B&&g[A]===0&&y[A]===0?-1:g[A],b:y[A],...v?{parts:C[A]}:{},...v&&d.hasPartsB?{partsB:f[A]}:{}})}const x=[];for(let A=Sn(h,p);A<=m;A+=7){const B=Math.max(0,A+6-m),E=B&&w?Math.max(v,w.partsLen):v,D=d.hasPartsB||!!(B&&w?.hasPartsB);let N=0,$=0;const L=new Array(E).fill(0),U=new Array(E).fill(0);for(let P=A;P<=Math.min(A+6,m);P++){N+=g[P],$+=y[P];for(let T=0;T<v;T++)L[T]+=C[P][T],U[T]+=f[P][T]}if(B&&w)for(let P=1;P<=B&&!i(w.year,w.month,P);P++){N+=w.dayA[P],$+=w.dayB[P];for(let T=0;T<w.partsLen;T++)L[T]+=w.dayParts[P][T],U[T]+=w.dayPartsB[P][T]}const M=B?`${(p+1)%12+1}/${B}`:`${A+6}`;x.push({label:`${x.length+1}\uC8FC`,sublabel:`[${A}\uC77C~${M}\uC77C]`,a:N,b:$,...E?{parts:L}:{},...E&&D?{partsB:U}:{}})}u[c]={weekly:x,daily:k}}return u}function Fu(){const e=ha(),t=e.getFullYear(),a=e.getMonth()+1,r=[];for(let s=2024;s<=t;s++){const l=s===t?a:12;for(let i=1;i<=l;i++)r.push({value:nr(s,i),year:s,month:i})}return r.reverse()}Fu();function Uv(){return Fu()}function Iu(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 Ou(e){const{t,i18n:a}=_e.useTranslation(),[r,s]=o.useState("week"),l=o.useMemo(()=>Uv().filter(E=>E.value in e),[e]),i=o.useMemo(()=>{const E=[];for(const D of l){const N=new Date(D.year,D.month,0).getDate(),$=Sn(D.year,D.month-1),L=Math.ceil((N-$+1)/7);for(let U=L-1;U>=0;U--)E.push({value:Uo(D.value,U),monthKey:D.value,year:D.year,month:D.month,week:U})}return E},[l]),u=o.useCallback(E=>`${co(t,a.language,E.year,E.month)} ${Iu(t,E.week)}`,[t]),c=o.useMemo(()=>l.map(E=>({value:E.value,label:co(t,a.language,E.year,E.month)})),[t,a.language,l]),d=o.useMemo(()=>i.map(E=>({value:E.value,label:u(E)})),[i,u]),h=o.useMemo(()=>Vv(),[e]),p=o.useMemo(()=>l.find(E=>E.value===h.monthKey)?.value??l[0]?.value??"",[l,h]),m=o.useMemo(()=>i.find(E=>E.value===h.value)?.value??i[0]?.value??"",[i,h]),[g,y]=o.useState(""),[C,f]=o.useState("");o.useEffect(()=>{l.find(E=>E.value===g)||y(p)},[l,g,p]),o.useEffect(()=>{i.find(E=>E.value===C)||f(m)},[i,C,m]);const _=r==="month"?c:d,b=r==="month"?g:C,w=r==="month"?y:f,v=o.useMemo(()=>{const E=t("calendar.dow",{returnObjects:!0});return Array.isArray(E)?E:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),k=_.findIndex(E=>E.value===b),x=o.useCallback(()=>{const E=_.findIndex(D=>D.value===b);E<_.length-1&&w(_[E+1].value)},[_,b,w]),A=o.useCallback(()=>{const E=_.findIndex(D=>D.value===b);E>0&&w(_[E-1].value)},[_,b,w]),B=o.useMemo(()=>[{key:"week",label:t("manager.chart.periodWeek","\uC8FC")},{key:"month",label:t("manager.chart.periodMonth","\uC6D4")}],[t]);return{period:r,setPeriod:s,range:b,setRange:w,activeOptions:_,activeIdx:k,handlePrev:x,handleNext:A,periodOptions:B,monthRange:g,weekRange:C,weekRanges:i,DOW:v}}const Mt=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function Fn(e,t=!0){return e.future===!0||t&&e.a===-1}function Gv({data:e,colorA:t,colorB:a,labelA:r,labelB:s,barWidth:l=10,barGap:i=1,height:u=140,maxOverride:c,tightMax:d,seriesColors:h,seriesLabels:p,rateLabels:m,grouped:g=!1,baseline:y,focusableBars:C=!1}){const f=!a,_=!!(h&&h.length>0),b=y,w=o.useMemo(()=>_?Math.max(0,...e.filter(I=>!Fn(I,b==null)).map(I=>g?Math.max(0,...(I.parts??[]).map(Mt)):(I.parts??[]).reduce((Y,R)=>Y+Math.max(0,Mt(R)),0))):Math.max(0,...e.filter(I=>!Fn(I,b==null)).flatMap(I=>f?[Mt(I.a)]:[Mt(I.a),Mt(I.b)])),[e,f,_,g]),v=o.useMemo(()=>{if(b==null)return 0;const I=e.filter(Y=>!Fn(Y,b==null)).flatMap(Y=>_?(Y.parts??[]).map(Mt):f?[Mt(Y.a)]:[Mt(Y.a),Mt(Y.b)]);return Math.max(0,...I.map(Y=>Math.abs(Y-b)))},[e,b,_,f]),k=o.useMemo(()=>{const I=b!=null?v:w;return c??(d?I>0?I:10:Math.ceil(I/10)*10||10)},[w,v,b,c,d]),x=u,A=_?g?Math.max(1,h.length):1:f?1:2,B={"--bar-width":`${o.useMemo(()=>{const I=Math.max(1,e.length);return Math.max(2,Math.min(l,Math.round(120/(I*A)+6)))},[e.length,A,l])}px`},E={"--bar-group-gap":`${Math.max(0,i)}px`},D=o.useMemo(()=>{const I=Math.round(k/2);return b!=null?[b+k,...I!==k?[b+I]:[],b,...I!==k?[b-I]:[],b-k]:I!==k?[k,I,0]:[k,0]},[k,b]),N=I=>b!=null?1-(I-(b-k))/(2*k):1-I/k,[$,L]=o.useState(null),U=o.useCallback(()=>L(null),[]),M=o.useCallback((I,Y)=>{const R=[I.label,I.sublabel].filter(Boolean).join(" ");let q;if(_&&g&&I.rawPartsB)q=(p??[]).map((Z,z)=>{const j=I.rawPartsB[z]??0;return{text:j>0?`${Z}: ${Y[z]??0}% (${I.rawParts?.[z]??0}/${j})`:`${Z}: -`,color:(h??[])[z]}});else if(_&&g)q=(p??[]).map((Z,z)=>({text:`${Z}: ${ee(Y[z]??0)}`,color:(h??[])[z]}));else if(_){const Z=(p??[]).map((j,F)=>({text:`${j}: ${Y[F]??0}`,color:(h??[])[F]})),z=Z.filter((j,F)=>(Y[F]??0)>0);q=z.length?z:Z}else m&&!f?q=[{text:`${r} ${Mt(I.a)}%`,color:t},{text:`${s} ${Mt(I.b)}%`,color:a}]:m&&I.rawB!==void 0?q=[{text:`${m.total} ${I.rawB}`},{text:`${m.done} ${I.rawA??0}`,color:t}]:f?q=[{text:`${r}: ${Mt(I.a)}`,color:t}]:q=[{text:`${r}: ${Mt(I.a)}`,color:t},{text:`${s}: ${Mt(I.b)}`,color:a}];return{title:R,items:q}},[_,g,p,h,m,f,r,s,t,a,b]),P=o.useCallback((I,Y,R)=>{const q=I.getBoundingClientRect(),{title:Z,items:z}=M(Y,R);L({rect:{left:q.left,top:q.top,right:q.right,bottom:q.bottom,width:q.width,height:q.height},title:Z,items:z})},[M]),T=o.useCallback((I,Y)=>{const{title:R,items:q}=M(I,Y);return[R,...q.map(Z=>Z.text)].filter(Boolean).join(", ")},[M]),ee=I=>b!=null&&I>b?`+${I}`:`${I}`,te=$!=null;return o.useEffect(()=>{if(!te)return;const I=()=>L(null),Y=R=>{const q=R.target;q&&typeof q.closest=="function"&&q.closest(".bar-chart__col")||L(null)};return window.addEventListener("scroll",I,!0),document.addEventListener("pointerdown",Y,!0),()=>{window.removeEventListener("scroll",I,!0),document.removeEventListener("pointerdown",Y,!0)}},[te]),n.jsxs("div",{className:se("bar-chart__wrap"),style:E,children:[n.jsx("div",{className:se("bar-chart__inner"),children:n.jsx("div",{className:se("bar-chart__scroll"),children:n.jsxs("div",{className:se("bar-chart__area"),children:[n.jsxs("div",{className:se("bar-chart__plot"),style:{height:x},children:[D.slice(0,-1).map((I,Y)=>n.jsx("div",{className:se(`bar-chart__gridline${b!=null&&I===b?" bar-chart__gridline--baseline":""}`),style:{top:N(I)*x},children:n.jsx("span",{className:se("bar-chart__gridline__label caption-1"),children:I})},Y)),e.map((I,Y)=>{const R=Fn(I,b==null),q=x/2,Z=O=>b!=null?Math.min(q,Math.abs(Mt(O)-b)/k*q):Math.min(x,Math.max(0,Mt(O)/k*x)),z=R?0:Z(I.a),j=R?0:Z(I.b),F=(I.parts??[]).map(Mt);return n.jsx("div",{className:se(`bar-chart__col${g&&_?" bar-chart__col--group":""}`),style:{cursor:R?"default":"pointer"},tabIndex:C&&!R?0:void 0,role:C&&!R?"img":void 0,"aria-label":C&&!R?T(I,F):void 0,onMouseEnter:R?void 0:O=>P(O.currentTarget,I,F),onFocus:R||!C?void 0:O=>P(O.currentTarget,I,F),onBlur:C?U:void 0,onMouseLeave:U,children:!R&&(_&&g?(h??[]).map((O,G)=>{const ie=F[G]??0;if(b==null)return n.jsx("div",{className:se("bar-chart__bar"),style:{...B,height:Z(ie),background:O}},G);const K=Mt(ie)<b;return n.jsxs("div",{className:se("bar-chart__slot"),style:B,children:[n.jsx("div",{className:se("bar-chart__slot__half bar-chart__slot__half--up"),children:!K&&n.jsx("div",{className:se("bar-chart__bar bar-chart__bar--full"),style:{height:Z(ie),background:O}})}),n.jsx("div",{className:se("bar-chart__slot__half bar-chart__slot__half--down"),children:K&&n.jsx("div",{className:se("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:Z(ie),background:O}})})]},G)}):_?n.jsx("div",{className:se("bar-chart__stack"),style:B,children:(()=>{const O=F.reduce((ie,K,pe)=>K>0?pe:ie,-1);let G=x;return F.map((ie,K)=>{if(ie<=0)return null;const pe=Math.min(G,ie/k*x);return G-=pe,n.jsx("div",{className:se("bar-chart__stack-segment"),style:{height:pe,background:(h??[])[K],borderRadius:K===O?"6px 6px 0 0":void 0}},K)})})()}):b!=null?n.jsx(n.Fragment,{children:[{v:Mt(I.a),c:t},...f?[]:[{v:Mt(I.b),c:a}]].map(({v:O,c:G},ie)=>n.jsxs("div",{className:se("bar-chart__slot"),style:B,children:[n.jsx("div",{className:se("bar-chart__slot__half bar-chart__slot__half--up"),children:O>=b&&n.jsx("div",{className:se("bar-chart__bar bar-chart__bar--full"),style:{height:Z(O),background:G}})}),n.jsx("div",{className:se("bar-chart__slot__half bar-chart__slot__half--down"),children:O<b&&n.jsx("div",{className:se("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:Z(O),background:G}})})]},ie))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:se("bar-chart__bar"),style:{...B,height:z,background:t}}),!f&&n.jsx("div",{className:se("bar-chart__bar"),style:{...B,height:j,background:a}})]}))},Y)})]}),n.jsx("div",{className:se("bar-chart__x-axis"),children:e.map((I,Y)=>{const R=Fn(I,b==null);return n.jsxs("span",{className:se(`bar-chart__x-axis__label${R?" bar-chart__x-axis__label--future":""}`),children:[n.jsxs("span",{className:se("caption-1 bar-chart__x-axis__main"),children:[I.isToday&&n.jsx("span",{className:se("bar-chart__x-axis__today-dot"),style:{background:t}}),I.label]}),I.sublabel&&n.jsx("span",{className:"caption-1",children:I.sublabel})]},Y)})})]})})}),$&&n.jsx(qn,{anchorRect:$.rect,title:$.title,items:$.items,showIndex:!1,closeOnOutsideClick:!1})]})}function zu({control:e}){const{t}=_e.useTranslation(),{activeOptions:a,activeIdx:r,range:s,setRange:l,handlePrev:i,handleNext:u,periodOptions:c,period:d,setPeriod:h}=e,p=d==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),m=d==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:se("chart-section__controls"),children:[n.jsx(fe,{htmlType:"button",size:Ft,type:"dot",icon:"chevron-left",ariaLabel:p,showTooltipInfo:p,disabled:r===a.length-1,onClick:i}),n.jsx(_n,{value:s,onChange:l,options:a,size:Ft,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(fe,{htmlType:"button",size:Ft,type:"dot",icon:"chevron-right",ariaLabel:m,showTooltipInfo:m,disabled:r<=0,onClick:u}),n.jsx(vn,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:d,onChange:g=>h(g),size:Ft})]})}function Go(e,t,a,r=!0){const s=new Date(a.getFullYear(),a.getMonth(),a.getDate());return Array.from({length:7},(l,i)=>{const u=new Date(t);u.setDate(t.getDate()+i);const c=(e[qo(u)]?.daily??[])[u.getDate()-1],d=c!=null&&Fn(c,r)||u>s;return{dt:u,entry:c,isFuture:d}})}function Kv(e,t,a,r=!0){const{period:s,monthRange:l,weekRange:i,weekRanges:u,DOW:c}=t,d=ha(),h=d.getFullYear(),p=d.getMonth()+1,m=d.getDate();if(s==="month"){const C=e[l]??{weekly:[],daily:[]},f=ya(l),_=f?f.year:null,b=f?f.month1:null,w=_&&b?Sn(_,b-1):1;return C.weekly.map((v,k)=>{const x=k+1;let A=v.label,B=!1,E=!1;if(_&&b){const D=w+k*7,N=new Date(_,b-1,D+6),$=N.getMonth()+1,L=N.getDate(),U=$===b?`${L}`:`${$}/${L}`;A=a("manager.chart.weekRange",{start:D,end:U});const M=new Date(h,p-1,m).getTime();B=M>=new Date(_,b-1,D).getTime()&&M<=N.getTime(),E=_>h||_===h&&(b>p||b===p&&D>m)}return{...v,label:A,sublabel:Iu(a,x-1),isToday:B,future:v.future===!0||E||void 0,a:E?-1:v.a,b:E?0:v.b}})}const g=u.find(C=>C.value===i);if(!g)return[];const y=new Date(g.year,g.month-1,Sn(g.year,g.month-1)+g.week*7);return Go(e,y,d,r).map(({dt:C,entry:f,isFuture:_})=>{const b=C.getMonth()+1,w=C.getDate(),v=C.getFullYear();return{label:b===g.month&&v===g.year?`${w}`:`${b}/${w}`,sublabel:c[C.getDay()]??"",future:_||void 0,a:_?-1:f&&f.a>0?f.a:0,b:_?0:f&&f.b>0?f.b:0,isToday:v===h&&b===p&&w===m,...f?.parts?{parts:_?f.parts.map(()=>0):f.parts}:{},...f?.partsB?{partsB:_?f.partsB.map(()=>0):f.partsB}:{}}})}const Yv={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function Zv({focusableBars:e,size:t="medium",barWidth:a,titleKey:r,titleLevel:s,data:l,colorA:i,colorB:u,labelAKey:c,labelBKey:d,showTotal:h=!1,totalUnitKey:p,totalLabelKey:m,control:g,hideControls:y=!1,rate:C=!1,rateAgg:f="dayMean",tightMax:_=!1,avgMode:b=!1,totalFormat:w,series:v,seriesMode:k="stack",loading:x=!1,onDetail:A,headExtra:B,headSegment:E,icon:D,disc:N,onClick:$,cardAriaLabel:L,cardTooltip:U,detailSize:M=Ft,barGap:P,baseline:T,className:ee,inGrid:te=!1}){const{t:I}=_e.useTranslation(),Y=Yv[t],R=Ou(l),q=g??R,Z=o.useMemo(()=>Kv(l,q,I,T==null),[l,q,I,T]),z=k==="group"&&!!v&&v.length>0;P!=null&&!z&&At("bar-chart-bargap-without-group","[BarChart] barGap \uC740 seriesMode='group' + series \uC5D0\uC11C\uB9CC \uC4F0\uC778\uB2E4 \u2014 \uADF8 \uBC16\uC5D0\uC11C\uB294 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4.");const j=o.useMemo(()=>{if(!C)return Z;const X=q.period==="month"?ya(q.monthRange):null,H=ha(),ne=v?.length??0,V=W=>{const oe=[],xe=[],be=[];for(let me=0;me<ne;me++){let ke=0,Le=0,Me=0;for(const le of W){const ve=Mt(le.a[me]),$e=Mt(le.b[me]);$e<=0||(ke+=ve,Le+=$e,Me+=ve/$e*100)}oe.push(f==="weighted"?Le>0?Math.round(ke/Le*100):0:W.length?Math.round(Me/W.length):0),xe.push(ke),be.push(Le)}return{pct:oe,ra:xe,rb:be}};return Z.map((W,oe)=>{let xe=W.a===-1?-1:W.b>0?Math.round(W.a/W.b*100):0;if(X&&!Fn(W)){const me=X.year,ke=X.month1-1,Le=Go(l,new Date(me,ke,Sn(me,ke)+oe*7),H).filter(Me=>!Me.isFuture);if(f==="weighted"){let Me=0,le=0;for(const{entry:ve}of Le)ve&&ve.b>0&&(Me+=ve.a,le+=ve.b);xe=le>0?Math.round(Me/le*100):0}else xe=Le.length?Math.round(Le.reduce((Me,{entry:le})=>Me+(le&&le.b>0?le.a/le.b*100:0),0)/Le.length):0}let be=null;if(z&&!Fn(W)){let me;if(X){const Le=X.year,Me=X.month1-1;me=Go(l,new Date(Le,Me,Sn(Le,Me)+oe*7),H).filter(le=>!le.isFuture).map(({entry:le})=>({a:le?.parts??[],b:le?.partsB??[]}))}else me=[{a:W.parts??[],b:W.partsB??[]}];const ke=V(me);be={parts:ke.pct,rawParts:ke.ra,rawPartsB:ke.rb}}return{...W,a:xe,b:W.a===-1?0:d&&W.parts&&W.parts[1]>0?Math.round(W.parts[0]/W.parts[1]*100):0,rawA:W.a===-1?-1:W.a,rawB:W.b,...be??{}}})},[Z,C,f,d,q.period,q.monthRange,l,z,v?.length]),F=o.useMemo(()=>{if(C||b){const H=(q.period==="week"?Z:l[q.monthRange]?.daily??[]).filter(V=>V.a!==-1);if(H.length===0)return 0;if(C&&f==="weighted"){let V=0,W=0;for(const oe of H)oe.b>0&&(V+=oe.a,W+=oe.b);return W>0?Math.round(V/W*100):0}const ne=C?H.reduce((V,W)=>V+(W.b>0?W.a/W.b*100:0),0):H.reduce((V,W)=>V+(W.a>0?W.a:0),0);return Math.round(ne/H.length)}const X=q.period==="month"?l[q.monthRange]?.daily??[]:j;return T!=null?X.reduce((H,ne)=>H+(Fn(ne,!1)?0:Mt(ne.a)+(d?Mt(ne.b):0)),0):X.reduce((H,ne)=>H+(ne.a>0?ne.a:0)+(d&&ne.b>0?ne.b:0),0)},[j,Z,C,f,b,T,d,q.period,q.monthRange,l]),O=v&&v.length>0?v.map(X=>({color:X.color,label:X.label})):[{color:i,label:I(c)},...d?[{color:u,label:I(d)}]:[]],G=t==="small",ie=[G?"chart-section--compact":t==="large"?"chart-section--full":void 0,ee].filter(Boolean).join(" ")||void 0,K=r?I(r):"",pe=K?I("trainingStatus.detailFor",{name:K,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):I("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Vo,{className:ie,inGrid:te,icon:D,disc:N,onClick:$,ariaLabel:L,tooltip:U,headSegment:E,headMenuItems:A?[{label:pe,icon:"list",onClick:A,closeOnSelect:!0}]:void 0,title:I(r),titleLevel:s,titleClassName:G?"h5 chart-section-title--small":void 0,headRight:G?B??void 0:({collapsed:X})=>n.jsxs(n.Fragment,{children:[!y&&n.jsx(zu,{control:q}),B,A&&!X&&n.jsx("span",{className:se("bar-chart__detail-btn"),children:n.jsx(fe,{htmlType:"button",size:M,type:"dot",icon:"list",ariaLabel:pe,showTooltipInfo:pe,onClick:A})})]}),subRow:n.jsxs(n.Fragment,{children:[h?C||b||m&&w?n.jsx(tr,{label:G?void 0:`${I(q.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${I(m??c)}`,children:w?(w(F).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((X,H)=>/\d/.test(X)?n.jsx("span",{className:se("chart-section__total__num h0"),children:X},H):n.jsx("span",{className:se("chart-section__total__unit h5"),children:X},H)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:se("chart-section__total__num h0"),children:F}),p&&n.jsx("span",{className:se("chart-section__total__unit h5"),children:I(p)})]})}):n.jsxs(tr,{children:[n.jsx("span",{className:se("chart-section__total__num h0"),children:F}),n.jsx("span",{className:se("chart-section__total__unit h5"),children:I(c)}),p&&n.jsx("span",{className:se("chart-section__total__unit h5"),children:I(p)})]}):n.jsx("span",{}),n.jsx(Ho,{items:O,className:"caption-1"})]}),children:x?n.jsx("div",{className:se("bar-chart__wrap bar-chart__loading"),"aria-busy":"true",children:n.jsx("div",{className:se("bar-chart__inner"),children:n.jsxs("div",{className:se("bar-chart__area bar-chart__area--loading"),children:[n.jsx("div",{className:se("bar-chart__plot bar-chart__plot--loading"),style:{height:Y.height},children:n.jsx(Ca,{size:32})}),n.jsx("div",{className:se("bar-chart__x-axis"),"aria-hidden":"true",children:n.jsxs("span",{className:se("bar-chart__x-axis__label"),children:[n.jsx("span",{className:se("caption-1 bar-chart__x-axis__main"),children:"\xA0"}),j.some(X=>!!X.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(Gv,{focusableBars:e,data:j,colorA:i,colorB:d?u:void 0,labelA:I(c),labelB:d?I(d):void 0,barWidth:a??Y.barWidth,barGap:P,baseline:T,height:Y.height,maxOverride:C?100:void 0,tightMax:_,seriesColors:v?.map(X=>X.color),seriesLabels:v?.map(X=>X.label),rateLabels:C?{total:I("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:I("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:z})})}const Wu=120,Xv={left:38,right:16,top:26,bottom:24};function Jv({points:e=[],range:t,ticks:a=[],axisTitle:r,color:s,height:l=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:d,className:h}){const[p,m]=o.useState(null),[g,y]=o.useState(null);o.useEffect(()=>{if(!g)return;const T=te=>m(Math.round(te)||null);if(T(g.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const ee=new ResizeObserver(([te])=>T(te.contentRect.width));return ee.observe(g),()=>{ee.disconnect()}},[g]);const{payload:C,anchorRect:f,openAfterDelay:_,close:b}=Vy(Wu),w=o.useCallback((T,ee)=>{T&&_(T,ee.getBoundingClientRect())},[_]),v=p??i,k=l,{left:x,right:A,top:B,bottom:E}={...Xv,...u},[D,N]=t,$=T=>N===D?x:x+(v-x-A)*(T-D)/(N-D),L=T=>B+(k-B-E)*(100-T)/100,U={x:$,y:L,plot:{left:x,right:v-A,top:B,bottom:k-E,width:Math.max(0,v-x-A),height:Math.max(0,k-B-E)}},M=e.filter(T=>!T.hollow),P=s??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:y,className:Be("line-chart",h),viewBox:`0 0 ${v} ${k}`,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:x,x2:v-A,y1:L(T),y2:L(T)}),n.jsxs("text",{className:"line-chart__tick",x:x-6,y:L(T)+4,textAnchor:"end",children:[T,"%"]})]},T)),c?.(U),a.map(T=>n.jsx("text",{className:"line-chart__tick",x:$(T.x),y:k-5,textAnchor:"middle",children:T.label},T.x)),M.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:P,points:M.map(T=>`${$(T.x)},${L(T.pct)}`).join(" ")}),e.map(T=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:ee=>w(T.description,ee.currentTarget),onPointerLeave:b,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:$(T.x),cy:L(T.pct),r:12}),n.jsx("circle",{className:Be("line-chart__dot-main",T.hollow&&"is-hollow"),cx:$(T.x),cy:L(T.pct),r:4,stroke:P,fill:T.hollow?void 0:P})]},T.x))]}),C!=null&&n.jsx(Bn,{anchorRect:f,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:C,children:C})]})}function Qv({icon:e,iconSize:t=56,title:a,titleClass:r="h2",description:s,tipGroups:l,start:i,className:u}){return n.jsxs("div",{className:Be("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:Be("game-intro__title",r),children:a}),s!=null&&n.jsx("p",{className:"game-intro__description body-3",children:s}),l?.map((c,d)=>n.jsxs("div",{className:"game-intro__tips",children:[c.title!=null&&n.jsx("span",{className:"game-intro__tips-title body-3",children:c.title}),c.tips.map((h,p)=>n.jsxs("span",{className:"game-intro__tip body-3",children:[h.icon!=null&&n.jsx("span",{"aria-hidden":"true",children:h.icon}),n.jsx("span",{children:h.text})]},p))]},d)),i&&n.jsx(fe,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const Hu=(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")}`},Vu=(e,t,a,r)=>({from:Gl(e,t,a),to:new Date(Gl(e,t,a+r).getTime()-1),fromYmd:Hu(e,t,a),toYmd:Hu(e,t,a+r-1)});function e4(e,t=0){if(e.period==="month"){const s=ya(e.monthRange),l=ha(),i=s?s.year:l.getFullYear(),u=(s?s.month1:l.getMonth()+1)-1+t,c=new Date(Date.UTC(i,u+1,0)).getUTCDate();return Vu(i,u,1,c)}const a=e.weekRanges.find(s=>s.value===e.weekRange);if(!a){const s=new Date,l=Fa();return{from:s,to:s,fromYmd:l,toYmd:l}}const r=Sn(a.year,a.month-1);return Vu(a.year,a.month-1,r+(a.week+t)*7,7)}const Ko={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function qu(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Uu({done:e,total:t,segments:a,color:r="var(--color-main)",size:s="medium",strokeWidth:l,label:i="%",hideCenter:u=!1,hideLabel:c=!1}){const d=typeof s=="number"?s:Ko[s].diameter,h=l??(typeof s=="number"?12:Ko[s].strokeWidth),p=d/2,m=(d-h)/2,g=2*Math.PI*m;if(a&&a.length>0){const _=a.reduce((b,w)=>{const v=b.length>0?b[b.length-1].acc:0,k=Number.isFinite(w.ratio)?w.ratio:0,x=Math.max(0,Math.min(k,1-v));return b.push({color:w.color,rotate:-90+v*360,dash:g*x,acc:v+x}),b},[]);return n.jsx("div",{className:"ring-chart",style:{width:d,height:d},children:n.jsxs("svg",{width:d,height:d,viewBox:`0 0 ${d} ${d}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),_.map((b,w)=>b.dash>0&&n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:b.color,strokeWidth:h,strokeDasharray:`${b.dash} ${g}`,strokeLinecap:"round",transform:`rotate(${b.rotate} ${p} ${p})`},w))]})})}const y=(t??0)>0?Math.min((e??0)/t,1):0,C=g*y,f=g-C;return n.jsxs("div",{className:"ring-chart",style:{width:d,height:d},children:[n.jsxs("svg",{width:d,height:d,viewBox:`0 0 ${d} ${d}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),y>0&&n.jsx("circle",{cx:p,cy:p,r:m,fill:"none",stroke:r,strokeWidth:h,strokeDasharray:`${C} ${f}`,strokeLinecap:y<.02||y>.98?"butt":"round",transform:`rotate(-90 ${p} ${p})`})]}),!u&&n.jsxs("div",{className:`ring-chart__center${c?"":` ${d<=96?"ring-chart__center--small":s==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${d<=96?"h2":"h1"}`,children:qu(y)}),!c&&n.jsx("span",{className:`ring-chart__label ${d<=96?"caption-2":"caption-1"}${d<=96||s==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function t4({titleKey:e,titleLevel:t,headRight:a,icon:r,showTotal:s,totalLabelKey:l,legend:i,loading:u,className:c,inGrid:d=!1,onClick:h,ariaLabel:p,tooltip:m,...g}){const{t:y}=_e.useTranslation();if(!e)return n.jsx(Uu,{...g});const C=(g.total??0)>0?qu(Math.min((g.done??0)/g.total,1)):0,f=g.size==="small",_=typeof g.size=="number"?g.size:Ko[g.size??"medium"].diameter,b=g.size==="large",w=[c,f?"chart-section--compact":b?"chart-section--full":""].filter(Boolean).join(" ")||void 0,v=r&&n.jsx("span",{className:se("chart-section-icon"),children:n.jsx(ot,{icon:r,className:se("chart-section-icon-inner")})});return n.jsx(Vo,{className:w,inGrid:d,onClick:h,ariaLabel:p,tooltip:m,title:y(e),titleLevel:t,titleClassName:f?"h5 chart-section-title--small":void 0,headRight:v||(f?void 0:a),subRow:(s||i)&&n.jsxs(n.Fragment,{children:[s?n.jsxs(tr,{label:!f&&l?y(l):void 0,children:[n.jsx("span",{className:se("chart-section__total__num h0"),children:C}),n.jsx("span",{className:se("chart-section__total__unit h5"),children:"%"})]}):n.jsx("span",{}),i&&n.jsx(Ho,{items:i})]}),children:u?n.jsx("div",{className:se("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(Ca,{size:32})})}):n.jsx("div",{className:se("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx(Uu,{...g,hideCenter:g.hideCenter??f})})})}function n4({label:e,value:t,change:a,changeType:r,icon:s,tooltip:l,onClick:i,children:u}){const c=o.useRef(null),{anchorRect:d,openAt:h,close:p}=za(),m=o.useCallback(()=>{l&&c.current&&h(c.current)},[l,h]),g=r??(a===void 0?void 0:a>0?"up":a<0?"down":"neutral"),y=a===void 0?void 0:a>0?`+${a}`:`${a}`,C=o.useCallback(f=>{i&&(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),i())},[i]);return n.jsxs("div",{ref:c,className:se(`stat-chart__card${i?" stat-chart__card--clickable":""}`),onClick:i,onKeyDown:i?C:void 0,onPointerEnter:m,onPointerLeave:p,onFocus:m,onBlur:p,role:i?"button":void 0,tabIndex:i?0:void 0,"aria-label":i?[e,t,y].filter(f=>f!==void 0&&f!=="").join(" "):void 0,children:[l&&d&&n.jsx(Mn,{anchorRect:{left:d.left,top:d.top+21,right:d.right,bottom:d.bottom,width:d.width,height:d.height},text:l}),n.jsxs("div",{className:se("stat-chart__card__label-row"),children:[n.jsx("span",{className:se("stat-chart__card__label h5"),children:e}),s&&n.jsx("span",{className:se("stat-chart__card__icon"),children:n.jsx(ot,{icon:s,className:se("stat-chart__card__icon-inner")})})]}),n.jsxs("div",{className:se("stat-chart__card__content"),children:[n.jsxs("div",{className:se("stat-chart__card__left"),children:[n.jsx("div",{className:se("stat-chart__card__value h2"),children:t}),y&&n.jsx("div",{className:se(`stat-chart__card__change stat-chart__card__change--${g??"neutral"} caption-1`),children:y})]}),u&&n.jsx("div",{className:se("stat-chart__card__body"),children:u})]})]})}function Gu({value:e,onChange:t,min:a=0,max:r=100,step:s=1,orientation:l="horizontal",size:i=24,disabled:u=!1,ariaLabel:c,length:d,className:h,label:p,formatValue:m,labelPos:g,labelAlign:y="right",showMinMax:C=!1,minLabel:f,maxLabel:_,showBgTick:b=!1,showFillTick:w=!1,tickStep:v,tickShape:k="dot"}){t&&!c&&At("Slider:unnamed","[ihab/Slider] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 ariaLabel \uC744 \uC8FC\uC138\uC694. label prop \uC740 \uAC12 \uD45C\uAE30 \uBC29\uC2DD\uC774\uC9C0 \uC774\uB984\uC774 \uC544\uB2D9\uB2C8\uB2E4.");const x=Math.min(r,Math.max(a,e)),A=r>a?(x-a)/(r-a):0,B=l==="vertical",E=!t,D=Z=>t?.(Number(Z.target.value)),N=typeof d=="number"?`${d}px`:d,$={"--slider-ratio":String(A),"--slider-thumb":`${i}px`,...N?B?{height:N}:{width:N}:{}},L=v??s,U=(b||w)&&L>0&&r>a?Math.floor((r-a)/L+1e-6):0;if(U>0&&U<=100){const Z=k!=="dash",z=ie=>Z?`radial-gradient(circle, ${ie} 0.5px, transparent 1px)`:B?`linear-gradient(to bottom, transparent calc(50% - 2px), ${ie} calc(50% - 2px), ${ie} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${ie} calc(50% - 2px), ${ie} calc(50% + 2px), transparent calc(50% + 2px))`,j=Z?"2px":"4px",F=[],O=[],G=[];for(let ie=0;ie<=U;ie++){const K=ie*L/(r-a);if(K>1+1e-6)break;const pe=`${((B?1-K:K)*100).toFixed(4)}%`,X=K<=A+1e-6;if(X?!w:!b)continue;const H=X?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";F.push(z(H)),O.push(B?`${j} var(--slider-thumb)`:`var(--slider-thumb) ${j}`),G.push(B?`center ${pe}`:`${pe} center`)}F.push(B?"linear-gradient(to top, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))":"linear-gradient(to right, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))"),O.push("100% 100%"),G.push("0 0"),$.backgroundImage=F.join(", "),$.backgroundSize=O.join(", "),$.backgroundPosition=G.join(", "),$.backgroundRepeat="no-repeat"}const M=m?m(x):p==="percent"?`${Math.round(r>a?(x-a)/(r-a)*100:0)}%`:p==="count"?`${x} / ${r}`:x===a&&f?f:x===r&&_?_:void 0,P=n.jsx("input",{type:"range",className:Be("slider",`slider--${l}`,E&&"slider--static",!p&&!C&&h),min:a,max:r,step:s,value:x,disabled:u,readOnly:E,tabIndex:E?-1:void 0,"aria-label":c,"aria-valuetext":M,"aria-orientation":l,onChange:D,style:$});if(!p&&!C)return P;const T=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:f??a}),ee=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:_??r}),te=C?n.jsxs("div",{className:Be("slider-track-group",`slider-track-group--${l}`,!p&&h),children:[B?ee:T,P,B?T:ee]}):P;if(!p)return te;const I=g??(B?"bottom":"right"),Y=`${Math.round(r>a?(x-a)/(r-a)*100:0)}%`,R=m?m(x):p==="percent"?Y:p==="count"?`${x} / ${r}`:String(x),q=n.jsx("span",{className:"slider-wrap__value body-3b",children:R});return n.jsxs("div",{className:Be("slider-wrap",`slider-wrap--${l}`,`slider-wrap--label-${I}`,`slider-wrap--align-${y}`,h),children:[te,q]})}const a4=.86,r4=250,Yo=(e,t,a,r)=>Math.round(Math.min(r,Math.max(a,e-t))),Zo=(e,t,a,r)=>{const s=Yo(e,t,a,r);return`${s<0?"-":"+"}${Math.abs(s)} dB`};function Xo({analyser:e,audioElement:t,orientation:a="horizontal",length:r,label:s,labelPos:l,labelAlign:i="right",floorDb:u=-60,refDb:c=-35,displayMin:d=-5,displayMax:h=25,className:p,ariaLabel:m}){const g=o.useRef(null),y=o.useRef(null),C=o.useRef(null),f=o.useRef(null),[_,b]=o.useState(null);o.useEffect(()=>{const x=P=>{const T=Zo(P,c,d,h);C.current&&(C.current.textContent=T);const ee=g.current;ee&&(ee.setAttribute("aria-valuenow",String(Yo(P,c,d,h))),ee.setAttribute("aria-valuetext",T))},A=e??K1(t)??(_&&_.el===t?_.node:null),B=y.current;if(!A||!B){B?.style.setProperty("--meter-level","0"),x(u);let P=!1;return!e&&t&&lr(t).then(T=>{!P&&T&&b({el:t,node:T})}),()=>{P=!0}}oo();const E=new Float32Array(A.fftSize);let D=0,N=0,$=0,L=0,U=null;const M=P=>{const T=Y1(A,E);D=T>D?T:D*a4;const ee=D>1e-5?20*Math.log10(D):-1/0,te=Math.max(u,ee),I=te-c,Y=Math.min(1,Math.max(0,(I-d)/(h-d)));if(B.style.setProperty("--meter-level",Y.toFixed(3)),N+=te,$+=1,P-L>=r4){const R=N/$;U=U==null?R:U*.6+R*.4,x(U),N=0,$=0,L=P}f.current=requestAnimationFrame(M)};return f.current=requestAnimationFrame(M),()=>{f.current!=null&&cancelAnimationFrame(f.current),f.current=null}},[e,t,_,u,c,d,h]);const w=typeof r=="number"?`${r}px`:r,v=n.jsx("div",{className:"audio-meter__track",style:w?a==="vertical"?{height:w}:{width:w}:{},children:n.jsx("div",{ref:y,className:"audio-meter__fill"})}),k=l??(a==="vertical"?"bottom":"right");return n.jsxs("div",{ref:g,className:Be("audio-meter",`audio-meter--${a}`,s&&`audio-meter--label-${k}`,s&&`audio-meter--align-${i}`,p),role:"meter","aria-label":m,"aria-valuemin":d,"aria-valuemax":h,"aria-valuenow":Yo(u,c,d,h),"aria-valuetext":Zo(u,c,d,h),children:[v,s&&n.jsx("span",{ref:C,className:"audio-meter__value caption-2",children:Zo(u,c,d,h)})]})}const Ku=260;function Yu({message:e,position:t,duration:a,onClose:r}){const[s,l]=o.useState(!1),[i,u]=o.useState(!1),c=o.useRef(i),d=o.useRef(s);o.useEffect(()=>{c.current=i},[i]),o.useEffect(()=>{d.current=s},[s]);const h=o.useRef(null),p=o.useRef(""),m=o.useRef(r);o.useEffect(()=>{m.current=r});const g=a,y=o.useRef(null),C=o.useRef(0),f=o.useRef(0),_=o.useRef(!1),b=o.useRef(null),w=o.useRef(null),v=o.useRef(null),k=o.useRef(null),x=o.useRef(()=>{});x.current=E=>{E<0||(C.current=Date.now(),f.current=E,y.current=setTimeout(()=>{y.current=null,l(!1),b.current=setTimeout(()=>{u(!1);try{m.current()}catch{}},Ku)},E))};const A=o.useCallback(()=>{_.current||!y.current||(_.current=!0,clearTimeout(y.current),y.current=null,f.current=Math.max(0,f.current-(Date.now()-C.current)))},[]),B=o.useCallback(()=>{_.current&&(_.current=!1,x.current(f.current))},[]);return o.useEffect(()=>{if(e!==p.current&&(y.current&&(clearTimeout(y.current),y.current=null),b.current&&(clearTimeout(b.current),b.current=null)),e){if(d.current)return g>0&&!y.current&&(_.current?f.current=g:x.current(g)),p.current=e,()=>{y.current&&(clearTimeout(y.current),y.current=null),b.current&&(clearTimeout(b.current),b.current=null)};const E=()=>{const D=h.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"),k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{k.current=null;try{D.style.opacity="",D.style.transform="",D.style.transition=""}catch{}},60)}catch{}};c.current?(E(),l(!0)):(u(!0),w.current=requestAnimationFrame(()=>{v.current=requestAnimationFrame(()=>{E(),l(!0)})})),g>0&&(_.current=!1,x.current(g))}else l(!1),b.current=setTimeout(()=>u(!1),Ku);return p.current=e,()=>{y.current&&clearTimeout(y.current),b.current&&clearTimeout(b.current),w.current&&cancelAnimationFrame(w.current),v.current&&cancelAnimationFrame(v.current),k.current&&clearTimeout(k.current),y.current=null,b.current=null,w.current=null,v.current=null,k.current=null}},[e,g,t]),{mounted:i,showing:s,popupRef:h,pause:A,resume:B}}function va({message:e="",position:t="top",type:a="normal",onClose:r=()=>{},duration:s=2e3}){const{mounted:l,showing:i,popupRef:u,pause:c,resume:d}=Yu({message:e,position:t,duration:s,onClose:r}),h=o.useRef(null),[p,m]=o.useState(!1);if(o.useEffect(()=>{i?m(!0):l||m(!1)},[i,l]),!l)return null;const g=a==="notice"||a==="warning"?a:"normal",y=n.jsx("div",{ref:u,className:`toast toast--${t} ${i?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:C=>{h.current=C.pointerType},onMouseEnter:()=>{h.current!=="touch"&&c()},onMouseLeave:d,onFocusCapture:c,onBlurCapture:d,children:n.jsx("div",{className:`toast__inner toast__inner--${g} body-2`,"aria-hidden":p||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?hn.createPortal(y,document.body):y}const o4=24;function s4({value:e,max:t=100,size:a=8,color:r,trackColor:s,label:l,formatValue:i,labelPos:u,labelAlign:c="right",ariaLabel:d,className:h}){const p=Number.isFinite(t)&&t>0?t:1,m=Math.max(0,Math.min(Number.isFinite(e)?e:0,p)),g=m/p*100,y=Number.isFinite(t)&&t>0?t:0,C=u??(a>=o4?"inside":"bottom"),f=C==="center"?"inside":C,_=f==="inside"&&(c==="left"?g>=15:c==="center"?g>=50:g>=85),b={};return r&&(b["--progress-bar-fill"]=r),s&&(b["--progress-bar-track"]=s),n.jsxs("div",{className:Be("progress-bar",`progress-bar--${a}`,`progress-bar--label-${f}`,l&&`progress-bar--align-${c}`,l&&_&&"progress-bar--label-on-fill",h),style:b,children:[n.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":m,"aria-valuemin":0,"aria-valuemax":y,"aria-valuetext":l?i?i(m):l==="percent"?void 0:l==="raw"?String(m):`${m} / ${y}`:void 0,"aria-label":d,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${g}%`}})}),l&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(m):l==="percent"?`${Math.round(g)}%`:l==="raw"?String(m):`${m} / ${y}`})]})}const Zu={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},l4="rgba(255, 255, 255, 0.16)";function Xu({max:e,index:t,inactiveBg:a,inactiveColor:r,transparent:s,variant:l="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=_e.useTranslation(),d=yn("(max-width: 767px)");if(!Number.isInteger(e)||e<=0)return null;const h=Number.isInteger(t)?Math.max(0,Math.min(t,e-1)):0,p=u??c("progress.steps",{current:h+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),m={};if(a&&(m["--pi-inactive-bg"]=a),r&&(m["--pi-inactive-color"]=r),s&&(a||(m["--pi-inactive-bg"]=l4),r||(m["--pi-inactive-color"]="var(--color-white)")),l==="dot")return n.jsxs("div",{className:"progress-indicator progress-indicator--dot",style:m,role:i?"status":"img","aria-label":i?void 0:p,children:[i&&n.jsx("span",{style:Zu,children:p}),Array.from({length:e}).map((y,C)=>n.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${C<h?" done":C===h?" active":""}`},C))]});const g=i?n.jsx("span",{role:"status",style:Zu,children:p}):null;return d?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:m,role:"list","aria-label":p,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[h+1," / ",e]})}),g]}):n.jsxs(n.Fragment,{children:[g,n.jsx("div",{className:"progress-indicator",style:m,role:"list","aria-label":p,children:Array.from({length:e}).map((y,C)=>n.jsx("span",{role:"listitem","aria-current":C===h?"step":void 0,className:`progress-indicator-dot ${C<h?" done":C===h?" active":""} body-3`,children:C+1},C))})]})}function i4(e){if(!e)return[];const t=[];let a=0,r="";for(const s of e.trim()){if(s==="("?a++:s===")"&&a--,/\s/.test(s)&&a===0){r&&(t.push(r),r="");continue}r+=s}return r&&t.push(r),t}function u4(e,t,a=0){const r=Array.from({length:Math.max(0,t)},()=>0);for(const s of e){let l=0;for(const i of s){if(l>=r.length)break;const u=Ju(i.span),c=Math.min(u,r.length-l);if(c===1)r[l]=Math.max(r[l],i.width);else{const d=Math.max(0,(i.width-a*(c-1))/c);for(let h=l;h<l+c;h++)r[h]=Math.max(r[h],d)}l+=c}}return r}function Ju(e){const t=typeof e=="number"?e:parseInt(String(e??""),10);return Number.isFinite(t)&&t>=1?Math.floor(t):1}function c4(e,t){const a=/span\s+(\d+)/.exec(`${e??""} ${t??""}`);return a?Ju(parseInt(a[1],10)):1}function d4(e,t){const{isFixed:a,floorOf:r,containerWidth:s}=t,l=e.reduce((p,m,g)=>p+(a(g)?m:0),0),i=e.reduce((p,m,g)=>p+(a(g)?0:m),0),u=s-l;if(!(s>0&&i>0&&u>0))return[...e];const c=u/i,d=e.map((p,m)=>a(m)?p:Math.max(r(m),Math.round(p*c))),h=Math.round(u-d.reduce((p,m,g)=>p+(a(g)?0:m),0));if(h!==0){let p=-1;d.forEach((m,g)=>{!a(g)&&(p<0||m>d[p])&&(p=g)}),p>=0&&(d[p]=Math.max(r(p),d[p]+h))}return d}const p4=16;function h4(e,t=p4){return e.map(a=>{const r=a.sortable&&!a.sorted;return Math.max(a.declaredMin,Math.ceil(a.headWidth+(r?t:0)))})}function m4({children:e,className:t,style:a,span:r,rowLabel:s,onRowClick:l}){const i=r&&r>1?{gridColumn:`span ${r}`,...a}:a;return n.jsx("div",{role:"cell",className:t?`table-cell ${t}`:"table-cell",style:i,"aria-colspan":r&&r>1?r:void 0,children:s&&l?n.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":s,children:e}):e})}function Jo({variant:e="default",children:t,className:a,draggable:r,onClick:s,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:d,colSpan:h,describedBy:p,rowHasButton:m}){const g=o.useCallback(y=>{s&&y.target===y.currentTarget&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),s())},[s]);return e==="loading"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--loading",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:n.jsx(Ca,{size:28})})})}):e==="empty"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--empty body-3",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:t})})}):n.jsxs("div",{role:"presentation",className:"table-row-wrap",children:[n.jsx("div",{className:a?`table-row ${a}`:"table-row",draggable:r,onClick:s,onKeyDown:s?g:void 0,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:s&&!m?0:void 0,"aria-describedby":s&&!m?p:void 0,children:t}),d&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row-expand__cell",children:d})})]})}function C4({dir:e}){return n.jsx(e==="asc"?tl:el,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function f4({children:e,onClick:t,className:a,sortDir:r,ariaSort:s,onResizeStart:l}){const i=n.jsxs(n.Fragment,{children:[e,r&&n.jsx(C4,{dir:r})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":s,className:Be("table-field body-3",a,r?"table-field--sorted":"",l?"table-field--resizable":""),children:[t?n.jsx("button",{type:"button",className:"table-field__button",children:i}):i,l&&n.jsx("span",{className:"table-field__resizer",onPointerDown:l,onClick:u=>u.stopPropagation(),"aria-hidden":"true"})]})}function Qu(e){return e&&e!=="left"?`table-col--${e}`:void 0}function Qo({fields:e=[],sort:t,sortable:a=!0,headerGroups:r,items:s=[],renderRow:l,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:d,onRowDragStart:h,onRowDragEnd:p,draggingId:m,gridTemplateColumns:g,mobileGridTemplateColumns:y,resizable:C=!0,resizeMode:f="grow",resizeStorageKey:_,size:b="small",title:w,icon:v,count:k,collapsed:x=!1,onToggleCollapse:A,headerActions:B,empty:E,loading:D,dragOver:N=!1,onDragOver:$,onDragLeave:L,onDrop:U,renderExpandedRow:M,expandedId:P}){const{t:T}=_e.useTranslation(),ee=o.useId(),te=`table-title-${ee}`,I=`table-row-hint-${ee}`,[Y,R]=o.useState(null),q=o.useCallback((ae,ye)=>{const He=e[ye];if(!He)return;if(He.sortValue)return He.sortValue(ae);if(He.sortKey)return ae[He.sortKey];const Ke=l(ae)[ye]?.content;return typeof Ke=="string"||typeof Ke=="number"?Ke:void 0},[e,l]),Z=!t&&a&&!e.some(ae=>ae.sortDir!==void 0||ae.onClick),z=o.useCallback(ae=>{const ye=e[ae];if(!ye||ye.sortable===!1)return!1;if(ye.sortValue||ye.sortKey)return!0;const He=s[0];return He!==void 0&&q(He,ae)!==void 0},[e,s,q]),j=o.useMemo(()=>t?e.map(ae=>{if(!ae.sortKey||ae.sortDir!==void 0)return ae;const ye=t.field(String(ae.label??""),ae.sortKey);return{...ae,sortDir:ye.sortDir,onClick:ae.onClick??ye.onClick}}):Z?e.map((ae,ye)=>z(ye)?{...ae,sortDir:Y?.index===ye?Y.asc?"asc":"desc":null,onClick:()=>R(He=>He?.index===ye?{index:ye,asc:!He.asc}:{index:ye,asc:!0})}:ae):e,[e,t,Z,Y,z]),F=o.useMemo(()=>{if(!Z||!Y)return s;const{index:ae,asc:ye}=Y;return[...s].sort((He,Ke)=>gr(q(He,ae),q(Ke,ae),ye))},[s,Z,Y,q]),O=yn("(max-width: 767px)"),G=y&&O?y:null,ie=C&&!O,K=o.useRef(ie);K.current=ie;const pe=48,X=40,H=o.useRef(()=>pe),ne=_?`table-cols:${_}`:null,V=o.useRef(null),W=o.useRef(null),oe=o.useRef(null),xe=o.useRef(null),[be,me]=o.useState(!1),[ke,Le]=o.useState(0),Me=o.useCallback(()=>{const ae=oe.current;if(!ae)return;const ye=xe.current,He=V.current;if(ye&&(ye.style.minWidth="",He)){const Ke=He.scrollWidth,vt=K.current?X:0;ye.style.minWidth=Ke>ae.clientWidth+1?`${Ke+vt}px`:""}me(ae.scrollWidth>ae.clientWidth+1),Le(ae.clientWidth)},[]),le=o.useCallback((ae,ye)=>{const He=ae.current;He&&W.current&&W.current.unobserve(He),ae.current=ye,ye?(!W.current&&typeof ResizeObserver<"u"&&(W.current=new ResizeObserver(()=>Me())),W.current?.observe(ye)):!oe.current&&!xe.current&&(W.current?.disconnect(),W.current=null),Me()},[Me]),ve=o.useCallback(ae=>le(oe,ae),[le]),$e=o.useCallback(ae=>le(xe,ae),[le]);o.useEffect(()=>{Me()}),o.useEffect(()=>{if(typeof window>"u")return;const ae=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>Me()):null;return window.addEventListener("resize",Me),()=>{ae!=null&&cancelAnimationFrame(ae),window.removeEventListener("resize",Me)}},[Me]);const Ae=o.useRef(()=>!1),Ie=o.useRef([]),ze=o.useRef(null),dt=ae=>{if(!ae||typeof window>"u")return null;try{const ye=JSON.parse(window.localStorage.getItem(ae)??"null");return Array.isArray(ye)&&ye.length>0&&ye.every(He=>typeof He=="number"&&Number.isFinite(He)&&He>0)?ye:null}catch{return null}},[st,et]=o.useState(()=>dt(ne)),[gt,Se]=o.useState(ne),[Ge,we]=o.useState(()=>dt(ne)!==null);if(gt!==ne){Se(ne);const ae=dt(ne);et(ae),we(ae!==null)}const qe=o.useRef(st);o.useEffect(()=>{qe.current=st},[st]);const Ye=o.useCallback(ae=>{const ye=ze.current;if(!ye)return;const He=qe.current;if(He){const Ke=[...He],vt=()=>pe;if(ye.next!=null&&ye.startWNext!=null){const Ue=ae.clientX-ye.startX,ht=Math.max(vt()-ye.startW,Math.min(ye.startWNext-vt(),Ue));Ke[ye.index]=ye.startW+ht,Ke[ye.next]=ye.startWNext-ht}else Ke[ye.index]=Math.max(vt(),ye.startW+(ae.clientX-ye.startX));qe.current=Ke,et(Ke)}},[]),mt=o.useCallback(()=>{if(ze.current=null,window.removeEventListener("pointermove",Ye),window.removeEventListener("pointerup",mt),window.removeEventListener("pointercancel",mt),document.body.style.cursor="",document.body.style.userSelect="",ne&&qe.current)try{window.localStorage.setItem(ne,JSON.stringify(qe.current))}catch{}},[Ye,ne]),wt=o.useCallback((ae,ye)=>{ye.preventDefault(),ye.stopPropagation();const He=V.current;if(!He)return;const Ke=Array.from(He.children).map(Ue=>Ue.getBoundingClientRect().width),vt=f==="fit"?j.findIndex((Ue,ht)=>ht>ae&&Ue.resizable!==!1):-1;ze.current=vt>=0?{index:ae,startX:ye.clientX,startW:Ke[ae],next:vt,startWNext:Ke[vt]}:{index:ae,startX:ye.clientX,startW:Ke[ae]},qe.current=Ke,et(Ke),we(!0),window.addEventListener("pointermove",Ye),window.addEventListener("pointerup",mt),window.addEventListener("pointercancel",mt),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[Ye,mt,f,j]),yt=o.useCallback(()=>{const ae=V.current,ye=ae?.closest(".table-wrap");if(!ae||!ye)return null;const He=ye.style.getPropertyValue("--table-grid-cols");ye.style.setProperty("--table-grid-cols",j.map(()=>"max-content").join(" "));const Ke=Array.from(ye.querySelectorAll(".table-row")).filter($t=>!$t.classList.contains("table-row--loading")&&!$t.classList.contains("table-row--empty")),vt=$t=>Array.from($t.children).map(Pt=>{const Ut=window.getComputedStyle(Pt);return{width:Pt.getBoundingClientRect().width,span:c4(Ut.gridColumnStart,Ut.gridColumnEnd)}}),Ue=parseFloat(window.getComputedStyle(ae).columnGap)||0,ht=Ke.map(vt),cn=vt(ae),dn=u4([cn,...ht],j.length,Ue),zt=h4(j.map(($t,Pt)=>({declaredMin:H.current(Pt),headWidth:cn[Pt]?.width??0,sortable:$t.sortDir!==void 0||!!$t.onClick,sorted:!!$t.sortDir}))),qt=$t=>zt[$t]??H.current($t),Ht=j.map(($t,Pt)=>{const Ut=dn[Pt],Jt=Ae.current(Pt)?parseFloat(Ie.current[Pt]):NaN;return Number.isFinite(Jt)&&Math.ceil(Ut)>Jt&&At(`table-fixed-col-overflow:${Pt}:${Jt}`,`[ihabdevteam-core] Table \uC758 ${Pt+1}\uBC88\uC9F8 \uC5F4\uC744 ${Jt}px \uB85C \uC815\uD574 \uB450\uC5C8\uB294\uB370 \uC548\uC758 \uB0B4\uC6A9\uC740 ${Math.ceil(Ut)}px \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4 \u2014 \uADF8\uB9CC\uD07C \uC798\uB824 \uB098\uAC11\uB2C8\uB2E4. gridTemplateColumns(\uB610\uB294 fields[].width)\uC758 \uADF8 \uC5F4\uC744 ${Math.ceil(Ut)}px \uC774\uC0C1\uC73C\uB85C \uB298\uB9AC\uC138\uC694.`),Number.isFinite(Jt)?Jt:Math.max(H.current(Pt),Math.ceil(Ut))}),Nt=window.getComputedStyle(ae),An=(parseFloat(Nt.paddingLeft)||0)+(parseFloat(Nt.paddingRight)||0),an=ye.clientWidth-An;return He?ye.style.setProperty("--table-grid-cols",He):ye.style.removeProperty("--table-grid-cols"),d4(Ht,{isFixed:$t=>Ae.current($t),floorOf:qt,containerWidth:an})},[j,f]),Et=(ae,ye)=>ae!==null&&ae.length===ye.length&&ae.every((He,Ke)=>He===ye[Ke]),at=o.useRef(yt);o.useEffect(()=>{at.current=yt});const[rt,Dt]=o.useState(0),Bt=F.length>0,Lt=`${ne??""}|${rt}|${j.length}|${ke}`,It=!Ge&&ie&&ne!==null&&!D?`${Lt}|${Bt?1:0}`:null,xt=o.useRef(null);o.useEffect(()=>{if(It===null||!Bt||xt.current===Lt)return;const ae=at.current();ae&&(xt.current=Lt,et(ye=>Et(ye,ae)?ye:ae))},[It]);const lt=o.useCallback(()=>{if(ne)try{window.localStorage.removeItem(ne)}catch{}we(!1);const ae=at.current();et(ae),qe.current=ae,Dt(ye=>ye+1)},[ne]);o.useEffect(()=>()=>{ze.current&&(window.removeEventListener("pointermove",Ye),window.removeEventListener("pointerup",mt),window.removeEventListener("pointercancel",mt),document.body.style.cursor="",document.body.style.userSelect="")},[Ye,mt]);const Ct=j.length>0&&j.every(ae=>ae.width!=null)?j.map(ae=>typeof ae.width=="number"?`${ae.width}px`:String(ae.width)).join(" "):null;j.some(ae=>ae.width!=null)&&!Ct&&At(`table-field-width:${j.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."),Ct&&g&&At("table-field-width-conflict","[ihabdevteam-core] Table \uC5D0 fields[].width \uC640 gridTemplateColumns \uAC00 \uB458 \uB2E4 \uC788\uC2B5\uB2C8\uB2E4. gridTemplateColumns \uAC00 \uC774\uAE41\uB2C8\uB2E4 \u2014 \uD55C\uCABD\uB9CC \uB450\uC138\uC694.");const it=g??Ct??void 0,_t=i4(it),ut=_t.filter(ae=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(ae));ut.length>0&&At(`table-content-track:${g}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${ut.join(", ")})\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uBA38\uB9AC\uC640 \uBAB8\uD1B5\uC740 \uC11C\uB85C \uB2E4\uB978 \uACA9\uC790\uB77C \uADF8 \uD2B8\uB799\uC774 \uAC01\uC790 \uB2E4\uB974\uAC8C \uD480\uB824 \uC5F4\uC774 \uC5B4\uAE0B\uB0A9\uB2C8\uB2E4. px \uC774\uB098 fr \uC744 \uC4F0\uC138\uC694. (\uBC1B\uC740 \uAC12: ${g})`);const St=j.findIndex(ae=>!!ae.sortDir);j.filter(ae=>!!ae.sortDir).length>1&&At("table-multi-sort","[ihabdevteam-core] Table \uC758 fields \uC5D0 sortDir \uC774 \uB458 \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4. aria-sort \uB294 \uD45C \uD558\uB098\uC5D0 \uD55C \uCE78\uB9CC \uAC00\uC9C8 \uC218 \uC788\uC5B4 \uCCAB \uCE78\uB9CC \uBC29\uD5A5\uC73C\uB85C \uC54C\uB9AC\uACE0 \uB098\uBA38\uC9C0\uB294 none \uC73C\uB85C \uB461\uB2C8\uB2E4.");const ue=ae=>ae===St?j[ae].sortDir==="asc"?"ascending":"descending":j[ae].onClick?"none":void 0,Te=ae=>/^\d+(\.\d+)?px$/.test(_t[ae]??""),Ne=ae=>{const ye=_t[ae]??"",He=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(ye)??/^(\d+(?:\.\d+)?)px$/.exec(ye);return He?parseFloat(He[1]):pe};Ae.current=Te,H.current=Ne,Ie.current=_t;const tt=ae=>f==="fit"&&!Te(ae)?"fr":"px",pt=st&&st.length===j.length&&!O,jt=G??(pt?j.map((ae,ye)=>ae.resizable===!1&&_t[ye]?_t[ye]:`${st[ye]}${tt(ye)}`).join(" "):it),je=jt?{"--table-grid-cols":jt}:void 0,nt=w!==void 0;return n.jsxs("div",{ref:ve,className:`table-wrap table-wrap--${b}${ie?" table-wrap--resizable":""}${N?" table-wrap--dragover":""}${x?" table-wrap--collapsed":""}`,style:je,onDragOver:$,onDragLeave:L,onDrop:U,tabIndex:be?0:void 0,role:be?"region":void 0,"aria-label":be?typeof w=="string"?w:T("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:I,className:"table-row-hint",children:T("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:$e,role:"table","aria-labelledby":nt&&typeof w=="string"?te:void 0,className:"table body-2",children:[nt&&n.jsxs("div",{className:Be("table-header",A&&"table-header--clickable"),onClick:A,role:"caption",children:[A&&n.jsx(fe,{htmlType:"button",size:Ft,type:"dot",variant:"transparent-gray",useBorder:!1,icon:x?"chevron-right":"chevron-down",ariaLabel:x?T("common.expand","\uD3BC\uCE58\uAE30"):T("common.collapse","\uC811\uAE30"),ariaExpanded:!x,className:"table-header__chevron"}),v&&n.jsx(ot,{icon:v,label:typeof w=="string"?w:void 0,className:"table-header__icon"}),n.jsx("span",{id:te,className:"table-header__title h5b",children:w}),k!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:k}),B&&n.jsx("span",{className:"table-header__actions",onClick:ae=>ae.stopPropagation(),children:B})]}),!x&&n.jsxs(n.Fragment,{children:[r&&r.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:r.map((ae,ye)=>n.jsx("div",{role:"columnheader","aria-colspan":ae.span,className:Be("table-field body-3",ae.className),style:{gridColumn:`span ${ae.span}`},children:ae.label},ye))}),n.jsxs("div",{role:"presentation",className:Be("table-fields-strip",ie&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:V,children:j.map((ae,ye)=>n.jsx(f4,{onClick:ae.onClick,className:Be(ae.className,Qu(ae.align)),sortDir:ae.sortDir,ariaSort:ue(ye),onResizeStart:ie&&ye<j.length-1&&ae.resizable!==!1&&(f!=="fit"||j.some((He,Ke)=>Ke>ye&&He.resizable!==!1))?He=>wt(ye,He):void 0,children:ae.label},ye))}),ie&&n.jsx("div",{className:"table-fields__reset-dock",children:n.jsx(fe,{htmlType:"button",size:Ft,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:lt})})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:D?n.jsx(Jo,{variant:"loading",colSpan:j.length||void 0}):F.length===0&&E?n.jsx(Jo,{variant:"empty",colSpan:j.length||void 0,children:E}):F.map((ae,ye)=>{const He=m!=null&&ae.id===m,Ke=!!i&&(u?u(ae):!0),vt=P!=null&&ae.id!=null&&(P instanceof Set?P.has(ae.id)||[...P].some(Ue=>String(Ue)===String(ae.id)):String(ae.id)===String(P));return n.jsx(Jo,{className:`${Ke?" table-row--clickable":""}${h?" table-row--draggable":""}${He?" table-row--dragging":""}`.trim(),draggable:!!h,onClick:Ke?()=>i(ae):void 0,colSpan:j.length||void 0,rowHasButton:l(ae).some(Ue=>!!Ue.rowLabel),describedBy:I,onMouseEnter:c?Ue=>c(ae,Ue):void 0,onMouseLeave:d?Ue=>d(ae,Ue):void 0,onDragStart:h?Ue=>h(ae,Ue):void 0,onDragEnd:p?Ue=>p(ae,Ue):void 0,expandedContent:vt&&M?M(ae):void 0,children:l(ae).map((Ue,ht)=>n.jsx(m4,{className:Be(Ue.className,Qu(j[ht]?.align)),style:Ue.style,span:Ue.span,rowLabel:Ke?Ue.rowLabel:void 0,onRowClick:Ke?()=>i(ae):void 0,children:Ue.content},ht))},ae.id!=null?`${typeof ae.id}:${ae.id}`:`__idx:${ye}`)})})]})]})]})}function ec(e,t){return t!=="wornAt"?String(e[t]??""):kv(e.wornYear,e.wornMonth,e.wornDay)}function b4({rows:e,loading:t,onSelect:a,onDelete:r,onWear:s,onRelease:l,onAdd:i}){const{t:u,i18n:c}=_e.useTranslation(),d=f=>f==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:h,field:p}=$y(),m=o.useMemo(()=>{if(!h)return e;const{key:f,asc:_}=h;return[...e].sort((b,w)=>{if(f==="worn"){const v=Number(w.worn)-Number(b.worn);return _?v:-v}return gr(ec(b,f),ec(w,f),_)})},[e,h]),{pageRows:g,pageSizeProps:y,paginationProps:C}=Ly(m,h);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(Wo,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:y,pagination:C,actions:i&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),n.jsx(Qo,{loading:t,resizable:!0,resizeMode:"fit",resizeStorageKey:"customer-device-history-v2",fields:[{...p(u("customers.device.wearingNow","\uCC29\uC6A9"),"worn"),resizable:!1},p(u("device.direction.label","\uBC29\uD5A5"),"side"),p(u("device.deviceType","\uC885\uB958"),"device"),p(u("device.brand","\uBE0C\uB79C\uB4DC"),"brand"),p(u("device.fitType","\uCC29\uC6A9\uD615\uD0DC"),"fitType"),p(u("device.productName","\uC81C\uD488\uBA85"),"productName"),p(u("device.wornDate","\uCC29\uC6A9\uC77C"),"wornAt"),...r?[{label:"",resizable:!1}]:[]],items:g.map((f,_)=>({id:f.id??`${f.side}-${_}`,row:f})),gridTemplateColumns:`56px 110px 110px minmax(120px, 1fr) 100px minmax(120px, 1fr) 110px${r?" 80px":""}`,renderRow:({row:f})=>[{content:n.jsx("span",{className:"dlp-worn-check",onClick:_=>_.stopPropagation(),children:n.jsx(Oo,{checked:f.worn,disabled:f.worn?!l:!s,ariaLabel:f.worn?u("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):u("customers.device.wear","\uCC29\uC6A9"),onChange:_=>{_?s?.(f):l?.(f)}})})},{content:n.jsx("span",{children:d(f.side)})},{content:f.device?n.jsx(ln,{size:"small",variant:Au(f.device),fill:"soft",label:Nu(f.device,u)}):n.jsx("span",{})},{content:n.jsx("span",{children:f.brand})},{content:n.jsx("span",{children:f.fitType||"-"})},{content:n.jsx("span",{children:f.productName||"-"})},{content:n.jsx("span",{className:"dlp-date",children:Fo(f.wornYear,f.wornMonth,f.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(f)}})})}]:[]],onRowClick:({row:f})=>a(f),empty:u("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function tc(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 g4(e,t){return new Date(e,t+1,0).getDate()}function y4(e,t){return new Date(e,t,1).getDay()}function v4({visits:e=[],onVisitClick:t,onVisitMove:a,onDayClick:r,today:s}){const{t:l,i18n:i}=_e.useTranslation(),u=o.useMemo(()=>l("calendar.dow",{returnObjects:!0}),[l]),c=cr(s),[d,h]=o.useState(()=>Number(c.slice(0,4))),[p,m]=o.useState(()=>Number(c.slice(5,7))-1),[g,y]=o.useState(null),C=o.useRef(null),f=o.useMemo(()=>{const x={};return e.forEach(A=>{x[A.date]||(x[A.date]=[]),x[A.date].push(A)}),x},[e]),_=o.useMemo(()=>{const x=g4(d,p),A=y4(d,p),B=[];for(let E=0;E<A;E++)B.push(null);for(let E=1;E<=x;E++)B.push(E);for(;B.length<35;)B.push(null);return B},[d,p]),b=o.useCallback(()=>{p===0?(h(x=>x-1),m(11)):m(x=>x-1)},[p]),w=o.useCallback(()=>{p===11?(h(x=>x+1),m(0)):m(x=>x+1)},[p]),v=x=>`${d}-${String(p+1).padStart(2,"0")}-${String(x).padStart(2,"0")}`,k=x=>v(x)===c;return n.jsxs("div",{children:[n.jsxs("div",{className:"calendar-nav",children:[n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:b,"aria-label":l("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(ot,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:co(l,i.language,d,p+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:w,"aria-label":l("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(ot,{icon:"chevron-right",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsxs("div",{className:"calendar-nav__legend",children:[n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--main"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.visited","\uBC29\uBB38")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--sub"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.scheduled","\uC608\uC57D")}),n.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--disabled"}),n.jsx("span",{className:"caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]})]}),n.jsxs("div",{className:"calendar-grid",children:[u.map(x=>n.jsx("div",{className:"calendar-day-header body-3",children:x},x)),_.map((x,A)=>{if(x===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${A}`);const B=x,E=v(B),D=f[E]??[],N=ql(E,i.language),$=g===E;return n.jsxs("div",{className:`calendar-cell${k(B)?" today":""}${$?" drag-over":""}${r?" calendar-cell--clickable":""}`,role:r?"button":void 0,tabIndex:r?0:void 0,"aria-label":r?l("calendar.addOnDate",{date:E}):void 0,"aria-current":k(B)?"date":void 0,onClick:r?()=>r(E):void 0,onKeyDown:r?L=>{L.target===L.currentTarget&&(L.key!=="Enter"&&L.key!==" "||(L.preventDefault(),r(E)))}:void 0,onDragOver:a?L=>{L.preventDefault(),y(E)}:void 0,onDragLeave:a?L=>{L.currentTarget.contains(L.relatedTarget)||y(null)}:void 0,onDrop:a?L=>{L.preventDefault(),C.current!=null&&(a(C.current,E),C.current=null),y(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:B}),D.length>0&&(()=>{const L=[{key:"visited",label:l("calendar.legend.visited","\uBC29\uBB38"),count:D.filter(M=>(M.status??"visited")==="visited").length},{key:"scheduled",label:l("calendar.legend.scheduled","\uC608\uC57D"),count:D.filter(M=>M.status==="scheduled").length},{key:"noVisit",label:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:D.filter(M=>M.status==="noVisit").length}].filter(M=>M.count>0),U=L.length===1&&L[0].key==="visited"?l("calendar.visitCount",{count:D.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):L.map(M=>l("calendar.statusCount",{label:M.label,count:M.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return n.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${N} ${U}`,children:[L.map(M=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${M.key}`,"aria-hidden":"true"},M.key)),D.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:D.map((L,U)=>n.jsxs("div",{draggable:!!a,className:`calendar-visit-badge${L.status==="noVisit"?" calendar-visit-badge--no-visit":L.status==="scheduled"?" calendar-visit-badge--scheduled":""}${t?" calendar-visit-badge--clickable":""}${a?" calendar-visit-badge--draggable":""}`,onDragStart:a?M=>{C.current=L.id,M.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:a?()=>{C.current=null,y(null)}:void 0,onClick:t?M=>{M.stopPropagation(),t(L)}:void 0,...tc(t?()=>t(L):void 0),"aria-label":[N,L.time?Zl(L.time,l):null,L.customer,l(L.status==="noVisit"?"calendar.legend.noVisit":L.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[L.time&&n.jsx("span",{className:"calendar-visit-badge__time body-3",children:Zl(L.time,l)}),n.jsx("span",{className:"calendar-visit-badge__name body-3",children:L.customer}),L.status==="noVisit"&&n.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},L.id??U))})]},B)})]})]})}const _4={page:"h3",pagePopup:"h4",popup:"h5"};function _a({type:e="page",title:t,headingLevel:a=2,icon:r,action:s,disc:l,children:i,inGrid:u=!1,className:c,style:d}){const h=_4[e],p=t||l||s||r,m=a?`h${a}`:"div";return n.jsxs("div",{className:Be("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(ot,{icon:r,label:typeof t=="string"?t:void 0,className:"section__icon"}),n.jsxs("div",{className:"section__title-group",children:[t&&n.jsx(m,{className:`section__title ${h}`,children:t}),l&&n.jsx("div",{className:"section__disc body-3",children:l})]})]}),s&&n.jsx("div",{className:"section__action",children:s})]}),i]})}let es=null,nc=!1;function ac(){if(nc||typeof document>"u")return;nc=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(es="keyboard")},!0);const e=()=>{es="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}ac();function wr(){return ac(),es==="keyboard"}const Br=20;function x4(e){const{t}=_e.useTranslation(),{type:a,trainingDatas:r,depth:s,renderPopup:l,completedIds:i,selectedIds:u,onItemComplete:c,size:d,useDescriptionTooltip:h,onRemove:p,onMore:m,sectionType:g="page"}=e||{},[,y]=o.useState(0),C=typeof r<"u"?Array.isArray(r)?r:[]:[],f=C.length,[_,b]=o.useState(Math.min(f,Br)),w=o.useMemo(()=>Array.isArray(s)?[...s,a?.label].filter(Boolean).join(" \xB7 "):[s||"",a?.label].filter(Boolean).join(" \xB7 "),[s,a?.label]);o.useEffect(()=>{b(Math.min(f,Br))},[f]),zi("speechear.data.updated",()=>y(A=>A+1));const v=o.useRef(null),k=o.useRef(null);function x(){const A=document.activeElement;k.current=wr()&&A&&A.closest?.(".training-block__more")?_:null,b(B=>Math.min(f,B+Br))}return o.useEffect(()=>{const A=k.current;if(A==null)return;k.current=null;const B=document.activeElement;B&&B!==document.body||v.current?.querySelectorAll(".training-block-button")[A]?.focus()},[_]),n.jsxs(_a,{type:g,title:a?.label,icon:a?.icon,disc:a?.desc,className:"training-block",children:[n.jsx("div",{className:"training-list",ref:v,children:(C||[]).slice(0,_).map((A,B)=>{const E=A;return n.jsx(Ro,{index:B,type:a,trainingData:E,depth:w,renderPopup:l,completedIds:i,selectedIds:u,size:d,useDescriptionTooltip:h,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 m=="function"?D=>m(E,D):void 0},E?.id!=null?`${a?.key||"t"}-${String(E.id)}`:`${a?.key||"t"}-${B}`)})}),f>Br&&_<f&&n.jsx("div",{className:"training-block__more",children:n.jsx(fe,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:x,ariaLabel:t("common.loadMore","\uB354\uBCF4\uAE30"),label:t("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function w4(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 B4({gap:e=10,count:t,className:a,children:r}){const s=o.useRef(null),[l,i]=o.useState({width:0,card:0}),u=t??w4(r);o.useLayoutEffect(()=>{const m=s.current;if(!m)return;const g=()=>{const C=m.style.maxWidth;m.style.maxWidth="none";const f=m.clientWidth;m.style.maxWidth=C;const _=m.firstElementChild?.offsetWidth??0;i(b=>b.width===f&&b.card===_?b:{width:f,card:_})};if(g(),typeof ResizeObserver>"u")return;const y=new ResizeObserver(g);return y.observe(m),()=>y.disconnect()},[u,e]);const c=l.card>0?l.card:0,d=c>0?_f(l.width,c,e):0,h=d>0?xf(u,d):0,p={"--block-grid-gap":`${e}px`,...h>0?{"--block-grid-cols":h,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:s,className:Be("training-block-grid",h>0&&"training-block-grid--measured",a),style:p,"data-cols":h>0?h:void 0,children:r})}function ts(e){const t=o.useRef(null),a=o.useRef(e);a.current=e;const[r,s]=o.useState({url:e,loading:!!e,failed:!1}),l=r.url===e?r:{loading:!!e,failed:!1};o.useEffect(()=>{const c=t.current;s({url:e,failed:!1,loading:!!e&&!(c?.complete&&c.naturalWidth>0)})},[e]);const i=o.useCallback(()=>{a.current===e&&s({url:e,loading:!1,failed:!1})},[e]),u=o.useCallback(()=>{a.current===e&&s({url:e,loading:!1,failed:!0})},[e]);return{imgRef:t,loading:l.loading,failed:l.failed,hasImage:!!e&&!l.failed,onLoad:i,onError:u}}var k4='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 A4=k4,ns=o.forwardRef(function({item:e,disabled:t=!1,onPlayDone:a,selectable:r=!1,selected:s=!1,onSelect:l,flipDelay:i=0,hideLabel:u=!1,hideAudio:c=!1,orderRank:d=null},h){const{t:p}=_e.useTranslation(),m=e.word||e.title||"",g=t||!m,y=e.audio??e.sound??e.audioKey,C=e.subLabel||e.pronunciation||"",f=e.colloquialLabel||"",[_,b]=o.useState({label:m,subLabel:C,colloquialLabel:f,homonum:e.homonum});m&&(_.label!==m||_.subLabel!==C||_.colloquialLabel!==f||!Object.is(_.homonum,e.homonum))&&b({label:m,subLabel:C,colloquialLabel:f,homonum:e.homonum});const w=o.useRef(null),v=yn("(max-width: 767px)"),[k,x]=o.useState(!1),[A,B]=o.useState(!1),E=`${typeof y=="string"?y:y?.src??""}\0${m}`,[D,N]=o.useState({for:"",url:""}),$=D.for===E?D.url:"",L=Wl(),U=e.textOnly??(!e.image&&!!_.label&&!!L&&L.entries.length>0&&!L.byWord.has(_.label)),M=U?"":pa()?.(_.label,_.homonum)??e.image??"",{imgRef:P,loading:T,hasImage:ee,onLoad:te,onError:I}=ts(M);o.useEffect(()=>{let G=!1;return(async()=>{if(y){if(typeof y=="string"){if(y.startsWith("http")||y.includes("/")){N({for:E,url:y});return}}else if(typeof y=="object"&&!Array.isArray(y)){const K=y.src;if(K){N({for:E,url:K});return}}}const ie=ja();if(ie&&m)try{const K=await Promise.resolve(ie(m));!G&&K&&N({for:E,url:K})}catch{}})(),()=>{G=!0}},[y,m,E]);const Y=o.useRef(!0),R=o.useRef(null);o.useEffect(()=>(Y.current=!0,()=>{Y.current=!1,R.current&&_r(R.current),R.current=null;try{w.current?.pause()}catch{}w.current=null}),[]);const q=o.useCallback(()=>new Promise(G=>{if(typeof window<"u"&&window.speechSynthesis&&m){x(!0),window.speechSynthesis.cancel();const ie=new SpeechSynthesisUtterance(m);ie.lang="ko-KR",ie.onend=()=>{x(!1);try{a?.()}catch{}G()},ie.onerror=()=>{x(!1),G()},window.speechSynthesis.speak(ie)}else G()}),[m,a]),Z=o.useCallback(G=>{const ie=Ya(G,K=>{if(x(!1),K)try{a?.()}catch{}});return w.current=ie.el,ie.done},[a]),z=o.useCallback(async()=>{if(t||!Y.current)return;const G=()=>{R.current===G&&(R.current=null);try{w.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}x(!1)},ie=Ka(G);R.current=G;try{window.speechSynthesis?.cancel()}catch{}try{if($&&(x(!0),await Z($)))return;const K=sr();if(K&&m)try{B(!0);const pe=await Promise.resolve(K(m));if(!Y.current||R.current!==G||(B(!1),pe&&(x(!0),await Z(pe))))return}catch{}if(!Y.current||R.current!==G)return;await q()}finally{R.current===G&&B(!1),ie(),R.current===G&&(R.current=null)}},[t,$,m,Z,q]);o.useImperativeHandle(h,()=>({play:()=>z()}),[z]);const j=G=>G.stopPropagation(),F=o.useCallback(G=>{if(G.stopPropagation(),!t){if(k){try{w.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}x(!1);return}z()}},[t,k,z]),O=Be("training-word-card",t?"training-word-card--disabled":"",g?"training-word-card--flipped":"",r?"training-word-card--selectable":"",s?"training-word-card--selected":"");return n.jsx("div",{className:O,onClick:r&&!t?l:void 0,role:r?"button":void 0,"aria-pressed":r?s:void 0,tabIndex:r&&!t?0:void 0,"aria-disabled":r&&t?!0:void 0,onKeyDown:r&&!t?G=>{G.target===G.currentTarget&&(G.key==="Enter"||G.key===" "||G.key==="Spacebar")&&(G.preventDefault(),l?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:g?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[s&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:j,children:n.jsx(Dn,{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:U?n.jsx("div",{className:"training-word-card__text-face",children:_.label}):ee?n.jsxs(n.Fragment,{children:[T&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:P,className:"training-word-card__image",src:M,alt:_.label||p("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:T?0:1},onLoad:te,onError:I})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!U&&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?j:void 0,children:n.jsx(fe,{htmlType:"button",size:v?40:48,type:v?"dot":"bar",icon:k?"pause":"play",label:v?void 0:p("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:k,loading:A,onClick:F,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("${A4}")`}})})]})})});function kr(e){return String(e)}const Ar=["o","triangle","x"];function rc(e,t){return e===t?null:t}const oc={o:"circle",triangle:"triangle",x:"x"},sc={o:"main",triangle:"warn",x:"danger"};function N4(e){let t=0,a=0,r=0;for(const l of Object.values(e))l==="o"?t++:l==="triangle"?a++:l==="x"&&r++;const s=t+a+r;return{marked:s,o:t,triangle:a,x:r,rate:s===0?null:(t+a*.5)/s}}function as(e){const t={};for(const[a,r]of Object.entries(e))(r==="o"||r==="triangle"||r==="x")&&(t[a]=r);return t}function lc(e){const t=[];let a=0;for(const r of e)t.push(a),a+=r;return t}function E4(e,t){return!t&&e>0}const aa={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 D4(e="landscape"){At("print-word-table-deprecated","[printWordTable] @deprecated \u2014 WordTablePopup renderButtons \uC758 print(\uB610\uB294 useWordTablePrint().print)\uB97C \uC4F0\uC138\uC694. \uC804\uC5ED \uC778\uC1C4\uB294 \uD654\uBA74\uC758 \uBAA8\uB4E0 \uB2E8\uC5B4\uD45C\uB97C \uD568\uAED8 \uCC0D\uC2B5\uB2C8\uB2E4.");const{printSize:t,printW:a,printH:r}=aa[e],s=document.createElement("style");s.textContent=`@page { size: ${t}; margin: 0; } .word-table { width: ${a} !important; height: ${r} !important; }`,document.head.appendChild(s);const l=()=>{document.head.removeChild(s),window.removeEventListener("afterprint",l)};window.addEventListener("afterprint",l),window.print()}function S4(e,t){if(e.length===0)return[[]];const a=Math.max(1,Math.floor(t)),r=[];for(let s=0;s<e.length;s+=a)r.push(e.slice(s,s+a));return r}const j4={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 ic(e,t){const a=j4[e][t];if(a)return a;const r=Math.max(1,Math.ceil(t)),s=Math.max(1,Math.ceil(Math.sqrt(r*.707)));let l,i;return e==="landscape"?(i=s,l=Math.ceil(r/i)):(l=s,i=Math.ceil(r/l)),(e==="landscape"?l<i:i<l)&&([l,i]=[i,l]),{cols:l,rows:i}}function T4(e,t){const a=ic(e==="landscape"?"portrait":"landscape",t),r=Math.max(1,Math.ceil(t));if(r<=1)return a;const s=aa[e],l=e==="landscape"?s.width/2:s.width,i=e==="landscape"?s.height:s.height/2,u=(m,g)=>Math.min(l/m/hc,i/g/mc),c=Math.max(0,a.cols*a.rows-r),d=u(a.cols,a.rows);let h=a,p=d;for(let m=1;m<=r;m++){const g=Math.ceil(r/m);if(m*g-r>c)continue;const y=u(m,g);y>p&&(h={cols:m,rows:g},p=y)}return p>d*1.05?h:a}const M4={show:"word-table__content--cut-show",dashed:"",corner:"word-table__content--cut-corner",hide:""},uc={\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"},cc={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},rs={\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"},os={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function dc(e){return Object.fromEntries(Object.entries(uc).map(([t,a])=>[t,rs[t]?e(`wordTable.pos.${rs[t]}`,{defaultValue:a}):a]))}function pc(e){return Object.fromEntries(Object.entries(cc).map(([t,a])=>[t,os[t]?e(`wordSearch.filter.type.${os[t]}`,{defaultValue:a}):a]))}const L4={pos:rs,wordType:os};function ss(e,t){return e?e.split("/").map(a=>t[a]??a).join("/"):""}function ls(e,t,a,r){if(r!=="dashed")return{};const s=e%t,l=Math.floor(e/t),i=s<t-1,u=l<a-1;if(!i&&!u)return{};const c="#ddd",d=g=>`repeating-linear-gradient(to ${g}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,h=[],p=[],m=[];return i&&(h.push(d("bottom")),p.push("1px 100%"),m.push("right center")),u&&(h.push(d("right")),p.push("100% 1px"),m.push("center bottom")),{backgroundImage:h.join(", "),backgroundSize:p.join(", "),backgroundPosition:m.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const hc=280,$4=240,R4=280,mc=400,P4=120,F4=280;function Cc(e,t){const a=o.useRef(null),[r,s]=o.useState(1),[l,i]=o.useState(0),u=o.useCallback((c,d)=>{if(!(c>0))return;const h=c/e,p=t&&d>0?d/t:1/0,m=Math.min(1,h,p);s(m),i(Math.max(0,(c-e*m)/2))},[e,t]);return o.useEffect(()=>{const c=a.current;if(!c)return;const d=t?c.parentElement??c:c;if(u(d.clientWidth,d.clientHeight),typeof ResizeObserver>"u")return;const h=new ResizeObserver(([p])=>u(p.contentRect.width,p.contentRect.height));return h.observe(d),()=>h.disconnect()},[u,t]),{scalerRef:a,scale:r,offset:l}}const I4=24,O4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},z4=400,fc=8;function W4(e){return e<=1?"100%":`repeat(${e}, calc((100% - ${e-1} * var(--wt-cell-gap, 0px)) / ${e}))`}function is({label:e,subLabel:t,colloquialLabel:a,captionLabel:r,captionBadge:s,imageLabel:l,pickForm:i,homonum:u,showWord:c=!0,showImage:d=!0,showPronunciation:h=!0,showColloquial:p=!0,showCaption:m=!0,buttonSize:g=40,wordInfo:y,outerScale:C=1}){const{t:f}=_e.useTranslation(),_=o.useRef(null),b=o.useRef(null),w=o.useRef(null),[v,k]=o.useState(1),[x,A]=o.useState(!1),[B,E]=o.useState(!1),[D,N]=o.useState({for:"",url:""}),[$,L]=o.useState(null),U=t&&t.length>0?t:U1()?.(e,u)??"",M=pa()?.(l||e,u)??"",{imgRef:P,loading:T,failed:ee,onLoad:te,onError:I}=ts(M),Y=o.useCallback(()=>L(b.current?.getBoundingClientRect()??null),[]),R=o.useCallback(()=>L(null),[]),q=fr(!!$,ne=>{ne?Y():R()},b),Z=o.useMemo(()=>{if(!y)return null;const ne=[];return y.grade&&ne.push(f("wordTable.info.grade",{n:y.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),y.syllables&&ne.push(f("wordTable.info.syllables",{n:y.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),y.pos&&ne.push(f("wordTable.info.pos",{v:ss(y.pos,dc(f)),defaultValue:"\uD488\uC0AC: {{v}}"})),y.wordType&&ne.push(f("wordTable.info.wordType",{v:ss(y.wordType,pc(f)),defaultValue:"\uC720\uD615: {{v}}"})),ne.length?ne:null},[y,f]),z=U||e,j=D.for===z?D.url:"";o.useEffect(()=>{const ne=ja(),V=U||e;if(!ne||!V)return;let W=!1;return Promise.resolve(ne(V)).then(oe=>{!W&&oe&&N({for:V,url:oe})}),()=>{W=!0}},[U,e]);const F=o.useRef(null),O=o.useRef(null);o.useEffect(()=>()=>{w.current?.pause(),O.current?.()},[]);const G=o.useRef(null);o.useEffect(()=>()=>{G.current&&(G.current.cancelled=!0)},[]);const ie=o.useCallback(ne=>{if(ne.stopPropagation(),x||B){F.current?.();return}if(!j){const W=sr(),oe=U||e;if(!W||!oe)return;const xe={cancelled:!1,stop:null};G.current=xe;const be=()=>{xe.cancelled=!0,xe.stop?.(),E(!1),A(!1),O.current?.()};F.current=be,O.current=Ka(be),E(!0),Promise.resolve().then(()=>W(oe)).then(me=>{if(xe.cancelled)return;if(!me){be();return}N({for:oe,url:me});const ke=Ya(me,()=>{A(!1),O.current?.()});w.current=ke.el,xe.stop=ke.stop,E(!1),A(!0)}).catch(()=>{be()});return}A(!0);const V=Ya(j,()=>{A(!1),O.current?.()});w.current=V.el,F.current=V.stop,O.current=Ka(V.stop)},[x,B,j,U,e]),K=d&&!!M&&!ee,pe=K&&c?hc:K?R4:$4,X=K&&c?mc:K?F4:P4;o.useEffect(()=>{const ne=_.current;if(!ne||typeof ResizeObserver>"u")return;const V=new ResizeObserver(([W])=>{const{width:oe,height:xe}=W.contentRect;k(Math.min(oe/pe,xe/X))});return V.observe(ne),()=>V.disconnect()},[pe,X]);const H=g*C<I4;return n.jsxs("div",{ref:_,className:Be("word-table-cell",H&&"word-table-cell--tap-too-small",K?"word-table-cell--with-image":""),"data-ref-w":pe,"data-ref-h":X,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${v})`},children:[K&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[T&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:P,className:"word-table-cell__image",src:M,alt:e,draggable:!1,style:{opacity:T?0:1},onLoad:te,onError:I})]}),m&&(s||r)&&n.jsxs("span",{className:"word-table-cell__caption",children:[s&&n.jsx(ln,{fill:"soft",size:"small",label:s}),r&&n.jsx("span",{className:"word-table-cell__caption-tail h5",children:r})]}),c&&n.jsx("span",{className:"word-table-cell__word h0",children:e}),h&&U&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",U,"]"]}),p&&a&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",a,"]"]})]}),n.jsxs("div",{className:"word-table-cell__side",children:[n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":j,children:[n.jsx("span",{"data-play-state":"play",style:{display:x?"none":void 0},children:n.jsx(fe,{htmlType:"button",size:g,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,loading:B,showTooltipInfo:B?f("common.loading","\uBD88\uB7EC\uC624\uB294 \uC911"):f("common.play","\uC7AC\uC0DD"),ariaLabel:e?f("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):f("common.play","\uC7AC\uC0DD"),onClick:ie})}),n.jsx("span",{"data-play-state":"pause",style:{display:x?void 0:"none"},children:n.jsx(fe,{htmlType:"button",size:g,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:f("common.pause","\uBA48\uCDA4"),ariaLabel:e?f("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):f("common.pause","\uBA48\uCDA4"),onClick:ie})})]}),y&&n.jsxs("div",{ref:b,className:"word-table-cell__info-button",onPointerEnter:ne=>{Un(ne)||Y()},onPointerLeave:ne=>{Un(ne)||R()},onFocus:()=>{ea()||Y()},onBlur:R,children:[n.jsx(fe,{htmlType:"button",size:g,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:f("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:ne=>{ne.stopPropagation(),q.touchPress()}}),$&&Z&&n.jsx(qn,{anchorRect:$,items:Z,showIndex:!1})]}),i&&n.jsx("div",{className:"word-table-cell__form-button",children:n.jsx(fe,{htmlType:"button",size:g,type:"dot",icon:"replace",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:f("wordTable.pickForm","\uB2E4\uB978 \uAF34\uB85C"),ariaLabel:i.n===null?f("wordTable.pickFormBaseAria","\uAE30\uBCF8\uD615 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"):f("wordTable.pickFormAria",{n:i.n,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"}),onClick:ne=>{ne.stopPropagation(),i.onPick(ne.currentTarget.getBoundingClientRect())}})})]})]})}function xa({title:e,titleIcon:t,disc:a,className:r,orientation:s="landscape",contentTypes:l=["image","word","standardPron"],baseItem:i,baseContentTypes:u,cutLine:c="show",showOutline:d=!0,showDivLine:h=!0,items:p,editCells:m,count:g,activeCell:y=null,onActivateCell:C,onRemoveCell:f,onRemoveItem:_,onReorder:b,onCopyItem:w,onReplaceItem:v,onPickForm:k,indexOffset:x=0,totalCount:A,renderCellAction:B,showFillerAdd:E=!1,addableCount:D,contentRef:N,buttonSize:$=40,brand:L,code:U,pageNumber:M,pageNumberPosition:P="right",fitHeight:T=!1,scoring:ee=!1,marks:te,onMarkClick:I,scoreIndexOffset:Y=0}){const R=o.useCallback((ue,Te)=>{I?.(Y+ue,Te)},[I,Y]),q=(ue,Te)=>{const Ne=ue.filter(Boolean).join(" / ");return Ne?Te?z("wordPrint.removePairFor",{name:Ne,defaultValue:`${Ne} \uB300\uB9BD\uC30D \uBE7C\uAE30`}):z("wordPrint.removeWordFor",{name:Ne,defaultValue:`${Ne} \uBE7C\uAE30`}):Te?z("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):z("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30")},Z=(ue,Te)=>{const Ne=te?.[kr(Y+ue)]??null;return n.jsx("div",{className:Be("word-table-cell__score",Ne?"word-table-cell__score--marked":""),style:_t>1?{transform:`translateX(-50%) scale(${_t})`,transformOrigin:"bottom center"}:void 0,children:Ar.map(tt=>n.jsx("span",{className:Be("word-table-cell__score-slot",Ne===tt?"word-table-cell__score-slot--on":""),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",shape:"pill",icon:oc[tt],variant:Ne===tt?sc[tt]:"default",selected:Ne===tt,useBorder:!1,...it?{}:{tabIndex:-1,role:"img"},showTooltipInfo:z(`wordTable.scoring.markName.${tt}`,{defaultValue:tt}),ariaLabel:z(`wordTable.scoring.${tt}`,{word:Te,defaultValue:`${Te} ${tt}`}),onClick:it?pt=>{pt.stopPropagation(),R(ue,tt)}:void 0})},tt))})},{t:z}=_e.useTranslation(),j=m!==void 0,F=e!=null||!!t||!!a,O=yn("(max-width: 767px)"),G=o.useRef(null),[ie,K]=o.useState(null),pe=p?.length??0,X=A??pe,[H,ne]=o.useState(null),[V,W]=o.useState(""),oe=o.useRef(null),xe=o.useRef(null),be=o.useRef(null),me=o.useRef(null),ke=o.useCallback(ue=>{xe.current=ue,typeof N=="function"?N(ue):N&&(N.current=ue)},[N]),Le=o.useCallback((ue,Te)=>{oe.current=x+Te,b?.(ue,Te),W(z("wordTable.reorder.moved",{n:x+Te+1,total:X,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[b,z,X,x]);o.useEffect(()=>{const ue=oe.current;ue!=null&&(oe.current=null,(xe.current?.closest(".word-table-block__pages")??xe.current)?.querySelector(`[data-wordtable-index="${ue}"] .word-table__card-handle button`)?.focus())}),o.useEffect(()=>()=>{me.current?.()},[]);const Me=o.useCallback((ue,Te)=>{if(!b||!ue.altKey||ue.ctrlKey||ue.metaKey)return;const Ne=ue.key==="ArrowRight";if(!Ne&&ue.key!=="ArrowLeft")return;ue.preventDefault();const tt=Te+(Ne?1:-1),pt=x+tt;pt<0||pt>=X||Le(Te,tt)},[b,X,x,Le]),le=o.useCallback((ue,Te)=>{if(!b||ue.pointerType==="mouse")return;const Ne=ue.target.closest?.("button");if(Ne&&!Ne.closest(".word-table__card-handle"))return;me.current?.();const tt={x:ue.clientX,y:ue.clientY};let pt=!1;const jt=Ue=>{pt&&Ue.cancelable&&Ue.preventDefault()};let je=null,nt=null;const ae=()=>{const Ue=nt;if(!Ue)return;const ht=document.elementFromPoint?.(Ue.x,Ue.y)?.closest?.("[data-wordtable-cell]"),cn=ht?Number(ht.dataset.wordtableCell):NaN,dn=Number.isInteger(cn)?cn:null;be.current=dn,K(zt=>zt===dn?zt:dn)},ye=Ue=>{if(!pt){(Math.abs(Ue.clientX-tt.x)>fc||Math.abs(Ue.clientY-tt.y)>fc)&&vt();return}if(nt={x:Ue.clientX,y:Ue.clientY},typeof requestAnimationFrame>"u"){ae();return}je===null&&(je=requestAnimationFrame(()=>{je=null,ae()}))},He=()=>{je!==null&&(cancelAnimationFrame(je),je=null,ae());const Ue=be.current,ht=pt;vt(),ht&&Ue!=null&&Ue!==Te&&Le(Te,Ue)},Ke=setTimeout(()=>{pt=!0,ne(Te),be.current=Te,K(Te),window.addEventListener("touchmove",jt,{passive:!1})},z4);function vt(){clearTimeout(Ke),window.removeEventListener("pointermove",ye),window.removeEventListener("pointerup",He),window.removeEventListener("pointercancel",He),window.removeEventListener("touchmove",jt),pt=!1,je!==null&&(cancelAnimationFrame(je),je=null),be.current=null,me.current=null,ne(null),K(null)}me.current=vt,window.addEventListener("pointermove",ye),window.addEventListener("pointerup",He),window.addEventListener("pointercancel",He)},[b,Le]),{width:ve,height:$e}=aa[s],Ae=typeof T=="number"?T:T&&typeof T=="object"?O?T.narrow:T.wide:null,{scalerRef:Ie,scale:ze,offset:dt}=Cc(ve,T?$e:void 0),st=j?m?.length??0:p?.length??0,et=Math.max(g??st,1),gt=!j&&!!i,Se=T4(s,et),Ge=ic(s,et),we=gt?Se.cols:Ge.cols,qe=gt?Se.rows:Ge.rows,Ye=gt&&s==="landscape"?Se.cols*2:we,mt=gt&&s==="portrait"?Se.rows*2:qe,wt=ue=>({word:ue.length===0||ue.includes("word"),image:ue.length===0||ue.includes("image"),pron:ue.length===0||ue.includes("standardPron"),colloq:ue.length===0||ue.includes("colloquialPron"),caption:ue.length===0||ue.includes("caption")}),yt=wt(l),Et=o.useMemo(()=>{const ue=(p??[]).map(Ne=>Ne.id),Te=ue.every(Ne=>typeof Ne=="string"&&Ne.length>0)&&new Set(ue).size===ue.length;return!Te&&ue.length>0&&At("wordTable.cellKeyFallback","[ihab/core] WordTable: items \uC758 id \uAC00 \uACB9\uCE58\uAC70\uB098 \uBE44\uC5B4 \uC788\uC5B4 \uCE78\uC744 \uC790\uB9AC \uBC88\uD638\uB85C \uC13C\uB2E4. \uCE78\uC744 \uBE7C\uAC70\uB098 \uB354\uD560 \uB54C \uB4A4 \uCE78\uB4E4\uC774 \uD1B5\uC9F8\uB85C \uB2E4\uC2DC \uADF8\uB824\uC9C4\uB2E4(\uC18C\uB9AC \uC8FC\uC18C\uB97C \uB2E4\uC2DC \uBC1B\uC544 \uC628\uB2E4). id \uB97C \uD45C \uC548\uC5D0\uC11C \uD558\uB098\uBFD0\uC778 \uAC12\uC73C\uB85C \uC9C0\uC5B4 \uC8FC\uBA74 \uADF8 \uAC12\uC774 \uC0AC\uB77C\uC9C4\uB2E4."),Te?ue:null},[p]),at=wt(u??l),rt=j?(m??[]).some(ue=>ue!==null&&ue.length>1):(p??[]).some(ue=>(ue.words??[]).length>1),Dt=!!L?.show,Bt=!!L?.show&&L?.top!==!1,Lt=!!L?.show&&L?.bottom!==!1,It=L?.copyright??"\xA9 IHAB, Inc. All rights reserved.",xt=se(Be("word-table__content",M4[c],d&&"word-table__content--outline",h&&rt&&"word-table__content--div-line",!Dt&&M&&P!=="none"&&"word-table__content--page-number",Bt&&"word-table__content--brand-top",Lt&&"word-table__content--brand-bottom")),lt={transform:`scale(${1/ze})`,transformOrigin:"center center"},Ct=$*Ar.length+4*(Ar.length-1),it=!!I,_t=it?Math.max(1,Math.min(1/ze,ve/Ye/Ct)):1,ut=n.jsxs("div",{ref:Ie,className:"word-table__scaler",style:{height:$e*ze},children:[n.jsx("div",{className:Be("word-table",ee&&!it&&"word-table--score-readonly",!F&&r),style:{width:ve,height:$e,transform:`scale(${ze})`,transformOrigin:"top left",marginLeft:dt},children:n.jsxs("div",{ref:ke,className:xt,style:{gridTemplateColumns:`repeat(${Ye}, 1fr)`,gridTemplateRows:W4(mt)},children:[j?n.jsx(n.Fragment,{children:(m??[]).map((ue,Te)=>n.jsx("div",{className:se(Be("word-table__edit-cell",ue?"word-table__edit-cell--filled":"word-table__edit-cell--empty",y===Te?"word-table__edit-cell--active":"")),style:ls(Te,Ye,mt,c),children:ue?n.jsxs(n.Fragment,{children:[ue.map((Ne,tt)=>n.jsxs(o.Fragment,{children:[tt>0&&n.jsx("div",{className:se("word-table__pair-divider")}),n.jsx(is,{outerScale:ze,label:Ne.word,subLabel:Ne.pronunciation,colloquialLabel:Ne.colloquialPronunciation,homonum:Ne.homonum,showWord:yt.word,showImage:yt.image,showPronunciation:yt.pron,showColloquial:yt.colloq,showCaption:yt.caption,buttonSize:$})]},tt)),ee&&Z(Te,ue.map(Ne=>Ne.word).join(" / ")),f&&n.jsx("div",{className:se("word-table__card-close"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:ue.length>1?z("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):z("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:q(ue.map(Ne=>Ne.word),ue.length>1),onClick:()=>f(Te)})})]}):C&&n.jsx("div",{className:se("word-table__card-add"),style:lt,children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"plus",variant:"default",ariaLabel:z("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:z("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C(Te)})})},Te))}):n.jsxs(n.Fragment,{children:[gt&&i&&n.jsx("div",{className:se("word-table__card word-table__card--base"),style:{gridColumn:`1 / span ${Se.cols}`,gridRow:`1 / span ${Se.rows}`,...ls(0,s==="landscape"?2:1,s==="landscape"?1:2,c)},children:(i.words??[]).map((ue,Te)=>n.jsxs(o.Fragment,{children:[Te>0&&n.jsx("div",{className:se("word-table__pair-divider")}),n.jsx(is,{outerScale:ze,label:ue.label,subLabel:ue.subLabel,colloquialLabel:ue.colloquialLabel,captionLabel:ue.captionLabel,captionBadge:ue.captionBadge,imageLabel:ue.imageLabel,pickForm:k&&ue.canPickForm?{n:null,onPick:Ne=>k(i.id,-1,Ne)}:void 0,homonum:ue.homonum,showWord:at.word,showImage:at.image,showPronunciation:at.pron,showColloquial:at.colloq,showCaption:at.caption,buttonSize:$,wordInfo:ue.grade||ue.syllables!=null||ue.pos||ue.wordType?{grade:ue.grade,syllables:ue.syllables,pos:ue.pos,wordType:ue.wordType}:void 0})]},Te))}),(p??[]).map((ue,Te)=>n.jsxs("div",{"data-wordtable-cell":b?Te:void 0,"data-wordtable-index":b?x+Te:void 0,className:se(`word-table__card${b?" word-table__card--draggable":""}${ie===Te?" word-table__card--drag-over":""}${H===Te?" word-table__card--dragging":""}`),style:ls(Te,we,qe,c),draggable:!!b,onPointerDown:b?Ne=>le(Ne,Te):void 0,onKeyDown:b?Ne=>Me(Ne,Te):void 0,onDragStart:b?()=>{G.current=Te}:void 0,onDragOver:b?Ne=>{Ne.preventDefault(),K(Te)}:void 0,onDragLeave:b?()=>K(null):void 0,onDrop:b?Ne=>{Ne.preventDefault(),G.current!==null&&G.current!==Te&&b(G.current,Te),G.current=null,K(null)}:void 0,onDragEnd:b?()=>{G.current=null,K(null)}:void 0,children:[(ue.words??[]).map((Ne,tt)=>n.jsxs(o.Fragment,{children:[tt>0&&n.jsx("div",{className:se("word-table__pair-divider")}),n.jsx(is,{outerScale:ze,label:Ne.label,subLabel:Ne.subLabel,colloquialLabel:Ne.colloquialLabel,captionLabel:Ne.captionLabel,captionBadge:Ne.captionBadge,imageLabel:Ne.imageLabel,pickForm:k&&Ne.canPickForm?{n:x+Te+1,onPick:pt=>k(ue.id,x+Te,pt)}:void 0,homonum:Ne.homonum,showWord:yt.word,showImage:yt.image,showPronunciation:yt.pron,showColloquial:yt.colloq,showCaption:yt.caption,buttonSize:$,wordInfo:Ne.grade||Ne.syllables!=null||Ne.pos||Ne.wordType?{grade:Ne.grade,syllables:Ne.syllables,pos:Ne.pos,wordType:Ne.wordType}:void 0})]},tt)),ee&&Z(Te,(ue.words??[]).map(Ne=>Ne.label).join(" / ")),(B||_||w||v||b)&&n.jsxs("div",{className:se("word-table__card-actions"),children:[_&&n.jsx("div",{className:se("word-table__card-close"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(ue.words??[]).length>1?z("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):z("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:q((ue.words??[]).map(Ne=>Ne.label),(ue.words??[]).length>1),onClick:()=>_(ue.id)})}),w&&n.jsx("div",{className:se("word-table__card-copy"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"copy",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:z("wordTable.copyItem","\uD55C \uCE78 \uB354"),ariaLabel:z("wordTable.copyItemAria",{n:x+Te+1,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354"}),onClick:()=>w(ue.id,x+Te)})}),v&&n.jsx("div",{className:se("word-table__card-replace"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"refresh-cw",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(ue.words??[]).length>1?z("wordTable.replacePair","\uB2E4\uB978 \uC30D\uC73C\uB85C"):z("wordTable.replaceItem","\uB2E4\uB978 \uB2E8\uC5B4\uB85C"),ariaLabel:(ue.words??[]).length>1?z("wordTable.replacePairAria",{n:x+Te+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C"}):z("wordTable.replaceItemAria",{n:x+Te+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C"}),onClick:()=>v(ue.id,x+Te)})}),B?.(Te,ue),b&&n.jsx("div",{className:se("word-table__card-handle"),children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:z("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:z("wordTable.reorder.handle",{word:(ue.words??[]).map(Ne=>Ne.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})})]})]},Et?Et[Te]:Te)),Array.from({length:Math.max(0,we*qe-(p?.length??0))}).map((ue,Te)=>{const Ne=(p?.length??0)+Te<(D??et);return n.jsx("div",{className:se("word-table__card word-table__card--filler"),children:E&&C&&Ne&&n.jsx("div",{className:se("word-table__card-add"),style:lt,children:n.jsx(fe,{htmlType:"button",size:$,type:"dot",icon:"plus",variant:"default",ariaLabel:z("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:z("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C((p?.length??0)+Te)})})},`filler-${Te}`)})]}),Bt&&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:L?.topLogo?.src??vr,alt:L?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const ue=[L?.title&&n.jsx("span",{className:"word-table__paper-title",children:L.title},"t"),L?.owner&&n.jsx("span",{className:"word-table__owner",children:L.owner},"o"),U&&n.jsx("span",{className:"word-table__code",children:U},"c")].filter(Boolean);return ue.length===0?null:n.jsx("span",{className:"word-table__ident",children:ue.map((Te,Ne)=>n.jsxs(o.Fragment,{children:[Ne>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Te]},Ne))})})()]})}),Lt&&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:[L?.bottomLogo?n.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:L.bottomLogo.src,alt:L.bottomLogo.alt}):n.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),n.jsx("span",{className:"word-table__copyright",children:It})]}),n.jsxs("span",{className:"word-table__band-end",children:[L?.link&&n.jsx("span",{className:"word-table__link",children:L.link}),M&&P!=="none"&&n.jsx("span",{className:"word-table__page-count",children:z("wordTable.filter.pageIndicator",{current:M.current,total:M.total})})]})]})}),!Dt&&M&&P!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${P}`,children:z("wordTable.filter.pageIndicator",{current:M.current,total:M.total})})]})}),b&&n.jsx("span",{role:"status",style:O4,children:V})]}),St=Ae==null?ut:n.jsx("div",{className:"word-table__frame",style:{height:Ae},children:ut});return F?n.jsx(_a,{type:"page",icon:t,title:e,disc:a,className:Be(se("word-table__section"),r),children:St}):St}function H4(e,t,a){const r=[];for(const s of e??[]){if(s.type==="note"||s.type==="input")continue;const l=s.displayLabel??s.label,i=V4(s,t?.[s.label],a);i!==null&&r.push(`${l} ${i}`)}return r.join(" \xB7 ")}function V4(e,t,a){const r=(Array.isArray(t)?t:t===void 0?[]:[t]).filter(s=>s!==kn);return r.length===0?e.allOption?e.allLabel??a:null:r.map(s=>q4(e,s)).join(", ")}function q4(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 In({title:e,titleLevel:t=2,headerAction:a,headerSummary:r,collapsible:s=!1,defaultCollapsed:l=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:d,selected:h={},onSelect:p,align:m,sectionAlign:g,className:y}){const C=(m??(g==="vertical"?"newline":"inline"))==="inline",{t:f}=_e.useTranslation(),[_,b]=o.useState(l),w=i??_,v=()=>{const N=!w;b(N),u?.(N)},k=N=>{if(!s)return;const $=N.target;!$||typeof $.closest!="function"||$.closest(".filter-panel__collapse-toggle")||$.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||v()},x=o.useMemo(()=>r!==void 0||!w?"":H4(d,h,f("common.all","\uC804\uCCB4")),[r,w,d,h,f]),A=r??(x?n.jsx("span",{className:"filter-panel__header-summary body-3",children:x}):null),B=e||a||r||s,E=o.useId(),D=t?`h${t}`:"span";return n.jsxs("div",{className:Be("filter-panel",s?"filter-panel--collapsible":"",w?"filter-panel--collapsed":"",y),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?E:void 0,children:[B&&n.jsxs("div",{className:"filter-panel__header",onClick:s?k: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:[w?A:a,s&&n.jsx(fe,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:w?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:w?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),showTooltipInfo:w?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),"aria-expanded":!w,onClick:v})]})]}),!w&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:Be("filter-panel__sections",C?"filter-panel__sections--row":""),children:d.map(N=>{const $=h[N.label],L=$===void 0||(Array.isArray($)?$.length===0:!1),U=(N.items??[]).filter(P=>P!=null);N.allOption&&U.some(P=>(typeof P=="string"?P:P.value)===kn)&&At(`filter-panel-all-value:${N.label}`,`[FilterPanel] '${N.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${kn}' \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 M=P=>{const T=typeof P=="string"?P:P.value,ee=typeof P!="string"&&!!P.disabled,te=typeof P!="string"?P.labels:void 0,I=typeof P!="string"?P.displayLabel:void 0,Y=typeof P!="string"?P.tooltip:void 0,R=typeof P!="string"?P.descriptionTooltip:void 0,q=typeof P!="string"?P.shape:void 0,Z=Array.isArray($)?$.includes(T):$===T;return n.jsx(fe,{htmlType:"button",size:"keyboard",label:te??I??T,type:N.itemType??(te?"bar":T.length===1?"dot":void 0),selected:Z,disabled:ee,shape:q,showTooltipInfo:!!Y,tooltipInfoText:Y,tooltipDescription:R,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:Be("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(Ga,{...N.labelInfo}):null)]}),N.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:N.content}):N.type==="input"?n.jsx(Kn,{className:"filter-panel__textfield",placeholder:N.placeholder,ariaLabel:N.displayLabel??N.label,value:h[N.label]??"",onChange:P=>p?.(P,N.label),error:N.error}):!N.multiple&&N.display==="segmented"?n.jsx(vn,{ariaLabel:N.displayLabel??N.label,options:[...N.allOption?[{key:kn,label:N.allLabel??f("common.all","\uC804\uCCB4"),disabled:N.allOptionDisabled}]:[],...U.map(P=>{const T=typeof P=="string"?P:P.value,ee=typeof P!="string"?P.displayLabel:void 0,te=typeof P!="string"?P.disabled:void 0;return{key:T,label:ee??T,disabled:te}})],value:L&&N.allOption?kn:h[N.label]??"",onChange:P=>p?.(P,N.label),size:32}):!N.multiple&&N.display==="dropdown"?n.jsx(_n,{className:"filter-panel__dropdown",ariaLabel:typeof N.label=="string"?N.label:void 0,size:40,options:[...N.allOption?[{value:kn,label:N.allLabel??f("common.all","\uC804\uCCB4"),disabled:N.allOptionDisabled}]:[],...U.map(P=>{const T=typeof P=="string"?P:P.value,ee=typeof P!="string"?P.displayLabel:void 0,te=typeof P!="string"?P.disabled:void 0;return{value:T,label:ee??T,disabled:te}})],value:L&&N.allOption?kn:h[N.label],onChange:P=>p?.(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??f("common.all","\uC804\uCCB4"),selected:L,disabled:N.allOptionDisabled,onClick:()=>p?.(kn,N.label)}),N.groups?N.groups.map((P,T)=>n.jsxs("div",{className:"filter-panel__item-group",children:[T===0&&N.allOption&&n.jsx(fe,{htmlType:"button",size:"keyboard",label:N.allLabel??f("common.all","\uC804\uCCB4"),selected:L,disabled:N.allOptionDisabled,onClick:()=>p?.(kn,N.label)}),P.filter(ee=>ee!=null).map(M)]},T)):U.map(M)]})]})]},N.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const U4=[1,2,3,4,5,6,7,8,9,10,11,12],G4=[8,6,4,2,1],bn="show",jn="hide",bc=["image","word","caption","standardPron"];function gc(e){return e.some(t=>(t.words??[]).some(a=>!!a.captionBadge||!!a.captionLabel))}function yc(e,t){return{label:e("wordTable.filter.composition","\uAD6C\uC131"),items:[{value:"image",disabled:!t.hasImage,displayLabel:e("wordTable.filter.image","\uC774\uBBF8\uC9C0")},{value:"word",displayLabel:e("wordTable.filter.word","\uB2E8\uC5B4")},{value:"caption",disabled:!t.hasCaption,displayLabel:e("wordTable.filter.caption","\uC720\uD615")},{value:"standardPron",displayLabel:e("wordTable.filter.standardPron","\uD45C\uC900 \uBC1C\uC74C")},{value:"colloquialPron",disabled:!t.hasColloquial,displayLabel:e("wordTable.filter.colloquialPron","\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C")}],multiple:!0,allOption:!0}}function vc(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 _c(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function xc(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function wc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Bc(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:bn,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:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function kc(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Ac(e,t){const a=Math.max(1,Math.min(t.itemCount,t.max??t.itemCount));return{label:e(t.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[a,...G4.filter(r=>r<a)].map(r=>({value:`${r}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:r})})),display:"segmented"}}function Nc(e,t){return e>=t?Number.POSITIVE_INFINITY:e}function K4(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:jn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Ec(e){return e==="left"||e==="center"||e==="right"?e:"none"}function Dc(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?bn:jn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?bn:jn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?bn:jn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?bn:jn}:{}}}function Sc(e,t,a,r){return a===e("wordTable.filter.composition","\uAD6C\uC131")?t===kn?(r.setContentTypes(()=>[]),!0):(r.setContentTypes(s=>s.includes(t)?s.filter(l=>l!==t):[...s,t]),!0):a===e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")?(r.setOrientation(t==="landscape"?"landscape":"portrait"),!0):a===e("wordTable.filter.border","\uC678\uACFD\uC120")?(r.setShowOutline(t===bn),!0):a===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(r.setCutLine(t),!0):a===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(r.setShowDivLine(t===bn),!0):a===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(r.setShowTopInfo?.(t===bn),!0):a===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(r.setShowBottomInfo?.(t===bn),!0):!1}function Y4(e){return"sections"in e}function us(e){const{t}=_e.useTranslation(),{title:a,className:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c}=e,d={collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c};if(Y4(e))return n.jsx(In,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...d,align:"inline"});const{hasImage:h,hasColloquial:p,hasCaption:m,contentTypes:g,orientation:y,showOutline:C,cutLine:f,showDivLine:_,setters:b,showCutLine:w=!1,showDivLine2:v=!1,middleSections:k=[],extraSelected:x={},onExtraSelect:A,showPaperBands:B=!1,showTopInfo:E=!0,showBottomInfo:D=!0}=e,N=[yc(t,{hasImage:h,hasColloquial:p,hasCaption:m??!1}),vc(t),...k,_c(t),...w?[Bc(t)]:[],...v?[kc(t)]:[],...B?[xc(t),wc(t)]:[]],$={...Dc(t,{contentTypes:g,orientation:y,showOutline:C,cutLine:f,showDivLine:_,showTopInfo:E,showBottomInfo:D}),...x},L=(U,M)=>{Sc(t,U,M,b)||A?.(U,M)};return n.jsx(In,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:N,selected:$,onSelect:L,...d,sectionAlign:"horizontal"})}function cs(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Z4(e){return cs(e).replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function ds(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let Nr=null,wa=null;function X4(e,t,a,r="",s=""){if(e.length===0||wa&&wa.iframe.isConnected&&Date.now()-wa.at<1e4)return;const l=r?ds(r):"";Nr?.();let i=null;if(l){const d=document.title;document.title=l,i=()=>{document.title=d,window.removeEventListener("afterprint",i),Nr===i&&(Nr=null)},Nr=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}wa={iframe:u,at:Date.now()},c.open(),c.write(ps(e,t,a,!0,l,s)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),wa?.iframe===u&&(wa=null)},0)})}function ps(e,t,a,r=!1,s="",l=""){s=s?ds(s):"";const i=Array.from(document.styleSheets).flatMap(p=>{try{return Array.from(p.cssRules).map(m=>m.cssText)}catch{return[]}}).join(`
831
+ `),u="light",c=(()=>{try{return document.documentElement.lang||""}catch{return""}})(),d=l?`<div class="paper-head">${cs(l)}</div>`:"",h=e.map(p=>{const m=p.cloneNode(!0);return m.querySelectorAll('[data-play-state="play"]').forEach(g=>g.style.display=""),m.querySelectorAll('[data-play-state="pause"]').forEach(g=>g.style.display="none"),m.querySelectorAll(".word-table-cell__score-slot:not(.word-table-cell__score-slot--on)").forEach(g=>g.remove()),m.querySelectorAll(".word-table-cell__spinner").forEach(g=>g.remove()),m.querySelectorAll("img").forEach(g=>{g.style.opacity==="0"&&(g.setAttribute("onload","this.style.opacity=''"),g.setAttribute("onerror","this.style.visibility='hidden'"))}),`<div class="paper-wrap">${d}${m.outerHTML}</div>`}).join(`
832
832
  `);return`<!DOCTYPE html>
833
833
  <html${c?` lang="${Z4(c)}"`:""} data-theme="${u}">
834
834
  <head>
@@ -851,7 +851,8 @@ ${y.badge}`:y.badge:void 0;if(x&&c(y.code))return null;if(!y.badge&&!h)return p(
851
851
  (\uC774 \uAE00\uC740 template literal \uC548\uC774\uB2E4 \u2014 **\uBC31\uD2F1\uC744 \uC4F0\uBA74 \uD2C0\uC774 \uAC70\uAE30\uC11C \uB04A\uAE34\uB2E4.** \uC774 \uD30C\uC77C\uC5D0\uC11C
852
852
  \uB450 \uBC88\uC9F8 \uBC1F\uC558\uB2E4. \uAE00\uBA38\uB9AC\uD45C\uB294 \uBCC4\uD45C\uB85C\uB9CC \uC801\uB294\uB2E4.) */
853
853
  .word-table-cell--tap-too-small .word-table-cell__play-button,
854
- .word-table-cell--tap-too-small .word-table-cell__info-button { display: revert; }
854
+ .word-table-cell--tap-too-small .word-table-cell__info-button,
855
+ .word-table-cell--tap-too-small .word-table-cell__form-button { display: revert; }
855
856
  * { box-sizing: border-box; }
856
857
  html, body { margin: 0; padding: 24px 0; width: 100%; min-height: 100%; background: #f0f0f0; overflow: auto; }
857
858
  body { display: flex; flex-direction: column; align-items: center; gap: 24px; }
@@ -902,7 +903,8 @@ ${y.badge}`:y.badge:void 0;if(x&&c(y.code))return null;if(!y.badge&&!h)return p(
902
903
  }
903
904
  .paper-wrap > .word-table__content { flex: 1 1 0; min-height: 0; height: auto; }
904
905
  .paper-wrap:last-of-type { page-break-after: auto; break-after: auto; }
905
- .word-table-cell__play-button { display: none; }
906
+ .word-table-cell__play-button,
907
+ .word-table-cell__form-button { display: none; }
906
908
  .new-window-close { display: none; }
907
909
  }
908
910
  </style>
@@ -1035,10 +1037,10 @@ ${y.badge}`:y.badge:void 0;if(x&&c(y.code))return null;if(!y.badge&&!h)return p(
1035
1037
  `:""}
1036
1038
  <\/script>
1037
1039
  </body>
1038
- </html>`}const J4=1e3;function hs({getElements:e,paperW:t,paperH:a,fileName:r="",onPopupBlocked:s,header:l=""}){const{t:i}=xe.useTranslation(),u=o.useCallback(()=>{X4(e(),t,a,r,l)},[e,t,a,r,l]),c=o.useCallback(()=>{const h=e();if(h.length===0)return;const p=window.open("","_blank");if(!p){s?.();return}p.document.write(ps(h,t,a,!1,r,l)),p.document.close()},[e,t,a,r,s,l]),d=o.useCallback(()=>{const h=e();if(h.length===0)return;const p=ps(h,t,a,!1,r,l),C=new Blob([p],{type:"text/html;charset=utf-8"}),g=URL.createObjectURL(C),_=(r?ds(r):"")||i("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C"),m=Object.assign(document.createElement("a"),{href:g,download:`${_}.html`});document.body.appendChild(m),m.click(),document.body.removeChild(m),setTimeout(()=>URL.revokeObjectURL(g),J4)},[e,t,a,r,l,i]);return{print:u,openNewWindow:c,downloadHtml:d}}function jc(e,t){const{t:a}=xe.useTranslation(),r=t?.paperBands===!0,s=t?.maxItemsPerPage,[l,i]=o.useState("landscape"),[u,c]=o.useState([...bc]),[d,h]=o.useState("show"),[p,C]=o.useState(!0),[g,_]=o.useState(!0),[m,f]=o.useState(!0),[v,b]=o.useState(!0),[w,y]=o.useState(8),[B,x]=o.useState("right"),N=e.length,A=e.some(Z=>(Z.words??[]).length>1),D=e.some(Z=>(Z.words??[]).some(L=>!!L.colloquialLabel)),E=gc(e),k=Math.max(1,Math.min(Math.max(N,1),s??Math.max(N,1))),R=Math.min(w,k),$=o.useMemo(()=>S4(e,R),[e,R]),G=$.length>1,T=R,[P,M]=o.useState(!1);o.useEffect(()=>{let Z=!1;if(!pa()){M(!1);return}return Promise.all(e.flatMap(L=>(L.words??[]).map(V=>Ml(V.label,V.homonum)))).then(L=>{Z||M(L.some(Boolean))},()=>{}),()=>{Z=!0}},[e]);const ee=o.useMemo(()=>[yc(a,{hasImage:P,hasColloquial:D,hasCaption:E}),vc(a),...N>0?[kc(a,{hasPairs:A,itemCount:N,max:s})]:[],_c(a),...T>1?[Bc(a)]:[],...A?[Ac(a)]:[],...r?[xc(a),wc(a)]:[]],[a,P,D,E,N,A,G,T,r,s]),Q={...Dc(a,{contentTypes:u,orientation:l,showOutline:p,cutLine:d,showDivLine:v,showTopInfo:g,showBottomInfo:m}),...N>0?{[a(A?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${R}\uAC1C`}:{},...G?{[a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:B}:{}},F=o.useCallback((Z,L)=>{Sc(a,Z,L,{setContentTypes:c,setOrientation:i,setShowOutline:C,setCutLine:h,setShowDivLine:b,setShowTopInfo:_,setShowBottomInfo:f})||(L===a("wordTable.filter.itemsPerPagePair","\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218")||L===a("wordTable.filter.itemsPerPageWord","\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218")?y(Nc(parseInt(Z),N)):L===a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&x(Ec(Z)))},[a,N]);return{settings:{orientation:l,contentTypes:u,cutLine:d,showOutline:p,showDivLine:v,count:T,showTopInfo:g,showBottomInfo:m},filterSections:ee,filterSelected:Q,handleSelect:F,pages:$,isPaginated:G,pageNumberPosition:B}}function Q4({items:e,words:t,baseItem:a,baseContentTypes:r,maxItemsPerPage:s,title:l,subtitle:i,emptyText:u,buttons:c,renderButtons:d,renderFooter:h,footerClassName:p,footerLayout:C,printFileName:g,showSettings:_,autoPrint:m,className:f,onClose:v,scoring:b=!1,onScoreChange:w,printHeader:y,brand:B,code:x,beforeClose:N}){const{t:A}=xe.useTranslation(),D=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(t)?t:[]).filter(W=>typeof W=="string"&&W.length>0).map((W,ue)=>({id:`${W}-${ue}`,words:[{label:W}]})),[e,t]),{settings:E,filterSections:k,filterSelected:R,handleSelect:$,pages:G,isPaginated:T,pageNumberPosition:P}=jc(D,{paperBands:!!B?.show,maxItemsPerPage:s}),M=o.useMemo(()=>lc(G.map(W=>W.length)),[G]),[ee,Q]=o.useState({}),F=o.useCallback((W,ue)=>{Q(Be=>({...Be,[Ar(W)]:rc(Be[Ar(W)]??null,ue)}))},[]),Z=o.useRef(w);o.useEffect(()=>{Z.current=w});const L=o.useRef(ee);o.useEffect(()=>{L.current!==ee&&(L.current=ee,Z.current?.(as(ee)))},[ee]);const V=o.useMemo(()=>as(ee),[ee]),U=o.useRef(null),{toastMessage:q,toastKey:j,showWarning:I,clearToast:O}=Gi("warning"),Y=o.useRef([]),K=o.useCallback(()=>T?Y.current.filter(W=>W!==null):U.current?[U.current]:[],[T]),{print:ie,openNewWindow:te}=hs({getElements:K,paperW:aa[E.orientation].width,paperH:aa[E.orientation].height,fileName:g??"",header:y??"",onPopupBlocked:()=>I(A("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."))}),ne=o.useMemo(()=>h?void 0:d?d({print:ie,openNewWindow:te}):g?[{label:A("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>te()},{label:A("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>ie()},...c??[]]:c,[h,d,g,c,A,ie,te]),z=o.useMemo(()=>h?h({print:ie,openNewWindow:te}):void 0,[h,ie,te]),ae=o.useRef(!1),H=o.useRef(ie);return o.useEffect(()=>{H.current=ie},[ie]),o.useEffect(()=>{if(!m||ae.current)return;const W=window.setTimeout(()=>{ae.current=!0,H.current()},100);return()=>window.clearTimeout(W)},[m]),n.jsxs(Pn,{title:l??A("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:i,size:"large",className:ke("word-table-popup",f),buttons:ne,footer:z,footerClassName:p,footerLayout:C,beforeClose:N,onClose:v,children:[D.length>0?n.jsxs("div",{className:"word-table-popup__body",children:[_&&n.jsx(us,{sections:k,selected:R,onSelect:$}),T?n.jsx("div",{className:"word-table-popup__pages",children:G.map((W,ue)=>n.jsx(xa,{items:W,orientation:E.orientation,contentTypes:E.contentTypes,baseItem:a,baseContentTypes:r,cutLine:E.cutLine,showOutline:E.showOutline,showDivLine:E.showDivLine,count:E.count,contentRef:Be=>{Y.current[ue]=Be},pageNumber:{current:ue+1,total:G.length},pageNumberPosition:P,brand:B&&{...B,top:E.showTopInfo,bottom:E.showBottomInfo},code:x,scoring:b,scoreIndexOffset:M[ue],marks:V,onMarkClick:F},ue))}):n.jsx("div",{className:"word-table-popup__table",children:n.jsx(xa,{items:D,orientation:E.orientation,contentTypes:E.contentTypes,baseItem:a,baseContentTypes:r,cutLine:E.cutLine,showOutline:E.showOutline,showDivLine:E.showDivLine,count:E.count,contentRef:U,fitHeight:!0,scoring:b,marks:V,onMarkClick:F,brand:B&&{...B,top:E.showTopInfo,bottom:E.showBottomInfo},code:x})})]}):n.jsx("p",{className:"word-table-popup__empty body-3",children:u??A("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsx(va,{message:q,position:"top",onClose:O},j)]})}const e_=new Set(["x","triangle"]);function t_(e,t){const a=[];for(let r=0;r<e.length;r++){const s=t[String(r)];s&&e_.has(s)&&a.push(e[r])}return a}const n_=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function Tc(e){const t=e.name.trim(),a=e.reviewRound;if(typeof a=="number"&&Number.isFinite(a)&&a>=0){const l=Math.floor(a);if(l===0)return{base:t,round:1};const i=(l===1?/\s*복습\s*\d{2}\.\d{2}$/:new RegExp(`(?:^|\\s)${l}\uCC28\\s*\uBCF5\uC2B5\\s*\\d{2}\\.\\d{2}$`)).exec(t);return{base:i?t.slice(0,i.index).trim():t,round:l+1}}let r=t,s=1;for(;;){const l=n_.exec(r);if(!l)break;s=Math.max(s,(l[1]?Number(l[1]):1)+1),r=r.slice(0,l.index).trim()}return{base:r,round:s}}function a_(e,t){const[,a,r]=po(t).split("-"),s=`${a}.${r}`,{base:l,round:i}=Tc(typeof e=="string"?{name:e}:e),u=i>=2?`${i}\uCC28 `:"";return`${l||"\uB2E8\uC5B4\uD45C"} ${u}\uBCF5\uC2B5 ${s}`}function r_(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:Tc(e).round}}function o_(e,t){const a={};for(const[r,s]of Object.entries(t)){if(s!=="o"&&s!=="triangle"&&s!=="x")continue;const l=Number(r),i=e[l];i&&(a[r]=i)}return a}function s_(e){return e.map(t=>t.label).join(" / ")}function l_(e){return e.map(t=>t.homonum!=null?`${t.label}#${t.homonum}`:t.label).join(" / ")}function Mc(e){return e.split(" / ").map(t=>t.replace(/#\d+$/,"")).join(" / ")}function i_(e,t,a){const r=Yl(a);return[e.trim(),r,t.trim()].filter(Boolean).join(" \xB7 ")}function Lc(e,t,a){return a===0?0:(e+t*.5)/a}function u_(e){const t=new Map,a=[...e].sort((s,l)=>s.scoredAt.localeCompare(l.scoredAt));for(const s of a)for(const[l,i]of Object.entries(s.marks)){const u=s.labels?.[l];if(!u)continue;const c=t.get(u)??{o:0,triangle:0,x:0,latest:i,latestAt:s.scoredAt};if(i==="o")c.o++;else if(i==="triangle")c.triangle++;else if(i==="x")c.x++;else continue;c.latest=i,c.latestAt=s.scoredAt,t.set(u,c)}const r=[];for(const[s,l]of t){const i=l.o+l.triangle+l.x;r.push({label:Mc(s),key:s,tried:i,o:l.o,triangle:l.triangle,x:l.x,rate:Lc(l.o,l.triangle,i),latest:l.latest,latestAt:l.latestAt})}return r.sort((s,l)=>s.rate-l.rate||l.tried-s.tried||mn(s.label,l.label)||mn(s.key??s.label,l.key??l.label)),r}function c_(e){const t=new Map;for(const r of e){const s=r.tableId??`name:${r.tableName}`,l=t.get(s)??{tableName:r.tableName,tableId:r.tableId,rows:[]};l.rows.push(r),t.set(s,l)}const a=[];for(const r of t.values()){const s=u=>Object.values(u.marks).filter(c=>c==="o"||c==="triangle"||c==="x").length,l=r.rows.filter(u=>s(u)>0).sort((u,c)=>u.scoredAt.localeCompare(c.scoredAt));if(l.length===0)continue;const i=l.map(u=>{const c=Object.values(u.marks),d=c.filter(p=>p==="o").length,h=c.filter(p=>p==="triangle").length;return Lc(d,h,s(u))});a.push({tableName:r.tableName,tableId:r.tableId,rates:i,times:l.map(u=>u.scoredAt),delta:i.length>=2?i[i.length-1]-i[0]:null})}return a.sort((r,s)=>(s.times[s.times.length-1]??"").localeCompare(r.times[r.times.length-1]??"")),a}function d_(e,t=8){return e.filter(a=>a.latest!=="o").slice(0,t)}function p_(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 h_(e){const t=new Map;let a=0,r=0;const s=e.map((i,u)=>({r:i,at:u})).sort((i,u)=>i.r.answeredAt.localeCompare(u.r.answeredAt)||p_(i.r.id,u.r.id)||i.at-u.at).map(i=>i.r);for(const i of s){if(i.isCorrect==null)continue;const u=i.itemTitle?.trim();if(!u){r++;continue}a++;const c=i.itemId?.trim()||u,d=`${i.trainingType}|${c}`,h=t.get(d)??{trainingType:i.trainingType,itemId:c,title:u,tried:0,wrong:0,latestCorrect:i.isCorrect,latestAt:i.answeredAt,lastSelected:i.selected,setIds:[]};if(h.tried++,i.isCorrect||h.wrong++,h.title=u,h.latestCorrect=i.isCorrect,h.latestAt=i.answeredAt,h.lastSelected=i.selected,i.setId){const p=h.setIds.indexOf(i.setId);p>0&&h.setIds.splice(p,1),p!==0&&h.setIds.unshift(i.setId)}t.set(d,h)}const l=[...t.entries()].map(([i,u])=>({key:i,trainingType:u.trainingType,itemId:u.itemId,title:u.title,tried:u.tried,wrong:u.wrong,rate:u.tried===0?0:(u.tried-u.wrong)/u.tried,latestCorrect:u.latestCorrect,latestAt:u.latestAt,lastSelected:u.lastSelected,setIds:u.setIds}));return l.sort((i,u)=>i.rate-u.rate||u.tried-i.tried||mn(i.title,u.title)),{items:l,counted:a,skippedNoTitle:r}}function m_(e,t=8){return e.filter(a=>!a.latestCorrect).slice(0,t)}function C_(e){const t=new Map;for(const r of e){const s=t.get(r.trainingType)??[];s.push(r),t.set(r.trainingType,s)}const a=[...t.entries()].map(([r,s])=>({trainingType:r,items:s,pending:s.filter(l=>!l.latestCorrect).length}));return a.sort((r,s)=>s.pending-r.pending||r.trainingType.localeCompare(s.trainingType)),a}const ms=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function f_(e){const t=new Map;let a=0;for(const l of e){if(l.latestCorrect)continue;const i=l.setIds[0];if(!i){a++;continue}const u=`${l.trainingType}|${i}`,c=t.get(u)??{setId:i,trainingType:l.trainingType,pending:0};c.pending++,t.set(u,c)}const r=(l,i)=>i.pending-l.pending||l.trainingType.localeCompare(i.trainingType)||l.setId.localeCompare(i.setId),s=[...t.values()];return{sentence:s.filter(l=>ms.includes(l.trainingType)).sort(r),word:s.filter(l=>!ms.includes(l.trainingType)).sort(r),noSet:a}}function b_(e,t,a=5){const r=new Set(t);if(r.size===0)return[];const s=[];for(const l of e){const i=new Set,u=[];for(const c of l.cellLabels)r.has(c)&&!i.has(c)&&(i.add(c),u.push(c));u.length!==0&&s.push({id:l.id,name:l.name,kind:l.kind,covered:u,totalCells:l.cellLabels.length})}return s.sort((l,i)=>i.covered.length-l.covered.length||l.totalCells-i.totalCells||mn(l.name,i.name)),s.slice(0,Math.max(0,a))}function g_(e,t){const a=new Set(e.flatMap(r=>r.covered));return t.filter(r=>!a.has(r))}function y_(e,t){const a=new Map;for(const s of e)for(const l of s.cells){const i=s.labelOf(l);a.has(i)||a.set(i,l)}const r=[];for(const s of t){const l=a.get(s);l!==void 0&&r.push(l)}return r}function Cs(e,t,a){return typeof e=="string"&&e?e:t.replace(/\{\{(\w+)\}\}/g,(r,s)=>String(a[s]))}function v_(e,t){const a=Number.isFinite(e)?Math.round(e):0;if(!a||a<=0)return"-";const r=Math.floor(a/60),s=a%60;return t?t(r,s):r>0&&s>0?Cs(Gt.t("customers.duration.minSec",{m:r,s,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:r,s}):r>0?Cs(Gt.t("customers.duration.min",{m:r,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:r}):Cs(Gt.t("customers.duration.sec",{s,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s})}function __(e,t){const a=[],r=new Set;for(const s of e){const l=t(s);r.has(l)||(r.add(l),a.push({key:l,value:s,pinned:!1}))}return a}function x_(e,t){return e.map(a=>a.key===t?{...a,pinned:!a.pinned}:a)}function w_(e,t){return e.filter(a=>a.key!==t)}function B_(e,t,a){const r=e.filter(d=>d.pinned),s=new Set(r.map(d=>d.key)),l=e.length-r.length,i=[],u=new Set(s);for(const d of t){if(i.length>=l)break;const h=a(d);u.has(h)||(u.add(h),i.push({key:h,value:d,pinned:!1}))}const c=[...i];return e.map(d=>d.pinned?d:c.shift()).filter(d=>d!==void 0)}function A_(e){return e.map(t=>t.value)}function k_(e){const{category:t={},isSelected:a=!1,onClick:r}=e||{},s=t?.key?` icon-grid-menu__button--${t.key}`:"",l=o.useId();return n.jsxs("div",{className:`icon-grid-menu__button-wrapper${s}`,children:[n.jsx("button",{className:`icon-grid-menu__button${a?" icon-grid-menu__button--selected":""}`,"data-key":t?.key,type:"button",onClick:a?void 0:r,"aria-pressed":a,"aria-labelledby":l,children:n.jsx(rt,{icon:t.icon,label:t.label,className:"icon-grid-menu__button-icon",imgClassName:"icon-grid-menu__button-icon-image",maskClassName:"icon-grid-menu__button-icon-mask",svgClassName:"icon-grid-menu__button-icon-svg"})}),n.jsx("span",{id:l,className:"icon-grid-menu__button-label button-1",children:t.label})]})}function N_(e){const{categories:t=[],selected:a,onSelect:r,size:s="medium"}=e||{},l=a!==void 0,[i,u]=o.useState(()=>l?null:(t&&t[0]?.key)??null),c=l?a:i,d=o.useRef(r);o.useEffect(()=>{d.current=r});const h=o.useRef(!1),p=(t&&t[0]?.key)??null;o.useEffect(()=>{if(l||h.current||!p)return;h.current=!0;const g=i??p;i==null&&u(g),d.current?.(g)},[l,p]);const C=o.useCallback(g=>{const _=c===g?null:g;h.current=!0,l||u(_),r?.(_)},[c,l,r]);return n.jsx("div",{className:`icon-grid-menu icon-grid-menu--${s}`,children:(t||[]).map(g=>n.jsx(k_,{category:g,isSelected:c===g.key,onClick:()=>C(g.key)},g.key))})}function E_({subs:e=[],selected:t,onSelect:a,size:r="medium"}){const s=r==="small"?32:40;return n.jsx("div",{className:`choice-chips choice-chips--${r}`,children:n.jsx("div",{className:"choice-chips__list",children:e.map(l=>n.jsx(Ce,{htmlType:"button",size:s,type:"bar",label:l.label,selected:t===l.key,className:"choice-chips__button",onClick:()=>a?.(l.key)},l.key))})})}function D_({onTermsClick:e,onPrivacyClick:t,contact:a}={}){const r=a?.email??"support@ihab.co.kr",s=a?.tel??"031-380-3724",{t:l}=xe.useTranslation();return n.jsx("footer",{className:"site-footer",children:n.jsxs("div",{className:"safearea",children:[n.jsxs("div",{className:"site-footer__top",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("div",{className:"site-footer__lead h3",children:l("footer.lead",`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
1040
+ </html>`}const J4=1e3;function hs({getElements:e,paperW:t,paperH:a,fileName:r="",onPopupBlocked:s,header:l=""}){const{t:i}=_e.useTranslation(),u=o.useCallback(()=>{X4(e(),t,a,r,l)},[e,t,a,r,l]),c=o.useCallback(()=>{const h=e();if(h.length===0)return;const p=window.open("","_blank");if(!p){s?.();return}p.document.write(ps(h,t,a,!1,r,l)),p.document.close()},[e,t,a,r,s,l]),d=o.useCallback(()=>{const h=e();if(h.length===0)return;const p=ps(h,t,a,!1,r,l),m=new Blob([p],{type:"text/html;charset=utf-8"}),g=URL.createObjectURL(m),y=(r?ds(r):"")||i("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C"),C=Object.assign(document.createElement("a"),{href:g,download:`${y}.html`});document.body.appendChild(C),C.click(),document.body.removeChild(C),setTimeout(()=>URL.revokeObjectURL(g),J4)},[e,t,a,r,l,i]);return{print:u,openNewWindow:c,downloadHtml:d}}function jc(e,t){const{t:a}=_e.useTranslation(),r=t?.paperBands===!0,s=t?.maxItemsPerPage,[l,i]=o.useState("landscape"),[u,c]=o.useState([...bc]),[d,h]=o.useState("show"),[p,m]=o.useState(!0),[g,y]=o.useState(!0),[C,f]=o.useState(!0),[_,b]=o.useState(!0),[w,v]=o.useState(8),[k,x]=o.useState("right"),A=e.length,B=e.some(Y=>(Y.words??[]).length>1),E=e.some(Y=>(Y.words??[]).some(R=>!!R.colloquialLabel)),D=gc(e),N=Math.max(1,Math.min(Math.max(A,1),s??Math.max(A,1))),$=Math.min(w,N),L=o.useMemo(()=>S4(e,$),[e,$]),U=L.length>1,M=$,[P,T]=o.useState(!1);o.useEffect(()=>{let Y=!1;if(!pa()){T(!1);return}return Promise.all(e.flatMap(R=>(R.words??[]).map(q=>Ml(q.label,q.homonum)))).then(R=>{Y||T(R.some(Boolean))},()=>{}),()=>{Y=!0}},[e]);const ee=o.useMemo(()=>[yc(a,{hasImage:P,hasColloquial:E,hasCaption:D}),vc(a),...A>0?[Ac(a,{hasPairs:B,itemCount:A,max:s})]:[],_c(a),...M>1?[Bc(a)]:[],...B?[kc(a)]:[],...r?[xc(a),wc(a)]:[]],[a,P,E,D,A,B,U,M,r,s]),te={...Dc(a,{contentTypes:u,orientation:l,showOutline:p,cutLine:d,showDivLine:_,showTopInfo:g,showBottomInfo:C}),...A>0?{[a(B?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${$}\uAC1C`}:{},...U?{[a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:k}:{}},I=o.useCallback((Y,R)=>{Sc(a,Y,R,{setContentTypes:c,setOrientation:i,setShowOutline:m,setCutLine:h,setShowDivLine:b,setShowTopInfo:y,setShowBottomInfo:f})||(R===a("wordTable.filter.itemsPerPagePair","\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218")||R===a("wordTable.filter.itemsPerPageWord","\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218")?v(Nc(parseInt(Y),A)):R===a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&x(Ec(Y)))},[a,A]);return{settings:{orientation:l,contentTypes:u,cutLine:d,showOutline:p,showDivLine:_,count:M,showTopInfo:g,showBottomInfo:C},filterSections:ee,filterSelected:te,handleSelect:I,pages:L,isPaginated:U,pageNumberPosition:k}}function Q4({items:e,words:t,baseItem:a,baseContentTypes:r,maxItemsPerPage:s,title:l,subtitle:i,emptyText:u,buttons:c,renderButtons:d,renderFooter:h,footerClassName:p,footerLayout:m,printFileName:g,showSettings:y,autoPrint:C,className:f,onClose:_,scoring:b=!1,onScoreChange:w,printHeader:v,brand:k,code:x,beforeClose:A}){const{t:B}=_e.useTranslation(),E=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(t)?t:[]).filter(W=>typeof W=="string"&&W.length>0).map((W,oe)=>({id:`${W}-${oe}`,words:[{label:W}]})),[e,t]),{settings:D,filterSections:N,filterSelected:$,handleSelect:L,pages:U,isPaginated:M,pageNumberPosition:P}=jc(E,{paperBands:!!k?.show,maxItemsPerPage:s}),T=o.useMemo(()=>lc(U.map(W=>W.length)),[U]),[ee,te]=o.useState({}),I=o.useCallback((W,oe)=>{te(xe=>({...xe,[kr(W)]:rc(xe[kr(W)]??null,oe)}))},[]),Y=o.useRef(w);o.useEffect(()=>{Y.current=w});const R=o.useRef(ee);o.useEffect(()=>{R.current!==ee&&(R.current=ee,Y.current?.(as(ee)))},[ee]);const q=o.useMemo(()=>as(ee),[ee]),Z=o.useRef(null),{toastMessage:z,toastKey:j,showWarning:F,clearToast:O}=Gi("warning"),G=o.useRef([]),ie=o.useCallback(()=>M?G.current.filter(W=>W!==null):Z.current?[Z.current]:[],[M]),{print:K,openNewWindow:pe}=hs({getElements:ie,paperW:aa[D.orientation].width,paperH:aa[D.orientation].height,fileName:g??"",header:v??"",onPopupBlocked:()=>F(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."))}),X=o.useMemo(()=>h?void 0:d?d({print:K,openNewWindow:pe}):g?[{label:B("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>pe()},{label:B("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>K()},...c??[]]:c,[h,d,g,c,B,K,pe]),H=o.useMemo(()=>h?h({print:K,openNewWindow:pe}):void 0,[h,K,pe]),ne=o.useRef(!1),V=o.useRef(K);return o.useEffect(()=>{V.current=K},[K]),o.useEffect(()=>{if(!C||ne.current)return;const W=window.setTimeout(()=>{ne.current=!0,V.current()},100);return()=>window.clearTimeout(W)},[C]),n.jsxs(Pn,{title:l??B("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:i,size:"large",className:Be("word-table-popup",f),buttons:X,footer:H,footerClassName:p,footerLayout:m,beforeClose:A,onClose:_,children:[E.length>0?n.jsxs("div",{className:"word-table-popup__body",children:[y&&n.jsx(us,{sections:N,selected:$,onSelect:L}),M?n.jsx("div",{className:"word-table-popup__pages",children:U.map((W,oe)=>n.jsx(xa,{items:W,orientation:D.orientation,contentTypes:D.contentTypes,baseItem:a,baseContentTypes:r,cutLine:D.cutLine,showOutline:D.showOutline,showDivLine:D.showDivLine,count:D.count,contentRef:xe=>{G.current[oe]=xe},pageNumber:{current:oe+1,total:U.length},pageNumberPosition:P,brand:k&&{...k,top:D.showTopInfo,bottom:D.showBottomInfo},code:x,scoring:b,scoreIndexOffset:T[oe],marks:q,onMarkClick:I},oe))}):n.jsx("div",{className:"word-table-popup__table",children:n.jsx(xa,{items:E,orientation:D.orientation,contentTypes:D.contentTypes,baseItem:a,baseContentTypes:r,cutLine:D.cutLine,showOutline:D.showOutline,showDivLine:D.showDivLine,count:D.count,contentRef:Z,fitHeight:!0,scoring:b,marks:q,onMarkClick:I,brand:k&&{...k,top:D.showTopInfo,bottom:D.showBottomInfo},code:x})})]}):n.jsx("p",{className:"word-table-popup__empty body-3",children:u??B("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsx(va,{message:z,position:"top",onClose:O},j)]})}const e_=new Set(["x","triangle"]);function t_(e,t){const a=[];for(let r=0;r<e.length;r++){const s=t[String(r)];s&&e_.has(s)&&a.push(e[r])}return a}const n_=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function Tc(e){const t=e.name.trim(),a=e.reviewRound;if(typeof a=="number"&&Number.isFinite(a)&&a>=0){const l=Math.floor(a);if(l===0)return{base:t,round:1};const i=(l===1?/\s*복습\s*\d{2}\.\d{2}$/:new RegExp(`(?:^|\\s)${l}\uCC28\\s*\uBCF5\uC2B5\\s*\\d{2}\\.\\d{2}$`)).exec(t);return{base:i?t.slice(0,i.index).trim():t,round:l+1}}let r=t,s=1;for(;;){const l=n_.exec(r);if(!l)break;s=Math.max(s,(l[1]?Number(l[1]):1)+1),r=r.slice(0,l.index).trim()}return{base:r,round:s}}function a_(e,t){const[,a,r]=po(t).split("-"),s=`${a}.${r}`,{base:l,round:i}=Tc(typeof e=="string"?{name:e}:e),u=i>=2?`${i}\uCC28 `:"";return`${l||"\uB2E8\uC5B4\uD45C"} ${u}\uBCF5\uC2B5 ${s}`}function r_(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:Tc(e).round}}function o_(e,t){const a={};for(const[r,s]of Object.entries(t)){if(s!=="o"&&s!=="triangle"&&s!=="x")continue;const l=Number(r),i=e[l];i&&(a[r]=i)}return a}function s_(e){return e.map(t=>t.label).join(" / ")}function l_(e){return e.map(t=>t.homonum!=null?`${t.label}#${t.homonum}`:t.label).join(" / ")}function Mc(e){return e.split(" / ").map(t=>t.replace(/#\d+$/,"")).join(" / ")}function i_(e,t,a){const r=Yl(a);return[e.trim(),r,t.trim()].filter(Boolean).join(" \xB7 ")}function Lc(e,t,a){return a===0?0:(e+t*.5)/a}function u_(e){const t=new Map,a=[...e].sort((s,l)=>s.scoredAt.localeCompare(l.scoredAt));for(const s of a)for(const[l,i]of Object.entries(s.marks)){const u=s.labels?.[l];if(!u)continue;const c=t.get(u)??{o:0,triangle:0,x:0,latest:i,latestAt:s.scoredAt};if(i==="o")c.o++;else if(i==="triangle")c.triangle++;else if(i==="x")c.x++;else continue;c.latest=i,c.latestAt=s.scoredAt,t.set(u,c)}const r=[];for(const[s,l]of t){const i=l.o+l.triangle+l.x;r.push({label:Mc(s),key:s,tried:i,o:l.o,triangle:l.triangle,x:l.x,rate:Lc(l.o,l.triangle,i),latest:l.latest,latestAt:l.latestAt})}return r.sort((s,l)=>s.rate-l.rate||l.tried-s.tried||fn(s.label,l.label)||fn(s.key??s.label,l.key??l.label)),r}function c_(e){const t=new Map;for(const r of e){const s=r.tableId??`name:${r.tableName}`,l=t.get(s)??{tableName:r.tableName,tableId:r.tableId,rows:[]};l.rows.push(r),t.set(s,l)}const a=[];for(const r of t.values()){const s=u=>Object.values(u.marks).filter(c=>c==="o"||c==="triangle"||c==="x").length,l=r.rows.filter(u=>s(u)>0).sort((u,c)=>u.scoredAt.localeCompare(c.scoredAt));if(l.length===0)continue;const i=l.map(u=>{const c=Object.values(u.marks),d=c.filter(p=>p==="o").length,h=c.filter(p=>p==="triangle").length;return Lc(d,h,s(u))});a.push({tableName:r.tableName,tableId:r.tableId,rates:i,times:l.map(u=>u.scoredAt),delta:i.length>=2?i[i.length-1]-i[0]:null})}return a.sort((r,s)=>(s.times[s.times.length-1]??"").localeCompare(r.times[r.times.length-1]??"")),a}function d_(e,t=8){return e.filter(a=>a.latest!=="o").slice(0,t)}function p_(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 h_(e){const t=new Map;let a=0,r=0;const s=e.map((i,u)=>({r:i,at:u})).sort((i,u)=>i.r.answeredAt.localeCompare(u.r.answeredAt)||p_(i.r.id,u.r.id)||i.at-u.at).map(i=>i.r);for(const i of s){if(i.isCorrect==null)continue;const u=i.itemTitle?.trim();if(!u){r++;continue}a++;const c=i.itemId?.trim()||u,d=`${i.trainingType}|${c}`,h=t.get(d)??{trainingType:i.trainingType,itemId:c,title:u,tried:0,wrong:0,latestCorrect:i.isCorrect,latestAt:i.answeredAt,lastSelected:i.selected,setIds:[]};if(h.tried++,i.isCorrect||h.wrong++,h.title=u,h.latestCorrect=i.isCorrect,h.latestAt=i.answeredAt,h.lastSelected=i.selected,i.setId){const p=h.setIds.indexOf(i.setId);p>0&&h.setIds.splice(p,1),p!==0&&h.setIds.unshift(i.setId)}t.set(d,h)}const l=[...t.entries()].map(([i,u])=>({key:i,trainingType:u.trainingType,itemId:u.itemId,title:u.title,tried:u.tried,wrong:u.wrong,rate:u.tried===0?0:(u.tried-u.wrong)/u.tried,latestCorrect:u.latestCorrect,latestAt:u.latestAt,lastSelected:u.lastSelected,setIds:u.setIds}));return l.sort((i,u)=>i.rate-u.rate||u.tried-i.tried||fn(i.title,u.title)),{items:l,counted:a,skippedNoTitle:r}}function m_(e,t=8){return e.filter(a=>!a.latestCorrect).slice(0,t)}function C_(e){const t=new Map;for(const r of e){const s=t.get(r.trainingType)??[];s.push(r),t.set(r.trainingType,s)}const a=[...t.entries()].map(([r,s])=>({trainingType:r,items:s,pending:s.filter(l=>!l.latestCorrect).length}));return a.sort((r,s)=>s.pending-r.pending||r.trainingType.localeCompare(s.trainingType)),a}const ms=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function f_(e){const t=new Map;let a=0;for(const l of e){if(l.latestCorrect)continue;const i=l.setIds[0];if(!i){a++;continue}const u=`${l.trainingType}|${i}`,c=t.get(u)??{setId:i,trainingType:l.trainingType,pending:0};c.pending++,t.set(u,c)}const r=(l,i)=>i.pending-l.pending||l.trainingType.localeCompare(i.trainingType)||l.setId.localeCompare(i.setId),s=[...t.values()];return{sentence:s.filter(l=>ms.includes(l.trainingType)).sort(r),word:s.filter(l=>!ms.includes(l.trainingType)).sort(r),noSet:a}}function b_(e,t,a=5){const r=new Set(t);if(r.size===0)return[];const s=[];for(const l of e){const i=new Set,u=[];for(const c of l.cellLabels)r.has(c)&&!i.has(c)&&(i.add(c),u.push(c));u.length!==0&&s.push({id:l.id,name:l.name,kind:l.kind,covered:u,totalCells:l.cellLabels.length})}return s.sort((l,i)=>i.covered.length-l.covered.length||l.totalCells-i.totalCells||fn(l.name,i.name)),s.slice(0,Math.max(0,a))}function g_(e,t){const a=new Set(e.flatMap(r=>r.covered));return t.filter(r=>!a.has(r))}function y_(e,t){const a=new Map;for(const s of e)for(const l of s.cells){const i=s.labelOf(l);a.has(i)||a.set(i,l)}const r=[];for(const s of t){const l=a.get(s);l!==void 0&&r.push(l)}return r}function Cs(e,t,a){return typeof e=="string"&&e?e:t.replace(/\{\{(\w+)\}\}/g,(r,s)=>String(a[s]))}function v_(e,t){const a=Number.isFinite(e)?Math.round(e):0;if(!a||a<=0)return"-";const r=Math.floor(a/60),s=a%60;return t?t(r,s):r>0&&s>0?Cs(Kt.t("customers.duration.minSec",{m:r,s,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:r,s}):r>0?Cs(Kt.t("customers.duration.min",{m:r,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:r}):Cs(Kt.t("customers.duration.sec",{s,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s})}function __(e,t){const a=[],r=new Set;for(const s of e){const l=t(s);r.has(l)||(r.add(l),a.push({key:l,value:s,pinned:!1}))}return a}function x_(e,t){return e.map(a=>a.key===t?{...a,pinned:!a.pinned}:a)}function w_(e,t){return e.filter(a=>a.key!==t)}function B_(e,t,a){const r=e.filter(d=>d.pinned),s=new Set(r.map(d=>d.key)),l=e.length-r.length,i=[],u=new Set(s);for(const d of t){if(i.length>=l)break;const h=a(d);u.has(h)||(u.add(h),i.push({key:h,value:d,pinned:!1}))}const c=[...i];return e.map(d=>d.pinned?d:c.shift()).filter(d=>d!==void 0)}function k_(e){return e.map(t=>t.value)}function A_(e){const{category:t={},isSelected:a=!1,onClick:r}=e||{},s=t?.key?` icon-grid-menu__button--${t.key}`:"",l=o.useId();return n.jsxs("div",{className:`icon-grid-menu__button-wrapper${s}`,children:[n.jsx("button",{className:`icon-grid-menu__button${a?" icon-grid-menu__button--selected":""}`,"data-key":t?.key,type:"button",onClick:a?void 0:r,"aria-pressed":a,"aria-labelledby":l,children:n.jsx(ot,{icon:t.icon,label:t.label,className:"icon-grid-menu__button-icon",imgClassName:"icon-grid-menu__button-icon-image",maskClassName:"icon-grid-menu__button-icon-mask",svgClassName:"icon-grid-menu__button-icon-svg"})}),n.jsx("span",{id:l,className:"icon-grid-menu__button-label button-1",children:t.label})]})}function N_(e){const{categories:t=[],selected:a,onSelect:r,size:s="medium"}=e||{},l=a!==void 0,[i,u]=o.useState(()=>l?null:(t&&t[0]?.key)??null),c=l?a:i,d=o.useRef(r);o.useEffect(()=>{d.current=r});const h=o.useRef(!1),p=(t&&t[0]?.key)??null;o.useEffect(()=>{if(l||h.current||!p)return;h.current=!0;const g=i??p;i==null&&u(g),d.current?.(g)},[l,p]);const m=o.useCallback(g=>{const y=c===g?null:g;h.current=!0,l||u(y),r?.(y)},[c,l,r]);return n.jsx("div",{className:`icon-grid-menu icon-grid-menu--${s}`,children:(t||[]).map(g=>n.jsx(A_,{category:g,isSelected:c===g.key,onClick:()=>m(g.key)},g.key))})}function E_({subs:e=[],selected:t,onSelect:a,size:r="medium"}){const s=r==="small"?32:40;return n.jsx("div",{className:`choice-chips choice-chips--${r}`,children:n.jsx("div",{className:"choice-chips__list",children:e.map(l=>n.jsx(fe,{htmlType:"button",size:s,type:"bar",label:l.label,selected:t===l.key,className:"choice-chips__button",onClick:()=>a?.(l.key)},l.key))})})}function D_({onTermsClick:e,onPrivacyClick:t,contact:a}={}){const r=a?.email??"support@ihab.co.kr",s=a?.tel??"031-380-3724",{t:l}=_e.useTranslation();return n.jsx("footer",{className:"site-footer",children:n.jsxs("div",{className:"safearea",children:[n.jsxs("div",{className:"site-footer__top",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("div",{className:"site-footer__lead h3",children:l("footer.lead",`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
1039
1041
  \uC2E0\uB8B0\uB97C \uC313\uACE0
1040
1042
  \uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`).split(`
1041
- `).map((i,u,c)=>n.jsxs(o.Fragment,{children:[i,u<c.length-1&&n.jsx("br",{})]},u))})}),n.jsxs("div",{className:"site-footer__links",children:[n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.site.title","\uC0AC\uC774\uD2B8")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:"IHAB"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://speechear.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.malgwi","\uB9D0\uADC0")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.soundDirection","\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/vr-sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.vrSoundDirection","VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/hearing-test-pro",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.hearingTest","\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C")})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.sns.title","SNS")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://blog.naver.com/ihab_official",target:"_blank",rel:"noopener noreferrer",children:l("footer.sns.naverBlog","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.instagram.com/ihab.official.yt/",target:"_blank",rel:"noopener noreferrer",children:"Instagram"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.youtube.com/@%EC%95%84%EC%9D%B4%ED%95%B4%EB%B8%8C-%EA%B3%B5%EC%8B%9D%EC%B1%84%EB%84%90",target:"_blank",rel:"noopener noreferrer",children:"Youtube"})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.policy.title","\uC815\uCC45")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{e&&(i.preventDefault(),e())},children:l("footer.policy.terms","\uC774\uC6A9\uC57D\uAD00")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{t&&(i.preventDefault(),t())},children:l("footer.policy.privacy","\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68")})})]})]})]})]}),n.jsx("hr",{className:"site-footer__rule"}),n.jsxs("div",{className:"site-footer__bottom",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("img",{src:$o,alt:"IHAB",className:"site-footer__logo"})}),n.jsxs("div",{className:"site-footer__meta",children:[n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.ceo","\uB300\uD45C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.ceoName","\uD55C\uC9C0\uD61C")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.address","\uC8FC\uC18C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.addressValue","\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.bizNo","\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.bizNoValue","526-81-02926")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.support","\uACE0\uAC1D\uC13C\uD130")})," ",n.jsxs("span",{className:"footer-meta caption-1",children:[r," \xA0 ",s]})]})]})]}),n.jsx("div",{className:"site-footer__copyright footer-copyright caption-1",children:"\xA9 IHAB, Inc. All rights reserved."})]})})}function S_({logo:e,logoAlt:t="",logoHref:a,links:r=[],actions:s,className:l,containerClassName:i,renderLink:u,menuLabel:c}){const{t:d}=xe.useTranslation(),h=c??{open:d("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:d("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[p,C]=o.useState(!1),g=o.useId(),_=o.useRef(null);o.useEffect(()=>{if(!p)return;const v=Qn(()=>{const y=document.getElementById(g);y&&y.contains(document.activeElement)&&_.current?.focus(),C(!1)}),b=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,w=y=>{y.matches&&C(!1)};return b&&(b.matches&&C(!1),b.addEventListener?.("change",w)),()=>{v(),b?.removeEventListener?.("change",w)}},[p,g]);const m=i?`${i} landing-header__inner`:"landing-header__inner",f=(v,b)=>u?u(v,{onClick:b}):n.jsx("a",{href:v.href,onClick:b,"aria-current":v.current?"page":void 0,children:v.label});return n.jsxs("header",{className:l?`landing-header ${l}`:"landing-header",children:[n.jsxs("div",{className:m,children:[e!=null&&(()=>{const v=typeof e=="string"?n.jsx("img",{src:e,alt:t,className:"landing-header__logo"}):e;return a?n.jsx("a",{href:a,className:"landing-header__brand",children:v}):n.jsx("div",{className:"landing-header__brand",children:v})})(),r.length>0&&n.jsx("nav",{className:"landing-header__links",children:r.map((v,b)=>n.jsx("span",{children:f(v)},`${b}:${v.href}`))}),n.jsxs("div",{className:"landing-header__actions",children:[s,r.length>0&&n.jsx("button",{ref:_,type:"button",onClick:()=>C(v=>!v),"aria-expanded":p,"aria-controls":g,"aria-label":p?h.close:h.open,className:p?"landing-header__toggle landing-header__toggle--open":"landing-header__toggle",children:n.jsxs("span",{className:"landing-header__burger",children:[n.jsx("span",{}),n.jsx("span",{}),n.jsx("span",{})]})})]})]}),r.length>0&&n.jsx("nav",{id:g,hidden:!p,className:"landing-header__drawer",children:n.jsx("div",{className:i??void 0,children:r.map((v,b)=>n.jsx("span",{className:"landing-header__drawer-item",children:f(v,()=>C(!1))},`${b}:${v.href}`))})})]})}function j_({children:e,action:t,onClick:a,className:r}){const s=a?"bottom-sticky__inner bottom-sticky__inner--clickable":"bottom-sticky__inner";return n.jsx("div",{className:r?`bottom-sticky ${r}`:"bottom-sticky",children:n.jsxs("div",{className:s,onClick:a,...tc(a),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function T_({mountedRef:e}){const t=o.useRef({phase:"sound",at:0}),a=o.useRef(0),r=o.useRef(null),s=o.useRef(null),l=o.useCallback(()=>{const m=t.current,f=m.phase!=="sound"&&m.at>0;s.current=f?{phase:m.phase,elapsed:Math.max(0,Date.now()-m.at)}:null},[]),i=o.useCallback(()=>{const m=s.current;return s.current=null,m},[]),u=o.useCallback(()=>{a.current+=1,t.current={phase:"sound",at:0}},[]),c=o.useCallback((m,f,v=0)=>{if(!(m>0))return Promise.resolve(!0);const b=a.current;return t.current={phase:f,at:Date.now()-Math.max(0,v)},new Promise(w=>{const y=setTimeout(()=>{r.current===y&&(r.current=null),w(!!e.current&&b===a.current)},m);r.current=y})},[e]),d=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),h=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),p=o.useCallback(()=>{const m=t.current;return m.phase!=="sound"&&m.at>0},[]),C=o.useCallback(()=>a.current,[]),g=o.useCallback(m=>m===a.current,[]),_=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:g,abort:u,waitPad:c,enterSound:d,leave:h,pause:l,resume:i,__bumpGenerationForTest:_}),[p,C,g,u,c,d,h,l,i,_])}const Ba=9,M_=e=>Math.round(Math.min(Ba,Math.max(0,e))/Ba*100),L_=e=>e/100*Ba,ar=2,$c=.1,$_=e=>Math.min(ar,Math.max(0,e)),R_=.1,P_=e=>Math.round(e*1e6)/1e6;function rr(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return $_(t);const a=Math.min(Ba,Math.max(0,Number(e.level)||0))/Ba,r=Number(e.mainVolume);return r>0?a>0?P_(Math.min(ar,Math.max(R_,a/r))):0:1}const Rc=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function Pc(e){return Rc(e)}function fs(e){return Rc(e)*rr(e)}function bs(e,t=W1()){const a=Number.isFinite(t)&&t>0?t:1;return Math.min(1,fs(e)/a)}function ra(e,t){const a={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(a.noiseRatio=rr({level:a.level,mainVolume:a.mainVolume})),a}const oa={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},gs=o.createContext(null);function Er(){return o.useContext(gs)}const ys=e=>`${z1()}/${e}`,Ic=e=>Array.from({length:10},(t,a)=>ys(`${e}-${String(a+1).padStart(2,"0")}.mp3`)),Dr={get defaultNoise(){return ys("noise1.mp3")},get street(){return Ic("noise2")},get restaurant(){return Ic("noise3")},get buzz(){return ys("noise4.mp3")}};function I_(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return Dr.defaultNoise;case"street":return Dr.street[t];case"restaurant":return Dr.restaurant[t];case"buzz":return Dr.buzz;default:return null}}function F_({noisePlayer:e,audioRef:t,playbackStateRef:a,sequencer:r}){const s=o.useRef(e?.registerAnalyser);s.current=e?.registerAnalyser;const l=o.useRef(null),[i,u]=o.useState(null),c=o.useRef(null),d=o.useRef(null),h=o.useRef(null),p=o.useRef(null),C=o.useRef(0),g=o.useRef(null),_=o.useCallback(()=>!!r?.isRunning(),[r]),m=o.useCallback(()=>{p.current!==null&&(cancelAnimationFrame(p.current),p.current=null),g.current!==null&&(clearTimeout(g.current),g.current=null)},[]),f=o.useCallback((B,x=250)=>{const N=l.current;if(!N)return;const A=d.current;if(A){d.current=null;try{N.pause()}catch{}N.src=A,N.load()}if(!N.src)return;C.current+=1,m();try{oo(),lr(N).then(R=>{if(l.current===N)try{s.current?.("noise",R)}catch{}})}catch{}const D=N.paused?0:ir(N);N.paused&&Vn(N,0),N.play().catch(()=>{});const E=performance.now(),k=()=>{const R=Math.min(1,(performance.now()-E)/x);try{Vn(N,D+(B-D)*R)}catch{}R<1?p.current=requestAnimationFrame(k):p.current=null};p.current=requestAnimationFrame(k)},[m]),v=o.useCallback((B=250,x)=>{const N=l.current;if(!N||N.paused){x?.();return}const A=++C.current;m();const D=performance.now(),E=ir(N),k=()=>{const R=Math.min(1,(performance.now()-D)/B);try{Vn(N,E*(1-R))}catch{}if(R<1)p.current=requestAnimationFrame(k);else{p.current=null,g.current!==null&&(clearTimeout(g.current),g.current=null);try{N.pause()}catch{}x?.()}};p.current=requestAnimationFrame(k),g.current=setTimeout(()=>{if(g.current=null,C.current===A){p.current!==null&&(cancelAnimationFrame(p.current),p.current=null);try{N.paused||(Vn(N,0),N.pause(),x?.())}catch{}}},B+150)},[m]);o.useEffect(()=>{const B=document.createElement("audio");return B.loop=!0,B.crossOrigin="anonymous",l.current=B,()=>{m();try{B.pause(),B.removeAttribute("src"),B.load()}catch{}l.current=null,c.current=null,d.current=null}},[m]);const b=e?bs(e.settings):0,w=!!e?.settings.enabled&&b>0;o.useEffect(()=>{if(!w)return;let B=0;const x=setInterval(()=>{const N=l.current;if(!N||N.paused){B=0;return}const A=t.current;if(A&&!A.paused&&!A.ended||_()||a.current==="playing"){B=0;return}B+=1,B>=2&&(B=0,v())},400);return()=>clearInterval(x)},[v,w,t,a,_]),o.useEffect(()=>{const B=()=>{const x=l.current;if(document.hidden){if(x&&!x.paused){m();try{x.pause()}catch{}}return}if(!x||!x.paused)return;const N=t.current,A=!!N&&!N.paused&&!N.ended||_()||a.current==="playing",D=h.current;A&&D?.enabled&&D.volume>0&&f(D.volume)};return document.addEventListener("visibilitychange",B),()=>document.removeEventListener("visibilitychange",B)},[m,f,t,a,_]),o.useEffect(()=>{h.current=e?{enabled:e.settings.enabled,volume:b,type:e.settings.type}:null},[e,e?.settings.enabled,b,e?.settings.type]);const y=o.useRef(null);return o.useEffect(()=>()=>{y.current?.(),y.current=null},[]),o.useEffect(()=>{const B=e?.settings,x=l.current;if(!x)return;const N=B?bs(B):0;if(!B||!B.enabled||N===0){v();return}if(c.current!==B.type){const A=I_(B.type);A&&(c.current=B.type,u(A),d.current=A,v(150,()=>{if(d.current!==A)return;d.current=null,x.src=A,x.load();const D=t.current;if(D&&!D.paused||_()){y.current?.();const E=()=>{x.removeEventListener("canplay",E),y.current===k&&(y.current=null);const R=t.current,$=h.current;(R&&!R.paused&&!R.ended||_())&&$?.enabled&&$.volume>0&&f($.volume)},k=()=>x.removeEventListener("canplay",E);y.current=k,x.addEventListener("canplay",E)}}))}else{const A=t.current,D=!!A&&!A.paused&&!A.ended||_()||a.current==="playing";if(D&&d.current)f(N);else if(D&&x.paused&&x.src)f(N);else if(!x.paused)if(!D)v();else{m();const E=ir(x),k=performance.now(),R=()=>{const $=Math.min(1,(performance.now()-k)/150);try{Vn(x,E+(N-E)*$)}catch{}$<1?p.current=requestAnimationFrame(R):p.current=null};p.current=requestAnimationFrame(R)}}},[e?.settings,e?.settings.enabled,b,e?.settings.type,m,f,v,t,a,h,_]),o.useEffect(()=>{const B=l.current;if(B)try{B.playbackRate=Math.min(1.25,Math.max(.75,e?.settings.speed??1))}catch{}},[e?.settings.speed]),{noiseAudioRef:l,activeNoiseUrl:i,noiseSettingsRef:h,cancelNoiseFade:m,fadeInNoise:f,fadeOutNoise:v}}function O_({ttsText:e,playbackRate:t,mainVolume:a,fillRef:r,waveProgressRef:s,setProgress:l,setPlaybackState:i,setStateLocal:u,fadeInNoise:c,fadeOutNoise:d,noiseSettingsRef:h,onDoneRef:p,handleEndRef:C}){const g=o.useRef(null),_=o.useRef(0),m=o.useRef(null),f=o.useRef(0),v=o.useRef(!1);o.useEffect(()=>()=>{f.current++;try{if(m.current&&(cancelAnimationFrame(m.current),m.current=null),v.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}v.current=!1}}catch{}},[]);const b=(B,x=1)=>{try{const N=(B||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(B||"").length);return Math.max(700,Math.round(N*300/Math.max(.25,x)))}catch{return 1200}},w=o.useCallback(B=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof p.current=="function"&&p.current(!1)}catch{}return}const x=window.speechSynthesis,N=++f.current;try{try{x.cancel()}catch{}const A=B??e,D=Array.isArray(A)?A.filter(T=>!!T):[A||""];D.length===0&&D.push("");const E=Math.max(.3,Math.min(3,t));_.current=D.reduce((T,P)=>T+b(P,E||1),0),g.current=performance.now(),l(0),i("playing"),u("playMode");const k=h.current;k?.enabled&&(k?.volume??0)>0&&c(k.volume);const R=()=>{try{const T=g.current||performance.now(),P=performance.now()-T,M=_.current||1200,ee=Math.min(1,P/M);try{r.current&&(r.current.style.left=`${ee*100}%`),s.current&&s.current.style.setProperty("--progress",String(ee))}catch{}ee<1&&(m.current=requestAnimationFrame(R))}catch{}},$=()=>{if(N===f.current)try{m.current&&(cancelAnimationFrame(m.current),m.current=null),l(1),i("stopped");try{C.current?.()}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{}},G=T=>{const P=new SpeechSynthesisUtterance(D[T]);try{P.rate=E}catch{}try{P.volume=Math.max(0,Math.min(1,a))}catch{}P.onend=()=>{if(N===f.current){if(T<D.length-1){try{G(T+1)}catch{$()}return}$()}},P.onerror=()=>{$()},P.onstart=()=>{if(!(T>0))try{m.current&&(cancelAnimationFrame(m.current),m.current=null),m.current=requestAnimationFrame(R)}catch{}},v.current=!0,x.speak(P)};try{G(0)}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}},[e,t,a,c,r,s,l,i,u,h,p,C]),y=o.useCallback(()=>{f.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}m.current&&(cancelAnimationFrame(m.current),m.current=null),d(),g.current=null}catch{}i("stopped"),u("active"),l(0)},[d,i,u,l]);return{startTTS:w,stopTTS:y}}const z_=.01,W_=.3;async function H_(e,t,a,r=!1){let s=null;try{const l=window.AudioContext||window.webkitAudioContext;s=new l;const i=await s.decodeAudioData(e.slice(0)),u=i.numberOfChannels>0?i.getChannelData(0):null;if(!u)return null;let c=0;if(r){const g=Math.floor(W_*i.sampleRate),_=Math.min(u.length,g);for(;c<_&&Math.abs(u[c])<=z_;)c++;c>=_&&(c=0)}const d=u.length-c,h=a&&a>0?Math.min(d,Math.floor(a*i.sampleRate)):d,p=Math.max(t,h),C=Math.floor(p/t)||1;return new Array(t).fill(0).map((g,_)=>{const m=c+_*C,f=Math.min(m+C,c+p,u.length);let v=0;for(let b=m;b<f;b++){const w=Math.abs(u[b]);w>v&&(v=w)}return v})}catch{return null}finally{try{s?.close?.()}catch{}}}async function Fc(e,t,a,r=!1){try{const s=await fetch(e);if(s.ok===!1)return null;const l=await s.arrayBuffer();return await H_(l,t,a,r)}catch(s){try{const l=zl(s)}catch{}return null}}const vs=45,V_=74,q_=2;function Sr(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function jr(e){return Sr(e)/45}const U_=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),Oc=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function zc({durationsSec:e,leadInMs:t=0,tailMs:a=0}){const r=Oc(t),s=Oc(a),l=[];let i=0;return e.forEach((u,c)=>{for(const[d,h]of[["lead",r],["sound",U_(u)],["tail",s]])l.push({kind:d,track:c,startMs:i,durMs:h}),i+=h}),{segments:l,totalMs:i,trackCount:e.length}}function Wc(e,t){const a=(t|0)*3;if(t<0||a+2>=e.segments.length)return null;const[r,s,l]=[e.segments[a],e.segments[a+1],e.segments[a+2]];return{lead:r,sound:s,tail:l,totalMs:r.durMs+s.durMs+l.durMs}}function G_(e,t){const a=Wc(e,t.track);if(!a||!(a.totalMs>0))return 0;const r=a[t.kind],s=Math.min(Math.max(0,Number.isFinite(t.elapsedMs)?t.elapsedMs:0),r.durMs);return Math.max(0,Math.min(1,(r.startMs-a.lead.startMs+s)/a.totalMs))}function K_(e,t,a){const r=Math.max(0,Math.floor(a)),s=Wc(e,t);if(!s||r===0||!(s.totalMs>0)||s.lead.durMs===0&&s.tail.durMs===0||!(s.sound.durMs>0))return{lead:0,sound:r,tail:0};const l=Math.round(s.lead.durMs/s.totalMs*r),i=Math.round(s.tail.durMs/s.totalMs*r),u=Math.max(1,r-l-i),c=l+u+i-r;return{lead:Math.max(0,l-Math.ceil(c/2)),sound:u,tail:Math.max(0,i-Math.floor(c/2))}}function Y_({currentTime:e,sources:t,index:a,audioDuration:r}){const s=a||0,l=Array.isArray(t)&&t.length>0?t[s]:void 0,i=l?l.duration||r||0:r||0;if(!(i>0))return 0;const u=Number.isFinite(e)?e:0;return Math.max(0,Math.min(1,u/i))}function Z_({phase:e,phaseElapsedMs:t,currentTime:a,trackDurationSec:r,leadInMs:s,tailMs:l}){const i=zc({durationsSec:[r],leadInMs:s,tailMs:l});return G_(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(a)?a:0)*1e3:t})}function X_({bars:e,trackDurationSec:t,leadInMs:a,tailMs:r}){return K_(zc({durationsSec:[t],leadInMs:a,tailMs:r}),0,e)}function J_(e,t){if(!Array.isArray(e))return null;const a=t||0;return a<e.length-1?a+1:null}function Q_({ended:e,completedByEnd:t}){return!!e||!!t}function ex(e){return e.map((t,a)=>({src:t.src,label:String(a+1),color:void 0,duration:t.duration||0}))}function tx(e){return e.reduce((t,a)=>t+(a.duration||0),0)}function nx(e,t,a){const r=Array.isArray(e)?e:e?[e]:[],s=[];for(const l of r)if(l){if(typeof l=="object"&&l!==null&&"src"in l&&l.src){const i=l;s.push({code:i.code??null,src:i.src});continue}if(typeof l=="string"&&(l.startsWith("http")||l.includes("/"))){s.push({code:null,src:l});continue}if(typeof l=="string"||typeof l=="number"){const i=String(l),u=a(i,t);u&&s.push({code:i,resolvedPath:u})}}return s}function ax(e,t){if(!t||e.readyState<1)return!0;const a=e.currentSrc||e.src;return a?Hc(a)!==Hc(t):!0}function Hc(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const Vc=4,rx=jr(Vc/vs);function ox(e){const{src:t,segments:a,progress:r=0,waveProgressRef:s,noiseSrc:l,noiseRatio:i=0,noiseSpeed:u=1,totalDuration:c=0,mainVolume:d=1,onReadyChange:h,showSoundWaveForm:p=!0,leadInMs:C=0,tailMs:g=0,trackDurationSec:_=0}=e,m=o.useRef(null),f=o.useRef(null),[v,b]=o.useState(null),[w,y]=o.useState(!1),[B,x]=o.useState(null),[N,A]=o.useState(2),[D,E]=o.useState(0),[k,R]=o.useState(null),[$,G]=o.useState(!1),[T,P]=o.useState(!1),M=3,ee=3,Q=1,F=300,Z=o.useRef(0),L=o.useCallback(()=>{const ye=m.current,he=f&&f.current?f.current:ye?ye.closest(".audio-player__wave"):null,Ne=he?he.getBoundingClientRect():ye?ye.getBoundingClientRect():null,Re=Ne?Ne.width:0,Me=Ne?Math.max(100,Ne.width):320,se=Ne?Ne.height:0,Ee=Math.max(Q,Math.min(F,Math.floor((Me+ee)/(M+ee)))),$e=Ee*M,Ae=Math.max(0,Ee-1),Fe=Math.max(0,Ae>0?(Me-$e)/Ae:ee);return{bars:Ee,gap:Fe,height:se,width:Re}},[]),V=o.useRef(void 0),U=o.useRef(null),q=o.useCallback(async(ye,he,{quiet:Ne=!1}={})=>{const Re=++Z.current,Me=()=>Z.current===Re;try{if(Ne||y(!1),V.current=ye,!ye){Me()&&b(null);return}let se=he;if(!se)try{for(let Ae=0;Ae<4&&!(m.current||f.current);Ae++)await new Promise(Fe=>requestAnimationFrame(Fe));await new Promise(Ae=>requestAnimationFrame(Ae));const $e=L();$e.height>0&&E($e.height),se=$e.bars,A($e.gap)}catch{se=120}U.current=se;const Ee=await Fc(ye,se);if(!Me())return;if(!Ee){b(null),y(!1);return}b(Ee),x(se),y(!0)}catch{if(!Me())return;b(null),y(!1)}},[y,b,E,A,x,L]);o.useEffect(()=>{const ye=f.current;if(!ye||typeof ResizeObserver>"u")return;let he=null;const Ne=new ResizeObserver(()=>{he!==null&&cancelAnimationFrame(he),he=requestAnimationFrame(()=>{he=null;try{const Re=L();if(Re.width<=0||(Re.height>0&&E(Re.height),U.current===null||Re.bars===U.current))return;const Me=V.current;A(Re.gap),Me?q(Me,Re.bars,{quiet:!0}).catch(()=>{}):U.current=Re.bars}catch{}})});return Ne.observe(ye),()=>{Ne.disconnect(),he!==null&&cancelAnimationFrame(he)}},[L,q]),o.useEffect(()=>{const ye=a&&a[0]&&a[0].src||t||a&&a.length===1&&a[0]&&a[0].src;q(typeof ye=="string"?ye:void 0).catch(()=>{}),P(!1)},[t,a,q]),o.useEffect(()=>{let ye=!1;if(G(!1),R(null),!l||!B)return;const he=c>0?c*(u||1):void 0;return Fc(l,B,he,!0).then(Ne=>{ye||(R(Ne),Ne||G(!0))}).catch(()=>{ye||(R(null),G(!0))}),()=>{ye=!0}},[l,B,c,u]);const j=Math.max(0,Math.min(1,d)),I=o.useMemo(()=>v&&v.length&&Math.max(...v)||1,[v]),O=B||40,Y=o.useMemo(()=>X_({bars:O,trackDurationSec:_,leadInMs:C,tailMs:g}),[O,_,C,g]),K=o.useMemo(()=>Array.from({length:O}).map((ye,he)=>{const Ne=he>=Y.lead&&he<Y.lead+Y.sound,Re=Y.sound>0&&Ne?Math.min(O-1,Math.round((he-Y.lead)/Y.sound*O)):-1,Me=Ne?v&&v[Re]!=null?v[Re]:null:v?0:null,se=Me==null?null:Math.min(1,Me/I*j),Ee=se!=null&&D>0&&Sr(se)<=Vc,$e=se==null?.15:Ee?0:jr(se),Ae=Ee,Fe=O>1?he/(O-1):0;return n.jsx("div",{className:Ae?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":$e,"--i":he,"--mix":Fe}},he)}),[O,v,I,j,D,Y]),ie={"--progress":String(Math.max(0,Math.min(1,r)))},te=o.useMemo(()=>k&&k.length&&Math.max(...k.map(ye=>Number.isFinite(ye)?Math.abs(ye):0))||1,[k]),ne=j*Math.max(0,i),z=!l||!k||!k.length?1:Math.max(1,ne),ae={"--bar-gap":`${N}px`,"--wave-h":`${Sr(z)}px`,"--wave-h1":`${vs}px`},H=w&&(l?!!k||$:!0);o.useEffect(()=>{H&&P(!0)},[H]);const W=T?w:H;o.useEffect(()=>{h?.(W)},[W,h]);const ue=B||40,Be=o.useMemo(()=>Array.from({length:ue}).map((ye,he)=>{const Ne=k&&k[he]!=null?k[he]:null,Re=Ne==null?0:Math.abs(Ne)/te*ne,Me=Math.max(rx,jr(Re)),se=ue>1?he/(ue-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":Me,"--i":he,"--mix":se}},he)}),[ue,k,te,ne,D]);return n.jsxs("div",{className:"audio-player__wave",ref:f,style:ae,children:[l&&n.jsx("div",{className:`audio-player__wave-noise ${H?"is-ready":""}`,"aria-hidden":"true",children:Be}),p&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${W?"is-ready":""}`,ref:m,children:K}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${W?"is-ready":""}`,ref:s,style:ie,children:K})]})]})}const qc={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function _s(e,t){return new Promise((a,r)=>{const s=document.createElement("audio");let l=!1;const i=()=>{try{s.removeAttribute("src"),s.load()}catch{}},u=()=>{if(l)return;l=!0;const d=isFinite(s.duration)&&s.duration||0;i(),a(d)},c=d=>{l||(l=!0,i(),t.rejectOnError?r(new Error(d)):a(0))};s.addEventListener("loadedmetadata",u),s.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),t.timeoutMs),s.src=e})}const sx=2e3;function Uc(e,t=sx){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.addEventListener("canplay",s,{once:!0}),e.addEventListener("error",s,{once:!0}),setTimeout(s,t)})}function lx({showSoundWaveForm:e,showNoiseWaveForm:t,timeoutMs:a=2500}){const r=o.useRef(!1),s=o.useRef([]),l=o.useCallback(c=>{if(r.current=c,!c||!s.current.length)return;const d=s.current;s.current=[];for(const h of d)h(!0)},[]),i=o.useCallback(()=>{r.current=!1},[]),u=o.useCallback(()=>!e&&!t||r.current?Promise.resolve(!0):new Promise(c=>{const d=p=>{clearTimeout(h),s.current=s.current.filter(C=>C!==d),c(p)},h=setTimeout(()=>d(!0),a);s.current.push(d)}),[e,t,a]);return o.useEffect(()=>()=>{const c=s.current;s.current=[];for(const d of c)d(!1)},[]),{onReadyChange:l,waitForReady:u,markNotReady:i}}function ix(){const e=o.useRef([]),t=o.useCallback(s=>(e.current.push(s),s),[]),a=o.useCallback(s=>{const l=new Set([...s].filter(Boolean));e.current=e.current.filter(i=>{if(l.has(i))return!0;try{URL.revokeObjectURL(i)}catch{}return!1})},[]),r=o.useCallback(()=>{a([])},[a]);return o.useEffect(()=>()=>{for(const s of e.current)try{URL.revokeObjectURL(s)}catch{}e.current=[]},[]),{track:t,keepOnly:a,revokeAll:r}}function ux({offsetY:e=8}={}){const t=o.useRef(null),[a,r]=o.useState(null),s=o.useCallback(()=>r(null),[]),l=o.useCallback(()=>{try{const i=t.current?.getBoundingClientRect();if(!i)return;r({left:i.left,right:i.right,width:i.width,height:i.height,x:i.x,top:i.top+e,bottom:i.bottom+e,y:i.y+e,toJSON:i.toJSON.bind(i)})}catch{}},[e]);return o.useEffect(()=>{if(a)return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[a,s]),{ref:t,rect:a,show:l,hide:s}}function cx(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 dx=400,px=2e3,Gc=5;function hx({audioRef:e,fillRef:t,waveProgressRef:a,sourcesRef:r,currentIndexRef:s,sequencer:l,leadInMs:i=0,tailMs:u=0}){const c=o.useRef(null),d=o.useRef(0),h=o.useRef(null),p=o.useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null)},[]),C=o.useCallback(()=>{if(c.current!==null)return;let _=0;const m=()=>{if(zn){const f=typeof performance<"u"&&performance.now?performance.now():Date.now();if(_>0&&f-_>dx){const v=h.current===null||f-h.current>px;if(h.current=f,v&&d.current<Gc){d.current+=1;const b=d.current;let w=null;try{w=typeof document<"u"?document.visibilityState:null}catch{}kt(`progress-ticker-slow-frames#${b}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(f-_)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,w==="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.",b>=Gc?`(${b}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${b}\uBC88\uC9F8)`)}}_=f}try{const f=e.current,v=Array.isArray(r.current)?r.current[s.current||0]:void 0,b=!!v&&Number.isFinite(v.duration)&&(v.duration??0)>0,w=b?0:cx(f),y=t.current,B=(i||0)>0||(u||0)>0,x=B&&(l?.positionRef.current?.phase??"sound")!=="sound";if(w===null&&!x)try{y&&y.style.visibility!=="hidden"&&(y.style.visibility="hidden")}catch{}else{const N=b?v.duration:w||0;zn&&x&&!(N>0)&&kt("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?Z_({phase:l?.positionRef.current?.phase??"sound",phaseElapsedMs:l?.positionRef.current?Math.max(0,Date.now()-l.positionRef.current.at):0,currentTime:f&&typeof f.currentTime=="number"?f.currentTime:0,trackDurationSec:N,leadInMs:i||0,tailMs:u||0}):Y_({currentTime:f&&typeof f.currentTime=="number"?f.currentTime:0,sources:r.current,index:s.current,audioDuration:w??0});try{y&&(y.style.visibility&&(y.style.visibility=""),y.style.left=`${A*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(A))}catch{}}}catch{}c.current=requestAnimationFrame(m)};c.current=requestAnimationFrame(m)},[e,t,a,r,s,l,i,u]),g=o.useCallback(_=>{p();try{t.current&&(t.current.style.visibility="",t.current.style.left=`${_*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(_))}catch{}},[p,t,a]);return o.useEffect(()=>p,[p]),{start:C,stop:p,settleTo:g}}function xs({btnLabel:e,soundSrc:t,bucketPath:a,onDone:r,disabled:s=!1,ttsText:l=null,className:i,showSoundWaveForm:u=!0,showNoiseWaveForm:c=!0,leadInMs:d=0,tailMs:h=0}){const{t:p}=xe.useTranslation(),C=e,g=Er(),_=o.useRef(g?.registerAnalyser);o.useEffect(()=>{_.current=g?.registerAnalyser});const m=o.useRef(null),f=o.useRef(null),v=o.useRef(null),b=ix(),w=o.useRef(null),y=o.useRef(!1),B=o.useRef(null),{ref:x,rect:N,show:A,hide:D}=ux();o.useEffect(()=>()=>{_.current?.("main",null),_.current?.("noise",null)},[]);const[E,k]=o.useState(!1),[R,$]=o.useState("idle"),[G,T]=o.useState("stopped"),P=o.useRef("stopped");o.useEffect(()=>{P.current=G},[G]);const[M,ee]=o.useState(0),[Q,F]=o.useState("active"),Z=o.useRef(!1);o.useEffect(()=>{if(Q!=="playMode"||!Z.current)return;Z.current=!1;const X=typeof document<"u"?document.activeElement:null;if(X&&X!==document.body)return;const pe=v.current?.querySelectorAll("button")[1];try{pe?.focus()}catch{}},[Q]);const[L,V]=o.useState(null),[U,q]=o.useState(null),[j,I]=o.useState(0),[O,Y]=o.useState(!1),[K,ie]=o.useState(0),te=g?.playbackRate??1,ne=g?.mainVolume??1,z=g?fs(g.settings):0,ae=g?Pc(g.settings):ne,[H,W]=o.useState("idle"),[ue,Be]=o.useState(""),[ye]=o.useState("top"),he=o.useRef(null),Ne=o.useRef(0),Re=o.useRef(null),Me=o.useRef(!0),se=T_({mountedRef:Me}),Ee=o.useRef(null),$e=o.useRef(d),Ae=o.useRef(h);o.useEffect(()=>{$e.current=Math.max(0,d||0)},[d]),o.useEffect(()=>{Ae.current=Math.max(0,h||0)},[h]);const{start:Fe,stop:Ve,settleTo:ct}=hx({audioRef:m,fillRef:f,waveProgressRef:Re,sourcesRef:he,currentIndexRef:Ne,sequencer:se,leadInMs:d,tailMs:h}),{onReadyChange:ot,waitForReady:Xe,markNotReady:ft}=lx({showSoundWaveForm:u,showNoiseWaveForm:c}),Le=o.useRef(null),qe=o.useRef(s),Se=o.useRef(r),He=o.useRef(null),Qe=o.useRef(!1),[it,bt]=o.useState(!1),wt=o.useCallback(X=>{Qe.current=X,bt(X)},[]),Et=o.useRef(null),{activeNoiseUrl:at,noiseSettingsRef:st,fadeInNoise:Bt,fadeOutNoise:At}=F_({noisePlayer:g,audioRef:m,playbackStateRef:P,sequencer:se}),{startTTS:Mt,stopTTS:Rt}=O_({ttsText:l,playbackRate:te,mainVolume:ae,fillRef:f,waveProgressRef:Re,setProgress:ee,setPlaybackState:T,setStateLocal:F,fadeInNoise:Bt,fadeOutNoise:At,noiseSettingsRef:st,onDoneRef:Se,handleEndRef:Et});o.useEffect(()=>{be.current=Rt});const _t=X=>{if(typeof window>"u"||!window.speechSynthesis){try{Be(p("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}Mt(X);return}gt("tts"),Mt(X)},dt=Array.isArray(t)?t.filter(Boolean):t?[t]:[],ut=(!dt||dt.length===0)&&!!l,lt=Array.isArray(L)&&L.length>0?L:Array.isArray(U)&&U.length>0?U:null,xt=Math.max(Array.isArray(lt)?lt.length:0,dt.length);o.useEffect(()=>(Me.current=!0,()=>{Me.current=!1}),[]);const pt=()=>{se.abort()},be=o.useRef(null),ve=o.useRef(null),we=o.useRef(null),tt=o.useRef(null);tt.current||(tt.current=()=>{we.current=null;const X=m.current;if(ve.current==="audio"&&X&&(!X.paused||se.isRunning())){pt();try{X.pause()}catch{}Me.current&&(T("paused"),Ve(),At())}else if(ve.current==="tts")try{be.current?.()}catch{}});const gt=X=>{ve.current=X,we.current=Ka(tt.current)},Nt=()=>{we.current?.(),we.current=null};o.useEffect(()=>()=>{tt.current&&_r(tt.current)},[]);const yt=o.useRef(te);o.useEffect(()=>{yt.current=te||1},[te]);const Te=o.useCallback(X=>{const pe=yt.current||1;try{X.defaultPlaybackRate=pe}catch{}try{X.playbackRate=pe}catch{}},[]),nt=o.useCallback((X,pe)=>{if(!ax(X,pe)){try{X.currentTime=0}catch{}Te(X);return}X.src=pe,Te(X),X.load(),Te(X)},[Te]),oe=o.useCallback(()=>{He.current&&(clearTimeout(He.current),He.current=null),W("idle")},[]),ge=o.useCallback(async(X,pe=3,De=50,We=0)=>{oe();const Ze=se.generation(),Ke=!!X&&X.currentTime>0&&!X.ended,mt=Math.max(0,$e.current-Math.max(0,We));if(mt>0&&!Ke){gt("audio"),Fe(),T("playing");const vt=st.current;if(vt?.enabled&&(vt.volume??0)>0)try{Bt(vt.volume)}catch{}if(!await se.waitPad(mt,"lead",We)||!Me.current||!se.isCurrent(Ze))return!1}se.enterSound();for(let vt=0;vt<pe;vt++){if(!Me.current||!se.isCurrent(Ze))return!1;try{return gt("audio"),await X.play(),!0}catch(fe){if((fe instanceof Error||typeof fe=="object"&&fe&&"name"in fe?fe.name:void 0)==="AbortError"){if(!se.isCurrent(Ze))return!1;await new Promise(S=>setTimeout(S,De));continue}try{Be(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{Be(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[p,Fe,se,Bt,st,oe]),Oe=o.useCallback(X=>{const pe=se.generation(),De=Math.max(0,Ae.current-Math.max(0,X));Fe();const We=st.current;if(We?.enabled&&(We.volume??0)>0)try{Bt(We.volume)}catch{}const Ze=()=>{try{Ee.current?.()}catch{}};if(De<=0){se.leave(),Ze();return}se.waitPad(De,"tail",X).then(Ke=>{se.leave(),Ke&&se.isCurrent(pe)&&Ze()}).catch(()=>{})},[se,Fe,Bt,st]),Je=o.useCallback(()=>{const X=m.current;if(!X)return;const pe=()=>{T("playing"),F("playMode"),Y(!0),Fe();try{oo(),lr(X).then(Ke=>{if(Me.current)try{_.current?.("main",Ke)}catch{}})}catch{}const Ze=st.current;Ze?.enabled&&(Ze?.volume??0)>0&&Bt(Ze.volume)},De=()=>{Q_({ended:!!X?.ended,completedByEnd:Qe.current})||(T("paused"),Ve(),At())},We=()=>{const Ze=()=>{try{const Ke=he.current,mt=J_(Ke,Ne.current);if(mt!==null){Ne.current=mt,I(mt),Y(!0);const vt=Ke?.[mt]&&Ke[mt].src;if(vt&&X){nt(X,vt),ge(X).catch(()=>{});return}}}catch{}T("stopped"),ee(1);try{if(X)try{X.currentTime=0}catch{}}catch{}Ve(),Y(!1),At();try{!qe.current&&Et.current&&Et.current()}catch{}};if(Ee.current=Ze,Ae.current>0){Fe(),se.waitPad(Ae.current,"tail").then(Ke=>{se.leave(),Ke&&Ze()}).catch(()=>{});return}Ze()};return X.addEventListener("play",pe),X.addEventListener("pause",De),X.addEventListener("ended",We),()=>{try{X.removeEventListener("play",pe),X.removeEventListener("pause",De),X.removeEventListener("ended",We),Ve()}catch{}}},[Bt,At,ge,st,Fe,Ve,se]);o.useEffect(()=>Je(),[Je]),o.useEffect(()=>{qe.current=s},[s]),o.useEffect(()=>{Se.current=r},[r]),o.useEffect(()=>{if(s||Q!=="active")return;const X=B.current;if(!X)return;let pe=null;const De=requestAnimationFrame(()=>{try{const We=X.getTotalLength();if(!We)return;const Ze=We*.2;X.style.strokeDasharray=`${We-Ze} ${Ze}`;const Ke="triFlow_"+Math.random().toString(36).slice(2);pe=document.createElement("style"),pe.textContent=`@keyframes ${Ke}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${We}}}`,document.head.appendChild(pe),X.style.animation=`${Ke} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(De),pe?.remove()}},[Q,s]),o.useEffect(()=>{he.current=L},[L]),o.useEffect(()=>{Ne.current=j},[j]),o.useEffect(()=>{const X=v.current,pe=w.current;if(!X||!pe)return;let De=null;const We=32,Ze=60,Ke=()=>{try{const vt=Array.from(X.querySelectorAll(":scope > .button"));let fe=0;vt.forEach(ce=>{if(ce===pe)return;const _e=ce.getBoundingClientRect();fe+=_e.width});const S=X.getBoundingClientRect().width,J=Math.max(0,Math.floor(S-fe-8)),me=xt;if(!me||J<=0){Array.from(pe.children).forEach(ce=>{try{ce.style.width=""}catch{}});return}let Pe=Math.floor(J/me);Pe>Ze&&(Pe=Ze),Pe<We&&(Pe=Math.max(We,Math.floor(J/me))),Array.from(pe.querySelectorAll(".button")).forEach(ce=>{try{ce.style.width=`${Pe}px`}catch{}})}catch{}},mt=requestAnimationFrame(Ke);try{De=new ResizeObserver(()=>{requestAnimationFrame(Ke)}),De.observe(X),De.observe(pe),window.addEventListener("resize",Ke)}catch{}return()=>{try{cancelAnimationFrame(mt)}catch{}try{De&&(De.disconnect(),De=null)}catch{}try{window.removeEventListener("resize",Ke)}catch{}}},[L,U,xt]),o.useEffect(()=>()=>{try{Le.current&&(clearTimeout(Le.current),Le.current=null),He.current&&(clearTimeout(He.current),He.current=null)}catch{}},[]);const et=(X,pe)=>{V(X),ie(pe),ft(),q(ex(X)),he.current=X},Ge=()=>{F("playMode"),I(0),Y(!0)},Lt=async(X,pe)=>{wt(!1),y.current=!1,nt(X,pe),await Uc(X),await Xe()!==!1&&(k(!1),Ge(),await ge(X))},nn=async(X,pe=!1)=>{const De=m.current;k(!0),$("measuring_duration");try{const We=await _s(X,{timeoutMs:1e4,rejectOnError:!0});et([{src:X,objectUrl:null,duration:We}],We),$("ready"),pe&&De&&await Lt(De,X)}finally{y.current=!1,k(!1)}},fn=async(X,pe=!1)=>{const De=m.current;k(!0),$("measuring_duration");try{const We=await Promise.all(X.map(Ke=>_s(Ke,{timeoutMs:1e4})));if(!Me.current)return;const Ze=X.map((Ke,mt)=>({src:Ke,objectUrl:null,duration:We[mt]||0}));et(Ze,tx(Ze)),$("ready"),pe&&De&&Ze.length>0&&await Lt(De,Ze[0].src)}finally{y.current=!1,k(!1)}},Pt=async(X=!1,pe=!0)=>{const De=m.current,We=t?Array.isArray(t)?t:[t]:[];if(!We||We.length===0||!We.some(Boolean))return!1;if(y.current)return null;y.current=!0,pe&&k(!0),$("resolving");try{const Ze=nx(t,a,Al),Ke=[];let mt=0;for(const vt of Ze){let fe=vt.src??null,S=null;if(!fe&&vt.resolvedPath){try{$("getting_signed_url"),fe=await kl(vt.resolvedPath)}catch{fe=null}if(!Me.current)return!1;if(!fe)try{$("downloading");const me=await Nl(vt.resolvedPath);if(!Me.current)return!1;if(me){const Pe=me instanceof Blob?me:new Blob([me]);S=b.track(URL.createObjectURL(Pe)),fe=S}}catch{$("error");try{Be(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),F("active")}catch{}}}if(!fe)continue;let J=0;try{$("measuring_duration"),J=await _s(fe,{timeoutMs:3e3})}catch{J=0}if(!Me.current){if(S)try{URL.revokeObjectURL(S)}catch{}for(const me of Ke)if(me.objectUrl)try{URL.revokeObjectURL(me.objectUrl)}catch{}return!1}mt+=J||0,Ke.push({...vt,src:fe,objectUrl:S,duration:J})}if(et(Ke,mt),Ke.length>0&&X&&De){const vt=Ke[0];wt(!1);try{b.keepOnly(Ke.map(fe=>fe.objectUrl))}catch{}if($("ready"),y.current=!1,vt.src&&De)try{if(nt(De,vt.src),await Uc(De),await Xe()===!1)return!1;pe&&k(!1),Ge(),De&&await ge(De)}catch{pe&&k(!1)}else pe&&k(!1);F("playMode"),I(0),Y(!0)}return Ke.length>0}finally{y.current=!1,pe&&k(!1),$(Ze=>Ze==="ready"?"ready":"idle")}},Wt=async X=>{const pe=se.isRunning();if(X.paused&&!pe){if(Qe.current){await It();return}const De=se.resume();if(De){if(T("playing"),De.phase==="tail"){Oe(De.elapsed);return}await ge(X,3,50,De.elapsed);return}await ge(X),T("playing")}else se.pause(),pt(),X.pause(),T("paused"),pe&&(Ve(),At())},Ht=async()=>{const X=m.current;if(!(!X&&!ut)){if(ut){const pe=window.speechSynthesis;if(Q==="active"){const De=ja(),We=Array.isArray(l)?l.filter(Boolean):l?[l]:[];if(De&&We.length>0){if(y.current)return;F("load"),k(!0),$("synthesizing"),y.current=!0;try{const Ze=await Promise.all(We.map(Ke=>Promise.resolve(De(Ke))));Ze.length>1?await fn(Ze,!0):await nn(Ze[0],!0)}catch{y.current=!1,k(!1),F("active"),_t(We.length>0?We:void 0)}return}_t(We.length>0?We:void 0);return}if(Q==="playMode"){const De=!!pe&&(pe.speaking||pe.paused)&&!(X&&(X.currentSrc||X.getAttribute("src")));if(X&&!De){await Wt(X);return}try{if(pe&&pe.paused)try{gt("tts"),pe.resume(),T("playing")}catch{}else try{pe.pause(),T("paused")}catch{}}catch{}}return}if(Q==="active"){if(s&&Array.isArray(he.current)&&he.current.length>0){const De=he.current[0];try{if(De.src&&X)try{nt(X,De.src),Ge(),X&&await ge(X)}catch{}Ge();return}catch{}}F("load");let pe;try{pe=await Pt(!0)}catch{pe=!1}if(pe===!1&&Me.current){try{Be(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}F("active")}return}if(Q!=="load"&&(Q==="playMode"||Q==="active"))try{X&&await Wt(X)}catch(pe){(pe instanceof Error||typeof pe=="object"&&pe&&"name"in pe)&&pe.name}}},It=async()=>{const X=m.current;if(X)try{const pe=he.current;if(Array.isArray(pe)&&pe.length>1){await bn(0);return}wt(!1);try{X.currentTime=0}catch{}X&&await ge(X),T("playing"),F("playMode")}catch{}},kn=()=>{pt(),Nt(),be.current?.();const X=m.current;try{if(X){try{X.pause()}catch{}try{X.currentTime=0}catch{}}}catch{}At(),T("stopped"),F("active"),ee(0),Y(!1)},an=async(X,{sameSegment:pe=!1}={})=>{pt();const De=se.generation(),We=m.current,Ze=he.current?.[X]?.src;try{if(wt(!1),I(X),Y(!0),Ne.current=X,!Ze||!We||(pe||ft(),nt(We,Ze),!pe&&await Xe()===!1)||!se.isCurrent(De)||(await ge(We),!se.isCurrent(De)))return;T("playing"),F("playMode")}catch{}},jt=async()=>{const X=he.current,pe=Ne.current||0;if(!X||pe<=0){await It();return}await an(pe-1)},$t=async()=>{const X=he.current,pe=Ne.current||0;if(!X||pe>=X.length-1){kn();return}await an(pe+1)},qt=()=>{if(Qe.current)return;const X=200,pe=340;wt(!0),pt(),Nt();try{ee(1)}catch{}ct(1);try{W("hold")}catch{}try{const De=m.current,We=ut&&!!De?.src;if(!ut||We){if(De){De.pause();try{De.currentTime=0}catch{}}}else Rt();At()}catch{}try{T("stopped")}catch{}if(Y(!1),!qe.current)try{He.current&&(clearTimeout(He.current),He.current=null),He.current=setTimeout(()=>{try{W("out")}catch{}He.current=setTimeout(()=>{try{typeof Se.current=="function"&&Se.current(!0)}catch{}try{W("idle")}catch{}He.current=null},pe)},X)}catch{}};o.useEffect(()=>{Et.current=qt});const Jt=o.useCallback(()=>Be(""),[]),bn=async X=>{(he.current||[])[X]&&await an(X,{sameSegment:X===Ne.current})},Yt=G==="playing",xn=o.useMemo(()=>{if(!U||U.length<=1)return U;const X=U[j];return X?[X]:U},[U,j]),Zt=s===!0;o.useEffect(()=>{try{const X=m.current;X&&typeof X.playbackRate=="number"&&Te(X)}catch{}},[te,Te]);const gn=o.useRef({raf:null,timer:null});o.useEffect(()=>{const X=m.current;if(!X)return;const pe=Math.max(0,Math.min(1,ae)),De=gn.current,We=()=>{De.raf!==null&&(cancelAnimationFrame(De.raf),De.raf=null),De.timer!==null&&(clearTimeout(De.timer),De.timer=null)};We();const Ze=ir(X);if(X.paused||Math.abs(Ze-pe)<.001||typeof requestAnimationFrame!="function"){try{Vn(X,pe)}catch{}return}const Ke=performance.now(),mt=()=>{const vt=Math.min(1,(performance.now()-Ke)/150);try{Vn(X,Ze+(pe-Ze)*vt)}catch{}De.raf=vt<1?requestAnimationFrame(mt):null};return De.raf=requestAnimationFrame(mt),De.timer=setTimeout(()=>{We();try{Vn(X,pe)}catch{}},200),We},[ae]);const Ut=H==="hold",Nn=H==="out",de=Q==="playMode"&&!E&&!it||Ut||Nn,je=G!=="stopped"||Ut||Nn,Ie=G==="paused",Ue=Math.max(0,Math.min(100,(M||0)*100)),ze=ke("audio-player__fill",de?"is-visible":"",je?"is-expanded":"",Ie?"is-paused":"",Nn?"is-out":"");return n.jsxs("div",{className:`audio-player ${Zt?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof C=="string"?C:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${Yt?"is-playing":""} ${E?"is-loading":""} ${Q!=="default"?"is-revealed":""}`,children:[E?n.jsxs("div",{className:"audio-player__loading",role:qc[R]?"status":void 0,"aria-live":qc[R]?"polite":"off",children:[n.jsx("span",{className:"audio-player__loading-spinner","aria-hidden":"true"}),n.jsx("span",{className:"audio-player__loading-text",children:p("training.audioStatus.preparing",{defaultValue:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"})})]}):null,Q==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:Zt,onClick:()=>{Z.current=wr(),D(),Ht()},"aria-label":typeof C=="string"?C:p("training.listen","\uB4E3\uAE30"),onMouseEnter:A,onMouseLeave:D,onFocus:A,onBlur:D,children:n.jsx("span",{ref:x,className:"audio-player__button-triangle-wrap",children:n.jsx("svg",{className:"audio-player__button-triangle",viewBox:"0 0 24 24","aria-hidden":"true",children:n.jsx("path",{ref: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,N&&n.jsx(Mn,{anchorRect:N,text:typeof C=="string"&&C?C:p("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${Q==="playMode"||Yt?"is-visible":""}`,inert:!(Q==="playMode"||Yt)||void 0,children:[n.jsxs("div",{ref:v,className:"audio-player__buttons",children:[n.jsx(Ce,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:jt,ariaLabel:p("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:Q!=="playMode"}),n.jsx(Ce,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:Yt?"pause":"play",onClick:Ht,ariaLabel:p("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":Yt,width:"60px",variant:"transparent-white",disabled:Q!=="playMode"}),n.jsx(Ce,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:kn,ariaLabel:p("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:Q!=="playMode"}),xt>1?n.jsx("div",{ref:w,className:"audio-player__source-buttons",children:Array.from({length:xt}).map((X,pe)=>n.jsx(Ce,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(pe+1),onClick:()=>{try{bn(pe)}catch{}},ariaLabel:p("training.sourcePlay",{n:pe+1}),variant:"transparent-white",selected:O&&j===pe,disabled:Q!=="playMode"||!(Array.isArray(L)&&L[pe]),showTooltipInfo:!0},pe))}):null,!Array.isArray(L)||L.length<=1?n.jsx(Ce,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:It,ariaLabel:p("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:Q!=="playMode"}):null,n.jsx(Ce,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:$t,ariaLabel:p("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:Q!=="playMode"}),n.jsx(Ce,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:qt,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:ze,ref:f,style:{left:`${Ue}%`},"aria-hidden":"true"}),(u||c)&&n.jsx(ox,{segments:xn,progress:M,totalDuration:K,waveProgressRef:Re,showSoundWaveForm:u,leadInMs:d,tailMs:h,trackDurationSec:L?.[j]?.duration??0,noiseSrc:c&&g?.settings.enabled&&z>0?at:null,noiseRatio:g?rr(g.settings):0,noiseSpeed:g?.settings.speed??1,mainVolume:ne,onReadyChange:ot})]})]}),n.jsx("audio",{ref:m,crossOrigin:"anonymous",preload:"auto"})]}),!u&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(rt,{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(va,{message:ue,position:ye,onClose:Jt})]})}function Tr(e){const{t}=xe.useTranslation(),{text:a,label:r,anchorRect:s=null,onClose:l,closeOnOutsideClick:i=!0,isMobilePopup:u=!1}=e||{},[c,d]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||"light"}catch{return"light"}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",c)}catch{}},[c]);const{increase:h,decrease:p,canIncrease:C,canDecrease:g,fontSize:_,lineHeight:m}=Oi({storageKey:"tooltip-fontScale"}),f=o.useCallback(()=>d(B=>B==="dark"?"light":"dark"),[]),v=o.useCallback(B=>{try{B.stopPropagation()}catch{}try{typeof l=="function"&&l()}catch{}},[l]),b=Array.isArray(a)?a:typeof a>"u"||a===null?[]:[a],w={fontSize:`${_}px`,lineHeight:`${m}px`,"--tt-line-height":`${m}px`,"--tt-marker-size":"28px"},y=n.jsxs("div",{className:le(`text-box-tooltip__root ${c==="dark"?"is-dark":""}`),children:[n.jsxs("div",{className:le("text-box-tooltip__box"),children:[r&&n.jsx("div",{className:le("text-box-tooltip__label body-2b"),children:r}),n.jsx("div",{className:le("text-box-tooltip__text body-1"),style:w,children:b.map((B,x)=>n.jsxs("div",{className:le("text-box-tooltip__line"),children:[b.length>1?n.jsx("div",{className:le("text-box-tooltip__marker"),children:n.jsx("span",{className:le("text-box-tooltip__line-number button-1"),children:x+1})}):null,n.jsx("span",{className:le("text-box-tooltip__line-text"),children:B})]},x))})]}),n.jsxs("div",{className:le("text-box-tooltip__buttons"),children:[n.jsx(Ce,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"minus",onClick:p,ariaLabel:t("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!g}),n.jsx(Ce,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"plus",onClick:h,ariaLabel:t("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!C}),n.jsx(Ce,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:c==="dark"?"moon":"sun-medium",onClick:f,ariaLabel:t("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:c==="dark"?"transparent-white":"transparent-gray"}),n.jsx(Ce,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"x",onClick:v,ariaLabel:t("common.close","\uB2EB\uAE30"),variant:c==="dark"?"transparent-white":"transparent-gray"})]})]});return s?n.jsx(Bn,{anchorRect:s,className:le(`text-box-tooltip ${c==="dark"?"is-dark":""}`),onClose:l,closeOnOutsideClick:i,isMobilePopup:u,ariaLabel:r||t("tooltip.textbox","\uBCF8\uBB38"),children:y}):n.jsx("div",{className:le(`text-box-tooltip ${c==="dark"?"is-dark":""}`),children:y})}function Kc({state:e="disabled"}){const{t}=xe.useTranslation();return n.jsxs("div",{className:`ts-bullet ts-bullet--${e}`,"aria-hidden":!0,children:[n.jsx("div",{className:"bullet__dot",children:n.jsx(rt,{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 Yc(e,t,a){const r=o.useRef(t),s=o.useRef(a);o.useEffect(()=>{r.current=t,s.current=a}),o.useEffect(()=>{if(!e||typeof document>"u")return;let l=null,i=10;const u=()=>{l=null;const c=r.current(),d=c?Array.from(c.querySelectorAll(En)).find(h=>!h.closest('[aria-hidden="true"]')):void 0;if(d){try{d.focus()}catch{}if(document.activeElement===d)return}--i>0&&(l=requestAnimationFrame(u))};return l=requestAnimationFrame(u),()=>{l!==null&&cancelAnimationFrame(l);const c=document.activeElement;if(!c||c===document.body||!document.contains(c)||c.closest(".tooltip__content")){const d=s.current();if(d)try{d.focus()}catch{}}}},[e])}function Zc({title:e,children:t,className:a="",state:r="disabled",usePreviewTextBtn:s=!1,onPreviewTextBtn:l,previewText:i=null,useFaded:u,usePlayAllBtn:c=!1,onPlayAll:d,playAllActive:h=!1}){const{t:p}=xe.useTranslation(),C=yn("(max-width: 767px)"),g=`training-step__title h4 ${u&&r==="disabled"?"training-step__title--faded":""} ${a}`.trim(),_=`training-step__title-row training-step__title-row--${r}`.trim(),m=o.useRef(null),[f,v]=o.useState(!1),[b,w]=o.useState(null),[y,B]=o.useState(null);Yc(f&&!!b,()=>{if(typeof document>"u")return null;const E=Array.from(document.querySelectorAll(".tooltip__content"));for(let k=E.length-1;k>=0;k--)if(E[k].querySelector(".text-box-tooltip__root"))return E[k];return null},()=>m.current?.querySelector("button")??null);const x=o.useRef(l);o.useEffect(()=>{x.current=l});const N=o.useMemo(()=>i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)&&i.every(E=>typeof E=="string"||typeof E=="number")?i.join(""):"",[i]),A=o.useCallback(()=>{v(!1),w(null),B(null)},[]);o.useEffect(()=>{if(!f)return;let E;try{typeof x.current=="function"&&(E=x.current())}catch{}if(E===!1){A();return}B(typeof E<"u"&&E!==null?E:null)},[N]);const D=o.useCallback(()=>{let E;try{typeof l=="function"&&(E=l())}catch{}if(E!==!1){if(B(typeof E<"u"&&E!==null?E:i),!m.current){v(k=>!k);return}if(f)v(!1),w(null),B(null);else{const k=m.current.getBoundingClientRect();w(k),v(!0)}}},[l,i,f]);return n.jsxs("div",{className:_,children:[n.jsx("p",{className:g,children:n.jsx("span",{className:"training-step__title-text",children:e??t})}),s||c?n.jsxs("div",{className:"title-controls",children:[n.jsxs("div",{className:"title-buttons",children:[c&&n.jsx(Ce,{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:h,onClick:d,variant:r==="disabled"?"disabled":"default",disabled:r==="disabled"||h,onDisabledClick:h&&r!=="disabled"?()=>{}:void 0}),s&&n.jsx("div",{ref:m,children:n.jsx(Ce,{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:D,className:f?"is-selected":void 0,"aria-expanded":f,"aria-haspopup":"dialog",variant:r==="disabled"?"disabled":"default",disabled:!i&&typeof l!="function"})})]}),f&&n.jsx(Tr,{text:y??i,label:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:b,onClose:A,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function ws(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function sa({index:e,stepIndex:t,isLast:a=!1,title:r="",titleProps:s={},children:l,className:i="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:d}){const{t:h}=xe.useTranslation(),[p,C]=o.useState(()=>ws(e,t));o.useEffect(()=>{const x=ws(e,t);if(x!==p){const N=setTimeout(()=>C(x),0);return()=>clearTimeout(N)}},[e,t,p]);const g=o.useCallback((...x)=>{ws(e,t)==="done"||p==="done"||typeof u=="function"&&u(...x)},[e,t,p,u]),[_,m]=o.useState(!1),[f,v]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),b=o.useCallback(x=>{if(!x)return null;try{const N=x;if(typeof x=="object"&&(N.currentTarget||N.target)&&(N.nativeEvent||N.type)){const E=N.currentTarget??N.target;if(E&&typeof E.getBoundingClientRect=="function")return E.getBoundingClientRect()}if(x instanceof DOMRect)return x;const A=x;if(A&&typeof A.getBoundingClientRect=="function")return A.getBoundingClientRect();const D=x?.current;return D&&typeof D.getBoundingClientRect=="function"?D.getBoundingClientRect():null}catch{return null}},[]),w=o.useCallback((x,{text:N="",label:A="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:D=!1,alignX:E="center",alignY:k="top"}={})=>{const R=b(x);v({text:N,label:A,anchorRect:R,backdrop:D,alignX:E,alignY:k}),m(!0)},[b]),y=o.useCallback(()=>{m(!1),v(x=>({...x,anchorRect:null}))},[]),B=o.Children.map(l,x=>{if(o.isValidElement(x)){const N=x;if(typeof N.type=="string")return N;const A=N.props??{},D=typeof A.onDone=="function"?A.onDone:g,E=typeof A.disabled=="boolean";let k=p==="disabled";return E&&(k=!!A.disabled),o.cloneElement(N,{onDone:D,disabled:k,showTooltip:w,hideTooltip:y})}return x});return n.jsxs("div",{className:`training-step training-step--${p} ${a?"training-step--last":""} ${i}`,"aria-current":p==="active",children:[n.jsx(Kc,{state:p}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(Zc,{state:p,title:r,...s,useFaded:c}),p==="disabled"&&d&&typeof e=="number"&&typeof t=="number"&&e===t+1&&n.jsx("p",{className:"training-step__locked-hint caption-1",role:"status",children:d}),B]}),_?n.jsx(Bn,{anchorRect:f.anchorRect,backdrop:f.backdrop,onClose:y,ariaLabel:h("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(Tr,{text:f.text,onClose:y})}):null]})}function Xc({context:e,state:t="disabled",theme:a="light"}){const{t:r}=xe.useTranslation(),[s,l]=o.useState("disabled"),[i,u]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||a}catch{return a}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",i)}catch{}},[i]);const c=()=>u($=>$==="dark"?"light":"dark"),{increase:d,decrease:h,canIncrease:p,canDecrease:C,fontSize:g,lineHeight:_}=Oi({storageKey:"textbox_fontScale"}),[m,f]=o.useState(""),v=o.useRef(null),b=o.useRef(!1),w=o.useCallback(()=>{b.current=wr()&&!!v.current&&v.current.contains(document.activeElement),l("active")},[]),y=o.useCallback(()=>f(""),[]),B=$=>{try{f($)}catch{}},x=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(t!=="disabled"){const $=setTimeout(()=>l(t),0);return()=>clearTimeout($)}},[t]);const N=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[A,D]=o.useState(N);A!==N&&(D(N),l("disabled"));const E=t==="disabled"?s:t,k=E==="disabled"?"training-text-box--disabled":E==="active"?"training-text-box--active":E==="done"?"training-text-box--done":"",R=o.useMemo(()=>({fontSize:`${g}px`,lineHeight:`${_}px`}),[g,_]);return o.useEffect(()=>{if(E==="disabled"||!b.current)return;b.current=!1;const $=document.activeElement;$&&$!==document.body||v.current?.querySelector(".training-text-box__buttons button")?.focus()},[E]),n.jsxs("div",{ref:v,className:`training-text-box ${k} ${E!=="disabled"&&i==="dark"?"is-dark":""}`,children:[E==="disabled"&&n.jsx("div",{className:"training-text-box__preview",children:n.jsx(Ce,{htmlType:"button",size:48,type:"bar",onClick:w,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":E==="disabled",children:n.jsx("span",{className:"training-text-box__inner h3",style:R,children:N})}),E!=="disabled"&&n.jsxs("div",{className:"training-text-box__buttons","aria-hidden":E==="disabled",children:[n.jsx(Ce,{htmlType:"button",size:32,type:"dot",onClick:h,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,...!x&&{width:"60px"}}),n.jsx(Ce,{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,...!x&&{width:"60px"}}),n.jsx(Ce,{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(va,{message:m,position:"top",onClose:y})]})}function la(e){return e==="active"||e==="done"}function Bs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,useTitleFaded:l,onDone:i,onChange:u,answer:c,wrongAnswers:d,choices:h,multiSelect:p=!1,correctCount:C=0,useDisabledCovered:g=!1,choiceIcons:_,shuffleChoices:m=!0}){const{t:f}=xe.useTranslation(),v=s??f("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),b=typeof e=="number"?e:-1,w=typeof t!="number"?"disabled":b<t?"done":b===t?"active":"disabled",y=Array.isArray(h)&&h.length?h:typeof c<"u"?[c].concat(Array.isArray(d)?d:[]):void 0,B=d?d.join("||"):"",x=h?h.join("||"):"",[N,A]=o.useState(()=>Array.isArray(y)?m?Ra(y):y.slice():void 0);o.useEffect(()=>{Array.isArray(y)&&y.length?A(m?Ra(y):y.slice()):A(void 0)},[c,B,x,m]);const[D,E]=o.useState(null),[k,R]=o.useState(()=>new Set);o.useEffect(()=>{E(null),R(new Set)},[x,c,B]);const $=o.useRef(void 0);o.useEffect(()=>{const P=$.current;typeof P=="number"&&typeof t=="number"&&typeof e=="number"&&P>=e&&t<e&&(E(null),R(new Set)),$.current=t},[t,e]);const G=o.useCallback(P=>{if(!la(w))return;const M=N?.[P];if(M==null)return;const ee=M;if(p){const Q=new Set(k);Q.has(ee)?Q.delete(ee):Q.add(ee),R(Q),typeof u=="function"&&u({selectedValues:[...Q],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...Q],__ts:Date.now()})}else E(ee),typeof u=="function"&&u({selectedIndex:P,selectedValue:ee,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:P,selectedValue:ee,__ts:Date.now()})},[N,w,p,u,k]),T=`training-step__buttons${Array.isArray(N)&&N.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:v,useTitleFaded:l,children:n.jsx("div",{className:T,children:Array.isArray(N)&&N.length>0?N.map((P,M)=>n.jsx(Ce,{htmlType:"button",size:56,type:"bar",onClick:()=>G(M),ariaLabel:String(P),label:P,useLabel:!0,icon:_?_[String(P)]:void 0,variant:"default",disabled:w==="disabled",selected:p?k.has(P):D===P,useDisabledCovered:g,minWidth:0},String(P))):null})})}function As({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u,demoSelected:c}){const{t:d}=xe.useTranslation(),h=s??d("training.confirmTitle","\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694."),p=typeof e=="number"?e:-1,C=typeof t!="number"?"disabled":p<t?"done":p===t?"active":"disabled",g=u&&typeof u=="object"?u.sentence||"":typeof u=="string"?u:"",_=u&&typeof u=="object"?u.choices:void 0,[m,f]=o.useState(c??null),v=`${String(g)}\0${JSON.stringify(_??null)}`,[b,w]=o.useState(v);b!==v&&(w(v),c==null&&f(null));const[y,B]=o.useState(c);Object.is(y,c)||(B(c),f(c??null));const x=o.useRef(void 0);o.useEffect(()=>{const E=x.current;typeof E=="number"&&typeof t=="number"&&typeof e=="number"&&E>=e&&t<e&&c==null&&f(null),x.current=t},[t,e,c]);const N=o.useCallback(E=>{const k=typeof E=="object"&&E!==null?Object.assign({},E,{__ts:Date.now()}):{value:E,__ts:Date.now()};typeof i=="function"&&i(k),la(C)&&typeof l=="function"&&l(k)},[i,C,l]),A=o.useCallback(()=>{la(C)&&(f(!1),N(!1))},[N,C]),D=o.useCallback(()=>{la(C)&&(f(!0),N(!0))},[N,C]);return n.jsxs(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:h,onDone:l,useTitleFaded:!1,children:[n.jsx(Xc,{context:u,state:C}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(_)&&_.length>0?_.slice(0,6).map((E,k)=>n.jsx(Ce,{htmlType:"button",size:56,type:"bar",onClick:()=>{la(C)&&(f(k),N&&N(k))},disabled:C==="disabled",ariaLabel:String(E),label:E,variant:C,selected:m===k},k)):n.jsxs(n.Fragment,{children:[n.jsx(Ce,{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:m===!1}),n.jsx(Ce,{htmlType:"button",size:56,type:"bar",onClick:D,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:m===!0})]})})]})}function ks({index:e,stepIndex:t,isLast:a=!1,title:r,onDone:s,btnLabel:l,soundSrc:i,bucketPath:u,usePreviewTextBtn:c,previewText:d=null,onPreviewTextBtn:h,disabled:p,_pageIndex:C,showSoundWaveForm:g,showNoiseWaveForm:_,leadInMs:m,tailMs:f}){const{t:v}=xe.useTranslation(),b=r??v("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),w=p??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(sa,{index:e,stepIndex:t,isLast:a,title:b,onDone:s,titleProps:{usePreviewTextBtn:c,previewText:d,onPreviewTextBtn:h},children:n.jsx(xs,{soundSrc:i,ttsText:i?null:d??b,bucketPath:u,btnLabel:l||v("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:w,className:"training-step__listen-sticky",showSoundWaveForm:g,showNoiseWaveForm:_,leadInMs:m,tailMs:f},`audio-p${C??0}-s${e}`)})}const mx=[];function Ns({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=mx}){const{t:c}=xe.useTranslation(),d=s??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),h=q=>typeof q=="string"?q:q&&(q.context||q.sentence||q.question||"")||"",[p,C]=o.useState(Array.isArray(u)?u:[]),[g,_]=o.useState(()=>(p||[]).map((q,j)=>({id:j,text:h(q)}))),m=o.useMemo(()=>typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled",[t,e]),f=m!=="disabled",v=o.useRef(void 0),b=o.useRef(void 0);o.useEffect(()=>{if(v.current===u)return;v.current=u;const q=Array.isArray(u)?u:[];C(q);const j=(I=>{const O=(I||[]).map((te,ne)=>({id:ne,text:h(te)}));if(O.length<=1)return O;const Y=(te,ne)=>{if(te.length!==ne.length)return!1;for(let z=0;z<te.length;z++)if(te[z].text!==ne[z].text)return!1;return!0};let K=Ra(O),ie=0;for(;Y(K,O)&&ie<20;)K=Ra(O),ie+=1;return K})(q);_(j);try{if(typeof i=="function"){const I=j.filter((O,Y)=>O.text===h(q[Y])).length;i({shuffled:j,score:I,total:(q||[]).length,initial:!0,__ts:Date.now()})}if(typeof l=="function"&&m==="active"){const I=j.filter((O,Y)=>O.text===h(q[Y])).length;b.current=u,l({shuffled:j,score:I,total:(q||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(m!=="active"||b.current===u||(b.current=u,typeof l!="function"))return;const q=Array.isArray(u)?u:[],j=g.filter((I,O)=>I.text===h(q[O])).length;l({shuffled:g,score:j,total:q.length,initial:!0,__ts:Date.now()})},[m,u]);const w=(q,j)=>{const I=[...g],O=q+j;if(O<0||O>=I.length)return;const Y=I[O];I[O]=I[q],I[q]=Y,ee(I);try{if(typeof l=="function"&&m==="active"){const K=I.filter((ie,te)=>ie.text===h(p[te])).length;l({shuffled:I,score:K,total:(p||[]).length,__ts:Date.now()})}}catch{}},[y,B]=o.useState(null),x=o.useRef(null),N=o.useRef(null),A=o.useRef(null),D=o.useRef(null),E=o.useRef(null),k=o.useRef({x:0,y:0}),R=o.useRef(null),$=o.useRef({dx:0,dy:0}),G=()=>{if(R.current!==null)return;const q=()=>{if(!x.current){R.current=null;return}R.current=requestAnimationFrame(q);const j=k.current,I=$.current||{dx:0,dy:0};x.current&&(x.current.style.transform=`translate3d(${j.x-I.dx}px, ${j.y-I.dy}px, 0)`)};R.current=requestAnimationFrame(q)},T=o.useRef(new Map),P=o.useRef(new Map),M=()=>{const q=new Map;return T.current.forEach((j,I)=>{j&&j.getBoundingClientRect&&q.set(I,j.getBoundingClientRect())}),q},ee=q=>{const j=M();_(q);try{if(typeof i=="function"){const I=q.filter((O,Y)=>O.text===h(p[Y])).length;i({shuffled:q,score:I,total:(p||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const I=M();q.forEach(O=>{const Y=j.get(O.id),K=I.get(O.id),ie=T.current.get(O.id);if(!ie||!Y||!K)return;const te=Y.top-K.top;te&&(ie.style.transition="none",ie.style.transform=`translateY(${te}px)`,requestAnimationFrame(()=>{ie.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",ie.style.transform="";const ne=()=>{ie.style.transition="",ie.removeEventListener("transitionend",ne)};ie.addEventListener("transitionend",ne)}))})})},Q=(q,j)=>{try{try{j.dataTransfer?.setData("text/plain",String(q))}catch{}try{j.dataTransfer&&(j.dataTransfer.effectAllowed="move")}catch{}try{const I=document.createElement("div");I.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(I),j.dataTransfer?.setDragImage(I,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(I)}catch{}})}catch{}}catch{}B(q);try{const I=g[q],O=document.createElement("div");O.className="order-list__dragging-object order-list__dragging-object--visible",O.textContent=I&&I.text?I.text:"",document.body.appendChild(O),x.current=O;const Y=T.current.get(I.id);let K=j.clientX||0,ie=j.clientY||0;try{if(Y&&Y.getBoundingClientRect){const W=Y.getBoundingClientRect();K=W.left+W.width/2,ie=W.top+W.height/2}}catch{}const te=O.getBoundingClientRect(),ne=te.width/2,z=te.height/2;$.current={dx:ne,dy:z},O.style.transition="none",k.current={x:K,y:ie},O.style.transform=`translate3d(${K-ne}px, ${ie-z}px, 0)`,requestAnimationFrame(()=>{try{O.style.transition=""}catch{}G()});const ae=W=>{const ue=W;k.current={x:ue.clientX,y:ue.clientY},G()};A.current=ae,document.addEventListener("mousemove",ae);const H=W=>{const ue=W;k.current={x:ue.clientX,y:ue.clientY},G()};N.current=H,document.addEventListener("dragover",H);try{j.dataTransfer?.setData("text/plain",String(q));try{j.dataTransfer?.setData("application/json",JSON.stringify({idx:q}))}catch{}}catch{}}catch{}},F=(q,j)=>{j.preventDefault();try{j.dataTransfer&&(j.dataTransfer.dropEffect="move")}catch{}try{E.current!==null&&(clearTimeout(E.current),E.current=null);const I=j.currentTarget&&j.currentTarget.closest?j.currentTarget.closest(".order-list__item"):null;if(I&&D.current!==I){if(D.current)try{D.current.classList.remove("drag-over")}catch{}try{I.classList.add("drag-over")}catch{}D.current=I}}catch{}},Z=(q,j)=>{j.preventDefault();const I=j.dataTransfer?.getData("text/plain")||"",O=I?parseInt(I,10):y,Y=q;if(typeof O!="number"||isNaN(O)||O===Y){B(null),U(),L();return}const K=Ef(g,O,Y);ee(K),B(null),L();try{if(typeof l=="function"&&m==="active"){const ie=K.filter((te,ne)=>te.text===h(p[ne])).length;l({shuffled:K,score:ie,total:(p||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const ie=document.querySelectorAll(".order-list .order-list__item")[Y];if(!ie)return;const te=ie.querySelector(".order-list__slot")||ie;try{te.classList.add("pulse"),te.offsetHeight,te.classList.add("to-dark");const ne=()=>{te.classList.remove("pulse","to-dark"),te.removeEventListener("transitionend",ne)};te.addEventListener("transitionend",ne)}catch{}})}catch{}U()},L=()=>{if(x.current){try{document.body.removeChild(x.current)}catch{}x.current=null}N.current&&(document.removeEventListener("dragover",N.current),N.current=null),A.current&&(document.removeEventListener("mousemove",A.current),A.current=null),R.current!==null&&(cancelAnimationFrame(R.current),R.current=null)},V=()=>{B(null),U(),L()};o.useEffect(()=>()=>L(),[]);const U=()=>{try{if(E.current!==null&&(clearTimeout(E.current),E.current=null),D.current){try{D.current.classList.remove("drag-over")}catch{}D.current=null}document.querySelectorAll(".order-list .order-list__item").forEach(q=>q.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const q=Math.max(1,(g||[]).length);g.forEach((j,I)=>{const O=P.current.get(j.id);if(!O)return;let Y=50;q>1&&(Y=Math.round(I/(q-1)*100));try{O.style.setProperty("--marker-pos",Y+"%")}catch{}})}catch{}},[g]),o.useEffect(()=>()=>{L(),E.current!==null&&(clearTimeout(E.current),E.current=null)},[]),n.jsx(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:d,children:n.jsx("div",{className:"order-list",children:g.map((q,j)=>{const I=Math.max(1,(g||[]).length),O=I>1?Math.round(j/(I-1)*100):50;return n.jsx("div",{className:"order-list__item",children:n.jsxs("div",{className:"order-list__slot","data-disabled":m==="disabled","aria-disabled":m==="disabled",children:[m!=="disabled"?n.jsx("div",{className:"order-list__marker caption-1",style:{"--marker-pos":O+"%"},ref:Y=>{const K=P.current;Y?K.set(q.id,Y):K.delete(q.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:j+1})}):null,n.jsxs("div",{ref:Y=>{const K=T.current;Y?K.set(q.id,Y):K.delete(q.id)},className:`order-list__draggable ${y===j?"dragging":""}`,"data-disabled":m==="disabled","aria-disabled":m==="disabled",tabIndex:m==="disabled"?-1:0,draggable:f,onDragStart:f?Y=>Q(j,Y):void 0,onDragEnter:f?Y=>F(j,Y):void 0,onDragOver:f?Y=>F(j,Y):void 0,onDragLeave:f?()=>{try{E.current!==null&&clearTimeout(E.current),E.current=setTimeout(()=>{try{const Y=document.querySelectorAll(".order-list .order-list__item");Y&&Y[j]&&(Y[j].classList.remove("drag-over"),D.current===Y[j]&&(D.current=null))}catch{}},80)}catch{}}:void 0,onDrop:f?Y=>Z(j,Y):void 0,onDragEnd:f?V:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:q.text}),f?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(Ce,{htmlType:"button",size:32,type:"dot",onClick:()=>w(j,-1),ariaLabel:c("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:j===0,useBorder:!1,useDisabledInvisible:!0}),n.jsx(Ce,{htmlType:"button",size:32,type:"dot",onClick:()=>w(j,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:j===g.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},q.id)})})})}const Cx=8e3;function fx(e,t){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.then(s,s),setTimeout(s,t)})}function Jc({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=[],selectable:c=!1,hideLabel:d=!1,hideAudio:h=!1,maxCards:p,playAllGapMs:C=0}){const{t:g}=xe.useTranslation(),_=s??g("training.cardInstructions","\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694."),m=o.useMemo(()=>Array.isArray(u)?u:u&&u.items||[],[u]),f=p??3,v=(m||[]).slice(0,f);(m||[]).length>f&&console.warn(`TrainingStepCard: ${m.length} items passed but only ${f} shown`);const b=typeof e=="number"?e:-1,w=typeof t!="number"?"disabled":b<t?"done":b===t?"active":"disabled",[y,B]=o.useState(null),x=o.useRef([]),[N,A]=o.useState(!1),D=o.useRef(null),E=o.useRef(!0);o.useEffect(()=>(E.current=!0,()=>{E.current=!1}),[]);const k=o.useMemo(()=>m.map(M=>M?.id??M?.word??"").join("|"),[m]);o.useEffect(()=>{B(null)},[k]);const R=o.useRef(void 0);o.useEffect(()=>{const M=R.current;typeof M=="number"&&typeof t=="number"&&typeof e=="number"&&M>=e&&t<e&&B(null),R.current=t},[t,e]);const $=o.useCallback((M,ee)=>{if(c)return;const Q={item:M,index:ee,__ts:Date.now()};try{typeof i=="function"&&i(Q)}catch{}if(w==="active"&&typeof l=="function")try{l(Q)}catch{}},[c,i,w,l]),G=o.useRef(C);o.useEffect(()=>{G.current=Math.max(0,C||0)},[C]);const T=o.useCallback(async()=>{if(N||w==="disabled")return;A(!0);let M=!1;const ee=new Promise(Q=>{D.current=()=>{M=!0,Q()}});try{for(let Q=0;Q<v.length&&!(!E.current||M);Q++){const F=x.current[Q];if(!F)continue;await Promise.race([fx(F.play(),Cx),ee]);const Z=Math.max(0,G.current||0);Z>0&&Q<v.length-1&&!M&&E.current&&await Promise.race([new Promise(L=>{setTimeout(L,Z)}),ee])}}finally{D.current=null,A(!1)}},[N,w,v.length]),P=o.useCallback((M,ee)=>{if(!la(w))return;B(ee);const Q={selectedValue:M.word||M.title||"",selectedIndex:ee,item:M,__ts:Date.now()};try{typeof i=="function"&&i(Q)}catch{}if(typeof l=="function")try{l(Q)}catch{}},[i,w,l]);return n.jsx(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:_,onDone:l,titleProps:{usePlayAllBtn:!h&&v.length>0,onPlayAll:T,playAllActive:N},children:n.jsx("div",{className:"training-step__cards",onClickCapture:M=>{const ee=D.current;if(!ee)return;const Q=M.target;Q&&typeof Q.closest=="function"&&Q.closest(".training-word-card__bottom")&&ee()},children:v.length===0?n.jsx("div",{className:"training-step__empty",children:g("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):v.map((M,ee)=>n.jsx(ns,{ref:Q=>{x.current[ee]=Q},item:M,disabled:w==="disabled",onPlayDone:()=>$(M,ee),selectable:c,selected:c&&y===ee,onSelect:c?()=>P(M,ee):void 0,flipDelay:ee*120,hideLabel:d,hideAudio:h},M&&M.id||ee))})})}const bx=160;function gx(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 Qc(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"}]}gx(Gt.t.bind(Gt)),Qc(Gt.t.bind(Gt));const Mr="none",yx=.5,vx=1.5,_x=.25;function Es({title:e,valueLabel:t,value:a,min:r,max:s,step:l,tickStep:i,size:u,disabled:c,onChange:d}){return n.jsxs(cn,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(Gu,{value:a,onChange:d,min:r,max:s,step:l,size:u,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:c,className:le("noise-settings-tooltip__slider-input")}),n.jsx("div",{className:le(ke("noise-settings-tooltip__value","button-1",c?"noise-settings-tooltip__value--disabled":"")),children:t})]})}function ed({anchorRect:e,onClose:t,hideNoiseRows:a=!1}){const{t:r}=xe.useTranslation(),s=yn("(max-width: 767px)")?40:24,l=Er(),i=rr(l?.settings??oa),u=l?.settings.type??"defaultNoise",c=l?.settings.enabled??!0,d=l?.playbackRate??1,h=l?.mainVolume??1,p=Math.round(h*100),C=o.useCallback(v=>{try{l?.setMainVolume(Math.max(0,Math.min(1,v/100)))}catch{}},[l]),g=o.useCallback(v=>{try{l?.setPlaybackRate(v)}catch{}},[l]),_=o.useCallback(v=>{const b=Math.min(ar,Math.max(0,Math.round(v*10)/10));try{l?.setSettings({noiseRatio:b})}catch{}},[l]),m=o.useCallback(v=>{try{v===Mr?l?.setSettings({enabled:!1}):l?.setSettings({type:v,enabled:!0})}catch{}},[l]),f=[{key:Mr,label:r("training.noise.type.none","\uC5C6\uC74C")},...Qc(r).map(v=>({key:v.value,label:v.label}))];return n.jsx(Bn,{anchorRect:e,offset:12,onClose:t,ariaLabel:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),isMobilePopup:!1,closeOnOutsideClick:!1,header:n.jsxs("div",{className:le("noise-settings-tooltip__header"),children:[n.jsx("span",{children:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815")}),n.jsx(Ce,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:r("common.close","\uB2EB\uAE30"),onClick:t})]}),children:n.jsxs(Qa,{className:le("noise-settings-tooltip"),useBorder:!1,labelWidth:72,children:[n.jsx(Es,{title:r("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${p}%`,value:p,min:0,max:100,step:10,size:s,onChange:C}),n.jsx(Es,{title:r("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${d.toFixed(2)}x`,value:d,min:yx,max:vx,step:_x,size:s,onChange:g}),!a&&n.jsxs(n.Fragment,{children:[n.jsx(cn,{variant:"custom",label:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(vn,{ariaLabel:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:f,value:c?u:Mr,onChange:m})}),n.jsx(Es,{title:r("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:r("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:ar,step:$c,size:s,disabled:!c,onChange:_})]}),a&&n.jsx("div",{className:le("noise-settings-tooltip__width-ghost"),"aria-hidden":"true",inert:!0,children:n.jsx(cn,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(vn,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:f,value:Mr,onChange:()=>{}})})})]})})}function td({useNoiseSettingBtn:e=!1,onSettings:t,onNext:a,onResult:r,stepIndex:s=0,stepCount:l=0,pageIndex:i=0,pageCount:u=1,resultOpen:c=!1,hideNoiseRows:d=!1}){const{t:h}=xe.useTranslation(),[p,C]=o.useState(!1),[g,_]=o.useState(null),[m,f]=o.useState(!1),v=o.useRef(null),b=o.useRef(null),w=Er(),y=u>0,B=y&&i<u-1,x=!y||i>=u-1,N=s===Math.max(0,l);o.useEffect(()=>{e||(C(!1),_(null))},[e]);const A=o.useCallback(()=>{C(!1),_(null)},[]),D=o.useCallback(()=>{if(p){C(!1),_(null);return}const ee=v?.current?.getBoundingClientRect();ee&&_(ee),t?.(),C(!0)},[p,t]),E=o.useCallback(()=>{if(p){C(!1),_(null);return}const ee=b?.current?.getBoundingClientRect();ee&&_(ee),t?.(),C(!0)},[p,t]),k=yn("(max-width: 767px)"),R=o.useRef(null),[$,G]=o.useState(null),T=o.useCallback(()=>{f(ee=>{const Q=!ee;return G(Q?R.current?.getBoundingClientRect()??null:null),Q})},[]),P=o.useCallback(()=>{f(!1),G(null)},[]);o.useEffect(()=>{c&&(f(!1),G(null))},[c]);const M=n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.sentence","\uC7AC\uC0DD")}),n.jsx(Xo,{analyser:w?.mainAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.sentence","\uC7AC\uC0DD")})]}),n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.noise","\uC18C\uC74C")}),n.jsx(Xo,{analyser:w?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.noise","\uC18C\uC74C")})]})]});return Yc(e&&p,()=>typeof document<"u"?document.querySelector(".noise-settings-tooltip__header")?.closest(".tooltip__content")??null:null,()=>[v.current,b.current].map(ee=>ee?.querySelector("button")??null).find(ee=>!!ee&&ee.getClientRects().length>0)??v.current?.querySelector("button")??null),n.jsxs("div",{className:"pp-bottom",children:[n.jsxs("div",{className:"pp-bottom__left",children:[e?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"pp-bottom__settings--desktop",children:n.jsx("div",{ref:v,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(Ce,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:D,className:p?"is-selected":void 0,"aria-expanded":p,"aria-haspopup":"dialog",ariaLabel:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),label:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),minWidth:140})})}),n.jsx("div",{className:"pp-bottom__settings--mobile",children:n.jsx("div",{ref:b,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(Ce,{htmlType:"button",size:56,type:"dot",shape:"pill",icon:"settings",onClick:E,className:p?"is-selected":void 0,"aria-expanded":p,"aria-haspopup":"dialog",ariaLabel:h("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:R,className:"pp-bottom__meter-trigger","data-tooltip-ignore":!0,children:n.jsx(Ce,{htmlType:"button",size:40,type:"dot",shape:"pill",icon:"audio-lines",onClick:T,selected:m,"aria-expanded":k?m:void 0,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&m&&!k&&n.jsx("div",{className:"pp-bottom__meters",children:M})]}),e&&m&&k&&$&&n.jsx(Bn,{anchorRect:$,onClose:P,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"),children:n.jsx("div",{className:"pp-bottom__meters pp-bottom__meters--floating",children:M})}),n.jsxs("div",{className:"pp-bottom__right",children:[x&&n.jsx(Ce,{htmlType:"button",size:56,type:"bar",icon:"check",onClick:typeof r=="function"?r:a,ariaLabel:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),label:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),variant:"main",disabled:!N}),B&&n.jsx(Ce,{htmlType:"button",size:56,type:"bar",rightIcon:"chevron-right",align:"right",onClick:a,ariaLabel:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),label:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),variant:"main",disabled:!N})]}),e&&p&&n.jsx(ed,{anchorRect:g,onClose:A,hideNoiseRows:d})]})}function nd({title:e,subtitle:t,desc:a,depth:r,icon:s,wrapperStyle:l,iconTooltip:i,pageIndex:u,pageCount:c,progressMax:d,progressIndex:h,onBack:p,onClose:C}){const{t:g}=xe.useTranslation(),_=yn("(max-width: 767px)"),m=Number.isInteger(h)?h:u||0,f=Number.isInteger(d)?d:c||0,v=p||C,b=Array.isArray(r)?_?r[r.length-1]:r.join(" / "):r,w=typeof e=="string"?e.trim():e,y=typeof t=="string"?t.trim():t,B=!!(w||y),x=B?w||y:g("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),N=b||(w?t:void 0),A=_&&typeof N=="string"&&(N.includes(" \xB7 ")||N.includes(" / "))?N.split(/\s[·/]\s/).pop():N,D=o.useMemo(()=>{const E=l&&typeof l=="object"?{...l}:{};return!("width"in E)&&!("height"in E)&&(E.width="40px",E.height="40px"),E},[l]);return n.jsxs("header",{className:"pp-title training-popup-title",children:[n.jsxs("div",{className:"pp-title__left",children:[v?n.jsx(Ce,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:g("common.back","\uB4A4\uB85C"),onClick:v,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:s?n.jsx(gu,{icon:s,label:e,tooltip:i,wrapperStyle:D}):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:x}),a?n.jsx("span",{className:"pp-title__description caption-1",children:a}):null]})]}),n.jsx(Xu,{max:Math.max(0,f??0),index:Math.max(0,m??0)})]})}function xx(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function wx(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 ad=(e,t)=>{if(!t)return t;const a=typeof Gt?.t=="function"?Gt.t(e,{defaultValue:t}):void 0;return typeof a=="string"&&a?a:t};function rd(e,t,a){const r=e,s=r?.title||r?.name||(Array.isArray(t)?t[t.length-1]:void 0)||a||"\uD6C8\uB828",l=Xl().find(u=>u.key===(r?.category_0||r?.category_main_code)),i=l?.subs?.find(u=>u.key===(r?.category_1||r?.category_sub_code));return{title:s,label:r?.title||s,depth:t,icon:l?.icon,wrapperStyle:l?.color?{"--t-item-fg":l.color}:void 0,iconTooltip:[l?ad(`topic.${l.key}`,l.label):void 0,i?ad(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function Ds(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function od(e,t,a){if(!e||typeof e!="object"||Array.isArray(e))return e;const r=e,s=typeof a=="number"&&a>0?a:Date.now();return{...r,...r.shownAt===void 0&&t?{shownAt:t}:{},...r.answeredAt===void 0?{answeredAt:new Date(s).toISOString()}:{}}}function Bx(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function Ax({idPrefix:e,trainingData:t,depth:a,fallbackTitle:r="\uD6C8\uB828",pages:s=[],emptyMessage:l,buildResults:i,metaPatch:u}){const c=rd(t,a,r),d=typeof u=="function"?u(c)||{}:u||{},h=t?.id||t?.title||s.length;return{id:`${e}:${h}`,meta:{...c,...d},pages:s,emptyMessage:l,buildResults:i}}function kx(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return t.context||t.sentence||t.question||""||""}return""}function Nx(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 Ex(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 sd(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function Dx(e,t,a,r){return sd(e,t*a+r)}function Sx({payload:e,selected:t,choices:a=[],correctAnswers:r=[]}){if(e&&typeof e=="object"){const s=e;if(Array.isArray(s.selectedValues))return r.every(l=>s.selectedValues.includes(l))&&s.selectedValues.every(l=>r.includes(l));if(typeof s.correct=="boolean")return s.correct}if(r.length){if(typeof t=="number"&&Array.isArray(a)&&a.length)return r.some(s=>String(s)===String(a[t]));if(typeof t<"u")return r.some(s=>String(s)===String(t))}}function jx(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 ld=o.createContext(null);function Tx(){const e=o.useContext(ld);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function Mx({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,choices:l=[],onDone:i,onChange:u}){const{t:c}=xe.useTranslation(),d=typeof e=="number"?e:-1,h=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",[p,C]=o.useState(()=>l.map(()=>null)),g=JSON.stringify(l),_=l.length;o.useEffect(()=>{C(Array.from({length:_},()=>null))},[g]);const m=o.useRef(void 0);o.useEffect(()=>{const w=m.current;typeof w=="number"&&typeof t=="number"&&typeof e=="number"&&w>=e&&t<e&&C(Array.from({length:_},()=>null)),m.current=t},[t,e,_]);const f=o.useMemo(()=>p.filter(w=>w!==null).length+1,[p]),v=o.useCallback(w=>{if(!la(h))return;const y=p;let B;if(y[w]!=null){const N=y[w];B=y.map(A=>A!==null&&A>=N?null:A)}else B=[...y],B[w]=f;C(B);const x={selectedOrder:B,words:l,__ts:Date.now()};try{typeof u=="function"&&u(x)}catch{}if(y[w]==null&&B.length>0&&B.every(N=>N!==null))try{typeof i=="function"&&i(x)}catch{}},[h,p,f,u,i,l]),b=s??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:b,onDone:i,children:n.jsx("div",{className:"training-step__cards",children:l.map((w,y)=>n.jsx(ns,{item:{word:w},disabled:h==="disabled",selectable:!0,selected:p[y]!==null,orderRank:p[y],onSelect:()=>v(y),flipDelay:y*120,hideLabel:!1,hideAudio:!0},`${w}-${y}`))})})}function Lr(e){return null}Lr.__isTrainingPage=!0;function Aa(e,t){const a=Tx();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 id({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i}=Aa(e,t);return n.jsx(ks,{...a,index:r,stepIndex:s,isLast:l,onDone:i})}function ud({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Aa(e,t);return n.jsx(Bs,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function cd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Aa(e,t);return n.jsx(As,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function dd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Aa(e,t);return n.jsx(Ns,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function pd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Aa(e,t);return n.jsx(Jc,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function Lx({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Aa(e,t);return n.jsx(Mx,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}const hd=3e4,$x=/^(https?:|blob:|data:audio|\/|\.\/)/;function md(e){return typeof e=="string"&&$x.test(e)?e:null}const Rx=e=>typeof e=="string"&&e.trim()!==""?e:null,Ss=Symbol("timed-out");function Px(e,t){if(t<=0)return Promise.resolve(Ss);let a;return Promise.race([Promise.resolve(e),new Promise(r=>{a=setTimeout(()=>r(Ss),t)})]).finally(()=>clearTimeout(a))}function Ix(e){return e?ja()||sr()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function Fx(e,t){const a=[],r=md(t);r&&a.push({kind:"raw",resolve:async()=>r});const s=(e??"").trim();if(!s)return a;for(const[l,i]of[["urlResolver",ja()],["fallbackUrlResolver",sr()]])i&&a.push({kind:l,resolve:async u=>{let c;try{c=await Px(i(s),u)}catch(h){return kt(`question-sound-threw-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uB358\uC84C\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`,h),null}return c===Ss?(kt(`question-sound-slow-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 ${hd}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):Rx(c)||(kt(`question-sound-empty-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uC8FC\uC18C\uB97C \uC548 \uC92C\uB2E4(\uBC1B\uC740 \uAC83: ${JSON.stringify(c)}) \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`),null)}});return a}function Ox(){return Date.now()+hd}const zx=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function Wx(e){kt("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 $r(...e){for(const t of e)if(typeof t=="string"){const a=t.trim();if(a.length)return a}else{if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t)&&t.length)return t.join(", ");if(t&&typeof t=="object"){const a=t,r=[a.text,a.label,a.value];for(const s of r){if(typeof s=="string"&&s.trim().length)return s.trim();if(typeof s=="number"||typeof s=="boolean")return String(s)}}}return null}function Hx(e){return $r(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function Vx(e){return md($r(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function Cd(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=$r(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 fd(e){const{score:t,contextsLength:a,results:r=[],subtitle:s,onReplay:l,onClose:i,inline:u=!1,pending:c=!1}=e||{},{t:d}=xe.useTranslation(),h=o.useId(),p=o.useCallback(()=>!c,[c]);o.useEffect(()=>{const E=a??0;if(t!=null&&E>0&&t/E>.5){const k=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("party:trigger",{detail:{count:140,strength:1.6,duration:2200}}))},0);return()=>window.clearTimeout(k)}},[t,a]);const C=o.useCallback(E=>{const k=Cd(E),R=$r(E?.wording,E?.label);return k===!0?{variant:"main",label:R??d("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:k===!1?{variant:"danger",label:R??d("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:R??d("training.result.notJudged","\uBBF8\uD310\uC815")}},[d]),g=a??0,_=t??0,m=o.useMemo(()=>Array.isArray(r)?r:[],[r]),f=o.useRef(null),[v,b]=o.useState(null),w=o.useCallback(()=>{f.current?.(),f.current=null,b(null)},[]);o.useEffect(()=>w,[w]);const y=o.useRef(0),B=(E,k)=>{if(!zn)return;const R=Math.round(performance.now()-y.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${R}ms ${E}`,k??"")},x=o.useRef(0),N=o.useCallback((E,k,R)=>{w();const $=++x.current,G=()=>x.current===$;y.current=zn?performance.now():0,B(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${E}`,{text:k,rawUrl:R}),b(E),f.current=()=>{B("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),x.current++,to()};const T=Q=>{B("\uD2BC\uB2E4",Q);const F=Ya(Q,Z=>{B(`\uB05D\uB0AC\uB2E4 \u2014 ${Z?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:G()}),Z&&G()&&(f.current=null,b(null))});return f.current=()=>{B("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),x.current++,F.stop(),to()},F.done},P=Fx(k,R);B("\uCC28\uB840",P.map(Q=>Q.kind));const M=P[0]?.kind==="raw",ee=M?T(R):Promise.resolve(!1);(async()=>{if(await ee||!G())return;const Q=Ox(),F=M?P.slice(1):P;for(let Z=0;Z<F.length;Z++){if(!G())return;B(`${F[Z].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const L=await F[Z].resolve(zx(Q,F.length-Z));if(B(`${F[Z].kind} \uAC00 \uB2F5\uD588\uB2E4`,L),!G()||L&&(await T(L)||!G()))return}G()&&(B("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),Wx(k),f.current=()=>{x.current++,to()},B("\uB0AD\uB3C5\uD55C\uB2E4"),$1(k,{onEnd:()=>{G()&&(f.current=null,b(null))}}))})()},[w]),A=o.useMemo(()=>m.map(E=>{const k=E??{},R=Hx(k)||d("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:$,label:G}=C(k),T=Array.isArray(k.corrects)?k.corrects:[],P=T.length?T.join(", "):k.answer!=null&&k.answer!==""?String(k.answer):null,M=typeof k.selectedText=="string"?k.selectedText:null,ee=Cd(k)===!0,Q=Vx(k),F=!!Q||Ix(R);return{problem:R,variant:$,label:G,answer:P,selectedText:M,isCorrect:ee,sound:Q,canHear:F}}),[m,C,d]),D=o.useMemo(()=>A.some(E=>E.answer!==null||E.selectedText!==null),[A]);return n.jsx(Pn,{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:E,closeWithAnimation:k})=>n.jsxs(n.Fragment,{children:[c&&n.jsx("p",{id:h,className:"trp-actions__reason caption-1",role:"status",children:d("training.result.pendingDone","\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsxs("div",{className:"trp-actions",children:[n.jsx(Ce,{htmlType:"button",size:56,type:"bar",label:d("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>E(l)}),n.jsx(Ce,{htmlType:"button",size:56,type:"bar",label:d("training.result.done","\uC644\uB8CC"),variant:"main",onClick:k,disabled:c,onDisabledClick:c?()=>{}:void 0,"aria-describedby":c?h:void 0})]})]}),children:()=>n.jsxs("div",{className:"trp-result is-on",children:[n.jsxs("header",{className:"trp-result__head",children:[n.jsx("p",{className:"trp-result__eyebrow caption-1",children:d("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")}),n.jsx("h1",{className:"trp-result__title h2",children:d("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.")}),s&&n.jsx("p",{className:"trp-result__subtitle body-3",children:s}),n.jsx("div",{className:"trp-score",children:n.jsxs("div",{className:"trp-score__figure","aria-label":d("training.result.scoreAria",{correct:_,total:g}),children:[n.jsx("span",{className:"trp-score__big",children:_}),n.jsx("span",{className:"trp-score__sep",children:"/"}),n.jsx("span",{className:"trp-score__total",children:g})]})})]}),A.length>0&&n.jsx("section",{className:"trp-result__body",children:n.jsxs("div",{className:`result-table${D?" result-table--answer":""}`,role:"table","aria-label":d("training.result.tableAriaLabel","\uBB38\uD56D\uBCC4 \uD310\uC815"),children:[n.jsxs("div",{className:"result-table__head caption-1",role:"row",children:[n.jsx("span",{role:"columnheader",children:d("common.col.problem","\uBB38\uC81C")}),D&&n.jsx("span",{role:"columnheader",children:d("training.result.colAnswerSelected","\uC815\uB2F5 \xB7 \uC120\uD0DD")}),n.jsx("span",{className:"col-right",role:"columnheader",children:d("training.result.colJudge","\uD310\uC815")})]}),A.map((E,k)=>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(k+1).padStart(2,"0")}),n.jsx("div",{className:"trp-row__q body-2",children:E.problem}),E.canHear&&n.jsx(Ce,{htmlType:"button",size:32,type:"dot",useBorder:!1,icon:v===k?"square":"volume-2",className:"trp-row__replay",ariaLabel:v===k?d("training.result.replaySoundStop",{no:k+1,defaultValue:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4"}):d("training.result.replaySound",{no:k+1,defaultValue:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30"}),onClick:()=>v===k?w():N(k,E.problem,E.sound)})]}),D&&n.jsxs("div",{className:"trp-row__answers",children:[E.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:E.answer})]}),n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:`trp-row__answer-label answer-selected caption-1 ${E.isCorrect?"is-correct":"is-wrong"}`,children:d("training.result.colSelected","\uC120\uD0DD")}),n.jsx("span",{className:`trp-row__answer-value body-2 ${E.isCorrect?"is-correct":"is-wrong"}`,children:E.selectedText??"\u2014"})]})]}),n.jsx("div",{className:"trp-row__judge",children:n.jsx(un,{variant:E.variant,label:E.label,fill:"soft",minWidth:80})})]},k))]})})]})})}const js=new Set;function qx(e){o.useEffect(()=>{if(!e||js.has(e))return;js.add(e);const t=()=>typeof document>"u"||document.visibilityState!=="hidden";let a=null,r=null,s=0,l=0;const i=()=>{const h=Date.now();a==null&&(a=h),r==null&&(r=h)},u=()=>{r!=null&&(s+=Date.now()-r,r=null)};t()&&i();const c=()=>{if(u(),a==null)return;const h=s-l;if(h<1e3||l===0&&s<5e3)return;const p=Date.now(),C=p-h;l=s,jf({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(),js.delete(e)}},[e])}function Rr(e,t){return e&&e.id||`page-${t??0}`}function Pr(e,t){return e&&e.key||`step-${t??0}`}function Ir(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function Ux(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const Gx=300,Kx=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},On=Object.freeze({}),bd=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function Ts(e){const t=e,a=t?.results||t?.answers||[],r=Array.isArray(a)&&a.length>0?a.length:null,s=Array.isArray(a)?a.filter(l=>l?.correct===!0||l?.isCorrect===!0||l?.score===1||l?.heard===!0||l?.judgement===!0).length:null;return{results:a,correct:r!=null?s:null,total:r}}const Yx=e=>n.jsx(fd,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function Zx(e){const{scenario:t,title:a,subTitle:r,depth:s,icon:l,wrapperStyle:i,iconTooltip:u,pageIndex:c,pageCount:d,stepIndex:h,stepCount:p,onBack:C,onComplete:g,onRoundFinished:_,onNext:m,onSettings:f,useNoiseSetting:v=!0,children:b,ariaLabel:w,label:y,buildResults:B,onResult:x,typeKey:N,entryPoint:A,dailyTotal:D,itemRef:E,renderResultPopup:k,noiseOverride:R,hideNoiseRows:$=!1}=e;qx(N&&!bd.has(N)?N:"");const G=o.useRef(0);o.useEffect(()=>{G.current=Date.now()},[]);const{t:T}=xe.useTranslation(),P=x,M=!!t,ee=t?.id||null,Q=t?.meta||{},F=Array.isArray(t?.pages)?t.pages:[],Z=Array.isArray(b)||o.isValidElement(b)&&typeof b!="function"?o.Children.toArray(b).filter(o.isValidElement):[],L=Z.length>0,V=de=>de===Lr||de?.__isTrainingPage===!0,U=L&&Z.some(de=>V(de.type)),q=U?Z.filter(de=>V(de.type)).map((de,je)=>{const Ie=de.props||{};return{id:`children-page-${je}`,steps:o.Children.toArray(Ie.children).filter(o.isValidElement),pageTop:Ie.pageTop||Ie.top||null,pageBottom:Ie.pageBottom||Ie.bottom||null}}):[{id:"children-page-0",steps:Z}],j=L&&!M&&typeof b!="function",I=j?Math.max(1,q.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 de=document.body;return de.dataset.ihabTrainingPopupCount=String(Number(de.dataset.ihabTrainingPopupCount||"0")+1),de.classList.add("ihab-training-popup-open"),()=>{const je=Number(de.dataset.ihabTrainingPopupCount||"1")-1;je>0?de.dataset.ihabTrainingPopupCount=String(je):(delete de.dataset.ihabTrainingPopupCount,de.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!(typeof document>"u"||!document.body))return hv()},[]);const[O,Y]=o.useState({...oa,enabled:!1}),K=o.useRef(O);o.useEffect(()=>{K.current=O},[O]);const ie=o.useRef(R),te=o.useRef(!1),ne=o.useRef(null);o.useEffect(()=>{let de=!1;const je=Ie=>{if(de)return;te.current=!0;const Ue=Ie?ra({...oa,enabled:!1},Ie):{...oa},ze=ne.current;ne.current=null;const X=ze?ra(Ue,ze):Ue;K.current=X,Y(X),ze&&!ie.current&&mo(X),pr(X);const pe=ie.current;if(pe){const De=typeof pe=="function"?pe(X):pe,We=ra(X,De);K.current=We,Y(We),pr(We)}};return Wf().then(Ie=>{if(de){const Ue=ne.current;if(ne.current=null,Ue&&!ie.current){const ze=Ie?ra({...oa,enabled:!1},Ie):{...oa};mo(ra(ze,Ue))}return}je(Ie)}),()=>{de=!0}},[]);const[z,ae]=o.useState(null),[H,W]=o.useState(null),ue=o.useCallback((de,je)=>{de==="main"?ae(je):W(je)},[]),Be=o.useRef(null),ye=o.useRef(null),he=o.useCallback(()=>{ye.current!==null&&(clearTimeout(ye.current),ye.current=null);const de=Be.current;Be.current=null,de&&mo(de)},[]);o.useEffect(()=>{if(typeof window>"u")return;const de=()=>{document.visibilityState==="hidden"&&he()};return window.addEventListener("pagehide",he),document.addEventListener("visibilitychange",de),()=>{window.removeEventListener("pagehide",he),document.removeEventListener("visibilitychange",de),he()}},[he]);const Ne=o.useCallback(de=>{const je=ra(K.current,de);if(K.current=je,Y(je),!te.current){ne.current={...ne.current??{},...de},pr(je);return}ie.current||(Be.current=je,ye.current!==null&&clearTimeout(ye.current),ye.current=setTimeout(he,Gx)),pr(je)},[he]),Re=O.mainSpeed,Me=O.mainVolume,se=o.useCallback(de=>Ne({mainSpeed:de}),[Ne]),Ee=o.useCallback(de=>Ne({mainVolume:de}),[Ne]),$e=o.useMemo(()=>({settings:O,setSettings:Ne,registerAnalyser:ue,mainAnalyser:z,noiseAnalyser:H,playbackRate:Re,setPlaybackRate:se,mainVolume:Me,setMainVolume:Ee}),[O,Ne,ue,z,H,Re,se,Me,Ee]),Ae=o.useRef(null),[Fe,Ve]=o.useState(0),ct=o.useRef([]),[ot,Xe]=o.useState("center"),[ft,Le]=o.useState(!1),qe=o.useRef(!1),Se=o.useRef(null),He=o.useCallback(de=>{qe.current||(qe.current=!0,Le(!0),Se.current=setTimeout(()=>{try{de()}catch{qe.current=!1,Le(!1)}},Kx()?0:bx))},[]);o.useEffect(()=>()=>{Se.current&&clearTimeout(Se.current)},[]);const Qe=o.useRef(C);o.useEffect(()=>{Qe.current=C});const it=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{const de=Ae.current,je=it.current;if(yo(de,je),de){const Ie=Array.from(de.querySelectorAll(En)).filter(Ue=>!Ue.closest('[aria-hidden="true"]'))[0];if(Ie)try{Ie.focus()}catch{}}return()=>{const Ie=document.activeElement;if(!Ie||Ie===document.body||de&&de.contains(Ie))try{vo(je)?.focus?.()}catch{}}},[]),o.useEffect(()=>Qn(()=>He(()=>{const de=Qe.current;typeof de=="function"&&de()})),[He]),bo(Ae,!0);const[bt,wt]=o.useState(!1),Et=o.useRef(!1),[at,st]=o.useState(null),Bt=o.useRef(0),At=o.useRef(0),Mt=()=>{Bt.current+=1,At.current+=1,st(null)},[Rt,_t]=o.useState(""),[dt,ut]=o.useState(()=>Ir()),lt=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!M&&!j||(ut(Ir()),Mt())},[M,ee,j]),o.useEffect(()=>{j&&ut(de=>{const je=Math.max(0,Math.min(de.pageIndex,Math.max(0,I-1)));return je!==de.pageIndex?{...de,pageIndex:je,stepIndex:0}:de})},[j,I]);const xt=j?Math.max(0,Math.min(dt.pageIndex,I-1)):0,pt=j?q[xt]:null,be=j&&pt&&Array.isArray(pt.steps)?pt.steps:[],ve=M?dt.pageIndex:j?xt:typeof c=="number"?c:0,we=M?F[Math.max(0,Math.min(dt.pageIndex,Math.max(0,F.length-1)))]:null,tt=M&&we&&Array.isArray(we.steps)?we.steps:[],gt=M?tt.length:j?be.length:typeof p=="number"?p:0,Nt=M||j?Math.max(0,Math.min(dt.stepIndex,Math.max(0,gt))):typeof h=="number"?h:0,yt=M?F.length:j?I:typeof d=="number"?d:0;o.useEffect(()=>{if(!M&&!j)return;const de=M?Rr(we,ve):pt?.id||`children-page-${ve??0}`,je=new Date().toISOString();for(let Ie=0;Ie<=Nt;Ie+=1){const Ue=M?Pr(tt[Ie],Ie):`step-${Ie}`,ze=ge(de,Ue);oe.current.has(ze)||oe.current.set(ze,je)}},[M,j,ve,Nt,pt?.id]),o.useLayoutEffect(()=>{const de=lt.current;if(typeof ve=="number"&&de!==null&&ve!==de&&ve>de)try{_t(T("training.problemNotice",{n:ve+1}))}catch{}lt.current=typeof ve=="number"?ve:lt.current},[ve,c,T]),o.useLayoutEffect(()=>{const de=Ae.current;if(!de)return;const je=()=>de.querySelector(".page-popup__scroll");let Ie=null,Ue=null,ze=null;const X=Ke=>{const mt=je();if(!mt)return;const vt=mt.scrollHeight<=mt.clientHeight;if(Xe(vt?"center":"top"),Ke&&!Et.current){Et.current=!0;try{wt(!0)}catch{}try{We.disconnect()}catch{}}},pe=()=>{Ie!==null&&cancelAnimationFrame(Ie),Ie=requestAnimationFrame(()=>{Ue!==null&&clearTimeout(Ue),Ue=setTimeout(()=>X(!0),60)})},De=()=>{ze!==null&&cancelAnimationFrame(ze),ze=requestAnimationFrame(()=>X(!1))};pe(),window.addEventListener("resize",De);const We=new MutationObserver(pe);We.observe(de,{childList:!0,subtree:!0,attributes:!0});const Ze=setTimeout(()=>{Et.current||X(!0)},400);return()=>{window.removeEventListener("resize",De),Ie!==null&&cancelAnimationFrame(Ie),Ue!==null&&clearTimeout(Ue),ze!==null&&cancelAnimationFrame(ze),clearTimeout(Ze);try{We.disconnect()}catch{}}},[Ae]);const Te=o.useCallback(de=>{Ae.current&&(Ae.current._childOnNext=de)},[]),nt=o.useCallback(de=>{Ae.current&&(Ae.current._childOnResult=de)},[]),oe=o.useRef(new Map),ge=(de,je)=>`${de}\0${je}`,Oe=o.useCallback((de,je,Ie)=>{ut(Ue=>{const ze=Ue.answersByPage[de]||{},X=ze[je],pe=Ds(Ie),De=Ds(X);if(X&&De>pe)return Ue;const We=od(Ie,oe.current.get(ge(de,je)),pe);return{...Ue,answersByPage:{...Ue.answersByPage,[de]:{...ze,[je]:We}}}})},[ut]),Je=o.useCallback((de,je,Ie)=>{const Ue=Rr(we,ve),ze=Pr(de,je);Oe(Ue,ze,Ie)},[we,ve,Oe]),et=o.useCallback((de,je,Ie)=>{const Ue=Rr(we,ve),ze=Pr(de,je);Oe(Ue,ze,Ie),!Ie?.allowChange&&de?.autoAdvance!==!1&&ut(X=>({...X,stepIndex:Math.max(X.stepIndex,je+1)}))},[we,ve,Oe,ut]),Ge=o.useCallback((de,je)=>{const Ie=pt?.id||`children-page-${ve??0}`,Ue=typeof je=="number"?je:Nt??0,ze=`step-${Ue}`;Oe(Ie,ze,de),de?.allowChange||ut(X=>({...X,stepIndex:Math.max(X.stepIndex,Ue+1)}))},[pt,ve,Nt,Oe,ut]),Lt=o.useCallback((de,je)=>{const Ie=pt?.id||`children-page-${ve??0}`,Ue=`step-${typeof je=="number"?je:Nt??0}`;Oe(Ie,Ue,de)},[pt,ve,Nt,Oe]),nn=j?{currentPageIndex:ve??0,currentStepIndex:Nt??0,totalStepsInPage:be.length,handleStepDone:Ge,handleStepChange:Lt}:null,fn=async()=>{const de=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:F,flowState:dt,answersByPage:dt.answersByPage})):null;return typeof P=="function"&&await Promise.resolve(P(de))||de},Pt=async()=>{const de=pt?.id||`children-page-${dt.pageIndex}`,je=dt.answersByPage[de]||{},Ie=U?(()=>{const X={};let pe=0;return q.forEach(De=>{const We=dt.answersByPage[De.id]||{},Ze=Array.isArray(De.steps)?De.steps.length:0;for(let Ke=0;Ke<Ze;Ke+=1){const mt=We[`step-${Ke}`];typeof mt<"u"&&(X[`step-${pe+Ke}`]=mt)}pe+=Ze}),X})():je;if(typeof B=="function"){const X=await Promise.resolve(B(Ie,{pageAnswers:je,answersByPage:dt.answersByPage,pages:q,currentPageId:de}));return typeof P=="function"&&await Promise.resolve(P(X))||X}const Ue=Object.entries(je).map(([X,pe],De)=>({index:De,key:X,payload:pe})),ze={results:Ue,answers:Ue,score:0};return typeof P=="function"&&await Promise.resolve(P(ze))||ze},Wt=()=>{const de=++Bt.current,je=()=>de!==Bt.current;try{if(typeof document<"u"&&document.body){try{document.dispatchEvent(new CustomEvent("speechear-close-tooltips"))}catch{}document.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,cancelable:!0})),document.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0}))}}catch{}if(M){const ze=fn();st(On);const X=ze;Promise.resolve(X).then(pe=>{je()||st(pe||{isEmpty:!0})}).catch(pe=>{!je()&&st({isEmpty:!0})});return}if(j){const ze=Pt();st(On);const X=ze;Promise.resolve(X).then(pe=>{je()||st(pe||{isEmpty:!0})}).catch(pe=>{!je()&&st({isEmpty:!0})});return}const Ie=Ae.current&&Ae.current._childOnResult,Ue=ze=>{try{return ze?ze():void 0}catch{return}};if(typeof Ie=="function"){const ze=Ue(Ie);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Tn&&Tn.tagName.toUpperCase()==="SCRIPT"&&Tn.src||new URL("components.cjs.js",document.baseURI).href}catch{}ze&&typeof ze.then!="function"?st(ze):st(ze&&typeof ze.then=="function"?On:{});const X=()=>{je()||st(pe=>pe===On?{}:pe)};Promise.resolve(ze).then(pe=>{pe&&!je()?st(pe):X()}).catch(pe=>{X()});return}if(typeof P=="function"){const ze=Ue(P);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Tn&&Tn.tagName.toUpperCase()==="SCRIPT"&&Tn.src||new URL("components.cjs.js",document.baseURI).href}catch{}ze&&typeof ze.then!="function"?st(ze):st(ze&&typeof ze.then=="function"?On:{});const X=()=>{je()||st(pe=>pe===On?{}:pe)};Promise.resolve(ze).then(pe=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Tn&&Tn.tagName.toUpperCase()==="SCRIPT"&&Tn.src||new URL("components.cjs.js",document.baseURI).href}catch{}pe&&!je()?st(pe):X()}).catch(pe=>{console.error("viewResults external handler failed",pe),X()});return}},Ht=()=>{if(M){if(typeof ve=="number"&&typeof yt=="number"&&ve<yt-1){ut(je=>({...je,pageIndex:je.pageIndex+1,stepIndex:0}));return}return Wt()}if(j){const je=be.length;if(typeof Nt=="number"&&Nt<je-1){ut(Ie=>({...Ie,stepIndex:Ie.stepIndex+1}));return}if(typeof ve=="number"&&typeof yt=="number"&&ve<yt-1){ut(Ie=>({...Ie,pageIndex:Ie.pageIndex+1,stepIndex:0}));return}return Wt()}if(typeof m=="function"){try{m()}catch{}return}const de=Ae.current&&Ae.current._childOnNext;if(typeof de=="function"){try{de()}catch{}return}},It=M?Q.title||Q.label||w||T("common.popup","\uD31D\uC5C5"):a||y||(Array.isArray(s)?s[s.length-1]:void 0)||w||T("common.popup","\uD31D\uC5C5"),kn=w||It,an=M?Q.title??Q.label??It:a??y??It,jt=(de,je)=>{const Ie=Rr(we,ve),Ue=Pr(de,je),ze=dt.answersByPage[Ie]?.[Ue],X=Ux(de,{page:we,pageIndex:ve,step:de,stepIndex:je,storedPayload:ze,answersByPage:dt.answersByPage,flowState:dt}),pe={key:Ue,index:je,stepIndex:Nt,isLast:je===tt.length-1};switch(de?.type){case"listen":return n.jsx(ks,{...pe,...X,onDone:De=>et(de,je,De)});case"confirm":return n.jsx(Bs,{...pe,...X,onDone:De=>et(de,je,De),onChange:De=>Je(de,je,De)});case"confirmWithText":return n.jsx(As,{...pe,...X,onDone:De=>et(de,je,De),onChange:De=>Je(de,je,De)});case"orderList":return n.jsx(Ns,{...pe,...X,onDone:De=>et(de,je,De),onChange:De=>Je(de,je,De)});default:return null}},$t=o.useRef(void 0);o.useEffect(()=>{const de=$t.current;if($t.current=ve,de===void 0||de===ve||!wr())return;const je=Ae.current;if(!je)return;const Ie=document.activeElement;if(!(!Ie||Ie===document.body||!je.contains(Ie)||Ie.disabled===!0))return;const Ue=je.querySelector(`.training-steps ${En.split(", ").join(", .training-steps ")}`)??Array.from(je.querySelectorAll(En)).find(ze=>!ze.closest('[aria-hidden="true"]'));try{Ue?.focus()}catch{}},[ve]);const qt=M?F.length>0?n.jsx("div",{className:"training-steps",children:tt.map((de,je)=>jt(de,je))},`replay-${Fe}`):n.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:n.jsx("div",{className:"pp-empty",children:t?.emptyMessage||T("training.noQuestions","\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):null,Jt=j?n.jsxs(ld.Provider,{value:nn,children:[pt?.pageTop?n.jsx("div",{className:"training-page-top",children:pt.pageTop}):null,n.jsx("div",{className:"training-steps",children:be.map((de,je)=>{const Ie=de;return o.cloneElement(Ie,{...Ie.props,_stepIndex:je,_totalSteps:be.length,_stepKey:`step-${je}`,_pageIndex:ve})})},`replay-${Fe}`),pt?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:pt.pageBottom}):null]}):null,bn=o.useRef(-1),Yt=o.useCallback(()=>{if(!N)return;const de=at,{results:je,correct:Ie,total:Ue}=Ts(at),ze={correct:Ie,total:Ue,attempt:ct.current.length+1,previousAttempts:[...ct.current]};if(bn.current===At.current)return ze;bn.current=At.current,Tf({items:zf(je),category:bd.has(N)?"sentence":"word",trainingType:N,entryPoint:A??"sentence",itemRef:E??null,correct:Ie,total:Ue,score:typeof de?.score=="number"?de.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-G.current)/1e3)),dailyTotal:D??null});try{_?.(ze)}catch{}return ze},[N,A,D,E,at,_]);o.useEffect(()=>{!at||at===On||at?.isEmpty||(Ts(at).total??0)>0&&Yt()},[at,Yt]);const xn=o.useCallback(()=>{const de=Yt();Mt(),He(()=>{typeof g=="function"&&g(de),typeof C=="function"&&C()})},[g,C,Yt,st,He]),Zt=o.useCallback(()=>_t(""),[_t]),gn=o.useCallback(()=>{He(()=>{typeof C=="function"&&C()})},[C,He]),Ut=n.jsxs("div",{className:`page-popup${ft?" page-popup--closing":""}`,role:"dialog","aria-modal":"true","aria-label":kn,children:[n.jsxs("div",{ref:Ae,className:`page-popup__panel ${bt?"":"page-popup__panel--measuring"} ${ot==="center"?"page-popup__panel--center":ot==="top"?"page-popup__panel--top":""}`,children:[n.jsx(nd,{title:an,subtitle:M?Q.subtitle||Q.label:Array.isArray(s)?s.join(" / "):void 0,desc:M?void 0:r,depth:M?Q.depth:s,icon:M?Q.icon:l,wrapperStyle:M?Q.wrapperStyle:i,iconTooltip:M?Q.iconTooltip:u,progressMax:yt,progressIndex:ve,pageIndex:ve,pageCount:yt,onBack:gn,onClose:gn}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${ot==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:j?Jt:M?qt:typeof b=="function"?b({registerOnNext:Te,registerOnResult:nt,panelRef:Ae,setResultOverlay:st}):b})}),n.jsx(td,{onSettings:f,onNext:Ht,onResult:Wt,useNoiseSettingBtn:!!(M?Q.useNoiseSetting??!0:v),stepIndex:Nt,stepCount:gt,pageIndex:ve,pageCount:yt,resultOpen:!!(at&&!at.isEmpty),hideNoiseRows:$})]}),at&&!at.isEmpty&&(k??Yx)({score:at.score,results:at.results||at.answers||[],contextsLength:at.results?at.results.length:at.answers?at.answers.length:0,onReplay:()=>{if(G.current=Date.now(),at!==On){const{correct:de,total:je}=Ts(at);ct.current.push({correct:de,total:je})}if(Mt(),Ve(de=>de+1),M){if(ut(Ir()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if(j){ut(Ir());return}try{const de=Ae.current&&Ae.current._childOnResult;typeof de=="function"&&de({replay:!0})}catch{}},onClose:xn,pending:at===On}),at?.isEmpty&&n.jsx("div",{className:"page-popup page-popup--result-empty",role:"dialog","aria-modal":"true","aria-label":T("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC"),children:n.jsxs("div",{className:"page-popup__panel page-popup__panel--center",children:[n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:n.jsx("div",{className:"page-popup__empty",children:T("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")})})}),n.jsx("div",{className:"page-popup__bottom",children:n.jsx(Ce,{htmlType:"button",variant:"main",size:48,onClick:xn,label:T("training.result.done","\uC644\uB8CC")})})]})}),n.jsx(va,{message:Rt,position:"top",onClose:Zt})]}),Nn=n.jsx(gs.Provider,{value:$e,children:Ut});return typeof document<"u"&&document.body?dn.createPortal(Nn,document.body):Nn}const Yn=Zx;Yn.Page=Lr,Yn.ListenStep=id,Yn.ConfirmStep=ud,Yn.ConfirmWithTextStep=cd,Yn.OrderListStep=dd,Yn.CardStep=pd,Yn.CardOrderStep=Lx;function Xx({label:e,homonum:t}){const a=pa()?.(e,t)??"",{imgRef:r,loading:s,hasImage:l,onLoad:i,onError:u}=ts(a);return l?n.jsxs("div",{className:le("word-image-tooltip__cell"),children:[s&&n.jsx("div",{className:le("word-image-tooltip__spinner")}),n.jsx("img",{ref:r,src:a,alt:e,draggable:!1,style:{opacity:s?0:1},onLoad:i,onError:u})]}):n.jsx("div",{className:le("word-image-tooltip__cell word-image-tooltip__cell--text h3"),children:n.jsx("span",{children:e})})}function gd({words:e,anchorRect:t}){const a=o.useRef(null),[r,s]=o.useState(null);return o.useLayoutEffect(()=>{if(!t||!a.current)return;const{offsetWidth:l,offsetHeight:i}=a.current,u=window.innerWidth;let c=t.left+t.width/2-l/2,d=t.top-i-8;d<8&&(d=t.bottom+8),c=Math.max(8,Math.min(c,u-l-8)),s({left:c,top:d})},[t]),!t||e.length===0?null:dn.createPortal(n.jsx("div",{ref:a,className:le("word-image-tooltip"),style:{visibility:r?"visible":"hidden",left:r?.left??0,top:r?.top??-9999},children:n.jsx("div",{className:le("word-image-tooltip__cells"),children:e.map(l=>n.jsx(Xx,{label:l.label,homonum:l.homonum},`${l.label}_${l.homonum??1}`))})}),document.body)}function Jx({titleIcon:e,resultCount:t,resultUnit:a,searchQuery:r,items:s,groups:l,selected:i=[],onSelect:u,maxSelect:c,onClearSelection:d,onPrint:h,onPrintEmpty:p,className:C,emptyHint:g,showEmptyText:_=!0,sectionType:m="page",disc:f}){const{t:v,i18n:b}=xe.useTranslation(),w=b.language?.startsWith("ko")??!1,{anchorRect:y,openAt:B,close:x}=za(),[N,A]=o.useState(null),D=o.useCallback(()=>{x(),A(null)},[x]);Hy(D,!!N);const E=(r??"").trim(),k=/^[^,[\]\s]+$/.test(E)?E:"",R=k.length>0,$=r===void 0&&t===void 0,G=R?"match":$?"original":"ganada",[T,P]=o.useState(()=>G),[M,ee]=o.useState("50"),[Q,F]=o.useState(1),[Z,L]=o.useState(R);Z!==R&&(L(R),P(G));const V=T==="match"&&!R||T==="original"&&!$?G:T,U=o.useMemo(()=>[...R?[{value:"match",label:v("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...$?[{value:"original",label:v("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:v("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:v("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:v("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:v("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:v("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:v("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[v,R,$]),q=o.useMemo(()=>["10","25","50","100"].map(se=>({value:se,label:v("wordSearch.pageSize",{count:Number(se),defaultValue:`${se}\uAC1C\uC529 \uBCF4\uAE30`})})),[v]),j=se=>se.words?.[0],I=o.useMemo(()=>{const se=[...k].length,Ee=mf(k),$e=new Map;return Ae=>{let Fe=$e.get(Ae);return Fe===void 0&&(Fe=Ee((Ae.words?.[0]?.label??"").slice(0,se))?0:1,$e.set(Ae,Fe)),Fe}},[k]),O=o.useCallback((se,Ee)=>{const $e=Ve=>j(Ve)?.label??"",Ae=Ve=>j(Ve)?.syllables??[...$e(Ve)].length,Fe=Ve=>(Ve.words??[]).reduce((ct,ot)=>{const Xe=parseInt(ot.grade??"",10);return Number.isFinite(Xe)&&Xe<ct?Xe:ct},999);switch(V){case"match":return I(se)-I(Ee)||mn($e(se),$e(Ee));case"ganada":return mn($e(se),$e(Ee));case"ganada_desc":return mn($e(Ee),$e(se));case"syllable":return Ae(se)-Ae(Ee)||mn($e(se),$e(Ee));case"syllable_desc":return Ae(Ee)-Ae(se)||mn($e(se),$e(Ee));case"grade":return Fe(se)-Fe(Ee)||mn($e(se),$e(Ee));case"grade_desc":return Fe(Ee)-Fe(se)||mn($e(se),$e(Ee));default:return 0}},[V,I]),Y=o.useMemo(()=>s.slice().sort(O),[s,O]),K=Number(M)||10,ie=o.useMemo(()=>(l??[]).flatMap(se=>se.items.slice().sort(O).map(Ee=>({item:Ee,label:se.label}))),[l,O]),te=l?ie.length:Y.length,ne=Math.max(1,Math.ceil(te/K)),z=Math.min(Q,ne),ae=o.useMemo(()=>Y.slice((z-1)*K,z*K),[Y,z,K]),H=o.useId(),W=o.useMemo(()=>{if(!l)return null;const se=ie.slice((z-1)*K,z*K),Ee=new Map;for(const{item:$e,label:Ae}of se)Ee.has(Ae)||Ee.set(Ae,[]),Ee.get(Ae).push($e);return[...Ee.entries()].map(([$e,Ae])=>({label:$e,items:Ae}))},[l,ie,z,K]);o.useEffect(()=>{F(1)},[T,M,te,r]);const ue=te>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(_n,{size:40,options:U,value:V,onChange:P,ariaLabel:v("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(_n,{size:40,options:q,value:M,onChange:ee,ariaLabel:v("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(zo,{page:z,totalPages:ne,onChange:F})]}):void 0,Be=se=>{u&&u(se)},ye=t!==void 0&&a?n.jsxs(n.Fragment,{children:[v("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),v("wordSearch.resultTitleSuffix",{unit:w?Af(a):a})]}):void 0,he=t!==void 0&&t>0&&c!==void 0&&a?v("wordSearch.resultDisc",{unit:w?Nf(a):a,max:c,selected:i.length}):void 0,Ne=f??he,Re=l?l.length===0:s.length===0,Me=Re&&!_&&!g;return n.jsxs(_a,{type:m,className:ke("word-search-result-block",C),children:[n.jsxs("div",{className:ke("word-search-result-block__inner",Me&&"word-search-result-block__inner--head-only"),children:[(ye||ue||Ne)&&n.jsxs("div",{className:"word-search-result-block__head",children:[n.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&n.jsx(rt,{icon:e,className:"word-search-result-block__head-icon"}),ye&&n.jsx("span",{className:"word-search-result-block__title h3",children:ye})]}),ue&&n.jsx("div",{className:"word-search-result-block__head-actions",children:ue}),Ne&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:Ne})]}),Re&&(_||g)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[_&&n.jsx("p",{className:"word-search-result-block__empty body-3",children:v("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),g&&n.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:g})]}),l?(W??[]).map(se=>n.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${H}-${se.label}`,children:[n.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${H}-${se.label}`,children:se.label}),n.jsx("div",{className:"word-search-result-block__items",children:se.items.map(Ee=>{const $e=i.includes(Ee.id);return n.jsx("div",{onMouseEnter:Ae=>{B(Ae.currentTarget),A(Ee.words??[])},onMouseLeave:D,children:n.jsx(Ce,{htmlType:"button",size:"word",align:"grid",label:(Ee.words??[]).map(Ae=>Ae.label),subLabel:(Ee.words??[]).some(Ae=>Ae.subLabel)?(Ee.words??[]).map(Ae=>Ae.subLabel):void 0,selected:$e,onClick:()=>Be(Ee.id),minWidth:200})},Ee.id)})})]},se.label)):n.jsx("div",{className:"word-search-result-block__items",children:ae.map(se=>{const Ee=i.includes(se.id);return n.jsx("div",{onMouseEnter:$e=>{B($e.currentTarget),A(se.words??[])},onMouseLeave:D,children:n.jsx(Ce,{htmlType:"button",size:"word",align:"grid",label:(se.words??[]).map($e=>$e.label),subLabel:(se.words??[]).some($e=>$e.subLabel)?(se.words??[]).map($e=>$e.subLabel):void 0,selected:Ee,onClick:()=>Be(se.id),minWidth:200})},se.id)})}),N&&y&&n.jsx(gd,{words:N,anchorRect:y})]}),(d||h)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[d&&n.jsx(Ce,{htmlType:"button",size:"56",type:"bar",label:v("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:i.length===0,onClick:i.length===0?void 0:d}),h&&n.jsx("div",{onClick:i.length===0?p:void 0,children:n.jsx(Ce,{htmlType:"button",size:"56",type:"bar",variant:"main",label:v("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:i.length===0,onClick:i.length===0?void 0:h})})]})]})}function Qx(e,t){return t.map(a=>{const r=typeof a=="string"?a:a.label,s=typeof a=="string"?void 0:a.displayLabel;return{label:r,value:e[r]??"",displayLabel:s}})}function ew({sections:e,selectedList:t,count:a,onCountChange:r,maxCount:s=4,minCount:l=1,combinationSections:i,combinationSectionsForSlot:u,onSelect:c,placeholder:d="-",className:h,title:p,titleIcon:C,disc:g,showInfoButton:_=!0,onClearPhoneme:m,onSearch:f,onSearchEmpty:v,searchDisabled:b=!1,searchLabel:w,searchChecking:y=!1,pairMode:B=!1,sectionType:x="page",beforeSearchContent:N,beforeContent:A,afterContent:D,hideCountControl:E=!1,ordinal:k=!1}){const{t:R}=xe.useTranslation(),$=o.useMemo(()=>R("wordPairs.infoNotes",{returnObjects:!0}),[R]),G=o.useMemo(()=>Array.from({length:s-l+1},(j,I)=>{const O=l+I;return{key:String(O),label:R("wordPairs.count",{n:O})}}),[R,s,l]),T=o.useMemo(()=>R("wordPairs.ordinals",{returnObjects:!0}),[R]),P=o.useCallback(j=>k?R("wordPairs.phonemeOrdinalLabel",{ordinal:T[j-1]??j}):a===1?R("wordPairs.phonemeSingleLabel","\uC74C\uC808"):R("wordPairs.phonemeN",{n:j}),[k,T,a,R]),M=o.useCallback(j=>k?R("wordPairs.phonemeContrastOrdinalLabel",{ordinal:T[j-1]??j}):a===1?R("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):R("wordPairs.phonemeContrast",{n:j}),[k,T,a,R]),ee=o.useCallback((j,I)=>I?n.jsxs(n.Fragment,{children:[j,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):j,[]),{anchorRect:Q,toggleAt:F,close:Z}=za(),L=o.useCallback(j=>r(Number(j)),[r]),V=yn("(max-width: 767px)"),U=o.useCallback(j=>Qx(j,e).map(({label:I,value:O,displayLabel:Y})=>{const K=!!O&&O!=="\uC5C6\uC74C";return n.jsxs("span",{className:ke("phoneme-select-block__cell-jamo-part",O?"":"phoneme-select-block__cell-jamo-part--empty",K?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[n.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${O==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:O==="\uC5C6\uC74C"?"x":O||d}),K&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:Y??I})]},I)}),[e,d]),q=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(Ce,{htmlType:"button",size:40,type:V?"dot":void 0,icon:"info",label:V?void 0:R("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:R("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:Q?"is-selected":void 0,"aria-expanded":!!Q,"aria-haspopup":"dialog",onClick:j=>F(j.currentTarget)})}),Q&&n.jsx(qn,{title:R("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:$,anchorRect:Q,onClose:Z})]});return n.jsxs(_a,{type:x,title:p,icon:C,disc:g,action:_?q:void 0,className:ke("phoneme-select-block",h),children:[A,!E&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(vn,{options:G,value:String(a),onChange:L,size:40,ariaLabel:R("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),n.jsx("div",{className:"phoneme-select-block__cells",children:B?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((j,I)=>{const O=t[I*2]??{};return n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:U(O)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:P(I+1)})]},I)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:R("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((j,I)=>{const O=t[I*2+1]??{};return n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:U(O)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:M(I+1)})]},I)})})]}):t.map((j,I)=>n.jsxs("div",{className:"phoneme-select-block__cell",children:[n.jsx("div",{className:"phoneme-select-block__cell-circle",children:n.jsx("div",{className:"phoneme-select-block__cell-jamo",children:U(j)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:P(I+1)})]},I))}),(i||u)&&n.jsx("div",{className:"phoneme-select-block__panels",children:n.jsx("div",{className:"phoneme-select-block__detail",children: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((j,I)=>{const O=t[I*2]??{};return n.jsx(Fn,{title:ee(P(I+1),I===0),sections:u?u(O,I*2):i,selected:O,onSelect:c?.(I*2),align:"newline"},I)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((j,I)=>{const O=t[I*2+1]??{};return n.jsx(Fn,{title:M(I+1),sections:u?u(O,I*2+1):i,selected:O,onSelect:c?.(I*2+1),align:"newline"},I)})})]}):t.map((j,I)=>n.jsx(Fn,{title:ee(P(I+1),I===0),sections:u?u(j,I):i,selected:j,onSelect:c?.(I),align:"newline"},I))})}),N&&n.jsx("div",{className:"phoneme-select-block__before-search",children:N}),(m||f||y)&&(()=>{const j=t.every(I=>{const O=cf(I);return Object.entries(O).every(([Y,K])=>!K||Y==="coda"&&K===Pl)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:j?v:void 0,children:[m&&n.jsx(Ce,{htmlType:"button",size:"56",type:"bar",label:R("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:j,onClick:j?void 0:m}),f?n.jsx(Ce,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:y?n.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:w??R("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:j||b||y,onDisabledClick:y?()=>{}:void 0,"aria-busy":y||void 0,onClick:f}):y?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:w??R("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),D]})}function tw({title:e,sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:d,className:h}){const{t:p}=xe.useTranslation();return n.jsx(Fn,{className:h,title:e??p("wordSearch.filterTitle","\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815"),sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:d,align:"inline"})}function nw({title:e,headerAction:t,sections:a,selected:r,onSelect:s,className:l}){const{t:i}=xe.useTranslation();return a.length===0?null:n.jsx(Fn,{className:l,title:e??i("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:a,selected:r,onSelect:s,align:"newline"})}function aw({title:e,mode:t,onModeChange:a,matchMode:r,onMatchModeChange:s,positionCount:l,onPositionCountChange:i,inputMode:u,onInputModeChange:c,className:d}){const{t:h}=xe.useTranslation(),p={searchMode:h("wordPairs.filter.searchModeLabel","\uB300\uB9BD \uBC29\uC2DD"),phonemeOrder:h("wordPairs.filter.phonemeOrder","\uC785\uB825 \uC74C\uC808 \uC704\uCE58"),count:h("wordPairs.filter.countLabel","\uC785\uB825 \uC74C\uC808 \uAC2F\uC218"),inputMode:h("wordPairs.filter.inputModeLabel","\uC785\uB825 \uBC29\uC2DD"),orderAny:h("wordPairs.filter.orderAny","\uBB34\uAD00"),orderMatch:h("wordPairs.filter.orderMatch","\uC77C\uCE58"),include:h("wordPairs.mode.include","\uC74C\uC18C \uD3EC\uD568"),pick:h("wordPairs.mode.pick","\uC74C\uC18C \uB300\uB9BD"),explicit:h("wordPairs.mode.contrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815"),charInput:h("wordPairs.input.char","\uAE00\uC790 \uC120\uD0DD"),pronInput:h("wordPairs.input.pron","\uBC1C\uC74C \uC120\uD0DD")},C=f=>h("wordPairs.count",{n:f}),g=[{label:p.searchMode,items:[p.include,p.pick,p.explicit],display:"segmented",labelAction:n.jsx(Ga,{title:h("wordPairs.mode.infoTitle","\uB300\uB9BD \uBC29\uC2DD"),items:[h("wordPairs.mode.infoInclude","\uC74C\uC18C \uD3EC\uD568 \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uBAA8\uB450 \uB4E4\uC5B4\uAC04 \uB2E8\uC5B4\uC640 \uADF8 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694."),h("wordPairs.mode.infoPick","\uC74C\uC18C \uB300\uB9BD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uB300\uB9BD\uC30D \uB450 \uB2E8\uC5B4\uC758 \uC2E4\uC81C \uCC28\uC774\uC810\uC77C \uB54C\uB9CC \uB9E4\uCE6D\uB3FC\uC694."),h("wordPairs.mode.infoContrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815 \u2014 \uAE30\uC900 \uB2E8\uC5B4\uC640 \uB300\uB9BD \uB2E8\uC5B4\uC758 \uC74C\uC18C\uB97C \uAC01\uAC01 \uC9C1\uC811 \uC120\uD0DD\uD574 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694.")]})},{label:p.phonemeOrder,items:[p.orderAny,p.orderMatch],display:"segmented",labelAction:n.jsx(Ga,{items:h("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(Ga,{title:h("wordPairs.input.infoTitle","\uC785\uB825 \uBC29\uC2DD"),items:[h("wordPairs.input.infoChar","\uAE00\uC790 \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uB2E8\uC5B4(\uAE00\uC790 \uAE30\uC900)\uB97C \uCC3E\uC740 \uD6C4, \uB2E8\uC5B4\uC758 \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4."),h("wordPairs.input.infoPron","\uBC1C\uC74C \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4.")]})}],_={[p.searchMode]:t==="explicit"?p.explicit:t==="pick"?p.pick:p.include,[p.phonemeOrder]:r==="ordered"?p.orderMatch:p.orderAny,[p.count]:C(l),[p.inputMode]:u==="phoneme"?p.pronInput:p.charInput},m=(f,v)=>{v===p.searchMode?a(f===p.explicit?"explicit":f===p.pick?"pick":"include"):v===p.phonemeOrder?s(f===p.orderMatch?"ordered":"unordered"):v===p.count?i(f===C(2)?2:1):v===p.inputMode&&c(f===p.pronInput?"phoneme":"word")};return n.jsx(Fn,{className:d,title:e??h("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:g,selected:_,onSelect:m,align:"inline"})}function rw(e){const{title:t,items:a,columns:r,resizeStorageKey:s,gridTemplateColumns:l,mobileGridTemplateColumns:i,searchPlaceholder:u,searchFn:c,defaultSortKey:d,defaultSortAsc:h=!0,selectedId:p,selectedIds:C,onSelect:g,onClose:_,pageSizeOptions:m=[10,25,50,100],initialPageSize:f,emptyText:v,noMatchText:b,countLabel:w,topContent:y,className:B=""}=e,{t:x}=xe.useTranslation(),N=u??x("common.search","\uAC80\uC0C9"),A=v??x("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),D=b??x("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[E,k]=o.useState(""),[R,$]=o.useState(d??r[0]?.key??""),[G,T]=o.useState(h),[P,M]=o.useState(String(f??m[0]??10)),[ee,Q]=o.useState(1);o.useEffect(()=>{Q(1)},[E,P]);const F=c!==null,Z=o.useCallback((ie,te)=>{if(!te)return!0;const ne=te.toLowerCase();return r.some(z=>{const ae=ie[z.key];return ae==null?!1:String(ae).toLowerCase().includes(ne)})},[r]),L=c??Z,V=o.useMemo(()=>{const ie=F?a.filter(te=>L(te,E)):a;return R?[...ie].sort((te,ne)=>{const z=te[R],ae=ne[R];return z===ae?0:gr(z,ae,G)}):ie},[a,E,R,G,F,L]),U=Math.max(1,Math.ceil(V.length/Number(P)));ee>U&&Q(U);const q=Math.min(ee,U),j=V.slice((q-1)*Number(P),q*Number(P)),I=o.useCallback(ie=>{R===ie?T(te=>!te):($(ie),T(!0)),Q(1)},[R]),O=o.useMemo(()=>{if(typeof w=="function"){const ie=V.length,te=w(ie);if(typeof te=="string"){const ne=te.lastIndexOf(String(ie));if(ne>=0)return{prefix:te.slice(0,ne),suffix:te.slice(ne+String(ie).length)}}return{label:te}}if(typeof w=="string"&&w.includes("{n}")){const[ie,te]=w.split("{n}");return{prefix:ie,suffix:te}}return{prefix:x("common.totalCountPrefix","\uCD1D "),suffix:x("common.totalCountSuffix","\uAC1C")}},[w,V.length,x]),Y=o.useMemo(()=>r.map(ie=>({label:ie.label,onClick:ie.sortable!==!1?()=>I(ie.key):void 0,className:ie.className,sortDir:ie.sortable!==!1&&R===ie.key?G?"asc":"desc":null})),[r,R,G,I]),K=o.useMemo(()=>m.map(ie=>({value:String(ie),label:x("common.pageSizeLabel",{n:ie})})),[m,x]);return n.jsxs(Pn,{className:`popup-list ${B}`,title:t,onClose:_,children:[y,"label"in O&&n.jsx("p",{className:"toolbar__count body-1",children:O.label}),n.jsx(Wo,{count:"label"in O?void 0:{value:V.length,prefix:O.prefix,suffix:O.suffix},search:F?{value:E,onChange:k,placeholder:N}:void 0,pageSize:{options:K,value:P,onChange:M},pagination:{page:q,total:U,onChange:Q}}),n.jsx(Qo,{size:"medium",gridTemplateColumns:l,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:s,fields:Y,items:j,onRowClick:g,renderRow:ie=>{const te=C!=null?ie.id!=null&&C.has(ie.id):p!=null&&ie.id===p;return r.map(ne=>({content:ne.render?ne.render(ie):ie[ne.key]??"",className:ke(ne.className,te&&"popup-list__row--selected")}))},empty:F&&E!==""&&a.length>0?D:A})]})}function yd(e){const{title:t,message:a,topContent:r,details:s,children:l,confirmLabel:i,cancelLabel:u,hideCancel:c=!1,extraAction:d,confirmVariant:h="main",confirmDisabled:p=!1,onConfirm:C,closeOnConfirm:g=!0,onClose:_,inline:m,size:f="small",className:v,initialFocus:b="close"}=e,{t:w}=xe.useTranslation(),y=o.useRef(null);o.useEffect(()=>{if(m||b==="close")return;const E=y.current?.closest(".popup-panel"),k=Array.from(E?.querySelectorAll(".popup-footer--buttons button")??[]),R=b==="confirm"?k[k.length-1]:c?void 0:k[d?1:0];R&&!R.disabled&&R.focus()},[]);const B=o.useRef(!1),[x,N]=o.useState(!1),A=E=>{let k=!1;return{close:()=>{k=!0,E()},didClose:()=>k}},D=async E=>{if(B.current)return;B.current=!0;const k=typeof document<"u"?document.activeElement:null;N(!0);let R=!1;try{R=await E()}catch($){typeof console<"u"&&console.error($)}finally{R||(B.current=!1,N(!1),requestAnimationFrame(()=>{const $=document.activeElement;(!$||$===document.body)&&k?.isConnected&&k.focus()}))}};return n.jsxs(Pn,{title:t,onClose:_,closeDisabled:x,inline:m,size:f,className:ke("confirm-popup",r!=null&&"confirm-popup--has-top",v),buttons:[...d?[{label:d.label,variant:d.variant??"default",disabled:d.disabled||x,onClick:async({closeWithAnimation:E})=>{await D(async()=>{const k=A(E);await d.onClick(k.close);const R=d.closeOnClick??!0;return R&&E(),R||k.didClose()})}}]:[],...c?[]:[{label:u??w("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:x,onClick:({closeWithAnimation:E})=>E()}],{label:i??w("common.confirm","\uD655\uC778"),variant:h,disabled:p||x,onClick:async({closeWithAnimation:E})=>{await D(async()=>{const k=A(E);return await C(k.close),g&&E(),g||k.didClose()})}}],children:[r!=null&&n.jsx("div",{className:"confirm-popup__top",children:r}),s&&s.length>0&&n.jsx(Qa,{children:s.map((E,k)=>n.jsx(cn,{label:E.label,children:n.jsx("span",{className:"panel-row__text body-2",children:E.value})},k))}),n.jsx("p",{ref:y,className:"body-2 confirm-popup__message",children:a}),l]})}function ow(e,t,a={}){const{t:r}=xe.useTranslation(),[s,l]=o.useState(!1),i=o.useRef(!1),u=o.useCallback(()=>{i.current=!0},[]),c=o.useCallback(()=>i.current?(i.current=!1,!0):e?(l(!0),!1):!0,[e]),d=s?n.jsx(yd,{title:a.title??r("common.discardConfirm.title","\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?"),message:a.message??r("common.discardConfirm.body","\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4."),confirmLabel:a.confirmLabel??r("common.discardConfirm.confirm","\uC785\uB825 \uCDE8\uC18C"),confirmVariant:"danger",onConfirm:()=>{l(!1),t()},onClose:()=>l(!1)}):null;return{beforeClose:c,discardPopup:d,allowClose:u}}function sw({onApply:e,onCancel:t}){const{t:a}=xe.useTranslation(),[r,s]=o.useState(""),[l,i]=o.useState(!1),[u,c]=o.useState(null),d=o.useRef(null),h=o.useId();o.useEffect(()=>{d.current?.focus()},[]);const p=o.useCallback(async _=>{const m=r.trim();if(m){i(!0),c(null);try{await e(m),_()}catch(f){c(zl(f)),i(!1),requestAnimationFrame(()=>d.current?.focus())}}},[r,e]),C=o.useCallback((_,m)=>{_.key==="Enter"&&!_.nativeEvent.isComposing&&p(m)},[p]),g=_=>{s(_.target.value),c(null)};return n.jsx(Pn,{className:"coupon-input-popup",title:a("usage.couponButton","\uCFE0\uD3F0 \uC785\uB825"),size:"small",onClose:t,closeDisabled:l,buttons:[{label:a("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:l,onClick:({closeWithAnimation:_})=>_()},{label:a("coupons.applyButton","\uC801\uC6A9"),variant:"main",disabled:!r.trim()||l,onClick:({closeWithAnimation:_})=>{p(_)}}],children:({closeWithAnimation:_})=>n.jsxs(n.Fragment,{children:[n.jsx("input",{ref:d,className:"coupon-input-popup__input body-2","aria-label":a("coupons.input.label","\uCFE0\uD3F0 \uCF54\uB4DC"),"aria-invalid":u?!0:void 0,"aria-errormessage":u?h:void 0,"aria-describedby":u?h:void 0,placeholder:a("coupons.input.placeholder","\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"),value:r,onChange:g,onKeyDown:m=>C(m,_),disabled:l,autoComplete:"off",spellCheck:!1}),u&&n.jsx("p",{id:h,className:"coupon-input-popup__error caption-1",role:"alert",children:u})]})})}const vd=["var(--color-main)","var(--color-sub)"],lw=2e3;function iw(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 Ms({active:e=!1,count:t=40,duration:a=2e3,strength:r=1,onComplete:s,trigger:l=0}){const i=o.useMemo(()=>{const m=Math.floor(t/2),f=t-m,v=(b,w)=>Array.from({length:b}).map((y,B)=>{const x=6+Math.random()*12,N=Math.round(Math.min(18,x*Math.min(1.5,1+r*.4))),A=vd[Math.floor(Math.random()*vd.length)],D=Math.random()*300,E=(360+Math.random()*260)*r*1.2,k=(w==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,R=Math.cos(k)*E,$=Math.sin(k)*E*1.35,G=Math.random()*720-360,T=(1200+Math.random()*3e3)*Math.min(1.6,1+r*.3),P=Math.random()>.7?"50%":"3px";return{id:`${w}-${B}`,side:w,size:N,color:A,delay:D,vx:R,vy:$,angularVel:G,life:T,borderRadius:P}});return[...v(m,"left"),...v(f,"right")]},[t,r]),u=o.useRef(null),c=o.useRef({}),d=o.useRef(null),h=o.useRef(s);o.useEffect(()=>{h.current=s},[s]);const p=o.useRef(null),C=o.useRef(null),g=()=>{if(typeof document>"u")return null;let m=document.querySelector("[data-ihab-effect-root]");return m||(m=document.createElement("div"),m.className="app-effect",m.dataset.ihabEffectRoot="",m.style.position="fixed",m.style.inset="0",m.style.pointerEvents="none",m.style.zIndex="99998",document.body.appendChild(m)),m};if(typeof document<"u"&&C.current==null&&(C.current=g()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const Z=setTimeout(()=>h.current?.(),0);return()=>clearTimeout(Z)}const m=1200,f=performance.now(),v=C.current&&C.current!==document.body?C.current.getBoundingClientRect():null,b=Math.max(60,(window.innerHeight||800)*.05),w=Z=>Math.max(40,(Z||window.innerWidth)*.02),y=v?.width||window.innerWidth||375,B=v?.height||window.innerHeight||812,x=Z=>{const L=[...Z].sort((V,U)=>V-U);return L[Math.floor(L.length/2)]||1},N=x(i.map(Z=>Math.abs(Z.vy))),A=x(i.map(Z=>Math.abs(Z.vx))),D=Math.sqrt(2*m*(B*.72+b))/N,E=N*D/m,k=y*.5/(A*E),R=(Z,L,V)=>Math.min(V,Math.max(L,Z)),$=R(D,.8,2.4),G=R(k,.7,2.2),T=a>0?a/lw:1,P=i.map(Z=>({...Z,life:Z.life*T,vx:Z.vx*G,vy:Z.vy*$,startTime:f+Z.delay,ended:!1})),M=v?{x:v.left-w(v.width),y:v.top+v.height+b}:{x:-w(window.innerWidth),y:window.innerHeight+b},ee=v?{x:v.left+v.width+w(v.width),y:v.top+v.height+b}:{x:window.innerWidth+w(window.innerWidth),y:window.innerHeight+b},Q=Z=>{let L=!1;for(const V of P){const U=c.current[V.id];if(!U||!U)continue;if(Z<V.startTime){U.style.display="none",L=!0;continue}if(!V._inited){const z=V.side==="left"?M.x:ee.x,ae=V.side==="left"?M.y:ee.y;U.style.left=`${z}px`,U.style.top=`${ae}px`,U.style.transform="translate3d(0px, 0px, 0)",U.style.display="block",U.style.zIndex="100000",typeof V.color=="string"&&V.color.startsWith("var(")&&(U.style.background=iw(U,V.color)??"#FF0060"),V._inited=!0}const q=(Z-V.startTime)/1e3;if(q<0)continue;const j=V.life/1e3;if(q>=j){U.style.opacity="0",U.style.display="none",V.ended=!0;continue}L=!0;const I=V.side==="left"?M.x:ee.x,O=V.side==="left"?M.y:ee.y,Y=I+V.vx*q,K=O+V.vy*q+.5*m*q*q,ie=(V.angularVel||0)*q,te=Y-I,ne=K-O;U.style.transform=`translate3d(${te}px, ${ne}px, 0) rotate(${ie}deg)`,U.style.opacity=`${Math.max(0,1-q/j)}`}L?d.current=requestAnimationFrame(Q):h.current?.()};d.current=requestAnimationFrame(Q);const F=setTimeout(()=>{try{if((C.current?C.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const Z=document.createElement("div");Z.className="party-container",Z.style.position="fixed",Z.style.inset="0",Z.style.pointerEvents="none",Z.style.overflow="visible",Z.style.zIndex="2147483647";for(const L of i){const V=document.createElement("span");V.className=`confetti confetti--${L.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=`${L.size}px`,V.style.height=`${Math.max(4,L.size*.6)}px`,V.style.background=L.color,V.style.borderRadius=L.borderRadius,V.style.transform="translate3d(0,0,0)",V.style.opacity="0",Z.appendChild(V),c.current[L.id]=V}(document.body||C.current).appendChild(Z),p.current=Z}}catch{}},300);return()=>{if(d.current&&cancelAnimationFrame(d.current),clearTimeout(F),p.current){try{p.current.remove()}catch{}p.current=null}}},[e,a,l,i]),!e)return null;const _=n.jsx("div",{className:"party-container",ref:u,children:i.map(m=>n.jsx("span",{"aria-hidden":!0,ref:f=>{c.current[m.id]=f},className:`confetti confetti--${m.side}`,style:{width:`${m.size}px`,height:`${Math.max(4,m.size*.6)}px`,background:m.color,borderRadius:m.borderRadius}},`${m.id}-${l}`))});return typeof document<"u"?dn.createPortal(_,C.current||document.body):_}const Ls=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function uw({trigger:e=0,active:t=!1}){const[a,r]=o.useState(null);o.useEffect(()=>{if(typeof window>"u")return;const l=i=>{const u=i.detail??{};r(c=>({n:(c?.n??0)+1,count:Ls(u.count),strength:Ls(u.strength),duration:Ls(u.duration)}))};return window.addEventListener("party:trigger",l),()=>window.removeEventListener("party:trigger",l)},[]);const s=o.useCallback(()=>r(null),[]);return n.jsxs(n.Fragment,{children:[n.jsx(Ms,{active:t,trigger:e}),a&&n.jsx(Ms,{active:!0,trigger:a.n,count:a.count,strength:a.strength,duration:a.duration,onComplete:s})]})}function cw({title:e,sub:t,rightAction:a,titleAction:r,badge:s,badgeVariant:l="default",documentTitle:i,onBack:u,backLabel:c,wrap:d=!1}){const{t:h}=xe.useTranslation();Dy(typeof e=="string"?e:i??null);const p=c??h("common.back","\uB4A4\uB85C");return n.jsxs("div",{className:d?"page-title page-title--wrap":"page-title",children:[n.jsxs("div",{className:"page-title__main",children:[n.jsxs("div",{className:"page-title__title-row",children:[u&&n.jsx(Ce,{htmlType:"button",className:"page-title__back",size:48,type:"dot",icon:"chevron-left",iconSize:"large",useBorder:!1,iconColor:"var(--color-text-primary)",ariaLabel:p,showTooltipInfo:p,onClick:u}),n.jsx("h1",{className:"page-title__title h1",children:e}),s&&n.jsx("div",{className:"page-title__badge",children:n.jsx(un,{label:s,size:"small",variant:l,fill:"outline"})}),r?n.jsx("div",{className:"page-title__title-action",children:r}):null]}),t&&n.jsx("p",{className:"page-title__sub body-2",children:t})]}),a?n.jsx("div",{className:"page-title__action",children:a}):null]})}function dw(e){return e??""}const _d=o.createContext({words:[],loading:!1});function pw(){return o.useContext(_d)}function hw({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c,children:d}){const h=o.useMemo(()=>({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c}),[e,t,a,r,s,l,i,u,c]);return n.jsx(_d.Provider,{value:h,children:d})}function mw({items:e,actions:t,columns:a,flat:r=!1,className:s,style:l}){const i=a??e.length;return n.jsx("section",{className:ke("summary-strip",r&&"summary-strip--flat",s),style:{"--summary-strip-cols":String(i),...l},children:n.jsxs("div",{className:"summary-strip__row",children:[n.jsx("div",{className:"summary-strip__items",children:e.map((u,c)=>n.jsxs("div",{className:"summary-strip__item",children:[n.jsx("p",{className:"summary-strip__label caption-1",children:u.label}),n.jsx("p",{className:"summary-strip__value body-3b",title:typeof u.value=="string"||typeof u.value=="number"?String(u.value):void 0,children:u.value})]},c))}),t&&n.jsx("div",{className:"summary-strip__actions",children:t})]})})}const Cw=(e,t)=>`${e} / ${t}`;function fw({blocks:e,sectionTitles:t,logo:a,footer:r,pageLabel:s=Cw,pageWidth:l,pageHeight:i,margin:u,className:c,style:d}){const{t:h}=xe.useTranslation(),p=o.useRef(null),C=o.useRef(null),g=o.useRef(null),_=o.useRef(null),[m,f]=o.useState(null),[v,b]=o.useState(!1);o.useEffect(()=>{const T=p.current;if(!T)return;const P=()=>b(T.scrollWidth>T.clientWidth+1);if(P(),typeof ResizeObserver>"u")return;const M=new ResizeObserver(P);return M.observe(T),()=>M.disconnect()},[m]);const w=e.map(T=>`${T.id}\0${T.section??""}\0${T.group??""}`).join(""),y=m&&m.shape===w?m.pages:null,[B,x]=o.useState(0);o.useEffect(()=>{const T=_.current;if(!T||typeof ResizeObserver>"u")return;const P=new ResizeObserver(()=>x(T.offsetHeight));return P.observe(T),()=>P.disconnect()},[]);const[N,A]=o.useState(0);o.useEffect(()=>{const T=C.current;if(!T||typeof ResizeObserver>"u")return;let P=null;const M=typeof requestAnimationFrame=="function"?F=>requestAnimationFrame(F):F=>setTimeout(F,16),ee=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:F=>clearTimeout(F),Q=new ResizeObserver(()=>{P==null&&(P=M(()=>{P=null,A(F=>F+1)}))});return Array.from(T.children).forEach(F=>Q.observe(F)),()=>{Q.disconnect(),P!=null&&ee(P)}},[w]),o.useLayoutEffect(()=>{const T=C.current,P=_.current;if(!T||!P)return;const M=j=>j.getBoundingClientRect().height||j.offsetHeight,ee=new Map;g.current?.querySelectorAll("[data-chrome-section]").forEach(j=>{ee.set(j.dataset.chromeSection??"",M(j))});const Q=j=>M(P)-(ee.get(j??"")??0),F=Array.from(T.children).map(j=>M(j)),Z=[];e.forEach((j,I)=>{const O=Z[Z.length-1],Y=O?e[O[0]]:void 0;Y&&j.group!=null&&Y.group===j.group&&Y.section===j.section?O.push(I):Z.push([I])});const L=[];let V=[],U=0;const q=()=>{V.length&&L.push(V),V=[],U=0};Z.forEach(j=>{const I=j.reduce((Y,K)=>Y+F[K],0),O=Q(e[j[0]].section);V.length&&e[V[0]].section!==e[j[0]].section&&q(),I>O?j.forEach(Y=>{V.length&&U+F[Y]>O+.01&&q(),V.push(Y),U+=F[Y]}):(V.length&&U+I>O+.01&&q(),j.forEach(Y=>V.push(Y)),U+=I)}),q(),f(j=>j&&j.shape===w&&JSON.stringify(j.pages)===JSON.stringify(L)?j:{shape:w,pages:L})},[w,B,l,i,u,N]);const D=$o,E=D,k=r??n.jsxs(n.Fragment,{children:[n.jsx("img",{src:E,alt:"IHAB",className:"report-doc__logo"}),"\xA9 IHAB, Inc. All rights reserved."]}),R=(T,P,M)=>({header:n.jsxs("div",{className:"report-doc__header",children:[n.jsx("h2",{className:"report-doc__title h3b",children:M!=null&&t?.[M]||null}),a]}),footer:n.jsxs("div",{className:"report-doc__footer caption-1",children:[n.jsx("span",{className:"report-doc__footer-left",children:k}),n.jsx("span",{className:"report-doc__page-no",children:s(T,P)})]})}),$=Array.from(new Set(e.map(T=>T.section??""))),G={...l?{"--report-page-w":l}:null,...i?{"--report-page-h":i}:null,...u?{"--report-margin":u}:null,...d};return n.jsxs("div",{ref:p,className:ke("report-doc",c),style:G,tabIndex:v?0:void 0,role:v?"group":void 0,"aria-label":v?h("report.previewRegion","\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30"):void 0,children:[n.jsxs("div",{className:"report-doc__measure","aria-hidden":!0,children:[n.jsx("div",{ref:_,className:"report-doc__ruler"}),n.jsx("div",{ref:g,children:$.map(T=>{const P=R(1,1,T||void 0);return n.jsxs("div",{"data-chrome-section":T,children:[P.header,P.footer]},T)})}),n.jsx("div",{ref:C,className:"report-doc__measure-blocks",children:e.map(T=>n.jsx("div",{children:T.content},T.id))})]}),y&&n.jsx("div",{className:"report-doc__pages",children:y.map((T,P)=>{const{header:M,footer:ee}=R(P+1,y.length,e[T[0]].section);return n.jsxs("section",{className:"report-doc__page",children:[M,T.map(Q=>n.jsx("div",{children:e[Q].content},e[Q].id)),ee]},P)})})]})}function bw({title:e,fields:t,columns:a=4,className:r,style:s}){return n.jsxs("div",{className:ke("report-info",r),style:{"--report-info-cols":String(a),...s},children:[e&&n.jsx("p",{className:"report-info__title h5b",children:e}),n.jsx("div",{className:"report-info__grid",children:t.map((l,i)=>n.jsxs("div",{className:"report-info__field body-2",children:[n.jsx("span",{className:"report-info__label body-3",children:l.label}),n.jsx("span",{className:"report-info__value",children:l.value})]},i))})]})}const ia=new Map;let Fr=null;const gw=12;function yw(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 Or(){const e=new Map;for(const t of ia.keys()){if(!t.isConnected)continue;const a=yw(t),r=e.get(a)??[];r.push(t),e.set(a,r)}for(const t of e.values()){t.sort((r,s)=>r.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1);let a=0;for(const r of t){a>0?r.style.setProperty("--update-alert-stack-offset",`${a}px`):r.style.removeProperty("--update-alert-stack-offset");const s=r.getBoundingClientRect().height;s>0&&(a+=s+gw)}}}function vw(e){return typeof window>"u"?()=>{}:(ia.set(e,(ia.get(e)??0)+1),ia.get(e)===1&&typeof ResizeObserver<"u"&&(Fr??(Fr=new ResizeObserver(()=>Or())),Fr.observe(e)),Or(),()=>{const t=(ia.get(e)??1)-1;if(t>0){ia.set(e,t),Or();return}ia.delete(e),Fr?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),Or()})}function _w({title:e,message:t,actionLabel:a,onAction:r,icon:s,onClose:l,className:i=""}){const{t:u}=xe.useTranslation(),c=a??u("common.update","\uC5C5\uB370\uC774\uD2B8"),d=o.useRef(null),h=o.useRef(!1);return o.useLayoutEffect(()=>{const p=d.current,C=p?.parentElement?.closest(".update-alert-stack")??p,g=C?vw(C):null;return()=>{g?.(),h.current&&p&&p.contains(document.activeElement)&&mr(p)}},[]),n.jsxs("div",{ref:d,className:ke("update-alert",i),role:"alert",children:[l&&n.jsx("button",{type:"button",className:"update-alert__close",onClick:()=>{h.current=!0,l()},"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"}),n.jsxs("div",{className:"update-alert__top",children:[n.jsx("div",{className:"update-alert__icon",children:s??n.jsx(Us,{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(Ce,{htmlType:"button",size:32,variant:"main",shape:"pill",className:"update-alert__action",onClick:r,children:c})]})}function xw({title:e,titleLevel:t=3,description:a,topActions:r,children:s,footerLeft:l,footerRight:i,ariaLabel:u,onClick:c,draggable:d,onDragStart:h,onDragEnd:p,className:C}){const g=t?`h${t}`:"div",_=l!=null||i!=null,m=s!=null&&s!==!1,f=o.useCallback(v=>{c&&v.target===v.currentTarget&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),c())},[c]);return n.jsxs("div",{className:ke("training-card",c?"training-card--clickable":"",C),onClick:c,onKeyDown:c?f:void 0,role:c?"button":void 0,"aria-label":c?u??(typeof e=="string"?e:void 0):void 0,tabIndex:c?0:void 0,draggable:d,onDragStart:h,onDragEnd:p,children:[n.jsxs("div",{className:"training-card__header",children:[n.jsxs("div",{className:"training-card__title-row",children:[typeof e=="string"?n.jsx(g,{className:"training-card__title h4",children:e}):e,r!=null&&n.jsx("div",{className:"training-card__top-actions",onClick:v=>v.stopPropagation(),children:r})]}),a!=null?typeof a=="string"?n.jsx("p",{className:"training-card__description body-3",children:a}):a:n.jsx("p",{className:"training-card__description body-3","aria-hidden":"true",children:" "})]}),m&&n.jsx("div",{className:"training-card__body",children:s}),_&&n.jsxs("div",{className:"training-card__footer",children:[l!=null&&n.jsx("div",{className:"training-card__footer-left",children:l}),i!=null&&n.jsx("div",{className:"training-card__meta",children:i})]})]})}function ww({title:e,titleLevel:t=3,count:a,collapsed:r=!1,onToggle:s,beforeSort:l,sort:i,actions:u,empty:c=!1,emptyContent:d,dragOver:h=!1,onDragOver:p,onDragLeave:C,onDrop:g,children:_,className:m}){const{t:f}=xe.useTranslation(),v=o.useId(),b=t?`h${t}`:"span",w=s!=null,y=ke("training-card-group",h&&"training-card-group--dragover",r&&"training-card-group--collapsed",w&&"training-card-group--collapsible",m);return n.jsxs("div",{className:y,onDragOver:p,onDragLeave:C,onDrop:g,role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?v:void 0,children:[n.jsxs("header",{className:"training-card-group__header",children:[w&&n.jsx(Ce,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:r?"chevron-right":"chevron-down",ariaLabel:typeof e=="string"&&e?r?f("common.expandFor",{name:e}):f("common.collapseFor",{name:e}):r?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),className:"training-card-group__chevron","aria-expanded":!r,onClick:s}),typeof e=="string"?n.jsx(b,{id:v,className:"training-card-group__title h5b",children:e}):e,a!==void 0&&n.jsx("span",{className:"training-card-group__count body-3b",children:a}),(l!=null||i||u!=null)&&n.jsxs("span",{className:"training-card-group__actions",onClick:B=>B.stopPropagation(),children:[l,i&&n.jsx(_n,{size:40,options:i.options,value:i.value,placeholder:i.placeholder,onChange:i.onChange,ariaLabel:typeof e=="string"&&e?f("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:_}))]})}const Bw="speechear:saved_word_tables";function Aw(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 kw(){try{const e=localStorage.getItem(Bw);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(Aw):[]}catch{return[]}}function xd(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 $s(e){return e.map(t=>t.homonum!=null?`${t.word}#${t.homonum}`:t.word).join("|")}function Nw(e){const t=new Set;return e.map(a=>{let r=a.id;for(let s=2;t.has(r);s++)r=`${a.id}~${s}`;return t.add(r),r===a.id?a:{...a,id:r}})}function Ew({title:e,titleIcon:t,disc:a,filterTitle:r,filterCollapsible:s,filterDefaultCollapsed:l,filterCollapsed:i,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:d,code:h,baseItem:p,baseContentTypes:C,cellCapacity:g,maxItemsPerPage:_,items:m,onSaveComplete:f,onLoad:v,onRemoveItem:b,onCopyItem:w,onReplaceItem:y,onReset:B,resetLabel:x,saveButtonLabel:N,secondarySaveButtonLabel:A,onReorder:D,showCellCount:E,onAddItem:k,className:R,renderSavePopup:$,renderWordSearch:G,hideControls:T,saveOnly:P,tableName:M,nameValue:ee,onNameChange:Q,descriptionValue:F,onDescriptionChange:Z,namePlaceholder:L,descriptionPlaceholder:V,existingNames:U,editingName:q,onCancel:j,initialItemsPerPage:I,renderCellAction:O,actionsLeftExtra:Y}){const{t:K}=xe.useTranslation(),ie=x??K("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),te=m===void 0,ne=!!Q,[z,ae]=o.useState([]),H=(ee??"").trim(),W=H||(L??"").trim(),ue=(F??"").trim()||(V??"").trim(),Be=(U??[]).map(ce=>ce.trim().toLowerCase()),ye=[q?.trim().toLowerCase(),...z].filter(ce=>!!ce),he=[...Be];for(const ce of ye){const _e=he.indexOf(ce);_e!==-1&&he.splice(_e,1)}const Ne=H!==""&&he.includes(H.toLowerCase()),[Re,Me]=o.useState(Array(4).fill(null)),[se,Ee]=o.useState(4),[$e,Ae]=o.useState(null),Fe=Re.slice(0,se),Ve=!!d?.show,[ct,ot]=o.useState(!0),[Xe,ft]=o.useState(!0),Le=d&&{...d,top:ct,bottom:Xe},[qe,Se]=o.useState("landscape"),[He,Qe]=o.useState([...bc]),[it,bt]=o.useState("show"),[wt,Et]=o.useState(!0),[at,st]=o.useState(!0),Bt=o.useRef(null),At=o.useRef([]),[Mt,Rt]=o.useState(I==="all"?Number.POSITIVE_INFINITY:I??8),[_t,dt]=o.useState("right"),[ut,lt]=o.useState(!1),[xt,pt]=o.useState(!1),{toastMessage:be,toastType:ve,showWarning:we,clearToast:tt}=Gi("warning"),gt=o.useCallback(()=>Ae(null),[Ae]);k&&!te&&!E&&!g&&kt("word-table-block-add-without-cell-count",'[WordTableBlock] \uD45C\uC2DC \uBAA8\uB4DC\uC5D0\uC11C onAddItem \uC740 cellCapacity \uB098 showCellCount \uC640 \uD568\uAED8 \uC918\uC57C "\uCD94\uAC00\uD558\uAE30" \uCE78\uC774 \uC0DD\uAE34\uB2E4.'),p&&te&&kt("word-table-block-base-item-in-edit","[WordTableBlock] baseItem \uC740 \uD45C\uC2DC \uBAA8\uB4DC(items \uB97C \uC8FC\uB294 \uAF34)\uC5D0\uC11C\uB9CC \uAC78\uB9B0\uB2E4 \u2014 \uD3B8\uC9D1 \uACA9\uC790\uC5D0\uB294 \uC11C\uC9C0 \uC54A\uB294\uB2E4.");const[Nt,yt]=o.useState(()=>Math.max(m?.length??1,1)),Te=Math.max(g??0,m?.length??0,1),nt=te?se:E?Math.max(Nt,m?.length??1,1):Te,{width:oe,height:ge}=aa[qe],Oe=!te&&!E,Je=Math.max(1,Math.min(Te,_??Te)),et=Math.min(Mt,Je),Ge=Oe?et:nt,Lt=Math.ceil((m?.length??0)/Math.max(1,Ge)),nn=(m?.length??0)<Te?Math.floor((m?.length??0)/Math.max(1,Ge))+1:0,fn=Oe?Math.max(1,Lt,nn):0,Pt=Oe?Array.from({length:fn},(ce,_e)=>(m??[]).slice(_e*Ge,(_e+1)*Ge)):null,Wt=!!Pt&&Pt.length>1,Ht=te?Fe.some(ce=>ce!==null&&ce.length>1):(m??[]).some(ce=>(ce.words??[]).length>1),It=M?.trim()||`${Yl(Ia())} ${Ht?K("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):K("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,kn=o.useCallback(()=>Wt?At.current.filter(ce=>ce!==null):Bt.current?[Bt.current]:[],[Wt]),{print:an,openNewWindow:jt,downloadHtml:$t}=hs({getElements:kn,paperW:oe,paperH:ge,fileName:It,onPopupBlocked:()=>{we(K("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."))}}),qt=ce=>{Ee(ce),Me(_e=>_e.length>=ce?_e:[..._e,...Array(ce-_e.length).fill(null)]),Ae(null)},Jt=ce=>{Me(_e=>{const Ye=[..._e];return Ye[ce]=null,Ye}),$e===ce&&Ae(null)},bn=ce=>{if($e===null)return;const _e=$e;Me(ht=>{const Dt=[...ht];return Dt[_e]=ce.length>0?ce:null,Dt});const Ye=Fe.findIndex((ht,Dt)=>Dt>_e&&ht===null);Ae(Ye!==-1?Ye:null)},Yt=te?Fe.some(ce=>ce?.some(_e=>!!_e.colloquialPronunciation)):(m??[]).some(ce=>(ce.words??[]).some(_e=>!!_e.colloquialLabel)),xn=!te&&gc([...p?[p]:[],...m??[]]),Zt=o.useMemo(()=>pa()?te?Re.slice(0,se).flatMap(ce=>(ce??[]).map(_e=>[_e.word,_e.homonum])):(ce=>ce.flatMap(_e=>(_e.words??[]).map(Ye=>[Ye.label,Ye.homonum])))([...p?[p]:[],...m??[]]):[],[te,Re,se,m,p]),[gn,Ut]=o.useState(!1);o.useEffect(()=>{if(Zt.length===0)return;let ce=!1;return Promise.all(Zt.map(([_e,Ye])=>Ml(_e,Ye))).then(_e=>{ce||Ut(_e.some(Boolean))},()=>{}),()=>{ce=!0}},[Zt]);const Nn=Zt.length>0&&gn,de=o.useMemo(()=>[...te||E?[{label:K("wordTable.filter.columns","\uCE78 \uC218"),items:U4.map(ce=>({value:`${ce}\uCE78`,displayLabel:K("wordTable.filter.column",{count:ce})})),display:"segmented"}]:[],...Oe&&(m?.length??0)>0?[kc(K,{hasPairs:Ht,itemCount:Te,max:_})]:[],...Wt?[K4(K)]:[]],[K,te,E,Oe,m?.length,Ht,Te,_,Wt]),je={...te||E?{[K("wordTable.filter.columns","\uCE78 \uC218")]:`${nt}\uCE78`}:{},...Oe&&(m?.length??0)>0?{[K(Ht?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${et}\uAC1C`}:{},...Wt?{[K("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:_t}:{}},Ie=(ce,_e)=>{_e===K("wordTable.filter.columns","\uCE78 \uC218")?te?qt(parseInt(ce)):yt(parseInt(ce)):_e===K(Ht?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")?Rt(Nc(parseInt(ce),Te)):_e===K("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&dt(Ec(ce))},Ue=te?Nw(Fe.filter(ce=>ce!==null&&ce.length>0).map(ce=>({id:$s(ce),words:ce.map(xd)}))):m??[],ze=()=>{te&&Me(ce=>ce.length>se?ce.slice(0,se):ce)},X=(ce=!1)=>{if(pt(ce),ne&&f){const _e=W.trim().toLowerCase();_e&&ae(Ye=>Ye.includes(_e)?Ye:[...Ye,_e]),f(W,Ue,ue||void 0,ce),ze();return}if(P&&f){f("",Ue,void 0,ce),ze();return}if(f){lt(!0);return}$t()},[pe,De]=o.useState(!1),[We,Ze]=o.useState(""),Ke=We.trim(),mt=Ke!==""&&Be.includes(Ke.toLowerCase()),vt=()=>{Ze(W?K("wordTable.save.copyName",{name:W,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),De(!0)},fe=()=>{!Ke||mt||!f||(f(Ke,Ue,ue||void 0,!0),ze(),De(!1))},S=Ue.length===0,J=S||ne&&(W===""||Ne),me=()=>{if(S){we(K("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(ne&&W===""){we(K("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}ne&&Ne&&we(K("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},Pe=n.jsx(xa,{items:Ue,orientation:qe,contentTypes:He,baseItem:p,baseContentTypes:C,cutLine:it,showOutline:wt,showDivLine:at,count:nt});return n.jsxs(n.Fragment,{children:[n.jsxs(_a,{type:"page",icon:t,title:e,disc:a,className:ke("word-table-block",R),children:[pe&&n.jsx(Pn,{size:"small",title:A??K("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>De(!1),footer:({closeWithAnimation:ce})=>n.jsxs(n.Fragment,{children:[n.jsx(Ce,{htmlType:"button",size:48,type:"bar",label:K("common.cancel","\uCDE8\uC18C"),onClick:ce}),n.jsx(Ce,{htmlType:"button",size:48,type:"bar",variant:"main",label:K("common.save","\uC800\uC7A5"),disabled:!Ke||mt,onClick:fe})]}),children:n.jsx(Kn,{label:K("wordTable.save.nameLabel","\uC774\uB984"),value:We,onChange:Ze,placeholder:K("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:fe,error:mt?K("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),ut&&f&&$?.({defaultName:typeof e=="string"?e:K("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:Pe,previewW:oe,previewH:ge,items:Ue,existingNames:kw().map(ce=>ce.name),saveAsNew:xt,onSave:(ce,_e)=>{f(ce,Ue,_e,xt),ze(),lt(!1)},onCancel:()=>lt(!1)}),(te||k)&&$e!==null&&G?.({cellIndex:$e,onConfirm:te?bn:ce=>{if(k){const _e=ce[0];if(_e){const Ye=new Set((m??[]).map(Dt=>Dt.id));let ht=$s([_e]);for(let Dt=2;Ye.has(ht);Dt++)ht=`${$s([_e])}~${Dt}`;k({id:ht,words:[xd(_e)]})}}Ae(null)},onClose:gt}),!T&&n.jsx(us,{title:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,hasImage:Nn,hasColloquial:Yt,hasCaption:xn,contentTypes:He,orientation:qe,showOutline:wt,cutLine:it,showDivLine:at,setters:{setContentTypes:Qe,setOrientation:Se,setShowOutline:Et,setCutLine:bt,setShowDivLine:st,setShowTopInfo:ot,setShowBottomInfo:ft},showCutLine:(Oe?Ge:nt)>1,showDivLine2:Ht,middleSections:de,extraSelected:je,onExtraSelect:Ie,showPaperBands:Ve,showTopInfo:ct,showBottomInfo:Xe}),Wt&&Pt?n.jsx("div",{className:"word-table-block__pages",children:Pt.map((ce,_e)=>n.jsx(xa,{orientation:qe,contentTypes:He,cutLine:it,showOutline:wt,showDivLine:at,count:Ge,items:ce,baseItem:p,baseContentTypes:C,onRemoveItem:b,onCopyItem:w,onReplaceItem:y,onReorder:D&&((Ye,ht)=>D(Ye+_e*Ge,ht+_e*Ge)),indexOffset:_e*Ge,totalCount:m?.length??0,renderCellAction:O&&((Ye,ht)=>O(Ye+_e*Ge,ht)),showFillerAdd:!!k,onActivateCell:k?(Ye=>Ae(Ye+_e*Ge)):void 0,addableCount:Math.max(0,Math.min(Ge,Te-_e*Ge)),brand:Le,code:h,contentRef:Ye=>{At.current[_e]=Ye},pageNumber:{current:_e+1,total:Pt.length},pageNumberPosition:_t},_e))}):n.jsx(xa,{orientation:qe,contentTypes:He,cutLine:it,showOutline:wt,showDivLine:at,count:nt,items:te?void 0:m??[],baseItem:te?void 0:p,baseContentTypes:C,editCells:te?Fe:void 0,activeCell:$e,onActivateCell:te||k?Ae:void 0,onRemoveCell:te?Jt:void 0,onRemoveItem:te?void 0:b,onCopyItem:te?void 0:w,onReplaceItem:te?void 0:y,onReorder:te?void 0:D,renderCellAction:te?void 0:O,brand:Le,code:h,showFillerAdd:!!k,contentRef:Bt}),!T&&!P&&Y!=null&&n.jsx("div",{className:"word-table-block__table-actions",children:Y}),ne&&!T&&n.jsxs(Qa,{size:"medium",labelWidth:64,useBorder:!1,useRowBorder:!1,className:"word-table-block__meta",children:[n.jsx(cn,{variant:"custom",label:K("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(Kn,{required:!0,value:ee??"",onChange:Q,placeholder:L?L+K("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):K("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:K("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:Ne?K("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:ce=>{(ce.key==="Tab"&&!ce.shiftKey||ce.key===" ")&&!(ee??"").trim()&&(L??"").trim()&&(ce.preventDefault(),Q?.(L??""))}})}),n.jsx(cn,{variant:"custom",label:K("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(Kn,{value:F??"",onChange:Z,placeholder:V?V+K("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):K("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:K("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:ce=>{(ce.key==="Tab"&&!ce.shiftKey||ce.key===" ")&&!(F??"").trim()&&(V??"").trim()&&(ce.preventDefault(),Z?.(V??""))}})})]})]}),!T&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!P&&v&&n.jsx(Ce,{htmlType:"button",size:40,type:"bar",label:K("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:v}),!P&&B&&n.jsx(Ce,{htmlType:"button",size:40,type:"bar",label:ie,onClick:B}),!P&&n.jsx(Ce,{htmlType:"button",size:40,type:"bar",label:K("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:jt})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[j&&n.jsx(Ce,{htmlType:"button",size:"56",type:"bar",label:K("common.cancel","\uCDE8\uC18C"),onClick:j}),!P&&n.jsx(Ce,{htmlType:"button",size:"56",type:"bar",label:K("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:an}),A&&n.jsx(Ce,{htmlType:"button",size:"56",type:"bar",label:A,onClick:()=>ne?vt():X(!0),disabled:S,onDisabledClick:()=>{we(K("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."))}}),n.jsx(Ce,{htmlType:"button",size:"56",type:"bar",variant:"main",label:N??K("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>X(!1),disabled:J,onDisabledClick:me})]})]}),n.jsx(va,{message:be,type:ve,onClose:tt})]})}const Dw=8;function wd({items:e,className:t}){const{t:a}=xe.useTranslation(),r=o.useRef(null),[s,l]=o.useState(null),i=o.useCallback(()=>l(r.current?.getBoundingClientRect()??null),[]),u=o.useCallback(()=>l(null),[]),c=fr(!!s,b=>{b?i():u()},r),d=e.length,h=d<=3?1:2,p=Dw,C=d>p,g=e.slice(0,C?p-1:p),_=d-g.length,m=e.slice(g.length).map(b=>b.words?.length?b.words.map(w=>w.label).join(" / "):b.id),f=Math.ceil(Math.min(d,p)/h)||1,v=h*f;return n.jsx("div",{className:ke("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${h}, 1fr)`},children:Array.from({length:v},(b,w)=>{if(C&&w===p-1)return n.jsxs("div",{ref:r,className:"word-table-thumb__cell word-table-thumb__cell--more",tabIndex:0,"aria-label":a("wordTable.thumbMoreAria",{count:_,words:m.join(", "),defaultValue:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}"}),onPointerEnter:B=>{Un(B)||i()},onPointerLeave:B=>{Un(B)||u()},onFocus:()=>{ea()||i()},onBlur:u,onClick:B=>{B.stopPropagation(),c.touchPress()},children:[n.jsx("span",{className:"word-table-thumb__more body-3",children:a("wordTable.thumbMore",{count:_,defaultValue:"+{{count}}"})}),s&&m.length>0&&n.jsx(qn,{anchorRect:s,items:m,showIndex:!1,closeOnOutsideClick:!1})]},w);const y=g[w];return y?n.jsx("div",{className:"word-table-thumb__cell",children:(y.words?.length?y.words:[{label:y.id}]).map((B,x)=>n.jsxs(o.Fragment,{children:[x>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:B.label})]},x))},w):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},w)})})}function Sw({items:e,name:t,description:a,createdAt:r,code:s,published:l,publishedLabel:i,shared:u,sharedLabel:c,isNew:d,publisherName:h,publishedAt:p,likeCount:C,downloadCount:g,onPublisherClick:_,selected:m,onClick:f,onMore:v,titleNode:b,className:w}){const{t:y}=xe.useTranslation(),B=b!=null,x=h!=null||p!=null||C!=null||g!=null,N=A=>{A.target===A.currentTarget&&!B&&(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),f?.())};return n.jsxs("div",{className:ke("word-table-button",m?"word-table-button--selected":"",x?"":"word-table-button--no-footer",w),role:"button",tabIndex:0,"aria-label":s?`${t} (${s})`:t,onClick:B?void 0:f,onKeyDown:N,children:[d&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":y("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(wd,{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:[b??n.jsx("div",{className:"word-table-button__title h4",children:t}),a&&n.jsx("div",{className:"word-table-button__desc body-3",children:a})]}),v&&!B&&n.jsx(Ce,{htmlType:"button",className:"word-table-button__more",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:y("common.moreFor",{name:t}),onClick:A=>{A.stopPropagation(),v(A)}})]}),(s||r||l||u)&&n.jsxs("div",{className:"word-table-button__meta-row",children:[n.jsx("span",{className:"word-table-button__meta-left",children:n.jsx("span",{className:"word-table-button__meta caption-1",children:r?Kl(r,y):""})}),n.jsxs("span",{className:"word-table-button__meta-right",children:[(l||u)&&n.jsxs("span",{className:"word-table-button__badges",children:[l&&n.jsx(un,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:i??y("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),u&&n.jsx(un,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:c??y("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),s&&n.jsx("span",{className:"word-table-button__code caption-1",children:s})]})]}),x&&n.jsxs("div",{className:"word-table-button__footer",children:[n.jsxs("span",{className:"word-table-button__store-by",children:[h&&(_?n.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":y("wordTable.publisherFilter",{name:h,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:A=>{A.stopPropagation(),_()},children:h}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:h})),p&&n.jsx("span",{className:"training-card__date body-4",children:Kl(p,y)})]}),n.jsxs("span",{className:"word-table-button__store-stats",children:[C!=null&&n.jsx(un,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(C),"aria-label":y("common.likeCount",{count:C,defaultValue:`\uC88B\uC544\uC694 ${C}`})}),g!=null&&n.jsx(un,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(g),"aria-label":y("common.downloadCount",{count:g,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${g}`})})]})]})]})}/**
1043
+ `).map((i,u,c)=>n.jsxs(o.Fragment,{children:[i,u<c.length-1&&n.jsx("br",{})]},u))})}),n.jsxs("div",{className:"site-footer__links",children:[n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.site.title","\uC0AC\uC774\uD2B8")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:"IHAB"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://speechear.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.malgwi","\uB9D0\uADC0")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.soundDirection","\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/vr-sound-localization",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.vrSoundDirection","VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://ihab-offcial-web.vercel.app/product/hearing-test-pro",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.hearingTest","\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C")})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.sns.title","SNS")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://blog.naver.com/ihab_official",target:"_blank",rel:"noopener noreferrer",children:l("footer.sns.naverBlog","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.instagram.com/ihab.official.yt/",target:"_blank",rel:"noopener noreferrer",children:"Instagram"})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"https://www.youtube.com/@%EC%95%84%EC%9D%B4%ED%95%B4%EB%B8%8C-%EA%B3%B5%EC%8B%9D%EC%B1%84%EB%84%90",target:"_blank",rel:"noopener noreferrer",children:"Youtube"})})]})]}),n.jsxs("div",{className:"site-footer__column",children:[n.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.policy.title","\uC815\uCC45")}),n.jsxs("ul",{children:[n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{e&&(i.preventDefault(),e())},children:l("footer.policy.terms","\uC774\uC6A9\uC57D\uAD00")})}),n.jsx("li",{children:n.jsx("a",{className:"footer-link",href:"#",onClick:i=>{t&&(i.preventDefault(),t())},children:l("footer.policy.privacy","\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68")})})]})]})]})]}),n.jsx("hr",{className:"site-footer__rule"}),n.jsxs("div",{className:"site-footer__bottom",children:[n.jsx("div",{className:"site-footer__brand",children:n.jsx("img",{src:$o,alt:"IHAB",className:"site-footer__logo"})}),n.jsxs("div",{className:"site-footer__meta",children:[n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.ceo","\uB300\uD45C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.ceoName","\uD55C\uC9C0\uD61C")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.address","\uC8FC\uC18C")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.addressValue","\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.bizNo","\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638")})," ",n.jsx("span",{className:"footer-meta caption-1",children:l("footer.bizNoValue","526-81-02926")})]}),n.jsxs("div",{children:[n.jsx("span",{className:"footer-title",children:l("footer.support","\uACE0\uAC1D\uC13C\uD130")})," ",n.jsxs("span",{className:"footer-meta caption-1",children:[r," \xA0 ",s]})]})]})]}),n.jsx("div",{className:"site-footer__copyright footer-copyright caption-1",children:"\xA9 IHAB, Inc. All rights reserved."})]})})}function S_({logo:e,logoAlt:t="",logoHref:a,links:r=[],actions:s,className:l,containerClassName:i,renderLink:u,menuLabel:c}){const{t:d}=_e.useTranslation(),h=c??{open:d("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:d("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[p,m]=o.useState(!1),g=o.useId(),y=o.useRef(null);o.useEffect(()=>{if(!p)return;const _=Qn(()=>{const v=document.getElementById(g);v&&v.contains(document.activeElement)&&y.current?.focus(),m(!1)}),b=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,w=v=>{v.matches&&m(!1)};return b&&(b.matches&&m(!1),b.addEventListener?.("change",w)),()=>{_(),b?.removeEventListener?.("change",w)}},[p,g]);const C=i?`${i} landing-header__inner`:"landing-header__inner",f=(_,b)=>u?u(_,{onClick:b}):n.jsx("a",{href:_.href,onClick:b,"aria-current":_.current?"page":void 0,children:_.label});return n.jsxs("header",{className:l?`landing-header ${l}`:"landing-header",children:[n.jsxs("div",{className:C,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((_,b)=>n.jsx("span",{children:f(_)},`${b}:${_.href}`))}),n.jsxs("div",{className:"landing-header__actions",children:[s,r.length>0&&n.jsx("button",{ref:y,type:"button",onClick:()=>m(_=>!_),"aria-expanded":p,"aria-controls":g,"aria-label":p?h.close:h.open,className:p?"landing-header__toggle landing-header__toggle--open":"landing-header__toggle",children:n.jsxs("span",{className:"landing-header__burger",children:[n.jsx("span",{}),n.jsx("span",{}),n.jsx("span",{})]})})]})]}),r.length>0&&n.jsx("nav",{id:g,hidden:!p,className:"landing-header__drawer",children:n.jsx("div",{className:i??void 0,children:r.map((_,b)=>n.jsx("span",{className:"landing-header__drawer-item",children:f(_,()=>m(!1))},`${b}:${_.href}`))})})]})}function j_({children:e,action:t,onClick:a,className:r}){const s=a?"bottom-sticky__inner bottom-sticky__inner--clickable":"bottom-sticky__inner";return n.jsx("div",{className:r?`bottom-sticky ${r}`:"bottom-sticky",children:n.jsxs("div",{className:s,onClick:a,...tc(a),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function T_({mountedRef:e}){const t=o.useRef({phase:"sound",at:0}),a=o.useRef(0),r=o.useRef(null),s=o.useRef(null),l=o.useCallback(()=>{const C=t.current,f=C.phase!=="sound"&&C.at>0;s.current=f?{phase:C.phase,elapsed:Math.max(0,Date.now()-C.at)}:null},[]),i=o.useCallback(()=>{const C=s.current;return s.current=null,C},[]),u=o.useCallback(()=>{a.current+=1,t.current={phase:"sound",at:0}},[]),c=o.useCallback((C,f,_=0)=>{if(!(C>0))return Promise.resolve(!0);const b=a.current;return t.current={phase:f,at:Date.now()-Math.max(0,_)},new Promise(w=>{const v=setTimeout(()=>{r.current===v&&(r.current=null),w(!!e.current&&b===a.current)},C);r.current=v})},[e]),d=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),h=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),p=o.useCallback(()=>{const C=t.current;return C.phase!=="sound"&&C.at>0},[]),m=o.useCallback(()=>a.current,[]),g=o.useCallback(C=>C===a.current,[]),y=o.useCallback(()=>{a.current+=1},[]);return o.useEffect(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]),o.useMemo(()=>({positionRef:t,isRunning:p,generation:m,isCurrent:g,abort:u,waitPad:c,enterSound:d,leave:h,pause:l,resume:i,__bumpGenerationForTest:y}),[p,m,g,u,c,d,h,l,i,y])}const Ba=9,M_=e=>Math.round(Math.min(Ba,Math.max(0,e))/Ba*100),L_=e=>e/100*Ba,ar=2,$c=.1,$_=e=>Math.min(ar,Math.max(0,e)),R_=.1,P_=e=>Math.round(e*1e6)/1e6;function rr(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return $_(t);const a=Math.min(Ba,Math.max(0,Number(e.level)||0))/Ba,r=Number(e.mainVolume);return r>0?a>0?P_(Math.min(ar,Math.max(R_,a/r))):0:1}const Rc=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function Pc(e){return Rc(e)}function fs(e){return Rc(e)*rr(e)}function bs(e,t=W1()){const a=Number.isFinite(t)&&t>0?t:1;return Math.min(1,fs(e)/a)}function ra(e,t){const a={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(a.noiseRatio=rr({level:a.level,mainVolume:a.mainVolume})),a}const oa={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},gs=o.createContext(null);function Er(){return o.useContext(gs)}const ys=e=>`${z1()}/${e}`,Fc=e=>Array.from({length:10},(t,a)=>ys(`${e}-${String(a+1).padStart(2,"0")}.mp3`)),Dr={get defaultNoise(){return ys("noise1.mp3")},get street(){return Fc("noise2")},get restaurant(){return Fc("noise3")},get buzz(){return ys("noise4.mp3")}};function F_(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return Dr.defaultNoise;case"street":return Dr.street[t];case"restaurant":return Dr.restaurant[t];case"buzz":return Dr.buzz;default:return null}}function I_({noisePlayer:e,audioRef:t,playbackStateRef:a,sequencer:r}){const s=o.useRef(e?.registerAnalyser);s.current=e?.registerAnalyser;const l=o.useRef(null),[i,u]=o.useState(null),c=o.useRef(null),d=o.useRef(null),h=o.useRef(null),p=o.useRef(null),m=o.useRef(0),g=o.useRef(null),y=o.useCallback(()=>!!r?.isRunning(),[r]),C=o.useCallback(()=>{p.current!==null&&(cancelAnimationFrame(p.current),p.current=null),g.current!==null&&(clearTimeout(g.current),g.current=null)},[]),f=o.useCallback((k,x=250)=>{const A=l.current;if(!A)return;const B=d.current;if(B){d.current=null;try{A.pause()}catch{}A.src=B,A.load()}if(!A.src)return;m.current+=1,C();try{oo(),lr(A).then($=>{if(l.current===A)try{s.current?.("noise",$)}catch{}})}catch{}const E=A.paused?0:ir(A);A.paused&&Vn(A,0),A.play().catch(()=>{});const D=performance.now(),N=()=>{const $=Math.min(1,(performance.now()-D)/x);try{Vn(A,E+(k-E)*$)}catch{}$<1?p.current=requestAnimationFrame(N):p.current=null};p.current=requestAnimationFrame(N)},[C]),_=o.useCallback((k=250,x)=>{const A=l.current;if(!A||A.paused){x?.();return}const B=++m.current;C();const E=performance.now(),D=ir(A),N=()=>{const $=Math.min(1,(performance.now()-E)/k);try{Vn(A,D*(1-$))}catch{}if($<1)p.current=requestAnimationFrame(N);else{p.current=null,g.current!==null&&(clearTimeout(g.current),g.current=null);try{A.pause()}catch{}x?.()}};p.current=requestAnimationFrame(N),g.current=setTimeout(()=>{if(g.current=null,m.current===B){p.current!==null&&(cancelAnimationFrame(p.current),p.current=null);try{A.paused||(Vn(A,0),A.pause(),x?.())}catch{}}},k+150)},[C]);o.useEffect(()=>{const k=document.createElement("audio");return k.loop=!0,k.crossOrigin="anonymous",l.current=k,()=>{C();try{k.pause(),k.removeAttribute("src"),k.load()}catch{}l.current=null,c.current=null,d.current=null}},[C]);const b=e?bs(e.settings):0,w=!!e?.settings.enabled&&b>0;o.useEffect(()=>{if(!w)return;let k=0;const x=setInterval(()=>{const A=l.current;if(!A||A.paused){k=0;return}const B=t.current;if(B&&!B.paused&&!B.ended||y()||a.current==="playing"){k=0;return}k+=1,k>=2&&(k=0,_())},400);return()=>clearInterval(x)},[_,w,t,a,y]),o.useEffect(()=>{const k=()=>{const x=l.current;if(document.hidden){if(x&&!x.paused){C();try{x.pause()}catch{}}return}if(!x||!x.paused)return;const A=t.current,B=!!A&&!A.paused&&!A.ended||y()||a.current==="playing",E=h.current;B&&E?.enabled&&E.volume>0&&f(E.volume)};return document.addEventListener("visibilitychange",k),()=>document.removeEventListener("visibilitychange",k)},[C,f,t,a,y]),o.useEffect(()=>{h.current=e?{enabled:e.settings.enabled,volume:b,type:e.settings.type}:null},[e,e?.settings.enabled,b,e?.settings.type]);const v=o.useRef(null);return o.useEffect(()=>()=>{v.current?.(),v.current=null},[]),o.useEffect(()=>{const k=e?.settings,x=l.current;if(!x)return;const A=k?bs(k):0;if(!k||!k.enabled||A===0){_();return}if(c.current!==k.type){const B=F_(k.type);B&&(c.current=k.type,u(B),d.current=B,_(150,()=>{if(d.current!==B)return;d.current=null,x.src=B,x.load();const E=t.current;if(E&&!E.paused||y()){v.current?.();const D=()=>{x.removeEventListener("canplay",D),v.current===N&&(v.current=null);const $=t.current,L=h.current;($&&!$.paused&&!$.ended||y())&&L?.enabled&&L.volume>0&&f(L.volume)},N=()=>x.removeEventListener("canplay",D);v.current=N,x.addEventListener("canplay",D)}}))}else{const B=t.current,E=!!B&&!B.paused&&!B.ended||y()||a.current==="playing";if(E&&d.current)f(A);else if(E&&x.paused&&x.src)f(A);else if(!x.paused)if(!E)_();else{C();const D=ir(x),N=performance.now(),$=()=>{const L=Math.min(1,(performance.now()-N)/150);try{Vn(x,D+(A-D)*L)}catch{}L<1?p.current=requestAnimationFrame($):p.current=null};p.current=requestAnimationFrame($)}}},[e?.settings,e?.settings.enabled,b,e?.settings.type,C,f,_,t,a,h,y]),o.useEffect(()=>{const k=l.current;if(k)try{k.playbackRate=Math.min(1.25,Math.max(.75,e?.settings.speed??1))}catch{}},[e?.settings.speed]),{noiseAudioRef:l,activeNoiseUrl:i,noiseSettingsRef:h,cancelNoiseFade:C,fadeInNoise:f,fadeOutNoise:_}}function O_({ttsText:e,playbackRate:t,mainVolume:a,fillRef:r,waveProgressRef:s,setProgress:l,setPlaybackState:i,setStateLocal:u,fadeInNoise:c,fadeOutNoise:d,noiseSettingsRef:h,onDoneRef:p,handleEndRef:m}){const g=o.useRef(null),y=o.useRef(0),C=o.useRef(null),f=o.useRef(0),_=o.useRef(!1);o.useEffect(()=>()=>{f.current++;try{if(C.current&&(cancelAnimationFrame(C.current),C.current=null),_.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}_.current=!1}}catch{}},[]);const b=(k,x=1)=>{try{const A=(k||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(k||"").length);return Math.max(700,Math.round(A*300/Math.max(.25,x)))}catch{return 1200}},w=o.useCallback(k=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof p.current=="function"&&p.current(!1)}catch{}return}const x=window.speechSynthesis,A=++f.current;try{try{x.cancel()}catch{}const B=k??e,E=Array.isArray(B)?B.filter(M=>!!M):[B||""];E.length===0&&E.push("");const D=Math.max(.3,Math.min(3,t));y.current=E.reduce((M,P)=>M+b(P,D||1),0),g.current=performance.now(),l(0),i("playing"),u("playMode");const N=h.current;N?.enabled&&(N?.volume??0)>0&&c(N.volume);const $=()=>{try{const M=g.current||performance.now(),P=performance.now()-M,T=y.current||1200,ee=Math.min(1,P/T);try{r.current&&(r.current.style.left=`${ee*100}%`),s.current&&s.current.style.setProperty("--progress",String(ee))}catch{}ee<1&&(C.current=requestAnimationFrame($))}catch{}},L=()=>{if(A===f.current)try{C.current&&(cancelAnimationFrame(C.current),C.current=null),l(1),i("stopped");try{m.current?.()}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{}},U=M=>{const P=new SpeechSynthesisUtterance(E[M]);try{P.rate=D}catch{}try{P.volume=Math.max(0,Math.min(1,a))}catch{}P.onend=()=>{if(A===f.current){if(M<E.length-1){try{U(M+1)}catch{L()}return}L()}},P.onerror=()=>{L()},P.onstart=()=>{if(!(M>0))try{C.current&&(cancelAnimationFrame(C.current),C.current=null),C.current=requestAnimationFrame($)}catch{}},_.current=!0,x.speak(P)};try{U(0)}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}}catch{try{typeof p.current=="function"&&p.current(!0)}catch{}}},[e,t,a,c,r,s,l,i,u,h,p,m]),v=o.useCallback(()=>{f.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}C.current&&(cancelAnimationFrame(C.current),C.current=null),d(),g.current=null}catch{}i("stopped"),u("active"),l(0)},[d,i,u,l]);return{startTTS:w,stopTTS:v}}const z_=.01,W_=.3;async function H_(e,t,a,r=!1){let s=null;try{const l=window.AudioContext||window.webkitAudioContext;s=new l;const i=await s.decodeAudioData(e.slice(0)),u=i.numberOfChannels>0?i.getChannelData(0):null;if(!u)return null;let c=0;if(r){const g=Math.floor(W_*i.sampleRate),y=Math.min(u.length,g);for(;c<y&&Math.abs(u[c])<=z_;)c++;c>=y&&(c=0)}const d=u.length-c,h=a&&a>0?Math.min(d,Math.floor(a*i.sampleRate)):d,p=Math.max(t,h),m=Math.floor(p/t)||1;return new Array(t).fill(0).map((g,y)=>{const C=c+y*m,f=Math.min(C+m,c+p,u.length);let _=0;for(let b=C;b<f;b++){const w=Math.abs(u[b]);w>_&&(_=w)}return _})}catch{return null}finally{try{s?.close?.()}catch{}}}async function Ic(e,t,a,r=!1){try{const s=await fetch(e);if(s.ok===!1)return null;const l=await s.arrayBuffer();return await H_(l,t,a,r)}catch(s){try{const l=zl(s)}catch{}return null}}const vs=45,V_=74,q_=2;function Sr(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function jr(e){return Sr(e)/45}const U_=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),Oc=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function zc({durationsSec:e,leadInMs:t=0,tailMs:a=0}){const r=Oc(t),s=Oc(a),l=[];let i=0;return e.forEach((u,c)=>{for(const[d,h]of[["lead",r],["sound",U_(u)],["tail",s]])l.push({kind:d,track:c,startMs:i,durMs:h}),i+=h}),{segments:l,totalMs:i,trackCount:e.length}}function Wc(e,t){const a=(t|0)*3;if(t<0||a+2>=e.segments.length)return null;const[r,s,l]=[e.segments[a],e.segments[a+1],e.segments[a+2]];return{lead:r,sound:s,tail:l,totalMs:r.durMs+s.durMs+l.durMs}}function G_(e,t){const a=Wc(e,t.track);if(!a||!(a.totalMs>0))return 0;const r=a[t.kind],s=Math.min(Math.max(0,Number.isFinite(t.elapsedMs)?t.elapsedMs:0),r.durMs);return Math.max(0,Math.min(1,(r.startMs-a.lead.startMs+s)/a.totalMs))}function K_(e,t,a){const r=Math.max(0,Math.floor(a)),s=Wc(e,t);if(!s||r===0||!(s.totalMs>0)||s.lead.durMs===0&&s.tail.durMs===0||!(s.sound.durMs>0))return{lead:0,sound:r,tail:0};const l=Math.round(s.lead.durMs/s.totalMs*r),i=Math.round(s.tail.durMs/s.totalMs*r),u=Math.max(1,r-l-i),c=l+u+i-r;return{lead:Math.max(0,l-Math.ceil(c/2)),sound:u,tail:Math.max(0,i-Math.floor(c/2))}}function Y_({currentTime:e,sources:t,index:a,audioDuration:r}){const s=a||0,l=Array.isArray(t)&&t.length>0?t[s]:void 0,i=l?l.duration||r||0:r||0;if(!(i>0))return 0;const u=Number.isFinite(e)?e:0;return Math.max(0,Math.min(1,u/i))}function Z_({phase:e,phaseElapsedMs:t,currentTime:a,trackDurationSec:r,leadInMs:s,tailMs:l}){const i=zc({durationsSec:[r],leadInMs:s,tailMs:l});return G_(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(a)?a:0)*1e3:t})}function X_({bars:e,trackDurationSec:t,leadInMs:a,tailMs:r}){return K_(zc({durationsSec:[t],leadInMs:a,tailMs:r}),0,e)}function J_(e,t){if(!Array.isArray(e))return null;const a=t||0;return a<e.length-1?a+1:null}function Q_({ended:e,completedByEnd:t}){return!!e||!!t}function ex(e){return e.map((t,a)=>({src:t.src,label:String(a+1),color:void 0,duration:t.duration||0}))}function tx(e){return e.reduce((t,a)=>t+(a.duration||0),0)}function nx(e,t,a){const r=Array.isArray(e)?e:e?[e]:[],s=[];for(const l of r)if(l){if(typeof l=="object"&&l!==null&&"src"in l&&l.src){const i=l;s.push({code:i.code??null,src:i.src});continue}if(typeof l=="string"&&(l.startsWith("http")||l.includes("/"))){s.push({code:null,src:l});continue}if(typeof l=="string"||typeof l=="number"){const i=String(l),u=a(i,t);u&&s.push({code:i,resolvedPath:u})}}return s}function ax(e,t){if(!t||e.readyState<1)return!0;const a=e.currentSrc||e.src;return a?Hc(a)!==Hc(t):!0}function Hc(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const Vc=4,rx=jr(Vc/vs);function ox(e){const{src:t,segments:a,progress:r=0,waveProgressRef:s,noiseSrc:l,noiseRatio:i=0,noiseSpeed:u=1,totalDuration:c=0,mainVolume:d=1,onReadyChange:h,showSoundWaveForm:p=!0,leadInMs:m=0,tailMs:g=0,trackDurationSec:y=0}=e,C=o.useRef(null),f=o.useRef(null),[_,b]=o.useState(null),[w,v]=o.useState(!1),[k,x]=o.useState(null),[A,B]=o.useState(2),[E,D]=o.useState(0),[N,$]=o.useState(null),[L,U]=o.useState(!1),[M,P]=o.useState(!1),T=3,ee=3,te=1,I=300,Y=o.useRef(0),R=o.useCallback(()=>{const be=C.current,me=f&&f.current?f.current:be?be.closest(".audio-player__wave"):null,ke=me?me.getBoundingClientRect():be?be.getBoundingClientRect():null,Le=ke?ke.width:0,Me=ke?Math.max(100,ke.width):320,le=ke?ke.height:0,ve=Math.max(te,Math.min(I,Math.floor((Me+ee)/(T+ee)))),$e=ve*T,Ae=Math.max(0,ve-1),Ie=Math.max(0,Ae>0?(Me-$e)/Ae:ee);return{bars:ve,gap:Ie,height:le,width:Le}},[]),q=o.useRef(void 0),Z=o.useRef(null),z=o.useCallback(async(be,me,{quiet:ke=!1}={})=>{const Le=++Y.current,Me=()=>Y.current===Le;try{if(ke||v(!1),q.current=be,!be){Me()&&b(null);return}let le=me;if(!le)try{for(let Ae=0;Ae<4&&!(C.current||f.current);Ae++)await new Promise(Ie=>requestAnimationFrame(Ie));await new Promise(Ae=>requestAnimationFrame(Ae));const $e=R();$e.height>0&&D($e.height),le=$e.bars,B($e.gap)}catch{le=120}Z.current=le;const ve=await Ic(be,le);if(!Me())return;if(!ve){b(null),v(!1);return}b(ve),x(le),v(!0)}catch{if(!Me())return;b(null),v(!1)}},[v,b,D,B,x,R]);o.useEffect(()=>{const be=f.current;if(!be||typeof ResizeObserver>"u")return;let me=null;const ke=new ResizeObserver(()=>{me!==null&&cancelAnimationFrame(me),me=requestAnimationFrame(()=>{me=null;try{const Le=R();if(Le.width<=0||(Le.height>0&&D(Le.height),Z.current===null||Le.bars===Z.current))return;const Me=q.current;B(Le.gap),Me?z(Me,Le.bars,{quiet:!0}).catch(()=>{}):Z.current=Le.bars}catch{}})});return ke.observe(be),()=>{ke.disconnect(),me!==null&&cancelAnimationFrame(me)}},[R,z]),o.useEffect(()=>{const be=a&&a[0]&&a[0].src||t||a&&a.length===1&&a[0]&&a[0].src;z(typeof be=="string"?be:void 0).catch(()=>{}),P(!1)},[t,a,z]),o.useEffect(()=>{let be=!1;if(U(!1),$(null),!l||!k)return;const me=c>0?c*(u||1):void 0;return Ic(l,k,me,!0).then(ke=>{be||($(ke),ke||U(!0))}).catch(()=>{be||($(null),U(!0))}),()=>{be=!0}},[l,k,c,u]);const j=Math.max(0,Math.min(1,d)),F=o.useMemo(()=>_&&_.length&&Math.max(..._)||1,[_]),O=k||40,G=o.useMemo(()=>X_({bars:O,trackDurationSec:y,leadInMs:m,tailMs:g}),[O,y,m,g]),ie=o.useMemo(()=>Array.from({length:O}).map((be,me)=>{const ke=me>=G.lead&&me<G.lead+G.sound,Le=G.sound>0&&ke?Math.min(O-1,Math.round((me-G.lead)/G.sound*O)):-1,Me=ke?_&&_[Le]!=null?_[Le]:null:_?0:null,le=Me==null?null:Math.min(1,Me/F*j),ve=le!=null&&E>0&&Sr(le)<=Vc,$e=le==null?.15:ve?0:jr(le),Ae=ve,Ie=O>1?me/(O-1):0;return n.jsx("div",{className:Ae?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":$e,"--i":me,"--mix":Ie}},me)}),[O,_,F,j,E,G]),K={"--progress":String(Math.max(0,Math.min(1,r)))},pe=o.useMemo(()=>N&&N.length&&Math.max(...N.map(be=>Number.isFinite(be)?Math.abs(be):0))||1,[N]),X=j*Math.max(0,i),H=!l||!N||!N.length?1:Math.max(1,X),ne={"--bar-gap":`${A}px`,"--wave-h":`${Sr(H)}px`,"--wave-h1":`${vs}px`},V=w&&(l?!!N||L:!0);o.useEffect(()=>{V&&P(!0)},[V]);const W=M?w:V;o.useEffect(()=>{h?.(W)},[W,h]);const oe=k||40,xe=o.useMemo(()=>Array.from({length:oe}).map((be,me)=>{const ke=N&&N[me]!=null?N[me]:null,Le=ke==null?0:Math.abs(ke)/pe*X,Me=Math.max(rx,jr(Le)),le=oe>1?me/(oe-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":Me,"--i":me,"--mix":le}},me)}),[oe,N,pe,X,E]);return n.jsxs("div",{className:"audio-player__wave",ref:f,style:ne,children:[l&&n.jsx("div",{className:`audio-player__wave-noise ${V?"is-ready":""}`,"aria-hidden":"true",children:xe}),p&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${W?"is-ready":""}`,ref:C,children:ie}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${W?"is-ready":""}`,ref:s,style:K,children:ie})]})]})}const qc={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function _s(e,t){return new Promise((a,r)=>{const s=document.createElement("audio");let l=!1;const i=()=>{try{s.removeAttribute("src"),s.load()}catch{}},u=()=>{if(l)return;l=!0;const d=isFinite(s.duration)&&s.duration||0;i(),a(d)},c=d=>{l||(l=!0,i(),t.rejectOnError?r(new Error(d)):a(0))};s.addEventListener("loadedmetadata",u),s.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),t.timeoutMs),s.src=e})}const sx=2e3;function Uc(e,t=sx){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.addEventListener("canplay",s,{once:!0}),e.addEventListener("error",s,{once:!0}),setTimeout(s,t)})}function lx({showSoundWaveForm:e,showNoiseWaveForm:t,timeoutMs:a=2500}){const r=o.useRef(!1),s=o.useRef([]),l=o.useCallback(c=>{if(r.current=c,!c||!s.current.length)return;const d=s.current;s.current=[];for(const h of d)h(!0)},[]),i=o.useCallback(()=>{r.current=!1},[]),u=o.useCallback(()=>!e&&!t||r.current?Promise.resolve(!0):new Promise(c=>{const d=p=>{clearTimeout(h),s.current=s.current.filter(m=>m!==d),c(p)},h=setTimeout(()=>d(!0),a);s.current.push(d)}),[e,t,a]);return o.useEffect(()=>()=>{const c=s.current;s.current=[];for(const d of c)d(!1)},[]),{onReadyChange:l,waitForReady:u,markNotReady:i}}function ix(){const e=o.useRef([]),t=o.useCallback(s=>(e.current.push(s),s),[]),a=o.useCallback(s=>{const l=new Set([...s].filter(Boolean));e.current=e.current.filter(i=>{if(l.has(i))return!0;try{URL.revokeObjectURL(i)}catch{}return!1})},[]),r=o.useCallback(()=>{a([])},[a]);return o.useEffect(()=>()=>{for(const s of e.current)try{URL.revokeObjectURL(s)}catch{}e.current=[]},[]),{track:t,keepOnly:a,revokeAll:r}}function ux({offsetY:e=8}={}){const t=o.useRef(null),[a,r]=o.useState(null),s=o.useCallback(()=>r(null),[]),l=o.useCallback(()=>{try{const i=t.current?.getBoundingClientRect();if(!i)return;r({left:i.left,right:i.right,width:i.width,height:i.height,x:i.x,top:i.top+e,bottom:i.bottom+e,y:i.y+e,toJSON:i.toJSON.bind(i)})}catch{}},[e]);return o.useEffect(()=>{if(a)return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[a,s]),{ref:t,rect:a,show:l,hide:s}}function cx(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 dx=400,px=2e3,Gc=5;function hx({audioRef:e,fillRef:t,waveProgressRef:a,sourcesRef:r,currentIndexRef:s,sequencer:l,leadInMs:i=0,tailMs:u=0}){const c=o.useRef(null),d=o.useRef(0),h=o.useRef(null),p=o.useCallback(()=>{c.current!==null&&(cancelAnimationFrame(c.current),c.current=null)},[]),m=o.useCallback(()=>{if(c.current!==null)return;let y=0;const C=()=>{if(zn){const f=typeof performance<"u"&&performance.now?performance.now():Date.now();if(y>0&&f-y>dx){const _=h.current===null||f-h.current>px;if(h.current=f,_&&d.current<Gc){d.current+=1;const b=d.current;let w=null;try{w=typeof document<"u"?document.visibilityState:null}catch{}At(`progress-ticker-slow-frames#${b}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(f-y)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,w==="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.",b>=Gc?`(${b}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${b}\uBC88\uC9F8)`)}}y=f}try{const f=e.current,_=Array.isArray(r.current)?r.current[s.current||0]:void 0,b=!!_&&Number.isFinite(_.duration)&&(_.duration??0)>0,w=b?0:cx(f),v=t.current,k=(i||0)>0||(u||0)>0,x=k&&(l?.positionRef.current?.phase??"sound")!=="sound";if(w===null&&!x)try{v&&v.style.visibility!=="hidden"&&(v.style.visibility="hidden")}catch{}else{const A=b?_.duration:w||0;zn&&x&&!(A>0)&&At("progress-ticker-pad-without-duration","[ihab-core] \uB738\uC774 \uB3C4\uB294\uB370 **\uC18C\uB9AC \uAE38\uC774\uB97C \uBAA8\uB985\uB2C8\uB2E4** \u2014 \uC7AC\uC0DD\uBC14\uAC00 \uB738\uB9CC\uC73C\uB85C \uC5B4\uB9BC\uC7A1\uC544 \uC6C0\uC9C1\uC785\uB2C8\uB2E4.","\uC18C\uB9AC \uAE38\uC774 \uC7AC\uAE30(measureAudioDuration)\uAC00 0 \uC744 \uC92C\uAC70\uB098 `<audio>` \uAC00 \uC544\uC9C1 \uC548 \uC2E4\uB838\uC2B5\uB2C8\uB2E4. \uAE38\uC774\uB97C \uC54C\uAC8C \uB418\uBA74 \uB9C8\uCEE4\uAC00 \uADF8 \uC21C\uAC04 **\uB4A4\uB85C \uBB3C\uB7EC\uB0A9\uB2C8\uB2E4**(\uC5B4\uB9BC\uC740 \uB298 \uCC38\uBCF4\uB2E4 \uD07D\uB2C8\uB2E4). \uC774 \uC904\uC774 \uBCF4\uC774\uBA74 \uADF8 \uC790\uB9AC\uB97C \uC54C\uB824 \uC8FC\uC2ED\uC2DC\uC624 \u2014 \uD3C9\uC18C \uAE38\uC5D0\uC11C\uB294 \uC548 \uB098\uC640\uC57C \uD569\uB2C8\uB2E4.");const B=k?Z_({phase:l?.positionRef.current?.phase??"sound",phaseElapsedMs:l?.positionRef.current?Math.max(0,Date.now()-l.positionRef.current.at):0,currentTime:f&&typeof f.currentTime=="number"?f.currentTime:0,trackDurationSec:A,leadInMs:i||0,tailMs:u||0}):Y_({currentTime:f&&typeof f.currentTime=="number"?f.currentTime:0,sources:r.current,index:s.current,audioDuration:w??0});try{v&&(v.style.visibility&&(v.style.visibility=""),v.style.left=`${B*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(B))}catch{}}}catch{}c.current=requestAnimationFrame(C)};c.current=requestAnimationFrame(C)},[e,t,a,r,s,l,i,u]),g=o.useCallback(y=>{p();try{t.current&&(t.current.style.visibility="",t.current.style.left=`${y*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(y))}catch{}},[p,t,a]);return o.useEffect(()=>p,[p]),{start:m,stop:p,settleTo:g}}function xs({btnLabel:e,soundSrc:t,bucketPath:a,onDone:r,disabled:s=!1,ttsText:l=null,className:i,showSoundWaveForm:u=!0,showNoiseWaveForm:c=!0,leadInMs:d=0,tailMs:h=0}){const{t:p}=_e.useTranslation(),m=e,g=Er(),y=o.useRef(g?.registerAnalyser);o.useEffect(()=>{y.current=g?.registerAnalyser});const C=o.useRef(null),f=o.useRef(null),_=o.useRef(null),b=ix(),w=o.useRef(null),v=o.useRef(!1),k=o.useRef(null),{ref:x,rect:A,show:B,hide:E}=ux();o.useEffect(()=>()=>{y.current?.("main",null),y.current?.("noise",null)},[]);const[D,N]=o.useState(!1),[$,L]=o.useState("idle"),[U,M]=o.useState("stopped"),P=o.useRef("stopped");o.useEffect(()=>{P.current=U},[U]);const[T,ee]=o.useState(0),[te,I]=o.useState("active"),Y=o.useRef(!1);o.useEffect(()=>{if(te!=="playMode"||!Y.current)return;Y.current=!1;const J=typeof document<"u"?document.activeElement:null;if(J&&J!==document.body)return;const ce=_.current?.querySelectorAll("button")[1];try{ce?.focus()}catch{}},[te]);const[R,q]=o.useState(null),[Z,z]=o.useState(null),[j,F]=o.useState(0),[O,G]=o.useState(!1),[ie,K]=o.useState(0),pe=g?.playbackRate??1,X=g?.mainVolume??1,H=g?fs(g.settings):0,ne=g?Pc(g.settings):X,[V,W]=o.useState("idle"),[oe,xe]=o.useState(""),[be]=o.useState("top"),me=o.useRef(null),ke=o.useRef(0),Le=o.useRef(null),Me=o.useRef(!0),le=T_({mountedRef:Me}),ve=o.useRef(null),$e=o.useRef(d),Ae=o.useRef(h);o.useEffect(()=>{$e.current=Math.max(0,d||0)},[d]),o.useEffect(()=>{Ae.current=Math.max(0,h||0)},[h]);const{start:Ie,stop:ze,settleTo:dt}=hx({audioRef:C,fillRef:f,waveProgressRef:Le,sourcesRef:me,currentIndexRef:ke,sequencer:le,leadInMs:d,tailMs:h}),{onReadyChange:st,waitForReady:et,markNotReady:gt}=lx({showSoundWaveForm:u,showNoiseWaveForm:c}),Se=o.useRef(null),Ge=o.useRef(s),we=o.useRef(r),qe=o.useRef(null),Ye=o.useRef(!1),[mt,wt]=o.useState(!1),yt=o.useCallback(J=>{Ye.current=J,wt(J)},[]),Et=o.useRef(null),{activeNoiseUrl:at,noiseSettingsRef:rt,fadeInNoise:Dt,fadeOutNoise:Bt}=I_({noisePlayer:g,audioRef:C,playbackStateRef:P,sequencer:le}),{startTTS:Lt,stopTTS:It}=O_({ttsText:l,playbackRate:pe,mainVolume:ne,fillRef:f,waveProgressRef:Le,setProgress:ee,setPlaybackState:M,setStateLocal:I,fadeInNoise:Dt,fadeOutNoise:Bt,noiseSettingsRef:rt,onDoneRef:we,handleEndRef:Et});o.useEffect(()=>{St.current=It});const xt=J=>{if(typeof window>"u"||!window.speechSynthesis){try{xe(p("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}Lt(J);return}tt("tts"),Lt(J)},lt=Array.isArray(t)?t.filter(Boolean):t?[t]:[],Ct=(!lt||lt.length===0)&&!!l,it=Array.isArray(R)&&R.length>0?R:Array.isArray(Z)&&Z.length>0?Z:null,_t=Math.max(Array.isArray(it)?it.length:0,lt.length);o.useEffect(()=>(Me.current=!0,()=>{Me.current=!1}),[]);const ut=()=>{le.abort()},St=o.useRef(null),ue=o.useRef(null),Te=o.useRef(null),Ne=o.useRef(null);Ne.current||(Ne.current=()=>{Te.current=null;const J=C.current;if(ue.current==="audio"&&J&&(!J.paused||le.isRunning())){ut();try{J.pause()}catch{}Me.current&&(M("paused"),ze(),Bt())}else if(ue.current==="tts")try{St.current?.()}catch{}});const tt=J=>{ue.current=J,Te.current=Ka(Ne.current)},pt=()=>{Te.current?.(),Te.current=null};o.useEffect(()=>()=>{Ne.current&&_r(Ne.current)},[]);const jt=o.useRef(pe);o.useEffect(()=>{jt.current=pe||1},[pe]);const je=o.useCallback(J=>{const ce=jt.current||1;try{J.defaultPlaybackRate=ce}catch{}try{J.playbackRate=ce}catch{}},[]),nt=o.useCallback((J,ce)=>{if(!ax(J,ce)){try{J.currentTime=0}catch{}je(J);return}J.src=ce,je(J),J.load(),je(J)},[je]),ae=o.useCallback(()=>{qe.current&&(clearTimeout(qe.current),qe.current=null),W("idle")},[]),ye=o.useCallback(async(J,ce=3,De=50,Ve=0)=>{ae();const Xe=le.generation(),Je=!!J&&J.currentTime>0&&!J.ended,ct=Math.max(0,$e.current-Math.max(0,Ve));if(ct>0&&!Je){tt("audio"),Ie(),M("playing");const ft=rt.current;if(ft?.enabled&&(ft.volume??0)>0)try{Dt(ft.volume)}catch{}if(!await le.waitPad(ct,"lead",Ve)||!Me.current||!le.isCurrent(Xe))return!1}le.enterSound();for(let ft=0;ft<ce;ft++){if(!Me.current||!le.isCurrent(Xe))return!1;try{return tt("audio"),await J.play(),!0}catch(ge){if((ge instanceof Error||typeof ge=="object"&&ge&&"name"in ge?ge.name:void 0)==="AbortError"){if(!le.isCurrent(Xe))return!1;await new Promise(S=>setTimeout(S,De));continue}try{xe(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{xe(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[p,Ie,le,Dt,rt,ae]),He=o.useCallback(J=>{const ce=le.generation(),De=Math.max(0,Ae.current-Math.max(0,J));Ie();const Ve=rt.current;if(Ve?.enabled&&(Ve.volume??0)>0)try{Dt(Ve.volume)}catch{}const Xe=()=>{try{ve.current?.()}catch{}};if(De<=0){le.leave(),Xe();return}le.waitPad(De,"tail",J).then(Je=>{le.leave(),Je&&le.isCurrent(ce)&&Xe()}).catch(()=>{})},[le,Ie,Dt,rt]),Ke=o.useCallback(()=>{const J=C.current;if(!J)return;const ce=()=>{M("playing"),I("playMode"),G(!0),Ie();try{oo(),lr(J).then(Je=>{if(Me.current)try{y.current?.("main",Je)}catch{}})}catch{}const Xe=rt.current;Xe?.enabled&&(Xe?.volume??0)>0&&Dt(Xe.volume)},De=()=>{Q_({ended:!!J?.ended,completedByEnd:Ye.current})||(M("paused"),ze(),Bt())},Ve=()=>{const Xe=()=>{try{const Je=me.current,ct=J_(Je,ke.current);if(ct!==null){ke.current=ct,F(ct),G(!0);const ft=Je?.[ct]&&Je[ct].src;if(ft&&J){nt(J,ft),ye(J).catch(()=>{});return}}}catch{}M("stopped"),ee(1);try{if(J)try{J.currentTime=0}catch{}}catch{}ze(),G(!1),Bt();try{!Ge.current&&Et.current&&Et.current()}catch{}};if(ve.current=Xe,Ae.current>0){Ie(),le.waitPad(Ae.current,"tail").then(Je=>{le.leave(),Je&&Xe()}).catch(()=>{});return}Xe()};return J.addEventListener("play",ce),J.addEventListener("pause",De),J.addEventListener("ended",Ve),()=>{try{J.removeEventListener("play",ce),J.removeEventListener("pause",De),J.removeEventListener("ended",Ve),ze()}catch{}}},[Dt,Bt,ye,rt,Ie,ze,le]);o.useEffect(()=>Ke(),[Ke]),o.useEffect(()=>{Ge.current=s},[s]),o.useEffect(()=>{we.current=r},[r]),o.useEffect(()=>{if(s||te!=="active")return;const J=k.current;if(!J)return;let ce=null;const De=requestAnimationFrame(()=>{try{const Ve=J.getTotalLength();if(!Ve)return;const Xe=Ve*.2;J.style.strokeDasharray=`${Ve-Xe} ${Xe}`;const Je="triFlow_"+Math.random().toString(36).slice(2);ce=document.createElement("style"),ce.textContent=`@keyframes ${Je}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${Ve}}}`,document.head.appendChild(ce),J.style.animation=`${Je} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(De),ce?.remove()}},[te,s]),o.useEffect(()=>{me.current=R},[R]),o.useEffect(()=>{ke.current=j},[j]),o.useEffect(()=>{const J=_.current,ce=w.current;if(!J||!ce)return;let De=null;const Ve=32,Xe=60,Je=()=>{try{const ft=Array.from(J.querySelectorAll(":scope > .button"));let ge=0;ft.forEach(We=>{if(We===ce)return;const he=We.getBoundingClientRect();ge+=he.width});const S=J.getBoundingClientRect().width,Q=Math.max(0,Math.floor(S-ge-8)),Ce=_t;if(!Ce||Q<=0){Array.from(ce.children).forEach(We=>{try{We.style.width=""}catch{}});return}let Re=Math.floor(Q/Ce);Re>Xe&&(Re=Xe),Re<Ve&&(Re=Math.max(Ve,Math.floor(Q/Ce))),Array.from(ce.querySelectorAll(".button")).forEach(We=>{try{We.style.width=`${Re}px`}catch{}})}catch{}},ct=requestAnimationFrame(Je);try{De=new ResizeObserver(()=>{requestAnimationFrame(Je)}),De.observe(J),De.observe(ce),window.addEventListener("resize",Je)}catch{}return()=>{try{cancelAnimationFrame(ct)}catch{}try{De&&(De.disconnect(),De=null)}catch{}try{window.removeEventListener("resize",Je)}catch{}}},[R,Z,_t]),o.useEffect(()=>()=>{try{Se.current&&(clearTimeout(Se.current),Se.current=null),qe.current&&(clearTimeout(qe.current),qe.current=null)}catch{}},[]);const vt=(J,ce)=>{q(J),K(ce),gt(),z(ex(J)),me.current=J},Ue=()=>{I("playMode"),F(0),G(!0)},ht=async(J,ce)=>{yt(!1),v.current=!1,nt(J,ce),await Uc(J),await et()!==!1&&(N(!1),Ue(),await ye(J))},cn=async(J,ce=!1)=>{const De=C.current;N(!0),L("measuring_duration");try{const Ve=await _s(J,{timeoutMs:1e4,rejectOnError:!0});vt([{src:J,objectUrl:null,duration:Ve}],Ve),L("ready"),ce&&De&&await ht(De,J)}finally{v.current=!1,N(!1)}},dn=async(J,ce=!1)=>{const De=C.current;N(!0),L("measuring_duration");try{const Ve=await Promise.all(J.map(Je=>_s(Je,{timeoutMs:1e4})));if(!Me.current)return;const Xe=J.map((Je,ct)=>({src:Je,objectUrl:null,duration:Ve[ct]||0}));vt(Xe,tx(Xe)),L("ready"),ce&&De&&Xe.length>0&&await ht(De,Xe[0].src)}finally{v.current=!1,N(!1)}},zt=async(J=!1,ce=!0)=>{const De=C.current,Ve=t?Array.isArray(t)?t:[t]:[];if(!Ve||Ve.length===0||!Ve.some(Boolean))return!1;if(v.current)return null;v.current=!0,ce&&N(!0),L("resolving");try{const Xe=nx(t,a,kl),Je=[];let ct=0;for(const ft of Xe){let ge=ft.src??null,S=null;if(!ge&&ft.resolvedPath){try{L("getting_signed_url"),ge=await Al(ft.resolvedPath)}catch{ge=null}if(!Me.current)return!1;if(!ge)try{L("downloading");const Ce=await Nl(ft.resolvedPath);if(!Me.current)return!1;if(Ce){const Re=Ce instanceof Blob?Ce:new Blob([Ce]);S=b.track(URL.createObjectURL(Re)),ge=S}}catch{L("error");try{xe(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),I("active")}catch{}}}if(!ge)continue;let Q=0;try{L("measuring_duration"),Q=await _s(ge,{timeoutMs:3e3})}catch{Q=0}if(!Me.current){if(S)try{URL.revokeObjectURL(S)}catch{}for(const Ce of Je)if(Ce.objectUrl)try{URL.revokeObjectURL(Ce.objectUrl)}catch{}return!1}ct+=Q||0,Je.push({...ft,src:ge,objectUrl:S,duration:Q})}if(vt(Je,ct),Je.length>0&&J&&De){const ft=Je[0];yt(!1);try{b.keepOnly(Je.map(ge=>ge.objectUrl))}catch{}if(L("ready"),v.current=!1,ft.src&&De)try{if(nt(De,ft.src),await Uc(De),await et()===!1)return!1;ce&&N(!1),Ue(),De&&await ye(De)}catch{ce&&N(!1)}else ce&&N(!1);I("playMode"),F(0),G(!0)}return Je.length>0}finally{v.current=!1,ce&&N(!1),L(Xe=>Xe==="ready"?"ready":"idle")}},qt=async J=>{const ce=le.isRunning();if(J.paused&&!ce){if(Ye.current){await Nt();return}const De=le.resume();if(De){if(M("playing"),De.phase==="tail"){He(De.elapsed);return}await ye(J,3,50,De.elapsed);return}await ye(J),M("playing")}else le.pause(),ut(),J.pause(),M("paused"),ce&&(ze(),Bt())},Ht=async()=>{const J=C.current;if(!(!J&&!Ct)){if(Ct){const ce=window.speechSynthesis;if(te==="active"){const De=ja(),Ve=Array.isArray(l)?l.filter(Boolean):l?[l]:[];if(De&&Ve.length>0){if(v.current)return;I("load"),N(!0),L("synthesizing"),v.current=!0;try{const Xe=await Promise.all(Ve.map(Je=>Promise.resolve(De(Je))));Xe.length>1?await dn(Xe,!0):await cn(Xe[0],!0)}catch{v.current=!1,N(!1),I("active"),xt(Ve.length>0?Ve:void 0)}return}xt(Ve.length>0?Ve:void 0);return}if(te==="playMode"){const De=!!ce&&(ce.speaking||ce.paused)&&!(J&&(J.currentSrc||J.getAttribute("src")));if(J&&!De){await qt(J);return}try{if(ce&&ce.paused)try{tt("tts"),ce.resume(),M("playing")}catch{}else try{ce.pause(),M("paused")}catch{}}catch{}}return}if(te==="active"){if(s&&Array.isArray(me.current)&&me.current.length>0){const De=me.current[0];try{if(De.src&&J)try{nt(J,De.src),Ue(),J&&await ye(J)}catch{}Ue();return}catch{}}I("load");let ce;try{ce=await zt(!0)}catch{ce=!1}if(ce===!1&&Me.current){try{xe(p("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}I("active")}return}if(te!=="load"&&(te==="playMode"||te==="active"))try{J&&await qt(J)}catch(ce){(ce instanceof Error||typeof ce=="object"&&ce&&"name"in ce)&&ce.name}}},Nt=async()=>{const J=C.current;if(J)try{const ce=me.current;if(Array.isArray(ce)&&ce.length>1){await gn(0);return}yt(!1);try{J.currentTime=0}catch{}J&&await ye(J),M("playing"),I("playMode")}catch{}},An=()=>{ut(),pt(),St.current?.();const J=C.current;try{if(J){try{J.pause()}catch{}try{J.currentTime=0}catch{}}}catch{}Bt(),M("stopped"),I("active"),ee(0),G(!1)},an=async(J,{sameSegment:ce=!1}={})=>{ut();const De=le.generation(),Ve=C.current,Xe=me.current?.[J]?.src;try{if(yt(!1),F(J),G(!0),ke.current=J,!Xe||!Ve||(ce||gt(),nt(Ve,Xe),!ce&&await et()===!1)||!le.isCurrent(De)||(await ye(Ve),!le.isCurrent(De)))return;M("playing"),I("playMode")}catch{}},$t=async()=>{const J=me.current,ce=ke.current||0;if(!J||ce<=0){await Nt();return}await an(ce-1)},Pt=async()=>{const J=me.current,ce=ke.current||0;if(!J||ce>=J.length-1){An();return}await an(ce+1)},Ut=()=>{if(Ye.current)return;const J=200,ce=340;yt(!0),ut(),pt();try{ee(1)}catch{}dt(1);try{W("hold")}catch{}try{const De=C.current,Ve=Ct&&!!De?.src;if(!Ct||Ve){if(De){De.pause();try{De.currentTime=0}catch{}}}else It();Bt()}catch{}try{M("stopped")}catch{}if(G(!1),!Ge.current)try{qe.current&&(clearTimeout(qe.current),qe.current=null),qe.current=setTimeout(()=>{try{W("out")}catch{}qe.current=setTimeout(()=>{try{typeof we.current=="function"&&we.current(!0)}catch{}try{W("idle")}catch{}qe.current=null},ce)},J)}catch{}};o.useEffect(()=>{Et.current=Ut});const Jt=o.useCallback(()=>xe(""),[]),gn=async J=>{(me.current||[])[J]&&await an(J,{sameSegment:J===ke.current})},Zt=U==="playing",xn=o.useMemo(()=>{if(!Z||Z.length<=1)return Z;const J=Z[j];return J?[J]:Z},[Z,j]),pn=s===!0;o.useEffect(()=>{try{const J=C.current;J&&typeof J.playbackRate=="number"&&je(J)}catch{}},[pe,je]);const Qt=o.useRef({raf:null,timer:null});o.useEffect(()=>{const J=C.current;if(!J)return;const ce=Math.max(0,Math.min(1,ne)),De=Qt.current,Ve=()=>{De.raf!==null&&(cancelAnimationFrame(De.raf),De.raf=null),De.timer!==null&&(clearTimeout(De.timer),De.timer=null)};Ve();const Xe=ir(J);if(J.paused||Math.abs(Xe-ce)<.001||typeof requestAnimationFrame!="function"){try{Vn(J,ce)}catch{}return}const Je=performance.now(),ct=()=>{const ft=Math.min(1,(performance.now()-Je)/150);try{Vn(J,Xe+(ce-Xe)*ft)}catch{}De.raf=ft<1?requestAnimationFrame(ct):null};return De.raf=requestAnimationFrame(ct),De.timer=setTimeout(()=>{Ve();try{Vn(J,ce)}catch{}},200),Ve},[ne]);const Gt=V==="hold",Nn=V==="out",de=te==="playMode"&&!D&&!mt||Gt||Nn,Ee=U!=="stopped"||Gt||Nn,Fe=U==="paused",Ze=Math.max(0,Math.min(100,(T||0)*100)),Oe=Be("audio-player__fill",de?"is-visible":"",Ee?"is-expanded":"",Fe?"is-paused":"",Nn?"is-out":"");return n.jsxs("div",{className:`audio-player ${pn?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof m=="string"?m:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${Zt?"is-playing":""} ${D?"is-loading":""} ${te!=="default"?"is-revealed":""}`,children:[D?n.jsxs("div",{className:"audio-player__loading",role:qc[$]?"status":void 0,"aria-live":qc[$]?"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,te==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:pn,onClick:()=>{Y.current=wr(),E(),Ht()},"aria-label":typeof m=="string"?m:p("training.listen","\uB4E3\uAE30"),onMouseEnter:B,onMouseLeave:E,onFocus:B,onBlur:E,children:n.jsx("span",{ref:x,className:"audio-player__button-triangle-wrap",children:n.jsx("svg",{className:"audio-player__button-triangle",viewBox:"0 0 24 24","aria-hidden":"true",children:n.jsx("path",{ref:k,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,A&&n.jsx(Mn,{anchorRect:A,text:typeof m=="string"&&m?m:p("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${te==="playMode"||Zt?"is-visible":""}`,inert:!(te==="playMode"||Zt)||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:$t,ariaLabel:p("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:te!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:Zt?"pause":"play",onClick:Ht,ariaLabel:p("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":Zt,width:"60px",variant:"transparent-white",disabled:te!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:An,ariaLabel:p("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:te!=="playMode"}),_t>1?n.jsx("div",{ref:w,className:"audio-player__source-buttons",children:Array.from({length:_t}).map((J,ce)=>n.jsx(fe,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(ce+1),onClick:()=>{try{gn(ce)}catch{}},ariaLabel:p("training.sourcePlay",{n:ce+1}),variant:"transparent-white",selected:O&&j===ce,disabled:te!=="playMode"||!(Array.isArray(R)&&R[ce]),showTooltipInfo:!0},ce))}):null,!Array.isArray(R)||R.length<=1?n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:Nt,ariaLabel:p("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:te!=="playMode"}):null,n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:Pt,ariaLabel:p("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:te!=="playMode"}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:Ut,ariaLabel:p("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:te!=="playMode"})]}),n.jsxs("div",{className:"audio-player__slider",children:[n.jsx("div",{className:Oe,ref:f,style:{left:`${Ze}%`},"aria-hidden":"true"}),(u||c)&&n.jsx(ox,{segments:xn,progress:T,totalDuration:ie,waveProgressRef:Le,showSoundWaveForm:u,leadInMs:d,tailMs:h,trackDurationSec:R?.[j]?.duration??0,noiseSrc:c&&g?.settings.enabled&&H>0?at:null,noiseRatio:g?rr(g.settings):0,noiseSpeed:g?.settings.speed??1,mainVolume:X,onReadyChange:st})]})]}),n.jsx("audio",{ref:C,crossOrigin:"anonymous",preload:"auto"})]}),!u&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(ot,{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(va,{message:oe,position:be,onClose:Jt})]})}function Tr(e){const{t}=_e.useTranslation(),{text:a,label:r,anchorRect:s=null,onClose:l,closeOnOutsideClick:i=!0,isMobilePopup:u=!1}=e||{},[c,d]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||"light"}catch{return"light"}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",c)}catch{}},[c]);const{increase:h,decrease:p,canIncrease:m,canDecrease:g,fontSize:y,lineHeight:C}=Oi({storageKey:"tooltip-fontScale"}),f=o.useCallback(()=>d(k=>k==="dark"?"light":"dark"),[]),_=o.useCallback(k=>{try{k.stopPropagation()}catch{}try{typeof l=="function"&&l()}catch{}},[l]),b=Array.isArray(a)?a:typeof a>"u"||a===null?[]:[a],w={fontSize:`${y}px`,lineHeight:`${C}px`,"--tt-line-height":`${C}px`,"--tt-marker-size":"28px"},v=n.jsxs("div",{className:se(`text-box-tooltip__root ${c==="dark"?"is-dark":""}`),children:[n.jsxs("div",{className:se("text-box-tooltip__box"),children:[r&&n.jsx("div",{className:se("text-box-tooltip__label body-2b"),children:r}),n.jsx("div",{className:se("text-box-tooltip__text body-1"),style:w,children:b.map((k,x)=>n.jsxs("div",{className:se("text-box-tooltip__line"),children:[b.length>1?n.jsx("div",{className:se("text-box-tooltip__marker"),children:n.jsx("span",{className:se("text-box-tooltip__line-number button-1"),children:x+1})}):null,n.jsx("span",{className:se("text-box-tooltip__line-text"),children:k})]},x))})]}),n.jsxs("div",{className:se("text-box-tooltip__buttons"),children:[n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"minus",onClick:p,ariaLabel:t("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!g}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"plus",onClick:h,ariaLabel:t("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!m}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:c==="dark"?"moon":"sun-medium",onClick:f,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 s?n.jsx(Bn,{anchorRect:s,className:se(`text-box-tooltip ${c==="dark"?"is-dark":""}`),onClose:l,closeOnOutsideClick:i,isMobilePopup:u,ariaLabel:r||t("tooltip.textbox","\uBCF8\uBB38"),children:v}):n.jsx("div",{className:se(`text-box-tooltip ${c==="dark"?"is-dark":""}`),children:v})}function Kc({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(ot,{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 Yc(e,t,a){const r=o.useRef(t),s=o.useRef(a);o.useEffect(()=>{r.current=t,s.current=a}),o.useEffect(()=>{if(!e||typeof document>"u")return;let l=null,i=10;const u=()=>{l=null;const c=r.current(),d=c?Array.from(c.querySelectorAll(En)).find(h=>!h.closest('[aria-hidden="true"]')):void 0;if(d){try{d.focus()}catch{}if(document.activeElement===d)return}--i>0&&(l=requestAnimationFrame(u))};return l=requestAnimationFrame(u),()=>{l!==null&&cancelAnimationFrame(l);const c=document.activeElement;if(!c||c===document.body||!document.contains(c)||c.closest(".tooltip__content")){const d=s.current();if(d)try{d.focus()}catch{}}}},[e])}function Zc({title:e,children:t,className:a="",state:r="disabled",usePreviewTextBtn:s=!1,onPreviewTextBtn:l,previewText:i=null,useFaded:u,usePlayAllBtn:c=!1,onPlayAll:d,playAllActive:h=!1}){const{t:p}=_e.useTranslation(),m=yn("(max-width: 767px)"),g=`training-step__title h4 ${u&&r==="disabled"?"training-step__title--faded":""} ${a}`.trim(),y=`training-step__title-row training-step__title-row--${r}`.trim(),C=o.useRef(null),[f,_]=o.useState(!1),[b,w]=o.useState(null),[v,k]=o.useState(null);Yc(f&&!!b,()=>{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(".text-box-tooltip__root"))return D[N];return null},()=>C.current?.querySelector("button")??null);const x=o.useRef(l);o.useEffect(()=>{x.current=l});const A=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]),B=o.useCallback(()=>{_(!1),w(null),k(null)},[]);o.useEffect(()=>{if(!f)return;let D;try{typeof x.current=="function"&&(D=x.current())}catch{}if(D===!1){B();return}k(typeof D<"u"&&D!==null?D:null)},[A]);const E=o.useCallback(()=>{let D;try{typeof l=="function"&&(D=l())}catch{}if(D!==!1){if(k(typeof D<"u"&&D!==null?D:i),!C.current){_(N=>!N);return}if(f)_(!1),w(null),k(null);else{const N=C.current.getBoundingClientRect();w(N),_(!0)}}},[l,i,f]);return n.jsxs("div",{className:y,children:[n.jsx("p",{className:g,children:n.jsx("span",{className:"training-step__title-text",children:e??t})}),s||c?n.jsxs("div",{className:"title-controls",children:[n.jsxs("div",{className:"title-buttons",children:[c&&n.jsx(fe,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"play-circle",label:m?void 0:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),ariaLabel:p("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),selected:h,onClick:d,variant:r==="disabled"?"disabled":"default",disabled:r==="disabled"||h,onDisabledClick:h&&r!=="disabled"?()=>{}:void 0}),s&&n.jsx("div",{ref:C,children:n.jsx(fe,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"eye",label:m?void 0:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),onClick:E,className:f?"is-selected":void 0,"aria-expanded":f,"aria-haspopup":"dialog",variant:r==="disabled"?"disabled":"default",disabled:!i&&typeof l!="function"})})]}),f&&n.jsx(Tr,{text:v??i,label:p("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:b,onClose:B,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function ws(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function sa({index:e,stepIndex:t,isLast:a=!1,title:r="",titleProps:s={},children:l,className:i="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:d}){const{t:h}=_e.useTranslation(),[p,m]=o.useState(()=>ws(e,t));o.useEffect(()=>{const x=ws(e,t);if(x!==p){const A=setTimeout(()=>m(x),0);return()=>clearTimeout(A)}},[e,t,p]);const g=o.useCallback((...x)=>{ws(e,t)==="done"||p==="done"||typeof u=="function"&&u(...x)},[e,t,p,u]),[y,C]=o.useState(!1),[f,_]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),b=o.useCallback(x=>{if(!x)return null;try{const A=x;if(typeof x=="object"&&(A.currentTarget||A.target)&&(A.nativeEvent||A.type)){const D=A.currentTarget??A.target;if(D&&typeof D.getBoundingClientRect=="function")return D.getBoundingClientRect()}if(x instanceof DOMRect)return x;const B=x;if(B&&typeof B.getBoundingClientRect=="function")return B.getBoundingClientRect();const E=x?.current;return E&&typeof E.getBoundingClientRect=="function"?E.getBoundingClientRect():null}catch{return null}},[]),w=o.useCallback((x,{text:A="",label:B="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:E=!1,alignX:D="center",alignY:N="top"}={})=>{const $=b(x);_({text:A,label:B,anchorRect:$,backdrop:E,alignX:D,alignY:N}),C(!0)},[b]),v=o.useCallback(()=>{C(!1),_(x=>({...x,anchorRect:null}))},[]),k=o.Children.map(l,x=>{if(o.isValidElement(x)){const A=x;if(typeof A.type=="string")return A;const B=A.props??{},E=typeof B.onDone=="function"?B.onDone:g,D=typeof B.disabled=="boolean";let N=p==="disabled";return D&&(N=!!B.disabled),o.cloneElement(A,{onDone:E,disabled:N,showTooltip:w,hideTooltip:v})}return x});return n.jsxs("div",{className:`training-step training-step--${p} ${a?"training-step--last":""} ${i}`,"aria-current":p==="active",children:[n.jsx(Kc,{state:p}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(Zc,{state:p,title:r,...s,useFaded:c}),p==="disabled"&&d&&typeof e=="number"&&typeof t=="number"&&e===t+1&&n.jsx("p",{className:"training-step__locked-hint caption-1",role:"status",children:d}),k]}),y?n.jsx(Bn,{anchorRect:f.anchorRect,backdrop:f.backdrop,onClose:v,ariaLabel:h("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(Tr,{text:f.text,onClose:v})}):null]})}function Xc({context:e,state:t="disabled",theme:a="light"}){const{t:r}=_e.useTranslation(),[s,l]=o.useState("disabled"),[i,u]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||a}catch{return a}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",i)}catch{}},[i]);const c=()=>u(L=>L==="dark"?"light":"dark"),{increase:d,decrease:h,canIncrease:p,canDecrease:m,fontSize:g,lineHeight:y}=Oi({storageKey:"textbox_fontScale"}),[C,f]=o.useState(""),_=o.useRef(null),b=o.useRef(!1),w=o.useCallback(()=>{b.current=wr()&&!!_.current&&_.current.contains(document.activeElement),l("active")},[]),v=o.useCallback(()=>f(""),[]),k=L=>{try{f(L)}catch{}},x=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(t!=="disabled"){const L=setTimeout(()=>l(t),0);return()=>clearTimeout(L)}},[t]);const A=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[B,E]=o.useState(A);B!==A&&(E(A),l("disabled"));const D=t==="disabled"?s:t,N=D==="disabled"?"training-text-box--disabled":D==="active"?"training-text-box--active":D==="done"?"training-text-box--done":"",$=o.useMemo(()=>({fontSize:`${g}px`,lineHeight:`${y}px`}),[g,y]);return o.useEffect(()=>{if(D==="disabled"||!b.current)return;b.current=!1;const L=document.activeElement;L&&L!==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:w,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:$,children:A})}),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:h,onDisabledClick:()=>k(r("training.fontSizeMin","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.")),ariaLabel:r("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),icon:"minus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!m,useBorder:!1,showTooltipInfo:!0,...!x&&{width:"60px"}}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:d,onDisabledClick:()=>k(r("training.fontSizeMax","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.")),ariaLabel:r("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),icon:"plus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!p,useBorder:!1,showTooltipInfo:!0,...!x&&{width:"60px"}}),n.jsx(fe,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:i==="dark"?"moon":"sun-medium",onClick:c,ariaLabel:r("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:i==="dark"?"transparent-white":"transparent-gray"})]}),n.jsx(va,{message:C,position:"top",onClose:v})]})}function la(e){return e==="active"||e==="done"}function Bs({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,useTitleFaded:l,onDone:i,onChange:u,answer:c,wrongAnswers:d,choices:h,multiSelect:p=!1,correctCount:m=0,useDisabledCovered:g=!1,choiceIcons:y,shuffleChoices:C=!0}){const{t:f}=_e.useTranslation(),_=s??f("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),b=typeof e=="number"?e:-1,w=typeof t!="number"?"disabled":b<t?"done":b===t?"active":"disabled",v=Array.isArray(h)&&h.length?h:typeof c<"u"?[c].concat(Array.isArray(d)?d:[]):void 0,k=d?d.join("||"):"",x=h?h.join("||"):"",[A,B]=o.useState(()=>Array.isArray(v)?C?Ra(v):v.slice():void 0);o.useEffect(()=>{Array.isArray(v)&&v.length?B(C?Ra(v):v.slice()):B(void 0)},[c,k,x,C]);const[E,D]=o.useState(null),[N,$]=o.useState(()=>new Set);o.useEffect(()=>{D(null),$(new Set)},[x,c,k]);const L=o.useRef(void 0);o.useEffect(()=>{const P=L.current;typeof P=="number"&&typeof t=="number"&&typeof e=="number"&&P>=e&&t<e&&(D(null),$(new Set)),L.current=t},[t,e]);const U=o.useCallback(P=>{if(!la(w))return;const T=A?.[P];if(T==null)return;const ee=T;if(p){const te=new Set(N);te.has(ee)?te.delete(ee):te.add(ee),$(te),typeof u=="function"&&u({selectedValues:[...te],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...te],__ts:Date.now()})}else D(ee),typeof u=="function"&&u({selectedIndex:P,selectedValue:ee,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:P,selectedValue:ee,__ts:Date.now()})},[A,w,p,u,N]),M=`training-step__buttons${Array.isArray(A)&&A.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:_,useTitleFaded:l,children:n.jsx("div",{className:M,children:Array.isArray(A)&&A.length>0?A.map((P,T)=>n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:()=>U(T),ariaLabel:String(P),label:P,useLabel:!0,icon:y?y[String(P)]:void 0,variant:"default",disabled:w==="disabled",selected:p?N.has(P):E===P,useDisabledCovered:g,minWidth:0},String(P))):null})})}function ks({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u,demoSelected:c}){const{t:d}=_e.useTranslation(),h=s??d("training.confirmTitle","\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694."),p=typeof e=="number"?e:-1,m=typeof t!="number"?"disabled":p<t?"done":p===t?"active":"disabled",g=u&&typeof u=="object"?u.sentence||"":typeof u=="string"?u:"",y=u&&typeof u=="object"?u.choices:void 0,[C,f]=o.useState(c??null),_=`${String(g)}\0${JSON.stringify(y??null)}`,[b,w]=o.useState(_);b!==_&&(w(_),c==null&&f(null));const[v,k]=o.useState(c);Object.is(v,c)||(k(c),f(c??null));const x=o.useRef(void 0);o.useEffect(()=>{const D=x.current;typeof D=="number"&&typeof t=="number"&&typeof e=="number"&&D>=e&&t<e&&c==null&&f(null),x.current=t},[t,e,c]);const A=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),la(m)&&typeof l=="function"&&l(N)},[i,m,l]),B=o.useCallback(()=>{la(m)&&(f(!1),A(!1))},[A,m]),E=o.useCallback(()=>{la(m)&&(f(!0),A(!0))},[A,m]);return n.jsxs(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:h,onDone:l,useTitleFaded:!1,children:[n.jsx(Xc,{context:u,state:m}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(y)&&y.length>0?y.slice(0,6).map((D,N)=>n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:()=>{la(m)&&(f(N),A&&A(N))},disabled:m==="disabled",ariaLabel:String(D),label:D,variant:m,selected:C===N},N)):n.jsxs(n.Fragment,{children:[n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:B,disabled:m==="disabled",icon:"x",ariaLabel:d("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),label:d("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!1}),n.jsx(fe,{htmlType:"button",size:56,type:"bar",onClick:E,disabled:m==="disabled",icon:"circle",ariaLabel:d("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),label:d("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!0})]})})]})}function As({index:e,stepIndex:t,isLast:a=!1,title:r,onDone:s,btnLabel:l,soundSrc:i,bucketPath:u,usePreviewTextBtn:c,previewText:d=null,onPreviewTextBtn:h,disabled:p,_pageIndex:m,showSoundWaveForm:g,showNoiseWaveForm:y,leadInMs:C,tailMs:f}){const{t:_}=_e.useTranslation(),b=r??_("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),w=p??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(sa,{index:e,stepIndex:t,isLast:a,title:b,onDone:s,titleProps:{usePreviewTextBtn:c,previewText:d,onPreviewTextBtn:h},children:n.jsx(xs,{soundSrc:i,ttsText:i?null:d??b,bucketPath:u,btnLabel:l||_("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:w,className:"training-step__listen-sticky",showSoundWaveForm:g,showNoiseWaveForm:y,leadInMs:C,tailMs:f},`audio-p${m??0}-s${e}`)})}const mx=[];function Ns({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=mx}){const{t:c}=_e.useTranslation(),d=s??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),h=z=>typeof z=="string"?z:z&&(z.context||z.sentence||z.question||"")||"",[p,m]=o.useState(Array.isArray(u)?u:[]),[g,y]=o.useState(()=>(p||[]).map((z,j)=>({id:j,text:h(z)}))),C=o.useMemo(()=>typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled",[t,e]),f=C!=="disabled",_=o.useRef(void 0),b=o.useRef(void 0);o.useEffect(()=>{if(_.current===u)return;_.current=u;const z=Array.isArray(u)?u:[];m(z);const j=(F=>{const O=(F||[]).map((pe,X)=>({id:X,text:h(pe)}));if(O.length<=1)return O;const G=(pe,X)=>{if(pe.length!==X.length)return!1;for(let H=0;H<pe.length;H++)if(pe[H].text!==X[H].text)return!1;return!0};let ie=Ra(O),K=0;for(;G(ie,O)&&K<20;)ie=Ra(O),K+=1;return ie})(z);y(j);try{if(typeof i=="function"){const F=j.filter((O,G)=>O.text===h(z[G])).length;i({shuffled:j,score:F,total:(z||[]).length,initial:!0,__ts:Date.now()})}if(typeof l=="function"&&C==="active"){const F=j.filter((O,G)=>O.text===h(z[G])).length;b.current=u,l({shuffled:j,score:F,total:(z||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(C!=="active"||b.current===u||(b.current=u,typeof l!="function"))return;const z=Array.isArray(u)?u:[],j=g.filter((F,O)=>F.text===h(z[O])).length;l({shuffled:g,score:j,total:z.length,initial:!0,__ts:Date.now()})},[C,u]);const w=(z,j)=>{const F=[...g],O=z+j;if(O<0||O>=F.length)return;const G=F[O];F[O]=F[z],F[z]=G,ee(F);try{if(typeof l=="function"&&C==="active"){const ie=F.filter((K,pe)=>K.text===h(p[pe])).length;l({shuffled:F,score:ie,total:(p||[]).length,__ts:Date.now()})}}catch{}},[v,k]=o.useState(null),x=o.useRef(null),A=o.useRef(null),B=o.useRef(null),E=o.useRef(null),D=o.useRef(null),N=o.useRef({x:0,y:0}),$=o.useRef(null),L=o.useRef({dx:0,dy:0}),U=()=>{if($.current!==null)return;const z=()=>{if(!x.current){$.current=null;return}$.current=requestAnimationFrame(z);const j=N.current,F=L.current||{dx:0,dy:0};x.current&&(x.current.style.transform=`translate3d(${j.x-F.dx}px, ${j.y-F.dy}px, 0)`)};$.current=requestAnimationFrame(z)},M=o.useRef(new Map),P=o.useRef(new Map),T=()=>{const z=new Map;return M.current.forEach((j,F)=>{j&&j.getBoundingClientRect&&z.set(F,j.getBoundingClientRect())}),z},ee=z=>{const j=T();y(z);try{if(typeof i=="function"){const F=z.filter((O,G)=>O.text===h(p[G])).length;i({shuffled:z,score:F,total:(p||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const F=T();z.forEach(O=>{const G=j.get(O.id),ie=F.get(O.id),K=M.current.get(O.id);if(!K||!G||!ie)return;const pe=G.top-ie.top;pe&&(K.style.transition="none",K.style.transform=`translateY(${pe}px)`,requestAnimationFrame(()=>{K.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",K.style.transform="";const X=()=>{K.style.transition="",K.removeEventListener("transitionend",X)};K.addEventListener("transitionend",X)}))})})},te=(z,j)=>{try{try{j.dataTransfer?.setData("text/plain",String(z))}catch{}try{j.dataTransfer&&(j.dataTransfer.effectAllowed="move")}catch{}try{const F=document.createElement("div");F.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(F),j.dataTransfer?.setDragImage(F,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(F)}catch{}})}catch{}}catch{}k(z);try{const F=g[z],O=document.createElement("div");O.className="order-list__dragging-object order-list__dragging-object--visible",O.textContent=F&&F.text?F.text:"",document.body.appendChild(O),x.current=O;const G=M.current.get(F.id);let ie=j.clientX||0,K=j.clientY||0;try{if(G&&G.getBoundingClientRect){const W=G.getBoundingClientRect();ie=W.left+W.width/2,K=W.top+W.height/2}}catch{}const pe=O.getBoundingClientRect(),X=pe.width/2,H=pe.height/2;L.current={dx:X,dy:H},O.style.transition="none",N.current={x:ie,y:K},O.style.transform=`translate3d(${ie-X}px, ${K-H}px, 0)`,requestAnimationFrame(()=>{try{O.style.transition=""}catch{}U()});const ne=W=>{const oe=W;N.current={x:oe.clientX,y:oe.clientY},U()};B.current=ne,document.addEventListener("mousemove",ne);const V=W=>{const oe=W;N.current={x:oe.clientX,y:oe.clientY},U()};A.current=V,document.addEventListener("dragover",V);try{j.dataTransfer?.setData("text/plain",String(z));try{j.dataTransfer?.setData("application/json",JSON.stringify({idx:z}))}catch{}}catch{}}catch{}},I=(z,j)=>{j.preventDefault();try{j.dataTransfer&&(j.dataTransfer.dropEffect="move")}catch{}try{D.current!==null&&(clearTimeout(D.current),D.current=null);const F=j.currentTarget&&j.currentTarget.closest?j.currentTarget.closest(".order-list__item"):null;if(F&&E.current!==F){if(E.current)try{E.current.classList.remove("drag-over")}catch{}try{F.classList.add("drag-over")}catch{}E.current=F}}catch{}},Y=(z,j)=>{j.preventDefault();const F=j.dataTransfer?.getData("text/plain")||"",O=F?parseInt(F,10):v,G=z;if(typeof O!="number"||isNaN(O)||O===G){k(null),Z(),R();return}const ie=Ef(g,O,G);ee(ie),k(null),R();try{if(typeof l=="function"&&C==="active"){const K=ie.filter((pe,X)=>pe.text===h(p[X])).length;l({shuffled:ie,score:K,total:(p||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const K=document.querySelectorAll(".order-list .order-list__item")[G];if(!K)return;const pe=K.querySelector(".order-list__slot")||K;try{pe.classList.add("pulse"),pe.offsetHeight,pe.classList.add("to-dark");const X=()=>{pe.classList.remove("pulse","to-dark"),pe.removeEventListener("transitionend",X)};pe.addEventListener("transitionend",X)}catch{}})}catch{}Z()},R=()=>{if(x.current){try{document.body.removeChild(x.current)}catch{}x.current=null}A.current&&(document.removeEventListener("dragover",A.current),A.current=null),B.current&&(document.removeEventListener("mousemove",B.current),B.current=null),$.current!==null&&(cancelAnimationFrame($.current),$.current=null)},q=()=>{k(null),Z(),R()};o.useEffect(()=>()=>R(),[]);const Z=()=>{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(z=>z.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const z=Math.max(1,(g||[]).length);g.forEach((j,F)=>{const O=P.current.get(j.id);if(!O)return;let G=50;z>1&&(G=Math.round(F/(z-1)*100));try{O.style.setProperty("--marker-pos",G+"%")}catch{}})}catch{}},[g]),o.useEffect(()=>()=>{R(),D.current!==null&&(clearTimeout(D.current),D.current=null)},[]),n.jsx(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:d,children:n.jsx("div",{className:"order-list",children:g.map((z,j)=>{const F=Math.max(1,(g||[]).length),O=F>1?Math.round(j/(F-1)*100):50;return n.jsx("div",{className:"order-list__item",children:n.jsxs("div",{className:"order-list__slot","data-disabled":C==="disabled","aria-disabled":C==="disabled",children:[C!=="disabled"?n.jsx("div",{className:"order-list__marker caption-1",style:{"--marker-pos":O+"%"},ref:G=>{const ie=P.current;G?ie.set(z.id,G):ie.delete(z.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:j+1})}):null,n.jsxs("div",{ref:G=>{const ie=M.current;G?ie.set(z.id,G):ie.delete(z.id)},className:`order-list__draggable ${v===j?"dragging":""}`,"data-disabled":C==="disabled","aria-disabled":C==="disabled",tabIndex:C==="disabled"?-1:0,draggable:f,onDragStart:f?G=>te(j,G):void 0,onDragEnter:f?G=>I(j,G):void 0,onDragOver:f?G=>I(j,G):void 0,onDragLeave:f?()=>{try{D.current!==null&&clearTimeout(D.current),D.current=setTimeout(()=>{try{const G=document.querySelectorAll(".order-list .order-list__item");G&&G[j]&&(G[j].classList.remove("drag-over"),E.current===G[j]&&(E.current=null))}catch{}},80)}catch{}}:void 0,onDrop:f?G=>Y(j,G):void 0,onDragEnd:f?q:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:z.text}),f?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:()=>w(j,-1),ariaLabel:c("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:j===0,useBorder:!1,useDisabledInvisible:!0}),n.jsx(fe,{htmlType:"button",size:32,type:"dot",onClick:()=>w(j,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:j===g.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},z.id)})})})}const Cx=8e3;function fx(e,t){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.then(s,s),setTimeout(s,t)})}function Jc({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=[],selectable:c=!1,hideLabel:d=!1,hideAudio:h=!1,maxCards:p,playAllGapMs:m=0}){const{t:g}=_e.useTranslation(),y=s??g("training.cardInstructions","\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694."),C=o.useMemo(()=>Array.isArray(u)?u:u&&u.items||[],[u]),f=p??3,_=(C||[]).slice(0,f);(C||[]).length>f&&console.warn(`TrainingStepCard: ${C.length} items passed but only ${f} shown`);const b=typeof e=="number"?e:-1,w=typeof t!="number"?"disabled":b<t?"done":b===t?"active":"disabled",[v,k]=o.useState(null),x=o.useRef([]),[A,B]=o.useState(!1),E=o.useRef(null),D=o.useRef(!0);o.useEffect(()=>(D.current=!0,()=>{D.current=!1}),[]);const N=o.useMemo(()=>C.map(T=>T?.id??T?.word??"").join("|"),[C]);o.useEffect(()=>{k(null)},[N]);const $=o.useRef(void 0);o.useEffect(()=>{const T=$.current;typeof T=="number"&&typeof t=="number"&&typeof e=="number"&&T>=e&&t<e&&k(null),$.current=t},[t,e]);const L=o.useCallback((T,ee)=>{if(c)return;const te={item:T,index:ee,__ts:Date.now()};try{typeof i=="function"&&i(te)}catch{}if(w==="active"&&typeof l=="function")try{l(te)}catch{}},[c,i,w,l]),U=o.useRef(m);o.useEffect(()=>{U.current=Math.max(0,m||0)},[m]);const M=o.useCallback(async()=>{if(A||w==="disabled")return;B(!0);let T=!1;const ee=new Promise(te=>{E.current=()=>{T=!0,te()}});try{for(let te=0;te<_.length&&!(!D.current||T);te++){const I=x.current[te];if(!I)continue;await Promise.race([fx(I.play(),Cx),ee]);const Y=Math.max(0,U.current||0);Y>0&&te<_.length-1&&!T&&D.current&&await Promise.race([new Promise(R=>{setTimeout(R,Y)}),ee])}}finally{E.current=null,B(!1)}},[A,w,_.length]),P=o.useCallback((T,ee)=>{if(!la(w))return;k(ee);const te={selectedValue:T.word||T.title||"",selectedIndex:ee,item:T,__ts:Date.now()};try{typeof i=="function"&&i(te)}catch{}if(typeof l=="function")try{l(te)}catch{}},[i,w,l]);return n.jsx(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:y,onDone:l,titleProps:{usePlayAllBtn:!h&&_.length>0,onPlayAll:M,playAllActive:A},children:n.jsx("div",{className:"training-step__cards",onClickCapture:T=>{const ee=E.current;if(!ee)return;const te=T.target;te&&typeof te.closest=="function"&&te.closest(".training-word-card__bottom")&&ee()},children:_.length===0?n.jsx("div",{className:"training-step__empty",children:g("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):_.map((T,ee)=>n.jsx(ns,{ref:te=>{x.current[ee]=te},item:T,disabled:w==="disabled",onPlayDone:()=>L(T,ee),selectable:c,selected:c&&v===ee,onSelect:c?()=>P(T,ee):void 0,flipDelay:ee*120,hideLabel:d,hideAudio:h},T&&T.id||ee))})})}const bx=160;function gx(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 Qc(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"}]}gx(Kt.t.bind(Kt)),Qc(Kt.t.bind(Kt));const Mr="none",yx=.5,vx=1.5,_x=.25;function Es({title:e,valueLabel:t,value:a,min:r,max:s,step:l,tickStep:i,size:u,disabled:c,onChange:d}){return n.jsxs(un,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(Gu,{value:a,onChange:d,min:r,max:s,step:l,size:u,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:c,className:se("noise-settings-tooltip__slider-input")}),n.jsx("div",{className:se(Be("noise-settings-tooltip__value","button-1",c?"noise-settings-tooltip__value--disabled":"")),children:t})]})}function ed({anchorRect:e,onClose:t,hideNoiseRows:a=!1}){const{t:r}=_e.useTranslation(),s=yn("(max-width: 767px)")?40:24,l=Er(),i=rr(l?.settings??oa),u=l?.settings.type??"defaultNoise",c=l?.settings.enabled??!0,d=l?.playbackRate??1,h=l?.mainVolume??1,p=Math.round(h*100),m=o.useCallback(_=>{try{l?.setMainVolume(Math.max(0,Math.min(1,_/100)))}catch{}},[l]),g=o.useCallback(_=>{try{l?.setPlaybackRate(_)}catch{}},[l]),y=o.useCallback(_=>{const b=Math.min(ar,Math.max(0,Math.round(_*10)/10));try{l?.setSettings({noiseRatio:b})}catch{}},[l]),C=o.useCallback(_=>{try{_===Mr?l?.setSettings({enabled:!1}):l?.setSettings({type:_,enabled:!0})}catch{}},[l]),f=[{key:Mr,label:r("training.noise.type.none","\uC5C6\uC74C")},...Qc(r).map(_=>({key:_.value,label:_.label}))];return n.jsx(Bn,{anchorRect:e,offset:12,onClose:t,ariaLabel:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),isMobilePopup:!1,closeOnOutsideClick:!1,header:n.jsxs("div",{className:se("noise-settings-tooltip__header"),children:[n.jsx("span",{children:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815")}),n.jsx(fe,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:r("common.close","\uB2EB\uAE30"),onClick:t})]}),children:n.jsxs(Qa,{className:se("noise-settings-tooltip"),useBorder:!1,labelWidth:72,children:[n.jsx(Es,{title:r("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${p}%`,value:p,min:0,max:100,step:10,size:s,onChange:m}),n.jsx(Es,{title:r("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${d.toFixed(2)}x`,value:d,min:yx,max:vx,step:_x,size:s,onChange:g}),!a&&n.jsxs(n.Fragment,{children:[n.jsx(un,{variant:"custom",label:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(vn,{ariaLabel:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:f,value:c?u:Mr,onChange:C})}),n.jsx(Es,{title:r("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:r("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:ar,step:$c,size:s,disabled:!c,onChange:y})]}),a&&n.jsx("div",{className:se("noise-settings-tooltip__width-ghost"),"aria-hidden":"true",inert:!0,children:n.jsx(un,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(vn,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:f,value:Mr,onChange:()=>{}})})})]})})}function td({useNoiseSettingBtn:e=!1,onSettings:t,onNext:a,onResult:r,stepIndex:s=0,stepCount:l=0,pageIndex:i=0,pageCount:u=1,resultOpen:c=!1,hideNoiseRows:d=!1}){const{t:h}=_e.useTranslation(),[p,m]=o.useState(!1),[g,y]=o.useState(null),[C,f]=o.useState(!1),_=o.useRef(null),b=o.useRef(null),w=Er(),v=u>0,k=v&&i<u-1,x=!v||i>=u-1,A=s===Math.max(0,l);o.useEffect(()=>{e||(m(!1),y(null))},[e]);const B=o.useCallback(()=>{m(!1),y(null)},[]),E=o.useCallback(()=>{if(p){m(!1),y(null);return}const ee=_?.current?.getBoundingClientRect();ee&&y(ee),t?.(),m(!0)},[p,t]),D=o.useCallback(()=>{if(p){m(!1),y(null);return}const ee=b?.current?.getBoundingClientRect();ee&&y(ee),t?.(),m(!0)},[p,t]),N=yn("(max-width: 767px)"),$=o.useRef(null),[L,U]=o.useState(null),M=o.useCallback(()=>{f(ee=>{const te=!ee;return U(te?$.current?.getBoundingClientRect()??null:null),te})},[]),P=o.useCallback(()=>{f(!1),U(null)},[]);o.useEffect(()=>{c&&(f(!1),U(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:h("training.meter.sentence","\uC7AC\uC0DD")}),n.jsx(Xo,{analyser:w?.mainAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.sentence","\uC7AC\uC0DD")})]}),n.jsxs("div",{className:"pp-bottom__meter",children:[n.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.noise","\uC18C\uC74C")}),n.jsx(Xo,{analyser:w?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.noise","\uC18C\uC74C")})]})]});return Yc(e&&p,()=>typeof document<"u"?document.querySelector(".noise-settings-tooltip__header")?.closest(".tooltip__content")??null:null,()=>[_.current,b.current].map(ee=>ee?.querySelector("button")??null).find(ee=>!!ee&&ee.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:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),label:h("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),minWidth:140})})}),n.jsx("div",{className:"pp-bottom__settings--mobile",children:n.jsx("div",{ref:b,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:h("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:$,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:M,selected:C,"aria-expanded":N?C:void 0,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&C&&!N&&n.jsx("div",{className:"pp-bottom__meters",children:T})]}),e&&C&&N&&L&&n.jsx(Bn,{anchorRect:L,onClose:P,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"),children:n.jsx("div",{className:"pp-bottom__meters pp-bottom__meters--floating",children:T})}),n.jsxs("div",{className:"pp-bottom__right",children:[x&&n.jsx(fe,{htmlType:"button",size:56,type:"bar",icon:"check",onClick:typeof r=="function"?r:a,ariaLabel:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),label:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),variant:"main",disabled:!A}),k&&n.jsx(fe,{htmlType:"button",size:56,type:"bar",rightIcon:"chevron-right",align:"right",onClick:a,ariaLabel:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),label:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),variant:"main",disabled:!A})]}),e&&p&&n.jsx(ed,{anchorRect:g,onClose:B,hideNoiseRows:d})]})}function nd({title:e,subtitle:t,desc:a,depth:r,icon:s,wrapperStyle:l,iconTooltip:i,pageIndex:u,pageCount:c,progressMax:d,progressIndex:h,onBack:p,onClose:m}){const{t:g}=_e.useTranslation(),y=yn("(max-width: 767px)"),C=Number.isInteger(h)?h:u||0,f=Number.isInteger(d)?d:c||0,_=p||m,b=Array.isArray(r)?y?r[r.length-1]:r.join(" / "):r,w=typeof e=="string"?e.trim():e,v=typeof t=="string"?t.trim():t,k=!!(w||v),x=k?w||v:g("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),A=b||(w?t:void 0),B=y&&typeof A=="string"&&(A.includes(" \xB7 ")||A.includes(" / "))?A.split(/\s[·/]\s/).pop():A,E=o.useMemo(()=>{const D=l&&typeof l=="object"?{...l}:{};return!("width"in D)&&!("height"in D)&&(D.width="40px",D.height="40px"),D},[l]);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:g("common.back","\uB4A4\uB85C"),onClick:_,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:s?n.jsx(gu,{icon:s,label:e,tooltip:i,wrapperStyle:E}):null}),n.jsxs("div",{className:"pp-title__text",children:[B?n.jsx("span",{className:"pp-title__depth caption-1",children:B}):null,n.jsx("span",{className:`pp-title__title h2${k?"":" pp-title__title--empty"}`,children:x}),a?n.jsx("span",{className:"pp-title__description caption-1",children:a}):null]})]}),n.jsx(Xu,{max:Math.max(0,f??0),index:Math.max(0,C??0)})]})}function xx(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function wx(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 ad=(e,t)=>{if(!t)return t;const a=typeof Kt?.t=="function"?Kt.t(e,{defaultValue:t}):void 0;return typeof a=="string"&&a?a:t};function rd(e,t,a){const r=e,s=r?.title||r?.name||(Array.isArray(t)?t[t.length-1]:void 0)||a||"\uD6C8\uB828",l=Xl().find(u=>u.key===(r?.category_0||r?.category_main_code)),i=l?.subs?.find(u=>u.key===(r?.category_1||r?.category_sub_code));return{title:s,label:r?.title||s,depth:t,icon:l?.icon,wrapperStyle:l?.color?{"--t-item-fg":l.color}:void 0,iconTooltip:[l?ad(`topic.${l.key}`,l.label):void 0,i?ad(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function Ds(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function od(e,t,a){if(!e||typeof e!="object"||Array.isArray(e))return e;const r=e,s=typeof a=="number"&&a>0?a:Date.now();return{...r,...r.shownAt===void 0&&t?{shownAt:t}:{},...r.answeredAt===void 0?{answeredAt:new Date(s).toISOString()}:{}}}function Bx(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function kx({idPrefix:e,trainingData:t,depth:a,fallbackTitle:r="\uD6C8\uB828",pages:s=[],emptyMessage:l,buildResults:i,metaPatch:u}){const c=rd(t,a,r),d=typeof u=="function"?u(c)||{}:u||{},h=t?.id||t?.title||s.length;return{id:`${e}:${h}`,meta:{...c,...d},pages:s,emptyMessage:l,buildResults:i}}function Ax(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return t.context||t.sentence||t.question||""||""}return""}function Nx(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 Ex(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 sd(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function Dx(e,t,a,r){return sd(e,t*a+r)}function Sx({payload:e,selected:t,choices:a=[],correctAnswers:r=[]}){if(e&&typeof e=="object"){const s=e;if(Array.isArray(s.selectedValues))return r.every(l=>s.selectedValues.includes(l))&&s.selectedValues.every(l=>r.includes(l));if(typeof s.correct=="boolean")return s.correct}if(r.length){if(typeof t=="number"&&Array.isArray(a)&&a.length)return r.some(s=>String(s)===String(a[t]));if(typeof t<"u")return r.some(s=>String(s)===String(t))}}function jx(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 ld=o.createContext(null);function Tx(){const e=o.useContext(ld);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function Mx({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,choices:l=[],onDone:i,onChange:u}){const{t:c}=_e.useTranslation(),d=typeof e=="number"?e:-1,h=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",[p,m]=o.useState(()=>l.map(()=>null)),g=JSON.stringify(l),y=l.length;o.useEffect(()=>{m(Array.from({length:y},()=>null))},[g]);const C=o.useRef(void 0);o.useEffect(()=>{const w=C.current;typeof w=="number"&&typeof t=="number"&&typeof e=="number"&&w>=e&&t<e&&m(Array.from({length:y},()=>null)),C.current=t},[t,e,y]);const f=o.useMemo(()=>p.filter(w=>w!==null).length+1,[p]),_=o.useCallback(w=>{if(!la(h))return;const v=p;let k;if(v[w]!=null){const A=v[w];k=v.map(B=>B!==null&&B>=A?null:B)}else k=[...v],k[w]=f;m(k);const x={selectedOrder:k,words:l,__ts:Date.now()};try{typeof u=="function"&&u(x)}catch{}if(v[w]==null&&k.length>0&&k.every(A=>A!==null))try{typeof i=="function"&&i(x)}catch{}},[h,p,f,u,i,l]),b=s??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(sa,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:b,onDone:i,children:n.jsx("div",{className:"training-step__cards",children:l.map((w,v)=>n.jsx(ns,{item:{word:w},disabled:h==="disabled",selectable:!0,selected:p[v]!==null,orderRank:p[v],onSelect:()=>_(v),flipDelay:v*120,hideLabel:!1,hideAudio:!0},`${w}-${v}`))})})}function Lr(e){return null}Lr.__isTrainingPage=!0;function ka(e,t){const a=Tx();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 id({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i}=ka(e,t);return n.jsx(As,{...a,index:r,stepIndex:s,isLast:l,onDone:i})}function ud({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=ka(e,t);return n.jsx(Bs,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function cd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=ka(e,t);return n.jsx(ks,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function dd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=ka(e,t);return n.jsx(Ns,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function pd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=ka(e,t);return n.jsx(Jc,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function Lx({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=ka(e,t);return n.jsx(Mx,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}const hd=3e4,$x=/^(https?:|blob:|data:audio|\/|\.\/)/;function md(e){return typeof e=="string"&&$x.test(e)?e:null}const Rx=e=>typeof e=="string"&&e.trim()!==""?e:null,Ss=Symbol("timed-out");function Px(e,t){if(t<=0)return Promise.resolve(Ss);let a;return Promise.race([Promise.resolve(e),new Promise(r=>{a=setTimeout(()=>r(Ss),t)})]).finally(()=>clearTimeout(a))}function Fx(e){return e?ja()||sr()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function Ix(e,t){const a=[],r=md(t);r&&a.push({kind:"raw",resolve:async()=>r});const s=(e??"").trim();if(!s)return a;for(const[l,i]of[["urlResolver",ja()],["fallbackUrlResolver",sr()]])i&&a.push({kind:l,resolve:async u=>{let c;try{c=await Px(i(s),u)}catch(h){return At(`question-sound-threw-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uB358\uC84C\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`,h),null}return c===Ss?(At(`question-sound-slow-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 ${hd}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):Rx(c)||(At(`question-sound-empty-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uC8FC\uC18C\uB97C \uC548 \uC92C\uB2E4(\uBC1B\uC740 \uAC83: ${JSON.stringify(c)}) \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`),null)}});return a}function Ox(){return Date.now()+hd}const zx=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function Wx(e){At("question-sound-none",`[core] "${e}" \uC758 \uC18C\uB9AC \uC8FC\uC18C\uB97C \uD55C \uC790\uB9AC\uC5D0\uC11C\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uBE0C\uB77C\uC6B0\uC800 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4. configureTTS \uAC00 \uAC78\uB824 \uC788\uB294\uC9C0, \uB9AC\uC878\uBC84\uAC00 \uC8FC\uC18C\uB97C \uC8FC\uB294\uC9C0 \uC704 \uC904\uB4E4\uC744 \uBCF4\uB77C.`)}function $r(...e){for(const t of e)if(typeof t=="string"){const a=t.trim();if(a.length)return a}else{if(typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t)&&t.length)return t.join(", ");if(t&&typeof t=="object"){const a=t,r=[a.text,a.label,a.value];for(const s of r){if(typeof s=="string"&&s.trim().length)return s.trim();if(typeof s=="number"||typeof s=="boolean")return String(s)}}}return null}function Hx(e){return $r(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function Vx(e){return md($r(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function Cd(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=$r(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 fd(e){const{score:t,contextsLength:a,results:r=[],subtitle:s,onReplay:l,onClose:i,inline:u=!1,pending:c=!1}=e||{},{t:d}=_e.useTranslation(),h=o.useId(),p=o.useCallback(()=>!c,[c]);o.useEffect(()=>{const 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 m=o.useCallback(D=>{const N=Cd(D),$=$r(D?.wording,D?.label);return N===!0?{variant:"main",label:$??d("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:N===!1?{variant:"danger",label:$??d("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:$??d("training.result.notJudged","\uBBF8\uD310\uC815")}},[d]),g=a??0,y=t??0,C=o.useMemo(()=>Array.isArray(r)?r:[],[r]),f=o.useRef(null),[_,b]=o.useState(null),w=o.useCallback(()=>{f.current?.(),f.current=null,b(null)},[]);o.useEffect(()=>w,[w]);const v=o.useRef(0),k=(D,N)=>{if(!zn)return;const $=Math.round(performance.now()-v.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${$}ms ${D}`,N??"")},x=o.useRef(0),A=o.useCallback((D,N,$)=>{w();const L=++x.current,U=()=>x.current===L;v.current=zn?performance.now():0,k(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${D}`,{text:N,rawUrl:$}),b(D),f.current=()=>{k("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),x.current++,to()};const M=te=>{k("\uD2BC\uB2E4",te);const I=Ya(te,Y=>{k(`\uB05D\uB0AC\uB2E4 \u2014 ${Y?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:U()}),Y&&U()&&(f.current=null,b(null))});return f.current=()=>{k("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),x.current++,I.stop(),to()},I.done},P=Ix(N,$);k("\uCC28\uB840",P.map(te=>te.kind));const T=P[0]?.kind==="raw",ee=T?M($):Promise.resolve(!1);(async()=>{if(await ee||!U())return;const te=Ox(),I=T?P.slice(1):P;for(let Y=0;Y<I.length;Y++){if(!U())return;k(`${I[Y].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const R=await I[Y].resolve(zx(te,I.length-Y));if(k(`${I[Y].kind} \uAC00 \uB2F5\uD588\uB2E4`,R),!U()||R&&(await M(R)||!U()))return}U()&&(k("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),Wx(N),f.current=()=>{x.current++,to()},k("\uB0AD\uB3C5\uD55C\uB2E4"),$1(N,{onEnd:()=>{U()&&(f.current=null,b(null))}}))})()},[w]),B=o.useMemo(()=>C.map(D=>{const N=D??{},$=Hx(N)||d("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:L,label:U}=m(N),M=Array.isArray(N.corrects)?N.corrects:[],P=M.length?M.join(", "):N.answer!=null&&N.answer!==""?String(N.answer):null,T=typeof N.selectedText=="string"?N.selectedText:null,ee=Cd(N)===!0,te=Vx(N),I=!!te||Fx($);return{problem:$,variant:L,label:U,answer:P,selectedText:T,isCorrect:ee,sound:te,canHear:I}}),[C,m,d]),E=o.useMemo(()=>B.some(D=>D.answer!==null||D.selectedText!==null),[B]);return n.jsx(Pn,{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:h,className:"trp-actions__reason caption-1",role:"status",children:d("training.result.pendingDone","\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsxs("div",{className:"trp-actions",children:[n.jsx(fe,{htmlType:"button",size:56,type:"bar",label:d("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>D(l)}),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?h:void 0})]})]}),children:()=>n.jsxs("div",{className:"trp-result is-on",children:[n.jsxs("header",{className:"trp-result__head",children:[n.jsx("p",{className:"trp-result__eyebrow caption-1",children:d("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")}),n.jsx("h1",{className:"trp-result__title h2",children:d("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.")}),s&&n.jsx("p",{className:"trp-result__subtitle body-3",children:s}),n.jsx("div",{className:"trp-score",children:n.jsxs("div",{className:"trp-score__figure","aria-label":d("training.result.scoreAria",{correct:y,total:g}),children:[n.jsx("span",{className:"trp-score__big",children:y}),n.jsx("span",{className:"trp-score__sep",children:"/"}),n.jsx("span",{className:"trp-score__total",children:g})]})})]}),B.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")})]}),B.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?w():A(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(ln,{variant:D.variant,label:D.label,fill:"soft",minWidth:80})})]},N))]})})]})})}const js=new Set;function qx(e){o.useEffect(()=>{if(!e||js.has(e))return;js.add(e);const t=()=>typeof document>"u"||document.visibilityState!=="hidden";let a=null,r=null,s=0,l=0;const i=()=>{const h=Date.now();a==null&&(a=h),r==null&&(r=h)},u=()=>{r!=null&&(s+=Date.now()-r,r=null)};t()&&i();const c=()=>{if(u(),a==null)return;const h=s-l;if(h<1e3||l===0&&s<5e3)return;const p=Date.now(),m=p-h;l=s,jf({trainingType:e,startedAt:new Date(m).toISOString(),endedAt:new Date(p).toISOString()})},d=()=>{t()?i():c()};return typeof document<"u"&&document.addEventListener("visibilitychange",d),typeof window<"u"&&window.addEventListener("pagehide",c),()=>{typeof document<"u"&&document.removeEventListener("visibilitychange",d),typeof window<"u"&&window.removeEventListener("pagehide",c),c(),js.delete(e)}},[e])}function Rr(e,t){return e&&e.id||`page-${t??0}`}function Pr(e,t){return e&&e.key||`step-${t??0}`}function Fr(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function Ux(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const Gx=300,Kx=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},On=Object.freeze({}),bd=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function Ts(e){const t=e,a=t?.results||t?.answers||[],r=Array.isArray(a)&&a.length>0?a.length:null,s=Array.isArray(a)?a.filter(l=>l?.correct===!0||l?.isCorrect===!0||l?.score===1||l?.heard===!0||l?.judgement===!0).length:null;return{results:a,correct:r!=null?s:null,total:r}}const Yx=e=>n.jsx(fd,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function Zx(e){const{scenario:t,title:a,subTitle:r,depth:s,icon:l,wrapperStyle:i,iconTooltip:u,pageIndex:c,pageCount:d,stepIndex:h,stepCount:p,onBack:m,onComplete:g,onRoundFinished:y,onNext:C,onSettings:f,useNoiseSetting:_=!0,children:b,ariaLabel:w,label:v,buildResults:k,onResult:x,typeKey:A,entryPoint:B,dailyTotal:E,itemRef:D,renderResultPopup:N,noiseOverride:$,hideNoiseRows:L=!1}=e;qx(A&&!bd.has(A)?A:"");const U=o.useRef(0);o.useEffect(()=>{U.current=Date.now()},[]);const{t:M}=_e.useTranslation(),P=x,T=!!t,ee=t?.id||null,te=t?.meta||{},I=Array.isArray(t?.pages)?t.pages:[],Y=Array.isArray(b)||o.isValidElement(b)&&typeof b!="function"?o.Children.toArray(b).filter(o.isValidElement):[],R=Y.length>0,q=de=>de===Lr||de?.__isTrainingPage===!0,Z=R&&Y.some(de=>q(de.type)),z=Z?Y.filter(de=>q(de.type)).map((de,Ee)=>{const Fe=de.props||{};return{id:`children-page-${Ee}`,steps:o.Children.toArray(Fe.children).filter(o.isValidElement),pageTop:Fe.pageTop||Fe.top||null,pageBottom:Fe.pageBottom||Fe.bottom||null}}):[{id:"children-page-0",steps:Y}],j=R&&!T&&typeof b!="function",F=j?Math.max(1,z.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 de=document.body;return de.dataset.ihabTrainingPopupCount=String(Number(de.dataset.ihabTrainingPopupCount||"0")+1),de.classList.add("ihab-training-popup-open"),()=>{const Ee=Number(de.dataset.ihabTrainingPopupCount||"1")-1;Ee>0?de.dataset.ihabTrainingPopupCount=String(Ee):(delete de.dataset.ihabTrainingPopupCount,de.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!(typeof document>"u"||!document.body))return hv()},[]);const[O,G]=o.useState({...oa,enabled:!1}),ie=o.useRef(O);o.useEffect(()=>{ie.current=O},[O]);const K=o.useRef($),pe=o.useRef(!1),X=o.useRef(null);o.useEffect(()=>{let de=!1;const Ee=Fe=>{if(de)return;pe.current=!0;const Ze=Fe?ra({...oa,enabled:!1},Fe):{...oa},Oe=X.current;X.current=null;const J=Oe?ra(Ze,Oe):Ze;ie.current=J,G(J),Oe&&!K.current&&mo(J),pr(J);const ce=K.current;if(ce){const De=typeof ce=="function"?ce(J):ce,Ve=ra(J,De);ie.current=Ve,G(Ve),pr(Ve)}};return Wf().then(Fe=>{if(de){const Ze=X.current;if(X.current=null,Ze&&!K.current){const Oe=Fe?ra({...oa,enabled:!1},Fe):{...oa};mo(ra(Oe,Ze))}return}Ee(Fe)}),()=>{de=!0}},[]);const[H,ne]=o.useState(null),[V,W]=o.useState(null),oe=o.useCallback((de,Ee)=>{de==="main"?ne(Ee):W(Ee)},[]),xe=o.useRef(null),be=o.useRef(null),me=o.useCallback(()=>{be.current!==null&&(clearTimeout(be.current),be.current=null);const de=xe.current;xe.current=null,de&&mo(de)},[]);o.useEffect(()=>{if(typeof window>"u")return;const de=()=>{document.visibilityState==="hidden"&&me()};return window.addEventListener("pagehide",me),document.addEventListener("visibilitychange",de),()=>{window.removeEventListener("pagehide",me),document.removeEventListener("visibilitychange",de),me()}},[me]);const ke=o.useCallback(de=>{const Ee=ra(ie.current,de);if(ie.current=Ee,G(Ee),!pe.current){X.current={...X.current??{},...de},pr(Ee);return}K.current||(xe.current=Ee,be.current!==null&&clearTimeout(be.current),be.current=setTimeout(me,Gx)),pr(Ee)},[me]),Le=O.mainSpeed,Me=O.mainVolume,le=o.useCallback(de=>ke({mainSpeed:de}),[ke]),ve=o.useCallback(de=>ke({mainVolume:de}),[ke]),$e=o.useMemo(()=>({settings:O,setSettings:ke,registerAnalyser:oe,mainAnalyser:H,noiseAnalyser:V,playbackRate:Le,setPlaybackRate:le,mainVolume:Me,setMainVolume:ve}),[O,ke,oe,H,V,Le,le,Me,ve]),Ae=o.useRef(null),[Ie,ze]=o.useState(0),dt=o.useRef([]),[st,et]=o.useState("center"),[gt,Se]=o.useState(!1),Ge=o.useRef(!1),we=o.useRef(null),qe=o.useCallback(de=>{Ge.current||(Ge.current=!0,Se(!0),we.current=setTimeout(()=>{try{de()}catch{Ge.current=!1,Se(!1)}},Kx()?0:bx))},[]);o.useEffect(()=>()=>{we.current&&clearTimeout(we.current)},[]);const Ye=o.useRef(m);o.useEffect(()=>{Ye.current=m});const mt=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{const de=Ae.current,Ee=mt.current;if(yo(de,Ee),de){const Fe=Array.from(de.querySelectorAll(En)).filter(Ze=>!Ze.closest('[aria-hidden="true"]'))[0];if(Fe)try{Fe.focus()}catch{}}return()=>{const Fe=document.activeElement;if(!Fe||Fe===document.body||de&&de.contains(Fe))try{vo(Ee)?.focus?.()}catch{}}},[]),o.useEffect(()=>Qn(()=>qe(()=>{const de=Ye.current;typeof de=="function"&&de()})),[qe]),bo(Ae,!0);const[wt,yt]=o.useState(!1),Et=o.useRef(!1),[at,rt]=o.useState(null),Dt=o.useRef(0),Bt=o.useRef(0),Lt=()=>{Dt.current+=1,Bt.current+=1,rt(null)},[It,xt]=o.useState(""),[lt,Ct]=o.useState(()=>Fr()),it=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!T&&!j||(Ct(Fr()),Lt())},[T,ee,j]),o.useEffect(()=>{j&&Ct(de=>{const Ee=Math.max(0,Math.min(de.pageIndex,Math.max(0,F-1)));return Ee!==de.pageIndex?{...de,pageIndex:Ee,stepIndex:0}:de})},[j,F]);const _t=j?Math.max(0,Math.min(lt.pageIndex,F-1)):0,ut=j?z[_t]:null,St=j&&ut&&Array.isArray(ut.steps)?ut.steps:[],ue=T?lt.pageIndex:j?_t:typeof c=="number"?c:0,Te=T?I[Math.max(0,Math.min(lt.pageIndex,Math.max(0,I.length-1)))]:null,Ne=T&&Te&&Array.isArray(Te.steps)?Te.steps:[],tt=T?Ne.length:j?St.length:typeof p=="number"?p:0,pt=T||j?Math.max(0,Math.min(lt.stepIndex,Math.max(0,tt))):typeof h=="number"?h:0,jt=T?I.length:j?F:typeof d=="number"?d:0;o.useEffect(()=>{if(!T&&!j)return;const de=T?Rr(Te,ue):ut?.id||`children-page-${ue??0}`,Ee=new Date().toISOString();for(let Fe=0;Fe<=pt;Fe+=1){const Ze=T?Pr(Ne[Fe],Fe):`step-${Fe}`,Oe=ye(de,Ze);ae.current.has(Oe)||ae.current.set(Oe,Ee)}},[T,j,ue,pt,ut?.id]),o.useLayoutEffect(()=>{const de=it.current;if(typeof ue=="number"&&de!==null&&ue!==de&&ue>de)try{xt(M("training.problemNotice",{n:ue+1}))}catch{}it.current=typeof ue=="number"?ue:it.current},[ue,c,M]),o.useLayoutEffect(()=>{const de=Ae.current;if(!de)return;const Ee=()=>de.querySelector(".page-popup__scroll");let Fe=null,Ze=null,Oe=null;const J=Je=>{const ct=Ee();if(!ct)return;const ft=ct.scrollHeight<=ct.clientHeight;if(et(ft?"center":"top"),Je&&!Et.current){Et.current=!0;try{yt(!0)}catch{}try{Ve.disconnect()}catch{}}},ce=()=>{Fe!==null&&cancelAnimationFrame(Fe),Fe=requestAnimationFrame(()=>{Ze!==null&&clearTimeout(Ze),Ze=setTimeout(()=>J(!0),60)})},De=()=>{Oe!==null&&cancelAnimationFrame(Oe),Oe=requestAnimationFrame(()=>J(!1))};ce(),window.addEventListener("resize",De);const Ve=new MutationObserver(ce);Ve.observe(de,{childList:!0,subtree:!0,attributes:!0});const Xe=setTimeout(()=>{Et.current||J(!0)},400);return()=>{window.removeEventListener("resize",De),Fe!==null&&cancelAnimationFrame(Fe),Ze!==null&&clearTimeout(Ze),Oe!==null&&cancelAnimationFrame(Oe),clearTimeout(Xe);try{Ve.disconnect()}catch{}}},[Ae]);const je=o.useCallback(de=>{Ae.current&&(Ae.current._childOnNext=de)},[]),nt=o.useCallback(de=>{Ae.current&&(Ae.current._childOnResult=de)},[]),ae=o.useRef(new Map),ye=(de,Ee)=>`${de}\0${Ee}`,He=o.useCallback((de,Ee,Fe)=>{Ct(Ze=>{const Oe=Ze.answersByPage[de]||{},J=Oe[Ee],ce=Ds(Fe),De=Ds(J);if(J&&De>ce)return Ze;const Ve=od(Fe,ae.current.get(ye(de,Ee)),ce);return{...Ze,answersByPage:{...Ze.answersByPage,[de]:{...Oe,[Ee]:Ve}}}})},[Ct]),Ke=o.useCallback((de,Ee,Fe)=>{const Ze=Rr(Te,ue),Oe=Pr(de,Ee);He(Ze,Oe,Fe)},[Te,ue,He]),vt=o.useCallback((de,Ee,Fe)=>{const Ze=Rr(Te,ue),Oe=Pr(de,Ee);He(Ze,Oe,Fe),!Fe?.allowChange&&de?.autoAdvance!==!1&&Ct(J=>({...J,stepIndex:Math.max(J.stepIndex,Ee+1)}))},[Te,ue,He,Ct]),Ue=o.useCallback((de,Ee)=>{const Fe=ut?.id||`children-page-${ue??0}`,Ze=typeof Ee=="number"?Ee:pt??0,Oe=`step-${Ze}`;He(Fe,Oe,de),de?.allowChange||Ct(J=>({...J,stepIndex:Math.max(J.stepIndex,Ze+1)}))},[ut,ue,pt,He,Ct]),ht=o.useCallback((de,Ee)=>{const Fe=ut?.id||`children-page-${ue??0}`,Ze=`step-${typeof Ee=="number"?Ee:pt??0}`;He(Fe,Ze,de)},[ut,ue,pt,He]),cn=j?{currentPageIndex:ue??0,currentStepIndex:pt??0,totalStepsInPage:St.length,handleStepDone:Ue,handleStepChange:ht}:null,dn=async()=>{const de=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:I,flowState:lt,answersByPage:lt.answersByPage})):null;return typeof P=="function"&&await Promise.resolve(P(de))||de},zt=async()=>{const de=ut?.id||`children-page-${lt.pageIndex}`,Ee=lt.answersByPage[de]||{},Fe=Z?(()=>{const J={};let ce=0;return z.forEach(De=>{const Ve=lt.answersByPage[De.id]||{},Xe=Array.isArray(De.steps)?De.steps.length:0;for(let Je=0;Je<Xe;Je+=1){const ct=Ve[`step-${Je}`];typeof ct<"u"&&(J[`step-${ce+Je}`]=ct)}ce+=Xe}),J})():Ee;if(typeof k=="function"){const J=await Promise.resolve(k(Fe,{pageAnswers:Ee,answersByPage:lt.answersByPage,pages:z,currentPageId:de}));return typeof P=="function"&&await Promise.resolve(P(J))||J}const Ze=Object.entries(Ee).map(([J,ce],De)=>({index:De,key:J,payload:ce})),Oe={results:Ze,answers:Ze,score:0};return typeof P=="function"&&await Promise.resolve(P(Oe))||Oe},qt=()=>{const de=++Dt.current,Ee=()=>de!==Dt.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 Oe=dn();rt(On);const J=Oe;Promise.resolve(J).then(ce=>{Ee()||rt(ce||{isEmpty:!0})}).catch(ce=>{!Ee()&&rt({isEmpty:!0})});return}if(j){const Oe=zt();rt(On);const J=Oe;Promise.resolve(J).then(ce=>{Ee()||rt(ce||{isEmpty:!0})}).catch(ce=>{!Ee()&&rt({isEmpty:!0})});return}const Fe=Ae.current&&Ae.current._childOnResult,Ze=Oe=>{try{return Oe?Oe():void 0}catch{return}};if(typeof Fe=="function"){const Oe=Ze(Fe);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Tn&&Tn.tagName.toUpperCase()==="SCRIPT"&&Tn.src||new URL("components.cjs.js",document.baseURI).href}catch{}Oe&&typeof Oe.then!="function"?rt(Oe):rt(Oe&&typeof Oe.then=="function"?On:{});const J=()=>{Ee()||rt(ce=>ce===On?{}:ce)};Promise.resolve(Oe).then(ce=>{ce&&!Ee()?rt(ce):J()}).catch(ce=>{J()});return}if(typeof P=="function"){const Oe=Ze(P);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Tn&&Tn.tagName.toUpperCase()==="SCRIPT"&&Tn.src||new URL("components.cjs.js",document.baseURI).href}catch{}Oe&&typeof Oe.then!="function"?rt(Oe):rt(Oe&&typeof Oe.then=="function"?On:{});const J=()=>{Ee()||rt(ce=>ce===On?{}:ce)};Promise.resolve(Oe).then(ce=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Tn&&Tn.tagName.toUpperCase()==="SCRIPT"&&Tn.src||new URL("components.cjs.js",document.baseURI).href}catch{}ce&&!Ee()?rt(ce):J()}).catch(ce=>{console.error("viewResults external handler failed",ce),J()});return}},Ht=()=>{if(T){if(typeof ue=="number"&&typeof jt=="number"&&ue<jt-1){Ct(Ee=>({...Ee,pageIndex:Ee.pageIndex+1,stepIndex:0}));return}return qt()}if(j){const Ee=St.length;if(typeof pt=="number"&&pt<Ee-1){Ct(Fe=>({...Fe,stepIndex:Fe.stepIndex+1}));return}if(typeof ue=="number"&&typeof jt=="number"&&ue<jt-1){Ct(Fe=>({...Fe,pageIndex:Fe.pageIndex+1,stepIndex:0}));return}return qt()}if(typeof C=="function"){try{C()}catch{}return}const de=Ae.current&&Ae.current._childOnNext;if(typeof de=="function"){try{de()}catch{}return}},Nt=T?te.title||te.label||w||M("common.popup","\uD31D\uC5C5"):a||v||(Array.isArray(s)?s[s.length-1]:void 0)||w||M("common.popup","\uD31D\uC5C5"),An=w||Nt,an=T?te.title??te.label??Nt:a??v??Nt,$t=(de,Ee)=>{const Fe=Rr(Te,ue),Ze=Pr(de,Ee),Oe=lt.answersByPage[Fe]?.[Ze],J=Ux(de,{page:Te,pageIndex:ue,step:de,stepIndex:Ee,storedPayload:Oe,answersByPage:lt.answersByPage,flowState:lt}),ce={key:Ze,index:Ee,stepIndex:pt,isLast:Ee===Ne.length-1};switch(de?.type){case"listen":return n.jsx(As,{...ce,...J,onDone:De=>vt(de,Ee,De)});case"confirm":return n.jsx(Bs,{...ce,...J,onDone:De=>vt(de,Ee,De),onChange:De=>Ke(de,Ee,De)});case"confirmWithText":return n.jsx(ks,{...ce,...J,onDone:De=>vt(de,Ee,De),onChange:De=>Ke(de,Ee,De)});case"orderList":return n.jsx(Ns,{...ce,...J,onDone:De=>vt(de,Ee,De),onChange:De=>Ke(de,Ee,De)});default:return null}},Pt=o.useRef(void 0);o.useEffect(()=>{const de=Pt.current;if(Pt.current=ue,de===void 0||de===ue||!wr())return;const Ee=Ae.current;if(!Ee)return;const Fe=document.activeElement;if(!(!Fe||Fe===document.body||!Ee.contains(Fe)||Fe.disabled===!0))return;const Ze=Ee.querySelector(`.training-steps ${En.split(", ").join(", .training-steps ")}`)??Array.from(Ee.querySelectorAll(En)).find(Oe=>!Oe.closest('[aria-hidden="true"]'));try{Ze?.focus()}catch{}},[ue]);const Ut=T?I.length>0?n.jsx("div",{className:"training-steps",children:Ne.map((de,Ee)=>$t(de,Ee))},`replay-${Ie}`):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||M("training.noQuestions","\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):null,Jt=j?n.jsxs(ld.Provider,{value:cn,children:[ut?.pageTop?n.jsx("div",{className:"training-page-top",children:ut.pageTop}):null,n.jsx("div",{className:"training-steps",children:St.map((de,Ee)=>{const Fe=de;return o.cloneElement(Fe,{...Fe.props,_stepIndex:Ee,_totalSteps:St.length,_stepKey:`step-${Ee}`,_pageIndex:ue})})},`replay-${Ie}`),ut?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:ut.pageBottom}):null]}):null,gn=o.useRef(-1),Zt=o.useCallback(()=>{if(!A)return;const de=at,{results:Ee,correct:Fe,total:Ze}=Ts(at),Oe={correct:Fe,total:Ze,attempt:dt.current.length+1,previousAttempts:[...dt.current]};if(gn.current===Bt.current)return Oe;gn.current=Bt.current,Tf({items:zf(Ee),category:bd.has(A)?"sentence":"word",trainingType:A,entryPoint:B??"sentence",itemRef:D??null,correct:Fe,total:Ze,score:typeof de?.score=="number"?de.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-U.current)/1e3)),dailyTotal:E??null});try{y?.(Oe)}catch{}return Oe},[A,B,E,D,at,y]);o.useEffect(()=>{!at||at===On||at?.isEmpty||(Ts(at).total??0)>0&&Zt()},[at,Zt]);const xn=o.useCallback(()=>{const de=Zt();Lt(),qe(()=>{typeof g=="function"&&g(de),typeof m=="function"&&m()})},[g,m,Zt,rt,qe]),pn=o.useCallback(()=>xt(""),[xt]),Qt=o.useCallback(()=>{qe(()=>{typeof m=="function"&&m()})},[m,qe]),Gt=n.jsxs("div",{className:`page-popup${gt?" page-popup--closing":""}`,role:"dialog","aria-modal":"true","aria-label":An,children:[n.jsxs("div",{ref:Ae,className:`page-popup__panel ${wt?"":"page-popup__panel--measuring"} ${st==="center"?"page-popup__panel--center":st==="top"?"page-popup__panel--top":""}`,children:[n.jsx(nd,{title:an,subtitle:T?te.subtitle||te.label:Array.isArray(s)?s.join(" / "):void 0,desc:T?void 0:r,depth:T?te.depth:s,icon:T?te.icon:l,wrapperStyle:T?te.wrapperStyle:i,iconTooltip:T?te.iconTooltip:u,progressMax:jt,progressIndex:ue,pageIndex:ue,pageCount:jt,onBack:Qt,onClose:Qt}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${st==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:j?Jt:T?Ut:typeof b=="function"?b({registerOnNext:je,registerOnResult:nt,panelRef:Ae,setResultOverlay:rt}):b})}),n.jsx(td,{onSettings:f,onNext:Ht,onResult:qt,useNoiseSettingBtn:!!(T?te.useNoiseSetting??!0:_),stepIndex:pt,stepCount:tt,pageIndex:ue,pageCount:jt,resultOpen:!!(at&&!at.isEmpty),hideNoiseRows:L})]}),at&&!at.isEmpty&&(N??Yx)({score:at.score,results:at.results||at.answers||[],contextsLength:at.results?at.results.length:at.answers?at.answers.length:0,onReplay:()=>{if(U.current=Date.now(),at!==On){const{correct:de,total:Ee}=Ts(at);dt.current.push({correct:de,total:Ee})}if(Lt(),ze(de=>de+1),T){if(Ct(Fr()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if(j){Ct(Fr());return}try{const de=Ae.current&&Ae.current._childOnResult;typeof de=="function"&&de({replay:!0})}catch{}},onClose:xn,pending:at===On}),at?.isEmpty&&n.jsx("div",{className:"page-popup page-popup--result-empty",role:"dialog","aria-modal":"true","aria-label":M("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:M("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:xn,label:M("training.result.done","\uC644\uB8CC")})})]})}),n.jsx(va,{message:It,position:"top",onClose:pn})]}),Nn=n.jsx(gs.Provider,{value:$e,children:Gt});return typeof document<"u"&&document.body?hn.createPortal(Nn,document.body):Nn}const Yn=Zx;Yn.Page=Lr,Yn.ListenStep=id,Yn.ConfirmStep=ud,Yn.ConfirmWithTextStep=cd,Yn.OrderListStep=dd,Yn.CardStep=pd,Yn.CardOrderStep=Lx;function Xx({label:e,homonum:t}){const a=pa()?.(e,t)??"",{imgRef:r,loading:s,hasImage:l,onLoad:i,onError:u}=ts(a);return l?n.jsxs("div",{className:se("word-image-tooltip__cell"),children:[s&&n.jsx("div",{className:se("word-image-tooltip__spinner")}),n.jsx("img",{ref:r,src:a,alt:e,draggable:!1,style:{opacity:s?0:1},onLoad:i,onError:u})]}):n.jsx("div",{className:se("word-image-tooltip__cell word-image-tooltip__cell--text h3"),children:n.jsx("span",{children:e})})}function gd({words:e,anchorRect:t}){const a=o.useRef(null),[r,s]=o.useState(null);return o.useLayoutEffect(()=>{if(!t||!a.current)return;const{offsetWidth:l,offsetHeight:i}=a.current,u=window.innerWidth;let c=t.left+t.width/2-l/2,d=t.top-i-8;d<8&&(d=t.bottom+8),c=Math.max(8,Math.min(c,u-l-8)),s({left:c,top:d})},[t]),!t||e.length===0?null:hn.createPortal(n.jsx("div",{ref:a,className:se("word-image-tooltip"),style:{visibility:r?"visible":"hidden",left:r?.left??0,top:r?.top??-9999},children:n.jsx("div",{className:se("word-image-tooltip__cells"),children:e.map(l=>n.jsx(Xx,{label:l.label,homonum:l.homonum},`${l.label}_${l.homonum??1}`))})}),document.body)}function Jx({titleIcon:e,resultCount:t,resultUnit:a,searchQuery:r,items:s,groups:l,selected:i=[],onSelect:u,maxSelect:c,onClearSelection:d,onPrint:h,onPrintEmpty:p,className:m,emptyHint:g,showEmptyText:y=!0,sectionType:C="page",disc:f}){const{t:_,i18n:b}=_e.useTranslation(),w=b.language?.startsWith("ko")??!1,{anchorRect:v,openAt:k,close:x}=za(),[A,B]=o.useState(null),E=o.useCallback(()=>{x(),B(null)},[x]);Hy(E,!!A);const D=(r??"").trim(),N=/^[^,[\]\s]+$/.test(D)?D:"",$=N.length>0,L=r===void 0&&t===void 0,U=$?"match":L?"original":"ganada",[M,P]=o.useState(()=>U),[T,ee]=o.useState("50"),[te,I]=o.useState(1),[Y,R]=o.useState($);Y!==$&&(R($),P(U));const q=M==="match"&&!$||M==="original"&&!L?U:M,Z=o.useMemo(()=>[...$?[{value:"match",label:_("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...L?[{value:"original",label:_("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:_("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:_("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:_("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:_("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:_("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:_("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[_,$,L]),z=o.useMemo(()=>["10","25","50","100"].map(le=>({value:le,label:_("wordSearch.pageSize",{count:Number(le),defaultValue:`${le}\uAC1C\uC529 \uBCF4\uAE30`})})),[_]),j=le=>le.words?.[0],F=o.useMemo(()=>{const le=[...N].length,ve=mf(N),$e=new Map;return Ae=>{let Ie=$e.get(Ae);return Ie===void 0&&(Ie=ve((Ae.words?.[0]?.label??"").slice(0,le))?0:1,$e.set(Ae,Ie)),Ie}},[N]),O=o.useCallback((le,ve)=>{const $e=ze=>j(ze)?.label??"",Ae=ze=>j(ze)?.syllables??[...$e(ze)].length,Ie=ze=>(ze.words??[]).reduce((dt,st)=>{const et=parseInt(st.grade??"",10);return Number.isFinite(et)&&et<dt?et:dt},999);switch(q){case"match":return F(le)-F(ve)||fn($e(le),$e(ve));case"ganada":return fn($e(le),$e(ve));case"ganada_desc":return fn($e(ve),$e(le));case"syllable":return Ae(le)-Ae(ve)||fn($e(le),$e(ve));case"syllable_desc":return Ae(ve)-Ae(le)||fn($e(le),$e(ve));case"grade":return Ie(le)-Ie(ve)||fn($e(le),$e(ve));case"grade_desc":return Ie(ve)-Ie(le)||fn($e(le),$e(ve));default:return 0}},[q,F]),G=o.useMemo(()=>s.slice().sort(O),[s,O]),ie=Number(T)||10,K=o.useMemo(()=>(l??[]).flatMap(le=>le.items.slice().sort(O).map(ve=>({item:ve,label:le.label}))),[l,O]),pe=l?K.length:G.length,X=Math.max(1,Math.ceil(pe/ie)),H=Math.min(te,X),ne=o.useMemo(()=>G.slice((H-1)*ie,H*ie),[G,H,ie]),V=o.useId(),W=o.useMemo(()=>{if(!l)return null;const le=K.slice((H-1)*ie,H*ie),ve=new Map;for(const{item:$e,label:Ae}of le)ve.has(Ae)||ve.set(Ae,[]),ve.get(Ae).push($e);return[...ve.entries()].map(([$e,Ae])=>({label:$e,items:Ae}))},[l,K,H,ie]);o.useEffect(()=>{I(1)},[M,T,pe,r]);const oe=pe>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(_n,{size:40,options:Z,value:q,onChange:P,ariaLabel:_("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(_n,{size:40,options:z,value:T,onChange:ee,ariaLabel:_("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(zo,{page:H,totalPages:X,onChange:I})]}):void 0,xe=le=>{u&&u(le)},be=t!==void 0&&a?n.jsxs(n.Fragment,{children:[_("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),_("wordSearch.resultTitleSuffix",{unit:w?kf(a):a})]}):void 0,me=t!==void 0&&t>0&&c!==void 0&&a?_("wordSearch.resultDisc",{unit:w?Nf(a):a,max:c,selected:i.length}):void 0,ke=f??me,Le=l?l.length===0:s.length===0,Me=Le&&!y&&!g;return n.jsxs(_a,{type:C,className:Be("word-search-result-block",m),children:[n.jsxs("div",{className:Be("word-search-result-block__inner",Me&&"word-search-result-block__inner--head-only"),children:[(be||oe||ke)&&n.jsxs("div",{className:"word-search-result-block__head",children:[n.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&n.jsx(ot,{icon:e,className:"word-search-result-block__head-icon"}),be&&n.jsx("span",{className:"word-search-result-block__title h3",children:be})]}),oe&&n.jsx("div",{className:"word-search-result-block__head-actions",children:oe}),ke&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:ke})]}),Le&&(y||g)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[y&&n.jsx("p",{className:"word-search-result-block__empty body-3",children:_("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),g&&n.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:g})]}),l?(W??[]).map(le=>n.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${V}-${le.label}`,children:[n.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${V}-${le.label}`,children:le.label}),n.jsx("div",{className:"word-search-result-block__items",children:le.items.map(ve=>{const $e=i.includes(ve.id);return n.jsx("div",{onMouseEnter:Ae=>{k(Ae.currentTarget),B(ve.words??[])},onMouseLeave:E,children:n.jsx(fe,{htmlType:"button",size:"word",align:"grid",label:(ve.words??[]).map(Ae=>Ae.label),subLabel:(ve.words??[]).some(Ae=>Ae.subLabel)?(ve.words??[]).map(Ae=>Ae.subLabel):void 0,selected:$e,onClick:()=>xe(ve.id),minWidth:200})},ve.id)})})]},le.label)):n.jsx("div",{className:"word-search-result-block__items",children:ne.map(le=>{const ve=i.includes(le.id);return n.jsx("div",{onMouseEnter:$e=>{k($e.currentTarget),B(le.words??[])},onMouseLeave:E,children:n.jsx(fe,{htmlType:"button",size:"word",align:"grid",label:(le.words??[]).map($e=>$e.label),subLabel:(le.words??[]).some($e=>$e.subLabel)?(le.words??[]).map($e=>$e.subLabel):void 0,selected:ve,onClick:()=>xe(le.id),minWidth:200})},le.id)})}),A&&v&&n.jsx(gd,{words:A,anchorRect:v})]}),(d||h)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[d&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:_("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:i.length===0,onClick:i.length===0?void 0:d}),h&&n.jsx("div",{onClick:i.length===0?p:void 0,children:n.jsx(fe,{htmlType:"button",size:"56",type:"bar",variant:"main",label:_("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:i.length===0,onClick:i.length===0?void 0:h})})]})]})}function Qx(e,t){return t.map(a=>{const r=typeof a=="string"?a:a.label,s=typeof a=="string"?void 0:a.displayLabel;return{label:r,value:e[r]??"",displayLabel:s}})}function ew({sections:e,selectedList:t,count:a,onCountChange:r,maxCount:s=4,minCount:l=1,combinationSections:i,combinationSectionsForSlot:u,onSelect:c,placeholder:d="-",className:h,title:p,titleIcon:m,disc:g,showInfoButton:y=!0,onClearPhoneme:C,onSearch:f,onSearchEmpty:_,searchDisabled:b=!1,searchLabel:w,searchChecking:v=!1,pairMode:k=!1,sectionType:x="page",beforeSearchContent:A,beforeContent:B,afterContent:E,hideCountControl:D=!1,ordinal:N=!1}){const{t:$}=_e.useTranslation(),L=o.useMemo(()=>$("wordPairs.infoNotes",{returnObjects:!0}),[$]),U=o.useMemo(()=>Array.from({length:s-l+1},(j,F)=>{const O=l+F;return{key:String(O),label:$("wordPairs.count",{n:O})}}),[$,s,l]),M=o.useMemo(()=>$("wordPairs.ordinals",{returnObjects:!0}),[$]),P=o.useCallback(j=>N?$("wordPairs.phonemeOrdinalLabel",{ordinal:M[j-1]??j}):a===1?$("wordPairs.phonemeSingleLabel","\uC74C\uC808"):$("wordPairs.phonemeN",{n:j}),[N,M,a,$]),T=o.useCallback(j=>N?$("wordPairs.phonemeContrastOrdinalLabel",{ordinal:M[j-1]??j}):a===1?$("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):$("wordPairs.phonemeContrast",{n:j}),[N,M,a,$]),ee=o.useCallback((j,F)=>F?n.jsxs(n.Fragment,{children:[j,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):j,[]),{anchorRect:te,toggleAt:I,close:Y}=za(),R=o.useCallback(j=>r(Number(j)),[r]),q=yn("(max-width: 767px)"),Z=o.useCallback(j=>Qx(j,e).map(({label:F,value:O,displayLabel:G})=>{const ie=!!O&&O!=="\uC5C6\uC74C";return n.jsxs("span",{className:Be("phoneme-select-block__cell-jamo-part",O?"":"phoneme-select-block__cell-jamo-part--empty",ie?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[n.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${O==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:O==="\uC5C6\uC74C"?"x":O||d}),ie&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:G??F})]},F)}),[e,d]),z=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(fe,{htmlType:"button",size:40,type:q?"dot":void 0,icon:"info",label:q?void 0:$("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:$("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:te?"is-selected":void 0,"aria-expanded":!!te,"aria-haspopup":"dialog",onClick:j=>I(j.currentTarget)})}),te&&n.jsx(qn,{title:$("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:L,anchorRect:te,onClose:Y})]});return n.jsxs(_a,{type:x,title:p,icon:m,disc:g,action:y?z:void 0,className:Be("phoneme-select-block",h),children:[B,!D&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(vn,{options:U,value:String(a),onChange:R,size:40,ariaLabel:$("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),n.jsx("div",{className:"phoneme-select-block__cells",children:k?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((j,F)=>{const O=t[F*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:Z(O)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:P(F+1)})]},F)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:$("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((j,F)=>{const O=t[F*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:Z(O)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:T(F+1)})]},F)})})]}):t.map((j,F)=>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:Z(j)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:P(F+1)})]},F))}),(i||u)&&n.jsx("div",{className:"phoneme-select-block__panels",children:n.jsx("div",{className:"phoneme-select-block__detail",children:k?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((j,F)=>{const O=t[F*2]??{};return n.jsx(In,{title:ee(P(F+1),F===0),sections:u?u(O,F*2):i,selected:O,onSelect:c?.(F*2),align:"newline"},F)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((j,F)=>{const O=t[F*2+1]??{};return n.jsx(In,{title:T(F+1),sections:u?u(O,F*2+1):i,selected:O,onSelect:c?.(F*2+1),align:"newline"},F)})})]}):t.map((j,F)=>n.jsx(In,{title:ee(P(F+1),F===0),sections:u?u(j,F):i,selected:j,onSelect:c?.(F),align:"newline"},F))})}),A&&n.jsx("div",{className:"phoneme-select-block__before-search",children:A}),(C||f||v)&&(()=>{const j=t.every(F=>{const O=cf(F);return Object.entries(O).every(([G,ie])=>!ie||G==="coda"&&ie===Pl)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:j?_:void 0,children:[C&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:$("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:j,onClick:j?void 0:C}),f?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:w??$("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:j||b||v,onDisabledClick:v?()=>{}:void 0,"aria-busy":v||void 0,onClick:f}):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:w??$("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),E]})}function tw({title:e,sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:d,className:h}){const{t:p}=_e.useTranslation();return n.jsx(In,{className:h,title:e??p("wordSearch.filterTitle","\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815"),sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:d,align:"inline"})}function nw({title:e,headerAction:t,sections:a,selected:r,onSelect:s,className:l}){const{t:i}=_e.useTranslation();return a.length===0?null:n.jsx(In,{className:l,title:e??i("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:a,selected:r,onSelect:s,align:"newline"})}function aw({title:e,mode:t,onModeChange:a,matchMode:r,onMatchModeChange:s,positionCount:l,onPositionCountChange:i,inputMode:u,onInputModeChange:c,className:d}){const{t:h}=_e.useTranslation(),p={searchMode:h("wordPairs.filter.searchModeLabel","\uB300\uB9BD \uBC29\uC2DD"),phonemeOrder:h("wordPairs.filter.phonemeOrder","\uC785\uB825 \uC74C\uC808 \uC704\uCE58"),count:h("wordPairs.filter.countLabel","\uC785\uB825 \uC74C\uC808 \uAC2F\uC218"),inputMode:h("wordPairs.filter.inputModeLabel","\uC785\uB825 \uBC29\uC2DD"),orderAny:h("wordPairs.filter.orderAny","\uBB34\uAD00"),orderMatch:h("wordPairs.filter.orderMatch","\uC77C\uCE58"),include:h("wordPairs.mode.include","\uC74C\uC18C \uD3EC\uD568"),pick:h("wordPairs.mode.pick","\uC74C\uC18C \uB300\uB9BD"),explicit:h("wordPairs.mode.contrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815"),charInput:h("wordPairs.input.char","\uAE00\uC790 \uC120\uD0DD"),pronInput:h("wordPairs.input.pron","\uBC1C\uC74C \uC120\uD0DD")},m=f=>h("wordPairs.count",{n:f}),g=[{label:p.searchMode,items:[p.include,p.pick,p.explicit],display:"segmented",labelAction:n.jsx(Ga,{title:h("wordPairs.mode.infoTitle","\uB300\uB9BD \uBC29\uC2DD"),items:[h("wordPairs.mode.infoInclude","\uC74C\uC18C \uD3EC\uD568 \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uBAA8\uB450 \uB4E4\uC5B4\uAC04 \uB2E8\uC5B4\uC640 \uADF8 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694."),h("wordPairs.mode.infoPick","\uC74C\uC18C \uB300\uB9BD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uAC00 \uB300\uB9BD\uC30D \uB450 \uB2E8\uC5B4\uC758 \uC2E4\uC81C \uCC28\uC774\uC810\uC77C \uB54C\uB9CC \uB9E4\uCE6D\uB3FC\uC694."),h("wordPairs.mode.infoContrast","\uC74C\uC18C \uB300\uB9BD \uC9C0\uC815 \u2014 \uAE30\uC900 \uB2E8\uC5B4\uC640 \uB300\uB9BD \uB2E8\uC5B4\uC758 \uC74C\uC18C\uB97C \uAC01\uAC01 \uC9C1\uC811 \uC120\uD0DD\uD574 \uB300\uB9BD\uC30D\uC744 \uCC3E\uC544\uC694.")]})},{label:p.phonemeOrder,items:[p.orderAny,p.orderMatch],display:"segmented",labelAction:n.jsx(Ga,{items:h("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:p.count,items:[m(1),m(2)],display:"segmented"},{label:p.inputMode,items:[p.charInput,p.pronInput],display:"segmented",labelAction:n.jsx(Ga,{title:h("wordPairs.input.infoTitle","\uC785\uB825 \uBC29\uC2DD"),items:[h("wordPairs.input.infoChar","\uAE00\uC790 \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uB2E8\uC5B4(\uAE00\uC790 \uAE30\uC900)\uB97C \uCC3E\uC740 \uD6C4, \uB2E8\uC5B4\uC758 \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4."),h("wordPairs.input.infoPron","\uBC1C\uC74C \uC120\uD0DD \u2014 \uC120\uD0DD\uD55C \uC74C\uC18C\uB85C \uD45C\uC900 \uBC1C\uC74C \uB300\uB9BD\uC30D\uC744 \uCC3E\uC2B5\uB2C8\uB2E4.")]})}],y={[p.searchMode]:t==="explicit"?p.explicit:t==="pick"?p.pick:p.include,[p.phonemeOrder]:r==="ordered"?p.orderMatch:p.orderAny,[p.count]:m(l),[p.inputMode]:u==="phoneme"?p.pronInput:p.charInput},C=(f,_)=>{_===p.searchMode?a(f===p.explicit?"explicit":f===p.pick?"pick":"include"):_===p.phonemeOrder?s(f===p.orderMatch?"ordered":"unordered"):_===p.count?i(f===m(2)?2:1):_===p.inputMode&&c(f===p.pronInput?"phoneme":"word")};return n.jsx(In,{className:d,title:e??h("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:g,selected:y,onSelect:C,align:"inline"})}function rw(e){const{title:t,items:a,columns:r,resizeStorageKey:s,gridTemplateColumns:l,mobileGridTemplateColumns:i,searchPlaceholder:u,searchFn:c,defaultSortKey:d,defaultSortAsc:h=!0,selectedId:p,selectedIds:m,onSelect:g,onClose:y,pageSizeOptions:C=[10,25,50,100],initialPageSize:f,emptyText:_,noMatchText:b,countLabel:w,topContent:v,className:k=""}=e,{t:x}=_e.useTranslation(),A=u??x("common.search","\uAC80\uC0C9"),B=_??x("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),E=b??x("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[D,N]=o.useState(""),[$,L]=o.useState(d??r[0]?.key??""),[U,M]=o.useState(h),[P,T]=o.useState(String(f??C[0]??10)),[ee,te]=o.useState(1);o.useEffect(()=>{te(1)},[D,P]);const I=c!==null,Y=o.useCallback((K,pe)=>{if(!pe)return!0;const X=pe.toLowerCase();return r.some(H=>{const ne=K[H.key];return ne==null?!1:String(ne).toLowerCase().includes(X)})},[r]),R=c??Y,q=o.useMemo(()=>{const K=I?a.filter(pe=>R(pe,D)):a;return $?[...K].sort((pe,X)=>{const H=pe[$],ne=X[$];return H===ne?0:gr(H,ne,U)}):K},[a,D,$,U,I,R]),Z=Math.max(1,Math.ceil(q.length/Number(P)));ee>Z&&te(Z);const z=Math.min(ee,Z),j=q.slice((z-1)*Number(P),z*Number(P)),F=o.useCallback(K=>{$===K?M(pe=>!pe):(L(K),M(!0)),te(1)},[$]),O=o.useMemo(()=>{if(typeof w=="function"){const K=q.length,pe=w(K);if(typeof pe=="string"){const X=pe.lastIndexOf(String(K));if(X>=0)return{prefix:pe.slice(0,X),suffix:pe.slice(X+String(K).length)}}return{label:pe}}if(typeof w=="string"&&w.includes("{n}")){const[K,pe]=w.split("{n}");return{prefix:K,suffix:pe}}return{prefix:x("common.totalCountPrefix","\uCD1D "),suffix:x("common.totalCountSuffix","\uAC1C")}},[w,q.length,x]),G=o.useMemo(()=>r.map(K=>({label:K.label,onClick:K.sortable!==!1?()=>F(K.key):void 0,className:K.className,sortDir:K.sortable!==!1&&$===K.key?U?"asc":"desc":null})),[r,$,U,F]),ie=o.useMemo(()=>C.map(K=>({value:String(K),label:x("common.pageSizeLabel",{n:K})})),[C,x]);return n.jsxs(Pn,{className:`popup-list ${k}`,title:t,onClose:y,children:[v,"label"in O&&n.jsx("p",{className:"toolbar__count body-1",children:O.label}),n.jsx(Wo,{count:"label"in O?void 0:{value:q.length,prefix:O.prefix,suffix:O.suffix},search:I?{value:D,onChange:N,placeholder:A}:void 0,pageSize:{options:ie,value:P,onChange:T},pagination:{page:z,total:Z,onChange:te}}),n.jsx(Qo,{size:"medium",gridTemplateColumns:l,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:s,fields:G,items:j,onRowClick:g,renderRow:K=>{const pe=m!=null?K.id!=null&&m.has(K.id):p!=null&&K.id===p;return r.map(X=>({content:X.render?X.render(K):K[X.key]??"",className:Be(X.className,pe&&"popup-list__row--selected")}))},empty:I&&D!==""&&a.length>0?E:B})]})}function yd(e){const{title:t,message:a,topContent:r,details:s,children:l,confirmLabel:i,cancelLabel:u,hideCancel:c=!1,extraAction:d,confirmVariant:h="main",confirmDisabled:p=!1,onConfirm:m,closeOnConfirm:g=!0,onClose:y,inline:C,size:f="small",className:_,initialFocus:b="close"}=e,{t:w}=_e.useTranslation(),v=o.useRef(null);o.useEffect(()=>{if(C||b==="close")return;const D=v.current?.closest(".popup-panel"),N=Array.from(D?.querySelectorAll(".popup-footer--buttons button")??[]),$=b==="confirm"?N[N.length-1]:c?void 0:N[d?1:0];$&&!$.disabled&&$.focus()},[]);const k=o.useRef(!1),[x,A]=o.useState(!1),B=D=>{let N=!1;return{close:()=>{N=!0,D()},didClose:()=>N}},E=async D=>{if(k.current)return;k.current=!0;const N=typeof document<"u"?document.activeElement:null;A(!0);let $=!1;try{$=await D()}catch(L){typeof console<"u"&&console.error(L)}finally{$||(k.current=!1,A(!1),requestAnimationFrame(()=>{const L=document.activeElement;(!L||L===document.body)&&N?.isConnected&&N.focus()}))}};return n.jsxs(Pn,{title:t,onClose:y,closeDisabled:x,inline:C,size:f,className:Be("confirm-popup",r!=null&&"confirm-popup--has-top",_),buttons:[...d?[{label:d.label,variant:d.variant??"default",disabled:d.disabled||x,onClick:async({closeWithAnimation:D})=>{await E(async()=>{const N=B(D);await d.onClick(N.close);const $=d.closeOnClick??!0;return $&&D(),$||N.didClose()})}}]:[],...c?[]:[{label:u??w("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:x,onClick:({closeWithAnimation:D})=>D()}],{label:i??w("common.confirm","\uD655\uC778"),variant:h,disabled:p||x,onClick:async({closeWithAnimation:D})=>{await E(async()=>{const N=B(D);return await m(N.close),g&&D(),g||N.didClose()})}}],children:[r!=null&&n.jsx("div",{className:"confirm-popup__top",children:r}),s&&s.length>0&&n.jsx(Qa,{children:s.map((D,N)=>n.jsx(un,{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}),l]})}function ow(e,t,a={}){const{t:r}=_e.useTranslation(),[s,l]=o.useState(!1),i=o.useRef(!1),u=o.useCallback(()=>{i.current=!0},[]),c=o.useCallback(()=>i.current?(i.current=!1,!0):e?(l(!0),!1):!0,[e]),d=s?n.jsx(yd,{title:a.title??r("common.discardConfirm.title","\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?"),message:a.message??r("common.discardConfirm.body","\uC800\uC7A5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uC9C0\uAE08\uAE4C\uC9C0 \uC785\uB825\uD55C \uB0B4\uC6A9\uC774 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4."),confirmLabel:a.confirmLabel??r("common.discardConfirm.confirm","\uC785\uB825 \uCDE8\uC18C"),confirmVariant:"danger",onConfirm:()=>{l(!1),t()},onClose:()=>l(!1)}):null;return{beforeClose:c,discardPopup:d,allowClose:u}}function sw({onApply:e,onCancel:t}){const{t:a}=_e.useTranslation(),[r,s]=o.useState(""),[l,i]=o.useState(!1),[u,c]=o.useState(null),d=o.useRef(null),h=o.useId();o.useEffect(()=>{d.current?.focus()},[]);const p=o.useCallback(async y=>{const C=r.trim();if(C){i(!0),c(null);try{await e(C),y()}catch(f){c(zl(f)),i(!1),requestAnimationFrame(()=>d.current?.focus())}}},[r,e]),m=o.useCallback((y,C)=>{y.key==="Enter"&&!y.nativeEvent.isComposing&&p(C)},[p]),g=y=>{s(y.target.value),c(null)};return n.jsx(Pn,{className:"coupon-input-popup",title:a("usage.couponButton","\uCFE0\uD3F0 \uC785\uB825"),size:"small",onClose:t,closeDisabled:l,buttons:[{label:a("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:l,onClick:({closeWithAnimation:y})=>y()},{label:a("coupons.applyButton","\uC801\uC6A9"),variant:"main",disabled:!r.trim()||l,onClick:({closeWithAnimation:y})=>{p(y)}}],children:({closeWithAnimation:y})=>n.jsxs(n.Fragment,{children:[n.jsx("input",{ref:d,className:"coupon-input-popup__input body-2","aria-label":a("coupons.input.label","\uCFE0\uD3F0 \uCF54\uB4DC"),"aria-invalid":u?!0:void 0,"aria-errormessage":u?h:void 0,"aria-describedby":u?h:void 0,placeholder:a("coupons.input.placeholder","\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"),value:r,onChange:g,onKeyDown:C=>m(C,y),disabled:l,autoComplete:"off",spellCheck:!1}),u&&n.jsx("p",{id:h,className:"coupon-input-popup__error caption-1",role:"alert",children:u})]})})}const vd=["var(--color-main)","var(--color-sub)"],lw=2e3;function iw(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 Ms({active:e=!1,count:t=40,duration:a=2e3,strength:r=1,onComplete:s,trigger:l=0}){const i=o.useMemo(()=>{const C=Math.floor(t/2),f=t-C,_=(b,w)=>Array.from({length:b}).map((v,k)=>{const x=6+Math.random()*12,A=Math.round(Math.min(18,x*Math.min(1.5,1+r*.4))),B=vd[Math.floor(Math.random()*vd.length)],E=Math.random()*300,D=(360+Math.random()*260)*r*1.2,N=(w==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,$=Math.cos(N)*D,L=Math.sin(N)*D*1.35,U=Math.random()*720-360,M=(1200+Math.random()*3e3)*Math.min(1.6,1+r*.3),P=Math.random()>.7?"50%":"3px";return{id:`${w}-${k}`,side:w,size:A,color:B,delay:E,vx:$,vy:L,angularVel:U,life:M,borderRadius:P}});return[..._(C,"left"),..._(f,"right")]},[t,r]),u=o.useRef(null),c=o.useRef({}),d=o.useRef(null),h=o.useRef(s);o.useEffect(()=>{h.current=s},[s]);const p=o.useRef(null),m=o.useRef(null),g=()=>{if(typeof document>"u")return null;let C=document.querySelector("[data-ihab-effect-root]");return C||(C=document.createElement("div"),C.className="app-effect",C.dataset.ihabEffectRoot="",C.style.position="fixed",C.style.inset="0",C.style.pointerEvents="none",C.style.zIndex="99998",document.body.appendChild(C)),C};if(typeof document<"u"&&m.current==null&&(m.current=g()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const Y=setTimeout(()=>h.current?.(),0);return()=>clearTimeout(Y)}const C=1200,f=performance.now(),_=m.current&&m.current!==document.body?m.current.getBoundingClientRect():null,b=Math.max(60,(window.innerHeight||800)*.05),w=Y=>Math.max(40,(Y||window.innerWidth)*.02),v=_?.width||window.innerWidth||375,k=_?.height||window.innerHeight||812,x=Y=>{const R=[...Y].sort((q,Z)=>q-Z);return R[Math.floor(R.length/2)]||1},A=x(i.map(Y=>Math.abs(Y.vy))),B=x(i.map(Y=>Math.abs(Y.vx))),E=Math.sqrt(2*C*(k*.72+b))/A,D=A*E/C,N=v*.5/(B*D),$=(Y,R,q)=>Math.min(q,Math.max(R,Y)),L=$(E,.8,2.4),U=$(N,.7,2.2),M=a>0?a/lw:1,P=i.map(Y=>({...Y,life:Y.life*M,vx:Y.vx*U,vy:Y.vy*L,startTime:f+Y.delay,ended:!1})),T=_?{x:_.left-w(_.width),y:_.top+_.height+b}:{x:-w(window.innerWidth),y:window.innerHeight+b},ee=_?{x:_.left+_.width+w(_.width),y:_.top+_.height+b}:{x:window.innerWidth+w(window.innerWidth),y:window.innerHeight+b},te=Y=>{let R=!1;for(const q of P){const Z=c.current[q.id];if(!Z||!Z)continue;if(Y<q.startTime){Z.style.display="none",R=!0;continue}if(!q._inited){const H=q.side==="left"?T.x:ee.x,ne=q.side==="left"?T.y:ee.y;Z.style.left=`${H}px`,Z.style.top=`${ne}px`,Z.style.transform="translate3d(0px, 0px, 0)",Z.style.display="block",Z.style.zIndex="100000",typeof q.color=="string"&&q.color.startsWith("var(")&&(Z.style.background=iw(Z,q.color)??"#FF0060"),q._inited=!0}const z=(Y-q.startTime)/1e3;if(z<0)continue;const j=q.life/1e3;if(z>=j){Z.style.opacity="0",Z.style.display="none",q.ended=!0;continue}R=!0;const F=q.side==="left"?T.x:ee.x,O=q.side==="left"?T.y:ee.y,G=F+q.vx*z,ie=O+q.vy*z+.5*C*z*z,K=(q.angularVel||0)*z,pe=G-F,X=ie-O;Z.style.transform=`translate3d(${pe}px, ${X}px, 0) rotate(${K}deg)`,Z.style.opacity=`${Math.max(0,1-z/j)}`}R?d.current=requestAnimationFrame(te):h.current?.()};d.current=requestAnimationFrame(te);const I=setTimeout(()=>{try{if((m.current?m.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const Y=document.createElement("div");Y.className="party-container",Y.style.position="fixed",Y.style.inset="0",Y.style.pointerEvents="none",Y.style.overflow="visible",Y.style.zIndex="2147483647";for(const R of i){const q=document.createElement("span");q.className=`confetti confetti--${R.side}`,q.setAttribute("aria-hidden","true"),q.style.display="none",q.style.position="fixed",q.style.left="0px",q.style.top="0px",q.style.width=`${R.size}px`,q.style.height=`${Math.max(4,R.size*.6)}px`,q.style.background=R.color,q.style.borderRadius=R.borderRadius,q.style.transform="translate3d(0,0,0)",q.style.opacity="0",Y.appendChild(q),c.current[R.id]=q}(document.body||m.current).appendChild(Y),p.current=Y}}catch{}},300);return()=>{if(d.current&&cancelAnimationFrame(d.current),clearTimeout(I),p.current){try{p.current.remove()}catch{}p.current=null}}},[e,a,l,i]),!e)return null;const y=n.jsx("div",{className:"party-container",ref:u,children:i.map(C=>n.jsx("span",{"aria-hidden":!0,ref:f=>{c.current[C.id]=f},className:`confetti confetti--${C.side}`,style:{width:`${C.size}px`,height:`${Math.max(4,C.size*.6)}px`,background:C.color,borderRadius:C.borderRadius}},`${C.id}-${l}`))});return typeof document<"u"?hn.createPortal(y,m.current||document.body):y}const Ls=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function uw({trigger:e=0,active:t=!1}){const[a,r]=o.useState(null);o.useEffect(()=>{if(typeof window>"u")return;const l=i=>{const u=i.detail??{};r(c=>({n:(c?.n??0)+1,count:Ls(u.count),strength:Ls(u.strength),duration:Ls(u.duration)}))};return window.addEventListener("party:trigger",l),()=>window.removeEventListener("party:trigger",l)},[]);const s=o.useCallback(()=>r(null),[]);return n.jsxs(n.Fragment,{children:[n.jsx(Ms,{active:t,trigger:e}),a&&n.jsx(Ms,{active:!0,trigger:a.n,count:a.count,strength:a.strength,duration:a.duration,onComplete:s})]})}function cw({title:e,sub:t,rightAction:a,titleAction:r,badge:s,badgeVariant:l="default",documentTitle:i,onBack:u,backLabel:c,wrap:d=!1}){const{t:h}=_e.useTranslation();Dy(typeof e=="string"?e:i??null);const p=c??h("common.back","\uB4A4\uB85C");return n.jsxs("div",{className:d?"page-title page-title--wrap":"page-title",children:[n.jsxs("div",{className:"page-title__main",children:[n.jsxs("div",{className:"page-title__title-row",children:[u&&n.jsx(fe,{htmlType:"button",className:"page-title__back",size:48,type:"dot",icon:"chevron-left",iconSize:"large",useBorder:!1,iconColor:"var(--color-text-primary)",ariaLabel:p,showTooltipInfo:p,onClick:u}),n.jsx("h1",{className:"page-title__title h1",children:e}),s&&n.jsx("div",{className:"page-title__badge",children:n.jsx(ln,{label:s,size:"small",variant:l,fill:"outline"})}),r?n.jsx("div",{className:"page-title__title-action",children:r}):null]}),t&&n.jsx("p",{className:"page-title__sub body-2",children:t})]}),a?n.jsx("div",{className:"page-title__action",children:a}):null]})}function dw(e){return e??""}const _d=o.createContext({words:[],loading:!1});function pw(){return o.useContext(_d)}function hw({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c,children:d}){const h=o.useMemo(()=>({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c}),[e,t,a,r,s,l,i,u,c]);return n.jsx(_d.Provider,{value:h,children:d})}function mw({items:e,actions:t,columns:a,flat:r=!1,className:s,style:l}){const i=a??e.length;return n.jsx("section",{className:Be("summary-strip",r&&"summary-strip--flat",s),style:{"--summary-strip-cols":String(i),...l},children:n.jsxs("div",{className:"summary-strip__row",children:[n.jsx("div",{className:"summary-strip__items",children:e.map((u,c)=>n.jsxs("div",{className:"summary-strip__item",children:[n.jsx("p",{className:"summary-strip__label caption-1",children:u.label}),n.jsx("p",{className:"summary-strip__value body-3b",title:typeof u.value=="string"||typeof u.value=="number"?String(u.value):void 0,children:u.value})]},c))}),t&&n.jsx("div",{className:"summary-strip__actions",children:t})]})})}const Cw=(e,t)=>`${e} / ${t}`;function fw({blocks:e,sectionTitles:t,logo:a,footer:r,pageLabel:s=Cw,pageWidth:l,pageHeight:i,margin:u,className:c,style:d}){const{t:h}=_e.useTranslation(),p=o.useRef(null),m=o.useRef(null),g=o.useRef(null),y=o.useRef(null),[C,f]=o.useState(null),[_,b]=o.useState(!1);o.useEffect(()=>{const M=p.current;if(!M)return;const P=()=>b(M.scrollWidth>M.clientWidth+1);if(P(),typeof ResizeObserver>"u")return;const T=new ResizeObserver(P);return T.observe(M),()=>T.disconnect()},[C]);const w=e.map(M=>`${M.id}\0${M.section??""}\0${M.group??""}`).join(""),v=C&&C.shape===w?C.pages:null,[k,x]=o.useState(0);o.useEffect(()=>{const M=y.current;if(!M||typeof ResizeObserver>"u")return;const P=new ResizeObserver(()=>x(M.offsetHeight));return P.observe(M),()=>P.disconnect()},[]);const[A,B]=o.useState(0);o.useEffect(()=>{const M=m.current;if(!M||typeof ResizeObserver>"u")return;let P=null;const T=typeof requestAnimationFrame=="function"?I=>requestAnimationFrame(I):I=>setTimeout(I,16),ee=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:I=>clearTimeout(I),te=new ResizeObserver(()=>{P==null&&(P=T(()=>{P=null,B(I=>I+1)}))});return Array.from(M.children).forEach(I=>te.observe(I)),()=>{te.disconnect(),P!=null&&ee(P)}},[w]),o.useLayoutEffect(()=>{const M=m.current,P=y.current;if(!M||!P)return;const T=j=>j.getBoundingClientRect().height||j.offsetHeight,ee=new Map;g.current?.querySelectorAll("[data-chrome-section]").forEach(j=>{ee.set(j.dataset.chromeSection??"",T(j))});const te=j=>T(P)-(ee.get(j??"")??0),I=Array.from(M.children).map(j=>T(j)),Y=[];e.forEach((j,F)=>{const O=Y[Y.length-1],G=O?e[O[0]]:void 0;G&&j.group!=null&&G.group===j.group&&G.section===j.section?O.push(F):Y.push([F])});const R=[];let q=[],Z=0;const z=()=>{q.length&&R.push(q),q=[],Z=0};Y.forEach(j=>{const F=j.reduce((G,ie)=>G+I[ie],0),O=te(e[j[0]].section);q.length&&e[q[0]].section!==e[j[0]].section&&z(),F>O?j.forEach(G=>{q.length&&Z+I[G]>O+.01&&z(),q.push(G),Z+=I[G]}):(q.length&&Z+F>O+.01&&z(),j.forEach(G=>q.push(G)),Z+=F)}),z(),f(j=>j&&j.shape===w&&JSON.stringify(j.pages)===JSON.stringify(R)?j:{shape:w,pages:R})},[w,k,l,i,u,A]);const E=$o,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."]}),$=(M,P,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:s(M,P)})]})}),L=Array.from(new Set(e.map(M=>M.section??""))),U={...l?{"--report-page-w":l}:null,...i?{"--report-page-h":i}:null,...u?{"--report-margin":u}:null,...d};return n.jsxs("div",{ref:p,className:Be("report-doc",c),style:U,tabIndex:_?0:void 0,role:_?"group":void 0,"aria-label":_?h("report.previewRegion","\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30"):void 0,children:[n.jsxs("div",{className:"report-doc__measure","aria-hidden":!0,children:[n.jsx("div",{ref:y,className:"report-doc__ruler"}),n.jsx("div",{ref:g,children:L.map(M=>{const P=$(1,1,M||void 0);return n.jsxs("div",{"data-chrome-section":M,children:[P.header,P.footer]},M)})}),n.jsx("div",{ref:m,className:"report-doc__measure-blocks",children:e.map(M=>n.jsx("div",{children:M.content},M.id))})]}),v&&n.jsx("div",{className:"report-doc__pages",children:v.map((M,P)=>{const{header:T,footer:ee}=$(P+1,v.length,e[M[0]].section);return n.jsxs("section",{className:"report-doc__page",children:[T,M.map(te=>n.jsx("div",{children:e[te].content},e[te].id)),ee]},P)})})]})}function bw({title:e,fields:t,columns:a=4,className:r,style:s}){return n.jsxs("div",{className:Be("report-info",r),style:{"--report-info-cols":String(a),...s},children:[e&&n.jsx("p",{className:"report-info__title h5b",children:e}),n.jsx("div",{className:"report-info__grid",children:t.map((l,i)=>n.jsxs("div",{className:"report-info__field body-2",children:[n.jsx("span",{className:"report-info__label body-3",children:l.label}),n.jsx("span",{className:"report-info__value",children:l.value})]},i))})]})}const ia=new Map;let Ir=null;const gw=12;function yw(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 Or(){const e=new Map;for(const t of ia.keys()){if(!t.isConnected)continue;const a=yw(t),r=e.get(a)??[];r.push(t),e.set(a,r)}for(const t of e.values()){t.sort((r,s)=>r.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1);let a=0;for(const r of t){a>0?r.style.setProperty("--update-alert-stack-offset",`${a}px`):r.style.removeProperty("--update-alert-stack-offset");const s=r.getBoundingClientRect().height;s>0&&(a+=s+gw)}}}function vw(e){return typeof window>"u"?()=>{}:(ia.set(e,(ia.get(e)??0)+1),ia.get(e)===1&&typeof ResizeObserver<"u"&&(Ir??(Ir=new ResizeObserver(()=>Or())),Ir.observe(e)),Or(),()=>{const t=(ia.get(e)??1)-1;if(t>0){ia.set(e,t),Or();return}ia.delete(e),Ir?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),Or()})}function _w({title:e,message:t,actionLabel:a,onAction:r,icon:s,onClose:l,className:i=""}){const{t:u}=_e.useTranslation(),c=a??u("common.update","\uC5C5\uB370\uC774\uD2B8"),d=o.useRef(null),h=o.useRef(!1);return o.useLayoutEffect(()=>{const p=d.current,m=p?.parentElement?.closest(".update-alert-stack")??p,g=m?vw(m):null;return()=>{g?.(),h.current&&p&&p.contains(document.activeElement)&&mr(p)}},[]),n.jsxs("div",{ref:d,className:Be("update-alert",i),role:"alert",children:[l&&n.jsx("button",{type:"button",className:"update-alert__close",onClick:()=>{h.current=!0,l()},"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"}),n.jsxs("div",{className:"update-alert__top",children:[n.jsx("div",{className:"update-alert__icon",children:s??n.jsx(Us,{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 xw({title:e,titleLevel:t=3,description:a,topActions:r,children:s,footerLeft:l,footerRight:i,ariaLabel:u,onClick:c,draggable:d,onDragStart:h,onDragEnd:p,className:m}){const g=t?`h${t}`:"div",y=l!=null||i!=null,C=s!=null&&s!==!1,f=o.useCallback(_=>{c&&_.target===_.currentTarget&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),c())},[c]);return n.jsxs("div",{className:Be("training-card",c?"training-card--clickable":"",m),onClick:c,onKeyDown:c?f:void 0,role:c?"button":void 0,"aria-label":c?u??(typeof e=="string"?e:void 0):void 0,tabIndex:c?0:void 0,draggable:d,onDragStart:h,onDragEnd:p,children:[n.jsxs("div",{className:"training-card__header",children:[n.jsxs("div",{className:"training-card__title-row",children:[typeof e=="string"?n.jsx(g,{className:"training-card__title h4",children:e}):e,r!=null&&n.jsx("div",{className:"training-card__top-actions",onClick:_=>_.stopPropagation(),children:r})]}),a!=null?typeof a=="string"?n.jsx("p",{className:"training-card__description body-3",children:a}):a:n.jsx("p",{className:"training-card__description body-3","aria-hidden":"true",children:" "})]}),C&&n.jsx("div",{className:"training-card__body",children:s}),y&&n.jsxs("div",{className:"training-card__footer",children:[l!=null&&n.jsx("div",{className:"training-card__footer-left",children:l}),i!=null&&n.jsx("div",{className:"training-card__meta",children:i})]})]})}function ww({title:e,titleLevel:t=3,count:a,collapsed:r=!1,onToggle:s,beforeSort:l,sort:i,actions:u,empty:c=!1,emptyContent:d,dragOver:h=!1,onDragOver:p,onDragLeave:m,onDrop:g,children:y,className:C}){const{t:f}=_e.useTranslation(),_=o.useId(),b=t?`h${t}`:"span",w=s!=null,v=Be("training-card-group",h&&"training-card-group--dragover",r&&"training-card-group--collapsed",w&&"training-card-group--collapsible",C);return n.jsxs("div",{className:v,onDragOver:p,onDragLeave:m,onDrop:g,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:[w&&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?f("common.expandFor",{name:e}):f("common.collapseFor",{name:e}):r?f("common.expand","\uD3BC\uCE58\uAE30"):f("common.collapse","\uC811\uAE30"),className:"training-card-group__chevron","aria-expanded":!r,onClick:s}),typeof e=="string"?n.jsx(b,{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}),(l!=null||i||u!=null)&&n.jsxs("span",{className:"training-card-group__actions",onClick:k=>k.stopPropagation(),children:[l,i&&n.jsx(_n,{size:40,options:i.options,value:i.value,placeholder:i.placeholder,onChange:i.onChange,ariaLabel:typeof e=="string"&&e?f("common.sortFor",{name:e}):void 0}),u]})]}),!r&&(c?n.jsx("div",{className:"training-card-group__empty body-3",children:d}):n.jsx("div",{className:"training-card-group__grid",children:y}))]})}const Bw="speechear:saved_word_tables";function kw(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 Aw(){try{const e=localStorage.getItem(Bw);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(kw):[]}catch{return[]}}function xd(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 $s(e){return e.map(t=>t.homonum!=null?`${t.word}#${t.homonum}`:t.word).join("|")}function Nw(e){const t=new Set;return e.map(a=>{let r=a.id;for(let s=2;t.has(r);s++)r=`${a.id}~${s}`;return t.add(r),r===a.id?a:{...a,id:r}})}function Ew({title:e,titleIcon:t,disc:a,filterTitle:r,filterCollapsible:s,filterDefaultCollapsed:l,filterCollapsed:i,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:d,code:h,baseItem:p,baseContentTypes:m,cellCapacity:g,maxItemsPerPage:y,items:C,onSaveComplete:f,onLoad:_,onRemoveItem:b,onCopyItem:w,onReplaceItem:v,onPickForm:k,onReset:x,resetLabel:A,saveButtonLabel:B,secondarySaveButtonLabel:E,onReorder:D,showCellCount:N,onAddItem:$,className:L,renderSavePopup:U,renderWordSearch:M,hideControls:P,saveOnly:T,tableName:ee,nameValue:te,onNameChange:I,descriptionValue:Y,onDescriptionChange:R,namePlaceholder:q,descriptionPlaceholder:Z,existingNames:z,editingName:j,onCancel:F,initialItemsPerPage:O,renderCellAction:G,actionsLeftExtra:ie}){const{t:K}=_e.useTranslation(),pe=A??K("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),X=C===void 0,H=!!I,[ne,V]=o.useState([]),W=(te??"").trim(),oe=W||(q??"").trim(),xe=(Y??"").trim()||(Z??"").trim(),be=(z??[]).map(he=>he.trim().toLowerCase()),me=[j?.trim().toLowerCase(),...ne].filter(he=>!!he),ke=[...be];for(const he of me){const Pe=ke.indexOf(he);Pe!==-1&&ke.splice(Pe,1)}const Le=W!==""&&ke.includes(W.toLowerCase()),[Me,le]=o.useState(Array(4).fill(null)),[ve,$e]=o.useState(4),[Ae,Ie]=o.useState(null),ze=Me.slice(0,ve),dt=!!d?.show,[st,et]=o.useState(!0),[gt,Se]=o.useState(!0),Ge=d&&{...d,top:st,bottom:gt},[we,qe]=o.useState("landscape"),[Ye,mt]=o.useState([...bc]),[wt,yt]=o.useState("show"),[Et,at]=o.useState(!0),[rt,Dt]=o.useState(!0),Bt=o.useRef(null),Lt=o.useRef([]),[It,xt]=o.useState(O==="all"?Number.POSITIVE_INFINITY:O??8),[lt,Ct]=o.useState("right"),[it,_t]=o.useState(!1),[ut,St]=o.useState(!1),{toastMessage:ue,toastType:Te,showWarning:Ne,clearToast:tt}=Gi("warning"),pt=o.useCallback(()=>Ie(null),[Ie]);$&&!X&&!N&&!g&&At("word-table-block-add-without-cell-count",'[WordTableBlock] \uD45C\uC2DC \uBAA8\uB4DC\uC5D0\uC11C onAddItem \uC740 cellCapacity \uB098 showCellCount \uC640 \uD568\uAED8 \uC918\uC57C "\uCD94\uAC00\uD558\uAE30" \uCE78\uC774 \uC0DD\uAE34\uB2E4.'),p&&X&&At("word-table-block-base-item-in-edit","[WordTableBlock] baseItem \uC740 \uD45C\uC2DC \uBAA8\uB4DC(items \uB97C \uC8FC\uB294 \uAF34)\uC5D0\uC11C\uB9CC \uAC78\uB9B0\uB2E4 \u2014 \uD3B8\uC9D1 \uACA9\uC790\uC5D0\uB294 \uC11C\uC9C0 \uC54A\uB294\uB2E4.");const[jt,je]=o.useState(()=>Math.max(C?.length??1,1)),nt=Math.max(g??0,C?.length??0,1),ae=X?ve:N?Math.max(jt,C?.length??1,1):nt,{width:ye,height:He}=aa[we],Ke=!X&&!N,vt=Math.max(1,Math.min(nt,y??nt)),Ue=Math.min(It,vt),ht=Ke?Ue:ae,cn=Math.ceil((C?.length??0)/Math.max(1,ht)),dn=(C?.length??0)<nt?Math.floor((C?.length??0)/Math.max(1,ht))+1:0,zt=Ke?Math.max(1,cn,dn):0,qt=Ke?Array.from({length:zt},(he,Pe)=>(C??[]).slice(Pe*ht,(Pe+1)*ht)):null,Ht=!!qt&&qt.length>1,Nt=X?ze.some(he=>he!==null&&he.length>1):(C??[]).some(he=>(he.words??[]).length>1),An=ee?.trim()||`${Yl(Fa())} ${Nt?K("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):K("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,an=o.useCallback(()=>Ht?Lt.current.filter(he=>he!==null):Bt.current?[Bt.current]:[],[Ht]),{print:$t,openNewWindow:Pt,downloadHtml:Ut}=hs({getElements:an,paperW:ye,paperH:He,fileName:An,onPopupBlocked:()=>{Ne(K("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."))}}),Jt=he=>{$e(he),le(Pe=>Pe.length>=he?Pe:[...Pe,...Array(he-Pe.length).fill(null)]),Ie(null)},gn=he=>{le(Pe=>{const Qe=[...Pe];return Qe[he]=null,Qe}),Ae===he&&Ie(null)},Zt=he=>{if(Ae===null)return;const Pe=Ae;le(kt=>{const Tt=[...kt];return Tt[Pe]=he.length>0?he:null,Tt});const Qe=ze.findIndex((kt,Tt)=>Tt>Pe&&kt===null);Ie(Qe!==-1?Qe:null)},xn=X?ze.some(he=>he?.some(Pe=>!!Pe.colloquialPronunciation)):(C??[]).some(he=>(he.words??[]).some(Pe=>!!Pe.colloquialLabel)),pn=!X&&gc([...p?[p]:[],...C??[]]),Qt=o.useMemo(()=>pa()?X?Me.slice(0,ve).flatMap(he=>(he??[]).map(Pe=>[Pe.word,Pe.homonum])):(he=>he.flatMap(Pe=>(Pe.words??[]).map(Qe=>[Qe.label,Qe.homonum])))([...p?[p]:[],...C??[]]):[],[X,Me,ve,C,p]),[Gt,Nn]=o.useState(!1);o.useEffect(()=>{if(Qt.length===0)return;let he=!1;return Promise.all(Qt.map(([Pe,Qe])=>Ml(Pe,Qe))).then(Pe=>{he||Nn(Pe.some(Boolean))},()=>{}),()=>{he=!0}},[Qt]);const de=Qt.length>0&&Gt,Ee=o.useMemo(()=>[...X||N?[{label:K("wordTable.filter.columns","\uCE78 \uC218"),items:U4.map(he=>({value:`${he}\uCE78`,displayLabel:K("wordTable.filter.column",{count:he})})),display:"segmented"}]:[],...Ke&&(C?.length??0)>0?[Ac(K,{hasPairs:Nt,itemCount:nt,max:y})]:[],...Ht?[K4(K)]:[]],[K,X,N,Ke,C?.length,Nt,nt,y,Ht]),Fe={...X||N?{[K("wordTable.filter.columns","\uCE78 \uC218")]:`${ae}\uCE78`}:{},...Ke&&(C?.length??0)>0?{[K(Nt?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${Ue}\uAC1C`}:{},...Ht?{[K("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:lt}:{}},Ze=(he,Pe)=>{Pe===K("wordTable.filter.columns","\uCE78 \uC218")?X?Jt(parseInt(he)):je(parseInt(he)):Pe===K(Nt?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")?xt(Nc(parseInt(he),nt)):Pe===K("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&Ct(Ec(he))},Oe=X?Nw(ze.filter(he=>he!==null&&he.length>0).map(he=>({id:$s(he),words:he.map(xd)}))):C??[],J=()=>{X&&le(he=>he.length>ve?he.slice(0,ve):he)},ce=(he=!1)=>{if(St(he),H&&f){const Pe=oe.trim().toLowerCase();Pe&&V(Qe=>Qe.includes(Pe)?Qe:[...Qe,Pe]),f(oe,Oe,xe||void 0,he),J();return}if(T&&f){f("",Oe,void 0,he),J();return}if(f){_t(!0);return}Ut()},[De,Ve]=o.useState(!1),[Xe,Je]=o.useState(""),ct=Xe.trim(),ft=ct!==""&&be.includes(ct.toLowerCase()),ge=()=>{Je(oe?K("wordTable.save.copyName",{name:oe,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),Ve(!0)},S=()=>{!ct||ft||!f||(f(ct,Oe,xe||void 0,!0),J(),Ve(!1))},Q=Oe.length===0,Ce=Q||H&&(oe===""||Le),Re=()=>{if(Q){Ne(K("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(H&&oe===""){Ne(K("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}H&&Le&&Ne(K("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},We=n.jsx(xa,{items:Oe,orientation:we,contentTypes:Ye,baseItem:p,baseContentTypes:m,cutLine:wt,showOutline:Et,showDivLine:rt,count:ae});return n.jsxs(n.Fragment,{children:[n.jsxs(_a,{type:"page",icon:t,title:e,disc:a,className:Be("word-table-block",L),children:[De&&n.jsx(Pn,{size:"small",title:E??K("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>Ve(!1),footer:({closeWithAnimation:he})=>n.jsxs(n.Fragment,{children:[n.jsx(fe,{htmlType:"button",size:48,type:"bar",label:K("common.cancel","\uCDE8\uC18C"),onClick:he}),n.jsx(fe,{htmlType:"button",size:48,type:"bar",variant:"main",label:K("common.save","\uC800\uC7A5"),disabled:!ct||ft,onClick:S})]}),children:n.jsx(Kn,{label:K("wordTable.save.nameLabel","\uC774\uB984"),value:Xe,onChange:Je,placeholder:K("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:S,error:ft?K("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),it&&f&&U?.({defaultName:typeof e=="string"?e:K("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:We,previewW:ye,previewH:He,items:Oe,existingNames:Aw().map(he=>he.name),saveAsNew:ut,onSave:(he,Pe)=>{f(he,Oe,Pe,ut),J(),_t(!1)},onCancel:()=>_t(!1)}),(X||$)&&Ae!==null&&M?.({cellIndex:Ae,onConfirm:X?Zt:he=>{if($){const Pe=he[0];if(Pe){const Qe=new Set((C??[]).map(Tt=>Tt.id));let kt=$s([Pe]);for(let Tt=2;Qe.has(kt);Tt++)kt=`${$s([Pe])}~${Tt}`;$({id:kt,words:[xd(Pe)]})}}Ie(null)},onClose:pt}),!P&&n.jsx(us,{title:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,hasImage:de,hasColloquial:xn,hasCaption:pn,contentTypes:Ye,orientation:we,showOutline:Et,cutLine:wt,showDivLine:rt,setters:{setContentTypes:mt,setOrientation:qe,setShowOutline:at,setCutLine:yt,setShowDivLine:Dt,setShowTopInfo:et,setShowBottomInfo:Se},showCutLine:(Ke?ht:ae)>1,showDivLine2:Nt,middleSections:Ee,extraSelected:Fe,onExtraSelect:Ze,showPaperBands:dt,showTopInfo:st,showBottomInfo:gt}),Ht&&qt?n.jsx("div",{className:"word-table-block__pages",children:qt.map((he,Pe)=>n.jsx(xa,{orientation:we,contentTypes:Ye,cutLine:wt,showOutline:Et,showDivLine:rt,count:ht,items:he,baseItem:p,baseContentTypes:m,onRemoveItem:b,onCopyItem:w,onReplaceItem:v,onPickForm:k,onReorder:D&&((Qe,kt)=>D(Qe+Pe*ht,kt+Pe*ht)),indexOffset:Pe*ht,totalCount:C?.length??0,renderCellAction:G&&((Qe,kt)=>G(Qe+Pe*ht,kt)),showFillerAdd:!!$,onActivateCell:$?(Qe=>Ie(Qe+Pe*ht)):void 0,addableCount:Math.max(0,Math.min(ht,nt-Pe*ht)),brand:Ge,code:h,contentRef:Qe=>{Lt.current[Pe]=Qe},pageNumber:{current:Pe+1,total:qt.length},pageNumberPosition:lt},Pe))}):n.jsx(xa,{orientation:we,contentTypes:Ye,cutLine:wt,showOutline:Et,showDivLine:rt,count:ae,items:X?void 0:C??[],baseItem:X?void 0:p,baseContentTypes:m,editCells:X?ze:void 0,activeCell:Ae,onActivateCell:X||$?Ie:void 0,onRemoveCell:X?gn:void 0,onRemoveItem:X?void 0:b,onCopyItem:X?void 0:w,onReplaceItem:X?void 0:v,onPickForm:X?void 0:k,onReorder:X?void 0:D,renderCellAction:X?void 0:G,brand:Ge,code:h,showFillerAdd:!!$,contentRef:Bt}),!P&&!T&&ie!=null&&n.jsx("div",{className:"word-table-block__table-actions",children:ie}),H&&!P&&n.jsxs(Qa,{size:"medium",labelWidth:64,useBorder:!1,useRowBorder:!1,className:"word-table-block__meta",children:[n.jsx(un,{variant:"custom",label:K("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(Kn,{required:!0,value:te??"",onChange:I,placeholder:q?q+K("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):K("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:K("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:Le?K("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:he=>{(he.key==="Tab"&&!he.shiftKey||he.key===" ")&&!(te??"").trim()&&(q??"").trim()&&(he.preventDefault(),I?.(q??""))}})}),n.jsx(un,{variant:"custom",label:K("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(Kn,{value:Y??"",onChange:R,placeholder:Z?Z+K("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):K("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:K("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:he=>{(he.key==="Tab"&&!he.shiftKey||he.key===" ")&&!(Y??"").trim()&&(Z??"").trim()&&(he.preventDefault(),R?.(Z??""))}})})]})]}),!P&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!T&&_&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:K("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:_}),!T&&x&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:pe,onClick:x}),!T&&n.jsx(fe,{htmlType:"button",size:40,type:"bar",label:K("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:Pt})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[F&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:K("common.cancel","\uCDE8\uC18C"),onClick:F}),!T&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:K("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:$t}),E&&n.jsx(fe,{htmlType:"button",size:"56",type:"bar",label:E,onClick:()=>H?ge():ce(!0),disabled:Q,onDisabledClick:()=>{Ne(K("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:B??K("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>ce(!1),disabled:Ce,onDisabledClick:Re})]})]}),n.jsx(va,{message:ue,type:Te,onClose:tt})]})}const Dw=8;function wd({items:e,className:t}){const{t:a}=_e.useTranslation(),r=o.useRef(null),[s,l]=o.useState(null),i=o.useCallback(()=>l(r.current?.getBoundingClientRect()??null),[]),u=o.useCallback(()=>l(null),[]),c=fr(!!s,b=>{b?i():u()},r),d=e.length,h=d<=3?1:2,p=Dw,m=d>p,g=e.slice(0,m?p-1:p),y=d-g.length,C=e.slice(g.length).map(b=>b.words?.length?b.words.map(w=>w.label).join(" / "):b.id),f=Math.ceil(Math.min(d,p)/h)||1,_=h*f;return n.jsx("div",{className:Be("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${h}, 1fr)`},children:Array.from({length:_},(b,w)=>{if(m&&w===p-1)return n.jsxs("div",{ref:r,className:"word-table-thumb__cell word-table-thumb__cell--more",tabIndex:0,"aria-label":a("wordTable.thumbMoreAria",{count:y,words:C.join(", "),defaultValue:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}"}),onPointerEnter:k=>{Un(k)||i()},onPointerLeave:k=>{Un(k)||u()},onFocus:()=>{ea()||i()},onBlur:u,onClick:k=>{k.stopPropagation(),c.touchPress()},children:[n.jsx("span",{className:"word-table-thumb__more body-3",children:a("wordTable.thumbMore",{count:y,defaultValue:"+{{count}}"})}),s&&C.length>0&&n.jsx(qn,{anchorRect:s,items:C,showIndex:!1,closeOnOutsideClick:!1})]},w);const v=g[w];return v?n.jsx("div",{className:"word-table-thumb__cell",children:(v.words?.length?v.words:[{label:v.id}]).map((k,x)=>n.jsxs(o.Fragment,{children:[x>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:k.label})]},x))},w):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},w)})})}function Sw({items:e,name:t,description:a,createdAt:r,code:s,published:l,publishedLabel:i,shared:u,sharedLabel:c,isNew:d,publisherName:h,publishedAt:p,likeCount:m,downloadCount:g,onPublisherClick:y,selected:C,onClick:f,onMore:_,titleNode:b,className:w}){const{t:v}=_e.useTranslation(),k=b!=null,x=h!=null||p!=null||m!=null||g!=null,A=B=>{B.target===B.currentTarget&&!k&&(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),f?.())};return n.jsxs("div",{className:Be("word-table-button",C?"word-table-button--selected":"",x?"":"word-table-button--no-footer",w),role:"button",tabIndex:0,"aria-label":s?`${t} (${s})`:t,onClick:k?void 0:f,onKeyDown:A,children:[d&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":v("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(wd,{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:[b??n.jsx("div",{className:"word-table-button__title h4",children:t}),a&&n.jsx("div",{className:"word-table-button__desc body-3",children:a})]}),_&&!k&&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:B=>{B.stopPropagation(),_(B)}})]}),(s||r||l||u)&&n.jsxs("div",{className:"word-table-button__meta-row",children:[n.jsx("span",{className:"word-table-button__meta-left",children:n.jsx("span",{className:"word-table-button__meta caption-1",children:r?Kl(r,v):""})}),n.jsxs("span",{className:"word-table-button__meta-right",children:[(l||u)&&n.jsxs("span",{className:"word-table-button__badges",children:[l&&n.jsx(ln,{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(ln,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:c??v("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),s&&n.jsx("span",{className:"word-table-button__code caption-1",children:s})]})]}),x&&n.jsxs("div",{className:"word-table-button__footer",children:[n.jsxs("span",{className:"word-table-button__store-by",children:[h&&(y?n.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":v("wordTable.publisherFilter",{name:h,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:B=>{B.stopPropagation(),y()},children:h}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:h})),p&&n.jsx("span",{className:"training-card__date body-4",children:Kl(p,v)})]}),n.jsxs("span",{className:"word-table-button__store-stats",children:[m!=null&&n.jsx(ln,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(m),"aria-label":v("common.likeCount",{count:m,defaultValue:`\uC88B\uC544\uC694 ${m}`})}),g!=null&&n.jsx(ln,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(g),"aria-label":v("common.downloadCount",{count:g,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${g}`})})]})]})]})}/**
1042
1044
  * @license lucide-react v1.38.0 - ISC
1043
1045
  *
1044
1046
  * This source code is licensed under the ISC license.
@@ -1048,4 +1050,4 @@ ${y.badge}`:y.badge:void 0;if(x&&c(y.code))return null;if(!y.badge&&!h)return p(
1048
1050
  *
1049
1051
  * This source code is licensed under the ISC license.
1050
1052
  * See the LICENSE file in the root directory of this source tree.
1051
- */const Mw=[["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"}]],Lw=re("circle-x",Mw);function $w(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function Rs({icon:e,label:t,state:a,pct:r,subText:s}){const{t:l}=xe.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(Zs,{size:22,color:"white",strokeWidth:2.5}):c?n.jsx(Lw,{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(un,{variant:"sub",fill:"soft",size:"small",label:l("common.done","\uC644\uB8CC")}):c?n.jsx(un,{variant:"danger",fill:"soft",size:"small",label:l("common.failed","\uC2E4\uD328")}):(s||r!==void 0)&&n.jsxs("span",{className:"wdup-phase-card__sub body-3",children:[s,s&&r!==void 0?` \xB7 ${r}%`:r!==void 0?`${r}%`:""]})]}),!u&&n.jsx("div",{className:"wdup-bar",children:n.jsx("div",{className:`wdup-bar__fill${i?" wdup-bar__fill--done":c?" wdup-bar__fill--error":""}${a==="active"&&r===void 0?" wdup-bar__fill--indeterminate":""}`,style:{width:r!==void 0||i||c?`${c?100:d}%`:void 0}})})]})]})}function Rw({title:e,progress:t,onDone:a,onRetry:r,onClose:s,inline:l}){const{t:i}=xe.useTranslation(),{phase:u,error:c,wordCount:d,imagePage:h,imageDone:p,imageTotal:C,pairPercent:g}=t,_=$w(u),m=u==="done",f=!!c;function v(N){return f&&_===N?"error":_>N?"done":_===N?"active":"pending"}const b=v(1),w=v(2),y=v(3),B=u==="image-match"&&C?Math.round((p??0)/C*100):void 0,x=o.useMemo(()=>{if(w!=="done"){if(u==="image-list")return i("wordData.checkingPage",{page:h??1});if(u==="image-match"&&C)return i("wordData.imageCount",{done:Co(p),total:Co(C)})}},[w,u,h,C,p,i]);return n.jsx(Pn,{inline:l,className:"popup--word-data-update",title:e,footer:f&&r?n.jsx(Ce,{htmlType:"button",size:56,variant:"main",onClick:r,children:i("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):f?n.jsx(Ce,{htmlType:"button",size:56,variant:"main",onClick:s??a,children:i("common.close","\uB2EB\uAE30")}):n.jsx(Ce,{htmlType:"button",size:56,variant:"main",disabled:!m,onClick:a,children:i("common.done","\uC644\uB8CC")}),children:n.jsxs("div",{className:"wdup-cards",children:[n.jsx(Rs,{icon:n.jsx(qs,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:b,subText:b==="active"?i("wordData.downloadingCount",{n:Co(d),count:d}):void 0}),n.jsx(Rs,{icon:n.jsx(Tw,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:w,pct:B,subText:x}),n.jsx(Rs,{icon:n.jsx(Ks,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:y,pct:y==="active"?g??0:void 0,subText:void 0})]})})}function Pw({enabled:e=!1,renderResultPopup:t}={}){const{t:a}=xe.useTranslation(),[r,s]=o.useState(null),[l,i]=o.useState(null),u=g=>{let _=null;g==="noise"?_={score:3,contextsLength:5,results:[{sentence:"\uBB38\uC7A5 A",judgement:!0,wording:"\uC798 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 B",judgement:!1,wording:"\uC548 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 C",judgement:!0,wording:"\uC798 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 D",judgement:null,wording:"\uC548 \uD568",useAnswer:!1},{sentence:"\uBB38\uC7A5 E",judgement:!1,wording:"\uC548 \uB4E4\uB9BC",useAnswer:!1}]}:g==="short"?_={score:2,contextsLength:3,results:[{sentence:"\uBE44\uBE54\uBC25 \uC124\uBA85",answer:"\uBE44\uBE54\uBC25",selected:"\uBE44\uBE54\uBC25",selectedText:"\uBE44\uBE54\uBC25",correct:!0},{sentence:"\uBCF4\uC308 \uC124\uBA85",answer:"\uBCF4\uC308",selected:"\uC871\uBC1C",selectedText:"\uC871\uBC1C",correct:!1},{sentence:"\uCE7C\uAD6D\uC218 \uC124\uBA85",answer:"\uCE7C\uAD6D\uC218",selected:void 0,selectedText:void 0,correct:void 0}]}:g==="long"?_={score:4,contextsLength:4,results:[{sentence:"\uAE34 \uC774\uC57C\uAE30 1",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 1",selectedText:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 1",correct:!0},{sentence:"\uAE34 \uC774\uC57C\uAE30 2",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 2",selectedText:"\uC120\uD0DD \uD14D\uC2A4\uD2B8 2",correct:!1},{sentence:"\uAE34 \uC774\uC57C\uAE30 3",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 3",selectedText:void 0,correct:void 0},{sentence:"\uAE34 \uC774\uC57C\uAE30 4",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 4",selectedText:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 4",correct:!0}]}:g==="order"&&(_={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(_),s(g)},c=o.useCallback(()=>{s(null),i(null)},[]),d=o.useCallback(()=>u("noise"),[]),h=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:h,children:a("debug.showResult",{type:"ShortStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:p,children:a("debug.showResult",{type:"LongStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:C,children:a("debug.showResult",{type:"Order",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})})]}),r&&l?t?.({score:l.score,contextsLength:l.contextsLength,results:l.results,onReplay:c,onClose:c}):null]}):null}exports.Accordion=n2,exports.ActionCard=my,exports.Alert=q2,exports.AppHeader=i2,exports.AudioMeter=Xo,exports.AudioPlayer=xs,exports.Avatar=J2,exports.Badge=un,exports.BarChart=Zv,exports.BarChartControls=zu,exports.Board=fv,exports.BottomNav=Xi,exports.BrandIdentity=nu,exports.BrandLogo=Hv,exports.Breadcrumb=tv,exports.BulkBar=Fv,exports.Button=Ce,exports.CONSENT_KINDS=$u,exports.CORE_VERSION=ry,exports.Calendar=v4,exports.CardStep=pd,exports.ChartLegend=Ho,exports.ChartSection=Vo,exports.ChartTotal=tr,exports.Checkbox=Oo,exports.ChoiceChips=E_,exports.CircleBadge=Dn,exports.CodeBox=Iv,exports.ColorPicker=sv,exports.CompanyMeta=xv,exports.ConfirmPopup=yd,exports.ConfirmStep=ud,exports.ConfirmWithTextStep=cd,exports.ConsentRecordPopup=Mv,exports.ContrastFilterPanel=aw,exports.CoreScope=Cy,exports.CountTile=pv,exports.CouponInputPopup=sw,exports.DEFAULT_NOISE_SETTINGS=oa,exports.DatePicker=Lu,exports.DebugResultLauncher=Pw,exports.DescriptionTooltip=qn,exports.DeviceSideTable=b4,exports.Dialog=Cv,exports.Divider=W2,exports.Dropdown=_n,exports.EffectPartyPopper=Ms,exports.EffectPartyPopperHost=uw,exports.EmptyState=py,exports.ErrorState=hy,exports.FILTER_ALL_VALUE=An,exports.FileUpload=ev,exports.FilterPanel=Fn,exports.FilterSectionInfo=Ga,exports.Footer=D_,exports.GameIntro=Qv,exports.Header=au,exports.Icon=rt,exports.IconGridMenu=N_,exports.IconRenderer=rt,exports.InfoTooltip=Mn,exports.ItemActions=zv,exports.LEVEL_MAX=Ba,exports.LINE_CHART_HOVER_DELAY_MS=Wu,exports.LandingBottomSticky=j_,exports.LandingHeader=S_,exports.LineChart=Jv,exports.ListPopup=rw,exports.ListenStep=id,exports.Loader=Ca,exports.MARKS=kr,exports.MARK_ICON=oc,exports.MARK_VARIANT=sc,exports.MediaQueryOverrideContext=si,exports.MenuTooltip=Va,exports.NOISE_RATIO_MAX=ar,exports.NOISE_RATIO_STEP=$c,exports.NoisePlayerContext=gs,exports.NoiseSettingsTooltip=ed,exports.NoticeBox=by,exports.NotifyTextPreview=Wv,exports.OrderListStep=dd,exports.PASS_CARD_BG_VARS=na,exports.POS_LABEL=uc,exports.PROMO_BANNER_BG_COMPONENTS=Fi,exports.PROMO_BANNER_BG_OPTIONS=Ny,exports.PROMO_BANNER_BG_VARS=Oa,exports.Page=Lr,exports.PageTitle=cw,exports.Pagination=zo,exports.Panel=Qa,exports.PanelGrid=Nv,exports.PanelRow=cn,exports.PanelRowDevice=kv,exports.PassCard=hu,exports.PassCardBg=I2,exports.PassCardBgIHAB=F2,exports.PassCardBgLeftColorGrid=O2,exports.PassCardBgTwoCircle=iu,exports.PaymentPlan=P2,exports.PersonCard=bv,exports.PhonemeFilterPanel=nw,exports.PhonemeSelectBlock=ew,exports.Popup=Pn,exports.ProgressBar=s4,exports.ProgressIndicator=Xu,exports.PromoBanner=Qy,exports.PromoBannerBgDark=Bi,exports.PromoBannerBgDeep=gi,exports.PromoBannerBgDiagonal=Ei,exports.PromoBannerBgDots=Si,exports.PromoBannerBgInstagram=Ii,exports.PromoBannerBgMain=pi,exports.PromoBannerBgNaver=Ri,exports.PromoBannerBgOutline=Ti,exports.PromoBannerBgRadial=ki,exports.PromoBannerBgSoft=mi,exports.PromoBannerBgSoftSub=vi,exports.PromoBannerBgSub=fi,exports.PromoBannerBgSuccess=Li,exports.PromoBannerBgWarm=xi,exports.PublicationCard=yv,exports.Radio=bu,exports.RadioGroup=H2,exports.Rating=av,exports.ReportDocument=fw,exports.ReportInfoPanel=bw,exports.RingChart=t4,exports.SENTENCE_TRAINING_TYPES=ms,exports.SearchSummary=K2,exports.Section=_a,exports.SectionHeadFloat=Pu,exports.SectionHeader=_v,exports.SegmentedControl=vn,exports.ShortcutBadge=fu,exports.SideNav=tu,exports.Slider=Gu,exports.SoundCompass=z2,exports.SplashLogo=vv,exports.StatChart=n4,exports.SummaryStrip=mw,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=yu,exports.Table=Qo,exports.TableFilterPanel=us,exports.Tabs=Y2,exports.TextBoxTooltip=Tr,exports.TextField=Kn,exports.Timeline=gv,exports.Toast=va,exports.Toggle=Bu,exports.Toolbar=Wo,exports.Tooltip=Bn,exports.TooltipInfo=Mn,exports.TooltipTextBox=Tr,exports.TopBanner=e2,exports.TrainingBlock=x4,exports.TrainingBlockButton=Ro,exports.TrainingBlockGrid=B4,exports.TrainingCard=xw,exports.TrainingCardGroup=ww,exports.TrainingPagePopup=Yn,exports.TrainingPagePopupBottom=td,exports.TrainingPagePopupTitle=nd,exports.TrainingResultPopup=fd,exports.TrainingStep=sa,exports.TrainingStepAudioPlayer=xs,exports.TrainingStepBullet=Kc,exports.TrainingStepCard=Jc,exports.TrainingStepConfirm=Bs,exports.TrainingStepConfirmWithText=As,exports.TrainingStepListen=ks,exports.TrainingStepOrderList=Ns,exports.TrainingStepTextBox=Xc,exports.TrainingStepTitle=Zc,exports.TrainingTooltip=vu,exports.TrainingWordCard=ns,exports.UpdateAlert=_w,exports.WAVE_A_MAX=q_,exports.WAVE_H1_PX=vs,exports.WAVE_HMAX_PX=V_,exports.WORD_LABEL_I18N_KEYS=L4,exports.WORD_TABLE_PAPER=aa,exports.WORD_TYPE_LABEL=cc,exports.WordDataProvider=hw,exports.WordDataUpdatePopup=Rw,exports.WordImageTooltip=gd,exports.WordSearchFilterPanel=tw,exports.WordSearchResultBlock=Jx,exports.WordTable=xa,exports.WordTableBlock=Ew,exports.WordTableButton=Sw,exports.WordTablePopup=Q4,exports.WordTableThumbnail=wd,exports.buildMonthChartData=qv,exports.cellKey=l_,exports.cellLabel=s_,exports.cellsForLabels=y_,exports.clearPassCardBgTheme=Rn,exports.clearPromoBannerBgTheme=tn,exports.closeTrainingPopup=xx,exports.companyTypeLabel=dw,exports.createTrainingScenario=Ax,exports.cx=ke,exports.deriveNoiseContexts=jx,exports.derivePassCard=ou,exports.draftValues=A_,exports.effectiveNoiseVolume=fs,exports.effectiveSpeechVolume=Pc,exports.expandSlashLabel=ss,exports.formatDuration=v_,exports.getControlDateRange=e4,exports.getPayloadTimestamp=Ds,exports.getPromoBannerBgTheme=Bo,exports.getSelectedFromPayload=Nx,exports.getSelectedText=Ex,exports.getStepPayload=sd,exports.getSteppedPayload=Dx,exports.injectPassCardBgTheme=$n,exports.injectPromoBannerBgTheme=en,exports.isSelectionCorrect=Sx,exports.labelOfCellKey=Mc,exports.labelsForSave=o_,exports.levelToPct=M_,exports.markAfterClick=rc,exports.marksForSave=as,exports.mergeNoiseSettings=ra,exports.missesByType=C_,exports.monthKeyOf=nr,exports.monthKeyOfDate=qo,exports.nextFocus=d_,exports.nextMisses=m_,exports.noiseElementVolume=bs,exports.noiseRatioOf=rr,exports.pageStartIndexes=lc,exports.parseMonthKey=ya,exports.passCardBgIhabTheme=mu,exports.passCardBgLeftColorGridTheme=Cu,exports.passCardBgTwoCircleTheme=lu,exports.pctToLevel=L_,exports.posLabels=dc,exports.printWordTable=D4,exports.promoBannerBgDarkTheme=wi,exports.promoBannerBgDeepTheme=bi,exports.promoBannerBgDiagonalTheme=Ni,exports.promoBannerBgDotsTheme=Di,exports.promoBannerBgInstagramTheme=Pi,exports.promoBannerBgMainTheme=di,exports.promoBannerBgNaverTheme=$i,exports.promoBannerBgOutlineTheme=ji,exports.promoBannerBgRadialTheme=Ai,exports.promoBannerBgSoftSubTheme=yi,exports.promoBannerBgSoftTheme=hi,exports.promoBannerBgSubTheme=Ci,exports.promoBannerBgSuccessTheme=Mi,exports.promoBannerBgWarmTheme=_i,exports.recommendTables=b_,exports.regenerateUnpinned=B_,exports.removeItem=w_,exports.resolveTrainingItems=Bx,exports.resolveTrainingPopupMeta=rd,exports.reviewCells=t_,exports.reviewMeta=r_,exports.reviewSetPlan=f_,exports.reviewTableName=a_,exports.scoreKey=Ar,exports.scoreSheetHeader=i_,exports.shouldConfirmDiscard=E4,exports.splitTrainingVariants=wx,exports.summarize=N4,exports.summarizeMisses=h_,exports.tableTrends=c_,exports.toDraft=__,exports.toTrainingText=kx,exports.togglePin=x_,exports.uncoveredLabels=g_,exports.useAnchoredMenu=Ha,exports.useBarChartControl=Ou,exports.useCalendarMonth=Tu,exports.useComboboxSuggestions=Du,exports.useDiscardGuard=ow,exports.useFitScale=Cc,exports.useNoisePlayer=Er,exports.useSoundCompassExam=qy,exports.useToastLifecycle=Yu,exports.useWordData=pw,exports.useWordTableDisplaySettings=jc,exports.useWordTablePrint=hs,exports.waveBarPx=Sr,exports.waveBarVal=jr,exports.weakItems=u_,exports.weekValueOf=Uo,exports.withStepTimes=od,exports.wordTypeLabels=pc;
1053
+ */const Mw=[["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"}]],Lw=re("circle-x",Mw);function $w(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function Rs({icon:e,label:t,state:a,pct:r,subText:s}){const{t:l}=_e.useTranslation(),i=a==="done",u=a==="pending",c=a==="error",d=i?100:r??0;return n.jsxs("div",{className:"wdup-phase-card",children:[n.jsx("div",{className:`wdup-phase-card__icon${i?" wdup-phase-card__icon--done":c?" wdup-phase-card__icon--error":""}`,children:i?n.jsx(Zs,{size:22,color:"white",strokeWidth:2.5}):c?n.jsx(Lw,{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(ln,{variant:"sub",fill:"soft",size:"small",label:l("common.done","\uC644\uB8CC")}):c?n.jsx(ln,{variant:"danger",fill:"soft",size:"small",label:l("common.failed","\uC2E4\uD328")}):(s||r!==void 0)&&n.jsxs("span",{className:"wdup-phase-card__sub body-3",children:[s,s&&r!==void 0?` \xB7 ${r}%`:r!==void 0?`${r}%`:""]})]}),!u&&n.jsx("div",{className:"wdup-bar",children:n.jsx("div",{className:`wdup-bar__fill${i?" wdup-bar__fill--done":c?" wdup-bar__fill--error":""}${a==="active"&&r===void 0?" wdup-bar__fill--indeterminate":""}`,style:{width:r!==void 0||i||c?`${c?100:d}%`:void 0}})})]})]})}function Rw({title:e,progress:t,onDone:a,onRetry:r,onClose:s,inline:l}){const{t:i}=_e.useTranslation(),{phase:u,error:c,wordCount:d,imagePage:h,imageDone:p,imageTotal:m,pairPercent:g}=t,y=$w(u),C=u==="done",f=!!c;function _(A){return f&&y===A?"error":y>A?"done":y===A?"active":"pending"}const b=_(1),w=_(2),v=_(3),k=u==="image-match"&&m?Math.round((p??0)/m*100):void 0,x=o.useMemo(()=>{if(w!=="done"){if(u==="image-list")return i("wordData.checkingPage",{page:h??1});if(u==="image-match"&&m)return i("wordData.imageCount",{done:Co(p),total:Co(m)})}},[w,u,h,m,p,i]);return n.jsx(Pn,{inline:l,className:"popup--word-data-update",title:e,footer:f&&r?n.jsx(fe,{htmlType:"button",size:56,variant:"main",onClick:r,children:i("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):f?n.jsx(fe,{htmlType:"button",size:56,variant:"main",onClick:s??a,children:i("common.close","\uB2EB\uAE30")}):n.jsx(fe,{htmlType:"button",size:56,variant:"main",disabled:!C,onClick:a,children:i("common.done","\uC644\uB8CC")}),children:n.jsxs("div",{className:"wdup-cards",children:[n.jsx(Rs,{icon:n.jsx(qs,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:b,subText:b==="active"?i("wordData.downloadingCount",{n:Co(d),count:d}):void 0}),n.jsx(Rs,{icon:n.jsx(Tw,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:w,pct:k,subText:x}),n.jsx(Rs,{icon:n.jsx(Ks,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:v,pct:v==="active"?g??0:void 0,subText:void 0})]})})}function Pw({enabled:e=!1,renderResultPopup:t}={}){const{t:a}=_e.useTranslation(),[r,s]=o.useState(null),[l,i]=o.useState(null),u=g=>{let y=null;g==="noise"?y={score:3,contextsLength:5,results:[{sentence:"\uBB38\uC7A5 A",judgement:!0,wording:"\uC798 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 B",judgement:!1,wording:"\uC548 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 C",judgement:!0,wording:"\uC798 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 D",judgement:null,wording:"\uC548 \uD568",useAnswer:!1},{sentence:"\uBB38\uC7A5 E",judgement:!1,wording:"\uC548 \uB4E4\uB9BC",useAnswer:!1}]}:g==="short"?y={score:2,contextsLength:3,results:[{sentence:"\uBE44\uBE54\uBC25 \uC124\uBA85",answer:"\uBE44\uBE54\uBC25",selected:"\uBE44\uBE54\uBC25",selectedText:"\uBE44\uBE54\uBC25",correct:!0},{sentence:"\uBCF4\uC308 \uC124\uBA85",answer:"\uBCF4\uC308",selected:"\uC871\uBC1C",selectedText:"\uC871\uBC1C",correct:!1},{sentence:"\uCE7C\uAD6D\uC218 \uC124\uBA85",answer:"\uCE7C\uAD6D\uC218",selected:void 0,selectedText:void 0,correct:void 0}]}:g==="long"?y={score:4,contextsLength:4,results:[{sentence:"\uAE34 \uC774\uC57C\uAE30 1",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 1",selectedText:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 1",correct:!0},{sentence:"\uAE34 \uC774\uC57C\uAE30 2",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 2",selectedText:"\uC120\uD0DD \uD14D\uC2A4\uD2B8 2",correct:!1},{sentence:"\uAE34 \uC774\uC57C\uAE30 3",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 3",selectedText:void 0,correct:void 0},{sentence:"\uAE34 \uC774\uC57C\uAE30 4",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 4",selectedText:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 4",correct:!0}]}:g==="order"&&(y={score:1,contextsLength:2,results:[{sentence:"\uC21C\uC11C \uBB38\uC81C 1",answer:"1,2,3",selectedText:"1,2,3",correct:!0},{sentence:"\uC21C\uC11C \uBB38\uC81C 2",answer:"A,B,C",selectedText:"B,A,C",correct:!1}]}),i(y),s(g)},c=o.useCallback(()=>{s(null),i(null)},[]),d=o.useCallback(()=>u("noise"),[]),h=o.useCallback(()=>u("short"),[]),p=o.useCallback(()=>u("long"),[]),m=o.useCallback(()=>u("order"),[]);return e?n.jsxs("div",{className:"debug-result-launcher",children:[n.jsxs("div",{className:"debug-buttons",children:[n.jsx("button",{type:"button",className:"debug-button",onClick:d,children:a("debug.showResult",{type:"Noise",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:h,children:a("debug.showResult",{type:"ShortStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:p,children:a("debug.showResult",{type:"LongStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),n.jsx("button",{type:"button",className:"debug-button",onClick:m,children:a("debug.showResult",{type:"Order",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})})]}),r&&l?t?.({score:l.score,contextsLength:l.contextsLength,results:l.results,onReplay:c,onClose:c}):null]}):null}exports.Accordion=n2,exports.ActionCard=my,exports.Alert=q2,exports.AppHeader=i2,exports.AudioMeter=Xo,exports.AudioPlayer=xs,exports.Avatar=J2,exports.Badge=ln,exports.BarChart=Zv,exports.BarChartControls=zu,exports.Board=fv,exports.BottomNav=Xi,exports.BrandIdentity=nu,exports.BrandLogo=Hv,exports.Breadcrumb=tv,exports.BulkBar=Iv,exports.Button=fe,exports.CONSENT_KINDS=$u,exports.CORE_VERSION=ry,exports.Calendar=v4,exports.CardStep=pd,exports.ChartLegend=Ho,exports.ChartSection=Vo,exports.ChartTotal=tr,exports.Checkbox=Oo,exports.ChoiceChips=E_,exports.CircleBadge=Dn,exports.CodeBox=Fv,exports.ColorPicker=sv,exports.CompanyMeta=xv,exports.ConfirmPopup=yd,exports.ConfirmStep=ud,exports.ConfirmWithTextStep=cd,exports.ConsentRecordPopup=Mv,exports.ContrastFilterPanel=aw,exports.CoreScope=Cy,exports.CountTile=pv,exports.CouponInputPopup=sw,exports.DEFAULT_NOISE_SETTINGS=oa,exports.DatePicker=Lu,exports.DebugResultLauncher=Pw,exports.DescriptionTooltip=qn,exports.DeviceSideTable=b4,exports.Dialog=Cv,exports.Divider=W2,exports.Dropdown=_n,exports.EffectPartyPopper=Ms,exports.EffectPartyPopperHost=uw,exports.EmptyState=py,exports.ErrorState=hy,exports.FILTER_ALL_VALUE=kn,exports.FileUpload=ev,exports.FilterPanel=In,exports.FilterSectionInfo=Ga,exports.Footer=D_,exports.GameIntro=Qv,exports.Header=au,exports.Icon=ot,exports.IconGridMenu=N_,exports.IconRenderer=ot,exports.InfoTooltip=Mn,exports.ItemActions=zv,exports.LEVEL_MAX=Ba,exports.LINE_CHART_HOVER_DELAY_MS=Wu,exports.LandingBottomSticky=j_,exports.LandingHeader=S_,exports.LineChart=Jv,exports.ListPopup=rw,exports.ListenStep=id,exports.Loader=Ca,exports.MARKS=Ar,exports.MARK_ICON=oc,exports.MARK_VARIANT=sc,exports.MediaQueryOverrideContext=si,exports.MenuTooltip=Va,exports.NOISE_RATIO_MAX=ar,exports.NOISE_RATIO_STEP=$c,exports.NoisePlayerContext=gs,exports.NoiseSettingsTooltip=ed,exports.NoticeBox=by,exports.NotifyTextPreview=Wv,exports.OrderListStep=dd,exports.PASS_CARD_BG_VARS=na,exports.POS_LABEL=uc,exports.PROMO_BANNER_BG_COMPONENTS=Ii,exports.PROMO_BANNER_BG_OPTIONS=Ny,exports.PROMO_BANNER_BG_VARS=Oa,exports.Page=Lr,exports.PageTitle=cw,exports.Pagination=zo,exports.Panel=Qa,exports.PanelGrid=Nv,exports.PanelRow=un,exports.PanelRowDevice=Av,exports.PassCard=hu,exports.PassCardBg=F2,exports.PassCardBgIHAB=I2,exports.PassCardBgLeftColorGrid=O2,exports.PassCardBgTwoCircle=iu,exports.PaymentPlan=P2,exports.PersonCard=bv,exports.PhonemeFilterPanel=nw,exports.PhonemeSelectBlock=ew,exports.Popup=Pn,exports.ProgressBar=s4,exports.ProgressIndicator=Xu,exports.PromoBanner=Qy,exports.PromoBannerBgDark=Bi,exports.PromoBannerBgDeep=gi,exports.PromoBannerBgDiagonal=Ei,exports.PromoBannerBgDots=Si,exports.PromoBannerBgInstagram=Fi,exports.PromoBannerBgMain=pi,exports.PromoBannerBgNaver=Ri,exports.PromoBannerBgOutline=Ti,exports.PromoBannerBgRadial=Ai,exports.PromoBannerBgSoft=mi,exports.PromoBannerBgSoftSub=vi,exports.PromoBannerBgSub=fi,exports.PromoBannerBgSuccess=Li,exports.PromoBannerBgWarm=xi,exports.PublicationCard=yv,exports.Radio=bu,exports.RadioGroup=H2,exports.Rating=av,exports.ReportDocument=fw,exports.ReportInfoPanel=bw,exports.RingChart=t4,exports.SENTENCE_TRAINING_TYPES=ms,exports.SearchSummary=K2,exports.Section=_a,exports.SectionHeadFloat=Pu,exports.SectionHeader=_v,exports.SegmentedControl=vn,exports.ShortcutBadge=fu,exports.SideNav=tu,exports.Slider=Gu,exports.SoundCompass=z2,exports.SplashLogo=vv,exports.StatChart=n4,exports.SummaryStrip=mw,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=yu,exports.Table=Qo,exports.TableFilterPanel=us,exports.Tabs=Y2,exports.TextBoxTooltip=Tr,exports.TextField=Kn,exports.Timeline=gv,exports.Toast=va,exports.Toggle=Bu,exports.Toolbar=Wo,exports.Tooltip=Bn,exports.TooltipInfo=Mn,exports.TooltipTextBox=Tr,exports.TopBanner=e2,exports.TrainingBlock=x4,exports.TrainingBlockButton=Ro,exports.TrainingBlockGrid=B4,exports.TrainingCard=xw,exports.TrainingCardGroup=ww,exports.TrainingPagePopup=Yn,exports.TrainingPagePopupBottom=td,exports.TrainingPagePopupTitle=nd,exports.TrainingResultPopup=fd,exports.TrainingStep=sa,exports.TrainingStepAudioPlayer=xs,exports.TrainingStepBullet=Kc,exports.TrainingStepCard=Jc,exports.TrainingStepConfirm=Bs,exports.TrainingStepConfirmWithText=ks,exports.TrainingStepListen=As,exports.TrainingStepOrderList=Ns,exports.TrainingStepTextBox=Xc,exports.TrainingStepTitle=Zc,exports.TrainingTooltip=vu,exports.TrainingWordCard=ns,exports.UpdateAlert=_w,exports.WAVE_A_MAX=q_,exports.WAVE_H1_PX=vs,exports.WAVE_HMAX_PX=V_,exports.WORD_LABEL_I18N_KEYS=L4,exports.WORD_TABLE_PAPER=aa,exports.WORD_TYPE_LABEL=cc,exports.WordDataProvider=hw,exports.WordDataUpdatePopup=Rw,exports.WordImageTooltip=gd,exports.WordSearchFilterPanel=tw,exports.WordSearchResultBlock=Jx,exports.WordTable=xa,exports.WordTableBlock=Ew,exports.WordTableButton=Sw,exports.WordTablePopup=Q4,exports.WordTableThumbnail=wd,exports.buildMonthChartData=qv,exports.cellKey=l_,exports.cellLabel=s_,exports.cellsForLabels=y_,exports.clearPassCardBgTheme=Rn,exports.clearPromoBannerBgTheme=nn,exports.closeTrainingPopup=xx,exports.companyTypeLabel=dw,exports.createTrainingScenario=kx,exports.cx=Be,exports.deriveNoiseContexts=jx,exports.derivePassCard=ou,exports.draftValues=k_,exports.effectiveNoiseVolume=fs,exports.effectiveSpeechVolume=Pc,exports.expandSlashLabel=ss,exports.formatDuration=v_,exports.getControlDateRange=e4,exports.getPayloadTimestamp=Ds,exports.getPromoBannerBgTheme=Bo,exports.getSelectedFromPayload=Nx,exports.getSelectedText=Ex,exports.getStepPayload=sd,exports.getSteppedPayload=Dx,exports.injectPassCardBgTheme=$n,exports.injectPromoBannerBgTheme=tn,exports.isSelectionCorrect=Sx,exports.labelOfCellKey=Mc,exports.labelsForSave=o_,exports.levelToPct=M_,exports.markAfterClick=rc,exports.marksForSave=as,exports.mergeNoiseSettings=ra,exports.missesByType=C_,exports.monthKeyOf=nr,exports.monthKeyOfDate=qo,exports.nextFocus=d_,exports.nextMisses=m_,exports.noiseElementVolume=bs,exports.noiseRatioOf=rr,exports.pageStartIndexes=lc,exports.parseMonthKey=ya,exports.passCardBgIhabTheme=mu,exports.passCardBgLeftColorGridTheme=Cu,exports.passCardBgTwoCircleTheme=lu,exports.pctToLevel=L_,exports.posLabels=dc,exports.printWordTable=D4,exports.promoBannerBgDarkTheme=wi,exports.promoBannerBgDeepTheme=bi,exports.promoBannerBgDiagonalTheme=Ni,exports.promoBannerBgDotsTheme=Di,exports.promoBannerBgInstagramTheme=Pi,exports.promoBannerBgMainTheme=di,exports.promoBannerBgNaverTheme=$i,exports.promoBannerBgOutlineTheme=ji,exports.promoBannerBgRadialTheme=ki,exports.promoBannerBgSoftSubTheme=yi,exports.promoBannerBgSoftTheme=hi,exports.promoBannerBgSubTheme=Ci,exports.promoBannerBgSuccessTheme=Mi,exports.promoBannerBgWarmTheme=_i,exports.recommendTables=b_,exports.regenerateUnpinned=B_,exports.removeItem=w_,exports.resolveTrainingItems=Bx,exports.resolveTrainingPopupMeta=rd,exports.reviewCells=t_,exports.reviewMeta=r_,exports.reviewSetPlan=f_,exports.reviewTableName=a_,exports.scoreKey=kr,exports.scoreSheetHeader=i_,exports.shouldConfirmDiscard=E4,exports.splitTrainingVariants=wx,exports.summarize=N4,exports.summarizeMisses=h_,exports.tableTrends=c_,exports.toDraft=__,exports.toTrainingText=Ax,exports.togglePin=x_,exports.uncoveredLabels=g_,exports.useAnchoredMenu=Ha,exports.useBarChartControl=Ou,exports.useCalendarMonth=Tu,exports.useComboboxSuggestions=Du,exports.useDiscardGuard=ow,exports.useFitScale=Cc,exports.useNoisePlayer=Er,exports.useSoundCompassExam=qy,exports.useToastLifecycle=Yu,exports.useWordData=pw,exports.useWordTableDisplaySettings=jc,exports.useWordTablePrint=hs,exports.waveBarPx=Sr,exports.waveBarVal=jr,exports.weakItems=u_,exports.weekValueOf=Uo,exports.withStepTimes=od,exports.wordTypeLabels=pc;