@ihabdevteam/core 0.415.0 → 0.416.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,9 +1,9 @@
1
- "use strict";var n=require("react/jsx-runtime"),o=require("react"),Zt=require("i18next"),ke=require("react-i18next"),hn=require("react-dom"),Mn=typeof document<"u"?document.currentScript:null;function Sd(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 Is=Sd(o);function De(...e){return e.filter(Boolean).join(" ")}const Os=new Set,Wn=(()=>{try{const e=globalThis;return e.process!=null&&e.process.env?.NODE_ENV!=="production"}catch{return!1}})();function Dt(e,...t){!Wn||Os.has(e)||(Os.add(e),console.warn(...t))}/**
1
+ "use strict";var n=require("react/jsx-runtime"),o=require("react"),Zt=require("i18next"),ke=require("react-i18next"),hn=require("react-dom"),Mn=typeof document<"u"?document.currentScript:null;function Sd(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 Os=Sd(o);function De(...e){return e.filter(Boolean).join(" ")}const zs=new Set,Wn=(()=>{try{const e=globalThis;return e.process!=null&&e.process.env?.NODE_ENV!=="production"}catch{return!1}})();function Dt(e,...t){!Wn||zs.has(e)||(zs.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 zs=(...e)=>e.filter((t,a,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===a).join(" ").trim();/**
6
+ */const Ws=(...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.
@@ -18,7 +18,7 @@
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 Ws=e=>{const t=Td(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
21
+ */const Hs=e=>{const t=Td(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,17 +28,17 @@
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 Md=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},Ld=o.createContext({}),$d=()=>o.useContext(Ld),Rd=o.forwardRef(({color:e,size:t,strokeWidth:a,absoluteStrokeWidth:r,className:s="",children:l,iconNode:i,...u},c)=>{const{size:p=24,strokeWidth:h=2,absoluteStrokeWidth:d=!1,color:m="currentColor",className:b=""}=$d()??{},y=r??d?Number(a??h)*24/Number(t??p):a??h;return o.createElement("svg",{ref:c,...qr,width:t??p??qr.width,height:t??p??qr.height,stroke:e??m,strokeWidth:y,className:zs("lucide",b,s),...!l&&!Md(u)&&{"aria-hidden":"true"},...u},[...i.map(([C,f])=>o.createElement(C,f)),...Array.isArray(l)?l:[l]])});/**
31
+ */const Md=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},Ld=o.createContext({}),$d=()=>o.useContext(Ld),Rd=o.forwardRef(({color:e,size:t,strokeWidth:a,absoluteStrokeWidth:r,className:s="",children:l,iconNode:i,...u},c)=>{const{size:p=24,strokeWidth:h=2,absoluteStrokeWidth:d=!1,color:m="currentColor",className:b=""}=$d()??{},y=r??d?Number(a??h)*24/Number(t??p):a??h;return o.createElement("svg",{ref:c,...qr,width:t??p??qr.width,height:t??p??qr.height,stroke:e??m,strokeWidth:y,className:Ws("lucide",b,s),...!l&&!Md(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 oe=(e,t)=>{const a=o.forwardRef(({className:r,...s},l)=>o.createElement(Rd,{ref:l,iconNode:t,className:zs(`lucide-${jd(Ws(e))}`,`lucide-${e}`,r),...s}));return a.displayName=Ws(e),a};/**
36
+ */const oe=(e,t)=>{const a=o.forwardRef(({className:r,...s},l)=>o.createElement(Rd,{ref:l,iconNode:t,className:Ws(`lucide-${jd(Hs(e))}`,`lucide-${e}`,r),...s}));return a.displayName=Hs(e),a};/**
37
37
  * @license lucide-react v1.38.0 - ISC
38
38
  *
39
39
  * This source code is licensed under the ISC license.
40
40
  * See the LICENSE file in the root directory of this source tree.
41
- */const Pd=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Hs=oe("triangle-alert",Pd);/**
41
+ */const Pd=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Vs=oe("triangle-alert",Pd);/**
42
42
  * @license lucide-react v1.38.0 - ISC
43
43
  *
44
44
  * This source code is licensed under the ISC license.
@@ -138,17 +138,17 @@
138
138
  *
139
139
  * This source code is licensed under the ISC license.
140
140
  * See the LICENSE file in the root directory of this source tree.
141
- */const xp=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Vs=oe("check",xp);/**
141
+ */const xp=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],qs=oe("check",xp);/**
142
142
  * @license lucide-react v1.38.0 - ISC
143
143
  *
144
144
  * This source code is licensed under the ISC license.
145
145
  * See the LICENSE file in the root directory of this source tree.
146
- */const wp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],qs=oe("chevron-left",wp);/**
146
+ */const wp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Us=oe("chevron-left",wp);/**
147
147
  * @license lucide-react v1.38.0 - ISC
148
148
  *
149
149
  * This source code is licensed under the ISC license.
150
150
  * See the LICENSE file in the root directory of this source tree.
151
- */const Bp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Us=oe("chevron-right",Bp);/**
151
+ */const Bp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Gs=oe("chevron-right",Bp);/**
152
152
  * @license lucide-react v1.38.0 - ISC
153
153
  *
154
154
  * This source code is licensed under the ISC license.
@@ -178,7 +178,7 @@
178
178
  *
179
179
  * This source code is licensed under the ISC license.
180
180
  * See the LICENSE file in the root directory of this source tree.
181
- */const $p=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Gs=oe("database",$p);/**
181
+ */const $p=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Ks=oe("database",$p);/**
182
182
  * @license lucide-react v1.38.0 - ISC
183
183
  *
184
184
  * This source code is licensed under the ISC license.
@@ -188,7 +188,7 @@
188
188
  *
189
189
  * This source code is licensed under the ISC license.
190
190
  * See the LICENSE file in the root directory of this source tree.
191
- */const Fp=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Ks=oe("download",Fp);/**
191
+ */const Fp=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Ys=oe("download",Fp);/**
192
192
  * @license lucide-react v1.38.0 - ISC
193
193
  *
194
194
  * This source code is licensed under the ISC license.
@@ -213,7 +213,7 @@
213
213
  *
214
214
  * This source code is licensed under the ISC license.
215
215
  * See the LICENSE file in the root directory of this source tree.
216
- */const Gp=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Ys=oe("ellipsis",Gp);/**
216
+ */const Gp=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Zs=oe("ellipsis",Gp);/**
217
217
  * @license lucide-react v1.38.0 - ISC
218
218
  *
219
219
  * This source code is licensed under the ISC license.
@@ -263,7 +263,7 @@
263
263
  *
264
264
  * This source code is licensed under the ISC license.
265
265
  * See the LICENSE file in the root directory of this source tree.
266
- */const ph=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Zs=oe("git-merge",ph);/**
266
+ */const ph=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],Xs=oe("git-merge",ph);/**
267
267
  * @license lucide-react v1.38.0 - ISC
268
268
  *
269
269
  * This source code is licensed under the ISC license.
@@ -493,12 +493,12 @@
493
493
  *
494
494
  * This source code is licensed under the ISC license.
495
495
  * See the LICENSE file in the root directory of this source tree.
496
- */const Ym=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Xs=oe("circle-alert",Ym);/**
496
+ */const Ym=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Js=oe("circle-alert",Ym);/**
497
497
  * @license lucide-react v1.38.0 - ISC
498
498
  *
499
499
  * This source code is licensed under the ISC license.
500
500
  * See the LICENSE file in the root directory of this source tree.
501
- */const Zm=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Js=oe("circle-check-big",Zm);/**
501
+ */const Zm=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Qs=oe("circle-check-big",Zm);/**
502
502
  * @license lucide-react v1.38.0 - ISC
503
503
  *
504
504
  * This source code is licensed under the ISC license.
@@ -673,7 +673,7 @@
673
673
  *
674
674
  * This source code is licensed under the ISC license.
675
675
  * See the LICENSE file in the root directory of this source tree.
676
- */const c0=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],Qs=oe("volume-2",c0);/**
676
+ */const c0=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],el=oe("volume-2",c0);/**
677
677
  * @license lucide-react v1.38.0 - ISC
678
678
  *
679
679
  * This source code is licensed under the ISC license.
@@ -683,7 +683,7 @@
683
683
  *
684
684
  * This source code is licensed under the ISC license.
685
685
  * See the LICENSE file in the root directory of this source tree.
686
- */const h0=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],el=oe("x",h0);/**
686
+ */const h0=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],tl=oe("x",h0);/**
687
687
  * @license lucide-react v1.38.0 - ISC
688
688
  *
689
689
  * This source code is licensed under the ISC license.
@@ -698,7 +698,7 @@
698
698
  *
699
699
  * This source code is licensed under the ISC license.
700
700
  * See the LICENSE file in the root directory of this source tree.
701
- */const g0=[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]],tl=oe("calendar",g0);/**
701
+ */const g0=[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]],nl=oe("calendar",g0);/**
702
702
  * @license lucide-react v1.38.0 - ISC
703
703
  *
704
704
  * This source code is licensed under the ISC license.
@@ -763,12 +763,12 @@
763
763
  *
764
764
  * This source code is licensed under the ISC license.
765
765
  * See the LICENSE file in the root directory of this source tree.
766
- */const H0=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],nl=oe("chevron-down",H0);/**
766
+ */const H0=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],al=oe("chevron-down",H0);/**
767
767
  * @license lucide-react v1.38.0 - ISC
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 V0=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],al=oe("chevron-up",V0);/**
771
+ */const V0=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],rl=oe("chevron-up",V0);/**
772
772
  * @license lucide-react v1.38.0 - ISC
773
773
  *
774
774
  * 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 Q0=[["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"}]],e1=oe("thumbs-up",Q0),Gr={"alert-triangle":Hs,"align-start-vertical":Id,anchor:C0,armchair:b0,"arrow-down":zd,"arrow-left":Hd,"arrow-right":qd,"arrow-right-left":Gd,"audio-lines":Yd,ban:Xd,bell:Qd,"book-marked":tp,"book-open":ap,"bow-arrow":op,braces:lp,bug:up,calendar:tl,"calendar-check":dp,"calendar-days":hp,camera:Cp,car:v0,"chart-column":bp,"chart-line":yp,"chart-pie":_p,check:Vs,"chevron-down":nl,"chevron-left":qs,"chevron-right":Us,"chevron-up":al,circle:U0,"clipboard-list":Ap,coffee:x0,combine:Ep,copy:Sp,"chevrons-left-right-ellipsis":Tp,"credit-card":Lp,database:Gs,diff:Pp,download:Ks,ear:Op,edit:Wp,"edit-2":Vp,"edit-3":Up,ellipsis:Ys,eraser:Yp,"external-link":Xp,eye:Qp,"file-text":th,"flip-horizontal":ah,"folder-open":oh,"folder-plus":lh,gamepad:uh,"gamepad-2":B0,clock:A0,lock:Jh,"search-x":nC,"share-2":iC,tag:TC,target:E0,percent:S0,gavel:dh,"git-merge":Zs,globe:mh,"grip-vertical":fh,headphones:gh,heart:vh,home:xh,inbox:T0,info:Bh,"key-round":Ah,landmark:Eh,layers:Sh,"layout-dashboard":Th,leaf:Lh,lightbulb:Rh,link:Fh,"link-2":Oh,"link-2-off":Wh,list:Vh,"list-checks":Uh,"list-ordered":Kh,loader:Zh,"log-out":em,mail:nm,"map-pin":rm,menu:Z0,"message-circle":sm,"message-circle-question-mark":im,"message-square":cm,"message-square-more":L0,"message-square-text":pm,minus:R0,"minus-circle":mm,moon:J0,"more-horizontal":Ys,package:fm,"party-popper":gm,pause:vm,pencil:xm,phone:Bm,play:Am,"play-circle":Em,plus:Sm,printer:Tm,"refresh-cw":Lm,repeat:Rm,replace:Fm,rocket:Om,"rotate-ccw":Wm,"rotate-cw":Vm,salad:Um,"scan-search":Km,search:Jm,"circle-alert":Xs,"alert-circle":Xs,"check-circle":Js,scissors:eC,send:rC,settings:sC,"shield-check":cC,"shopping-cart":pC,shuffle:mC,"skip-back":fC,"skip-forward":gC,sparkles:F0,square:vC,star:xC,store:BC,"sun-medium":AC,table:EC,"table-2":SC,terminal:LC,"text-cursor-input":RC,"text-initial":FC,"thumbs-up":e1,ticket:OC,trash:VC,triangle:K0,"trash-2":WC,"trending-up":UC,"triangle-alert":Hs,trophy:KC,type:O0,unlink:ZC,upload:JC,user:Ur,"user-plus":t0,"user-round":a0,"user-round-check":o0,users:l0,"users-round":u0,volume:W0,"volume-2":Qs,wrench:p0,x:el};Object.freeze(Object.keys(Gr));function t1(e){return Gr[e]??null}const rl=new Set;function n1(e){return Wn&&!(e in Gr)&&!rl.has(e)&&(rl.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 a1=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 r1(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?a1(a):null}const ol=new Map;function o1(e){const t=typeof e=="string"?r1(e):null,a=t?t1(t)??ol.get(t)??null:null,[r,s]=o.useState(null);return o.useEffect(()=>{if(!t||a)return;let l=!1;return n1(t).then(i=>{ol.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 sl(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 s1(e){if(Array.isArray(e))return e}function l1(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,p=!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){p=!0,s=h}finally{try{if(!c&&a.return!=null&&(i=a.return(),Object(i)!==i))return}finally{if(p)throw s}}return u}}function i1(){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 u1(e,t){return s1(e)||l1(e,t)||c1(e,t)||i1()}function c1(e,t){if(e){if(typeof e=="string")return sl(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)?sl(e,t):void 0}}const ll=Object.entries,il=Object.setPrototypeOf,d1=Object.isFrozen,p1=Object.getPrototypeOf,h1=Object.getOwnPropertyDescriptor;let Ut=Object.freeze,Kt=Object.seal,pa=Object.create,ul=typeof Reflect<"u"&&Reflect,Kr=ul.apply,Yr=ul.construct;Ut||(Ut=function(t){return t}),Kt||(Kt=function(t){return t}),Kr||(Kr=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)}),Yr||(Yr=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 Xn=qt(Array.prototype.forEach),m1=qt(Array.prototype.lastIndexOf),cl=qt(Array.prototype.pop),Sa=qt(Array.prototype.push),C1=qt(Array.prototype.splice),ha=Array.isArray,ja=qt(String.prototype.toLowerCase),Zr=qt(String.prototype.toString),dl=qt(String.prototype.match),Ta=qt(String.prototype.replace),pl=qt(String.prototype.indexOf),f1=qt(String.prototype.trim),b1=qt(Number.prototype.toString),g1=qt(Boolean.prototype.toString),hl=typeof BigInt>"u"?null:qt(BigInt.prototype.toString),ml=typeof Symbol>"u"?null:qt(Symbol.prototype.toString),rn=qt(Object.prototype.hasOwnProperty),Ma=qt(Object.prototype.toString),Qt=qt(RegExp.prototype.test),Jn=y1(TypeError);function qt(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 Kr(e,t,r)}}function y1(e){return function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return Yr(e,a)}}function yt(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ja;if(il&&il(e,null),!ha(t))return e;let r=t.length;for(;r--;){let s=t[r];if(typeof s=="string"){const l=a(s);l!==s&&(d1(t)||(t[r]=l),s=l)}e[s]=!0}return e}function v1(e){for(let t=0;t<e.length;t++)rn(e,t)||(e[t]=null);return e}function mn(e){const t=pa(null);for(const r of ll(e)){var a=u1(r,2);const s=a[0],l=a[1];rn(e,s)&&(ha(l)?t[s]=v1(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=mn(l):t[s]=l)}return t}function _1(e){switch(typeof e){case"string":return e;case"number":return b1(e);case"boolean":return g1(e);case"bigint":return hl?hl(e):"0";case"symbol":return ml?ml(e):"Symbol()";case"undefined":return Ma(e);case"function":case"object":{if(e===null)return Ma(e);const t=e,a=wn(t,"toString");if(typeof a=="function"){const r=a(t);return typeof r=="string"?r:Ma(r)}return Ma(e)}default:return Ma(e)}}function wn(e,t){for(;e!==null;){const r=h1(e,t);if(r){if(r.get)return qt(r.get);if(typeof r.value=="function")return qt(r.value)}e=p1(e)}function a(){return null}return a}function x1(e){try{return Qt(e,""),!0}catch{return!1}}const Cl=Ut(["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"]),Xr=Ut(["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"]),Jr=Ut(["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"]),w1=Ut(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Qr=Ut(["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"]),B1=Ut(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),fl=Ut(["#text"]),bl=Ut(["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"]),eo=Ut(["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"]),gl=Ut(["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"]),lr=Ut(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),k1=Kt(/{{[\w\W]*|^[\w\W]*}}/g),A1=Kt(/<%[\w\W]*|^[\w\W]*%>/g),N1=Kt(/\${[\w\W]*/g),E1=Kt(/^data-[\-\w.\u00B7-\uFFFF]+$/),D1=Kt(/^aria-[\-\w]+$/),yl=Kt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),S1=Kt(/^(?:\w+script|data):/i),j1=Kt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),T1=Kt(/^html$/i),M1=Kt(/^[a-z][.\w]*(-[.\w]+)+$/i),vl=Kt(/<[/\w!]/g),_l=Kt(/<[/\w]/g),L1=Kt(/<\/no(script|embed|frames)/i),$1=Kt(/\/>/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},xl=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],R1=Ut(yt({},xl)),P1=(function(){const e={};return Xn(xl,t=>{e[t]=Kt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Ut(e)})(),F1=function(){return typeof window>"u"?null:window},I1=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}},wl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Hn=function(t,a,r,s){return rn(t,a)&&ha(t[a])?yt(s.base?mn(s.base):{},t[a],s.transform):r},to=function(t,a,r){const s=rn(t,a)?t[a]:void 0;return s&&typeof s=="object"?mn(s):r()};function Bl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:F1();const t=ge=>Bl(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,p=e.NamedNodeMap;p===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,d=e.trustedTypes,m=u.prototype,b=wn(m,"cloneNode"),y=wn(m,"remove"),C=wn(m,"nextSibling"),f=wn(m,"childNodes"),x=wn(m,"parentNode"),g=wn(m,"shadowRoot"),w=wn(m,"attributes"),_=i&&i.prototype?wn(i.prototype,"nodeType"):null,E=i&&i.prototype?wn(i.prototype,"nodeName"):null,v=i&&i.prototype?wn(i.prototype,"ownerDocument"):null,N=function(j){return _?_(j):j.nodeType},k=function(j){return E?E(j):j.nodeName};if(typeof l=="function"){const ge=a.createElement("template");ge.content&&ge.content.ownerDocument&&(a=ge.content.ownerDocument)}let D,A="",B,F=!1,L=0;const q=function(){if(L>0)throw Jn('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(j){q(),L++;try{return D.createHTML(j)}finally{L--}},O=function(j){q(),L++;try{return D.createScriptURL(j)}finally{L--}},T=function(){return F||(B=I1(d,s),F=!0),B},G=a,K=G.implementation,ee=G.createNodeIterator,re=G.createDocumentFragment,R=G.getElementsByTagName,J=r.importNode;let ne=wl();t.isSupported=typeof ll=="function"&&typeof x=="function"&&K&&K.createHTMLDocument!==void 0;const S=k1,$=A1,I=N1,P=E1,V=D1,ie=S1,U=j1,ce=M1;let Z=yl,H=null;const te=yt({},[...Cl,...Xr,...Jr,...Qr,...fl]);let W=null;const z=yt({},[...bl,...eo,...gl,...lr]);let ae=Object.seal(pa(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}})),ve=null,me=null;const le=Object.seal(pa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Be=!0,Pe=!0,Fe=!1,Ae=!0,se=!1,ye=!0,Ce=!1,xe=!1,$e=null,nt=null,ct=!1,at=!1,rt=!1,Ee=!1,Ue=!0,Ne=!1;const Ye="user-content-";let et=!0,ft=!1,vt={},dt=null;const jt=yt({},["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 ot=null;const st=yt({},["audio","video","img","source","image","track"]);let At=null;const Nt=yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ot="http://www.w3.org/1998/Math/MathML",Wt="http://www.w3.org/2000/svg",xt="http://www.w3.org/1999/xhtml";let it=xt,bt=!1,pt=null;const kt=yt({},[Ot,Wt,xt],Zr),mt=Ut(["mi","mo","mn","ms","mtext"]);let wt=yt({},mt);const de=Ut(["annotation-xml"]);let Le=yt({},de);const Se=yt({},["title","style","font","a","script"]);let Je=null;const ht=["application/xhtml+xml","text/html"],Rt="text/html";let Me=null,tt=null;const Ft=a.createElement("form"),_t=function(j){return j instanceof RegExp||j instanceof Function},Q=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(tt&&tt===j)return;(!j||typeof j!="object")&&(j={}),j=mn(j),Je=ht.indexOf(j.PARSER_MEDIA_TYPE)===-1?Rt:j.PARSER_MEDIA_TYPE,Me=Je==="application/xhtml+xml"?Zr:ja,H=Hn(j,"ALLOWED_TAGS",te,{transform:Me}),W=Hn(j,"ALLOWED_ATTR",z,{transform:Me}),pt=Hn(j,"ALLOWED_NAMESPACES",kt,{transform:Zr}),At=Hn(j,"ADD_URI_SAFE_ATTR",Nt,{transform:Me,base:Nt}),ot=Hn(j,"ADD_DATA_URI_TAGS",st,{transform:Me,base:st}),dt=Hn(j,"FORBID_CONTENTS",jt,{transform:Me}),ve=Hn(j,"FORBID_TAGS",mn({}),{transform:Me}),me=Hn(j,"FORBID_ATTR",mn({}),{transform:Me}),vt=rn(j,"USE_PROFILES")?j.USE_PROFILES&&typeof j.USE_PROFILES=="object"?mn(j.USE_PROFILES):j.USE_PROFILES:!1,Be=j.ALLOW_ARIA_ATTR!==!1,Pe=j.ALLOW_DATA_ATTR!==!1,Fe=j.ALLOW_UNKNOWN_PROTOCOLS||!1,Ae=j.ALLOW_SELF_CLOSE_IN_ATTR!==!1,se=j.SAFE_FOR_TEMPLATES||!1,ye=j.SAFE_FOR_XML!==!1,Ce=j.WHOLE_DOCUMENT||!1,at=j.RETURN_DOM||!1,rt=j.RETURN_DOM_FRAGMENT||!1,Ee=j.RETURN_TRUSTED_TYPE||!1,ct=j.FORCE_BODY||!1,Ue=j.SANITIZE_DOM!==!1,Ne=j.SANITIZE_NAMED_PROPS||!1,et=j.KEEP_CONTENT!==!1,ft=j.IN_PLACE||!1,Z=x1(j.ALLOWED_URI_REGEXP)?j.ALLOWED_URI_REGEXP:yl,it=typeof j.NAMESPACE=="string"?j.NAMESPACE:xt,wt=to(j,"MATHML_TEXT_INTEGRATION_POINTS",()=>yt({},mt)),Le=to(j,"HTML_INTEGRATION_POINTS",()=>yt({},de));const X=to(j,"CUSTOM_ELEMENT_HANDLING",()=>pa(null));if(ae=pa(null),rn(X,"tagNameCheck")&&_t(X.tagNameCheck)&&(ae.tagNameCheck=X.tagNameCheck),rn(X,"attributeNameCheck")&&_t(X.attributeNameCheck)&&(ae.attributeNameCheck=X.attributeNameCheck),rn(X,"allowCustomizedBuiltInElements")&&typeof X.allowCustomizedBuiltInElements=="boolean"&&(ae.allowCustomizedBuiltInElements=X.allowCustomizedBuiltInElements),Kt(ae),se&&(Pe=!1),rt&&(at=!0),vt&&(H=yt({},fl),W=pa(null),vt.html===!0&&(yt(H,Cl),yt(W,bl)),vt.svg===!0&&(yt(H,Xr),yt(W,eo),yt(W,lr)),vt.svgFilters===!0&&(yt(H,Jr),yt(W,eo),yt(W,lr)),vt.mathMl===!0&&(yt(H,Qr),yt(W,gl),yt(W,lr))),le.tagCheck=null,le.attributeCheck=null,rn(j,"ADD_TAGS")&&(typeof j.ADD_TAGS=="function"?le.tagCheck=j.ADD_TAGS:ha(j.ADD_TAGS)&&(H===te&&(H=mn(H)),yt(H,j.ADD_TAGS,Me))),rn(j,"ADD_ATTR")&&(typeof j.ADD_ATTR=="function"?le.attributeCheck=j.ADD_ATTR:ha(j.ADD_ATTR)&&(W===z&&(W=mn(W)),yt(W,j.ADD_ATTR,Me))),rn(j,"ADD_FORBID_CONTENTS")&&ha(j.ADD_FORBID_CONTENTS)&&(dt===jt&&(dt=mn(dt)),yt(dt,j.ADD_FORBID_CONTENTS,Me)),et&&(H["#text"]=!0),Ce&&yt(H,["html","head","body"]),H.table&&(yt(H,["tbody"]),delete ve.tbody),j.TRUSTED_TYPES_POLICY){if(typeof j.TRUSTED_TYPES_POLICY.createHTML!="function")throw Jn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof j.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Jn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const fe=D;D=j.TRUSTED_TYPES_POLICY;try{A=M("")}catch(Re){throw D=fe,Re}}else j.TRUSTED_TYPES_POLICY===null?(D=void 0,A=""):(D===void 0&&(D=T()),D&&typeof A=="string"&&(A=M("")));Ut&&Ut(j),tt=j},_e=yt({},[...Xr,...Jr,...w1]),Oe=yt({},[...Qr,...B1]),Ve=function(j,X,fe){return X.namespaceURI===xt?j==="svg":X.namespaceURI===Ot?j==="svg"&&(fe==="annotation-xml"||wt[fe]):!!_e[j]},Bt=function(j,X,fe){return X.namespaceURI===xt?j==="math":X.namespaceURI===Wt?j==="math"&&Le[fe]:!!Oe[j]},Qe=function(j,X,fe){return X.namespaceURI===Wt&&!Le[fe]||X.namespaceURI===Ot&&!wt[fe]?!1:!Oe[j]&&(Se[j]||!_e[j])},zt=function(j){let X=x(j);(!X||!X.tagName)&&(X={namespaceURI:it,tagName:"template"});const fe=ja(j.tagName),Re=ja(X.tagName);return pt[j.namespaceURI]?j.namespaceURI===Wt?Ve(fe,X,Re):j.namespaceURI===Ot?Bt(fe,X,Re):j.namespaceURI===xt?Qe(fe,X,Re):!!(Je==="application/xhtml+xml"&&pt[j.namespaceURI]):!1},Ht=function(j){Sa(t.removed,{element:j});try{x(j).removeChild(j)}catch{if(y(j),!x(j))throw Jn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},cn=function(j,X,fe){try{j.removeAttributeNode(X)}catch{try{j.removeAttribute(fe)}catch{}}},Yt=function(j){en(j);const X=f(j);if(X){const Re=[];Xn(X,We=>{Sa(Re,We)}),Xn(Re,We=>{try{y(We)}catch{}})}const fe=w(j);if(fe)for(let Re=fe.length-1;Re>=0;--Re){const We=fe[Re],Ke=We&&We.name;typeof Ke=="string"&&cn(j,We,Ke)}},Tt=function(j,X,fe){if(!fe)try{fe=X.getAttributeNode(j)}catch{fe=null}Sa(t.removed,{attribute:fe||null,from:X});try{fe?X.removeAttributeNode(fe):X.removeAttribute(j)}catch{try{X.removeAttribute(j)}catch{}}if(j==="is")if(at||rt)try{Ht(X)}catch{}else try{X.setAttribute(j,"")}catch{}},Jt=function(j){const X=w(j);if(X)for(let fe=X.length-1;fe>=0;--fe){const Re=X[fe],We=Re&&Re.name;typeof We!="string"||W[Me(We)]||cn(j,Re,We)}},en=function(j){const X=[j];for(;X.length>0;){const fe=X.pop();N(fe)===Cn.element&&Jt(fe);const We=f(fe);if(We)for(let Ke=We.length-1;Ke>=0;--Ke)X.push(We[Ke])}},An=function(j,X){return ye?j==="patchsrc"?!0:j==="for"&&X!=="label"&&X!=="output":!1},Nn=function(j){if(!ye)return;const X=[j];for(;X.length>0;){const fe=X.pop(),Re=N(fe);if(Re===Cn.processingInstruction||Re===Cn.comment&&Qt(_l,fe.data)){try{y(fe)}catch{}continue}if(Re===Cn.element){const Ke=fe,we=Me(k(fe));try{Ke.hasAttribute&&Ke.hasAttribute("patchsrc")&&Ke.removeAttribute("patchsrc"),Ke.hasAttribute&&Ke.hasAttribute("for")&&An("for",we)&&Ke.removeAttribute("for")}catch{}}const We=f(fe);if(We)for(let Ke=We.length-1;Ke>=0;--Ke)X.push(We[Ke])}},gn=function(j){let X=null,fe=null;if(ct)j="<remove></remove>"+j;else{const Ke=dl(j,/^[\r\n\t ]+/);fe=Ke&&Ke[0]}Je==="application/xhtml+xml"&&it===xt&&(j='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+j+"</body></html>");const Re=D?M(j):j;if(it===xt)try{X=new h().parseFromString(Re,Je)}catch{}if(!X||!X.documentElement){X=K.createDocument(it,"template",null);try{X.documentElement.innerHTML=bt?A:Re}catch{}}const We=X.body||X.documentElement;return j&&fe&&We.insertBefore(a.createTextNode(fe),We.childNodes[0]||null),it===xt?R.call(X,Ce?"html":"body")[0]:Ce?X.documentElement:We},Pt=function(j){const X=v?v(j):j.ownerDocument;return ee.call(X||j,j,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},St=function(j){return j=Ta(j,S," "),j=Ta(j,$," "),j=Ta(j,I," "),j},Mt=function(j){var X;j.normalize();const fe=v?v(j):j.ownerDocument,Re=ee.call(fe||j,j,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let We=Re.nextNode();for(;We;)We.data=St(We.data),We=Re.nextNode();const Ke=(X=j.querySelectorAll)===null||X===void 0?void 0:X.call(j,"template");Ke&&Xn(Ke,we=>{dn(we.content)&&Mt(we.content)})},Gt=function(j){const X=E?E(j):null;return typeof X!="string"||Me(X)!=="form"?!1:typeof j.nodeName!="string"||typeof j.textContent!="string"||typeof j.removeChild!="function"||j.attributes!==w(j)||typeof j.removeAttribute!="function"||typeof j.setAttribute!="function"||typeof j.namespaceURI!="string"||typeof j.insertBefore!="function"||typeof j.hasChildNodes!="function"||j.nodeType!==_(j)||j.childNodes!==f(j)},dn=function(j){if(!_||typeof j!="object"||j===null)return!1;try{return _(j)===Cn.documentFragment}catch{return!1}},yn=function(j){if(!_||typeof j!="object"||j===null)return!1;try{return typeof _(j)=="number"}catch{return!1}};function Vt(ge,j,X){ge.length!==0&&Xn(ge,fe=>{fe.call(t,j,X,tt)})}const En=function(j,X){return!!(ye&&j.hasChildNodes()&&!yn(j.firstElementChild)&&Qt(vl,j.textContent)&&Qt(vl,j.innerHTML)||ye&&j.namespaceURI===xt&&R1[X]&&(yn(j.firstElementChild)||typeof j.textContent=="string"&&Qt(P1[X],j.textContent))||j.nodeType===Cn.processingInstruction||ye&&j.nodeType===Cn.comment&&Qt(_l,j.data))},he=function(j,X){if(j instanceof RegExp)return Qt(j,X);if(j instanceof Function){for(var fe=arguments.length,Re=new Array(fe>2?fe-2:0),We=2;We<fe;We++)Re[We-2]=arguments[We];return!!j(X,...Re)}return!1},Te=function(j,X,fe){if(!ve[X]&&je(X)&&he(ae.tagNameCheck,X))return!1;if(et&&!dt[X]){const Re=x(j),We=f(j);if(We&&Re){const Ke=We.length;for(let we=Ke-1;we>=0;--we){const Ie=j===fe?b(We[we],!0):We[we];Re.insertBefore(Ie,C(j))}}}return Ht(j),!0},ze=function(j,X,fe,Re){return j.length===0?X:X===fe||X===Re?mn(X):X},Ze=function(j,X){return j===X||x(j)!==null?!1:(ft&&en(j),!0)},He=function(j,X){if(Vt(ne.beforeSanitizeElements,j,null),Ze(j,X))return!0;if(Gt(j))return Ht(j),!0;const fe=Me(k(j));if(H=ze(ne.uponSanitizeElement,H,te,$e),Vt(ne.uponSanitizeElement,j,{tagName:fe,allowedTags:H}),Ze(j,X))return!0;if(En(j,fe))return Ht(j),!0;if(ve[fe]||!(le.tagCheck instanceof Function&&le.tagCheck(fe))&&!H[fe]){const We=Te(j,fe,X);return We===!1&&Vt(ne.afterSanitizeElements,j,null),We}if(N(j)===Cn.element&&!zt(j)||(fe==="noscript"||fe==="noembed"||fe==="noframes")&&Qt(L1,j.innerHTML))return Ht(j),!0;if(se&&j.nodeType===Cn.text){const We=St(j.textContent);j.textContent!==We&&(Sa(t.removed,{element:j.cloneNode()}),j.textContent=We)}return Vt(ne.afterSanitizeElements,j,null),!1},Y=function(j,X,fe){if(me[X]||An(X,j)||Ue&&(X==="id"||X==="name")&&(fe in a||fe in Ft))return!1;const Re=W[X]||le.attributeCheck instanceof Function&&le.attributeCheck(X,j);return Pe&&Qt(P,X)||Be&&Qt(V,X)?!0:Re?At[X]||Qt(Z,Ta(fe,U,""))||(X==="src"||X==="xlink:href"||X==="href")&&j!=="script"&&pl(fe,"data:")===0&&ot[j]||Fe&&!Qt(ie,Ta(fe,U,""))?!0:!fe:je(j)&&he(ae.tagNameCheck,j)&&he(ae.attributeNameCheck,X,j)||X==="is"&&ae.allowCustomizedBuiltInElements&&he(ae.tagNameCheck,fe)},pe=yt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),je=function(j){return!pe[ja(j)]&&Qt(ce,j)},qe=function(j,X,fe,Re){if(D&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!fe)switch(d.getAttributeType(j,X)){case"TrustedHTML":return M(Re);case"TrustedScriptURL":return O(Re)}return Re},Ge=function(j,X,fe,Re){try{fe?j.setAttributeNS(fe,X,Re):j.setAttribute(X,Re),Gt(j)?Ht(j):cl(t.removed)}catch{Tt(X,j)}},Xe=function(j){Vt(ne.beforeSanitizeAttributes,j,null);const X=j.attributes;if(!X||Gt(j))return;W=ze(ne.uponSanitizeAttribute,W,z,nt);const fe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0};let Re=X.length;const We=Me(j.nodeName);for(;Re--;){const Ke=X[Re],we=Ke.name,Ie=Ke.namespaceURI,ut=Ke.value,Et=Me(we),pn=ut;let tn=we==="value"?pn:f1(pn);if(fe.attrName=Et,fe.attrValue=tn,fe.keepAttr=!0,fe.forceKeepAttr=void 0,Vt(ne.uponSanitizeAttribute,j,fe),tn=fe.attrValue,Ne&&(Et==="id"||Et==="name")&&pl(tn,Ye)!==0&&(Tt(we,j,Ke),tn=Ye+tn),ye&&Qt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,tn)){Tt(we,j,Ke);continue}if(Et==="attributename"&&dl(tn,"href")){Tt(we,j,Ke);continue}if(!fe.forceKeepAttr){if(!fe.keepAttr){Tt(we,j,Ke);continue}if(!Ae&&Qt($1,tn)){Tt(we,j,Ke);continue}if(se&&(tn=St(tn)),!Y(We,Et,tn)){Tt(we,j,Ke);continue}tn=qe(We,Et,Ie,tn),tn!==pn&&Ge(j,we,Ie,tn)}}Vt(ne.afterSanitizeAttributes,j,null)},gt=function(j){let X=null;const fe=Pt(j);for(Vt(ne.beforeSanitizeShadowDOM,j,null);X=fe.nextNode();)if(Vt(ne.uponSanitizeShadowNode,X,null),He(X,j),Xe(X),dn(X.content)&&gt(X.content),N(X)===Cn.element){const Re=g(X);dn(Re)&&(Ct(Re),gt(Re))}Vt(ne.afterSanitizeShadowDOM,j,null)},Ct=function(j){const X=[{node:j,shadow:null}];for(;X.length>0;){const fe=X.pop();if(fe.shadow){gt(fe.shadow);continue}const Re=fe.node,Ke=N(Re)===Cn.element,we=f(Re);if(we)for(let Ie=we.length-1;Ie>=0;--Ie)X.push({node:we[Ie],shadow:null});if(Ke){const Ie=E?E(Re):null;if(typeof Ie=="string"&&Me(Ie)==="template"){const ut=Re.content;dn(ut)&&X.push({node:ut,shadow:null})}}if(Ke){const Ie=g(Re);dn(Ie)&&X.push({node:null,shadow:Ie},{node:Ie,shadow:null})}}};return t.sanitize=function(ge){let j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=null,fe=null,Re=null,We=null;if(bt=!ge,bt&&(ge="<!-->"),typeof ge!="string"&&!yn(ge)&&(ge=_1(ge),typeof ge!="string"))throw Jn("dirty is not a string, aborting");if(!t.isSupported)return ge;xe?(H=$e,W=nt):Q(j),(ne.uponSanitizeElement.length>0||ne.uponSanitizeAttribute.length>0)&&(H=mn(H)),ne.uponSanitizeAttribute.length>0&&(W=mn(W)),t.removed=[];const Ke=ft&&typeof ge!="string"&&yn(ge);if(Ke){Nn(ge);const ut=k(ge);if(typeof ut=="string"){const Et=Me(ut);if(!H[Et]||ve[Et])throw Yt(ge),Jn("root node is forbidden and cannot be sanitized in-place")}if(Gt(ge))throw Yt(ge),Jn("root node is clobbered and cannot be sanitized in-place");try{Ct(ge)}catch(Et){throw Yt(ge),Et}}else if(yn(ge))X=gn("<!---->"),fe=X.ownerDocument.importNode(ge,!0),fe.nodeType===Cn.element&&fe.nodeName==="BODY"||fe.nodeName==="HTML"?X=fe:X.appendChild(fe),Ct(fe);else{if(!at&&!se&&!Ce&&ge.indexOf("<")===-1)return D&&Ee?M(ge):ge;if(X=gn(ge),!X)return at?null:Ee?A:""}X&&ct&&Ht(X.firstChild);const we=Ke?ge:X;try{const ut=Pt(we);for(;Re=ut.nextNode();)He(Re,we),Xe(Re),dn(Re.content)&&gt(Re.content)}catch(ut){throw Ke&&(Yt(ge),Xn(t.removed,Et=>{Et.element&&en(Et.element)})),ut}if(Ke)return Xn(t.removed,ut=>{ut.element&&en(ut.element)}),se&&Mt(ge),ge;if(at){if(se&&Mt(X),rt)for(We=re.call(X.ownerDocument);X.firstChild;)We.appendChild(X.firstChild);else We=X;return(W.shadowroot||W.shadowrootmode)&&(We=J.call(r,We,!0)),We}let Ie=Ce?X.outerHTML:X.innerHTML;return Ce&&H["!doctype"]&&X.ownerDocument&&X.ownerDocument.doctype&&X.ownerDocument.doctype.name&&Qt(T1,X.ownerDocument.doctype.name)&&(Ie="<!DOCTYPE "+X.ownerDocument.doctype.name+`>
798
- `+Ie),se&&(Ie=St(Ie)),D&&Ee?M(Ie):Ie},t.setConfig=function(){let ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Q(ge),xe=!0,$e=H,nt=W},t.clearConfig=function(){tt=null,xe=!1,$e=null,nt=null,D=B,A=""},t.isValidAttribute=function(ge,j,X){tt||Q({});const fe=Me(ge),Re=Me(j);return Y(fe,Re,X)},t.addHook=function(ge,j){typeof j=="function"&&rn(ne,ge)&&Sa(ne[ge],j)},t.removeHook=function(ge,j){if(rn(ne,ge)){if(j!==void 0){const X=m1(ne[ge],j);return X===-1?void 0:C1(ne[ge],X,1)[0]}return cl(ne[ge])}},t.removeHooks=function(ge){rn(ne,ge)&&(ne[ge]=[])},t.removeAllHooks=function(){ne=wl()},t}var ma=Bl();let no=null;const O1=1500;function ao(){no?.clear(),no=null}function z1(e,{onEnd:t,rate:a=.9}={}){if(typeof window>"u"||typeof SpeechSynthesisUtterance>"u"||!("speechSynthesis"in window)){t?.();return}const r=window.speechSynthesis;ao();let s=!1;const l=()=>{if(!s){s=!0;try{t?.()}catch{}}};try{r.cancel()}catch{l();return}const i=()=>{ao();try{r.cancel();const p=new SpeechSynthesisUtterance(e),h=r.getVoices().find(d=>d.lang.startsWith("ko"));h&&(p.voice=h),p.rate=a,p.onend=t?l:null,p.onerror=t?l:null,r.speak(p)}catch{l()}};let u;try{u=r.getVoices()}catch{l();return}if(u.length>0){i();return}const c=setTimeout(i,O1);try{r.addEventListener("voiceschanged",i,{once:!0})}catch{clearTimeout(c),l();return}no={clear:()=>{clearTimeout(c),r.removeEventListener("voiceschanged",i)}}}function ro(){ao(),typeof window<"u"&&"speechSynthesis"in window&&window.speechSynthesis.cancel()}const W1=/^(?:[a-z]+:)?\/\//i,H1="__ihab_core_asset_base_url__";function V1(){return globalThis[H1]??""}function oo(e){const t=String(e||"").trim();if(!t)return"";if(W1.test(t)||t.startsWith("data:")||t.startsWith("blob:"))return t;const a=t.startsWith("/")?t:`/${t}`,r=V1();return r?`${r}${a}`:a}const kl="__ihab_core_storage_resolvers__";function La(){return globalThis[kl]??null}function q1(e){globalThis[kl]=e}let Al=class extends Error{constructor(t){super(`
796
+ */const Q0=[["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"}]],e1=oe("thumbs-up",Q0),Gr={"alert-triangle":Vs,"align-start-vertical":Id,anchor:C0,armchair:b0,"arrow-down":zd,"arrow-left":Hd,"arrow-right":qd,"arrow-right-left":Gd,"audio-lines":Yd,ban:Xd,bell:Qd,"book-marked":tp,"book-open":ap,"bow-arrow":op,braces:lp,bug:up,calendar:nl,"calendar-check":dp,"calendar-days":hp,camera:Cp,car:v0,"chart-column":bp,"chart-line":yp,"chart-pie":_p,check:qs,"chevron-down":al,"chevron-left":Us,"chevron-right":Gs,"chevron-up":rl,circle:U0,"clipboard-list":Ap,coffee:x0,combine:Ep,copy:Sp,"chevrons-left-right-ellipsis":Tp,"credit-card":Lp,database:Ks,diff:Pp,download:Ys,ear:Op,edit:Wp,"edit-2":Vp,"edit-3":Up,ellipsis:Zs,eraser:Yp,"external-link":Xp,eye:Qp,"file-text":th,"flip-horizontal":ah,"folder-open":oh,"folder-plus":lh,gamepad:uh,"gamepad-2":B0,clock:A0,lock:Jh,"search-x":nC,"share-2":iC,tag:TC,target:E0,percent:S0,gavel:dh,"git-merge":Xs,globe:mh,"grip-vertical":fh,headphones:gh,heart:vh,home:xh,inbox:T0,info:Bh,"key-round":Ah,landmark:Eh,layers:Sh,"layout-dashboard":Th,leaf:Lh,lightbulb:Rh,link:Fh,"link-2":Oh,"link-2-off":Wh,list:Vh,"list-checks":Uh,"list-ordered":Kh,loader:Zh,"log-out":em,mail:nm,"map-pin":rm,menu:Z0,"message-circle":sm,"message-circle-question-mark":im,"message-square":cm,"message-square-more":L0,"message-square-text":pm,minus:R0,"minus-circle":mm,moon:J0,"more-horizontal":Zs,package:fm,"party-popper":gm,pause:vm,pencil:xm,phone:Bm,play:Am,"play-circle":Em,plus:Sm,printer:Tm,"refresh-cw":Lm,repeat:Rm,replace:Fm,rocket:Om,"rotate-ccw":Wm,"rotate-cw":Vm,salad:Um,"scan-search":Km,search:Jm,"circle-alert":Js,"alert-circle":Js,"check-circle":Qs,scissors:eC,send:rC,settings:sC,"shield-check":cC,"shopping-cart":pC,shuffle:mC,"skip-back":fC,"skip-forward":gC,sparkles:F0,square:vC,star:xC,store:BC,"sun-medium":AC,table:EC,"table-2":SC,terminal:LC,"text-cursor-input":RC,"text-initial":FC,"thumbs-up":e1,ticket:OC,trash:VC,triangle:K0,"trash-2":WC,"trending-up":UC,"triangle-alert":Vs,trophy:KC,type:O0,unlink:ZC,upload:JC,user:Ur,"user-plus":t0,"user-round":a0,"user-round-check":o0,users:l0,"users-round":u0,volume:W0,"volume-2":el,wrench:p0,x:tl};Object.freeze(Object.keys(Gr));function t1(e){return Gr[e]??null}const ol=new Set;function n1(e){return Wn&&!(e in Gr)&&!ol.has(e)&&(ol.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 a1=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 r1(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?a1(a):null}const sl=new Map;function o1(e){const t=typeof e=="string"?r1(e):null,a=t?t1(t)??sl.get(t)??null:null,[r,s]=o.useState(null);return o.useEffect(()=>{if(!t||a)return;let l=!1;return n1(t).then(i=>{sl.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 ll(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 s1(e){if(Array.isArray(e))return e}function l1(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,p=!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){p=!0,s=h}finally{try{if(!c&&a.return!=null&&(i=a.return(),Object(i)!==i))return}finally{if(p)throw s}}return u}}function i1(){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 u1(e,t){return s1(e)||l1(e,t)||c1(e,t)||i1()}function c1(e,t){if(e){if(typeof e=="string")return ll(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)?ll(e,t):void 0}}const il=Object.entries,ul=Object.setPrototypeOf,d1=Object.isFrozen,p1=Object.getPrototypeOf,h1=Object.getOwnPropertyDescriptor;let Ut=Object.freeze,Kt=Object.seal,pa=Object.create,cl=typeof Reflect<"u"&&Reflect,Kr=cl.apply,Yr=cl.construct;Ut||(Ut=function(t){return t}),Kt||(Kt=function(t){return t}),Kr||(Kr=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)}),Yr||(Yr=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 Xn=qt(Array.prototype.forEach),m1=qt(Array.prototype.lastIndexOf),dl=qt(Array.prototype.pop),Sa=qt(Array.prototype.push),C1=qt(Array.prototype.splice),ha=Array.isArray,ja=qt(String.prototype.toLowerCase),Zr=qt(String.prototype.toString),pl=qt(String.prototype.match),Ta=qt(String.prototype.replace),hl=qt(String.prototype.indexOf),f1=qt(String.prototype.trim),b1=qt(Number.prototype.toString),g1=qt(Boolean.prototype.toString),ml=typeof BigInt>"u"?null:qt(BigInt.prototype.toString),Cl=typeof Symbol>"u"?null:qt(Symbol.prototype.toString),rn=qt(Object.prototype.hasOwnProperty),Ma=qt(Object.prototype.toString),Qt=qt(RegExp.prototype.test),Jn=y1(TypeError);function qt(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 Kr(e,t,r)}}function y1(e){return function(){for(var t=arguments.length,a=new Array(t),r=0;r<t;r++)a[r]=arguments[r];return Yr(e,a)}}function yt(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ja;if(ul&&ul(e,null),!ha(t))return e;let r=t.length;for(;r--;){let s=t[r];if(typeof s=="string"){const l=a(s);l!==s&&(d1(t)||(t[r]=l),s=l)}e[s]=!0}return e}function v1(e){for(let t=0;t<e.length;t++)rn(e,t)||(e[t]=null);return e}function mn(e){const t=pa(null);for(const r of il(e)){var a=u1(r,2);const s=a[0],l=a[1];rn(e,s)&&(ha(l)?t[s]=v1(l):l&&typeof l=="object"&&l.constructor===Object?t[s]=mn(l):t[s]=l)}return t}function _1(e){switch(typeof e){case"string":return e;case"number":return b1(e);case"boolean":return g1(e);case"bigint":return ml?ml(e):"0";case"symbol":return Cl?Cl(e):"Symbol()";case"undefined":return Ma(e);case"function":case"object":{if(e===null)return Ma(e);const t=e,a=wn(t,"toString");if(typeof a=="function"){const r=a(t);return typeof r=="string"?r:Ma(r)}return Ma(e)}default:return Ma(e)}}function wn(e,t){for(;e!==null;){const r=h1(e,t);if(r){if(r.get)return qt(r.get);if(typeof r.value=="function")return qt(r.value)}e=p1(e)}function a(){return null}return a}function x1(e){try{return Qt(e,""),!0}catch{return!1}}const fl=Ut(["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"]),Xr=Ut(["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"]),Jr=Ut(["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"]),w1=Ut(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Qr=Ut(["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"]),B1=Ut(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),bl=Ut(["#text"]),gl=Ut(["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"]),eo=Ut(["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"]),yl=Ut(["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"]),lr=Ut(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),k1=Kt(/{{[\w\W]*|^[\w\W]*}}/g),A1=Kt(/<%[\w\W]*|^[\w\W]*%>/g),N1=Kt(/\${[\w\W]*/g),E1=Kt(/^data-[\-\w.\u00B7-\uFFFF]+$/),D1=Kt(/^aria-[\-\w]+$/),vl=Kt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),S1=Kt(/^(?:\w+script|data):/i),j1=Kt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),T1=Kt(/^html$/i),M1=Kt(/^[a-z][.\w]*(-[.\w]+)+$/i),_l=Kt(/<[/\w!]/g),xl=Kt(/<[/\w]/g),L1=Kt(/<\/no(script|embed|frames)/i),$1=Kt(/\/>/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},wl=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],R1=Ut(yt({},wl)),P1=(function(){const e={};return Xn(wl,t=>{e[t]=Kt(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Ut(e)})(),F1=function(){return typeof window>"u"?null:window},I1=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}},Bl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Hn=function(t,a,r,s){return rn(t,a)&&ha(t[a])?yt(s.base?mn(s.base):{},t[a],s.transform):r},to=function(t,a,r){const s=rn(t,a)?t[a]:void 0;return s&&typeof s=="object"?mn(s):r()};function kl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:F1();const t=ge=>kl(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,p=e.NamedNodeMap;p===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,d=e.trustedTypes,m=u.prototype,b=wn(m,"cloneNode"),y=wn(m,"remove"),C=wn(m,"nextSibling"),f=wn(m,"childNodes"),x=wn(m,"parentNode"),g=wn(m,"shadowRoot"),w=wn(m,"attributes"),_=i&&i.prototype?wn(i.prototype,"nodeType"):null,E=i&&i.prototype?wn(i.prototype,"nodeName"):null,v=i&&i.prototype?wn(i.prototype,"ownerDocument"):null,N=function(j){return _?_(j):j.nodeType},k=function(j){return E?E(j):j.nodeName};if(typeof l=="function"){const ge=a.createElement("template");ge.content&&ge.content.ownerDocument&&(a=ge.content.ownerDocument)}let D,A="",B,F=!1,L=0;const q=function(){if(L>0)throw Jn('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(j){q(),L++;try{return D.createHTML(j)}finally{L--}},O=function(j){q(),L++;try{return D.createScriptURL(j)}finally{L--}},T=function(){return F||(B=I1(d,s),F=!0),B},G=a,K=G.implementation,ee=G.createNodeIterator,re=G.createDocumentFragment,R=G.getElementsByTagName,J=r.importNode;let ne=Bl();t.isSupported=typeof il=="function"&&typeof x=="function"&&K&&K.createHTMLDocument!==void 0;const S=k1,$=A1,I=N1,P=E1,V=D1,ie=S1,U=j1,ce=M1;let Z=vl,H=null;const te=yt({},[...fl,...Xr,...Jr,...Qr,...bl]);let W=null;const z=yt({},[...gl,...eo,...yl,...lr]);let ae=Object.seal(pa(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}})),ve=null,me=null;const le=Object.seal(pa(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Be=!0,Pe=!0,Fe=!1,Ae=!0,se=!1,ye=!0,Ce=!1,xe=!1,$e=null,nt=null,ct=!1,at=!1,rt=!1,Ee=!1,Ue=!0,Ne=!1;const Ye="user-content-";let et=!0,ft=!1,vt={},dt=null;const jt=yt({},["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 ot=null;const st=yt({},["audio","video","img","source","image","track"]);let At=null;const Nt=yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ot="http://www.w3.org/1998/Math/MathML",Wt="http://www.w3.org/2000/svg",xt="http://www.w3.org/1999/xhtml";let it=xt,bt=!1,pt=null;const kt=yt({},[Ot,Wt,xt],Zr),mt=Ut(["mi","mo","mn","ms","mtext"]);let wt=yt({},mt);const de=Ut(["annotation-xml"]);let Le=yt({},de);const Se=yt({},["title","style","font","a","script"]);let Je=null;const ht=["application/xhtml+xml","text/html"],Rt="text/html";let Me=null,tt=null;const Ft=a.createElement("form"),_t=function(j){return j instanceof RegExp||j instanceof Function},Q=function(){let j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(tt&&tt===j)return;(!j||typeof j!="object")&&(j={}),j=mn(j),Je=ht.indexOf(j.PARSER_MEDIA_TYPE)===-1?Rt:j.PARSER_MEDIA_TYPE,Me=Je==="application/xhtml+xml"?Zr:ja,H=Hn(j,"ALLOWED_TAGS",te,{transform:Me}),W=Hn(j,"ALLOWED_ATTR",z,{transform:Me}),pt=Hn(j,"ALLOWED_NAMESPACES",kt,{transform:Zr}),At=Hn(j,"ADD_URI_SAFE_ATTR",Nt,{transform:Me,base:Nt}),ot=Hn(j,"ADD_DATA_URI_TAGS",st,{transform:Me,base:st}),dt=Hn(j,"FORBID_CONTENTS",jt,{transform:Me}),ve=Hn(j,"FORBID_TAGS",mn({}),{transform:Me}),me=Hn(j,"FORBID_ATTR",mn({}),{transform:Me}),vt=rn(j,"USE_PROFILES")?j.USE_PROFILES&&typeof j.USE_PROFILES=="object"?mn(j.USE_PROFILES):j.USE_PROFILES:!1,Be=j.ALLOW_ARIA_ATTR!==!1,Pe=j.ALLOW_DATA_ATTR!==!1,Fe=j.ALLOW_UNKNOWN_PROTOCOLS||!1,Ae=j.ALLOW_SELF_CLOSE_IN_ATTR!==!1,se=j.SAFE_FOR_TEMPLATES||!1,ye=j.SAFE_FOR_XML!==!1,Ce=j.WHOLE_DOCUMENT||!1,at=j.RETURN_DOM||!1,rt=j.RETURN_DOM_FRAGMENT||!1,Ee=j.RETURN_TRUSTED_TYPE||!1,ct=j.FORCE_BODY||!1,Ue=j.SANITIZE_DOM!==!1,Ne=j.SANITIZE_NAMED_PROPS||!1,et=j.KEEP_CONTENT!==!1,ft=j.IN_PLACE||!1,Z=x1(j.ALLOWED_URI_REGEXP)?j.ALLOWED_URI_REGEXP:vl,it=typeof j.NAMESPACE=="string"?j.NAMESPACE:xt,wt=to(j,"MATHML_TEXT_INTEGRATION_POINTS",()=>yt({},mt)),Le=to(j,"HTML_INTEGRATION_POINTS",()=>yt({},de));const X=to(j,"CUSTOM_ELEMENT_HANDLING",()=>pa(null));if(ae=pa(null),rn(X,"tagNameCheck")&&_t(X.tagNameCheck)&&(ae.tagNameCheck=X.tagNameCheck),rn(X,"attributeNameCheck")&&_t(X.attributeNameCheck)&&(ae.attributeNameCheck=X.attributeNameCheck),rn(X,"allowCustomizedBuiltInElements")&&typeof X.allowCustomizedBuiltInElements=="boolean"&&(ae.allowCustomizedBuiltInElements=X.allowCustomizedBuiltInElements),Kt(ae),se&&(Pe=!1),rt&&(at=!0),vt&&(H=yt({},bl),W=pa(null),vt.html===!0&&(yt(H,fl),yt(W,gl)),vt.svg===!0&&(yt(H,Xr),yt(W,eo),yt(W,lr)),vt.svgFilters===!0&&(yt(H,Jr),yt(W,eo),yt(W,lr)),vt.mathMl===!0&&(yt(H,Qr),yt(W,yl),yt(W,lr))),le.tagCheck=null,le.attributeCheck=null,rn(j,"ADD_TAGS")&&(typeof j.ADD_TAGS=="function"?le.tagCheck=j.ADD_TAGS:ha(j.ADD_TAGS)&&(H===te&&(H=mn(H)),yt(H,j.ADD_TAGS,Me))),rn(j,"ADD_ATTR")&&(typeof j.ADD_ATTR=="function"?le.attributeCheck=j.ADD_ATTR:ha(j.ADD_ATTR)&&(W===z&&(W=mn(W)),yt(W,j.ADD_ATTR,Me))),rn(j,"ADD_FORBID_CONTENTS")&&ha(j.ADD_FORBID_CONTENTS)&&(dt===jt&&(dt=mn(dt)),yt(dt,j.ADD_FORBID_CONTENTS,Me)),et&&(H["#text"]=!0),Ce&&yt(H,["html","head","body"]),H.table&&(yt(H,["tbody"]),delete ve.tbody),j.TRUSTED_TYPES_POLICY){if(typeof j.TRUSTED_TYPES_POLICY.createHTML!="function")throw Jn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof j.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Jn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const fe=D;D=j.TRUSTED_TYPES_POLICY;try{A=M("")}catch(Re){throw D=fe,Re}}else j.TRUSTED_TYPES_POLICY===null?(D=void 0,A=""):(D===void 0&&(D=T()),D&&typeof A=="string"&&(A=M("")));Ut&&Ut(j),tt=j},_e=yt({},[...Xr,...Jr,...w1]),Oe=yt({},[...Qr,...B1]),Ve=function(j,X,fe){return X.namespaceURI===xt?j==="svg":X.namespaceURI===Ot?j==="svg"&&(fe==="annotation-xml"||wt[fe]):!!_e[j]},Bt=function(j,X,fe){return X.namespaceURI===xt?j==="math":X.namespaceURI===Wt?j==="math"&&Le[fe]:!!Oe[j]},Qe=function(j,X,fe){return X.namespaceURI===Wt&&!Le[fe]||X.namespaceURI===Ot&&!wt[fe]?!1:!Oe[j]&&(Se[j]||!_e[j])},zt=function(j){let X=x(j);(!X||!X.tagName)&&(X={namespaceURI:it,tagName:"template"});const fe=ja(j.tagName),Re=ja(X.tagName);return pt[j.namespaceURI]?j.namespaceURI===Wt?Ve(fe,X,Re):j.namespaceURI===Ot?Bt(fe,X,Re):j.namespaceURI===xt?Qe(fe,X,Re):!!(Je==="application/xhtml+xml"&&pt[j.namespaceURI]):!1},Ht=function(j){Sa(t.removed,{element:j});try{x(j).removeChild(j)}catch{if(y(j),!x(j))throw Jn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},cn=function(j,X,fe){try{j.removeAttributeNode(X)}catch{try{j.removeAttribute(fe)}catch{}}},Yt=function(j){en(j);const X=f(j);if(X){const Re=[];Xn(X,We=>{Sa(Re,We)}),Xn(Re,We=>{try{y(We)}catch{}})}const fe=w(j);if(fe)for(let Re=fe.length-1;Re>=0;--Re){const We=fe[Re],Ke=We&&We.name;typeof Ke=="string"&&cn(j,We,Ke)}},Tt=function(j,X,fe){if(!fe)try{fe=X.getAttributeNode(j)}catch{fe=null}Sa(t.removed,{attribute:fe||null,from:X});try{fe?X.removeAttributeNode(fe):X.removeAttribute(j)}catch{try{X.removeAttribute(j)}catch{}}if(j==="is")if(at||rt)try{Ht(X)}catch{}else try{X.setAttribute(j,"")}catch{}},Jt=function(j){const X=w(j);if(X)for(let fe=X.length-1;fe>=0;--fe){const Re=X[fe],We=Re&&Re.name;typeof We!="string"||W[Me(We)]||cn(j,Re,We)}},en=function(j){const X=[j];for(;X.length>0;){const fe=X.pop();N(fe)===Cn.element&&Jt(fe);const We=f(fe);if(We)for(let Ke=We.length-1;Ke>=0;--Ke)X.push(We[Ke])}},An=function(j,X){return ye?j==="patchsrc"?!0:j==="for"&&X!=="label"&&X!=="output":!1},Nn=function(j){if(!ye)return;const X=[j];for(;X.length>0;){const fe=X.pop(),Re=N(fe);if(Re===Cn.processingInstruction||Re===Cn.comment&&Qt(xl,fe.data)){try{y(fe)}catch{}continue}if(Re===Cn.element){const Ke=fe,we=Me(k(fe));try{Ke.hasAttribute&&Ke.hasAttribute("patchsrc")&&Ke.removeAttribute("patchsrc"),Ke.hasAttribute&&Ke.hasAttribute("for")&&An("for",we)&&Ke.removeAttribute("for")}catch{}}const We=f(fe);if(We)for(let Ke=We.length-1;Ke>=0;--Ke)X.push(We[Ke])}},gn=function(j){let X=null,fe=null;if(ct)j="<remove></remove>"+j;else{const Ke=pl(j,/^[\r\n\t ]+/);fe=Ke&&Ke[0]}Je==="application/xhtml+xml"&&it===xt&&(j='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+j+"</body></html>");const Re=D?M(j):j;if(it===xt)try{X=new h().parseFromString(Re,Je)}catch{}if(!X||!X.documentElement){X=K.createDocument(it,"template",null);try{X.documentElement.innerHTML=bt?A:Re}catch{}}const We=X.body||X.documentElement;return j&&fe&&We.insertBefore(a.createTextNode(fe),We.childNodes[0]||null),it===xt?R.call(X,Ce?"html":"body")[0]:Ce?X.documentElement:We},Pt=function(j){const X=v?v(j):j.ownerDocument;return ee.call(X||j,j,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},St=function(j){return j=Ta(j,S," "),j=Ta(j,$," "),j=Ta(j,I," "),j},Mt=function(j){var X;j.normalize();const fe=v?v(j):j.ownerDocument,Re=ee.call(fe||j,j,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let We=Re.nextNode();for(;We;)We.data=St(We.data),We=Re.nextNode();const Ke=(X=j.querySelectorAll)===null||X===void 0?void 0:X.call(j,"template");Ke&&Xn(Ke,we=>{dn(we.content)&&Mt(we.content)})},Gt=function(j){const X=E?E(j):null;return typeof X!="string"||Me(X)!=="form"?!1:typeof j.nodeName!="string"||typeof j.textContent!="string"||typeof j.removeChild!="function"||j.attributes!==w(j)||typeof j.removeAttribute!="function"||typeof j.setAttribute!="function"||typeof j.namespaceURI!="string"||typeof j.insertBefore!="function"||typeof j.hasChildNodes!="function"||j.nodeType!==_(j)||j.childNodes!==f(j)},dn=function(j){if(!_||typeof j!="object"||j===null)return!1;try{return _(j)===Cn.documentFragment}catch{return!1}},yn=function(j){if(!_||typeof j!="object"||j===null)return!1;try{return typeof _(j)=="number"}catch{return!1}};function Vt(ge,j,X){ge.length!==0&&Xn(ge,fe=>{fe.call(t,j,X,tt)})}const En=function(j,X){return!!(ye&&j.hasChildNodes()&&!yn(j.firstElementChild)&&Qt(_l,j.textContent)&&Qt(_l,j.innerHTML)||ye&&j.namespaceURI===xt&&R1[X]&&(yn(j.firstElementChild)||typeof j.textContent=="string"&&Qt(P1[X],j.textContent))||j.nodeType===Cn.processingInstruction||ye&&j.nodeType===Cn.comment&&Qt(xl,j.data))},he=function(j,X){if(j instanceof RegExp)return Qt(j,X);if(j instanceof Function){for(var fe=arguments.length,Re=new Array(fe>2?fe-2:0),We=2;We<fe;We++)Re[We-2]=arguments[We];return!!j(X,...Re)}return!1},Te=function(j,X,fe){if(!ve[X]&&je(X)&&he(ae.tagNameCheck,X))return!1;if(et&&!dt[X]){const Re=x(j),We=f(j);if(We&&Re){const Ke=We.length;for(let we=Ke-1;we>=0;--we){const Ie=j===fe?b(We[we],!0):We[we];Re.insertBefore(Ie,C(j))}}}return Ht(j),!0},ze=function(j,X,fe,Re){return j.length===0?X:X===fe||X===Re?mn(X):X},Ze=function(j,X){return j===X||x(j)!==null?!1:(ft&&en(j),!0)},He=function(j,X){if(Vt(ne.beforeSanitizeElements,j,null),Ze(j,X))return!0;if(Gt(j))return Ht(j),!0;const fe=Me(k(j));if(H=ze(ne.uponSanitizeElement,H,te,$e),Vt(ne.uponSanitizeElement,j,{tagName:fe,allowedTags:H}),Ze(j,X))return!0;if(En(j,fe))return Ht(j),!0;if(ve[fe]||!(le.tagCheck instanceof Function&&le.tagCheck(fe))&&!H[fe]){const We=Te(j,fe,X);return We===!1&&Vt(ne.afterSanitizeElements,j,null),We}if(N(j)===Cn.element&&!zt(j)||(fe==="noscript"||fe==="noembed"||fe==="noframes")&&Qt(L1,j.innerHTML))return Ht(j),!0;if(se&&j.nodeType===Cn.text){const We=St(j.textContent);j.textContent!==We&&(Sa(t.removed,{element:j.cloneNode()}),j.textContent=We)}return Vt(ne.afterSanitizeElements,j,null),!1},Y=function(j,X,fe){if(me[X]||An(X,j)||Ue&&(X==="id"||X==="name")&&(fe in a||fe in Ft))return!1;const Re=W[X]||le.attributeCheck instanceof Function&&le.attributeCheck(X,j);return Pe&&Qt(P,X)||Be&&Qt(V,X)?!0:Re?At[X]||Qt(Z,Ta(fe,U,""))||(X==="src"||X==="xlink:href"||X==="href")&&j!=="script"&&hl(fe,"data:")===0&&ot[j]||Fe&&!Qt(ie,Ta(fe,U,""))?!0:!fe:je(j)&&he(ae.tagNameCheck,j)&&he(ae.attributeNameCheck,X,j)||X==="is"&&ae.allowCustomizedBuiltInElements&&he(ae.tagNameCheck,fe)},pe=yt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),je=function(j){return!pe[ja(j)]&&Qt(ce,j)},qe=function(j,X,fe,Re){if(D&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!fe)switch(d.getAttributeType(j,X)){case"TrustedHTML":return M(Re);case"TrustedScriptURL":return O(Re)}return Re},Ge=function(j,X,fe,Re){try{fe?j.setAttributeNS(fe,X,Re):j.setAttribute(X,Re),Gt(j)?Ht(j):dl(t.removed)}catch{Tt(X,j)}},Xe=function(j){Vt(ne.beforeSanitizeAttributes,j,null);const X=j.attributes;if(!X||Gt(j))return;W=ze(ne.uponSanitizeAttribute,W,z,nt);const fe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0};let Re=X.length;const We=Me(j.nodeName);for(;Re--;){const Ke=X[Re],we=Ke.name,Ie=Ke.namespaceURI,ut=Ke.value,Et=Me(we),pn=ut;let tn=we==="value"?pn:f1(pn);if(fe.attrName=Et,fe.attrValue=tn,fe.keepAttr=!0,fe.forceKeepAttr=void 0,Vt(ne.uponSanitizeAttribute,j,fe),tn=fe.attrValue,Ne&&(Et==="id"||Et==="name")&&hl(tn,Ye)!==0&&(Tt(we,j,Ke),tn=Ye+tn),ye&&Qt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,tn)){Tt(we,j,Ke);continue}if(Et==="attributename"&&pl(tn,"href")){Tt(we,j,Ke);continue}if(!fe.forceKeepAttr){if(!fe.keepAttr){Tt(we,j,Ke);continue}if(!Ae&&Qt($1,tn)){Tt(we,j,Ke);continue}if(se&&(tn=St(tn)),!Y(We,Et,tn)){Tt(we,j,Ke);continue}tn=qe(We,Et,Ie,tn),tn!==pn&&Ge(j,we,Ie,tn)}}Vt(ne.afterSanitizeAttributes,j,null)},gt=function(j){let X=null;const fe=Pt(j);for(Vt(ne.beforeSanitizeShadowDOM,j,null);X=fe.nextNode();)if(Vt(ne.uponSanitizeShadowNode,X,null),He(X,j),Xe(X),dn(X.content)&&gt(X.content),N(X)===Cn.element){const Re=g(X);dn(Re)&&(Ct(Re),gt(Re))}Vt(ne.afterSanitizeShadowDOM,j,null)},Ct=function(j){const X=[{node:j,shadow:null}];for(;X.length>0;){const fe=X.pop();if(fe.shadow){gt(fe.shadow);continue}const Re=fe.node,Ke=N(Re)===Cn.element,we=f(Re);if(we)for(let Ie=we.length-1;Ie>=0;--Ie)X.push({node:we[Ie],shadow:null});if(Ke){const Ie=E?E(Re):null;if(typeof Ie=="string"&&Me(Ie)==="template"){const ut=Re.content;dn(ut)&&X.push({node:ut,shadow:null})}}if(Ke){const Ie=g(Re);dn(Ie)&&X.push({node:null,shadow:Ie},{node:Ie,shadow:null})}}};return t.sanitize=function(ge){let j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=null,fe=null,Re=null,We=null;if(bt=!ge,bt&&(ge="<!-->"),typeof ge!="string"&&!yn(ge)&&(ge=_1(ge),typeof ge!="string"))throw Jn("dirty is not a string, aborting");if(!t.isSupported)return ge;xe?(H=$e,W=nt):Q(j),(ne.uponSanitizeElement.length>0||ne.uponSanitizeAttribute.length>0)&&(H=mn(H)),ne.uponSanitizeAttribute.length>0&&(W=mn(W)),t.removed=[];const Ke=ft&&typeof ge!="string"&&yn(ge);if(Ke){Nn(ge);const ut=k(ge);if(typeof ut=="string"){const Et=Me(ut);if(!H[Et]||ve[Et])throw Yt(ge),Jn("root node is forbidden and cannot be sanitized in-place")}if(Gt(ge))throw Yt(ge),Jn("root node is clobbered and cannot be sanitized in-place");try{Ct(ge)}catch(Et){throw Yt(ge),Et}}else if(yn(ge))X=gn("<!---->"),fe=X.ownerDocument.importNode(ge,!0),fe.nodeType===Cn.element&&fe.nodeName==="BODY"||fe.nodeName==="HTML"?X=fe:X.appendChild(fe),Ct(fe);else{if(!at&&!se&&!Ce&&ge.indexOf("<")===-1)return D&&Ee?M(ge):ge;if(X=gn(ge),!X)return at?null:Ee?A:""}X&&ct&&Ht(X.firstChild);const we=Ke?ge:X;try{const ut=Pt(we);for(;Re=ut.nextNode();)He(Re,we),Xe(Re),dn(Re.content)&&gt(Re.content)}catch(ut){throw Ke&&(Yt(ge),Xn(t.removed,Et=>{Et.element&&en(Et.element)})),ut}if(Ke)return Xn(t.removed,ut=>{ut.element&&en(ut.element)}),se&&Mt(ge),ge;if(at){if(se&&Mt(X),rt)for(We=re.call(X.ownerDocument);X.firstChild;)We.appendChild(X.firstChild);else We=X;return(W.shadowroot||W.shadowrootmode)&&(We=J.call(r,We,!0)),We}let Ie=Ce?X.outerHTML:X.innerHTML;return Ce&&H["!doctype"]&&X.ownerDocument&&X.ownerDocument.doctype&&X.ownerDocument.doctype.name&&Qt(T1,X.ownerDocument.doctype.name)&&(Ie="<!DOCTYPE "+X.ownerDocument.doctype.name+`>
798
+ `+Ie),se&&(Ie=St(Ie)),D&&Ee?M(Ie):Ie},t.setConfig=function(){let ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Q(ge),xe=!0,$e=H,nt=W},t.clearConfig=function(){tt=null,xe=!1,$e=null,nt=null,D=B,A=""},t.isValidAttribute=function(ge,j,X){tt||Q({});const fe=Me(ge),Re=Me(j);return Y(fe,Re,X)},t.addHook=function(ge,j){typeof j=="function"&&rn(ne,ge)&&Sa(ne[ge],j)},t.removeHook=function(ge,j){if(rn(ne,ge)){if(j!==void 0){const X=m1(ne[ge],j);return X===-1?void 0:C1(ne[ge],X,1)[0]}return dl(ne[ge])}},t.removeHooks=function(ge){rn(ne,ge)&&(ne[ge]=[])},t.removeAllHooks=function(){ne=Bl()},t}var ma=kl();let no=null;const O1=1500;function ao(){no?.clear(),no=null}function z1(e,{onEnd:t,rate:a=.9}={}){if(typeof window>"u"||typeof SpeechSynthesisUtterance>"u"||!("speechSynthesis"in window)){t?.();return}const r=window.speechSynthesis;ao();let s=!1;const l=()=>{if(!s){s=!0;try{t?.()}catch{}}};try{r.cancel()}catch{l();return}const i=()=>{ao();try{r.cancel();const p=new SpeechSynthesisUtterance(e),h=r.getVoices().find(d=>d.lang.startsWith("ko"));h&&(p.voice=h),p.rate=a,p.onend=t?l:null,p.onerror=t?l:null,r.speak(p)}catch{l()}};let u;try{u=r.getVoices()}catch{l();return}if(u.length>0){i();return}const c=setTimeout(i,O1);try{r.addEventListener("voiceschanged",i,{once:!0})}catch{clearTimeout(c),l();return}no={clear:()=>{clearTimeout(c),r.removeEventListener("voiceschanged",i)}}}function ro(){ao(),typeof window<"u"&&"speechSynthesis"in window&&window.speechSynthesis.cancel()}const W1=/^(?:[a-z]+:)?\/\//i,H1="__ihab_core_asset_base_url__";function V1(){return globalThis[H1]??""}function oo(e){const t=String(e||"").trim();if(!t)return"";if(W1.test(t)||t.startsWith("data:")||t.startsWith("blob:"))return t;const a=t.startsWith("/")?t:`/${t}`,r=V1();return r?`${r}${a}`:a}const Al="__ihab_core_storage_resolvers__";function La(){return globalThis[Al]??null}function q1(e){globalThis[Al]=e}let Nl=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,27 +814,27 @@ 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 U1(e){q1(e)}function Nl(e,t){if(!e)return null;const a=La();return a?.resolvePath?a.resolvePath(e,t):t?`${t}/${e}.mp3`:null}async function El(e){if(!e)return null;const t=La();if(!t)throw new Al("getSignedOrPublicUrl");try{return await t.resolveUrl(e)}catch{return null}}async function Dl(e){const t=La();if(!t)throw new Al("downloadSound");return t.download(e)}function G1(){return La()?.noiseBaseUrl??"/sounds/noise"}function K1(){const e=Number(La()?.noiseFileGain);return Number.isFinite(e)&&e>0?e:1}function Y1(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 Z1(e){return e===400||e===404||e===410}const Sl="__ihab_core_tts_config__";function $a(){return globalThis[Sl]?.urlResolver??null}function ir(){return globalThis[Sl]?.fallbackUrlResolver??null}const X1="__ihab_core_pronunciation_resolver__";function J1(){return globalThis[X1]??null}let Vn=null;const Ra=new WeakMap,so=new WeakMap,lo=new WeakMap;let jl=!1;const Tl=e=>Math.max(0,Math.min(1,Number.isFinite(e)?e:0));function Q1(){if(jl||typeof document>"u")return;jl=!0;const e=()=>{try{Vn&&Vn.state!=="running"&&Vn.resume()}catch{}};for(const t of["pointerdown","touchend","keydown"])document.addEventListener(t,e,{capture:!0,passive:!0})}function Ml(){if(Vn)return Vn;try{const e=window.AudioContext||window.webkitAudioContext;return e?(Vn=new e,Q1(),Vn):null}catch{return null}}function io(){try{Vn?.resume()}catch{}}function uo(e,t){const a=Ra.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=Tl(so.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 Ra.set(t,i),i}catch{return null}}function ur(e){if(!e)return Promise.resolve(null);const t=Ra.get(e);if(t)return Promise.resolve(t.analyser);const a=Ml();if(!a)return Promise.resolve(null);if(a.state==="running")return Promise.resolve(uo(a,e)?.analyser??null);const r=lo.get(e);if(r)return r;const s=Promise.resolve().then(()=>a.resume()).then(()=>a.state==="running"?uo(a,e)?.analyser??null:null).catch(()=>null).finally(()=>{lo.delete(e)});return lo.set(e,s),s}function ef(e){if(!e)return null;const t=Ra.get(e);if(t)return t.analyser;const a=Ml();return a?a.state==="running"?uo(a,e)?.analyser??null:(ur(e),null):null}function qn(e,t){const a=Tl(t);so.set(e,a);const r=Ra.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 cr(e){return so.get(e)??e.volume}function tf(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 nf="__ihab_core_image_config__";function Ca(){return globalThis[nf]??null}const Ll="word_image_existence_map_v1",af="ihab:image-existence-updated";let Pa=null;function rf(){Pa!==null&&(clearTimeout(Pa),Pa=null),typeof window<"u"&&window.dispatchEvent(new Event(af))}function of(){Pa===null&&(Pa=setTimeout(rf,200))}let Qn=null,co=0;const Fa=new Map;function sf(){if(Qn)return Qn;try{const e=typeof localStorage<"u"?localStorage.getItem(Ll):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);Qn=a}catch{Qn={}}return Qn}let po=null;function lf(){po===null&&(po=setTimeout(()=>{po=null;try{typeof localStorage<"u"&&Qn&&localStorage.setItem(Ll,JSON.stringify(Qn))}catch{}},200))}function uf(e,t){return`${e}_${t??1}`}async function cf(e,t,a=!1){const r=sf(),s=uf(e,t);if(!a&&s in r)return r[s];if(!a&&Fa.has(s))return Fa.get(s);const l=Ca();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:Y1(8e3)})}catch{return!1}const c=u.then(p=>p.ok?!0:Z1(p.status)?!1:null,()=>null).then(p=>Fa.get(s)!==c?p??!1:(Fa.delete(s),p===null?!1:(r[s]=p,co++,lf(),p)));return Fa.set(s,c),c}async function $l(e,t){const a=co,r=await cf(e,t);return co!==a&&of(),r}const Rl=90;function Pl(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 df(e){return Pl(e)>90?"LMS":"SMS"}function Fl(e,t=85){const a=Pl(e),r=df(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 pf=["onset","vowel","coda","glide"],Il="none",hf={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},mf="\uC5C6\uC74C";function Cf(e){return pf.includes(e)}function ff(e){const t={};for(const[a,r]of Object.entries(e)){const s=Cf(a)?a:hf[a];s&&(t[s]=r===mf?Il:r)}return t}const bf={\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"}},Ol=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],zl=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],gf=["","\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 Ia(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 yf(e){const t=Ia(e[0]||"");return t?Ol[t.cho]:""}function vf(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],a=i=>Ol.includes(i),r=i=>zl.includes(i),s=t.map(i=>a(i)?"cho":r(i)?"jung":Ia(i)?"syl":"other"),l=t.map(i=>Ia(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 p=!0;for(let h=0;h<t.length;h++){const d=u[c+h],m=s[h];if(m==="cho"){if(yf(d)!==t[h]){p=!1;break}}else if(m==="jung"){const b=Ia(d);if(!b||zl[b.jung]!==t[h]){p=!1;break}}else{const b=l[h];if(b&&b.jong===0){const y=Ia(d);if(!y||y.cho!==b.cho||y.jung!==b.jung){p=!1;break}}else if(d!==t[h]){p=!1;break}}}if(p)return!0}return!1}}const _f={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(_f).map(([e,t])=>[t.join(""),gf[Number(e)]]));const xf="word_pair_index_v2",wf="word_pair_index_sig_v2";let dr=null;function Bf(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 kf(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(xf),t=localStorage.getItem(wf);if(!e||!t)return null;const a=JSON.parse(e);return Bf(a)?{index:a,sig:t}:null}catch{return null}}function Af(){if(dr)return dr;const e=kf();return e?(dr=e.index,e.sig,dr):null}function Nf(e,t,a){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+a)/(t+a)))}function Ef(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 ho=/[ㄱ-ㅎ]/,Df=/[ㅏ-ㅣ]/;function Wl(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||ho.test(a)||Df.test(a))return a}return null}function Sf(e){const t=Wl(e);if(!t)return"\uAC00";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC774":"\uAC00":ho.test(t)?"\uC774":"\uAC00"}function jf(e){return`${e}${Sf(e)}`}function Tf(e){const t=Wl(e);if(!t)return"\uB97C";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC744":"\uB97C":ho.test(t)?"\uC744":"\uB97C"}function Mf(e){return`${e}${Tf(e)}`}function Lf(e,t,a){const r=e.slice(),[s]=r.splice(t,1);return r.splice(a,0,s),r}function Oa(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 $f=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",t=typeof Zt?.t=="function"?Zt.t("common.unknownError",{defaultValue:e}):void 0;return typeof t=="string"&&t?t:e};function Hl(e,t){if(t===void 0&&(t=$f()),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 Rf="__ihab_core_word_pool__";function Vl(){return globalThis[Rf]??null}const ql=globalThis;function Ul(e,t){const a=r=>{};try{const r=t();r&&typeof r.catch=="function"&&r.catch(a)}catch(r){a(r)}}function Pf(e){Ul("time",()=>ql.__ihabTrainingTimeLogger?.(e))}function Ff(e){Ul("completion",()=>ql.__ihabTrainingCompletionLogger?.(e))}const If="Asia/Seoul",Of=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function za(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=Of.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 zf(e){return za(e)!==null}const Wf=e=>za(e);function Gl(e,t){const a=t.startsWith("ko")?"ko-KR":"en-US",r=Wf(e);return r?r.toLocaleDateString(a,{timeZone:If,year:"numeric",month:"short",day:"numeric"}):""}function Kl(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function Hf(e,t,a){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(Kl(a),{year:"numeric",month:"long"}).format(new Date(e,t-1,1))}function Yl(e,t,a,r){return e("calendar.yearMonth",{year:a,month:r,defaultValue:""})||Hf(a,r,t)}function Wa(){return mo(new Date)}function pr(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&za(e)?.toISOString().slice(0,10)===e?e:Wa()}function fa(){return qf(Wa())}const Vf=540*60*1e3;function Zl(e,t,a){return new Date(Date.UTC(e,t,a)-Vf)}function qf(e){const[t,a,r]=e.split("-").map(Number);return new Date(t,(a||1)-1,r||1)}function mo(e){if(e==null||e==="")return"";const t=za(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function Xl(e,t){if(!e)return"";const a=za(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),p=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(p,11)}):t("store.time.yearsAgo",{n:h})}function Jl(e,t={}){const{sep:a=".",pad:r=!0,trailingDot:s=!1,fallback:l="\u2014"}=t;if(!e)return l;const i=mo(e instanceof Date?e:String(e));if(!i)return l;const[u,c,p]=i.split("-"),h=r?c:String(Number(c)),d=r?p:String(Number(p));return`${u}${a}${h}${a}${d}${s?".":""}`}function hr(e){if(typeof e=="string"){const t=e.trim();return t&&zf(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 Uf(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 Gf(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:Uf(r),shownAt:hr(r.shownAt)??hr(r.shown_at),answeredAt:hr(r.answeredAt)??hr(r.answered_at)}}):[]}const Co=globalThis;async function Kf(){try{return await Co.__ihabNoiseSettingsStore?.load()??null}catch{return null}}function fo(e){const t=a=>{};try{const a=Co.__ihabNoiseSettingsStore?.save(e);a&&typeof a.catch=="function"&&a.catch(t)}catch(a){t(a)}}function mr(e){try{Co.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function Yf(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 ba(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Ql(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 bo(e){return(e??0).toLocaleString("ko-KR")}const Zf=[{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"}]}],Xf=[{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 ei(){return Zf}function Jf(){return Xf}const Qf=[],eb=[],tb=[],nb=[];function ab(){return{LISTEN_IN_NOISE:Qf,SHORT_STORY:eb,LONG_STORY:tb,ORDERING_SENTENCE:nb}}const rb=[{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."}],ti={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function ob(e){return rb.map(t=>{const a=ti[t.key];return a?{...t,label:e(`trainingType.${a}.title`),desc:e(`trainingType.${a}.desc`)}:t})}var sb={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."},lb={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"],yearMonthCompact:"{{year}}.{{month}}",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"},ib={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"}},ub={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},cb={selected:"\uC120\uD0DD\uB428"},db={placeholder:"\uC120\uD0DD"},pb={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},hb={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"},mb={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"},Cb={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"}}}},fb={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},bb={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."}}},gb={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"}},yb={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"}}},vb={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"}}}},_b={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},xb={showN:"{{n}}\uAC1C\uC529"},wb={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."}},Bb={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},kb={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},Ab={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"},Nb={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"},Eb={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"},Db={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"}},Sb={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"}},jb={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"}},Tb={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."]},Mb={lead:`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
817
+ `),this.name="StorageNotConfiguredError"}};function U1(e){q1(e)}function El(e,t){if(!e)return null;const a=La();return a?.resolvePath?a.resolvePath(e,t):t?`${t}/${e}.mp3`:null}async function Dl(e){if(!e)return null;const t=La();if(!t)throw new Nl("getSignedOrPublicUrl");try{return await t.resolveUrl(e)}catch{return null}}async function Sl(e){const t=La();if(!t)throw new Nl("downloadSound");return t.download(e)}function G1(){return La()?.noiseBaseUrl??"/sounds/noise"}function K1(){const e=Number(La()?.noiseFileGain);return Number.isFinite(e)&&e>0?e:1}function Y1(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 Z1(e){return e===400||e===404||e===410}const jl="__ihab_core_tts_config__";function $a(){return globalThis[jl]?.urlResolver??null}function ir(){return globalThis[jl]?.fallbackUrlResolver??null}const X1="__ihab_core_pronunciation_resolver__";function J1(){return globalThis[X1]??null}let Vn=null;const Ra=new WeakMap,so=new WeakMap,lo=new WeakMap;let Tl=!1;const Ml=e=>Math.max(0,Math.min(1,Number.isFinite(e)?e:0));function Q1(){if(Tl||typeof document>"u")return;Tl=!0;const e=()=>{try{Vn&&Vn.state!=="running"&&Vn.resume()}catch{}};for(const t of["pointerdown","touchend","keydown"])document.addEventListener(t,e,{capture:!0,passive:!0})}function Ll(){if(Vn)return Vn;try{const e=window.AudioContext||window.webkitAudioContext;return e?(Vn=new e,Q1(),Vn):null}catch{return null}}function io(){try{Vn?.resume()}catch{}}function uo(e,t){const a=Ra.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=Ml(so.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 Ra.set(t,i),i}catch{return null}}function ur(e){if(!e)return Promise.resolve(null);const t=Ra.get(e);if(t)return Promise.resolve(t.analyser);const a=Ll();if(!a)return Promise.resolve(null);if(a.state==="running")return Promise.resolve(uo(a,e)?.analyser??null);const r=lo.get(e);if(r)return r;const s=Promise.resolve().then(()=>a.resume()).then(()=>a.state==="running"?uo(a,e)?.analyser??null:null).catch(()=>null).finally(()=>{lo.delete(e)});return lo.set(e,s),s}function ef(e){if(!e)return null;const t=Ra.get(e);if(t)return t.analyser;const a=Ll();return a?a.state==="running"?uo(a,e)?.analyser??null:(ur(e),null):null}function qn(e,t){const a=Ml(t);so.set(e,a);const r=Ra.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 cr(e){return so.get(e)??e.volume}function tf(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 nf="__ihab_core_image_config__";function Ca(){return globalThis[nf]??null}const $l="word_image_existence_map_v1",af="ihab:image-existence-updated";let Pa=null;function rf(){Pa!==null&&(clearTimeout(Pa),Pa=null),typeof window<"u"&&window.dispatchEvent(new Event(af))}function of(){Pa===null&&(Pa=setTimeout(rf,200))}let Qn=null,co=0;const Fa=new Map;function sf(){if(Qn)return Qn;try{const e=typeof localStorage<"u"?localStorage.getItem($l):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);Qn=a}catch{Qn={}}return Qn}let po=null;function lf(){po===null&&(po=setTimeout(()=>{po=null;try{typeof localStorage<"u"&&Qn&&localStorage.setItem($l,JSON.stringify(Qn))}catch{}},200))}function uf(e,t){return`${e}_${t??1}`}async function cf(e,t,a=!1){const r=sf(),s=uf(e,t);if(!a&&s in r)return r[s];if(!a&&Fa.has(s))return Fa.get(s);const l=Ca();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:Y1(8e3)})}catch{return!1}const c=u.then(p=>p.ok?!0:Z1(p.status)?!1:null,()=>null).then(p=>Fa.get(s)!==c?p??!1:(Fa.delete(s),p===null?!1:(r[s]=p,co++,lf(),p)));return Fa.set(s,c),c}async function Rl(e,t){const a=co,r=await cf(e,t);return co!==a&&of(),r}const Pl=90;function Fl(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 df(e){return Fl(e)>90?"LMS":"SMS"}function Il(e,t=85){const a=Fl(e),r=df(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 pf=["onset","vowel","coda","glide"],Ol="none",hf={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},mf="\uC5C6\uC74C";function Cf(e){return pf.includes(e)}function ff(e){const t={};for(const[a,r]of Object.entries(e)){const s=Cf(a)?a:hf[a];s&&(t[s]=r===mf?Ol:r)}return t}const bf={\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"}},zl=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],Wl=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],gf=["","\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 Ia(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 yf(e){const t=Ia(e[0]||"");return t?zl[t.cho]:""}function vf(e){if(!e)return()=>!0;e=e.normalize("NFC");const t=[...e],a=i=>zl.includes(i),r=i=>Wl.includes(i),s=t.map(i=>a(i)?"cho":r(i)?"jung":Ia(i)?"syl":"other"),l=t.map(i=>Ia(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 p=!0;for(let h=0;h<t.length;h++){const d=u[c+h],m=s[h];if(m==="cho"){if(yf(d)!==t[h]){p=!1;break}}else if(m==="jung"){const b=Ia(d);if(!b||Wl[b.jung]!==t[h]){p=!1;break}}else{const b=l[h];if(b&&b.jong===0){const y=Ia(d);if(!y||y.cho!==b.cho||y.jung!==b.jung){p=!1;break}}else if(d!==t[h]){p=!1;break}}}if(p)return!0}return!1}}const _f={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(_f).map(([e,t])=>[t.join(""),gf[Number(e)]]));const xf="word_pair_index_v2",wf="word_pair_index_sig_v2";let dr=null;function Bf(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 kf(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(xf),t=localStorage.getItem(wf);if(!e||!t)return null;const a=JSON.parse(e);return Bf(a)?{index:a,sig:t}:null}catch{return null}}function Af(){if(dr)return dr;const e=kf();return e?(dr=e.index,e.sig,dr):null}function Nf(e,t,a){return!(e>0)||!(t>0)?1:Math.max(1,Math.floor((e+a)/(t+a)))}function Ef(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 ho=/[ㄱ-ㅎ]/,Df=/[ㅏ-ㅣ]/;function Hl(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||ho.test(a)||Df.test(a))return a}return null}function Sf(e){const t=Hl(e);if(!t)return"\uAC00";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC774":"\uAC00":ho.test(t)?"\uC774":"\uAC00"}function jf(e){return`${e}${Sf(e)}`}function Tf(e){const t=Hl(e);if(!t)return"\uB97C";const a=t.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC744":"\uB97C":ho.test(t)?"\uC744":"\uB97C"}function Mf(e){return`${e}${Tf(e)}`}function Lf(e,t,a){const r=e.slice(),[s]=r.splice(t,1);return r.splice(a,0,s),r}function Oa(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 $f=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",t=typeof Zt?.t=="function"?Zt.t("common.unknownError",{defaultValue:e}):void 0;return typeof t=="string"&&t?t:e};function Vl(e,t){if(t===void 0&&(t=$f()),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 Rf="__ihab_core_word_pool__";function ql(){return globalThis[Rf]??null}const Ul=globalThis;function Gl(e,t){const a=r=>{};try{const r=t();r&&typeof r.catch=="function"&&r.catch(a)}catch(r){a(r)}}function Pf(e){Gl("time",()=>Ul.__ihabTrainingTimeLogger?.(e))}function Ff(e){Gl("completion",()=>Ul.__ihabTrainingCompletionLogger?.(e))}const If="Asia/Seoul",Of=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function za(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=Of.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 zf(e){return za(e)!==null}const Wf=e=>za(e);function Kl(e,t){const a=t.startsWith("ko")?"ko-KR":"en-US",r=Wf(e);return r?r.toLocaleDateString(a,{timeZone:If,year:"numeric",month:"short",day:"numeric"}):""}function mo(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function Hf(e,t,a){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(mo(a),{year:"numeric",month:"long"}).format(new Date(e,t-1,1))}function Vf(e,t,a){return!Number.isFinite(e)||!Number.isFinite(t)||t<1||t>12?`${e}-${t}`:new Intl.DateTimeFormat(mo(a),{year:"numeric",month:"short"}).format(new Date(e,t-1,1))}function Yl(e,t,a,r){return e("calendar.yearMonth",{year:a,month:r,defaultValue:""})||Hf(a,r,t)}function Wa(){return Co(new Date)}function pr(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&za(e)?.toISOString().slice(0,10)===e?e:Wa()}function fa(){return Uf(Wa())}const qf=540*60*1e3;function Zl(e,t,a){return new Date(Date.UTC(e,t,a)-qf)}function Uf(e){const[t,a,r]=e.split("-").map(Number);return new Date(t,(a||1)-1,r||1)}function Co(e){if(e==null||e==="")return"";const t=za(e);return t?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t):""}function Xl(e,t){if(!e)return"";const a=za(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),p=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(p,11)}):t("store.time.yearsAgo",{n:h})}function Jl(e,t={}){const{sep:a=".",pad:r=!0,trailingDot:s=!1,fallback:l="\u2014"}=t;if(!e)return l;const i=Co(e instanceof Date?e:String(e));if(!i)return l;const[u,c,p]=i.split("-"),h=r?c:String(Number(c)),d=r?p:String(Number(p));return`${u}${a}${h}${a}${d}${s?".":""}`}function hr(e){if(typeof e=="string"){const t=e.trim();return t&&zf(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 Gf(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 Kf(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:Gf(r),shownAt:hr(r.shownAt)??hr(r.shown_at),answeredAt:hr(r.answeredAt)??hr(r.answered_at)}}):[]}const fo=globalThis;async function Yf(){try{return await fo.__ihabNoiseSettingsStore?.load()??null}catch{return null}}function bo(e){const t=a=>{};try{const a=fo.__ihabNoiseSettingsStore?.save(e);a&&typeof a.catch=="function"&&a.catch(t)}catch(a){t(a)}}function mr(e){try{fo.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function Zf(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 ba(e){if(!e)return e;const t=e.trim();return/^[₩$]/.test(t)?t:/원\s*$/.test(t)?"\u20A9"+t.replace(/\s*원\s*$/,"").trim():t}function Ql(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 go(e){return(e??0).toLocaleString("ko-KR")}const Xf=[{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"}]}],Jf=[{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 ei(){return Xf}function Qf(){return Jf}const eb=[],tb=[],nb=[],ab=[];function rb(){return{LISTEN_IN_NOISE:eb,SHORT_STORY:tb,LONG_STORY:nb,ORDERING_SENTENCE:ab}}const ob=[{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."}],ti={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function sb(e){return ob.map(t=>{const a=ti[t.key];return a?{...t,label:e(`trainingType.${a}.title`),desc:e(`trainingType.${a}.desc`)}:t})}var lb={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."},ib={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"],yearMonthCompact:"{{year}}.{{month}}",weekLabel:"{{ord}}\uC8FC",weekLabelCompact:"{{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"},ub={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"}},cb={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},db={selected:"\uC120\uD0DD\uB428"},pb={placeholder:"\uC120\uD0DD"},hb={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},mb={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"},Cb={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"},fb={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"}}}},bb={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},gb={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."}}},yb={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"}},vb={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"}}},_b={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"}}}},xb={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},wb={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."}},kb={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},Ab={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},Nb={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"},Eb={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"},Db={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"},Sb={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"}},jb={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"}},Tb={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"}},Mb={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."]},Lb={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"},Lb={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},$b={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"},Rb={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"},Pb={ariaLabel:"\uC120\uD0DD \uD0ED"},Fb={ariaLabel:"\uD0ED"},Ib={dragPrompt:"\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC",browseButton:"\uD30C\uC77C \uC120\uD0DD",removeAriaLabel:"{{name}} \uC81C\uAC70"},Ob={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},zb={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"}},Wb={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"},Hb={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"}},Vb={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},qb={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"},Ub={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"},Gb={viewWords:"\uB0B1\uB9D0"},Kb={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},Yb={chooseDate:"\uB0A0\uC9DC \uC120\uD0DD",selectYear:"\uC5F0 \uC120\uD0DD",selectMonth:"\uC6D4 \uC120\uD0DD"},Zb={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},Xb={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},Jb={place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},Qb={clearSelection:"\uC120\uD0DD \uD574\uC81C"},eg={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},tg={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},ng={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},ag={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},rg={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},og={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},sg={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"},lg={common:sb,calendar:lb,passCard:ib,rating:ub,colorPicker:cb,dropdown:db,accordion:pb,header:hb,nav:mb,settings:Cb,usage:fb,account:bb,training:gb,customers:yb,payment:vb,coupons:_b,visits:xb,trainingType:wb,myWordTable:Bb,keyWords:kb,wordTable:Ab,wordSearch:Nb,wordPrint:Eb,topic:Db,device:Sb,manager:jb,wordPairs:Tb,footer:Mb,date:Lb,wordData:$b,textField:Rb,segmentedControl:Pb,tabs:Fb,fileUpload:Ib,avatar:Ob,myHomework:zb,trainingStatus:Wb,store:Hb,progress:Vb,trainingMiss:qb,table:Ub,wordScore:Gb,topBanner:Kb,datePicker:Yb,report:Zb,tooltip:Xb,phonemeProfile:Jb,bulkBar:Qb,debug:eg,badge:tg,loader:ng,soundCompass:ag,breadcrumb:rg,board:og,promoBannerBg:sg},ig={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."},ug={rangeSelect:"Select period",dow:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],yearMonthCompact:"{{full}}",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"]},cg={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"}},dg={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},pg={selected:"selected"},hg={placeholder:"Select"},mg={collapse:"Collapse",expand:"Expand"},Cg={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},fg={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"},bg={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"}}}},gg={couponButton:"Enter Coupon"},yg={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."}}},vg={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"}},_g={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"}}},xg={plan:{recommendedFor:"Recommended for",features:"Key Features",freePrice:"Free",contact:"Contact Us",tierFallback:"Plan",openPromo:"Launch offer"},products:{mgrEnterprise:{tier:{price:"Contact us"}}}},wg={input:{label:"Coupon code",placeholder:"Enter coupon code"},applyButton:"Apply"},Bg={showN:"Show {{n}}"},kg={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."}},Ag={newBadge:"Newly created",publishedBadge:"Published",sharedBadge:"Shared"},Ng={title:"Key Words",empty:"No key words available."},Eg={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"},Dg={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"},Sg={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removePairFor:"Remove the pair {{name}}",removeWord:"Remove word",removeWordFor:"Remove {{name}}"},jg={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"}},Tg={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"}},Mg={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}}"}},Lg={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."]},$g={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"},$b={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},Rb={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"},Pb={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"},Fb={ariaLabel:"\uC120\uD0DD \uD0ED"},Ib={ariaLabel:"\uD0ED"},Ob={dragPrompt:"\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC",browseButton:"\uD30C\uC77C \uC120\uD0DD",removeAriaLabel:"{{name}} \uC81C\uAC70"},zb={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},Wb={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"}},Hb={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"},Vb={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"}},qb={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},Ub={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"},Gb={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"},Kb={viewWords:"\uB0B1\uB9D0"},Yb={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},Zb={chooseDate:"\uB0A0\uC9DC \uC120\uD0DD",selectYear:"\uC5F0 \uC120\uD0DD",selectMonth:"\uC6D4 \uC120\uD0DD"},Xb={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},Jb={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},Qb={place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},eg={clearSelection:"\uC120\uD0DD \uD574\uC81C"},tg={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},ng={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},ag={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},rg={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},og={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},sg={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},lg={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"},ig={common:lb,calendar:ib,passCard:ub,rating:cb,colorPicker:db,dropdown:pb,accordion:hb,header:mb,nav:Cb,settings:fb,usage:bb,account:gb,training:yb,customers:vb,payment:_b,coupons:xb,visits:wb,trainingType:Bb,myWordTable:kb,keyWords:Ab,wordTable:Nb,wordSearch:Eb,wordPrint:Db,topic:Sb,device:jb,manager:Tb,wordPairs:Mb,footer:Lb,date:$b,wordData:Rb,textField:Pb,segmentedControl:Fb,tabs:Ib,fileUpload:Ob,avatar:zb,myHomework:Wb,trainingStatus:Hb,store:Vb,progress:qb,trainingMiss:Ub,table:Gb,wordScore:Kb,topBanner:Yb,datePicker:Zb,report:Xb,tooltip:Jb,phonemeProfile:Qb,bulkBar:eg,debug:tg,badge:ng,loader:ag,soundCompass:rg,breadcrumb:og,board:sg,promoBannerBg:lg},ug={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."},cg={rangeSelect:"Select period",dow:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],yearMonthCompact:"{{short}}",weekLabel:"Week {{ord}}",weekLabelCompact:"W{{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"]},dg={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"}},pg={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},hg={selected:"selected"},mg={placeholder:"Select"},Cg={collapse:"Collapse",expand:"Expand"},fg={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},bg={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"},gg={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"}}}},yg={couponButton:"Enter Coupon"},vg={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."}}},_g={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"}},xg={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"}}},wg={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"},kg={showN:"Show {{n}}"},Ag={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."}},Ng={newBadge:"Newly created",publishedBadge:"Published",sharedBadge:"Shared"},Eg={title:"Key Words",empty:"No key words available."},Dg={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"},Sg={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"},jg={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removePairFor:"Remove the pair {{name}}",removeWord:"Remove word",removeWordFor:"Remove {{name}}"},Tg={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"}},Mg={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"}},Lg={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}}"}},$g={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."]},Rg={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"},Rg={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},Pg={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"},Fg={clearAriaLabel:"Clear input"},Ig={ariaLabel:"Select tab"},Og={ariaLabel:"Tabs"},zg={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},Wg={ariaLabel:"User avatar"},Hg={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},Vg={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"},qg={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"}},Ug={steps:"Step {{current}} of {{total}}"},Gg={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"},Kg={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},Yg={viewWords:"Words"},Zg={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},Xg={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},Jg={previewRegion:"Report preview \u2014 scrollable sideways"},Qg={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},ey={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},ty={clearSelection:"Clear selection"},ny={showResult:"Show {{type}} result"},ay={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},ry={loading:"Loading"},oy={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},sy={ariaLabel:"Breadcrumb"},ly={empty:"No items yet."},iy={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"},uy={common:ig,calendar:ug,passCard:cg,rating:dg,colorPicker:pg,dropdown:hg,accordion:mg,header:Cg,nav:fg,settings:bg,usage:gg,account:yg,training:vg,customers:_g,payment:xg,coupons:wg,visits:Bg,trainingType:kg,myWordTable:Ag,keyWords:Ng,wordTable:Eg,wordSearch:Dg,wordPrint:Sg,topic:jg,device:Tg,manager:Mg,wordPairs:Lg,footer:$g,date:Rg,wordData:Pg,textField:Fg,segmentedControl:Ig,tabs:Og,fileUpload:zg,avatar:Wg,myHomework:Hg,trainingStatus:Vg,store:qg,progress:Ug,trainingMiss:Gg,table:Kg,wordScore:Yg,topBanner:Zg,datePicker:Xg,report:Jg,tooltip:Qg,phonemeProfile:ey,bulkBar:ty,debug:ny,badge:ay,loader:ry,soundCompass:oy,breadcrumb:sy,board:ly,promoBannerBg:iy};const cy="0.415.0",dy=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],go="ko",py="ihab_display_language";function ni(){if(typeof window>"u")return go;try{const e=localStorage.getItem(py);if(e&&dy.some(t=>t.code===e))return e}catch{}return go}function ai(e){try{document.documentElement.lang=e}catch{}}Zt.on("languageChanged",ai),ai(ni()),Zt.use(ke.initReactI18next).init({resources:{ko:{translation:lg},en:{translation:uy}},lng:ni(),fallbackLng:go,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const hy=new Map;try{Zt.store?.on?.("added",()=>hy.clear())}catch{}let Cr=null,ri=null,oi=null;function my(){const e=Vl();if(e&&e.entries.length>0){const t=Af();if(Cr&&ri===e&&oi===t)return Cr;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 Cr=r,ri=e,oi=t,Cr}return[]}new Proxy([],{get(e,t){const a=my(),r=a[t];return typeof r=="function"?r.bind(a):r}});function Cy(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 fy(e){if(typeof window>"u")return"";const t=(a,r)=>{typeof r.attrValue=="string"&&Cy(r.attrValue)&&(r.keepAttr=!1)};ma.addHook("uponSanitizeAttribute",t);try{return ma.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{ma.removeHook("uponSanitizeAttribute",t)}}function by(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),[l,i]=o.useState(null),[u,c]=o.useState(null),[p,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 d=e.split("/").pop();let m=e;d&&(e.startsWith("/")?m=oo(e):/^(Logo|Symbol)/i.test(d)?m=oo(`logo/${d}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),m=e)),i(null),c(null),a(e),s(m)},[e]),o.useEffect(()=>{if(!r)return;let d=!1;async function m(){try{let b=await fetch(r);b.ok||(b=await fetch(r));const y=b.headers.get("content-type")||"";if(d)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(d)return;if(/^\s*<svg[\s>]/i.test(f)){const x=fy(f);if(!x){i("none");return}c(x),i("inline");return}i("none")}catch{d||i("none")}}return m(),()=>{d=!0}},[r]),o.useEffect(()=>{let d=!1,m=null;return l==="mask"&&r&&fetch(r).then(b=>{if(!b.ok)throw new Error("fetch failed");return b.blob()}).then(b=>{d||(m=URL.createObjectURL(b),h(m))}).catch(()=>{d||i("img")}),()=>{d=!0,m&&URL.revokeObjectURL(m),h(null)}},[l,r]),t===e?{iconToUse:r,mode:l,svgText:u,blobUrl:p}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function lt(e){const{icon:t,label:a,className:r,imgClassName:s,maskClassName:l,svgClassName:i,wrapperStyle:u,size:c}=e||{},p=r??"iconRenderer-icon",h=s??"iconRenderer-icon-image",d=l??"iconRenderer-icon-mask",m=i??"iconRenderer-icon-svg",b=typeof t=="string"?t:null,y=o1(b),{iconToUse:C,mode:f,svgText:x,blobUrl:g}=by(b),w=(k,D={})=>n.jsx("span",{className:p,style:u,...D,children:k}),_=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,E=(k,D={})=>n.jsx("img",{src:k,alt:typeof a=="string"?a:typeof a=="number"?String(a):"",className:h,...D,style:_?{...D.style,..._}:D.style});if(!t)return null;if(typeof t!="string")return 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 k={"--icon-url":g?`url(${g})`:`url(${C})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return w(n.jsx("span",{className:d,style:k}),{"aria-hidden":"true"})}return f==="img"?w(E(C,{onError:k=>{k.currentTarget.onerror=null,k.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):f==="inline"?w(n.jsx("span",{className:m,dangerouslySetInnerHTML:x?{__html:x}: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 E(oo(t),{style:u,onError:k=>{k.currentTarget.onerror=null,k.currentTarget.style.display="none"}});const v=typeof c=="number"?c:20,N=`<svg width="${v}" height="${v}" 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:N}}),{"aria-hidden":"true"})}function si(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 gy({icon:e,title:t,message:a,action:r,className:s}){const{pending:l,press:i}=si(r?.onClick);return n.jsxs("div",{className:De("empty-state",s),children:[e&&n.jsx(lt,{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(lt,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function yy({message:e,hint:t,icon:a="triangle-alert",onRetry:r,retryLabel:s,className:l}){const{t:i}=ke.useTranslation(),{pending:u,press:c}=si(r);return n.jsxs("div",{className:De("empty-state","error-state",l),role:"alert",children:[n.jsx(lt,{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(lt,{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 vy({icon:e,title:t,description:a,cta:r,tone:s="main",disabled:l=!1,onClick:i,className:u=""}){const c=o.useId(),p=`${c}-title`,h=`${c}-desc`,d=`${c}-cta`,m=()=>{l||i?.()};return n.jsx("section",{role:"button",tabIndex:l?-1:0,"aria-disabled":l||void 0,"aria-labelledby":p,"aria-describedby":`${h} ${d}`,onClick:m,onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),m())},className:De("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(lt,{icon:e,size:34})}),n.jsxs("div",{className:"action-card__text",children:[n.jsx("h2",{id:p,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:d,children:r}),n.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:n.jsx(lt,{icon:"arrow-right",size:18})})]})]})})}function _y({as:e="div",className:t="",children:a,storage:r,...s}){r&&U1({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=De("ihabdevteam-core-scope",t);return n.jsx(e,{className:l,...s,children:a})}function xy(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 yo(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(Dn)).filter(xy);if(!l.length){s.preventDefault();return}const i=l[0],u=l[l.length-1],c=document.activeElement,p=c===a;s.shiftKey&&(c===i||p)?(s.preventDefault(),u.focus()):!s.shiftKey&&c===u&&(s.preventDefault(),i.focus())};return a.addEventListener("keydown",r),()=>a.removeEventListener("keydown",r)},[e,t])}const Dn='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',vo=new WeakMap;function _o(e,t){e&&vo.set(e,t)}function xo(e){let t=e;for(let a=0;t&&!t.isConnected&&a<10;a++){let r=t;for(;r&&!vo.has(r);)r=r.parentElement;if(!r)return t;t=vo.get(r)??null}return t}function li(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 fr(e,t,a){const r=e?.isConnected?e:a?.isConnected?a:null;if(li(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!r)return null;const s=Array.from(document.querySelectorAll(Dn)).filter(c=>!(e&&e.contains(c))&&li(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 wy({title:e="",lines:t=[],notices:a=null,children:r,variant:s="default",dismissible:l=!1,className:i=""}){const{t:u}=ke.useTranslation(),[c,p]=o.useState(!1),h=o.useRef(null),d=o.useCallback(()=>{const C=h.current;C&&C.contains(document.activeElement)&&fr(C),p(!0)},[]);if(c)return null;const m=`notice-box notice-box--${s} body-2 ${i}`.trim(),b=l&&n.jsx("button",{type:"button",className:"notice-box__dismiss",onClick:d,"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((x,g)=>n.jsx("span",{className:"notice-box__line body-3",children:x},g))}):C.children??null})]},f)),b]});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,b]})}const By={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function ga(e){const{t}=ke.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)),p=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:p,"aria-label":i,children:n.jsx("div",{className:"loader-bar__inner",style:c?void 0:{width:`${p}%`}})})}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:By,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 ya=[];let br=!1;function ii(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=ya[ya.length-1];t&&(e.stopPropagation(),t())}function ea(e){return ya.push(e),!br&&typeof document<"u"&&(document.addEventListener("keydown",ii),br=!0),()=>{const t=ya.lastIndexOf(e);t>=0&&ya.splice(t,1),ya.length===0&&br&&typeof document<"u"&&(document.removeEventListener("keydown",ii),br=!1)}}const ui=o.createContext(null);function ky(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const ci=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function Ay(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 Is.useSyncExternalStore(t,()=>ci(e),()=>!1)}function Ny(e){const[t,a]=o.useState(ci(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 Ey=typeof Is.useSyncExternalStore=="function"?Ay:Ny;function vn(e){const t=o.useContext(ui),a=Ey(e);return t&&typeof t.mobile=="boolean"&&ky(e)?t.mobile:a}const Dy="(prefers-reduced-motion: reduce)";function wo(){return vn(Dy)}const di={"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"};function Sy(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 jy(e){return Sy(di,e)}function ue(e){if(!e||Object.keys(di).length===0)return e;const t=[];for(const a of e.split(/\s+/)){if(!a)continue;const r=jy(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:p="",children:h,backdrop:d=!1,isMobilePopup:m=!1,useBorder:b=!0,header:y,focusOnOpen:C}=e||{},f=o.useRef(null),[x,g]=o.useState({position:"fixed",left:0,top:-9999}),[w,_]=o.useState(!1),[E,v]=o.useState("bottom"),[N,k]=o.useState(!1),[D,A]=o.useState(!1),B=!t&&!a,F=o.useRef(null),L=o.useCallback((R=!1,J=!1)=>{if(D&&m)return;const ne=a?a.getBoundingClientRect():t,S=J&&F.current?F.current:ne;if(!S||!f.current)return;const $=f.current,{offsetWidth:I,offsetHeight:P}=$,V=window.innerWidth,ie=window.innerHeight,U=V-S.right,ce=S.left,Z=S.top,H=ie-S.bottom;let te=0,W=0,z="top";if(Z>=P+r)z="top",W=S.top-r-P,te=S.left+S.width/2-I/2;else if(H>=P+r)z="bottom",W=S.bottom+r,te=S.left+S.width/2-I/2;else if(U>=I+r)z="right",te=S.right+r,W=S.top+S.height/2-P/2;else if(ce>=I+r)z="left",te=S.left-r-I,W=S.top+S.height/2-P/2;else{const le=Math.max(Z,H,U,ce);le===Z?(z="top",W=S.top-r-P,te=S.left+S.width/2-I/2):le===H?(z="bottom",W=S.bottom+r,te=S.left+S.width/2-I/2):le===U?(z="right",te=S.right+r,W=S.top+S.height/2-P/2):(z="left",te=S.left-r-I,W=S.top+S.height/2-P/2)}const ae=Number.isFinite(Number(s))?Number(s):8;te=Math.min(Math.max(te,ae),V-I-ae),W=Math.min(Math.max(W,ae),ie-P-ae);const ve=Math.round(te),me=Math.round(W);R&&f.current?(f.current.style.left=`${ve}px`,f.current.style.top=`${me}px`,f.current.dataset.placement=z):(v(z||E),g({position:"fixed",left:ve,top:me}),k(!0))},[D,m,a,t,r,s,E]);o.useEffect(()=>()=>{F.current=null},[a,t]),o.useLayoutEffect(()=>{if(B)return;if(D&&m){g({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),k(!0);return}F.current===null&&(F.current=a?a.getBoundingClientRect():t??null),L(!1,!0);const R=requestAnimationFrame(()=>L(!1,!0));return()=>cancelAnimationFrame(R)},[t,a,r,h,s,B,D,m,L]),o.useEffect(()=>{if(B||D&&m||!f.current||typeof ResizeObserver>"u")return;const R=new ResizeObserver(()=>{t&&L()});return R.observe(f.current),()=>R.disconnect()},[t,h,s,B,D,m,L]),o.useEffect(()=>{if(B||D&&m)return;let R=null;const J=()=>{if(a&&(F.current=a.getBoundingClientRect()),typeof requestAnimationFrame>"u"){L(!0);return}R===null&&(R=requestAnimationFrame(()=>{R=null,L(!0)}))},ne=S=>{if(!a&&l){const $=S.target;if($&&f.current&&f.current.contains($))return;try{if($&&$.closest&&$.closest("[data-tooltip-ignore]"))return}catch{}G.current(!0);return}J()};return window.addEventListener("resize",J),document.addEventListener("scroll",ne,{passive:!0,capture:!0}),()=>{R!==null&&cancelAnimationFrame(R),window.removeEventListener("resize",J),document.removeEventListener("scroll",ne,{capture:!0})}},[t,a,l,r,h,s,B,D,m,L]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const R=window.matchMedia("(max-width: 768px)"),J=()=>A(!!R.matches);J();try{R.addEventListener?R.addEventListener("change",J):R.addListener(J)}catch{try{R.addListener(J)}catch{}}return()=>{try{R.removeEventListener?R.removeEventListener("change",J):R.removeListener(J)}catch{}}},[]);const q=o.useRef(!1),M=o.useRef(null),O=wo(),T=o.useCallback((R=!1)=>{if(l&&!(w||q.current)){if(q.current=!0,R){_(!0);try{l&&l()}catch{q.current=!1,_(!1)}return}_(!0),M.current=setTimeout(()=>{M.current=null;try{l&&l()}catch{q.current=!1,_(!1)}},O?0:200)}},[w,l,_,O]);o.useEffect(()=>()=>{M.current&&clearTimeout(M.current)},[]),o.useEffect(()=>{if(B)return;const R=S=>{const $=f.current;if(!$)return;const I=S.target;if(I&&!$.contains(I)){try{if(I.closest&&I.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},J=S=>{const $=f.current;if(!$)return;const I=S.target;if(I&&!$.contains(I)){try{if(I.closest&&I.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},ne=S=>{if(S.key==="Tab"){const $=f.current;if(!$)return;const I=$.querySelectorAll(Dn);if(!I||I.length===0)return;const P=I[0],V=I[I.length-1],ie=document.activeElement;S.shiftKey?ie===P&&(S.preventDefault(),V.focus()):ie===V&&(S.preventDefault(),P.focus())}};return document.addEventListener("pointerdown",R,!0),document.addEventListener("click",J,!0),document.addEventListener("keydown",ne),()=>{document.removeEventListener("pointerdown",R,!0),document.removeEventListener("click",J,!0),document.removeEventListener("keydown",ne)}},[l,i,T,B]);const G=o.useRef(T);o.useEffect(()=>{G.current=T});const K=!!l;o.useEffect(()=>{if(!(B||!K))return ea(()=>G.current())},[B,K]),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 ee=o.useRef(null);o.useEffect(()=>{if(B||C===!1||!N)return;const R=f.current;if(!R)return;const J=R.querySelector(Dn);if(J)return ee.current=document.activeElement,J.focus({preventScroll:!0}),()=>{const ne=ee.current;ee.current=null,ne&&document.contains(ne)&&ne.focus({preventScroll:!0})}},[B,C,N]),o.useEffect(()=>{c==="dialog"&&!p&&Dt("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,p]);const re=n.jsxs("div",{ref:f,className:ue(`tooltip__content ${B?"tooltip__content--inline":""} ${b?"tooltip__content--bordered":""} ${w?"is-closing":""} ${u} ${D&&m?"is-mobile":""}`),role:c,"aria-label":p||void 0,style:B?{}:{...x,visibility:N?"visible":"hidden"},tabIndex:-1,"data-placement":E,"data-left":B?"":x.left,"data-top":B?"":x.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:ue("tooltip__header h5"),children:y}),h]});if(B||typeof document>"u")return re;if(d||D&&m){const R=n.jsxs("div",{className:ue("tooltip__portal"),children:[n.jsx("div",{className:ue("tooltip__backdrop"),onClick:()=>{i&&T(!0)}}),re]});return hn.createPortal(R,document.body)}return hn.createPortal(re,document.body)}function Ln(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:ue(`info-tooltip ${l}`),ariaLabel:i||a,children:n.jsx("div",{className:ue("info-tooltip__content body-3"),children:a})}):null}function Un(e){const{t}=ke.useTranslation(),{anchorRect:a,title:r,items:s,activeIndex:l=-1,showIndex:i=!0,onClose:u,offset:c=12,closeOnOutsideClick:p=!0,columns:h}=e||{},d=(Array.isArray(s)?s:s?[s]:[]).map(m=>typeof m=="string"?{text:m}:m);return!d.length&&!r?null:n.jsx(Bn,{anchorRect:a,offset:c,onClose:u,closeOnOutsideClick:p,useBorder:!1,className:ue("description-tooltip"),ariaLabel:r||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:ue("description-tooltip__box"),children:[r&&n.jsx("span",{className:ue("description-tooltip__title body-2"),children:r}),n.jsx("ol",{className:ue(`description-tooltip__items${h&&h>1?" description-tooltip__items--columns":""}`),style:h&&h>1?{columnCount:h}:void 0,children:d.map((m,b)=>n.jsxs("li",{className:ue(`description-tooltip__item body-3${b===l?" description-tooltip__item--active":""}`),children:[i&&d.length>1&&n.jsxs("span",{className:ue("description-tooltip__index button-1"),children:[b+1,"."]}),m.color&&n.jsx("span",{className:ue("description-tooltip__dot"),style:{background:m.color},"aria-hidden":"true"}),n.jsx("span",{children:m.text})]},b))})]})})}function Ha(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let Bo=0,pi=!1;function hi(){pi||typeof document>"u"||(pi=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(Bo=Date.now())},!0),document.addEventListener("touchstart",()=>{Bo=Date.now()},{capture:!0,passive:!0}))}hi();function Gn(e){return!!e&&e.pointerType==="touch"}function ta(e=1e3){return hi(),Date.now()-Bo<e}function gr(e,t,a,{enabled:r=!0,fallbackOnParent:s=!1}={}){const l=Ha(e),i=Ha(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!r||typeof document>"u")return;const h=d=>{const m=d,b=d.target,y=a.current,C=!!(b&&y&&y.contains(b));if(m.pointerType!=="touch"){C&&(u.current=null);return}if(C){u.current=l.current;return}u.current=null,l.current&&!(b&&b.closest?.(".tooltip__content"))&&i.current(!1,y)};return document.addEventListener("pointerdown",h,!0),()=>document.removeEventListener("pointerdown",h,!0)},[r,a,l,i]);const p=o.useCallback(h=>{const d=u.current;return d===null?!1:(u.current=null,c.current=Date.now(),i.current(!d,h??a.current),!0)},[a,i]);return o.useEffect(()=>{if(!r||!s)return;const h=a.current,d=h?.parentElement;if(!h||!d)return;let m=null;const b=f=>{const x=f.changedTouches?.[0];if(!x)return!1;const g=h.getBoundingClientRect();return x.clientX>=g.left&&x.clientX<=g.right&&x.clientY>=g.top&&x.clientY<=g.bottom},y=f=>{m=b(f)?l.current:null},C=f=>{const x=m;m=null,!(x===null||Date.now()-c.current<700||!b(f))&&(u.current=null,c.current=Date.now(),i.current(!x,h))};return d.addEventListener("touchstart",y,{passive:!0}),d.addEventListener("touchend",C),()=>{d.removeEventListener("touchstart",y),d.removeEventListener("touchend",C)}},[r,s,a,l,i]),{touchPress:p}}function Ty(e,t){const{size:a=48,type:r,htmlType:s,href:l,target:i,rel:u,icon:c,rightIcon:p,label:h,count:d,subLabel:m,children:b,ariaLabel:y,variant:C="default",align:f="center",nowrap:x=!1,selected:g,toggleable:w=!1,ariaExpanded:_,ariaControls:E,disabled:v=!1,loading:N=!1,useLabel:k=!0,useBorder:D=!0,useBG:A=!0,useDisabledCovered:B=!1,useDisabledInvisible:F=!1,useDisabledFilled:L=!1,width:q,minWidth:M,onClick:O,onDisabledClick:T,showTooltipInfo:G=!1,tooltipInfoText:K=null,tooltipDescription:ee=null,tooltipOnly:re=!1,iconSize:R="medium",iconColor:J,shape:ne="rounded",color:S,className:$,...I}=e,P=typeof a=="string"&&isNaN(Number(a))?a.toLowerCase():String(Number(a)||48),V=P.match(/^\d+$/)?`button${P}`:`button-${P}`,ie=Number(a),U=!isNaN(ie)&&ie<40?"button-2":"button-1",ce=h??b,Z=v||!!I.disabled,H=Z?B?"disabled-covered":F?"disabled-invisibled":L?"disabled-filled":"disabled":C,te=H?`button--variant-${H}`:"",W=f?`button--align-${f}`:"",z=x?"button--nowrap":"",ae=ne?`button--shape-${ne}`:"",ve=typeof J=="string"&&J.startsWith("--")?`var(${J})`:J,me={...q?{width:typeof q=="number"?`${q}px`:q}:{},...M?{minWidth:typeof M=="number"?`${M}px`:M}:{},...D?{}:{"--button-border":Z?"0":"1px solid transparent"},...ve?{"--button-icon-color":ve}:{},...S?{"--color-main":S}:{}},le=k===!1?"":ce,Be=Array.isArray(le)?le.length>0:!!le,Pe=!!p,Fe=r??(Be||c||Pe?"bar":"dot"),Ae=`${V}--${Fe}`,se=o.useRef(null);o.useEffect(()=>{!Wn||s!==void 0||se.current?.closest("form")&&Dt(`button-in-form:${typeof ce=="string"?ce:""}`,'[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 ce=="string"&&ce?` \uB2E8\uCD94: ${ce}`:""))},[s,ce]);const ye=o.useRef(t);ye.current=t;const Ce=o.useCallback(Me=>{se.current=Me;const tt=ye.current;typeof tt=="function"?tt(Me):tt&&(tt.current=Me)},[]),xe=o.useRef(Z),[$e,nt]=o.useState(!!g),[ct,at]=o.useState(!1),[rt,Ee]=o.useState(null),Ue=o.useCallback(()=>at(!1),[]),[Ne,Ye]=o.useState(!1),et=o.useId();o.useEffect(()=>{typeof g=="boolean"&&nt(g)},[g]),o.useEffect(()=>{if(xe.current&&!Z&&se.current){const Me=se.current;let tt=!1;try{tt=Me.matches(":focus:not(:focus-visible)")}catch{tt=!1}tt&&Me.blur(),Me.style.pointerEvents="none";const Ft=requestAnimationFrame(()=>{requestAnimationFrame(()=>{se.current&&(se.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(Ft)}xe.current=Z},[Z]);const ft=typeof g=="boolean"?!!g:$e,vt=typeof _=="boolean"?void 0:w||typeof g=="boolean"?ft?"true":"false":I["aria-pressed"],dt=De("button",V,Ae,te,W,z,ae,ft?"is-selected":null,A?null:"button--no-bg",re?"button--tooltip-only":null,$),jt=`button__icon button__icon--${R}`,ot=Array.isArray(m)?m:m!==void 0?[m]:[],st=()=>{if(Array.isArray(le))return le.map((tt,Ft)=>{const _t=ot[Ft];return n.jsxs("span",{className:`button__label-text${_t!==void 0?" button__label-text--has-sub":""}`,children:[tt,_t!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:_t})]},Ft)});const Me=m!==void 0;return n.jsxs("span",{className:`button__label-text${Me?" button__label-text--has-sub":""}`,children:[le,d!=null&&n.jsx("span",{className:"button__count",children:d}),Me&&n.jsx("span",{className:"button__sub-label-text caption-1",children:m})]})},At=Me=>{typeof g!="boolean"&&!w&&nt(!1),Me.currentTarget.blur()},Nt=Me=>{Z||(typeof I.onMouseLeave=="function"&&I.onMouseLeave(Me),At(Me))},Ot=Me=>{if(re&&it&&bt.touchPress(Me.currentTarget),Z){it&&bt.touchPress(Me.currentTarget),Me.preventDefault(),T?.(Me);return}typeof g!="boolean"&&w&&nt(tt=>!tt),O?.(Me)},Wt=o.useCallback(()=>{(G||ee)&&(at(!0),Ee(se.current?.getBoundingClientRect()??null))},[G,ee]),xt=o.useCallback(()=>{(G||ee)&&(at(!1),Ee(null))},[G,ee]),it=!!(G||ee),bt=gr(ct,Me=>{Me?Wt():xt()},se,{enabled:it&&(Z||re),fallbackOnParent:it&&Z}),pt={...I};delete pt.disabled,delete pt.className,delete pt.faded,delete pt.useFaded,delete pt.loading,delete pt.onMouseLeave,delete pt.onPointerEnter,delete pt.onPointerLeave,delete pt.onPointerUp,delete pt.onFocus,delete pt.onBlur,Z&&(Object.keys(pt).forEach(Me=>{/^on[A-Z]/.test(Me)&&typeof pt[Me]=="function"&&delete pt[Me]}),pt["aria-disabled"]="true"),N&&(pt["aria-busy"]="true");const kt=(typeof G=="string"?G:null)??(typeof K=="string"?K:null)??(typeof y=="string"?y:null)??(typeof ce=="string"?ce:null)??void 0,mt=typeof y=="string"?y:typeof ce=="string"?ce:kt,wt=ee?[ee.title,...ee.items??[]].filter(Boolean).join(". "):G&&kt&&kt!==mt?kt:"",de=[typeof I["aria-describedby"]=="string"?I["aria-describedby"]:void 0,wt?et:null].filter(Boolean).join(" ")||void 0,Le=()=>n.jsx("span",{className:`${jt} button__spinner`,"aria-hidden":"true",children:n.jsx(ga,{variant:"spinner",size:"100%"})}),Se=(Me,tt)=>n.jsx(lt,{icon:Me,label:tt??mt,className:jt,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),Je=Me=>N?Le():Se(c,Me),ht=()=>Fe==="dot"?n.jsxs(n.Fragment,{children:[Je(),Be&&n.jsx("span",{className:`button__label ${U}`,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:Je()}),Be&&n.jsx("span",{className:`button__label ${U}`,children:st()})]}),Pe&&n.jsx("span",{className:"button__right",children:Se(p)})]}):n.jsxs(n.Fragment,{children:[(c||N)&&n.jsx("span",{className:"button__left",children:Je(y??ce)}),Be&&n.jsx("span",{className:`button__label ${U}`,children:st()}),Pe&&n.jsx("span",{className:"button__right",children:Se(p)})]}),Rt=!!l&&!Z;return n.jsxs(n.Fragment,{children:[n.jsxs(Rt?"a":"button",{...pt,ref:Ce,...Rt?{href:l,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:s??"button",disabled:Z&&!T&&!Ne},className:dt,"aria-pressed":vt,"aria-expanded":typeof _=="boolean"?_:I["aria-expanded"],"aria-controls":E??I["aria-controls"],"aria-label":mt,"aria-disabled":Z&&(Rt||T||Ne)?!0:void 0,"aria-describedby":de,style:me,onClick:Ot,onMouseLeave:Nt,onPointerEnter:Me=>{Gn(Me)||Wt(),!Z&&typeof I.onPointerEnter=="function"&&I.onPointerEnter(Me)},onPointerLeave:Me=>{Gn(Me)||xt(),!Z&&typeof I.onPointerLeave=="function"&&I.onPointerLeave(Me)},onPointerUp:Me=>{Z&&it&&bt.touchPress(Me.currentTarget),!Z&&typeof I.onPointerUp=="function"&&I.onPointerUp(Me)},onFocus:Me=>{Ye(!0),ta()||Wt(),!Z&&typeof I.onFocus=="function"&&I.onFocus(Me)},onBlur:Me=>{Ye(!1),Z||At(Me),xt(),!Z&&typeof I.onBlur=="function"&&I.onBlur(Me)},children:[ht(),wt?n.jsx("span",{id:et,hidden:!0,"aria-label":wt}):null]}),ct&&ee?n.jsx(Un,{anchorRect:rt,title:ee.title,items:ee.items,onClose:Ue}):ct&&kt?n.jsx(Ln,{anchorRect:rt,text:kt,onClose:Ue}):null]})}const be=o.forwardRef(Ty);be.displayName="Button";function It(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 Va={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},ko=new WeakMap;function Ao(e){if(e)return ko.get(e)}function nn(e,t){e&&(e.style.setProperty(Va.title,t.title),e.style.setProperty(Va.description,t.description),ko.set(e,t))}function an(e){e&&(e.style.removeProperty(Va.title),e.style.removeProperty(Va.description),ko.delete(e))}const mi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function Ci(){const e=It(mi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const fi={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function bi(){const e=It(fi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const gi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function yi(){const e=It(gi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const vi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function _i(){const e=It(vi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const xi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function wi(){const e=It(xi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const Bi={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function ki(){const e=It(Bi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const Ai={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function Ni(){const e=It(Ai,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const Ei={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Di(){const e=It(Ei,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const Si={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function ji(){const e=It(Si,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const Ti={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function Mi(){const e=It(Ti,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const Li={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function $i(){const e=It(Li,nn,an);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 Ri={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Pi(){const e=It(Ri,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const Fi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function Ii(){const e=It(Fi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Oi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function zi(){const e=It(Oi,nn,an);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 Zt.t(`promoBannerBg.${e}`,t)},textTone:a}),My=[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")],Wi={main:Ci,soft:bi,sub:yi,deep:_i,softSub:wi,warm:ki,dark:Ni,radial:Di,diagonal:ji,dots:Mi,outline:$i,success:Pi,naver:Ii,instagram:zi};function Hi({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 _=localStorage.getItem(w),E=_?Number(_):1;return Number.isFinite(E)?i(E):i(1)}catch{return i(1)}},[c,p]=o.useState(()=>u(e)),[h,d]=o.useState(e);h!==e&&(d(e),p(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const m=w=>{p(typeof w=="function"?_=>i(w(_)):i(w))},b=()=>m(w=>+(w+s).toFixed(6)),y=()=>m(w=>+(w-s).toFixed(6)),C=c<r-Number.EPSILON,f=c>a+Number.EPSILON,x=Math.round(t*c),g=Math.round(x*l);return{scale:c,setScale:m,increase:b,decrease:y,canIncrease:C,canDecrease:f,fontSize:x,lineHeight:g}}function Vi(e,t){const a=Ha(t);o.useEffect(()=>{const r=()=>a.current();try{window.addEventListener(e,r)}catch{}return()=>{try{window.removeEventListener(e,r)}catch{}}},[e,a])}const No=" \xB7 ",qi=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(No)?e.split(No).pop()??e:e})(),Ly=o.createContext(!1),na=[];let Ui=null;function $y(e){const t=o.useContext(Ly);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;na.length===0&&(Ui=document.title);const a={text:qi?`${e}${No}${qi}`:e};return na.push(a),document.title=a.text,()=>{const r=na.lastIndexOf(a);r>=0&&na.splice(r,1),document.title=na.length?na[na.length-1].text:Ui??document.title}},[e,t])}const Eo=[{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"}],Ry=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function fn(e,t){return Ry().compare(e,t)}const yr=new Map;function Py(e){const t=yr.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)),yr.size>5e3&&yr.clear(),yr.set(e,a),a}function Fy(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 Iy(e,t){const a=p=>p==null||typeof p=="number"&&Number.isNaN(p)?"":String(p).trim(),r=a(e),s=a(t);if(r===s)return 0;const l=(p,h)=>{if(typeof p=="number"&&!Number.isNaN(p))return[p];const d=Fy(h);return d!==null?[d]:Py(h)},i=l(e,r),u=l(t,s),c=Math.min(i.length,u.length);for(let p=0;p<c;p++){const h=i[p],d=u[p];if(typeof h=="number"&&typeof d=="number"){if(h!==d)return h-d;continue}if(typeof h=="number")return-1;if(typeof d=="number")return 1;const m=fn(h,d);if(m!==0)return m}return i.length!==u.length?i.length-u.length:fn(r,s)}const Gi=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function vr(e,t,a){const r=Gi(e),s=Gi(t);if(r||s)return r===s?0:r?1:-1;const l=Iy(e,t);return a?l:-l}function Oy(e,t,a){const{t:r}=ke.useTranslation(),[s,l]=o.useState(()=>{const y=a?.initialPageSize;return y&&Eo.some(C=>C.value===y)?y:"25"}),[i,u]=o.useState(1),[c,p]=o.useState(t);Object.is(c,t)||(p(t),i!==1&&u(1));const h=o.useMemo(()=>Eo.map(y=>({...y,label:r("visits.showN",{n:y.value})})),[r]),d=o.useCallback(y=>{Eo.some(C=>C.value===y)&&(l(y),u(1))},[]),m=Math.max(1,Math.ceil(e.length/Number(s))),b=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),m);return i!==b&&u(b),{pageRows:o.useMemo(()=>e.slice((b-1)*Number(s),b*Number(s)),[e,b,s]),pageSizeProps:{options:h,value:s,onChange:d},paginationProps:{page:b,total:m,onChange:u},setPage:u}}function zy(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 p=r.current,h=p?.key===c?{key:c,asc:!p.asc}:{key:c,asc:!0};r.current=h,a(h),s.current?.(h)},[]),i=o.useCallback((c,p)=>({label:c,sortDir:t?.key===p?t.asc?"asc":"desc":null,onClick:()=>l(p)}),[t,l]),u=o.useCallback((c,p)=>{if(!t)return c;const{key:h,asc:d}=t;return[...c].sort((m,b)=>vr(p(m,h),p(b,h),d))},[t]);return{sort:t,field:i,sortRows:u}}const kn="\uC804\uCCB4";Object.fromEntries(Object.entries(bf).map(([e,{nucleus:t}])=>[e,t]));const Wy={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"})},Hy={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"})},Vy={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 qy(e,t){if("place"in t)return Wy[t.place](e);const a=Hy[t.vowel](e);return t.glide?`${a} \xB7 ${Vy[t.glide](e)}`:a}const Uy=(e,{defaultValue:t})=>t,Ki=(e,t)=>({jamos:e,phonetic:t,tooltip:qy(Uy,t)}),$n=(e,t)=>t.map(a=>Ki([a],{place:e})),Xt=(e,t,a)=>Ki([...e],a?{vowel:t,glide:a}:{vowel:t}),Do={cho:[$n("labial",["\u3142","\u3143","\u314D","\u3141"]),$n("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),$n("alveolar",["\u3145","\u3146"]),$n("palatal",["\u3148","\u3149","\u314A"]),$n("velar",["\u3131","\u3132","\u314B"]),$n("glottal",["\u314E"])],jung:[[Xt("\u3163","frontHigh"),Xt("\u315F","frontHigh","w"),Xt("\u3162","frontHigh","velar")],[Xt("\u3161","backHighUnrounded")],[Xt("\u315C","backHighRounded"),Xt("\u3160","backHighRounded","j")],[Xt("\u3154\u3150","frontMid"),Xt("\u3156\u3152","frontMid","j"),Xt("\u3159\u315A\u315E","frontMid","w")],[Xt("\u3153","backMidUnrounded"),Xt("\u3155","backMidUnrounded","j"),Xt("\u315D","backMidUnrounded","w")],[Xt("\u3157","backMidRounded"),Xt("\u315B","backMidRounded","j")],[Xt("\u314F","low"),Xt("\u3151","low","j"),Xt("\u3158","low","w")]],jong:[$n("labial",["\u3142","\u3141"]),$n("alveolar",["\u3137","\u3134","\u3139"]),$n("velar",["\u3131","\u3147"])]},Gy=e=>e===Ky?[]:Array.from(e),Ky="__NO_CODA__",So=e=>e.map(t=>t.map(({jamos:a,phonetic:r,tooltip:s})=>({v:a.join(""),phonetic:r,tooltip:s}))),Yi={cho:So(Do.cho),jung:So(Do.jung),jong:So(Do.jong)};Yi.jung.flat().forEach(({v:e})=>{for(const t of Gy(e));}),new Set(Yi.cho.flat().map(e=>e.v));function Yy(e,t=!0){const a=Ha(e);o.useEffect(()=>{if(t)return ea(()=>{a.current?.()})},[t,a])}function _r(){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 Zy(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,p)=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{a(c),s(p)},e)},[e]),u=o.useCallback(()=>{l.current&&clearTimeout(l.current),a(null),s(null)},[]);return{payload:t,anchorRect:r,openAfterDelay:i,close:u}}function Zi(e="warning"){const[t,a]=o.useState(""),[r,s]=o.useState(e),[l,i]=o.useState(0),u=o.useCallback((d,m)=>{s(m),a(d),i(b=>b+1)},[]),c=o.useCallback(d=>u(d,"warning"),[u]),p=o.useCallback(d=>u(d,"normal"),[u]),h=o.useCallback(()=>a(""),[]);return{toastMessage:t,toastType:r,toastKey:l,showToast:u,showWarning:c,showNormal:p,clearToast:h}}function qa(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 Ua({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),p=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 b=p.current?.offsetHeight??0;b>0&&h();let y=0,C=null;typeof ResizeObserver<"u"&&p.current&&(C=new ResizeObserver(()=>{const N=p.current?.offsetHeight??0;if(N!==b){if(b=N,++y>4){C?.disconnect(),C=null;return}h()}}),C.observe(p.current));const f=N=>{const k=N.target;r&&k.closest?.(r)||c.current?.contains(k)||p.current?.contains(k)||l(!1)};document.addEventListener("mousedown",f),document.addEventListener("pointerdown",f);let x=null;const g=()=>{if(typeof requestAnimationFrame>"u"){h();return}x===null&&(x=requestAnimationFrame(()=>{x=null,h()}))},w=N=>{p.current?.contains(N.target)||(t==="reposition"?g():t==="close"&&l(!1))};t!=="ignore"&&window.addEventListener("scroll",w,!0);const _=()=>{a==="reposition"?g():a==="close"&&l(!1)};let E=null;const v=()=>{_(),E&&clearTimeout(E),E=setTimeout(()=>{E=null,a==="reposition"&&h()},250)};return a!=="ignore"&&(window.addEventListener("resize",_),window.addEventListener("orientationchange",v)),()=>{x!==null&&cancelAnimationFrame(x),C?.disconnect(),document.removeEventListener("mousedown",f),document.removeEventListener("pointerdown",f),t!=="ignore"&&window.removeEventListener("scroll",w,!0),a!=="ignore"&&(window.removeEventListener("resize",_),window.removeEventListener("orientationchange",v)),E&&clearTimeout(E)}},[s,h,t,a,r]),o.useEffect(()=>{if(s)return ea(()=>l(!1))},[s]);const d=o.useCallback(()=>l(b=>!b),[]),m=o.useCallback(()=>l(!1),[]);return{open:s,setOpen:l,toggle:d,close:m,style:i,triggerRef:c,menuRef:p}}function Xy(e,{mode:t="playback",autoStart:a=!1,onPlaySpeaker:r,onComplete:s,playMs:l=1100,feedbackMs:i=1500}={}){const[u,c]=o.useState([]),[p,h]=o.useState(0),[d,m]=o.useState("idle"),[b,y]=o.useState(null),[C,f]=o.useState([]),[x,g]=o.useState(null),[w,_]=o.useState(0),E=o.useRef(0),v=o.useCallback(R=>{E.current=typeof R=="function"?R(E.current):R,_(E.current)},[]),N=o.useRef(r),k=o.useRef(s);o.useEffect(()=>{N.current=r,k.current=s},[r,s]);const D=o.useRef([]),A=()=>{D.current.forEach(clearTimeout),D.current=[]},B=(R,J)=>{D.current.push(setTimeout(J,R))};o.useEffect(()=>()=>A(),[]);const F=u[p]?.id??null,L=o.useRef(null),q=o.useCallback(()=>{A(),m("playing"),f([]),g(null),v(0);let R=0;e.forEach((J,ne)=>{B(R,()=>{h(ne),y(J.id),N.current?.(J)}),B(R+1e3,()=>{y(null),f(S=>[...S,J.id])}),R+=1300}),B(R,()=>{m("done"),k.current?.({score:0,total:e.length})})},[e,v]),M=o.useCallback((R,J)=>{if(J>=R.length){m("done"),k.current?.({score:E.current,total:R.length});return}L.current=null,h(J),g(null),m("playing"),y(R[J].id),N.current?.(R[J]),B(l,()=>{y(null),m("waiting")})},[l]),O=o.useCallback(()=>{A();const R=Oa(e);c(R),v(0),f([]),M(R,0)},[e,M,v]),T=o.useCallback(()=>{t==="playback"?(c(e),q()):O()},[t,e,q,O]),G=o.useCallback(()=>{A(),m("idle"),y(null),f([]),g(null),h(0),v(0),c([])},[v]),K=JSON.stringify(e.map(R=>[R.id,R.label,R.angleDeg,R.deg,R.row,R.shortcut]));o.useEffect(()=>(a?T():G(),()=>A()),[t,K,a]);const ee=o.useCallback(R=>{d!=="waiting"||t==="playback"||L.current===p||(L.current=p,g(R),R===u[p]?.id&&v(J=>J+1),t==="exam"?(m("playing"),B(400,()=>M(u,p+1))):(m("feedback"),B(i,()=>M(u,p+1))))},[d,t,u,p,M,i,v]),re=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:b,playedIds:C,selectedId:x,answerId:F,showFeedback:d==="feedback",clickable:d==="waiting",onSelectSpeaker:ee},index:p,total:re,score:w,phase:d,done:d==="done",start:T,reset:G}}const jo=new Map,To=new Map,Jy=()=>()=>{},Qy=()=>!0,e2=()=>!1;function Xi(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 t2(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)};ma.addHook("uponSanitizeAttribute",t);try{return ma.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{ma.removeHook("uponSanitizeAttribute",t)}}function n2(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"),(p,h)=>`url(${h}#${c}${h})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return l}function a2(e){const t=To.get(e);if(t)return t;const a=fetch(e).then(r=>r.ok?r.text():null).then(r=>(r!=null&&jo.set(e,r),r)).catch(()=>null).finally(()=>{To.delete(e)});return To.set(e,a),a}function r2(e,t=!0){const a=o.useSyncExternalStore(Jy,Qy,e2)&&t&&e?Xi(e)??jo.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=Xi(e)??jo.get(e)??null;if(l!==null){s({src:e,enabled:t,svg:l});return}let i=!0;return a2(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 o2({title:e,description:t,actionLabel:a,onAction:r,bg:s,color:l,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:p,className:h=""}){const d=s??l??"main",m=o.useRef(null),[b,y]=o.useState("main"),C=vn("(max-width: 767px)"),f=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const w=m.current;if(!w)return;const _=Ao(w),E=(v,N,k)=>{if(k!==void 0)w.style.setProperty(N,k),f.current[v]=!0;else if(f.current[v]){const D=_?.[v];D?w.style.setProperty(N,D):w.style.removeProperty(N),f.current[v]=!1}};E("title","--promo-banner-bg-title",c),E("description","--promo-banner-bg-description",p)},[c,p,d]),o.useLayoutEffect(()=>{const w=m.current;if(!w)return;const _=Ao(w);y(_?.actionVariant??"main")},[d]);const x=De("promo-banner",`promo-banner--${i}`,h),g=Wi[d];return n.jsxs("div",{ref:m,className:x,role:"note",children:[n.jsx(g,{}),n.jsxs("div",{className:"promo-banner__text",children:[n.jsx("span",{className:`promo-banner__title ${i==="small"?"body-2":"h2"}`,children:e}),t&&n.jsx("span",{className:"promo-banner__description body-3",children:t})]}),a&&r&&n.jsx(be,{htmlType:"button",size:40,variant:u??b,shape:"pill",useBorder:!0,onClick:r,ariaLabel:a,...C?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:a,minWidth:140}})]})}function s2({children:e,interval:t=5e3,dotTone:a,className:r="","aria-label":s}){const{t:l}=ke.useTranslation(),i=s??l("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[p,h]=o.useState(0),[d,m]=o.useState(!1),[b,y]=o.useState(!1),[C,f]=o.useState(!1),x=o.useRef(null),g=o.useRef(null),w=o.useRef(null),_=wo(),E=d||b||C,v=c>0?Math.min(p,c-1):0;o.useEffect(()=>{if(c<2||t<=0||E||_)return;const k=window.setInterval(()=>h(D=>(Math.min(D,c-1)+1)%c),t);return()=>window.clearInterval(k)},[c,t,E,_]);const N=k=>{g.current!=null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null,f(!1)},k)};return o.useEffect(()=>()=>{g.current!=null&&window.clearTimeout(g.current)},[]),o.useEffect(()=>{if(!C)return;const k=D=>{D.pointerType==="touch"&&(w.current&&w.current.contains(D.target)||(g.current!=null&&(window.clearTimeout(g.current),g.current=null),f(!1)))};return document.addEventListener("pointerdown",k,!0),()=>document.removeEventListener("pointerdown",k,!0)},[C]),c===0?null:n.jsxs("section",{ref:w,className:De("top-banner",r),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:k=>{x.current=k.pointerType},onPointerDown:k=>{x.current=k.pointerType,k.pointerType==="touch"&&(g.current!=null&&(window.clearTimeout(g.current),g.current=null),f(!0))},onPointerUp:k=>{k.pointerType==="touch"&&N(5e3)},onPointerCancel:k=>{k.pointerType==="touch"&&N(5e3)},onMouseEnter:()=>{x.current!=="touch"&&m(!0)},onMouseLeave:()=>m(!1),onFocus:k=>{let D=!0;try{D=k.target.matches(":focus-visible")}catch{D=!0}y(D)},onBlur:k=>{k.currentTarget.contains(k.relatedTarget)||y(!1)},children:[n.jsx("div",{className:"top-banner__viewport",children:n.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${v*100}%)`},children:u.map((k,D)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":D!==v,...D!==v?{inert:!0}:{},children:k},D))})}),c>1&&n.jsx("div",{className:`top-banner__dots${(a?.[v]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((k,D)=>n.jsx("button",{type:"button",className:`top-banner__dot${D===v?" 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===v,onClick:()=>h(D)},D))})]})}function l2({title:e,body:t,open:a=!1,onToggle:r,avatar:s,titleClassName:l="body-2",bodyClassName:i="body-2",className:u=""}){const{t:c}=ke.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:p=>{if(p.key==="Enter"||p.key===" ")p.preventDefault(),r?.();else if(p.key==="ArrowDown"||p.key==="ArrowUp"){p.preventDefault();const h=p.currentTarget.closest('[role="list"]');if(!h)return;const d=Array.from(h.querySelectorAll("[data-accordion-header]")),m=d.indexOf(p.currentTarget);(p.key==="ArrowDown"?d[m+1]:d[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(lt,{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 i2({items:e=[],defaultOpenIndex:t=0,size:a=72,className:r="",bodyClassName:s}){const[l,i]=o.useState({index:t}),u=(c,p)=>l.id!=null&&c.id!=null?c.id===l.id:l.id==null&&p===l.index;return n.jsx("div",{className:`accordion-group accordion-group--s${a} ${r}`.trim(),role:"list",children:e.map((c,p)=>n.jsx(l2,{title:c.title,body:c.body,avatar:c.avatar,open:u(c,p),onToggle:()=>i(u(c,p)?{index:-1}:{index:p,id:c.id}),bodyClassName:s},c.id??p))})}function u2(){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 c2(){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 d2(){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 Sn({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:p=""}){const{t:h}=ke.useTranslation(),d=t??"check",m=a!==void 0,b=e!==void 0||m?"number":d,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")}[d],C=c?void 0:u??y;return n.jsxs("span",{className:De("circle-badge",`circle-badge--${b}`,`circle-badge--${s}`,`circle-badge--${r}`,l?"circle-badge--animate":"",i?"circle-badge--clickable":"",p),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&&d==="check"&&n.jsx(u2,{}),e===void 0&&!m&&d==="remove"&&n.jsx(c2,{}),e===void 0&&!m&&d==="minus"&&n.jsx(d2,{})]})}function Ga({columns:e=[],onClose:t,className:a="",size:r="medium"}){const{t:s}=ke.useTranslation(),l=r==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const f=[{title:null,columns:e}];let x=e;for(const g of i){const w=x?.[g.ci]?.items?.[g.ii];if(!w||!Array.isArray(w.children)||!w.children.length)break;x=[{title:null,items:w.children}],f.push({title:w.label||null,columns:x})}return f},[e,i]),p=c[c.length-1],h=c.length-1,d=o.useCallback(()=>u(f=>f.slice(0,Math.max(0,Math.min(f.length,h)-1))),[h]),m=o.useRef(null),b=o.useRef(null),y=c.length;o.useEffect(()=>{b.current||(b.current=document.activeElement);let f=0,x=0;const g=()=>{const w=m.current?.querySelector("button:not([disabled])");if(w&&w.offsetParent){w.focus({preventScroll:!0});return}x++<20&&(f=requestAnimationFrame(g))};return f=requestAnimationFrame(g),()=>cancelAnimationFrame(f)},[y]),o.useEffect(()=>()=>{b.current?.focus?.({preventScroll:!0})},[]);const C=o.useCallback((f,x,g)=>{if(f){if(Array.isArray(f.children)&&f.children.length){u(w=>[...w.slice(0,h),{ci:x,ii:g}]);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:ue(`menu-tooltip menu-tooltip--${r} ${a}`),children:[(c.length>1||p.title)&&n.jsxs("div",{className:ue("menu-tooltip__header"),children:[c.length>1?n.jsx(be,{htmlType:"button",size:l,type:"dot",icon:"chevron-left",ariaLabel:s("common.back","\uB4A4\uB85C"),onClick:d,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:ue("menu-tooltip__title button-1"),children:p.title})]}),n.jsx("div",{className:ue("menu-tooltip__columns"),ref:m,children:p.columns&&p.columns.map((f,x)=>{const g=(f.items||[]).some(w=>!!w.icon||w.selected!==void 0);return n.jsxs("div",{className:ue("menu-tooltip__column"),children:[f.title?n.jsx("div",{className:ue("menu-tooltip__column-title body-3"),children:f.title}):null,n.jsx("div",{className:ue("menu-tooltip__items"),children:(f.items||[]).map((w,_)=>n.jsxs(o.Fragment,{children:[w.separatorBefore&&_>0&&n.jsx("div",{className:ue("menu-tooltip__separator"),role:"separator"}),n.jsx(be,{htmlType:"button",className:ue("menu-tooltip__item"),size:l,type:w.label?"bar":"dot",icon:w.selected?"check":w.icon||(g||!w.label?"none":void 0),rightIcon:Array.isArray(w.children)&&w.children.length?"chevron-right":w.badgeCount?n.jsx(Sn,{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,x,_),selected:w.selected,disabled:w.disabled,showTooltipInfo:w.tooltip||!1,useBorder:!1,align:"left"})]},_))})]},x)})})]})}const Ji=".content-area";function Mo(e,t="Nav"){try{const a=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Ji);if(a){a.scrollTop=0;return}const r=document.scrollingElement??document.documentElement;r&&r.scrollHeight<=r.clientHeight&&Dt("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Ji}) \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 Lo=52,xr=10,Qi=e=>e&&e>0?e:0;function eu({items:e=[],activeKey:t,onChange:a,appMode:r,onAppModeChange:s,moreItems:l=[],scrollContainer:i}){const{t:u}=ke.useTranslation(),c=r==="manager"?"malgwi":"manager",p=r==="manager"?"arrow-left":"arrow-right",h=r==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),d=o.useRef(null),[m,b]=o.useState(0),y=e.length;o.useEffect(()=>{const R=d.current;if(!R)return;const J=()=>{const $=typeof getComputedStyle=="function"?getComputedStyle(R):null,I=R.clientWidth-(parseFloat($?.paddingLeft??"")||0)-(parseFloat($?.paddingRight??"")||0),P=R.querySelector(".bottom-nav__left"),V=P?.nextElementSibling,ie=(P?.offsetWidth??0)+(P&&V?.classList.contains("bottom-nav__divider")?V.offsetWidth:0);b(Math.max(0,I-ie))};if(J(),typeof ResizeObserver>"u")return;const ne=new ResizeObserver(J);ne.observe(R);const S=R.querySelector(".bottom-nav__left");return S&&ne.observe(S),()=>ne.disconnect()},[s]);const C=Lo+1,f=R=>Math.max(0,Math.floor((R+xr)/(Lo+xr))),x=y*(Lo+xr)-xr<=m,g=m<=0||l.length===0&&x?y:Math.min(y,f(m-C)),w=m>0&&g<y,_=w?g:y,E=e.slice(0,_),v=e.slice(_),N=w||l.length>0,k=o.useCallback((R,J)=>({position:"fixed",bottom:window.innerHeight-R.top+8,right:window.innerWidth-R.right,zIndex:qa(J)}),[]),D=o.useId(),{open:A,toggle:B,close:F,style:L,triggerRef:q,menuRef:M}=Ua({computeStyle:k,onScroll:"ignore",onResize:"reposition"}),O=o.useCallback((R,J)=>J>0?u("nav.badgeLabel",{label:R,count:J,defaultValue:"{{label}}, {{count}}\uAC1C"}):R,[u]),T=o.useCallback((R,J)=>J>0?u("nav.badgeInsideLabel",{label:R,count:J,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):R,[u]),G=o.useCallback(()=>s?.(c),[s,c]),K=o.useMemo(()=>v.find(R=>!!R.key&&R.key===t)??l.find(R=>R.selected||R.key&&R.key===t),[v,t,l]),ee=o.useMemo(()=>[{items:[...v.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),Mo(i,"BottomNav")),F())}})),...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?.(),F()}}))]}],[v,l,t,a,F]),re=[...v,...l].reduce((R,J)=>R+Qi(J.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:d,"aria-label":u("nav.bottomNav","\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158"),children:[s&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__left",children:n.jsx(be,{htmlType:"button",size:52,type:"dot",icon:p,ariaLabel:h,className:"bottom-nav-item",onClick:G})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:E.map((R,J)=>{const ne=Qi(R.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(be,{htmlType:"button",size:52,type:"dot",icon:R.icon,ariaLabel:O(R.label,ne),selected:!!R.key&&R.key===t,disabled:R.state==="disabled",className:"bottom-nav-item",onClick:()=>{R.key&&(a?.(R.key),Mo(i,"BottomNav"))}}),ne>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Sn,{position:"top-right",number:Math.min(ne,99),size:24})})]},R.key??`__slot-${J}`)})}),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:q,className:"bottom-nav__slot",children:[n.jsx(be,{htmlType:"button",size:52,type:"dot",icon:K?.icon??"ellipsis",ariaLabel:T(K?.label??u("nav.more","\uB354\uBCF4\uAE30"),re),selected:!!K,className:"bottom-nav-item",onClick:B,"aria-expanded":A,"aria-controls":A?D:void 0}),re>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Sn,{position:"top-right",number:Math.min(re,99),size:24})}),A&&hn.createPortal(n.jsx("div",{id:D,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:ue("tooltip__content"),style:L,ref:M,children:n.jsx(Ga,{columns:ee,onClose:F})}),document.body)]})})]})]})}function tu(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 nu(e,t,a){return a&&a>0?e("nav.badgeLabel",{label:t,count:a,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function p2(e){const{t}=ke.useTranslation(),{activeKey:a,unreadCount:r,onDebug:s,onNotification:l,onSetting:i,onHelp:u,onFeedback:c,onAccount:p}=e||{},h="default";return s||l||i||u||c||p?n.jsxs("div",{className:"side-nav__footer",children:[s&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:s,selected:a==="debug"}),u&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"message-circle-question-mark",ariaLabel:t("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:u,selected:a==="help"}),l&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bell",ariaLabel:nu(t,t("nav.notifications","\uC54C\uB9BC"),r),onClick:l,selected:a==="notifications"}),!!r&&r>0&&n.jsx(Sn,{number:Math.min(r,99),size:24,"aria-hidden":!0})]}),i&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"settings",ariaLabel:t("nav.settings","\uC124\uC815"),onClick:i,selected:a==="settings"}),c&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bug",ariaLabel:t("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:c,selected:a==="feedback"}),p&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:p,selected:a==="account"})]}):null}function au(e){const{t}=ke.useTranslation(),{item:a,itemKey:r,label:s,icon:l,active:i,onClick:u,style:c,state:p,labelStyle:h}=e||{},d=a?.key??r??"",m=a?.label??s??"",b=a?.icon??l??"",y=a?.badge??0,C=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(lt,{icon:b,label:typeof m=="string"?m:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),f=p==="disabled",x=`side-nav__item ${i?"active":""} ${p||""} ${f?"disabled":""} ${a?.child?"side-nav__item--child":""}`,g=o.useCallback(w=>{if(f)return;const _=w.detail>0;if(_)try{w.currentTarget.blur()}catch{}u?.(d,w.currentTarget,_)},[f,d,u]);return n.jsxs("button",{type:"button",className:x,onClick:g,"aria-label":typeof m=="string"?nu(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(Sn,{position:"inline",number:Math.min(y,99),size:24,"aria-hidden":!0}),p==="loading"&&n.jsx("span",{className:"side-nav__spinner",role:"img","aria-label":t("loader.loading","\uBD88\uB7EC\uC624\uB294 \uC911\u2026")})]})}function ru(e){const{t}=ke.useTranslation(),{items:a=[],activeKey:r,onChange:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:b,scrollContainer:y}=e||{},C=m==="manager",f=o.useCallback(()=>b?.(C?"malgwi":"manager"),[b,C]),x=o.useRef(null),[g,w]=o.useState(null);o.useEffect(()=>{const k=x.current;if(!k)return;let D=null;const A=()=>{const{scrollHeight:L,clientHeight:q,scrollTop:M}=k;if(L<=q+1){w(ee=>ee===null?ee:null);return}const O=Math.max(24,q/L*q),T=q-O,G=L-q,K={top:Math.round(M/G*T),height:Math.round(O)};w(ee=>ee&&ee.top===K.top&&ee.height===K.height?ee:K)},B=()=>{if(typeof requestAnimationFrame>"u"){A();return}D===null&&(D=requestAnimationFrame(()=>{D=null,A()}))};A(),k.addEventListener("scroll",B,{passive:!0});const F=typeof ResizeObserver<"u"?new ResizeObserver(B):null;F?.observe(k);for(const L of Array.from(k.children))F?.observe(L);return()=>{D!==null&&cancelAnimationFrame(D),k.removeEventListener("scroll",B),F?.disconnect()}},[a]);const _=o.useRef(null),E=o.useCallback(k=>{const D=x.current;D&&(k.preventDefault(),_.current={y:k.clientY,top:D.scrollTop},k.currentTarget.setPointerCapture(k.pointerId))},[]),v=o.useCallback(k=>{const D=x.current,A=_.current;!D||!A||(D.scrollTop=A.top+(k.clientY-A.y)*(D.scrollHeight/D.clientHeight))},[]),N=o.useCallback(k=>{_.current=null,k.currentTarget.hasPointerCapture(k.pointerId)&&k.currentTarget.releasePointerCapture(k.pointerId)},[]);return n.jsxs("nav",{ref:x,"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[g&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:g.top,height:g.height},onPointerDown:E,onPointerMove:v,onPointerUp:N,onPointerCancel:N})}),n.jsxs("div",{className:"side-nav__menu-list",children:[(a||[]).filter(k=>!k.section&&(k.key||k.label)).map((k,D)=>n.jsxs(o.Fragment,{children:[k.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(au,{item:k,active:!!k.key&&k.key===r,state:k.disabled?"disabled":void 0,onClick:(A,B,F)=>{if(k.disabled)return;if(k.href){if(tu(k.href)&&window.open(k.href,"_blank","noopener,noreferrer"),F)try{B?.blur()}catch{}return}if(s?.(k.key),Mo(y,"SideNav"),!F)return;try{B?.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 q=typeof L.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&q&&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)}}}})]},k.key??`side-nav__item-${D}`)),b&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),b&&n.jsx(au,{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(p2,{activeKey:r,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d})]})}var wr='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>',$o='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>',h2='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 ou({appMode:e}){const{t}=ke.useTranslation(),a=e==="manager",r=a?$o:wr,s=h2;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 su({activeKey:e,onChange:t,items:a,malgwiItems:r,managerItems:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:b,scrollContainer:y}){const{t:C}=ke.useTranslation(),f=vn("(max-width: 767px)"),x=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]),g=o.useCallback(L=>{const q=a?.find(M=>M.key===L);if(!q?.disabled){if(q?.href){tu(q.href)&&window.open(q.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}),h&&L.push({key:"help",icon:"message-circle-question-mark",label:C("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:h}),u&&L.push({key:"notifications",icon:"bell",label:C("nav.notifications","\uC54C\uB9BC"),badgeCount:l,onClick:u}),p&&L.push({key:"settings",icon:"settings",label:C("nav.settings","\uC124\uC815"),onClick:p}),d&&L.push({key:"feedback",icon:"bug",label:C("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:d}),c&&L.push({key:"account",icon:"user-round",label:C("nav.account","\uACC4\uC815"),onClick:c}),L},[C,i,u,p,h,d,c,l]),_=o.useCallback((L,q)=>({position:"fixed",top:L.bottom+8,right:Math.max(8,window.innerWidth-L.right),zIndex:qa(q)}),[]),E=o.useId(),{open:v,toggle:N,close:k,style:D,triggerRef:A,menuRef:B}=Ua({computeStyle:_,onScroll:"ignore",onResize:"reposition"}),F=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?.(),k()}}))}],[w,e,k]);return n.jsxs("aside",{className:`header${m==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(ou,{appMode:m}),n.jsxs("div",{className:"header__menu-button",ref:A,children:[n.jsx(be,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:u&&l&&l>0?C("nav.badgeInsideLabel",{label:C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:l,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:N,"aria-expanded":v,"aria-controls":v?E:void 0}),!!u&&!!l&&l>0&&n.jsx(Sn,{number:Math.min(l,99),size:24,"aria-hidden":!0}),v&&hn.createPortal(n.jsx("div",{id:E,role:"group","aria-label":C("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:ue("tooltip__content"),style:D,ref:B,children:n.jsx(Ga,{columns:F,onClose:k})}),document.body)]})]}),n.jsx(ru,{scrollContainer:y,items:a,activeKey:e??void 0,onChange:t,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:b}),f&&n.jsx(eu,{items:x,activeKey:e??void 0,onChange:g,scrollContainer:y,appMode:m,onAppModeChange:b})]})}const m2=su;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)&&Dt("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&&Dt("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:p="default",fill:h="filled",minWidth:d,iconLeft:m,iconRight:b,color:y}=e,C=t==="bar",f=typeof a=="number"?"medium":a??"medium",x=(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"),g={small:12,medium:14,large:16}[f]??14,w=De("badge",C?"badge--bar":"",`badge--${p}`,`badge--${f}`,h!=="filled"?`badge--${h}`:"",x,r),_=y?.startsWith("--")?`var(${y})`:y,E=d!==void 0||_?{...d!==void 0?{minWidth:typeof d=="number"?`${d}px`:d}:{},..._?{"--badge-color":_}:{}}:void 0;return n.jsxs("span",{className:w,style:E,"aria-label":l?void 0:s,role:i??(s&&!l?"img":void 0),"aria-hidden":l||void 0,children:[m&&n.jsx(lt,{icon:m,size:g,className:"badge__icon"}),u??c,b&&n.jsx(lt,{icon:b,size:g,className:"badge__icon"})]})}const C2=()=>Zt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function lu(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 ba(`${t.toLocaleString("ko-KR")}\uC6D0`)}return ba(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function f2(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function b2(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||C2()}function g2(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 iu(e){return{type:e.type??f2(e),plan:b2(e),label:e.label,price:lu(e.price),originalPrice:lu(e.originalPrice),discountLabel:e.discountLabel}}var y2='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>',v2='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>',uu='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 aa={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},Ro=new WeakMap;function _2(e){if(e)return Ro.get(e)}function Rn(e,t){e&&(e.style.setProperty(aa.text,t.text),e.style.setProperty(aa.sub,t.sub),t.copyrightColor&&e.style.setProperty(aa.copyright,t.copyrightColor),Ro.set(e,t))}function Pn(e){e&&(e.style.removeProperty(aa.text),e.style.removeProperty(aa.sub),e.style.removeProperty(aa.copyright),Ro.delete(e))}const cu={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function du(e={}){const t=It(cu,Rn,Pn);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("${uu}")`}})]})}const pu="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",va=240;var Ka='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 x2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},w2=100,B2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function hu(e={}){const t=It(x2,Rn,Pn),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:B2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*w2/va}) translate(${-va/2} ${-va/2})`,opacity:i,children:n.jsx("path",{d:pu,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("${Ka}")`}})]})}const k2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},A2=100,N2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function E2(e={}){const t=It(k2,Rn,Pn),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:N2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*A2/va}) translate(${-va/2} ${-va/2})`,opacity:i,children:n.jsx("path",{d:pu,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("${uu}")`}})]})}const D2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function S2(e={}){const t=It(D2,Rn,Pn);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("${Ka}")`}})]})}const j2={Logo_SpeechEar_ko:{"":wr,_mono:y2},Logo_SpeechEarManager_ko:{"":$o,_mono:v2}};function T2(e,t){if(e)return j2[e]?.[t??""]??void 0}const M2={speechear:wr,manager:$o},L2={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},mu=10;function $2(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 Cu(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 R2(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===Zt.t("passCard.specialLabel");return r?n.jsx(S2,{}):s?n.jsx(E2,{}):n.jsx(hu,{})}return n.jsx(du,{})}function fu({ariaLabel:e,product:t,showPrice:a=!1,plan:r,type:s,endDate:l,remainingSeconds:i,endInclusive:u=!1,state:c="active",bg:p,bgOnly:h=!1,textColor:d,subColor:m,copyrightColor:b,logoSrc:y,label:C,price:f,originalPrice:x,discountLabel:g,onUse:w,onRefund:_,onDelete:E}){const{t:v}=ke.useTranslation(),N=t?iu(t):void 0,k=s??N?.type??"speechear",D=r??N?.plan??v("passCard.planSuffix","\uC774\uC6A9\uAD8C"),A=C??N?.label,B=f??(a?N?.price:void 0),F=x??(a?N?.originalPrice:void 0),L=g??N?.discountLabel,q=o.useMemo(()=>{if(B)return null;const W=t?.durationDays??g2(t?.code);if(!W||W<=0)return i!=null?{percent:null,remainingLabel:Cu(i,v)}:null;const z=W*86400;let ae;if(i!=null)ae=i;else if((c==="active"||c==="expired")&&l){const le=new Date(l).getTime();if(Number.isNaN(le))return null;const Be=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(l)),Pe=/^(\d{4})-(\d{2})-(\d{2})/.exec(Wa()),Fe=Math.round(Be&&Pe?(Date.UTC(+Be[1],+Be[2]-1,+Be[3])-Date.UTC(+Pe[1],+Pe[2]-1,+Pe[3]))/864e5:(le-Date.now())/864e5);ae=Math.max(0,u?Fe+1:Fe)*86400}else c==="expired"?ae=0:ae=z;const ve=$2(ae),me=Math.max(0,Math.min(100,Math.floor(Math.min(ve,z)/z*100)));return c==="pending"&&me>=100?null:{percent:me,remainingLabel:c==="expired"?v("passCard.expired","\uB9CC\uB8CC\uB428"):Cu(ae,v)}},[B,c,l,i,u,t?.durationDays,t?.code,v]),M=o.useRef(null),[O,T]=o.useState({}),[G,K]=o.useState(null),ee=!!(w||_||E),re=o.useRef(!1),R=o.useRef(void 0),[J,ne]=o.useState(y);o.useLayoutEffect(()=>{ne(y)},[y]),o.useLayoutEffect(()=>{const W=M.current;W&&(d!==void 0&&W.style.setProperty("--pass-card-text",d),m!==void 0&&W.style.setProperty("--pass-card-sub",m),b!==void 0&&W.style.setProperty("--pass-card-copyright",b))},[d,m,b]),o.useLayoutEffect(()=>{const W=M.current;if(!W)return;const z=_2(W);if(!y){const ae=L2[k],ve=c==="expired"?"_mono":z?.logoColor??"",me=T2(ae,ve);ne(me)}},[p,y,k,c]);const S=W=>{const z=M.current;if(!z)return null;const{left:ae,top:ve,width:me,height:le}=z.getBoundingClientRect(),Be=(W.clientX-ae)/me-.5;return{rotateX:-((W.clientY-ve)/le-.5)*mu,rotateY:Be*mu}},$=(W,z)=>{const ae=z*-.7,ve=W*.7+10,me=20+(Math.abs(W)+Math.abs(z))*.4;return`${ae}px ${ve}px ${me}px rgba(0, 0, 0, 0.18)`},I=o.useCallback(W=>{if(ta())return;re.current=!0,clearTimeout(R.current),R.current=setTimeout(()=>{re.current=!1},200);const z=S(W);z&&T({transform:`perspective(800px) rotateX(${z.rotateX}deg) rotateY(${z.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:$(z.rotateX,z.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)"})},[]),P=o.useCallback(W=>{if(ta())return;const z=S(W);if(!z)return;const ae=re.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";T({transform:`perspective(800px) rotateX(${z.rotateX}deg) rotateY(${z.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:$(z.rotateX,z.rotateY),transition:ae})},[]),V=o.useCallback(()=>{clearTimeout(R.current),re.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(()=>K(null),[]),U=o.useMemo(()=>{const W=v("passCard.planSuffix","\uC774\uC6A9\uAD8C"),z=D.replace("\uC774\uC6A9\uAD8C","").replace(W==="\uC774\uC6A9\uAD8C"?"":W,"").trim(),ae=z.match(/^(.*?)(일|년)$/);return ae?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:ae[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:ae[2]==="\uB144"?v("passCard.unitYear","\uB144"):v("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:z})},[D,v]),ce=o.useMemo(()=>{const W=ba(B);if(!W)return null;const z=W.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!z)return n.jsx("span",{className:"h1",children:W});const[,ae,ve,me]=z;return n.jsxs(n.Fragment,{children:[ae&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:ae}),n.jsx("span",{className:"h1 pass-card__price-amount",children:ve}),me.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:me.trim()})]})},[B]),Z=o.useCallback(()=>{ee&&K(W=>{if(W)return null;const z=M.current?.getBoundingClientRect();if(!z)return null;const ae=50;return{left:z.left,right:z.right,width:z.width,height:z.height,x:z.x,y:z.y+ae,top:z.top+ae,bottom:z.bottom+ae}})},[ee]),H=o.useCallback(W=>{ee&&(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),Z())},[ee,Z]),te=[{items:[...w?[{label:v("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{w(),K(null)},closeOnSelect:!0}]:[],..._?[{label:v("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{_(),K(null)},closeOnSelect:!0}]:[],...E?[{label:v("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{E(),K(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}${ee?" pass-card--clickable":""}`,style:O,onMouseEnter:I,onMouseMove:P,onMouseLeave:V,onPointerUp:W=>{W.pointerType==="touch"&&V()},onPointerCancel:W=>{W.pointerType==="touch"&&V()},onClick:Z,onKeyDown:ee?H:void 0,role:ee?"button":void 0,tabIndex:ee?0:void 0,"aria-label":e,"aria-haspopup":ee?"menu":void 0,"aria-expanded":ee?!!G:void 0,children:[p??R2(k,D,A),!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:J??M2[k],className:"pass-card__logo",alt:k==="manager"?v("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):v("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),n.jsxs("div",{className:"pass-card__plan",children:[n.jsx("div",{children:U}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:A?v("passCard.labeledPlan",{label:A}):v("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),B?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:[F&&n.jsx("span",{className:"pass-card__price-original body-3",children:ba(F)}),ce]})]}):q?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:q.remainingLabel}),q.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:q.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."})]})]})}),G&&n.jsx(Bn,{anchorRect:G,onClose:ie,ariaLabel:v("tooltip.menu","\uBA54\uB274"),children:n.jsx(Ga,{columns:te,onClose:ie,size:"small"})})]})}const P2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function F2(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,a=It(P2,Rn,Pn);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("${Ka}")`}})]})}const I2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function O2(e={}){const t=It(I2,Rn,Pn);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("${Ka}")`}})]})}function z2(e,t){if(e){if(t==="manager_pro")return n.jsx(O2,{});if(t==="manager_standard")return n.jsx(F2,{});if(t==="manager_lite")return n.jsx(hu,{})}}function W2(e){const t=ba(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 H2(e){const{t}=ke.useTranslation(),a=t("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),r=t("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:s,onSelect:l,period:i="monthly",ownedCodes:u}=e||{},c=_=>!!_&&!!u?.includes(_),p=_=>_.onceOnly??/오픈\s*특가/.test(_.label??""),h=(s.tiers||[]).some(_=>p(_)&&c(_.code)),d=_=>{const E=_.prices?_.prices[i]:_.price;return E?(s.tiers||[]).some(v=>!!v.badge&&v.originals?.[i]===E):!1},m=s.colorToken?`var(--color-${s.colorToken})`:"var(--color-gray)",b=t("payment.plan.freePrice","\uBB34\uB8CC"),y=t("payment.products.mgrEnterprise.tier.price","\uBB38\uC758"),C=_=>_.prices?_.prices[i]:_.price,f=(s.tiers||[]).length>0&&(s.tiers||[]).every(_=>{const E=C(_);return E==="\uBB34\uB8CC"||E===b||E==="0\uC6D0"||typeof E=="string"&&/\d/.test(E)&&!/[1-9]/.test(E)}),x=(s.tiers||[]).length>0&&(s.tiers||[]).every(_=>{const E=C(_);return E==="\uBB38\uC758"||E===y}),g=s.group==="org",w=g?"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((_,E)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(lt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),_]},E))})]}),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((_,E)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(lt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),_]},E))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:f?null:x?n.jsx(be,{htmlType:"button",className:"payment-plan__contact-button",label:t("payment.plan.contact",{defaultValue:"\uBB38\uC758\uD558\uAE30"}),variant:"main",size:56,onClick:()=>s.tiers?.[0]&&l?.({...s.tiers[0],productId:s.id,productTitle:s.title})}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"payment-plan__pricing-list",children:(s.tiers||[]).map(_=>{const E=_.label||a,v=p(_),N=v||_.openPromo===!0,k=E.replace(/^오픈\s*특가\s*/,"")||a,D=_.prices?_.prices[i]:_.price,A=_.badge?N?`${r}
823
- ${_.badge}`:_.badge:void 0;if(v&&c(_.code))return null;if(!_.badge&&!h)return d(_)?null:n.jsxs("div",{className:`payment-plan__pricing-row payment-plan__pricing-row--static${_.highlight?" payment-plan__pricing-row--highlight":""}`,children:[n.jsx("div",{className:"payment-plan__pricing-row-title",children:n.jsx("div",{className:"payment-plan__pricing-row-label h5b",children:_.label})}),n.jsx("div",{className:"payment-plan__pricing-row-price",children:n.jsx("span",{className:"payment-plan__pricing-current h1",children:W2(D)})})]},_.id);const B=s.tier??(g?s.title:void 0),F=n.jsx(fu,{showPrice:!0,product:{type:w,code:_.code,name:k,label:B,price:D,originalPrice:_.originals?.[i]??void 0,discountLabel:A},bg:z2(g,s.id)}),L=()=>l?.({..._,productId:s.id,productTitle:s.title,preview:F});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:L,onKeyDown:l?q=>{q.target===q.currentTarget&&(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),L())}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:F},_.id)})})})})]})}function V2({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 Po='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 bu={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#c9c9c9"};function q2(){const e=It(bu,Rn,Pn);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("${Po}")`}})})}const gu={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function U2(e={}){const t=It(gu,Rn,Pn);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("${Ka}")`}})]})}function yu({keys:e,anchor:t="top-right",scale:a,className:r=""}){const s=Array.isArray(e)?e:[e];return n.jsx("span",{className:De("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 Ya=(e,t,a)=>e+(t-e)*a;function G2({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:p,pulseScale:h,clickable:d=!1,onSelectSpeaker:m,buttonSize:b=40,showIcon:y=!0,onCenterClick:C,centerLabel:f,centerDisabled:x=!1,centerAttention:g=!1,shortcutAnchor:w="top-right",shortcutScale:_,scaleShortcut:E=!1}){const{t:v}=ke.useTranslation(),N=Math.max(0,Math.min(1,a)),k=t/2,D=110/300,A=.18,B=W=>t*(D+(W-1)*A),F=W=>{const z=B(W.row??1),ae=W.angleDeg*Math.PI/180;return{x:k+z*Math.cos(ae),y:k+z*Math.sin(ae)}},L=Math.max(...e.map(W=>W.row??1),1),q=t*.08,M=t*.1,O=t*.24,T=t-2*q,G=t-M-O,K=t-O/2,ee=o.useMemo(()=>[...new Set(e.map(W=>W.deg))].sort((W,z)=>W-z),[e]),re=ee.length,R=Math.max(68,re>1?T/(re-1):0),J=o.useMemo(()=>new Map(ee.map((W,z)=>[W,z])),[ee]),ne=W=>{const z=J.get(W.deg)??0,ae=k+(z-(re-1)/2)*R,ve=L>1?Math.min(68,G/(L-1)):0,me=ve*(L-1),le=M+(G-me)/2,Be=L===1?M+G*.4:le+(L-(W.row??1))*ve;return{x:ae,y:Be}},S=W=>{const z=F(W),ae=ne(W);return{x:Ya(z.x,ae.x,N),y:Ya(z.y,ae.y,N)}},$={x:k,y:Ya(k,K,N)},I=Math.round(b*1.2),P=Math.round(Math.max(16,Math.min(80,b*.7))),V=[],ie=new Map;for(const W of e){const z=W.row??1;ie.has(z)||ie.set(z,[]),ie.get(z).push(W)}for(const[W,z]of ie.entries()){if(z.length<2)continue;const ae=[...z].sort(($e,nt)=>$e.deg-nt.deg),ve=ae.map($e=>S($e)),me=ae.map($e=>$e.deg),le=me[me.length-1]-me[0],Be=le/(me.length-1),Pe=360-le,Fe=ae.length>=3&&Be>0&&Pe<=Be*1.5,Ae=Math.round(B(W)*1e3)/1e3,se=($e,nt,ct,at)=>{const rt=(nt.angleDeg-$e.angleDeg+540)%360-180;if(rt===0)return`L ${at.x} ${at.y}`;if(N===0)return`A ${Ae} ${Ae} 0 0 ${rt>0?1:0} ${at.x} ${at.y}`;const Ee=($e.angleDeg+rt/2)*Math.PI/180,Ue={x:k+Ae*Math.cos(Ee),y:k+Ae*Math.sin(Ee)},Ne={x:(ct.x+at.x)/2,y:(ct.y+at.y)/2},Ye={x:Ya(Ue.x,Ne.x,N),y:Ya(Ue.y,Ne.y,N)},et={x:2*Ye.x-Ne.x,y:2*Ye.y-Ne.y};return`Q ${et.x} ${et.y} ${at.x} ${at.y}`},ye=Fe?[...ae,ae[0]]:ae,Ce=Fe?[...ve,ve[0]]:ve;let xe=`M ${Ce[0].x} ${Ce[0].y}`;for(let $e=1;$e<Ce.length;$e++)xe+=" "+se(ye[$e-1],ye[$e],Ce[$e-1],Ce[$e]);V.push({key:`arc-${W}`,d:xe})}const U=o.useMemo(()=>new Set(s??[]),[s]),ce=W=>({idle:"",active:v("soundCompass.state.active","\uC18C\uB9AC \uB098\uB294 \uC911"),played:v("soundCompass.state.played","\uB4E4\uC74C"),correct:v("soundCompass.state.correct","\uC815\uB2F5"),wrong:v("soundCompass.state.wrong","\uC624\uB2F5")})[W],Z=W=>{if(r===W.id)return"active";if(u){if(W.id===i)return"correct";if(W.id===l&&l!==i)return"wrong"}return U.has(W.id)?"played":"idle"},H=W=>r===W.id?"loop":u?W.id===i?"loop":null:c&&W.id===l?"once":null,te=(W,z)=>{switch(W){case"played":case"correct":return n.jsx(Vs,{size:z});case"wrong":return n.jsx(el,{size:z});default:return n.jsx(Qs,{size:z})}};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(W=>{const{x:z,y:ae}=S(W);return n.jsx("line",{x1:$.x,y1:$.y,x2:z,y2:ae,stroke:"#dde3ec",strokeWidth:"1"},W.id)}),V.map(W=>n.jsx("path",{d:W.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},W.key))]}),g&&!x&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:I,height:I,left:$.x-I/2,top:$.y-I/2}}),C?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${x?" sound-compass__center--disabled":""}`,style:{width:I,height:I,left:$.x,top:$.y},"aria-label":f,"aria-disabled":x||void 0,tabIndex:x?-1:0,onClick:x?void 0:C,children:n.jsx(Ur,{size:P,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:I,height:I,left:$.x,top:$.y},children:n.jsx(Ur,{size:P,color:"currentColor",strokeWidth:1.5})}),e.map((W,z)=>{const{x:ae,y:ve}=S(W),me=Z(W),le=H(W),Be={..._!==void 0||E?{"--shortcut-badge-scale":String(_??Math.max(.75,Math.min(3,b/56)))}:null,pointerEvents:d?"auto":"none",cursor:d?"pointer":"default",zIndex:me!=="idle"?10:1},Pe=b,Fe=Math.round(Math.max(10,Math.min(56,Pe*.38))),Ae=Math.round(Math.max(7,Math.min(18,Pe*.2))),se=Math.round(Math.max(10,Math.min(56,Pe*.4))),ye=y==="answered"&&(me==="played"||me==="correct"||me==="wrong"),Ce=y===!0||ye,xe=!ye;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...Be,left:ae-Pe/2,top:ve-Pe/2},children:[le&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${me}`+(le==="once"?" sound-compass__pulse--once":""),style:{width:Pe,height:Pe,...le==="once"&&p!==void 0?{"--sc-pulse-duration-once":`${p}ms`}:null,...h!==void 0?{"--sc-pulse-scale":String(h)}:null}}),n.jsxs("button",{type:"button",tabIndex:d?0:-1,"aria-disabled":d?void 0:!0,onClick:d?()=>m?.(W.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${me}`,style:{width:Pe,height:Pe},"aria-label":ce(me)?`${W.label}, ${ce(me)}`:W.label,"aria-pressed":l!=null?W.id===l:void 0,children:[Ce&&te(me,Fe),xe&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:y===!0?Ae:se},children:z+1})]}),W.shortcut&&n.jsx(yu,{keys:W.shortcut,anchor:w,className:"sound-compass__speaker-shortcut"})]},W.id)})]})})}function K2({orientation:e="horizontal",label:t,className:a=""}){const r=De("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 vu({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 Y2({options:e,value:t,onChange:a,name:r,disabled:s=!1,direction:l="vertical",className:i="",ariaLabel:u}){const c=o.useId(),p=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(vu,{name:p,value:h.value,checked:t===h.value,disabled:s||h.disabled,label:h.label,onChange:d=>{d&&a?.(h.value)}},h.value))})}const Z2={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function X2({tone:e="info",title:t,message:a,children:r,dismissible:s=!1,onDismiss:l,live:i,className:u=""}){const{t:c}=ke.useTranslation(),[p,h]=o.useState(!1),d=o.useRef(null),m=o.useCallback(()=>{const g=d.current;g&&g.contains(document.activeElement)&&fr(g),h(!0),l?.()},[l]);if(p)return null;const b=De("alert",`alert--${e}`,u),y=i??(e==="danger"||e==="warning"?"assertive":"polite"),C=y==="assertive"?"alert":y==="polite"?"status":void 0,f=!!t,x=!!(a||r);return n.jsxs("div",{ref:d,className:b,role:C,children:[n.jsxs("div",{className:"alert__body",children:[n.jsxs("div",{className:"alert__header",children:[n.jsx(lt,{icon:Z2[e],size:20,className:"alert__icon"}),f&&n.jsx("span",{className:"alert__title body-2",children:t}),!f&&x&&n.jsx("div",{className:"alert__message body-3",children:a||r})]}),f&&x&&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 J2={ready:"search",guide:"info",error:"circle-alert"};function Q2(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 ev({status:e="guide",label:t,children:a,emphasis:r,icon:s,className:l=""}){const i=s===!1?null:s??J2[e],u=De("search-summary",`search-summary--${e}`,l),c=t??a,p=typeof c=="string"&&r&&r.length>0?Q2(c,r):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[i!=null&&n.jsx(lt,{icon:i,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:p})]})}function Za({title:e,items:t}){const{t:a}=ke.useTranslation(),{anchorRect:r,openAt:s,close:l}=_r(),i=o.useRef(null),u=gr(!!r,(c,p)=>{c&&p?s(i.current?.querySelector("button")??p):l()},i);return n.jsxs("span",{ref:i,style:{display:"contents"},children:[n.jsx(be,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!r,ariaLabel:a("common.info","\uC124\uBA85"),onPointerEnter:c=>{Gn(c)||s(c.currentTarget)},onPointerLeave:c=>{Gn(c)||l()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{ta()||s(c.currentTarget)},onBlur:l}),r&&n.jsx(Un,{title:e,items:t,showIndex:t.length>1,anchorRect:r,onClose:l})]})}const Lt=40,ra=32;function tv({items:e=[],value:t,onChange:a,className:r="",size:s=Lt}){const l=o.useId(),{t:i}=ke.useTranslation(),u=o.useRef(null),c=e.find(C=>!C.disabled)?.key,p=e.some(C=>C.key===t)?t:c??e[0]?.key,h=e.find(C=>C.key===p&&!C.disabled)?.key??c,d=()=>Array.from(u.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),m=(C,f=d())=>{if(f.length===0)return;const x=(C%f.length+f.length)%f.length;f[x]?.focus(),f[x]?.click()},b=C=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(C.key))return;C.preventDefault();const f=d(),x=f.indexOf(C.currentTarget);C.key==="ArrowRight"||C.key==="ArrowDown"?m(x+1,f):C.key==="ArrowLeft"||C.key==="ArrowUp"?m(x-1,f):C.key==="Home"?m(0,f):m(f.length-1,f)},y=e.find(C=>C.key===p);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===p,"aria-controls":`tabs__panel-${l}-${C.key}`,disabled:C.disabled,tabIndex:C.key===h?0:-1,className:`tabs__tab body-2${C.key===p?" tabs__tab--active":""}`,onClick:()=>{C.key!==t&&a?.(C.key)},onKeyDown:b,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 nv={xs:12,sm:16,md:20,lg:28,xl:36};function av(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 rv({src:e,name:t,size:a="md",shape:r="circle",className:s=""}){const{t:l}=ke.useTranslation(),[i,u]=o.useState(null),c=!!e&&i===e,p=t?av(t):"",h=!!e&&!c,d=!h&&!!p,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&&d&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:p}),!h&&!d&&n.jsx(lt,{icon:"user-round",size:nv[a],className:"avatar__icon"})]})}function ov(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 sv({onFilesSelected:e,accept:t,multiple:a=!1,disabled:r=!1,showFileList:s=!0,files:l,onRemove:i,className:u=""}){const{t:c}=ke.useTranslation(),p=o.useRef(null),[h,d]=o.useState(!1),[m,b]=o.useState([]),y=l??m,C=v=>{if(!v||v.length===0)return;const N=Array.from(v).filter(D=>ov(D,t));if(N.length===0)return;const k=a?N:N.slice(0,1);if(l===void 0){const D=a?[...y,...k]:k;b(D),e?.(D)}else e?.(k)},f=v=>{v.preventDefault(),!r&&d(!0)},x=v=>{v.preventDefault(),d(!1)},g=v=>{v.preventDefault(),d(!1),!r&&C(v.dataTransfer.files)},w=v=>{const N=v.target;try{C(N.files)}finally{N.value=""}},_=()=>{r||p.current?.click()},E=v=>{if(!r&&(i?.(v),l===void 0)){const N=y.filter((k,D)=>D!==v);b(N),i||e?.(N)}};return n.jsxs("div",{className:`file-upload ${u}`.trim(),children:[n.jsxs("div",{className:De("file-upload__dropzone",h&&"file-upload__dropzone--dragging",r&&"file-upload__dropzone--disabled"),role:"button",tabIndex:r?-1:0,"aria-disabled":r,onClick:_,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),_())},onDragOver:f,onDragLeave:x,onDrop:g,children:[n.jsx(lt,{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:v=>{v.stopPropagation(),_()},children:c("fileUpload.browseButton","\uD30C\uC77C \uC120\uD0DD")}),n.jsx("input",{ref:p,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((v,N)=>n.jsxs("li",{className:"file-upload__list-item body-3",children:[n.jsx("span",{className:"file-upload__file-name body-3",children:v.name}),n.jsx("button",{type:"button",className:"file-upload__remove-button","aria-label":c("fileUpload.removeAriaLabel",{name:v.name}),disabled:r,onClick:()=>E(N),children:n.jsx(lt,{icon:"x",size:14})})]},`${v.name}-${N}`))})]})}function lv({items:e,className:t=""}){const{t:a}=ke.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(lt,{icon:"chevron-right",size:14,className:"breadcrumb__separator"})]},s)})})})}const iv={small:14,medium:20,large:28};function uv({value:e,onChange:t,max:a=5,readOnly:r=!1,size:s="medium",ariaLabel:l,className:i=""}){const{t:u}=ke.useTranslation(),c=r||!t,[p,h]=o.useState(null),d=c?e:Number.isFinite(e)?Math.round(e):0,m=p??d,b=iv[s],y=v=>{v!==e&&t?.(v)},C=v=>{c||y(v)},f=v=>{c||ta()||h(v)},x=o.useRef(null),g=v=>{const N=Math.min(a,Math.max(1,v));y(N),Array.from(x.current?.querySelectorAll("[data-star]")??[]).find(k=>k.dataset.star===String(N))?.focus()},w=v=>{if(!c){switch(v.key){case"ArrowRight":case"ArrowUp":g((d||0)+1);break;case"ArrowLeft":case"ArrowDown":g((d||1)-1);break;case"Home":g(1);break;case"End":g(a);break;default:return}v.preventDefault()}},_=d>=1&&d<=a?Math.round(d):1,E=()=>{c||h(null)};return n.jsx("div",{className:`rating rating--${s}${c?" rating--readOnly":""} ${i}`.trim(),ref:x,onKeyDown:w,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:a}):l??u("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:E,onPointerUp:v=>{v.pointerType==="touch"&&E()},onPointerCancel:v=>{v.pointerType==="touch"&&E()},children:Array.from({length:a},(v,N)=>{const k=N+1,D=Math.max(0,Math.min(1,m-N)),A=D>0&&D<1,B=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(lt,{icon:"star",size:b,className:"rating__star rating__star--empty"}),D>0&&n.jsx("span",{className:`rating__star-fill${A?" rating__star-fill--half":""}`,style:A?{width:`${D*100}%`}:void 0,children:n.jsx(lt,{icon:"star",size:b,className:"rating__star rating__star--filled"})})]});return c?n.jsx("span",{className:"rating__item","aria-hidden":"true",children:B},k):n.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":d===k,"aria-label":u("rating.starLabel",{n:k}),"data-star":k,tabIndex:k===_?0:-1,onClick:()=>C(k),onMouseEnter:()=>f(k),children:B},k)})})}const cv=20,dv=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function pv({value:e,onChange:t,palette:a=dv,size:r=Lt,className:s="",ariaLabel:l}){const{t:i}=ke.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(lt,{icon:"check",size:cv,className:"color-picker__check"})},u)})})}function _u({icon:e,label:t,tooltip:a,wrapperStyle:r,color:s,bgColor:l,useHover:i=!0,iconSize:u="medium"}){const{t:c}=ke.useTranslation(),p=u==="small",h=De("category-icon",p?"category-icon--small":""),d=p?16:20,m=o.useRef(null),[b,y]=o.useState(!1),C=o.useMemo(()=>{const k=r&&typeof r=="object"?{...r}:{};return!s&&!l?k:{...k,...s?{color:s,"--t-item-fg":s}:{},...l?{"--t-item-bg":l}:{}}},[r,s,l]),f=a||t,x=i&&!!f,[g,w]=o.useState(null);o.useLayoutEffect(()=>{b&&w(m.current?.getBoundingClientRect()??null)},[b]),o.useEffect(()=>{if(!i&&b)try{y(!1)}catch{}},[i,b]),o.useEffect(()=>{if(!b)return;const k=D=>{const A=m.current;if(!A)return;const B=D.target;B&&!A.contains(B)&&y(!1)};return document.addEventListener("pointerdown",k,!0),()=>document.removeEventListener("pointerdown",k,!0)},[b]);const _=o.useCallback(()=>{i&&y(!0)},[i]),E=o.useCallback(()=>{i&&y(!1)},[i]),v=o.useCallback(()=>y(!1),[]),N=o.useCallback(k=>{if(k.key==="Escape"){y(!1);return}(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),y(D=>!D))},[]);return n.jsxs("span",{ref:m,className:De("category-icon__wrap",x&&"category-icon__wrap--interactive"),onPointerEnter:_,onPointerLeave:E,onFocus:_,onBlur:E,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":b,"data-tooltip-ignore":!0,children:[n.jsx(lt,{icon:e,label:t,className:h,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:C,size:d}),b&&f&&n.jsx(Ln,{anchorRect:g,text:typeof f=="string"?f:void 0,offset:8,onClose:v,className:"category-icon__tooltip",ariaLabel:typeof f=="string"?f:void 0})]})}let Kn=null;function Xa(e){if(Kn&&Kn!==e)try{Kn()}catch{}return Kn=e,()=>{Kn===e&&(Kn=null)}}function Br(e){if(Kn===e){Kn=null;try{e()}catch{}}}function Ja(e,t){let a=()=>{};const r=new Promise(u=>{a=u});if(typeof e!="string"||e.trim()===""){Dt("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 hv(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 mv(e,t){const[a,r]=o.useState(!1),[s,l]=o.useState(-1),[i,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),p=o.useRef(!1),h=o.useRef(null),d=o.useRef(null),[m,b]=o.useState(!1),y=o.useRef([]),{previewCodes:C,previewBucket:f}=hv(e,t),x=`${C.join(",")}|${f??""}`,g=o.useMemo(()=>i.key===x?i.urls:[],[i,x]);o.useEffect(()=>{if(!C.length)return;let _=!1;return(async()=>{const E=[],v=[];for(const N of C)try{const k=Nl(N,f);if(!k){E.push("");continue}let D=null;try{D=await El(k)}catch{}if(!D)try{const A=await Dl(k);A&&(D=URL.createObjectURL(A),v.push(D))}catch{}E.push(D??"")}catch{E.push("")}_?v.forEach(N=>{try{URL.revokeObjectURL(N)}catch{}}):(y.current.forEach(N=>{try{URL.revokeObjectURL(N)}catch{}}),y.current=v,u({key:x,urls:E}))})(),()=>{_=!0}},[C.join(","),f]),o.useEffect(()=>()=>{y.current.forEach(_=>{try{URL.revokeObjectURL(_)}catch{}}),y.current=[]},[]);const w=o.useCallback(async _=>{if(_.stopPropagation(),_.preventDefault(),p.current){h.current&&Br(h.current),p.current=!1;try{c.current?.pause()}catch{}r(!1),l(-1);return}if(!g.filter(Boolean).length)return;let E=null;const v=()=>{p.current=!1,E?.stop()};h.current=v;const N=Xa(v);p.current=!0,r(!0);for(let k=0;k<g.length&&p.current;k++){const D=g[k];if(D&&(l(k),E=Ja(D),c.current=E.el,!await E.done))break}N(),h.current===v&&(h.current=null,p.current=!1,r(!1),l(-1))},[g]);return o.useEffect(()=>()=>{h.current&&Br(h.current),p.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:a,playingIndex:s,previewUrls:g,previewHover:m,setPreviewHover:b,previewBtnRef:d,handlePreview:w}}const Cv=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 Fo(e){const{index:t,type:a,trainingData:r,ariaLabel:s,depth:l,renderPopup:i,completed:u,completedIds:c,selectedIds:p,tooltipText:h,useDescriptionTooltip:d=!1,onRemove:m,hideCheckBadge:b=!1,showTypeLabel:y=!1,onComplete:C,onSelect:f,onMore:x,countLabelOverride:g,size:w="square"}=e||{},{t:_}=ke.useTranslation(),[E,v]=o.useState(!1),N=o.useRef(null),[k,D]=o.useState(!1);o.useEffect(()=>{N.current?.matches(":hover")&&D(!0)},[]);const{playing:A,playingIndex:B,previewUrls:F,previewHover:L,setPreviewHover:q,previewBtnRef:M,handlePreview:O}=mv(r,a?.key),T=o.useCallback(()=>{f?f():v(!0)},[f]),G=o.useCallback(()=>v(!1),[]),K=o.useCallback(()=>D(!0),[]),ee=o.useCallback(()=>D(!1),[]),re=o.useCallback(()=>q(!0),[q]),R=o.useCallback(()=>q(!1),[q]),[J,ne]=o.useState(null);o.useLayoutEffect(()=>{L&&ne(M.current?.getBoundingClientRect()??null)},[L,M]);const[S,$]=o.useState(null);o.useLayoutEffect(()=>{k&&!E&&d&&$(N.current?.getBoundingClientRect()??null)},[k,E,d]);const I=o.useCallback(Ne=>{Ne.target===Ne.currentTarget&&(Ne.key==="Enter"||Ne.key===" ")&&(Ne.preventDefault(),T())},[T]),P=r||null,V=o.useMemo(()=>{if(!d)return null;const Ne=h?(Array.isArray(h)?h:[h]).filter(Boolean):null,Ye=Ne&&Ne.length>0?Ne:Cv(P);return Ye&&Ye.length>0?Ye:null},[d,h,P]),ie=o.useCallback(Ne=>{Ne.stopPropagation(),m?.()},[m]),U=o.useCallback(Ne=>Ne.stopPropagation(),[]),ce=o.useCallback(Ne=>{typeof C=="function"&&C(Ne)},[C]),Z=u||(c&&r?.id!=null?c.has(String(r.id)):!1),H=!Z&&(p!=null&&r?.id!=null?p.has(String(r.id)):!1);Vi("speechear.popup.close",G);const te=ei(),W=`${a?.label||""} ${t+1}`,z=P?.title||P?.name||W;let ae=a?.icon,ve,me="",le="";try{const Ne=P?.category_0||P?.category_main_code||P?.category_main,Ye=P?.category_1||P?.category_sub_code||P?.category_sub,et=te.find(ft=>ft.key===Ne);et?.icon&&(ae=et.icon),!ve&&et?.color&&(ve={"--t-item-fg":et.color}),!ve&&P?.iconColor&&(ve={"--t-item-fg":P.iconColor}),me=et?_(`topic.${et.key}`,{defaultValue:et.label||""}):"";try{const ft=et?.subs?.find(vt=>vt.key===Ye);le=ft?_(`topic.sub.${ft.key}`,{defaultValue:ft.label||""}):""}catch{}}catch{}const Be=le?`${me} / ${le}`:me||a?.label||z,Pe=Ne=>_("training.countQuestions",{n:Ne,count:Ne}),Fe=Ne=>_("training.countSentences",{n:Ne,count:Ne});let Ae="";try{if(P)if(a?.key==="LISTEN_IN_NOISE"){let Ne=0;Array.isArray(P.items)&&P.items.length>0?Ne=P.items.length:Array.isArray(P.sentences)&&P.sentences.length>0?Ne=P.sentences.length:P.sentences&&(Ne=1),Ae=Fe(Ne)}else if(a?.key==="SHORT_STORY"){let Ne=1;Array.isArray(r?.items)?Ne=r.items.length:Array.isArray(r?.raw&&r.raw?.items)?Ne=r.raw.items.length:Array.isArray(P?.questions)?Ne=P.questions.length:Array.isArray(P?.sentences)&&(Ne=P.sentences.length),Ae=Pe(Ne)}else if(a?.key==="LONG_STORY"){let Ne=1;if(Array.isArray(P.items)&&P.items.length>0){const Ye=P.items.reduce((et,ft)=>{const vt=ft.questionItems;return Array.isArray(vt)?et+vt.length:Array.isArray(ft.questions)?et+ft.questions.length:et},0);Ne=Ye>0?Ye:P.items.length}else Array.isArray(P.questions)&&P.questions.length>0?Ne=P.questions.length:Array.isArray(P.sentences)&&P.sentences.length>0&&(Ne=P.sentences.length);Ae=Pe(Ne)}else if(a?.key==="ORDERING_SENTENCE"){let Ne=1;Array.isArray(P.items)&&P.items.length>0?Ne=P.items.length:Array.isArray(P.sentences)&&P.sentences.length>0&&(Ne=P.sentences.length),Ae=Fe(Ne)}else Array.isArray(P.items)&&(Ae=P.items.length>0?Pe(P.items.length):"")}catch{}const se=w==="row",ye=w==="list"||se,Ce=w==="compact",xe=w==="small",$e=xe&&a?.key?Jf().find(Ne=>Ne.key===a.key):void 0,nt=$e?ti[$e.key]:void 0,ct=$e?nt?_(`trainingType.${nt}.title`,{defaultValue:$e.label}):$e.label??"":"",at=y&&a?.label&&a.label!==String(z)?String(a.label):xe&&ct&&ct!==String(z)?ct:"",rt=!!at,Ee=g!==void 0?g:Ae,Ue=[at,typeof z=="string"?z:"",Ee].map(Ne=>String(Ne??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:N,className:`training-block-button${ye?" training-block-button--list":""}${se?" training-block-button--row":""}${Ce?" training-block-button--compact":""}${xe?" training-block-button--small":""}${Z?" training-block-button--completed":""}${H?" training-block-button--selected":""}${rt&&!xe?" training-block-button--withType":""}${xe&&!rt?" training-block-button--no-type-label":""}`,onClick:T,onPointerEnter:K,onPointerLeave:ee,role:"button",tabIndex:0,onKeyDown:I,"aria-label":typeof s=="string"?s:Ue||void 0,title:!d&&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(z)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:a.label}),xe&&ct&&ct!==String(z)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:ct}),n.jsx(_u,{icon:ae,label:z,tooltip:Be,wrapperStyle:ve,iconSize:xe||Ce?"small":"medium"}),!b&&(Z||H)&&!(m&&k)&&n.jsx(Sn,{className:m?"training-block-button__check--removable":void 0,icon:"check",position:"top-left",size:32,"aria-label":Z?_("training.completed","\uD6C8\uB828 \uC644\uB8CC"):_("training.selected","\uC120\uD0DD\uB428")}),m&&n.jsx(Sn,{className:`training-block-button__remove${k?" is-hover":""}`,icon:"remove",position:"top-left",size:32,"aria-label":_("common.remove","\uC81C\uAC70"),onClick:ie}),n.jsx("div",{className:`training-block-button__title ${Ce?"body-3":xe?"body-3b":"h3"}`,children:String(z)}),n.jsxs("div",{className:"training-block-button__description",children:[Ee?n.jsx("div",{className:`training-block-button__count ${xe?"caption-2":"caption-1"}`,children:Ee}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(lt,{icon:"chevron-right",label:_("training.next","\uB2E4\uC74C"),className:"training-block-button__chevron-icon",imgClassName:"training-block-button__chevron-icon-image",maskClassName:"training-block-button__chevron-icon-mask",svgClassName:"training-block-button__chevron-icon-svg",size:xe?12:20})})]}),(ye&&!se||xe)&&F.length>0&&n.jsx("div",{ref:M,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:U,onPointerEnter:re,onPointerLeave:R,children:n.jsx(be,{htmlType:"button",size:xe?28:32,type:"dot",icon:A?"pause":"play",variant:xe?"transparent-lightGray":"default",useBorder:!1,selected:A,ariaLabel:String(z).trim()?A?_("training.stopFor",{name:z,defaultValue:`${z} \uC815\uC9C0`}):_("training.previewFor",{name:z,defaultValue:`${z} \uBBF8\uB9AC \uB4E3\uAE30`}):A?_("training.stop","\uC815\uC9C0"):_("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:O})})]}),x&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:Ne=>{Ne.stopPropagation(),x(Ne)},children:n.jsx(be,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(z).trim()?_("common.moreFor",{name:z}):_("common.more","\uB354\uBCF4\uAE30")})})]}),L&&n.jsx(Ln,{anchorRect:J,text:A?_("training.stop","\uC815\uC9C0"):_("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:R}),k&&!E&&d&&(V?n.jsx(Un,{anchorRect:S,items:V,activeIndex:B,onClose:ee}):P?.subTitle?n.jsx(Ln,{anchorRect:S,text:P.subTitle,offset:8,onClose:ee}):null),E&&i&&i({trainingData:P,typeKey:a?.key??"",onClose:G,onComplete:ce,popupTitle:String(z),popupSubTitle:a?.subTitle,depth:l!=null?String(l):void 0,popupIcon:ae,popupIconTooltip:String(Be),popupWrapperStyle:ve})]})}const xu=200;function fv(e){return e.itemId?(ab()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function wu({plan:e,groups:t,anchorRect:a,offset:r=12,onClose:s}){const{t:l}=ke.useTranslation(),i=o.useMemo(()=>t?t.map((c,p)=>({key:c.key??c.type?.key??String(p),label:c.label,type:c.type,data:c.items??[]})).filter(c=>c.data.length>0):ob(l).map(c=>{const p=(e?.items??[]).filter(h=>h.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:p.length,data:p.map(fv).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:ue("training-tooltip__box"),children:n.jsx("div",{className:ue("training-tooltip__groups"),children:i.flatMap(({key:c,label:p,type:h,data:d},m)=>[m>0?n.jsx("div",{className:ue("training-tooltip__divider")},`div-${c}`):null,n.jsxs("div",{className:ue("training-tooltip__section"),children:[n.jsx("div",{className:ue("training-tooltip__section-header"),children:n.jsx("span",{className:ue("training-tooltip__type-label body-3b"),children:p})}),n.jsx("div",{className:ue("training-tooltip__items"),children:d.map((b,y)=>n.jsx(Fo,{index:y,type:h,trainingData:b,size:"compact",hideCheckBadge:!0},String(b.id??y)))})]},c)])})});return a?n.jsx(Bn,{anchorRect:a,offset:r,onClose:s,closeOnOutsideClick:!1,className:ue("training-tooltip"),ariaLabel:l("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const bv=200;function gv({icon:e,count:t,title:a,plan:r,tooltip:s=!0,hoverAccent:l=!1,className:i="",onClick:u,onMouseEnter:c,onMouseLeave:p}){const h=!!u||!!c||s&&!!r,d=De("count-tile",h&&"count-tile--interactive",h&&l&&"count-tile--accent",u&&"count-tile--clickable",i),m=o.useRef(null),[b,y]=o.useState(null),C=o.useRef(null),f=o.useRef(null),x=!!(b&&r&&s),g=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),f.current&&(clearTimeout(f.current),f.current=null)},[]),w=o.useCallback(()=>{g(),y(null)},[g]),_=o.useCallback(()=>{!s||!r||(g(),C.current=setTimeout(()=>{C.current=null,y(m.current?.getBoundingClientRect()??null)},xu))},[s,r,g]),E=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),!f.current&&(f.current=setTimeout(()=>{f.current=null,y(null)},bv))},[]);return o.useEffect(()=>()=>{g()},[g]),o.useEffect(()=>{(!s||!r)&&w()},[s,r,w]),o.useEffect(()=>{if(!x)return;const v=k=>k instanceof Element&&(m.current?.contains(k)||!!k.closest(".training-tooltip")),N=k=>{v(k.target)?g():E()};return document.addEventListener("pointerover",N,!0),()=>document.removeEventListener("pointerover",N,!0)},[x,g,E]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:m,className:d,onClick:u?v=>{w(),u(v)}:void 0,onKeyDown:u?v=>{v.key!=="Enter"&&v.key!==" "||(v.preventDefault(),v.currentTarget.click())}:void 0,onPointerEnter:v=>{v.pointerType==="touch"||v.pointerType==="pen"?w():_()},onMouseEnter:c,onMouseLeave:v=>{E(),p?.(v)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${a} ${t}`,children:[n.jsx(lt,{icon:e,size:20,className:"count-tile__icon"}),n.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:t})]}),b&&r&&n.jsx(wu,{plan:r,anchorRect:b,onClose:w})]})}let Qa=0,Bu="",Io="",er=0;function ku(){return Au(!1)}function yv(){return Au(!0)}function Au(e){const t=typeof document<"u";Qa===0&&t&&(Bu=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(er===0&&(Io=document.body.style.paddingRight),er++,document.body.style.paddingRight="0px"),Qa++;let a=!1;return()=>{a||(a=!0,Qa=Math.max(0,Qa-1),e&&t&&(er=Math.max(0,er-1),er===0&&(Io?document.body.style.paddingRight=Io:document.body.style.removeProperty("padding-right"))),Qa===0&&t&&(document.body.style.overflow=Bu))}}function vv(){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 _v({open:e,onClose:t,ariaLabel:a,title:r,children:s,size:l="md",closeOnBackdrop:i=!0,closeOnEscape:u=!0,showClose:c=!0,className:p,contentClassName:h}){const{t:d}=ke.useTranslation(),m=o.useId(),b=o.useRef(null),y=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const g=document.activeElement,w=ku(),_=b.current;return _o(_,g),_?.focus(),()=>{w();const E=document.activeElement;(!E||E===document.body||_&&_.contains(E))&&xo(g)?.focus?.()}},[e]);const C=o.useRef(y),f=o.useRef(u);o.useEffect(()=>{C.current=y,f.current=u}),o.useEffect(()=>{if(e)return ea(()=>{f.current&&C.current()})},[e]);const x=o.useRef(!1);return yo(b,e),!e||typeof document>"u"?null:hn.createPortal(n.jsx("div",{className:De("dialog",p),onPointerDown:i?g=>{x.current=g.target===g.currentTarget}:void 0,onMouseDown:g=>{g.target===g.currentTarget&&g.preventDefault()},onClick:i?g=>{const w=x.current;x.current=!1,w&&g.target===g.currentTarget&&y()}:void 0,children:n.jsxs("div",{ref:b,role:"dialog","aria-modal":"true","aria-label":r?void 0:a,"aria-labelledby":r?m:void 0,tabIndex:-1,className:De("dialog__surface",`dialog__surface--${l}`,h),onClick:g=>g.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":d("common.close","\uB2EB\uAE30"),onClick:y,children:n.jsx(vv,{})}):null,n.jsx("div",{className:"dialog__body",children:s})]})}),document.body)}function xv({columns:e,rows:t,rowKey:a,title:r,toolbar:s,empty:l,loading:i,caption:u,className:c=""}){const{t:p}=ke.useTranslation(),h=!i&&t.length===0;return n.jsxs("div",{className:De("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(d=>n.jsx("th",{scope:"col",className:De("board__th",`board__cell--${d.headerAlign??d.align??"left"}`),style:d.width?{width:d.width}:void 0,children:d.header},d.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??p("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((d,m)=>n.jsx("tr",{className:"board__row",children:e.map(b=>n.jsx("td",{className:De("board__td",`board__cell--${b.align??"left"}`),children:b.render(d,m)},b.key))},a(d,m)))})]})]})}function wv({name:e,role:t,photo:a,media:r,credentials:s,size:l=190,className:i=""}){return n.jsxs("div",{className:De("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 Bv({groups:e,className:t=""}){return n.jsx("div",{className:De("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 kv({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:De("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 Av({logo:e,alt:t,onDone:a,durationMs:r=3e3}){const s=Ha(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 Nv({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:De("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 Ev({items:e,className:t=""}){return n.jsx("ul",{className:De("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 tr=new Map;function _n(e){const{t}=ke.useTranslation(),{options:a=[],value:r=a.find(_=>!_.disabled)?.key??a[0]?.key,onChange:s=_=>{},className:l="",size:i=Lt,shape:u="pill",useBG:c=!0,fullWidth:p=!1,minButtonWidth:h,ariaLabel:d}=e||{},m=o.useRef(null),b=a.filter(_=>!_.disabled),y=o.useId(),C=a.map(_=>_.key).join("\xB7");o.useEffect(()=>{if(!(!Wn||d!=null&&d!=="")){if(tr.set(y,C||"(\uBCF4\uAE30 \uC5C6\uC74C)"),tr.size>1){const _=[...tr.values()].sort();Dt(`segmented-control-unnamed:${_.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${tr.size} \uAC1C \uC11C \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uB0AD\uB3C5\uAE30\uB294 \uBAA8\uB450 "\uC120\uD0DD \uD0ED" \uC73C\uB85C \uC77D\uC5B4 \uC5B4\uB290 \uAC83\uC774 \uBB34\uC5C7\uC778\uC9C0 \uAC00\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. ariaLabel \uC744 \uC8FC\uC138\uC694. \uC9C0\uAE08 \uC120 \uAC83(\uBCF4\uAE30 \uC774\uB984\uC73C\uB85C \uC801\uC74C): ${_.join(" / ")}`)}return()=>{tr.delete(y)}}},[d,C,y]);const f=_=>{if(!b.length)return;const E=Math.max(0,b.findIndex(N=>N.key===r)),v=_==="first"?b[0]:_==="last"?b[b.length-1]:b[(E+_+b.length)%b.length];v&&(s(v.key),Array.from(m.current?.querySelectorAll("[data-segkey]")??[]).find(N=>N.dataset.segkey===v.key)?.focus())},x=_=>{switch(_.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}_.preventDefault()},g=_=>{const E=v=>typeof v=="string"||typeof v=="number";if(!(!E(_.label)||_.count==null||_.count===!1||!E(_.count)))return`${_.label}, ${_.count}`},w=b.some(_=>_.key===r)?r:b[0]?.key;return n.jsx("div",{ref:m,onKeyDown:x,className:De("segmented-control",`segmented-control--${u}`,`segmented-control--${i}`,p&&"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":d??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:a.map(_=>n.jsx(be,{htmlType:"button",role:"radio","aria-checked":_.key===r,"data-segkey":_.key,tabIndex:_.key===w?0:-1,label:_.label,count:_.count,ariaLabel:g(_),disabled:_.disabled,className:_.key===r?"is-selected":"",onClick:()=>{_.disabled||s(_.key)},size:i,shape:u,useBorder:!1,useBG:!1},_.key))})}const Dv=260;function Fn(e){const{t}=ke.useTranslation(),{title:a,subtitle:r,headerActions:s,headerSegment:l,children:i,buttons:u,footer:c,footerStart:p,footerEnd:h,footerNote:d,footerNoteDivider:m=!1,footerClassName:b="",footerLayout:y="center",onClose:C,closeDisabled:f=!1,beforeClose:x,closeOnBackdrop:g=!0,className:w="",ariaLabel:_,useTitle:E=!0,inline:v=!1,size:N,layer:k="modal",height:D,fillBody:A=!1,resetScrollKey:B}=e||{},[F,L]=o.useState(!1),q=o.useRef(!1),M=o.useRef(null),O=o.useId(),T=o.useRef(null);o.useEffect(()=>{},[v,a,_,w]),o.useEffect(()=>{B!==void 0&&T.current&&(T.current.scrollTop=0)},[B]);const[G,K]=o.useState(!1);o.useEffect(()=>{const H=T.current;if(!H)return;const te=()=>K(H.scrollHeight>H.clientHeight+1);if(te(),typeof ResizeObserver>"u")return;const W=new ResizeObserver(te);W.observe(H);const z=H.firstElementChild;return z&&W.observe(z),()=>W.disconnect()},[i,B]),o.useEffect(()=>{if(!v)return ku()},[v]);const ee=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(v)return;const H=ee.current,te=M.current;return _o(te,H),te&&!te.contains(document.activeElement)&&(te.querySelector(Dn)??te).focus(),()=>{const W=document.activeElement;(!W||W===document.body||te&&te.contains(W))&&xo(H)?.focus?.()}},[v]),yo(M,!v);const re=o.useRef(!0),R=wo(),J=o.useRef(null);o.useEffect(()=>(re.current=!0,()=>{re.current=!1,J.current&&(clearTimeout(J.current),J.current=null)}),[]);const ne=o.useCallback(()=>{!re.current||!q.current||(q.current=!1,L(!1))},[]),S=o.useCallback((H,te=!1)=>{if(te&&!re.current||q.current)return;q.current=!0,L(!0);const W=setTimeout(()=>{J.current===W&&(J.current=null);let z;try{z=H?H():void 0}catch{ne();return}z&&typeof z.then=="function"&&z.then(()=>{setTimeout(ne,120)},ne)},R?0:Dv);te&&(J.current=W)},[ne,R]),$=o.useCallback(()=>{f||x&&x()===!1||S(C,!0)},[S,C,f,x]),I=o.useRef($);o.useEffect(()=>{I.current=$});const P=!v&&!!C;o.useEffect(()=>{if(P)return ea(()=>I.current())},[P]);const V=P&&g,ie=o.useRef(!1),U=H=>{ie.current=H.target===H.currentTarget},ce=H=>{const te=ie.current;ie.current=!1,te&&H.target===H.currentTarget&&$()},Z=n.jsx("div",{className:`popup ${v?"popup--inline":""} ${k==="belowPagePopup"?"popup--below-page-popup":""} ${F?"popup--closing":""} ${w}`,onPointerDown:V?U:void 0,onClick:V?ce:void 0,onMouseDown:v?void 0:H=>{H.target===H.currentTarget&&H.preventDefault()},children:n.jsxs("div",{ref:M,className:`popup-panel${N?` popup-panel--${N}`:""}${D!=null?" popup-panel--has-height":""}${A?" popup-panel--fill-body":""}`,style:D!=null?{"--popup-height":typeof D=="number"?`${D}px`:D}:void 0,tabIndex:-1,role:v?void 0:"dialog","aria-modal":v?void 0:!0,"aria-labelledby":!v&&E&&a?O:void 0,"aria-label":!v&&!(E&&a)?_??(typeof a=="string"?a:void 0):void 0,children:[!E&&(s||C)?n.jsxs("div",{className:"popup-close-float",children:[s,C&&n.jsx(be,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:$,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:O,className:"popup-title popup-title--left h2",children:a}):n.jsx("span",{id:O,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(_n,{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(be,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:$,disabled:f,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]})]}):null,n.jsx("div",{className:"popup-content",ref:T,tabIndex:G?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:S,closeWithAnimation:$}):i})}),d!=null&&d!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${m?" popup-footer-note--divider":""}`,role:"note",children:d}),p||h?n.jsxs("div",{className:`popup-footer popup-footer--bar${b?` ${b}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof p=="function"?p({animateThen:S,closeWithAnimation:$}):p}),n.jsx("div",{className:"popup-footer__end",children:typeof h=="function"?h({animateThen:S,closeWithAnimation:$}):h})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${y!=="center"?` popup-footer--${y}`:""}`,children:u.map((H,te)=>n.jsx(be,{htmlType:"button",size:48,variant:H.variant??"default",label:H.label,disabled:H.disabled,onClick:()=>H.onClick?.({animateThen:S,closeWithAnimation:$})},te))}):c?n.jsx("div",{className:`popup-footer${y!=="center"?` popup-footer--${y}`:""}${b?` ${b}`:""}`,children:typeof c=="function"?c({animateThen:S,closeWithAnimation:$}):c}):null]})});return v||typeof document>"u"?Z:hn.createPortal(Z,document.body)}function Nu({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:p=>t?.(p.target.checked),"aria-label":!r&&s?s:void 0}),n.jsx("span",{className:"toggle__slider"}),l==="right"&&c]})}function xn({options:e,value:t,onChange:a,placeholder:r,disabled:s=!1,block:l=!1,size:i=Lt,error:u=!1,className:c="",ariaLabel:p,ariaDescribedBy:h}){const{t:d}=ke.useTranslation(),m=r??d("dropdown.placeholder","\uC120\uD0DD"),b=o.useId(),y=o.useId(),C=o.useRef(null),f=o.useCallback((M,O)=>{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:qa(O)}},[]),{open:x,setOpen:g,toggle:w,style:_,triggerRef:E,menuRef:v}=Ua({computeStyle:f}),[N,k]=o.useState(-1),D=o.useCallback(()=>k(-1),[]),A=e.find(M=>M.value===t);o.useEffect(()=>{if(x){const M=e.findIndex(O=>O.value===t);k(M>=0?M:e.length?0:-1),requestAnimationFrame(()=>{const O=v.current;if(!O)return;const T=O.querySelectorAll(".dropdown__option")[M];T&&(O.scrollTop=Math.max(0,T.offsetTop-O.clientHeight/2+T.clientHeight/2))})}},[x]),o.useEffect(()=>{x&&k(M=>{if(M>=0&&M<e.length)return M;const O=e.findIndex(T=>T.value===t);return O>=0?O:e.length?0:-1})},[x,e.length]);const B=o.useCallback(()=>{s||w()},[s,w]),F=o.useCallback(M=>{M.disabled||s||(M.value!==t&&a?.(M.value),g(!1))},[a,g,s,t]);o.useEffect(()=>{s&&g(!1)},[s,g]);const L=o.useCallback(M=>{if(!s){if(!x){(M.key==="Enter"||M.key===" "||M.key==="ArrowDown")&&(M.preventDefault(),g(!0));return}if(M.key==="Escape"){M.preventDefault(),g(!1);return}M.key==="ArrowDown"?(M.preventDefault(),k(O=>{let T=O+1;for(;T<e.length&&e[T].disabled;)T++;return T<e.length?T:O})):M.key==="ArrowUp"?(M.preventDefault(),k(O=>{let T=O-1;for(;T>=0&&e[T].disabled;)T--;return T>=0?T:O})):(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),e[N]?F(e[N]):g(!1))}},[s,x,e,N,F,g]),q=x?n.jsx("div",{ref:v,id:b,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:_,onMouseLeave:D,onMouseDown:M=>M.preventDefault(),children:e.map((M,O)=>n.jsxs("button",{id:`${b}-option-${O}`,type:"button",role:"option","aria-selected":M.value===t,className:De("dropdown__option body-2",M.value===t?"dropdown__option--active":"",O===N?"dropdown__option--active":"",M.disabled?"dropdown__option--disabled":""),onMouseDown:T=>T.preventDefault(),onClick:()=>F(M),onMouseEnter:()=>k(O),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:De("dropdown",`dropdown--s${i}`,x?"dropdown--open":"",l?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:L,children:[n.jsxs("button",{ref:E,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":x,"aria-controls":x?b:void 0,"aria-activedescendant":x&&N>=0?`${b}-option-${N}`:void 0,"aria-label":p,"aria-describedby":[p&&A?y:"",h??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:s,onClick:B,onBlur:M=>{x&&!v.current?.contains(M.relatedTarget)&&g(!1)},children:[n.jsx("span",{id:y,className:`dropdown__trigger-label body-2${A?"":" dropdown__trigger-label--placeholder"}`,children:A?A.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(q,C.current?.closest(".ihabdevteam-core-scope")??document.body)]})}const Sv={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function Eu(e){return e?Sv[e]??null:null}function Du(e){switch(Eu(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Su(e,t){const a=Eu(e);return a?t(`device.type.${a}`,{defaultValue:e??""}):e??""}const _a=e=>e==null?"":String(e).trim();function Oo(e,t,a,r){const s=_a(e),l=_a(t),i=_a(a);if(r&&s&&l&&i){const c=`${s.padStart(4,"0")}-${l.padStart(2,"0")}-${i.padStart(2,"0")}`,p=new Date(c);if(!Number.isNaN(p.getTime())&&p.toISOString().slice(0,10)===c){const h=Gl(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 jv(e,t,a){const r=_a(e);return r?`${r}-${_a(t).padStart(2,"0")}-${_a(a).padStart(2,"0")}`:""}function ju(e){return typeof e=="string"?e:e.label}function Tu({value:e,onChange:t,suggestions:a,openOnFocus:r=!1,filterSuggestions:s,onSelectSuggestion:l,autoActiveFirst:i=!1}){const u=o.useId(),[c,p]=o.useState(!1),[h,d]=o.useState(-1),m=o.useRef(null),b=o.useMemo(()=>{if(!a.length)return[];const B=e??"";return s===!1?a:B?typeof s=="function"?s(a,B):a.filter(F=>ju(F).toLowerCase().includes(B.toLowerCase())):r?a:[]},[a,e,r,s]),[y,C]=o.useState(!1),f=o.useRef([]),x=y&&b.length===0?f.current:b;o.useEffect(()=>{x.length&&(f.current=x)},[x]);const g=o.useCallback(()=>C(!0),[]),w=o.useCallback(()=>C(!1),[]),_=i?0:-1;o.useEffect(()=>{c||d(_)},[c,_]),o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const E=h<x.length?h:_<x.length?_:-1,v=o.useCallback(B=>{l?l(B):t?.(ju(B)),p(!1)},[t,l]),N=o.useCallback(()=>p(!0),[]),k=o.useCallback(()=>{p(!0),d(_)},[_]),D=o.useCallback(()=>{m.current=setTimeout(()=>p(!1),120)},[]),A=o.useCallback(B=>{B.nativeEvent.isComposing||B.keyCode===229||(B.key==="ArrowDown"?(B.preventDefault(),p(!0),d(F=>Math.min(x.length-1,(F<x.length?F:_)+1))):B.key==="ArrowUp"?(B.preventDefault(),d(F=>Math.max(_,(F<x.length?F:x.length)-1))):B.key==="Enter"?E>=0&&v(x[E]):B.key==="Escape"&&c&&(B.preventDefault(),p(!1)))},[x,E,c,v,_]);return{listId:u,open:c,activeIdx:E,filtered:x,handleFocus:N,handleBlur:D,handleInput:k,handleKeyDown:A,handleSelect:v,handleCompositionStart:g,handleCompositionEnd:w}}const zo=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Yn(e){const{value:t,defaultValue:a,name:r,inputRef:s,onChange:l,label:i,ariaLabel:u,ariaDescribedBy:c,required:p,placeholder:h,ghostText:d,ghostHint:m,type:b="text",disabled:y=!1,readOnly:C=!1,error:f,helperText:x,maxLength:g,size:w=Lt,variant:_="input",fullWidth:E=!1,newline:v=!1,multiline:N=!1,rows:k=3,leftIcon:D,rightIcon:A,clearable:B=!1,list:F,showCount:L=!0,className:q="",onFocus:M,onBlur:O,onKeyDown:T,onEnter:G,inputMode:K,autoComplete:ee,autoFocus:re,suggestions:R,filterSuggestions:J,onSelectSuggestion:ne,autoActiveFirst:S,openOnFocus:$=!1}=e,I=C||y?void 0:R,{t:P}=ke.useTranslation(),V=o.useId();!i&&!u&&Dt(`TextField:unnamed:${V}`,"[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-${V}`,U=`tf-helper-${V}`,ce=o.useRef(null),Z=Tu({value:t??"",onChange:l,suggestions:I??[],openOnFocus:$,filterSuggestions:J,onSelectSuggestion:ne,autoActiveFirst:S}),H=!!I&&Z.open&&Z.filtered.length>0,te=o.useRef(null),[W,z]=o.useState(null),ae=o.useCallback(()=>{const Ee=te.current;if(!Ee||typeof window>"u")return;const Ue=Ee.getBoundingClientRect(),Ne=230,Ye=window.innerHeight-Ue.bottom<Ne+8&&Ue.top>Ne+8;z({position:"fixed",left:Ue.left,width:Ue.width,...Ye?{bottom:window.innerHeight-Ue.top+8}:{top:Ue.bottom+8},zIndex:qa(Ee)})},[]);zo(()=>{if(!H)return;ae();let Ee=null;const Ue=()=>{if(typeof requestAnimationFrame>"u"){ae();return}Ee===null&&(Ee=requestAnimationFrame(()=>{Ee=null,ae()}))},Ne=Ye=>{const et=Ye.target;et&&et.nodeType===1&&et.closest?.(".text-field__suggestions")||Ue()};return window.addEventListener("scroll",Ne,!0),window.addEventListener("resize",Ue),()=>{Ee!==null&&cancelAnimationFrame(Ee),window.removeEventListener("scroll",Ne,!0),window.removeEventListener("resize",Ue)}},[H,ae]);const ve=o.useCallback(Ee=>{ce.current=Ee,typeof s=="function"?s(Ee):s&&(s.current=Ee)},[s]),me=d?`${d}${m??P("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:h,le=t!==void 0,Be=le&&b==="password",[Pe,Fe]=o.useState((a??"").length),Ae=le?(t??"").length:Pe,se=o.useRef(t);zo(()=>{se.current=t}),o.useEffect(()=>{const Ee=ce.current;if(!Be||!Ee)return;const Ue=t??"";Ee.value!==Ue&&(Ee.value=Ue)},[Be,t]),o.useEffect(()=>{if(!v||!ce.current)return;const Ee=ce.current;Ee.style.height="",Ee.scrollHeight>Ee.clientHeight&&(Ee.style.height=`${Ee.scrollHeight}px`)},[t,Pe,v]);const ye=g!=null&&Ae>g,Ce=w===32?16:20,xe=De("text-field",`text-field--s${w}`,_==="display"?"text-field--display":"",E?"text-field--full-width":"",y?"text-field--disabled":"",C?"text-field--readonly":"",f?"text-field--error":"",D?"text-field--has-left-icon":"",A||B?"text-field--has-right-icon":"",q),$e={id:ie,...Be?{}:le?{value:t}:{defaultValue:a},ref:ve,placeholder:me,name:r,disabled:y,readOnly:C,autoFocus:re,maxLength:g,list:F,inputMode:K,autoComplete:ee,"aria-label":!i&&u?u:void 0,"aria-required":p,"aria-invalid":!!f,"aria-describedby":[x||f?U: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?H:void 0,"aria-controls":H?Z.listId:void 0,"aria-activedescendant":H&&Z.activeIdx>=0?`${Z.listId}-option-${Z.activeIdx}`:void 0,onChange:Ee=>{const Ue=Ee.target;le||Fe(Ue.value.length),l?.(Ue.value),I&&Z.handleInput(),Be&&queueMicrotask(()=>{const Ne=se.current??"";Ue.value!==Ne&&(Ue.value=Ne)})},onCompositionStart:I?Z.handleCompositionStart:void 0,onCompositionEnd:I?Z.handleCompositionEnd:void 0,onFocus:(Ee=>{M?.(Ee),I&&Z.handleFocus()}),onBlur:(Ee=>{O?.(Ee),I&&Z.handleBlur()}),onKeyDown:(Ee=>{const Ue=(Ee.key==="Tab"&&!Ee.shiftKey||Ee.key===" ")&&!Ee.nativeEvent.isComposing;if(d&&Ue&&!C&&!y&&!(Ee.currentTarget.value??"").trim()){Ee.preventDefault();const Ne=Ee.currentTarget;le||(Ne.value=d,Fe(d.length)),l?.(d);return}I&&Ee.key==="Enter"&&!Ee.nativeEvent.isComposing&&Z.activeIdx>=0?Ee.preventDefault():G&&Ee.key==="Enter"&&!Ee.nativeEvent.isComposing&&(Ee.preventDefault(),G()),T?.(Ee),I&&Z.handleKeyDown(Ee)})},nt=B&&!y&&!C&&Ae>0,ct=()=>v?n.jsx("textarea",{...$e,className:"text-field__input text-field__input--auto body-2",rows:1}):N?n.jsx("textarea",{...$e,className:"text-field__input text-field__input--textarea body-2",rows:k}):n.jsx("input",{...$e,type:b,className:"text-field__input body-2"}),at=_==="display"&&!v&&!N&&!!me,rt=()=>n.jsxs(n.Fragment,{children:[ct(),at&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:me})]});return n.jsxs("div",{ref:te,className:xe,children:[i&&n.jsxs("label",{htmlFor:ie,className:"text-field__label caption-1",children:[i,p&&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(lt,{icon:D,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ce})}),rt(),g!=null&&L&&n.jsxs("span",{className:`text-field__count caption-2${ye?" text-field__count--over":""}`,children:[Ae,"/",g]}),nt&&n.jsx(be,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:P("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:Ee=>{Ee.preventDefault()},onClick:()=>{!le&&ce.current&&(ce.current.value="",Fe(0)),l?.("")},tabIndex:-1}),A&&!nt&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(lt,{icon:A,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ce})})]}),!!I&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:Z.open&&(t??"").length>0&&Z.filtered.length===0?P("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),H&&(typeof document>"u"?null:hn.createPortal(n.jsx("ul",{id:Z.listId,className:"text-field__suggestions",role:"listbox",style:W??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:Z.filtered.map((Ee,Ue)=>n.jsx("li",{id:`${Z.listId}-option-${Ue}`,role:"option","aria-selected":Ue===Z.activeIdx,className:`text-field__suggestion body-2${Ue===Z.activeIdx?" is-active":""}`,onMouseDown:Ne=>Ne.preventDefault(),onClick:()=>{Z.handleSelect(Ee),ce.current?.focus()},children:typeof Ee=="string"?Ee:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:Ee.label}),Ee.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:Ee.hint})]})},typeof Ee=="string"?`${Ee}-${Ue}`:Ee.id))}),document.body)),(x||f)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:U,className:"text-field__helper caption-1",role:f?"alert":void 0,children:f||x})})]})}const Mu=()=>{};function un(e){const t=o.useId();if(!("variant"in e)){const{label:g,sub:w,onClick:_,children:E,align:v="horizontal",icon:N,useFullWidth:k=!1}=e,D=A=>{_&&A.target===A.currentTarget&&(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),_())};return n.jsxs("div",{className:De("panel-row",v==="vertical"?"panel-row--vertical":"",k?"panel-row--label-fixed panel-row--fill":"",_?"panel-row--clickable":""),onClick:_,onKeyDown:_?D:void 0,role:_?"button":void 0,tabIndex:_?0:void 0,children:[N!=null&&n.jsx("div",{className:"panel-row__icon",children:N}),g!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsx("div",{className:"panel-row__label body-3",children:g}),w&&n.jsx("div",{className:"panel-row__sub caption-1",children:w})]}),n.jsx("div",{className:"panel-row__right",children:E})]})}if(e.variant==="description")return n.jsx("div",{className:"panel-row panel-row--block",children:n.jsx("p",{className:"panel-row__description body-3",children:e.children})});if(e.variant==="empty")return n.jsx("div",{className:"panel-row panel-row--empty body-3",children:e.children});if(e.variant==="loading")return n.jsx("div",{className:"panel-row panel-row--loading",children:n.jsx(ga,{size:28})});if(e.variant==="custom"&&!e.label)return n.jsx("div",{className:"panel-row panel-row--block",children:e.children});const{variant:a,label:r,sub:s,onClick:l,required:i,error:u,align:c="horizontal",useFullWidth:p=!1,icon:h}=e,d=a==="button"?void 0:l;let m=null;const b=a==="toggle"?`panel-toggle-${t}`:void 0,y=u?`panel-error-${t}`:void 0,C=`panel-helper-${t}`;if(a==="toggle"){const g=e;m=n.jsx(Nu,{checked:g.checked,onChange:g.onChange,id:b})}else if(a==="segmented"){const g=e;m=n.jsx(_n,{options:g.options,value:g.value,onChange:g.onChange,size:g.size??Lt,ariaLabel:r})}else if(a==="dropdown"){const g=e,w=g.dropdowns?.length?n.jsx("div",{className:`panel-row__dropdown-group${p?" panel-row__dropdown-group--full":""}`,children:g.dropdowns.map((_,E)=>n.jsx("div",{className:p?"panel-row__dropdown-item--full":void 0,children:n.jsx(xn,{options:_.options,value:_.value,onChange:_.onChange,size:Lt,placeholder:_.placeholder,block:p,error:!!u,ariaDescribedBy:y,ariaLabel:_.ariaLabel??([r,_.placeholder].filter(Boolean).join(" ")||void 0)})},E))}):n.jsx(xn,{options:g.options??[],value:g.value??"",onChange:g.onChange??Mu,size:Lt,block:p,error:!!u,ariaLabel:r,ariaDescribedBy:y});m=u?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${p?" 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 g=e;g.buttons?.length?m=n.jsx("div",{className:"panel-row__button-group",children:g.buttons.map((w,_)=>n.jsx(be,{htmlType:"button",size:w.btnSize??Lt,variant:w.btnVariant??"default",disabled:w.disabled,onClick:w.onClick,children:w.label},_))}):m=n.jsx(be,{htmlType:"button",size:g.btnSize??Lt,variant:g.btnVariant??"default",disabled:g.disabled,onClick:g.onClick,children:g.buttonLabel})}else if(a==="text"){const g=e;m=n.jsx("span",{className:`panel-row__text body-2${p?" panel-row__text--full":""}`,style:g.valueColor?{color:g.valueColor}:void 0,children:g.value})}else if(a==="input"){const g=e;m=n.jsxs("div",{className:`panel-row__input-wrap${p?" panel-row__input-wrap--full":""}`,children:[n.jsx(Yn,{size:Lt,value:g.value,onChange:g.onChange??Mu,onKeyDown:g.onKeyDown,onEnter:g.onEnter,placeholder:g.placeholder,ghostText:g.ghostText,inputMode:g.inputMode,readOnly:g.readOnly,disabled:g.disabled,type:g.type,autoComplete:g.autoComplete,maxLength:g.maxLength,showCount:g.showCount,multiline:g.multiline,rows:g.rows,fullWidth:p,error:u,ariaLabel:r,required:i,ariaDescribedBy:g.helperText?C:void 0}),g.helperText&&n.jsx("div",{id:C,className:"panel-row__helper caption-1",children:g.helperText})]})}else a==="custom"&&(m=e.children);u&&a!=="input"&&a!=="dropdown"&&(m=n.jsxs("div",{className:`panel-row__dropdown-error-wrap${p?" 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")&&p,x=g=>{d&&g.target===g.currentTarget&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),d())};return n.jsxs("div",{className:De("panel-row",c==="vertical"?"panel-row--vertical":"",f?"panel-row--label-fixed":"",a==="text"?"panel-row--text":"",d?"panel-row--clickable":""),onClick:d,onKeyDown:d?x:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,children:[h!=null&&n.jsx("div",{className:"panel-row__icon",children:h}),n.jsxs("div",{className:"panel-row__left",children:[b?n.jsxs("label",{htmlFor:b,className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}):n.jsxs("div",{className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}),s&&n.jsx("div",{className:"panel-row__sub caption-1",children:s})]}),n.jsx("div",{className:"panel-row__right",children:m})]})}function Lu(e){const t=e.productName||e.brand,a=[e.brand,e.fitType].filter(r=>!!r&&r!==t);return[...new Set(a)].join(" \xB7 ")}function Tv({devices:e,onRelease:t,emptyLabel:a}){const{t:r,i18n:s}=ke.useTranslation();return n.jsx("div",{className:"panel-row panel-row--device",children:["left","right"].map(l=>{const i=e[l],u=l==="left"?r("device.direction.left","\uC88C"):r("device.direction.right","\uC6B0");return n.jsxs("div",{className:"panel-row__device-column",children:[n.jsxs("div",{className:"panel-row__device-head",children:[n.jsx("span",{className:"panel-row__device-side body-2b",children:u}),i&&t&&n.jsx(be,{htmlType:"button",size:32,type:"dot",icon:"x",ariaLabel:`${u} ${r("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C")}`,showTooltipInfo:r("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"),onClick:()=>t(l)})]}),i?n.jsxs("div",{className:"panel-row__device-info",children:[n.jsxs("span",{className:"panel-row__device-kind",children:[i.device&&n.jsx(ln,{size:"small",variant:Du(i.device),fill:"soft",label:Su(i.device,r)}),Lu(i)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:Lu(i)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),Oo(i.wornYear,i.wornMonth,i.wornDay,s.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:r("customers.device.wornSince",{date:Oo(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 nr({title:e,titleLevel:t=2,icon:a,disc:r,actions:s,size:l="medium",minHeight:i,maxWidth:u,className:c,scrollable:p,scrollbarGutter:h="auto",compactRows:d=!1,useBorder:m=!0,useBg:b=!0,useRowBorder:y=!0,labelWidth:C,form:f=!1,loading:x,empty:g,children:w}){const _=De("panel",`panel--${l}`,f?"panel--form":"",i!==void 0?"panel--fill":"",m?"":"panel--no-border",b?"":"panel--no-bg",y?"":"panel--no-row-border",d?"panel--compact-rows":"",c),E={};i!==void 0&&(E.minHeight=i),u!==void 0&&(E.maxWidth=typeof u=="number"?`${u}px`:u),C!==void 0&&(E["--panel-label-width"]=typeof C=="number"?`${C}px`:C);const v=t?`h${t}`:"div";return n.jsxs("div",{className:_,style:Object.keys(E).length?E:void 0,children:[(!!e||r!=null)&&n.jsxs("div",{className:De("panel__header",r!=null?"panel__header--with-disc":""),children:[a&&n.jsx(lt,{icon:a,label:typeof e=="string"?e:void 0,className:"panel__icon"}),n.jsxs("div",{className:"panel__title-group",children:[!!e&&n.jsx(v,{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})]}),x?n.jsx(un,{variant:"loading"}):g!=null&&o.Children.toArray(w).length===0?n.jsx(un,{variant:"empty",children:g}):p?n.jsx("div",{className:De("panel__body--scroll",h==="stable"&&"panel__body--gutter-stable"),children:w}):w]})}function Mv({cols:e=2,layout:t="grid",gap:a=1,collapseAt:r,className:s,style:l,children:i}){const u=o.useRef(null),[c,p]=o.useState();o.useEffect(()=>{const d=u.current;if(r===void 0||!d||(p(d.clientWidth),typeof ResizeObserver>"u"))return;const m=new ResizeObserver(([b])=>p(b.contentRect.width));return m.observe(d),()=>m.disconnect()},[r]);const h=r!==void 0&&c!==void 0&&c<=r;return n.jsx("div",{ref:u,className:De("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 Wo({checked:e=!1,onChange:t,disabled:a,indeterminate:r,label:s,size:l="medium",className:i,title:u,ariaLabel:c}){const p=o.useRef(null),h=o.useId(),d=o.useRef(!!r);return d.current=!!r,o.useEffect(()=>{p.current&&(p.current.indeterminate=!!r)}),n.jsxs("label",{className:De("checkbox",l==="small"&&"checkbox--small",l==="large"&&"checkbox--large",a&&"checkbox--disabled",i),htmlFor:h,title:u,children:[n.jsx("input",{ref:p,id:h,type:"checkbox",className:"checkbox__input",checked:e,onChange:m=>{t?.(m.target.checked),p.current&&(p.current.indeterminate=d.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 $u(e,t){const a=()=>{if(e){const[C,f]=e.split("-");return{y:+C,m:+f-1}}const[b,y]=pr(t).split("-");return{y:+b,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 b=a();s(b.y),i(b.m)},[e]);const c=o.useRef({y:r,m:l});o.useEffect(()=>{c.current={y:r,m:l}},[r,l]);const p=o.useCallback(b=>{const y=c.current.y*12+c.current.m+b,C=Math.floor(y/12),f=y-C*12;c.current={y:C,m:f},s(C),i(f)},[]),h=o.useCallback(()=>p(-1),[p]),d=o.useCallback(()=>p(1),[p]),m=o.useCallback((b,y)=>{c.current={y:b,m:y},s(b),i(y)},[]);return{viewY:r,viewM:l,prevMonth:h,nextMonth:d,setViewYM:m}}function kr(e,t){return new Date(e,t+1,0).getDate()}function Lv(e,t){return new Date(e,t,1).getDay()}function ar(e,t,a){return`${e}-${String(t+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function $v(e){if(!e)return"";const[t,a,r]=e.split("-");return`${t}. ${a}. ${r}.`}function Rv(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:ar(a,r-1,s)}const Pv=1900;function Fv(e,t,a,r,s){const l=r?+r.split("-")[0]:Math.min(Pv,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 Ru(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 Pu({value:e,onChange:t,size:a=Lt,min:r,max:s,disabled:l,placeholder:i,className:u,today:c}){const{t:p,i18n:h}=ke.useTranslation(),d=i??p("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),m=o.useMemo(()=>p("calendar.dow",{returnObjects:!0}),[p]),b=pr(c),{viewY:y,viewM:C,prevMonth:f,nextMonth:x,setViewYM:g}=$u(e,c),w=o.useId(),_=o.useCallback((H,te)=>{const W=window.innerHeight,z=window.innerWidth,ae=typeof document<"u"?document.getElementById(w):null,ve=Math.max(ae?.offsetHeight||0,ae?.scrollHeight||0)||300,me=Math.max(H.width,ae?.offsetWidth||0,260),le=W-H.bottom,Be=H.top,Pe=le<ve&&Be>le,Fe=8,Ae=(se,ye)=>Math.min(Math.max(Fe,se),Math.max(Fe,ye));return{position:"fixed",left:Ae(H.left,z-me-Fe),width:H.width,minWidth:260,...Pe?{top:"auto",bottom:Ae(W-H.top+6,W-ve-Fe)}:{bottom:"auto",top:Ae(H.bottom+6,W-ve-Fe)},zIndex:qa(te)}},[w]),{open:E,setOpen:v,toggle:N,style:k,triggerRef:D,menuRef:A}=Ua({computeStyle:_,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!E)return;const H=A.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(Dn)??H)?.focus?.(),()=>{const te=document.activeElement;(!te||te===document.body)&&D.current?.focus?.()}},[E,A,D]);const[B,F]=o.useState(1),L=o.useRef(null),q=o.useRef(null);o.useEffect(()=>{if(!E)return;const H=e&&e.slice(0,7)===`${y}-${String(C+1).padStart(2,"0")}`?+e.slice(8):b.slice(0,7)===`${y}-${String(C+1).padStart(2,"0")}`?+b.slice(8):1;F(H)},[E]),o.useEffect(()=>{if(q.current==null)return;const H=q.current;q.current=null,L.current?.querySelector(`[data-day="${H}"]`)?.focus()}),o.useEffect(()=>{F(H=>Math.min(H,kr(y,C)))},[y,C]);const M=o.useCallback(H=>{let te=ar(H.getFullYear(),H.getMonth(),H.getDate());r&&te<r&&(te=r),s&&te>s&&(te=s);const[W,z,ae]=te.split("-").map(Number);(W!==y||z-1!==C)&&g(W,z-1),F(ae),q.current=ae},[r,s,y,C,g]),O=o.useCallback(H=>{const te=new Date(y,C,B),W=ae=>{te.setDate(te.getDate()+ae),M(te)},z=ae=>{const ve=te.getFullYear()*12+te.getMonth()+ae,me=Math.floor(ve/12),le=ve-me*12;M(new Date(me,le,Math.min(te.getDate(),kr(me,le))))};switch(H.key){case"ArrowLeft":W(-1);break;case"ArrowRight":W(1);break;case"ArrowUp":W(-7);break;case"ArrowDown":W(7);break;case"Home":W(-te.getDay());break;case"End":W(6-te.getDay());break;case"PageUp":H.shiftKey?z(-12):z(-1);break;case"PageDown":H.shiftKey?z(12):z(1);break;default:return}H.preventDefault()},[y,C,B,M]),T=o.useCallback(H=>{l||(t(ar(y,C,H)),v(!1))},[y,C,t,v,l]);o.useEffect(()=>{l&&v(!1)},[l,v]);const G=H=>{const te=ar(y,C,H);return!!(r&&te<r||s&&te>s)},K=(()=>{const H=kr(y,C);if(B>=1&&B<=H&&!G(B))return B;for(let te=1;te<=H;te++)if(!G(te))return te;return-1})(),ee=[];for(let H=0;H<Lv(y,C);H++)ee.push(null);for(let H=1;H<=kr(y,C);H++)ee.push(H);const re=a===64?20:a===32?14:a===40?16:18,R=Kl(h.language),J=H=>new Intl.DateTimeFormat(R,{year:"numeric"}).format(new Date(H,0,1)),ne=(H,te)=>new Intl.DateTimeFormat(R,{month:"long"}).format(new Date(H,te-1,1)),S=Fv(y,+b.slice(0,4),J,r,s),$=Ru(y,ne,r,s),I=H=>{const te=Ru(H,ne,r,s);if(te.length===0)return;const W=te.some(z=>+z.value===C+1);g(H,W?C:+te[0].value-1)},[P,V]=o.useState(null);o.useEffect(()=>{V(null)},[e]);const ie=o.useCallback(H=>{V(H);const te=Rv(H);if(!te||r&&te<r||s&&te>s)return;t(te);const[W,z]=te.split("-");g(+W,+z-1)},[r,s,t,g]),U=o.useCallback(()=>{V(null)},[]),ce=o.useCallback(H=>{H.key==="Enter"?(H.preventDefault(),U(),v(!1)):H.key==="Escape"?(U(),v(!1)):H.key==="ArrowDown"&&!E&&(H.preventDefault(),v(!0))},[U,v,E]),Z=E?hn.createPortal(n.jsxs("div",{ref:A,id:w,className:"date-picker__dropdown",style:k,"data-tooltip-ignore":!0,role:"dialog","aria-label":p("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":p("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(qs,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(xn,{className:"date-picker__nav-dropdown",ariaLabel:p("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:S,value:String(y),onChange:H=>I(+H),size:40}),n.jsx(xn,{className:"date-picker__nav-dropdown",ariaLabel:p("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:$,value:String(C+1),onChange:H=>g(y,+H-1),size:40})]}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:x,"aria-label":p("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(Us,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:L,onKeyDown:O,children:[m.map(H=>n.jsx("div",{className:"date-picker__dow caption-1",children:H},H)),ee.map((H,te)=>{if(H===null)return n.jsx("div",{},`e${te}`);const W=ar(y,C,H),z=W===e,ae=W===b,ve=G(H),me=te%7;return n.jsx("button",{type:"button",disabled:ve,"data-day":H,tabIndex:H===K?0:-1,"aria-current":ae?"date":void 0,onClick:()=>!ve&&T(H),className:De("date-picker__day caption-1",z&&"date-picker__day--selected",ae&&!z&&"date-picker__day--today",ve&&"date-picker__day--disabled",me===0&&"date-picker__day--sun",me===6&&"date-picker__day--sat"),children:H},H)})]})]}),document.body):null;return n.jsxs("div",{className:De("date-picker",`date-picker--s${a}`,E&&"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:P??$v(e),placeholder:d,onChange:H=>ie(H.target.value),onClick:()=>!l&&!E&&N(),onKeyDown:ce,onBlur:U,disabled:l,"aria-haspopup":"dialog","aria-expanded":E,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!l&&N(),disabled:l,tabIndex:-1,"aria-label":d,"aria-haspopup":"dialog","aria-expanded":E,children:n.jsx(tl,{size:re,className:"date-picker__icon",strokeWidth:1.5})})]}),Z]})}const Fu=["personal","sensitive","marketing"];function Iv({takenKinds:e,busy:t,today:a,onClose:r,onSubmit:s,className:l}){const{t:i}=ke.useTranslation(),[u]=o.useState(()=>pr(a)),[c,p]=o.useState([]),[h,d]=o.useState("paper"),[m,b]=o.useState("self"),[y,C]=o.useState(u),[f,x]=o.useState(""),g=Fu.filter(_=>!e.includes(_)),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(Fn,{title:i("customers.consent.record","\uB3D9\uC758 \uBC1B\uAE30"),closeDisabled:t,onClose:r,className:l,footer:()=>n.jsx(be,{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(nr,{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:[g.map(_=>n.jsx(Wo,{checked:c.includes(_),disabled:t,label:w[_],onChange:E=>p(v=>E?[...v,_]:v.filter(N=>N!==_))},_)),g.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(_n,{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:_=>d(String(_))})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),children:n.jsx(_n,{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:_=>b(String(_))})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.day","\uBC1B\uC740 \uB0A0"),children:n.jsx(Pu,{size:48,value:y,max:u,today:a,onChange:_=>C(_??"")})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.note","\uBA54\uBAA8"),children:n.jsx(Yn,{size:48,fullWidth:!0,value:f,onChange:x,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 Ho({page:e,totalPages:t,onChange:a,prevLabel:r,nextLabel:s,className:l=""}){const{t:i}=ke.useTranslation(),u=r??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=s??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),p=Math.max(1,t),h=()=>a(Math.max(1,Math.min(p,e-1))),d=()=>a(Math.min(p,e+1));return n.jsxs("div",{className:De("pagination",l),children:[n.jsx(be,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-left",ariaLabel:u,disabled:e<=1,onClick:h}),n.jsxs("span",{className:"pagination__info body-3","aria-live":"polite","aria-atomic":"true",children:[Math.min(Math.max(1,e),p)," / ",p]}),n.jsx(be,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=t,onClick:d})]})}function Vo({count:e,search:t,segment:a,filters:r,pageSize:s,pagination:l,actions:i,className:u}){const{t:c}=ke.useTranslation(),p=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:De("toolbar",u),children:[n.jsxs("div",{className:"toolbar__row",children:[p,a&&(Array.isArray(a)?a:[a]).map((d,m)=>n.jsx(_n,{size:Lt,...d},d.ariaLabel??m))]}),h&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(Yn,{className:"toolbar__search",size:Lt,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((d,m)=>n.jsx(xn,{size:Lt,options:d.options,value:d.value,onChange:d.onChange,ariaLabel:d.ariaLabel},m)),(s||l)&&n.jsxs("div",{className:"toolbar__pager",children:[s&&n.jsx(xn,{size:Lt,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(Ho,{page:l.page,totalPages:l.total,onChange:l.onChange,prevLabel:l.prevLabel,nextLabel:l.nextLabel})]}),i]})})]})}function Iu(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(Iu).join(""):""}function Ov(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"},Pg={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},Fg={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"},Ig={clearAriaLabel:"Clear input"},Og={ariaLabel:"Select tab"},zg={ariaLabel:"Tabs"},Wg={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},Hg={ariaLabel:"User avatar"},Vg={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},qg={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"},Ug={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"}},Gg={steps:"Step {{current}} of {{total}}"},Kg={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"},Yg={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},Zg={viewWords:"Words"},Xg={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},Jg={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},Qg={previewRegion:"Report preview \u2014 scrollable sideways"},ey={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},ty={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},ny={clearSelection:"Clear selection"},ay={showResult:"Show {{type}} result"},ry={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},oy={loading:"Loading"},sy={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},ly={ariaLabel:"Breadcrumb"},iy={empty:"No items yet."},uy={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"},cy={common:ug,calendar:cg,passCard:dg,rating:pg,colorPicker:hg,dropdown:mg,accordion:Cg,header:fg,nav:bg,settings:gg,usage:yg,account:vg,training:_g,customers:xg,payment:wg,coupons:Bg,visits:kg,trainingType:Ag,myWordTable:Ng,keyWords:Eg,wordTable:Dg,wordSearch:Sg,wordPrint:jg,topic:Tg,device:Mg,manager:Lg,wordPairs:$g,footer:Rg,date:Pg,wordData:Fg,textField:Ig,segmentedControl:Og,tabs:zg,fileUpload:Wg,avatar:Hg,myHomework:Vg,trainingStatus:qg,store:Ug,progress:Gg,trainingMiss:Kg,table:Yg,wordScore:Zg,topBanner:Xg,datePicker:Jg,report:Qg,tooltip:ey,phonemeProfile:ty,bulkBar:ny,debug:ay,badge:ry,loader:oy,soundCompass:sy,breadcrumb:ly,board:iy,promoBannerBg:uy};const dy="0.416.0",py=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],yo="ko",hy="ihab_display_language";function ni(){if(typeof window>"u")return yo;try{const e=localStorage.getItem(hy);if(e&&py.some(t=>t.code===e))return e}catch{}return yo}function ai(e){try{document.documentElement.lang=e}catch{}}Zt.on("languageChanged",ai),ai(ni()),Zt.use(ke.initReactI18next).init({resources:{ko:{translation:ig},en:{translation:cy}},lng:ni(),fallbackLng:yo,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const my=new Map;try{Zt.store?.on?.("added",()=>my.clear())}catch{}let Cr=null,ri=null,oi=null;function Cy(){const e=ql();if(e&&e.entries.length>0){const t=Af();if(Cr&&ri===e&&oi===t)return Cr;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 Cr=r,ri=e,oi=t,Cr}return[]}new Proxy([],{get(e,t){const a=Cy(),r=a[t];return typeof r=="function"?r.bind(a):r}});function fy(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 by(e){if(typeof window>"u")return"";const t=(a,r)=>{typeof r.attrValue=="string"&&fy(r.attrValue)&&(r.keepAttr=!1)};ma.addHook("uponSanitizeAttribute",t);try{return ma.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{ma.removeHook("uponSanitizeAttribute",t)}}function gy(e){const[t,a]=o.useState(null),[r,s]=o.useState(null),[l,i]=o.useState(null),[u,c]=o.useState(null),[p,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 d=e.split("/").pop();let m=e;d&&(e.startsWith("/")?m=oo(e):/^(Logo|Symbol)/i.test(d)?m=oo(`logo/${d}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),m=e)),i(null),c(null),a(e),s(m)},[e]),o.useEffect(()=>{if(!r)return;let d=!1;async function m(){try{let b=await fetch(r);b.ok||(b=await fetch(r));const y=b.headers.get("content-type")||"";if(d)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(d)return;if(/^\s*<svg[\s>]/i.test(f)){const x=by(f);if(!x){i("none");return}c(x),i("inline");return}i("none")}catch{d||i("none")}}return m(),()=>{d=!0}},[r]),o.useEffect(()=>{let d=!1,m=null;return l==="mask"&&r&&fetch(r).then(b=>{if(!b.ok)throw new Error("fetch failed");return b.blob()}).then(b=>{d||(m=URL.createObjectURL(b),h(m))}).catch(()=>{d||i("img")}),()=>{d=!0,m&&URL.revokeObjectURL(m),h(null)}},[l,r]),t===e?{iconToUse:r,mode:l,svgText:u,blobUrl:p}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function lt(e){const{icon:t,label:a,className:r,imgClassName:s,maskClassName:l,svgClassName:i,wrapperStyle:u,size:c}=e||{},p=r??"iconRenderer-icon",h=s??"iconRenderer-icon-image",d=l??"iconRenderer-icon-mask",m=i??"iconRenderer-icon-svg",b=typeof t=="string"?t:null,y=o1(b),{iconToUse:C,mode:f,svgText:x,blobUrl:g}=gy(b),w=(k,D={})=>n.jsx("span",{className:p,style:u,...D,children:k}),_=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,E=(k,D={})=>n.jsx("img",{src:k,alt:typeof a=="string"?a:typeof a=="number"?String(a):"",className:h,...D,style:_?{...D.style,..._}:D.style});if(!t)return null;if(typeof t!="string")return 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 k={"--icon-url":g?`url(${g})`:`url(${C})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return w(n.jsx("span",{className:d,style:k}),{"aria-hidden":"true"})}return f==="img"?w(E(C,{onError:k=>{k.currentTarget.onerror=null,k.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):f==="inline"?w(n.jsx("span",{className:m,dangerouslySetInnerHTML:x?{__html:x}: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 E(oo(t),{style:u,onError:k=>{k.currentTarget.onerror=null,k.currentTarget.style.display="none"}});const v=typeof c=="number"?c:20,N=`<svg width="${v}" height="${v}" 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:N}}),{"aria-hidden":"true"})}function si(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 yy({icon:e,title:t,message:a,action:r,className:s}){const{pending:l,press:i}=si(r?.onClick);return n.jsxs("div",{className:De("empty-state",s),children:[e&&n.jsx(lt,{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(lt,{icon:r.icon,className:"button__icon"}),n.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function vy({message:e,hint:t,icon:a="triangle-alert",onRetry:r,retryLabel:s,className:l}){const{t:i}=ke.useTranslation(),{pending:u,press:c}=si(r);return n.jsxs("div",{className:De("empty-state","error-state",l),role:"alert",children:[n.jsx(lt,{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(lt,{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 _y({icon:e,title:t,description:a,cta:r,tone:s="main",disabled:l=!1,onClick:i,className:u=""}){const c=o.useId(),p=`${c}-title`,h=`${c}-desc`,d=`${c}-cta`,m=()=>{l||i?.()};return n.jsx("section",{role:"button",tabIndex:l?-1:0,"aria-disabled":l||void 0,"aria-labelledby":p,"aria-describedby":`${h} ${d}`,onClick:m,onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),m())},className:De("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(lt,{icon:e,size:34})}),n.jsxs("div",{className:"action-card__text",children:[n.jsx("h2",{id:p,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:d,children:r}),n.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:n.jsx(lt,{icon:"arrow-right",size:18})})]})]})})}function xy({as:e="div",className:t="",children:a,storage:r,...s}){r&&U1({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=De("ihabdevteam-core-scope",t);return n.jsx(e,{className:l,...s,children:a})}function wy(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 vo(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(Dn)).filter(wy);if(!l.length){s.preventDefault();return}const i=l[0],u=l[l.length-1],c=document.activeElement,p=c===a;s.shiftKey&&(c===i||p)?(s.preventDefault(),u.focus()):!s.shiftKey&&c===u&&(s.preventDefault(),i.focus())};return a.addEventListener("keydown",r),()=>a.removeEventListener("keydown",r)},[e,t])}const Dn='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',_o=new WeakMap;function xo(e,t){e&&_o.set(e,t)}function wo(e){let t=e;for(let a=0;t&&!t.isConnected&&a<10;a++){let r=t;for(;r&&!_o.has(r);)r=r.parentElement;if(!r)return t;t=_o.get(r)??null}return t}function li(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 fr(e,t,a){const r=e?.isConnected?e:a?.isConnected?a:null;if(li(t)&&!(e&&e.contains(t)))return t.focus(),t;if(!r)return null;const s=Array.from(document.querySelectorAll(Dn)).filter(c=>!(e&&e.contains(c))&&li(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}=ke.useTranslation(),[c,p]=o.useState(!1),h=o.useRef(null),d=o.useCallback(()=>{const C=h.current;C&&C.contains(document.activeElement)&&fr(C),p(!0)},[]);if(c)return null;const m=`notice-box notice-box--${s} body-2 ${i}`.trim(),b=l&&n.jsx("button",{type:"button",className:"notice-box__dismiss",onClick:d,"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((x,g)=>n.jsx("span",{className:"notice-box__line body-3",children:x},g))}):C.children??null})]},f)),b]});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,b]})}const ky={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function ga(e){const{t}=ke.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)),p=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:p,"aria-label":i,children:n.jsx("div",{className:"loader-bar__inner",style:c?void 0:{width:`${p}%`}})})}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:ky,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 ya=[];let br=!1;function ii(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const t=ya[ya.length-1];t&&(e.stopPropagation(),t())}function ea(e){return ya.push(e),!br&&typeof document<"u"&&(document.addEventListener("keydown",ii),br=!0),()=>{const t=ya.lastIndexOf(e);t>=0&&ya.splice(t,1),ya.length===0&&br&&typeof document<"u"&&(document.removeEventListener("keydown",ii),br=!1)}}const ui=o.createContext(null);function Ay(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const ci=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function Ny(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 Os.useSyncExternalStore(t,()=>ci(e),()=>!1)}function Ey(e){const[t,a]=o.useState(ci(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 Dy=typeof Os.useSyncExternalStore=="function"?Ny:Ey;function vn(e){const t=o.useContext(ui),a=Dy(e);return t&&typeof t.mobile=="boolean"&&Ay(e)?t.mobile:a}const Sy="(prefers-reduced-motion: reduce)";function Bo(){return vn(Sy)}const di={"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"};function jy(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 Ty(e){return jy(di,e)}function ue(e){if(!e||Object.keys(di).length===0)return e;const t=[];for(const a of e.split(/\s+/)){if(!a)continue;const r=Ty(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:p="",children:h,backdrop:d=!1,isMobilePopup:m=!1,useBorder:b=!0,header:y,focusOnOpen:C}=e||{},f=o.useRef(null),[x,g]=o.useState({position:"fixed",left:0,top:-9999}),[w,_]=o.useState(!1),[E,v]=o.useState("bottom"),[N,k]=o.useState(!1),[D,A]=o.useState(!1),B=!t&&!a,F=o.useRef(null),L=o.useCallback((R=!1,J=!1)=>{if(D&&m)return;const ne=a?a.getBoundingClientRect():t,S=J&&F.current?F.current:ne;if(!S||!f.current)return;const $=f.current,{offsetWidth:I,offsetHeight:P}=$,V=window.innerWidth,ie=window.innerHeight,U=V-S.right,ce=S.left,Z=S.top,H=ie-S.bottom;let te=0,W=0,z="top";if(Z>=P+r)z="top",W=S.top-r-P,te=S.left+S.width/2-I/2;else if(H>=P+r)z="bottom",W=S.bottom+r,te=S.left+S.width/2-I/2;else if(U>=I+r)z="right",te=S.right+r,W=S.top+S.height/2-P/2;else if(ce>=I+r)z="left",te=S.left-r-I,W=S.top+S.height/2-P/2;else{const le=Math.max(Z,H,U,ce);le===Z?(z="top",W=S.top-r-P,te=S.left+S.width/2-I/2):le===H?(z="bottom",W=S.bottom+r,te=S.left+S.width/2-I/2):le===U?(z="right",te=S.right+r,W=S.top+S.height/2-P/2):(z="left",te=S.left-r-I,W=S.top+S.height/2-P/2)}const ae=Number.isFinite(Number(s))?Number(s):8;te=Math.min(Math.max(te,ae),V-I-ae),W=Math.min(Math.max(W,ae),ie-P-ae);const ve=Math.round(te),me=Math.round(W);R&&f.current?(f.current.style.left=`${ve}px`,f.current.style.top=`${me}px`,f.current.dataset.placement=z):(v(z||E),g({position:"fixed",left:ve,top:me}),k(!0))},[D,m,a,t,r,s,E]);o.useEffect(()=>()=>{F.current=null},[a,t]),o.useLayoutEffect(()=>{if(B)return;if(D&&m){g({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),k(!0);return}F.current===null&&(F.current=a?a.getBoundingClientRect():t??null),L(!1,!0);const R=requestAnimationFrame(()=>L(!1,!0));return()=>cancelAnimationFrame(R)},[t,a,r,h,s,B,D,m,L]),o.useEffect(()=>{if(B||D&&m||!f.current||typeof ResizeObserver>"u")return;const R=new ResizeObserver(()=>{t&&L()});return R.observe(f.current),()=>R.disconnect()},[t,h,s,B,D,m,L]),o.useEffect(()=>{if(B||D&&m)return;let R=null;const J=()=>{if(a&&(F.current=a.getBoundingClientRect()),typeof requestAnimationFrame>"u"){L(!0);return}R===null&&(R=requestAnimationFrame(()=>{R=null,L(!0)}))},ne=S=>{if(!a&&l){const $=S.target;if($&&f.current&&f.current.contains($))return;try{if($&&$.closest&&$.closest("[data-tooltip-ignore]"))return}catch{}G.current(!0);return}J()};return window.addEventListener("resize",J),document.addEventListener("scroll",ne,{passive:!0,capture:!0}),()=>{R!==null&&cancelAnimationFrame(R),window.removeEventListener("resize",J),document.removeEventListener("scroll",ne,{capture:!0})}},[t,a,l,r,h,s,B,D,m,L]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const R=window.matchMedia("(max-width: 768px)"),J=()=>A(!!R.matches);J();try{R.addEventListener?R.addEventListener("change",J):R.addListener(J)}catch{try{R.addListener(J)}catch{}}return()=>{try{R.removeEventListener?R.removeEventListener("change",J):R.removeListener(J)}catch{}}},[]);const q=o.useRef(!1),M=o.useRef(null),O=Bo(),T=o.useCallback((R=!1)=>{if(l&&!(w||q.current)){if(q.current=!0,R){_(!0);try{l&&l()}catch{q.current=!1,_(!1)}return}_(!0),M.current=setTimeout(()=>{M.current=null;try{l&&l()}catch{q.current=!1,_(!1)}},O?0:200)}},[w,l,_,O]);o.useEffect(()=>()=>{M.current&&clearTimeout(M.current)},[]),o.useEffect(()=>{if(B)return;const R=S=>{const $=f.current;if(!$)return;const I=S.target;if(I&&!$.contains(I)){try{if(I.closest&&I.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},J=S=>{const $=f.current;if(!$)return;const I=S.target;if(I&&!$.contains(I)){try{if(I.closest&&I.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},ne=S=>{if(S.key==="Tab"){const $=f.current;if(!$)return;const I=$.querySelectorAll(Dn);if(!I||I.length===0)return;const P=I[0],V=I[I.length-1],ie=document.activeElement;S.shiftKey?ie===P&&(S.preventDefault(),V.focus()):ie===V&&(S.preventDefault(),P.focus())}};return document.addEventListener("pointerdown",R,!0),document.addEventListener("click",J,!0),document.addEventListener("keydown",ne),()=>{document.removeEventListener("pointerdown",R,!0),document.removeEventListener("click",J,!0),document.removeEventListener("keydown",ne)}},[l,i,T,B]);const G=o.useRef(T);o.useEffect(()=>{G.current=T});const K=!!l;o.useEffect(()=>{if(!(B||!K))return ea(()=>G.current())},[B,K]),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 ee=o.useRef(null);o.useEffect(()=>{if(B||C===!1||!N)return;const R=f.current;if(!R)return;const J=R.querySelector(Dn);if(J)return ee.current=document.activeElement,J.focus({preventScroll:!0}),()=>{const ne=ee.current;ee.current=null,ne&&document.contains(ne)&&ne.focus({preventScroll:!0})}},[B,C,N]),o.useEffect(()=>{c==="dialog"&&!p&&Dt("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,p]);const re=n.jsxs("div",{ref:f,className:ue(`tooltip__content ${B?"tooltip__content--inline":""} ${b?"tooltip__content--bordered":""} ${w?"is-closing":""} ${u} ${D&&m?"is-mobile":""}`),role:c,"aria-label":p||void 0,style:B?{}:{...x,visibility:N?"visible":"hidden"},tabIndex:-1,"data-placement":E,"data-left":B?"":x.left,"data-top":B?"":x.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:ue("tooltip__header h5"),children:y}),h]});if(B||typeof document>"u")return re;if(d||D&&m){const R=n.jsxs("div",{className:ue("tooltip__portal"),children:[n.jsx("div",{className:ue("tooltip__backdrop"),onClick:()=>{i&&T(!0)}}),re]});return hn.createPortal(R,document.body)}return hn.createPortal(re,document.body)}function Ln(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:ue(`info-tooltip ${l}`),ariaLabel:i||a,children:n.jsx("div",{className:ue("info-tooltip__content body-3"),children:a})}):null}function Un(e){const{t}=ke.useTranslation(),{anchorRect:a,title:r,items:s,activeIndex:l=-1,showIndex:i=!0,onClose:u,offset:c=12,closeOnOutsideClick:p=!0,columns:h}=e||{},d=(Array.isArray(s)?s:s?[s]:[]).map(m=>typeof m=="string"?{text:m}:m);return!d.length&&!r?null:n.jsx(Bn,{anchorRect:a,offset:c,onClose:u,closeOnOutsideClick:p,useBorder:!1,className:ue("description-tooltip"),ariaLabel:r||t("tooltip.description","\uC124\uBA85"),children:n.jsxs("div",{className:ue("description-tooltip__box"),children:[r&&n.jsx("span",{className:ue("description-tooltip__title body-2"),children:r}),n.jsx("ol",{className:ue(`description-tooltip__items${h&&h>1?" description-tooltip__items--columns":""}`),style:h&&h>1?{columnCount:h}:void 0,children:d.map((m,b)=>n.jsxs("li",{className:ue(`description-tooltip__item body-3${b===l?" description-tooltip__item--active":""}`),children:[i&&d.length>1&&n.jsxs("span",{className:ue("description-tooltip__index button-1"),children:[b+1,"."]}),m.color&&n.jsx("span",{className:ue("description-tooltip__dot"),style:{background:m.color},"aria-hidden":"true"}),n.jsx("span",{children:m.text})]},b))})]})})}function Ha(e){const t=o.useRef(e);return o.useEffect(()=>{t.current=e}),t}let ko=0,pi=!1;function hi(){pi||typeof document>"u"||(pi=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(ko=Date.now())},!0),document.addEventListener("touchstart",()=>{ko=Date.now()},{capture:!0,passive:!0}))}hi();function Gn(e){return!!e&&e.pointerType==="touch"}function ta(e=1e3){return hi(),Date.now()-ko<e}function gr(e,t,a,{enabled:r=!0,fallbackOnParent:s=!1}={}){const l=Ha(e),i=Ha(t),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!r||typeof document>"u")return;const h=d=>{const m=d,b=d.target,y=a.current,C=!!(b&&y&&y.contains(b));if(m.pointerType!=="touch"){C&&(u.current=null);return}if(C){u.current=l.current;return}u.current=null,l.current&&!(b&&b.closest?.(".tooltip__content"))&&i.current(!1,y)};return document.addEventListener("pointerdown",h,!0),()=>document.removeEventListener("pointerdown",h,!0)},[r,a,l,i]);const p=o.useCallback(h=>{const d=u.current;return d===null?!1:(u.current=null,c.current=Date.now(),i.current(!d,h??a.current),!0)},[a,i]);return o.useEffect(()=>{if(!r||!s)return;const h=a.current,d=h?.parentElement;if(!h||!d)return;let m=null;const b=f=>{const x=f.changedTouches?.[0];if(!x)return!1;const g=h.getBoundingClientRect();return x.clientX>=g.left&&x.clientX<=g.right&&x.clientY>=g.top&&x.clientY<=g.bottom},y=f=>{m=b(f)?l.current:null},C=f=>{const x=m;m=null,!(x===null||Date.now()-c.current<700||!b(f))&&(u.current=null,c.current=Date.now(),i.current(!x,h))};return d.addEventListener("touchstart",y,{passive:!0}),d.addEventListener("touchend",C),()=>{d.removeEventListener("touchstart",y),d.removeEventListener("touchend",C)}},[r,s,a,l,i]),{touchPress:p}}function My(e,t){const{size:a=48,type:r,htmlType:s,href:l,target:i,rel:u,icon:c,rightIcon:p,label:h,count:d,subLabel:m,children:b,ariaLabel:y,variant:C="default",align:f="center",nowrap:x=!1,selected:g,toggleable:w=!1,ariaExpanded:_,ariaControls:E,disabled:v=!1,loading:N=!1,useLabel:k=!0,useBorder:D=!0,useBG:A=!0,useDisabledCovered:B=!1,useDisabledInvisible:F=!1,useDisabledFilled:L=!1,width:q,minWidth:M,onClick:O,onDisabledClick:T,showTooltipInfo:G=!1,tooltipInfoText:K=null,tooltipDescription:ee=null,tooltipOnly:re=!1,iconSize:R="medium",iconColor:J,shape:ne="rounded",color:S,className:$,...I}=e,P=typeof a=="string"&&isNaN(Number(a))?a.toLowerCase():String(Number(a)||48),V=P.match(/^\d+$/)?`button${P}`:`button-${P}`,ie=Number(a),U=!isNaN(ie)&&ie<40?"button-2":"button-1",ce=h??b,Z=v||!!I.disabled,H=Z?B?"disabled-covered":F?"disabled-invisibled":L?"disabled-filled":"disabled":C,te=H?`button--variant-${H}`:"",W=f?`button--align-${f}`:"",z=x?"button--nowrap":"",ae=ne?`button--shape-${ne}`:"",ve=typeof J=="string"&&J.startsWith("--")?`var(${J})`:J,me={...q?{width:typeof q=="number"?`${q}px`:q}:{},...M?{minWidth:typeof M=="number"?`${M}px`:M}:{},...D?{}:{"--button-border":Z?"0":"1px solid transparent"},...ve?{"--button-icon-color":ve}:{},...S?{"--color-main":S}:{}},le=k===!1?"":ce,Be=Array.isArray(le)?le.length>0:!!le,Pe=!!p,Fe=r??(Be||c||Pe?"bar":"dot"),Ae=`${V}--${Fe}`,se=o.useRef(null);o.useEffect(()=>{!Wn||s!==void 0||se.current?.closest("form")&&Dt(`button-in-form:${typeof ce=="string"?ce:""}`,'[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 ce=="string"&&ce?` \uB2E8\uCD94: ${ce}`:""))},[s,ce]);const ye=o.useRef(t);ye.current=t;const Ce=o.useCallback(Me=>{se.current=Me;const tt=ye.current;typeof tt=="function"?tt(Me):tt&&(tt.current=Me)},[]),xe=o.useRef(Z),[$e,nt]=o.useState(!!g),[ct,at]=o.useState(!1),[rt,Ee]=o.useState(null),Ue=o.useCallback(()=>at(!1),[]),[Ne,Ye]=o.useState(!1),et=o.useId();o.useEffect(()=>{typeof g=="boolean"&&nt(g)},[g]),o.useEffect(()=>{if(xe.current&&!Z&&se.current){const Me=se.current;let tt=!1;try{tt=Me.matches(":focus:not(:focus-visible)")}catch{tt=!1}tt&&Me.blur(),Me.style.pointerEvents="none";const Ft=requestAnimationFrame(()=>{requestAnimationFrame(()=>{se.current&&(se.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(Ft)}xe.current=Z},[Z]);const ft=typeof g=="boolean"?!!g:$e,vt=typeof _=="boolean"?void 0:w||typeof g=="boolean"?ft?"true":"false":I["aria-pressed"],dt=De("button",V,Ae,te,W,z,ae,ft?"is-selected":null,A?null:"button--no-bg",re?"button--tooltip-only":null,$),jt=`button__icon button__icon--${R}`,ot=Array.isArray(m)?m:m!==void 0?[m]:[],st=()=>{if(Array.isArray(le))return le.map((tt,Ft)=>{const _t=ot[Ft];return n.jsxs("span",{className:`button__label-text${_t!==void 0?" button__label-text--has-sub":""}`,children:[tt,_t!==void 0&&n.jsx("span",{className:"button__sub-label-text caption-1",children:_t})]},Ft)});const Me=m!==void 0;return n.jsxs("span",{className:`button__label-text${Me?" button__label-text--has-sub":""}`,children:[le,d!=null&&n.jsx("span",{className:"button__count",children:d}),Me&&n.jsx("span",{className:"button__sub-label-text caption-1",children:m})]})},At=Me=>{typeof g!="boolean"&&!w&&nt(!1),Me.currentTarget.blur()},Nt=Me=>{Z||(typeof I.onMouseLeave=="function"&&I.onMouseLeave(Me),At(Me))},Ot=Me=>{if(re&&it&&bt.touchPress(Me.currentTarget),Z){it&&bt.touchPress(Me.currentTarget),Me.preventDefault(),T?.(Me);return}typeof g!="boolean"&&w&&nt(tt=>!tt),O?.(Me)},Wt=o.useCallback(()=>{(G||ee)&&(at(!0),Ee(se.current?.getBoundingClientRect()??null))},[G,ee]),xt=o.useCallback(()=>{(G||ee)&&(at(!1),Ee(null))},[G,ee]),it=!!(G||ee),bt=gr(ct,Me=>{Me?Wt():xt()},se,{enabled:it&&(Z||re),fallbackOnParent:it&&Z}),pt={...I};delete pt.disabled,delete pt.className,delete pt.faded,delete pt.useFaded,delete pt.loading,delete pt.onMouseLeave,delete pt.onPointerEnter,delete pt.onPointerLeave,delete pt.onPointerUp,delete pt.onFocus,delete pt.onBlur,Z&&(Object.keys(pt).forEach(Me=>{/^on[A-Z]/.test(Me)&&typeof pt[Me]=="function"&&delete pt[Me]}),pt["aria-disabled"]="true"),N&&(pt["aria-busy"]="true");const kt=(typeof G=="string"?G:null)??(typeof K=="string"?K:null)??(typeof y=="string"?y:null)??(typeof ce=="string"?ce:null)??void 0,mt=typeof y=="string"?y:typeof ce=="string"?ce:kt,wt=ee?[ee.title,...ee.items??[]].filter(Boolean).join(". "):G&&kt&&kt!==mt?kt:"",de=[typeof I["aria-describedby"]=="string"?I["aria-describedby"]:void 0,wt?et:null].filter(Boolean).join(" ")||void 0,Le=()=>n.jsx("span",{className:`${jt} button__spinner`,"aria-hidden":"true",children:n.jsx(ga,{variant:"spinner",size:"100%"})}),Se=(Me,tt)=>n.jsx(lt,{icon:Me,label:tt??mt,className:jt,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),Je=Me=>N?Le():Se(c,Me),ht=()=>Fe==="dot"?n.jsxs(n.Fragment,{children:[Je(),Be&&n.jsx("span",{className:`button__label ${U}`,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:Je()}),Be&&n.jsx("span",{className:`button__label ${U}`,children:st()})]}),Pe&&n.jsx("span",{className:"button__right",children:Se(p)})]}):n.jsxs(n.Fragment,{children:[(c||N)&&n.jsx("span",{className:"button__left",children:Je(y??ce)}),Be&&n.jsx("span",{className:`button__label ${U}`,children:st()}),Pe&&n.jsx("span",{className:"button__right",children:Se(p)})]}),Rt=!!l&&!Z;return n.jsxs(n.Fragment,{children:[n.jsxs(Rt?"a":"button",{...pt,ref:Ce,...Rt?{href:l,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:s??"button",disabled:Z&&!T&&!Ne},className:dt,"aria-pressed":vt,"aria-expanded":typeof _=="boolean"?_:I["aria-expanded"],"aria-controls":E??I["aria-controls"],"aria-label":mt,"aria-disabled":Z&&(Rt||T||Ne)?!0:void 0,"aria-describedby":de,style:me,onClick:Ot,onMouseLeave:Nt,onPointerEnter:Me=>{Gn(Me)||Wt(),!Z&&typeof I.onPointerEnter=="function"&&I.onPointerEnter(Me)},onPointerLeave:Me=>{Gn(Me)||xt(),!Z&&typeof I.onPointerLeave=="function"&&I.onPointerLeave(Me)},onPointerUp:Me=>{Z&&it&&bt.touchPress(Me.currentTarget),!Z&&typeof I.onPointerUp=="function"&&I.onPointerUp(Me)},onFocus:Me=>{Ye(!0),ta()||Wt(),!Z&&typeof I.onFocus=="function"&&I.onFocus(Me)},onBlur:Me=>{Ye(!1),Z||At(Me),xt(),!Z&&typeof I.onBlur=="function"&&I.onBlur(Me)},children:[ht(),wt?n.jsx("span",{id:et,hidden:!0,"aria-label":wt}):null]}),ct&&ee?n.jsx(Un,{anchorRect:rt,title:ee.title,items:ee.items,onClose:Ue}):ct&&kt?n.jsx(Ln,{anchorRect:rt,text:kt,onClose:Ue}):null]})}const be=o.forwardRef(My);be.displayName="Button";function It(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 Va={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},Ao=new WeakMap;function No(e){if(e)return Ao.get(e)}function nn(e,t){e&&(e.style.setProperty(Va.title,t.title),e.style.setProperty(Va.description,t.description),Ao.set(e,t))}function an(e){e&&(e.style.removeProperty(Va.title),e.style.removeProperty(Va.description),Ao.delete(e))}const mi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function Ci(){const e=It(mi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const fi={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function bi(){const e=It(fi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const gi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function yi(){const e=It(gi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const vi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function _i(){const e=It(vi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const xi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function wi(){const e=It(xi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const Bi={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function ki(){const e=It(Bi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const Ai={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function Ni(){const e=It(Ai,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const Ei={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Di(){const e=It(Ei,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const Si={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function ji(){const e=It(Si,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const Ti={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function Mi(){const e=It(Ti,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const Li={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function $i(){const e=It(Li,nn,an);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 Ri={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Pi(){const e=It(Ri,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const Fi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function Ii(){const e=It(Fi,nn,an);return n.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const Oi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function zi(){const e=It(Oi,nn,an);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 Zt.t(`promoBannerBg.${e}`,t)},textTone:a}),Ly=[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")],Wi={main:Ci,soft:bi,sub:yi,deep:_i,softSub:wi,warm:ki,dark:Ni,radial:Di,diagonal:ji,dots:Mi,outline:$i,success:Pi,naver:Ii,instagram:zi};function Hi({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 _=localStorage.getItem(w),E=_?Number(_):1;return Number.isFinite(E)?i(E):i(1)}catch{return i(1)}},[c,p]=o.useState(()=>u(e)),[h,d]=o.useState(e);h!==e&&(d(e),p(u(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(c))}catch{}},[e,c]);const m=w=>{p(typeof w=="function"?_=>i(w(_)):i(w))},b=()=>m(w=>+(w+s).toFixed(6)),y=()=>m(w=>+(w-s).toFixed(6)),C=c<r-Number.EPSILON,f=c>a+Number.EPSILON,x=Math.round(t*c),g=Math.round(x*l);return{scale:c,setScale:m,increase:b,decrease:y,canIncrease:C,canDecrease:f,fontSize:x,lineHeight:g}}function Vi(e,t){const a=Ha(t);o.useEffect(()=>{const r=()=>a.current();try{window.addEventListener(e,r)}catch{}return()=>{try{window.removeEventListener(e,r)}catch{}}},[e,a])}const Eo=" \xB7 ",qi=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(Eo)?e.split(Eo).pop()??e:e})(),$y=o.createContext(!1),na=[];let Ui=null;function Ry(e){const t=o.useContext($y);o.useEffect(()=>{if(t||typeof e!="string"||!e)return;na.length===0&&(Ui=document.title);const a={text:qi?`${e}${Eo}${qi}`:e};return na.push(a),document.title=a.text,()=>{const r=na.lastIndexOf(a);r>=0&&na.splice(r,1),document.title=na.length?na[na.length-1].text:Ui??document.title}},[e,t])}const Do=[{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"}],Py=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function fn(e,t){return Py().compare(e,t)}const yr=new Map;function Fy(e){const t=yr.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)),yr.size>5e3&&yr.clear(),yr.set(e,a),a}function Iy(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 Oy(e,t){const a=p=>p==null||typeof p=="number"&&Number.isNaN(p)?"":String(p).trim(),r=a(e),s=a(t);if(r===s)return 0;const l=(p,h)=>{if(typeof p=="number"&&!Number.isNaN(p))return[p];const d=Iy(h);return d!==null?[d]:Fy(h)},i=l(e,r),u=l(t,s),c=Math.min(i.length,u.length);for(let p=0;p<c;p++){const h=i[p],d=u[p];if(typeof h=="number"&&typeof d=="number"){if(h!==d)return h-d;continue}if(typeof h=="number")return-1;if(typeof d=="number")return 1;const m=fn(h,d);if(m!==0)return m}return i.length!==u.length?i.length-u.length:fn(r,s)}const Gi=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function vr(e,t,a){const r=Gi(e),s=Gi(t);if(r||s)return r===s?0:r?1:-1;const l=Oy(e,t);return a?l:-l}function zy(e,t,a){const{t:r}=ke.useTranslation(),[s,l]=o.useState(()=>{const y=a?.initialPageSize;return y&&Do.some(C=>C.value===y)?y:"25"}),[i,u]=o.useState(1),[c,p]=o.useState(t);Object.is(c,t)||(p(t),i!==1&&u(1));const h=o.useMemo(()=>Do.map(y=>({...y,label:r("visits.showN",{n:y.value})})),[r]),d=o.useCallback(y=>{Do.some(C=>C.value===y)&&(l(y),u(1))},[]),m=Math.max(1,Math.ceil(e.length/Number(s))),b=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),m);return i!==b&&u(b),{pageRows:o.useMemo(()=>e.slice((b-1)*Number(s),b*Number(s)),[e,b,s]),pageSizeProps:{options:h,value:s,onChange:d},paginationProps:{page:b,total:m,onChange:u},setPage:u}}function Wy(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 p=r.current,h=p?.key===c?{key:c,asc:!p.asc}:{key:c,asc:!0};r.current=h,a(h),s.current?.(h)},[]),i=o.useCallback((c,p)=>({label:c,sortDir:t?.key===p?t.asc?"asc":"desc":null,onClick:()=>l(p)}),[t,l]),u=o.useCallback((c,p)=>{if(!t)return c;const{key:h,asc:d}=t;return[...c].sort((m,b)=>vr(p(m,h),p(b,h),d))},[t]);return{sort:t,field:i,sortRows:u}}const kn="\uC804\uCCB4";Object.fromEntries(Object.entries(bf).map(([e,{nucleus:t}])=>[e,t]));const Hy={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"})},Vy={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"})},qy={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 Uy(e,t){if("place"in t)return Hy[t.place](e);const a=Vy[t.vowel](e);return t.glide?`${a} \xB7 ${qy[t.glide](e)}`:a}const Gy=(e,{defaultValue:t})=>t,Ki=(e,t)=>({jamos:e,phonetic:t,tooltip:Uy(Gy,t)}),$n=(e,t)=>t.map(a=>Ki([a],{place:e})),Xt=(e,t,a)=>Ki([...e],a?{vowel:t,glide:a}:{vowel:t}),So={cho:[$n("labial",["\u3142","\u3143","\u314D","\u3141"]),$n("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),$n("alveolar",["\u3145","\u3146"]),$n("palatal",["\u3148","\u3149","\u314A"]),$n("velar",["\u3131","\u3132","\u314B"]),$n("glottal",["\u314E"])],jung:[[Xt("\u3163","frontHigh"),Xt("\u315F","frontHigh","w"),Xt("\u3162","frontHigh","velar")],[Xt("\u3161","backHighUnrounded")],[Xt("\u315C","backHighRounded"),Xt("\u3160","backHighRounded","j")],[Xt("\u3154\u3150","frontMid"),Xt("\u3156\u3152","frontMid","j"),Xt("\u3159\u315A\u315E","frontMid","w")],[Xt("\u3153","backMidUnrounded"),Xt("\u3155","backMidUnrounded","j"),Xt("\u315D","backMidUnrounded","w")],[Xt("\u3157","backMidRounded"),Xt("\u315B","backMidRounded","j")],[Xt("\u314F","low"),Xt("\u3151","low","j"),Xt("\u3158","low","w")]],jong:[$n("labial",["\u3142","\u3141"]),$n("alveolar",["\u3137","\u3134","\u3139"]),$n("velar",["\u3131","\u3147"])]},Ky=e=>e===Yy?[]:Array.from(e),Yy="__NO_CODA__",jo=e=>e.map(t=>t.map(({jamos:a,phonetic:r,tooltip:s})=>({v:a.join(""),phonetic:r,tooltip:s}))),Yi={cho:jo(So.cho),jung:jo(So.jung),jong:jo(So.jong)};Yi.jung.flat().forEach(({v:e})=>{for(const t of Ky(e));}),new Set(Yi.cho.flat().map(e=>e.v));function Zy(e,t=!0){const a=Ha(e);o.useEffect(()=>{if(t)return ea(()=>{a.current?.()})},[t,a])}function _r(){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 Xy(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,p)=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{a(c),s(p)},e)},[e]),u=o.useCallback(()=>{l.current&&clearTimeout(l.current),a(null),s(null)},[]);return{payload:t,anchorRect:r,openAfterDelay:i,close:u}}function Zi(e="warning"){const[t,a]=o.useState(""),[r,s]=o.useState(e),[l,i]=o.useState(0),u=o.useCallback((d,m)=>{s(m),a(d),i(b=>b+1)},[]),c=o.useCallback(d=>u(d,"warning"),[u]),p=o.useCallback(d=>u(d,"normal"),[u]),h=o.useCallback(()=>a(""),[]);return{toastMessage:t,toastType:r,toastKey:l,showToast:u,showWarning:c,showNormal:p,clearToast:h}}function qa(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 Ua({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),p=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 b=p.current?.offsetHeight??0;b>0&&h();let y=0,C=null;typeof ResizeObserver<"u"&&p.current&&(C=new ResizeObserver(()=>{const N=p.current?.offsetHeight??0;if(N!==b){if(b=N,++y>4){C?.disconnect(),C=null;return}h()}}),C.observe(p.current));const f=N=>{const k=N.target;r&&k.closest?.(r)||c.current?.contains(k)||p.current?.contains(k)||l(!1)};document.addEventListener("mousedown",f),document.addEventListener("pointerdown",f);let x=null;const g=()=>{if(typeof requestAnimationFrame>"u"){h();return}x===null&&(x=requestAnimationFrame(()=>{x=null,h()}))},w=N=>{p.current?.contains(N.target)||(t==="reposition"?g():t==="close"&&l(!1))};t!=="ignore"&&window.addEventListener("scroll",w,!0);const _=()=>{a==="reposition"?g():a==="close"&&l(!1)};let E=null;const v=()=>{_(),E&&clearTimeout(E),E=setTimeout(()=>{E=null,a==="reposition"&&h()},250)};return a!=="ignore"&&(window.addEventListener("resize",_),window.addEventListener("orientationchange",v)),()=>{x!==null&&cancelAnimationFrame(x),C?.disconnect(),document.removeEventListener("mousedown",f),document.removeEventListener("pointerdown",f),t!=="ignore"&&window.removeEventListener("scroll",w,!0),a!=="ignore"&&(window.removeEventListener("resize",_),window.removeEventListener("orientationchange",v)),E&&clearTimeout(E)}},[s,h,t,a,r]),o.useEffect(()=>{if(s)return ea(()=>l(!1))},[s]);const d=o.useCallback(()=>l(b=>!b),[]),m=o.useCallback(()=>l(!1),[]);return{open:s,setOpen:l,toggle:d,close:m,style:i,triggerRef:c,menuRef:p}}function Jy(e,{mode:t="playback",autoStart:a=!1,onPlaySpeaker:r,onComplete:s,playMs:l=1100,feedbackMs:i=1500}={}){const[u,c]=o.useState([]),[p,h]=o.useState(0),[d,m]=o.useState("idle"),[b,y]=o.useState(null),[C,f]=o.useState([]),[x,g]=o.useState(null),[w,_]=o.useState(0),E=o.useRef(0),v=o.useCallback(R=>{E.current=typeof R=="function"?R(E.current):R,_(E.current)},[]),N=o.useRef(r),k=o.useRef(s);o.useEffect(()=>{N.current=r,k.current=s},[r,s]);const D=o.useRef([]),A=()=>{D.current.forEach(clearTimeout),D.current=[]},B=(R,J)=>{D.current.push(setTimeout(J,R))};o.useEffect(()=>()=>A(),[]);const F=u[p]?.id??null,L=o.useRef(null),q=o.useCallback(()=>{A(),m("playing"),f([]),g(null),v(0);let R=0;e.forEach((J,ne)=>{B(R,()=>{h(ne),y(J.id),N.current?.(J)}),B(R+1e3,()=>{y(null),f(S=>[...S,J.id])}),R+=1300}),B(R,()=>{m("done"),k.current?.({score:0,total:e.length})})},[e,v]),M=o.useCallback((R,J)=>{if(J>=R.length){m("done"),k.current?.({score:E.current,total:R.length});return}L.current=null,h(J),g(null),m("playing"),y(R[J].id),N.current?.(R[J]),B(l,()=>{y(null),m("waiting")})},[l]),O=o.useCallback(()=>{A();const R=Oa(e);c(R),v(0),f([]),M(R,0)},[e,M,v]),T=o.useCallback(()=>{t==="playback"?(c(e),q()):O()},[t,e,q,O]),G=o.useCallback(()=>{A(),m("idle"),y(null),f([]),g(null),h(0),v(0),c([])},[v]),K=JSON.stringify(e.map(R=>[R.id,R.label,R.angleDeg,R.deg,R.row,R.shortcut]));o.useEffect(()=>(a?T():G(),()=>A()),[t,K,a]);const ee=o.useCallback(R=>{d!=="waiting"||t==="playback"||L.current===p||(L.current=p,g(R),R===u[p]?.id&&v(J=>J+1),t==="exam"?(m("playing"),B(400,()=>M(u,p+1))):(m("feedback"),B(i,()=>M(u,p+1))))},[d,t,u,p,M,i,v]),re=t==="playback"?e.length:u.length;return{bind:{activeSpeakerId:b,playedIds:C,selectedId:x,answerId:F,showFeedback:d==="feedback",clickable:d==="waiting",onSelectSpeaker:ee},index:p,total:re,score:w,phase:d,done:d==="done",start:T,reset:G}}const To=new Map,Mo=new Map,Qy=()=>()=>{},e2=()=>!0,t2=()=>!1;function Xi(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 n2(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)};ma.addHook("uponSanitizeAttribute",t);try{return ma.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{ma.removeHook("uponSanitizeAttribute",t)}}function a2(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"),(p,h)=>`url(${h}#${c}${h})`).replace(new RegExp(`((?:xlink:)?href)="#${u}"`,"g"),`$1="#${c}"`)}return l}function r2(e){const t=Mo.get(e);if(t)return t;const a=fetch(e).then(r=>r.ok?r.text():null).then(r=>(r!=null&&To.set(e,r),r)).catch(()=>null).finally(()=>{Mo.delete(e)});return Mo.set(e,a),a}function o2(e,t=!0){const a=o.useSyncExternalStore(Qy,e2,t2)&&t&&e?Xi(e)??To.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=Xi(e)??To.get(e)??null;if(l!==null){s({src:e,enabled:t,svg:l});return}let i=!0;return r2(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 s2({title:e,description:t,actionLabel:a,onAction:r,bg:s,color:l,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:p,className:h=""}){const d=s??l??"main",m=o.useRef(null),[b,y]=o.useState("main"),C=vn("(max-width: 767px)"),f=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const w=m.current;if(!w)return;const _=No(w),E=(v,N,k)=>{if(k!==void 0)w.style.setProperty(N,k),f.current[v]=!0;else if(f.current[v]){const D=_?.[v];D?w.style.setProperty(N,D):w.style.removeProperty(N),f.current[v]=!1}};E("title","--promo-banner-bg-title",c),E("description","--promo-banner-bg-description",p)},[c,p,d]),o.useLayoutEffect(()=>{const w=m.current;if(!w)return;const _=No(w);y(_?.actionVariant??"main")},[d]);const x=De("promo-banner",`promo-banner--${i}`,h),g=Wi[d];return n.jsxs("div",{ref:m,className:x,role:"note",children:[n.jsx(g,{}),n.jsxs("div",{className:"promo-banner__text",children:[n.jsx("span",{className:`promo-banner__title ${i==="small"?"body-2":"h2"}`,children:e}),t&&n.jsx("span",{className:"promo-banner__description body-3",children:t})]}),a&&r&&n.jsx(be,{htmlType:"button",size:40,variant:u??b,shape:"pill",useBorder:!0,onClick:r,ariaLabel:a,...C?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:a,minWidth:140}})]})}function l2({children:e,interval:t=5e3,dotTone:a,className:r="","aria-label":s}){const{t:l}=ke.useTranslation(),i=s??l("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[p,h]=o.useState(0),[d,m]=o.useState(!1),[b,y]=o.useState(!1),[C,f]=o.useState(!1),x=o.useRef(null),g=o.useRef(null),w=o.useRef(null),_=Bo(),E=d||b||C,v=c>0?Math.min(p,c-1):0;o.useEffect(()=>{if(c<2||t<=0||E||_)return;const k=window.setInterval(()=>h(D=>(Math.min(D,c-1)+1)%c),t);return()=>window.clearInterval(k)},[c,t,E,_]);const N=k=>{g.current!=null&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{g.current=null,f(!1)},k)};return o.useEffect(()=>()=>{g.current!=null&&window.clearTimeout(g.current)},[]),o.useEffect(()=>{if(!C)return;const k=D=>{D.pointerType==="touch"&&(w.current&&w.current.contains(D.target)||(g.current!=null&&(window.clearTimeout(g.current),g.current=null),f(!1)))};return document.addEventListener("pointerdown",k,!0),()=>document.removeEventListener("pointerdown",k,!0)},[C]),c===0?null:n.jsxs("section",{ref:w,className:De("top-banner",r),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:k=>{x.current=k.pointerType},onPointerDown:k=>{x.current=k.pointerType,k.pointerType==="touch"&&(g.current!=null&&(window.clearTimeout(g.current),g.current=null),f(!0))},onPointerUp:k=>{k.pointerType==="touch"&&N(5e3)},onPointerCancel:k=>{k.pointerType==="touch"&&N(5e3)},onMouseEnter:()=>{x.current!=="touch"&&m(!0)},onMouseLeave:()=>m(!1),onFocus:k=>{let D=!0;try{D=k.target.matches(":focus-visible")}catch{D=!0}y(D)},onBlur:k=>{k.currentTarget.contains(k.relatedTarget)||y(!1)},children:[n.jsx("div",{className:"top-banner__viewport",children:n.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${v*100}%)`},children:u.map((k,D)=>n.jsx("div",{className:"top-banner__slide","aria-hidden":D!==v,...D!==v?{inert:!0}:{},children:k},D))})}),c>1&&n.jsx("div",{className:`top-banner__dots${(a?.[v]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((k,D)=>n.jsx("button",{type:"button",className:`top-banner__dot${D===v?" 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===v,onClick:()=>h(D)},D))})]})}function i2({title:e,body:t,open:a=!1,onToggle:r,avatar:s,titleClassName:l="body-2",bodyClassName:i="body-2",className:u=""}){const{t:c}=ke.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:p=>{if(p.key==="Enter"||p.key===" ")p.preventDefault(),r?.();else if(p.key==="ArrowDown"||p.key==="ArrowUp"){p.preventDefault();const h=p.currentTarget.closest('[role="list"]');if(!h)return;const d=Array.from(h.querySelectorAll("[data-accordion-header]")),m=d.indexOf(p.currentTarget);(p.key==="ArrowDown"?d[m+1]:d[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(lt,{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 u2({items:e=[],defaultOpenIndex:t=0,size:a=72,className:r="",bodyClassName:s}){const[l,i]=o.useState({index:t}),u=(c,p)=>l.id!=null&&c.id!=null?c.id===l.id:l.id==null&&p===l.index;return n.jsx("div",{className:`accordion-group accordion-group--s${a} ${r}`.trim(),role:"list",children:e.map((c,p)=>n.jsx(i2,{title:c.title,body:c.body,avatar:c.avatar,open:u(c,p),onToggle:()=>i(u(c,p)?{index:-1}:{index:p,id:c.id}),bodyClassName:s},c.id??p))})}function c2(){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 d2(){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 p2(){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 Sn({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:p=""}){const{t:h}=ke.useTranslation(),d=t??"check",m=a!==void 0,b=e!==void 0||m?"number":d,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")}[d],C=c?void 0:u??y;return n.jsxs("span",{className:De("circle-badge",`circle-badge--${b}`,`circle-badge--${s}`,`circle-badge--${r}`,l?"circle-badge--animate":"",i?"circle-badge--clickable":"",p),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&&d==="check"&&n.jsx(c2,{}),e===void 0&&!m&&d==="remove"&&n.jsx(d2,{}),e===void 0&&!m&&d==="minus"&&n.jsx(p2,{})]})}function Ga({columns:e=[],onClose:t,className:a="",size:r="medium"}){const{t:s}=ke.useTranslation(),l=r==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const f=[{title:null,columns:e}];let x=e;for(const g of i){const w=x?.[g.ci]?.items?.[g.ii];if(!w||!Array.isArray(w.children)||!w.children.length)break;x=[{title:null,items:w.children}],f.push({title:w.label||null,columns:x})}return f},[e,i]),p=c[c.length-1],h=c.length-1,d=o.useCallback(()=>u(f=>f.slice(0,Math.max(0,Math.min(f.length,h)-1))),[h]),m=o.useRef(null),b=o.useRef(null),y=c.length;o.useEffect(()=>{b.current||(b.current=document.activeElement);let f=0,x=0;const g=()=>{const w=m.current?.querySelector("button:not([disabled])");if(w&&w.offsetParent){w.focus({preventScroll:!0});return}x++<20&&(f=requestAnimationFrame(g))};return f=requestAnimationFrame(g),()=>cancelAnimationFrame(f)},[y]),o.useEffect(()=>()=>{b.current?.focus?.({preventScroll:!0})},[]);const C=o.useCallback((f,x,g)=>{if(f){if(Array.isArray(f.children)&&f.children.length){u(w=>[...w.slice(0,h),{ci:x,ii:g}]);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:ue(`menu-tooltip menu-tooltip--${r} ${a}`),children:[(c.length>1||p.title)&&n.jsxs("div",{className:ue("menu-tooltip__header"),children:[c.length>1?n.jsx(be,{htmlType:"button",size:l,type:"dot",icon:"chevron-left",ariaLabel:s("common.back","\uB4A4\uB85C"),onClick:d,variant:"transparent-gray",useBorder:!1}):null,n.jsx("div",{className:ue("menu-tooltip__title button-1"),children:p.title})]}),n.jsx("div",{className:ue("menu-tooltip__columns"),ref:m,children:p.columns&&p.columns.map((f,x)=>{const g=(f.items||[]).some(w=>!!w.icon||w.selected!==void 0);return n.jsxs("div",{className:ue("menu-tooltip__column"),children:[f.title?n.jsx("div",{className:ue("menu-tooltip__column-title body-3"),children:f.title}):null,n.jsx("div",{className:ue("menu-tooltip__items"),children:(f.items||[]).map((w,_)=>n.jsxs(o.Fragment,{children:[w.separatorBefore&&_>0&&n.jsx("div",{className:ue("menu-tooltip__separator"),role:"separator"}),n.jsx(be,{htmlType:"button",className:ue("menu-tooltip__item"),size:l,type:w.label?"bar":"dot",icon:w.selected?"check":w.icon||(g||!w.label?"none":void 0),rightIcon:Array.isArray(w.children)&&w.children.length?"chevron-right":w.badgeCount?n.jsx(Sn,{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,x,_),selected:w.selected,disabled:w.disabled,showTooltipInfo:w.tooltip||!1,useBorder:!1,align:"left"})]},_))})]},x)})})]})}const Ji=".content-area";function Lo(e,t="Nav"){try{const a=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(Ji);if(a){a.scrollTop=0;return}const r=document.scrollingElement??document.documentElement;r&&r.scrollHeight<=r.clientHeight&&Dt("nav-scroll-container",`[${t}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${Ji}) \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 $o=52,xr=10,Qi=e=>e&&e>0?e:0;function eu({items:e=[],activeKey:t,onChange:a,appMode:r,onAppModeChange:s,moreItems:l=[],scrollContainer:i}){const{t:u}=ke.useTranslation(),c=r==="manager"?"malgwi":"manager",p=r==="manager"?"arrow-left":"arrow-right",h=r==="manager"?u("nav.modeLabelMalgwi","\uB9D0\uADC0"):u("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),d=o.useRef(null),[m,b]=o.useState(0),y=e.length;o.useEffect(()=>{const R=d.current;if(!R)return;const J=()=>{const $=typeof getComputedStyle=="function"?getComputedStyle(R):null,I=R.clientWidth-(parseFloat($?.paddingLeft??"")||0)-(parseFloat($?.paddingRight??"")||0),P=R.querySelector(".bottom-nav__left"),V=P?.nextElementSibling,ie=(P?.offsetWidth??0)+(P&&V?.classList.contains("bottom-nav__divider")?V.offsetWidth:0);b(Math.max(0,I-ie))};if(J(),typeof ResizeObserver>"u")return;const ne=new ResizeObserver(J);ne.observe(R);const S=R.querySelector(".bottom-nav__left");return S&&ne.observe(S),()=>ne.disconnect()},[s]);const C=$o+1,f=R=>Math.max(0,Math.floor((R+xr)/($o+xr))),x=y*($o+xr)-xr<=m,g=m<=0||l.length===0&&x?y:Math.min(y,f(m-C)),w=m>0&&g<y,_=w?g:y,E=e.slice(0,_),v=e.slice(_),N=w||l.length>0,k=o.useCallback((R,J)=>({position:"fixed",bottom:window.innerHeight-R.top+8,right:window.innerWidth-R.right,zIndex:qa(J)}),[]),D=o.useId(),{open:A,toggle:B,close:F,style:L,triggerRef:q,menuRef:M}=Ua({computeStyle:k,onScroll:"ignore",onResize:"reposition"}),O=o.useCallback((R,J)=>J>0?u("nav.badgeLabel",{label:R,count:J,defaultValue:"{{label}}, {{count}}\uAC1C"}):R,[u]),T=o.useCallback((R,J)=>J>0?u("nav.badgeInsideLabel",{label:R,count:J,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):R,[u]),G=o.useCallback(()=>s?.(c),[s,c]),K=o.useMemo(()=>v.find(R=>!!R.key&&R.key===t)??l.find(R=>R.selected||R.key&&R.key===t),[v,t,l]),ee=o.useMemo(()=>[{items:[...v.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),Lo(i,"BottomNav")),F())}})),...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?.(),F()}}))]}],[v,l,t,a,F]),re=[...v,...l].reduce((R,J)=>R+Qi(J.badgeCount),0);return n.jsxs("nav",{className:"bottom-nav",ref:d,"aria-label":u("nav.bottomNav","\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158"),children:[s&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"bottom-nav__left",children:n.jsx(be,{htmlType:"button",size:52,type:"dot",icon:p,ariaLabel:h,className:"bottom-nav-item",onClick:G})}),n.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),n.jsx("div",{className:"bottom-nav__items",children:E.map((R,J)=>{const ne=Qi(R.badgeCount);return n.jsxs("span",{className:"bottom-nav__slot",children:[n.jsx(be,{htmlType:"button",size:52,type:"dot",icon:R.icon,ariaLabel:O(R.label,ne),selected:!!R.key&&R.key===t,disabled:R.state==="disabled",className:"bottom-nav-item",onClick:()=>{R.key&&(a?.(R.key),Lo(i,"BottomNav"))}}),ne>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Sn,{position:"top-right",number:Math.min(ne,99),size:24})})]},R.key??`__slot-${J}`)})}),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:q,className:"bottom-nav__slot",children:[n.jsx(be,{htmlType:"button",size:52,type:"dot",icon:K?.icon??"ellipsis",ariaLabel:T(K?.label??u("nav.more","\uB354\uBCF4\uAE30"),re),selected:!!K,className:"bottom-nav-item",onClick:B,"aria-expanded":A,"aria-controls":A?D:void 0}),re>0&&n.jsx("span",{"aria-hidden":"true",children:n.jsx(Sn,{position:"top-right",number:Math.min(re,99),size:24})}),A&&hn.createPortal(n.jsx("div",{id:D,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:ue("tooltip__content"),style:L,ref:M,children:n.jsx(Ga,{columns:ee,onClose:F})}),document.body)]})})]})]})}function tu(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 nu(e,t,a){return a&&a>0?e("nav.badgeLabel",{label:t,count:a,defaultValue:"{{label}}, {{count}}\uAC1C"}):t}function h2(e){const{t}=ke.useTranslation(),{activeKey:a,unreadCount:r,onDebug:s,onNotification:l,onSetting:i,onHelp:u,onFeedback:c,onAccount:p}=e||{},h="default";return s||l||i||u||c||p?n.jsxs("div",{className:"side-nav__footer",children:[s&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"terminal",ariaLabel:t("nav.debug","\uB514\uBC84\uADF8"),onClick:s,selected:a==="debug"}),u&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"message-circle-question-mark",ariaLabel:t("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:u,selected:a==="help"}),l&&n.jsxs("span",{className:"side-nav__notification-wrap",children:[n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bell",ariaLabel:nu(t,t("nav.notifications","\uC54C\uB9BC"),r),onClick:l,selected:a==="notifications"}),!!r&&r>0&&n.jsx(Sn,{number:Math.min(r,99),size:24,"aria-hidden":!0})]}),i&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"settings",ariaLabel:t("nav.settings","\uC124\uC815"),onClick:i,selected:a==="settings"}),c&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bug",ariaLabel:t("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:c,selected:a==="feedback"}),p&&n.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"user-round",ariaLabel:t("nav.account","\uACC4\uC815"),onClick:p,selected:a==="account"})]}):null}function au(e){const{t}=ke.useTranslation(),{item:a,itemKey:r,label:s,icon:l,active:i,onClick:u,style:c,state:p,labelStyle:h}=e||{},d=a?.key??r??"",m=a?.label??s??"",b=a?.icon??l??"",y=a?.badge??0,C=n.jsx("span",{className:"side-nav__icon-wrap",children:n.jsx(lt,{icon:b,label:typeof m=="string"?m:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),f=p==="disabled",x=`side-nav__item ${i?"active":""} ${p||""} ${f?"disabled":""} ${a?.child?"side-nav__item--child":""}`,g=o.useCallback(w=>{if(f)return;const _=w.detail>0;if(_)try{w.currentTarget.blur()}catch{}u?.(d,w.currentTarget,_)},[f,d,u]);return n.jsxs("button",{type:"button",className:x,onClick:g,"aria-label":typeof m=="string"?nu(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(Sn,{position:"inline",number:Math.min(y,99),size:24,"aria-hidden":!0}),p==="loading"&&n.jsx("span",{className:"side-nav__spinner",role:"img","aria-label":t("loader.loading","\uBD88\uB7EC\uC624\uB294 \uC911\u2026")})]})}function ru(e){const{t}=ke.useTranslation(),{items:a=[],activeKey:r,onChange:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:b,scrollContainer:y}=e||{},C=m==="manager",f=o.useCallback(()=>b?.(C?"malgwi":"manager"),[b,C]),x=o.useRef(null),[g,w]=o.useState(null);o.useEffect(()=>{const k=x.current;if(!k)return;let D=null;const A=()=>{const{scrollHeight:L,clientHeight:q,scrollTop:M}=k;if(L<=q+1){w(ee=>ee===null?ee:null);return}const O=Math.max(24,q/L*q),T=q-O,G=L-q,K={top:Math.round(M/G*T),height:Math.round(O)};w(ee=>ee&&ee.top===K.top&&ee.height===K.height?ee:K)},B=()=>{if(typeof requestAnimationFrame>"u"){A();return}D===null&&(D=requestAnimationFrame(()=>{D=null,A()}))};A(),k.addEventListener("scroll",B,{passive:!0});const F=typeof ResizeObserver<"u"?new ResizeObserver(B):null;F?.observe(k);for(const L of Array.from(k.children))F?.observe(L);return()=>{D!==null&&cancelAnimationFrame(D),k.removeEventListener("scroll",B),F?.disconnect()}},[a]);const _=o.useRef(null),E=o.useCallback(k=>{const D=x.current;D&&(k.preventDefault(),_.current={y:k.clientY,top:D.scrollTop},k.currentTarget.setPointerCapture(k.pointerId))},[]),v=o.useCallback(k=>{const D=x.current,A=_.current;!D||!A||(D.scrollTop=A.top+(k.clientY-A.y)*(D.scrollHeight/D.clientHeight))},[]),N=o.useCallback(k=>{_.current=null,k.currentTarget.hasPointerCapture(k.pointerId)&&k.currentTarget.releasePointerCapture(k.pointerId)},[]);return n.jsxs("nav",{"aria-label":t("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[n.jsxs("div",{ref:x,className:"side-nav__menu-list",children:[g&&n.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:n.jsx("div",{className:"side-nav__scroll-thumb",style:{top:g.top,height:g.height},onPointerDown:E,onPointerMove:v,onPointerUp:N,onPointerCancel:N})}),(a||[]).filter(k=>!k.section&&(k.key||k.label)).map((k,D)=>n.jsxs(o.Fragment,{children:[k.divider&&n.jsx("div",{className:"side-nav__separator"}),n.jsx(au,{item:k,active:!!k.key&&k.key===r,state:k.disabled?"disabled":void 0,onClick:(A,B,F)=>{if(k.disabled)return;if(k.href){if(tu(k.href)&&window.open(k.href,"_blank","noopener,noreferrer"),F)try{B?.blur()}catch{}return}if(s?.(k.key),Lo(y,"SideNav"),!F)return;try{B?.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 q=typeof L.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&q&&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)}}}})]},k.key??`side-nav__item-${D}`)),b&&n.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),b&&n.jsx(au,{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(h2,{activeKey:r,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d})]})}var wr='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>',Ro='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>',m2='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 ou({appMode:e}){const{t}=ke.useTranslation(),a=e==="manager",r=a?Ro:wr,s=m2;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 su({activeKey:e,onChange:t,items:a,malgwiItems:r,managerItems:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:b,scrollContainer:y}){const{t:C}=ke.useTranslation(),f=vn("(max-width: 767px)"),x=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]),g=o.useCallback(L=>{const q=a?.find(M=>M.key===L);if(!q?.disabled){if(q?.href){tu(q.href)&&window.open(q.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}),h&&L.push({key:"help",icon:"message-circle-question-mark",label:C("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:h}),u&&L.push({key:"notifications",icon:"bell",label:C("nav.notifications","\uC54C\uB9BC"),badgeCount:l,onClick:u}),p&&L.push({key:"settings",icon:"settings",label:C("nav.settings","\uC124\uC815"),onClick:p}),d&&L.push({key:"feedback",icon:"bug",label:C("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:d}),c&&L.push({key:"account",icon:"user-round",label:C("nav.account","\uACC4\uC815"),onClick:c}),L},[C,i,u,p,h,d,c,l]),_=o.useCallback((L,q)=>({position:"fixed",top:L.bottom+8,right:Math.max(8,window.innerWidth-L.right),zIndex:qa(q)}),[]),E=o.useId(),{open:v,toggle:N,close:k,style:D,triggerRef:A,menuRef:B}=Ua({computeStyle:_,onScroll:"ignore",onResize:"reposition"}),F=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?.(),k()}}))}],[w,e,k]);return n.jsxs("aside",{className:`header${m==="manager"?" header--manager":""}`,children:[n.jsxs("div",{className:"header__bi",children:[n.jsx(ou,{appMode:m}),n.jsxs("div",{className:"header__menu-button",ref:A,children:[n.jsx(be,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:u&&l&&l>0?C("nav.badgeInsideLabel",{label:C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:l,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):C("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:N,"aria-expanded":v,"aria-controls":v?E:void 0}),!!u&&!!l&&l>0&&n.jsx(Sn,{number:Math.min(l,99),size:24,"aria-hidden":!0}),v&&hn.createPortal(n.jsx("div",{id:E,role:"group","aria-label":C("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:ue("tooltip__content"),style:D,ref:B,children:n.jsx(Ga,{columns:F,onClose:k})}),document.body)]})]}),n.jsx(ru,{scrollContainer:y,items:a,activeKey:e??void 0,onChange:t,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:b}),f&&n.jsx(eu,{items:x,activeKey:e??void 0,onChange:g,scrollContainer:y,appMode:m,onAppModeChange:b})]})}const C2=su;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)&&Dt("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&&Dt("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:p="default",fill:h="filled",minWidth:d,iconLeft:m,iconRight:b,color:y}=e,C=t==="bar",f=typeof a=="number"?"medium":a??"medium",x=(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"),g={small:12,medium:14,large:16}[f]??14,w=De("badge",C?"badge--bar":"",`badge--${p}`,`badge--${f}`,h!=="filled"?`badge--${h}`:"",x,r),_=y?.startsWith("--")?`var(${y})`:y,E=d!==void 0||_?{...d!==void 0?{minWidth:typeof d=="number"?`${d}px`:d}:{},..._?{"--badge-color":_}:{}}:void 0;return n.jsxs("span",{className:w,style:E,"aria-label":l?void 0:s,role:i??(s&&!l?"img":void 0),"aria-hidden":l||void 0,children:[m&&n.jsx(lt,{icon:m,size:g,className:"badge__icon"}),u??c,b&&n.jsx(lt,{icon:b,size:g,className:"badge__icon"})]})}const f2=()=>Zt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function lu(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 ba(`${t.toLocaleString("ko-KR")}\uC6D0`)}return ba(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function b2(e){const t=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(t)?"manager":"speechear"}function g2(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||f2()}function y2(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 iu(e){return{type:e.type??b2(e),plan:g2(e),label:e.label,price:lu(e.price),originalPrice:lu(e.originalPrice),discountLabel:e.discountLabel}}var v2='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>',_2='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>',uu='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 aa={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},Po=new WeakMap;function x2(e){if(e)return Po.get(e)}function Rn(e,t){e&&(e.style.setProperty(aa.text,t.text),e.style.setProperty(aa.sub,t.sub),t.copyrightColor&&e.style.setProperty(aa.copyright,t.copyrightColor),Po.set(e,t))}function Pn(e){e&&(e.style.removeProperty(aa.text),e.style.removeProperty(aa.sub),e.style.removeProperty(aa.copyright),Po.delete(e))}const cu={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function du(e={}){const t=It(cu,Rn,Pn);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("${uu}")`}})]})}const pu="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",va=240;var Ka='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 w2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},B2=100,k2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function hu(e={}){const t=It(w2,Rn,Pn),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:k2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*B2/va}) translate(${-va/2} ${-va/2})`,opacity:i,children:n.jsx("path",{d:pu,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("${Ka}")`}})]})}const A2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},N2=100,E2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function D2(e={}){const t=It(A2,Rn,Pn),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:E2.map(({scale:l,opacity:i},u)=>n.jsx("g",{transform:`translate(${r} ${s}) scale(${l*N2/va}) translate(${-va/2} ${-va/2})`,opacity:i,children:n.jsx("path",{d:pu,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("${uu}")`}})]})}const S2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function j2(e={}){const t=It(S2,Rn,Pn);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("${Ka}")`}})]})}const T2={Logo_SpeechEar_ko:{"":wr,_mono:v2},Logo_SpeechEarManager_ko:{"":Ro,_mono:_2}};function M2(e,t){if(e)return T2[e]?.[t??""]??void 0}const L2={speechear:wr,manager:Ro},$2={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},mu=10;function R2(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 Cu(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 P2(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===Zt.t("passCard.specialLabel");return r?n.jsx(j2,{}):s?n.jsx(D2,{}):n.jsx(hu,{})}return n.jsx(du,{})}function fu({ariaLabel:e,product:t,showPrice:a=!1,plan:r,type:s,endDate:l,remainingSeconds:i,endInclusive:u=!1,state:c="active",bg:p,bgOnly:h=!1,textColor:d,subColor:m,copyrightColor:b,logoSrc:y,label:C,price:f,originalPrice:x,discountLabel:g,onUse:w,onRefund:_,onDelete:E}){const{t:v}=ke.useTranslation(),N=t?iu(t):void 0,k=s??N?.type??"speechear",D=r??N?.plan??v("passCard.planSuffix","\uC774\uC6A9\uAD8C"),A=C??N?.label,B=f??(a?N?.price:void 0),F=x??(a?N?.originalPrice:void 0),L=g??N?.discountLabel,q=o.useMemo(()=>{if(B)return null;const W=t?.durationDays??y2(t?.code);if(!W||W<=0)return i!=null?{percent:null,remainingLabel:Cu(i,v)}:null;const z=W*86400;let ae;if(i!=null)ae=i;else if((c==="active"||c==="expired")&&l){const le=new Date(l).getTime();if(Number.isNaN(le))return null;const Be=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(l)),Pe=/^(\d{4})-(\d{2})-(\d{2})/.exec(Wa()),Fe=Math.round(Be&&Pe?(Date.UTC(+Be[1],+Be[2]-1,+Be[3])-Date.UTC(+Pe[1],+Pe[2]-1,+Pe[3]))/864e5:(le-Date.now())/864e5);ae=Math.max(0,u?Fe+1:Fe)*86400}else c==="expired"?ae=0:ae=z;const ve=R2(ae),me=Math.max(0,Math.min(100,Math.floor(Math.min(ve,z)/z*100)));return c==="pending"&&me>=100?null:{percent:me,remainingLabel:c==="expired"?v("passCard.expired","\uB9CC\uB8CC\uB428"):Cu(ae,v)}},[B,c,l,i,u,t?.durationDays,t?.code,v]),M=o.useRef(null),[O,T]=o.useState({}),[G,K]=o.useState(null),ee=!!(w||_||E),re=o.useRef(!1),R=o.useRef(void 0),[J,ne]=o.useState(y);o.useLayoutEffect(()=>{ne(y)},[y]),o.useLayoutEffect(()=>{const W=M.current;W&&(d!==void 0&&W.style.setProperty("--pass-card-text",d),m!==void 0&&W.style.setProperty("--pass-card-sub",m),b!==void 0&&W.style.setProperty("--pass-card-copyright",b))},[d,m,b]),o.useLayoutEffect(()=>{const W=M.current;if(!W)return;const z=x2(W);if(!y){const ae=$2[k],ve=c==="expired"?"_mono":z?.logoColor??"",me=M2(ae,ve);ne(me)}},[p,y,k,c]);const S=W=>{const z=M.current;if(!z)return null;const{left:ae,top:ve,width:me,height:le}=z.getBoundingClientRect(),Be=(W.clientX-ae)/me-.5;return{rotateX:-((W.clientY-ve)/le-.5)*mu,rotateY:Be*mu}},$=(W,z)=>{const ae=z*-.7,ve=W*.7+10,me=20+(Math.abs(W)+Math.abs(z))*.4;return`${ae}px ${ve}px ${me}px rgba(0, 0, 0, 0.18)`},I=o.useCallback(W=>{if(ta())return;re.current=!0,clearTimeout(R.current),R.current=setTimeout(()=>{re.current=!1},200);const z=S(W);z&&T({transform:`perspective(800px) rotateX(${z.rotateX}deg) rotateY(${z.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:$(z.rotateX,z.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)"})},[]),P=o.useCallback(W=>{if(ta())return;const z=S(W);if(!z)return;const ae=re.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";T({transform:`perspective(800px) rotateX(${z.rotateX}deg) rotateY(${z.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:$(z.rotateX,z.rotateY),transition:ae})},[]),V=o.useCallback(()=>{clearTimeout(R.current),re.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(()=>K(null),[]),U=o.useMemo(()=>{const W=v("passCard.planSuffix","\uC774\uC6A9\uAD8C"),z=D.replace("\uC774\uC6A9\uAD8C","").replace(W==="\uC774\uC6A9\uAD8C"?"":W,"").trim(),ae=z.match(/^(.*?)(일|년)$/);return ae?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"h0 pass-card__plan-number",children:ae[1]}),n.jsx("span",{className:"h5b pass-card__plan-unit",children:ae[2]==="\uB144"?v("passCard.unitYear","\uB144"):v("passCard.unitDay","\uC77C")})]}):n.jsx("span",{className:"h0",children:z})},[D,v]),ce=o.useMemo(()=>{const W=ba(B);if(!W)return null;const z=W.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!z)return n.jsx("span",{className:"h1",children:W});const[,ae,ve,me]=z;return n.jsxs(n.Fragment,{children:[ae&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:ae}),n.jsx("span",{className:"h1 pass-card__price-amount",children:ve}),me.trim()&&n.jsx("span",{className:"h5 pass-card__price-symbol",children:me.trim()})]})},[B]),Z=o.useCallback(()=>{ee&&K(W=>{if(W)return null;const z=M.current?.getBoundingClientRect();if(!z)return null;const ae=50;return{left:z.left,right:z.right,width:z.width,height:z.height,x:z.x,y:z.y+ae,top:z.top+ae,bottom:z.bottom+ae}})},[ee]),H=o.useCallback(W=>{ee&&(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),Z())},[ee,Z]),te=[{items:[...w?[{label:v("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{w(),K(null)},closeOnSelect:!0}]:[],..._?[{label:v("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{_(),K(null)},closeOnSelect:!0}]:[],...E?[{label:v("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{E(),K(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}${ee?" pass-card--clickable":""}`,style:O,onMouseEnter:I,onMouseMove:P,onMouseLeave:V,onPointerUp:W=>{W.pointerType==="touch"&&V()},onPointerCancel:W=>{W.pointerType==="touch"&&V()},onClick:Z,onKeyDown:ee?H:void 0,role:ee?"button":void 0,tabIndex:ee?0:void 0,"aria-label":e,"aria-haspopup":ee?"menu":void 0,"aria-expanded":ee?!!G:void 0,children:[p??P2(k,D,A),!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:J??L2[k],className:"pass-card__logo",alt:k==="manager"?v("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):v("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),n.jsxs("div",{className:"pass-card__plan",children:[n.jsx("div",{children:U}),n.jsx("span",{className:"h5b pass-card__plan-suffix",children:A?v("passCard.labeledPlan",{label:A}):v("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),B?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:[F&&n.jsx("span",{className:"pass-card__price-original body-3",children:ba(F)}),ce]})]}):q?n.jsxs("div",{className:"pass-card__usage",children:[n.jsx("span",{className:"h5b pass-card__usage-remaining",children:q.remainingLabel}),q.percent!=null&&n.jsxs("span",{className:"pass-card__usage-percent",children:[n.jsx("span",{className:"h1 pass-card__usage-value",children:q.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."})]})]})}),G&&n.jsx(Bn,{anchorRect:G,onClose:ie,ariaLabel:v("tooltip.menu","\uBA54\uB274"),children:n.jsx(Ga,{columns:te,onClose:ie,size:"small"})})]})}const F2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#1a1a1a"};function I2(e={}){const t=`passcard-sound-line-grad-${o.useId()}`,a=It(F2,Rn,Pn);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("${Ka}")`}})]})}const O2={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function z2(e={}){const t=It(O2,Rn,Pn);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("${Ka}")`}})]})}function W2(e,t){if(e){if(t==="manager_pro")return n.jsx(z2,{});if(t==="manager_standard")return n.jsx(I2,{});if(t==="manager_lite")return n.jsx(hu,{})}}function H2(e){const t=ba(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 V2(e){const{t}=ke.useTranslation(),a=t("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),r=t("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:s,onSelect:l,period:i="monthly",ownedCodes:u}=e||{},c=_=>!!_&&!!u?.includes(_),p=_=>_.onceOnly??/오픈\s*특가/.test(_.label??""),h=(s.tiers||[]).some(_=>p(_)&&c(_.code)),d=_=>{const E=_.prices?_.prices[i]:_.price;return E?(s.tiers||[]).some(v=>!!v.badge&&v.originals?.[i]===E):!1},m=s.colorToken?`var(--color-${s.colorToken})`:"var(--color-gray)",b=t("payment.plan.freePrice","\uBB34\uB8CC"),y=t("payment.products.mgrEnterprise.tier.price","\uBB38\uC758"),C=_=>_.prices?_.prices[i]:_.price,f=(s.tiers||[]).length>0&&(s.tiers||[]).every(_=>{const E=C(_);return E==="\uBB34\uB8CC"||E===b||E==="0\uC6D0"||typeof E=="string"&&/\d/.test(E)&&!/[1-9]/.test(E)}),x=(s.tiers||[]).length>0&&(s.tiers||[]).every(_=>{const E=C(_);return E==="\uBB38\uC758"||E===y}),g=s.group==="org",w=g?"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((_,E)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(lt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),_]},E))})]}),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((_,E)=>n.jsxs("li",{className:"payment-plan__feature-item body-3",children:[n.jsx(lt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:m}}),_]},E))})]}),n.jsx("div",{className:"payment-plan__card-pricing",children:f?null:x?n.jsx(be,{htmlType:"button",className:"payment-plan__contact-button",label:t("payment.plan.contact",{defaultValue:"\uBB38\uC758\uD558\uAE30"}),variant:"main",size:56,onClick:()=>s.tiers?.[0]&&l?.({...s.tiers[0],productId:s.id,productTitle:s.title})}):n.jsx(n.Fragment,{children:n.jsx("div",{className:"payment-plan__pricing-list",children:(s.tiers||[]).map(_=>{const E=_.label||a,v=p(_),N=v||_.openPromo===!0,k=E.replace(/^오픈\s*특가\s*/,"")||a,D=_.prices?_.prices[i]:_.price,A=_.badge?N?`${r}
823
+ ${_.badge}`:_.badge:void 0;if(v&&c(_.code))return null;if(!_.badge&&!h)return d(_)?null:n.jsxs("div",{className:`payment-plan__pricing-row payment-plan__pricing-row--static${_.highlight?" payment-plan__pricing-row--highlight":""}`,children:[n.jsx("div",{className:"payment-plan__pricing-row-title",children:n.jsx("div",{className:"payment-plan__pricing-row-label h5b",children:_.label})}),n.jsx("div",{className:"payment-plan__pricing-row-price",children:n.jsx("span",{className:"payment-plan__pricing-current h1",children:H2(D)})})]},_.id);const B=s.tier??(g?s.title:void 0),F=n.jsx(fu,{showPrice:!0,product:{type:w,code:_.code,name:k,label:B,price:D,originalPrice:_.originals?.[i]??void 0,discountLabel:A},bg:W2(g,s.id)}),L=()=>l?.({..._,productId:s.id,productTitle:s.title,preview:F});return n.jsx("div",{className:"payment-plan__pricing-card",onClick:L,onKeyDown:l?q=>{q.target===q.currentTarget&&(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),L())}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:F},_.id)})})})})]})}function q2({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 Fo='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 bu={text:"#1a1a1a",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"#c9c9c9"};function U2(){const e=It(bu,Rn,Pn);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("${Fo}")`}})})}const gu={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function G2(e={}){const t=It(gu,Rn,Pn);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("${Ka}")`}})]})}function yu({keys:e,anchor:t="top-right",scale:a,className:r=""}){const s=Array.isArray(e)?e:[e];return n.jsx("span",{className:De("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 Ya=(e,t,a)=>e+(t-e)*a;function K2({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:p,pulseScale:h,clickable:d=!1,onSelectSpeaker:m,buttonSize:b=40,showIcon:y=!0,onCenterClick:C,centerLabel:f,centerDisabled:x=!1,centerAttention:g=!1,shortcutAnchor:w="top-right",shortcutScale:_,scaleShortcut:E=!1}){const{t:v}=ke.useTranslation(),N=Math.max(0,Math.min(1,a)),k=t/2,D=110/300,A=.18,B=W=>t*(D+(W-1)*A),F=W=>{const z=B(W.row??1),ae=W.angleDeg*Math.PI/180;return{x:k+z*Math.cos(ae),y:k+z*Math.sin(ae)}},L=Math.max(...e.map(W=>W.row??1),1),q=t*.08,M=t*.1,O=t*.24,T=t-2*q,G=t-M-O,K=t-O/2,ee=o.useMemo(()=>[...new Set(e.map(W=>W.deg))].sort((W,z)=>W-z),[e]),re=ee.length,R=Math.max(68,re>1?T/(re-1):0),J=o.useMemo(()=>new Map(ee.map((W,z)=>[W,z])),[ee]),ne=W=>{const z=J.get(W.deg)??0,ae=k+(z-(re-1)/2)*R,ve=L>1?Math.min(68,G/(L-1)):0,me=ve*(L-1),le=M+(G-me)/2,Be=L===1?M+G*.4:le+(L-(W.row??1))*ve;return{x:ae,y:Be}},S=W=>{const z=F(W),ae=ne(W);return{x:Ya(z.x,ae.x,N),y:Ya(z.y,ae.y,N)}},$={x:k,y:Ya(k,K,N)},I=Math.round(b*1.2),P=Math.round(Math.max(16,Math.min(80,b*.7))),V=[],ie=new Map;for(const W of e){const z=W.row??1;ie.has(z)||ie.set(z,[]),ie.get(z).push(W)}for(const[W,z]of ie.entries()){if(z.length<2)continue;const ae=[...z].sort(($e,nt)=>$e.deg-nt.deg),ve=ae.map($e=>S($e)),me=ae.map($e=>$e.deg),le=me[me.length-1]-me[0],Be=le/(me.length-1),Pe=360-le,Fe=ae.length>=3&&Be>0&&Pe<=Be*1.5,Ae=Math.round(B(W)*1e3)/1e3,se=($e,nt,ct,at)=>{const rt=(nt.angleDeg-$e.angleDeg+540)%360-180;if(rt===0)return`L ${at.x} ${at.y}`;if(N===0)return`A ${Ae} ${Ae} 0 0 ${rt>0?1:0} ${at.x} ${at.y}`;const Ee=($e.angleDeg+rt/2)*Math.PI/180,Ue={x:k+Ae*Math.cos(Ee),y:k+Ae*Math.sin(Ee)},Ne={x:(ct.x+at.x)/2,y:(ct.y+at.y)/2},Ye={x:Ya(Ue.x,Ne.x,N),y:Ya(Ue.y,Ne.y,N)},et={x:2*Ye.x-Ne.x,y:2*Ye.y-Ne.y};return`Q ${et.x} ${et.y} ${at.x} ${at.y}`},ye=Fe?[...ae,ae[0]]:ae,Ce=Fe?[...ve,ve[0]]:ve;let xe=`M ${Ce[0].x} ${Ce[0].y}`;for(let $e=1;$e<Ce.length;$e++)xe+=" "+se(ye[$e-1],ye[$e],Ce[$e-1],Ce[$e]);V.push({key:`arc-${W}`,d:xe})}const U=o.useMemo(()=>new Set(s??[]),[s]),ce=W=>({idle:"",active:v("soundCompass.state.active","\uC18C\uB9AC \uB098\uB294 \uC911"),played:v("soundCompass.state.played","\uB4E4\uC74C"),correct:v("soundCompass.state.correct","\uC815\uB2F5"),wrong:v("soundCompass.state.wrong","\uC624\uB2F5")})[W],Z=W=>{if(r===W.id)return"active";if(u){if(W.id===i)return"correct";if(W.id===l&&l!==i)return"wrong"}return U.has(W.id)?"played":"idle"},H=W=>r===W.id?"loop":u?W.id===i?"loop":null:c&&W.id===l?"once":null,te=(W,z)=>{switch(W){case"played":case"correct":return n.jsx(qs,{size:z});case"wrong":return n.jsx(tl,{size:z});default:return n.jsx(el,{size:z})}};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(W=>{const{x:z,y:ae}=S(W);return n.jsx("line",{x1:$.x,y1:$.y,x2:z,y2:ae,stroke:"#dde3ec",strokeWidth:"1"},W.id)}),V.map(W=>n.jsx("path",{d:W.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},W.key))]}),g&&!x&&n.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:I,height:I,left:$.x-I/2,top:$.y-I/2}}),C?n.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${x?" sound-compass__center--disabled":""}`,style:{width:I,height:I,left:$.x,top:$.y},"aria-label":f,"aria-disabled":x||void 0,tabIndex:x?-1:0,onClick:x?void 0:C,children:n.jsx(Ur,{size:P,color:"currentColor",strokeWidth:1.5})}):n.jsx("div",{className:"sound-compass__center",style:{width:I,height:I,left:$.x,top:$.y},children:n.jsx(Ur,{size:P,color:"currentColor",strokeWidth:1.5})}),e.map((W,z)=>{const{x:ae,y:ve}=S(W),me=Z(W),le=H(W),Be={..._!==void 0||E?{"--shortcut-badge-scale":String(_??Math.max(.75,Math.min(3,b/56)))}:null,pointerEvents:d?"auto":"none",cursor:d?"pointer":"default",zIndex:me!=="idle"?10:1},Pe=b,Fe=Math.round(Math.max(10,Math.min(56,Pe*.38))),Ae=Math.round(Math.max(7,Math.min(18,Pe*.2))),se=Math.round(Math.max(10,Math.min(56,Pe*.4))),ye=y==="answered"&&(me==="played"||me==="correct"||me==="wrong"),Ce=y===!0||ye,xe=!ye;return n.jsxs("div",{className:"sound-compass__speaker-pos",style:{...Be,left:ae-Pe/2,top:ve-Pe/2},children:[le&&n.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${me}`+(le==="once"?" sound-compass__pulse--once":""),style:{width:Pe,height:Pe,...le==="once"&&p!==void 0?{"--sc-pulse-duration-once":`${p}ms`}:null,...h!==void 0?{"--sc-pulse-scale":String(h)}:null}}),n.jsxs("button",{type:"button",tabIndex:d?0:-1,"aria-disabled":d?void 0:!0,onClick:d?()=>m?.(W.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${me}`,style:{width:Pe,height:Pe},"aria-label":ce(me)?`${W.label}, ${ce(me)}`:W.label,"aria-pressed":l!=null?W.id===l:void 0,children:[Ce&&te(me,Fe),xe&&n.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:y===!0?Ae:se},children:z+1})]}),W.shortcut&&n.jsx(yu,{keys:W.shortcut,anchor:w,className:"sound-compass__speaker-shortcut"})]},W.id)})]})})}function Y2({orientation:e="horizontal",label:t,className:a=""}){const r=De("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 vu({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 Z2({options:e,value:t,onChange:a,name:r,disabled:s=!1,direction:l="vertical",className:i="",ariaLabel:u}){const c=o.useId(),p=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(vu,{name:p,value:h.value,checked:t===h.value,disabled:s||h.disabled,label:h.label,onChange:d=>{d&&a?.(h.value)}},h.value))})}const X2={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function J2({tone:e="info",title:t,message:a,children:r,dismissible:s=!1,onDismiss:l,live:i,className:u=""}){const{t:c}=ke.useTranslation(),[p,h]=o.useState(!1),d=o.useRef(null),m=o.useCallback(()=>{const g=d.current;g&&g.contains(document.activeElement)&&fr(g),h(!0),l?.()},[l]);if(p)return null;const b=De("alert",`alert--${e}`,u),y=i??(e==="danger"||e==="warning"?"assertive":"polite"),C=y==="assertive"?"alert":y==="polite"?"status":void 0,f=!!t,x=!!(a||r);return n.jsxs("div",{ref:d,className:b,role:C,children:[n.jsxs("div",{className:"alert__body",children:[n.jsxs("div",{className:"alert__header",children:[n.jsx(lt,{icon:X2[e],size:20,className:"alert__icon"}),f&&n.jsx("span",{className:"alert__title body-2",children:t}),!f&&x&&n.jsx("div",{className:"alert__message body-3",children:a||r})]}),f&&x&&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 Q2={ready:"search",guide:"info",error:"circle-alert"};function ev(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 tv({status:e="guide",label:t,children:a,emphasis:r,icon:s,className:l=""}){const i=s===!1?null:s??Q2[e],u=De("search-summary",`search-summary--${e}`,l),c=t??a,p=typeof c=="string"&&r&&r.length>0?ev(c,r):c;return n.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[i!=null&&n.jsx(lt,{icon:i,size:18,className:"search-summary__icon"}),n.jsx("span",{className:"search-summary__text body-2",children:p})]})}function Za({title:e,items:t}){const{t:a}=ke.useTranslation(),{anchorRect:r,openAt:s,close:l}=_r(),i=o.useRef(null),u=gr(!!r,(c,p)=>{c&&p?s(i.current?.querySelector("button")??p):l()},i);return n.jsxs("span",{ref:i,style:{display:"contents"},children:[n.jsx(be,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!r,ariaLabel:a("common.info","\uC124\uBA85"),onPointerEnter:c=>{Gn(c)||s(c.currentTarget)},onPointerLeave:c=>{Gn(c)||l()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{ta()||s(c.currentTarget)},onBlur:l}),r&&n.jsx(Un,{title:e,items:t,showIndex:t.length>1,anchorRect:r,onClose:l})]})}const Lt=40,ra=32;function nv({items:e=[],value:t,onChange:a,className:r="",size:s=Lt}){const l=o.useId(),{t:i}=ke.useTranslation(),u=o.useRef(null),c=e.find(C=>!C.disabled)?.key,p=e.some(C=>C.key===t)?t:c??e[0]?.key,h=e.find(C=>C.key===p&&!C.disabled)?.key??c,d=()=>Array.from(u.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),m=(C,f=d())=>{if(f.length===0)return;const x=(C%f.length+f.length)%f.length;f[x]?.focus(),f[x]?.click()},b=C=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(C.key))return;C.preventDefault();const f=d(),x=f.indexOf(C.currentTarget);C.key==="ArrowRight"||C.key==="ArrowDown"?m(x+1,f):C.key==="ArrowLeft"||C.key==="ArrowUp"?m(x-1,f):C.key==="Home"?m(0,f):m(f.length-1,f)},y=e.find(C=>C.key===p);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===p,"aria-controls":`tabs__panel-${l}-${C.key}`,disabled:C.disabled,tabIndex:C.key===h?0:-1,className:`tabs__tab body-2${C.key===p?" tabs__tab--active":""}`,onClick:()=>{C.key!==t&&a?.(C.key)},onKeyDown:b,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 av={xs:12,sm:16,md:20,lg:28,xl:36};function rv(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 ov({src:e,name:t,size:a="md",shape:r="circle",className:s=""}){const{t:l}=ke.useTranslation(),[i,u]=o.useState(null),c=!!e&&i===e,p=t?rv(t):"",h=!!e&&!c,d=!h&&!!p,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&&d&&n.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:p}),!h&&!d&&n.jsx(lt,{icon:"user-round",size:av[a],className:"avatar__icon"})]})}function sv(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 lv({onFilesSelected:e,accept:t,multiple:a=!1,disabled:r=!1,showFileList:s=!0,files:l,onRemove:i,className:u=""}){const{t:c}=ke.useTranslation(),p=o.useRef(null),[h,d]=o.useState(!1),[m,b]=o.useState([]),y=l??m,C=v=>{if(!v||v.length===0)return;const N=Array.from(v).filter(D=>sv(D,t));if(N.length===0)return;const k=a?N:N.slice(0,1);if(l===void 0){const D=a?[...y,...k]:k;b(D),e?.(D)}else e?.(k)},f=v=>{v.preventDefault(),!r&&d(!0)},x=v=>{v.preventDefault(),d(!1)},g=v=>{v.preventDefault(),d(!1),!r&&C(v.dataTransfer.files)},w=v=>{const N=v.target;try{C(N.files)}finally{N.value=""}},_=()=>{r||p.current?.click()},E=v=>{if(!r&&(i?.(v),l===void 0)){const N=y.filter((k,D)=>D!==v);b(N),i||e?.(N)}};return n.jsxs("div",{className:`file-upload ${u}`.trim(),children:[n.jsxs("div",{className:De("file-upload__dropzone",h&&"file-upload__dropzone--dragging",r&&"file-upload__dropzone--disabled"),role:"button",tabIndex:r?-1:0,"aria-disabled":r,onClick:_,onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),_())},onDragOver:f,onDragLeave:x,onDrop:g,children:[n.jsx(lt,{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:v=>{v.stopPropagation(),_()},children:c("fileUpload.browseButton","\uD30C\uC77C \uC120\uD0DD")}),n.jsx("input",{ref:p,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((v,N)=>n.jsxs("li",{className:"file-upload__list-item body-3",children:[n.jsx("span",{className:"file-upload__file-name body-3",children:v.name}),n.jsx("button",{type:"button",className:"file-upload__remove-button","aria-label":c("fileUpload.removeAriaLabel",{name:v.name}),disabled:r,onClick:()=>E(N),children:n.jsx(lt,{icon:"x",size:14})})]},`${v.name}-${N}`))})]})}function iv({items:e,className:t=""}){const{t:a}=ke.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(lt,{icon:"chevron-right",size:14,className:"breadcrumb__separator"})]},s)})})})}const uv={small:14,medium:20,large:28};function cv({value:e,onChange:t,max:a=5,readOnly:r=!1,size:s="medium",ariaLabel:l,className:i=""}){const{t:u}=ke.useTranslation(),c=r||!t,[p,h]=o.useState(null),d=c?e:Number.isFinite(e)?Math.round(e):0,m=p??d,b=uv[s],y=v=>{v!==e&&t?.(v)},C=v=>{c||y(v)},f=v=>{c||ta()||h(v)},x=o.useRef(null),g=v=>{const N=Math.min(a,Math.max(1,v));y(N),Array.from(x.current?.querySelectorAll("[data-star]")??[]).find(k=>k.dataset.star===String(N))?.focus()},w=v=>{if(!c){switch(v.key){case"ArrowRight":case"ArrowUp":g((d||0)+1);break;case"ArrowLeft":case"ArrowDown":g((d||1)-1);break;case"Home":g(1);break;case"End":g(a);break;default:return}v.preventDefault()}},_=d>=1&&d<=a?Math.round(d):1,E=()=>{c||h(null)};return n.jsx("div",{className:`rating rating--${s}${c?" rating--readOnly":""} ${i}`.trim(),ref:x,onKeyDown:w,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:a}):l??u("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:E,onPointerUp:v=>{v.pointerType==="touch"&&E()},onPointerCancel:v=>{v.pointerType==="touch"&&E()},children:Array.from({length:a},(v,N)=>{const k=N+1,D=Math.max(0,Math.min(1,m-N)),A=D>0&&D<1,B=n.jsxs("span",{className:"rating__star-wrap",children:[n.jsx(lt,{icon:"star",size:b,className:"rating__star rating__star--empty"}),D>0&&n.jsx("span",{className:`rating__star-fill${A?" rating__star-fill--half":""}`,style:A?{width:`${D*100}%`}:void 0,children:n.jsx(lt,{icon:"star",size:b,className:"rating__star rating__star--filled"})})]});return c?n.jsx("span",{className:"rating__item","aria-hidden":"true",children:B},k):n.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":d===k,"aria-label":u("rating.starLabel",{n:k}),"data-star":k,tabIndex:k===_?0:-1,onClick:()=>C(k),onMouseEnter:()=>f(k),children:B},k)})})}const dv=20,pv=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function hv({value:e,onChange:t,palette:a=pv,size:r=Lt,className:s="",ariaLabel:l}){const{t:i}=ke.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(lt,{icon:"check",size:dv,className:"color-picker__check"})},u)})})}function _u({icon:e,label:t,tooltip:a,wrapperStyle:r,color:s,bgColor:l,useHover:i=!0,iconSize:u="medium"}){const{t:c}=ke.useTranslation(),p=u==="small",h=De("category-icon",p?"category-icon--small":""),d=p?16:20,m=o.useRef(null),[b,y]=o.useState(!1),C=o.useMemo(()=>{const k=r&&typeof r=="object"?{...r}:{};return!s&&!l?k:{...k,...s?{color:s,"--t-item-fg":s}:{},...l?{"--t-item-bg":l}:{}}},[r,s,l]),f=a||t,x=i&&!!f,[g,w]=o.useState(null);o.useLayoutEffect(()=>{b&&w(m.current?.getBoundingClientRect()??null)},[b]),o.useEffect(()=>{if(!i&&b)try{y(!1)}catch{}},[i,b]),o.useEffect(()=>{if(!b)return;const k=D=>{const A=m.current;if(!A)return;const B=D.target;B&&!A.contains(B)&&y(!1)};return document.addEventListener("pointerdown",k,!0),()=>document.removeEventListener("pointerdown",k,!0)},[b]);const _=o.useCallback(()=>{i&&y(!0)},[i]),E=o.useCallback(()=>{i&&y(!1)},[i]),v=o.useCallback(()=>y(!1),[]),N=o.useCallback(k=>{if(k.key==="Escape"){y(!1);return}(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),y(D=>!D))},[]);return n.jsxs("span",{ref:m,className:De("category-icon__wrap",x&&"category-icon__wrap--interactive"),onPointerEnter:_,onPointerLeave:E,onFocus:_,onBlur:E,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":b,"data-tooltip-ignore":!0,children:[n.jsx(lt,{icon:e,label:t,className:h,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:C,size:d}),b&&f&&n.jsx(Ln,{anchorRect:g,text:typeof f=="string"?f:void 0,offset:8,onClose:v,className:"category-icon__tooltip",ariaLabel:typeof f=="string"?f:void 0})]})}let Kn=null;function Xa(e){if(Kn&&Kn!==e)try{Kn()}catch{}return Kn=e,()=>{Kn===e&&(Kn=null)}}function Br(e){if(Kn===e){Kn=null;try{e()}catch{}}}function Ja(e,t){let a=()=>{};const r=new Promise(u=>{a=u});if(typeof e!="string"||e.trim()===""){Dt("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 mv(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 Cv(e,t){const[a,r]=o.useState(!1),[s,l]=o.useState(-1),[i,u]=o.useState({key:"",urls:[]}),c=o.useRef(null),p=o.useRef(!1),h=o.useRef(null),d=o.useRef(null),[m,b]=o.useState(!1),y=o.useRef([]),{previewCodes:C,previewBucket:f}=mv(e,t),x=`${C.join(",")}|${f??""}`,g=o.useMemo(()=>i.key===x?i.urls:[],[i,x]);o.useEffect(()=>{if(!C.length)return;let _=!1;return(async()=>{const E=[],v=[];for(const N of C)try{const k=El(N,f);if(!k){E.push("");continue}let D=null;try{D=await Dl(k)}catch{}if(!D)try{const A=await Sl(k);A&&(D=URL.createObjectURL(A),v.push(D))}catch{}E.push(D??"")}catch{E.push("")}_?v.forEach(N=>{try{URL.revokeObjectURL(N)}catch{}}):(y.current.forEach(N=>{try{URL.revokeObjectURL(N)}catch{}}),y.current=v,u({key:x,urls:E}))})(),()=>{_=!0}},[C.join(","),f]),o.useEffect(()=>()=>{y.current.forEach(_=>{try{URL.revokeObjectURL(_)}catch{}}),y.current=[]},[]);const w=o.useCallback(async _=>{if(_.stopPropagation(),_.preventDefault(),p.current){h.current&&Br(h.current),p.current=!1;try{c.current?.pause()}catch{}r(!1),l(-1);return}if(!g.filter(Boolean).length)return;let E=null;const v=()=>{p.current=!1,E?.stop()};h.current=v;const N=Xa(v);p.current=!0,r(!0);for(let k=0;k<g.length&&p.current;k++){const D=g[k];if(D&&(l(k),E=Ja(D),c.current=E.el,!await E.done))break}N(),h.current===v&&(h.current=null,p.current=!1,r(!1),l(-1))},[g]);return o.useEffect(()=>()=>{h.current&&Br(h.current),p.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:a,playingIndex:s,previewUrls:g,previewHover:m,setPreviewHover:b,previewBtnRef:d,handlePreview:w}}const fv=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 Io(e){const{index:t,type:a,trainingData:r,ariaLabel:s,depth:l,renderPopup:i,completed:u,completedIds:c,selectedIds:p,tooltipText:h,useDescriptionTooltip:d=!1,onRemove:m,hideCheckBadge:b=!1,showTypeLabel:y=!1,onComplete:C,onSelect:f,onMore:x,countLabelOverride:g,size:w="square"}=e||{},{t:_}=ke.useTranslation(),[E,v]=o.useState(!1),N=o.useRef(null),[k,D]=o.useState(!1);o.useEffect(()=>{N.current?.matches(":hover")&&D(!0)},[]);const{playing:A,playingIndex:B,previewUrls:F,previewHover:L,setPreviewHover:q,previewBtnRef:M,handlePreview:O}=Cv(r,a?.key),T=o.useCallback(()=>{f?f():v(!0)},[f]),G=o.useCallback(()=>v(!1),[]),K=o.useCallback(()=>D(!0),[]),ee=o.useCallback(()=>D(!1),[]),re=o.useCallback(()=>q(!0),[q]),R=o.useCallback(()=>q(!1),[q]),[J,ne]=o.useState(null);o.useLayoutEffect(()=>{L&&ne(M.current?.getBoundingClientRect()??null)},[L,M]);const[S,$]=o.useState(null);o.useLayoutEffect(()=>{k&&!E&&d&&$(N.current?.getBoundingClientRect()??null)},[k,E,d]);const I=o.useCallback(Ne=>{Ne.target===Ne.currentTarget&&(Ne.key==="Enter"||Ne.key===" ")&&(Ne.preventDefault(),T())},[T]),P=r||null,V=o.useMemo(()=>{if(!d)return null;const Ne=h?(Array.isArray(h)?h:[h]).filter(Boolean):null,Ye=Ne&&Ne.length>0?Ne:fv(P);return Ye&&Ye.length>0?Ye:null},[d,h,P]),ie=o.useCallback(Ne=>{Ne.stopPropagation(),m?.()},[m]),U=o.useCallback(Ne=>Ne.stopPropagation(),[]),ce=o.useCallback(Ne=>{typeof C=="function"&&C(Ne)},[C]),Z=u||(c&&r?.id!=null?c.has(String(r.id)):!1),H=!Z&&(p!=null&&r?.id!=null?p.has(String(r.id)):!1);Vi("speechear.popup.close",G);const te=ei(),W=`${a?.label||""} ${t+1}`,z=P?.title||P?.name||W;let ae=a?.icon,ve,me="",le="";try{const Ne=P?.category_0||P?.category_main_code||P?.category_main,Ye=P?.category_1||P?.category_sub_code||P?.category_sub,et=te.find(ft=>ft.key===Ne);et?.icon&&(ae=et.icon),!ve&&et?.color&&(ve={"--t-item-fg":et.color}),!ve&&P?.iconColor&&(ve={"--t-item-fg":P.iconColor}),me=et?_(`topic.${et.key}`,{defaultValue:et.label||""}):"";try{const ft=et?.subs?.find(vt=>vt.key===Ye);le=ft?_(`topic.sub.${ft.key}`,{defaultValue:ft.label||""}):""}catch{}}catch{}const Be=le?`${me} / ${le}`:me||a?.label||z,Pe=Ne=>_("training.countQuestions",{n:Ne,count:Ne}),Fe=Ne=>_("training.countSentences",{n:Ne,count:Ne});let Ae="";try{if(P)if(a?.key==="LISTEN_IN_NOISE"){let Ne=0;Array.isArray(P.items)&&P.items.length>0?Ne=P.items.length:Array.isArray(P.sentences)&&P.sentences.length>0?Ne=P.sentences.length:P.sentences&&(Ne=1),Ae=Fe(Ne)}else if(a?.key==="SHORT_STORY"){let Ne=1;Array.isArray(r?.items)?Ne=r.items.length:Array.isArray(r?.raw&&r.raw?.items)?Ne=r.raw.items.length:Array.isArray(P?.questions)?Ne=P.questions.length:Array.isArray(P?.sentences)&&(Ne=P.sentences.length),Ae=Pe(Ne)}else if(a?.key==="LONG_STORY"){let Ne=1;if(Array.isArray(P.items)&&P.items.length>0){const Ye=P.items.reduce((et,ft)=>{const vt=ft.questionItems;return Array.isArray(vt)?et+vt.length:Array.isArray(ft.questions)?et+ft.questions.length:et},0);Ne=Ye>0?Ye:P.items.length}else Array.isArray(P.questions)&&P.questions.length>0?Ne=P.questions.length:Array.isArray(P.sentences)&&P.sentences.length>0&&(Ne=P.sentences.length);Ae=Pe(Ne)}else if(a?.key==="ORDERING_SENTENCE"){let Ne=1;Array.isArray(P.items)&&P.items.length>0?Ne=P.items.length:Array.isArray(P.sentences)&&P.sentences.length>0&&(Ne=P.sentences.length),Ae=Fe(Ne)}else Array.isArray(P.items)&&(Ae=P.items.length>0?Pe(P.items.length):"")}catch{}const se=w==="row",ye=w==="list"||se,Ce=w==="compact",xe=w==="small",$e=xe&&a?.key?Qf().find(Ne=>Ne.key===a.key):void 0,nt=$e?ti[$e.key]:void 0,ct=$e?nt?_(`trainingType.${nt}.title`,{defaultValue:$e.label}):$e.label??"":"",at=y&&a?.label&&a.label!==String(z)?String(a.label):xe&&ct&&ct!==String(z)?ct:"",rt=!!at,Ee=g!==void 0?g:Ae,Ue=[at,typeof z=="string"?z:"",Ee].map(Ne=>String(Ne??"").trim()).filter(Boolean).join(" ");return n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:N,className:`training-block-button${ye?" training-block-button--list":""}${se?" training-block-button--row":""}${Ce?" training-block-button--compact":""}${xe?" training-block-button--small":""}${Z?" training-block-button--completed":""}${H?" training-block-button--selected":""}${rt&&!xe?" training-block-button--withType":""}${xe&&!rt?" training-block-button--no-type-label":""}`,onClick:T,onPointerEnter:K,onPointerLeave:ee,role:"button",tabIndex:0,onKeyDown:I,"aria-label":typeof s=="string"?s:Ue||void 0,title:!d&&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(z)&&n.jsx("span",{className:"training-block-button__type-label caption-1",children:a.label}),xe&&ct&&ct!==String(z)&&n.jsx("span",{className:"training-block-button__type-label caption-2",children:ct}),n.jsx(_u,{icon:ae,label:z,tooltip:Be,wrapperStyle:ve,iconSize:xe||Ce?"small":"medium"}),!b&&(Z||H)&&!(m&&k)&&n.jsx(Sn,{className:m?"training-block-button__check--removable":void 0,icon:"check",position:"top-left",size:32,"aria-label":Z?_("training.completed","\uD6C8\uB828 \uC644\uB8CC"):_("training.selected","\uC120\uD0DD\uB428")}),m&&n.jsx(Sn,{className:`training-block-button__remove${k?" is-hover":""}`,icon:"remove",position:"top-left",size:32,"aria-label":_("common.remove","\uC81C\uAC70"),onClick:ie}),n.jsx("div",{className:`training-block-button__title ${Ce?"body-3":xe?"body-3b":"h3"}`,children:String(z)}),n.jsxs("div",{className:"training-block-button__description",children:[Ee?n.jsx("div",{className:`training-block-button__count ${xe?"caption-2":"caption-1"}`,children:Ee}):null,n.jsx("div",{className:"training-block-button__chevron",children:n.jsx(lt,{icon:"chevron-right",label:_("training.next","\uB2E4\uC74C"),className:"training-block-button__chevron-icon",imgClassName:"training-block-button__chevron-icon-image",maskClassName:"training-block-button__chevron-icon-mask",svgClassName:"training-block-button__chevron-icon-svg",size:xe?12:20})})]}),(ye&&!se||xe)&&F.length>0&&n.jsx("div",{ref:M,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:U,onPointerEnter:re,onPointerLeave:R,children:n.jsx(be,{htmlType:"button",size:xe?28:32,type:"dot",icon:A?"pause":"play",variant:xe?"transparent-lightGray":"default",useBorder:!1,selected:A,ariaLabel:String(z).trim()?A?_("training.stopFor",{name:z,defaultValue:`${z} \uC815\uC9C0`}):_("training.previewFor",{name:z,defaultValue:`${z} \uBBF8\uB9AC \uB4E3\uAE30`}):A?_("training.stop","\uC815\uC9C0"):_("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:O})})]}),x&&n.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:Ne=>{Ne.stopPropagation(),x(Ne)},children:n.jsx(be,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(z).trim()?_("common.moreFor",{name:z}):_("common.more","\uB354\uBCF4\uAE30")})})]}),L&&n.jsx(Ln,{anchorRect:J,text:A?_("training.stop","\uC815\uC9C0"):_("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:R}),k&&!E&&d&&(V?n.jsx(Un,{anchorRect:S,items:V,activeIndex:B,onClose:ee}):P?.subTitle?n.jsx(Ln,{anchorRect:S,text:P.subTitle,offset:8,onClose:ee}):null),E&&i&&i({trainingData:P,typeKey:a?.key??"",onClose:G,onComplete:ce,popupTitle:String(z),popupSubTitle:a?.subTitle,depth:l!=null?String(l):void 0,popupIcon:ae,popupIconTooltip:String(Be),popupWrapperStyle:ve})]})}const xu=200;function bv(e){return e.itemId?(rb()[e.trainingType]??[]).find(t=>t?.id!=null&&String(t.id)===String(e.itemId))??null:null}function wu({plan:e,groups:t,anchorRect:a,offset:r=12,onClose:s}){const{t:l}=ke.useTranslation(),i=o.useMemo(()=>t?t.map((c,p)=>({key:c.key??c.type?.key??String(p),label:c.label,type:c.type,data:c.items??[]})).filter(c=>c.data.length>0):sb(l).map(c=>{const p=(e?.items??[]).filter(h=>h.trainingType===c.key);return{key:c.key,label:c.label,type:c,pickedCount:p.length,data:p.map(bv).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:ue("training-tooltip__box"),children:n.jsx("div",{className:ue("training-tooltip__groups"),children:i.flatMap(({key:c,label:p,type:h,data:d},m)=>[m>0?n.jsx("div",{className:ue("training-tooltip__divider")},`div-${c}`):null,n.jsxs("div",{className:ue("training-tooltip__section"),children:[n.jsx("div",{className:ue("training-tooltip__section-header"),children:n.jsx("span",{className:ue("training-tooltip__type-label body-3b"),children:p})}),n.jsx("div",{className:ue("training-tooltip__items"),children:d.map((b,y)=>n.jsx(Io,{index:y,type:h,trainingData:b,size:"compact",hideCheckBadge:!0},String(b.id??y)))})]},c)])})});return a?n.jsx(Bn,{anchorRect:a,offset:r,onClose:s,closeOnOutsideClick:!1,className:ue("training-tooltip"),ariaLabel:l("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const gv=200;function yv({icon:e,count:t,title:a,plan:r,tooltip:s=!0,hoverAccent:l=!1,className:i="",onClick:u,onMouseEnter:c,onMouseLeave:p}){const h=!!u||!!c||s&&!!r,d=De("count-tile",h&&"count-tile--interactive",h&&l&&"count-tile--accent",u&&"count-tile--clickable",i),m=o.useRef(null),[b,y]=o.useState(null),C=o.useRef(null),f=o.useRef(null),x=!!(b&&r&&s),g=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),f.current&&(clearTimeout(f.current),f.current=null)},[]),w=o.useCallback(()=>{g(),y(null)},[g]),_=o.useCallback(()=>{!s||!r||(g(),C.current=setTimeout(()=>{C.current=null,y(m.current?.getBoundingClientRect()??null)},xu))},[s,r,g]),E=o.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null),!f.current&&(f.current=setTimeout(()=>{f.current=null,y(null)},gv))},[]);return o.useEffect(()=>()=>{g()},[g]),o.useEffect(()=>{(!s||!r)&&w()},[s,r,w]),o.useEffect(()=>{if(!x)return;const v=k=>k instanceof Element&&(m.current?.contains(k)||!!k.closest(".training-tooltip")),N=k=>{v(k.target)?g():E()};return document.addEventListener("pointerover",N,!0),()=>document.removeEventListener("pointerover",N,!0)},[x,g,E]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{ref:m,className:d,onClick:u?v=>{w(),u(v)}:void 0,onKeyDown:u?v=>{v.key!=="Enter"&&v.key!==" "||(v.preventDefault(),v.currentTarget.click())}:void 0,onPointerEnter:v=>{v.pointerType==="touch"||v.pointerType==="pen"?w():_()},onMouseEnter:c,onMouseLeave:v=>{E(),p?.(v)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${a} ${t}`,children:[n.jsx(lt,{icon:e,size:20,className:"count-tile__icon"}),n.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:t})]}),b&&r&&n.jsx(wu,{plan:r,anchorRect:b,onClose:w})]})}let Qa=0,Bu="",Oo="",er=0;function ku(){return Au(!1)}function vv(){return Au(!0)}function Au(e){const t=typeof document<"u";Qa===0&&t&&(Bu=document.body.style.overflow,document.body.style.overflow="hidden"),e&&t&&(er===0&&(Oo=document.body.style.paddingRight),er++,document.body.style.paddingRight="0px"),Qa++;let a=!1;return()=>{a||(a=!0,Qa=Math.max(0,Qa-1),e&&t&&(er=Math.max(0,er-1),er===0&&(Oo?document.body.style.paddingRight=Oo:document.body.style.removeProperty("padding-right"))),Qa===0&&t&&(document.body.style.overflow=Bu))}}function _v(){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 xv({open:e,onClose:t,ariaLabel:a,title:r,children:s,size:l="md",closeOnBackdrop:i=!0,closeOnEscape:u=!0,showClose:c=!0,className:p,contentClassName:h}){const{t:d}=ke.useTranslation(),m=o.useId(),b=o.useRef(null),y=o.useCallback(()=>t(),[t]);o.useEffect(()=>{if(!e)return;const g=document.activeElement,w=ku(),_=b.current;return xo(_,g),_?.focus(),()=>{w();const E=document.activeElement;(!E||E===document.body||_&&_.contains(E))&&wo(g)?.focus?.()}},[e]);const C=o.useRef(y),f=o.useRef(u);o.useEffect(()=>{C.current=y,f.current=u}),o.useEffect(()=>{if(e)return ea(()=>{f.current&&C.current()})},[e]);const x=o.useRef(!1);return vo(b,e),!e||typeof document>"u"?null:hn.createPortal(n.jsx("div",{className:De("dialog",p),onPointerDown:i?g=>{x.current=g.target===g.currentTarget}:void 0,onMouseDown:g=>{g.target===g.currentTarget&&g.preventDefault()},onClick:i?g=>{const w=x.current;x.current=!1,w&&g.target===g.currentTarget&&y()}:void 0,children:n.jsxs("div",{ref:b,role:"dialog","aria-modal":"true","aria-label":r?void 0:a,"aria-labelledby":r?m:void 0,tabIndex:-1,className:De("dialog__surface",`dialog__surface--${l}`,h),onClick:g=>g.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":d("common.close","\uB2EB\uAE30"),onClick:y,children:n.jsx(_v,{})}):null,n.jsx("div",{className:"dialog__body",children:s})]})}),document.body)}function wv({columns:e,rows:t,rowKey:a,title:r,toolbar:s,empty:l,loading:i,caption:u,className:c=""}){const{t:p}=ke.useTranslation(),h=!i&&t.length===0;return n.jsxs("div",{className:De("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(d=>n.jsx("th",{scope:"col",className:De("board__th",`board__cell--${d.headerAlign??d.align??"left"}`),style:d.width?{width:d.width}:void 0,children:d.header},d.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??p("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):t.map((d,m)=>n.jsx("tr",{className:"board__row",children:e.map(b=>n.jsx("td",{className:De("board__td",`board__cell--${b.align??"left"}`),children:b.render(d,m)},b.key))},a(d,m)))})]})]})}function Bv({name:e,role:t,photo:a,media:r,credentials:s,size:l=190,className:i=""}){return n.jsxs("div",{className:De("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 kv({groups:e,className:t=""}){return n.jsx("div",{className:De("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 Av({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:De("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 Nv({logo:e,alt:t,onDone:a,durationMs:r=3e3}){const s=Ha(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 Ev({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:De("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 Dv({items:e,className:t=""}){return n.jsx("ul",{className:De("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 tr=new Map;function _n(e){const{t}=ke.useTranslation(),{options:a=[],value:r=a.find(_=>!_.disabled)?.key??a[0]?.key,onChange:s=_=>{},className:l="",size:i=Lt,shape:u="pill",useBG:c=!0,fullWidth:p=!1,minButtonWidth:h,ariaLabel:d}=e||{},m=o.useRef(null),b=a.filter(_=>!_.disabled),y=o.useId(),C=a.map(_=>_.key).join("\xB7");o.useEffect(()=>{if(!(!Wn||d!=null&&d!=="")){if(tr.set(y,C||"(\uBCF4\uAE30 \uC5C6\uC74C)"),tr.size>1){const _=[...tr.values()].sort();Dt(`segmented-control-unnamed:${_.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${tr.size} \uAC1C \uC11C \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uB0AD\uB3C5\uAE30\uB294 \uBAA8\uB450 "\uC120\uD0DD \uD0ED" \uC73C\uB85C \uC77D\uC5B4 \uC5B4\uB290 \uAC83\uC774 \uBB34\uC5C7\uC778\uC9C0 \uAC00\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. ariaLabel \uC744 \uC8FC\uC138\uC694. \uC9C0\uAE08 \uC120 \uAC83(\uBCF4\uAE30 \uC774\uB984\uC73C\uB85C \uC801\uC74C): ${_.join(" / ")}`)}return()=>{tr.delete(y)}}},[d,C,y]);const f=_=>{if(!b.length)return;const E=Math.max(0,b.findIndex(N=>N.key===r)),v=_==="first"?b[0]:_==="last"?b[b.length-1]:b[(E+_+b.length)%b.length];v&&(s(v.key),Array.from(m.current?.querySelectorAll("[data-segkey]")??[]).find(N=>N.dataset.segkey===v.key)?.focus())},x=_=>{switch(_.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}_.preventDefault()},g=_=>{const E=v=>typeof v=="string"||typeof v=="number";if(!(!E(_.label)||_.count==null||_.count===!1||!E(_.count)))return`${_.label}, ${_.count}`},w=b.some(_=>_.key===r)?r:b[0]?.key;return n.jsx("div",{ref:m,onKeyDown:x,className:De("segmented-control",`segmented-control--${u}`,`segmented-control--${i}`,p&&"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":d??t("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:a.map(_=>n.jsx(be,{htmlType:"button",role:"radio","aria-checked":_.key===r,"data-segkey":_.key,tabIndex:_.key===w?0:-1,label:_.label,count:_.count,ariaLabel:g(_),disabled:_.disabled,className:_.key===r?"is-selected":"",onClick:()=>{_.disabled||s(_.key)},size:i,shape:u,useBorder:!1,useBG:!1},_.key))})}const Sv=260;function Fn(e){const{t}=ke.useTranslation(),{title:a,subtitle:r,headerActions:s,headerSegment:l,children:i,buttons:u,footer:c,footerStart:p,footerEnd:h,footerNote:d,footerNoteDivider:m=!1,footerClassName:b="",footerLayout:y="center",onClose:C,closeDisabled:f=!1,beforeClose:x,closeOnBackdrop:g=!0,className:w="",ariaLabel:_,useTitle:E=!0,inline:v=!1,size:N,layer:k="modal",height:D,fillBody:A=!1,resetScrollKey:B}=e||{},[F,L]=o.useState(!1),q=o.useRef(!1),M=o.useRef(null),O=o.useId(),T=o.useRef(null);o.useEffect(()=>{},[v,a,_,w]),o.useEffect(()=>{B!==void 0&&T.current&&(T.current.scrollTop=0)},[B]);const[G,K]=o.useState(!1);o.useEffect(()=>{const H=T.current;if(!H)return;const te=()=>K(H.scrollHeight>H.clientHeight+1);if(te(),typeof ResizeObserver>"u")return;const W=new ResizeObserver(te);W.observe(H);const z=H.firstElementChild;return z&&W.observe(z),()=>W.disconnect()},[i,B]),o.useEffect(()=>{if(!v)return ku()},[v]);const ee=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(v)return;const H=ee.current,te=M.current;return xo(te,H),te&&!te.contains(document.activeElement)&&(te.querySelector(Dn)??te).focus(),()=>{const W=document.activeElement;(!W||W===document.body||te&&te.contains(W))&&wo(H)?.focus?.()}},[v]),vo(M,!v);const re=o.useRef(!0),R=Bo(),J=o.useRef(null);o.useEffect(()=>(re.current=!0,()=>{re.current=!1,J.current&&(clearTimeout(J.current),J.current=null)}),[]);const ne=o.useCallback(()=>{!re.current||!q.current||(q.current=!1,L(!1))},[]),S=o.useCallback((H,te=!1)=>{if(te&&!re.current||q.current)return;q.current=!0,L(!0);const W=setTimeout(()=>{J.current===W&&(J.current=null);let z;try{z=H?H():void 0}catch{ne();return}z&&typeof z.then=="function"&&z.then(()=>{setTimeout(ne,120)},ne)},R?0:Sv);te&&(J.current=W)},[ne,R]),$=o.useCallback(()=>{f||x&&x()===!1||S(C,!0)},[S,C,f,x]),I=o.useRef($);o.useEffect(()=>{I.current=$});const P=!v&&!!C;o.useEffect(()=>{if(P)return ea(()=>I.current())},[P]);const V=P&&g,ie=o.useRef(!1),U=H=>{ie.current=H.target===H.currentTarget},ce=H=>{const te=ie.current;ie.current=!1,te&&H.target===H.currentTarget&&$()},Z=n.jsx("div",{className:`popup ${v?"popup--inline":""} ${k==="belowPagePopup"?"popup--below-page-popup":""} ${F?"popup--closing":""} ${w}`,onPointerDown:V?U:void 0,onClick:V?ce:void 0,onMouseDown:v?void 0:H=>{H.target===H.currentTarget&&H.preventDefault()},children:n.jsxs("div",{ref:M,className:`popup-panel${N?` popup-panel--${N}`:""}${D!=null?" popup-panel--has-height":""}${A?" popup-panel--fill-body":""}`,style:D!=null?{"--popup-height":typeof D=="number"?`${D}px`:D}:void 0,tabIndex:-1,role:v?void 0:"dialog","aria-modal":v?void 0:!0,"aria-labelledby":!v&&E&&a?O:void 0,"aria-label":!v&&!(E&&a)?_??(typeof a=="string"?a:void 0):void 0,children:[!E&&(s||C)?n.jsxs("div",{className:"popup-close-float",children:[s,C&&n.jsx(be,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:$,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:O,className:"popup-title popup-title--left h2",children:a}):n.jsx("span",{id:O,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(_n,{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(be,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:$,disabled:f,ariaLabel:t("common.close","\uB2EB\uAE30")})]})]})]}):null,n.jsx("div",{className:"popup-content",ref:T,tabIndex:G?0:void 0,children:n.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:S,closeWithAnimation:$}):i})}),d!=null&&d!==!1&&n.jsx("div",{className:`popup-footer-note caption-1${m?" popup-footer-note--divider":""}`,role:"note",children:d}),p||h?n.jsxs("div",{className:`popup-footer popup-footer--bar${b?` ${b}`:""}`,children:[n.jsx("div",{className:"popup-footer__start",children:typeof p=="function"?p({animateThen:S,closeWithAnimation:$}):p}),n.jsx("div",{className:"popup-footer__end",children:typeof h=="function"?h({animateThen:S,closeWithAnimation:$}):h})]}):u?.length?n.jsx("div",{className:`popup-footer popup-footer--buttons${y!=="center"?` popup-footer--${y}`:""}`,children:u.map((H,te)=>n.jsx(be,{htmlType:"button",size:48,variant:H.variant??"default",label:H.label,disabled:H.disabled,onClick:()=>H.onClick?.({animateThen:S,closeWithAnimation:$})},te))}):c?n.jsx("div",{className:`popup-footer${y!=="center"?` popup-footer--${y}`:""}${b?` ${b}`:""}`,children:typeof c=="function"?c({animateThen:S,closeWithAnimation:$}):c}):null]})});return v||typeof document>"u"?Z:hn.createPortal(Z,document.body)}function Nu({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:p=>t?.(p.target.checked),"aria-label":!r&&s?s:void 0}),n.jsx("span",{className:"toggle__slider"}),l==="right"&&c]})}function xn({options:e,value:t,onChange:a,placeholder:r,disabled:s=!1,block:l=!1,size:i=Lt,error:u=!1,className:c="",ariaLabel:p,ariaDescribedBy:h}){const{t:d}=ke.useTranslation(),m=r??d("dropdown.placeholder","\uC120\uD0DD"),b=o.useId(),y=o.useId(),C=o.useRef(null),f=o.useCallback((M,O)=>{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:qa(O)}},[]),{open:x,setOpen:g,toggle:w,style:_,triggerRef:E,menuRef:v}=Ua({computeStyle:f}),[N,k]=o.useState(-1),D=o.useCallback(()=>k(-1),[]),A=e.find(M=>M.value===t);o.useEffect(()=>{if(x){const M=e.findIndex(O=>O.value===t);k(M>=0?M:e.length?0:-1),requestAnimationFrame(()=>{const O=v.current;if(!O)return;const T=O.querySelectorAll(".dropdown__option")[M];T&&(O.scrollTop=Math.max(0,T.offsetTop-O.clientHeight/2+T.clientHeight/2))})}},[x]),o.useEffect(()=>{x&&k(M=>{if(M>=0&&M<e.length)return M;const O=e.findIndex(T=>T.value===t);return O>=0?O:e.length?0:-1})},[x,e.length]);const B=o.useCallback(()=>{s||w()},[s,w]),F=o.useCallback(M=>{M.disabled||s||(M.value!==t&&a?.(M.value),g(!1))},[a,g,s,t]);o.useEffect(()=>{s&&g(!1)},[s,g]);const L=o.useCallback(M=>{if(!s){if(!x){(M.key==="Enter"||M.key===" "||M.key==="ArrowDown")&&(M.preventDefault(),g(!0));return}if(M.key==="Escape"){M.preventDefault(),g(!1);return}M.key==="ArrowDown"?(M.preventDefault(),k(O=>{let T=O+1;for(;T<e.length&&e[T].disabled;)T++;return T<e.length?T:O})):M.key==="ArrowUp"?(M.preventDefault(),k(O=>{let T=O-1;for(;T>=0&&e[T].disabled;)T--;return T>=0?T:O})):(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),e[N]?F(e[N]):g(!1))}},[s,x,e,N,F,g]),q=x?n.jsx("div",{ref:v,id:b,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:_,onMouseLeave:D,onMouseDown:M=>M.preventDefault(),children:e.map((M,O)=>n.jsxs("button",{id:`${b}-option-${O}`,type:"button",role:"option","aria-selected":M.value===t,className:De("dropdown__option body-2",M.value===t?"dropdown__option--active":"",O===N?"dropdown__option--active":"",M.disabled?"dropdown__option--disabled":""),onMouseDown:T=>T.preventDefault(),onClick:()=>F(M),onMouseEnter:()=>k(O),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:De("dropdown",`dropdown--s${i}`,x?"dropdown--open":"",l?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:L,children:[n.jsxs("button",{ref:E,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":x,"aria-controls":x?b:void 0,"aria-activedescendant":x&&N>=0?`${b}-option-${N}`:void 0,"aria-label":p,"aria-describedby":[p&&A?y:"",h??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:s,onClick:B,onBlur:M=>{x&&!v.current?.contains(M.relatedTarget)&&g(!1)},children:[n.jsx("span",{id:y,className:`dropdown__trigger-label body-2${A?"":" dropdown__trigger-label--placeholder"}`,children:A?A.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(q,C.current?.closest(".ihabdevteam-core-scope")??document.body)]})}const jv={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function Eu(e){return e?jv[e]??null:null}function Du(e){switch(Eu(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Su(e,t){const a=Eu(e);return a?t(`device.type.${a}`,{defaultValue:e??""}):e??""}const _a=e=>e==null?"":String(e).trim();function zo(e,t,a,r){const s=_a(e),l=_a(t),i=_a(a);if(r&&s&&l&&i){const c=`${s.padStart(4,"0")}-${l.padStart(2,"0")}-${i.padStart(2,"0")}`,p=new Date(c);if(!Number.isNaN(p.getTime())&&p.toISOString().slice(0,10)===c){const h=Kl(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 Tv(e,t,a){const r=_a(e);return r?`${r}-${_a(t).padStart(2,"0")}-${_a(a).padStart(2,"0")}`:""}function ju(e){return typeof e=="string"?e:e.label}function Tu({value:e,onChange:t,suggestions:a,openOnFocus:r=!1,filterSuggestions:s,onSelectSuggestion:l,autoActiveFirst:i=!1}){const u=o.useId(),[c,p]=o.useState(!1),[h,d]=o.useState(-1),m=o.useRef(null),b=o.useMemo(()=>{if(!a.length)return[];const B=e??"";return s===!1?a:B?typeof s=="function"?s(a,B):a.filter(F=>ju(F).toLowerCase().includes(B.toLowerCase())):r?a:[]},[a,e,r,s]),[y,C]=o.useState(!1),f=o.useRef([]),x=y&&b.length===0?f.current:b;o.useEffect(()=>{x.length&&(f.current=x)},[x]);const g=o.useCallback(()=>C(!0),[]),w=o.useCallback(()=>C(!1),[]),_=i?0:-1;o.useEffect(()=>{c||d(_)},[c,_]),o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const E=h<x.length?h:_<x.length?_:-1,v=o.useCallback(B=>{l?l(B):t?.(ju(B)),p(!1)},[t,l]),N=o.useCallback(()=>p(!0),[]),k=o.useCallback(()=>{p(!0),d(_)},[_]),D=o.useCallback(()=>{m.current=setTimeout(()=>p(!1),120)},[]),A=o.useCallback(B=>{B.nativeEvent.isComposing||B.keyCode===229||(B.key==="ArrowDown"?(B.preventDefault(),p(!0),d(F=>Math.min(x.length-1,(F<x.length?F:_)+1))):B.key==="ArrowUp"?(B.preventDefault(),d(F=>Math.max(_,(F<x.length?F:x.length)-1))):B.key==="Enter"?E>=0&&v(x[E]):B.key==="Escape"&&c&&(B.preventDefault(),p(!1)))},[x,E,c,v,_]);return{listId:u,open:c,activeIdx:E,filtered:x,handleFocus:N,handleBlur:D,handleInput:k,handleKeyDown:A,handleSelect:v,handleCompositionStart:g,handleCompositionEnd:w}}const Wo=typeof window<"u"?o.useLayoutEffect:o.useEffect;function Yn(e){const{value:t,defaultValue:a,name:r,inputRef:s,onChange:l,label:i,ariaLabel:u,ariaDescribedBy:c,required:p,placeholder:h,ghostText:d,ghostHint:m,type:b="text",disabled:y=!1,readOnly:C=!1,error:f,helperText:x,maxLength:g,size:w=Lt,variant:_="input",fullWidth:E=!1,newline:v=!1,multiline:N=!1,rows:k=3,leftIcon:D,rightIcon:A,clearable:B=!1,list:F,showCount:L=!0,className:q="",onFocus:M,onBlur:O,onKeyDown:T,onEnter:G,inputMode:K,autoComplete:ee,autoFocus:re,suggestions:R,filterSuggestions:J,onSelectSuggestion:ne,autoActiveFirst:S,openOnFocus:$=!1}=e,I=C||y?void 0:R,{t:P}=ke.useTranslation(),V=o.useId();!i&&!u&&Dt(`TextField:unnamed:${V}`,"[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-${V}`,U=`tf-helper-${V}`,ce=o.useRef(null),Z=Tu({value:t??"",onChange:l,suggestions:I??[],openOnFocus:$,filterSuggestions:J,onSelectSuggestion:ne,autoActiveFirst:S}),H=!!I&&Z.open&&Z.filtered.length>0,te=o.useRef(null),[W,z]=o.useState(null),ae=o.useCallback(()=>{const Ee=te.current;if(!Ee||typeof window>"u")return;const Ue=Ee.getBoundingClientRect(),Ne=230,Ye=window.innerHeight-Ue.bottom<Ne+8&&Ue.top>Ne+8;z({position:"fixed",left:Ue.left,width:Ue.width,...Ye?{bottom:window.innerHeight-Ue.top+8}:{top:Ue.bottom+8},zIndex:qa(Ee)})},[]);Wo(()=>{if(!H)return;ae();let Ee=null;const Ue=()=>{if(typeof requestAnimationFrame>"u"){ae();return}Ee===null&&(Ee=requestAnimationFrame(()=>{Ee=null,ae()}))},Ne=Ye=>{const et=Ye.target;et&&et.nodeType===1&&et.closest?.(".text-field__suggestions")||Ue()};return window.addEventListener("scroll",Ne,!0),window.addEventListener("resize",Ue),()=>{Ee!==null&&cancelAnimationFrame(Ee),window.removeEventListener("scroll",Ne,!0),window.removeEventListener("resize",Ue)}},[H,ae]);const ve=o.useCallback(Ee=>{ce.current=Ee,typeof s=="function"?s(Ee):s&&(s.current=Ee)},[s]),me=d?`${d}${m??P("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:h,le=t!==void 0,Be=le&&b==="password",[Pe,Fe]=o.useState((a??"").length),Ae=le?(t??"").length:Pe,se=o.useRef(t);Wo(()=>{se.current=t}),o.useEffect(()=>{const Ee=ce.current;if(!Be||!Ee)return;const Ue=t??"";Ee.value!==Ue&&(Ee.value=Ue)},[Be,t]),o.useEffect(()=>{if(!v||!ce.current)return;const Ee=ce.current;Ee.style.height="",Ee.scrollHeight>Ee.clientHeight&&(Ee.style.height=`${Ee.scrollHeight}px`)},[t,Pe,v]);const ye=g!=null&&Ae>g,Ce=w===32?16:20,xe=De("text-field",`text-field--s${w}`,_==="display"?"text-field--display":"",E?"text-field--full-width":"",y?"text-field--disabled":"",C?"text-field--readonly":"",f?"text-field--error":"",D?"text-field--has-left-icon":"",A||B?"text-field--has-right-icon":"",q),$e={id:ie,...Be?{}:le?{value:t}:{defaultValue:a},ref:ve,placeholder:me,name:r,disabled:y,readOnly:C,autoFocus:re,maxLength:g,list:F,inputMode:K,autoComplete:ee,"aria-label":!i&&u?u:void 0,"aria-required":p,"aria-invalid":!!f,"aria-describedby":[x||f?U: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?H:void 0,"aria-controls":H?Z.listId:void 0,"aria-activedescendant":H&&Z.activeIdx>=0?`${Z.listId}-option-${Z.activeIdx}`:void 0,onChange:Ee=>{const Ue=Ee.target;le||Fe(Ue.value.length),l?.(Ue.value),I&&Z.handleInput(),Be&&queueMicrotask(()=>{const Ne=se.current??"";Ue.value!==Ne&&(Ue.value=Ne)})},onCompositionStart:I?Z.handleCompositionStart:void 0,onCompositionEnd:I?Z.handleCompositionEnd:void 0,onFocus:(Ee=>{M?.(Ee),I&&Z.handleFocus()}),onBlur:(Ee=>{O?.(Ee),I&&Z.handleBlur()}),onKeyDown:(Ee=>{const Ue=(Ee.key==="Tab"&&!Ee.shiftKey||Ee.key===" ")&&!Ee.nativeEvent.isComposing;if(d&&Ue&&!C&&!y&&!(Ee.currentTarget.value??"").trim()){Ee.preventDefault();const Ne=Ee.currentTarget;le||(Ne.value=d,Fe(d.length)),l?.(d);return}I&&Ee.key==="Enter"&&!Ee.nativeEvent.isComposing&&Z.activeIdx>=0?Ee.preventDefault():G&&Ee.key==="Enter"&&!Ee.nativeEvent.isComposing&&(Ee.preventDefault(),G()),T?.(Ee),I&&Z.handleKeyDown(Ee)})},nt=B&&!y&&!C&&Ae>0,ct=()=>v?n.jsx("textarea",{...$e,className:"text-field__input text-field__input--auto body-2",rows:1}):N?n.jsx("textarea",{...$e,className:"text-field__input text-field__input--textarea body-2",rows:k}):n.jsx("input",{...$e,type:b,className:"text-field__input body-2"}),at=_==="display"&&!v&&!N&&!!me,rt=()=>n.jsxs(n.Fragment,{children:[ct(),at&&n.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:me})]});return n.jsxs("div",{ref:te,className:xe,children:[i&&n.jsxs("label",{htmlFor:ie,className:"text-field__label caption-1",children:[i,p&&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(lt,{icon:D,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ce})}),rt(),g!=null&&L&&n.jsxs("span",{className:`text-field__count caption-2${ye?" text-field__count--over":""}`,children:[Ae,"/",g]}),nt&&n.jsx(be,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:P("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:Ee=>{Ee.preventDefault()},onClick:()=>{!le&&ce.current&&(ce.current.value="",Fe(0)),l?.("")},tabIndex:-1}),A&&!nt&&n.jsx("span",{className:"text-field__icon text-field__icon--right",children:n.jsx(lt,{icon:A,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ce})})]}),!!I&&n.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:Z.open&&(t??"").length>0&&Z.filtered.length===0?P("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),H&&(typeof document>"u"?null:hn.createPortal(n.jsx("ul",{id:Z.listId,className:"text-field__suggestions",role:"listbox",style:W??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:Z.filtered.map((Ee,Ue)=>n.jsx("li",{id:`${Z.listId}-option-${Ue}`,role:"option","aria-selected":Ue===Z.activeIdx,className:`text-field__suggestion body-2${Ue===Z.activeIdx?" is-active":""}`,onMouseDown:Ne=>Ne.preventDefault(),onClick:()=>{Z.handleSelect(Ee),ce.current?.focus()},children:typeof Ee=="string"?Ee:n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-field__suggestion-label",children:Ee.label}),Ee.hint&&n.jsx("span",{className:"text-field__suggestion-hint caption-1",children:Ee.hint})]})},typeof Ee=="string"?`${Ee}-${Ue}`:Ee.id))}),document.body)),(x||f)&&n.jsx("div",{className:"text-field__footer",children:n.jsx("span",{id:U,className:"text-field__helper caption-1",role:f?"alert":void 0,children:f||x})})]})}const Mu=()=>{};function un(e){const t=o.useId();if(!("variant"in e)){const{label:g,sub:w,onClick:_,children:E,align:v="horizontal",icon:N,useFullWidth:k=!1}=e,D=A=>{_&&A.target===A.currentTarget&&(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),_())};return n.jsxs("div",{className:De("panel-row",v==="vertical"?"panel-row--vertical":"",k?"panel-row--label-fixed panel-row--fill":"",_?"panel-row--clickable":""),onClick:_,onKeyDown:_?D:void 0,role:_?"button":void 0,tabIndex:_?0:void 0,children:[N!=null&&n.jsx("div",{className:"panel-row__icon",children:N}),g!=null&&n.jsxs("div",{className:"panel-row__left",children:[n.jsx("div",{className:"panel-row__label body-3",children:g}),w&&n.jsx("div",{className:"panel-row__sub caption-1",children:w})]}),n.jsx("div",{className:"panel-row__right",children:E})]})}if(e.variant==="description")return n.jsx("div",{className:"panel-row panel-row--block",children:n.jsx("p",{className:"panel-row__description body-3",children:e.children})});if(e.variant==="empty")return n.jsx("div",{className:"panel-row panel-row--empty body-3",children:e.children});if(e.variant==="loading")return n.jsx("div",{className:"panel-row panel-row--loading",children:n.jsx(ga,{size:28})});if(e.variant==="custom"&&!e.label)return n.jsx("div",{className:"panel-row panel-row--block",children:e.children});const{variant:a,label:r,sub:s,onClick:l,required:i,error:u,align:c="horizontal",useFullWidth:p=!1,icon:h}=e,d=a==="button"?void 0:l;let m=null;const b=a==="toggle"?`panel-toggle-${t}`:void 0,y=u?`panel-error-${t}`:void 0,C=`panel-helper-${t}`;if(a==="toggle"){const g=e;m=n.jsx(Nu,{checked:g.checked,onChange:g.onChange,id:b})}else if(a==="segmented"){const g=e;m=n.jsx(_n,{options:g.options,value:g.value,onChange:g.onChange,size:g.size??Lt,ariaLabel:r})}else if(a==="dropdown"){const g=e,w=g.dropdowns?.length?n.jsx("div",{className:`panel-row__dropdown-group${p?" panel-row__dropdown-group--full":""}`,children:g.dropdowns.map((_,E)=>n.jsx("div",{className:p?"panel-row__dropdown-item--full":void 0,children:n.jsx(xn,{options:_.options,value:_.value,onChange:_.onChange,size:Lt,placeholder:_.placeholder,block:p,error:!!u,ariaDescribedBy:y,ariaLabel:_.ariaLabel??([r,_.placeholder].filter(Boolean).join(" ")||void 0)})},E))}):n.jsx(xn,{options:g.options??[],value:g.value??"",onChange:g.onChange??Mu,size:Lt,block:p,error:!!u,ariaLabel:r,ariaDescribedBy:y});m=u?n.jsxs("div",{className:`panel-row__dropdown-error-wrap${p?" 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 g=e;g.buttons?.length?m=n.jsx("div",{className:"panel-row__button-group",children:g.buttons.map((w,_)=>n.jsx(be,{htmlType:"button",size:w.btnSize??Lt,variant:w.btnVariant??"default",disabled:w.disabled,onClick:w.onClick,children:w.label},_))}):m=n.jsx(be,{htmlType:"button",size:g.btnSize??Lt,variant:g.btnVariant??"default",disabled:g.disabled,onClick:g.onClick,children:g.buttonLabel})}else if(a==="text"){const g=e;m=n.jsx("span",{className:`panel-row__text body-2${p?" panel-row__text--full":""}`,style:g.valueColor?{color:g.valueColor}:void 0,children:g.value})}else if(a==="input"){const g=e;m=n.jsxs("div",{className:`panel-row__input-wrap${p?" panel-row__input-wrap--full":""}`,children:[n.jsx(Yn,{size:Lt,value:g.value,onChange:g.onChange??Mu,onKeyDown:g.onKeyDown,onEnter:g.onEnter,placeholder:g.placeholder,ghostText:g.ghostText,inputMode:g.inputMode,readOnly:g.readOnly,disabled:g.disabled,type:g.type,autoComplete:g.autoComplete,maxLength:g.maxLength,showCount:g.showCount,multiline:g.multiline,rows:g.rows,fullWidth:p,error:u,ariaLabel:r,required:i,ariaDescribedBy:g.helperText?C:void 0}),g.helperText&&n.jsx("div",{id:C,className:"panel-row__helper caption-1",children:g.helperText})]})}else a==="custom"&&(m=e.children);u&&a!=="input"&&a!=="dropdown"&&(m=n.jsxs("div",{className:`panel-row__dropdown-error-wrap${p?" 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")&&p,x=g=>{d&&g.target===g.currentTarget&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),d())};return n.jsxs("div",{className:De("panel-row",c==="vertical"?"panel-row--vertical":"",f?"panel-row--label-fixed":"",a==="text"?"panel-row--text":"",d?"panel-row--clickable":""),onClick:d,onKeyDown:d?x:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,children:[h!=null&&n.jsx("div",{className:"panel-row__icon",children:h}),n.jsxs("div",{className:"panel-row__left",children:[b?n.jsxs("label",{htmlFor:b,className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}):n.jsxs("div",{className:"panel-row__label body-3",children:[r,i&&n.jsx("span",{className:"required-mark",children:"*"})]}),s&&n.jsx("div",{className:"panel-row__sub caption-1",children:s})]}),n.jsx("div",{className:"panel-row__right",children:m})]})}function Lu(e){const t=e.productName||e.brand,a=[e.brand,e.fitType].filter(r=>!!r&&r!==t);return[...new Set(a)].join(" \xB7 ")}function Mv({devices:e,onRelease:t,emptyLabel:a}){const{t:r,i18n:s}=ke.useTranslation();return n.jsx("div",{className:"panel-row panel-row--device",children:["left","right"].map(l=>{const i=e[l],u=l==="left"?r("device.direction.left","\uC88C"):r("device.direction.right","\uC6B0");return n.jsxs("div",{className:"panel-row__device-column",children:[n.jsxs("div",{className:"panel-row__device-head",children:[n.jsx("span",{className:"panel-row__device-side body-2b",children:u}),i&&t&&n.jsx(be,{htmlType:"button",size:32,type:"dot",icon:"x",ariaLabel:`${u} ${r("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C")}`,showTooltipInfo:r("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"),onClick:()=>t(l)})]}),i?n.jsxs("div",{className:"panel-row__device-info",children:[n.jsxs("span",{className:"panel-row__device-kind",children:[i.device&&n.jsx(ln,{size:"small",variant:Du(i.device),fill:"soft",label:Su(i.device,r)}),Lu(i)&&n.jsx("span",{className:"panel-row__device-detail body-3",children:Lu(i)})]}),n.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),zo(i.wornYear,i.wornMonth,i.wornDay,s.language)&&n.jsx("span",{className:"panel-row__device-date caption-1",children:r("customers.device.wornSince",{date:zo(i.wornYear,i.wornMonth,i.wornDay,s.language)})})]}):n.jsx("span",{className:"panel-row__device-empty body-3",children:a??r("customers.device.notRegistered","\uBBF8\uB4F1\uB85D")})]},l)})})}function nr({title:e,titleLevel:t=2,icon:a,disc:r,actions:s,size:l="medium",minHeight:i,maxWidth:u,className:c,scrollable:p,scrollbarGutter:h="auto",compactRows:d=!1,useBorder:m=!0,useBg:b=!0,useRowBorder:y=!0,labelWidth:C,form:f=!1,loading:x,empty:g,children:w}){const _=De("panel",`panel--${l}`,f?"panel--form":"",i!==void 0?"panel--fill":"",m?"":"panel--no-border",b?"":"panel--no-bg",y?"":"panel--no-row-border",d?"panel--compact-rows":"",c),E={};i!==void 0&&(E.minHeight=i),u!==void 0&&(E.maxWidth=typeof u=="number"?`${u}px`:u),C!==void 0&&(E["--panel-label-width"]=typeof C=="number"?`${C}px`:C);const v=t?`h${t}`:"div";return n.jsxs("div",{className:_,style:Object.keys(E).length?E:void 0,children:[(!!e||r!=null)&&n.jsxs("div",{className:De("panel__header",r!=null?"panel__header--with-disc":""),children:[a&&n.jsx(lt,{icon:a,label:typeof e=="string"?e:void 0,className:"panel__icon"}),n.jsxs("div",{className:"panel__title-group",children:[!!e&&n.jsx(v,{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})]}),x?n.jsx(un,{variant:"loading"}):g!=null&&o.Children.toArray(w).length===0?n.jsx(un,{variant:"empty",children:g}):p?n.jsx("div",{className:De("panel__body--scroll",h==="stable"&&"panel__body--gutter-stable"),children:w}):w]})}function Lv({cols:e=2,layout:t="grid",gap:a=1,collapseAt:r,className:s,style:l,children:i}){const u=o.useRef(null),[c,p]=o.useState();o.useEffect(()=>{const d=u.current;if(r===void 0||!d||(p(d.clientWidth),typeof ResizeObserver>"u"))return;const m=new ResizeObserver(([b])=>p(b.contentRect.width));return m.observe(d),()=>m.disconnect()},[r]);const h=r!==void 0&&c!==void 0&&c<=r;return n.jsx("div",{ref:u,className:De("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 Ho({checked:e=!1,onChange:t,disabled:a,indeterminate:r,label:s,size:l="medium",className:i,title:u,ariaLabel:c}){const p=o.useRef(null),h=o.useId(),d=o.useRef(!!r);return d.current=!!r,o.useEffect(()=>{p.current&&(p.current.indeterminate=!!r)}),n.jsxs("label",{className:De("checkbox",l==="small"&&"checkbox--small",l==="large"&&"checkbox--large",a&&"checkbox--disabled",i),htmlFor:h,title:u,children:[n.jsx("input",{ref:p,id:h,type:"checkbox",className:"checkbox__input",checked:e,onChange:m=>{t?.(m.target.checked),p.current&&(p.current.indeterminate=d.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 $u(e,t){const a=()=>{if(e){const[C,f]=e.split("-");return{y:+C,m:+f-1}}const[b,y]=pr(t).split("-");return{y:+b,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 b=a();s(b.y),i(b.m)},[e]);const c=o.useRef({y:r,m:l});o.useEffect(()=>{c.current={y:r,m:l}},[r,l]);const p=o.useCallback(b=>{const y=c.current.y*12+c.current.m+b,C=Math.floor(y/12),f=y-C*12;c.current={y:C,m:f},s(C),i(f)},[]),h=o.useCallback(()=>p(-1),[p]),d=o.useCallback(()=>p(1),[p]),m=o.useCallback((b,y)=>{c.current={y:b,m:y},s(b),i(y)},[]);return{viewY:r,viewM:l,prevMonth:h,nextMonth:d,setViewYM:m}}function kr(e,t){return new Date(e,t+1,0).getDate()}function $v(e,t){return new Date(e,t,1).getDay()}function ar(e,t,a){return`${e}-${String(t+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function Rv(e){if(!e)return"";const[t,a,r]=e.split("-");return`${t}. ${a}. ${r}.`}function Pv(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:ar(a,r-1,s)}const Fv=1900;function Iv(e,t,a,r,s){const l=r?+r.split("-")[0]:Math.min(Fv,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 Ru(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 Pu({value:e,onChange:t,size:a=Lt,min:r,max:s,disabled:l,placeholder:i,className:u,today:c}){const{t:p,i18n:h}=ke.useTranslation(),d=i??p("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),m=o.useMemo(()=>p("calendar.dow",{returnObjects:!0}),[p]),b=pr(c),{viewY:y,viewM:C,prevMonth:f,nextMonth:x,setViewYM:g}=$u(e,c),w=o.useId(),_=o.useCallback((H,te)=>{const W=window.innerHeight,z=window.innerWidth,ae=typeof document<"u"?document.getElementById(w):null,ve=Math.max(ae?.offsetHeight||0,ae?.scrollHeight||0)||300,me=Math.max(H.width,ae?.offsetWidth||0,260),le=W-H.bottom,Be=H.top,Pe=le<ve&&Be>le,Fe=8,Ae=(se,ye)=>Math.min(Math.max(Fe,se),Math.max(Fe,ye));return{position:"fixed",left:Ae(H.left,z-me-Fe),width:H.width,minWidth:260,...Pe?{top:"auto",bottom:Ae(W-H.top+6,W-ve-Fe)}:{bottom:"auto",top:Ae(H.bottom+6,W-ve-Fe)},zIndex:qa(te)}},[w]),{open:E,setOpen:v,toggle:N,style:k,triggerRef:D,menuRef:A}=Ua({computeStyle:_,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!E)return;const H=A.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(Dn)??H)?.focus?.(),()=>{const te=document.activeElement;(!te||te===document.body)&&D.current?.focus?.()}},[E,A,D]);const[B,F]=o.useState(1),L=o.useRef(null),q=o.useRef(null);o.useEffect(()=>{if(!E)return;const H=e&&e.slice(0,7)===`${y}-${String(C+1).padStart(2,"0")}`?+e.slice(8):b.slice(0,7)===`${y}-${String(C+1).padStart(2,"0")}`?+b.slice(8):1;F(H)},[E]),o.useEffect(()=>{if(q.current==null)return;const H=q.current;q.current=null,L.current?.querySelector(`[data-day="${H}"]`)?.focus()}),o.useEffect(()=>{F(H=>Math.min(H,kr(y,C)))},[y,C]);const M=o.useCallback(H=>{let te=ar(H.getFullYear(),H.getMonth(),H.getDate());r&&te<r&&(te=r),s&&te>s&&(te=s);const[W,z,ae]=te.split("-").map(Number);(W!==y||z-1!==C)&&g(W,z-1),F(ae),q.current=ae},[r,s,y,C,g]),O=o.useCallback(H=>{const te=new Date(y,C,B),W=ae=>{te.setDate(te.getDate()+ae),M(te)},z=ae=>{const ve=te.getFullYear()*12+te.getMonth()+ae,me=Math.floor(ve/12),le=ve-me*12;M(new Date(me,le,Math.min(te.getDate(),kr(me,le))))};switch(H.key){case"ArrowLeft":W(-1);break;case"ArrowRight":W(1);break;case"ArrowUp":W(-7);break;case"ArrowDown":W(7);break;case"Home":W(-te.getDay());break;case"End":W(6-te.getDay());break;case"PageUp":H.shiftKey?z(-12):z(-1);break;case"PageDown":H.shiftKey?z(12):z(1);break;default:return}H.preventDefault()},[y,C,B,M]),T=o.useCallback(H=>{l||(t(ar(y,C,H)),v(!1))},[y,C,t,v,l]);o.useEffect(()=>{l&&v(!1)},[l,v]);const G=H=>{const te=ar(y,C,H);return!!(r&&te<r||s&&te>s)},K=(()=>{const H=kr(y,C);if(B>=1&&B<=H&&!G(B))return B;for(let te=1;te<=H;te++)if(!G(te))return te;return-1})(),ee=[];for(let H=0;H<$v(y,C);H++)ee.push(null);for(let H=1;H<=kr(y,C);H++)ee.push(H);const re=a===64?20:a===32?14:a===40?16:18,R=mo(h.language),J=H=>new Intl.DateTimeFormat(R,{year:"numeric"}).format(new Date(H,0,1)),ne=(H,te)=>new Intl.DateTimeFormat(R,{month:"long"}).format(new Date(H,te-1,1)),S=Iv(y,+b.slice(0,4),J,r,s),$=Ru(y,ne,r,s),I=H=>{const te=Ru(H,ne,r,s);if(te.length===0)return;const W=te.some(z=>+z.value===C+1);g(H,W?C:+te[0].value-1)},[P,V]=o.useState(null);o.useEffect(()=>{V(null)},[e]);const ie=o.useCallback(H=>{V(H);const te=Pv(H);if(!te||r&&te<r||s&&te>s)return;t(te);const[W,z]=te.split("-");g(+W,+z-1)},[r,s,t,g]),U=o.useCallback(()=>{V(null)},[]),ce=o.useCallback(H=>{H.key==="Enter"?(H.preventDefault(),U(),v(!1)):H.key==="Escape"?(U(),v(!1)):H.key==="ArrowDown"&&!E&&(H.preventDefault(),v(!0))},[U,v,E]),Z=E?hn.createPortal(n.jsxs("div",{ref:A,id:w,className:"date-picker__dropdown",style:k,"data-tooltip-ignore":!0,role:"dialog","aria-label":p("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":p("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(Us,{size:16,strokeWidth:2})}),n.jsxs("div",{className:"date-picker__nav-ym",children:[n.jsx(xn,{className:"date-picker__nav-dropdown",ariaLabel:p("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:S,value:String(y),onChange:H=>I(+H),size:40}),n.jsx(xn,{className:"date-picker__nav-dropdown",ariaLabel:p("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:$,value:String(C+1),onChange:H=>g(y,+H-1),size:40})]}),n.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:x,"aria-label":p("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(Gs,{size:16,strokeWidth:2})})]}),n.jsxs("div",{className:"date-picker__grid",ref:L,onKeyDown:O,children:[m.map(H=>n.jsx("div",{className:"date-picker__dow caption-1",children:H},H)),ee.map((H,te)=>{if(H===null)return n.jsx("div",{},`e${te}`);const W=ar(y,C,H),z=W===e,ae=W===b,ve=G(H),me=te%7;return n.jsx("button",{type:"button",disabled:ve,"data-day":H,tabIndex:H===K?0:-1,"aria-current":ae?"date":void 0,onClick:()=>!ve&&T(H),className:De("date-picker__day caption-1",z&&"date-picker__day--selected",ae&&!z&&"date-picker__day--today",ve&&"date-picker__day--disabled",me===0&&"date-picker__day--sun",me===6&&"date-picker__day--sat"),children:H},H)})]})]}),document.body):null;return n.jsxs("div",{className:De("date-picker",`date-picker--s${a}`,E&&"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:P??Rv(e),placeholder:d,onChange:H=>ie(H.target.value),onClick:()=>!l&&!E&&N(),onKeyDown:ce,onBlur:U,disabled:l,"aria-haspopup":"dialog","aria-expanded":E,inputMode:"numeric",autoComplete:"off"}),n.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!l&&N(),disabled:l,tabIndex:-1,"aria-label":d,"aria-haspopup":"dialog","aria-expanded":E,children:n.jsx(nl,{size:re,className:"date-picker__icon",strokeWidth:1.5})})]}),Z]})}const Fu=["personal","sensitive","marketing"];function Ov({takenKinds:e,busy:t,today:a,onClose:r,onSubmit:s,className:l}){const{t:i}=ke.useTranslation(),[u]=o.useState(()=>pr(a)),[c,p]=o.useState([]),[h,d]=o.useState("paper"),[m,b]=o.useState("self"),[y,C]=o.useState(u),[f,x]=o.useState(""),g=Fu.filter(_=>!e.includes(_)),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(Fn,{title:i("customers.consent.record","\uB3D9\uC758 \uBC1B\uAE30"),closeDisabled:t,onClose:r,className:l,footer:()=>n.jsx(be,{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(nr,{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:[g.map(_=>n.jsx(Ho,{checked:c.includes(_),disabled:t,label:w[_],onChange:E=>p(v=>E?[...v,_]:v.filter(N=>N!==_))},_)),g.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(_n,{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:_=>d(String(_))})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),children:n.jsx(_n,{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:_=>b(String(_))})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.day","\uBC1B\uC740 \uB0A0"),children:n.jsx(Pu,{size:48,value:y,max:u,today:a,onChange:_=>C(_??"")})}),n.jsx(un,{variant:"custom",useFullWidth:!0,label:i("customers.consent.note","\uBA54\uBAA8"),children:n.jsx(Yn,{size:48,fullWidth:!0,value:f,onChange:x,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 Vo({page:e,totalPages:t,onChange:a,prevLabel:r,nextLabel:s,className:l=""}){const{t:i}=ke.useTranslation(),u=r??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),c=s??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),p=Math.max(1,t),h=()=>a(Math.max(1,Math.min(p,e-1))),d=()=>a(Math.min(p,e+1));return n.jsxs("div",{className:De("pagination",l),children:[n.jsx(be,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-left",ariaLabel:u,disabled:e<=1,onClick:h}),n.jsxs("span",{className:"pagination__info body-3","aria-live":"polite","aria-atomic":"true",children:[Math.min(Math.max(1,e),p)," / ",p]}),n.jsx(be,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=t,onClick:d})]})}function qo({count:e,search:t,segment:a,filters:r,pageSize:s,pagination:l,actions:i,className:u}){const{t:c}=ke.useTranslation(),p=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:De("toolbar",u),children:[n.jsxs("div",{className:"toolbar__row",children:[p,a&&(Array.isArray(a)?a:[a]).map((d,m)=>n.jsx(_n,{size:Lt,...d},d.ariaLabel??m))]}),h&&n.jsx("div",{className:"toolbar__row",children:n.jsxs("div",{className:"toolbar__row-end",children:[t&&n.jsx(Yn,{className:"toolbar__search",size:Lt,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((d,m)=>n.jsx(xn,{size:Lt,options:d.options,value:d.value,onChange:d.onChange,ariaLabel:d.ariaLabel},m)),(s||l)&&n.jsxs("div",{className:"toolbar__pager",children:[s&&n.jsx(xn,{size:Lt,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(Vo,{page:l.page,totalPages:l.total,onChange:l.onChange,prevLabel:l.prevLabel,nextLabel:l.nextLabel})]}),i]})})]})}function Iu(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(Iu).join(""):""}function zv(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 zv=new Set(["pnpm","npm","yarn","node","git","curl","docker","cat","ls","cd","rm","mv","cp","echo","export"]),Wv=/^(?: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 Hv(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(`
828
+ `)}const Wv=new Set(["pnpm","npm","yarn","node","git","curl","docker","cat","ls","cd","rm","mv","cp","echo","export"]),Hv=/^(?: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 Vv(e,t){let a=e;const r=[],s=/^(?:sh|bash|zsh|shell|console)$/.test(t.toLowerCase()),l=(i,u)=>r.push({type:i,content:u});for(;a.length>0;){const i=a.match(/^\s+/);if(i){l("whitespace",i[0]),a=a.slice(i[0].length);continue}if(!s&&a.startsWith("//")){const y=a.indexOf(`
829
829
  `),C=y===-1?a:a.slice(0,y);l("comment",C),a=a.slice(C.length);continue}if(s&&a.startsWith("#")){const y=a.indexOf(`
830
- `),C=y===-1?a:a.slice(0,y);l("comment",C),a=a.slice(C.length);continue}const u=a.match(/^\/\*[\s\S]*?\*\//);if(u){l("comment",u[0]),a=a.slice(u[0].length);continue}const c=a.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(c){l("string",c[0]),a=a.slice(c[0].length);continue}const p=a.match(/^\d+(?:\.\d+)?/);if(p){l("number",p[0]),a=a.slice(p[0].length);continue}const h=a.match(Wv);if(h){l("keyword",h[0]),a=a.slice(h[0].length);continue}const d=a.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(d){const y=d[0];l(s&&zv.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 b=a.match(/^[()[\]{};.,]/);if(b){l("punctuation",b[0]),a=a.slice(1);continue}l("other",a[0]),a=a.slice(1)}return r}function Vv({children:e,language:t="bash",title:a="",showCopy:r=!0,size:s="default",className:l=""}){const{t:i}=ke.useTranslation(),[u,c]=o.useState(!1),p=Ov(Iu(e)),h=o.useRef(null);o.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const d=async()=>{try{if(!await Yf(p))return;c(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>c(!1),2e3)}catch{}},m=Hv(p,t),b=s==="small"?"caption-1":"body-3";return n.jsxs("div",{className:De("code-box",s==="small"?"code-box--small":"",l),children:[(a||r)&&n.jsxs("div",{className:"code-box__header",role:"toolbar","aria-label":i("common.codeBlock","\uCF54\uB4DC \uBE14\uB85D"),children:[n.jsx("div",{className:"code-box__title caption-1",children:a}),r&&n.jsx(be,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:u?"check":"copy",onClick:d,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} ${b}`,children:y.content},C))})})]})}function qv({count:e,actions:t,onClear:a,clearLabel:r,visible:s,content:l,max:i}){const{t:u}=ke.useTranslation(),c=s!==void 0?s:e>0,p=r??u("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),h=o.useRef(null),d=o.useRef(null),m=o.useRef(null),b=o.useRef(c);o.useLayoutEffect(()=>{const g=d.current,w=b.current;if(b.current=c,c&&!w){const _=typeof document<"u"?document.activeElement:null;m.current=_&&_!==document.body&&!g?.contains(_)?_:null}else!c&&w&&g&&g.contains(document.activeElement)&&fr(g,m.current)},[c]);const[y,C]=o.useState(!1),f=o.useRef(!1),x=o.useRef(null);return o.useEffect(()=>{const g=h.current;if(!g)return;const w=D=>{f.current=D,C(D)},_=()=>{const D=g.firstElementChild??g,A=Array.from(D.children);if(A.length<2){w(!1);return}const B=A[0].offsetTop,F=A.some(T=>T.offsetTop!==B);if(!f.current){x.current=g.clientWidth,F&&w(!0);return}if(F)return;const L=A[0],q=A[A.length-1],M=q.offsetLeft+q.offsetWidth-L.offsetLeft,O=x.current;(O==null||M<=O)&&w(!1)};if(_(),typeof ResizeObserver>"u")return;const E=new ResizeObserver(_);E.observe(g);const v=g.parentElement;let N=v?.clientWidth??0;const k=new ResizeObserver(()=>{const D=v?.clientWidth??0;D!==N&&(N=D,x.current=null,_())});return v&&k.observe(v),()=>{E.disconnect(),k.disconnect()}},[l,e]),n.jsxs("div",{ref:d,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(be,{htmlType:"button",size:Lt,label:p,onClick:a}),t.map((g,w)=>n.jsx(be,{htmlType:"button",size:Lt,variant:g.variant??"default",icon:g.icon,label:g.label,onClick:g.onClick},w))]})]})}const Uv=[{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 Gv(e){const{onClose:t,className:a}=e;return n.jsx("div",{className:De("item-actions",a),children:Uv.map(({key:r,icon:s,closeFirst:l})=>{const i=e[r];if(!i)return null;const u=r==="publish"?i.published?i.unpublish:i.publish:i;return n.jsx(be,{htmlType:"button",size:40,type:"dot",icon:s,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{l&&t(),u.onClick()}},r)})})}function Kv({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?Fl(i.sms):Fl(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(([p,h])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:p}),n.jsx("dd",{children:h})]},p))}):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?`${Rl}\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 ${Rl}\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 Yv({src:e,alt:t,className:a,style:r,tone:s,textColor:l}){const i=!s&&!!l,u=r2(e,i),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return s?n.jsx("span",{className:De("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:De("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:n2(t2(u),c)}}):n.jsx("img",{src:e,alt:t,className:De("brand-logo",a),style:r,draggable:!1})}function Ou({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:De("section-head-float",t),children:e})}function qo({items:e,className:t}){return n.jsx("div",{className:ue(t?`chart-section__legend ${t}`:"chart-section__legend"),children:e.map((a,r)=>n.jsxs("span",{className:ue("chart-section__legend-item"),children:[n.jsx("span",{className:ue("chart-section__legend-dot"),style:{background:a.color}}),a.label]},r))})}const oa=e=>`chart-section__total__num ${e?"h1":"h0"}`;function xa({label:e,children:t}){return e?n.jsxs("div",{className:ue("chart-section__total chart-section__total--stacked"),children:[n.jsx("span",{className:ue("chart-section__total__label body-3"),children:e}),n.jsx("span",{className:ue("chart-section__total__value"),children:t})]}):n.jsx("div",{className:ue("chart-section__total"),children:t})}const zu=20,Uo=120,Zv={small:Uo,medium:Uo*2+zu,large:Uo*2+zu},Wu={small:"chart-section--compact",medium:"chart-section--compact",xLarge:"chart-section--full"};function Ar({type:e="chart",title:t,titleClassName:a,titleLevel:r,icon:s,disc:l,headRight:i,headFloat:u,headSegment:c,headMenuItems:p,collapseBelow:h=420,onClick:d,ariaLabel:m,tooltip:b,totalNum:y,totalUnit:C,totalMuted:f=!1,totalLabel:x,change:g,changeType:w,size:_,bodyAlign:E="bottom",subRow:v,legend:N,subRowAlign:k="start",className:D,inGrid:A=!1,fitBody:B=!1,children:F}){const L=e==="stat",q=_??(L?"small":"large"),M=q==="small"||q==="medium",O=a??"h5",T=r??(L?0:3),{t:G}=ke.useTranslation(),K=o.useRef(null),{anchorRect:ee,openAt:re,close:R}=_r(),J=o.useCallback(()=>{b&&K.current&&re(K.current)},[b,re]),[ne,S]=o.useState(!1);zo(()=>{const se=K.current;if(!se||!c)return;const ye=xe=>S(xe>0&&xe<h);if(ye(se.clientWidth),typeof ResizeObserver>"u")return;const Ce=new ResizeObserver(xe=>ye(xe[0].contentRect.width));return Ce.observe(se),()=>Ce.disconnect()},[c,h]);const[$,I]=o.useState(null),P=o.useCallback(()=>I(null),[]),V=o.useCallback(se=>{const ye=se.currentTarget.getBoundingClientRect();I(Ce=>Ce?null:{left:ye.left,right:ye.right,top:ye.top,bottom:ye.bottom,width:ye.width,height:ye.height,x:ye.x,y:ye.y})},[]),ie=!!c&&ne;o.useEffect(()=>{ie||I(null)},[ie]);const U=c?[...c.options.map(se=>({label:se.label,icon:se.icon,selected:se.key===c.value,disabled:se.disabled,onClick:()=>c.onChange(se.key),closeOnSelect:!0})),...(p??[]).map((se,ye)=>ye===0?{...se,separatorBefore:!0}:se)]:[],ce=o.useCallback(se=>{if(!d)return;const ye=se.target;ye&&typeof ye.closest=="function"&&ye.closest('button, a, input, select, textarea, [role="radiogroup"]')||d()},[d]),Z=o.useCallback(se=>{d&&se.target===se.currentTarget&&(se.key==="Enter"||se.key===" ")&&(se.preventDefault(),d())},[d]),H=typeof i=="function"?i({collapsed:ie}):i,te=y!=null||x?n.jsxs(xa,{label:x,children:[y!=null&&n.jsx("span",{className:ue(oa(M)),children:y}),C&&n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:C})]}):null,W=H||c?n.jsxs("div",{className:ue("chart-section__head-right"),children:[c&&(ie?n.jsx(be,{htmlType:"button",size:ra,type:"dot",icon:"ellipsis",ariaLabel:c.ariaLabel??G("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:c.ariaLabel??G("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!$,onClick:V}):n.jsx(_n,{size:ra,ariaLabel:c.ariaLabel,options:c.options.map(se=>({key:se.key,label:se.label,disabled:se.disabled})),value:c.value,onChange:c.onChange})),H]}):null,z=o.useRef(null),[ae,ve]=o.useState(null);o.useLayoutEffect(()=>{const se=z.current;if(!se){ve(null);return}const ye=()=>{const xe=se.getBoundingClientRect().height;ve($e=>$e!=null&&Math.abs($e-xe)<1?$e:xe)};if(ye(),typeof ResizeObserver>"u")return;const Ce=new ResizeObserver(ye);return Ce.observe(se),()=>Ce.disconnect()},[N]);const me=o.useId(),le=T?`h${T}`:"div",Be=typeof q=="number"?q:Zv[q],Pe=w??(g===void 0?void 0:g>0?"up":g<0?"down":"neutral"),Fe=g===void 0?void 0:g>0?`+${g}`:`${g}`,Ae=b&&ee?n.jsx(Ln,{anchorRect:{left:ee.left,top:ee.top+21,right:ee.right,bottom:ee.bottom,width:ee.width,height:ee.height},text:b}):null;return L?n.jsxs("div",{ref:K,className:ue(["chart-section","chart-section--stat",A&&"chart-section--grid",E==="center"&&"chart-section--body-center",typeof q=="string"&&Wu[q],d&&"chart-section--clickable",D].filter(Boolean).join(" ")),style:Be===void 0?void 0:{minHeight:Be},onClick:d?ce:void 0,onKeyDown:d?Z:void 0,onPointerEnter:b?J:void 0,onPointerLeave:b?R:void 0,onFocus:b?J:void 0,onBlur:b?R:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?m??[typeof t=="string"?t:void 0,y,Fe].filter(se=>se!=null&&se!=="").join(" "):void 0,"aria-labelledby":!d&&t!=null?me:void 0,children:[Ae,n.jsxs("div",{className:ue("chart-section__head"),children:[n.jsx(le,{id:me,className:ue(["chart-section__title",O].filter(Boolean).join(" ")),children:t}),s&&n.jsx("span",{className:ue("chart-section__head-icon"),children:n.jsx(lt,{icon:s,className:ue("chart-section__head-icon-inner")})})]}),n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:ue("chart-section__sub-row"),children:[n.jsxs(xa,{children:[n.jsx("span",{className:ue([oa(!0),f&&"chart-section__total__num--muted"].filter(Boolean).join(" ")),children:y}),C&&n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:C})]}),Fe&&n.jsx("div",{className:ue(`chart-section__change chart-section__change--${Pe??"neutral"} caption-1`),children:Fe})]}),F&&n.jsx("div",{className:ue("chart-section__body"),children:F})]})]}):n.jsxs("section",{ref:K,className:ue(["chart-section",A&&"chart-section--grid",B&&"chart-section--fit",typeof q=="string"&&Wu[q],d&&"chart-section--clickable",D].filter(Boolean).join(" ")),style:{...Be===void 0?null:B?{minHeight:Be,height:Be}:{minHeight:Be},...ae==null?null:{"--legend-h":`${ae}px`}},onClick:d?ce:void 0,onKeyDown:d?Z:void 0,onPointerEnter:b?J:void 0,onPointerLeave:b?R:void 0,onFocus:b?J:void 0,onBlur:b?R:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?m??(typeof t=="string"?t:void 0):void 0,"aria-labelledby":!d&&t!=null?me:void 0,children:[b&&ee&&n.jsx(Ln,{anchorRect:{left:ee.left,top:ee.top+21,right:ee.right,bottom:ee.bottom,width:ee.width,height:ee.height},text:b}),u&&n.jsx(Ou,{children:u}),n.jsxs("div",{className:ue("chart-section__head"),children:[n.jsxs("div",{className:ue("chart-section__title-row"),children:[s&&n.jsx(lt,{icon:s,label:typeof t=="string"?t:void 0,className:ue("chart-section__icon")}),n.jsx(le,{id:me,className:ue(["chart-section__title",O].filter(Boolean).join(" ")),children:t})]}),W,l&&n.jsx("div",{className:ue("chart-section__disc body-3"),children:l})]}),(te||v)&&n.jsxs("div",{className:ue(["chart-section__sub-row",k!=="start"&&`chart-section__sub-row--${k}`].filter(Boolean).join(" ")),children:[te,v]}),N&&n.jsx("div",{ref:z,className:ue("chart-section__legend-slot"),children:N}),F,$&&n.jsx(Bn,{anchorRect:$,onClose:P,ariaLabel:c?.ariaLabel??G("tooltip.menu","\uBA54\uB274"),children:n.jsx(Ga,{columns:[{items:U}],onClose:P,size:"small"})})]})}const rr=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,Go=e=>rr(e.getFullYear(),e.getMonth()+1);function wa(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 Ko=(e,t)=>`${e}#${t}`;function jn(e,t){const a=new Date(e,t,1).getDay();return 1+(8-(a===0?7:a))%7}function Xv(){const e=fa();let t=e.getFullYear(),a=e.getMonth(),r=e.getDate();if(r<jn(t,a)){const i=new Date(t,a,0);t=i.getFullYear(),a=i.getMonth(),r=i.getDate()}const s=Math.floor((r-jn(t,a))/7),l=rr(t,a+1);return{monthKey:l,value:Ko(l,s)}}function Jv(e){const t=fa(),a=Go(t),r=(c,p)=>rr(c,p+1),s=new Map;s.set(a,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const p=r(c.date.getFullYear(),c.date.getMonth());s.has(p)||s.set(p,[]),s.get(p).push(c)}for(const[c,p]of[...s.entries()]){const h=wa(c);if(!h)continue;const d=h.year,m=h.month1-1,b=jn(d,m);if(!(c===a&&t.getDate()<b)&&!p.some(f=>f.date.getDate()<b))continue;const y=new Date(d,m,0),C=r(y.getFullYear(),y.getMonth());s.has(C)||s.set(C,[])}const l=new Map;for(const[c,p]of s){const h=wa(c);if(!h)continue;const d=h.year,m=h.month1-1,b=new Date(d,m+1,0).getDate(),y=p.reduce((_,E)=>Math.max(_,E.parts?.length??0,E.partsB?.length??0),0),C=p.some(_=>_.partsB),f=new Array(b+1).fill(0),x=new Array(b+1).fill(0),g=Array.from({length:b+1},()=>new Array(y).fill(0)),w=Array.from({length:b+1},()=>new Array(y).fill(0));for(const _ of p){const E=_.date.getDate();if(f[E]+=_.a,x[E]+=_.b,_.parts)for(let v=0;v<y;v++)g[E][v]+=_.parts[v]??0;if(_.partsB)for(let v=0;v<y;v++)w[E][v]+=_.partsB[v]??0}l.set(c,{year:d,month:m,daysInMonth:b,partsLen:y,hasPartsB:C,dayA:f,dayB:x,dayParts:g,dayPartsB:w})}const i=(c,p,h)=>new Date(c,p,h).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,p]of l){const{year:h,month:d,daysInMonth:m,dayA:b,dayB:y,dayParts:C,dayPartsB:f}=p,x=h===t.getFullYear()&&d===t.getMonth(),g=t.getDate(),w=l.get(r(d===11?h+1:h,(d+1)%12)),_=p.partsLen,E=[];for(let N=1;N<=m;N++){const k=x&&N>g;E.push({label:String(N),...k&&b[N]===0&&y[N]===0?{future:!0}:{},a:k&&b[N]===0&&y[N]===0?-1:b[N],b:y[N],..._?{parts:C[N]}:{},..._&&p.hasPartsB?{partsB:f[N]}:{}})}const v=[];for(let N=jn(h,d);N<=m;N+=7){const k=Math.max(0,N+6-m),D=k&&w?Math.max(_,w.partsLen):_,A=p.hasPartsB||!!(k&&w?.hasPartsB);let B=0,F=0;const L=new Array(D).fill(0),q=new Array(D).fill(0);for(let O=N;O<=Math.min(N+6,m);O++){B+=b[O],F+=y[O];for(let T=0;T<_;T++)L[T]+=C[O][T],q[T]+=f[O][T]}if(k&&w)for(let O=1;O<=k&&!i(w.year,w.month,O);O++){B+=w.dayA[O],F+=w.dayB[O];for(let T=0;T<w.partsLen;T++)L[T]+=w.dayParts[O][T],q[T]+=w.dayPartsB[O][T]}const M=k?`${(d+1)%12+1}/${k}`:`${N+6}`;v.push({label:`${v.length+1}\uC8FC`,sublabel:`[${N}\uC77C~${M}\uC77C]`,a:B,b:F,...D?{parts:L}:{},...D&&A?{partsB:q}:{}})}u[c]={weekly:v,daily:E}}return u}function Hu(){const e=fa(),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:rr(s,i),year:s,month:i})}return r.reverse()}Hu();function Qv(){return Hu()}function Vu(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 qu(e){const{t,i18n:a}=ke.useTranslation(),[r,s]=o.useState("week"),l=o.useMemo(()=>Qv().filter(A=>A.value in e),[e]),i=o.useMemo(()=>{const A=[];for(const B of l){const F=new Date(B.year,B.month,0).getDate(),L=jn(B.year,B.month-1),q=Math.ceil((F-L+1)/7);for(let M=q-1;M>=0;M--)A.push({value:Ko(B.value,M),monthKey:B.value,year:B.year,month:B.month,week:M})}return A},[l]),u=o.useCallback((A,B)=>t("calendar.yearMonthCompact",{year:A,month:B,full:Yl(t,a.language,A,B),defaultValue:"{{full}}"}),[t,a.language]),c=o.useCallback(A=>`${u(A.year,A.month)} ${Vu(t,A.week)}`,[t,u]),p=o.useMemo(()=>l.map(A=>({value:A.value,label:u(A.year,A.month)})),[u,l]),h=o.useMemo(()=>i.map(A=>({value:A.value,label:c(A)})),[i,c]),d=o.useMemo(()=>Xv(),[e]),m=o.useMemo(()=>l.find(A=>A.value===d.monthKey)?.value??l[0]?.value??"",[l,d]),b=o.useMemo(()=>i.find(A=>A.value===d.value)?.value??i[0]?.value??"",[i,d]),[y,C]=o.useState(""),[f,x]=o.useState("");o.useEffect(()=>{l.find(A=>A.value===y)||C(m)},[l,y,m]),o.useEffect(()=>{i.find(A=>A.value===f)||x(b)},[i,f,b]);const g=r==="month"?p:h,w=r==="month"?y:f,_=r==="month"?C:x,E=o.useMemo(()=>{const A=t("calendar.dow",{returnObjects:!0});return Array.isArray(A)?A:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),v=g.findIndex(A=>A.value===w),N=o.useCallback(()=>{const A=g.findIndex(B=>B.value===w);A<g.length-1&&_(g[A+1].value)},[g,w,_]),k=o.useCallback(()=>{const A=g.findIndex(B=>B.value===w);A>0&&_(g[A-1].value)},[g,w,_]),D=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:w,setRange:_,activeOptions:g,activeIdx:v,handlePrev:N,handleNext:k,periodOptions:D,monthRange:y,weekRange:f,weekRanges:i,DOW:E}}const $t=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function In(e,t=!0){return e.future===!0||t&&e.a===-1}function e4({data:e,colorA:t,colorB:a,labelA:r,labelB:s,barWidth:l=10,barGap:i=1,height:u=140,fitHeight:c=!1,maxOverride:p,tightMax:h,seriesColors:d,seriesLabels:m,rateLabels:b,grouped:y=!1,baseline:C,focusableBars:f=!1}){const x=!a,g=!!(d&&d.length>0),w=C,_=o.useMemo(()=>g?Math.max(0,...e.filter(S=>!In(S,w==null)).map(S=>y?Math.max(0,...(S.parts??[]).map($t)):(S.parts??[]).reduce(($,I)=>$+Math.max(0,$t(I)),0))):Math.max(0,...e.filter(S=>!In(S,w==null)).flatMap(S=>x?[$t(S.a)]:[$t(S.a),$t(S.b)])),[e,x,g,y]),E=o.useMemo(()=>{if(w==null)return 0;const S=e.filter($=>!In($,w==null)).flatMap($=>g?($.parts??[]).map($t):x?[$t($.a)]:[$t($.a),$t($.b)]);return Math.max(0,...S.map($=>Math.abs($-w)))},[e,w,g,x]),v=o.useMemo(()=>{const S=w!=null?E:_;return p??(h?S>0?S:10:Math.ceil(S/10)*10||10)},[_,E,w,p,h]),N=o.useRef(null),k=o.useRef(null),[D,A]=o.useState(null);o.useLayoutEffect(()=>{if(!c){A(null);return}const S=N.current;if(!S)return;const $=()=>{const P=k.current,V=S.clientHeight-(P?P.getBoundingClientRect().height:0);V<=0||A(ie=>ie!=null&&Math.abs(ie-V)<1?ie:V)};if($(),typeof ResizeObserver>"u")return;const I=new ResizeObserver($);return I.observe(S),k.current&&I.observe(k.current),()=>I.disconnect()},[c]);const B=D??u,F=g?y?Math.max(1,d.length):1:x?1:2,L={"--bar-width":`${o.useMemo(()=>{const S=Math.max(1,e.length);return Math.max(2,Math.min(l,Math.round(120/(S*F)+6)))},[e.length,F,l])}px`},q={"--bar-group-gap":`${Math.max(0,i)}px`},M=o.useMemo(()=>{const S=Math.round(v/2);return w!=null?[w+v,...S!==v?[w+S]:[],w,...S!==v?[w-S]:[],w-v]:S!==v?[v,S,0]:[v,0]},[v,w]),O=S=>w!=null?1-(S-(w-v))/(2*v):1-S/v,[T,G]=o.useState(null),K=o.useCallback(()=>G(null),[]),ee=o.useCallback((S,$)=>{const I=[S.label,S.sublabel].filter(Boolean).join(" ");let P;if(g&&y&&S.rawPartsB)P=(m??[]).map((V,ie)=>{const U=S.rawPartsB[ie]??0;return{text:U>0?`${V}: ${$[ie]??0}% (${S.rawParts?.[ie]??0}/${U})`:`${V}: -`,color:(d??[])[ie]}});else if(g&&y)P=(m??[]).map((V,ie)=>({text:`${V}: ${J($[ie]??0)}`,color:(d??[])[ie]}));else if(g){const V=(m??[]).map((U,ce)=>({text:`${U}: ${$[ce]??0}`,color:(d??[])[ce]})),ie=V.filter((U,ce)=>($[ce]??0)>0);P=ie.length?ie:V}else b&&!x?P=[{text:`${r} ${$t(S.a)}%`,color:t},{text:`${s} ${$t(S.b)}%`,color:a}]:b&&S.rawB!==void 0?P=[{text:`${b.total} ${S.rawB}`},{text:`${b.done} ${S.rawA??0}`,color:t}]:x?P=[{text:`${r}: ${$t(S.a)}`,color:t}]:P=[{text:`${r}: ${$t(S.a)}`,color:t},{text:`${s}: ${$t(S.b)}`,color:a}];return{title:I,items:P}},[g,y,m,d,b,x,r,s,t,a,w]),re=o.useCallback((S,$,I)=>{const P=S.getBoundingClientRect(),{title:V,items:ie}=ee($,I);G({rect:{left:P.left,top:P.top,right:P.right,bottom:P.bottom,width:P.width,height:P.height},title:V,items:ie})},[ee]),R=o.useCallback((S,$)=>{const{title:I,items:P}=ee(S,$);return[I,...P.map(V=>V.text)].filter(Boolean).join(", ")},[ee]),J=S=>w!=null&&S>w?`+${S}`:`${S}`,ne=T!=null;return o.useEffect(()=>{if(!ne)return;const S=()=>G(null),$=I=>{const P=I.target;P&&typeof P.closest=="function"&&P.closest(".bar-chart__col")||G(null)};return window.addEventListener("scroll",S,!0),document.addEventListener("pointerdown",$,!0),()=>{window.removeEventListener("scroll",S,!0),document.removeEventListener("pointerdown",$,!0)}},[ne]),n.jsxs("div",{ref:N,className:ue("bar-chart__wrap"),style:q,children:[n.jsx("div",{className:ue("bar-chart__inner"),children:n.jsx("div",{className:ue("bar-chart__scroll"),children:n.jsxs("div",{className:ue("bar-chart__area"),children:[n.jsxs("div",{className:ue("bar-chart__plot"),style:{height:B},children:[M.slice(0,-1).map((S,$)=>n.jsx("div",{className:ue(`bar-chart__gridline${w!=null&&S===w?" bar-chart__gridline--baseline":""}`),style:{top:O(S)*B},children:n.jsx("span",{className:ue("bar-chart__gridline__label caption-1"),children:S})},$)),e.map((S,$)=>{const I=In(S,w==null),P=B/2,V=Z=>w!=null?Math.min(P,Math.abs($t(Z)-w)/v*P):Math.min(B,Math.max(0,$t(Z)/v*B)),ie=I?0:V(S.a),U=I?0:V(S.b),ce=(S.parts??[]).map($t);return n.jsx("div",{className:ue(`bar-chart__col${y&&g?" bar-chart__col--group":""}`),style:{cursor:I?"default":"pointer"},tabIndex:f&&!I?0:void 0,role:f&&!I?"img":void 0,"aria-label":f&&!I?R(S,ce):void 0,onMouseEnter:I?void 0:Z=>re(Z.currentTarget,S,ce),onFocus:I||!f?void 0:Z=>re(Z.currentTarget,S,ce),onBlur:f?K:void 0,onMouseLeave:K,children:!I&&(g&&y?(d??[]).map((Z,H)=>{const te=ce[H]??0;if(w==null)return n.jsx("div",{className:ue("bar-chart__bar"),style:{...L,height:V(te),background:Z}},H);const W=$t(te)<w;return n.jsxs("div",{className:ue("bar-chart__slot"),style:L,children:[n.jsx("div",{className:ue("bar-chart__slot__half bar-chart__slot__half--up"),children:!W&&n.jsx("div",{className:ue("bar-chart__bar bar-chart__bar--full"),style:{height:V(te),background:Z}})}),n.jsx("div",{className:ue("bar-chart__slot__half bar-chart__slot__half--down"),children:W&&n.jsx("div",{className:ue("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:V(te),background:Z}})})]},H)}):g?n.jsx("div",{className:ue("bar-chart__stack"),style:L,children:(()=>{const Z=ce.reduce((te,W,z)=>W>0?z:te,-1);let H=B;return ce.map((te,W)=>{if(te<=0)return null;const z=Math.min(H,te/v*B);return H-=z,n.jsx("div",{className:ue("bar-chart__stack-segment"),style:{height:z,background:(d??[])[W],borderRadius:W===Z?"6px 6px 0 0":void 0}},W)})})()}):w!=null?n.jsx(n.Fragment,{children:[{v:$t(S.a),c:t},...x?[]:[{v:$t(S.b),c:a}]].map(({v:Z,c:H},te)=>n.jsxs("div",{className:ue("bar-chart__slot"),style:L,children:[n.jsx("div",{className:ue("bar-chart__slot__half bar-chart__slot__half--up"),children:Z>=w&&n.jsx("div",{className:ue("bar-chart__bar bar-chart__bar--full"),style:{height:V(Z),background:H}})}),n.jsx("div",{className:ue("bar-chart__slot__half bar-chart__slot__half--down"),children:Z<w&&n.jsx("div",{className:ue("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:V(Z),background:H}})})]},te))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:ue("bar-chart__bar"),style:{...L,height:ie,background:t}}),!x&&n.jsx("div",{className:ue("bar-chart__bar"),style:{...L,height:U,background:a}})]}))},$)})]}),n.jsx("div",{ref:k,className:ue("bar-chart__x-axis"),children:e.map((S,$)=>{const I=In(S,w==null);return n.jsxs("span",{className:ue(`bar-chart__x-axis__label${I?" bar-chart__x-axis__label--future":""}`),children:[n.jsxs("span",{className:ue("caption-1 bar-chart__x-axis__main"),children:[S.isToday&&n.jsx("span",{className:ue("bar-chart__x-axis__today-dot"),style:{background:t}}),S.label]}),S.sublabel&&n.jsx("span",{className:"caption-1",children:S.sublabel})]},$)})})]})})}),T&&n.jsx(Un,{anchorRect:T.rect,title:T.title,items:T.items,showIndex:!1,closeOnOutsideClick:!1})]})}function Uu({control:e}){const{t}=ke.useTranslation(),{activeOptions:a,activeIdx:r,range:s,setRange:l,handlePrev:i,handleNext:u,periodOptions:c,period:p,setPeriod:h}=e,d=p==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),m=p==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:ue("chart-section__controls"),children:[n.jsx(be,{htmlType:"button",size:ra,type:"dot",icon:"chevron-left",ariaLabel:d,showTooltipInfo:d,disabled:r===a.length-1,onClick:i}),n.jsx(xn,{value:s,onChange:l,options:a,size:ra,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(be,{htmlType:"button",size:ra,type:"dot",icon:"chevron-right",ariaLabel:m,showTooltipInfo:m,disabled:r<=0,onClick:u}),n.jsx(_n,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:p,onChange:b=>h(b),size:ra})]})}function Yo(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[Go(u)]?.daily??[])[u.getDate()-1],p=c!=null&&In(c,r)||u>s;return{dt:u,entry:c,isFuture:p}})}function t4(e,t,a,r=!0){const{period:s,monthRange:l,weekRange:i,weekRanges:u,DOW:c}=t,p=fa(),h=p.getFullYear(),d=p.getMonth()+1,m=p.getDate();if(s==="month"){const C=e[l]??{weekly:[],daily:[]},f=wa(l),x=f?f.year:null,g=f?f.month1:null,w=x&&g?jn(x,g-1):1;return C.weekly.map((_,E)=>{const v=E+1;let N=_.label,k=!1,D=!1;if(x&&g){const A=w+E*7,B=new Date(x,g-1,A+6),F=B.getMonth()+1,L=B.getDate(),q=F===g?`${L}`:`${F}/${L}`;N=a("manager.chart.weekRange",{start:A,end:q});const M=new Date(h,d-1,m).getTime();k=M>=new Date(x,g-1,A).getTime()&&M<=B.getTime(),D=x>h||x===h&&(g>d||g===d&&A>m)}return{..._,label:N,sublabel:Vu(a,v-1),isToday:k,future:_.future===!0||D||void 0,a:D?-1:_.a,b:D?0:_.b}})}const b=u.find(C=>C.value===i);if(!b)return[];const y=new Date(b.year,b.month-1,jn(b.year,b.month-1)+b.week*7);return Yo(e,y,p,r).map(({dt:C,entry:f,isFuture:x})=>{const g=C.getMonth()+1,w=C.getDate(),_=C.getFullYear();return{label:g===b.month&&_===b.year?`${w}`:`${g}/${w}`,sublabel:c[C.getDay()]??"",future:x||void 0,a:x?-1:f&&f.a>0?f.a:0,b:x?0:f&&f.b>0?f.b:0,isToday:_===h&&g===d&&w===m,...f?.parts?{parts:x?f.parts.map(()=>0):f.parts}:{},...f?.partsB?{partsB:x?f.partsB.map(()=>0):f.partsB}:{}}})}const n4={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function a4({canvasHeight:e,fitHeight:t,focusableBars:a,size:r="medium",barWidth:s,titleKey:l,titleLevel:i,data:u,colorA:c,colorB:p,labelAKey:h,labelBKey:d,showTotal:m=!1,totalUnitKey:b,totalLabelKey:y,control:C,hideControls:f=!1,rate:x=!1,rateAgg:g="dayMean",tightMax:w=!1,avgMode:_=!1,totalFormat:E,series:v,seriesMode:N="stack",loading:k=!1,onDetail:D,headExtra:A,headSegment:B,icon:F,disc:L,onClick:q,cardAriaLabel:M,cardTooltip:O,detailSize:T=ra,barGap:G,baseline:K,className:ee,inGrid:re=!1}){const{t:R}=ke.useTranslation(),J={...n4[r],...e===void 0?null:{height:e}},ne=qu(u),S=C??ne,$=o.useMemo(()=>t4(u,S,R,K==null),[u,S,R,K]),I=N==="group"&&!!v&&v.length>0;G!=null&&!I&&Dt("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 P=o.useMemo(()=>{if(!x)return $;const z=S.period==="month"?wa(S.monthRange):null,ae=fa(),ve=v?.length??0,me=le=>{const Be=[],Pe=[],Fe=[];for(let Ae=0;Ae<ve;Ae++){let se=0,ye=0,Ce=0;for(const xe of le){const $e=$t(xe.a[Ae]),nt=$t(xe.b[Ae]);nt<=0||(se+=$e,ye+=nt,Ce+=$e/nt*100)}Be.push(g==="weighted"?ye>0?Math.round(se/ye*100):0:le.length?Math.round(Ce/le.length):0),Pe.push(se),Fe.push(ye)}return{pct:Be,ra:Pe,rb:Fe}};return $.map((le,Be)=>{let Pe=le.a===-1?-1:le.b>0?Math.round(le.a/le.b*100):0;if(z&&!In(le)){const Ae=z.year,se=z.month1-1,ye=Yo(u,new Date(Ae,se,jn(Ae,se)+Be*7),ae).filter(Ce=>!Ce.isFuture);if(g==="weighted"){let Ce=0,xe=0;for(const{entry:$e}of ye)$e&&$e.b>0&&(Ce+=$e.a,xe+=$e.b);Pe=xe>0?Math.round(Ce/xe*100):0}else Pe=ye.length?Math.round(ye.reduce((Ce,{entry:xe})=>Ce+(xe&&xe.b>0?xe.a/xe.b*100:0),0)/ye.length):0}let Fe=null;if(I&&!In(le)){let Ae;if(z){const ye=z.year,Ce=z.month1-1;Ae=Yo(u,new Date(ye,Ce,jn(ye,Ce)+Be*7),ae).filter(xe=>!xe.isFuture).map(({entry:xe})=>({a:xe?.parts??[],b:xe?.partsB??[]}))}else Ae=[{a:le.parts??[],b:le.partsB??[]}];const se=me(Ae);Fe={parts:se.pct,rawParts:se.ra,rawPartsB:se.rb}}return{...le,a:Pe,b:le.a===-1?0:d&&le.parts&&le.parts[1]>0?Math.round(le.parts[0]/le.parts[1]*100):0,rawA:le.a===-1?-1:le.a,rawB:le.b,...Fe??{}}})},[$,x,g,d,S.period,S.monthRange,u,I,v?.length]),V=o.useMemo(()=>{if(x||_){const ae=(S.period==="week"?$:u[S.monthRange]?.daily??[]).filter(me=>me.a!==-1);if(ae.length===0)return 0;if(x&&g==="weighted"){let me=0,le=0;for(const Be of ae)Be.b>0&&(me+=Be.a,le+=Be.b);return le>0?Math.round(me/le*100):0}const ve=x?ae.reduce((me,le)=>me+(le.b>0?le.a/le.b*100:0),0):ae.reduce((me,le)=>me+(le.a>0?le.a:0),0);return Math.round(ve/ae.length)}const z=S.period==="month"?u[S.monthRange]?.daily??[]:P;return K!=null?z.reduce((ae,ve)=>ae+(In(ve,!1)?0:$t(ve.a)+(d?$t(ve.b):0)),0):z.reduce((ae,ve)=>ae+(ve.a>0?ve.a:0)+(d&&ve.b>0?ve.b:0),0)},[P,$,x,g,_,K,d,S.period,S.monthRange,u]),ie=v&&v.length>0?v.map(z=>({color:z.color,label:z.label})):[{color:c,label:R(h)},...d?[{color:p,label:R(d)}]:[]],U=r==="small",ce=r==="large",Z=U?"medium":ce?"xLarge":"large",H=ee||void 0,te=l?R(l):"",W=te?R("trainingStatus.detailFor",{name:te,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):R("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Ar,{className:H,size:Z,inGrid:re,icon:F,disc:L,onClick:q,ariaLabel:M,tooltip:O,headSegment:B,headMenuItems:D?[{label:W,icon:"list",onClick:D,closeOnSelect:!0}]:void 0,title:R(l),titleLevel:i,headRight:U?A??void 0:({collapsed:z})=>n.jsxs(n.Fragment,{children:[!f&&n.jsx(Uu,{control:S}),A,D&&!z&&n.jsx("span",{className:ue("bar-chart__detail-btn"),children:n.jsx(be,{htmlType:"button",size:T,type:"dot",icon:"list",ariaLabel:W,showTooltipInfo:W,onClick:D})})]}),legend:n.jsx(qo,{items:ie,className:"caption-1"}),fitBody:t,subRow:m&&n.jsx(n.Fragment,{children:x||_||y&&E?n.jsx(xa,{label:U?void 0:`${R(S.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${R(y??h)}`,children:E?(E(V).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((z,ae)=>/\d/.test(z)?n.jsx("span",{className:ue(oa(!ce)),children:z},ae):n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:z},ae)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:ue(oa(!ce)),children:V}),b&&n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:R(b)})]})}):n.jsxs(xa,{children:[n.jsx("span",{className:ue(oa(!ce)),children:V}),n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:R(h)}),b&&n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:R(b)})]})}),children:k?n.jsx("div",{className:ue("bar-chart__wrap bar-chart__loading"),"aria-busy":"true",children:n.jsx("div",{className:ue("bar-chart__inner"),children:n.jsxs("div",{className:ue("bar-chart__area bar-chart__area--loading"),children:[n.jsx("div",{className:ue("bar-chart__plot bar-chart__plot--loading"),style:{height:J.height},children:n.jsx(ga,{size:32})}),n.jsx("div",{className:ue("bar-chart__x-axis"),"aria-hidden":"true",children:n.jsxs("span",{className:ue("bar-chart__x-axis__label"),children:[n.jsx("span",{className:ue("caption-1 bar-chart__x-axis__main"),children:"\xA0"}),P.some(z=>!!z.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(e4,{focusableBars:a,data:P,colorA:c,colorB:d?p:void 0,labelA:R(h),labelB:d?R(d):void 0,barWidth:s??J.barWidth,barGap:G,baseline:K,height:J.height,fitHeight:t,maxOverride:x?100:void 0,tightMax:w,seriesColors:v?.map(z=>z.color),seriesLabels:v?.map(z=>z.label),rateLabels:x?{total:R("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:R("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:I})})}const Gu=120,r4={left:38,right:16,top:26,bottom:24};function o4({points:e=[],range:t,ticks:a=[],axisTitle:r,color:s,height:l=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:p,className:h}){const[d,m]=o.useState(null),[b,y]=o.useState(null);o.useEffect(()=>{if(!b)return;const T=K=>m(Math.round(K)||null);if(T(b.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const G=new ResizeObserver(([K])=>T(K.contentRect.width));return G.observe(b),()=>{G.disconnect()}},[b]);const{payload:C,anchorRect:f,openAfterDelay:x,close:g}=Zy(Gu),w=o.useCallback((T,G)=>{T&&x(T,G.getBoundingClientRect())},[x]),_=d??i,E=l,{left:v,right:N,top:k,bottom:D}={...r4,...u},[A,B]=t,F=T=>B===A?v:v+(_-v-N)*(T-A)/(B-A),L=T=>k+(E-k-D)*(100-T)/100,q={x:F,y:L,plot:{left:v,right:_-N,top:k,bottom:E-D,width:Math.max(0,_-v-N),height:Math.max(0,E-k-D)}},M=e.filter(T=>!T.hollow),O=s??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:y,className:De("line-chart",h),viewBox:`0 0 ${_} ${E}`,role:"img","aria-label":p??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:v,x2:_-N,y1:L(T),y2:L(T)}),n.jsxs("text",{className:"line-chart__tick",x:v-6,y:L(T)+4,textAnchor:"end",children:[T,"%"]})]},T)),c?.(q),a.map(T=>n.jsx("text",{className:"line-chart__tick",x:F(T.x),y:E-5,textAnchor:"middle",children:T.label},T.x)),M.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:O,points:M.map(T=>`${F(T.x)},${L(T.pct)}`).join(" ")}),e.map(T=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:G=>w(T.description,G.currentTarget),onPointerLeave:g,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:F(T.x),cy:L(T.pct),r:12}),n.jsx("circle",{className:De("line-chart__dot-main",T.hollow&&"is-hollow"),cx:F(T.x),cy:L(T.pct),r:4,stroke:O,fill:T.hollow?void 0:O})]},T.x))]}),C!=null&&n.jsx(Bn,{anchorRect:f,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:C,children:C})]})}function s4({icon:e,iconSize:t=56,title:a,titleClass:r="h2",description:s,tipGroups:l,start:i,className:u}){return n.jsxs("div",{className:De("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:De("game-intro__title",r),children:a}),s!=null&&n.jsx("p",{className:"game-intro__description body-3",children:s}),l?.map((c,p)=>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,d)=>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})]},d))]},p)),i&&n.jsx(be,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const Ku=(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")}`},Yu=(e,t,a,r)=>({from:Zl(e,t,a),to:new Date(Zl(e,t,a+r).getTime()-1),fromYmd:Ku(e,t,a),toYmd:Ku(e,t,a+r-1)});function l4(e,t=0){if(e.period==="month"){const s=wa(e.monthRange),l=fa(),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 Yu(i,u,1,c)}const a=e.weekRanges.find(s=>s.value===e.weekRange);if(!a){const s=new Date,l=Wa();return{from:s,to:s,fromYmd:l,toYmd:l}}const r=jn(a.year,a.month-1);return Yu(a.year,a.month-1,r+(a.week+t)*7,7)}const Zo={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function Zu(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Xu({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 p=typeof s=="number"?s:Zo[s].diameter,h=l??(typeof s=="number"?12:Zo[s].strokeWidth),d=p/2,m=(p-h)/2,b=2*Math.PI*m;if(a&&a.length>0){const x=a.reduce((g,w)=>{const _=g.length>0?g[g.length-1].acc:0,E=Number.isFinite(w.ratio)?w.ratio:0,v=Math.max(0,Math.min(E,1-_));return g.push({color:w.color,rotate:-90+_*360,dash:b*v,acc:_+v}),g},[]);return n.jsx("div",{className:"ring-chart",style:{width:p,height:p},children:n.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),x.map((g,w)=>g.dash>0&&n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:g.color,strokeWidth:h,strokeDasharray:`${g.dash} ${b}`,strokeLinecap:"round",transform:`rotate(${g.rotate} ${d} ${d})`},w))]})})}const y=(t??0)>0?Math.min((e??0)/t,1):0,C=b*y,f=b-C;return n.jsxs("div",{className:"ring-chart",style:{width:p,height:p},children:[n.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),y>0&&n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:r,strokeWidth:h,strokeDasharray:`${C} ${f}`,strokeLinecap:y<.02||y>.98?"butt":"round",transform:`rotate(-90 ${d} ${d})`})]}),!u&&n.jsxs("div",{className:`ring-chart__center${c?"":` ${p<=96?"ring-chart__center--small":s==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${p<=96?"h2":"h1"}`,children:Zu(y)}),!c&&n.jsx("span",{className:`ring-chart__label ${p<=96?"caption-2":"caption-1"}${p<=96||s==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function i4({titleKey:e,titleLevel:t,headRight:a,icon:r,showTotal:s,totalLabelKey:l,legend:i,loading:u,className:c,inGrid:p=!1,onClick:h,ariaLabel:d,tooltip:m,...b}){const{t:y}=ke.useTranslation();if(!e)return n.jsx(Xu,{...b});const C=(b.total??0)>0?Zu(Math.min((b.done??0)/b.total,1)):0,f=b.size==="small",x=typeof b.size=="number"?b.size:Zo[b.size??"medium"].diameter,g=b.size==="large",w=f?"medium":g?"xLarge":"large",_=c||void 0,E=r&&n.jsx("span",{className:ue("chart-section__head-icon"),children:n.jsx(lt,{icon:r,className:ue("chart-section__head-icon-inner")})});return n.jsx(Ar,{className:_,size:w,inGrid:p,onClick:h,ariaLabel:d,tooltip:m,title:y(e),titleLevel:t,headRight:E||(f?void 0:a),legend:i&&n.jsx(qo,{items:i}),subRow:s&&n.jsxs(xa,{label:!f&&l?y(l):void 0,children:[n.jsx("span",{className:ue(oa(f)),children:C}),n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:"%"})]}),children:u?n.jsx("div",{className:ue("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx("div",{className:"ring-chart ring-chart--loading",style:{width:x,height:x},"aria-busy":"true",children:n.jsx(ga,{size:32})})}):n.jsx("div",{className:ue("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx(Xu,{...b,hideCenter:b.hideCenter??f})})})}function u4({label:e,value:t,change:a,changeType:r,icon:s,tooltip:l,onClick:i,size:u="small",bodyAlign:c="bottom",children:p}){return n.jsx(Ar,{type:"stat",title:e,totalNum:t,change:a,changeType:r,icon:s,tooltip:l,onClick:i,size:u,bodyAlign:c,children:p})}function Ju({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:p,className:h,label:d,formatValue:m,labelPos:b,labelAlign:y="right",showMinMax:C=!1,minLabel:f,maxLabel:x,showBgTick:g=!1,showFillTick:w=!1,tickStep:_,tickShape:E="dot"}){t&&!c&&Dt("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 v=Math.min(r,Math.max(a,e)),N=r>a?(v-a)/(r-a):0,k=l==="vertical",D=!t,A=ne=>t?.(Number(ne.target.value)),B=typeof p=="number"?`${p}px`:p,F={"--slider-ratio":String(N),"--slider-thumb":`${i}px`,...B?k?{height:B}:{width:B}:{}},L=_??s,q=(g||w)&&L>0&&r>a?Math.floor((r-a)/L+1e-6):0;if(q>0&&q<=100){const ne=E!=="dash",S=ie=>ne?`radial-gradient(circle, ${ie} 0.5px, transparent 1px)`:k?`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))`,$=ne?"2px":"4px",I=[],P=[],V=[];for(let ie=0;ie<=q;ie++){const U=ie*L/(r-a);if(U>1+1e-6)break;const ce=`${((k?1-U:U)*100).toFixed(4)}%`,Z=U<=N+1e-6;if(Z?!w:!g)continue;const H=Z?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";I.push(S(H)),P.push(k?`${$} var(--slider-thumb)`:`var(--slider-thumb) ${$}`),V.push(k?`center ${ce}`:`${ce} center`)}I.push(k?"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))"),P.push("100% 100%"),V.push("0 0"),F.backgroundImage=I.join(", "),F.backgroundSize=P.join(", "),F.backgroundPosition=V.join(", "),F.backgroundRepeat="no-repeat"}const M=m?m(v):d==="percent"?`${Math.round(r>a?(v-a)/(r-a)*100:0)}%`:d==="count"?`${v} / ${r}`:v===a&&f?f:v===r&&x?x:void 0,O=n.jsx("input",{type:"range",className:De("slider",`slider--${l}`,D&&"slider--static",!d&&!C&&h),min:a,max:r,step:s,value:v,disabled:u,readOnly:D,tabIndex:D?-1:void 0,"aria-label":c,"aria-valuetext":M,"aria-orientation":l,onChange:A,style:F});if(!d&&!C)return O;const T=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:f??a}),G=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:x??r}),K=C?n.jsxs("div",{className:De("slider-track-group",`slider-track-group--${l}`,!d&&h),children:[k?G:T,O,k?T:G]}):O;if(!d)return K;const ee=b??(k?"bottom":"right"),re=`${Math.round(r>a?(v-a)/(r-a)*100:0)}%`,R=m?m(v):d==="percent"?re:d==="count"?`${v} / ${r}`:String(v),J=n.jsx("span",{className:"slider-wrap__value body-3b",children:R});return n.jsxs("div",{className:De("slider-wrap",`slider-wrap--${l}`,`slider-wrap--label-${ee}`,`slider-wrap--align-${y}`,h),children:[K,J]})}const c4=.86,d4=250,Xo=(e,t,a,r)=>Math.round(Math.min(r,Math.max(a,e-t))),Jo=(e,t,a,r)=>{const s=Xo(e,t,a,r);return`${s<0?"-":"+"}${Math.abs(s)} dB`};function Qo({analyser:e,audioElement:t,orientation:a="horizontal",length:r,label:s,labelPos:l,labelAlign:i="right",floorDb:u=-60,refDb:c=-35,displayMin:p=-5,displayMax:h=25,className:d,ariaLabel:m}){const b=o.useRef(null),y=o.useRef(null),C=o.useRef(null),f=o.useRef(null),[x,g]=o.useState(null);o.useEffect(()=>{const v=O=>{const T=Jo(O,c,p,h);C.current&&(C.current.textContent=T);const G=b.current;G&&(G.setAttribute("aria-valuenow",String(Xo(O,c,p,h))),G.setAttribute("aria-valuetext",T))},N=e??ef(t)??(x&&x.el===t?x.node:null),k=y.current;if(!N||!k){k?.style.setProperty("--meter-level","0"),v(u);let O=!1;return!e&&t&&ur(t).then(T=>{!O&&T&&g({el:t,node:T})}),()=>{O=!0}}io();const D=new Float32Array(N.fftSize);let A=0,B=0,F=0,L=0,q=null;const M=O=>{const T=tf(N,D);A=T>A?T:A*c4;const G=A>1e-5?20*Math.log10(A):-1/0,K=Math.max(u,G),ee=K-c,re=Math.min(1,Math.max(0,(ee-p)/(h-p)));if(k.style.setProperty("--meter-level",re.toFixed(3)),B+=K,F+=1,O-L>=d4){const R=B/F;q=q==null?R:q*.6+R*.4,v(q),B=0,F=0,L=O}f.current=requestAnimationFrame(M)};return f.current=requestAnimationFrame(M),()=>{f.current!=null&&cancelAnimationFrame(f.current),f.current=null}},[e,t,x,u,c,p,h]);const w=typeof r=="number"?`${r}px`:r,_=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"})}),E=l??(a==="vertical"?"bottom":"right");return n.jsxs("div",{ref:b,className:De("audio-meter",`audio-meter--${a}`,s&&`audio-meter--label-${E}`,s&&`audio-meter--align-${i}`,d),role:"meter","aria-label":m,"aria-valuemin":p,"aria-valuemax":h,"aria-valuenow":Xo(u,c,p,h),"aria-valuetext":Jo(u,c,p,h),children:[_,s&&n.jsx("span",{ref:C,className:"audio-meter__value caption-2",children:Jo(u,c,p,h)})]})}const Qu=260;function ec({message:e,position:t,duration:a,onClose:r}){const[s,l]=o.useState(!1),[i,u]=o.useState(!1),c=o.useRef(i),p=o.useRef(s);o.useEffect(()=>{c.current=i},[i]),o.useEffect(()=>{p.current=s},[s]);const h=o.useRef(null),d=o.useRef(""),m=o.useRef(r);o.useEffect(()=>{m.current=r});const b=a,y=o.useRef(null),C=o.useRef(0),f=o.useRef(0),x=o.useRef(!1),g=o.useRef(null),w=o.useRef(null),_=o.useRef(null),E=o.useRef(null),v=o.useRef(()=>{});v.current=D=>{D<0||(C.current=Date.now(),f.current=D,y.current=setTimeout(()=>{y.current=null,l(!1),g.current=setTimeout(()=>{u(!1);try{m.current()}catch{}},Qu)},D))};const N=o.useCallback(()=>{x.current||!y.current||(x.current=!0,clearTimeout(y.current),y.current=null,f.current=Math.max(0,f.current-(Date.now()-C.current)))},[]),k=o.useCallback(()=>{x.current&&(x.current=!1,v.current(f.current))},[]);return o.useEffect(()=>{if(e!==d.current&&(y.current&&(clearTimeout(y.current),y.current=null),g.current&&(clearTimeout(g.current),g.current=null)),e){if(p.current)return b>0&&!y.current&&(x.current?f.current=b:v.current(b)),d.current=e,()=>{y.current&&(clearTimeout(y.current),y.current=null),g.current&&(clearTimeout(g.current),g.current=null)};const D=()=>{const A=h.current;if(A)try{A.classList.remove("is-visible"),A.style.transition="none",t==="top"?A.style.transform="translateX(-50%) translateY(-16px)":A.style.transform="translateX(-50%) translateY(16px)",A.style.opacity="0",A.offsetWidth,A.style.transition="",A.classList.add("is-visible"),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{E.current=null;try{A.style.opacity="",A.style.transform="",A.style.transition=""}catch{}},60)}catch{}};c.current?(D(),l(!0)):(u(!0),w.current=requestAnimationFrame(()=>{_.current=requestAnimationFrame(()=>{D(),l(!0)})})),b>0&&(x.current=!1,v.current(b))}else l(!1),g.current=setTimeout(()=>u(!1),Qu);return d.current=e,()=>{y.current&&clearTimeout(y.current),g.current&&clearTimeout(g.current),w.current&&cancelAnimationFrame(w.current),_.current&&cancelAnimationFrame(_.current),E.current&&clearTimeout(E.current),y.current=null,g.current=null,w.current=null,_.current=null,E.current=null}},[e,b,t]),{mounted:i,showing:s,popupRef:h,pause:N,resume:k}}function Ba({message:e="",position:t="top",type:a="normal",onClose:r=()=>{},duration:s=2e3}){const{mounted:l,showing:i,popupRef:u,pause:c,resume:p}=ec({message:e,position:t,duration:s,onClose:r}),h=o.useRef(null),[d,m]=o.useState(!1);if(o.useEffect(()=>{i?m(!0):l||m(!1)},[i,l]),!l)return null;const b=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:p,onFocusCapture:c,onBlurCapture:p,children:n.jsx("div",{className:`toast__inner toast__inner--${b} body-2`,"aria-hidden":d||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?hn.createPortal(y,document.body):y}const p4=24;function h4({value:e,max:t=100,size:a=8,color:r,trackColor:s,label:l,formatValue:i,labelPos:u,labelAlign:c="right",ariaLabel:p,className:h}){const d=Number.isFinite(t)&&t>0?t:1,m=Math.max(0,Math.min(Number.isFinite(e)?e:0,d)),b=m/d*100,y=Number.isFinite(t)&&t>0?t:0,C=u??(a>=p4?"inside":"bottom"),f=C==="center"?"inside":C,x=f==="inside"&&(c==="left"?b>=15:c==="center"?b>=50:b>=85),g={};return r&&(g["--progress-bar-fill"]=r),s&&(g["--progress-bar-track"]=s),n.jsxs("div",{className:De("progress-bar",`progress-bar--${a}`,`progress-bar--label-${f}`,l&&`progress-bar--align-${c}`,l&&x&&"progress-bar--label-on-fill",h),style:g,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":p,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${b}%`}})}),l&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(m):l==="percent"?`${Math.round(b)}%`:l==="raw"?String(m):`${m} / ${y}`})]})}const tc={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},m4="rgba(255, 255, 255, 0.16)";function nc({max:e,index:t,inactiveBg:a,inactiveColor:r,transparent:s,variant:l="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=ke.useTranslation(),p=vn("(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,d=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"]=m4),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:d,children:[i&&n.jsx("span",{style:tc,children:d}),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 b=i?n.jsx("span",{role:"status",style:tc,children:d}):null;return p?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:m,role:"list","aria-label":d,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[h+1," / ",e]})}),b]}):n.jsxs(n.Fragment,{children:[b,n.jsx("div",{className:"progress-indicator",style:m,role:"list","aria-label":d,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 C4(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 f4(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=ac(i.span),c=Math.min(u,r.length-l);if(c===1)r[l]=Math.max(r[l],i.width);else{const p=Math.max(0,(i.width-a*(c-1))/c);for(let h=l;h<l+c;h++)r[h]=Math.max(r[h],p)}l+=c}}return r}function ac(e){const t=typeof e=="number"?e:parseInt(String(e??""),10);return Number.isFinite(t)&&t>=1?Math.floor(t):1}function b4(e,t){const a=/span\s+(\d+)/.exec(`${e??""} ${t??""}`);return a?ac(parseInt(a[1],10)):1}function g4(e,t){const{isFixed:a,floorOf:r,containerWidth:s}=t;if(!(s>0))return!1;const l=e.reduce((i,u,c)=>i+(a(c)?u:0),0);return e.reduce((i,u,c)=>i+(a(c)?0:r(c)),0)>s-l}function y4(e,t){const{isFixed:a,floorOf:r,containerWidth:s}=t,l=e.reduce((d,m,b)=>d+(a(b)?m:0),0),i=e.reduce((d,m,b)=>d+(a(b)?0:m),0),u=s-l;if(!(s>0&&i>0&&u>0))return[...e];const c=u/i,p=e.map((d,m)=>a(m)?d:Math.max(r(m),Math.round(d*c))),h=Math.round(u-p.reduce((d,m,b)=>d+(a(b)?0:m),0));if(h!==0){let d=-1;p.forEach((m,b)=>{!a(b)&&(d<0||m>p[d])&&(d=b)}),d>=0&&(p[d]=Math.max(r(d),p[d]+h))}return p}const v4=16;function _4(e,t=v4){return e.map(a=>{const r=a.sortable&&!a.sorted;return Math.max(a.declaredMin,Math.ceil(a.headWidth+(r?t:0)))})}const rc="declared";function x4({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 es({variant:e="default",children:t,className:a,draggable:r,onClick:s,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:p,colSpan:h,describedBy:d,rowHasButton:m}){const b=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(ga,{size:28})})})}):e==="empty"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--empty body-3",children:n.jsx("div",{role:"cell","aria-colspan":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?b:void 0,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:s&&!m?0:void 0,"aria-describedby":s&&!m?d:void 0,children:t}),p&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row-expand__cell",children:p})})]})}function w4({dir:e}){return n.jsx(e==="asc"?al:nl,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function B4({children:e,onClick:t,className:a,sortDir:r,ariaSort:s,onResizeStart:l}){const i=n.jsxs(n.Fragment,{children:[e,r&&n.jsx(w4,{dir:r})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":s,className:De("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 oc(e){return e&&e!=="left"?`table-col--${e}`:void 0}function ts({fields:e=[],sort:t,sortable:a=!0,headerGroups:r,items:s=[],renderRow:l,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:p,onRowDragStart:h,onRowDragEnd:d,draggingId:m,gridTemplateColumns:b,mobileGridTemplateColumns:y,resizable:C=!0,resizeMode:f="grow",resizeStorageKey:x,refitOn:g,size:w="small",title:_,icon:E,count:v,collapsed:N=!1,onToggleCollapse:k,headerActions:D,empty:A,loading:B,dragOver:F=!1,onDragOver:L,onDragLeave:q,onDrop:M,renderExpandedRow:O,expandedId:T}){const{t:G}=ke.useTranslation(),K=o.useId(),ee=`table-title-${K}`,re=`table-row-hint-${K}`,[R,J]=o.useState(null),ne=o.useCallback((Q,_e=0)=>{if(!(Q==null||typeof Q=="boolean")){if(typeof Q=="string"||typeof Q=="number")return String(Q);if(!(_e>6)){if(Array.isArray(Q)){const Oe=Q.map(Ve=>ne(Ve,_e+1)).filter(Boolean);return Oe.length?Oe.join(""):void 0}if(o.isValidElement(Q))return ne(Q.props.children,_e+1)}}},[]),S=o.useCallback((Q,_e)=>{const Oe=e[_e];if(!Oe)return;if(Oe.sortValue)return Oe.sortValue(Q);if(Oe.sortKey)return Q[Oe.sortKey];const Ve=l(Q)[_e]?.content;return typeof Ve=="string"||typeof Ve=="number"?Ve:ne(Ve)},[e,l,ne]),$=!t&&a&&!e.some(Q=>Q.sortDir!==void 0||Q.onClick),I=o.useCallback(Q=>{const _e=e[Q];if(!_e||_e.sortable===!1)return!1;if(_e.sortValue||_e.sortKey)return!0;const Oe=s[0];return Oe!==void 0&&S(Oe,Q)!==void 0},[e,s,S]);o.useEffect(()=>{if(!$||s.length===0)return;const Q=e.filter((_e,Oe)=>_e.sortable!==!1&&!I(Oe));Q.length!==0&&Dt(`Table/sort-mute/${Q.map(_e=>String(_e.label??"?")).join(",")}`,`[ihab/Table] \uC815\uB82C\uC5D0\uC11C \uBE60\uC9C4 \uC5F4\uC774 \uC788\uC2B5\uB2C8\uB2E4: ${Q.map(_e=>`'${String(_e.label??"?")}'`).join(" \xB7 ")}`,`
831
- \uCE78\uC5D0 \uAE00\uC790\uAC00 \uC5C6\uC5B4(\uB124\uBAA8\xB7\uADF8\uB9BC\xB7\uB2E8\uCD94 \uAC19\uC740 \uB9C8\uB514) \uBB34\uC5C7\uC73C\uB85C \uC138\uC6B8\uC9C0 \uC54C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`,"\n\uADF8 \uC5F4\uC758 `sortValue` \uB97C \uC8FC\uC138\uC694 \u2014 \uC608: `sortValue: (w) => !!w.image`.","\n\uC77C\uBD80\uB7EC \uC548 \uC138\uC6B0\uB294 \uC5F4\uC774\uBA74 `sortable: false` \uB97C \uC801\uC73C\uBA74 \uC774 \uC54C\uB9BC\uC774 \uBA4E\uC2B5\uB2C8\uB2E4.")},[$,e,s,I]);const P=o.useMemo(()=>t?e.map(Q=>{if(!Q.sortKey||Q.sortDir!==void 0)return Q;const _e=t.field(String(Q.label??""),Q.sortKey);return{...Q,sortDir:_e.sortDir,onClick:Q.onClick??_e.onClick}}):$?e.map((Q,_e)=>I(_e)?{...Q,sortDir:R?.index===_e?R.asc?"asc":"desc":null,onClick:()=>J(Oe=>Oe?.index===_e?{index:_e,asc:!Oe.asc}:{index:_e,asc:!0})}:Q):e,[e,t,$,R,I]),V=o.useMemo(()=>{if(!$||!R)return s;const{index:Q,asc:_e}=R;return[...s].sort((Oe,Ve)=>vr(S(Oe,Q),S(Ve,Q),_e))},[s,$,R,S]),ie=vn("(max-width: 767px)"),U=y&&ie?y:null,ce=C&&!ie,Z=o.useRef(ce);Z.current=ce;const H=48,te=40,W=o.useRef(()=>H),z=x?`table-cols:${x}`:null,ae=o.useRef(null),ve=o.useRef(null),me=o.useRef(null),le=o.useRef(null),[Be,Pe]=o.useState(!1),[Fe,Ae]=o.useState(0),se=o.useCallback(()=>{const Q=me.current;if(!Q)return;const _e=le.current,Oe=ae.current;if(_e&&(_e.style.minWidth="",Oe)){const Ve=Oe.scrollWidth,Bt=Z.current?te:0;_e.style.minWidth=Ve>Q.clientWidth+1?`${Ve+Bt}px`:""}Pe(Q.scrollWidth>Q.clientWidth+1),Ae(Q.clientWidth)},[]),ye=o.useCallback((Q,_e)=>{const Oe=Q.current;Oe&&ve.current&&ve.current.unobserve(Oe),Q.current=_e,_e?(!ve.current&&typeof ResizeObserver<"u"&&(ve.current=new ResizeObserver(()=>se())),ve.current?.observe(_e)):!me.current&&!le.current&&(ve.current?.disconnect(),ve.current=null),se()},[se]),Ce=o.useCallback(Q=>ye(me,Q),[ye]),xe=o.useCallback(Q=>ye(le,Q),[ye]);o.useEffect(()=>{se()}),o.useEffect(()=>{if(typeof window>"u")return;const Q=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>se()):null;return window.addEventListener("resize",se),()=>{Q!=null&&cancelAnimationFrame(Q),window.removeEventListener("resize",se)}},[se]);const $e=o.useRef(()=>!1),nt=o.useRef([]),ct=o.useRef(null),at=Q=>{if(!Q||typeof window>"u")return null;try{const _e=JSON.parse(window.localStorage.getItem(Q)??"null");return Array.isArray(_e)&&_e.length>0&&_e.every(Oe=>typeof Oe=="number"&&Number.isFinite(Oe)&&Oe>0)?_e:null}catch{return null}},[rt,Ee]=o.useState(()=>at(z)),[Ue,Ne]=o.useState(z),[Ye,et]=o.useState(()=>at(z)!==null);if(Ue!==z){Ne(z);const Q=at(z);Ee(Q),et(Q!==null)}const ft=o.useRef(rt);o.useEffect(()=>{ft.current=rt},[rt]);const vt=o.useCallback(Q=>{const _e=ct.current;if(!_e)return;const Oe=ft.current;if(Oe){const Ve=[...Oe],Bt=()=>H;if(_e.next!=null&&_e.startWNext!=null){const Qe=Q.clientX-_e.startX,zt=Math.max(Bt()-_e.startW,Math.min(_e.startWNext-Bt(),Qe));Ve[_e.index]=_e.startW+zt,Ve[_e.next]=_e.startWNext-zt}else Ve[_e.index]=Math.max(Bt(),_e.startW+(Q.clientX-_e.startX));ft.current=Ve,Ee(Ve)}},[]),dt=o.useCallback(()=>{if(ct.current=null,window.removeEventListener("pointermove",vt),window.removeEventListener("pointerup",dt),window.removeEventListener("pointercancel",dt),document.body.style.cursor="",document.body.style.userSelect="",z&&ft.current)try{window.localStorage.setItem(z,JSON.stringify(ft.current))}catch{}},[vt,z]),jt=o.useCallback((Q,_e)=>{_e.preventDefault(),_e.stopPropagation();const Oe=ae.current;if(!Oe)return;const Ve=Array.from(Oe.children).map(Qe=>Qe.getBoundingClientRect().width),Bt=f==="fit"?P.findIndex((Qe,zt)=>zt>Q&&Qe.resizable!==!1):-1;ct.current=Bt>=0?{index:Q,startX:_e.clientX,startW:Ve[Q],next:Bt,startWNext:Ve[Bt]}:{index:Q,startX:_e.clientX,startW:Ve[Q]},ft.current=Ve,Ee(Ve),et(!0),window.addEventListener("pointermove",vt),window.addEventListener("pointerup",dt),window.addEventListener("pointercancel",dt),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[vt,dt,f,P]),ot=o.useCallback(()=>{const Q=ae.current,_e=Q?.closest(".table-wrap");if(!Q||!_e)return null;const Oe=_e.style.getPropertyValue("--table-grid-cols");_e.style.setProperty("--table-grid-cols",P.map(()=>"max-content").join(" "));const Ve=Array.from(_e.querySelectorAll(".table-row")).filter(Pt=>!Pt.classList.contains("table-row--loading")&&!Pt.classList.contains("table-row--empty")),Bt=Pt=>Array.from(Pt.children).map(St=>{const Mt=window.getComputedStyle(St);return{width:St.getBoundingClientRect().width,span:b4(Mt.gridColumnStart,Mt.gridColumnEnd)}}),Qe=parseFloat(window.getComputedStyle(Q).columnGap)||0,zt=Ve.map(Bt),Ht=Bt(Q),cn=f4([Ht,...zt],P.length,Qe),Yt=_4(P.map((Pt,St)=>({declaredMin:W.current(St),headWidth:Ht[St]?.width??0,sortable:Pt.sortDir!==void 0||!!Pt.onClick,sorted:!!Pt.sortDir}))),Tt=Pt=>Yt[Pt]??W.current(Pt),Jt=P.map((Pt,St)=>{const Mt=cn[St],Gt=$e.current(St)?parseFloat(nt.current[St]):NaN;return Number.isFinite(Gt)&&Math.ceil(Mt)>Gt&&Dt(`table-fixed-col-overflow:${St}:${Gt}`,`[ihabdevteam-core] Table \uC758 ${St+1}\uBC88\uC9F8 \uC5F4\uC744 ${Gt}px \uB85C \uC815\uD574 \uB450\uC5C8\uB294\uB370 \uC548\uC758 \uB0B4\uC6A9\uC740 ${Math.ceil(Mt)}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(Mt)}px \uC774\uC0C1\uC73C\uB85C \uB298\uB9AC\uC138\uC694.`),Number.isFinite(Gt)?Gt:Math.max(W.current(St),Math.ceil(Mt))}),en=window.getComputedStyle(Q),An=(parseFloat(en.paddingLeft)||0)+(parseFloat(en.paddingRight)||0),Nn=_e.clientWidth-An;Oe?_e.style.setProperty("--table-grid-cols",Oe):_e.style.removeProperty("--table-grid-cols");const gn={isFixed:Pt=>$e.current(Pt),floorOf:Tt,containerWidth:Nn};return g4(Jt,gn)?rc:y4(Jt,gn)},[P,f]),st=(Q,_e)=>Q!==null&&Q.length===_e.length&&Q.every((Oe,Ve)=>Oe===_e[Ve]),At=o.useRef(ot);o.useEffect(()=>{At.current=ot});const[Nt,Ot]=o.useState(0),Wt=V.length>0,xt=`${z??""}|${Nt}|${P.length}|${Fe}|${g??""}`,it=!Ye&&ce&&z!==null&&!B?`${xt}|${Wt?1:0}`:null,bt=o.useRef(null);o.useEffect(()=>{if(it===null||!Wt||bt.current===xt)return;const Q=At.current();if(Q!==null){if(bt.current=xt,Q===rc){Ee(null);return}Ee(_e=>st(_e,Q)?_e:Q)}},[it]);const pt=o.useCallback(()=>{if(z)try{window.localStorage.removeItem(z)}catch{}et(!1);const Q=At.current(),_e=Array.isArray(Q)?Q:null;Ee(_e),ft.current=_e,Ot(Oe=>Oe+1)},[z]);o.useEffect(()=>()=>{ct.current&&(window.removeEventListener("pointermove",vt),window.removeEventListener("pointerup",dt),window.removeEventListener("pointercancel",dt),document.body.style.cursor="",document.body.style.userSelect="")},[vt,dt]);const kt=P.length>0&&P.every(Q=>Q.width!=null)?P.map(Q=>typeof Q.width=="number"?`${Q.width}px`:String(Q.width)).join(" "):null;P.some(Q=>Q.width!=null)&&!kt&&Dt(`table-field-width:${P.map(Q=>Q.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."),kt&&b&&Dt("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 mt=b??kt??void 0,wt=C4(mt),de=wt.filter(Q=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(Q));de.length>0&&Dt(`table-content-track:${b}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${de.join(", ")})\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uBA38\uB9AC\uC640 \uBAB8\uD1B5\uC740 \uC11C\uB85C \uB2E4\uB978 \uACA9\uC790\uB77C \uADF8 \uD2B8\uB799\uC774 \uAC01\uC790 \uB2E4\uB974\uAC8C \uD480\uB824 \uC5F4\uC774 \uC5B4\uAE0B\uB0A9\uB2C8\uB2E4. px \uC774\uB098 fr \uC744 \uC4F0\uC138\uC694. (\uBC1B\uC740 \uAC12: ${b})`);const Le=P.findIndex(Q=>!!Q.sortDir);P.filter(Q=>!!Q.sortDir).length>1&&Dt("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 Se=Q=>Q===Le?P[Q].sortDir==="asc"?"ascending":"descending":P[Q].onClick?"none":void 0,Je=Q=>/^\d+(\.\d+)?px$/.test(wt[Q]??""),ht=Q=>{const _e=wt[Q]??"",Oe=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(_e)??/^(\d+(?:\.\d+)?)px$/.exec(_e);return Oe?parseFloat(Oe[1]):H};$e.current=Je,W.current=ht,nt.current=wt;const Rt=Q=>f==="fit"&&!Je(Q)?"fr":"px",Me=rt&&rt.length===P.length&&!ie,tt=U??(Me?P.map((Q,_e)=>Q.resizable===!1&&wt[_e]?wt[_e]:`${rt[_e]}${Rt(_e)}`).join(" "):mt),Ft=tt?{"--table-grid-cols":tt}:void 0,_t=_!==void 0;return n.jsxs("div",{ref:Ce,className:`table-wrap table-wrap--${w}${ce?" table-wrap--resizable":""}${F?" table-wrap--dragover":""}${N?" table-wrap--collapsed":""}`,style:Ft,onDragOver:L,onDragLeave:q,onDrop:M,tabIndex:Be?0:void 0,role:Be?"region":void 0,"aria-label":Be?typeof _=="string"?_:G("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:re,className:"table-row-hint",children:G("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:xe,role:"table","aria-labelledby":_t&&typeof _=="string"?ee:void 0,className:"table body-2",children:[_t&&n.jsxs("div",{className:De("table-header",k&&"table-header--clickable"),onClick:k,role:"caption",children:[k&&n.jsx(be,{htmlType:"button",size:Lt,type:"dot",variant:"transparent-gray",useBorder:!1,icon:N?"chevron-right":"chevron-down",ariaLabel:N?G("common.expand","\uD3BC\uCE58\uAE30"):G("common.collapse","\uC811\uAE30"),ariaExpanded:!N,className:"table-header__chevron"}),E&&n.jsx(lt,{icon:E,label:typeof _=="string"?_:void 0,className:"table-header__icon"}),n.jsx("span",{id:ee,className:"table-header__title h5b",children:_}),v!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:v}),D&&n.jsx("span",{className:"table-header__actions",onClick:Q=>Q.stopPropagation(),children:D})]}),!N&&n.jsxs(n.Fragment,{children:[r&&r.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:r.map((Q,_e)=>n.jsx("div",{role:"columnheader","aria-colspan":Q.span,className:De("table-field body-3",Q.className),style:{gridColumn:`span ${Q.span}`},children:Q.label},_e))}),n.jsxs("div",{role:"presentation",className:De("table-fields-strip",ce&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:ae,children:P.map((Q,_e)=>n.jsx(B4,{onClick:Q.onClick,className:De(Q.className,oc(Q.align)),sortDir:Q.sortDir,ariaSort:Se(_e),onResizeStart:ce&&_e<P.length-1&&Q.resizable!==!1&&(f!=="fit"||P.some((Oe,Ve)=>Ve>_e&&Oe.resizable!==!1))?Oe=>jt(_e,Oe):void 0,children:Q.label},_e))}),ce&&n.jsx("div",{className:"table-fields__reset-dock",children:n.jsx(be,{htmlType:"button",size:Lt,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:G("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:G("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:pt})})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:B?n.jsx(es,{variant:"loading",colSpan:P.length||void 0}):V.length===0&&A?n.jsx(es,{variant:"empty",colSpan:P.length||void 0,children:A}):V.map((Q,_e)=>{const Oe=m!=null&&Q.id===m,Ve=!!i&&(u?u(Q):!0),Bt=T!=null&&Q.id!=null&&(T instanceof Set?T.has(Q.id)||[...T].some(Qe=>String(Qe)===String(Q.id)):String(Q.id)===String(T));return n.jsx(es,{className:`${Ve?" table-row--clickable":""}${h?" table-row--draggable":""}${Oe?" table-row--dragging":""}`.trim(),draggable:!!h,onClick:Ve?()=>i(Q):void 0,colSpan:P.length||void 0,rowHasButton:l(Q).some(Qe=>!!Qe.rowLabel),describedBy:re,onMouseEnter:c?Qe=>c(Q,Qe):void 0,onMouseLeave:p?Qe=>p(Q,Qe):void 0,onDragStart:h?Qe=>h(Q,Qe):void 0,onDragEnd:d?Qe=>d(Q,Qe):void 0,expandedContent:Bt&&O?O(Q):void 0,children:l(Q).map((Qe,zt)=>n.jsx(x4,{className:De(Qe.className,oc(P[zt]?.align)),style:Qe.style,span:Qe.span,rowLabel:Ve?Qe.rowLabel:void 0,onRowClick:Ve?()=>i(Q):void 0,children:Qe.content},zt))},Q.id!=null?`${typeof Q.id}:${Q.id}`:`__idx:${_e}`)})})]})]})]})}function sc(e,t){return t!=="wornAt"?String(e[t]??""):jv(e.wornYear,e.wornMonth,e.wornDay)}function k4({rows:e,loading:t,onSelect:a,onDelete:r,onWear:s,onRelease:l,onAdd:i}){const{t:u,i18n:c}=ke.useTranslation(),p=f=>f==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:h,field:d}=zy(),m=o.useMemo(()=>{if(!h)return e;const{key:f,asc:x}=h;return[...e].sort((g,w)=>{if(f==="worn"){const _=Number(w.worn)-Number(g.worn);return x?_:-_}return vr(sc(g,f),sc(w,f),x)})},[e,h]),{pageRows:b,pageSizeProps:y,paginationProps:C}=Oy(m,h);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(Vo,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:y,pagination:C,actions:i&&n.jsx(be,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),n.jsx(ts,{loading:t,resizable:!0,resizeMode:"fit",resizeStorageKey:"customer-device-history-v2",fields:[{...d(u("customers.device.wearingNow","\uCC29\uC6A9"),"worn"),resizable:!1},d(u("device.direction.label","\uBC29\uD5A5"),"side"),d(u("device.deviceType","\uC885\uB958"),"device"),d(u("device.brand","\uBE0C\uB79C\uB4DC"),"brand"),d(u("device.fitType","\uCC29\uC6A9\uD615\uD0DC"),"fitType"),d(u("device.productName","\uC81C\uD488\uBA85"),"productName"),d(u("device.wornDate","\uCC29\uC6A9\uC77C"),"wornAt"),...r?[{label:"",resizable:!1}]:[]],items:b.map((f,x)=>({id:f.id??`${f.side}-${x}`,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:x=>x.stopPropagation(),children:n.jsx(Wo,{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:x=>{x?s?.(f):l?.(f)}})})},{content:n.jsx("span",{children:p(f.side)})},{content:f.device?n.jsx(ln,{size:"small",variant:Du(f.device),fill:"soft",label:Su(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:Oo(f.wornYear,f.wornMonth,f.wornDay,c.language)||"-"})},...r?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(be,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:u("common.delete","\uC0AD\uC81C"),onClick:x=>{x?.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 lc(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 A4(e,t){return new Date(e,t+1,0).getDate()}function N4(e,t){return new Date(e,t,1).getDay()}function E4({visits:e=[],onVisitClick:t,onVisitMove:a,onDayClick:r,today:s}){const{t:l,i18n:i}=ke.useTranslation(),u=o.useMemo(()=>l("calendar.dow",{returnObjects:!0}),[l]),c=pr(s),[p,h]=o.useState(()=>Number(c.slice(0,4))),[d,m]=o.useState(()=>Number(c.slice(5,7))-1),[b,y]=o.useState(null),C=o.useRef(null),f=o.useMemo(()=>{const v={};return e.forEach(N=>{v[N.date]||(v[N.date]=[]),v[N.date].push(N)}),v},[e]),x=o.useMemo(()=>{const v=A4(p,d),N=N4(p,d),k=[];for(let D=0;D<N;D++)k.push(null);for(let D=1;D<=v;D++)k.push(D);for(;k.length<35;)k.push(null);return k},[p,d]),g=o.useCallback(()=>{d===0?(h(v=>v-1),m(11)):m(v=>v-1)},[d]),w=o.useCallback(()=>{d===11?(h(v=>v+1),m(0)):m(v=>v+1)},[d]),_=v=>`${p}-${String(d+1).padStart(2,"0")}-${String(v).padStart(2,"0")}`,E=v=>_(v)===c;return n.jsxs("div",{children:[n.jsxs("div",{className:"calendar-nav",children:[n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:g,"aria-label":l("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(lt,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:Yl(l,i.language,p,d+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:w,"aria-label":l("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(lt,{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(v=>n.jsx("div",{className:"calendar-day-header body-3",children:v},v)),x.map((v,N)=>{if(v===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${N}`);const k=v,D=_(k),A=f[D]??[],B=Gl(D,i.language),F=b===D;return n.jsxs("div",{className:`calendar-cell${E(k)?" today":""}${F?" 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":E(k)?"date":void 0,onClick:r?()=>r(D):void 0,onKeyDown:r?L=>{L.target===L.currentTarget&&(L.key!=="Enter"&&L.key!==" "||(L.preventDefault(),r(D)))}:void 0,onDragOver:a?L=>{L.preventDefault(),y(D)}: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,D),C.current=null),y(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:k}),A.length>0&&(()=>{const L=[{key:"visited",label:l("calendar.legend.visited","\uBC29\uBB38"),count:A.filter(M=>(M.status??"visited")==="visited").length},{key:"scheduled",label:l("calendar.legend.scheduled","\uC608\uC57D"),count:A.filter(M=>M.status==="scheduled").length},{key:"noVisit",label:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:A.filter(M=>M.status==="noVisit").length}].filter(M=>M.count>0),q=L.length===1&&L[0].key==="visited"?l("calendar.visitCount",{count:A.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":`${B} ${q}`,children:[L.map(M=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${M.key}`,"aria-hidden":"true"},M.key)),A.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:A.map((L,q)=>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,...lc(t?()=>t(L):void 0),"aria-label":[B,L.time?Ql(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:Ql(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??q))})]},k)})]})]})}const D4={page:"h3",pagePopup:"h4",popup:"h5"};function ka({type:e="page",title:t,headingLevel:a=2,icon:r,action:s,disc:l,children:i,inGrid:u=!1,className:c,style:p}){const h=D4[e],d=t||l||s||r,m=a?`h${a}`:"div";return n.jsxs("div",{className:De("section",`section--${e}`,u&&"section--in-grid",c),style:p,children:[d&&n.jsxs("div",{className:"section__header",children:[n.jsxs("div",{className:"section__title-row",children:[r&&n.jsx(lt,{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 ns=null,ic=!1;function uc(){if(ic||typeof document>"u")return;ic=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(ns="keyboard")},!0);const e=()=>{ns="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}uc();function Nr(){return uc(),ns==="keyboard"}const Er=20;function S4(e){const{t}=ke.useTranslation(),{type:a,trainingDatas:r,depth:s,renderPopup:l,completedIds:i,selectedIds:u,onItemComplete:c,size:p,useDescriptionTooltip:h,onRemove:d,onMore:m,sectionType:b="page"}=e||{},[,y]=o.useState(0),C=typeof r<"u"?Array.isArray(r)?r:[]:[],f=C.length,[x,g]=o.useState(Math.min(f,Er)),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(()=>{g(Math.min(f,Er))},[f]),Vi("speechear.data.updated",()=>y(N=>N+1));const _=o.useRef(null),E=o.useRef(null);function v(){const N=document.activeElement;E.current=Nr()&&N&&N.closest?.(".training-block__more")?x:null,g(k=>Math.min(f,k+Er))}return o.useEffect(()=>{const N=E.current;if(N==null)return;E.current=null;const k=document.activeElement;k&&k!==document.body||_.current?.querySelectorAll(".training-block-button")[N]?.focus()},[x]),n.jsxs(ka,{type:b,title:a?.label,icon:a?.icon,disc:a?.desc,className:"training-block",children:[n.jsx("div",{className:"training-list",ref:_,children:(C||[]).slice(0,x).map((N,k)=>{const D=N;return n.jsx(Fo,{index:k,type:a,trainingData:D,depth:w,renderPopup:l,completedIds:i,selectedIds:u,size:p,useDescriptionTooltip:h,onRemove:typeof d=="function"&&u!=null&&D?.id!=null&&u.has(String(D.id))?()=>d(D):void 0,onComplete:typeof c=="function"&&D?.id!=null?()=>c(String(D.id)):void 0,onMore:typeof m=="function"?A=>m(D,A):void 0},D?.id!=null?`${a?.key||"t"}-${String(D.id)}`:`${a?.key||"t"}-${k}`)})}),f>Er&&x<f&&n.jsx("div",{className:"training-block__more",children:n.jsx(be,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:v,ariaLabel:t("common.loadMore","\uB354\uBCF4\uAE30"),label:t("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function j4(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 T4({gap:e=10,count:t,className:a,children:r}){const s=o.useRef(null),[l,i]=o.useState({width:0,card:0}),u=t??j4(r);o.useLayoutEffect(()=>{const m=s.current;if(!m)return;const b=()=>{const C=m.style.maxWidth;m.style.maxWidth="none";const f=m.clientWidth;m.style.maxWidth=C;const x=m.firstElementChild?.offsetWidth??0;i(g=>g.width===f&&g.card===x?g:{width:f,card:x})};if(b(),typeof ResizeObserver>"u")return;const y=new ResizeObserver(b);return y.observe(m),()=>y.disconnect()},[u,e]);const c=l.card>0?l.card:0,p=c>0?Nf(l.width,c,e):0,h=p>0?Ef(u,p):0,d={"--block-grid-gap":`${e}px`,...h>0?{"--block-grid-cols":h,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:s,className:De("training-block-grid",h>0&&"training-block-grid--measured",a),style:d,"data-cols":h>0?h:void 0,children:r})}function as(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 M4='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 L4=M4,rs=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:p=null},h){const{t:d}=ke.useTranslation(),m=e.word||e.title||"",b=t||!m,y=e.audio??e.sound??e.audioKey,C=e.subLabel||e.pronunciation||"",f=e.colloquialLabel||"",[x,g]=o.useState({label:m,subLabel:C,colloquialLabel:f,homonum:e.homonum});m&&(x.label!==m||x.subLabel!==C||x.colloquialLabel!==f||!Object.is(x.homonum,e.homonum))&&g({label:m,subLabel:C,colloquialLabel:f,homonum:e.homonum});const w=o.useRef(null),_=vn("(max-width: 767px)"),[E,v]=o.useState(!1),[N,k]=o.useState(!1),D=`${typeof y=="string"?y:y?.src??""}\0${m}`,[A,B]=o.useState({for:"",url:""}),F=A.for===D?A.url:"",L=Vl(),q=e.textOnly??(!e.image&&!!x.label&&!!L&&L.entries.length>0&&!L.byWord.has(x.label)),M=q?"":Ca()?.(x.label,x.homonum)??e.image??"",{imgRef:O,loading:T,hasImage:G,onLoad:K,onError:ee}=as(M);o.useEffect(()=>{let V=!1;return(async()=>{if(y){if(typeof y=="string"){if(y.startsWith("http")||y.includes("/")){B({for:D,url:y});return}}else if(typeof y=="object"&&!Array.isArray(y)){const U=y.src;if(U){B({for:D,url:U});return}}}const ie=$a();if(ie&&m)try{const U=await Promise.resolve(ie(m));!V&&U&&B({for:D,url:U})}catch{}})(),()=>{V=!0}},[y,m,D]);const re=o.useRef(!0),R=o.useRef(null);o.useEffect(()=>(re.current=!0,()=>{re.current=!1,R.current&&Br(R.current),R.current=null;try{w.current?.pause()}catch{}w.current=null}),[]);const J=o.useCallback(()=>new Promise(V=>{if(typeof window<"u"&&window.speechSynthesis&&m){v(!0),window.speechSynthesis.cancel();const ie=new SpeechSynthesisUtterance(m);ie.lang="ko-KR",ie.onend=()=>{v(!1);try{a?.()}catch{}V()},ie.onerror=()=>{v(!1),V()},window.speechSynthesis.speak(ie)}else V()}),[m,a]),ne=o.useCallback(V=>{const ie=Ja(V,U=>{if(v(!1),U)try{a?.()}catch{}});return w.current=ie.el,ie.done},[a]),S=o.useCallback(async()=>{if(t||!re.current)return;const V=()=>{R.current===V&&(R.current=null);try{w.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}v(!1)},ie=Xa(V);R.current=V;try{window.speechSynthesis?.cancel()}catch{}try{if(F&&(v(!0),await ne(F)))return;const U=ir();if(U&&m)try{k(!0);const ce=await Promise.resolve(U(m));if(!re.current||R.current!==V||(k(!1),ce&&(v(!0),await ne(ce))))return}catch{}if(!re.current||R.current!==V)return;await J()}finally{R.current===V&&k(!1),ie(),R.current===V&&(R.current=null)}},[t,F,m,ne,J]);o.useImperativeHandle(h,()=>({play:()=>S()}),[S]);const $=V=>V.stopPropagation(),I=o.useCallback(V=>{if(V.stopPropagation(),!t){if(E){try{w.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}v(!1);return}S()}},[t,E,S]),P=De("training-word-card",t?"training-word-card--disabled":"",b?"training-word-card--flipped":"",r?"training-word-card--selectable":"",s?"training-word-card--selected":"");return n.jsx("div",{className:P,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?V=>{V.target===V.currentTarget&&(V.key==="Enter"||V.key===" "||V.key==="Spacebar")&&(V.preventDefault(),l?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:b?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[s&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:$,children:n.jsx(Sn,{size:40,position:"inline",animate:!0,icon:p!=null?void 0:"check",number:p??void 0,"aria-label":p!=null?d("training.nthSelected",{n:p}):d("training.selected","\uC120\uD0DD\uB428")})}),n.jsx("div",{className:"training-word-card__image-wrap",children:q?n.jsx("div",{className:"training-word-card__text-face",children:x.label}):G?n.jsxs(n.Fragment,{children:[T&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:O,className:"training-word-card__image",src:M,alt:x.label||d("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:T?0:1},onLoad:K,onError:ee})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!q&&n.jsx("div",{className:"training-word-card__word",children:x.label}),x.subLabel&&n.jsxs("div",{className:"training-word-card__pronunciation",children:["[",x.subLabel,"]"]}),x.colloquialLabel&&n.jsxs("div",{className:"training-word-card__colloquial caption-1",children:["[",x.colloquialLabel,"]"]})]}),!c&&n.jsx("div",{className:"training-word-card__bottom",onClick:r?$:void 0,children:n.jsx(be,{htmlType:"button",size:_?40:48,type:_?"dot":"bar",icon:E?"pause":"play",label:_?void 0:d("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:E,loading:N,onClick:I,disabled:t,ariaLabel:d("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("${L4}")`}})})]})})});function Dr(e){return String(e)}const Sr=["o","triangle","x"];function cc(e,t){return e===t?null:t}const dc={o:"circle",triangle:"triangle",x:"x"},pc={o:"main",triangle:"warn",x:"danger"};function $4(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 os(e){const t={};for(const[a,r]of Object.entries(e))(r==="o"||r==="triangle"||r==="x")&&(t[a]=r);return t}function hc(e){const t=[];let a=0;for(const r of e)t.push(a),a+=r;return t}function R4(e,t){return!t&&e>0}const sa={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 P4(e="landscape"){Dt("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}=sa[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 F4(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 I4={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 mc(e,t){const a=I4[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 O4(e,t){const a=mc(e==="landscape"?"portrait":"landscape",t),r=Math.max(1,Math.ceil(t));if(r<=1)return a;const s=sa[e],l=e==="landscape"?s.width/2:s.width,i=e==="landscape"?s.height:s.height/2,u=(m,b)=>Math.min(l/m/yc,i/b/vc),c=Math.max(0,a.cols*a.rows-r),p=u(a.cols,a.rows);let h=a,d=p;for(let m=1;m<=r;m++){const b=Math.ceil(r/m);if(m*b-r>c)continue;const y=u(m,b);y>d&&(h={cols:m,rows:b},d=y)}return d>p*1.05?h:a}const z4={show:"word-table__content--cut-show",dashed:"",corner:"word-table__content--cut-corner",hide:""},Cc={\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"},fc={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},ss={\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"},ls={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function bc(e){return Object.fromEntries(Object.entries(Cc).map(([t,a])=>[t,ss[t]?e(`wordTable.pos.${ss[t]}`,{defaultValue:a}):a]))}function gc(e){return Object.fromEntries(Object.entries(fc).map(([t,a])=>[t,ls[t]?e(`wordSearch.filter.type.${ls[t]}`,{defaultValue:a}):a]))}const W4={pos:ss,wordType:ls};function is(e,t){return e?e.split("/").map(a=>t[a]??a).join("/"):""}function us(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",p=b=>`repeating-linear-gradient(to ${b}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,h=[],d=[],m=[];return i&&(h.push(p("bottom")),d.push("1px 100%"),m.push("right center")),u&&(h.push(p("right")),d.push("100% 1px"),m.push("center bottom")),{backgroundImage:h.join(", "),backgroundSize:d.join(", "),backgroundPosition:m.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const yc=280,H4=240,V4=280,vc=400,q4=120,U4=280;function _c(e,t){const a=o.useRef(null),[r,s]=o.useState(1),[l,i]=o.useState(0),u=o.useCallback((c,p)=>{if(!(c>0))return;const h=c/e,d=t&&p>0?p/t:1/0,m=Math.min(1,h,d);s(m),i(Math.max(0,(c-e*m)/2))},[e,t]);return o.useEffect(()=>{const c=a.current;if(!c)return;const p=t?c.parentElement??c:c;if(u(p.clientWidth,p.clientHeight),typeof ResizeObserver>"u")return;const h=new ResizeObserver(([d])=>u(d.contentRect.width,d.contentRect.height));return h.observe(p),()=>h.disconnect()},[u,t]),{scalerRef:a,scale:r,offset:l}}const G4=24,K4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},Y4=400,xc=8;function Z4(e){return e<=1?"100%":`repeat(${e}, calc((100% - ${e-1} * var(--wt-cell-gap, 0px)) / ${e}))`}function cs({label:e,subLabel:t,colloquialLabel:a,captionLabel:r,captionBadge:s,imageLabel:l,pickForm:i,homonum:u,showWord:c=!0,showImage:p=!0,showPronunciation:h=!0,showColloquial:d=!0,showCaption:m=!0,buttonSize:b=40,wordInfo:y,outerScale:C=1}){const{t:f}=ke.useTranslation(),x=o.useRef(null),g=o.useRef(null),w=o.useRef(null),[_,E]=o.useState(1),[v,N]=o.useState(!1),[k,D]=o.useState(!1),[A,B]=o.useState({for:"",url:""}),[F,L]=o.useState(null),q=t&&t.length>0?t:J1()?.(e,u)??"",M=Ca()?.(l||e,u)??"",{imgRef:O,loading:T,failed:G,onLoad:K,onError:ee}=as(M),re=o.useCallback(()=>L(g.current?.getBoundingClientRect()??null),[]),R=o.useCallback(()=>L(null),[]),J=gr(!!F,te=>{te?re():R()},g),ne=o.useMemo(()=>{if(!y)return null;const te=[];return y.grade&&te.push(f("wordTable.info.grade",{n:y.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),y.syllables&&te.push(f("wordTable.info.syllables",{n:y.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),y.pos&&te.push(f("wordTable.info.pos",{v:is(y.pos,bc(f)),defaultValue:"\uD488\uC0AC: {{v}}"})),y.wordType&&te.push(f("wordTable.info.wordType",{v:is(y.wordType,gc(f)),defaultValue:"\uC720\uD615: {{v}}"})),te.length?te:null},[y,f]),S=q||e,$=A.for===S?A.url:"";o.useEffect(()=>{const te=$a(),W=q||e;if(!te||!W)return;let z=!1;return Promise.resolve(te(W)).then(ae=>{!z&&ae&&B({for:W,url:ae})}),()=>{z=!0}},[q,e]);const I=o.useRef(null),P=o.useRef(null);o.useEffect(()=>()=>{w.current?.pause(),P.current?.()},[]);const V=o.useRef(null);o.useEffect(()=>()=>{V.current&&(V.current.cancelled=!0)},[]);const ie=o.useCallback(te=>{if(te.stopPropagation(),v||k){I.current?.();return}if(!$){const z=ir(),ae=q||e;if(!z||!ae)return;const ve={cancelled:!1,stop:null};V.current=ve;const me=()=>{ve.cancelled=!0,ve.stop?.(),D(!1),N(!1),P.current?.()};I.current=me,P.current=Xa(me),D(!0),Promise.resolve().then(()=>z(ae)).then(le=>{if(ve.cancelled)return;if(!le){me();return}B({for:ae,url:le});const Be=Ja(le,()=>{N(!1),P.current?.()});w.current=Be.el,ve.stop=Be.stop,D(!1),N(!0)}).catch(()=>{me()});return}N(!0);const W=Ja($,()=>{N(!1),P.current?.()});w.current=W.el,I.current=W.stop,P.current=Xa(W.stop)},[v,k,$,q,e]),U=p&&!!M&&!G,ce=U&&c?yc:U?V4:H4,Z=U&&c?vc:U?U4:q4;o.useEffect(()=>{const te=x.current;if(!te||typeof ResizeObserver>"u")return;const W=new ResizeObserver(([z])=>{const{width:ae,height:ve}=z.contentRect;E(Math.min(ae/ce,ve/Z))});return W.observe(te),()=>W.disconnect()},[ce,Z]);const H=b*C<G4;return n.jsxs("div",{ref:x,className:De("word-table-cell",H&&"word-table-cell--tap-too-small",U?"word-table-cell--with-image":""),"data-ref-w":ce,"data-ref-h":Z,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${_})`},children:[U&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[T&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:O,className:"word-table-cell__image",src:M,alt:e,draggable:!1,style:{opacity:T?0:1},onLoad:K,onError:ee})]}),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&&q&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",q,"]"]}),d&&a&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",a,"]"]})]}),n.jsxs("div",{className:"word-table-cell__side",children:[n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":$,children:[n.jsx("span",{"data-play-state":"play",style:{display:v?"none":void 0},children:n.jsx(be,{htmlType:"button",size:b,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,loading:k,showTooltipInfo:k?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:v?void 0:"none"},children:n.jsx(be,{htmlType:"button",size:b,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:g,className:"word-table-cell__info-button",onPointerEnter:te=>{Gn(te)||re()},onPointerLeave:te=>{Gn(te)||R()},onFocus:()=>{ta()||re()},onBlur:R,children:[n.jsx(be,{htmlType:"button",size:b,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:f("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:te=>{te.stopPropagation(),J.touchPress()}}),F&&ne&&n.jsx(Un,{anchorRect:F,items:ne,showIndex:!1})]}),i&&n.jsx("div",{className:"word-table-cell__form-button",children:n.jsx(be,{htmlType:"button",size:b,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:te=>{te.stopPropagation(),i.onPick(te.currentTarget.getBoundingClientRect())}})})]})]})}function Aa({title:e,titleIcon:t,disc:a,className:r,orientation:s="landscape",contentTypes:l=["image","word","standardPron"],baseItem:i,baseContentTypes:u,cutLine:c="show",showOutline:p=!0,showDivLine:h=!0,items:d,editCells:m,count:b,activeCell:y=null,onActivateCell:C,onRemoveCell:f,onRemoveItem:x,onReorder:g,onCopyItem:w,onReplaceItem:_,onPickForm:E,indexOffset:v=0,totalCount:N,renderCellAction:k,showFillerAdd:D=!1,addableCount:A,contentRef:B,buttonSize:F=40,brand:L,code:q,pageNumber:M,pageNumberPosition:O="right",fitHeight:T=!1,scoring:G=!1,marks:K,onMarkClick:ee,scoreIndexOffset:re=0}){const R=o.useCallback((de,Le)=>{ee?.(re+de,Le)},[ee,re]),J=(de,Le)=>{const Se=de.filter(Boolean).join(" / ");return Se?Le?S("wordPrint.removePairFor",{name:Se,defaultValue:`${Se} \uB300\uB9BD\uC30D \uBE7C\uAE30`}):S("wordPrint.removeWordFor",{name:Se,defaultValue:`${Se} \uBE7C\uAE30`}):Le?S("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):S("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30")},ne=(de,Le)=>{const Se=K?.[Dr(re+de)]??null;return n.jsx("div",{className:De("word-table-cell__score",Se?"word-table-cell__score--marked":""),style:kt>1?{transform:`translateX(-50%) scale(${kt})`,transformOrigin:"bottom center"}:void 0,children:Sr.map(Je=>n.jsx("span",{className:De("word-table-cell__score-slot",Se===Je?"word-table-cell__score-slot--on":""),children:n.jsx(be,{htmlType:"button",size:F,type:"dot",shape:"pill",icon:dc[Je],variant:Se===Je?pc[Je]:"default",selected:Se===Je,useBorder:!1,...pt?{}:{tabIndex:-1,role:"img"},showTooltipInfo:S(`wordTable.scoring.markName.${Je}`,{defaultValue:Je}),ariaLabel:S(`wordTable.scoring.${Je}`,{word:Le,defaultValue:`${Le} ${Je}`}),onClick:pt?ht=>{ht.stopPropagation(),R(de,Je)}:void 0})},Je))})},{t:S}=ke.useTranslation(),$=m!==void 0,I=e!=null||!!t||!!a,P=vn("(max-width: 767px)"),V=o.useRef(null),[ie,U]=o.useState(null),ce=d?.length??0,Z=N??ce,[H,te]=o.useState(null),[W,z]=o.useState(""),ae=o.useRef(null),ve=o.useRef(null),me=o.useRef(null),le=o.useRef(null),Be=o.useCallback(de=>{ve.current=de,typeof B=="function"?B(de):B&&(B.current=de)},[B]),Pe=o.useCallback((de,Le)=>{ae.current=v+Le,g?.(de,Le),z(S("wordTable.reorder.moved",{n:v+Le+1,total:Z,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[g,S,Z,v]);o.useEffect(()=>{const de=ae.current;de!=null&&(ae.current=null,(ve.current?.closest(".word-table-block__pages")??ve.current)?.querySelector(`[data-wordtable-index="${de}"] .word-table__card-handle button`)?.focus())}),o.useEffect(()=>()=>{le.current?.()},[]);const Fe=o.useCallback((de,Le)=>{if(!g||!de.altKey||de.ctrlKey||de.metaKey)return;const Se=de.key==="ArrowRight";if(!Se&&de.key!=="ArrowLeft")return;de.preventDefault();const Je=Le+(Se?1:-1),ht=v+Je;ht<0||ht>=Z||Pe(Le,Je)},[g,Z,v,Pe]),Ae=o.useCallback((de,Le)=>{if(!g||de.pointerType==="mouse")return;const Se=de.target.closest?.("button");if(Se&&!Se.closest(".word-table__card-handle"))return;le.current?.();const Je={x:de.clientX,y:de.clientY};let ht=!1;const Rt=Ve=>{ht&&Ve.cancelable&&Ve.preventDefault()};let Me=null,tt=null;const Ft=()=>{const Ve=tt;if(!Ve)return;const Bt=document.elementFromPoint?.(Ve.x,Ve.y)?.closest?.("[data-wordtable-cell]"),Qe=Bt?Number(Bt.dataset.wordtableCell):NaN,zt=Number.isInteger(Qe)?Qe:null;me.current=zt,U(Ht=>Ht===zt?Ht:zt)},_t=Ve=>{if(!ht){(Math.abs(Ve.clientX-Je.x)>xc||Math.abs(Ve.clientY-Je.y)>xc)&&Oe();return}if(tt={x:Ve.clientX,y:Ve.clientY},typeof requestAnimationFrame>"u"){Ft();return}Me===null&&(Me=requestAnimationFrame(()=>{Me=null,Ft()}))},Q=()=>{Me!==null&&(cancelAnimationFrame(Me),Me=null,Ft());const Ve=me.current,Bt=ht;Oe(),Bt&&Ve!=null&&Ve!==Le&&Pe(Le,Ve)},_e=setTimeout(()=>{ht=!0,te(Le),me.current=Le,U(Le),window.addEventListener("touchmove",Rt,{passive:!1})},Y4);function Oe(){clearTimeout(_e),window.removeEventListener("pointermove",_t),window.removeEventListener("pointerup",Q),window.removeEventListener("pointercancel",Q),window.removeEventListener("touchmove",Rt),ht=!1,Me!==null&&(cancelAnimationFrame(Me),Me=null),me.current=null,le.current=null,te(null),U(null)}le.current=Oe,window.addEventListener("pointermove",_t),window.addEventListener("pointerup",Q),window.addEventListener("pointercancel",Q)},[g,Pe]),{width:se,height:ye}=sa[s],Ce=typeof T=="number"?T:T&&typeof T=="object"?P?T.narrow:T.wide:null,{scalerRef:xe,scale:$e,offset:nt}=_c(se,T?ye:void 0),ct=$?m?.length??0:d?.length??0,at=Math.max(b??ct,1),rt=!$&&!!i,Ee=O4(s,at),Ue=mc(s,at),Ne=rt?Ee.cols:Ue.cols,Ye=rt?Ee.rows:Ue.rows,et=rt&&s==="landscape"?Ee.cols*2:Ne,ft=rt&&s==="portrait"?Ee.rows*2:Ye,vt=de=>({word:de.length===0||de.includes("word"),image:de.length===0||de.includes("image"),pron:de.length===0||de.includes("standardPron"),colloq:de.length===0||de.includes("colloquialPron"),caption:de.length===0||de.includes("caption")}),dt=vt(l),jt=o.useMemo(()=>{const de=(d??[]).map(Se=>Se.id),Le=de.every(Se=>typeof Se=="string"&&Se.length>0)&&new Set(de).size===de.length;return!Le&&de.length>0&&Dt("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."),Le?de:null},[d]),ot=vt(u??l),st=$?(m??[]).some(de=>de!==null&&de.length>1):(d??[]).some(de=>(de.words??[]).length>1),At=!!L?.show,Nt=!!L?.show&&L?.top!==!1,Ot=!!L?.show&&L?.bottom!==!1,Wt=L?.copyright??"\xA9 IHAB, Inc. All rights reserved.",xt=ue(De("word-table__content",z4[c],p&&"word-table__content--outline",h&&st&&"word-table__content--div-line",!At&&M&&O!=="none"&&"word-table__content--page-number",Nt&&"word-table__content--brand-top",Ot&&"word-table__content--brand-bottom")),it={transform:`scale(${1/$e})`,transformOrigin:"center center"},bt=F*Sr.length+4*(Sr.length-1),pt=!!ee,kt=pt?Math.max(1,Math.min(1/$e,se/et/bt)):1,mt=n.jsxs("div",{ref:xe,className:"word-table__scaler",style:{height:ye*$e},children:[n.jsx("div",{className:De("word-table",G&&!pt&&"word-table--score-readonly",!I&&r),style:{width:se,height:ye,transform:`scale(${$e})`,transformOrigin:"top left",marginLeft:nt},children:n.jsxs("div",{ref:Be,className:xt,style:{gridTemplateColumns:`repeat(${et}, 1fr)`,gridTemplateRows:Z4(ft)},children:[$?n.jsx(n.Fragment,{children:(m??[]).map((de,Le)=>n.jsx("div",{className:ue(De("word-table__edit-cell",de?"word-table__edit-cell--filled":"word-table__edit-cell--empty",y===Le?"word-table__edit-cell--active":"")),style:us(Le,et,ft,c),children:de?n.jsxs(n.Fragment,{children:[de.map((Se,Je)=>n.jsxs(o.Fragment,{children:[Je>0&&n.jsx("div",{className:ue("word-table__pair-divider")}),n.jsx(cs,{outerScale:$e,label:Se.word,subLabel:Se.pronunciation,colloquialLabel:Se.colloquialPronunciation,homonum:Se.homonum,showWord:dt.word,showImage:dt.image,showPronunciation:dt.pron,showColloquial:dt.colloq,showCaption:dt.caption,buttonSize:F})]},Je)),G&&ne(Le,de.map(Se=>Se.word).join(" / ")),f&&n.jsx("div",{className:ue("word-table__card-close"),children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:de.length>1?S("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):S("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:J(de.map(Se=>Se.word),de.length>1),onClick:()=>f(Le)})})]}):C&&n.jsx("div",{className:ue("word-table__card-add"),style:it,children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"plus",variant:"default",ariaLabel:S("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:S("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C(Le)})})},Le))}):n.jsxs(n.Fragment,{children:[rt&&i&&n.jsx("div",{className:ue("word-table__card word-table__card--base"),style:{gridColumn:`1 / span ${Ee.cols}`,gridRow:`1 / span ${Ee.rows}`,...us(0,s==="landscape"?2:1,s==="landscape"?1:2,c)},children:(i.words??[]).map((de,Le)=>n.jsxs(o.Fragment,{children:[Le>0&&n.jsx("div",{className:ue("word-table__pair-divider")}),n.jsx(cs,{outerScale:$e,label:de.label,subLabel:de.subLabel,colloquialLabel:de.colloquialLabel,captionLabel:de.captionLabel,captionBadge:de.captionBadge,imageLabel:de.imageLabel,pickForm:E&&de.canPickForm?{n:null,onPick:Se=>E(i.id,-1,Se)}:void 0,homonum:de.homonum,showWord:ot.word,showImage:ot.image,showPronunciation:ot.pron,showColloquial:ot.colloq,showCaption:ot.caption,buttonSize:F,wordInfo:de.grade||de.syllables!=null||de.pos||de.wordType?{grade:de.grade,syllables:de.syllables,pos:de.pos,wordType:de.wordType}:void 0})]},Le))}),(d??[]).map((de,Le)=>n.jsxs("div",{"data-wordtable-cell":g?Le:void 0,"data-wordtable-index":g?v+Le:void 0,className:ue(`word-table__card${g?" word-table__card--draggable":""}${ie===Le?" word-table__card--drag-over":""}${H===Le?" word-table__card--dragging":""}`),style:us(Le,Ne,Ye,c),draggable:!!g,onPointerDown:g?Se=>Ae(Se,Le):void 0,onKeyDown:g?Se=>Fe(Se,Le):void 0,onDragStart:g?()=>{V.current=Le}:void 0,onDragOver:g?Se=>{Se.preventDefault(),U(Le)}:void 0,onDragLeave:g?()=>U(null):void 0,onDrop:g?Se=>{Se.preventDefault(),V.current!==null&&V.current!==Le&&g(V.current,Le),V.current=null,U(null)}:void 0,onDragEnd:g?()=>{V.current=null,U(null)}:void 0,children:[(de.words??[]).map((Se,Je)=>n.jsxs(o.Fragment,{children:[Je>0&&n.jsx("div",{className:ue("word-table__pair-divider")}),n.jsx(cs,{outerScale:$e,label:Se.label,subLabel:Se.subLabel,colloquialLabel:Se.colloquialLabel,captionLabel:Se.captionLabel,captionBadge:Se.captionBadge,imageLabel:Se.imageLabel,pickForm:E&&Se.canPickForm?{n:v+Le+1,onPick:ht=>E(de.id,v+Le,ht)}:void 0,homonum:Se.homonum,showWord:dt.word,showImage:dt.image,showPronunciation:dt.pron,showColloquial:dt.colloq,showCaption:dt.caption,buttonSize:F,wordInfo:Se.grade||Se.syllables!=null||Se.pos||Se.wordType?{grade:Se.grade,syllables:Se.syllables,pos:Se.pos,wordType:Se.wordType}:void 0})]},Je)),G&&ne(Le,(de.words??[]).map(Se=>Se.label).join(" / ")),(k||x||w||_||g)&&n.jsxs("div",{className:ue("word-table__card-actions"),children:[x&&n.jsx("div",{className:ue("word-table__card-close"),children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(de.words??[]).length>1?S("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):S("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:J((de.words??[]).map(Se=>Se.label),(de.words??[]).length>1),onClick:()=>x(de.id)})}),w&&n.jsx("div",{className:ue("word-table__card-copy"),children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"copy",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:S("wordTable.copyItem","\uD55C \uCE78 \uB354"),ariaLabel:S("wordTable.copyItemAria",{n:v+Le+1,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354"}),onClick:()=>w(de.id,v+Le)})}),_&&n.jsx("div",{className:ue("word-table__card-replace"),children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"refresh-cw",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(de.words??[]).length>1?S("wordTable.replacePair","\uB2E4\uB978 \uC30D\uC73C\uB85C"):S("wordTable.replaceItem","\uB2E4\uB978 \uB2E8\uC5B4\uB85C"),ariaLabel:(de.words??[]).length>1?S("wordTable.replacePairAria",{n:v+Le+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C"}):S("wordTable.replaceItemAria",{n:v+Le+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C"}),onClick:()=>_(de.id,v+Le)})}),k?.(Le,de),g&&n.jsx("div",{className:ue("word-table__card-handle"),children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:S("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:S("wordTable.reorder.handle",{word:(de.words??[]).map(Se=>Se.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})})]})]},jt?jt[Le]:Le)),Array.from({length:Math.max(0,Ne*Ye-(d?.length??0))}).map((de,Le)=>{const Se=Ne*Ye,Je=A??Se,ht=(d?.length??0)+Le<Je;return n.jsx("div",{className:ue("word-table__card word-table__card--filler"),children:D&&C&&ht&&n.jsx("div",{className:ue("word-table__card-add"),style:it,children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"plus",variant:"default",ariaLabel:S("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:S("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C((d?.length??0)+Le)})})},`filler-${Le}`)})]}),Nt&&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??wr,alt:L?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const de=[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"),q&&n.jsx("span",{className:"word-table__code",children:q},"c")].filter(Boolean);return de.length===0?null:n.jsx("span",{className:"word-table__ident",children:de.map((Le,Se)=>n.jsxs(o.Fragment,{children:[Se>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Le]},Se))})})()]})}),Ot&&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:Wt})]}),n.jsxs("span",{className:"word-table__band-end",children:[L?.link&&n.jsx("span",{className:"word-table__link",children:L.link}),M&&O!=="none"&&n.jsx("span",{className:"word-table__page-count",children:S("wordTable.filter.pageIndicator",{current:M.current,total:M.total})})]})]})}),!At&&M&&O!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${O}`,children:S("wordTable.filter.pageIndicator",{current:M.current,total:M.total})})]})}),g&&n.jsx("span",{role:"status",style:K4,children:W})]}),wt=Ce==null?mt:n.jsx("div",{className:"word-table__frame",style:{height:Ce},children:mt});return I?n.jsx(ka,{type:"page",icon:t,title:e,disc:a,className:De(ue("word-table__section"),r),children:wt}):wt}function X4(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=J4(s,t?.[s.label],a);i!==null&&r.push(`${l} ${i}`)}return r.join(" \xB7 ")}function J4(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 On({title:e,titleLevel:t=2,headerAction:a,headerSummary:r,collapsible:s=!1,defaultCollapsed:l=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:p,selected:h={},onSelect:d,align:m,sectionAlign:b,className:y}){const C=(m??(b==="vertical"?"newline":"inline"))==="inline",{t:f}=ke.useTranslation(),[x,g]=o.useState(l),w=i??x,_=()=>{const B=!w;g(B),u?.(B)},E=B=>{if(!s)return;const F=B.target;!F||typeof F.closest!="function"||F.closest(".filter-panel__collapse-toggle")||F.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||_()},v=o.useMemo(()=>r!==void 0||!w?"":X4(p,h,f("common.all","\uC804\uCCB4")),[r,w,p,h,f]),N=r??(v?n.jsx("span",{className:"filter-panel__header-summary body-3",children:v}):null),k=e||a||r||s,D=o.useId(),A=t?`h${t}`:"span";return n.jsxs("div",{className:De("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?D:void 0,children:[k&&n.jsxs("div",{className:"filter-panel__header",onClick:s?E:void 0,children:[n.jsx("div",{className:"filter-panel__title-row",children:e&&n.jsx(A,{id:D,className:"filter-panel__title h4",children:e})}),n.jsxs("div",{className:"filter-panel__header-actions",children:[w?N:a,s&&n.jsx(be,{htmlType:"button",size:Lt,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:_})]})]}),!w&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:De("filter-panel__sections",C?"filter-panel__sections--row":""),children:p.map(B=>{const F=h[B.label],L=F===void 0||(Array.isArray(F)?F.length===0:!1),q=(B.items??[]).filter(O=>O!=null);B.allOption&&q.some(O=>(typeof O=="string"?O:O.value)===kn)&&Dt(`filter-panel-all-value:${B.label}`,`[FilterPanel] '${B.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=O=>{const T=typeof O=="string"?O:O.value,G=typeof O!="string"&&!!O.disabled,K=typeof O!="string"?O.labels:void 0,ee=typeof O!="string"?O.displayLabel:void 0,re=typeof O!="string"?O.tooltip:void 0,R=typeof O!="string"?O.descriptionTooltip:void 0,J=typeof O!="string"?O.shape:void 0,ne=Array.isArray(F)?F.includes(T):F===T;return n.jsx(be,{htmlType:"button",size:"keyboard",label:K??ee??T,type:B.itemType??(K?"bar":T.length===1?"dot":void 0),selected:ne,disabled:G,shape:J,showTooltipInfo:!!re,tooltipInfoText:re,tooltipDescription:R,onClick:()=>d?.(T,B.label)},T)};return n.jsxs(o.Fragment,{children:[B.groupLabel&&n.jsxs("div",{className:"filter-panel__group-label-row",children:[n.jsx("div",{className:"filter-panel__group-label body-2",children:B.groupLabel}),B.groupAction]}),n.jsxs("div",{className:De("filter-panel__section",B.layout==="row"?"filter-panel__section--row":"",B.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:B.displayLabel??B.label}),B.labelAction??(B.labelInfo?n.jsx(Za,{...B.labelInfo}):null)]}),B.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:B.content}):B.type==="input"?n.jsx(Yn,{className:"filter-panel__textfield",placeholder:B.placeholder,ariaLabel:B.displayLabel??B.label,value:h[B.label]??"",onChange:O=>d?.(O,B.label),error:B.error}):!B.multiple&&B.display==="segmented"?n.jsx(_n,{ariaLabel:B.displayLabel??B.label,options:[...B.allOption?[{key:kn,label:B.allLabel??f("common.all","\uC804\uCCB4"),disabled:B.allOptionDisabled}]:[],...q.map(O=>{const T=typeof O=="string"?O:O.value,G=typeof O!="string"?O.displayLabel:void 0,K=typeof O!="string"?O.disabled:void 0;return{key:T,label:G??T,disabled:K}})],value:L&&B.allOption?kn:h[B.label]??"",onChange:O=>d?.(O,B.label),size:32}):!B.multiple&&B.display==="dropdown"?n.jsx(xn,{className:"filter-panel__dropdown",ariaLabel:typeof B.label=="string"?B.label:void 0,size:Lt,options:[...B.allOption?[{value:kn,label:B.allLabel??f("common.all","\uC804\uCCB4"),disabled:B.allOptionDisabled}]:[],...q.map(O=>{const T=typeof O=="string"?O:O.value,G=typeof O!="string"?O.displayLabel:void 0,K=typeof O!="string"?O.disabled:void 0;return{value:T,label:G??T,disabled:K}})],value:L&&B.allOption?kn:h[B.label],onChange:O=>d?.(O,B.label)}):n.jsxs("div",{className:B.groups?"filter-panel__item-groups":"filter-panel__items",children:[B.allOption&&!B.groups&&n.jsx(be,{htmlType:"button",size:"keyboard",label:B.allLabel??f("common.all","\uC804\uCCB4"),selected:L,disabled:B.allOptionDisabled,onClick:()=>d?.(kn,B.label)}),B.groups?B.groups.map((O,T)=>n.jsxs("div",{className:"filter-panel__item-group",children:[T===0&&B.allOption&&n.jsx(be,{htmlType:"button",size:"keyboard",label:B.allLabel??f("common.all","\uC804\uCCB4"),selected:L,disabled:B.allOptionDisabled,onClick:()=>d?.(kn,B.label)}),O.filter(G=>G!=null).map(M)]},T)):q.map(M)]})]})]},B.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const e_=[1,2,3,4,5,6,7,8,9,10,11,12],t_=[8,6,4,2,1],bn="show",Tn="hide",wc=["image","word","caption","standardPron"];function Bc(e){return e.some(t=>(t.words??[]).some(a=>!!a.captionBadge||!!a.captionLabel))}function kc(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 Ac(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 Nc(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Ec(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Dc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Sc(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:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function jc(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Tc(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,...t_.filter(r=>r<a)].map(r=>({value:`${r}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:r})})),display:"segmented"}}function Mc(e,t){return e>=t?Number.POSITIVE_INFINITY:e}function n_(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:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Lc(e){return e==="left"||e==="center"||e==="right"?e:"none"}function $c(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:Tn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?bn:Tn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?bn:Tn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?bn:Tn}:{}}}function Rc(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 a_(e){return"sections"in e}function ds(e){const{t}=ke.useTranslation(),{title:a,className:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c}=e,p={collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c};if(a_(e))return n.jsx(On,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...p,align:"inline"});const{hasImage:h,hasColloquial:d,hasCaption:m,contentTypes:b,orientation:y,showOutline:C,cutLine:f,showDivLine:x,setters:g,showCutLine:w=!1,showDivLine2:_=!1,middleSections:E=[],extraSelected:v={},onExtraSelect:N,showPaperBands:k=!1,showTopInfo:D=!0,showBottomInfo:A=!0}=e,B=[kc(t,{hasImage:h,hasColloquial:d,hasCaption:m??!1}),Ac(t),...E,Nc(t),...w?[Sc(t)]:[],..._?[jc(t)]:[],...k?[Ec(t),Dc(t)]:[]],F={...$c(t,{contentTypes:b,orientation:y,showOutline:C,cutLine:f,showDivLine:x,showTopInfo:D,showBottomInfo:A}),...v},L=(q,M)=>{Rc(t,q,M,g)||N?.(q,M)};return n.jsx(On,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:B,selected:F,onSelect:L,...p,sectionAlign:"horizontal"})}function ps(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function r_(e){return ps(e).replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function hs(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let jr=null,Na=null;function o_(e,t,a,r="",s=""){if(e.length===0||Na&&Na.iframe.isConnected&&Date.now()-Na.at<1e4)return;const l=r?hs(r):"";jr?.();let i=null;if(l){const p=document.title;document.title=l,i=()=>{document.title=p,window.removeEventListener("afterprint",i),jr===i&&(jr=null)},jr=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}Na={iframe:u,at:Date.now()},c.open(),c.write(ms(e,t,a,!0,l,s)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),Na?.iframe===u&&(Na=null)},0)})}function ms(e,t,a,r=!1,s="",l=""){s=s?hs(s):"";const i=Array.from(document.styleSheets).flatMap(d=>{try{return Array.from(d.cssRules).map(m=>m.cssText)}catch{return[]}}).join(`
832
- `),u="light",c=(()=>{try{return document.documentElement.lang||""}catch{return""}})(),p=l?`<div class="paper-head">${ps(l)}</div>`:"",h=e.map(d=>{const m=d.cloneNode(!0);return m.querySelectorAll('[data-play-state="play"]').forEach(b=>b.style.display=""),m.querySelectorAll('[data-play-state="pause"]').forEach(b=>b.style.display="none"),m.querySelectorAll(".word-table-cell__score-slot:not(.word-table-cell__score-slot--on)").forEach(b=>b.remove()),m.querySelectorAll(".word-table-cell__spinner").forEach(b=>b.remove()),m.querySelectorAll("img").forEach(b=>{b.style.opacity==="0"&&(b.setAttribute("onload","this.style.opacity=''"),b.setAttribute("onerror","this.style.visibility='hidden'"))}),`<div class="paper-wrap">${p}${m.outerHTML}</div>`}).join(`
830
+ `),C=y===-1?a:a.slice(0,y);l("comment",C),a=a.slice(C.length);continue}const u=a.match(/^\/\*[\s\S]*?\*\//);if(u){l("comment",u[0]),a=a.slice(u[0].length);continue}const c=a.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(c){l("string",c[0]),a=a.slice(c[0].length);continue}const p=a.match(/^\d+(?:\.\d+)?/);if(p){l("number",p[0]),a=a.slice(p[0].length);continue}const h=a.match(Hv);if(h){l("keyword",h[0]),a=a.slice(h[0].length);continue}const d=a.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(d){const y=d[0];l(s&&Wv.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 b=a.match(/^[()[\]{};.,]/);if(b){l("punctuation",b[0]),a=a.slice(1);continue}l("other",a[0]),a=a.slice(1)}return r}function qv({children:e,language:t="bash",title:a="",showCopy:r=!0,size:s="default",className:l=""}){const{t:i}=ke.useTranslation(),[u,c]=o.useState(!1),p=zv(Iu(e)),h=o.useRef(null);o.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const d=async()=>{try{if(!await Zf(p))return;c(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>c(!1),2e3)}catch{}},m=Vv(p,t),b=s==="small"?"caption-1":"body-3";return n.jsxs("div",{className:De("code-box",s==="small"?"code-box--small":"",l),children:[(a||r)&&n.jsxs("div",{className:"code-box__header",role:"toolbar","aria-label":i("common.codeBlock","\uCF54\uB4DC \uBE14\uB85D"),children:[n.jsx("div",{className:"code-box__title caption-1",children:a}),r&&n.jsx(be,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:u?"check":"copy",onClick:d,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} ${b}`,children:y.content},C))})})]})}function Uv({count:e,actions:t,onClear:a,clearLabel:r,visible:s,content:l,max:i}){const{t:u}=ke.useTranslation(),c=s!==void 0?s:e>0,p=r??u("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),h=o.useRef(null),d=o.useRef(null),m=o.useRef(null),b=o.useRef(c);o.useLayoutEffect(()=>{const g=d.current,w=b.current;if(b.current=c,c&&!w){const _=typeof document<"u"?document.activeElement:null;m.current=_&&_!==document.body&&!g?.contains(_)?_:null}else!c&&w&&g&&g.contains(document.activeElement)&&fr(g,m.current)},[c]);const[y,C]=o.useState(!1),f=o.useRef(!1),x=o.useRef(null);return o.useEffect(()=>{const g=h.current;if(!g)return;const w=D=>{f.current=D,C(D)},_=()=>{const D=g.firstElementChild??g,A=Array.from(D.children);if(A.length<2){w(!1);return}const B=A[0].offsetTop,F=A.some(T=>T.offsetTop!==B);if(!f.current){x.current=g.clientWidth,F&&w(!0);return}if(F)return;const L=A[0],q=A[A.length-1],M=q.offsetLeft+q.offsetWidth-L.offsetLeft,O=x.current;(O==null||M<=O)&&w(!1)};if(_(),typeof ResizeObserver>"u")return;const E=new ResizeObserver(_);E.observe(g);const v=g.parentElement;let N=v?.clientWidth??0;const k=new ResizeObserver(()=>{const D=v?.clientWidth??0;D!==N&&(N=D,x.current=null,_())});return v&&k.observe(v),()=>{E.disconnect(),k.disconnect()}},[l,e]),n.jsxs("div",{ref:d,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(be,{htmlType:"button",size:Lt,label:p,onClick:a}),t.map((g,w)=>n.jsx(be,{htmlType:"button",size:Lt,variant:g.variant??"default",icon:g.icon,label:g.label,onClick:g.onClick},w))]})]})}const Gv=[{key:"edit",icon:"edit-2",closeFirst:!0},{key:"duplicate",icon:"copy",closeFirst:!1},{key:"publish",icon:"book-marked",closeFirst:!1},{key:"copyLink",icon:"link",closeFirst:!1},{key:"remove",icon:"trash-2",closeFirst:!0}];function Kv(e){const{onClose:t,className:a}=e;return n.jsx("div",{className:De("item-actions",a),children:Gv.map(({key:r,icon:s,closeFirst:l})=>{const i=e[r];if(!i)return null;const u=r==="publish"?i.published?i.unpublish:i.publish:i;return n.jsx(be,{htmlType:"button",size:40,type:"dot",icon:s,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{l&&t(),u.onClick()}},r)})})}function Yv({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?Il(i.sms):Il(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(([p,h])=>n.jsxs("div",{className:"notify-text-preview__meta-row",children:[n.jsx("dt",{children:p}),n.jsx("dd",{children:h})]},p))}):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?`${Pl}\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 ${Pl}\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 Zv({src:e,alt:t,className:a,style:r,tone:s,textColor:l}){const i=!s&&!!l,u=o2(e,i),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return s?n.jsx("span",{className:De("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:De("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:a2(n2(u),c)}}):n.jsx("img",{src:e,alt:t,className:De("brand-logo",a),style:r,draggable:!1})}function Ou({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:De("section-head-float",t),children:e})}function Uo({items:e,className:t}){return n.jsx("div",{className:ue(t?`chart-section__legend ${t}`:"chart-section__legend"),children:e.map((a,r)=>n.jsxs("span",{className:ue("chart-section__legend-item"),children:[n.jsx("span",{className:ue("chart-section__legend-dot"),style:{background:a.color}}),a.label]},r))})}const oa=e=>`chart-section__total__num ${e?"h1":"h0"}`;function xa({label:e,children:t}){return e?n.jsxs("div",{className:ue("chart-section__total chart-section__total--stacked"),children:[n.jsx("span",{className:ue("chart-section__total__label body-3"),children:e}),n.jsx("span",{className:ue("chart-section__total__value"),children:t})]}):n.jsx("div",{className:ue("chart-section__total"),children:t})}const zu=20,Go=120,Xv={small:Go,medium:Go*2+zu,large:Go*2+zu},Wu={small:"chart-section--compact",medium:"chart-section--compact",xLarge:"chart-section--full"};function Ar({type:e="chart",title:t,titleClassName:a,titleLevel:r,icon:s,disc:l,headRight:i,headFloat:u,headSegment:c,headMenuItems:p,collapseBelow:h=420,onClick:d,ariaLabel:m,tooltip:b,totalNum:y,totalUnit:C,totalMuted:f=!1,totalLabel:x,change:g,changeType:w,size:_,bodyAlign:E="bottom",subRow:v,legend:N,subRowAlign:k="start",className:D,inGrid:A=!1,fitBody:B=!1,children:F}){const L=e==="stat",q=_??(L?"small":"large"),M=q==="small"||q==="medium",O=a??"h5",T=r??(L?0:3),{t:G}=ke.useTranslation(),K=o.useRef(null),{anchorRect:ee,openAt:re,close:R}=_r(),J=o.useCallback(()=>{b&&K.current&&re(K.current)},[b,re]),[ne,S]=o.useState(!1);Wo(()=>{const se=K.current;if(!se||!c)return;const ye=xe=>S(xe>0&&xe<h);if(ye(se.clientWidth),typeof ResizeObserver>"u")return;const Ce=new ResizeObserver(xe=>ye(xe[0].contentRect.width));return Ce.observe(se),()=>Ce.disconnect()},[c,h]);const[$,I]=o.useState(null),P=o.useCallback(()=>I(null),[]),V=o.useCallback(se=>{const ye=se.currentTarget.getBoundingClientRect();I(Ce=>Ce?null:{left:ye.left,right:ye.right,top:ye.top,bottom:ye.bottom,width:ye.width,height:ye.height,x:ye.x,y:ye.y})},[]),ie=!!c&&ne;o.useEffect(()=>{ie||I(null)},[ie]);const U=c?[...c.options.map(se=>({label:se.label,icon:se.icon,selected:se.key===c.value,disabled:se.disabled,onClick:()=>c.onChange(se.key),closeOnSelect:!0})),...(p??[]).map((se,ye)=>ye===0?{...se,separatorBefore:!0}:se)]:[],ce=o.useCallback(se=>{if(!d)return;const ye=se.target;ye&&typeof ye.closest=="function"&&ye.closest('button, a, input, select, textarea, [role="radiogroup"]')||d()},[d]),Z=o.useCallback(se=>{d&&se.target===se.currentTarget&&(se.key==="Enter"||se.key===" ")&&(se.preventDefault(),d())},[d]),H=typeof i=="function"?i({collapsed:ie}):i,te=y!=null||x?n.jsxs(xa,{label:x,children:[y!=null&&n.jsx("span",{className:ue(oa(M)),children:y}),C&&n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:C})]}):null,W=H||c?n.jsxs("div",{className:ue("chart-section__head-right"),children:[c&&(ie?n.jsx(be,{htmlType:"button",size:ra,type:"dot",icon:"ellipsis",ariaLabel:c.ariaLabel??G("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:c.ariaLabel??G("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!$,onClick:V}):n.jsx(_n,{size:ra,ariaLabel:c.ariaLabel,options:c.options.map(se=>({key:se.key,label:se.label,disabled:se.disabled})),value:c.value,onChange:c.onChange})),H]}):null,z=o.useRef(null),[ae,ve]=o.useState(null);o.useLayoutEffect(()=>{const se=z.current;if(!se){ve(null);return}const ye=()=>{const xe=se.getBoundingClientRect().height;ve($e=>$e!=null&&Math.abs($e-xe)<1?$e:xe)};if(ye(),typeof ResizeObserver>"u")return;const Ce=new ResizeObserver(ye);return Ce.observe(se),()=>Ce.disconnect()},[N]);const me=o.useId(),le=T?`h${T}`:"div",Be=typeof q=="number"?q:Xv[q],Pe=w??(g===void 0?void 0:g>0?"up":g<0?"down":"neutral"),Fe=g===void 0?void 0:g>0?`+${g}`:`${g}`,Ae=b&&ee?n.jsx(Ln,{anchorRect:{left:ee.left,top:ee.top+21,right:ee.right,bottom:ee.bottom,width:ee.width,height:ee.height},text:b}):null;return L?n.jsxs("div",{ref:K,className:ue(["chart-section","chart-section--stat",A&&"chart-section--grid",E==="center"&&"chart-section--body-center",typeof q=="string"&&Wu[q],d&&"chart-section--clickable",D].filter(Boolean).join(" ")),style:Be===void 0?void 0:{minHeight:Be},onClick:d?ce:void 0,onKeyDown:d?Z:void 0,onPointerEnter:b?J:void 0,onPointerLeave:b?R:void 0,onFocus:b?J:void 0,onBlur:b?R:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?m??[typeof t=="string"?t:void 0,y,Fe].filter(se=>se!=null&&se!=="").join(" "):void 0,"aria-labelledby":!d&&t!=null?me:void 0,children:[Ae,n.jsxs("div",{className:ue("chart-section__head"),children:[n.jsx(le,{id:me,className:ue(["chart-section__title",O].filter(Boolean).join(" ")),children:t}),s&&n.jsx("span",{className:ue("chart-section__head-icon"),children:n.jsx(lt,{icon:s,className:ue("chart-section__head-icon-inner")})})]}),n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:ue("chart-section__sub-row"),children:[n.jsxs(xa,{children:[n.jsx("span",{className:ue([oa(!0),f&&"chart-section__total__num--muted"].filter(Boolean).join(" ")),children:y}),C&&n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:C})]}),Fe&&n.jsx("div",{className:ue(`chart-section__change chart-section__change--${Pe??"neutral"} caption-1`),children:Fe})]}),F&&n.jsx("div",{className:ue("chart-section__body"),children:F})]})]}):n.jsxs("section",{ref:K,className:ue(["chart-section",A&&"chart-section--grid",B&&"chart-section--fit",typeof q=="string"&&Wu[q],d&&"chart-section--clickable",D].filter(Boolean).join(" ")),style:{...Be===void 0?null:B?{minHeight:Be,height:Be}:{minHeight:Be},...ae==null?null:{"--legend-h":`${ae}px`}},onClick:d?ce:void 0,onKeyDown:d?Z:void 0,onPointerEnter:b?J:void 0,onPointerLeave:b?R:void 0,onFocus:b?J:void 0,onBlur:b?R:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?m??(typeof t=="string"?t:void 0):void 0,"aria-labelledby":!d&&t!=null?me:void 0,children:[b&&ee&&n.jsx(Ln,{anchorRect:{left:ee.left,top:ee.top+21,right:ee.right,bottom:ee.bottom,width:ee.width,height:ee.height},text:b}),u&&n.jsx(Ou,{children:u}),n.jsxs("div",{className:ue("chart-section__head"),children:[n.jsxs("div",{className:ue("chart-section__title-row"),children:[s&&n.jsx(lt,{icon:s,label:typeof t=="string"?t:void 0,className:ue("chart-section__icon")}),n.jsx(le,{id:me,className:ue(["chart-section__title",O].filter(Boolean).join(" ")),children:t})]}),W,l&&n.jsx("div",{className:ue("chart-section__disc body-3"),children:l})]}),(te||v)&&n.jsxs("div",{className:ue(["chart-section__sub-row",k!=="start"&&`chart-section__sub-row--${k}`].filter(Boolean).join(" ")),children:[te,v]}),N&&n.jsx("div",{ref:z,className:ue("chart-section__legend-slot"),children:N}),F,$&&n.jsx(Bn,{anchorRect:$,onClose:P,ariaLabel:c?.ariaLabel??G("tooltip.menu","\uBA54\uB274"),children:n.jsx(Ga,{columns:[{items:U}],onClose:P,size:"small"})})]})}const rr=(e,t)=>`${e}-${String(t).padStart(2,"0")}`,Ko=e=>rr(e.getFullYear(),e.getMonth()+1);function wa(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 Yo=(e,t)=>`${e}#${t}`;function jn(e,t){const a=new Date(e,t,1).getDay();return 1+(8-(a===0?7:a))%7}function Jv(){const e=fa();let t=e.getFullYear(),a=e.getMonth(),r=e.getDate();if(r<jn(t,a)){const i=new Date(t,a,0);t=i.getFullYear(),a=i.getMonth(),r=i.getDate()}const s=Math.floor((r-jn(t,a))/7),l=rr(t,a+1);return{monthKey:l,value:Yo(l,s)}}function Qv(e){const t=fa(),a=Ko(t),r=(c,p)=>rr(c,p+1),s=new Map;s.set(a,[]);for(const c of e){if(isNaN(c.date.getTime()))continue;const p=r(c.date.getFullYear(),c.date.getMonth());s.has(p)||s.set(p,[]),s.get(p).push(c)}for(const[c,p]of[...s.entries()]){const h=wa(c);if(!h)continue;const d=h.year,m=h.month1-1,b=jn(d,m);if(!(c===a&&t.getDate()<b)&&!p.some(f=>f.date.getDate()<b))continue;const y=new Date(d,m,0),C=r(y.getFullYear(),y.getMonth());s.has(C)||s.set(C,[])}const l=new Map;for(const[c,p]of s){const h=wa(c);if(!h)continue;const d=h.year,m=h.month1-1,b=new Date(d,m+1,0).getDate(),y=p.reduce((_,E)=>Math.max(_,E.parts?.length??0,E.partsB?.length??0),0),C=p.some(_=>_.partsB),f=new Array(b+1).fill(0),x=new Array(b+1).fill(0),g=Array.from({length:b+1},()=>new Array(y).fill(0)),w=Array.from({length:b+1},()=>new Array(y).fill(0));for(const _ of p){const E=_.date.getDate();if(f[E]+=_.a,x[E]+=_.b,_.parts)for(let v=0;v<y;v++)g[E][v]+=_.parts[v]??0;if(_.partsB)for(let v=0;v<y;v++)w[E][v]+=_.partsB[v]??0}l.set(c,{year:d,month:m,daysInMonth:b,partsLen:y,hasPartsB:C,dayA:f,dayB:x,dayParts:g,dayPartsB:w})}const i=(c,p,h)=>new Date(c,p,h).getTime()>new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime(),u={};for(const[c,p]of l){const{year:h,month:d,daysInMonth:m,dayA:b,dayB:y,dayParts:C,dayPartsB:f}=p,x=h===t.getFullYear()&&d===t.getMonth(),g=t.getDate(),w=l.get(r(d===11?h+1:h,(d+1)%12)),_=p.partsLen,E=[];for(let N=1;N<=m;N++){const k=x&&N>g;E.push({label:String(N),...k&&b[N]===0&&y[N]===0?{future:!0}:{},a:k&&b[N]===0&&y[N]===0?-1:b[N],b:y[N],..._?{parts:C[N]}:{},..._&&p.hasPartsB?{partsB:f[N]}:{}})}const v=[];for(let N=jn(h,d);N<=m;N+=7){const k=Math.max(0,N+6-m),D=k&&w?Math.max(_,w.partsLen):_,A=p.hasPartsB||!!(k&&w?.hasPartsB);let B=0,F=0;const L=new Array(D).fill(0),q=new Array(D).fill(0);for(let O=N;O<=Math.min(N+6,m);O++){B+=b[O],F+=y[O];for(let T=0;T<_;T++)L[T]+=C[O][T],q[T]+=f[O][T]}if(k&&w)for(let O=1;O<=k&&!i(w.year,w.month,O);O++){B+=w.dayA[O],F+=w.dayB[O];for(let T=0;T<w.partsLen;T++)L[T]+=w.dayParts[O][T],q[T]+=w.dayPartsB[O][T]}const M=k?`${(d+1)%12+1}/${k}`:`${N+6}`;v.push({label:`${v.length+1}\uC8FC`,sublabel:`[${N}\uC77C~${M}\uC77C]`,a:B,b:F,...D?{parts:L}:{},...D&&A?{partsB:q}:{}})}u[c]={weekly:v,daily:E}}return u}function Hu(){const e=fa(),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:rr(s,i),year:s,month:i})}return r.reverse()}Hu();function e4(){return Hu()}function Vu(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 t4(e,t){const a=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),r=(Array.isArray(a)&&typeof a[t]=="string"?a[t]:null)??String(t+1);return e("calendar.weekLabelCompact",{ord:r,defaultValue:""})||Vu(e,t)}function qu(e){const{t,i18n:a}=ke.useTranslation(),[r,s]=o.useState("week"),l=o.useMemo(()=>e4().filter(A=>A.value in e),[e]),i=o.useMemo(()=>{const A=[];for(const B of l){const F=new Date(B.year,B.month,0).getDate(),L=jn(B.year,B.month-1),q=Math.ceil((F-L+1)/7);for(let M=q-1;M>=0;M--)A.push({value:Yo(B.value,M),monthKey:B.value,year:B.year,month:B.month,week:M})}return A},[l]),u=o.useCallback((A,B)=>t("calendar.yearMonthCompact",{year:A,month:B,full:Yl(t,a.language,A,B),short:Vf(A,B,a.language),defaultValue:"{{full}}"}),[t,a.language]),c=o.useCallback(A=>`${u(A.year,A.month)} ${t4(t,A.week)}`,[t,u]),p=o.useMemo(()=>l.map(A=>({value:A.value,label:u(A.year,A.month)})),[u,l]),h=o.useMemo(()=>i.map(A=>({value:A.value,label:c(A)})),[i,c]),d=o.useMemo(()=>Jv(),[e]),m=o.useMemo(()=>l.find(A=>A.value===d.monthKey)?.value??l[0]?.value??"",[l,d]),b=o.useMemo(()=>i.find(A=>A.value===d.value)?.value??i[0]?.value??"",[i,d]),[y,C]=o.useState(""),[f,x]=o.useState("");o.useEffect(()=>{l.find(A=>A.value===y)||C(m)},[l,y,m]),o.useEffect(()=>{i.find(A=>A.value===f)||x(b)},[i,f,b]);const g=r==="month"?p:h,w=r==="month"?y:f,_=r==="month"?C:x,E=o.useMemo(()=>{const A=t("calendar.dow",{returnObjects:!0});return Array.isArray(A)?A:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[t]),v=g.findIndex(A=>A.value===w),N=o.useCallback(()=>{const A=g.findIndex(B=>B.value===w);A<g.length-1&&_(g[A+1].value)},[g,w,_]),k=o.useCallback(()=>{const A=g.findIndex(B=>B.value===w);A>0&&_(g[A-1].value)},[g,w,_]),D=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:w,setRange:_,activeOptions:g,activeIdx:v,handlePrev:N,handleNext:k,periodOptions:D,monthRange:y,weekRange:f,weekRanges:i,DOW:E}}const $t=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function In(e,t=!0){return e.future===!0||t&&e.a===-1}function n4({data:e,colorA:t,colorB:a,labelA:r,labelB:s,barWidth:l=10,barGap:i=1,height:u=140,fitHeight:c=!1,maxOverride:p,tightMax:h,seriesColors:d,seriesLabels:m,rateLabels:b,grouped:y=!1,baseline:C,focusableBars:f=!1}){const x=!a,g=!!(d&&d.length>0),w=C,_=o.useMemo(()=>g?Math.max(0,...e.filter(S=>!In(S,w==null)).map(S=>y?Math.max(0,...(S.parts??[]).map($t)):(S.parts??[]).reduce(($,I)=>$+Math.max(0,$t(I)),0))):Math.max(0,...e.filter(S=>!In(S,w==null)).flatMap(S=>x?[$t(S.a)]:[$t(S.a),$t(S.b)])),[e,x,g,y]),E=o.useMemo(()=>{if(w==null)return 0;const S=e.filter($=>!In($,w==null)).flatMap($=>g?($.parts??[]).map($t):x?[$t($.a)]:[$t($.a),$t($.b)]);return Math.max(0,...S.map($=>Math.abs($-w)))},[e,w,g,x]),v=o.useMemo(()=>{const S=w!=null?E:_;return p??(h?S>0?S:10:Math.ceil(S/10)*10||10)},[_,E,w,p,h]),N=o.useRef(null),k=o.useRef(null),[D,A]=o.useState(null);o.useLayoutEffect(()=>{if(!c){A(null);return}const S=N.current;if(!S)return;const $=()=>{const P=k.current,V=S.clientHeight-(P?P.getBoundingClientRect().height:0);V<=0||A(ie=>ie!=null&&Math.abs(ie-V)<1?ie:V)};if($(),typeof ResizeObserver>"u")return;const I=new ResizeObserver($);return I.observe(S),k.current&&I.observe(k.current),()=>I.disconnect()},[c]);const B=D??u,F=g?y?Math.max(1,d.length):1:x?1:2,L={"--bar-width":`${o.useMemo(()=>{const S=Math.max(1,e.length);return Math.max(2,Math.min(l,Math.round(120/(S*F)+6)))},[e.length,F,l])}px`},q={"--bar-group-gap":`${Math.max(0,i)}px`},M=o.useMemo(()=>{const S=Math.round(v/2);return w!=null?[w+v,...S!==v?[w+S]:[],w,...S!==v?[w-S]:[],w-v]:S!==v?[v,S,0]:[v,0]},[v,w]),O=S=>w!=null?1-(S-(w-v))/(2*v):1-S/v,[T,G]=o.useState(null),K=o.useCallback(()=>G(null),[]),ee=o.useCallback((S,$)=>{const I=[S.label,S.sublabel].filter(Boolean).join(" ");let P;if(g&&y&&S.rawPartsB)P=(m??[]).map((V,ie)=>{const U=S.rawPartsB[ie]??0;return{text:U>0?`${V}: ${$[ie]??0}% (${S.rawParts?.[ie]??0}/${U})`:`${V}: -`,color:(d??[])[ie]}});else if(g&&y)P=(m??[]).map((V,ie)=>({text:`${V}: ${J($[ie]??0)}`,color:(d??[])[ie]}));else if(g){const V=(m??[]).map((U,ce)=>({text:`${U}: ${$[ce]??0}`,color:(d??[])[ce]})),ie=V.filter((U,ce)=>($[ce]??0)>0);P=ie.length?ie:V}else b&&!x?P=[{text:`${r} ${$t(S.a)}%`,color:t},{text:`${s} ${$t(S.b)}%`,color:a}]:b&&S.rawB!==void 0?P=[{text:`${b.total} ${S.rawB}`},{text:`${b.done} ${S.rawA??0}`,color:t}]:x?P=[{text:`${r}: ${$t(S.a)}`,color:t}]:P=[{text:`${r}: ${$t(S.a)}`,color:t},{text:`${s}: ${$t(S.b)}`,color:a}];return{title:I,items:P}},[g,y,m,d,b,x,r,s,t,a,w]),re=o.useCallback((S,$,I)=>{const P=S.getBoundingClientRect(),{title:V,items:ie}=ee($,I);G({rect:{left:P.left,top:P.top,right:P.right,bottom:P.bottom,width:P.width,height:P.height},title:V,items:ie})},[ee]),R=o.useCallback((S,$)=>{const{title:I,items:P}=ee(S,$);return[I,...P.map(V=>V.text)].filter(Boolean).join(", ")},[ee]),J=S=>w!=null&&S>w?`+${S}`:`${S}`,ne=T!=null;return o.useEffect(()=>{if(!ne)return;const S=()=>G(null),$=I=>{const P=I.target;P&&typeof P.closest=="function"&&P.closest(".bar-chart__col")||G(null)};return window.addEventListener("scroll",S,!0),document.addEventListener("pointerdown",$,!0),()=>{window.removeEventListener("scroll",S,!0),document.removeEventListener("pointerdown",$,!0)}},[ne]),n.jsxs("div",{ref:N,className:ue("bar-chart__wrap"),style:q,children:[n.jsx("div",{className:ue("bar-chart__inner"),children:n.jsx("div",{className:ue("bar-chart__scroll"),children:n.jsxs("div",{className:ue("bar-chart__area"),children:[n.jsxs("div",{className:ue("bar-chart__plot"),style:{height:B},children:[M.slice(0,-1).map((S,$)=>n.jsx("div",{className:ue(`bar-chart__gridline${w!=null&&S===w?" bar-chart__gridline--baseline":""}`),style:{top:O(S)*B},children:n.jsx("span",{className:ue("bar-chart__gridline__label caption-1"),children:S})},$)),e.map((S,$)=>{const I=In(S,w==null),P=B/2,V=Z=>w!=null?Math.min(P,Math.abs($t(Z)-w)/v*P):Math.min(B,Math.max(0,$t(Z)/v*B)),ie=I?0:V(S.a),U=I?0:V(S.b),ce=(S.parts??[]).map($t);return n.jsx("div",{className:ue(`bar-chart__col${y&&g?" bar-chart__col--group":""}`),style:{cursor:I?"default":"pointer"},tabIndex:f&&!I?0:void 0,role:f&&!I?"img":void 0,"aria-label":f&&!I?R(S,ce):void 0,onMouseEnter:I?void 0:Z=>re(Z.currentTarget,S,ce),onFocus:I||!f?void 0:Z=>re(Z.currentTarget,S,ce),onBlur:f?K:void 0,onMouseLeave:K,children:!I&&(g&&y?(d??[]).map((Z,H)=>{const te=ce[H]??0;if(w==null)return n.jsx("div",{className:ue("bar-chart__bar"),style:{...L,height:V(te),background:Z}},H);const W=$t(te)<w;return n.jsxs("div",{className:ue("bar-chart__slot"),style:L,children:[n.jsx("div",{className:ue("bar-chart__slot__half bar-chart__slot__half--up"),children:!W&&n.jsx("div",{className:ue("bar-chart__bar bar-chart__bar--full"),style:{height:V(te),background:Z}})}),n.jsx("div",{className:ue("bar-chart__slot__half bar-chart__slot__half--down"),children:W&&n.jsx("div",{className:ue("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:V(te),background:Z}})})]},H)}):g?n.jsx("div",{className:ue("bar-chart__stack"),style:L,children:(()=>{const Z=ce.reduce((te,W,z)=>W>0?z:te,-1);let H=B;return ce.map((te,W)=>{if(te<=0)return null;const z=Math.min(H,te/v*B);return H-=z,n.jsx("div",{className:ue("bar-chart__stack-segment"),style:{height:z,background:(d??[])[W],borderRadius:W===Z?"6px 6px 0 0":void 0}},W)})})()}):w!=null?n.jsx(n.Fragment,{children:[{v:$t(S.a),c:t},...x?[]:[{v:$t(S.b),c:a}]].map(({v:Z,c:H},te)=>n.jsxs("div",{className:ue("bar-chart__slot"),style:L,children:[n.jsx("div",{className:ue("bar-chart__slot__half bar-chart__slot__half--up"),children:Z>=w&&n.jsx("div",{className:ue("bar-chart__bar bar-chart__bar--full"),style:{height:V(Z),background:H}})}),n.jsx("div",{className:ue("bar-chart__slot__half bar-chart__slot__half--down"),children:Z<w&&n.jsx("div",{className:ue("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:V(Z),background:H}})})]},te))}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:ue("bar-chart__bar"),style:{...L,height:ie,background:t}}),!x&&n.jsx("div",{className:ue("bar-chart__bar"),style:{...L,height:U,background:a}})]}))},$)})]}),n.jsx("div",{ref:k,className:ue("bar-chart__x-axis"),children:e.map((S,$)=>{const I=In(S,w==null);return n.jsxs("span",{className:ue(`bar-chart__x-axis__label${I?" bar-chart__x-axis__label--future":""}`),children:[n.jsxs("span",{className:ue("caption-1 bar-chart__x-axis__main"),children:[S.isToday&&n.jsx("span",{className:ue("bar-chart__x-axis__today-dot"),style:{background:t}}),S.label]}),S.sublabel&&n.jsx("span",{className:"caption-1",children:S.sublabel})]},$)})})]})})}),T&&n.jsx(Un,{anchorRect:T.rect,title:T.title,items:T.items,showIndex:!1,closeOnOutsideClick:!1})]})}function Uu({control:e}){const{t}=ke.useTranslation(),{activeOptions:a,activeIdx:r,range:s,setRange:l,handlePrev:i,handleNext:u,periodOptions:c,period:p,setPeriod:h}=e,d=p==="week"?t("calendar.prevWeek","\uC774\uC804 \uC8FC"):t("calendar.prevMonth","\uC774\uC804 \uB2EC"),m=p==="week"?t("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):t("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return n.jsxs("div",{className:ue("chart-section__controls"),children:[n.jsx(be,{htmlType:"button",size:ra,type:"dot",icon:"chevron-left",ariaLabel:d,showTooltipInfo:d,disabled:r===a.length-1,onClick:i}),n.jsx(xn,{value:s,onChange:l,options:a,size:ra,className:"month-dropdown",ariaLabel:t("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),n.jsx(be,{htmlType:"button",size:ra,type:"dot",icon:"chevron-right",ariaLabel:m,showTooltipInfo:m,disabled:r<=0,onClick:u}),n.jsx(_n,{ariaLabel:t("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:p,onChange:b=>h(b),size:ra})]})}function Zo(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[Ko(u)]?.daily??[])[u.getDate()-1],p=c!=null&&In(c,r)||u>s;return{dt:u,entry:c,isFuture:p}})}function a4(e,t,a,r=!0){const{period:s,monthRange:l,weekRange:i,weekRanges:u,DOW:c}=t,p=fa(),h=p.getFullYear(),d=p.getMonth()+1,m=p.getDate();if(s==="month"){const C=e[l]??{weekly:[],daily:[]},f=wa(l),x=f?f.year:null,g=f?f.month1:null,w=x&&g?jn(x,g-1):1;return C.weekly.map((_,E)=>{const v=E+1;let N=_.label,k=!1,D=!1;if(x&&g){const A=w+E*7,B=new Date(x,g-1,A+6),F=B.getMonth()+1,L=B.getDate(),q=F===g?`${L}`:`${F}/${L}`;N=a("manager.chart.weekRange",{start:A,end:q});const M=new Date(h,d-1,m).getTime();k=M>=new Date(x,g-1,A).getTime()&&M<=B.getTime(),D=x>h||x===h&&(g>d||g===d&&A>m)}return{..._,label:N,sublabel:Vu(a,v-1),isToday:k,future:_.future===!0||D||void 0,a:D?-1:_.a,b:D?0:_.b}})}const b=u.find(C=>C.value===i);if(!b)return[];const y=new Date(b.year,b.month-1,jn(b.year,b.month-1)+b.week*7);return Zo(e,y,p,r).map(({dt:C,entry:f,isFuture:x})=>{const g=C.getMonth()+1,w=C.getDate(),_=C.getFullYear();return{label:g===b.month&&_===b.year?`${w}`:`${g}/${w}`,sublabel:c[C.getDay()]??"",future:x||void 0,a:x?-1:f&&f.a>0?f.a:0,b:x?0:f&&f.b>0?f.b:0,isToday:_===h&&g===d&&w===m,...f?.parts?{parts:x?f.parts.map(()=>0):f.parts}:{},...f?.partsB?{partsB:x?f.partsB.map(()=>0):f.partsB}:{}}})}const r4={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function o4({canvasHeight:e,fitHeight:t,focusableBars:a,size:r="medium",barWidth:s,titleKey:l,titleLevel:i,data:u,colorA:c,colorB:p,labelAKey:h,labelBKey:d,showTotal:m=!1,totalUnitKey:b,totalLabelKey:y,control:C,hideControls:f=!1,rate:x=!1,rateAgg:g="dayMean",tightMax:w=!1,avgMode:_=!1,totalFormat:E,series:v,seriesMode:N="stack",loading:k=!1,onDetail:D,headExtra:A,headSegment:B,icon:F,disc:L,onClick:q,cardAriaLabel:M,cardTooltip:O,detailSize:T=ra,barGap:G,baseline:K,className:ee,inGrid:re=!1}){const{t:R}=ke.useTranslation(),J={...r4[r],...e===void 0?null:{height:e}},ne=qu(u),S=C??ne,$=o.useMemo(()=>a4(u,S,R,K==null),[u,S,R,K]),I=N==="group"&&!!v&&v.length>0;G!=null&&!I&&Dt("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 P=o.useMemo(()=>{if(!x)return $;const z=S.period==="month"?wa(S.monthRange):null,ae=fa(),ve=v?.length??0,me=le=>{const Be=[],Pe=[],Fe=[];for(let Ae=0;Ae<ve;Ae++){let se=0,ye=0,Ce=0;for(const xe of le){const $e=$t(xe.a[Ae]),nt=$t(xe.b[Ae]);nt<=0||(se+=$e,ye+=nt,Ce+=$e/nt*100)}Be.push(g==="weighted"?ye>0?Math.round(se/ye*100):0:le.length?Math.round(Ce/le.length):0),Pe.push(se),Fe.push(ye)}return{pct:Be,ra:Pe,rb:Fe}};return $.map((le,Be)=>{let Pe=le.a===-1?-1:le.b>0?Math.round(le.a/le.b*100):0;if(z&&!In(le)){const Ae=z.year,se=z.month1-1,ye=Zo(u,new Date(Ae,se,jn(Ae,se)+Be*7),ae).filter(Ce=>!Ce.isFuture);if(g==="weighted"){let Ce=0,xe=0;for(const{entry:$e}of ye)$e&&$e.b>0&&(Ce+=$e.a,xe+=$e.b);Pe=xe>0?Math.round(Ce/xe*100):0}else Pe=ye.length?Math.round(ye.reduce((Ce,{entry:xe})=>Ce+(xe&&xe.b>0?xe.a/xe.b*100:0),0)/ye.length):0}let Fe=null;if(I&&!In(le)){let Ae;if(z){const ye=z.year,Ce=z.month1-1;Ae=Zo(u,new Date(ye,Ce,jn(ye,Ce)+Be*7),ae).filter(xe=>!xe.isFuture).map(({entry:xe})=>({a:xe?.parts??[],b:xe?.partsB??[]}))}else Ae=[{a:le.parts??[],b:le.partsB??[]}];const se=me(Ae);Fe={parts:se.pct,rawParts:se.ra,rawPartsB:se.rb}}return{...le,a:Pe,b:le.a===-1?0:d&&le.parts&&le.parts[1]>0?Math.round(le.parts[0]/le.parts[1]*100):0,rawA:le.a===-1?-1:le.a,rawB:le.b,...Fe??{}}})},[$,x,g,d,S.period,S.monthRange,u,I,v?.length]),V=o.useMemo(()=>{if(x||_){const ae=(S.period==="week"?$:u[S.monthRange]?.daily??[]).filter(me=>me.a!==-1);if(ae.length===0)return 0;if(x&&g==="weighted"){let me=0,le=0;for(const Be of ae)Be.b>0&&(me+=Be.a,le+=Be.b);return le>0?Math.round(me/le*100):0}const ve=x?ae.reduce((me,le)=>me+(le.b>0?le.a/le.b*100:0),0):ae.reduce((me,le)=>me+(le.a>0?le.a:0),0);return Math.round(ve/ae.length)}const z=S.period==="month"?u[S.monthRange]?.daily??[]:P;return K!=null?z.reduce((ae,ve)=>ae+(In(ve,!1)?0:$t(ve.a)+(d?$t(ve.b):0)),0):z.reduce((ae,ve)=>ae+(ve.a>0?ve.a:0)+(d&&ve.b>0?ve.b:0),0)},[P,$,x,g,_,K,d,S.period,S.monthRange,u]),ie=v&&v.length>0?v.map(z=>({color:z.color,label:z.label})):[{color:c,label:R(h)},...d?[{color:p,label:R(d)}]:[]],U=r==="small",ce=r==="large",Z=U?"medium":ce?"xLarge":"large",H=ee||void 0,te=l?R(l):"",W=te?R("trainingStatus.detailFor",{name:te,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):R("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return n.jsx(Ar,{className:H,size:Z,inGrid:re,icon:F,disc:L,onClick:q,ariaLabel:M,tooltip:O,headSegment:B,headMenuItems:D?[{label:W,icon:"list",onClick:D,closeOnSelect:!0}]:void 0,title:R(l),titleLevel:i,headRight:U?A??void 0:({collapsed:z})=>n.jsxs(n.Fragment,{children:[!f&&n.jsx(Uu,{control:S}),A,D&&!z&&n.jsx("span",{className:ue("bar-chart__detail-btn"),children:n.jsx(be,{htmlType:"button",size:T,type:"dot",icon:"list",ariaLabel:W,showTooltipInfo:W,onClick:D})})]}),legend:n.jsx(Uo,{items:ie,className:"caption-1"}),fitBody:t,subRow:m&&n.jsx(n.Fragment,{children:x||_||y&&E?n.jsx(xa,{label:U?void 0:`${R(S.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${R(y??h)}`,children:E?(E(V).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((z,ae)=>/\d/.test(z)?n.jsx("span",{className:ue(oa(!ce)),children:z},ae):n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:z},ae)):n.jsxs(n.Fragment,{children:[n.jsx("span",{className:ue(oa(!ce)),children:V}),b&&n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:R(b)})]})}):n.jsxs(xa,{children:[n.jsx("span",{className:ue(oa(!ce)),children:V}),n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:R(h)}),b&&n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:R(b)})]})}),children:k?n.jsx("div",{className:ue("bar-chart__wrap bar-chart__loading"),"aria-busy":"true",children:n.jsx("div",{className:ue("bar-chart__inner"),children:n.jsxs("div",{className:ue("bar-chart__area bar-chart__area--loading"),children:[n.jsx("div",{className:ue("bar-chart__plot bar-chart__plot--loading"),style:{height:J.height},children:n.jsx(ga,{size:32})}),n.jsx("div",{className:ue("bar-chart__x-axis"),"aria-hidden":"true",children:n.jsxs("span",{className:ue("bar-chart__x-axis__label"),children:[n.jsx("span",{className:ue("caption-1 bar-chart__x-axis__main"),children:"\xA0"}),P.some(z=>!!z.sublabel)&&n.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):n.jsx(n4,{focusableBars:a,data:P,colorA:c,colorB:d?p:void 0,labelA:R(h),labelB:d?R(d):void 0,barWidth:s??J.barWidth,barGap:G,baseline:K,height:J.height,fitHeight:t,maxOverride:x?100:void 0,tightMax:w,seriesColors:v?.map(z=>z.color),seriesLabels:v?.map(z=>z.label),rateLabels:x?{total:R("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:R("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:I})})}const Gu=120,s4={left:38,right:16,top:26,bottom:24};function l4({points:e=[],range:t,ticks:a=[],axisTitle:r,color:s,height:l=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:p,className:h}){const[d,m]=o.useState(null),[b,y]=o.useState(null);o.useEffect(()=>{if(!b)return;const T=K=>m(Math.round(K)||null);if(T(b.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const G=new ResizeObserver(([K])=>T(K.contentRect.width));return G.observe(b),()=>{G.disconnect()}},[b]);const{payload:C,anchorRect:f,openAfterDelay:x,close:g}=Xy(Gu),w=o.useCallback((T,G)=>{T&&x(T,G.getBoundingClientRect())},[x]),_=d??i,E=l,{left:v,right:N,top:k,bottom:D}={...s4,...u},[A,B]=t,F=T=>B===A?v:v+(_-v-N)*(T-A)/(B-A),L=T=>k+(E-k-D)*(100-T)/100,q={x:F,y:L,plot:{left:v,right:_-N,top:k,bottom:E-D,width:Math.max(0,_-v-N),height:Math.max(0,E-k-D)}},M=e.filter(T=>!T.hollow),O=s??"var(--color-main)";return n.jsxs(n.Fragment,{children:[n.jsxs("svg",{ref:y,className:De("line-chart",h),viewBox:`0 0 ${_} ${E}`,role:"img","aria-label":p??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:v,x2:_-N,y1:L(T),y2:L(T)}),n.jsxs("text",{className:"line-chart__tick",x:v-6,y:L(T)+4,textAnchor:"end",children:[T,"%"]})]},T)),c?.(q),a.map(T=>n.jsx("text",{className:"line-chart__tick",x:F(T.x),y:E-5,textAnchor:"middle",children:T.label},T.x)),M.length>1&&n.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:O,points:M.map(T=>`${F(T.x)},${L(T.pct)}`).join(" ")}),e.map(T=>n.jsxs("g",{className:"line-chart__dot",onPointerEnter:G=>w(T.description,G.currentTarget),onPointerLeave:g,children:[n.jsx("circle",{className:"line-chart__dot-hit",cx:F(T.x),cy:L(T.pct),r:12}),n.jsx("circle",{className:De("line-chart__dot-main",T.hollow&&"is-hollow"),cx:F(T.x),cy:L(T.pct),r:4,stroke:O,fill:T.hollow?void 0:O})]},T.x))]}),C!=null&&n.jsx(Bn,{anchorRect:f,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:C,children:C})]})}function i4({icon:e,iconSize:t=56,title:a,titleClass:r="h2",description:s,tipGroups:l,start:i,className:u}){return n.jsxs("div",{className:De("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:De("game-intro__title",r),children:a}),s!=null&&n.jsx("p",{className:"game-intro__description body-3",children:s}),l?.map((c,p)=>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,d)=>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})]},d))]},p)),i&&n.jsx(be,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const Ku=(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")}`},Yu=(e,t,a,r)=>({from:Zl(e,t,a),to:new Date(Zl(e,t,a+r).getTime()-1),fromYmd:Ku(e,t,a),toYmd:Ku(e,t,a+r-1)});function u4(e,t=0){if(e.period==="month"){const s=wa(e.monthRange),l=fa(),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 Yu(i,u,1,c)}const a=e.weekRanges.find(s=>s.value===e.weekRange);if(!a){const s=new Date,l=Wa();return{from:s,to:s,fromYmd:l,toYmd:l}}const r=jn(a.year,a.month-1);return Yu(a.year,a.month-1,r+(a.week+t)*7,7)}const Xo={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function Zu(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function Xu({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 p=typeof s=="number"?s:Xo[s].diameter,h=l??(typeof s=="number"?12:Xo[s].strokeWidth),d=p/2,m=(p-h)/2,b=2*Math.PI*m;if(a&&a.length>0){const x=a.reduce((g,w)=>{const _=g.length>0?g[g.length-1].acc:0,E=Number.isFinite(w.ratio)?w.ratio:0,v=Math.max(0,Math.min(E,1-_));return g.push({color:w.color,rotate:-90+_*360,dash:b*v,acc:_+v}),g},[]);return n.jsx("div",{className:"ring-chart",style:{width:p,height:p},children:n.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),x.map((g,w)=>g.dash>0&&n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:g.color,strokeWidth:h,strokeDasharray:`${g.dash} ${b}`,strokeLinecap:"round",transform:`rotate(${g.rotate} ${d} ${d})`},w))]})})}const y=(t??0)>0?Math.min((e??0)/t,1):0,C=b*y,f=b-C;return n.jsxs("div",{className:"ring-chart",style:{width:p,height:p},children:[n.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),y>0&&n.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:r,strokeWidth:h,strokeDasharray:`${C} ${f}`,strokeLinecap:y<.02||y>.98?"butt":"round",transform:`rotate(-90 ${d} ${d})`})]}),!u&&n.jsxs("div",{className:`ring-chart__center${c?"":` ${p<=96?"ring-chart__center--small":s==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[n.jsx("span",{className:`ring-chart__pct ${p<=96?"h2":"h1"}`,children:Zu(y)}),!c&&n.jsx("span",{className:`ring-chart__label ${p<=96?"caption-2":"caption-1"}${p<=96||s==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function c4({titleKey:e,titleLevel:t,headRight:a,icon:r,showTotal:s,totalLabelKey:l,legend:i,loading:u,className:c,inGrid:p=!1,onClick:h,ariaLabel:d,tooltip:m,...b}){const{t:y}=ke.useTranslation();if(!e)return n.jsx(Xu,{...b});const C=(b.total??0)>0?Zu(Math.min((b.done??0)/b.total,1)):0,f=b.size==="small",x=typeof b.size=="number"?b.size:Xo[b.size??"medium"].diameter,g=b.size==="large",w=f?"medium":g?"xLarge":"large",_=c||void 0,E=r&&n.jsx("span",{className:ue("chart-section__head-icon"),children:n.jsx(lt,{icon:r,className:ue("chart-section__head-icon-inner")})});return n.jsx(Ar,{className:_,size:w,inGrid:p,onClick:h,ariaLabel:d,tooltip:m,title:y(e),titleLevel:t,headRight:E||(f?void 0:a),legend:i&&n.jsx(Uo,{items:i}),subRow:s&&n.jsxs(xa,{label:!f&&l?y(l):void 0,children:[n.jsx("span",{className:ue(oa(f)),children:C}),n.jsx("span",{className:ue("chart-section__total__unit body-3"),children:"%"})]}),children:u?n.jsx("div",{className:ue("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx("div",{className:"ring-chart ring-chart--loading",style:{width:x,height:x},"aria-busy":"true",children:n.jsx(ga,{size:32})})}):n.jsx("div",{className:ue("ring-chart-section-body ring-chart-section-body--offset"),children:n.jsx(Xu,{...b,hideCenter:b.hideCenter??f})})})}function d4({label:e,value:t,change:a,changeType:r,icon:s,tooltip:l,onClick:i,size:u="small",bodyAlign:c="bottom",children:p}){return n.jsx(Ar,{type:"stat",title:e,totalNum:t,change:a,changeType:r,icon:s,tooltip:l,onClick:i,size:u,bodyAlign:c,children:p})}function Ju({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:p,className:h,label:d,formatValue:m,labelPos:b,labelAlign:y="right",showMinMax:C=!1,minLabel:f,maxLabel:x,showBgTick:g=!1,showFillTick:w=!1,tickStep:_,tickShape:E="dot"}){t&&!c&&Dt("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 v=Math.min(r,Math.max(a,e)),N=r>a?(v-a)/(r-a):0,k=l==="vertical",D=!t,A=ne=>t?.(Number(ne.target.value)),B=typeof p=="number"?`${p}px`:p,F={"--slider-ratio":String(N),"--slider-thumb":`${i}px`,...B?k?{height:B}:{width:B}:{}},L=_??s,q=(g||w)&&L>0&&r>a?Math.floor((r-a)/L+1e-6):0;if(q>0&&q<=100){const ne=E!=="dash",S=ie=>ne?`radial-gradient(circle, ${ie} 0.5px, transparent 1px)`:k?`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))`,$=ne?"2px":"4px",I=[],P=[],V=[];for(let ie=0;ie<=q;ie++){const U=ie*L/(r-a);if(U>1+1e-6)break;const ce=`${((k?1-U:U)*100).toFixed(4)}%`,Z=U<=N+1e-6;if(Z?!w:!g)continue;const H=Z?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";I.push(S(H)),P.push(k?`${$} var(--slider-thumb)`:`var(--slider-thumb) ${$}`),V.push(k?`center ${ce}`:`${ce} center`)}I.push(k?"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))"),P.push("100% 100%"),V.push("0 0"),F.backgroundImage=I.join(", "),F.backgroundSize=P.join(", "),F.backgroundPosition=V.join(", "),F.backgroundRepeat="no-repeat"}const M=m?m(v):d==="percent"?`${Math.round(r>a?(v-a)/(r-a)*100:0)}%`:d==="count"?`${v} / ${r}`:v===a&&f?f:v===r&&x?x:void 0,O=n.jsx("input",{type:"range",className:De("slider",`slider--${l}`,D&&"slider--static",!d&&!C&&h),min:a,max:r,step:s,value:v,disabled:u,readOnly:D,tabIndex:D?-1:void 0,"aria-label":c,"aria-valuetext":M,"aria-orientation":l,onChange:A,style:F});if(!d&&!C)return O;const T=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:f??a}),G=n.jsx("span",{className:"slider-wrap__minmax caption-1",children:x??r}),K=C?n.jsxs("div",{className:De("slider-track-group",`slider-track-group--${l}`,!d&&h),children:[k?G:T,O,k?T:G]}):O;if(!d)return K;const ee=b??(k?"bottom":"right"),re=`${Math.round(r>a?(v-a)/(r-a)*100:0)}%`,R=m?m(v):d==="percent"?re:d==="count"?`${v} / ${r}`:String(v),J=n.jsx("span",{className:"slider-wrap__value body-3b",children:R});return n.jsxs("div",{className:De("slider-wrap",`slider-wrap--${l}`,`slider-wrap--label-${ee}`,`slider-wrap--align-${y}`,h),children:[K,J]})}const p4=.86,h4=250,Jo=(e,t,a,r)=>Math.round(Math.min(r,Math.max(a,e-t))),Qo=(e,t,a,r)=>{const s=Jo(e,t,a,r);return`${s<0?"-":"+"}${Math.abs(s)} dB`};function es({analyser:e,audioElement:t,orientation:a="horizontal",length:r,label:s,labelPos:l,labelAlign:i="right",floorDb:u=-60,refDb:c=-35,displayMin:p=-5,displayMax:h=25,className:d,ariaLabel:m}){const b=o.useRef(null),y=o.useRef(null),C=o.useRef(null),f=o.useRef(null),[x,g]=o.useState(null);o.useEffect(()=>{const v=O=>{const T=Qo(O,c,p,h);C.current&&(C.current.textContent=T);const G=b.current;G&&(G.setAttribute("aria-valuenow",String(Jo(O,c,p,h))),G.setAttribute("aria-valuetext",T))},N=e??ef(t)??(x&&x.el===t?x.node:null),k=y.current;if(!N||!k){k?.style.setProperty("--meter-level","0"),v(u);let O=!1;return!e&&t&&ur(t).then(T=>{!O&&T&&g({el:t,node:T})}),()=>{O=!0}}io();const D=new Float32Array(N.fftSize);let A=0,B=0,F=0,L=0,q=null;const M=O=>{const T=tf(N,D);A=T>A?T:A*p4;const G=A>1e-5?20*Math.log10(A):-1/0,K=Math.max(u,G),ee=K-c,re=Math.min(1,Math.max(0,(ee-p)/(h-p)));if(k.style.setProperty("--meter-level",re.toFixed(3)),B+=K,F+=1,O-L>=h4){const R=B/F;q=q==null?R:q*.6+R*.4,v(q),B=0,F=0,L=O}f.current=requestAnimationFrame(M)};return f.current=requestAnimationFrame(M),()=>{f.current!=null&&cancelAnimationFrame(f.current),f.current=null}},[e,t,x,u,c,p,h]);const w=typeof r=="number"?`${r}px`:r,_=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"})}),E=l??(a==="vertical"?"bottom":"right");return n.jsxs("div",{ref:b,className:De("audio-meter",`audio-meter--${a}`,s&&`audio-meter--label-${E}`,s&&`audio-meter--align-${i}`,d),role:"meter","aria-label":m,"aria-valuemin":p,"aria-valuemax":h,"aria-valuenow":Jo(u,c,p,h),"aria-valuetext":Qo(u,c,p,h),children:[_,s&&n.jsx("span",{ref:C,className:"audio-meter__value caption-2",children:Qo(u,c,p,h)})]})}const Qu=260;function ec({message:e,position:t,duration:a,onClose:r}){const[s,l]=o.useState(!1),[i,u]=o.useState(!1),c=o.useRef(i),p=o.useRef(s);o.useEffect(()=>{c.current=i},[i]),o.useEffect(()=>{p.current=s},[s]);const h=o.useRef(null),d=o.useRef(""),m=o.useRef(r);o.useEffect(()=>{m.current=r});const b=a,y=o.useRef(null),C=o.useRef(0),f=o.useRef(0),x=o.useRef(!1),g=o.useRef(null),w=o.useRef(null),_=o.useRef(null),E=o.useRef(null),v=o.useRef(()=>{});v.current=D=>{D<0||(C.current=Date.now(),f.current=D,y.current=setTimeout(()=>{y.current=null,l(!1),g.current=setTimeout(()=>{u(!1);try{m.current()}catch{}},Qu)},D))};const N=o.useCallback(()=>{x.current||!y.current||(x.current=!0,clearTimeout(y.current),y.current=null,f.current=Math.max(0,f.current-(Date.now()-C.current)))},[]),k=o.useCallback(()=>{x.current&&(x.current=!1,v.current(f.current))},[]);return o.useEffect(()=>{if(e!==d.current&&(y.current&&(clearTimeout(y.current),y.current=null),g.current&&(clearTimeout(g.current),g.current=null)),e){if(p.current)return b>0&&!y.current&&(x.current?f.current=b:v.current(b)),d.current=e,()=>{y.current&&(clearTimeout(y.current),y.current=null),g.current&&(clearTimeout(g.current),g.current=null)};const D=()=>{const A=h.current;if(A)try{A.classList.remove("is-visible"),A.style.transition="none",t==="top"?A.style.transform="translateX(-50%) translateY(-16px)":A.style.transform="translateX(-50%) translateY(16px)",A.style.opacity="0",A.offsetWidth,A.style.transition="",A.classList.add("is-visible"),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{E.current=null;try{A.style.opacity="",A.style.transform="",A.style.transition=""}catch{}},60)}catch{}};c.current?(D(),l(!0)):(u(!0),w.current=requestAnimationFrame(()=>{_.current=requestAnimationFrame(()=>{D(),l(!0)})})),b>0&&(x.current=!1,v.current(b))}else l(!1),g.current=setTimeout(()=>u(!1),Qu);return d.current=e,()=>{y.current&&clearTimeout(y.current),g.current&&clearTimeout(g.current),w.current&&cancelAnimationFrame(w.current),_.current&&cancelAnimationFrame(_.current),E.current&&clearTimeout(E.current),y.current=null,g.current=null,w.current=null,_.current=null,E.current=null}},[e,b,t]),{mounted:i,showing:s,popupRef:h,pause:N,resume:k}}function Ba({message:e="",position:t="top",type:a="normal",onClose:r=()=>{},duration:s=2e3}){const{mounted:l,showing:i,popupRef:u,pause:c,resume:p}=ec({message:e,position:t,duration:s,onClose:r}),h=o.useRef(null),[d,m]=o.useState(!1);if(o.useEffect(()=>{i?m(!0):l||m(!1)},[i,l]),!l)return null;const b=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:p,onFocusCapture:c,onBlurCapture:p,children:n.jsx("div",{className:`toast__inner toast__inner--${b} body-2`,"aria-hidden":d||i?void 0:!0,children:n.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?hn.createPortal(y,document.body):y}const m4=24;function C4({value:e,max:t=100,size:a=8,color:r,trackColor:s,label:l,formatValue:i,labelPos:u,labelAlign:c="right",ariaLabel:p,className:h}){const d=Number.isFinite(t)&&t>0?t:1,m=Math.max(0,Math.min(Number.isFinite(e)?e:0,d)),b=m/d*100,y=Number.isFinite(t)&&t>0?t:0,C=u??(a>=m4?"inside":"bottom"),f=C==="center"?"inside":C,x=f==="inside"&&(c==="left"?b>=15:c==="center"?b>=50:b>=85),g={};return r&&(g["--progress-bar-fill"]=r),s&&(g["--progress-bar-track"]=s),n.jsxs("div",{className:De("progress-bar",`progress-bar--${a}`,`progress-bar--label-${f}`,l&&`progress-bar--align-${c}`,l&&x&&"progress-bar--label-on-fill",h),style:g,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":p,children:n.jsx("div",{className:"progress-bar__fill",style:{width:`${b}%`}})}),l&&n.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(m):l==="percent"?`${Math.round(b)}%`:l==="raw"?String(m):`${m} / ${y}`})]})}const tc={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},f4="rgba(255, 255, 255, 0.16)";function nc({max:e,index:t,inactiveBg:a,inactiveColor:r,transparent:s,variant:l="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=ke.useTranslation(),p=vn("(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,d=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"]=f4),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:d,children:[i&&n.jsx("span",{style:tc,children:d}),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 b=i?n.jsx("span",{role:"status",style:tc,children:d}):null;return p?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:m,role:"list","aria-label":d,children:n.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[h+1," / ",e]})}),b]}):n.jsxs(n.Fragment,{children:[b,n.jsx("div",{className:"progress-indicator",style:m,role:"list","aria-label":d,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 b4(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 g4(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=ac(i.span),c=Math.min(u,r.length-l);if(c===1)r[l]=Math.max(r[l],i.width);else{const p=Math.max(0,(i.width-a*(c-1))/c);for(let h=l;h<l+c;h++)r[h]=Math.max(r[h],p)}l+=c}}return r}function ac(e){const t=typeof e=="number"?e:parseInt(String(e??""),10);return Number.isFinite(t)&&t>=1?Math.floor(t):1}function y4(e,t){const a=/span\s+(\d+)/.exec(`${e??""} ${t??""}`);return a?ac(parseInt(a[1],10)):1}function v4(e,t){const{isFixed:a,floorOf:r,containerWidth:s}=t;if(!(s>0))return!1;const l=e.reduce((i,u,c)=>i+(a(c)?u:0),0);return e.reduce((i,u,c)=>i+(a(c)?0:r(c)),0)>s-l}function _4(e,t){const{isFixed:a,floorOf:r,containerWidth:s}=t,l=e.reduce((d,m,b)=>d+(a(b)?m:0),0),i=e.reduce((d,m,b)=>d+(a(b)?0:m),0),u=s-l;if(!(s>0&&i>0&&u>0))return[...e];const c=u/i,p=e.map((d,m)=>a(m)?d:Math.max(r(m),Math.round(d*c))),h=Math.round(u-p.reduce((d,m,b)=>d+(a(b)?0:m),0));if(h!==0){let d=-1;p.forEach((m,b)=>{!a(b)&&(d<0||m>p[d])&&(d=b)}),d>=0&&(p[d]=Math.max(r(d),p[d]+h))}return p}const x4=16;function w4(e,t=x4){return e.map(a=>{const r=a.sortable&&!a.sorted;return Math.max(a.declaredMin,Math.ceil(a.headWidth+(r?t:0)))})}const rc="declared";function B4({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 ts({variant:e="default",children:t,className:a,draggable:r,onClick:s,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:p,colSpan:h,describedBy:d,rowHasButton:m}){const b=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(ga,{size:28})})})}):e==="empty"?n.jsx("div",{role:"presentation",className:"table-row-wrap",children:n.jsx("div",{role:"row",className:"table-row table-row--empty body-3",children:n.jsx("div",{role:"cell","aria-colspan":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?b:void 0,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:s&&!m?0:void 0,"aria-describedby":s&&!m?d:void 0,children:t}),p&&n.jsx("div",{role:"row",className:"table-row-expand",children:n.jsx("div",{role:"cell","aria-colspan":h,className:"table-row-expand__cell",children:p})})]})}function k4({dir:e}){return n.jsx(e==="asc"?rl:al,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function A4({children:e,onClick:t,className:a,sortDir:r,ariaSort:s,onResizeStart:l}){const i=n.jsxs(n.Fragment,{children:[e,r&&n.jsx(k4,{dir:r})]});return n.jsxs("div",{onClick:t,role:"columnheader","aria-sort":s,className:De("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 oc(e){return e&&e!=="left"?`table-col--${e}`:void 0}function ns({fields:e=[],sort:t,sortable:a=!0,headerGroups:r,items:s=[],renderRow:l,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:p,onRowDragStart:h,onRowDragEnd:d,draggingId:m,gridTemplateColumns:b,mobileGridTemplateColumns:y,resizable:C=!0,resizeMode:f="grow",resizeStorageKey:x,refitOn:g,size:w="small",title:_,icon:E,count:v,collapsed:N=!1,onToggleCollapse:k,headerActions:D,empty:A,loading:B,dragOver:F=!1,onDragOver:L,onDragLeave:q,onDrop:M,renderExpandedRow:O,expandedId:T}){const{t:G}=ke.useTranslation(),K=o.useId(),ee=`table-title-${K}`,re=`table-row-hint-${K}`,[R,J]=o.useState(null),ne=o.useCallback((Q,_e=0)=>{if(!(Q==null||typeof Q=="boolean")){if(typeof Q=="string"||typeof Q=="number")return String(Q);if(!(_e>6)){if(Array.isArray(Q)){const Oe=Q.map(Ve=>ne(Ve,_e+1)).filter(Boolean);return Oe.length?Oe.join(""):void 0}if(o.isValidElement(Q))return ne(Q.props.children,_e+1)}}},[]),S=o.useCallback((Q,_e)=>{const Oe=e[_e];if(!Oe)return;if(Oe.sortValue)return Oe.sortValue(Q);if(Oe.sortKey)return Q[Oe.sortKey];const Ve=l(Q)[_e]?.content;return typeof Ve=="string"||typeof Ve=="number"?Ve:ne(Ve)},[e,l,ne]),$=!t&&a&&!e.some(Q=>Q.sortDir!==void 0||Q.onClick),I=o.useCallback(Q=>{const _e=e[Q];if(!_e||_e.sortable===!1)return!1;if(_e.sortValue||_e.sortKey)return!0;const Oe=s[0];return Oe!==void 0&&S(Oe,Q)!==void 0},[e,s,S]);o.useEffect(()=>{if(!$||s.length===0)return;const Q=e.filter((_e,Oe)=>_e.sortable!==!1&&!I(Oe));Q.length!==0&&Dt(`Table/sort-mute/${Q.map(_e=>String(_e.label??"?")).join(",")}`,`[ihab/Table] \uC815\uB82C\uC5D0\uC11C \uBE60\uC9C4 \uC5F4\uC774 \uC788\uC2B5\uB2C8\uB2E4: ${Q.map(_e=>`'${String(_e.label??"?")}'`).join(" \xB7 ")}`,`
831
+ \uCE78\uC5D0 \uAE00\uC790\uAC00 \uC5C6\uC5B4(\uB124\uBAA8\xB7\uADF8\uB9BC\xB7\uB2E8\uCD94 \uAC19\uC740 \uB9C8\uB514) \uBB34\uC5C7\uC73C\uB85C \uC138\uC6B8\uC9C0 \uC54C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`,"\n\uADF8 \uC5F4\uC758 `sortValue` \uB97C \uC8FC\uC138\uC694 \u2014 \uC608: `sortValue: (w) => !!w.image`.","\n\uC77C\uBD80\uB7EC \uC548 \uC138\uC6B0\uB294 \uC5F4\uC774\uBA74 `sortable: false` \uB97C \uC801\uC73C\uBA74 \uC774 \uC54C\uB9BC\uC774 \uBA4E\uC2B5\uB2C8\uB2E4.")},[$,e,s,I]);const P=o.useMemo(()=>t?e.map(Q=>{if(!Q.sortKey||Q.sortDir!==void 0)return Q;const _e=t.field(String(Q.label??""),Q.sortKey);return{...Q,sortDir:_e.sortDir,onClick:Q.onClick??_e.onClick}}):$?e.map((Q,_e)=>I(_e)?{...Q,sortDir:R?.index===_e?R.asc?"asc":"desc":null,onClick:()=>J(Oe=>Oe?.index===_e?{index:_e,asc:!Oe.asc}:{index:_e,asc:!0})}:Q):e,[e,t,$,R,I]),V=o.useMemo(()=>{if(!$||!R)return s;const{index:Q,asc:_e}=R;return[...s].sort((Oe,Ve)=>vr(S(Oe,Q),S(Ve,Q),_e))},[s,$,R,S]),ie=vn("(max-width: 767px)"),U=y&&ie?y:null,ce=C&&!ie,Z=o.useRef(ce);Z.current=ce;const H=48,te=40,W=o.useRef(()=>H),z=x?`table-cols:${x}`:null,ae=o.useRef(null),ve=o.useRef(null),me=o.useRef(null),le=o.useRef(null),[Be,Pe]=o.useState(!1),[Fe,Ae]=o.useState(0),se=o.useCallback(()=>{const Q=me.current;if(!Q)return;const _e=le.current,Oe=ae.current;if(_e&&(_e.style.minWidth="",Oe)){const Ve=Oe.scrollWidth,Bt=Z.current?te:0;_e.style.minWidth=Ve>Q.clientWidth+1?`${Ve+Bt}px`:""}Pe(Q.scrollWidth>Q.clientWidth+1),Ae(Q.clientWidth)},[]),ye=o.useCallback((Q,_e)=>{const Oe=Q.current;Oe&&ve.current&&ve.current.unobserve(Oe),Q.current=_e,_e?(!ve.current&&typeof ResizeObserver<"u"&&(ve.current=new ResizeObserver(()=>se())),ve.current?.observe(_e)):!me.current&&!le.current&&(ve.current?.disconnect(),ve.current=null),se()},[se]),Ce=o.useCallback(Q=>ye(me,Q),[ye]),xe=o.useCallback(Q=>ye(le,Q),[ye]);o.useEffect(()=>{se()}),o.useEffect(()=>{if(typeof window>"u")return;const Q=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>se()):null;return window.addEventListener("resize",se),()=>{Q!=null&&cancelAnimationFrame(Q),window.removeEventListener("resize",se)}},[se]);const $e=o.useRef(()=>!1),nt=o.useRef([]),ct=o.useRef(null),at=Q=>{if(!Q||typeof window>"u")return null;try{const _e=JSON.parse(window.localStorage.getItem(Q)??"null");return Array.isArray(_e)&&_e.length>0&&_e.every(Oe=>typeof Oe=="number"&&Number.isFinite(Oe)&&Oe>0)?_e:null}catch{return null}},[rt,Ee]=o.useState(()=>at(z)),[Ue,Ne]=o.useState(z),[Ye,et]=o.useState(()=>at(z)!==null);if(Ue!==z){Ne(z);const Q=at(z);Ee(Q),et(Q!==null)}const ft=o.useRef(rt);o.useEffect(()=>{ft.current=rt},[rt]);const vt=o.useCallback(Q=>{const _e=ct.current;if(!_e)return;const Oe=ft.current;if(Oe){const Ve=[...Oe],Bt=()=>H;if(_e.next!=null&&_e.startWNext!=null){const Qe=Q.clientX-_e.startX,zt=Math.max(Bt()-_e.startW,Math.min(_e.startWNext-Bt(),Qe));Ve[_e.index]=_e.startW+zt,Ve[_e.next]=_e.startWNext-zt}else Ve[_e.index]=Math.max(Bt(),_e.startW+(Q.clientX-_e.startX));ft.current=Ve,Ee(Ve)}},[]),dt=o.useCallback(()=>{if(ct.current=null,window.removeEventListener("pointermove",vt),window.removeEventListener("pointerup",dt),window.removeEventListener("pointercancel",dt),document.body.style.cursor="",document.body.style.userSelect="",z&&ft.current)try{window.localStorage.setItem(z,JSON.stringify(ft.current))}catch{}},[vt,z]),jt=o.useCallback((Q,_e)=>{_e.preventDefault(),_e.stopPropagation();const Oe=ae.current;if(!Oe)return;const Ve=Array.from(Oe.children).map(Qe=>Qe.getBoundingClientRect().width),Bt=f==="fit"?P.findIndex((Qe,zt)=>zt>Q&&Qe.resizable!==!1):-1;ct.current=Bt>=0?{index:Q,startX:_e.clientX,startW:Ve[Q],next:Bt,startWNext:Ve[Bt]}:{index:Q,startX:_e.clientX,startW:Ve[Q]},ft.current=Ve,Ee(Ve),et(!0),window.addEventListener("pointermove",vt),window.addEventListener("pointerup",dt),window.addEventListener("pointercancel",dt),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[vt,dt,f,P]),ot=o.useCallback(()=>{const Q=ae.current,_e=Q?.closest(".table-wrap");if(!Q||!_e)return null;const Oe=_e.style.getPropertyValue("--table-grid-cols");_e.style.setProperty("--table-grid-cols",P.map(()=>"max-content").join(" "));const Ve=Array.from(_e.querySelectorAll(".table-row")).filter(Pt=>!Pt.classList.contains("table-row--loading")&&!Pt.classList.contains("table-row--empty")),Bt=Pt=>Array.from(Pt.children).map(St=>{const Mt=window.getComputedStyle(St);return{width:St.getBoundingClientRect().width,span:y4(Mt.gridColumnStart,Mt.gridColumnEnd)}}),Qe=parseFloat(window.getComputedStyle(Q).columnGap)||0,zt=Ve.map(Bt),Ht=Bt(Q),cn=g4([Ht,...zt],P.length,Qe),Yt=w4(P.map((Pt,St)=>({declaredMin:W.current(St),headWidth:Ht[St]?.width??0,sortable:Pt.sortDir!==void 0||!!Pt.onClick,sorted:!!Pt.sortDir}))),Tt=Pt=>Yt[Pt]??W.current(Pt),Jt=P.map((Pt,St)=>{const Mt=cn[St],Gt=$e.current(St)?parseFloat(nt.current[St]):NaN;return Number.isFinite(Gt)&&Math.ceil(Mt)>Gt&&Dt(`table-fixed-col-overflow:${St}:${Gt}`,`[ihabdevteam-core] Table \uC758 ${St+1}\uBC88\uC9F8 \uC5F4\uC744 ${Gt}px \uB85C \uC815\uD574 \uB450\uC5C8\uB294\uB370 \uC548\uC758 \uB0B4\uC6A9\uC740 ${Math.ceil(Mt)}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(Mt)}px \uC774\uC0C1\uC73C\uB85C \uB298\uB9AC\uC138\uC694.`),Number.isFinite(Gt)?Gt:Math.max(W.current(St),Math.ceil(Mt))}),en=window.getComputedStyle(Q),An=(parseFloat(en.paddingLeft)||0)+(parseFloat(en.paddingRight)||0),Nn=_e.clientWidth-An;Oe?_e.style.setProperty("--table-grid-cols",Oe):_e.style.removeProperty("--table-grid-cols");const gn={isFixed:Pt=>$e.current(Pt),floorOf:Tt,containerWidth:Nn};return v4(Jt,gn)?rc:_4(Jt,gn)},[P,f]),st=(Q,_e)=>Q!==null&&Q.length===_e.length&&Q.every((Oe,Ve)=>Oe===_e[Ve]),At=o.useRef(ot);o.useEffect(()=>{At.current=ot});const[Nt,Ot]=o.useState(0),Wt=V.length>0,xt=`${z??""}|${Nt}|${P.length}|${Fe}|${g??""}`,it=!Ye&&ce&&z!==null&&!B?`${xt}|${Wt?1:0}`:null,bt=o.useRef(null);o.useEffect(()=>{if(it===null||!Wt||bt.current===xt)return;const Q=At.current();if(Q!==null){if(bt.current=xt,Q===rc){Ee(null);return}Ee(_e=>st(_e,Q)?_e:Q)}},[it]);const pt=o.useCallback(()=>{if(z)try{window.localStorage.removeItem(z)}catch{}et(!1);const Q=At.current(),_e=Array.isArray(Q)?Q:null;Ee(_e),ft.current=_e,Ot(Oe=>Oe+1)},[z]);o.useEffect(()=>()=>{ct.current&&(window.removeEventListener("pointermove",vt),window.removeEventListener("pointerup",dt),window.removeEventListener("pointercancel",dt),document.body.style.cursor="",document.body.style.userSelect="")},[vt,dt]);const kt=P.length>0&&P.every(Q=>Q.width!=null)?P.map(Q=>typeof Q.width=="number"?`${Q.width}px`:String(Q.width)).join(" "):null;P.some(Q=>Q.width!=null)&&!kt&&Dt(`table-field-width:${P.map(Q=>Q.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."),kt&&b&&Dt("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 mt=b??kt??void 0,wt=b4(mt),de=wt.filter(Q=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(Q));de.length>0&&Dt(`table-content-track:${b}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${de.join(", ")})\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uBA38\uB9AC\uC640 \uBAB8\uD1B5\uC740 \uC11C\uB85C \uB2E4\uB978 \uACA9\uC790\uB77C \uADF8 \uD2B8\uB799\uC774 \uAC01\uC790 \uB2E4\uB974\uAC8C \uD480\uB824 \uC5F4\uC774 \uC5B4\uAE0B\uB0A9\uB2C8\uB2E4. px \uC774\uB098 fr \uC744 \uC4F0\uC138\uC694. (\uBC1B\uC740 \uAC12: ${b})`);const Le=P.findIndex(Q=>!!Q.sortDir);P.filter(Q=>!!Q.sortDir).length>1&&Dt("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 Se=Q=>Q===Le?P[Q].sortDir==="asc"?"ascending":"descending":P[Q].onClick?"none":void 0,Je=Q=>/^\d+(\.\d+)?px$/.test(wt[Q]??""),ht=Q=>{const _e=wt[Q]??"",Oe=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(_e)??/^(\d+(?:\.\d+)?)px$/.exec(_e);return Oe?parseFloat(Oe[1]):H};$e.current=Je,W.current=ht,nt.current=wt;const Rt=Q=>f==="fit"&&!Je(Q)?"fr":"px",Me=rt&&rt.length===P.length&&!ie,tt=U??(Me?P.map((Q,_e)=>Q.resizable===!1&&wt[_e]?wt[_e]:`${rt[_e]}${Rt(_e)}`).join(" "):mt),Ft=tt?{"--table-grid-cols":tt}:void 0,_t=_!==void 0;return n.jsxs("div",{ref:Ce,className:`table-wrap table-wrap--${w}${ce?" table-wrap--resizable":""}${F?" table-wrap--dragover":""}${N?" table-wrap--collapsed":""}`,style:Ft,onDragOver:L,onDragLeave:q,onDrop:M,tabIndex:Be?0:void 0,role:Be?"region":void 0,"aria-label":Be?typeof _=="string"?_:G("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&n.jsx("span",{id:re,className:"table-row-hint",children:G("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),n.jsxs("div",{ref:xe,role:"table","aria-labelledby":_t&&typeof _=="string"?ee:void 0,className:"table body-2",children:[_t&&n.jsxs("div",{className:De("table-header",k&&"table-header--clickable"),onClick:k,role:"caption",children:[k&&n.jsx(be,{htmlType:"button",size:Lt,type:"dot",variant:"transparent-gray",useBorder:!1,icon:N?"chevron-right":"chevron-down",ariaLabel:N?G("common.expand","\uD3BC\uCE58\uAE30"):G("common.collapse","\uC811\uAE30"),ariaExpanded:!N,className:"table-header__chevron"}),E&&n.jsx(lt,{icon:E,label:typeof _=="string"?_:void 0,className:"table-header__icon"}),n.jsx("span",{id:ee,className:"table-header__title h5b",children:_}),v!==void 0&&n.jsx("span",{className:"table-header__count body-3b",children:v}),D&&n.jsx("span",{className:"table-header__actions",onClick:Q=>Q.stopPropagation(),children:D})]}),!N&&n.jsxs(n.Fragment,{children:[r&&r.length>0&&n.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:r.map((Q,_e)=>n.jsx("div",{role:"columnheader","aria-colspan":Q.span,className:De("table-field body-3",Q.className),style:{gridColumn:`span ${Q.span}`},children:Q.label},_e))}),n.jsxs("div",{role:"presentation",className:De("table-fields-strip",ce&&"table-fields-strip--resizable"),children:[n.jsx("div",{role:"row",className:"table-fields",ref:ae,children:P.map((Q,_e)=>n.jsx(A4,{onClick:Q.onClick,className:De(Q.className,oc(Q.align)),sortDir:Q.sortDir,ariaSort:Se(_e),onResizeStart:ce&&_e<P.length-1&&Q.resizable!==!1&&(f!=="fit"||P.some((Oe,Ve)=>Ve>_e&&Oe.resizable!==!1))?Oe=>jt(_e,Oe):void 0,children:Q.label},_e))}),ce&&n.jsx("div",{className:"table-fields__reset-dock",children:n.jsx(be,{htmlType:"button",size:Lt,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:G("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:G("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:pt})})]}),n.jsx("div",{role:"rowgroup",className:"table-body",children:B?n.jsx(ts,{variant:"loading",colSpan:P.length||void 0}):V.length===0&&A?n.jsx(ts,{variant:"empty",colSpan:P.length||void 0,children:A}):V.map((Q,_e)=>{const Oe=m!=null&&Q.id===m,Ve=!!i&&(u?u(Q):!0),Bt=T!=null&&Q.id!=null&&(T instanceof Set?T.has(Q.id)||[...T].some(Qe=>String(Qe)===String(Q.id)):String(Q.id)===String(T));return n.jsx(ts,{className:`${Ve?" table-row--clickable":""}${h?" table-row--draggable":""}${Oe?" table-row--dragging":""}`.trim(),draggable:!!h,onClick:Ve?()=>i(Q):void 0,colSpan:P.length||void 0,rowHasButton:l(Q).some(Qe=>!!Qe.rowLabel),describedBy:re,onMouseEnter:c?Qe=>c(Q,Qe):void 0,onMouseLeave:p?Qe=>p(Q,Qe):void 0,onDragStart:h?Qe=>h(Q,Qe):void 0,onDragEnd:d?Qe=>d(Q,Qe):void 0,expandedContent:Bt&&O?O(Q):void 0,children:l(Q).map((Qe,zt)=>n.jsx(B4,{className:De(Qe.className,oc(P[zt]?.align)),style:Qe.style,span:Qe.span,rowLabel:Ve?Qe.rowLabel:void 0,onRowClick:Ve?()=>i(Q):void 0,children:Qe.content},zt))},Q.id!=null?`${typeof Q.id}:${Q.id}`:`__idx:${_e}`)})})]})]})]})}function sc(e,t){return t!=="wornAt"?String(e[t]??""):Tv(e.wornYear,e.wornMonth,e.wornDay)}function N4({rows:e,loading:t,onSelect:a,onDelete:r,onWear:s,onRelease:l,onAdd:i}){const{t:u,i18n:c}=ke.useTranslation(),p=f=>f==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:h,field:d}=Wy(),m=o.useMemo(()=>{if(!h)return e;const{key:f,asc:x}=h;return[...e].sort((g,w)=>{if(f==="worn"){const _=Number(w.worn)-Number(g.worn);return x?_:-_}return vr(sc(g,f),sc(w,f),x)})},[e,h]),{pageRows:b,pageSizeProps:y,paginationProps:C}=zy(m,h);return n.jsxs("div",{className:"dlp-side-table",children:[n.jsx(qo,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:y,pagination:C,actions:i&&n.jsx(be,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),n.jsx(ns,{loading:t,resizable:!0,resizeMode:"fit",resizeStorageKey:"customer-device-history-v2",fields:[{...d(u("customers.device.wearingNow","\uCC29\uC6A9"),"worn"),resizable:!1},d(u("device.direction.label","\uBC29\uD5A5"),"side"),d(u("device.deviceType","\uC885\uB958"),"device"),d(u("device.brand","\uBE0C\uB79C\uB4DC"),"brand"),d(u("device.fitType","\uCC29\uC6A9\uD615\uD0DC"),"fitType"),d(u("device.productName","\uC81C\uD488\uBA85"),"productName"),d(u("device.wornDate","\uCC29\uC6A9\uC77C"),"wornAt"),...r?[{label:"",resizable:!1}]:[]],items:b.map((f,x)=>({id:f.id??`${f.side}-${x}`,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:x=>x.stopPropagation(),children:n.jsx(Ho,{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:x=>{x?s?.(f):l?.(f)}})})},{content:n.jsx("span",{children:p(f.side)})},{content:f.device?n.jsx(ln,{size:"small",variant:Du(f.device),fill:"soft",label:Su(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:zo(f.wornYear,f.wornMonth,f.wornDay,c.language)||"-"})},...r?[{content:n.jsx("span",{className:"dlp-row-actions",children:n.jsx(be,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:u("common.delete","\uC0AD\uC81C"),onClick:x=>{x?.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 lc(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 E4(e,t){return new Date(e,t+1,0).getDate()}function D4(e,t){return new Date(e,t,1).getDay()}function S4({visits:e=[],onVisitClick:t,onVisitMove:a,onDayClick:r,today:s}){const{t:l,i18n:i}=ke.useTranslation(),u=o.useMemo(()=>l("calendar.dow",{returnObjects:!0}),[l]),c=pr(s),[p,h]=o.useState(()=>Number(c.slice(0,4))),[d,m]=o.useState(()=>Number(c.slice(5,7))-1),[b,y]=o.useState(null),C=o.useRef(null),f=o.useMemo(()=>{const v={};return e.forEach(N=>{v[N.date]||(v[N.date]=[]),v[N.date].push(N)}),v},[e]),x=o.useMemo(()=>{const v=E4(p,d),N=D4(p,d),k=[];for(let D=0;D<N;D++)k.push(null);for(let D=1;D<=v;D++)k.push(D);for(;k.length<35;)k.push(null);return k},[p,d]),g=o.useCallback(()=>{d===0?(h(v=>v-1),m(11)):m(v=>v-1)},[d]),w=o.useCallback(()=>{d===11?(h(v=>v+1),m(0)):m(v=>v+1)},[d]),_=v=>`${p}-${String(d+1).padStart(2,"0")}-${String(v).padStart(2,"0")}`,E=v=>_(v)===c;return n.jsxs("div",{children:[n.jsxs("div",{className:"calendar-nav",children:[n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:g,"aria-label":l("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:n.jsx(lt,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),n.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:Yl(l,i.language,p,d+1)}),n.jsx("button",{type:"button",className:"calendar-nav__button",onClick:w,"aria-label":l("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:n.jsx(lt,{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(v=>n.jsx("div",{className:"calendar-day-header body-3",children:v},v)),x.map((v,N)=>{if(v===null)return n.jsx("div",{className:"calendar-cell empty"},`empty-${N}`);const k=v,D=_(k),A=f[D]??[],B=Kl(D,i.language),F=b===D;return n.jsxs("div",{className:`calendar-cell${E(k)?" today":""}${F?" 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":E(k)?"date":void 0,onClick:r?()=>r(D):void 0,onKeyDown:r?L=>{L.target===L.currentTarget&&(L.key!=="Enter"&&L.key!==" "||(L.preventDefault(),r(D)))}:void 0,onDragOver:a?L=>{L.preventDefault(),y(D)}: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,D),C.current=null),y(null)}:void 0,children:[n.jsx("div",{className:"calendar-cell__number body-3",children:k}),A.length>0&&(()=>{const L=[{key:"visited",label:l("calendar.legend.visited","\uBC29\uBB38"),count:A.filter(M=>(M.status??"visited")==="visited").length},{key:"scheduled",label:l("calendar.legend.scheduled","\uC608\uC57D"),count:A.filter(M=>M.status==="scheduled").length},{key:"noVisit",label:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:A.filter(M=>M.status==="noVisit").length}].filter(M=>M.count>0),q=L.length===1&&L[0].key==="visited"?l("calendar.visitCount",{count:A.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":`${B} ${q}`,children:[L.map(M=>n.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${M.key}`,"aria-hidden":"true"},M.key)),A.length]})})(),n.jsx("div",{className:"calendar-cell__badges",children:A.map((L,q)=>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,...lc(t?()=>t(L):void 0),"aria-label":[B,L.time?Ql(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:Ql(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??q))})]},k)})]})]})}const j4={page:"h3",pagePopup:"h4",popup:"h5"};function ka({type:e="page",title:t,headingLevel:a=2,icon:r,action:s,disc:l,children:i,inGrid:u=!1,className:c,style:p}){const h=j4[e],d=t||l||s||r,m=a?`h${a}`:"div";return n.jsxs("div",{className:De("section",`section--${e}`,u&&"section--in-grid",c),style:p,children:[d&&n.jsxs("div",{className:"section__header",children:[n.jsxs("div",{className:"section__title-row",children:[r&&n.jsx(lt,{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 as=null,ic=!1;function uc(){if(ic||typeof document>"u")return;ic=!0,document.addEventListener("keydown",t=>{t.metaKey||t.ctrlKey||t.altKey||(as="keyboard")},!0);const e=()=>{as="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}uc();function Nr(){return uc(),as==="keyboard"}const Er=20;function T4(e){const{t}=ke.useTranslation(),{type:a,trainingDatas:r,depth:s,renderPopup:l,completedIds:i,selectedIds:u,onItemComplete:c,size:p,useDescriptionTooltip:h,onRemove:d,onMore:m,sectionType:b="page"}=e||{},[,y]=o.useState(0),C=typeof r<"u"?Array.isArray(r)?r:[]:[],f=C.length,[x,g]=o.useState(Math.min(f,Er)),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(()=>{g(Math.min(f,Er))},[f]),Vi("speechear.data.updated",()=>y(N=>N+1));const _=o.useRef(null),E=o.useRef(null);function v(){const N=document.activeElement;E.current=Nr()&&N&&N.closest?.(".training-block__more")?x:null,g(k=>Math.min(f,k+Er))}return o.useEffect(()=>{const N=E.current;if(N==null)return;E.current=null;const k=document.activeElement;k&&k!==document.body||_.current?.querySelectorAll(".training-block-button")[N]?.focus()},[x]),n.jsxs(ka,{type:b,title:a?.label,icon:a?.icon,disc:a?.desc,className:"training-block",children:[n.jsx("div",{className:"training-list",ref:_,children:(C||[]).slice(0,x).map((N,k)=>{const D=N;return n.jsx(Io,{index:k,type:a,trainingData:D,depth:w,renderPopup:l,completedIds:i,selectedIds:u,size:p,useDescriptionTooltip:h,onRemove:typeof d=="function"&&u!=null&&D?.id!=null&&u.has(String(D.id))?()=>d(D):void 0,onComplete:typeof c=="function"&&D?.id!=null?()=>c(String(D.id)):void 0,onMore:typeof m=="function"?A=>m(D,A):void 0},D?.id!=null?`${a?.key||"t"}-${String(D.id)}`:`${a?.key||"t"}-${k}`)})}),f>Er&&x<f&&n.jsx("div",{className:"training-block__more",children:n.jsx(be,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:v,ariaLabel:t("common.loadMore","\uB354\uBCF4\uAE30"),label:t("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function M4(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 L4({gap:e=10,count:t,className:a,children:r}){const s=o.useRef(null),[l,i]=o.useState({width:0,card:0}),u=t??M4(r);o.useLayoutEffect(()=>{const m=s.current;if(!m)return;const b=()=>{const C=m.style.maxWidth;m.style.maxWidth="none";const f=m.clientWidth;m.style.maxWidth=C;const x=m.firstElementChild?.offsetWidth??0;i(g=>g.width===f&&g.card===x?g:{width:f,card:x})};if(b(),typeof ResizeObserver>"u")return;const y=new ResizeObserver(b);return y.observe(m),()=>y.disconnect()},[u,e]);const c=l.card>0?l.card:0,p=c>0?Nf(l.width,c,e):0,h=p>0?Ef(u,p):0,d={"--block-grid-gap":`${e}px`,...h>0?{"--block-grid-cols":h,"--block-grid-card":`${c}px`}:{}};return n.jsx("div",{ref:s,className:De("training-block-grid",h>0&&"training-block-grid--measured",a),style:d,"data-cols":h>0?h:void 0,children:r})}function rs(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 $4='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 R4=$4,os=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:p=null},h){const{t:d}=ke.useTranslation(),m=e.word||e.title||"",b=t||!m,y=e.audio??e.sound??e.audioKey,C=e.subLabel||e.pronunciation||"",f=e.colloquialLabel||"",[x,g]=o.useState({label:m,subLabel:C,colloquialLabel:f,homonum:e.homonum});m&&(x.label!==m||x.subLabel!==C||x.colloquialLabel!==f||!Object.is(x.homonum,e.homonum))&&g({label:m,subLabel:C,colloquialLabel:f,homonum:e.homonum});const w=o.useRef(null),_=vn("(max-width: 767px)"),[E,v]=o.useState(!1),[N,k]=o.useState(!1),D=`${typeof y=="string"?y:y?.src??""}\0${m}`,[A,B]=o.useState({for:"",url:""}),F=A.for===D?A.url:"",L=ql(),q=e.textOnly??(!e.image&&!!x.label&&!!L&&L.entries.length>0&&!L.byWord.has(x.label)),M=q?"":Ca()?.(x.label,x.homonum)??e.image??"",{imgRef:O,loading:T,hasImage:G,onLoad:K,onError:ee}=rs(M);o.useEffect(()=>{let V=!1;return(async()=>{if(y){if(typeof y=="string"){if(y.startsWith("http")||y.includes("/")){B({for:D,url:y});return}}else if(typeof y=="object"&&!Array.isArray(y)){const U=y.src;if(U){B({for:D,url:U});return}}}const ie=$a();if(ie&&m)try{const U=await Promise.resolve(ie(m));!V&&U&&B({for:D,url:U})}catch{}})(),()=>{V=!0}},[y,m,D]);const re=o.useRef(!0),R=o.useRef(null);o.useEffect(()=>(re.current=!0,()=>{re.current=!1,R.current&&Br(R.current),R.current=null;try{w.current?.pause()}catch{}w.current=null}),[]);const J=o.useCallback(()=>new Promise(V=>{if(typeof window<"u"&&window.speechSynthesis&&m){v(!0),window.speechSynthesis.cancel();const ie=new SpeechSynthesisUtterance(m);ie.lang="ko-KR",ie.onend=()=>{v(!1);try{a?.()}catch{}V()},ie.onerror=()=>{v(!1),V()},window.speechSynthesis.speak(ie)}else V()}),[m,a]),ne=o.useCallback(V=>{const ie=Ja(V,U=>{if(v(!1),U)try{a?.()}catch{}});return w.current=ie.el,ie.done},[a]),S=o.useCallback(async()=>{if(t||!re.current)return;const V=()=>{R.current===V&&(R.current=null);try{w.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}v(!1)},ie=Xa(V);R.current=V;try{window.speechSynthesis?.cancel()}catch{}try{if(F&&(v(!0),await ne(F)))return;const U=ir();if(U&&m)try{k(!0);const ce=await Promise.resolve(U(m));if(!re.current||R.current!==V||(k(!1),ce&&(v(!0),await ne(ce))))return}catch{}if(!re.current||R.current!==V)return;await J()}finally{R.current===V&&k(!1),ie(),R.current===V&&(R.current=null)}},[t,F,m,ne,J]);o.useImperativeHandle(h,()=>({play:()=>S()}),[S]);const $=V=>V.stopPropagation(),I=o.useCallback(V=>{if(V.stopPropagation(),!t){if(E){try{w.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}v(!1);return}S()}},[t,E,S]),P=De("training-word-card",t?"training-word-card--disabled":"",b?"training-word-card--flipped":"",r?"training-word-card--selectable":"",s?"training-word-card--selected":"");return n.jsx("div",{className:P,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?V=>{V.target===V.currentTarget&&(V.key==="Enter"||V.key===" "||V.key==="Spacebar")&&(V.preventDefault(),l?.())}:void 0,children:n.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:b?"0ms":`${i}ms`},children:[n.jsxs("div",{className:"training-word-card__front",children:[s&&n.jsx("div",{className:"training-word-card__selected-badge",onClick:$,children:n.jsx(Sn,{size:40,position:"inline",animate:!0,icon:p!=null?void 0:"check",number:p??void 0,"aria-label":p!=null?d("training.nthSelected",{n:p}):d("training.selected","\uC120\uD0DD\uB428")})}),n.jsx("div",{className:"training-word-card__image-wrap",children:q?n.jsx("div",{className:"training-word-card__text-face",children:x.label}):G?n.jsxs(n.Fragment,{children:[T&&n.jsx("div",{className:"training-word-card__spinner"}),n.jsx("img",{ref:O,className:"training-word-card__image",src:M,alt:x.label||d("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:T?0:1},onLoad:K,onError:ee})]}):n.jsx("div",{className:"training-word-card__placeholder"})}),!u&&n.jsxs("div",{className:"training-word-card__body",children:[!q&&n.jsx("div",{className:"training-word-card__word",children:x.label}),x.subLabel&&n.jsxs("div",{className:"training-word-card__pronunciation",children:["[",x.subLabel,"]"]}),x.colloquialLabel&&n.jsxs("div",{className:"training-word-card__colloquial caption-1",children:["[",x.colloquialLabel,"]"]})]}),!c&&n.jsx("div",{className:"training-word-card__bottom",onClick:r?$:void 0,children:n.jsx(be,{htmlType:"button",size:_?40:48,type:_?"dot":"bar",icon:E?"pause":"play",label:_?void 0:d("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:E,loading:N,onClick:I,disabled:t,ariaLabel:d("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("${R4}")`}})})]})})});function Dr(e){return String(e)}const Sr=["o","triangle","x"];function cc(e,t){return e===t?null:t}const dc={o:"circle",triangle:"triangle",x:"x"},pc={o:"main",triangle:"warn",x:"danger"};function P4(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 ss(e){const t={};for(const[a,r]of Object.entries(e))(r==="o"||r==="triangle"||r==="x")&&(t[a]=r);return t}function hc(e){const t=[];let a=0;for(const r of e)t.push(a),a+=r;return t}function F4(e,t){return!t&&e>0}const sa={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 I4(e="landscape"){Dt("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}=sa[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 O4(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 z4={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 mc(e,t){const a=z4[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 W4(e,t){const a=mc(e==="landscape"?"portrait":"landscape",t),r=Math.max(1,Math.ceil(t));if(r<=1)return a;const s=sa[e],l=e==="landscape"?s.width/2:s.width,i=e==="landscape"?s.height:s.height/2,u=(m,b)=>Math.min(l/m/yc,i/b/vc),c=Math.max(0,a.cols*a.rows-r),p=u(a.cols,a.rows);let h=a,d=p;for(let m=1;m<=r;m++){const b=Math.ceil(r/m);if(m*b-r>c)continue;const y=u(m,b);y>d&&(h={cols:m,rows:b},d=y)}return d>p*1.05?h:a}const H4={show:"word-table__content--cut-show",dashed:"",corner:"word-table__content--cut-corner",hide:""},Cc={\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"},fc={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},ls={\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"},is={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function bc(e){return Object.fromEntries(Object.entries(Cc).map(([t,a])=>[t,ls[t]?e(`wordTable.pos.${ls[t]}`,{defaultValue:a}):a]))}function gc(e){return Object.fromEntries(Object.entries(fc).map(([t,a])=>[t,is[t]?e(`wordSearch.filter.type.${is[t]}`,{defaultValue:a}):a]))}const V4={pos:ls,wordType:is};function us(e,t){return e?e.split("/").map(a=>t[a]??a).join("/"):""}function cs(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",p=b=>`repeating-linear-gradient(to ${b}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,h=[],d=[],m=[];return i&&(h.push(p("bottom")),d.push("1px 100%"),m.push("right center")),u&&(h.push(p("right")),d.push("100% 1px"),m.push("center bottom")),{backgroundImage:h.join(", "),backgroundSize:d.join(", "),backgroundPosition:m.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const yc=280,q4=240,U4=280,vc=400,G4=120,K4=280;function _c(e,t){const a=o.useRef(null),[r,s]=o.useState(1),[l,i]=o.useState(0),u=o.useCallback((c,p)=>{if(!(c>0))return;const h=c/e,d=t&&p>0?p/t:1/0,m=Math.min(1,h,d);s(m),i(Math.max(0,(c-e*m)/2))},[e,t]);return o.useEffect(()=>{const c=a.current;if(!c)return;const p=t?c.parentElement??c:c;if(u(p.clientWidth,p.clientHeight),typeof ResizeObserver>"u")return;const h=new ResizeObserver(([d])=>u(d.contentRect.width,d.contentRect.height));return h.observe(p),()=>h.disconnect()},[u,t]),{scalerRef:a,scale:r,offset:l}}const Y4=24,Z4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},X4=400,xc=8;function J4(e){return e<=1?"100%":`repeat(${e}, calc((100% - ${e-1} * var(--wt-cell-gap, 0px)) / ${e}))`}function ds({label:e,subLabel:t,colloquialLabel:a,captionLabel:r,captionBadge:s,imageLabel:l,pickForm:i,homonum:u,showWord:c=!0,showImage:p=!0,showPronunciation:h=!0,showColloquial:d=!0,showCaption:m=!0,buttonSize:b=40,wordInfo:y,outerScale:C=1}){const{t:f}=ke.useTranslation(),x=o.useRef(null),g=o.useRef(null),w=o.useRef(null),[_,E]=o.useState(1),[v,N]=o.useState(!1),[k,D]=o.useState(!1),[A,B]=o.useState({for:"",url:""}),[F,L]=o.useState(null),q=t&&t.length>0?t:J1()?.(e,u)??"",M=Ca()?.(l||e,u)??"",{imgRef:O,loading:T,failed:G,onLoad:K,onError:ee}=rs(M),re=o.useCallback(()=>L(g.current?.getBoundingClientRect()??null),[]),R=o.useCallback(()=>L(null),[]),J=gr(!!F,te=>{te?re():R()},g),ne=o.useMemo(()=>{if(!y)return null;const te=[];return y.grade&&te.push(f("wordTable.info.grade",{n:y.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),y.syllables&&te.push(f("wordTable.info.syllables",{n:y.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),y.pos&&te.push(f("wordTable.info.pos",{v:us(y.pos,bc(f)),defaultValue:"\uD488\uC0AC: {{v}}"})),y.wordType&&te.push(f("wordTable.info.wordType",{v:us(y.wordType,gc(f)),defaultValue:"\uC720\uD615: {{v}}"})),te.length?te:null},[y,f]),S=q||e,$=A.for===S?A.url:"";o.useEffect(()=>{const te=$a(),W=q||e;if(!te||!W)return;let z=!1;return Promise.resolve(te(W)).then(ae=>{!z&&ae&&B({for:W,url:ae})}),()=>{z=!0}},[q,e]);const I=o.useRef(null),P=o.useRef(null);o.useEffect(()=>()=>{w.current?.pause(),P.current?.()},[]);const V=o.useRef(null);o.useEffect(()=>()=>{V.current&&(V.current.cancelled=!0)},[]);const ie=o.useCallback(te=>{if(te.stopPropagation(),v||k){I.current?.();return}if(!$){const z=ir(),ae=q||e;if(!z||!ae)return;const ve={cancelled:!1,stop:null};V.current=ve;const me=()=>{ve.cancelled=!0,ve.stop?.(),D(!1),N(!1),P.current?.()};I.current=me,P.current=Xa(me),D(!0),Promise.resolve().then(()=>z(ae)).then(le=>{if(ve.cancelled)return;if(!le){me();return}B({for:ae,url:le});const Be=Ja(le,()=>{N(!1),P.current?.()});w.current=Be.el,ve.stop=Be.stop,D(!1),N(!0)}).catch(()=>{me()});return}N(!0);const W=Ja($,()=>{N(!1),P.current?.()});w.current=W.el,I.current=W.stop,P.current=Xa(W.stop)},[v,k,$,q,e]),U=p&&!!M&&!G,ce=U&&c?yc:U?U4:q4,Z=U&&c?vc:U?K4:G4;o.useEffect(()=>{const te=x.current;if(!te||typeof ResizeObserver>"u")return;const W=new ResizeObserver(([z])=>{const{width:ae,height:ve}=z.contentRect;E(Math.min(ae/ce,ve/Z))});return W.observe(te),()=>W.disconnect()},[ce,Z]);const H=b*C<Y4;return n.jsxs("div",{ref:x,className:De("word-table-cell",H&&"word-table-cell--tap-too-small",U?"word-table-cell--with-image":""),"data-ref-w":ce,"data-ref-h":Z,children:[n.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${_})`},children:[U&&n.jsxs("div",{className:"word-table-cell__image-wrap",children:[T&&n.jsx("div",{className:"word-table-cell__spinner"}),n.jsx("img",{ref:O,className:"word-table-cell__image",src:M,alt:e,draggable:!1,style:{opacity:T?0:1},onLoad:K,onError:ee})]}),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&&q&&n.jsxs("span",{className:"word-table-cell__sub h3",children:["[",q,"]"]}),d&&a&&n.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",a,"]"]})]}),n.jsxs("div",{className:"word-table-cell__side",children:[n.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":$,children:[n.jsx("span",{"data-play-state":"play",style:{display:v?"none":void 0},children:n.jsx(be,{htmlType:"button",size:b,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,loading:k,showTooltipInfo:k?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:v?void 0:"none"},children:n.jsx(be,{htmlType:"button",size:b,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:g,className:"word-table-cell__info-button",onPointerEnter:te=>{Gn(te)||re()},onPointerLeave:te=>{Gn(te)||R()},onFocus:()=>{ta()||re()},onBlur:R,children:[n.jsx(be,{htmlType:"button",size:b,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:f("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:te=>{te.stopPropagation(),J.touchPress()}}),F&&ne&&n.jsx(Un,{anchorRect:F,items:ne,showIndex:!1})]}),i&&n.jsx("div",{className:"word-table-cell__form-button",children:n.jsx(be,{htmlType:"button",size:b,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:te=>{te.stopPropagation(),i.onPick(te.currentTarget.getBoundingClientRect())}})})]})]})}function Aa({title:e,titleIcon:t,disc:a,className:r,orientation:s="landscape",contentTypes:l=["image","word","standardPron"],baseItem:i,baseContentTypes:u,cutLine:c="show",showOutline:p=!0,showDivLine:h=!0,items:d,editCells:m,count:b,activeCell:y=null,onActivateCell:C,onRemoveCell:f,onRemoveItem:x,onReorder:g,onCopyItem:w,onReplaceItem:_,onPickForm:E,indexOffset:v=0,totalCount:N,renderCellAction:k,showFillerAdd:D=!1,addableCount:A,contentRef:B,buttonSize:F=40,brand:L,code:q,pageNumber:M,pageNumberPosition:O="right",fitHeight:T=!1,scoring:G=!1,marks:K,onMarkClick:ee,scoreIndexOffset:re=0}){const R=o.useCallback((de,Le)=>{ee?.(re+de,Le)},[ee,re]),J=(de,Le)=>{const Se=de.filter(Boolean).join(" / ");return Se?Le?S("wordPrint.removePairFor",{name:Se,defaultValue:`${Se} \uB300\uB9BD\uC30D \uBE7C\uAE30`}):S("wordPrint.removeWordFor",{name:Se,defaultValue:`${Se} \uBE7C\uAE30`}):Le?S("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):S("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30")},ne=(de,Le)=>{const Se=K?.[Dr(re+de)]??null;return n.jsx("div",{className:De("word-table-cell__score",Se?"word-table-cell__score--marked":""),style:kt>1?{transform:`translateX(-50%) scale(${kt})`,transformOrigin:"bottom center"}:void 0,children:Sr.map(Je=>n.jsx("span",{className:De("word-table-cell__score-slot",Se===Je?"word-table-cell__score-slot--on":""),children:n.jsx(be,{htmlType:"button",size:F,type:"dot",shape:"pill",icon:dc[Je],variant:Se===Je?pc[Je]:"default",selected:Se===Je,useBorder:!1,...pt?{}:{tabIndex:-1,role:"img"},showTooltipInfo:S(`wordTable.scoring.markName.${Je}`,{defaultValue:Je}),ariaLabel:S(`wordTable.scoring.${Je}`,{word:Le,defaultValue:`${Le} ${Je}`}),onClick:pt?ht=>{ht.stopPropagation(),R(de,Je)}:void 0})},Je))})},{t:S}=ke.useTranslation(),$=m!==void 0,I=e!=null||!!t||!!a,P=vn("(max-width: 767px)"),V=o.useRef(null),[ie,U]=o.useState(null),ce=d?.length??0,Z=N??ce,[H,te]=o.useState(null),[W,z]=o.useState(""),ae=o.useRef(null),ve=o.useRef(null),me=o.useRef(null),le=o.useRef(null),Be=o.useCallback(de=>{ve.current=de,typeof B=="function"?B(de):B&&(B.current=de)},[B]),Pe=o.useCallback((de,Le)=>{ae.current=v+Le,g?.(de,Le),z(S("wordTable.reorder.moved",{n:v+Le+1,total:Z,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[g,S,Z,v]);o.useEffect(()=>{const de=ae.current;de!=null&&(ae.current=null,(ve.current?.closest(".word-table-block__pages")??ve.current)?.querySelector(`[data-wordtable-index="${de}"] .word-table__card-handle button`)?.focus())}),o.useEffect(()=>()=>{le.current?.()},[]);const Fe=o.useCallback((de,Le)=>{if(!g||!de.altKey||de.ctrlKey||de.metaKey)return;const Se=de.key==="ArrowRight";if(!Se&&de.key!=="ArrowLeft")return;de.preventDefault();const Je=Le+(Se?1:-1),ht=v+Je;ht<0||ht>=Z||Pe(Le,Je)},[g,Z,v,Pe]),Ae=o.useCallback((de,Le)=>{if(!g||de.pointerType==="mouse")return;const Se=de.target.closest?.("button");if(Se&&!Se.closest(".word-table__card-handle"))return;le.current?.();const Je={x:de.clientX,y:de.clientY};let ht=!1;const Rt=Ve=>{ht&&Ve.cancelable&&Ve.preventDefault()};let Me=null,tt=null;const Ft=()=>{const Ve=tt;if(!Ve)return;const Bt=document.elementFromPoint?.(Ve.x,Ve.y)?.closest?.("[data-wordtable-cell]"),Qe=Bt?Number(Bt.dataset.wordtableCell):NaN,zt=Number.isInteger(Qe)?Qe:null;me.current=zt,U(Ht=>Ht===zt?Ht:zt)},_t=Ve=>{if(!ht){(Math.abs(Ve.clientX-Je.x)>xc||Math.abs(Ve.clientY-Je.y)>xc)&&Oe();return}if(tt={x:Ve.clientX,y:Ve.clientY},typeof requestAnimationFrame>"u"){Ft();return}Me===null&&(Me=requestAnimationFrame(()=>{Me=null,Ft()}))},Q=()=>{Me!==null&&(cancelAnimationFrame(Me),Me=null,Ft());const Ve=me.current,Bt=ht;Oe(),Bt&&Ve!=null&&Ve!==Le&&Pe(Le,Ve)},_e=setTimeout(()=>{ht=!0,te(Le),me.current=Le,U(Le),window.addEventListener("touchmove",Rt,{passive:!1})},X4);function Oe(){clearTimeout(_e),window.removeEventListener("pointermove",_t),window.removeEventListener("pointerup",Q),window.removeEventListener("pointercancel",Q),window.removeEventListener("touchmove",Rt),ht=!1,Me!==null&&(cancelAnimationFrame(Me),Me=null),me.current=null,le.current=null,te(null),U(null)}le.current=Oe,window.addEventListener("pointermove",_t),window.addEventListener("pointerup",Q),window.addEventListener("pointercancel",Q)},[g,Pe]),{width:se,height:ye}=sa[s],Ce=typeof T=="number"?T:T&&typeof T=="object"?P?T.narrow:T.wide:null,{scalerRef:xe,scale:$e,offset:nt}=_c(se,T?ye:void 0),ct=$?m?.length??0:d?.length??0,at=Math.max(b??ct,1),rt=!$&&!!i,Ee=W4(s,at),Ue=mc(s,at),Ne=rt?Ee.cols:Ue.cols,Ye=rt?Ee.rows:Ue.rows,et=rt&&s==="landscape"?Ee.cols*2:Ne,ft=rt&&s==="portrait"?Ee.rows*2:Ye,vt=de=>({word:de.length===0||de.includes("word"),image:de.length===0||de.includes("image"),pron:de.length===0||de.includes("standardPron"),colloq:de.length===0||de.includes("colloquialPron"),caption:de.length===0||de.includes("caption")}),dt=vt(l),jt=o.useMemo(()=>{const de=(d??[]).map(Se=>Se.id),Le=de.every(Se=>typeof Se=="string"&&Se.length>0)&&new Set(de).size===de.length;return!Le&&de.length>0&&Dt("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."),Le?de:null},[d]),ot=vt(u??l),st=$?(m??[]).some(de=>de!==null&&de.length>1):(d??[]).some(de=>(de.words??[]).length>1),At=!!L?.show,Nt=!!L?.show&&L?.top!==!1,Ot=!!L?.show&&L?.bottom!==!1,Wt=L?.copyright??"\xA9 IHAB, Inc. All rights reserved.",xt=ue(De("word-table__content",H4[c],p&&"word-table__content--outline",h&&st&&"word-table__content--div-line",!At&&M&&O!=="none"&&"word-table__content--page-number",Nt&&"word-table__content--brand-top",Ot&&"word-table__content--brand-bottom")),it={transform:`scale(${1/$e})`,transformOrigin:"center center"},bt=F*Sr.length+4*(Sr.length-1),pt=!!ee,kt=pt?Math.max(1,Math.min(1/$e,se/et/bt)):1,mt=n.jsxs("div",{ref:xe,className:"word-table__scaler",style:{height:ye*$e},children:[n.jsx("div",{className:De("word-table",G&&!pt&&"word-table--score-readonly",!I&&r),style:{width:se,height:ye,transform:`scale(${$e})`,transformOrigin:"top left",marginLeft:nt},children:n.jsxs("div",{ref:Be,className:xt,style:{gridTemplateColumns:`repeat(${et}, 1fr)`,gridTemplateRows:J4(ft)},children:[$?n.jsx(n.Fragment,{children:(m??[]).map((de,Le)=>n.jsx("div",{className:ue(De("word-table__edit-cell",de?"word-table__edit-cell--filled":"word-table__edit-cell--empty",y===Le?"word-table__edit-cell--active":"")),style:cs(Le,et,ft,c),children:de?n.jsxs(n.Fragment,{children:[de.map((Se,Je)=>n.jsxs(o.Fragment,{children:[Je>0&&n.jsx("div",{className:ue("word-table__pair-divider")}),n.jsx(ds,{outerScale:$e,label:Se.word,subLabel:Se.pronunciation,colloquialLabel:Se.colloquialPronunciation,homonum:Se.homonum,showWord:dt.word,showImage:dt.image,showPronunciation:dt.pron,showColloquial:dt.colloq,showCaption:dt.caption,buttonSize:F})]},Je)),G&&ne(Le,de.map(Se=>Se.word).join(" / ")),f&&n.jsx("div",{className:ue("word-table__card-close"),children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:de.length>1?S("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):S("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:J(de.map(Se=>Se.word),de.length>1),onClick:()=>f(Le)})})]}):C&&n.jsx("div",{className:ue("word-table__card-add"),style:it,children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"plus",variant:"default",ariaLabel:S("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:S("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C(Le)})})},Le))}):n.jsxs(n.Fragment,{children:[rt&&i&&n.jsx("div",{className:ue("word-table__card word-table__card--base"),style:{gridColumn:`1 / span ${Ee.cols}`,gridRow:`1 / span ${Ee.rows}`,...cs(0,s==="landscape"?2:1,s==="landscape"?1:2,c)},children:(i.words??[]).map((de,Le)=>n.jsxs(o.Fragment,{children:[Le>0&&n.jsx("div",{className:ue("word-table__pair-divider")}),n.jsx(ds,{outerScale:$e,label:de.label,subLabel:de.subLabel,colloquialLabel:de.colloquialLabel,captionLabel:de.captionLabel,captionBadge:de.captionBadge,imageLabel:de.imageLabel,pickForm:E&&de.canPickForm?{n:null,onPick:Se=>E(i.id,-1,Se)}:void 0,homonum:de.homonum,showWord:ot.word,showImage:ot.image,showPronunciation:ot.pron,showColloquial:ot.colloq,showCaption:ot.caption,buttonSize:F,wordInfo:de.grade||de.syllables!=null||de.pos||de.wordType?{grade:de.grade,syllables:de.syllables,pos:de.pos,wordType:de.wordType}:void 0})]},Le))}),(d??[]).map((de,Le)=>n.jsxs("div",{"data-wordtable-cell":g?Le:void 0,"data-wordtable-index":g?v+Le:void 0,className:ue(`word-table__card${g?" word-table__card--draggable":""}${ie===Le?" word-table__card--drag-over":""}${H===Le?" word-table__card--dragging":""}`),style:cs(Le,Ne,Ye,c),draggable:!!g,onPointerDown:g?Se=>Ae(Se,Le):void 0,onKeyDown:g?Se=>Fe(Se,Le):void 0,onDragStart:g?()=>{V.current=Le}:void 0,onDragOver:g?Se=>{Se.preventDefault(),U(Le)}:void 0,onDragLeave:g?()=>U(null):void 0,onDrop:g?Se=>{Se.preventDefault(),V.current!==null&&V.current!==Le&&g(V.current,Le),V.current=null,U(null)}:void 0,onDragEnd:g?()=>{V.current=null,U(null)}:void 0,children:[(de.words??[]).map((Se,Je)=>n.jsxs(o.Fragment,{children:[Je>0&&n.jsx("div",{className:ue("word-table__pair-divider")}),n.jsx(ds,{outerScale:$e,label:Se.label,subLabel:Se.subLabel,colloquialLabel:Se.colloquialLabel,captionLabel:Se.captionLabel,captionBadge:Se.captionBadge,imageLabel:Se.imageLabel,pickForm:E&&Se.canPickForm?{n:v+Le+1,onPick:ht=>E(de.id,v+Le,ht)}:void 0,homonum:Se.homonum,showWord:dt.word,showImage:dt.image,showPronunciation:dt.pron,showColloquial:dt.colloq,showCaption:dt.caption,buttonSize:F,wordInfo:Se.grade||Se.syllables!=null||Se.pos||Se.wordType?{grade:Se.grade,syllables:Se.syllables,pos:Se.pos,wordType:Se.wordType}:void 0})]},Je)),G&&ne(Le,(de.words??[]).map(Se=>Se.label).join(" / ")),(k||x||w||_||g)&&n.jsxs("div",{className:ue("word-table__card-actions"),children:[x&&n.jsx("div",{className:ue("word-table__card-close"),children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(de.words??[]).length>1?S("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):S("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:J((de.words??[]).map(Se=>Se.label),(de.words??[]).length>1),onClick:()=>x(de.id)})}),w&&n.jsx("div",{className:ue("word-table__card-copy"),children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"copy",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:S("wordTable.copyItem","\uD55C \uCE78 \uB354"),ariaLabel:S("wordTable.copyItemAria",{n:v+Le+1,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354"}),onClick:()=>w(de.id,v+Le)})}),_&&n.jsx("div",{className:ue("word-table__card-replace"),children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"refresh-cw",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(de.words??[]).length>1?S("wordTable.replacePair","\uB2E4\uB978 \uC30D\uC73C\uB85C"):S("wordTable.replaceItem","\uB2E4\uB978 \uB2E8\uC5B4\uB85C"),ariaLabel:(de.words??[]).length>1?S("wordTable.replacePairAria",{n:v+Le+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C"}):S("wordTable.replaceItemAria",{n:v+Le+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C"}),onClick:()=>_(de.id,v+Le)})}),k?.(Le,de),g&&n.jsx("div",{className:ue("word-table__card-handle"),children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:S("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:S("wordTable.reorder.handle",{word:(de.words??[]).map(Se=>Se.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})})]})]},jt?jt[Le]:Le)),Array.from({length:Math.max(0,Ne*Ye-(d?.length??0))}).map((de,Le)=>{const Se=Ne*Ye,Je=A??Se,ht=(d?.length??0)+Le<Je;return n.jsx("div",{className:ue("word-table__card word-table__card--filler"),children:D&&C&&ht&&n.jsx("div",{className:ue("word-table__card-add"),style:it,children:n.jsx(be,{htmlType:"button",size:F,type:"dot",icon:"plus",variant:"default",ariaLabel:S("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:S("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>C((d?.length??0)+Le)})})},`filler-${Le}`)})]}),Nt&&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??wr,alt:L?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const de=[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"),q&&n.jsx("span",{className:"word-table__code",children:q},"c")].filter(Boolean);return de.length===0?null:n.jsx("span",{className:"word-table__ident",children:de.map((Le,Se)=>n.jsxs(o.Fragment,{children:[Se>0&&n.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),Le]},Se))})})()]})}),Ot&&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:Wt})]}),n.jsxs("span",{className:"word-table__band-end",children:[L?.link&&n.jsx("span",{className:"word-table__link",children:L.link}),M&&O!=="none"&&n.jsx("span",{className:"word-table__page-count",children:S("wordTable.filter.pageIndicator",{current:M.current,total:M.total})})]})]})}),!At&&M&&O!=="none"&&n.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${O}`,children:S("wordTable.filter.pageIndicator",{current:M.current,total:M.total})})]})}),g&&n.jsx("span",{role:"status",style:Z4,children:W})]}),wt=Ce==null?mt:n.jsx("div",{className:"word-table__frame",style:{height:Ce},children:mt});return I?n.jsx(ka,{type:"page",icon:t,title:e,disc:a,className:De(ue("word-table__section"),r),children:wt}):wt}function Q4(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=e_(s,t?.[s.label],a);i!==null&&r.push(`${l} ${i}`)}return r.join(" \xB7 ")}function e_(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=>t_(e,s)).join(", ")}function t_(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 On({title:e,titleLevel:t=2,headerAction:a,headerSummary:r,collapsible:s=!1,defaultCollapsed:l=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:p,selected:h={},onSelect:d,align:m,sectionAlign:b,className:y}){const C=(m??(b==="vertical"?"newline":"inline"))==="inline",{t:f}=ke.useTranslation(),[x,g]=o.useState(l),w=i??x,_=()=>{const B=!w;g(B),u?.(B)},E=B=>{if(!s)return;const F=B.target;!F||typeof F.closest!="function"||F.closest(".filter-panel__collapse-toggle")||F.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||_()},v=o.useMemo(()=>r!==void 0||!w?"":Q4(p,h,f("common.all","\uC804\uCCB4")),[r,w,p,h,f]),N=r??(v?n.jsx("span",{className:"filter-panel__header-summary body-3",children:v}):null),k=e||a||r||s,D=o.useId(),A=t?`h${t}`:"span";return n.jsxs("div",{className:De("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?D:void 0,children:[k&&n.jsxs("div",{className:"filter-panel__header",onClick:s?E:void 0,children:[n.jsx("div",{className:"filter-panel__title-row",children:e&&n.jsx(A,{id:D,className:"filter-panel__title h4",children:e})}),n.jsxs("div",{className:"filter-panel__header-actions",children:[w?N:a,s&&n.jsx(be,{htmlType:"button",size:Lt,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:_})]})]}),!w&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:De("filter-panel__sections",C?"filter-panel__sections--row":""),children:p.map(B=>{const F=h[B.label],L=F===void 0||(Array.isArray(F)?F.length===0:!1),q=(B.items??[]).filter(O=>O!=null);B.allOption&&q.some(O=>(typeof O=="string"?O:O.value)===kn)&&Dt(`filter-panel-all-value:${B.label}`,`[FilterPanel] '${B.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=O=>{const T=typeof O=="string"?O:O.value,G=typeof O!="string"&&!!O.disabled,K=typeof O!="string"?O.labels:void 0,ee=typeof O!="string"?O.displayLabel:void 0,re=typeof O!="string"?O.tooltip:void 0,R=typeof O!="string"?O.descriptionTooltip:void 0,J=typeof O!="string"?O.shape:void 0,ne=Array.isArray(F)?F.includes(T):F===T;return n.jsx(be,{htmlType:"button",size:"keyboard",label:K??ee??T,type:B.itemType??(K?"bar":T.length===1?"dot":void 0),selected:ne,disabled:G,shape:J,showTooltipInfo:!!re,tooltipInfoText:re,tooltipDescription:R,onClick:()=>d?.(T,B.label)},T)};return n.jsxs(o.Fragment,{children:[B.groupLabel&&n.jsxs("div",{className:"filter-panel__group-label-row",children:[n.jsx("div",{className:"filter-panel__group-label body-2",children:B.groupLabel}),B.groupAction]}),n.jsxs("div",{className:De("filter-panel__section",B.layout==="row"?"filter-panel__section--row":"",B.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:B.displayLabel??B.label}),B.labelAction??(B.labelInfo?n.jsx(Za,{...B.labelInfo}):null)]}),B.type==="note"?n.jsx("div",{className:"filter-panel__note body-3",children:B.content}):B.type==="input"?n.jsx(Yn,{className:"filter-panel__textfield",placeholder:B.placeholder,ariaLabel:B.displayLabel??B.label,value:h[B.label]??"",onChange:O=>d?.(O,B.label),error:B.error}):!B.multiple&&B.display==="segmented"?n.jsx(_n,{ariaLabel:B.displayLabel??B.label,options:[...B.allOption?[{key:kn,label:B.allLabel??f("common.all","\uC804\uCCB4"),disabled:B.allOptionDisabled}]:[],...q.map(O=>{const T=typeof O=="string"?O:O.value,G=typeof O!="string"?O.displayLabel:void 0,K=typeof O!="string"?O.disabled:void 0;return{key:T,label:G??T,disabled:K}})],value:L&&B.allOption?kn:h[B.label]??"",onChange:O=>d?.(O,B.label),size:32}):!B.multiple&&B.display==="dropdown"?n.jsx(xn,{className:"filter-panel__dropdown",ariaLabel:typeof B.label=="string"?B.label:void 0,size:Lt,options:[...B.allOption?[{value:kn,label:B.allLabel??f("common.all","\uC804\uCCB4"),disabled:B.allOptionDisabled}]:[],...q.map(O=>{const T=typeof O=="string"?O:O.value,G=typeof O!="string"?O.displayLabel:void 0,K=typeof O!="string"?O.disabled:void 0;return{value:T,label:G??T,disabled:K}})],value:L&&B.allOption?kn:h[B.label],onChange:O=>d?.(O,B.label)}):n.jsxs("div",{className:B.groups?"filter-panel__item-groups":"filter-panel__items",children:[B.allOption&&!B.groups&&n.jsx(be,{htmlType:"button",size:"keyboard",label:B.allLabel??f("common.all","\uC804\uCCB4"),selected:L,disabled:B.allOptionDisabled,onClick:()=>d?.(kn,B.label)}),B.groups?B.groups.map((O,T)=>n.jsxs("div",{className:"filter-panel__item-group",children:[T===0&&B.allOption&&n.jsx(be,{htmlType:"button",size:"keyboard",label:B.allLabel??f("common.all","\uC804\uCCB4"),selected:L,disabled:B.allOptionDisabled,onClick:()=>d?.(kn,B.label)}),O.filter(G=>G!=null).map(M)]},T)):q.map(M)]})]})]},B.label)})}),c!=null&&c!==!1&&n.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const n_=[1,2,3,4,5,6,7,8,9,10,11,12],a_=[8,6,4,2,1],bn="show",Tn="hide",wc=["image","word","caption","standardPron"];function Bc(e){return e.some(t=>(t.words??[]).some(a=>!!a.captionBadge||!!a.captionLabel))}function kc(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 Ac(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 Nc(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Ec(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Dc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Sc(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:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function jc(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:bn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Tc(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,...a_.filter(r=>r<a)].map(r=>({value:`${r}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:r})})),display:"segmented"}}function Mc(e,t){return e>=t?Number.POSITIVE_INFINITY:e}function r_(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:Tn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Lc(e){return e==="left"||e==="center"||e==="right"?e:"none"}function $c(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:Tn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:t.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:t.showDivLine?bn:Tn,...t.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:t.showTopInfo?bn:Tn}:{},...t.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:t.showBottomInfo?bn:Tn}:{}}}function Rc(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 o_(e){return"sections"in e}function ps(e){const{t}=ke.useTranslation(),{title:a,className:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c}=e,p={collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c};if(o_(e))return n.jsx(On,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...p,align:"inline"});const{hasImage:h,hasColloquial:d,hasCaption:m,contentTypes:b,orientation:y,showOutline:C,cutLine:f,showDivLine:x,setters:g,showCutLine:w=!1,showDivLine2:_=!1,middleSections:E=[],extraSelected:v={},onExtraSelect:N,showPaperBands:k=!1,showTopInfo:D=!0,showBottomInfo:A=!0}=e,B=[kc(t,{hasImage:h,hasColloquial:d,hasCaption:m??!1}),Ac(t),...E,Nc(t),...w?[Sc(t)]:[],..._?[jc(t)]:[],...k?[Ec(t),Dc(t)]:[]],F={...$c(t,{contentTypes:b,orientation:y,showOutline:C,cutLine:f,showDivLine:x,showTopInfo:D,showBottomInfo:A}),...v},L=(q,M)=>{Rc(t,q,M,g)||N?.(q,M)};return n.jsx(On,{className:r,title:a??t("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:B,selected:F,onSelect:L,...p,sectionAlign:"horizontal"})}function hs(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function s_(e){return hs(e).replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function ms(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let jr=null,Na=null;function l_(e,t,a,r="",s=""){if(e.length===0||Na&&Na.iframe.isConnected&&Date.now()-Na.at<1e4)return;const l=r?ms(r):"";jr?.();let i=null;if(l){const p=document.title;document.title=l,i=()=>{document.title=p,window.removeEventListener("afterprint",i),jr===i&&(jr=null)},jr=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}Na={iframe:u,at:Date.now()},c.open(),c.write(Cs(e,t,a,!0,l,s)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),Na?.iframe===u&&(Na=null)},0)})}function Cs(e,t,a,r=!1,s="",l=""){s=s?ms(s):"";const i=Array.from(document.styleSheets).flatMap(d=>{try{return Array.from(d.cssRules).map(m=>m.cssText)}catch{return[]}}).join(`
832
+ `),u="light",c=(()=>{try{return document.documentElement.lang||""}catch{return""}})(),p=l?`<div class="paper-head">${hs(l)}</div>`:"",h=e.map(d=>{const m=d.cloneNode(!0);return m.querySelectorAll('[data-play-state="play"]').forEach(b=>b.style.display=""),m.querySelectorAll('[data-play-state="pause"]').forEach(b=>b.style.display="none"),m.querySelectorAll(".word-table-cell__score-slot:not(.word-table-cell__score-slot--on)").forEach(b=>b.remove()),m.querySelectorAll(".word-table-cell__spinner").forEach(b=>b.remove()),m.querySelectorAll("img").forEach(b=>{b.style.opacity==="0"&&(b.setAttribute("onload","this.style.opacity=''"),b.setAttribute("onerror","this.style.visibility='hidden'"))}),`<div class="paper-wrap">${p}${m.outerHTML}</div>`}).join(`
833
833
  `);return`<!DOCTYPE html>
834
- <html${c?` lang="${r_(c)}"`:""} data-theme="${u}">
834
+ <html${c?` lang="${s_(c)}"`:""} data-theme="${u}">
835
835
  <head>
836
836
  <meta charset="utf-8">
837
- ${s?`<title>${ps(s)}</title>`:""}
837
+ ${s?`<title>${hs(s)}</title>`:""}
838
838
  <style>${i}</style>
839
839
  <style>
840
840
  /* **\uD654\uBA74\uC5D0\uC11C \uAC10\uCD98 \uC18D \uB2E8\uCD94\uB97C \uC774 \uBB38\uC11C\uC5D0\uC11C\uB294 \uB418\uC0B4\uB9B0\uB2E4**((304), 2026-10-14).
@@ -1038,17 +1038,17 @@ ${_.badge}`:_.badge:void 0;if(v&&c(_.code))return null;if(!_.badge&&!h)return d(
1038
1038
  `:""}
1039
1039
  <\/script>
1040
1040
  </body>
1041
- </html>`}const s_=1e3;function Cs({getElements:e,paperW:t,paperH:a,fileName:r="",onPopupBlocked:s,header:l=""}){const{t:i}=ke.useTranslation(),u=o.useCallback(()=>{o_(e(),t,a,r,l)},[e,t,a,r,l]),c=o.useCallback(()=>{const h=e();if(h.length===0)return;const d=window.open("","_blank");if(!d){s?.();return}d.document.write(ms(h,t,a,!1,r,l)),d.document.close()},[e,t,a,r,s,l]),p=o.useCallback(()=>{const h=e();if(h.length===0)return;const d=ms(h,t,a,!1,r,l),m=new Blob([d],{type:"text/html;charset=utf-8"}),b=URL.createObjectURL(m),y=(r?hs(r):"")||i("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C"),C=Object.assign(document.createElement("a"),{href:b,download:`${y}.html`});document.body.appendChild(C),C.click(),document.body.removeChild(C),setTimeout(()=>URL.revokeObjectURL(b),s_)},[e,t,a,r,l,i]);return{print:u,openNewWindow:c,downloadHtml:p}}function Pc(e,t){const{t:a}=ke.useTranslation(),r=t?.paperBands===!0,s=t?.maxItemsPerPage,[l,i]=o.useState("landscape"),[u,c]=o.useState([...wc]),[p,h]=o.useState("show"),[d,m]=o.useState(!0),[b,y]=o.useState(!0),[C,f]=o.useState(!0),[x,g]=o.useState(!0),[w,_]=o.useState(8),[E,v]=o.useState("right"),N=e.length,k=e.some(re=>(re.words??[]).length>1),D=e.some(re=>(re.words??[]).some(R=>!!R.colloquialLabel)),A=Bc(e),B=Math.max(1,Math.min(Math.max(N,1),s??Math.max(N,1))),F=Math.min(w,B),L=o.useMemo(()=>F4(e,F),[e,F]),q=L.length>1,M=F,[O,T]=o.useState(!1);o.useEffect(()=>{let re=!1;if(!Ca()){T(!1);return}return Promise.all(e.flatMap(R=>(R.words??[]).map(J=>$l(J.label,J.homonum)))).then(R=>{re||T(R.some(Boolean))},()=>{}),()=>{re=!0}},[e]);const G=o.useMemo(()=>[kc(a,{hasImage:O,hasColloquial:D,hasCaption:A}),Ac(a),...N>0?[Tc(a,{hasPairs:k,itemCount:N,max:s})]:[],Nc(a),...M>1?[Sc(a)]:[],...k?[jc(a)]:[],...r?[Ec(a),Dc(a)]:[]],[a,O,D,A,N,k,q,M,r,s]),K={...$c(a,{contentTypes:u,orientation:l,showOutline:d,cutLine:p,showDivLine:x,showTopInfo:b,showBottomInfo:C}),...N>0?{[a(k?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${F}\uAC1C`}:{},...q?{[a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:E}:{}},ee=o.useCallback((re,R)=>{Rc(a,re,R,{setContentTypes:c,setOrientation:i,setShowOutline:m,setCutLine:h,setShowDivLine:g,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")?_(Mc(parseInt(re),N)):R===a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&v(Lc(re)))},[a,N]);return{settings:{orientation:l,contentTypes:u,cutLine:p,showOutline:d,showDivLine:x,count:M,showTopInfo:b,showBottomInfo:C},filterSections:G,filterSelected:K,handleSelect:ee,pages:L,isPaginated:q,pageNumberPosition:E}}function l_({items:e,words:t,baseItem:a,baseContentTypes:r,maxItemsPerPage:s,title:l,subtitle:i,emptyText:u,buttons:c,renderButtons:p,renderFooter:h,footerClassName:d,footerLayout:m,printFileName:b,showSettings:y,autoPrint:C,className:f,onClose:x,scoring:g=!1,onScoreChange:w,printHeader:_,brand:E,code:v,beforeClose:N}){const{t:k}=ke.useTranslation(),D=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(t)?t:[]).filter(z=>typeof z=="string"&&z.length>0).map((z,ae)=>({id:`${z}-${ae}`,words:[{label:z}]})),[e,t]),{settings:A,filterSections:B,filterSelected:F,handleSelect:L,pages:q,isPaginated:M,pageNumberPosition:O}=Pc(D,{paperBands:!!E?.show,maxItemsPerPage:s}),T=o.useMemo(()=>hc(q.map(z=>z.length)),[q]),[G,K]=o.useState({}),ee=o.useCallback((z,ae)=>{K(ve=>({...ve,[Dr(z)]:cc(ve[Dr(z)]??null,ae)}))},[]),re=o.useRef(w);o.useEffect(()=>{re.current=w});const R=o.useRef(G);o.useEffect(()=>{R.current!==G&&(R.current=G,re.current?.(os(G)))},[G]);const J=o.useMemo(()=>os(G),[G]),ne=o.useRef(null),{toastMessage:S,toastKey:$,showWarning:I,clearToast:P}=Zi("warning"),V=o.useRef([]),ie=o.useCallback(()=>M?V.current.filter(z=>z!==null):ne.current?[ne.current]:[],[M]),{print:U,openNewWindow:ce}=Cs({getElements:ie,paperW:sa[A.orientation].width,paperH:sa[A.orientation].height,fileName:b??"",header:_??"",onPopupBlocked:()=>I(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."))}),Z=o.useMemo(()=>h?void 0:p?p({print:U,openNewWindow:ce}):b?[{label:k("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>ce()},{label:k("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>U()},...c??[]]:c,[h,p,b,c,k,U,ce]),H=o.useMemo(()=>h?h({print:U,openNewWindow:ce}):void 0,[h,U,ce]),te=o.useRef(!1),W=o.useRef(U);return o.useEffect(()=>{W.current=U},[U]),o.useEffect(()=>{if(!C||te.current)return;const z=window.setTimeout(()=>{te.current=!0,W.current()},100);return()=>window.clearTimeout(z)},[C]),n.jsxs(Fn,{title:l??k("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:i,size:"large",className:De("word-table-popup",f),buttons:Z,footer:H,footerClassName:d,footerLayout:m,beforeClose:N,onClose:x,children:[D.length>0?n.jsxs("div",{className:"word-table-popup__body",children:[y&&n.jsx(ds,{sections:B,selected:F,onSelect:L}),M?n.jsx("div",{className:"word-table-popup__pages",children:q.map((z,ae)=>n.jsx(Aa,{items:z,orientation:A.orientation,contentTypes:A.contentTypes,baseItem:a,baseContentTypes:r,cutLine:A.cutLine,showOutline:A.showOutline,showDivLine:A.showDivLine,count:A.count,contentRef:ve=>{V.current[ae]=ve},pageNumber:{current:ae+1,total:q.length},pageNumberPosition:O,brand:E&&{...E,top:A.showTopInfo,bottom:A.showBottomInfo},code:v,scoring:g,scoreIndexOffset:T[ae],marks:J,onMarkClick:ee},ae))}):n.jsx("div",{className:"word-table-popup__table",children:n.jsx(Aa,{items:D,orientation:A.orientation,contentTypes:A.contentTypes,baseItem:a,baseContentTypes:r,cutLine:A.cutLine,showOutline:A.showOutline,showDivLine:A.showDivLine,count:A.count,contentRef:ne,fitHeight:!0,scoring:g,marks:J,onMarkClick:ee,brand:E&&{...E,top:A.showTopInfo,bottom:A.showBottomInfo},code:v})})]}):n.jsx("p",{className:"word-table-popup__empty body-3",children:u??k("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsx(Ba,{message:S,position:"top",onClose:P},$)]})}const i_=new Set(["x","triangle"]);function u_(e,t){const a=[];for(let r=0;r<e.length;r++){const s=t[String(r)];s&&i_.has(s)&&a.push(e[r])}return a}const c_=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function Fc(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=c_.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 d_(e,t){const[,a,r]=mo(t).split("-"),s=`${a}.${r}`,{base:l,round:i}=Fc(typeof e=="string"?{name:e}:e),u=i>=2?`${i}\uCC28 `:"";return`${l||"\uB2E8\uC5B4\uD45C"} ${u}\uBCF5\uC2B5 ${s}`}function p_(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:Fc(e).round}}function h_(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 m_(e){return e.map(t=>t.label).join(" / ")}function C_(e){return e.map(t=>t.homonum!=null?`${t.label}#${t.homonum}`:t.label).join(" / ")}function Ic(e){return e.split(" / ").map(t=>t.replace(/#\d+$/,"")).join(" / ")}function f_(e,t,a){const r=Jl(a);return[e.trim(),r,t.trim()].filter(Boolean).join(" \xB7 ")}function Oc(e,t,a){return a===0?0:(e+t*.5)/a}function b_(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:Ic(s),key:s,tried:i,o:l.o,triangle:l.triangle,x:l.x,rate:Oc(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 g_(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),p=c.filter(d=>d==="o").length,h=c.filter(d=>d==="triangle").length;return Oc(p,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 y_(e,t=8){return e.filter(a=>a.latest!=="o").slice(0,t)}function v_(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 __(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)||v_(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,p=`${i.trainingType}|${c}`,h=t.get(p)??{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 d=h.setIds.indexOf(i.setId);d>0&&h.setIds.splice(d,1),d!==0&&h.setIds.unshift(i.setId)}t.set(p,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 x_(e,t=8){return e.filter(a=>!a.latestCorrect).slice(0,t)}function w_(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 fs=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function B_(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=>fs.includes(l.trainingType)).sort(r),word:s.filter(l=>!fs.includes(l.trainingType)).sort(r),noSet:a}}function k_(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 A_(e,t){const a=new Set(e.flatMap(r=>r.covered));return t.filter(r=>!a.has(r))}function N_(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 bs(e,t,a){return typeof e=="string"&&e?e:t.replace(/\{\{(\w+)\}\}/g,(r,s)=>String(a[s]))}function E_(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?bs(Zt.t("customers.duration.minSec",{m:r,s,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:r,s}):r>0?bs(Zt.t("customers.duration.min",{m:r,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:r}):bs(Zt.t("customers.duration.sec",{s,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s})}function D_(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 S_(e,t){return e.map(a=>a.key===t?{...a,pinned:!a.pinned}:a)}function j_(e,t){return e.filter(a=>a.key!==t)}function T_(e,t,a){const r=e.filter(p=>p.pinned),s=new Set(r.map(p=>p.key)),l=e.length-r.length,i=[],u=new Set(s);for(const p of t){if(i.length>=l)break;const h=a(p);u.has(h)||(u.add(h),i.push({key:h,value:p,pinned:!1}))}const c=[...i];return e.map(p=>p.pinned?p:c.shift()).filter(p=>p!==void 0)}function M_(e){return e.map(t=>t.value)}function L_(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(lt,{icon:t.icon,label:t.label,className:"icon-grid-menu__button-icon",imgClassName:"icon-grid-menu__button-icon-image",maskClassName:"icon-grid-menu__button-icon-mask",svgClassName:"icon-grid-menu__button-icon-svg"})}),n.jsx("span",{id:l,className:"icon-grid-menu__button-label button-1",children:t.label})]})}function $_(e){const{categories:t=[],selected:a,onSelect:r,size:s="medium"}=e||{},l=a!==void 0,[i,u]=o.useState(()=>l?null:(t&&t[0]?.key)??null),c=l?a:i,p=o.useRef(r);o.useEffect(()=>{p.current=r});const h=o.useRef(!1),d=(t&&t[0]?.key)??null;o.useEffect(()=>{if(l||h.current||!d)return;h.current=!0;const b=i??d;i==null&&u(b),p.current?.(b)},[l,d]);const m=o.useCallback(b=>{const y=c===b?null:b;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(b=>n.jsx(L_,{category:b,isSelected:c===b.key,onClick:()=>m(b.key)},b.key))})}function R_({subs:e=[],selected:t,onSelect:a,size:r="medium"}){const s=r==="small"?32:40;return n.jsx("div",{className:`choice-chips choice-chips--${r}`,children:n.jsx("div",{className:"choice-chips__list",children:e.map(l=>n.jsx(be,{htmlType:"button",size:s,type:"bar",label:l.label,selected:t===l.key,className:"choice-chips__button",onClick:()=>a?.(l.key)},l.key))})})}function P_({onTermsClick:e,onPrivacyClick:t,contact:a}={}){const r=a?.email??"support@ihab.co.kr",s=a?.tel??"031-380-3724",{t:l}=ke.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
1041
+ </html>`}const i_=1e3;function fs({getElements:e,paperW:t,paperH:a,fileName:r="",onPopupBlocked:s,header:l=""}){const{t:i}=ke.useTranslation(),u=o.useCallback(()=>{l_(e(),t,a,r,l)},[e,t,a,r,l]),c=o.useCallback(()=>{const h=e();if(h.length===0)return;const d=window.open("","_blank");if(!d){s?.();return}d.document.write(Cs(h,t,a,!1,r,l)),d.document.close()},[e,t,a,r,s,l]),p=o.useCallback(()=>{const h=e();if(h.length===0)return;const d=Cs(h,t,a,!1,r,l),m=new Blob([d],{type:"text/html;charset=utf-8"}),b=URL.createObjectURL(m),y=(r?ms(r):"")||i("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C"),C=Object.assign(document.createElement("a"),{href:b,download:`${y}.html`});document.body.appendChild(C),C.click(),document.body.removeChild(C),setTimeout(()=>URL.revokeObjectURL(b),i_)},[e,t,a,r,l,i]);return{print:u,openNewWindow:c,downloadHtml:p}}function Pc(e,t){const{t:a}=ke.useTranslation(),r=t?.paperBands===!0,s=t?.maxItemsPerPage,[l,i]=o.useState("landscape"),[u,c]=o.useState([...wc]),[p,h]=o.useState("show"),[d,m]=o.useState(!0),[b,y]=o.useState(!0),[C,f]=o.useState(!0),[x,g]=o.useState(!0),[w,_]=o.useState(8),[E,v]=o.useState("right"),N=e.length,k=e.some(re=>(re.words??[]).length>1),D=e.some(re=>(re.words??[]).some(R=>!!R.colloquialLabel)),A=Bc(e),B=Math.max(1,Math.min(Math.max(N,1),s??Math.max(N,1))),F=Math.min(w,B),L=o.useMemo(()=>O4(e,F),[e,F]),q=L.length>1,M=F,[O,T]=o.useState(!1);o.useEffect(()=>{let re=!1;if(!Ca()){T(!1);return}return Promise.all(e.flatMap(R=>(R.words??[]).map(J=>Rl(J.label,J.homonum)))).then(R=>{re||T(R.some(Boolean))},()=>{}),()=>{re=!0}},[e]);const G=o.useMemo(()=>[kc(a,{hasImage:O,hasColloquial:D,hasCaption:A}),Ac(a),...N>0?[Tc(a,{hasPairs:k,itemCount:N,max:s})]:[],Nc(a),...M>1?[Sc(a)]:[],...k?[jc(a)]:[],...r?[Ec(a),Dc(a)]:[]],[a,O,D,A,N,k,q,M,r,s]),K={...$c(a,{contentTypes:u,orientation:l,showOutline:d,cutLine:p,showDivLine:x,showTopInfo:b,showBottomInfo:C}),...N>0?{[a(k?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${F}\uAC1C`}:{},...q?{[a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:E}:{}},ee=o.useCallback((re,R)=>{Rc(a,re,R,{setContentTypes:c,setOrientation:i,setShowOutline:m,setCutLine:h,setShowDivLine:g,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")?_(Mc(parseInt(re),N)):R===a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&v(Lc(re)))},[a,N]);return{settings:{orientation:l,contentTypes:u,cutLine:p,showOutline:d,showDivLine:x,count:M,showTopInfo:b,showBottomInfo:C},filterSections:G,filterSelected:K,handleSelect:ee,pages:L,isPaginated:q,pageNumberPosition:E}}function u_({items:e,words:t,baseItem:a,baseContentTypes:r,maxItemsPerPage:s,title:l,subtitle:i,emptyText:u,buttons:c,renderButtons:p,renderFooter:h,footerClassName:d,footerLayout:m,printFileName:b,showSettings:y,autoPrint:C,className:f,onClose:x,scoring:g=!1,onScoreChange:w,printHeader:_,brand:E,code:v,beforeClose:N}){const{t:k}=ke.useTranslation(),D=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(t)?t:[]).filter(z=>typeof z=="string"&&z.length>0).map((z,ae)=>({id:`${z}-${ae}`,words:[{label:z}]})),[e,t]),{settings:A,filterSections:B,filterSelected:F,handleSelect:L,pages:q,isPaginated:M,pageNumberPosition:O}=Pc(D,{paperBands:!!E?.show,maxItemsPerPage:s}),T=o.useMemo(()=>hc(q.map(z=>z.length)),[q]),[G,K]=o.useState({}),ee=o.useCallback((z,ae)=>{K(ve=>({...ve,[Dr(z)]:cc(ve[Dr(z)]??null,ae)}))},[]),re=o.useRef(w);o.useEffect(()=>{re.current=w});const R=o.useRef(G);o.useEffect(()=>{R.current!==G&&(R.current=G,re.current?.(ss(G)))},[G]);const J=o.useMemo(()=>ss(G),[G]),ne=o.useRef(null),{toastMessage:S,toastKey:$,showWarning:I,clearToast:P}=Zi("warning"),V=o.useRef([]),ie=o.useCallback(()=>M?V.current.filter(z=>z!==null):ne.current?[ne.current]:[],[M]),{print:U,openNewWindow:ce}=fs({getElements:ie,paperW:sa[A.orientation].width,paperH:sa[A.orientation].height,fileName:b??"",header:_??"",onPopupBlocked:()=>I(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."))}),Z=o.useMemo(()=>h?void 0:p?p({print:U,openNewWindow:ce}):b?[{label:k("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>ce()},{label:k("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>U()},...c??[]]:c,[h,p,b,c,k,U,ce]),H=o.useMemo(()=>h?h({print:U,openNewWindow:ce}):void 0,[h,U,ce]),te=o.useRef(!1),W=o.useRef(U);return o.useEffect(()=>{W.current=U},[U]),o.useEffect(()=>{if(!C||te.current)return;const z=window.setTimeout(()=>{te.current=!0,W.current()},100);return()=>window.clearTimeout(z)},[C]),n.jsxs(Fn,{title:l??k("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:i,size:"large",className:De("word-table-popup",f),buttons:Z,footer:H,footerClassName:d,footerLayout:m,beforeClose:N,onClose:x,children:[D.length>0?n.jsxs("div",{className:"word-table-popup__body",children:[y&&n.jsx(ps,{sections:B,selected:F,onSelect:L}),M?n.jsx("div",{className:"word-table-popup__pages",children:q.map((z,ae)=>n.jsx(Aa,{items:z,orientation:A.orientation,contentTypes:A.contentTypes,baseItem:a,baseContentTypes:r,cutLine:A.cutLine,showOutline:A.showOutline,showDivLine:A.showDivLine,count:A.count,contentRef:ve=>{V.current[ae]=ve},pageNumber:{current:ae+1,total:q.length},pageNumberPosition:O,brand:E&&{...E,top:A.showTopInfo,bottom:A.showBottomInfo},code:v,scoring:g,scoreIndexOffset:T[ae],marks:J,onMarkClick:ee},ae))}):n.jsx("div",{className:"word-table-popup__table",children:n.jsx(Aa,{items:D,orientation:A.orientation,contentTypes:A.contentTypes,baseItem:a,baseContentTypes:r,cutLine:A.cutLine,showOutline:A.showOutline,showDivLine:A.showDivLine,count:A.count,contentRef:ne,fitHeight:!0,scoring:g,marks:J,onMarkClick:ee,brand:E&&{...E,top:A.showTopInfo,bottom:A.showBottomInfo},code:v})})]}):n.jsx("p",{className:"word-table-popup__empty body-3",children:u??k("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsx(Ba,{message:S,position:"top",onClose:P},$)]})}const c_=new Set(["x","triangle"]);function d_(e,t){const a=[];for(let r=0;r<e.length;r++){const s=t[String(r)];s&&c_.has(s)&&a.push(e[r])}return a}const p_=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function Fc(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=p_.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 h_(e,t){const[,a,r]=Co(t).split("-"),s=`${a}.${r}`,{base:l,round:i}=Fc(typeof e=="string"?{name:e}:e),u=i>=2?`${i}\uCC28 `:"";return`${l||"\uB2E8\uC5B4\uD45C"} ${u}\uBCF5\uC2B5 ${s}`}function m_(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:Fc(e).round}}function C_(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 f_(e){return e.map(t=>t.label).join(" / ")}function b_(e){return e.map(t=>t.homonum!=null?`${t.label}#${t.homonum}`:t.label).join(" / ")}function Ic(e){return e.split(" / ").map(t=>t.replace(/#\d+$/,"")).join(" / ")}function g_(e,t,a){const r=Jl(a);return[e.trim(),r,t.trim()].filter(Boolean).join(" \xB7 ")}function Oc(e,t,a){return a===0?0:(e+t*.5)/a}function y_(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:Ic(s),key:s,tried:i,o:l.o,triangle:l.triangle,x:l.x,rate:Oc(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 v_(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),p=c.filter(d=>d==="o").length,h=c.filter(d=>d==="triangle").length;return Oc(p,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 __(e,t=8){return e.filter(a=>a.latest!=="o").slice(0,t)}function x_(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 w_(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)||x_(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,p=`${i.trainingType}|${c}`,h=t.get(p)??{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 d=h.setIds.indexOf(i.setId);d>0&&h.setIds.splice(d,1),d!==0&&h.setIds.unshift(i.setId)}t.set(p,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 B_(e,t=8){return e.filter(a=>!a.latestCorrect).slice(0,t)}function k_(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 bs=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function A_(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=>bs.includes(l.trainingType)).sort(r),word:s.filter(l=>!bs.includes(l.trainingType)).sort(r),noSet:a}}function N_(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 E_(e,t){const a=new Set(e.flatMap(r=>r.covered));return t.filter(r=>!a.has(r))}function D_(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 gs(e,t,a){return typeof e=="string"&&e?e:t.replace(/\{\{(\w+)\}\}/g,(r,s)=>String(a[s]))}function S_(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?gs(Zt.t("customers.duration.minSec",{m:r,s,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:r,s}):r>0?gs(Zt.t("customers.duration.min",{m:r,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:r}):gs(Zt.t("customers.duration.sec",{s,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s})}function j_(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 T_(e,t){return e.map(a=>a.key===t?{...a,pinned:!a.pinned}:a)}function M_(e,t){return e.filter(a=>a.key!==t)}function L_(e,t,a){const r=e.filter(p=>p.pinned),s=new Set(r.map(p=>p.key)),l=e.length-r.length,i=[],u=new Set(s);for(const p of t){if(i.length>=l)break;const h=a(p);u.has(h)||(u.add(h),i.push({key:h,value:p,pinned:!1}))}const c=[...i];return e.map(p=>p.pinned?p:c.shift()).filter(p=>p!==void 0)}function $_(e){return e.map(t=>t.value)}function R_(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(lt,{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 P_(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,p=o.useRef(r);o.useEffect(()=>{p.current=r});const h=o.useRef(!1),d=(t&&t[0]?.key)??null;o.useEffect(()=>{if(l||h.current||!d)return;h.current=!0;const b=i??d;i==null&&u(b),p.current?.(b)},[l,d]);const m=o.useCallback(b=>{const y=c===b?null:b;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(b=>n.jsx(R_,{category:b,isSelected:c===b.key,onClick:()=>m(b.key)},b.key))})}function F_({subs:e=[],selected:t,onSelect:a,size:r="medium"}){const s=r==="small"?32:40;return n.jsx("div",{className:`choice-chips choice-chips--${r}`,children:n.jsx("div",{className:"choice-chips__list",children:e.map(l=>n.jsx(be,{htmlType:"button",size:s,type:"bar",label:l.label,selected:t===l.key,className:"choice-chips__button",onClick:()=>a?.(l.key)},l.key))})})}function I_({onTermsClick:e,onPrivacyClick:t,contact:a}={}){const r=a?.email??"support@ihab.co.kr",s=a?.tel??"031-380-3724",{t:l}=ke.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
1042
1042
  \uC2E0\uB8B0\uB97C \uC313\uACE0
1043
1043
  \uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`).split(`
1044
- `).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:Po,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 F_({logo:e,logoAlt:t="",logoHref:a,links:r=[],actions:s,className:l,containerClassName:i,renderLink:u,menuLabel:c}){const{t:p}=ke.useTranslation(),h=c??{open:p("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:p("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[d,m]=o.useState(!1),b=o.useId(),y=o.useRef(null);o.useEffect(()=>{if(!d)return;const x=ea(()=>{const _=document.getElementById(b);_&&_.contains(document.activeElement)&&y.current?.focus(),m(!1)}),g=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,w=_=>{_.matches&&m(!1)};return g&&(g.matches&&m(!1),g.addEventListener?.("change",w)),()=>{x(),g?.removeEventListener?.("change",w)}},[d,b]);const C=i?`${i} landing-header__inner`:"landing-header__inner",f=(x,g)=>u?u(x,{onClick:g}):n.jsx("a",{href:x.href,onClick:g,"aria-current":x.current?"page":void 0,children:x.label});return n.jsxs("header",{className:l?`landing-header ${l}`:"landing-header",children:[n.jsxs("div",{className:C,children:[e!=null&&(()=>{const x=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:x}):n.jsx("div",{className:"landing-header__brand",children:x})})(),r.length>0&&n.jsx("nav",{className:"landing-header__links",children:r.map((x,g)=>n.jsx("span",{children:f(x)},`${g}:${x.href}`))}),n.jsxs("div",{className:"landing-header__actions",children:[s,r.length>0&&n.jsx("button",{ref:y,type:"button",onClick:()=>m(x=>!x),"aria-expanded":d,"aria-controls":b,"aria-label":d?h.close:h.open,className:d?"landing-header__toggle landing-header__toggle--open":"landing-header__toggle",children:n.jsxs("span",{className:"landing-header__burger",children:[n.jsx("span",{}),n.jsx("span",{}),n.jsx("span",{})]})})]})]}),r.length>0&&n.jsx("nav",{id:b,hidden:!d,className:"landing-header__drawer",children:n.jsx("div",{className:i??void 0,children:r.map((x,g)=>n.jsx("span",{className:"landing-header__drawer-item",children:f(x,()=>m(!1))},`${g}:${x.href}`))})})]})}function I_({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,...lc(a),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function O_({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,x=0)=>{if(!(C>0))return Promise.resolve(!0);const g=a.current;return t.current={phase:f,at:Date.now()-Math.max(0,x)},new Promise(w=>{const _=setTimeout(()=>{r.current===_&&(r.current=null),w(!!e.current&&g===a.current)},C);r.current=_})},[e]),p=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),h=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),d=o.useCallback(()=>{const C=t.current;return C.phase!=="sound"&&C.at>0},[]),m=o.useCallback(()=>a.current,[]),b=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:d,generation:m,isCurrent:b,abort:u,waitPad:c,enterSound:p,leave:h,pause:l,resume:i,__bumpGenerationForTest:y}),[d,m,b,u,c,p,h,l,i,y])}const Ea=9,z_=e=>Math.round(Math.min(Ea,Math.max(0,e))/Ea*100),W_=e=>e/100*Ea,or=2,zc=.1,H_=e=>Math.min(or,Math.max(0,e)),V_=.1,q_=e=>Math.round(e*1e6)/1e6;function sr(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return H_(t);const a=Math.min(Ea,Math.max(0,Number(e.level)||0))/Ea,r=Number(e.mainVolume);return r>0?a>0?q_(Math.min(or,Math.max(V_,a/r))):0:1}const Wc=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function Hc(e){return Wc(e)}function gs(e){return Wc(e)*sr(e)}function ys(e,t=K1()){const a=Number.isFinite(t)&&t>0?t:1;return Math.min(1,gs(e)/a)}function la(e,t){const a={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(a.noiseRatio=sr({level:a.level,mainVolume:a.mainVolume})),a}const ia={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},vs=o.createContext(null);function Tr(){return o.useContext(vs)}const _s=e=>`${G1()}/${e}`,Vc=e=>Array.from({length:10},(t,a)=>_s(`${e}-${String(a+1).padStart(2,"0")}.mp3`)),Mr={get defaultNoise(){return _s("noise1.mp3")},get street(){return Vc("noise2")},get restaurant(){return Vc("noise3")},get buzz(){return _s("noise4.mp3")}};function U_(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return Mr.defaultNoise;case"street":return Mr.street[t];case"restaurant":return Mr.restaurant[t];case"buzz":return Mr.buzz;default:return null}}function G_({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),p=o.useRef(null),h=o.useRef(null),d=o.useRef(null),m=o.useRef(0),b=o.useRef(null),y=o.useCallback(()=>!!r?.isRunning(),[r]),C=o.useCallback(()=>{d.current!==null&&(cancelAnimationFrame(d.current),d.current=null),b.current!==null&&(clearTimeout(b.current),b.current=null)},[]),f=o.useCallback((E,v=250)=>{const N=l.current;if(!N)return;const k=p.current;if(k){p.current=null;try{N.pause()}catch{}N.src=k,N.load()}if(!N.src)return;m.current+=1,C();try{io(),ur(N).then(F=>{if(l.current===N)try{s.current?.("noise",F)}catch{}})}catch{}const D=N.paused?0:cr(N);N.paused&&qn(N,0),N.play().catch(()=>{});const A=performance.now(),B=()=>{const F=Math.min(1,(performance.now()-A)/v);try{qn(N,D+(E-D)*F)}catch{}F<1?d.current=requestAnimationFrame(B):d.current=null};d.current=requestAnimationFrame(B)},[C]),x=o.useCallback((E=250,v)=>{const N=l.current;if(!N||N.paused){v?.();return}const k=++m.current;C();const D=performance.now(),A=cr(N),B=()=>{const F=Math.min(1,(performance.now()-D)/E);try{qn(N,A*(1-F))}catch{}if(F<1)d.current=requestAnimationFrame(B);else{d.current=null,b.current!==null&&(clearTimeout(b.current),b.current=null);try{N.pause()}catch{}v?.()}};d.current=requestAnimationFrame(B),b.current=setTimeout(()=>{if(b.current=null,m.current===k){d.current!==null&&(cancelAnimationFrame(d.current),d.current=null);try{N.paused||(qn(N,0),N.pause(),v?.())}catch{}}},E+150)},[C]);o.useEffect(()=>{const E=document.createElement("audio");return E.loop=!0,E.crossOrigin="anonymous",l.current=E,()=>{C();try{E.pause(),E.removeAttribute("src"),E.load()}catch{}l.current=null,c.current=null,p.current=null}},[C]);const g=e?ys(e.settings):0,w=!!e?.settings.enabled&&g>0;o.useEffect(()=>{if(!w)return;let E=0;const v=setInterval(()=>{const N=l.current;if(!N||N.paused){E=0;return}const k=t.current;if(k&&!k.paused&&!k.ended||y()||a.current==="playing"){E=0;return}E+=1,E>=2&&(E=0,x())},400);return()=>clearInterval(v)},[x,w,t,a,y]),o.useEffect(()=>{const E=()=>{const v=l.current;if(document.hidden){if(v&&!v.paused){C();try{v.pause()}catch{}}return}if(!v||!v.paused)return;const N=t.current,k=!!N&&!N.paused&&!N.ended||y()||a.current==="playing",D=h.current;k&&D?.enabled&&D.volume>0&&f(D.volume)};return document.addEventListener("visibilitychange",E),()=>document.removeEventListener("visibilitychange",E)},[C,f,t,a,y]),o.useEffect(()=>{h.current=e?{enabled:e.settings.enabled,volume:g,type:e.settings.type}:null},[e,e?.settings.enabled,g,e?.settings.type]);const _=o.useRef(null);return o.useEffect(()=>()=>{_.current?.(),_.current=null},[]),o.useEffect(()=>{const E=e?.settings,v=l.current;if(!v)return;const N=E?ys(E):0;if(!E||!E.enabled||N===0){x();return}if(c.current!==E.type){const k=U_(E.type);k&&(c.current=E.type,u(k),p.current=k,x(150,()=>{if(p.current!==k)return;p.current=null,v.src=k,v.load();const D=t.current;if(D&&!D.paused||y()){_.current?.();const A=()=>{v.removeEventListener("canplay",A),_.current===B&&(_.current=null);const F=t.current,L=h.current;(F&&!F.paused&&!F.ended||y())&&L?.enabled&&L.volume>0&&f(L.volume)},B=()=>v.removeEventListener("canplay",A);_.current=B,v.addEventListener("canplay",A)}}))}else{const k=t.current,D=!!k&&!k.paused&&!k.ended||y()||a.current==="playing";if(D&&p.current)f(N);else if(D&&v.paused&&v.src)f(N);else if(!v.paused)if(!D)x();else{C();const A=cr(v),B=performance.now(),F=()=>{const L=Math.min(1,(performance.now()-B)/150);try{qn(v,A+(N-A)*L)}catch{}L<1?d.current=requestAnimationFrame(F):d.current=null};d.current=requestAnimationFrame(F)}}},[e?.settings,e?.settings.enabled,g,e?.settings.type,C,f,x,t,a,h,y]),o.useEffect(()=>{const E=l.current;if(E)try{E.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:x}}function K_({ttsText:e,playbackRate:t,mainVolume:a,fillRef:r,waveProgressRef:s,setProgress:l,setPlaybackState:i,setStateLocal:u,fadeInNoise:c,fadeOutNoise:p,noiseSettingsRef:h,onDoneRef:d,handleEndRef:m}){const b=o.useRef(null),y=o.useRef(0),C=o.useRef(null),f=o.useRef(0),x=o.useRef(!1);o.useEffect(()=>()=>{f.current++;try{if(C.current&&(cancelAnimationFrame(C.current),C.current=null),x.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}x.current=!1}}catch{}},[]);const g=(E,v=1)=>{try{const N=(E||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(E||"").length);return Math.max(700,Math.round(N*300/Math.max(.25,v)))}catch{return 1200}},w=o.useCallback(E=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof d.current=="function"&&d.current(!1)}catch{}return}const v=window.speechSynthesis,N=++f.current;try{try{v.cancel()}catch{}const k=E??e,D=Array.isArray(k)?k.filter(M=>!!M):[k||""];D.length===0&&D.push("");const A=Math.max(.3,Math.min(3,t));y.current=D.reduce((M,O)=>M+g(O,A||1),0),b.current=performance.now(),l(0),i("playing"),u("playMode");const B=h.current;B?.enabled&&(B?.volume??0)>0&&c(B.volume);const F=()=>{try{const M=b.current||performance.now(),O=performance.now()-M,T=y.current||1200,G=Math.min(1,O/T);try{r.current&&(r.current.style.left=`${G*100}%`),s.current&&s.current.style.setProperty("--progress",String(G))}catch{}G<1&&(C.current=requestAnimationFrame(F))}catch{}},L=()=>{if(N===f.current)try{C.current&&(cancelAnimationFrame(C.current),C.current=null),l(1),i("stopped");try{m.current?.()}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{}},q=M=>{const O=new SpeechSynthesisUtterance(D[M]);try{O.rate=A}catch{}try{O.volume=Math.max(0,Math.min(1,a))}catch{}O.onend=()=>{if(N===f.current){if(M<D.length-1){try{q(M+1)}catch{L()}return}L()}},O.onerror=()=>{L()},O.onstart=()=>{if(!(M>0))try{C.current&&(cancelAnimationFrame(C.current),C.current=null),C.current=requestAnimationFrame(F)}catch{}},x.current=!0,v.speak(O)};try{q(0)}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}},[e,t,a,c,r,s,l,i,u,h,d,m]),_=o.useCallback(()=>{f.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}C.current&&(cancelAnimationFrame(C.current),C.current=null),p(),b.current=null}catch{}i("stopped"),u("active"),l(0)},[p,i,u,l]);return{startTTS:w,stopTTS:_}}const Y_=.01,Z_=.3;async function X_(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 b=Math.floor(Z_*i.sampleRate),y=Math.min(u.length,b);for(;c<y&&Math.abs(u[c])<=Y_;)c++;c>=y&&(c=0)}const p=u.length-c,h=a&&a>0?Math.min(p,Math.floor(a*i.sampleRate)):p,d=Math.max(t,h),m=Math.floor(d/t)||1;return new Array(t).fill(0).map((b,y)=>{const C=c+y*m,f=Math.min(C+m,c+d,u.length);let x=0;for(let g=C;g<f;g++){const w=Math.abs(u[g]);w>x&&(x=w)}return x})}catch{return null}finally{try{s?.close?.()}catch{}}}async function qc(e,t,a,r=!1){try{const s=await fetch(e);if(s.ok===!1)return null;const l=await s.arrayBuffer();return await X_(l,t,a,r)}catch(s){try{const l=Hl(s)}catch{}return null}}const xs=45,J_=74,Q_=2;function Lr(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function $r(e){return Lr(e)/45}const ex=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),Uc=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function Gc({durationsSec:e,leadInMs:t=0,tailMs:a=0}){const r=Uc(t),s=Uc(a),l=[];let i=0;return e.forEach((u,c)=>{for(const[p,h]of[["lead",r],["sound",ex(u)],["tail",s]])l.push({kind:p,track:c,startMs:i,durMs:h}),i+=h}),{segments:l,totalMs:i,trackCount:e.length}}function Kc(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 tx(e,t){const a=Kc(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 nx(e,t,a){const r=Math.max(0,Math.floor(a)),s=Kc(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 ax({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 rx({phase:e,phaseElapsedMs:t,currentTime:a,trackDurationSec:r,leadInMs:s,tailMs:l}){const i=Gc({durationsSec:[r],leadInMs:s,tailMs:l});return tx(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(a)?a:0)*1e3:t})}function ox({bars:e,trackDurationSec:t,leadInMs:a,tailMs:r}){return nx(Gc({durationsSec:[t],leadInMs:a,tailMs:r}),0,e)}function sx(e,t){if(!Array.isArray(e))return null;const a=t||0;return a<e.length-1?a+1:null}function lx({ended:e,completedByEnd:t}){return!!e||!!t}function ix(e){return e.map((t,a)=>({src:t.src,label:String(a+1),color:void 0,duration:t.duration||0}))}function ux(e){return e.reduce((t,a)=>t+(a.duration||0),0)}function cx(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 dx(e,t){if(!t||e.readyState<1)return!0;const a=e.currentSrc||e.src;return a?Yc(a)!==Yc(t):!0}function Yc(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const Zc=4,px=$r(Zc/xs);function hx(e){const{src:t,segments:a,progress:r=0,waveProgressRef:s,noiseSrc:l,noiseRatio:i=0,noiseSpeed:u=1,totalDuration:c=0,mainVolume:p=1,onReadyChange:h,showSoundWaveForm:d=!0,leadInMs:m=0,tailMs:b=0,trackDurationSec:y=0}=e,C=o.useRef(null),f=o.useRef(null),[x,g]=o.useState(null),[w,_]=o.useState(!1),[E,v]=o.useState(null),[N,k]=o.useState(2),[D,A]=o.useState(0),[B,F]=o.useState(null),[L,q]=o.useState(!1),[M,O]=o.useState(!1),T=3,G=3,K=1,ee=300,re=o.useRef(0),R=o.useCallback(()=>{const me=C.current,le=f&&f.current?f.current:me?me.closest(".audio-player__wave"):null,Be=le?le.getBoundingClientRect():me?me.getBoundingClientRect():null,Pe=Be?Be.width:0,Fe=Be?Math.max(100,Be.width):320,Ae=Be?Be.height:0,se=Math.max(K,Math.min(ee,Math.floor((Fe+G)/(T+G)))),ye=se*T,Ce=Math.max(0,se-1),xe=Math.max(0,Ce>0?(Fe-ye)/Ce:G);return{bars:se,gap:xe,height:Ae,width:Pe}},[]),J=o.useRef(void 0),ne=o.useRef(null),S=o.useCallback(async(me,le,{quiet:Be=!1}={})=>{const Pe=++re.current,Fe=()=>re.current===Pe;try{if(Be||_(!1),J.current=me,!me){Fe()&&g(null);return}let Ae=le;if(!Ae)try{for(let Ce=0;Ce<4&&!(C.current||f.current);Ce++)await new Promise(xe=>requestAnimationFrame(xe));await new Promise(Ce=>requestAnimationFrame(Ce));const ye=R();ye.height>0&&A(ye.height),Ae=ye.bars,k(ye.gap)}catch{Ae=120}ne.current=Ae;const se=await qc(me,Ae);if(!Fe())return;if(!se){g(null),_(!1);return}g(se),v(Ae),_(!0)}catch{if(!Fe())return;g(null),_(!1)}},[_,g,A,k,v,R]);o.useEffect(()=>{const me=f.current;if(!me||typeof ResizeObserver>"u")return;let le=null;const Be=new ResizeObserver(()=>{le!==null&&cancelAnimationFrame(le),le=requestAnimationFrame(()=>{le=null;try{const Pe=R();if(Pe.width<=0||(Pe.height>0&&A(Pe.height),ne.current===null||Pe.bars===ne.current))return;const Fe=J.current;k(Pe.gap),Fe?S(Fe,Pe.bars,{quiet:!0}).catch(()=>{}):ne.current=Pe.bars}catch{}})});return Be.observe(me),()=>{Be.disconnect(),le!==null&&cancelAnimationFrame(le)}},[R,S]),o.useEffect(()=>{const me=a&&a[0]&&a[0].src||t||a&&a.length===1&&a[0]&&a[0].src;S(typeof me=="string"?me:void 0).catch(()=>{}),O(!1)},[t,a,S]),o.useEffect(()=>{let me=!1;if(q(!1),F(null),!l||!E)return;const le=c>0?c*(u||1):void 0;return qc(l,E,le,!0).then(Be=>{me||(F(Be),Be||q(!0))}).catch(()=>{me||(F(null),q(!0))}),()=>{me=!0}},[l,E,c,u]);const $=Math.max(0,Math.min(1,p)),I=o.useMemo(()=>x&&x.length&&Math.max(...x)||1,[x]),P=E||40,V=o.useMemo(()=>ox({bars:P,trackDurationSec:y,leadInMs:m,tailMs:b}),[P,y,m,b]),ie=o.useMemo(()=>Array.from({length:P}).map((me,le)=>{const Be=le>=V.lead&&le<V.lead+V.sound,Pe=V.sound>0&&Be?Math.min(P-1,Math.round((le-V.lead)/V.sound*P)):-1,Fe=Be?x&&x[Pe]!=null?x[Pe]:null:x?0:null,Ae=Fe==null?null:Math.min(1,Fe/I*$),se=Ae!=null&&D>0&&Lr(Ae)<=Zc,ye=Ae==null?.15:se?0:$r(Ae),Ce=se,xe=P>1?le/(P-1):0;return n.jsx("div",{className:Ce?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":ye,"--i":le,"--mix":xe}},le)}),[P,x,I,$,D,V]),U={"--progress":String(Math.max(0,Math.min(1,r)))},ce=o.useMemo(()=>B&&B.length&&Math.max(...B.map(me=>Number.isFinite(me)?Math.abs(me):0))||1,[B]),Z=$*Math.max(0,i),H=!l||!B||!B.length?1:Math.max(1,Z),te={"--bar-gap":`${N}px`,"--wave-h":`${Lr(H)}px`,"--wave-h1":`${xs}px`},W=w&&(l?!!B||L:!0);o.useEffect(()=>{W&&O(!0)},[W]);const z=M?w:W;o.useEffect(()=>{h?.(z)},[z,h]);const ae=E||40,ve=o.useMemo(()=>Array.from({length:ae}).map((me,le)=>{const Be=B&&B[le]!=null?B[le]:null,Pe=Be==null?0:Math.abs(Be)/ce*Z,Fe=Math.max(px,$r(Pe)),Ae=ae>1?le/(ae-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":Fe,"--i":le,"--mix":Ae}},le)}),[ae,B,ce,Z,D]);return n.jsxs("div",{className:"audio-player__wave",ref:f,style:te,children:[l&&n.jsx("div",{className:`audio-player__wave-noise ${W?"is-ready":""}`,"aria-hidden":"true",children:ve}),d&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${z?"is-ready":""}`,ref:C,children:ie}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${z?"is-ready":""}`,ref:s,style:U,children:ie})]})]})}const Xc={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function ws(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 p=isFinite(s.duration)&&s.duration||0;i(),a(p)},c=p=>{l||(l=!0,i(),t.rejectOnError?r(new Error(p)):a(0))};s.addEventListener("loadedmetadata",u),s.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),t.timeoutMs),s.src=e})}const mx=2e3;function Jc(e,t=mx){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 Cx({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 p=s.current;s.current=[];for(const h of p)h(!0)},[]),i=o.useCallback(()=>{r.current=!1},[]),u=o.useCallback(()=>!e&&!t||r.current?Promise.resolve(!0):new Promise(c=>{const p=d=>{clearTimeout(h),s.current=s.current.filter(m=>m!==p),c(d)},h=setTimeout(()=>p(!0),a);s.current.push(p)}),[e,t,a]);return o.useEffect(()=>()=>{const c=s.current;s.current=[];for(const p of c)p(!1)},[]),{onReadyChange:l,waitForReady:u,markNotReady:i}}function fx(){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 bx({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 gx(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 yx=400,vx=2e3,Qc=5;function _x({audioRef:e,fillRef:t,waveProgressRef:a,sourcesRef:r,currentIndexRef:s,sequencer:l,leadInMs:i=0,tailMs:u=0}){const c=o.useRef(null),p=o.useRef(0),h=o.useRef(null),d=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(Wn){const f=typeof performance<"u"&&performance.now?performance.now():Date.now();if(y>0&&f-y>yx){const x=h.current===null||f-h.current>vx;if(h.current=f,x&&p.current<Qc){p.current+=1;const g=p.current;let w=null;try{w=typeof document<"u"?document.visibilityState:null}catch{}Dt(`progress-ticker-slow-frames#${g}`,`[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.",g>=Qc?`(${g}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${g}\uBC88\uC9F8)`)}}y=f}try{const f=e.current,x=Array.isArray(r.current)?r.current[s.current||0]:void 0,g=!!x&&Number.isFinite(x.duration)&&(x.duration??0)>0,w=g?0:gx(f),_=t.current,E=(i||0)>0||(u||0)>0,v=E&&(l?.positionRef.current?.phase??"sound")!=="sound";if(w===null&&!v)try{_&&_.style.visibility!=="hidden"&&(_.style.visibility="hidden")}catch{}else{const N=g?x.duration:w||0;Wn&&v&&!(N>0)&&Dt("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 k=E?rx({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}):ax({currentTime:f&&typeof f.currentTime=="number"?f.currentTime:0,sources:r.current,index:s.current,audioDuration:w??0});try{_&&(_.style.visibility&&(_.style.visibility=""),_.style.left=`${k*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(k))}catch{}}}catch{}c.current=requestAnimationFrame(C)};c.current=requestAnimationFrame(C)},[e,t,a,r,s,l,i,u]),b=o.useCallback(y=>{d();try{t.current&&(t.current.style.visibility="",t.current.style.left=`${y*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(y))}catch{}},[d,t,a]);return o.useEffect(()=>d,[d]),{start:m,stop:d,settleTo:b}}function Bs({btnLabel:e,soundSrc:t,bucketPath:a,onDone:r,disabled:s=!1,ttsText:l=null,className:i,showSoundWaveForm:u=!0,showNoiseWaveForm:c=!0,leadInMs:p=0,tailMs:h=0}){const{t:d}=ke.useTranslation(),m=e,b=Tr(),y=o.useRef(b?.registerAnalyser);o.useEffect(()=>{y.current=b?.registerAnalyser});const C=o.useRef(null),f=o.useRef(null),x=o.useRef(null),g=fx(),w=o.useRef(null),_=o.useRef(!1),E=o.useRef(null),{ref:v,rect:N,show:k,hide:D}=bx();o.useEffect(()=>()=>{y.current?.("main",null),y.current?.("noise",null)},[]);const[A,B]=o.useState(!1),[F,L]=o.useState("idle"),[q,M]=o.useState("stopped"),O=o.useRef("stopped");o.useEffect(()=>{O.current=q},[q]);const[T,G]=o.useState(0),[K,ee]=o.useState("active"),re=o.useRef(!1);o.useEffect(()=>{if(K!=="playMode"||!re.current)return;re.current=!1;const Y=typeof document<"u"?document.activeElement:null;if(Y&&Y!==document.body)return;const pe=x.current?.querySelectorAll("button")[1];try{pe?.focus()}catch{}},[K]);const[R,J]=o.useState(null),[ne,S]=o.useState(null),[$,I]=o.useState(0),[P,V]=o.useState(!1),[ie,U]=o.useState(0),ce=b?.playbackRate??1,Z=b?.mainVolume??1,H=b?gs(b.settings):0,te=b?Hc(b.settings):Z,[W,z]=o.useState("idle"),[ae,ve]=o.useState(""),[me]=o.useState("top"),le=o.useRef(null),Be=o.useRef(0),Pe=o.useRef(null),Fe=o.useRef(!0),Ae=O_({mountedRef:Fe}),se=o.useRef(null),ye=o.useRef(p),Ce=o.useRef(h);o.useEffect(()=>{ye.current=Math.max(0,p||0)},[p]),o.useEffect(()=>{Ce.current=Math.max(0,h||0)},[h]);const{start:xe,stop:$e,settleTo:nt}=_x({audioRef:C,fillRef:f,waveProgressRef:Pe,sourcesRef:le,currentIndexRef:Be,sequencer:Ae,leadInMs:p,tailMs:h}),{onReadyChange:ct,waitForReady:at,markNotReady:rt}=Cx({showSoundWaveForm:u,showNoiseWaveForm:c}),Ee=o.useRef(null),Ue=o.useRef(s),Ne=o.useRef(r),Ye=o.useRef(null),et=o.useRef(!1),[ft,vt]=o.useState(!1),dt=o.useCallback(Y=>{et.current=Y,vt(Y)},[]),jt=o.useRef(null),{activeNoiseUrl:ot,noiseSettingsRef:st,fadeInNoise:At,fadeOutNoise:Nt}=G_({noisePlayer:b,audioRef:C,playbackStateRef:O,sequencer:Ae}),{startTTS:Ot,stopTTS:Wt}=K_({ttsText:l,playbackRate:ce,mainVolume:te,fillRef:f,waveProgressRef:Pe,setProgress:G,setPlaybackState:M,setStateLocal:ee,fadeInNoise:At,fadeOutNoise:Nt,noiseSettingsRef:st,onDoneRef:Ne,handleEndRef:jt});o.useEffect(()=>{wt.current=Wt});const xt=Y=>{if(typeof window>"u"||!window.speechSynthesis){try{ve(d("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}Ot(Y);return}Je("tts"),Ot(Y)},it=Array.isArray(t)?t.filter(Boolean):t?[t]:[],bt=(!it||it.length===0)&&!!l,pt=Array.isArray(R)&&R.length>0?R:Array.isArray(ne)&&ne.length>0?ne:null,kt=Math.max(Array.isArray(pt)?pt.length:0,it.length);o.useEffect(()=>(Fe.current=!0,()=>{Fe.current=!1}),[]);const mt=()=>{Ae.abort()},wt=o.useRef(null),de=o.useRef(null),Le=o.useRef(null),Se=o.useRef(null);Se.current||(Se.current=()=>{Le.current=null;const Y=C.current;if(de.current==="audio"&&Y&&(!Y.paused||Ae.isRunning())){mt();try{Y.pause()}catch{}Fe.current&&(M("paused"),$e(),Nt())}else if(de.current==="tts")try{wt.current?.()}catch{}});const Je=Y=>{de.current=Y,Le.current=Xa(Se.current)},ht=()=>{Le.current?.(),Le.current=null};o.useEffect(()=>()=>{Se.current&&Br(Se.current)},[]);const Rt=o.useRef(ce);o.useEffect(()=>{Rt.current=ce||1},[ce]);const Me=o.useCallback(Y=>{const pe=Rt.current||1;try{Y.defaultPlaybackRate=pe}catch{}try{Y.playbackRate=pe}catch{}},[]),tt=o.useCallback((Y,pe)=>{if(!dx(Y,pe)){try{Y.currentTime=0}catch{}Me(Y);return}Y.src=pe,Me(Y),Y.load(),Me(Y)},[Me]),Ft=o.useCallback(()=>{Ye.current&&(clearTimeout(Ye.current),Ye.current=null),z("idle")},[]),_t=o.useCallback(async(Y,pe=3,je=50,qe=0)=>{Ft();const Ge=Ae.generation(),Xe=!!Y&&Y.currentTime>0&&!Y.ended,gt=Math.max(0,ye.current-Math.max(0,qe));if(gt>0&&!Xe){Je("audio"),xe(),M("playing");const Ct=st.current;if(Ct?.enabled&&(Ct.volume??0)>0)try{At(Ct.volume)}catch{}if(!await Ae.waitPad(gt,"lead",qe)||!Fe.current||!Ae.isCurrent(Ge))return!1}Ae.enterSound();for(let Ct=0;Ct<pe;Ct++){if(!Fe.current||!Ae.isCurrent(Ge))return!1;try{return Je("audio"),await Y.play(),!0}catch(ge){if((ge instanceof Error||typeof ge=="object"&&ge&&"name"in ge?ge.name:void 0)==="AbortError"){if(!Ae.isCurrent(Ge))return!1;await new Promise(j=>setTimeout(j,je));continue}try{ve(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{ve(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[d,xe,Ae,At,st,Ft]),Q=o.useCallback(Y=>{const pe=Ae.generation(),je=Math.max(0,Ce.current-Math.max(0,Y));xe();const qe=st.current;if(qe?.enabled&&(qe.volume??0)>0)try{At(qe.volume)}catch{}const Ge=()=>{try{se.current?.()}catch{}};if(je<=0){Ae.leave(),Ge();return}Ae.waitPad(je,"tail",Y).then(Xe=>{Ae.leave(),Xe&&Ae.isCurrent(pe)&&Ge()}).catch(()=>{})},[Ae,xe,At,st]),_e=o.useCallback(()=>{const Y=C.current;if(!Y)return;const pe=()=>{M("playing"),ee("playMode"),V(!0),xe();try{io(),ur(Y).then(Xe=>{if(Fe.current)try{y.current?.("main",Xe)}catch{}})}catch{}const Ge=st.current;Ge?.enabled&&(Ge?.volume??0)>0&&At(Ge.volume)},je=()=>{lx({ended:!!Y?.ended,completedByEnd:et.current})||(M("paused"),$e(),Nt())},qe=()=>{const Ge=()=>{try{const Xe=le.current,gt=sx(Xe,Be.current);if(gt!==null){Be.current=gt,I(gt),V(!0);const Ct=Xe?.[gt]&&Xe[gt].src;if(Ct&&Y){tt(Y,Ct),_t(Y).catch(()=>{});return}}}catch{}M("stopped"),G(1);try{if(Y)try{Y.currentTime=0}catch{}}catch{}$e(),V(!1),Nt();try{!Ue.current&&jt.current&&jt.current()}catch{}};if(se.current=Ge,Ce.current>0){xe(),Ae.waitPad(Ce.current,"tail").then(Xe=>{Ae.leave(),Xe&&Ge()}).catch(()=>{});return}Ge()};return Y.addEventListener("play",pe),Y.addEventListener("pause",je),Y.addEventListener("ended",qe),()=>{try{Y.removeEventListener("play",pe),Y.removeEventListener("pause",je),Y.removeEventListener("ended",qe),$e()}catch{}}},[At,Nt,_t,st,xe,$e,Ae]);o.useEffect(()=>_e(),[_e]),o.useEffect(()=>{Ue.current=s},[s]),o.useEffect(()=>{Ne.current=r},[r]),o.useEffect(()=>{if(s||K!=="active")return;const Y=E.current;if(!Y)return;let pe=null;const je=requestAnimationFrame(()=>{try{const qe=Y.getTotalLength();if(!qe)return;const Ge=qe*.2;Y.style.strokeDasharray=`${qe-Ge} ${Ge}`;const Xe="triFlow_"+Math.random().toString(36).slice(2);pe=document.createElement("style"),pe.textContent=`@keyframes ${Xe}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${qe}}}`,document.head.appendChild(pe),Y.style.animation=`${Xe} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(je),pe?.remove()}},[K,s]),o.useEffect(()=>{le.current=R},[R]),o.useEffect(()=>{Be.current=$},[$]),o.useEffect(()=>{const Y=x.current,pe=w.current;if(!Y||!pe)return;let je=null;const qe=32,Ge=60,Xe=()=>{try{const Ct=Array.from(Y.querySelectorAll(":scope > .button"));let ge=0;Ct.forEach(We=>{if(We===pe)return;const Ke=We.getBoundingClientRect();ge+=Ke.width});const j=Y.getBoundingClientRect().width,X=Math.max(0,Math.floor(j-ge-8)),fe=kt;if(!fe||X<=0){Array.from(pe.children).forEach(We=>{try{We.style.width=""}catch{}});return}let Re=Math.floor(X/fe);Re>Ge&&(Re=Ge),Re<qe&&(Re=Math.max(qe,Math.floor(X/fe))),Array.from(pe.querySelectorAll(".button")).forEach(We=>{try{We.style.width=`${Re}px`}catch{}})}catch{}},gt=requestAnimationFrame(Xe);try{je=new ResizeObserver(()=>{requestAnimationFrame(Xe)}),je.observe(Y),je.observe(pe),window.addEventListener("resize",Xe)}catch{}return()=>{try{cancelAnimationFrame(gt)}catch{}try{je&&(je.disconnect(),je=null)}catch{}try{window.removeEventListener("resize",Xe)}catch{}}},[R,ne,kt]),o.useEffect(()=>()=>{try{Ee.current&&(clearTimeout(Ee.current),Ee.current=null),Ye.current&&(clearTimeout(Ye.current),Ye.current=null)}catch{}},[]);const Oe=(Y,pe)=>{J(Y),U(pe),rt(),S(ix(Y)),le.current=Y},Ve=()=>{ee("playMode"),I(0),V(!0)},Bt=async(Y,pe)=>{dt(!1),_.current=!1,tt(Y,pe),await Jc(Y),await at()!==!1&&(B(!1),Ve(),await _t(Y))},Qe=async(Y,pe=!1)=>{const je=C.current;B(!0),L("measuring_duration");try{const qe=await ws(Y,{timeoutMs:1e4,rejectOnError:!0});Oe([{src:Y,objectUrl:null,duration:qe}],qe),L("ready"),pe&&je&&await Bt(je,Y)}finally{_.current=!1,B(!1)}},zt=async(Y,pe=!1)=>{const je=C.current;B(!0),L("measuring_duration");try{const qe=await Promise.all(Y.map(Xe=>ws(Xe,{timeoutMs:1e4})));if(!Fe.current)return;const Ge=Y.map((Xe,gt)=>({src:Xe,objectUrl:null,duration:qe[gt]||0}));Oe(Ge,ux(Ge)),L("ready"),pe&&je&&Ge.length>0&&await Bt(je,Ge[0].src)}finally{_.current=!1,B(!1)}},Ht=async(Y=!1,pe=!0)=>{const je=C.current,qe=t?Array.isArray(t)?t:[t]:[];if(!qe||qe.length===0||!qe.some(Boolean))return!1;if(_.current)return null;_.current=!0,pe&&B(!0),L("resolving");try{const Ge=cx(t,a,Nl),Xe=[];let gt=0;for(const Ct of Ge){let ge=Ct.src??null,j=null;if(!ge&&Ct.resolvedPath){try{L("getting_signed_url"),ge=await El(Ct.resolvedPath)}catch{ge=null}if(!Fe.current)return!1;if(!ge)try{L("downloading");const fe=await Dl(Ct.resolvedPath);if(!Fe.current)return!1;if(fe){const Re=fe instanceof Blob?fe:new Blob([fe]);j=g.track(URL.createObjectURL(Re)),ge=j}}catch{L("error");try{ve(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),ee("active")}catch{}}}if(!ge)continue;let X=0;try{L("measuring_duration"),X=await ws(ge,{timeoutMs:3e3})}catch{X=0}if(!Fe.current){if(j)try{URL.revokeObjectURL(j)}catch{}for(const fe of Xe)if(fe.objectUrl)try{URL.revokeObjectURL(fe.objectUrl)}catch{}return!1}gt+=X||0,Xe.push({...Ct,src:ge,objectUrl:j,duration:X})}if(Oe(Xe,gt),Xe.length>0&&Y&&je){const Ct=Xe[0];dt(!1);try{g.keepOnly(Xe.map(ge=>ge.objectUrl))}catch{}if(L("ready"),_.current=!1,Ct.src&&je)try{if(tt(je,Ct.src),await Jc(je),await at()===!1)return!1;pe&&B(!1),Ve(),je&&await _t(je)}catch{pe&&B(!1)}else pe&&B(!1);ee("playMode"),I(0),V(!0)}return Xe.length>0}finally{_.current=!1,pe&&B(!1),L(Ge=>Ge==="ready"?"ready":"idle")}},cn=async Y=>{const pe=Ae.isRunning();if(Y.paused&&!pe){if(et.current){await Tt();return}const je=Ae.resume();if(je){if(M("playing"),je.phase==="tail"){Q(je.elapsed);return}await _t(Y,3,50,je.elapsed);return}await _t(Y),M("playing")}else Ae.pause(),mt(),Y.pause(),M("paused"),pe&&($e(),Nt())},Yt=async()=>{const Y=C.current;if(!(!Y&&!bt)){if(bt){const pe=window.speechSynthesis;if(K==="active"){const je=$a(),qe=Array.isArray(l)?l.filter(Boolean):l?[l]:[];if(je&&qe.length>0){if(_.current)return;ee("load"),B(!0),L("synthesizing"),_.current=!0;try{const Ge=await Promise.all(qe.map(Xe=>Promise.resolve(je(Xe))));Ge.length>1?await zt(Ge,!0):await Qe(Ge[0],!0)}catch{_.current=!1,B(!1),ee("active"),xt(qe.length>0?qe:void 0)}return}xt(qe.length>0?qe:void 0);return}if(K==="playMode"){const je=!!pe&&(pe.speaking||pe.paused)&&!(Y&&(Y.currentSrc||Y.getAttribute("src")));if(Y&&!je){await cn(Y);return}try{if(pe&&pe.paused)try{Je("tts"),pe.resume(),M("playing")}catch{}else try{pe.pause(),M("paused")}catch{}}catch{}}return}if(K==="active"){if(s&&Array.isArray(le.current)&&le.current.length>0){const je=le.current[0];try{if(je.src&&Y)try{tt(Y,je.src),Ve(),Y&&await _t(Y)}catch{}Ve();return}catch{}}ee("load");let pe;try{pe=await Ht(!0)}catch{pe=!1}if(pe===!1&&Fe.current){try{ve(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}ee("active")}return}if(K!=="load"&&(K==="playMode"||K==="active"))try{Y&&await cn(Y)}catch(pe){(pe instanceof Error||typeof pe=="object"&&pe&&"name"in pe)&&pe.name}}},Tt=async()=>{const Y=C.current;if(Y)try{const pe=le.current;if(Array.isArray(pe)&&pe.length>1){await St(0);return}dt(!1);try{Y.currentTime=0}catch{}Y&&await _t(Y),M("playing"),ee("playMode")}catch{}},Jt=()=>{mt(),ht(),wt.current?.();const Y=C.current;try{if(Y){try{Y.pause()}catch{}try{Y.currentTime=0}catch{}}}catch{}Nt(),M("stopped"),ee("active"),G(0),V(!1)},en=async(Y,{sameSegment:pe=!1}={})=>{mt();const je=Ae.generation(),qe=C.current,Ge=le.current?.[Y]?.src;try{if(dt(!1),I(Y),V(!0),Be.current=Y,!Ge||!qe||(pe||rt(),tt(qe,Ge),!pe&&await at()===!1)||!Ae.isCurrent(je)||(await _t(qe),!Ae.isCurrent(je)))return;M("playing"),ee("playMode")}catch{}},An=async()=>{const Y=le.current,pe=Be.current||0;if(!Y||pe<=0){await Tt();return}await en(pe-1)},Nn=async()=>{const Y=le.current,pe=Be.current||0;if(!Y||pe>=Y.length-1){Jt();return}await en(pe+1)},gn=()=>{if(et.current)return;const Y=200,pe=340;dt(!0),mt(),ht();try{G(1)}catch{}nt(1);try{z("hold")}catch{}try{const je=C.current,qe=bt&&!!je?.src;if(!bt||qe){if(je){je.pause();try{je.currentTime=0}catch{}}}else Wt();Nt()}catch{}try{M("stopped")}catch{}if(V(!1),!Ue.current)try{Ye.current&&(clearTimeout(Ye.current),Ye.current=null),Ye.current=setTimeout(()=>{try{z("out")}catch{}Ye.current=setTimeout(()=>{try{typeof Ne.current=="function"&&Ne.current(!0)}catch{}try{z("idle")}catch{}Ye.current=null},pe)},Y)}catch{}};o.useEffect(()=>{jt.current=gn});const Pt=o.useCallback(()=>ve(""),[]),St=async Y=>{(le.current||[])[Y]&&await en(Y,{sameSegment:Y===Be.current})},Mt=q==="playing",Gt=o.useMemo(()=>{if(!ne||ne.length<=1)return ne;const Y=ne[$];return Y?[Y]:ne},[ne,$]),dn=s===!0;o.useEffect(()=>{try{const Y=C.current;Y&&typeof Y.playbackRate=="number"&&Me(Y)}catch{}},[ce,Me]);const yn=o.useRef({raf:null,timer:null});o.useEffect(()=>{const Y=C.current;if(!Y)return;const pe=Math.max(0,Math.min(1,te)),je=yn.current,qe=()=>{je.raf!==null&&(cancelAnimationFrame(je.raf),je.raf=null),je.timer!==null&&(clearTimeout(je.timer),je.timer=null)};qe();const Ge=cr(Y);if(Y.paused||Math.abs(Ge-pe)<.001||typeof requestAnimationFrame!="function"){try{qn(Y,pe)}catch{}return}const Xe=performance.now(),gt=()=>{const Ct=Math.min(1,(performance.now()-Xe)/150);try{qn(Y,Ge+(pe-Ge)*Ct)}catch{}je.raf=Ct<1?requestAnimationFrame(gt):null};return je.raf=requestAnimationFrame(gt),je.timer=setTimeout(()=>{qe();try{qn(Y,pe)}catch{}},200),qe},[te]);const Vt=W==="hold",En=W==="out",he=K==="playMode"&&!A&&!ft||Vt||En,Te=q!=="stopped"||Vt||En,ze=q==="paused",Ze=Math.max(0,Math.min(100,(T||0)*100)),He=De("audio-player__fill",he?"is-visible":"",Te?"is-expanded":"",ze?"is-paused":"",En?"is-out":"");return n.jsxs("div",{className:`audio-player ${dn?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof m=="string"?m:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${Mt?"is-playing":""} ${A?"is-loading":""} ${K!=="default"?"is-revealed":""}`,children:[A?n.jsxs("div",{className:"audio-player__loading",role:Xc[F]?"status":void 0,"aria-live":Xc[F]?"polite":"off",children:[n.jsx("span",{className:"audio-player__loading-spinner","aria-hidden":"true"}),n.jsx("span",{className:"audio-player__loading-text",children:d("training.audioStatus.preparing",{defaultValue:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"})})]}):null,K==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:dn,onClick:()=>{re.current=Nr(),D(),Yt()},"aria-label":typeof m=="string"?m:d("training.listen","\uB4E3\uAE30"),onMouseEnter:k,onMouseLeave:D,onFocus:k,onBlur:D,children:n.jsx("span",{ref:v,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:E,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(Ln,{anchorRect:N,text:typeof m=="string"&&m?m:d("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${K==="playMode"||Mt?"is-visible":""}`,inert:!(K==="playMode"||Mt)||void 0,children:[n.jsxs("div",{ref:x,className:"audio-player__buttons",children:[n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:An,ariaLabel:d("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:K!=="playMode"}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:Mt?"pause":"play",onClick:Yt,ariaLabel:d("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":Mt,width:"60px",variant:"transparent-white",disabled:K!=="playMode"}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:Jt,ariaLabel:d("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:K!=="playMode"}),kt>1?n.jsx("div",{ref:w,className:"audio-player__source-buttons",children:Array.from({length:kt}).map((Y,pe)=>n.jsx(be,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(pe+1),onClick:()=>{try{St(pe)}catch{}},ariaLabel:d("training.sourcePlay",{n:pe+1}),variant:"transparent-white",selected:P&&$===pe,disabled:K!=="playMode"||!(Array.isArray(R)&&R[pe]),showTooltipInfo:!0},pe))}):null,!Array.isArray(R)||R.length<=1?n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:Tt,ariaLabel:d("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:K!=="playMode"}):null,n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:Nn,ariaLabel:d("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:K!=="playMode"}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:gn,ariaLabel:d("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:K!=="playMode"})]}),n.jsxs("div",{className:"audio-player__slider",children:[n.jsx("div",{className:He,ref:f,style:{left:`${Ze}%`},"aria-hidden":"true"}),(u||c)&&n.jsx(hx,{segments:Gt,progress:T,totalDuration:ie,waveProgressRef:Pe,showSoundWaveForm:u,leadInMs:p,tailMs:h,trackDurationSec:R?.[$]?.duration??0,noiseSrc:c&&b?.settings.enabled&&H>0?ot:null,noiseRatio:b?sr(b.settings):0,noiseSpeed:b?.settings.speed??1,mainVolume:Z,onReadyChange:ct})]})]}),n.jsx("audio",{ref:C,crossOrigin:"anonymous",preload:"auto"})]}),!u&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(lt,{icon:"triangle-alert",size:14}),d("training.noSoundWaveform","\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.")]}),n.jsx(Ba,{message:ae,position:me,onClose:Pt})]})}function Rr(e){const{t}=ke.useTranslation(),{text:a,label:r,anchorRect:s=null,onClose:l,closeOnOutsideClick:i=!0,isMobilePopup:u=!1}=e||{},[c,p]=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:d,canIncrease:m,canDecrease:b,fontSize:y,lineHeight:C}=Hi({storageKey:"tooltip-fontScale"}),f=o.useCallback(()=>p(E=>E==="dark"?"light":"dark"),[]),x=o.useCallback(E=>{try{E.stopPropagation()}catch{}try{typeof l=="function"&&l()}catch{}},[l]),g=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"},_=n.jsxs("div",{className:ue(`text-box-tooltip__root ${c==="dark"?"is-dark":""}`),children:[n.jsxs("div",{className:ue("text-box-tooltip__box"),children:[r&&n.jsx("div",{className:ue("text-box-tooltip__label body-2b"),children:r}),n.jsx("div",{className:ue("text-box-tooltip__text body-1"),style:w,children:g.map((E,v)=>n.jsxs("div",{className:ue("text-box-tooltip__line"),children:[g.length>1?n.jsx("div",{className:ue("text-box-tooltip__marker"),children:n.jsx("span",{className:ue("text-box-tooltip__line-number button-1"),children:v+1})}):null,n.jsx("span",{className:ue("text-box-tooltip__line-text"),children:E})]},v))})]}),n.jsxs("div",{className:ue("text-box-tooltip__buttons"),children:[n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"minus",onClick:d,ariaLabel:t("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!b}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"plus",onClick:h,ariaLabel:t("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!m}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:c==="dark"?"moon":"sun-medium",onClick:f,ariaLabel:t("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:c==="dark"?"transparent-white":"transparent-gray"}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"x",onClick:x,ariaLabel:t("common.close","\uB2EB\uAE30"),variant:c==="dark"?"transparent-white":"transparent-gray"})]})]});return s?n.jsx(Bn,{anchorRect:s,className:ue(`text-box-tooltip ${c==="dark"?"is-dark":""}`),onClose:l,closeOnOutsideClick:i,isMobilePopup:u,ariaLabel:r||t("tooltip.textbox","\uBCF8\uBB38"),children:_}):n.jsx("div",{className:ue(`text-box-tooltip ${c==="dark"?"is-dark":""}`),children:_})}function ed({state:e="disabled"}){const{t}=ke.useTranslation();return n.jsxs("div",{className:`ts-bullet ts-bullet--${e}`,"aria-hidden":!0,children:[n.jsx("div",{className:"bullet__dot",children:n.jsx(lt,{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 td(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(),p=c?Array.from(c.querySelectorAll(Dn)).find(h=>!h.closest('[aria-hidden="true"]')):void 0;if(p){try{p.focus()}catch{}if(document.activeElement===p)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 p=s.current();if(p)try{p.focus()}catch{}}}},[e])}function nd({title:e,children:t,className:a="",state:r="disabled",usePreviewTextBtn:s=!1,onPreviewTextBtn:l,previewText:i=null,useFaded:u,usePlayAllBtn:c=!1,onPlayAll:p,playAllActive:h=!1}){const{t:d}=ke.useTranslation(),m=vn("(max-width: 767px)"),b=`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,x]=o.useState(!1),[g,w]=o.useState(null),[_,E]=o.useState(null);td(f&&!!g,()=>{if(typeof document>"u")return null;const A=Array.from(document.querySelectorAll(".tooltip__content"));for(let B=A.length-1;B>=0;B--)if(A[B].querySelector(".text-box-tooltip__root"))return A[B];return null},()=>C.current?.querySelector("button")??null);const v=o.useRef(l);o.useEffect(()=>{v.current=l});const N=o.useMemo(()=>i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)&&i.every(A=>typeof A=="string"||typeof A=="number")?i.join(""):"",[i]),k=o.useCallback(()=>{x(!1),w(null),E(null)},[]);o.useEffect(()=>{if(!f)return;let A;try{typeof v.current=="function"&&(A=v.current())}catch{}if(A===!1){k();return}E(typeof A<"u"&&A!==null?A:null)},[N]);const D=o.useCallback(()=>{let A;try{typeof l=="function"&&(A=l())}catch{}if(A!==!1){if(E(typeof A<"u"&&A!==null?A:i),!C.current){x(B=>!B);return}if(f)x(!1),w(null),E(null);else{const B=C.current.getBoundingClientRect();w(B),x(!0)}}},[l,i,f]);return n.jsxs("div",{className:y,children:[n.jsx("p",{className:b,children:n.jsx("span",{className:"training-step__title-text",children:e??t})}),s||c?n.jsxs("div",{className:"title-controls",children:[n.jsxs("div",{className:"title-buttons",children:[c&&n.jsx(be,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"play-circle",label:m?void 0:d("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),ariaLabel:d("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),selected:h,onClick:p,variant:r==="disabled"?"disabled":"default",disabled:r==="disabled"||h,onDisabledClick:h&&r!=="disabled"?()=>{}:void 0}),s&&n.jsx("div",{ref:C,children:n.jsx(be,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"eye",label:m?void 0:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:d("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(Rr,{text:_??i,label:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:g,onClose:k,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function ks(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function ua({index:e,stepIndex:t,isLast:a=!1,title:r="",titleProps:s={},children:l,className:i="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:p}){const{t:h}=ke.useTranslation(),[d,m]=o.useState(()=>ks(e,t));o.useEffect(()=>{const v=ks(e,t);if(v!==d){const N=setTimeout(()=>m(v),0);return()=>clearTimeout(N)}},[e,t,d]);const b=o.useCallback((...v)=>{ks(e,t)==="done"||d==="done"||typeof u=="function"&&u(...v)},[e,t,d,u]),[y,C]=o.useState(!1),[f,x]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),g=o.useCallback(v=>{if(!v)return null;try{const N=v;if(typeof v=="object"&&(N.currentTarget||N.target)&&(N.nativeEvent||N.type)){const A=N.currentTarget??N.target;if(A&&typeof A.getBoundingClientRect=="function")return A.getBoundingClientRect()}if(v instanceof DOMRect)return v;const k=v;if(k&&typeof k.getBoundingClientRect=="function")return k.getBoundingClientRect();const D=v?.current;return D&&typeof D.getBoundingClientRect=="function"?D.getBoundingClientRect():null}catch{return null}},[]),w=o.useCallback((v,{text:N="",label:k="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:D=!1,alignX:A="center",alignY:B="top"}={})=>{const F=g(v);x({text:N,label:k,anchorRect:F,backdrop:D,alignX:A,alignY:B}),C(!0)},[g]),_=o.useCallback(()=>{C(!1),x(v=>({...v,anchorRect:null}))},[]),E=o.Children.map(l,v=>{if(o.isValidElement(v)){const N=v;if(typeof N.type=="string")return N;const k=N.props??{},D=typeof k.onDone=="function"?k.onDone:b,A=typeof k.disabled=="boolean";let B=d==="disabled";return A&&(B=!!k.disabled),o.cloneElement(N,{onDone:D,disabled:B,showTooltip:w,hideTooltip:_})}return v});return n.jsxs("div",{className:`training-step training-step--${d} ${a?"training-step--last":""} ${i}`,"aria-current":d==="active",children:[n.jsx(ed,{state:d}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(nd,{state:d,title:r,...s,useFaded:c}),d==="disabled"&&p&&typeof e=="number"&&typeof t=="number"&&e===t+1&&n.jsx("p",{className:"training-step__locked-hint caption-1",role:"status",children:p}),E]}),y?n.jsx(Bn,{anchorRect:f.anchorRect,backdrop:f.backdrop,onClose:_,ariaLabel:h("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(Rr,{text:f.text,onClose:_})}):null]})}function ad({context:e,state:t="disabled",theme:a="light"}){const{t:r}=ke.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:p,decrease:h,canIncrease:d,canDecrease:m,fontSize:b,lineHeight:y}=Hi({storageKey:"textbox_fontScale"}),[C,f]=o.useState(""),x=o.useRef(null),g=o.useRef(!1),w=o.useCallback(()=>{g.current=Nr()&&!!x.current&&x.current.contains(document.activeElement),l("active")},[]),_=o.useCallback(()=>f(""),[]),E=L=>{try{f(L)}catch{}},v=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 N=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[k,D]=o.useState(N);k!==N&&(D(N),l("disabled"));const A=t==="disabled"?s:t,B=A==="disabled"?"training-text-box--disabled":A==="active"?"training-text-box--active":A==="done"?"training-text-box--done":"",F=o.useMemo(()=>({fontSize:`${b}px`,lineHeight:`${y}px`}),[b,y]);return o.useEffect(()=>{if(A==="disabled"||!g.current)return;g.current=!1;const L=document.activeElement;L&&L!==document.body||x.current?.querySelector(".training-text-box__buttons button")?.focus()},[A]),n.jsxs("div",{ref:x,className:`training-text-box ${B} ${A!=="disabled"&&i==="dark"?"is-dark":""}`,children:[A==="disabled"&&n.jsx("div",{className:"training-text-box__preview",children:n.jsx(be,{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":A==="disabled",children:n.jsx("span",{className:"training-text-box__inner h3",style:F,children:N})}),A!=="disabled"&&n.jsxs("div",{className:"training-text-box__buttons","aria-hidden":A==="disabled",children:[n.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:h,onDisabledClick:()=>E(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,...!v&&{width:"60px"}}),n.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:p,onDisabledClick:()=>E(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:!d,useBorder:!1,showTooltipInfo:!0,...!v&&{width:"60px"}}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:i==="dark"?"moon":"sun-medium",onClick:c,ariaLabel:r("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:i==="dark"?"transparent-white":"transparent-gray"})]}),n.jsx(Ba,{message:C,position:"top",onClose:_})]})}function ca(e){return e==="active"||e==="done"}function As({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,useTitleFaded:l,onDone:i,onChange:u,answer:c,wrongAnswers:p,choices:h,multiSelect:d=!1,correctCount:m=0,useDisabledCovered:b=!1,choiceIcons:y,shuffleChoices:C=!0}){const{t:f}=ke.useTranslation(),x=s??f("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),g=typeof e=="number"?e:-1,w=typeof t!="number"?"disabled":g<t?"done":g===t?"active":"disabled",_=Array.isArray(h)&&h.length?h:typeof c<"u"?[c].concat(Array.isArray(p)?p:[]):void 0,E=p?p.join("||"):"",v=h?h.join("||"):"",[N,k]=o.useState(()=>Array.isArray(_)?C?Oa(_):_.slice():void 0);o.useEffect(()=>{Array.isArray(_)&&_.length?k(C?Oa(_):_.slice()):k(void 0)},[c,E,v,C]);const[D,A]=o.useState(null),[B,F]=o.useState(()=>new Set);o.useEffect(()=>{A(null),F(new Set)},[v,c,E]);const L=o.useRef(void 0);o.useEffect(()=>{const O=L.current;typeof O=="number"&&typeof t=="number"&&typeof e=="number"&&O>=e&&t<e&&(A(null),F(new Set)),L.current=t},[t,e]);const q=o.useCallback(O=>{if(!ca(w))return;const T=N?.[O];if(T==null)return;const G=T;if(d){const K=new Set(B);K.has(G)?K.delete(G):K.add(G),F(K),typeof u=="function"&&u({selectedValues:[...K],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...K],__ts:Date.now()})}else A(G),typeof u=="function"&&u({selectedIndex:O,selectedValue:G,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:O,selectedValue:G,__ts:Date.now()})},[N,w,d,u,B]),M=`training-step__buttons${Array.isArray(N)&&N.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(ua,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:x,useTitleFaded:l,children:n.jsx("div",{className:M,children:Array.isArray(N)&&N.length>0?N.map((O,T)=>n.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:()=>q(T),ariaLabel:String(O),label:O,useLabel:!0,icon:y?y[String(O)]:void 0,variant:"default",disabled:w==="disabled",selected:d?B.has(O):D===O,useDisabledCovered:b,minWidth:0},String(O))):null})})}function Ns({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u,demoSelected:c}){const{t:p}=ke.useTranslation(),h=s??p("training.confirmTitle","\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694."),d=typeof e=="number"?e:-1,m=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",b=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),x=`${String(b)}\0${JSON.stringify(y??null)}`,[g,w]=o.useState(x);g!==x&&(w(x),c==null&&f(null));const[_,E]=o.useState(c);Object.is(_,c)||(E(c),f(c??null));const v=o.useRef(void 0);o.useEffect(()=>{const A=v.current;typeof A=="number"&&typeof t=="number"&&typeof e=="number"&&A>=e&&t<e&&c==null&&f(null),v.current=t},[t,e,c]);const N=o.useCallback(A=>{const B=typeof A=="object"&&A!==null?Object.assign({},A,{__ts:Date.now()}):{value:A,__ts:Date.now()};typeof i=="function"&&i(B),ca(m)&&typeof l=="function"&&l(B)},[i,m,l]),k=o.useCallback(()=>{ca(m)&&(f(!1),N(!1))},[N,m]),D=o.useCallback(()=>{ca(m)&&(f(!0),N(!0))},[N,m]);return n.jsxs(ua,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:h,onDone:l,useTitleFaded:!1,children:[n.jsx(ad,{context:u,state:m}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(y)&&y.length>0?y.slice(0,6).map((A,B)=>n.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:()=>{ca(m)&&(f(B),N&&N(B))},disabled:m==="disabled",ariaLabel:String(A),label:A,variant:m,selected:C===B},B)):n.jsxs(n.Fragment,{children:[n.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:k,disabled:m==="disabled",icon:"x",ariaLabel:p("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),label:p("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!1}),n.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:D,disabled:m==="disabled",icon:"circle",ariaLabel:p("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),label:p("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!0})]})})]})}function Es({index:e,stepIndex:t,isLast:a=!1,title:r,onDone:s,btnLabel:l,soundSrc:i,bucketPath:u,usePreviewTextBtn:c,previewText:p=null,onPreviewTextBtn:h,disabled:d,_pageIndex:m,showSoundWaveForm:b,showNoiseWaveForm:y,leadInMs:C,tailMs:f}){const{t:x}=ke.useTranslation(),g=r??x("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),w=d??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(ua,{index:e,stepIndex:t,isLast:a,title:g,onDone:s,titleProps:{usePreviewTextBtn:c,previewText:p,onPreviewTextBtn:h},children:n.jsx(Bs,{soundSrc:i,ttsText:i?null:p??g,bucketPath:u,btnLabel:l||x("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:w,className:"training-step__listen-sticky",showSoundWaveForm:b,showNoiseWaveForm:y,leadInMs:C,tailMs:f},`audio-p${m??0}-s${e}`)})}const xx=[];function Ds({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=xx}){const{t:c}=ke.useTranslation(),p=s??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),h=S=>typeof S=="string"?S:S&&(S.context||S.sentence||S.question||"")||"",[d,m]=o.useState(Array.isArray(u)?u:[]),[b,y]=o.useState(()=>(d||[]).map((S,$)=>({id:$,text:h(S)}))),C=o.useMemo(()=>typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled",[t,e]),f=C!=="disabled",x=o.useRef(void 0),g=o.useRef(void 0);o.useEffect(()=>{if(x.current===u)return;x.current=u;const S=Array.isArray(u)?u:[];m(S);const $=(I=>{const P=(I||[]).map((ce,Z)=>({id:Z,text:h(ce)}));if(P.length<=1)return P;const V=(ce,Z)=>{if(ce.length!==Z.length)return!1;for(let H=0;H<ce.length;H++)if(ce[H].text!==Z[H].text)return!1;return!0};let ie=Oa(P),U=0;for(;V(ie,P)&&U<20;)ie=Oa(P),U+=1;return ie})(S);y($);try{if(typeof i=="function"){const I=$.filter((P,V)=>P.text===h(S[V])).length;i({shuffled:$,score:I,total:(S||[]).length,initial:!0,__ts:Date.now()})}if(typeof l=="function"&&C==="active"){const I=$.filter((P,V)=>P.text===h(S[V])).length;g.current=u,l({shuffled:$,score:I,total:(S||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(C!=="active"||g.current===u||(g.current=u,typeof l!="function"))return;const S=Array.isArray(u)?u:[],$=b.filter((I,P)=>I.text===h(S[P])).length;l({shuffled:b,score:$,total:S.length,initial:!0,__ts:Date.now()})},[C,u]);const w=(S,$)=>{const I=[...b],P=S+$;if(P<0||P>=I.length)return;const V=I[P];I[P]=I[S],I[S]=V,G(I);try{if(typeof l=="function"&&C==="active"){const ie=I.filter((U,ce)=>U.text===h(d[ce])).length;l({shuffled:I,score:ie,total:(d||[]).length,__ts:Date.now()})}}catch{}},[_,E]=o.useState(null),v=o.useRef(null),N=o.useRef(null),k=o.useRef(null),D=o.useRef(null),A=o.useRef(null),B=o.useRef({x:0,y:0}),F=o.useRef(null),L=o.useRef({dx:0,dy:0}),q=()=>{if(F.current!==null)return;const S=()=>{if(!v.current){F.current=null;return}F.current=requestAnimationFrame(S);const $=B.current,I=L.current||{dx:0,dy:0};v.current&&(v.current.style.transform=`translate3d(${$.x-I.dx}px, ${$.y-I.dy}px, 0)`)};F.current=requestAnimationFrame(S)},M=o.useRef(new Map),O=o.useRef(new Map),T=()=>{const S=new Map;return M.current.forEach(($,I)=>{$&&$.getBoundingClientRect&&S.set(I,$.getBoundingClientRect())}),S},G=S=>{const $=T();y(S);try{if(typeof i=="function"){const I=S.filter((P,V)=>P.text===h(d[V])).length;i({shuffled:S,score:I,total:(d||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const I=T();S.forEach(P=>{const V=$.get(P.id),ie=I.get(P.id),U=M.current.get(P.id);if(!U||!V||!ie)return;const ce=V.top-ie.top;ce&&(U.style.transition="none",U.style.transform=`translateY(${ce}px)`,requestAnimationFrame(()=>{U.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",U.style.transform="";const Z=()=>{U.style.transition="",U.removeEventListener("transitionend",Z)};U.addEventListener("transitionend",Z)}))})})},K=(S,$)=>{try{try{$.dataTransfer?.setData("text/plain",String(S))}catch{}try{$.dataTransfer&&($.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),$.dataTransfer?.setDragImage(I,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(I)}catch{}})}catch{}}catch{}E(S);try{const I=b[S],P=document.createElement("div");P.className="order-list__dragging-object order-list__dragging-object--visible",P.textContent=I&&I.text?I.text:"",document.body.appendChild(P),v.current=P;const V=M.current.get(I.id);let ie=$.clientX||0,U=$.clientY||0;try{if(V&&V.getBoundingClientRect){const z=V.getBoundingClientRect();ie=z.left+z.width/2,U=z.top+z.height/2}}catch{}const ce=P.getBoundingClientRect(),Z=ce.width/2,H=ce.height/2;L.current={dx:Z,dy:H},P.style.transition="none",B.current={x:ie,y:U},P.style.transform=`translate3d(${ie-Z}px, ${U-H}px, 0)`,requestAnimationFrame(()=>{try{P.style.transition=""}catch{}q()});const te=z=>{const ae=z;B.current={x:ae.clientX,y:ae.clientY},q()};k.current=te,document.addEventListener("mousemove",te);const W=z=>{const ae=z;B.current={x:ae.clientX,y:ae.clientY},q()};N.current=W,document.addEventListener("dragover",W);try{$.dataTransfer?.setData("text/plain",String(S));try{$.dataTransfer?.setData("application/json",JSON.stringify({idx:S}))}catch{}}catch{}}catch{}},ee=(S,$)=>{$.preventDefault();try{$.dataTransfer&&($.dataTransfer.dropEffect="move")}catch{}try{A.current!==null&&(clearTimeout(A.current),A.current=null);const I=$.currentTarget&&$.currentTarget.closest?$.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{}},re=(S,$)=>{$.preventDefault();const I=$.dataTransfer?.getData("text/plain")||"",P=I?parseInt(I,10):_,V=S;if(typeof P!="number"||isNaN(P)||P===V){E(null),ne(),R();return}const ie=Lf(b,P,V);G(ie),E(null),R();try{if(typeof l=="function"&&C==="active"){const U=ie.filter((ce,Z)=>ce.text===h(d[Z])).length;l({shuffled:ie,score:U,total:(d||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const U=document.querySelectorAll(".order-list .order-list__item")[V];if(!U)return;const ce=U.querySelector(".order-list__slot")||U;try{ce.classList.add("pulse"),ce.offsetHeight,ce.classList.add("to-dark");const Z=()=>{ce.classList.remove("pulse","to-dark"),ce.removeEventListener("transitionend",Z)};ce.addEventListener("transitionend",Z)}catch{}})}catch{}ne()},R=()=>{if(v.current){try{document.body.removeChild(v.current)}catch{}v.current=null}N.current&&(document.removeEventListener("dragover",N.current),N.current=null),k.current&&(document.removeEventListener("mousemove",k.current),k.current=null),F.current!==null&&(cancelAnimationFrame(F.current),F.current=null)},J=()=>{E(null),ne(),R()};o.useEffect(()=>()=>R(),[]);const ne=()=>{try{if(A.current!==null&&(clearTimeout(A.current),A.current=null),D.current){try{D.current.classList.remove("drag-over")}catch{}D.current=null}document.querySelectorAll(".order-list .order-list__item").forEach(S=>S.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const S=Math.max(1,(b||[]).length);b.forEach(($,I)=>{const P=O.current.get($.id);if(!P)return;let V=50;S>1&&(V=Math.round(I/(S-1)*100));try{P.style.setProperty("--marker-pos",V+"%")}catch{}})}catch{}},[b]),o.useEffect(()=>()=>{R(),A.current!==null&&(clearTimeout(A.current),A.current=null)},[]),n.jsx(ua,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:p,children:n.jsx("div",{className:"order-list",children:b.map((S,$)=>{const I=Math.max(1,(b||[]).length),P=I>1?Math.round($/(I-1)*100):50;return n.jsx("div",{className:"order-list__item",children:n.jsxs("div",{className:"order-list__slot","data-disabled":C==="disabled","aria-disabled":C==="disabled",children:[C!=="disabled"?n.jsx("div",{className:"order-list__marker caption-1",style:{"--marker-pos":P+"%"},ref:V=>{const ie=O.current;V?ie.set(S.id,V):ie.delete(S.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:$+1})}):null,n.jsxs("div",{ref:V=>{const ie=M.current;V?ie.set(S.id,V):ie.delete(S.id)},className:`order-list__draggable ${_===$?"dragging":""}`,"data-disabled":C==="disabled","aria-disabled":C==="disabled",tabIndex:C==="disabled"?-1:0,draggable:f,onDragStart:f?V=>K($,V):void 0,onDragEnter:f?V=>ee($,V):void 0,onDragOver:f?V=>ee($,V):void 0,onDragLeave:f?()=>{try{A.current!==null&&clearTimeout(A.current),A.current=setTimeout(()=>{try{const V=document.querySelectorAll(".order-list .order-list__item");V&&V[$]&&(V[$].classList.remove("drag-over"),D.current===V[$]&&(D.current=null))}catch{}},80)}catch{}}:void 0,onDrop:f?V=>re($,V):void 0,onDragEnd:f?J:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:S.text}),f?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:()=>w($,-1),ariaLabel:c("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:$===0,useBorder:!1,useDisabledInvisible:!0}),n.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:()=>w($,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:$===b.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},S.id)})})})}const wx=8e3;function Bx(e,t){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.then(s,s),setTimeout(s,t)})}function rd({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=[],selectable:c=!1,hideLabel:p=!1,hideAudio:h=!1,maxCards:d,playAllGapMs:m=0}){const{t:b}=ke.useTranslation(),y=s??b("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=d??3,x=(C||[]).slice(0,f);(C||[]).length>f&&console.warn(`TrainingStepCard: ${C.length} items passed but only ${f} shown`);const g=typeof e=="number"?e:-1,w=typeof t!="number"?"disabled":g<t?"done":g===t?"active":"disabled",[_,E]=o.useState(null),v=o.useRef([]),[N,k]=o.useState(!1),D=o.useRef(null),A=o.useRef(!0);o.useEffect(()=>(A.current=!0,()=>{A.current=!1}),[]);const B=o.useMemo(()=>C.map(T=>T?.id??T?.word??"").join("|"),[C]);o.useEffect(()=>{E(null)},[B]);const F=o.useRef(void 0);o.useEffect(()=>{const T=F.current;typeof T=="number"&&typeof t=="number"&&typeof e=="number"&&T>=e&&t<e&&E(null),F.current=t},[t,e]);const L=o.useCallback((T,G)=>{if(c)return;const K={item:T,index:G,__ts:Date.now()};try{typeof i=="function"&&i(K)}catch{}if(w==="active"&&typeof l=="function")try{l(K)}catch{}},[c,i,w,l]),q=o.useRef(m);o.useEffect(()=>{q.current=Math.max(0,m||0)},[m]);const M=o.useCallback(async()=>{if(N||w==="disabled")return;k(!0);let T=!1;const G=new Promise(K=>{D.current=()=>{T=!0,K()}});try{for(let K=0;K<x.length&&!(!A.current||T);K++){const ee=v.current[K];if(!ee)continue;await Promise.race([Bx(ee.play(),wx),G]);const re=Math.max(0,q.current||0);re>0&&K<x.length-1&&!T&&A.current&&await Promise.race([new Promise(R=>{setTimeout(R,re)}),G])}}finally{D.current=null,k(!1)}},[N,w,x.length]),O=o.useCallback((T,G)=>{if(!ca(w))return;E(G);const K={selectedValue:T.word||T.title||"",selectedIndex:G,item:T,__ts:Date.now()};try{typeof i=="function"&&i(K)}catch{}if(typeof l=="function")try{l(K)}catch{}},[i,w,l]);return n.jsx(ua,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:y,onDone:l,titleProps:{usePlayAllBtn:!h&&x.length>0,onPlayAll:M,playAllActive:N},children:n.jsx("div",{className:"training-step__cards",onClickCapture:T=>{const G=D.current;if(!G)return;const K=T.target;K&&typeof K.closest=="function"&&K.closest(".training-word-card__bottom")&&G()},children:x.length===0?n.jsx("div",{className:"training-step__empty",children:b("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):x.map((T,G)=>n.jsx(rs,{ref:K=>{v.current[G]=K},item:T,disabled:w==="disabled",onPlayDone:()=>L(T,G),selectable:c,selected:c&&_===G,onSelect:c?()=>O(T,G):void 0,flipDelay:G*120,hideLabel:p,hideAudio:h},T&&T.id||G))})})}const kx=160;function Ax(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 od(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"}]}Ax(Zt.t.bind(Zt)),od(Zt.t.bind(Zt));const Pr="none",Nx=.5,Ex=1.5,Dx=.25;function Ss({title:e,valueLabel:t,value:a,min:r,max:s,step:l,tickStep:i,size:u,disabled:c,onChange:p}){return n.jsxs(un,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(Ju,{value:a,onChange:p,min:r,max:s,step:l,size:u,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:c,className:ue("noise-settings-tooltip__slider-input")}),n.jsx("div",{className:ue(De("noise-settings-tooltip__value","button-1",c?"noise-settings-tooltip__value--disabled":"")),children:t})]})}function sd({anchorRect:e,onClose:t,hideNoiseRows:a=!1}){const{t:r}=ke.useTranslation(),s=vn("(max-width: 767px)")?40:24,l=Tr(),i=sr(l?.settings??ia),u=l?.settings.type??"defaultNoise",c=l?.settings.enabled??!0,p=l?.playbackRate??1,h=l?.mainVolume??1,d=Math.round(h*100),m=o.useCallback(x=>{try{l?.setMainVolume(Math.max(0,Math.min(1,x/100)))}catch{}},[l]),b=o.useCallback(x=>{try{l?.setPlaybackRate(x)}catch{}},[l]),y=o.useCallback(x=>{const g=Math.min(or,Math.max(0,Math.round(x*10)/10));try{l?.setSettings({noiseRatio:g})}catch{}},[l]),C=o.useCallback(x=>{try{x===Pr?l?.setSettings({enabled:!1}):l?.setSettings({type:x,enabled:!0})}catch{}},[l]),f=[{key:Pr,label:r("training.noise.type.none","\uC5C6\uC74C")},...od(r).map(x=>({key:x.value,label:x.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:ue("noise-settings-tooltip__header"),children:[n.jsx("span",{children:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815")}),n.jsx(be,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:r("common.close","\uB2EB\uAE30"),onClick:t})]}),children:n.jsxs(nr,{className:ue("noise-settings-tooltip"),useBorder:!1,labelWidth:72,children:[n.jsx(Ss,{title:r("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${d}%`,value:d,min:0,max:100,step:10,size:s,onChange:m}),n.jsx(Ss,{title:r("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${p.toFixed(2)}x`,value:p,min:Nx,max:Ex,step:Dx,size:s,onChange:b}),!a&&n.jsxs(n.Fragment,{children:[n.jsx(un,{variant:"custom",label:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(_n,{ariaLabel:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:f,value:c?u:Pr,onChange:C})}),n.jsx(Ss,{title:r("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:r("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:or,step:zc,size:s,disabled:!c,onChange:y})]}),a&&n.jsx("div",{className:ue("noise-settings-tooltip__width-ghost"),"aria-hidden":"true",inert:!0,children:n.jsx(un,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(_n,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:f,value:Pr,onChange:()=>{}})})})]})})}function ld({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:p=!1}){const{t:h}=ke.useTranslation(),[d,m]=o.useState(!1),[b,y]=o.useState(null),[C,f]=o.useState(!1),x=o.useRef(null),g=o.useRef(null),w=Tr(),_=u>0,E=_&&i<u-1,v=!_||i>=u-1,N=s===Math.max(0,l);o.useEffect(()=>{e||(m(!1),y(null))},[e]);const k=o.useCallback(()=>{m(!1),y(null)},[]),D=o.useCallback(()=>{if(d){m(!1),y(null);return}const G=x?.current?.getBoundingClientRect();G&&y(G),t?.(),m(!0)},[d,t]),A=o.useCallback(()=>{if(d){m(!1),y(null);return}const G=g?.current?.getBoundingClientRect();G&&y(G),t?.(),m(!0)},[d,t]),B=vn("(max-width: 767px)"),F=o.useRef(null),[L,q]=o.useState(null),M=o.useCallback(()=>{f(G=>{const K=!G;return q(K?F.current?.getBoundingClientRect()??null:null),K})},[]),O=o.useCallback(()=>{f(!1),q(null)},[]);o.useEffect(()=>{c&&(f(!1),q(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(Qo,{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(Qo,{analyser:w?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.noise","\uC18C\uC74C")})]})]});return td(e&&d,()=>typeof document<"u"?document.querySelector(".noise-settings-tooltip__header")?.closest(".tooltip__content")??null:null,()=>[x.current,g.current].map(G=>G?.querySelector("button")??null).find(G=>!!G&&G.getClientRects().length>0)??x.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:x,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(be,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:D,className:d?"is-selected":void 0,"aria-expanded":d,"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:g,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(be,{htmlType:"button",size:56,type:"dot",shape:"pill",icon:"settings",onClick:A,className:d?"is-selected":void 0,"aria-expanded":d,"aria-haspopup":"dialog",ariaLabel:h("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:F,className:"pp-bottom__meter-trigger","data-tooltip-ignore":!0,children:n.jsx(be,{htmlType:"button",size:40,type:"dot",shape:"pill",icon:"audio-lines",onClick:M,selected:C,"aria-expanded":B?C:void 0,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&C&&!B&&n.jsx("div",{className:"pp-bottom__meters",children:T})]}),e&&C&&B&&L&&n.jsx(Bn,{anchorRect:L,onClose:O,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:[v&&n.jsx(be,{htmlType:"button",size:56,type:"bar",icon:"check",onClick:typeof r=="function"?r:a,ariaLabel:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),label:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),variant:"main",disabled:!N}),E&&n.jsx(be,{htmlType:"button",size:56,type:"bar",rightIcon:"chevron-right",align:"right",onClick:a,ariaLabel:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),label:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),variant:"main",disabled:!N})]}),e&&d&&n.jsx(sd,{anchorRect:b,onClose:k,hideNoiseRows:p})]})}function id({title:e,subtitle:t,desc:a,depth:r,icon:s,wrapperStyle:l,iconTooltip:i,pageIndex:u,pageCount:c,progressMax:p,progressIndex:h,onBack:d,onClose:m}){const{t:b}=ke.useTranslation(),y=vn("(max-width: 767px)"),C=Number.isInteger(h)?h:u||0,f=Number.isInteger(p)?p:c||0,x=d||m,g=Array.isArray(r)?y?r[r.length-1]:r.join(" / "):r,w=typeof e=="string"?e.trim():e,_=typeof t=="string"?t.trim():t,E=!!(w||_),v=E?w||_:b("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),N=g||(w?t:void 0),k=y&&typeof N=="string"&&(N.includes(" \xB7 ")||N.includes(" / "))?N.split(/\s[·/]\s/).pop():N,D=o.useMemo(()=>{const A=l&&typeof l=="object"?{...l}:{};return!("width"in A)&&!("height"in A)&&(A.width="40px",A.height="40px"),A},[l]);return n.jsxs("header",{className:"pp-title training-popup-title",children:[n.jsxs("div",{className:"pp-title__left",children:[x?n.jsx(be,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:b("common.back","\uB4A4\uB85C"),onClick:x,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:s?n.jsx(_u,{icon:s,label:e,tooltip:i,wrapperStyle:D}):null}),n.jsxs("div",{className:"pp-title__text",children:[k?n.jsx("span",{className:"pp-title__depth caption-1",children:k}):null,n.jsx("span",{className:`pp-title__title h2${E?"":" pp-title__title--empty"}`,children:v}),a?n.jsx("span",{className:"pp-title__description caption-1",children:a}):null]})]}),n.jsx(nc,{max:Math.max(0,f??0),index:Math.max(0,C??0)})]})}function Sx(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function jx(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 ud=(e,t)=>{if(!t)return t;const a=typeof Zt?.t=="function"?Zt.t(e,{defaultValue:t}):void 0;return typeof a=="string"&&a?a:t};function cd(e,t,a){const r=e,s=r?.title||r?.name||(Array.isArray(t)?t[t.length-1]:void 0)||a||"\uD6C8\uB828",l=ei().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?ud(`topic.${l.key}`,l.label):void 0,i?ud(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function js(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function dd(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 Tx(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function Mx({idPrefix:e,trainingData:t,depth:a,fallbackTitle:r="\uD6C8\uB828",pages:s=[],emptyMessage:l,buildResults:i,metaPatch:u}){const c=cd(t,a,r),p=typeof u=="function"?u(c)||{}:u||{},h=t?.id||t?.title||s.length;return{id:`${e}:${h}`,meta:{...c,...p},pages:s,emptyMessage:l,buildResults:i}}function Lx(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return t.context||t.sentence||t.question||""||""}return""}function $x(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 Rx(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 pd(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function Px(e,t,a,r){return pd(e,t*a+r)}function Fx({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 Ix(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 hd=o.createContext(null);function Ox(){const e=o.useContext(hd);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function zx({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,choices:l=[],onDone:i,onChange:u}){const{t:c}=ke.useTranslation(),p=typeof e=="number"?e:-1,h=typeof t!="number"?"disabled":p<t?"done":p===t?"active":"disabled",[d,m]=o.useState(()=>l.map(()=>null)),b=JSON.stringify(l),y=l.length;o.useEffect(()=>{m(Array.from({length:y},()=>null))},[b]);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(()=>d.filter(w=>w!==null).length+1,[d]),x=o.useCallback(w=>{if(!ca(h))return;const _=d;let E;if(_[w]!=null){const N=_[w];E=_.map(k=>k!==null&&k>=N?null:k)}else E=[..._],E[w]=f;m(E);const v={selectedOrder:E,words:l,__ts:Date.now()};try{typeof u=="function"&&u(v)}catch{}if(_[w]==null&&E.length>0&&E.every(N=>N!==null))try{typeof i=="function"&&i(v)}catch{}},[h,d,f,u,i,l]),g=s??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(ua,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:g,onDone:i,children:n.jsx("div",{className:"training-step__cards",children:l.map((w,_)=>n.jsx(rs,{item:{word:w},disabled:h==="disabled",selectable:!0,selected:d[_]!==null,orderRank:d[_],onSelect:()=>x(_),flipDelay:_*120,hideLabel:!1,hideAudio:!0},`${w}-${_}`))})})}function Fr(e){return null}Fr.__isTrainingPage=!0;function Da(e,t){const a=Ox();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 md({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i}=Da(e,t);return n.jsx(Es,{...a,index:r,stepIndex:s,isLast:l,onDone:i})}function Cd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Da(e,t);return n.jsx(As,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function fd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Da(e,t);return n.jsx(Ns,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function bd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Da(e,t);return n.jsx(Ds,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function gd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Da(e,t);return n.jsx(rd,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function Wx({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Da(e,t);return n.jsx(zx,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}const yd=3e4,Hx=/^(https?:|blob:|data:audio|\/|\.\/)/;function vd(e){return typeof e=="string"&&Hx.test(e)?e:null}const Vx=e=>typeof e=="string"&&e.trim()!==""?e:null,Ts=Symbol("timed-out");function qx(e,t){if(t<=0)return Promise.resolve(Ts);let a;return Promise.race([Promise.resolve(e),new Promise(r=>{a=setTimeout(()=>r(Ts),t)})]).finally(()=>clearTimeout(a))}function Ux(e){return e?$a()||ir()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function Gx(e,t){const a=[],r=vd(t);r&&a.push({kind:"raw",resolve:async()=>r});const s=(e??"").trim();if(!s)return a;for(const[l,i]of[["urlResolver",$a()],["fallbackUrlResolver",ir()]])i&&a.push({kind:l,resolve:async u=>{let c;try{c=await qx(i(s),u)}catch(h){return Dt(`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===Ts?(Dt(`question-sound-slow-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 ${yd}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):Vx(c)||(Dt(`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 Kx(){return Date.now()+yd}const Yx=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function Zx(e){Dt("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 Ir(...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 Xx(e){return Ir(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function Jx(e){return vd(Ir(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function _d(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=Ir(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 xd(e){const{score:t,contextsLength:a,results:r=[],subtitle:s,onReplay:l,onClose:i,inline:u=!1,pending:c=!1}=e||{},{t:p}=ke.useTranslation(),h=o.useId(),d=o.useCallback(()=>!c,[c]);o.useEffect(()=>{const A=a??0;if(t!=null&&A>0&&t/A>.5){const B=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("party:trigger",{detail:{count:140,strength:1.6,duration:2200}}))},0);return()=>window.clearTimeout(B)}},[t,a]);const m=o.useCallback(A=>{const B=_d(A),F=Ir(A?.wording,A?.label);return B===!0?{variant:"main",label:F??p("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:B===!1?{variant:"danger",label:F??p("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:F??p("training.result.notJudged","\uBBF8\uD310\uC815")}},[p]),b=a??0,y=t??0,C=o.useMemo(()=>Array.isArray(r)?r:[],[r]),f=o.useRef(null),[x,g]=o.useState(null),w=o.useCallback(()=>{f.current?.(),f.current=null,g(null)},[]);o.useEffect(()=>w,[w]);const _=o.useRef(0),E=(A,B)=>{if(!Wn)return;const F=Math.round(performance.now()-_.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${F}ms ${A}`,B??"")},v=o.useRef(0),N=o.useCallback((A,B,F)=>{w();const L=++v.current,q=()=>v.current===L;_.current=Wn?performance.now():0,E(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${A}`,{text:B,rawUrl:F}),g(A),f.current=()=>{E("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),v.current++,ro()};const M=K=>{E("\uD2BC\uB2E4",K);const ee=Ja(K,re=>{E(`\uB05D\uB0AC\uB2E4 \u2014 ${re?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:q()}),re&&q()&&(f.current=null,g(null))});return f.current=()=>{E("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),v.current++,ee.stop(),ro()},ee.done},O=Gx(B,F);E("\uCC28\uB840",O.map(K=>K.kind));const T=O[0]?.kind==="raw",G=T?M(F):Promise.resolve(!1);(async()=>{if(await G||!q())return;const K=Kx(),ee=T?O.slice(1):O;for(let re=0;re<ee.length;re++){if(!q())return;E(`${ee[re].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const R=await ee[re].resolve(Yx(K,ee.length-re));if(E(`${ee[re].kind} \uAC00 \uB2F5\uD588\uB2E4`,R),!q()||R&&(await M(R)||!q()))return}q()&&(E("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),Zx(B),f.current=()=>{v.current++,ro()},E("\uB0AD\uB3C5\uD55C\uB2E4"),z1(B,{onEnd:()=>{q()&&(f.current=null,g(null))}}))})()},[w]),k=o.useMemo(()=>C.map(A=>{const B=A??{},F=Xx(B)||p("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:L,label:q}=m(B),M=Array.isArray(B.corrects)?B.corrects:[],O=M.length?M.join(", "):B.answer!=null&&B.answer!==""?String(B.answer):null,T=typeof B.selectedText=="string"?B.selectedText:null,G=_d(B)===!0,K=Jx(B),ee=!!K||Ux(F);return{problem:F,variant:L,label:q,answer:O,selectedText:T,isCorrect:G,sound:K,canHear:ee}}),[C,m,p]),D=o.useMemo(()=>k.some(A=>A.answer!==null||A.selectedText!==null),[k]);return n.jsx(Fn,{onClose:i,closeOnBackdrop:!1,inline:u,ariaLabel:p("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4."),className:"popup--training-result",beforeClose:d,footerClassName:"trp-result__foot",footer:({animateThen:A,closeWithAnimation:B})=>n.jsxs(n.Fragment,{children:[c&&n.jsx("p",{id:h,className:"trp-actions__reason caption-1",role:"status",children:p("training.result.pendingDone","\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsxs("div",{className:"trp-actions",children:[n.jsx(be,{htmlType:"button",size:56,type:"bar",label:p("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>A(l)}),n.jsx(be,{htmlType:"button",size:56,type:"bar",label:p("training.result.done","\uC644\uB8CC"),variant:"main",onClick:B,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:p("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")}),n.jsx("h1",{className:"trp-result__title h2",children:p("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":p("training.result.scoreAria",{correct:y,total:b}),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:b})]})})]}),k.length>0&&n.jsx("section",{className:"trp-result__body",children:n.jsxs("div",{className:`result-table${D?" result-table--answer":""}`,role:"table","aria-label":p("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:p("common.col.problem","\uBB38\uC81C")}),D&&n.jsx("span",{role:"columnheader",children:p("training.result.colAnswerSelected","\uC815\uB2F5 \xB7 \uC120\uD0DD")}),n.jsx("span",{className:"col-right",role:"columnheader",children:p("training.result.colJudge","\uD310\uC815")})]}),k.map((A,B)=>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(B+1).padStart(2,"0")}),n.jsx("div",{className:"trp-row__q body-2",children:A.problem}),A.canHear&&n.jsx(be,{htmlType:"button",size:32,type:"dot",useBorder:!1,icon:x===B?"square":"volume-2",className:"trp-row__replay",ariaLabel:x===B?p("training.result.replaySoundStop",{no:B+1,defaultValue:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4"}):p("training.result.replaySound",{no:B+1,defaultValue:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30"}),onClick:()=>x===B?w():N(B,A.problem,A.sound)})]}),D&&n.jsxs("div",{className:"trp-row__answers",children:[A.answer!==null&&n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:"trp-row__answer-label answer-correct caption-1",children:p("training.result.colAnswer","\uC815\uB2F5")}),n.jsx("span",{className:"trp-row__answer-value body-2",children:A.answer})]}),n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:`trp-row__answer-label answer-selected caption-1 ${A.isCorrect?"is-correct":"is-wrong"}`,children:p("training.result.colSelected","\uC120\uD0DD")}),n.jsx("span",{className:`trp-row__answer-value body-2 ${A.isCorrect?"is-correct":"is-wrong"}`,children:A.selectedText??"\u2014"})]})]}),n.jsx("div",{className:"trp-row__judge",children:n.jsx(ln,{variant:A.variant,label:A.label,fill:"soft",minWidth:80})})]},B))]})})]})})}const Ms=new Set;function Qx(e){o.useEffect(()=>{if(!e||Ms.has(e))return;Ms.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 d=Date.now(),m=d-h;l=s,Pf({trainingType:e,startedAt:new Date(m).toISOString(),endedAt:new Date(d).toISOString()})},p=()=>{t()?i():c()};return typeof document<"u"&&document.addEventListener("visibilitychange",p),typeof window<"u"&&window.addEventListener("pagehide",c),()=>{typeof document<"u"&&document.removeEventListener("visibilitychange",p),typeof window<"u"&&window.removeEventListener("pagehide",c),c(),Ms.delete(e)}},[e])}function Or(e,t){return e&&e.id||`page-${t??0}`}function zr(e,t){return e&&e.key||`step-${t??0}`}function Wr(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function ew(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const tw=300,nw=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},zn=Object.freeze({}),wd=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function Ls(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 aw=e=>n.jsx(xd,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function rw(e){const{scenario:t,title:a,subTitle:r,depth:s,icon:l,wrapperStyle:i,iconTooltip:u,pageIndex:c,pageCount:p,stepIndex:h,stepCount:d,onBack:m,onComplete:b,onRoundFinished:y,onNext:C,onSettings:f,useNoiseSetting:x=!0,children:g,ariaLabel:w,label:_,buildResults:E,onResult:v,typeKey:N,entryPoint:k,dailyTotal:D,itemRef:A,renderResultPopup:B,noiseOverride:F,hideNoiseRows:L=!1}=e;Qx(N&&!wd.has(N)?N:"");const q=o.useRef(0);o.useEffect(()=>{q.current=Date.now()},[]);const{t:M}=ke.useTranslation(),O=v,T=!!t,G=t?.id||null,K=t?.meta||{},ee=Array.isArray(t?.pages)?t.pages:[],re=Array.isArray(g)||o.isValidElement(g)&&typeof g!="function"?o.Children.toArray(g).filter(o.isValidElement):[],R=re.length>0,J=he=>he===Fr||he?.__isTrainingPage===!0,ne=R&&re.some(he=>J(he.type)),S=ne?re.filter(he=>J(he.type)).map((he,Te)=>{const ze=he.props||{};return{id:`children-page-${Te}`,steps:o.Children.toArray(ze.children).filter(o.isValidElement),pageTop:ze.pageTop||ze.top||null,pageBottom:ze.pageBottom||ze.bottom||null}}):[{id:"children-page-0",steps:re}],$=R&&!T&&typeof g!="function",I=$?Math.max(1,S.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 he=document.body;return he.dataset.ihabTrainingPopupCount=String(Number(he.dataset.ihabTrainingPopupCount||"0")+1),he.classList.add("ihab-training-popup-open"),()=>{const Te=Number(he.dataset.ihabTrainingPopupCount||"1")-1;Te>0?he.dataset.ihabTrainingPopupCount=String(Te):(delete he.dataset.ihabTrainingPopupCount,he.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!(typeof document>"u"||!document.body))return yv()},[]);const[P,V]=o.useState({...ia,enabled:!1}),ie=o.useRef(P);o.useEffect(()=>{ie.current=P},[P]);const U=o.useRef(F),ce=o.useRef(!1),Z=o.useRef(null);o.useEffect(()=>{let he=!1;const Te=ze=>{if(he)return;ce.current=!0;const Ze=ze?la({...ia,enabled:!1},ze):{...ia},He=Z.current;Z.current=null;const Y=He?la(Ze,He):Ze;ie.current=Y,V(Y),He&&!U.current&&fo(Y),mr(Y);const pe=U.current;if(pe){const je=typeof pe=="function"?pe(Y):pe,qe=la(Y,je);ie.current=qe,V(qe),mr(qe)}};return Kf().then(ze=>{if(he){const Ze=Z.current;if(Z.current=null,Ze&&!U.current){const He=ze?la({...ia,enabled:!1},ze):{...ia};fo(la(He,Ze))}return}Te(ze)}),()=>{he=!0}},[]);const[H,te]=o.useState(null),[W,z]=o.useState(null),ae=o.useCallback((he,Te)=>{he==="main"?te(Te):z(Te)},[]),ve=o.useRef(null),me=o.useRef(null),le=o.useCallback(()=>{me.current!==null&&(clearTimeout(me.current),me.current=null);const he=ve.current;ve.current=null,he&&fo(he)},[]);o.useEffect(()=>{if(typeof window>"u")return;const he=()=>{document.visibilityState==="hidden"&&le()};return window.addEventListener("pagehide",le),document.addEventListener("visibilitychange",he),()=>{window.removeEventListener("pagehide",le),document.removeEventListener("visibilitychange",he),le()}},[le]);const Be=o.useCallback(he=>{const Te=la(ie.current,he);if(ie.current=Te,V(Te),!ce.current){Z.current={...Z.current??{},...he},mr(Te);return}U.current||(ve.current=Te,me.current!==null&&clearTimeout(me.current),me.current=setTimeout(le,tw)),mr(Te)},[le]),Pe=P.mainSpeed,Fe=P.mainVolume,Ae=o.useCallback(he=>Be({mainSpeed:he}),[Be]),se=o.useCallback(he=>Be({mainVolume:he}),[Be]),ye=o.useMemo(()=>({settings:P,setSettings:Be,registerAnalyser:ae,mainAnalyser:H,noiseAnalyser:W,playbackRate:Pe,setPlaybackRate:Ae,mainVolume:Fe,setMainVolume:se}),[P,Be,ae,H,W,Pe,Ae,Fe,se]),Ce=o.useRef(null),[xe,$e]=o.useState(0),nt=o.useRef([]),[ct,at]=o.useState("center"),[rt,Ee]=o.useState(!1),Ue=o.useRef(!1),Ne=o.useRef(null),Ye=o.useCallback(he=>{Ue.current||(Ue.current=!0,Ee(!0),Ne.current=setTimeout(()=>{try{he()}catch{Ue.current=!1,Ee(!1)}},nw()?0:kx))},[]);o.useEffect(()=>()=>{Ne.current&&clearTimeout(Ne.current)},[]);const et=o.useRef(m);o.useEffect(()=>{et.current=m});const ft=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{const he=Ce.current,Te=ft.current;if(_o(he,Te),he){const ze=Array.from(he.querySelectorAll(Dn)).filter(Ze=>!Ze.closest('[aria-hidden="true"]'))[0];if(ze)try{ze.focus()}catch{}}return()=>{const ze=document.activeElement;if(!ze||ze===document.body||he&&he.contains(ze))try{xo(Te)?.focus?.()}catch{}}},[]),o.useEffect(()=>ea(()=>Ye(()=>{const he=et.current;typeof he=="function"&&he()})),[Ye]),yo(Ce,!0);const[vt,dt]=o.useState(!1),jt=o.useRef(!1),[ot,st]=o.useState(null),At=o.useRef(0),Nt=o.useRef(0),Ot=()=>{At.current+=1,Nt.current+=1,st(null)},[Wt,xt]=o.useState(""),[it,bt]=o.useState(()=>Wr()),pt=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!T&&!$||(bt(Wr()),Ot())},[T,G,$]),o.useEffect(()=>{$&&bt(he=>{const Te=Math.max(0,Math.min(he.pageIndex,Math.max(0,I-1)));return Te!==he.pageIndex?{...he,pageIndex:Te,stepIndex:0}:he})},[$,I]);const kt=$?Math.max(0,Math.min(it.pageIndex,I-1)):0,mt=$?S[kt]:null,wt=$&&mt&&Array.isArray(mt.steps)?mt.steps:[],de=T?it.pageIndex:$?kt:typeof c=="number"?c:0,Le=T?ee[Math.max(0,Math.min(it.pageIndex,Math.max(0,ee.length-1)))]:null,Se=T&&Le&&Array.isArray(Le.steps)?Le.steps:[],Je=T?Se.length:$?wt.length:typeof d=="number"?d:0,ht=T||$?Math.max(0,Math.min(it.stepIndex,Math.max(0,Je))):typeof h=="number"?h:0,Rt=T?ee.length:$?I:typeof p=="number"?p:0;o.useEffect(()=>{if(!T&&!$)return;const he=T?Or(Le,de):mt?.id||`children-page-${de??0}`,Te=new Date().toISOString();for(let ze=0;ze<=ht;ze+=1){const Ze=T?zr(Se[ze],ze):`step-${ze}`,He=_t(he,Ze);Ft.current.has(He)||Ft.current.set(He,Te)}},[T,$,de,ht,mt?.id]),o.useLayoutEffect(()=>{const he=pt.current;if(typeof de=="number"&&he!==null&&de!==he&&de>he)try{xt(M("training.problemNotice",{n:de+1}))}catch{}pt.current=typeof de=="number"?de:pt.current},[de,c,M]),o.useLayoutEffect(()=>{const he=Ce.current;if(!he)return;const Te=()=>he.querySelector(".page-popup__scroll");let ze=null,Ze=null,He=null;const Y=Xe=>{const gt=Te();if(!gt)return;const Ct=gt.scrollHeight<=gt.clientHeight;if(at(Ct?"center":"top"),Xe&&!jt.current){jt.current=!0;try{dt(!0)}catch{}try{qe.disconnect()}catch{}}},pe=()=>{ze!==null&&cancelAnimationFrame(ze),ze=requestAnimationFrame(()=>{Ze!==null&&clearTimeout(Ze),Ze=setTimeout(()=>Y(!0),60)})},je=()=>{He!==null&&cancelAnimationFrame(He),He=requestAnimationFrame(()=>Y(!1))};pe(),window.addEventListener("resize",je);const qe=new MutationObserver(pe);qe.observe(he,{childList:!0,subtree:!0,attributes:!0});const Ge=setTimeout(()=>{jt.current||Y(!0)},400);return()=>{window.removeEventListener("resize",je),ze!==null&&cancelAnimationFrame(ze),Ze!==null&&clearTimeout(Ze),He!==null&&cancelAnimationFrame(He),clearTimeout(Ge);try{qe.disconnect()}catch{}}},[Ce]);const Me=o.useCallback(he=>{Ce.current&&(Ce.current._childOnNext=he)},[]),tt=o.useCallback(he=>{Ce.current&&(Ce.current._childOnResult=he)},[]),Ft=o.useRef(new Map),_t=(he,Te)=>`${he}\0${Te}`,Q=o.useCallback((he,Te,ze)=>{bt(Ze=>{const He=Ze.answersByPage[he]||{},Y=He[Te],pe=js(ze),je=js(Y);if(Y&&je>pe)return Ze;const qe=dd(ze,Ft.current.get(_t(he,Te)),pe);return{...Ze,answersByPage:{...Ze.answersByPage,[he]:{...He,[Te]:qe}}}})},[bt]),_e=o.useCallback((he,Te,ze)=>{const Ze=Or(Le,de),He=zr(he,Te);Q(Ze,He,ze)},[Le,de,Q]),Oe=o.useCallback((he,Te,ze)=>{const Ze=Or(Le,de),He=zr(he,Te);Q(Ze,He,ze),!ze?.allowChange&&he?.autoAdvance!==!1&&bt(Y=>({...Y,stepIndex:Math.max(Y.stepIndex,Te+1)}))},[Le,de,Q,bt]),Ve=o.useCallback((he,Te)=>{const ze=mt?.id||`children-page-${de??0}`,Ze=typeof Te=="number"?Te:ht??0,He=`step-${Ze}`;Q(ze,He,he),he?.allowChange||bt(Y=>({...Y,stepIndex:Math.max(Y.stepIndex,Ze+1)}))},[mt,de,ht,Q,bt]),Bt=o.useCallback((he,Te)=>{const ze=mt?.id||`children-page-${de??0}`,Ze=`step-${typeof Te=="number"?Te:ht??0}`;Q(ze,Ze,he)},[mt,de,ht,Q]),Qe=$?{currentPageIndex:de??0,currentStepIndex:ht??0,totalStepsInPage:wt.length,handleStepDone:Ve,handleStepChange:Bt}:null,zt=async()=>{const he=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:ee,flowState:it,answersByPage:it.answersByPage})):null;return typeof O=="function"&&await Promise.resolve(O(he))||he},Ht=async()=>{const he=mt?.id||`children-page-${it.pageIndex}`,Te=it.answersByPage[he]||{},ze=ne?(()=>{const Y={};let pe=0;return S.forEach(je=>{const qe=it.answersByPage[je.id]||{},Ge=Array.isArray(je.steps)?je.steps.length:0;for(let Xe=0;Xe<Ge;Xe+=1){const gt=qe[`step-${Xe}`];typeof gt<"u"&&(Y[`step-${pe+Xe}`]=gt)}pe+=Ge}),Y})():Te;if(typeof E=="function"){const Y=await Promise.resolve(E(ze,{pageAnswers:Te,answersByPage:it.answersByPage,pages:S,currentPageId:he}));return typeof O=="function"&&await Promise.resolve(O(Y))||Y}const Ze=Object.entries(Te).map(([Y,pe],je)=>({index:je,key:Y,payload:pe})),He={results:Ze,answers:Ze,score:0};return typeof O=="function"&&await Promise.resolve(O(He))||He},cn=()=>{const he=++At.current,Te=()=>he!==At.current;try{if(typeof document<"u"&&document.body){try{document.dispatchEvent(new CustomEvent("speechear-close-tooltips"))}catch{}document.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,cancelable:!0})),document.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0}))}}catch{}if(T){const He=zt();st(zn);const Y=He;Promise.resolve(Y).then(pe=>{Te()||st(pe||{isEmpty:!0})}).catch(pe=>{!Te()&&st({isEmpty:!0})});return}if($){const He=Ht();st(zn);const Y=He;Promise.resolve(Y).then(pe=>{Te()||st(pe||{isEmpty:!0})}).catch(pe=>{!Te()&&st({isEmpty:!0})});return}const ze=Ce.current&&Ce.current._childOnResult,Ze=He=>{try{return He?He():void 0}catch{return}};if(typeof ze=="function"){const He=Ze(ze);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Mn&&Mn.tagName.toUpperCase()==="SCRIPT"&&Mn.src||new URL("components.cjs.js",document.baseURI).href}catch{}He&&typeof He.then!="function"?st(He):st(He&&typeof He.then=="function"?zn:{});const Y=()=>{Te()||st(pe=>pe===zn?{}:pe)};Promise.resolve(He).then(pe=>{pe&&!Te()?st(pe):Y()}).catch(pe=>{Y()});return}if(typeof O=="function"){const He=Ze(O);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Mn&&Mn.tagName.toUpperCase()==="SCRIPT"&&Mn.src||new URL("components.cjs.js",document.baseURI).href}catch{}He&&typeof He.then!="function"?st(He):st(He&&typeof He.then=="function"?zn:{});const Y=()=>{Te()||st(pe=>pe===zn?{}:pe)};Promise.resolve(He).then(pe=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Mn&&Mn.tagName.toUpperCase()==="SCRIPT"&&Mn.src||new URL("components.cjs.js",document.baseURI).href}catch{}pe&&!Te()?st(pe):Y()}).catch(pe=>{console.error("viewResults external handler failed",pe),Y()});return}},Yt=()=>{if(T){if(typeof de=="number"&&typeof Rt=="number"&&de<Rt-1){bt(Te=>({...Te,pageIndex:Te.pageIndex+1,stepIndex:0}));return}return cn()}if($){const Te=wt.length;if(typeof ht=="number"&&ht<Te-1){bt(ze=>({...ze,stepIndex:ze.stepIndex+1}));return}if(typeof de=="number"&&typeof Rt=="number"&&de<Rt-1){bt(ze=>({...ze,pageIndex:ze.pageIndex+1,stepIndex:0}));return}return cn()}if(typeof C=="function"){try{C()}catch{}return}const he=Ce.current&&Ce.current._childOnNext;if(typeof he=="function"){try{he()}catch{}return}},Tt=T?K.title||K.label||w||M("common.popup","\uD31D\uC5C5"):a||_||(Array.isArray(s)?s[s.length-1]:void 0)||w||M("common.popup","\uD31D\uC5C5"),Jt=w||Tt,en=T?K.title??K.label??Tt:a??_??Tt,An=(he,Te)=>{const ze=Or(Le,de),Ze=zr(he,Te),He=it.answersByPage[ze]?.[Ze],Y=ew(he,{page:Le,pageIndex:de,step:he,stepIndex:Te,storedPayload:He,answersByPage:it.answersByPage,flowState:it}),pe={key:Ze,index:Te,stepIndex:ht,isLast:Te===Se.length-1};switch(he?.type){case"listen":return n.jsx(Es,{...pe,...Y,onDone:je=>Oe(he,Te,je)});case"confirm":return n.jsx(As,{...pe,...Y,onDone:je=>Oe(he,Te,je),onChange:je=>_e(he,Te,je)});case"confirmWithText":return n.jsx(Ns,{...pe,...Y,onDone:je=>Oe(he,Te,je),onChange:je=>_e(he,Te,je)});case"orderList":return n.jsx(Ds,{...pe,...Y,onDone:je=>Oe(he,Te,je),onChange:je=>_e(he,Te,je)});default:return null}},Nn=o.useRef(void 0);o.useEffect(()=>{const he=Nn.current;if(Nn.current=de,he===void 0||he===de||!Nr())return;const Te=Ce.current;if(!Te)return;const ze=document.activeElement;if(!(!ze||ze===document.body||!Te.contains(ze)||ze.disabled===!0))return;const Ze=Te.querySelector(`.training-steps ${Dn.split(", ").join(", .training-steps ")}`)??Array.from(Te.querySelectorAll(Dn)).find(He=>!He.closest('[aria-hidden="true"]'));try{Ze?.focus()}catch{}},[de]);const gn=T?ee.length>0?n.jsx("div",{className:"training-steps",children:Se.map((he,Te)=>An(he,Te))},`replay-${xe}`):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,Pt=$?n.jsxs(hd.Provider,{value:Qe,children:[mt?.pageTop?n.jsx("div",{className:"training-page-top",children:mt.pageTop}):null,n.jsx("div",{className:"training-steps",children:wt.map((he,Te)=>{const ze=he;return o.cloneElement(ze,{...ze.props,_stepIndex:Te,_totalSteps:wt.length,_stepKey:`step-${Te}`,_pageIndex:de})})},`replay-${xe}`),mt?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:mt.pageBottom}):null]}):null,St=o.useRef(-1),Mt=o.useCallback(()=>{if(!N)return;const he=ot,{results:Te,correct:ze,total:Ze}=Ls(ot),He={correct:ze,total:Ze,attempt:nt.current.length+1,previousAttempts:[...nt.current]};if(St.current===Nt.current)return He;St.current=Nt.current,Ff({items:Gf(Te),category:wd.has(N)?"sentence":"word",trainingType:N,entryPoint:k??"sentence",itemRef:A??null,correct:ze,total:Ze,score:typeof he?.score=="number"?he.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-q.current)/1e3)),dailyTotal:D??null});try{y?.(He)}catch{}return He},[N,k,D,A,ot,y]);o.useEffect(()=>{!ot||ot===zn||ot?.isEmpty||(Ls(ot).total??0)>0&&Mt()},[ot,Mt]);const Gt=o.useCallback(()=>{const he=Mt();Ot(),Ye(()=>{typeof b=="function"&&b(he),typeof m=="function"&&m()})},[b,m,Mt,st,Ye]),dn=o.useCallback(()=>xt(""),[xt]),yn=o.useCallback(()=>{Ye(()=>{typeof m=="function"&&m()})},[m,Ye]),Vt=n.jsxs("div",{className:`page-popup${rt?" page-popup--closing":""}`,role:"dialog","aria-modal":"true","aria-label":Jt,children:[n.jsxs("div",{ref:Ce,className:`page-popup__panel ${vt?"":"page-popup__panel--measuring"} ${ct==="center"?"page-popup__panel--center":ct==="top"?"page-popup__panel--top":""}`,children:[n.jsx(id,{title:en,subtitle:T?K.subtitle||K.label:Array.isArray(s)?s.join(" / "):void 0,desc:T?void 0:r,depth:T?K.depth:s,icon:T?K.icon:l,wrapperStyle:T?K.wrapperStyle:i,iconTooltip:T?K.iconTooltip:u,progressMax:Rt,progressIndex:de,pageIndex:de,pageCount:Rt,onBack:yn,onClose:yn}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${ct==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:$?Pt:T?gn:typeof g=="function"?g({registerOnNext:Me,registerOnResult:tt,panelRef:Ce,setResultOverlay:st}):g})}),n.jsx(ld,{onSettings:f,onNext:Yt,onResult:cn,useNoiseSettingBtn:!!(T?K.useNoiseSetting??!0:x),stepIndex:ht,stepCount:Je,pageIndex:de,pageCount:Rt,resultOpen:!!(ot&&!ot.isEmpty),hideNoiseRows:L})]}),ot&&!ot.isEmpty&&(B??aw)({score:ot.score,results:ot.results||ot.answers||[],contextsLength:ot.results?ot.results.length:ot.answers?ot.answers.length:0,onReplay:()=>{if(q.current=Date.now(),ot!==zn){const{correct:he,total:Te}=Ls(ot);nt.current.push({correct:he,total:Te})}if(Ot(),$e(he=>he+1),T){if(bt(Wr()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if($){bt(Wr());return}try{const he=Ce.current&&Ce.current._childOnResult;typeof he=="function"&&he({replay:!0})}catch{}},onClose:Gt,pending:ot===zn}),ot?.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(be,{htmlType:"button",variant:"main",size:48,onClick:Gt,label:M("training.result.done","\uC644\uB8CC")})})]})}),n.jsx(Ba,{message:Wt,position:"top",onClose:dn})]}),En=n.jsx(vs.Provider,{value:ye,children:Vt});return typeof document<"u"&&document.body?hn.createPortal(En,document.body):En}const Zn=rw;Zn.Page=Fr,Zn.ListenStep=md,Zn.ConfirmStep=Cd,Zn.ConfirmWithTextStep=fd,Zn.OrderListStep=bd,Zn.CardStep=gd,Zn.CardOrderStep=Wx;function ow(e=[]){const t=o.useRef(null),a=o.useCallback(s=>{const l=getComputedStyle(s),i=l.gridTemplateColumns.split(" ").filter(Boolean),u=parseFloat(i[0]??"0"),c=parseFloat(l.columnGap||"0")||0;if(!u||i.length<2){for(const p of s.children)p.style.gridColumn="";return}for(const p of s.children){const h=p;h.style.gridColumn="",h.removeAttribute("data-wide");const d=h.querySelector("button"),m=d?d.getBoundingClientRect().width:0;if(m<=u+.5)continue;const b=Math.min(i.length,Math.ceil((m+c)/(u+c)));b<=1||(h.style.gridColumn=`span ${b}`,h.setAttribute("data-wide",""))}},[]),r=o.useCallback(()=>{const s=t.current;if(s)for(const l of s.querySelectorAll(".word-search-result-block__items"))a(l)},[a]);return o.useLayoutEffect(()=>{r();const s=t.current;if(!s||typeof ResizeObserver>"u")return;const l=new ResizeObserver(()=>r());return l.observe(s),()=>l.disconnect()},[r,...e]),t}function sw({label:e,homonum:t}){const a=Ca()?.(e,t)??"",{imgRef:r,loading:s,hasImage:l,onLoad:i,onError:u}=as(a);return l?n.jsxs("div",{className:ue("word-image-tooltip__cell"),children:[s&&n.jsx("div",{className:ue("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:ue("word-image-tooltip__cell word-image-tooltip__cell--text h3"),children:n.jsx("span",{children:e})})}function Bd({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,p=t.top-i-8;p<8&&(p=t.bottom+8),c=Math.max(8,Math.min(c,u-l-8)),s({left:c,top:p})},[t]),!t||e.length===0?null:hn.createPortal(n.jsx("div",{ref:a,className:ue("word-image-tooltip"),style:{visibility:r?"visible":"hidden",left:r?.left??0,top:r?.top??-9999},children:n.jsx("div",{className:ue("word-image-tooltip__cells"),children:e.map(l=>n.jsx(sw,{label:l.label,homonum:l.homonum},`${l.label}_${l.homonum??1}`))})}),document.body)}function lw({titleIcon:e,resultCount:t,resultUnit:a,searchQuery:r,items:s,groups:l,selected:i=[],onSelect:u,maxSelect:c,onClearSelection:p,onPrint:h,onPrintEmpty:d,className:m,emptyHint:b,showEmptyText:y=!0,sectionType:C="page",disc:f}){const{t:x,i18n:g}=ke.useTranslation(),w=g.language?.startsWith("ko")??!1,{anchorRect:_,openAt:E,close:v}=_r(),[N,k]=o.useState(null),D=o.useCallback(()=>{v(),k(null)},[v]);Yy(D,!!N);const A=(r??"").trim(),B=/^[^,[\]\s]+$/.test(A)?A:"",F=B.length>0,L=r===void 0&&t===void 0,q=F?"match":L?"original":"ganada",[M,O]=o.useState(()=>q),[T,G]=o.useState("50"),[K,ee]=o.useState(1),[re,R]=o.useState(F);re!==F&&(R(F),O(q));const J=M==="match"&&!F||M==="original"&&!L?q:M,ne=o.useMemo(()=>[...F?[{value:"match",label:x("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...L?[{value:"original",label:x("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:x("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:x("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:x("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:x("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:x("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:x("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[x,F,L]),S=o.useMemo(()=>["10","25","50","100"].map(se=>({value:se,label:x("wordSearch.pageSize",{count:Number(se),defaultValue:`${se}\uAC1C\uC529 \uBCF4\uAE30`})})),[x]),$=se=>se.words?.[0],I=o.useMemo(()=>{const se=[...B].length,ye=vf(B),Ce=new Map;return xe=>{let $e=Ce.get(xe);return $e===void 0&&($e=ye((xe.words?.[0]?.label??"").slice(0,se))?0:1,Ce.set(xe,$e)),$e}},[B]),P=o.useCallback((se,ye)=>{const Ce=nt=>$(nt)?.label??"",xe=nt=>$(nt)?.syllables??[...Ce(nt)].length,$e=nt=>(nt.words??[]).reduce((ct,at)=>{const rt=parseInt(at.grade??"",10);return Number.isFinite(rt)&&rt<ct?rt:ct},999);switch(J){case"match":return I(se)-I(ye)||fn(Ce(se),Ce(ye));case"ganada":return fn(Ce(se),Ce(ye));case"ganada_desc":return fn(Ce(ye),Ce(se));case"syllable":return xe(se)-xe(ye)||fn(Ce(se),Ce(ye));case"syllable_desc":return xe(ye)-xe(se)||fn(Ce(se),Ce(ye));case"grade":return $e(se)-$e(ye)||fn(Ce(se),Ce(ye));case"grade_desc":return $e(ye)-$e(se)||fn(Ce(se),Ce(ye));default:return 0}},[J,I]),V=o.useMemo(()=>s.slice().sort(P),[s,P]),ie=Number(T)||10,U=o.useMemo(()=>(l??[]).flatMap(se=>se.items.slice().sort(P).map(ye=>({item:ye,label:se.label}))),[l,P]),ce=l?U.length:V.length,Z=Math.max(1,Math.ceil(ce/ie)),H=Math.min(K,Z),te=o.useMemo(()=>V.slice((H-1)*ie,H*ie),[V,H,ie]),W=o.useId(),z=o.useMemo(()=>{if(!l)return null;const se=U.slice((H-1)*ie,H*ie),ye=new Map;for(const{item:Ce,label:xe}of se)ye.has(xe)||ye.set(xe,[]),ye.get(xe).push(Ce);return[...ye.entries()].map(([Ce,xe])=>({label:Ce,items:xe}))},[l,U,H,ie]);o.useEffect(()=>{ee(1)},[M,T,ce,r]);const ae=ce>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(xn,{size:Lt,options:ne,value:J,onChange:O,ariaLabel:x("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(xn,{size:Lt,options:S,value:T,onChange:G,ariaLabel:x("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(Ho,{page:H,totalPages:Z,onChange:ee})]}):void 0,ve=se=>{u&&u(se)},me=t!==void 0&&a?n.jsxs(n.Fragment,{children:[x("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),x("wordSearch.resultTitleSuffix",{unit:w?jf(a):a})]}):void 0,le=t!==void 0&&t>0&&c!==void 0&&a?x("wordSearch.resultDisc",{unit:w?Mf(a):a,max:c,selected:i.length}):void 0,Be=f??le,Pe=l?l.length===0:s.length===0,Fe=ow([l,te,M,ie,K]),Ae=Pe&&!y&&!b;return n.jsxs(ka,{type:C,className:De("word-search-result-block",m),children:[n.jsxs("div",{ref:Fe,className:De("word-search-result-block__inner",Ae&&"word-search-result-block__inner--head-only"),children:[(me||ae||Be)&&n.jsxs("div",{className:"word-search-result-block__head",children:[n.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&n.jsx(lt,{icon:e,className:"word-search-result-block__head-icon"}),me&&n.jsx("span",{className:"word-search-result-block__title h3",children:me})]}),ae&&n.jsx("div",{className:"word-search-result-block__head-actions",children:ae}),Be&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:Be})]}),Pe&&(y||b)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[y&&n.jsx("p",{className:"word-search-result-block__empty body-3",children:x("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),b&&n.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:b})]}),l?(z??[]).map(se=>n.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${W}-${se.label}`,children:[n.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${W}-${se.label}`,children:se.label}),n.jsx("div",{className:"word-search-result-block__items",children:se.items.map(ye=>{const Ce=i.includes(ye.id);return n.jsx("div",{onMouseEnter:xe=>{E(xe.currentTarget),k(ye.words??[])},onMouseLeave:D,children:n.jsx(be,{htmlType:"button",size:"word",align:"grid",label:(ye.words??[]).map(xe=>xe.label),subLabel:(ye.words??[]).some(xe=>xe.subLabel)?(ye.words??[]).map(xe=>xe.subLabel):void 0,selected:Ce,onClick:()=>ve(ye.id),minWidth:200})},ye.id)})})]},se.label)):n.jsx("div",{className:"word-search-result-block__items",children:te.map(se=>{const ye=i.includes(se.id);return n.jsx("div",{onMouseEnter:Ce=>{E(Ce.currentTarget),k(se.words??[])},onMouseLeave:D,children:n.jsx(be,{htmlType:"button",size:"word",align:"grid",label:(se.words??[]).map(Ce=>Ce.label),subLabel:(se.words??[]).some(Ce=>Ce.subLabel)?(se.words??[]).map(Ce=>Ce.subLabel):void 0,selected:ye,onClick:()=>ve(se.id),minWidth:200})},se.id)})}),N&&_&&n.jsx(Bd,{words:N,anchorRect:_})]}),(p||h)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[p&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:x("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:i.length===0,onClick:i.length===0?void 0:p}),h&&n.jsx("div",{onClick:i.length===0?d:void 0,children:n.jsx(be,{htmlType:"button",size:"56",type:"bar",variant:"main",label:x("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:i.length===0,onClick:i.length===0?void 0:h})})]})]})}function iw(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 uw({sections:e,selectedList:t,count:a,onCountChange:r,maxCount:s=4,minCount:l=1,combinationSections:i,combinationSectionsForSlot:u,onSelect:c,placeholder:p="-",className:h,title:d,titleIcon:m,disc:b,showInfoButton:y=!0,onClearPhoneme:C,onSearch:f,onSearchEmpty:x,searchDisabled:g=!1,searchLabel:w,searchChecking:_=!1,pairMode:E=!1,sectionType:v="page",beforeSearchContent:N,beforeContent:k,afterContent:D,hideCountControl:A=!1,ordinal:B=!1}){const{t:F}=ke.useTranslation(),L=o.useMemo(()=>F("wordPairs.infoNotes",{returnObjects:!0}),[F]),q=o.useMemo(()=>Array.from({length:s-l+1},($,I)=>{const P=l+I;return{key:String(P),label:F("wordPairs.count",{n:P})}}),[F,s,l]),M=o.useMemo(()=>F("wordPairs.ordinals",{returnObjects:!0}),[F]),O=o.useCallback($=>B?F("wordPairs.phonemeOrdinalLabel",{ordinal:M[$-1]??$}):a===1?F("wordPairs.phonemeSingleLabel","\uC74C\uC808"):F("wordPairs.phonemeN",{n:$}),[B,M,a,F]),T=o.useCallback($=>B?F("wordPairs.phonemeContrastOrdinalLabel",{ordinal:M[$-1]??$}):a===1?F("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):F("wordPairs.phonemeContrast",{n:$}),[B,M,a,F]),G=o.useCallback(($,I)=>I?n.jsxs(n.Fragment,{children:[$,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):$,[]),{anchorRect:K,toggleAt:ee,close:re}=_r(),R=o.useCallback($=>r(Number($)),[r]),J=vn("(max-width: 767px)"),ne=o.useCallback($=>iw($,e).map(({label:I,value:P,displayLabel:V})=>{const ie=!!P&&P!=="\uC5C6\uC74C";return n.jsxs("span",{className:De("phoneme-select-block__cell-jamo-part",P?"":"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${P==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:P==="\uC5C6\uC74C"?"x":P||p}),ie&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:V??I})]},I)}),[e,p]),S=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(be,{htmlType:"button",size:40,type:J?"dot":void 0,icon:"info",label:J?void 0:F("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:F("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:K?"is-selected":void 0,"aria-expanded":!!K,"aria-haspopup":"dialog",onClick:$=>ee($.currentTarget)})}),K&&n.jsx(Un,{title:F("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:L,anchorRect:K,onClose:re})]});return n.jsxs(ka,{type:v,title:d,icon:m,disc:b,action:y?S:void 0,className:De("phoneme-select-block",h),children:[k,!A&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(_n,{options:q,value:String(a),onChange:R,size:40,ariaLabel:F("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),n.jsx("div",{className:"phoneme-select-block__cells",children:E?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map(($,I)=>{const P=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:ne(P)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:O(I+1)})]},I)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:F("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map(($,I)=>{const P=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:ne(P)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:T(I+1)})]},I)})})]}):t.map(($,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:ne($)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:O(I+1)})]},I))}),(i||u)&&n.jsx("div",{className:"phoneme-select-block__panels",children:n.jsx("div",{className:"phoneme-select-block__detail",children:E?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(($,I)=>{const P=t[I*2]??{};return n.jsx(On,{title:G(O(I+1),I===0),sections:u?u(P,I*2):i,selected:P,onSelect:c?.(I*2),align:"newline"},I)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map(($,I)=>{const P=t[I*2+1]??{};return n.jsx(On,{title:T(I+1),sections:u?u(P,I*2+1):i,selected:P,onSelect:c?.(I*2+1),align:"newline"},I)})})]}):t.map(($,I)=>n.jsx(On,{title:G(O(I+1),I===0),sections:u?u($,I):i,selected:$,onSelect:c?.(I),align:"newline"},I))})}),N&&n.jsx("div",{className:"phoneme-select-block__before-search",children:N}),(C||f||_)&&(()=>{const $=t.every(I=>{const P=ff(I);return Object.entries(P).every(([V,ie])=>!ie||V==="coda"&&ie===Il)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:$?x:void 0,children:[C&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:F("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:$,onClick:$?void 0:C}),f?n.jsx(be,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:_?n.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:w??F("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:$||g||_,onDisabledClick:_?()=>{}:void 0,"aria-busy":_||void 0,onClick:f}):_?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??F("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),D]})}function cw({title:e,sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:p,className:h}){const{t:d}=ke.useTranslation();return n.jsx(On,{className:h,title:e??d("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:p,align:"inline"})}function dw({title:e,headerAction:t,sections:a,selected:r,onSelect:s,className:l}){const{t:i}=ke.useTranslation();return a.length===0?null:n.jsx(On,{className:l,title:e??i("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:a,selected:r,onSelect:s,align:"newline"})}function pw({title:e,mode:t,onModeChange:a,matchMode:r,onMatchModeChange:s,positionCount:l,onPositionCountChange:i,inputMode:u,onInputModeChange:c,className:p}){const{t:h}=ke.useTranslation(),d={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}),b=[{label:d.searchMode,items:[d.include,d.pick,d.explicit],display:"segmented",labelAction:n.jsx(Za,{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:d.phonemeOrder,items:[d.orderAny,d.orderMatch],display:"segmented",labelAction:n.jsx(Za,{items:h("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:d.count,items:[m(1),m(2)],display:"segmented"},{label:d.inputMode,items:[d.charInput,d.pronInput],display:"segmented",labelAction:n.jsx(Za,{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={[d.searchMode]:t==="explicit"?d.explicit:t==="pick"?d.pick:d.include,[d.phonemeOrder]:r==="ordered"?d.orderMatch:d.orderAny,[d.count]:m(l),[d.inputMode]:u==="phoneme"?d.pronInput:d.charInput},C=(f,x)=>{x===d.searchMode?a(f===d.explicit?"explicit":f===d.pick?"pick":"include"):x===d.phonemeOrder?s(f===d.orderMatch?"ordered":"unordered"):x===d.count?i(f===m(2)?2:1):x===d.inputMode&&c(f===d.pronInput?"phoneme":"word")};return n.jsx(On,{className:p,title:e??h("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:b,selected:y,onSelect:C,align:"inline"})}function hw(e){const{title:t,items:a,columns:r,resizeStorageKey:s,gridTemplateColumns:l,mobileGridTemplateColumns:i,searchPlaceholder:u,searchFn:c,defaultSortKey:p,defaultSortAsc:h=!0,selectedId:d,selectedIds:m,onSelect:b,onClose:y,pageSizeOptions:C=[10,25,50,100],initialPageSize:f,emptyText:x,noMatchText:g,countLabel:w,topContent:_,className:E=""}=e,{t:v}=ke.useTranslation(),N=u??v("common.search","\uAC80\uC0C9"),k=x??v("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),D=g??v("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[A,B]=o.useState(""),[F,L]=o.useState(p??r[0]?.key??""),[q,M]=o.useState(h),[O,T]=o.useState(String(f??C[0]??10)),[G,K]=o.useState(1);o.useEffect(()=>{K(1)},[A,O]);const ee=c!==null,re=o.useCallback((U,ce)=>{if(!ce)return!0;const Z=ce.toLowerCase();return r.some(H=>{const te=U[H.key];return te==null?!1:String(te).toLowerCase().includes(Z)})},[r]),R=c??re,J=o.useMemo(()=>{const U=ee?a.filter(ce=>R(ce,A)):a;return F?[...U].sort((ce,Z)=>{const H=ce[F],te=Z[F];return H===te?0:vr(H,te,q)}):U},[a,A,F,q,ee,R]),ne=Math.max(1,Math.ceil(J.length/Number(O)));G>ne&&K(ne);const S=Math.min(G,ne),$=J.slice((S-1)*Number(O),S*Number(O)),I=o.useCallback(U=>{F===U?M(ce=>!ce):(L(U),M(!0)),K(1)},[F]),P=o.useMemo(()=>{if(typeof w=="function"){const U=J.length,ce=w(U);if(typeof ce=="string"){const Z=ce.lastIndexOf(String(U));if(Z>=0)return{prefix:ce.slice(0,Z),suffix:ce.slice(Z+String(U).length)}}return{label:ce}}if(typeof w=="string"&&w.includes("{n}")){const[U,ce]=w.split("{n}");return{prefix:U,suffix:ce}}return{prefix:v("common.totalCountPrefix","\uCD1D "),suffix:v("common.totalCountSuffix","\uAC1C")}},[w,J.length,v]),V=o.useMemo(()=>r.map(U=>({label:U.label,onClick:U.sortable!==!1?()=>I(U.key):void 0,className:U.className,sortDir:U.sortable!==!1&&F===U.key?q?"asc":"desc":null})),[r,F,q,I]),ie=o.useMemo(()=>C.map(U=>({value:String(U),label:v("common.pageSizeLabel",{n:U})})),[C,v]);return n.jsxs(Fn,{className:`popup-list ${E}`,title:t,onClose:y,children:[_,"label"in P&&n.jsx("p",{className:"toolbar__count body-1",children:P.label}),n.jsx(Vo,{count:"label"in P?void 0:{value:J.length,prefix:P.prefix,suffix:P.suffix},search:ee?{value:A,onChange:B,placeholder:N}:void 0,pageSize:{options:ie,value:O,onChange:T},pagination:{page:S,total:ne,onChange:K}}),n.jsx(ts,{size:"medium",gridTemplateColumns:l,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:s,fields:V,items:$,onRowClick:b,renderRow:U=>{const ce=m!=null?U.id!=null&&m.has(U.id):d!=null&&U.id===d;return r.map(Z=>({content:Z.render?Z.render(U):U[Z.key]??"",className:De(Z.className,ce&&"popup-list__row--selected")}))},empty:ee&&A!==""&&a.length>0?D:k})]})}function kd(e){const{title:t,message:a,topContent:r,details:s,children:l,confirmLabel:i,cancelLabel:u,hideCancel:c=!1,extraAction:p,confirmVariant:h="main",confirmDisabled:d=!1,onConfirm:m,closeOnConfirm:b=!0,onClose:y,inline:C,size:f="small",className:x,initialFocus:g="close"}=e,{t:w}=ke.useTranslation(),_=o.useRef(null);o.useEffect(()=>{if(C||g==="close")return;const A=_.current?.closest(".popup-panel"),B=Array.from(A?.querySelectorAll(".popup-footer--buttons button")??[]),F=g==="confirm"?B[B.length-1]:c?void 0:B[p?1:0];F&&!F.disabled&&F.focus()},[]);const E=o.useRef(!1),[v,N]=o.useState(!1),k=A=>{let B=!1;return{close:()=>{B=!0,A()},didClose:()=>B}},D=async A=>{if(E.current)return;E.current=!0;const B=typeof document<"u"?document.activeElement:null;N(!0);let F=!1;try{F=await A()}catch(L){typeof console<"u"&&console.error(L)}finally{F||(E.current=!1,N(!1),requestAnimationFrame(()=>{const L=document.activeElement;(!L||L===document.body)&&B?.isConnected&&B.focus()}))}};return n.jsxs(Fn,{title:t,onClose:y,closeDisabled:v,inline:C,size:f,className:De("confirm-popup",r!=null&&"confirm-popup--has-top",x),buttons:[...p?[{label:p.label,variant:p.variant??"default",disabled:p.disabled||v,onClick:async({closeWithAnimation:A})=>{await D(async()=>{const B=k(A);await p.onClick(B.close);const F=p.closeOnClick??!0;return F&&A(),F||B.didClose()})}}]:[],...c?[]:[{label:u??w("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:v,onClick:({closeWithAnimation:A})=>A()}],{label:i??w("common.confirm","\uD655\uC778"),variant:h,disabled:d||v,onClick:async({closeWithAnimation:A})=>{await D(async()=>{const B=k(A);return await m(B.close),b&&A(),b||B.didClose()})}}],children:[r!=null&&n.jsx("div",{className:"confirm-popup__top",children:r}),s&&s.length>0&&n.jsx(nr,{children:s.map((A,B)=>n.jsx(un,{label:A.label,children:n.jsx("span",{className:"panel-row__text body-2",children:A.value})},B))}),n.jsx("p",{ref:_,className:"body-2 confirm-popup__message",children:a}),l]})}function mw(e,t,a={}){const{t:r}=ke.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]),p=s?n.jsx(kd,{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:p,allowClose:u}}function Cw({onApply:e,onCancel:t}){const{t:a}=ke.useTranslation(),[r,s]=o.useState(""),[l,i]=o.useState(!1),[u,c]=o.useState(null),p=o.useRef(null),h=o.useId();o.useEffect(()=>{p.current?.focus()},[]);const d=o.useCallback(async y=>{const C=r.trim();if(C){i(!0),c(null);try{await e(C),y()}catch(f){c(Hl(f)),i(!1),requestAnimationFrame(()=>p.current?.focus())}}},[r,e]),m=o.useCallback((y,C)=>{y.key==="Enter"&&!y.nativeEvent.isComposing&&d(C)},[d]),b=y=>{s(y.target.value),c(null)};return n.jsx(Fn,{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})=>{d(y)}}],children:({closeWithAnimation:y})=>n.jsxs(n.Fragment,{children:[n.jsx("input",{ref:p,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:b,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 Ad=["var(--color-main)","var(--color-sub)"],fw=2e3;function bw(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 $s({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,x=(g,w)=>Array.from({length:g}).map((_,E)=>{const v=6+Math.random()*12,N=Math.round(Math.min(18,v*Math.min(1.5,1+r*.4))),k=Ad[Math.floor(Math.random()*Ad.length)],D=Math.random()*300,A=(360+Math.random()*260)*r*1.2,B=(w==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,F=Math.cos(B)*A,L=Math.sin(B)*A*1.35,q=Math.random()*720-360,M=(1200+Math.random()*3e3)*Math.min(1.6,1+r*.3),O=Math.random()>.7?"50%":"3px";return{id:`${w}-${E}`,side:w,size:N,color:k,delay:D,vx:F,vy:L,angularVel:q,life:M,borderRadius:O}});return[...x(C,"left"),...x(f,"right")]},[t,r]),u=o.useRef(null),c=o.useRef({}),p=o.useRef(null),h=o.useRef(s);o.useEffect(()=>{h.current=s},[s]);const d=o.useRef(null),m=o.useRef(null),b=()=>{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=b()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const re=setTimeout(()=>h.current?.(),0);return()=>clearTimeout(re)}const C=1200,f=performance.now(),x=m.current&&m.current!==document.body?m.current.getBoundingClientRect():null,g=Math.max(60,(window.innerHeight||800)*.05),w=re=>Math.max(40,(re||window.innerWidth)*.02),_=x?.width||window.innerWidth||375,E=x?.height||window.innerHeight||812,v=re=>{const R=[...re].sort((J,ne)=>J-ne);return R[Math.floor(R.length/2)]||1},N=v(i.map(re=>Math.abs(re.vy))),k=v(i.map(re=>Math.abs(re.vx))),D=Math.sqrt(2*C*(E*.72+g))/N,A=N*D/C,B=_*.5/(k*A),F=(re,R,J)=>Math.min(J,Math.max(R,re)),L=F(D,.8,2.4),q=F(B,.7,2.2),M=a>0?a/fw:1,O=i.map(re=>({...re,life:re.life*M,vx:re.vx*q,vy:re.vy*L,startTime:f+re.delay,ended:!1})),T=x?{x:x.left-w(x.width),y:x.top+x.height+g}:{x:-w(window.innerWidth),y:window.innerHeight+g},G=x?{x:x.left+x.width+w(x.width),y:x.top+x.height+g}:{x:window.innerWidth+w(window.innerWidth),y:window.innerHeight+g},K=re=>{let R=!1;for(const J of O){const ne=c.current[J.id];if(!ne||!ne)continue;if(re<J.startTime){ne.style.display="none",R=!0;continue}if(!J._inited){const H=J.side==="left"?T.x:G.x,te=J.side==="left"?T.y:G.y;ne.style.left=`${H}px`,ne.style.top=`${te}px`,ne.style.transform="translate3d(0px, 0px, 0)",ne.style.display="block",ne.style.zIndex="100000",typeof J.color=="string"&&J.color.startsWith("var(")&&(ne.style.background=bw(ne,J.color)??"#FF0060"),J._inited=!0}const S=(re-J.startTime)/1e3;if(S<0)continue;const $=J.life/1e3;if(S>=$){ne.style.opacity="0",ne.style.display="none",J.ended=!0;continue}R=!0;const I=J.side==="left"?T.x:G.x,P=J.side==="left"?T.y:G.y,V=I+J.vx*S,ie=P+J.vy*S+.5*C*S*S,U=(J.angularVel||0)*S,ce=V-I,Z=ie-P;ne.style.transform=`translate3d(${ce}px, ${Z}px, 0) rotate(${U}deg)`,ne.style.opacity=`${Math.max(0,1-S/$)}`}R?p.current=requestAnimationFrame(K):h.current?.()};p.current=requestAnimationFrame(K);const ee=setTimeout(()=>{try{if((m.current?m.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const re=document.createElement("div");re.className="party-container",re.style.position="fixed",re.style.inset="0",re.style.pointerEvents="none",re.style.overflow="visible",re.style.zIndex="2147483647";for(const R of i){const J=document.createElement("span");J.className=`confetti confetti--${R.side}`,J.setAttribute("aria-hidden","true"),J.style.display="none",J.style.position="fixed",J.style.left="0px",J.style.top="0px",J.style.width=`${R.size}px`,J.style.height=`${Math.max(4,R.size*.6)}px`,J.style.background=R.color,J.style.borderRadius=R.borderRadius,J.style.transform="translate3d(0,0,0)",J.style.opacity="0",re.appendChild(J),c.current[R.id]=J}(document.body||m.current).appendChild(re),d.current=re}}catch{}},300);return()=>{if(p.current&&cancelAnimationFrame(p.current),clearTimeout(ee),d.current){try{d.current.remove()}catch{}d.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 Rs=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function gw({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:Rs(u.count),strength:Rs(u.strength),duration:Rs(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($s,{active:t,trigger:e}),a&&n.jsx($s,{active:!0,trigger:a.n,count:a.count,strength:a.strength,duration:a.duration,onComplete:s})]})}function yw({title:e,sub:t,rightAction:a,titleAction:r,badge:s,badgeVariant:l="default",documentTitle:i,onBack:u,backLabel:c,wrap:p=!1}){const{t:h}=ke.useTranslation();$y(typeof e=="string"?e:i??null);const d=c??h("common.back","\uB4A4\uB85C");return n.jsxs("div",{className:p?"page-title page-title--wrap":"page-title",children:[n.jsxs("div",{className:"page-title__main",children:[n.jsxs("div",{className:"page-title__title-row",children:[u&&n.jsx(be,{htmlType:"button",className:"page-title__back",size:48,type:"dot",icon:"chevron-left",iconSize:"large",useBorder:!1,iconColor:"var(--color-text-primary)",ariaLabel:d,showTooltipInfo:d,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 vw(e){return e??""}const Nd=o.createContext({words:[],loading:!1});function _w(){return o.useContext(Nd)}function xw({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c,children:p}){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(Nd.Provider,{value:h,children:p})}function ww({items:e,actions:t,columns:a,flat:r=!1,className:s,style:l}){const i=a??e.length;return n.jsx("section",{className:De("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 Bw=(e,t)=>`${e} / ${t}`;function kw({blocks:e,sectionTitles:t,logo:a,footer:r,pageLabel:s=Bw,pageWidth:l,pageHeight:i,margin:u,className:c,style:p}){const{t:h}=ke.useTranslation(),d=o.useRef(null),m=o.useRef(null),b=o.useRef(null),y=o.useRef(null),[C,f]=o.useState(null),[x,g]=o.useState(!1);o.useEffect(()=>{const M=d.current;if(!M)return;const O=()=>g(M.scrollWidth>M.clientWidth+1);if(O(),typeof ResizeObserver>"u")return;const T=new ResizeObserver(O);return T.observe(M),()=>T.disconnect()},[C]);const w=e.map(M=>`${M.id}\0${M.section??""}\0${M.group??""}`).join(""),_=C&&C.shape===w?C.pages:null,[E,v]=o.useState(0);o.useEffect(()=>{const M=y.current;if(!M||typeof ResizeObserver>"u")return;const O=new ResizeObserver(()=>v(M.offsetHeight));return O.observe(M),()=>O.disconnect()},[]);const[N,k]=o.useState(0);o.useEffect(()=>{const M=m.current;if(!M||typeof ResizeObserver>"u")return;let O=null;const T=typeof requestAnimationFrame=="function"?ee=>requestAnimationFrame(ee):ee=>setTimeout(ee,16),G=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:ee=>clearTimeout(ee),K=new ResizeObserver(()=>{O==null&&(O=T(()=>{O=null,k(ee=>ee+1)}))});return Array.from(M.children).forEach(ee=>K.observe(ee)),()=>{K.disconnect(),O!=null&&G(O)}},[w]),o.useLayoutEffect(()=>{const M=m.current,O=y.current;if(!M||!O)return;const T=$=>$.getBoundingClientRect().height||$.offsetHeight,G=new Map;b.current?.querySelectorAll("[data-chrome-section]").forEach($=>{G.set($.dataset.chromeSection??"",T($))});const K=$=>T(O)-(G.get($??"")??0),ee=Array.from(M.children).map($=>T($)),re=[];e.forEach(($,I)=>{const P=re[re.length-1],V=P?e[P[0]]:void 0;V&&$.group!=null&&V.group===$.group&&V.section===$.section?P.push(I):re.push([I])});const R=[];let J=[],ne=0;const S=()=>{J.length&&R.push(J),J=[],ne=0};re.forEach($=>{const I=$.reduce((V,ie)=>V+ee[ie],0),P=K(e[$[0]].section);J.length&&e[J[0]].section!==e[$[0]].section&&S(),I>P?$.forEach(V=>{J.length&&ne+ee[V]>P+.01&&S(),J.push(V),ne+=ee[V]}):(J.length&&ne+I>P+.01&&S(),$.forEach(V=>J.push(V)),ne+=I)}),S(),f($=>$&&$.shape===w&&JSON.stringify($.pages)===JSON.stringify(R)?$:{shape:w,pages:R})},[w,E,l,i,u,N]);const D=Po,A=D,B=r??n.jsxs(n.Fragment,{children:[n.jsx("img",{src:A,alt:"IHAB",className:"report-doc__logo"}),"\xA9 IHAB, Inc. All rights reserved."]}),F=(M,O,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:B}),n.jsx("span",{className:"report-doc__page-no",children:s(M,O)})]})}),L=Array.from(new Set(e.map(M=>M.section??""))),q={...l?{"--report-page-w":l}:null,...i?{"--report-page-h":i}:null,...u?{"--report-margin":u}:null,...p};return n.jsxs("div",{ref:d,className:De("report-doc",c),style:q,tabIndex:x?0:void 0,role:x?"group":void 0,"aria-label":x?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:b,children:L.map(M=>{const O=F(1,1,M||void 0);return n.jsxs("div",{"data-chrome-section":M,children:[O.header,O.footer]},M)})}),n.jsx("div",{ref:m,className:"report-doc__measure-blocks",children:e.map(M=>n.jsx("div",{children:M.content},M.id))})]}),_&&n.jsx("div",{className:"report-doc__pages",children:_.map((M,O)=>{const{header:T,footer:G}=F(O+1,_.length,e[M[0]].section);return n.jsxs("section",{className:"report-doc__page",children:[T,M.map(K=>n.jsx("div",{children:e[K].content},e[K].id)),G]},O)})})]})}function Aw({title:e,fields:t,columns:a=4,className:r,style:s}){return n.jsxs("div",{className:De("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 da=new Map;let Hr=null;const Nw=12;function Ew(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 Vr(){const e=new Map;for(const t of da.keys()){if(!t.isConnected)continue;const a=Ew(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+Nw)}}}function Dw(e){return typeof window>"u"?()=>{}:(da.set(e,(da.get(e)??0)+1),da.get(e)===1&&typeof ResizeObserver<"u"&&(Hr??(Hr=new ResizeObserver(()=>Vr())),Hr.observe(e)),Vr(),()=>{const t=(da.get(e)??1)-1;if(t>0){da.set(e,t),Vr();return}da.delete(e),Hr?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),Vr()})}function Sw({title:e,message:t,actionLabel:a,onAction:r,icon:s,onClose:l,className:i=""}){const{t:u}=ke.useTranslation(),c=a??u("common.update","\uC5C5\uB370\uC774\uD2B8"),p=o.useRef(null),h=o.useRef(!1);return o.useLayoutEffect(()=>{const d=p.current,m=d?.parentElement?.closest(".update-alert-stack")??d,b=m?Dw(m):null;return()=>{b?.(),h.current&&d&&d.contains(document.activeElement)&&fr(d)}},[]),n.jsxs("div",{ref:p,className:De("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(Ks,{size:20,strokeWidth:2})}),n.jsxs("div",{className:"update-alert__body",children:[n.jsx("div",{className:"update-alert__title h4",children:e}),n.jsx("div",{className:"update-alert__message body-3",children:t})]})]}),r&&n.jsx(be,{htmlType:"button",size:32,variant:"main",shape:"pill",className:"update-alert__action",onClick:r,children:c})]})}function jw({title:e,titleLevel:t=3,description:a,topActions:r,children:s,footerLeft:l,footerRight:i,ariaLabel:u,onClick:c,draggable:p,onDragStart:h,onDragEnd:d,className:m}){const b=t?`h${t}`:"div",y=l!=null||i!=null,C=s!=null&&s!==!1,f=o.useCallback(x=>{c&&x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),c())},[c]);return n.jsxs("div",{className:De("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:p,onDragStart:h,onDragEnd:d,children:[n.jsxs("div",{className:"training-card__header",children:[n.jsxs("div",{className:"training-card__title-row",children:[typeof e=="string"?n.jsx(b,{className:"training-card__title h4",children:e}):e,r!=null&&n.jsx("div",{className:"training-card__top-actions",onClick:x=>x.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 Tw({title:e,titleLevel:t=3,count:a,collapsed:r=!1,onToggle:s,beforeSort:l,sort:i,actions:u,empty:c=!1,emptyContent:p,dragOver:h=!1,onDragOver:d,onDragLeave:m,onDrop:b,children:y,className:C}){const{t:f}=ke.useTranslation(),x=o.useId(),g=t?`h${t}`:"span",w=s!=null,_=De("training-card-group",h&&"training-card-group--dragover",r&&"training-card-group--collapsed",w&&"training-card-group--collapsible",C);return n.jsxs("div",{className:_,onDragOver:d,onDragLeave:m,onDrop:b,role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?x:void 0,children:[n.jsxs("header",{className:"training-card-group__header",children:[w&&n.jsx(be,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:r?"chevron-right":"chevron-down",ariaLabel:typeof e=="string"&&e?r?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(g,{id:x,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:E=>E.stopPropagation(),children:[l,i&&n.jsx(xn,{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:p}):n.jsx("div",{className:"training-card-group__grid",children:y}))]})}const Mw="speechear:saved_word_tables";function Lw(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.id=="string"&&typeof t.name=="string"&&Array.isArray(t.items)}function $w(){try{const e=localStorage.getItem(Mw);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(Lw):[]}catch{return[]}}function Ed(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 Ps(e){return e.map(t=>t.homonum!=null?`${t.word}#${t.homonum}`:t.word).join("|")}function Rw(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 Pw({title:e,titleIcon:t,disc:a,filterTitle:r,filterCollapsible:s,filterDefaultCollapsed:l,filterCollapsed:i,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:p,code:h,baseItem:d,baseContentTypes:m,cellCapacity:b,maxItemsPerPage:y,items:C,onSaveComplete:f,onLoad:x,onRemoveItem:g,onCopyItem:w,onReplaceItem:_,onPickForm:E,onReset:v,resetLabel:N,saveButtonLabel:k,secondarySaveButtonLabel:D,onReorder:A,showCellCount:B,onAddItem:F,className:L,renderSavePopup:q,renderWordSearch:M,hideControls:O,saveOnly:T,tableName:G,nameValue:K,onNameChange:ee,descriptionValue:re,onDescriptionChange:R,namePlaceholder:J,descriptionPlaceholder:ne,existingNames:S,editingName:$,onCancel:I,initialItemsPerPage:P,renderCellAction:V,actionsLeftExtra:ie}){const{t:U}=ke.useTranslation(),ce=N??U("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),Z=C===void 0,H=!!ee,[te,W]=o.useState([]),z=(K??"").trim(),ae=z||(J??"").trim(),ve=(re??"").trim()||(ne??"").trim(),me=(S??[]).map(we=>we.trim().toLowerCase()),le=[$?.trim().toLowerCase(),...te].filter(we=>!!we),Be=[...me];for(const we of le){const Ie=Be.indexOf(we);Ie!==-1&&Be.splice(Ie,1)}const Pe=z!==""&&Be.includes(z.toLowerCase()),[Fe,Ae]=o.useState(Array(4).fill(null)),[se,ye]=o.useState(4),[Ce,xe]=o.useState(null),$e=Fe.slice(0,se),nt=!!p?.show,[ct,at]=o.useState(!0),[rt,Ee]=o.useState(!0),Ue=p&&{...p,top:ct,bottom:rt},[Ne,Ye]=o.useState("landscape"),[et,ft]=o.useState([...wc]),[vt,dt]=o.useState("show"),[jt,ot]=o.useState(!0),[st,At]=o.useState(!0),Nt=o.useRef(null),Ot=o.useRef([]),[Wt,xt]=o.useState(P==="all"?Number.POSITIVE_INFINITY:P??8),[it,bt]=o.useState("right"),[pt,kt]=o.useState(!1),[mt,wt]=o.useState(!1),{toastMessage:de,toastType:Le,showWarning:Se,clearToast:Je}=Zi("warning"),ht=o.useCallback(()=>xe(null),[xe]);d&&Z&&Dt("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[Rt,Me]=o.useState(()=>Math.max(C?.length??1,1)),tt=Math.max(b??0,C?.length??0,1),Ft=b!=null||!!B,_t=Z?se:B?Math.max(Rt,C?.length??1,1):tt,{width:Q,height:_e}=sa[Ne],Oe=!Z&&!B,Ve=Math.max(1,Math.min(tt,y??tt)),Bt=Math.min(Wt,Ve),Qe=Oe?Bt:_t,zt=Math.ceil((C?.length??0)/Math.max(1,Qe)),Ht=(C?.length??0)<tt?Math.floor((C?.length??0)/Math.max(1,Qe))+1:0,cn=Oe?Math.max(1,zt,Ht):0,Yt=Oe?Array.from({length:cn},(we,Ie)=>(C??[]).slice(Ie*Qe,(Ie+1)*Qe)):null,Tt=!!Yt&&Yt.length>1,Jt=Z?$e.some(we=>we!==null&&we.length>1):(C??[]).some(we=>(we.words??[]).length>1),en=G?.trim()||`${Jl(Wa())} ${Jt?U("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):U("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,An=o.useCallback(()=>Tt?Ot.current.filter(we=>we!==null):Nt.current?[Nt.current]:[],[Tt]),{print:Nn,openNewWindow:gn,downloadHtml:Pt}=Cs({getElements:An,paperW:Q,paperH:_e,fileName:en,onPopupBlocked:()=>{Se(U("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."))}}),St=we=>{ye(we),Ae(Ie=>Ie.length>=we?Ie:[...Ie,...Array(we-Ie.length).fill(null)]),xe(null)},Mt=we=>{Ae(Ie=>{const ut=[...Ie];return ut[we]=null,ut}),Ce===we&&xe(null)},Gt=we=>{if(Ce===null)return;const Ie=Ce;Ae(Et=>{const pn=[...Et];return pn[Ie]=we.length>0?we:null,pn});const ut=$e.findIndex((Et,pn)=>pn>Ie&&Et===null);xe(ut!==-1?ut:null)},dn=Z?$e.some(we=>we?.some(Ie=>!!Ie.colloquialPronunciation)):(C??[]).some(we=>(we.words??[]).some(Ie=>!!Ie.colloquialLabel)),yn=!Z&&Bc([...d?[d]:[],...C??[]]),Vt=o.useMemo(()=>Ca()?Z?Fe.slice(0,se).flatMap(we=>(we??[]).map(Ie=>[Ie.word,Ie.homonum])):(we=>we.flatMap(Ie=>(Ie.words??[]).map(ut=>[ut.label,ut.homonum])))([...d?[d]:[],...C??[]]):[],[Z,Fe,se,C,d]),[En,he]=o.useState(!1);o.useEffect(()=>{if(Vt.length===0)return;let we=!1;return Promise.all(Vt.map(([Ie,ut])=>$l(Ie,ut))).then(Ie=>{we||he(Ie.some(Boolean))},()=>{}),()=>{we=!0}},[Vt]);const Te=Vt.length>0&&En,ze=o.useMemo(()=>[...Z||B?[{label:U("wordTable.filter.columns","\uCE78 \uC218"),items:e_.map(we=>({value:`${we}\uCE78`,displayLabel:U("wordTable.filter.column",{count:we})})),display:"segmented"}]:[],...Oe&&(C?.length??0)>0?[Tc(U,{hasPairs:Jt,itemCount:tt,max:y})]:[],...Tt?[n_(U)]:[]],[U,Z,B,Oe,C?.length,Jt,tt,y,Tt]),Ze={...Z||B?{[U("wordTable.filter.columns","\uCE78 \uC218")]:`${_t}\uCE78`}:{},...Oe&&(C?.length??0)>0?{[U(Jt?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${Bt}\uAC1C`}:{},...Tt?{[U("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:it}:{}},He=(we,Ie)=>{Ie===U("wordTable.filter.columns","\uCE78 \uC218")?Z?St(parseInt(we)):Me(parseInt(we)):Ie===U(Jt?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")?xt(Mc(parseInt(we),tt)):Ie===U("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&bt(Lc(we))},Y=Z?Rw($e.filter(we=>we!==null&&we.length>0).map(we=>({id:Ps(we),words:we.map(Ed)}))):C??[],pe=()=>{Z&&Ae(we=>we.length>se?we.slice(0,se):we)},je=(we=!1)=>{if(wt(we),H&&f){const Ie=ae.trim().toLowerCase();Ie&&W(ut=>ut.includes(Ie)?ut:[...ut,Ie]),f(ae,Y,ve||void 0,we),pe();return}if(T&&f){f("",Y,void 0,we),pe();return}if(f){kt(!0);return}Pt()},[qe,Ge]=o.useState(!1),[Xe,gt]=o.useState(""),Ct=Xe.trim(),ge=Ct!==""&&me.includes(Ct.toLowerCase()),j=()=>{gt(ae?U("wordTable.save.copyName",{name:ae,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),Ge(!0)},X=()=>{!Ct||ge||!f||(f(Ct,Y,ve||void 0,!0),pe(),Ge(!1))},fe=Y.length===0,Re=fe||H&&(ae===""||Pe),We=()=>{if(fe){Se(U("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(H&&ae===""){Se(U("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}H&&Pe&&Se(U("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},Ke=n.jsx(Aa,{items:Y,orientation:Ne,contentTypes:et,baseItem:d,baseContentTypes:m,cutLine:vt,showOutline:jt,showDivLine:st,count:_t});return n.jsxs(n.Fragment,{children:[n.jsxs(ka,{type:"page",icon:t,title:e,disc:a,className:De("word-table-block",L),children:[qe&&n.jsx(Fn,{size:"small",title:D??U("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>Ge(!1),footer:({closeWithAnimation:we})=>n.jsxs(n.Fragment,{children:[n.jsx(be,{htmlType:"button",size:48,type:"bar",label:U("common.cancel","\uCDE8\uC18C"),onClick:we}),n.jsx(be,{htmlType:"button",size:48,type:"bar",variant:"main",label:U("common.save","\uC800\uC7A5"),disabled:!Ct||ge,onClick:X})]}),children:n.jsx(Yn,{label:U("wordTable.save.nameLabel","\uC774\uB984"),value:Xe,onChange:gt,placeholder:U("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:X,error:ge?U("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),pt&&f&&q?.({defaultName:typeof e=="string"?e:U("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:Ke,previewW:Q,previewH:_e,items:Y,existingNames:$w().map(we=>we.name),saveAsNew:mt,onSave:(we,Ie)=>{f(we,Y,Ie,mt),pe(),kt(!1)},onCancel:()=>kt(!1)}),(Z||F)&&Ce!==null&&M?.({cellIndex:Ce,onConfirm:Z?Gt:we=>{if(F){const Ie=we[0];if(Ie){const ut=new Set((C??[]).map(pn=>pn.id));let Et=Ps([Ie]);for(let pn=2;ut.has(Et);pn++)Et=`${Ps([Ie])}~${pn}`;F({id:Et,words:[Ed(Ie)]})}}xe(null)},onClose:ht}),!O&&n.jsx(ds,{title:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,hasImage:Te,hasColloquial:dn,hasCaption:yn,contentTypes:et,orientation:Ne,showOutline:jt,cutLine:vt,showDivLine:st,setters:{setContentTypes:ft,setOrientation:Ye,setShowOutline:ot,setCutLine:dt,setShowDivLine:At,setShowTopInfo:at,setShowBottomInfo:Ee},showCutLine:(Oe?Qe:_t)>1,showDivLine2:Jt,middleSections:ze,extraSelected:Ze,onExtraSelect:He,showPaperBands:nt,showTopInfo:ct,showBottomInfo:rt}),Tt&&Yt?n.jsx("div",{className:"word-table-block__pages",children:Yt.map((we,Ie)=>n.jsx(Aa,{orientation:Ne,contentTypes:et,cutLine:vt,showOutline:jt,showDivLine:st,count:Qe,items:we,baseItem:d,baseContentTypes:m,onRemoveItem:g,onCopyItem:w,onReplaceItem:_,onPickForm:E,onReorder:A&&((ut,Et)=>A(ut+Ie*Qe,Et+Ie*Qe)),indexOffset:Ie*Qe,totalCount:C?.length??0,renderCellAction:V&&((ut,Et)=>V(ut+Ie*Qe,Et)),showFillerAdd:!!F,onActivateCell:F?(ut=>xe(ut+Ie*Qe)):void 0,addableCount:Ft?Math.max(0,Math.min(Qe,tt-Ie*Qe)):void 0,brand:Ue,code:h,contentRef:ut=>{Ot.current[Ie]=ut},pageNumber:{current:Ie+1,total:Yt.length},pageNumberPosition:it},Ie))}):n.jsx(Aa,{orientation:Ne,contentTypes:et,cutLine:vt,showOutline:jt,showDivLine:st,count:_t,items:Z?void 0:C??[],baseItem:Z?void 0:d,baseContentTypes:m,editCells:Z?$e:void 0,activeCell:Ce,onActivateCell:Z||F?xe:void 0,onRemoveCell:Z?Mt:void 0,onRemoveItem:Z?void 0:g,onCopyItem:Z?void 0:w,onReplaceItem:Z?void 0:_,onPickForm:Z?void 0:E,onReorder:Z?void 0:A,addableCount:Ft?_t:void 0,renderCellAction:Z?void 0:V,brand:Ue,code:h,showFillerAdd:!!F,contentRef:Nt}),!O&&!T&&ie!=null&&n.jsx("div",{className:"word-table-block__table-actions",children:ie}),H&&!O&&n.jsxs(nr,{size:"medium",labelWidth:64,useBorder:!1,useRowBorder:!1,className:"word-table-block__meta",children:[n.jsx(un,{variant:"custom",label:U("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(Yn,{required:!0,value:K??"",onChange:ee,placeholder:J?J+U("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):U("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:U("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:Pe?U("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:we=>{(we.key==="Tab"&&!we.shiftKey||we.key===" ")&&!(K??"").trim()&&(J??"").trim()&&(we.preventDefault(),ee?.(J??""))}})}),n.jsx(un,{variant:"custom",label:U("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(Yn,{value:re??"",onChange:R,placeholder:ne?ne+U("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):U("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:U("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:we=>{(we.key==="Tab"&&!we.shiftKey||we.key===" ")&&!(re??"").trim()&&(ne??"").trim()&&(we.preventDefault(),R?.(ne??""))}})})]})]}),!O&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!T&&x&&n.jsx(be,{htmlType:"button",size:40,type:"bar",label:U("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:x}),!T&&v&&n.jsx(be,{htmlType:"button",size:40,type:"bar",label:ce,onClick:v}),!T&&n.jsx(be,{htmlType:"button",size:40,type:"bar",label:U("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:gn})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[I&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:U("common.cancel","\uCDE8\uC18C"),onClick:I}),!T&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:U("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:Nn}),D&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:D,onClick:()=>H?j():je(!0),disabled:fe,onDisabledClick:()=>{Se(U("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."))}}),n.jsx(be,{htmlType:"button",size:"56",type:"bar",variant:"main",label:k??U("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>je(!1),disabled:Re,onDisabledClick:We})]})]}),n.jsx(Ba,{message:de,type:Le,onClose:Je})]})}const Fw=8;function Dd({items:e,className:t}){const{t:a}=ke.useTranslation(),r=o.useRef(null),[s,l]=o.useState(null),i=o.useCallback(()=>l(r.current?.getBoundingClientRect()??null),[]),u=o.useCallback(()=>l(null),[]),c=gr(!!s,w=>{w?i():u()},r),p=e.length,h=p<=3?1:2,d=Fw,m=p>d,b=e.slice(0,m?d-1:d),y=p-b.length,C=e.slice(b.length).map(w=>w.words?.length?w.words.map(_=>_.label).join(" / "):w.id),f=Math.min(5,Math.ceil(C.length/25)),x=Math.ceil(Math.min(p,d)/h)||1,g=h*x;return n.jsx("div",{className:De("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${h}, 1fr)`},children:Array.from({length:g},(w,_)=>{if(m&&_===d-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:v=>{Gn(v)||i()},onPointerLeave:v=>{Gn(v)||u()},onFocus:()=>{ta()||i()},onBlur:u,onClick:v=>{v.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(Un,{anchorRect:s,items:C,showIndex:!1,closeOnOutsideClick:!1,columns:f})]},_);const E=b[_];return E?n.jsx("div",{className:"word-table-thumb__cell",children:(E.words?.length?E.words:[{label:E.id}]).map((v,N)=>n.jsxs(o.Fragment,{children:[N>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:v.label})]},N))},_):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},_)})})}function Iw({items:e,name:t,description:a,createdAt:r,code:s,published:l,publishedLabel:i,shared:u,sharedLabel:c,isNew:p,publisherName:h,publishedAt:d,likeCount:m,downloadCount:b,onPublisherClick:y,selected:C,onClick:f,onMore:x,titleNode:g,className:w}){const{t:_}=ke.useTranslation(),E=g!=null,v=h!=null||d!=null||m!=null||b!=null,N=k=>{k.target===k.currentTarget&&!E&&(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),f?.())};return n.jsxs("div",{className:De("word-table-button",C?"word-table-button--selected":"",v?"":"word-table-button--no-footer",w),role:"button",tabIndex:0,"aria-label":s?`${t} (${s})`:t,onClick:E?void 0:f,onKeyDown:N,children:[p&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":_("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(Dd,{items:e,className:"word-table-button__thumb"}),n.jsxs("div",{className:"word-table-button__info",children:[n.jsxs("div",{className:"word-table-button__info-text",children:[g??n.jsx("div",{className:"word-table-button__title h4",children:t}),a&&n.jsx("div",{className:"word-table-button__desc body-3",children:a})]}),x&&!E&&n.jsx(be,{htmlType:"button",className:"word-table-button__more",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:_("common.moreFor",{name:t}),onClick:k=>{k.stopPropagation(),x(k)}})]}),(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?Xl(r,_):""})}),n.jsxs("span",{className:"word-table-button__meta-right",children:[(l||u)&&n.jsxs("span",{className:"word-table-button__badges",children:[l&&n.jsx(ln,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:i??_("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),u&&n.jsx(ln,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:c??_("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),s&&n.jsx("span",{className:"word-table-button__code caption-1",children:s})]})]}),v&&n.jsxs("div",{className:"word-table-button__footer",children:[n.jsxs("span",{className:"word-table-button__store-by",children:[h&&(y?n.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":_("wordTable.publisherFilter",{name:h,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:k=>{k.stopPropagation(),y()},children:h}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:h})),d&&n.jsx("span",{className:"training-card__date body-4",children:Xl(d,_)})]}),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":_("common.likeCount",{count:m,defaultValue:`\uC88B\uC544\uC694 ${m}`})}),b!=null&&n.jsx(ln,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(b),"aria-label":_("common.downloadCount",{count:b,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${b}`})})]})]})]})}/**
1044
+ `).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:Fo,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 O_({logo:e,logoAlt:t="",logoHref:a,links:r=[],actions:s,className:l,containerClassName:i,renderLink:u,menuLabel:c}){const{t:p}=ke.useTranslation(),h=c??{open:p("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:p("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[d,m]=o.useState(!1),b=o.useId(),y=o.useRef(null);o.useEffect(()=>{if(!d)return;const x=ea(()=>{const _=document.getElementById(b);_&&_.contains(document.activeElement)&&y.current?.focus(),m(!1)}),g=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,w=_=>{_.matches&&m(!1)};return g&&(g.matches&&m(!1),g.addEventListener?.("change",w)),()=>{x(),g?.removeEventListener?.("change",w)}},[d,b]);const C=i?`${i} landing-header__inner`:"landing-header__inner",f=(x,g)=>u?u(x,{onClick:g}):n.jsx("a",{href:x.href,onClick:g,"aria-current":x.current?"page":void 0,children:x.label});return n.jsxs("header",{className:l?`landing-header ${l}`:"landing-header",children:[n.jsxs("div",{className:C,children:[e!=null&&(()=>{const x=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:x}):n.jsx("div",{className:"landing-header__brand",children:x})})(),r.length>0&&n.jsx("nav",{className:"landing-header__links",children:r.map((x,g)=>n.jsx("span",{children:f(x)},`${g}:${x.href}`))}),n.jsxs("div",{className:"landing-header__actions",children:[s,r.length>0&&n.jsx("button",{ref:y,type:"button",onClick:()=>m(x=>!x),"aria-expanded":d,"aria-controls":b,"aria-label":d?h.close:h.open,className:d?"landing-header__toggle landing-header__toggle--open":"landing-header__toggle",children:n.jsxs("span",{className:"landing-header__burger",children:[n.jsx("span",{}),n.jsx("span",{}),n.jsx("span",{})]})})]})]}),r.length>0&&n.jsx("nav",{id:b,hidden:!d,className:"landing-header__drawer",children:n.jsx("div",{className:i??void 0,children:r.map((x,g)=>n.jsx("span",{className:"landing-header__drawer-item",children:f(x,()=>m(!1))},`${g}:${x.href}`))})})]})}function z_({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,...lc(a),children:[n.jsx("div",{className:"bottom-sticky__content",children:e}),t]})})}function W_({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,x=0)=>{if(!(C>0))return Promise.resolve(!0);const g=a.current;return t.current={phase:f,at:Date.now()-Math.max(0,x)},new Promise(w=>{const _=setTimeout(()=>{r.current===_&&(r.current=null),w(!!e.current&&g===a.current)},C);r.current=_})},[e]),p=o.useCallback(()=>{t.current={phase:"sound",at:Date.now()}},[]),h=o.useCallback(()=>{t.current={phase:"sound",at:0}},[]),d=o.useCallback(()=>{const C=t.current;return C.phase!=="sound"&&C.at>0},[]),m=o.useCallback(()=>a.current,[]),b=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:d,generation:m,isCurrent:b,abort:u,waitPad:c,enterSound:p,leave:h,pause:l,resume:i,__bumpGenerationForTest:y}),[d,m,b,u,c,p,h,l,i,y])}const Ea=9,H_=e=>Math.round(Math.min(Ea,Math.max(0,e))/Ea*100),V_=e=>e/100*Ea,or=2,zc=.1,q_=e=>Math.min(or,Math.max(0,e)),U_=.1,G_=e=>Math.round(e*1e6)/1e6;function sr(e){const{noiseRatio:t}=e;if(typeof t=="number"&&Number.isFinite(t))return q_(t);const a=Math.min(Ea,Math.max(0,Number(e.level)||0))/Ea,r=Number(e.mainVolume);return r>0?a>0?G_(Math.min(or,Math.max(U_,a/r))):0:1}const Wc=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function Hc(e){return Wc(e)}function ys(e){return Wc(e)*sr(e)}function vs(e,t=K1()){const a=Number.isFinite(t)&&t>0?t:1;return Math.min(1,ys(e)/a)}function la(e,t){const a={...e,...t??{}};return t&&"level"in t&&typeof t.noiseRatio!="number"&&(a.noiseRatio=sr({level:a.level,mainVolume:a.mainVolume})),a}const ia={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},_s=o.createContext(null);function Tr(){return o.useContext(_s)}const xs=e=>`${G1()}/${e}`,Vc=e=>Array.from({length:10},(t,a)=>xs(`${e}-${String(a+1).padStart(2,"0")}.mp3`)),Mr={get defaultNoise(){return xs("noise1.mp3")},get street(){return Vc("noise2")},get restaurant(){return Vc("noise3")},get buzz(){return xs("noise4.mp3")}};function K_(e){const t=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return Mr.defaultNoise;case"street":return Mr.street[t];case"restaurant":return Mr.restaurant[t];case"buzz":return Mr.buzz;default:return null}}function Y_({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),p=o.useRef(null),h=o.useRef(null),d=o.useRef(null),m=o.useRef(0),b=o.useRef(null),y=o.useCallback(()=>!!r?.isRunning(),[r]),C=o.useCallback(()=>{d.current!==null&&(cancelAnimationFrame(d.current),d.current=null),b.current!==null&&(clearTimeout(b.current),b.current=null)},[]),f=o.useCallback((E,v=250)=>{const N=l.current;if(!N)return;const k=p.current;if(k){p.current=null;try{N.pause()}catch{}N.src=k,N.load()}if(!N.src)return;m.current+=1,C();try{io(),ur(N).then(F=>{if(l.current===N)try{s.current?.("noise",F)}catch{}})}catch{}const D=N.paused?0:cr(N);N.paused&&qn(N,0),N.play().catch(()=>{});const A=performance.now(),B=()=>{const F=Math.min(1,(performance.now()-A)/v);try{qn(N,D+(E-D)*F)}catch{}F<1?d.current=requestAnimationFrame(B):d.current=null};d.current=requestAnimationFrame(B)},[C]),x=o.useCallback((E=250,v)=>{const N=l.current;if(!N||N.paused){v?.();return}const k=++m.current;C();const D=performance.now(),A=cr(N),B=()=>{const F=Math.min(1,(performance.now()-D)/E);try{qn(N,A*(1-F))}catch{}if(F<1)d.current=requestAnimationFrame(B);else{d.current=null,b.current!==null&&(clearTimeout(b.current),b.current=null);try{N.pause()}catch{}v?.()}};d.current=requestAnimationFrame(B),b.current=setTimeout(()=>{if(b.current=null,m.current===k){d.current!==null&&(cancelAnimationFrame(d.current),d.current=null);try{N.paused||(qn(N,0),N.pause(),v?.())}catch{}}},E+150)},[C]);o.useEffect(()=>{const E=document.createElement("audio");return E.loop=!0,E.crossOrigin="anonymous",l.current=E,()=>{C();try{E.pause(),E.removeAttribute("src"),E.load()}catch{}l.current=null,c.current=null,p.current=null}},[C]);const g=e?vs(e.settings):0,w=!!e?.settings.enabled&&g>0;o.useEffect(()=>{if(!w)return;let E=0;const v=setInterval(()=>{const N=l.current;if(!N||N.paused){E=0;return}const k=t.current;if(k&&!k.paused&&!k.ended||y()||a.current==="playing"){E=0;return}E+=1,E>=2&&(E=0,x())},400);return()=>clearInterval(v)},[x,w,t,a,y]),o.useEffect(()=>{const E=()=>{const v=l.current;if(document.hidden){if(v&&!v.paused){C();try{v.pause()}catch{}}return}if(!v||!v.paused)return;const N=t.current,k=!!N&&!N.paused&&!N.ended||y()||a.current==="playing",D=h.current;k&&D?.enabled&&D.volume>0&&f(D.volume)};return document.addEventListener("visibilitychange",E),()=>document.removeEventListener("visibilitychange",E)},[C,f,t,a,y]),o.useEffect(()=>{h.current=e?{enabled:e.settings.enabled,volume:g,type:e.settings.type}:null},[e,e?.settings.enabled,g,e?.settings.type]);const _=o.useRef(null);return o.useEffect(()=>()=>{_.current?.(),_.current=null},[]),o.useEffect(()=>{const E=e?.settings,v=l.current;if(!v)return;const N=E?vs(E):0;if(!E||!E.enabled||N===0){x();return}if(c.current!==E.type){const k=K_(E.type);k&&(c.current=E.type,u(k),p.current=k,x(150,()=>{if(p.current!==k)return;p.current=null,v.src=k,v.load();const D=t.current;if(D&&!D.paused||y()){_.current?.();const A=()=>{v.removeEventListener("canplay",A),_.current===B&&(_.current=null);const F=t.current,L=h.current;(F&&!F.paused&&!F.ended||y())&&L?.enabled&&L.volume>0&&f(L.volume)},B=()=>v.removeEventListener("canplay",A);_.current=B,v.addEventListener("canplay",A)}}))}else{const k=t.current,D=!!k&&!k.paused&&!k.ended||y()||a.current==="playing";if(D&&p.current)f(N);else if(D&&v.paused&&v.src)f(N);else if(!v.paused)if(!D)x();else{C();const A=cr(v),B=performance.now(),F=()=>{const L=Math.min(1,(performance.now()-B)/150);try{qn(v,A+(N-A)*L)}catch{}L<1?d.current=requestAnimationFrame(F):d.current=null};d.current=requestAnimationFrame(F)}}},[e?.settings,e?.settings.enabled,g,e?.settings.type,C,f,x,t,a,h,y]),o.useEffect(()=>{const E=l.current;if(E)try{E.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:x}}function Z_({ttsText:e,playbackRate:t,mainVolume:a,fillRef:r,waveProgressRef:s,setProgress:l,setPlaybackState:i,setStateLocal:u,fadeInNoise:c,fadeOutNoise:p,noiseSettingsRef:h,onDoneRef:d,handleEndRef:m}){const b=o.useRef(null),y=o.useRef(0),C=o.useRef(null),f=o.useRef(0),x=o.useRef(!1);o.useEffect(()=>()=>{f.current++;try{if(C.current&&(cancelAnimationFrame(C.current),C.current=null),x.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}x.current=!1}}catch{}},[]);const g=(E,v=1)=>{try{const N=(E||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(E||"").length);return Math.max(700,Math.round(N*300/Math.max(.25,v)))}catch{return 1200}},w=o.useCallback(E=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof d.current=="function"&&d.current(!1)}catch{}return}const v=window.speechSynthesis,N=++f.current;try{try{v.cancel()}catch{}const k=E??e,D=Array.isArray(k)?k.filter(M=>!!M):[k||""];D.length===0&&D.push("");const A=Math.max(.3,Math.min(3,t));y.current=D.reduce((M,O)=>M+g(O,A||1),0),b.current=performance.now(),l(0),i("playing"),u("playMode");const B=h.current;B?.enabled&&(B?.volume??0)>0&&c(B.volume);const F=()=>{try{const M=b.current||performance.now(),O=performance.now()-M,T=y.current||1200,G=Math.min(1,O/T);try{r.current&&(r.current.style.left=`${G*100}%`),s.current&&s.current.style.setProperty("--progress",String(G))}catch{}G<1&&(C.current=requestAnimationFrame(F))}catch{}},L=()=>{if(N===f.current)try{C.current&&(cancelAnimationFrame(C.current),C.current=null),l(1),i("stopped");try{m.current?.()}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{}},q=M=>{const O=new SpeechSynthesisUtterance(D[M]);try{O.rate=A}catch{}try{O.volume=Math.max(0,Math.min(1,a))}catch{}O.onend=()=>{if(N===f.current){if(M<D.length-1){try{q(M+1)}catch{L()}return}L()}},O.onerror=()=>{L()},O.onstart=()=>{if(!(M>0))try{C.current&&(cancelAnimationFrame(C.current),C.current=null),C.current=requestAnimationFrame(F)}catch{}},x.current=!0,v.speak(O)};try{q(0)}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}},[e,t,a,c,r,s,l,i,u,h,d,m]),_=o.useCallback(()=>{f.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}C.current&&(cancelAnimationFrame(C.current),C.current=null),p(),b.current=null}catch{}i("stopped"),u("active"),l(0)},[p,i,u,l]);return{startTTS:w,stopTTS:_}}const X_=.01,J_=.3;async function Q_(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 b=Math.floor(J_*i.sampleRate),y=Math.min(u.length,b);for(;c<y&&Math.abs(u[c])<=X_;)c++;c>=y&&(c=0)}const p=u.length-c,h=a&&a>0?Math.min(p,Math.floor(a*i.sampleRate)):p,d=Math.max(t,h),m=Math.floor(d/t)||1;return new Array(t).fill(0).map((b,y)=>{const C=c+y*m,f=Math.min(C+m,c+d,u.length);let x=0;for(let g=C;g<f;g++){const w=Math.abs(u[g]);w>x&&(x=w)}return x})}catch{return null}finally{try{s?.close?.()}catch{}}}async function qc(e,t,a,r=!1){try{const s=await fetch(e);if(s.ok===!1)return null;const l=await s.arrayBuffer();return await Q_(l,t,a,r)}catch(s){try{const l=Vl(s)}catch{}return null}}const ws=45,ex=74,tx=2;function Lr(e){const t=Math.min(2,Math.max(0,Number(e)||0));return t<=1?t*45:45+(t-1)*29}function $r(e){return Lr(e)/45}const nx=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),Uc=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function Gc({durationsSec:e,leadInMs:t=0,tailMs:a=0}){const r=Uc(t),s=Uc(a),l=[];let i=0;return e.forEach((u,c)=>{for(const[p,h]of[["lead",r],["sound",nx(u)],["tail",s]])l.push({kind:p,track:c,startMs:i,durMs:h}),i+=h}),{segments:l,totalMs:i,trackCount:e.length}}function Kc(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 ax(e,t){const a=Kc(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 rx(e,t,a){const r=Math.max(0,Math.floor(a)),s=Kc(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 ox({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 sx({phase:e,phaseElapsedMs:t,currentTime:a,trackDurationSec:r,leadInMs:s,tailMs:l}){const i=Gc({durationsSec:[r],leadInMs:s,tailMs:l});return ax(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(a)?a:0)*1e3:t})}function lx({bars:e,trackDurationSec:t,leadInMs:a,tailMs:r}){return rx(Gc({durationsSec:[t],leadInMs:a,tailMs:r}),0,e)}function ix(e,t){if(!Array.isArray(e))return null;const a=t||0;return a<e.length-1?a+1:null}function ux({ended:e,completedByEnd:t}){return!!e||!!t}function cx(e){return e.map((t,a)=>({src:t.src,label:String(a+1),color:void 0,duration:t.duration||0}))}function dx(e){return e.reduce((t,a)=>t+(a.duration||0),0)}function px(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 hx(e,t){if(!t||e.readyState<1)return!0;const a=e.currentSrc||e.src;return a?Yc(a)!==Yc(t):!0}function Yc(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const Zc=4,mx=$r(Zc/ws);function Cx(e){const{src:t,segments:a,progress:r=0,waveProgressRef:s,noiseSrc:l,noiseRatio:i=0,noiseSpeed:u=1,totalDuration:c=0,mainVolume:p=1,onReadyChange:h,showSoundWaveForm:d=!0,leadInMs:m=0,tailMs:b=0,trackDurationSec:y=0}=e,C=o.useRef(null),f=o.useRef(null),[x,g]=o.useState(null),[w,_]=o.useState(!1),[E,v]=o.useState(null),[N,k]=o.useState(2),[D,A]=o.useState(0),[B,F]=o.useState(null),[L,q]=o.useState(!1),[M,O]=o.useState(!1),T=3,G=3,K=1,ee=300,re=o.useRef(0),R=o.useCallback(()=>{const me=C.current,le=f&&f.current?f.current:me?me.closest(".audio-player__wave"):null,Be=le?le.getBoundingClientRect():me?me.getBoundingClientRect():null,Pe=Be?Be.width:0,Fe=Be?Math.max(100,Be.width):320,Ae=Be?Be.height:0,se=Math.max(K,Math.min(ee,Math.floor((Fe+G)/(T+G)))),ye=se*T,Ce=Math.max(0,se-1),xe=Math.max(0,Ce>0?(Fe-ye)/Ce:G);return{bars:se,gap:xe,height:Ae,width:Pe}},[]),J=o.useRef(void 0),ne=o.useRef(null),S=o.useCallback(async(me,le,{quiet:Be=!1}={})=>{const Pe=++re.current,Fe=()=>re.current===Pe;try{if(Be||_(!1),J.current=me,!me){Fe()&&g(null);return}let Ae=le;if(!Ae)try{for(let Ce=0;Ce<4&&!(C.current||f.current);Ce++)await new Promise(xe=>requestAnimationFrame(xe));await new Promise(Ce=>requestAnimationFrame(Ce));const ye=R();ye.height>0&&A(ye.height),Ae=ye.bars,k(ye.gap)}catch{Ae=120}ne.current=Ae;const se=await qc(me,Ae);if(!Fe())return;if(!se){g(null),_(!1);return}g(se),v(Ae),_(!0)}catch{if(!Fe())return;g(null),_(!1)}},[_,g,A,k,v,R]);o.useEffect(()=>{const me=f.current;if(!me||typeof ResizeObserver>"u")return;let le=null;const Be=new ResizeObserver(()=>{le!==null&&cancelAnimationFrame(le),le=requestAnimationFrame(()=>{le=null;try{const Pe=R();if(Pe.width<=0||(Pe.height>0&&A(Pe.height),ne.current===null||Pe.bars===ne.current))return;const Fe=J.current;k(Pe.gap),Fe?S(Fe,Pe.bars,{quiet:!0}).catch(()=>{}):ne.current=Pe.bars}catch{}})});return Be.observe(me),()=>{Be.disconnect(),le!==null&&cancelAnimationFrame(le)}},[R,S]),o.useEffect(()=>{const me=a&&a[0]&&a[0].src||t||a&&a.length===1&&a[0]&&a[0].src;S(typeof me=="string"?me:void 0).catch(()=>{}),O(!1)},[t,a,S]),o.useEffect(()=>{let me=!1;if(q(!1),F(null),!l||!E)return;const le=c>0?c*(u||1):void 0;return qc(l,E,le,!0).then(Be=>{me||(F(Be),Be||q(!0))}).catch(()=>{me||(F(null),q(!0))}),()=>{me=!0}},[l,E,c,u]);const $=Math.max(0,Math.min(1,p)),I=o.useMemo(()=>x&&x.length&&Math.max(...x)||1,[x]),P=E||40,V=o.useMemo(()=>lx({bars:P,trackDurationSec:y,leadInMs:m,tailMs:b}),[P,y,m,b]),ie=o.useMemo(()=>Array.from({length:P}).map((me,le)=>{const Be=le>=V.lead&&le<V.lead+V.sound,Pe=V.sound>0&&Be?Math.min(P-1,Math.round((le-V.lead)/V.sound*P)):-1,Fe=Be?x&&x[Pe]!=null?x[Pe]:null:x?0:null,Ae=Fe==null?null:Math.min(1,Fe/I*$),se=Ae!=null&&D>0&&Lr(Ae)<=Zc,ye=Ae==null?.15:se?0:$r(Ae),Ce=se,xe=P>1?le/(P-1):0;return n.jsx("div",{className:Ce?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":ye,"--i":le,"--mix":xe}},le)}),[P,x,I,$,D,V]),U={"--progress":String(Math.max(0,Math.min(1,r)))},ce=o.useMemo(()=>B&&B.length&&Math.max(...B.map(me=>Number.isFinite(me)?Math.abs(me):0))||1,[B]),Z=$*Math.max(0,i),H=!l||!B||!B.length?1:Math.max(1,Z),te={"--bar-gap":`${N}px`,"--wave-h":`${Lr(H)}px`,"--wave-h1":`${ws}px`},W=w&&(l?!!B||L:!0);o.useEffect(()=>{W&&O(!0)},[W]);const z=M?w:W;o.useEffect(()=>{h?.(z)},[z,h]);const ae=E||40,ve=o.useMemo(()=>Array.from({length:ae}).map((me,le)=>{const Be=B&&B[le]!=null?B[le]:null,Pe=Be==null?0:Math.abs(Be)/ce*Z,Fe=Math.max(mx,$r(Pe)),Ae=ae>1?le/(ae-1):0;return n.jsx("div",{className:"audio-player__bar",style:{"--val":Fe,"--i":le,"--mix":Ae}},le)}),[ae,B,ce,Z,D]);return n.jsxs("div",{className:"audio-player__wave",ref:f,style:te,children:[l&&n.jsx("div",{className:`audio-player__wave-noise ${W?"is-ready":""}`,"aria-hidden":"true",children:ve}),d&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${z?"is-ready":""}`,ref:C,children:ie}),n.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${z?"is-ready":""}`,ref:s,style:U,children:ie})]})]})}const Xc={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function Bs(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 p=isFinite(s.duration)&&s.duration||0;i(),a(p)},c=p=>{l||(l=!0,i(),t.rejectOnError?r(new Error(p)):a(0))};s.addEventListener("loadedmetadata",u),s.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),t.timeoutMs),s.src=e})}const fx=2e3;function Jc(e,t=fx){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 bx({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 p=s.current;s.current=[];for(const h of p)h(!0)},[]),i=o.useCallback(()=>{r.current=!1},[]),u=o.useCallback(()=>!e&&!t||r.current?Promise.resolve(!0):new Promise(c=>{const p=d=>{clearTimeout(h),s.current=s.current.filter(m=>m!==p),c(d)},h=setTimeout(()=>p(!0),a);s.current.push(p)}),[e,t,a]);return o.useEffect(()=>()=>{const c=s.current;s.current=[];for(const p of c)p(!1)},[]),{onReadyChange:l,waitForReady:u,markNotReady:i}}function gx(){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 yx({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 vx(e){if(!e)return 0;const t=e.duration;if(Number.isFinite(t)&&t>0)return t;if(t===0)return 0;try{const a=e.seekable;if(a&&a.length>0){const r=a.end(a.length-1);if(Number.isFinite(r)&&r>0)return r}}catch{}return null}const _x=400,xx=2e3,Qc=5;function wx({audioRef:e,fillRef:t,waveProgressRef:a,sourcesRef:r,currentIndexRef:s,sequencer:l,leadInMs:i=0,tailMs:u=0}){const c=o.useRef(null),p=o.useRef(0),h=o.useRef(null),d=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(Wn){const f=typeof performance<"u"&&performance.now?performance.now():Date.now();if(y>0&&f-y>_x){const x=h.current===null||f-h.current>xx;if(h.current=f,x&&p.current<Qc){p.current+=1;const g=p.current;let w=null;try{w=typeof document<"u"?document.visibilityState:null}catch{}Dt(`progress-ticker-slow-frames#${g}`,`[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.",g>=Qc?`(${g}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${g}\uBC88\uC9F8)`)}}y=f}try{const f=e.current,x=Array.isArray(r.current)?r.current[s.current||0]:void 0,g=!!x&&Number.isFinite(x.duration)&&(x.duration??0)>0,w=g?0:vx(f),_=t.current,E=(i||0)>0||(u||0)>0,v=E&&(l?.positionRef.current?.phase??"sound")!=="sound";if(w===null&&!v)try{_&&_.style.visibility!=="hidden"&&(_.style.visibility="hidden")}catch{}else{const N=g?x.duration:w||0;Wn&&v&&!(N>0)&&Dt("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 k=E?sx({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}):ox({currentTime:f&&typeof f.currentTime=="number"?f.currentTime:0,sources:r.current,index:s.current,audioDuration:w??0});try{_&&(_.style.visibility&&(_.style.visibility=""),_.style.left=`${k*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(k))}catch{}}}catch{}c.current=requestAnimationFrame(C)};c.current=requestAnimationFrame(C)},[e,t,a,r,s,l,i,u]),b=o.useCallback(y=>{d();try{t.current&&(t.current.style.visibility="",t.current.style.left=`${y*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(y))}catch{}},[d,t,a]);return o.useEffect(()=>d,[d]),{start:m,stop:d,settleTo:b}}function ks({btnLabel:e,soundSrc:t,bucketPath:a,onDone:r,disabled:s=!1,ttsText:l=null,className:i,showSoundWaveForm:u=!0,showNoiseWaveForm:c=!0,leadInMs:p=0,tailMs:h=0}){const{t:d}=ke.useTranslation(),m=e,b=Tr(),y=o.useRef(b?.registerAnalyser);o.useEffect(()=>{y.current=b?.registerAnalyser});const C=o.useRef(null),f=o.useRef(null),x=o.useRef(null),g=gx(),w=o.useRef(null),_=o.useRef(!1),E=o.useRef(null),{ref:v,rect:N,show:k,hide:D}=yx();o.useEffect(()=>()=>{y.current?.("main",null),y.current?.("noise",null)},[]);const[A,B]=o.useState(!1),[F,L]=o.useState("idle"),[q,M]=o.useState("stopped"),O=o.useRef("stopped");o.useEffect(()=>{O.current=q},[q]);const[T,G]=o.useState(0),[K,ee]=o.useState("active"),re=o.useRef(!1);o.useEffect(()=>{if(K!=="playMode"||!re.current)return;re.current=!1;const Y=typeof document<"u"?document.activeElement:null;if(Y&&Y!==document.body)return;const pe=x.current?.querySelectorAll("button")[1];try{pe?.focus()}catch{}},[K]);const[R,J]=o.useState(null),[ne,S]=o.useState(null),[$,I]=o.useState(0),[P,V]=o.useState(!1),[ie,U]=o.useState(0),ce=b?.playbackRate??1,Z=b?.mainVolume??1,H=b?ys(b.settings):0,te=b?Hc(b.settings):Z,[W,z]=o.useState("idle"),[ae,ve]=o.useState(""),[me]=o.useState("top"),le=o.useRef(null),Be=o.useRef(0),Pe=o.useRef(null),Fe=o.useRef(!0),Ae=W_({mountedRef:Fe}),se=o.useRef(null),ye=o.useRef(p),Ce=o.useRef(h);o.useEffect(()=>{ye.current=Math.max(0,p||0)},[p]),o.useEffect(()=>{Ce.current=Math.max(0,h||0)},[h]);const{start:xe,stop:$e,settleTo:nt}=wx({audioRef:C,fillRef:f,waveProgressRef:Pe,sourcesRef:le,currentIndexRef:Be,sequencer:Ae,leadInMs:p,tailMs:h}),{onReadyChange:ct,waitForReady:at,markNotReady:rt}=bx({showSoundWaveForm:u,showNoiseWaveForm:c}),Ee=o.useRef(null),Ue=o.useRef(s),Ne=o.useRef(r),Ye=o.useRef(null),et=o.useRef(!1),[ft,vt]=o.useState(!1),dt=o.useCallback(Y=>{et.current=Y,vt(Y)},[]),jt=o.useRef(null),{activeNoiseUrl:ot,noiseSettingsRef:st,fadeInNoise:At,fadeOutNoise:Nt}=Y_({noisePlayer:b,audioRef:C,playbackStateRef:O,sequencer:Ae}),{startTTS:Ot,stopTTS:Wt}=Z_({ttsText:l,playbackRate:ce,mainVolume:te,fillRef:f,waveProgressRef:Pe,setProgress:G,setPlaybackState:M,setStateLocal:ee,fadeInNoise:At,fadeOutNoise:Nt,noiseSettingsRef:st,onDoneRef:Ne,handleEndRef:jt});o.useEffect(()=>{wt.current=Wt});const xt=Y=>{if(typeof window>"u"||!window.speechSynthesis){try{ve(d("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}Ot(Y);return}Je("tts"),Ot(Y)},it=Array.isArray(t)?t.filter(Boolean):t?[t]:[],bt=(!it||it.length===0)&&!!l,pt=Array.isArray(R)&&R.length>0?R:Array.isArray(ne)&&ne.length>0?ne:null,kt=Math.max(Array.isArray(pt)?pt.length:0,it.length);o.useEffect(()=>(Fe.current=!0,()=>{Fe.current=!1}),[]);const mt=()=>{Ae.abort()},wt=o.useRef(null),de=o.useRef(null),Le=o.useRef(null),Se=o.useRef(null);Se.current||(Se.current=()=>{Le.current=null;const Y=C.current;if(de.current==="audio"&&Y&&(!Y.paused||Ae.isRunning())){mt();try{Y.pause()}catch{}Fe.current&&(M("paused"),$e(),Nt())}else if(de.current==="tts")try{wt.current?.()}catch{}});const Je=Y=>{de.current=Y,Le.current=Xa(Se.current)},ht=()=>{Le.current?.(),Le.current=null};o.useEffect(()=>()=>{Se.current&&Br(Se.current)},[]);const Rt=o.useRef(ce);o.useEffect(()=>{Rt.current=ce||1},[ce]);const Me=o.useCallback(Y=>{const pe=Rt.current||1;try{Y.defaultPlaybackRate=pe}catch{}try{Y.playbackRate=pe}catch{}},[]),tt=o.useCallback((Y,pe)=>{if(!hx(Y,pe)){try{Y.currentTime=0}catch{}Me(Y);return}Y.src=pe,Me(Y),Y.load(),Me(Y)},[Me]),Ft=o.useCallback(()=>{Ye.current&&(clearTimeout(Ye.current),Ye.current=null),z("idle")},[]),_t=o.useCallback(async(Y,pe=3,je=50,qe=0)=>{Ft();const Ge=Ae.generation(),Xe=!!Y&&Y.currentTime>0&&!Y.ended,gt=Math.max(0,ye.current-Math.max(0,qe));if(gt>0&&!Xe){Je("audio"),xe(),M("playing");const Ct=st.current;if(Ct?.enabled&&(Ct.volume??0)>0)try{At(Ct.volume)}catch{}if(!await Ae.waitPad(gt,"lead",qe)||!Fe.current||!Ae.isCurrent(Ge))return!1}Ae.enterSound();for(let Ct=0;Ct<pe;Ct++){if(!Fe.current||!Ae.isCurrent(Ge))return!1;try{return Je("audio"),await Y.play(),!0}catch(ge){if((ge instanceof Error||typeof ge=="object"&&ge&&"name"in ge?ge.name:void 0)==="AbortError"){if(!Ae.isCurrent(Ge))return!1;await new Promise(j=>setTimeout(j,je));continue}try{ve(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{ve(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[d,xe,Ae,At,st,Ft]),Q=o.useCallback(Y=>{const pe=Ae.generation(),je=Math.max(0,Ce.current-Math.max(0,Y));xe();const qe=st.current;if(qe?.enabled&&(qe.volume??0)>0)try{At(qe.volume)}catch{}const Ge=()=>{try{se.current?.()}catch{}};if(je<=0){Ae.leave(),Ge();return}Ae.waitPad(je,"tail",Y).then(Xe=>{Ae.leave(),Xe&&Ae.isCurrent(pe)&&Ge()}).catch(()=>{})},[Ae,xe,At,st]),_e=o.useCallback(()=>{const Y=C.current;if(!Y)return;const pe=()=>{M("playing"),ee("playMode"),V(!0),xe();try{io(),ur(Y).then(Xe=>{if(Fe.current)try{y.current?.("main",Xe)}catch{}})}catch{}const Ge=st.current;Ge?.enabled&&(Ge?.volume??0)>0&&At(Ge.volume)},je=()=>{ux({ended:!!Y?.ended,completedByEnd:et.current})||(M("paused"),$e(),Nt())},qe=()=>{const Ge=()=>{try{const Xe=le.current,gt=ix(Xe,Be.current);if(gt!==null){Be.current=gt,I(gt),V(!0);const Ct=Xe?.[gt]&&Xe[gt].src;if(Ct&&Y){tt(Y,Ct),_t(Y).catch(()=>{});return}}}catch{}M("stopped"),G(1);try{if(Y)try{Y.currentTime=0}catch{}}catch{}$e(),V(!1),Nt();try{!Ue.current&&jt.current&&jt.current()}catch{}};if(se.current=Ge,Ce.current>0){xe(),Ae.waitPad(Ce.current,"tail").then(Xe=>{Ae.leave(),Xe&&Ge()}).catch(()=>{});return}Ge()};return Y.addEventListener("play",pe),Y.addEventListener("pause",je),Y.addEventListener("ended",qe),()=>{try{Y.removeEventListener("play",pe),Y.removeEventListener("pause",je),Y.removeEventListener("ended",qe),$e()}catch{}}},[At,Nt,_t,st,xe,$e,Ae]);o.useEffect(()=>_e(),[_e]),o.useEffect(()=>{Ue.current=s},[s]),o.useEffect(()=>{Ne.current=r},[r]),o.useEffect(()=>{if(s||K!=="active")return;const Y=E.current;if(!Y)return;let pe=null;const je=requestAnimationFrame(()=>{try{const qe=Y.getTotalLength();if(!qe)return;const Ge=qe*.2;Y.style.strokeDasharray=`${qe-Ge} ${Ge}`;const Xe="triFlow_"+Math.random().toString(36).slice(2);pe=document.createElement("style"),pe.textContent=`@keyframes ${Xe}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${qe}}}`,document.head.appendChild(pe),Y.style.animation=`${Xe} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(je),pe?.remove()}},[K,s]),o.useEffect(()=>{le.current=R},[R]),o.useEffect(()=>{Be.current=$},[$]),o.useEffect(()=>{const Y=x.current,pe=w.current;if(!Y||!pe)return;let je=null;const qe=32,Ge=60,Xe=()=>{try{const Ct=Array.from(Y.querySelectorAll(":scope > .button"));let ge=0;Ct.forEach(We=>{if(We===pe)return;const Ke=We.getBoundingClientRect();ge+=Ke.width});const j=Y.getBoundingClientRect().width,X=Math.max(0,Math.floor(j-ge-8)),fe=kt;if(!fe||X<=0){Array.from(pe.children).forEach(We=>{try{We.style.width=""}catch{}});return}let Re=Math.floor(X/fe);Re>Ge&&(Re=Ge),Re<qe&&(Re=Math.max(qe,Math.floor(X/fe))),Array.from(pe.querySelectorAll(".button")).forEach(We=>{try{We.style.width=`${Re}px`}catch{}})}catch{}},gt=requestAnimationFrame(Xe);try{je=new ResizeObserver(()=>{requestAnimationFrame(Xe)}),je.observe(Y),je.observe(pe),window.addEventListener("resize",Xe)}catch{}return()=>{try{cancelAnimationFrame(gt)}catch{}try{je&&(je.disconnect(),je=null)}catch{}try{window.removeEventListener("resize",Xe)}catch{}}},[R,ne,kt]),o.useEffect(()=>()=>{try{Ee.current&&(clearTimeout(Ee.current),Ee.current=null),Ye.current&&(clearTimeout(Ye.current),Ye.current=null)}catch{}},[]);const Oe=(Y,pe)=>{J(Y),U(pe),rt(),S(cx(Y)),le.current=Y},Ve=()=>{ee("playMode"),I(0),V(!0)},Bt=async(Y,pe)=>{dt(!1),_.current=!1,tt(Y,pe),await Jc(Y),await at()!==!1&&(B(!1),Ve(),await _t(Y))},Qe=async(Y,pe=!1)=>{const je=C.current;B(!0),L("measuring_duration");try{const qe=await Bs(Y,{timeoutMs:1e4,rejectOnError:!0});Oe([{src:Y,objectUrl:null,duration:qe}],qe),L("ready"),pe&&je&&await Bt(je,Y)}finally{_.current=!1,B(!1)}},zt=async(Y,pe=!1)=>{const je=C.current;B(!0),L("measuring_duration");try{const qe=await Promise.all(Y.map(Xe=>Bs(Xe,{timeoutMs:1e4})));if(!Fe.current)return;const Ge=Y.map((Xe,gt)=>({src:Xe,objectUrl:null,duration:qe[gt]||0}));Oe(Ge,dx(Ge)),L("ready"),pe&&je&&Ge.length>0&&await Bt(je,Ge[0].src)}finally{_.current=!1,B(!1)}},Ht=async(Y=!1,pe=!0)=>{const je=C.current,qe=t?Array.isArray(t)?t:[t]:[];if(!qe||qe.length===0||!qe.some(Boolean))return!1;if(_.current)return null;_.current=!0,pe&&B(!0),L("resolving");try{const Ge=px(t,a,El),Xe=[];let gt=0;for(const Ct of Ge){let ge=Ct.src??null,j=null;if(!ge&&Ct.resolvedPath){try{L("getting_signed_url"),ge=await Dl(Ct.resolvedPath)}catch{ge=null}if(!Fe.current)return!1;if(!ge)try{L("downloading");const fe=await Sl(Ct.resolvedPath);if(!Fe.current)return!1;if(fe){const Re=fe instanceof Blob?fe:new Blob([fe]);j=g.track(URL.createObjectURL(Re)),ge=j}}catch{L("error");try{ve(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),ee("active")}catch{}}}if(!ge)continue;let X=0;try{L("measuring_duration"),X=await Bs(ge,{timeoutMs:3e3})}catch{X=0}if(!Fe.current){if(j)try{URL.revokeObjectURL(j)}catch{}for(const fe of Xe)if(fe.objectUrl)try{URL.revokeObjectURL(fe.objectUrl)}catch{}return!1}gt+=X||0,Xe.push({...Ct,src:ge,objectUrl:j,duration:X})}if(Oe(Xe,gt),Xe.length>0&&Y&&je){const Ct=Xe[0];dt(!1);try{g.keepOnly(Xe.map(ge=>ge.objectUrl))}catch{}if(L("ready"),_.current=!1,Ct.src&&je)try{if(tt(je,Ct.src),await Jc(je),await at()===!1)return!1;pe&&B(!1),Ve(),je&&await _t(je)}catch{pe&&B(!1)}else pe&&B(!1);ee("playMode"),I(0),V(!0)}return Xe.length>0}finally{_.current=!1,pe&&B(!1),L(Ge=>Ge==="ready"?"ready":"idle")}},cn=async Y=>{const pe=Ae.isRunning();if(Y.paused&&!pe){if(et.current){await Tt();return}const je=Ae.resume();if(je){if(M("playing"),je.phase==="tail"){Q(je.elapsed);return}await _t(Y,3,50,je.elapsed);return}await _t(Y),M("playing")}else Ae.pause(),mt(),Y.pause(),M("paused"),pe&&($e(),Nt())},Yt=async()=>{const Y=C.current;if(!(!Y&&!bt)){if(bt){const pe=window.speechSynthesis;if(K==="active"){const je=$a(),qe=Array.isArray(l)?l.filter(Boolean):l?[l]:[];if(je&&qe.length>0){if(_.current)return;ee("load"),B(!0),L("synthesizing"),_.current=!0;try{const Ge=await Promise.all(qe.map(Xe=>Promise.resolve(je(Xe))));Ge.length>1?await zt(Ge,!0):await Qe(Ge[0],!0)}catch{_.current=!1,B(!1),ee("active"),xt(qe.length>0?qe:void 0)}return}xt(qe.length>0?qe:void 0);return}if(K==="playMode"){const je=!!pe&&(pe.speaking||pe.paused)&&!(Y&&(Y.currentSrc||Y.getAttribute("src")));if(Y&&!je){await cn(Y);return}try{if(pe&&pe.paused)try{Je("tts"),pe.resume(),M("playing")}catch{}else try{pe.pause(),M("paused")}catch{}}catch{}}return}if(K==="active"){if(s&&Array.isArray(le.current)&&le.current.length>0){const je=le.current[0];try{if(je.src&&Y)try{tt(Y,je.src),Ve(),Y&&await _t(Y)}catch{}Ve();return}catch{}}ee("load");let pe;try{pe=await Ht(!0)}catch{pe=!1}if(pe===!1&&Fe.current){try{ve(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}ee("active")}return}if(K!=="load"&&(K==="playMode"||K==="active"))try{Y&&await cn(Y)}catch(pe){(pe instanceof Error||typeof pe=="object"&&pe&&"name"in pe)&&pe.name}}},Tt=async()=>{const Y=C.current;if(Y)try{const pe=le.current;if(Array.isArray(pe)&&pe.length>1){await St(0);return}dt(!1);try{Y.currentTime=0}catch{}Y&&await _t(Y),M("playing"),ee("playMode")}catch{}},Jt=()=>{mt(),ht(),wt.current?.();const Y=C.current;try{if(Y){try{Y.pause()}catch{}try{Y.currentTime=0}catch{}}}catch{}Nt(),M("stopped"),ee("active"),G(0),V(!1)},en=async(Y,{sameSegment:pe=!1}={})=>{mt();const je=Ae.generation(),qe=C.current,Ge=le.current?.[Y]?.src;try{if(dt(!1),I(Y),V(!0),Be.current=Y,!Ge||!qe||(pe||rt(),tt(qe,Ge),!pe&&await at()===!1)||!Ae.isCurrent(je)||(await _t(qe),!Ae.isCurrent(je)))return;M("playing"),ee("playMode")}catch{}},An=async()=>{const Y=le.current,pe=Be.current||0;if(!Y||pe<=0){await Tt();return}await en(pe-1)},Nn=async()=>{const Y=le.current,pe=Be.current||0;if(!Y||pe>=Y.length-1){Jt();return}await en(pe+1)},gn=()=>{if(et.current)return;const Y=200,pe=340;dt(!0),mt(),ht();try{G(1)}catch{}nt(1);try{z("hold")}catch{}try{const je=C.current,qe=bt&&!!je?.src;if(!bt||qe){if(je){je.pause();try{je.currentTime=0}catch{}}}else Wt();Nt()}catch{}try{M("stopped")}catch{}if(V(!1),!Ue.current)try{Ye.current&&(clearTimeout(Ye.current),Ye.current=null),Ye.current=setTimeout(()=>{try{z("out")}catch{}Ye.current=setTimeout(()=>{try{typeof Ne.current=="function"&&Ne.current(!0)}catch{}try{z("idle")}catch{}Ye.current=null},pe)},Y)}catch{}};o.useEffect(()=>{jt.current=gn});const Pt=o.useCallback(()=>ve(""),[]),St=async Y=>{(le.current||[])[Y]&&await en(Y,{sameSegment:Y===Be.current})},Mt=q==="playing",Gt=o.useMemo(()=>{if(!ne||ne.length<=1)return ne;const Y=ne[$];return Y?[Y]:ne},[ne,$]),dn=s===!0;o.useEffect(()=>{try{const Y=C.current;Y&&typeof Y.playbackRate=="number"&&Me(Y)}catch{}},[ce,Me]);const yn=o.useRef({raf:null,timer:null});o.useEffect(()=>{const Y=C.current;if(!Y)return;const pe=Math.max(0,Math.min(1,te)),je=yn.current,qe=()=>{je.raf!==null&&(cancelAnimationFrame(je.raf),je.raf=null),je.timer!==null&&(clearTimeout(je.timer),je.timer=null)};qe();const Ge=cr(Y);if(Y.paused||Math.abs(Ge-pe)<.001||typeof requestAnimationFrame!="function"){try{qn(Y,pe)}catch{}return}const Xe=performance.now(),gt=()=>{const Ct=Math.min(1,(performance.now()-Xe)/150);try{qn(Y,Ge+(pe-Ge)*Ct)}catch{}je.raf=Ct<1?requestAnimationFrame(gt):null};return je.raf=requestAnimationFrame(gt),je.timer=setTimeout(()=>{qe();try{qn(Y,pe)}catch{}},200),qe},[te]);const Vt=W==="hold",En=W==="out",he=K==="playMode"&&!A&&!ft||Vt||En,Te=q!=="stopped"||Vt||En,ze=q==="paused",Ze=Math.max(0,Math.min(100,(T||0)*100)),He=De("audio-player__fill",he?"is-visible":"",Te?"is-expanded":"",ze?"is-paused":"",En?"is-out":"");return n.jsxs("div",{className:`audio-player ${dn?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof m=="string"?m:void 0,children:[n.jsxs("div",{className:`audio-player__panel ${Mt?"is-playing":""} ${A?"is-loading":""} ${K!=="default"?"is-revealed":""}`,children:[A?n.jsxs("div",{className:"audio-player__loading",role:Xc[F]?"status":void 0,"aria-live":Xc[F]?"polite":"off",children:[n.jsx("span",{className:"audio-player__loading-spinner","aria-hidden":"true"}),n.jsx("span",{className:"audio-player__loading-text",children:d("training.audioStatus.preparing",{defaultValue:"\uC18C\uB9AC\uB97C \uC900\uBE44\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4\u2026"})})]}):null,K==="active"?n.jsx("button",{className:"audio-player__button",type:"button",disabled:dn,onClick:()=>{re.current=Nr(),D(),Yt()},"aria-label":typeof m=="string"?m:d("training.listen","\uB4E3\uAE30"),onMouseEnter:k,onMouseLeave:D,onFocus:k,onBlur:D,children:n.jsx("span",{ref:v,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:E,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(Ln,{anchorRect:N,text:typeof m=="string"&&m?m:d("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),n.jsxs("div",{className:`audio-player__play ${K==="playMode"||Mt?"is-visible":""}`,inert:!(K==="playMode"||Mt)||void 0,children:[n.jsxs("div",{ref:x,className:"audio-player__buttons",children:[n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:An,ariaLabel:d("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:K!=="playMode"}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:Mt?"pause":"play",onClick:Yt,ariaLabel:d("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":Mt,width:"60px",variant:"transparent-white",disabled:K!=="playMode"}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:Jt,ariaLabel:d("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:K!=="playMode"}),kt>1?n.jsx("div",{ref:w,className:"audio-player__source-buttons",children:Array.from({length:kt}).map((Y,pe)=>n.jsx(be,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(pe+1),onClick:()=>{try{St(pe)}catch{}},ariaLabel:d("training.sourcePlay",{n:pe+1}),variant:"transparent-white",selected:P&&$===pe,disabled:K!=="playMode"||!(Array.isArray(R)&&R[pe]),showTooltipInfo:!0},pe))}):null,!Array.isArray(R)||R.length<=1?n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:Tt,ariaLabel:d("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:K!=="playMode"}):null,n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:Nn,ariaLabel:d("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:K!=="playMode"}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:gn,ariaLabel:d("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:K!=="playMode"})]}),n.jsxs("div",{className:"audio-player__slider",children:[n.jsx("div",{className:He,ref:f,style:{left:`${Ze}%`},"aria-hidden":"true"}),(u||c)&&n.jsx(Cx,{segments:Gt,progress:T,totalDuration:ie,waveProgressRef:Pe,showSoundWaveForm:u,leadInMs:p,tailMs:h,trackDurationSec:R?.[$]?.duration??0,noiseSrc:c&&b?.settings.enabled&&H>0?ot:null,noiseRatio:b?sr(b.settings):0,noiseSpeed:b?.settings.speed??1,mainVolume:Z,onReadyChange:ct})]})]}),n.jsx("audio",{ref:C,crossOrigin:"anonymous",preload:"auto"})]}),!u&&n.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[n.jsx(lt,{icon:"triangle-alert",size:14}),d("training.noSoundWaveform","\uC18C\uB9AC \uBE44\uAD50 \uBB38\uC81C\uB294 \uC6E8\uC774\uBE0C\uD3FC\uC744 \uD45C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.")]}),n.jsx(Ba,{message:ae,position:me,onClose:Pt})]})}function Rr(e){const{t}=ke.useTranslation(),{text:a,label:r,anchorRect:s=null,onClose:l,closeOnOutsideClick:i=!0,isMobilePopup:u=!1}=e||{},[c,p]=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:d,canIncrease:m,canDecrease:b,fontSize:y,lineHeight:C}=Hi({storageKey:"tooltip-fontScale"}),f=o.useCallback(()=>p(E=>E==="dark"?"light":"dark"),[]),x=o.useCallback(E=>{try{E.stopPropagation()}catch{}try{typeof l=="function"&&l()}catch{}},[l]),g=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"},_=n.jsxs("div",{className:ue(`text-box-tooltip__root ${c==="dark"?"is-dark":""}`),children:[n.jsxs("div",{className:ue("text-box-tooltip__box"),children:[r&&n.jsx("div",{className:ue("text-box-tooltip__label body-2b"),children:r}),n.jsx("div",{className:ue("text-box-tooltip__text body-1"),style:w,children:g.map((E,v)=>n.jsxs("div",{className:ue("text-box-tooltip__line"),children:[g.length>1?n.jsx("div",{className:ue("text-box-tooltip__marker"),children:n.jsx("span",{className:ue("text-box-tooltip__line-number button-1"),children:v+1})}):null,n.jsx("span",{className:ue("text-box-tooltip__line-text"),children:E})]},v))})]}),n.jsxs("div",{className:ue("text-box-tooltip__buttons"),children:[n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"minus",onClick:d,ariaLabel:t("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!b}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"plus",onClick:h,ariaLabel:t("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!m}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:c==="dark"?"moon":"sun-medium",onClick:f,ariaLabel:t("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:c==="dark"?"transparent-white":"transparent-gray"}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"x",onClick:x,ariaLabel:t("common.close","\uB2EB\uAE30"),variant:c==="dark"?"transparent-white":"transparent-gray"})]})]});return s?n.jsx(Bn,{anchorRect:s,className:ue(`text-box-tooltip ${c==="dark"?"is-dark":""}`),onClose:l,closeOnOutsideClick:i,isMobilePopup:u,ariaLabel:r||t("tooltip.textbox","\uBCF8\uBB38"),children:_}):n.jsx("div",{className:ue(`text-box-tooltip ${c==="dark"?"is-dark":""}`),children:_})}function ed({state:e="disabled"}){const{t}=ke.useTranslation();return n.jsxs("div",{className:`ts-bullet ts-bullet--${e}`,"aria-hidden":!0,children:[n.jsx("div",{className:"bullet__dot",children:n.jsx(lt,{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 td(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(),p=c?Array.from(c.querySelectorAll(Dn)).find(h=>!h.closest('[aria-hidden="true"]')):void 0;if(p){try{p.focus()}catch{}if(document.activeElement===p)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 p=s.current();if(p)try{p.focus()}catch{}}}},[e])}function nd({title:e,children:t,className:a="",state:r="disabled",usePreviewTextBtn:s=!1,onPreviewTextBtn:l,previewText:i=null,useFaded:u,usePlayAllBtn:c=!1,onPlayAll:p,playAllActive:h=!1}){const{t:d}=ke.useTranslation(),m=vn("(max-width: 767px)"),b=`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,x]=o.useState(!1),[g,w]=o.useState(null),[_,E]=o.useState(null);td(f&&!!g,()=>{if(typeof document>"u")return null;const A=Array.from(document.querySelectorAll(".tooltip__content"));for(let B=A.length-1;B>=0;B--)if(A[B].querySelector(".text-box-tooltip__root"))return A[B];return null},()=>C.current?.querySelector("button")??null);const v=o.useRef(l);o.useEffect(()=>{v.current=l});const N=o.useMemo(()=>i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)&&i.every(A=>typeof A=="string"||typeof A=="number")?i.join(""):"",[i]),k=o.useCallback(()=>{x(!1),w(null),E(null)},[]);o.useEffect(()=>{if(!f)return;let A;try{typeof v.current=="function"&&(A=v.current())}catch{}if(A===!1){k();return}E(typeof A<"u"&&A!==null?A:null)},[N]);const D=o.useCallback(()=>{let A;try{typeof l=="function"&&(A=l())}catch{}if(A!==!1){if(E(typeof A<"u"&&A!==null?A:i),!C.current){x(B=>!B);return}if(f)x(!1),w(null),E(null);else{const B=C.current.getBoundingClientRect();w(B),x(!0)}}},[l,i,f]);return n.jsxs("div",{className:y,children:[n.jsx("p",{className:b,children:n.jsx("span",{className:"training-step__title-text",children:e??t})}),s||c?n.jsxs("div",{className:"title-controls",children:[n.jsxs("div",{className:"title-buttons",children:[c&&n.jsx(be,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"play-circle",label:m?void 0:d("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),ariaLabel:d("training.playAll","\uBAA8\uB450 \uB4E3\uAE30"),selected:h,onClick:p,variant:r==="disabled"?"disabled":"default",disabled:r==="disabled"||h,onDisabledClick:h&&r!=="disabled"?()=>{}:void 0}),s&&n.jsx("div",{ref:C,children:n.jsx(be,{htmlType:"button",size:32,type:m?"dot":"bar",icon:"eye",label:m?void 0:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:d("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(Rr,{text:_??i,label:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:g,onClose:k,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function As(e,t){return typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled"}function ua({index:e,stepIndex:t,isLast:a=!1,title:r="",titleProps:s={},children:l,className:i="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:p}){const{t:h}=ke.useTranslation(),[d,m]=o.useState(()=>As(e,t));o.useEffect(()=>{const v=As(e,t);if(v!==d){const N=setTimeout(()=>m(v),0);return()=>clearTimeout(N)}},[e,t,d]);const b=o.useCallback((...v)=>{As(e,t)==="done"||d==="done"||typeof u=="function"&&u(...v)},[e,t,d,u]),[y,C]=o.useState(!1),[f,x]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),g=o.useCallback(v=>{if(!v)return null;try{const N=v;if(typeof v=="object"&&(N.currentTarget||N.target)&&(N.nativeEvent||N.type)){const A=N.currentTarget??N.target;if(A&&typeof A.getBoundingClientRect=="function")return A.getBoundingClientRect()}if(v instanceof DOMRect)return v;const k=v;if(k&&typeof k.getBoundingClientRect=="function")return k.getBoundingClientRect();const D=v?.current;return D&&typeof D.getBoundingClientRect=="function"?D.getBoundingClientRect():null}catch{return null}},[]),w=o.useCallback((v,{text:N="",label:k="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:D=!1,alignX:A="center",alignY:B="top"}={})=>{const F=g(v);x({text:N,label:k,anchorRect:F,backdrop:D,alignX:A,alignY:B}),C(!0)},[g]),_=o.useCallback(()=>{C(!1),x(v=>({...v,anchorRect:null}))},[]),E=o.Children.map(l,v=>{if(o.isValidElement(v)){const N=v;if(typeof N.type=="string")return N;const k=N.props??{},D=typeof k.onDone=="function"?k.onDone:b,A=typeof k.disabled=="boolean";let B=d==="disabled";return A&&(B=!!k.disabled),o.cloneElement(N,{onDone:D,disabled:B,showTooltip:w,hideTooltip:_})}return v});return n.jsxs("div",{className:`training-step training-step--${d} ${a?"training-step--last":""} ${i}`,"aria-current":d==="active",children:[n.jsx(ed,{state:d}),n.jsxs("div",{className:"training-step__content",children:[n.jsx(nd,{state:d,title:r,...s,useFaded:c}),d==="disabled"&&p&&typeof e=="number"&&typeof t=="number"&&e===t+1&&n.jsx("p",{className:"training-step__locked-hint caption-1",role:"status",children:p}),E]}),y?n.jsx(Bn,{anchorRect:f.anchorRect,backdrop:f.backdrop,onClose:_,ariaLabel:h("tooltip.textbox","\uBCF8\uBB38"),children:n.jsx(Rr,{text:f.text,onClose:_})}):null]})}function ad({context:e,state:t="disabled",theme:a="light"}){const{t:r}=ke.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:p,decrease:h,canIncrease:d,canDecrease:m,fontSize:b,lineHeight:y}=Hi({storageKey:"textbox_fontScale"}),[C,f]=o.useState(""),x=o.useRef(null),g=o.useRef(!1),w=o.useCallback(()=>{g.current=Nr()&&!!x.current&&x.current.contains(document.activeElement),l("active")},[]),_=o.useCallback(()=>f(""),[]),E=L=>{try{f(L)}catch{}},v=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 N=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[k,D]=o.useState(N);k!==N&&(D(N),l("disabled"));const A=t==="disabled"?s:t,B=A==="disabled"?"training-text-box--disabled":A==="active"?"training-text-box--active":A==="done"?"training-text-box--done":"",F=o.useMemo(()=>({fontSize:`${b}px`,lineHeight:`${y}px`}),[b,y]);return o.useEffect(()=>{if(A==="disabled"||!g.current)return;g.current=!1;const L=document.activeElement;L&&L!==document.body||x.current?.querySelector(".training-text-box__buttons button")?.focus()},[A]),n.jsxs("div",{ref:x,className:`training-text-box ${B} ${A!=="disabled"&&i==="dark"?"is-dark":""}`,children:[A==="disabled"&&n.jsx("div",{className:"training-text-box__preview",children:n.jsx(be,{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":A==="disabled",children:n.jsx("span",{className:"training-text-box__inner h3",style:F,children:N})}),A!=="disabled"&&n.jsxs("div",{className:"training-text-box__buttons","aria-hidden":A==="disabled",children:[n.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:h,onDisabledClick:()=>E(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,...!v&&{width:"60px"}}),n.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:p,onDisabledClick:()=>E(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:!d,useBorder:!1,showTooltipInfo:!0,...!v&&{width:"60px"}}),n.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:i==="dark"?"moon":"sun-medium",onClick:c,ariaLabel:r("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:i==="dark"?"transparent-white":"transparent-gray"})]}),n.jsx(Ba,{message:C,position:"top",onClose:_})]})}function ca(e){return e==="active"||e==="done"}function Ns({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,useTitleFaded:l,onDone:i,onChange:u,answer:c,wrongAnswers:p,choices:h,multiSelect:d=!1,correctCount:m=0,useDisabledCovered:b=!1,choiceIcons:y,shuffleChoices:C=!0}){const{t:f}=ke.useTranslation(),x=s??f("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),g=typeof e=="number"?e:-1,w=typeof t!="number"?"disabled":g<t?"done":g===t?"active":"disabled",_=Array.isArray(h)&&h.length?h:typeof c<"u"?[c].concat(Array.isArray(p)?p:[]):void 0,E=p?p.join("||"):"",v=h?h.join("||"):"",[N,k]=o.useState(()=>Array.isArray(_)?C?Oa(_):_.slice():void 0);o.useEffect(()=>{Array.isArray(_)&&_.length?k(C?Oa(_):_.slice()):k(void 0)},[c,E,v,C]);const[D,A]=o.useState(null),[B,F]=o.useState(()=>new Set);o.useEffect(()=>{A(null),F(new Set)},[v,c,E]);const L=o.useRef(void 0);o.useEffect(()=>{const O=L.current;typeof O=="number"&&typeof t=="number"&&typeof e=="number"&&O>=e&&t<e&&(A(null),F(new Set)),L.current=t},[t,e]);const q=o.useCallback(O=>{if(!ca(w))return;const T=N?.[O];if(T==null)return;const G=T;if(d){const K=new Set(B);K.has(G)?K.delete(G):K.add(G),F(K),typeof u=="function"&&u({selectedValues:[...K],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...K],__ts:Date.now()})}else A(G),typeof u=="function"&&u({selectedIndex:O,selectedValue:G,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:O,selectedValue:G,__ts:Date.now()})},[N,w,d,u,B]),M=`training-step__buttons${Array.isArray(N)&&N.length>3?" training-step__buttons--wrap-3":""}`;return n.jsx(ua,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:x,useTitleFaded:l,children:n.jsx("div",{className:M,children:Array.isArray(N)&&N.length>0?N.map((O,T)=>n.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:()=>q(T),ariaLabel:String(O),label:O,useLabel:!0,icon:y?y[String(O)]:void 0,variant:"default",disabled:w==="disabled",selected:d?B.has(O):D===O,useDisabledCovered:b,minWidth:0},String(O))):null})})}function Es({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u,demoSelected:c}){const{t:p}=ke.useTranslation(),h=s??p("training.confirmTitle","\uBB38\uC7A5\uC744 \uD655\uC778\uD558\uACE0 \uC798 \uB4E4\uB838\uB294\uC9C0 \uC120\uD0DD\uD558\uC138\uC694."),d=typeof e=="number"?e:-1,m=typeof t!="number"?"disabled":d<t?"done":d===t?"active":"disabled",b=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),x=`${String(b)}\0${JSON.stringify(y??null)}`,[g,w]=o.useState(x);g!==x&&(w(x),c==null&&f(null));const[_,E]=o.useState(c);Object.is(_,c)||(E(c),f(c??null));const v=o.useRef(void 0);o.useEffect(()=>{const A=v.current;typeof A=="number"&&typeof t=="number"&&typeof e=="number"&&A>=e&&t<e&&c==null&&f(null),v.current=t},[t,e,c]);const N=o.useCallback(A=>{const B=typeof A=="object"&&A!==null?Object.assign({},A,{__ts:Date.now()}):{value:A,__ts:Date.now()};typeof i=="function"&&i(B),ca(m)&&typeof l=="function"&&l(B)},[i,m,l]),k=o.useCallback(()=>{ca(m)&&(f(!1),N(!1))},[N,m]),D=o.useCallback(()=>{ca(m)&&(f(!0),N(!0))},[N,m]);return n.jsxs(ua,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:h,onDone:l,useTitleFaded:!1,children:[n.jsx(ad,{context:u,state:m}),n.jsx("div",{className:"training-step__buttons",children:Array.isArray(y)&&y.length>0?y.slice(0,6).map((A,B)=>n.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:()=>{ca(m)&&(f(B),N&&N(B))},disabled:m==="disabled",ariaLabel:String(A),label:A,variant:m,selected:C===B},B)):n.jsxs(n.Fragment,{children:[n.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:k,disabled:m==="disabled",icon:"x",ariaLabel:p("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),label:p("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!1}),n.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:D,disabled:m==="disabled",icon:"circle",ariaLabel:p("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),label:p("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:C===!0})]})})]})}function Ds({index:e,stepIndex:t,isLast:a=!1,title:r,onDone:s,btnLabel:l,soundSrc:i,bucketPath:u,usePreviewTextBtn:c,previewText:p=null,onPreviewTextBtn:h,disabled:d,_pageIndex:m,showSoundWaveForm:b,showNoiseWaveForm:y,leadInMs:C,tailMs:f}){const{t:x}=ke.useTranslation(),g=r??x("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),w=d??(typeof t=="number"&&typeof e=="number"?e>t:!1);return n.jsx(ua,{index:e,stepIndex:t,isLast:a,title:g,onDone:s,titleProps:{usePreviewTextBtn:c,previewText:p,onPreviewTextBtn:h},children:n.jsx(ks,{soundSrc:i,ttsText:i?null:p??g,bucketPath:u,btnLabel:l||x("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:w,className:"training-step__listen-sticky",showSoundWaveForm:b,showNoiseWaveForm:y,leadInMs:C,tailMs:f},`audio-p${m??0}-s${e}`)})}const Bx=[];function Ss({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=Bx}){const{t:c}=ke.useTranslation(),p=s??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),h=S=>typeof S=="string"?S:S&&(S.context||S.sentence||S.question||"")||"",[d,m]=o.useState(Array.isArray(u)?u:[]),[b,y]=o.useState(()=>(d||[]).map((S,$)=>({id:$,text:h(S)}))),C=o.useMemo(()=>typeof t!="number"||typeof e!="number"?"disabled":e<t?"done":e===t?"active":"disabled",[t,e]),f=C!=="disabled",x=o.useRef(void 0),g=o.useRef(void 0);o.useEffect(()=>{if(x.current===u)return;x.current=u;const S=Array.isArray(u)?u:[];m(S);const $=(I=>{const P=(I||[]).map((ce,Z)=>({id:Z,text:h(ce)}));if(P.length<=1)return P;const V=(ce,Z)=>{if(ce.length!==Z.length)return!1;for(let H=0;H<ce.length;H++)if(ce[H].text!==Z[H].text)return!1;return!0};let ie=Oa(P),U=0;for(;V(ie,P)&&U<20;)ie=Oa(P),U+=1;return ie})(S);y($);try{if(typeof i=="function"){const I=$.filter((P,V)=>P.text===h(S[V])).length;i({shuffled:$,score:I,total:(S||[]).length,initial:!0,__ts:Date.now()})}if(typeof l=="function"&&C==="active"){const I=$.filter((P,V)=>P.text===h(S[V])).length;g.current=u,l({shuffled:$,score:I,total:(S||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(C!=="active"||g.current===u||(g.current=u,typeof l!="function"))return;const S=Array.isArray(u)?u:[],$=b.filter((I,P)=>I.text===h(S[P])).length;l({shuffled:b,score:$,total:S.length,initial:!0,__ts:Date.now()})},[C,u]);const w=(S,$)=>{const I=[...b],P=S+$;if(P<0||P>=I.length)return;const V=I[P];I[P]=I[S],I[S]=V,G(I);try{if(typeof l=="function"&&C==="active"){const ie=I.filter((U,ce)=>U.text===h(d[ce])).length;l({shuffled:I,score:ie,total:(d||[]).length,__ts:Date.now()})}}catch{}},[_,E]=o.useState(null),v=o.useRef(null),N=o.useRef(null),k=o.useRef(null),D=o.useRef(null),A=o.useRef(null),B=o.useRef({x:0,y:0}),F=o.useRef(null),L=o.useRef({dx:0,dy:0}),q=()=>{if(F.current!==null)return;const S=()=>{if(!v.current){F.current=null;return}F.current=requestAnimationFrame(S);const $=B.current,I=L.current||{dx:0,dy:0};v.current&&(v.current.style.transform=`translate3d(${$.x-I.dx}px, ${$.y-I.dy}px, 0)`)};F.current=requestAnimationFrame(S)},M=o.useRef(new Map),O=o.useRef(new Map),T=()=>{const S=new Map;return M.current.forEach(($,I)=>{$&&$.getBoundingClientRect&&S.set(I,$.getBoundingClientRect())}),S},G=S=>{const $=T();y(S);try{if(typeof i=="function"){const I=S.filter((P,V)=>P.text===h(d[V])).length;i({shuffled:S,score:I,total:(d||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const I=T();S.forEach(P=>{const V=$.get(P.id),ie=I.get(P.id),U=M.current.get(P.id);if(!U||!V||!ie)return;const ce=V.top-ie.top;ce&&(U.style.transition="none",U.style.transform=`translateY(${ce}px)`,requestAnimationFrame(()=>{U.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",U.style.transform="";const Z=()=>{U.style.transition="",U.removeEventListener("transitionend",Z)};U.addEventListener("transitionend",Z)}))})})},K=(S,$)=>{try{try{$.dataTransfer?.setData("text/plain",String(S))}catch{}try{$.dataTransfer&&($.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),$.dataTransfer?.setDragImage(I,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(I)}catch{}})}catch{}}catch{}E(S);try{const I=b[S],P=document.createElement("div");P.className="order-list__dragging-object order-list__dragging-object--visible",P.textContent=I&&I.text?I.text:"",document.body.appendChild(P),v.current=P;const V=M.current.get(I.id);let ie=$.clientX||0,U=$.clientY||0;try{if(V&&V.getBoundingClientRect){const z=V.getBoundingClientRect();ie=z.left+z.width/2,U=z.top+z.height/2}}catch{}const ce=P.getBoundingClientRect(),Z=ce.width/2,H=ce.height/2;L.current={dx:Z,dy:H},P.style.transition="none",B.current={x:ie,y:U},P.style.transform=`translate3d(${ie-Z}px, ${U-H}px, 0)`,requestAnimationFrame(()=>{try{P.style.transition=""}catch{}q()});const te=z=>{const ae=z;B.current={x:ae.clientX,y:ae.clientY},q()};k.current=te,document.addEventListener("mousemove",te);const W=z=>{const ae=z;B.current={x:ae.clientX,y:ae.clientY},q()};N.current=W,document.addEventListener("dragover",W);try{$.dataTransfer?.setData("text/plain",String(S));try{$.dataTransfer?.setData("application/json",JSON.stringify({idx:S}))}catch{}}catch{}}catch{}},ee=(S,$)=>{$.preventDefault();try{$.dataTransfer&&($.dataTransfer.dropEffect="move")}catch{}try{A.current!==null&&(clearTimeout(A.current),A.current=null);const I=$.currentTarget&&$.currentTarget.closest?$.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{}},re=(S,$)=>{$.preventDefault();const I=$.dataTransfer?.getData("text/plain")||"",P=I?parseInt(I,10):_,V=S;if(typeof P!="number"||isNaN(P)||P===V){E(null),ne(),R();return}const ie=Lf(b,P,V);G(ie),E(null),R();try{if(typeof l=="function"&&C==="active"){const U=ie.filter((ce,Z)=>ce.text===h(d[Z])).length;l({shuffled:ie,score:U,total:(d||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const U=document.querySelectorAll(".order-list .order-list__item")[V];if(!U)return;const ce=U.querySelector(".order-list__slot")||U;try{ce.classList.add("pulse"),ce.offsetHeight,ce.classList.add("to-dark");const Z=()=>{ce.classList.remove("pulse","to-dark"),ce.removeEventListener("transitionend",Z)};ce.addEventListener("transitionend",Z)}catch{}})}catch{}ne()},R=()=>{if(v.current){try{document.body.removeChild(v.current)}catch{}v.current=null}N.current&&(document.removeEventListener("dragover",N.current),N.current=null),k.current&&(document.removeEventListener("mousemove",k.current),k.current=null),F.current!==null&&(cancelAnimationFrame(F.current),F.current=null)},J=()=>{E(null),ne(),R()};o.useEffect(()=>()=>R(),[]);const ne=()=>{try{if(A.current!==null&&(clearTimeout(A.current),A.current=null),D.current){try{D.current.classList.remove("drag-over")}catch{}D.current=null}document.querySelectorAll(".order-list .order-list__item").forEach(S=>S.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const S=Math.max(1,(b||[]).length);b.forEach(($,I)=>{const P=O.current.get($.id);if(!P)return;let V=50;S>1&&(V=Math.round(I/(S-1)*100));try{P.style.setProperty("--marker-pos",V+"%")}catch{}})}catch{}},[b]),o.useEffect(()=>()=>{R(),A.current!==null&&(clearTimeout(A.current),A.current=null)},[]),n.jsx(ua,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:p,children:n.jsx("div",{className:"order-list",children:b.map((S,$)=>{const I=Math.max(1,(b||[]).length),P=I>1?Math.round($/(I-1)*100):50;return n.jsx("div",{className:"order-list__item",children:n.jsxs("div",{className:"order-list__slot","data-disabled":C==="disabled","aria-disabled":C==="disabled",children:[C!=="disabled"?n.jsx("div",{className:"order-list__marker caption-1",style:{"--marker-pos":P+"%"},ref:V=>{const ie=O.current;V?ie.set(S.id,V):ie.delete(S.id)},children:n.jsx("span",{className:"order-list__slot-number button-1",children:$+1})}):null,n.jsxs("div",{ref:V=>{const ie=M.current;V?ie.set(S.id,V):ie.delete(S.id)},className:`order-list__draggable ${_===$?"dragging":""}`,"data-disabled":C==="disabled","aria-disabled":C==="disabled",tabIndex:C==="disabled"?-1:0,draggable:f,onDragStart:f?V=>K($,V):void 0,onDragEnter:f?V=>ee($,V):void 0,onDragOver:f?V=>ee($,V):void 0,onDragLeave:f?()=>{try{A.current!==null&&clearTimeout(A.current),A.current=setTimeout(()=>{try{const V=document.querySelectorAll(".order-list .order-list__item");V&&V[$]&&(V[$].classList.remove("drag-over"),D.current===V[$]&&(D.current=null))}catch{}},80)}catch{}}:void 0,onDrop:f?V=>re($,V):void 0,onDragEnd:f?J:void 0,children:[n.jsx("span",{className:"order-list__item-text body-2",children:S.text}),f?n.jsxs("span",{className:"order-list__item-buttons",children:[n.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:()=>w($,-1),ariaLabel:c("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:$===0,useBorder:!1,useDisabledInvisible:!0}),n.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:()=>w($,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:$===b.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},S.id)})})})}const kx=8e3;function Ax(e,t){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.then(s,s),setTimeout(s,t)})}function rd({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=[],selectable:c=!1,hideLabel:p=!1,hideAudio:h=!1,maxCards:d,playAllGapMs:m=0}){const{t:b}=ke.useTranslation(),y=s??b("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=d??3,x=(C||[]).slice(0,f);(C||[]).length>f&&console.warn(`TrainingStepCard: ${C.length} items passed but only ${f} shown`);const g=typeof e=="number"?e:-1,w=typeof t!="number"?"disabled":g<t?"done":g===t?"active":"disabled",[_,E]=o.useState(null),v=o.useRef([]),[N,k]=o.useState(!1),D=o.useRef(null),A=o.useRef(!0);o.useEffect(()=>(A.current=!0,()=>{A.current=!1}),[]);const B=o.useMemo(()=>C.map(T=>T?.id??T?.word??"").join("|"),[C]);o.useEffect(()=>{E(null)},[B]);const F=o.useRef(void 0);o.useEffect(()=>{const T=F.current;typeof T=="number"&&typeof t=="number"&&typeof e=="number"&&T>=e&&t<e&&E(null),F.current=t},[t,e]);const L=o.useCallback((T,G)=>{if(c)return;const K={item:T,index:G,__ts:Date.now()};try{typeof i=="function"&&i(K)}catch{}if(w==="active"&&typeof l=="function")try{l(K)}catch{}},[c,i,w,l]),q=o.useRef(m);o.useEffect(()=>{q.current=Math.max(0,m||0)},[m]);const M=o.useCallback(async()=>{if(N||w==="disabled")return;k(!0);let T=!1;const G=new Promise(K=>{D.current=()=>{T=!0,K()}});try{for(let K=0;K<x.length&&!(!A.current||T);K++){const ee=v.current[K];if(!ee)continue;await Promise.race([Ax(ee.play(),kx),G]);const re=Math.max(0,q.current||0);re>0&&K<x.length-1&&!T&&A.current&&await Promise.race([new Promise(R=>{setTimeout(R,re)}),G])}}finally{D.current=null,k(!1)}},[N,w,x.length]),O=o.useCallback((T,G)=>{if(!ca(w))return;E(G);const K={selectedValue:T.word||T.title||"",selectedIndex:G,item:T,__ts:Date.now()};try{typeof i=="function"&&i(K)}catch{}if(typeof l=="function")try{l(K)}catch{}},[i,w,l]);return n.jsx(ua,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:y,onDone:l,titleProps:{usePlayAllBtn:!h&&x.length>0,onPlayAll:M,playAllActive:N},children:n.jsx("div",{className:"training-step__cards",onClickCapture:T=>{const G=D.current;if(!G)return;const K=T.target;K&&typeof K.closest=="function"&&K.closest(".training-word-card__bottom")&&G()},children:x.length===0?n.jsx("div",{className:"training-step__empty",children:b("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):x.map((T,G)=>n.jsx(os,{ref:K=>{v.current[G]=K},item:T,disabled:w==="disabled",onPlayDone:()=>L(T,G),selectable:c,selected:c&&_===G,onSelect:c?()=>O(T,G):void 0,flipDelay:G*120,hideLabel:p,hideAudio:h},T&&T.id||G))})})}const Nx=160;function Ex(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 od(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"}]}Ex(Zt.t.bind(Zt)),od(Zt.t.bind(Zt));const Pr="none",Dx=.5,Sx=1.5,jx=.25;function js({title:e,valueLabel:t,value:a,min:r,max:s,step:l,tickStep:i,size:u,disabled:c,onChange:p}){return n.jsxs(un,{variant:"custom",label:e,useFullWidth:!0,children:[n.jsx(Ju,{value:a,onChange:p,min:r,max:s,step:l,size:u,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:c,className:ue("noise-settings-tooltip__slider-input")}),n.jsx("div",{className:ue(De("noise-settings-tooltip__value","button-1",c?"noise-settings-tooltip__value--disabled":"")),children:t})]})}function sd({anchorRect:e,onClose:t,hideNoiseRows:a=!1}){const{t:r}=ke.useTranslation(),s=vn("(max-width: 767px)")?40:24,l=Tr(),i=sr(l?.settings??ia),u=l?.settings.type??"defaultNoise",c=l?.settings.enabled??!0,p=l?.playbackRate??1,h=l?.mainVolume??1,d=Math.round(h*100),m=o.useCallback(x=>{try{l?.setMainVolume(Math.max(0,Math.min(1,x/100)))}catch{}},[l]),b=o.useCallback(x=>{try{l?.setPlaybackRate(x)}catch{}},[l]),y=o.useCallback(x=>{const g=Math.min(or,Math.max(0,Math.round(x*10)/10));try{l?.setSettings({noiseRatio:g})}catch{}},[l]),C=o.useCallback(x=>{try{x===Pr?l?.setSettings({enabled:!1}):l?.setSettings({type:x,enabled:!0})}catch{}},[l]),f=[{key:Pr,label:r("training.noise.type.none","\uC5C6\uC74C")},...od(r).map(x=>({key:x.value,label:x.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:ue("noise-settings-tooltip__header"),children:[n.jsx("span",{children:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815")}),n.jsx(be,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:r("common.close","\uB2EB\uAE30"),onClick:t})]}),children:n.jsxs(nr,{className:ue("noise-settings-tooltip"),useBorder:!1,labelWidth:72,children:[n.jsx(js,{title:r("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${d}%`,value:d,min:0,max:100,step:10,size:s,onChange:m}),n.jsx(js,{title:r("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${p.toFixed(2)}x`,value:p,min:Dx,max:Sx,step:jx,size:s,onChange:b}),!a&&n.jsxs(n.Fragment,{children:[n.jsx(un,{variant:"custom",label:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:n.jsx(_n,{ariaLabel:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:f,value:c?u:Pr,onChange:C})}),n.jsx(js,{title:r("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:r("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:or,step:zc,size:s,disabled:!c,onChange:y})]}),a&&n.jsx("div",{className:ue("noise-settings-tooltip__width-ghost"),"aria-hidden":"true",inert:!0,children:n.jsx(un,{variant:"custom",label:"\xA0",useFullWidth:!0,children:n.jsx(_n,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:f,value:Pr,onChange:()=>{}})})})]})})}function ld({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:p=!1}){const{t:h}=ke.useTranslation(),[d,m]=o.useState(!1),[b,y]=o.useState(null),[C,f]=o.useState(!1),x=o.useRef(null),g=o.useRef(null),w=Tr(),_=u>0,E=_&&i<u-1,v=!_||i>=u-1,N=s===Math.max(0,l);o.useEffect(()=>{e||(m(!1),y(null))},[e]);const k=o.useCallback(()=>{m(!1),y(null)},[]),D=o.useCallback(()=>{if(d){m(!1),y(null);return}const G=x?.current?.getBoundingClientRect();G&&y(G),t?.(),m(!0)},[d,t]),A=o.useCallback(()=>{if(d){m(!1),y(null);return}const G=g?.current?.getBoundingClientRect();G&&y(G),t?.(),m(!0)},[d,t]),B=vn("(max-width: 767px)"),F=o.useRef(null),[L,q]=o.useState(null),M=o.useCallback(()=>{f(G=>{const K=!G;return q(K?F.current?.getBoundingClientRect()??null:null),K})},[]),O=o.useCallback(()=>{f(!1),q(null)},[]);o.useEffect(()=>{c&&(f(!1),q(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(es,{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(es,{analyser:w?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.noise","\uC18C\uC74C")})]})]});return td(e&&d,()=>typeof document<"u"?document.querySelector(".noise-settings-tooltip__header")?.closest(".tooltip__content")??null:null,()=>[x.current,g.current].map(G=>G?.querySelector("button")??null).find(G=>!!G&&G.getClientRects().length>0)??x.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:x,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(be,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:D,className:d?"is-selected":void 0,"aria-expanded":d,"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:g,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:n.jsx(be,{htmlType:"button",size:56,type:"dot",shape:"pill",icon:"settings",onClick:A,className:d?"is-selected":void 0,"aria-expanded":d,"aria-haspopup":"dialog",ariaLabel:h("training.settings","\uC124\uC815")})})})]}):null,e&&n.jsx("div",{ref:F,className:"pp-bottom__meter-trigger","data-tooltip-ignore":!0,children:n.jsx(be,{htmlType:"button",size:40,type:"dot",shape:"pill",icon:"audio-lines",onClick:M,selected:C,"aria-expanded":B?C:void 0,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&C&&!B&&n.jsx("div",{className:"pp-bottom__meters",children:T})]}),e&&C&&B&&L&&n.jsx(Bn,{anchorRect:L,onClose:O,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:[v&&n.jsx(be,{htmlType:"button",size:56,type:"bar",icon:"check",onClick:typeof r=="function"?r:a,ariaLabel:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),label:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),variant:"main",disabled:!N}),E&&n.jsx(be,{htmlType:"button",size:56,type:"bar",rightIcon:"chevron-right",align:"right",onClick:a,ariaLabel:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),label:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),variant:"main",disabled:!N})]}),e&&d&&n.jsx(sd,{anchorRect:b,onClose:k,hideNoiseRows:p})]})}function id({title:e,subtitle:t,desc:a,depth:r,icon:s,wrapperStyle:l,iconTooltip:i,pageIndex:u,pageCount:c,progressMax:p,progressIndex:h,onBack:d,onClose:m}){const{t:b}=ke.useTranslation(),y=vn("(max-width: 767px)"),C=Number.isInteger(h)?h:u||0,f=Number.isInteger(p)?p:c||0,x=d||m,g=Array.isArray(r)?y?r[r.length-1]:r.join(" / "):r,w=typeof e=="string"?e.trim():e,_=typeof t=="string"?t.trim():t,E=!!(w||_),v=E?w||_:b("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),N=g||(w?t:void 0),k=y&&typeof N=="string"&&(N.includes(" \xB7 ")||N.includes(" / "))?N.split(/\s[·/]\s/).pop():N,D=o.useMemo(()=>{const A=l&&typeof l=="object"?{...l}:{};return!("width"in A)&&!("height"in A)&&(A.width="40px",A.height="40px"),A},[l]);return n.jsxs("header",{className:"pp-title training-popup-title",children:[n.jsxs("div",{className:"pp-title__left",children:[x?n.jsx(be,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:b("common.back","\uB4A4\uB85C"),onClick:x,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,n.jsx("div",{children:s?n.jsx(_u,{icon:s,label:e,tooltip:i,wrapperStyle:D}):null}),n.jsxs("div",{className:"pp-title__text",children:[k?n.jsx("span",{className:"pp-title__depth caption-1",children:k}):null,n.jsx("span",{className:`pp-title__title h2${E?"":" pp-title__title--empty"}`,children:v}),a?n.jsx("span",{className:"pp-title__description caption-1",children:a}):null]})]}),n.jsx(nc,{max:Math.max(0,f??0),index:Math.max(0,C??0)})]})}function Tx(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function Mx(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 ud=(e,t)=>{if(!t)return t;const a=typeof Zt?.t=="function"?Zt.t(e,{defaultValue:t}):void 0;return typeof a=="string"&&a?a:t};function cd(e,t,a){const r=e,s=r?.title||r?.name||(Array.isArray(t)?t[t.length-1]:void 0)||a||"\uD6C8\uB828",l=ei().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?ud(`topic.${l.key}`,l.label):void 0,i?ud(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function Ts(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function dd(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 Lx(e){const t=e;return Array.isArray(t?.items)?t.items:Array.isArray(e)?e:e?[e]:[]}function $x({idPrefix:e,trainingData:t,depth:a,fallbackTitle:r="\uD6C8\uB828",pages:s=[],emptyMessage:l,buildResults:i,metaPatch:u}){const c=cd(t,a,r),p=typeof u=="function"?u(c)||{}:u||{},h=t?.id||t?.title||s.length;return{id:`${e}:${h}`,meta:{...c,...p},pages:s,emptyMessage:l,buildResults:i}}function Rx(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;return t.context||t.sentence||t.question||""||""}return""}function Px(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 Fx(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 pd(e,t){if(!(!e||typeof e!="object"))return e[`step-${t}`]}function Ix(e,t,a,r){return pd(e,t*a+r)}function Ox({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 zx(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 hd=o.createContext(null);function Wx(){const e=o.useContext(hd);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function Hx({index:e,stepIndex:t,isLast:a=!1,lockedHint:r,title:s,choices:l=[],onDone:i,onChange:u}){const{t:c}=ke.useTranslation(),p=typeof e=="number"?e:-1,h=typeof t!="number"?"disabled":p<t?"done":p===t?"active":"disabled",[d,m]=o.useState(()=>l.map(()=>null)),b=JSON.stringify(l),y=l.length;o.useEffect(()=>{m(Array.from({length:y},()=>null))},[b]);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(()=>d.filter(w=>w!==null).length+1,[d]),x=o.useCallback(w=>{if(!ca(h))return;const _=d;let E;if(_[w]!=null){const N=_[w];E=_.map(k=>k!==null&&k>=N?null:k)}else E=[..._],E[w]=f;m(E);const v={selectedOrder:E,words:l,__ts:Date.now()};try{typeof u=="function"&&u(v)}catch{}if(_[w]==null&&E.length>0&&E.every(N=>N!==null))try{typeof i=="function"&&i(v)}catch{}},[h,d,f,u,i,l]),g=s??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return n.jsx(ua,{index:e,stepIndex:t,isLast:a,lockedHint:r,title:g,onDone:i,children:n.jsx("div",{className:"training-step__cards",children:l.map((w,_)=>n.jsx(os,{item:{word:w},disabled:h==="disabled",selectable:!0,selected:d[_]!==null,orderRank:d[_],onSelect:()=>x(_),flipDelay:_*120,hideLabel:!1,hideAudio:!0},`${w}-${_}`))})})}function Fr(e){return null}Fr.__isTrainingPage=!0;function Da(e,t){const a=Wx();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 md({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i}=Da(e,t);return n.jsx(Ds,{...a,index:r,stepIndex:s,isLast:l,onDone:i})}function Cd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Da(e,t);return n.jsx(Ns,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function fd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Da(e,t);return n.jsx(Es,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function bd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Da(e,t);return n.jsx(Ss,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function gd({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Da(e,t);return n.jsx(rd,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function Vx({_stepIndex:e,_totalSteps:t,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Da(e,t);return n.jsx(Hx,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}const yd=3e4,qx=/^(https?:|blob:|data:audio|\/|\.\/)/;function vd(e){return typeof e=="string"&&qx.test(e)?e:null}const Ux=e=>typeof e=="string"&&e.trim()!==""?e:null,Ms=Symbol("timed-out");function Gx(e,t){if(t<=0)return Promise.resolve(Ms);let a;return Promise.race([Promise.resolve(e),new Promise(r=>{a=setTimeout(()=>r(Ms),t)})]).finally(()=>clearTimeout(a))}function Kx(e){return e?$a()||ir()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function Yx(e,t){const a=[],r=vd(t);r&&a.push({kind:"raw",resolve:async()=>r});const s=(e??"").trim();if(!s)return a;for(const[l,i]of[["urlResolver",$a()],["fallbackUrlResolver",ir()]])i&&a.push({kind:l,resolve:async u=>{let c;try{c=await Gx(i(s),u)}catch(h){return Dt(`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===Ms?(Dt(`question-sound-slow-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 ${yd}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):Ux(c)||(Dt(`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 Zx(){return Date.now()+yd}const Xx=(e,t)=>Math.max(0,e-Date.now())/Math.max(1,t);function Jx(e){Dt("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 Ir(...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 Qx(e){return Ir(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function ew(e){return vd(Ir(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function _d(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=Ir(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 xd(e){const{score:t,contextsLength:a,results:r=[],subtitle:s,onReplay:l,onClose:i,inline:u=!1,pending:c=!1}=e||{},{t:p}=ke.useTranslation(),h=o.useId(),d=o.useCallback(()=>!c,[c]);o.useEffect(()=>{const A=a??0;if(t!=null&&A>0&&t/A>.5){const B=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("party:trigger",{detail:{count:140,strength:1.6,duration:2200}}))},0);return()=>window.clearTimeout(B)}},[t,a]);const m=o.useCallback(A=>{const B=_d(A),F=Ir(A?.wording,A?.label);return B===!0?{variant:"main",label:F??p("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:B===!1?{variant:"danger",label:F??p("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:F??p("training.result.notJudged","\uBBF8\uD310\uC815")}},[p]),b=a??0,y=t??0,C=o.useMemo(()=>Array.isArray(r)?r:[],[r]),f=o.useRef(null),[x,g]=o.useState(null),w=o.useCallback(()=>{f.current?.(),f.current=null,g(null)},[]);o.useEffect(()=>w,[w]);const _=o.useRef(0),E=(A,B)=>{if(!Wn)return;const F=Math.round(performance.now()-_.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${F}ms ${A}`,B??"")},v=o.useRef(0),N=o.useCallback((A,B,F)=>{w();const L=++v.current,q=()=>v.current===L;_.current=Wn?performance.now():0,E(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${A}`,{text:B,rawUrl:F}),g(A),f.current=()=>{E("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),v.current++,ro()};const M=K=>{E("\uD2BC\uB2E4",K);const ee=Ja(K,re=>{E(`\uB05D\uB0AC\uB2E4 \u2014 ${re?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:q()}),re&&q()&&(f.current=null,g(null))});return f.current=()=>{E("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),v.current++,ee.stop(),ro()},ee.done},O=Yx(B,F);E("\uCC28\uB840",O.map(K=>K.kind));const T=O[0]?.kind==="raw",G=T?M(F):Promise.resolve(!1);(async()=>{if(await G||!q())return;const K=Zx(),ee=T?O.slice(1):O;for(let re=0;re<ee.length;re++){if(!q())return;E(`${ee[re].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const R=await ee[re].resolve(Xx(K,ee.length-re));if(E(`${ee[re].kind} \uAC00 \uB2F5\uD588\uB2E4`,R),!q()||R&&(await M(R)||!q()))return}q()&&(E("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),Jx(B),f.current=()=>{v.current++,ro()},E("\uB0AD\uB3C5\uD55C\uB2E4"),z1(B,{onEnd:()=>{q()&&(f.current=null,g(null))}}))})()},[w]),k=o.useMemo(()=>C.map(A=>{const B=A??{},F=Qx(B)||p("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:L,label:q}=m(B),M=Array.isArray(B.corrects)?B.corrects:[],O=M.length?M.join(", "):B.answer!=null&&B.answer!==""?String(B.answer):null,T=typeof B.selectedText=="string"?B.selectedText:null,G=_d(B)===!0,K=ew(B),ee=!!K||Kx(F);return{problem:F,variant:L,label:q,answer:O,selectedText:T,isCorrect:G,sound:K,canHear:ee}}),[C,m,p]),D=o.useMemo(()=>k.some(A=>A.answer!==null||A.selectedText!==null),[k]);return n.jsx(Fn,{onClose:i,closeOnBackdrop:!1,inline:u,ariaLabel:p("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4."),className:"popup--training-result",beforeClose:d,footerClassName:"trp-result__foot",footer:({animateThen:A,closeWithAnimation:B})=>n.jsxs(n.Fragment,{children:[c&&n.jsx("p",{id:h,className:"trp-actions__reason caption-1",role:"status",children:p("training.result.pendingDone","\uACB0\uACFC\uB97C \uACC4\uC0B0\uD558\uB294 \uC911\uC774\uB77C \uC544\uC9C1 \uC644\uB8CC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.")}),n.jsxs("div",{className:"trp-actions",children:[n.jsx(be,{htmlType:"button",size:56,type:"bar",label:p("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>A(l)}),n.jsx(be,{htmlType:"button",size:56,type:"bar",label:p("training.result.done","\uC644\uB8CC"),variant:"main",onClick:B,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:p("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")}),n.jsx("h1",{className:"trp-result__title h2",children:p("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":p("training.result.scoreAria",{correct:y,total:b}),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:b})]})})]}),k.length>0&&n.jsx("section",{className:"trp-result__body",children:n.jsxs("div",{className:`result-table${D?" result-table--answer":""}`,role:"table","aria-label":p("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:p("common.col.problem","\uBB38\uC81C")}),D&&n.jsx("span",{role:"columnheader",children:p("training.result.colAnswerSelected","\uC815\uB2F5 \xB7 \uC120\uD0DD")}),n.jsx("span",{className:"col-right",role:"columnheader",children:p("training.result.colJudge","\uD310\uC815")})]}),k.map((A,B)=>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(B+1).padStart(2,"0")}),n.jsx("div",{className:"trp-row__q body-2",children:A.problem}),A.canHear&&n.jsx(be,{htmlType:"button",size:32,type:"dot",useBorder:!1,icon:x===B?"square":"volume-2",className:"trp-row__replay",ariaLabel:x===B?p("training.result.replaySoundStop",{no:B+1,defaultValue:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4"}):p("training.result.replaySound",{no:B+1,defaultValue:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30"}),onClick:()=>x===B?w():N(B,A.problem,A.sound)})]}),D&&n.jsxs("div",{className:"trp-row__answers",children:[A.answer!==null&&n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:"trp-row__answer-label answer-correct caption-1",children:p("training.result.colAnswer","\uC815\uB2F5")}),n.jsx("span",{className:"trp-row__answer-value body-2",children:A.answer})]}),n.jsxs("div",{className:"trp-row__answer-line",children:[n.jsx("span",{className:`trp-row__answer-label answer-selected caption-1 ${A.isCorrect?"is-correct":"is-wrong"}`,children:p("training.result.colSelected","\uC120\uD0DD")}),n.jsx("span",{className:`trp-row__answer-value body-2 ${A.isCorrect?"is-correct":"is-wrong"}`,children:A.selectedText??"\u2014"})]})]}),n.jsx("div",{className:"trp-row__judge",children:n.jsx(ln,{variant:A.variant,label:A.label,fill:"soft",minWidth:80})})]},B))]})})]})})}const Ls=new Set;function tw(e){o.useEffect(()=>{if(!e||Ls.has(e))return;Ls.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 d=Date.now(),m=d-h;l=s,Pf({trainingType:e,startedAt:new Date(m).toISOString(),endedAt:new Date(d).toISOString()})},p=()=>{t()?i():c()};return typeof document<"u"&&document.addEventListener("visibilitychange",p),typeof window<"u"&&window.addEventListener("pagehide",c),()=>{typeof document<"u"&&document.removeEventListener("visibilitychange",p),typeof window<"u"&&window.removeEventListener("pagehide",c),c(),Ls.delete(e)}},[e])}function Or(e,t){return e&&e.id||`page-${t??0}`}function zr(e,t){return e&&e.key||`step-${t??0}`}function Wr(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function nw(e,t){return typeof e?.props=="function"?e.props(t)||{}:e?.props||{}}const aw=300,rw=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},zn=Object.freeze({}),wd=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function $s(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 ow=e=>n.jsx(xd,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function sw(e){const{scenario:t,title:a,subTitle:r,depth:s,icon:l,wrapperStyle:i,iconTooltip:u,pageIndex:c,pageCount:p,stepIndex:h,stepCount:d,onBack:m,onComplete:b,onRoundFinished:y,onNext:C,onSettings:f,useNoiseSetting:x=!0,children:g,ariaLabel:w,label:_,buildResults:E,onResult:v,typeKey:N,entryPoint:k,dailyTotal:D,itemRef:A,renderResultPopup:B,noiseOverride:F,hideNoiseRows:L=!1}=e;tw(N&&!wd.has(N)?N:"");const q=o.useRef(0);o.useEffect(()=>{q.current=Date.now()},[]);const{t:M}=ke.useTranslation(),O=v,T=!!t,G=t?.id||null,K=t?.meta||{},ee=Array.isArray(t?.pages)?t.pages:[],re=Array.isArray(g)||o.isValidElement(g)&&typeof g!="function"?o.Children.toArray(g).filter(o.isValidElement):[],R=re.length>0,J=he=>he===Fr||he?.__isTrainingPage===!0,ne=R&&re.some(he=>J(he.type)),S=ne?re.filter(he=>J(he.type)).map((he,Te)=>{const ze=he.props||{};return{id:`children-page-${Te}`,steps:o.Children.toArray(ze.children).filter(o.isValidElement),pageTop:ze.pageTop||ze.top||null,pageBottom:ze.pageBottom||ze.bottom||null}}):[{id:"children-page-0",steps:re}],$=R&&!T&&typeof g!="function",I=$?Math.max(1,S.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 he=document.body;return he.dataset.ihabTrainingPopupCount=String(Number(he.dataset.ihabTrainingPopupCount||"0")+1),he.classList.add("ihab-training-popup-open"),()=>{const Te=Number(he.dataset.ihabTrainingPopupCount||"1")-1;Te>0?he.dataset.ihabTrainingPopupCount=String(Te):(delete he.dataset.ihabTrainingPopupCount,he.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!(typeof document>"u"||!document.body))return vv()},[]);const[P,V]=o.useState({...ia,enabled:!1}),ie=o.useRef(P);o.useEffect(()=>{ie.current=P},[P]);const U=o.useRef(F),ce=o.useRef(!1),Z=o.useRef(null);o.useEffect(()=>{let he=!1;const Te=ze=>{if(he)return;ce.current=!0;const Ze=ze?la({...ia,enabled:!1},ze):{...ia},He=Z.current;Z.current=null;const Y=He?la(Ze,He):Ze;ie.current=Y,V(Y),He&&!U.current&&bo(Y),mr(Y);const pe=U.current;if(pe){const je=typeof pe=="function"?pe(Y):pe,qe=la(Y,je);ie.current=qe,V(qe),mr(qe)}};return Yf().then(ze=>{if(he){const Ze=Z.current;if(Z.current=null,Ze&&!U.current){const He=ze?la({...ia,enabled:!1},ze):{...ia};bo(la(He,Ze))}return}Te(ze)}),()=>{he=!0}},[]);const[H,te]=o.useState(null),[W,z]=o.useState(null),ae=o.useCallback((he,Te)=>{he==="main"?te(Te):z(Te)},[]),ve=o.useRef(null),me=o.useRef(null),le=o.useCallback(()=>{me.current!==null&&(clearTimeout(me.current),me.current=null);const he=ve.current;ve.current=null,he&&bo(he)},[]);o.useEffect(()=>{if(typeof window>"u")return;const he=()=>{document.visibilityState==="hidden"&&le()};return window.addEventListener("pagehide",le),document.addEventListener("visibilitychange",he),()=>{window.removeEventListener("pagehide",le),document.removeEventListener("visibilitychange",he),le()}},[le]);const Be=o.useCallback(he=>{const Te=la(ie.current,he);if(ie.current=Te,V(Te),!ce.current){Z.current={...Z.current??{},...he},mr(Te);return}U.current||(ve.current=Te,me.current!==null&&clearTimeout(me.current),me.current=setTimeout(le,aw)),mr(Te)},[le]),Pe=P.mainSpeed,Fe=P.mainVolume,Ae=o.useCallback(he=>Be({mainSpeed:he}),[Be]),se=o.useCallback(he=>Be({mainVolume:he}),[Be]),ye=o.useMemo(()=>({settings:P,setSettings:Be,registerAnalyser:ae,mainAnalyser:H,noiseAnalyser:W,playbackRate:Pe,setPlaybackRate:Ae,mainVolume:Fe,setMainVolume:se}),[P,Be,ae,H,W,Pe,Ae,Fe,se]),Ce=o.useRef(null),[xe,$e]=o.useState(0),nt=o.useRef([]),[ct,at]=o.useState("center"),[rt,Ee]=o.useState(!1),Ue=o.useRef(!1),Ne=o.useRef(null),Ye=o.useCallback(he=>{Ue.current||(Ue.current=!0,Ee(!0),Ne.current=setTimeout(()=>{try{he()}catch{Ue.current=!1,Ee(!1)}},rw()?0:Nx))},[]);o.useEffect(()=>()=>{Ne.current&&clearTimeout(Ne.current)},[]);const et=o.useRef(m);o.useEffect(()=>{et.current=m});const ft=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{const he=Ce.current,Te=ft.current;if(xo(he,Te),he){const ze=Array.from(he.querySelectorAll(Dn)).filter(Ze=>!Ze.closest('[aria-hidden="true"]'))[0];if(ze)try{ze.focus()}catch{}}return()=>{const ze=document.activeElement;if(!ze||ze===document.body||he&&he.contains(ze))try{wo(Te)?.focus?.()}catch{}}},[]),o.useEffect(()=>ea(()=>Ye(()=>{const he=et.current;typeof he=="function"&&he()})),[Ye]),vo(Ce,!0);const[vt,dt]=o.useState(!1),jt=o.useRef(!1),[ot,st]=o.useState(null),At=o.useRef(0),Nt=o.useRef(0),Ot=()=>{At.current+=1,Nt.current+=1,st(null)},[Wt,xt]=o.useState(""),[it,bt]=o.useState(()=>Wr()),pt=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!T&&!$||(bt(Wr()),Ot())},[T,G,$]),o.useEffect(()=>{$&&bt(he=>{const Te=Math.max(0,Math.min(he.pageIndex,Math.max(0,I-1)));return Te!==he.pageIndex?{...he,pageIndex:Te,stepIndex:0}:he})},[$,I]);const kt=$?Math.max(0,Math.min(it.pageIndex,I-1)):0,mt=$?S[kt]:null,wt=$&&mt&&Array.isArray(mt.steps)?mt.steps:[],de=T?it.pageIndex:$?kt:typeof c=="number"?c:0,Le=T?ee[Math.max(0,Math.min(it.pageIndex,Math.max(0,ee.length-1)))]:null,Se=T&&Le&&Array.isArray(Le.steps)?Le.steps:[],Je=T?Se.length:$?wt.length:typeof d=="number"?d:0,ht=T||$?Math.max(0,Math.min(it.stepIndex,Math.max(0,Je))):typeof h=="number"?h:0,Rt=T?ee.length:$?I:typeof p=="number"?p:0;o.useEffect(()=>{if(!T&&!$)return;const he=T?Or(Le,de):mt?.id||`children-page-${de??0}`,Te=new Date().toISOString();for(let ze=0;ze<=ht;ze+=1){const Ze=T?zr(Se[ze],ze):`step-${ze}`,He=_t(he,Ze);Ft.current.has(He)||Ft.current.set(He,Te)}},[T,$,de,ht,mt?.id]),o.useLayoutEffect(()=>{const he=pt.current;if(typeof de=="number"&&he!==null&&de!==he&&de>he)try{xt(M("training.problemNotice",{n:de+1}))}catch{}pt.current=typeof de=="number"?de:pt.current},[de,c,M]),o.useLayoutEffect(()=>{const he=Ce.current;if(!he)return;const Te=()=>he.querySelector(".page-popup__scroll");let ze=null,Ze=null,He=null;const Y=Xe=>{const gt=Te();if(!gt)return;const Ct=gt.scrollHeight<=gt.clientHeight;if(at(Ct?"center":"top"),Xe&&!jt.current){jt.current=!0;try{dt(!0)}catch{}try{qe.disconnect()}catch{}}},pe=()=>{ze!==null&&cancelAnimationFrame(ze),ze=requestAnimationFrame(()=>{Ze!==null&&clearTimeout(Ze),Ze=setTimeout(()=>Y(!0),60)})},je=()=>{He!==null&&cancelAnimationFrame(He),He=requestAnimationFrame(()=>Y(!1))};pe(),window.addEventListener("resize",je);const qe=new MutationObserver(pe);qe.observe(he,{childList:!0,subtree:!0,attributes:!0});const Ge=setTimeout(()=>{jt.current||Y(!0)},400);return()=>{window.removeEventListener("resize",je),ze!==null&&cancelAnimationFrame(ze),Ze!==null&&clearTimeout(Ze),He!==null&&cancelAnimationFrame(He),clearTimeout(Ge);try{qe.disconnect()}catch{}}},[Ce]);const Me=o.useCallback(he=>{Ce.current&&(Ce.current._childOnNext=he)},[]),tt=o.useCallback(he=>{Ce.current&&(Ce.current._childOnResult=he)},[]),Ft=o.useRef(new Map),_t=(he,Te)=>`${he}\0${Te}`,Q=o.useCallback((he,Te,ze)=>{bt(Ze=>{const He=Ze.answersByPage[he]||{},Y=He[Te],pe=Ts(ze),je=Ts(Y);if(Y&&je>pe)return Ze;const qe=dd(ze,Ft.current.get(_t(he,Te)),pe);return{...Ze,answersByPage:{...Ze.answersByPage,[he]:{...He,[Te]:qe}}}})},[bt]),_e=o.useCallback((he,Te,ze)=>{const Ze=Or(Le,de),He=zr(he,Te);Q(Ze,He,ze)},[Le,de,Q]),Oe=o.useCallback((he,Te,ze)=>{const Ze=Or(Le,de),He=zr(he,Te);Q(Ze,He,ze),!ze?.allowChange&&he?.autoAdvance!==!1&&bt(Y=>({...Y,stepIndex:Math.max(Y.stepIndex,Te+1)}))},[Le,de,Q,bt]),Ve=o.useCallback((he,Te)=>{const ze=mt?.id||`children-page-${de??0}`,Ze=typeof Te=="number"?Te:ht??0,He=`step-${Ze}`;Q(ze,He,he),he?.allowChange||bt(Y=>({...Y,stepIndex:Math.max(Y.stepIndex,Ze+1)}))},[mt,de,ht,Q,bt]),Bt=o.useCallback((he,Te)=>{const ze=mt?.id||`children-page-${de??0}`,Ze=`step-${typeof Te=="number"?Te:ht??0}`;Q(ze,Ze,he)},[mt,de,ht,Q]),Qe=$?{currentPageIndex:de??0,currentStepIndex:ht??0,totalStepsInPage:wt.length,handleStepDone:Ve,handleStepChange:Bt}:null,zt=async()=>{const he=typeof t?.buildResults=="function"?await Promise.resolve(t.buildResults({scenario:t,pages:ee,flowState:it,answersByPage:it.answersByPage})):null;return typeof O=="function"&&await Promise.resolve(O(he))||he},Ht=async()=>{const he=mt?.id||`children-page-${it.pageIndex}`,Te=it.answersByPage[he]||{},ze=ne?(()=>{const Y={};let pe=0;return S.forEach(je=>{const qe=it.answersByPage[je.id]||{},Ge=Array.isArray(je.steps)?je.steps.length:0;for(let Xe=0;Xe<Ge;Xe+=1){const gt=qe[`step-${Xe}`];typeof gt<"u"&&(Y[`step-${pe+Xe}`]=gt)}pe+=Ge}),Y})():Te;if(typeof E=="function"){const Y=await Promise.resolve(E(ze,{pageAnswers:Te,answersByPage:it.answersByPage,pages:S,currentPageId:he}));return typeof O=="function"&&await Promise.resolve(O(Y))||Y}const Ze=Object.entries(Te).map(([Y,pe],je)=>({index:je,key:Y,payload:pe})),He={results:Ze,answers:Ze,score:0};return typeof O=="function"&&await Promise.resolve(O(He))||He},cn=()=>{const he=++At.current,Te=()=>he!==At.current;try{if(typeof document<"u"&&document.body){try{document.dispatchEvent(new CustomEvent("speechear-close-tooltips"))}catch{}document.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,cancelable:!0})),document.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0}))}}catch{}if(T){const He=zt();st(zn);const Y=He;Promise.resolve(Y).then(pe=>{Te()||st(pe||{isEmpty:!0})}).catch(pe=>{!Te()&&st({isEmpty:!0})});return}if($){const He=Ht();st(zn);const Y=He;Promise.resolve(Y).then(pe=>{Te()||st(pe||{isEmpty:!0})}).catch(pe=>{!Te()&&st({isEmpty:!0})});return}const ze=Ce.current&&Ce.current._childOnResult,Ze=He=>{try{return He?He():void 0}catch{return}};if(typeof ze=="function"){const He=Ze(ze);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Mn&&Mn.tagName.toUpperCase()==="SCRIPT"&&Mn.src||new URL("components.cjs.js",document.baseURI).href}catch{}He&&typeof He.then!="function"?st(He):st(He&&typeof He.then=="function"?zn:{});const Y=()=>{Te()||st(pe=>pe===zn?{}:pe)};Promise.resolve(He).then(pe=>{pe&&!Te()?st(pe):Y()}).catch(pe=>{Y()});return}if(typeof O=="function"){const He=Ze(O);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Mn&&Mn.tagName.toUpperCase()==="SCRIPT"&&Mn.src||new URL("components.cjs.js",document.baseURI).href}catch{}He&&typeof He.then!="function"?st(He):st(He&&typeof He.then=="function"?zn:{});const Y=()=>{Te()||st(pe=>pe===zn?{}:pe)};Promise.resolve(He).then(pe=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:Mn&&Mn.tagName.toUpperCase()==="SCRIPT"&&Mn.src||new URL("components.cjs.js",document.baseURI).href}catch{}pe&&!Te()?st(pe):Y()}).catch(pe=>{console.error("viewResults external handler failed",pe),Y()});return}},Yt=()=>{if(T){if(typeof de=="number"&&typeof Rt=="number"&&de<Rt-1){bt(Te=>({...Te,pageIndex:Te.pageIndex+1,stepIndex:0}));return}return cn()}if($){const Te=wt.length;if(typeof ht=="number"&&ht<Te-1){bt(ze=>({...ze,stepIndex:ze.stepIndex+1}));return}if(typeof de=="number"&&typeof Rt=="number"&&de<Rt-1){bt(ze=>({...ze,pageIndex:ze.pageIndex+1,stepIndex:0}));return}return cn()}if(typeof C=="function"){try{C()}catch{}return}const he=Ce.current&&Ce.current._childOnNext;if(typeof he=="function"){try{he()}catch{}return}},Tt=T?K.title||K.label||w||M("common.popup","\uD31D\uC5C5"):a||_||(Array.isArray(s)?s[s.length-1]:void 0)||w||M("common.popup","\uD31D\uC5C5"),Jt=w||Tt,en=T?K.title??K.label??Tt:a??_??Tt,An=(he,Te)=>{const ze=Or(Le,de),Ze=zr(he,Te),He=it.answersByPage[ze]?.[Ze],Y=nw(he,{page:Le,pageIndex:de,step:he,stepIndex:Te,storedPayload:He,answersByPage:it.answersByPage,flowState:it}),pe={key:Ze,index:Te,stepIndex:ht,isLast:Te===Se.length-1};switch(he?.type){case"listen":return n.jsx(Ds,{...pe,...Y,onDone:je=>Oe(he,Te,je)});case"confirm":return n.jsx(Ns,{...pe,...Y,onDone:je=>Oe(he,Te,je),onChange:je=>_e(he,Te,je)});case"confirmWithText":return n.jsx(Es,{...pe,...Y,onDone:je=>Oe(he,Te,je),onChange:je=>_e(he,Te,je)});case"orderList":return n.jsx(Ss,{...pe,...Y,onDone:je=>Oe(he,Te,je),onChange:je=>_e(he,Te,je)});default:return null}},Nn=o.useRef(void 0);o.useEffect(()=>{const he=Nn.current;if(Nn.current=de,he===void 0||he===de||!Nr())return;const Te=Ce.current;if(!Te)return;const ze=document.activeElement;if(!(!ze||ze===document.body||!Te.contains(ze)||ze.disabled===!0))return;const Ze=Te.querySelector(`.training-steps ${Dn.split(", ").join(", .training-steps ")}`)??Array.from(Te.querySelectorAll(Dn)).find(He=>!He.closest('[aria-hidden="true"]'));try{Ze?.focus()}catch{}},[de]);const gn=T?ee.length>0?n.jsx("div",{className:"training-steps",children:Se.map((he,Te)=>An(he,Te))},`replay-${xe}`):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,Pt=$?n.jsxs(hd.Provider,{value:Qe,children:[mt?.pageTop?n.jsx("div",{className:"training-page-top",children:mt.pageTop}):null,n.jsx("div",{className:"training-steps",children:wt.map((he,Te)=>{const ze=he;return o.cloneElement(ze,{...ze.props,_stepIndex:Te,_totalSteps:wt.length,_stepKey:`step-${Te}`,_pageIndex:de})})},`replay-${xe}`),mt?.pageBottom?n.jsx("div",{className:"training-page-bottom",children:mt.pageBottom}):null]}):null,St=o.useRef(-1),Mt=o.useCallback(()=>{if(!N)return;const he=ot,{results:Te,correct:ze,total:Ze}=$s(ot),He={correct:ze,total:Ze,attempt:nt.current.length+1,previousAttempts:[...nt.current]};if(St.current===Nt.current)return He;St.current=Nt.current,Ff({items:Kf(Te),category:wd.has(N)?"sentence":"word",trainingType:N,entryPoint:k??"sentence",itemRef:A??null,correct:ze,total:Ze,score:typeof he?.score=="number"?he.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-q.current)/1e3)),dailyTotal:D??null});try{y?.(He)}catch{}return He},[N,k,D,A,ot,y]);o.useEffect(()=>{!ot||ot===zn||ot?.isEmpty||($s(ot).total??0)>0&&Mt()},[ot,Mt]);const Gt=o.useCallback(()=>{const he=Mt();Ot(),Ye(()=>{typeof b=="function"&&b(he),typeof m=="function"&&m()})},[b,m,Mt,st,Ye]),dn=o.useCallback(()=>xt(""),[xt]),yn=o.useCallback(()=>{Ye(()=>{typeof m=="function"&&m()})},[m,Ye]),Vt=n.jsxs("div",{className:`page-popup${rt?" page-popup--closing":""}`,role:"dialog","aria-modal":"true","aria-label":Jt,children:[n.jsxs("div",{ref:Ce,className:`page-popup__panel ${vt?"":"page-popup__panel--measuring"} ${ct==="center"?"page-popup__panel--center":ct==="top"?"page-popup__panel--top":""}`,children:[n.jsx(id,{title:en,subtitle:T?K.subtitle||K.label:Array.isArray(s)?s.join(" / "):void 0,desc:T?void 0:r,depth:T?K.depth:s,icon:T?K.icon:l,wrapperStyle:T?K.wrapperStyle:i,iconTooltip:T?K.iconTooltip:u,progressMax:Rt,progressIndex:de,pageIndex:de,pageCount:Rt,onBack:yn,onClose:yn}),n.jsx("div",{className:"page-popup__scroll",children:n.jsx("div",{className:`page-popup__content ${ct==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:$?Pt:T?gn:typeof g=="function"?g({registerOnNext:Me,registerOnResult:tt,panelRef:Ce,setResultOverlay:st}):g})}),n.jsx(ld,{onSettings:f,onNext:Yt,onResult:cn,useNoiseSettingBtn:!!(T?K.useNoiseSetting??!0:x),stepIndex:ht,stepCount:Je,pageIndex:de,pageCount:Rt,resultOpen:!!(ot&&!ot.isEmpty),hideNoiseRows:L})]}),ot&&!ot.isEmpty&&(B??ow)({score:ot.score,results:ot.results||ot.answers||[],contextsLength:ot.results?ot.results.length:ot.answers?ot.answers.length:0,onReplay:()=>{if(q.current=Date.now(),ot!==zn){const{correct:he,total:Te}=$s(ot);nt.current.push({correct:he,total:Te})}if(Ot(),$e(he=>he+1),T){if(bt(Wr()),typeof t?.onReplay=="function")try{t.onReplay()}catch{}return}if($){bt(Wr());return}try{const he=Ce.current&&Ce.current._childOnResult;typeof he=="function"&&he({replay:!0})}catch{}},onClose:Gt,pending:ot===zn}),ot?.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(be,{htmlType:"button",variant:"main",size:48,onClick:Gt,label:M("training.result.done","\uC644\uB8CC")})})]})}),n.jsx(Ba,{message:Wt,position:"top",onClose:dn})]}),En=n.jsx(_s.Provider,{value:ye,children:Vt});return typeof document<"u"&&document.body?hn.createPortal(En,document.body):En}const Zn=sw;Zn.Page=Fr,Zn.ListenStep=md,Zn.ConfirmStep=Cd,Zn.ConfirmWithTextStep=fd,Zn.OrderListStep=bd,Zn.CardStep=gd,Zn.CardOrderStep=Vx;function lw(e=[]){const t=o.useRef(null),a=o.useCallback(s=>{const l=getComputedStyle(s),i=l.gridTemplateColumns.split(" ").filter(Boolean),u=parseFloat(i[0]??"0"),c=parseFloat(l.columnGap||"0")||0;if(!u||i.length<2){for(const p of s.children)p.style.gridColumn="";return}for(const p of s.children){const h=p;h.style.gridColumn="",h.removeAttribute("data-wide");const d=h.querySelector("button"),m=d?d.getBoundingClientRect().width:0;if(m<=u+.5)continue;const b=Math.min(i.length,Math.ceil((m+c)/(u+c)));b<=1||(h.style.gridColumn=`span ${b}`,h.setAttribute("data-wide",""))}},[]),r=o.useCallback(()=>{const s=t.current;if(s)for(const l of s.querySelectorAll(".word-search-result-block__items"))a(l)},[a]);return o.useLayoutEffect(()=>{r();const s=t.current;if(!s||typeof ResizeObserver>"u")return;const l=new ResizeObserver(()=>r());return l.observe(s),()=>l.disconnect()},[r,...e]),t}function iw({label:e,homonum:t}){const a=Ca()?.(e,t)??"",{imgRef:r,loading:s,hasImage:l,onLoad:i,onError:u}=rs(a);return l?n.jsxs("div",{className:ue("word-image-tooltip__cell"),children:[s&&n.jsx("div",{className:ue("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:ue("word-image-tooltip__cell word-image-tooltip__cell--text h3"),children:n.jsx("span",{children:e})})}function Bd({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,p=t.top-i-8;p<8&&(p=t.bottom+8),c=Math.max(8,Math.min(c,u-l-8)),s({left:c,top:p})},[t]),!t||e.length===0?null:hn.createPortal(n.jsx("div",{ref:a,className:ue("word-image-tooltip"),style:{visibility:r?"visible":"hidden",left:r?.left??0,top:r?.top??-9999},children:n.jsx("div",{className:ue("word-image-tooltip__cells"),children:e.map(l=>n.jsx(iw,{label:l.label,homonum:l.homonum},`${l.label}_${l.homonum??1}`))})}),document.body)}function uw({titleIcon:e,resultCount:t,resultUnit:a,searchQuery:r,items:s,groups:l,selected:i=[],onSelect:u,maxSelect:c,onClearSelection:p,onPrint:h,onPrintEmpty:d,className:m,emptyHint:b,showEmptyText:y=!0,sectionType:C="page",disc:f}){const{t:x,i18n:g}=ke.useTranslation(),w=g.language?.startsWith("ko")??!1,{anchorRect:_,openAt:E,close:v}=_r(),[N,k]=o.useState(null),D=o.useCallback(()=>{v(),k(null)},[v]);Zy(D,!!N);const A=(r??"").trim(),B=/^[^,[\]\s]+$/.test(A)?A:"",F=B.length>0,L=r===void 0&&t===void 0,q=F?"match":L?"original":"ganada",[M,O]=o.useState(()=>q),[T,G]=o.useState("50"),[K,ee]=o.useState(1),[re,R]=o.useState(F);re!==F&&(R(F),O(q));const J=M==="match"&&!F||M==="original"&&!L?q:M,ne=o.useMemo(()=>[...F?[{value:"match",label:x("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...L?[{value:"original",label:x("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:x("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:x("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:x("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:x("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:x("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:x("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[x,F,L]),S=o.useMemo(()=>["10","25","50","100"].map(se=>({value:se,label:x("wordSearch.pageSize",{count:Number(se),defaultValue:`${se}\uAC1C\uC529 \uBCF4\uAE30`})})),[x]),$=se=>se.words?.[0],I=o.useMemo(()=>{const se=[...B].length,ye=vf(B),Ce=new Map;return xe=>{let $e=Ce.get(xe);return $e===void 0&&($e=ye((xe.words?.[0]?.label??"").slice(0,se))?0:1,Ce.set(xe,$e)),$e}},[B]),P=o.useCallback((se,ye)=>{const Ce=nt=>$(nt)?.label??"",xe=nt=>$(nt)?.syllables??[...Ce(nt)].length,$e=nt=>(nt.words??[]).reduce((ct,at)=>{const rt=parseInt(at.grade??"",10);return Number.isFinite(rt)&&rt<ct?rt:ct},999);switch(J){case"match":return I(se)-I(ye)||fn(Ce(se),Ce(ye));case"ganada":return fn(Ce(se),Ce(ye));case"ganada_desc":return fn(Ce(ye),Ce(se));case"syllable":return xe(se)-xe(ye)||fn(Ce(se),Ce(ye));case"syllable_desc":return xe(ye)-xe(se)||fn(Ce(se),Ce(ye));case"grade":return $e(se)-$e(ye)||fn(Ce(se),Ce(ye));case"grade_desc":return $e(ye)-$e(se)||fn(Ce(se),Ce(ye));default:return 0}},[J,I]),V=o.useMemo(()=>s.slice().sort(P),[s,P]),ie=Number(T)||10,U=o.useMemo(()=>(l??[]).flatMap(se=>se.items.slice().sort(P).map(ye=>({item:ye,label:se.label}))),[l,P]),ce=l?U.length:V.length,Z=Math.max(1,Math.ceil(ce/ie)),H=Math.min(K,Z),te=o.useMemo(()=>V.slice((H-1)*ie,H*ie),[V,H,ie]),W=o.useId(),z=o.useMemo(()=>{if(!l)return null;const se=U.slice((H-1)*ie,H*ie),ye=new Map;for(const{item:Ce,label:xe}of se)ye.has(xe)||ye.set(xe,[]),ye.get(xe).push(Ce);return[...ye.entries()].map(([Ce,xe])=>({label:Ce,items:xe}))},[l,U,H,ie]);o.useEffect(()=>{ee(1)},[M,T,ce,r]);const ae=ce>0?n.jsxs("div",{className:"word-search-result-block__toolbar",children:[n.jsx(xn,{size:Lt,options:ne,value:J,onChange:O,ariaLabel:x("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),n.jsx(xn,{size:Lt,options:S,value:T,onChange:G,ariaLabel:x("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),n.jsx(Vo,{page:H,totalPages:Z,onChange:ee})]}):void 0,ve=se=>{u&&u(se)},me=t!==void 0&&a?n.jsxs(n.Fragment,{children:[x("wordSearch.resultTitlePrefix","\uCD1D "),n.jsx("span",{style:{color:"var(--color-main)"},children:t}),x("wordSearch.resultTitleSuffix",{unit:w?jf(a):a})]}):void 0,le=t!==void 0&&t>0&&c!==void 0&&a?x("wordSearch.resultDisc",{unit:w?Mf(a):a,max:c,selected:i.length}):void 0,Be=f??le,Pe=l?l.length===0:s.length===0,Fe=lw([l,te,M,ie,K]),Ae=Pe&&!y&&!b;return n.jsxs(ka,{type:C,className:De("word-search-result-block",m),children:[n.jsxs("div",{ref:Fe,className:De("word-search-result-block__inner",Ae&&"word-search-result-block__inner--head-only"),children:[(me||ae||Be)&&n.jsxs("div",{className:"word-search-result-block__head",children:[n.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&n.jsx(lt,{icon:e,className:"word-search-result-block__head-icon"}),me&&n.jsx("span",{className:"word-search-result-block__title h3",children:me})]}),ae&&n.jsx("div",{className:"word-search-result-block__head-actions",children:ae}),Be&&n.jsx("div",{className:"word-search-result-block__head-disc body-3",children:Be})]}),Pe&&(y||b)&&n.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[y&&n.jsx("p",{className:"word-search-result-block__empty body-3",children:x("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),b&&n.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:b})]}),l?(z??[]).map(se=>n.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${W}-${se.label}`,children:[n.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${W}-${se.label}`,children:se.label}),n.jsx("div",{className:"word-search-result-block__items",children:se.items.map(ye=>{const Ce=i.includes(ye.id);return n.jsx("div",{onMouseEnter:xe=>{E(xe.currentTarget),k(ye.words??[])},onMouseLeave:D,children:n.jsx(be,{htmlType:"button",size:"word",align:"grid",label:(ye.words??[]).map(xe=>xe.label),subLabel:(ye.words??[]).some(xe=>xe.subLabel)?(ye.words??[]).map(xe=>xe.subLabel):void 0,selected:Ce,onClick:()=>ve(ye.id),minWidth:200})},ye.id)})})]},se.label)):n.jsx("div",{className:"word-search-result-block__items",children:te.map(se=>{const ye=i.includes(se.id);return n.jsx("div",{onMouseEnter:Ce=>{E(Ce.currentTarget),k(se.words??[])},onMouseLeave:D,children:n.jsx(be,{htmlType:"button",size:"word",align:"grid",label:(se.words??[]).map(Ce=>Ce.label),subLabel:(se.words??[]).some(Ce=>Ce.subLabel)?(se.words??[]).map(Ce=>Ce.subLabel):void 0,selected:ye,onClick:()=>ve(se.id),minWidth:200})},se.id)})}),N&&_&&n.jsx(Bd,{words:N,anchorRect:_})]}),(p||h)&&n.jsxs("div",{className:"word-search-result-block__actions",children:[p&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:x("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:i.length===0,onClick:i.length===0?void 0:p}),h&&n.jsx("div",{onClick:i.length===0?d:void 0,children:n.jsx(be,{htmlType:"button",size:"56",type:"bar",variant:"main",label:x("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:i.length===0,onClick:i.length===0?void 0:h})})]})]})}function cw(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 dw({sections:e,selectedList:t,count:a,onCountChange:r,maxCount:s=4,minCount:l=1,combinationSections:i,combinationSectionsForSlot:u,onSelect:c,placeholder:p="-",className:h,title:d,titleIcon:m,disc:b,showInfoButton:y=!0,onClearPhoneme:C,onSearch:f,onSearchEmpty:x,searchDisabled:g=!1,searchLabel:w,searchChecking:_=!1,pairMode:E=!1,sectionType:v="page",beforeSearchContent:N,beforeContent:k,afterContent:D,hideCountControl:A=!1,ordinal:B=!1}){const{t:F}=ke.useTranslation(),L=o.useMemo(()=>F("wordPairs.infoNotes",{returnObjects:!0}),[F]),q=o.useMemo(()=>Array.from({length:s-l+1},($,I)=>{const P=l+I;return{key:String(P),label:F("wordPairs.count",{n:P})}}),[F,s,l]),M=o.useMemo(()=>F("wordPairs.ordinals",{returnObjects:!0}),[F]),O=o.useCallback($=>B?F("wordPairs.phonemeOrdinalLabel",{ordinal:M[$-1]??$}):a===1?F("wordPairs.phonemeSingleLabel","\uC74C\uC808"):F("wordPairs.phonemeN",{n:$}),[B,M,a,F]),T=o.useCallback($=>B?F("wordPairs.phonemeContrastOrdinalLabel",{ordinal:M[$-1]??$}):a===1?F("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):F("wordPairs.phonemeContrast",{n:$}),[B,M,a,F]),G=o.useCallback(($,I)=>I?n.jsxs(n.Fragment,{children:[$,n.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):$,[]),{anchorRect:K,toggleAt:ee,close:re}=_r(),R=o.useCallback($=>r(Number($)),[r]),J=vn("(max-width: 767px)"),ne=o.useCallback($=>cw($,e).map(({label:I,value:P,displayLabel:V})=>{const ie=!!P&&P!=="\uC5C6\uC74C";return n.jsxs("span",{className:De("phoneme-select-block__cell-jamo-part",P?"":"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${P==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:P==="\uC5C6\uC74C"?"x":P||p}),ie&&n.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:V??I})]},I)}),[e,p]),S=n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-tooltip-ignore":!0,children:n.jsx(be,{htmlType:"button",size:40,type:J?"dot":void 0,icon:"info",label:J?void 0:F("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:F("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:K?"is-selected":void 0,"aria-expanded":!!K,"aria-haspopup":"dialog",onClick:$=>ee($.currentTarget)})}),K&&n.jsx(Un,{title:F("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:L,anchorRect:K,onClose:re})]});return n.jsxs(ka,{type:v,title:d,icon:m,disc:b,action:y?S:void 0,className:De("phoneme-select-block",h),children:[k,!A&&n.jsx("div",{className:"phoneme-select-block__controls",children:n.jsx(_n,{options:q,value:String(a),onChange:R,size:40,ariaLabel:F("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),n.jsx("div",{className:"phoneme-select-block__cells",children:E?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map(($,I)=>{const P=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:ne(P)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:O(I+1)})]},I)})}),n.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:F("wordPairs.phonemeSelect.vs","\uB300")}),n.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map(($,I)=>{const P=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:ne(P)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:T(I+1)})]},I)})})]}):t.map(($,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:ne($)})}),n.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:O(I+1)})]},I))}),(i||u)&&n.jsx("div",{className:"phoneme-select-block__panels",children:n.jsx("div",{className:"phoneme-select-block__detail",children:E?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(($,I)=>{const P=t[I*2]??{};return n.jsx(On,{title:G(O(I+1),I===0),sections:u?u(P,I*2):i,selected:P,onSelect:c?.(I*2),align:"newline"},I)})}),n.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map(($,I)=>{const P=t[I*2+1]??{};return n.jsx(On,{title:T(I+1),sections:u?u(P,I*2+1):i,selected:P,onSelect:c?.(I*2+1),align:"newline"},I)})})]}):t.map(($,I)=>n.jsx(On,{title:G(O(I+1),I===0),sections:u?u($,I):i,selected:$,onSelect:c?.(I),align:"newline"},I))})}),N&&n.jsx("div",{className:"phoneme-select-block__before-search",children:N}),(C||f||_)&&(()=>{const $=t.every(I=>{const P=ff(I);return Object.entries(P).every(([V,ie])=>!ie||V==="coda"&&ie===Ol)});return n.jsxs("div",{className:"phoneme-select-block__search-row",onClick:$?x:void 0,children:[C&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:F("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:$,onClick:$?void 0:C}),f?n.jsx(be,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:_?n.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:w??F("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:$||g||_,onDisabledClick:_?()=>{}:void 0,"aria-busy":_||void 0,onClick:f}):_?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??F("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),D]})}function pw({title:e,sections:t,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:p,className:h}){const{t:d}=ke.useTranslation();return n.jsx(On,{className:h,title:e??d("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:p,align:"inline"})}function hw({title:e,headerAction:t,sections:a,selected:r,onSelect:s,className:l}){const{t:i}=ke.useTranslation();return a.length===0?null:n.jsx(On,{className:l,title:e??i("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:t,sections:a,selected:r,onSelect:s,align:"newline"})}function mw({title:e,mode:t,onModeChange:a,matchMode:r,onMatchModeChange:s,positionCount:l,onPositionCountChange:i,inputMode:u,onInputModeChange:c,className:p}){const{t:h}=ke.useTranslation(),d={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}),b=[{label:d.searchMode,items:[d.include,d.pick,d.explicit],display:"segmented",labelAction:n.jsx(Za,{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:d.phonemeOrder,items:[d.orderAny,d.orderMatch],display:"segmented",labelAction:n.jsx(Za,{items:h("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:d.count,items:[m(1),m(2)],display:"segmented"},{label:d.inputMode,items:[d.charInput,d.pronInput],display:"segmented",labelAction:n.jsx(Za,{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={[d.searchMode]:t==="explicit"?d.explicit:t==="pick"?d.pick:d.include,[d.phonemeOrder]:r==="ordered"?d.orderMatch:d.orderAny,[d.count]:m(l),[d.inputMode]:u==="phoneme"?d.pronInput:d.charInput},C=(f,x)=>{x===d.searchMode?a(f===d.explicit?"explicit":f===d.pick?"pick":"include"):x===d.phonemeOrder?s(f===d.orderMatch?"ordered":"unordered"):x===d.count?i(f===m(2)?2:1):x===d.inputMode&&c(f===d.pronInput?"phoneme":"word")};return n.jsx(On,{className:p,title:e??h("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:b,selected:y,onSelect:C,align:"inline"})}function Cw(e){const{title:t,items:a,columns:r,resizeStorageKey:s,gridTemplateColumns:l,mobileGridTemplateColumns:i,searchPlaceholder:u,searchFn:c,defaultSortKey:p,defaultSortAsc:h=!0,selectedId:d,selectedIds:m,onSelect:b,onClose:y,pageSizeOptions:C=[10,25,50,100],initialPageSize:f,emptyText:x,noMatchText:g,countLabel:w,topContent:_,className:E=""}=e,{t:v}=ke.useTranslation(),N=u??v("common.search","\uAC80\uC0C9"),k=x??v("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),D=g??v("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[A,B]=o.useState(""),[F,L]=o.useState(p??r[0]?.key??""),[q,M]=o.useState(h),[O,T]=o.useState(String(f??C[0]??10)),[G,K]=o.useState(1);o.useEffect(()=>{K(1)},[A,O]);const ee=c!==null,re=o.useCallback((U,ce)=>{if(!ce)return!0;const Z=ce.toLowerCase();return r.some(H=>{const te=U[H.key];return te==null?!1:String(te).toLowerCase().includes(Z)})},[r]),R=c??re,J=o.useMemo(()=>{const U=ee?a.filter(ce=>R(ce,A)):a;return F?[...U].sort((ce,Z)=>{const H=ce[F],te=Z[F];return H===te?0:vr(H,te,q)}):U},[a,A,F,q,ee,R]),ne=Math.max(1,Math.ceil(J.length/Number(O)));G>ne&&K(ne);const S=Math.min(G,ne),$=J.slice((S-1)*Number(O),S*Number(O)),I=o.useCallback(U=>{F===U?M(ce=>!ce):(L(U),M(!0)),K(1)},[F]),P=o.useMemo(()=>{if(typeof w=="function"){const U=J.length,ce=w(U);if(typeof ce=="string"){const Z=ce.lastIndexOf(String(U));if(Z>=0)return{prefix:ce.slice(0,Z),suffix:ce.slice(Z+String(U).length)}}return{label:ce}}if(typeof w=="string"&&w.includes("{n}")){const[U,ce]=w.split("{n}");return{prefix:U,suffix:ce}}return{prefix:v("common.totalCountPrefix","\uCD1D "),suffix:v("common.totalCountSuffix","\uAC1C")}},[w,J.length,v]),V=o.useMemo(()=>r.map(U=>({label:U.label,onClick:U.sortable!==!1?()=>I(U.key):void 0,className:U.className,sortDir:U.sortable!==!1&&F===U.key?q?"asc":"desc":null})),[r,F,q,I]),ie=o.useMemo(()=>C.map(U=>({value:String(U),label:v("common.pageSizeLabel",{n:U})})),[C,v]);return n.jsxs(Fn,{className:`popup-list ${E}`,title:t,onClose:y,children:[_,"label"in P&&n.jsx("p",{className:"toolbar__count body-1",children:P.label}),n.jsx(qo,{count:"label"in P?void 0:{value:J.length,prefix:P.prefix,suffix:P.suffix},search:ee?{value:A,onChange:B,placeholder:N}:void 0,pageSize:{options:ie,value:O,onChange:T},pagination:{page:S,total:ne,onChange:K}}),n.jsx(ns,{size:"medium",gridTemplateColumns:l,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:s,fields:V,items:$,onRowClick:b,renderRow:U=>{const ce=m!=null?U.id!=null&&m.has(U.id):d!=null&&U.id===d;return r.map(Z=>({content:Z.render?Z.render(U):U[Z.key]??"",className:De(Z.className,ce&&"popup-list__row--selected")}))},empty:ee&&A!==""&&a.length>0?D:k})]})}function kd(e){const{title:t,message:a,topContent:r,details:s,children:l,confirmLabel:i,cancelLabel:u,hideCancel:c=!1,extraAction:p,confirmVariant:h="main",confirmDisabled:d=!1,onConfirm:m,closeOnConfirm:b=!0,onClose:y,inline:C,size:f="small",className:x,initialFocus:g="close"}=e,{t:w}=ke.useTranslation(),_=o.useRef(null);o.useEffect(()=>{if(C||g==="close")return;const A=_.current?.closest(".popup-panel"),B=Array.from(A?.querySelectorAll(".popup-footer--buttons button")??[]),F=g==="confirm"?B[B.length-1]:c?void 0:B[p?1:0];F&&!F.disabled&&F.focus()},[]);const E=o.useRef(!1),[v,N]=o.useState(!1),k=A=>{let B=!1;return{close:()=>{B=!0,A()},didClose:()=>B}},D=async A=>{if(E.current)return;E.current=!0;const B=typeof document<"u"?document.activeElement:null;N(!0);let F=!1;try{F=await A()}catch(L){typeof console<"u"&&console.error(L)}finally{F||(E.current=!1,N(!1),requestAnimationFrame(()=>{const L=document.activeElement;(!L||L===document.body)&&B?.isConnected&&B.focus()}))}};return n.jsxs(Fn,{title:t,onClose:y,closeDisabled:v,inline:C,size:f,className:De("confirm-popup",r!=null&&"confirm-popup--has-top",x),buttons:[...p?[{label:p.label,variant:p.variant??"default",disabled:p.disabled||v,onClick:async({closeWithAnimation:A})=>{await D(async()=>{const B=k(A);await p.onClick(B.close);const F=p.closeOnClick??!0;return F&&A(),F||B.didClose()})}}]:[],...c?[]:[{label:u??w("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:v,onClick:({closeWithAnimation:A})=>A()}],{label:i??w("common.confirm","\uD655\uC778"),variant:h,disabled:d||v,onClick:async({closeWithAnimation:A})=>{await D(async()=>{const B=k(A);return await m(B.close),b&&A(),b||B.didClose()})}}],children:[r!=null&&n.jsx("div",{className:"confirm-popup__top",children:r}),s&&s.length>0&&n.jsx(nr,{children:s.map((A,B)=>n.jsx(un,{label:A.label,children:n.jsx("span",{className:"panel-row__text body-2",children:A.value})},B))}),n.jsx("p",{ref:_,className:"body-2 confirm-popup__message",children:a}),l]})}function fw(e,t,a={}){const{t:r}=ke.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]),p=s?n.jsx(kd,{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:p,allowClose:u}}function bw({onApply:e,onCancel:t}){const{t:a}=ke.useTranslation(),[r,s]=o.useState(""),[l,i]=o.useState(!1),[u,c]=o.useState(null),p=o.useRef(null),h=o.useId();o.useEffect(()=>{p.current?.focus()},[]);const d=o.useCallback(async y=>{const C=r.trim();if(C){i(!0),c(null);try{await e(C),y()}catch(f){c(Vl(f)),i(!1),requestAnimationFrame(()=>p.current?.focus())}}},[r,e]),m=o.useCallback((y,C)=>{y.key==="Enter"&&!y.nativeEvent.isComposing&&d(C)},[d]),b=y=>{s(y.target.value),c(null)};return n.jsx(Fn,{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})=>{d(y)}}],children:({closeWithAnimation:y})=>n.jsxs(n.Fragment,{children:[n.jsx("input",{ref:p,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:b,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 Ad=["var(--color-main)","var(--color-sub)"],gw=2e3;function yw(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 Rs({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,x=(g,w)=>Array.from({length:g}).map((_,E)=>{const v=6+Math.random()*12,N=Math.round(Math.min(18,v*Math.min(1.5,1+r*.4))),k=Ad[Math.floor(Math.random()*Ad.length)],D=Math.random()*300,A=(360+Math.random()*260)*r*1.2,B=(w==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,F=Math.cos(B)*A,L=Math.sin(B)*A*1.35,q=Math.random()*720-360,M=(1200+Math.random()*3e3)*Math.min(1.6,1+r*.3),O=Math.random()>.7?"50%":"3px";return{id:`${w}-${E}`,side:w,size:N,color:k,delay:D,vx:F,vy:L,angularVel:q,life:M,borderRadius:O}});return[...x(C,"left"),...x(f,"right")]},[t,r]),u=o.useRef(null),c=o.useRef({}),p=o.useRef(null),h=o.useRef(s);o.useEffect(()=>{h.current=s},[s]);const d=o.useRef(null),m=o.useRef(null),b=()=>{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=b()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const re=setTimeout(()=>h.current?.(),0);return()=>clearTimeout(re)}const C=1200,f=performance.now(),x=m.current&&m.current!==document.body?m.current.getBoundingClientRect():null,g=Math.max(60,(window.innerHeight||800)*.05),w=re=>Math.max(40,(re||window.innerWidth)*.02),_=x?.width||window.innerWidth||375,E=x?.height||window.innerHeight||812,v=re=>{const R=[...re].sort((J,ne)=>J-ne);return R[Math.floor(R.length/2)]||1},N=v(i.map(re=>Math.abs(re.vy))),k=v(i.map(re=>Math.abs(re.vx))),D=Math.sqrt(2*C*(E*.72+g))/N,A=N*D/C,B=_*.5/(k*A),F=(re,R,J)=>Math.min(J,Math.max(R,re)),L=F(D,.8,2.4),q=F(B,.7,2.2),M=a>0?a/gw:1,O=i.map(re=>({...re,life:re.life*M,vx:re.vx*q,vy:re.vy*L,startTime:f+re.delay,ended:!1})),T=x?{x:x.left-w(x.width),y:x.top+x.height+g}:{x:-w(window.innerWidth),y:window.innerHeight+g},G=x?{x:x.left+x.width+w(x.width),y:x.top+x.height+g}:{x:window.innerWidth+w(window.innerWidth),y:window.innerHeight+g},K=re=>{let R=!1;for(const J of O){const ne=c.current[J.id];if(!ne||!ne)continue;if(re<J.startTime){ne.style.display="none",R=!0;continue}if(!J._inited){const H=J.side==="left"?T.x:G.x,te=J.side==="left"?T.y:G.y;ne.style.left=`${H}px`,ne.style.top=`${te}px`,ne.style.transform="translate3d(0px, 0px, 0)",ne.style.display="block",ne.style.zIndex="100000",typeof J.color=="string"&&J.color.startsWith("var(")&&(ne.style.background=yw(ne,J.color)??"#FF0060"),J._inited=!0}const S=(re-J.startTime)/1e3;if(S<0)continue;const $=J.life/1e3;if(S>=$){ne.style.opacity="0",ne.style.display="none",J.ended=!0;continue}R=!0;const I=J.side==="left"?T.x:G.x,P=J.side==="left"?T.y:G.y,V=I+J.vx*S,ie=P+J.vy*S+.5*C*S*S,U=(J.angularVel||0)*S,ce=V-I,Z=ie-P;ne.style.transform=`translate3d(${ce}px, ${Z}px, 0) rotate(${U}deg)`,ne.style.opacity=`${Math.max(0,1-S/$)}`}R?p.current=requestAnimationFrame(K):h.current?.()};p.current=requestAnimationFrame(K);const ee=setTimeout(()=>{try{if((m.current?m.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const re=document.createElement("div");re.className="party-container",re.style.position="fixed",re.style.inset="0",re.style.pointerEvents="none",re.style.overflow="visible",re.style.zIndex="2147483647";for(const R of i){const J=document.createElement("span");J.className=`confetti confetti--${R.side}`,J.setAttribute("aria-hidden","true"),J.style.display="none",J.style.position="fixed",J.style.left="0px",J.style.top="0px",J.style.width=`${R.size}px`,J.style.height=`${Math.max(4,R.size*.6)}px`,J.style.background=R.color,J.style.borderRadius=R.borderRadius,J.style.transform="translate3d(0,0,0)",J.style.opacity="0",re.appendChild(J),c.current[R.id]=J}(document.body||m.current).appendChild(re),d.current=re}}catch{}},300);return()=>{if(p.current&&cancelAnimationFrame(p.current),clearTimeout(ee),d.current){try{d.current.remove()}catch{}d.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 Ps=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function vw({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:Ps(u.count),strength:Ps(u.strength),duration:Ps(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(Rs,{active:t,trigger:e}),a&&n.jsx(Rs,{active:!0,trigger:a.n,count:a.count,strength:a.strength,duration:a.duration,onComplete:s})]})}function _w({title:e,sub:t,rightAction:a,titleAction:r,badge:s,badgeVariant:l="default",documentTitle:i,onBack:u,backLabel:c,wrap:p=!1}){const{t:h}=ke.useTranslation();Ry(typeof e=="string"?e:i??null);const d=c??h("common.back","\uB4A4\uB85C");return n.jsxs("div",{className:p?"page-title page-title--wrap":"page-title",children:[n.jsxs("div",{className:"page-title__main",children:[n.jsxs("div",{className:"page-title__title-row",children:[u&&n.jsx(be,{htmlType:"button",className:"page-title__back",size:48,type:"dot",icon:"chevron-left",iconSize:"large",useBorder:!1,iconColor:"var(--color-text-primary)",ariaLabel:d,showTooltipInfo:d,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 xw(e){return e??""}const Nd=o.createContext({words:[],loading:!1});function ww(){return o.useContext(Nd)}function Bw({words:e,loading:t,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c,children:p}){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(Nd.Provider,{value:h,children:p})}function kw({items:e,actions:t,columns:a,flat:r=!1,className:s,style:l}){const i=a??e.length;return n.jsx("section",{className:De("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 Aw=(e,t)=>`${e} / ${t}`;function Nw({blocks:e,sectionTitles:t,logo:a,footer:r,pageLabel:s=Aw,pageWidth:l,pageHeight:i,margin:u,className:c,style:p}){const{t:h}=ke.useTranslation(),d=o.useRef(null),m=o.useRef(null),b=o.useRef(null),y=o.useRef(null),[C,f]=o.useState(null),[x,g]=o.useState(!1);o.useEffect(()=>{const M=d.current;if(!M)return;const O=()=>g(M.scrollWidth>M.clientWidth+1);if(O(),typeof ResizeObserver>"u")return;const T=new ResizeObserver(O);return T.observe(M),()=>T.disconnect()},[C]);const w=e.map(M=>`${M.id}\0${M.section??""}\0${M.group??""}`).join(""),_=C&&C.shape===w?C.pages:null,[E,v]=o.useState(0);o.useEffect(()=>{const M=y.current;if(!M||typeof ResizeObserver>"u")return;const O=new ResizeObserver(()=>v(M.offsetHeight));return O.observe(M),()=>O.disconnect()},[]);const[N,k]=o.useState(0);o.useEffect(()=>{const M=m.current;if(!M||typeof ResizeObserver>"u")return;let O=null;const T=typeof requestAnimationFrame=="function"?ee=>requestAnimationFrame(ee):ee=>setTimeout(ee,16),G=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:ee=>clearTimeout(ee),K=new ResizeObserver(()=>{O==null&&(O=T(()=>{O=null,k(ee=>ee+1)}))});return Array.from(M.children).forEach(ee=>K.observe(ee)),()=>{K.disconnect(),O!=null&&G(O)}},[w]),o.useLayoutEffect(()=>{const M=m.current,O=y.current;if(!M||!O)return;const T=$=>$.getBoundingClientRect().height||$.offsetHeight,G=new Map;b.current?.querySelectorAll("[data-chrome-section]").forEach($=>{G.set($.dataset.chromeSection??"",T($))});const K=$=>T(O)-(G.get($??"")??0),ee=Array.from(M.children).map($=>T($)),re=[];e.forEach(($,I)=>{const P=re[re.length-1],V=P?e[P[0]]:void 0;V&&$.group!=null&&V.group===$.group&&V.section===$.section?P.push(I):re.push([I])});const R=[];let J=[],ne=0;const S=()=>{J.length&&R.push(J),J=[],ne=0};re.forEach($=>{const I=$.reduce((V,ie)=>V+ee[ie],0),P=K(e[$[0]].section);J.length&&e[J[0]].section!==e[$[0]].section&&S(),I>P?$.forEach(V=>{J.length&&ne+ee[V]>P+.01&&S(),J.push(V),ne+=ee[V]}):(J.length&&ne+I>P+.01&&S(),$.forEach(V=>J.push(V)),ne+=I)}),S(),f($=>$&&$.shape===w&&JSON.stringify($.pages)===JSON.stringify(R)?$:{shape:w,pages:R})},[w,E,l,i,u,N]);const D=Fo,A=D,B=r??n.jsxs(n.Fragment,{children:[n.jsx("img",{src:A,alt:"IHAB",className:"report-doc__logo"}),"\xA9 IHAB, Inc. All rights reserved."]}),F=(M,O,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:B}),n.jsx("span",{className:"report-doc__page-no",children:s(M,O)})]})}),L=Array.from(new Set(e.map(M=>M.section??""))),q={...l?{"--report-page-w":l}:null,...i?{"--report-page-h":i}:null,...u?{"--report-margin":u}:null,...p};return n.jsxs("div",{ref:d,className:De("report-doc",c),style:q,tabIndex:x?0:void 0,role:x?"group":void 0,"aria-label":x?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:b,children:L.map(M=>{const O=F(1,1,M||void 0);return n.jsxs("div",{"data-chrome-section":M,children:[O.header,O.footer]},M)})}),n.jsx("div",{ref:m,className:"report-doc__measure-blocks",children:e.map(M=>n.jsx("div",{children:M.content},M.id))})]}),_&&n.jsx("div",{className:"report-doc__pages",children:_.map((M,O)=>{const{header:T,footer:G}=F(O+1,_.length,e[M[0]].section);return n.jsxs("section",{className:"report-doc__page",children:[T,M.map(K=>n.jsx("div",{children:e[K].content},e[K].id)),G]},O)})})]})}function Ew({title:e,fields:t,columns:a=4,className:r,style:s}){return n.jsxs("div",{className:De("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 da=new Map;let Hr=null;const Dw=12;function Sw(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 Vr(){const e=new Map;for(const t of da.keys()){if(!t.isConnected)continue;const a=Sw(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+Dw)}}}function jw(e){return typeof window>"u"?()=>{}:(da.set(e,(da.get(e)??0)+1),da.get(e)===1&&typeof ResizeObserver<"u"&&(Hr??(Hr=new ResizeObserver(()=>Vr())),Hr.observe(e)),Vr(),()=>{const t=(da.get(e)??1)-1;if(t>0){da.set(e,t),Vr();return}da.delete(e),Hr?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),Vr()})}function Tw({title:e,message:t,actionLabel:a,onAction:r,icon:s,onClose:l,className:i=""}){const{t:u}=ke.useTranslation(),c=a??u("common.update","\uC5C5\uB370\uC774\uD2B8"),p=o.useRef(null),h=o.useRef(!1);return o.useLayoutEffect(()=>{const d=p.current,m=d?.parentElement?.closest(".update-alert-stack")??d,b=m?jw(m):null;return()=>{b?.(),h.current&&d&&d.contains(document.activeElement)&&fr(d)}},[]),n.jsxs("div",{ref:p,className:De("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(Ys,{size:20,strokeWidth:2})}),n.jsxs("div",{className:"update-alert__body",children:[n.jsx("div",{className:"update-alert__title h4",children:e}),n.jsx("div",{className:"update-alert__message body-3",children:t})]})]}),r&&n.jsx(be,{htmlType:"button",size:32,variant:"main",shape:"pill",className:"update-alert__action",onClick:r,children:c})]})}function Mw({title:e,titleLevel:t=3,description:a,topActions:r,children:s,footerLeft:l,footerRight:i,ariaLabel:u,onClick:c,draggable:p,onDragStart:h,onDragEnd:d,className:m}){const b=t?`h${t}`:"div",y=l!=null||i!=null,C=s!=null&&s!==!1,f=o.useCallback(x=>{c&&x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),c())},[c]);return n.jsxs("div",{className:De("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:p,onDragStart:h,onDragEnd:d,children:[n.jsxs("div",{className:"training-card__header",children:[n.jsxs("div",{className:"training-card__title-row",children:[typeof e=="string"?n.jsx(b,{className:"training-card__title h4",children:e}):e,r!=null&&n.jsx("div",{className:"training-card__top-actions",onClick:x=>x.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 Lw({title:e,titleLevel:t=3,count:a,collapsed:r=!1,onToggle:s,beforeSort:l,sort:i,actions:u,empty:c=!1,emptyContent:p,dragOver:h=!1,onDragOver:d,onDragLeave:m,onDrop:b,children:y,className:C}){const{t:f}=ke.useTranslation(),x=o.useId(),g=t?`h${t}`:"span",w=s!=null,_=De("training-card-group",h&&"training-card-group--dragover",r&&"training-card-group--collapsed",w&&"training-card-group--collapsible",C);return n.jsxs("div",{className:_,onDragOver:d,onDragLeave:m,onDrop:b,role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?x:void 0,children:[n.jsxs("header",{className:"training-card-group__header",children:[w&&n.jsx(be,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:r?"chevron-right":"chevron-down",ariaLabel:typeof e=="string"&&e?r?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(g,{id:x,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:E=>E.stopPropagation(),children:[l,i&&n.jsx(xn,{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:p}):n.jsx("div",{className:"training-card-group__grid",children:y}))]})}const $w="speechear:saved_word_tables";function Rw(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 Pw(){try{const e=localStorage.getItem($w);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(Rw):[]}catch{return[]}}function Ed(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 Fs(e){return e.map(t=>t.homonum!=null?`${t.word}#${t.homonum}`:t.word).join("|")}function Fw(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 Iw({title:e,titleIcon:t,disc:a,filterTitle:r,filterCollapsible:s,filterDefaultCollapsed:l,filterCollapsed:i,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:p,code:h,baseItem:d,baseContentTypes:m,cellCapacity:b,maxItemsPerPage:y,items:C,onSaveComplete:f,onLoad:x,onRemoveItem:g,onCopyItem:w,onReplaceItem:_,onPickForm:E,onReset:v,resetLabel:N,saveButtonLabel:k,secondarySaveButtonLabel:D,onReorder:A,showCellCount:B,onAddItem:F,className:L,renderSavePopup:q,renderWordSearch:M,hideControls:O,saveOnly:T,tableName:G,nameValue:K,onNameChange:ee,descriptionValue:re,onDescriptionChange:R,namePlaceholder:J,descriptionPlaceholder:ne,existingNames:S,editingName:$,onCancel:I,initialItemsPerPage:P,renderCellAction:V,actionsLeftExtra:ie}){const{t:U}=ke.useTranslation(),ce=N??U("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),Z=C===void 0,H=!!ee,[te,W]=o.useState([]),z=(K??"").trim(),ae=z||(J??"").trim(),ve=(re??"").trim()||(ne??"").trim(),me=(S??[]).map(we=>we.trim().toLowerCase()),le=[$?.trim().toLowerCase(),...te].filter(we=>!!we),Be=[...me];for(const we of le){const Ie=Be.indexOf(we);Ie!==-1&&Be.splice(Ie,1)}const Pe=z!==""&&Be.includes(z.toLowerCase()),[Fe,Ae]=o.useState(Array(4).fill(null)),[se,ye]=o.useState(4),[Ce,xe]=o.useState(null),$e=Fe.slice(0,se),nt=!!p?.show,[ct,at]=o.useState(!0),[rt,Ee]=o.useState(!0),Ue=p&&{...p,top:ct,bottom:rt},[Ne,Ye]=o.useState("landscape"),[et,ft]=o.useState([...wc]),[vt,dt]=o.useState("show"),[jt,ot]=o.useState(!0),[st,At]=o.useState(!0),Nt=o.useRef(null),Ot=o.useRef([]),[Wt,xt]=o.useState(P==="all"?Number.POSITIVE_INFINITY:P??8),[it,bt]=o.useState("right"),[pt,kt]=o.useState(!1),[mt,wt]=o.useState(!1),{toastMessage:de,toastType:Le,showWarning:Se,clearToast:Je}=Zi("warning"),ht=o.useCallback(()=>xe(null),[xe]);d&&Z&&Dt("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[Rt,Me]=o.useState(()=>Math.max(C?.length??1,1)),tt=Math.max(b??0,C?.length??0,1),Ft=b!=null||!!B,_t=Z?se:B?Math.max(Rt,C?.length??1,1):tt,{width:Q,height:_e}=sa[Ne],Oe=!Z&&!B,Ve=Math.max(1,Math.min(tt,y??tt)),Bt=Math.min(Wt,Ve),Qe=Oe?Bt:_t,zt=Math.ceil((C?.length??0)/Math.max(1,Qe)),Ht=(C?.length??0)<tt?Math.floor((C?.length??0)/Math.max(1,Qe))+1:0,cn=Oe?Math.max(1,zt,Ht):0,Yt=Oe?Array.from({length:cn},(we,Ie)=>(C??[]).slice(Ie*Qe,(Ie+1)*Qe)):null,Tt=!!Yt&&Yt.length>1,Jt=Z?$e.some(we=>we!==null&&we.length>1):(C??[]).some(we=>(we.words??[]).length>1),en=G?.trim()||`${Jl(Wa())} ${Jt?U("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):U("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,An=o.useCallback(()=>Tt?Ot.current.filter(we=>we!==null):Nt.current?[Nt.current]:[],[Tt]),{print:Nn,openNewWindow:gn,downloadHtml:Pt}=fs({getElements:An,paperW:Q,paperH:_e,fileName:en,onPopupBlocked:()=>{Se(U("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."))}}),St=we=>{ye(we),Ae(Ie=>Ie.length>=we?Ie:[...Ie,...Array(we-Ie.length).fill(null)]),xe(null)},Mt=we=>{Ae(Ie=>{const ut=[...Ie];return ut[we]=null,ut}),Ce===we&&xe(null)},Gt=we=>{if(Ce===null)return;const Ie=Ce;Ae(Et=>{const pn=[...Et];return pn[Ie]=we.length>0?we:null,pn});const ut=$e.findIndex((Et,pn)=>pn>Ie&&Et===null);xe(ut!==-1?ut:null)},dn=Z?$e.some(we=>we?.some(Ie=>!!Ie.colloquialPronunciation)):(C??[]).some(we=>(we.words??[]).some(Ie=>!!Ie.colloquialLabel)),yn=!Z&&Bc([...d?[d]:[],...C??[]]),Vt=o.useMemo(()=>Ca()?Z?Fe.slice(0,se).flatMap(we=>(we??[]).map(Ie=>[Ie.word,Ie.homonum])):(we=>we.flatMap(Ie=>(Ie.words??[]).map(ut=>[ut.label,ut.homonum])))([...d?[d]:[],...C??[]]):[],[Z,Fe,se,C,d]),[En,he]=o.useState(!1);o.useEffect(()=>{if(Vt.length===0)return;let we=!1;return Promise.all(Vt.map(([Ie,ut])=>Rl(Ie,ut))).then(Ie=>{we||he(Ie.some(Boolean))},()=>{}),()=>{we=!0}},[Vt]);const Te=Vt.length>0&&En,ze=o.useMemo(()=>[...Z||B?[{label:U("wordTable.filter.columns","\uCE78 \uC218"),items:n_.map(we=>({value:`${we}\uCE78`,displayLabel:U("wordTable.filter.column",{count:we})})),display:"segmented"}]:[],...Oe&&(C?.length??0)>0?[Tc(U,{hasPairs:Jt,itemCount:tt,max:y})]:[],...Tt?[r_(U)]:[]],[U,Z,B,Oe,C?.length,Jt,tt,y,Tt]),Ze={...Z||B?{[U("wordTable.filter.columns","\uCE78 \uC218")]:`${_t}\uCE78`}:{},...Oe&&(C?.length??0)>0?{[U(Jt?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${Bt}\uAC1C`}:{},...Tt?{[U("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:it}:{}},He=(we,Ie)=>{Ie===U("wordTable.filter.columns","\uCE78 \uC218")?Z?St(parseInt(we)):Me(parseInt(we)):Ie===U(Jt?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")?xt(Mc(parseInt(we),tt)):Ie===U("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&bt(Lc(we))},Y=Z?Fw($e.filter(we=>we!==null&&we.length>0).map(we=>({id:Fs(we),words:we.map(Ed)}))):C??[],pe=()=>{Z&&Ae(we=>we.length>se?we.slice(0,se):we)},je=(we=!1)=>{if(wt(we),H&&f){const Ie=ae.trim().toLowerCase();Ie&&W(ut=>ut.includes(Ie)?ut:[...ut,Ie]),f(ae,Y,ve||void 0,we),pe();return}if(T&&f){f("",Y,void 0,we),pe();return}if(f){kt(!0);return}Pt()},[qe,Ge]=o.useState(!1),[Xe,gt]=o.useState(""),Ct=Xe.trim(),ge=Ct!==""&&me.includes(Ct.toLowerCase()),j=()=>{gt(ae?U("wordTable.save.copyName",{name:ae,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),Ge(!0)},X=()=>{!Ct||ge||!f||(f(Ct,Y,ve||void 0,!0),pe(),Ge(!1))},fe=Y.length===0,Re=fe||H&&(ae===""||Pe),We=()=>{if(fe){Se(U("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(H&&ae===""){Se(U("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}H&&Pe&&Se(U("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},Ke=n.jsx(Aa,{items:Y,orientation:Ne,contentTypes:et,baseItem:d,baseContentTypes:m,cutLine:vt,showOutline:jt,showDivLine:st,count:_t});return n.jsxs(n.Fragment,{children:[n.jsxs(ka,{type:"page",icon:t,title:e,disc:a,className:De("word-table-block",L),children:[qe&&n.jsx(Fn,{size:"small",title:D??U("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>Ge(!1),footer:({closeWithAnimation:we})=>n.jsxs(n.Fragment,{children:[n.jsx(be,{htmlType:"button",size:48,type:"bar",label:U("common.cancel","\uCDE8\uC18C"),onClick:we}),n.jsx(be,{htmlType:"button",size:48,type:"bar",variant:"main",label:U("common.save","\uC800\uC7A5"),disabled:!Ct||ge,onClick:X})]}),children:n.jsx(Yn,{label:U("wordTable.save.nameLabel","\uC774\uB984"),value:Xe,onChange:gt,placeholder:U("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:X,error:ge?U("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),pt&&f&&q?.({defaultName:typeof e=="string"?e:U("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:Ke,previewW:Q,previewH:_e,items:Y,existingNames:Pw().map(we=>we.name),saveAsNew:mt,onSave:(we,Ie)=>{f(we,Y,Ie,mt),pe(),kt(!1)},onCancel:()=>kt(!1)}),(Z||F)&&Ce!==null&&M?.({cellIndex:Ce,onConfirm:Z?Gt:we=>{if(F){const Ie=we[0];if(Ie){const ut=new Set((C??[]).map(pn=>pn.id));let Et=Fs([Ie]);for(let pn=2;ut.has(Et);pn++)Et=`${Fs([Ie])}~${pn}`;F({id:Et,words:[Ed(Ie)]})}}xe(null)},onClose:ht}),!O&&n.jsx(ps,{title:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,hasImage:Te,hasColloquial:dn,hasCaption:yn,contentTypes:et,orientation:Ne,showOutline:jt,cutLine:vt,showDivLine:st,setters:{setContentTypes:ft,setOrientation:Ye,setShowOutline:ot,setCutLine:dt,setShowDivLine:At,setShowTopInfo:at,setShowBottomInfo:Ee},showCutLine:(Oe?Qe:_t)>1,showDivLine2:Jt,middleSections:ze,extraSelected:Ze,onExtraSelect:He,showPaperBands:nt,showTopInfo:ct,showBottomInfo:rt}),Tt&&Yt?n.jsx("div",{className:"word-table-block__pages",children:Yt.map((we,Ie)=>n.jsx(Aa,{orientation:Ne,contentTypes:et,cutLine:vt,showOutline:jt,showDivLine:st,count:Qe,items:we,baseItem:d,baseContentTypes:m,onRemoveItem:g,onCopyItem:w,onReplaceItem:_,onPickForm:E,onReorder:A&&((ut,Et)=>A(ut+Ie*Qe,Et+Ie*Qe)),indexOffset:Ie*Qe,totalCount:C?.length??0,renderCellAction:V&&((ut,Et)=>V(ut+Ie*Qe,Et)),showFillerAdd:!!F,onActivateCell:F?(ut=>xe(ut+Ie*Qe)):void 0,addableCount:Ft?Math.max(0,Math.min(Qe,tt-Ie*Qe)):void 0,brand:Ue,code:h,contentRef:ut=>{Ot.current[Ie]=ut},pageNumber:{current:Ie+1,total:Yt.length},pageNumberPosition:it},Ie))}):n.jsx(Aa,{orientation:Ne,contentTypes:et,cutLine:vt,showOutline:jt,showDivLine:st,count:_t,items:Z?void 0:C??[],baseItem:Z?void 0:d,baseContentTypes:m,editCells:Z?$e:void 0,activeCell:Ce,onActivateCell:Z||F?xe:void 0,onRemoveCell:Z?Mt:void 0,onRemoveItem:Z?void 0:g,onCopyItem:Z?void 0:w,onReplaceItem:Z?void 0:_,onPickForm:Z?void 0:E,onReorder:Z?void 0:A,addableCount:Ft?_t:void 0,renderCellAction:Z?void 0:V,brand:Ue,code:h,showFillerAdd:!!F,contentRef:Nt}),!O&&!T&&ie!=null&&n.jsx("div",{className:"word-table-block__table-actions",children:ie}),H&&!O&&n.jsxs(nr,{size:"medium",labelWidth:64,useBorder:!1,useRowBorder:!1,className:"word-table-block__meta",children:[n.jsx(un,{variant:"custom",label:U("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:n.jsx(Yn,{required:!0,value:K??"",onChange:ee,placeholder:J?J+U("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):U("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:U("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:Pe?U("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:we=>{(we.key==="Tab"&&!we.shiftKey||we.key===" ")&&!(K??"").trim()&&(J??"").trim()&&(we.preventDefault(),ee?.(J??""))}})}),n.jsx(un,{variant:"custom",label:U("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:n.jsx(Yn,{value:re??"",onChange:R,placeholder:ne?ne+U("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):U("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:U("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:we=>{(we.key==="Tab"&&!we.shiftKey||we.key===" ")&&!(re??"").trim()&&(ne??"").trim()&&(we.preventDefault(),R?.(ne??""))}})})]})]}),!O&&n.jsxs("div",{className:"word-table-block__actions",children:[n.jsxs("div",{className:"word-table-block__actions-left",children:[!T&&x&&n.jsx(be,{htmlType:"button",size:40,type:"bar",label:U("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:x}),!T&&v&&n.jsx(be,{htmlType:"button",size:40,type:"bar",label:ce,onClick:v}),!T&&n.jsx(be,{htmlType:"button",size:40,type:"bar",label:U("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:gn})]}),n.jsxs("div",{className:"word-table-block__actions-right",children:[I&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:U("common.cancel","\uCDE8\uC18C"),onClick:I}),!T&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:U("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:Nn}),D&&n.jsx(be,{htmlType:"button",size:"56",type:"bar",label:D,onClick:()=>H?j():je(!0),disabled:fe,onDisabledClick:()=>{Se(U("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."))}}),n.jsx(be,{htmlType:"button",size:"56",type:"bar",variant:"main",label:k??U("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>je(!1),disabled:Re,onDisabledClick:We})]})]}),n.jsx(Ba,{message:de,type:Le,onClose:Je})]})}const Ow=8;function Dd({items:e,className:t}){const{t:a}=ke.useTranslation(),r=o.useRef(null),[s,l]=o.useState(null),i=o.useCallback(()=>l(r.current?.getBoundingClientRect()??null),[]),u=o.useCallback(()=>l(null),[]),c=gr(!!s,w=>{w?i():u()},r),p=e.length,h=p<=3?1:2,d=Ow,m=p>d,b=e.slice(0,m?d-1:d),y=p-b.length,C=e.slice(b.length).map(w=>w.words?.length?w.words.map(_=>_.label).join(" / "):w.id),f=Math.min(5,Math.ceil(C.length/25)),x=Math.ceil(Math.min(p,d)/h)||1,g=h*x;return n.jsx("div",{className:De("word-table-thumb",t),style:{gridTemplateColumns:`repeat(${h}, 1fr)`},children:Array.from({length:g},(w,_)=>{if(m&&_===d-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:v=>{Gn(v)||i()},onPointerLeave:v=>{Gn(v)||u()},onFocus:()=>{ta()||i()},onBlur:u,onClick:v=>{v.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(Un,{anchorRect:s,items:C,showIndex:!1,closeOnOutsideClick:!1,columns:f})]},_);const E=b[_];return E?n.jsx("div",{className:"word-table-thumb__cell",children:(E.words?.length?E.words:[{label:E.id}]).map((v,N)=>n.jsxs(o.Fragment,{children:[N>0&&n.jsx("span",{className:"word-table-thumb__divider"}),n.jsx("span",{className:"word-table-thumb__word body-3",children:v.label})]},N))},_):n.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},_)})})}function zw({items:e,name:t,description:a,createdAt:r,code:s,published:l,publishedLabel:i,shared:u,sharedLabel:c,isNew:p,publisherName:h,publishedAt:d,likeCount:m,downloadCount:b,onPublisherClick:y,selected:C,onClick:f,onMore:x,titleNode:g,className:w}){const{t:_}=ke.useTranslation(),E=g!=null,v=h!=null||d!=null||m!=null||b!=null,N=k=>{k.target===k.currentTarget&&!E&&(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),f?.())};return n.jsxs("div",{className:De("word-table-button",C?"word-table-button--selected":"",v?"":"word-table-button--no-footer",w),role:"button",tabIndex:0,"aria-label":s?`${t} (${s})`:t,onClick:E?void 0:f,onKeyDown:N,children:[p&&n.jsx("span",{className:"word-table-button__new-dot","aria-label":_("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),n.jsx(Dd,{items:e,className:"word-table-button__thumb"}),n.jsxs("div",{className:"word-table-button__info",children:[n.jsxs("div",{className:"word-table-button__info-text",children:[g??n.jsx("div",{className:"word-table-button__title h4",children:t}),a&&n.jsx("div",{className:"word-table-button__desc body-3",children:a})]}),x&&!E&&n.jsx(be,{htmlType:"button",className:"word-table-button__more",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:_("common.moreFor",{name:t}),onClick:k=>{k.stopPropagation(),x(k)}})]}),(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?Xl(r,_):""})}),n.jsxs("span",{className:"word-table-button__meta-right",children:[(l||u)&&n.jsxs("span",{className:"word-table-button__badges",children:[l&&n.jsx(ln,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:i??_("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),u&&n.jsx(ln,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:c??_("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),s&&n.jsx("span",{className:"word-table-button__code caption-1",children:s})]})]}),v&&n.jsxs("div",{className:"word-table-button__footer",children:[n.jsxs("span",{className:"word-table-button__store-by",children:[h&&(y?n.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":_("wordTable.publisherFilter",{name:h,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:k=>{k.stopPropagation(),y()},children:h}):n.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:h})),d&&n.jsx("span",{className:"training-card__date body-4",children:Xl(d,_)})]}),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":_("common.likeCount",{count:m,defaultValue:`\uC88B\uC544\uC694 ${m}`})}),b!=null&&n.jsx(ln,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(b),"aria-label":_("common.downloadCount",{count:b,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${b}`})})]})]})]})}/**
1045
1045
  * @license lucide-react v1.38.0 - ISC
1046
1046
  *
1047
1047
  * This source code is licensed under the ISC license.
1048
1048
  * See the LICENSE file in the root directory of this source tree.
1049
- */const Ow=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],zw=oe("image",Ow);/**
1049
+ */const Ww=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Hw=oe("image",Ww);/**
1050
1050
  * @license lucide-react v1.38.0 - ISC
1051
1051
  *
1052
1052
  * This source code is licensed under the ISC license.
1053
1053
  * See the LICENSE file in the root directory of this source tree.
1054
- */const Ww=[["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"}]],Hw=oe("circle-x",Ww);function Vw(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function Fs({icon:e,label:t,state:a,pct:r,subText:s}){const{t:l}=ke.useTranslation(),i=a==="done",u=a==="pending",c=a==="error",p=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(Js,{size:22,color:"white",strokeWidth:2.5}):c?n.jsx(Hw,{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:p}%`:void 0}})})]})]})}function qw({title:e,progress:t,onDone:a,onRetry:r,onClose:s,inline:l}){const{t:i}=ke.useTranslation(),{phase:u,error:c,wordCount:p,imagePage:h,imageDone:d,imageTotal:m,pairPercent:b}=t,y=Vw(u),C=u==="done",f=!!c;function x(N){return f&&y===N?"error":y>N?"done":y===N?"active":"pending"}const g=x(1),w=x(2),_=x(3),E=u==="image-match"&&m?Math.round((d??0)/m*100):void 0,v=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:bo(d),total:bo(m)})}},[w,u,h,m,d,i]);return n.jsx(Fn,{inline:l,className:"popup--word-data-update",title:e,footer:f&&r?n.jsx(be,{htmlType:"button",size:56,variant:"main",onClick:r,children:i("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):f?n.jsx(be,{htmlType:"button",size:56,variant:"main",onClick:s??a,children:i("common.close","\uB2EB\uAE30")}):n.jsx(be,{htmlType:"button",size:56,variant:"main",disabled:!C,onClick:a,children:i("common.done","\uC644\uB8CC")}),children:n.jsxs("div",{className:"wdup-cards",children:[n.jsx(Fs,{icon:n.jsx(Gs,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:g,subText:g==="active"?i("wordData.downloadingCount",{n:bo(p),count:p}):void 0}),n.jsx(Fs,{icon:n.jsx(zw,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:w,pct:E,subText:v}),n.jsx(Fs,{icon:n.jsx(Zs,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:_,pct:_==="active"?b??0:void 0,subText:void 0})]})})}function Uw({enabled:e=!1,renderResultPopup:t}={}){const{t:a}=ke.useTranslation(),[r,s]=o.useState(null),[l,i]=o.useState(null),u=b=>{let y=null;b==="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}]}:b==="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}]}:b==="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}]}:b==="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(b)},c=o.useCallback(()=>{s(null),i(null)},[]),p=o.useCallback(()=>u("noise"),[]),h=o.useCallback(()=>u("short"),[]),d=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:p,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:d,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=i2,exports.ActionCard=vy,exports.Alert=X2,exports.AppHeader=m2,exports.AudioMeter=Qo,exports.AudioPlayer=Bs,exports.Avatar=rv,exports.Badge=ln,exports.BarChart=a4,exports.BarChartControls=Uu,exports.Board=xv,exports.BottomNav=eu,exports.BrandIdentity=ou,exports.BrandLogo=Yv,exports.Breadcrumb=lv,exports.BulkBar=qv,exports.Button=be,exports.CONSENT_KINDS=Fu,exports.CORE_VERSION=cy,exports.Calendar=E4,exports.CardStep=gd,exports.ChartLegend=qo,exports.ChartSection=Ar,exports.ChartTotal=xa,exports.Checkbox=Wo,exports.ChoiceChips=R_,exports.CircleBadge=Sn,exports.CodeBox=Vv,exports.ColorPicker=pv,exports.CompanyMeta=Ev,exports.ConfirmPopup=kd,exports.ConfirmStep=Cd,exports.ConfirmWithTextStep=fd,exports.ConsentRecordPopup=Iv,exports.ContrastFilterPanel=pw,exports.CoreScope=_y,exports.CountTile=gv,exports.CouponInputPopup=Cw,exports.DEFAULT_NOISE_SETTINGS=ia,exports.DatePicker=Pu,exports.DebugResultLauncher=Uw,exports.DescriptionTooltip=Un,exports.DeviceSideTable=k4,exports.Dialog=_v,exports.Divider=K2,exports.Dropdown=xn,exports.EffectPartyPopper=$s,exports.EffectPartyPopperHost=gw,exports.EmptyState=gy,exports.ErrorState=yy,exports.FILTER_ALL_VALUE=kn,exports.FileUpload=sv,exports.FilterPanel=On,exports.FilterSectionInfo=Za,exports.Footer=P_,exports.GameIntro=s4,exports.Header=su,exports.Icon=lt,exports.IconGridMenu=$_,exports.IconRenderer=lt,exports.InfoTooltip=Ln,exports.ItemActions=Gv,exports.LEVEL_MAX=Ea,exports.LINE_CHART_HOVER_DELAY_MS=Gu,exports.LandingBottomSticky=I_,exports.LandingHeader=F_,exports.LineChart=o4,exports.ListPopup=hw,exports.ListenStep=md,exports.Loader=ga,exports.MARKS=Sr,exports.MARK_ICON=dc,exports.MARK_VARIANT=pc,exports.MediaQueryOverrideContext=ui,exports.MenuTooltip=Ga,exports.NOISE_RATIO_MAX=or,exports.NOISE_RATIO_STEP=zc,exports.NoisePlayerContext=vs,exports.NoiseSettingsTooltip=sd,exports.NoticeBox=wy,exports.NotifyTextPreview=Kv,exports.OrderListStep=bd,exports.PASS_CARD_BG_VARS=aa,exports.POS_LABEL=Cc,exports.PROMO_BANNER_BG_COMPONENTS=Wi,exports.PROMO_BANNER_BG_OPTIONS=My,exports.PROMO_BANNER_BG_VARS=Va,exports.Page=Fr,exports.PageTitle=yw,exports.Pagination=Ho,exports.Panel=nr,exports.PanelGrid=Mv,exports.PanelRow=un,exports.PanelRowDevice=Tv,exports.PassCard=fu,exports.PassCardBg=V2,exports.PassCardBgIHAB=q2,exports.PassCardBgLeftColorGrid=U2,exports.PassCardBgTwoCircle=du,exports.PaymentPlan=H2,exports.PersonCard=wv,exports.PhonemeFilterPanel=dw,exports.PhonemeSelectBlock=uw,exports.Popup=Fn,exports.ProgressBar=h4,exports.ProgressIndicator=nc,exports.PromoBanner=o2,exports.PromoBannerBgDark=Ni,exports.PromoBannerBgDeep=_i,exports.PromoBannerBgDiagonal=ji,exports.PromoBannerBgDots=Mi,exports.PromoBannerBgInstagram=zi,exports.PromoBannerBgMain=Ci,exports.PromoBannerBgNaver=Ii,exports.PromoBannerBgOutline=$i,exports.PromoBannerBgRadial=Di,exports.PromoBannerBgSoft=bi,exports.PromoBannerBgSoftSub=wi,exports.PromoBannerBgSub=yi,exports.PromoBannerBgSuccess=Pi,exports.PromoBannerBgWarm=ki,exports.PublicationCard=kv,exports.Radio=vu,exports.RadioGroup=Y2,exports.Rating=uv,exports.ReportDocument=kw,exports.ReportInfoPanel=Aw,exports.RingChart=i4,exports.SENTENCE_TRAINING_TYPES=fs,exports.SearchSummary=ev,exports.Section=ka,exports.SectionHeadFloat=Ou,exports.SectionHeader=Nv,exports.SegmentedControl=_n,exports.ShortcutBadge=yu,exports.SideNav=ru,exports.Slider=Ju,exports.SoundCompass=G2,exports.SplashLogo=Av,exports.StatChart=u4,exports.SummaryStrip=ww,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=xu,exports.Table=ts,exports.TableFilterPanel=ds,exports.Tabs=tv,exports.TextBoxTooltip=Rr,exports.TextField=Yn,exports.Timeline=Bv,exports.Toast=Ba,exports.Toggle=Nu,exports.Toolbar=Vo,exports.Tooltip=Bn,exports.TooltipInfo=Ln,exports.TooltipTextBox=Rr,exports.TopBanner=s2,exports.TrainingBlock=S4,exports.TrainingBlockButton=Fo,exports.TrainingBlockGrid=T4,exports.TrainingCard=jw,exports.TrainingCardGroup=Tw,exports.TrainingPagePopup=Zn,exports.TrainingPagePopupBottom=ld,exports.TrainingPagePopupTitle=id,exports.TrainingResultPopup=xd,exports.TrainingStep=ua,exports.TrainingStepAudioPlayer=Bs,exports.TrainingStepBullet=ed,exports.TrainingStepCard=rd,exports.TrainingStepConfirm=As,exports.TrainingStepConfirmWithText=Ns,exports.TrainingStepListen=Es,exports.TrainingStepOrderList=Ds,exports.TrainingStepTextBox=ad,exports.TrainingStepTitle=nd,exports.TrainingTooltip=wu,exports.TrainingWordCard=rs,exports.UpdateAlert=Sw,exports.WAVE_A_MAX=Q_,exports.WAVE_H1_PX=xs,exports.WAVE_HMAX_PX=J_,exports.WORD_LABEL_I18N_KEYS=W4,exports.WORD_TABLE_PAPER=sa,exports.WORD_TYPE_LABEL=fc,exports.WordDataProvider=xw,exports.WordDataUpdatePopup=qw,exports.WordImageTooltip=Bd,exports.WordSearchFilterPanel=cw,exports.WordSearchResultBlock=lw,exports.WordTable=Aa,exports.WordTableBlock=Pw,exports.WordTableButton=Iw,exports.WordTablePopup=l_,exports.WordTableThumbnail=Dd,exports.buildMonthChartData=Jv,exports.cellKey=C_,exports.cellLabel=m_,exports.cellsForLabels=N_,exports.chartTotalNumClass=oa,exports.clearPassCardBgTheme=Pn,exports.clearPromoBannerBgTheme=an,exports.closeTrainingPopup=Sx,exports.companyTypeLabel=vw,exports.createTrainingScenario=Mx,exports.cx=De,exports.deriveNoiseContexts=Ix,exports.derivePassCard=iu,exports.draftValues=M_,exports.effectiveNoiseVolume=gs,exports.effectiveSpeechVolume=Hc,exports.expandSlashLabel=is,exports.formatDuration=E_,exports.getControlDateRange=l4,exports.getPayloadTimestamp=js,exports.getPromoBannerBgTheme=Ao,exports.getSelectedFromPayload=$x,exports.getSelectedText=Rx,exports.getStepPayload=pd,exports.getSteppedPayload=Px,exports.injectPassCardBgTheme=Rn,exports.injectPromoBannerBgTheme=nn,exports.isSelectionCorrect=Fx,exports.labelOfCellKey=Ic,exports.labelsForSave=h_,exports.levelToPct=z_,exports.markAfterClick=cc,exports.marksForSave=os,exports.mergeNoiseSettings=la,exports.missesByType=w_,exports.monthKeyOf=rr,exports.monthKeyOfDate=Go,exports.nextFocus=y_,exports.nextMisses=x_,exports.noiseElementVolume=ys,exports.noiseRatioOf=sr,exports.pageStartIndexes=hc,exports.parseMonthKey=wa,exports.passCardBgIhabTheme=bu,exports.passCardBgLeftColorGridTheme=gu,exports.passCardBgTwoCircleTheme=cu,exports.pctToLevel=W_,exports.posLabels=bc,exports.printWordTable=P4,exports.promoBannerBgDarkTheme=Ai,exports.promoBannerBgDeepTheme=vi,exports.promoBannerBgDiagonalTheme=Si,exports.promoBannerBgDotsTheme=Ti,exports.promoBannerBgInstagramTheme=Oi,exports.promoBannerBgMainTheme=mi,exports.promoBannerBgNaverTheme=Fi,exports.promoBannerBgOutlineTheme=Li,exports.promoBannerBgRadialTheme=Ei,exports.promoBannerBgSoftSubTheme=xi,exports.promoBannerBgSoftTheme=fi,exports.promoBannerBgSubTheme=gi,exports.promoBannerBgSuccessTheme=Ri,exports.promoBannerBgWarmTheme=Bi,exports.recommendTables=k_,exports.regenerateUnpinned=T_,exports.removeItem=j_,exports.resolveTrainingItems=Tx,exports.resolveTrainingPopupMeta=cd,exports.reviewCells=u_,exports.reviewMeta=p_,exports.reviewSetPlan=B_,exports.reviewTableName=d_,exports.scoreKey=Dr,exports.scoreSheetHeader=f_,exports.shouldConfirmDiscard=R4,exports.splitTrainingVariants=jx,exports.summarize=$4,exports.summarizeMisses=__,exports.tableTrends=g_,exports.toDraft=D_,exports.toTrainingText=Lx,exports.togglePin=S_,exports.uncoveredLabels=A_,exports.useAnchoredMenu=Ua,exports.useBarChartControl=qu,exports.useCalendarMonth=$u,exports.useComboboxSuggestions=Tu,exports.useDiscardGuard=mw,exports.useFitScale=_c,exports.useNoisePlayer=Tr,exports.useSoundCompassExam=Xy,exports.useToastLifecycle=ec,exports.useWordData=_w,exports.useWordTableDisplaySettings=Pc,exports.useWordTablePrint=Cs,exports.waveBarPx=Lr,exports.waveBarVal=$r,exports.weakItems=b_,exports.weekValueOf=Ko,exports.withStepTimes=dd,exports.wordTypeLabels=gc;
1054
+ */const Vw=[["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"}]],qw=oe("circle-x",Vw);function Uw(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function Is({icon:e,label:t,state:a,pct:r,subText:s}){const{t:l}=ke.useTranslation(),i=a==="done",u=a==="pending",c=a==="error",p=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(Qs,{size:22,color:"white",strokeWidth:2.5}):c?n.jsx(qw,{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:p}%`:void 0}})})]})]})}function Gw({title:e,progress:t,onDone:a,onRetry:r,onClose:s,inline:l}){const{t:i}=ke.useTranslation(),{phase:u,error:c,wordCount:p,imagePage:h,imageDone:d,imageTotal:m,pairPercent:b}=t,y=Uw(u),C=u==="done",f=!!c;function x(N){return f&&y===N?"error":y>N?"done":y===N?"active":"pending"}const g=x(1),w=x(2),_=x(3),E=u==="image-match"&&m?Math.round((d??0)/m*100):void 0,v=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:go(d),total:go(m)})}},[w,u,h,m,d,i]);return n.jsx(Fn,{inline:l,className:"popup--word-data-update",title:e,footer:f&&r?n.jsx(be,{htmlType:"button",size:56,variant:"main",onClick:r,children:i("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):f?n.jsx(be,{htmlType:"button",size:56,variant:"main",onClick:s??a,children:i("common.close","\uB2EB\uAE30")}):n.jsx(be,{htmlType:"button",size:56,variant:"main",disabled:!C,onClick:a,children:i("common.done","\uC644\uB8CC")}),children:n.jsxs("div",{className:"wdup-cards",children:[n.jsx(Is,{icon:n.jsx(Ks,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:g,subText:g==="active"?i("wordData.downloadingCount",{n:go(p),count:p}):void 0}),n.jsx(Is,{icon:n.jsx(Hw,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:w,pct:E,subText:v}),n.jsx(Is,{icon:n.jsx(Xs,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:_,pct:_==="active"?b??0:void 0,subText:void 0})]})})}function Kw({enabled:e=!1,renderResultPopup:t}={}){const{t:a}=ke.useTranslation(),[r,s]=o.useState(null),[l,i]=o.useState(null),u=b=>{let y=null;b==="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}]}:b==="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}]}:b==="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}]}:b==="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(b)},c=o.useCallback(()=>{s(null),i(null)},[]),p=o.useCallback(()=>u("noise"),[]),h=o.useCallback(()=>u("short"),[]),d=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:p,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:d,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=u2,exports.ActionCard=_y,exports.Alert=J2,exports.AppHeader=C2,exports.AudioMeter=es,exports.AudioPlayer=ks,exports.Avatar=ov,exports.Badge=ln,exports.BarChart=o4,exports.BarChartControls=Uu,exports.Board=wv,exports.BottomNav=eu,exports.BrandIdentity=ou,exports.BrandLogo=Zv,exports.Breadcrumb=iv,exports.BulkBar=Uv,exports.Button=be,exports.CONSENT_KINDS=Fu,exports.CORE_VERSION=dy,exports.Calendar=S4,exports.CardStep=gd,exports.ChartLegend=Uo,exports.ChartSection=Ar,exports.ChartTotal=xa,exports.Checkbox=Ho,exports.ChoiceChips=F_,exports.CircleBadge=Sn,exports.CodeBox=qv,exports.ColorPicker=hv,exports.CompanyMeta=Dv,exports.ConfirmPopup=kd,exports.ConfirmStep=Cd,exports.ConfirmWithTextStep=fd,exports.ConsentRecordPopup=Ov,exports.ContrastFilterPanel=mw,exports.CoreScope=xy,exports.CountTile=yv,exports.CouponInputPopup=bw,exports.DEFAULT_NOISE_SETTINGS=ia,exports.DatePicker=Pu,exports.DebugResultLauncher=Kw,exports.DescriptionTooltip=Un,exports.DeviceSideTable=N4,exports.Dialog=xv,exports.Divider=Y2,exports.Dropdown=xn,exports.EffectPartyPopper=Rs,exports.EffectPartyPopperHost=vw,exports.EmptyState=yy,exports.ErrorState=vy,exports.FILTER_ALL_VALUE=kn,exports.FileUpload=lv,exports.FilterPanel=On,exports.FilterSectionInfo=Za,exports.Footer=I_,exports.GameIntro=i4,exports.Header=su,exports.Icon=lt,exports.IconGridMenu=P_,exports.IconRenderer=lt,exports.InfoTooltip=Ln,exports.ItemActions=Kv,exports.LEVEL_MAX=Ea,exports.LINE_CHART_HOVER_DELAY_MS=Gu,exports.LandingBottomSticky=z_,exports.LandingHeader=O_,exports.LineChart=l4,exports.ListPopup=Cw,exports.ListenStep=md,exports.Loader=ga,exports.MARKS=Sr,exports.MARK_ICON=dc,exports.MARK_VARIANT=pc,exports.MediaQueryOverrideContext=ui,exports.MenuTooltip=Ga,exports.NOISE_RATIO_MAX=or,exports.NOISE_RATIO_STEP=zc,exports.NoisePlayerContext=_s,exports.NoiseSettingsTooltip=sd,exports.NoticeBox=By,exports.NotifyTextPreview=Yv,exports.OrderListStep=bd,exports.PASS_CARD_BG_VARS=aa,exports.POS_LABEL=Cc,exports.PROMO_BANNER_BG_COMPONENTS=Wi,exports.PROMO_BANNER_BG_OPTIONS=Ly,exports.PROMO_BANNER_BG_VARS=Va,exports.Page=Fr,exports.PageTitle=_w,exports.Pagination=Vo,exports.Panel=nr,exports.PanelGrid=Lv,exports.PanelRow=un,exports.PanelRowDevice=Mv,exports.PassCard=fu,exports.PassCardBg=q2,exports.PassCardBgIHAB=U2,exports.PassCardBgLeftColorGrid=G2,exports.PassCardBgTwoCircle=du,exports.PaymentPlan=V2,exports.PersonCard=Bv,exports.PhonemeFilterPanel=hw,exports.PhonemeSelectBlock=dw,exports.Popup=Fn,exports.ProgressBar=C4,exports.ProgressIndicator=nc,exports.PromoBanner=s2,exports.PromoBannerBgDark=Ni,exports.PromoBannerBgDeep=_i,exports.PromoBannerBgDiagonal=ji,exports.PromoBannerBgDots=Mi,exports.PromoBannerBgInstagram=zi,exports.PromoBannerBgMain=Ci,exports.PromoBannerBgNaver=Ii,exports.PromoBannerBgOutline=$i,exports.PromoBannerBgRadial=Di,exports.PromoBannerBgSoft=bi,exports.PromoBannerBgSoftSub=wi,exports.PromoBannerBgSub=yi,exports.PromoBannerBgSuccess=Pi,exports.PromoBannerBgWarm=ki,exports.PublicationCard=Av,exports.Radio=vu,exports.RadioGroup=Z2,exports.Rating=cv,exports.ReportDocument=Nw,exports.ReportInfoPanel=Ew,exports.RingChart=c4,exports.SENTENCE_TRAINING_TYPES=bs,exports.SearchSummary=tv,exports.Section=ka,exports.SectionHeadFloat=Ou,exports.SectionHeader=Ev,exports.SegmentedControl=_n,exports.ShortcutBadge=yu,exports.SideNav=ru,exports.Slider=Ju,exports.SoundCompass=K2,exports.SplashLogo=Nv,exports.StatChart=d4,exports.SummaryStrip=kw,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=xu,exports.Table=ns,exports.TableFilterPanel=ps,exports.Tabs=nv,exports.TextBoxTooltip=Rr,exports.TextField=Yn,exports.Timeline=kv,exports.Toast=Ba,exports.Toggle=Nu,exports.Toolbar=qo,exports.Tooltip=Bn,exports.TooltipInfo=Ln,exports.TooltipTextBox=Rr,exports.TopBanner=l2,exports.TrainingBlock=T4,exports.TrainingBlockButton=Io,exports.TrainingBlockGrid=L4,exports.TrainingCard=Mw,exports.TrainingCardGroup=Lw,exports.TrainingPagePopup=Zn,exports.TrainingPagePopupBottom=ld,exports.TrainingPagePopupTitle=id,exports.TrainingResultPopup=xd,exports.TrainingStep=ua,exports.TrainingStepAudioPlayer=ks,exports.TrainingStepBullet=ed,exports.TrainingStepCard=rd,exports.TrainingStepConfirm=Ns,exports.TrainingStepConfirmWithText=Es,exports.TrainingStepListen=Ds,exports.TrainingStepOrderList=Ss,exports.TrainingStepTextBox=ad,exports.TrainingStepTitle=nd,exports.TrainingTooltip=wu,exports.TrainingWordCard=os,exports.UpdateAlert=Tw,exports.WAVE_A_MAX=tx,exports.WAVE_H1_PX=ws,exports.WAVE_HMAX_PX=ex,exports.WORD_LABEL_I18N_KEYS=V4,exports.WORD_TABLE_PAPER=sa,exports.WORD_TYPE_LABEL=fc,exports.WordDataProvider=Bw,exports.WordDataUpdatePopup=Gw,exports.WordImageTooltip=Bd,exports.WordSearchFilterPanel=pw,exports.WordSearchResultBlock=uw,exports.WordTable=Aa,exports.WordTableBlock=Iw,exports.WordTableButton=zw,exports.WordTablePopup=u_,exports.WordTableThumbnail=Dd,exports.buildMonthChartData=Qv,exports.cellKey=b_,exports.cellLabel=f_,exports.cellsForLabels=D_,exports.chartTotalNumClass=oa,exports.clearPassCardBgTheme=Pn,exports.clearPromoBannerBgTheme=an,exports.closeTrainingPopup=Tx,exports.companyTypeLabel=xw,exports.createTrainingScenario=$x,exports.cx=De,exports.deriveNoiseContexts=zx,exports.derivePassCard=iu,exports.draftValues=$_,exports.effectiveNoiseVolume=ys,exports.effectiveSpeechVolume=Hc,exports.expandSlashLabel=us,exports.formatDuration=S_,exports.getControlDateRange=u4,exports.getPayloadTimestamp=Ts,exports.getPromoBannerBgTheme=No,exports.getSelectedFromPayload=Px,exports.getSelectedText=Fx,exports.getStepPayload=pd,exports.getSteppedPayload=Ix,exports.injectPassCardBgTheme=Rn,exports.injectPromoBannerBgTheme=nn,exports.isSelectionCorrect=Ox,exports.labelOfCellKey=Ic,exports.labelsForSave=C_,exports.levelToPct=H_,exports.markAfterClick=cc,exports.marksForSave=ss,exports.mergeNoiseSettings=la,exports.missesByType=k_,exports.monthKeyOf=rr,exports.monthKeyOfDate=Ko,exports.nextFocus=__,exports.nextMisses=B_,exports.noiseElementVolume=vs,exports.noiseRatioOf=sr,exports.pageStartIndexes=hc,exports.parseMonthKey=wa,exports.passCardBgIhabTheme=bu,exports.passCardBgLeftColorGridTheme=gu,exports.passCardBgTwoCircleTheme=cu,exports.pctToLevel=V_,exports.posLabels=bc,exports.printWordTable=I4,exports.promoBannerBgDarkTheme=Ai,exports.promoBannerBgDeepTheme=vi,exports.promoBannerBgDiagonalTheme=Si,exports.promoBannerBgDotsTheme=Ti,exports.promoBannerBgInstagramTheme=Oi,exports.promoBannerBgMainTheme=mi,exports.promoBannerBgNaverTheme=Fi,exports.promoBannerBgOutlineTheme=Li,exports.promoBannerBgRadialTheme=Ei,exports.promoBannerBgSoftSubTheme=xi,exports.promoBannerBgSoftTheme=fi,exports.promoBannerBgSubTheme=gi,exports.promoBannerBgSuccessTheme=Ri,exports.promoBannerBgWarmTheme=Bi,exports.recommendTables=N_,exports.regenerateUnpinned=L_,exports.removeItem=M_,exports.resolveTrainingItems=Lx,exports.resolveTrainingPopupMeta=cd,exports.reviewCells=d_,exports.reviewMeta=m_,exports.reviewSetPlan=A_,exports.reviewTableName=h_,exports.scoreKey=Dr,exports.scoreSheetHeader=g_,exports.shouldConfirmDiscard=F4,exports.splitTrainingVariants=Mx,exports.summarize=P4,exports.summarizeMisses=w_,exports.tableTrends=v_,exports.toDraft=j_,exports.toTrainingText=Rx,exports.togglePin=T_,exports.uncoveredLabels=E_,exports.useAnchoredMenu=Ua,exports.useBarChartControl=qu,exports.useCalendarMonth=$u,exports.useComboboxSuggestions=Tu,exports.useDiscardGuard=fw,exports.useFitScale=_c,exports.useNoisePlayer=Tr,exports.useSoundCompassExam=Jy,exports.useToastLifecycle=ec,exports.useWordData=ww,exports.useWordTableDisplaySettings=Pc,exports.useWordTablePrint=fs,exports.waveBarPx=Lr,exports.waveBarVal=$r,exports.weakItems=y_,exports.weekValueOf=Yo,exports.withStepTimes=dd,exports.wordTypeLabels=gc;