@ihabdevteam/core 0.437.0 → 0.438.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 t=require("react/jsx-runtime"),o=require("react"),Jt=require("i18next"),Ee=require("react-i18next"),gn=require("react-dom"),On=typeof document<"u"?document.currentScript:null;function Gd(e){var n=Object.create(null);return e&&Object.keys(e).forEach(function(r){if(r!=="default"){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}}),n.default=e,Object.freeze(n)}var tl=Gd(o);function ke(...e){return e.filter(Boolean).join(" ")}const nl=new Set,Yn=(()=>{try{const e=globalThis;return e.process!=null&&e.process.env?.NODE_ENV!=="production"}catch{return!1}})();function jt(e,...n){!Yn||nl.has(e)||(nl.add(e),console.warn(...n))}/**
1
+ "use strict";var t=require("react/jsx-runtime"),o=require("react"),Jt=require("i18next"),Ee=require("react-i18next"),gn=require("react-dom"),On=typeof document<"u"?document.currentScript:null;function Gd(e){var n=Object.create(null);return e&&Object.keys(e).forEach(function(a){if(a!=="default"){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}}),n.default=e,Object.freeze(n)}var tl=Gd(o);function ke(...e){return e.filter(Boolean).join(" ")}const nl=new Set,Yn=(()=>{try{const e=globalThis;return e.process!=null&&e.process.env?.NODE_ENV!=="production"}catch{return!1}})();function jt(e,...n){!Yn||nl.has(e)||(nl.add(e),console.warn(...n))}/**
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 rl=(...e)=>e.filter((n,r,a)=>!!n&&n.trim()!==""&&a.indexOf(n)===r).join(" ").trim();/**
6
+ */const al=(...e)=>e.filter((n,a,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===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.
@@ -13,12 +13,12 @@
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const Yd=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,r,a)=>a?a.toUpperCase():r.toLowerCase());/**
16
+ */const Yd=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,a,r)=>r?r.toUpperCase():a.toLowerCase());/**
17
17
  * @license lucide-react v1.38.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const al=e=>{const n=Yd(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
21
+ */const rl=e=>{const n=Yd(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
22
22
  * @license lucide-react v1.38.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
@@ -28,12 +28,12 @@
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const Zd=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},Xd=o.createContext({}),Jd=()=>o.useContext(Xd),Qd=o.forwardRef(({color:e,size:n,strokeWidth:r,absoluteStrokeWidth:a,className:s="",children:l,iconNode:i,...c},u)=>{const{size:p=24,strokeWidth:h=2,absoluteStrokeWidth:d=!1,color:m="currentColor",className:C=""}=Jd()??{},x=a??d?Number(r??h)*24/Number(n??p):r??h;return o.createElement("svg",{ref:u,...oo,width:n??p??oo.width,height:n??p??oo.height,stroke:e??m,strokeWidth:x,className:rl("lucide",C,s),...!l&&!Zd(c)&&{"aria-hidden":"true"},...c},[...i.map(([y,b])=>o.createElement(y,b)),...Array.isArray(l)?l:[l]])});/**
31
+ */const Zd=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},Xd=o.createContext({}),Jd=()=>o.useContext(Xd),Qd=o.forwardRef(({color:e,size:n,strokeWidth:a,absoluteStrokeWidth:r,className:s="",children:l,iconNode:i,...u},c)=>{const{size:p=24,strokeWidth:h=2,absoluteStrokeWidth:d=!1,color:f="currentColor",className:C=""}=Jd()??{},x=r??d?Number(a??h)*24/Number(n??p):a??h;return o.createElement("svg",{ref:c,...oo,width:n??p??oo.width,height:n??p??oo.height,stroke:e??f,strokeWidth:x,className:al("lucide",C,s),...!l&&!Zd(u)&&{"aria-hidden":"true"},...u},[...i.map(([y,b])=>o.createElement(y,b)),...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,n)=>{const r=o.forwardRef(({className:a,...s},l)=>o.createElement(Qd,{ref:l,iconNode:n,className:rl(`lucide-${Kd(al(e))}`,`lucide-${e}`,a),...s}));return r.displayName=al(e),r};/**
36
+ */const oe=(e,n)=>{const a=o.forwardRef(({className:r,...s},l)=>o.createElement(Qd,{ref:l,iconNode:n,className:al(`lucide-${Kd(rl(e))}`,`lucide-${e}`,r),...s}));return a.displayName=rl(e),a};/**
37
37
  * @license lucide-react v1.38.0 - ISC
38
38
  *
39
39
  * This source code is licensed under the ISC license.
@@ -48,7 +48,7 @@
48
48
  *
49
49
  * This source code is licensed under the ISC license.
50
50
  * See the LICENSE file in the root directory of this source tree.
51
- */const rp=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],ap=oe("arrow-down",rp);/**
51
+ */const ap=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],rp=oe("arrow-down",ap);/**
52
52
  * @license lucide-react v1.38.0 - ISC
53
53
  *
54
54
  * This source code is licensed under the ISC license.
@@ -193,12 +193,12 @@
193
193
  *
194
194
  * This source code is licensed under the ISC license.
195
195
  * See the LICENSE file in the root directory of this source tree.
196
- */const rh=[["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"}]],cl=oe("download",rh);/**
196
+ */const ah=[["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"}]],cl=oe("download",ah);/**
197
197
  * @license lucide-react v1.38.0 - ISC
198
198
  *
199
199
  * This source code is licensed under the ISC license.
200
200
  * See the LICENSE file in the root directory of this source tree.
201
- */const ah=[["path",{d:"M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0",key:"1dfaln"}],["path",{d:"M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4",key:"1qnva7"}]],oh=oe("ear",ah);/**
201
+ */const rh=[["path",{d:"M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0",key:"1dfaln"}],["path",{d:"M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4",key:"1qnva7"}]],oh=oe("ear",rh);/**
202
202
  * @license lucide-react v1.38.0 - ISC
203
203
  *
204
204
  * This source code is licensed under the ISC license.
@@ -333,12 +333,12 @@
333
333
  *
334
334
  * This source code is licensed under the ISC license.
335
335
  * See the LICENSE file in the root directory of this source tree.
336
- */const nm=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],rm=oe("link",nm);/**
336
+ */const nm=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],am=oe("link",nm);/**
337
337
  * @license lucide-react v1.38.0 - ISC
338
338
  *
339
339
  * This source code is licensed under the ISC license.
340
340
  * See the LICENSE file in the root directory of this source tree.
341
- */const am=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],om=oe("link-2",am);/**
341
+ */const rm=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],om=oe("link-2",rm);/**
342
342
  * @license lucide-react v1.38.0 - ISC
343
343
  *
344
344
  * This source code is licensed under the ISC license.
@@ -468,12 +468,12 @@
468
468
  *
469
469
  * This source code is licensed under the ISC license.
470
470
  * See the LICENSE file in the root directory of this source tree.
471
- */const n0=[["path",{d:"M14 4a1 1 0 0 1 1-1",key:"dhj8ez"}],["path",{d:"M15 10a1 1 0 0 1-1-1",key:"1mnyi5"}],["path",{d:"M21 4a1 1 0 0 0-1-1",key:"sfs9ap"}],["path",{d:"M21 9a1 1 0 0 1-1 1",key:"mp6qeo"}],["path",{d:"m3 7 3 3 3-3",key:"x25e72"}],["path",{d:"M6 10V5a2 2 0 0 1 2-2h2",key:"15xut4"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}]],r0=oe("replace",n0);/**
471
+ */const n0=[["path",{d:"M14 4a1 1 0 0 1 1-1",key:"dhj8ez"}],["path",{d:"M15 10a1 1 0 0 1-1-1",key:"1mnyi5"}],["path",{d:"M21 4a1 1 0 0 0-1-1",key:"sfs9ap"}],["path",{d:"M21 9a1 1 0 0 1-1 1",key:"mp6qeo"}],["path",{d:"m3 7 3 3 3-3",key:"x25e72"}],["path",{d:"M6 10V5a2 2 0 0 1 2-2h2",key:"15xut4"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}]],a0=oe("replace",n0);/**
472
472
  * @license lucide-react v1.38.0 - ISC
473
473
  *
474
474
  * This source code is licensed under the ISC license.
475
475
  * See the LICENSE file in the root directory of this source tree.
476
- */const a0=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],o0=oe("rocket",a0);/**
476
+ */const r0=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],o0=oe("rocket",r0);/**
477
477
  * @license lucide-react v1.38.0 - ISC
478
478
  *
479
479
  * This source code is licensed under the ISC license.
@@ -608,12 +608,12 @@
608
608
  *
609
609
  * This source code is licensed under the ISC license.
610
610
  * See the LICENSE file in the root directory of this source tree.
611
- */const n1=[["path",{d:"M15 5h6",key:"1pr8yx"}],["path",{d:"M15 12h6",key:"upa0zy"}],["path",{d:"M3 19h18",key:"awlh7x"}],["path",{d:"m3 12 3.553-7.724a.5.5 0 0 1 .894 0L11 12",key:"6lvno8"}],["path",{d:"M3.92 10h6.16",key:"1tl8ex"}]],r1=oe("text-initial",n1);/**
611
+ */const n1=[["path",{d:"M15 5h6",key:"1pr8yx"}],["path",{d:"M15 12h6",key:"upa0zy"}],["path",{d:"M3 19h18",key:"awlh7x"}],["path",{d:"m3 12 3.553-7.724a.5.5 0 0 1 .894 0L11 12",key:"6lvno8"}],["path",{d:"M3.92 10h6.16",key:"1tl8ex"}]],a1=oe("text-initial",n1);/**
612
612
  * @license lucide-react v1.38.0 - ISC
613
613
  *
614
614
  * This source code is licensed under the ISC license.
615
615
  * See the LICENSE file in the root directory of this source tree.
616
- */const a1=[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]],o1=oe("ticket",a1);/**
616
+ */const r1=[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]],o1=oe("ticket",r1);/**
617
617
  * @license lucide-react v1.38.0 - ISC
618
618
  *
619
619
  * This source code is licensed under the ISC license.
@@ -753,12 +753,12 @@
753
753
  *
754
754
  * This source code is licensed under the ISC license.
755
755
  * See the LICENSE file in the root directory of this source tree.
756
- */const nf=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],rf=oe("sparkles",nf);/**
756
+ */const nf=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],af=oe("sparkles",nf);/**
757
757
  * @license lucide-react v1.38.0 - ISC
758
758
  *
759
759
  * This source code is licensed under the ISC license.
760
760
  * See the LICENSE file in the root directory of this source tree.
761
- */const af=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],of=oe("type",af);/**
761
+ */const rf=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],of=oe("type",rf);/**
762
762
  * @license lucide-react v1.38.0 - ISC
763
763
  *
764
764
  * This source code is licensed under the ISC license.
@@ -798,9 +798,9 @@
798
798
  *
799
799
  * This source code is licensed under the ISC license.
800
800
  * See the LICENSE file in the root directory of this source tree.
801
- */const yf=[["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"}]],vf=oe("thumbs-up",yf),lo={"alert-triangle":ol,"align-start-vertical":np,anchor:$1,armchair:R1,"arrow-down":ap,"arrow-up":sp,"arrow-left":ip,"arrow-right":cp,"arrow-right-left":pp,"audio-lines":mp,ban:Cp,bell:bp,"book-marked":vp,"book-open":_p,"bow-arrow":Bp,braces:Ap,bug:Ep,calendar:gl,"calendar-check":Dp,"calendar-days":Tp,camera:$p,car:I1,"chart-column":Rp,"chart-line":Fp,"chart-pie":Op,check:sl,"chevron-down":bl,"chevron-left":ll,"chevron-right":il,"chevron-up":yl,circle:pf,"clipboard-list":qp,coffee:z1,combine:Gp,copy:Yp,"chevrons-left-right-ellipsis":Xp,"credit-card":Qp,database:ul,diff:nh,download:cl,ear:oh,edit:lh,"edit-2":uh,"edit-3":dh,ellipsis:dl,eraser:mh,"external-link":Ch,eye:bh,"file-text":vh,"flip-horizontal":_h,"folder-open":Bh,"folder-plus":Ah,gamepad:Eh,"gamepad-2":H1,clock:q1,lock:gm,"search-x":x0,"share-2":N0,tag:X0,target:G1,percent:Y1,gavel:Dh,"git-merge":pl,globe:Mh,"grip-vertical":Lh,headphones:Ph,heart:Ih,home:zh,inbox:X1,info:Hh,"key-round":qh,landmark:Gh,layers:Yh,"layout-dashboard":Xh,leaf:Qh,lightbulb:tm,link:rm,"link-2":om,"link-2-off":lm,list:um,"list-checks":dm,"list-ordered":hm,loader:fm,"log-out":ym,mail:xm,"map-pin":wm,menu:Cf,"message-circle":km,"message-circle-question-mark":Nm,"message-square":jm,"message-square-more":Q1,"message-square-text":Sm,minus:tf,"minus-circle":Mm,moon:bf,"more-horizontal":dl,package:Lm,"party-popper":Pm,pause:Im,pencil:zm,phone:Hm,play:qm,"play-circle":Gm,plus:Ym,printer:Xm,"refresh-cw":Qm,repeat:t0,replace:r0,rocket:o0,"rotate-ccw":l0,"rotate-cw":u0,salad:d0,"scan-search":h0,search:g0,"circle-alert":hl,"alert-circle":hl,"check-circle":ml,scissors:y0,send:w0,settings:k0,"shield-check":j0,"shopping-cart":S0,shuffle:M0,"skip-back":L0,"skip-forward":P0,sparkles:rf,square:I0,star:z0,store:H0,"sun-medium":q0,table:G0,"table-2":Y0,terminal:Q0,"text-cursor-input":t1,"text-initial":r1,"thumbs-up":vf,ticket:o1,trash:u1,triangle:mf,"trash-2":l1,"trending-up":d1,"triangle-alert":ol,trophy:h1,type:of,unlink:f1,upload:g1,user:so,"user-plus":v1,"user-round":_1,"user-round-check":B1,users:A1,"users-round":E1,volume:lf,"volume-2":fl,wrench:S1,x:Cl};Object.freeze(Object.keys(lo));function xf(e){return lo[e]??null}const vl=new Set;function _f(e){return Yn&&!(e in lo)&&!vl.has(e)&&(vl.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 wf=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 Bf(e){const n=e.toLowerCase();if(n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")||e.includes("/assets/")||/\.(png|jpe?g|gif|webp|avif|bmp|ico)$/i.test(n))return null;const r=(e.split("/").pop()||"").replace(/\.svg$/,"");return r?wf(r):null}const xl=new Map;function kf(e){const n=typeof e=="string"?Bf(e):null,r=n?xf(n)??xl.get(n)??null:null,[a,s]=o.useState(null);return o.useEffect(()=>{if(!n||r)return;let l=!1;return _f(n).then(i=>{xl.set(n,i),l||s(i)}),()=>{l=!0}},[n,r]),r??a}/*! @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 _l(e,n){(n==null||n>e.length)&&(n=e.length);for(var r=0,a=Array(n);r<n;r++)a[r]=e[r];return a}function Af(e){if(Array.isArray(e))return e}function Nf(e,n){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var a,s,l,i,c=[],u=!0,p=!1;try{if(l=(r=r.call(e)).next,n!==0)for(;!(u=(a=l.call(r)).done)&&(c.push(a.value),c.length!==n);u=!0);}catch(h){p=!0,s=h}finally{try{if(!u&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(p)throw s}}return c}}function Ef(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
802
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jf(e,n){return Af(e)||Nf(e,n)||Df(e,n)||Ef()}function Df(e,n){if(e){if(typeof e=="string")return _l(e,n);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_l(e,n):void 0}}const wl=Object.entries,Bl=Object.setPrototypeOf,Sf=Object.isFrozen,Tf=Object.getPrototypeOf,Mf=Object.getOwnPropertyDescriptor;let Kt=Object.freeze,Yt=Object.seal,yr=Object.create,kl=typeof Reflect<"u"&&Reflect,io=kl.apply,uo=kl.construct;Kt||(Kt=function(n){return n}),Yt||(Yt=function(n){return n}),io||(io=function(n,r){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];return n.apply(r,s)}),uo||(uo=function(n){for(var r=arguments.length,a=new Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return new n(...a)});const ar=Ut(Array.prototype.forEach),$f=Ut(Array.prototype.lastIndexOf),Al=Ut(Array.prototype.pop),Fr=Ut(Array.prototype.push),Lf=Ut(Array.prototype.splice),vr=Array.isArray,Ir=Ut(String.prototype.toLowerCase),co=Ut(String.prototype.toString),Nl=Ut(String.prototype.match),Or=Ut(String.prototype.replace),El=Ut(String.prototype.indexOf),Rf=Ut(String.prototype.trim),Pf=Ut(Number.prototype.toString),Ff=Ut(Boolean.prototype.toString),jl=typeof BigInt>"u"?null:Ut(BigInt.prototype.toString),Dl=typeof Symbol>"u"?null:Ut(Symbol.prototype.toString),dn=Ut(Object.prototype.hasOwnProperty),zr=Ut(Object.prototype.toString),an=Ut(RegExp.prototype.test),or=If(TypeError);function Ut(e){return function(n){n instanceof RegExp&&(n.lastIndex=0);for(var r=arguments.length,a=new Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return io(e,n,a)}}function If(e){return function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return uo(e,r)}}function yt(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ir;if(Bl&&Bl(e,null),!vr(n))return e;let a=n.length;for(;a--;){let s=n[a];if(typeof s=="string"){const l=r(s);l!==s&&(Sf(n)||(n[a]=l),s=l)}e[s]=!0}return e}function Of(e){for(let n=0;n<e.length;n++)dn(e,n)||(e[n]=null);return e}function bn(e){const n=yr(null);for(const a of wl(e)){var r=jf(a,2);const s=r[0],l=r[1];dn(e,s)&&(vr(l)?n[s]=Of(l):l&&typeof l=="object"&&l.constructor===Object?n[s]=bn(l):n[s]=l)}return n}function zf(e){switch(typeof e){case"string":return e;case"number":return Pf(e);case"boolean":return Ff(e);case"bigint":return jl?jl(e):"0";case"symbol":return Dl?Dl(e):"Symbol()";case"undefined":return zr(e);case"function":case"object":{if(e===null)return zr(e);const n=e,r=Nn(n,"toString");if(typeof r=="function"){const a=r(n);return typeof a=="string"?a:zr(a)}return zr(e)}default:return zr(e)}}function Nn(e,n){for(;e!==null;){const a=Mf(e,n);if(a){if(a.get)return Ut(a.get);if(typeof a.value=="function")return Ut(a.value)}e=Tf(e)}function r(){return null}return r}function Wf(e){try{return an(e,""),!0}catch{return!1}}const Sl=Kt(["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"]),po=Kt(["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"]),ho=Kt(["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"]),Hf=Kt(["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"]),mo=Kt(["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"]),Vf=Kt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Tl=Kt(["#text"]),Ml=Kt(["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"]),fo=Kt(["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"]),$l=Kt(["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"]),ba=Kt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),qf=Yt(/{{[\w\W]*|^[\w\W]*}}/g),Uf=Yt(/<%[\w\W]*|^[\w\W]*%>/g),Gf=Yt(/\${[\w\W]*/g),Kf=Yt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Yf=Yt(/^aria-[\-\w]+$/),Ll=Yt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Zf=Yt(/^(?:\w+script|data):/i),Xf=Yt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Jf=Yt(/^html$/i),Qf=Yt(/^[a-z][.\w]*(-[.\w]+)+$/i),Rl=Yt(/<[/\w!]/g),Pl=Yt(/<[/\w]/g),eC=Yt(/<\/no(script|embed|frames)/i),tC=Yt(/\/>/i),yn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Fl=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],nC=Kt(yt({},Fl)),rC=(function(){const e={};return ar(Fl,n=>{e[n]=Yt(new RegExp("</"+n+"(?=[\\t\\n\\f\\r />])","i"))}),Kt(e)})(),aC=function(){return typeof window>"u"?null:window},oC=function(n,r){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let a=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(a=r.getAttribute(s));const l="dompurify"+(a?"#"+a:"");try{return n.createPolicy(l,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},Il=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Zn=function(n,r,a,s){return dn(n,r)&&vr(n[r])?yt(s.base?bn(s.base):{},n[r],s.transform):a},Co=function(n,r,a){const s=dn(n,r)?n[r]:void 0;return s&&typeof s=="object"?bn(s):a()};function Ol(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:aC();const n=be=>Ol(be);if(n.version="3.4.14",n.removed=[],!e||!e.document||e.document.nodeType!==yn.document||!e.Element)return n.isSupported=!1,n;let r=e.document;const a=r,s=a.currentScript;e.DocumentFragment;const l=e.HTMLTemplateElement,i=e.Node,c=e.Element,u=e.NodeFilter,p=e.NamedNodeMap;p===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,d=e.trustedTypes,m=c.prototype,C=Nn(m,"cloneNode"),x=Nn(m,"remove"),y=Nn(m,"nextSibling"),b=Nn(m,"childNodes"),v=Nn(m,"parentNode"),_=Nn(m,"shadowRoot"),g=Nn(m,"attributes"),w=i&&i.prototype?Nn(i.prototype,"nodeType"):null,N=i&&i.prototype?Nn(i.prototype,"nodeName"):null,f=i&&i.prototype?Nn(i.prototype,"ownerDocument"):null,A=function(M){return w?w(M):M.nodeType},B=function(M){return N?N(M):M.nodeName};if(typeof l=="function"){const be=r.createElement("template");be.content&&be.content.ownerDocument&&(r=be.content.ownerDocument)}let E,k="",j,S=!1,$=0;const V=function(){if($>0)throw or('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.')},F=function(M){V(),$++;try{return E.createHTML(M)}finally{$--}},U=function(M){V(),$++;try{return E.createScriptURL(M)}finally{$--}},T=function(){return S||(j=oC(d,s),S=!0),j},z=r,W=z.implementation,ie=z.createNodeIterator,Q=z.createDocumentFragment,L=z.getElementsByTagName,J=a.importNode;let ee=Il();n.isSupported=typeof wl=="function"&&typeof v=="function"&&W&&W.createHTMLDocument!==void 0;const q=qf,P=Uf,R=Gf,D=Kf,H=Yf,ne=Zf,te=Xf,ue=Qf;let se=Ll,pe=null;const G=yt({},[...Sl,...po,...ho,...mo,...Tl]);let K=null;const O=yt({},[...Ml,...fo,...$l,...ba]);let I=Object.seal(yr(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}})),ae=null,he=null;const re=Object.seal(yr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let _e=!0,De=!0,Se=!1,Ne=!0,He=!1,ve=!0,xe=!1,we=!1,Ae=null,Ie=null,ot=!1,pt=!1,Oe=!1,Ue=!1,rt=!0,ce=!1;const Pe="user-content-";let Ye=!0,Qe=!1,ut={},vt=null;const ct=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 Gt=null;const xt=yt({},["audio","video","img","source","image","track"]);let lt=null;const st=yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ot="http://www.w3.org/1998/Math/MathML",Mt="http://www.w3.org/2000/svg",Nt="http://www.w3.org/1999/xhtml";let Ft=Nt,zt=!1,_t=null;const gt=yt({},[Ot,Mt,Nt],co),Et=Kt(["mi","mo","mn","ms","mtext"]);let It=yt({},Et);const et=Kt(["annotation-xml"]);let wt=yt({},et);const tt=yt({},["title","style","font","a","script"]);let fe=null;const $e=["application/xhtml+xml","text/html"],Re="text/html";let ze=null,it=null;const on=r.createElement("form"),ht=function(M){return M instanceof RegExp||M instanceof Function},Ke=function(){let M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(it&&it===M)return;(!M||typeof M!="object")&&(M={}),M=bn(M),fe=$e.indexOf(M.PARSER_MEDIA_TYPE)===-1?Re:M.PARSER_MEDIA_TYPE,ze=fe==="application/xhtml+xml"?co:Ir,pe=Zn(M,"ALLOWED_TAGS",G,{transform:ze}),K=Zn(M,"ALLOWED_ATTR",O,{transform:ze}),_t=Zn(M,"ALLOWED_NAMESPACES",gt,{transform:co}),lt=Zn(M,"ADD_URI_SAFE_ATTR",st,{transform:ze,base:st}),Gt=Zn(M,"ADD_DATA_URI_TAGS",xt,{transform:ze,base:xt}),vt=Zn(M,"FORBID_CONTENTS",ct,{transform:ze}),ae=Zn(M,"FORBID_TAGS",bn({}),{transform:ze}),he=Zn(M,"FORBID_ATTR",bn({}),{transform:ze}),ut=dn(M,"USE_PROFILES")?M.USE_PROFILES&&typeof M.USE_PROFILES=="object"?bn(M.USE_PROFILES):M.USE_PROFILES:!1,_e=M.ALLOW_ARIA_ATTR!==!1,De=M.ALLOW_DATA_ATTR!==!1,Se=M.ALLOW_UNKNOWN_PROTOCOLS||!1,Ne=M.ALLOW_SELF_CLOSE_IN_ATTR!==!1,He=M.SAFE_FOR_TEMPLATES||!1,ve=M.SAFE_FOR_XML!==!1,xe=M.WHOLE_DOCUMENT||!1,pt=M.RETURN_DOM||!1,Oe=M.RETURN_DOM_FRAGMENT||!1,Ue=M.RETURN_TRUSTED_TYPE||!1,ot=M.FORCE_BODY||!1,rt=M.SANITIZE_DOM!==!1,ce=M.SANITIZE_NAMED_PROPS||!1,Ye=M.KEEP_CONTENT!==!1,Qe=M.IN_PLACE||!1,se=Wf(M.ALLOWED_URI_REGEXP)?M.ALLOWED_URI_REGEXP:Ll,Ft=typeof M.NAMESPACE=="string"?M.NAMESPACE:Nt,It=Co(M,"MATHML_TEXT_INTEGRATION_POINTS",()=>yt({},Et)),wt=Co(M,"HTML_INTEGRATION_POINTS",()=>yt({},et));const Z=Co(M,"CUSTOM_ELEMENT_HANDLING",()=>yr(null));if(I=yr(null),dn(Z,"tagNameCheck")&&ht(Z.tagNameCheck)&&(I.tagNameCheck=Z.tagNameCheck),dn(Z,"attributeNameCheck")&&ht(Z.attributeNameCheck)&&(I.attributeNameCheck=Z.attributeNameCheck),dn(Z,"allowCustomizedBuiltInElements")&&typeof Z.allowCustomizedBuiltInElements=="boolean"&&(I.allowCustomizedBuiltInElements=Z.allowCustomizedBuiltInElements),Yt(I),He&&(De=!1),Oe&&(pt=!0),ut&&(pe=yt({},Tl),K=yr(null),ut.html===!0&&(yt(pe,Sl),yt(K,Ml)),ut.svg===!0&&(yt(pe,po),yt(K,fo),yt(K,ba)),ut.svgFilters===!0&&(yt(pe,ho),yt(K,fo),yt(K,ba)),ut.mathMl===!0&&(yt(pe,mo),yt(K,$l),yt(K,ba))),re.tagCheck=null,re.attributeCheck=null,dn(M,"ADD_TAGS")&&(typeof M.ADD_TAGS=="function"?re.tagCheck=M.ADD_TAGS:vr(M.ADD_TAGS)&&(pe===G&&(pe=bn(pe)),yt(pe,M.ADD_TAGS,ze))),dn(M,"ADD_ATTR")&&(typeof M.ADD_ATTR=="function"?re.attributeCheck=M.ADD_ATTR:vr(M.ADD_ATTR)&&(K===O&&(K=bn(K)),yt(K,M.ADD_ATTR,ze))),dn(M,"ADD_FORBID_CONTENTS")&&vr(M.ADD_FORBID_CONTENTS)&&(vt===ct&&(vt=bn(vt)),yt(vt,M.ADD_FORBID_CONTENTS,ze)),Ye&&(pe["#text"]=!0),xe&&yt(pe,["html","head","body"]),pe.table&&(yt(pe,["tbody"]),delete ae.tbody),M.TRUSTED_TYPES_POLICY){if(typeof M.TRUSTED_TYPES_POLICY.createHTML!="function")throw or('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof M.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw or('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const ge=E;E=M.TRUSTED_TYPES_POLICY;try{k=F("")}catch(Le){throw E=ge,Le}}else M.TRUSTED_TYPES_POLICY===null?(E=void 0,k=""):(E===void 0&&(E=T()),E&&typeof k=="string"&&(k=F("")));Kt&&Kt(M),it=M},Ct=yt({},[...po,...ho,...Hf]),Bt=yt({},[...mo,...Vf]),X=function(M,Z,ge){return Z.namespaceURI===Nt?M==="svg":Z.namespaceURI===Ot?M==="svg"&&(ge==="annotation-xml"||It[ge]):!!Ct[M]},Ce=function(M,Z,ge){return Z.namespaceURI===Nt?M==="math":Z.namespaceURI===Mt?M==="math"&&wt[ge]:!!Bt[M]},Ge=function(M,Z,ge){return Z.namespaceURI===Mt&&!wt[ge]||Z.namespaceURI===Ot&&!It[ge]?!1:!Bt[M]&&(tt[M]||!Ct[M])},Ze=function(M){let Z=v(M);(!Z||!Z.tagName)&&(Z={namespaceURI:Ft,tagName:"template"});const ge=Ir(M.tagName),Le=Ir(Z.tagName);return _t[M.namespaceURI]?M.namespaceURI===Mt?X(ge,Z,Le):M.namespaceURI===Ot?Ce(ge,Z,Le):M.namespaceURI===Nt?Ge(ge,Z,Le):!!(fe==="application/xhtml+xml"&&_t[M.namespaceURI]):!1},at=function(M){Fr(n.removed,{element:M});try{v(M).removeChild(M)}catch{if(x(M),!v(M))throw or("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},mt=function(M,Z,ge){try{M.removeAttributeNode(Z)}catch{try{M.removeAttribute(ge)}catch{}}},Dt=function(M){Zt(M);const Z=b(M);if(Z){const Le=[];ar(Z,qe=>{Fr(Le,qe)}),ar(Le,qe=>{try{x(qe)}catch{}})}const ge=g(M);if(ge)for(let Le=ge.length-1;Le>=0;--Le){const qe=ge[Le],nt=qe&&qe.name;typeof nt=="string"&&mt(M,qe,nt)}},Lt=function(M,Z,ge){if(!ge)try{ge=Z.getAttributeNode(M)}catch{ge=null}Fr(n.removed,{attribute:ge||null,from:Z});try{ge?Z.removeAttributeNode(ge):Z.removeAttribute(M)}catch{try{Z.removeAttribute(M)}catch{}}if(M==="is")if(pt||Oe)try{at(Z)}catch{}else try{Z.setAttribute(M,"")}catch{}},Dn=function(M){const Z=g(M);if(Z)for(let ge=Z.length-1;ge>=0;--ge){const Le=Z[ge],qe=Le&&Le.name;typeof qe!="string"||K[ze(qe)]||mt(M,Le,qe)}},Zt=function(M){const Z=[M];for(;Z.length>0;){const ge=Z.pop();A(ge)===yn.element&&Dn(ge);const qe=b(ge);if(qe)for(let nt=qe.length-1;nt>=0;--nt)Z.push(qe[nt])}},Sn=function(M,Z){return ve?M==="patchsrc"?!0:M==="for"&&Z!=="label"&&Z!=="output":!1},cn=function(M){if(!ve)return;const Z=[M];for(;Z.length>0;){const ge=Z.pop(),Le=A(ge);if(Le===yn.processingInstruction||Le===yn.comment&&an(Pl,ge.data)){try{x(ge)}catch{}continue}if(Le===yn.element){const nt=ge,At=ze(B(ge));try{nt.hasAttribute&&nt.hasAttribute("patchsrc")&&nt.removeAttribute("patchsrc"),nt.hasAttribute&&nt.hasAttribute("for")&&Sn("for",At)&&nt.removeAttribute("for")}catch{}}const qe=b(ge);if(qe)for(let nt=qe.length-1;nt>=0;--nt)Z.push(qe[nt])}},Xt=function(M){let Z=null,ge=null;if(ot)M="<remove></remove>"+M;else{const nt=Nl(M,/^[\r\n\t ]+/);ge=nt&&nt[0]}fe==="application/xhtml+xml"&&Ft===Nt&&(M='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+M+"</body></html>");const Le=E?F(M):M;if(Ft===Nt)try{Z=new h().parseFromString(Le,fe)}catch{}if(!Z||!Z.documentElement){Z=W.createDocument(Ft,"template",null);try{Z.documentElement.innerHTML=zt?k:Le}catch{}}const qe=Z.body||Z.documentElement;return M&&ge&&qe.insertBefore(r.createTextNode(ge),qe.childNodes[0]||null),Ft===Nt?L.call(Z,xe?"html":"body")[0]:xe?Z.documentElement:qe},en=function(M){const Z=f?f(M):M.ownerDocument;return ie.call(Z||M,M,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Cn=function(M){return M=Or(M,q," "),M=Or(M,P," "),M=Or(M,R," "),M},tn=function(M){var Z;M.normalize();const ge=f?f(M):M.ownerDocument,Le=ie.call(ge||M,M,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let qe=Le.nextNode();for(;qe;)qe.data=Cn(qe.data),qe=Le.nextNode();const nt=(Z=M.querySelectorAll)===null||Z===void 0?void 0:Z.call(M,"template");nt&&ar(nt,At=>{kt(At.content)&&tn(At.content)})},$t=function(M){const Z=N?N(M):null;return typeof Z!="string"||ze(Z)!=="form"?!1:typeof M.nodeName!="string"||typeof M.textContent!="string"||typeof M.removeChild!="function"||M.attributes!==g(M)||typeof M.removeAttribute!="function"||typeof M.setAttribute!="function"||typeof M.namespaceURI!="string"||typeof M.insertBefore!="function"||typeof M.hasChildNodes!="function"||M.nodeType!==w(M)||M.childNodes!==b(M)},kt=function(M){if(!w||typeof M!="object"||M===null)return!1;try{return w(M)===yn.documentFragment}catch{return!1}},qt=function(M){if(!w||typeof M!="object"||M===null)return!1;try{return typeof w(M)=="number"}catch{return!1}};function Rt(be,M,Z){be.length!==0&&ar(be,ge=>{ge.call(n,M,Z,it)})}const Tn=function(M,Z){return!!(ve&&M.hasChildNodes()&&!qt(M.firstElementChild)&&an(Rl,M.textContent)&&an(Rl,M.innerHTML)||ve&&M.namespaceURI===Nt&&nC[Z]&&(qt(M.firstElementChild)||typeof M.textContent=="string"&&an(rC[Z],M.textContent))||M.nodeType===yn.processingInstruction||ve&&M.nodeType===yn.comment&&an(Pl,M.data))},Mn=function(M,Z){if(M instanceof RegExp)return an(M,Z);if(M instanceof Function){for(var ge=arguments.length,Le=new Array(ge>2?ge-2:0),qe=2;qe<ge;qe++)Le[qe-2]=arguments[qe];return!!M(Z,...Le)}return!1},Fn=function(M,Z,ge){if(!ae[Z]&&Be(Z)&&Mn(I.tagNameCheck,Z))return!1;if(Ye&&!vt[Z]){const Le=v(M),qe=b(M);if(qe&&Le){const nt=qe.length;for(let At=nt-1;At>=0;--At){const St=M===ge?C(qe[At],!0):qe[At];Le.insertBefore(St,y(M))}}}return at(M),!0},me=function(M,Z,ge,Le){return M.length===0?Z:Z===ge||Z===Le?bn(Z):Z},je=function(M,Z){return M===Z||v(M)!==null?!1:(Qe&&Zt(M),!0)},We=function(M,Z){if(Rt(ee.beforeSanitizeElements,M,null),je(M,Z))return!0;if($t(M))return at(M),!0;const ge=ze(B(M));if(pe=me(ee.uponSanitizeElement,pe,G,Ae),Rt(ee.uponSanitizeElement,M,{tagName:ge,allowedTags:pe}),je(M,Z))return!0;if(Tn(M,ge))return at(M),!0;if(ae[ge]||!(re.tagCheck instanceof Function&&re.tagCheck(ge))&&!pe[ge]){const qe=Fn(M,ge,Z);return qe===!1&&Rt(ee.afterSanitizeElements,M,null),qe}if(A(M)===yn.element&&!Ze(M)||(ge==="noscript"||ge==="noembed"||ge==="noframes")&&an(eC,M.innerHTML))return at(M),!0;if(He&&M.nodeType===yn.text){const qe=Cn(M.textContent);M.textContent!==qe&&(Fr(n.removed,{element:M.cloneNode()}),M.textContent=qe)}return Rt(ee.afterSanitizeElements,M,null),!1},Y=function(M,Z,ge){if(he[Z]||Sn(Z,M)||rt&&(Z==="id"||Z==="name")&&(ge in r||ge in on))return!1;const Le=K[Z]||re.attributeCheck instanceof Function&&re.attributeCheck(Z,M);return De&&an(D,Z)||_e&&an(H,Z)?!0:Le?lt[Z]||an(se,Or(ge,te,""))||(Z==="src"||Z==="xlink:href"||Z==="href")&&M!=="script"&&El(ge,"data:")===0&&Gt[M]||Se&&!an(ne,Or(ge,te,""))?!0:!ge:Be(M)&&Mn(I.tagNameCheck,M)&&Mn(I.attributeNameCheck,Z,M)||Z==="is"&&I.allowCustomizedBuiltInElements&&Mn(I.tagNameCheck,ge)},de=yt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Be=function(M){return!de[Ir(M)]&&an(ue,M)},Me=function(M,Z,ge,Le){if(E&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!ge)switch(d.getAttributeType(M,Z)){case"TrustedHTML":return F(Le);case"TrustedScriptURL":return U(Le)}return Le},Ve=function(M,Z,ge,Le){try{ge?M.setAttributeNS(ge,Z,Le):M.setAttribute(Z,Le),$t(M)?at(M):Al(n.removed)}catch{Lt(Z,M)}},Xe=function(M){Rt(ee.beforeSanitizeAttributes,M,null);const Z=M.attributes;if(!Z||$t(M))return;K=me(ee.uponSanitizeAttribute,K,O,Ie);const ge={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:K,forceKeepAttr:void 0};let Le=Z.length;const qe=ze(M.nodeName);for(;Le--;){const nt=Z[Le],At=nt.name,St=nt.namespaceURI,nn=nt.value,rn=ze(At),Pr=nn;let Te=At==="value"?Pr:Rf(Pr);if(ge.attrName=rn,ge.attrValue=Te,ge.keepAttr=!0,ge.forceKeepAttr=void 0,Rt(ee.uponSanitizeAttribute,M,ge),Te=ge.attrValue,ce&&(rn==="id"||rn==="name")&&El(Te,Pe)!==0&&(Lt(At,M,nt),Te=Pe+Te),ve&&an(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Te)){Lt(At,M,nt);continue}if(rn==="attributename"&&Nl(Te,"href")){Lt(At,M,nt);continue}if(!ge.forceKeepAttr){if(!ge.keepAttr){Lt(At,M,nt);continue}if(!Ne&&an(tC,Te)){Lt(At,M,nt);continue}if(He&&(Te=Cn(Te)),!Y(qe,rn,Te)){Lt(At,M,nt);continue}Te=Me(qe,rn,St,Te),Te!==Pr&&Ve(M,At,St,Te)}}Rt(ee.afterSanitizeAttributes,M,null)},bt=function(M){let Z=null;const ge=en(M);for(Rt(ee.beforeSanitizeShadowDOM,M,null);Z=ge.nextNode();)if(Rt(ee.uponSanitizeShadowNode,Z,null),We(Z,M),Xe(Z),kt(Z.content)&&bt(Z.content),A(Z)===yn.element){const Le=_(Z);kt(Le)&&(ft(Le),bt(Le))}Rt(ee.afterSanitizeShadowDOM,M,null)},ft=function(M){const Z=[{node:M,shadow:null}];for(;Z.length>0;){const ge=Z.pop();if(ge.shadow){bt(ge.shadow);continue}const Le=ge.node,nt=A(Le)===yn.element,At=b(Le);if(At)for(let St=At.length-1;St>=0;--St)Z.push({node:At[St],shadow:null});if(nt){const St=N?N(Le):null;if(typeof St=="string"&&ze(St)==="template"){const nn=Le.content;kt(nn)&&Z.push({node:nn,shadow:null})}}if(nt){const St=_(Le);kt(St)&&Z.push({node:null,shadow:St},{node:St,shadow:null})}}};return n.sanitize=function(be){let M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,ge=null,Le=null,qe=null;if(zt=!be,zt&&(be="<!-->"),typeof be!="string"&&!qt(be)&&(be=zf(be),typeof be!="string"))throw or("dirty is not a string, aborting");if(!n.isSupported)return be;we?(pe=Ae,K=Ie):Ke(M),(ee.uponSanitizeElement.length>0||ee.uponSanitizeAttribute.length>0)&&(pe=bn(pe)),ee.uponSanitizeAttribute.length>0&&(K=bn(K)),n.removed=[];const nt=Qe&&typeof be!="string"&&qt(be);if(nt){cn(be);const nn=B(be);if(typeof nn=="string"){const rn=ze(nn);if(!pe[rn]||ae[rn])throw Dt(be),or("root node is forbidden and cannot be sanitized in-place")}if($t(be))throw Dt(be),or("root node is clobbered and cannot be sanitized in-place");try{ft(be)}catch(rn){throw Dt(be),rn}}else if(qt(be))Z=Xt("<!---->"),ge=Z.ownerDocument.importNode(be,!0),ge.nodeType===yn.element&&ge.nodeName==="BODY"||ge.nodeName==="HTML"?Z=ge:Z.appendChild(ge),ft(ge);else{if(!pt&&!He&&!xe&&be.indexOf("<")===-1)return E&&Ue?F(be):be;if(Z=Xt(be),!Z)return pt?null:Ue?k:""}Z&&ot&&at(Z.firstChild);const At=nt?be:Z;try{const nn=en(At);for(;Le=nn.nextNode();)We(Le,At),Xe(Le),kt(Le.content)&&bt(Le.content)}catch(nn){throw nt&&(Dt(be),ar(n.removed,rn=>{rn.element&&Zt(rn.element)})),nn}if(nt)return ar(n.removed,nn=>{nn.element&&Zt(nn.element)}),He&&tn(be),be;if(pt){if(He&&tn(Z),Oe)for(qe=Q.call(Z.ownerDocument);Z.firstChild;)qe.appendChild(Z.firstChild);else qe=Z;return(K.shadowroot||K.shadowrootmode)&&(qe=J.call(a,qe,!0)),qe}let St=xe?Z.outerHTML:Z.innerHTML;return xe&&pe["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&an(Jf,Z.ownerDocument.doctype.name)&&(St="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
803
- `+St),He&&(St=Cn(St)),E&&Ue?F(St):St},n.setConfig=function(){let be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ke(be),we=!0,Ae=pe,Ie=K},n.clearConfig=function(){it=null,we=!1,Ae=null,Ie=null,E=j,k=""},n.isValidAttribute=function(be,M,Z){it||Ke({});const ge=ze(be),Le=ze(M);return Y(ge,Le,Z)},n.addHook=function(be,M){typeof M=="function"&&dn(ee,be)&&Fr(ee[be],M)},n.removeHook=function(be,M){if(dn(ee,be)){if(M!==void 0){const Z=$f(ee[be],M);return Z===-1?void 0:Lf(ee[be],Z,1)[0]}return Al(ee[be])}},n.removeHooks=function(be){dn(ee,be)&&(ee[be]=[])},n.removeAllHooks=function(){ee=Il()},n}var xr=Ol();let go=null;const sC=1500;function bo(){go?.clear(),go=null}function lC(e,{onEnd:n,rate:r=.9}={}){if(typeof window>"u"||typeof SpeechSynthesisUtterance>"u"||!("speechSynthesis"in window)){n?.();return}const a=window.speechSynthesis;bo();let s=!1;const l=()=>{if(!s){s=!0;try{n?.()}catch{}}};try{a.cancel()}catch{l();return}const i=()=>{bo();try{a.cancel();const p=new SpeechSynthesisUtterance(e),h=a.getVoices().find(d=>d.lang.startsWith("ko"));h&&(p.voice=h),p.rate=r,p.onend=n?l:null,p.onerror=n?l:null,a.speak(p)}catch{l()}};let c;try{c=a.getVoices()}catch{l();return}if(c.length>0){i();return}const u=setTimeout(i,sC);try{a.addEventListener("voiceschanged",i,{once:!0})}catch{clearTimeout(u),l();return}go={clear:()=>{clearTimeout(u),a.removeEventListener("voiceschanged",i)}}}function yo(){bo(),typeof window<"u"&&"speechSynthesis"in window&&window.speechSynthesis.cancel()}const iC=/^(?:[a-z]+:)?\/\//i,uC="__ihab_core_asset_base_url__";function cC(){return globalThis[uC]??""}function vo(e){const n=String(e||"").trim();if(!n)return"";if(iC.test(n)||n.startsWith("data:")||n.startsWith("blob:"))return n;const r=n.startsWith("/")?n:`/${n}`,a=cC();return a?`${a}${r}`:r}const zl="__ihab_core_storage_resolvers__";function Wr(){return globalThis[zl]??null}function dC(e){globalThis[zl]=e}let Wl=class extends Error{constructor(n){super(`
801
+ */const yf=[["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"}]],vf=oe("thumbs-up",yf),lo={"alert-triangle":ol,"align-start-vertical":np,anchor:$1,armchair:R1,"arrow-down":rp,"arrow-up":sp,"arrow-left":ip,"arrow-right":cp,"arrow-right-left":pp,"audio-lines":mp,ban:Cp,bell:bp,"book-marked":vp,"book-open":_p,"bow-arrow":Bp,braces:Ap,bug:Ep,calendar:gl,"calendar-check":Dp,"calendar-days":Tp,camera:$p,car:I1,"chart-column":Rp,"chart-line":Fp,"chart-pie":Op,check:sl,"chevron-down":bl,"chevron-left":ll,"chevron-right":il,"chevron-up":yl,circle:pf,"clipboard-list":qp,coffee:z1,combine:Gp,copy:Yp,"chevrons-left-right-ellipsis":Xp,"credit-card":Qp,database:ul,diff:nh,download:cl,ear:oh,edit:lh,"edit-2":uh,"edit-3":dh,ellipsis:dl,eraser:mh,"external-link":Ch,eye:bh,"file-text":vh,"flip-horizontal":_h,"folder-open":Bh,"folder-plus":Ah,gamepad:Eh,"gamepad-2":H1,clock:q1,lock:gm,"search-x":x0,"share-2":N0,tag:X0,target:G1,percent:Y1,gavel:Dh,"git-merge":pl,globe:Mh,"grip-vertical":Lh,headphones:Ph,heart:Ih,home:zh,inbox:X1,info:Hh,"key-round":qh,landmark:Gh,layers:Yh,"layout-dashboard":Xh,leaf:Qh,lightbulb:tm,link:am,"link-2":om,"link-2-off":lm,list:um,"list-checks":dm,"list-ordered":hm,loader:fm,"log-out":ym,mail:xm,"map-pin":wm,menu:Cf,"message-circle":km,"message-circle-question-mark":Nm,"message-square":jm,"message-square-more":Q1,"message-square-text":Sm,minus:tf,"minus-circle":Mm,moon:bf,"more-horizontal":dl,package:Lm,"party-popper":Pm,pause:Im,pencil:zm,phone:Hm,play:qm,"play-circle":Gm,plus:Ym,printer:Xm,"refresh-cw":Qm,repeat:t0,replace:a0,rocket:o0,"rotate-ccw":l0,"rotate-cw":u0,salad:d0,"scan-search":h0,search:g0,"circle-alert":hl,"alert-circle":hl,"check-circle":ml,scissors:y0,send:w0,settings:k0,"shield-check":j0,"shopping-cart":S0,shuffle:M0,"skip-back":L0,"skip-forward":P0,sparkles:af,square:I0,star:z0,store:H0,"sun-medium":q0,table:G0,"table-2":Y0,terminal:Q0,"text-cursor-input":t1,"text-initial":a1,"thumbs-up":vf,ticket:o1,trash:u1,triangle:mf,"trash-2":l1,"trending-up":d1,"triangle-alert":ol,trophy:h1,type:of,unlink:f1,upload:g1,user:so,"user-plus":v1,"user-round":_1,"user-round-check":B1,users:A1,"users-round":E1,volume:lf,"volume-2":fl,wrench:S1,x:Cl};Object.freeze(Object.keys(lo));function xf(e){return lo[e]??null}const vl=new Set;function _f(e){return Yn&&!(e in lo)&&!vl.has(e)&&(vl.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 wf=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 Bf(e){const n=e.toLowerCase();if(n.startsWith("http://")||n.startsWith("https://")||n.startsWith("data:")||e.includes("/assets/")||/\.(png|jpe?g|gif|webp|avif|bmp|ico)$/i.test(n))return null;const a=(e.split("/").pop()||"").replace(/\.svg$/,"");return a?wf(a):null}const xl=new Map;function kf(e){const n=typeof e=="string"?Bf(e):null,a=n?xf(n)??xl.get(n)??null:null,[r,s]=o.useState(null);return o.useEffect(()=>{if(!n||a)return;let l=!1;return _f(n).then(i=>{xl.set(n,i),l||s(i)}),()=>{l=!0}},[n,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 _l(e,n){(n==null||n>e.length)&&(n=e.length);for(var a=0,r=Array(n);a<n;a++)r[a]=e[a];return r}function Af(e){if(Array.isArray(e))return e}function Nf(e,n){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,n!==0)for(;!(c=(r=l.call(a)).done)&&(u.push(r.value),u.length!==n);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 Ef(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
802
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jf(e,n){return Af(e)||Nf(e,n)||Df(e,n)||Ef()}function Df(e,n){if(e){if(typeof e=="string")return _l(e,n);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)?_l(e,n):void 0}}const wl=Object.entries,Bl=Object.setPrototypeOf,Sf=Object.isFrozen,Tf=Object.getPrototypeOf,Mf=Object.getOwnPropertyDescriptor;let Kt=Object.freeze,Yt=Object.seal,ya=Object.create,kl=typeof Reflect<"u"&&Reflect,io=kl.apply,uo=kl.construct;Kt||(Kt=function(n){return n}),Yt||(Yt=function(n){return n}),io||(io=function(n,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 n.apply(a,s)}),uo||(uo=function(n){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 n(...r)});const ra=Ut(Array.prototype.forEach),$f=Ut(Array.prototype.lastIndexOf),Al=Ut(Array.prototype.pop),Ia=Ut(Array.prototype.push),Lf=Ut(Array.prototype.splice),va=Array.isArray,Oa=Ut(String.prototype.toLowerCase),co=Ut(String.prototype.toString),Nl=Ut(String.prototype.match),za=Ut(String.prototype.replace),El=Ut(String.prototype.indexOf),Rf=Ut(String.prototype.trim),Pf=Ut(Number.prototype.toString),Ff=Ut(Boolean.prototype.toString),jl=typeof BigInt>"u"?null:Ut(BigInt.prototype.toString),Dl=typeof Symbol>"u"?null:Ut(Symbol.prototype.toString),dn=Ut(Object.prototype.hasOwnProperty),Wa=Ut(Object.prototype.toString),rn=Ut(RegExp.prototype.test),oa=If(TypeError);function Ut(e){return function(n){n instanceof RegExp&&(n.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 io(e,n,r)}}function If(e){return function(){for(var n=arguments.length,a=new Array(n),r=0;r<n;r++)a[r]=arguments[r];return uo(e,a)}}function yt(e,n){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Oa;if(Bl&&Bl(e,null),!va(n))return e;let r=n.length;for(;r--;){let s=n[r];if(typeof s=="string"){const l=a(s);l!==s&&(Sf(n)||(n[r]=l),s=l)}e[s]=!0}return e}function Of(e){for(let n=0;n<e.length;n++)dn(e,n)||(e[n]=null);return e}function bn(e){const n=ya(null);for(const r of wl(e)){var a=jf(r,2);const s=a[0],l=a[1];dn(e,s)&&(va(l)?n[s]=Of(l):l&&typeof l=="object"&&l.constructor===Object?n[s]=bn(l):n[s]=l)}return n}function zf(e){switch(typeof e){case"string":return e;case"number":return Pf(e);case"boolean":return Ff(e);case"bigint":return jl?jl(e):"0";case"symbol":return Dl?Dl(e):"Symbol()";case"undefined":return Wa(e);case"function":case"object":{if(e===null)return Wa(e);const n=e,a=En(n,"toString");if(typeof a=="function"){const r=a(n);return typeof r=="string"?r:Wa(r)}return Wa(e)}default:return Wa(e)}}function En(e,n){for(;e!==null;){const r=Mf(e,n);if(r){if(r.get)return Ut(r.get);if(typeof r.value=="function")return Ut(r.value)}e=Tf(e)}function a(){return null}return a}function Wf(e){try{return rn(e,""),!0}catch{return!1}}const Sl=Kt(["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"]),po=Kt(["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"]),ho=Kt(["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"]),Hf=Kt(["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"]),mo=Kt(["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"]),Vf=Kt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Tl=Kt(["#text"]),Ml=Kt(["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"]),fo=Kt(["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"]),$l=Kt(["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"]),br=Kt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),qf=Yt(/{{[\w\W]*|^[\w\W]*}}/g),Uf=Yt(/<%[\w\W]*|^[\w\W]*%>/g),Gf=Yt(/\${[\w\W]*/g),Kf=Yt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Yf=Yt(/^aria-[\-\w]+$/),Ll=Yt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Zf=Yt(/^(?:\w+script|data):/i),Xf=Yt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Jf=Yt(/^html$/i),Qf=Yt(/^[a-z][.\w]*(-[.\w]+)+$/i),Rl=Yt(/<[/\w!]/g),Pl=Yt(/<[/\w]/g),eC=Yt(/<\/no(script|embed|frames)/i),tC=Yt(/\/>/i),yn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Fl=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],nC=Kt(yt({},Fl)),aC=(function(){const e={};return ra(Fl,n=>{e[n]=Yt(new RegExp("</"+n+"(?=[\\t\\n\\f\\r />])","i"))}),Kt(e)})(),rC=function(){return typeof window>"u"?null:window},oC=function(n,a){if(typeof n!="object"||typeof n.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 n.createPolicy(l,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+l+" could not be created."),null}},Il=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Zn=function(n,a,r,s){return dn(n,a)&&va(n[a])?yt(s.base?bn(s.base):{},n[a],s.transform):r},Co=function(n,a,r){const s=dn(n,a)?n[a]:void 0;return s&&typeof s=="object"?bn(s):r()};function Ol(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:rC();const n=ye=>Ol(ye);if(n.version="3.4.14",n.removed=[],!e||!e.document||e.document.nodeType!==yn.document||!e.Element)return n.isSupported=!1,n;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,f=u.prototype,C=En(f,"cloneNode"),x=En(f,"remove"),y=En(f,"nextSibling"),b=En(f,"childNodes"),v=En(f,"parentNode"),_=En(f,"shadowRoot"),g=En(f,"attributes"),w=i&&i.prototype?En(i.prototype,"nodeType"):null,N=i&&i.prototype?En(i.prototype,"nodeName"):null,m=i&&i.prototype?En(i.prototype,"ownerDocument"):null,A=function(M){return w?w(M):M.nodeType},B=function(M){return N?N(M):M.nodeName};if(typeof l=="function"){const ye=a.createElement("template");ye.content&&ye.content.ownerDocument&&(a=ye.content.ownerDocument)}let j,k="",E,D=!1,$=0;const V=function(){if($>0)throw oa('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.')},F=function(M){V(),$++;try{return j.createHTML(M)}finally{$--}},U=function(M){V(),$++;try{return j.createScriptURL(M)}finally{$--}},T=function(){return D||(E=oC(d,s),D=!0),E},z=a,W=z.implementation,ie=z.createNodeIterator,Q=z.createDocumentFragment,L=z.getElementsByTagName,J=r.importNode;let ee=Il();n.isSupported=typeof wl=="function"&&typeof v=="function"&&W&&W.createHTMLDocument!==void 0;const q=qf,P=Uf,R=Gf,S=Kf,H=Yf,ne=Zf,te=Xf,ue=Qf;let se=Ll,pe=null;const G=yt({},[...Sl,...po,...ho,...mo,...Tl]);let K=null;const O=yt({},[...Ml,...fo,...$l,...br]);let I=Object.seal(ya(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}})),re=null,he=null;const ae=Object.seal(ya(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let _e=!0,De=!0,Se=!1,Ne=!0,He=!1,ve=!0,xe=!1,we=!1,Ae=null,Ie=null,ot=!1,pt=!1,Oe=!1,Ue=!1,at=!0,ce=!1;const Pe="user-content-";let Ye=!0,Qe=!1,ut={},vt=null;const ct=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 Gt=null;const xt=yt({},["audio","video","img","source","image","track"]);let lt=null;const st=yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ot="http://www.w3.org/1998/Math/MathML",Mt="http://www.w3.org/2000/svg",Nt="http://www.w3.org/1999/xhtml";let Ft=Nt,zt=!1,_t=null;const gt=yt({},[Ot,Mt,Nt],co),Et=Kt(["mi","mo","mn","ms","mtext"]);let It=yt({},Et);const et=Kt(["annotation-xml"]);let wt=yt({},et);const tt=yt({},["title","style","font","a","script"]);let fe=null;const $e=["application/xhtml+xml","text/html"],Re="text/html";let ze=null,it=null;const on=a.createElement("form"),ht=function(M){return M instanceof RegExp||M instanceof Function},Ke=function(){let M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(it&&it===M)return;(!M||typeof M!="object")&&(M={}),M=bn(M),fe=$e.indexOf(M.PARSER_MEDIA_TYPE)===-1?Re:M.PARSER_MEDIA_TYPE,ze=fe==="application/xhtml+xml"?co:Oa,pe=Zn(M,"ALLOWED_TAGS",G,{transform:ze}),K=Zn(M,"ALLOWED_ATTR",O,{transform:ze}),_t=Zn(M,"ALLOWED_NAMESPACES",gt,{transform:co}),lt=Zn(M,"ADD_URI_SAFE_ATTR",st,{transform:ze,base:st}),Gt=Zn(M,"ADD_DATA_URI_TAGS",xt,{transform:ze,base:xt}),vt=Zn(M,"FORBID_CONTENTS",ct,{transform:ze}),re=Zn(M,"FORBID_TAGS",bn({}),{transform:ze}),he=Zn(M,"FORBID_ATTR",bn({}),{transform:ze}),ut=dn(M,"USE_PROFILES")?M.USE_PROFILES&&typeof M.USE_PROFILES=="object"?bn(M.USE_PROFILES):M.USE_PROFILES:!1,_e=M.ALLOW_ARIA_ATTR!==!1,De=M.ALLOW_DATA_ATTR!==!1,Se=M.ALLOW_UNKNOWN_PROTOCOLS||!1,Ne=M.ALLOW_SELF_CLOSE_IN_ATTR!==!1,He=M.SAFE_FOR_TEMPLATES||!1,ve=M.SAFE_FOR_XML!==!1,xe=M.WHOLE_DOCUMENT||!1,pt=M.RETURN_DOM||!1,Oe=M.RETURN_DOM_FRAGMENT||!1,Ue=M.RETURN_TRUSTED_TYPE||!1,ot=M.FORCE_BODY||!1,at=M.SANITIZE_DOM!==!1,ce=M.SANITIZE_NAMED_PROPS||!1,Ye=M.KEEP_CONTENT!==!1,Qe=M.IN_PLACE||!1,se=Wf(M.ALLOWED_URI_REGEXP)?M.ALLOWED_URI_REGEXP:Ll,Ft=typeof M.NAMESPACE=="string"?M.NAMESPACE:Nt,It=Co(M,"MATHML_TEXT_INTEGRATION_POINTS",()=>yt({},Et)),wt=Co(M,"HTML_INTEGRATION_POINTS",()=>yt({},et));const Z=Co(M,"CUSTOM_ELEMENT_HANDLING",()=>ya(null));if(I=ya(null),dn(Z,"tagNameCheck")&&ht(Z.tagNameCheck)&&(I.tagNameCheck=Z.tagNameCheck),dn(Z,"attributeNameCheck")&&ht(Z.attributeNameCheck)&&(I.attributeNameCheck=Z.attributeNameCheck),dn(Z,"allowCustomizedBuiltInElements")&&typeof Z.allowCustomizedBuiltInElements=="boolean"&&(I.allowCustomizedBuiltInElements=Z.allowCustomizedBuiltInElements),Yt(I),He&&(De=!1),Oe&&(pt=!0),ut&&(pe=yt({},Tl),K=ya(null),ut.html===!0&&(yt(pe,Sl),yt(K,Ml)),ut.svg===!0&&(yt(pe,po),yt(K,fo),yt(K,br)),ut.svgFilters===!0&&(yt(pe,ho),yt(K,fo),yt(K,br)),ut.mathMl===!0&&(yt(pe,mo),yt(K,$l),yt(K,br))),ae.tagCheck=null,ae.attributeCheck=null,dn(M,"ADD_TAGS")&&(typeof M.ADD_TAGS=="function"?ae.tagCheck=M.ADD_TAGS:va(M.ADD_TAGS)&&(pe===G&&(pe=bn(pe)),yt(pe,M.ADD_TAGS,ze))),dn(M,"ADD_ATTR")&&(typeof M.ADD_ATTR=="function"?ae.attributeCheck=M.ADD_ATTR:va(M.ADD_ATTR)&&(K===O&&(K=bn(K)),yt(K,M.ADD_ATTR,ze))),dn(M,"ADD_FORBID_CONTENTS")&&va(M.ADD_FORBID_CONTENTS)&&(vt===ct&&(vt=bn(vt)),yt(vt,M.ADD_FORBID_CONTENTS,ze)),Ye&&(pe["#text"]=!0),xe&&yt(pe,["html","head","body"]),pe.table&&(yt(pe,["tbody"]),delete re.tbody),M.TRUSTED_TYPES_POLICY){if(typeof M.TRUSTED_TYPES_POLICY.createHTML!="function")throw oa('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof M.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw oa('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const ge=j;j=M.TRUSTED_TYPES_POLICY;try{k=F("")}catch(Le){throw j=ge,Le}}else M.TRUSTED_TYPES_POLICY===null?(j=void 0,k=""):(j===void 0&&(j=T()),j&&typeof k=="string"&&(k=F("")));Kt&&Kt(M),it=M},Ct=yt({},[...po,...ho,...Hf]),Bt=yt({},[...mo,...Vf]),X=function(M,Z,ge){return Z.namespaceURI===Nt?M==="svg":Z.namespaceURI===Ot?M==="svg"&&(ge==="annotation-xml"||It[ge]):!!Ct[M]},Ce=function(M,Z,ge){return Z.namespaceURI===Nt?M==="math":Z.namespaceURI===Mt?M==="math"&&wt[ge]:!!Bt[M]},Ge=function(M,Z,ge){return Z.namespaceURI===Mt&&!wt[ge]||Z.namespaceURI===Ot&&!It[ge]?!1:!Bt[M]&&(tt[M]||!Ct[M])},Ze=function(M){let Z=v(M);(!Z||!Z.tagName)&&(Z={namespaceURI:Ft,tagName:"template"});const ge=Oa(M.tagName),Le=Oa(Z.tagName);return _t[M.namespaceURI]?M.namespaceURI===Mt?X(ge,Z,Le):M.namespaceURI===Ot?Ce(ge,Z,Le):M.namespaceURI===Nt?Ge(ge,Z,Le):!!(fe==="application/xhtml+xml"&&_t[M.namespaceURI]):!1},rt=function(M){Ia(n.removed,{element:M});try{v(M).removeChild(M)}catch{if(x(M),!v(M))throw oa("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},mt=function(M,Z,ge){try{M.removeAttributeNode(Z)}catch{try{M.removeAttribute(ge)}catch{}}},Dt=function(M){Zt(M);const Z=b(M);if(Z){const Le=[];ra(Z,qe=>{Ia(Le,qe)}),ra(Le,qe=>{try{x(qe)}catch{}})}const ge=g(M);if(ge)for(let Le=ge.length-1;Le>=0;--Le){const qe=ge[Le],nt=qe&&qe.name;typeof nt=="string"&&mt(M,qe,nt)}},Lt=function(M,Z,ge){if(!ge)try{ge=Z.getAttributeNode(M)}catch{ge=null}Ia(n.removed,{attribute:ge||null,from:Z});try{ge?Z.removeAttributeNode(ge):Z.removeAttribute(M)}catch{try{Z.removeAttribute(M)}catch{}}if(M==="is")if(pt||Oe)try{rt(Z)}catch{}else try{Z.setAttribute(M,"")}catch{}},Dn=function(M){const Z=g(M);if(Z)for(let ge=Z.length-1;ge>=0;--ge){const Le=Z[ge],qe=Le&&Le.name;typeof qe!="string"||K[ze(qe)]||mt(M,Le,qe)}},Zt=function(M){const Z=[M];for(;Z.length>0;){const ge=Z.pop();A(ge)===yn.element&&Dn(ge);const qe=b(ge);if(qe)for(let nt=qe.length-1;nt>=0;--nt)Z.push(qe[nt])}},Sn=function(M,Z){return ve?M==="patchsrc"?!0:M==="for"&&Z!=="label"&&Z!=="output":!1},cn=function(M){if(!ve)return;const Z=[M];for(;Z.length>0;){const ge=Z.pop(),Le=A(ge);if(Le===yn.processingInstruction||Le===yn.comment&&rn(Pl,ge.data)){try{x(ge)}catch{}continue}if(Le===yn.element){const nt=ge,At=ze(B(ge));try{nt.hasAttribute&&nt.hasAttribute("patchsrc")&&nt.removeAttribute("patchsrc"),nt.hasAttribute&&nt.hasAttribute("for")&&Sn("for",At)&&nt.removeAttribute("for")}catch{}}const qe=b(ge);if(qe)for(let nt=qe.length-1;nt>=0;--nt)Z.push(qe[nt])}},Xt=function(M){let Z=null,ge=null;if(ot)M="<remove></remove>"+M;else{const nt=Nl(M,/^[\r\n\t ]+/);ge=nt&&nt[0]}fe==="application/xhtml+xml"&&Ft===Nt&&(M='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+M+"</body></html>");const Le=j?F(M):M;if(Ft===Nt)try{Z=new h().parseFromString(Le,fe)}catch{}if(!Z||!Z.documentElement){Z=W.createDocument(Ft,"template",null);try{Z.documentElement.innerHTML=zt?k:Le}catch{}}const qe=Z.body||Z.documentElement;return M&&ge&&qe.insertBefore(a.createTextNode(ge),qe.childNodes[0]||null),Ft===Nt?L.call(Z,xe?"html":"body")[0]:xe?Z.documentElement:qe},en=function(M){const Z=m?m(M):M.ownerDocument;return ie.call(Z||M,M,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Cn=function(M){return M=za(M,q," "),M=za(M,P," "),M=za(M,R," "),M},tn=function(M){var Z;M.normalize();const ge=m?m(M):M.ownerDocument,Le=ie.call(ge||M,M,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let qe=Le.nextNode();for(;qe;)qe.data=Cn(qe.data),qe=Le.nextNode();const nt=(Z=M.querySelectorAll)===null||Z===void 0?void 0:Z.call(M,"template");nt&&ra(nt,At=>{kt(At.content)&&tn(At.content)})},$t=function(M){const Z=N?N(M):null;return typeof Z!="string"||ze(Z)!=="form"?!1:typeof M.nodeName!="string"||typeof M.textContent!="string"||typeof M.removeChild!="function"||M.attributes!==g(M)||typeof M.removeAttribute!="function"||typeof M.setAttribute!="function"||typeof M.namespaceURI!="string"||typeof M.insertBefore!="function"||typeof M.hasChildNodes!="function"||M.nodeType!==w(M)||M.childNodes!==b(M)},kt=function(M){if(!w||typeof M!="object"||M===null)return!1;try{return w(M)===yn.documentFragment}catch{return!1}},qt=function(M){if(!w||typeof M!="object"||M===null)return!1;try{return typeof w(M)=="number"}catch{return!1}};function Rt(ye,M,Z){ye.length!==0&&ra(ye,ge=>{ge.call(n,M,Z,it)})}const Tn=function(M,Z){return!!(ve&&M.hasChildNodes()&&!qt(M.firstElementChild)&&rn(Rl,M.textContent)&&rn(Rl,M.innerHTML)||ve&&M.namespaceURI===Nt&&nC[Z]&&(qt(M.firstElementChild)||typeof M.textContent=="string"&&rn(aC[Z],M.textContent))||M.nodeType===yn.processingInstruction||ve&&M.nodeType===yn.comment&&rn(Pl,M.data))},Mn=function(M,Z){if(M instanceof RegExp)return rn(M,Z);if(M instanceof Function){for(var ge=arguments.length,Le=new Array(ge>2?ge-2:0),qe=2;qe<ge;qe++)Le[qe-2]=arguments[qe];return!!M(Z,...Le)}return!1},Fn=function(M,Z,ge){if(!re[Z]&&Be(Z)&&Mn(I.tagNameCheck,Z))return!1;if(Ye&&!vt[Z]){const Le=v(M),qe=b(M);if(qe&&Le){const nt=qe.length;for(let At=nt-1;At>=0;--At){const St=M===ge?C(qe[At],!0):qe[At];Le.insertBefore(St,y(M))}}}return rt(M),!0},me=function(M,Z,ge,Le){return M.length===0?Z:Z===ge||Z===Le?bn(Z):Z},je=function(M,Z){return M===Z||v(M)!==null?!1:(Qe&&Zt(M),!0)},We=function(M,Z){if(Rt(ee.beforeSanitizeElements,M,null),je(M,Z))return!0;if($t(M))return rt(M),!0;const ge=ze(B(M));if(pe=me(ee.uponSanitizeElement,pe,G,Ae),Rt(ee.uponSanitizeElement,M,{tagName:ge,allowedTags:pe}),je(M,Z))return!0;if(Tn(M,ge))return rt(M),!0;if(re[ge]||!(ae.tagCheck instanceof Function&&ae.tagCheck(ge))&&!pe[ge]){const qe=Fn(M,ge,Z);return qe===!1&&Rt(ee.afterSanitizeElements,M,null),qe}if(A(M)===yn.element&&!Ze(M)||(ge==="noscript"||ge==="noembed"||ge==="noframes")&&rn(eC,M.innerHTML))return rt(M),!0;if(He&&M.nodeType===yn.text){const qe=Cn(M.textContent);M.textContent!==qe&&(Ia(n.removed,{element:M.cloneNode()}),M.textContent=qe)}return Rt(ee.afterSanitizeElements,M,null),!1},Y=function(M,Z,ge){if(he[Z]||Sn(Z,M)||at&&(Z==="id"||Z==="name")&&(ge in a||ge in on))return!1;const Le=K[Z]||ae.attributeCheck instanceof Function&&ae.attributeCheck(Z,M);return De&&rn(S,Z)||_e&&rn(H,Z)?!0:Le?lt[Z]||rn(se,za(ge,te,""))||(Z==="src"||Z==="xlink:href"||Z==="href")&&M!=="script"&&El(ge,"data:")===0&&Gt[M]||Se&&!rn(ne,za(ge,te,""))?!0:!ge:Be(M)&&Mn(I.tagNameCheck,M)&&Mn(I.attributeNameCheck,Z,M)||Z==="is"&&I.allowCustomizedBuiltInElements&&Mn(I.tagNameCheck,ge)},de=yt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Be=function(M){return!de[Oa(M)]&&rn(ue,M)},Me=function(M,Z,ge,Le){if(j&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!ge)switch(d.getAttributeType(M,Z)){case"TrustedHTML":return F(Le);case"TrustedScriptURL":return U(Le)}return Le},Ve=function(M,Z,ge,Le){try{ge?M.setAttributeNS(ge,Z,Le):M.setAttribute(Z,Le),$t(M)?rt(M):Al(n.removed)}catch{Lt(Z,M)}},Xe=function(M){Rt(ee.beforeSanitizeAttributes,M,null);const Z=M.attributes;if(!Z||$t(M))return;K=me(ee.uponSanitizeAttribute,K,O,Ie);const ge={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:K,forceKeepAttr:void 0};let Le=Z.length;const qe=ze(M.nodeName);for(;Le--;){const nt=Z[Le],At=nt.name,St=nt.namespaceURI,nn=nt.value,an=ze(At),Fa=nn;let Te=At==="value"?Fa:Rf(Fa);if(ge.attrName=an,ge.attrValue=Te,ge.keepAttr=!0,ge.forceKeepAttr=void 0,Rt(ee.uponSanitizeAttribute,M,ge),Te=ge.attrValue,ce&&(an==="id"||an==="name")&&El(Te,Pe)!==0&&(Lt(At,M,nt),Te=Pe+Te),ve&&rn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Te)){Lt(At,M,nt);continue}if(an==="attributename"&&Nl(Te,"href")){Lt(At,M,nt);continue}if(!ge.forceKeepAttr){if(!ge.keepAttr){Lt(At,M,nt);continue}if(!Ne&&rn(tC,Te)){Lt(At,M,nt);continue}if(He&&(Te=Cn(Te)),!Y(qe,an,Te)){Lt(At,M,nt);continue}Te=Me(qe,an,St,Te),Te!==Fa&&Ve(M,At,St,Te)}}Rt(ee.afterSanitizeAttributes,M,null)},bt=function(M){let Z=null;const ge=en(M);for(Rt(ee.beforeSanitizeShadowDOM,M,null);Z=ge.nextNode();)if(Rt(ee.uponSanitizeShadowNode,Z,null),We(Z,M),Xe(Z),kt(Z.content)&&bt(Z.content),A(Z)===yn.element){const Le=_(Z);kt(Le)&&(ft(Le),bt(Le))}Rt(ee.afterSanitizeShadowDOM,M,null)},ft=function(M){const Z=[{node:M,shadow:null}];for(;Z.length>0;){const ge=Z.pop();if(ge.shadow){bt(ge.shadow);continue}const Le=ge.node,nt=A(Le)===yn.element,At=b(Le);if(At)for(let St=At.length-1;St>=0;--St)Z.push({node:At[St],shadow:null});if(nt){const St=N?N(Le):null;if(typeof St=="string"&&ze(St)==="template"){const nn=Le.content;kt(nn)&&Z.push({node:nn,shadow:null})}}if(nt){const St=_(Le);kt(St)&&Z.push({node:null,shadow:St},{node:St,shadow:null})}}};return n.sanitize=function(ye){let M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z=null,ge=null,Le=null,qe=null;if(zt=!ye,zt&&(ye="<!-->"),typeof ye!="string"&&!qt(ye)&&(ye=zf(ye),typeof ye!="string"))throw oa("dirty is not a string, aborting");if(!n.isSupported)return ye;we?(pe=Ae,K=Ie):Ke(M),(ee.uponSanitizeElement.length>0||ee.uponSanitizeAttribute.length>0)&&(pe=bn(pe)),ee.uponSanitizeAttribute.length>0&&(K=bn(K)),n.removed=[];const nt=Qe&&typeof ye!="string"&&qt(ye);if(nt){cn(ye);const nn=B(ye);if(typeof nn=="string"){const an=ze(nn);if(!pe[an]||re[an])throw Dt(ye),oa("root node is forbidden and cannot be sanitized in-place")}if($t(ye))throw Dt(ye),oa("root node is clobbered and cannot be sanitized in-place");try{ft(ye)}catch(an){throw Dt(ye),an}}else if(qt(ye))Z=Xt("<!---->"),ge=Z.ownerDocument.importNode(ye,!0),ge.nodeType===yn.element&&ge.nodeName==="BODY"||ge.nodeName==="HTML"?Z=ge:Z.appendChild(ge),ft(ge);else{if(!pt&&!He&&!xe&&ye.indexOf("<")===-1)return j&&Ue?F(ye):ye;if(Z=Xt(ye),!Z)return pt?null:Ue?k:""}Z&&ot&&rt(Z.firstChild);const At=nt?ye:Z;try{const nn=en(At);for(;Le=nn.nextNode();)We(Le,At),Xe(Le),kt(Le.content)&&bt(Le.content)}catch(nn){throw nt&&(Dt(ye),ra(n.removed,an=>{an.element&&Zt(an.element)})),nn}if(nt)return ra(n.removed,nn=>{nn.element&&Zt(nn.element)}),He&&tn(ye),ye;if(pt){if(He&&tn(Z),Oe)for(qe=Q.call(Z.ownerDocument);Z.firstChild;)qe.appendChild(Z.firstChild);else qe=Z;return(K.shadowroot||K.shadowrootmode)&&(qe=J.call(r,qe,!0)),qe}let St=xe?Z.outerHTML:Z.innerHTML;return xe&&pe["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&rn(Jf,Z.ownerDocument.doctype.name)&&(St="<!DOCTYPE "+Z.ownerDocument.doctype.name+`>
803
+ `+St),He&&(St=Cn(St)),j&&Ue?F(St):St},n.setConfig=function(){let ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ke(ye),we=!0,Ae=pe,Ie=K},n.clearConfig=function(){it=null,we=!1,Ae=null,Ie=null,j=E,k=""},n.isValidAttribute=function(ye,M,Z){it||Ke({});const ge=ze(ye),Le=ze(M);return Y(ge,Le,Z)},n.addHook=function(ye,M){typeof M=="function"&&dn(ee,ye)&&Ia(ee[ye],M)},n.removeHook=function(ye,M){if(dn(ee,ye)){if(M!==void 0){const Z=$f(ee[ye],M);return Z===-1?void 0:Lf(ee[ye],Z,1)[0]}return Al(ee[ye])}},n.removeHooks=function(ye){dn(ee,ye)&&(ee[ye]=[])},n.removeAllHooks=function(){ee=Il()},n}var xa=Ol();let go=null;const sC=1500;function bo(){go?.clear(),go=null}function lC(e,{onEnd:n,rate:a=.9}={}){if(typeof window>"u"||typeof SpeechSynthesisUtterance>"u"||!("speechSynthesis"in window)){n?.();return}const r=window.speechSynthesis;bo();let s=!1;const l=()=>{if(!s){s=!0;try{n?.()}catch{}}};try{r.cancel()}catch{l();return}const i=()=>{bo();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=n?l:null,p.onerror=n?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,sC);try{r.addEventListener("voiceschanged",i,{once:!0})}catch{clearTimeout(c),l();return}go={clear:()=>{clearTimeout(c),r.removeEventListener("voiceschanged",i)}}}function yo(){bo(),typeof window<"u"&&"speechSynthesis"in window&&window.speechSynthesis.cancel()}const iC=/^(?:[a-z]+:)?\/\//i,uC="__ihab_core_asset_base_url__";function cC(){return globalThis[uC]??""}function vo(e){const n=String(e||"").trim();if(!n)return"";if(iC.test(n)||n.startsWith("data:")||n.startsWith("blob:"))return n;const a=n.startsWith("/")?n:`/${n}`,r=cC();return r?`${r}${a}`:a}const zl="__ihab_core_storage_resolvers__";function Ha(){return globalThis[zl]??null}function dC(e){globalThis[zl]=e}let Wl=class extends Error{constructor(n){super(`
804
804
  [ihabdevteam-core] ${n}() \uD638\uCD9C \uC2E4\uD328 \u2014 configureStorage()\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.
805
805
 
806
806
  \uC571 \uCD08\uAE30\uD654 \uC2DC\uC810(main.tsx \uB4F1)\uC5D0 \uC544\uB798\uC640 \uAC19\uC774 \uD55C \uBC88 \uD638\uCD9C\uD558\uC138\uC694:
@@ -819,24 +819,24 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
819
819
  \uC124\uCE58 \uBA85\uB839\uC5B4 (\uC2A4\uD1A0\uB9AC\uC9C0 SDK \uBBF8\uC124\uCE58 \uC2DC):
820
820
  npm install @supabase/supabase-js
821
821
  pnpm add @supabase/supabase-js
822
- `),this.name="StorageNotConfiguredError"}};function pC(e){dC(e)}function Hl(e,n){if(!e)return null;const r=Wr();return r?.resolvePath?r.resolvePath(e,n):n?`${n}/${e}.mp3`:null}async function Vl(e){if(!e)return null;const n=Wr();if(!n)throw new Wl("getSignedOrPublicUrl");try{return await n.resolveUrl(e)}catch{return null}}async function ql(e){const n=Wr();if(!n)throw new Wl("downloadSound");return n.download(e)}function hC(){return Wr()?.noiseBaseUrl??"/sounds/noise"}function mC(){const e=Number(Wr()?.noiseFileGain);return Number.isFinite(e)&&e>0?e:1}function fC(e){const n=AbortSignal.timeout;if(typeof n=="function")return n.call(AbortSignal,e);const r=new AbortController;return setTimeout(()=>r.abort(),e),r.signal}function CC(e){return e===400||e===404||e===410}const Ul="__ihab_core_tts_config__";function Hr(){return globalThis[Ul]?.urlResolver??null}function ya(){return globalThis[Ul]?.fallbackUrlResolver??null}const gC="__ihab_core_pronunciation_resolver__";function bC(){return globalThis[gC]??null}let Xn=null;const Vr=new WeakMap,xo=new WeakMap,_o=new WeakMap;let Gl=!1;const Kl=e=>Math.max(0,Math.min(1,Number.isFinite(e)?e:0));function yC(){if(Gl||typeof document>"u")return;Gl=!0;const e=()=>{try{Xn&&Xn.state!=="running"&&Xn.resume()}catch{}};for(const n of["pointerdown","touchend","keydown"])document.addEventListener(n,e,{capture:!0,passive:!0})}function Yl(){if(Xn)return Xn;try{const e=window.AudioContext||window.webkitAudioContext;return e?(Xn=new e,yC(),Xn):null}catch{return null}}function wo(){try{Xn?.resume()}catch{}}function Bo(e,n){const r=Vr.get(n);if(r)return r;try{const a=e.createMediaElementSource(n),s=e.createGain(),l=e.createAnalyser();l.fftSize=1024,l.smoothingTimeConstant=.6,s.gain.value=Kl(xo.get(n)??n.volume),a.connect(s),s.connect(l),s.connect(e.destination);try{n.volume=1}catch{}const i={gain:s,analyser:l};return Vr.set(n,i),i}catch{return null}}function va(e){if(!e)return Promise.resolve(null);const n=Vr.get(e);if(n)return Promise.resolve(n.analyser);const r=Yl();if(!r)return Promise.resolve(null);if(r.state==="running")return Promise.resolve(Bo(r,e)?.analyser??null);const a=_o.get(e);if(a)return a;const s=Promise.resolve().then(()=>r.resume()).then(()=>r.state==="running"?Bo(r,e)?.analyser??null:null).catch(()=>null).finally(()=>{_o.delete(e)});return _o.set(e,s),s}function vC(e){if(!e)return null;const n=Vr.get(e);if(n)return n.analyser;const r=Yl();return r?r.state==="running"?Bo(r,e)?.analyser??null:(va(e),null):null}function Jn(e,n){const r=Kl(n);xo.set(e,r);const a=Vr.get(e);if(a){try{e.volume!==1&&(e.volume=1)}catch{}const s=a.gain.gain;try{const l=a.gain.context.currentTime;s.cancelScheduledValues(l),s.setTargetAtTime(r,l,.01)}catch{try{s.value=r}catch{}}return"gain"}try{e.volume=r}catch{}return"element"}function xa(e){return xo.get(e)??e.volume}function xC(e,n){e.getFloatTimeDomainData(n);let r=0;for(let a=0;a<n.length;a++){const s=n[a];r+=s*s}return Math.sqrt(r/n.length)}const _C="__ihab_core_image_config__";function _r(){return globalThis[_C]??null}const Zl="word_image_existence_map_v1",wC="ihab:image-existence-updated";let qr=null;function BC(){qr!==null&&(clearTimeout(qr),qr=null),typeof window<"u"&&window.dispatchEvent(new Event(wC))}function kC(){qr===null&&(qr=setTimeout(BC,200))}let sr=null,ko=0;const Ur=new Map;function AC(){if(sr)return sr;try{const e=typeof localStorage<"u"?localStorage.getItem(Zl):null,n=e?JSON.parse(e):null,r={};if(n&&typeof n=="object"&&!Array.isArray(n))for(const[a,s]of Object.entries(n))typeof s=="boolean"&&(r[a]=s);sr=r}catch{sr={}}return sr}let Ao=null;function NC(){Ao===null&&(Ao=setTimeout(()=>{Ao=null;try{typeof localStorage<"u"&&sr&&localStorage.setItem(Zl,JSON.stringify(sr))}catch{}},200))}function EC(e,n){return`${e}_${n??1}`}async function jC(e,n,r=!1){const a=AC(),s=EC(e,n);if(!r&&s in a)return a[s];if(!r&&Ur.has(s))return Ur.get(s);const l=_r();if(!l)return!1;let i;try{i=l(e,n)}catch{return!1}if(!i)return!1;let c;try{c=fetch(i,{method:"HEAD",signal:fC(8e3)})}catch{return!1}const u=c.then(p=>p.ok?!0:CC(p.status)?!1:null,()=>null).then(p=>Ur.get(s)!==u?p??!1:(Ur.delete(s),p===null?!1:(a[s]=p,ko++,NC(),p)));return Ur.set(s,u),u}async function Xl(e,n){const r=ko,a=await jC(e,n);return ko!==r&&kC(),a}const Jl=90;function Ql(e){let n=0;for(const r of e){const a=r.codePointAt(0)??0;r===`
823
- `||r==="\r"?n+=2:n+=a<128?1:2}return n}function DC(e){return Ql(e)>90?"LMS":"SMS"}function ei(e,n=85){const r=Ql(e),a=DC(e),s=a==="SMS"?90:2e3,l=typeof n=="number"?n:null;return{bytes:r,type:a,limit:s,over:r>s,target:l,overTarget:l!==null&&r>l}}const SC=["onset","vowel","coda","glide"],ti="none",TC={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},MC="\uC5C6\uC74C";function $C(e){return SC.includes(e)}function LC(e){const n={};for(const[r,a]of Object.entries(e)){const s=$C(r)?r:TC[r];s&&(n[s]=a===MC?ti:a)}return n}const RC={\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"}},ni=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],ri=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],PC=["","\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 Gr(e){if(!e)return null;const n=e.charCodeAt(0)-44032;return n<0||n>=11172?null:{cho:Math.floor(n/588),jung:Math.floor(n%588/28),jong:n%28}}function FC(e){const n=Gr(e[0]||"");return n?ni[n.cho]:""}function IC(e){if(!e)return()=>!0;e=e.normalize("NFC");const n=[...e],r=i=>ni.includes(i),a=i=>ri.includes(i),s=n.map(i=>r(i)?"cho":a(i)?"jung":Gr(i)?"syl":"other"),l=n.map(i=>Gr(i));if(s.includes("other")){const i=e.toLowerCase();return c=>c.normalize("NFC").toLowerCase().includes(i)}return i=>{const c=[...i.normalize("NFC")];for(let u=0;u+n.length<=c.length;u++){let p=!0;for(let h=0;h<n.length;h++){const d=c[u+h],m=s[h];if(m==="cho"){if(FC(d)!==n[h]){p=!1;break}}else if(m==="jung"){const C=Gr(d);if(!C||ri[C.jung]!==n[h]){p=!1;break}}else{const C=l[h];if(C&&C.jong===0){const x=Gr(d);if(!x||x.cho!==C.cho||x.jung!==C.jung){p=!1;break}}else if(d!==n[h]){p=!1;break}}}if(p)return!0}return!1}}const OC={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(OC).map(([e,n])=>[n.join(""),PC[Number(e)]]));const zC="word_pair_index_v2",WC="word_pair_index_sig_v2";let _a=null;function HC(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;for(const n of Object.values(e)){if(n===null||typeof n!="object"||Array.isArray(n))return!1;const r=n;for(const a of["cho","jung","jong"])if(!Array.isArray(r[a])||!r[a].every(s=>typeof s=="string"))return!1}return!0}function VC(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(zC),n=localStorage.getItem(WC);if(!e||!n)return null;const r=JSON.parse(e);return HC(r)?{index:r,sig:n}:null}catch{return null}}function qC(){if(_a)return _a;const e=VC();return e?(_a=e.index,e.sig,_a):null}function UC(e,n,r){return!(e>0)||!(n>0)?1:Math.max(1,Math.floor((e+r)/(n+r)))}function GC(e,n){if(!(e>0))return 1;const r=Math.max(1,Math.floor(n));if(e<=r)return e;const a=Math.ceil(e/r);return Math.max(1,Math.ceil(e/a))}const No=/[ㄱ-ㅎ]/,KC=/[ㅏ-ㅣ]/;function ai(e){e=e.normalize("NFC");for(let n=e.length-1;n>=0;n--){const r=e[n],a=r.charCodeAt(0);if(a>=44032&&a<=55203||No.test(r)||KC.test(r))return r}return null}function YC(e){const n=ai(e);if(!n)return"\uAC00";const r=n.charCodeAt(0);return r>=44032&&r<=55203?(r-44032)%28!==0?"\uC774":"\uAC00":No.test(n)?"\uC774":"\uAC00"}function ZC(e){return`${e}${YC(e)}`}function XC(e){const n=ai(e);if(!n)return"\uB97C";const r=n.charCodeAt(0);return r>=44032&&r<=55203?(r-44032)%28!==0?"\uC744":"\uB97C":No.test(n)?"\uC744":"\uB97C"}function JC(e){return`${e}${XC(e)}`}function QC(e,n,r){const a=e.slice(),[s]=a.splice(n,1);return a.splice(r,0,s),a}function Kr(e,n=Math.random){const r=e.slice();for(let a=r.length-1;a>0;a--){const s=Math.floor(n()*(a+1));[r[a],r[s]]=[r[s],r[a]]}return r}const eg=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",n=typeof Jt?.t=="function"?Jt.t("common.unknownError",{defaultValue:e}):void 0;return typeof n=="string"&&n?n:e};function oi(e,n){if(n===void 0&&(n=eg()),e instanceof Error)return e.message||n;if(typeof e=="string")return e||n;if(e&&typeof e=="object"){const r=e;for(const a of[r.message,r.error_description,r.error])if(typeof a=="string"&&a)return a}return n}const tg="__ihab_core_word_pool__";function si(){return globalThis[tg]??null}const li=globalThis;function ii(e,n){const r=a=>{};try{const a=n();a&&typeof a.catch=="function"&&a.catch(r)}catch(a){r(a)}}function ng(e){ii("time",()=>li.__ihabTrainingTimeLogger?.(e))}function rg(e){ii("completion",()=>li.__ihabTrainingCompletionLogger?.(e))}const ag="Asia/Seoul",og=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function Yr(e){let n;if(e instanceof Date)n=e;else if(typeof e=="string"){const r=e.trim(),a=/^(\d{4}-\d{2}-\d{2})(?:$|[T ])/.exec(r)?.[1];if(a){const l=new Date(`${a}T00:00:00Z`);if(Number.isNaN(l.getTime())||l.toISOString().slice(0,10)!==a)return null}const s=og.exec(r);n=new Date(s?`${s[1]}T${s[2]}:${s[3]??"00"}${s[4]?`.${s[4].slice(0,3).padEnd(3,"0")}`:""}+09:00`:r)}else n=new Date(e);return Number.isNaN(n.getTime())?null:n}function sg(e){return Yr(e)!==null}const lg=e=>Yr(e);function ui(e,n){const r=n.startsWith("ko")?"ko-KR":"en-US",a=lg(e);return a?a.toLocaleDateString(r,{timeZone:ag,year:"numeric",month:"short",day:"numeric"}):""}function Eo(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function ig(e,n,r){return!Number.isFinite(e)||!Number.isFinite(n)||n<1||n>12?`${e}-${n}`:new Intl.DateTimeFormat(Eo(r),{year:"numeric",month:"long"}).format(new Date(e,n-1,1))}function ug(e,n,r){return!Number.isFinite(e)||!Number.isFinite(n)||n<1||n>12?`${e}-${n}`:new Intl.DateTimeFormat(Eo(r),{year:"numeric",month:"short"}).format(new Date(e,n-1,1))}function ci(e,n,r,a){return e("calendar.yearMonth",{year:r,month:a,defaultValue:""})||ig(r,a,n)}function Zr(){return jo(new Date)}function wa(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&Yr(e)?.toISOString().slice(0,10)===e?e:Zr()}function wr(){return dg(Zr())}const cg=540*60*1e3;function di(e,n,r){return new Date(Date.UTC(e,n,r)-cg)}function dg(e){const[n,r,a]=e.split("-").map(Number);return new Date(n,(r||1)-1,a||1)}function jo(e){if(e==null||e==="")return"";const n=Yr(e);return n?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(n):""}function pi(e,n){if(!e)return"";const r=Yr(e);if(!r)return"";const a=r.getTime(),s=Math.max(0,Math.floor((Date.now()-a)/1e3)),l=Math.floor(s/60),i=Math.floor(l/60),c=Math.floor(i/24),u=Math.floor(c/7),p=Math.floor(c/30),h=Math.floor(c/365);return l<1?n("store.time.justNow","\uBC29\uAE08 \uC804"):l<60?n("store.time.minutesAgo",{n:l}):i<24?n("store.time.hoursAgo",{n:i}):c<7?n("store.time.daysAgo",{n:c}):u<5?n("store.time.weeksAgo",{n:u}):c<365?n("store.time.monthsAgo",{n:Math.min(p,11)}):n("store.time.yearsAgo",{n:h})}function hi(e,n={}){const{sep:r=".",pad:a=!0,trailingDot:s=!1,fallback:l="\u2014"}=n;if(!e)return l;const i=jo(e instanceof Date?e:String(e));if(!i)return l;const[c,u,p]=i.split("-"),h=a?u:String(Number(u)),d=a?p:String(Number(p));return`${c}${r}${h}${r}${d}${s?".":""}`}function Ba(e){if(typeof e=="string"){const n=e.trim();return n&&sg(n)?n:null}if(e instanceof Date)return Number.isNaN(e.getTime())?null:e.toISOString();if(typeof e=="number"&&Number.isFinite(e)){const n=new Date(e);return Number.isNaN(n.getTime())?null:n.toISOString()}return null}function pn(e){return typeof e=="string"?e.trim()||null:typeof e=="number"?String(e):null}function pg(e){for(const n of["correct","isCorrect","heard","judgement"])if(typeof e[n]=="boolean")return e[n];return e.score===1?!0:e.score===0?!1:null}function hg(e){return Array.isArray(e)?e.map((n,r)=>{const a=n??{};return{index:r,itemId:pn(a.contextCode)??pn(a.itemId)??pn(a.itemCode)??pn(a.id),question:pn(a.question)??pn(a.q)??pn(a.sentence)??pn(a.text)??pn(a.prompt)??pn(a.word)??pn(a.targetSyllable),answer:pn(a.answer),selected:pn(a.selectedText)??pn(a.selected),correct:pg(a),shownAt:Ba(a.shownAt)??Ba(a.shown_at),answeredAt:Ba(a.answeredAt)??Ba(a.answered_at)}}):[]}const Do=globalThis;async function mg(){try{return await Do.__ihabNoiseSettingsStore?.load()??null}catch{return null}}function So(e){const n=r=>{};try{const r=Do.__ihabNoiseSettingsStore?.save(e);r&&typeof r.catch=="function"&&r.catch(n)}catch(r){n(r)}}function ka(e){try{Do.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function fg(e){if(typeof document<"u"){const n=document.activeElement;let r=null;try{if(r=document.createElement("textarea"),r.value=e,r.setAttribute("readonly",""),r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.opacity="0",r.style.pointerEvents="none",document.body.appendChild(r),r.focus(),r.select(),r.setSelectionRange(0,e.length),document.execCommand("copy"))return!0}catch{}finally{if(r?.parentNode&&r.parentNode.removeChild(r),n&&n!==document.activeElement&&typeof n.focus=="function"&&n.isConnected)try{n.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 Br(e){if(!e)return e;const n=e.trim();return/^[₩$]/.test(n)?n:/원\s*$/.test(n)?"\u20A9"+n.replace(/\s*원\s*$/,"").trim():n}function mi(e,n){if(!e)return"-";const r=/^(\d{1,2}):(\d{2})$/.exec(e.trim());if(!r)return e;const a=Number(r[1]),s=Number(r[2]),l=r[1].padStart(2,"0");return s===0?n("date.timeH",{h:a,hh:l,mm:r[2]}):n("date.timeHM",{h:a,hh:l,m:s,mm:r[2]})}function To(e){return(e??0).toLocaleString("ko-KR")}const Cg=[{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"}]}],gg=[{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 fi(){return Cg}function bg(){return gg}const yg=[],vg=[],xg=[],_g=[];function wg(){return{LISTEN_IN_NOISE:yg,SHORT_STORY:vg,LONG_STORY:xg,ORDERING_SENTENCE:_g}}const Bg=[{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."}],Ci={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function kg(e){return Bg.map(n=>{const r=Ci[n.key];return r?{...n,label:e(`trainingType.${r}.title`),desc:e(`trainingType.${r}.desc`)}:n})}var Ag={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."},Ng={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"},Eg={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"}},jg={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},Dg={selected:"\uC120\uD0DD\uB428"},Sg={placeholder:"\uC120\uD0DD"},Tg={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},Mg={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"},$g={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"},Lg={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"}}}},Rg={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},Pg={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."}}},Fg={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:"\uB09C\uC774\uB3C4",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",playSoundFor:"{{name}} \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"}},Ig={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"}}},Og={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"}}}},zg={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},Wg={showN:"{{n}}\uAC1C\uC529"},Hg={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."}},Vg={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},qg={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},Ug={defaultName:"\uB2E8\uC5B4 \uD45C",title:"\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30",subtitle:"\uCE78\uC744 \uC124\uC815\uD558\uACE0 \uB2E8\uC5B4\uB97C \uCD94\uAC00\uD558\uC5EC \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4.",filterTitle:"\uD45C \uC124\uC815",filter:{composition:"\uAD6C\uC131",image:"\uC774\uBBF8\uC9C0",word:"\uB2E8\uC5B4",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"},Gg={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",agePlus:"{{n}}\uC138 \uC774\uC0C1",ageRange:"{{from}}\uC138~{{to}}\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.",difficultyInfoBandAge:"{{ages}}: {{grade}} \uB0B1\uB9D0\uC744 \uB098\uC774\uBCC4\uB85C \uB098\uB208 \uAC83\uC785\uB2C8\uB2E4.",difficultyInfoBandAgeOne:"{{ages}}: {{grade}} \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",difficultyInfoBandGrade:"{{grade}}: {{ages}} \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",difficultyInfoBandAgeNamed:"{{ages}}: \uB098\uC774\uB85C \uB098\uB208 \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"},Kg={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"},Yg={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"}},Zg={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"}},Xg={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"}},Jg={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."]},Qg={lead:`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
822
+ `),this.name="StorageNotConfiguredError"}};function pC(e){dC(e)}function Hl(e,n){if(!e)return null;const a=Ha();return a?.resolvePath?a.resolvePath(e,n):n?`${n}/${e}.mp3`:null}async function Vl(e){if(!e)return null;const n=Ha();if(!n)throw new Wl("getSignedOrPublicUrl");try{return await n.resolveUrl(e)}catch{return null}}async function ql(e){const n=Ha();if(!n)throw new Wl("downloadSound");return n.download(e)}function hC(){return Ha()?.noiseBaseUrl??"/sounds/noise"}function mC(){const e=Number(Ha()?.noiseFileGain);return Number.isFinite(e)&&e>0?e:1}function fC(e){const n=AbortSignal.timeout;if(typeof n=="function")return n.call(AbortSignal,e);const a=new AbortController;return setTimeout(()=>a.abort(),e),a.signal}function CC(e){return e===400||e===404||e===410}const Ul="__ihab_core_tts_config__";function Va(){return globalThis[Ul]?.urlResolver??null}function yr(){return globalThis[Ul]?.fallbackUrlResolver??null}const gC="__ihab_core_pronunciation_resolver__";function bC(){return globalThis[gC]??null}let Xn=null;const qa=new WeakMap,xo=new WeakMap,_o=new WeakMap;let Gl=!1;const Kl=e=>Math.max(0,Math.min(1,Number.isFinite(e)?e:0));function yC(){if(Gl||typeof document>"u")return;Gl=!0;const e=()=>{try{Xn&&Xn.state!=="running"&&Xn.resume()}catch{}};for(const n of["pointerdown","touchend","keydown"])document.addEventListener(n,e,{capture:!0,passive:!0})}function Yl(){if(Xn)return Xn;try{const e=window.AudioContext||window.webkitAudioContext;return e?(Xn=new e,yC(),Xn):null}catch{return null}}function wo(){try{Xn?.resume()}catch{}}function Bo(e,n){const a=qa.get(n);if(a)return a;try{const r=e.createMediaElementSource(n),s=e.createGain(),l=e.createAnalyser();l.fftSize=1024,l.smoothingTimeConstant=.6,s.gain.value=Kl(xo.get(n)??n.volume),r.connect(s),s.connect(l),s.connect(e.destination);try{n.volume=1}catch{}const i={gain:s,analyser:l};return qa.set(n,i),i}catch{return null}}function vr(e){if(!e)return Promise.resolve(null);const n=qa.get(e);if(n)return Promise.resolve(n.analyser);const a=Yl();if(!a)return Promise.resolve(null);if(a.state==="running")return Promise.resolve(Bo(a,e)?.analyser??null);const r=_o.get(e);if(r)return r;const s=Promise.resolve().then(()=>a.resume()).then(()=>a.state==="running"?Bo(a,e)?.analyser??null:null).catch(()=>null).finally(()=>{_o.delete(e)});return _o.set(e,s),s}function vC(e){if(!e)return null;const n=qa.get(e);if(n)return n.analyser;const a=Yl();return a?a.state==="running"?Bo(a,e)?.analyser??null:(vr(e),null):null}function Jn(e,n){const a=Kl(n);xo.set(e,a);const r=qa.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 xr(e){return xo.get(e)??e.volume}function xC(e,n){e.getFloatTimeDomainData(n);let a=0;for(let r=0;r<n.length;r++){const s=n[r];a+=s*s}return Math.sqrt(a/n.length)}const _C="__ihab_core_image_config__";function _a(){return globalThis[_C]??null}const Zl="word_image_existence_map_v1",wC="ihab:image-existence-updated";let Ua=null;function BC(){Ua!==null&&(clearTimeout(Ua),Ua=null),typeof window<"u"&&window.dispatchEvent(new Event(wC))}function kC(){Ua===null&&(Ua=setTimeout(BC,200))}let sa=null,ko=0;const Ga=new Map;function AC(){if(sa)return sa;try{const e=typeof localStorage<"u"?localStorage.getItem(Zl):null,n=e?JSON.parse(e):null,a={};if(n&&typeof n=="object"&&!Array.isArray(n))for(const[r,s]of Object.entries(n))typeof s=="boolean"&&(a[r]=s);sa=a}catch{sa={}}return sa}let Ao=null;function NC(){Ao===null&&(Ao=setTimeout(()=>{Ao=null;try{typeof localStorage<"u"&&sa&&localStorage.setItem(Zl,JSON.stringify(sa))}catch{}},200))}function EC(e,n){return`${e}_${n??1}`}async function jC(e,n,a=!1){const r=AC(),s=EC(e,n);if(!a&&s in r)return r[s];if(!a&&Ga.has(s))return Ga.get(s);const l=_a();if(!l)return!1;let i;try{i=l(e,n)}catch{return!1}if(!i)return!1;let u;try{u=fetch(i,{method:"HEAD",signal:fC(8e3)})}catch{return!1}const c=u.then(p=>p.ok?!0:CC(p.status)?!1:null,()=>null).then(p=>Ga.get(s)!==c?p??!1:(Ga.delete(s),p===null?!1:(r[s]=p,ko++,NC(),p)));return Ga.set(s,c),c}async function Xl(e,n){const a=ko,r=await jC(e,n);return ko!==a&&kC(),r}const Jl=90;function Ql(e){let n=0;for(const a of e){const r=a.codePointAt(0)??0;a===`
823
+ `||a==="\r"?n+=2:n+=r<128?1:2}return n}function DC(e){return Ql(e)>90?"LMS":"SMS"}function ei(e,n=85){const a=Ql(e),r=DC(e),s=r==="SMS"?90:2e3,l=typeof n=="number"?n:null;return{bytes:a,type:r,limit:s,over:a>s,target:l,overTarget:l!==null&&a>l}}const SC=["onset","vowel","coda","glide"],ti="none",TC={\uCD08\uC131:"onset",\uBAA8\uC74C:"vowel",\uC885\uC131:"coda",\uD65C\uC74C:"glide"},MC="\uC5C6\uC74C";function $C(e){return SC.includes(e)}function LC(e){const n={};for(const[a,r]of Object.entries(e)){const s=$C(a)?a:TC[a];s&&(n[s]=r===MC?ti:r)}return n}const RC={\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"}},ni=["\u3131","\u3132","\u3134","\u3137","\u3138","\u3139","\u3141","\u3142","\u3143","\u3145","\u3146","\u3147","\u3148","\u3149","\u314A","\u314B","\u314C","\u314D","\u314E"],ai=["\u314F","\u3150","\u3151","\u3152","\u3153","\u3154","\u3155","\u3156","\u3157","\u3158","\u3159","\u315A","\u315B","\u315C","\u315D","\u315E","\u315F","\u3160","\u3161","\u3162","\u3163"],PC=["","\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 Ka(e){if(!e)return null;const n=e.charCodeAt(0)-44032;return n<0||n>=11172?null:{cho:Math.floor(n/588),jung:Math.floor(n%588/28),jong:n%28}}function FC(e){const n=Ka(e[0]||"");return n?ni[n.cho]:""}function IC(e){if(!e)return()=>!0;e=e.normalize("NFC");const n=[...e],a=i=>ni.includes(i),r=i=>ai.includes(i),s=n.map(i=>a(i)?"cho":r(i)?"jung":Ka(i)?"syl":"other"),l=n.map(i=>Ka(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+n.length<=u.length;c++){let p=!0;for(let h=0;h<n.length;h++){const d=u[c+h],f=s[h];if(f==="cho"){if(FC(d)!==n[h]){p=!1;break}}else if(f==="jung"){const C=Ka(d);if(!C||ai[C.jung]!==n[h]){p=!1;break}}else{const C=l[h];if(C&&C.jong===0){const x=Ka(d);if(!x||x.cho!==C.cho||x.jung!==C.jung){p=!1;break}}else if(d!==n[h]){p=!1;break}}}if(p)return!0}return!1}}const OC={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(OC).map(([e,n])=>[n.join(""),PC[Number(e)]]));const zC="word_pair_index_v2",WC="word_pair_index_sig_v2";let _r=null;function HC(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;for(const n of Object.values(e)){if(n===null||typeof n!="object"||Array.isArray(n))return!1;const a=n;for(const r of["cho","jung","jong"])if(!Array.isArray(a[r])||!a[r].every(s=>typeof s=="string"))return!1}return!0}function VC(){try{if(typeof localStorage>"u")return null;const e=localStorage.getItem(zC),n=localStorage.getItem(WC);if(!e||!n)return null;const a=JSON.parse(e);return HC(a)?{index:a,sig:n}:null}catch{return null}}function qC(){if(_r)return _r;const e=VC();return e?(_r=e.index,e.sig,_r):null}function UC(e,n,a){return!(e>0)||!(n>0)?1:Math.max(1,Math.floor((e+a)/(n+a)))}function GC(e,n){if(!(e>0))return 1;const a=Math.max(1,Math.floor(n));if(e<=a)return e;const r=Math.ceil(e/a);return Math.max(1,Math.ceil(e/r))}const No=/[ㄱ-ㅎ]/,KC=/[ㅏ-ㅣ]/;function ri(e){e=e.normalize("NFC");for(let n=e.length-1;n>=0;n--){const a=e[n],r=a.charCodeAt(0);if(r>=44032&&r<=55203||No.test(a)||KC.test(a))return a}return null}function YC(e){const n=ri(e);if(!n)return"\uAC00";const a=n.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC774":"\uAC00":No.test(n)?"\uC774":"\uAC00"}function ZC(e){return`${e}${YC(e)}`}function XC(e){const n=ri(e);if(!n)return"\uB97C";const a=n.charCodeAt(0);return a>=44032&&a<=55203?(a-44032)%28!==0?"\uC744":"\uB97C":No.test(n)?"\uC744":"\uB97C"}function JC(e){return`${e}${XC(e)}`}function QC(e,n,a){const r=e.slice(),[s]=r.splice(n,1);return r.splice(a,0,s),r}function Ya(e,n=Math.random){const a=e.slice();for(let r=a.length-1;r>0;r--){const s=Math.floor(n()*(r+1));[a[r],a[s]]=[a[s],a[r]]}return a}const eg=()=>{const e="\uC54C \uC218 \uC5C6\uB294 \uC624\uB958",n=typeof Jt?.t=="function"?Jt.t("common.unknownError",{defaultValue:e}):void 0;return typeof n=="string"&&n?n:e};function oi(e,n){if(n===void 0&&(n=eg()),e instanceof Error)return e.message||n;if(typeof e=="string")return e||n;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 n}const tg="__ihab_core_word_pool__";function si(){return globalThis[tg]??null}const li=globalThis;function ii(e,n){const a=r=>{};try{const r=n();r&&typeof r.catch=="function"&&r.catch(a)}catch(r){a(r)}}function ng(e){ii("time",()=>li.__ihabTrainingTimeLogger?.(e))}function ag(e){ii("completion",()=>li.__ihabTrainingCompletionLogger?.(e))}const rg="Asia/Seoul",og=/^(\d{4}-\d{2}-\d{2})[T ](\d{2}:\d{2})(?::(\d{2})(?:\.(\d+))?)?$/;function Za(e){let n;if(e instanceof Date)n=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=og.exec(a);n=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 n=new Date(e);return Number.isNaN(n.getTime())?null:n}function sg(e){return Za(e)!==null}const lg=e=>Za(e);function ui(e,n){const a=n.startsWith("ko")?"ko-KR":"en-US",r=lg(e);return r?r.toLocaleDateString(a,{timeZone:rg,year:"numeric",month:"short",day:"numeric"}):""}function Eo(e){return e&&e.startsWith("ko")?"ko-KR":e||"en-US"}function ig(e,n,a){return!Number.isFinite(e)||!Number.isFinite(n)||n<1||n>12?`${e}-${n}`:new Intl.DateTimeFormat(Eo(a),{year:"numeric",month:"long"}).format(new Date(e,n-1,1))}function ug(e,n,a){return!Number.isFinite(e)||!Number.isFinite(n)||n<1||n>12?`${e}-${n}`:new Intl.DateTimeFormat(Eo(a),{year:"numeric",month:"short"}).format(new Date(e,n-1,1))}function ci(e,n,a,r){return e("calendar.yearMonth",{year:a,month:r,defaultValue:""})||ig(a,r,n)}function Xa(){return jo(new Date)}function wr(e){return e&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&Za(e)?.toISOString().slice(0,10)===e?e:Xa()}function wa(){return dg(Xa())}const cg=540*60*1e3;function di(e,n,a){return new Date(Date.UTC(e,n,a)-cg)}function dg(e){const[n,a,r]=e.split("-").map(Number);return new Date(n,(a||1)-1,r||1)}function jo(e){if(e==null||e==="")return"";const n=Za(e);return n?new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(n):""}function pi(e,n){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?n("store.time.justNow","\uBC29\uAE08 \uC804"):l<60?n("store.time.minutesAgo",{n:l}):i<24?n("store.time.hoursAgo",{n:i}):u<7?n("store.time.daysAgo",{n:u}):c<5?n("store.time.weeksAgo",{n:c}):u<365?n("store.time.monthsAgo",{n:Math.min(p,11)}):n("store.time.yearsAgo",{n:h})}function hi(e,n={}){const{sep:a=".",pad:r=!0,trailingDot:s=!1,fallback:l="\u2014"}=n;if(!e)return l;const i=jo(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 Br(e){if(typeof e=="string"){const n=e.trim();return n&&sg(n)?n:null}if(e instanceof Date)return Number.isNaN(e.getTime())?null:e.toISOString();if(typeof e=="number"&&Number.isFinite(e)){const n=new Date(e);return Number.isNaN(n.getTime())?null:n.toISOString()}return null}function pn(e){return typeof e=="string"?e.trim()||null:typeof e=="number"?String(e):null}function pg(e){for(const n of["correct","isCorrect","heard","judgement"])if(typeof e[n]=="boolean")return e[n];return e.score===1?!0:e.score===0?!1:null}function hg(e){return Array.isArray(e)?e.map((n,a)=>{const r=n??{};return{index:a,itemId:pn(r.contextCode)??pn(r.itemId)??pn(r.itemCode)??pn(r.id),question:pn(r.question)??pn(r.q)??pn(r.sentence)??pn(r.text)??pn(r.prompt)??pn(r.word)??pn(r.targetSyllable),answer:pn(r.answer),selected:pn(r.selectedText)??pn(r.selected),correct:pg(r),shownAt:Br(r.shownAt)??Br(r.shown_at),answeredAt:Br(r.answeredAt)??Br(r.answered_at)}}):[]}const Do=globalThis;async function mg(){try{return await Do.__ihabNoiseSettingsStore?.load()??null}catch{return null}}function So(e){const n=a=>{};try{const a=Do.__ihabNoiseSettingsStore?.save(e);a&&typeof a.catch=="function"&&a.catch(n)}catch(a){n(a)}}function kr(e){try{Do.__ihabNoiseSettingsStore?.applied?.(e)}catch{}}async function fg(e){if(typeof document<"u"){const n=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),n&&n!==document.activeElement&&typeof n.focus=="function"&&n.isConnected)try{n.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 n=e.trim();return/^[₩$]/.test(n)?n:/원\s*$/.test(n)?"\u20A9"+n.replace(/\s*원\s*$/,"").trim():n}function mi(e,n){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?n("date.timeH",{h:r,hh:l,mm:a[2]}):n("date.timeHM",{h:r,hh:l,m:s,mm:a[2]})}function To(e){return(e??0).toLocaleString("ko-KR")}const Cg=[{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"}]}],gg=[{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 fi(){return Cg}function bg(){return gg}const yg=[],vg=[],xg=[],_g=[];function wg(){return{LISTEN_IN_NOISE:yg,SHORT_STORY:vg,LONG_STORY:xg,ORDERING_SENTENCE:_g}}const Bg=[{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."}],Ci={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function kg(e){return Bg.map(n=>{const a=Ci[n.key];return a?{...n,label:e(`trainingType.${a}.title`),desc:e(`trainingType.${a}.desc`)}:n})}var Ag={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."},Ng={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"},Eg={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"}},jg={starLabel:"{{n}}\uBC88\uC9F8 \uBCC4 \uC120\uD0DD",valueLabel:"{{max}}\uC810 \uB9CC\uC810\uC5D0 {{value}}\uC810",groupLabel:"\uBCC4\uC810"},Dg={selected:"\uC120\uD0DD\uB428"},Sg={placeholder:"\uC120\uD0DD"},Tg={collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},Mg={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"},$g={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"},Lg={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"}}}},Rg={couponButton:"\uCFE0\uD3F0 \uC785\uB825"},Pg={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."}}},Fg={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:"\uB09C\uC774\uB3C4",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",playSoundFor:"{{name}} \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"}},Ig={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"}}},Og={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"}}}},zg={input:{label:"\uCFE0\uD3F0 \uCF54\uB4DC",placeholder:"\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"},applyButton:"\uC801\uC6A9"},Wg={showN:"{{n}}\uAC1C\uC529"},Hg={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."}},Vg={newBadge:"\uC0C8\uB85C \uB9CC\uB4E0 \uD45C",publishedBadge:"\uBC1C\uD589\uB428",sharedBadge:"\uACF5\uC720 \uC911"},qg={title:"\uC8FC\uC694 \uB2E8\uC5B4",empty:"\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."},Ug={defaultName:"\uB2E8\uC5B4 \uD45C",title:"\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30",subtitle:"\uCE78\uC744 \uC124\uC815\uD558\uACE0 \uB2E8\uC5B4\uB97C \uCD94\uAC00\uD558\uC5EC \uD45C\uB97C \uB9CC\uB4ED\uB2C8\uB2E4.",filterTitle:"\uD45C \uC124\uC815",filter:{composition:"\uAD6C\uC131",image:"\uC774\uBBF8\uC9C0",word:"\uB2E8\uC5B4",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"},Gg={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",agePlus:"{{n}}\uC138 \uC774\uC0C1",ageRange:"{{from}}\uC138~{{to}}\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.",difficultyInfoBandAge:"{{ages}}: {{grade}} \uB0B1\uB9D0\uC744 \uB098\uC774\uBCC4\uB85C \uB098\uB208 \uAC83\uC785\uB2C8\uB2E4.",difficultyInfoBandAgeOne:"{{ages}}: {{grade}} \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",difficultyInfoBandGrade:"{{grade}}: {{ages}} \uB0B1\uB9D0\uC785\uB2C8\uB2E4.",difficultyInfoBandAgeNamed:"{{ages}}: \uB098\uC774\uB85C \uB098\uB208 \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"},Kg={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"},Yg={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"}},Zg={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"}},Xg={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"}},Jg={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."]},Qg={lead:`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
824
824
  \uC2E0\uB8B0\uB97C \uC313\uACE0
825
- \uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`,site:{title:"\uC0AC\uC774\uD2B8",malgwi:"\uB9D0\uADC0",soundDirection:"\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",vrSoundDirection:"VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",hearingTest:"\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C"},sns:{title:"SNS",naverBlog:"\uB124\uC774\uBC84 \uBE14\uB85C\uADF8"},policy:{title:"\uC815\uCC45",terms:"\uC774\uC6A9\uC57D\uAD00",privacy:"\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68"},ceo:"\uB300\uD45C",address:"\uC8FC\uC18C",bizNo:"\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638",support:"\uACE0\uAC1D\uC13C\uD130",ceoName:"\uD55C\uC9C0\uD61C",addressValue:"\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638",bizNoValue:"526-81-02926"},eb={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},tb={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"},nb={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"},rb={ariaLabel:"\uC120\uD0DD \uD0ED"},ab={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"},sb={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},lb={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"}},ib={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"},ub={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"}},cb={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},db={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"},pb={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"},hb={viewWords:"\uB0B1\uB9D0"},mb={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},fb={chooseDate:"\uB0A0\uC9DC \uC120\uD0DD",selectYear:"\uC5F0 \uC120\uD0DD",selectMonth:"\uC6D4 \uC120\uD0DD"},Cb={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},gb={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},bb={place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},yb={clearSelection:"\uC120\uD0DD \uD574\uC81C"},vb={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},xb={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},_b={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},wb={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},Bb={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},kb={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},Ab={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"},Nb={common:Ag,calendar:Ng,passCard:Eg,rating:jg,colorPicker:Dg,dropdown:Sg,accordion:Tg,header:Mg,nav:$g,settings:Lg,usage:Rg,account:Pg,training:Fg,customers:Ig,payment:Og,coupons:zg,visits:Wg,trainingType:Hg,myWordTable:Vg,keyWords:qg,wordTable:Ug,wordSearch:Gg,wordPrint:Kg,topic:Yg,device:Zg,manager:Xg,wordPairs:Jg,footer:Qg,date:eb,wordData:tb,textField:nb,segmentedControl:rb,tabs:ab,fileUpload:ob,avatar:sb,myHomework:lb,trainingStatus:ib,store:ub,progress:cb,trainingMiss:db,table:pb,wordScore:hb,topBanner:mb,datePicker:fb,report:Cb,tooltip:gb,phonemeProfile:bb,bulkBar:yb,debug:vb,badge:xb,loader:_b,soundCompass:wb,breadcrumb:Bb,board:kb,promoBannerBg:Ab},Eb={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."},jb={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"]},Db={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"}},Sb={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},Tb={selected:"selected"},Mb={placeholder:"Select"},$b={collapse:"Collapse",expand:"Expand"},Lb={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},Rb={mainMenu:"Main menu",bottomNav:"Bottom navigation",goToManager:"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"},Pb={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"}}}},Fb={couponButton:"Enter Coupon"},Ib={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."}}},Ob={settings:"Settings",filter:{random:"Random",trainOnset:"Onset",trainVowel:"Vowel",trainCoda:"Coda",phonemeGroup:"Training phonemes",noLimit:"Any",codaExclude:"Exclude",gradeLabel:"Difficulty",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",playSoundFor:"Play {{name}}",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"}},zb={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"}}},Wb={plan:{recommendedFor:"Recommended for",features:"Key Features",freePrice:"Free",contact:"Contact Us",tierFallback:"Plan",openPromo:"Launch offer"},products:{mgrEnterprise:{tier:{price:"Contact us"}}}},Hb={input:{label:"Coupon code",placeholder:"Enter coupon code"},applyButton:"Apply"},Vb={showN:"Show {{n}}"},qb={title:"Training by Type",subtitle:"Select the training type you want",listenInNoise:{title:"Sentence Listening in Noise",desc:"Train sentence comprehension in various noise environments."},shortStory:{title:"Short Story Listening",desc:"Listen to short stories and understand the content."},longStory:{title:"Long Story Listening",desc:"Focus on listening to long stories and grasp the content."},orderingSentence:{title:"Sentence Ordering",desc:"Arrange heard sentences in the correct order."},SAME_SOUND_PICK:{label:"Listen & Pick Same Sound",sub:"Pick the word card that matches what you heard."},SAME_OR_DIFF:{label:"Same or Different?",sub:"Decide whether the two sounds are the same or different."},HEAR_AND_PICK_SAME:{label:"Hear & Match Word",sub:"Pick the word card that matches the sound you heard."},HEAR_AND_PICK_INCLUDED:{label:"Find Word Containing Sound",sub:"Pick the word card that contains the syllable you heard."},STARTS_WITH_SAME_SOUND:{label:"Find Word Starting with Same Sound",sub:"Pick a word that starts with the same sound as what you heard."},LISTEN_AND_REMEMBER_ORDER:{label:"Listen & Recall Order",sub:"Select the cards in the order you heard the three words."},MERGE_2_SYLLABLES:{label:"Combine 2 Syllables",sub:"What word do two syllables make?"},MERGE_3_SYLLABLES:{label:"Combine 3 Syllables",sub:"What word do three syllables make?"},MERGE_2_PHONEMES:{label:"Combine 2 Phonemes",sub:"What sound do two phonemes make?"},MERGE_3_PHONEMES:{label:"Combine 3 Phonemes",sub:"What sound do three phonemes make?"},DROP_1_FROM_2SYLL:{label:"Drop 1 Syllable from 2-Syllable",sub:"What sound remains when you remove a syllable from a 2-syllable word?"},DROP_1_FROM_3SYLL:{label:"Drop 1 Syllable from 3-Syllable",sub:"What sound remains when you remove a syllable from a 3-syllable word?"},DROP_PART_FROM_COMPOUND:{label:"Drop Part of Compound Word",sub:"What word remains when you remove part of a compound word?"},DROP_FINAL_CONSONANT_FROM_1SYLL:{label:"Drop Final Consonant",sub:"What sound remains when you remove the final consonant?"},REMOVE_CONSONANT_AND_IDENTIFY_PHONEME:{label:"Drop Consonant",sub:"What sound remains when you remove the consonant?"},CHANGE_1_SYLL_IN_2SYLL:{label:"Change 1 Syllable (2-Syllable)",sub:"Change one syllable in a 2-syllable word to make a new word."},CHANGE_1_SYLL_IN_3SYLL:{label:"Change 1 Syllable (3-Syllable)",sub:"Change one syllable in a 3-syllable word to make a new word."},CHANGE_1_PHONEME_IN_1SYLL:{label:"Change 1 Phoneme (1-Syllable)",sub:"Change one phoneme in a 1-syllable word to make a new sound."},CHANGE_1_PHONEME_IN_2SYLL:{label:"Change 1 Phoneme (2-Syllable)",sub:"Change one phoneme in a 2-syllable word to make a new word."}},Ub={newBadge:"Newly created",publishedBadge:"Published",sharedBadge:"Shared"},Gb={title:"Key Words",empty:"No key words available."},Kb={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"},Yb={filterTitle:"Word Search Settings",filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Difficulty",grade:"Grade {{n}}",age:"Age {{n}}",agePlus:"Age {{n}}+",ageRange:"Age {{from}}\u2013{{to}}",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.",difficultyInfoBandAge:"{{ages}}: {{grade}} words, split by age.",difficultyInfoBandAgeOne:"{{ages}}: {{grade}} words.",difficultyInfoBandGrade:"{{grade}}: words for {{ages}}.",difficultyInfoBandAgeNamed:"{{ages}}: words split by age.",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"},Zb={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removePairFor:"Remove the pair {{name}}",removeWord:"Remove word",removeWordFor:"Remove {{name}}"},Xb={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"}},Jb={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"}},Qb={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}}"}},ey={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."]},ty={lead:`IHAB builds trust
825
+ \uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`,site:{title:"\uC0AC\uC774\uD2B8",malgwi:"\uB9D0\uADC0",soundDirection:"\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",vrSoundDirection:"VR\uC18C\uB9AC\uBC29\uD5A5\uC131\uC2DC\uC2A4\uD15C",hearingTest:"\uCCAD\uB825\uD14C\uC2A4\uD2B8 \uD504\uB85C"},sns:{title:"SNS",naverBlog:"\uB124\uC774\uBC84 \uBE14\uB85C\uADF8"},policy:{title:"\uC815\uCC45",terms:"\uC774\uC6A9\uC57D\uAD00",privacy:"\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68"},ceo:"\uB300\uD45C",address:"\uC8FC\uC18C",bizNo:"\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638",support:"\uACE0\uAC1D\uC13C\uD130",ceoName:"\uD55C\uC9C0\uD61C",addressValue:"\uAC15\uC6D0\uB3C4 \uCD98\uCC9C\uC2DC \uC2DC\uCCAD\uAE38 32 \uD574\uCC2C\uBE4C\uB529 3\uCE35 302\uD638",bizNoValue:"526-81-02926"},eb={timeHM:"{{h}}\uC2DC {{m}}\uBD84",timeH:"{{h}}\uC2DC"},tb={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"},nb={clearAriaLabel:"\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"},ab={ariaLabel:"\uC120\uD0DD \uD0ED"},rb={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"},sb={ariaLabel:"\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0"},lb={relativeDay:{today:"\uC624\uB298",yesterday:"\uC5B4\uC81C",daysAgo:"{{n}}\uC77C \uC804"}},ib={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"},ub={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"}},cb={steps:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"},db={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"},pb={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"},hb={viewWords:"\uB0B1\uB9D0"},mb={ariaLabel:"\uBC30\uB108",dotAriaLabel:"{{count}}\uAC1C \uC911 {{index}}\uBC88\uC9F8 \uBC30\uB108"},fb={chooseDate:"\uB0A0\uC9DC \uC120\uD0DD",selectYear:"\uC5F0 \uC120\uD0DD",selectMonth:"\uC6D4 \uC120\uD0DD"},Cb={previewRegion:"\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30 \u2014 \uC88C\uC6B0\uB85C \uAD74\uB824 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4"},gb={description:"\uC124\uBA85",textbox:"\uBCF8\uBB38",training:"\uD6C8\uB828 \uC548\uB0B4",menu:"\uBA54\uB274"},bb={place:{labial:"\uC591\uC21C\uC74C",alveolar:"\uCE58\uC870\uC74C",palatal:"\uACBD\uAD6C\uAC1C\uC74C",velar:"\uC5F0\uAD6C\uAC1C\uC74C",glottal:"\uC131\uBB38\uC74C"}},yb={clearSelection:"\uC120\uD0DD \uD574\uC81C"},vb={showResult:"{{type}} \uACB0\uACFC\uBCF4\uAE30"},xb={selected:"\uC120\uD0DD\uB428",remove:"\uC81C\uAC70",exclude:"\uC81C\uC678",nthSelected:"{{n}}\uBC88\uC9F8 \uC120\uD0DD"},_b={loading:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"},wb={state:{active:"\uC18C\uB9AC \uB098\uB294 \uC911",played:"\uB4E4\uC74C",correct:"\uC815\uB2F5",wrong:"\uC624\uB2F5"}},Bb={ariaLabel:"\uC774\uB3D9 \uACBD\uB85C"},kb={empty:"\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."},Ab={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"},Nb={common:Ag,calendar:Ng,passCard:Eg,rating:jg,colorPicker:Dg,dropdown:Sg,accordion:Tg,header:Mg,nav:$g,settings:Lg,usage:Rg,account:Pg,training:Fg,customers:Ig,payment:Og,coupons:zg,visits:Wg,trainingType:Hg,myWordTable:Vg,keyWords:qg,wordTable:Ug,wordSearch:Gg,wordPrint:Kg,topic:Yg,device:Zg,manager:Xg,wordPairs:Jg,footer:Qg,date:eb,wordData:tb,textField:nb,segmentedControl:ab,tabs:rb,fileUpload:ob,avatar:sb,myHomework:lb,trainingStatus:ib,store:ub,progress:cb,trainingMiss:db,table:pb,wordScore:hb,topBanner:mb,datePicker:fb,report:Cb,tooltip:gb,phonemeProfile:bb,bulkBar:yb,debug:vb,badge:xb,loader:_b,soundCompass:wb,breadcrumb:Bb,board:kb,promoBannerBg:Ab},Eb={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."},jb={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"]},Db={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"}},Sb={starLabel:"Select star {{n}}",valueLabel:"{{value}} out of {{max}}",groupLabel:"Rating"},Tb={selected:"selected"},Mb={placeholder:"Select"},$b={collapse:"Collapse",expand:"Expand"},Lb={biArea:"BI area",biSymbol:"BI symbol",logoMalgwi:"Malgwi logo",logoManager:"Malgwi Manager logo",menuOpen:"Open menu",utilMenu:"Utility menu",menuClose:"Close menu"},Rb={mainMenu:"Main menu",bottomNav:"Bottom navigation",goToManager:"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"},Pb={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"}}}},Fb={couponButton:"Enter Coupon"},Ib={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."}}},Ob={settings:"Settings",filter:{random:"Random",trainOnset:"Onset",trainVowel:"Vowel",trainCoda:"Coda",phonemeGroup:"Training phonemes",noLimit:"Any",codaExclude:"Exclude",gradeLabel:"Difficulty",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",playSoundFor:"Play {{name}}",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"}},zb={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"}}},Wb={plan:{recommendedFor:"Recommended for",features:"Key Features",freePrice:"Free",contact:"Contact Us",tierFallback:"Plan",openPromo:"Launch offer"},products:{mgrEnterprise:{tier:{price:"Contact us"}}}},Hb={input:{label:"Coupon code",placeholder:"Enter coupon code"},applyButton:"Apply"},Vb={showN:"Show {{n}}"},qb={title:"Training by Type",subtitle:"Select the training type you want",listenInNoise:{title:"Sentence Listening in Noise",desc:"Train sentence comprehension in various noise environments."},shortStory:{title:"Short Story Listening",desc:"Listen to short stories and understand the content."},longStory:{title:"Long Story Listening",desc:"Focus on listening to long stories and grasp the content."},orderingSentence:{title:"Sentence Ordering",desc:"Arrange heard sentences in the correct order."},SAME_SOUND_PICK:{label:"Listen & Pick Same Sound",sub:"Pick the word card that matches what you heard."},SAME_OR_DIFF:{label:"Same or Different?",sub:"Decide whether the two sounds are the same or different."},HEAR_AND_PICK_SAME:{label:"Hear & Match Word",sub:"Pick the word card that matches the sound you heard."},HEAR_AND_PICK_INCLUDED:{label:"Find Word Containing Sound",sub:"Pick the word card that contains the syllable you heard."},STARTS_WITH_SAME_SOUND:{label:"Find Word Starting with Same Sound",sub:"Pick a word that starts with the same sound as what you heard."},LISTEN_AND_REMEMBER_ORDER:{label:"Listen & Recall Order",sub:"Select the cards in the order you heard the three words."},MERGE_2_SYLLABLES:{label:"Combine 2 Syllables",sub:"What word do two syllables make?"},MERGE_3_SYLLABLES:{label:"Combine 3 Syllables",sub:"What word do three syllables make?"},MERGE_2_PHONEMES:{label:"Combine 2 Phonemes",sub:"What sound do two phonemes make?"},MERGE_3_PHONEMES:{label:"Combine 3 Phonemes",sub:"What sound do three phonemes make?"},DROP_1_FROM_2SYLL:{label:"Drop 1 Syllable from 2-Syllable",sub:"What sound remains when you remove a syllable from a 2-syllable word?"},DROP_1_FROM_3SYLL:{label:"Drop 1 Syllable from 3-Syllable",sub:"What sound remains when you remove a syllable from a 3-syllable word?"},DROP_PART_FROM_COMPOUND:{label:"Drop Part of Compound Word",sub:"What word remains when you remove part of a compound word?"},DROP_FINAL_CONSONANT_FROM_1SYLL:{label:"Drop Final Consonant",sub:"What sound remains when you remove the final consonant?"},REMOVE_CONSONANT_AND_IDENTIFY_PHONEME:{label:"Drop Consonant",sub:"What sound remains when you remove the consonant?"},CHANGE_1_SYLL_IN_2SYLL:{label:"Change 1 Syllable (2-Syllable)",sub:"Change one syllable in a 2-syllable word to make a new word."},CHANGE_1_SYLL_IN_3SYLL:{label:"Change 1 Syllable (3-Syllable)",sub:"Change one syllable in a 3-syllable word to make a new word."},CHANGE_1_PHONEME_IN_1SYLL:{label:"Change 1 Phoneme (1-Syllable)",sub:"Change one phoneme in a 1-syllable word to make a new sound."},CHANGE_1_PHONEME_IN_2SYLL:{label:"Change 1 Phoneme (2-Syllable)",sub:"Change one phoneme in a 2-syllable word to make a new word."}},Ub={newBadge:"Newly created",publishedBadge:"Published",sharedBadge:"Shared"},Gb={title:"Key Words",empty:"No key words available."},Kb={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"},Yb={filterTitle:"Word Search Settings",filter:{positionAny:"Any",positionHead:"Start",positionMid:"Middle",positionTail:"End",difficulty:"Difficulty",grade:"Grade {{n}}",age:"Age {{n}}",agePlus:"Age {{n}}+",ageRange:"Age {{from}}\u2013{{to}}",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.",difficultyInfoBandAge:"{{ages}}: {{grade}} words, split by age.",difficultyInfoBandAgeOne:"{{ages}}: {{grade}} words.",difficultyInfoBandGrade:"{{grade}}: words for {{ages}}.",difficultyInfoBandAgeNamed:"{{ages}}: words split by age.",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"},Zb={clearAllSelection:"Clear All Selections",divLine:"Contrast Line",removePair:"Remove pair",removePairFor:"Remove the pair {{name}}",removeWord:"Remove word",removeWordFor:"Remove {{name}}"},Xb={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"}},Jb={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"}},Qb={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}}"}},ey={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."]},ty={lead:`IHAB builds trust
826
826
  through sound
827
- 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"},ny={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},ry={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"},ay={clearAriaLabel:"Clear input"},oy={ariaLabel:"Select tab"},sy={ariaLabel:"Tabs"},ly={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},iy={ariaLabel:"User avatar"},uy={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},cy={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"},dy={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"}},py={steps:"Step {{current}} of {{total}}"},hy={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"},my={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},fy={viewWords:"Words"},Cy={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},gy={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},by={previewRegion:"Report preview \u2014 scrollable sideways"},yy={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},vy={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},xy={clearSelection:"Clear selection"},_y={showResult:"Show {{type}} result"},wy={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},By={loading:"Loading"},ky={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},Ay={ariaLabel:"Breadcrumb"},Ny={empty:"No items yet."},Ey={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"},jy={common:Eb,calendar:jb,passCard:Db,rating:Sb,colorPicker:Tb,dropdown:Mb,accordion:$b,header:Lb,nav:Rb,settings:Pb,usage:Fb,account:Ib,training:Ob,customers:zb,payment:Wb,coupons:Hb,visits:Vb,trainingType:qb,myWordTable:Ub,keyWords:Gb,wordTable:Kb,wordSearch:Yb,wordPrint:Zb,topic:Xb,device:Jb,manager:Qb,wordPairs:ey,footer:ty,date:ny,wordData:ry,textField:ay,segmentedControl:oy,tabs:sy,fileUpload:ly,avatar:iy,myHomework:uy,trainingStatus:cy,store:dy,progress:py,trainingMiss:hy,table:my,wordScore:fy,topBanner:Cy,datePicker:gy,report:by,tooltip:yy,phonemeProfile:vy,bulkBar:xy,debug:_y,badge:wy,loader:By,soundCompass:ky,breadcrumb:Ay,board:Ny,promoBannerBg:Ey};const Dy="0.437.0",Sy=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],Mo="ko",Ty="ihab_display_language";function gi(){if(typeof window>"u")return Mo;try{const e=localStorage.getItem(Ty);if(e&&Sy.some(n=>n.code===e))return e}catch{}return Mo}function bi(e){try{document.documentElement.lang=e}catch{}}Jt.on("languageChanged",bi),bi(gi()),Jt.use(Ee.initReactI18next).init({resources:{ko:{translation:Nb},en:{translation:jy}},lng:gi(),fallbackLng:Mo,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const My=99,$y=new Map;try{Jt.store?.on?.("added",()=>$y.clear())}catch{}Array.from({length:My},(e,n)=>n+1);let Aa=null,yi=null,vi=null;function Ly(){const e=si();if(e&&e.entries.length>0){const n=qC();if(Aa&&yi===e&&vi===n)return Aa;const r=new Set,a=[];for(const s of e.entries)!s.word||r.has(s.word)||(r.add(s.word),a.push({w:s.word,s:s.syllables,p:n?.[s.word]?[...n[s.word].cho??[],...n[s.word].jung??[],...n[s.word].jong??[]]:[],pron:s.pronunciation||s.word,grade:s.grade}));return Aa=a,yi=e,vi=n,Aa}return[]}new Proxy([],{get(e,n){const r=Ly(),a=r[n];return typeof a=="function"?a.bind(r):a}});function Ry(e){if(e.includes("\\")&&e.includes("("))return!0;if(!/url\s*\(/i.test(e))return!1;const n=e.replace(/url\(\s*(['"]?)#[^)'"]*\1\s*\)/gi,"");return/url\s*\(/i.test(n)}function Py(e){if(typeof window>"u")return"";const n=(r,a)=>{typeof a.attrValue=="string"&&Ry(a.attrValue)&&(a.keepAttr=!1)};xr.addHook("uponSanitizeAttribute",n);try{return xr.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{xr.removeHook("uponSanitizeAttribute",n)}}function Fy(e){const[n,r]=o.useState(null),[a,s]=o.useState(null),[l,i]=o.useState(null),[c,u]=o.useState(null),[p,h]=o.useState(null);return o.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){r(null),s(null),i(null),u(null);return}const d=e.split("/").pop();let m=e;d&&(e.startsWith("/")?m=vo(e):/^(Logo|Symbol)/i.test(d)?m=vo(`logo/${d}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),m=e)),i(null),u(null),r(e),s(m)},[e]),o.useEffect(()=>{if(!a)return;let d=!1;async function m(){try{let C=await fetch(a);C.ok||(C=await fetch(a));const x=C.headers.get("content-type")||"";if(d)return;if(x.includes("svg")){i("mask");return}if(x.startsWith("image/")){i("img");return}const y=await fetch(a);if(!y.ok)throw new Error("not ok");const b=await y.text();if(d)return;if(/^\s*<svg[\s>]/i.test(b)){const v=Py(b);if(!v){i("none");return}u(v),i("inline");return}i("none")}catch{d||i("none")}}return m(),()=>{d=!0}},[a]),o.useEffect(()=>{let d=!1,m=null;return l==="mask"&&a&&fetch(a).then(C=>{if(!C.ok)throw new Error("fetch failed");return C.blob()}).then(C=>{d||(m=URL.createObjectURL(C),h(m))}).catch(()=>{d||i("img")}),()=>{d=!0,m&&URL.revokeObjectURL(m),h(null)}},[l,a]),n===e?{iconToUse:a,mode:l,svgText:c,blobUrl:p}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function dt(e){const{icon:n,label:r,className:a,imgClassName:s,maskClassName:l,svgClassName:i,wrapperStyle:c,size:u}=e||{},p=a??"iconRenderer-icon",h=s??"iconRenderer-icon-image",d=l??"iconRenderer-icon-mask",m=i??"iconRenderer-icon-svg",C=typeof n=="string"?n:null,x=kf(C),{iconToUse:y,mode:b,svgText:v,blobUrl:_}=Fy(C),g=(B,E={})=>t.jsx("span",{className:p,style:c,...E,children:B}),w=typeof u=="number"?{width:u,height:u,objectFit:"contain"}:null,N=(B,E={})=>t.jsx("img",{src:B,alt:typeof r=="string"?r:typeof r=="number"?String(r):"",className:h,...E,style:w?{...E.style,...w}:E.style});if(!n)return null;if(typeof n!="string")return g(n);if(n==="none")return g(t.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(x)try{return g(o.createElement(x,{className:m,size:typeof u=="number"?u:20}),{"aria-hidden":"true"})}catch{}if(y&&y.endsWith(".svg")){if(b==="mask"){const B={"--icon-url":_?`url(${_})`:`url(${y})`,...typeof u=="number"?{"--icon-size":`${u}px`}:null};return g(t.jsx("span",{className:d,style:B}),{"aria-hidden":"true"})}return b==="img"?g(N(y,{onError:B=>{B.currentTarget.onerror=null,B.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):b==="inline"?g(t.jsx("span",{className:m,dangerouslySetInnerHTML:v?{__html:v}:void 0}),{"aria-hidden":"true"}):g(null,{"aria-hidden":"true"})}if(n.startsWith("/")||n.includes("/assets/")||n.match(/\.(png|jpg|jpeg|webp|gif)$/i))return N(vo(n),{style:c,onError:B=>{B.currentTarget.onerror=null,B.currentTarget.style.display="none"}});const f=typeof u=="number"?u:20,A=`<svg width="${f}" height="${f}" 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 g(t.jsx("span",{className:m,dangerouslySetInnerHTML:{__html:A}}),{"aria-hidden":"true"})}function xi(e){const[n,r]=o.useState(!1),a=o.useRef(!1),s=o.useRef(!0);o.useEffect(()=>(s.current=!0,()=>{s.current=!1}),[]);const l=o.useCallback(()=>{if(!e||a.current)return;const i=e();if(i&&typeof i.then=="function"){a.current=!0,r(!0);const c=()=>{a.current=!1,s.current&&r(!1)};i.then(c,c)}},[e]);return{pending:n,press:l}}function Iy({icon:e,title:n,message:r,action:a,className:s}){const{pending:l,press:i}=xi(a?.onClick);return t.jsxs("div",{className:ke("empty-state",s),children:[e&&t.jsx(dt,{icon:e,size:48,className:"empty-state__icon"}),n&&t.jsx("p",{className:"empty-state__title h4",children:n}),r&&t.jsx("p",{className:"empty-state__message body-3",children:r}),a&&t.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:[a.icon&&t.jsx(dt,{icon:a.icon,className:"button__icon"}),t.jsx("span",{className:"button__label button-1",children:a.label})]})]})}function Oy({message:e,hint:n,icon:r="triangle-alert",onRetry:a,retryLabel:s,className:l}){const{t:i}=Ee.useTranslation(),{pending:c,press:u}=xi(a);return t.jsxs("div",{className:ke("empty-state","error-state",l),role:"alert",children:[t.jsx(dt,{icon:r,size:48,className:"empty-state__icon error-state__icon"}),t.jsx("p",{className:"empty-state__message body-3",children:e??i("common.errorState.message",{defaultValue:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."})}),n&&t.jsx("p",{className:"error-state__hint caption-1",children:n}),a&&t.jsxs("button",{type:"button",className:"empty-state__action button button40 button40--bar button--variant-main button--align-center button--shape-rounded",onClick:u,disabled:c,"aria-busy":c||void 0,children:[t.jsx(dt,{icon:"rotate-cw",className:"button__icon"}),t.jsx("span",{className:"button__label button-1",children:s??i("common.errorState.retry",{defaultValue:"\uB2E4\uC2DC \uC2DC\uB3C4"})})]})]})}function zy({icon:e,title:n,description:r,cta:a,tone:s="main",disabled:l=!1,onClick:i,className:c=""}){const u=o.useId(),p=`${u}-title`,h=`${u}-desc`,d=`${u}-cta`,m=()=>{l||i?.()};return t.jsx("section",{role:"button",tabIndex:l?-1:0,"aria-disabled":l||void 0,"aria-labelledby":p,"aria-describedby":`${h} ${d}`,onClick:m,onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),m())},className:ke("action-card",`action-card--${s}`,l&&"action-card--disabled",c),children:t.jsxs("div",{className:"action-card__body",children:[t.jsx("span",{"aria-hidden":!0,className:"action-card__chip",children:t.jsx(dt,{icon:e,size:34})}),t.jsxs("div",{className:"action-card__text",children:[t.jsx("h2",{id:p,className:"action-card__title",children:n}),t.jsx("p",{id:h,className:"action-card__desc",children:r})]}),t.jsxs("div",{className:"action-card__cta",children:[t.jsx("span",{id:d,children:a}),t.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:t.jsx(dt,{icon:"arrow-right",size:18})})]})]})})}function Wy({as:e="div",className:n="",children:r,storage:a,...s}){a&&pC({resolveUrl:a.resolveUrl,download:a.download??(()=>Promise.reject(new Error("[ihabdevteam-core] CoreScope: download resolver\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."))),exists:a.exists,resolvePath:a.resolvePath,noiseBaseUrl:a.noiseBaseUrl,noiseFileGain:a.noiseFileGain});const l=ke("ihabdevteam-core-scope",n);return t.jsx(e,{className:l,...s,children:r})}function Hy(e){if(e.closest('[aria-hidden="true"], [hidden], [inert]'))return!1;for(let n=e;n;n=n.parentElement){const r=window.getComputedStyle(n);if(r.display==="none"||r.visibility==="hidden"||r.visibility==="collapse")return!1}return!0}function $o(e,n=!0){o.useEffect(()=>{if(!n)return;const r=e.current;if(!r)return;const a=s=>{if(s.key!=="Tab")return;const l=Array.from(r.querySelectorAll($n)).filter(Hy);if(!l.length){s.preventDefault();return}const i=l[0],c=l[l.length-1],u=document.activeElement,p=u===r;s.shiftKey&&(u===i||p)?(s.preventDefault(),c.focus()):!s.shiftKey&&u===c&&(s.preventDefault(),i.focus())};return r.addEventListener("keydown",a),()=>r.removeEventListener("keydown",a)},[e,n])}const $n='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',Lo=new WeakMap;function Ro(e,n){e&&Lo.set(e,n)}function Po(e){let n=e;for(let r=0;n&&!n.isConnected&&r<10;r++){let a=n;for(;a&&!Lo.has(a);)a=a.parentElement;if(!a)return n;n=Lo.get(a)??null}return n}function _i(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 Na(e,n,r){const a=e?.isConnected?e:r?.isConnected?r:null;if(_i(n)&&!(e&&e.contains(n)))return n.focus(),n;if(!a)return null;const s=Array.from(document.querySelectorAll($n)).filter(u=>!(e&&e.contains(u))&&_i(u));let l=null,i=null;for(const u of s)a.compareDocumentPosition(u)&Node.DOCUMENT_POSITION_PRECEDING?l=u:i||(i=u);const c=l??i;return c?.focus(),c}function Vy({title:e="",lines:n=[],notices:r=null,children:a,variant:s="default",dismissible:l=!1,className:i=""}){const{t:c}=Ee.useTranslation(),[u,p]=o.useState(!1),h=o.useRef(null),d=o.useCallback(()=>{const y=h.current;y&&y.contains(document.activeElement)&&Na(y),p(!0)},[]);if(u)return null;const m=`notice-box notice-box--${s} body-2 ${i}`.trim(),C=l&&t.jsx("button",{type:"button",className:"notice-box__dismiss",onClick:d,"aria-label":c("common.close","\uB2EB\uAE30"),children:"\xD7"});if(r&&Array.isArray(r)&&r.length)return t.jsxs("div",{className:m,role:"note",children:[r.map((y,b)=>t.jsxs("div",{className:"notice-box__inner",children:[y.title?t.jsx("span",{className:"notice-box__title body-3",children:y.title}):null,t.jsx("div",{className:"notice-box__body",children:y.lines&&y.lines.length?t.jsx("div",{children:y.lines.map((v,_)=>t.jsx("span",{className:"notice-box__line body-3",children:v},_))}):y.children??null})]},b)),C]});const x=e||n.length?t.jsxs("div",{className:"notice-box__inner",children:[e?t.jsx("span",{className:"notice-box__title body-1",children:e}):null,t.jsx("div",{className:"notice-box__body",children:n.length?t.jsx("ul",{children:n.map((y,b)=>t.jsx("li",{className:"notice-box__line",children:y},b))}):a})]}):t.jsx("div",{className:"notice-box__inner",children:a});return t.jsxs("div",{ref:h,className:m,role:"note",children:[x,C]})}const Fo=o.createContext(void 0);function _n(){return o.useContext(Fo)}const qy={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function kr(e){const{t:n}=Ee.useTranslation(),{variant:r="spinner",size:a=24,progress:s=null,label:l}=e||{},i=l||n("loader.loading","Loading");if(r==="bar"){const u=s==null||!Number.isFinite(Number(s)),p=u?0:Math.max(0,Math.min(100,Number(s)));return t.jsx("div",{className:`loader-bar${u?" loader-bar--indeterminate":""}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":u?void 0:p,"aria-label":i,children:t.jsx("div",{className:"loader-bar__inner",style:u?void 0:{width:`${p}%`}})})}const c=typeof a=="number"?`${a}px`:a;return t.jsxs("div",{className:"loader-spinner",style:{width:c,height:c},role:"status","aria-label":i,children:[t.jsx("span",{style:qy,children:i}),t.jsxs("svg",{className:"loader-spinner__svg",viewBox:"0 0 50 50",width:a,height:a,children:[t.jsx("circle",{className:"loader-spinner__bg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4"}),t.jsx("circle",{className:"loader-spinner__fg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4",strokeLinecap:"round"})]})]})}const Ar=[];let Ea=!1;function wi(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const n=Ar[Ar.length-1];n&&(e.stopPropagation(),n())}function lr(e){return Ar.push(e),!Ea&&typeof document<"u"&&(document.addEventListener("keydown",wi),Ea=!0),()=>{const n=Ar.lastIndexOf(e);n>=0&&Ar.splice(n,1),Ar.length===0&&Ea&&typeof document<"u"&&(document.removeEventListener("keydown",wi),Ea=!1)}}const Bi=o.createContext(null);function Uy(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const ki=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function Gy(e){const n=o.useCallback(r=>{if(typeof window>"u"||!window.matchMedia)return()=>{};const a=window.matchMedia(e);return a.addEventListener?a.addEventListener("change",r):a.addListener&&a.addListener(r),()=>{a.removeEventListener?a.removeEventListener("change",r):a.removeListener&&a.removeListener(r)}},[e]);return tl.useSyncExternalStore(n,()=>ki(e),()=>!1)}function Ky(e){const[n,r]=o.useState(ki(e));return o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const a=window.matchMedia(e),s=i=>r(i.matches),l=a;return l.addEventListener?l.addEventListener("change",s):l.addListener&&l.addListener(s),r(a.matches),()=>{l.removeEventListener?l.removeEventListener("change",s):l.removeListener&&l.removeListener(s)}},[e]),n}const Yy=typeof tl.useSyncExternalStore=="function"?Gy:Ky;function wn(e){const n=o.useContext(Bi),r=Yy(e);return n&&typeof n.mobile=="boolean"&&Uy(e)?n.mobile:r}const Zy="(prefers-reduced-motion: reduce)";function ja(){return wn(Zy)}const Ai={"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 Xy(e,n){const r=Object.keys(e).sort((a,s)=>s.length-a.length);for(const a of r){if(!n.startsWith(a))continue;const s=n.slice(a.length);if(!(s!==""&&!s.startsWith("__")&&!s.startsWith("--")))return e[a]+s}return null}function Jy(e){return Xy(Ai,e)}function le(e){if(!e||Object.keys(Ai).length===0)return e;const n=[];for(const r of e.split(/\s+/)){if(!r)continue;const a=Jy(r);a&&n.push(a)}return n.length?`${e} ${n.join(" ")}`:e}function En(e){const{anchorRect:n,anchorEl:r,offset:a=20,edgeMargin:s=20,onClose:l,closeOnOutsideClick:i=!0,className:c="",role:u="dialog",ariaLabel:p="",children:h,backdrop:d=!1,isMobilePopup:m=!1,useBorder:C=!0,header:x,focusOnOpen:y}=e||{},b=o.useRef(null),[v,_]=o.useState({position:"fixed",left:0,top:-9999}),[g,w]=o.useState(!1),[N,f]=o.useState("bottom"),[A,B]=o.useState(!1),[E,k]=o.useState(!1),j=!n&&!r,S=o.useRef(null),$=o.useCallback((L=!1,J=!1)=>{if(E&&m)return;const ee=r?r.getBoundingClientRect():n,q=J&&S.current?S.current:ee;if(!q||!b.current)return;const P=b.current,{offsetWidth:R,offsetHeight:D}=P,H=window.innerWidth,ne=window.innerHeight,te=H-q.right,ue=q.left,se=q.top,pe=ne-q.bottom;let G=0,K=0,O="top";if(se>=D+a)O="top",K=q.top-a-D,G=q.left+q.width/2-R/2;else if(pe>=D+a)O="bottom",K=q.bottom+a,G=q.left+q.width/2-R/2;else if(te>=R+a)O="right",G=q.right+a,K=q.top+q.height/2-D/2;else if(ue>=R+a)O="left",G=q.left-a-R,K=q.top+q.height/2-D/2;else{const re=Math.max(se,pe,te,ue);re===se?(O="top",K=q.top-a-D,G=q.left+q.width/2-R/2):re===pe?(O="bottom",K=q.bottom+a,G=q.left+q.width/2-R/2):re===te?(O="right",G=q.right+a,K=q.top+q.height/2-D/2):(O="left",G=q.left-a-R,K=q.top+q.height/2-D/2)}const I=Number.isFinite(Number(s))?Number(s):8;G=Math.min(Math.max(G,I),H-R-I),K=Math.min(Math.max(K,I),ne-D-I);const ae=Math.round(G),he=Math.round(K);L&&b.current?(b.current.style.left=`${ae}px`,b.current.style.top=`${he}px`,b.current.dataset.placement=O):(f(O||N),_({position:"fixed",left:ae,top:he}),B(!0))},[E,m,r,n,a,s,N]);o.useEffect(()=>()=>{S.current=null},[r,n]),o.useLayoutEffect(()=>{if(j)return;if(E&&m){_({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),B(!0);return}S.current===null&&(S.current=r?r.getBoundingClientRect():n??null),$(!1,!0);const L=requestAnimationFrame(()=>$(!1,!0));return()=>cancelAnimationFrame(L)},[n,r,a,h,s,j,E,m,$]),o.useEffect(()=>{if(j||E&&m||!b.current||typeof ResizeObserver>"u")return;const L=new ResizeObserver(()=>{n&&$()});return L.observe(b.current),()=>L.disconnect()},[n,h,s,j,E,m,$]),o.useEffect(()=>{if(j||E&&m)return;let L=null;const J=()=>{if(r&&(S.current=r.getBoundingClientRect()),typeof requestAnimationFrame>"u"){$(!0);return}L===null&&(L=requestAnimationFrame(()=>{L=null,$(!0)}))},ee=q=>{if(!r&&l){const P=q.target;if(P&&b.current&&b.current.contains(P))return;try{if(P&&P.closest&&P.closest("[data-tooltip-ignore]"))return}catch{}z.current(!0);return}J()};return window.addEventListener("resize",J),document.addEventListener("scroll",ee,{passive:!0,capture:!0}),()=>{L!==null&&cancelAnimationFrame(L),window.removeEventListener("resize",J),document.removeEventListener("scroll",ee,{capture:!0})}},[n,r,l,a,h,s,j,E,m,$]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const L=window.matchMedia("(max-width: 768px)"),J=()=>k(!!L.matches);J();try{L.addEventListener?L.addEventListener("change",J):L.addListener(J)}catch{try{L.addListener(J)}catch{}}return()=>{try{L.removeEventListener?L.removeEventListener("change",J):L.removeListener(J)}catch{}}},[]);const V=o.useRef(!1),F=o.useRef(null),U=ja(),T=o.useCallback((L=!1)=>{if(l&&!(g||V.current)){if(V.current=!0,L){w(!0);try{l&&l()}catch{V.current=!1,w(!1)}return}w(!0),F.current=setTimeout(()=>{F.current=null;try{l&&l()}catch{V.current=!1,w(!1)}},U?0:200)}},[g,l,w,U]);o.useEffect(()=>()=>{F.current&&clearTimeout(F.current)},[]),o.useEffect(()=>{if(j)return;const L=q=>{const P=b.current;if(!P)return;const R=q.target;if(R&&!P.contains(R)){try{if(R.closest&&R.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},J=q=>{const P=b.current;if(!P)return;const R=q.target;if(R&&!P.contains(R)){try{if(R.closest&&R.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},ee=q=>{if(q.key==="Tab"){const P=b.current;if(!P)return;const R=P.querySelectorAll($n);if(!R||R.length===0)return;const D=R[0],H=R[R.length-1],ne=document.activeElement;q.shiftKey?ne===D&&(q.preventDefault(),H.focus()):ne===H&&(q.preventDefault(),D.focus())}};return document.addEventListener("pointerdown",L,!0),document.addEventListener("click",J,!0),document.addEventListener("keydown",ee),()=>{document.removeEventListener("pointerdown",L,!0),document.removeEventListener("click",J,!0),document.removeEventListener("keydown",ee)}},[l,i,T,j]);const z=o.useRef(T);o.useEffect(()=>{z.current=T});const W=!!l;o.useEffect(()=>{if(!(j||!W))return lr(()=>z.current())},[j,W]),o.useEffect(()=>{const L=()=>{T(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",L),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",L)}},[T]);const ie=o.useRef(null);o.useEffect(()=>{if(j||y===!1||!A)return;const L=b.current;if(!L)return;const J=L.querySelector($n);if(J)return ie.current=document.activeElement,J.focus({preventScroll:!0}),()=>{const ee=ie.current;ie.current=null,ee&&document.contains(ee)&&ee.focus({preventScroll:!0})}},[j,y,A]),o.useEffect(()=>{u==="dialog"&&!p&&jt("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.')},[u,p]);const Q=t.jsxs("div",{ref:b,className:le(`tooltip__content ${j?"tooltip__content--inline":""} ${C?"tooltip__content--bordered":""} ${g?"is-closing":""} ${c} ${E&&m?"is-mobile":""}`),role:u,"aria-label":p||void 0,style:j?{}:{...v,visibility:A?"visible":"hidden"},tabIndex:-1,"data-placement":N,"data-left":j?"":v.left,"data-top":j?"":v.top,"data-anchor-left":n?Math.round(n.left):"","data-anchor-top":n?Math.round(n.top):"","data-anchor-width":n?Math.round(n.width):"","data-anchor-height":n?Math.round(n.height):"",children:[x!=null&&t.jsx("div",{className:le("tooltip__header h5"),children:x}),h]});if(j||typeof document>"u")return Q;if(d||E&&m){const L=t.jsxs("div",{className:le("tooltip__portal"),children:[t.jsx("div",{className:le("tooltip__backdrop"),onClick:()=>{i&&T(!0)}}),Q]});return gn.createPortal(L,document.body)}return gn.createPortal(Q,document.body)}function zn(e){const{anchorRect:n,text:r,offset:a=8,onClose:s,className:l="",ariaLabel:i}=e||{};return r?t.jsx(En,{anchorRect:n,offset:a,onClose:s,closeOnOutsideClick:!1,className:le(`info-tooltip ${l}`),ariaLabel:i||r,children:t.jsx("div",{className:le("info-tooltip__content body-3"),children:r})}):null}function Qn(e){const{t:n}=Ee.useTranslation(),{anchorRect:r,title:a,items:s,activeIndex:l=-1,showIndex:i=!0,onClose:c,offset:u=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&&!a?null:t.jsx(En,{anchorRect:r,offset:u,onClose:c,closeOnOutsideClick:p,useBorder:!1,className:le("description-tooltip"),ariaLabel:a||n("tooltip.description","\uC124\uBA85"),children:t.jsxs("div",{className:le("description-tooltip__box"),children:[a&&t.jsx("span",{className:le("description-tooltip__title body-2"),children:a}),t.jsx("ol",{className:le(`description-tooltip__items${h&&h>1?" description-tooltip__items--columns":""}`),style:h&&h>1?{columnCount:h}:void 0,children:d.map((m,C)=>t.jsxs("li",{className:le(`description-tooltip__item body-3${C===l?" description-tooltip__item--active":""}`),children:[i&&d.length>1&&t.jsxs("span",{className:le("description-tooltip__index button-1"),children:[C+1,"."]}),m.color&&t.jsx("span",{className:le("description-tooltip__dot"),style:{background:m.color},"aria-hidden":"true"}),t.jsx("span",{children:m.text})]},C))})]})})}function Xr(e){const n=o.useRef(e);return o.useEffect(()=>{n.current=e}),n}let Io=0,Ni=!1;function Ei(){Ni||typeof document>"u"||(Ni=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(Io=Date.now())},!0),document.addEventListener("touchstart",()=>{Io=Date.now()},{capture:!0,passive:!0}))}Ei();function er(e){return!!e&&e.pointerType==="touch"}function ir(e=1e3){return Ei(),Date.now()-Io<e}function Da(e,n,r,{enabled:a=!0,fallbackOnParent:s=!1}={}){const l=Xr(e),i=Xr(n),c=o.useRef(null),u=o.useRef(0);o.useEffect(()=>{if(!a||typeof document>"u")return;const h=d=>{const m=d,C=d.target,x=r.current,y=!!(C&&x&&x.contains(C));if(m.pointerType!=="touch"){y&&(c.current=null);return}if(y){c.current=l.current;return}c.current=null,l.current&&!(C&&C.closest?.(".tooltip__content"))&&i.current(!1,x)};return document.addEventListener("pointerdown",h,!0),()=>document.removeEventListener("pointerdown",h,!0)},[a,r,l,i]);const p=o.useCallback(h=>{const d=c.current;return d===null?!1:(c.current=null,u.current=Date.now(),i.current(!d,h??r.current),!0)},[r,i]);return o.useEffect(()=>{if(!a||!s)return;const h=r.current,d=h?.parentElement;if(!h||!d)return;let m=null;const C=b=>{const v=b.changedTouches?.[0];if(!v)return!1;const _=h.getBoundingClientRect();return v.clientX>=_.left&&v.clientX<=_.right&&v.clientY>=_.top&&v.clientY<=_.bottom},x=b=>{m=C(b)?l.current:null},y=b=>{const v=m;m=null,!(v===null||Date.now()-u.current<700||!C(b))&&(c.current=null,u.current=Date.now(),i.current(!v,h))};return d.addEventListener("touchstart",x,{passive:!0}),d.addEventListener("touchend",y),()=>{d.removeEventListener("touchstart",x),d.removeEventListener("touchend",y)}},[a,s,r,l,i]),{touchPress:p}}function Qy(e,n){const{size:r,type:a,htmlType:s,href:l,target:i,rel:c,icon:u,rightIcon:p,label:h,count:d,subLabel:m,children:C,ariaLabel:x,variant:y="default",align:b="center",nowrap:v=!1,ellipsis:_=!1,selected:g,toggleable:w=!1,ariaExpanded:N,ariaControls:f,disabled:A=!1,loading:B=!1,useLabel:E=!0,useBorder:k=!0,useBG:j=!0,useDisabledCovered:S=!1,useDisabledInvisible:$=!1,useDisabledFilled:V=!1,width:F,minWidth:U,onClick:T,onDisabledClick:z,showTooltipInfo:W=!1,tooltipInfoText:ie=null,tooltipDescription:Q=null,tooltipOnly:L=!1,iconSize:J="medium",iconColor:ee,shape:q="rounded",color:P,className:R,...D}=e,H=_n(),ne=r??H??48,te=typeof ne=="string"&&isNaN(Number(ne))?ne.toLowerCase():String(Number(ne)||48),ue=te.match(/^\d+$/)?`button${te}`:`button-${te}`,se=Number(ne),pe=!isNaN(se)&&se<40?"button-2":"button-1",G=h??C,K=A||!!D.disabled,O=K?S?"disabled-covered":$?"disabled-invisibled":V?"disabled-filled":"disabled":y,I=O?`button--variant-${O}`:"",ae=b?`button--align-${b}`:"",he=v?"button--nowrap":"",re=_?"button--ellipsis":"",_e=q?`button--shape-${q}`:"",De=typeof ee=="string"&&ee.startsWith("--")?`var(${ee})`:ee,Se={...F?{width:typeof F=="number"?`${F}px`:F}:{},...U?{minWidth:typeof U=="number"?`${U}px`:U}:{},...k?{}:{"--button-border":K?"0":"1px solid transparent"},...De?{"--button-icon-color":De}:{},...P?{"--color-main":P}:{}},Ne=E===!1?"":G,He=Array.isArray(Ne)?Ne.length>0:!!Ne,ve=!!p,xe=a??(He||u||ve?"bar":"dot"),we=`${ue}--${xe}`,Ae=o.useRef(null);o.useEffect(()=>{!Yn||s!==void 0||Ae.current?.closest("form")&&jt(`button-in-form:${typeof G=="string"?G:""}`,'[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 G=="string"&&G?` \uB2E8\uCD94: ${G}`:""))},[s,G]);const Ie=o.useRef(n);Ie.current=n;const ot=o.useCallback(Ke=>{Ae.current=Ke;const Ct=Ie.current;typeof Ct=="function"?Ct(Ke):Ct&&(Ct.current=Ke)},[]),pt=o.useRef(K),[Oe,Ue]=o.useState(!!g),[rt,ce]=o.useState(!1),[Pe,Ye]=o.useState(null),Qe=o.useCallback(()=>ce(!1),[]),[ut,vt]=o.useState(!1),ct=o.useId();o.useEffect(()=>{typeof g=="boolean"&&Ue(g)},[g]),o.useEffect(()=>{if(pt.current&&!K&&Ae.current){const Ke=Ae.current;let Ct=!1;try{Ct=Ke.matches(":focus:not(:focus-visible)")}catch{Ct=!1}Ct&&Ke.blur(),Ke.style.pointerEvents="none";const Bt=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Ae.current&&(Ae.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(Bt)}pt.current=K},[K]);const Gt=typeof g=="boolean"?!!g:Oe,xt=typeof N=="boolean"?void 0:w||typeof g=="boolean"?Gt?"true":"false":D["aria-pressed"],lt=ke("button",ue,we,I,ae,he,re,_e,Gt?"is-selected":null,j?null:"button--no-bg",L?"button--tooltip-only":null,R),st=`button__icon button__icon--${J}`,Ot=Array.isArray(m)?m:m!==void 0?[m]:[],Mt=()=>{if(Array.isArray(Ne))return Ne.map((Ct,Bt)=>{const X=Ot[Bt];return t.jsxs("span",{className:`button__label-text${X!==void 0?" button__label-text--has-sub":""}`,children:[Ct,X!==void 0&&t.jsx("span",{className:"button__sub-label-text caption-1",children:X})]},Bt)});const Ke=m!==void 0;return t.jsxs("span",{className:`button__label-text${Ke?" button__label-text--has-sub":""}`,children:[Ne,d!=null&&t.jsx("span",{className:"button__count",children:d}),Ke&&t.jsx("span",{className:"button__sub-label-text caption-1",children:m})]})},Nt=Ke=>{typeof g!="boolean"&&!w&&Ue(!1),Ke.currentTarget.blur()},Ft=Ke=>{K||(typeof D.onMouseLeave=="function"&&D.onMouseLeave(Ke),Nt(Ke))},zt=Ke=>{if(L&&Et&&It.touchPress(Ke.currentTarget),K){Et&&It.touchPress(Ke.currentTarget),Ke.preventDefault(),z?.(Ke);return}typeof g!="boolean"&&w&&Ue(Ct=>!Ct),T?.(Ke)},_t=o.useCallback(()=>{(W||Q)&&(ce(!0),Ye(Ae.current?.getBoundingClientRect()??null))},[W,Q]),gt=o.useCallback(()=>{(W||Q)&&(ce(!1),Ye(null))},[W,Q]),Et=!!(W||Q),It=Da(rt,Ke=>{Ke?_t():gt()},Ae,{enabled:Et&&(K||L),fallbackOnParent:Et&&K}),et={...D};delete et.disabled,delete et.className,delete et.faded,delete et.useFaded,delete et.loading,delete et.onMouseLeave,delete et.onPointerEnter,delete et.onPointerLeave,delete et.onPointerUp,delete et.onFocus,delete et.onBlur,K&&(Object.keys(et).forEach(Ke=>{/^on[A-Z]/.test(Ke)&&typeof et[Ke]=="function"&&delete et[Ke]}),et["aria-disabled"]="true"),B&&(et["aria-busy"]="true");const wt=(typeof W=="string"?W:null)??(typeof ie=="string"?ie:null)??(typeof x=="string"?x:null)??(typeof G=="string"?G:null)??void 0,tt=typeof x=="string"?x:typeof G=="string"?G:wt,fe=Q?[Q.title,...Q.items??[]].filter(Boolean).join(". "):W&&wt&&wt!==tt?wt:"",$e=[typeof D["aria-describedby"]=="string"?D["aria-describedby"]:void 0,fe?ct:null].filter(Boolean).join(" ")||void 0,Re=()=>t.jsx("span",{className:`${st} button__spinner`,"aria-hidden":"true",children:t.jsx(kr,{variant:"spinner",size:"100%"})}),ze=(Ke,Ct)=>t.jsx(dt,{icon:Ke,label:Ct??tt,className:st,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),it=Ke=>B?Re():ze(u,Ke),on=()=>xe==="dot"?t.jsxs(t.Fragment,{children:[it(),He&&t.jsx("span",{className:`button__label ${pe}`,children:Mt()})]}):b==="center"&&(u||B)?t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"button__center-group",children:[t.jsx("span",{className:"button__left",children:it()}),He&&t.jsx("span",{className:`button__label ${pe}`,children:Mt()})]}),ve&&t.jsx("span",{className:"button__right",children:ze(p)})]}):t.jsxs(t.Fragment,{children:[(u||B)&&t.jsx("span",{className:"button__left",children:it(x??G)}),He&&t.jsx("span",{className:`button__label ${pe}`,children:Mt()}),ve&&t.jsx("span",{className:"button__right",children:ze(p)})]}),ht=!!l&&!K;return t.jsxs(t.Fragment,{children:[t.jsxs(ht?"a":"button",{...et,ref:ot,...ht?{href:l,target:i,rel:c??(i==="_blank"?"noreferrer":void 0)}:{type:s??"button",disabled:K&&!z&&!ut},className:lt,"aria-pressed":xt,"aria-expanded":typeof N=="boolean"?N:D["aria-expanded"],"aria-controls":f??D["aria-controls"],"aria-label":tt,"aria-disabled":K&&(ht||z||ut)?!0:void 0,"aria-describedby":$e,style:Se,onClick:zt,onMouseLeave:Ft,onPointerEnter:Ke=>{er(Ke)||_t(),!K&&typeof D.onPointerEnter=="function"&&D.onPointerEnter(Ke)},onPointerLeave:Ke=>{er(Ke)||gt(),!K&&typeof D.onPointerLeave=="function"&&D.onPointerLeave(Ke)},onPointerUp:Ke=>{K&&Et&&It.touchPress(Ke.currentTarget),!K&&typeof D.onPointerUp=="function"&&D.onPointerUp(Ke)},onFocus:Ke=>{vt(!0),ir()||_t(),!K&&typeof D.onFocus=="function"&&D.onFocus(Ke)},onBlur:Ke=>{vt(!1),K||Nt(Ke),gt(),!K&&typeof D.onBlur=="function"&&D.onBlur(Ke)},children:[on(),fe?t.jsx("span",{id:ct,hidden:!0,"aria-label":fe}):null]}),rt&&Q?t.jsx(Qn,{anchorRect:Pe,title:Q.title,items:Q.items,onClose:Qe}):rt&&wt?t.jsx(zn,{anchorRect:Pe,text:wt,onClose:Qe}):null]})}const ye=o.forwardRef(Qy);ye.displayName="Button";function Wt(e,n,r){const a=o.useRef(null);return o.useLayoutEffect(()=>{const s=a.current?.parentElement??null;return n(s,e),()=>r(s)},[e,n,r]),a}const Jr={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},Oo=new WeakMap;function zo(e){if(e)return Oo.get(e)}function sn(e,n){e&&(e.style.setProperty(Jr.title,n.title),e.style.setProperty(Jr.description,n.description),Oo.set(e,n))}function ln(e){e&&(e.style.removeProperty(Jr.title),e.style.removeProperty(Jr.description),Oo.delete(e))}const ji={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function Di(){const e=Wt(ji,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const Si={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function Ti(){const e=Wt(Si,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const Mi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function $i(){const e=Wt(Mi,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const Li={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Ri(){const e=Wt(Li,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const Pi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function Fi(){const e=Wt(Pi,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const Ii={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function Oi(){const e=Wt(Ii,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const zi={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function Wi(){const e=Wt(zi,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const Hi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Vi(){const e=Wt(Hi,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const qi={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function Ui(){const e=Wt(qi,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const Gi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function Ki(){const e=Wt(Gi,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const Yi={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function Zi(){const e=Wt(Yi,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-outline","aria-hidden":"true",children:t.jsx("span",{className:"promo-banner-bg-outline__dot"})})}const Xi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Ji(){const e=Wt(Xi,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const Qi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function eu(){const e=Wt(Qi,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const tu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function nu(){const e=Wt(tu,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const hn=(e,n,r)=>({key:e,get label(){return Jt.t(`promoBannerBg.${e}`,n)},textTone:r}),e2=[hn("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),hn("soft","\uC18C\uD504\uD2B8","dark"),hn("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),hn("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),hn("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),hn("warm","\uC6DC(\uAC15\uC870)","dark"),hn("dark","\uB2E4\uD06C","light"),hn("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),hn("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),hn("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),hn("outline","\uC544\uC6C3\uB77C\uC778","dark"),hn("success","\uC131\uACF5/\uC644\uB8CC","light"),hn("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),hn("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],ru={main:Di,soft:Ti,sub:$i,deep:Ri,softSub:Fi,warm:Oi,dark:Wi,radial:Vi,diagonal:Ui,dots:Ki,outline:Zi,success:Ji,naver:eu,instagram:nu};function au({storageKey:e="fontScale",baseFont:n=20,minScale:r=.8,maxScale:a=1.4,step:s=.1,lineHeightRatio:l=1.4}={}){const i=g=>Math.max(r,Math.min(a,Number(g))),c=g=>{try{const w=localStorage.getItem(g),N=w?Number(w):1;return Number.isFinite(N)?i(N):i(1)}catch{return i(1)}},[u,p]=o.useState(()=>c(e)),[h,d]=o.useState(e);h!==e&&(d(e),p(c(e))),o.useEffect(()=>{try{localStorage.setItem(e,String(u))}catch{}},[e,u]);const m=g=>{p(typeof g=="function"?w=>i(g(w)):i(g))},C=()=>m(g=>+(g+s).toFixed(6)),x=()=>m(g=>+(g-s).toFixed(6)),y=u<a-Number.EPSILON,b=u>r+Number.EPSILON,v=Math.round(n*u),_=Math.round(v*l);return{scale:u,setScale:m,increase:C,decrease:x,canIncrease:y,canDecrease:b,fontSize:v,lineHeight:_}}function ou(e,n){const r=Xr(n);o.useEffect(()=>{const a=()=>r.current();try{window.addEventListener(e,a)}catch{}return()=>{try{window.removeEventListener(e,a)}catch{}}},[e,r])}const Wo=" \xB7 ",su=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(Wo)?e.split(Wo).pop()??e:e})(),t2=o.createContext(!1),ur=[];let lu=null;function n2(e){const n=o.useContext(t2);o.useEffect(()=>{if(n||typeof e!="string"||!e)return;ur.length===0&&(lu=document.title);const r={text:su?`${e}${Wo}${su}`:e};return ur.push(r),document.title=r.text,()=>{const a=ur.lastIndexOf(r);a>=0&&ur.splice(a,1),document.title=ur.length?ur[ur.length-1].text:lu??document.title}},[e,n])}const Ho=[{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"}],r2=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function vn(e,n){return r2().compare(e,n)}const Sa=new Map;function a2(e){const n=Sa.get(e);if(n)return n;const r=[],a=/-?\d+(?:\.\d+)?/g;let s=0;for(let l=a.exec(e);l;l=a.exec(e)){let i=l.index,c=l[0];c[0]==="-"&&i>0&&!/\s/.test(e[i-1])&&(i+=1,c=c.slice(1)),i>s&&r.push(e.slice(s,i)),r.push(Number(c)),s=l.index+l[0].length}return s<e.length&&r.push(e.slice(s)),Sa.size>5e3&&Sa.clear(),Sa.set(e,r),r}function o2(e){if(!/^[\d\s-]+$/.test(e))return null;const n=e.replace(/\D/g,"");return n.length<9||n.length>11?null:n[0]==="0"||n[0]==="1"&&e!==n?n:null}function s2(e,n){const r=p=>p==null||typeof p=="number"&&Number.isNaN(p)?"":String(p).trim(),a=r(e),s=r(n);if(a===s)return 0;const l=(p,h)=>{if(typeof p=="number"&&!Number.isNaN(p))return[p];const d=o2(h);return d!==null?[d]:a2(h)},i=l(e,a),c=l(n,s),u=Math.min(i.length,c.length);for(let p=0;p<u;p++){const h=i[p],d=c[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=vn(h,d);if(m!==0)return m}return i.length!==c.length?i.length-c.length:vn(a,s)}const iu=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function Ta(e,n,r){const a=iu(e),s=iu(n);if(a||s)return a===s?0:a?1:-1;const l=s2(e,n);return r?l:-l}function l2(e,n,r){const{t:a}=Ee.useTranslation(),[s,l]=o.useState(()=>{const x=r?.initialPageSize;return x&&Ho.some(y=>y.value===x)?x:"25"}),[i,c]=o.useState(1),[u,p]=o.useState(n);Object.is(u,n)||(p(n),i!==1&&c(1));const h=o.useMemo(()=>Ho.map(x=>({...x,label:a("visits.showN",{n:x.value})})),[a]),d=o.useCallback(x=>{Ho.some(y=>y.value===x)&&(l(x),c(1))},[]),m=Math.max(1,Math.ceil(e.length/Number(s))),C=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),m);return i!==C&&c(C),{pageRows:o.useMemo(()=>e.slice((C-1)*Number(s),C*Number(s)),[e,C,s]),pageSizeProps:{options:h,value:s,onChange:d},paginationProps:{page:C,total:m,onChange:c},setPage:c}}function i2(e){const[n,r]=o.useState(()=>e?.defaultKey!=null?{key:e.defaultKey,asc:e.defaultAsc??!0}:null),a=o.useRef(n),s=o.useRef(e?.onSortChange);s.current=e?.onSortChange;const l=o.useCallback(u=>{const p=a.current,h=p?.key===u?{key:u,asc:!p.asc}:{key:u,asc:!0};a.current=h,r(h),s.current?.(h)},[]),i=o.useCallback((u,p)=>({label:u,sortDir:n?.key===p?n.asc?"asc":"desc":null,onClick:()=>l(p)}),[n,l]),c=o.useCallback((u,p)=>{if(!n)return u;const{key:h,asc:d}=n;return[...u].sort((m,C)=>Ta(p(m,h),p(C,h),d))},[n]);return{sort:n,field:i,sortRows:c}}const jn="\uC804\uCCB4",u2={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"})},c2={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"})},d2={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 p2(e,n){if("place"in n)return u2[n.place](e);const r=c2[n.vowel](e);return n.glide?`${r} \xB7 ${d2[n.glide](e)}`:r}const h2=(e,{defaultValue:n})=>n,uu=(e,n)=>({jamos:e,phonetic:n,tooltip:p2(h2,n)}),Wn=(e,n)=>n.map(r=>uu([r],{place:e})),Qt=(e,n,r)=>uu([...e],r?{vowel:n,glide:r}:{vowel:n}),Vo={cho:[Wn("labial",["\u3142","\u3143","\u314D","\u3141"]),Wn("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),Wn("alveolar",["\u3145","\u3146"]),Wn("palatal",["\u3148","\u3149","\u314A"]),Wn("velar",["\u3131","\u3132","\u314B"]),Wn("glottal",["\u314E"])],jung:[[Qt("\u3163","frontHigh"),Qt("\u315F","frontHigh","w"),Qt("\u3162","frontHigh","velar")],[Qt("\u3161","backHighUnrounded")],[Qt("\u315C","backHighRounded"),Qt("\u3160","backHighRounded","j")],[Qt("\u3154\u3150","frontMid"),Qt("\u3156\u3152","frontMid","j"),Qt("\u3159\u315A\u315E","frontMid","w")],[Qt("\u3153","backMidUnrounded"),Qt("\u3155","backMidUnrounded","j"),Qt("\u315D","backMidUnrounded","w")],[Qt("\u3157","backMidRounded"),Qt("\u315B","backMidRounded","j")],[Qt("\u314F","low"),Qt("\u3151","low","j"),Qt("\u3158","low","w")]],jong:[Wn("labial",["\u3142","\u3141"]),Wn("alveolar",["\u3137","\u3134","\u3139"]),Wn("velar",["\u3131","\u3147"])]},m2=e=>e===f2?[]:Array.from(e),f2="__NO_CODA__",qo=e=>e.map(n=>n.map(({jamos:r,phonetic:a,tooltip:s})=>({v:r.join(""),phonetic:a,tooltip:s}))),cu={cho:qo(Vo.cho),jung:qo(Vo.jung),jong:qo(Vo.jong)};cu.jung.flat().forEach(({v:e})=>{for(const n of m2(e));}),new Set(cu.cho.flat().map(e=>e.v)),Object.fromEntries(Object.entries(RC).map(([e,{nucleus:n}])=>[e,n]));function C2(e,n=!0){const r=Xr(e);o.useEffect(()=>{if(n)return lr(()=>{r.current?.()})},[n,r])}function Ma(){const[e,n]=o.useState(null),r=o.useCallback(l=>n(l.getBoundingClientRect()),[]),a=o.useCallback(()=>n(null),[]),s=o.useCallback(l=>{const i=l.getBoundingClientRect();n(c=>c?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:r,close:a,toggleAt:s}}function g2(e){const[n,r]=o.useState(null),[a,s]=o.useState(null),l=o.useRef(null);o.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]);const i=o.useCallback((u,p)=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{r(u),s(p)},e)},[e]),c=o.useCallback(()=>{l.current&&clearTimeout(l.current),r(null),s(null)},[]);return{payload:n,anchorRect:a,openAfterDelay:i,close:c}}function du(e="warning"){const[n,r]=o.useState(""),[a,s]=o.useState(e),[l,i]=o.useState(0),c=o.useCallback((d,m)=>{s(m),r(d),i(C=>C+1)},[]),u=o.useCallback(d=>c(d,"warning"),[c]),p=o.useCallback(d=>c(d,"normal"),[c]),h=o.useCallback(()=>r(""),[]);return{toastMessage:n,toastType:a,toastKey:l,showToast:c,showWarning:u,showNormal:p,clearToast:h}}function Qr(e){let n=0;if(e&&typeof window<"u"&&typeof window.getComputedStyle=="function")for(let r=e;r&&r!==document.body&&r!==document.documentElement;r=r.parentElement){const a=parseInt(window.getComputedStyle(r).zIndex,10);!Number.isNaN(a)&&a>n&&(n=a)}return n>0?`max(var(--z-menu, 1500), ${n+1})`:"var(--z-menu, 1500)"}function ea({computeStyle:e,onScroll:n="close",onResize:r="close",ignoreOutsideClickSelector:a}){const[s,l]=o.useState(!1),[i,c]=o.useState({position:"fixed"}),u=o.useRef(null),p=o.useRef(null),h=o.useCallback(()=>{u.current&&c(e(u.current.getBoundingClientRect(),u.current))},[e]);o.useLayoutEffect(()=>{s&&h()},[s,h]),o.useEffect(()=>{if(!s)return;let C=p.current?.offsetHeight??0;C>0&&h();let x=0,y=null;typeof ResizeObserver<"u"&&p.current&&(y=new ResizeObserver(()=>{const A=p.current?.offsetHeight??0;if(A!==C){if(C=A,++x>4){y?.disconnect(),y=null;return}h()}}),y.observe(p.current));const b=A=>{const B=A.target;a&&B.closest?.(a)||u.current?.contains(B)||p.current?.contains(B)||l(!1)};document.addEventListener("mousedown",b),document.addEventListener("pointerdown",b);let v=null;const _=()=>{if(typeof requestAnimationFrame>"u"){h();return}v===null&&(v=requestAnimationFrame(()=>{v=null,h()}))},g=A=>{p.current?.contains(A.target)||(n==="reposition"?_():n==="close"&&l(!1))};n!=="ignore"&&window.addEventListener("scroll",g,!0);const w=()=>{r==="reposition"?_():r==="close"&&l(!1)};let N=null;const f=()=>{w(),N&&clearTimeout(N),N=setTimeout(()=>{N=null,r==="reposition"&&h()},250)};return r!=="ignore"&&(window.addEventListener("resize",w),window.addEventListener("orientationchange",f)),()=>{v!==null&&cancelAnimationFrame(v),y?.disconnect(),document.removeEventListener("mousedown",b),document.removeEventListener("pointerdown",b),n!=="ignore"&&window.removeEventListener("scroll",g,!0),r!=="ignore"&&(window.removeEventListener("resize",w),window.removeEventListener("orientationchange",f)),N&&clearTimeout(N)}},[s,h,n,r,a]),o.useEffect(()=>{if(s)return lr(()=>l(!1))},[s]);const d=o.useCallback(()=>l(C=>!C),[]),m=o.useCallback(()=>l(!1),[]);return{open:s,setOpen:l,toggle:d,close:m,style:i,triggerRef:u,menuRef:p}}function b2(e,{mode:n="playback",autoStart:r=!1,onPlaySpeaker:a,onComplete:s,playMs:l=1100,feedbackMs:i=1500}={}){const[c,u]=o.useState([]),[p,h]=o.useState(0),[d,m]=o.useState("idle"),[C,x]=o.useState(null),[y,b]=o.useState([]),[v,_]=o.useState(null),[g,w]=o.useState(0),N=o.useRef(0),f=o.useCallback(L=>{N.current=typeof L=="function"?L(N.current):L,w(N.current)},[]),A=o.useRef(a),B=o.useRef(s);o.useEffect(()=>{A.current=a,B.current=s},[a,s]);const E=o.useRef([]),k=()=>{E.current.forEach(clearTimeout),E.current=[]},j=(L,J)=>{E.current.push(setTimeout(J,L))};o.useEffect(()=>()=>k(),[]);const S=c[p]?.id??null,$=o.useRef(null),V=o.useCallback(()=>{k(),m("playing"),b([]),_(null),f(0);let L=0;e.forEach((J,ee)=>{j(L,()=>{h(ee),x(J.id),A.current?.(J)}),j(L+1e3,()=>{x(null),b(q=>[...q,J.id])}),L+=1300}),j(L,()=>{m("done"),B.current?.({score:0,total:e.length})})},[e,f]),F=o.useCallback((L,J)=>{if(J>=L.length){m("done"),B.current?.({score:N.current,total:L.length});return}$.current=null,h(J),_(null),m("playing"),x(L[J].id),A.current?.(L[J]),j(l,()=>{x(null),m("waiting")})},[l]),U=o.useCallback(()=>{k();const L=Kr(e);u(L),f(0),b([]),F(L,0)},[e,F,f]),T=o.useCallback(()=>{n==="playback"?(u(e),V()):U()},[n,e,V,U]),z=o.useCallback(()=>{k(),m("idle"),x(null),b([]),_(null),h(0),f(0),u([])},[f]),W=JSON.stringify(e.map(L=>[L.id,L.label,L.angleDeg,L.deg,L.row,L.shortcut]));o.useEffect(()=>(r?T():z(),()=>k()),[n,W,r]);const ie=o.useCallback(L=>{d!=="waiting"||n==="playback"||$.current===p||($.current=p,_(L),L===c[p]?.id&&f(J=>J+1),n==="exam"?(m("playing"),j(400,()=>F(c,p+1))):(m("feedback"),j(i,()=>F(c,p+1))))},[d,n,c,p,F,i,f]),Q=n==="playback"?e.length:c.length;return{bind:{activeSpeakerId:C,playedIds:y,selectedId:v,answerId:S,showFeedback:d==="feedback",clickable:d==="waiting",onSelectSpeaker:ie},index:p,total:Q,score:g,phase:d,done:d==="done",start:T,reset:z}}const Uo=new Map,Go=new Map,y2=()=>()=>{},v2=()=>!0,x2=()=>!1;function pu(e){const n=/^data:image\/svg\+xml(;base64)?,([\s\S]*)$/.exec(e);if(!n)return null;try{if(!n[1])return decodeURIComponent(n[2]);const r=Uint8Array.from(atob(n[2]),a=>a.charCodeAt(0));return new TextDecoder("utf-8").decode(r)}catch{return null}}function _2(e){if(typeof window>"u")return"";const n=(r,a)=>{const s=a.attrName.toLowerCase(),l=a.attrValue.trim();(s==="href"||s==="xlink:href")&&!l.startsWith("#")&&(a.keepAttr=!1),(s==="style"||l.includes("\\")&&l.includes("("))&&(a.keepAttr=!1);const i=l.replace(/url\s*\(\s*(['"]?)#[^)\s'"]+\1\s*\)/gi,"");/url\s*\(/i.test(i)&&(a.keepAttr=!1)};xr.addHook("uponSanitizeAttribute",n);try{return xr.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{xr.removeHook("uponSanitizeAttribute",n)}}function w2(e,n){const r=new Set;for(const i of e.matchAll(/url\(\s*(['"]?)#([^)\s"']+)\1\s*\)/g))r.add(i[2]);for(const i of e.matchAll(/(?:xlink:)?href="#([^"]+)"/g))r.add(i[1]);const a=new Set([...e.matchAll(/id="([^"]*)"/g)].map(i=>i[1])),s=[...r].filter(i=>a.has(i));if(s.length===0)return e;let l=e;for(const i of s){const c=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),u=`${n}-${i}`;l=l.replace(new RegExp(`id="${c}"`,"g"),`id="${u}"`).replace(new RegExp(`url\\(\\s*(['"]?)#${c}\\1\\s*\\)`,"g"),(p,h)=>`url(${h}#${u}${h})`).replace(new RegExp(`((?:xlink:)?href)="#${c}"`,"g"),`$1="#${u}"`)}return l}function B2(e){const n=Go.get(e);if(n)return n;const r=fetch(e).then(a=>a.ok?a.text():null).then(a=>(a!=null&&Uo.set(e,a),a)).catch(()=>null).finally(()=>{Go.delete(e)});return Go.set(e,r),r}function k2(e,n=!0){const r=o.useSyncExternalStore(y2,v2,x2)&&n&&e?pu(e)??Uo.get(e)??null:null,[a,s]=o.useState({src:e,enabled:n,svg:r});return o.useEffect(()=>{if(!n||!e){s({src:e,enabled:n,svg:null});return}const l=pu(e)??Uo.get(e)??null;if(l!==null){s({src:e,enabled:n,svg:l});return}let i=!0;return B2(e).then(c=>{i&&s({src:e,enabled:n,svg:c})}),()=>{i=!1}},[e,n]),a.src===e&&a.enabled===n?a.svg:r}function A2({title:e,description:n,actionLabel:r,onAction:a,bg:s,color:l,size:i="medium",actionVariant:c,titleColor:u,descriptionColor:p,className:h=""}){const d=s??l??"main",m=o.useRef(null),[C,x]=o.useState("main"),y=wn("(max-width: 767px)"),b=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const g=m.current;if(!g)return;const w=zo(g),N=(f,A,B)=>{if(B!==void 0)g.style.setProperty(A,B),b.current[f]=!0;else if(b.current[f]){const E=w?.[f];E?g.style.setProperty(A,E):g.style.removeProperty(A),b.current[f]=!1}};N("title","--promo-banner-bg-title",u),N("description","--promo-banner-bg-description",p)},[u,p,d]),o.useLayoutEffect(()=>{const g=m.current;if(!g)return;const w=zo(g);x(w?.actionVariant??"main")},[d]);const v=ke("promo-banner",`promo-banner--${i}`,h),_=ru[d];return t.jsxs("div",{ref:m,className:v,role:"note",children:[t.jsx(_,{}),t.jsxs("div",{className:"promo-banner__text",children:[t.jsx("span",{className:`promo-banner__title ${i==="small"?"body-2":"h2"}`,children:e}),n&&t.jsx("span",{className:"promo-banner__description body-3",children:n})]}),r&&a&&t.jsx(ye,{htmlType:"button",size:40,variant:c??C,shape:"pill",useBorder:!0,onClick:a,ariaLabel:r,...y?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:r,minWidth:140}})]})}function N2({children:e,interval:n=5e3,dotTone:r,className:a="","aria-label":s}){const{t:l}=Ee.useTranslation(),i=s??l("topBanner.ariaLabel","\uBC30\uB108"),c=o.Children.toArray(e),u=c.length,[p,h]=o.useState(0),[d,m]=o.useState(!1),[C,x]=o.useState(!1),[y,b]=o.useState(!1),v=o.useRef(null),_=o.useRef(null),g=o.useRef(null),w=ja(),N=d||C||y,f=u>0?Math.min(p,u-1):0;o.useEffect(()=>{if(u<2||n<=0||N||w)return;const B=window.setInterval(()=>h(E=>(Math.min(E,u-1)+1)%u),n);return()=>window.clearInterval(B)},[u,n,N,w]);const A=B=>{_.current!=null&&window.clearTimeout(_.current),_.current=window.setTimeout(()=>{_.current=null,b(!1)},B)};return o.useEffect(()=>()=>{_.current!=null&&window.clearTimeout(_.current)},[]),o.useEffect(()=>{if(!y)return;const B=E=>{E.pointerType==="touch"&&(g.current&&g.current.contains(E.target)||(_.current!=null&&(window.clearTimeout(_.current),_.current=null),b(!1)))};return document.addEventListener("pointerdown",B,!0),()=>document.removeEventListener("pointerdown",B,!0)},[y]),u===0?null:t.jsxs("section",{ref:g,className:ke("top-banner",a),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:B=>{v.current=B.pointerType},onPointerDown:B=>{v.current=B.pointerType,B.pointerType==="touch"&&(_.current!=null&&(window.clearTimeout(_.current),_.current=null),b(!0))},onPointerUp:B=>{B.pointerType==="touch"&&A(5e3)},onPointerCancel:B=>{B.pointerType==="touch"&&A(5e3)},onMouseEnter:()=>{v.current!=="touch"&&m(!0)},onMouseLeave:()=>m(!1),onFocus:B=>{let E=!0;try{E=B.target.matches(":focus-visible")}catch{E=!0}x(E)},onBlur:B=>{B.currentTarget.contains(B.relatedTarget)||x(!1)},children:[t.jsx("div",{className:"top-banner__viewport",children:t.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${f*100}%)`},children:c.map((B,E)=>t.jsx("div",{className:"top-banner__slide","aria-hidden":E!==f,...E!==f?{inert:!0}:{},children:B},E))})}),u>1&&t.jsx("div",{className:`top-banner__dots${(r?.[f]??"light")==="dark"?" top-banner__dots--dark":""}`,children:c.map((B,E)=>t.jsx("button",{type:"button",className:`top-banner__dot${E===f?" top-banner__dot--active":""}`,"aria-label":l("topBanner.dotAriaLabel",{count:u,index:E+1,defaultValue:`${u}\uAC1C \uC911 ${E+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":E===f,onClick:()=>h(E)},E))})]})}function E2({title:e,body:n,open:r=!1,onToggle:a,avatar:s,titleClassName:l="body-2",bodyClassName:i="body-2",className:c=""}){const{t:u}=Ee.useTranslation();return t.jsxs("div",{className:`accordion-item ${r?"accordion-item--open":""} ${c}`.trim(),role:"listitem",children:[t.jsxs("div",{className:"accordion-item__header",role:"button",tabIndex:0,"aria-expanded":r,"data-accordion-header":!0,onClick:a,onKeyDown:p=>{if(p.key==="Enter"||p.key===" ")p.preventDefault(),a?.();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&&t.jsx("div",{className:"accordion-item__avatar",children:s}),t.jsx("div",{className:`accordion-item__title ${l}`,children:e}),t.jsx("div",{className:"accordion-item__chevron",children:t.jsx(dt,{icon:r?"chevron-up":"chevron-down",label:r?u("accordion.collapse","\uC811\uAE30"):u("accordion.expand","\uD3BC\uCE58\uAE30"),className:"accordion-item__chevron-icon",imgClassName:"accordion-item__chevron-image"})})]}),r&&t.jsx("div",{className:`accordion-item__body ${i}`,children:typeof n=="string"?t.jsx("p",{children:n}):n})]})}function j2({items:e=[],defaultOpenIndex:n=0,size:r=72,className:a="",bodyClassName:s}){const[l,i]=o.useState({index:n}),c=(u,p)=>l.id!=null&&u.id!=null?u.id===l.id:l.id==null&&p===l.index;return t.jsx("div",{className:`accordion-group accordion-group--s${r} ${a}`.trim(),role:"list",children:e.map((u,p)=>t.jsx(E2,{title:u.title,body:u.body,avatar:u.avatar,open:c(u,p),onToggle:()=>i(c(u,p)?{index:-1}:{index:p,id:u.id}),bodyClassName:s},u.id??p))})}function D2(){return t.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:t.jsx("polyline",{points:"2,6 5,9 10,3"})})}function S2(){return t.jsxs("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:[t.jsx("line",{x1:"3",y1:"3",x2:"9",y2:"9"}),t.jsx("line",{x1:"9",y1:"3",x2:"3",y2:"9"})]})}function T2(){return t.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:t.jsx("line",{x1:"2.5",y1:"6",x2:"9.5",y2:"6"})})}function Ln({children:e,icon:n,number:r,position:a="top-left",size:s=24,animate:l=!1,onClick:i,"aria-label":c,"aria-hidden":u,className:p=""}){const{t:h}=Ee.useTranslation(),d=n??"check",m=r!==void 0,C=e!==void 0||m?"number":d,x=e!==void 0?void 0:m?h("badge.nthSelected",{n:r,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],y=u?void 0:c??x;return t.jsxs("span",{className:ke("circle-badge",`circle-badge--${C}`,`circle-badge--${s}`,`circle-badge--${a}`,l?"circle-badge--animate":"",i?"circle-badge--clickable":"",p),onClick:i,onKeyDown:i?b=>{b.key!=="Enter"&&b.key!==" "||(b.preventDefault(),b.currentTarget.click())}:void 0,"aria-label":y,"aria-hidden":u||void 0,role:i?"button":y?"img":void 0,tabIndex:i?0:void 0,children:[e??(m?r:null),e===void 0&&!m&&d==="check"&&t.jsx(D2,{}),e===void 0&&!m&&d==="remove"&&t.jsx(S2,{}),e===void 0&&!m&&d==="minus"&&t.jsx(T2,{})]})}function ta({columns:e=[],onClose:n,className:r="",size:a="medium"}){const{t:s}=Ee.useTranslation(),l=a==="small"?40:48,[i,c]=o.useState([]),u=o.useMemo(()=>{const b=[{title:null,columns:e}];let v=e;for(const _ of i){const g=v?.[_.ci]?.items?.[_.ii];if(!g||!Array.isArray(g.children)||!g.children.length)break;v=[{title:null,items:g.children}],b.push({title:g.label||null,columns:v})}return b},[e,i]),p=u[u.length-1],h=u.length-1,d=o.useCallback(()=>c(b=>b.slice(0,Math.max(0,Math.min(b.length,h)-1))),[h]),m=o.useRef(null),C=o.useRef(null),x=u.length;o.useEffect(()=>{C.current||(C.current=document.activeElement);let b=0,v=0;const _=()=>{const g=m.current?.querySelector("button:not([disabled])");if(g&&g.offsetParent){g.focus({preventScroll:!0});return}v++<20&&(b=requestAnimationFrame(_))};return b=requestAnimationFrame(_),()=>cancelAnimationFrame(b)},[x]),o.useEffect(()=>()=>{C.current?.focus?.({preventScroll:!0})},[]);const y=o.useCallback((b,v,_)=>{if(b){if(Array.isArray(b.children)&&b.children.length){c(g=>[...g.slice(0,h),{ci:v,ii:_}]);return}try{typeof b.onClick=="function"&&b.onClick()}catch{}try{b&&b.closeOnSelect&&typeof n=="function"&&n()}catch{}}},[n,h]);return t.jsxs("div",{className:le(`menu-tooltip menu-tooltip--${a} ${r}`),children:[(u.length>1||p.title)&&t.jsxs("div",{className:le("menu-tooltip__header"),children:[u.length>1?t.jsx(ye,{htmlType:"button",size:l,type:"dot",icon:"chevron-left",ariaLabel:s("common.back","\uB4A4\uB85C"),onClick:d,variant:"transparent-gray",useBorder:!1}):null,t.jsx("div",{className:le("menu-tooltip__title button-1"),children:p.title})]}),t.jsx("div",{className:le("menu-tooltip__columns"),ref:m,children:p.columns&&p.columns.map((b,v)=>{const _=(b.items||[]).some(g=>!!g.icon||g.selected!==void 0);return t.jsxs("div",{className:le("menu-tooltip__column"),children:[b.title?t.jsx("div",{className:le("menu-tooltip__column-title body-3"),children:b.title}):null,t.jsx("div",{className:le("menu-tooltip__items"),children:(b.items||[]).map((g,w)=>t.jsxs(o.Fragment,{children:[g.separatorBefore&&w>0&&t.jsx("div",{className:le("menu-tooltip__separator"),role:"separator"}),t.jsx(ye,{htmlType:"button",className:le("menu-tooltip__item"),size:l,type:g.label?"bar":"dot",icon:g.selected?"check":g.icon||(_||!g.label?"none":void 0),rightIcon:Array.isArray(g.children)&&g.children.length?"chevron-right":g.badgeCount?t.jsx(Ln,{position:"inline",number:Math.min(g.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:g.label,ariaLabel:g.label&&g.badgeCount&&g.badgeCount>0?s("nav.badgeLabel",{label:g.label,count:g.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):g.label,onClick:()=>y(g,v,w),selected:g.selected,disabled:g.disabled,showTooltipInfo:g.tooltip||!1,useBorder:!1,align:"left"})]},w))})]},v)})})]})}const hu=".content-area";function Ko(e,n="Nav"){try{const r=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(hu);if(r){r.scrollTop=0;return}const a=document.scrollingElement??document.documentElement;a&&a.scrollHeight<=a.clientHeight&&jt("nav-scroll-container",`[${n}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${hu}) \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 Yo=52,$a=10,mu=e=>e&&e>0?e:0;function fu({items:e=[],activeKey:n,onChange:r,appMode:a,onAppModeChange:s,moreItems:l=[],scrollContainer:i}){const{t:c}=Ee.useTranslation(),u=a==="manager"?"malgwi":"manager",p=a==="manager"?"arrow-left":"arrow-right",h=a==="manager"?c("nav.modeLabelMalgwi","\uB9D0\uADC0"):c("nav.modeLabelManager","\uB9D0\uADC0 \uB9E4\uB2C8\uC800"),d=o.useRef(null),[m,C]=o.useState(0),x=e.length;o.useEffect(()=>{const L=d.current;if(!L)return;const J=()=>{const P=typeof getComputedStyle=="function"?getComputedStyle(L):null,R=L.clientWidth-(parseFloat(P?.paddingLeft??"")||0)-(parseFloat(P?.paddingRight??"")||0),D=L.querySelector(".bottom-nav__left"),H=D?.nextElementSibling,ne=(D?.offsetWidth??0)+(D&&H?.classList.contains("bottom-nav__divider")?H.offsetWidth:0);C(Math.max(0,R-ne))};if(J(),typeof ResizeObserver>"u")return;const ee=new ResizeObserver(J);ee.observe(L);const q=L.querySelector(".bottom-nav__left");return q&&ee.observe(q),()=>ee.disconnect()},[s]);const y=Yo+1,b=L=>Math.max(0,Math.floor((L+$a)/(Yo+$a))),v=x*(Yo+$a)-$a<=m,_=m<=0||l.length===0&&v?x:Math.min(x,b(m-y)),g=m>0&&_<x,w=g?_:x,N=e.slice(0,w),f=e.slice(w),A=g||l.length>0,B=o.useCallback((L,J)=>({position:"fixed",bottom:window.innerHeight-L.top+8,right:window.innerWidth-L.right,zIndex:Qr(J)}),[]),E=o.useId(),{open:k,toggle:j,close:S,style:$,triggerRef:V,menuRef:F}=ea({computeStyle:B,onScroll:"ignore",onResize:"reposition"}),U=o.useCallback((L,J)=>J>0?c("nav.badgeLabel",{label:L,count:J,defaultValue:"{{label}}, {{count}}\uAC1C"}):L,[c]),T=o.useCallback((L,J)=>J>0?c("nav.badgeInsideLabel",{label:L,count:J,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):L,[c]),z=o.useCallback(()=>s?.(u),[s,u]),W=o.useMemo(()=>f.find(L=>!!L.key&&L.key===n)??l.find(L=>L.selected||L.key&&L.key===n),[f,n,l]),ie=o.useMemo(()=>[{items:[...f.map(L=>({label:L.label,icon:L.icon,badgeCount:L.badgeCount,selected:!!L.key&&L.key===n,closeOnSelect:!0,disabled:L.state==="disabled",onClick:()=>{L.state!=="disabled"&&(L.key&&r&&(r(L.key),Ko(i,"BottomNav")),S())}})),...l.map(L=>({label:L.label,icon:L.icon,badgeCount:L.badgeCount,selected:L.selected??(!!L.key&&L.key===n),closeOnSelect:!0,onClick:()=>{L.onClick?.(),S()}}))]}],[f,l,n,r,S]),Q=[...f,...l].reduce((L,J)=>L+mu(J.badgeCount),0);return t.jsxs("nav",{className:"bottom-nav",ref:d,"aria-label":c("nav.bottomNav","\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158"),children:[s&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"bottom-nav__left",children:t.jsx(ye,{htmlType:"button",size:52,type:"dot",icon:p,ariaLabel:h,className:"bottom-nav-item",onClick:z})}),t.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),t.jsx("div",{className:"bottom-nav__items",children:N.map((L,J)=>{const ee=mu(L.badgeCount);return t.jsxs("span",{className:"bottom-nav__slot",children:[t.jsx(ye,{htmlType:"button",size:52,type:"dot",icon:L.icon,ariaLabel:U(L.label,ee),selected:!!L.key&&L.key===n,disabled:L.state==="disabled",className:"bottom-nav-item",onClick:()=>{L.key&&(r?.(L.key),Ko(i,"BottomNav"))}}),ee>0&&t.jsx("span",{"aria-hidden":"true",children:t.jsx(Ln,{position:"top-right",number:Math.min(ee,99),size:24})})]},L.key??`__slot-${J}`)})}),A&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"}),t.jsx("div",{className:"bottom-nav__right",children:t.jsxs("div",{ref:V,className:"bottom-nav__slot",children:[t.jsx(ye,{htmlType:"button",size:52,type:"dot",icon:W?.icon??"ellipsis",ariaLabel:T(W?.label??c("nav.more","\uB354\uBCF4\uAE30"),Q),selected:!!W,className:"bottom-nav-item",onClick:j,"aria-expanded":k,"aria-controls":k?E:void 0}),Q>0&&t.jsx("span",{"aria-hidden":"true",children:t.jsx(Ln,{position:"top-right",number:Math.min(Q,99),size:24})}),k&&gn.createPortal(t.jsx("div",{id:E,role:"group","aria-label":c("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:le("tooltip__content"),style:$,ref:F,children:t.jsx(ta,{columns:ie,onClose:S})}),document.body)]})})]})]})}function Cu(e){if(typeof e!="string")return!1;let n="";for(const a of e){const s=a.charCodeAt(0);s<=32||s>=127&&s<=159||(n+=a)}if(!n)return!1;const r=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(n);return r?["http","https","mailto","tel"].includes(r[1].toLowerCase()):!0}function gu(e,n,r){return r&&r>0?e("nav.badgeLabel",{label:n,count:r,defaultValue:"{{label}}, {{count}}\uAC1C"}):n}function M2(e){const{t:n}=Ee.useTranslation(),{activeKey:r,unreadCount:a,onDebug:s,onNotification:l,onSetting:i,onHelp:c,onFeedback:u,onAccount:p}=e||{},h="default";return s||l||i||c||u||p?t.jsxs("div",{className:"side-nav__footer",children:[s&&t.jsx(ye,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"terminal",ariaLabel:n("nav.debug","\uB514\uBC84\uADF8"),onClick:s,selected:r==="debug"}),c&&t.jsx(ye,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"message-circle-question-mark",ariaLabel:n("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:c,selected:r==="help"}),l&&t.jsxs("span",{className:"side-nav__notification-wrap",children:[t.jsx(ye,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bell",ariaLabel:gu(n,n("nav.notifications","\uC54C\uB9BC"),a),onClick:l,selected:r==="notifications"}),!!a&&a>0&&t.jsx(Ln,{number:Math.min(a,99),size:24,"aria-hidden":!0})]}),i&&t.jsx(ye,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"settings",ariaLabel:n("nav.settings","\uC124\uC815"),onClick:i,selected:r==="settings"}),u&&t.jsx(ye,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bug",ariaLabel:n("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:u,selected:r==="feedback"}),p&&t.jsx(ye,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"user-round",ariaLabel:n("nav.account","\uACC4\uC815"),onClick:p,selected:r==="account"})]}):null}function bu(e){const{t:n}=Ee.useTranslation(),{item:r,itemKey:a,label:s,icon:l,active:i,onClick:c,style:u,state:p,labelStyle:h}=e||{},d=r?.key??a??"",m=r?.label??s??"",C=r?.icon??l??"",x=r?.badge??0,y=t.jsx("span",{className:"side-nav__icon-wrap",children:t.jsx(dt,{icon:C,label:typeof m=="string"?m:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),b=p==="disabled",v=`side-nav__item ${i?"active":""} ${p||""} ${b?"disabled":""} ${r?.child?"side-nav__item--child":""}`,_=o.useCallback(g=>{if(b)return;const w=g.detail>0;if(w)try{g.currentTarget.blur()}catch{}c?.(d,g.currentTarget,w)},[b,d,c]);return t.jsxs("button",{type:"button",className:v,onClick:_,"aria-label":typeof m=="string"?gu(n,m,x):void 0,"aria-current":i?"page":void 0,style:u,"aria-disabled":b,children:[y,t.jsx("span",{className:"side-nav__label button-1 f",style:h,children:m}),x>0&&t.jsx(Ln,{position:"inline",number:Math.min(x,99),size:24,"aria-hidden":!0}),p==="loading"&&t.jsx("span",{className:"side-nav__spinner",role:"img","aria-label":n("loader.loading","\uBD88\uB7EC\uC624\uB294 \uC911\u2026")})]})}function yu(e){const{t:n}=Ee.useTranslation(),{items:r=[],activeKey:a,onChange:s,unreadCount:l,onDebug:i,onNotification:c,onAccount:u,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:C,scrollContainer:x}=e||{},y=m==="manager",b=o.useCallback(()=>C?.(y?"malgwi":"manager"),[C,y]),v=o.useRef(null),[_,g]=o.useState(null);o.useEffect(()=>{const B=v.current;if(!B)return;let E=null;const k=()=>{const{scrollHeight:$,clientHeight:V,scrollTop:F}=B;if($<=V+1){g(ie=>ie===null?ie:null);return}const U=Math.max(24,V/$*V),T=V-U,z=$-V,W={top:Math.round(F/z*T),height:Math.round(U)};g(ie=>ie&&ie.top===W.top&&ie.height===W.height?ie:W)},j=()=>{if(typeof requestAnimationFrame>"u"){k();return}E===null&&(E=requestAnimationFrame(()=>{E=null,k()}))};k(),B.addEventListener("scroll",j,{passive:!0});const S=typeof ResizeObserver<"u"?new ResizeObserver(j):null;S?.observe(B);for(const $ of Array.from(B.children))S?.observe($);return()=>{E!==null&&cancelAnimationFrame(E),B.removeEventListener("scroll",j),S?.disconnect()}},[r]);const w=o.useRef(null),N=o.useCallback(B=>{const E=v.current;E&&(B.preventDefault(),w.current={y:B.clientY,top:E.scrollTop},B.currentTarget.setPointerCapture(B.pointerId))},[]),f=o.useCallback(B=>{const E=v.current,k=w.current;!E||!k||(E.scrollTop=k.top+(B.clientY-k.y)*(E.scrollHeight/E.clientHeight))},[]),A=o.useCallback(B=>{w.current=null,B.currentTarget.hasPointerCapture(B.pointerId)&&B.currentTarget.releasePointerCapture(B.pointerId)},[]);return t.jsxs("nav",{"aria-label":n("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[t.jsxs("div",{ref:v,className:"side-nav__menu-list",children:[_&&t.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:t.jsx("div",{className:"side-nav__scroll-thumb",style:{top:_.top,height:_.height},onPointerDown:N,onPointerMove:f,onPointerUp:A,onPointerCancel:A})}),(r||[]).filter(B=>!B.section&&(B.key||B.label)).map((B,E)=>t.jsxs(o.Fragment,{children:[B.divider&&t.jsx("div",{className:"side-nav__separator"}),t.jsx(bu,{item:B,active:!!B.key&&B.key===a,state:B.disabled?"disabled":void 0,onClick:(k,j,S)=>{if(B.disabled)return;if(B.href){if(Cu(B.href)&&window.open(B.href,"_blank","noopener,noreferrer"),S)try{j?.blur()}catch{}return}if(s?.(B.key),Ko(x,"SideNav"),!S)return;try{j?.blur()}catch{}if(typeof window<"u"&&window.matchMedia){if(!window.matchMedia("(min-width: 768px) and (max-width: 1023px)").matches)return}else return;const $=document.querySelector(".header");if($){const V=typeof $.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&V&&$.matches(":hover"))){$.classList.add("header--force-collapsed");const F=()=>{$.classList.remove("header--force-collapsed"),$.removeEventListener("mouseenter",F)};$.addEventListener("mouseenter",F)}}}})]},B.key??`side-nav__item-${E}`)),C&&t.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),C&&t.jsx(bu,{item:{key:"__mode-switch__",label:y?n("nav.goToMalgwi","\uB9D0\uADC0\uB85C \uC774\uB3D9"):n("nav.goToManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9"),icon:y?"arrow-left":"arrow-right"},onClick:b})]}),t.jsx(M2,{activeKey:a,unreadCount:l,onDebug:i,onNotification:c,onAccount:u,onSetting:p,onHelp:h,onFeedback:d})]})}var La='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>',Zo='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>',$2='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 vu({src:e,alt:n,className:r,style:a,tone:s,textColor:l}){const i=!s&&!!l,c=k2(e,i),u="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return s?t.jsx("span",{className:ke("brand-logo","brand-logo--tone",r),role:n?"img":void 0,"aria-label":n||void 0,"aria-hidden":n?void 0:!0,style:{...a,"--brand-logo-src":`url("${e}")`,"--brand-logo-tone":s},children:t.jsx("img",{src:e,alt:"","aria-hidden":"true",className:"brand-logo__sizer",draggable:!1})}):i&&c?t.jsx("span",{className:ke("brand-logo","brand-logo--inline",r),role:n?"img":void 0,"aria-label":n||void 0,"aria-hidden":n?void 0:!0,style:{...a,"--brand-logo-text-color":l},dangerouslySetInnerHTML:{__html:w2(_2(c),u)}}):t.jsx("img",{src:e,alt:n,className:ke("brand-logo",r),style:a,draggable:!1})}function xu({appMode:e}){const{t:n}=Ee.useTranslation(),r=e==="manager",a=r?Zo:La,s=$2;return t.jsxs("div",{className:"brand-identity__root","aria-label":n("header.biArea","BI \uC601\uC5ED"),children:[t.jsx("img",{src:s,alt:n("header.biSymbol","BI \uC2EC\uBCFC"),className:"brand-identity__image brand-identity__image--symbol"}),r?t.jsx("img",{src:a,alt:n("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"),className:"brand-identity__image brand-identity__image--logo"}):t.jsx(vu,{src:a,alt:n("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0"),textColor:"light-dark(var(--color-pureBlack), var(--color-text-primary))",className:"brand-identity__image brand-identity__image--logo"})]})}function _u({activeKey:e,onChange:n,items:r,malgwiItems:a,managerItems:s,unreadCount:l,onDebug:i,onNotification:c,onAccount:u,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:C,scrollContainer:x}){const{t:y}=Ee.useTranslation(),b=wn("(max-width: 767px)"),v=o.useMemo(()=>(r??[]).filter($=>!$.section&&($.key||$.label)).map($=>({key:$.key,label:typeof $.label=="string"?$.label:void 0,icon:$.icon,state:$.disabled?"disabled":void 0,badgeCount:$.badge})),[r]),_=o.useCallback($=>{const V=r?.find(F=>F.key===$);if(!V?.disabled){if(V?.href){Cu(V.href)&&window.open(V.href,"_blank","noopener,noreferrer");return}n?.($)}},[r,n]),g=o.useMemo(()=>{const $=[];return i&&$.push({key:"debug",icon:"terminal",label:y("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),h&&$.push({key:"help",icon:"message-circle-question-mark",label:y("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:h}),c&&$.push({key:"notifications",icon:"bell",label:y("nav.notifications","\uC54C\uB9BC"),badgeCount:l,onClick:c}),p&&$.push({key:"settings",icon:"settings",label:y("nav.settings","\uC124\uC815"),onClick:p}),d&&$.push({key:"feedback",icon:"bug",label:y("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:d}),u&&$.push({key:"account",icon:"user-round",label:y("nav.account","\uACC4\uC815"),onClick:u}),$},[y,i,c,p,h,d,u,l]),w=o.useCallback(($,V)=>({position:"fixed",top:$.bottom+8,right:Math.max(8,window.innerWidth-$.right),zIndex:Qr(V)}),[]),N=o.useId(),{open:f,toggle:A,close:B,style:E,triggerRef:k,menuRef:j}=ea({computeStyle:w,onScroll:"ignore",onResize:"reposition"}),S=o.useMemo(()=>[{items:g.map($=>({label:$.label,icon:$.icon,badgeCount:$.badgeCount,selected:$.selected??(!!$.key&&$.key===e),closeOnSelect:!0,onClick:()=>{$.onClick?.(),B()}}))}],[g,e,B]);return t.jsxs("aside",{className:`header${m==="manager"?" header--manager":""}`,children:[t.jsxs("div",{className:"header__bi",children:[t.jsx(xu,{appMode:m}),t.jsxs("div",{className:"header__menu-button",ref:k,children:[t.jsx(ye,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:c&&l&&l>0?y("nav.badgeInsideLabel",{label:y("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:l,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):y("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:A,"aria-expanded":f,"aria-controls":f?N:void 0}),!!c&&!!l&&l>0&&t.jsx(Ln,{number:Math.min(l,99),size:24,"aria-hidden":!0}),f&&gn.createPortal(t.jsx("div",{id:N,role:"group","aria-label":y("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:le("tooltip__content"),style:E,ref:j,children:t.jsx(ta,{columns:S,onClose:B})}),document.body)]})]}),t.jsx(yu,{scrollContainer:x,items:r,activeKey:e??void 0,onChange:n,unreadCount:l,onDebug:i,onNotification:c,onAccount:u,onSetting:p,onHelp:h,onFeedback:d,appMode:m,onAppModeChange:C}),b&&t.jsx(fu,{items:v,activeKey:e??void 0,onChange:_,scrollContainer:x,appMode:m,onAppModeChange:C})]})}const L2=_u;function un(e){const{type:n="dot",size:r,className:a="","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)&&jt("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&&jt("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:c,children:u,variant:p="default",fill:h="filled",useBg:d=!0,minWidth:m,iconLeft:C,iconRight:x,color:y}=e,b=n==="bar",v=typeof r=="number"?"medium":r??"medium",_=(b?{small:"caption-2",medium:"body-3",large:"body-2"}:{small:"caption-2b",medium:"body-3b",large:"body-2b"})[v]??(b?"body-2":"body-2b"),g={small:12,medium:14,large:16}[v]??14,w=ke("badge",b?"badge--bar":"",`badge--${p}`,`badge--${v}`,h!=="filled"?`badge--${h}`:"",h==="outline"&&!d?"badge--no-bg":"",_,a),N=y?.startsWith("--")?`var(${y})`:y,f=m!==void 0||N?{...m!==void 0?{minWidth:typeof m=="number"?`${m}px`:m}:{},...N?{"--badge-color":N}:{}}:void 0;return t.jsxs("span",{className:w,style:f,"aria-label":l?void 0:s,role:i??(s&&!l?"img":void 0),"aria-hidden":l||void 0,children:[C&&t.jsx(dt,{icon:C,size:g,className:"badge__icon"}),c??u,x&&t.jsx(dt,{icon:x,size:g,className:"badge__icon"})]})}const R2=()=>Jt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function wu(e){if(!(e==null||e==="")){if(typeof e=="string"&&/^\s*\d[\d,]*\s*$/.test(e)){const n=Number(e.replace(/[,\s]/g,""));if(Number.isFinite(n))return Br(`${n.toLocaleString("ko-KR")}\uC6D0`)}return Br(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function P2(e){const n=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(n)?"manager":"speechear"}function F2(e){if(e.durationDays&&e.durationDays>0){const l=e.durationDays;return l%365===0?`${l/365}\uB144`:`${l}\uC77C`}const n=(e.code??"").match(/(\d+)(d|y)\b/i);if(n)return n[2].toLowerCase()==="y"?`${n[1]}\uB144`:`${n[1]}\uC77C`;const r=e.name??"",a=r.match(/(\d+\s*(?:년|개월|주|일))\s*(?:이용권)?\s*$/);if(a)return a[1].replace(/\s+/g,"");const s=r.match(/(\d+)\s*-?\s*(day|year)s?\b/i);return s?s[2].toLowerCase()==="year"?`${s[1]}\uB144`:`${s[1]}\uC77C`:r||R2()}function I2(e){const n=(e??"").match(/(\d+)(d|y)\b/i);if(!n)return null;const r=Number(n[1]);return n[2].toLowerCase()==="y"?r*365:r}function Bu(e){return{type:e.type??P2(e),plan:F2(e),label:e.label,price:wu(e.price),originalPrice:wu(e.originalPrice),discountLabel:e.discountLabel}}var O2='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>',z2='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>',ku='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 cr={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},Xo=new WeakMap;function W2(e){if(e)return Xo.get(e)}function Hn(e,n){e&&(e.style.setProperty(cr.text,n.text),e.style.setProperty(cr.sub,n.sub),n.copyrightColor&&e.style.setProperty(cr.copyright,n.copyrightColor),Xo.set(e,n))}function Vn(e){e&&(e.style.removeProperty(cr.text),e.style.removeProperty(cr.sub),e.style.removeProperty(cr.copyright),Xo.delete(e))}const Au={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-text-primary)"};function Nu(e={}){const n=Wt(Au,Hn,Vn);return t.jsxs("div",{ref:n,className:"pass-card-bg pass-card-bg-two-circle","aria-hidden":"true",children:[t.jsx("div",{className:"pass-card-bg-two-circle__c1"}),t.jsx("div",{className:"pass-card-bg-two-circle__c3"}),t.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-two-circle__symbol",style:{"--symbol-url":`url("${ku}")`}})]})}const Eu="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",Nr=240;var na='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 H2={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},V2=100,q2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function ju(e={}){const n=Wt(H2,Hn,Vn),r="var(--color-main)",a=270,s=170;return t.jsxs("div",{ref:n,className:"pass-card-bg pass-card-bg-sound-move","aria-hidden":"true",children:[t.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:q2.map(({scale:l,opacity:i},c)=>t.jsx("g",{transform:`translate(${a} ${s}) scale(${l*V2/Nr}) translate(${-Nr/2} ${-Nr/2})`,opacity:i,children:t.jsx("path",{d:Eu,fill:"none",stroke:r,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},c))}),t.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move__symbol",style:{"--symbol-url":`url("${na}")`}})]})}const U2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},G2=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 Y2(e={}){const n=Wt(U2,Hn,Vn),r="#ffffff",a=270,s=170;return t.jsxs("div",{ref:n,className:"pass-card-bg pass-card-bg-sound-move-v1","aria-hidden":"true",children:[t.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:K2.map(({scale:l,opacity:i},c)=>t.jsx("g",{transform:`translate(${a} ${s}) scale(${l*G2/Nr}) translate(${-Nr/2} ${-Nr/2})`,opacity:i,children:t.jsx("path",{d:Eu,fill:"none",stroke:r,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},c))}),t.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move-v1__symbol",style:{"--symbol-url":`url("${ku}")`}})]})}const Z2={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function X2(e={}){const n=Wt(Z2,Hn,Vn);return t.jsxs("div",{ref:n,className:"pass-card-bg pass-card-bg-talk","aria-hidden":"true",children:[t.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--left"}),t.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--right"}),t.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk__symbol",style:{"--symbol-url":`url("${na}")`}})]})}const J2={Logo_SpeechEar_ko:{"":La,_mono:O2},Logo_SpeechEarManager_ko:{"":Zo,_mono:z2}};function Q2(e,n){if(e)return J2[e]?.[n??""]??void 0}const ev={speechear:La,manager:Zo},tv={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},Du=10;function nv(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 Su(e,n){if(e<=0)return n("passCard.remainingSecond",{n:0});const r=Math.floor(e/86400);if(r>0)return n("passCard.remainingDay",{n:r});const a=Math.floor(e/3600);if(a>0)return n("passCard.remainingHour",{n:a});const s=Math.floor(e/60);return s>0?n("passCard.remainingMinute",{n:s}):n("passCard.remainingSecond",{n:Math.floor(e)})}function rv(e,n,r){if(e==="manager"){const a=/년/.test(n)||/yr|year/i.test(n)||/1년|365/.test(n),s=r==="\uC624\uD508\uD2B9\uAC00"||r===Jt.t("passCard.specialLabel");return a?t.jsx(X2,{}):s?t.jsx(Y2,{}):t.jsx(ju,{})}return t.jsx(Nu,{})}function Tu({ariaLabel:e,product:n,showPrice:r=!1,plan:a,type:s,endDate:l,remainingSeconds:i,endInclusive:c=!1,state:u="active",bg:p,bgOnly:h=!1,textColor:d,subColor:m,copyrightColor:C,logoSrc:x,label:y,price:b,originalPrice:v,discountLabel:_,onUse:g,onRefund:w,onDelete:N}){const{t:f}=Ee.useTranslation(),A=n?Bu(n):void 0,B=s??A?.type??"speechear",E=a??A?.plan??f("passCard.planSuffix","\uC774\uC6A9\uAD8C"),k=y??A?.label,j=b??(r?A?.price:void 0),S=v??(r?A?.originalPrice:void 0),$=_??A?.discountLabel,V=o.useMemo(()=>{if(j)return null;const K=n?.durationDays??I2(n?.code);if(!K||K<=0)return i!=null?{percent:null,remainingLabel:Su(i,f)}:null;const O=K*86400;let I;if(i!=null)I=i;else if((u==="active"||u==="expired")&&l){const re=new Date(l).getTime();if(Number.isNaN(re))return null;const _e=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(l)),De=/^(\d{4})-(\d{2})-(\d{2})/.exec(Zr()),Se=Math.round(_e&&De?(Date.UTC(+_e[1],+_e[2]-1,+_e[3])-Date.UTC(+De[1],+De[2]-1,+De[3]))/864e5:(re-Date.now())/864e5);I=Math.max(0,c?Se+1:Se)*86400}else u==="expired"?I=0:I=O;const ae=nv(I),he=Math.max(0,Math.min(100,Math.floor(Math.min(ae,O)/O*100)));return u==="pending"&&he>=100?null:{percent:he,remainingLabel:u==="expired"?f("passCard.expired","\uB9CC\uB8CC\uB428"):Su(I,f)}},[j,u,l,i,c,n?.durationDays,n?.code,f]),F=o.useRef(null),[U,T]=o.useState({}),[z,W]=o.useState(null),ie=!!(g||w||N),Q=o.useRef(!1),L=o.useRef(void 0),[J,ee]=o.useState(x);o.useLayoutEffect(()=>{ee(x)},[x]),o.useLayoutEffect(()=>{const K=F.current;K&&(d!==void 0&&K.style.setProperty("--pass-card-text",d),m!==void 0&&K.style.setProperty("--pass-card-sub",m),C!==void 0&&K.style.setProperty("--pass-card-copyright",C))},[d,m,C]),o.useLayoutEffect(()=>{const K=F.current;if(!K)return;const O=W2(K);if(!x){const I=tv[B],ae=u==="expired"?"_mono":O?.logoColor??"",he=Q2(I,ae);ee(he)}},[p,x,B,u]);const q=K=>{const O=F.current;if(!O)return null;const{left:I,top:ae,width:he,height:re}=O.getBoundingClientRect(),_e=(K.clientX-I)/he-.5;return{rotateX:-((K.clientY-ae)/re-.5)*Du,rotateY:_e*Du}},P=(K,O)=>{const I=O*-.7,ae=K*.7+10,he=20+(Math.abs(K)+Math.abs(O))*.4;return`${I}px ${ae}px ${he}px rgba(0, 0, 0, 0.18)`},R=o.useCallback(K=>{if(ir())return;Q.current=!0,clearTimeout(L.current),L.current=setTimeout(()=>{Q.current=!1},200);const O=q(K);O&&T({transform:`perspective(800px) rotateX(${O.rotateX}deg) rotateY(${O.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:P(O.rotateX,O.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)"})},[]),D=o.useCallback(K=>{if(ir())return;const O=q(K);if(!O)return;const I=Q.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";T({transform:`perspective(800px) rotateX(${O.rotateX}deg) rotateY(${O.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:P(O.rotateX,O.rotateY),transition:I})},[]),H=o.useCallback(()=>{clearTimeout(L.current),Q.current=!1,T({transform:"perspective(800px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.08)",transition:"transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),ne=o.useCallback(()=>W(null),[]),te=o.useMemo(()=>{const K=f("passCard.planSuffix","\uC774\uC6A9\uAD8C"),O=E.replace("\uC774\uC6A9\uAD8C","").replace(K==="\uC774\uC6A9\uAD8C"?"":K,"").trim(),I=O.match(/^(.*?)(일|년)$/);return I?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"h0 pass-card__plan-number",children:I[1]}),t.jsx("span",{className:"h5b pass-card__plan-unit",children:I[2]==="\uB144"?f("passCard.unitYear","\uB144"):f("passCard.unitDay","\uC77C")})]}):t.jsx("span",{className:"h0",children:O})},[E,f]),ue=o.useMemo(()=>{const K=Br(j);if(!K)return null;const O=K.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!O)return t.jsx("span",{className:"h1",children:K});const[,I,ae,he]=O;return t.jsxs(t.Fragment,{children:[I&&t.jsx("span",{className:"h5 pass-card__price-symbol",children:I}),t.jsx("span",{className:"h1 pass-card__price-amount",children:ae}),he.trim()&&t.jsx("span",{className:"h5 pass-card__price-symbol",children:he.trim()})]})},[j]),se=o.useCallback(()=>{ie&&W(K=>{if(K)return null;const O=F.current?.getBoundingClientRect();if(!O)return null;const I=50;return{left:O.left,right:O.right,width:O.width,height:O.height,x:O.x,y:O.y+I,top:O.top+I,bottom:O.bottom+I}})},[ie]),pe=o.useCallback(K=>{ie&&(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),se())},[ie,se]),G=[{items:[...g?[{label:f("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{g(),W(null)},closeOnSelect:!0}]:[],...w?[{label:f("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{w(),W(null)},closeOnSelect:!0}]:[],...N?[{label:f("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{N(),W(null)},closeOnSelect:!0}]:[]]}];return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"pass-card-frame",children:t.jsxs("div",{ref:F,className:`pass-card pass-card--${u}${ie?" pass-card--clickable":""}`,style:U,onMouseEnter:R,onMouseMove:D,onMouseLeave:H,onPointerUp:K=>{K.pointerType==="touch"&&H()},onPointerCancel:K=>{K.pointerType==="touch"&&H()},onClick:se,onKeyDown:ie?pe:void 0,role:ie?"button":void 0,tabIndex:ie?0:void 0,"aria-label":e,"aria-haspopup":ie?"menu":void 0,"aria-expanded":ie?!!z:void 0,children:[p??rv(B,E,k),!h&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"pass-card__top",children:t.jsxs("div",{className:"pass-card__top-left",children:[t.jsx("img",{src:J??ev[B],className:"pass-card__logo",alt:B==="manager"?f("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):f("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),t.jsxs("div",{className:"pass-card__plan",children:[t.jsx("div",{children:te}),t.jsx("span",{className:"h5b pass-card__plan-suffix",children:k?f("passCard.labeledPlan",{label:k}):f("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),j?t.jsxs("div",{className:"pass-card__price-area",children:[$&&t.jsx("span",{className:"pass-card__discount body-3",children:$}),t.jsxs("div",{className:"pass-card__price",children:[S&&t.jsx("span",{className:"pass-card__price-original body-3",children:Br(S)}),ue]})]}):V?t.jsxs("div",{className:"pass-card__usage",children:[t.jsx("span",{className:"h5b pass-card__usage-remaining",children:V.remainingLabel}),V.percent!=null&&t.jsxs("span",{className:"pass-card__usage-percent",children:[t.jsx("span",{className:"h1 pass-card__usage-value",children:V.percent}),t.jsx("span",{className:"h5b pass-card__usage-symbol",children:"%"})]})]}):t.jsx("div",{className:"pass-card__copyright caption-2","aria-hidden":"true",children:"\xA9 IHAB Corp. All rights reserved."})]})]})}),z&&t.jsx(En,{anchorRect:z,onClose:ne,ariaLabel:f("tooltip.menu","\uBA54\uB274"),children:t.jsx(ta,{columns:G,onClose:ne,size:"small"})})]})}const av={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-text-primary)"};function ov(e={}){const n=`passcard-sound-line-grad-${o.useId()}`,r=Wt(av,Hn,Vn);return t.jsxs("div",{ref:r,className:"pass-card-bg pass-card-bg-sound-line","aria-hidden":"true",children:[t.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:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:n,x1:"0",y1:"0",x2:"1",y2:"0",children:[t.jsx("stop",{offset:"20%",stopColor:"var(--color-main)"}),t.jsx("stop",{offset:"80%",stopColor:"var(--color-sub)"})]})}),t.jsx("g",{transform:"translate(25, 45)",children:t.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(#${n})`,strokeWidth:"50",strokeLinecap:"round"})})]}),t.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-line__symbol",style:{"--symbol-url":`url("${na}")`}})]})}const sv={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function lv(e={}){const n=Wt(sv,Hn,Vn);return t.jsxs("div",{ref:n,className:"pass-card-bg pass-card-bg-talk-v1","aria-hidden":"true",children:[t.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--left"}),t.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--right"}),t.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk-v1__symbol",style:{"--symbol-url":`url("${na}")`}})]})}function iv(e,n){if(e){if(n==="manager_pro")return t.jsx(lv,{});if(n==="manager_standard")return t.jsx(ov,{});if(n==="manager_lite")return t.jsx(ju,{})}}function uv(e){const n=Br(e);if(!n)return null;const r=n.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!r)return n;const[,a,s,l]=r;return t.jsxs(t.Fragment,{children:[a&&t.jsx("span",{className:"payment-plan__pricing-symbol h4",children:a}),s,l.trim()&&t.jsx("span",{className:"payment-plan__pricing-symbol h4",children:l.trim()})]})}function cv(e){const{t:n}=Ee.useTranslation(),r=n("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),a=n("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:s,onSelect:l,period:i="monthly",ownedCodes:c,titleLevel:u=3}=e||{},p=u?`h${u}`:"div",h=f=>!!f&&!!c?.includes(f),d=f=>f.onceOnly??/오픈\s*특가/.test(f.label??""),m=(s.tiers||[]).some(f=>d(f)&&h(f.code)),C=f=>{const A=f.prices?f.prices[i]:f.price;return A?(s.tiers||[]).some(B=>!!B.badge&&B.originals?.[i]===A):!1},x=s.colorToken?`var(--color-${s.colorToken})`:"var(--color-gray)",y=n("payment.plan.freePrice","\uBB34\uB8CC"),b=n("payment.products.mgrEnterprise.tier.price","\uBB38\uC758"),v=f=>f.prices?f.prices[i]:f.price,_=(s.tiers||[]).length>0&&(s.tiers||[]).every(f=>{const A=v(f);return A==="\uBB34\uB8CC"||A===y||A==="0\uC6D0"||typeof A=="string"&&/\d/.test(A)&&!/[1-9]/.test(A)}),g=(s.tiers||[]).length>0&&(s.tiers||[]).every(f=>{const A=v(f);return A==="\uBB38\uC758"||A===b}),w=s.group==="org",N=w?"manager":"speechear";return t.jsxs("div",{className:"payment-plan__card",style:{borderColor:x,"--plan-color":x},children:[s.cardBadge&&t.jsx("div",{className:"payment-plan__card-badge",children:t.jsx(un,{label:s.cardBadge,variant:"main",size:"medium",fill:"soft"})}),t.jsxs("div",{className:"payment-plan__title",children:[t.jsx("p",{className:"payment-plan__quote body-3b",style:{color:x},children:s.quote||"\xA0"}),t.jsx(p,{className:"payment-plan__title-heading h1",children:s.tier??s.title}),t.jsx("p",{className:"payment-plan__subtitle body-3",children:s.subtitle})]}),t.jsxs("div",{className:"payment-plan__box",children:[t.jsx("span",{className:"payment-plan__box-title body-3b",children:n("payment.plan.recommendedFor","\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.")}),t.jsx("ul",{className:"payment-plan__feature-list",children:(s.recommendedFor||[]).map((f,A)=>t.jsxs("li",{className:"payment-plan__feature-item body-3",children:[t.jsx(dt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:x}}),f]},A))})]}),t.jsxs("div",{className:"payment-plan__box",children:[t.jsx("span",{className:"payment-plan__box-title body-3b",children:n("payment.plan.features","\uD575\uC2EC \uAE30\uB2A5")}),t.jsx("ul",{className:"payment-plan__feature-list",children:(s.features||[]).map((f,A)=>t.jsxs("li",{className:"payment-plan__feature-item body-3",children:[t.jsx(dt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:x}}),f]},A))})]}),t.jsx("div",{className:"payment-plan__card-pricing",children:_?null:g?t.jsx(ye,{htmlType:"button",className:"payment-plan__contact-button",label:n("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})}):t.jsx(t.Fragment,{children:t.jsx("div",{className:"payment-plan__pricing-list",children:(s.tiers||[]).map(f=>{const A=f.label||r,B=d(f),E=B||f.openPromo===!0,k=A.replace(/^오픈\s*특가\s*/,"")||r,j=f.prices?f.prices[i]:f.price,S=f.badge?E?`${a}
828
- ${f.badge}`:f.badge:void 0;if(B&&h(f.code))return null;if(!f.badge&&!m)return C(f)?null:t.jsxs("div",{className:`payment-plan__pricing-row payment-plan__pricing-row--static${f.highlight?" payment-plan__pricing-row--highlight":""}`,children:[t.jsx("div",{className:"payment-plan__pricing-row-title",children:t.jsx("div",{className:"payment-plan__pricing-row-label h5b",children:f.label})}),t.jsx("div",{className:"payment-plan__pricing-row-price",children:t.jsx("span",{className:"payment-plan__pricing-current h1",children:uv(j)})})]},f.id);const $=s.tier??(w?s.title:void 0),V=t.jsx(Tu,{showPrice:!0,product:{type:N,code:f.code,name:k,label:$,price:j,originalPrice:f.originals?.[i]??void 0,discountLabel:S},bg:iv(w,s.id)}),F=()=>l?.({...f,productId:s.id,productTitle:s.title,preview:V});return t.jsx("div",{className:"payment-plan__pricing-card",onClick:F,onKeyDown:l?U=>{U.target===U.currentTarget&&(U.key==="Enter"||U.key===" ")&&(U.preventDefault(),F())}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:V},f.id)})})})})]})}function dv({variant:e="default"}){return t.jsxs("div",{className:`pass-card-bg pass-card-bg--${e}`,"aria-hidden":"true",children:[t.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--1"}),t.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--2"}),t.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--3"})]})}var Jo='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_IHAB_en" xmlns="http://www.w3.org/2000/svg" width="765.08" height="240" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 765.08 240"><defs><linearGradient id="linear-gradient" x1="62.99" y1="62.99" x2="190.71" y2="190.71" gradientUnits="userSpaceOnUse"><stop offset=".2" stop-color="%23499cdf"/><stop offset=".8" stop-color="%234dcdc0"/></linearGradient></defs><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="url(%23linear-gradient)"/><g id="text"><path d="M316.21,190.6h-36.74V50.61h36.74v139.99Z"/><path d="M335.16,50.61h36.74v55.11h51.63v-55.11h36.93v139.99h-36.93v-55.11h-51.63v55.11h-36.74V50.61Z"/><path d="M473.99,190.6l46.6-139.99h50.08l46.41,139.99h-39.64l-8.31-27.46h-46.99l-8.31,27.46h-39.83ZM560.62,135.3l-14.5-46.99h-1.16l-14.31,46.99h29.97Z"/><path d="M631,50.61h59.94c31.9,0,48.73,13.73,48.73,35.19,0,15.47-11.02,27.26-26.88,30.55v1.35c17.6.58,32.29,13.54,32.29,33.45,0,22.82-18.56,39.45-49.11,39.45h-64.97V50.61ZM701.77,93.53c0-8.89-6.96-13.92-17.02-13.92h-17.02v27.84h16.44c10.25,0,17.6-5.03,17.6-13.92ZM706.22,146.51c0-10.25-7.35-16.05-19.14-16.05h-19.34v30.55h18.76c13.15,0,19.72-5.03,19.72-14.5Z"/></g></svg>';const Mu={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-text-muted)"};function pv(){const e=Wt(Mu,Hn,Vn);return t.jsx("div",{ref:e,className:"pass-card-bg pass-card-bg-ihab","aria-hidden":"true",children:t.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-ihab__symbol-top",style:{"--symbol-url":`url("${Jo}")`}})})}const $u={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function hv(e={}){const n=Wt($u,Hn,Vn);return t.jsxs("div",{ref:n,className:"pass-card-bg pass-card-bg-left-color-grid","aria-hidden":"true",children:[t.jsx("div",{className:"pass-card-bg-left-color-grid__bar"}),t.jsx("div",{className:"pass-card-bg-left-color-grid__grid"}),t.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-left-color-grid__symbol",style:{"--symbol-url":`url("${na}")`}})]})}function Lu({keys:e,anchor:n="top-right",scale:r,className:a=""}){const s=Array.isArray(e)?e:[e];return t.jsx("span",{className:ke("shortcut-badge",`shortcut-badge--${n}`,a),style:r===void 0?void 0:{"--shortcut-badge-scale":String(r)},children:s.map((l,i)=>t.jsxs("span",{className:"shortcut-badge__group",children:[i>0&&t.jsx("span",{className:"shortcut-badge__plus",children:"+"}),t.jsx("kbd",{className:"shortcut-badge__key",children:l})]},`${l}-${i}`))})}const ra=(e,n,r)=>e+(n-e)*r;function mv({speakers:e,size:n=300,viewT:r=0,activeSpeakerId:a=null,playedIds:s,selectedId:l=null,answerId:i=null,showFeedback:c=!1,pulseSelected:u=!1,pulseSelectedDuration:p,pulseScale:h,clickable:d=!1,onSelectSpeaker:m,buttonSize:C=40,showIcon:x=!0,onCenterClick:y,centerLabel:b,centerDisabled:v=!1,centerAttention:_=!1,shortcutAnchor:g="top-right",shortcutScale:w,scaleShortcut:N=!1}){const{t:f}=Ee.useTranslation(),A=Math.max(0,Math.min(1,r)),B=n/2,E=110/300,k=.18,j=O=>n*(E+(O-1)*k),S=O=>{const I=j(O.row??1),ae=O.angleDeg*Math.PI/180;return{x:B+I*Math.cos(ae),y:B+I*Math.sin(ae)}},$=Math.max(...e.map(O=>O.row??1),1),V=n*.08,F=n*.1,U=n*.24,T=n-2*V,z=n-F-U,W=n-U/2,ie=o.useMemo(()=>[...new Set(e.map(O=>O.deg))].sort((O,I)=>O-I),[e]),Q=ie.length,L=Math.max(68,Q>1?T/(Q-1):0),J=o.useMemo(()=>new Map(ie.map((O,I)=>[O,I])),[ie]),ee=O=>{const I=J.get(O.deg)??0,ae=B+(I-(Q-1)/2)*L,he=$>1?Math.min(68,z/($-1)):0,re=he*($-1),_e=F+(z-re)/2,De=$===1?F+z*.4:_e+($-(O.row??1))*he;return{x:ae,y:De}},q=O=>{const I=S(O),ae=ee(O);return{x:ra(I.x,ae.x,A),y:ra(I.y,ae.y,A)}},P={x:B,y:ra(B,W,A)},R=Math.round(C*1.2),D=Math.round(Math.max(16,Math.min(80,C*.7))),H=[],ne=new Map;for(const O of e){const I=O.row??1;ne.has(I)||ne.set(I,[]),ne.get(I).push(O)}for(const[O,I]of ne.entries()){if(I.length<2)continue;const ae=[...I].sort((Ie,ot)=>Ie.deg-ot.deg),he=ae.map(Ie=>q(Ie)),re=ae.map(Ie=>Ie.deg),_e=re[re.length-1]-re[0],De=_e/(re.length-1),Se=360-_e,Ne=ae.length>=3&&De>0&&Se<=De*1.5,He=Math.round(j(O)*1e3)/1e3,ve=(Ie,ot,pt,Oe)=>{const Ue=(ot.angleDeg-Ie.angleDeg+540)%360-180;if(Ue===0)return`L ${Oe.x} ${Oe.y}`;if(A===0)return`A ${He} ${He} 0 0 ${Ue>0?1:0} ${Oe.x} ${Oe.y}`;const rt=(Ie.angleDeg+Ue/2)*Math.PI/180,ce={x:B+He*Math.cos(rt),y:B+He*Math.sin(rt)},Pe={x:(pt.x+Oe.x)/2,y:(pt.y+Oe.y)/2},Ye={x:ra(ce.x,Pe.x,A),y:ra(ce.y,Pe.y,A)},Qe={x:2*Ye.x-Pe.x,y:2*Ye.y-Pe.y};return`Q ${Qe.x} ${Qe.y} ${Oe.x} ${Oe.y}`},xe=Ne?[...ae,ae[0]]:ae,we=Ne?[...he,he[0]]:he;let Ae=`M ${we[0].x} ${we[0].y}`;for(let Ie=1;Ie<we.length;Ie++)Ae+=" "+ve(xe[Ie-1],xe[Ie],we[Ie-1],we[Ie]);H.push({key:`arc-${O}`,d:Ae})}const te=o.useMemo(()=>new Set(s??[]),[s]),ue=O=>({idle:"",active:f("soundCompass.state.active","\uC18C\uB9AC \uB098\uB294 \uC911"),played:f("soundCompass.state.played","\uB4E4\uC74C"),correct:f("soundCompass.state.correct","\uC815\uB2F5"),wrong:f("soundCompass.state.wrong","\uC624\uB2F5")})[O],se=(O,I,ae,he)=>{const re=O+1,_e=new RegExp(`(^|[^0-9])${re}([^0-9]|$)`).test(I),De=!he||_e?I:`${re}, ${I}`;return ue(ae)?`${De}, ${ue(ae)}`:De},pe=O=>{if(a===O.id)return"active";if(c){if(O.id===i)return"correct";if(O.id===l&&l!==i)return"wrong"}return te.has(O.id)?"played":"idle"},G=O=>a===O.id?"loop":c?O.id===i?"loop":null:u&&O.id===l?"once":null,K=(O,I)=>{switch(O){case"played":case"correct":return t.jsx(sl,{size:I});case"wrong":return t.jsx(Cl,{size:I});default:return t.jsx(fl,{size:I})}};return t.jsx("div",{className:"sound-compass",children:t.jsxs("div",{className:"sound-compass__compass-wrap",style:{width:n,height:n},children:[t.jsxs("svg",{width:n,height:n,viewBox:`0 0 ${n} ${n}`,className:"sound-compass__svg",children:[A===0&&e.map(O=>{const{x:I,y:ae}=q(O);return t.jsx("line",{x1:P.x,y1:P.y,x2:I,y2:ae,stroke:"#dde3ec",strokeWidth:"1"},O.id)}),H.map(O=>t.jsx("path",{d:O.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},O.key))]}),_&&!v&&t.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:R,height:R,left:P.x-R/2,top:P.y-R/2}}),y?t.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${v?" sound-compass__center--disabled":""}`,style:{width:R,height:R,left:P.x,top:P.y},"aria-label":b,"aria-disabled":v||void 0,tabIndex:v?-1:0,onClick:v?void 0:y,children:t.jsx(so,{size:D,color:"currentColor",strokeWidth:1.5})}):t.jsx("div",{className:"sound-compass__center",style:{width:R,height:R,left:P.x,top:P.y},children:t.jsx(so,{size:D,color:"currentColor",strokeWidth:1.5})}),e.map((O,I)=>{const{x:ae,y:he}=q(O),re=pe(O),_e=G(O),De={...w!==void 0||N?{"--shortcut-badge-scale":String(w??Math.max(.75,Math.min(3,C/56)))}:null,pointerEvents:d?"auto":"none",cursor:d?"pointer":"default",zIndex:re!=="idle"?10:1},Se=C,Ne=Math.round(Math.max(10,Math.min(56,Se*.38))),He=Math.round(Math.max(7,Math.min(18,Se*.2))),ve=Math.round(Math.max(10,Math.min(56,Se*.4))),xe=x==="answered"&&(re==="played"||re==="correct"||re==="wrong"),we=x===!0||xe,Ae=!xe;return t.jsxs("div",{className:"sound-compass__speaker-pos",style:{...De,left:ae-Se/2,top:he-Se/2},children:[_e&&t.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${re}`+(_e==="once"?" sound-compass__pulse--once":""),style:{width:Se,height:Se,..._e==="once"&&p!==void 0?{"--sc-pulse-duration-once":`${p}ms`}:null,...h!==void 0?{"--sc-pulse-scale":String(h)}:null}}),t.jsxs("button",{type:"button",tabIndex:d?0:-1,"aria-disabled":d?void 0:!0,onClick:d?()=>m?.(O.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${re}`,style:{width:Se,height:Se},"aria-label":se(I,O.label,re,Ae),"aria-pressed":l!=null?O.id===l:void 0,children:[we&&K(re,Ne),Ae&&t.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:x===!0?He:ve},children:I+1})]}),O.shortcut&&t.jsx(Lu,{keys:O.shortcut,anchor:g,className:"sound-compass__speaker-shortcut"})]},O.id)})]})})}function fv({id:e,tone:n="plain",bare:r=!1,className:a,style:s,children:l}){return t.jsx("section",{id:e,className:ke("landing-section",n==="line"&&"landing-section--line",a),style:s,children:r?l:t.jsx("div",{className:"landing-section__inner",children:l})})}function Cv({badge:e,badgeVariant:n="white",title:r,sub:a,maxWidth:s,subMaxWidth:l,gap:i="m",noGap:c=!1,onBand:u=!1,align:p="left"}){const h={...c?null:{"--landing-title-gap":`var(--spacing-${i})`},...s?{maxWidth:`${s}px`}:null},d=l?{maxWidth:`${l}px`}:{},m=p==="center";return t.jsxs(t.Fragment,{children:[e?t.jsx("p",{className:ke(m&&"landing-title__badge--center"),style:{margin:0},children:t.jsx(un,{size:"large",fill:n==="white"?"filled":"soft",variant:n,children:e})}):null,t.jsx("h2",{className:ke("landing-title__text",c&&"landing-title__text--no-gap",m&&"landing-title__text--center"),style:h,children:r}),a?t.jsx("p",{className:ke("landing-title__sub",u&&"landing-title__sub--on-band",m&&"landing-title__sub--center"),style:d,children:a}):null]})}function gv({icon:e,title:n,desc:r,children:a,layout:s="stack",leadWidth:l=300,titleStyle:i,tight:c=!1,align:u="left",hover:p=!0,className:h,style:d}){const m=c?"landing-card--pad-tight":"landing-card--pad",C=t.jsxs(t.Fragment,{children:[e,n?t.jsx("h3",{className:"landing-card__title",style:i,children:n}):null,r?t.jsx("p",{className:"landing-card__desc",children:r}):null]});return s==="row"?t.jsxs("div",{className:ke("landing-card","landing-card--row",m,p&&"landing-card--hover",h),style:d,children:[t.jsx("div",{className:"landing-card__lead",style:{"--landing-card-lead-w":`${l}px`},children:C}),t.jsx("div",{className:"landing-card__panel",children:a})]}):t.jsxs("div",{className:ke("landing-card",m,u==="center"&&"landing-card--center",p&&"landing-card--hover",h),style:d,children:[C,a]})}function bv({href:e,tone:n="dark",arrow:r=!1,className:a,children:s}){return t.jsxs("a",{className:ke("landing-button",n!=="dark"&&`landing-button--${n}`,a),href:e,children:[s,r?t.jsx("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flex:"none"},children:t.jsx("path",{d:"m9 18 6-6-6-6"})}):null]})}const yv=1200,vv=.3;function xv(e){if(typeof e!="string")return null;const n=/^(\D*)(\d[\d,]*)(\D*)$/.exec(e.trim());if(!n)return null;const r=Number(n[2].replace(/,/g,""));return Number.isFinite(r)?{prefix:n[1],suffix:n[3],target:r,grouped:n[2].includes(",")}:null}function _v(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,",")}function wv(e){const n=o.useRef(null),[r,a]=o.useState(1);return o.useEffect(()=>{const s=n.current;if(e||!s||typeof IntersectionObserver!="function"){a(1);return}a(0);let l=0;const i=new IntersectionObserver(c=>{if(!c.some(h=>h.isIntersecting))return;i.disconnect();const u=performance.now(),p=h=>{const d=Math.min(1,(h-u)/yv);a(1-(1-d)**3),d<1&&(l=requestAnimationFrame(p))};l=requestAnimationFrame(p)},{threshold:vv});return i.observe(s),()=>{i.disconnect(),cancelAnimationFrame(l)}},[e]),[n,r]}function Bv({stats:e,className:n}){const r=ja(),[a,s]=wv(r);return t.jsx("div",{className:"landing-stat-band-wrap",children:t.jsx("div",{ref:a,className:ke("landing-stat-band",n),style:{gridTemplateColumns:`repeat(${e.length}, minmax(0, 1fr))`},children:e.map((l,i)=>{const c=xv(l.value),u=c?`${c.prefix}${c.grouped?_v(Math.round(c.target*s)):Math.round(c.target*s)}${c.suffix}`:null;return t.jsxs("div",{children:[t.jsx("p",{className:"landing-stat-band__value",children:u===null?l.value:t.jsxs(t.Fragment,{children:[t.jsx("span",{"aria-hidden":"true",children:u}),t.jsx("span",{className:"landing-stat-band__sr",children:l.value})]})}),t.jsx("p",{className:"landing-stat-band__label",children:l.label})]},i)})})})}function kv({orientation:e="horizontal",label:n,className:r=""}){const a=ke("divider",`divider--${e}`,n&&e==="horizontal"?"divider--labeled":"",r);return e==="vertical"?t.jsx("div",{className:a,role:"separator","aria-orientation":"vertical"}):n?t.jsxs("div",{className:a,role:"separator","aria-orientation":"horizontal",children:[t.jsx("span",{className:"divider__line"}),t.jsx("span",{className:"divider__label caption-1",children:n}),t.jsx("span",{className:"divider__line"})]}):t.jsx("div",{className:a,role:"separator","aria-orientation":"horizontal"})}function Ru({checked:e,onChange:n,name:r,value:a,disabled:s=!1,label:l,className:i=""}){const c=o.useId();return t.jsxs("label",{className:`radio${s?" radio--disabled":""} ${i}`.trim(),htmlFor:c,children:[t.jsx("input",{id:c,type:"radio",name:r,value:a,checked:e,disabled:s,onChange:u=>n?.(u.target.checked)}),t.jsx("span",{className:"radio__dot"}),l&&t.jsx("span",{className:"radio__label body-2",children:l})]})}function Av({options:e,value:n,onChange:r,name:a,disabled:s=!1,direction:l="vertical",className:i="",ariaLabel:c}){const u=o.useId(),p=a??`radio-group-${u}`;return t.jsx("div",{className:`radio-group radio-group--${l} ${i}`.trim(),role:"radiogroup","aria-label":c,children:e.map(h=>t.jsx(Ru,{name:p,value:h.value,checked:n===h.value,disabled:s||h.disabled,label:h.label,onChange:d=>{d&&r?.(h.value)}},h.value))})}const Nv={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function Ev({tone:e="info",title:n,message:r,children:a,dismissible:s=!1,onDismiss:l,live:i,className:c=""}){const{t:u}=Ee.useTranslation(),[p,h]=o.useState(!1),d=o.useRef(null),m=o.useCallback(()=>{const _=d.current;_&&_.contains(document.activeElement)&&Na(_),h(!0),l?.()},[l]);if(p)return null;const C=ke("alert",`alert--${e}`,c),x=i??(e==="danger"||e==="warning"?"assertive":"polite"),y=x==="assertive"?"alert":x==="polite"?"status":void 0,b=!!n,v=!!(r||a);return t.jsxs("div",{ref:d,className:C,role:y,children:[t.jsxs("div",{className:"alert__body",children:[t.jsxs("div",{className:"alert__header",children:[t.jsx(dt,{icon:Nv[e],size:20,className:"alert__icon"}),b&&t.jsx("span",{className:"alert__title body-2",children:n}),!b&&v&&t.jsx("div",{className:"alert__message body-3",children:r||a})]}),b&&v&&t.jsx("div",{className:"alert__message alert__message--indented body-3",children:r||a})]}),s&&t.jsx("button",{type:"button",className:"alert__dismiss",onClick:m,"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"})]})}const jv={ready:"search",guide:"info",error:"circle-alert"};function Dv(e,n){const r=n.filter(Boolean);if(r.length===0)return e;const a=[];let s=0,l=0;for(const i of r){const c=e.indexOf(i,s);c<0||(c>s&&a.push(e.slice(s,c)),a.push(t.jsx("strong",{className:"search-summary__em body-2",children:i},l++)),s=c+i.length)}return s<e.length&&a.push(e.slice(s)),a}function Sv({status:e="guide",label:n,children:r,emphasis:a,icon:s,className:l=""}){const i=s===!1?null:s??jv[e],c=ke("search-summary",`search-summary--${e}`,l),u=n??r,p=typeof u=="string"&&a&&a.length>0?Dv(u,a):u;return t.jsxs("div",{className:c,role:"status","aria-live":"polite",children:[i!=null&&t.jsx(dt,{icon:i,size:18,className:"search-summary__icon"}),t.jsx("span",{className:"search-summary__text body-2",children:p})]})}function aa({title:e,items:n}){const{t:r}=Ee.useTranslation(),{anchorRect:a,openAt:s,close:l}=Ma(),i=o.useRef(null),c=Da(!!a,(u,p)=>{u&&p?s(i.current?.querySelector("button")??p):l()},i);return t.jsxs("span",{ref:i,style:{display:"contents"},children:[t.jsx(ye,{htmlType:"button",size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!a,ariaLabel:r("common.info","\uC124\uBA85"),onPointerEnter:u=>{er(u)||s(u.currentTarget)},onPointerLeave:u=>{er(u)||l()},onClick:u=>{c.touchPress(u.currentTarget)},onFocus:u=>{ir()||s(u.currentTarget)},onBlur:l}),a&&t.jsx(Qn,{title:e,items:n,showIndex:n.length>1,anchorRect:a,onClose:l})]})}const mn=40,dr=32;function Tv({items:e=[],value:n,onChange:r,className:a="",size:s}){const l=_n(),i=s??l??mn,c=o.useId(),{t:u}=Ee.useTranslation(),p=o.useRef(null),h=e.find(v=>!v.disabled)?.key,d=e.some(v=>v.key===n)?n:h??e[0]?.key,m=e.find(v=>v.key===d&&!v.disabled)?.key??h,C=()=>Array.from(p.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),x=(v,_=C())=>{if(_.length===0)return;const g=(v%_.length+_.length)%_.length;_[g]?.focus(),_[g]?.click()},y=v=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(v.key))return;v.preventDefault();const _=C(),g=_.indexOf(v.currentTarget);v.key==="ArrowRight"||v.key==="ArrowDown"?x(g+1,_):v.key==="ArrowLeft"||v.key==="ArrowUp"?x(g-1,_):v.key==="Home"?x(0,_):x(_.length-1,_)},b=e.find(v=>v.key===d);return t.jsxs("div",{className:`tabs ${a}`.trim(),children:[t.jsx("div",{ref:p,className:`tabs__list tabs__list--${i}`,role:"tablist","aria-label":u("tabs.ariaLabel","\uD0ED"),children:e.map(v=>t.jsx("button",{id:`tabs__tab-${c}-${v.key}`,type:"button",role:"tab","aria-selected":v.key===d,"aria-controls":v.key===d?`tabs__panel-${c}-${v.key}`:void 0,disabled:v.disabled,tabIndex:v.key===m?0:-1,className:`tabs__tab body-2${v.key===d?" tabs__tab--active":""}`,onClick:()=>{v.key!==n&&r?.(v.key)},onKeyDown:y,children:v.label},v.key))}),b&&t.jsx("div",{id:`tabs__panel-${c}-${b.key}`,role:"tabpanel","aria-labelledby":`tabs__tab-${c}-${b.key}`,tabIndex:0,className:"tabs__panel",children:b.panel},b.key)]})}const Mv={xs:12,sm:16,md:20,lg:28,xl:36};function $v(e){const n=e.trim().split(/\s+/).filter(Boolean);return n.length===0?"":n.length===1?[...n[0]].slice(0,2).join("").toUpperCase():([...n[0]][0]+[...n[n.length-1]][0]).toUpperCase()}function Lv({src:e,name:n,size:r="md",shape:a="circle",className:s=""}){const{t:l}=Ee.useTranslation(),[i,c]=o.useState(null),u=!!e&&i===e,p=n?$v(n):"",h=!!e&&!u,d=!h&&!!p,m=n||l("avatar.ariaLabel","\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0");return t.jsxs("span",{className:`avatar avatar--${r} avatar--${a} ${s}`.trim(),role:"img","aria-label":m,children:[h&&t.jsx("img",{className:"avatar__image",src:e,alt:m,onError:()=>c(e??null)}),!h&&d&&t.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:p}),!h&&!d&&t.jsx(dt,{icon:"user-round",size:Mv[r],className:"avatar__icon"})]})}function Rv(e,n){if(!n)return!0;const r=n.split(",").map(l=>l.trim()).filter(Boolean);if(r.length===0)return!0;const a=e.name.toLowerCase(),s=e.type.toLowerCase();return r.some(l=>{const i=l.toLowerCase();return i.startsWith(".")?a.endsWith(i):i.endsWith("/*")?s.startsWith(i.slice(0,-1)):s===i})}function Pv({onFilesSelected:e,accept:n,multiple:r=!1,disabled:a=!1,showFileList:s=!0,files:l,onRemove:i,className:c=""}){const{t:u}=Ee.useTranslation(),p=o.useRef(null),[h,d]=o.useState(!1),[m,C]=o.useState([]),x=l??m,y=f=>{if(!f||f.length===0)return;const A=Array.from(f).filter(E=>Rv(E,n));if(A.length===0)return;const B=r?A:A.slice(0,1);if(l===void 0){const E=r?[...x,...B]:B;C(E),e?.(E)}else e?.(B)},b=f=>{f.preventDefault(),!a&&d(!0)},v=f=>{f.preventDefault(),d(!1)},_=f=>{f.preventDefault(),d(!1),!a&&y(f.dataTransfer.files)},g=f=>{const A=f.target;try{y(A.files)}finally{A.value=""}},w=()=>{a||p.current?.click()},N=f=>{if(!a&&(i?.(f),l===void 0)){const A=x.filter((B,E)=>E!==f);C(A),i||e?.(A)}};return t.jsxs("div",{className:`file-upload ${c}`.trim(),children:[t.jsxs("div",{className:ke("file-upload__dropzone",h&&"file-upload__dropzone--dragging",a&&"file-upload__dropzone--disabled"),role:"button",tabIndex:a?-1:0,"aria-disabled":a,onClick:w,onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),w())},onDragOver:b,onDragLeave:v,onDrop:_,children:[t.jsx(dt,{icon:"upload",size:24,className:"file-upload__icon"}),t.jsx("span",{className:"file-upload__prompt body-2",children:u("fileUpload.dragPrompt","\uD30C\uC77C\uC744 \uC774\uACF3\uC5D0 \uB4DC\uB798\uADF8\uD558\uC5EC \uC5C5\uB85C\uB4DC")}),t.jsx("button",{type:"button",className:"file-upload__browse-button body-3",disabled:a,onClick:f=>{f.stopPropagation(),w()},children:u("fileUpload.browseButton","\uD30C\uC77C \uC120\uD0DD")}),t.jsx("input",{ref:p,type:"file",className:"file-upload__input",accept:n,multiple:r,disabled:a,onChange:g,tabIndex:-1,"aria-hidden":"true"})]}),s&&x.length>0&&t.jsx("ul",{className:"file-upload__list",children:x.map((f,A)=>t.jsxs("li",{className:"file-upload__list-item body-3",children:[t.jsx("span",{className:"file-upload__file-name body-3",children:f.name}),t.jsx("button",{type:"button",className:"file-upload__remove-button","aria-label":u("fileUpload.removeAriaLabel",{name:f.name}),disabled:a,onClick:()=>N(A),children:t.jsx(dt,{icon:"x",size:14})})]},`${f.name}-${A}`))})]})}function Fv({items:e,className:n=""}){const{t:r}=Ee.useTranslation();return t.jsx("nav",{className:`breadcrumb ${n}`.trim(),"aria-label":r("breadcrumb.ariaLabel","\uC774\uB3D9 \uACBD\uB85C"),children:t.jsx("ol",{className:"breadcrumb__list",children:e.map((a,s)=>{const l=s===e.length-1;return t.jsxs("li",{className:"breadcrumb__item",children:[l?t.jsx("span",{className:"breadcrumb__current body-3","aria-current":"page",children:a.label}):a.href?t.jsx("a",{className:"breadcrumb__link body-3",href:a.href,target:a.target,rel:a.rel??(a.target==="_blank"?"noopener noreferrer":void 0),onClick:a.onClick,children:a.label}):a.onClick?t.jsx("button",{type:"button",className:"breadcrumb__link body-3",onClick:a.onClick,children:a.label}):t.jsx("span",{className:"breadcrumb__text body-3",children:a.label}),!l&&t.jsx(dt,{icon:"chevron-right",size:14,className:"breadcrumb__separator"})]},s)})})})}const Iv={small:14,medium:20,large:28};function Ov({value:e,onChange:n,max:r=5,readOnly:a=!1,size:s="medium",ariaLabel:l,className:i=""}){const{t:c}=Ee.useTranslation(),u=a||!n,[p,h]=o.useState(null),d=u?e:Number.isFinite(e)?Math.round(e):0,m=p??d,C=Iv[s],x=f=>{f!==e&&n?.(f)},y=f=>{u||x(f)},b=f=>{u||ir()||h(f)},v=o.useRef(null),_=f=>{const A=Math.min(r,Math.max(1,f));x(A),Array.from(v.current?.querySelectorAll("[data-star]")??[]).find(B=>B.dataset.star===String(A))?.focus()},g=f=>{if(!u){switch(f.key){case"ArrowRight":case"ArrowUp":_((d||0)+1);break;case"ArrowLeft":case"ArrowDown":_((d||1)-1);break;case"Home":_(1);break;case"End":_(r);break;default:return}f.preventDefault()}},w=d>=1&&d<=r?Math.round(d):1,N=()=>{u||h(null)};return t.jsx("div",{className:`rating rating--${s}${u?" rating--readOnly":""} ${i}`.trim(),ref:v,onKeyDown:g,role:u?"img":"radiogroup","aria-label":u?c("rating.valueLabel",{value:e,max:r}):l??c("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:N,onPointerUp:f=>{f.pointerType==="touch"&&N()},onPointerCancel:f=>{f.pointerType==="touch"&&N()},children:Array.from({length:r},(f,A)=>{const B=A+1,E=Math.max(0,Math.min(1,m-A)),k=E>0&&E<1,j=t.jsxs("span",{className:"rating__star-wrap",children:[t.jsx(dt,{icon:"star",size:C,className:"rating__star rating__star--empty"}),E>0&&t.jsx("span",{className:`rating__star-fill${k?" rating__star-fill--half":""}`,style:k?{width:`${E*100}%`}:void 0,children:t.jsx(dt,{icon:"star",size:C,className:"rating__star rating__star--filled"})})]});return u?t.jsx("span",{className:"rating__item","aria-hidden":"true",children:j},B):t.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":d===B,"aria-label":c("rating.starLabel",{n:B}),"data-star":B,tabIndex:B===w?0:-1,onClick:()=>y(B),onMouseEnter:()=>b(B),children:j},B)})})}const zv=20,Wv=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function Hv({value:e,onChange:n,palette:r=Wv,size:a,className:s="",ariaLabel:l}){const i=_n(),c=a??i??mn,{t:u}=Ee.useTranslation();return t.jsx("div",{className:`color-picker ${s}`.trim(),role:"group","aria-label":l,children:r.map(p=>{const h=e?.toLowerCase()===p.toLowerCase();return t.jsx("button",{type:"button",className:`color-picker__swatch color-picker__swatch--${c}`,style:{backgroundColor:p},onClick:()=>n(p),"aria-pressed":h,"aria-label":h?`${p} ${u("colorPicker.selected","\uC120\uD0DD\uB428")}`:p,children:h&&t.jsx(dt,{icon:"check",size:zv,className:"color-picker__check"})},p)})})}function Pu({icon:e,label:n,tooltip:r,wrapperStyle:a,color:s,bgColor:l,useHover:i=!0,iconSize:c="medium"}){const{t:u}=Ee.useTranslation(),p=c==="small",h=ke("category-icon",p?"category-icon--small":""),d=p?16:20,m=o.useRef(null),[C,x]=o.useState(!1),y=o.useMemo(()=>{const B=a&&typeof a=="object"?{...a}:{};return!s&&!l?B:{...B,...s?{color:s,"--t-item-fg":s}:{},...l?{"--t-item-bg":l}:{}}},[a,s,l]),b=r||n,v=i&&!!b,[_,g]=o.useState(null);o.useLayoutEffect(()=>{C&&g(m.current?.getBoundingClientRect()??null)},[C]),o.useEffect(()=>{if(!i&&C)try{x(!1)}catch{}},[i,C]),o.useEffect(()=>{if(!C)return;const B=E=>{const k=m.current;if(!k)return;const j=E.target;j&&!k.contains(j)&&x(!1)};return document.addEventListener("pointerdown",B,!0),()=>document.removeEventListener("pointerdown",B,!0)},[C]);const w=o.useCallback(()=>{i&&x(!0)},[i]),N=o.useCallback(()=>{i&&x(!1)},[i]),f=o.useCallback(()=>x(!1),[]),A=o.useCallback(B=>{if(B.key==="Escape"){x(!1);return}(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),x(E=>!E))},[]);return t.jsxs("span",{ref:m,className:ke("category-icon__wrap",v&&"category-icon__wrap--interactive"),onPointerEnter:w,onPointerLeave:N,onFocus:w,onBlur:N,onKeyDown:A,role:b?"button":void 0,tabIndex:b?0:void 0,"aria-label":typeof b=="string"?u("common.descriptionFor",{name:b,defaultValue:`${b} \uC124\uBA85`}):void 0,"aria-haspopup":!!b,"aria-expanded":C,"data-tooltip-ignore":!0,children:[t.jsx(dt,{icon:e,label:n,className:h,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:y,size:d}),C&&b&&t.jsx(zn,{anchorRect:_,text:typeof b=="string"?b:void 0,offset:8,onClose:f,className:"category-icon__tooltip",ariaLabel:typeof b=="string"?b:void 0})]})}let tr=null;function oa(e){if(tr&&tr!==e)try{tr()}catch{}return tr=e,()=>{tr===e&&(tr=null)}}function Ra(e){if(tr===e){tr=null;try{e()}catch{}}}function sa(e,n){let r=()=>{};const a=new Promise(c=>{r=c});if(typeof e!="string"||e.trim()===""){jt("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),r(!1);try{n?.(!1)}catch{}return{el:{},stop:()=>{},done:a}}let s=!1;const l=c=>{if(!s){s=!0;try{n?.(c)}catch{}r(c)}};let i;try{i=new Audio(e)}catch{return l(!1),{el:{},stop:()=>{},done:a}}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:a}}function Vv(e,n){if(!e)return{previewCodes:[],previewBucket:null};const r=e,a=i=>i.map(c=>c?.contextCode||c?.context_code).filter(Boolean).map(String);if(n==="LISTEN_IN_NOISE"){const i=r.sentences||r.items||[],c=Array.isArray(i)&&i.length>0?a(i):[];return c.length===0&&(r.contextCode||r.context_code)&&c.push(String(r.contextCode||r.context_code)),{previewCodes:c,previewBucket:"LIN_D"}}if(n==="SHORT_STORY"){const i=r.items||r.sentences||[],c=Array.isArray(i)&&i.length>0?a(i):[];return c.length===0&&(r.contextCode||r.context_code)&&c.push(String(r.contextCode||r.context_code)),{previewCodes:c,previewBucket:"SHORT_S"}}if(n==="LONG_STORY"){const i=r.items||r.sentences||[],c=Array.isArray(i)&&i.length>0?a(i):[];return c.length===0&&(r.contextCode||r.context_code)&&c.push(String(r.contextCode||r.context_code)),{previewCodes:c,previewBucket:"LONG"}}if(n==="ORDERING_SENTENCE"){const i=r.sentences||r.items||[],c=Array.isArray(i)&&i.length>0?a(i):[];return c.length===0&&(r.contextCode||r.context_code)&&c.push(String(r.contextCode||r.context_code)),{previewCodes:c,previewBucket:"LIN_D"}}const s=r.sentences||r.items||[],l=a(Array.isArray(s)?s:[]);return l.length===0&&(r.contextCode||r.context_code)&&l.push(String(r.contextCode||r.context_code)),{previewCodes:l,previewBucket:null}}function qv(e,n){const[r,a]=o.useState(!1),[s,l]=o.useState(-1),[i,c]=o.useState({key:"",urls:[]}),u=o.useRef(null),p=o.useRef(!1),h=o.useRef(null),d=o.useRef(null),[m,C]=o.useState(!1),x=o.useRef([]),{previewCodes:y,previewBucket:b}=Vv(e,n),v=`${y.join(",")}|${b??""}`,_=o.useMemo(()=>i.key===v?i.urls:[],[i,v]);o.useEffect(()=>{if(!y.length)return;let w=!1;return(async()=>{const N=[],f=[];for(const A of y)try{const B=Hl(A,b);if(!B){N.push("");continue}let E=null;try{E=await Vl(B)}catch{}if(!E)try{const k=await ql(B);k&&(E=URL.createObjectURL(k),f.push(E))}catch{}N.push(E??"")}catch{N.push("")}w?f.forEach(A=>{try{URL.revokeObjectURL(A)}catch{}}):(x.current.forEach(A=>{try{URL.revokeObjectURL(A)}catch{}}),x.current=f,c({key:v,urls:N}))})(),()=>{w=!0}},[y.join(","),b]),o.useEffect(()=>()=>{x.current.forEach(w=>{try{URL.revokeObjectURL(w)}catch{}}),x.current=[]},[]);const g=o.useCallback(async w=>{if(w.stopPropagation(),w.preventDefault(),p.current){h.current&&Ra(h.current),p.current=!1;try{u.current?.pause()}catch{}a(!1),l(-1);return}if(!_.filter(Boolean).length)return;let N=null;const f=()=>{p.current=!1,N?.stop()};h.current=f;const A=oa(f);p.current=!0,a(!0);for(let B=0;B<_.length&&p.current;B++){const E=_[B];if(E&&(l(B),N=sa(E),u.current=N.el,!await N.done))break}A(),h.current===f&&(h.current=null,p.current=!1,a(!1),l(-1))},[_]);return o.useEffect(()=>()=>{h.current&&Ra(h.current),p.current=!1;try{u.current?.pause()}catch{}u.current=null},[]),{playing:r,playingIndex:s,previewUrls:_,previewHover:m,setPreviewHover:C,previewBtnRef:d,handlePreview:g}}const Uv=e=>{if(!e)return[];const n=typeof e.context=="string"&&e.context.trim()||typeof e.sentence=="string"&&e.sentence.trim()||typeof e.text=="string"&&e.text.trim()||"";if(n)return[String(n)];const r=e.sentences||e.items||e.questions||[];return Array.isArray(r)&&r.length>0?r.map(a=>{if(typeof a=="string")return a;if(a&&typeof a=="object"){const s=a;return s.sentence||s.text||s.context||s.question||s.title||""}return""}).filter(a=>typeof a=="string"&&a.trim().length>0).map(a=>a.trim()):[]};function Qo(e){const{index:n,type:r,trainingData:a,ariaLabel:s,depth:l,renderPopup:i,completed:c,completedIds:u,selectedIds:p,tooltipText:h,useDescriptionTooltip:d=!1,onRemove:m,hideCheckBadge:C=!1,showTypeLabel:x=!1,onComplete:y,onSelect:b,onMore:v,countLabelOverride:_,size:g="square"}=e||{},{t:w}=Ee.useTranslation(),[N,f]=o.useState(!1),A=o.useRef(null),[B,E]=o.useState(!1);o.useEffect(()=>{A.current?.matches(":hover")&&E(!0)},[]);const{playing:k,playingIndex:j,previewUrls:S,previewHover:$,setPreviewHover:V,previewBtnRef:F,handlePreview:U}=qv(a,r?.key),T=o.useCallback(()=>{b?b():f(!0)},[b]),z=o.useCallback(()=>f(!1),[]),W=o.useCallback(()=>E(!0),[]),ie=o.useCallback(()=>E(!1),[]),Q=o.useCallback(()=>V(!0),[V]),L=o.useCallback(()=>V(!1),[V]),[J,ee]=o.useState(null);o.useLayoutEffect(()=>{$&&ee(F.current?.getBoundingClientRect()??null)},[$,F]);const[q,P]=o.useState(null);o.useLayoutEffect(()=>{B&&!N&&d&&P(A.current?.getBoundingClientRect()??null)},[B,N,d]);const R=o.useCallback(ce=>{ce.target===ce.currentTarget&&(ce.key==="Enter"||ce.key===" ")&&(ce.preventDefault(),T())},[T]),D=a||null,H=o.useMemo(()=>{if(!d)return null;const ce=h?(Array.isArray(h)?h:[h]).filter(Boolean):null,Pe=ce&&ce.length>0?ce:Uv(D);return Pe&&Pe.length>0?Pe:null},[d,h,D]),ne=o.useCallback(ce=>{ce.stopPropagation(),m?.()},[m]),te=o.useCallback(ce=>ce.stopPropagation(),[]),ue=o.useCallback(ce=>{typeof y=="function"&&y(ce)},[y]),se=c||(u&&a?.id!=null?u.has(String(a.id)):!1),pe=!se&&(p!=null&&a?.id!=null?p.has(String(a.id)):!1);ou("speechear.popup.close",z);const G=fi(),K=`${r?.label||""} ${n+1}`,O=D?.title||D?.name||K;let I=r?.icon,ae,he="",re="";try{const ce=D?.category_0||D?.category_main_code||D?.category_main,Pe=D?.category_1||D?.category_sub_code||D?.category_sub,Ye=G.find(Qe=>Qe.key===ce);Ye?.icon&&(I=Ye.icon),!ae&&Ye?.color&&(ae={"--t-item-fg":Ye.color}),!ae&&D?.iconColor&&(ae={"--t-item-fg":D.iconColor}),he=Ye?w(`topic.${Ye.key}`,{defaultValue:Ye.label||""}):"";try{const Qe=Ye?.subs?.find(ut=>ut.key===Pe);re=Qe?w(`topic.sub.${Qe.key}`,{defaultValue:Qe.label||""}):""}catch{}}catch{}const _e=re?`${he} / ${re}`:he||r?.label||O,De=ce=>w("training.countQuestions",{n:ce,count:ce}),Se=ce=>w("training.countSentences",{n:ce,count:ce});let Ne="";try{if(D)if(r?.key==="LISTEN_IN_NOISE"){let ce=0;Array.isArray(D.items)&&D.items.length>0?ce=D.items.length:Array.isArray(D.sentences)&&D.sentences.length>0?ce=D.sentences.length:D.sentences&&(ce=1),Ne=Se(ce)}else if(r?.key==="SHORT_STORY"){let ce=1;Array.isArray(a?.items)?ce=a.items.length:Array.isArray(a?.raw&&a.raw?.items)?ce=a.raw.items.length:Array.isArray(D?.questions)?ce=D.questions.length:Array.isArray(D?.sentences)&&(ce=D.sentences.length),Ne=De(ce)}else if(r?.key==="LONG_STORY"){let ce=1;if(Array.isArray(D.items)&&D.items.length>0){const Pe=D.items.reduce((Ye,Qe)=>{const ut=Qe.questionItems;return Array.isArray(ut)?Ye+ut.length:Array.isArray(Qe.questions)?Ye+Qe.questions.length:Ye},0);ce=Pe>0?Pe:D.items.length}else Array.isArray(D.questions)&&D.questions.length>0?ce=D.questions.length:Array.isArray(D.sentences)&&D.sentences.length>0&&(ce=D.sentences.length);Ne=De(ce)}else if(r?.key==="ORDERING_SENTENCE"){let ce=1;Array.isArray(D.items)&&D.items.length>0?ce=D.items.length:Array.isArray(D.sentences)&&D.sentences.length>0&&(ce=D.sentences.length),Ne=Se(ce)}else Array.isArray(D.items)&&(Ne=D.items.length>0?De(D.items.length):"")}catch{}const He=g==="row",ve=g==="list"||He,xe=g==="compact",we=g==="small",Ae=we&&r?.key?bg().find(ce=>ce.key===r.key):void 0,Ie=Ae?Ci[Ae.key]:void 0,ot=Ae?Ie?w(`trainingType.${Ie}.title`,{defaultValue:Ae.label}):Ae.label??"":"",pt=x&&r?.label&&r.label!==String(O)?String(r.label):we&&ot&&ot!==String(O)?ot:"",Oe=!!pt,Ue=_!==void 0?_:Ne,rt=[pt,typeof O=="string"?O:"",Ue].map(ce=>String(ce??"").trim()).filter(Boolean).join(" ");return t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:A,className:`training-block-button${ve?" training-block-button--list":""}${He?" training-block-button--row":""}${xe?" training-block-button--compact":""}${we?" training-block-button--small":""}${se?" training-block-button--completed":""}${pe?" training-block-button--selected":""}${Oe&&!we?" training-block-button--withType":""}${we&&!Oe?" training-block-button--no-type-label":""}`,onClick:T,onPointerEnter:W,onPointerLeave:ie,role:"button",tabIndex:0,onKeyDown:R,"aria-label":typeof s=="string"?s:rt||void 0,title:!d&&h&&(Array.isArray(h)?h.filter(Boolean).join(`
829
- `):h)||void 0,children:[t.jsxs("div",{className:"training-block-button__left",children:[x&&r?.label&&r.label!==String(O)&&t.jsx("span",{className:"training-block-button__type-label caption-1",children:r.label}),we&&ot&&ot!==String(O)&&t.jsx("span",{className:"training-block-button__type-label caption-2",children:ot}),t.jsx(Pu,{icon:I,label:O,tooltip:_e,wrapperStyle:ae,iconSize:we||xe?"small":"medium"}),!C&&(se||pe)&&!(m&&B)&&t.jsx(Ln,{className:m?"training-block-button__check--removable":void 0,icon:"check",position:"top-left",size:32,"aria-label":se?w("training.completed","\uD6C8\uB828 \uC644\uB8CC"):w("training.selected","\uC120\uD0DD\uB428")}),m&&t.jsx(Ln,{className:`training-block-button__remove${B?" is-hover":""}`,icon:"remove",position:"top-left",size:32,"aria-label":w("common.remove","\uC81C\uAC70"),onClick:ne}),t.jsx("div",{className:`training-block-button__title ${xe?"body-3":we?"body-3b":"h3"}`,children:String(O)}),t.jsxs("div",{className:"training-block-button__description",children:[Ue?t.jsx("div",{className:`training-block-button__count ${we?"caption-2":"caption-1"}`,children:Ue}):null,t.jsx("div",{className:"training-block-button__chevron",children:t.jsx(dt,{icon:"chevron-right",label:w("training.next","\uB2E4\uC74C"),className:"training-block-button__chevron-icon",imgClassName:"training-block-button__chevron-icon-image",maskClassName:"training-block-button__chevron-icon-mask",svgClassName:"training-block-button__chevron-icon-svg",size:we?12:20})})]}),(ve&&!He||we)&&S.length>0&&t.jsx("div",{ref:F,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:te,onPointerEnter:Q,onPointerLeave:L,children:t.jsx(ye,{htmlType:"button",size:we?28:32,type:"dot",icon:k?"pause":"play",variant:we?"transparent-lightGray":"default",useBorder:!1,selected:k,ariaLabel:String(O).trim()?k?w("training.stopFor",{name:O,defaultValue:`${O} \uC815\uC9C0`}):w("training.previewFor",{name:O,defaultValue:`${O} \uBBF8\uB9AC \uB4E3\uAE30`}):k?w("training.stop","\uC815\uC9C0"):w("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:U})})]}),v&&t.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:ce=>{ce.stopPropagation(),v(ce)},children:t.jsx(ye,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(O).trim()?w("common.moreFor",{name:O}):w("common.more","\uB354\uBCF4\uAE30")})})]}),$&&t.jsx(zn,{anchorRect:J,text:k?w("training.stop","\uC815\uC9C0"):w("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:L}),B&&!N&&d&&(H?t.jsx(Qn,{anchorRect:q,items:H,activeIndex:j,onClose:ie}):D?.subTitle?t.jsx(zn,{anchorRect:q,text:D.subTitle,offset:8,onClose:ie}):null),N&&i&&i({trainingData:D,typeKey:r?.key??"",onClose:z,onComplete:ue,popupTitle:String(O),popupSubTitle:r?.subTitle,depth:l!=null?String(l):void 0,popupIcon:I,popupIconTooltip:String(_e),popupWrapperStyle:ae})]})}const Fu=200;function Gv(e){return e.itemId?(wg()[e.trainingType]??[]).find(n=>n?.id!=null&&String(n.id)===String(e.itemId))??null:null}function Iu({plan:e,groups:n,anchorRect:r,offset:a=12,onClose:s}){const{t:l}=Ee.useTranslation(),i=o.useMemo(()=>n?n.map((u,p)=>({key:u.key??u.type?.key??String(p),label:u.label,type:u.type,data:u.items??[]})).filter(u=>u.data.length>0):kg(l).map(u=>{const p=(e?.items??[]).filter(h=>h.trainingType===u.key);return{key:u.key,label:u.label,type:u,pickedCount:p.length,data:p.map(Gv).filter(h=>h!=null)}}).filter(u=>u.pickedCount>0),[n,e?.items,l]);if(i.length===0)return null;const c=t.jsx("div",{className:le("training-tooltip__box"),children:t.jsx("div",{className:le("training-tooltip__groups"),children:i.flatMap(({key:u,label:p,type:h,data:d},m)=>[m>0?t.jsx("div",{className:le("training-tooltip__divider")},`div-${u}`):null,t.jsxs("div",{className:le("training-tooltip__section"),children:[t.jsx("div",{className:le("training-tooltip__section-header"),children:t.jsx("span",{className:le("training-tooltip__type-label body-3b"),children:p})}),t.jsx("div",{className:le("training-tooltip__items"),children:d.map((C,x)=>t.jsx(Qo,{index:x,type:h,trainingData:C,size:"compact",hideCheckBadge:!0},String(C.id??x)))})]},u)])})});return r?t.jsx(En,{anchorRect:r,offset:a,onClose:s,closeOnOutsideClick:!1,className:le("training-tooltip"),ariaLabel:l("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:c}):c}const Kv=200;function Yv({icon:e,count:n,title:r,plan:a,tooltip:s=!0,hoverAccent:l=!1,className:i="",onClick:c,onMouseEnter:u,onMouseLeave:p}){const h=!!c||!!u||s&&!!a,d=ke("count-tile",h&&"count-tile--interactive",h&&l&&"count-tile--accent",c&&"count-tile--clickable",i),m=o.useRef(null),[C,x]=o.useState(null),y=o.useRef(null),b=o.useRef(null),v=!!(C&&a&&s),_=o.useCallback(()=>{y.current&&(clearTimeout(y.current),y.current=null),b.current&&(clearTimeout(b.current),b.current=null)},[]),g=o.useCallback(()=>{_(),x(null)},[_]),w=o.useCallback(()=>{!s||!a||(_(),y.current=setTimeout(()=>{y.current=null,x(m.current?.getBoundingClientRect()??null)},Fu))},[s,a,_]),N=o.useCallback(()=>{y.current&&(clearTimeout(y.current),y.current=null),!b.current&&(b.current=setTimeout(()=>{b.current=null,x(null)},Kv))},[]);return o.useEffect(()=>()=>{_()},[_]),o.useEffect(()=>{(!s||!a)&&g()},[s,a,g]),o.useEffect(()=>{if(!v)return;const f=B=>B instanceof Element&&(m.current?.contains(B)||!!B.closest(".training-tooltip")),A=B=>{f(B.target)?_():N()};return document.addEventListener("pointerover",A,!0),()=>document.removeEventListener("pointerover",A,!0)},[v,_,N]),t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:m,className:d,onClick:c?f=>{g(),c(f)}:void 0,onKeyDown:c?f=>{f.key!=="Enter"&&f.key!==" "||(f.preventDefault(),f.currentTarget.click())}:void 0,onPointerEnter:f=>{f.pointerType==="touch"||f.pointerType==="pen"?g():w()},onMouseEnter:u,onMouseLeave:f=>{N(),p?.(f)},role:c?"button":"img",tabIndex:c?0:void 0,"aria-label":`${r} ${n}`,children:[t.jsx(dt,{icon:e,size:20,className:"count-tile__icon"}),t.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:n})]}),C&&a&&t.jsx(Iu,{plan:a,anchorRect:C,onClose:g})]})}let la=0,Ou="",es="",ia=0;function zu(){return Wu(!1)}function Zv(){return Wu(!0)}function Wu(e){const n=typeof document<"u";la===0&&n&&(Ou=document.body.style.overflow,document.body.style.overflow="hidden"),e&&n&&(ia===0&&(es=document.body.style.paddingRight),ia++,document.body.style.paddingRight="0px"),la++;let r=!1;return()=>{r||(r=!0,la=Math.max(0,la-1),e&&n&&(ia=Math.max(0,ia-1),ia===0&&(es?document.body.style.paddingRight=es:document.body.style.removeProperty("padding-right"))),la===0&&n&&(document.body.style.overflow=Ou))}}function Xv(){return t.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round","aria-hidden":!0,children:t.jsx("path",{d:"M6 6l12 12M18 6 6 18"})})}function Jv({open:e,onClose:n,ariaLabel:r,title:a,children:s,size:l="md",closeOnBackdrop:i=!0,closeOnEscape:c=!0,showClose:u=!0,className:p,contentClassName:h}){const{t:d}=Ee.useTranslation(),m=o.useId(),C=o.useRef(null),x=o.useCallback(()=>n(),[n]);o.useEffect(()=>{if(!e)return;const _=document.activeElement,g=zu(),w=C.current;return Ro(w,_),w?.focus(),()=>{g();const N=document.activeElement;(!N||N===document.body||w&&w.contains(N))&&Po(_)?.focus?.()}},[e]);const y=o.useRef(x),b=o.useRef(c);o.useEffect(()=>{y.current=x,b.current=c}),o.useEffect(()=>{if(e)return lr(()=>{b.current&&y.current()})},[e]);const v=o.useRef(!1);return $o(C,e),!e||typeof document>"u"?null:gn.createPortal(t.jsx("div",{className:ke("dialog",p),onPointerDown:i?_=>{v.current=_.target===_.currentTarget}:void 0,onMouseDown:_=>{_.target===_.currentTarget&&_.preventDefault()},onClick:i?_=>{const g=v.current;v.current=!1,g&&_.target===_.currentTarget&&x()}:void 0,children:t.jsxs("div",{ref:C,role:"dialog","aria-modal":"true","aria-label":a?void 0:r,"aria-labelledby":a?m:void 0,tabIndex:-1,className:ke("dialog__surface",`dialog__surface--${l}`,h),onClick:_=>_.stopPropagation(),children:[a?t.jsx("div",{className:"dialog__header",children:t.jsx("h2",{id:m,className:"dialog__title h4b",children:a})}):null,u?t.jsx("button",{type:"button",className:"dialog__close","aria-label":d("common.close","\uB2EB\uAE30"),onClick:x,children:t.jsx(Xv,{})}):null,t.jsx("div",{className:"dialog__body",children:s})]})}),document.body)}function Qv({columns:e,rows:n,rowKey:r,title:a,toolbar:s,empty:l,loading:i,caption:c,className:u=""}){const{t:p}=Ee.useTranslation(),h=!i&&n.length===0;return t.jsxs("div",{className:ke("board",u),children:[a||s?t.jsxs("div",{className:"board__head",children:[a?t.jsx("h2",{className:"board__title",children:a}):t.jsx("span",{}),s?t.jsx("div",{className:"board__toolbar",children:s}):null]}):null,t.jsxs("table",{className:"board__table",children:[c?t.jsx("caption",{className:"board__caption",children:c}):null,t.jsx("thead",{children:t.jsx("tr",{children:e.map(d=>t.jsx("th",{scope:"col",className:ke("board__th",`board__cell--${d.headerAlign??d.align??"left"}`),style:d.width?{width:d.width}:void 0,children:d.header},d.key))})}),t.jsx("tbody",{children:i?t.jsx("tr",{children:t.jsx("td",{className:"board__state",colSpan:e.length,children:i})}):h?t.jsx("tr",{children:t.jsx("td",{className:"board__state",colSpan:e.length,children:l??p("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):n.map((d,m)=>t.jsx("tr",{className:"board__row",children:e.map(C=>t.jsx("td",{className:ke("board__td",`board__cell--${C.align??"left"}`),children:C.render(d,m)},C.key))},r(d,m)))})]})]})}function ex({name:e,role:n,photo:r,media:a,credentials:s,size:l=190,className:i=""}){return t.jsxs("div",{className:ke("person-card",i),children:[t.jsx("div",{className:"person-card__photo",style:{width:l,height:l},children:a??(r?t.jsx("img",{src:r,alt:n?`${e} ${n}`:e}):null)}),t.jsx("h3",{className:"person-card__name",children:e}),n?t.jsx("p",{className:"person-card__role",children:n}):null,s?.length?t.jsx("ul",{className:"person-card__credentials",children:s.map(c=>t.jsx("li",{children:c},c))}):null]})}function tx({groups:e,className:n=""}){return t.jsx("div",{className:ke("timeline",n),children:e.map(r=>t.jsxs("section",{className:"timeline__group",children:[t.jsx("h3",{className:"timeline__title",children:r.title}),t.jsx("ul",{className:"timeline__rows",children:r.entries.map((a,s)=>t.jsxs("li",{className:"timeline__row",children:[a.label?t.jsx("span",{className:"timeline__label",children:a.label}):null,t.jsx("div",{className:"timeline__items",children:a.items.map((l,i)=>t.jsx("p",{children:l},i))})]},`${a.label??""}-${s}`))})]},r.title))})}function nx({title:e,kind:n,body:r,badge:a,badgeSrc:s,footer:l,width:i,className:c=""}){const u=a??(s?t.jsx("img",{src:s,alt:""}):null);return t.jsxs("div",{className:ke("publication-card",c),style:i?{width:i,flexShrink:0}:void 0,children:[u?t.jsx("div",{className:"publication-card__badge","aria-hidden":"true",children:u}):null,t.jsx("h3",{className:"publication-card__title",children:e}),n?t.jsx("p",{className:"publication-card__kind",children:n}):null,t.jsx("p",{className:"publication-card__body",children:r}),l?t.jsx("div",{className:"publication-card__footer",children:l}):null]})}function rx({logo:e,alt:n,onDone:r,durationMs:a=3e3}){const s=Xr(r);return o.useEffect(()=>{const l=setTimeout(()=>s.current?.(),a);return()=>clearTimeout(l)},[a,s]),t.jsx("div",{className:"splash-logo",style:{"--splash-logo-duration":`${a}ms`},"aria-hidden":"true",children:t.jsx("img",{src:e,alt:n,className:"splash-logo__image"})})}function ax({eyebrow:e,eyebrowIndex:n,title:r,description:a,level:s=2,tone:l="dark",className:i=""}){const c=s===1?"h1":"h2";return t.jsxs("div",{className:ke("section-header",`section-header--${l}`,i),children:[e?t.jsxs("p",{className:"section-header__eyebrow",children:[n?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"section-header__index",children:n}),t.jsx("span",{"aria-hidden":!0,className:"section-header__rule"})]}):null,e]}):null,r?t.jsx(c,{className:"section-header__title",children:r}):null,a?t.jsx("div",{className:"section-header__description",children:a}):null]})}function ox({items:e,className:n=""}){return t.jsx("ul",{className:ke("company-meta",n),children:e.map((r,a)=>t.jsxs("li",{className:"company-meta__item",children:[a>0?t.jsx("span",{"aria-hidden":!0,className:"company-meta__divider",children:"|"}):null,r]},r))})}const ua=new Map;function Bn(e){const{t:n}=Ee.useTranslation(),{options:r=[],value:a=r.find(f=>!f.disabled)?.key??r[0]?.key,onChange:s=f=>{},className:l="",size:i,shape:c="pill",useBG:u=!0,fullWidth:p=!1,minButtonWidth:h,ariaLabel:d}=e||{},m=_n(),C=i??m??mn,x=o.useRef(null),y=r.filter(f=>!f.disabled),b=o.useId(),v=r.map(f=>f.key).join("\xB7");o.useEffect(()=>{if(!(!Yn||d!=null&&d!=="")){if(ua.set(b,v||"(\uBCF4\uAE30 \uC5C6\uC74C)"),ua.size>1){const f=[...ua.values()].sort();jt(`segmented-control-unnamed:${f.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${ua.size} \uAC1C \uC11C \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uB0AD\uB3C5\uAE30\uB294 \uBAA8\uB450 "\uC120\uD0DD \uD0ED" \uC73C\uB85C \uC77D\uC5B4 \uC5B4\uB290 \uAC83\uC774 \uBB34\uC5C7\uC778\uC9C0 \uAC00\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. ariaLabel \uC744 \uC8FC\uC138\uC694. \uC9C0\uAE08 \uC120 \uAC83(\uBCF4\uAE30 \uC774\uB984\uC73C\uB85C \uC801\uC74C): ${f.join(" / ")}`)}return()=>{ua.delete(b)}}},[d,v,b]);const _=f=>{if(!y.length)return;const A=Math.max(0,y.findIndex(E=>E.key===a)),B=f==="first"?y[0]:f==="last"?y[y.length-1]:y[(A+f+y.length)%y.length];B&&(s(B.key),Array.from(x.current?.querySelectorAll("[data-segkey]")??[]).find(E=>E.dataset.segkey===B.key)?.focus())},g=f=>{switch(f.key){case"ArrowRight":case"ArrowDown":_(1);break;case"ArrowLeft":case"ArrowUp":_(-1);break;case"Home":_("first");break;case"End":_("last");break;default:return}f.preventDefault()},w=f=>{const A=B=>typeof B=="string"||typeof B=="number";if(!(!A(f.label)||f.count==null||f.count===!1||!A(f.count)))return`${f.label}, ${f.count}`},N=y.some(f=>f.key===a)?a:y[0]?.key;return t.jsx("div",{ref:x,onKeyDown:g,className:ke("segmented-control",`segmented-control--${c}`,`segmented-control--${C}`,p&&"segmented-control--full",!u&&"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??n("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:r.map(f=>t.jsx(ye,{htmlType:"button",role:"radio","aria-checked":f.key===a,"data-segkey":f.key,tabIndex:f.key===N?0:-1,label:f.label,count:f.count,ariaLabel:w(f),disabled:f.disabled,className:f.key===a?"is-selected":"",onClick:()=>{f.disabled||s(f.key)},size:C,shape:c,useBorder:!1,useBG:!1},f.key))})}const sx=260;function qn(e){const{t:n}=Ee.useTranslation(),{title:r,subtitle:a,headerActions:s,headerSegment:l,children:i,buttons:c,footer:u,footerStart:p,footerEnd:h,footerNote:d,footerNoteDivider:m=!1,footerClassName:C="",footerLayout:x="center",onClose:y,closeDisabled:b=!1,beforeClose:v,closeOnBackdrop:_=!0,className:g="",ariaLabel:w,useTitle:N=!0,inline:f=!1,size:A,layer:B="modal",height:E,fillBody:k=!1,resetScrollKey:j}=e||{},[S,$]=o.useState(!1),V=o.useRef(!1),F=o.useRef(null),U=o.useId(),T=o.useRef(null);o.useEffect(()=>{},[f,r,w,g]),o.useEffect(()=>{j!==void 0&&T.current&&(T.current.scrollTop=0)},[j]);const[z,W]=o.useState(!1);o.useEffect(()=>{const pe=T.current;if(!pe)return;const G=()=>W(pe.scrollHeight>pe.clientHeight+1);if(G(),typeof ResizeObserver>"u")return;const K=new ResizeObserver(G);K.observe(pe);const O=pe.firstElementChild;return O&&K.observe(O),()=>K.disconnect()},[i,j]),o.useEffect(()=>{if(!f)return zu()},[f]);const ie=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(f)return;const pe=ie.current,G=F.current;return Ro(G,pe),G&&!G.contains(document.activeElement)&&(G.querySelector($n)??G).focus(),()=>{const K=document.activeElement;(!K||K===document.body||G&&G.contains(K))&&Po(pe)?.focus?.()}},[f]),$o(F,!f);const Q=o.useRef(!0),L=ja(),J=o.useRef(null);o.useEffect(()=>(Q.current=!0,()=>{Q.current=!1,J.current&&(clearTimeout(J.current),J.current=null)}),[]);const ee=o.useCallback(()=>{!Q.current||!V.current||(V.current=!1,$(!1))},[]),q=o.useCallback((pe,G=!1)=>{if(G&&!Q.current||V.current)return;V.current=!0,$(!0);const K=setTimeout(()=>{J.current===K&&(J.current=null);let O;try{O=pe?pe():void 0}catch{ee();return}O&&typeof O.then=="function"&&O.then(()=>{setTimeout(ee,120)},ee)},L?0:sx);G&&(J.current=K)},[ee,L]),P=o.useCallback(()=>{b||v&&v()===!1||q(y,!0)},[q,y,b,v]),R=o.useRef(P);o.useEffect(()=>{R.current=P});const D=!f&&!!y;o.useEffect(()=>{if(D)return lr(()=>R.current())},[D]);const H=D&&_,ne=o.useRef(!1),te=pe=>{ne.current=pe.target===pe.currentTarget},ue=pe=>{const G=ne.current;ne.current=!1,G&&pe.target===pe.currentTarget&&P()},se=t.jsx("div",{className:`popup ${f?"popup--inline":""} ${B==="belowPagePopup"?"popup--below-page-popup":""} ${S?"popup--closing":""} ${g}`,onPointerDown:H?te:void 0,onClick:H?ue:void 0,onMouseDown:f?void 0:pe=>{pe.target===pe.currentTarget&&pe.preventDefault()},children:t.jsxs("div",{ref:F,className:`popup-panel${A?` popup-panel--${A}`:""}${E!=null?" popup-panel--has-height":""}${k?" popup-panel--fill-body":""}`,style:E!=null?{"--popup-height":typeof E=="number"?`${E}px`:E}:void 0,tabIndex:-1,role:f?void 0:"dialog","aria-modal":f?void 0:!0,"aria-labelledby":!f&&N&&r?U:void 0,"aria-label":!f&&!(N&&r)?w??(typeof r=="string"?r:void 0):void 0,children:[!N&&(s||y)?t.jsxs("div",{className:"popup-close-float",children:[s,y&&t.jsx(ye,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:P,disabled:b,ariaLabel:n("common.close","\uB2EB\uAE30")})]}):r||s||y?t.jsxs("div",{className:`popup-header${a?" popup-header--with-subtitle":""}`,children:[t.jsxs("div",{className:"popup-header-main",children:[r?t.jsx("h2",{id:U,className:"popup-title popup-title--left h2",children:r}):t.jsx("span",{id:U,className:"popup-title popup-title--left h2"}),a&&t.jsx("span",{className:"popup-subtitle body-3",children:a})]}),t.jsxs("div",{className:"popup-header-aside",children:[l&&t.jsx("div",{className:"popup-header-segment",children:t.jsx(Bn,{size:40,ariaLabel:l.ariaLabel,options:l.options.map(pe=>({key:pe.key,label:pe.label,disabled:pe.disabled})),value:l.value,onChange:l.onChange})}),t.jsxs("div",{className:"popup-header-actions",children:[s,y&&t.jsx(ye,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:P,disabled:b,ariaLabel:n("common.close","\uB2EB\uAE30")})]})]})]}):null,t.jsx("div",{className:"popup-content",ref:T,tabIndex:z?0:void 0,children:t.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:q,closeWithAnimation:P}):i})}),d!=null&&d!==!1&&t.jsx("div",{className:`popup-footer-note caption-1${m?" popup-footer-note--divider":""}`,role:"note",children:d}),p||h?t.jsxs("div",{className:`popup-footer popup-footer--bar${C?` ${C}`:""}`,children:[t.jsx("div",{className:"popup-footer__start",children:typeof p=="function"?p({animateThen:q,closeWithAnimation:P}):p}),t.jsx("div",{className:"popup-footer__end",children:typeof h=="function"?h({animateThen:q,closeWithAnimation:P}):h})]}):c?.length?t.jsx("div",{className:`popup-footer popup-footer--buttons${x!=="center"?` popup-footer--${x}`:""}`,children:c.map((pe,G)=>t.jsx(ye,{htmlType:"button",size:48,variant:pe.variant??"default",label:pe.label,disabled:pe.disabled,onClick:()=>pe.onClick?.({animateThen:q,closeWithAnimation:P})},G))}):u?t.jsx("div",{className:`popup-footer${x!=="center"?` popup-footer--${x}`:""}${C?` ${C}`:""}`,children:typeof u=="function"?u({animateThen:q,closeWithAnimation:P}):u}):null]})});return f||typeof document>"u"?se:gn.createPortal(se,document.body)}function Hu({checked:e,onChange:n,disabled:r=!1,label:a,ariaLabel:s,labelPosition:l="right",className:i="",id:c}){const u=a&&t.jsx("span",{className:"toggle__label body-3",children:a});return t.jsxs("label",{className:`toggle${r?" toggle--disabled":""} ${i}`.trim(),children:[l==="left"&&u,t.jsx("input",{id:c,type:"checkbox",role:"switch",checked:e,disabled:r,onChange:p=>n?.(p.target.checked),"aria-label":!a&&s?s:void 0}),t.jsx("span",{className:"toggle__slider"}),l==="right"&&u]})}function kn({options:e,value:n,onChange:r,placeholder:a,disabled:s=!1,block:l=!1,size:i,error:c=!1,className:u="",ariaLabel:p,ariaDescribedBy:h}){const d=_n(),m=i??d??mn,{t:C}=Ee.useTranslation(),x=a??C("dropdown.placeholder","\uC120\uD0DD"),y=o.useId(),b=o.useId(),v=o.useRef(null),_=o.useCallback((T,z)=>{const W=window.innerHeight,ie=window.innerWidth,Q=typeof document<"u"?document.getElementById(y):null,L=260,J=Math.min(L,Math.max(Q?.offsetHeight||0,Q?.scrollHeight||0)||L),ee=Math.max(T.width,Q?.offsetWidth||0),q=W-T.bottom,P=T.top,R=q<J&&P>q,D=8,H=(ne,te)=>Math.min(Math.max(D,ne),Math.max(D,te));return{position:"fixed",left:H(T.left,ie-ee-D),minWidth:T.width,maxWidth:Math.max(T.width,ie-D*2),...R?{top:"auto",bottom:H(W-T.top+6,W-J-D)}:{bottom:"auto",top:H(T.bottom+6,W-J-D)},zIndex:Qr(z)}},[y]),{open:g,setOpen:w,toggle:N,style:f,triggerRef:A,menuRef:B}=ea({computeStyle:_}),[E,k]=o.useState(-1),j=o.useCallback(()=>k(-1),[]),S=e.find(T=>T.value===n);o.useEffect(()=>{if(g){const T=e.findIndex(z=>z.value===n);k(T>=0?T:e.length?0:-1),requestAnimationFrame(()=>{const z=B.current;if(!z)return;const W=z.querySelectorAll(".dropdown__option")[T];W&&(z.scrollTop=Math.max(0,W.offsetTop-z.clientHeight/2+W.clientHeight/2))})}},[g]),o.useEffect(()=>{g&&k(T=>{if(T>=0&&T<e.length)return T;const z=e.findIndex(W=>W.value===n);return z>=0?z:e.length?0:-1})},[g,e.length]);const $=o.useCallback(()=>{s||N()},[s,N]),V=o.useCallback(T=>{T.disabled||s||(T.value!==n&&r?.(T.value),w(!1))},[r,w,s,n]);o.useEffect(()=>{s&&w(!1)},[s,w]);const F=o.useCallback(T=>{if(!s){if(!g){(T.key==="Enter"||T.key===" "||T.key==="ArrowDown")&&(T.preventDefault(),w(!0));return}if(T.key==="Escape"){T.preventDefault(),w(!1);return}T.key==="ArrowDown"?(T.preventDefault(),k(z=>{let W=z+1;for(;W<e.length&&e[W].disabled;)W++;return W<e.length?W:z})):T.key==="ArrowUp"?(T.preventDefault(),k(z=>{let W=z-1;for(;W>=0&&e[W].disabled;)W--;return W>=0?W:z})):(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),e[E]?V(e[E]):w(!1))}},[s,g,e,E,V,w]),U=g?t.jsx("div",{ref:B,id:y,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:f,onMouseLeave:j,onMouseDown:T=>T.preventDefault(),children:e.map((T,z)=>t.jsxs("button",{id:`${y}-option-${z}`,type:"button",role:"option","aria-selected":T.value===n,className:ke("dropdown__option body-2",T.value===n?"dropdown__option--active":"",z===E?"dropdown__option--active":"",T.disabled?"dropdown__option--disabled":""),onMouseDown:W=>W.preventDefault(),onClick:()=>V(T),onMouseEnter:()=>k(z),disabled:T.disabled,children:[t.jsx("span",{className:"dropdown__option-check",children:T.value===n&&t.jsx("svg",{viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"2 7 5.5 10.5 12 3.5"})})}),T.label]},T.value))}):null;return t.jsxs("div",{ref:v,className:ke("dropdown",`dropdown--s${m}`,g?"dropdown--open":"",l?"dropdown--block":"",c?"dropdown--error":"",u),onKeyDown:F,children:[t.jsxs("button",{ref:A,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":g,"aria-controls":g?y:void 0,"aria-activedescendant":g&&E>=0?`${y}-option-${E}`:void 0,"aria-label":p,"aria-describedby":[p&&S?b:"",h??""].filter(Boolean).join(" ")||void 0,"aria-invalid":c||void 0,disabled:s,onClick:$,onBlur:T=>{g&&!B.current?.contains(T.relatedTarget)&&w(!1)},children:[t.jsx("span",{id:b,className:`dropdown__trigger-label body-2${S?"":" dropdown__trigger-label--placeholder"}`,children:S?S.label:x}),t.jsx("svg",{className:"dropdown__chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"4 6 8 10 12 6"})})]}),typeof document<"u"&&gn.createPortal(U,v.current?.closest(".ihabdevteam-core-scope")??document.body)]})}const lx={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function Vu(e){return e?lx[e]??null:null}function qu(e){switch(Vu(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Uu(e,n){const r=Vu(e);return r?n(`device.type.${r}`,{defaultValue:e??""}):e??""}const Er=e=>e==null?"":String(e).trim();function ts(e,n,r,a){const s=Er(e),l=Er(n),i=Er(r);if(a&&s&&l&&i){const u=`${s.padStart(4,"0")}-${l.padStart(2,"0")}-${i.padStart(2,"0")}`,p=new Date(u);if(!Number.isNaN(p.getTime())&&p.toISOString().slice(0,10)===u){const h=ui(u,a);if(h)return h}}const c=[s,l,i];for(;c.length>0&&c[c.length-1]==="";)c.pop();return c.join(".")}function ix(e,n,r){const a=Er(e);return a?`${a}-${Er(n).padStart(2,"0")}-${Er(r).padStart(2,"0")}`:""}function Gu(e){return typeof e=="string"?e:e.label}function Ku({value:e,onChange:n,suggestions:r,openOnFocus:a=!1,filterSuggestions:s,onSelectSuggestion:l,autoActiveFirst:i=!1}){const c=o.useId(),[u,p]=o.useState(!1),[h,d]=o.useState(-1),m=o.useRef(null),C=o.useMemo(()=>{if(!r.length)return[];const j=e??"";return s===!1?r:j?typeof s=="function"?s(r,j):r.filter(S=>Gu(S).toLowerCase().includes(j.toLowerCase())):a?r:[]},[r,e,a,s]),[x,y]=o.useState(!1),b=o.useRef([]),v=x&&C.length===0?b.current:C;o.useEffect(()=>{v.length&&(b.current=v)},[v]);const _=o.useCallback(()=>y(!0),[]),g=o.useCallback(()=>y(!1),[]),w=i?0:-1;o.useEffect(()=>{u||d(w)},[u,w]),o.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const N=h<v.length?h:w<v.length?w:-1,f=o.useCallback(j=>{l?l(j):n?.(Gu(j)),p(!1)},[n,l]),A=o.useCallback(()=>p(!0),[]),B=o.useCallback(()=>{p(!0),d(w)},[w]),E=o.useCallback(()=>{m.current=setTimeout(()=>p(!1),120)},[]),k=o.useCallback(j=>{j.nativeEvent.isComposing||j.keyCode===229||(j.key==="ArrowDown"?(j.preventDefault(),p(!0),d(S=>Math.min(v.length-1,(S<v.length?S:w)+1))):j.key==="ArrowUp"?(j.preventDefault(),d(S=>Math.max(w,(S<v.length?S:v.length)-1))):j.key==="Enter"?N>=0&&f(v[N]):j.key==="Escape"&&u&&(j.preventDefault(),p(!1)))},[v,N,u,f,w]);return{listId:c,open:u,activeIdx:N,filtered:v,handleFocus:A,handleBlur:E,handleInput:B,handleKeyDown:k,handleSelect:f,handleCompositionStart:_,handleCompositionEnd:g}}const ca=typeof window<"u"?o.useLayoutEffect:o.useEffect;function nr(e){const{value:n,defaultValue:r,name:a,inputRef:s,onChange:l,label:i,ariaLabel:c,ariaDescribedBy:u,required:p,placeholder:h,ghostText:d,ghostHint:m,type:C="text",disabled:x=!1,readOnly:y=!1,error:b,helperText:v,maxLength:_,size:g,variant:w="input",fullWidth:N=!1,newline:f=!1,multiline:A=!1,rows:B=3,leftIcon:E,rightIcon:k,clearable:j=!1,list:S,showCount:$=!0,className:V="",onFocus:F,onBlur:U,onKeyDown:T,onEnter:z,inputMode:W,autoComplete:ie,autoFocus:Q,suggestions:L,filterSuggestions:J,onSelectSuggestion:ee,autoActiveFirst:q,openOnFocus:P=!1}=e,R=_n(),D=g??R??mn,H=y||x?void 0:L,{t:ne}=Ee.useTranslation(),te=o.useId();!i&&!c&&jt(`TextField:unnamed:${te}`,"[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 ue=`tf-${te}`,se=`tf-helper-${te}`,pe=o.useRef(null),G=Ku({value:n??"",onChange:l,suggestions:H??[],openOnFocus:P,filterSuggestions:J,onSelectSuggestion:ee,autoActiveFirst:q}),K=!!H&&G.open&&G.filtered.length>0,O=o.useRef(null),[I,ae]=o.useState(null),he=o.useCallback(()=>{const ce=O.current;if(!ce||typeof window>"u")return;const Pe=ce.getBoundingClientRect(),Ye=window.innerHeight,Qe=8,ut=230,vt=typeof document<"u"?document.getElementById(G.listId):null,ct=Math.min(ut,Math.max(vt?.offsetHeight||0,vt?.scrollHeight||0)||ut),Gt=Ye-Pe.bottom,xt=Pe.top,lt=Gt<ct+Qe&&xt>Gt,st=(Ot,Mt)=>Math.min(Math.max(Qe,Ot),Math.max(Qe,Mt));ae({position:"fixed",left:Pe.left,width:Pe.width,...lt?{bottom:st(Ye-Pe.top+Qe,Ye-ct-Qe)}:{top:st(Pe.bottom+Qe,Ye-ct-Qe)},zIndex:Qr(ce)})},[G.listId]);ca(()=>{if(!K)return;he();let ce=null;const Pe=()=>{if(typeof requestAnimationFrame>"u"){he();return}ce===null&&(ce=requestAnimationFrame(()=>{ce=null,he()}))},Ye=Qe=>{const ut=Qe.target;ut&&ut.nodeType===1&&ut.closest?.(".text-field__suggestions")||Pe()};return window.addEventListener("scroll",Ye,!0),window.addEventListener("resize",Pe),()=>{ce!==null&&cancelAnimationFrame(ce),window.removeEventListener("scroll",Ye,!0),window.removeEventListener("resize",Pe)}},[K,he,G.filtered.length]);const re=o.useCallback(ce=>{pe.current=ce,typeof s=="function"?s(ce):s&&(s.current=ce)},[s]),_e=d?`${d}${m??ne("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:h,De=n!==void 0,Se=De&&C==="password",[Ne,He]=o.useState((r??"").length),ve=De?(n??"").length:Ne,xe=o.useRef(n);ca(()=>{xe.current=n}),o.useEffect(()=>{const ce=pe.current;if(!Se||!ce)return;const Pe=n??"";ce.value!==Pe&&(ce.value=Pe)},[Se,n]),o.useEffect(()=>{if(!f||!pe.current)return;const ce=pe.current;ce.style.height="",ce.scrollHeight>ce.clientHeight&&(ce.style.height=`${ce.scrollHeight}px`)},[n,Ne,f]);const we=_!=null&&ve>_,Ae=D===32?16:20,Ie=ke("text-field",`text-field--s${D}`,w==="display"?"text-field--display":"",N?"text-field--full-width":"",x?"text-field--disabled":"",y?"text-field--readonly":"",b?"text-field--error":"",E?"text-field--has-left-icon":"",k||j?"text-field--has-right-icon":"",V),ot={id:ue,...Se?{}:De?{value:n}:{defaultValue:r},ref:re,placeholder:_e,name:a,disabled:x,readOnly:y,autoFocus:Q,maxLength:_,list:S,inputMode:W,autoComplete:ie,"aria-label":!i&&c?c:void 0,"aria-required":p,"aria-invalid":!!b,"aria-describedby":[v||b?se:null,u].filter(Boolean).join(" ")||void 0,role:H?"combobox":void 0,"aria-autocomplete":H?"list":void 0,"aria-haspopup":H?"listbox":void 0,"aria-expanded":H?K:void 0,"aria-controls":K?G.listId:void 0,"aria-activedescendant":K&&G.activeIdx>=0?`${G.listId}-option-${G.activeIdx}`:void 0,onChange:ce=>{const Pe=ce.target;De||He(Pe.value.length),l?.(Pe.value),H&&G.handleInput(),Se&&queueMicrotask(()=>{const Ye=xe.current??"";Pe.value!==Ye&&(Pe.value=Ye)})},onCompositionStart:H?G.handleCompositionStart:void 0,onCompositionEnd:H?G.handleCompositionEnd:void 0,onFocus:(ce=>{F?.(ce),H&&G.handleFocus()}),onBlur:(ce=>{U?.(ce),H&&G.handleBlur()}),onKeyDown:(ce=>{const Pe=(ce.key==="Tab"&&!ce.shiftKey||ce.key===" ")&&!ce.nativeEvent.isComposing;if(d&&Pe&&!y&&!x&&!(ce.currentTarget.value??"").trim()){ce.preventDefault();const Ye=ce.currentTarget;De||(Ye.value=d,He(d.length)),l?.(d);return}H&&ce.key==="Enter"&&!ce.nativeEvent.isComposing&&G.activeIdx>=0?ce.preventDefault():z&&ce.key==="Enter"&&!ce.nativeEvent.isComposing&&(ce.preventDefault(),z()),T?.(ce),H&&G.handleKeyDown(ce)})},pt=j&&!x&&!y&&ve>0,Oe=()=>f?t.jsx("textarea",{...ot,className:"text-field__input text-field__input--auto body-2",rows:1}):A?t.jsx("textarea",{...ot,className:"text-field__input text-field__input--textarea body-2",rows:B}):t.jsx("input",{...ot,type:C,className:"text-field__input body-2"}),Ue=w==="display"&&!f&&!A&&!!_e,rt=()=>t.jsxs(t.Fragment,{children:[Oe(),Ue&&t.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:_e})]});return t.jsxs("div",{ref:O,className:Ie,children:[i&&t.jsxs("label",{htmlFor:ue,className:"text-field__label caption-1",children:[i,p&&t.jsx("span",{className:"text-field__required",children:"*"})]}),t.jsxs("div",{className:"text-field__wrap",children:[E&&t.jsx("span",{className:"text-field__icon text-field__icon--left",children:t.jsx(dt,{icon:E,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ae})}),rt(),_!=null&&$&&t.jsxs("span",{className:`text-field__count caption-2${we?" text-field__count--over":""}`,children:[ve,"/",_]}),pt&&t.jsx(ye,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:ne("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:ce=>{ce.preventDefault()},onClick:()=>{!De&&pe.current&&(pe.current.value="",He(0)),l?.("")},tabIndex:-1}),k&&!pt&&t.jsx("span",{className:"text-field__icon text-field__icon--right",children:t.jsx(dt,{icon:k,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ae})})]}),!!H&&t.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:G.open&&(n??"").length>0&&G.filtered.length===0?ne("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),K&&(typeof document>"u"?null:gn.createPortal(t.jsx("ul",{id:G.listId,className:"text-field__suggestions",role:"listbox",style:I??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:G.filtered.map((ce,Pe)=>t.jsx("li",{id:`${G.listId}-option-${Pe}`,role:"option","aria-selected":Pe===G.activeIdx,className:`text-field__suggestion body-2${Pe===G.activeIdx?" is-active":""}`,onMouseDown:Ye=>Ye.preventDefault(),onClick:()=>{G.handleSelect(ce),pe.current?.focus()},children:typeof ce=="string"?ce:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-field__suggestion-label",children:ce.label}),ce.hint&&t.jsx("span",{className:"text-field__suggestion-hint caption-1",children:ce.hint})]})},typeof ce=="string"?`${ce}-${Pe}`:ce.id))}),document.body)),(v||b)&&t.jsx("div",{className:"text-field__footer",children:t.jsx("span",{id:se,className:"text-field__helper caption-1",role:b?"alert":void 0,children:b||v})})]})}const Yu=()=>{};function fn(e){const n=o.useId(),r=_n()??mn;if(!("variant"in e)){const{label:g,sub:w,onClick:N,children:f,align:A="horizontal",icon:B,useFullWidth:E=!1,required:k=!1}=e,j=S=>{N&&S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),N())};return t.jsxs("div",{className:ke("panel-row",A==="vertical"?"panel-row--vertical":"",E?"panel-row--label-fixed panel-row--fill":"",N?"panel-row--clickable":""),onClick:N,onKeyDown:N?j:void 0,role:N?"button":void 0,tabIndex:N?0:void 0,children:[B!=null&&t.jsx("div",{className:"panel-row__icon",children:B}),g!=null&&t.jsxs("div",{className:"panel-row__left",children:[t.jsxs("div",{className:"panel-row__label body-3",children:[g,k&&t.jsx("span",{className:"required-mark",children:"*"})]}),w&&t.jsx("div",{className:"panel-row__sub caption-1",children:w})]}),t.jsx("div",{className:"panel-row__right",children:f})]})}if(e.variant==="description")return t.jsx("div",{className:"panel-row panel-row--block",children:t.jsx("p",{className:"panel-row__description body-3",children:e.children})});if(e.variant==="empty")return t.jsx("div",{className:"panel-row panel-row--empty body-3",children:e.children});if(e.variant==="loading")return t.jsx("div",{className:"panel-row panel-row--loading",children:t.jsx(kr,{size:28})});if(e.variant==="custom"&&!e.label)return t.jsx("div",{className:"panel-row panel-row--block",children:e.children});const{variant:a,label:s,sub:l,onClick:i,required:c,error:u,align:p="horizontal",useFullWidth:h=!1,icon:d}=e,m=a==="button"?void 0:i;let C=null;const x=a==="toggle"?`panel-toggle-${n}`:void 0,y=u?`panel-error-${n}`:void 0,b=`panel-helper-${n}`;if(a==="toggle"){const g=e;C=t.jsx(Hu,{checked:g.checked,onChange:g.onChange,id:x})}else if(a==="segmented"){const g=e;C=t.jsx(Bn,{options:g.options,value:g.value,onChange:g.onChange,size:g.size??r,ariaLabel:s})}else if(a==="dropdown"){const g=e,w=g.dropdowns?.length?t.jsx("div",{className:`panel-row__dropdown-group${h?" panel-row__dropdown-group--full":""}`,children:g.dropdowns.map((N,f)=>t.jsx("div",{className:h?"panel-row__dropdown-item--full":void 0,children:t.jsx(kn,{options:N.options,value:N.value,onChange:N.onChange,size:r,placeholder:N.placeholder,block:h,error:!!u,ariaDescribedBy:y,ariaLabel:N.ariaLabel??([s,N.placeholder].filter(Boolean).join(" ")||void 0)})},f))}):t.jsx(kn,{options:g.options??[],value:g.value??"",onChange:g.onChange??Yu,size:r,block:h,error:!!u,ariaLabel:s,ariaDescribedBy:y});C=u?t.jsxs("div",{className:`panel-row__dropdown-error-wrap${h?" panel-row__dropdown-error-wrap--full":""}`,children:[w,t.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?C=t.jsx("div",{className:"panel-row__button-group",children:g.buttons.map((w,N)=>t.jsx(ye,{htmlType:"button",size:w.btnSize??r,variant:w.btnVariant??"default",disabled:w.disabled,onClick:w.onClick,children:w.label},N))}):C=t.jsx(ye,{htmlType:"button",size:g.btnSize??r,variant:g.btnVariant??"default",disabled:g.disabled,onClick:g.onClick,children:g.buttonLabel})}else if(a==="text"){const g=e;C=t.jsx("span",{className:`panel-row__text body-2${h?" panel-row__text--full":""}`,style:g.valueColor?{color:g.valueColor}:void 0,children:g.value})}else if(a==="input"){const g=e;C=t.jsxs("div",{className:`panel-row__input-wrap${h?" panel-row__input-wrap--full":""}`,children:[t.jsx(nr,{size:r,value:g.value,onChange:g.onChange??Yu,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:h,error:u,ariaLabel:s,required:c,ariaDescribedBy:g.helperText?b:void 0}),g.helperText&&t.jsx("div",{id:b,className:"panel-row__helper caption-1",children:g.helperText})]})}else a==="custom"&&(C=e.children);u&&a!=="input"&&a!=="dropdown"&&(C=t.jsxs("div",{className:`panel-row__dropdown-error-wrap${h?" panel-row__dropdown-error-wrap--full":""}`,children:[C,t.jsx("span",{id:y,className:"caption-1 panel-row__error",role:"alert",children:u})]}));const v=a==="input"||a==="dropdown"||(a==="text"||a==="custom")&&h,_=g=>{m&&g.target===g.currentTarget&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),m())};return t.jsxs("div",{className:ke("panel-row",p==="vertical"?"panel-row--vertical":"",v?"panel-row--label-fixed":"",a==="text"?"panel-row--text":"",m?"panel-row--clickable":""),onClick:m,onKeyDown:m?_:void 0,role:m?"button":void 0,tabIndex:m?0:void 0,children:[d!=null&&t.jsx("div",{className:"panel-row__icon",children:d}),t.jsxs("div",{className:"panel-row__left",children:[x?t.jsxs("label",{htmlFor:x,className:"panel-row__label body-3",children:[s,c&&t.jsx("span",{className:"required-mark",children:"*"})]}):t.jsxs("div",{className:"panel-row__label body-3",children:[s,c&&t.jsx("span",{className:"required-mark",children:"*"})]}),l&&t.jsx("div",{className:"panel-row__sub caption-1",children:l})]}),t.jsx("div",{className:"panel-row__right",children:C})]})}function Zu(e){const n=e.productName||e.brand,r=[e.brand,e.fitType].filter(a=>!!a&&a!==n);return[...new Set(r)].join(" \xB7 ")}function ux({devices:e,onRelease:n,emptyLabel:r}){const{t:a,i18n:s}=Ee.useTranslation();return t.jsx("div",{className:"panel-row panel-row--device",children:["left","right"].map(l=>{const i=e[l],c=l==="left"?a("device.direction.left","\uC88C"):a("device.direction.right","\uC6B0");return t.jsxs("div",{className:"panel-row__device-column",children:[t.jsxs("div",{className:"panel-row__device-head",children:[t.jsx("span",{className:"panel-row__device-side body-2b",children:c}),i&&n&&t.jsx(ye,{htmlType:"button",size:32,type:"dot",icon:"x",ariaLabel:`${c} ${a("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C")}`,showTooltipInfo:a("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"),onClick:()=>n(l)})]}),i?t.jsxs("div",{className:"panel-row__device-info",children:[t.jsxs("span",{className:"panel-row__device-kind",children:[i.device&&t.jsx(un,{size:"small",variant:qu(i.device),fill:"soft",label:Uu(i.device,a)}),Zu(i)&&t.jsx("span",{className:"panel-row__device-detail body-3",children:Zu(i)})]}),t.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),ts(i.wornYear,i.wornMonth,i.wornDay,s.language)&&t.jsx("span",{className:"panel-row__device-date caption-1",children:a("customers.device.wornSince",{date:ts(i.wornYear,i.wornMonth,i.wornDay,s.language)})})]}):t.jsx("span",{className:"panel-row__device-empty body-3",children:r??a("customers.device.notRegistered","\uBBF8\uB4F1\uB85D")})]},l)})})}function da({title:e,titleLevel:n=2,icon:r,disc:a,actions:s,minHeight:l,maxWidth:i,className:c,scrollable:u,scrollbarGutter:p="auto",compactRows:h=!1,useBorder:d=!0,useBg:m=!0,labelWidth:C,form:x=!1,loading:y,empty:b,children:v}){const _=ke("panel",x?"panel--form":"",l!==void 0?"panel--fill":"",d?"":"panel--no-border",m?"":"panel--no-bg",h?"panel--compact-rows":"",c),g={};l!==void 0&&(g.minHeight=l),i!==void 0&&(g.maxWidth=typeof i=="number"?`${i}px`:i),C!==void 0&&(g["--panel-label-width"]=typeof C=="number"?`${C}px`:C);const w=n?`h${n}`:"div",N=d?mn:48;return t.jsx(Fo.Provider,{value:N,children:t.jsxs("div",{className:_,style:Object.keys(g).length?g:void 0,children:[(!!e||a!=null)&&t.jsxs("div",{className:ke("panel__header",a!=null?"panel__header--with-disc":""),children:[r&&t.jsx(dt,{icon:r,label:typeof e=="string"?e:void 0,className:"panel__icon"}),t.jsxs("div",{className:"panel__title-group",children:[!!e&&t.jsx(w,{className:`panel__title ${a!=null?"body-3b":"h5b"}`,children:e}),a!=null&&t.jsx("p",{className:"panel__disc caption-1",children:a})]}),s&&t.jsx("div",{className:"panel__actions",children:s})]}),y?t.jsx(fn,{variant:"loading"}):b!=null&&o.Children.toArray(v).length===0?t.jsx(fn,{variant:"empty",children:b}):u?t.jsx("div",{className:ke("panel__body--scroll",p==="stable"&&"panel__body--gutter-stable"),children:v}):v]})})}function cx({cols:e=2,layout:n="grid",gap:r=1,collapseAt:a,className:s,style:l,children:i}){const c=o.useRef(null),[u,p]=o.useState();o.useEffect(()=>{const d=c.current;if(a===void 0||!d||(p(d.clientWidth),typeof ResizeObserver>"u"))return;const m=new ResizeObserver(([C])=>p(C.contentRect.width));return m.observe(d),()=>m.disconnect()},[a]);const h=a!==void 0&&u!==void 0&&u<=a;return t.jsx("div",{ref:c,className:ke("panel-grid",n==="columns"&&"panel-grid--columns",s),style:{"--panel-grid-cols":h?1:e,"--panel-grid-gap":typeof r=="number"?`${r}px`:r,...l},children:i})}function ns({checked:e=!1,onChange:n,disabled:r,indeterminate:a,label:s,size:l="medium",className:i,title:c,ariaLabel:u}){const p=o.useRef(null),h=o.useId(),d=o.useRef(!!a);return d.current=!!a,o.useEffect(()=>{p.current&&(p.current.indeterminate=!!a)}),t.jsxs("label",{className:ke("checkbox",l==="small"&&"checkbox--small",l==="large"&&"checkbox--large",r&&"checkbox--disabled",i),htmlFor:h,title:c,children:[t.jsx("input",{ref:p,id:h,type:"checkbox",className:"checkbox__input",checked:e,onChange:m=>{n?.(m.target.checked),p.current&&(p.current.indeterminate=d.current)},disabled:r,"aria-label":!s&&u?u:void 0}),t.jsx("span",{className:"checkbox__box"}),s&&t.jsx("span",{className:"checkbox__label body-3",children:s})]})}function Xu(e,n){const r=()=>{if(e){const[y,b]=e.split("-");return{y:+y,m:+b-1}}const[C,x]=wa(n).split("-");return{y:+C,m:+x-1}},[a,s]=o.useState(()=>r().y),[l,i]=o.useState(()=>r().m),c=o.useRef(e);o.useEffect(()=>{if(e===c.current)return;c.current=e;const C=r();s(C.y),i(C.m)},[e]);const u=o.useRef({y:a,m:l});o.useEffect(()=>{u.current={y:a,m:l}},[a,l]);const p=o.useCallback(C=>{const x=u.current.y*12+u.current.m+C,y=Math.floor(x/12),b=x-y*12;u.current={y,m:b},s(y),i(b)},[]),h=o.useCallback(()=>p(-1),[p]),d=o.useCallback(()=>p(1),[p]),m=o.useCallback((C,x)=>{u.current={y:C,m:x},s(C),i(x)},[]);return{viewY:a,viewM:l,prevMonth:h,nextMonth:d,setViewYM:m}}function Pa(e,n){return new Date(e,n+1,0).getDate()}function dx(e,n){return new Date(e,n,1).getDay()}function pa(e,n,r){return`${e}-${String(n+1).padStart(2,"0")}-${String(r).padStart(2,"0")}`}function px(e){if(!e)return"";const[n,r,a]=e.split("-");return`${n}. ${r}. ${a}.`}function hx(e){const n=e.replace(/\D/g,"");if(n.length!==8)return null;const r=+n.slice(0,4),a=+n.slice(4,6),s=+n.slice(6,8);if(a<1||a>12||s<1||s>31)return null;const l=new Date(r,a-1,s);return l.getFullYear()!==r||l.getMonth()!==a-1||l.getDate()!==s?null:pa(r,a-1,s)}const mx=1900;function fx(e,n,r,a,s){const l=a?+a.split("-")[0]:Math.min(mx,e),i=s?+s.split("-")[0]:Math.max(n+10,e),c=[];for(let u=l;u<=i;u++)c.push({value:String(u),label:r(u)});return c}function Ju(e,n,r,a){const s=[];for(let l=1;l<=12;l++){const i=`${e}-${String(l).padStart(2,"0")}`;r&&i<r.slice(0,7)||a&&i>a.slice(0,7)||s.push({value:String(l),label:n(e,l)})}return s}function Qu({value:e,onChange:n,size:r,min:a,max:s,disabled:l,placeholder:i,className:c,today:u,ariaLabel:p,ariaLabelledBy:h}){const d=_n(),m=r??d??mn;!p&&!h&&jt("DatePicker:unnamed","[ihab/DatePicker] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 ariaLabel \uC774\uB098 ariaLabelledBy \uC911 \uD558\uB098\uB97C \uC8FC\uC138\uC694. placeholder \uB294 \uC774\uB984\uC744 \uB300\uC2E0\uD558\uC9C0 \uBABB\uD569\uB2C8\uB2E4.");const{t:C,i18n:x}=Ee.useTranslation(),y=i??C("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),b=o.useMemo(()=>C("calendar.dow",{returnObjects:!0}),[C]),v=wa(u),{viewY:_,viewM:g,prevMonth:w,nextMonth:N,setViewYM:f}=Xu(e,u),A=o.useId(),B=o.useCallback((I,ae)=>{const he=window.innerHeight,re=window.innerWidth,_e=typeof document<"u"?document.getElementById(A):null,De=Math.max(_e?.offsetHeight||0,_e?.scrollHeight||0)||300,Se=Math.max(I.width,_e?.offsetWidth||0,260),Ne=he-I.bottom,He=I.top,ve=Ne<De&&He>Ne,xe=8,we=(Ae,Ie)=>Math.min(Math.max(xe,Ae),Math.max(xe,Ie));return{position:"fixed",left:we(I.left,re-Se-xe),width:I.width,minWidth:260,...ve?{top:"auto",bottom:we(he-I.top+6,he-De-xe)}:{bottom:"auto",top:we(I.bottom+6,he-De-xe)},zIndex:Qr(ae)}},[A]),{open:E,setOpen:k,toggle:j,style:S,triggerRef:$,menuRef:V}=ea({computeStyle:B,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!E)return;const I=V.current;return(I?.querySelector(".date-picker__day--selected:not(:disabled)")??I?.querySelector(".date-picker__day--today:not(:disabled)")??I?.querySelector(".date-picker__day:not(:disabled)")??I?.querySelector($n)??I)?.focus?.(),()=>{const ae=document.activeElement;(!ae||ae===document.body)&&$.current?.focus?.()}},[E,V,$]);const[F,U]=o.useState(1),T=o.useRef(null),z=o.useRef(null);o.useEffect(()=>{if(!E)return;const I=e&&e.slice(0,7)===`${_}-${String(g+1).padStart(2,"0")}`?+e.slice(8):v.slice(0,7)===`${_}-${String(g+1).padStart(2,"0")}`?+v.slice(8):1;U(I)},[E]),o.useEffect(()=>{if(z.current==null)return;const I=z.current;z.current=null,T.current?.querySelector(`[data-day="${I}"]`)?.focus()}),o.useEffect(()=>{U(I=>Math.min(I,Pa(_,g)))},[_,g]);const W=o.useCallback(I=>{let ae=pa(I.getFullYear(),I.getMonth(),I.getDate());a&&ae<a&&(ae=a),s&&ae>s&&(ae=s);const[he,re,_e]=ae.split("-").map(Number);(he!==_||re-1!==g)&&f(he,re-1),U(_e),z.current=_e},[a,s,_,g,f]),ie=o.useCallback(I=>{const ae=new Date(_,g,F),he=_e=>{ae.setDate(ae.getDate()+_e),W(ae)},re=_e=>{const De=ae.getFullYear()*12+ae.getMonth()+_e,Se=Math.floor(De/12),Ne=De-Se*12;W(new Date(Se,Ne,Math.min(ae.getDate(),Pa(Se,Ne))))};switch(I.key){case"ArrowLeft":he(-1);break;case"ArrowRight":he(1);break;case"ArrowUp":he(-7);break;case"ArrowDown":he(7);break;case"Home":he(-ae.getDay());break;case"End":he(6-ae.getDay());break;case"PageUp":I.shiftKey?re(-12):re(-1);break;case"PageDown":I.shiftKey?re(12):re(1);break;default:return}I.preventDefault()},[_,g,F,W]),Q=o.useCallback(I=>{l||(n(pa(_,g,I)),k(!1))},[_,g,n,k,l]);o.useEffect(()=>{l&&k(!1)},[l,k]);const L=I=>{const ae=pa(_,g,I);return!!(a&&ae<a||s&&ae>s)},J=(()=>{const I=Pa(_,g);if(F>=1&&F<=I&&!L(F))return F;for(let ae=1;ae<=I;ae++)if(!L(ae))return ae;return-1})(),ee=[];for(let I=0;I<dx(_,g);I++)ee.push(null);for(let I=1;I<=Pa(_,g);I++)ee.push(I);const q=m===64?20:m===32?14:m===40?16:18,P=Eo(x.language),R=I=>new Intl.DateTimeFormat(P,{year:"numeric"}).format(new Date(I,0,1)),D=(I,ae)=>new Intl.DateTimeFormat(P,{month:"long"}).format(new Date(I,ae-1,1)),H=fx(_,+v.slice(0,4),R,a,s),ne=Ju(_,D,a,s),te=I=>{const ae=Ju(I,D,a,s);if(ae.length===0)return;const he=ae.some(re=>+re.value===g+1);f(I,he?g:+ae[0].value-1)},[ue,se]=o.useState(null);o.useEffect(()=>{se(null)},[e]);const pe=o.useCallback(I=>{se(I);const ae=hx(I);if(!ae||a&&ae<a||s&&ae>s)return;n(ae);const[he,re]=ae.split("-");f(+he,+re-1)},[a,s,n,f]),G=o.useCallback(()=>{se(null)},[]),K=o.useCallback(I=>{I.key==="Enter"?(I.preventDefault(),G(),k(!1)):I.key==="Escape"?(G(),k(!1)):I.key==="ArrowDown"&&!E&&(I.preventDefault(),k(!0))},[G,k,E]),O=E?gn.createPortal(t.jsxs("div",{ref:V,id:A,className:"date-picker__dropdown",style:S,"data-tooltip-ignore":!0,role:"dialog","aria-label":C("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),tabIndex:-1,children:[t.jsxs("div",{className:"date-picker__nav",children:[t.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:w,"aria-label":C("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:t.jsx(ll,{size:16,strokeWidth:2})}),t.jsxs("div",{className:"date-picker__nav-ym",children:[t.jsx(kn,{className:"date-picker__nav-dropdown",ariaLabel:C("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:H,value:String(_),onChange:I=>te(+I),size:40}),t.jsx(kn,{className:"date-picker__nav-dropdown",ariaLabel:C("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:ne,value:String(g+1),onChange:I=>f(_,+I-1),size:40})]}),t.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:N,"aria-label":C("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:t.jsx(il,{size:16,strokeWidth:2})})]}),t.jsxs("div",{className:"date-picker__grid",ref:T,onKeyDown:ie,children:[b.map(I=>t.jsx("div",{className:"date-picker__dow caption-1",children:I},I)),ee.map((I,ae)=>{if(I===null)return t.jsx("div",{},`e${ae}`);const he=pa(_,g,I),re=he===e,_e=he===v,De=L(I),Se=ae%7;return t.jsx("button",{type:"button",disabled:De,"data-day":I,tabIndex:I===J?0:-1,"aria-current":_e?"date":void 0,onClick:()=>!De&&Q(I),className:ke("date-picker__day caption-1",re&&"date-picker__day--selected",_e&&!re&&"date-picker__day--today",De&&"date-picker__day--disabled",Se===0&&"date-picker__day--sun",Se===6&&"date-picker__day--sat"),children:I},I)})]})]}),document.body):null;return t.jsxs("div",{className:ke("date-picker",`date-picker--s${m}`,E&&"date-picker--open",c),children:[t.jsxs("div",{className:"date-picker__field",children:[t.jsx("input",{ref:$,type:"text",className:"date-picker__trigger body-2",value:ue??px(e),placeholder:y,onChange:I=>pe(I.target.value),onClick:()=>!l&&!E&&j(),onKeyDown:K,onBlur:G,disabled:l,"aria-haspopup":"dialog","aria-expanded":E,"aria-label":p,"aria-labelledby":h,inputMode:"numeric",autoComplete:"off"}),t.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!l&&j(),disabled:l,tabIndex:-1,"aria-label":y,"aria-haspopup":"dialog","aria-expanded":E,children:t.jsx(gl,{size:q,className:"date-picker__icon",strokeWidth:1.5})})]}),O]})}const ec=["personal","sensitive","marketing"];function Cx({takenKinds:e,busy:n,today:r,onClose:a,onSubmit:s,className:l}){const{t:i}=Ee.useTranslation(),[c]=o.useState(()=>wa(r)),[u,p]=o.useState([]),[h,d]=o.useState("paper"),[m,C]=o.useState("self"),[x,y]=o.useState(c),[b,v]=o.useState(""),_=ec.filter(w=>!e.includes(w)),g={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 t.jsx(qn,{title:i("customers.consent.record","\uB3D9\uC758 \uBC1B\uAE30"),closeDisabled:n,onClose:a,className:l,footer:()=>t.jsx(ye,{htmlType:"button",size:48,variant:"main",disabled:n||u.length===0,label:i("customers.consent.submit","\uC800\uC7A5\uD558\uAE30"),onClick:()=>s({kinds:u,method:h,source:m,consentedAt:x||null,note:b.trim()||null})}),children:t.jsxs(da,{useBorder:!1,labelWidth:96,children:[t.jsx(fn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.kinds","\uBC1B\uC740 \uAC08\uB798"),children:t.jsxs("div",{className:"consent-record-popup__kinds",children:[_.map(w=>t.jsx(ns,{checked:u.includes(w),disabled:n,label:g[w],onChange:N=>p(f=>N?[...f,w]:f.filter(A=>A!==w))},w)),_.length===0&&t.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.")})]})}),t.jsx(fn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),children:t.jsx(Bn,{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:w=>d(String(w))})}),t.jsx(fn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),children:t.jsx(Bn,{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:w=>C(String(w))})}),t.jsx(fn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.day","\uBC1B\uC740 \uB0A0"),children:t.jsx(Qu,{size:48,value:x,max:c,today:r,onChange:w=>y(w??"")})}),t.jsx(fn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.note","\uBA54\uBAA8"),children:t.jsx(nr,{size:48,fullWidth:!0,value:b,onChange:v,disabled:n,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 rs({page:e,totalPages:n,onChange:r,prevLabel:a,nextLabel:s,className:l=""}){const{t:i}=Ee.useTranslation(),c=a??i("common.prevPage","\uC774\uC804 \uD398\uC774\uC9C0"),u=s??i("common.nextPage","\uB2E4\uC74C \uD398\uC774\uC9C0"),p=Math.max(1,n),h=()=>r(Math.max(1,Math.min(p,e-1))),d=()=>r(Math.min(p,e+1));return t.jsxs("div",{className:ke("pagination",l),children:[t.jsx(ye,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-left",ariaLabel:c,disabled:e<=1,onClick:h}),t.jsxs("span",{className:"pagination__info body-3","aria-live":"polite","aria-atomic":"true",children:[Math.min(Math.max(1,e),p)," / ",p]}),t.jsx(ye,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:u,disabled:e>=n,onClick:d})]})}function as({count:e,search:n,segment:r,filters:a,pageSize:s,pagination:l,actions:i,className:c}){const u=_n()??mn,{t:p}=Ee.useTranslation(),h=e!=null&&t.jsxs("p",{className:"toolbar__count body-1",role:"status","aria-atomic":"true",children:[e.prefix??p("common.totalPrefix","\uCD1D "),t.jsx("span",{className:"toolbar__count-highlight",children:e.value}),e.unit,e.suffix]}),d=!!(n||a?.length||s||l||i);return t.jsxs("div",{className:ke("toolbar",c),children:[t.jsxs("div",{className:"toolbar__row",children:[h,r&&(Array.isArray(r)?r:[r]).map((m,C)=>t.jsx(Bn,{size:u,...m},m.ariaLabel??C))]}),d&&t.jsx("div",{className:"toolbar__row",children:t.jsxs("div",{className:"toolbar__row-end",children:[n&&t.jsx(nr,{className:"toolbar__search",size:u,value:n.value,onChange:n.onChange,placeholder:n.placeholder??p("common.search","\uAC80\uC0C9"),ariaLabel:n.placeholder??p("common.search","\uAC80\uC0C9"),autoFocus:n.autoFocus,clearable:!0}),a?.map((m,C)=>t.jsx(kn,{size:u,options:m.options,value:m.value,onChange:m.onChange,ariaLabel:m.ariaLabel},C)),(s||l)&&t.jsxs("div",{className:"toolbar__pager",children:[s&&t.jsx(kn,{size:u,options:s.options,value:s.value,onChange:s.onChange,ariaLabel:s.ariaLabel??p("common.pageSizeSelect","\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218")}),l&&t.jsx(rs,{page:l.page,totalPages:l.total,onChange:l.onChange,prevLabel:l.prevLabel,nextLabel:l.nextLabel})]}),i]})})]})}function tc(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(tc).join(""):""}function gx(e){let n=e.replace(/\r\n/g,`
827
+ 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"},ny={timeHM:"{{hh}}:{{mm}}",timeH:"{{hh}}:{{mm}}"},ay={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"},ry={clearAriaLabel:"Clear input"},oy={ariaLabel:"Select tab"},sy={ariaLabel:"Tabs"},ly={dragPrompt:"Drag and drop files here",browseButton:"Choose Files",removeAriaLabel:"Remove {{name}}"},iy={ariaLabel:"User avatar"},uy={relativeDay:{today:"Today",yesterday:"Yesterday",daysAgo:"{{n}}d ago"}},cy={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"},dy={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"}},py={steps:"Step {{current}} of {{total}}"},hy={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"},my={resetColumns:"Reset column widths",scrollRegion:"Horizontally scrollable table",rowActionHint:"Press a row to open its details"},fy={viewWords:"Words"},Cy={ariaLabel:"Banner",dotAriaLabel:"Banner {{index}} of {{count}}"},gy={chooseDate:"Choose a date",selectYear:"Select year",selectMonth:"Select month"},by={previewRegion:"Report preview \u2014 scrollable sideways"},yy={description:"Description",textbox:"Text",training:"Training guide",menu:"Menu"},vy={place:{labial:"Bilabial",alveolar:"Alveolar",palatal:"Palatal",velar:"Velar",glottal:"Glottal"}},xy={clearSelection:"Clear selection"},_y={showResult:"Show {{type}} result"},wy={selected:"Selected",remove:"Remove",exclude:"Excluded",nthSelected:"Selection {{n}}"},By={loading:"Loading"},ky={state:{active:"playing",played:"heard",correct:"correct",wrong:"wrong"}},Ay={ariaLabel:"Breadcrumb"},Ny={empty:"No items yet."},Ey={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"},jy={common:Eb,calendar:jb,passCard:Db,rating:Sb,colorPicker:Tb,dropdown:Mb,accordion:$b,header:Lb,nav:Rb,settings:Pb,usage:Fb,account:Ib,training:Ob,customers:zb,payment:Wb,coupons:Hb,visits:Vb,trainingType:qb,myWordTable:Ub,keyWords:Gb,wordTable:Kb,wordSearch:Yb,wordPrint:Zb,topic:Xb,device:Jb,manager:Qb,wordPairs:ey,footer:ty,date:ny,wordData:ay,textField:ry,segmentedControl:oy,tabs:sy,fileUpload:ly,avatar:iy,myHomework:uy,trainingStatus:cy,store:dy,progress:py,trainingMiss:hy,table:my,wordScore:fy,topBanner:Cy,datePicker:gy,report:by,tooltip:yy,phonemeProfile:vy,bulkBar:xy,debug:_y,badge:wy,loader:By,soundCompass:ky,breadcrumb:Ay,board:Ny,promoBannerBg:Ey};const Dy="0.438.0",Sy=[{code:"ko",label:"\uD55C\uAD6D\uC5B4"},{code:"en",label:"English"}],Mo="ko",Ty="ihab_display_language";function gi(){if(typeof window>"u")return Mo;try{const e=localStorage.getItem(Ty);if(e&&Sy.some(n=>n.code===e))return e}catch{}return Mo}function bi(e){try{document.documentElement.lang=e}catch{}}Jt.on("languageChanged",bi),bi(gi()),Jt.use(Ee.initReactI18next).init({resources:{ko:{translation:Nb},en:{translation:jy}},lng:gi(),fallbackLng:Mo,interpolation:{escapeValue:!1},react:{useSuspense:!1}});const My=99,$y=new Map;try{Jt.store?.on?.("added",()=>$y.clear())}catch{}Array.from({length:My},(e,n)=>n+1);let Ar=null,yi=null,vi=null;function Ly(){const e=si();if(e&&e.entries.length>0){const n=qC();if(Ar&&yi===e&&vi===n)return Ar;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:n?.[s.word]?[...n[s.word].cho??[],...n[s.word].jung??[],...n[s.word].jong??[]]:[],pron:s.pronunciation||s.word,grade:s.grade}));return Ar=r,yi=e,vi=n,Ar}return[]}new Proxy([],{get(e,n){const a=Ly(),r=a[n];return typeof r=="function"?r.bind(a):r}});function Ry(e){if(e.includes("\\")&&e.includes("("))return!0;if(!/url\s*\(/i.test(e))return!1;const n=e.replace(/url\(\s*(['"]?)#[^)'"]*\1\s*\)/gi,"");return/url\s*\(/i.test(n)}function Py(e){if(typeof window>"u")return"";const n=(a,r)=>{typeof r.attrValue=="string"&&Ry(r.attrValue)&&(r.keepAttr=!1)};xa.addHook("uponSanitizeAttribute",n);try{return xa.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use","style"],FORBID_ATTR:["xlink:href","href"]})}finally{xa.removeHook("uponSanitizeAttribute",n)}}function Fy(e){const[n,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 f=e;d&&(e.startsWith("/")?f=vo(e):/^(Logo|Symbol)/i.test(d)?f=vo(`logo/${d}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),f=e)),i(null),c(null),a(e),s(f)},[e]),o.useEffect(()=>{if(!r)return;let d=!1;async function f(){try{let C=await fetch(r);C.ok||(C=await fetch(r));const x=C.headers.get("content-type")||"";if(d)return;if(x.includes("svg")){i("mask");return}if(x.startsWith("image/")){i("img");return}const y=await fetch(r);if(!y.ok)throw new Error("not ok");const b=await y.text();if(d)return;if(/^\s*<svg[\s>]/i.test(b)){const v=Py(b);if(!v){i("none");return}c(v),i("inline");return}i("none")}catch{d||i("none")}}return f(),()=>{d=!0}},[r]),o.useEffect(()=>{let d=!1,f=null;return l==="mask"&&r&&fetch(r).then(C=>{if(!C.ok)throw new Error("fetch failed");return C.blob()}).then(C=>{d||(f=URL.createObjectURL(C),h(f))}).catch(()=>{d||i("img")}),()=>{d=!0,f&&URL.revokeObjectURL(f),h(null)}},[l,r]),n===e?{iconToUse:r,mode:l,svgText:u,blobUrl:p}:{iconToUse:null,mode:null,svgText:null,blobUrl:null}}function dt(e){const{icon:n,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",f=i??"iconRenderer-icon-svg",C=typeof n=="string"?n:null,x=kf(C),{iconToUse:y,mode:b,svgText:v,blobUrl:_}=Fy(C),g=(B,j={})=>t.jsx("span",{className:p,style:u,...j,children:B}),w=typeof c=="number"?{width:c,height:c,objectFit:"contain"}:null,N=(B,j={})=>t.jsx("img",{src:B,alt:typeof a=="string"?a:typeof a=="number"?String(a):"",className:h,...j,style:w?{...j.style,...w}:j.style});if(!n)return null;if(typeof n!="string")return g(n);if(n==="none")return g(t.jsx("span",{className:f,dangerouslySetInnerHTML:{__html:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true"></svg>'}}),{"aria-hidden":"true"});if(x)try{return g(o.createElement(x,{className:f,size:typeof c=="number"?c:20}),{"aria-hidden":"true"})}catch{}if(y&&y.endsWith(".svg")){if(b==="mask"){const B={"--icon-url":_?`url(${_})`:`url(${y})`,...typeof c=="number"?{"--icon-size":`${c}px`}:null};return g(t.jsx("span",{className:d,style:B}),{"aria-hidden":"true"})}return b==="img"?g(N(y,{onError:B=>{B.currentTarget.onerror=null,B.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):b==="inline"?g(t.jsx("span",{className:f,dangerouslySetInnerHTML:v?{__html:v}:void 0}),{"aria-hidden":"true"}):g(null,{"aria-hidden":"true"})}if(n.startsWith("/")||n.includes("/assets/")||n.match(/\.(png|jpg|jpeg|webp|gif)$/i))return N(vo(n),{style:u,onError:B=>{B.currentTarget.onerror=null,B.currentTarget.style.display="none"}});const m=typeof c=="number"?c:20,A=`<svg width="${m}" height="${m}" 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 g(t.jsx("span",{className:f,dangerouslySetInnerHTML:{__html:A}}),{"aria-hidden":"true"})}function xi(e){const[n,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:n,press:l}}function Iy({icon:e,title:n,message:a,action:r,className:s}){const{pending:l,press:i}=xi(r?.onClick);return t.jsxs("div",{className:ke("empty-state",s),children:[e&&t.jsx(dt,{icon:e,size:48,className:"empty-state__icon"}),n&&t.jsx("p",{className:"empty-state__title h4",children:n}),a&&t.jsx("p",{className:"empty-state__message body-3",children:a}),r&&t.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&&t.jsx(dt,{icon:r.icon,className:"button__icon"}),t.jsx("span",{className:"button__label button-1",children:r.label})]})]})}function Oy({message:e,hint:n,icon:a="triangle-alert",onRetry:r,retryLabel:s,className:l}){const{t:i}=Ee.useTranslation(),{pending:u,press:c}=xi(r);return t.jsxs("div",{className:ke("empty-state","error-state",l),role:"alert",children:[t.jsx(dt,{icon:a,size:48,className:"empty-state__icon error-state__icon"}),t.jsx("p",{className:"empty-state__message body-3",children:e??i("common.errorState.message",{defaultValue:"\uBD88\uB7EC\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."})}),n&&t.jsx("p",{className:"error-state__hint caption-1",children:n}),r&&t.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:[t.jsx(dt,{icon:"rotate-cw",className:"button__icon"}),t.jsx("span",{className:"button__label button-1",children:s??i("common.errorState.retry",{defaultValue:"\uB2E4\uC2DC \uC2DC\uB3C4"})})]})]})}function zy({icon:e,title:n,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`,f=()=>{l||i?.()};return t.jsx("section",{role:"button",tabIndex:l?-1:0,"aria-disabled":l||void 0,"aria-labelledby":p,"aria-describedby":`${h} ${d}`,onClick:f,onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),f())},className:ke("action-card",`action-card--${s}`,l&&"action-card--disabled",u),children:t.jsxs("div",{className:"action-card__body",children:[t.jsx("span",{"aria-hidden":!0,className:"action-card__chip",children:t.jsx(dt,{icon:e,size:34})}),t.jsxs("div",{className:"action-card__text",children:[t.jsx("h2",{id:p,className:"action-card__title",children:n}),t.jsx("p",{id:h,className:"action-card__desc",children:a})]}),t.jsxs("div",{className:"action-card__cta",children:[t.jsx("span",{id:d,children:r}),t.jsx("span",{"aria-hidden":!0,className:"action-card__arrow",children:t.jsx(dt,{icon:"arrow-right",size:18})})]})]})})}function Wy({as:e="div",className:n="",children:a,storage:r,...s}){r&&pC({resolveUrl:r.resolveUrl,download:r.download??(()=>Promise.reject(new Error("[ihabdevteam-core] CoreScope: download resolver\uAC00 \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."))),exists:r.exists,resolvePath:r.resolvePath,noiseBaseUrl:r.noiseBaseUrl,noiseFileGain:r.noiseFileGain});const l=ke("ihabdevteam-core-scope",n);return t.jsx(e,{className:l,...s,children:a})}function Hy(e){if(e.closest('[aria-hidden="true"], [hidden], [inert]'))return!1;for(let n=e;n;n=n.parentElement){const a=window.getComputedStyle(n);if(a.display==="none"||a.visibility==="hidden"||a.visibility==="collapse")return!1}return!0}function $o(e,n=!0){o.useEffect(()=>{if(!n)return;const a=e.current;if(!a)return;const r=s=>{if(s.key!=="Tab")return;const l=Array.from(a.querySelectorAll($n)).filter(Hy);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,n])}const $n='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',Lo=new WeakMap;function Ro(e,n){e&&Lo.set(e,n)}function Po(e){let n=e;for(let a=0;n&&!n.isConnected&&a<10;a++){let r=n;for(;r&&!Lo.has(r);)r=r.parentElement;if(!r)return n;n=Lo.get(r)??null}return n}function _i(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 Nr(e,n,a){const r=e?.isConnected?e:a?.isConnected?a:null;if(_i(n)&&!(e&&e.contains(n)))return n.focus(),n;if(!r)return null;const s=Array.from(document.querySelectorAll($n)).filter(c=>!(e&&e.contains(c))&&_i(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 Vy({title:e="",lines:n=[],notices:a=null,children:r,variant:s="default",dismissible:l=!1,className:i=""}){const{t:u}=Ee.useTranslation(),[c,p]=o.useState(!1),h=o.useRef(null),d=o.useCallback(()=>{const y=h.current;y&&y.contains(document.activeElement)&&Nr(y),p(!0)},[]);if(c)return null;const f=`notice-box notice-box--${s} body-2 ${i}`.trim(),C=l&&t.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 t.jsxs("div",{className:f,role:"note",children:[a.map((y,b)=>t.jsxs("div",{className:"notice-box__inner",children:[y.title?t.jsx("span",{className:"notice-box__title body-3",children:y.title}):null,t.jsx("div",{className:"notice-box__body",children:y.lines&&y.lines.length?t.jsx("div",{children:y.lines.map((v,_)=>t.jsx("span",{className:"notice-box__line body-3",children:v},_))}):y.children??null})]},b)),C]});const x=e||n.length?t.jsxs("div",{className:"notice-box__inner",children:[e?t.jsx("span",{className:"notice-box__title body-1",children:e}):null,t.jsx("div",{className:"notice-box__body",children:n.length?t.jsx("ul",{children:n.map((y,b)=>t.jsx("li",{className:"notice-box__line",children:y},b))}):r})]}):t.jsx("div",{className:"notice-box__inner",children:r});return t.jsxs("div",{ref:h,className:f,role:"note",children:[x,C]})}const Fo=o.createContext(void 0);function _n(){return o.useContext(Fo)}const qy={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0};function ka(e){const{t:n}=Ee.useTranslation(),{variant:a="spinner",size:r=24,progress:s=null,label:l}=e||{},i=l||n("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 t.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:t.jsx("div",{className:"loader-bar__inner",style:c?void 0:{width:`${p}%`}})})}const u=typeof r=="number"?`${r}px`:r;return t.jsxs("div",{className:"loader-spinner",style:{width:u,height:u},role:"status","aria-label":i,children:[t.jsx("span",{style:qy,children:i}),t.jsxs("svg",{className:"loader-spinner__svg",viewBox:"0 0 50 50",width:r,height:r,children:[t.jsx("circle",{className:"loader-spinner__bg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4"}),t.jsx("circle",{className:"loader-spinner__fg",cx:"25",cy:"25",r:"20",fill:"none",strokeWidth:"4",strokeLinecap:"round"})]})]})}const Aa=[];let Er=!1;function wi(e){if(e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)return;const n=Aa[Aa.length-1];n&&(e.stopPropagation(),n())}function la(e){return Aa.push(e),!Er&&typeof document<"u"&&(document.addEventListener("keydown",wi),Er=!0),()=>{const n=Aa.lastIndexOf(e);n>=0&&Aa.splice(n,1),Aa.length===0&&Er&&typeof document<"u"&&(document.removeEventListener("keydown",wi),Er=!1)}}const Bi=o.createContext(null);function Uy(e){return/max-width:\s*7[0-9][0-9]px/.test(e)}const ki=e=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches;function Gy(e){const n=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 tl.useSyncExternalStore(n,()=>ki(e),()=>!1)}function Ky(e){const[n,a]=o.useState(ki(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]),n}const Yy=typeof tl.useSyncExternalStore=="function"?Gy:Ky;function wn(e){const n=o.useContext(Bi),a=Yy(e);return n&&typeof n.mobile=="boolean"&&Uy(e)?n.mobile:a}const Zy="(prefers-reduced-motion: reduce)";function jr(){return wn(Zy)}const Ai={"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 Xy(e,n){const a=Object.keys(e).sort((r,s)=>s.length-r.length);for(const r of a){if(!n.startsWith(r))continue;const s=n.slice(r.length);if(!(s!==""&&!s.startsWith("__")&&!s.startsWith("--")))return e[r]+s}return null}function Jy(e){return Xy(Ai,e)}function le(e){if(!e||Object.keys(Ai).length===0)return e;const n=[];for(const a of e.split(/\s+/)){if(!a)continue;const r=Jy(a);r&&n.push(r)}return n.length?`${e} ${n.join(" ")}`:e}function Bn(e){const{anchorRect:n,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:f=!1,useBorder:C=!0,header:x,focusOnOpen:y}=e||{},b=o.useRef(null),[v,_]=o.useState({position:"fixed",left:0,top:-9999}),[g,w]=o.useState(!1),[N,m]=o.useState("bottom"),[A,B]=o.useState(!1),[j,k]=o.useState(!1),E=!n&&!a,D=o.useRef(null),$=o.useCallback((L=!1,J=!1)=>{if(j&&f)return;const ee=a?a.getBoundingClientRect():n,q=J&&D.current?D.current:ee;if(!q||!b.current)return;const P=b.current,{offsetWidth:R,offsetHeight:S}=P,H=window.innerWidth,ne=window.innerHeight,te=H-q.right,ue=q.left,se=q.top,pe=ne-q.bottom;let G=0,K=0,O="top";if(se>=S+r)O="top",K=q.top-r-S,G=q.left+q.width/2-R/2;else if(pe>=S+r)O="bottom",K=q.bottom+r,G=q.left+q.width/2-R/2;else if(te>=R+r)O="right",G=q.right+r,K=q.top+q.height/2-S/2;else if(ue>=R+r)O="left",G=q.left-r-R,K=q.top+q.height/2-S/2;else{const ae=Math.max(se,pe,te,ue);ae===se?(O="top",K=q.top-r-S,G=q.left+q.width/2-R/2):ae===pe?(O="bottom",K=q.bottom+r,G=q.left+q.width/2-R/2):ae===te?(O="right",G=q.right+r,K=q.top+q.height/2-S/2):(O="left",G=q.left-r-R,K=q.top+q.height/2-S/2)}const I=Number.isFinite(Number(s))?Number(s):8;G=Math.min(Math.max(G,I),H-R-I),K=Math.min(Math.max(K,I),ne-S-I);const re=Math.round(G),he=Math.round(K);L&&b.current?(b.current.style.left=`${re}px`,b.current.style.top=`${he}px`,b.current.dataset.placement=O):(m(O||N),_({position:"fixed",left:re,top:he}),B(!0))},[j,f,a,n,r,s,N]);o.useEffect(()=>()=>{D.current=null},[a,n]),o.useLayoutEffect(()=>{if(E)return;if(j&&f){_({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),B(!0);return}D.current===null&&(D.current=a?a.getBoundingClientRect():n??null),$(!1,!0);const L=requestAnimationFrame(()=>$(!1,!0));return()=>cancelAnimationFrame(L)},[n,a,r,h,s,E,j,f,$]),o.useEffect(()=>{if(E||j&&f||!b.current||typeof ResizeObserver>"u")return;const L=new ResizeObserver(()=>{n&&$()});return L.observe(b.current),()=>L.disconnect()},[n,h,s,E,j,f,$]),o.useEffect(()=>{if(E||j&&f)return;let L=null;const J=()=>{if(a&&(D.current=a.getBoundingClientRect()),typeof requestAnimationFrame>"u"){$(!0);return}L===null&&(L=requestAnimationFrame(()=>{L=null,$(!0)}))},ee=q=>{if(!a&&l){const P=q.target;if(P&&b.current&&b.current.contains(P))return;try{if(P&&P.closest&&P.closest("[data-tooltip-ignore]"))return}catch{}z.current(!0);return}J()};return window.addEventListener("resize",J),document.addEventListener("scroll",ee,{passive:!0,capture:!0}),()=>{L!==null&&cancelAnimationFrame(L),window.removeEventListener("resize",J),document.removeEventListener("scroll",ee,{capture:!0})}},[n,a,l,r,h,s,E,j,f,$]),o.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const L=window.matchMedia("(max-width: 768px)"),J=()=>k(!!L.matches);J();try{L.addEventListener?L.addEventListener("change",J):L.addListener(J)}catch{try{L.addListener(J)}catch{}}return()=>{try{L.removeEventListener?L.removeEventListener("change",J):L.removeListener(J)}catch{}}},[]);const V=o.useRef(!1),F=o.useRef(null),U=jr(),T=o.useCallback((L=!1)=>{if(l&&!(g||V.current)){if(V.current=!0,L){w(!0);try{l&&l()}catch{V.current=!1,w(!1)}return}w(!0),F.current=setTimeout(()=>{F.current=null;try{l&&l()}catch{V.current=!1,w(!1)}},U?0:200)}},[g,l,w,U]);o.useEffect(()=>()=>{F.current&&clearTimeout(F.current)},[]),o.useEffect(()=>{if(E)return;const L=q=>{const P=b.current;if(!P)return;const R=q.target;if(R&&!P.contains(R)){try{if(R.closest&&R.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},J=q=>{const P=b.current;if(!P)return;const R=q.target;if(R&&!P.contains(R)){try{if(R.closest&&R.closest("[data-tooltip-ignore]"))return}catch{}i&&T(!0)}},ee=q=>{if(q.key==="Tab"){const P=b.current;if(!P)return;const R=P.querySelectorAll($n);if(!R||R.length===0)return;const S=R[0],H=R[R.length-1],ne=document.activeElement;q.shiftKey?ne===S&&(q.preventDefault(),H.focus()):ne===H&&(q.preventDefault(),S.focus())}};return document.addEventListener("pointerdown",L,!0),document.addEventListener("click",J,!0),document.addEventListener("keydown",ee),()=>{document.removeEventListener("pointerdown",L,!0),document.removeEventListener("click",J,!0),document.removeEventListener("keydown",ee)}},[l,i,T,E]);const z=o.useRef(T);o.useEffect(()=>{z.current=T});const W=!!l;o.useEffect(()=>{if(!(E||!W))return la(()=>z.current())},[E,W]),o.useEffect(()=>{const L=()=>{T(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",L),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",L)}},[T]);const ie=o.useRef(null);o.useEffect(()=>{if(E||y===!1||!A)return;const L=b.current;if(!L)return;const J=L.querySelector($n);if(J)return ie.current=document.activeElement,J.focus({preventScroll:!0}),()=>{const ee=ie.current;ie.current=null,ee&&document.contains(ee)&&ee.focus({preventScroll:!0})}},[E,y,A]),o.useEffect(()=>{c==="dialog"&&!p&&jt("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 Q=t.jsxs("div",{ref:b,className:le(`tooltip__content ${E?"tooltip__content--inline":""} ${C?"tooltip__content--bordered":""} ${g?"is-closing":""} ${u} ${j&&f?"is-mobile":""}`),role:c,"aria-label":p||void 0,style:E?{}:{...v,visibility:A?"visible":"hidden"},tabIndex:-1,"data-placement":N,"data-left":E?"":v.left,"data-top":E?"":v.top,"data-anchor-left":n?Math.round(n.left):"","data-anchor-top":n?Math.round(n.top):"","data-anchor-width":n?Math.round(n.width):"","data-anchor-height":n?Math.round(n.height):"",children:[x!=null&&t.jsx("div",{className:le("tooltip__header h5"),children:x}),h]});if(E||typeof document>"u")return Q;if(d||j&&f){const L=t.jsxs("div",{className:le("tooltip__portal"),children:[t.jsx("div",{className:le("tooltip__backdrop"),onClick:()=>{i&&T(!0)}}),Q]});return gn.createPortal(L,document.body)}return gn.createPortal(Q,document.body)}function zn(e){const{anchorRect:n,text:a,offset:r=8,onClose:s,className:l="",ariaLabel:i}=e||{};return a?t.jsx(Bn,{anchorRect:n,offset:r,onClose:s,closeOnOutsideClick:!1,className:le(`info-tooltip ${l}`),ariaLabel:i||a,children:t.jsx("div",{className:le("info-tooltip__content body-3"),children:a})}):null}function Qn(e){const{t:n}=Ee.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(f=>typeof f=="string"?{text:f}:f);return!d.length&&!r?null:t.jsx(Bn,{anchorRect:a,offset:c,onClose:u,closeOnOutsideClick:p,useBorder:!1,className:le("description-tooltip"),ariaLabel:r||n("tooltip.description","\uC124\uBA85"),children:t.jsxs("div",{className:le("description-tooltip__box"),children:[r&&t.jsx("span",{className:le("description-tooltip__title body-2"),children:r}),t.jsx("ol",{className:le(`description-tooltip__items${h&&h>1?" description-tooltip__items--columns":""}`),style:h&&h>1?{columnCount:h}:void 0,children:d.map((f,C)=>t.jsxs("li",{className:le(`description-tooltip__item body-3${C===l?" description-tooltip__item--active":""}`),children:[i&&d.length>1&&t.jsxs("span",{className:le("description-tooltip__index button-1"),children:[C+1,"."]}),f.color&&t.jsx("span",{className:le("description-tooltip__dot"),style:{background:f.color},"aria-hidden":"true"}),t.jsx("span",{children:f.text})]},C))})]})})}function Ja(e){const n=o.useRef(e);return o.useEffect(()=>{n.current=e}),n}let Io=0,Ni=!1;function Ei(){Ni||typeof document>"u"||(Ni=!0,document.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(Io=Date.now())},!0),document.addEventListener("touchstart",()=>{Io=Date.now()},{capture:!0,passive:!0}))}Ei();function ea(e){return!!e&&e.pointerType==="touch"}function ia(e=1e3){return Ei(),Date.now()-Io<e}function Dr(e,n,a,{enabled:r=!0,fallbackOnParent:s=!1}={}){const l=Ja(e),i=Ja(n),u=o.useRef(null),c=o.useRef(0);o.useEffect(()=>{if(!r||typeof document>"u")return;const h=d=>{const f=d,C=d.target,x=a.current,y=!!(C&&x&&x.contains(C));if(f.pointerType!=="touch"){y&&(u.current=null);return}if(y){u.current=l.current;return}u.current=null,l.current&&!(C&&C.closest?.(".tooltip__content"))&&i.current(!1,x)};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 f=null;const C=b=>{const v=b.changedTouches?.[0];if(!v)return!1;const _=h.getBoundingClientRect();return v.clientX>=_.left&&v.clientX<=_.right&&v.clientY>=_.top&&v.clientY<=_.bottom},x=b=>{f=C(b)?l.current:null},y=b=>{const v=f;f=null,!(v===null||Date.now()-c.current<700||!C(b))&&(u.current=null,c.current=Date.now(),i.current(!v,h))};return d.addEventListener("touchstart",x,{passive:!0}),d.addEventListener("touchend",y),()=>{d.removeEventListener("touchstart",x),d.removeEventListener("touchend",y)}},[r,s,a,l,i]),{touchPress:p}}function Qy(e,n){const{size:a,type:r,htmlType:s,href:l,target:i,rel:u,icon:c,rightIcon:p,label:h,count:d,subLabel:f,children:C,ariaLabel:x,variant:y="default",align:b="center",nowrap:v=!1,ellipsis:_=!1,selected:g,toggleable:w=!1,ariaExpanded:N,ariaControls:m,disabled:A=!1,loading:B=!1,useLabel:j=!0,useBorder:k=!0,useBG:E=!0,useDisabledCovered:D=!1,useDisabledInvisible:$=!1,useDisabledFilled:V=!1,width:F,minWidth:U,onClick:T,onDisabledClick:z,showTooltipInfo:W=!1,tooltipInfoText:ie=null,tooltipDescription:Q=null,tooltipOnly:L=!1,iconSize:J="medium",iconColor:ee,shape:q="rounded",color:P,className:R,...S}=e,H=_n(),ne=a??H??48,te=typeof ne=="string"&&isNaN(Number(ne))?ne.toLowerCase():String(Number(ne)||48),ue=te.match(/^\d+$/)?`button${te}`:`button-${te}`,se=Number(ne),pe=!isNaN(se)&&se<40?"button-2":"button-1",G=h??C,K=A||!!S.disabled,O=K?D?"disabled-covered":$?"disabled-invisibled":V?"disabled-filled":"disabled":y,I=O?`button--variant-${O}`:"",re=b?`button--align-${b}`:"",he=v?"button--nowrap":"",ae=_?"button--ellipsis":"",_e=q?`button--shape-${q}`:"",De=typeof ee=="string"&&ee.startsWith("--")?`var(${ee})`:ee,Se={...F?{width:typeof F=="number"?`${F}px`:F}:{},...U?{minWidth:typeof U=="number"?`${U}px`:U}:{},...k?{}:{"--button-border":K?"0":"1px solid transparent"},...De?{"--button-icon-color":De}:{},...P?{"--color-main":P}:{}},Ne=j===!1?"":G,He=Array.isArray(Ne)?Ne.length>0:!!Ne,ve=!!p,xe=r??(He||c||ve?"bar":"dot"),we=`${ue}--${xe}`,Ae=o.useRef(null);o.useEffect(()=>{!Yn||s!==void 0||Ae.current?.closest("form")&&jt(`button-in-form:${typeof G=="string"?G:""}`,'[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 G=="string"&&G?` \uB2E8\uCD94: ${G}`:""))},[s,G]);const Ie=o.useRef(n);Ie.current=n;const ot=o.useCallback(Ke=>{Ae.current=Ke;const Ct=Ie.current;typeof Ct=="function"?Ct(Ke):Ct&&(Ct.current=Ke)},[]),pt=o.useRef(K),[Oe,Ue]=o.useState(!!g),[at,ce]=o.useState(!1),[Pe,Ye]=o.useState(null),Qe=o.useCallback(()=>ce(!1),[]),[ut,vt]=o.useState(!1),ct=o.useId();o.useEffect(()=>{typeof g=="boolean"&&Ue(g)},[g]),o.useEffect(()=>{if(pt.current&&!K&&Ae.current){const Ke=Ae.current;let Ct=!1;try{Ct=Ke.matches(":focus:not(:focus-visible)")}catch{Ct=!1}Ct&&Ke.blur(),Ke.style.pointerEvents="none";const Bt=requestAnimationFrame(()=>{requestAnimationFrame(()=>{Ae.current&&(Ae.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(Bt)}pt.current=K},[K]);const Gt=typeof g=="boolean"?!!g:Oe,xt=typeof N=="boolean"?void 0:w||typeof g=="boolean"?Gt?"true":"false":S["aria-pressed"],lt=ke("button",ue,we,I,re,he,ae,_e,Gt?"is-selected":null,E?null:"button--no-bg",L?"button--tooltip-only":null,R),st=`button__icon button__icon--${J}`,Ot=Array.isArray(f)?f:f!==void 0?[f]:[],Mt=()=>{if(Array.isArray(Ne))return Ne.map((Ct,Bt)=>{const X=Ot[Bt];return t.jsxs("span",{className:`button__label-text${X!==void 0?" button__label-text--has-sub":""}`,children:[Ct,X!==void 0&&t.jsx("span",{className:"button__sub-label-text caption-1",children:X})]},Bt)});const Ke=f!==void 0;return t.jsxs("span",{className:`button__label-text${Ke?" button__label-text--has-sub":""}`,children:[Ne,d!=null&&t.jsx("span",{className:"button__count",children:d}),Ke&&t.jsx("span",{className:"button__sub-label-text caption-1",children:f})]})},Nt=Ke=>{typeof g!="boolean"&&!w&&Ue(!1),Ke.currentTarget.blur()},Ft=Ke=>{K||(typeof S.onMouseLeave=="function"&&S.onMouseLeave(Ke),Nt(Ke))},zt=Ke=>{if(L&&Et&&It.touchPress(Ke.currentTarget),K){Et&&It.touchPress(Ke.currentTarget),Ke.preventDefault(),z?.(Ke);return}typeof g!="boolean"&&w&&Ue(Ct=>!Ct),T?.(Ke)},_t=o.useCallback(()=>{(W||Q)&&(ce(!0),Ye(Ae.current?.getBoundingClientRect()??null))},[W,Q]),gt=o.useCallback(()=>{(W||Q)&&(ce(!1),Ye(null))},[W,Q]),Et=!!(W||Q),It=Dr(at,Ke=>{Ke?_t():gt()},Ae,{enabled:Et&&(K||L),fallbackOnParent:Et&&K}),et={...S};delete et.disabled,delete et.className,delete et.faded,delete et.useFaded,delete et.loading,delete et.onMouseLeave,delete et.onPointerEnter,delete et.onPointerLeave,delete et.onPointerUp,delete et.onFocus,delete et.onBlur,K&&(Object.keys(et).forEach(Ke=>{/^on[A-Z]/.test(Ke)&&typeof et[Ke]=="function"&&delete et[Ke]}),et["aria-disabled"]="true"),B&&(et["aria-busy"]="true");const wt=(typeof W=="string"?W:null)??(typeof ie=="string"?ie:null)??(typeof x=="string"?x:null)??(typeof G=="string"?G:null)??void 0,tt=typeof x=="string"?x:typeof G=="string"?G:wt,fe=Q?[Q.title,...Q.items??[]].filter(Boolean).join(". "):W&&wt&&wt!==tt?wt:"",$e=[typeof S["aria-describedby"]=="string"?S["aria-describedby"]:void 0,fe?ct:null].filter(Boolean).join(" ")||void 0,Re=()=>t.jsx("span",{className:`${st} button__spinner`,"aria-hidden":"true",children:t.jsx(ka,{variant:"spinner",size:"100%"})}),ze=(Ke,Ct)=>t.jsx(dt,{icon:Ke,label:Ct??tt,className:st,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),it=Ke=>B?Re():ze(c,Ke),on=()=>xe==="dot"?t.jsxs(t.Fragment,{children:[it(),He&&t.jsx("span",{className:`button__label ${pe}`,children:Mt()})]}):b==="center"&&(c||B)?t.jsxs(t.Fragment,{children:[t.jsxs("span",{className:"button__center-group",children:[t.jsx("span",{className:"button__left",children:it()}),He&&t.jsx("span",{className:`button__label ${pe}`,children:Mt()})]}),ve&&t.jsx("span",{className:"button__right",children:ze(p)})]}):t.jsxs(t.Fragment,{children:[(c||B)&&t.jsx("span",{className:"button__left",children:it(x??G)}),He&&t.jsx("span",{className:`button__label ${pe}`,children:Mt()}),ve&&t.jsx("span",{className:"button__right",children:ze(p)})]}),ht=!!l&&!K;return t.jsxs(t.Fragment,{children:[t.jsxs(ht?"a":"button",{...et,ref:ot,...ht?{href:l,target:i,rel:u??(i==="_blank"?"noreferrer":void 0)}:{type:s??"button",disabled:K&&!z&&!ut},className:lt,"aria-pressed":xt,"aria-expanded":typeof N=="boolean"?N:S["aria-expanded"],"aria-controls":m??S["aria-controls"],"aria-label":tt,"aria-disabled":K&&(ht||z||ut)?!0:void 0,"aria-describedby":$e,style:Se,onClick:zt,onMouseLeave:Ft,onPointerEnter:Ke=>{ea(Ke)||_t(),!K&&typeof S.onPointerEnter=="function"&&S.onPointerEnter(Ke)},onPointerLeave:Ke=>{ea(Ke)||gt(),!K&&typeof S.onPointerLeave=="function"&&S.onPointerLeave(Ke)},onPointerUp:Ke=>{K&&Et&&It.touchPress(Ke.currentTarget),!K&&typeof S.onPointerUp=="function"&&S.onPointerUp(Ke)},onFocus:Ke=>{vt(!0),ia()||_t(),!K&&typeof S.onFocus=="function"&&S.onFocus(Ke)},onBlur:Ke=>{vt(!1),K||Nt(Ke),gt(),!K&&typeof S.onBlur=="function"&&S.onBlur(Ke)},children:[on(),fe?t.jsx("span",{id:ct,hidden:!0,"aria-label":fe}):null]}),at&&Q?t.jsx(Qn,{anchorRect:Pe,title:Q.title,items:Q.items,onClose:Qe}):at&&wt?t.jsx(zn,{anchorRect:Pe,text:wt,onClose:Qe}):null]})}const be=o.forwardRef(Qy);be.displayName="Button";function Wt(e,n,a){const r=o.useRef(null);return o.useLayoutEffect(()=>{const s=r.current?.parentElement??null;return n(s,e),()=>a(s)},[e,n,a]),r}const Qa={title:"--promo-banner-bg-title",description:"--promo-banner-bg-description"},Oo=new WeakMap;function zo(e){if(e)return Oo.get(e)}function sn(e,n){e&&(e.style.setProperty(Qa.title,n.title),e.style.setProperty(Qa.description,n.description),Oo.set(e,n))}function ln(e){e&&(e.style.removeProperty(Qa.title),e.style.removeProperty(Qa.description),Oo.delete(e))}const ji={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"default"};function Di(){const e=Wt(ji,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-main","aria-hidden":"true"})}const Si={title:"var(--color-main)",description:"var(--color-gray)",actionVariant:"main"};function Ti(){const e=Wt(Si,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft","aria-hidden":"true"})}const Mi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function $i(){const e=Wt(Mi,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-sub","aria-hidden":"true"})}const Li={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Ri(){const e=Wt(Li,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-deep","aria-hidden":"true"})}const Pi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function Fi(){const e=Wt(Pi,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-soft-sub","aria-hidden":"true"})}const Ii={title:"var(--color-black)",description:"var(--color-darkGray)",actionVariant:"main"};function Oi(){const e=Wt(Ii,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-warm","aria-hidden":"true"})}const zi={title:"var(--color-white)",description:"var(--color-lightGray)",actionVariant:"main"};function Wi(){const e=Wt(zi,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dark","aria-hidden":"true"})}const Hi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Vi(){const e=Wt(Hi,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-radial","aria-hidden":"true"})}const qi={title:"var(--color-darkMain)",description:"var(--color-gray)",actionVariant:"main"};function Ui(){const e=Wt(qi,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-diagonal","aria-hidden":"true"})}const Gi={title:"var(--color-darkSub)",description:"var(--color-gray)",actionVariant:"main"};function Ki(){const e=Wt(Gi,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-dots","aria-hidden":"true"})}const Yi={title:"var(--color-black)",description:"var(--color-gray)",actionVariant:"main"};function Zi(){const e=Wt(Yi,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-outline","aria-hidden":"true",children:t.jsx("span",{className:"promo-banner-bg-outline__dot"})})}const Xi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"main"};function Ji(){const e=Wt(Xi,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-success","aria-hidden":"true"})}const Qi={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"sub"};function eu(){const e=Wt(Qi,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-naver","aria-hidden":"true"})}const tu={title:"#ffffff",description:"rgba(255, 255, 255, 0.85)",actionVariant:"transparent-white"};function nu(){const e=Wt(tu,sn,ln);return t.jsx("div",{ref:e,className:"promo-banner-bg promo-banner-bg-instagram","aria-hidden":"true"})}const hn=(e,n,a)=>({key:e,get label(){return Jt.t(`promoBannerBg.${e}`,n)},textTone:a}),e2=[hn("main","\uBA54\uC778 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),hn("soft","\uC18C\uD504\uD2B8","dark"),hn("sub","\uC11C\uBE0C \uCEEC\uB7EC","light"),hn("deep","\uB525 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),hn("softSub","\uC18C\uD504\uD2B8 \uC11C\uBE0C","dark"),hn("warm","\uC6DC(\uAC15\uC870)","dark"),hn("dark","\uB2E4\uD06C","light"),hn("radial","\uBC29\uC0AC\uD615 \uADF8\uB77C\uB514\uC5B8\uD2B8","light"),hn("diagonal","\uB300\uAC01\uC120 \uD328\uD134","dark"),hn("dots","\uB3C4\uD2B8 \uD328\uD134","dark"),hn("outline","\uC544\uC6C3\uB77C\uC778","dark"),hn("success","\uC131\uACF5/\uC644\uB8CC","light"),hn("naver","\uB124\uC774\uBC84 \uBE14\uB85C\uADF8 \uC548\uB0B4","light"),hn("instagram","\uC778\uC2A4\uD0C0\uADF8\uB7A8 \uC548\uB0B4","light")],au={main:Di,soft:Ti,sub:$i,deep:Ri,softSub:Fi,warm:Oi,dark:Wi,radial:Vi,diagonal:Ui,dots:Ki,outline:Zi,success:Ji,naver:eu,instagram:nu};function ru({storageKey:e="fontScale",baseFont:n=20,minScale:a=.8,maxScale:r=1.4,step:s=.1,lineHeightRatio:l=1.4}={}){const i=g=>Math.max(a,Math.min(r,Number(g))),u=g=>{try{const w=localStorage.getItem(g),N=w?Number(w):1;return Number.isFinite(N)?i(N):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 f=g=>{p(typeof g=="function"?w=>i(g(w)):i(g))},C=()=>f(g=>+(g+s).toFixed(6)),x=()=>f(g=>+(g-s).toFixed(6)),y=c<r-Number.EPSILON,b=c>a+Number.EPSILON,v=Math.round(n*c),_=Math.round(v*l);return{scale:c,setScale:f,increase:C,decrease:x,canIncrease:y,canDecrease:b,fontSize:v,lineHeight:_}}function ou(e,n){const a=Ja(n);o.useEffect(()=>{const r=()=>a.current();try{window.addEventListener(e,r)}catch{}return()=>{try{window.removeEventListener(e,r)}catch{}}},[e,a])}const Wo=" \xB7 ",su=(()=>{if(typeof document>"u")return"";const e=document.title;return e.includes(Wo)?e.split(Wo).pop()??e:e})(),t2=o.createContext(!1),ua=[];let lu=null;function n2(e){const n=o.useContext(t2);o.useEffect(()=>{if(n||typeof e!="string"||!e)return;ua.length===0&&(lu=document.title);const a={text:su?`${e}${Wo}${su}`:e};return ua.push(a),document.title=a.text,()=>{const r=ua.lastIndexOf(a);r>=0&&ua.splice(r,1),document.title=ua.length?ua[ua.length-1].text:lu??document.title}},[e,n])}const Ho=[{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"}],a2=(()=>{let e=null;return()=>(e||(e=new Intl.Collator("ko")),e)})();function vn(e,n){return a2().compare(e,n)}const Sr=new Map;function r2(e){const n=Sr.get(e);if(n)return n;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)),Sr.size>5e3&&Sr.clear(),Sr.set(e,a),a}function o2(e){if(!/^[\d\s-]+$/.test(e))return null;const n=e.replace(/\D/g,"");return n.length<9||n.length>11?null:n[0]==="0"||n[0]==="1"&&e!==n?n:null}function s2(e,n){const a=p=>p==null||typeof p=="number"&&Number.isNaN(p)?"":String(p).trim(),r=a(e),s=a(n);if(r===s)return 0;const l=(p,h)=>{if(typeof p=="number"&&!Number.isNaN(p))return[p];const d=o2(h);return d!==null?[d]:r2(h)},i=l(e,r),u=l(n,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 f=vn(h,d);if(f!==0)return f}return i.length!==u.length?i.length-u.length:vn(r,s)}const iu=e=>e==null||typeof e=="number"&&Number.isNaN(e)||typeof e=="string"&&e.trim()==="";function Tr(e,n,a){const r=iu(e),s=iu(n);if(r||s)return r===s?0:r?1:-1;const l=s2(e,n);return a?l:-l}function l2(e,n,a){const{t:r}=Ee.useTranslation(),[s,l]=o.useState(()=>{const x=a?.initialPageSize;return x&&Ho.some(y=>y.value===x)?x:"25"}),[i,u]=o.useState(1),[c,p]=o.useState(n);Object.is(c,n)||(p(n),i!==1&&u(1));const h=o.useMemo(()=>Ho.map(x=>({...x,label:r("visits.showN",{n:x.value})})),[r]),d=o.useCallback(x=>{Ho.some(y=>y.value===x)&&(l(x),u(1))},[]),f=Math.max(1,Math.ceil(e.length/Number(s))),C=Math.min(Math.max(1,Number.isFinite(i)?Math.floor(i):1),f);return i!==C&&u(C),{pageRows:o.useMemo(()=>e.slice((C-1)*Number(s),C*Number(s)),[e,C,s]),pageSizeProps:{options:h,value:s,onChange:d},paginationProps:{page:C,total:f,onChange:u},setPage:u}}function i2(e){const[n,a]=o.useState(()=>e?.defaultKey!=null?{key:e.defaultKey,asc:e.defaultAsc??!0}:null),r=o.useRef(n),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:n?.key===p?n.asc?"asc":"desc":null,onClick:()=>l(p)}),[n,l]),u=o.useCallback((c,p)=>{if(!n)return c;const{key:h,asc:d}=n;return[...c].sort((f,C)=>Tr(p(f,h),p(C,h),d))},[n]);return{sort:n,field:i,sortRows:u}}const jn="\uC804\uCCB4",u2={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"})},c2={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"})},d2={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 p2(e,n){if("place"in n)return u2[n.place](e);const a=c2[n.vowel](e);return n.glide?`${a} \xB7 ${d2[n.glide](e)}`:a}const h2=(e,{defaultValue:n})=>n,uu=(e,n)=>({jamos:e,phonetic:n,tooltip:p2(h2,n)}),Wn=(e,n)=>n.map(a=>uu([a],{place:e})),Qt=(e,n,a)=>uu([...e],a?{vowel:n,glide:a}:{vowel:n}),Vo={cho:[Wn("labial",["\u3142","\u3143","\u314D","\u3141"]),Wn("alveolar",["\u3137","\u3138","\u314C","\u3134","\u3139"]),Wn("alveolar",["\u3145","\u3146"]),Wn("palatal",["\u3148","\u3149","\u314A"]),Wn("velar",["\u3131","\u3132","\u314B"]),Wn("glottal",["\u314E"])],jung:[[Qt("\u3163","frontHigh"),Qt("\u315F","frontHigh","w"),Qt("\u3162","frontHigh","velar")],[Qt("\u3161","backHighUnrounded")],[Qt("\u315C","backHighRounded"),Qt("\u3160","backHighRounded","j")],[Qt("\u3154\u3150","frontMid"),Qt("\u3156\u3152","frontMid","j"),Qt("\u3159\u315A\u315E","frontMid","w")],[Qt("\u3153","backMidUnrounded"),Qt("\u3155","backMidUnrounded","j"),Qt("\u315D","backMidUnrounded","w")],[Qt("\u3157","backMidRounded"),Qt("\u315B","backMidRounded","j")],[Qt("\u314F","low"),Qt("\u3151","low","j"),Qt("\u3158","low","w")]],jong:[Wn("labial",["\u3142","\u3141"]),Wn("alveolar",["\u3137","\u3134","\u3139"]),Wn("velar",["\u3131","\u3147"])]},m2=e=>e===f2?[]:Array.from(e),f2="__NO_CODA__",qo=e=>e.map(n=>n.map(({jamos:a,phonetic:r,tooltip:s})=>({v:a.join(""),phonetic:r,tooltip:s}))),cu={cho:qo(Vo.cho),jung:qo(Vo.jung),jong:qo(Vo.jong)};cu.jung.flat().forEach(({v:e})=>{for(const n of m2(e));}),new Set(cu.cho.flat().map(e=>e.v)),Object.fromEntries(Object.entries(RC).map(([e,{nucleus:n}])=>[e,n]));function C2(e,n=!0){const a=Ja(e);o.useEffect(()=>{if(n)return la(()=>{a.current?.()})},[n,a])}function Mr(){const[e,n]=o.useState(null),a=o.useCallback(l=>n(l.getBoundingClientRect()),[]),r=o.useCallback(()=>n(null),[]),s=o.useCallback(l=>{const i=l.getBoundingClientRect();n(u=>u?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:a,close:r,toggleAt:s}}function g2(e){const[n,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:n,anchorRect:r,openAfterDelay:i,close:u}}function du(e="warning"){const[n,a]=o.useState(""),[r,s]=o.useState(e),[l,i]=o.useState(0),u=o.useCallback((d,f)=>{s(f),a(d),i(C=>C+1)},[]),c=o.useCallback(d=>u(d,"warning"),[u]),p=o.useCallback(d=>u(d,"normal"),[u]),h=o.useCallback(()=>a(""),[]);return{toastMessage:n,toastType:r,toastKey:l,showToast:u,showWarning:c,showNormal:p,clearToast:h}}function er(e){let n=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>n&&(n=r)}return n>0?`max(var(--z-menu, 1500), ${n+1})`:"var(--z-menu, 1500)"}function tr({computeStyle:e,onScroll:n="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 C=p.current?.offsetHeight??0;C>0&&h();let x=0,y=null;typeof ResizeObserver<"u"&&p.current&&(y=new ResizeObserver(()=>{const A=p.current?.offsetHeight??0;if(A!==C){if(C=A,++x>4){y?.disconnect(),y=null;return}h()}}),y.observe(p.current));const b=A=>{const B=A.target;r&&B.closest?.(r)||c.current?.contains(B)||p.current?.contains(B)||l(!1)};document.addEventListener("mousedown",b),document.addEventListener("pointerdown",b);let v=null;const _=()=>{if(typeof requestAnimationFrame>"u"){h();return}v===null&&(v=requestAnimationFrame(()=>{v=null,h()}))},g=A=>{p.current?.contains(A.target)||(n==="reposition"?_():n==="close"&&l(!1))};n!=="ignore"&&window.addEventListener("scroll",g,!0);const w=()=>{a==="reposition"?_():a==="close"&&l(!1)};let N=null;const m=()=>{w(),N&&clearTimeout(N),N=setTimeout(()=>{N=null,a==="reposition"&&h()},250)};return a!=="ignore"&&(window.addEventListener("resize",w),window.addEventListener("orientationchange",m)),()=>{v!==null&&cancelAnimationFrame(v),y?.disconnect(),document.removeEventListener("mousedown",b),document.removeEventListener("pointerdown",b),n!=="ignore"&&window.removeEventListener("scroll",g,!0),a!=="ignore"&&(window.removeEventListener("resize",w),window.removeEventListener("orientationchange",m)),N&&clearTimeout(N)}},[s,h,n,a,r]),o.useEffect(()=>{if(s)return la(()=>l(!1))},[s]);const d=o.useCallback(()=>l(C=>!C),[]),f=o.useCallback(()=>l(!1),[]);return{open:s,setOpen:l,toggle:d,close:f,style:i,triggerRef:c,menuRef:p}}function b2(e,{mode:n="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,f]=o.useState("idle"),[C,x]=o.useState(null),[y,b]=o.useState([]),[v,_]=o.useState(null),[g,w]=o.useState(0),N=o.useRef(0),m=o.useCallback(L=>{N.current=typeof L=="function"?L(N.current):L,w(N.current)},[]),A=o.useRef(r),B=o.useRef(s);o.useEffect(()=>{A.current=r,B.current=s},[r,s]);const j=o.useRef([]),k=()=>{j.current.forEach(clearTimeout),j.current=[]},E=(L,J)=>{j.current.push(setTimeout(J,L))};o.useEffect(()=>()=>k(),[]);const D=u[p]?.id??null,$=o.useRef(null),V=o.useCallback(()=>{k(),f("playing"),b([]),_(null),m(0);let L=0;e.forEach((J,ee)=>{E(L,()=>{h(ee),x(J.id),A.current?.(J)}),E(L+1e3,()=>{x(null),b(q=>[...q,J.id])}),L+=1300}),E(L,()=>{f("done"),B.current?.({score:0,total:e.length})})},[e,m]),F=o.useCallback((L,J)=>{if(J>=L.length){f("done"),B.current?.({score:N.current,total:L.length});return}$.current=null,h(J),_(null),f("playing"),x(L[J].id),A.current?.(L[J]),E(l,()=>{x(null),f("waiting")})},[l]),U=o.useCallback(()=>{k();const L=Ya(e);c(L),m(0),b([]),F(L,0)},[e,F,m]),T=o.useCallback(()=>{n==="playback"?(c(e),V()):U()},[n,e,V,U]),z=o.useCallback(()=>{k(),f("idle"),x(null),b([]),_(null),h(0),m(0),c([])},[m]),W=JSON.stringify(e.map(L=>[L.id,L.label,L.angleDeg,L.deg,L.row,L.shortcut]));o.useEffect(()=>(a?T():z(),()=>k()),[n,W,a]);const ie=o.useCallback(L=>{d!=="waiting"||n==="playback"||$.current===p||($.current=p,_(L),L===u[p]?.id&&m(J=>J+1),n==="exam"?(f("playing"),E(400,()=>F(u,p+1))):(f("feedback"),E(i,()=>F(u,p+1))))},[d,n,u,p,F,i,m]),Q=n==="playback"?e.length:u.length;return{bind:{activeSpeakerId:C,playedIds:y,selectedId:v,answerId:D,showFeedback:d==="feedback",clickable:d==="waiting",onSelectSpeaker:ie},index:p,total:Q,score:g,phase:d,done:d==="done",start:T,reset:z}}const Uo=new Map,Go=new Map,y2=()=>()=>{},v2=()=>!0,x2=()=>!1;function pu(e){const n=/^data:image\/svg\+xml(;base64)?,([\s\S]*)$/.exec(e);if(!n)return null;try{if(!n[1])return decodeURIComponent(n[2]);const a=Uint8Array.from(atob(n[2]),r=>r.charCodeAt(0));return new TextDecoder("utf-8").decode(a)}catch{return null}}function _2(e){if(typeof window>"u")return"";const n=(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)};xa.addHook("uponSanitizeAttribute",n);try{return xa.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","style","foreignObject"]})}finally{xa.removeHook("uponSanitizeAttribute",n)}}function w2(e,n){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=`${n}-${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 B2(e){const n=Go.get(e);if(n)return n;const a=fetch(e).then(r=>r.ok?r.text():null).then(r=>(r!=null&&Uo.set(e,r),r)).catch(()=>null).finally(()=>{Go.delete(e)});return Go.set(e,a),a}function k2(e,n=!0){const a=o.useSyncExternalStore(y2,v2,x2)&&n&&e?pu(e)??Uo.get(e)??null:null,[r,s]=o.useState({src:e,enabled:n,svg:a});return o.useEffect(()=>{if(!n||!e){s({src:e,enabled:n,svg:null});return}const l=pu(e)??Uo.get(e)??null;if(l!==null){s({src:e,enabled:n,svg:l});return}let i=!0;return B2(e).then(u=>{i&&s({src:e,enabled:n,svg:u})}),()=>{i=!1}},[e,n]),r.src===e&&r.enabled===n?r.svg:a}function A2({title:e,description:n,actionLabel:a,onAction:r,bg:s,color:l,size:i="medium",actionVariant:u,titleColor:c,descriptionColor:p,className:h=""}){const d=s??l??"main",f=o.useRef(null),[C,x]=o.useState("main"),y=wn("(max-width: 767px)"),b=o.useRef({title:!1,description:!1});o.useLayoutEffect(()=>{const g=f.current;if(!g)return;const w=zo(g),N=(m,A,B)=>{if(B!==void 0)g.style.setProperty(A,B),b.current[m]=!0;else if(b.current[m]){const j=w?.[m];j?g.style.setProperty(A,j):g.style.removeProperty(A),b.current[m]=!1}};N("title","--promo-banner-bg-title",c),N("description","--promo-banner-bg-description",p)},[c,p,d]),o.useLayoutEffect(()=>{const g=f.current;if(!g)return;const w=zo(g);x(w?.actionVariant??"main")},[d]);const v=ke("promo-banner",`promo-banner--${i}`,h),_=au[d];return t.jsxs("div",{ref:f,className:v,role:"note",children:[t.jsx(_,{}),t.jsxs("div",{className:"promo-banner__text",children:[t.jsx("span",{className:`promo-banner__title ${i==="small"?"body-2":"h2"}`,children:e}),n&&t.jsx("span",{className:"promo-banner__description body-3",children:n})]}),a&&r&&t.jsx(be,{htmlType:"button",size:40,variant:u??C,shape:"pill",useBorder:!0,onClick:r,ariaLabel:a,...y?{type:"dot",icon:"arrow-right"}:{rightIcon:"arrow-right",label:a,minWidth:140}})]})}function N2({children:e,interval:n=5e3,dotTone:a,className:r="","aria-label":s}){const{t:l}=Ee.useTranslation(),i=s??l("topBanner.ariaLabel","\uBC30\uB108"),u=o.Children.toArray(e),c=u.length,[p,h]=o.useState(0),[d,f]=o.useState(!1),[C,x]=o.useState(!1),[y,b]=o.useState(!1),v=o.useRef(null),_=o.useRef(null),g=o.useRef(null),w=jr(),N=d||C||y,m=c>0?Math.min(p,c-1):0;o.useEffect(()=>{if(c<2||n<=0||N||w)return;const B=window.setInterval(()=>h(j=>(Math.min(j,c-1)+1)%c),n);return()=>window.clearInterval(B)},[c,n,N,w]);const A=B=>{_.current!=null&&window.clearTimeout(_.current),_.current=window.setTimeout(()=>{_.current=null,b(!1)},B)};return o.useEffect(()=>()=>{_.current!=null&&window.clearTimeout(_.current)},[]),o.useEffect(()=>{if(!y)return;const B=j=>{j.pointerType==="touch"&&(g.current&&g.current.contains(j.target)||(_.current!=null&&(window.clearTimeout(_.current),_.current=null),b(!1)))};return document.addEventListener("pointerdown",B,!0),()=>document.removeEventListener("pointerdown",B,!0)},[y]),c===0?null:t.jsxs("section",{ref:g,className:ke("top-banner",r),"aria-label":i,"aria-roledescription":"carousel",onPointerEnter:B=>{v.current=B.pointerType},onPointerDown:B=>{v.current=B.pointerType,B.pointerType==="touch"&&(_.current!=null&&(window.clearTimeout(_.current),_.current=null),b(!0))},onPointerUp:B=>{B.pointerType==="touch"&&A(5e3)},onPointerCancel:B=>{B.pointerType==="touch"&&A(5e3)},onMouseEnter:()=>{v.current!=="touch"&&f(!0)},onMouseLeave:()=>f(!1),onFocus:B=>{let j=!0;try{j=B.target.matches(":focus-visible")}catch{j=!0}x(j)},onBlur:B=>{B.currentTarget.contains(B.relatedTarget)||x(!1)},children:[t.jsx("div",{className:"top-banner__viewport",children:t.jsx("div",{className:"top-banner__track",style:{transform:`translateX(-${m*100}%)`},children:u.map((B,j)=>t.jsx("div",{className:"top-banner__slide","aria-hidden":j!==m,...j!==m?{inert:!0}:{},children:B},j))})}),c>1&&t.jsx("div",{className:`top-banner__dots${(a?.[m]??"light")==="dark"?" top-banner__dots--dark":""}`,children:u.map((B,j)=>t.jsx("button",{type:"button",className:`top-banner__dot${j===m?" top-banner__dot--active":""}`,"aria-label":l("topBanner.dotAriaLabel",{count:c,index:j+1,defaultValue:`${c}\uAC1C \uC911 ${j+1}\uBC88\uC9F8 \uBC30\uB108`}),"aria-current":j===m,onClick:()=>h(j)},j))})]})}function E2({title:e,body:n,open:a=!1,onToggle:r,avatar:s,titleClassName:l="body-2",bodyClassName:i="body-2",className:u=""}){const{t:c}=Ee.useTranslation();return t.jsxs("div",{className:`accordion-item ${a?"accordion-item--open":""} ${u}`.trim(),role:"listitem",children:[t.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]")),f=d.indexOf(p.currentTarget);(p.key==="ArrowDown"?d[f+1]:d[f-1])?.focus()}},children:[s&&t.jsx("div",{className:"accordion-item__avatar",children:s}),t.jsx("div",{className:`accordion-item__title ${l}`,children:e}),t.jsx("div",{className:"accordion-item__chevron",children:t.jsx(dt,{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&&t.jsx("div",{className:`accordion-item__body ${i}`,children:typeof n=="string"?t.jsx("p",{children:n}):n})]})}function j2({items:e=[],defaultOpenIndex:n=0,size:a=72,className:r="",bodyClassName:s}){const[l,i]=o.useState({index:n}),u=(c,p)=>l.id!=null&&c.id!=null?c.id===l.id:l.id==null&&p===l.index;return t.jsx("div",{className:`accordion-group accordion-group--s${a} ${r}`.trim(),role:"list",children:e.map((c,p)=>t.jsx(E2,{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 D2(){return t.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:t.jsx("polyline",{points:"2,6 5,9 10,3"})})}function S2(){return t.jsxs("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:[t.jsx("line",{x1:"3",y1:"3",x2:"9",y2:"9"}),t.jsx("line",{x1:"9",y1:"3",x2:"3",y2:"9"})]})}function T2(){return t.jsx("svg",{viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2.2,strokeLinecap:"round","aria-hidden":"true",children:t.jsx("line",{x1:"2.5",y1:"6",x2:"9.5",y2:"6"})})}function Ln({children:e,icon:n,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}=Ee.useTranslation(),d=n??"check",f=a!==void 0,C=e!==void 0||f?"number":d,x=e!==void 0?void 0:f?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],y=c?void 0:u??x;return t.jsxs("span",{className:ke("circle-badge",`circle-badge--${C}`,`circle-badge--${s}`,`circle-badge--${r}`,l?"circle-badge--animate":"",i?"circle-badge--clickable":"",p),onClick:i,onKeyDown:i?b=>{b.key!=="Enter"&&b.key!==" "||(b.preventDefault(),b.currentTarget.click())}:void 0,"aria-label":y,"aria-hidden":c||void 0,role:i?"button":y?"img":void 0,tabIndex:i?0:void 0,children:[e??(f?a:null),e===void 0&&!f&&d==="check"&&t.jsx(D2,{}),e===void 0&&!f&&d==="remove"&&t.jsx(S2,{}),e===void 0&&!f&&d==="minus"&&t.jsx(T2,{})]})}function Na({columns:e=[],onClose:n,className:a="",size:r="medium"}){const{t:s}=Ee.useTranslation(),l=r==="small"?40:48,[i,u]=o.useState([]),c=o.useMemo(()=>{const b=[{title:null,columns:e}];let v=e;for(const _ of i){const g=v?.[_.ci]?.items?.[_.ii];if(!g||!Array.isArray(g.children)||!g.children.length)break;v=[{title:null,items:g.children}],b.push({title:g.label||null,columns:v})}return b},[e,i]),p=c[c.length-1],h=c.length-1,d=o.useCallback(()=>u(b=>b.slice(0,Math.max(0,Math.min(b.length,h)-1))),[h]),f=o.useRef(null),C=o.useRef(null),x=c.length;o.useEffect(()=>{C.current||(C.current=document.activeElement);let b=0,v=0;const _=()=>{const g=f.current?.querySelector("button:not([disabled])");if(g&&g.offsetParent){g.focus({preventScroll:!0});return}v++<20&&(b=requestAnimationFrame(_))};return b=requestAnimationFrame(_),()=>cancelAnimationFrame(b)},[x]),o.useEffect(()=>()=>{C.current?.focus?.({preventScroll:!0})},[]);const y=o.useCallback((b,v,_)=>{if(b){if(Array.isArray(b.children)&&b.children.length){u(g=>[...g.slice(0,h),{ci:v,ii:_}]);return}try{typeof b.onClick=="function"&&b.onClick()}catch{}try{b&&b.closeOnSelect&&typeof n=="function"&&n()}catch{}}},[n,h]);return t.jsxs("div",{className:le(`menu-tooltip menu-tooltip--${r} ${a}`),children:[(c.length>1||p.title)&&t.jsxs("div",{className:le("menu-tooltip__header"),children:[c.length>1?t.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,t.jsx("div",{className:le("menu-tooltip__title button-1"),children:p.title})]}),t.jsx("div",{className:le("menu-tooltip__columns"),ref:f,children:p.columns&&p.columns.map((b,v)=>{const _=(b.items||[]).some(g=>!!g.icon||g.selected!==void 0);return t.jsxs("div",{className:le("menu-tooltip__column"),children:[b.title?t.jsx("div",{className:le("menu-tooltip__column-title body-3"),children:b.title}):null,t.jsx("div",{className:le("menu-tooltip__items"),children:(b.items||[]).map((g,w)=>t.jsxs(o.Fragment,{children:[g.separatorBefore&&w>0&&t.jsx("div",{className:le("menu-tooltip__separator"),role:"separator"}),t.jsx(be,{htmlType:"button",className:le("menu-tooltip__item"),size:l,type:g.label?"bar":"dot",icon:g.selected?"check":g.icon||(_||!g.label?"none":void 0),rightIcon:Array.isArray(g.children)&&g.children.length?"chevron-right":g.badgeCount?t.jsx(Ln,{position:"inline",number:Math.min(g.badgeCount,99),size:24,"aria-hidden":!0}):void 0,label:g.label,ariaLabel:g.label&&g.badgeCount&&g.badgeCount>0?s("nav.badgeLabel",{label:g.label,count:g.badgeCount,defaultValue:"{{label}}, {{count}}\uAC1C"}):g.label,onClick:()=>y(g,v,w),selected:g.selected,disabled:g.disabled,showTooltipInfo:g.tooltip||!1,useBorder:!1,align:"left"})]},w))})]},v)})})]})}const hu=".content-area";function Ko(e,n="Nav"){try{const a=typeof e=="string"?document.querySelector(e):e?.current??document.querySelector(hu);if(a){a.scrollTop=0;return}const r=document.scrollingElement??document.documentElement;r&&r.scrollHeight<=r.clientHeight&&jt("nav-scroll-container",`[${n}] \uBCF8\uBB38\uC744 \uB9E8 \uC704\uB85C \uB418\uB3CC\uB9B4 \uD1B5\uC744 \uBABB \uCC3E\uC558\uB2E4(\uAE30\uBCF8 ${hu}) \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 Yo=52,$r=10,mu=e=>e&&e>0?e:0;function fu({items:e=[],activeKey:n,onChange:a,appMode:r,onAppModeChange:s,moreItems:l=[],scrollContainer:i}){const{t:u}=Ee.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),[f,C]=o.useState(0),x=e.length;o.useEffect(()=>{const L=d.current;if(!L)return;const J=()=>{const P=typeof getComputedStyle=="function"?getComputedStyle(L):null,R=L.clientWidth-(parseFloat(P?.paddingLeft??"")||0)-(parseFloat(P?.paddingRight??"")||0),S=L.querySelector(".bottom-nav__left"),H=S?.nextElementSibling,ne=(S?.offsetWidth??0)+(S&&H?.classList.contains("bottom-nav__divider")?H.offsetWidth:0);C(Math.max(0,R-ne))};if(J(),typeof ResizeObserver>"u")return;const ee=new ResizeObserver(J);ee.observe(L);const q=L.querySelector(".bottom-nav__left");return q&&ee.observe(q),()=>ee.disconnect()},[s]);const y=Yo+1,b=L=>Math.max(0,Math.floor((L+$r)/(Yo+$r))),v=x*(Yo+$r)-$r<=f,_=f<=0||l.length===0&&v?x:Math.min(x,b(f-y)),g=f>0&&_<x,w=g?_:x,N=e.slice(0,w),m=e.slice(w),A=g||l.length>0,B=o.useCallback((L,J)=>({position:"fixed",bottom:window.innerHeight-L.top+8,right:window.innerWidth-L.right,zIndex:er(J)}),[]),j=o.useId(),{open:k,toggle:E,close:D,style:$,triggerRef:V,menuRef:F}=tr({computeStyle:B,onScroll:"ignore",onResize:"reposition"}),U=o.useCallback((L,J)=>J>0?u("nav.badgeLabel",{label:L,count:J,defaultValue:"{{label}}, {{count}}\uAC1C"}):L,[u]),T=o.useCallback((L,J)=>J>0?u("nav.badgeInsideLabel",{label:L,count:J,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):L,[u]),z=o.useCallback(()=>s?.(c),[s,c]),W=o.useMemo(()=>m.find(L=>!!L.key&&L.key===n)??l.find(L=>L.selected||L.key&&L.key===n),[m,n,l]),ie=o.useMemo(()=>[{items:[...m.map(L=>({label:L.label,icon:L.icon,badgeCount:L.badgeCount,selected:!!L.key&&L.key===n,closeOnSelect:!0,disabled:L.state==="disabled",onClick:()=>{L.state!=="disabled"&&(L.key&&a&&(a(L.key),Ko(i,"BottomNav")),D())}})),...l.map(L=>({label:L.label,icon:L.icon,badgeCount:L.badgeCount,selected:L.selected??(!!L.key&&L.key===n),closeOnSelect:!0,onClick:()=>{L.onClick?.(),D()}}))]}],[m,l,n,a,D]),Q=[...m,...l].reduce((L,J)=>L+mu(J.badgeCount),0);return t.jsxs("nav",{className:"bottom-nav",ref:d,"aria-label":u("nav.bottomNav","\uD558\uB2E8 \uB124\uBE44\uAC8C\uC774\uC158"),children:[s&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"bottom-nav__left",children:t.jsx(be,{htmlType:"button",size:52,type:"dot",icon:p,ariaLabel:h,className:"bottom-nav-item",onClick:z})}),t.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"})]}),t.jsx("div",{className:"bottom-nav__items",children:N.map((L,J)=>{const ee=mu(L.badgeCount);return t.jsxs("span",{className:"bottom-nav__slot",children:[t.jsx(be,{htmlType:"button",size:52,type:"dot",icon:L.icon,ariaLabel:U(L.label,ee),selected:!!L.key&&L.key===n,disabled:L.state==="disabled",className:"bottom-nav-item",onClick:()=>{L.key&&(a?.(L.key),Ko(i,"BottomNav"))}}),ee>0&&t.jsx("span",{"aria-hidden":"true",children:t.jsx(Ln,{position:"top-right",number:Math.min(ee,99),size:24})})]},L.key??`__slot-${J}`)})}),A&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"bottom-nav__divider","aria-hidden":"true"}),t.jsx("div",{className:"bottom-nav__right",children:t.jsxs("div",{ref:V,className:"bottom-nav__slot",children:[t.jsx(be,{htmlType:"button",size:52,type:"dot",icon:W?.icon??"ellipsis",ariaLabel:T(W?.label??u("nav.more","\uB354\uBCF4\uAE30"),Q),selected:!!W,className:"bottom-nav-item",onClick:E,"aria-expanded":k,"aria-controls":k?j:void 0}),Q>0&&t.jsx("span",{"aria-hidden":"true",children:t.jsx(Ln,{position:"top-right",number:Math.min(Q,99),size:24})}),k&&gn.createPortal(t.jsx("div",{id:j,role:"group","aria-label":u("nav.moreMenu","\uB354\uBCF4\uAE30 \uBA54\uB274"),className:le("tooltip__content"),style:$,ref:F,children:t.jsx(Na,{columns:ie,onClose:D})}),document.body)]})})]})]})}function Cu(e){if(typeof e!="string")return!1;let n="";for(const r of e){const s=r.charCodeAt(0);s<=32||s>=127&&s<=159||(n+=r)}if(!n)return!1;const a=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(n);return a?["http","https","mailto","tel"].includes(a[1].toLowerCase()):!0}function gu(e,n,a){return a&&a>0?e("nav.badgeLabel",{label:n,count:a,defaultValue:"{{label}}, {{count}}\uAC1C"}):n}function M2(e){const{t:n}=Ee.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?t.jsxs("div",{className:"side-nav__footer",children:[s&&t.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"terminal",ariaLabel:n("nav.debug","\uB514\uBC84\uADF8"),onClick:s,selected:a==="debug"}),u&&t.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"message-circle-question-mark",ariaLabel:n("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:u,selected:a==="help"}),l&&t.jsxs("span",{className:"side-nav__notification-wrap",children:[t.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bell",ariaLabel:gu(n,n("nav.notifications","\uC54C\uB9BC"),r),onClick:l,selected:a==="notifications"}),!!r&&r>0&&t.jsx(Ln,{position:"top-right",number:Math.min(r,99),size:24,"aria-hidden":!0})]}),i&&t.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"settings",ariaLabel:n("nav.settings","\uC124\uC815"),onClick:i,selected:a==="settings"}),c&&t.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"bug",ariaLabel:n("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:c,selected:a==="feedback"}),p&&t.jsx(be,{htmlType:"button",size:48,showTooltipInfo:!0,type:"dot",shape:"pill",variant:h,icon:"user-round",ariaLabel:n("nav.account","\uACC4\uC815"),onClick:p,selected:a==="account"})]}):null}function bu(e){const{t:n}=Ee.useTranslation(),{item:a,itemKey:r,label:s,icon:l,active:i,onClick:u,style:c,state:p,labelStyle:h}=e||{},d=a?.key??r??"",f=a?.label??s??"",C=a?.icon??l??"",x=a?.badge??0,y=t.jsx("span",{className:"side-nav__icon-wrap",children:t.jsx(dt,{icon:C,label:typeof f=="string"?f:void 0,className:"side-nav__icon",maskClassName:"side-nav__icon-image",imgClassName:void 0,svgClassName:void 0})}),b=p==="disabled",v=`side-nav__item ${i?"active":""} ${p||""} ${b?"disabled":""} ${a?.child?"side-nav__item--child":""}`,_=o.useCallback(g=>{if(b)return;const w=g.detail>0;if(w)try{g.currentTarget.blur()}catch{}u?.(d,g.currentTarget,w)},[b,d,u]);return t.jsxs("button",{type:"button",className:v,onClick:_,"aria-label":typeof f=="string"?gu(n,f,x):void 0,"aria-current":i?"page":void 0,style:c,"aria-disabled":b,children:[y,t.jsx("span",{className:"side-nav__label button-1 f",style:h,children:f}),x>0&&t.jsx(Ln,{position:"inline",number:Math.min(x,99),size:24,"aria-hidden":!0}),p==="loading"&&t.jsx("span",{className:"side-nav__spinner",role:"img","aria-label":n("loader.loading","\uBD88\uB7EC\uC624\uB294 \uC911\u2026")})]})}function yu(e){const{t:n}=Ee.useTranslation(),{items:a=[],activeKey:r,onChange:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:f,onAppModeChange:C,scrollContainer:x}=e||{},y=f==="manager",b=o.useCallback(()=>C?.(y?"malgwi":"manager"),[C,y]),v=o.useRef(null),[_,g]=o.useState(null);o.useEffect(()=>{const B=v.current;if(!B)return;let j=null;const k=()=>{const{scrollHeight:$,clientHeight:V,scrollTop:F}=B;if($<=V+1){g(ie=>ie===null?ie:null);return}const U=Math.max(24,V/$*V),T=V-U,z=$-V,W={top:Math.round(F/z*T),height:Math.round(U)};g(ie=>ie&&ie.top===W.top&&ie.height===W.height?ie:W)},E=()=>{if(typeof requestAnimationFrame>"u"){k();return}j===null&&(j=requestAnimationFrame(()=>{j=null,k()}))};k(),B.addEventListener("scroll",E,{passive:!0});const D=typeof ResizeObserver<"u"?new ResizeObserver(E):null;D?.observe(B);for(const $ of Array.from(B.children))D?.observe($);return()=>{j!==null&&cancelAnimationFrame(j),B.removeEventListener("scroll",E),D?.disconnect()}},[a]);const w=o.useRef(null),N=o.useCallback(B=>{const j=v.current;j&&(B.preventDefault(),w.current={y:B.clientY,top:j.scrollTop},B.currentTarget.setPointerCapture(B.pointerId))},[]),m=o.useCallback(B=>{const j=v.current,k=w.current;!j||!k||(j.scrollTop=k.top+(B.clientY-k.y)*(j.scrollHeight/j.clientHeight))},[]),A=o.useCallback(B=>{w.current=null,B.currentTarget.hasPointerCapture(B.pointerId)&&B.currentTarget.releasePointerCapture(B.pointerId)},[]);return t.jsxs("nav",{"aria-label":n("nav.mainMenu","\uBA54\uC778 \uBA54\uB274"),className:"side-nav__menu",children:[t.jsxs("div",{ref:v,className:"side-nav__menu-list",children:[_&&t.jsx("div",{className:"side-nav__scroll","aria-hidden":"true",children:t.jsx("div",{className:"side-nav__scroll-thumb",style:{top:_.top,height:_.height},onPointerDown:N,onPointerMove:m,onPointerUp:A,onPointerCancel:A})}),(a||[]).filter(B=>!B.section&&(B.key||B.label)).map((B,j)=>t.jsxs(o.Fragment,{children:[B.divider&&t.jsx("div",{className:"side-nav__separator"}),t.jsx(bu,{item:B,active:!!B.key&&B.key===r,state:B.disabled?"disabled":void 0,onClick:(k,E,D)=>{if(B.disabled)return;if(B.href){if(Cu(B.href)&&window.open(B.href,"_blank","noopener,noreferrer"),D)try{E?.blur()}catch{}return}if(s?.(B.key),Ko(x,"SideNav"),!D)return;try{E?.blur()}catch{}if(typeof window<"u"&&window.matchMedia){if(!window.matchMedia("(min-width: 768px) and (max-width: 1023px)").matches)return}else return;const $=document.querySelector(".header");if($){const V=typeof $.matches=="function";if(!(window.matchMedia("(hover: hover)").matches&&V&&$.matches(":hover"))){$.classList.add("header--force-collapsed");const F=()=>{$.classList.remove("header--force-collapsed"),$.removeEventListener("mouseenter",F)};$.addEventListener("mouseenter",F)}}}})]},B.key??`side-nav__item-${j}`)),C&&t.jsx("div",{className:"side-nav__separator side-nav__separator--short"}),C&&t.jsx(bu,{item:{key:"__mode-switch__",label:y?n("nav.goToMalgwi","\uB9D0\uADC0\uB85C \uC774\uB3D9"):n("nav.goToManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800\uB85C \uC774\uB3D9"),icon:y?"arrow-left":"arrow-right"},onClick:b})]}),t.jsx(M2,{activeKey:r,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d})]})}var Lr='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>',Zo='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>',$2='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 vu({src:e,alt:n,className:a,style:r,tone:s,textColor:l}){const i=!s&&!!l,u=k2(e,i),c="bl"+o.useId().replace(/[^a-zA-Z0-9]/g,"");return s?t.jsx("span",{className:ke("brand-logo","brand-logo--tone",a),role:n?"img":void 0,"aria-label":n||void 0,"aria-hidden":n?void 0:!0,style:{...r,"--brand-logo-src":`url("${e}")`,"--brand-logo-tone":s},children:t.jsx("img",{src:e,alt:"","aria-hidden":"true",className:"brand-logo__sizer",draggable:!1})}):i&&u?t.jsx("span",{className:ke("brand-logo","brand-logo--inline",a),role:n?"img":void 0,"aria-label":n||void 0,"aria-hidden":n?void 0:!0,style:{...r,"--brand-logo-text-color":l},dangerouslySetInnerHTML:{__html:w2(_2(u),c)}}):t.jsx("img",{src:e,alt:n,className:ke("brand-logo",a),style:r,draggable:!1})}function xu({appMode:e}){const{t:n}=Ee.useTranslation(),a=e==="manager",r=a?Zo:Lr,s=$2;return t.jsxs("div",{className:"brand-identity__root","aria-label":n("header.biArea","BI \uC601\uC5ED"),children:[t.jsx("img",{src:s,alt:n("header.biSymbol","BI \uC2EC\uBCFC"),className:"brand-identity__image brand-identity__image--symbol"}),a?t.jsx("img",{src:r,alt:n("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"),className:"brand-identity__image brand-identity__image--logo"}):t.jsx(vu,{src:r,alt:n("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0"),textColor:"light-dark(var(--color-pureBlack), var(--color-text-primary))",className:"brand-identity__image brand-identity__image--logo"})]})}function _u({activeKey:e,onChange:n,items:a,malgwiItems:r,managerItems:s,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:f,onAppModeChange:C,scrollContainer:x}){const{t:y}=Ee.useTranslation(),b=wn("(max-width: 767px)"),v=o.useMemo(()=>(a??[]).filter($=>!$.section&&($.key||$.label)).map($=>({key:$.key,label:typeof $.label=="string"?$.label:void 0,icon:$.icon,state:$.disabled?"disabled":void 0,badgeCount:$.badge})),[a]),_=o.useCallback($=>{const V=a?.find(F=>F.key===$);if(!V?.disabled){if(V?.href){Cu(V.href)&&window.open(V.href,"_blank","noopener,noreferrer");return}n?.($)}},[a,n]),g=o.useMemo(()=>{const $=[];return i&&$.push({key:"debug",icon:"terminal",label:y("nav.debug","\uB514\uBC84\uADF8"),onClick:i}),h&&$.push({key:"help",icon:"message-circle-question-mark",label:y("nav.help","\uB3C4\uC6C0\uB9D0"),onClick:h}),u&&$.push({key:"notifications",icon:"bell",label:y("nav.notifications","\uC54C\uB9BC"),badgeCount:l,onClick:u}),p&&$.push({key:"settings",icon:"settings",label:y("nav.settings","\uC124\uC815"),onClick:p}),d&&$.push({key:"feedback",icon:"bug",label:y("nav.feedback","\uBC84\uADF8\uC2E0\uACE0"),onClick:d}),c&&$.push({key:"account",icon:"user-round",label:y("nav.account","\uACC4\uC815"),onClick:c}),$},[y,i,u,p,h,d,c,l]),w=o.useCallback(($,V)=>({position:"fixed",top:$.bottom+8,right:Math.max(8,window.innerWidth-$.right),zIndex:er(V)}),[]),N=o.useId(),{open:m,toggle:A,close:B,style:j,triggerRef:k,menuRef:E}=tr({computeStyle:w,onScroll:"ignore",onResize:"reposition"}),D=o.useMemo(()=>[{items:g.map($=>({label:$.label,icon:$.icon,badgeCount:$.badgeCount,selected:$.selected??(!!$.key&&$.key===e),closeOnSelect:!0,onClick:()=>{$.onClick?.(),B()}}))}],[g,e,B]);return t.jsxs("aside",{className:`header${f==="manager"?" header--manager":""}`,children:[t.jsxs("div",{className:"header__bi",children:[t.jsx(xu,{appMode:f}),t.jsxs("div",{className:"header__menu-button",ref:k,children:[t.jsx(be,{htmlType:"button",size:48,type:"dot",shape:"pill",variant:"default",useBorder:!1,icon:"menu",ariaLabel:u&&l&&l>0?y("nav.badgeInsideLabel",{label:y("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),count:l,defaultValue:"{{label}}, \uC548\uC5D0 \uC54C\uB9BC {{count}}\uAC1C"}):y("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),onClick:A,"aria-expanded":m,"aria-controls":m?N:void 0}),!!u&&!!l&&l>0&&t.jsx(Ln,{number:Math.min(l,99),size:24,"aria-hidden":!0}),m&&gn.createPortal(t.jsx("div",{id:N,role:"group","aria-label":y("header.utilMenu","\uC720\uD2F8\uB9AC\uD2F0 \uBA54\uB274"),className:le("tooltip__content"),style:j,ref:E,children:t.jsx(Na,{columns:D,onClose:B})}),document.body)]})]}),t.jsx(yu,{scrollContainer:x,items:a,activeKey:e??void 0,onChange:n,unreadCount:l,onDebug:i,onNotification:u,onAccount:c,onSetting:p,onHelp:h,onFeedback:d,appMode:f,onAppModeChange:C}),b&&t.jsx(fu,{items:v,activeKey:e??void 0,onChange:_,scrollContainer:x,appMode:f,onAppModeChange:C})]})}const L2=_u;function un(e){const{type:n="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)&&jt("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&&jt("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",useBg:d=!0,minWidth:f,iconLeft:C,iconRight:x,color:y}=e,b=n==="bar",v=typeof a=="number"?"medium":a??"medium",_=(b?{small:"caption-2",medium:"body-3",large:"body-2"}:{small:"caption-2b",medium:"body-3b",large:"body-2b"})[v]??(b?"body-2":"body-2b"),g={small:12,medium:14,large:16}[v]??14,w=ke("badge",b?"badge--bar":"",`badge--${p}`,`badge--${v}`,h!=="filled"?`badge--${h}`:"",h==="outline"&&!d?"badge--no-bg":"",_,r),N=y?.startsWith("--")?`var(${y})`:y,m=f!==void 0||N?{...f!==void 0?{minWidth:typeof f=="number"?`${f}px`:f}:{},...N?{"--badge-color":N}:{}}:void 0;return t.jsxs("span",{className:w,style:m,"aria-label":l?void 0:s,role:i??(s&&!l?"img":void 0),"aria-hidden":l||void 0,children:[C&&t.jsx(dt,{icon:C,size:g,className:"badge__icon"}),u??c,x&&t.jsx(dt,{icon:x,size:g,className:"badge__icon"})]})}const R2=()=>Jt.t("passCard.planSuffix","\uC774\uC6A9\uAD8C");function wu(e){if(!(e==null||e==="")){if(typeof e=="string"&&/^\s*\d[\d,]*\s*$/.test(e)){const n=Number(e.replace(/[,\s]/g,""));if(Number.isFinite(n))return Ba(`${n.toLocaleString("ko-KR")}\uC6D0`)}return Ba(typeof e=="number"?`${e.toLocaleString("ko-KR")}\uC6D0`:e)}}function P2(e){const n=`${e.code??""} ${e.name??""}`.toLowerCase();return/manager|매니저/.test(n)?"manager":"speechear"}function F2(e){if(e.durationDays&&e.durationDays>0){const l=e.durationDays;return l%365===0?`${l/365}\uB144`:`${l}\uC77C`}const n=(e.code??"").match(/(\d+)(d|y)\b/i);if(n)return n[2].toLowerCase()==="y"?`${n[1]}\uB144`:`${n[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||R2()}function I2(e){const n=(e??"").match(/(\d+)(d|y)\b/i);if(!n)return null;const a=Number(n[1]);return n[2].toLowerCase()==="y"?a*365:a}function Bu(e){return{type:e.type??P2(e),plan:F2(e),label:e.label,price:wu(e.price),originalPrice:wu(e.originalPrice),discountLabel:e.discountLabel}}var O2='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>',z2='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>',ku='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 ca={text:"--pass-card-text",sub:"--pass-card-sub",copyright:"--pass-card-copyright"},Xo=new WeakMap;function W2(e){if(e)return Xo.get(e)}function Hn(e,n){e&&(e.style.setProperty(ca.text,n.text),e.style.setProperty(ca.sub,n.sub),n.copyrightColor&&e.style.setProperty(ca.copyright,n.copyrightColor),Xo.set(e,n))}function Vn(e){e&&(e.style.removeProperty(ca.text),e.style.removeProperty(ca.sub),e.style.removeProperty(ca.copyright),Xo.delete(e))}const Au={text:"var(--color-pureBlack)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-text-primary)"};function Nu(e={}){const n=Wt(Au,Hn,Vn);return t.jsxs("div",{ref:n,className:"pass-card-bg pass-card-bg-two-circle","aria-hidden":"true",children:[t.jsx("div",{className:"pass-card-bg-two-circle__c1"}),t.jsx("div",{className:"pass-card-bg-two-circle__c3"}),t.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-two-circle__symbol",style:{"--symbol-url":`url("${ku}")`}})]})}const Eu="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",Ea=240;var nr='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 H2={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"},V2=100,q2=[{scale:1,opacity:.55},{scale:2,opacity:.4},{scale:3.1,opacity:.28},{scale:4.5,opacity:.18},{scale:6,opacity:.1}];function ju(e={}){const n=Wt(H2,Hn,Vn),a="var(--color-main)",r=270,s=170;return t.jsxs("div",{ref:n,className:"pass-card-bg pass-card-bg-sound-move","aria-hidden":"true",children:[t.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:q2.map(({scale:l,opacity:i},u)=>t.jsx("g",{transform:`translate(${r} ${s}) scale(${l*V2/Ea}) translate(${-Ea/2} ${-Ea/2})`,opacity:i,children:t.jsx("path",{d:Eu,fill:"none",stroke:a,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),t.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move__symbol",style:{"--symbol-url":`url("${nr}")`}})]})}const U2={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",logoColor:"_mono",copyrightColor:"#ffffff"},G2=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 Y2(e={}){const n=Wt(U2,Hn,Vn),a="#ffffff",r=270,s=170;return t.jsxs("div",{ref:n,className:"pass-card-bg pass-card-bg-sound-move-v1","aria-hidden":"true",children:[t.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:K2.map(({scale:l,opacity:i},u)=>t.jsx("g",{transform:`translate(${r} ${s}) scale(${l*G2/Ea}) translate(${-Ea/2} ${-Ea/2})`,opacity:i,children:t.jsx("path",{d:Eu,fill:"none",stroke:a,strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})},u))}),t.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-move-v1__symbol",style:{"--symbol-url":`url("${ku}")`}})]})}const Z2={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function X2(e={}){const n=Wt(Z2,Hn,Vn);return t.jsxs("div",{ref:n,className:"pass-card-bg pass-card-bg-talk","aria-hidden":"true",children:[t.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--left"}),t.jsx("div",{className:"pass-card-bg-talk__shape pass-card-bg-talk__shape--right"}),t.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk__symbol",style:{"--symbol-url":`url("${nr}")`}})]})}const J2={Logo_SpeechEar_ko:{"":Lr,_mono:O2},Logo_SpeechEarManager_ko:{"":Zo,_mono:z2}};function Q2(e,n){if(e)return J2[e]?.[n??""]??void 0}const ev={speechear:Lr,manager:Zo},tv={speechear:"Logo_SpeechEar_ko",manager:"Logo_SpeechEarManager_ko"},Du=10;function nv(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 Su(e,n){if(e<=0)return n("passCard.remainingSecond",{n:0});const a=Math.floor(e/86400);if(a>0)return n("passCard.remainingDay",{n:a});const r=Math.floor(e/3600);if(r>0)return n("passCard.remainingHour",{n:r});const s=Math.floor(e/60);return s>0?n("passCard.remainingMinute",{n:s}):n("passCard.remainingSecond",{n:Math.floor(e)})}function av(e,n,a){if(e==="manager"){const r=/년/.test(n)||/yr|year/i.test(n)||/1년|365/.test(n),s=a==="\uC624\uD508\uD2B9\uAC00"||a===Jt.t("passCard.specialLabel");return r?t.jsx(X2,{}):s?t.jsx(Y2,{}):t.jsx(ju,{})}return t.jsx(Nu,{})}function Tu({ariaLabel:e,product:n,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:f,copyrightColor:C,logoSrc:x,label:y,price:b,originalPrice:v,discountLabel:_,onUse:g,onRefund:w,onDelete:N}){const{t:m}=Ee.useTranslation(),A=n?Bu(n):void 0,B=s??A?.type??"speechear",j=r??A?.plan??m("passCard.planSuffix","\uC774\uC6A9\uAD8C"),k=y??A?.label,E=b??(a?A?.price:void 0),D=v??(a?A?.originalPrice:void 0),$=_??A?.discountLabel,V=o.useMemo(()=>{if(E)return null;const K=n?.durationDays??I2(n?.code);if(!K||K<=0)return i!=null?{percent:null,remainingLabel:Su(i,m)}:null;const O=K*86400;let I;if(i!=null)I=i;else if((c==="active"||c==="expired")&&l){const ae=new Date(l).getTime();if(Number.isNaN(ae))return null;const _e=/^(\d{4})-(\d{2})-(\d{2})/.exec(String(l)),De=/^(\d{4})-(\d{2})-(\d{2})/.exec(Xa()),Se=Math.round(_e&&De?(Date.UTC(+_e[1],+_e[2]-1,+_e[3])-Date.UTC(+De[1],+De[2]-1,+De[3]))/864e5:(ae-Date.now())/864e5);I=Math.max(0,u?Se+1:Se)*86400}else c==="expired"?I=0:I=O;const re=nv(I),he=Math.max(0,Math.min(100,Math.floor(Math.min(re,O)/O*100)));return c==="pending"&&he>=100?null:{percent:he,remainingLabel:c==="expired"?m("passCard.expired","\uB9CC\uB8CC\uB428"):Su(I,m)}},[E,c,l,i,u,n?.durationDays,n?.code,m]),F=o.useRef(null),[U,T]=o.useState({}),[z,W]=o.useState(null),ie=!!(g||w||N),Q=o.useRef(!1),L=o.useRef(void 0),[J,ee]=o.useState(x);o.useLayoutEffect(()=>{ee(x)},[x]),o.useLayoutEffect(()=>{const K=F.current;K&&(d!==void 0&&K.style.setProperty("--pass-card-text",d),f!==void 0&&K.style.setProperty("--pass-card-sub",f),C!==void 0&&K.style.setProperty("--pass-card-copyright",C))},[d,f,C]),o.useLayoutEffect(()=>{const K=F.current;if(!K)return;const O=W2(K);if(!x){const I=tv[B],re=c==="expired"?"_mono":O?.logoColor??"",he=Q2(I,re);ee(he)}},[p,x,B,c]);const q=K=>{const O=F.current;if(!O)return null;const{left:I,top:re,width:he,height:ae}=O.getBoundingClientRect(),_e=(K.clientX-I)/he-.5;return{rotateX:-((K.clientY-re)/ae-.5)*Du,rotateY:_e*Du}},P=(K,O)=>{const I=O*-.7,re=K*.7+10,he=20+(Math.abs(K)+Math.abs(O))*.4;return`${I}px ${re}px ${he}px rgba(0, 0, 0, 0.18)`},R=o.useCallback(K=>{if(ia())return;Q.current=!0,clearTimeout(L.current),L.current=setTimeout(()=>{Q.current=!1},200);const O=q(K);O&&T({transform:`perspective(800px) rotateX(${O.rotateX}deg) rotateY(${O.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:P(O.rotateX,O.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)"})},[]),S=o.useCallback(K=>{if(ia())return;const O=q(K);if(!O)return;const I=Q.current?"transform 0.2s ease, box-shadow 0.2s ease":"none";T({transform:`perspective(800px) rotateX(${O.rotateX}deg) rotateY(${O.rotateY}deg) scale3d(1.03, 1.03, 1.03)`,boxShadow:P(O.rotateX,O.rotateY),transition:I})},[]),H=o.useCallback(()=>{clearTimeout(L.current),Q.current=!1,T({transform:"perspective(800px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.08)",transition:"transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1)"})},[]),ne=o.useCallback(()=>W(null),[]),te=o.useMemo(()=>{const K=m("passCard.planSuffix","\uC774\uC6A9\uAD8C"),O=j.replace("\uC774\uC6A9\uAD8C","").replace(K==="\uC774\uC6A9\uAD8C"?"":K,"").trim(),I=O.match(/^(.*?)(일|년)$/);return I?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"h0 pass-card__plan-number",children:I[1]}),t.jsx("span",{className:"h5b pass-card__plan-unit",children:I[2]==="\uB144"?m("passCard.unitYear","\uB144"):m("passCard.unitDay","\uC77C")})]}):t.jsx("span",{className:"h0",children:O})},[j,m]),ue=o.useMemo(()=>{const K=Ba(E);if(!K)return null;const O=K.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!O)return t.jsx("span",{className:"h1",children:K});const[,I,re,he]=O;return t.jsxs(t.Fragment,{children:[I&&t.jsx("span",{className:"h5 pass-card__price-symbol",children:I}),t.jsx("span",{className:"h1 pass-card__price-amount",children:re}),he.trim()&&t.jsx("span",{className:"h5 pass-card__price-symbol",children:he.trim()})]})},[E]),se=o.useCallback(()=>{ie&&W(K=>{if(K)return null;const O=F.current?.getBoundingClientRect();if(!O)return null;const I=50;return{left:O.left,right:O.right,width:O.width,height:O.height,x:O.x,y:O.y+I,top:O.top+I,bottom:O.bottom+I}})},[ie]),pe=o.useCallback(K=>{ie&&(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),se())},[ie,se]),G=[{items:[...g?[{label:m("passCard.menu.use","\uC0AC\uC6A9\uD558\uAE30"),icon:"play",onClick:()=>{g(),W(null)},closeOnSelect:!0}]:[],...w?[{label:m("passCard.menu.refund","\uD658\uBD88\uD558\uAE30"),icon:"rotate-ccw",onClick:()=>{w(),W(null)},closeOnSelect:!0}]:[],...N?[{label:m("passCard.menu.delete","\uC0AD\uC81C\uD558\uAE30"),icon:"trash-2",onClick:()=>{N(),W(null)},closeOnSelect:!0}]:[]]}];return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"pass-card-frame",children:t.jsxs("div",{ref:F,className:`pass-card pass-card--${c}${ie?" pass-card--clickable":""}`,style:U,onMouseEnter:R,onMouseMove:S,onMouseLeave:H,onPointerUp:K=>{K.pointerType==="touch"&&H()},onPointerCancel:K=>{K.pointerType==="touch"&&H()},onClick:se,onKeyDown:ie?pe:void 0,role:ie?"button":void 0,tabIndex:ie?0:void 0,"aria-label":e,"aria-haspopup":ie?"menu":void 0,"aria-expanded":ie?!!z:void 0,children:[p??av(B,j,k),!h&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"pass-card__top",children:t.jsxs("div",{className:"pass-card__top-left",children:[t.jsx("img",{src:J??ev[B],className:"pass-card__logo",alt:B==="manager"?m("header.logoManager","\uB9D0\uADC0\uB9E4\uB2C8\uC800 \uB85C\uACE0"):m("header.logoMalgwi","\uB9D0\uADC0 \uB85C\uACE0")}),t.jsxs("div",{className:"pass-card__plan",children:[t.jsx("div",{children:te}),t.jsx("span",{className:"h5b pass-card__plan-suffix",children:k?m("passCard.labeledPlan",{label:k}):m("passCard.planSuffix","\uC774\uC6A9\uAD8C")})]})]})}),E?t.jsxs("div",{className:"pass-card__price-area",children:[$&&t.jsx("span",{className:"pass-card__discount body-3",children:$}),t.jsxs("div",{className:"pass-card__price",children:[D&&t.jsx("span",{className:"pass-card__price-original body-3",children:Ba(D)}),ue]})]}):V?t.jsxs("div",{className:"pass-card__usage",children:[t.jsx("span",{className:"h5b pass-card__usage-remaining",children:V.remainingLabel}),V.percent!=null&&t.jsxs("span",{className:"pass-card__usage-percent",children:[t.jsx("span",{className:"h1 pass-card__usage-value",children:V.percent}),t.jsx("span",{className:"h5b pass-card__usage-symbol",children:"%"})]})]}):t.jsx("div",{className:"pass-card__copyright caption-2","aria-hidden":"true",children:"\xA9 IHAB Corp. All rights reserved."})]})]})}),z&&t.jsx(Bn,{anchorRect:z,onClose:ne,ariaLabel:m("tooltip.menu","\uBA54\uB274"),children:t.jsx(Na,{columns:G,onClose:ne,size:"small"})})]})}const rv={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-text-primary)"};function ov(e={}){const n=`passcard-sound-line-grad-${o.useId()}`,a=Wt(rv,Hn,Vn);return t.jsxs("div",{ref:a,className:"pass-card-bg pass-card-bg-sound-line","aria-hidden":"true",children:[t.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:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:n,x1:"0",y1:"0",x2:"1",y2:"0",children:[t.jsx("stop",{offset:"20%",stopColor:"var(--color-main)"}),t.jsx("stop",{offset:"80%",stopColor:"var(--color-sub)"})]})}),t.jsx("g",{transform:"translate(25, 45)",children:t.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(#${n})`,strokeWidth:"50",strokeLinecap:"round"})})]}),t.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-sound-line__symbol",style:{"--symbol-url":`url("${nr}")`}})]})}const sv={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-main)"};function lv(e={}){const n=Wt(sv,Hn,Vn);return t.jsxs("div",{ref:n,className:"pass-card-bg pass-card-bg-talk-v1","aria-hidden":"true",children:[t.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--left"}),t.jsx("div",{className:"pass-card-bg-talk-v1__shape pass-card-bg-talk-v1__shape--right"}),t.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-talk-v1__symbol",style:{"--symbol-url":`url("${nr}")`}})]})}function iv(e,n){if(e){if(n==="manager_pro")return t.jsx(lv,{});if(n==="manager_standard")return t.jsx(ov,{});if(n==="manager_lite")return t.jsx(ju,{})}}function uv(e){const n=Ba(e);if(!n)return null;const a=n.match(/^([^\d]*)([\d.,]+)(.*)$/);if(!a)return n;const[,r,s,l]=a;return t.jsxs(t.Fragment,{children:[r&&t.jsx("span",{className:"payment-plan__pricing-symbol h4",children:r}),s,l.trim()&&t.jsx("span",{className:"payment-plan__pricing-symbol h4",children:l.trim()})]})}function cv(e){const{t:n}=Ee.useTranslation(),a=n("payment.plan.tierFallback",{defaultValue:"\uC774\uC6A9\uAD8C"}),r=n("payment.plan.openPromo",{defaultValue:"\uC624\uD508 \uD2B9\uAC00"}),{plan:s,onSelect:l,period:i="monthly",ownedCodes:u,titleLevel:c=3}=e||{},p=c?`h${c}`:"div",h=m=>!!m&&!!u?.includes(m),d=m=>m.onceOnly??/오픈\s*특가/.test(m.label??""),f=(s.tiers||[]).some(m=>d(m)&&h(m.code)),C=m=>{const A=m.prices?m.prices[i]:m.price;return A?(s.tiers||[]).some(B=>!!B.badge&&B.originals?.[i]===A):!1},x=s.colorToken?`var(--color-${s.colorToken})`:"var(--color-gray)",y=n("payment.plan.freePrice","\uBB34\uB8CC"),b=n("payment.products.mgrEnterprise.tier.price","\uBB38\uC758"),v=m=>m.prices?m.prices[i]:m.price,_=(s.tiers||[]).length>0&&(s.tiers||[]).every(m=>{const A=v(m);return A==="\uBB34\uB8CC"||A===y||A==="0\uC6D0"||typeof A=="string"&&/\d/.test(A)&&!/[1-9]/.test(A)}),g=(s.tiers||[]).length>0&&(s.tiers||[]).every(m=>{const A=v(m);return A==="\uBB38\uC758"||A===b}),w=s.group==="org",N=w?"manager":"speechear";return t.jsxs("div",{className:"payment-plan__card",style:{borderColor:x,"--plan-color":x},children:[s.cardBadge&&t.jsx("div",{className:"payment-plan__card-badge",children:t.jsx(un,{label:s.cardBadge,variant:"main",size:"medium",fill:"soft"})}),t.jsxs("div",{className:"payment-plan__title",children:[t.jsx("p",{className:"payment-plan__quote body-3b",style:{color:x},children:s.quote||"\xA0"}),t.jsx(p,{className:"payment-plan__title-heading h1",children:s.tier??s.title}),t.jsx("p",{className:"payment-plan__subtitle body-3",children:s.subtitle})]}),t.jsxs("div",{className:"payment-plan__box",children:[t.jsx("span",{className:"payment-plan__box-title body-3b",children:n("payment.plan.recommendedFor","\uC774\uB7F0 \uBD84\uAED8 \uCD94\uCC9C\uD569\uB2C8\uB2E4.")}),t.jsx("ul",{className:"payment-plan__feature-list",children:(s.recommendedFor||[]).map((m,A)=>t.jsxs("li",{className:"payment-plan__feature-item body-3",children:[t.jsx(dt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:x}}),m]},A))})]}),t.jsxs("div",{className:"payment-plan__box",children:[t.jsx("span",{className:"payment-plan__box-title body-3b",children:n("payment.plan.features","\uD575\uC2EC \uAE30\uB2A5")}),t.jsx("ul",{className:"payment-plan__feature-list",children:(s.features||[]).map((m,A)=>t.jsxs("li",{className:"payment-plan__feature-item body-3",children:[t.jsx(dt,{icon:"check",size:18,className:"payment-plan__feature-check",wrapperStyle:{color:x}}),m]},A))})]}),t.jsx("div",{className:"payment-plan__card-pricing",children:_?null:g?t.jsx(be,{htmlType:"button",className:"payment-plan__contact-button",label:n("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})}):t.jsx(t.Fragment,{children:t.jsx("div",{className:"payment-plan__pricing-list",children:(s.tiers||[]).map(m=>{const A=m.label||a,B=d(m),j=B||m.openPromo===!0,k=A.replace(/^오픈\s*특가\s*/,"")||a,E=m.prices?m.prices[i]:m.price,D=m.badge?j?`${r}
828
+ ${m.badge}`:m.badge:void 0;if(B&&h(m.code))return null;if(!m.badge&&!f)return C(m)?null:t.jsxs("div",{className:`payment-plan__pricing-row payment-plan__pricing-row--static${m.highlight?" payment-plan__pricing-row--highlight":""}`,children:[t.jsx("div",{className:"payment-plan__pricing-row-title",children:t.jsx("div",{className:"payment-plan__pricing-row-label h5b",children:m.label})}),t.jsx("div",{className:"payment-plan__pricing-row-price",children:t.jsx("span",{className:"payment-plan__pricing-current h1",children:uv(E)})})]},m.id);const $=s.tier??(w?s.title:void 0),V=t.jsx(Tu,{showPrice:!0,product:{type:N,code:m.code,name:k,label:$,price:E,originalPrice:m.originals?.[i]??void 0,discountLabel:D},bg:iv(w,s.id)}),F=()=>l?.({...m,productId:s.id,productTitle:s.title,preview:V});return t.jsx("div",{className:"payment-plan__pricing-card",onClick:F,onKeyDown:l?U=>{U.target===U.currentTarget&&(U.key==="Enter"||U.key===" ")&&(U.preventDefault(),F())}:void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:V},m.id)})})})})]})}function dv({variant:e="default"}){return t.jsxs("div",{className:`pass-card-bg pass-card-bg--${e}`,"aria-hidden":"true",children:[t.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--1"}),t.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--2"}),t.jsx("div",{className:"pass-card-bg__circle pass-card-bg__circle--3"})]})}var Jo='data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?><svg id="Logo_IHAB_en" xmlns="http://www.w3.org/2000/svg" width="765.08" height="240" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 765.08 240"><defs><linearGradient id="linear-gradient" x1="62.99" y1="62.99" x2="190.71" y2="190.71" gradientUnits="userSpaceOnUse"><stop offset=".2" stop-color="%23499cdf"/><stop offset=".8" stop-color="%234dcdc0"/></linearGradient></defs><path id="symbol" d="M190.71,49.29c-18.1-18.1-43.1-29.29-70.71-29.29s-34.94,28.87-53.03,46.97h0c-18.1,18.1-46.97,25.56-46.97,53.03s11.19,52.61,29.29,70.71c18.1,18.1,43.1,29.29,70.71,29.29s52.61-11.19,70.71-29.29c18.1-18.1,29.29-43.1,29.29-70.71s-11.19-52.61-29.29-70.71ZM155.36,155.36c-9.05,9.05-21.55,14.64-35.36,14.64s-26.31-5.6-35.36-14.64c-9.05-9.05-14.64-21.55-14.64-35.36s5.6-26.31,14.64-35.36c9.05-9.05,21.55-14.64,35.36-14.64s26.31,5.6,35.36,14.64c9.05,9.05,14.64,21.55,14.64,35.36s-5.6,26.31-14.64,35.36Z" fill="url(%23linear-gradient)"/><g id="text"><path d="M316.21,190.6h-36.74V50.61h36.74v139.99Z"/><path d="M335.16,50.61h36.74v55.11h51.63v-55.11h36.93v139.99h-36.93v-55.11h-51.63v55.11h-36.74V50.61Z"/><path d="M473.99,190.6l46.6-139.99h50.08l46.41,139.99h-39.64l-8.31-27.46h-46.99l-8.31,27.46h-39.83ZM560.62,135.3l-14.5-46.99h-1.16l-14.31,46.99h29.97Z"/><path d="M631,50.61h59.94c31.9,0,48.73,13.73,48.73,35.19,0,15.47-11.02,27.26-26.88,30.55v1.35c17.6.58,32.29,13.54,32.29,33.45,0,22.82-18.56,39.45-49.11,39.45h-64.97V50.61ZM701.77,93.53c0-8.89-6.96-13.92-17.02-13.92h-17.02v27.84h16.44c10.25,0,17.6-5.03,17.6-13.92ZM706.22,146.51c0-10.25-7.35-16.05-19.14-16.05h-19.34v30.55h18.76c13.15,0,19.72-5.03,19.72-14.5Z"/></g></svg>';const Mu={text:"var(--color-text-primary)",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEar_ko",copyrightColor:"var(--color-text-muted)"};function pv(){const e=Wt(Mu,Hn,Vn);return t.jsx("div",{ref:e,className:"pass-card-bg pass-card-bg-ihab","aria-hidden":"true",children:t.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-ihab__symbol-top",style:{"--symbol-url":`url("${Jo}")`}})})}const $u={text:"#ffffff",sub:"var(--color-lightGray)",logoBase:"Logo_SpeechEarManager_ko",logoColor:"_mono",copyrightColor:"#ffffff"};function hv(e={}){const n=Wt($u,Hn,Vn);return t.jsxs("div",{ref:n,className:"pass-card-bg pass-card-bg-left-color-grid","aria-hidden":"true",children:[t.jsx("div",{className:"pass-card-bg-left-color-grid__bar"}),t.jsx("div",{className:"pass-card-bg-left-color-grid__grid"}),t.jsx("span",{className:"pass-card-bg__symbol pass-card-bg-left-color-grid__symbol",style:{"--symbol-url":`url("${nr}")`}})]})}function Lu({keys:e,anchor:n="top-right",scale:a,className:r=""}){const s=Array.isArray(e)?e:[e];return t.jsx("span",{className:ke("shortcut-badge",`shortcut-badge--${n}`,r),style:a===void 0?void 0:{"--shortcut-badge-scale":String(a)},children:s.map((l,i)=>t.jsxs("span",{className:"shortcut-badge__group",children:[i>0&&t.jsx("span",{className:"shortcut-badge__plus",children:"+"}),t.jsx("kbd",{className:"shortcut-badge__key",children:l})]},`${l}-${i}`))})}const ar=(e,n,a)=>e+(n-e)*a;function mv({speakers:e,size:n=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:f,buttonSize:C=40,showIcon:x=!0,onCenterClick:y,centerLabel:b,centerDisabled:v=!1,centerAttention:_=!1,shortcutAnchor:g="top-right",shortcutScale:w,scaleShortcut:N=!1}){const{t:m}=Ee.useTranslation(),A=Math.max(0,Math.min(1,a)),B=n/2,j=110/300,k=.18,E=O=>n*(j+(O-1)*k),D=O=>{const I=E(O.row??1),re=O.angleDeg*Math.PI/180;return{x:B+I*Math.cos(re),y:B+I*Math.sin(re)}},$=Math.max(...e.map(O=>O.row??1),1),V=n*.08,F=n*.1,U=n*.24,T=n-2*V,z=n-F-U,W=n-U/2,ie=o.useMemo(()=>[...new Set(e.map(O=>O.deg))].sort((O,I)=>O-I),[e]),Q=ie.length,L=Math.max(68,Q>1?T/(Q-1):0),J=o.useMemo(()=>new Map(ie.map((O,I)=>[O,I])),[ie]),ee=O=>{const I=J.get(O.deg)??0,re=B+(I-(Q-1)/2)*L,he=$>1?Math.min(68,z/($-1)):0,ae=he*($-1),_e=F+(z-ae)/2,De=$===1?F+z*.4:_e+($-(O.row??1))*he;return{x:re,y:De}},q=O=>{const I=D(O),re=ee(O);return{x:ar(I.x,re.x,A),y:ar(I.y,re.y,A)}},P={x:B,y:ar(B,W,A)},R=Math.round(C*1.2),S=Math.round(Math.max(16,Math.min(80,C*.7))),H=[],ne=new Map;for(const O of e){const I=O.row??1;ne.has(I)||ne.set(I,[]),ne.get(I).push(O)}for(const[O,I]of ne.entries()){if(I.length<2)continue;const re=[...I].sort((Ie,ot)=>Ie.deg-ot.deg),he=re.map(Ie=>q(Ie)),ae=re.map(Ie=>Ie.deg),_e=ae[ae.length-1]-ae[0],De=_e/(ae.length-1),Se=360-_e,Ne=re.length>=3&&De>0&&Se<=De*1.5,He=Math.round(E(O)*1e3)/1e3,ve=(Ie,ot,pt,Oe)=>{const Ue=(ot.angleDeg-Ie.angleDeg+540)%360-180;if(Ue===0)return`L ${Oe.x} ${Oe.y}`;if(A===0)return`A ${He} ${He} 0 0 ${Ue>0?1:0} ${Oe.x} ${Oe.y}`;const at=(Ie.angleDeg+Ue/2)*Math.PI/180,ce={x:B+He*Math.cos(at),y:B+He*Math.sin(at)},Pe={x:(pt.x+Oe.x)/2,y:(pt.y+Oe.y)/2},Ye={x:ar(ce.x,Pe.x,A),y:ar(ce.y,Pe.y,A)},Qe={x:2*Ye.x-Pe.x,y:2*Ye.y-Pe.y};return`Q ${Qe.x} ${Qe.y} ${Oe.x} ${Oe.y}`},xe=Ne?[...re,re[0]]:re,we=Ne?[...he,he[0]]:he;let Ae=`M ${we[0].x} ${we[0].y}`;for(let Ie=1;Ie<we.length;Ie++)Ae+=" "+ve(xe[Ie-1],xe[Ie],we[Ie-1],we[Ie]);H.push({key:`arc-${O}`,d:Ae})}const te=o.useMemo(()=>new Set(s??[]),[s]),ue=O=>({idle:"",active:m("soundCompass.state.active","\uC18C\uB9AC \uB098\uB294 \uC911"),played:m("soundCompass.state.played","\uB4E4\uC74C"),correct:m("soundCompass.state.correct","\uC815\uB2F5"),wrong:m("soundCompass.state.wrong","\uC624\uB2F5")})[O],se=(O,I,re,he)=>{const ae=O+1,_e=new RegExp(`(^|[^0-9])${ae}([^0-9]|$)`).test(I),De=!he||_e?I:`${ae}, ${I}`;return ue(re)?`${De}, ${ue(re)}`:De},pe=O=>{if(r===O.id)return"active";if(u){if(O.id===i)return"correct";if(O.id===l&&l!==i)return"wrong"}return te.has(O.id)?"played":"idle"},G=O=>r===O.id?"loop":u?O.id===i?"loop":null:c&&O.id===l?"once":null,K=(O,I)=>{switch(O){case"played":case"correct":return t.jsx(sl,{size:I});case"wrong":return t.jsx(Cl,{size:I});default:return t.jsx(fl,{size:I})}};return t.jsx("div",{className:"sound-compass",children:t.jsxs("div",{className:"sound-compass__compass-wrap",style:{width:n,height:n},children:[t.jsxs("svg",{width:n,height:n,viewBox:`0 0 ${n} ${n}`,className:"sound-compass__svg",children:[A===0&&e.map(O=>{const{x:I,y:re}=q(O);return t.jsx("line",{x1:P.x,y1:P.y,x2:I,y2:re,stroke:"#dde3ec",strokeWidth:"1"},O.id)}),H.map(O=>t.jsx("path",{d:O.d,fill:"none",stroke:"#dde3ec",strokeWidth:"1"},O.key))]}),_&&!v&&t.jsx("div",{className:"sound-compass__pulse sound-compass__pulse--active sound-compass__pulse--center",style:{width:R,height:R,left:P.x-R/2,top:P.y-R/2}}),y?t.jsx("button",{type:"button",className:`sound-compass__center sound-compass__center--button${v?" sound-compass__center--disabled":""}`,style:{width:R,height:R,left:P.x,top:P.y},"aria-label":b,"aria-disabled":v||void 0,tabIndex:v?-1:0,onClick:v?void 0:y,children:t.jsx(so,{size:S,color:"currentColor",strokeWidth:1.5})}):t.jsx("div",{className:"sound-compass__center",style:{width:R,height:R,left:P.x,top:P.y},children:t.jsx(so,{size:S,color:"currentColor",strokeWidth:1.5})}),e.map((O,I)=>{const{x:re,y:he}=q(O),ae=pe(O),_e=G(O),De={...w!==void 0||N?{"--shortcut-badge-scale":String(w??Math.max(.75,Math.min(3,C/56)))}:null,pointerEvents:d?"auto":"none",cursor:d?"pointer":"default",zIndex:ae!=="idle"?10:1},Se=C,Ne=Math.round(Math.max(10,Math.min(56,Se*.38))),He=Math.round(Math.max(7,Math.min(18,Se*.2))),ve=Math.round(Math.max(10,Math.min(56,Se*.4))),xe=x==="answered"&&(ae==="played"||ae==="correct"||ae==="wrong"),we=x===!0||xe,Ae=!xe;return t.jsxs("div",{className:"sound-compass__speaker-pos",style:{...De,left:re-Se/2,top:he-Se/2},children:[_e&&t.jsx("div",{className:`sound-compass__pulse sound-compass__pulse--${ae}`+(_e==="once"?" sound-compass__pulse--once":""),style:{width:Se,height:Se,..._e==="once"&&p!==void 0?{"--sc-pulse-duration-once":`${p}ms`}:null,...h!==void 0?{"--sc-pulse-scale":String(h)}:null}}),t.jsxs("button",{type:"button",tabIndex:d?0:-1,"aria-disabled":d?void 0:!0,onClick:d?()=>f?.(O.id):void 0,className:`sound-compass__speaker-btn sound-compass__speaker-btn--${ae}`,style:{width:Se,height:Se},"aria-label":se(I,O.label,ae,Ae),"aria-pressed":l!=null?O.id===l:void 0,children:[we&&K(ae,Ne),Ae&&t.jsx("span",{className:"sound-compass__speaker-number",style:{fontSize:x===!0?He:ve},children:I+1})]}),O.shortcut&&t.jsx(Lu,{keys:O.shortcut,anchor:g,className:"sound-compass__speaker-shortcut"})]},O.id)})]})})}function fv({id:e,tone:n="plain",bare:a=!1,className:r,style:s,children:l}){return t.jsx("section",{id:e,className:ke("landing-section",n==="line"&&"landing-section--line",r),style:s,children:a?l:t.jsx("div",{className:"landing-section__inner",children:l})})}function Cv({badge:e,badgeVariant:n="white",title:a,sub:r,maxWidth:s,subMaxWidth:l,gap:i="m",noGap:u=!1,onBand:c=!1,align:p="left"}){const h={...u?null:{"--landing-title-gap":`var(--spacing-${i})`},...s?{maxWidth:`${s}px`}:null},d=l?{maxWidth:`${l}px`}:{},f=p==="center";return t.jsxs(t.Fragment,{children:[e?t.jsx("p",{className:ke(f&&"landing-title__badge--center"),style:{margin:0},children:t.jsx(un,{size:"large",fill:n==="white"?"filled":"soft",variant:n,children:e})}):null,t.jsx("h2",{className:ke("landing-title__text",u&&"landing-title__text--no-gap",f&&"landing-title__text--center"),style:h,children:a}),r?t.jsx("p",{className:ke("landing-title__sub",c&&"landing-title__sub--on-band",f&&"landing-title__sub--center"),style:d,children:r}):null]})}function gv({icon:e,title:n,desc:a,children:r,layout:s="stack",leadWidth:l=300,titleStyle:i,tight:u=!1,align:c="left",hover:p=!0,className:h,style:d}){const f=u?"landing-card--pad-tight":"landing-card--pad",C=t.jsxs(t.Fragment,{children:[e,n?t.jsx("h3",{className:"landing-card__title",style:i,children:n}):null,a?t.jsx("p",{className:"landing-card__desc",children:a}):null]});return s==="row"?t.jsxs("div",{className:ke("landing-card","landing-card--row",f,p&&"landing-card--hover",h),style:d,children:[t.jsx("div",{className:"landing-card__lead",style:{"--landing-card-lead-w":`${l}px`},children:C}),t.jsx("div",{className:"landing-card__panel",children:r})]}):t.jsxs("div",{className:ke("landing-card",f,c==="center"&&"landing-card--center",p&&"landing-card--hover",h),style:d,children:[C,r]})}function bv({href:e,tone:n="dark",arrow:a=!1,className:r,children:s}){return t.jsxs("a",{className:ke("landing-button",n!=="dark"&&`landing-button--${n}`,r),href:e,children:[s,a?t.jsx("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flex:"none"},children:t.jsx("path",{d:"m9 18 6-6-6-6"})}):null]})}const yv=1200,vv=.3;function xv(e){if(typeof e!="string")return null;const n=/^(\D*)(\d[\d,]*)(\D*)$/.exec(e.trim());if(!n)return null;const a=Number(n[2].replace(/,/g,""));return Number.isFinite(a)?{prefix:n[1],suffix:n[3],target:a,grouped:n[2].includes(",")}:null}function _v(e){return String(e).replace(/\B(?=(\d{3})+(?!\d))/g,",")}function wv(e){const n=o.useRef(null),[a,r]=o.useState(1);return o.useEffect(()=>{const s=n.current;if(e||!s||typeof IntersectionObserver!="function"){r(1);return}r(0);let l=0;const i=new IntersectionObserver(u=>{if(!u.some(h=>h.isIntersecting))return;i.disconnect();const c=performance.now(),p=h=>{const d=Math.min(1,(h-c)/yv);r(1-(1-d)**3),d<1&&(l=requestAnimationFrame(p))};l=requestAnimationFrame(p)},{threshold:vv});return i.observe(s),()=>{i.disconnect(),cancelAnimationFrame(l)}},[e]),[n,a]}function Bv({stats:e,className:n}){const a=jr(),[r,s]=wv(a);return t.jsx("div",{className:"landing-stat-band-wrap",children:t.jsx("div",{ref:r,className:ke("landing-stat-band",n),style:{gridTemplateColumns:`repeat(${e.length}, minmax(0, 1fr))`},children:e.map((l,i)=>{const u=xv(l.value),c=u?`${u.prefix}${u.grouped?_v(Math.round(u.target*s)):Math.round(u.target*s)}${u.suffix}`:null;return t.jsxs("div",{children:[t.jsx("p",{className:"landing-stat-band__value",children:c===null?l.value:t.jsxs(t.Fragment,{children:[t.jsx("span",{"aria-hidden":"true",children:c}),t.jsx("span",{className:"landing-stat-band__sr",children:l.value})]})}),t.jsx("p",{className:"landing-stat-band__label",children:l.label})]},i)})})})}function kv({orientation:e="horizontal",label:n,className:a=""}){const r=ke("divider",`divider--${e}`,n&&e==="horizontal"?"divider--labeled":"",a);return e==="vertical"?t.jsx("div",{className:r,role:"separator","aria-orientation":"vertical"}):n?t.jsxs("div",{className:r,role:"separator","aria-orientation":"horizontal",children:[t.jsx("span",{className:"divider__line"}),t.jsx("span",{className:"divider__label caption-1",children:n}),t.jsx("span",{className:"divider__line"})]}):t.jsx("div",{className:r,role:"separator","aria-orientation":"horizontal"})}function Ru({checked:e,onChange:n,name:a,value:r,disabled:s=!1,label:l,className:i=""}){const u=o.useId();return t.jsxs("label",{className:`radio${s?" radio--disabled":""} ${i}`.trim(),htmlFor:u,children:[t.jsx("input",{id:u,type:"radio",name:a,value:r,checked:e,disabled:s,onChange:c=>n?.(c.target.checked)}),t.jsx("span",{className:"radio__dot"}),l&&t.jsx("span",{className:"radio__label body-2",children:l})]})}function Av({options:e,value:n,onChange:a,name:r,disabled:s=!1,direction:l="vertical",className:i="",ariaLabel:u}){const c=o.useId(),p=r??`radio-group-${c}`;return t.jsx("div",{className:`radio-group radio-group--${l} ${i}`.trim(),role:"radiogroup","aria-label":u,children:e.map(h=>t.jsx(Ru,{name:p,value:h.value,checked:n===h.value,disabled:s||h.disabled,label:h.label,onChange:d=>{d&&a?.(h.value)}},h.value))})}const Nv={info:"info",success:"check-circle",warning:"alert-triangle",danger:"alert-circle"};function Ev({tone:e="info",title:n,message:a,children:r,dismissible:s=!1,onDismiss:l,live:i,className:u=""}){const{t:c}=Ee.useTranslation(),[p,h]=o.useState(!1),d=o.useRef(null),f=o.useCallback(()=>{const _=d.current;_&&_.contains(document.activeElement)&&Nr(_),h(!0),l?.()},[l]);if(p)return null;const C=ke("alert",`alert--${e}`,u),x=i??(e==="danger"||e==="warning"?"assertive":"polite"),y=x==="assertive"?"alert":x==="polite"?"status":void 0,b=!!n,v=!!(a||r);return t.jsxs("div",{ref:d,className:C,role:y,children:[t.jsxs("div",{className:"alert__body",children:[t.jsxs("div",{className:"alert__header",children:[t.jsx(dt,{icon:Nv[e],size:20,className:"alert__icon"}),b&&t.jsx("span",{className:"alert__title body-2",children:n}),!b&&v&&t.jsx("div",{className:"alert__message body-3",children:a||r})]}),b&&v&&t.jsx("div",{className:"alert__message alert__message--indented body-3",children:a||r})]}),s&&t.jsx("button",{type:"button",className:"alert__dismiss",onClick:f,"aria-label":c("common.close","\uB2EB\uAE30"),children:"\xD7"})]})}const jv={ready:"search",guide:"info",error:"circle-alert"};function Dv(e,n){const a=n.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(t.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 Sv({status:e="guide",label:n,children:a,emphasis:r,icon:s,className:l=""}){const i=s===!1?null:s??jv[e],u=ke("search-summary",`search-summary--${e}`,l),c=n??a,p=typeof c=="string"&&r&&r.length>0?Dv(c,r):c;return t.jsxs("div",{className:u,role:"status","aria-live":"polite",children:[i!=null&&t.jsx(dt,{icon:i,size:18,className:"search-summary__icon"}),t.jsx("span",{className:"search-summary__text body-2",children:p})]})}function rr({title:e,items:n}){const{t:a}=Ee.useTranslation(),{anchorRect:r,openAt:s,close:l}=Mr(),i=o.useRef(null),u=Dr(!!r,(c,p)=>{c&&p?s(i.current?.querySelector("button")??p):l()},i);return t.jsxs("span",{ref:i,style:{display:"contents"},children:[t.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=>{ea(c)||s(c.currentTarget)},onPointerLeave:c=>{ea(c)||l()},onClick:c=>{u.touchPress(c.currentTarget)},onFocus:c=>{ia()||s(c.currentTarget)},onBlur:l}),r&&t.jsx(Qn,{title:e,items:n,showIndex:n.length>1,anchorRect:r,onClose:l})]})}const mn=40,da=32;function Tv({items:e=[],value:n,onChange:a,className:r="",size:s}){const l=_n(),i=s??l??mn,u=o.useId(),{t:c}=Ee.useTranslation(),p=o.useRef(null),h=e.find(v=>!v.disabled)?.key,d=e.some(v=>v.key===n)?n:h??e[0]?.key,f=e.find(v=>v.key===d&&!v.disabled)?.key??h,C=()=>Array.from(p.current?.querySelectorAll('[role="tab"]:not(:disabled)')??[]),x=(v,_=C())=>{if(_.length===0)return;const g=(v%_.length+_.length)%_.length;_[g]?.focus(),_[g]?.click()},y=v=>{if(!["ArrowRight","ArrowDown","ArrowLeft","ArrowUp","Home","End"].includes(v.key))return;v.preventDefault();const _=C(),g=_.indexOf(v.currentTarget);v.key==="ArrowRight"||v.key==="ArrowDown"?x(g+1,_):v.key==="ArrowLeft"||v.key==="ArrowUp"?x(g-1,_):v.key==="Home"?x(0,_):x(_.length-1,_)},b=e.find(v=>v.key===d);return t.jsxs("div",{className:`tabs ${r}`.trim(),children:[t.jsx("div",{ref:p,className:`tabs__list tabs__list--${i}`,role:"tablist","aria-label":c("tabs.ariaLabel","\uD0ED"),children:e.map(v=>t.jsx("button",{id:`tabs__tab-${u}-${v.key}`,type:"button",role:"tab","aria-selected":v.key===d,"aria-controls":v.key===d?`tabs__panel-${u}-${v.key}`:void 0,disabled:v.disabled,tabIndex:v.key===f?0:-1,className:`tabs__tab body-2${v.key===d?" tabs__tab--active":""}`,onClick:()=>{v.key!==n&&a?.(v.key)},onKeyDown:y,children:v.label},v.key))}),b&&t.jsx("div",{id:`tabs__panel-${u}-${b.key}`,role:"tabpanel","aria-labelledby":`tabs__tab-${u}-${b.key}`,tabIndex:0,className:"tabs__panel",children:b.panel},b.key)]})}const Mv={xs:12,sm:16,md:20,lg:28,xl:36};function $v(e){const n=e.trim().split(/\s+/).filter(Boolean);return n.length===0?"":n.length===1?[...n[0]].slice(0,2).join("").toUpperCase():([...n[0]][0]+[...n[n.length-1]][0]).toUpperCase()}function Lv({src:e,name:n,size:a="md",shape:r="circle",className:s=""}){const{t:l}=Ee.useTranslation(),[i,u]=o.useState(null),c=!!e&&i===e,p=n?$v(n):"",h=!!e&&!c,d=!h&&!!p,f=n||l("avatar.ariaLabel","\uC0AC\uC6A9\uC790 \uC544\uBC14\uD0C0");return t.jsxs("span",{className:`avatar avatar--${a} avatar--${r} ${s}`.trim(),role:"img","aria-label":f,children:[h&&t.jsx("img",{className:"avatar__image",src:e,alt:f,onError:()=>u(e??null)}),!h&&d&&t.jsx("span",{className:"avatar__initials","aria-hidden":"true",children:p}),!h&&!d&&t.jsx(dt,{icon:"user-round",size:Mv[a],className:"avatar__icon"})]})}function Rv(e,n){if(!n)return!0;const a=n.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 Pv({onFilesSelected:e,accept:n,multiple:a=!1,disabled:r=!1,showFileList:s=!0,files:l,onRemove:i,className:u=""}){const{t:c}=Ee.useTranslation(),p=o.useRef(null),[h,d]=o.useState(!1),[f,C]=o.useState([]),x=l??f,y=m=>{if(!m||m.length===0)return;const A=Array.from(m).filter(j=>Rv(j,n));if(A.length===0)return;const B=a?A:A.slice(0,1);if(l===void 0){const j=a?[...x,...B]:B;C(j),e?.(j)}else e?.(B)},b=m=>{m.preventDefault(),!r&&d(!0)},v=m=>{m.preventDefault(),d(!1)},_=m=>{m.preventDefault(),d(!1),!r&&y(m.dataTransfer.files)},g=m=>{const A=m.target;try{y(A.files)}finally{A.value=""}},w=()=>{r||p.current?.click()},N=m=>{if(!r&&(i?.(m),l===void 0)){const A=x.filter((B,j)=>j!==m);C(A),i||e?.(A)}};return t.jsxs("div",{className:`file-upload ${u}`.trim(),children:[t.jsxs("div",{className:ke("file-upload__dropzone",h&&"file-upload__dropzone--dragging",r&&"file-upload__dropzone--disabled"),role:"button",tabIndex:r?-1:0,"aria-disabled":r,onClick:w,onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),w())},onDragOver:b,onDragLeave:v,onDrop:_,children:[t.jsx(dt,{icon:"upload",size:24,className:"file-upload__icon"}),t.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")}),t.jsx("button",{type:"button",className:"file-upload__browse-button body-3",disabled:r,onClick:m=>{m.stopPropagation(),w()},children:c("fileUpload.browseButton","\uD30C\uC77C \uC120\uD0DD")}),t.jsx("input",{ref:p,type:"file",className:"file-upload__input",accept:n,multiple:a,disabled:r,onChange:g,tabIndex:-1,"aria-hidden":"true"})]}),s&&x.length>0&&t.jsx("ul",{className:"file-upload__list",children:x.map((m,A)=>t.jsxs("li",{className:"file-upload__list-item body-3",children:[t.jsx("span",{className:"file-upload__file-name body-3",children:m.name}),t.jsx("button",{type:"button",className:"file-upload__remove-button","aria-label":c("fileUpload.removeAriaLabel",{name:m.name}),disabled:r,onClick:()=>N(A),children:t.jsx(dt,{icon:"x",size:14})})]},`${m.name}-${A}`))})]})}function Fv({items:e,className:n=""}){const{t:a}=Ee.useTranslation();return t.jsx("nav",{className:`breadcrumb ${n}`.trim(),"aria-label":a("breadcrumb.ariaLabel","\uC774\uB3D9 \uACBD\uB85C"),children:t.jsx("ol",{className:"breadcrumb__list",children:e.map((r,s)=>{const l=s===e.length-1;return t.jsxs("li",{className:"breadcrumb__item",children:[l?t.jsx("span",{className:"breadcrumb__current body-3","aria-current":"page",children:r.label}):r.href?t.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?t.jsx("button",{type:"button",className:"breadcrumb__link body-3",onClick:r.onClick,children:r.label}):t.jsx("span",{className:"breadcrumb__text body-3",children:r.label}),!l&&t.jsx(dt,{icon:"chevron-right",size:14,className:"breadcrumb__separator"})]},s)})})})}const Iv={small:14,medium:20,large:28};function Ov({value:e,onChange:n,max:a=5,readOnly:r=!1,size:s="medium",ariaLabel:l,className:i=""}){const{t:u}=Ee.useTranslation(),c=r||!n,[p,h]=o.useState(null),d=c?e:Number.isFinite(e)?Math.round(e):0,f=p??d,C=Iv[s],x=m=>{m!==e&&n?.(m)},y=m=>{c||x(m)},b=m=>{c||ia()||h(m)},v=o.useRef(null),_=m=>{const A=Math.min(a,Math.max(1,m));x(A),Array.from(v.current?.querySelectorAll("[data-star]")??[]).find(B=>B.dataset.star===String(A))?.focus()},g=m=>{if(!c){switch(m.key){case"ArrowRight":case"ArrowUp":_((d||0)+1);break;case"ArrowLeft":case"ArrowDown":_((d||1)-1);break;case"Home":_(1);break;case"End":_(a);break;default:return}m.preventDefault()}},w=d>=1&&d<=a?Math.round(d):1,N=()=>{c||h(null)};return t.jsx("div",{className:`rating rating--${s}${c?" rating--readOnly":""} ${i}`.trim(),ref:v,onKeyDown:g,role:c?"img":"radiogroup","aria-label":c?u("rating.valueLabel",{value:e,max:a}):l??u("rating.groupLabel","\uBCC4\uC810"),onMouseLeave:N,onPointerUp:m=>{m.pointerType==="touch"&&N()},onPointerCancel:m=>{m.pointerType==="touch"&&N()},children:Array.from({length:a},(m,A)=>{const B=A+1,j=Math.max(0,Math.min(1,f-A)),k=j>0&&j<1,E=t.jsxs("span",{className:"rating__star-wrap",children:[t.jsx(dt,{icon:"star",size:C,className:"rating__star rating__star--empty"}),j>0&&t.jsx("span",{className:`rating__star-fill${k?" rating__star-fill--half":""}`,style:k?{width:`${j*100}%`}:void 0,children:t.jsx(dt,{icon:"star",size:C,className:"rating__star rating__star--filled"})})]});return c?t.jsx("span",{className:"rating__item","aria-hidden":"true",children:E},B):t.jsx("button",{type:"button",className:"rating__item rating__item--interactive",role:"radio","aria-checked":d===B,"aria-label":u("rating.starLabel",{n:B}),"data-star":B,tabIndex:B===w?0:-1,onClick:()=>y(B),onMouseEnter:()=>b(B),children:E},B)})})}const zv=20,Wv=["#499cdf","#4dcdc0","#2fae9e","#e6b94e","#d9534f","#e06b68","#bfc7d1"];function Hv({value:e,onChange:n,palette:a=Wv,size:r,className:s="",ariaLabel:l}){const i=_n(),u=r??i??mn,{t:c}=Ee.useTranslation();return t.jsx("div",{className:`color-picker ${s}`.trim(),role:"group","aria-label":l,children:a.map(p=>{const h=e?.toLowerCase()===p.toLowerCase();return t.jsx("button",{type:"button",className:`color-picker__swatch color-picker__swatch--${u}`,style:{backgroundColor:p},onClick:()=>n(p),"aria-pressed":h,"aria-label":h?`${p} ${c("colorPicker.selected","\uC120\uD0DD\uB428")}`:p,children:h&&t.jsx(dt,{icon:"check",size:zv,className:"color-picker__check"})},p)})})}function Pu({icon:e,label:n,tooltip:a,wrapperStyle:r,color:s,bgColor:l,useHover:i=!0,iconSize:u="medium"}){const{t:c}=Ee.useTranslation(),p=u==="small",h=ke("category-icon",p?"category-icon--small":""),d=p?16:20,f=o.useRef(null),[C,x]=o.useState(!1),y=o.useMemo(()=>{const B=r&&typeof r=="object"?{...r}:{};return!s&&!l?B:{...B,...s?{color:s,"--t-item-fg":s}:{},...l?{"--t-item-bg":l}:{}}},[r,s,l]),b=a||n,v=i&&!!b,[_,g]=o.useState(null);o.useLayoutEffect(()=>{C&&g(f.current?.getBoundingClientRect()??null)},[C]),o.useEffect(()=>{if(!i&&C)try{x(!1)}catch{}},[i,C]),o.useEffect(()=>{if(!C)return;const B=j=>{const k=f.current;if(!k)return;const E=j.target;E&&!k.contains(E)&&x(!1)};return document.addEventListener("pointerdown",B,!0),()=>document.removeEventListener("pointerdown",B,!0)},[C]);const w=o.useCallback(()=>{i&&x(!0)},[i]),N=o.useCallback(()=>{i&&x(!1)},[i]),m=o.useCallback(()=>x(!1),[]),A=o.useCallback(B=>{if(B.key==="Escape"){x(!1);return}(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),x(j=>!j))},[]);return t.jsxs("span",{ref:f,className:ke("category-icon__wrap",v&&"category-icon__wrap--interactive"),onPointerEnter:w,onPointerLeave:N,onFocus:w,onBlur:N,onKeyDown:A,role:b?"button":void 0,tabIndex:b?0:void 0,"aria-label":typeof b=="string"?c("common.descriptionFor",{name:b,defaultValue:`${b} \uC124\uBA85`}):void 0,"aria-haspopup":!!b,"aria-expanded":C,"data-tooltip-ignore":!0,children:[t.jsx(dt,{icon:e,label:n,className:h,imgClassName:"category-icon__image",maskClassName:"category-icon__mask",svgClassName:"category-icon__svg",wrapperStyle:y,size:d}),C&&b&&t.jsx(zn,{anchorRect:_,text:typeof b=="string"?b:void 0,offset:8,onClose:m,className:"category-icon__tooltip",ariaLabel:typeof b=="string"?b:void 0})]})}let ta=null;function or(e){if(ta&&ta!==e)try{ta()}catch{}return ta=e,()=>{ta===e&&(ta=null)}}function Rr(e){if(ta===e){ta=null;try{e()}catch{}}}function sr(e,n){let a=()=>{};const r=new Promise(u=>{a=u});if(typeof e!="string"||e.trim()===""){jt("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{n?.(!1)}catch{}return{el:{},stop:()=>{},done:r}}let s=!1;const l=u=>{if(!s){s=!0;try{n?.(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 Vv(e,n){if(!e)return{previewCodes:[],previewBucket:null};const a=e,r=i=>i.map(u=>u?.contextCode||u?.context_code).filter(Boolean).map(String);if(n==="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(n==="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(n==="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(n==="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 qv(e,n){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),[f,C]=o.useState(!1),x=o.useRef([]),{previewCodes:y,previewBucket:b}=Vv(e,n),v=`${y.join(",")}|${b??""}`,_=o.useMemo(()=>i.key===v?i.urls:[],[i,v]);o.useEffect(()=>{if(!y.length)return;let w=!1;return(async()=>{const N=[],m=[];for(const A of y)try{const B=Hl(A,b);if(!B){N.push("");continue}let j=null;try{j=await Vl(B)}catch{}if(!j)try{const k=await ql(B);k&&(j=URL.createObjectURL(k),m.push(j))}catch{}N.push(j??"")}catch{N.push("")}w?m.forEach(A=>{try{URL.revokeObjectURL(A)}catch{}}):(x.current.forEach(A=>{try{URL.revokeObjectURL(A)}catch{}}),x.current=m,u({key:v,urls:N}))})(),()=>{w=!0}},[y.join(","),b]),o.useEffect(()=>()=>{x.current.forEach(w=>{try{URL.revokeObjectURL(w)}catch{}}),x.current=[]},[]);const g=o.useCallback(async w=>{if(w.stopPropagation(),w.preventDefault(),p.current){h.current&&Rr(h.current),p.current=!1;try{c.current?.pause()}catch{}r(!1),l(-1);return}if(!_.filter(Boolean).length)return;let N=null;const m=()=>{p.current=!1,N?.stop()};h.current=m;const A=or(m);p.current=!0,r(!0);for(let B=0;B<_.length&&p.current;B++){const j=_[B];if(j&&(l(B),N=sr(j),c.current=N.el,!await N.done))break}A(),h.current===m&&(h.current=null,p.current=!1,r(!1),l(-1))},[_]);return o.useEffect(()=>()=>{h.current&&Rr(h.current),p.current=!1;try{c.current?.pause()}catch{}c.current=null},[]),{playing:a,playingIndex:s,previewUrls:_,previewHover:f,setPreviewHover:C,previewBtnRef:d,handlePreview:g}}const Uv=e=>{if(!e)return[];const n=typeof e.context=="string"&&e.context.trim()||typeof e.sentence=="string"&&e.sentence.trim()||typeof e.text=="string"&&e.text.trim()||"";if(n)return[String(n)];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 Qo(e){const{index:n,type:a,trainingData:r,ariaLabel:s,depth:l,renderPopup:i,completed:u,completedIds:c,selectedIds:p,tooltipText:h,useDescriptionTooltip:d=!1,onRemove:f,hideCheckBadge:C=!1,showTypeLabel:x=!1,onComplete:y,onSelect:b,onMore:v,countLabelOverride:_,size:g="square"}=e||{},{t:w}=Ee.useTranslation(),[N,m]=o.useState(!1),A=o.useRef(null),[B,j]=o.useState(!1);o.useEffect(()=>{A.current?.matches(":hover")&&j(!0)},[]);const{playing:k,playingIndex:E,previewUrls:D,previewHover:$,setPreviewHover:V,previewBtnRef:F,handlePreview:U}=qv(r,a?.key),T=o.useCallback(()=>{b?b():m(!0)},[b]),z=o.useCallback(()=>m(!1),[]),W=o.useCallback(()=>j(!0),[]),ie=o.useCallback(()=>j(!1),[]),Q=o.useCallback(()=>V(!0),[V]),L=o.useCallback(()=>V(!1),[V]),[J,ee]=o.useState(null);o.useLayoutEffect(()=>{$&&ee(F.current?.getBoundingClientRect()??null)},[$,F]);const[q,P]=o.useState(null);o.useLayoutEffect(()=>{B&&!N&&d&&P(A.current?.getBoundingClientRect()??null)},[B,N,d]);const R=o.useCallback(ce=>{ce.target===ce.currentTarget&&(ce.key==="Enter"||ce.key===" ")&&(ce.preventDefault(),T())},[T]),S=r||null,H=o.useMemo(()=>{if(!d)return null;const ce=h?(Array.isArray(h)?h:[h]).filter(Boolean):null,Pe=ce&&ce.length>0?ce:Uv(S);return Pe&&Pe.length>0?Pe:null},[d,h,S]),ne=o.useCallback(ce=>{ce.stopPropagation(),f?.()},[f]),te=o.useCallback(ce=>ce.stopPropagation(),[]),ue=o.useCallback(ce=>{typeof y=="function"&&y(ce)},[y]),se=u||(c&&r?.id!=null?c.has(String(r.id)):!1),pe=!se&&(p!=null&&r?.id!=null?p.has(String(r.id)):!1);ou("speechear.popup.close",z);const G=fi(),K=`${a?.label||""} ${n+1}`,O=S?.title||S?.name||K;let I=a?.icon,re,he="",ae="";try{const ce=S?.category_0||S?.category_main_code||S?.category_main,Pe=S?.category_1||S?.category_sub_code||S?.category_sub,Ye=G.find(Qe=>Qe.key===ce);Ye?.icon&&(I=Ye.icon),!re&&Ye?.color&&(re={"--t-item-fg":Ye.color}),!re&&S?.iconColor&&(re={"--t-item-fg":S.iconColor}),he=Ye?w(`topic.${Ye.key}`,{defaultValue:Ye.label||""}):"";try{const Qe=Ye?.subs?.find(ut=>ut.key===Pe);ae=Qe?w(`topic.sub.${Qe.key}`,{defaultValue:Qe.label||""}):""}catch{}}catch{}const _e=ae?`${he} / ${ae}`:he||a?.label||O,De=ce=>w("training.countQuestions",{n:ce,count:ce}),Se=ce=>w("training.countSentences",{n:ce,count:ce});let Ne="";try{if(S)if(a?.key==="LISTEN_IN_NOISE"){let ce=0;Array.isArray(S.items)&&S.items.length>0?ce=S.items.length:Array.isArray(S.sentences)&&S.sentences.length>0?ce=S.sentences.length:S.sentences&&(ce=1),Ne=Se(ce)}else if(a?.key==="SHORT_STORY"){let ce=1;Array.isArray(r?.items)?ce=r.items.length:Array.isArray(r?.raw&&r.raw?.items)?ce=r.raw.items.length:Array.isArray(S?.questions)?ce=S.questions.length:Array.isArray(S?.sentences)&&(ce=S.sentences.length),Ne=De(ce)}else if(a?.key==="LONG_STORY"){let ce=1;if(Array.isArray(S.items)&&S.items.length>0){const Pe=S.items.reduce((Ye,Qe)=>{const ut=Qe.questionItems;return Array.isArray(ut)?Ye+ut.length:Array.isArray(Qe.questions)?Ye+Qe.questions.length:Ye},0);ce=Pe>0?Pe:S.items.length}else Array.isArray(S.questions)&&S.questions.length>0?ce=S.questions.length:Array.isArray(S.sentences)&&S.sentences.length>0&&(ce=S.sentences.length);Ne=De(ce)}else if(a?.key==="ORDERING_SENTENCE"){let ce=1;Array.isArray(S.items)&&S.items.length>0?ce=S.items.length:Array.isArray(S.sentences)&&S.sentences.length>0&&(ce=S.sentences.length),Ne=Se(ce)}else Array.isArray(S.items)&&(Ne=S.items.length>0?De(S.items.length):"")}catch{}const He=g==="row",ve=g==="list"||He,xe=g==="compact",we=g==="small",Ae=we&&a?.key?bg().find(ce=>ce.key===a.key):void 0,Ie=Ae?Ci[Ae.key]:void 0,ot=Ae?Ie?w(`trainingType.${Ie}.title`,{defaultValue:Ae.label}):Ae.label??"":"",pt=x&&a?.label&&a.label!==String(O)?String(a.label):we&&ot&&ot!==String(O)?ot:"",Oe=!!pt,Ue=_!==void 0?_:Ne,at=[pt,typeof O=="string"?O:"",Ue].map(ce=>String(ce??"").trim()).filter(Boolean).join(" ");return t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:A,className:`training-block-button${ve?" training-block-button--list":""}${He?" training-block-button--row":""}${xe?" training-block-button--compact":""}${we?" training-block-button--small":""}${se?" training-block-button--completed":""}${pe?" training-block-button--selected":""}${Oe&&!we?" training-block-button--withType":""}${we&&!Oe?" training-block-button--no-type-label":""}`,onClick:T,onPointerEnter:W,onPointerLeave:ie,role:"button",tabIndex:0,onKeyDown:R,"aria-label":typeof s=="string"?s:at||void 0,title:!d&&h&&(Array.isArray(h)?h.filter(Boolean).join(`
829
+ `):h)||void 0,children:[t.jsxs("div",{className:"training-block-button__left",children:[x&&a?.label&&a.label!==String(O)&&t.jsx("span",{className:"training-block-button__type-label caption-1",children:a.label}),we&&ot&&ot!==String(O)&&t.jsx("span",{className:"training-block-button__type-label caption-2",children:ot}),t.jsx(Pu,{icon:I,label:O,tooltip:_e,wrapperStyle:re,iconSize:we||xe?"small":"medium"}),!C&&(se||pe)&&!(f&&B)&&t.jsx(Ln,{className:f?"training-block-button__check--removable":void 0,icon:"check",position:"top-left",size:32,"aria-label":se?w("training.completed","\uD6C8\uB828 \uC644\uB8CC"):w("training.selected","\uC120\uD0DD\uB428")}),f&&t.jsx(Ln,{className:`training-block-button__remove${B?" is-hover":""}`,icon:"remove",position:"top-left",size:32,"aria-label":w("common.remove","\uC81C\uAC70"),onClick:ne}),t.jsx("div",{className:`training-block-button__title ${xe?"body-3":we?"body-3b":"h3"}`,children:String(O)}),t.jsxs("div",{className:"training-block-button__description",children:[Ue?t.jsx("div",{className:`training-block-button__count ${we?"caption-2":"caption-1"}`,children:Ue}):null,t.jsx("div",{className:"training-block-button__chevron",children:t.jsx(dt,{icon:"chevron-right",label:w("training.next","\uB2E4\uC74C"),className:"training-block-button__chevron-icon",imgClassName:"training-block-button__chevron-icon-image",maskClassName:"training-block-button__chevron-icon-mask",svgClassName:"training-block-button__chevron-icon-svg",size:we?12:20})})]}),(ve&&!He||we)&&D.length>0&&t.jsx("div",{ref:F,className:"training-block-button__preview","data-tooltip-ignore":!0,onClick:te,onPointerEnter:Q,onPointerLeave:L,children:t.jsx(be,{htmlType:"button",size:we?28:32,type:"dot",icon:k?"pause":"play",variant:we?"transparent-lightGray":"default",useBorder:!1,selected:k,ariaLabel:String(O).trim()?k?w("training.stopFor",{name:O,defaultValue:`${O} \uC815\uC9C0`}):w("training.previewFor",{name:O,defaultValue:`${O} \uBBF8\uB9AC \uB4E3\uAE30`}):k?w("training.stop","\uC815\uC9C0"):w("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),onClick:U})})]}),v&&t.jsx("div",{className:"training-block-button__more","data-tooltip-ignore":!0,onClick:ce=>{ce.stopPropagation(),v(ce)},children:t.jsx(be,{htmlType:"button",size:40,type:"dot",icon:"more-horizontal",variant:"transparent-lightGray",useBorder:!1,ariaLabel:String(O).trim()?w("common.moreFor",{name:O}):w("common.more","\uB354\uBCF4\uAE30")})})]}),$&&t.jsx(zn,{anchorRect:J,text:k?w("training.stop","\uC815\uC9C0"):w("training.preview","\uBBF8\uB9AC \uB4E3\uAE30"),offset:8,onClose:L}),B&&!N&&d&&(H?t.jsx(Qn,{anchorRect:q,items:H,activeIndex:E,onClose:ie}):S?.subTitle?t.jsx(zn,{anchorRect:q,text:S.subTitle,offset:8,onClose:ie}):null),N&&i&&i({trainingData:S,typeKey:a?.key??"",onClose:z,onComplete:ue,popupTitle:String(O),popupSubTitle:a?.subTitle,depth:l!=null?String(l):void 0,popupIcon:I,popupIconTooltip:String(_e),popupWrapperStyle:re})]})}const Fu=200;function Gv(e){return e.itemId?(wg()[e.trainingType]??[]).find(n=>n?.id!=null&&String(n.id)===String(e.itemId))??null:null}function Iu({plan:e,groups:n,anchorRect:a,offset:r=12,onClose:s}){const{t:l}=Ee.useTranslation(),i=o.useMemo(()=>n?n.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):kg(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(Gv).filter(h=>h!=null)}}).filter(c=>c.pickedCount>0),[n,e?.items,l]);if(i.length===0)return null;const u=t.jsx("div",{className:le("training-tooltip__box"),children:t.jsx("div",{className:le("training-tooltip__groups"),children:i.flatMap(({key:c,label:p,type:h,data:d},f)=>[f>0?t.jsx("div",{className:le("training-tooltip__divider")},`div-${c}`):null,t.jsxs("div",{className:le("training-tooltip__section"),children:[t.jsx("div",{className:le("training-tooltip__section-header"),children:t.jsx("span",{className:le("training-tooltip__type-label body-3b"),children:p})}),t.jsx("div",{className:le("training-tooltip__items"),children:d.map((C,x)=>t.jsx(Qo,{index:x,type:h,trainingData:C,size:"compact",hideCheckBadge:!0},String(C.id??x)))})]},c)])})});return a?t.jsx(Bn,{anchorRect:a,offset:r,onClose:s,closeOnOutsideClick:!1,className:le("training-tooltip"),ariaLabel:l("tooltip.training","\uD6C8\uB828 \uC548\uB0B4"),children:u}):u}const Kv=200;function Yv({icon:e,count:n,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=ke("count-tile",h&&"count-tile--interactive",h&&l&&"count-tile--accent",u&&"count-tile--clickable",i),f=o.useRef(null),[C,x]=o.useState(null),y=o.useRef(null),b=o.useRef(null),v=!!(C&&r&&s),_=o.useCallback(()=>{y.current&&(clearTimeout(y.current),y.current=null),b.current&&(clearTimeout(b.current),b.current=null)},[]),g=o.useCallback(()=>{_(),x(null)},[_]),w=o.useCallback(()=>{!s||!r||(_(),y.current=setTimeout(()=>{y.current=null,x(f.current?.getBoundingClientRect()??null)},Fu))},[s,r,_]),N=o.useCallback(()=>{y.current&&(clearTimeout(y.current),y.current=null),!b.current&&(b.current=setTimeout(()=>{b.current=null,x(null)},Kv))},[]);return o.useEffect(()=>()=>{_()},[_]),o.useEffect(()=>{(!s||!r)&&g()},[s,r,g]),o.useEffect(()=>{if(!v)return;const m=B=>B instanceof Element&&(f.current?.contains(B)||!!B.closest(".training-tooltip")),A=B=>{m(B.target)?_():N()};return document.addEventListener("pointerover",A,!0),()=>document.removeEventListener("pointerover",A,!0)},[v,_,N]),t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:f,className:d,onClick:u?m=>{g(),u(m)}:void 0,onKeyDown:u?m=>{m.key!=="Enter"&&m.key!==" "||(m.preventDefault(),m.currentTarget.click())}:void 0,onPointerEnter:m=>{m.pointerType==="touch"||m.pointerType==="pen"?g():w()},onMouseEnter:c,onMouseLeave:m=>{N(),p?.(m)},role:u?"button":"img",tabIndex:u?0:void 0,"aria-label":`${a} ${n}`,children:[t.jsx(dt,{icon:e,size:20,className:"count-tile__icon"}),t.jsx("span",{className:"count-tile__count h5","aria-hidden":"true",children:n})]}),C&&r&&t.jsx(Iu,{plan:r,anchorRect:C,onClose:g})]})}let lr=0,Ou="",es="",ir=0;function zu(){return Wu(!1)}function Zv(){return Wu(!0)}function Wu(e){const n=typeof document<"u";lr===0&&n&&(Ou=document.body.style.overflow,document.body.style.overflow="hidden"),e&&n&&(ir===0&&(es=document.body.style.paddingRight),ir++,document.body.style.paddingRight="0px"),lr++;let a=!1;return()=>{a||(a=!0,lr=Math.max(0,lr-1),e&&n&&(ir=Math.max(0,ir-1),ir===0&&(es?document.body.style.paddingRight=es:document.body.style.removeProperty("padding-right"))),lr===0&&n&&(document.body.style.overflow=Ou))}}function Xv(){return t.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round","aria-hidden":!0,children:t.jsx("path",{d:"M6 6l12 12M18 6 6 18"})})}function Jv({open:e,onClose:n,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}=Ee.useTranslation(),f=o.useId(),C=o.useRef(null),x=o.useCallback(()=>n(),[n]);o.useEffect(()=>{if(!e)return;const _=document.activeElement,g=zu(),w=C.current;return Ro(w,_),w?.focus(),()=>{g();const N=document.activeElement;(!N||N===document.body||w&&w.contains(N))&&Po(_)?.focus?.()}},[e]);const y=o.useRef(x),b=o.useRef(u);o.useEffect(()=>{y.current=x,b.current=u}),o.useEffect(()=>{if(e)return la(()=>{b.current&&y.current()})},[e]);const v=o.useRef(!1);return $o(C,e),!e||typeof document>"u"?null:gn.createPortal(t.jsx("div",{className:ke("dialog",p),onPointerDown:i?_=>{v.current=_.target===_.currentTarget}:void 0,onMouseDown:_=>{_.target===_.currentTarget&&_.preventDefault()},onClick:i?_=>{const g=v.current;v.current=!1,g&&_.target===_.currentTarget&&x()}:void 0,children:t.jsxs("div",{ref:C,role:"dialog","aria-modal":"true","aria-label":r?void 0:a,"aria-labelledby":r?f:void 0,tabIndex:-1,className:ke("dialog__surface",`dialog__surface--${l}`,h),onClick:_=>_.stopPropagation(),children:[r?t.jsx("div",{className:"dialog__header",children:t.jsx("h2",{id:f,className:"dialog__title h4b",children:r})}):null,c?t.jsx("button",{type:"button",className:"dialog__close","aria-label":d("common.close","\uB2EB\uAE30"),onClick:x,children:t.jsx(Xv,{})}):null,t.jsx("div",{className:"dialog__body",children:s})]})}),document.body)}function Qv({columns:e,rows:n,rowKey:a,title:r,toolbar:s,empty:l,loading:i,caption:u,className:c=""}){const{t:p}=Ee.useTranslation(),h=!i&&n.length===0;return t.jsxs("div",{className:ke("board",c),children:[r||s?t.jsxs("div",{className:"board__head",children:[r?t.jsx("h2",{className:"board__title",children:r}):t.jsx("span",{}),s?t.jsx("div",{className:"board__toolbar",children:s}):null]}):null,t.jsxs("table",{className:"board__table",children:[u?t.jsx("caption",{className:"board__caption",children:u}):null,t.jsx("thead",{children:t.jsx("tr",{children:e.map(d=>t.jsx("th",{scope:"col",className:ke("board__th",`board__cell--${d.headerAlign??d.align??"left"}`),style:d.width?{width:d.width}:void 0,children:d.header},d.key))})}),t.jsx("tbody",{children:i?t.jsx("tr",{children:t.jsx("td",{className:"board__state",colSpan:e.length,children:i})}):h?t.jsx("tr",{children:t.jsx("td",{className:"board__state",colSpan:e.length,children:l??p("board.empty","\uB4F1\uB85D\uB41C \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):n.map((d,f)=>t.jsx("tr",{className:"board__row",children:e.map(C=>t.jsx("td",{className:ke("board__td",`board__cell--${C.align??"left"}`),children:C.render(d,f)},C.key))},a(d,f)))})]})]})}function ex({name:e,role:n,photo:a,media:r,credentials:s,size:l=190,className:i=""}){return t.jsxs("div",{className:ke("person-card",i),children:[t.jsx("div",{className:"person-card__photo",style:{width:l,height:l},children:r??(a?t.jsx("img",{src:a,alt:n?`${e} ${n}`:e}):null)}),t.jsx("h3",{className:"person-card__name",children:e}),n?t.jsx("p",{className:"person-card__role",children:n}):null,s?.length?t.jsx("ul",{className:"person-card__credentials",children:s.map(u=>t.jsx("li",{children:u},u))}):null]})}function tx({groups:e,className:n=""}){return t.jsx("div",{className:ke("timeline",n),children:e.map(a=>t.jsxs("section",{className:"timeline__group",children:[t.jsx("h3",{className:"timeline__title",children:a.title}),t.jsx("ul",{className:"timeline__rows",children:a.entries.map((r,s)=>t.jsxs("li",{className:"timeline__row",children:[r.label?t.jsx("span",{className:"timeline__label",children:r.label}):null,t.jsx("div",{className:"timeline__items",children:r.items.map((l,i)=>t.jsx("p",{children:l},i))})]},`${r.label??""}-${s}`))})]},a.title))})}function nx({title:e,kind:n,body:a,badge:r,badgeSrc:s,footer:l,width:i,className:u=""}){const c=r??(s?t.jsx("img",{src:s,alt:""}):null);return t.jsxs("div",{className:ke("publication-card",u),style:i?{width:i,flexShrink:0}:void 0,children:[c?t.jsx("div",{className:"publication-card__badge","aria-hidden":"true",children:c}):null,t.jsx("h3",{className:"publication-card__title",children:e}),n?t.jsx("p",{className:"publication-card__kind",children:n}):null,t.jsx("p",{className:"publication-card__body",children:a}),l?t.jsx("div",{className:"publication-card__footer",children:l}):null]})}function ax({logo:e,alt:n,onDone:a,durationMs:r=3e3}){const s=Ja(a);return o.useEffect(()=>{const l=setTimeout(()=>s.current?.(),r);return()=>clearTimeout(l)},[r,s]),t.jsx("div",{className:"splash-logo",style:{"--splash-logo-duration":`${r}ms`},"aria-hidden":"true",children:t.jsx("img",{src:e,alt:n,className:"splash-logo__image"})})}function rx({eyebrow:e,eyebrowIndex:n,title:a,description:r,level:s=2,tone:l="dark",className:i=""}){const u=s===1?"h1":"h2";return t.jsxs("div",{className:ke("section-header",`section-header--${l}`,i),children:[e?t.jsxs("p",{className:"section-header__eyebrow",children:[n?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"section-header__index",children:n}),t.jsx("span",{"aria-hidden":!0,className:"section-header__rule"})]}):null,e]}):null,a?t.jsx(u,{className:"section-header__title",children:a}):null,r?t.jsx("div",{className:"section-header__description",children:r}):null]})}function ox({items:e,className:n=""}){return t.jsx("ul",{className:ke("company-meta",n),children:e.map((a,r)=>t.jsxs("li",{className:"company-meta__item",children:[r>0?t.jsx("span",{"aria-hidden":!0,className:"company-meta__divider",children:"|"}):null,a]},a))})}const ur=new Map;function kn(e){const{t:n}=Ee.useTranslation(),{options:a=[],value:r=a.find(m=>!m.disabled)?.key??a[0]?.key,onChange:s=m=>{},className:l="",size:i,shape:u="pill",useBG:c=!0,fullWidth:p=!1,minButtonWidth:h,ariaLabel:d}=e||{},f=_n(),C=i??f??mn,x=o.useRef(null),y=a.filter(m=>!m.disabled),b=o.useId(),v=a.map(m=>m.key).join("\xB7");o.useEffect(()=>{if(!(!Yn||d!=null&&d!=="")){if(ur.set(b,v||"(\uBCF4\uAE30 \uC5C6\uC74C)"),ur.size>1){const m=[...ur.values()].sort();jt(`segmented-control-unnamed:${m.join("|")}`,`[ihab/SegmentedControl] \uC774\uB984 \uC5C6\uB294 \uB77C\uB514\uC624\uADF8\uB8F9\uC774 \uD55C \uD654\uBA74\uC5D0 ${ur.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): ${m.join(" / ")}`)}return()=>{ur.delete(b)}}},[d,v,b]);const _=m=>{if(!y.length)return;const A=Math.max(0,y.findIndex(j=>j.key===r)),B=m==="first"?y[0]:m==="last"?y[y.length-1]:y[(A+m+y.length)%y.length];B&&(s(B.key),Array.from(x.current?.querySelectorAll("[data-segkey]")??[]).find(j=>j.dataset.segkey===B.key)?.focus())},g=m=>{switch(m.key){case"ArrowRight":case"ArrowDown":_(1);break;case"ArrowLeft":case"ArrowUp":_(-1);break;case"Home":_("first");break;case"End":_("last");break;default:return}m.preventDefault()},w=m=>{const A=B=>typeof B=="string"||typeof B=="number";if(!(!A(m.label)||m.count==null||m.count===!1||!A(m.count)))return`${m.label}, ${m.count}`},N=y.some(m=>m.key===r)?r:y[0]?.key;return t.jsx("div",{ref:x,onKeyDown:g,className:ke("segmented-control",`segmented-control--${u}`,`segmented-control--${C}`,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??n("segmentedControl.ariaLabel","\uC120\uD0DD \uD0ED"),children:a.map(m=>t.jsx(be,{htmlType:"button",role:"radio","aria-checked":m.key===r,"data-segkey":m.key,tabIndex:m.key===N?0:-1,label:m.label,count:m.count,ariaLabel:w(m),disabled:m.disabled,className:m.key===r?"is-selected":"",onClick:()=>{m.disabled||s(m.key)},size:C,shape:u,useBorder:!1,useBG:!1},m.key))})}const sx=260;function qn(e){const{t:n}=Ee.useTranslation(),{title:a,subtitle:r,headerActions:s,headerSegment:l,children:i,buttons:u,footer:c,footerStart:p,footerEnd:h,footerNote:d,footerNoteDivider:f=!1,footerClassName:C="",footerLayout:x="center",onClose:y,closeDisabled:b=!1,beforeClose:v,closeOnBackdrop:_=!0,className:g="",ariaLabel:w,useTitle:N=!0,inline:m=!1,size:A,layer:B="modal",height:j,fillBody:k=!1,resetScrollKey:E}=e||{},[D,$]=o.useState(!1),V=o.useRef(!1),F=o.useRef(null),U=o.useId(),T=o.useRef(null);o.useEffect(()=>{},[m,a,w,g]),o.useEffect(()=>{E!==void 0&&T.current&&(T.current.scrollTop=0)},[E]);const[z,W]=o.useState(!1);o.useEffect(()=>{const pe=T.current;if(!pe)return;const G=()=>W(pe.scrollHeight>pe.clientHeight+1);if(G(),typeof ResizeObserver>"u")return;const K=new ResizeObserver(G);K.observe(pe);const O=pe.firstElementChild;return O&&K.observe(O),()=>K.disconnect()},[i,E]),o.useEffect(()=>{if(!m)return zu()},[m]);const ie=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(m)return;const pe=ie.current,G=F.current;return Ro(G,pe),G&&!G.contains(document.activeElement)&&(G.querySelector($n)??G).focus(),()=>{const K=document.activeElement;(!K||K===document.body||G&&G.contains(K))&&Po(pe)?.focus?.()}},[m]),$o(F,!m);const Q=o.useRef(!0),L=jr(),J=o.useRef(null);o.useEffect(()=>(Q.current=!0,()=>{Q.current=!1,J.current&&(clearTimeout(J.current),J.current=null)}),[]);const ee=o.useCallback(()=>{!Q.current||!V.current||(V.current=!1,$(!1))},[]),q=o.useCallback((pe,G=!1)=>{if(G&&!Q.current||V.current)return;V.current=!0,$(!0);const K=setTimeout(()=>{J.current===K&&(J.current=null);let O;try{O=pe?pe():void 0}catch{ee();return}O&&typeof O.then=="function"&&O.then(()=>{setTimeout(ee,120)},ee)},L?0:sx);G&&(J.current=K)},[ee,L]),P=o.useCallback(()=>{b||v&&v()===!1||q(y,!0)},[q,y,b,v]),R=o.useRef(P);o.useEffect(()=>{R.current=P});const S=!m&&!!y;o.useEffect(()=>{if(S)return la(()=>R.current())},[S]);const H=S&&_,ne=o.useRef(!1),te=pe=>{ne.current=pe.target===pe.currentTarget},ue=pe=>{const G=ne.current;ne.current=!1,G&&pe.target===pe.currentTarget&&P()},se=t.jsx("div",{className:`popup ${m?"popup--inline":""} ${B==="belowPagePopup"?"popup--below-page-popup":""} ${D?"popup--closing":""} ${g}`,onPointerDown:H?te:void 0,onClick:H?ue:void 0,onMouseDown:m?void 0:pe=>{pe.target===pe.currentTarget&&pe.preventDefault()},children:t.jsxs("div",{ref:F,className:`popup-panel${A?` popup-panel--${A}`:""}${j!=null?" popup-panel--has-height":""}${k?" popup-panel--fill-body":""}`,style:j!=null?{"--popup-height":typeof j=="number"?`${j}px`:j}:void 0,tabIndex:-1,role:m?void 0:"dialog","aria-modal":m?void 0:!0,"aria-labelledby":!m&&N&&a?U:void 0,"aria-label":!m&&!(N&&a)?w??(typeof a=="string"?a:void 0):void 0,children:[!N&&(s||y)?t.jsxs("div",{className:"popup-close-float",children:[s,y&&t.jsx(be,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:P,disabled:b,ariaLabel:n("common.close","\uB2EB\uAE30")})]}):a||s||y?t.jsxs("div",{className:`popup-header${r?" popup-header--with-subtitle":""}`,children:[t.jsxs("div",{className:"popup-header-main",children:[a?t.jsx("h2",{id:U,className:"popup-title popup-title--left h2",children:a}):t.jsx("span",{id:U,className:"popup-title popup-title--left h2"}),r&&t.jsx("span",{className:"popup-subtitle body-3",children:r})]}),t.jsxs("div",{className:"popup-header-aside",children:[l&&t.jsx("div",{className:"popup-header-segment",children:t.jsx(kn,{size:40,ariaLabel:l.ariaLabel,options:l.options.map(pe=>({key:pe.key,label:pe.label,disabled:pe.disabled})),value:l.value,onChange:l.onChange})}),t.jsxs("div",{className:"popup-header-actions",children:[s,y&&t.jsx(be,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,onClick:P,disabled:b,ariaLabel:n("common.close","\uB2EB\uAE30")})]})]})]}):null,t.jsx("div",{className:"popup-content",ref:T,tabIndex:z?0:void 0,children:t.jsx("div",{className:"popup-content__inner",children:typeof i=="function"?i({animateThen:q,closeWithAnimation:P}):i})}),d!=null&&d!==!1&&t.jsx("div",{className:`popup-footer-note caption-1${f?" popup-footer-note--divider":""}`,role:"note",children:d}),p||h?t.jsxs("div",{className:`popup-footer popup-footer--bar${C?` ${C}`:""}`,children:[t.jsx("div",{className:"popup-footer__start",children:typeof p=="function"?p({animateThen:q,closeWithAnimation:P}):p}),t.jsx("div",{className:"popup-footer__end",children:typeof h=="function"?h({animateThen:q,closeWithAnimation:P}):h})]}):u?.length?t.jsx("div",{className:`popup-footer popup-footer--buttons${x!=="center"?` popup-footer--${x}`:""}`,children:u.map((pe,G)=>t.jsx(be,{htmlType:"button",size:48,variant:pe.variant??"default",label:pe.label,disabled:pe.disabled,onClick:()=>pe.onClick?.({animateThen:q,closeWithAnimation:P})},G))}):c?t.jsx("div",{className:`popup-footer${x!=="center"?` popup-footer--${x}`:""}${C?` ${C}`:""}`,children:typeof c=="function"?c({animateThen:q,closeWithAnimation:P}):c}):null]})});return m||typeof document>"u"?se:gn.createPortal(se,document.body)}function Hu({checked:e,onChange:n,disabled:a=!1,label:r,ariaLabel:s,labelPosition:l="right",className:i="",id:u}){const c=r&&t.jsx("span",{className:"toggle__label body-3",children:r});return t.jsxs("label",{className:`toggle${a?" toggle--disabled":""} ${i}`.trim(),children:[l==="left"&&c,t.jsx("input",{id:u,type:"checkbox",role:"switch",checked:e,disabled:a,onChange:p=>n?.(p.target.checked),"aria-label":!r&&s?s:void 0}),t.jsx("span",{className:"toggle__slider"}),l==="right"&&c]})}function An({options:e,value:n,onChange:a,placeholder:r,disabled:s=!1,block:l=!1,size:i,error:u=!1,className:c="",ariaLabel:p,ariaDescribedBy:h}){const d=_n(),f=i??d??mn,{t:C}=Ee.useTranslation(),x=r??C("dropdown.placeholder","\uC120\uD0DD"),y=o.useId(),b=o.useId(),v=o.useRef(null),_=o.useCallback((T,z)=>{const W=window.innerHeight,ie=window.innerWidth,Q=typeof document<"u"?document.getElementById(y):null,L=260,J=Math.min(L,Math.max(Q?.offsetHeight||0,Q?.scrollHeight||0)||L),ee=Math.max(T.width,Q?.offsetWidth||0),q=W-T.bottom,P=T.top,R=q<J&&P>q,S=8,H=(ne,te)=>Math.min(Math.max(S,ne),Math.max(S,te));return{position:"fixed",left:H(T.left,ie-ee-S),minWidth:T.width,maxWidth:Math.max(T.width,ie-S*2),...R?{top:"auto",bottom:H(W-T.top+6,W-J-S)}:{bottom:"auto",top:H(T.bottom+6,W-J-S)},zIndex:er(z)}},[y]),{open:g,setOpen:w,toggle:N,style:m,triggerRef:A,menuRef:B}=tr({computeStyle:_}),[j,k]=o.useState(-1),E=o.useCallback(()=>k(-1),[]),D=e.find(T=>T.value===n);o.useEffect(()=>{if(g){const T=e.findIndex(z=>z.value===n);k(T>=0?T:e.length?0:-1),requestAnimationFrame(()=>{const z=B.current;if(!z)return;const W=z.querySelectorAll(".dropdown__option")[T];W&&(z.scrollTop=Math.max(0,W.offsetTop-z.clientHeight/2+W.clientHeight/2))})}},[g]),o.useEffect(()=>{g&&k(T=>{if(T>=0&&T<e.length)return T;const z=e.findIndex(W=>W.value===n);return z>=0?z:e.length?0:-1})},[g,e.length]);const $=o.useCallback(()=>{s||N()},[s,N]),V=o.useCallback(T=>{T.disabled||s||(T.value!==n&&a?.(T.value),w(!1))},[a,w,s,n]);o.useEffect(()=>{s&&w(!1)},[s,w]);const F=o.useCallback(T=>{if(!s){if(!g){(T.key==="Enter"||T.key===" "||T.key==="ArrowDown")&&(T.preventDefault(),w(!0));return}if(T.key==="Escape"){T.preventDefault(),w(!1);return}T.key==="ArrowDown"?(T.preventDefault(),k(z=>{let W=z+1;for(;W<e.length&&e[W].disabled;)W++;return W<e.length?W:z})):T.key==="ArrowUp"?(T.preventDefault(),k(z=>{let W=z-1;for(;W>=0&&e[W].disabled;)W--;return W>=0?W:z})):(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),e[j]?V(e[j]):w(!1))}},[s,g,e,j,V,w]),U=g?t.jsx("div",{ref:B,id:y,className:"dropdown__menu","data-tooltip-ignore":!0,role:"listbox",style:m,onMouseLeave:E,onMouseDown:T=>T.preventDefault(),children:e.map((T,z)=>t.jsxs("button",{id:`${y}-option-${z}`,type:"button",role:"option","aria-selected":T.value===n,className:ke("dropdown__option body-2",T.value===n?"dropdown__option--active":"",z===j?"dropdown__option--active":"",T.disabled?"dropdown__option--disabled":""),onMouseDown:W=>W.preventDefault(),onClick:()=>V(T),onMouseEnter:()=>k(z),disabled:T.disabled,children:[t.jsx("span",{className:"dropdown__option-check",children:T.value===n&&t.jsx("svg",{viewBox:"0 0 14 14",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"2 7 5.5 10.5 12 3.5"})})}),T.label]},T.value))}):null;return t.jsxs("div",{ref:v,className:ke("dropdown",`dropdown--s${f}`,g?"dropdown--open":"",l?"dropdown--block":"",u?"dropdown--error":"",c),onKeyDown:F,children:[t.jsxs("button",{ref:A,type:"button",className:"dropdown__trigger",role:"combobox","aria-haspopup":"listbox","aria-expanded":g,"aria-controls":g?y:void 0,"aria-activedescendant":g&&j>=0?`${y}-option-${j}`:void 0,"aria-label":p,"aria-describedby":[p&&D?b:"",h??""].filter(Boolean).join(" ")||void 0,"aria-invalid":u||void 0,disabled:s,onClick:$,onBlur:T=>{g&&!B.current?.contains(T.relatedTarget)&&w(!1)},children:[t.jsx("span",{id:b,className:`dropdown__trigger-label body-2${D?"":" dropdown__trigger-label--placeholder"}`,children:D?D.label:x}),t.jsx("svg",{className:"dropdown__chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:t.jsx("polyline",{points:"4 6 8 10 12 6"})})]}),typeof document<"u"&&gn.createPortal(U,v.current?.closest(".ihabdevteam-core-scope")??document.body)]})}const lx={hearingAid:"hearingAid",cochlearImplant:"cochlearImplant",other:"other",\uBCF4\uCCAD\uAE30:"hearingAid",\uC778\uACF5\uC640\uC6B0:"cochlearImplant",\uAE30\uD0C0:"other"};function Vu(e){return e?lx[e]??null:null}function qu(e){switch(Vu(e)){case"hearingAid":return"main";case"cochlearImplant":return"sub";default:return"default"}}function Uu(e,n){const a=Vu(e);return a?n(`device.type.${a}`,{defaultValue:e??""}):e??""}const ja=e=>e==null?"":String(e).trim();function ts(e,n,a,r){const s=ja(e),l=ja(n),i=ja(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=ui(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 ix(e,n,a){const r=ja(e);return r?`${r}-${ja(n).padStart(2,"0")}-${ja(a).padStart(2,"0")}`:""}function Gu(e){return typeof e=="string"?e:e.label}function Ku({value:e,onChange:n,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),f=o.useRef(null),C=o.useMemo(()=>{if(!a.length)return[];const E=e??"";return s===!1?a:E?typeof s=="function"?s(a,E):a.filter(D=>Gu(D).toLowerCase().includes(E.toLowerCase())):r?a:[]},[a,e,r,s]),[x,y]=o.useState(!1),b=o.useRef([]),v=x&&C.length===0?b.current:C;o.useEffect(()=>{v.length&&(b.current=v)},[v]);const _=o.useCallback(()=>y(!0),[]),g=o.useCallback(()=>y(!1),[]),w=i?0:-1;o.useEffect(()=>{c||d(w)},[c,w]),o.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]);const N=h<v.length?h:w<v.length?w:-1,m=o.useCallback(E=>{l?l(E):n?.(Gu(E)),p(!1)},[n,l]),A=o.useCallback(()=>p(!0),[]),B=o.useCallback(()=>{p(!0),d(w)},[w]),j=o.useCallback(()=>{f.current=setTimeout(()=>p(!1),120)},[]),k=o.useCallback(E=>{E.nativeEvent.isComposing||E.keyCode===229||(E.key==="ArrowDown"?(E.preventDefault(),p(!0),d(D=>Math.min(v.length-1,(D<v.length?D:w)+1))):E.key==="ArrowUp"?(E.preventDefault(),d(D=>Math.max(w,(D<v.length?D:v.length)-1))):E.key==="Enter"?N>=0&&m(v[N]):E.key==="Escape"&&c&&(E.preventDefault(),p(!1)))},[v,N,c,m,w]);return{listId:u,open:c,activeIdx:N,filtered:v,handleFocus:A,handleBlur:j,handleInput:B,handleKeyDown:k,handleSelect:m,handleCompositionStart:_,handleCompositionEnd:g}}const cr=typeof window<"u"?o.useLayoutEffect:o.useEffect;function na(e){const{value:n,defaultValue:a,name:r,inputRef:s,onChange:l,label:i,ariaLabel:u,ariaDescribedBy:c,required:p,placeholder:h,ghostText:d,ghostHint:f,type:C="text",disabled:x=!1,readOnly:y=!1,error:b,helperText:v,maxLength:_,size:g,variant:w="input",fullWidth:N=!1,newline:m=!1,multiline:A=!1,rows:B=3,leftIcon:j,rightIcon:k,clearable:E=!1,list:D,showCount:$=!0,className:V="",onFocus:F,onBlur:U,onKeyDown:T,onEnter:z,inputMode:W,autoComplete:ie,autoFocus:Q,suggestions:L,filterSuggestions:J,onSelectSuggestion:ee,autoActiveFirst:q,openOnFocus:P=!1}=e,R=_n(),S=g??R??mn,H=y||x?void 0:L,{t:ne}=Ee.useTranslation(),te=o.useId();!i&&!u&&jt(`TextField:unnamed:${te}`,"[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 ue=`tf-${te}`,se=`tf-helper-${te}`,pe=o.useRef(null),G=Ku({value:n??"",onChange:l,suggestions:H??[],openOnFocus:P,filterSuggestions:J,onSelectSuggestion:ee,autoActiveFirst:q}),K=!!H&&G.open&&G.filtered.length>0,O=o.useRef(null),[I,re]=o.useState(null),he=o.useCallback(()=>{const ce=O.current;if(!ce||typeof window>"u")return;const Pe=ce.getBoundingClientRect(),Ye=window.innerHeight,Qe=8,ut=230,vt=typeof document<"u"?document.getElementById(G.listId):null,ct=Math.min(ut,Math.max(vt?.offsetHeight||0,vt?.scrollHeight||0)||ut),Gt=Ye-Pe.bottom,xt=Pe.top,lt=Gt<ct+Qe&&xt>Gt,st=(Ot,Mt)=>Math.min(Math.max(Qe,Ot),Math.max(Qe,Mt));re({position:"fixed",left:Pe.left,width:Pe.width,...lt?{bottom:st(Ye-Pe.top+Qe,Ye-ct-Qe)}:{top:st(Pe.bottom+Qe,Ye-ct-Qe)},zIndex:er(ce)})},[G.listId]);cr(()=>{if(!K)return;he();let ce=null;const Pe=()=>{if(typeof requestAnimationFrame>"u"){he();return}ce===null&&(ce=requestAnimationFrame(()=>{ce=null,he()}))},Ye=Qe=>{const ut=Qe.target;ut&&ut.nodeType===1&&ut.closest?.(".text-field__suggestions")||Pe()};return window.addEventListener("scroll",Ye,!0),window.addEventListener("resize",Pe),()=>{ce!==null&&cancelAnimationFrame(ce),window.removeEventListener("scroll",Ye,!0),window.removeEventListener("resize",Pe)}},[K,he,G.filtered.length]);const ae=o.useCallback(ce=>{pe.current=ce,typeof s=="function"?s(ce):s&&(s.current=ce)},[s]),_e=d?`${d}${f??ne("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)")}`:h,De=n!==void 0,Se=De&&C==="password",[Ne,He]=o.useState((a??"").length),ve=De?(n??"").length:Ne,xe=o.useRef(n);cr(()=>{xe.current=n}),o.useEffect(()=>{const ce=pe.current;if(!Se||!ce)return;const Pe=n??"";ce.value!==Pe&&(ce.value=Pe)},[Se,n]),o.useEffect(()=>{if(!m||!pe.current)return;const ce=pe.current;ce.style.height="",ce.scrollHeight>ce.clientHeight&&(ce.style.height=`${ce.scrollHeight}px`)},[n,Ne,m]);const we=_!=null&&ve>_,Ae=S===32?16:20,Ie=ke("text-field",`text-field--s${S}`,w==="display"?"text-field--display":"",N?"text-field--full-width":"",x?"text-field--disabled":"",y?"text-field--readonly":"",b?"text-field--error":"",j?"text-field--has-left-icon":"",k||E?"text-field--has-right-icon":"",V),ot={id:ue,...Se?{}:De?{value:n}:{defaultValue:a},ref:ae,placeholder:_e,name:r,disabled:x,readOnly:y,autoFocus:Q,maxLength:_,list:D,inputMode:W,autoComplete:ie,"aria-label":!i&&u?u:void 0,"aria-required":p,"aria-invalid":!!b,"aria-describedby":[v||b?se:null,c].filter(Boolean).join(" ")||void 0,role:H?"combobox":void 0,"aria-autocomplete":H?"list":void 0,"aria-haspopup":H?"listbox":void 0,"aria-expanded":H?K:void 0,"aria-controls":K?G.listId:void 0,"aria-activedescendant":K&&G.activeIdx>=0?`${G.listId}-option-${G.activeIdx}`:void 0,onChange:ce=>{const Pe=ce.target;De||He(Pe.value.length),l?.(Pe.value),H&&G.handleInput(),Se&&queueMicrotask(()=>{const Ye=xe.current??"";Pe.value!==Ye&&(Pe.value=Ye)})},onCompositionStart:H?G.handleCompositionStart:void 0,onCompositionEnd:H?G.handleCompositionEnd:void 0,onFocus:(ce=>{F?.(ce),H&&G.handleFocus()}),onBlur:(ce=>{U?.(ce),H&&G.handleBlur()}),onKeyDown:(ce=>{const Pe=(ce.key==="Tab"&&!ce.shiftKey||ce.key===" ")&&!ce.nativeEvent.isComposing;if(d&&Pe&&!y&&!x&&!(ce.currentTarget.value??"").trim()){ce.preventDefault();const Ye=ce.currentTarget;De||(Ye.value=d,He(d.length)),l?.(d);return}H&&ce.key==="Enter"&&!ce.nativeEvent.isComposing&&G.activeIdx>=0?ce.preventDefault():z&&ce.key==="Enter"&&!ce.nativeEvent.isComposing&&(ce.preventDefault(),z()),T?.(ce),H&&G.handleKeyDown(ce)})},pt=E&&!x&&!y&&ve>0,Oe=()=>m?t.jsx("textarea",{...ot,className:"text-field__input text-field__input--auto body-2",rows:1}):A?t.jsx("textarea",{...ot,className:"text-field__input text-field__input--textarea body-2",rows:B}):t.jsx("input",{...ot,type:C,className:"text-field__input body-2"}),Ue=w==="display"&&!m&&!A&&!!_e,at=()=>t.jsxs(t.Fragment,{children:[Oe(),Ue&&t.jsx("span",{className:"text-field__placeholder","aria-hidden":"true",children:_e})]});return t.jsxs("div",{ref:O,className:Ie,children:[i&&t.jsxs("label",{htmlFor:ue,className:"text-field__label caption-1",children:[i,p&&t.jsx("span",{className:"text-field__required",children:"*"})]}),t.jsxs("div",{className:"text-field__wrap",children:[j&&t.jsx("span",{className:"text-field__icon text-field__icon--left",children:t.jsx(dt,{icon:j,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ae})}),at(),_!=null&&$&&t.jsxs("span",{className:`text-field__count caption-2${we?" text-field__count--over":""}`,children:[ve,"/",_]}),pt&&t.jsx(be,{size:24,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,className:"text-field__clear",ariaLabel:ne("textField.clearAriaLabel","\uC785\uB825\uAC12 \uC9C0\uC6B0\uAE30"),htmlType:"button",onMouseDown:ce=>{ce.preventDefault()},onClick:()=>{!De&&pe.current&&(pe.current.value="",He(0)),l?.("")},tabIndex:-1}),k&&!pt&&t.jsx("span",{className:"text-field__icon text-field__icon--right",children:t.jsx(dt,{icon:k,label:"",className:"",svgClassName:"text-field__icon-svg",size:Ae})})]}),!!H&&t.jsx("span",{className:"text-field__status",role:"status","aria-live":"polite",children:G.open&&(n??"").length>0&&G.filtered.length===0?ne("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"):""}),K&&(typeof document>"u"?null:gn.createPortal(t.jsx("ul",{id:G.listId,className:"text-field__suggestions",role:"listbox",style:I??{position:"fixed",visibility:"hidden"},"data-tooltip-ignore":!0,children:G.filtered.map((ce,Pe)=>t.jsx("li",{id:`${G.listId}-option-${Pe}`,role:"option","aria-selected":Pe===G.activeIdx,className:`text-field__suggestion body-2${Pe===G.activeIdx?" is-active":""}`,onMouseDown:Ye=>Ye.preventDefault(),onClick:()=>{G.handleSelect(ce),pe.current?.focus()},children:typeof ce=="string"?ce:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-field__suggestion-label",children:ce.label}),ce.hint&&t.jsx("span",{className:"text-field__suggestion-hint caption-1",children:ce.hint})]})},typeof ce=="string"?`${ce}-${Pe}`:ce.id))}),document.body)),(v||b)&&t.jsx("div",{className:"text-field__footer",children:t.jsx("span",{id:se,className:"text-field__helper caption-1",role:b?"alert":void 0,children:b||v})})]})}const Yu=()=>{};function fn(e){const n=o.useId(),a=_n()??mn;if(!("variant"in e)){const{label:g,sub:w,onClick:N,children:m,align:A="horizontal",icon:B,useFullWidth:j=!1,required:k=!1}=e,E=D=>{N&&D.target===D.currentTarget&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),N())};return t.jsxs("div",{className:ke("panel-row",A==="vertical"?"panel-row--vertical":"",j?"panel-row--label-fixed panel-row--fill":"",N?"panel-row--clickable":""),onClick:N,onKeyDown:N?E:void 0,role:N?"button":void 0,tabIndex:N?0:void 0,children:[B!=null&&t.jsx("div",{className:"panel-row__icon",children:B}),g!=null&&t.jsxs("div",{className:"panel-row__left",children:[t.jsxs("div",{className:"panel-row__label body-3",children:[g,k&&t.jsx("span",{className:"required-mark",children:"*"})]}),w&&t.jsx("div",{className:"panel-row__sub caption-1",children:w})]}),t.jsx("div",{className:"panel-row__right",children:m})]})}if(e.variant==="description")return t.jsx("div",{className:"panel-row panel-row--block",children:t.jsx("p",{className:"panel-row__description body-3",children:e.children})});if(e.variant==="empty")return t.jsx("div",{className:"panel-row panel-row--empty body-3",children:e.children});if(e.variant==="loading")return t.jsx("div",{className:"panel-row panel-row--loading",children:t.jsx(ka,{size:28})});if(e.variant==="custom"&&!e.label)return t.jsx("div",{className:"panel-row panel-row--block",children:e.children});const{variant:r,label:s,sub:l,onClick:i,required:u,error:c,align:p="horizontal",useFullWidth:h=!1,icon:d}=e,f=r==="button"?void 0:i;let C=null;const x=r==="toggle"?`panel-toggle-${n}`:void 0,y=c?`panel-error-${n}`:void 0,b=`panel-helper-${n}`;if(r==="toggle"){const g=e;C=t.jsx(Hu,{checked:g.checked,onChange:g.onChange,id:x})}else if(r==="segmented"){const g=e;C=t.jsx(kn,{options:g.options,value:g.value,onChange:g.onChange,size:g.size??a,ariaLabel:s})}else if(r==="dropdown"){const g=e,w=g.dropdowns?.length?t.jsx("div",{className:`panel-row__dropdown-group${h?" panel-row__dropdown-group--full":""}`,children:g.dropdowns.map((N,m)=>t.jsx("div",{className:h?"panel-row__dropdown-item--full":void 0,children:t.jsx(An,{options:N.options,value:N.value,onChange:N.onChange,size:a,placeholder:N.placeholder,block:h,error:!!c,ariaDescribedBy:y,ariaLabel:N.ariaLabel??([s,N.placeholder].filter(Boolean).join(" ")||void 0)})},m))}):t.jsx(An,{options:g.options??[],value:g.value??"",onChange:g.onChange??Yu,size:a,block:h,error:!!c,ariaLabel:s,ariaDescribedBy:y});C=c?t.jsxs("div",{className:`panel-row__dropdown-error-wrap${h?" panel-row__dropdown-error-wrap--full":""}`,children:[w,t.jsx("span",{id:y,className:"caption-1 panel-row__error",role:"alert",children:c})]}):w}else if(r==="button"){const g=e;g.buttons?.length?C=t.jsx("div",{className:"panel-row__button-group",children:g.buttons.map((w,N)=>t.jsx(be,{htmlType:"button",size:w.btnSize??a,variant:w.btnVariant??"default",disabled:w.disabled,onClick:w.onClick,children:w.label},N))}):C=t.jsx(be,{htmlType:"button",size:g.btnSize??a,variant:g.btnVariant??"default",disabled:g.disabled,onClick:g.onClick,children:g.buttonLabel})}else if(r==="text"){const g=e;C=t.jsx("span",{className:`panel-row__text body-2${h?" panel-row__text--full":""}`,style:g.valueColor?{color:g.valueColor}:void 0,children:g.value})}else if(r==="input"){const g=e;C=t.jsxs("div",{className:`panel-row__input-wrap${h?" panel-row__input-wrap--full":""}`,children:[t.jsx(na,{size:a,value:g.value,onChange:g.onChange??Yu,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:h,error:c,ariaLabel:s,required:u,ariaDescribedBy:g.helperText?b:void 0}),g.helperText&&t.jsx("div",{id:b,className:"panel-row__helper caption-1",children:g.helperText})]})}else r==="custom"&&(C=e.children);c&&r!=="input"&&r!=="dropdown"&&(C=t.jsxs("div",{className:`panel-row__dropdown-error-wrap${h?" panel-row__dropdown-error-wrap--full":""}`,children:[C,t.jsx("span",{id:y,className:"caption-1 panel-row__error",role:"alert",children:c})]}));const v=r==="input"||r==="dropdown"||(r==="text"||r==="custom")&&h,_=g=>{f&&g.target===g.currentTarget&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),f())};return t.jsxs("div",{className:ke("panel-row",p==="vertical"?"panel-row--vertical":"",v?"panel-row--label-fixed":"",r==="text"?"panel-row--text":"",f?"panel-row--clickable":""),onClick:f,onKeyDown:f?_:void 0,role:f?"button":void 0,tabIndex:f?0:void 0,children:[d!=null&&t.jsx("div",{className:"panel-row__icon",children:d}),t.jsxs("div",{className:"panel-row__left",children:[x?t.jsxs("label",{htmlFor:x,className:"panel-row__label body-3",children:[s,u&&t.jsx("span",{className:"required-mark",children:"*"})]}):t.jsxs("div",{className:"panel-row__label body-3",children:[s,u&&t.jsx("span",{className:"required-mark",children:"*"})]}),l&&t.jsx("div",{className:"panel-row__sub caption-1",children:l})]}),t.jsx("div",{className:"panel-row__right",children:C})]})}function Zu(e){const n=e.productName||e.brand,a=[e.brand,e.fitType].filter(r=>!!r&&r!==n);return[...new Set(a)].join(" \xB7 ")}function ux({devices:e,onRelease:n,emptyLabel:a}){const{t:r,i18n:s}=Ee.useTranslation();return t.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 t.jsxs("div",{className:"panel-row__device-column",children:[t.jsxs("div",{className:"panel-row__device-head",children:[t.jsx("span",{className:"panel-row__device-side body-2b",children:u}),i&&n&&t.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:()=>n(l)})]}),i?t.jsxs("div",{className:"panel-row__device-info",children:[t.jsxs("span",{className:"panel-row__device-kind",children:[i.device&&t.jsx(un,{size:"small",variant:qu(i.device),fill:"soft",label:Uu(i.device,r)}),Zu(i)&&t.jsx("span",{className:"panel-row__device-detail body-3",children:Zu(i)})]}),t.jsx("span",{className:"panel-row__device-name body-2b",children:i.productName||i.brand}),ts(i.wornYear,i.wornMonth,i.wornDay,s.language)&&t.jsx("span",{className:"panel-row__device-date caption-1",children:r("customers.device.wornSince",{date:ts(i.wornYear,i.wornMonth,i.wornDay,s.language)})})]}):t.jsx("span",{className:"panel-row__device-empty body-3",children:a??r("customers.device.notRegistered","\uBBF8\uB4F1\uB85D")})]},l)})})}function dr({title:e,titleLevel:n=2,icon:a,disc:r,actions:s,minHeight:l,maxWidth:i,className:u,scrollable:c,scrollbarGutter:p="auto",compactRows:h=!1,useBorder:d=!0,useBg:f=!0,labelWidth:C,form:x=!1,loading:y,empty:b,children:v}){const _=ke("panel",x?"panel--form":"",l!==void 0?"panel--fill":"",d?"":"panel--no-border",f?"":"panel--no-bg",h?"panel--compact-rows":"",u),g={};l!==void 0&&(g.minHeight=l),i!==void 0&&(g.maxWidth=typeof i=="number"?`${i}px`:i),C!==void 0&&(g["--panel-label-width"]=typeof C=="number"?`${C}px`:C);const w=n?`h${n}`:"div",N=d?mn:48;return t.jsx(Fo.Provider,{value:N,children:t.jsxs("div",{className:_,style:Object.keys(g).length?g:void 0,children:[(!!e||r!=null)&&t.jsxs("div",{className:ke("panel__header",r!=null?"panel__header--with-disc":""),children:[a&&t.jsx(dt,{icon:a,label:typeof e=="string"?e:void 0,className:"panel__icon"}),t.jsxs("div",{className:"panel__title-group",children:[!!e&&t.jsx(w,{className:`panel__title ${r!=null?"body-3b":"h5b"}`,children:e}),r!=null&&t.jsx("p",{className:"panel__disc caption-1",children:r})]}),s&&t.jsx("div",{className:"panel__actions",children:s})]}),y?t.jsx(fn,{variant:"loading"}):b!=null&&o.Children.toArray(v).length===0?t.jsx(fn,{variant:"empty",children:b}):c?t.jsx("div",{className:ke("panel__body--scroll",p==="stable"&&"panel__body--gutter-stable"),children:v}):v]})})}function cx({cols:e=2,layout:n="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 f=new ResizeObserver(([C])=>p(C.contentRect.width));return f.observe(d),()=>f.disconnect()},[r]);const h=r!==void 0&&c!==void 0&&c<=r;return t.jsx("div",{ref:u,className:ke("panel-grid",n==="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 ns({checked:e=!1,onChange:n,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)}),t.jsxs("label",{className:ke("checkbox",l==="small"&&"checkbox--small",l==="large"&&"checkbox--large",a&&"checkbox--disabled",i),htmlFor:h,title:u,children:[t.jsx("input",{ref:p,id:h,type:"checkbox",className:"checkbox__input",checked:e,onChange:f=>{n?.(f.target.checked),p.current&&(p.current.indeterminate=d.current)},disabled:a,"aria-label":!s&&c?c:void 0}),t.jsx("span",{className:"checkbox__box"}),s&&t.jsx("span",{className:"checkbox__label body-3",children:s})]})}function Xu(e,n){const a=()=>{if(e){const[y,b]=e.split("-");return{y:+y,m:+b-1}}const[C,x]=wr(n).split("-");return{y:+C,m:+x-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 C=a();s(C.y),i(C.m)},[e]);const c=o.useRef({y:r,m:l});o.useEffect(()=>{c.current={y:r,m:l}},[r,l]);const p=o.useCallback(C=>{const x=c.current.y*12+c.current.m+C,y=Math.floor(x/12),b=x-y*12;c.current={y,m:b},s(y),i(b)},[]),h=o.useCallback(()=>p(-1),[p]),d=o.useCallback(()=>p(1),[p]),f=o.useCallback((C,x)=>{c.current={y:C,m:x},s(C),i(x)},[]);return{viewY:r,viewM:l,prevMonth:h,nextMonth:d,setViewYM:f}}function Pr(e,n){return new Date(e,n+1,0).getDate()}function dx(e,n){return new Date(e,n,1).getDay()}function pr(e,n,a){return`${e}-${String(n+1).padStart(2,"0")}-${String(a).padStart(2,"0")}`}function px(e){if(!e)return"";const[n,a,r]=e.split("-");return`${n}. ${a}. ${r}.`}function hx(e){const n=e.replace(/\D/g,"");if(n.length!==8)return null;const a=+n.slice(0,4),r=+n.slice(4,6),s=+n.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:pr(a,r-1,s)}const mx=1900;function fx(e,n,a,r,s){const l=r?+r.split("-")[0]:Math.min(mx,e),i=s?+s.split("-")[0]:Math.max(n+10,e),u=[];for(let c=l;c<=i;c++)u.push({value:String(c),label:a(c)});return u}function Ju(e,n,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:n(e,l)})}return s}function Qu({value:e,onChange:n,size:a,min:r,max:s,disabled:l,placeholder:i,className:u,today:c,ariaLabel:p,ariaLabelledBy:h}){const d=_n(),f=a??d??mn;!p&&!h&&jt("DatePicker:unnamed","[ihab/DatePicker] \uC774\uB984\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 ariaLabel \uC774\uB098 ariaLabelledBy \uC911 \uD558\uB098\uB97C \uC8FC\uC138\uC694. placeholder \uB294 \uC774\uB984\uC744 \uB300\uC2E0\uD558\uC9C0 \uBABB\uD569\uB2C8\uB2E4.");const{t:C,i18n:x}=Ee.useTranslation(),y=i??C("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),b=o.useMemo(()=>C("calendar.dow",{returnObjects:!0}),[C]),v=wr(c),{viewY:_,viewM:g,prevMonth:w,nextMonth:N,setViewYM:m}=Xu(e,c),A=o.useId(),B=o.useCallback((I,re)=>{const he=window.innerHeight,ae=window.innerWidth,_e=typeof document<"u"?document.getElementById(A):null,De=Math.max(_e?.offsetHeight||0,_e?.scrollHeight||0)||300,Se=Math.max(I.width,_e?.offsetWidth||0,260),Ne=he-I.bottom,He=I.top,ve=Ne<De&&He>Ne,xe=8,we=(Ae,Ie)=>Math.min(Math.max(xe,Ae),Math.max(xe,Ie));return{position:"fixed",left:we(I.left,ae-Se-xe),width:I.width,minWidth:260,...ve?{top:"auto",bottom:we(he-I.top+6,he-De-xe)}:{bottom:"auto",top:we(I.bottom+6,he-De-xe)},zIndex:er(re)}},[A]),{open:j,setOpen:k,toggle:E,style:D,triggerRef:$,menuRef:V}=tr({computeStyle:B,onScroll:"reposition",onResize:"reposition",ignoreOutsideClickSelector:".dropdown__menu"});o.useEffect(()=>{if(!j)return;const I=V.current;return(I?.querySelector(".date-picker__day--selected:not(:disabled)")??I?.querySelector(".date-picker__day--today:not(:disabled)")??I?.querySelector(".date-picker__day:not(:disabled)")??I?.querySelector($n)??I)?.focus?.(),()=>{const re=document.activeElement;(!re||re===document.body)&&$.current?.focus?.()}},[j,V,$]);const[F,U]=o.useState(1),T=o.useRef(null),z=o.useRef(null);o.useEffect(()=>{if(!j)return;const I=e&&e.slice(0,7)===`${_}-${String(g+1).padStart(2,"0")}`?+e.slice(8):v.slice(0,7)===`${_}-${String(g+1).padStart(2,"0")}`?+v.slice(8):1;U(I)},[j]),o.useEffect(()=>{if(z.current==null)return;const I=z.current;z.current=null,T.current?.querySelector(`[data-day="${I}"]`)?.focus()}),o.useEffect(()=>{U(I=>Math.min(I,Pr(_,g)))},[_,g]);const W=o.useCallback(I=>{let re=pr(I.getFullYear(),I.getMonth(),I.getDate());r&&re<r&&(re=r),s&&re>s&&(re=s);const[he,ae,_e]=re.split("-").map(Number);(he!==_||ae-1!==g)&&m(he,ae-1),U(_e),z.current=_e},[r,s,_,g,m]),ie=o.useCallback(I=>{const re=new Date(_,g,F),he=_e=>{re.setDate(re.getDate()+_e),W(re)},ae=_e=>{const De=re.getFullYear()*12+re.getMonth()+_e,Se=Math.floor(De/12),Ne=De-Se*12;W(new Date(Se,Ne,Math.min(re.getDate(),Pr(Se,Ne))))};switch(I.key){case"ArrowLeft":he(-1);break;case"ArrowRight":he(1);break;case"ArrowUp":he(-7);break;case"ArrowDown":he(7);break;case"Home":he(-re.getDay());break;case"End":he(6-re.getDay());break;case"PageUp":I.shiftKey?ae(-12):ae(-1);break;case"PageDown":I.shiftKey?ae(12):ae(1);break;default:return}I.preventDefault()},[_,g,F,W]),Q=o.useCallback(I=>{l||(n(pr(_,g,I)),k(!1))},[_,g,n,k,l]);o.useEffect(()=>{l&&k(!1)},[l,k]);const L=I=>{const re=pr(_,g,I);return!!(r&&re<r||s&&re>s)},J=(()=>{const I=Pr(_,g);if(F>=1&&F<=I&&!L(F))return F;for(let re=1;re<=I;re++)if(!L(re))return re;return-1})(),ee=[];for(let I=0;I<dx(_,g);I++)ee.push(null);for(let I=1;I<=Pr(_,g);I++)ee.push(I);const q=f===64?20:f===32?14:f===40?16:18,P=Eo(x.language),R=I=>new Intl.DateTimeFormat(P,{year:"numeric"}).format(new Date(I,0,1)),S=(I,re)=>new Intl.DateTimeFormat(P,{month:"long"}).format(new Date(I,re-1,1)),H=fx(_,+v.slice(0,4),R,r,s),ne=Ju(_,S,r,s),te=I=>{const re=Ju(I,S,r,s);if(re.length===0)return;const he=re.some(ae=>+ae.value===g+1);m(I,he?g:+re[0].value-1)},[ue,se]=o.useState(null);o.useEffect(()=>{se(null)},[e]);const pe=o.useCallback(I=>{se(I);const re=hx(I);if(!re||r&&re<r||s&&re>s)return;n(re);const[he,ae]=re.split("-");m(+he,+ae-1)},[r,s,n,m]),G=o.useCallback(()=>{se(null)},[]),K=o.useCallback(I=>{I.key==="Enter"?(I.preventDefault(),G(),k(!1)):I.key==="Escape"?(G(),k(!1)):I.key==="ArrowDown"&&!j&&(I.preventDefault(),k(!0))},[G,k,j]),O=j?gn.createPortal(t.jsxs("div",{ref:V,id:A,className:"date-picker__dropdown",style:D,"data-tooltip-ignore":!0,role:"dialog","aria-label":C("datePicker.chooseDate","\uB0A0\uC9DC \uC120\uD0DD"),tabIndex:-1,children:[t.jsxs("div",{className:"date-picker__nav",children:[t.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:w,"aria-label":C("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:t.jsx(ll,{size:16,strokeWidth:2})}),t.jsxs("div",{className:"date-picker__nav-ym",children:[t.jsx(An,{className:"date-picker__nav-dropdown",ariaLabel:C("datePicker.selectYear","\uC5F0 \uC120\uD0DD"),options:H,value:String(_),onChange:I=>te(+I),size:40}),t.jsx(An,{className:"date-picker__nav-dropdown",ariaLabel:C("datePicker.selectMonth","\uC6D4 \uC120\uD0DD"),options:ne,value:String(g+1),onChange:I=>m(_,+I-1),size:40})]}),t.jsx("button",{type:"button",className:"date-picker__nav-btn",onClick:N,"aria-label":C("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:t.jsx(il,{size:16,strokeWidth:2})})]}),t.jsxs("div",{className:"date-picker__grid",ref:T,onKeyDown:ie,children:[b.map(I=>t.jsx("div",{className:"date-picker__dow caption-1",children:I},I)),ee.map((I,re)=>{if(I===null)return t.jsx("div",{},`e${re}`);const he=pr(_,g,I),ae=he===e,_e=he===v,De=L(I),Se=re%7;return t.jsx("button",{type:"button",disabled:De,"data-day":I,tabIndex:I===J?0:-1,"aria-current":_e?"date":void 0,onClick:()=>!De&&Q(I),className:ke("date-picker__day caption-1",ae&&"date-picker__day--selected",_e&&!ae&&"date-picker__day--today",De&&"date-picker__day--disabled",Se===0&&"date-picker__day--sun",Se===6&&"date-picker__day--sat"),children:I},I)})]})]}),document.body):null;return t.jsxs("div",{className:ke("date-picker",`date-picker--s${f}`,j&&"date-picker--open",u),children:[t.jsxs("div",{className:"date-picker__field",children:[t.jsx("input",{ref:$,type:"text",className:"date-picker__trigger body-2",value:ue??px(e),placeholder:y,onChange:I=>pe(I.target.value),onClick:()=>!l&&!j&&E(),onKeyDown:K,onBlur:G,disabled:l,"aria-haspopup":"dialog","aria-expanded":j,"aria-label":p,"aria-labelledby":h,inputMode:"numeric",autoComplete:"off"}),t.jsx("button",{type:"button",className:"date-picker__icon-btn",onClick:()=>!l&&E(),disabled:l,tabIndex:-1,"aria-label":y,"aria-haspopup":"dialog","aria-expanded":j,children:t.jsx(gl,{size:q,className:"date-picker__icon",strokeWidth:1.5})})]}),O]})}const ec=["personal","sensitive","marketing"];function Cx({takenKinds:e,busy:n,today:a,onClose:r,onSubmit:s,className:l}){const{t:i}=Ee.useTranslation(),[u]=o.useState(()=>wr(a)),[c,p]=o.useState([]),[h,d]=o.useState("paper"),[f,C]=o.useState("self"),[x,y]=o.useState(u),[b,v]=o.useState(""),_=ec.filter(w=>!e.includes(w)),g={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 t.jsx(qn,{title:i("customers.consent.record","\uB3D9\uC758 \uBC1B\uAE30"),closeDisabled:n,onClose:r,className:l,footer:()=>t.jsx(be,{htmlType:"button",size:48,variant:"main",disabled:n||c.length===0,label:i("customers.consent.submit","\uC800\uC7A5\uD558\uAE30"),onClick:()=>s({kinds:c,method:h,source:f,consentedAt:x||null,note:b.trim()||null})}),children:t.jsxs(dr,{useBorder:!1,labelWidth:96,children:[t.jsx(fn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.kinds","\uBC1B\uC740 \uAC08\uB798"),children:t.jsxs("div",{className:"consent-record-popup__kinds",children:[_.map(w=>t.jsx(ns,{checked:c.includes(w),disabled:n,label:g[w],onChange:N=>p(m=>N?[...m,w]:m.filter(A=>A!==w))},w)),_.length===0&&t.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.")})]})}),t.jsx(fn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.methodTitle","\uBC1B\uC740 \uBC29\uBC95"),children:t.jsx(kn,{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:w=>d(String(w))})}),t.jsx(fn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.sourceTitle","\uC218\uC9D1 \uCD9C\uCC98"),children:t.jsx(kn,{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:f,onChange:w=>C(String(w))})}),t.jsx(fn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.day","\uBC1B\uC740 \uB0A0"),children:t.jsx(Qu,{size:48,value:x,max:u,today:a,onChange:w=>y(w??"")})}),t.jsx(fn,{variant:"custom",useFullWidth:!0,label:i("customers.consent.note","\uBA54\uBAA8"),children:t.jsx(na,{size:48,fullWidth:!0,value:b,onChange:v,disabled:n,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 as({page:e,totalPages:n,onChange:a,prevLabel:r,nextLabel:s,className:l=""}){const{t:i}=Ee.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,n),h=()=>a(Math.max(1,Math.min(p,e-1))),d=()=>a(Math.min(p,e+1));return t.jsxs("div",{className:ke("pagination",l),children:[t.jsx(be,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-left",ariaLabel:u,disabled:e<=1,onClick:h}),t.jsxs("span",{className:"pagination__info body-3","aria-live":"polite","aria-atomic":"true",children:[Math.min(Math.max(1,e),p)," / ",p]}),t.jsx(be,{htmlType:"button",size:32,type:"dot",shape:"rounded",icon:"chevron-right",ariaLabel:c,disabled:e>=n,onClick:d})]})}function rs({count:e,search:n,segment:a,filters:r,pageSize:s,pagination:l,actions:i,className:u}){const c=_n()??mn,{t:p}=Ee.useTranslation(),h=e!=null&&t.jsxs("p",{className:"toolbar__count body-1",role:"status","aria-atomic":"true",children:[e.prefix??p("common.totalPrefix","\uCD1D "),t.jsx("span",{className:"toolbar__count-highlight",children:e.value}),e.unit,e.suffix]}),d=!!(n||r?.length||s||l||i);return t.jsxs("div",{className:ke("toolbar",u),children:[t.jsxs("div",{className:"toolbar__row",children:[h,a&&(Array.isArray(a)?a:[a]).map((f,C)=>t.jsx(kn,{size:c,...f},f.ariaLabel??C))]}),d&&t.jsx("div",{className:"toolbar__row",children:t.jsxs("div",{className:"toolbar__row-end",children:[n&&t.jsx(na,{className:"toolbar__search",size:c,value:n.value,onChange:n.onChange,placeholder:n.placeholder??p("common.search","\uAC80\uC0C9"),ariaLabel:n.placeholder??p("common.search","\uAC80\uC0C9"),autoFocus:n.autoFocus,clearable:!0}),r?.map((f,C)=>t.jsx(An,{size:c,options:f.options,value:f.value,onChange:f.onChange,ariaLabel:f.ariaLabel},C)),(s||l)&&t.jsxs("div",{className:"toolbar__pager",children:[s&&t.jsx(An,{size:c,options:s.options,value:s.value,onChange:s.onChange,ariaLabel:s.ariaLabel??p("common.pageSizeSelect","\uD398\uC774\uC9C0\uB2F9 \uD45C\uC2DC \uAC1C\uC218")}),l&&t.jsx(as,{page:l.page,totalPages:l.total,onChange:l.onChange,prevLabel:l.prevLabel,nextLabel:l.nextLabel})]}),i]})})]})}function tc(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(tc).join(""):""}function gx(e){let n=e.replace(/\r\n/g,`
830
830
  `).replace(/\r/g,`
831
- `);n=n.replace(/^\n+/,"").replace(/\n+$/,"");const r=n.split(`
832
- `).map(l=>l.replace(/\t/g," ")),a=r.filter(l=>l.trim().length>0),s=a.length>0?Math.min(...a.map(l=>l.match(/^ */)?.[0].length??0)):0;return r.map(l=>l.slice(s)).join(`
833
- `)}const bx=new Set(["pnpm","npm","yarn","node","git","curl","docker","cat","ls","cd","rm","mv","cp","echo","export"]),yx=/^(?: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 vx(e,n){let r=e;const a=[],s=/^(?:sh|bash|zsh|shell|console)$/.test(n.toLowerCase()),l=(i,c)=>a.push({type:i,content:c});for(;r.length>0;){const i=r.match(/^\s+/);if(i){l("whitespace",i[0]),r=r.slice(i[0].length);continue}if(!s&&r.startsWith("//")){const x=r.indexOf(`
834
- `),y=x===-1?r:r.slice(0,x);l("comment",y),r=r.slice(y.length);continue}if(s&&r.startsWith("#")){const x=r.indexOf(`
835
- `),y=x===-1?r:r.slice(0,x);l("comment",y),r=r.slice(y.length);continue}const c=r.match(/^\/\*[\s\S]*?\*\//);if(c){l("comment",c[0]),r=r.slice(c[0].length);continue}const u=r.match(/^(`(?:\\.|[^`])*`|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*')/);if(u){l("string",u[0]),r=r.slice(u[0].length);continue}const p=r.match(/^\d+(?:\.\d+)?/);if(p){l("number",p[0]),r=r.slice(p[0].length);continue}const h=r.match(yx);if(h){l("keyword",h[0]),r=r.slice(h[0].length);continue}const d=r.match(/^[A-Za-z_$][A-Za-z0-9_$-]*/);if(d){const x=d[0];l(s&&bx.has(x)?"command":"identifier",x),r=r.slice(x.length);continue}const m=r.match(/^[=+\-*/%<>!&|^~?:]+/);if(m){l("operator",m[0]),r=r.slice(m[0].length);continue}const C=r.match(/^[()[\]{};.,]/);if(C){l("punctuation",C[0]),r=r.slice(1);continue}l("other",r[0]),r=r.slice(1)}return a}function xx({children:e,language:n="bash",title:r="",showCopy:a=!0,size:s="default",className:l=""}){const{t:i}=Ee.useTranslation(),[c,u]=o.useState(!1),p=gx(tc(e)),h=o.useRef(null);o.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const d=async()=>{try{if(!await fg(p))return;u(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>u(!1),2e3)}catch{}},m=vx(p,n),C=s==="small"?"caption-1":"body-3";return t.jsxs("div",{className:ke("code-box",s==="small"?"code-box--small":"",l),children:[(r||a)&&t.jsxs("div",{className:"code-box__header",role:"toolbar","aria-label":i("common.codeBlock","\uCF54\uB4DC \uBE14\uB85D"),children:[t.jsx("div",{className:"code-box__title caption-1",children:r}),a&&t.jsx(ye,{htmlType:"button",className:"code-box__copy",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:c?"check":"copy",onClick:d,ariaLabel:c?i("common.copied","\uBCF5\uC0AC\uB428"):i("common.copyCode","\uCF54\uB4DC \uBCF5\uC0AC")})]}),t.jsx("pre",{className:"code-box__inner","data-lang":n,children:t.jsx("code",{children:m.map((x,y)=>t.jsx("span",{className:`code-token ${x.type} ${C}`,children:x.content},y))})})]})}function _x({count:e,actions:n,onClear:r,clearLabel:a,visible:s,content:l,max:i}){const c=_n()??mn,{t:u}=Ee.useTranslation(),p=s!==void 0?s:e>0,h=a??u("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),d=o.useRef(null),m=o.useRef(null),C=o.useRef(null),x=o.useRef(p);o.useLayoutEffect(()=>{const g=m.current,w=x.current;if(x.current=p,p&&!w){const N=typeof document<"u"?document.activeElement:null;C.current=N&&N!==document.body&&!g?.contains(N)?N:null}else!p&&w&&g&&g.contains(document.activeElement)&&Na(g,C.current)},[p]);const[y,b]=o.useState(!1),v=o.useRef(!1),_=o.useRef(null);return o.useEffect(()=>{const g=d.current;if(!g)return;const w=k=>{v.current=k,b(k)},N=()=>{const k=g.firstElementChild??g,j=Array.from(k.children);if(j.length<2){w(!1);return}const S=j[0].offsetTop,$=j.some(z=>z.offsetTop!==S);if(!v.current){_.current=g.clientWidth,$&&w(!0);return}if($)return;const V=j[0],F=j[j.length-1],U=F.offsetLeft+F.offsetWidth-V.offsetLeft,T=_.current;(T==null||U<=T)&&w(!1)};if(N(),typeof ResizeObserver>"u")return;const f=new ResizeObserver(N);f.observe(g);const A=g.parentElement;let B=A?.clientWidth??0;const E=new ResizeObserver(()=>{const k=A?.clientWidth??0;k!==B&&(B=k,_.current=null,N())});return A&&E.observe(A),()=>{f.disconnect(),E.disconnect()}},[l,e]),t.jsxs("div",{ref:m,className:`bulk-bar ${p?"bulk-bar--visible":""}`,inert:!p||void 0,"aria-hidden":p?void 0:!0,children:[t.jsx("span",{ref:d,className:"bulk-bar__count body-2",role:"status",children:l??t.jsx("b",{children:u("common.selectedCount",{count:e})})}),i!==void 0&&t.jsx(un,{size:"small",fill:"soft",variant:"main",label:`${e} / ${i}`,"aria-label":u("common.selectedOfMax",{count:e,max:i,defaultValue:`\uCD5C\uB300 ${i}\uAC1C \uC911 ${e}\uAC1C`})}),t.jsxs("div",{className:`bulk-bar__actions${y?" bulk-bar__actions--stacked":""}`,children:[t.jsx(ye,{htmlType:"button",size:c,label:h,onClick:r}),n.map((g,w)=>t.jsx(ye,{htmlType:"button",size:c,variant:g.variant??"default",icon:g.icon,label:g.label,onClick:g.onClick},w))]})]})}const wx=[{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 Bx(e){const{onClose:n,className:r}=e;return t.jsx("div",{className:ke("item-actions",r),children:wx.map(({key:a,icon:s,closeFirst:l})=>{const i=e[a];if(!i)return null;const c=a==="publish"?i.published?i.unpublish:i.publish:i;return t.jsx(ye,{htmlType:"button",size:40,type:"dot",icon:s,ariaLabel:c.label,showTooltipInfo:c.label,onClick:()=>{l&&n(),c.onClick()}},a)})})}function kx({items:e,className:n,ariaLabel:r="\uC54C\uB9BC \uAE00",titleLevel:a=4,targetBytes:s}){const l=a?`h${a}`:"div";return t.jsx("div",{className:`notify-text-preview${n?` ${n}`:""}`,role:"group","aria-label":r,children:e.map(i=>{const c=s===void 0?ei(i.sms):ei(i.sms,s),u=c.type==="LMS";return t.jsxs("section",{className:"notify-text-preview__item",children:[t.jsxs("header",{className:"notify-text-preview__head",children:[t.jsx(l,{className:"notify-text-preview__name h5b",children:i.name}),i.meta&&Object.keys(i.meta).length>0?t.jsx("dl",{className:"notify-text-preview__meta caption-1",children:Object.entries(i.meta).map(([p,h])=>t.jsxs("div",{className:"notify-text-preview__meta-row",children:[t.jsx("dt",{children:p}),t.jsx("dd",{children:h})]},p))}):null]}),t.jsxs("div",{className:"notify-text-preview__body",children:[t.jsxs("div",{className:"notify-text-preview__col",children:[t.jsxs("div",{className:"notify-text-preview__col-head caption-1",children:[t.jsx("span",{children:"\uBB38\uC790"}),t.jsxs("span",{className:`notify-text-preview__bytes${u?" is-over":c.overTarget?" is-over-target":""}`,title:c.over?`${c.limit}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uBCF4\uB0BC \uB54C \uC798\uB9B0\uB2E4`:u?`${Jl}\uBC14\uC774\uD2B8\uB97C \uB118\uC5B4 \uC7A5\uBB38\uC774\uB2E4 \u2014 \uD55C \uD1B5 \uAC12\uC774 \uB2E8\uBB38\uC758 \uB450 \uBC30 \uBC18\uC774\uB2E4`:c.overTarget?`\uACA8\uB204\uB294 ${c.target}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uD55C \uAE00\uC790\uB9CC \uB298\uC5B4\uB3C4 ${Jl}\uC744 \uB118\uC5B4 \uC7A5\uBB38\uC774 \uB41C\uB2E4`:void 0,children:[c.bytes,c.target!==null?` / \uBAA9\uD45C ${c.target}`:"","\uBC14\uC774\uD2B8 \xB7 ",u?"\uC7A5\uBB38":"\uB2E8\uBB38",c.over?" \xB7 \uD55C\uACC4 \uB118\uC74C":u?" \xB7 \uAC12\uC774 \uB450 \uBC30 \uBC18":c.overTarget?" \xB7 \uBAA9\uD45C \uB118\uC74C":""]})]}),t.jsx("pre",{className:"notify-text-preview__text",children:i.sms})]}),i.ata?t.jsxs("div",{className:"notify-text-preview__col",children:[t.jsx("div",{className:"notify-text-preview__col-head caption-1",children:t.jsx("span",{children:"\uC54C\uB9BC\uD1A1"})}),t.jsx("pre",{className:"notify-text-preview__text",children:i.ata})]}):null]})]},i.name)})})}function nc({children:e,className:n}){const r=o.useRef(null),[a,s]=o.useState(null);return o.useEffect(()=>{s(r.current?.parentElement??null)},[]),o.useEffect(()=>{const l=r.current;if(!l||!a)return;const i=()=>{const u=typeof window<"u"&&window.getComputedStyle(l).position==="absolute"?Math.ceil(l.getBoundingClientRect().width):0;u>0?a.style.setProperty("--section-head-float-w",`${u}px`):a.style.removeProperty("--section-head-float-w")};if(i(),typeof ResizeObserver>"u")return()=>{a.style.removeProperty("--section-head-float-w")};const c=new ResizeObserver(()=>i());return c.observe(l),c.observe(a),()=>{c.disconnect(),a.style.removeProperty("--section-head-float-w")}},[a,e]),t.jsx("div",{ref:r,className:ke("section-head-float",n),children:e})}function os({items:e,className:n}){return t.jsx("div",{className:le(n?`chart-section__legend ${n}`:"chart-section__legend"),children:e.map((r,a)=>t.jsxs("span",{className:le("chart-section__legend-item"),children:[t.jsx("span",{className:le("chart-section__legend-dot"),style:{background:r.color}}),r.label]},a))})}const pr=e=>`chart-section__total__num ${e?"h1":"h0"}`;function jr({label:e,children:n}){return e?t.jsxs("div",{className:le("chart-section__total chart-section__total--stacked"),children:[t.jsx("span",{className:le("chart-section__total__label body-3"),children:e}),t.jsx("span",{className:le("chart-section__total__value"),children:n})]}):t.jsx("div",{className:le("chart-section__total"),children:n})}const rc=20,Fa=120,Ax=120,Nx={xSmall:Fa,small:Fa,medium:Fa*2+rc,large:Fa*2+rc},ac={xSmall:"chart-section--compact chart-section--xsmall",small:"chart-section--compact",medium:"chart-section--compact",xLarge:"chart-section--full"},ha=e=>{const n=parseFloat(e);return Number.isFinite(n)?n:0};function Ex(e){if(!e)return 0;const n=Array.from(e.children);if(!n.length)return 0;const r=ha(getComputedStyle(e).columnGap);return n.reduce((a,s)=>a+s.getBoundingClientRect().width,0)+r*(n.length-1)}function Ia({type:e="chart",title:n,titleClassName:r,titleLevel:a,icon:s,disc:l,headRight:i,headFloat:c,headSegment:u,headMenuItems:p,collapseBelow:h=420,onClick:d,ariaLabel:m,tooltip:C,totalNum:x,totalUnit:y,totalMuted:b=!1,totalLabel:v,change:_,changeType:g,size:w,bodyAlign:N="bottom",subRow:f,legend:A,subRowAlign:B="start",className:E,inGrid:k=!1,fitBody:j=!1,children:S}){const $=e==="stat",V=w??($?"small":"large"),F=V==="xSmall"&&$,[U,T]=o.useState(!0),z=V==="xSmall"?F&&U?"xSmall":"small":V,W=F&&!U,ie=z==="xSmall",Q=z==="xSmall"||z==="small"||z==="medium",L=r??"h5",J=a??($?0:3),{t:ee}=Ee.useTranslation(),q=o.useRef(null),{anchorRect:P,openAt:R,close:D}=Ma(),H=o.useCallback(()=>{C&&q.current&&R(q.current)},[C,R]),[ne,te]=o.useState(!1);ca(()=>{const Oe=q.current;if(!Oe||!u)return;const Ue=ce=>te(ce>0&&ce<h);if(Ue(Oe.clientWidth),typeof ResizeObserver>"u")return;const rt=new ResizeObserver(ce=>Ue(ce[0].contentRect.width));return rt.observe(Oe),()=>rt.disconnect()},[u,h]);const[ue,se]=o.useState(null),pe=o.useCallback(()=>se(null),[]),G=o.useCallback(Oe=>{const Ue=Oe.currentTarget.getBoundingClientRect();se(rt=>rt?null:{left:Ue.left,right:Ue.right,top:Ue.top,bottom:Ue.bottom,width:Ue.width,height:Ue.height,x:Ue.x,y:Ue.y})},[]),K=!!u&&ne;o.useEffect(()=>{K||se(null)},[K]);const O=u?[...u.options.map(Oe=>({label:Oe.label,icon:Oe.icon,selected:Oe.key===u.value,disabled:Oe.disabled,onClick:()=>u.onChange(Oe.key),closeOnSelect:!0})),...(p??[]).map((Oe,Ue)=>Ue===0?{...Oe,separatorBefore:!0}:Oe)]:[],I=o.useCallback(Oe=>{if(!d)return;const Ue=Oe.target;Ue&&typeof Ue.closest=="function"&&Ue.closest('button, a, input, select, textarea, [role="radiogroup"]')||d()},[d]),ae=o.useCallback(Oe=>{d&&Oe.target===Oe.currentTarget&&(Oe.key==="Enter"||Oe.key===" ")&&(Oe.preventDefault(),d())},[d]),he=typeof i=="function"?i({collapsed:K}):i,re=x!=null||v?t.jsxs(jr,{label:v,children:[x!=null&&t.jsx("span",{className:le(pr(Q)),children:x}),y&&t.jsx("span",{className:le("chart-section__total__unit body-3"),children:y})]}):null,_e=he||u?t.jsxs("div",{className:le("chart-section__head-right"),children:[u&&(K?t.jsx(ye,{htmlType:"button",size:dr,type:"dot",icon:"ellipsis",ariaLabel:u.ariaLabel??ee("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:u.ariaLabel??ee("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!ue,onClick:G}):t.jsx(Bn,{size:dr,ariaLabel:u.ariaLabel,options:u.options.map(Oe=>({key:Oe.key,label:Oe.label,disabled:Oe.disabled})),value:u.value,onChange:u.onChange})),he]}):null,De=o.useRef(null),[Se,Ne]=o.useState(null);o.useLayoutEffect(()=>{const Oe=De.current;if(!Oe){Ne(null);return}const Ue=()=>{const ce=Oe.getBoundingClientRect().height;Ne(Pe=>Pe!=null&&Math.abs(Pe-ce)<1?Pe:ce)};if(Ue(),typeof ResizeObserver>"u")return;const rt=new ResizeObserver(Ue);return rt.observe(Oe),()=>rt.disconnect()},[A]);const He=o.useId(),ve=J?`h${J}`:"div",xe=typeof z=="number"?z:Nx[z],we=g??(_===void 0?void 0:_>0?"up":_<0?"down":"neutral"),Ae=_===void 0?void 0:_>0?`+${_}`:`${_}`,Ie=o.useRef(null),ot=o.useRef(null);ca(()=>{if(!F)return;const Oe=q.current;if(!Oe||typeof getComputedStyle!="function")return;const Ue=()=>{const ce=getComputedStyle(Oe),Pe=ha(ce.paddingLeft)+ha(ce.paddingRight)+ha(ce.borderLeftWidth)+ha(ce.borderRightWidth),Ye=Ax-Pe,Qe=Math.max(Ie.current?.getBoundingClientRect().width??0,Ex(ot.current));!(Ye>0)||!(Qe>0)||T(Qe<=Ye+.5)};if(Ue(),typeof ResizeObserver>"u")return;const rt=new ResizeObserver(Ue);return Ie.current&&rt.observe(Ie.current),ot.current&&rt.observe(ot.current),()=>rt.disconnect()},[F,n,x,y,Ae]);const pt=C&&P?t.jsx(zn,{anchorRect:{left:P.left,top:P.top+21,right:P.right,bottom:P.bottom,width:P.width,height:P.height},text:C}):null;return $?t.jsxs("div",{ref:q,className:le(["chart-section","chart-section--stat",k&&"chart-section--grid",N==="center"&&"chart-section--body-center",typeof z=="string"&&ac[z],W&&"chart-section--span-two",d&&"chart-section--clickable",E].filter(Boolean).join(" ")),style:xe===void 0?void 0:{minHeight:xe},onClick:d?I:void 0,onKeyDown:d?ae:void 0,onPointerEnter:C?H:void 0,onPointerLeave:C?D:void 0,onFocus:C?H:void 0,onBlur:C?D:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?m??[typeof n=="string"?n:void 0,x,Ae].filter(Oe=>Oe!=null&&Oe!=="").join(" "):void 0,"aria-labelledby":!d&&n!=null?He:void 0,children:[pt,t.jsxs("div",{className:le("chart-section__head"),children:[t.jsx(ve,{id:He,className:le(["chart-section__title",L].filter(Boolean).join(" ")),children:n}),F&&t.jsx("div",{ref:Ie,"aria-hidden":"true",className:le(["chart-section__title",L,"chart-section__title--probe"].filter(Boolean).join(" ")),children:n}),s&&!ie&&t.jsx("span",{className:le("chart-section__head-icon"),children:t.jsx(dt,{icon:s,className:le("chart-section__head-icon-inner")})})]}),t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:ot,className:le("chart-section__sub-row"),children:[t.jsxs(jr,{children:[t.jsx("span",{className:le([pr(!0),b&&"chart-section__total__num--muted"].filter(Boolean).join(" ")),children:x}),y&&t.jsx("span",{className:le("chart-section__total__unit body-3"),children:y})]}),Ae&&t.jsx("div",{className:le(`chart-section__change chart-section__change--${we??"neutral"} caption-1`),children:Ae})]}),S&&t.jsx("div",{className:le("chart-section__body"),children:S})]})]}):t.jsxs("section",{ref:q,className:le(["chart-section",k&&"chart-section--grid",j&&"chart-section--fit",typeof z=="string"&&ac[z],d&&"chart-section--clickable",E].filter(Boolean).join(" ")),style:{...xe===void 0?null:j?{minHeight:xe,height:xe}:{minHeight:xe},...Se==null?null:{"--legend-h":`${Se}px`}},onClick:d?I:void 0,onKeyDown:d?ae:void 0,onPointerEnter:C?H:void 0,onPointerLeave:C?D:void 0,onFocus:C?H:void 0,onBlur:C?D:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?m??(typeof n=="string"?n:void 0):void 0,"aria-labelledby":!d&&n!=null?He:void 0,children:[C&&P&&t.jsx(zn,{anchorRect:{left:P.left,top:P.top+21,right:P.right,bottom:P.bottom,width:P.width,height:P.height},text:C}),c&&t.jsx(nc,{children:c}),t.jsxs("div",{className:le("chart-section__head"),children:[t.jsxs("div",{className:le("chart-section__title-row"),children:[s&&t.jsx(dt,{icon:s,label:typeof n=="string"?n:void 0,className:le("chart-section__icon")}),t.jsx(ve,{id:He,className:le(["chart-section__title",L].filter(Boolean).join(" ")),children:n})]}),_e,l&&t.jsx("div",{className:le("chart-section__disc body-3"),children:l})]}),(re||f)&&t.jsxs("div",{className:le(["chart-section__sub-row",B!=="start"&&`chart-section__sub-row--${B}`].filter(Boolean).join(" ")),children:[re,f]}),A&&t.jsx("div",{ref:De,className:le("chart-section__legend-slot"),children:A}),S,ue&&t.jsx(En,{anchorRect:ue,onClose:pe,ariaLabel:u?.ariaLabel??ee("tooltip.menu","\uBA54\uB274"),children:t.jsx(ta,{columns:[{items:O}],onClose:pe,size:"small"})})]})}const ma=(e,n)=>`${e}-${String(n).padStart(2,"0")}`,ss=e=>ma(e.getFullYear(),e.getMonth()+1);function Dr(e){const n=/^(\d{4})-(\d{2})$/.exec(e);if(!n)return null;const r=Number(n[2]);return r>=1&&r<=12?{year:Number(n[1]),month1:r}:null}const ls=(e,n)=>`${e}#${n}`;function Rn(e,n){const r=new Date(e,n,1).getDay();return 1+(8-(r===0?7:r))%7}function jx(){const e=wr();let n=e.getFullYear(),r=e.getMonth(),a=e.getDate();if(a<Rn(n,r)){const i=new Date(n,r,0);n=i.getFullYear(),r=i.getMonth(),a=i.getDate()}const s=Math.floor((a-Rn(n,r))/7),l=ma(n,r+1);return{monthKey:l,value:ls(l,s)}}function Dx(e){const n=wr(),r=ss(n),a=(u,p)=>ma(u,p+1),s=new Map;s.set(r,[]);for(const u of e){if(isNaN(u.date.getTime()))continue;const p=a(u.date.getFullYear(),u.date.getMonth());s.has(p)||s.set(p,[]),s.get(p).push(u)}for(const[u,p]of[...s.entries()]){const h=Dr(u);if(!h)continue;const d=h.year,m=h.month1-1,C=Rn(d,m);if(!(u===r&&n.getDate()<C)&&!p.some(b=>b.date.getDate()<C))continue;const x=new Date(d,m,0),y=a(x.getFullYear(),x.getMonth());s.has(y)||s.set(y,[])}const l=new Map;for(const[u,p]of s){const h=Dr(u);if(!h)continue;const d=h.year,m=h.month1-1,C=new Date(d,m+1,0).getDate(),x=p.reduce((w,N)=>Math.max(w,N.parts?.length??0,N.partsB?.length??0),0),y=p.some(w=>w.partsB),b=new Array(C+1).fill(0),v=new Array(C+1).fill(0),_=Array.from({length:C+1},()=>new Array(x).fill(0)),g=Array.from({length:C+1},()=>new Array(x).fill(0));for(const w of p){const N=w.date.getDate();if(b[N]+=w.a,v[N]+=w.b,w.parts)for(let f=0;f<x;f++)_[N][f]+=w.parts[f]??0;if(w.partsB)for(let f=0;f<x;f++)g[N][f]+=w.partsB[f]??0}l.set(u,{year:d,month:m,daysInMonth:C,partsLen:x,hasPartsB:y,dayA:b,dayB:v,dayParts:_,dayPartsB:g})}const i=(u,p,h)=>new Date(u,p,h).getTime()>new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime(),c={};for(const[u,p]of l){const{year:h,month:d,daysInMonth:m,dayA:C,dayB:x,dayParts:y,dayPartsB:b}=p,v=h===n.getFullYear()&&d===n.getMonth(),_=n.getDate(),g=l.get(a(d===11?h+1:h,(d+1)%12)),w=p.partsLen,N=[];for(let A=1;A<=m;A++){const B=v&&A>_;N.push({label:String(A),...B&&C[A]===0&&x[A]===0?{future:!0}:{},a:B&&C[A]===0&&x[A]===0?-1:C[A],b:x[A],...w?{parts:y[A]}:{},...w&&p.hasPartsB?{partsB:b[A]}:{}})}const f=[];for(let A=Rn(h,d);A<=m;A+=7){const B=Math.max(0,A+6-m),E=B&&g?Math.max(w,g.partsLen):w,k=p.hasPartsB||!!(B&&g?.hasPartsB);let j=0,S=0;const $=new Array(E).fill(0),V=new Array(E).fill(0);for(let U=A;U<=Math.min(A+6,m);U++){j+=C[U],S+=x[U];for(let T=0;T<w;T++)$[T]+=y[U][T],V[T]+=b[U][T]}if(B&&g)for(let U=1;U<=B&&!i(g.year,g.month,U);U++){j+=g.dayA[U],S+=g.dayB[U];for(let T=0;T<g.partsLen;T++)$[T]+=g.dayParts[U][T],V[T]+=g.dayPartsB[U][T]}const F=B?`${(d+1)%12+1}/${B}`:`${A+6}`;f.push({label:`${f.length+1}\uC8FC`,sublabel:`[${A}\uC77C~${F}\uC77C]`,a:j,b:S,...E?{parts:$}:{},...E&&k?{partsB:V}:{}})}c[u]={weekly:f,daily:N}}return c}function oc(){const e=wr(),n=e.getFullYear(),r=e.getMonth()+1,a=[];for(let s=2024;s<=n;s++){const l=s===n?r:12;for(let i=1;i<=l;i++)a.push({value:ma(s,i),year:s,month:i})}return a.reverse()}oc();function Sx(){return oc()}function sc(e,n){const r=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),a=Array.isArray(r)&&typeof r[n]=="string"?r[n]:null;return e("calendar.weekLabel",{ord:a??String(n+1)})}function Tx(e,n){const r=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),a=(Array.isArray(r)&&typeof r[n]=="string"?r[n]:null)??String(n+1);return e("calendar.weekLabelCompact",{ord:a,defaultValue:""})||sc(e,n)}function lc(e){const{t:n,i18n:r}=Ee.useTranslation(),[a,s]=o.useState("week"),l=o.useMemo(()=>Sx().filter(k=>k.value in e),[e]),i=o.useMemo(()=>{const k=[];for(const j of l){const S=new Date(j.year,j.month,0).getDate(),$=Rn(j.year,j.month-1),V=Math.ceil((S-$+1)/7);for(let F=V-1;F>=0;F--)k.push({value:ls(j.value,F),monthKey:j.value,year:j.year,month:j.month,week:F})}return k},[l]),c=o.useCallback((k,j)=>n("calendar.yearMonthCompact",{year:k,month:j,full:ci(n,r.language,k,j),short:ug(k,j,r.language),defaultValue:"{{full}}"}),[n,r.language]),u=o.useCallback(k=>`${c(k.year,k.month)} ${Tx(n,k.week)}`,[n,c]),p=o.useMemo(()=>l.map(k=>({value:k.value,label:c(k.year,k.month)})),[c,l]),h=o.useMemo(()=>i.map(k=>({value:k.value,label:u(k)})),[i,u]),d=o.useMemo(()=>jx(),[e]),m=o.useMemo(()=>l.find(k=>k.value===d.monthKey)?.value??l[0]?.value??"",[l,d]),C=o.useMemo(()=>i.find(k=>k.value===d.value)?.value??i[0]?.value??"",[i,d]),[x,y]=o.useState(""),[b,v]=o.useState("");o.useEffect(()=>{l.find(k=>k.value===x)||y(m)},[l,x,m]),o.useEffect(()=>{i.find(k=>k.value===b)||v(C)},[i,b,C]);const _=a==="month"?p:h,g=a==="month"?x:b,w=a==="month"?y:v,N=o.useMemo(()=>{const k=n("calendar.dow",{returnObjects:!0});return Array.isArray(k)?k:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[n]),f=_.findIndex(k=>k.value===g),A=o.useCallback(()=>{const k=_.findIndex(j=>j.value===g);k<_.length-1&&w(_[k+1].value)},[_,g,w]),B=o.useCallback(()=>{const k=_.findIndex(j=>j.value===g);k>0&&w(_[k-1].value)},[_,g,w]),E=o.useMemo(()=>[{key:"week",label:n("manager.chart.periodWeek","\uC8FC")},{key:"month",label:n("manager.chart.periodMonth","\uC6D4")}],[n]);return{period:a,setPeriod:s,range:g,setRange:w,activeOptions:_,activeIdx:f,handlePrev:A,handleNext:B,periodOptions:E,monthRange:x,weekRange:b,weekRanges:i,DOW:N}}const Pt=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function Un(e,n=!0){return e.future===!0||n&&e.a===-1}function Mx({data:e,colorA:n,colorB:r,labelA:a,labelB:s,barWidth:l=10,barGap:i=1,height:c=140,fitHeight:u=!1,maxOverride:p,tightMax:h,seriesColors:d,seriesLabels:m,rateLabels:C,grouped:x=!1,baseline:y,focusableBars:b=!1}){const v=!r,_=!!(d&&d.length>0),g=y,w=o.useMemo(()=>_?Math.max(0,...e.filter(R=>!Un(R,g==null)).map(R=>x?Math.max(0,...(R.parts??[]).map(Pt)):(R.parts??[]).reduce((D,H)=>D+Math.max(0,Pt(H)),0))):Math.max(0,...e.filter(R=>!Un(R,g==null)).flatMap(R=>v?[Pt(R.a)]:[Pt(R.a),Pt(R.b)])),[e,v,_,x]),N=o.useMemo(()=>{if(g==null)return 0;const R=e.filter(D=>!Un(D,g==null)).flatMap(D=>_?(D.parts??[]).map(Pt):v?[Pt(D.a)]:[Pt(D.a),Pt(D.b)]);return Math.max(0,...R.map(D=>Math.abs(D-g)))},[e,g,_,v]),f=o.useMemo(()=>{const R=g!=null?N:w;return p??(h?R>0?R:10:Math.ceil(R/10)*10||10)},[w,N,g,p,h]),A=o.useRef(null),B=o.useRef(null),[E,k]=o.useState(null);o.useLayoutEffect(()=>{if(!u){k(null);return}const R=A.current;if(!R)return;const D=()=>{const ne=B.current,te=R.clientHeight-(ne?ne.getBoundingClientRect().height:0);te<=0||k(ue=>ue!=null&&Math.abs(ue-te)<1?ue:te)};if(D(),typeof ResizeObserver>"u")return;const H=new ResizeObserver(D);return H.observe(R),B.current&&H.observe(B.current),()=>H.disconnect()},[u]);const j=E??c,S=_?x?Math.max(1,d.length):1:v?1:2,$={"--bar-width":`${o.useMemo(()=>{const R=Math.max(1,e.length);return Math.max(2,Math.min(l,Math.round(120/(R*S)+6)))},[e.length,S,l])}px`},V={"--bar-group-gap":`${Math.max(0,i)}px`},F=o.useMemo(()=>{const R=Math.round(f/2);return g!=null?[g+f,...R!==f?[g+R]:[],g,...R!==f?[g-R]:[],g-f]:R!==f?[f,R,0]:[f,0]},[f,g]),U=R=>g!=null?1-(R-(g-f))/(2*f):1-R/f,T=14,z=o.useMemo(()=>{const R=new Set;let D=Number.NEGATIVE_INFINITY;for(const H of F.slice(0,-1)){const ne=(g!=null?1-(H-(g-f))/(2*f):1-H/f)*j;ne-D>=T&&(R.add(H),D=ne)}return R},[F,g,f,j]),[W,ie]=o.useState(null),Q=o.useCallback(()=>ie(null),[]),L=o.useCallback((R,D)=>{const H=[R.label,R.sublabel].filter(Boolean).join(" ");let ne;if(_&&x&&R.rawPartsB)ne=(m??[]).map((te,ue)=>{const se=R.rawPartsB[ue]??0;return{text:se>0?`${te}: ${D[ue]??0}% (${R.rawParts?.[ue]??0}/${se})`:`${te}: -`,color:(d??[])[ue]}});else if(_&&x)ne=(m??[]).map((te,ue)=>({text:`${te}: ${q(D[ue]??0)}`,color:(d??[])[ue]}));else if(_){const te=(m??[]).map((se,pe)=>({text:`${se}: ${D[pe]??0}`,color:(d??[])[pe]})),ue=te.filter((se,pe)=>(D[pe]??0)>0);ne=ue.length?ue:te}else C&&!v?ne=[{text:`${a} ${Pt(R.a)}%`,color:n},{text:`${s} ${Pt(R.b)}%`,color:r}]:C&&R.rawB!==void 0?ne=[{text:`${C.total} ${R.rawB}`},{text:`${C.done} ${R.rawA??0}`,color:n}]:v?ne=[{text:`${a}: ${Pt(R.a)}`,color:n}]:ne=[{text:`${a}: ${Pt(R.a)}`,color:n},{text:`${s}: ${Pt(R.b)}`,color:r}];return{title:H,items:ne}},[_,x,m,d,C,v,a,s,n,r,g]),J=o.useCallback((R,D,H)=>{const ne=R.getBoundingClientRect(),{title:te,items:ue}=L(D,H);ie({rect:{left:ne.left,top:ne.top,right:ne.right,bottom:ne.bottom,width:ne.width,height:ne.height},title:te,items:ue})},[L]),ee=o.useCallback((R,D)=>{const{title:H,items:ne}=L(R,D);return[H,...ne.map(te=>te.text)].filter(Boolean).join(", ")},[L]),q=R=>g!=null&&R>g?`+${R}`:`${R}`,P=W!=null;return o.useEffect(()=>{if(!P)return;const R=()=>ie(null),D=H=>{const ne=H.target;ne&&typeof ne.closest=="function"&&ne.closest(".bar-chart__col")||ie(null)};return window.addEventListener("scroll",R,!0),document.addEventListener("pointerdown",D,!0),()=>{window.removeEventListener("scroll",R,!0),document.removeEventListener("pointerdown",D,!0)}},[P]),t.jsxs("div",{ref:A,className:le("bar-chart__wrap"),style:V,children:[t.jsx("div",{className:le("bar-chart__inner"),children:t.jsx("div",{className:le("bar-chart__scroll"),children:t.jsxs("div",{className:le("bar-chart__area"),children:[t.jsxs("div",{className:le("bar-chart__plot"),style:{height:j},children:[F.slice(0,-1).map((R,D)=>t.jsx("div",{className:le(`bar-chart__gridline${g!=null&&R===g?" bar-chart__gridline--baseline":""}`),style:{top:U(R)*j},children:z.has(R)&&t.jsx("span",{className:le("bar-chart__gridline__label caption-1"),children:R})},D)),e.map((R,D)=>{const H=Un(R,g==null),ne=j/2,te=G=>g!=null?Math.min(ne,Math.abs(Pt(G)-g)/f*ne):Math.min(j,Math.max(0,Pt(G)/f*j)),ue=H?0:te(R.a),se=H?0:te(R.b),pe=(R.parts??[]).map(Pt);return t.jsx("div",{className:le(`bar-chart__col${x&&_?" bar-chart__col--group":""}`),style:{cursor:H?"default":"pointer"},tabIndex:b&&!H?0:void 0,role:b&&!H?"img":void 0,"aria-label":b&&!H?ee(R,pe):void 0,onMouseEnter:H?void 0:G=>J(G.currentTarget,R,pe),onFocus:H||!b?void 0:G=>J(G.currentTarget,R,pe),onBlur:b?Q:void 0,onMouseLeave:Q,children:!H&&(_&&x?(d??[]).map((G,K)=>{const O=pe[K]??0;if(g==null)return t.jsx("div",{className:le("bar-chart__bar"),style:{...$,height:te(O),background:G}},K);const I=Pt(O)<g;return t.jsxs("div",{className:le("bar-chart__slot"),style:$,children:[t.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--up"),children:!I&&t.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full"),style:{height:te(O),background:G}})}),t.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--down"),children:I&&t.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:te(O),background:G}})})]},K)}):_?t.jsx("div",{className:le("bar-chart__stack"),style:$,children:(()=>{const G=pe.reduce((O,I,ae)=>I>0?ae:O,-1);let K=j;return pe.map((O,I)=>{if(O<=0)return null;const ae=Math.min(K,O/f*j);return K-=ae,t.jsx("div",{className:le("bar-chart__stack-segment"),style:{height:ae,background:(d??[])[I],borderRadius:I===G?"6px 6px 0 0":void 0}},I)})})()}):g!=null?t.jsx(t.Fragment,{children:[{v:Pt(R.a),c:n},...v?[]:[{v:Pt(R.b),c:r}]].map(({v:G,c:K},O)=>t.jsxs("div",{className:le("bar-chart__slot"),style:$,children:[t.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--up"),children:G>=g&&t.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full"),style:{height:te(G),background:K}})}),t.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--down"),children:G<g&&t.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:te(G),background:K}})})]},O))}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:le("bar-chart__bar"),style:{...$,height:ue,background:n}}),!v&&t.jsx("div",{className:le("bar-chart__bar"),style:{...$,height:se,background:r}})]}))},D)})]}),t.jsx("div",{ref:B,className:le("bar-chart__x-axis"),children:e.map((R,D)=>{const H=Un(R,g==null);return t.jsxs("span",{className:le(`bar-chart__x-axis__label${H?" bar-chart__x-axis__label--future":""}`),children:[t.jsxs("span",{className:le("caption-1 bar-chart__x-axis__main"),children:[R.isToday&&t.jsx("span",{className:le("bar-chart__x-axis__today-dot"),style:{background:n}}),R.label]}),R.sublabel&&t.jsx("span",{className:"caption-1",children:R.sublabel})]},D)})})]})})}),W&&t.jsx(Qn,{anchorRect:W.rect,title:W.title,items:W.items,showIndex:!1,closeOnOutsideClick:!1})]})}function ic({control:e}){const{t:n}=Ee.useTranslation(),{activeOptions:r,activeIdx:a,range:s,setRange:l,handlePrev:i,handleNext:c,periodOptions:u,period:p,setPeriod:h}=e,d=p==="week"?n("calendar.prevWeek","\uC774\uC804 \uC8FC"):n("calendar.prevMonth","\uC774\uC804 \uB2EC"),m=p==="week"?n("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):n("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return t.jsxs("div",{className:le("chart-section__controls"),children:[t.jsx(ye,{htmlType:"button",size:dr,type:"dot",icon:"chevron-left",ariaLabel:d,showTooltipInfo:d,disabled:a===r.length-1,onClick:i}),t.jsx(kn,{value:s,onChange:l,options:r,size:dr,className:"month-dropdown",ariaLabel:n("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),t.jsx(ye,{htmlType:"button",size:dr,type:"dot",icon:"chevron-right",ariaLabel:m,showTooltipInfo:m,disabled:a<=0,onClick:c}),t.jsx(Bn,{ariaLabel:n("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:u,value:p,onChange:C=>h(C),size:dr})]})}function is(e,n,r,a=!0){const s=new Date(r.getFullYear(),r.getMonth(),r.getDate());return Array.from({length:7},(l,i)=>{const c=new Date(n);c.setDate(n.getDate()+i);const u=(e[ss(c)]?.daily??[])[c.getDate()-1],p=u!=null&&Un(u,a)||c>s;return{dt:c,entry:u,isFuture:p}})}function $x(e,n,r,a=!0){const{period:s,monthRange:l,weekRange:i,weekRanges:c,DOW:u}=n,p=wr(),h=p.getFullYear(),d=p.getMonth()+1,m=p.getDate();if(s==="month"){const y=e[l]??{weekly:[],daily:[]},b=Dr(l),v=b?b.year:null,_=b?b.month1:null,g=v&&_?Rn(v,_-1):1;return y.weekly.map((w,N)=>{const f=N+1;let A=w.label,B=!1,E=!1;if(v&&_){const k=g+N*7,j=new Date(v,_-1,k+6),S=j.getMonth()+1,$=j.getDate(),V=S===_?`${$}`:`${S}/${$}`;A=r("manager.chart.weekRange",{start:k,end:V});const F=new Date(h,d-1,m).getTime();B=F>=new Date(v,_-1,k).getTime()&&F<=j.getTime(),E=v>h||v===h&&(_>d||_===d&&k>m)}return{...w,label:A,sublabel:sc(r,f-1),isToday:B,future:w.future===!0||E||void 0,a:E?-1:w.a,b:E?0:w.b}})}const C=c.find(y=>y.value===i);if(!C)return[];const x=new Date(C.year,C.month-1,Rn(C.year,C.month-1)+C.week*7);return is(e,x,p,a).map(({dt:y,entry:b,isFuture:v})=>{const _=y.getMonth()+1,g=y.getDate(),w=y.getFullYear();return{label:_===C.month&&w===C.year?`${g}`:`${_}/${g}`,sublabel:u[y.getDay()]??"",future:v||void 0,a:v?-1:b&&b.a>0?b.a:0,b:v?0:b&&b.b>0?b.b:0,isToday:w===h&&_===d&&g===m,...b?.parts?{parts:v?b.parts.map(()=>0):b.parts}:{},...b?.partsB?{partsB:v?b.partsB.map(()=>0):b.partsB}:{}}})}const Lx={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function Rx({canvasHeight:e,fitHeight:n,focusableBars:r,size:a="medium",barWidth:s,titleKey:l,titleLevel:i,data:c,colorA:u,colorB:p,labelAKey:h,labelBKey:d,showTotal:m=!1,totalUnitKey:C,totalLabelKey:x,control:y,hideControls:b=!1,rate:v=!1,rateAgg:_="dayMean",tightMax:g=!1,avgMode:w=!1,totalFormat:N,series:f,seriesMode:A="stack",loading:B=!1,onDetail:E,headExtra:k,headSegment:j,icon:S,disc:$,onClick:V,cardAriaLabel:F,cardTooltip:U,detailSize:T=dr,barGap:z,baseline:W,className:ie,inGrid:Q=!1}){const{t:L}=Ee.useTranslation(),J={...Lx[a],...e===void 0?null:{height:e}},ee=lc(c),q=y??ee,P=o.useMemo(()=>$x(c,q,L,W==null),[c,q,L,W]),R=A==="group"&&!!f&&f.length>0;z!=null&&!R&&jt("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 D=o.useMemo(()=>{if(!v)return P;const O=q.period==="month"?Dr(q.monthRange):null,I=wr(),ae=f?.length??0,he=re=>{const _e=[],De=[],Se=[];for(let Ne=0;Ne<ae;Ne++){let He=0,ve=0,xe=0;for(const we of re){const Ae=Pt(we.a[Ne]),Ie=Pt(we.b[Ne]);Ie<=0||(He+=Ae,ve+=Ie,xe+=Ae/Ie*100)}_e.push(_==="weighted"?ve>0?Math.round(He/ve*100):0:re.length?Math.round(xe/re.length):0),De.push(He),Se.push(ve)}return{pct:_e,ra:De,rb:Se}};return P.map((re,_e)=>{let De=re.a===-1?-1:re.b>0?Math.round(re.a/re.b*100):0;if(O&&!Un(re)){const Ne=O.year,He=O.month1-1,ve=is(c,new Date(Ne,He,Rn(Ne,He)+_e*7),I).filter(xe=>!xe.isFuture);if(_==="weighted"){let xe=0,we=0;for(const{entry:Ae}of ve)Ae&&Ae.b>0&&(xe+=Ae.a,we+=Ae.b);De=we>0?Math.round(xe/we*100):0}else De=ve.length?Math.round(ve.reduce((xe,{entry:we})=>xe+(we&&we.b>0?we.a/we.b*100:0),0)/ve.length):0}let Se=null;if(R&&!Un(re)){let Ne;if(O){const ve=O.year,xe=O.month1-1;Ne=is(c,new Date(ve,xe,Rn(ve,xe)+_e*7),I).filter(we=>!we.isFuture).map(({entry:we})=>({a:we?.parts??[],b:we?.partsB??[]}))}else Ne=[{a:re.parts??[],b:re.partsB??[]}];const He=he(Ne);Se={parts:He.pct,rawParts:He.ra,rawPartsB:He.rb}}return{...re,a:De,b:re.a===-1?0:d&&re.parts&&re.parts[1]>0?Math.round(re.parts[0]/re.parts[1]*100):0,rawA:re.a===-1?-1:re.a,rawB:re.b,...Se??{}}})},[P,v,_,d,q.period,q.monthRange,c,R,f?.length]),H=o.useMemo(()=>{if(v||w){const I=(q.period==="week"?P:c[q.monthRange]?.daily??[]).filter(he=>he.a!==-1);if(I.length===0)return 0;if(v&&_==="weighted"){let he=0,re=0;for(const _e of I)_e.b>0&&(he+=_e.a,re+=_e.b);return re>0?Math.round(he/re*100):0}const ae=v?I.reduce((he,re)=>he+(re.b>0?re.a/re.b*100:0),0):I.reduce((he,re)=>he+(re.a>0?re.a:0),0);return Math.round(ae/I.length)}const O=q.period==="month"?c[q.monthRange]?.daily??[]:D;return W!=null?O.reduce((I,ae)=>I+(Un(ae,!1)?0:Pt(ae.a)+(d?Pt(ae.b):0)),0):O.reduce((I,ae)=>I+(ae.a>0?ae.a:0)+(d&&ae.b>0?ae.b:0),0)},[D,P,v,_,w,W,d,q.period,q.monthRange,c]),ne=f&&f.length>0?f.map(O=>({color:O.color,label:O.label})):[{color:u,label:L(h)},...d?[{color:p,label:L(d)}]:[]],te=a==="small",ue=a==="large",se=te?"medium":ue?"xLarge":"large",pe=ie||void 0,G=l?L(l):"",K=G?L("trainingStatus.detailFor",{name:G,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):L("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return t.jsx(Ia,{className:pe,size:se,inGrid:Q,icon:S,disc:$,onClick:V,ariaLabel:F,tooltip:U,headSegment:j,headMenuItems:E?[{label:K,icon:"list",onClick:E,closeOnSelect:!0}]:void 0,title:L(l),titleLevel:i,headRight:te?k??void 0:({collapsed:O})=>t.jsxs(t.Fragment,{children:[!b&&t.jsx(ic,{control:q}),k,E&&!O&&t.jsx("span",{className:le("bar-chart__detail-btn"),children:t.jsx(ye,{htmlType:"button",size:T,type:"dot",icon:"list",ariaLabel:K,showTooltipInfo:K,onClick:E})})]}),legend:t.jsx(os,{items:ne,className:"caption-1"}),fitBody:n,subRow:m&&t.jsx(t.Fragment,{children:v||w||x&&N?t.jsx(jr,{label:te?void 0:`${L(q.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${L(x??h)}`,children:N?(N(H).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((O,I)=>/\d/.test(O)?t.jsx("span",{className:le(pr(!ue)),children:O},I):t.jsx("span",{className:le("chart-section__total__unit body-3"),children:O},I)):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:le(pr(!ue)),children:H}),C&&t.jsx("span",{className:le("chart-section__total__unit body-3"),children:L(C)})]})}):t.jsxs(jr,{children:[t.jsx("span",{className:le(pr(!ue)),children:H}),t.jsx("span",{className:le("chart-section__total__unit body-3"),children:L(h)}),C&&t.jsx("span",{className:le("chart-section__total__unit body-3"),children:L(C)})]})}),children:B?t.jsx("div",{className:le("bar-chart__wrap bar-chart__loading"),"aria-busy":"true",children:t.jsx("div",{className:le("bar-chart__inner"),children:t.jsxs("div",{className:le("bar-chart__area bar-chart__area--loading"),children:[t.jsx("div",{className:le("bar-chart__plot bar-chart__plot--loading"),style:{height:J.height},children:t.jsx(kr,{size:32})}),t.jsx("div",{className:le("bar-chart__x-axis"),"aria-hidden":"true",children:t.jsxs("span",{className:le("bar-chart__x-axis__label"),children:[t.jsx("span",{className:le("caption-1 bar-chart__x-axis__main"),children:"\xA0"}),D.some(O=>!!O.sublabel)&&t.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):t.jsx(Mx,{focusableBars:r,data:D,colorA:u,colorB:d?p:void 0,labelA:L(h),labelB:d?L(d):void 0,barWidth:s??J.barWidth,barGap:z,baseline:W,height:J.height,fitHeight:n,maxOverride:v?100:void 0,tightMax:g,seriesColors:f?.map(O=>O.color),seriesLabels:f?.map(O=>O.label),rateLabels:v?{total:L("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:L("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:R})})}const uc=120,Px={left:38,right:16,top:26,bottom:24};function Fx({points:e=[],range:n,ticks:r=[],axisTitle:a,color:s,height:l=156,fallbackWidth:i=320,insets:c,overlay:u,ariaLabel:p,className:h}){const[d,m]=o.useState(null),[C,x]=o.useState(null);o.useEffect(()=>{if(!C)return;const T=W=>m(Math.round(W)||null);if(T(C.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const z=new ResizeObserver(([W])=>T(W.contentRect.width));return z.observe(C),()=>{z.disconnect()}},[C]);const{payload:y,anchorRect:b,openAfterDelay:v,close:_}=g2(uc),g=o.useCallback((T,z)=>{T&&v(T,z.getBoundingClientRect())},[v]),w=d??i,N=l,{left:f,right:A,top:B,bottom:E}={...Px,...c},[k,j]=n,S=T=>j===k?f:f+(w-f-A)*(T-k)/(j-k),$=T=>B+(N-B-E)*(100-T)/100,V={x:S,y:$,plot:{left:f,right:w-A,top:B,bottom:N-E,width:Math.max(0,w-f-A),height:Math.max(0,N-B-E)}},F=e.filter(T=>!T.hollow),U=s??"var(--color-main)";return t.jsxs(t.Fragment,{children:[t.jsxs("svg",{ref:x,className:ke("line-chart",h),viewBox:`0 0 ${w} ${N}`,role:"img","aria-label":p??e.map(T=>T.description).filter(Boolean).join(", "),children:[a&&t.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:a}),[0,100].map(T=>t.jsxs("g",{children:[t.jsx("line",{className:"line-chart__grid",x1:f,x2:w-A,y1:$(T),y2:$(T)}),t.jsxs("text",{className:"line-chart__tick",x:f-6,y:$(T)+4,textAnchor:"end",children:[T,"%"]})]},T)),u?.(V),r.map(T=>t.jsx("text",{className:"line-chart__tick",x:S(T.x),y:N-5,textAnchor:"middle",children:T.label},T.x)),F.length>1&&t.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:U,points:F.map(T=>`${S(T.x)},${$(T.pct)}`).join(" ")}),e.map(T=>t.jsxs("g",{className:"line-chart__dot",onPointerEnter:z=>g(T.description,z.currentTarget),onPointerLeave:_,children:[t.jsx("circle",{className:"line-chart__dot-hit",cx:S(T.x),cy:$(T.pct),r:12}),t.jsx("circle",{className:ke("line-chart__dot-main",T.hollow&&"is-hollow"),cx:S(T.x),cy:$(T.pct),r:4,stroke:U,fill:T.hollow?void 0:U})]},T.x))]}),y!=null&&t.jsx(En,{anchorRect:b,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:y,children:y})]})}function Ix({icon:e,iconSize:n=56,title:r,titleClass:a="h2",description:s,tipGroups:l,start:i,className:c}){return t.jsxs("div",{className:ke("game-intro",c),children:[e!=null&&t.jsx("span",{className:"game-intro__icon","aria-hidden":"true",style:{"--game-intro-icon":`${n}px`},children:e}),t.jsx("h2",{className:ke("game-intro__title",a),children:r}),s!=null&&t.jsx("p",{className:"game-intro__description body-3",children:s}),l?.map((u,p)=>t.jsxs("div",{className:"game-intro__tips",children:[u.title!=null&&t.jsx("span",{className:"game-intro__tips-title body-3",children:u.title}),u.tips.map((h,d)=>t.jsxs("span",{className:"game-intro__tip body-3",children:[h.icon!=null&&t.jsx("span",{"aria-hidden":"true",children:h.icon}),t.jsx("span",{children:h.text})]},d))]},p)),i&&t.jsx(ye,{htmlType:"button",className:i.className,variant:"main",color:i.color,size:48,width:"100%",disabled:i.disabled,onClick:i.onClick,children:i.label})]})}const cc=(e,n,r)=>{const a=new Date(Date.UTC(e,n,r));return`${a.getUTCFullYear()}-${String(a.getUTCMonth()+1).padStart(2,"0")}-${String(a.getUTCDate()).padStart(2,"0")}`},dc=(e,n,r,a)=>({from:di(e,n,r),to:new Date(di(e,n,r+a).getTime()-1),fromYmd:cc(e,n,r),toYmd:cc(e,n,r+a-1)});function Ox(e,n=0){if(e.period==="month"){const s=Dr(e.monthRange),l=wr(),i=s?s.year:l.getFullYear(),c=(s?s.month1:l.getMonth()+1)-1+n,u=new Date(Date.UTC(i,c+1,0)).getUTCDate();return dc(i,c,1,u)}const r=e.weekRanges.find(s=>s.value===e.weekRange);if(!r){const s=new Date,l=Zr();return{from:s,to:s,fromYmd:l,toYmd:l}}const a=Rn(r.year,r.month-1);return dc(r.year,r.month-1,a+(r.week+n)*7,7)}const us={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function pc(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function hc({done:e,total:n,segments:r,color:a="var(--color-main)",size:s="medium",strokeWidth:l,label:i="%",hideCenter:c=!1,hideLabel:u=!1}){const p=typeof s=="number"?s:us[s].diameter,h=l??(typeof s=="number"?12:us[s].strokeWidth),d=p/2,m=(p-h)/2,C=2*Math.PI*m;if(r&&r.length>0){const v=r.reduce((_,g)=>{const w=_.length>0?_[_.length-1].acc:0,N=Number.isFinite(g.ratio)?g.ratio:0,f=Math.max(0,Math.min(N,1-w));return _.push({color:g.color,rotate:-90+w*360,dash:C*f,acc:w+f}),_},[]);return t.jsx("div",{className:"ring-chart",style:{width:p,height:p},children:t.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[t.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),v.map((_,g)=>_.dash>0&&t.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:_.color,strokeWidth:h,strokeDasharray:`${_.dash} ${C}`,strokeLinecap:"round",transform:`rotate(${_.rotate} ${d} ${d})`},g))]})})}const x=(n??0)>0?Math.min((e??0)/n,1):0,y=C*x,b=C-y;return t.jsxs("div",{className:"ring-chart",style:{width:p,height:p},children:[t.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[t.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),x>0&&t.jsx("circle",{cx:d,cy:d,r:m,fill:"none",stroke:a,strokeWidth:h,strokeDasharray:`${y} ${b}`,strokeLinecap:x<.02||x>.98?"butt":"round",transform:`rotate(-90 ${d} ${d})`})]}),!c&&t.jsxs("div",{className:`ring-chart__center${u?"":` ${p<=96?"ring-chart__center--small":s==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[t.jsx("span",{className:`ring-chart__pct ${p<=96?"h2":"h1"}`,children:pc(x)}),!u&&t.jsx("span",{className:`ring-chart__label ${p<=96?"caption-2":"caption-1"}${p<=96||s==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function zx({titleKey:e,titleLevel:n,headRight:r,icon:a,showTotal:s,totalLabelKey:l,legend:i,loading:c,className:u,inGrid:p=!1,onClick:h,ariaLabel:d,tooltip:m,...C}){const{t:x}=Ee.useTranslation();if(!e)return t.jsx(hc,{...C});const y=(C.total??0)>0?pc(Math.min((C.done??0)/C.total,1)):0,b=C.size==="small",v=typeof C.size=="number"?C.size:us[C.size??"medium"].diameter,_=C.size==="large",g=b?"medium":_?"xLarge":"large",w=u||void 0,N=a&&t.jsx("span",{className:le("chart-section__head-icon"),children:t.jsx(dt,{icon:a,className:le("chart-section__head-icon-inner")})});return t.jsx(Ia,{className:w,size:g,inGrid:p,onClick:h,ariaLabel:d,tooltip:m,title:x(e),titleLevel:n,headRight:N||(b?void 0:r),legend:i&&t.jsx(os,{items:i}),subRow:s&&t.jsxs(jr,{label:!b&&l?x(l):void 0,children:[t.jsx("span",{className:le(pr(b)),children:y}),t.jsx("span",{className:le("chart-section__total__unit body-3"),children:"%"})]}),children:c?t.jsx("div",{className:le("ring-chart-section-body ring-chart-section-body--offset"),children:t.jsx("div",{className:"ring-chart ring-chart--loading",style:{width:v,height:v},"aria-busy":"true",children:t.jsx(kr,{size:32})})}):t.jsx("div",{className:le("ring-chart-section-body ring-chart-section-body--offset"),children:t.jsx(hc,{...C,hideCenter:C.hideCenter??b})})})}function Wx({label:e,value:n,change:r,changeType:a,icon:s,tooltip:l,onClick:i,size:c="small",bodyAlign:u="bottom",children:p}){return t.jsx(Ia,{type:"stat",title:e,totalNum:n,change:r,changeType:a,icon:s,tooltip:l,onClick:i,size:c,bodyAlign:u,children:p})}function mc({value:e,onChange:n,min:r=0,max:a=100,step:s=1,orientation:l="horizontal",size:i=24,disabled:c=!1,ariaLabel:u,length:p,className:h,label:d,formatValue:m,labelPos:C,labelAlign:x="right",showMinMax:y=!1,minLabel:b,maxLabel:v,showBgTick:_=!1,showFillTick:g=!1,tickStep:w,tickShape:N="dot"}){n&&!u&&jt("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 f=Math.min(a,Math.max(r,e)),A=a>r?(f-r)/(a-r):0,B=l==="vertical",E=!n,k=ee=>n?.(Number(ee.target.value)),j=typeof p=="number"?`${p}px`:p,S={"--slider-ratio":String(A),"--slider-thumb":`${i}px`,...j?B?{height:j}:{width:j}:{}},$=w??s,V=(_||g)&&$>0&&a>r?Math.floor((a-r)/$+1e-6):0;if(V>0&&V<=100){const ee=N!=="dash",q=ne=>ee?`radial-gradient(circle, ${ne} 0.5px, transparent 1px)`:B?`linear-gradient(to bottom, transparent calc(50% - 2px), ${ne} calc(50% - 2px), ${ne} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${ne} calc(50% - 2px), ${ne} calc(50% + 2px), transparent calc(50% + 2px))`,P=ee?"2px":"4px",R=[],D=[],H=[];for(let ne=0;ne<=V;ne++){const te=ne*$/(a-r);if(te>1+1e-6)break;const ue=`${((B?1-te:te)*100).toFixed(4)}%`,se=te<=A+1e-6;if(se?!g:!_)continue;const pe=se?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";R.push(q(pe)),D.push(B?`${P} var(--slider-thumb)`:`var(--slider-thumb) ${P}`),H.push(B?`center ${ue}`:`${ue} center`)}R.push(B?"linear-gradient(to top, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))":"linear-gradient(to right, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))"),D.push("100% 100%"),H.push("0 0"),S.backgroundImage=R.join(", "),S.backgroundSize=D.join(", "),S.backgroundPosition=H.join(", "),S.backgroundRepeat="no-repeat"}const F=m?m(f):d==="percent"?`${Math.round(a>r?(f-r)/(a-r)*100:0)}%`:d==="count"?`${f} / ${a}`:f===r&&b?b:f===a&&v?v:void 0,U=t.jsx("input",{type:"range",className:ke("slider",`slider--${l}`,E&&"slider--static",!d&&!y&&h),min:r,max:a,step:s,value:f,disabled:c,readOnly:E,tabIndex:E?-1:void 0,"aria-label":u,"aria-valuetext":F,"aria-orientation":l,onChange:k,style:S});if(!d&&!y)return U;const T=t.jsx("span",{className:"slider-wrap__minmax caption-1",children:b??r}),z=t.jsx("span",{className:"slider-wrap__minmax caption-1",children:v??a}),W=y?t.jsxs("div",{className:ke("slider-track-group",`slider-track-group--${l}`,!d&&h),children:[B?z:T,U,B?T:z]}):U;if(!d)return W;const ie=C??(B?"bottom":"right"),Q=`${Math.round(a>r?(f-r)/(a-r)*100:0)}%`,L=m?m(f):d==="percent"?Q:d==="count"?`${f} / ${a}`:String(f),J=t.jsx("span",{className:"slider-wrap__value body-3b",children:L});return t.jsxs("div",{className:ke("slider-wrap",`slider-wrap--${l}`,`slider-wrap--label-${ie}`,`slider-wrap--align-${x}`,h),children:[W,J]})}const Hx=.86,Vx=250,cs=(e,n,r,a)=>Math.round(Math.min(a,Math.max(r,e-n))),ds=(e,n,r,a)=>{const s=cs(e,n,r,a);return`${s<0?"-":"+"}${Math.abs(s)} dB`};function ps({analyser:e,audioElement:n,orientation:r="horizontal",length:a,label:s,labelPos:l,labelAlign:i="right",floorDb:c=-60,refDb:u=-35,displayMin:p=-5,displayMax:h=25,className:d,ariaLabel:m}){const C=o.useRef(null),x=o.useRef(null),y=o.useRef(null),b=o.useRef(null),[v,_]=o.useState(null);o.useEffect(()=>{const f=U=>{const T=ds(U,u,p,h);y.current&&(y.current.textContent=T);const z=C.current;z&&(z.setAttribute("aria-valuenow",String(cs(U,u,p,h))),z.setAttribute("aria-valuetext",T))},A=e??vC(n)??(v&&v.el===n?v.node:null),B=x.current;if(!A||!B){B?.style.setProperty("--meter-level","0"),f(c);let U=!1;return!e&&n&&va(n).then(T=>{!U&&T&&_({el:n,node:T})}),()=>{U=!0}}wo();const E=new Float32Array(A.fftSize);let k=0,j=0,S=0,$=0,V=null;const F=U=>{const T=xC(A,E);k=T>k?T:k*Hx;const z=k>1e-5?20*Math.log10(k):-1/0,W=Math.max(c,z),ie=W-u,Q=Math.min(1,Math.max(0,(ie-p)/(h-p)));if(B.style.setProperty("--meter-level",Q.toFixed(3)),j+=W,S+=1,U-$>=Vx){const L=j/S;V=V==null?L:V*.6+L*.4,f(V),j=0,S=0,$=U}b.current=requestAnimationFrame(F)};return b.current=requestAnimationFrame(F),()=>{b.current!=null&&cancelAnimationFrame(b.current),b.current=null}},[e,n,v,c,u,p,h]);const g=typeof a=="number"?`${a}px`:a,w=t.jsx("div",{className:"audio-meter__track",style:g?r==="vertical"?{height:g}:{width:g}:{},children:t.jsx("div",{ref:x,className:"audio-meter__fill"})}),N=l??(r==="vertical"?"bottom":"right");return t.jsxs("div",{ref:C,className:ke("audio-meter",`audio-meter--${r}`,s&&`audio-meter--label-${N}`,s&&`audio-meter--align-${i}`,d),role:"meter","aria-label":m,"aria-valuemin":p,"aria-valuemax":h,"aria-valuenow":cs(c,u,p,h),"aria-valuetext":ds(c,u,p,h),children:[w,s&&t.jsx("span",{ref:y,className:"audio-meter__value caption-2",children:ds(c,u,p,h)})]})}const fc=260;function Cc({message:e,position:n,duration:r,onClose:a}){const[s,l]=o.useState(!1),[i,c]=o.useState(!1),u=o.useRef(i),p=o.useRef(s);o.useEffect(()=>{u.current=i},[i]),o.useEffect(()=>{p.current=s},[s]);const h=o.useRef(null),d=o.useRef(""),m=o.useRef(a);o.useEffect(()=>{m.current=a});const C=r,x=o.useRef(null),y=o.useRef(0),b=o.useRef(0),v=o.useRef(!1),_=o.useRef(null),g=o.useRef(null),w=o.useRef(null),N=o.useRef(null),f=o.useRef(()=>{});f.current=E=>{E<0||(y.current=Date.now(),b.current=E,x.current=setTimeout(()=>{x.current=null,l(!1),_.current=setTimeout(()=>{c(!1);try{m.current()}catch{}},fc)},E))};const A=o.useCallback(()=>{v.current||!x.current||(v.current=!0,clearTimeout(x.current),x.current=null,b.current=Math.max(0,b.current-(Date.now()-y.current)))},[]),B=o.useCallback(()=>{v.current&&(v.current=!1,f.current(b.current))},[]);return o.useEffect(()=>{if(e!==d.current&&(x.current&&(clearTimeout(x.current),x.current=null),_.current&&(clearTimeout(_.current),_.current=null)),e){if(p.current)return C>0&&!x.current&&(v.current?b.current=C:f.current(C)),d.current=e,()=>{x.current&&(clearTimeout(x.current),x.current=null),_.current&&(clearTimeout(_.current),_.current=null)};const E=()=>{const k=h.current;if(k)try{k.classList.remove("is-visible"),k.style.transition="none",n==="top"?k.style.transform="translateX(-50%) translateY(-16px)":k.style.transform="translateX(-50%) translateY(16px)",k.style.opacity="0",k.offsetWidth,k.style.transition="",k.classList.add("is-visible"),N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{N.current=null;try{k.style.opacity="",k.style.transform="",k.style.transition=""}catch{}},60)}catch{}};u.current?(E(),l(!0)):(c(!0),g.current=requestAnimationFrame(()=>{w.current=requestAnimationFrame(()=>{E(),l(!0)})})),C>0&&(v.current=!1,f.current(C))}else l(!1),_.current=setTimeout(()=>c(!1),fc);return d.current=e,()=>{x.current&&clearTimeout(x.current),_.current&&clearTimeout(_.current),g.current&&cancelAnimationFrame(g.current),w.current&&cancelAnimationFrame(w.current),N.current&&clearTimeout(N.current),x.current=null,_.current=null,g.current=null,w.current=null,N.current=null}},[e,C,n]),{mounted:i,showing:s,popupRef:h,pause:A,resume:B}}function Sr({message:e="",position:n="top",type:r="normal",onClose:a=()=>{},duration:s=2e3}){const{mounted:l,showing:i,popupRef:c,pause:u,resume:p}=Cc({message:e,position:n,duration:s,onClose:a}),h=o.useRef(null),[d,m]=o.useState(!1);if(o.useEffect(()=>{i?m(!0):l||m(!1)},[i,l]),!l)return null;const C=r==="notice"||r==="warning"?r:"normal",x=t.jsx("div",{ref:c,className:`toast toast--${n} ${i?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:y=>{h.current=y.pointerType},onMouseEnter:()=>{h.current!=="touch"&&u()},onMouseLeave:p,onFocusCapture:u,onBlurCapture:p,children:t.jsx("div",{className:`toast__inner toast__inner--${C} body-2`,"aria-hidden":d||i?void 0:!0,children:t.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?gn.createPortal(x,document.body):x}const qx=24;function Ux({value:e,max:n=100,size:r=8,color:a,trackColor:s,label:l,formatValue:i,labelPos:c,labelAlign:u="right",ariaLabel:p,className:h}){const d=Number.isFinite(n)&&n>0?n:1,m=Math.max(0,Math.min(Number.isFinite(e)?e:0,d)),C=m/d*100,x=Number.isFinite(n)&&n>0?n:0,y=c??(r>=qx?"inside":"bottom"),b=y==="center"?"inside":y,v=b==="inside"&&(u==="left"?C>=15:u==="center"?C>=50:C>=85),_={};return a&&(_["--progress-bar-fill"]=a),s&&(_["--progress-bar-track"]=s),t.jsxs("div",{className:ke("progress-bar",`progress-bar--${r}`,`progress-bar--label-${b}`,l&&`progress-bar--align-${u}`,l&&v&&"progress-bar--label-on-fill",h),style:_,children:[t.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":m,"aria-valuemin":0,"aria-valuemax":x,"aria-valuetext":l?i?i(m):l==="percent"?void 0:l==="raw"?String(m):`${m} / ${x}`:void 0,"aria-label":p,children:t.jsx("div",{className:"progress-bar__fill",style:{width:`${C}%`}})}),l&&t.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(m):l==="percent"?`${Math.round(C)}%`:l==="raw"?String(m):`${m} / ${x}`})]})}const gc={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},Gx="rgba(255, 255, 255, 0.16)";function bc({max:e,index:n,inactiveBg:r,inactiveColor:a,transparent:s,variant:l="numbered",announce:i=!1,ariaLabel:c}){const{t:u}=Ee.useTranslation(),p=wn("(max-width: 767px)");if(!Number.isInteger(e)||e<=0)return null;const h=Number.isInteger(n)?Math.max(0,Math.min(n,e-1)):0,d=c??u("progress.steps",{current:h+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),m={};if(r&&(m["--pi-inactive-bg"]=r),a&&(m["--pi-inactive-color"]=a),s&&(r||(m["--pi-inactive-bg"]=Gx),a||(m["--pi-inactive-color"]="var(--color-white)")),l==="dot")return t.jsxs("div",{className:"progress-indicator progress-indicator--dot",style:m,role:i?"status":"img","aria-label":i?void 0:d,children:[i&&t.jsx("span",{style:gc,children:d}),Array.from({length:e}).map((x,y)=>t.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${y<h?" done":y===h?" active":""}`},y))]});const C=i?t.jsx("span",{role:"status",style:gc,children:d}):null;return p?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:m,role:"list","aria-label":d,children:t.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[h+1," / ",e]})}),C]}):t.jsxs(t.Fragment,{children:[C,t.jsx("div",{className:"progress-indicator",style:m,role:"list","aria-label":d,children:Array.from({length:e}).map((x,y)=>t.jsx("span",{role:"listitem","aria-current":y===h?"step":void 0,className:`progress-indicator-dot ${y<h?" done":y===h?" active":""} body-3`,children:y+1},y))})]})}function Kx(e){if(!e)return[];const n=[];let r=0,a="";for(const s of e.trim()){if(s==="("?r++:s===")"&&r--,/\s/.test(s)&&r===0){a&&(n.push(a),a="");continue}a+=s}return a&&n.push(a),n}function Yx(e,n,r=0){const a=Array.from({length:Math.max(0,n)},()=>0);for(const s of e){let l=0;for(const i of s){if(l>=a.length)break;const c=yc(i.span),u=Math.min(c,a.length-l);if(u===1)a[l]=Math.max(a[l],i.width);else{const p=Math.max(0,(i.width-r*(u-1))/u);for(let h=l;h<l+u;h++)a[h]=Math.max(a[h],p)}l+=u}}return a}function yc(e){const n=typeof e=="number"?e:parseInt(String(e??""),10);return Number.isFinite(n)&&n>=1?Math.floor(n):1}function Zx(e,n){const r=/span\s+(\d+)/.exec(`${e??""} ${n??""}`);return r?yc(parseInt(r[1],10)):1}function Xx(e,n){const{isFixed:r,floorOf:a,containerWidth:s}=n;if(!(s>0))return!1;const l=e.reduce((i,c,u)=>i+(r(u)?c:0),0);return e.reduce((i,c,u)=>i+(r(u)?0:a(u)),0)>s-l}function Jx(e,n){const{isFixed:r,floorOf:a,containerWidth:s}=n,l=e.reduce((d,m,C)=>d+(r(C)?m:0),0),i=e.reduce((d,m,C)=>d+(r(C)?0:m),0),c=s-l;if(!(s>0&&i>0&&c>0))return[...e];const u=c/i,p=e.map((d,m)=>r(m)?d:Math.max(a(m),Math.round(d*u))),h=Math.round(c-p.reduce((d,m,C)=>d+(r(C)?0:m),0));if(h!==0){let d=-1;p.forEach((m,C)=>{!r(C)&&(d<0||m>p[d])&&(d=C)}),d>=0&&(p[d]=Math.max(a(d),p[d]+h))}return p}const Qx=16;function e4(e,n=Qx){return e.map(r=>{const a=r.sortable&&!r.sorted;return Math.max(r.declaredMin,Math.ceil(r.headWidth+(a?n:0)))})}const vc="declared";function t4({children:e,className:n,style:r,span:a,rowLabel:s,onRowClick:l}){const i=a&&a>1?{gridColumn:`span ${a}`,...r}:r;return t.jsx("div",{role:"cell",className:n?`table-cell ${n}`:"table-cell",style:i,"aria-colspan":a&&a>1?a:void 0,children:s&&l?t.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":s,children:e}):e})}function hs({variant:e="default",children:n,className:r,draggable:a,onClick:s,onMouseEnter:l,onMouseLeave:i,onDragStart:c,onDragEnd:u,expandedContent:p,colSpan:h,describedBy:d,rowHasButton:m}){const C=o.useCallback(x=>{s&&x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),s())},[s]);return e==="loading"?t.jsx("div",{role:"presentation",className:"table-row-wrap",children:t.jsx("div",{role:"row",className:"table-row table-row--loading",children:t.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:t.jsx(kr,{size:28})})})}):e==="empty"?t.jsx("div",{role:"presentation",className:"table-row-wrap",children:t.jsx("div",{role:"row",className:"table-row table-row--empty body-3",children:t.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:n})})}):t.jsxs("div",{role:"presentation",className:"table-row-wrap",children:[t.jsx("div",{className:r?`table-row ${r}`:"table-row",draggable:a,onClick:s,onKeyDown:s?C:void 0,onMouseEnter:l,onMouseLeave:i,onDragStart:c,onDragEnd:u,role:"row",tabIndex:s&&!m?0:void 0,"aria-describedby":s&&!m?d:void 0,children:n}),p&&t.jsx("div",{role:"row",className:"table-row-expand",children:t.jsx("div",{role:"cell","aria-colspan":h,className:"table-row-expand__cell",children:p})})]})}function n4({dir:e}){return t.jsx(e==="asc"?yl:bl,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function r4({children:e,onClick:n,className:r,sortDir:a,ariaSort:s,onResizeStart:l}){const i=t.jsxs(t.Fragment,{children:[e,a&&t.jsx(n4,{dir:a})]});return t.jsxs("div",{onClick:n,role:"columnheader","aria-sort":s,className:ke("table-field body-3",r,a?"table-field--sorted":"",l?"table-field--resizable":""),children:[n?t.jsx("button",{type:"button",className:"table-field__button",children:i}):i,l&&t.jsx("span",{className:"table-field__resizer",onPointerDown:l,onClick:c=>c.stopPropagation(),"aria-hidden":"true"})]})}function xc(e){return e&&e!=="left"?`table-col--${e}`:void 0}function ms({fields:e=[],sort:n,sortable:r=!0,headerGroups:a,items:s=[],renderRow:l,onRowClick:i,isRowClickable:c,onRowMouseEnter:u,onRowMouseLeave:p,onRowDragStart:h,onRowDragEnd:d,draggingId:m,gridTemplateColumns:C,mobileGridTemplateColumns:x,resizable:y=!0,resizeMode:b="grow",resizeStorageKey:v,refitOn:_,title:g,icon:w,count:N,collapsed:f=!1,onToggleCollapse:A,headerActions:B,empty:E,loading:k,dragOver:j=!1,onDragOver:S,onDragLeave:$,onDrop:V,renderExpandedRow:F,expandedId:U}){const T=mn,{t:z}=Ee.useTranslation(),W=o.useId(),ie=`table-title-${W}`,Q=`table-row-hint-${W}`,[L,J]=o.useState(null),ee=o.useCallback((X,Ce=0)=>{if(!(X==null||typeof X=="boolean")){if(typeof X=="string"||typeof X=="number")return String(X);if(!(Ce>6)){if(Array.isArray(X)){const Ge=X.map(Ze=>ee(Ze,Ce+1)).filter(Boolean);return Ge.length?Ge.join(""):void 0}if(o.isValidElement(X))return ee(X.props.children,Ce+1)}}},[]),q=o.useCallback((X,Ce)=>{const Ge=e[Ce];if(!Ge)return;if(Ge.sortValue)return Ge.sortValue(X);if(Ge.sortKey)return X[Ge.sortKey];const Ze=l(X)[Ce]?.content;return typeof Ze=="string"||typeof Ze=="number"?Ze:ee(Ze)},[e,l,ee]),P=!n&&r&&!e.some(X=>X.sortDir!==void 0||X.onClick),R=o.useCallback(X=>{const Ce=e[X];if(!Ce||Ce.sortable===!1)return!1;if(Ce.sortValue||Ce.sortKey)return!0;const Ge=s[0];return Ge!==void 0&&q(Ge,X)!==void 0},[e,s,q]);o.useEffect(()=>{if(!P||s.length===0)return;const X=e.filter((Ce,Ge)=>Ce.sortable!==!1&&!R(Ge));X.length!==0&&jt(`Table/sort-mute/${X.map(Ce=>String(Ce.label??"?")).join(",")}`,`[ihab/Table] \uC815\uB82C\uC5D0\uC11C \uBE60\uC9C4 \uC5F4\uC774 \uC788\uC2B5\uB2C8\uB2E4: ${X.map(Ce=>`'${String(Ce.label??"?")}'`).join(" \xB7 ")}`,`
836
- \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.")},[P,e,s,R]);const D=o.useMemo(()=>n?e.map(X=>{if(!X.sortKey||X.sortDir!==void 0)return X;const Ce=n.field(String(X.label??""),X.sortKey);return{...X,sortDir:Ce.sortDir,onClick:X.onClick??Ce.onClick}}):P?e.map((X,Ce)=>R(Ce)?{...X,sortDir:L?.index===Ce?L.asc?"asc":"desc":null,onClick:()=>J(Ge=>Ge?.index===Ce?{index:Ce,asc:!Ge.asc}:{index:Ce,asc:!0})}:X):e,[e,n,P,L,R]),H=o.useMemo(()=>{if(!P||!L)return s;const{index:X,asc:Ce}=L;return[...s].sort((Ge,Ze)=>Ta(q(Ge,X),q(Ze,X),Ce))},[s,P,L,q]),ne=wn("(max-width: 767px)"),te=x&&ne?x:null,ue=y&&!ne,se=o.useRef(ue);se.current=ue;const pe=48,G=40,K=o.useRef(()=>pe),O=o.useRef(null),I=v?`table-cols:${v}`:null,ae=o.useRef(null),he=o.useRef(null),re=o.useRef(null),_e=o.useRef(null),[De,Se]=o.useState(!1),[Ne,He]=o.useState(0),ve=o.useCallback(()=>{const X=re.current;if(!X)return;const Ce=_e.current,Ge=ae.current;if(Ce&&(Ce.style.minWidth="",Ge)){const Ze=Ge.scrollWidth,at=se.current?G:0;Ce.style.minWidth=Ze>X.clientWidth+1?`${Ze+at}px`:""}Se(X.scrollWidth>X.clientWidth+1),He(X.clientWidth),X.scrollWidth>X.clientWidth+1?X.style.setProperty("--table-visible-w",`${X.clientWidth}px`):X.style.removeProperty("--table-visible-w")},[]),xe=o.useCallback((X,Ce)=>{const Ge=X.current;Ge&&he.current&&he.current.unobserve(Ge),X.current=Ce,Ce?(!he.current&&typeof ResizeObserver<"u"&&(he.current=new ResizeObserver(()=>ve())),he.current?.observe(Ce)):!re.current&&!_e.current&&(he.current?.disconnect(),he.current=null),ve()},[ve]),we=o.useCallback(X=>xe(re,X),[xe]),Ae=o.useCallback(X=>xe(_e,X),[xe]);o.useEffect(()=>{ve()}),o.useEffect(()=>{if(typeof window>"u")return;const X=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>ve()):null;return window.addEventListener("resize",ve),()=>{X!=null&&cancelAnimationFrame(X),window.removeEventListener("resize",ve)}},[ve]);const Ie=o.useRef(()=>!1),ot=o.useRef([]),pt=o.useRef(null),Oe=X=>{if(!X||typeof window>"u")return null;try{const Ce=JSON.parse(window.localStorage.getItem(X)??"null");return Array.isArray(Ce)&&Ce.length>0&&Ce.every(Ge=>typeof Ge=="number"&&Number.isFinite(Ge)&&Ge>0)?Ce:null}catch{return null}},[Ue,rt]=o.useState(()=>Oe(I)),[ce,Pe]=o.useState(I),[Ye,Qe]=o.useState(()=>Oe(I)!==null);if(ce!==I){Pe(I);const X=Oe(I);rt(X),Qe(X!==null)}const ut=o.useRef(Ue);o.useEffect(()=>{ut.current=Ue},[Ue]);const vt=o.useCallback(X=>{const Ce=pt.current;if(!Ce)return;const Ge=ut.current;if(Ge){const Ze=[...Ge],at=()=>pe;if(Ce.next!=null&&Ce.startWNext!=null){const mt=X.clientX-Ce.startX,Dt=Math.max(at()-Ce.startW,Math.min(Ce.startWNext-at(),mt));Ze[Ce.index]=Ce.startW+Dt,Ze[Ce.next]=Ce.startWNext-Dt}else Ze[Ce.index]=Math.max(at(),Ce.startW+(X.clientX-Ce.startX));ut.current=Ze,rt(Ze)}},[]),ct=o.useCallback(()=>{if(pt.current=null,window.removeEventListener("pointermove",vt),window.removeEventListener("pointerup",ct),window.removeEventListener("pointercancel",ct),document.body.style.cursor="",document.body.style.userSelect="",I&&ut.current)try{window.localStorage.setItem(I,JSON.stringify(ut.current))}catch{}},[vt,I]),Gt=o.useCallback((X,Ce)=>{Ce.preventDefault(),Ce.stopPropagation();const Ge=ae.current;if(!Ge)return;const Ze=Array.from(Ge.children).map(mt=>mt.getBoundingClientRect().width),at=b==="fit"?D.findIndex((mt,Dt)=>Dt>X&&mt.resizable!==!1):-1;pt.current=at>=0?{index:X,startX:Ce.clientX,startW:Ze[X],next:at,startWNext:Ze[at]}:{index:X,startX:Ce.clientX,startW:Ze[X]},ut.current=Ze,rt(Ze),Qe(!0),window.addEventListener("pointermove",vt),window.addEventListener("pointerup",ct),window.addEventListener("pointercancel",ct),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[vt,ct,b,D]),xt=o.useCallback(()=>{const X=ae.current,Ce=X?.closest(".table-wrap");if(!X||!Ce)return null;const Ge=Ce.style.getPropertyValue("--table-grid-cols");Ce.style.setProperty("--table-grid-cols",D.map(()=>"max-content").join(" "));const Ze=Array.from(Ce.querySelectorAll(".table-row")).filter($t=>!$t.classList.contains("table-row--loading")&&!$t.classList.contains("table-row--empty")),at=$t=>Array.from($t.children).map(kt=>{const qt=window.getComputedStyle(kt);return{width:kt.getBoundingClientRect().width,span:Zx(qt.gridColumnStart,qt.gridColumnEnd)}}),mt=parseFloat(window.getComputedStyle(X).columnGap)||0,Dt=Ze.map(at),Lt=at(X),Dn=Yx([Lt,...Dt],D.length,mt),Zt=e4(D.map(($t,kt)=>({declaredMin:K.current(kt),headWidth:Lt[kt]?.width??0,sortable:$t.sortDir!==void 0||!!$t.onClick,sorted:!!$t.sortDir}))),Sn=$t=>Zt[$t]??K.current($t);O.current=Zt;const cn=D.map(($t,kt)=>{const qt=Dn[kt],Rt=Ie.current(kt)?parseFloat(ot.current[kt]):NaN;return Number.isFinite(Rt)&&Math.ceil(qt)>Rt&&jt(`table-fixed-col-overflow:${kt}:${Rt}`,`[ihabdevteam-core] Table \uC758 ${kt+1}\uBC88\uC9F8 \uC5F4\uC744 ${Rt}px \uB85C \uC815\uD574 \uB450\uC5C8\uB294\uB370 \uC548\uC758 \uB0B4\uC6A9\uC740 ${Math.ceil(qt)}px \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4 \u2014 \uADF8\uB9CC\uD07C \uC798\uB824 \uB098\uAC11\uB2C8\uB2E4. gridTemplateColumns(\uB610\uB294 fields[].width)\uC758 \uADF8 \uC5F4\uC744 ${Math.ceil(qt)}px \uC774\uC0C1\uC73C\uB85C \uB298\uB9AC\uC138\uC694.`),Number.isFinite(Rt)?Rt:Math.max(K.current(kt),Math.ceil(qt))}),Xt=window.getComputedStyle(X),en=(parseFloat(Xt.paddingLeft)||0)+(parseFloat(Xt.paddingRight)||0),Cn=Ce.clientWidth-en;Ge?Ce.style.setProperty("--table-grid-cols",Ge):Ce.style.removeProperty("--table-grid-cols");const tn={isFixed:$t=>Ie.current($t),floorOf:Sn,containerWidth:Cn};return Xx(cn,tn)?vc:Jx(cn,tn)},[D,b]),lt=(X,Ce)=>X!==null&&X.length===Ce.length&&X.every((Ge,Ze)=>Ge===Ce[Ze]),st=o.useRef(xt);o.useEffect(()=>{st.current=xt});const[Ot,Mt]=o.useState(0),Nt=H.length>0,Ft=`${I??""}|${Ot}|${D.length}|${Ne}|${_??""}`,zt=!Ye&&ue&&I!==null&&!k?`${Ft}|${Nt?1:0}`:null,_t=o.useRef(null);o.useEffect(()=>{if(zt===null||!Nt||_t.current===Ft)return;const X=st.current();if(X!==null){if(_t.current=Ft,X===vc){rt(null);return}rt(Ce=>lt(Ce,X)?Ce:X)}},[zt]);const gt=o.useCallback(()=>{if(I)try{window.localStorage.removeItem(I)}catch{}Qe(!1);const X=st.current(),Ce=Array.isArray(X)?X:null;rt(Ce),ut.current=Ce,Mt(Ge=>Ge+1)},[I]);o.useEffect(()=>()=>{pt.current&&(window.removeEventListener("pointermove",vt),window.removeEventListener("pointerup",ct),window.removeEventListener("pointercancel",ct),document.body.style.cursor="",document.body.style.userSelect="")},[vt,ct]);const Et=D.length>0&&D.every(X=>X.width!=null)?D.map(X=>typeof X.width=="number"?`${X.width}px`:String(X.width)).join(" "):null;D.some(X=>X.width!=null)&&!Et&&jt(`table-field-width:${D.map(X=>X.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."),Et&&C&&jt("table-field-width-conflict","[ihabdevteam-core] Table \uC5D0 fields[].width \uC640 gridTemplateColumns \uAC00 \uB458 \uB2E4 \uC788\uC2B5\uB2C8\uB2E4. gridTemplateColumns \uAC00 \uC774\uAE41\uB2C8\uB2E4 \u2014 \uD55C\uCABD\uB9CC \uB450\uC138\uC694.");const It=C??Et??void 0,et=Kx(It),wt=et.filter(X=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(X));wt.length>0&&jt(`table-content-track:${C}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${wt.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: ${C})`);const tt=D.findIndex(X=>!!X.sortDir);D.filter(X=>!!X.sortDir).length>1&&jt("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 fe=X=>X===tt?D[X].sortDir==="asc"?"ascending":"descending":D[X].onClick?"none":void 0,$e=X=>/^\d+(\.\d+)?px$/.test(et[X]??""),Re=X=>{const Ce=et[X]??"",Ge=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(Ce)??/^(\d+(?:\.\d+)?)px$/.exec(Ce);return Ge?parseFloat(Ge[1]):pe};Ie.current=$e,K.current=Re,ot.current=et;const ze=X=>b==="fit"&&!$e(X)?"fr":"px",it=Ue&&Ue.length===D.length&&!ne,on=b==="fit"&&!Ye,ht=(X,Ce)=>{if(X.resizable===!1&&et[Ce])return et[Ce];const Ge=Ue[Ce];if(ze(Ce)!=="fr"||!on)return`${Ge}${ze(Ce)}`;const Ze=Math.min(Math.max(Re(Ce),O.current?.[Ce]??0),Ge);return Ze>0?`minmax(${Ze}px, ${Ge}fr)`:`${Ge}fr`},Ke=te??(it?D.map(ht).join(" "):It),Ct=Ke?{"--table-grid-cols":Ke}:void 0,Bt=g!==void 0;return t.jsx(Fo.Provider,{value:mn,children:t.jsxs("div",{ref:we,className:`table-wrap${ue?" table-wrap--resizable":""}${j?" table-wrap--dragover":""}${f?" table-wrap--collapsed":""}`,style:Ct,onDragOver:S,onDragLeave:$,onDrop:V,tabIndex:De?0:void 0,role:De?"region":void 0,"aria-label":De?typeof g=="string"?g:z("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&t.jsx("span",{id:Q,className:"table-row-hint",children:z("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),t.jsxs("div",{ref:Ae,role:"table","aria-labelledby":Bt&&typeof g=="string"?ie:void 0,className:"table body-2",children:[Bt&&t.jsxs("div",{className:ke("table-header",A&&"table-header--clickable"),onClick:A,role:"caption",children:[A&&t.jsx(ye,{htmlType:"button",size:T,type:"dot",variant:"transparent-gray",useBorder:!1,icon:f?"chevron-right":"chevron-down",ariaLabel:f?z("common.expand","\uD3BC\uCE58\uAE30"):z("common.collapse","\uC811\uAE30"),ariaExpanded:!f,className:"table-header__chevron"}),w&&t.jsx(dt,{icon:w,label:typeof g=="string"?g:void 0,className:"table-header__icon"}),t.jsx("span",{id:ie,className:"table-header__title h5b",children:g}),N!==void 0&&t.jsx("span",{className:"table-header__count body-3b",children:N}),B&&t.jsx("span",{className:"table-header__actions",onClick:X=>X.stopPropagation(),children:B})]}),!f&&t.jsxs(t.Fragment,{children:[a&&a.length>0&&t.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:a.map((X,Ce)=>t.jsx("div",{role:"columnheader","aria-colspan":X.span,className:ke("table-field body-3",X.className),style:{gridColumn:`span ${X.span}`},children:X.label},Ce))}),t.jsxs("div",{role:"presentation",className:ke("table-fields-strip",ue&&"table-fields-strip--resizable"),children:[t.jsx("div",{role:"row",className:"table-fields",ref:ae,children:D.map((X,Ce)=>t.jsx(r4,{onClick:X.onClick,className:ke(X.className,xc(X.align)),sortDir:X.sortDir,ariaSort:fe(Ce),onResizeStart:ue&&Ce<D.length-1&&X.resizable!==!1&&(b!=="fit"||D.some((Ge,Ze)=>Ze>Ce&&Ge.resizable!==!1))?Ge=>Gt(Ce,Ge):void 0,children:X.label},Ce))}),ue&&t.jsx("div",{className:"table-fields__reset-dock",children:t.jsx(ye,{htmlType:"button",size:T,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:z("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:z("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:gt})})]}),t.jsx("div",{role:"rowgroup",className:"table-body",children:k?t.jsx(hs,{variant:"loading",colSpan:D.length||void 0}):H.length===0&&E?t.jsx(hs,{variant:"empty",colSpan:D.length||void 0,children:E}):H.map((X,Ce)=>{const Ge=m!=null&&X.id===m,Ze=!!i&&(c?c(X):!0),at=U!=null&&X.id!=null&&(U instanceof Set?U.has(X.id)||[...U].some(mt=>String(mt)===String(X.id)):String(X.id)===String(U));return t.jsx(hs,{className:`${Ze?" table-row--clickable":""}${h?" table-row--draggable":""}${Ge?" table-row--dragging":""}`.trim(),draggable:!!h,onClick:Ze?()=>i(X):void 0,colSpan:D.length||void 0,rowHasButton:l(X).some(mt=>!!mt.rowLabel),describedBy:Q,onMouseEnter:u?mt=>u(X,mt):void 0,onMouseLeave:p?mt=>p(X,mt):void 0,onDragStart:h?mt=>h(X,mt):void 0,onDragEnd:d?mt=>d(X,mt):void 0,expandedContent:at&&F?F(X):void 0,children:l(X).map((mt,Dt)=>t.jsx(t4,{className:ke(mt.className,xc(D[Dt]?.align)),style:mt.style,span:mt.span,rowLabel:Ze?mt.rowLabel:void 0,onRowClick:Ze?()=>i(X):void 0,children:mt.content},Dt))},X.id!=null?`${typeof X.id}:${X.id}`:`__idx:${Ce}`)})})]})]})]})})}function _c(e,n){return n!=="wornAt"?String(e[n]??""):ix(e.wornYear,e.wornMonth,e.wornDay)}function a4({rows:e,loading:n,onSelect:r,onDelete:a,onWear:s,onRelease:l,onAdd:i}){const{t:c,i18n:u}=Ee.useTranslation(),p=b=>b==="left"?c("device.direction.left","\uC88C"):c("device.direction.right","\uC6B0"),{sort:h,field:d}=i2(),m=o.useMemo(()=>{if(!h)return e;const{key:b,asc:v}=h;return[...e].sort((_,g)=>{if(b==="worn"){const w=Number(g.worn)-Number(_.worn);return v?w:-w}return Ta(_c(_,b),_c(g,b),v)})},[e,h]),{pageRows:C,pageSizeProps:x,paginationProps:y}=l2(m,h);return t.jsxs("div",{className:"dlp-side-table",children:[t.jsx(as,{count:{value:e.length,unit:c("customers.device.unit","\uAC1C")},pageSize:x,pagination:y,actions:i&&t.jsx(ye,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:c("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),t.jsx(ms,{loading:n,resizable:!0,resizeMode:"fit",resizeStorageKey:"customer-device-history-v2",fields:[{...d(c("customers.device.wearingNow","\uCC29\uC6A9"),"worn"),resizable:!1},d(c("device.direction.label","\uBC29\uD5A5"),"side"),d(c("device.deviceType","\uC885\uB958"),"device"),d(c("device.brand","\uBE0C\uB79C\uB4DC"),"brand"),d(c("device.fitType","\uCC29\uC6A9\uD615\uD0DC"),"fitType"),d(c("device.productName","\uC81C\uD488\uBA85"),"productName"),d(c("device.wornDate","\uCC29\uC6A9\uC77C"),"wornAt"),...a?[{label:"",resizable:!1}]:[]],items:C.map((b,v)=>({id:b.id??`${b.side}-${v}`,row:b})),gridTemplateColumns:`72px 110px 120px minmax(120px, 1fr) 100px minmax(120px, 1fr) 156px${a?" 108px":""}`,renderRow:({row:b})=>[{content:t.jsx("span",{className:"dlp-worn-check",onClick:v=>v.stopPropagation(),children:t.jsx(ns,{checked:b.worn,disabled:b.worn?!l:!s,ariaLabel:b.worn?c("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):c("customers.device.wear","\uCC29\uC6A9"),onChange:v=>{v?s?.(b):l?.(b)}})})},{content:t.jsx("span",{children:p(b.side)})},{content:b.device?t.jsx(un,{size:"small",variant:qu(b.device),fill:"soft",label:Uu(b.device,c)}):t.jsx("span",{})},{content:t.jsx("span",{children:b.brand})},{content:t.jsx("span",{children:b.fitType||"-"})},{content:t.jsx("span",{children:b.productName||"-"})},{content:t.jsx("span",{className:"dlp-date",children:ts(b.wornYear,b.wornMonth,b.wornDay,u.language)||"-"})},...a?[{content:t.jsx("span",{className:"dlp-row-actions",children:t.jsx(ye,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:c("common.delete","\uC0AD\uC81C"),onClick:v=>{v?.stopPropagation(),a(b)}})})}]:[]],onRowClick:({row:b})=>r(b),empty:c("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function wc(e,n){return e?{role:n?.role??"button",tabIndex:0,...n?.selected===void 0?{}:{"aria-selected":n.selected},onKeyDown:r=>{r.target===r.currentTarget&&(r.key!=="Enter"&&r.key!==" "||(r.preventDefault(),e(r)))}}:{}}function o4(e,n){return new Date(e,n+1,0).getDate()}function s4(e,n){return new Date(e,n,1).getDay()}function l4({visits:e=[],onVisitClick:n,onVisitMove:r,onDayClick:a,today:s}){const{t:l,i18n:i}=Ee.useTranslation(),c=o.useMemo(()=>l("calendar.dow",{returnObjects:!0}),[l]),u=wa(s),[p,h]=o.useState(()=>Number(u.slice(0,4))),[d,m]=o.useState(()=>Number(u.slice(5,7))-1),[C,x]=o.useState(null),y=o.useRef(null),b=o.useMemo(()=>{const f={};return e.forEach(A=>{f[A.date]||(f[A.date]=[]),f[A.date].push(A)}),f},[e]),v=o.useMemo(()=>{const f=o4(p,d),A=s4(p,d),B=[];for(let E=0;E<A;E++)B.push(null);for(let E=1;E<=f;E++)B.push(E);for(;B.length<35;)B.push(null);return B},[p,d]),_=o.useCallback(()=>{d===0?(h(f=>f-1),m(11)):m(f=>f-1)},[d]),g=o.useCallback(()=>{d===11?(h(f=>f+1),m(0)):m(f=>f+1)},[d]),w=f=>`${p}-${String(d+1).padStart(2,"0")}-${String(f).padStart(2,"0")}`,N=f=>w(f)===u;return t.jsxs("div",{children:[t.jsxs("div",{className:"calendar-nav",children:[t.jsx("button",{type:"button",className:"calendar-nav__button",onClick:_,"aria-label":l("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:t.jsx(dt,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),t.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:ci(l,i.language,p,d+1)}),t.jsx("button",{type:"button",className:"calendar-nav__button",onClick:g,"aria-label":l("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:t.jsx(dt,{icon:"chevron-right",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),t.jsxs("div",{className:"calendar-nav__legend",children:[t.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--main"}),t.jsx("span",{className:"caption-1",children:l("calendar.legend.visited","\uBC29\uBB38")}),t.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--sub"}),t.jsx("span",{className:"caption-1",children:l("calendar.legend.scheduled","\uC608\uC57D")}),t.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--disabled"}),t.jsx("span",{className:"caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]})]}),t.jsxs("div",{className:"calendar-grid",children:[c.map(f=>t.jsx("div",{className:"calendar-day-header body-3",children:f},f)),v.map((f,A)=>{if(f===null)return t.jsx("div",{className:"calendar-cell empty"},`empty-${A}`);const B=f,E=w(B),k=b[E]??[],j=ui(E,i.language),S=C===E;return t.jsxs("div",{className:`calendar-cell${N(B)?" today":""}${S?" drag-over":""}${a?" calendar-cell--clickable":""}`,role:a?"button":void 0,tabIndex:a?0:void 0,"aria-label":a?l("calendar.addOnDate",{date:E}):void 0,"aria-current":N(B)?"date":void 0,onClick:a?()=>a(E):void 0,onKeyDown:a?$=>{$.target===$.currentTarget&&($.key!=="Enter"&&$.key!==" "||($.preventDefault(),a(E)))}:void 0,onDragOver:r?$=>{$.preventDefault(),x(E)}:void 0,onDragLeave:r?$=>{$.currentTarget.contains($.relatedTarget)||x(null)}:void 0,onDrop:r?$=>{$.preventDefault(),y.current!=null&&(r(y.current,E),y.current=null),x(null)}:void 0,children:[t.jsx("div",{className:"calendar-cell__number body-3",children:B}),k.length>0&&(()=>{const $=[{key:"visited",label:l("calendar.legend.visited","\uBC29\uBB38"),count:k.filter(F=>(F.status??"visited")==="visited").length},{key:"scheduled",label:l("calendar.legend.scheduled","\uC608\uC57D"),count:k.filter(F=>F.status==="scheduled").length},{key:"noVisit",label:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:k.filter(F=>F.status==="noVisit").length}].filter(F=>F.count>0),V=$.length===1&&$[0].key==="visited"?l("calendar.visitCount",{count:k.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):$.map(F=>l("calendar.statusCount",{label:F.label,count:F.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return t.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${j} ${V}`,children:[$.map(F=>t.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${F.key}`,"aria-hidden":"true"},F.key)),k.length]})})(),t.jsx("div",{className:"calendar-cell__badges",children:k.map(($,V)=>t.jsxs("div",{draggable:!!r,className:`calendar-visit-badge${$.status==="noVisit"?" calendar-visit-badge--no-visit":$.status==="scheduled"?" calendar-visit-badge--scheduled":""}${n?" calendar-visit-badge--clickable":""}${r?" calendar-visit-badge--draggable":""}`,onDragStart:r?F=>{y.current=$.id,F.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:r?()=>{y.current=null,x(null)}:void 0,onClick:n?F=>{F.stopPropagation(),n($)}:void 0,...wc(n?()=>n($):void 0),"aria-label":[j,$.time?mi($.time,l):null,$.customer,l($.status==="noVisit"?"calendar.legend.noVisit":$.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[$.time&&t.jsx("span",{className:"calendar-visit-badge__time body-3",children:mi($.time,l)}),t.jsx("span",{className:"calendar-visit-badge__name body-3",children:$.customer}),$.status==="noVisit"&&t.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},$.id??V))})]},B)})]})]})}const i4={page:"h3",pagePopup:"h4",popup:"h5"};function Tr({type:e="page",title:n,headingLevel:r=2,icon:a,action:s,disc:l,children:i,inGrid:c=!1,className:u,style:p}){const h=i4[e],d=n||l||s||a,m=r?`h${r}`:"div";return t.jsxs("div",{className:ke("section",`section--${e}`,c&&"section--in-grid",u),style:p,children:[d&&t.jsxs("div",{className:"section__header",children:[t.jsxs("div",{className:"section__title-row",children:[a&&t.jsx(dt,{icon:a,label:typeof n=="string"?n:void 0,className:"section__icon"}),t.jsxs("div",{className:"section__title-group",children:[n&&t.jsx(m,{className:`section__title ${h}`,children:n}),l&&t.jsx("div",{className:"section__disc body-3",children:l})]})]}),s&&t.jsx("div",{className:"section__action",children:s})]}),i]})}let fs=null,Bc=!1;function kc(){if(Bc||typeof document>"u")return;Bc=!0,document.addEventListener("keydown",n=>{n.metaKey||n.ctrlKey||n.altKey||(fs="keyboard")},!0);const e=()=>{fs="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}kc();function Oa(){return kc(),fs==="keyboard"}const za=20;function u4(e){const{t:n}=Ee.useTranslation(),{type:r,trainingDatas:a,depth:s,renderPopup:l,completedIds:i,selectedIds:c,onItemComplete:u,size:p,useDescriptionTooltip:h,onRemove:d,onMore:m,sectionType:C="page"}=e||{},[,x]=o.useState(0),y=typeof a<"u"?Array.isArray(a)?a:[]:[],b=y.length,[v,_]=o.useState(Math.min(b,za)),g=o.useMemo(()=>Array.isArray(s)?[...s,r?.label].filter(Boolean).join(" \xB7 "):[s||"",r?.label].filter(Boolean).join(" \xB7 "),[s,r?.label]);o.useEffect(()=>{_(Math.min(b,za))},[b]),ou("speechear.data.updated",()=>x(A=>A+1));const w=o.useRef(null),N=o.useRef(null);function f(){const A=document.activeElement;N.current=Oa()&&A&&A.closest?.(".training-block__more")?v:null,_(B=>Math.min(b,B+za))}return o.useEffect(()=>{const A=N.current;if(A==null)return;N.current=null;const B=document.activeElement;B&&B!==document.body||w.current?.querySelectorAll(".training-block-button")[A]?.focus()},[v]),t.jsxs(Tr,{type:C,title:r?.label,icon:r?.icon,disc:r?.desc,className:"training-block",children:[t.jsx("div",{className:"training-list",ref:w,children:(y||[]).slice(0,v).map((A,B)=>{const E=A;return t.jsx(Qo,{index:B,type:r,trainingData:E,depth:g,renderPopup:l,completedIds:i,selectedIds:c,size:p,useDescriptionTooltip:h,onRemove:typeof d=="function"&&c!=null&&E?.id!=null&&c.has(String(E.id))?()=>d(E):void 0,onComplete:typeof u=="function"&&E?.id!=null?()=>u(String(E.id)):void 0,onMore:typeof m=="function"?k=>m(E,k):void 0},E?.id!=null?`${r?.key||"t"}-${String(E.id)}`:`${r?.key||"t"}-${B}`)})}),b>za&&v<b&&t.jsx("div",{className:"training-block__more",children:t.jsx(ye,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:f,ariaLabel:n("common.loadMore","\uB354\uBCF4\uAE30"),label:n("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function c4(e){let n=0;const r=a=>{Array.isArray(a)?a.forEach(r):a!=null&&a!==!1&&a!==!0&&a!==""&&n++};return r(e),n}function d4({gap:e=10,count:n,className:r,children:a}){const s=o.useRef(null),[l,i]=o.useState({width:0,card:0}),c=n??c4(a);o.useLayoutEffect(()=>{const m=s.current;if(!m)return;const C=()=>{const y=m.style.maxWidth;m.style.maxWidth="none";const b=m.clientWidth;m.style.maxWidth=y;const v=m.firstElementChild?.offsetWidth??0;i(_=>_.width===b&&_.card===v?_:{width:b,card:v})};if(C(),typeof ResizeObserver>"u")return;const x=new ResizeObserver(C);return x.observe(m),()=>x.disconnect()},[c,e]);const u=l.card>0?l.card:0,p=u>0?UC(l.width,u,e):0,h=p>0?GC(c,p):0,d={"--block-grid-gap":`${e}px`,...h>0?{"--block-grid-cols":h,"--block-grid-card":`${u}px`}:{}};return t.jsx("div",{ref:s,className:ke("training-block-grid",h>0&&"training-block-grid--measured",r),style:d,"data-cols":h>0?h:void 0,children:a})}function Cs(e){const n=o.useRef(null),r=o.useRef(e);r.current=e;const[a,s]=o.useState({url:e,loading:!!e,failed:!1}),l=a.url===e?a:{loading:!!e,failed:!1};o.useEffect(()=>{const u=n.current;s({url:e,failed:!1,loading:!!e&&!(u?.complete&&u.naturalWidth>0)})},[e]);const i=o.useCallback(()=>{r.current===e&&s({url:e,loading:!1,failed:!1})},[e]),c=o.useCallback(()=>{r.current===e&&s({url:e,loading:!1,failed:!0})},[e]);return{imgRef:n,loading:l.loading,failed:l.failed,hasImage:!!e&&!l.failed,onLoad:i,onError:c}}var p4='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 h4=p4,gs=o.forwardRef(function({item:e,disabled:n=!1,onPlayDone:r,selectable:a=!1,selected:s=!1,onSelect:l,flipDelay:i=0,hideLabel:c=!1,hideAudio:u=!1,orderRank:p=null},h){const{t:d}=Ee.useTranslation(),m=e.word||e.title||"",C=n||!m,x=e.audio??e.sound??e.audioKey,y=e.subLabel||e.pronunciation||"",b=e.colloquialLabel||"",[v,_]=o.useState({label:m,subLabel:y,colloquialLabel:b,homonum:e.homonum});m&&(v.label!==m||v.subLabel!==y||v.colloquialLabel!==b||!Object.is(v.homonum,e.homonum))&&_({label:m,subLabel:y,colloquialLabel:b,homonum:e.homonum});const g=o.useRef(null),w=wn("(max-width: 767px)"),[N,f]=o.useState(!1),[A,B]=o.useState(!1),E=`${typeof x=="string"?x:x?.src??""}\0${m}`,[k,j]=o.useState({for:"",url:""}),S=k.for===E?k.url:"",$=si(),V=e.textOnly??(!e.image&&!!v.label&&!!$&&$.entries.length>0&&!$.byWord.has(v.label)),F=V?"":_r()?.(v.label,v.homonum)??e.image??"",{imgRef:U,loading:T,hasImage:z,onLoad:W,onError:ie}=Cs(F);o.useEffect(()=>{let H=!1;return(async()=>{if(x){if(typeof x=="string"){if(x.startsWith("http")||x.includes("/")){j({for:E,url:x});return}}else if(typeof x=="object"&&!Array.isArray(x)){const te=x.src;if(te){j({for:E,url:te});return}}}const ne=Hr();if(ne&&m)try{const te=await Promise.resolve(ne(m));!H&&te&&j({for:E,url:te})}catch{}})(),()=>{H=!0}},[x,m,E]);const Q=o.useRef(!0),L=o.useRef(null);o.useEffect(()=>(Q.current=!0,()=>{Q.current=!1,L.current&&Ra(L.current),L.current=null;try{g.current?.pause()}catch{}g.current=null}),[]);const J=o.useCallback(()=>new Promise(H=>{if(typeof window<"u"&&window.speechSynthesis&&m){f(!0),window.speechSynthesis.cancel();const ne=new SpeechSynthesisUtterance(m);ne.lang="ko-KR",ne.onend=()=>{f(!1);try{r?.()}catch{}H()},ne.onerror=()=>{f(!1),H()},window.speechSynthesis.speak(ne)}else H()}),[m,r]),ee=o.useCallback(H=>{const ne=sa(H,te=>{if(f(!1),te)try{r?.()}catch{}});return g.current=ne.el,ne.done},[r]),q=o.useCallback(async()=>{if(n||!Q.current)return;const H=()=>{L.current===H&&(L.current=null);try{g.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}f(!1)},ne=oa(H);L.current=H;try{window.speechSynthesis?.cancel()}catch{}try{if(S&&(f(!0),await ee(S)))return;const te=ya();if(te&&m)try{B(!0);const ue=await Promise.resolve(te(m));if(!Q.current||L.current!==H||(B(!1),ue&&(f(!0),await ee(ue))))return}catch{}if(!Q.current||L.current!==H)return;await J()}finally{L.current===H&&B(!1),ne(),L.current===H&&(L.current=null)}},[n,S,m,ee,J]);o.useImperativeHandle(h,()=>({play:()=>q()}),[q]);const P=H=>H.stopPropagation(),R=o.useCallback(H=>{if(H.stopPropagation(),!n){if(N){try{g.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}f(!1);return}q()}},[n,N,q]),D=ke("training-word-card",n?"training-word-card--disabled":"",C?"training-word-card--flipped":"",a?"training-word-card--selectable":"",s?"training-word-card--selected":"");return t.jsx("div",{className:D,onClick:a&&!n?l:void 0,role:a?"button":void 0,"aria-pressed":a?s:void 0,tabIndex:a&&!n?0:void 0,"aria-disabled":a&&n?!0:void 0,onKeyDown:a&&!n?H=>{H.target===H.currentTarget&&(H.key==="Enter"||H.key===" "||H.key==="Spacebar")&&(H.preventDefault(),l?.())}:void 0,children:t.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:C?"0ms":`${i}ms`},children:[t.jsxs("div",{className:"training-word-card__front",children:[s&&t.jsx("div",{className:"training-word-card__selected-badge",onClick:P,children:t.jsx(Ln,{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")})}),t.jsx("div",{className:"training-word-card__image-wrap",children:V?t.jsx("div",{className:"training-word-card__text-face",children:v.label}):z?t.jsxs(t.Fragment,{children:[T&&t.jsx("div",{className:"training-word-card__spinner"}),t.jsx("img",{ref:U,className:"training-word-card__image",src:F,alt:v.label||d("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:T?0:1},onLoad:W,onError:ie})]}):t.jsx("div",{className:"training-word-card__placeholder"})}),!c&&t.jsxs("div",{className:"training-word-card__body",children:[!V&&t.jsx("div",{className:"training-word-card__word",children:v.label}),v.subLabel&&t.jsxs("div",{className:"training-word-card__pronunciation",children:["[",v.subLabel,"]"]}),v.colloquialLabel&&t.jsxs("div",{className:"training-word-card__colloquial caption-1",children:["[",v.colloquialLabel,"]"]})]}),!u&&t.jsx("div",{className:"training-word-card__bottom",onClick:a?P:void 0,children:t.jsx(ye,{htmlType:"button",size:w?40:48,type:w?"dot":"bar",icon:N?"pause":"play",label:w?void 0:d("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:N,loading:A,onClick:R,disabled:n,ariaLabel:v.label?N?d("training.stopFor",{name:v.label,defaultValue:`${v.label} \uC815\uC9C0`}):d("training.playSoundFor",{name:v.label,defaultValue:`${v.label} \uC18C\uB9AC \uB4E3\uAE30`}):N?d("training.stop","\uC815\uC9C0"):d("training.playSound","\uC18C\uB9AC \uB4E3\uAE30")})})]}),t.jsx("div",{className:"training-word-card__back","aria-hidden":"true",children:t.jsx("span",{className:"training-word-card__disabled-symbol",style:{"--disabled-symbol-src":`url("${h4}")`}})})]})})});function Wa(e){return String(e)}const Ha=["o","triangle","x"];function Ac(e,n){return e===n?null:n}const Nc={o:"circle",triangle:"triangle",x:"x"},Ec={o:"main",triangle:"warn",x:"danger"},m4=24,f4=2,bs=3.5,C4=.8;function g4(e){if(!(e>0))return bs;const n=C4*m4/e;return Math.min(bs,Math.max(f4,n))}function b4(e){let n=0,r=0,a=0;for(const l of Object.values(e))l==="o"?n++:l==="triangle"?r++:l==="x"&&a++;const s=n+r+a;return{marked:s,o:n,triangle:r,x:a,rate:s===0?null:(n+r*.5)/s}}function ys(e){const n={};for(const[r,a]of Object.entries(e))(a==="o"||a==="triangle"||a==="x")&&(n[r]=a);return n}function jc(e){const n=[];let r=0;for(const a of e)n.push(r),r+=a;return n}function y4(e,n){return!n&&e>0}const hr={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 v4(e="landscape"){jt("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:n,printW:r,printH:a}=hr[e],s=document.createElement("style");s.textContent=`@page { size: ${n}; margin: 0; } .word-table { width: ${r} !important; height: ${a} !important; }`,document.head.appendChild(s);const l=()=>{document.head.removeChild(s),window.removeEventListener("afterprint",l)};window.addEventListener("afterprint",l),window.print()}function x4(e,n){if(e.length===0)return[[]];const r=Math.max(1,Math.floor(n)),a=[];for(let s=0;s<e.length;s+=r)a.push(e.slice(s,s+r));return a}const _4={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 Dc(e,n){const r=_4[e][n];if(r)return r;const a=Math.max(1,Math.ceil(n)),s=Math.max(1,Math.ceil(Math.sqrt(a*.707)));let l,i;return e==="landscape"?(i=s,l=Math.ceil(a/i)):(l=s,i=Math.ceil(a/l)),(e==="landscape"?l<i:i<l)&&([l,i]=[i,l]),{cols:l,rows:i}}function w4(e,n){const r=Dc(e==="landscape"?"portrait":"landscape",n),a=Math.max(1,Math.ceil(n));if(a<=1)return r;const s=hr[e],l=e==="landscape"?s.width/2:s.width,i=e==="landscape"?s.height:s.height/2,c=(m,C)=>Math.min(l/m/Lc,i/C/Rc),u=Math.max(0,r.cols*r.rows-a),p=c(r.cols,r.rows);let h=r,d=p;for(let m=1;m<=a;m++){const C=Math.ceil(a/m);if(m*C-a>u)continue;const x=c(m,C);x>d&&(h={cols:m,rows:C},d=x)}return d>p*1.05?h:r}const B4={show:"word-table__content--cut-show",dashed:"",corner:"word-table__content--cut-corner",hide:""},Sc={\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"},Tc={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},vs={\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"},xs={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function Mc(e){return Object.fromEntries(Object.entries(Sc).map(([n,r])=>[n,vs[n]?e(`wordTable.pos.${vs[n]}`,{defaultValue:r}):r]))}function $c(e){return Object.fromEntries(Object.entries(Tc).map(([n,r])=>[n,xs[n]?e(`wordSearch.filter.type.${xs[n]}`,{defaultValue:r}):r]))}const k4={pos:vs,wordType:xs};function _s(e,n){return e?e.split("/").map(r=>n[r]??r).join("/"):""}function ws(e,n,r,a){if(a!=="dashed")return{};const s=e%n,l=Math.floor(e/n),i=s<n-1,c=l<r-1;if(!i&&!c)return{};const u="#ddd",p=C=>`repeating-linear-gradient(to ${C}, ${u} 0, ${u} 5px, transparent 5px, transparent 10px)`,h=[],d=[],m=[];return i&&(h.push(p("bottom")),d.push("1px 100%"),m.push("right center")),c&&(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 Lc=280,A4=240,N4=280,Rc=400,E4=120,j4=280;function Pc(e,n){const r=o.useRef(null),[a,s]=o.useState(1),[l,i]=o.useState(0),c=o.useCallback((u,p)=>{if(!(u>0))return;const h=u/e,d=n&&p>0?p/n:1/0,m=Math.min(1,h,d);s(m),i(Math.max(0,(u-e*m)/2))},[e,n]);return o.useEffect(()=>{const u=r.current;if(!u)return;const p=n?u.parentElement??u:u;if(c(p.clientWidth,p.clientHeight),typeof ResizeObserver>"u")return;const h=new ResizeObserver(([d])=>c(d.contentRect.width,d.contentRect.height));return h.observe(p),()=>h.disconnect()},[c,n]),{scalerRef:r,scale:a,offset:l}}const D4=24,S4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},T4=400,Fc=8;function M4(e){return e<=1?"100%":`repeat(${e}, calc((100% - ${e-1} * var(--wt-cell-gap, 0px)) / ${e}))`}function Bs({label:e,subLabel:n,colloquialLabel:r,captionLabel:a,captionBadge:s,imageLabel:l,pickForm:i,homonum:c,showWord:u=!0,showImage:p=!0,showPronunciation:h=!0,showColloquial:d=!0,showCaption:m=!0,buttonSize:C=40,wordInfo:x,outerScale:y=1}){const{t:b}=Ee.useTranslation(),v=o.useRef(null),_=o.useRef(null),g=o.useRef(null),[w,N]=o.useState(1),[f,A]=o.useState(!1),[B,E]=o.useState(!1),[k,j]=o.useState({for:"",url:""}),[S,$]=o.useState(null),V=n&&n.length>0?n:bC()?.(e,c)??"",F=_r()?.(l||e,c)??"",{imgRef:U,loading:T,failed:z,onLoad:W,onError:ie}=Cs(F),Q=o.useCallback(()=>$(_.current?.getBoundingClientRect()??null),[]),L=o.useCallback(()=>$(null),[]),J=Da(!!S,G=>{G?Q():L()},_),ee=o.useMemo(()=>{if(!x)return null;const G=[];return x.grade&&G.push(b("wordTable.info.grade",{n:x.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),x.syllables&&G.push(b("wordTable.info.syllables",{n:x.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),x.pos&&G.push(b("wordTable.info.pos",{v:_s(x.pos,Mc(b)),defaultValue:"\uD488\uC0AC: {{v}}"})),x.wordType&&G.push(b("wordTable.info.wordType",{v:_s(x.wordType,$c(b)),defaultValue:"\uC720\uD615: {{v}}"})),G.length?G:null},[x,b]),q=V||e,P=k.for===q?k.url:"";o.useEffect(()=>{const G=Hr(),K=V||e;if(!G||!K)return;let O=!1;return Promise.resolve().then(()=>G(K)).catch(()=>"").then(I=>{!O&&I&&j({for:K,url:I})}),()=>{O=!0}},[V,e]);const R=o.useRef(null),D=o.useRef(null);o.useEffect(()=>()=>{g.current?.pause(),D.current?.()},[]);const H=o.useRef(null);o.useEffect(()=>()=>{H.current&&(H.current.cancelled=!0)},[]);const ne=o.useCallback(G=>{if(G.stopPropagation(),f||B){R.current?.();return}if(!P){const O=ya(),I=V||e;if(!O||!I)return;const ae={cancelled:!1,stop:null};H.current=ae;const he=()=>{ae.cancelled=!0,ae.stop?.(),E(!1),A(!1),D.current?.()};R.current=he,D.current=oa(he),E(!0),Promise.resolve().then(()=>O(I)).then(re=>{if(ae.cancelled)return;if(!re){he();return}j({for:I,url:re});const _e=sa(re,()=>{A(!1),D.current?.()});g.current=_e.el,ae.stop=_e.stop,E(!1),A(!0)}).catch(()=>{he()});return}A(!0);const K=sa(P,()=>{A(!1),D.current?.()});g.current=K.el,R.current=K.stop,D.current=oa(K.stop)},[f,B,P,V,e]),te=p&&!!F&&!z,ue=te&&u?Lc:te?N4:A4,se=te&&u?Rc:te?j4:E4;o.useEffect(()=>{const G=v.current;if(!G||typeof ResizeObserver>"u")return;const K=new ResizeObserver(([O])=>{const{width:I,height:ae}=O.contentRect;N(Math.min(I/ue,ae/se))});return K.observe(G),()=>K.disconnect()},[ue,se]);const pe=C*y<D4;return t.jsxs("div",{ref:v,className:ke("word-table-cell",pe&&"word-table-cell--tap-too-small",te?"word-table-cell--with-image":""),"data-ref-w":ue,"data-ref-h":se,children:[t.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${w})`},children:[te&&t.jsxs("div",{className:"word-table-cell__image-wrap",children:[T&&t.jsx("div",{className:"word-table-cell__spinner"}),t.jsx("img",{ref:U,className:"word-table-cell__image",src:F,alt:e,draggable:!1,style:{opacity:T?0:1},onLoad:W,onError:ie})]}),m&&(s||a)&&t.jsxs("span",{className:"word-table-cell__caption",children:[s&&t.jsx(un,{fill:"soft",size:"small",label:s}),a&&t.jsx("span",{className:"word-table-cell__caption-tail h5",children:a})]}),u&&t.jsx("span",{className:"word-table-cell__word h0",children:e}),h&&V&&t.jsxs("span",{className:"word-table-cell__sub h3",children:["[",V,"]"]}),d&&r&&t.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",r,"]"]})]}),t.jsxs("div",{className:"word-table-cell__side",children:[t.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":P,children:[t.jsx("span",{"data-play-state":"play",style:{display:f?"none":void 0},children:t.jsx(ye,{htmlType:"button",size:C,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,loading:B,showTooltipInfo:B?b("common.loading","\uBD88\uB7EC\uC624\uB294 \uC911"):b("common.play","\uC7AC\uC0DD"),ariaLabel:e?b("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):b("common.play","\uC7AC\uC0DD"),onClick:ne})}),t.jsx("span",{"data-play-state":"pause",style:{display:f?void 0:"none"},children:t.jsx(ye,{htmlType:"button",size:C,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:b("common.pause","\uBA48\uCDA4"),ariaLabel:e?b("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):b("common.pause","\uBA48\uCDA4"),onClick:ne})})]}),x&&t.jsxs("div",{ref:_,className:"word-table-cell__info-button",onPointerEnter:G=>{er(G)||Q()},onPointerLeave:G=>{er(G)||L()},onFocus:()=>{ir()||Q()},onBlur:L,children:[t.jsx(ye,{htmlType:"button",size:C,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:b("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:G=>{G.stopPropagation(),J.touchPress()}}),S&&ee&&t.jsx(Qn,{anchorRect:S,items:ee,showIndex:!1})]}),i&&t.jsx("div",{className:"word-table-cell__form-button",children:t.jsx(ye,{htmlType:"button",size:C,type:"dot",icon:"replace",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:b("wordTable.pickForm","\uB2E4\uB978 \uAF34\uB85C"),ariaLabel:i.n===null?b("wordTable.pickFormBaseAria","\uAE30\uBCF8\uD615 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"):b("wordTable.pickFormAria",{n:i.n,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"}),onClick:G=>{G.stopPropagation(),i.onPick(G.currentTarget.getBoundingClientRect())}})})]})]})}function Mr({title:e,titleIcon:n,disc:r,className:a,orientation:s="landscape",contentTypes:l=["image","word","standardPron"],baseItem:i,baseContentTypes:c,cutLine:u="show",showOutline:p=!0,showDivLine:h=!0,items:d,editCells:m,count:C,activeCell:x=null,onActivateCell:y,onRemoveCell:b,onRemoveItem:v,onReorder:_,onCopyItem:g,onReplaceItem:w,onPickForm:N,indexOffset:f=0,totalCount:A,renderCellAction:B,showFillerAdd:E=!1,fillerAdd:k="first",addableCount:j,contentRef:S,buttonSize:$=40,brand:V,code:F,pageNumber:U,pageNumberPosition:T="right",fitHeight:z=!1,scoring:W=!1,marks:ie,onMarkClick:Q,scoreIndexOffset:L=0}){const J=o.useCallback((fe,$e)=>{Q?.(L+fe,$e)},[Q,L]),ee=(fe,$e)=>{const Re=fe.filter(Boolean).join(" / ");return Re?$e?P("wordPrint.removePairFor",{name:Re,defaultValue:`${Re} \uB300\uB9BD\uC30D \uBE7C\uAE30`}):P("wordPrint.removeWordFor",{name:Re,defaultValue:`${Re} \uBE7C\uAE30`}):$e?P("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):P("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30")},q=(fe,$e)=>{const Re=ie?.[Wa(L+fe)]??null;return t.jsx("div",{className:ke("word-table-cell__score",Re?"word-table-cell__score--marked":""),style:Et>1?{transform:`translateX(-50%) scale(${Et})`,transformOrigin:"bottom center"}:void 0,children:Ha.map(ze=>t.jsx("span",{className:ke("word-table-cell__score-slot",Re===ze?"word-table-cell__score-slot--on":""),children:t.jsx(ye,{htmlType:"button",size:$,type:"dot",shape:"pill",icon:Nc[ze],variant:Re===ze?Ec[ze]:"default",selected:Re===ze,useBorder:!1,...gt?{}:{tabIndex:-1,role:"img"},showTooltipInfo:P(`wordTable.scoring.markName.${ze}`,{defaultValue:ze}),ariaLabel:P(`wordTable.scoring.${ze}`,{word:$e,defaultValue:`${$e} ${ze}`}),onClick:gt?it=>{it.stopPropagation(),J(fe,ze)}:void 0})},ze))})},{t:P}=Ee.useTranslation(),R=m!==void 0,D=e!=null||!!n||!!r,H=wn("(max-width: 767px)"),ne=o.useRef(null),[te,ue]=o.useState(null),se=d?.length??0,pe=A??se,[G,K]=o.useState(null),[O,I]=o.useState(""),ae=o.useRef(null),he=o.useRef(null),re=o.useRef(null),_e=o.useRef(null),De=o.useCallback(fe=>{he.current=fe,typeof S=="function"?S(fe):S&&(S.current=fe)},[S]),Se=o.useCallback((fe,$e)=>{ae.current=f+$e,_?.(fe,$e),I(P("wordTable.reorder.moved",{n:f+$e+1,total:pe,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[_,P,pe,f]);o.useEffect(()=>{const fe=ae.current;fe!=null&&(ae.current=null,(he.current?.closest(".word-table-block__pages")??he.current)?.querySelector(`[data-wordtable-index="${fe}"] .word-table__card-handle button`)?.focus())}),o.useEffect(()=>()=>{_e.current?.()},[]);const Ne=o.useCallback((fe,$e)=>{if(!_||!fe.altKey||fe.ctrlKey||fe.metaKey)return;const Re=fe.key==="ArrowRight";if(!Re&&fe.key!=="ArrowLeft")return;fe.preventDefault();const ze=$e+(Re?1:-1),it=f+ze;it<0||it>=pe||Se($e,ze)},[_,pe,f,Se]),He=o.useCallback((fe,$e)=>{if(!_||fe.pointerType==="mouse")return;const Re=fe.target.closest?.("button");if(Re&&!Re.closest(".word-table__card-handle"))return;_e.current?.();const ze={x:fe.clientX,y:fe.clientY};let it=!1;const on=Ze=>{it&&Ze.cancelable&&Ze.preventDefault()};let ht=null,Ke=null;const Ct=()=>{const Ze=Ke;if(!Ze)return;const at=document.elementFromPoint?.(Ze.x,Ze.y)?.closest?.("[data-wordtable-cell]"),mt=at?Number(at.dataset.wordtableCell):NaN,Dt=Number.isInteger(mt)?mt:null;re.current=Dt,ue(Lt=>Lt===Dt?Lt:Dt)},Bt=Ze=>{if(!it){(Math.abs(Ze.clientX-ze.x)>Fc||Math.abs(Ze.clientY-ze.y)>Fc)&&Ge();return}if(Ke={x:Ze.clientX,y:Ze.clientY},typeof requestAnimationFrame>"u"){Ct();return}ht===null&&(ht=requestAnimationFrame(()=>{ht=null,Ct()}))},X=()=>{ht!==null&&(cancelAnimationFrame(ht),ht=null,Ct());const Ze=re.current,at=it;Ge(),at&&Ze!=null&&Ze!==$e&&Se($e,Ze)},Ce=setTimeout(()=>{it=!0,K($e),re.current=$e,ue($e),window.addEventListener("touchmove",on,{passive:!1})},T4);function Ge(){clearTimeout(Ce),window.removeEventListener("pointermove",Bt),window.removeEventListener("pointerup",X),window.removeEventListener("pointercancel",X),window.removeEventListener("touchmove",on),it=!1,ht!==null&&(cancelAnimationFrame(ht),ht=null),re.current=null,_e.current=null,K(null),ue(null)}_e.current=Ge,window.addEventListener("pointermove",Bt),window.addEventListener("pointerup",X),window.addEventListener("pointercancel",X)},[_,Se]),{width:ve,height:xe}=hr[s],we=typeof z=="number"?z:z&&typeof z=="object"?H?z.narrow:z.wide:null,{scalerRef:Ae,scale:Ie,offset:ot}=Pc(ve,z?xe:void 0),pt=R?m?.length??0:d?.length??0,Oe=Math.max(C??pt,1),Ue=!R&&!!i,rt=w4(s,Oe),ce=Dc(s,Oe),Pe=Ue?rt.cols:ce.cols,Ye=Ue?rt.rows:ce.rows,Qe=Ue&&s==="landscape"?rt.cols*2:Pe,ut=Ue&&s==="portrait"?rt.rows*2:Ye,vt=fe=>({word:fe.length===0||fe.includes("word"),image:fe.length===0||fe.includes("image"),pron:fe.length===0||fe.includes("standardPron"),colloq:fe.length===0||fe.includes("colloquialPron"),caption:fe.length===0||fe.includes("caption")}),ct=vt(l),Gt=o.useMemo(()=>{const fe=(d??[]).map(Re=>Re.id),$e=fe.every(Re=>typeof Re=="string"&&Re.length>0)&&new Set(fe).size===fe.length;return!$e&&fe.length>0&&jt("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."),$e?fe:null},[d]),xt=vt(c??l),lt=R?(m??[]).some(fe=>fe!==null&&fe.length>1):(d??[]).some(fe=>(fe.words??[]).length>1),st=!!V?.show,Ot=!!V?.show&&V?.top!==!1,Mt=!!V?.show&&V?.bottom!==!1,Nt=V?.copyright??"\xA9 IHAB, Inc. All rights reserved.",Ft=le(ke("word-table__content",B4[u],p&&"word-table__content--outline",h&&lt&&"word-table__content--div-line",!st&&U&&T!=="none"&&"word-table__content--page-number",Ot&&"word-table__content--brand-top",Mt&&"word-table__content--brand-bottom")),zt={transform:`scale(${1/Ie})`,transformOrigin:"center center"},_t=$*Ha.length+4*(Ha.length-1),gt=!!Q,Et=gt?Math.max(1,Math.min(1/Ie,ve/Qe/_t)):1,[It,et]=o.useState(bs);ca(()=>{if(!W)return;const fe=he.current?.querySelector(".word-table-cell__score-slot .button__icon");if(!fe)return;const $e=fe.getBoundingClientRect().width;$e>0&&et(g4($e))},[W,Ie,Et,$,se]);const wt=t.jsxs("div",{ref:Ae,className:"word-table__scaler",style:{height:xe*Ie,"--word-table-mark-stroke":It},children:[t.jsx("div",{className:ke("word-table",W&&!gt&&"word-table--score-readonly",!D&&a),style:{width:ve,height:xe,transform:`scale(${Ie})`,transformOrigin:"top left",marginLeft:ot},children:t.jsxs("div",{ref:De,className:Ft,style:{gridTemplateColumns:`repeat(${Qe}, 1fr)`,gridTemplateRows:M4(ut)},children:[R?t.jsx(t.Fragment,{children:(m??[]).map((fe,$e)=>t.jsx("div",{className:le(ke("word-table__edit-cell",fe?"word-table__edit-cell--filled":"word-table__edit-cell--empty",x===$e?"word-table__edit-cell--active":"")),style:ws($e,Qe,ut,u),children:fe?t.jsxs(t.Fragment,{children:[fe.map((Re,ze)=>t.jsxs(o.Fragment,{children:[ze>0&&t.jsx("div",{className:le("word-table__pair-divider")}),t.jsx(Bs,{outerScale:Ie,label:Re.word,subLabel:Re.pronunciation,colloquialLabel:Re.colloquialPronunciation,homonum:Re.homonum,showWord:ct.word,showImage:ct.image,showPronunciation:ct.pron,showColloquial:ct.colloq,showCaption:ct.caption,buttonSize:$})]},ze)),W&&q($e,fe.map(Re=>Re.word).join(" / ")),b&&t.jsx("div",{className:le("word-table__card-close"),children:t.jsx(ye,{htmlType:"button",size:$,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:fe.length>1?P("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):P("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:ee(fe.map(Re=>Re.word),fe.length>1),onClick:()=>b($e)})})]}):y&&t.jsx("div",{className:le("word-table__card-add"),style:zt,children:t.jsx(ye,{htmlType:"button",size:$,type:"dot",icon:"plus",variant:"default",ariaLabel:P("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:P("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>y($e)})})},$e))}):t.jsxs(t.Fragment,{children:[Ue&&i&&t.jsx("div",{className:le("word-table__card word-table__card--base"),style:{gridColumn:`1 / span ${rt.cols}`,gridRow:`1 / span ${rt.rows}`,...ws(0,s==="landscape"?2:1,s==="landscape"?1:2,u)},children:(i.words??[]).map((fe,$e)=>t.jsxs(o.Fragment,{children:[$e>0&&t.jsx("div",{className:le("word-table__pair-divider")}),t.jsx(Bs,{outerScale:Ie,label:fe.label,subLabel:fe.subLabel,colloquialLabel:fe.colloquialLabel,captionLabel:fe.captionLabel,captionBadge:fe.captionBadge,imageLabel:fe.imageLabel,pickForm:N&&fe.canPickForm?{n:null,onPick:Re=>N(i.id,-1,Re)}:void 0,homonum:fe.homonum,showWord:xt.word,showImage:xt.image,showPronunciation:xt.pron,showColloquial:xt.colloq,showCaption:xt.caption,buttonSize:$,wordInfo:fe.grade||fe.syllables!=null||fe.pos||fe.wordType?{grade:fe.grade,syllables:fe.syllables,pos:fe.pos,wordType:fe.wordType}:void 0})]},$e))}),(d??[]).map((fe,$e)=>t.jsxs("div",{"data-wordtable-cell":_?$e:void 0,"data-wordtable-index":_?f+$e:void 0,className:le(`word-table__card${_?" word-table__card--draggable":""}${te===$e?" word-table__card--drag-over":""}${G===$e?" word-table__card--dragging":""}`),style:ws($e,Pe,Ye,u),draggable:!!_,onPointerDown:_?Re=>He(Re,$e):void 0,onKeyDown:_?Re=>Ne(Re,$e):void 0,onDragStart:_?()=>{ne.current=$e}:void 0,onDragOver:_?Re=>{Re.preventDefault(),ue($e)}:void 0,onDragLeave:_?()=>ue(null):void 0,onDrop:_?Re=>{Re.preventDefault(),ne.current!==null&&ne.current!==$e&&_(ne.current,$e),ne.current=null,ue(null)}:void 0,onDragEnd:_?()=>{ne.current=null,ue(null)}:void 0,children:[(fe.words??[]).map((Re,ze)=>t.jsxs(o.Fragment,{children:[ze>0&&t.jsx("div",{className:le("word-table__pair-divider")}),t.jsx(Bs,{outerScale:Ie,label:Re.label,subLabel:Re.subLabel,colloquialLabel:Re.colloquialLabel,captionLabel:Re.captionLabel,captionBadge:Re.captionBadge,imageLabel:Re.imageLabel,pickForm:N&&Re.canPickForm?{n:f+$e+1,onPick:it=>N(fe.id,f+$e,it)}:void 0,homonum:Re.homonum,showWord:ct.word,showImage:ct.image,showPronunciation:ct.pron,showColloquial:ct.colloq,showCaption:ct.caption,buttonSize:$,wordInfo:Re.grade||Re.syllables!=null||Re.pos||Re.wordType?{grade:Re.grade,syllables:Re.syllables,pos:Re.pos,wordType:Re.wordType}:void 0})]},ze)),W&&q($e,(fe.words??[]).map(Re=>Re.label).join(" / ")),(B||v||g||w||_)&&t.jsxs("div",{className:le("word-table__card-actions"),children:[v&&t.jsx("div",{className:le("word-table__card-close"),children:t.jsx(ye,{htmlType:"button",size:$,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(fe.words??[]).length>1?P("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):P("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:ee((fe.words??[]).map(Re=>Re.label),(fe.words??[]).length>1),onClick:()=>v(fe.id)})}),g&&t.jsx("div",{className:le("word-table__card-copy"),children:t.jsx(ye,{htmlType:"button",size:$,type:"dot",icon:"copy",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:P("wordTable.copyItem","\uD55C \uCE78 \uB354"),ariaLabel:P("wordTable.copyItemAria",{n:f+$e+1,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354"}),onClick:()=>g(fe.id,f+$e)})}),w&&t.jsx("div",{className:le("word-table__card-replace"),children:t.jsx(ye,{htmlType:"button",size:$,type:"dot",icon:"refresh-cw",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(fe.words??[]).length>1?P("wordTable.replacePair","\uB2E4\uB978 \uC30D\uC73C\uB85C"):P("wordTable.replaceItem","\uB2E4\uB978 \uB2E8\uC5B4\uB85C"),ariaLabel:(fe.words??[]).length>1?P("wordTable.replacePairAria",{n:f+$e+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C"}):P("wordTable.replaceItemAria",{n:f+$e+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C"}),onClick:()=>w(fe.id,f+$e)})}),B?.($e,fe),_&&t.jsx("div",{className:le("word-table__card-handle"),children:t.jsx(ye,{htmlType:"button",size:$,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:P("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:P("wordTable.reorder.handle",{word:(fe.words??[]).map(Re=>Re.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})})]})]},Gt?Gt[$e]:$e)),Array.from({length:Math.max(0,Pe*Ye-(d?.length??0))}).map((fe,$e)=>{const Re=Pe*Ye,ze=j??Re,it=(d?.length??0)+$e<ze;return t.jsx("div",{className:le("word-table__card word-table__card--filler"),children:E&&y&&it&&(k==="every"||$e===0)&&t.jsx("div",{className:le("word-table__card-add"),style:zt,children:t.jsx(ye,{htmlType:"button",size:$,type:"dot",icon:"plus",variant:"default",ariaLabel:P("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:P("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>y((d?.length??0)+$e)})})},`filler-${$e}`)})]}),Ot&&t.jsx(t.Fragment,{children:t.jsxs("div",{className:"word-table__band word-table__band--top",children:[t.jsx("img",{className:"word-table__brand-logo",src:V?.topLogo?.src??La,alt:V?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const fe=[V?.title&&t.jsx("span",{className:"word-table__paper-title",children:V.title},"t"),V?.owner&&t.jsx("span",{className:"word-table__owner",children:V.owner},"o"),F&&t.jsx("span",{className:"word-table__code",children:F},"c")].filter(Boolean);return fe.length===0?null:t.jsx("span",{className:"word-table__ident",children:fe.map(($e,Re)=>t.jsxs(o.Fragment,{children:[Re>0&&t.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),$e]},Re))})})()]})}),Mt&&t.jsx(t.Fragment,{children:t.jsxs("div",{className:"word-table__band word-table__band--bottom",children:[t.jsxs("span",{className:"word-table__brand-by",children:[V?.bottomLogo?t.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:V.bottomLogo.src,alt:V.bottomLogo.alt}):t.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),t.jsx("span",{className:"word-table__copyright",children:Nt})]}),t.jsxs("span",{className:"word-table__band-end",children:[V?.link&&t.jsx("span",{className:"word-table__link",children:V.link}),U&&T!=="none"&&t.jsx("span",{className:"word-table__page-count",children:P("wordTable.filter.pageIndicator",{current:U.current,total:U.total})})]})]})}),!st&&U&&T!=="none"&&t.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${T}`,children:P("wordTable.filter.pageIndicator",{current:U.current,total:U.total})})]})}),_&&t.jsx("span",{role:"status",style:S4,children:O})]}),tt=we==null?wt:t.jsx("div",{className:"word-table__frame",style:{height:we},children:wt});return D?t.jsx(Tr,{type:"page",icon:n,title:e,disc:r,className:ke(le("word-table__section"),a),children:tt}):tt}function $4(e,n,r){const a=[];for(const s of e??[]){if(s.type==="note"||s.type==="input")continue;const l=s.displayLabel??s.label,i=L4(s,n?.[s.label],r);i!==null&&a.push(`${l} ${i}`)}return a.join(" \xB7 ")}function L4(e,n,r){const a=(Array.isArray(n)?n:n===void 0?[]:[n]).filter(s=>s!==jn);return a.length===0?e.allOption?e.allLabel??r:null:a.map(s=>R4(e,s)).join(", ")}function R4(e,n){const r=[...e.items??[],...(e.groups??[]).flat()];for(const a of r)if(a!=null){if(typeof a=="string"){if(a===n)return a;continue}if(a.value===n)return a.displayLabel??a.labels?.join(" ")??a.value}return n}function Gn({title:e,titleLevel:n=2,headerAction:r,headerSummary:a,collapsible:s=!1,defaultCollapsed:l=!1,collapsed:i,onCollapsedChange:c,footer:u,sections:p,selected:h={},onSelect:d,align:m,sectionAlign:C,className:x}){const y=_n()??mn,b=(m??(C==="vertical"?"newline":"inline"))==="inline",{t:v}=Ee.useTranslation(),[_,g]=o.useState(l),w=i??_,N=()=>{const S=!w;g(S),c?.(S)},f=S=>{if(!s)return;const $=S.target;!$||typeof $.closest!="function"||$.closest(".filter-panel__collapse-toggle")||$.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||N()},A=o.useMemo(()=>a!==void 0||!w?"":$4(p,h,v("common.all","\uC804\uCCB4")),[a,w,p,h,v]),B=a??(A?t.jsx("span",{className:"filter-panel__header-summary body-3",children:A}):null),E=e||r||a||s,k=o.useId(),j=n?`h${n}`:"span";return t.jsxs("div",{className:ke("filter-panel",s?"filter-panel--collapsible":"",w?"filter-panel--collapsed":"",x),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?k:void 0,children:[E&&t.jsxs("div",{className:"filter-panel__header",onClick:s?f:void 0,children:[t.jsx("div",{className:"filter-panel__title-row",children:e&&t.jsx(j,{id:k,className:"filter-panel__title h4",children:e})}),t.jsxs("div",{className:"filter-panel__header-actions",children:[w?B:r,s&&t.jsx(ye,{htmlType:"button",size:y,type:"dot",variant:"transparent-gray",useBorder:!1,icon:w?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:w?v("common.expand","\uD3BC\uCE58\uAE30"):v("common.collapse","\uC811\uAE30"),showTooltipInfo:w?v("common.expand","\uD3BC\uCE58\uAE30"):v("common.collapse","\uC811\uAE30"),"aria-expanded":!w,onClick:N})]})]}),!w&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:ke("filter-panel__sections",b?"filter-panel__sections--row":""),children:p.map(S=>{const $=h[S.label],V=$===void 0||(Array.isArray($)?$.length===0:!1),F=(S.items??[]).filter(T=>T!=null);S.allOption&&F.some(T=>(typeof T=="string"?T:T.value)===jn)&&jt(`filter-panel-all-value:${S.label}`,`[FilterPanel] '${S.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${jn}' \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 U=T=>{const z=typeof T=="string"?T:T.value,W=typeof T!="string"&&!!T.disabled,ie=typeof T!="string"?T.labels:void 0,Q=typeof T!="string"?T.displayLabel:void 0,L=typeof T!="string"?T.tooltip:void 0,J=typeof T!="string"?T.descriptionTooltip:void 0,ee=typeof T!="string"?T.shape:void 0,q=Array.isArray($)?$.includes(z):$===z;return t.jsx(ye,{htmlType:"button",size:"keyboard",label:ie??Q??z,type:S.itemType??(ie?"bar":z.length===1?"dot":void 0),selected:q,disabled:W,shape:ee,showTooltipInfo:!!L,tooltipInfoText:L,tooltipDescription:J,onClick:()=>d?.(z,S.label)},z)};return t.jsxs(o.Fragment,{children:[S.groupLabel&&t.jsxs("div",{className:"filter-panel__group-label-row",children:[t.jsx("div",{className:"filter-panel__group-label body-2",children:S.groupLabel}),S.groupAction]}),t.jsxs("div",{className:ke("filter-panel__section",S.layout==="row"?"filter-panel__section--row":"",S.block?"filter-panel__section--block":""),children:[t.jsxs("div",{className:"filter-panel__section-label-row",children:[t.jsx("span",{className:"filter-panel__section-label body-3",children:S.displayLabel??S.label}),S.labelAction??(S.labelInfo?t.jsx(aa,{...S.labelInfo}):null)]}),S.type==="note"?t.jsx("div",{className:"filter-panel__note body-3",children:S.content}):S.type==="input"?t.jsx(nr,{className:"filter-panel__textfield",placeholder:S.placeholder,ariaLabel:S.displayLabel??S.label,value:h[S.label]??"",onChange:T=>d?.(T,S.label),error:S.error}):!S.multiple&&S.display==="segmented"?t.jsx(Bn,{ariaLabel:S.displayLabel??S.label,options:[...S.allOption?[{key:jn,label:S.allLabel??v("common.all","\uC804\uCCB4"),disabled:S.allOptionDisabled}]:[],...F.map(T=>{const z=typeof T=="string"?T:T.value,W=typeof T!="string"?T.displayLabel:void 0,ie=typeof T!="string"?T.disabled:void 0;return{key:z,label:W??z,disabled:ie}})],value:V&&S.allOption?jn:h[S.label]??"",onChange:T=>d?.(T,S.label),size:32}):!S.multiple&&S.display==="dropdown"?t.jsx(kn,{className:"filter-panel__dropdown",ariaLabel:typeof S.label=="string"?S.label:void 0,size:y,options:[...S.allOption?[{value:jn,label:S.allLabel??v("common.all","\uC804\uCCB4"),disabled:S.allOptionDisabled}]:[],...F.map(T=>{const z=typeof T=="string"?T:T.value,W=typeof T!="string"?T.displayLabel:void 0,ie=typeof T!="string"?T.disabled:void 0;return{value:z,label:W??z,disabled:ie}})],value:V&&S.allOption?jn:h[S.label],onChange:T=>d?.(T,S.label)}):t.jsxs("div",{className:S.groups?"filter-panel__item-groups":"filter-panel__items",children:[S.allOption&&!S.groups&&t.jsx(ye,{htmlType:"button",size:"keyboard",label:S.allLabel??v("common.all","\uC804\uCCB4"),selected:V,disabled:S.allOptionDisabled,onClick:()=>d?.(jn,S.label)}),S.groups?S.groups.map((T,z)=>t.jsxs("div",{className:"filter-panel__item-group",children:[z===0&&S.allOption&&t.jsx(ye,{htmlType:"button",size:"keyboard",label:S.allLabel??v("common.all","\uC804\uCCB4"),selected:V,disabled:S.allOptionDisabled,onClick:()=>d?.(jn,S.label)}),T.filter(W=>W!=null).map(U)]},z)):F.map(U)]})]})]},S.label)})}),u!=null&&u!==!1&&t.jsx("div",{className:"filter-panel__footer body-3",children:u})]})]})}const P4=[1,2,3,4,5,6,7,8,9,10,11,12],F4=[8,6,4,2,1],xn="show",Pn="hide",Ic=["image","word","caption","standardPron"];function Oc(e){return e.some(n=>(n.words??[]).some(r=>!!r.captionBadge||!!r.captionLabel))}function zc(e,n){return{label:e("wordTable.filter.composition","\uAD6C\uC131"),items:[{value:"image",disabled:!n.hasImage,displayLabel:e("wordTable.filter.image","\uC774\uBBF8\uC9C0")},{value:"word",displayLabel:e("wordTable.filter.word","\uB2E8\uC5B4")},{value:"caption",disabled:!n.hasCaption,displayLabel:e("wordTable.filter.caption","\uC720\uD615")},{value:"standardPron",displayLabel:e("wordTable.filter.standardPron","\uD45C\uC900 \uBC1C\uC74C")},{value:"colloquialPron",disabled:!n.hasColloquial,displayLabel:e("wordTable.filter.colloquialPron","\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C")}],multiple:!0,allOption:!0}}function Wc(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 Hc(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:xn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Vc(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:xn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function qc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:xn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Uc(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:xn,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:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Gc(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:xn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Kc(e,n){const r=Math.max(1,Math.min(n.itemCount,n.max??n.itemCount));return{label:e(n.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[r,...F4.filter(a=>a<r)].map(a=>({value:`${a}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:a})})),display:"segmented"}}function Yc(e,n){return e>=n?Number.POSITIVE_INFINITY:e}function I4(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:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Zc(e){return e==="left"||e==="center"||e==="right"?e:"none"}function Xc(e,n){return{[e("wordTable.filter.composition","\uAD6C\uC131")]:n.contentTypes,[e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")]:n.orientation,[e("wordTable.filter.border","\uC678\uACFD\uC120")]:n.showOutline?xn:Pn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:n.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:n.showDivLine?xn:Pn,...n.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:n.showTopInfo?xn:Pn}:{},...n.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:n.showBottomInfo?xn:Pn}:{}}}function Jc(e,n,r,a){return r===e("wordTable.filter.composition","\uAD6C\uC131")?n===jn?(a.setContentTypes(()=>[]),!0):(a.setContentTypes(s=>s.includes(n)?s.filter(l=>l!==n):[...s,n]),!0):r===e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")?(a.setOrientation(n==="landscape"?"landscape":"portrait"),!0):r===e("wordTable.filter.border","\uC678\uACFD\uC120")?(a.setShowOutline(n===xn),!0):r===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(a.setCutLine(n),!0):r===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(a.setShowDivLine(n===xn),!0):r===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(a.setShowTopInfo?.(n===xn),!0):r===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(a.setShowBottomInfo?.(n===xn),!0):!1}function O4(e){return"sections"in e}function ks(e){const{t:n}=Ee.useTranslation(),{title:r,className:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:c,headerSummary:u}=e,p={collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:c,headerSummary:u};if(O4(e))return t.jsx(Gn,{className:a,title:r??n("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:C,orientation:x,showOutline:y,cutLine:b,showDivLine:v,setters:_,showCutLine:g=!1,showDivLine2:w=!1,middleSections:N=[],extraSelected:f={},onExtraSelect:A,showPaperBands:B=!1,showTopInfo:E=!0,showBottomInfo:k=!0}=e,j=[zc(n,{hasImage:h,hasColloquial:d,hasCaption:m??!1}),Wc(n),...N,Hc(n),...g?[Uc(n)]:[],...w?[Gc(n)]:[],...B?[Vc(n),qc(n)]:[]],S={...Xc(n,{contentTypes:C,orientation:x,showOutline:y,cutLine:b,showDivLine:v,showTopInfo:E,showBottomInfo:k}),...f},$=(V,F)=>{Jc(n,V,F,_)||A?.(V,F)};return t.jsx(Gn,{className:a,title:r??n("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:j,selected:S,onSelect:$,...p,sectionAlign:"horizontal"})}function As(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function z4(e){return As(e).replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Ns(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let Va=null,$r=null;function W4(e,n,r,a="",s=""){if(e.length===0||$r&&$r.iframe.isConnected&&Date.now()-$r.at<1e4)return;const l=a?Ns(a):"";Va?.();let i=null;if(l){const p=document.title;document.title=l,i=()=>{document.title=p,window.removeEventListener("afterprint",i),Va===i&&(Va=null)},Va=i,window.addEventListener("afterprint",i)}const c=document.createElement("iframe");c.style.cssText="position:fixed;left:-10000px;top:0;width:1200px;height:900px;border:0;",document.body.appendChild(c);const u=c.contentDocument;if(!u){c.remove();return}$r={iframe:c,at:Date.now()},u.open(),u.write(Es(e,n,r,!0,l,s)),u.close(),c.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{c.remove(),$r?.iframe===c&&($r=null)},0)})}function Es(e,n,r,a=!1,s="",l=""){s=s?Ns(s):"";const i=Array.from(document.styleSheets).flatMap(d=>{try{return Array.from(d.cssRules).map(m=>m.cssText)}catch{return[]}}).join(`
837
- `),c="light",u=(()=>{try{return document.documentElement.lang||""}catch{return""}})(),p=l?`<div class="paper-head">${As(l)}</div>`:"",h=e.map(d=>{const m=d.cloneNode(!0);return m.querySelectorAll('[data-play-state="play"]').forEach(C=>C.style.display=""),m.querySelectorAll('[data-play-state="pause"]').forEach(C=>C.style.display="none"),m.querySelectorAll(".word-table-cell__score-slot:not(.word-table-cell__score-slot--on)").forEach(C=>C.remove()),m.querySelectorAll(".word-table-cell__spinner").forEach(C=>C.remove()),m.querySelectorAll("img").forEach(C=>{C.style.opacity==="0"&&(C.setAttribute("onload","this.style.opacity=''"),C.setAttribute("onerror","this.style.visibility='hidden'"))}),`<div class="paper-wrap">${p}${m.outerHTML}</div>`}).join(`
831
+ `);n=n.replace(/^\n+/,"").replace(/\n+$/,"");const a=n.split(`
832
+ `).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(`
833
+ `)}const bx=new Set(["pnpm","npm","yarn","node","git","curl","docker","cat","ls","cd","rm","mv","cp","echo","export"]),yx=/^(?: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 vx(e,n){let a=e;const r=[],s=/^(?:sh|bash|zsh|shell|console)$/.test(n.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 x=a.indexOf(`
834
+ `),y=x===-1?a:a.slice(0,x);l("comment",y),a=a.slice(y.length);continue}if(s&&a.startsWith("#")){const x=a.indexOf(`
835
+ `),y=x===-1?a:a.slice(0,x);l("comment",y),a=a.slice(y.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(yx);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 x=d[0];l(s&&bx.has(x)?"command":"identifier",x),a=a.slice(x.length);continue}const f=a.match(/^[=+\-*/%<>!&|^~?:]+/);if(f){l("operator",f[0]),a=a.slice(f[0].length);continue}const C=a.match(/^[()[\]{};.,]/);if(C){l("punctuation",C[0]),a=a.slice(1);continue}l("other",a[0]),a=a.slice(1)}return r}function xx({children:e,language:n="bash",title:a="",showCopy:r=!0,size:s="default",className:l=""}){const{t:i}=Ee.useTranslation(),[u,c]=o.useState(!1),p=gx(tc(e)),h=o.useRef(null);o.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const d=async()=>{try{if(!await fg(p))return;c(!0),h.current&&clearTimeout(h.current),h.current=setTimeout(()=>c(!1),2e3)}catch{}},f=vx(p,n),C=s==="small"?"caption-1":"body-3";return t.jsxs("div",{className:ke("code-box",s==="small"?"code-box--small":"",l),children:[(a||r)&&t.jsxs("div",{className:"code-box__header",role:"toolbar","aria-label":i("common.codeBlock","\uCF54\uB4DC \uBE14\uB85D"),children:[t.jsx("div",{className:"code-box__title caption-1",children:a}),r&&t.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")})]}),t.jsx("pre",{className:"code-box__inner","data-lang":n,children:t.jsx("code",{children:f.map((x,y)=>t.jsx("span",{className:`code-token ${x.type} ${C}`,children:x.content},y))})})]})}function _x({count:e,actions:n,onClear:a,clearLabel:r,visible:s,content:l,max:i}){const u=_n()??mn,{t:c}=Ee.useTranslation(),p=s!==void 0?s:e>0,h=r??c("bulkBar.clearSelection","\uC120\uD0DD \uD574\uC81C"),d=o.useRef(null),f=o.useRef(null),C=o.useRef(null),x=o.useRef(p);o.useLayoutEffect(()=>{const g=f.current,w=x.current;if(x.current=p,p&&!w){const N=typeof document<"u"?document.activeElement:null;C.current=N&&N!==document.body&&!g?.contains(N)?N:null}else!p&&w&&g&&g.contains(document.activeElement)&&Nr(g,C.current)},[p]);const[y,b]=o.useState(!1),v=o.useRef(!1),_=o.useRef(null);return o.useEffect(()=>{const g=d.current;if(!g)return;const w=k=>{v.current=k,b(k)},N=()=>{const k=g.firstElementChild??g,E=Array.from(k.children);if(E.length<2){w(!1);return}const D=E[0].offsetTop,$=E.some(z=>z.offsetTop!==D);if(!v.current){_.current=g.clientWidth,$&&w(!0);return}if($)return;const V=E[0],F=E[E.length-1],U=F.offsetLeft+F.offsetWidth-V.offsetLeft,T=_.current;(T==null||U<=T)&&w(!1)};if(N(),typeof ResizeObserver>"u")return;const m=new ResizeObserver(N);m.observe(g);const A=g.parentElement;let B=A?.clientWidth??0;const j=new ResizeObserver(()=>{const k=A?.clientWidth??0;k!==B&&(B=k,_.current=null,N())});return A&&j.observe(A),()=>{m.disconnect(),j.disconnect()}},[l,e]),t.jsxs("div",{ref:f,className:`bulk-bar ${p?"bulk-bar--visible":""}`,inert:!p||void 0,"aria-hidden":p?void 0:!0,children:[t.jsx("span",{ref:d,className:"bulk-bar__count body-2",role:"status",children:l??t.jsx("b",{children:c("common.selectedCount",{count:e})})}),i!==void 0&&t.jsx(un,{size:"small",fill:"soft",variant:"main",label:`${e} / ${i}`,"aria-label":c("common.selectedOfMax",{count:e,max:i,defaultValue:`\uCD5C\uB300 ${i}\uAC1C \uC911 ${e}\uAC1C`})}),t.jsxs("div",{className:`bulk-bar__actions${y?" bulk-bar__actions--stacked":""}`,children:[t.jsx(be,{htmlType:"button",size:u,label:h,onClick:a}),n.map((g,w)=>t.jsx(be,{htmlType:"button",size:u,variant:g.variant??"default",icon:g.icon,label:g.label,onClick:g.onClick},w))]})]})}const wx=[{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 Bx(e){const{onClose:n,className:a}=e;return t.jsx("div",{className:ke("item-actions",a),children:wx.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 t.jsx(be,{htmlType:"button",size:40,type:"dot",icon:s,ariaLabel:u.label,showTooltipInfo:u.label,onClick:()=>{l&&n(),u.onClick()}},r)})})}function kx({items:e,className:n,ariaLabel:a="\uC54C\uB9BC \uAE00",titleLevel:r=4,targetBytes:s}){const l=r?`h${r}`:"div";return t.jsx("div",{className:`notify-text-preview${n?` ${n}`:""}`,role:"group","aria-label":a,children:e.map(i=>{const u=s===void 0?ei(i.sms):ei(i.sms,s),c=u.type==="LMS";return t.jsxs("section",{className:"notify-text-preview__item",children:[t.jsxs("header",{className:"notify-text-preview__head",children:[t.jsx(l,{className:"notify-text-preview__name h5b",children:i.name}),i.meta&&Object.keys(i.meta).length>0?t.jsx("dl",{className:"notify-text-preview__meta caption-1",children:Object.entries(i.meta).map(([p,h])=>t.jsxs("div",{className:"notify-text-preview__meta-row",children:[t.jsx("dt",{children:p}),t.jsx("dd",{children:h})]},p))}):null]}),t.jsxs("div",{className:"notify-text-preview__body",children:[t.jsxs("div",{className:"notify-text-preview__col",children:[t.jsxs("div",{className:"notify-text-preview__col-head caption-1",children:[t.jsx("span",{children:"\uBB38\uC790"}),t.jsxs("span",{className:`notify-text-preview__bytes${c?" is-over":u.overTarget?" is-over-target":""}`,title:u.over?`${u.limit}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uBCF4\uB0BC \uB54C \uC798\uB9B0\uB2E4`:c?`${Jl}\uBC14\uC774\uD2B8\uB97C \uB118\uC5B4 \uC7A5\uBB38\uC774\uB2E4 \u2014 \uD55C \uD1B5 \uAC12\uC774 \uB2E8\uBB38\uC758 \uB450 \uBC30 \uBC18\uC774\uB2E4`:u.overTarget?`\uACA8\uB204\uB294 ${u.target}\uBC14\uC774\uD2B8\uB97C \uB118\uC5C8\uB2E4 \u2014 \uD55C \uAE00\uC790\uB9CC \uB298\uC5B4\uB3C4 ${Jl}\uC744 \uB118\uC5B4 \uC7A5\uBB38\uC774 \uB41C\uB2E4`:void 0,children:[u.bytes,u.target!==null?` / \uBAA9\uD45C ${u.target}`:"","\uBC14\uC774\uD2B8 \xB7 ",c?"\uC7A5\uBB38":"\uB2E8\uBB38",u.over?" \xB7 \uD55C\uACC4 \uB118\uC74C":c?" \xB7 \uAC12\uC774 \uB450 \uBC30 \uBC18":u.overTarget?" \xB7 \uBAA9\uD45C \uB118\uC74C":""]})]}),t.jsx("pre",{className:"notify-text-preview__text",children:i.sms})]}),i.ata?t.jsxs("div",{className:"notify-text-preview__col",children:[t.jsx("div",{className:"notify-text-preview__col-head caption-1",children:t.jsx("span",{children:"\uC54C\uB9BC\uD1A1"})}),t.jsx("pre",{className:"notify-text-preview__text",children:i.ata})]}):null]})]},i.name)})})}function nc({children:e,className:n}){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]),t.jsx("div",{ref:a,className:ke("section-head-float",n),children:e})}function os({items:e,className:n}){return t.jsx("div",{className:le(n?`chart-section__legend ${n}`:"chart-section__legend"),children:e.map((a,r)=>t.jsxs("span",{className:le("chart-section__legend-item"),children:[t.jsx("span",{className:le("chart-section__legend-dot"),style:{background:a.color}}),a.label]},r))})}const pa=e=>`chart-section__total__num ${e?"h1":"h0"}`;function Da({label:e,children:n}){return e?t.jsxs("div",{className:le("chart-section__total chart-section__total--stacked"),children:[t.jsx("span",{className:le("chart-section__total__label body-3"),children:e}),t.jsx("span",{className:le("chart-section__total__value"),children:n})]}):t.jsx("div",{className:le("chart-section__total"),children:n})}const ac=20,Fr=120,Ax=120,Nx={xSmall:Fr,small:Fr,medium:Fr*2+ac,large:Fr*2+ac},rc={xSmall:"chart-section--compact chart-section--xsmall",small:"chart-section--compact",medium:"chart-section--compact",xLarge:"chart-section--full"},hr=e=>{const n=parseFloat(e);return Number.isFinite(n)?n:0};function Ex(e){if(!e)return 0;const n=Array.from(e.children);if(!n.length)return 0;const a=hr(getComputedStyle(e).columnGap);return n.reduce((r,s)=>r+s.getBoundingClientRect().width,0)+a*(n.length-1)}function Ir({type:e="chart",title:n,titleClassName:a,titleLevel:r,icon:s,disc:l,headRight:i,headFloat:u,headSegment:c,headMenuItems:p,collapseBelow:h=420,onClick:d,ariaLabel:f,tooltip:C,totalNum:x,totalUnit:y,totalMuted:b=!1,totalLabel:v,change:_,changeType:g,size:w,bodyAlign:N="bottom",subRow:m,legend:A,subRowAlign:B="start",className:j,inGrid:k=!1,fitBody:E=!1,children:D}){const $=e==="stat",V=w??($?"small":"large"),F=V==="xSmall"&&$,[U,T]=o.useState(!0),z=V==="xSmall"?F&&U?"xSmall":"small":V,W=F&&!U,ie=z==="xSmall",Q=z==="xSmall"||z==="small"||z==="medium",L=a??"h5",J=r??($?0:3),{t:ee}=Ee.useTranslation(),q=o.useRef(null),{anchorRect:P,openAt:R,close:S}=Mr(),H=o.useCallback(()=>{C&&q.current&&R(q.current)},[C,R]),[ne,te]=o.useState(!1);cr(()=>{const Oe=q.current;if(!Oe||!c)return;const Ue=ce=>te(ce>0&&ce<h);if(Ue(Oe.clientWidth),typeof ResizeObserver>"u")return;const at=new ResizeObserver(ce=>Ue(ce[0].contentRect.width));return at.observe(Oe),()=>at.disconnect()},[c,h]);const[ue,se]=o.useState(null),pe=o.useCallback(()=>se(null),[]),G=o.useCallback(Oe=>{const Ue=Oe.currentTarget.getBoundingClientRect();se(at=>at?null:{left:Ue.left,right:Ue.right,top:Ue.top,bottom:Ue.bottom,width:Ue.width,height:Ue.height,x:Ue.x,y:Ue.y})},[]),K=!!c&&ne;o.useEffect(()=>{K||se(null)},[K]);const O=c?[...c.options.map(Oe=>({label:Oe.label,icon:Oe.icon,selected:Oe.key===c.value,disabled:Oe.disabled,onClick:()=>c.onChange(Oe.key),closeOnSelect:!0})),...(p??[]).map((Oe,Ue)=>Ue===0?{...Oe,separatorBefore:!0}:Oe)]:[],I=o.useCallback(Oe=>{if(!d)return;const Ue=Oe.target;Ue&&typeof Ue.closest=="function"&&Ue.closest('button, a, input, select, textarea, [role="radiogroup"]')||d()},[d]),re=o.useCallback(Oe=>{d&&Oe.target===Oe.currentTarget&&(Oe.key==="Enter"||Oe.key===" ")&&(Oe.preventDefault(),d())},[d]),he=typeof i=="function"?i({collapsed:K}):i,ae=x!=null||v?t.jsxs(Da,{label:v,children:[x!=null&&t.jsx("span",{className:le(pa(Q)),children:x}),y&&t.jsx("span",{className:le("chart-section__total__unit body-3"),children:y})]}):null,_e=he||c?t.jsxs("div",{className:le("chart-section__head-right"),children:[c&&(K?t.jsx(be,{htmlType:"button",size:da,type:"dot",icon:"ellipsis",ariaLabel:c.ariaLabel??ee("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:c.ariaLabel??ee("common.more","\uB354\uBCF4\uAE30"),"aria-haspopup":"menu","aria-expanded":!!ue,onClick:G}):t.jsx(kn,{size:da,ariaLabel:c.ariaLabel,options:c.options.map(Oe=>({key:Oe.key,label:Oe.label,disabled:Oe.disabled})),value:c.value,onChange:c.onChange})),he]}):null,De=o.useRef(null),[Se,Ne]=o.useState(null);o.useLayoutEffect(()=>{const Oe=De.current;if(!Oe){Ne(null);return}const Ue=()=>{const ce=Oe.getBoundingClientRect().height;Ne(Pe=>Pe!=null&&Math.abs(Pe-ce)<1?Pe:ce)};if(Ue(),typeof ResizeObserver>"u")return;const at=new ResizeObserver(Ue);return at.observe(Oe),()=>at.disconnect()},[A]);const He=o.useId(),ve=J?`h${J}`:"div",xe=typeof z=="number"?z:Nx[z],we=g??(_===void 0?void 0:_>0?"up":_<0?"down":"neutral"),Ae=_===void 0?void 0:_>0?`+${_}`:`${_}`,Ie=o.useRef(null),ot=o.useRef(null);cr(()=>{if(!F)return;const Oe=q.current;if(!Oe||typeof getComputedStyle!="function")return;const Ue=()=>{const ce=getComputedStyle(Oe),Pe=hr(ce.paddingLeft)+hr(ce.paddingRight)+hr(ce.borderLeftWidth)+hr(ce.borderRightWidth),Ye=Ax-Pe,Qe=Math.max(Ie.current?.getBoundingClientRect().width??0,Ex(ot.current));!(Ye>0)||!(Qe>0)||T(Qe<=Ye+.5)};if(Ue(),typeof ResizeObserver>"u")return;const at=new ResizeObserver(Ue);return Ie.current&&at.observe(Ie.current),ot.current&&at.observe(ot.current),()=>at.disconnect()},[F,n,x,y,Ae]);const pt=C&&P?t.jsx(zn,{anchorRect:{left:P.left,top:P.top+21,right:P.right,bottom:P.bottom,width:P.width,height:P.height},text:C}):null;return $?t.jsxs("div",{ref:q,className:le(["chart-section","chart-section--stat",k&&"chart-section--grid",N==="center"&&"chart-section--body-center",typeof z=="string"&&rc[z],W&&"chart-section--span-two",d&&"chart-section--clickable",j].filter(Boolean).join(" ")),style:xe===void 0?void 0:{minHeight:xe},onClick:d?I:void 0,onKeyDown:d?re:void 0,onPointerEnter:C?H:void 0,onPointerLeave:C?S:void 0,onFocus:C?H:void 0,onBlur:C?S:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?f??[typeof n=="string"?n:void 0,x,Ae].filter(Oe=>Oe!=null&&Oe!=="").join(" "):void 0,"aria-labelledby":!d&&n!=null?He:void 0,children:[pt,t.jsxs("div",{className:le("chart-section__head"),children:[t.jsx(ve,{id:He,className:le(["chart-section__title",L].filter(Boolean).join(" ")),children:n}),F&&t.jsx("div",{ref:Ie,"aria-hidden":"true",className:le(["chart-section__title",L,"chart-section__title--probe"].filter(Boolean).join(" ")),children:n}),s&&!ie&&t.jsx("span",{className:le("chart-section__head-icon"),children:t.jsx(dt,{icon:s,className:le("chart-section__head-icon-inner")})})]}),t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:ot,className:le("chart-section__sub-row"),children:[t.jsxs(Da,{children:[t.jsx("span",{className:le([pa(!0),b&&"chart-section__total__num--muted"].filter(Boolean).join(" ")),children:x}),y&&t.jsx("span",{className:le("chart-section__total__unit body-3"),children:y})]}),Ae&&t.jsx("div",{className:le(`chart-section__change chart-section__change--${we??"neutral"} caption-1`),children:Ae})]}),D&&t.jsx("div",{className:le("chart-section__body"),children:D})]})]}):t.jsxs("section",{ref:q,className:le(["chart-section",k&&"chart-section--grid",E&&"chart-section--fit",typeof z=="string"&&rc[z],d&&"chart-section--clickable",j].filter(Boolean).join(" ")),style:{...xe===void 0?null:E?{minHeight:xe,height:xe}:{minHeight:xe},...Se==null?null:{"--legend-h":`${Se}px`}},onClick:d?I:void 0,onKeyDown:d?re:void 0,onPointerEnter:C?H:void 0,onPointerLeave:C?S:void 0,onFocus:C?H:void 0,onBlur:C?S:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,"aria-label":d?f??(typeof n=="string"?n:void 0):void 0,"aria-labelledby":!d&&n!=null?He:void 0,children:[C&&P&&t.jsx(zn,{anchorRect:{left:P.left,top:P.top+21,right:P.right,bottom:P.bottom,width:P.width,height:P.height},text:C}),u&&t.jsx(nc,{children:u}),t.jsxs("div",{className:le("chart-section__head"),children:[t.jsxs("div",{className:le("chart-section__title-row"),children:[s&&t.jsx(dt,{icon:s,label:typeof n=="string"?n:void 0,className:le("chart-section__icon")}),t.jsx(ve,{id:He,className:le(["chart-section__title",L].filter(Boolean).join(" ")),children:n})]}),_e,l&&t.jsx("div",{className:le("chart-section__disc body-3"),children:l})]}),(ae||m)&&t.jsxs("div",{className:le(["chart-section__sub-row",B!=="start"&&`chart-section__sub-row--${B}`].filter(Boolean).join(" ")),children:[ae,m]}),A&&t.jsx("div",{ref:De,className:le("chart-section__legend-slot"),children:A}),D,ue&&t.jsx(Bn,{anchorRect:ue,onClose:pe,ariaLabel:c?.ariaLabel??ee("tooltip.menu","\uBA54\uB274"),children:t.jsx(Na,{columns:[{items:O}],onClose:pe,size:"small"})})]})}const mr=(e,n)=>`${e}-${String(n).padStart(2,"0")}`,ss=e=>mr(e.getFullYear(),e.getMonth()+1);function Sa(e){const n=/^(\d{4})-(\d{2})$/.exec(e);if(!n)return null;const a=Number(n[2]);return a>=1&&a<=12?{year:Number(n[1]),month1:a}:null}const ls=(e,n)=>`${e}#${n}`;function Rn(e,n){const a=new Date(e,n,1).getDay();return 1+(8-(a===0?7:a))%7}function jx(){const e=wa();let n=e.getFullYear(),a=e.getMonth(),r=e.getDate();if(r<Rn(n,a)){const i=new Date(n,a,0);n=i.getFullYear(),a=i.getMonth(),r=i.getDate()}const s=Math.floor((r-Rn(n,a))/7),l=mr(n,a+1);return{monthKey:l,value:ls(l,s)}}function Dx(e){const n=wa(),a=ss(n),r=(c,p)=>mr(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=Sa(c);if(!h)continue;const d=h.year,f=h.month1-1,C=Rn(d,f);if(!(c===a&&n.getDate()<C)&&!p.some(b=>b.date.getDate()<C))continue;const x=new Date(d,f,0),y=r(x.getFullYear(),x.getMonth());s.has(y)||s.set(y,[])}const l=new Map;for(const[c,p]of s){const h=Sa(c);if(!h)continue;const d=h.year,f=h.month1-1,C=new Date(d,f+1,0).getDate(),x=p.reduce((w,N)=>Math.max(w,N.parts?.length??0,N.partsB?.length??0),0),y=p.some(w=>w.partsB),b=new Array(C+1).fill(0),v=new Array(C+1).fill(0),_=Array.from({length:C+1},()=>new Array(x).fill(0)),g=Array.from({length:C+1},()=>new Array(x).fill(0));for(const w of p){const N=w.date.getDate();if(b[N]+=w.a,v[N]+=w.b,w.parts)for(let m=0;m<x;m++)_[N][m]+=w.parts[m]??0;if(w.partsB)for(let m=0;m<x;m++)g[N][m]+=w.partsB[m]??0}l.set(c,{year:d,month:f,daysInMonth:C,partsLen:x,hasPartsB:y,dayA:b,dayB:v,dayParts:_,dayPartsB:g})}const i=(c,p,h)=>new Date(c,p,h).getTime()>new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime(),u={};for(const[c,p]of l){const{year:h,month:d,daysInMonth:f,dayA:C,dayB:x,dayParts:y,dayPartsB:b}=p,v=h===n.getFullYear()&&d===n.getMonth(),_=n.getDate(),g=l.get(r(d===11?h+1:h,(d+1)%12)),w=p.partsLen,N=[];for(let A=1;A<=f;A++){const B=v&&A>_;N.push({label:String(A),...B&&C[A]===0&&x[A]===0?{future:!0}:{},a:B&&C[A]===0&&x[A]===0?-1:C[A],b:x[A],...w?{parts:y[A]}:{},...w&&p.hasPartsB?{partsB:b[A]}:{}})}const m=[];for(let A=Rn(h,d);A<=f;A+=7){const B=Math.max(0,A+6-f),j=B&&g?Math.max(w,g.partsLen):w,k=p.hasPartsB||!!(B&&g?.hasPartsB);let E=0,D=0;const $=new Array(j).fill(0),V=new Array(j).fill(0);for(let U=A;U<=Math.min(A+6,f);U++){E+=C[U],D+=x[U];for(let T=0;T<w;T++)$[T]+=y[U][T],V[T]+=b[U][T]}if(B&&g)for(let U=1;U<=B&&!i(g.year,g.month,U);U++){E+=g.dayA[U],D+=g.dayB[U];for(let T=0;T<g.partsLen;T++)$[T]+=g.dayParts[U][T],V[T]+=g.dayPartsB[U][T]}const F=B?`${(d+1)%12+1}/${B}`:`${A+6}`;m.push({label:`${m.length+1}\uC8FC`,sublabel:`[${A}\uC77C~${F}\uC77C]`,a:E,b:D,...j?{parts:$}:{},...j&&k?{partsB:V}:{}})}u[c]={weekly:m,daily:N}}return u}function oc(){const e=wa(),n=e.getFullYear(),a=e.getMonth()+1,r=[];for(let s=2024;s<=n;s++){const l=s===n?a:12;for(let i=1;i<=l;i++)r.push({value:mr(s,i),year:s,month:i})}return r.reverse()}oc();function Sx(){return oc()}function sc(e,n){const a=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),r=Array.isArray(a)&&typeof a[n]=="string"?a[n]:null;return e("calendar.weekLabel",{ord:r??String(n+1)})}function Tx(e,n){const a=e("calendar.weekOrdinal",{returnObjects:!0,defaultValue:[]}),r=(Array.isArray(a)&&typeof a[n]=="string"?a[n]:null)??String(n+1);return e("calendar.weekLabelCompact",{ord:r,defaultValue:""})||sc(e,n)}function lc(e){const{t:n,i18n:a}=Ee.useTranslation(),[r,s]=o.useState("week"),l=o.useMemo(()=>Sx().filter(k=>k.value in e),[e]),i=o.useMemo(()=>{const k=[];for(const E of l){const D=new Date(E.year,E.month,0).getDate(),$=Rn(E.year,E.month-1),V=Math.ceil((D-$+1)/7);for(let F=V-1;F>=0;F--)k.push({value:ls(E.value,F),monthKey:E.value,year:E.year,month:E.month,week:F})}return k},[l]),u=o.useCallback((k,E)=>n("calendar.yearMonthCompact",{year:k,month:E,full:ci(n,a.language,k,E),short:ug(k,E,a.language),defaultValue:"{{full}}"}),[n,a.language]),c=o.useCallback(k=>`${u(k.year,k.month)} ${Tx(n,k.week)}`,[n,u]),p=o.useMemo(()=>l.map(k=>({value:k.value,label:u(k.year,k.month)})),[u,l]),h=o.useMemo(()=>i.map(k=>({value:k.value,label:c(k)})),[i,c]),d=o.useMemo(()=>jx(),[e]),f=o.useMemo(()=>l.find(k=>k.value===d.monthKey)?.value??l[0]?.value??"",[l,d]),C=o.useMemo(()=>i.find(k=>k.value===d.value)?.value??i[0]?.value??"",[i,d]),[x,y]=o.useState(""),[b,v]=o.useState("");o.useEffect(()=>{l.find(k=>k.value===x)||y(f)},[l,x,f]),o.useEffect(()=>{i.find(k=>k.value===b)||v(C)},[i,b,C]);const _=r==="month"?p:h,g=r==="month"?x:b,w=r==="month"?y:v,N=o.useMemo(()=>{const k=n("calendar.dow",{returnObjects:!0});return Array.isArray(k)?k:["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"]},[n]),m=_.findIndex(k=>k.value===g),A=o.useCallback(()=>{const k=_.findIndex(E=>E.value===g);k<_.length-1&&w(_[k+1].value)},[_,g,w]),B=o.useCallback(()=>{const k=_.findIndex(E=>E.value===g);k>0&&w(_[k-1].value)},[_,g,w]),j=o.useMemo(()=>[{key:"week",label:n("manager.chart.periodWeek","\uC8FC")},{key:"month",label:n("manager.chart.periodMonth","\uC6D4")}],[n]);return{period:r,setPeriod:s,range:g,setRange:w,activeOptions:_,activeIdx:m,handlePrev:A,handleNext:B,periodOptions:j,monthRange:x,weekRange:b,weekRanges:i,DOW:N}}const Pt=e=>typeof e=="number"&&Number.isFinite(e)?e:0;function Un(e,n=!0){return e.future===!0||n&&e.a===-1}function Mx({data:e,colorA:n,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:f,rateLabels:C,grouped:x=!1,baseline:y,focusableBars:b=!1}){const v=!a,_=!!(d&&d.length>0),g=y,w=o.useMemo(()=>_?Math.max(0,...e.filter(R=>!Un(R,g==null)).map(R=>x?Math.max(0,...(R.parts??[]).map(Pt)):(R.parts??[]).reduce((S,H)=>S+Math.max(0,Pt(H)),0))):Math.max(0,...e.filter(R=>!Un(R,g==null)).flatMap(R=>v?[Pt(R.a)]:[Pt(R.a),Pt(R.b)])),[e,v,_,x]),N=o.useMemo(()=>{if(g==null)return 0;const R=e.filter(S=>!Un(S,g==null)).flatMap(S=>_?(S.parts??[]).map(Pt):v?[Pt(S.a)]:[Pt(S.a),Pt(S.b)]);return Math.max(0,...R.map(S=>Math.abs(S-g)))},[e,g,_,v]),m=o.useMemo(()=>{const R=g!=null?N:w;return p??(h?R>0?R:10:Math.ceil(R/10)*10||10)},[w,N,g,p,h]),A=o.useRef(null),B=o.useRef(null),[j,k]=o.useState(null);o.useLayoutEffect(()=>{if(!c){k(null);return}const R=A.current;if(!R)return;const S=()=>{const ne=B.current,te=R.clientHeight-(ne?ne.getBoundingClientRect().height:0);te<=0||k(ue=>ue!=null&&Math.abs(ue-te)<1?ue:te)};if(S(),typeof ResizeObserver>"u")return;const H=new ResizeObserver(S);return H.observe(R),B.current&&H.observe(B.current),()=>H.disconnect()},[c]);const E=j??u,D=_?x?Math.max(1,d.length):1:v?1:2,$={"--bar-width":`${o.useMemo(()=>{const R=Math.max(1,e.length);return Math.max(2,Math.min(l,Math.round(120/(R*D)+6)))},[e.length,D,l])}px`},V={"--bar-group-gap":`${Math.max(0,i)}px`},F=o.useMemo(()=>{const R=Math.round(m/2);return g!=null?[g+m,...R!==m?[g+R]:[],g,...R!==m?[g-R]:[],g-m]:R!==m?[m,R,0]:[m,0]},[m,g]),U=R=>g!=null?1-(R-(g-m))/(2*m):1-R/m,T=14,z=o.useMemo(()=>{const R=new Set;let S=Number.NEGATIVE_INFINITY;for(const H of F.slice(0,-1)){const ne=(g!=null?1-(H-(g-m))/(2*m):1-H/m)*E;ne-S>=T&&(R.add(H),S=ne)}return R},[F,g,m,E]),[W,ie]=o.useState(null),Q=o.useCallback(()=>ie(null),[]),L=o.useCallback((R,S)=>{const H=[R.label,R.sublabel].filter(Boolean).join(" ");let ne;if(_&&x&&R.rawPartsB)ne=(f??[]).map((te,ue)=>{const se=R.rawPartsB[ue]??0;return{text:se>0?`${te}: ${S[ue]??0}% (${R.rawParts?.[ue]??0}/${se})`:`${te}: -`,color:(d??[])[ue]}});else if(_&&x)ne=(f??[]).map((te,ue)=>({text:`${te}: ${q(S[ue]??0)}`,color:(d??[])[ue]}));else if(_){const te=(f??[]).map((se,pe)=>({text:`${se}: ${S[pe]??0}`,color:(d??[])[pe]})),ue=te.filter((se,pe)=>(S[pe]??0)>0);ne=ue.length?ue:te}else C&&!v?ne=[{text:`${r} ${Pt(R.a)}%`,color:n},{text:`${s} ${Pt(R.b)}%`,color:a}]:C&&R.rawB!==void 0?ne=[{text:`${C.total} ${R.rawB}`},{text:`${C.done} ${R.rawA??0}`,color:n}]:v?ne=[{text:`${r}: ${Pt(R.a)}`,color:n}]:ne=[{text:`${r}: ${Pt(R.a)}`,color:n},{text:`${s}: ${Pt(R.b)}`,color:a}];return{title:H,items:ne}},[_,x,f,d,C,v,r,s,n,a,g]),J=o.useCallback((R,S,H)=>{const ne=R.getBoundingClientRect(),{title:te,items:ue}=L(S,H);ie({rect:{left:ne.left,top:ne.top,right:ne.right,bottom:ne.bottom,width:ne.width,height:ne.height},title:te,items:ue})},[L]),ee=o.useCallback((R,S)=>{const{title:H,items:ne}=L(R,S);return[H,...ne.map(te=>te.text)].filter(Boolean).join(", ")},[L]),q=R=>g!=null&&R>g?`+${R}`:`${R}`,P=W!=null;return o.useEffect(()=>{if(!P)return;const R=()=>ie(null),S=H=>{const ne=H.target;ne&&typeof ne.closest=="function"&&ne.closest(".bar-chart__col")||ie(null)};return window.addEventListener("scroll",R,!0),document.addEventListener("pointerdown",S,!0),()=>{window.removeEventListener("scroll",R,!0),document.removeEventListener("pointerdown",S,!0)}},[P]),t.jsxs("div",{ref:A,className:le("bar-chart__wrap"),style:V,children:[t.jsx("div",{className:le("bar-chart__inner"),children:t.jsx("div",{className:le("bar-chart__scroll"),children:t.jsxs("div",{className:le("bar-chart__area"),children:[t.jsxs("div",{className:le("bar-chart__plot"),style:{height:E},children:[F.slice(0,-1).map((R,S)=>t.jsx("div",{className:le(`bar-chart__gridline${g!=null&&R===g?" bar-chart__gridline--baseline":""}`),style:{top:U(R)*E},children:z.has(R)&&t.jsx("span",{className:le("bar-chart__gridline__label caption-1"),children:R})},S)),e.map((R,S)=>{const H=Un(R,g==null),ne=E/2,te=G=>g!=null?Math.min(ne,Math.abs(Pt(G)-g)/m*ne):Math.min(E,Math.max(0,Pt(G)/m*E)),ue=H?0:te(R.a),se=H?0:te(R.b),pe=(R.parts??[]).map(Pt);return t.jsx("div",{className:le(`bar-chart__col${x&&_?" bar-chart__col--group":""}`),style:{cursor:H?"default":"pointer"},tabIndex:b&&!H?0:void 0,role:b&&!H?"img":void 0,"aria-label":b&&!H?ee(R,pe):void 0,onMouseEnter:H?void 0:G=>J(G.currentTarget,R,pe),onFocus:H||!b?void 0:G=>J(G.currentTarget,R,pe),onBlur:b?Q:void 0,onMouseLeave:Q,children:!H&&(_&&x?(d??[]).map((G,K)=>{const O=pe[K]??0;if(g==null)return t.jsx("div",{className:le("bar-chart__bar"),style:{...$,height:te(O),background:G}},K);const I=Pt(O)<g;return t.jsxs("div",{className:le("bar-chart__slot"),style:$,children:[t.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--up"),children:!I&&t.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full"),style:{height:te(O),background:G}})}),t.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--down"),children:I&&t.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:te(O),background:G}})})]},K)}):_?t.jsx("div",{className:le("bar-chart__stack"),style:$,children:(()=>{const G=pe.reduce((O,I,re)=>I>0?re:O,-1);let K=E;return pe.map((O,I)=>{if(O<=0)return null;const re=Math.min(K,O/m*E);return K-=re,t.jsx("div",{className:le("bar-chart__stack-segment"),style:{height:re,background:(d??[])[I],borderRadius:I===G?"6px 6px 0 0":void 0}},I)})})()}):g!=null?t.jsx(t.Fragment,{children:[{v:Pt(R.a),c:n},...v?[]:[{v:Pt(R.b),c:a}]].map(({v:G,c:K},O)=>t.jsxs("div",{className:le("bar-chart__slot"),style:$,children:[t.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--up"),children:G>=g&&t.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full"),style:{height:te(G),background:K}})}),t.jsx("div",{className:le("bar-chart__slot__half bar-chart__slot__half--down"),children:G<g&&t.jsx("div",{className:le("bar-chart__bar bar-chart__bar--full bar-chart__bar--down"),style:{height:te(G),background:K}})})]},O))}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:le("bar-chart__bar"),style:{...$,height:ue,background:n}}),!v&&t.jsx("div",{className:le("bar-chart__bar"),style:{...$,height:se,background:a}})]}))},S)})]}),t.jsx("div",{ref:B,className:le("bar-chart__x-axis"),children:e.map((R,S)=>{const H=Un(R,g==null);return t.jsxs("span",{className:le(`bar-chart__x-axis__label${H?" bar-chart__x-axis__label--future":""}`),children:[t.jsxs("span",{className:le("caption-1 bar-chart__x-axis__main"),children:[R.isToday&&t.jsx("span",{className:le("bar-chart__x-axis__today-dot"),style:{background:n}}),R.label]}),R.sublabel&&t.jsx("span",{className:"caption-1",children:R.sublabel})]},S)})})]})})}),W&&t.jsx(Qn,{anchorRect:W.rect,title:W.title,items:W.items,showIndex:!1,closeOnOutsideClick:!1})]})}function ic({control:e}){const{t:n}=Ee.useTranslation(),{activeOptions:a,activeIdx:r,range:s,setRange:l,handlePrev:i,handleNext:u,periodOptions:c,period:p,setPeriod:h}=e,d=p==="week"?n("calendar.prevWeek","\uC774\uC804 \uC8FC"):n("calendar.prevMonth","\uC774\uC804 \uB2EC"),f=p==="week"?n("calendar.nextWeek","\uB2E4\uC74C \uC8FC"):n("calendar.nextMonth","\uB2E4\uC74C \uB2EC");return t.jsxs("div",{className:le("chart-section__controls"),children:[t.jsx(be,{htmlType:"button",size:da,type:"dot",icon:"chevron-left",ariaLabel:d,showTooltipInfo:d,disabled:r===a.length-1,onClick:i}),t.jsx(An,{value:s,onChange:l,options:a,size:da,className:"month-dropdown",ariaLabel:n("calendar.rangeSelect","\uAE30\uAC04 \uC120\uD0DD")}),t.jsx(be,{htmlType:"button",size:da,type:"dot",icon:"chevron-right",ariaLabel:f,showTooltipInfo:f,disabled:r<=0,onClick:u}),t.jsx(kn,{ariaLabel:n("calendar.periodSelect","\uAE30\uAC04 \uB2E8\uC704"),options:c,value:p,onChange:C=>h(C),size:da})]})}function is(e,n,a,r=!0){const s=new Date(a.getFullYear(),a.getMonth(),a.getDate());return Array.from({length:7},(l,i)=>{const u=new Date(n);u.setDate(n.getDate()+i);const c=(e[ss(u)]?.daily??[])[u.getDate()-1],p=c!=null&&Un(c,r)||u>s;return{dt:u,entry:c,isFuture:p}})}function $x(e,n,a,r=!0){const{period:s,monthRange:l,weekRange:i,weekRanges:u,DOW:c}=n,p=wa(),h=p.getFullYear(),d=p.getMonth()+1,f=p.getDate();if(s==="month"){const y=e[l]??{weekly:[],daily:[]},b=Sa(l),v=b?b.year:null,_=b?b.month1:null,g=v&&_?Rn(v,_-1):1;return y.weekly.map((w,N)=>{const m=N+1;let A=w.label,B=!1,j=!1;if(v&&_){const k=g+N*7,E=new Date(v,_-1,k+6),D=E.getMonth()+1,$=E.getDate(),V=D===_?`${$}`:`${D}/${$}`;A=a("manager.chart.weekRange",{start:k,end:V});const F=new Date(h,d-1,f).getTime();B=F>=new Date(v,_-1,k).getTime()&&F<=E.getTime(),j=v>h||v===h&&(_>d||_===d&&k>f)}return{...w,label:A,sublabel:sc(a,m-1),isToday:B,future:w.future===!0||j||void 0,a:j?-1:w.a,b:j?0:w.b}})}const C=u.find(y=>y.value===i);if(!C)return[];const x=new Date(C.year,C.month-1,Rn(C.year,C.month-1)+C.week*7);return is(e,x,p,r).map(({dt:y,entry:b,isFuture:v})=>{const _=y.getMonth()+1,g=y.getDate(),w=y.getFullYear();return{label:_===C.month&&w===C.year?`${g}`:`${_}/${g}`,sublabel:c[y.getDay()]??"",future:v||void 0,a:v?-1:b&&b.a>0?b.a:0,b:v?0:b&&b.b>0?b.b:0,isToday:w===h&&_===d&&g===f,...b?.parts?{parts:v?b.parts.map(()=>0):b.parts}:{},...b?.partsB?{partsB:v?b.partsB.map(()=>0):b.partsB}:{}}})}const Lx={small:{height:100,barWidth:16},medium:{height:140,barWidth:20},large:{height:180,barWidth:24}};function Rx({canvasHeight:e,fitHeight:n,focusableBars:a,size:r="medium",barWidth:s,titleKey:l,titleLevel:i,data:u,colorA:c,colorB:p,labelAKey:h,labelBKey:d,showTotal:f=!1,totalUnitKey:C,totalLabelKey:x,control:y,hideControls:b=!1,rate:v=!1,rateAgg:_="dayMean",tightMax:g=!1,avgMode:w=!1,totalFormat:N,series:m,seriesMode:A="stack",loading:B=!1,onDetail:j,headExtra:k,headSegment:E,icon:D,disc:$,onClick:V,cardAriaLabel:F,cardTooltip:U,detailSize:T=da,barGap:z,baseline:W,className:ie,inGrid:Q=!1}){const{t:L}=Ee.useTranslation(),J={...Lx[r],...e===void 0?null:{height:e}},ee=lc(u),q=y??ee,P=o.useMemo(()=>$x(u,q,L,W==null),[u,q,L,W]),R=A==="group"&&!!m&&m.length>0;z!=null&&!R&&jt("bar-chart-bargap-without-group","[BarChart] barGap \uC740 seriesMode='group' + series \uC5D0\uC11C\uB9CC \uC4F0\uC778\uB2E4 \u2014 \uADF8 \uBC16\uC5D0\uC11C\uB294 \uC544\uBB34 \uC77C\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4.");const S=o.useMemo(()=>{if(!v)return P;const O=q.period==="month"?Sa(q.monthRange):null,I=wa(),re=m?.length??0,he=ae=>{const _e=[],De=[],Se=[];for(let Ne=0;Ne<re;Ne++){let He=0,ve=0,xe=0;for(const we of ae){const Ae=Pt(we.a[Ne]),Ie=Pt(we.b[Ne]);Ie<=0||(He+=Ae,ve+=Ie,xe+=Ae/Ie*100)}_e.push(_==="weighted"?ve>0?Math.round(He/ve*100):0:ae.length?Math.round(xe/ae.length):0),De.push(He),Se.push(ve)}return{pct:_e,ra:De,rb:Se}};return P.map((ae,_e)=>{let De=ae.a===-1?-1:ae.b>0?Math.round(ae.a/ae.b*100):0;if(O&&!Un(ae)){const Ne=O.year,He=O.month1-1,ve=is(u,new Date(Ne,He,Rn(Ne,He)+_e*7),I).filter(xe=>!xe.isFuture);if(_==="weighted"){let xe=0,we=0;for(const{entry:Ae}of ve)Ae&&Ae.b>0&&(xe+=Ae.a,we+=Ae.b);De=we>0?Math.round(xe/we*100):0}else De=ve.length?Math.round(ve.reduce((xe,{entry:we})=>xe+(we&&we.b>0?we.a/we.b*100:0),0)/ve.length):0}let Se=null;if(R&&!Un(ae)){let Ne;if(O){const ve=O.year,xe=O.month1-1;Ne=is(u,new Date(ve,xe,Rn(ve,xe)+_e*7),I).filter(we=>!we.isFuture).map(({entry:we})=>({a:we?.parts??[],b:we?.partsB??[]}))}else Ne=[{a:ae.parts??[],b:ae.partsB??[]}];const He=he(Ne);Se={parts:He.pct,rawParts:He.ra,rawPartsB:He.rb}}return{...ae,a:De,b:ae.a===-1?0:d&&ae.parts&&ae.parts[1]>0?Math.round(ae.parts[0]/ae.parts[1]*100):0,rawA:ae.a===-1?-1:ae.a,rawB:ae.b,...Se??{}}})},[P,v,_,d,q.period,q.monthRange,u,R,m?.length]),H=o.useMemo(()=>{if(v||w){const I=(q.period==="week"?P:u[q.monthRange]?.daily??[]).filter(he=>he.a!==-1);if(I.length===0)return 0;if(v&&_==="weighted"){let he=0,ae=0;for(const _e of I)_e.b>0&&(he+=_e.a,ae+=_e.b);return ae>0?Math.round(he/ae*100):0}const re=v?I.reduce((he,ae)=>he+(ae.b>0?ae.a/ae.b*100:0),0):I.reduce((he,ae)=>he+(ae.a>0?ae.a:0),0);return Math.round(re/I.length)}const O=q.period==="month"?u[q.monthRange]?.daily??[]:S;return W!=null?O.reduce((I,re)=>I+(Un(re,!1)?0:Pt(re.a)+(d?Pt(re.b):0)),0):O.reduce((I,re)=>I+(re.a>0?re.a:0)+(d&&re.b>0?re.b:0),0)},[S,P,v,_,w,W,d,q.period,q.monthRange,u]),ne=m&&m.length>0?m.map(O=>({color:O.color,label:O.label})):[{color:c,label:L(h)},...d?[{color:p,label:L(d)}]:[]],te=r==="small",ue=r==="large",se=te?"medium":ue?"xLarge":"large",pe=ie||void 0,G=l?L(l):"",K=G?L("trainingStatus.detailFor",{name:G,defaultValue:"{{name}} \uC0C1\uC138\uBCF4\uAE30"}):L("trainingStatus.detail","\uC0C1\uC138\uBCF4\uAE30");return t.jsx(Ir,{className:pe,size:se,inGrid:Q,icon:D,disc:$,onClick:V,ariaLabel:F,tooltip:U,headSegment:E,headMenuItems:j?[{label:K,icon:"list",onClick:j,closeOnSelect:!0}]:void 0,title:L(l),titleLevel:i,headRight:te?k??void 0:({collapsed:O})=>t.jsxs(t.Fragment,{children:[!b&&t.jsx(ic,{control:q}),k,j&&!O&&t.jsx("span",{className:le("bar-chart__detail-btn"),children:t.jsx(be,{htmlType:"button",size:T,type:"dot",icon:"list",ariaLabel:K,showTooltipInfo:K,onClick:j})})]}),legend:t.jsx(os,{items:ne,className:"caption-1"}),fitBody:n,subRow:f&&t.jsx(t.Fragment,{children:v||w||x&&N?t.jsx(Da,{label:te?void 0:`${L(q.period==="week"?"manager.chart.weeklyPrefix":"manager.chart.monthlyPrefix")} ${L(x??h)}`,children:N?(N(H).match(/([+-]?\d[\d.,]*|[^\d]+)/g)??[]).map((O,I)=>/\d/.test(O)?t.jsx("span",{className:le(pa(!ue)),children:O},I):t.jsx("span",{className:le("chart-section__total__unit body-3"),children:O},I)):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:le(pa(!ue)),children:H}),C&&t.jsx("span",{className:le("chart-section__total__unit body-3"),children:L(C)})]})}):t.jsxs(Da,{children:[t.jsx("span",{className:le(pa(!ue)),children:H}),t.jsx("span",{className:le("chart-section__total__unit body-3"),children:L(h)}),C&&t.jsx("span",{className:le("chart-section__total__unit body-3"),children:L(C)})]})}),children:B?t.jsx("div",{className:le("bar-chart__wrap bar-chart__loading"),"aria-busy":"true",children:t.jsx("div",{className:le("bar-chart__inner"),children:t.jsxs("div",{className:le("bar-chart__area bar-chart__area--loading"),children:[t.jsx("div",{className:le("bar-chart__plot bar-chart__plot--loading"),style:{height:J.height},children:t.jsx(ka,{size:32})}),t.jsx("div",{className:le("bar-chart__x-axis"),"aria-hidden":"true",children:t.jsxs("span",{className:le("bar-chart__x-axis__label"),children:[t.jsx("span",{className:le("caption-1 bar-chart__x-axis__main"),children:"\xA0"}),S.some(O=>!!O.sublabel)&&t.jsx("span",{className:"caption-1",children:"\xA0"})]})})]})})}):t.jsx(Mx,{focusableBars:a,data:S,colorA:c,colorB:d?p:void 0,labelA:L(h),labelB:d?L(d):void 0,barWidth:s??J.barWidth,barGap:z,baseline:W,height:J.height,fitHeight:n,maxOverride:v?100:void 0,tightMax:g,seriesColors:m?.map(O=>O.color),seriesLabels:m?.map(O=>O.label),rateLabels:v?{total:L("trainingStatus.today.tooltipTotal","\uC804\uCCB4"),done:L("trainingStatus.today.tooltipDone","\uC644\uB8CC")}:void 0,grouped:R})})}const uc=120,Px={left:38,right:16,top:26,bottom:24};function Fx({points:e=[],range:n,ticks:a=[],axisTitle:r,color:s,height:l=156,fallbackWidth:i=320,insets:u,overlay:c,ariaLabel:p,className:h}){const[d,f]=o.useState(null),[C,x]=o.useState(null);o.useEffect(()=>{if(!C)return;const T=W=>f(Math.round(W)||null);if(T(C.getBoundingClientRect().width),typeof ResizeObserver>"u")return;const z=new ResizeObserver(([W])=>T(W.contentRect.width));return z.observe(C),()=>{z.disconnect()}},[C]);const{payload:y,anchorRect:b,openAfterDelay:v,close:_}=g2(uc),g=o.useCallback((T,z)=>{T&&v(T,z.getBoundingClientRect())},[v]),w=d??i,N=l,{left:m,right:A,top:B,bottom:j}={...Px,...u},[k,E]=n,D=T=>E===k?m:m+(w-m-A)*(T-k)/(E-k),$=T=>B+(N-B-j)*(100-T)/100,V={x:D,y:$,plot:{left:m,right:w-A,top:B,bottom:N-j,width:Math.max(0,w-m-A),height:Math.max(0,N-B-j)}},F=e.filter(T=>!T.hollow),U=s??"var(--color-main)";return t.jsxs(t.Fragment,{children:[t.jsxs("svg",{ref:x,className:ke("line-chart",h),viewBox:`0 0 ${w} ${N}`,role:"img","aria-label":p??e.map(T=>T.description).filter(Boolean).join(", "),children:[r&&t.jsx("text",{className:"line-chart__axis-title",x:0,y:12,children:r}),[0,100].map(T=>t.jsxs("g",{children:[t.jsx("line",{className:"line-chart__grid",x1:m,x2:w-A,y1:$(T),y2:$(T)}),t.jsxs("text",{className:"line-chart__tick",x:m-6,y:$(T)+4,textAnchor:"end",children:[T,"%"]})]},T)),c?.(V),a.map(T=>t.jsx("text",{className:"line-chart__tick",x:D(T.x),y:N-5,textAnchor:"middle",children:T.label},T.x)),F.length>1&&t.jsx("polyline",{className:"line-chart__line",fill:"none",stroke:U,points:F.map(T=>`${D(T.x)},${$(T.pct)}`).join(" ")}),e.map(T=>t.jsxs("g",{className:"line-chart__dot",onPointerEnter:z=>g(T.description,z.currentTarget),onPointerLeave:_,children:[t.jsx("circle",{className:"line-chart__dot-hit",cx:D(T.x),cy:$(T.pct),r:12}),t.jsx("circle",{className:ke("line-chart__dot-main",T.hollow&&"is-hollow"),cx:D(T.x),cy:$(T.pct),r:4,stroke:U,fill:T.hollow?void 0:U})]},T.x))]}),y!=null&&t.jsx(Bn,{anchorRect:b,offset:10,closeOnOutsideClick:!1,className:"line-chart__tip",role:"tooltip",ariaLabel:y,children:y})]})}function Ix({icon:e,iconSize:n=56,title:a,titleClass:r="h2",description:s,tipGroups:l,start:i,className:u}){return t.jsxs("div",{className:ke("game-intro",u),children:[e!=null&&t.jsx("span",{className:"game-intro__icon","aria-hidden":"true",style:{"--game-intro-icon":`${n}px`},children:e}),t.jsx("h2",{className:ke("game-intro__title",r),children:a}),s!=null&&t.jsx("p",{className:"game-intro__description body-3",children:s}),l?.map((c,p)=>t.jsxs("div",{className:"game-intro__tips",children:[c.title!=null&&t.jsx("span",{className:"game-intro__tips-title body-3",children:c.title}),c.tips.map((h,d)=>t.jsxs("span",{className:"game-intro__tip body-3",children:[h.icon!=null&&t.jsx("span",{"aria-hidden":"true",children:h.icon}),t.jsx("span",{children:h.text})]},d))]},p)),i&&t.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 cc=(e,n,a)=>{const r=new Date(Date.UTC(e,n,a));return`${r.getUTCFullYear()}-${String(r.getUTCMonth()+1).padStart(2,"0")}-${String(r.getUTCDate()).padStart(2,"0")}`},dc=(e,n,a,r)=>({from:di(e,n,a),to:new Date(di(e,n,a+r).getTime()-1),fromYmd:cc(e,n,a),toYmd:cc(e,n,a+r-1)});function Ox(e,n=0){if(e.period==="month"){const s=Sa(e.monthRange),l=wa(),i=s?s.year:l.getFullYear(),u=(s?s.month1:l.getMonth()+1)-1+n,c=new Date(Date.UTC(i,u+1,0)).getUTCDate();return dc(i,u,1,c)}const a=e.weekRanges.find(s=>s.value===e.weekRange);if(!a){const s=new Date,l=Xa();return{from:s,to:s,fromYmd:l,toYmd:l}}const r=Rn(a.year,a.month-1);return dc(a.year,a.month-1,r+(a.week+n)*7,7)}const us={small:{diameter:96,strokeWidth:16},medium:{diameter:120,strokeWidth:18},large:{diameter:160,strokeWidth:22}};function pc(e){return!Number.isFinite(e)||e<=0?0:e>=1?100:Math.min(99,Math.max(1,Math.round(e*100)))}function hc({done:e,total:n,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:us[s].diameter,h=l??(typeof s=="number"?12:us[s].strokeWidth),d=p/2,f=(p-h)/2,C=2*Math.PI*f;if(a&&a.length>0){const v=a.reduce((_,g)=>{const w=_.length>0?_[_.length-1].acc:0,N=Number.isFinite(g.ratio)?g.ratio:0,m=Math.max(0,Math.min(N,1-w));return _.push({color:g.color,rotate:-90+w*360,dash:C*m,acc:w+m}),_},[]);return t.jsx("div",{className:"ring-chart",style:{width:p,height:p},children:t.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[t.jsx("circle",{cx:d,cy:d,r:f,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),v.map((_,g)=>_.dash>0&&t.jsx("circle",{cx:d,cy:d,r:f,fill:"none",stroke:_.color,strokeWidth:h,strokeDasharray:`${_.dash} ${C}`,strokeLinecap:"round",transform:`rotate(${_.rotate} ${d} ${d})`},g))]})})}const x=(n??0)>0?Math.min((e??0)/n,1):0,y=C*x,b=C-y;return t.jsxs("div",{className:"ring-chart",style:{width:p,height:p},children:[t.jsxs("svg",{width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",children:[t.jsx("circle",{cx:d,cy:d,r:f,fill:"none",stroke:"var(--color-whiteLine)",strokeWidth:h}),x>0&&t.jsx("circle",{cx:d,cy:d,r:f,fill:"none",stroke:r,strokeWidth:h,strokeDasharray:`${y} ${b}`,strokeLinecap:x<.02||x>.98?"butt":"round",transform:`rotate(-90 ${d} ${d})`})]}),!u&&t.jsxs("div",{className:`ring-chart__center${c?"":` ${p<=96?"ring-chart__center--small":s==="medium"?"ring-chart__center--medium":"ring-chart__center--large"}`}`,children:[t.jsx("span",{className:`ring-chart__pct ${p<=96?"h2":"h1"}`,children:pc(x)}),!c&&t.jsx("span",{className:`ring-chart__label ${p<=96?"caption-2":"caption-1"}${p<=96||s==="medium"?" ring-chart__label--tight":""}`,children:i})]})]})}function zx({titleKey:e,titleLevel:n,headRight:a,icon:r,showTotal:s,totalLabelKey:l,legend:i,loading:u,className:c,inGrid:p=!1,onClick:h,ariaLabel:d,tooltip:f,...C}){const{t:x}=Ee.useTranslation();if(!e)return t.jsx(hc,{...C});const y=(C.total??0)>0?pc(Math.min((C.done??0)/C.total,1)):0,b=C.size==="small",v=typeof C.size=="number"?C.size:us[C.size??"medium"].diameter,_=C.size==="large",g=b?"medium":_?"xLarge":"large",w=c||void 0,N=r&&t.jsx("span",{className:le("chart-section__head-icon"),children:t.jsx(dt,{icon:r,className:le("chart-section__head-icon-inner")})});return t.jsx(Ir,{className:w,size:g,inGrid:p,onClick:h,ariaLabel:d,tooltip:f,title:x(e),titleLevel:n,headRight:N||(b?void 0:a),legend:i&&t.jsx(os,{items:i}),subRow:s&&t.jsxs(Da,{label:!b&&l?x(l):void 0,children:[t.jsx("span",{className:le(pa(b)),children:y}),t.jsx("span",{className:le("chart-section__total__unit body-3"),children:"%"})]}),children:u?t.jsx("div",{className:le("ring-chart-section-body ring-chart-section-body--offset"),children:t.jsx("div",{className:"ring-chart ring-chart--loading",style:{width:v,height:v},"aria-busy":"true",children:t.jsx(ka,{size:32})})}):t.jsx("div",{className:le("ring-chart-section-body ring-chart-section-body--offset"),children:t.jsx(hc,{...C,hideCenter:C.hideCenter??b})})})}function Wx({label:e,value:n,change:a,changeType:r,icon:s,tooltip:l,onClick:i,size:u="small",bodyAlign:c="bottom",children:p}){return t.jsx(Ir,{type:"stat",title:e,totalNum:n,change:a,changeType:r,icon:s,tooltip:l,onClick:i,size:u,bodyAlign:c,children:p})}function mc({value:e,onChange:n,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:f,labelPos:C,labelAlign:x="right",showMinMax:y=!1,minLabel:b,maxLabel:v,showBgTick:_=!1,showFillTick:g=!1,tickStep:w,tickShape:N="dot"}){n&&!c&&jt("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 m=Math.min(r,Math.max(a,e)),A=r>a?(m-a)/(r-a):0,B=l==="vertical",j=!n,k=ee=>n?.(Number(ee.target.value)),E=typeof p=="number"?`${p}px`:p,D={"--slider-ratio":String(A),"--slider-thumb":`${i}px`,...E?B?{height:E}:{width:E}:{}},$=w??s,V=(_||g)&&$>0&&r>a?Math.floor((r-a)/$+1e-6):0;if(V>0&&V<=100){const ee=N!=="dash",q=ne=>ee?`radial-gradient(circle, ${ne} 0.5px, transparent 1px)`:B?`linear-gradient(to bottom, transparent calc(50% - 2px), ${ne} calc(50% - 2px), ${ne} calc(50% + 2px), transparent calc(50% + 2px))`:`linear-gradient(to right, transparent calc(50% - 2px), ${ne} calc(50% - 2px), ${ne} calc(50% + 2px), transparent calc(50% + 2px))`,P=ee?"2px":"4px",R=[],S=[],H=[];for(let ne=0;ne<=V;ne++){const te=ne*$/(r-a);if(te>1+1e-6)break;const ue=`${((B?1-te:te)*100).toFixed(4)}%`,se=te<=A+1e-6;if(se?!g:!_)continue;const pe=se?"var(--slider-tick-color-on-fill, var(--color-deepWhite))":"var(--slider-tick-color, var(--color-lightGray))";R.push(q(pe)),S.push(B?`${P} var(--slider-thumb)`:`var(--slider-thumb) ${P}`),H.push(B?`center ${ue}`:`${ue} center`)}R.push(B?"linear-gradient(to top, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))":"linear-gradient(to right, var(--slider-fill-color) var(--slider-fill), var(--color-darkWhite) var(--slider-fill))"),S.push("100% 100%"),H.push("0 0"),D.backgroundImage=R.join(", "),D.backgroundSize=S.join(", "),D.backgroundPosition=H.join(", "),D.backgroundRepeat="no-repeat"}const F=f?f(m):d==="percent"?`${Math.round(r>a?(m-a)/(r-a)*100:0)}%`:d==="count"?`${m} / ${r}`:m===a&&b?b:m===r&&v?v:void 0,U=t.jsx("input",{type:"range",className:ke("slider",`slider--${l}`,j&&"slider--static",!d&&!y&&h),min:a,max:r,step:s,value:m,disabled:u,readOnly:j,tabIndex:j?-1:void 0,"aria-label":c,"aria-valuetext":F,"aria-orientation":l,onChange:k,style:D});if(!d&&!y)return U;const T=t.jsx("span",{className:"slider-wrap__minmax caption-1",children:b??a}),z=t.jsx("span",{className:"slider-wrap__minmax caption-1",children:v??r}),W=y?t.jsxs("div",{className:ke("slider-track-group",`slider-track-group--${l}`,!d&&h),children:[B?z:T,U,B?T:z]}):U;if(!d)return W;const ie=C??(B?"bottom":"right"),Q=`${Math.round(r>a?(m-a)/(r-a)*100:0)}%`,L=f?f(m):d==="percent"?Q:d==="count"?`${m} / ${r}`:String(m),J=t.jsx("span",{className:"slider-wrap__value body-3b",children:L});return t.jsxs("div",{className:ke("slider-wrap",`slider-wrap--${l}`,`slider-wrap--label-${ie}`,`slider-wrap--align-${x}`,h),children:[W,J]})}const Hx=.86,Vx=250,cs=(e,n,a,r)=>Math.round(Math.min(r,Math.max(a,e-n))),ds=(e,n,a,r)=>{const s=cs(e,n,a,r);return`${s<0?"-":"+"}${Math.abs(s)} dB`};function ps({analyser:e,audioElement:n,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:f}){const C=o.useRef(null),x=o.useRef(null),y=o.useRef(null),b=o.useRef(null),[v,_]=o.useState(null);o.useEffect(()=>{const m=U=>{const T=ds(U,c,p,h);y.current&&(y.current.textContent=T);const z=C.current;z&&(z.setAttribute("aria-valuenow",String(cs(U,c,p,h))),z.setAttribute("aria-valuetext",T))},A=e??vC(n)??(v&&v.el===n?v.node:null),B=x.current;if(!A||!B){B?.style.setProperty("--meter-level","0"),m(u);let U=!1;return!e&&n&&vr(n).then(T=>{!U&&T&&_({el:n,node:T})}),()=>{U=!0}}wo();const j=new Float32Array(A.fftSize);let k=0,E=0,D=0,$=0,V=null;const F=U=>{const T=xC(A,j);k=T>k?T:k*Hx;const z=k>1e-5?20*Math.log10(k):-1/0,W=Math.max(u,z),ie=W-c,Q=Math.min(1,Math.max(0,(ie-p)/(h-p)));if(B.style.setProperty("--meter-level",Q.toFixed(3)),E+=W,D+=1,U-$>=Vx){const L=E/D;V=V==null?L:V*.6+L*.4,m(V),E=0,D=0,$=U}b.current=requestAnimationFrame(F)};return b.current=requestAnimationFrame(F),()=>{b.current!=null&&cancelAnimationFrame(b.current),b.current=null}},[e,n,v,u,c,p,h]);const g=typeof r=="number"?`${r}px`:r,w=t.jsx("div",{className:"audio-meter__track",style:g?a==="vertical"?{height:g}:{width:g}:{},children:t.jsx("div",{ref:x,className:"audio-meter__fill"})}),N=l??(a==="vertical"?"bottom":"right");return t.jsxs("div",{ref:C,className:ke("audio-meter",`audio-meter--${a}`,s&&`audio-meter--label-${N}`,s&&`audio-meter--align-${i}`,d),role:"meter","aria-label":f,"aria-valuemin":p,"aria-valuemax":h,"aria-valuenow":cs(u,c,p,h),"aria-valuetext":ds(u,c,p,h),children:[w,s&&t.jsx("span",{ref:y,className:"audio-meter__value caption-2",children:ds(u,c,p,h)})]})}const fc=260;function Cc({message:e,position:n,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(""),f=o.useRef(r);o.useEffect(()=>{f.current=r});const C=a,x=o.useRef(null),y=o.useRef(0),b=o.useRef(0),v=o.useRef(!1),_=o.useRef(null),g=o.useRef(null),w=o.useRef(null),N=o.useRef(null),m=o.useRef(()=>{});m.current=j=>{j<0||(y.current=Date.now(),b.current=j,x.current=setTimeout(()=>{x.current=null,l(!1),_.current=setTimeout(()=>{u(!1);try{f.current()}catch{}},fc)},j))};const A=o.useCallback(()=>{v.current||!x.current||(v.current=!0,clearTimeout(x.current),x.current=null,b.current=Math.max(0,b.current-(Date.now()-y.current)))},[]),B=o.useCallback(()=>{v.current&&(v.current=!1,m.current(b.current))},[]);return o.useEffect(()=>{if(e!==d.current&&(x.current&&(clearTimeout(x.current),x.current=null),_.current&&(clearTimeout(_.current),_.current=null)),e){if(p.current)return C>0&&!x.current&&(v.current?b.current=C:m.current(C)),d.current=e,()=>{x.current&&(clearTimeout(x.current),x.current=null),_.current&&(clearTimeout(_.current),_.current=null)};const j=()=>{const k=h.current;if(k)try{k.classList.remove("is-visible"),k.style.transition="none",n==="top"?k.style.transform="translateX(-50%) translateY(-16px)":k.style.transform="translateX(-50%) translateY(16px)",k.style.opacity="0",k.offsetWidth,k.style.transition="",k.classList.add("is-visible"),N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{N.current=null;try{k.style.opacity="",k.style.transform="",k.style.transition=""}catch{}},60)}catch{}};c.current?(j(),l(!0)):(u(!0),g.current=requestAnimationFrame(()=>{w.current=requestAnimationFrame(()=>{j(),l(!0)})})),C>0&&(v.current=!1,m.current(C))}else l(!1),_.current=setTimeout(()=>u(!1),fc);return d.current=e,()=>{x.current&&clearTimeout(x.current),_.current&&clearTimeout(_.current),g.current&&cancelAnimationFrame(g.current),w.current&&cancelAnimationFrame(w.current),N.current&&clearTimeout(N.current),x.current=null,_.current=null,g.current=null,w.current=null,N.current=null}},[e,C,n]),{mounted:i,showing:s,popupRef:h,pause:A,resume:B}}function Ta({message:e="",position:n="top",type:a="normal",onClose:r=()=>{},duration:s=2e3}){const{mounted:l,showing:i,popupRef:u,pause:c,resume:p}=Cc({message:e,position:n,duration:s,onClose:r}),h=o.useRef(null),[d,f]=o.useState(!1);if(o.useEffect(()=>{i?f(!0):l||f(!1)},[i,l]),!l)return null;const C=a==="notice"||a==="warning"?a:"normal",x=t.jsx("div",{ref:u,className:`toast toast--${n} ${i?"is-visible":""}`,role:"status","aria-live":"polite",onPointerEnter:y=>{h.current=y.pointerType},onMouseEnter:()=>{h.current!=="touch"&&c()},onMouseLeave:p,onFocusCapture:c,onBlurCapture:p,children:t.jsx("div",{className:`toast__inner toast__inner--${C} body-2`,"aria-hidden":d||i?void 0:!0,children:t.jsx("span",{className:"toast__text",children:e})})});return typeof document<"u"?gn.createPortal(x,document.body):x}const qx=24;function Ux({value:e,max:n=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(n)&&n>0?n:1,f=Math.max(0,Math.min(Number.isFinite(e)?e:0,d)),C=f/d*100,x=Number.isFinite(n)&&n>0?n:0,y=u??(a>=qx?"inside":"bottom"),b=y==="center"?"inside":y,v=b==="inside"&&(c==="left"?C>=15:c==="center"?C>=50:C>=85),_={};return r&&(_["--progress-bar-fill"]=r),s&&(_["--progress-bar-track"]=s),t.jsxs("div",{className:ke("progress-bar",`progress-bar--${a}`,`progress-bar--label-${b}`,l&&`progress-bar--align-${c}`,l&&v&&"progress-bar--label-on-fill",h),style:_,children:[t.jsx("div",{className:"progress-bar__track",role:"progressbar","aria-valuenow":f,"aria-valuemin":0,"aria-valuemax":x,"aria-valuetext":l?i?i(f):l==="percent"?void 0:l==="raw"?String(f):`${f} / ${x}`:void 0,"aria-label":p,children:t.jsx("div",{className:"progress-bar__fill",style:{width:`${C}%`}})}),l&&t.jsx("span",{className:"progress-bar__label caption-1b",children:i?i(f):l==="percent"?`${Math.round(C)}%`:l==="raw"?String(f):`${f} / ${x}`})]})}const gc={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},Gx="rgba(255, 255, 255, 0.16)";function bc({max:e,index:n,inactiveBg:a,inactiveColor:r,transparent:s,variant:l="numbered",announce:i=!1,ariaLabel:u}){const{t:c}=Ee.useTranslation(),p=wn("(max-width: 767px)");if(!Number.isInteger(e)||e<=0)return null;const h=Number.isInteger(n)?Math.max(0,Math.min(n,e-1)):0,d=u??c("progress.steps",{current:h+1,total:e,defaultValue:"\uC9C4\uD589 \uB2E8\uACC4 {{current}} / {{total}}"}),f={};if(a&&(f["--pi-inactive-bg"]=a),r&&(f["--pi-inactive-color"]=r),s&&(a||(f["--pi-inactive-bg"]=Gx),r||(f["--pi-inactive-color"]="var(--color-white)")),l==="dot")return t.jsxs("div",{className:"progress-indicator progress-indicator--dot",style:f,role:i?"status":"img","aria-label":i?void 0:d,children:[i&&t.jsx("span",{style:gc,children:d}),Array.from({length:e}).map((x,y)=>t.jsx("span",{"aria-hidden":"true",className:`progress-indicator-dot--dot${y<h?" done":y===h?" active":""}`},y))]});const C=i?t.jsx("span",{role:"status",style:gc,children:d}):null;return p?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"progress-indicator progress-indicator--mobile",style:f,role:"list","aria-label":d,children:t.jsxs("span",{role:"listitem",className:"progress-indicator-dot active body-3",children:[h+1," / ",e]})}),C]}):t.jsxs(t.Fragment,{children:[C,t.jsx("div",{className:"progress-indicator",style:f,role:"list","aria-label":d,children:Array.from({length:e}).map((x,y)=>t.jsx("span",{role:"listitem","aria-current":y===h?"step":void 0,className:`progress-indicator-dot ${y<h?" done":y===h?" active":""} body-3`,children:y+1},y))})]})}function Kx(e){if(!e)return[];const n=[];let a=0,r="";for(const s of e.trim()){if(s==="("?a++:s===")"&&a--,/\s/.test(s)&&a===0){r&&(n.push(r),r="");continue}r+=s}return r&&n.push(r),n}function Yx(e,n,a=0){const r=Array.from({length:Math.max(0,n)},()=>0);for(const s of e){let l=0;for(const i of s){if(l>=r.length)break;const u=yc(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 yc(e){const n=typeof e=="number"?e:parseInt(String(e??""),10);return Number.isFinite(n)&&n>=1?Math.floor(n):1}function Zx(e,n){const a=/span\s+(\d+)/.exec(`${e??""} ${n??""}`);return a?yc(parseInt(a[1],10)):1}function Xx(e,n){const{isFixed:a,floorOf:r,containerWidth:s}=n;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 Jx(e,n){const{isFixed:a,floorOf:r,containerWidth:s}=n,l=e.reduce((d,f,C)=>d+(a(C)?f:0),0),i=e.reduce((d,f,C)=>d+(a(C)?0:f),0),u=s-l;if(!(s>0&&i>0&&u>0))return[...e];const c=u/i,p=e.map((d,f)=>a(f)?d:Math.max(r(f),Math.round(d*c))),h=Math.round(u-p.reduce((d,f,C)=>d+(a(C)?0:f),0));if(h!==0){let d=-1;p.forEach((f,C)=>{!a(C)&&(d<0||f>p[d])&&(d=C)}),d>=0&&(p[d]=Math.max(r(d),p[d]+h))}return p}const Qx=16;function e4(e,n=Qx){return e.map(a=>{const r=a.sortable&&!a.sorted;return Math.max(a.declaredMin,Math.ceil(a.headWidth+(r?n:0)))})}const vc="declared";function t4({children:e,className:n,style:a,span:r,rowLabel:s,onRowClick:l}){const i=r&&r>1?{gridColumn:`span ${r}`,...a}:a;return t.jsx("div",{role:"cell",className:n?`table-cell ${n}`:"table-cell",style:i,"aria-colspan":r&&r>1?r:void 0,children:s&&l?t.jsx("button",{type:"button",className:"table-cell__row-button","aria-label":s,children:e}):e})}function hs({variant:e="default",children:n,className:a,draggable:r,onClick:s,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,expandedContent:p,colSpan:h,describedBy:d,rowHasButton:f}){const C=o.useCallback(x=>{s&&x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),s())},[s]);return e==="loading"?t.jsx("div",{role:"presentation",className:"table-row-wrap",children:t.jsx("div",{role:"row",className:"table-row table-row--loading",children:t.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:t.jsx(ka,{size:28})})})}):e==="empty"?t.jsx("div",{role:"presentation",className:"table-row-wrap",children:t.jsx("div",{role:"row",className:"table-row table-row--empty body-3",children:t.jsx("div",{role:"cell","aria-colspan":h,className:"table-row__full-cell",children:n})})}):t.jsxs("div",{role:"presentation",className:"table-row-wrap",children:[t.jsx("div",{className:a?`table-row ${a}`:"table-row",draggable:r,onClick:s,onKeyDown:s?C:void 0,onMouseEnter:l,onMouseLeave:i,onDragStart:u,onDragEnd:c,role:"row",tabIndex:s&&!f?0:void 0,"aria-describedby":s&&!f?d:void 0,children:n}),p&&t.jsx("div",{role:"row",className:"table-row-expand",children:t.jsx("div",{role:"cell","aria-colspan":h,className:"table-row-expand__cell",children:p})})]})}function n4({dir:e}){return t.jsx(e==="asc"?yl:bl,{className:"table-field__sort-arrow",size:16,strokeWidth:2})}function a4({children:e,onClick:n,className:a,sortDir:r,ariaSort:s,onResizeStart:l}){const i=t.jsxs(t.Fragment,{children:[e,r&&t.jsx(n4,{dir:r})]});return t.jsxs("div",{onClick:n,role:"columnheader","aria-sort":s,className:ke("table-field body-3",a,r?"table-field--sorted":"",l?"table-field--resizable":""),children:[n?t.jsx("button",{type:"button",className:"table-field__button",children:i}):i,l&&t.jsx("span",{className:"table-field__resizer",onPointerDown:l,onClick:u=>u.stopPropagation(),"aria-hidden":"true"})]})}function xc(e){return e&&e!=="left"?`table-col--${e}`:void 0}function ms({fields:e=[],sort:n,sortable:a=!0,headerGroups:r,items:s=[],renderRow:l,onRowClick:i,isRowClickable:u,onRowMouseEnter:c,onRowMouseLeave:p,onRowDragStart:h,onRowDragEnd:d,draggingId:f,gridTemplateColumns:C,mobileGridTemplateColumns:x,resizable:y=!0,resizeMode:b="grow",resizeStorageKey:v,refitOn:_,title:g,icon:w,count:N,collapsed:m=!1,onToggleCollapse:A,headerActions:B,empty:j,loading:k,dragOver:E=!1,onDragOver:D,onDragLeave:$,onDrop:V,renderExpandedRow:F,expandedId:U}){const T=mn,{t:z}=Ee.useTranslation(),W=o.useId(),ie=`table-title-${W}`,Q=`table-row-hint-${W}`,[L,J]=o.useState(null),ee=o.useCallback((X,Ce=0)=>{if(!(X==null||typeof X=="boolean")){if(typeof X=="string"||typeof X=="number")return String(X);if(!(Ce>6)){if(Array.isArray(X)){const Ge=X.map(Ze=>ee(Ze,Ce+1)).filter(Boolean);return Ge.length?Ge.join(""):void 0}if(o.isValidElement(X))return ee(X.props.children,Ce+1)}}},[]),q=o.useCallback((X,Ce)=>{const Ge=e[Ce];if(!Ge)return;if(Ge.sortValue)return Ge.sortValue(X);if(Ge.sortKey)return X[Ge.sortKey];const Ze=l(X)[Ce]?.content;return typeof Ze=="string"||typeof Ze=="number"?Ze:ee(Ze)},[e,l,ee]),P=!n&&a&&!e.some(X=>X.sortDir!==void 0||X.onClick),R=o.useCallback(X=>{const Ce=e[X];if(!Ce||Ce.sortable===!1)return!1;if(Ce.sortValue||Ce.sortKey)return!0;const Ge=s[0];return Ge!==void 0&&q(Ge,X)!==void 0},[e,s,q]);o.useEffect(()=>{if(!P||s.length===0)return;const X=e.filter((Ce,Ge)=>Ce.sortable!==!1&&!R(Ge));X.length!==0&&jt(`Table/sort-mute/${X.map(Ce=>String(Ce.label??"?")).join(",")}`,`[ihab/Table] \uC815\uB82C\uC5D0\uC11C \uBE60\uC9C4 \uC5F4\uC774 \uC788\uC2B5\uB2C8\uB2E4: ${X.map(Ce=>`'${String(Ce.label??"?")}'`).join(" \xB7 ")}`,`
836
+ \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.")},[P,e,s,R]);const S=o.useMemo(()=>n?e.map(X=>{if(!X.sortKey||X.sortDir!==void 0)return X;const Ce=n.field(String(X.label??""),X.sortKey);return{...X,sortDir:Ce.sortDir,onClick:X.onClick??Ce.onClick}}):P?e.map((X,Ce)=>R(Ce)?{...X,sortDir:L?.index===Ce?L.asc?"asc":"desc":null,onClick:()=>J(Ge=>Ge?.index===Ce?{index:Ce,asc:!Ge.asc}:{index:Ce,asc:!0})}:X):e,[e,n,P,L,R]),H=o.useMemo(()=>{if(!P||!L)return s;const{index:X,asc:Ce}=L;return[...s].sort((Ge,Ze)=>Tr(q(Ge,X),q(Ze,X),Ce))},[s,P,L,q]),ne=wn("(max-width: 767px)"),te=x&&ne?x:null,ue=y&&!ne,se=o.useRef(ue);se.current=ue;const pe=48,G=40,K=o.useRef(()=>pe),O=o.useRef(null),I=v?`table-cols:${v}`:null,re=o.useRef(null),he=o.useRef(null),ae=o.useRef(null),_e=o.useRef(null),[De,Se]=o.useState(!1),[Ne,He]=o.useState(0),ve=o.useCallback(()=>{const X=ae.current;if(!X)return;const Ce=_e.current,Ge=re.current;if(Ce&&(Ce.style.minWidth="",Ge)){const Ze=Ge.scrollWidth,rt=se.current?G:0;Ce.style.minWidth=Ze>X.clientWidth+1?`${Ze+rt}px`:""}Se(X.scrollWidth>X.clientWidth+1),He(X.clientWidth),X.scrollWidth>X.clientWidth+1?X.style.setProperty("--table-visible-w",`${X.clientWidth}px`):X.style.removeProperty("--table-visible-w")},[]),xe=o.useCallback((X,Ce)=>{const Ge=X.current;Ge&&he.current&&he.current.unobserve(Ge),X.current=Ce,Ce?(!he.current&&typeof ResizeObserver<"u"&&(he.current=new ResizeObserver(()=>ve())),he.current?.observe(Ce)):!ae.current&&!_e.current&&(he.current?.disconnect(),he.current=null),ve()},[ve]),we=o.useCallback(X=>xe(ae,X),[xe]),Ae=o.useCallback(X=>xe(_e,X),[xe]);o.useEffect(()=>{ve()}),o.useEffect(()=>{if(typeof window>"u")return;const X=typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>ve()):null;return window.addEventListener("resize",ve),()=>{X!=null&&cancelAnimationFrame(X),window.removeEventListener("resize",ve)}},[ve]);const Ie=o.useRef(()=>!1),ot=o.useRef([]),pt=o.useRef(null),Oe=X=>{if(!X||typeof window>"u")return null;try{const Ce=JSON.parse(window.localStorage.getItem(X)??"null");return Array.isArray(Ce)&&Ce.length>0&&Ce.every(Ge=>typeof Ge=="number"&&Number.isFinite(Ge)&&Ge>0)?Ce:null}catch{return null}},[Ue,at]=o.useState(()=>Oe(I)),[ce,Pe]=o.useState(I),[Ye,Qe]=o.useState(()=>Oe(I)!==null);if(ce!==I){Pe(I);const X=Oe(I);at(X),Qe(X!==null)}const ut=o.useRef(Ue);o.useEffect(()=>{ut.current=Ue},[Ue]);const vt=o.useCallback(X=>{const Ce=pt.current;if(!Ce)return;const Ge=ut.current;if(Ge){const Ze=[...Ge],rt=()=>pe;if(Ce.next!=null&&Ce.startWNext!=null){const mt=X.clientX-Ce.startX,Dt=Math.max(rt()-Ce.startW,Math.min(Ce.startWNext-rt(),mt));Ze[Ce.index]=Ce.startW+Dt,Ze[Ce.next]=Ce.startWNext-Dt}else Ze[Ce.index]=Math.max(rt(),Ce.startW+(X.clientX-Ce.startX));ut.current=Ze,at(Ze)}},[]),ct=o.useCallback(()=>{if(pt.current=null,window.removeEventListener("pointermove",vt),window.removeEventListener("pointerup",ct),window.removeEventListener("pointercancel",ct),document.body.style.cursor="",document.body.style.userSelect="",I&&ut.current)try{window.localStorage.setItem(I,JSON.stringify(ut.current))}catch{}},[vt,I]),Gt=o.useCallback((X,Ce)=>{Ce.preventDefault(),Ce.stopPropagation();const Ge=re.current;if(!Ge)return;const Ze=Array.from(Ge.children).map(mt=>mt.getBoundingClientRect().width),rt=b==="fit"?S.findIndex((mt,Dt)=>Dt>X&&mt.resizable!==!1):-1;pt.current=rt>=0?{index:X,startX:Ce.clientX,startW:Ze[X],next:rt,startWNext:Ze[rt]}:{index:X,startX:Ce.clientX,startW:Ze[X]},ut.current=Ze,at(Ze),Qe(!0),window.addEventListener("pointermove",vt),window.addEventListener("pointerup",ct),window.addEventListener("pointercancel",ct),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[vt,ct,b,S]),xt=o.useCallback(()=>{const X=re.current,Ce=X?.closest(".table-wrap");if(!X||!Ce)return null;const Ge=Ce.style.getPropertyValue("--table-grid-cols");Ce.style.setProperty("--table-grid-cols",S.map(()=>"max-content").join(" "));const Ze=Array.from(Ce.querySelectorAll(".table-row")).filter($t=>!$t.classList.contains("table-row--loading")&&!$t.classList.contains("table-row--empty")),rt=$t=>Array.from($t.children).map(kt=>{const qt=window.getComputedStyle(kt);return{width:kt.getBoundingClientRect().width,span:Zx(qt.gridColumnStart,qt.gridColumnEnd)}}),mt=parseFloat(window.getComputedStyle(X).columnGap)||0,Dt=Ze.map(rt),Lt=rt(X),Dn=Yx([Lt,...Dt],S.length,mt),Zt=e4(S.map(($t,kt)=>({declaredMin:K.current(kt),headWidth:Lt[kt]?.width??0,sortable:$t.sortDir!==void 0||!!$t.onClick,sorted:!!$t.sortDir}))),Sn=$t=>Zt[$t]??K.current($t);O.current=Zt;const cn=S.map(($t,kt)=>{const qt=Dn[kt],Rt=Ie.current(kt)?parseFloat(ot.current[kt]):NaN;return Number.isFinite(Rt)&&Math.ceil(qt)>Rt&&jt(`table-fixed-col-overflow:${kt}:${Rt}`,`[ihabdevteam-core] Table \uC758 ${kt+1}\uBC88\uC9F8 \uC5F4\uC744 ${Rt}px \uB85C \uC815\uD574 \uB450\uC5C8\uB294\uB370 \uC548\uC758 \uB0B4\uC6A9\uC740 ${Math.ceil(qt)}px \uAC00 \uD544\uC694\uD569\uB2C8\uB2E4 \u2014 \uADF8\uB9CC\uD07C \uC798\uB824 \uB098\uAC11\uB2C8\uB2E4. gridTemplateColumns(\uB610\uB294 fields[].width)\uC758 \uADF8 \uC5F4\uC744 ${Math.ceil(qt)}px \uC774\uC0C1\uC73C\uB85C \uB298\uB9AC\uC138\uC694.`),Number.isFinite(Rt)?Rt:Math.max(K.current(kt),Math.ceil(qt))}),Xt=window.getComputedStyle(X),en=(parseFloat(Xt.paddingLeft)||0)+(parseFloat(Xt.paddingRight)||0),Cn=Ce.clientWidth-en;Ge?Ce.style.setProperty("--table-grid-cols",Ge):Ce.style.removeProperty("--table-grid-cols");const tn={isFixed:$t=>Ie.current($t),floorOf:Sn,containerWidth:Cn};return Xx(cn,tn)?vc:Jx(cn,tn)},[S,b]),lt=(X,Ce)=>X!==null&&X.length===Ce.length&&X.every((Ge,Ze)=>Ge===Ce[Ze]),st=o.useRef(xt);o.useEffect(()=>{st.current=xt});const[Ot,Mt]=o.useState(0),Nt=H.length>0,Ft=`${I??""}|${Ot}|${S.length}|${Ne}|${_??""}`,zt=!Ye&&ue&&I!==null&&!k?`${Ft}|${Nt?1:0}`:null,_t=o.useRef(null);o.useEffect(()=>{if(zt===null||!Nt||_t.current===Ft)return;const X=st.current();if(X!==null){if(_t.current=Ft,X===vc){at(null);return}at(Ce=>lt(Ce,X)?Ce:X)}},[zt]);const gt=o.useCallback(()=>{if(I)try{window.localStorage.removeItem(I)}catch{}Qe(!1);const X=st.current(),Ce=Array.isArray(X)?X:null;at(Ce),ut.current=Ce,Mt(Ge=>Ge+1)},[I]);o.useEffect(()=>()=>{pt.current&&(window.removeEventListener("pointermove",vt),window.removeEventListener("pointerup",ct),window.removeEventListener("pointercancel",ct),document.body.style.cursor="",document.body.style.userSelect="")},[vt,ct]);const Et=S.length>0&&S.every(X=>X.width!=null)?S.map(X=>typeof X.width=="number"?`${X.width}px`:String(X.width)).join(" "):null;S.some(X=>X.width!=null)&&!Et&&jt(`table-field-width:${S.map(X=>X.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."),Et&&C&&jt("table-field-width-conflict","[ihabdevteam-core] Table \uC5D0 fields[].width \uC640 gridTemplateColumns \uAC00 \uB458 \uB2E4 \uC788\uC2B5\uB2C8\uB2E4. gridTemplateColumns \uAC00 \uC774\uAE41\uB2C8\uB2E4 \u2014 \uD55C\uCABD\uB9CC \uB450\uC138\uC694.");const It=C??Et??void 0,et=Kx(It),wt=et.filter(X=>/\b(auto|min-content|max-content)\b|fit-content\(/.test(X));wt.length>0&&jt(`table-content-track:${C}`,`[ihabdevteam-core] Table \uC758 gridTemplateColumns \uC5D0 \uB0B4\uC6A9\uC73C\uB85C \uD06C\uAE30\uAC00 \uC815\uD574\uC9C0\uB294 \uD2B8\uB799(${wt.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: ${C})`);const tt=S.findIndex(X=>!!X.sortDir);S.filter(X=>!!X.sortDir).length>1&&jt("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 fe=X=>X===tt?S[X].sortDir==="asc"?"ascending":"descending":S[X].onClick?"none":void 0,$e=X=>/^\d+(\.\d+)?px$/.test(et[X]??""),Re=X=>{const Ce=et[X]??"",Ge=/^minmax\(\s*(\d+(?:\.\d+)?)px\s*,/.exec(Ce)??/^(\d+(?:\.\d+)?)px$/.exec(Ce);return Ge?parseFloat(Ge[1]):pe};Ie.current=$e,K.current=Re,ot.current=et;const ze=X=>b==="fit"&&!$e(X)?"fr":"px",it=Ue&&Ue.length===S.length&&!ne,on=b==="fit"&&!Ye,ht=(X,Ce)=>{if(X.resizable===!1&&et[Ce])return et[Ce];const Ge=Ue[Ce];if(ze(Ce)!=="fr"||!on)return`${Ge}${ze(Ce)}`;const Ze=Math.min(Math.max(Re(Ce),O.current?.[Ce]??0),Ge);return Ze>0?`minmax(${Ze}px, ${Ge}fr)`:`${Ge}fr`},Ke=te??(it?S.map(ht).join(" "):It),Ct=Ke?{"--table-grid-cols":Ke}:void 0,Bt=g!==void 0;return t.jsx(Fo.Provider,{value:mn,children:t.jsxs("div",{ref:we,className:`table-wrap${ue?" table-wrap--resizable":""}${E?" table-wrap--dragover":""}${m?" table-wrap--collapsed":""}`,style:Ct,onDragOver:D,onDragLeave:$,onDrop:V,tabIndex:De?0:void 0,role:De?"region":void 0,"aria-label":De?typeof g=="string"?g:z("table.scrollRegion","\uAC00\uB85C\uB85C \uAD74\uB9B4 \uC218 \uC788\uB294 \uD45C"):void 0,children:[!!i&&t.jsx("span",{id:Q,className:"table-row-hint",children:z("table.rowActionHint","\uC904\uC744 \uB204\uB974\uBA74 \uC790\uC138\uD788 \uBD05\uB2C8\uB2E4")}),t.jsxs("div",{ref:Ae,role:"table","aria-labelledby":Bt&&typeof g=="string"?ie:void 0,className:"table body-2",children:[Bt&&t.jsxs("div",{className:ke("table-header",A&&"table-header--clickable"),onClick:A,role:"caption",children:[A&&t.jsx(be,{htmlType:"button",size:T,type:"dot",variant:"transparent-gray",useBorder:!1,icon:m?"chevron-right":"chevron-down",ariaLabel:m?z("common.expand","\uD3BC\uCE58\uAE30"):z("common.collapse","\uC811\uAE30"),ariaExpanded:!m,className:"table-header__chevron"}),w&&t.jsx(dt,{icon:w,label:typeof g=="string"?g:void 0,className:"table-header__icon"}),t.jsx("span",{id:ie,className:"table-header__title h5b",children:g}),N!==void 0&&t.jsx("span",{className:"table-header__count body-3b",children:N}),B&&t.jsx("span",{className:"table-header__actions",onClick:X=>X.stopPropagation(),children:B})]}),!m&&t.jsxs(t.Fragment,{children:[r&&r.length>0&&t.jsx("div",{role:"row",className:"table-fields table-fields--groups",children:r.map((X,Ce)=>t.jsx("div",{role:"columnheader","aria-colspan":X.span,className:ke("table-field body-3",X.className),style:{gridColumn:`span ${X.span}`},children:X.label},Ce))}),t.jsxs("div",{role:"presentation",className:ke("table-fields-strip",ue&&"table-fields-strip--resizable"),children:[t.jsx("div",{role:"row",className:"table-fields",ref:re,children:S.map((X,Ce)=>t.jsx(a4,{onClick:X.onClick,className:ke(X.className,xc(X.align)),sortDir:X.sortDir,ariaSort:fe(Ce),onResizeStart:ue&&Ce<S.length-1&&X.resizable!==!1&&(b!=="fit"||S.some((Ge,Ze)=>Ze>Ce&&Ge.resizable!==!1))?Ge=>Gt(Ce,Ge):void 0,children:X.label},Ce))}),ue&&t.jsx("div",{className:"table-fields__reset-dock",children:t.jsx(be,{htmlType:"button",size:T,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"chevrons-left-right-ellipsis",ariaLabel:z("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),showTooltipInfo:z("table.resetColumns","\uCE78 \uB108\uBE44 \uCD08\uAE30\uD654"),className:"table-fields__reset",onClick:gt})})]}),t.jsx("div",{role:"rowgroup",className:"table-body",children:k?t.jsx(hs,{variant:"loading",colSpan:S.length||void 0}):H.length===0&&j?t.jsx(hs,{variant:"empty",colSpan:S.length||void 0,children:j}):H.map((X,Ce)=>{const Ge=f!=null&&X.id===f,Ze=!!i&&(u?u(X):!0),rt=U!=null&&X.id!=null&&(U instanceof Set?U.has(X.id)||[...U].some(mt=>String(mt)===String(X.id)):String(X.id)===String(U));return t.jsx(hs,{className:`${Ze?" table-row--clickable":""}${h?" table-row--draggable":""}${Ge?" table-row--dragging":""}`.trim(),draggable:!!h,onClick:Ze?()=>i(X):void 0,colSpan:S.length||void 0,rowHasButton:l(X).some(mt=>!!mt.rowLabel),describedBy:Q,onMouseEnter:c?mt=>c(X,mt):void 0,onMouseLeave:p?mt=>p(X,mt):void 0,onDragStart:h?mt=>h(X,mt):void 0,onDragEnd:d?mt=>d(X,mt):void 0,expandedContent:rt&&F?F(X):void 0,children:l(X).map((mt,Dt)=>t.jsx(t4,{className:ke(mt.className,xc(S[Dt]?.align)),style:mt.style,span:mt.span,rowLabel:Ze?mt.rowLabel:void 0,onRowClick:Ze?()=>i(X):void 0,children:mt.content},Dt))},X.id!=null?`${typeof X.id}:${X.id}`:`__idx:${Ce}`)})})]})]})]})})}function _c(e,n){return n!=="wornAt"?String(e[n]??""):ix(e.wornYear,e.wornMonth,e.wornDay)}function r4({rows:e,loading:n,onSelect:a,onDelete:r,onWear:s,onRelease:l,onAdd:i}){const{t:u,i18n:c}=Ee.useTranslation(),p=b=>b==="left"?u("device.direction.left","\uC88C"):u("device.direction.right","\uC6B0"),{sort:h,field:d}=i2(),f=o.useMemo(()=>{if(!h)return e;const{key:b,asc:v}=h;return[...e].sort((_,g)=>{if(b==="worn"){const w=Number(g.worn)-Number(_.worn);return v?w:-w}return Tr(_c(_,b),_c(g,b),v)})},[e,h]),{pageRows:C,pageSizeProps:x,paginationProps:y}=l2(f,h);return t.jsxs("div",{className:"dlp-side-table",children:[t.jsx(rs,{count:{value:e.length,unit:u("customers.device.unit","\uAC1C")},pageSize:x,pagination:y,actions:i&&t.jsx(be,{htmlType:"button",size:40,type:"bar",variant:"main",icon:"plus",label:u("customers.device.addButton","\uAE30\uAE30 \uCD94\uAC00"),onClick:i})}),t.jsx(ms,{loading:n,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:C.map((b,v)=>({id:b.id??`${b.side}-${v}`,row:b})),gridTemplateColumns:`72px 110px 120px minmax(120px, 1fr) 100px minmax(120px, 1fr) 156px${r?" 108px":""}`,renderRow:({row:b})=>[{content:t.jsx("span",{className:"dlp-worn-check",onClick:v=>v.stopPropagation(),children:t.jsx(ns,{checked:b.worn,disabled:b.worn?!l:!s,ariaLabel:b.worn?u("customers.device.unwear","\uCC29\uC6A9 \uD574\uC81C"):u("customers.device.wear","\uCC29\uC6A9"),onChange:v=>{v?s?.(b):l?.(b)}})})},{content:t.jsx("span",{children:p(b.side)})},{content:b.device?t.jsx(un,{size:"small",variant:qu(b.device),fill:"soft",label:Uu(b.device,u)}):t.jsx("span",{})},{content:t.jsx("span",{children:b.brand})},{content:t.jsx("span",{children:b.fitType||"-"})},{content:t.jsx("span",{children:b.productName||"-"})},{content:t.jsx("span",{className:"dlp-date",children:ts(b.wornYear,b.wornMonth,b.wornDay,c.language)||"-"})},...r?[{content:t.jsx("span",{className:"dlp-row-actions",children:t.jsx(be,{htmlType:"button",size:28,type:"bar",variant:"transparent-gray",label:u("common.delete","\uC0AD\uC81C"),onClick:v=>{v?.stopPropagation(),r(b)}})})}]:[]],onRowClick:({row:b})=>a(b),empty:u("customers.device.historyEmpty","\uB4F1\uB85D\uB41C \uAE30\uAE30 \uC774\uB825\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.")})]})}function wc(e,n){return e?{role:n?.role??"button",tabIndex:0,...n?.selected===void 0?{}:{"aria-selected":n.selected},onKeyDown:a=>{a.target===a.currentTarget&&(a.key!=="Enter"&&a.key!==" "||(a.preventDefault(),e(a)))}}:{}}function o4(e,n){return new Date(e,n+1,0).getDate()}function s4(e,n){return new Date(e,n,1).getDay()}function l4({visits:e=[],onVisitClick:n,onVisitMove:a,onDayClick:r,today:s}){const{t:l,i18n:i}=Ee.useTranslation(),u=o.useMemo(()=>l("calendar.dow",{returnObjects:!0}),[l]),c=wr(s),[p,h]=o.useState(()=>Number(c.slice(0,4))),[d,f]=o.useState(()=>Number(c.slice(5,7))-1),[C,x]=o.useState(null),y=o.useRef(null),b=o.useMemo(()=>{const m={};return e.forEach(A=>{m[A.date]||(m[A.date]=[]),m[A.date].push(A)}),m},[e]),v=o.useMemo(()=>{const m=o4(p,d),A=s4(p,d),B=[];for(let j=0;j<A;j++)B.push(null);for(let j=1;j<=m;j++)B.push(j);for(;B.length<35;)B.push(null);return B},[p,d]),_=o.useCallback(()=>{d===0?(h(m=>m-1),f(11)):f(m=>m-1)},[d]),g=o.useCallback(()=>{d===11?(h(m=>m+1),f(0)):f(m=>m+1)},[d]),w=m=>`${p}-${String(d+1).padStart(2,"0")}-${String(m).padStart(2,"0")}`,N=m=>w(m)===c;return t.jsxs("div",{children:[t.jsxs("div",{className:"calendar-nav",children:[t.jsx("button",{type:"button",className:"calendar-nav__button",onClick:_,"aria-label":l("calendar.prevMonth","\uC774\uC804 \uB2EC"),children:t.jsx(dt,{icon:"chevron-left",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),t.jsx("span",{className:"calendar-nav__title h5","aria-live":"polite",children:ci(l,i.language,p,d+1)}),t.jsx("button",{type:"button",className:"calendar-nav__button",onClick:g,"aria-label":l("calendar.nextMonth","\uB2E4\uC74C \uB2EC"),children:t.jsx(dt,{icon:"chevron-right",label:"",className:"",svgClassName:"calendar-nav__button-icon",size:18})}),t.jsxs("div",{className:"calendar-nav__legend",children:[t.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--main"}),t.jsx("span",{className:"caption-1",children:l("calendar.legend.visited","\uBC29\uBB38")}),t.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--sub"}),t.jsx("span",{className:"caption-1",children:l("calendar.legend.scheduled","\uC608\uC57D")}),t.jsx("span",{className:"calendar-nav__legend-dot calendar-nav__legend-dot--disabled"}),t.jsx("span",{className:"caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]})]}),t.jsxs("div",{className:"calendar-grid",children:[u.map(m=>t.jsx("div",{className:"calendar-day-header body-3",children:m},m)),v.map((m,A)=>{if(m===null)return t.jsx("div",{className:"calendar-cell empty"},`empty-${A}`);const B=m,j=w(B),k=b[j]??[],E=ui(j,i.language),D=C===j;return t.jsxs("div",{className:`calendar-cell${N(B)?" today":""}${D?" drag-over":""}${r?" calendar-cell--clickable":""}`,role:r?"button":void 0,tabIndex:r?0:void 0,"aria-label":r?l("calendar.addOnDate",{date:j}):void 0,"aria-current":N(B)?"date":void 0,onClick:r?()=>r(j):void 0,onKeyDown:r?$=>{$.target===$.currentTarget&&($.key!=="Enter"&&$.key!==" "||($.preventDefault(),r(j)))}:void 0,onDragOver:a?$=>{$.preventDefault(),x(j)}:void 0,onDragLeave:a?$=>{$.currentTarget.contains($.relatedTarget)||x(null)}:void 0,onDrop:a?$=>{$.preventDefault(),y.current!=null&&(a(y.current,j),y.current=null),x(null)}:void 0,children:[t.jsx("div",{className:"calendar-cell__number body-3",children:B}),k.length>0&&(()=>{const $=[{key:"visited",label:l("calendar.legend.visited","\uBC29\uBB38"),count:k.filter(F=>(F.status??"visited")==="visited").length},{key:"scheduled",label:l("calendar.legend.scheduled","\uC608\uC57D"),count:k.filter(F=>F.status==="scheduled").length},{key:"noVisit",label:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38"),count:k.filter(F=>F.status==="noVisit").length}].filter(F=>F.count>0),V=$.length===1&&$[0].key==="visited"?l("calendar.visitCount",{count:k.length,defaultValue:"\uBC29\uBB38 {{count}}\uAC74"}):$.map(F=>l("calendar.statusCount",{label:F.label,count:F.count,defaultValue:"{{label}} {{count}}\uAC74"})).join(" \xB7 ");return t.jsxs("span",{className:"calendar-cell__visit-count caption-1","aria-label":`${E} ${V}`,children:[$.map(F=>t.jsx("span",{className:`calendar-cell__visit-dot calendar-cell__visit-dot--${F.key}`,"aria-hidden":"true"},F.key)),k.length]})})(),t.jsx("div",{className:"calendar-cell__badges",children:k.map(($,V)=>t.jsxs("div",{draggable:!!a,className:`calendar-visit-badge${$.status==="noVisit"?" calendar-visit-badge--no-visit":$.status==="scheduled"?" calendar-visit-badge--scheduled":""}${n?" calendar-visit-badge--clickable":""}${a?" calendar-visit-badge--draggable":""}`,onDragStart:a?F=>{y.current=$.id,F.dataTransfer.effectAllowed="move"}:void 0,onDragEnd:a?()=>{y.current=null,x(null)}:void 0,onClick:n?F=>{F.stopPropagation(),n($)}:void 0,...wc(n?()=>n($):void 0),"aria-label":[E,$.time?mi($.time,l):null,$.customer,l($.status==="noVisit"?"calendar.legend.noVisit":$.status==="scheduled"?"calendar.legend.scheduled":"calendar.legend.visited")].filter(Boolean).join(" "),children:[$.time&&t.jsx("span",{className:"calendar-visit-badge__time body-3",children:mi($.time,l)}),t.jsx("span",{className:"calendar-visit-badge__name body-3",children:$.customer}),$.status==="noVisit"&&t.jsx("span",{className:"calendar-visit-badge__no-visit caption-1",children:l("calendar.legend.noVisit","\uBBF8\uBC29\uBB38")})]},$.id??V))})]},B)})]})]})}const i4={page:"h3",pagePopup:"h4",popup:"h5"};function Ma({type:e="page",title:n,headingLevel:a=2,icon:r,action:s,disc:l,children:i,inGrid:u=!1,className:c,style:p}){const h=i4[e],d=n||l||s||r,f=a?`h${a}`:"div";return t.jsxs("div",{className:ke("section",`section--${e}`,u&&"section--in-grid",c),style:p,children:[d&&t.jsxs("div",{className:"section__header",children:[t.jsxs("div",{className:"section__title-row",children:[r&&t.jsx(dt,{icon:r,label:typeof n=="string"?n:void 0,className:"section__icon"}),t.jsxs("div",{className:"section__title-group",children:[n&&t.jsx(f,{className:`section__title ${h}`,children:n}),l&&t.jsx("div",{className:"section__disc body-3",children:l})]})]}),s&&t.jsx("div",{className:"section__action",children:s})]}),i]})}let fs=null,Bc=!1;function kc(){if(Bc||typeof document>"u")return;Bc=!0,document.addEventListener("keydown",n=>{n.metaKey||n.ctrlKey||n.altKey||(fs="keyboard")},!0);const e=()=>{fs="pointer"};document.addEventListener("pointerdown",e,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,{capture:!0,passive:!0})}kc();function Or(){return kc(),fs==="keyboard"}const zr=20;function u4(e){const{t:n}=Ee.useTranslation(),{type:a,trainingDatas:r,depth:s,renderPopup:l,completedIds:i,selectedIds:u,onItemComplete:c,size:p,useDescriptionTooltip:h,onRemove:d,onMore:f,sectionType:C="page"}=e||{},[,x]=o.useState(0),y=typeof r<"u"?Array.isArray(r)?r:[]:[],b=y.length,[v,_]=o.useState(Math.min(b,zr)),g=o.useMemo(()=>Array.isArray(s)?[...s,a?.label].filter(Boolean).join(" \xB7 "):[s||"",a?.label].filter(Boolean).join(" \xB7 "),[s,a?.label]);o.useEffect(()=>{_(Math.min(b,zr))},[b]),ou("speechear.data.updated",()=>x(A=>A+1));const w=o.useRef(null),N=o.useRef(null);function m(){const A=document.activeElement;N.current=Or()&&A&&A.closest?.(".training-block__more")?v:null,_(B=>Math.min(b,B+zr))}return o.useEffect(()=>{const A=N.current;if(A==null)return;N.current=null;const B=document.activeElement;B&&B!==document.body||w.current?.querySelectorAll(".training-block-button")[A]?.focus()},[v]),t.jsxs(Ma,{type:C,title:a?.label,icon:a?.icon,disc:a?.desc,className:"training-block",children:[t.jsx("div",{className:"training-list",ref:w,children:(y||[]).slice(0,v).map((A,B)=>{const j=A;return t.jsx(Qo,{index:B,type:a,trainingData:j,depth:g,renderPopup:l,completedIds:i,selectedIds:u,size:p,useDescriptionTooltip:h,onRemove:typeof d=="function"&&u!=null&&j?.id!=null&&u.has(String(j.id))?()=>d(j):void 0,onComplete:typeof c=="function"&&j?.id!=null?()=>c(String(j.id)):void 0,onMore:typeof f=="function"?k=>f(j,k):void 0},j?.id!=null?`${a?.key||"t"}-${String(j.id)}`:`${a?.key||"t"}-${B}`)})}),b>zr&&v<b&&t.jsx("div",{className:"training-block__more",children:t.jsx(be,{htmlType:"button",size:48,type:"bar",icon:"plus",onClick:m,ariaLabel:n("common.loadMore","\uB354\uBCF4\uAE30"),label:n("common.loadMore","\uB354\uBCF4\uAE30"),variant:"main"})})]})}function c4(e){let n=0;const a=r=>{Array.isArray(r)?r.forEach(a):r!=null&&r!==!1&&r!==!0&&r!==""&&n++};return a(e),n}function d4({gap:e=10,count:n,className:a,children:r}){const s=o.useRef(null),[l,i]=o.useState({width:0,card:0}),u=n??c4(r);o.useLayoutEffect(()=>{const f=s.current;if(!f)return;const C=()=>{const y=f.style.maxWidth;f.style.maxWidth="none";const b=f.clientWidth;f.style.maxWidth=y;const v=f.firstElementChild?.offsetWidth??0;i(_=>_.width===b&&_.card===v?_:{width:b,card:v})};if(C(),typeof ResizeObserver>"u")return;const x=new ResizeObserver(C);return x.observe(f),()=>x.disconnect()},[u,e]);const c=l.card>0?l.card:0,p=c>0?UC(l.width,c,e):0,h=p>0?GC(u,p):0,d={"--block-grid-gap":`${e}px`,...h>0?{"--block-grid-cols":h,"--block-grid-card":`${c}px`}:{}};return t.jsx("div",{ref:s,className:ke("training-block-grid",h>0&&"training-block-grid--measured",a),style:d,"data-cols":h>0?h:void 0,children:r})}function Cs(e){const n=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=n.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:n,loading:l.loading,failed:l.failed,hasImage:!!e&&!l.failed,onLoad:i,onError:u}}var p4='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 h4=p4,gs=o.forwardRef(function({item:e,disabled:n=!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}=Ee.useTranslation(),f=e.word||e.title||"",C=n||!f,x=e.audio??e.sound??e.audioKey,y=e.subLabel||e.pronunciation||"",b=e.colloquialLabel||"",[v,_]=o.useState({label:f,subLabel:y,colloquialLabel:b,homonum:e.homonum});f&&(v.label!==f||v.subLabel!==y||v.colloquialLabel!==b||!Object.is(v.homonum,e.homonum))&&_({label:f,subLabel:y,colloquialLabel:b,homonum:e.homonum});const g=o.useRef(null),w=wn("(max-width: 767px)"),[N,m]=o.useState(!1),[A,B]=o.useState(!1),j=`${typeof x=="string"?x:x?.src??""}\0${f}`,[k,E]=o.useState({for:"",url:""}),D=k.for===j?k.url:"",$=si(),V=e.textOnly??(!e.image&&!!v.label&&!!$&&$.entries.length>0&&!$.byWord.has(v.label)),F=V?"":_a()?.(v.label,v.homonum)??e.image??"",{imgRef:U,loading:T,hasImage:z,onLoad:W,onError:ie}=Cs(F);o.useEffect(()=>{let H=!1;return(async()=>{if(x){if(typeof x=="string"){if(x.startsWith("http")||x.includes("/")){E({for:j,url:x});return}}else if(typeof x=="object"&&!Array.isArray(x)){const te=x.src;if(te){E({for:j,url:te});return}}}const ne=Va();if(ne&&f)try{const te=await Promise.resolve(ne(f));!H&&te&&E({for:j,url:te})}catch{}})(),()=>{H=!0}},[x,f,j]);const Q=o.useRef(!0),L=o.useRef(null);o.useEffect(()=>(Q.current=!0,()=>{Q.current=!1,L.current&&Rr(L.current),L.current=null;try{g.current?.pause()}catch{}g.current=null}),[]);const J=o.useCallback(()=>new Promise(H=>{if(typeof window<"u"&&window.speechSynthesis&&f){m(!0),window.speechSynthesis.cancel();const ne=new SpeechSynthesisUtterance(f);ne.lang="ko-KR",ne.onend=()=>{m(!1);try{a?.()}catch{}H()},ne.onerror=()=>{m(!1),H()},window.speechSynthesis.speak(ne)}else H()}),[f,a]),ee=o.useCallback(H=>{const ne=sr(H,te=>{if(m(!1),te)try{a?.()}catch{}});return g.current=ne.el,ne.done},[a]),q=o.useCallback(async()=>{if(n||!Q.current)return;const H=()=>{L.current===H&&(L.current=null);try{g.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}m(!1)},ne=or(H);L.current=H;try{window.speechSynthesis?.cancel()}catch{}try{if(D&&(m(!0),await ee(D)))return;const te=yr();if(te&&f)try{B(!0);const ue=await Promise.resolve(te(f));if(!Q.current||L.current!==H||(B(!1),ue&&(m(!0),await ee(ue))))return}catch{}if(!Q.current||L.current!==H)return;await J()}finally{L.current===H&&B(!1),ne(),L.current===H&&(L.current=null)}},[n,D,f,ee,J]);o.useImperativeHandle(h,()=>({play:()=>q()}),[q]);const P=H=>H.stopPropagation(),R=o.useCallback(H=>{if(H.stopPropagation(),!n){if(N){try{g.current?.pause()}catch{}try{window.speechSynthesis?.cancel()}catch{}m(!1);return}q()}},[n,N,q]),S=ke("training-word-card",n?"training-word-card--disabled":"",C?"training-word-card--flipped":"",r?"training-word-card--selectable":"",s?"training-word-card--selected":"");return t.jsx("div",{className:S,onClick:r&&!n?l:void 0,role:r?"button":void 0,"aria-pressed":r?s:void 0,tabIndex:r&&!n?0:void 0,"aria-disabled":r&&n?!0:void 0,onKeyDown:r&&!n?H=>{H.target===H.currentTarget&&(H.key==="Enter"||H.key===" "||H.key==="Spacebar")&&(H.preventDefault(),l?.())}:void 0,children:t.jsxs("div",{className:"training-word-card__flipper",style:{transitionDelay:C?"0ms":`${i}ms`},children:[t.jsxs("div",{className:"training-word-card__front",children:[s&&t.jsx("div",{className:"training-word-card__selected-badge",onClick:P,children:t.jsx(Ln,{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")})}),t.jsx("div",{className:"training-word-card__image-wrap",children:V?t.jsx("div",{className:"training-word-card__text-face",children:v.label}):z?t.jsxs(t.Fragment,{children:[T&&t.jsx("div",{className:"training-word-card__spinner"}),t.jsx("img",{ref:U,className:"training-word-card__image",src:F,alt:v.label||d("common.image","\uC774\uBBF8\uC9C0"),style:{opacity:T?0:1},onLoad:W,onError:ie})]}):t.jsx("div",{className:"training-word-card__placeholder"})}),!u&&t.jsxs("div",{className:"training-word-card__body",children:[!V&&t.jsx("div",{className:"training-word-card__word",children:v.label}),v.subLabel&&t.jsxs("div",{className:"training-word-card__pronunciation",children:["[",v.subLabel,"]"]}),v.colloquialLabel&&t.jsxs("div",{className:"training-word-card__colloquial caption-1",children:["[",v.colloquialLabel,"]"]})]}),!c&&t.jsx("div",{className:"training-word-card__bottom",onClick:r?P:void 0,children:t.jsx(be,{htmlType:"button",size:w?40:48,type:w?"dot":"bar",icon:N?"pause":"play",label:w?void 0:d("training.playSound","\uC18C\uB9AC \uB4E3\uAE30"),selected:N,loading:A,onClick:R,disabled:n,ariaLabel:v.label?N?d("training.stopFor",{name:v.label,defaultValue:`${v.label} \uC815\uC9C0`}):d("training.playSoundFor",{name:v.label,defaultValue:`${v.label} \uC18C\uB9AC \uB4E3\uAE30`}):N?d("training.stop","\uC815\uC9C0"):d("training.playSound","\uC18C\uB9AC \uB4E3\uAE30")})})]}),t.jsx("div",{className:"training-word-card__back","aria-hidden":"true",children:t.jsx("span",{className:"training-word-card__disabled-symbol",style:{"--disabled-symbol-src":`url("${h4}")`}})})]})})});function Wr(e){return String(e)}const Hr=["o","triangle","x"];function Ac(e,n){return e===n?null:n}const Nc={o:"circle",triangle:"triangle",x:"x"},Ec={o:"main",triangle:"warn",x:"danger"},m4=24,f4=2,bs=3.5,C4=.8;function g4(e){if(!(e>0))return bs;const n=C4*m4/e;return Math.min(bs,Math.max(f4,n))}function b4(e){let n=0,a=0,r=0;for(const l of Object.values(e))l==="o"?n++:l==="triangle"?a++:l==="x"&&r++;const s=n+a+r;return{marked:s,o:n,triangle:a,x:r,rate:s===0?null:(n+a*.5)/s}}function ys(e){const n={};for(const[a,r]of Object.entries(e))(r==="o"||r==="triangle"||r==="x")&&(n[a]=r);return n}function jc(e){const n=[];let a=0;for(const r of e)n.push(a),a+=r;return n}function y4(e,n){return!n&&e>0}const ha={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 v4(e="landscape"){jt("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:n,printW:a,printH:r}=ha[e],s=document.createElement("style");s.textContent=`@page { size: ${n}; 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 x4(e,n){if(e.length===0)return[[]];const a=Math.max(1,Math.floor(n)),r=[];for(let s=0;s<e.length;s+=a)r.push(e.slice(s,s+a));return r}const _4={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 Dc(e,n){const a=_4[e][n];if(a)return a;const r=Math.max(1,Math.ceil(n)),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,n){const a=Dc(e==="landscape"?"portrait":"landscape",n),r=Math.max(1,Math.ceil(n));if(r<=1)return a;const s=ha[e],l=e==="landscape"?s.width/2:s.width,i=e==="landscape"?s.height:s.height/2,u=(f,C)=>Math.min(l/f/Lc,i/C/Rc),c=Math.max(0,a.cols*a.rows-r),p=u(a.cols,a.rows);let h=a,d=p;for(let f=1;f<=r;f++){const C=Math.ceil(r/f);if(f*C-r>c)continue;const x=u(f,C);x>d&&(h={cols:f,rows:C},d=x)}return d>p*1.05?h:a}const B4={show:"word-table__content--cut-show",dashed:"",corner:"word-table__content--cut-corner",hide:""},Sc={\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"},Tc={\uACE0\uC720:"\uACE0\uC720\uC5B4",\uD55C\uC790:"\uD55C\uC790\uC5B4",\uC678\uB798:"\uC678\uB798\uC5B4",\uD63C\uC885:"\uD63C\uC885\uC5B4"},vs={\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"},xs={\uACE0\uC720:"native",\uD55C\uC790:"sino",\uC678\uB798:"foreign",\uD63C\uC885:"mixed"};function Mc(e){return Object.fromEntries(Object.entries(Sc).map(([n,a])=>[n,vs[n]?e(`wordTable.pos.${vs[n]}`,{defaultValue:a}):a]))}function $c(e){return Object.fromEntries(Object.entries(Tc).map(([n,a])=>[n,xs[n]?e(`wordSearch.filter.type.${xs[n]}`,{defaultValue:a}):a]))}const k4={pos:vs,wordType:xs};function _s(e,n){return e?e.split("/").map(a=>n[a]??a).join("/"):""}function ws(e,n,a,r){if(r!=="dashed")return{};const s=e%n,l=Math.floor(e/n),i=s<n-1,u=l<a-1;if(!i&&!u)return{};const c="#ddd",p=C=>`repeating-linear-gradient(to ${C}, ${c} 0, ${c} 5px, transparent 5px, transparent 10px)`,h=[],d=[],f=[];return i&&(h.push(p("bottom")),d.push("1px 100%"),f.push("right center")),u&&(h.push(p("right")),d.push("100% 1px"),f.push("center bottom")),{backgroundImage:h.join(", "),backgroundSize:d.join(", "),backgroundPosition:f.join(", "),backgroundRepeat:"no-repeat",printColorAdjust:"exact",WebkitPrintColorAdjust:"exact"}}const Lc=280,A4=240,N4=280,Rc=400,E4=120,j4=280;function Pc(e,n){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=n&&p>0?p/n:1/0,f=Math.min(1,h,d);s(f),i(Math.max(0,(c-e*f)/2))},[e,n]);return o.useEffect(()=>{const c=a.current;if(!c)return;const p=n?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,n]),{scalerRef:a,scale:r,offset:l}}const D4=24,S4={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0},T4=400,Fc=8;function M4(e){return e<=1?"100%":`repeat(${e}, calc((100% - ${e-1} * var(--wt-cell-gap, 0px)) / ${e}))`}function Bs({label:e,subLabel:n,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:f=!0,buttonSize:C=40,wordInfo:x,outerScale:y=1}){const{t:b}=Ee.useTranslation(),v=o.useRef(null),_=o.useRef(null),g=o.useRef(null),[w,N]=o.useState(1),[m,A]=o.useState(!1),[B,j]=o.useState(!1),[k,E]=o.useState({for:"",url:""}),[D,$]=o.useState(null),V=n&&n.length>0?n:bC()?.(e,u)??"",F=_a()?.(l||e,u)??"",{imgRef:U,loading:T,failed:z,onLoad:W,onError:ie}=Cs(F),Q=o.useCallback(()=>$(_.current?.getBoundingClientRect()??null),[]),L=o.useCallback(()=>$(null),[]),J=Dr(!!D,G=>{G?Q():L()},_),ee=o.useMemo(()=>{if(!x)return null;const G=[];return x.grade&&G.push(b("wordTable.info.grade",{n:x.grade,defaultValue:"\uB09C\uC774\uB3C4: {{n}}\uB4F1\uAE09"})),x.syllables&&G.push(b("wordTable.info.syllables",{n:x.syllables,defaultValue:"\uC74C\uC808 \uC218: {{n}}\uC74C\uC808"})),x.pos&&G.push(b("wordTable.info.pos",{v:_s(x.pos,Mc(b)),defaultValue:"\uD488\uC0AC: {{v}}"})),x.wordType&&G.push(b("wordTable.info.wordType",{v:_s(x.wordType,$c(b)),defaultValue:"\uC720\uD615: {{v}}"})),G.length?G:null},[x,b]),q=V||e,P=k.for===q?k.url:"";o.useEffect(()=>{const G=Va(),K=V||e;if(!G||!K)return;let O=!1;return Promise.resolve().then(()=>G(K)).catch(()=>"").then(I=>{!O&&I&&E({for:K,url:I})}),()=>{O=!0}},[V,e]);const R=o.useRef(null),S=o.useRef(null);o.useEffect(()=>()=>{g.current?.pause(),S.current?.()},[]);const H=o.useRef(null);o.useEffect(()=>()=>{H.current&&(H.current.cancelled=!0)},[]);const ne=o.useCallback(G=>{if(G.stopPropagation(),m||B){R.current?.();return}if(!P){const O=yr(),I=V||e;if(!O||!I)return;const re={cancelled:!1,stop:null};H.current=re;const he=()=>{re.cancelled=!0,re.stop?.(),j(!1),A(!1),S.current?.()};R.current=he,S.current=or(he),j(!0),Promise.resolve().then(()=>O(I)).then(ae=>{if(re.cancelled)return;if(!ae){he();return}E({for:I,url:ae});const _e=sr(ae,()=>{A(!1),S.current?.()});g.current=_e.el,re.stop=_e.stop,j(!1),A(!0)}).catch(()=>{he()});return}A(!0);const K=sr(P,()=>{A(!1),S.current?.()});g.current=K.el,R.current=K.stop,S.current=or(K.stop)},[m,B,P,V,e]),te=p&&!!F&&!z,ue=te&&c?Lc:te?N4:A4,se=te&&c?Rc:te?j4:E4;o.useEffect(()=>{const G=v.current;if(!G||typeof ResizeObserver>"u")return;const K=new ResizeObserver(([O])=>{const{width:I,height:re}=O.contentRect;N(Math.min(I/ue,re/se))});return K.observe(G),()=>K.disconnect()},[ue,se]);const pe=C*y<D4;return t.jsxs("div",{ref:v,className:ke("word-table-cell",pe&&"word-table-cell--tap-too-small",te?"word-table-cell--with-image":""),"data-ref-w":ue,"data-ref-h":se,children:[t.jsxs("div",{className:"word-table-cell__inner",style:{transform:`scale(${w})`},children:[te&&t.jsxs("div",{className:"word-table-cell__image-wrap",children:[T&&t.jsx("div",{className:"word-table-cell__spinner"}),t.jsx("img",{ref:U,className:"word-table-cell__image",src:F,alt:e,draggable:!1,style:{opacity:T?0:1},onLoad:W,onError:ie})]}),f&&(s||r)&&t.jsxs("span",{className:"word-table-cell__caption",children:[s&&t.jsx(un,{fill:"soft",size:"small",label:s}),r&&t.jsx("span",{className:"word-table-cell__caption-tail h5",children:r})]}),c&&t.jsx("span",{className:"word-table-cell__word h0",children:e}),h&&V&&t.jsxs("span",{className:"word-table-cell__sub h3",children:["[",V,"]"]}),d&&a&&t.jsxs("span",{className:"word-table-cell__colloquial h5",children:["[",a,"]"]})]}),t.jsxs("div",{className:"word-table-cell__side",children:[t.jsxs("div",{className:"word-table-cell__play-button","data-audio-src":P,children:[t.jsx("span",{"data-play-state":"play",style:{display:m?"none":void 0},children:t.jsx(be,{htmlType:"button",size:C,type:"dot",icon:"play",variant:"transparent-lightGray",useBorder:!1,loading:B,showTooltipInfo:B?b("common.loading","\uBD88\uB7EC\uC624\uB294 \uC911"):b("common.play","\uC7AC\uC0DD"),ariaLabel:e?b("common.playFor",{name:e,defaultValue:`${e} \uC7AC\uC0DD`}):b("common.play","\uC7AC\uC0DD"),onClick:ne})}),t.jsx("span",{"data-play-state":"pause",style:{display:m?void 0:"none"},children:t.jsx(be,{htmlType:"button",size:C,type:"dot",icon:"pause",useBorder:!1,selected:!0,showTooltipInfo:b("common.pause","\uBA48\uCDA4"),ariaLabel:e?b("common.pauseFor",{name:e,defaultValue:`${e} \uBA48\uCDA4`}):b("common.pause","\uBA48\uCDA4"),onClick:ne})})]}),x&&t.jsxs("div",{ref:_,className:"word-table-cell__info-button",onPointerEnter:G=>{ea(G)||Q()},onPointerLeave:G=>{ea(G)||L()},onFocus:()=>{ia()||Q()},onBlur:L,children:[t.jsx(be,{htmlType:"button",size:C,type:"dot",icon:"info",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:!1,ariaLabel:b("wordTable.wordInfo","{{word}} \uB0B1\uB9D0 \uC815\uBCF4",{word:e}),onClick:G=>{G.stopPropagation(),J.touchPress()}}),D&&ee&&t.jsx(Qn,{anchorRect:D,items:ee,showIndex:!1})]}),i&&t.jsx("div",{className:"word-table-cell__form-button",children:t.jsx(be,{htmlType:"button",size:C,type:"dot",icon:"replace",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:b("wordTable.pickForm","\uB2E4\uB978 \uAF34\uB85C"),ariaLabel:i.n===null?b("wordTable.pickFormBaseAria","\uAE30\uBCF8\uD615 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"):b("wordTable.pickFormAria",{n:i.n,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uB2E4\uB978 \uAF34\uB85C"}),onClick:G=>{G.stopPropagation(),i.onPick(G.currentTarget.getBoundingClientRect())}})})]})]})}function $a({title:e,titleIcon:n,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:f,count:C,activeCell:x=null,onActivateCell:y,onRemoveCell:b,onRemoveItem:v,onReorder:_,onCopyItem:g,onReplaceItem:w,onPickForm:N,indexOffset:m=0,totalCount:A,renderCellAction:B,showFillerAdd:j=!1,fillerAdd:k="first",addableCount:E,contentRef:D,buttonSize:$=40,brand:V,code:F,pageNumber:U,pageNumberPosition:T="right",fitHeight:z=!1,scoring:W=!1,marks:ie,onMarkClick:Q,scoreIndexOffset:L=0}){const J=o.useCallback((fe,$e)=>{Q?.(L+fe,$e)},[Q,L]),ee=(fe,$e)=>{const Re=fe.filter(Boolean).join(" / ");return Re?$e?P("wordPrint.removePairFor",{name:Re,defaultValue:`${Re} \uB300\uB9BD\uC30D \uBE7C\uAE30`}):P("wordPrint.removeWordFor",{name:Re,defaultValue:`${Re} \uBE7C\uAE30`}):$e?P("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):P("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30")},q=(fe,$e)=>{const Re=ie?.[Wr(L+fe)]??null;return t.jsx("div",{className:ke("word-table-cell__score",Re?"word-table-cell__score--marked":""),style:Et>1?{transform:`translateX(-50%) scale(${Et})`,transformOrigin:"bottom center"}:void 0,children:Hr.map(ze=>t.jsx("span",{className:ke("word-table-cell__score-slot",Re===ze?"word-table-cell__score-slot--on":""),children:t.jsx(be,{htmlType:"button",size:$,type:"dot",shape:"pill",icon:Nc[ze],variant:Re===ze?Ec[ze]:"default",selected:Re===ze,useBorder:!1,...gt?{}:{tabIndex:-1,role:"img"},showTooltipInfo:P(`wordTable.scoring.markName.${ze}`,{defaultValue:ze}),ariaLabel:P(`wordTable.scoring.${ze}`,{word:$e,defaultValue:`${$e} ${ze}`}),onClick:gt?it=>{it.stopPropagation(),J(fe,ze)}:void 0})},ze))})},{t:P}=Ee.useTranslation(),R=f!==void 0,S=e!=null||!!n||!!a,H=wn("(max-width: 767px)"),ne=o.useRef(null),[te,ue]=o.useState(null),se=d?.length??0,pe=A??se,[G,K]=o.useState(null),[O,I]=o.useState(""),re=o.useRef(null),he=o.useRef(null),ae=o.useRef(null),_e=o.useRef(null),De=o.useCallback(fe=>{he.current=fe,typeof D=="function"?D(fe):D&&(D.current=fe)},[D]),Se=o.useCallback((fe,$e)=>{re.current=m+$e,_?.(fe,$e),I(P("wordTable.reorder.moved",{n:m+$e+1,total:pe,defaultValue:"{{total}}\uCE78 \uAC00\uC6B4\uB370 {{n}}\uBC88\uC9F8\uB85C \uC62E\uAE40"}))},[_,P,pe,m]);o.useEffect(()=>{const fe=re.current;fe!=null&&(re.current=null,(he.current?.closest(".word-table-block__pages")??he.current)?.querySelector(`[data-wordtable-index="${fe}"] .word-table__card-handle button`)?.focus())}),o.useEffect(()=>()=>{_e.current?.()},[]);const Ne=o.useCallback((fe,$e)=>{if(!_||!fe.altKey||fe.ctrlKey||fe.metaKey)return;const Re=fe.key==="ArrowRight";if(!Re&&fe.key!=="ArrowLeft")return;fe.preventDefault();const ze=$e+(Re?1:-1),it=m+ze;it<0||it>=pe||Se($e,ze)},[_,pe,m,Se]),He=o.useCallback((fe,$e)=>{if(!_||fe.pointerType==="mouse")return;const Re=fe.target.closest?.("button");if(Re&&!Re.closest(".word-table__card-handle"))return;_e.current?.();const ze={x:fe.clientX,y:fe.clientY};let it=!1;const on=Ze=>{it&&Ze.cancelable&&Ze.preventDefault()};let ht=null,Ke=null;const Ct=()=>{const Ze=Ke;if(!Ze)return;const rt=document.elementFromPoint?.(Ze.x,Ze.y)?.closest?.("[data-wordtable-cell]"),mt=rt?Number(rt.dataset.wordtableCell):NaN,Dt=Number.isInteger(mt)?mt:null;ae.current=Dt,ue(Lt=>Lt===Dt?Lt:Dt)},Bt=Ze=>{if(!it){(Math.abs(Ze.clientX-ze.x)>Fc||Math.abs(Ze.clientY-ze.y)>Fc)&&Ge();return}if(Ke={x:Ze.clientX,y:Ze.clientY},typeof requestAnimationFrame>"u"){Ct();return}ht===null&&(ht=requestAnimationFrame(()=>{ht=null,Ct()}))},X=()=>{ht!==null&&(cancelAnimationFrame(ht),ht=null,Ct());const Ze=ae.current,rt=it;Ge(),rt&&Ze!=null&&Ze!==$e&&Se($e,Ze)},Ce=setTimeout(()=>{it=!0,K($e),ae.current=$e,ue($e),window.addEventListener("touchmove",on,{passive:!1})},T4);function Ge(){clearTimeout(Ce),window.removeEventListener("pointermove",Bt),window.removeEventListener("pointerup",X),window.removeEventListener("pointercancel",X),window.removeEventListener("touchmove",on),it=!1,ht!==null&&(cancelAnimationFrame(ht),ht=null),ae.current=null,_e.current=null,K(null),ue(null)}_e.current=Ge,window.addEventListener("pointermove",Bt),window.addEventListener("pointerup",X),window.addEventListener("pointercancel",X)},[_,Se]),{width:ve,height:xe}=ha[s],we=typeof z=="number"?z:z&&typeof z=="object"?H?z.narrow:z.wide:null,{scalerRef:Ae,scale:Ie,offset:ot}=Pc(ve,z?xe:void 0),pt=R?f?.length??0:d?.length??0,Oe=Math.max(C??pt,1),Ue=!R&&!!i,at=w4(s,Oe),ce=Dc(s,Oe),Pe=Ue?at.cols:ce.cols,Ye=Ue?at.rows:ce.rows,Qe=Ue&&s==="landscape"?at.cols*2:Pe,ut=Ue&&s==="portrait"?at.rows*2:Ye,vt=fe=>({word:fe.length===0||fe.includes("word"),image:fe.length===0||fe.includes("image"),pron:fe.length===0||fe.includes("standardPron"),colloq:fe.length===0||fe.includes("colloquialPron"),caption:fe.length===0||fe.includes("caption")}),ct=vt(l),Gt=o.useMemo(()=>{const fe=(d??[]).map(Re=>Re.id),$e=fe.every(Re=>typeof Re=="string"&&Re.length>0)&&new Set(fe).size===fe.length;return!$e&&fe.length>0&&jt("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."),$e?fe:null},[d]),xt=vt(u??l),lt=R?(f??[]).some(fe=>fe!==null&&fe.length>1):(d??[]).some(fe=>(fe.words??[]).length>1),st=!!V?.show,Ot=!!V?.show&&V?.top!==!1,Mt=!!V?.show&&V?.bottom!==!1,Nt=V?.copyright??"\xA9 IHAB, Inc. All rights reserved.",Ft=le(ke("word-table__content",B4[c],p&&"word-table__content--outline",h&&lt&&"word-table__content--div-line",!st&&U&&T!=="none"&&"word-table__content--page-number",Ot&&"word-table__content--brand-top",Mt&&"word-table__content--brand-bottom")),zt={transform:`scale(${1/Ie})`,transformOrigin:"center center"},_t=$*Hr.length+4*(Hr.length-1),gt=!!Q,Et=gt?Math.max(1,Math.min(1/Ie,ve/Qe/_t)):1,[It,et]=o.useState(bs);cr(()=>{if(!W)return;const fe=he.current?.querySelector(".word-table-cell__score-slot .button__icon");if(!fe)return;const $e=fe.getBoundingClientRect().width;$e>0&&et(g4($e))},[W,Ie,Et,$,se]);const wt=t.jsxs("div",{ref:Ae,className:"word-table__scaler",style:{height:xe*Ie,"--word-table-mark-stroke":It},children:[t.jsx("div",{className:ke("word-table",W&&!gt&&"word-table--score-readonly",!S&&r),style:{width:ve,height:xe,transform:`scale(${Ie})`,transformOrigin:"top left",marginLeft:ot},children:t.jsxs("div",{ref:De,className:Ft,style:{gridTemplateColumns:`repeat(${Qe}, 1fr)`,gridTemplateRows:M4(ut)},children:[R?t.jsx(t.Fragment,{children:(f??[]).map((fe,$e)=>t.jsx("div",{className:le(ke("word-table__edit-cell",fe?"word-table__edit-cell--filled":"word-table__edit-cell--empty",x===$e?"word-table__edit-cell--active":"")),style:ws($e,Qe,ut,c),children:fe?t.jsxs(t.Fragment,{children:[fe.map((Re,ze)=>t.jsxs(o.Fragment,{children:[ze>0&&t.jsx("div",{className:le("word-table__pair-divider")}),t.jsx(Bs,{outerScale:Ie,label:Re.word,subLabel:Re.pronunciation,colloquialLabel:Re.colloquialPronunciation,homonum:Re.homonum,showWord:ct.word,showImage:ct.image,showPronunciation:ct.pron,showColloquial:ct.colloq,showCaption:ct.caption,buttonSize:$})]},ze)),W&&q($e,fe.map(Re=>Re.word).join(" / ")),b&&t.jsx("div",{className:le("word-table__card-close"),children:t.jsx(be,{htmlType:"button",size:$,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:fe.length>1?P("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):P("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:ee(fe.map(Re=>Re.word),fe.length>1),onClick:()=>b($e)})})]}):y&&t.jsx("div",{className:le("word-table__card-add"),style:zt,children:t.jsx(be,{htmlType:"button",size:$,type:"dot",icon:"plus",variant:"default",ariaLabel:P("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:P("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>y($e)})})},$e))}):t.jsxs(t.Fragment,{children:[Ue&&i&&t.jsx("div",{className:le("word-table__card word-table__card--base"),style:{gridColumn:`1 / span ${at.cols}`,gridRow:`1 / span ${at.rows}`,...ws(0,s==="landscape"?2:1,s==="landscape"?1:2,c)},children:(i.words??[]).map((fe,$e)=>t.jsxs(o.Fragment,{children:[$e>0&&t.jsx("div",{className:le("word-table__pair-divider")}),t.jsx(Bs,{outerScale:Ie,label:fe.label,subLabel:fe.subLabel,colloquialLabel:fe.colloquialLabel,captionLabel:fe.captionLabel,captionBadge:fe.captionBadge,imageLabel:fe.imageLabel,pickForm:N&&fe.canPickForm?{n:null,onPick:Re=>N(i.id,-1,Re)}:void 0,homonum:fe.homonum,showWord:xt.word,showImage:xt.image,showPronunciation:xt.pron,showColloquial:xt.colloq,showCaption:xt.caption,buttonSize:$,wordInfo:fe.grade||fe.syllables!=null||fe.pos||fe.wordType?{grade:fe.grade,syllables:fe.syllables,pos:fe.pos,wordType:fe.wordType}:void 0})]},$e))}),(d??[]).map((fe,$e)=>t.jsxs("div",{"data-wordtable-cell":_?$e:void 0,"data-wordtable-index":_?m+$e:void 0,className:le(`word-table__card${_?" word-table__card--draggable":""}${te===$e?" word-table__card--drag-over":""}${G===$e?" word-table__card--dragging":""}`),style:ws($e,Pe,Ye,c),draggable:!!_,onPointerDown:_?Re=>He(Re,$e):void 0,onKeyDown:_?Re=>Ne(Re,$e):void 0,onDragStart:_?()=>{ne.current=$e}:void 0,onDragOver:_?Re=>{Re.preventDefault(),ue($e)}:void 0,onDragLeave:_?()=>ue(null):void 0,onDrop:_?Re=>{Re.preventDefault(),ne.current!==null&&ne.current!==$e&&_(ne.current,$e),ne.current=null,ue(null)}:void 0,onDragEnd:_?()=>{ne.current=null,ue(null)}:void 0,children:[(fe.words??[]).map((Re,ze)=>t.jsxs(o.Fragment,{children:[ze>0&&t.jsx("div",{className:le("word-table__pair-divider")}),t.jsx(Bs,{outerScale:Ie,label:Re.label,subLabel:Re.subLabel,colloquialLabel:Re.colloquialLabel,captionLabel:Re.captionLabel,captionBadge:Re.captionBadge,imageLabel:Re.imageLabel,pickForm:N&&Re.canPickForm?{n:m+$e+1,onPick:it=>N(fe.id,m+$e,it)}:void 0,homonum:Re.homonum,showWord:ct.word,showImage:ct.image,showPronunciation:ct.pron,showColloquial:ct.colloq,showCaption:ct.caption,buttonSize:$,wordInfo:Re.grade||Re.syllables!=null||Re.pos||Re.wordType?{grade:Re.grade,syllables:Re.syllables,pos:Re.pos,wordType:Re.wordType}:void 0})]},ze)),W&&q($e,(fe.words??[]).map(Re=>Re.label).join(" / ")),(B||v||g||w||_)&&t.jsxs("div",{className:le("word-table__card-actions"),children:[v&&t.jsx("div",{className:le("word-table__card-close"),children:t.jsx(be,{htmlType:"button",size:$,type:"dot",icon:"x",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(fe.words??[]).length>1?P("wordPrint.removePair","\uB300\uB9BD\uC30D \uBE7C\uAE30"):P("wordPrint.removeWord","\uB2E8\uC5B4 \uBE7C\uAE30"),ariaLabel:ee((fe.words??[]).map(Re=>Re.label),(fe.words??[]).length>1),onClick:()=>v(fe.id)})}),g&&t.jsx("div",{className:le("word-table__card-copy"),children:t.jsx(be,{htmlType:"button",size:$,type:"dot",icon:"copy",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:P("wordTable.copyItem","\uD55C \uCE78 \uB354"),ariaLabel:P("wordTable.copyItemAria",{n:m+$e+1,defaultValue:"{{n}}\uBC88 \uCE78 \uB0B1\uB9D0\uC744 \uD55C \uCE78 \uB354"}),onClick:()=>g(fe.id,m+$e)})}),w&&t.jsx("div",{className:le("word-table__card-replace"),children:t.jsx(be,{htmlType:"button",size:$,type:"dot",icon:"refresh-cw",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:(fe.words??[]).length>1?P("wordTable.replacePair","\uB2E4\uB978 \uC30D\uC73C\uB85C"):P("wordTable.replaceItem","\uB2E4\uB978 \uB2E8\uC5B4\uB85C"),ariaLabel:(fe.words??[]).length>1?P("wordTable.replacePairAria",{n:m+$e+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uC30D\uC73C\uB85C"}):P("wordTable.replaceItemAria",{n:m+$e+1,defaultValue:"{{n}}\uBC88 \uCE78\uB9CC \uB2E4\uB978 \uB2E8\uC5B4\uB85C"}),onClick:()=>w(fe.id,m+$e)})}),B?.($e,fe),_&&t.jsx("div",{className:le("word-table__card-handle"),children:t.jsx(be,{htmlType:"button",size:$,type:"dot",icon:"grip-vertical",variant:"transparent-lightGray",useBorder:!1,showTooltipInfo:P("wordTable.reorder.hint","Alt + \u2190 \u2192 \uB85C \uC21C\uC11C \uBC14\uAFB8\uAE30"),ariaLabel:P("wordTable.reorder.handle",{word:(fe.words??[]).map(Re=>Re.label).join(" / "),defaultValue:"{{word}} \uC21C\uC11C \uBC14\uAFB8\uAE30 (Alt + \uD654\uC0B4\uD45C)"})})})]})]},Gt?Gt[$e]:$e)),Array.from({length:Math.max(0,Pe*Ye-(d?.length??0))}).map((fe,$e)=>{const Re=Pe*Ye,ze=E??Re,it=(d?.length??0)+$e<ze;return t.jsx("div",{className:le("word-table__card word-table__card--filler"),children:j&&y&&it&&(k==="every"||$e===0)&&t.jsx("div",{className:le("word-table__card-add"),style:zt,children:t.jsx(be,{htmlType:"button",size:$,type:"dot",icon:"plus",variant:"default",ariaLabel:P("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),showTooltipInfo:P("wordTable.addWord","\uCD94\uAC00\uD558\uAE30"),onClick:()=>y((d?.length??0)+$e)})})},`filler-${$e}`)})]}),Ot&&t.jsx(t.Fragment,{children:t.jsxs("div",{className:"word-table__band word-table__band--top",children:[t.jsx("img",{className:"word-table__brand-logo",src:V?.topLogo?.src??Lr,alt:V?.topLogo?.alt??"\uB9D0\uADC0"}),(()=>{const fe=[V?.title&&t.jsx("span",{className:"word-table__paper-title",children:V.title},"t"),V?.owner&&t.jsx("span",{className:"word-table__owner",children:V.owner},"o"),F&&t.jsx("span",{className:"word-table__code",children:F},"c")].filter(Boolean);return fe.length===0?null:t.jsx("span",{className:"word-table__ident",children:fe.map(($e,Re)=>t.jsxs(o.Fragment,{children:[Re>0&&t.jsx("span",{className:"word-table__ident-dot","aria-hidden":"true",children:"\xB7"}),$e]},Re))})})()]})}),Mt&&t.jsx(t.Fragment,{children:t.jsxs("div",{className:"word-table__band word-table__band--bottom",children:[t.jsxs("span",{className:"word-table__brand-by",children:[V?.bottomLogo?t.jsx("img",{className:"word-table__brand-logo--ihab word-table__brand-logo--given",src:V.bottomLogo.src,alt:V.bottomLogo.alt}):t.jsx("span",{className:"word-table__brand-logo--ihab",role:"img","aria-label":"IHAB"}),t.jsx("span",{className:"word-table__copyright",children:Nt})]}),t.jsxs("span",{className:"word-table__band-end",children:[V?.link&&t.jsx("span",{className:"word-table__link",children:V.link}),U&&T!=="none"&&t.jsx("span",{className:"word-table__page-count",children:P("wordTable.filter.pageIndicator",{current:U.current,total:U.total})})]})]})}),!st&&U&&T!=="none"&&t.jsx("span",{className:`word-table__page-number body-3 word-table__page-number--${T}`,children:P("wordTable.filter.pageIndicator",{current:U.current,total:U.total})})]})}),_&&t.jsx("span",{role:"status",style:S4,children:O})]}),tt=we==null?wt:t.jsx("div",{className:"word-table__frame",style:{height:we},children:wt});return S?t.jsx(Ma,{type:"page",icon:n,title:e,disc:a,className:ke(le("word-table__section"),r),children:tt}):tt}function $4(e,n,a){const r=[];for(const s of e??[]){if(s.type==="note"||s.type==="input")continue;const l=s.displayLabel??s.label,i=L4(s,n?.[s.label],a);i!==null&&r.push(`${l} ${i}`)}return r.join(" \xB7 ")}function L4(e,n,a){const r=(Array.isArray(n)?n:n===void 0?[]:[n]).filter(s=>s!==jn);return r.length===0?e.allOption?e.allLabel??a:null:r.map(s=>R4(e,s)).join(", ")}function R4(e,n){const a=[...e.items??[],...(e.groups??[]).flat()];for(const r of a)if(r!=null){if(typeof r=="string"){if(r===n)return r;continue}if(r.value===n)return r.displayLabel??r.labels?.join(" ")??r.value}return n}function Gn({title:e,titleLevel:n=2,headerAction:a,headerSummary:r,collapsible:s=!1,defaultCollapsed:l=!1,collapsed:i,onCollapsedChange:u,footer:c,sections:p,selected:h={},onSelect:d,align:f,sectionAlign:C,className:x}){const y=_n()??mn,b=(f??(C==="vertical"?"newline":"inline"))==="inline",{t:v}=Ee.useTranslation(),[_,g]=o.useState(l),w=i??_,N=()=>{const D=!w;g(D),u?.(D)},m=D=>{if(!s)return;const $=D.target;!$||typeof $.closest!="function"||$.closest(".filter-panel__collapse-toggle")||$.closest('button, a, input, select, textarea, label, [role="radiogroup"], [role="button"], [role="menu"]')||N()},A=o.useMemo(()=>r!==void 0||!w?"":$4(p,h,v("common.all","\uC804\uCCB4")),[r,w,p,h,v]),B=r??(A?t.jsx("span",{className:"filter-panel__header-summary body-3",children:A}):null),j=e||a||r||s,k=o.useId(),E=n?`h${n}`:"span";return t.jsxs("div",{className:ke("filter-panel",s?"filter-panel--collapsible":"",w?"filter-panel--collapsed":"",x),role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?k:void 0,children:[j&&t.jsxs("div",{className:"filter-panel__header",onClick:s?m:void 0,children:[t.jsx("div",{className:"filter-panel__title-row",children:e&&t.jsx(E,{id:k,className:"filter-panel__title h4",children:e})}),t.jsxs("div",{className:"filter-panel__header-actions",children:[w?B:a,s&&t.jsx(be,{htmlType:"button",size:y,type:"dot",variant:"transparent-gray",useBorder:!1,icon:w?"chevron-down":"chevron-up",className:"filter-panel__collapse-toggle",ariaLabel:w?v("common.expand","\uD3BC\uCE58\uAE30"):v("common.collapse","\uC811\uAE30"),showTooltipInfo:w?v("common.expand","\uD3BC\uCE58\uAE30"):v("common.collapse","\uC811\uAE30"),"aria-expanded":!w,onClick:N})]})]}),!w&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:ke("filter-panel__sections",b?"filter-panel__sections--row":""),children:p.map(D=>{const $=h[D.label],V=$===void 0||(Array.isArray($)?$.length===0:!1),F=(D.items??[]).filter(T=>T!=null);D.allOption&&F.some(T=>(typeof T=="string"?T:T.value)===jn)&&jt(`filter-panel-all-value:${D.label}`,`[FilterPanel] '${D.label}' \uC808\uC5D0 allOption \uACFC \uAC12 '${jn}' \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 U=T=>{const z=typeof T=="string"?T:T.value,W=typeof T!="string"&&!!T.disabled,ie=typeof T!="string"?T.labels:void 0,Q=typeof T!="string"?T.displayLabel:void 0,L=typeof T!="string"?T.tooltip:void 0,J=typeof T!="string"?T.descriptionTooltip:void 0,ee=typeof T!="string"?T.shape:void 0,q=Array.isArray($)?$.includes(z):$===z;return t.jsx(be,{htmlType:"button",size:"keyboard",label:ie??Q??z,type:D.itemType??(ie?"bar":z.length===1?"dot":void 0),selected:q,disabled:W,shape:ee,showTooltipInfo:!!L,tooltipInfoText:L,tooltipDescription:J,onClick:()=>d?.(z,D.label)},z)};return t.jsxs(o.Fragment,{children:[D.groupLabel&&t.jsxs("div",{className:"filter-panel__group-label-row",children:[t.jsx("div",{className:"filter-panel__group-label body-2",children:D.groupLabel}),D.groupAction]}),t.jsxs("div",{className:ke("filter-panel__section",D.layout==="row"?"filter-panel__section--row":"",D.block?"filter-panel__section--block":""),children:[t.jsxs("div",{className:"filter-panel__section-label-row",children:[t.jsx("span",{className:"filter-panel__section-label body-3",children:D.displayLabel??D.label}),D.labelAction??(D.labelInfo?t.jsx(rr,{...D.labelInfo}):null)]}),D.type==="note"?t.jsx("div",{className:"filter-panel__note body-3",children:D.content}):D.type==="input"?t.jsx(na,{className:"filter-panel__textfield",placeholder:D.placeholder,ariaLabel:D.displayLabel??D.label,value:h[D.label]??"",onChange:T=>d?.(T,D.label),error:D.error}):!D.multiple&&D.display==="segmented"?t.jsx(kn,{ariaLabel:D.displayLabel??D.label,options:[...D.allOption?[{key:jn,label:D.allLabel??v("common.all","\uC804\uCCB4"),disabled:D.allOptionDisabled}]:[],...F.map(T=>{const z=typeof T=="string"?T:T.value,W=typeof T!="string"?T.displayLabel:void 0,ie=typeof T!="string"?T.disabled:void 0;return{key:z,label:W??z,disabled:ie}})],value:V&&D.allOption?jn:h[D.label]??"",onChange:T=>d?.(T,D.label),size:32}):!D.multiple&&D.display==="dropdown"?t.jsx(An,{className:"filter-panel__dropdown",ariaLabel:typeof D.label=="string"?D.label:void 0,size:y,options:[...D.allOption?[{value:jn,label:D.allLabel??v("common.all","\uC804\uCCB4"),disabled:D.allOptionDisabled}]:[],...F.map(T=>{const z=typeof T=="string"?T:T.value,W=typeof T!="string"?T.displayLabel:void 0,ie=typeof T!="string"?T.disabled:void 0;return{value:z,label:W??z,disabled:ie}})],value:V&&D.allOption?jn:h[D.label],onChange:T=>d?.(T,D.label)}):t.jsxs("div",{className:D.groups?"filter-panel__item-groups":"filter-panel__items",children:[D.allOption&&!D.groups&&t.jsx(be,{htmlType:"button",size:"keyboard",label:D.allLabel??v("common.all","\uC804\uCCB4"),selected:V,disabled:D.allOptionDisabled,onClick:()=>d?.(jn,D.label)}),D.groups?D.groups.map((T,z)=>t.jsxs("div",{className:"filter-panel__item-group",children:[z===0&&D.allOption&&t.jsx(be,{htmlType:"button",size:"keyboard",label:D.allLabel??v("common.all","\uC804\uCCB4"),selected:V,disabled:D.allOptionDisabled,onClick:()=>d?.(jn,D.label)}),T.filter(W=>W!=null).map(U)]},z)):F.map(U)]})]})]},D.label)})}),c!=null&&c!==!1&&t.jsx("div",{className:"filter-panel__footer body-3",children:c})]})]})}const P4=[1,2,3,4,5,6,7,8,9,10,11,12],F4=[8,6,4,2,1],xn="show",Pn="hide",Ic=["image","word","caption","standardPron"];function Oc(e){return e.some(n=>(n.words??[]).some(a=>!!a.captionBadge||!!a.captionLabel))}function zc(e,n){return{label:e("wordTable.filter.composition","\uAD6C\uC131"),items:[{value:"image",disabled:!n.hasImage,displayLabel:e("wordTable.filter.image","\uC774\uBBF8\uC9C0")},{value:"word",displayLabel:e("wordTable.filter.word","\uB2E8\uC5B4")},{value:"caption",disabled:!n.hasCaption,displayLabel:e("wordTable.filter.caption","\uC720\uD615")},{value:"standardPron",displayLabel:e("wordTable.filter.standardPron","\uD45C\uC900 \uBC1C\uC74C")},{value:"colloquialPron",disabled:!n.hasColloquial,displayLabel:e("wordTable.filter.colloquialPron","\uAD6C\uC5B4\uCCB4 \uBC1C\uC74C")}],multiple:!0,allOption:!0}}function Wc(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 Hc(e){return{label:e("wordTable.filter.border","\uC678\uACFD\uC120"),items:[{value:xn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Vc(e){return{label:e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4"),items:[{value:xn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function qc(e){return{label:e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4"),items:[{value:xn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Uc(e){return{label:e("wordTable.filter.cutLine","\uC808\uCDE8\uC120"),items:[{value:xn,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:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Gc(e){return{label:e("wordPrint.divLine","\uB300\uB9BD\uC120"),items:[{value:xn,displayLabel:e("wordTable.filter.show","\uD45C\uC2DC")},{value:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Kc(e,n){const a=Math.max(1,Math.min(n.itemCount,n.max??n.itemCount));return{label:e(n.hasPairs?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord"),items:[a,...F4.filter(r=>r<a)].map(r=>({value:`${r}\uAC1C`,displayLabel:e("wordTable.filter.itemsPerPageOption",{count:r})})),display:"segmented"}}function Yc(e,n){return e>=n?Number.POSITIVE_INFINITY:e}function I4(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:Pn,displayLabel:e("wordTable.filter.hide","\uBBF8\uD45C\uC2DC")}],display:"segmented"}}function Zc(e){return e==="left"||e==="center"||e==="right"?e:"none"}function Xc(e,n){return{[e("wordTable.filter.composition","\uAD6C\uC131")]:n.contentTypes,[e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")]:n.orientation,[e("wordTable.filter.border","\uC678\uACFD\uC120")]:n.showOutline?xn:Pn,[e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")]:n.cutLine,[e("wordPrint.divLine","\uB300\uB9BD\uC120")]:n.showDivLine?xn:Pn,...n.showTopInfo!=null?{[e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")]:n.showTopInfo?xn:Pn}:{},...n.showBottomInfo!=null?{[e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")]:n.showBottomInfo?xn:Pn}:{}}}function Jc(e,n,a,r){return a===e("wordTable.filter.composition","\uAD6C\uC131")?n===jn?(r.setContentTypes(()=>[]),!0):(r.setContentTypes(s=>s.includes(n)?s.filter(l=>l!==n):[...s,n]),!0):a===e("wordTable.filter.paperOrientation","\uC6A9\uC9C0 \uBC29\uD5A5")?(r.setOrientation(n==="landscape"?"landscape":"portrait"),!0):a===e("wordTable.filter.border","\uC678\uACFD\uC120")?(r.setShowOutline(n===xn),!0):a===e("wordTable.filter.cutLine","\uC808\uCDE8\uC120")?(r.setCutLine(n),!0):a===e("wordPrint.divLine","\uB300\uB9BD\uC120")?(r.setShowDivLine(n===xn),!0):a===e("wordTable.filter.topInfo","\uC0C1\uB2E8 \uC815\uBCF4")?(r.setShowTopInfo?.(n===xn),!0):a===e("wordTable.filter.bottomInfo","\uD558\uB2E8 \uC815\uBCF4")?(r.setShowBottomInfo?.(n===xn),!0):!1}function O4(e){return"sections"in e}function ks(e){const{t:n}=Ee.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(O4(e))return t.jsx(Gn,{className:r,title:a??n("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:e.sections,selected:e.selected,onSelect:e.onSelect,...p,align:"inline"});const{hasImage:h,hasColloquial:d,hasCaption:f,contentTypes:C,orientation:x,showOutline:y,cutLine:b,showDivLine:v,setters:_,showCutLine:g=!1,showDivLine2:w=!1,middleSections:N=[],extraSelected:m={},onExtraSelect:A,showPaperBands:B=!1,showTopInfo:j=!0,showBottomInfo:k=!0}=e,E=[zc(n,{hasImage:h,hasColloquial:d,hasCaption:f??!1}),Wc(n),...N,Hc(n),...g?[Uc(n)]:[],...w?[Gc(n)]:[],...B?[Vc(n),qc(n)]:[]],D={...Xc(n,{contentTypes:C,orientation:x,showOutline:y,cutLine:b,showDivLine:v,showTopInfo:j,showBottomInfo:k}),...m},$=(V,F)=>{Jc(n,V,F,_)||A?.(V,F)};return t.jsx(Gn,{className:r,title:a??n("wordTable.filterTitle","\uD45C \uC124\uC815"),sections:E,selected:D,onSelect:$,...p,sectionAlign:"horizontal"})}function As(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function z4(e){return As(e).replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Ns(e){return e.replace(/[\\/:*?"<>|]/g,"_").trim()}let Vr=null,La=null;function W4(e,n,a,r="",s=""){if(e.length===0||La&&La.iframe.isConnected&&Date.now()-La.at<1e4)return;const l=r?Ns(r):"";Vr?.();let i=null;if(l){const p=document.title;document.title=l,i=()=>{document.title=p,window.removeEventListener("afterprint",i),Vr===i&&(Vr=null)},Vr=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}La={iframe:u,at:Date.now()},c.open(),c.write(Es(e,n,a,!0,l,s)),c.close(),u.contentWindow?.addEventListener("afterprint",()=>{i?.(),setTimeout(()=>{u.remove(),La?.iframe===u&&(La=null)},0)})}function Es(e,n,a,r=!1,s="",l=""){s=s?Ns(s):"";const i=Array.from(document.styleSheets).flatMap(d=>{try{return Array.from(d.cssRules).map(f=>f.cssText)}catch{return[]}}).join(`
837
+ `),u="light",c=(()=>{try{return document.documentElement.lang||""}catch{return""}})(),p=l?`<div class="paper-head">${As(l)}</div>`:"",h=e.map(d=>{const f=d.cloneNode(!0);return f.querySelectorAll('[data-play-state="play"]').forEach(C=>C.style.display=""),f.querySelectorAll('[data-play-state="pause"]').forEach(C=>C.style.display="none"),f.querySelectorAll(".word-table-cell__score-slot:not(.word-table-cell__score-slot--on)").forEach(C=>C.remove()),f.querySelectorAll(".word-table-cell__spinner").forEach(C=>C.remove()),f.querySelectorAll("img").forEach(C=>{C.style.opacity==="0"&&(C.setAttribute("onload","this.style.opacity=''"),C.setAttribute("onerror","this.style.visibility='hidden'"))}),`<div class="paper-wrap">${p}${f.outerHTML}</div>`}).join(`
838
838
  `);return`<!DOCTYPE html>
839
- <html${u?` lang="${z4(u)}"`:""} data-theme="${c}">
839
+ <html${c?` lang="${z4(c)}"`:""} data-theme="${u}">
840
840
  <head>
841
841
  <meta charset="utf-8">
842
842
  ${s?`<title>${As(s)}</title>`:""}
@@ -863,7 +863,7 @@ ${f.badge}`:f.badge:void 0;if(B&&h(f.code))return null;if(!f.badge&&!m)return C(
863
863
  html, body { margin: 0; padding: 24px 0; width: 100%; min-height: 100%; background: #f0f0f0; overflow: auto; }
864
864
  body { display: flex; flex-direction: column; align-items: center; gap: 24px; }
865
865
  .paper-wrap {
866
- width: ${n}px; height: ${r}px;
866
+ width: ${n}px; height: ${a}px;
867
867
  padding: 57px;
868
868
  background: #fff;
869
869
  box-shadow: 0 4px 24px rgba(0,0,0,.14);
@@ -893,7 +893,7 @@ ${f.badge}`:f.badge:void 0;if(B&&h(f.code))return null;if(!f.badge&&!m)return C(
893
893
  }
894
894
  @media print {
895
895
  /* \uC6A9\uC9C0 \uBC29\uD5A5\uC744 \uB2E8\uC5B4\uD45C \uC124\uC815\uACFC \uC77C\uCE58\uC2DC\uCF1C \uC778\uC1C4 \uB300\uD654\uC0C1\uC790 \uAE30\uBCF8\uAC12\uC73C\uB85C \uBC18\uC601 */
896
- @page { size: A4 ${n>r?"landscape":"portrait"}; margin: 0; }
896
+ @page { size: A4 ${n>a?"landscape":"portrait"}; margin: 0; }
897
897
  /* \uBCF8 \uBB38\uC11C\uC5D0\uC11C \uBCF5\uC0AC\uD574\uC628 WordTable.css\uC758 print \uADDC\uCE59\uC740 body * \uB97C \uC804\uBD80 \uC228\uAE30\uACE0
898
898
  .word-table \uB9CC \uB2E4\uC2DC \uBCF4\uC5EC\uC8FC\uB294\uB370, \uC774 \uD31D\uC5C5\uC5D4 .word-table \uB798\uD37C\uAC00 \uC5C6\uC5B4(\uB0B4\uC6A9\uC740
899
899
  .word-table__content \uD074\uB860) \uC804\uBD80 \uC228\uACA8\uC9C4 \uCC44 \uC778\uC1C4\uB41C\uB2E4. \uC5EC\uAE30\uC11C \uBCF5\uC6D0\uD55C\uB2E4. */
@@ -922,7 +922,7 @@ ${f.badge}`:f.badge:void 0;if(B&&h(f.code))return null;if(!f.badge&&!m)return C(
922
922
  function scale() {
923
923
  var pad = 40;
924
924
  var sw = (window.innerWidth - pad) / ${n};
925
- var sh = (window.innerHeight - pad) / ${r};
925
+ var sh = (window.innerHeight - pad) / ${a};
926
926
  var s = Math.min(sw, sh, 1);
927
927
  document.querySelectorAll('.paper-wrap').forEach(function(paper) {
928
928
  paper.style.transform = 'scale(' + s + ')';
@@ -1003,7 +1003,7 @@ ${f.badge}`:f.badge:void 0;if(B&&h(f.code))return null;if(!f.badge&&!m)return C(
1003
1003
  audio.play().catch(function() { setPlaying(false); });
1004
1004
  });
1005
1005
  });
1006
- ${a?`
1006
+ ${r?`
1007
1007
  // document.write \uC9C1\uD6C4 \uBC14\uB85C window.print()\uB97C \uBD80\uB974\uBA74 \uC774\uBBF8\uC9C0(\uBE44\uB3D9\uAE30 \uB85C\uB4DC)\uC640
1008
1008
  // \uB808\uC774\uC544\uC6C3\uC774 \uC544\uC9C1 \uBC18\uC601\uB418\uAE30 \uC804\uC774\uB77C \uBE48 \uD398\uC774\uC9C0\uB85C \uC778\uC1C4\uB418\uB294 \uACBD\uC6B0\uAC00 \uC788\uC5B4,
1009
1009
  // \uBAA8\uB4E0 <img> \uB85C\uB4DC \uC644\uB8CC + \uAE00\uAF34 \uC900\uBE44(\uCD5C\uB300 1\uCD08) + rAF 2\uD2F1(\uB808\uC774\uC544\uC6C3/\uD398\uC778\uD2B8 \uD655\uC815) \uC774\uD6C4\uC5D0 \uC778\uC1C4\uD55C\uB2E4.
@@ -1043,10 +1043,10 @@ ${f.badge}`:f.badge:void 0;if(B&&h(f.code))return null;if(!f.badge&&!m)return C(
1043
1043
  `:""}
1044
1044
  <\/script>
1045
1045
  </body>
1046
- </html>`}const H4=1e3;function js({getElements:e,paperW:n,paperH:r,fileName:a="",onPopupBlocked:s,header:l=""}){const{t:i}=Ee.useTranslation(),c=o.useCallback(()=>{W4(e(),n,r,a,l)},[e,n,r,a,l]),u=o.useCallback(()=>{const h=e();if(h.length===0)return;const d=window.open("","_blank");if(!d){s?.();return}d.document.write(Es(h,n,r,!1,a,l)),d.document.close()},[e,n,r,a,s,l]),p=o.useCallback(()=>{const h=e();if(h.length===0)return;const d=Es(h,n,r,!1,a,l),m=new Blob([d],{type:"text/html;charset=utf-8"}),C=URL.createObjectURL(m),x=(a?Ns(a):"")||i("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C"),y=Object.assign(document.createElement("a"),{href:C,download:`${x}.html`});document.body.appendChild(y),y.click(),document.body.removeChild(y),setTimeout(()=>URL.revokeObjectURL(C),H4)},[e,n,r,a,l,i]);return{print:c,openNewWindow:u,downloadHtml:p}}function Qc(e,n){const{t:r}=Ee.useTranslation(),a=n?.paperBands===!0,s=n?.maxItemsPerPage,[l,i]=o.useState("landscape"),[c,u]=o.useState([...Ic]),[p,h]=o.useState("show"),[d,m]=o.useState(!0),[C,x]=o.useState(!0),[y,b]=o.useState(!0),[v,_]=o.useState(!0),[g,w]=o.useState(8),[N,f]=o.useState("right"),A=e.length,B=e.some(Q=>(Q.words??[]).length>1),E=e.some(Q=>(Q.words??[]).some(L=>!!L.colloquialLabel)),k=Oc(e),j=Math.max(1,Math.min(Math.max(A,1),s??Math.max(A,1))),S=Math.min(g,j),$=o.useMemo(()=>x4(e,S),[e,S]),V=$.length>1,F=S,[U,T]=o.useState(!1);o.useEffect(()=>{let Q=!1;if(!_r()){T(!1);return}return Promise.all(e.flatMap(L=>(L.words??[]).map(J=>Xl(J.label,J.homonum)))).then(L=>{Q||T(L.some(Boolean))},()=>{}),()=>{Q=!0}},[e]);const z=o.useMemo(()=>[zc(r,{hasImage:U,hasColloquial:E,hasCaption:k}),Wc(r),...A>0?[Kc(r,{hasPairs:B,itemCount:A,max:s})]:[],Hc(r),...F>1?[Uc(r)]:[],...B?[Gc(r)]:[],...a?[Vc(r),qc(r)]:[]],[r,U,E,k,A,B,V,F,a,s]),W={...Xc(r,{contentTypes:c,orientation:l,showOutline:d,cutLine:p,showDivLine:v,showTopInfo:C,showBottomInfo:y}),...A>0?{[r(B?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${S}\uAC1C`}:{},...V?{[r("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:N}:{}},ie=o.useCallback((Q,L)=>{Jc(r,Q,L,{setContentTypes:u,setOrientation:i,setShowOutline:m,setCutLine:h,setShowDivLine:_,setShowTopInfo:x,setShowBottomInfo:b})||(L===r("wordTable.filter.itemsPerPagePair","\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218")||L===r("wordTable.filter.itemsPerPageWord","\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218")?w(Yc(parseInt(Q),A)):L===r("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&f(Zc(Q)))},[r,A]);return{settings:{orientation:l,contentTypes:c,cutLine:p,showOutline:d,showDivLine:v,count:F,showTopInfo:C,showBottomInfo:y},filterSections:z,filterSelected:W,handleSelect:ie,pages:$,isPaginated:V,pageNumberPosition:N}}function V4({items:e,words:n,baseItem:r,baseContentTypes:a,maxItemsPerPage:s,title:l,subtitle:i,emptyText:c,buttons:u,renderButtons:p,renderFooter:h,footerClassName:d,footerLayout:m,printFileName:C,showSettings:x,autoPrint:y,className:b,onClose:v,scoring:_=!1,onScoreChange:g,printHeader:w,brand:N,code:f,beforeClose:A}){const{t:B}=Ee.useTranslation(),E=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(n)?n:[]).filter(O=>typeof O=="string"&&O.length>0).map((O,I)=>({id:`${O}-${I}`,words:[{label:O}]})),[e,n]),{settings:k,filterSections:j,filterSelected:S,handleSelect:$,pages:V,isPaginated:F,pageNumberPosition:U}=Qc(E,{paperBands:!!N?.show,maxItemsPerPage:s}),T=o.useMemo(()=>jc(V.map(O=>O.length)),[V]),[z,W]=o.useState({}),ie=o.useCallback((O,I)=>{W(ae=>({...ae,[Wa(O)]:Ac(ae[Wa(O)]??null,I)}))},[]),Q=o.useRef(g);o.useEffect(()=>{Q.current=g});const L=o.useRef(z);o.useEffect(()=>{L.current!==z&&(L.current=z,Q.current?.(ys(z)))},[z]);const J=o.useMemo(()=>ys(z),[z]),ee=o.useRef(null),{toastMessage:q,toastKey:P,showWarning:R,clearToast:D}=du("warning"),H=o.useRef([]),ne=o.useCallback(()=>F?H.current.filter(O=>O!==null):ee.current?[ee.current]:[],[F]),{print:te,openNewWindow:ue}=js({getElements:ne,paperW:hr[k.orientation].width,paperH:hr[k.orientation].height,fileName:C??"",header:w??"",onPopupBlocked:()=>R(B("wordTable.popupBlocked","\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694."))}),se=o.useMemo(()=>h?void 0:p?p({print:te,openNewWindow:ue}):C?[{label:B("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>ue()},{label:B("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>te()},...u??[]]:u,[h,p,C,u,B,te,ue]),pe=o.useMemo(()=>h?h({print:te,openNewWindow:ue}):void 0,[h,te,ue]),G=o.useRef(!1),K=o.useRef(te);return o.useEffect(()=>{K.current=te},[te]),o.useEffect(()=>{if(!y||G.current)return;const O=window.setTimeout(()=>{G.current=!0,K.current()},100);return()=>window.clearTimeout(O)},[y]),t.jsxs(qn,{title:l??B("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:i,size:"large",className:ke("word-table-popup",b),buttons:se,footer:pe,footerClassName:d,footerLayout:m,beforeClose:A,onClose:v,children:[E.length>0?t.jsxs("div",{className:"word-table-popup__body",children:[x&&t.jsx(ks,{sections:j,selected:S,onSelect:$}),F?t.jsx("div",{className:"word-table-popup__pages",children:V.map((O,I)=>t.jsx(Mr,{items:O,orientation:k.orientation,contentTypes:k.contentTypes,baseItem:r,baseContentTypes:a,cutLine:k.cutLine,showOutline:k.showOutline,showDivLine:k.showDivLine,count:k.count,contentRef:ae=>{H.current[I]=ae},pageNumber:{current:I+1,total:V.length},pageNumberPosition:U,brand:N&&{...N,top:k.showTopInfo,bottom:k.showBottomInfo},code:f,scoring:_,scoreIndexOffset:T[I],marks:J,onMarkClick:ie},I))}):t.jsx("div",{className:"word-table-popup__table",children:t.jsx(Mr,{items:E,orientation:k.orientation,contentTypes:k.contentTypes,baseItem:r,baseContentTypes:a,cutLine:k.cutLine,showOutline:k.showOutline,showDivLine:k.showDivLine,count:k.count,contentRef:ee,fitHeight:!0,scoring:_,marks:J,onMarkClick:ie,brand:N&&{...N,top:k.showTopInfo,bottom:k.showBottomInfo},code:f})})]}):t.jsx("p",{className:"word-table-popup__empty body-3",children:c??B("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),t.jsx(Sr,{message:q,position:"top",onClose:D},P)]})}const q4=new Set(["x","triangle"]);function U4(e,n){const r=[];for(let a=0;a<e.length;a++){const s=n[String(a)];s&&q4.has(s)&&r.push(e[a])}return r}const G4=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function ed(e){const n=e.name.trim(),r=e.reviewRound;if(typeof r=="number"&&Number.isFinite(r)&&r>=0){const l=Math.floor(r);if(l===0)return{base:n,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(n);return{base:i?n.slice(0,i.index).trim():n,round:l+1}}let a=n,s=1;for(;;){const l=G4.exec(a);if(!l)break;s=Math.max(s,(l[1]?Number(l[1]):1)+1),a=a.slice(0,l.index).trim()}return{base:a,round:s}}function K4(e,n){const[,r,a]=jo(n).split("-"),s=`${r}.${a}`,{base:l,round:i}=ed(typeof e=="string"?{name:e}:e),c=i>=2?`${i}\uCC28 `:"";return`${l||"\uB2E8\uC5B4\uD45C"} ${c}\uBCF5\uC2B5 ${s}`}function Y4(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:ed(e).round}}function Z4(e,n){const r={};for(const[a,s]of Object.entries(n)){if(s!=="o"&&s!=="triangle"&&s!=="x")continue;const l=Number(a),i=e[l];i&&(r[a]=i)}return r}function X4(e){return e.map(n=>n.label).join(" / ")}function J4(e){return e.map(n=>n.homonum!=null?`${n.label}#${n.homonum}`:n.label).join(" / ")}function td(e){return e.split(" / ").map(n=>n.replace(/#\d+$/,"")).join(" / ")}function Q4(e,n,r){const a=hi(r);return[e.trim(),a,n.trim()].filter(Boolean).join(" \xB7 ")}function nd(e,n,r){return r===0?0:(e+n*.5)/r}function e_(e){const n=new Map,r=[...e].sort((s,l)=>s.scoredAt.localeCompare(l.scoredAt));for(const s of r)for(const[l,i]of Object.entries(s.marks)){const c=s.labels?.[l];if(!c)continue;const u=n.get(c)??{o:0,triangle:0,x:0,latest:i,latestAt:s.scoredAt};if(i==="o")u.o++;else if(i==="triangle")u.triangle++;else if(i==="x")u.x++;else continue;u.latest=i,u.latestAt=s.scoredAt,n.set(c,u)}const a=[];for(const[s,l]of n){const i=l.o+l.triangle+l.x;a.push({label:td(s),key:s,tried:i,o:l.o,triangle:l.triangle,x:l.x,rate:nd(l.o,l.triangle,i),latest:l.latest,latestAt:l.latestAt})}return a.sort((s,l)=>s.rate-l.rate||l.tried-s.tried||vn(s.label,l.label)||vn(s.key??s.label,l.key??l.label)),a}function t_(e){const n=new Map;for(const a of e){const s=a.tableId??`name:${a.tableName}`,l=n.get(s)??{tableName:a.tableName,tableId:a.tableId,rows:[]};l.rows.push(a),n.set(s,l)}const r=[];for(const a of n.values()){const s=c=>Object.values(c.marks).filter(u=>u==="o"||u==="triangle"||u==="x").length,l=a.rows.filter(c=>s(c)>0).sort((c,u)=>c.scoredAt.localeCompare(u.scoredAt));if(l.length===0)continue;const i=l.map(c=>{const u=Object.values(c.marks),p=u.filter(d=>d==="o").length,h=u.filter(d=>d==="triangle").length;return nd(p,h,s(c))});r.push({tableName:a.tableName,tableId:a.tableId,rates:i,times:l.map(c=>c.scoredAt),delta:i.length>=2?i[i.length-1]-i[0]:null})}return r.sort((a,s)=>(s.times[s.times.length-1]??"").localeCompare(a.times[a.times.length-1]??"")),r}function n_(e,n=8){return e.filter(r=>r.latest!=="o").slice(0,n)}function r_(e,n){if(e==null||n==null||e===""||n==="")return 0;if(typeof e=="number"&&typeof n=="number")return e-n;const r=String(e),a=String(n);return+(r>a)-+(r<a)}function a_(e){const n=new Map;let r=0,a=0;const s=e.map((i,c)=>({r:i,at:c})).sort((i,c)=>i.r.answeredAt.localeCompare(c.r.answeredAt)||r_(i.r.id,c.r.id)||i.at-c.at).map(i=>i.r);for(const i of s){if(i.isCorrect==null)continue;const c=i.itemTitle?.trim();if(!c){a++;continue}r++;const u=i.itemId?.trim()||c,p=`${i.trainingType}|${u}`,h=n.get(p)??{trainingType:i.trainingType,itemId:u,title:c,tried:0,wrong:0,latestCorrect:i.isCorrect,latestAt:i.answeredAt,lastSelected:i.selected,setIds:[]};if(h.tried++,i.isCorrect||h.wrong++,h.title=c,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)}n.set(p,h)}const l=[...n.entries()].map(([i,c])=>({key:i,trainingType:c.trainingType,itemId:c.itemId,title:c.title,tried:c.tried,wrong:c.wrong,rate:c.tried===0?0:(c.tried-c.wrong)/c.tried,latestCorrect:c.latestCorrect,latestAt:c.latestAt,lastSelected:c.lastSelected,setIds:c.setIds}));return l.sort((i,c)=>i.rate-c.rate||c.tried-i.tried||vn(i.title,c.title)),{items:l,counted:r,skippedNoTitle:a}}function o_(e,n=8){return e.filter(r=>!r.latestCorrect).slice(0,n)}function s_(e){const n=new Map;for(const a of e){const s=n.get(a.trainingType)??[];s.push(a),n.set(a.trainingType,s)}const r=[...n.entries()].map(([a,s])=>({trainingType:a,items:s,pending:s.filter(l=>!l.latestCorrect).length}));return r.sort((a,s)=>s.pending-a.pending||a.trainingType.localeCompare(s.trainingType)),r}const Ds=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function l_(e){const n=new Map;let r=0;for(const l of e){if(l.latestCorrect)continue;const i=l.setIds[0];if(!i){r++;continue}const c=`${l.trainingType}|${i}`,u=n.get(c)??{setId:i,trainingType:l.trainingType,pending:0};u.pending++,n.set(c,u)}const a=(l,i)=>i.pending-l.pending||l.trainingType.localeCompare(i.trainingType)||l.setId.localeCompare(i.setId),s=[...n.values()];return{sentence:s.filter(l=>Ds.includes(l.trainingType)).sort(a),word:s.filter(l=>!Ds.includes(l.trainingType)).sort(a),noSet:r}}function i_(e,n,r=5){const a=new Set(n);if(a.size===0)return[];const s=[];for(const l of e){const i=new Set,c=[];for(const u of l.cellLabels)a.has(u)&&!i.has(u)&&(i.add(u),c.push(u));c.length!==0&&s.push({id:l.id,name:l.name,kind:l.kind,covered:c,totalCells:l.cellLabels.length})}return s.sort((l,i)=>i.covered.length-l.covered.length||l.totalCells-i.totalCells||vn(l.name,i.name)),s.slice(0,Math.max(0,r))}function u_(e,n){const r=new Set(e.flatMap(a=>a.covered));return n.filter(a=>!r.has(a))}function c_(e,n){const r=new Map;for(const s of e)for(const l of s.cells){const i=s.labelOf(l);r.has(i)||r.set(i,l)}const a=[];for(const s of n){const l=r.get(s);l!==void 0&&a.push(l)}return a}function Ss(e,n,r){return typeof e=="string"&&e?e:n.replace(/\{\{(\w+)\}\}/g,(a,s)=>String(r[s]))}function d_(e,n){const r=Number.isFinite(e)?Math.round(e):0;if(!r||r<=0)return"-";const a=Math.floor(r/60),s=r%60;return n?n(a,s):a>0&&s>0?Ss(Jt.t("customers.duration.minSec",{m:a,s,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:a,s}):a>0?Ss(Jt.t("customers.duration.min",{m:a,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:a}):Ss(Jt.t("customers.duration.sec",{s,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s})}function p_(e,n){const r=[],a=new Set;for(const s of e){const l=n(s);a.has(l)||(a.add(l),r.push({key:l,value:s,pinned:!1}))}return r}function h_(e,n){return e.map(r=>r.key===n?{...r,pinned:!r.pinned}:r)}function m_(e,n){return e.filter(r=>r.key!==n)}function f_(e,n,r){const a=e.filter(p=>p.pinned),s=new Set(a.map(p=>p.key)),l=e.length-a.length,i=[],c=new Set(s);for(const p of n){if(i.length>=l)break;const h=r(p);c.has(h)||(c.add(h),i.push({key:h,value:p,pinned:!1}))}const u=[...i];return e.map(p=>p.pinned?p:u.shift()).filter(p=>p!==void 0)}function C_(e){return e.map(n=>n.value)}function g_(e){const{category:n={},isSelected:r=!1,onClick:a}=e||{},s=n?.key?` icon-grid-menu__button--${n.key}`:"",l=o.useId();return t.jsxs("div",{className:`icon-grid-menu__button-wrapper${s}`,children:[t.jsx("button",{className:`icon-grid-menu__button${r?" icon-grid-menu__button--selected":""}`,"data-key":n?.key,type:"button",onClick:r?void 0:a,"aria-pressed":r,"aria-labelledby":l,children:t.jsx(dt,{icon:n.icon,label:n.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"})}),t.jsx("span",{id:l,className:"icon-grid-menu__button-label button-1",children:n.label})]})}function b_(e){const{categories:n=[],selected:r,onSelect:a,size:s="medium"}=e||{},l=r!==void 0,[i,c]=o.useState(()=>l?null:(n&&n[0]?.key)??null),u=l?r:i,p=o.useRef(a);o.useEffect(()=>{p.current=a});const h=o.useRef(!1),d=(n&&n[0]?.key)??null;o.useEffect(()=>{if(l||h.current||!d)return;h.current=!0;const C=i??d;i==null&&c(C),p.current?.(C)},[l,d]);const m=o.useCallback(C=>{const x=u===C?null:C;h.current=!0,l||c(x),a?.(x)},[u,l,a]);return t.jsx("div",{className:`icon-grid-menu icon-grid-menu--${s}`,children:(n||[]).map(C=>t.jsx(g_,{category:C,isSelected:u===C.key,onClick:()=>m(C.key)},C.key))})}function y_({subs:e=[],selected:n,onSelect:r,size:a="medium"}){const s=a==="small"?32:40;return t.jsx("div",{className:`choice-chips choice-chips--${a}`,children:t.jsx("div",{className:"choice-chips__list",children:e.map(l=>t.jsx(ye,{htmlType:"button",size:s,type:"bar",label:l.label,selected:n===l.key,className:"choice-chips__button",onClick:()=>r?.(l.key)},l.key))})})}function v_({onTermsClick:e,onPrivacyClick:n,contact:r}={}){const a=r?.email??"support@ihab.co.kr",s=r?.tel??"031-380-3724",{t:l}=Ee.useTranslation();return t.jsx("footer",{className:"site-footer",children:t.jsxs("div",{className:"safearea",children:[t.jsxs("div",{className:"site-footer__top",children:[t.jsx("div",{className:"site-footer__brand",children:t.jsx("div",{className:"site-footer__lead h3",children:l("footer.lead",`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
1046
+ </html>`}const H4=1e3;function js({getElements:e,paperW:n,paperH:a,fileName:r="",onPopupBlocked:s,header:l=""}){const{t:i}=Ee.useTranslation(),u=o.useCallback(()=>{W4(e(),n,a,r,l)},[e,n,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(Es(h,n,a,!1,r,l)),d.document.close()},[e,n,a,r,s,l]),p=o.useCallback(()=>{const h=e();if(h.length===0)return;const d=Es(h,n,a,!1,r,l),f=new Blob([d],{type:"text/html;charset=utf-8"}),C=URL.createObjectURL(f),x=(r?Ns(r):"")||i("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C"),y=Object.assign(document.createElement("a"),{href:C,download:`${x}.html`});document.body.appendChild(y),y.click(),document.body.removeChild(y),setTimeout(()=>URL.revokeObjectURL(C),H4)},[e,n,a,r,l,i]);return{print:u,openNewWindow:c,downloadHtml:p}}function Qc(e,n){const{t:a}=Ee.useTranslation(),r=n?.paperBands===!0,s=n?.maxItemsPerPage,[l,i]=o.useState("landscape"),[u,c]=o.useState([...Ic]),[p,h]=o.useState("show"),[d,f]=o.useState(!0),[C,x]=o.useState(!0),[y,b]=o.useState(!0),[v,_]=o.useState(!0),[g,w]=o.useState(8),[N,m]=o.useState("right"),A=e.length,B=e.some(Q=>(Q.words??[]).length>1),j=e.some(Q=>(Q.words??[]).some(L=>!!L.colloquialLabel)),k=Oc(e),E=Math.max(1,Math.min(Math.max(A,1),s??Math.max(A,1))),D=Math.min(g,E),$=o.useMemo(()=>x4(e,D),[e,D]),V=$.length>1,F=D,[U,T]=o.useState(!1);o.useEffect(()=>{let Q=!1;if(!_a()){T(!1);return}return Promise.all(e.flatMap(L=>(L.words??[]).map(J=>Xl(J.label,J.homonum)))).then(L=>{Q||T(L.some(Boolean))},()=>{}),()=>{Q=!0}},[e]);const z=o.useMemo(()=>[zc(a,{hasImage:U,hasColloquial:j,hasCaption:k}),Wc(a),...A>0?[Kc(a,{hasPairs:B,itemCount:A,max:s})]:[],Hc(a),...F>1?[Uc(a)]:[],...B?[Gc(a)]:[],...r?[Vc(a),qc(a)]:[]],[a,U,j,k,A,B,V,F,r,s]),W={...Xc(a,{contentTypes:u,orientation:l,showOutline:d,cutLine:p,showDivLine:v,showTopInfo:C,showBottomInfo:y}),...A>0?{[a(B?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${D}\uAC1C`}:{},...V?{[a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:N}:{}},ie=o.useCallback((Q,L)=>{Jc(a,Q,L,{setContentTypes:c,setOrientation:i,setShowOutline:f,setCutLine:h,setShowDivLine:_,setShowTopInfo:x,setShowBottomInfo:b})||(L===a("wordTable.filter.itemsPerPagePair","\uD398\uC774\uC9C0\uB2F9 \uB300\uB9BD\uC30D \uC218")||L===a("wordTable.filter.itemsPerPageWord","\uD398\uC774\uC9C0\uB2F9 \uB2E8\uC5B4 \uC218")?w(Yc(parseInt(Q),A)):L===a("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&m(Zc(Q)))},[a,A]);return{settings:{orientation:l,contentTypes:u,cutLine:p,showOutline:d,showDivLine:v,count:F,showTopInfo:C,showBottomInfo:y},filterSections:z,filterSelected:W,handleSelect:ie,pages:$,isPaginated:V,pageNumberPosition:N}}function V4({items:e,words:n,baseItem:a,baseContentTypes:r,maxItemsPerPage:s,title:l,subtitle:i,emptyText:u,buttons:c,renderButtons:p,renderFooter:h,footerClassName:d,footerLayout:f,printFileName:C,showSettings:x,autoPrint:y,className:b,onClose:v,scoring:_=!1,onScoreChange:g,printHeader:w,brand:N,code:m,beforeClose:A}){const{t:B}=Ee.useTranslation(),j=o.useMemo(()=>Array.isArray(e)?e:(Array.isArray(n)?n:[]).filter(O=>typeof O=="string"&&O.length>0).map((O,I)=>({id:`${O}-${I}`,words:[{label:O}]})),[e,n]),{settings:k,filterSections:E,filterSelected:D,handleSelect:$,pages:V,isPaginated:F,pageNumberPosition:U}=Qc(j,{paperBands:!!N?.show,maxItemsPerPage:s}),T=o.useMemo(()=>jc(V.map(O=>O.length)),[V]),[z,W]=o.useState({}),ie=o.useCallback((O,I)=>{W(re=>({...re,[Wr(O)]:Ac(re[Wr(O)]??null,I)}))},[]),Q=o.useRef(g);o.useEffect(()=>{Q.current=g});const L=o.useRef(z);o.useEffect(()=>{L.current!==z&&(L.current=z,Q.current?.(ys(z)))},[z]);const J=o.useMemo(()=>ys(z),[z]),ee=o.useRef(null),{toastMessage:q,toastKey:P,showWarning:R,clearToast:S}=du("warning"),H=o.useRef([]),ne=o.useCallback(()=>F?H.current.filter(O=>O!==null):ee.current?[ee.current]:[],[F]),{print:te,openNewWindow:ue}=js({getElements:ne,paperW:ha[k.orientation].width,paperH:ha[k.orientation].height,fileName:C??"",header:w??"",onPopupBlocked:()=>R(B("wordTable.popupBlocked","\uD31D\uC5C5\uC774 \uCC28\uB2E8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uBE0C\uB77C\uC6B0\uC800 \uC124\uC815\uC5D0\uC11C \uD31D\uC5C5\uC744 \uD5C8\uC6A9\uD574 \uC8FC\uC138\uC694."))}),se=o.useMemo(()=>h?void 0:p?p({print:te,openNewWindow:ue}):C?[{label:B("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),variant:"default",onClick:()=>ue()},{label:B("wordTable.print","\uC778\uC1C4\uD558\uAE30"),variant:"default",onClick:()=>te()},...c??[]]:c,[h,p,C,c,B,te,ue]),pe=o.useMemo(()=>h?h({print:te,openNewWindow:ue}):void 0,[h,te,ue]),G=o.useRef(!1),K=o.useRef(te);return o.useEffect(()=>{K.current=te},[te]),o.useEffect(()=>{if(!y||G.current)return;const O=window.setTimeout(()=>{G.current=!0,K.current()},100);return()=>window.clearTimeout(O)},[y]),t.jsxs(qn,{title:l??B("keyWords.title","\uC8FC\uC694 \uB2E8\uC5B4"),subtitle:i,size:"large",className:ke("word-table-popup",b),buttons:se,footer:pe,footerClassName:d,footerLayout:f,beforeClose:A,onClose:v,children:[j.length>0?t.jsxs("div",{className:"word-table-popup__body",children:[x&&t.jsx(ks,{sections:E,selected:D,onSelect:$}),F?t.jsx("div",{className:"word-table-popup__pages",children:V.map((O,I)=>t.jsx($a,{items:O,orientation:k.orientation,contentTypes:k.contentTypes,baseItem:a,baseContentTypes:r,cutLine:k.cutLine,showOutline:k.showOutline,showDivLine:k.showDivLine,count:k.count,contentRef:re=>{H.current[I]=re},pageNumber:{current:I+1,total:V.length},pageNumberPosition:U,brand:N&&{...N,top:k.showTopInfo,bottom:k.showBottomInfo},code:m,scoring:_,scoreIndexOffset:T[I],marks:J,onMarkClick:ie},I))}):t.jsx("div",{className:"word-table-popup__table",children:t.jsx($a,{items:j,orientation:k.orientation,contentTypes:k.contentTypes,baseItem:a,baseContentTypes:r,cutLine:k.cutLine,showOutline:k.showOutline,showDivLine:k.showDivLine,count:k.count,contentRef:ee,fitHeight:!0,scoring:_,marks:J,onMarkClick:ie,brand:N&&{...N,top:k.showTopInfo,bottom:k.showBottomInfo},code:m})})]}):t.jsx("p",{className:"word-table-popup__empty body-3",children:u??B("keyWords.empty","\uCD94\uCD9C\uB41C \uC8FC\uC694 \uB2E8\uC5B4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),t.jsx(Ta,{message:q,position:"top",onClose:S},P)]})}const q4=new Set(["x","triangle"]);function U4(e,n){const a=[];for(let r=0;r<e.length;r++){const s=n[String(r)];s&&q4.has(s)&&a.push(e[r])}return a}const G4=/\s*(?:(\d+)차\s*)?복습\s*\d{2}\.\d{2}$/;function ed(e){const n=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:n,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(n);return{base:i?n.slice(0,i.index).trim():n,round:l+1}}let r=n,s=1;for(;;){const l=G4.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 K4(e,n){const[,a,r]=jo(n).split("-"),s=`${a}.${r}`,{base:l,round:i}=ed(typeof e=="string"?{name:e}:e),u=i>=2?`${i}\uCC28 `:"";return`${l||"\uB2E8\uC5B4\uD45C"} ${u}\uBCF5\uC2B5 ${s}`}function Y4(e){return{reviewOf:e.reviewOf??e.id??void 0,reviewRound:ed(e).round}}function Z4(e,n){const a={};for(const[r,s]of Object.entries(n)){if(s!=="o"&&s!=="triangle"&&s!=="x")continue;const l=Number(r),i=e[l];i&&(a[r]=i)}return a}function X4(e){return e.map(n=>n.label).join(" / ")}function J4(e){return e.map(n=>n.homonum!=null?`${n.label}#${n.homonum}`:n.label).join(" / ")}function td(e){return e.split(" / ").map(n=>n.replace(/#\d+$/,"")).join(" / ")}function Q4(e,n,a){const r=hi(a);return[e.trim(),r,n.trim()].filter(Boolean).join(" \xB7 ")}function nd(e,n,a){return a===0?0:(e+n*.5)/a}function e_(e){const n=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=n.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,n.set(u,c)}const r=[];for(const[s,l]of n){const i=l.o+l.triangle+l.x;r.push({label:td(s),key:s,tried:i,o:l.o,triangle:l.triangle,x:l.x,rate:nd(l.o,l.triangle,i),latest:l.latest,latestAt:l.latestAt})}return r.sort((s,l)=>s.rate-l.rate||l.tried-s.tried||vn(s.label,l.label)||vn(s.key??s.label,l.key??l.label)),r}function t_(e){const n=new Map;for(const r of e){const s=r.tableId??`name:${r.tableName}`,l=n.get(s)??{tableName:r.tableName,tableId:r.tableId,rows:[]};l.rows.push(r),n.set(s,l)}const a=[];for(const r of n.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 nd(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 n_(e,n=8){return e.filter(a=>a.latest!=="o").slice(0,n)}function a_(e,n){if(e==null||n==null||e===""||n==="")return 0;if(typeof e=="number"&&typeof n=="number")return e-n;const a=String(e),r=String(n);return+(a>r)-+(a<r)}function r_(e){const n=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)||a_(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=n.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)}n.set(p,h)}const l=[...n.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||vn(i.title,u.title)),{items:l,counted:a,skippedNoTitle:r}}function o_(e,n=8){return e.filter(a=>!a.latestCorrect).slice(0,n)}function s_(e){const n=new Map;for(const r of e){const s=n.get(r.trainingType)??[];s.push(r),n.set(r.trainingType,s)}const a=[...n.entries()].map(([r,s])=>({trainingType:r,items:s,pending:s.filter(l=>!l.latestCorrect).length}));return a.sort((r,s)=>s.pending-r.pending||r.trainingType.localeCompare(s.trainingType)),a}const Ds=["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"];function l_(e){const n=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=n.get(u)??{setId:i,trainingType:l.trainingType,pending:0};c.pending++,n.set(u,c)}const r=(l,i)=>i.pending-l.pending||l.trainingType.localeCompare(i.trainingType)||l.setId.localeCompare(i.setId),s=[...n.values()];return{sentence:s.filter(l=>Ds.includes(l.trainingType)).sort(r),word:s.filter(l=>!Ds.includes(l.trainingType)).sort(r),noSet:a}}function i_(e,n,a=5){const r=new Set(n);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||vn(l.name,i.name)),s.slice(0,Math.max(0,a))}function u_(e,n){const a=new Set(e.flatMap(r=>r.covered));return n.filter(r=>!a.has(r))}function c_(e,n){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 n){const l=a.get(s);l!==void 0&&r.push(l)}return r}function Ss(e,n,a){return typeof e=="string"&&e?e:n.replace(/\{\{(\w+)\}\}/g,(r,s)=>String(a[s]))}function d_(e,n){const a=Number.isFinite(e)?Math.round(e):0;if(!a||a<=0)return"-";const r=Math.floor(a/60),s=a%60;return n?n(r,s):r>0&&s>0?Ss(Jt.t("customers.duration.minSec",{m:r,s,defaultValue:"{{m}}\uBD84 {{s}}\uCD08"}),"{{m}}\uBD84 {{s}}\uCD08",{m:r,s}):r>0?Ss(Jt.t("customers.duration.min",{m:r,defaultValue:"{{m}}\uBD84"}),"{{m}}\uBD84",{m:r}):Ss(Jt.t("customers.duration.sec",{s,defaultValue:"{{s}}\uCD08"}),"{{s}}\uCD08",{s})}function p_(e,n){const a=[],r=new Set;for(const s of e){const l=n(s);r.has(l)||(r.add(l),a.push({key:l,value:s,pinned:!1}))}return a}function h_(e,n){return e.map(a=>a.key===n?{...a,pinned:!a.pinned}:a)}function m_(e,n){return e.filter(a=>a.key!==n)}function f_(e,n,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 n){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 C_(e){return e.map(n=>n.value)}function g_(e){const{category:n={},isSelected:a=!1,onClick:r}=e||{},s=n?.key?` icon-grid-menu__button--${n.key}`:"",l=o.useId();return t.jsxs("div",{className:`icon-grid-menu__button-wrapper${s}`,children:[t.jsx("button",{className:`icon-grid-menu__button${a?" icon-grid-menu__button--selected":""}`,"data-key":n?.key,type:"button",onClick:a?void 0:r,"aria-pressed":a,"aria-labelledby":l,children:t.jsx(dt,{icon:n.icon,label:n.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"})}),t.jsx("span",{id:l,className:"icon-grid-menu__button-label button-1",children:n.label})]})}function b_(e){const{categories:n=[],selected:a,onSelect:r,size:s="medium"}=e||{},l=a!==void 0,[i,u]=o.useState(()=>l?null:(n&&n[0]?.key)??null),c=l?a:i,p=o.useRef(r);o.useEffect(()=>{p.current=r});const h=o.useRef(!1),d=(n&&n[0]?.key)??null;o.useEffect(()=>{if(l||h.current||!d)return;h.current=!0;const C=i??d;i==null&&u(C),p.current?.(C)},[l,d]);const f=o.useCallback(C=>{const x=c===C?null:C;h.current=!0,l||u(x),r?.(x)},[c,l,r]);return t.jsx("div",{className:`icon-grid-menu icon-grid-menu--${s}`,children:(n||[]).map(C=>t.jsx(g_,{category:C,isSelected:c===C.key,onClick:()=>f(C.key)},C.key))})}function y_({subs:e=[],selected:n,onSelect:a,size:r="medium"}){const s=r==="small"?32:40;return t.jsx("div",{className:`choice-chips choice-chips--${r}`,children:t.jsx("div",{className:"choice-chips__list",children:e.map(l=>t.jsx(be,{htmlType:"button",size:s,type:"bar",label:l.label,selected:n===l.key,className:"choice-chips__button",onClick:()=>a?.(l.key)},l.key))})})}function v_({onTermsClick:e,onPrivacyClick:n,contact:a}={}){const r=a?.email??"support@ihab.co.kr",s=a?.tel??"031-380-3724",{t:l}=Ee.useTranslation();return t.jsx("footer",{className:"site-footer",children:t.jsxs("div",{className:"safearea",children:[t.jsxs("div",{className:"site-footer__top",children:[t.jsx("div",{className:"site-footer__brand",children:t.jsx("div",{className:"site-footer__lead h3",children:l("footer.lead",`\uC544\uC774\uD574\uBE0C\uB294 \uC18C\uB9AC\uB97C \uD1B5\uD574
1047
1047
  \uC2E0\uB8B0\uB97C \uC313\uACE0
1048
1048
  \uD68C\uBCF5\uC744 \uB3D5\uC2B5\uB2C8\uB2E4.`).split(`
1049
- `).map((i,c,u)=>t.jsxs(o.Fragment,{children:[i,c<u.length-1&&t.jsx("br",{})]},c))})}),t.jsxs("div",{className:"site-footer__links",children:[t.jsxs("div",{className:"site-footer__column",children:[t.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.site.title","\uC0AC\uC774\uD2B8")}),t.jsxs("ul",{children:[t.jsx("li",{children:t.jsx("a",{className:"footer-link",href:"https://www.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:"IHAB"})}),t.jsx("li",{children:t.jsx("a",{className:"footer-link",href:"https://speechear.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.malgwi","\uB9D0\uADC0")})}),t.jsx("li",{children:t.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")})}),t.jsx("li",{children:t.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")})}),t.jsx("li",{children:t.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")})})]})]}),t.jsxs("div",{className:"site-footer__column",children:[t.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.sns.title","SNS")}),t.jsxs("ul",{children:[t.jsx("li",{children:t.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")})}),t.jsx("li",{children:t.jsx("a",{className:"footer-link",href:"https://www.instagram.com/ihab.official.yt/",target:"_blank",rel:"noopener noreferrer",children:"Instagram"})}),t.jsx("li",{children:t.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"})})]})]}),t.jsxs("div",{className:"site-footer__column",children:[t.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.policy.title","\uC815\uCC45")}),t.jsxs("ul",{children:[t.jsx("li",{children:t.jsx("a",{className:"footer-link",href:"#",onClick:i=>{e&&(i.preventDefault(),e())},children:l("footer.policy.terms","\uC774\uC6A9\uC57D\uAD00")})}),t.jsx("li",{children:t.jsx("a",{className:"footer-link",href:"#",onClick:i=>{n&&(i.preventDefault(),n())},children:l("footer.policy.privacy","\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68")})})]})]})]})]}),t.jsx("hr",{className:"site-footer__rule"}),t.jsxs("div",{className:"site-footer__bottom",children:[t.jsx("div",{className:"site-footer__brand",children:t.jsx("img",{src:Jo,alt:"IHAB",className:"site-footer__logo"})}),t.jsxs("div",{className:"site-footer__meta",children:[t.jsxs("div",{children:[t.jsx("span",{className:"footer-title",children:l("footer.ceo","\uB300\uD45C")})," ",t.jsx("span",{className:"footer-meta caption-1",children:l("footer.ceoName","\uD55C\uC9C0\uD61C")})]}),t.jsxs("div",{children:[t.jsx("span",{className:"footer-title",children:l("footer.address","\uC8FC\uC18C")})," ",t.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")})]}),t.jsxs("div",{children:[t.jsx("span",{className:"footer-title",children:l("footer.bizNo","\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638")})," ",t.jsx("span",{className:"footer-meta caption-1",children:l("footer.bizNoValue","526-81-02926")})]}),t.jsxs("div",{children:[t.jsx("span",{className:"footer-title",children:l("footer.support","\uACE0\uAC1D\uC13C\uD130")})," ",t.jsxs("span",{className:"footer-meta caption-1",children:[a," \xA0 ",s]})]})]})]}),t.jsx("div",{className:"site-footer__copyright footer-copyright caption-1",children:"\xA9 IHAB, Inc. All rights reserved."})]})})}function x_({logo:e,logoAlt:n="",logoHref:r,links:a=[],actions:s,className:l,containerClassName:i,renderLink:c,menuLabel:u}){const{t:p}=Ee.useTranslation(),h=u??{open:p("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:p("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[d,m]=o.useState(!1),C=o.useId(),x=o.useRef(null);o.useEffect(()=>{if(!d)return;const v=lr(()=>{const w=document.getElementById(C);w&&w.contains(document.activeElement)&&x.current?.focus(),m(!1)}),_=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,g=w=>{w.matches&&m(!1)};return _&&(_.matches&&m(!1),_.addEventListener?.("change",g)),()=>{v(),_?.removeEventListener?.("change",g)}},[d,C]);const y=i?`${i} landing-header__inner`:"landing-header__inner",b=(v,_)=>c?c(v,{onClick:_}):t.jsx("a",{href:v.href,onClick:_,"aria-current":v.current?"page":void 0,children:v.label});return t.jsxs("header",{className:l?`landing-header ${l}`:"landing-header",children:[t.jsxs("div",{className:y,children:[e!=null&&(()=>{const v=typeof e=="string"?t.jsx("img",{src:e,alt:n,className:"landing-header__logo"}):e;return r?t.jsx("a",{href:r,className:"landing-header__brand",children:v}):t.jsx("div",{className:"landing-header__brand",children:v})})(),a.length>0&&t.jsx("nav",{className:"landing-header__links",children:a.map((v,_)=>t.jsx("span",{children:b(v)},`${_}:${v.href}`))}),t.jsxs("div",{className:"landing-header__actions",children:[s,a.length>0&&t.jsx("button",{ref:x,type:"button",onClick:()=>m(v=>!v),"aria-expanded":d,"aria-controls":C,"aria-label":d?h.close:h.open,className:d?"landing-header__toggle landing-header__toggle--open":"landing-header__toggle",children:t.jsxs("span",{className:"landing-header__burger",children:[t.jsx("span",{}),t.jsx("span",{}),t.jsx("span",{})]})})]})]}),a.length>0&&t.jsx("nav",{id:C,hidden:!d,className:"landing-header__drawer",children:t.jsx("div",{className:i??void 0,children:a.map((v,_)=>t.jsx("span",{className:"landing-header__drawer-item",children:b(v,()=>m(!1))},`${_}:${v.href}`))})})]})}function __({children:e,action:n,onClick:r,className:a}){const s=r?"bottom-sticky__inner bottom-sticky__inner--clickable":"bottom-sticky__inner";return t.jsx("div",{className:a?`bottom-sticky ${a}`:"bottom-sticky",children:t.jsxs("div",{className:s,onClick:r,...wc(r),children:[t.jsx("div",{className:"bottom-sticky__content",children:e}),n]})})}function w_({mountedRef:e}){const n=o.useRef({phase:"sound",at:0}),r=o.useRef(0),a=o.useRef(null),s=o.useRef(null),l=o.useCallback(()=>{const y=n.current,b=y.phase!=="sound"&&y.at>0;s.current=b?{phase:y.phase,elapsed:Math.max(0,Date.now()-y.at)}:null},[]),i=o.useCallback(()=>{const y=s.current;return s.current=null,y},[]),c=o.useCallback(()=>{r.current+=1,n.current={phase:"sound",at:0}},[]),u=o.useCallback((y,b,v=0)=>{if(!(y>0))return Promise.resolve(!0);const _=r.current;return n.current={phase:b,at:Date.now()-Math.max(0,v)},new Promise(g=>{const w=setTimeout(()=>{a.current===w&&(a.current=null),g(!!e.current&&_===r.current)},y);a.current=w})},[e]),p=o.useCallback(()=>{n.current={phase:"sound",at:Date.now()}},[]),h=o.useCallback(()=>{n.current={phase:"sound",at:0}},[]),d=o.useCallback(()=>{const y=n.current;return y.phase!=="sound"&&y.at>0},[]),m=o.useCallback(()=>r.current,[]),C=o.useCallback(y=>y===r.current,[]),x=o.useCallback(()=>{r.current+=1},[]);return o.useEffect(()=>()=>{a.current&&(clearTimeout(a.current),a.current=null)},[]),o.useMemo(()=>({positionRef:n,isRunning:d,generation:m,isCurrent:C,abort:c,waitPad:u,enterSound:p,leave:h,pause:l,resume:i,__bumpGenerationForTest:x}),[d,m,C,c,u,p,h,l,i,x])}const Lr=9,B_=e=>Math.round(Math.min(Lr,Math.max(0,e))/Lr*100),k_=e=>e/100*Lr,fa=2,rd=.1,A_=e=>Math.min(fa,Math.max(0,e)),N_=.1,E_=e=>Math.round(e*1e6)/1e6;function Ca(e){const{noiseRatio:n}=e;if(typeof n=="number"&&Number.isFinite(n))return A_(n);const r=Math.min(Lr,Math.max(0,Number(e.level)||0))/Lr,a=Number(e.mainVolume);return a>0?r>0?E_(Math.min(fa,Math.max(N_,r/a))):0:1}const ad=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function od(e){return ad(e)}function Ts(e){return ad(e)*Ca(e)}function Ms(e,n=mC()){const r=Number.isFinite(n)&&n>0?n:1;return Math.min(1,Ts(e)/r)}function mr(e,n){const r={...e,...n??{}};return n&&"level"in n&&typeof n.noiseRatio!="number"&&(r.noiseRatio=Ca({level:r.level,mainVolume:r.mainVolume})),r}const fr={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},$s=o.createContext(null);function qa(){return o.useContext($s)}const Ls=e=>`${hC()}/${e}`,sd=e=>Array.from({length:10},(n,r)=>Ls(`${e}-${String(r+1).padStart(2,"0")}.mp3`)),Ua={get defaultNoise(){return Ls("noise1.mp3")},get street(){return sd("noise2")},get restaurant(){return sd("noise3")},get buzz(){return Ls("noise4.mp3")}};function j_(e){const n=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return Ua.defaultNoise;case"street":return Ua.street[n];case"restaurant":return Ua.restaurant[n];case"buzz":return Ua.buzz;default:return null}}function D_({noisePlayer:e,audioRef:n,playbackStateRef:r,sequencer:a}){const s=o.useRef(e?.registerAnalyser);s.current=e?.registerAnalyser;const l=o.useRef(null),[i,c]=o.useState(null),u=o.useRef(null),p=o.useRef(null),h=o.useRef(null),d=o.useRef(null),m=o.useRef(0),C=o.useRef(null),x=o.useCallback(()=>!!a?.isRunning(),[a]),y=o.useCallback(()=>{d.current!==null&&(cancelAnimationFrame(d.current),d.current=null),C.current!==null&&(clearTimeout(C.current),C.current=null)},[]),b=o.useCallback((N,f=250)=>{const A=l.current;if(!A)return;const B=p.current;if(B){p.current=null;try{A.pause()}catch{}A.src=B,A.load()}if(!A.src)return;m.current+=1,y();try{wo(),va(A).then(S=>{if(l.current===A)try{s.current?.("noise",S)}catch{}})}catch{}const E=A.paused?0:xa(A);A.paused&&Jn(A,0),A.play().catch(()=>{});const k=performance.now(),j=()=>{const S=Math.min(1,(performance.now()-k)/f);try{Jn(A,E+(N-E)*S)}catch{}S<1?d.current=requestAnimationFrame(j):d.current=null};d.current=requestAnimationFrame(j)},[y]),v=o.useCallback((N=250,f)=>{const A=l.current;if(!A||A.paused){f?.();return}const B=++m.current;y();const E=performance.now(),k=xa(A),j=()=>{const S=Math.min(1,(performance.now()-E)/N);try{Jn(A,k*(1-S))}catch{}if(S<1)d.current=requestAnimationFrame(j);else{d.current=null,C.current!==null&&(clearTimeout(C.current),C.current=null);try{A.pause()}catch{}f?.()}};d.current=requestAnimationFrame(j),C.current=setTimeout(()=>{if(C.current=null,m.current===B){d.current!==null&&(cancelAnimationFrame(d.current),d.current=null);try{A.paused||(Jn(A,0),A.pause(),f?.())}catch{}}},N+150)},[y]);o.useEffect(()=>{const N=document.createElement("audio");return N.loop=!0,N.crossOrigin="anonymous",l.current=N,()=>{y();try{N.pause(),N.removeAttribute("src"),N.load()}catch{}l.current=null,u.current=null,p.current=null}},[y]);const _=e?Ms(e.settings):0,g=!!e?.settings.enabled&&_>0;o.useEffect(()=>{if(!g)return;let N=0;const f=setInterval(()=>{const A=l.current;if(!A||A.paused){N=0;return}const B=n.current;if(B&&!B.paused&&!B.ended||x()||r.current==="playing"){N=0;return}N+=1,N>=2&&(N=0,v())},400);return()=>clearInterval(f)},[v,g,n,r,x]),o.useEffect(()=>{const N=()=>{const f=l.current;if(document.hidden){if(f&&!f.paused){y();try{f.pause()}catch{}}return}if(!f||!f.paused)return;const A=n.current,B=!!A&&!A.paused&&!A.ended||x()||r.current==="playing",E=h.current;B&&E?.enabled&&E.volume>0&&b(E.volume)};return document.addEventListener("visibilitychange",N),()=>document.removeEventListener("visibilitychange",N)},[y,b,n,r,x]),o.useEffect(()=>{h.current=e?{enabled:e.settings.enabled,volume:_,type:e.settings.type}:null},[e,e?.settings.enabled,_,e?.settings.type]);const w=o.useRef(null);return o.useEffect(()=>()=>{w.current?.(),w.current=null},[]),o.useEffect(()=>{const N=e?.settings,f=l.current;if(!f)return;const A=N?Ms(N):0;if(!N||!N.enabled||A===0){v();return}if(u.current!==N.type){const B=j_(N.type);B&&(u.current=N.type,c(B),p.current=B,v(150,()=>{if(p.current!==B)return;p.current=null,f.src=B,f.load();const E=n.current;if(E&&!E.paused||x()){w.current?.();const k=()=>{f.removeEventListener("canplay",k),w.current===j&&(w.current=null);const S=n.current,$=h.current;(S&&!S.paused&&!S.ended||x())&&$?.enabled&&$.volume>0&&b($.volume)},j=()=>f.removeEventListener("canplay",k);w.current=j,f.addEventListener("canplay",k)}}))}else{const B=n.current,E=!!B&&!B.paused&&!B.ended||x()||r.current==="playing";if(E&&p.current)b(A);else if(E&&f.paused&&f.src)b(A);else if(!f.paused)if(!E)v();else{y();const k=xa(f),j=performance.now(),S=()=>{const $=Math.min(1,(performance.now()-j)/150);try{Jn(f,k+(A-k)*$)}catch{}$<1?d.current=requestAnimationFrame(S):d.current=null};d.current=requestAnimationFrame(S)}}},[e?.settings,e?.settings.enabled,_,e?.settings.type,y,b,v,n,r,h,x]),o.useEffect(()=>{const N=l.current;if(N)try{N.playbackRate=Math.min(1.25,Math.max(.75,e?.settings.speed??1))}catch{}},[e?.settings.speed]),{noiseAudioRef:l,activeNoiseUrl:i,noiseSettingsRef:h,cancelNoiseFade:y,fadeInNoise:b,fadeOutNoise:v}}function S_({ttsText:e,playbackRate:n,mainVolume:r,fillRef:a,waveProgressRef:s,setProgress:l,setPlaybackState:i,setStateLocal:c,fadeInNoise:u,fadeOutNoise:p,noiseSettingsRef:h,onDoneRef:d,handleEndRef:m}){const C=o.useRef(null),x=o.useRef(0),y=o.useRef(null),b=o.useRef(0),v=o.useRef(!1);o.useEffect(()=>()=>{b.current++;try{if(y.current&&(cancelAnimationFrame(y.current),y.current=null),v.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}v.current=!1}}catch{}},[]);const _=(N,f=1)=>{try{const A=(N||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(N||"").length);return Math.max(700,Math.round(A*300/Math.max(.25,f)))}catch{return 1200}},g=o.useCallback(N=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof d.current=="function"&&d.current(!1)}catch{}return}const f=window.speechSynthesis,A=++b.current;try{try{f.cancel()}catch{}const B=N??e,E=Array.isArray(B)?B.filter(F=>!!F):[B||""];E.length===0&&E.push("");const k=Math.max(.3,Math.min(3,n));x.current=E.reduce((F,U)=>F+_(U,k||1),0),C.current=performance.now(),l(0),i("playing"),c("playMode");const j=h.current;j?.enabled&&(j?.volume??0)>0&&u(j.volume);const S=()=>{try{const F=C.current||performance.now(),U=performance.now()-F,T=x.current||1200,z=Math.min(1,U/T);try{a.current&&(a.current.style.left=`${z*100}%`),s.current&&s.current.style.setProperty("--progress",String(z))}catch{}z<1&&(y.current=requestAnimationFrame(S))}catch{}},$=()=>{if(A===b.current)try{y.current&&(cancelAnimationFrame(y.current),y.current=null),l(1),i("stopped");try{m.current?.()}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{}},V=F=>{const U=new SpeechSynthesisUtterance(E[F]);try{U.rate=k}catch{}try{U.volume=Math.max(0,Math.min(1,r))}catch{}U.onend=()=>{if(A===b.current){if(F<E.length-1){try{V(F+1)}catch{$()}return}$()}},U.onerror=()=>{$()},U.onstart=()=>{if(!(F>0))try{y.current&&(cancelAnimationFrame(y.current),y.current=null),y.current=requestAnimationFrame(S)}catch{}},v.current=!0,f.speak(U)};try{V(0)}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}},[e,n,r,u,a,s,l,i,c,h,d,m]),w=o.useCallback(()=>{b.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}y.current&&(cancelAnimationFrame(y.current),y.current=null),p(),C.current=null}catch{}i("stopped"),c("active"),l(0)},[p,i,c,l]);return{startTTS:g,stopTTS:w}}const T_=.01,M_=.3;async function $_(e,n,r,a=!1){let s=null;try{const l=window.AudioContext||window.webkitAudioContext;s=new l;const i=await s.decodeAudioData(e.slice(0)),c=i.numberOfChannels>0?i.getChannelData(0):null;if(!c)return null;let u=0;if(a){const C=Math.floor(M_*i.sampleRate),x=Math.min(c.length,C);for(;u<x&&Math.abs(c[u])<=T_;)u++;u>=x&&(u=0)}const p=c.length-u,h=r&&r>0?Math.min(p,Math.floor(r*i.sampleRate)):p,d=Math.max(n,h),m=Math.floor(d/n)||1;return new Array(n).fill(0).map((C,x)=>{const y=u+x*m,b=Math.min(y+m,u+d,c.length);let v=0;for(let _=y;_<b;_++){const g=Math.abs(c[_]);g>v&&(v=g)}return v})}catch{return null}finally{try{s?.close?.()}catch{}}}async function ld(e,n,r,a=!1){try{const s=await fetch(e);if(s.ok===!1)return null;const l=await s.arrayBuffer();return await $_(l,n,r,a)}catch(s){try{const l=oi(s)}catch{}return null}}const Rs=45,L_=74,R_=2;function Ga(e){const n=Math.min(2,Math.max(0,Number(e)||0));return n<=1?n*45:45+(n-1)*29}function Ka(e){return Ga(e)/45}const P_=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),id=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function ud({durationsSec:e,leadInMs:n=0,tailMs:r=0}){const a=id(n),s=id(r),l=[];let i=0;return e.forEach((c,u)=>{for(const[p,h]of[["lead",a],["sound",P_(c)],["tail",s]])l.push({kind:p,track:u,startMs:i,durMs:h}),i+=h}),{segments:l,totalMs:i,trackCount:e.length}}function cd(e,n){const r=(n|0)*3;if(n<0||r+2>=e.segments.length)return null;const[a,s,l]=[e.segments[r],e.segments[r+1],e.segments[r+2]];return{lead:a,sound:s,tail:l,totalMs:a.durMs+s.durMs+l.durMs}}function F_(e,n){const r=cd(e,n.track);if(!r||!(r.totalMs>0))return 0;const a=r[n.kind],s=Math.min(Math.max(0,Number.isFinite(n.elapsedMs)?n.elapsedMs:0),a.durMs);return Math.max(0,Math.min(1,(a.startMs-r.lead.startMs+s)/r.totalMs))}function I_(e,n,r){const a=Math.max(0,Math.floor(r)),s=cd(e,n);if(!s||a===0||!(s.totalMs>0)||s.lead.durMs===0&&s.tail.durMs===0||!(s.sound.durMs>0))return{lead:0,sound:a,tail:0};const l=Math.round(s.lead.durMs/s.totalMs*a),i=Math.round(s.tail.durMs/s.totalMs*a),c=Math.max(1,a-l-i),u=l+c+i-a;return{lead:Math.max(0,l-Math.ceil(u/2)),sound:c,tail:Math.max(0,i-Math.floor(u/2))}}function O_({currentTime:e,sources:n,index:r,audioDuration:a}){const s=r||0,l=Array.isArray(n)&&n.length>0?n[s]:void 0,i=l?l.duration||a||0:a||0;if(!(i>0))return 0;const c=Number.isFinite(e)?e:0;return Math.max(0,Math.min(1,c/i))}function z_({phase:e,phaseElapsedMs:n,currentTime:r,trackDurationSec:a,leadInMs:s,tailMs:l}){const i=ud({durationsSec:[a],leadInMs:s,tailMs:l});return F_(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(r)?r:0)*1e3:n})}function W_({bars:e,trackDurationSec:n,leadInMs:r,tailMs:a}){return I_(ud({durationsSec:[n],leadInMs:r,tailMs:a}),0,e)}function H_(e,n){if(!Array.isArray(e))return null;const r=n||0;return r<e.length-1?r+1:null}function V_({ended:e,completedByEnd:n}){return!!e||!!n}function q_(e){return e.map((n,r)=>({src:n.src,label:String(r+1),color:void 0,duration:n.duration||0}))}function U_(e){return e.reduce((n,r)=>n+(r.duration||0),0)}function G_(e,n,r){const a=Array.isArray(e)?e:e?[e]:[],s=[];for(const l of a)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),c=r(i,n);c&&s.push({code:i,resolvedPath:c})}}return s}function K_(e,n){if(!n||e.readyState<1)return!0;const r=e.currentSrc||e.src;return r?dd(r)!==dd(n):!0}function dd(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const pd=4,Y_=Ka(pd/Rs);function Z_(e){const{src:n,segments:r,progress:a=0,waveProgressRef:s,noiseSrc:l,noiseRatio:i=0,noiseSpeed:c=1,totalDuration:u=0,mainVolume:p=1,onReadyChange:h,showSoundWaveForm:d=!0,leadInMs:m=0,tailMs:C=0,trackDurationSec:x=0}=e,y=o.useRef(null),b=o.useRef(null),[v,_]=o.useState(null),[g,w]=o.useState(!1),[N,f]=o.useState(null),[A,B]=o.useState(2),[E,k]=o.useState(0),[j,S]=o.useState(null),[$,V]=o.useState(!1),[F,U]=o.useState(!1),T=3,z=3,W=1,ie=300,Q=o.useRef(0),L=o.useCallback(()=>{const he=y.current,re=b&&b.current?b.current:he?he.closest(".audio-player__wave"):null,_e=re?re.getBoundingClientRect():he?he.getBoundingClientRect():null,De=_e?_e.width:0,Se=_e?Math.max(100,_e.width):320,Ne=_e?_e.height:0,He=Math.max(W,Math.min(ie,Math.floor((Se+z)/(T+z)))),ve=He*T,xe=Math.max(0,He-1),we=Math.max(0,xe>0?(Se-ve)/xe:z);return{bars:He,gap:we,height:Ne,width:De}},[]),J=o.useRef(void 0),ee=o.useRef(null),q=o.useCallback(async(he,re,{quiet:_e=!1}={})=>{const De=++Q.current,Se=()=>Q.current===De;try{if(_e||w(!1),J.current=he,!he){Se()&&_(null);return}let Ne=re;if(!Ne)try{for(let xe=0;xe<4&&!(y.current||b.current);xe++)await new Promise(we=>requestAnimationFrame(we));await new Promise(xe=>requestAnimationFrame(xe));const ve=L();ve.height>0&&k(ve.height),Ne=ve.bars,B(ve.gap)}catch{Ne=120}ee.current=Ne;const He=await ld(he,Ne);if(!Se())return;if(!He){_(null),w(!1);return}_(He),f(Ne),w(!0)}catch{if(!Se())return;_(null),w(!1)}},[w,_,k,B,f,L]);o.useEffect(()=>{const he=b.current;if(!he||typeof ResizeObserver>"u")return;let re=null;const _e=new ResizeObserver(()=>{re!==null&&cancelAnimationFrame(re),re=requestAnimationFrame(()=>{re=null;try{const De=L();if(De.width<=0||(De.height>0&&k(De.height),ee.current===null||De.bars===ee.current))return;const Se=J.current;B(De.gap),Se?q(Se,De.bars,{quiet:!0}).catch(()=>{}):ee.current=De.bars}catch{}})});return _e.observe(he),()=>{_e.disconnect(),re!==null&&cancelAnimationFrame(re)}},[L,q]),o.useEffect(()=>{const he=r&&r[0]&&r[0].src||n||r&&r.length===1&&r[0]&&r[0].src;q(typeof he=="string"?he:void 0).catch(()=>{}),U(!1)},[n,r,q]),o.useEffect(()=>{let he=!1;if(V(!1),S(null),!l||!N)return;const re=u>0?u*(c||1):void 0;return ld(l,N,re,!0).then(_e=>{he||(S(_e),_e||V(!0))}).catch(()=>{he||(S(null),V(!0))}),()=>{he=!0}},[l,N,u,c]);const P=Math.max(0,Math.min(1,p)),R=o.useMemo(()=>v&&v.length&&Math.max(...v)||1,[v]),D=N||40,H=o.useMemo(()=>W_({bars:D,trackDurationSec:x,leadInMs:m,tailMs:C}),[D,x,m,C]),ne=o.useMemo(()=>Array.from({length:D}).map((he,re)=>{const _e=re>=H.lead&&re<H.lead+H.sound,De=H.sound>0&&_e?Math.min(D-1,Math.round((re-H.lead)/H.sound*D)):-1,Se=_e?v&&v[De]!=null?v[De]:null:v?0:null,Ne=Se==null?null:Math.min(1,Se/R*P),He=Ne!=null&&E>0&&Ga(Ne)<=pd,ve=Ne==null?.15:He?0:Ka(Ne),xe=He,we=D>1?re/(D-1):0;return t.jsx("div",{className:xe?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":ve,"--i":re,"--mix":we}},re)}),[D,v,R,P,E,H]),te={"--progress":String(Math.max(0,Math.min(1,a)))},ue=o.useMemo(()=>j&&j.length&&Math.max(...j.map(he=>Number.isFinite(he)?Math.abs(he):0))||1,[j]),se=P*Math.max(0,i),pe=!l||!j||!j.length?1:Math.max(1,se),G={"--bar-gap":`${A}px`,"--wave-h":`${Ga(pe)}px`,"--wave-h1":`${Rs}px`},K=g&&(l?!!j||$:!0);o.useEffect(()=>{K&&U(!0)},[K]);const O=F?g:K;o.useEffect(()=>{h?.(O)},[O,h]);const I=N||40,ae=o.useMemo(()=>Array.from({length:I}).map((he,re)=>{const _e=j&&j[re]!=null?j[re]:null,De=_e==null?0:Math.abs(_e)/ue*se,Se=Math.max(Y_,Ka(De)),Ne=I>1?re/(I-1):0;return t.jsx("div",{className:"audio-player__bar",style:{"--val":Se,"--i":re,"--mix":Ne}},re)}),[I,j,ue,se,E]);return t.jsxs("div",{className:"audio-player__wave",ref:b,style:G,children:[l&&t.jsx("div",{className:`audio-player__wave-noise ${K?"is-ready":""}`,"aria-hidden":"true",children:ae}),d&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${O?"is-ready":""}`,ref:y,children:ne}),t.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${O?"is-ready":""}`,ref:s,style:te,children:ne})]})]})}const hd={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function Ps(e,n){return new Promise((r,a)=>{const s=document.createElement("audio");let l=!1;const i=()=>{try{s.removeAttribute("src"),s.load()}catch{}},c=()=>{if(l)return;l=!0;const p=isFinite(s.duration)&&s.duration||0;i(),r(p)},u=p=>{l||(l=!0,i(),n.rejectOnError?a(new Error(p)):r(0))};s.addEventListener("loadedmetadata",c),s.addEventListener("error",()=>u("audio load failed")),setTimeout(()=>u("audio load timeout"),n.timeoutMs),s.src=e})}const X_=2e3;function md(e,n=X_){return new Promise(r=>{let a=!1;const s=()=>{a||(a=!0,r())};e.addEventListener("canplay",s,{once:!0}),e.addEventListener("error",s,{once:!0}),setTimeout(s,n)})}function J_({showSoundWaveForm:e,showNoiseWaveForm:n,timeoutMs:r=2500}){const a=o.useRef(!1),s=o.useRef([]),l=o.useCallback(u=>{if(a.current=u,!u||!s.current.length)return;const p=s.current;s.current=[];for(const h of p)h(!0)},[]),i=o.useCallback(()=>{a.current=!1},[]),c=o.useCallback(()=>!e&&!n||a.current?Promise.resolve(!0):new Promise(u=>{const p=d=>{clearTimeout(h),s.current=s.current.filter(m=>m!==p),u(d)},h=setTimeout(()=>p(!0),r);s.current.push(p)}),[e,n,r]);return o.useEffect(()=>()=>{const u=s.current;s.current=[];for(const p of u)p(!1)},[]),{onReadyChange:l,waitForReady:c,markNotReady:i}}function Q_(){const e=o.useRef([]),n=o.useCallback(s=>(e.current.push(s),s),[]),r=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})},[]),a=o.useCallback(()=>{r([])},[r]);return o.useEffect(()=>()=>{for(const s of e.current)try{URL.revokeObjectURL(s)}catch{}e.current=[]},[]),{track:n,keepOnly:r,revokeAll:a}}function ew({offsetY:e=8}={}){const n=o.useRef(null),[r,a]=o.useState(null),s=o.useCallback(()=>a(null),[]),l=o.useCallback(()=>{try{const i=n.current?.getBoundingClientRect();if(!i)return;a({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(r)return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[r,s]),{ref:n,rect:r,show:l,hide:s}}function tw(e){if(!e)return 0;const n=e.duration;if(Number.isFinite(n)&&n>0)return n;if(n===0)return 0;try{const r=e.seekable;if(r&&r.length>0){const a=r.end(r.length-1);if(Number.isFinite(a)&&a>0)return a}}catch{}return null}const nw=400,rw=2e3,fd=5;function aw({audioRef:e,fillRef:n,waveProgressRef:r,sourcesRef:a,currentIndexRef:s,sequencer:l,leadInMs:i=0,tailMs:c=0}){const u=o.useRef(null),p=o.useRef(0),h=o.useRef(null),d=o.useCallback(()=>{u.current!==null&&(cancelAnimationFrame(u.current),u.current=null)},[]),m=o.useCallback(()=>{if(u.current!==null)return;let x=0;const y=()=>{if(Yn){const b=typeof performance<"u"&&performance.now?performance.now():Date.now();if(x>0&&b-x>nw){const v=h.current===null||b-h.current>rw;if(h.current=b,v&&p.current<fd){p.current+=1;const _=p.current;let g=null;try{g=typeof document<"u"?document.visibilityState:null}catch{}jt(`progress-ticker-slow-frames#${_}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(b-x)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,g==="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.",_>=fd?`(${_}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${_}\uBC88\uC9F8)`)}}x=b}try{const b=e.current,v=Array.isArray(a.current)?a.current[s.current||0]:void 0,_=!!v&&Number.isFinite(v.duration)&&(v.duration??0)>0,g=_?0:tw(b),w=n.current,N=(i||0)>0||(c||0)>0,f=N&&(l?.positionRef.current?.phase??"sound")!=="sound";if(g===null&&!f)try{w&&w.style.visibility!=="hidden"&&(w.style.visibility="hidden")}catch{}else{const A=_?v.duration:g||0;Yn&&f&&!(A>0)&&jt("progress-ticker-pad-without-duration","[ihab-core] \uB738\uC774 \uB3C4\uB294\uB370 **\uC18C\uB9AC \uAE38\uC774\uB97C \uBAA8\uB985\uB2C8\uB2E4** \u2014 \uC7AC\uC0DD\uBC14\uAC00 \uB738\uB9CC\uC73C\uB85C \uC5B4\uB9BC\uC7A1\uC544 \uC6C0\uC9C1\uC785\uB2C8\uB2E4.","\uC18C\uB9AC \uAE38\uC774 \uC7AC\uAE30(measureAudioDuration)\uAC00 0 \uC744 \uC92C\uAC70\uB098 `<audio>` \uAC00 \uC544\uC9C1 \uC548 \uC2E4\uB838\uC2B5\uB2C8\uB2E4. \uAE38\uC774\uB97C \uC54C\uAC8C \uB418\uBA74 \uB9C8\uCEE4\uAC00 \uADF8 \uC21C\uAC04 **\uB4A4\uB85C \uBB3C\uB7EC\uB0A9\uB2C8\uB2E4**(\uC5B4\uB9BC\uC740 \uB298 \uCC38\uBCF4\uB2E4 \uD07D\uB2C8\uB2E4). \uC774 \uC904\uC774 \uBCF4\uC774\uBA74 \uADF8 \uC790\uB9AC\uB97C \uC54C\uB824 \uC8FC\uC2ED\uC2DC\uC624 \u2014 \uD3C9\uC18C \uAE38\uC5D0\uC11C\uB294 \uC548 \uB098\uC640\uC57C \uD569\uB2C8\uB2E4.");const B=N?z_({phase:l?.positionRef.current?.phase??"sound",phaseElapsedMs:l?.positionRef.current?Math.max(0,Date.now()-l.positionRef.current.at):0,currentTime:b&&typeof b.currentTime=="number"?b.currentTime:0,trackDurationSec:A,leadInMs:i||0,tailMs:c||0}):O_({currentTime:b&&typeof b.currentTime=="number"?b.currentTime:0,sources:a.current,index:s.current,audioDuration:g??0});try{w&&(w.style.visibility&&(w.style.visibility=""),w.style.left=`${B*100}%`)}catch{}try{r.current?.style.setProperty("--progress",String(B))}catch{}}}catch{}u.current=requestAnimationFrame(y)};u.current=requestAnimationFrame(y)},[e,n,r,a,s,l,i,c]),C=o.useCallback(x=>{d();try{n.current&&(n.current.style.visibility="",n.current.style.left=`${x*100}%`)}catch{}try{r.current?.style.setProperty("--progress",String(x))}catch{}},[d,n,r]);return o.useEffect(()=>d,[d]),{start:m,stop:d,settleTo:C}}function Fs({btnLabel:e,soundSrc:n,bucketPath:r,onDone:a,disabled:s=!1,ttsText:l=null,className:i,showSoundWaveForm:c=!0,showNoiseWaveForm:u=!0,leadInMs:p=0,tailMs:h=0}){const{t:d}=Ee.useTranslation(),m=e,C=qa(),x=o.useRef(C?.registerAnalyser);o.useEffect(()=>{x.current=C?.registerAnalyser});const y=o.useRef(null),b=o.useRef(null),v=o.useRef(null),_=Q_(),g=o.useRef(null),w=o.useRef(!1),N=o.useRef(null),{ref:f,rect:A,show:B,hide:E}=ew();o.useEffect(()=>()=>{x.current?.("main",null),x.current?.("noise",null)},[]);const[k,j]=o.useState(!1),[S,$]=o.useState("idle"),[V,F]=o.useState("stopped"),U=o.useRef("stopped");o.useEffect(()=>{U.current=V},[V]);const[T,z]=o.useState(0),[W,ie]=o.useState("active"),Q=o.useRef(!1);o.useEffect(()=>{if(W!=="playMode"||!Q.current)return;Q.current=!1;const Y=typeof document<"u"?document.activeElement:null;if(Y&&Y!==document.body)return;const de=v.current?.querySelectorAll("button")[1];try{de?.focus()}catch{}},[W]);const[L,J]=o.useState(null),[ee,q]=o.useState(null),[P,R]=o.useState(0),[D,H]=o.useState(!1),[ne,te]=o.useState(0),ue=C?.playbackRate??1,se=C?.mainVolume??1,pe=C?Ts(C.settings):0,G=C?od(C.settings):se,[K,O]=o.useState("idle"),[I,ae]=o.useState(""),[he]=o.useState("top"),re=o.useRef(null),_e=o.useRef(0),De=o.useRef(null),Se=o.useRef(!0),Ne=w_({mountedRef:Se}),He=o.useRef(null),ve=o.useRef(p),xe=o.useRef(h);o.useEffect(()=>{ve.current=Math.max(0,p||0)},[p]),o.useEffect(()=>{xe.current=Math.max(0,h||0)},[h]);const{start:we,stop:Ae,settleTo:Ie}=aw({audioRef:y,fillRef:b,waveProgressRef:De,sourcesRef:re,currentIndexRef:_e,sequencer:Ne,leadInMs:p,tailMs:h}),{onReadyChange:ot,waitForReady:pt,markNotReady:Oe}=J_({showSoundWaveForm:c,showNoiseWaveForm:u}),Ue=o.useRef(null),rt=o.useRef(s),ce=o.useRef(a),Pe=o.useRef(null),Ye=o.useRef(!1),[Qe,ut]=o.useState(!1),vt=o.useCallback(Y=>{Ye.current=Y,ut(Y)},[]),ct=o.useRef(null),{activeNoiseUrl:Gt,noiseSettingsRef:xt,fadeInNoise:lt,fadeOutNoise:st}=D_({noisePlayer:C,audioRef:y,playbackStateRef:U,sequencer:Ne}),{startTTS:Ot,stopTTS:Mt}=S_({ttsText:l,playbackRate:ue,mainVolume:G,fillRef:b,waveProgressRef:De,setProgress:z,setPlaybackState:F,setStateLocal:ie,fadeInNoise:lt,fadeOutNoise:st,noiseSettingsRef:xt,onDoneRef:ce,handleEndRef:ct});o.useEffect(()=>{It.current=Mt});const Nt=Y=>{if(typeof window>"u"||!window.speechSynthesis){try{ae(d("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}Ot(Y);return}fe("tts"),Ot(Y)},Ft=Array.isArray(n)?n.filter(Boolean):n?[n]:[],zt=(!Ft||Ft.length===0)&&!!l,_t=Array.isArray(L)&&L.length>0?L:Array.isArray(ee)&&ee.length>0?ee:null,gt=Math.max(Array.isArray(_t)?_t.length:0,Ft.length);o.useEffect(()=>(Se.current=!0,()=>{Se.current=!1}),[]);const Et=()=>{Ne.abort()},It=o.useRef(null),et=o.useRef(null),wt=o.useRef(null),tt=o.useRef(null);tt.current||(tt.current=()=>{wt.current=null;const Y=y.current;if(et.current==="audio"&&Y&&(!Y.paused||Ne.isRunning())){Et();try{Y.pause()}catch{}Se.current&&(F("paused"),Ae(),st())}else if(et.current==="tts")try{It.current?.()}catch{}});const fe=Y=>{et.current=Y,wt.current=oa(tt.current)},$e=()=>{wt.current?.(),wt.current=null};o.useEffect(()=>()=>{tt.current&&Ra(tt.current)},[]);const Re=o.useRef(ue);o.useEffect(()=>{Re.current=ue||1},[ue]);const ze=o.useCallback(Y=>{const de=Re.current||1;try{Y.defaultPlaybackRate=de}catch{}try{Y.playbackRate=de}catch{}},[]),it=o.useCallback((Y,de)=>{if(!K_(Y,de)){try{Y.currentTime=0}catch{}ze(Y);return}Y.src=de,ze(Y),Y.load(),ze(Y)},[ze]),on=o.useCallback(()=>{Pe.current&&(clearTimeout(Pe.current),Pe.current=null),O("idle")},[]),ht=o.useCallback(async(Y,de=3,Be=50,Me=0)=>{on();const Ve=Ne.generation(),Xe=!!Y&&Y.currentTime>0&&!Y.ended,bt=Math.max(0,ve.current-Math.max(0,Me));if(bt>0&&!Xe){fe("audio"),we(),F("playing");const ft=xt.current;if(ft?.enabled&&(ft.volume??0)>0)try{lt(ft.volume)}catch{}if(!await Ne.waitPad(bt,"lead",Me)||!Se.current||!Ne.isCurrent(Ve))return!1}Ne.enterSound();for(let ft=0;ft<de;ft++){if(!Se.current||!Ne.isCurrent(Ve))return!1;try{return fe("audio"),await Y.play(),!0}catch(be){if((be instanceof Error||typeof be=="object"&&be&&"name"in be?be.name:void 0)==="AbortError"){if(!Ne.isCurrent(Ve))return!1;await new Promise(M=>setTimeout(M,Be));continue}try{ae(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{ae(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[d,we,Ne,lt,xt,on]),Ke=o.useCallback(Y=>{const de=Ne.generation(),Be=Math.max(0,xe.current-Math.max(0,Y));we();const Me=xt.current;if(Me?.enabled&&(Me.volume??0)>0)try{lt(Me.volume)}catch{}const Ve=()=>{try{He.current?.()}catch{}};if(Be<=0){Ne.leave(),Ve();return}Ne.waitPad(Be,"tail",Y).then(Xe=>{Ne.leave(),Xe&&Ne.isCurrent(de)&&Ve()}).catch(()=>{})},[Ne,we,lt,xt]),Ct=o.useCallback(()=>{const Y=y.current;if(!Y)return;const de=()=>{F("playing"),ie("playMode"),H(!0),we();try{wo(),va(Y).then(Xe=>{if(Se.current)try{x.current?.("main",Xe)}catch{}})}catch{}const Ve=xt.current;Ve?.enabled&&(Ve?.volume??0)>0&&lt(Ve.volume)},Be=()=>{V_({ended:!!Y?.ended,completedByEnd:Ye.current})||(F("paused"),Ae(),st())},Me=()=>{const Ve=()=>{try{const Xe=re.current,bt=H_(Xe,_e.current);if(bt!==null){_e.current=bt,R(bt),H(!0);const ft=Xe?.[bt]&&Xe[bt].src;if(ft&&Y){it(Y,ft),ht(Y).catch(()=>{});return}}}catch{}F("stopped"),z(1);try{if(Y)try{Y.currentTime=0}catch{}}catch{}Ae(),H(!1),st();try{!rt.current&&ct.current&&ct.current()}catch{}};if(He.current=Ve,xe.current>0){we(),Ne.waitPad(xe.current,"tail").then(Xe=>{Ne.leave(),Xe&&Ve()}).catch(()=>{});return}Ve()};return Y.addEventListener("play",de),Y.addEventListener("pause",Be),Y.addEventListener("ended",Me),()=>{try{Y.removeEventListener("play",de),Y.removeEventListener("pause",Be),Y.removeEventListener("ended",Me),Ae()}catch{}}},[lt,st,ht,xt,we,Ae,Ne]);o.useEffect(()=>Ct(),[Ct]),o.useEffect(()=>{rt.current=s},[s]),o.useEffect(()=>{ce.current=a},[a]),o.useEffect(()=>{if(s||W!=="active")return;const Y=N.current;if(!Y)return;let de=null;const Be=requestAnimationFrame(()=>{try{const Me=Y.getTotalLength();if(!Me)return;const Ve=Me*.2;Y.style.strokeDasharray=`${Me-Ve} ${Ve}`;const Xe="triFlow_"+Math.random().toString(36).slice(2);de=document.createElement("style"),de.textContent=`@keyframes ${Xe}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${Me}}}`,document.head.appendChild(de),Y.style.animation=`${Xe} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(Be),de?.remove()}},[W,s]),o.useEffect(()=>{re.current=L},[L]),o.useEffect(()=>{_e.current=P},[P]),o.useEffect(()=>{const Y=v.current,de=g.current;if(!Y||!de)return;let Be=null;const Me=32,Ve=60,Xe=()=>{try{const ft=Array.from(Y.querySelectorAll(":scope > .button"));let be=0;ft.forEach(qe=>{if(qe===de)return;const nt=qe.getBoundingClientRect();be+=nt.width});const M=Y.getBoundingClientRect().width,Z=Math.max(0,Math.floor(M-be-8)),ge=gt;if(!ge||Z<=0){Array.from(de.children).forEach(qe=>{try{qe.style.width=""}catch{}});return}let Le=Math.floor(Z/ge);Le>Ve&&(Le=Ve),Le<Me&&(Le=Math.max(Me,Math.floor(Z/ge))),Array.from(de.querySelectorAll(".button")).forEach(qe=>{try{qe.style.width=`${Le}px`}catch{}})}catch{}},bt=requestAnimationFrame(Xe);try{Be=new ResizeObserver(()=>{requestAnimationFrame(Xe)}),Be.observe(Y),Be.observe(de),window.addEventListener("resize",Xe)}catch{}return()=>{try{cancelAnimationFrame(bt)}catch{}try{Be&&(Be.disconnect(),Be=null)}catch{}try{window.removeEventListener("resize",Xe)}catch{}}},[L,ee,gt]),o.useEffect(()=>()=>{try{Ue.current&&(clearTimeout(Ue.current),Ue.current=null),Pe.current&&(clearTimeout(Pe.current),Pe.current=null)}catch{}},[]);const Bt=(Y,de)=>{J(Y),te(de),Oe(),q(q_(Y)),re.current=Y},X=()=>{ie("playMode"),R(0),H(!0)},Ce=async(Y,de)=>{vt(!1),w.current=!1,it(Y,de),await md(Y),await pt()!==!1&&(j(!1),X(),await ht(Y))},Ge=async(Y,de=!1)=>{const Be=y.current;j(!0),$("measuring_duration");try{const Me=await Ps(Y,{timeoutMs:1e4,rejectOnError:!0});Bt([{src:Y,objectUrl:null,duration:Me}],Me),$("ready"),de&&Be&&await Ce(Be,Y)}finally{w.current=!1,j(!1)}},Ze=async(Y,de=!1)=>{const Be=y.current;j(!0),$("measuring_duration");try{const Me=await Promise.all(Y.map(Xe=>Ps(Xe,{timeoutMs:1e4})));if(!Se.current)return;const Ve=Y.map((Xe,bt)=>({src:Xe,objectUrl:null,duration:Me[bt]||0}));Bt(Ve,U_(Ve)),$("ready"),de&&Be&&Ve.length>0&&await Ce(Be,Ve[0].src)}finally{w.current=!1,j(!1)}},at=async(Y=!1,de=!0)=>{const Be=y.current,Me=n?Array.isArray(n)?n:[n]:[];if(!Me||Me.length===0||!Me.some(Boolean))return!1;if(w.current)return null;w.current=!0,de&&j(!0),$("resolving");try{const Ve=G_(n,r,Hl),Xe=[];let bt=0;for(const ft of Ve){let be=ft.src??null,M=null;if(!be&&ft.resolvedPath){try{$("getting_signed_url"),be=await Vl(ft.resolvedPath)}catch{be=null}if(!Se.current)return!1;if(!be)try{$("downloading");const ge=await ql(ft.resolvedPath);if(!Se.current)return!1;if(ge){const Le=ge instanceof Blob?ge:new Blob([ge]);M=_.track(URL.createObjectURL(Le)),be=M}}catch{$("error");try{ae(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),ie("active")}catch{}}}if(!be)continue;let Z=0;try{$("measuring_duration"),Z=await Ps(be,{timeoutMs:3e3})}catch{Z=0}if(!Se.current){if(M)try{URL.revokeObjectURL(M)}catch{}for(const ge of Xe)if(ge.objectUrl)try{URL.revokeObjectURL(ge.objectUrl)}catch{}return!1}bt+=Z||0,Xe.push({...ft,src:be,objectUrl:M,duration:Z})}if(Bt(Xe,bt),Xe.length>0&&Y&&Be){const ft=Xe[0];vt(!1);try{_.keepOnly(Xe.map(be=>be.objectUrl))}catch{}if($("ready"),w.current=!1,ft.src&&Be)try{if(it(Be,ft.src),await md(Be),await pt()===!1)return!1;de&&j(!1),X(),Be&&await ht(Be)}catch{de&&j(!1)}else de&&j(!1);ie("playMode"),R(0),H(!0)}return Xe.length>0}finally{w.current=!1,de&&j(!1),$(Ve=>Ve==="ready"?"ready":"idle")}},mt=async Y=>{const de=Ne.isRunning();if(Y.paused&&!de){if(Ye.current){await Lt();return}const Be=Ne.resume();if(Be){if(F("playing"),Be.phase==="tail"){Ke(Be.elapsed);return}await ht(Y,3,50,Be.elapsed);return}await ht(Y),F("playing")}else Ne.pause(),Et(),Y.pause(),F("paused"),de&&(Ae(),st())},Dt=async()=>{const Y=y.current;if(!(!Y&&!zt)){if(zt){const de=window.speechSynthesis;if(W==="active"){const Be=Hr(),Me=Array.isArray(l)?l.filter(Boolean):l?[l]:[];if(Be&&Me.length>0){if(w.current)return;ie("load"),j(!0),$("synthesizing"),w.current=!0;try{const Ve=await Promise.all(Me.map(Xe=>Promise.resolve(Be(Xe))));Ve.length>1?await Ze(Ve,!0):await Ge(Ve[0],!0)}catch{w.current=!1,j(!1),ie("active"),Nt(Me.length>0?Me:void 0)}return}Nt(Me.length>0?Me:void 0);return}if(W==="playMode"){const Be=!!de&&(de.speaking||de.paused)&&!(Y&&(Y.currentSrc||Y.getAttribute("src")));if(Y&&!Be){await mt(Y);return}try{if(de&&de.paused)try{fe("tts"),de.resume(),F("playing")}catch{}else try{de.pause(),F("paused")}catch{}}catch{}}return}if(W==="active"){if(s&&Array.isArray(re.current)&&re.current.length>0){const Be=re.current[0];try{if(Be.src&&Y)try{it(Y,Be.src),X(),Y&&await ht(Y)}catch{}X();return}catch{}}ie("load");let de;try{de=await at(!0)}catch{de=!1}if(de===!1&&Se.current){try{ae(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}ie("active")}return}if(W!=="load"&&(W==="playMode"||W==="active"))try{Y&&await mt(Y)}catch(de){(de instanceof Error||typeof de=="object"&&de&&"name"in de)&&de.name}}},Lt=async()=>{const Y=y.current;if(Y)try{const de=re.current;if(Array.isArray(de)&&de.length>1){await Cn(0);return}vt(!1);try{Y.currentTime=0}catch{}Y&&await ht(Y),F("playing"),ie("playMode")}catch{}},Dn=()=>{Et(),$e(),It.current?.();const Y=y.current;try{if(Y){try{Y.pause()}catch{}try{Y.currentTime=0}catch{}}}catch{}st(),F("stopped"),ie("active"),z(0),H(!1)},Zt=async(Y,{sameSegment:de=!1}={})=>{Et();const Be=Ne.generation(),Me=y.current,Ve=re.current?.[Y]?.src;try{if(vt(!1),R(Y),H(!0),_e.current=Y,!Ve||!Me||(de||Oe(),it(Me,Ve),!de&&await pt()===!1)||!Ne.isCurrent(Be)||(await ht(Me),!Ne.isCurrent(Be)))return;F("playing"),ie("playMode")}catch{}},Sn=async()=>{const Y=re.current,de=_e.current||0;if(!Y||de<=0){await Lt();return}await Zt(de-1)},cn=async()=>{const Y=re.current,de=_e.current||0;if(!Y||de>=Y.length-1){Dn();return}await Zt(de+1)},Xt=()=>{if(Ye.current)return;const Y=200,de=340;vt(!0),Et(),$e();try{z(1)}catch{}Ie(1);try{O("hold")}catch{}try{const Be=y.current,Me=zt&&!!Be?.src;if(!zt||Me){if(Be){Be.pause();try{Be.currentTime=0}catch{}}}else Mt();st()}catch{}try{F("stopped")}catch{}if(H(!1),!rt.current)try{Pe.current&&(clearTimeout(Pe.current),Pe.current=null),Pe.current=setTimeout(()=>{try{O("out")}catch{}Pe.current=setTimeout(()=>{try{typeof ce.current=="function"&&ce.current(!0)}catch{}try{O("idle")}catch{}Pe.current=null},de)},Y)}catch{}};o.useEffect(()=>{ct.current=Xt});const en=o.useCallback(()=>ae(""),[]),Cn=async Y=>{(re.current||[])[Y]&&await Zt(Y,{sameSegment:Y===_e.current})},tn=V==="playing",$t=o.useMemo(()=>{if(!ee||ee.length<=1)return ee;const Y=ee[P];return Y?[Y]:ee},[ee,P]),kt=s===!0;o.useEffect(()=>{try{const Y=y.current;Y&&typeof Y.playbackRate=="number"&&ze(Y)}catch{}},[ue,ze]);const qt=o.useRef({raf:null,timer:null});o.useEffect(()=>{const Y=y.current;if(!Y)return;const de=Math.max(0,Math.min(1,G)),Be=qt.current,Me=()=>{Be.raf!==null&&(cancelAnimationFrame(Be.raf),Be.raf=null),Be.timer!==null&&(clearTimeout(Be.timer),Be.timer=null)};Me();const Ve=xa(Y);if(Y.paused||Math.abs(Ve-de)<.001||typeof requestAnimationFrame!="function"){try{Jn(Y,de)}catch{}return}const Xe=performance.now(),bt=()=>{const ft=Math.min(1,(performance.now()-Xe)/150);try{Jn(Y,Ve+(de-Ve)*ft)}catch{}Be.raf=ft<1?requestAnimationFrame(bt):null};return Be.raf=requestAnimationFrame(bt),Be.timer=setTimeout(()=>{Me();try{Jn(Y,de)}catch{}},200),Me},[G]);const Rt=K==="hold",Tn=K==="out",Mn=W==="playMode"&&!k&&!Qe||Rt||Tn,Fn=V!=="stopped"||Rt||Tn,me=V==="paused",je=Math.max(0,Math.min(100,(T||0)*100)),We=ke("audio-player__fill",Mn?"is-visible":"",Fn?"is-expanded":"",me?"is-paused":"",Tn?"is-out":"");return t.jsxs("div",{className:`audio-player ${kt?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof m=="string"?m:void 0,children:[t.jsxs("div",{className:`audio-player__panel ${tn?"is-playing":""} ${k?"is-loading":""} ${W!=="default"?"is-revealed":""}`,children:[k?t.jsxs("div",{className:"audio-player__loading",role:hd[S]?"status":void 0,"aria-live":hd[S]?"polite":"off",children:[t.jsx("span",{className:"audio-player__loading-spinner","aria-hidden":"true"}),t.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,W==="active"?t.jsx("button",{className:"audio-player__button",type:"button",disabled:kt,onClick:()=>{Q.current=Oa(),E(),Dt()},"aria-label":typeof m=="string"?m:d("training.listen","\uB4E3\uAE30"),onMouseEnter:B,onMouseLeave:E,onFocus:B,onBlur:E,children:t.jsx("span",{ref:f,className:"audio-player__button-triangle-wrap",children:t.jsx("svg",{className:"audio-player__button-triangle",viewBox:"0 0 24 24","aria-hidden":"true",children:t.jsx("path",{ref:N,d:"M13.2 7.7 L16.5 9.85 Q20.2 12 16.5 14.15 L10 18.3 Q7 19.7 7 16.3 L7 7.7 Q7 4.3 10 5.7 L13.2 7.7"})})})}):null,A&&t.jsx(zn,{anchorRect:A,text:typeof m=="string"&&m?m:d("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),t.jsxs("div",{className:`audio-player__play ${W==="playMode"||tn?"is-visible":""}`,inert:!(W==="playMode"||tn)||void 0,children:[t.jsxs("div",{ref:v,className:"audio-player__buttons",children:[t.jsx(ye,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:Sn,ariaLabel:d("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:W!=="playMode"}),t.jsx(ye,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:tn?"pause":"play",onClick:Dt,ariaLabel:d("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":tn,width:"60px",variant:"transparent-white",disabled:W!=="playMode"}),t.jsx(ye,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:Dn,ariaLabel:d("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:W!=="playMode"}),gt>1?t.jsx("div",{ref:g,className:"audio-player__source-buttons",children:Array.from({length:gt}).map((Y,de)=>t.jsx(ye,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(de+1),onClick:()=>{try{Cn(de)}catch{}},ariaLabel:d("training.sourcePlay",{n:de+1}),variant:"transparent-white",selected:D&&P===de,disabled:W!=="playMode"||!(Array.isArray(L)&&L[de]),showTooltipInfo:!0},de))}):null,!Array.isArray(L)||L.length<=1?t.jsx(ye,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:Lt,ariaLabel:d("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:W!=="playMode"}):null,t.jsx(ye,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:cn,ariaLabel:d("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:W!=="playMode"}),t.jsx(ye,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:Xt,ariaLabel:d("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:W!=="playMode"})]}),t.jsxs("div",{className:"audio-player__slider",children:[t.jsx("div",{className:We,ref:b,style:{left:`${je}%`},"aria-hidden":"true"}),(c||u)&&t.jsx(Z_,{segments:$t,progress:T,totalDuration:ne,waveProgressRef:De,showSoundWaveForm:c,leadInMs:p,tailMs:h,trackDurationSec:L?.[P]?.duration??0,noiseSrc:u&&C?.settings.enabled&&pe>0?Gt:null,noiseRatio:C?Ca(C.settings):0,noiseSpeed:C?.settings.speed??1,mainVolume:se,onReadyChange:ot})]})]}),t.jsx("audio",{ref:y,crossOrigin:"anonymous",preload:"auto"})]}),!c&&t.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[t.jsx(dt,{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.")]}),t.jsx(Sr,{message:I,position:he,onClose:en})]})}function Ya(e){const{t:n}=Ee.useTranslation(),{text:r,label:a,anchorRect:s=null,onClose:l,closeOnOutsideClick:i=!0,isMobilePopup:c=!1}=e||{},[u,p]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||"light"}catch{return"light"}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",u)}catch{}},[u]);const{increase:h,decrease:d,canIncrease:m,canDecrease:C,fontSize:x,lineHeight:y}=au({storageKey:"tooltip-fontScale"}),b=o.useCallback(()=>p(N=>N==="dark"?"light":"dark"),[]),v=o.useCallback(N=>{try{N.stopPropagation()}catch{}try{typeof l=="function"&&l()}catch{}},[l]),_=Array.isArray(r)?r:typeof r>"u"||r===null?[]:[r],g={fontSize:`${x}px`,lineHeight:`${y}px`,"--tt-line-height":`${y}px`,"--tt-marker-size":"28px"},w=t.jsxs("div",{className:le(`text-box-tooltip__root ${u==="dark"?"is-dark":""}`),children:[t.jsxs("div",{className:le("text-box-tooltip__box"),children:[a&&t.jsx("div",{className:le("text-box-tooltip__label body-2b"),children:a}),t.jsx("div",{className:le("text-box-tooltip__text body-1"),style:g,children:_.map((N,f)=>t.jsxs("div",{className:le("text-box-tooltip__line"),children:[_.length>1?t.jsx("div",{className:le("text-box-tooltip__marker"),children:t.jsx("span",{className:le("text-box-tooltip__line-number button-1"),children:f+1})}):null,t.jsx("span",{className:le("text-box-tooltip__line-text"),children:N})]},f))})]}),t.jsxs("div",{className:le("text-box-tooltip__buttons"),children:[t.jsx(ye,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"minus",onClick:d,ariaLabel:n("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),variant:u==="dark"?"transparent-white":"transparent-gray",disabled:!C}),t.jsx(ye,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"plus",onClick:h,ariaLabel:n("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),variant:u==="dark"?"transparent-white":"transparent-gray",disabled:!m}),t.jsx(ye,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:u==="dark"?"moon":"sun-medium",onClick:b,ariaLabel:n("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:u==="dark"?"transparent-white":"transparent-gray"}),t.jsx(ye,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"x",onClick:v,ariaLabel:n("common.close","\uB2EB\uAE30"),variant:u==="dark"?"transparent-white":"transparent-gray"})]})]});return s?t.jsx(En,{anchorRect:s,className:le(`text-box-tooltip ${u==="dark"?"is-dark":""}`),onClose:l,closeOnOutsideClick:i,isMobilePopup:c,ariaLabel:a||n("tooltip.textbox","\uBCF8\uBB38"),children:w}):t.jsx("div",{className:le(`text-box-tooltip ${u==="dark"?"is-dark":""}`),children:w})}function Cd({state:e="disabled"}){const{t:n}=Ee.useTranslation();return t.jsxs("div",{className:`ts-bullet ts-bullet--${e}`,"aria-hidden":!0,children:[t.jsx("div",{className:"bullet__dot",children:t.jsx(dt,{icon:"chevron-right",label:n("training.next","\uB2E4\uC74C"),className:"bullet__icon",imgClassName:"bullet__icon-img",maskClassName:"bullet__icon-mask",svgClassName:"bullet__icon-svg",wrapperStyle:{},size:20})}),t.jsx("div",{className:"ts-bullet__line"})]})}function gd(e,n,r){const a=o.useRef(n),s=o.useRef(r);o.useEffect(()=>{a.current=n,s.current=r}),o.useEffect(()=>{if(!e||typeof document>"u")return;let l=null,i=10;const c=()=>{l=null;const u=a.current(),p=u?Array.from(u.querySelectorAll($n)).find(h=>!h.closest('[aria-hidden="true"]')):void 0;if(p){try{p.focus()}catch{}if(document.activeElement===p)return}--i>0&&(l=requestAnimationFrame(c))};return l=requestAnimationFrame(c),()=>{l!==null&&cancelAnimationFrame(l);const u=document.activeElement;if(!u||u===document.body||!document.contains(u)||u.closest(".tooltip__content")){const p=s.current();if(p)try{p.focus()}catch{}}}},[e])}function bd({title:e,children:n,className:r="",state:a="disabled",usePreviewTextBtn:s=!1,onPreviewTextBtn:l,previewText:i=null,useFaded:c,usePlayAllBtn:u=!1,onPlayAll:p,playAllActive:h=!1}){const{t:d}=Ee.useTranslation(),m=wn("(max-width: 767px)"),C=`training-step__title h4 ${c&&a==="disabled"?"training-step__title--faded":""} ${r}`.trim(),x=`training-step__title-row training-step__title-row--${a}`.trim(),y=o.useRef(null),[b,v]=o.useState(!1),[_,g]=o.useState(null),[w,N]=o.useState(null);gd(b&&!!_,()=>{if(typeof document>"u")return null;const k=Array.from(document.querySelectorAll(".tooltip__content"));for(let j=k.length-1;j>=0;j--)if(k[j].querySelector(".text-box-tooltip__root"))return k[j];return null},()=>y.current?.querySelector("button")??null);const f=o.useRef(l);o.useEffect(()=>{f.current=l});const A=o.useMemo(()=>i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)&&i.every(k=>typeof k=="string"||typeof k=="number")?i.join(""):"",[i]),B=o.useCallback(()=>{v(!1),g(null),N(null)},[]);o.useEffect(()=>{if(!b)return;let k;try{typeof f.current=="function"&&(k=f.current())}catch{}if(k===!1){B();return}N(typeof k<"u"&&k!==null?k:null)},[A]);const E=o.useCallback(()=>{let k;try{typeof l=="function"&&(k=l())}catch{}if(k!==!1){if(N(typeof k<"u"&&k!==null?k:i),!y.current){v(j=>!j);return}if(b)v(!1),g(null),N(null);else{const j=y.current.getBoundingClientRect();g(j),v(!0)}}},[l,i,b]);return t.jsxs("div",{className:x,children:[t.jsx("p",{className:C,children:t.jsx("span",{className:"training-step__title-text",children:e??n})}),s||u?t.jsxs("div",{className:"title-controls",children:[t.jsxs("div",{className:"title-buttons",children:[u&&t.jsx(ye,{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:a==="disabled"?"disabled":"default",disabled:a==="disabled"||h,onDisabledClick:h&&a!=="disabled"?()=>{}:void 0}),s&&t.jsx("div",{ref:y,children:t.jsx(ye,{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:E,className:b?"is-selected":void 0,"aria-expanded":b,"aria-haspopup":"dialog",variant:a==="disabled"?"disabled":"default",disabled:!i&&typeof l!="function"})})]}),b&&t.jsx(Ya,{text:w??i,label:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:_,onClose:B,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function Is(e,n){return typeof n!="number"||typeof e!="number"?"disabled":e<n?"done":e===n?"active":"disabled"}function Cr({index:e,stepIndex:n,isLast:r=!1,title:a="",titleProps:s={},children:l,className:i="",onDone:c=void 0,useTitleFaded:u=void 0,lockedHint:p}){const{t:h}=Ee.useTranslation(),[d,m]=o.useState(()=>Is(e,n));o.useEffect(()=>{const f=Is(e,n);if(f!==d){const A=setTimeout(()=>m(f),0);return()=>clearTimeout(A)}},[e,n,d]);const C=o.useCallback((...f)=>{Is(e,n)==="done"||d==="done"||typeof c=="function"&&c(...f)},[e,n,d,c]),[x,y]=o.useState(!1),[b,v]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),_=o.useCallback(f=>{if(!f)return null;try{const A=f;if(typeof f=="object"&&(A.currentTarget||A.target)&&(A.nativeEvent||A.type)){const k=A.currentTarget??A.target;if(k&&typeof k.getBoundingClientRect=="function")return k.getBoundingClientRect()}if(f instanceof DOMRect)return f;const B=f;if(B&&typeof B.getBoundingClientRect=="function")return B.getBoundingClientRect();const E=f?.current;return E&&typeof E.getBoundingClientRect=="function"?E.getBoundingClientRect():null}catch{return null}},[]),g=o.useCallback((f,{text:A="",label:B="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:E=!1,alignX:k="center",alignY:j="top"}={})=>{const S=_(f);v({text:A,label:B,anchorRect:S,backdrop:E,alignX:k,alignY:j}),y(!0)},[_]),w=o.useCallback(()=>{y(!1),v(f=>({...f,anchorRect:null}))},[]),N=o.Children.map(l,f=>{if(o.isValidElement(f)){const A=f;if(typeof A.type=="string")return A;const B=A.props??{},E=typeof B.onDone=="function"?B.onDone:C,k=typeof B.disabled=="boolean";let j=d==="disabled";return k&&(j=!!B.disabled),o.cloneElement(A,{onDone:E,disabled:j,showTooltip:g,hideTooltip:w})}return f});return t.jsxs("div",{className:`training-step training-step--${d} ${r?"training-step--last":""} ${i}`,"aria-current":d==="active",children:[t.jsx(Cd,{state:d}),t.jsxs("div",{className:"training-step__content",children:[t.jsx(bd,{state:d,title:a,...s,useFaded:u}),d==="disabled"&&p&&typeof e=="number"&&typeof n=="number"&&e===n+1&&t.jsx("p",{className:"training-step__locked-hint caption-1",role:"status",children:p}),N]}),x?t.jsx(En,{anchorRect:b.anchorRect,backdrop:b.backdrop,onClose:w,ariaLabel:h("tooltip.textbox","\uBCF8\uBB38"),children:t.jsx(Ya,{text:b.text,onClose:w})}):null]})}function yd({context:e,state:n="disabled",theme:r="light"}){const{t:a}=Ee.useTranslation(),[s,l]=o.useState("disabled"),[i,c]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||r}catch{return r}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",i)}catch{}},[i]);const u=()=>c($=>$==="dark"?"light":"dark"),{increase:p,decrease:h,canIncrease:d,canDecrease:m,fontSize:C,lineHeight:x}=au({storageKey:"textbox_fontScale"}),[y,b]=o.useState(""),v=o.useRef(null),_=o.useRef(!1),g=o.useCallback(()=>{_.current=Oa()&&!!v.current&&v.current.contains(document.activeElement),l("active")},[]),w=o.useCallback(()=>b(""),[]),N=$=>{try{b($)}catch{}},f=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(n!=="disabled"){const $=setTimeout(()=>l(n),0);return()=>clearTimeout($)}},[n]);const A=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[B,E]=o.useState(A);B!==A&&(E(A),l("disabled"));const k=n==="disabled"?s:n,j=k==="disabled"?"training-text-box--disabled":k==="active"?"training-text-box--active":k==="done"?"training-text-box--done":"",S=o.useMemo(()=>({fontSize:`${C}px`,lineHeight:`${x}px`}),[C,x]);return o.useEffect(()=>{if(k==="disabled"||!_.current)return;_.current=!1;const $=document.activeElement;$&&$!==document.body||v.current?.querySelector(".training-text-box__buttons button")?.focus()},[k]),t.jsxs("div",{ref:v,className:`training-text-box ${j} ${k!=="disabled"&&i==="dark"?"is-dark":""}`,children:[k==="disabled"&&t.jsx("div",{className:"training-text-box__preview",children:t.jsx(ye,{htmlType:"button",size:48,type:"bar",onClick:g,icon:"eye",ariaLabel:a("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),label:a("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),useBorder:!1})}),t.jsx("div",{className:"training-text-box__area","aria-hidden":k==="disabled",children:t.jsx("span",{className:"training-text-box__inner h3",style:S,children:A})}),k!=="disabled"&&t.jsxs("div",{className:"training-text-box__buttons","aria-hidden":k==="disabled",children:[t.jsx(ye,{htmlType:"button",size:32,type:"dot",onClick:h,onDisabledClick:()=>N(a("training.fontSizeMin","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.")),ariaLabel:a("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),icon:"minus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!m,useBorder:!1,showTooltipInfo:!0,...!f&&{width:"60px"}}),t.jsx(ye,{htmlType:"button",size:32,type:"dot",onClick:p,onDisabledClick:()=>N(a("training.fontSizeMax","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.")),ariaLabel:a("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),icon:"plus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!d,useBorder:!1,showTooltipInfo:!0,...!f&&{width:"60px"}}),t.jsx(ye,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:i==="dark"?"moon":"sun-medium",onClick:u,ariaLabel:a("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:i==="dark"?"transparent-white":"transparent-gray"})]}),t.jsx(Sr,{message:y,position:"top",onClose:w})]})}function gr(e){return e==="active"||e==="done"}function Os({index:e,stepIndex:n,isLast:r=!1,lockedHint:a,title:s,useTitleFaded:l,onDone:i,onChange:c,answer:u,wrongAnswers:p,choices:h,multiSelect:d=!1,correctCount:m=0,useDisabledCovered:C=!1,choiceIcons:x,shuffleChoices:y=!0}){const{t:b}=Ee.useTranslation(),v=s??b("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),_=typeof e=="number"?e:-1,g=typeof n!="number"?"disabled":_<n?"done":_===n?"active":"disabled",w=Array.isArray(h)&&h.length?h:typeof u<"u"?[u].concat(Array.isArray(p)?p:[]):void 0,N=p?p.join("||"):"",f=h?h.join("||"):"",[A,B]=o.useState(()=>Array.isArray(w)?y?Kr(w):w.slice():void 0);o.useEffect(()=>{Array.isArray(w)&&w.length?B(y?Kr(w):w.slice()):B(void 0)},[u,N,f,y]);const[E,k]=o.useState(null),[j,S]=o.useState(()=>new Set);o.useEffect(()=>{k(null),S(new Set)},[f,u,N]);const $=o.useRef(void 0);o.useEffect(()=>{const U=$.current;typeof U=="number"&&typeof n=="number"&&typeof e=="number"&&U>=e&&n<e&&(k(null),S(new Set)),$.current=n},[n,e]);const V=o.useCallback(U=>{if(!gr(g))return;const T=A?.[U];if(T==null)return;const z=T;if(d){const W=new Set(j);W.has(z)?W.delete(z):W.add(z),S(W),typeof c=="function"&&c({selectedValues:[...W],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...W],__ts:Date.now()})}else k(z),typeof c=="function"&&c({selectedIndex:U,selectedValue:z,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:U,selectedValue:z,__ts:Date.now()})},[A,g,d,c,j]),F=`training-step__buttons${Array.isArray(A)&&A.length>3?" training-step__buttons--wrap-3":""}`;return t.jsx(Cr,{index:e,stepIndex:n,isLast:r,lockedHint:a,title:v,useTitleFaded:l,children:t.jsx("div",{className:F,children:Array.isArray(A)&&A.length>0?A.map((U,T)=>t.jsx(ye,{htmlType:"button",size:56,type:"bar",onClick:()=>V(T),ariaLabel:String(U),label:U,useLabel:!0,icon:x?x[String(U)]:void 0,variant:"default",disabled:g==="disabled",selected:d?j.has(U):E===U,useDisabledCovered:C,minWidth:0},String(U))):null})})}function zs({index:e,stepIndex:n,isLast:r=!1,lockedHint:a,title:s,onDone:l,onChange:i,context:c,demoSelected:u}){const{t:p}=Ee.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 n!="number"?"disabled":d<n?"done":d===n?"active":"disabled",C=c&&typeof c=="object"?c.sentence||"":typeof c=="string"?c:"",x=c&&typeof c=="object"?c.choices:void 0,[y,b]=o.useState(u??null),v=`${String(C)}\0${JSON.stringify(x??null)}`,[_,g]=o.useState(v);_!==v&&(g(v),u==null&&b(null));const[w,N]=o.useState(u);Object.is(w,u)||(N(u),b(u??null));const f=o.useRef(void 0);o.useEffect(()=>{const k=f.current;typeof k=="number"&&typeof n=="number"&&typeof e=="number"&&k>=e&&n<e&&u==null&&b(null),f.current=n},[n,e,u]);const A=o.useCallback(k=>{const j=typeof k=="object"&&k!==null?Object.assign({},k,{__ts:Date.now()}):{value:k,__ts:Date.now()};typeof i=="function"&&i(j),gr(m)&&typeof l=="function"&&l(j)},[i,m,l]),B=o.useCallback(()=>{gr(m)&&(b(!1),A(!1))},[A,m]),E=o.useCallback(()=>{gr(m)&&(b(!0),A(!0))},[A,m]);return t.jsxs(Cr,{index:e,stepIndex:n,isLast:r,lockedHint:a,title:h,onDone:l,useTitleFaded:!1,children:[t.jsx(yd,{context:c,state:m}),t.jsx("div",{className:"training-step__buttons",children:Array.isArray(x)&&x.length>0?x.slice(0,6).map((k,j)=>t.jsx(ye,{htmlType:"button",size:56,type:"bar",onClick:()=>{gr(m)&&(b(j),A&&A(j))},disabled:m==="disabled",ariaLabel:String(k),label:k,variant:m,selected:y===j},j)):t.jsxs(t.Fragment,{children:[t.jsx(ye,{htmlType:"button",size:56,type:"bar",onClick:B,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:y===!1}),t.jsx(ye,{htmlType:"button",size:56,type:"bar",onClick:E,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:y===!0})]})})]})}function Ws({index:e,stepIndex:n,isLast:r=!1,title:a,onDone:s,btnLabel:l,soundSrc:i,bucketPath:c,usePreviewTextBtn:u,previewText:p=null,onPreviewTextBtn:h,disabled:d,_pageIndex:m,showSoundWaveForm:C,showNoiseWaveForm:x,leadInMs:y,tailMs:b}){const{t:v}=Ee.useTranslation(),_=a??v("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),g=d??(typeof n=="number"&&typeof e=="number"?e>n:!1);return t.jsx(Cr,{index:e,stepIndex:n,isLast:r,title:_,onDone:s,titleProps:{usePreviewTextBtn:u,previewText:p,onPreviewTextBtn:h},children:t.jsx(Fs,{soundSrc:i,ttsText:i?null:p??_,bucketPath:c,btnLabel:l||v("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:g,className:"training-step__listen-sticky",showSoundWaveForm:C,showNoiseWaveForm:x,leadInMs:y,tailMs:b},`audio-p${m??0}-s${e}`)})}const ow=[];function Hs({index:e,stepIndex:n,isLast:r=!1,lockedHint:a,title:s,onDone:l,onChange:i,context:c=ow}){const{t:u}=Ee.useTranslation(),p=s??u("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),h=q=>typeof q=="string"?q:q&&(q.context||q.sentence||q.question||"")||"",[d,m]=o.useState(Array.isArray(c)?c:[]),[C,x]=o.useState(()=>(d||[]).map((q,P)=>({id:P,text:h(q)}))),y=o.useMemo(()=>typeof n!="number"||typeof e!="number"?"disabled":e<n?"done":e===n?"active":"disabled",[n,e]),b=y!=="disabled",v=o.useRef(void 0),_=o.useRef(void 0);o.useEffect(()=>{if(v.current===c)return;v.current=c;const q=Array.isArray(c)?c:[];m(q);const P=(R=>{const D=(R||[]).map((ue,se)=>({id:se,text:h(ue)}));if(D.length<=1)return D;const H=(ue,se)=>{if(ue.length!==se.length)return!1;for(let pe=0;pe<ue.length;pe++)if(ue[pe].text!==se[pe].text)return!1;return!0};let ne=Kr(D),te=0;for(;H(ne,D)&&te<20;)ne=Kr(D),te+=1;return ne})(q);x(P);try{if(typeof i=="function"){const R=P.filter((D,H)=>D.text===h(q[H])).length;i({shuffled:P,score:R,total:(q||[]).length,initial:!0,__ts:Date.now()})}if(typeof l=="function"&&y==="active"){const R=P.filter((D,H)=>D.text===h(q[H])).length;_.current=c,l({shuffled:P,score:R,total:(q||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[c]),o.useEffect(()=>{if(y!=="active"||_.current===c||(_.current=c,typeof l!="function"))return;const q=Array.isArray(c)?c:[],P=C.filter((R,D)=>R.text===h(q[D])).length;l({shuffled:C,score:P,total:q.length,initial:!0,__ts:Date.now()})},[y,c]);const g=(q,P)=>{const R=[...C],D=q+P;if(D<0||D>=R.length)return;const H=R[D];R[D]=R[q],R[q]=H,z(R);try{if(typeof l=="function"&&y==="active"){const ne=R.filter((te,ue)=>te.text===h(d[ue])).length;l({shuffled:R,score:ne,total:(d||[]).length,__ts:Date.now()})}}catch{}},[w,N]=o.useState(null),f=o.useRef(null),A=o.useRef(null),B=o.useRef(null),E=o.useRef(null),k=o.useRef(null),j=o.useRef({x:0,y:0}),S=o.useRef(null),$=o.useRef({dx:0,dy:0}),V=()=>{if(S.current!==null)return;const q=()=>{if(!f.current){S.current=null;return}S.current=requestAnimationFrame(q);const P=j.current,R=$.current||{dx:0,dy:0};f.current&&(f.current.style.transform=`translate3d(${P.x-R.dx}px, ${P.y-R.dy}px, 0)`)};S.current=requestAnimationFrame(q)},F=o.useRef(new Map),U=o.useRef(new Map),T=()=>{const q=new Map;return F.current.forEach((P,R)=>{P&&P.getBoundingClientRect&&q.set(R,P.getBoundingClientRect())}),q},z=q=>{const P=T();x(q);try{if(typeof i=="function"){const R=q.filter((D,H)=>D.text===h(d[H])).length;i({shuffled:q,score:R,total:(d||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const R=T();q.forEach(D=>{const H=P.get(D.id),ne=R.get(D.id),te=F.current.get(D.id);if(!te||!H||!ne)return;const ue=H.top-ne.top;ue&&(te.style.transition="none",te.style.transform=`translateY(${ue}px)`,requestAnimationFrame(()=>{te.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",te.style.transform="";const se=()=>{te.style.transition="",te.removeEventListener("transitionend",se)};te.addEventListener("transitionend",se)}))})})},W=(q,P)=>{try{try{P.dataTransfer?.setData("text/plain",String(q))}catch{}try{P.dataTransfer&&(P.dataTransfer.effectAllowed="move")}catch{}try{const R=document.createElement("div");R.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(R),P.dataTransfer?.setDragImage(R,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(R)}catch{}})}catch{}}catch{}N(q);try{const R=C[q],D=document.createElement("div");D.className="order-list__dragging-object order-list__dragging-object--visible",D.textContent=R&&R.text?R.text:"",document.body.appendChild(D),f.current=D;const H=F.current.get(R.id);let ne=P.clientX||0,te=P.clientY||0;try{if(H&&H.getBoundingClientRect){const O=H.getBoundingClientRect();ne=O.left+O.width/2,te=O.top+O.height/2}}catch{}const ue=D.getBoundingClientRect(),se=ue.width/2,pe=ue.height/2;$.current={dx:se,dy:pe},D.style.transition="none",j.current={x:ne,y:te},D.style.transform=`translate3d(${ne-se}px, ${te-pe}px, 0)`,requestAnimationFrame(()=>{try{D.style.transition=""}catch{}V()});const G=O=>{const I=O;j.current={x:I.clientX,y:I.clientY},V()};B.current=G,document.addEventListener("mousemove",G);const K=O=>{const I=O;j.current={x:I.clientX,y:I.clientY},V()};A.current=K,document.addEventListener("dragover",K);try{P.dataTransfer?.setData("text/plain",String(q));try{P.dataTransfer?.setData("application/json",JSON.stringify({idx:q}))}catch{}}catch{}}catch{}},ie=(q,P)=>{P.preventDefault();try{P.dataTransfer&&(P.dataTransfer.dropEffect="move")}catch{}try{k.current!==null&&(clearTimeout(k.current),k.current=null);const R=P.currentTarget&&P.currentTarget.closest?P.currentTarget.closest(".order-list__item"):null;if(R&&E.current!==R){if(E.current)try{E.current.classList.remove("drag-over")}catch{}try{R.classList.add("drag-over")}catch{}E.current=R}}catch{}},Q=(q,P)=>{P.preventDefault();const R=P.dataTransfer?.getData("text/plain")||"",D=R?parseInt(R,10):w,H=q;if(typeof D!="number"||isNaN(D)||D===H){N(null),ee(),L();return}const ne=QC(C,D,H);z(ne),N(null),L();try{if(typeof l=="function"&&y==="active"){const te=ne.filter((ue,se)=>ue.text===h(d[se])).length;l({shuffled:ne,score:te,total:(d||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const te=document.querySelectorAll(".order-list .order-list__item")[H];if(!te)return;const ue=te.querySelector(".order-list__slot")||te;try{ue.classList.add("pulse"),ue.offsetHeight,ue.classList.add("to-dark");const se=()=>{ue.classList.remove("pulse","to-dark"),ue.removeEventListener("transitionend",se)};ue.addEventListener("transitionend",se)}catch{}})}catch{}ee()},L=()=>{if(f.current){try{document.body.removeChild(f.current)}catch{}f.current=null}A.current&&(document.removeEventListener("dragover",A.current),A.current=null),B.current&&(document.removeEventListener("mousemove",B.current),B.current=null),S.current!==null&&(cancelAnimationFrame(S.current),S.current=null)},J=()=>{N(null),ee(),L()};o.useEffect(()=>()=>L(),[]);const ee=()=>{try{if(k.current!==null&&(clearTimeout(k.current),k.current=null),E.current){try{E.current.classList.remove("drag-over")}catch{}E.current=null}document.querySelectorAll(".order-list .order-list__item").forEach(q=>q.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const q=Math.max(1,(C||[]).length);C.forEach((P,R)=>{const D=U.current.get(P.id);if(!D)return;let H=50;q>1&&(H=Math.round(R/(q-1)*100));try{D.style.setProperty("--marker-pos",H+"%")}catch{}})}catch{}},[C]),o.useEffect(()=>()=>{L(),k.current!==null&&(clearTimeout(k.current),k.current=null)},[]),t.jsx(Cr,{index:e,stepIndex:n,isLast:r,lockedHint:a,title:p,children:t.jsx("div",{className:"order-list",children:C.map((q,P)=>{const R=Math.max(1,(C||[]).length),D=R>1?Math.round(P/(R-1)*100):50;return t.jsx("div",{className:"order-list__item",children:t.jsxs("div",{className:"order-list__slot","data-disabled":y==="disabled","aria-disabled":y==="disabled",children:[y!=="disabled"?t.jsx("div",{className:"order-list__marker caption-1",style:{"--marker-pos":D+"%"},ref:H=>{const ne=U.current;H?ne.set(q.id,H):ne.delete(q.id)},children:t.jsx("span",{className:"order-list__slot-number button-1",children:P+1})}):null,t.jsxs("div",{ref:H=>{const ne=F.current;H?ne.set(q.id,H):ne.delete(q.id)},className:`order-list__draggable ${w===P?"dragging":""}`,"data-disabled":y==="disabled","aria-disabled":y==="disabled",tabIndex:y==="disabled"?-1:0,draggable:b,onDragStart:b?H=>W(P,H):void 0,onDragEnter:b?H=>ie(P,H):void 0,onDragOver:b?H=>ie(P,H):void 0,onDragLeave:b?()=>{try{k.current!==null&&clearTimeout(k.current),k.current=setTimeout(()=>{try{const H=document.querySelectorAll(".order-list .order-list__item");H&&H[P]&&(H[P].classList.remove("drag-over"),E.current===H[P]&&(E.current=null))}catch{}},80)}catch{}}:void 0,onDrop:b?H=>Q(P,H):void 0,onDragEnd:b?J:void 0,children:[t.jsx("span",{className:"order-list__item-text body-2",children:q.text}),b?t.jsxs("span",{className:"order-list__item-buttons",children:[t.jsx(ye,{htmlType:"button",size:32,type:"dot",onClick:()=>g(P,-1),ariaLabel:u("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:P===0,useBorder:!1,useDisabledInvisible:!0}),t.jsx(ye,{htmlType:"button",size:32,type:"dot",onClick:()=>g(P,1),ariaLabel:u("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:P===C.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},q.id)})})})}const sw=8e3;function lw(e,n){return new Promise(r=>{let a=!1;const s=()=>{a||(a=!0,r())};e.then(s,s),setTimeout(s,n)})}function vd({index:e,stepIndex:n,isLast:r=!1,lockedHint:a,title:s,onDone:l,onChange:i,context:c=[],selectable:u=!1,hideLabel:p=!1,hideAudio:h=!1,maxCards:d,playAllGapMs:m=0}){const{t:C}=Ee.useTranslation(),x=s??C("training.cardInstructions","\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694."),y=o.useMemo(()=>Array.isArray(c)?c:c&&c.items||[],[c]),b=d??3,v=(y||[]).slice(0,b);(y||[]).length>b&&console.warn(`TrainingStepCard: ${y.length} items passed but only ${b} shown`);const _=typeof e=="number"?e:-1,g=typeof n!="number"?"disabled":_<n?"done":_===n?"active":"disabled",[w,N]=o.useState(null),f=o.useRef([]),[A,B]=o.useState(!1),E=o.useRef(null),k=o.useRef(!0);o.useEffect(()=>(k.current=!0,()=>{k.current=!1}),[]);const j=o.useMemo(()=>y.map(T=>T?.id??T?.word??"").join("|"),[y]);o.useEffect(()=>{N(null)},[j]);const S=o.useRef(void 0);o.useEffect(()=>{const T=S.current;typeof T=="number"&&typeof n=="number"&&typeof e=="number"&&T>=e&&n<e&&N(null),S.current=n},[n,e]);const $=o.useCallback((T,z)=>{if(u)return;const W={item:T,index:z,__ts:Date.now()};try{typeof i=="function"&&i(W)}catch{}if(g==="active"&&typeof l=="function")try{l(W)}catch{}},[u,i,g,l]),V=o.useRef(m);o.useEffect(()=>{V.current=Math.max(0,m||0)},[m]);const F=o.useCallback(async()=>{if(A||g==="disabled")return;B(!0);let T=!1;const z=new Promise(W=>{E.current=()=>{T=!0,W()}});try{for(let W=0;W<v.length&&!(!k.current||T);W++){const ie=f.current[W];if(!ie)continue;await Promise.race([lw(ie.play(),sw),z]);const Q=Math.max(0,V.current||0);Q>0&&W<v.length-1&&!T&&k.current&&await Promise.race([new Promise(L=>{setTimeout(L,Q)}),z])}}finally{E.current=null,B(!1)}},[A,g,v.length]),U=o.useCallback((T,z)=>{if(!gr(g))return;N(z);const W={selectedValue:T.word||T.title||"",selectedIndex:z,item:T,__ts:Date.now()};try{typeof i=="function"&&i(W)}catch{}if(typeof l=="function")try{l(W)}catch{}},[i,g,l]);return t.jsx(Cr,{index:e,stepIndex:n,isLast:r,lockedHint:a,title:x,onDone:l,titleProps:{usePlayAllBtn:!h&&v.length>0,onPlayAll:F,playAllActive:A},children:t.jsx("div",{className:"training-step__cards",onClickCapture:T=>{const z=E.current;if(!z)return;const W=T.target;W&&typeof W.closest=="function"&&W.closest(".training-word-card__bottom")&&z()},children:v.length===0?t.jsx("div",{className:"training-step__empty",children:C("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):v.map((T,z)=>t.jsx(gs,{ref:W=>{f.current[z]=W},item:T,disabled:g==="disabled",onPlayDone:()=>$(T,z),selectable:u,selected:u&&w===z,onSelect:u?()=>U(T,z):void 0,flipDelay:z*120,hideLabel:p,hideAudio:h},T&&T.id||z))})})}const iw=160;function uw(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 xd(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"}]}uw(Jt.t.bind(Jt)),xd(Jt.t.bind(Jt));const Za="none",cw=.5,dw=1.5,pw=.25;function Vs({title:e,valueLabel:n,value:r,min:a,max:s,step:l,tickStep:i,size:c,disabled:u,onChange:p}){return t.jsxs(fn,{variant:"custom",label:e,useFullWidth:!0,children:[t.jsx(mc,{value:r,onChange:p,min:a,max:s,step:l,size:c,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:u,className:le("noise-settings-tooltip__slider-input")}),t.jsx("div",{className:le(ke("noise-settings-tooltip__value","button-1",u?"noise-settings-tooltip__value--disabled":"")),children:n})]})}function _d({anchorRect:e,onClose:n,hideNoiseRows:r=!1}){const{t:a}=Ee.useTranslation(),s=wn("(max-width: 767px)")?40:24,l=qa(),i=Ca(l?.settings??fr),c=l?.settings.type??"defaultNoise",u=l?.settings.enabled??!0,p=l?.playbackRate??1,h=l?.mainVolume??1,d=Math.round(h*100),m=o.useCallback(v=>{try{l?.setMainVolume(Math.max(0,Math.min(1,v/100)))}catch{}},[l]),C=o.useCallback(v=>{try{l?.setPlaybackRate(v)}catch{}},[l]),x=o.useCallback(v=>{const _=Math.min(fa,Math.max(0,Math.round(v*10)/10));try{l?.setSettings({noiseRatio:_})}catch{}},[l]),y=o.useCallback(v=>{try{v===Za?l?.setSettings({enabled:!1}):l?.setSettings({type:v,enabled:!0})}catch{}},[l]),b=[{key:Za,label:a("training.noise.type.none","\uC5C6\uC74C")},...xd(a).map(v=>({key:v.value,label:v.label}))];return t.jsx(En,{anchorRect:e,offset:12,onClose:n,ariaLabel:a("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),isMobilePopup:!1,closeOnOutsideClick:!1,header:t.jsxs("div",{className:le("noise-settings-tooltip__header"),children:[t.jsx("span",{children:a("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815")}),t.jsx(ye,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:a("common.close","\uB2EB\uAE30"),onClick:n})]}),children:t.jsxs(da,{className:le("noise-settings-tooltip"),useBorder:!1,labelWidth:72,children:[t.jsx(Vs,{title:a("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${d}%`,value:d,min:0,max:100,step:10,size:s,onChange:m}),t.jsx(Vs,{title:a("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${p.toFixed(2)}x`,value:p,min:cw,max:dw,step:pw,size:s,onChange:C}),!r&&t.jsxs(t.Fragment,{children:[t.jsx(fn,{variant:"custom",label:a("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:t.jsx(Bn,{ariaLabel:a("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:b,value:u?c:Za,onChange:y})}),t.jsx(Vs,{title:a("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:a("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:fa,step:rd,size:s,disabled:!u,onChange:x})]}),r&&t.jsx("div",{className:le("noise-settings-tooltip__width-ghost"),"aria-hidden":"true",inert:!0,children:t.jsx(fn,{variant:"custom",label:"\xA0",useFullWidth:!0,children:t.jsx(Bn,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:b,value:Za,onChange:()=>{}})})})]})})}function wd({useNoiseSettingBtn:e=!1,onSettings:n,onNext:r,onResult:a,stepIndex:s=0,stepCount:l=0,pageIndex:i=0,pageCount:c=1,resultOpen:u=!1,hideNoiseRows:p=!1}){const{t:h}=Ee.useTranslation(),[d,m]=o.useState(!1),[C,x]=o.useState(null),[y,b]=o.useState(!1),v=o.useRef(null),_=o.useRef(null),g=qa(),w=c>0,N=w&&i<c-1,f=!w||i>=c-1,A=s===Math.max(0,l);o.useEffect(()=>{e||(m(!1),x(null))},[e]);const B=o.useCallback(()=>{m(!1),x(null)},[]),E=o.useCallback(()=>{if(d){m(!1),x(null);return}const z=v?.current?.getBoundingClientRect();z&&x(z),n?.(),m(!0)},[d,n]),k=o.useCallback(()=>{if(d){m(!1),x(null);return}const z=_?.current?.getBoundingClientRect();z&&x(z),n?.(),m(!0)},[d,n]),j=wn("(max-width: 767px)"),S=o.useRef(null),[$,V]=o.useState(null),F=o.useCallback(()=>{b(z=>{const W=!z;return V(W?S.current?.getBoundingClientRect()??null:null),W})},[]),U=o.useCallback(()=>{b(!1),V(null)},[]);o.useEffect(()=>{u&&(b(!1),V(null))},[u]);const T=t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"pp-bottom__meter",children:[t.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.sentence","\uC7AC\uC0DD")}),t.jsx(ps,{analyser:g?.mainAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.sentence","\uC7AC\uC0DD")})]}),t.jsxs("div",{className:"pp-bottom__meter",children:[t.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.noise","\uC18C\uC74C")}),t.jsx(ps,{analyser:g?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.noise","\uC18C\uC74C")})]})]});return gd(e&&d,()=>typeof document<"u"?document.querySelector(".noise-settings-tooltip__header")?.closest(".tooltip__content")??null:null,()=>[v.current,_.current].map(z=>z?.querySelector("button")??null).find(z=>!!z&&z.getClientRects().length>0)??v.current?.querySelector("button")??null),t.jsxs("div",{className:"pp-bottom",children:[t.jsxs("div",{className:"pp-bottom__left",children:[e?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"pp-bottom__settings--desktop",children:t.jsx("div",{ref:v,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:t.jsx(ye,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:E,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})})}),t.jsx("div",{className:"pp-bottom__settings--mobile",children:t.jsx("div",{ref:_,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:t.jsx(ye,{htmlType:"button",size:56,type:"dot",shape:"pill",icon:"settings",onClick:k,className:d?"is-selected":void 0,"aria-expanded":d,"aria-haspopup":"dialog",ariaLabel:h("training.settings","\uC124\uC815")})})})]}):null,e&&t.jsx("div",{ref:S,className:"pp-bottom__meter-trigger","data-tooltip-ignore":!0,children:t.jsx(ye,{htmlType:"button",size:40,type:"dot",shape:"pill",icon:"audio-lines",onClick:F,selected:y,"aria-expanded":j?y:void 0,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&y&&!j&&t.jsx("div",{className:"pp-bottom__meters",children:T})]}),e&&y&&j&&$&&t.jsx(En,{anchorRect:$,onClose:U,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"),children:t.jsx("div",{className:"pp-bottom__meters pp-bottom__meters--floating",children:T})}),t.jsxs("div",{className:"pp-bottom__right",children:[f&&t.jsx(ye,{htmlType:"button",size:56,type:"bar",icon:"check",onClick:typeof a=="function"?a:r,ariaLabel:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),label:h("training.viewResult","\uACB0\uACFC\uBCF4\uAE30"),variant:"main",disabled:!A}),N&&t.jsx(ye,{htmlType:"button",size:56,type:"bar",rightIcon:"chevron-right",align:"right",onClick:r,ariaLabel:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),label:h("training.nextQuestion","\uB2E4\uC74C \uBB38\uC81C"),variant:"main",disabled:!A})]}),e&&d&&t.jsx(_d,{anchorRect:C,onClose:B,hideNoiseRows:p})]})}function Bd({title:e,subtitle:n,desc:r,depth:a,icon:s,wrapperStyle:l,iconTooltip:i,pageIndex:c,pageCount:u,progressMax:p,progressIndex:h,onBack:d,onClose:m}){const{t:C}=Ee.useTranslation(),x=wn("(max-width: 767px)"),y=Number.isInteger(h)?h:c||0,b=Number.isInteger(p)?p:u||0,v=d||m,_=Array.isArray(a)?x?a[a.length-1]:a.join(" / "):a,g=typeof e=="string"?e.trim():e,w=typeof n=="string"?n.trim():n,N=!!(g||w),f=N?g||w:C("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),A=_||(g?n:void 0),B=x&&typeof A=="string"&&(A.includes(" \xB7 ")||A.includes(" / "))?A.split(/\s[·/]\s/).pop():A,E=o.useMemo(()=>{const k=l&&typeof l=="object"?{...l}:{};return!("width"in k)&&!("height"in k)&&(k.width="40px",k.height="40px"),k},[l]);return t.jsxs("header",{className:"pp-title training-popup-title",children:[t.jsxs("div",{className:"pp-title__left",children:[v?t.jsx(ye,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:C("common.back","\uB4A4\uB85C"),onClick:v,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,t.jsx("div",{children:s?t.jsx(Pu,{icon:s,label:e,tooltip:i,wrapperStyle:E}):null}),t.jsxs("div",{className:"pp-title__text",children:[B?t.jsx("span",{className:"pp-title__depth caption-1",children:B}):null,t.jsx("span",{className:`pp-title__title h2${N?"":" pp-title__title--empty"}`,children:f}),r?t.jsx("span",{className:"pp-title__description caption-1",children:r}):null]})]}),t.jsx(bc,{max:Math.max(0,b??0),index:Math.max(0,y??0)})]})}function hw(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function mw(e){return!e&&e!==0?[]:Array.isArray(e)?e.flatMap(n=>typeof n=="string"?n.split("|").map(r=>r.trim()).filter(Boolean):n||n===0?[String(n)]:[]):typeof e=="string"?e.split("|").map(n=>n.trim()).filter(Boolean):[String(e)]}const kd=(e,n)=>{if(!n)return n;const r=typeof Jt?.t=="function"?Jt.t(e,{defaultValue:n}):void 0;return typeof r=="string"&&r?r:n};function Ad(e,n,r){const a=e,s=a?.title||a?.name||(Array.isArray(n)?n[n.length-1]:void 0)||r||"\uD6C8\uB828",l=fi().find(c=>c.key===(a?.category_0||a?.category_main_code)),i=l?.subs?.find(c=>c.key===(a?.category_1||a?.category_sub_code));return{title:s,label:a?.title||s,depth:n,icon:l?.icon,wrapperStyle:l?.color?{"--t-item-fg":l.color}:void 0,iconTooltip:[l?kd(`topic.${l.key}`,l.label):void 0,i?kd(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function qs(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function Nd(e,n,r){if(!e||typeof e!="object"||Array.isArray(e))return e;const a=e,s=typeof r=="number"&&r>0?r:Date.now();return{...a,...a.shownAt===void 0&&n?{shownAt:n}:{},...a.answeredAt===void 0?{answeredAt:new Date(s).toISOString()}:{}}}function fw(e){const n=e;return Array.isArray(n?.items)?n.items:Array.isArray(e)?e:e?[e]:[]}function Cw({idPrefix:e,trainingData:n,depth:r,fallbackTitle:a="\uD6C8\uB828",pages:s=[],emptyMessage:l,buildResults:i,metaPatch:c}){const u=Ad(n,r,a),p=typeof c=="function"?c(u)||{}:c||{},h=n?.id||n?.title||s.length;return{id:`${e}:${h}`,meta:{...u,...p},pages:s,emptyMessage:l,buildResults:i}}function gw(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const n=e;return n.context||n.sentence||n.question||""||""}return""}function bw(e){if(e&&typeof e=="object"){const n=e;if(Array.isArray(n.selectedValues))return n.selectedValues;if(n.selectedValue!==void 0)return n.selectedValue;if(n.selectedIndex!==void 0)return n.selectedIndex;if(n.value!==void 0)return n.value}return e}function yw(e,n=[]){if(Array.isArray(e))return e.join(", ");if(typeof e=="number"&&Array.isArray(n))return String(n[e]??"");if(typeof e=="string")return e}function Ed(e,n){if(!(!e||typeof e!="object"))return e[`step-${n}`]}function vw(e,n,r,a){return Ed(e,n*r+a)}function xw({payload:e,selected:n,choices:r=[],correctAnswers:a=[]}){if(e&&typeof e=="object"){const s=e;if(Array.isArray(s.selectedValues))return a.every(l=>s.selectedValues.includes(l))&&s.selectedValues.every(l=>a.includes(l));if(typeof s.correct=="boolean")return s.correct}if(a.length){if(typeof n=="number"&&Array.isArray(r)&&r.length)return a.some(s=>String(s)===String(r[n]));if(typeof n<"u")return a.some(s=>String(s)===String(n))}}function _w(e){return e?Array.isArray(e.items)?e.items.map(n=>{const r=n;return typeof n=="string"?{sentence:n}:{sentence:r.context||r.sentence||"",contextCode:r.contextCode||r.context_code}}):Array.isArray(e.sentences)?e.sentences.map(n=>{const r=n;return typeof n=="string"?{sentence:n}:{sentence:r.sentence||r.context||"",contextCode:r.contextCode}}):Array.isArray(e.contexts)?e.contexts:e.contextCode?[{contextCode:e.contextCode}]:[]:[]}const jd=o.createContext(null);function ww(){const e=o.useContext(jd);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function Bw({index:e,stepIndex:n,isLast:r=!1,lockedHint:a,title:s,choices:l=[],onDone:i,onChange:c}){const{t:u}=Ee.useTranslation(),p=typeof e=="number"?e:-1,h=typeof n!="number"?"disabled":p<n?"done":p===n?"active":"disabled",[d,m]=o.useState(()=>l.map(()=>null)),C=JSON.stringify(l),x=l.length;o.useEffect(()=>{m(Array.from({length:x},()=>null))},[C]);const y=o.useRef(void 0);o.useEffect(()=>{const g=y.current;typeof g=="number"&&typeof n=="number"&&typeof e=="number"&&g>=e&&n<e&&m(Array.from({length:x},()=>null)),y.current=n},[n,e,x]);const b=o.useMemo(()=>d.filter(g=>g!==null).length+1,[d]),v=o.useCallback(g=>{if(!gr(h))return;const w=d;let N;if(w[g]!=null){const A=w[g];N=w.map(B=>B!==null&&B>=A?null:B)}else N=[...w],N[g]=b;m(N);const f={selectedOrder:N,words:l,__ts:Date.now()};try{typeof c=="function"&&c(f)}catch{}if(w[g]==null&&N.length>0&&N.every(A=>A!==null))try{typeof i=="function"&&i(f)}catch{}},[h,d,b,c,i,l]),_=s??u("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return t.jsx(Cr,{index:e,stepIndex:n,isLast:r,lockedHint:a,title:_,onDone:i,children:t.jsx("div",{className:"training-step__cards",children:l.map((g,w)=>t.jsx(gs,{item:{word:g},disabled:h==="disabled",selectable:!0,selected:d[w]!==null,orderRank:d[w],onSelect:()=>v(w),flipDelay:w*120,hideLabel:!1,hideAudio:!0},`${g}-${w}`))})})}function Xa(e){return null}Xa.__isTrainingPage=!0;function Rr(e,n){const r=ww();return{ctx:r,index:e,stepIndex:r.currentStepIndex,isLast:typeof e=="number"&&typeof n=="number"?e===n-1:!1,onDone:a=>r.handleStepDone(a,e),onChange:a=>r.handleStepChange(a,e)}}function Dd({_stepIndex:e,_totalSteps:n,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i}=Rr(e,n);return t.jsx(Ws,{...r,index:a,stepIndex:s,isLast:l,onDone:i})}function Sd({_stepIndex:e,_totalSteps:n,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:c}=Rr(e,n);return t.jsx(Os,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:c})}function Td({_stepIndex:e,_totalSteps:n,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:c}=Rr(e,n);return t.jsx(zs,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:c})}function Md({_stepIndex:e,_totalSteps:n,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:c}=Rr(e,n);return t.jsx(Hs,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:c})}function $d({_stepIndex:e,_totalSteps:n,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:c}=Rr(e,n);return t.jsx(vd,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:c})}function kw({_stepIndex:e,_totalSteps:n,...r}){const{index:a,stepIndex:s,isLast:l,onDone:i,onChange:c}=Rr(e,n);return t.jsx(Bw,{...r,index:a,stepIndex:s,isLast:l,onDone:i,onChange:c})}const Ld=3e4,Aw=/^(https?:|blob:|data:audio|\/|\.\/)/;function Rd(e){return typeof e=="string"&&Aw.test(e)?e:null}const Nw=e=>typeof e=="string"&&e.trim()!==""?e:null,Us=Symbol("timed-out");function Ew(e,n){if(n<=0)return Promise.resolve(Us);let r;return Promise.race([Promise.resolve(e),new Promise(a=>{r=setTimeout(()=>a(Us),n)})]).finally(()=>clearTimeout(r))}function jw(e){return e?Hr()||ya()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function Dw(e,n){const r=[],a=Rd(n);a&&r.push({kind:"raw",resolve:async()=>a});const s=(e??"").trim();if(!s)return r;for(const[l,i]of[["urlResolver",Hr()],["fallbackUrlResolver",ya()]])i&&r.push({kind:l,resolve:async c=>{let u;try{u=await Ew(i(s),c)}catch(h){return jt(`question-sound-threw-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uB358\uC84C\uB2E4 \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`,h),null}return u===Us?(jt(`question-sound-slow-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 ${Ld}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):Nw(u)||(jt(`question-sound-empty-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 \uC8FC\uC18C\uB97C \uC548 \uC92C\uB2E4(\uBC1B\uC740 \uAC83: ${JSON.stringify(u)}) \u2014 \uADF8 \uCC28\uB840\uB294 \uAC74\uB108\uB6F4\uB2E4.`),null)}});return r}function Sw(){return Date.now()+Ld}const Tw=(e,n)=>Math.max(0,e-Date.now())/Math.max(1,n);function Mw(e){jt("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 Ja(...e){for(const n of e)if(typeof n=="string"){const r=n.trim();if(r.length)return r}else{if(typeof n=="number"||typeof n=="boolean")return String(n);if(Array.isArray(n)&&n.length)return n.join(", ");if(n&&typeof n=="object"){const r=n,a=[r.text,r.label,r.value];for(const s of a){if(typeof s=="string"&&s.trim().length)return s.trim();if(typeof s=="number"||typeof s=="boolean")return String(s)}}}return null}function $w(e){return Ja(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function Lw(e){return Rd(Ja(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function Pd(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 n=Ja(e?.status,e?.result,e?.judge,e?.note);if(n){const r=n.toLowerCase();if(["ok","true","\uB9DE\uC74C","\uC815\uB2F5"].some(a=>r.includes(a)))return!0;if(["ng","false","\uD2C0\uB9BC","\uC624\uB2F5"].some(a=>r.includes(a)))return!1}}function Fd(e){const{score:n,contextsLength:r,results:a=[],subtitle:s,onReplay:l,onClose:i,inline:c=!1,pending:u=!1}=e||{},{t:p}=Ee.useTranslation(),h=o.useId(),d=o.useCallback(()=>!u,[u]);o.useEffect(()=>{const k=r??0;if(n!=null&&k>0&&n/k>.5){const j=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("party:trigger",{detail:{count:140,strength:1.6,duration:2200}}))},0);return()=>window.clearTimeout(j)}},[n,r]);const m=o.useCallback(k=>{const j=Pd(k),S=Ja(k?.wording,k?.label);return j===!0?{variant:"main",label:S??p("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:j===!1?{variant:"danger",label:S??p("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:S??p("training.result.notJudged","\uBBF8\uD310\uC815")}},[p]),C=r??0,x=n??0,y=o.useMemo(()=>Array.isArray(a)?a:[],[a]),b=o.useRef(null),[v,_]=o.useState(null),g=o.useCallback(()=>{b.current?.(),b.current=null,_(null)},[]);o.useEffect(()=>g,[g]);const w=o.useRef(0),N=(k,j)=>{if(!Yn)return;const S=Math.round(performance.now()-w.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${S}ms ${k}`,j??"")},f=o.useRef(0),A=o.useCallback((k,j,S)=>{g();const $=++f.current,V=()=>f.current===$;w.current=Yn?performance.now():0,N(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${k}`,{text:j,rawUrl:S}),_(k),b.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),f.current++,yo()};const F=W=>{N("\uD2BC\uB2E4",W);const ie=sa(W,Q=>{N(`\uB05D\uB0AC\uB2E4 \u2014 ${Q?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:V()}),Q&&V()&&(b.current=null,_(null))});return b.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),f.current++,ie.stop(),yo()},ie.done},U=Dw(j,S);N("\uCC28\uB840",U.map(W=>W.kind));const T=U[0]?.kind==="raw",z=T?F(S):Promise.resolve(!1);(async()=>{if(await z||!V())return;const W=Sw(),ie=T?U.slice(1):U;for(let Q=0;Q<ie.length;Q++){if(!V())return;N(`${ie[Q].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const L=await ie[Q].resolve(Tw(W,ie.length-Q));if(N(`${ie[Q].kind} \uAC00 \uB2F5\uD588\uB2E4`,L),!V()||L&&(await F(L)||!V()))return}V()&&(N("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),Mw(j),b.current=()=>{f.current++,yo()},N("\uB0AD\uB3C5\uD55C\uB2E4"),lC(j,{onEnd:()=>{V()&&(b.current=null,_(null))}}))})()},[g]),B=o.useMemo(()=>y.map(k=>{const j=k??{},S=$w(j)||p("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:$,label:V}=m(j),F=Array.isArray(j.corrects)?j.corrects:[],U=F.length?F.join(", "):j.answer!=null&&j.answer!==""?String(j.answer):null,T=typeof j.selectedText=="string"?j.selectedText:null,z=Pd(j)===!0,W=Lw(j),ie=!!W||jw(S);return{problem:S,variant:$,label:V,answer:U,selectedText:T,isCorrect:z,sound:W,canHear:ie}}),[y,m,p]),E=o.useMemo(()=>B.some(k=>k.answer!==null||k.selectedText!==null),[B]);return t.jsx(qn,{onClose:i,closeOnBackdrop:!1,inline:c,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:k,closeWithAnimation:j})=>t.jsxs(t.Fragment,{children:[u&&t.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.")}),t.jsxs("div",{className:"trp-actions",children:[t.jsx(ye,{htmlType:"button",size:56,type:"bar",label:p("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>k(l)}),t.jsx(ye,{htmlType:"button",size:56,type:"bar",label:p("training.result.done","\uC644\uB8CC"),variant:"main",onClick:j,disabled:u,onDisabledClick:u?()=>{}:void 0,"aria-describedby":u?h:void 0})]})]}),children:()=>t.jsxs("div",{className:"trp-result is-on",children:[t.jsxs("header",{className:"trp-result__head",children:[t.jsx("p",{className:"trp-result__eyebrow caption-1",children:p("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")}),t.jsx("h1",{className:"trp-result__title h2",children:p("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.")}),s&&t.jsx("p",{className:"trp-result__subtitle body-3",children:s}),t.jsx("div",{className:"trp-score",children:t.jsxs("div",{className:"trp-score__figure","aria-label":p("training.result.scoreAria",{correct:x,total:C}),children:[t.jsx("span",{className:"trp-score__big",children:x}),t.jsx("span",{className:"trp-score__sep",children:"/"}),t.jsx("span",{className:"trp-score__total",children:C})]})})]}),B.length>0&&t.jsx("section",{className:"trp-result__body",children:t.jsxs("div",{className:`result-table${E?" result-table--answer":""}`,role:"table","aria-label":p("training.result.tableAriaLabel","\uBB38\uD56D\uBCC4 \uD310\uC815"),children:[t.jsxs("div",{className:"result-table__head caption-1",role:"row",children:[t.jsx("span",{role:"columnheader",children:p("common.col.problem","\uBB38\uC81C")}),E&&t.jsx("span",{role:"columnheader",children:p("training.result.colAnswerSelected","\uC815\uB2F5 \xB7 \uC120\uD0DD")}),t.jsx("span",{className:"col-right",role:"columnheader",children:p("training.result.colJudge","\uD310\uC815")})]}),B.map((k,j)=>t.jsxs("div",{className:"result-table__row",role:"row",children:[t.jsxs("div",{className:"trp-row__problem",children:[t.jsx("span",{className:"trp-row__no caption-1",children:String(j+1).padStart(2,"0")}),t.jsx("div",{className:"trp-row__q body-2",children:k.problem}),k.canHear&&t.jsx(ye,{htmlType:"button",size:32,type:"dot",useBorder:!1,icon:v===j?"square":"volume-2",className:"trp-row__replay",ariaLabel:v===j?p("training.result.replaySoundStop",{no:j+1,defaultValue:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4"}):p("training.result.replaySound",{no:j+1,defaultValue:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30"}),onClick:()=>v===j?g():A(j,k.problem,k.sound)})]}),E&&t.jsxs("div",{className:"trp-row__answers",children:[k.answer!==null&&t.jsxs("div",{className:"trp-row__answer-line",children:[t.jsx("span",{className:"trp-row__answer-label answer-correct caption-1",children:p("training.result.colAnswer","\uC815\uB2F5")}),t.jsx("span",{className:"trp-row__answer-value body-2",children:k.answer})]}),t.jsxs("div",{className:"trp-row__answer-line",children:[t.jsx("span",{className:`trp-row__answer-label answer-selected caption-1 ${k.isCorrect?"is-correct":"is-wrong"}`,children:p("training.result.colSelected","\uC120\uD0DD")}),t.jsx("span",{className:`trp-row__answer-value body-2 ${k.isCorrect?"is-correct":"is-wrong"}`,children:k.selectedText??"\u2014"})]})]}),t.jsx("div",{className:"trp-row__judge",children:t.jsx(un,{variant:k.variant,label:k.label,fill:"soft",minWidth:80})})]},j))]})})]})})}const Gs=new Set;function Rw(e){o.useEffect(()=>{if(!e||Gs.has(e))return;Gs.add(e);const n=()=>typeof document>"u"||document.visibilityState!=="hidden";let r=null,a=null,s=0,l=0;const i=()=>{const h=Date.now();r==null&&(r=h),a==null&&(a=h)},c=()=>{a!=null&&(s+=Date.now()-a,a=null)};n()&&i();const u=()=>{if(c(),r==null)return;const h=s-l;if(h<1e3||l===0&&s<5e3)return;const d=Date.now(),m=d-h;l=s,ng({trainingType:e,startedAt:new Date(m).toISOString(),endedAt:new Date(d).toISOString()})},p=()=>{n()?i():u()};return typeof document<"u"&&document.addEventListener("visibilitychange",p),typeof window<"u"&&window.addEventListener("pagehide",u),()=>{typeof document<"u"&&document.removeEventListener("visibilitychange",p),typeof window<"u"&&window.removeEventListener("pagehide",u),u(),Gs.delete(e)}},[e])}function Qa(e,n){return e&&e.id||`page-${n??0}`}function eo(e,n){return e&&e.key||`step-${n??0}`}function to(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function Pw(e,n){return typeof e?.props=="function"?e.props(n)||{}:e?.props||{}}const Fw=300,Iw=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},Kn=Object.freeze({}),Id=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function Ks(e){const n=e,r=n?.results||n?.answers||[],a=Array.isArray(r)&&r.length>0?r.length:null,s=Array.isArray(r)?r.filter(l=>l?.correct===!0||l?.isCorrect===!0||l?.score===1||l?.heard===!0||l?.judgement===!0).length:null;return{results:r,correct:a!=null?s:null,total:a}}const Ow=e=>t.jsx(Fd,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function zw(e){const{scenario:n,title:r,subTitle:a,depth:s,icon:l,wrapperStyle:i,iconTooltip:c,pageIndex:u,pageCount:p,stepIndex:h,stepCount:d,onBack:m,onComplete:C,onRoundFinished:x,onNext:y,onSettings:b,useNoiseSetting:v=!0,children:_,ariaLabel:g,label:w,buildResults:N,onResult:f,typeKey:A,entryPoint:B,dailyTotal:E,itemRef:k,renderResultPopup:j,noiseOverride:S,hideNoiseRows:$=!1,inline:V=!1,height:F}=e;Rw(A&&!Id.has(A)?A:"");const U=o.useRef(0);o.useEffect(()=>{U.current=Date.now()},[]);const{t:T}=Ee.useTranslation(),z=f,W=!!n,ie=n?.id||null,Q=n?.meta||{},L=Array.isArray(n?.pages)?n.pages:[],J=Array.isArray(_)||o.isValidElement(_)&&typeof _!="function"?o.Children.toArray(_).filter(o.isValidElement):[],ee=J.length>0,q=me=>me===Xa||me?.__isTrainingPage===!0,P=ee&&J.some(me=>q(me.type)),R=P?J.filter(me=>q(me.type)).map((me,je)=>{const We=me.props||{};return{id:`children-page-${je}`,steps:o.Children.toArray(We.children).filter(o.isValidElement),pageTop:We.pageTop||We.top||null,pageBottom:We.pageBottom||We.bottom||null}}):[{id:"children-page-0",steps:J}],D=ee&&!W&&typeof _!="function",H=D?Math.max(1,R.length):0;o.useEffect(()=>{if(!V&&!(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(V||typeof document>"u"||!document.body)return;const me=document.body;return me.dataset.ihabTrainingPopupCount=String(Number(me.dataset.ihabTrainingPopupCount||"0")+1),me.classList.add("ihab-training-popup-open"),()=>{const je=Number(me.dataset.ihabTrainingPopupCount||"1")-1;je>0?me.dataset.ihabTrainingPopupCount=String(je):(delete me.dataset.ihabTrainingPopupCount,me.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!V&&!(typeof document>"u"||!document.body))return Zv()},[]);const[ne,te]=o.useState({...fr,enabled:!1}),ue=o.useRef(ne);o.useEffect(()=>{ue.current=ne},[ne]);const se=o.useRef(S),pe=o.useRef(!1),G=o.useRef(null);o.useEffect(()=>{let me=!1;const je=We=>{if(me)return;pe.current=!0;const Y=We?mr({...fr,enabled:!1},We):{...fr},de=G.current;G.current=null;const Be=de?mr(Y,de):Y;ue.current=Be,te(Be),de&&!se.current&&So(Be),ka(Be);const Me=se.current;if(Me){const Ve=typeof Me=="function"?Me(Be):Me,Xe=mr(Be,Ve);ue.current=Xe,te(Xe),ka(Xe)}};return mg().then(We=>{if(me){const Y=G.current;if(G.current=null,Y&&!se.current){const de=We?mr({...fr,enabled:!1},We):{...fr};So(mr(de,Y))}return}je(We)}),()=>{me=!0}},[]);const[K,O]=o.useState(null),[I,ae]=o.useState(null),he=o.useCallback((me,je)=>{me==="main"?O(je):ae(je)},[]),re=o.useRef(null),_e=o.useRef(null),De=o.useCallback(()=>{_e.current!==null&&(clearTimeout(_e.current),_e.current=null);const me=re.current;re.current=null,me&&So(me)},[]);o.useEffect(()=>{if(typeof window>"u")return;const me=()=>{document.visibilityState==="hidden"&&De()};return window.addEventListener("pagehide",De),document.addEventListener("visibilitychange",me),()=>{window.removeEventListener("pagehide",De),document.removeEventListener("visibilitychange",me),De()}},[De]);const Se=o.useCallback(me=>{const je=mr(ue.current,me);if(ue.current=je,te(je),!pe.current){G.current={...G.current??{},...me},ka(je);return}se.current||(re.current=je,_e.current!==null&&clearTimeout(_e.current),_e.current=setTimeout(De,Fw)),ka(je)},[De]),Ne=ne.mainSpeed,He=ne.mainVolume,ve=o.useCallback(me=>Se({mainSpeed:me}),[Se]),xe=o.useCallback(me=>Se({mainVolume:me}),[Se]),we=o.useMemo(()=>({settings:ne,setSettings:Se,registerAnalyser:he,mainAnalyser:K,noiseAnalyser:I,playbackRate:Ne,setPlaybackRate:ve,mainVolume:He,setMainVolume:xe}),[ne,Se,he,K,I,Ne,ve,He,xe]),Ae=o.useRef(null),[Ie,ot]=o.useState(0),pt=o.useRef([]),[Oe,Ue]=o.useState("center"),[rt,ce]=o.useState(!1),Pe=o.useRef(!1),Ye=o.useRef(null),Qe=o.useCallback(me=>{Pe.current||(Pe.current=!0,ce(!0),Ye.current=setTimeout(()=>{try{me()}catch{Pe.current=!1,ce(!1)}},Iw()?0:iw))},[]);o.useEffect(()=>()=>{Ye.current&&clearTimeout(Ye.current)},[]);const ut=o.useRef(m);o.useEffect(()=>{ut.current=m});const vt=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(V)return;const me=Ae.current,je=vt.current;if(Ro(me,je),me){const We=Array.from(me.querySelectorAll($n)).filter(Y=>!Y.closest('[aria-hidden="true"]'))[0];if(We)try{We.focus()}catch{}}return()=>{const We=document.activeElement;if(!We||We===document.body||me&&me.contains(We))try{Po(je)?.focus?.()}catch{}}},[]),o.useEffect(()=>{if(!V)return lr(()=>Qe(()=>{const me=ut.current;typeof me=="function"&&me()}))},[Qe,V]),$o(Ae,!V);const[ct,Gt]=o.useState(!1),xt=o.useRef(!1),[lt,st]=o.useState(null),Ot=o.useRef(0),Mt=o.useRef(0),Nt=()=>{Ot.current+=1,Mt.current+=1,st(null)},[Ft,zt]=o.useState(""),[_t,gt]=o.useState(()=>to()),Et=o.useRef(typeof u=="number"?u:null);o.useEffect(()=>{!W&&!D||(gt(to()),Nt())},[W,ie,D]),o.useEffect(()=>{D&&gt(me=>{const je=Math.max(0,Math.min(me.pageIndex,Math.max(0,H-1)));return je!==me.pageIndex?{...me,pageIndex:je,stepIndex:0}:me})},[D,H]);const It=D?Math.max(0,Math.min(_t.pageIndex,H-1)):0,et=D?R[It]:null,wt=D&&et&&Array.isArray(et.steps)?et.steps:[],tt=W?_t.pageIndex:D?It:typeof u=="number"?u:0,fe=W?L[Math.max(0,Math.min(_t.pageIndex,Math.max(0,L.length-1)))]:null,$e=W&&fe&&Array.isArray(fe.steps)?fe.steps:[],Re=W?$e.length:D?wt.length:typeof d=="number"?d:0,ze=W||D?Math.max(0,Math.min(_t.stepIndex,Math.max(0,Re))):typeof h=="number"?h:0,it=W?L.length:D?H:typeof p=="number"?p:0;o.useEffect(()=>{if(!W&&!D)return;const me=W?Qa(fe,tt):et?.id||`children-page-${tt??0}`,je=new Date().toISOString();for(let We=0;We<=ze;We+=1){const Y=W?eo($e[We],We):`step-${We}`,de=Ct(me,Y);Ke.current.has(de)||Ke.current.set(de,je)}},[W,D,tt,ze,et?.id]),o.useLayoutEffect(()=>{const me=Et.current;if(typeof tt=="number"&&me!==null&&tt!==me&&tt>me)try{zt(T("training.problemNotice",{n:tt+1}))}catch{}Et.current=typeof tt=="number"?tt:Et.current},[tt,u,T]),o.useLayoutEffect(()=>{const me=Ae.current;if(!me)return;const je=()=>me.querySelector(".page-popup__scroll");let We=null,Y=null,de=null;const Be=ft=>{const be=je();if(!be)return;const M=be.scrollHeight<=be.clientHeight;if(Ue(M?"center":"top"),ft&&!xt.current){xt.current=!0;try{Gt(!0)}catch{}try{Xe.disconnect()}catch{}}},Me=()=>{We!==null&&cancelAnimationFrame(We),We=requestAnimationFrame(()=>{Y!==null&&clearTimeout(Y),Y=setTimeout(()=>Be(!0),60)})},Ve=()=>{de!==null&&cancelAnimationFrame(de),de=requestAnimationFrame(()=>Be(!1))};Me(),window.addEventListener("resize",Ve);const Xe=new MutationObserver(Me);Xe.observe(me,{childList:!0,subtree:!0,attributes:!0});const bt=setTimeout(()=>{xt.current||Be(!0)},400);return()=>{window.removeEventListener("resize",Ve),We!==null&&cancelAnimationFrame(We),Y!==null&&clearTimeout(Y),de!==null&&cancelAnimationFrame(de),clearTimeout(bt);try{Xe.disconnect()}catch{}}},[Ae]);const on=o.useCallback(me=>{Ae.current&&(Ae.current._childOnNext=me)},[]),ht=o.useCallback(me=>{Ae.current&&(Ae.current._childOnResult=me)},[]),Ke=o.useRef(new Map),Ct=(me,je)=>`${me}\0${je}`,Bt=o.useCallback((me,je,We)=>{gt(Y=>{const de=Y.answersByPage[me]||{},Be=de[je],Me=qs(We),Ve=qs(Be);if(Be&&Ve>Me)return Y;const Xe=Nd(We,Ke.current.get(Ct(me,je)),Me);return{...Y,answersByPage:{...Y.answersByPage,[me]:{...de,[je]:Xe}}}})},[gt]),X=o.useCallback((me,je,We)=>{const Y=Qa(fe,tt),de=eo(me,je);Bt(Y,de,We)},[fe,tt,Bt]),Ce=o.useCallback((me,je,We)=>{const Y=Qa(fe,tt),de=eo(me,je);Bt(Y,de,We),!We?.allowChange&&me?.autoAdvance!==!1&&gt(Be=>({...Be,stepIndex:Math.max(Be.stepIndex,je+1)}))},[fe,tt,Bt,gt]),Ge=o.useCallback((me,je)=>{const We=et?.id||`children-page-${tt??0}`,Y=typeof je=="number"?je:ze??0,de=`step-${Y}`;Bt(We,de,me),me?.allowChange||gt(Be=>({...Be,stepIndex:Math.max(Be.stepIndex,Y+1)}))},[et,tt,ze,Bt,gt]),Ze=o.useCallback((me,je)=>{const We=et?.id||`children-page-${tt??0}`,Y=`step-${typeof je=="number"?je:ze??0}`;Bt(We,Y,me)},[et,tt,ze,Bt]),at=D?{currentPageIndex:tt??0,currentStepIndex:ze??0,totalStepsInPage:wt.length,handleStepDone:Ge,handleStepChange:Ze}:null,mt=async()=>{const me=typeof n?.buildResults=="function"?await Promise.resolve(n.buildResults({scenario:n,pages:L,flowState:_t,answersByPage:_t.answersByPage})):null;return typeof z=="function"&&await Promise.resolve(z(me))||me},Dt=async()=>{const me=et?.id||`children-page-${_t.pageIndex}`,je=_t.answersByPage[me]||{},We=P?(()=>{const Be={};let Me=0;return R.forEach(Ve=>{const Xe=_t.answersByPage[Ve.id]||{},bt=Array.isArray(Ve.steps)?Ve.steps.length:0;for(let ft=0;ft<bt;ft+=1){const be=Xe[`step-${ft}`];typeof be<"u"&&(Be[`step-${Me+ft}`]=be)}Me+=bt}),Be})():je;if(typeof N=="function"){const Be=await Promise.resolve(N(We,{pageAnswers:je,answersByPage:_t.answersByPage,pages:R,currentPageId:me}));return typeof z=="function"&&await Promise.resolve(z(Be))||Be}const Y=Object.entries(je).map(([Be,Me],Ve)=>({index:Ve,key:Be,payload:Me})),de={results:Y,answers:Y,score:0};return typeof z=="function"&&await Promise.resolve(z(de))||de},Lt=()=>{const me=++Ot.current,je=()=>me!==Ot.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(W){const de=mt();st(Kn);const Be=de;Promise.resolve(Be).then(Me=>{je()||st(Me||{isEmpty:!0})}).catch(Me=>{!je()&&st({isEmpty:!0})});return}if(D){const de=Dt();st(Kn);const Be=de;Promise.resolve(Be).then(Me=>{je()||st(Me||{isEmpty:!0})}).catch(Me=>{!je()&&st({isEmpty:!0})});return}const We=Ae.current&&Ae.current._childOnResult,Y=de=>{try{return de?de():void 0}catch{return}};if(typeof We=="function"){const de=Y(We);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:On&&On.tagName.toUpperCase()==="SCRIPT"&&On.src||new URL("components.cjs.js",document.baseURI).href}catch{}de&&typeof de.then!="function"?st(de):st(de&&typeof de.then=="function"?Kn:{});const Be=()=>{je()||st(Me=>Me===Kn?{}:Me)};Promise.resolve(de).then(Me=>{Me&&!je()?st(Me):Be()}).catch(Me=>{Be()});return}if(typeof z=="function"){const de=Y(z);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:On&&On.tagName.toUpperCase()==="SCRIPT"&&On.src||new URL("components.cjs.js",document.baseURI).href}catch{}de&&typeof de.then!="function"?st(de):st(de&&typeof de.then=="function"?Kn:{});const Be=()=>{je()||st(Me=>Me===Kn?{}:Me)};Promise.resolve(de).then(Me=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:On&&On.tagName.toUpperCase()==="SCRIPT"&&On.src||new URL("components.cjs.js",document.baseURI).href}catch{}Me&&!je()?st(Me):Be()}).catch(Me=>{console.error("viewResults external handler failed",Me),Be()});return}},Dn=()=>{if(W){if(typeof tt=="number"&&typeof it=="number"&&tt<it-1){gt(je=>({...je,pageIndex:je.pageIndex+1,stepIndex:0}));return}return Lt()}if(D){const je=wt.length;if(typeof ze=="number"&&ze<je-1){gt(We=>({...We,stepIndex:We.stepIndex+1}));return}if(typeof tt=="number"&&typeof it=="number"&&tt<it-1){gt(We=>({...We,pageIndex:We.pageIndex+1,stepIndex:0}));return}return Lt()}if(typeof y=="function"){try{y()}catch{}return}const me=Ae.current&&Ae.current._childOnNext;if(typeof me=="function"){try{me()}catch{}return}},Zt=W?Q.title||Q.label||g||T("common.popup","\uD31D\uC5C5"):r||w||(Array.isArray(s)?s[s.length-1]:void 0)||g||T("common.popup","\uD31D\uC5C5"),Sn=g||Zt,cn=W?Q.title??Q.label??Zt:r??w??Zt,Xt=(me,je)=>{const We=Qa(fe,tt),Y=eo(me,je),de=_t.answersByPage[We]?.[Y],Be=Pw(me,{page:fe,pageIndex:tt,step:me,stepIndex:je,storedPayload:de,answersByPage:_t.answersByPage,flowState:_t}),Me={key:Y,index:je,stepIndex:ze,isLast:je===$e.length-1};switch(me?.type){case"listen":return t.jsx(Ws,{...Me,...Be,onDone:Ve=>Ce(me,je,Ve)});case"confirm":return t.jsx(Os,{...Me,...Be,onDone:Ve=>Ce(me,je,Ve),onChange:Ve=>X(me,je,Ve)});case"confirmWithText":return t.jsx(zs,{...Me,...Be,onDone:Ve=>Ce(me,je,Ve),onChange:Ve=>X(me,je,Ve)});case"orderList":return t.jsx(Hs,{...Me,...Be,onDone:Ve=>Ce(me,je,Ve),onChange:Ve=>X(me,je,Ve)});default:return null}},en=o.useRef(void 0);o.useEffect(()=>{const me=en.current;if(en.current=tt,me===void 0||me===tt||!Oa())return;const je=Ae.current;if(!je)return;const We=document.activeElement;if(!(!We||We===document.body||!je.contains(We)||We.disabled===!0))return;const Y=je.querySelector(`.training-steps ${$n.split(", ").join(", .training-steps ")}`)??Array.from(je.querySelectorAll($n)).find(de=>!de.closest('[aria-hidden="true"]'));try{Y?.focus()}catch{}},[tt]);const Cn=W?L.length>0?t.jsx("div",{className:"training-steps",children:$e.map((me,je)=>Xt(me,je))},`replay-${Ie}`):t.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:t.jsx("div",{className:"pp-empty",children:n?.emptyMessage||T("training.noQuestions","\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):null,tn=D?t.jsxs(jd.Provider,{value:at,children:[et?.pageTop?t.jsx("div",{className:"training-page-top",children:et.pageTop}):null,t.jsx("div",{className:"training-steps",children:wt.map((me,je)=>{const We=me;return o.cloneElement(We,{...We.props,_stepIndex:je,_totalSteps:wt.length,_stepKey:`step-${je}`,_pageIndex:tt})})},`replay-${Ie}`),et?.pageBottom?t.jsx("div",{className:"training-page-bottom",children:et.pageBottom}):null]}):null,$t=o.useRef(-1),kt=o.useCallback(()=>{if(!A)return;const me=lt,{results:je,correct:We,total:Y}=Ks(lt),de={correct:We,total:Y,attempt:pt.current.length+1,previousAttempts:[...pt.current]};if($t.current===Mt.current)return de;$t.current=Mt.current,rg({items:hg(je),category:Id.has(A)?"sentence":"word",trainingType:A,entryPoint:B??"sentence",itemRef:k??null,correct:We,total:Y,score:typeof me?.score=="number"?me.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-U.current)/1e3)),dailyTotal:E??null});try{x?.(de)}catch{}return de},[A,B,E,k,lt,x]);o.useEffect(()=>{!lt||lt===Kn||lt?.isEmpty||(Ks(lt).total??0)>0&&kt()},[lt,kt]);const qt=o.useCallback(()=>{const me=kt();Nt(),Qe(()=>{typeof C=="function"&&C(me),typeof m=="function"&&m()})},[C,m,kt,st,Qe]),Rt=o.useCallback(()=>zt(""),[zt]),Tn=o.useCallback(()=>{Qe(()=>{typeof m=="function"&&m()})},[m,Qe]),Mn=t.jsxs("div",{className:`page-popup${rt?" page-popup--closing":""}${V?" page-popup--inline":""}${V&&F!=null?" page-popup--has-height":""}`,role:V?"region":"dialog","aria-modal":V?void 0:"true","aria-label":Sn,style:V&&F!=null?{"--page-popup-inline-height":typeof F=="number"?`${F}px`:F}:void 0,children:[t.jsxs("div",{ref:Ae,className:`page-popup__panel ${ct?"":"page-popup__panel--measuring"} ${Oe==="center"?"page-popup__panel--center":Oe==="top"?"page-popup__panel--top":""}`,children:[t.jsx(Bd,{title:cn,subtitle:W?Q.subtitle||Q.label:Array.isArray(s)?s.join(" / "):void 0,desc:W?void 0:a,depth:W?Q.depth:s,icon:W?Q.icon:l,wrapperStyle:W?Q.wrapperStyle:i,iconTooltip:W?Q.iconTooltip:c,progressMax:it,progressIndex:tt,pageIndex:tt,pageCount:it,onBack:V?void 0:Tn,onClose:V?void 0:Tn}),t.jsx("div",{className:"page-popup__scroll",children:t.jsx("div",{className:`page-popup__content ${Oe==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:D?tn:W?Cn:typeof _=="function"?_({registerOnNext:on,registerOnResult:ht,panelRef:Ae,setResultOverlay:st}):_})}),t.jsx(wd,{onSettings:b,onNext:Dn,onResult:Lt,useNoiseSettingBtn:!!(W?Q.useNoiseSetting??!0:v),stepIndex:ze,stepCount:Re,pageIndex:tt,pageCount:it,resultOpen:!!(lt&&!lt.isEmpty),hideNoiseRows:$})]}),lt&&!lt.isEmpty&&(j??Ow)({score:lt.score,results:lt.results||lt.answers||[],contextsLength:lt.results?lt.results.length:lt.answers?lt.answers.length:0,onReplay:()=>{if(U.current=Date.now(),lt!==Kn){const{correct:me,total:je}=Ks(lt);pt.current.push({correct:me,total:je})}if(Nt(),ot(me=>me+1),W){if(gt(to()),typeof n?.onReplay=="function")try{n.onReplay()}catch{}return}if(D){gt(to());return}try{const me=Ae.current&&Ae.current._childOnResult;typeof me=="function"&&me({replay:!0})}catch{}},onClose:qt,pending:lt===Kn}),lt?.isEmpty&&t.jsx("div",{className:"page-popup page-popup--result-empty",role:"dialog","aria-modal":"true","aria-label":T("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC"),children:t.jsxs("div",{className:"page-popup__panel page-popup__panel--center",children:[t.jsx("div",{className:"page-popup__scroll",children:t.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:t.jsx("div",{className:"page-popup__empty",children:T("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")})})}),t.jsx("div",{className:"page-popup__bottom",children:t.jsx(ye,{htmlType:"button",variant:"main",size:48,onClick:qt,label:T("training.result.done","\uC644\uB8CC")})})]})}),t.jsx(Sr,{message:Ft,position:"top",onClose:Rt})]}),Fn=t.jsx($s.Provider,{value:we,children:Mn});return V?Fn:typeof document<"u"&&document.body?gn.createPortal(Fn,document.body):Fn}const rr=zw;rr.Page=Xa,rr.ListenStep=Dd,rr.ConfirmStep=Sd,rr.ConfirmWithTextStep=Td,rr.OrderListStep=Md,rr.CardStep=$d,rr.CardOrderStep=kw;function Ww(e=[]){const n=o.useRef(null),r=o.useCallback(s=>{const l=getComputedStyle(s),i=l.gridTemplateColumns.split(" ").filter(Boolean),c=parseFloat(i[0]??"0"),u=parseFloat(l.columnGap||"0")||0;if(!c||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<=c+.5)continue;const C=Math.min(i.length,Math.ceil((m+u)/(c+u)));C<=1||(h.style.gridColumn=`span ${C}`,h.setAttribute("data-wide",""))}},[]),a=o.useCallback(()=>{const s=n.current;if(s)for(const l of s.querySelectorAll(".word-search-result-block__items"))r(l)},[r]);return o.useLayoutEffect(()=>{a();const s=n.current;if(!s||typeof ResizeObserver>"u")return;const l=new ResizeObserver(()=>a());return l.observe(s),()=>l.disconnect()},[a,...e]),n}function Hw({label:e,homonum:n}){const r=_r()?.(e,n)??"",{imgRef:a,loading:s,hasImage:l,onLoad:i,onError:c}=Cs(r);return l?t.jsxs("div",{className:le("word-image-tooltip__cell"),children:[s&&t.jsx("div",{className:le("word-image-tooltip__spinner")}),t.jsx("img",{ref:a,src:r,alt:e,draggable:!1,style:{opacity:s?0:1},onLoad:i,onError:c})]}):t.jsx("div",{className:le("word-image-tooltip__cell word-image-tooltip__cell--text h3"),children:t.jsx("span",{children:e})})}function Od({words:e,anchorRect:n}){const r=o.useRef(null),[a,s]=o.useState(null);return o.useLayoutEffect(()=>{if(!n||!r.current)return;const{offsetWidth:l,offsetHeight:i}=r.current,c=window.innerWidth,u=window.innerHeight,p=8,h=n.top,d=u-n.bottom,m=h>=i+p*2||h>d,C=(b,v)=>Math.min(Math.max(p,b),Math.max(p,v)),x=C(n.left+n.width/2-l/2,c-l-p),y=C(m?n.top-i-p:n.bottom+p,u-i-p);s({left:x,top:y})},[n]),!n||e.length===0?null:gn.createPortal(t.jsx("div",{ref:r,className:le("word-image-tooltip"),style:{visibility:a?"visible":"hidden",left:a?.left??0,top:a?.top??-9999},children:t.jsx("div",{className:le("word-image-tooltip__cells"),children:e.map(l=>t.jsx(Hw,{label:l.label,homonum:l.homonum},`${l.label}_${l.homonum??1}`))})}),document.body)}function Vw({titleIcon:e,resultCount:n,resultUnit:r,searchQuery:a,items:s,groups:l,selected:i=[],onSelect:c,maxSelect:u,onClearSelection:p,onPrint:h,onPrintEmpty:d,className:m,emptyHint:C,showEmptyText:x=!0,sectionType:y="page",disc:b}){const v=_n()??mn,{t:_,i18n:g}=Ee.useTranslation(),w=g.language?.startsWith("ko")??!1,{anchorRect:N,openAt:f,close:A}=Ma(),[B,E]=o.useState(null),k=o.useCallback(()=>{A(),E(null)},[A]);C2(k,!!B);const j=(a??"").trim(),S=/^[^,[\]\s]+$/.test(j)?j:"",$=S.length>0,V=a===void 0&&n===void 0,F=$?"match":V?"original":"ganada",[U,T]=o.useState(()=>F),[z,W]=o.useState("50"),[ie,Q]=o.useState(1),[L,J]=o.useState($);L!==$&&(J($),T(F));const ee=U==="match"&&!$||U==="original"&&!V?F:U,q=o.useMemo(()=>[...$?[{value:"match",label:_("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...V?[{value:"original",label:_("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:_("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:_("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:_("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:_("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:_("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:_("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[_,$,V]),P=o.useMemo(()=>["10","25","50","100"].map(ve=>({value:ve,label:_("wordSearch.pageSize",{count:Number(ve),defaultValue:`${ve}\uAC1C\uC529 \uBCF4\uAE30`})})),[_]),R=ve=>ve.words?.[0],D=o.useMemo(()=>{const ve=[...S].length,xe=IC(S),we=new Map;return Ae=>{let Ie=we.get(Ae);return Ie===void 0&&(Ie=xe((Ae.words?.[0]?.label??"").slice(0,ve))?0:1,we.set(Ae,Ie)),Ie}},[S]),H=o.useCallback((ve,xe)=>{const we=ot=>R(ot)?.label??"",Ae=ot=>R(ot)?.syllables??[...we(ot)].length,Ie=ot=>(ot.words??[]).reduce((pt,Oe)=>{const Ue=parseInt(Oe.grade??"",10);return Number.isFinite(Ue)&&Ue<pt?Ue:pt},999);switch(ee){case"match":return D(ve)-D(xe)||vn(we(ve),we(xe));case"ganada":return vn(we(ve),we(xe));case"ganada_desc":return vn(we(xe),we(ve));case"syllable":return Ae(ve)-Ae(xe)||vn(we(ve),we(xe));case"syllable_desc":return Ae(xe)-Ae(ve)||vn(we(ve),we(xe));case"grade":return Ie(ve)-Ie(xe)||vn(we(ve),we(xe));case"grade_desc":return Ie(xe)-Ie(ve)||vn(we(ve),we(xe));default:return 0}},[ee,D]),ne=o.useMemo(()=>s.slice().sort(H),[s,H]),te=Number(z)||10,ue=o.useMemo(()=>(l??[]).flatMap(ve=>ve.items.slice().sort(H).map(xe=>({item:xe,label:ve.label}))),[l,H]),se=l?ue.length:ne.length,pe=Math.max(1,Math.ceil(se/te)),G=Math.min(ie,pe),K=o.useMemo(()=>ne.slice((G-1)*te,G*te),[ne,G,te]),O=o.useId(),I=o.useMemo(()=>{if(!l)return null;const ve=ue.slice((G-1)*te,G*te),xe=new Map;for(const{item:we,label:Ae}of ve)xe.has(Ae)||xe.set(Ae,[]),xe.get(Ae).push(we);return[...xe.entries()].map(([we,Ae])=>({label:we,items:Ae}))},[l,ue,G,te]);o.useEffect(()=>{Q(1)},[U,z,se,a]);const ae=se>0?t.jsxs("div",{className:"word-search-result-block__toolbar",children:[t.jsx(kn,{size:v,options:q,value:ee,onChange:T,ariaLabel:_("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),t.jsx(kn,{size:v,options:P,value:z,onChange:W,ariaLabel:_("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),t.jsx(rs,{page:G,totalPages:pe,onChange:Q})]}):void 0,he=ve=>{c&&c(ve)},re=n!==void 0&&r?t.jsxs(t.Fragment,{children:[_("wordSearch.resultTitlePrefix","\uCD1D "),t.jsx("span",{style:{color:"var(--color-main)"},children:n}),_("wordSearch.resultTitleSuffix",{unit:w?ZC(r):r})]}):void 0,_e=n!==void 0&&n>0&&u!==void 0&&r?_("wordSearch.resultDisc",{unit:w?JC(r):r,max:u,selected:i.length}):void 0,De=b??_e,Se=l?l.length===0:s.length===0,Ne=Ww([l,K,U,te,ie]),He=Se&&!x&&!C;return t.jsxs(Tr,{type:y,className:ke("word-search-result-block",m),children:[t.jsxs("div",{ref:Ne,className:ke("word-search-result-block__inner",He&&"word-search-result-block__inner--head-only"),children:[(re||ae||De)&&t.jsxs("div",{className:"word-search-result-block__head",children:[t.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&t.jsx(dt,{icon:e,className:"word-search-result-block__head-icon"}),re&&t.jsx("span",{className:"word-search-result-block__title h3",children:re})]}),ae&&t.jsx("div",{className:"word-search-result-block__head-actions",children:ae}),De&&t.jsx("div",{className:"word-search-result-block__head-disc body-3",children:De})]}),Se&&(x||C)&&t.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[x&&t.jsx("p",{className:"word-search-result-block__empty body-3",children:_("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),C&&t.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:C})]}),l?(I??[]).map(ve=>t.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${O}-${ve.label}`,children:[t.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${O}-${ve.label}`,children:ve.label}),t.jsx("div",{className:"word-search-result-block__items",children:ve.items.map(xe=>{const we=i.includes(xe.id);return t.jsx("div",{onMouseEnter:Ae=>{f(Ae.currentTarget),E(xe.words??[])},onMouseLeave:k,children:t.jsx(ye,{htmlType:"button",size:"word",align:"grid",label:(xe.words??[]).map(Ae=>Ae.label),subLabel:(xe.words??[]).some(Ae=>Ae.subLabel)?(xe.words??[]).map(Ae=>Ae.subLabel):void 0,selected:we,onClick:()=>he(xe.id),minWidth:200})},xe.id)})})]},ve.label)):t.jsx("div",{className:"word-search-result-block__items",children:K.map(ve=>{const xe=i.includes(ve.id);return t.jsx("div",{onMouseEnter:we=>{f(we.currentTarget),E(ve.words??[])},onMouseLeave:k,children:t.jsx(ye,{htmlType:"button",size:"word",align:"grid",label:(ve.words??[]).map(we=>we.label),subLabel:(ve.words??[]).some(we=>we.subLabel)?(ve.words??[]).map(we=>we.subLabel):void 0,selected:xe,onClick:()=>he(ve.id),minWidth:200})},ve.id)})}),B&&N&&t.jsx(Od,{words:B,anchorRect:N})]}),(p||h)&&t.jsxs("div",{className:"word-search-result-block__actions",children:[p&&t.jsx(ye,{htmlType:"button",size:"56",type:"bar",label:_("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:i.length===0,onClick:i.length===0?void 0:p}),h&&t.jsx("div",{onClick:i.length===0?d:void 0,children:t.jsx(ye,{htmlType:"button",size:"56",type:"bar",variant:"main",label:_("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:i.length===0,onClick:i.length===0?void 0:h})})]})]})}function qw(e,n){return n.map(r=>{const a=typeof r=="string"?r:r.label,s=typeof r=="string"?void 0:r.displayLabel;return{label:a,value:e[a]??"",displayLabel:s}})}function Uw({sections:e,selectedList:n,count:r,onCountChange:a,maxCount:s=4,minCount:l=1,combinationSections:i,combinationSectionsForSlot:c,onSelect:u,placeholder:p="-",className:h,title:d,titleIcon:m,disc:C,showInfoButton:x=!0,onClearPhoneme:y,onSearch:b,onSearchEmpty:v,searchDisabled:_=!1,searchLabel:g,searchChecking:w=!1,pairMode:N=!1,sectionType:f="page",beforeSearchContent:A,beforeContent:B,afterContent:E,hideCountControl:k=!1,ordinal:j=!1}){const{t:S}=Ee.useTranslation(),$=o.useMemo(()=>S("wordPairs.infoNotes",{returnObjects:!0}),[S]),V=o.useMemo(()=>Array.from({length:s-l+1},(P,R)=>{const D=l+R;return{key:String(D),label:S("wordPairs.count",{n:D})}}),[S,s,l]),F=o.useMemo(()=>S("wordPairs.ordinals",{returnObjects:!0}),[S]),U=o.useCallback(P=>j?S("wordPairs.phonemeOrdinalLabel",{ordinal:F[P-1]??P}):r===1?S("wordPairs.phonemeSingleLabel","\uC74C\uC808"):S("wordPairs.phonemeN",{n:P}),[j,F,r,S]),T=o.useCallback(P=>j?S("wordPairs.phonemeContrastOrdinalLabel",{ordinal:F[P-1]??P}):r===1?S("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):S("wordPairs.phonemeContrast",{n:P}),[j,F,r,S]),z=o.useCallback((P,R)=>R?t.jsxs(t.Fragment,{children:[P,t.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):P,[]),{anchorRect:W,toggleAt:ie,close:Q}=Ma(),L=o.useCallback(P=>a(Number(P)),[a]),J=wn("(max-width: 767px)"),ee=o.useCallback(P=>qw(P,e).map(({label:R,value:D,displayLabel:H})=>{const ne=!!D&&D!=="\uC5C6\uC74C";return t.jsxs("span",{className:ke("phoneme-select-block__cell-jamo-part",D?"":"phoneme-select-block__cell-jamo-part--empty",ne?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[t.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${D==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:D==="\uC5C6\uC74C"?"x":D||p}),ne&&t.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:H??R})]},R)}),[e,p]),q=t.jsxs(t.Fragment,{children:[t.jsx("div",{"data-tooltip-ignore":!0,children:t.jsx(ye,{htmlType:"button",size:40,type:J?"dot":void 0,icon:"info",label:J?void 0:S("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:S("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:W?"is-selected":void 0,"aria-expanded":!!W,"aria-haspopup":"dialog",onClick:P=>ie(P.currentTarget)})}),W&&t.jsx(Qn,{title:S("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:$,anchorRect:W,onClose:Q})]});return t.jsxs(Tr,{type:f,title:d,icon:m,disc:C,action:x?q:void 0,className:ke("phoneme-select-block",h),children:[B,!k&&t.jsx("div",{className:"phoneme-select-block__controls",children:t.jsx(Bn,{options:V,value:String(r),onChange:L,size:40,ariaLabel:S("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),t.jsx("div",{className:"phoneme-select-block__cells",children:N?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:r}).map((P,R)=>{const D=n[R*2]??{};return t.jsxs("div",{className:"phoneme-select-block__cell",children:[t.jsx("div",{className:"phoneme-select-block__cell-circle",children:t.jsx("div",{className:"phoneme-select-block__cell-jamo",children:ee(D)})}),t.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:U(R+1)})]},R)})}),t.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:S("wordPairs.phonemeSelect.vs","\uB300")}),t.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:r}).map((P,R)=>{const D=n[R*2+1]??{};return t.jsxs("div",{className:"phoneme-select-block__cell",children:[t.jsx("div",{className:"phoneme-select-block__cell-circle",children:t.jsx("div",{className:"phoneme-select-block__cell-jamo",children:ee(D)})}),t.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:T(R+1)})]},R)})})]}):n.map((P,R)=>t.jsxs("div",{className:"phoneme-select-block__cell",children:[t.jsx("div",{className:"phoneme-select-block__cell-circle",children:t.jsx("div",{className:"phoneme-select-block__cell-jamo",children:ee(P)})}),t.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:U(R+1)})]},R))}),(i||c)&&t.jsx("div",{className:"phoneme-select-block__panels",children:t.jsx("div",{className:"phoneme-select-block__detail",children:N?t.jsxs("div",{className:"phoneme-select-block__pair-panels",children:[t.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:r}).map((P,R)=>{const D=n[R*2]??{};return t.jsx(Gn,{title:z(U(R+1),R===0),sections:c?c(D,R*2):i,selected:D,onSelect:u?.(R*2),align:"newline"},R)})}),t.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:r}).map((P,R)=>{const D=n[R*2+1]??{};return t.jsx(Gn,{title:T(R+1),sections:c?c(D,R*2+1):i,selected:D,onSelect:u?.(R*2+1),align:"newline"},R)})})]}):n.map((P,R)=>t.jsx(Gn,{title:z(U(R+1),R===0),sections:c?c(P,R):i,selected:P,onSelect:u?.(R),align:"newline"},R))})}),A&&t.jsx("div",{className:"phoneme-select-block__before-search",children:A}),(y||b||w)&&(()=>{const P=n.every(R=>{const D=LC(R);return Object.entries(D).every(([H,ne])=>!ne||H==="coda"&&ne===ti)});return t.jsxs("div",{className:"phoneme-select-block__search-row",onClick:P?v:void 0,children:[y&&t.jsx(ye,{htmlType:"button",size:"56",type:"bar",label:S("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:P,onClick:P?void 0:y}),b?t.jsx(ye,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:w?t.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:g??S("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:P||_||w,onDisabledClick:w?()=>{}:void 0,"aria-busy":w||void 0,onClick:b}):w?t.jsxs("div",{className:"phoneme-select-block__checking","aria-busy":"true",children:[t.jsx("div",{className:"phoneme-select-block__spinner"}),t.jsx("span",{className:"button-1 phoneme-select-block__checking-label",children:g??S("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),E]})}function Gw({title:e,sections:n,selected:r,onSelect:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:c,headerSummary:u,headerAction:p,className:h}){const{t:d}=Ee.useTranslation();return t.jsx(Gn,{className:h,title:e??d("wordSearch.filterTitle","\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815"),sections:n,selected:r,onSelect:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:c,headerSummary:u,headerAction:p,align:"inline"})}function Kw({title:e,headerAction:n,sections:r,selected:a,onSelect:s,className:l}){const{t:i}=Ee.useTranslation();return r.length===0?null:t.jsx(Gn,{className:l,title:e??i("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:n,sections:r,selected:a,onSelect:s,align:"newline"})}function Yw({title:e,mode:n,onModeChange:r,matchMode:a,onMatchModeChange:s,positionCount:l,onPositionCountChange:i,inputMode:c,onInputModeChange:u,className:p}){const{t:h}=Ee.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=b=>h("wordPairs.count",{n:b}),C=[{label:d.searchMode,items:[d.include,d.pick,d.explicit],display:"segmented",labelAction:t.jsx(aa,{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:t.jsx(aa,{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:t.jsx(aa,{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.")]})}],x={[d.searchMode]:n==="explicit"?d.explicit:n==="pick"?d.pick:d.include,[d.phonemeOrder]:a==="ordered"?d.orderMatch:d.orderAny,[d.count]:m(l),[d.inputMode]:c==="phoneme"?d.pronInput:d.charInput},y=(b,v)=>{v===d.searchMode?r(b===d.explicit?"explicit":b===d.pick?"pick":"include"):v===d.phonemeOrder?s(b===d.orderMatch?"ordered":"unordered"):v===d.count?i(b===m(2)?2:1):v===d.inputMode&&u(b===d.pronInput?"phoneme":"word")};return t.jsx(Gn,{className:p,title:e??h("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:C,selected:x,onSelect:y,align:"inline"})}function Zw(e){const{title:n,items:r,columns:a,resizeStorageKey:s,gridTemplateColumns:l,mobileGridTemplateColumns:i,searchPlaceholder:c,searchFn:u,defaultSortKey:p,defaultSortAsc:h=!0,selectedId:d,selectedIds:m,onSelect:C,onClose:x,pageSizeOptions:y=[10,25,50,100],initialPageSize:b,emptyText:v,noMatchText:_,countLabel:g,topContent:w,className:N=""}=e,{t:f}=Ee.useTranslation(),A=c??f("common.search","\uAC80\uC0C9"),B=v??f("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),E=_??f("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[k,j]=o.useState(""),[S,$]=o.useState(p??a[0]?.key??""),[V,F]=o.useState(h),[U,T]=o.useState(String(b??y[0]??10)),[z,W]=o.useState(1);o.useEffect(()=>{W(1)},[k,U]);const ie=u!==null,Q=o.useCallback((te,ue)=>{if(!ue)return!0;const se=ue.toLowerCase();return a.some(pe=>{const G=te[pe.key];return G==null?!1:String(G).toLowerCase().includes(se)})},[a]),L=u??Q,J=o.useMemo(()=>{const te=ie?r.filter(ue=>L(ue,k)):r;return S?[...te].sort((ue,se)=>{const pe=ue[S],G=se[S];return pe===G?0:Ta(pe,G,V)}):te},[r,k,S,V,ie,L]),ee=Math.max(1,Math.ceil(J.length/Number(U)));z>ee&&W(ee);const q=Math.min(z,ee),P=J.slice((q-1)*Number(U),q*Number(U)),R=o.useCallback(te=>{S===te?F(ue=>!ue):($(te),F(!0)),W(1)},[S]),D=o.useMemo(()=>{if(typeof g=="function"){const te=J.length,ue=g(te);if(typeof ue=="string"){const se=ue.lastIndexOf(String(te));if(se>=0)return{prefix:ue.slice(0,se),suffix:ue.slice(se+String(te).length)}}return{label:ue}}if(typeof g=="string"&&g.includes("{n}")){const[te,ue]=g.split("{n}");return{prefix:te,suffix:ue}}return{prefix:f("common.totalCountPrefix","\uCD1D "),suffix:f("common.totalCountSuffix","\uAC1C")}},[g,J.length,f]),H=o.useMemo(()=>a.map(te=>({label:te.label,onClick:te.sortable!==!1?()=>R(te.key):void 0,className:te.className,sortDir:te.sortable!==!1&&S===te.key?V?"asc":"desc":null})),[a,S,V,R]),ne=o.useMemo(()=>y.map(te=>({value:String(te),label:f("common.pageSizeLabel",{n:te})})),[y,f]);return t.jsxs(qn,{className:`popup-list ${N}`,title:n,onClose:x,children:[w,"label"in D&&t.jsx("p",{className:"toolbar__count body-1",children:D.label}),t.jsx(as,{count:"label"in D?void 0:{value:J.length,prefix:D.prefix,suffix:D.suffix},search:ie?{value:k,onChange:j,placeholder:A}:void 0,pageSize:{options:ne,value:U,onChange:T},pagination:{page:q,total:ee,onChange:W}}),t.jsx(ms,{gridTemplateColumns:l,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:s,fields:H,items:P,onRowClick:C,renderRow:te=>{const ue=m!=null?te.id!=null&&m.has(te.id):d!=null&&te.id===d;return a.map(se=>({content:se.render?se.render(te):te[se.key]??"",className:ke(se.className,ue&&"popup-list__row--selected")}))},empty:ie&&k!==""&&r.length>0?E:B})]})}function zd(e){const{title:n,message:r,topContent:a,details:s,children:l,confirmLabel:i,cancelLabel:c,hideCancel:u=!1,extraAction:p,confirmVariant:h="main",confirmDisabled:d=!1,onConfirm:m,closeOnConfirm:C=!0,onClose:x,inline:y,size:b="small",className:v,initialFocus:_="close"}=e,{t:g}=Ee.useTranslation(),w=o.useRef(null);o.useEffect(()=>{if(y||_==="close")return;const k=w.current?.closest(".popup-panel"),j=Array.from(k?.querySelectorAll(".popup-footer--buttons button")??[]),S=_==="confirm"?j[j.length-1]:u?void 0:j[p?1:0];S&&!S.disabled&&S.focus()},[]);const N=o.useRef(!1),[f,A]=o.useState(!1),B=k=>{let j=!1;return{close:()=>{j=!0,k()},didClose:()=>j}},E=async k=>{if(N.current)return;N.current=!0;const j=typeof document<"u"?document.activeElement:null;A(!0);let S=!1;try{S=await k()}catch($){typeof console<"u"&&console.error($)}finally{S||(N.current=!1,A(!1),requestAnimationFrame(()=>{const $=document.activeElement;(!$||$===document.body)&&j?.isConnected&&j.focus()}))}};return t.jsxs(qn,{title:n,onClose:x,closeDisabled:f,inline:y,size:b,className:ke("confirm-popup",a!=null&&"confirm-popup--has-top",v),buttons:[...p?[{label:p.label,variant:p.variant??"default",disabled:p.disabled||f,onClick:async({closeWithAnimation:k})=>{await E(async()=>{const j=B(k);await p.onClick(j.close);const S=p.closeOnClick??!0;return S&&k(),S||j.didClose()})}}]:[],...u?[]:[{label:c??g("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:f,onClick:({closeWithAnimation:k})=>k()}],{label:i??g("common.confirm","\uD655\uC778"),variant:h,disabled:d||f,onClick:async({closeWithAnimation:k})=>{await E(async()=>{const j=B(k);return await m(j.close),C&&k(),C||j.didClose()})}}],children:[a!=null&&t.jsx("div",{className:"confirm-popup__top",children:a}),s&&s.length>0&&t.jsx(da,{children:s.map((k,j)=>t.jsx(fn,{label:k.label,children:t.jsx("span",{className:"panel-row__text body-2",children:k.value})},j))}),t.jsx("p",{ref:w,className:"body-2 confirm-popup__message",children:r}),l]})}function Xw(e,n,r={}){const{t:a}=Ee.useTranslation(),[s,l]=o.useState(!1),i=o.useRef(!1),c=o.useCallback(()=>{i.current=!0},[]),u=o.useCallback(()=>i.current?(i.current=!1,!0):e?(l(!0),!1):!0,[e]),p=s?t.jsx(zd,{title:r.title??a("common.discardConfirm.title","\uC785\uB825\uC744 \uCDE8\uC18C\uD560\uAE4C\uC694?"),message:r.message??a("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:r.confirmLabel??a("common.discardConfirm.confirm","\uC785\uB825 \uCDE8\uC18C"),confirmVariant:"danger",onConfirm:()=>{l(!1),n()},onClose:()=>l(!1)}):null;return{beforeClose:u,discardPopup:p,allowClose:c}}function Jw({onApply:e,onCancel:n}){const{t:r}=Ee.useTranslation(),[a,s]=o.useState(""),[l,i]=o.useState(!1),[c,u]=o.useState(null),p=o.useRef(null),h=o.useId();o.useEffect(()=>{p.current?.focus()},[]);const d=o.useCallback(async x=>{const y=a.trim();if(y){i(!0),u(null);try{await e(y),x()}catch(b){u(oi(b)),i(!1),requestAnimationFrame(()=>p.current?.focus())}}},[a,e]),m=o.useCallback((x,y)=>{x.key==="Enter"&&!x.nativeEvent.isComposing&&d(y)},[d]),C=x=>{s(x.target.value),u(null)};return t.jsx(qn,{className:"coupon-input-popup",title:r("usage.couponButton","\uCFE0\uD3F0 \uC785\uB825"),size:"small",onClose:n,closeDisabled:l,buttons:[{label:r("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:l,onClick:({closeWithAnimation:x})=>x()},{label:r("coupons.applyButton","\uC801\uC6A9"),variant:"main",disabled:!a.trim()||l,onClick:({closeWithAnimation:x})=>{d(x)}}],children:({closeWithAnimation:x})=>t.jsxs(t.Fragment,{children:[t.jsx("input",{ref:p,className:"coupon-input-popup__input body-2","aria-label":r("coupons.input.label","\uCFE0\uD3F0 \uCF54\uB4DC"),"aria-invalid":c?!0:void 0,"aria-errormessage":c?h:void 0,"aria-describedby":c?h:void 0,placeholder:r("coupons.input.placeholder","\uCFE0\uD3F0 \uCF54\uB4DC \uC785\uB825"),value:a,onChange:C,onKeyDown:y=>m(y,x),disabled:l,autoComplete:"off",spellCheck:!1}),c&&t.jsx("p",{id:h,className:"coupon-input-popup__error caption-1",role:"alert",children:c})]})})}const Wd=["var(--color-main)","var(--color-sub)"],Qw=2e3;function e8(e,n){if(!n.startsWith("var("))return n;try{const r=n.slice(4,-1).trim();return getComputedStyle(e).getPropertyValue(r).trim()||null}catch{return null}}function Ys({active:e=!1,count:n=40,duration:r=2e3,strength:a=1,onComplete:s,trigger:l=0}){const i=o.useMemo(()=>{const y=Math.floor(n/2),b=n-y,v=(_,g)=>Array.from({length:_}).map((w,N)=>{const f=6+Math.random()*12,A=Math.round(Math.min(18,f*Math.min(1.5,1+a*.4))),B=Wd[Math.floor(Math.random()*Wd.length)],E=Math.random()*300,k=(360+Math.random()*260)*a*1.2,j=(g==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,S=Math.cos(j)*k,$=Math.sin(j)*k*1.35,V=Math.random()*720-360,F=(1200+Math.random()*3e3)*Math.min(1.6,1+a*.3),U=Math.random()>.7?"50%":"3px";return{id:`${g}-${N}`,side:g,size:A,color:B,delay:E,vx:S,vy:$,angularVel:V,life:F,borderRadius:U}});return[...v(y,"left"),...v(b,"right")]},[n,a]),c=o.useRef(null),u=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),C=()=>{if(typeof document>"u")return null;let y=document.querySelector("[data-ihab-effect-root]");return y||(y=document.createElement("div"),y.className="app-effect",y.dataset.ihabEffectRoot="",y.style.position="fixed",y.style.inset="0",y.style.pointerEvents="none",y.style.zIndex="99998",document.body.appendChild(y)),y};if(typeof document<"u"&&m.current==null&&(m.current=C()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const Q=setTimeout(()=>h.current?.(),0);return()=>clearTimeout(Q)}const y=1200,b=performance.now(),v=m.current&&m.current!==document.body?m.current.getBoundingClientRect():null,_=Math.max(60,(window.innerHeight||800)*.05),g=Q=>Math.max(40,(Q||window.innerWidth)*.02),w=v?.width||window.innerWidth||375,N=v?.height||window.innerHeight||812,f=Q=>{const L=[...Q].sort((J,ee)=>J-ee);return L[Math.floor(L.length/2)]||1},A=f(i.map(Q=>Math.abs(Q.vy))),B=f(i.map(Q=>Math.abs(Q.vx))),E=Math.sqrt(2*y*(N*.72+_))/A,k=A*E/y,j=w*.5/(B*k),S=(Q,L,J)=>Math.min(J,Math.max(L,Q)),$=S(E,.8,2.4),V=S(j,.7,2.2),F=r>0?r/Qw:1,U=i.map(Q=>({...Q,life:Q.life*F,vx:Q.vx*V,vy:Q.vy*$,startTime:b+Q.delay,ended:!1})),T=v?{x:v.left-g(v.width),y:v.top+v.height+_}:{x:-g(window.innerWidth),y:window.innerHeight+_},z=v?{x:v.left+v.width+g(v.width),y:v.top+v.height+_}:{x:window.innerWidth+g(window.innerWidth),y:window.innerHeight+_},W=Q=>{let L=!1;for(const J of U){const ee=u.current[J.id];if(!ee||!ee)continue;if(Q<J.startTime){ee.style.display="none",L=!0;continue}if(!J._inited){const pe=J.side==="left"?T.x:z.x,G=J.side==="left"?T.y:z.y;ee.style.left=`${pe}px`,ee.style.top=`${G}px`,ee.style.transform="translate3d(0px, 0px, 0)",ee.style.display="block",ee.style.zIndex="100000",typeof J.color=="string"&&J.color.startsWith("var(")&&(ee.style.background=e8(ee,J.color)??"#FF0060"),J._inited=!0}const q=(Q-J.startTime)/1e3;if(q<0)continue;const P=J.life/1e3;if(q>=P){ee.style.opacity="0",ee.style.display="none",J.ended=!0;continue}L=!0;const R=J.side==="left"?T.x:z.x,D=J.side==="left"?T.y:z.y,H=R+J.vx*q,ne=D+J.vy*q+.5*y*q*q,te=(J.angularVel||0)*q,ue=H-R,se=ne-D;ee.style.transform=`translate3d(${ue}px, ${se}px, 0) rotate(${te}deg)`,ee.style.opacity=`${Math.max(0,1-q/P)}`}L?p.current=requestAnimationFrame(W):h.current?.()};p.current=requestAnimationFrame(W);const ie=setTimeout(()=>{try{if((m.current?m.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const Q=document.createElement("div");Q.className="party-container",Q.style.position="fixed",Q.style.inset="0",Q.style.pointerEvents="none",Q.style.overflow="visible",Q.style.zIndex="2147483647";for(const L of i){const J=document.createElement("span");J.className=`confetti confetti--${L.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=`${L.size}px`,J.style.height=`${Math.max(4,L.size*.6)}px`,J.style.background=L.color,J.style.borderRadius=L.borderRadius,J.style.transform="translate3d(0,0,0)",J.style.opacity="0",Q.appendChild(J),u.current[L.id]=J}(document.body||m.current).appendChild(Q),d.current=Q}}catch{}},300);return()=>{if(p.current&&cancelAnimationFrame(p.current),clearTimeout(ie),d.current){try{d.current.remove()}catch{}d.current=null}}},[e,r,l,i]),!e)return null;const x=t.jsx("div",{className:"party-container",ref:c,children:i.map(y=>t.jsx("span",{"aria-hidden":!0,ref:b=>{u.current[y.id]=b},className:`confetti confetti--${y.side}`,style:{width:`${y.size}px`,height:`${Math.max(4,y.size*.6)}px`,background:y.color,borderRadius:y.borderRadius}},`${y.id}-${l}`))});return typeof document<"u"?gn.createPortal(x,m.current||document.body):x}const Zs=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function t8({trigger:e=0,active:n=!1}){const[r,a]=o.useState(null);o.useEffect(()=>{if(typeof window>"u")return;const l=i=>{const c=i.detail??{};a(u=>({n:(u?.n??0)+1,count:Zs(c.count),strength:Zs(c.strength),duration:Zs(c.duration)}))};return window.addEventListener("party:trigger",l),()=>window.removeEventListener("party:trigger",l)},[]);const s=o.useCallback(()=>a(null),[]);return t.jsxs(t.Fragment,{children:[t.jsx(Ys,{active:n,trigger:e}),r&&t.jsx(Ys,{active:!0,trigger:r.n,count:r.count,strength:r.strength,duration:r.duration,onComplete:s})]})}function n8({title:e,sub:n,rightAction:r,titleAction:a,badge:s,badgeVariant:l="default",documentTitle:i,onBack:c,backLabel:u,wrap:p=!1}){const{t:h}=Ee.useTranslation();n2(typeof e=="string"?e:i??null);const d=u??h("common.back","\uB4A4\uB85C");return t.jsxs("div",{className:p?"page-title page-title--wrap":"page-title",children:[t.jsxs("div",{className:"page-title__main",children:[t.jsxs("div",{className:"page-title__title-row",children:[c&&t.jsx(ye,{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:c}),t.jsx("h1",{className:"page-title__title h1",children:e}),s&&t.jsx("div",{className:"page-title__badge",children:t.jsx(un,{label:s,size:"small",variant:l,fill:"outline"})}),a?t.jsx("div",{className:"page-title__title-action",children:a}):null]}),n&&t.jsx("p",{className:"page-title__sub body-2",children:n})]}),r?t.jsx("div",{className:"page-title__action",children:r}):null]})}function r8(e){return e??""}const Hd=o.createContext({words:[],loading:!1});function a8(){return o.useContext(Hd)}function o8({words:e,loading:n,error:r,statusMessage:a,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:c,checkRemoteVersion:u,children:p}){const h=o.useMemo(()=>({words:e,loading:n,error:r,statusMessage:a,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:c,checkRemoteVersion:u}),[e,n,r,a,s,l,i,c,u]);return t.jsx(Hd.Provider,{value:h,children:p})}function s8({items:e,actions:n,columns:r,flat:a=!1,className:s,style:l}){const i=r??e.length;return t.jsx("section",{className:ke("summary-strip",a&&"summary-strip--flat",s),style:{"--summary-strip-cols":String(i),...l},children:t.jsxs("div",{className:"summary-strip__row",children:[t.jsx("div",{className:"summary-strip__items",children:e.map((c,u)=>t.jsxs("div",{className:"summary-strip__item",children:[t.jsx("p",{className:"summary-strip__label caption-1",children:c.label}),t.jsx("p",{className:"summary-strip__value body-3b",title:typeof c.value=="string"||typeof c.value=="number"?String(c.value):void 0,children:c.value})]},u))}),n&&t.jsx("div",{className:"summary-strip__actions",children:n})]})})}const l8=(e,n)=>`${e} / ${n}`;function i8({blocks:e,sectionTitles:n,logo:r,footer:a,pageLabel:s=l8,pageWidth:l,pageHeight:i,margin:c,className:u,style:p}){const{t:h}=Ee.useTranslation(),d=o.useRef(null),m=o.useRef(null),C=o.useRef(null),x=o.useRef(null),[y,b]=o.useState(null),[v,_]=o.useState(!1);o.useEffect(()=>{const F=d.current;if(!F)return;const U=()=>_(F.scrollWidth>F.clientWidth+1);if(U(),typeof ResizeObserver>"u")return;const T=new ResizeObserver(U);return T.observe(F),()=>T.disconnect()},[y]);const g=e.map(F=>`${F.id}\0${F.section??""}\0${F.group??""}`).join(""),w=y&&y.shape===g?y.pages:null,[N,f]=o.useState(0);o.useEffect(()=>{const F=x.current;if(!F||typeof ResizeObserver>"u")return;const U=new ResizeObserver(()=>f(F.offsetHeight));return U.observe(F),()=>U.disconnect()},[]);const[A,B]=o.useState(0);o.useEffect(()=>{const F=m.current;if(!F||typeof ResizeObserver>"u")return;let U=null;const T=typeof requestAnimationFrame=="function"?ie=>requestAnimationFrame(ie):ie=>setTimeout(ie,16),z=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:ie=>clearTimeout(ie),W=new ResizeObserver(()=>{U==null&&(U=T(()=>{U=null,B(ie=>ie+1)}))});return Array.from(F.children).forEach(ie=>W.observe(ie)),()=>{W.disconnect(),U!=null&&z(U)}},[g]),o.useLayoutEffect(()=>{const F=m.current,U=x.current;if(!F||!U)return;const T=P=>P.getBoundingClientRect().height||P.offsetHeight,z=new Map;C.current?.querySelectorAll("[data-chrome-section]").forEach(P=>{z.set(P.dataset.chromeSection??"",T(P))});const W=P=>T(U)-(z.get(P??"")??0),ie=Array.from(F.children).map(P=>T(P)),Q=[];e.forEach((P,R)=>{const D=Q[Q.length-1],H=D?e[D[0]]:void 0;H&&P.group!=null&&H.group===P.group&&H.section===P.section?D.push(R):Q.push([R])});const L=[];let J=[],ee=0;const q=()=>{J.length&&L.push(J),J=[],ee=0};Q.forEach(P=>{const R=P.reduce((H,ne)=>H+ie[ne],0),D=W(e[P[0]].section);J.length&&e[J[0]].section!==e[P[0]].section&&q(),R>D?P.forEach(H=>{J.length&&ee+ie[H]>D+.01&&q(),J.push(H),ee+=ie[H]}):(J.length&&ee+R>D+.01&&q(),P.forEach(H=>J.push(H)),ee+=R)}),q(),b(P=>P&&P.shape===g&&JSON.stringify(P.pages)===JSON.stringify(L)?P:{shape:g,pages:L})},[g,N,l,i,c,A]);const E=Jo,k=E,j=a??t.jsxs(t.Fragment,{children:[t.jsx("img",{src:k,alt:"IHAB",className:"report-doc__logo"}),"\xA9 IHAB, Inc. All rights reserved."]}),S=(F,U,T)=>({header:t.jsxs("div",{className:"report-doc__header",children:[t.jsx("h2",{className:"report-doc__title h3b",children:T!=null&&n?.[T]||null}),r]}),footer:t.jsxs("div",{className:"report-doc__footer caption-1",children:[t.jsx("span",{className:"report-doc__footer-left",children:j}),t.jsx("span",{className:"report-doc__page-no",children:s(F,U)})]})}),$=Array.from(new Set(e.map(F=>F.section??""))),V={...l?{"--report-page-w":l}:null,...i?{"--report-page-h":i}:null,...c?{"--report-margin":c}:null,...p};return t.jsxs("div",{ref:d,className:ke("report-doc",u),style:V,tabIndex:v?0:void 0,role:v?"group":void 0,"aria-label":v?h("report.previewRegion","\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30"):void 0,children:[t.jsxs("div",{className:"report-doc__measure","aria-hidden":!0,children:[t.jsx("div",{ref:x,className:"report-doc__ruler"}),t.jsx("div",{ref:C,children:$.map(F=>{const U=S(1,1,F||void 0);return t.jsxs("div",{"data-chrome-section":F,children:[U.header,U.footer]},F)})}),t.jsx("div",{ref:m,className:"report-doc__measure-blocks",children:e.map(F=>t.jsx("div",{children:F.content},F.id))})]}),w&&t.jsx("div",{className:"report-doc__pages",children:w.map((F,U)=>{const{header:T,footer:z}=S(U+1,w.length,e[F[0]].section);return t.jsxs("section",{className:"report-doc__page",children:[T,F.map(W=>t.jsx("div",{children:e[W].content},e[W].id)),z]},U)})})]})}function u8({title:e,fields:n,columns:r=4,className:a,style:s}){return t.jsxs("div",{className:ke("report-info",a),style:{"--report-info-cols":String(r),...s},children:[e&&t.jsx("p",{className:"report-info__title h5b",children:e}),t.jsx("div",{className:"report-info__grid",children:n.map((l,i)=>t.jsxs("div",{className:"report-info__field body-2",children:[t.jsx("span",{className:"report-info__label body-3",children:l.label}),t.jsx("span",{className:"report-info__value",children:l.value})]},i))})]})}const br=new Map;let no=null;const c8=12;function d8(e){for(let n=e.parentElement;n&&n!==document.body;n=n.parentElement){const r=window.getComputedStyle(n);if(r.transform&&r.transform!=="none"||r.filter&&r.filter!=="none"||r.perspective&&r.perspective!=="none"||/paint|layout|strict|content/.test(r.contain||""))return n}return document}function ro(){const e=new Map;for(const n of br.keys()){if(!n.isConnected)continue;const r=d8(n),a=e.get(r)??[];a.push(n),e.set(r,a)}for(const n of e.values()){n.sort((a,s)=>a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1);let r=0;for(const a of n){r>0?a.style.setProperty("--update-alert-stack-offset",`${r}px`):a.style.removeProperty("--update-alert-stack-offset");const s=a.getBoundingClientRect().height;s>0&&(r+=s+c8)}}}function p8(e){return typeof window>"u"?()=>{}:(br.set(e,(br.get(e)??0)+1),br.get(e)===1&&typeof ResizeObserver<"u"&&(no??(no=new ResizeObserver(()=>ro())),no.observe(e)),ro(),()=>{const n=(br.get(e)??1)-1;if(n>0){br.set(e,n),ro();return}br.delete(e),no?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),ro()})}function h8({title:e,message:n,actionLabel:r,onAction:a,icon:s,onClose:l,className:i=""}){const{t:c}=Ee.useTranslation(),u=r??c("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,C=m?p8(m):null;return()=>{C?.(),h.current&&d&&d.contains(document.activeElement)&&Na(d)}},[]),t.jsxs("div",{ref:p,className:ke("update-alert",i),role:"alert",children:[l&&t.jsx("button",{type:"button",className:"update-alert__close",onClick:()=>{h.current=!0,l()},"aria-label":c("common.close","\uB2EB\uAE30"),children:"\xD7"}),t.jsxs("div",{className:"update-alert__top",children:[t.jsx("div",{className:"update-alert__icon",children:s??t.jsx(cl,{size:20,strokeWidth:2})}),t.jsxs("div",{className:"update-alert__body",children:[t.jsx("div",{className:"update-alert__title h4",children:e}),t.jsx("div",{className:"update-alert__message body-3",children:n})]})]}),a&&t.jsx(ye,{htmlType:"button",size:32,variant:"main",shape:"pill",className:"update-alert__action",onClick:a,children:u})]})}function m8({title:e,titleLevel:n=3,description:r,topActions:a,children:s,footerLeft:l,footerRight:i,ariaLabel:c,onClick:u,draggable:p,onDragStart:h,onDragEnd:d,className:m}){const C=n?`h${n}`:"div",x=l!=null||i!=null,y=s!=null&&s!==!1,b=o.useCallback(v=>{u&&v.target===v.currentTarget&&(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),u())},[u]);return t.jsxs("div",{className:ke("training-card",u?"training-card--clickable":"",m),onClick:u,onKeyDown:u?b:void 0,role:u?"button":void 0,"aria-label":u?c??(typeof e=="string"?e:void 0):void 0,tabIndex:u?0:void 0,draggable:p,onDragStart:h,onDragEnd:d,children:[t.jsxs("div",{className:"training-card__header",children:[t.jsxs("div",{className:"training-card__title-row",children:[typeof e=="string"?t.jsx(C,{className:"training-card__title h4",children:e}):e,a!=null&&t.jsx("div",{className:"training-card__top-actions",onClick:v=>v.stopPropagation(),children:a})]}),r!=null?typeof r=="string"?t.jsx("p",{className:"training-card__description body-3",children:r}):r:t.jsx("p",{className:"training-card__description body-3","aria-hidden":"true",children:" "})]}),y&&t.jsx("div",{className:"training-card__body",children:s}),x&&t.jsxs("div",{className:"training-card__footer",children:[l!=null&&t.jsx("div",{className:"training-card__footer-left",children:l}),i!=null&&t.jsx("div",{className:"training-card__meta",children:i})]})]})}function f8({title:e,titleLevel:n=3,count:r,collapsed:a=!1,onToggle:s,beforeSort:l,sort:i,actions:c,empty:u=!1,emptyContent:p,dragOver:h=!1,onDragOver:d,onDragLeave:m,onDrop:C,children:x,className:y}){const{t:b}=Ee.useTranslation(),v=o.useId(),_=n?`h${n}`:"span",g=s!=null,w=ke("training-card-group",h&&"training-card-group--dragover",a&&"training-card-group--collapsed",g&&"training-card-group--collapsible",y);return t.jsxs("div",{className:w,onDragOver:d,onDragLeave:m,onDrop:C,role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?v:void 0,children:[t.jsxs("header",{className:"training-card-group__header",children:[g&&t.jsx(ye,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:a?"chevron-right":"chevron-down",ariaLabel:typeof e=="string"&&e?a?b("common.expandFor",{name:e}):b("common.collapseFor",{name:e}):a?b("common.expand","\uD3BC\uCE58\uAE30"):b("common.collapse","\uC811\uAE30"),className:"training-card-group__chevron","aria-expanded":!a,onClick:s}),typeof e=="string"?t.jsx(_,{id:v,className:"training-card-group__title h5b",children:e}):e,r!==void 0&&t.jsx("span",{className:"training-card-group__count body-3b",children:r}),(l!=null||i||c!=null)&&t.jsxs("span",{className:"training-card-group__actions",onClick:N=>N.stopPropagation(),children:[l,i&&t.jsx(kn,{size:40,options:i.options,value:i.value,placeholder:i.placeholder,onChange:i.onChange,ariaLabel:typeof e=="string"&&e?b("common.sortFor",{name:e}):void 0}),c]})]}),!a&&(u?t.jsx("div",{className:"training-card-group__empty body-3",children:p}):t.jsx("div",{className:"training-card-group__grid",children:x}))]})}const C8="speechear:saved_word_tables";function g8(e){if(typeof e!="object"||e===null)return!1;const n=e;return typeof n.id=="string"&&typeof n.name=="string"&&Array.isArray(n.items)}function b8(){try{const e=localStorage.getItem(C8);if(!e)return[];const n=JSON.parse(e);return Array.isArray(n)?n.filter(g8):[]}catch{return[]}}function Vd(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 Xs(e){return e.map(n=>n.homonum!=null?`${n.word}#${n.homonum}`:n.word).join("|")}function y8(e){const n=new Set;return e.map(r=>{let a=r.id;for(let s=2;n.has(a);s++)a=`${r.id}~${s}`;return n.add(a),a===r.id?r:{...r,id:a}})}function v8({title:e,titleIcon:n,disc:r,filterTitle:a,filterCollapsible:s,filterDefaultCollapsed:l,filterCollapsed:i,onFilterCollapsedChange:c,filterHeaderSummary:u,brand:p,code:h,baseItem:d,baseContentTypes:m,cellCapacity:C,maxItemsPerPage:x,items:y,onSaveComplete:b,onLoad:v,onRemoveItem:_,onCopyItem:g,onReplaceItem:w,onPickForm:N,onReset:f,resetLabel:A,saveButtonLabel:B,secondarySaveButtonLabel:E,onReorder:k,showCellCount:j,onAddItem:S,fillerAdd:$,className:V,renderSavePopup:F,renderWordSearch:U,hideControls:T,saveOnly:z,tableName:W,nameValue:ie,onNameChange:Q,descriptionValue:L,onDescriptionChange:J,namePlaceholder:ee,descriptionPlaceholder:q,existingNames:P,editingName:R,onCancel:D,initialItemsPerPage:H,onItemsPerPageChange:ne,renderCellAction:te,actionsLeftExtra:ue}){const{t:se}=Ee.useTranslation(),pe=A??se("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),G=y===void 0,K=!!Q,[O,I]=o.useState([]),ae=(ie??"").trim(),he=ae||(ee??"").trim(),re=(L??"").trim()||(q??"").trim(),_e=(P??[]).map(Te=>Te.trim().toLowerCase()),De=[R?.trim().toLowerCase(),...O].filter(Te=>!!Te),Se=[..._e];for(const Te of De){const Je=Se.indexOf(Te);Je!==-1&&Se.splice(Je,1)}const Ne=ae!==""&&Se.includes(ae.toLowerCase()),[He,ve]=o.useState(Array(4).fill(null)),[xe,we]=o.useState(4),[Ae,Ie]=o.useState(null),ot=He.slice(0,xe),pt=!!p?.show,[Oe,Ue]=o.useState(!0),[rt,ce]=o.useState(!0),Pe=p&&{...p,top:Oe,bottom:rt},[Ye,Qe]=o.useState("landscape"),[ut,vt]=o.useState([...Ic]),[ct,Gt]=o.useState("show"),[xt,lt]=o.useState(!0),[st,Ot]=o.useState(!0),Mt=o.useRef(null),Nt=o.useRef([]),[Ft,zt]=o.useState(H==="all"?Number.POSITIVE_INFINITY:H??8),[_t,gt]=o.useState("right"),[Et,It]=o.useState(!1),[et,wt]=o.useState(!1),{toastMessage:tt,toastType:fe,showWarning:$e,clearToast:Re}=du("warning"),ze=o.useCallback(()=>Ie(null),[Ie]);d&&G&&jt("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[it,on]=o.useState(()=>Math.max(y?.length??1,1)),ht=Math.max(C??0,y?.length??0,1),Ke=C!=null||!!j,Ct=G?xe:j?Math.max(it,y?.length??1,1):ht,{width:Bt,height:X}=hr[Ye],Ce=!G&&!j,Ge=Math.max(1,Math.min(ht,x??ht)),Ze=Math.min(Ft,Ge),at=Ce?Ze:Ct,mt=x!=null&&C!=null,Dt=mt?Math.max(1,Math.min(Ft,x)):Ze,Lt=o.useRef(ne);o.useEffect(()=>{Lt.current=ne}),o.useEffect(()=>{Ce&&Lt.current?.(Dt)},[Ce,Dt]);const Dn=Math.ceil((y?.length??0)/Math.max(1,at)),Zt=(y?.length??0)<ht?Math.floor((y?.length??0)/Math.max(1,at))+1:0,Sn=Ce?Math.max(1,Dn,Zt):0,cn=Ce?Array.from({length:Sn},(Te,Je)=>(y??[]).slice(Je*at,(Je+1)*at)):null,Xt=!!cn&&cn.length>1,en=G?ot.some(Te=>Te!==null&&Te.length>1):(y??[]).some(Te=>(Te.words??[]).length>1),Cn=W?.trim()||`${hi(Zr())} ${en?se("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):se("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,tn=o.useCallback(()=>Xt?Nt.current.filter(Te=>Te!==null):Mt.current?[Mt.current]:[],[Xt]),{print:$t,openNewWindow:kt,downloadHtml:qt}=js({getElements:tn,paperW:Bt,paperH:X,fileName:Cn,onPopupBlocked:()=>{$e(se("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."))}}),Rt=Te=>{we(Te),ve(Je=>Je.length>=Te?Je:[...Je,...Array(Te-Je.length).fill(null)]),Ie(null)},Tn=Te=>{ve(Je=>{const Tt=[...Je];return Tt[Te]=null,Tt}),Ae===Te&&Ie(null)},Mn=Te=>{if(Ae===null)return;const Je=Ae;ve(An=>{const In=[...An];return In[Je]=Te.length>0?Te:null,In});const Tt=ot.findIndex((An,In)=>In>Je&&An===null);Ie(Tt!==-1?Tt:null)},Fn=G?ot.some(Te=>Te?.some(Je=>!!Je.colloquialPronunciation)):(y??[]).some(Te=>(Te.words??[]).some(Je=>!!Je.colloquialLabel)),me=!G&&Oc([...d?[d]:[],...y??[]]),je=o.useMemo(()=>_r()?G?He.slice(0,xe).flatMap(Te=>(Te??[]).map(Je=>[Je.word,Je.homonum])):(Te=>Te.flatMap(Je=>(Je.words??[]).map(Tt=>[Tt.label,Tt.homonum])))([...d?[d]:[],...y??[]]):[],[G,He,xe,y,d]),[We,Y]=o.useState(!1);o.useEffect(()=>{if(je.length===0)return;let Te=!1;return Promise.all(je.map(([Je,Tt])=>Xl(Je,Tt))).then(Je=>{Te||Y(Je.some(Boolean))},()=>{}),()=>{Te=!0}},[je]);const de=je.length>0&&We,Be=o.useMemo(()=>[...G||j?[{label:se("wordTable.filter.columns","\uCE78 \uC218"),items:P4.map(Te=>({value:`${Te}\uCE78`,displayLabel:se("wordTable.filter.column",{count:Te})})),display:"segmented"}]:[],...Ce&&(y?.length??0)>0?[Kc(se,{hasPairs:en,itemCount:mt?x:ht,max:x})]:[],...Xt?[I4(se)]:[]],[se,G,j,Ce,y?.length,en,ht,x,Xt]),Me={...G||j?{[se("wordTable.filter.columns","\uCE78 \uC218")]:`${Ct}\uCE78`}:{},...Ce&&(y?.length??0)>0?{[se(en?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${Dt}\uAC1C`}:{},...Xt?{[se("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:_t}:{}},Ve=(Te,Je)=>{if(Je===se("wordTable.filter.columns","\uCE78 \uC218"))G?Rt(parseInt(Te)):on(parseInt(Te));else if(Je===se(en?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")){const Tt=parseInt(Te);zt(mt?Tt:Yc(Tt,ht))}else Je===se("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&gt(Zc(Te))},Xe=G?y8(ot.filter(Te=>Te!==null&&Te.length>0).map(Te=>({id:Xs(Te),words:Te.map(Vd)}))):y??[],bt=()=>{G&&ve(Te=>Te.length>xe?Te.slice(0,xe):Te)},ft=(Te=!1)=>{if(wt(Te),K&&b){const Je=he.trim().toLowerCase();Je&&I(Tt=>Tt.includes(Je)?Tt:[...Tt,Je]),b(he,Xe,re||void 0,Te),bt();return}if(z&&b){b("",Xe,void 0,Te),bt();return}if(b){It(!0);return}qt()},[be,M]=o.useState(!1),[Z,ge]=o.useState(""),Le=Z.trim(),qe=Le!==""&&_e.includes(Le.toLowerCase()),nt=()=>{ge(he?se("wordTable.save.copyName",{name:he,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),M(!0)},At=()=>{!Le||qe||!b||(b(Le,Xe,re||void 0,!0),bt(),M(!1))},St=Xe.length===0,nn=St||K&&(he===""||Ne),rn=()=>{if(St){$e(se("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(K&&he===""){$e(se("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}K&&Ne&&$e(se("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},Pr=t.jsx(Mr,{items:Xe,orientation:Ye,contentTypes:ut,baseItem:d,baseContentTypes:m,cutLine:ct,showOutline:xt,showDivLine:st,count:Ct});return t.jsxs(t.Fragment,{children:[t.jsxs(Tr,{type:"page",icon:n,title:e,disc:r,className:ke("word-table-block",V),children:[be&&t.jsx(qn,{size:"small",title:E??se("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>M(!1),footer:({closeWithAnimation:Te})=>t.jsxs(t.Fragment,{children:[t.jsx(ye,{htmlType:"button",size:48,type:"bar",label:se("common.cancel","\uCDE8\uC18C"),onClick:Te}),t.jsx(ye,{htmlType:"button",size:48,type:"bar",variant:"main",label:se("common.save","\uC800\uC7A5"),disabled:!Le||qe,onClick:At})]}),children:t.jsx(nr,{label:se("wordTable.save.nameLabel","\uC774\uB984"),value:Z,onChange:ge,placeholder:se("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:At,error:qe?se("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),Et&&b&&F?.({defaultName:typeof e=="string"?e:se("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:Pr,previewW:Bt,previewH:X,items:Xe,existingNames:b8().map(Te=>Te.name),saveAsNew:et,onSave:(Te,Je)=>{b(Te,Xe,Je,et),bt(),It(!1)},onCancel:()=>It(!1)}),(G||S)&&Ae!==null&&U?.({cellIndex:Ae,onConfirm:G?Mn:Te=>{if(S){const Je=Te[0];if(Je){const Tt=new Set((y??[]).map(In=>In.id));let An=Xs([Je]);for(let In=2;Tt.has(An);In++)An=`${Xs([Je])}~${In}`;S({id:An,words:[Vd(Je)]})}}Ie(null)},onClose:ze}),!T&&t.jsx(ks,{title:a,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:c,headerSummary:u,hasImage:de,hasColloquial:Fn,hasCaption:me,contentTypes:ut,orientation:Ye,showOutline:xt,cutLine:ct,showDivLine:st,setters:{setContentTypes:vt,setOrientation:Qe,setShowOutline:lt,setCutLine:Gt,setShowDivLine:Ot,setShowTopInfo:Ue,setShowBottomInfo:ce},showCutLine:(Ce?at:Ct)>1,showDivLine2:en,middleSections:Be,extraSelected:Me,onExtraSelect:Ve,showPaperBands:pt,showTopInfo:Oe,showBottomInfo:rt}),Xt&&cn?t.jsx("div",{className:"word-table-block__pages",children:cn.map((Te,Je)=>t.jsx(Mr,{orientation:Ye,contentTypes:ut,cutLine:ct,showOutline:xt,showDivLine:st,count:at,items:Te,baseItem:d,baseContentTypes:m,onRemoveItem:_,onCopyItem:g,onReplaceItem:w,onPickForm:N,onReorder:k&&((Tt,An)=>k(Tt+Je*at,An+Je*at)),indexOffset:Je*at,totalCount:y?.length??0,renderCellAction:te&&((Tt,An)=>te(Tt+Je*at,An)),showFillerAdd:!!S,fillerAdd:$,onActivateCell:S?(Tt=>Ie(Tt+Je*at)):void 0,addableCount:Ke?Math.max(0,Math.min(at,ht-Je*at)):void 0,brand:Pe,code:h,contentRef:Tt=>{Nt.current[Je]=Tt},pageNumber:{current:Je+1,total:cn.length},pageNumberPosition:_t},Je))}):t.jsx(Mr,{orientation:Ye,contentTypes:ut,cutLine:ct,showOutline:xt,showDivLine:st,count:at,items:G?void 0:y??[],baseItem:G?void 0:d,baseContentTypes:m,editCells:G?ot:void 0,activeCell:Ae,onActivateCell:G||S?Ie:void 0,onRemoveCell:G?Tn:void 0,onRemoveItem:G?void 0:_,onCopyItem:G?void 0:g,onReplaceItem:G?void 0:w,onPickForm:G?void 0:N,onReorder:G?void 0:k,addableCount:Ke?Ce?Math.min(at,ht):Ct:void 0,renderCellAction:G?void 0:te,brand:Pe,code:h,showFillerAdd:!!S,fillerAdd:$,contentRef:Mt}),!T&&!z&&ue!=null&&t.jsx("div",{className:"word-table-block__table-actions",children:ue}),K&&!T&&t.jsxs(da,{labelWidth:64,useBorder:!1,className:"word-table-block__meta",children:[t.jsx(fn,{variant:"custom",label:se("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:t.jsx(nr,{required:!0,value:ie??"",onChange:Q,placeholder:ee?ee+se("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):se("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:se("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:Ne?se("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:Te=>{(Te.key==="Tab"&&!Te.shiftKey||Te.key===" ")&&!(ie??"").trim()&&(ee??"").trim()&&(Te.preventDefault(),Q?.(ee??""))}})}),t.jsx(fn,{variant:"custom",label:se("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:t.jsx(nr,{value:L??"",onChange:J,placeholder:q?q+se("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):se("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:se("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:Te=>{(Te.key==="Tab"&&!Te.shiftKey||Te.key===" ")&&!(L??"").trim()&&(q??"").trim()&&(Te.preventDefault(),J?.(q??""))}})})]})]}),!T&&t.jsxs("div",{className:"word-table-block__actions",children:[t.jsxs("div",{className:"word-table-block__actions-left",children:[!z&&v&&t.jsx(ye,{htmlType:"button",size:40,type:"bar",label:se("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:v}),!z&&f&&t.jsx(ye,{htmlType:"button",size:40,type:"bar",label:pe,onClick:f}),!z&&t.jsx(ye,{htmlType:"button",size:40,type:"bar",label:se("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:kt})]}),t.jsxs("div",{className:"word-table-block__actions-right",children:[D&&t.jsx(ye,{htmlType:"button",size:"56",type:"bar",label:se("common.cancel","\uCDE8\uC18C"),onClick:D}),!z&&t.jsx(ye,{htmlType:"button",size:"56",type:"bar",label:se("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:$t}),E&&t.jsx(ye,{htmlType:"button",size:"56",type:"bar",label:E,onClick:()=>K?nt():ft(!0),disabled:St,onDisabledClick:()=>{$e(se("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."))}}),t.jsx(ye,{htmlType:"button",size:"56",type:"bar",variant:"main",label:B??se("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>ft(!1),disabled:nn,onDisabledClick:rn})]})]}),t.jsx(Sr,{message:tt,type:fe,onClose:Re})]})}const x8=8;function qd({items:e,className:n}){const{t:r}=Ee.useTranslation(),a=o.useRef(null),[s,l]=o.useState(null),i=o.useCallback(()=>l(a.current?.getBoundingClientRect()??null),[]),c=o.useCallback(()=>l(null),[]),u=Da(!!s,g=>{g?i():c()},a),p=e.length,h=p<=3?1:2,d=x8,m=p>d,C=e.slice(0,m?d-1:d),x=p-C.length,y=e.slice(C.length).map(g=>g.words?.length?g.words.map(w=>w.label).join(" / "):g.id),b=Math.min(5,Math.ceil(y.length/25)),v=Math.ceil(Math.min(p,d)/h)||1,_=h*v;return t.jsx("div",{className:ke("word-table-thumb",n),style:{gridTemplateColumns:`repeat(${h}, 1fr)`},children:Array.from({length:_},(g,w)=>{if(m&&w===d-1)return t.jsxs("div",{ref:a,className:"word-table-thumb__cell word-table-thumb__cell--more",tabIndex:0,"aria-label":r("wordTable.thumbMoreAria",{count:x,words:y.join(", "),defaultValue:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}"}),onPointerEnter:f=>{er(f)||i()},onPointerLeave:f=>{er(f)||c()},onFocus:()=>{ir()||i()},onBlur:c,onClick:f=>{f.stopPropagation(),u.touchPress()},children:[t.jsx("span",{className:"word-table-thumb__more body-3",children:r("wordTable.thumbMore",{count:x,defaultValue:"+{{count}}"})}),s&&y.length>0&&t.jsx(Qn,{anchorRect:s,items:y,showIndex:!1,closeOnOutsideClick:!1,columns:b})]},w);const N=C[w];return N?t.jsx("div",{className:"word-table-thumb__cell",children:(N.words?.length?N.words:[{label:N.id}]).map((f,A)=>t.jsxs(o.Fragment,{children:[A>0&&t.jsx("span",{className:"word-table-thumb__divider"}),t.jsx("span",{className:"word-table-thumb__word body-3",children:f.label})]},A))},w):t.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},w)})})}function _8({items:e,name:n,description:r,createdAt:a,code:s,published:l,publishedLabel:i,shared:c,sharedLabel:u,isNew:p,publisherName:h,publishedAt:d,likeCount:m,downloadCount:C,onPublisherClick:x,selected:y,onClick:b,onMore:v,titleNode:_,className:g}){const{t:w}=Ee.useTranslation(),N=_!=null,f=h!=null||d!=null||m!=null||C!=null,A=B=>{B.target===B.currentTarget&&!N&&(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),b?.())};return t.jsxs("div",{className:ke("word-table-button",y?"word-table-button--selected":"",f?"":"word-table-button--no-footer",g),role:"button",tabIndex:0,"aria-label":s?`${n} (${s})`:n,onClick:N?void 0:b,onKeyDown:A,children:[p&&t.jsx("span",{className:"word-table-button__new-dot","aria-label":w("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),t.jsx(qd,{items:e,className:"word-table-button__thumb"}),t.jsxs("div",{className:"word-table-button__info",children:[t.jsxs("div",{className:"word-table-button__info-text",children:[_??t.jsx("div",{className:"word-table-button__title h4",children:n}),r&&t.jsx("div",{className:"word-table-button__desc body-3",children:r})]}),v&&!N&&t.jsx(ye,{htmlType:"button",className:"word-table-button__more",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:w("common.moreFor",{name:n}),onClick:B=>{B.stopPropagation(),v(B)}})]}),(s||a||l||c)&&t.jsxs("div",{className:"word-table-button__meta-row",children:[t.jsx("span",{className:"word-table-button__meta-left",children:t.jsx("span",{className:"word-table-button__meta caption-1",children:a?pi(a,w):""})}),t.jsxs("span",{className:"word-table-button__meta-right",children:[(l||c)&&t.jsxs("span",{className:"word-table-button__badges",children:[l&&t.jsx(un,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:i??w("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),c&&t.jsx(un,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:u??w("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),s&&t.jsx("span",{className:"word-table-button__code caption-1",children:s})]})]}),f&&t.jsxs("div",{className:"word-table-button__footer",children:[t.jsxs("span",{className:"word-table-button__store-by",children:[h&&(x?t.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":w("wordTable.publisherFilter",{name:h,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:B=>{B.stopPropagation(),x()},children:h}):t.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:h})),d&&t.jsx("span",{className:"training-card__date body-4",children:pi(d,w)})]}),t.jsxs("span",{className:"word-table-button__store-stats",children:[m!=null&&t.jsx(un,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(m),"aria-label":w("common.likeCount",{count:m,defaultValue:`\uC88B\uC544\uC694 ${m}`})}),C!=null&&t.jsx(un,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(C),"aria-label":w("common.downloadCount",{count:C,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${C}`})})]})]})]})}/**
1049
+ `).map((i,u,c)=>t.jsxs(o.Fragment,{children:[i,u<c.length-1&&t.jsx("br",{})]},u))})}),t.jsxs("div",{className:"site-footer__links",children:[t.jsxs("div",{className:"site-footer__column",children:[t.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.site.title","\uC0AC\uC774\uD2B8")}),t.jsxs("ul",{children:[t.jsx("li",{children:t.jsx("a",{className:"footer-link",href:"https://www.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:"IHAB"})}),t.jsx("li",{children:t.jsx("a",{className:"footer-link",href:"https://speechear.ihab.co.kr/",target:"_blank",rel:"noopener noreferrer",children:l("footer.site.malgwi","\uB9D0\uADC0")})}),t.jsx("li",{children:t.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")})}),t.jsx("li",{children:t.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")})}),t.jsx("li",{children:t.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")})})]})]}),t.jsxs("div",{className:"site-footer__column",children:[t.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.sns.title","SNS")}),t.jsxs("ul",{children:[t.jsx("li",{children:t.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")})}),t.jsx("li",{children:t.jsx("a",{className:"footer-link",href:"https://www.instagram.com/ihab.official.yt/",target:"_blank",rel:"noopener noreferrer",children:"Instagram"})}),t.jsx("li",{children:t.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"})})]})]}),t.jsxs("div",{className:"site-footer__column",children:[t.jsx("div",{className:"site-footer__column-title footer-title",children:l("footer.policy.title","\uC815\uCC45")}),t.jsxs("ul",{children:[t.jsx("li",{children:t.jsx("a",{className:"footer-link",href:"#",onClick:i=>{e&&(i.preventDefault(),e())},children:l("footer.policy.terms","\uC774\uC6A9\uC57D\uAD00")})}),t.jsx("li",{children:t.jsx("a",{className:"footer-link",href:"#",onClick:i=>{n&&(i.preventDefault(),n())},children:l("footer.policy.privacy","\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68")})})]})]})]})]}),t.jsx("hr",{className:"site-footer__rule"}),t.jsxs("div",{className:"site-footer__bottom",children:[t.jsx("div",{className:"site-footer__brand",children:t.jsx("img",{src:Jo,alt:"IHAB",className:"site-footer__logo"})}),t.jsxs("div",{className:"site-footer__meta",children:[t.jsxs("div",{children:[t.jsx("span",{className:"footer-title",children:l("footer.ceo","\uB300\uD45C")})," ",t.jsx("span",{className:"footer-meta caption-1",children:l("footer.ceoName","\uD55C\uC9C0\uD61C")})]}),t.jsxs("div",{children:[t.jsx("span",{className:"footer-title",children:l("footer.address","\uC8FC\uC18C")})," ",t.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")})]}),t.jsxs("div",{children:[t.jsx("span",{className:"footer-title",children:l("footer.bizNo","\uC0AC\uC5C5\uC790\uB4F1\uB85D\uBC88\uD638")})," ",t.jsx("span",{className:"footer-meta caption-1",children:l("footer.bizNoValue","526-81-02926")})]}),t.jsxs("div",{children:[t.jsx("span",{className:"footer-title",children:l("footer.support","\uACE0\uAC1D\uC13C\uD130")})," ",t.jsxs("span",{className:"footer-meta caption-1",children:[r," \xA0 ",s]})]})]})]}),t.jsx("div",{className:"site-footer__copyright footer-copyright caption-1",children:"\xA9 IHAB, Inc. All rights reserved."})]})})}function x_({logo:e,logoAlt:n="",logoHref:a,links:r=[],actions:s,className:l,containerClassName:i,renderLink:u,menuLabel:c}){const{t:p}=Ee.useTranslation(),h=c??{open:p("header.menuOpen","\uBA54\uB274 \uC5F4\uAE30"),close:p("header.menuClose","\uBA54\uB274 \uB2EB\uAE30")},[d,f]=o.useState(!1),C=o.useId(),x=o.useRef(null);o.useEffect(()=>{if(!d)return;const v=la(()=>{const w=document.getElementById(C);w&&w.contains(document.activeElement)&&x.current?.focus(),f(!1)}),_=typeof window<"u"&&window.matchMedia?window.matchMedia("(min-width: 961px)"):null,g=w=>{w.matches&&f(!1)};return _&&(_.matches&&f(!1),_.addEventListener?.("change",g)),()=>{v(),_?.removeEventListener?.("change",g)}},[d,C]);const y=i?`${i} landing-header__inner`:"landing-header__inner",b=(v,_)=>u?u(v,{onClick:_}):t.jsx("a",{href:v.href,onClick:_,"aria-current":v.current?"page":void 0,children:v.label});return t.jsxs("header",{className:l?`landing-header ${l}`:"landing-header",children:[t.jsxs("div",{className:y,children:[e!=null&&(()=>{const v=typeof e=="string"?t.jsx("img",{src:e,alt:n,className:"landing-header__logo"}):e;return a?t.jsx("a",{href:a,className:"landing-header__brand",children:v}):t.jsx("div",{className:"landing-header__brand",children:v})})(),r.length>0&&t.jsx("nav",{className:"landing-header__links",children:r.map((v,_)=>t.jsx("span",{children:b(v)},`${_}:${v.href}`))}),t.jsxs("div",{className:"landing-header__actions",children:[s,r.length>0&&t.jsx("button",{ref:x,type:"button",onClick:()=>f(v=>!v),"aria-expanded":d,"aria-controls":C,"aria-label":d?h.close:h.open,className:d?"landing-header__toggle landing-header__toggle--open":"landing-header__toggle",children:t.jsxs("span",{className:"landing-header__burger",children:[t.jsx("span",{}),t.jsx("span",{}),t.jsx("span",{})]})})]})]}),r.length>0&&t.jsx("nav",{id:C,hidden:!d,className:"landing-header__drawer",children:t.jsx("div",{className:i??void 0,children:r.map((v,_)=>t.jsx("span",{className:"landing-header__drawer-item",children:b(v,()=>f(!1))},`${_}:${v.href}`))})})]})}function __({children:e,action:n,onClick:a,className:r}){const s=a?"bottom-sticky__inner bottom-sticky__inner--clickable":"bottom-sticky__inner";return t.jsx("div",{className:r?`bottom-sticky ${r}`:"bottom-sticky",children:t.jsxs("div",{className:s,onClick:a,...wc(a),children:[t.jsx("div",{className:"bottom-sticky__content",children:e}),n]})})}function w_({mountedRef:e}){const n=o.useRef({phase:"sound",at:0}),a=o.useRef(0),r=o.useRef(null),s=o.useRef(null),l=o.useCallback(()=>{const y=n.current,b=y.phase!=="sound"&&y.at>0;s.current=b?{phase:y.phase,elapsed:Math.max(0,Date.now()-y.at)}:null},[]),i=o.useCallback(()=>{const y=s.current;return s.current=null,y},[]),u=o.useCallback(()=>{a.current+=1,n.current={phase:"sound",at:0}},[]),c=o.useCallback((y,b,v=0)=>{if(!(y>0))return Promise.resolve(!0);const _=a.current;return n.current={phase:b,at:Date.now()-Math.max(0,v)},new Promise(g=>{const w=setTimeout(()=>{r.current===w&&(r.current=null),g(!!e.current&&_===a.current)},y);r.current=w})},[e]),p=o.useCallback(()=>{n.current={phase:"sound",at:Date.now()}},[]),h=o.useCallback(()=>{n.current={phase:"sound",at:0}},[]),d=o.useCallback(()=>{const y=n.current;return y.phase!=="sound"&&y.at>0},[]),f=o.useCallback(()=>a.current,[]),C=o.useCallback(y=>y===a.current,[]),x=o.useCallback(()=>{a.current+=1},[]);return o.useEffect(()=>()=>{r.current&&(clearTimeout(r.current),r.current=null)},[]),o.useMemo(()=>({positionRef:n,isRunning:d,generation:f,isCurrent:C,abort:u,waitPad:c,enterSound:p,leave:h,pause:l,resume:i,__bumpGenerationForTest:x}),[d,f,C,u,c,p,h,l,i,x])}const Ra=9,B_=e=>Math.round(Math.min(Ra,Math.max(0,e))/Ra*100),k_=e=>e/100*Ra,fr=2,ad=.1,A_=e=>Math.min(fr,Math.max(0,e)),N_=.1,E_=e=>Math.round(e*1e6)/1e6;function Cr(e){const{noiseRatio:n}=e;if(typeof n=="number"&&Number.isFinite(n))return A_(n);const a=Math.min(Ra,Math.max(0,Number(e.level)||0))/Ra,r=Number(e.mainVolume);return r>0?a>0?E_(Math.min(fr,Math.max(N_,a/r))):0:1}const rd=e=>Math.min(1,Math.max(0,Number(e.mainVolume)||0));function od(e){return rd(e)}function Ts(e){return rd(e)*Cr(e)}function Ms(e,n=mC()){const a=Number.isFinite(n)&&n>0?n:1;return Math.min(1,Ts(e)/a)}function ma(e,n){const a={...e,...n??{}};return n&&"level"in n&&typeof n.noiseRatio!="number"&&(a.noiseRatio=Cr({level:a.level,mainVolume:a.mainVolume})),a}const fa={enabled:!0,type:"defaultNoise",level:4.5,noiseRatio:1,speed:1,mainVolume:1,mainSpeed:1},$s=o.createContext(null);function qr(){return o.useContext($s)}const Ls=e=>`${hC()}/${e}`,sd=e=>Array.from({length:10},(n,a)=>Ls(`${e}-${String(a+1).padStart(2,"0")}.mp3`)),Ur={get defaultNoise(){return Ls("noise1.mp3")},get street(){return sd("noise2")},get restaurant(){return sd("noise3")},get buzz(){return Ls("noise4.mp3")}};function j_(e){const n=Math.floor(Math.random()*10);switch(e){case"defaultNoise":return Ur.defaultNoise;case"street":return Ur.street[n];case"restaurant":return Ur.restaurant[n];case"buzz":return Ur.buzz;default:return null}}function D_({noisePlayer:e,audioRef:n,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),f=o.useRef(0),C=o.useRef(null),x=o.useCallback(()=>!!r?.isRunning(),[r]),y=o.useCallback(()=>{d.current!==null&&(cancelAnimationFrame(d.current),d.current=null),C.current!==null&&(clearTimeout(C.current),C.current=null)},[]),b=o.useCallback((N,m=250)=>{const A=l.current;if(!A)return;const B=p.current;if(B){p.current=null;try{A.pause()}catch{}A.src=B,A.load()}if(!A.src)return;f.current+=1,y();try{wo(),vr(A).then(D=>{if(l.current===A)try{s.current?.("noise",D)}catch{}})}catch{}const j=A.paused?0:xr(A);A.paused&&Jn(A,0),A.play().catch(()=>{});const k=performance.now(),E=()=>{const D=Math.min(1,(performance.now()-k)/m);try{Jn(A,j+(N-j)*D)}catch{}D<1?d.current=requestAnimationFrame(E):d.current=null};d.current=requestAnimationFrame(E)},[y]),v=o.useCallback((N=250,m)=>{const A=l.current;if(!A||A.paused){m?.();return}const B=++f.current;y();const j=performance.now(),k=xr(A),E=()=>{const D=Math.min(1,(performance.now()-j)/N);try{Jn(A,k*(1-D))}catch{}if(D<1)d.current=requestAnimationFrame(E);else{d.current=null,C.current!==null&&(clearTimeout(C.current),C.current=null);try{A.pause()}catch{}m?.()}};d.current=requestAnimationFrame(E),C.current=setTimeout(()=>{if(C.current=null,f.current===B){d.current!==null&&(cancelAnimationFrame(d.current),d.current=null);try{A.paused||(Jn(A,0),A.pause(),m?.())}catch{}}},N+150)},[y]);o.useEffect(()=>{const N=document.createElement("audio");return N.loop=!0,N.crossOrigin="anonymous",l.current=N,()=>{y();try{N.pause(),N.removeAttribute("src"),N.load()}catch{}l.current=null,c.current=null,p.current=null}},[y]);const _=e?Ms(e.settings):0,g=!!e?.settings.enabled&&_>0;o.useEffect(()=>{if(!g)return;let N=0;const m=setInterval(()=>{const A=l.current;if(!A||A.paused){N=0;return}const B=n.current;if(B&&!B.paused&&!B.ended||x()||a.current==="playing"){N=0;return}N+=1,N>=2&&(N=0,v())},400);return()=>clearInterval(m)},[v,g,n,a,x]),o.useEffect(()=>{const N=()=>{const m=l.current;if(document.hidden){if(m&&!m.paused){y();try{m.pause()}catch{}}return}if(!m||!m.paused)return;const A=n.current,B=!!A&&!A.paused&&!A.ended||x()||a.current==="playing",j=h.current;B&&j?.enabled&&j.volume>0&&b(j.volume)};return document.addEventListener("visibilitychange",N),()=>document.removeEventListener("visibilitychange",N)},[y,b,n,a,x]),o.useEffect(()=>{h.current=e?{enabled:e.settings.enabled,volume:_,type:e.settings.type}:null},[e,e?.settings.enabled,_,e?.settings.type]);const w=o.useRef(null);return o.useEffect(()=>()=>{w.current?.(),w.current=null},[]),o.useEffect(()=>{const N=e?.settings,m=l.current;if(!m)return;const A=N?Ms(N):0;if(!N||!N.enabled||A===0){v();return}if(c.current!==N.type){const B=j_(N.type);B&&(c.current=N.type,u(B),p.current=B,v(150,()=>{if(p.current!==B)return;p.current=null,m.src=B,m.load();const j=n.current;if(j&&!j.paused||x()){w.current?.();const k=()=>{m.removeEventListener("canplay",k),w.current===E&&(w.current=null);const D=n.current,$=h.current;(D&&!D.paused&&!D.ended||x())&&$?.enabled&&$.volume>0&&b($.volume)},E=()=>m.removeEventListener("canplay",k);w.current=E,m.addEventListener("canplay",k)}}))}else{const B=n.current,j=!!B&&!B.paused&&!B.ended||x()||a.current==="playing";if(j&&p.current)b(A);else if(j&&m.paused&&m.src)b(A);else if(!m.paused)if(!j)v();else{y();const k=xr(m),E=performance.now(),D=()=>{const $=Math.min(1,(performance.now()-E)/150);try{Jn(m,k+(A-k)*$)}catch{}$<1?d.current=requestAnimationFrame(D):d.current=null};d.current=requestAnimationFrame(D)}}},[e?.settings,e?.settings.enabled,_,e?.settings.type,y,b,v,n,a,h,x]),o.useEffect(()=>{const N=l.current;if(N)try{N.playbackRate=Math.min(1.25,Math.max(.75,e?.settings.speed??1))}catch{}},[e?.settings.speed]),{noiseAudioRef:l,activeNoiseUrl:i,noiseSettingsRef:h,cancelNoiseFade:y,fadeInNoise:b,fadeOutNoise:v}}function S_({ttsText:e,playbackRate:n,mainVolume:a,fillRef:r,waveProgressRef:s,setProgress:l,setPlaybackState:i,setStateLocal:u,fadeInNoise:c,fadeOutNoise:p,noiseSettingsRef:h,onDoneRef:d,handleEndRef:f}){const C=o.useRef(null),x=o.useRef(0),y=o.useRef(null),b=o.useRef(0),v=o.useRef(!1);o.useEffect(()=>()=>{b.current++;try{if(y.current&&(cancelAnimationFrame(y.current),y.current=null),v.current&&window.speechSynthesis){try{window.speechSynthesis.cancel()}catch{}v.current=!1}}catch{}},[]);const _=(N,m=1)=>{try{const A=(N||"").trim().split(/\s+/).filter(Boolean).length||Math.max(1,(N||"").length);return Math.max(700,Math.round(A*300/Math.max(.25,m)))}catch{return 1200}},g=o.useCallback(N=>{if(typeof window>"u"||!window.speechSynthesis){try{typeof d.current=="function"&&d.current(!1)}catch{}return}const m=window.speechSynthesis,A=++b.current;try{try{m.cancel()}catch{}const B=N??e,j=Array.isArray(B)?B.filter(F=>!!F):[B||""];j.length===0&&j.push("");const k=Math.max(.3,Math.min(3,n));x.current=j.reduce((F,U)=>F+_(U,k||1),0),C.current=performance.now(),l(0),i("playing"),u("playMode");const E=h.current;E?.enabled&&(E?.volume??0)>0&&c(E.volume);const D=()=>{try{const F=C.current||performance.now(),U=performance.now()-F,T=x.current||1200,z=Math.min(1,U/T);try{r.current&&(r.current.style.left=`${z*100}%`),s.current&&s.current.style.setProperty("--progress",String(z))}catch{}z<1&&(y.current=requestAnimationFrame(D))}catch{}},$=()=>{if(A===b.current)try{y.current&&(cancelAnimationFrame(y.current),y.current=null),l(1),i("stopped");try{f.current?.()}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{}},V=F=>{const U=new SpeechSynthesisUtterance(j[F]);try{U.rate=k}catch{}try{U.volume=Math.max(0,Math.min(1,a))}catch{}U.onend=()=>{if(A===b.current){if(F<j.length-1){try{V(F+1)}catch{$()}return}$()}},U.onerror=()=>{$()},U.onstart=()=>{if(!(F>0))try{y.current&&(cancelAnimationFrame(y.current),y.current=null),y.current=requestAnimationFrame(D)}catch{}},v.current=!0,m.speak(U)};try{V(0)}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}}catch{try{typeof d.current=="function"&&d.current(!0)}catch{}}},[e,n,a,c,r,s,l,i,u,h,d,f]),w=o.useCallback(()=>{b.current++;try{if(window.speechSynthesis)try{window.speechSynthesis.cancel()}catch{}y.current&&(cancelAnimationFrame(y.current),y.current=null),p(),C.current=null}catch{}i("stopped"),u("active"),l(0)},[p,i,u,l]);return{startTTS:g,stopTTS:w}}const T_=.01,M_=.3;async function $_(e,n,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 C=Math.floor(M_*i.sampleRate),x=Math.min(u.length,C);for(;c<x&&Math.abs(u[c])<=T_;)c++;c>=x&&(c=0)}const p=u.length-c,h=a&&a>0?Math.min(p,Math.floor(a*i.sampleRate)):p,d=Math.max(n,h),f=Math.floor(d/n)||1;return new Array(n).fill(0).map((C,x)=>{const y=c+x*f,b=Math.min(y+f,c+d,u.length);let v=0;for(let _=y;_<b;_++){const g=Math.abs(u[_]);g>v&&(v=g)}return v})}catch{return null}finally{try{s?.close?.()}catch{}}}async function ld(e,n,a,r=!1){try{const s=await fetch(e);if(s.ok===!1)return null;const l=await s.arrayBuffer();return await $_(l,n,a,r)}catch(s){try{const l=oi(s)}catch{}return null}}const Rs=45,L_=74,R_=2;function Gr(e){const n=Math.min(2,Math.max(0,Number(e)||0));return n<=1?n*45:45+(n-1)*29}function Kr(e){return Gr(e)/45}const P_=e=>Math.max(0,(typeof e=="number"&&Number.isFinite(e)?e:0)*1e3),id=e=>Math.max(0,typeof e=="number"&&Number.isFinite(e)?e:0);function ud({durationsSec:e,leadInMs:n=0,tailMs:a=0}){const r=id(n),s=id(a),l=[];let i=0;return e.forEach((u,c)=>{for(const[p,h]of[["lead",r],["sound",P_(u)],["tail",s]])l.push({kind:p,track:c,startMs:i,durMs:h}),i+=h}),{segments:l,totalMs:i,trackCount:e.length}}function cd(e,n){const a=(n|0)*3;if(n<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 F_(e,n){const a=cd(e,n.track);if(!a||!(a.totalMs>0))return 0;const r=a[n.kind],s=Math.min(Math.max(0,Number.isFinite(n.elapsedMs)?n.elapsedMs:0),r.durMs);return Math.max(0,Math.min(1,(r.startMs-a.lead.startMs+s)/a.totalMs))}function I_(e,n,a){const r=Math.max(0,Math.floor(a)),s=cd(e,n);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 O_({currentTime:e,sources:n,index:a,audioDuration:r}){const s=a||0,l=Array.isArray(n)&&n.length>0?n[s]:void 0,i=l?l.duration||r||0:r||0;if(!(i>0))return 0;const u=Number.isFinite(e)?e:0;return Math.max(0,Math.min(1,u/i))}function z_({phase:e,phaseElapsedMs:n,currentTime:a,trackDurationSec:r,leadInMs:s,tailMs:l}){const i=ud({durationsSec:[r],leadInMs:s,tailMs:l});return F_(i,{track:0,kind:e,elapsedMs:e==="sound"?(Number.isFinite(a)?a:0)*1e3:n})}function W_({bars:e,trackDurationSec:n,leadInMs:a,tailMs:r}){return I_(ud({durationsSec:[n],leadInMs:a,tailMs:r}),0,e)}function H_(e,n){if(!Array.isArray(e))return null;const a=n||0;return a<e.length-1?a+1:null}function V_({ended:e,completedByEnd:n}){return!!e||!!n}function q_(e){return e.map((n,a)=>({src:n.src,label:String(a+1),color:void 0,duration:n.duration||0}))}function U_(e){return e.reduce((n,a)=>n+(a.duration||0),0)}function G_(e,n,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,n);u&&s.push({code:i,resolvedPath:u})}}return s}function K_(e,n){if(!n||e.readyState<1)return!0;const a=e.currentSrc||e.src;return a?dd(a)!==dd(n):!0}function dd(e){try{return new URL(e,typeof location>"u"?"http://localhost/":location.href).href}catch{return e}}const pd=4,Y_=Kr(pd/Rs);function Z_(e){const{src:n,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:f=0,tailMs:C=0,trackDurationSec:x=0}=e,y=o.useRef(null),b=o.useRef(null),[v,_]=o.useState(null),[g,w]=o.useState(!1),[N,m]=o.useState(null),[A,B]=o.useState(2),[j,k]=o.useState(0),[E,D]=o.useState(null),[$,V]=o.useState(!1),[F,U]=o.useState(!1),T=3,z=3,W=1,ie=300,Q=o.useRef(0),L=o.useCallback(()=>{const he=y.current,ae=b&&b.current?b.current:he?he.closest(".audio-player__wave"):null,_e=ae?ae.getBoundingClientRect():he?he.getBoundingClientRect():null,De=_e?_e.width:0,Se=_e?Math.max(100,_e.width):320,Ne=_e?_e.height:0,He=Math.max(W,Math.min(ie,Math.floor((Se+z)/(T+z)))),ve=He*T,xe=Math.max(0,He-1),we=Math.max(0,xe>0?(Se-ve)/xe:z);return{bars:He,gap:we,height:Ne,width:De}},[]),J=o.useRef(void 0),ee=o.useRef(null),q=o.useCallback(async(he,ae,{quiet:_e=!1}={})=>{const De=++Q.current,Se=()=>Q.current===De;try{if(_e||w(!1),J.current=he,!he){Se()&&_(null);return}let Ne=ae;if(!Ne)try{for(let xe=0;xe<4&&!(y.current||b.current);xe++)await new Promise(we=>requestAnimationFrame(we));await new Promise(xe=>requestAnimationFrame(xe));const ve=L();ve.height>0&&k(ve.height),Ne=ve.bars,B(ve.gap)}catch{Ne=120}ee.current=Ne;const He=await ld(he,Ne);if(!Se())return;if(!He){_(null),w(!1);return}_(He),m(Ne),w(!0)}catch{if(!Se())return;_(null),w(!1)}},[w,_,k,B,m,L]);o.useEffect(()=>{const he=b.current;if(!he||typeof ResizeObserver>"u")return;let ae=null;const _e=new ResizeObserver(()=>{ae!==null&&cancelAnimationFrame(ae),ae=requestAnimationFrame(()=>{ae=null;try{const De=L();if(De.width<=0||(De.height>0&&k(De.height),ee.current===null||De.bars===ee.current))return;const Se=J.current;B(De.gap),Se?q(Se,De.bars,{quiet:!0}).catch(()=>{}):ee.current=De.bars}catch{}})});return _e.observe(he),()=>{_e.disconnect(),ae!==null&&cancelAnimationFrame(ae)}},[L,q]),o.useEffect(()=>{const he=a&&a[0]&&a[0].src||n||a&&a.length===1&&a[0]&&a[0].src;q(typeof he=="string"?he:void 0).catch(()=>{}),U(!1)},[n,a,q]),o.useEffect(()=>{let he=!1;if(V(!1),D(null),!l||!N)return;const ae=c>0?c*(u||1):void 0;return ld(l,N,ae,!0).then(_e=>{he||(D(_e),_e||V(!0))}).catch(()=>{he||(D(null),V(!0))}),()=>{he=!0}},[l,N,c,u]);const P=Math.max(0,Math.min(1,p)),R=o.useMemo(()=>v&&v.length&&Math.max(...v)||1,[v]),S=N||40,H=o.useMemo(()=>W_({bars:S,trackDurationSec:x,leadInMs:f,tailMs:C}),[S,x,f,C]),ne=o.useMemo(()=>Array.from({length:S}).map((he,ae)=>{const _e=ae>=H.lead&&ae<H.lead+H.sound,De=H.sound>0&&_e?Math.min(S-1,Math.round((ae-H.lead)/H.sound*S)):-1,Se=_e?v&&v[De]!=null?v[De]:null:v?0:null,Ne=Se==null?null:Math.min(1,Se/R*P),He=Ne!=null&&j>0&&Gr(Ne)<=pd,ve=Ne==null?.15:He?0:Kr(Ne),xe=He,we=S>1?ae/(S-1):0;return t.jsx("div",{className:xe?"audio-player__bar audio-player__bar--hidden":"audio-player__bar",style:{"--val":ve,"--i":ae,"--mix":we}},ae)}),[S,v,R,P,j,H]),te={"--progress":String(Math.max(0,Math.min(1,r)))},ue=o.useMemo(()=>E&&E.length&&Math.max(...E.map(he=>Number.isFinite(he)?Math.abs(he):0))||1,[E]),se=P*Math.max(0,i),pe=!l||!E||!E.length?1:Math.max(1,se),G={"--bar-gap":`${A}px`,"--wave-h":`${Gr(pe)}px`,"--wave-h1":`${Rs}px`},K=g&&(l?!!E||$:!0);o.useEffect(()=>{K&&U(!0)},[K]);const O=F?g:K;o.useEffect(()=>{h?.(O)},[O,h]);const I=N||40,re=o.useMemo(()=>Array.from({length:I}).map((he,ae)=>{const _e=E&&E[ae]!=null?E[ae]:null,De=_e==null?0:Math.abs(_e)/ue*se,Se=Math.max(Y_,Kr(De)),Ne=I>1?ae/(I-1):0;return t.jsx("div",{className:"audio-player__bar",style:{"--val":Se,"--i":ae,"--mix":Ne}},ae)}),[I,E,ue,se,j]);return t.jsxs("div",{className:"audio-player__wave",ref:b,style:G,children:[l&&t.jsx("div",{className:`audio-player__wave-noise ${K?"is-ready":""}`,"aria-hidden":"true",children:re}),d&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:`audio-player__wave-inner audio-player__wave-unplayed ${O?"is-ready":""}`,ref:y,children:ne}),t.jsx("div",{className:`audio-player__wave-inner audio-player__wave-played ${O?"is-ready":""}`,ref:s,style:te,children:ne})]})]})}const hd={idle:!1,synthesizing:!0,resolving:!0,checking_exists:!0,getting_signed_url:!0,downloading:!0,measuring_duration:!0,ready:!1,error:!0};function Ps(e,n){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(),n.rejectOnError?r(new Error(p)):a(0))};s.addEventListener("loadedmetadata",u),s.addEventListener("error",()=>c("audio load failed")),setTimeout(()=>c("audio load timeout"),n.timeoutMs),s.src=e})}const X_=2e3;function md(e,n=X_){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,n)})}function J_({showSoundWaveForm:e,showNoiseWaveForm:n,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&&!n||r.current?Promise.resolve(!0):new Promise(c=>{const p=d=>{clearTimeout(h),s.current=s.current.filter(f=>f!==p),c(d)},h=setTimeout(()=>p(!0),a);s.current.push(p)}),[e,n,a]);return o.useEffect(()=>()=>{const c=s.current;s.current=[];for(const p of c)p(!1)},[]),{onReadyChange:l,waitForReady:u,markNotReady:i}}function Q_(){const e=o.useRef([]),n=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:n,keepOnly:a,revokeAll:r}}function ew({offsetY:e=8}={}){const n=o.useRef(null),[a,r]=o.useState(null),s=o.useCallback(()=>r(null),[]),l=o.useCallback(()=>{try{const i=n.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:n,rect:a,show:l,hide:s}}function tw(e){if(!e)return 0;const n=e.duration;if(Number.isFinite(n)&&n>0)return n;if(n===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 nw=400,aw=2e3,fd=5;function rw({audioRef:e,fillRef:n,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)},[]),f=o.useCallback(()=>{if(c.current!==null)return;let x=0;const y=()=>{if(Yn){const b=typeof performance<"u"&&performance.now?performance.now():Date.now();if(x>0&&b-x>nw){const v=h.current===null||b-h.current>aw;if(h.current=b,v&&p.current<fd){p.current+=1;const _=p.current;let g=null;try{g=typeof document<"u"?document.visibilityState:null}catch{}jt(`progress-ticker-slow-frames#${_}`,`[ihab-core] \uC9C4\uD589 \uC0AC\uC2AC\uC758 \uD2C0 \uC0AC\uC774\uAC00 ${Math.round(b-x)}ms \uC785\uB2C8\uB2E4(\uBCF4\uD1B5 16ms).`,g==="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.",_>=fd?`(${_}\uBC88\uC9F8 \u2014 \uB354\uB294 \uC548 \uC54C\uB9BD\uB2C8\uB2E4)`:`(${_}\uBC88\uC9F8)`)}}x=b}try{const b=e.current,v=Array.isArray(r.current)?r.current[s.current||0]:void 0,_=!!v&&Number.isFinite(v.duration)&&(v.duration??0)>0,g=_?0:tw(b),w=n.current,N=(i||0)>0||(u||0)>0,m=N&&(l?.positionRef.current?.phase??"sound")!=="sound";if(g===null&&!m)try{w&&w.style.visibility!=="hidden"&&(w.style.visibility="hidden")}catch{}else{const A=_?v.duration:g||0;Yn&&m&&!(A>0)&&jt("progress-ticker-pad-without-duration","[ihab-core] \uB738\uC774 \uB3C4\uB294\uB370 **\uC18C\uB9AC \uAE38\uC774\uB97C \uBAA8\uB985\uB2C8\uB2E4** \u2014 \uC7AC\uC0DD\uBC14\uAC00 \uB738\uB9CC\uC73C\uB85C \uC5B4\uB9BC\uC7A1\uC544 \uC6C0\uC9C1\uC785\uB2C8\uB2E4.","\uC18C\uB9AC \uAE38\uC774 \uC7AC\uAE30(measureAudioDuration)\uAC00 0 \uC744 \uC92C\uAC70\uB098 `<audio>` \uAC00 \uC544\uC9C1 \uC548 \uC2E4\uB838\uC2B5\uB2C8\uB2E4. \uAE38\uC774\uB97C \uC54C\uAC8C \uB418\uBA74 \uB9C8\uCEE4\uAC00 \uADF8 \uC21C\uAC04 **\uB4A4\uB85C \uBB3C\uB7EC\uB0A9\uB2C8\uB2E4**(\uC5B4\uB9BC\uC740 \uB298 \uCC38\uBCF4\uB2E4 \uD07D\uB2C8\uB2E4). \uC774 \uC904\uC774 \uBCF4\uC774\uBA74 \uADF8 \uC790\uB9AC\uB97C \uC54C\uB824 \uC8FC\uC2ED\uC2DC\uC624 \u2014 \uD3C9\uC18C \uAE38\uC5D0\uC11C\uB294 \uC548 \uB098\uC640\uC57C \uD569\uB2C8\uB2E4.");const B=N?z_({phase:l?.positionRef.current?.phase??"sound",phaseElapsedMs:l?.positionRef.current?Math.max(0,Date.now()-l.positionRef.current.at):0,currentTime:b&&typeof b.currentTime=="number"?b.currentTime:0,trackDurationSec:A,leadInMs:i||0,tailMs:u||0}):O_({currentTime:b&&typeof b.currentTime=="number"?b.currentTime:0,sources:r.current,index:s.current,audioDuration:g??0});try{w&&(w.style.visibility&&(w.style.visibility=""),w.style.left=`${B*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(B))}catch{}}}catch{}c.current=requestAnimationFrame(y)};c.current=requestAnimationFrame(y)},[e,n,a,r,s,l,i,u]),C=o.useCallback(x=>{d();try{n.current&&(n.current.style.visibility="",n.current.style.left=`${x*100}%`)}catch{}try{a.current?.style.setProperty("--progress",String(x))}catch{}},[d,n,a]);return o.useEffect(()=>d,[d]),{start:f,stop:d,settleTo:C}}function Fs({btnLabel:e,soundSrc:n,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}=Ee.useTranslation(),f=e,C=qr(),x=o.useRef(C?.registerAnalyser);o.useEffect(()=>{x.current=C?.registerAnalyser});const y=o.useRef(null),b=o.useRef(null),v=o.useRef(null),_=Q_(),g=o.useRef(null),w=o.useRef(!1),N=o.useRef(null),{ref:m,rect:A,show:B,hide:j}=ew();o.useEffect(()=>()=>{x.current?.("main",null),x.current?.("noise",null)},[]);const[k,E]=o.useState(!1),[D,$]=o.useState("idle"),[V,F]=o.useState("stopped"),U=o.useRef("stopped");o.useEffect(()=>{U.current=V},[V]);const[T,z]=o.useState(0),[W,ie]=o.useState("active"),Q=o.useRef(!1);o.useEffect(()=>{if(W!=="playMode"||!Q.current)return;Q.current=!1;const Y=typeof document<"u"?document.activeElement:null;if(Y&&Y!==document.body)return;const de=v.current?.querySelectorAll("button")[1];try{de?.focus()}catch{}},[W]);const[L,J]=o.useState(null),[ee,q]=o.useState(null),[P,R]=o.useState(0),[S,H]=o.useState(!1),[ne,te]=o.useState(0),ue=C?.playbackRate??1,se=C?.mainVolume??1,pe=C?Ts(C.settings):0,G=C?od(C.settings):se,[K,O]=o.useState("idle"),[I,re]=o.useState(""),[he]=o.useState("top"),ae=o.useRef(null),_e=o.useRef(0),De=o.useRef(null),Se=o.useRef(!0),Ne=w_({mountedRef:Se}),He=o.useRef(null),ve=o.useRef(p),xe=o.useRef(h);o.useEffect(()=>{ve.current=Math.max(0,p||0)},[p]),o.useEffect(()=>{xe.current=Math.max(0,h||0)},[h]);const{start:we,stop:Ae,settleTo:Ie}=rw({audioRef:y,fillRef:b,waveProgressRef:De,sourcesRef:ae,currentIndexRef:_e,sequencer:Ne,leadInMs:p,tailMs:h}),{onReadyChange:ot,waitForReady:pt,markNotReady:Oe}=J_({showSoundWaveForm:u,showNoiseWaveForm:c}),Ue=o.useRef(null),at=o.useRef(s),ce=o.useRef(r),Pe=o.useRef(null),Ye=o.useRef(!1),[Qe,ut]=o.useState(!1),vt=o.useCallback(Y=>{Ye.current=Y,ut(Y)},[]),ct=o.useRef(null),{activeNoiseUrl:Gt,noiseSettingsRef:xt,fadeInNoise:lt,fadeOutNoise:st}=D_({noisePlayer:C,audioRef:y,playbackStateRef:U,sequencer:Ne}),{startTTS:Ot,stopTTS:Mt}=S_({ttsText:l,playbackRate:ue,mainVolume:G,fillRef:b,waveProgressRef:De,setProgress:z,setPlaybackState:F,setStateLocal:ie,fadeInNoise:lt,fadeOutNoise:st,noiseSettingsRef:xt,onDoneRef:ce,handleEndRef:ct});o.useEffect(()=>{It.current=Mt});const Nt=Y=>{if(typeof window>"u"||!window.speechSynthesis){try{re(d("training.ttsUnavailable","\uC774 \uAE30\uAE30\uC5D0\uC11C\uB294 \uC74C\uC131\uC744 \uB4E4\uB824\uC904 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."))}catch{}Ot(Y);return}fe("tts"),Ot(Y)},Ft=Array.isArray(n)?n.filter(Boolean):n?[n]:[],zt=(!Ft||Ft.length===0)&&!!l,_t=Array.isArray(L)&&L.length>0?L:Array.isArray(ee)&&ee.length>0?ee:null,gt=Math.max(Array.isArray(_t)?_t.length:0,Ft.length);o.useEffect(()=>(Se.current=!0,()=>{Se.current=!1}),[]);const Et=()=>{Ne.abort()},It=o.useRef(null),et=o.useRef(null),wt=o.useRef(null),tt=o.useRef(null);tt.current||(tt.current=()=>{wt.current=null;const Y=y.current;if(et.current==="audio"&&Y&&(!Y.paused||Ne.isRunning())){Et();try{Y.pause()}catch{}Se.current&&(F("paused"),Ae(),st())}else if(et.current==="tts")try{It.current?.()}catch{}});const fe=Y=>{et.current=Y,wt.current=or(tt.current)},$e=()=>{wt.current?.(),wt.current=null};o.useEffect(()=>()=>{tt.current&&Rr(tt.current)},[]);const Re=o.useRef(ue);o.useEffect(()=>{Re.current=ue||1},[ue]);const ze=o.useCallback(Y=>{const de=Re.current||1;try{Y.defaultPlaybackRate=de}catch{}try{Y.playbackRate=de}catch{}},[]),it=o.useCallback((Y,de)=>{if(!K_(Y,de)){try{Y.currentTime=0}catch{}ze(Y);return}Y.src=de,ze(Y),Y.load(),ze(Y)},[ze]),on=o.useCallback(()=>{Pe.current&&(clearTimeout(Pe.current),Pe.current=null),O("idle")},[]),ht=o.useCallback(async(Y,de=3,Be=50,Me=0)=>{on();const Ve=Ne.generation(),Xe=!!Y&&Y.currentTime>0&&!Y.ended,bt=Math.max(0,ve.current-Math.max(0,Me));if(bt>0&&!Xe){fe("audio"),we(),F("playing");const ft=xt.current;if(ft?.enabled&&(ft.volume??0)>0)try{lt(ft.volume)}catch{}if(!await Ne.waitPad(bt,"lead",Me)||!Se.current||!Ne.isCurrent(Ve))return!1}Ne.enterSound();for(let ft=0;ft<de;ft++){if(!Se.current||!Ne.isCurrent(Ve))return!1;try{return fe("audio"),await Y.play(),!0}catch(ye){if((ye instanceof Error||typeof ye=="object"&&ye&&"name"in ye?ye.name:void 0)==="AbortError"){if(!Ne.isCurrent(Ve))return!1;await new Promise(M=>setTimeout(M,Be));continue}try{re(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1}}try{re(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}return!1},[d,we,Ne,lt,xt,on]),Ke=o.useCallback(Y=>{const de=Ne.generation(),Be=Math.max(0,xe.current-Math.max(0,Y));we();const Me=xt.current;if(Me?.enabled&&(Me.volume??0)>0)try{lt(Me.volume)}catch{}const Ve=()=>{try{He.current?.()}catch{}};if(Be<=0){Ne.leave(),Ve();return}Ne.waitPad(Be,"tail",Y).then(Xe=>{Ne.leave(),Xe&&Ne.isCurrent(de)&&Ve()}).catch(()=>{})},[Ne,we,lt,xt]),Ct=o.useCallback(()=>{const Y=y.current;if(!Y)return;const de=()=>{F("playing"),ie("playMode"),H(!0),we();try{wo(),vr(Y).then(Xe=>{if(Se.current)try{x.current?.("main",Xe)}catch{}})}catch{}const Ve=xt.current;Ve?.enabled&&(Ve?.volume??0)>0&&lt(Ve.volume)},Be=()=>{V_({ended:!!Y?.ended,completedByEnd:Ye.current})||(F("paused"),Ae(),st())},Me=()=>{const Ve=()=>{try{const Xe=ae.current,bt=H_(Xe,_e.current);if(bt!==null){_e.current=bt,R(bt),H(!0);const ft=Xe?.[bt]&&Xe[bt].src;if(ft&&Y){it(Y,ft),ht(Y).catch(()=>{});return}}}catch{}F("stopped"),z(1);try{if(Y)try{Y.currentTime=0}catch{}}catch{}Ae(),H(!1),st();try{!at.current&&ct.current&&ct.current()}catch{}};if(He.current=Ve,xe.current>0){we(),Ne.waitPad(xe.current,"tail").then(Xe=>{Ne.leave(),Xe&&Ve()}).catch(()=>{});return}Ve()};return Y.addEventListener("play",de),Y.addEventListener("pause",Be),Y.addEventListener("ended",Me),()=>{try{Y.removeEventListener("play",de),Y.removeEventListener("pause",Be),Y.removeEventListener("ended",Me),Ae()}catch{}}},[lt,st,ht,xt,we,Ae,Ne]);o.useEffect(()=>Ct(),[Ct]),o.useEffect(()=>{at.current=s},[s]),o.useEffect(()=>{ce.current=r},[r]),o.useEffect(()=>{if(s||W!=="active")return;const Y=N.current;if(!Y)return;let de=null;const Be=requestAnimationFrame(()=>{try{const Me=Y.getTotalLength();if(!Me)return;const Ve=Me*.2;Y.style.strokeDasharray=`${Me-Ve} ${Ve}`;const Xe="triFlow_"+Math.random().toString(36).slice(2);de=document.createElement("style"),de.textContent=`@keyframes ${Xe}{from{stroke-dashoffset:0}to{stroke-dashoffset:-${Me}}}`,document.head.appendChild(de),Y.style.animation=`${Xe} 2.4s linear infinite`}catch{}});return()=>{cancelAnimationFrame(Be),de?.remove()}},[W,s]),o.useEffect(()=>{ae.current=L},[L]),o.useEffect(()=>{_e.current=P},[P]),o.useEffect(()=>{const Y=v.current,de=g.current;if(!Y||!de)return;let Be=null;const Me=32,Ve=60,Xe=()=>{try{const ft=Array.from(Y.querySelectorAll(":scope > .button"));let ye=0;ft.forEach(qe=>{if(qe===de)return;const nt=qe.getBoundingClientRect();ye+=nt.width});const M=Y.getBoundingClientRect().width,Z=Math.max(0,Math.floor(M-ye-8)),ge=gt;if(!ge||Z<=0){Array.from(de.children).forEach(qe=>{try{qe.style.width=""}catch{}});return}let Le=Math.floor(Z/ge);Le>Ve&&(Le=Ve),Le<Me&&(Le=Math.max(Me,Math.floor(Z/ge))),Array.from(de.querySelectorAll(".button")).forEach(qe=>{try{qe.style.width=`${Le}px`}catch{}})}catch{}},bt=requestAnimationFrame(Xe);try{Be=new ResizeObserver(()=>{requestAnimationFrame(Xe)}),Be.observe(Y),Be.observe(de),window.addEventListener("resize",Xe)}catch{}return()=>{try{cancelAnimationFrame(bt)}catch{}try{Be&&(Be.disconnect(),Be=null)}catch{}try{window.removeEventListener("resize",Xe)}catch{}}},[L,ee,gt]),o.useEffect(()=>()=>{try{Ue.current&&(clearTimeout(Ue.current),Ue.current=null),Pe.current&&(clearTimeout(Pe.current),Pe.current=null)}catch{}},[]);const Bt=(Y,de)=>{J(Y),te(de),Oe(),q(q_(Y)),ae.current=Y},X=()=>{ie("playMode"),R(0),H(!0)},Ce=async(Y,de)=>{vt(!1),w.current=!1,it(Y,de),await md(Y),await pt()!==!1&&(E(!1),X(),await ht(Y))},Ge=async(Y,de=!1)=>{const Be=y.current;E(!0),$("measuring_duration");try{const Me=await Ps(Y,{timeoutMs:1e4,rejectOnError:!0});Bt([{src:Y,objectUrl:null,duration:Me}],Me),$("ready"),de&&Be&&await Ce(Be,Y)}finally{w.current=!1,E(!1)}},Ze=async(Y,de=!1)=>{const Be=y.current;E(!0),$("measuring_duration");try{const Me=await Promise.all(Y.map(Xe=>Ps(Xe,{timeoutMs:1e4})));if(!Se.current)return;const Ve=Y.map((Xe,bt)=>({src:Xe,objectUrl:null,duration:Me[bt]||0}));Bt(Ve,U_(Ve)),$("ready"),de&&Be&&Ve.length>0&&await Ce(Be,Ve[0].src)}finally{w.current=!1,E(!1)}},rt=async(Y=!1,de=!0)=>{const Be=y.current,Me=n?Array.isArray(n)?n:[n]:[];if(!Me||Me.length===0||!Me.some(Boolean))return!1;if(w.current)return null;w.current=!0,de&&E(!0),$("resolving");try{const Ve=G_(n,a,Hl),Xe=[];let bt=0;for(const ft of Ve){let ye=ft.src??null,M=null;if(!ye&&ft.resolvedPath){try{$("getting_signed_url"),ye=await Vl(ft.resolvedPath)}catch{ye=null}if(!Se.current)return!1;if(!ye)try{$("downloading");const ge=await ql(ft.resolvedPath);if(!Se.current)return!1;if(ge){const Le=ge instanceof Blob?ge:new Blob([ge]);M=_.track(URL.createObjectURL(Le)),ye=M}}catch{$("error");try{re(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.")),ie("active")}catch{}}}if(!ye)continue;let Z=0;try{$("measuring_duration"),Z=await Ps(ye,{timeoutMs:3e3})}catch{Z=0}if(!Se.current){if(M)try{URL.revokeObjectURL(M)}catch{}for(const ge of Xe)if(ge.objectUrl)try{URL.revokeObjectURL(ge.objectUrl)}catch{}return!1}bt+=Z||0,Xe.push({...ft,src:ye,objectUrl:M,duration:Z})}if(Bt(Xe,bt),Xe.length>0&&Y&&Be){const ft=Xe[0];vt(!1);try{_.keepOnly(Xe.map(ye=>ye.objectUrl))}catch{}if($("ready"),w.current=!1,ft.src&&Be)try{if(it(Be,ft.src),await md(Be),await pt()===!1)return!1;de&&E(!1),X(),Be&&await ht(Be)}catch{de&&E(!1)}else de&&E(!1);ie("playMode"),R(0),H(!0)}return Xe.length>0}finally{w.current=!1,de&&E(!1),$(Ve=>Ve==="ready"?"ready":"idle")}},mt=async Y=>{const de=Ne.isRunning();if(Y.paused&&!de){if(Ye.current){await Lt();return}const Be=Ne.resume();if(Be){if(F("playing"),Be.phase==="tail"){Ke(Be.elapsed);return}await ht(Y,3,50,Be.elapsed);return}await ht(Y),F("playing")}else Ne.pause(),Et(),Y.pause(),F("paused"),de&&(Ae(),st())},Dt=async()=>{const Y=y.current;if(!(!Y&&!zt)){if(zt){const de=window.speechSynthesis;if(W==="active"){const Be=Va(),Me=Array.isArray(l)?l.filter(Boolean):l?[l]:[];if(Be&&Me.length>0){if(w.current)return;ie("load"),E(!0),$("synthesizing"),w.current=!0;try{const Ve=await Promise.all(Me.map(Xe=>Promise.resolve(Be(Xe))));Ve.length>1?await Ze(Ve,!0):await Ge(Ve[0],!0)}catch{w.current=!1,E(!1),ie("active"),Nt(Me.length>0?Me:void 0)}return}Nt(Me.length>0?Me:void 0);return}if(W==="playMode"){const Be=!!de&&(de.speaking||de.paused)&&!(Y&&(Y.currentSrc||Y.getAttribute("src")));if(Y&&!Be){await mt(Y);return}try{if(de&&de.paused)try{fe("tts"),de.resume(),F("playing")}catch{}else try{de.pause(),F("paused")}catch{}}catch{}}return}if(W==="active"){if(s&&Array.isArray(ae.current)&&ae.current.length>0){const Be=ae.current[0];try{if(Be.src&&Y)try{it(Y,Be.src),X(),Y&&await ht(Y)}catch{}X();return}catch{}}ie("load");let de;try{de=await rt(!0)}catch{de=!1}if(de===!1&&Se.current){try{re(d("training.audioFetchError","\uC0AC\uC6B4\uB4DC \uC18C\uC2A4\uB97C \uAC00\uC838\uC624\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4."))}catch{}ie("active")}return}if(W!=="load"&&(W==="playMode"||W==="active"))try{Y&&await mt(Y)}catch(de){(de instanceof Error||typeof de=="object"&&de&&"name"in de)&&de.name}}},Lt=async()=>{const Y=y.current;if(Y)try{const de=ae.current;if(Array.isArray(de)&&de.length>1){await Cn(0);return}vt(!1);try{Y.currentTime=0}catch{}Y&&await ht(Y),F("playing"),ie("playMode")}catch{}},Dn=()=>{Et(),$e(),It.current?.();const Y=y.current;try{if(Y){try{Y.pause()}catch{}try{Y.currentTime=0}catch{}}}catch{}st(),F("stopped"),ie("active"),z(0),H(!1)},Zt=async(Y,{sameSegment:de=!1}={})=>{Et();const Be=Ne.generation(),Me=y.current,Ve=ae.current?.[Y]?.src;try{if(vt(!1),R(Y),H(!0),_e.current=Y,!Ve||!Me||(de||Oe(),it(Me,Ve),!de&&await pt()===!1)||!Ne.isCurrent(Be)||(await ht(Me),!Ne.isCurrent(Be)))return;F("playing"),ie("playMode")}catch{}},Sn=async()=>{const Y=ae.current,de=_e.current||0;if(!Y||de<=0){await Lt();return}await Zt(de-1)},cn=async()=>{const Y=ae.current,de=_e.current||0;if(!Y||de>=Y.length-1){Dn();return}await Zt(de+1)},Xt=()=>{if(Ye.current)return;const Y=200,de=340;vt(!0),Et(),$e();try{z(1)}catch{}Ie(1);try{O("hold")}catch{}try{const Be=y.current,Me=zt&&!!Be?.src;if(!zt||Me){if(Be){Be.pause();try{Be.currentTime=0}catch{}}}else Mt();st()}catch{}try{F("stopped")}catch{}if(H(!1),!at.current)try{Pe.current&&(clearTimeout(Pe.current),Pe.current=null),Pe.current=setTimeout(()=>{try{O("out")}catch{}Pe.current=setTimeout(()=>{try{typeof ce.current=="function"&&ce.current(!0)}catch{}try{O("idle")}catch{}Pe.current=null},de)},Y)}catch{}};o.useEffect(()=>{ct.current=Xt});const en=o.useCallback(()=>re(""),[]),Cn=async Y=>{(ae.current||[])[Y]&&await Zt(Y,{sameSegment:Y===_e.current})},tn=V==="playing",$t=o.useMemo(()=>{if(!ee||ee.length<=1)return ee;const Y=ee[P];return Y?[Y]:ee},[ee,P]),kt=s===!0;o.useEffect(()=>{try{const Y=y.current;Y&&typeof Y.playbackRate=="number"&&ze(Y)}catch{}},[ue,ze]);const qt=o.useRef({raf:null,timer:null});o.useEffect(()=>{const Y=y.current;if(!Y)return;const de=Math.max(0,Math.min(1,G)),Be=qt.current,Me=()=>{Be.raf!==null&&(cancelAnimationFrame(Be.raf),Be.raf=null),Be.timer!==null&&(clearTimeout(Be.timer),Be.timer=null)};Me();const Ve=xr(Y);if(Y.paused||Math.abs(Ve-de)<.001||typeof requestAnimationFrame!="function"){try{Jn(Y,de)}catch{}return}const Xe=performance.now(),bt=()=>{const ft=Math.min(1,(performance.now()-Xe)/150);try{Jn(Y,Ve+(de-Ve)*ft)}catch{}Be.raf=ft<1?requestAnimationFrame(bt):null};return Be.raf=requestAnimationFrame(bt),Be.timer=setTimeout(()=>{Me();try{Jn(Y,de)}catch{}},200),Me},[G]);const Rt=K==="hold",Tn=K==="out",Mn=W==="playMode"&&!k&&!Qe||Rt||Tn,Fn=V!=="stopped"||Rt||Tn,me=V==="paused",je=Math.max(0,Math.min(100,(T||0)*100)),We=ke("audio-player__fill",Mn?"is-visible":"",Fn?"is-expanded":"",me?"is-paused":"",Tn?"is-out":"");return t.jsxs("div",{className:`audio-player ${kt?"is-disabled":""}${i?` ${i}`:""}`,role:"group","aria-label":typeof f=="string"?f:void 0,children:[t.jsxs("div",{className:`audio-player__panel ${tn?"is-playing":""} ${k?"is-loading":""} ${W!=="default"?"is-revealed":""}`,children:[k?t.jsxs("div",{className:"audio-player__loading",role:hd[D]?"status":void 0,"aria-live":hd[D]?"polite":"off",children:[t.jsx("span",{className:"audio-player__loading-spinner","aria-hidden":"true"}),t.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,W==="active"?t.jsx("button",{className:"audio-player__button",type:"button",disabled:kt,onClick:()=>{Q.current=Or(),j(),Dt()},"aria-label":typeof f=="string"?f:d("training.listen","\uB4E3\uAE30"),onMouseEnter:B,onMouseLeave:j,onFocus:B,onBlur:j,children:t.jsx("span",{ref:m,className:"audio-player__button-triangle-wrap",children:t.jsx("svg",{className:"audio-player__button-triangle",viewBox:"0 0 24 24","aria-hidden":"true",children:t.jsx("path",{ref:N,d:"M13.2 7.7 L16.5 9.85 Q20.2 12 16.5 14.15 L10 18.3 Q7 19.7 7 16.3 L7 7.7 Q7 4.3 10 5.7 L13.2 7.7"})})})}):null,A&&t.jsx(zn,{anchorRect:A,text:typeof f=="string"&&f?f:d("training.listenLabel","\uBB38\uC7A5 \uB4E3\uAE30"),offset:8}),t.jsxs("div",{className:`audio-player__play ${W==="playMode"||tn?"is-visible":""}`,inert:!(W==="playMode"||tn)||void 0,children:[t.jsxs("div",{ref:v,className:"audio-player__buttons",children:[t.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-back",onClick:Sn,ariaLabel:d("training.prev","\uC774\uC804"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:W!=="playMode"}),t.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:tn?"pause":"play",onClick:Dt,ariaLabel:d("common.playPause","\uC7AC\uC0DD / \uBA48\uCDA4"),"aria-pressed":tn,width:"60px",variant:"transparent-white",disabled:W!=="playMode"}),t.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"square",onClick:Dn,ariaLabel:d("training.stop","\uC815\uC9C0"),width:"60px",variant:"transparent-white","aria-hidden":"true",tabIndex:-1,disabled:W!=="playMode"}),gt>1?t.jsx("div",{ref:g,className:"audio-player__source-buttons",children:Array.from({length:gt}).map((Y,de)=>t.jsx(be,{htmlType:"button",size:32,type:"dot",shape:"pill",useBorder:!1,label:String(de+1),onClick:()=>{try{Cn(de)}catch{}},ariaLabel:d("training.sourcePlay",{n:de+1}),variant:"transparent-white",selected:S&&P===de,disabled:W!=="playMode"||!(Array.isArray(L)&&L[de]),showTooltipInfo:!0},de))}):null,!Array.isArray(L)||L.length<=1?t.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"repeat",onClick:Lt,ariaLabel:d("common.replay","\uB2E4\uC2DC\uB4E3\uAE30"),width:"60px",variant:"transparent-white",disabled:W!=="playMode"}):null,t.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"skip-forward",onClick:cn,ariaLabel:d("training.next","\uB2E4\uC74C"),width:"60px",variant:"transparent-white","aria-hidden":!0,tabIndex:-1,disabled:W!=="playMode"}),t.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",shape:"pill",useBorder:!1,icon:"check",onClick:Xt,ariaLabel:d("common.done","\uC644\uB8CC"),width:"60px",variant:"transparent-white",disabled:W!=="playMode"})]}),t.jsxs("div",{className:"audio-player__slider",children:[t.jsx("div",{className:We,ref:b,style:{left:`${je}%`},"aria-hidden":"true"}),(u||c)&&t.jsx(Z_,{segments:$t,progress:T,totalDuration:ne,waveProgressRef:De,showSoundWaveForm:u,leadInMs:p,tailMs:h,trackDurationSec:L?.[P]?.duration??0,noiseSrc:c&&C?.settings.enabled&&pe>0?Gt:null,noiseRatio:C?Cr(C.settings):0,noiseSpeed:C?.settings.speed??1,mainVolume:se,onReadyChange:ot})]})]}),t.jsx("audio",{ref:y,crossOrigin:"anonymous",preload:"auto"})]}),!u&&t.jsxs("p",{className:"audio-player__no-waveform caption-1",children:[t.jsx(dt,{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.")]}),t.jsx(Ta,{message:I,position:he,onClose:en})]})}function Yr(e){const{t:n}=Ee.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:f,canDecrease:C,fontSize:x,lineHeight:y}=ru({storageKey:"tooltip-fontScale"}),b=o.useCallback(()=>p(N=>N==="dark"?"light":"dark"),[]),v=o.useCallback(N=>{try{N.stopPropagation()}catch{}try{typeof l=="function"&&l()}catch{}},[l]),_=Array.isArray(a)?a:typeof a>"u"||a===null?[]:[a],g={fontSize:`${x}px`,lineHeight:`${y}px`,"--tt-line-height":`${y}px`,"--tt-marker-size":"28px"},w=t.jsxs("div",{className:le(`text-box-tooltip__root ${c==="dark"?"is-dark":""}`),children:[t.jsxs("div",{className:le("text-box-tooltip__box"),children:[r&&t.jsx("div",{className:le("text-box-tooltip__label body-2b"),children:r}),t.jsx("div",{className:le("text-box-tooltip__text body-1"),style:g,children:_.map((N,m)=>t.jsxs("div",{className:le("text-box-tooltip__line"),children:[_.length>1?t.jsx("div",{className:le("text-box-tooltip__marker"),children:t.jsx("span",{className:le("text-box-tooltip__line-number button-1"),children:m+1})}):null,t.jsx("span",{className:le("text-box-tooltip__line-text"),children:N})]},m))})]}),t.jsxs("div",{className:le("text-box-tooltip__buttons"),children:[t.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"minus",onClick:d,ariaLabel:n("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!C}),t.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"plus",onClick:h,ariaLabel:n("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),variant:c==="dark"?"transparent-white":"transparent-gray",disabled:!f}),t.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:c==="dark"?"moon":"sun-medium",onClick:b,ariaLabel:n("training.toggleBackground","\uBC30\uACBD \uC804\uD658"),variant:c==="dark"?"transparent-white":"transparent-gray"}),t.jsx(be,{htmlType:"button",size:32,showTooltipInfo:!0,type:"dot",useBorder:!1,width:48,icon:"x",onClick:v,ariaLabel:n("common.close","\uB2EB\uAE30"),variant:c==="dark"?"transparent-white":"transparent-gray"})]})]});return s?t.jsx(Bn,{anchorRect:s,className:le(`text-box-tooltip ${c==="dark"?"is-dark":""}`),onClose:l,closeOnOutsideClick:i,isMobilePopup:u,ariaLabel:r||n("tooltip.textbox","\uBCF8\uBB38"),children:w}):t.jsx("div",{className:le(`text-box-tooltip ${c==="dark"?"is-dark":""}`),children:w})}function Cd({state:e="disabled"}){const{t:n}=Ee.useTranslation();return t.jsxs("div",{className:`ts-bullet ts-bullet--${e}`,"aria-hidden":!0,children:[t.jsx("div",{className:"bullet__dot",children:t.jsx(dt,{icon:"chevron-right",label:n("training.next","\uB2E4\uC74C"),className:"bullet__icon",imgClassName:"bullet__icon-img",maskClassName:"bullet__icon-mask",svgClassName:"bullet__icon-svg",wrapperStyle:{},size:20})}),t.jsx("div",{className:"ts-bullet__line"})]})}function gd(e,n,a){const r=o.useRef(n),s=o.useRef(a);o.useEffect(()=>{r.current=n,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($n)).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 bd({title:e,children:n,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}=Ee.useTranslation(),f=wn("(max-width: 767px)"),C=`training-step__title h4 ${u&&r==="disabled"?"training-step__title--faded":""} ${a}`.trim(),x=`training-step__title-row training-step__title-row--${r}`.trim(),y=o.useRef(null),[b,v]=o.useState(!1),[_,g]=o.useState(null),[w,N]=o.useState(null);gd(b&&!!_,()=>{if(typeof document>"u")return null;const k=Array.from(document.querySelectorAll(".tooltip__content"));for(let E=k.length-1;E>=0;E--)if(k[E].querySelector(".text-box-tooltip__root"))return k[E];return null},()=>y.current?.querySelector("button")??null);const m=o.useRef(l);o.useEffect(()=>{m.current=l});const A=o.useMemo(()=>i==null?"":typeof i=="string"||typeof i=="number"?String(i):Array.isArray(i)&&i.every(k=>typeof k=="string"||typeof k=="number")?i.join(""):"",[i]),B=o.useCallback(()=>{v(!1),g(null),N(null)},[]);o.useEffect(()=>{if(!b)return;let k;try{typeof m.current=="function"&&(k=m.current())}catch{}if(k===!1){B();return}N(typeof k<"u"&&k!==null?k:null)},[A]);const j=o.useCallback(()=>{let k;try{typeof l=="function"&&(k=l())}catch{}if(k!==!1){if(N(typeof k<"u"&&k!==null?k:i),!y.current){v(E=>!E);return}if(b)v(!1),g(null),N(null);else{const E=y.current.getBoundingClientRect();g(E),v(!0)}}},[l,i,b]);return t.jsxs("div",{className:x,children:[t.jsx("p",{className:C,children:t.jsx("span",{className:"training-step__title-text",children:e??n})}),s||c?t.jsxs("div",{className:"title-controls",children:[t.jsxs("div",{className:"title-buttons",children:[c&&t.jsx(be,{htmlType:"button",size:32,type:f?"dot":"bar",icon:"play-circle",label:f?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&&t.jsx("div",{ref:y,children:t.jsx(be,{htmlType:"button",size:32,type:f?"dot":"bar",icon:"eye",label:f?void 0:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),ariaLabel:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),onClick:j,className:b?"is-selected":void 0,"aria-expanded":b,"aria-haspopup":"dialog",variant:r==="disabled"?"disabled":"default",disabled:!i&&typeof l!="function"})})]}),b&&t.jsx(Yr,{text:w??i,label:d("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),anchorRect:_,onClose:B,closeOnOutsideClick:!1,isMobilePopup:!0})]}):null]})}function Is(e,n){return typeof n!="number"||typeof e!="number"?"disabled":e<n?"done":e===n?"active":"disabled"}function Ca({index:e,stepIndex:n,isLast:a=!1,title:r="",titleProps:s={},children:l,className:i="",onDone:u=void 0,useTitleFaded:c=void 0,lockedHint:p}){const{t:h}=Ee.useTranslation(),[d,f]=o.useState(()=>Is(e,n));o.useEffect(()=>{const m=Is(e,n);if(m!==d){const A=setTimeout(()=>f(m),0);return()=>clearTimeout(A)}},[e,n,d]);const C=o.useCallback((...m)=>{Is(e,n)==="done"||d==="done"||typeof u=="function"&&u(...m)},[e,n,d,u]),[x,y]=o.useState(!1),[b,v]=o.useState({text:"",label:"\uBB38\uC7A5 \uB4E3\uAE30",anchorRect:null,backdrop:!1,alignX:null,alignY:null}),_=o.useCallback(m=>{if(!m)return null;try{const A=m;if(typeof m=="object"&&(A.currentTarget||A.target)&&(A.nativeEvent||A.type)){const k=A.currentTarget??A.target;if(k&&typeof k.getBoundingClientRect=="function")return k.getBoundingClientRect()}if(m instanceof DOMRect)return m;const B=m;if(B&&typeof B.getBoundingClientRect=="function")return B.getBoundingClientRect();const j=m?.current;return j&&typeof j.getBoundingClientRect=="function"?j.getBoundingClientRect():null}catch{return null}},[]),g=o.useCallback((m,{text:A="",label:B="\uBB38\uC7A5 \uB4E3\uAE30",backdrop:j=!1,alignX:k="center",alignY:E="top"}={})=>{const D=_(m);v({text:A,label:B,anchorRect:D,backdrop:j,alignX:k,alignY:E}),y(!0)},[_]),w=o.useCallback(()=>{y(!1),v(m=>({...m,anchorRect:null}))},[]),N=o.Children.map(l,m=>{if(o.isValidElement(m)){const A=m;if(typeof A.type=="string")return A;const B=A.props??{},j=typeof B.onDone=="function"?B.onDone:C,k=typeof B.disabled=="boolean";let E=d==="disabled";return k&&(E=!!B.disabled),o.cloneElement(A,{onDone:j,disabled:E,showTooltip:g,hideTooltip:w})}return m});return t.jsxs("div",{className:`training-step training-step--${d} ${a?"training-step--last":""} ${i}`,"aria-current":d==="active",children:[t.jsx(Cd,{state:d}),t.jsxs("div",{className:"training-step__content",children:[t.jsx(bd,{state:d,title:r,...s,useFaded:c}),d==="disabled"&&p&&typeof e=="number"&&typeof n=="number"&&e===n+1&&t.jsx("p",{className:"training-step__locked-hint caption-1",role:"status",children:p}),N]}),x?t.jsx(Bn,{anchorRect:b.anchorRect,backdrop:b.backdrop,onClose:w,ariaLabel:h("tooltip.textbox","\uBCF8\uBB38"),children:t.jsx(Yr,{text:b.text,onClose:w})}):null]})}function yd({context:e,state:n="disabled",theme:a="light"}){const{t:r}=Ee.useTranslation(),[s,l]=o.useState("disabled"),[i,u]=o.useState(()=>{try{return localStorage.getItem("tooltip-theme")||a}catch{return a}});o.useEffect(()=>{try{localStorage.setItem("tooltip-theme",i)}catch{}},[i]);const c=()=>u($=>$==="dark"?"light":"dark"),{increase:p,decrease:h,canIncrease:d,canDecrease:f,fontSize:C,lineHeight:x}=ru({storageKey:"textbox_fontScale"}),[y,b]=o.useState(""),v=o.useRef(null),_=o.useRef(!1),g=o.useCallback(()=>{_.current=Or()&&!!v.current&&v.current.contains(document.activeElement),l("active")},[]),w=o.useCallback(()=>b(""),[]),N=$=>{try{b($)}catch{}},m=typeof navigator<"u"&&/Mobi|Android/i.test(navigator.userAgent||"");o.useEffect(()=>{if(n!=="disabled"){const $=setTimeout(()=>l(n),0);return()=>clearTimeout($)}},[n]);const A=o.useMemo(()=>e&&typeof e=="object"?String(e.sentence??e.text??""):typeof e=="string"?e:"",[e]),[B,j]=o.useState(A);B!==A&&(j(A),l("disabled"));const k=n==="disabled"?s:n,E=k==="disabled"?"training-text-box--disabled":k==="active"?"training-text-box--active":k==="done"?"training-text-box--done":"",D=o.useMemo(()=>({fontSize:`${C}px`,lineHeight:`${x}px`}),[C,x]);return o.useEffect(()=>{if(k==="disabled"||!_.current)return;_.current=!1;const $=document.activeElement;$&&$!==document.body||v.current?.querySelector(".training-text-box__buttons button")?.focus()},[k]),t.jsxs("div",{ref:v,className:`training-text-box ${E} ${k!=="disabled"&&i==="dark"?"is-dark":""}`,children:[k==="disabled"&&t.jsx("div",{className:"training-text-box__preview",children:t.jsx(be,{htmlType:"button",size:48,type:"bar",onClick:g,icon:"eye",ariaLabel:r("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),label:r("training.sentencePreview","\uBB38\uC7A5 \uBBF8\uB9AC\uBCF4\uAE30"),useBorder:!1})}),t.jsx("div",{className:"training-text-box__area","aria-hidden":k==="disabled",children:t.jsx("span",{className:"training-text-box__inner h3",style:D,children:A})}),k!=="disabled"&&t.jsxs("div",{className:"training-text-box__buttons","aria-hidden":k==="disabled",children:[t.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:h,onDisabledClick:()=>N(r("training.fontSizeMin","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uC18C\uC785\uB2C8\uB2E4.")),ariaLabel:r("training.fontSizeDecrease","\uAE00\uC790 \uD06C\uAE30 \uAC10\uC18C"),icon:"minus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!f,useBorder:!1,showTooltipInfo:!0,...!m&&{width:"60px"}}),t.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:p,onDisabledClick:()=>N(r("training.fontSizeMax","\uAE00\uC528 \uD06C\uAE30\uAC00 \uCD5C\uB300\uC785\uB2C8\uB2E4.")),ariaLabel:r("training.fontSizeIncrease","\uAE00\uC790 \uD06C\uAE30 \uC99D\uAC00"),icon:"plus",variant:i==="dark"?"transparent-white":"transparent-gray",disabled:!d,useBorder:!1,showTooltipInfo:!0,...!m&&{width:"60px"}}),t.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"})]}),t.jsx(Ta,{message:y,position:"top",onClose:w})]})}function ga(e){return e==="active"||e==="done"}function Os({index:e,stepIndex:n,isLast:a=!1,lockedHint:r,title:s,useTitleFaded:l,onDone:i,onChange:u,answer:c,wrongAnswers:p,choices:h,multiSelect:d=!1,correctCount:f=0,useDisabledCovered:C=!1,choiceIcons:x,shuffleChoices:y=!0}){const{t:b}=Ee.useTranslation(),v=s??b("training.selectConfirm","\uBB38\uC81C\uB97C \uBCF4\uACE0 \uD574\uB2F9\uD558\uB294 \uB0B4\uC6A9\uC744 \uC120\uD0DD\uD558\uC138\uC694."),_=typeof e=="number"?e:-1,g=typeof n!="number"?"disabled":_<n?"done":_===n?"active":"disabled",w=Array.isArray(h)&&h.length?h:typeof c<"u"?[c].concat(Array.isArray(p)?p:[]):void 0,N=p?p.join("||"):"",m=h?h.join("||"):"",[A,B]=o.useState(()=>Array.isArray(w)?y?Ya(w):w.slice():void 0);o.useEffect(()=>{Array.isArray(w)&&w.length?B(y?Ya(w):w.slice()):B(void 0)},[c,N,m,y]);const[j,k]=o.useState(null),[E,D]=o.useState(()=>new Set);o.useEffect(()=>{k(null),D(new Set)},[m,c,N]);const $=o.useRef(void 0);o.useEffect(()=>{const U=$.current;typeof U=="number"&&typeof n=="number"&&typeof e=="number"&&U>=e&&n<e&&(k(null),D(new Set)),$.current=n},[n,e]);const V=o.useCallback(U=>{if(!ga(g))return;const T=A?.[U];if(T==null)return;const z=T;if(d){const W=new Set(E);W.has(z)?W.delete(z):W.add(z),D(W),typeof u=="function"&&u({selectedValues:[...W],__ts:Date.now()}),typeof i=="function"&&i({selectedValues:[...W],__ts:Date.now()})}else k(z),typeof u=="function"&&u({selectedIndex:U,selectedValue:z,__ts:Date.now()}),typeof i=="function"&&i({selectedIndex:U,selectedValue:z,__ts:Date.now()})},[A,g,d,u,E]),F=`training-step__buttons${Array.isArray(A)&&A.length>3?" training-step__buttons--wrap-3":""}`;return t.jsx(Ca,{index:e,stepIndex:n,isLast:a,lockedHint:r,title:v,useTitleFaded:l,children:t.jsx("div",{className:F,children:Array.isArray(A)&&A.length>0?A.map((U,T)=>t.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:()=>V(T),ariaLabel:String(U),label:U,useLabel:!0,icon:x?x[String(U)]:void 0,variant:"default",disabled:g==="disabled",selected:d?E.has(U):j===U,useDisabledCovered:C,minWidth:0},String(U))):null})})}function zs({index:e,stepIndex:n,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u,demoSelected:c}){const{t:p}=Ee.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,f=typeof n!="number"?"disabled":d<n?"done":d===n?"active":"disabled",C=u&&typeof u=="object"?u.sentence||"":typeof u=="string"?u:"",x=u&&typeof u=="object"?u.choices:void 0,[y,b]=o.useState(c??null),v=`${String(C)}\0${JSON.stringify(x??null)}`,[_,g]=o.useState(v);_!==v&&(g(v),c==null&&b(null));const[w,N]=o.useState(c);Object.is(w,c)||(N(c),b(c??null));const m=o.useRef(void 0);o.useEffect(()=>{const k=m.current;typeof k=="number"&&typeof n=="number"&&typeof e=="number"&&k>=e&&n<e&&c==null&&b(null),m.current=n},[n,e,c]);const A=o.useCallback(k=>{const E=typeof k=="object"&&k!==null?Object.assign({},k,{__ts:Date.now()}):{value:k,__ts:Date.now()};typeof i=="function"&&i(E),ga(f)&&typeof l=="function"&&l(E)},[i,f,l]),B=o.useCallback(()=>{ga(f)&&(b(!1),A(!1))},[A,f]),j=o.useCallback(()=>{ga(f)&&(b(!0),A(!0))},[A,f]);return t.jsxs(Ca,{index:e,stepIndex:n,isLast:a,lockedHint:r,title:h,onDone:l,useTitleFaded:!1,children:[t.jsx(yd,{context:u,state:f}),t.jsx("div",{className:"training-step__buttons",children:Array.isArray(x)&&x.length>0?x.slice(0,6).map((k,E)=>t.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:()=>{ga(f)&&(b(E),A&&A(E))},disabled:f==="disabled",ariaLabel:String(k),label:k,variant:f,selected:y===E},E)):t.jsxs(t.Fragment,{children:[t.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:B,disabled:f==="disabled",icon:"x",ariaLabel:p("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),label:p("training.notHeard","\uC548 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:y===!1}),t.jsx(be,{htmlType:"button",size:56,type:"bar",onClick:j,disabled:f==="disabled",icon:"circle",ariaLabel:p("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),label:p("training.heardWell","\uC798 \uB4E4\uB838\uC5B4\uC694."),variant:"default",selected:y===!0})]})})]})}function Ws({index:e,stepIndex:n,isLast:a=!1,title:r,onDone:s,btnLabel:l,soundSrc:i,bucketPath:u,usePreviewTextBtn:c,previewText:p=null,onPreviewTextBtn:h,disabled:d,_pageIndex:f,showSoundWaveForm:C,showNoiseWaveForm:x,leadInMs:y,tailMs:b}){const{t:v}=Ee.useTranslation(),_=r??v("training.listenTitle","\uC81C\uC2DC\uD558\uB294 \uBB38\uC7A5\uC744 \uB4E4\uC5B4\uC8FC\uC138\uC694."),g=d??(typeof n=="number"&&typeof e=="number"?e>n:!1);return t.jsx(Ca,{index:e,stepIndex:n,isLast:a,title:_,onDone:s,titleProps:{usePreviewTextBtn:c,previewText:p,onPreviewTextBtn:h},children:t.jsx(Fs,{soundSrc:i,ttsText:i?null:p??_,bucketPath:u,btnLabel:l||v("training.listenButton","\uBB38\uC7A5 \uB4E3\uAE30"),disabled:g,className:"training-step__listen-sticky",showSoundWaveForm:C,showNoiseWaveForm:x,leadInMs:y,tailMs:b},`audio-p${f??0}-s${e}`)})}const ow=[];function Hs({index:e,stepIndex:n,isLast:a=!1,lockedHint:r,title:s,onDone:l,onChange:i,context:u=ow}){const{t:c}=Ee.useTranslation(),p=s??c("training.orderListDefault","\uBB38\uC7A5\uC744 \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uBC30\uCE58\uD558\uC138\uC694."),h=q=>typeof q=="string"?q:q&&(q.context||q.sentence||q.question||"")||"",[d,f]=o.useState(Array.isArray(u)?u:[]),[C,x]=o.useState(()=>(d||[]).map((q,P)=>({id:P,text:h(q)}))),y=o.useMemo(()=>typeof n!="number"||typeof e!="number"?"disabled":e<n?"done":e===n?"active":"disabled",[n,e]),b=y!=="disabled",v=o.useRef(void 0),_=o.useRef(void 0);o.useEffect(()=>{if(v.current===u)return;v.current=u;const q=Array.isArray(u)?u:[];f(q);const P=(R=>{const S=(R||[]).map((ue,se)=>({id:se,text:h(ue)}));if(S.length<=1)return S;const H=(ue,se)=>{if(ue.length!==se.length)return!1;for(let pe=0;pe<ue.length;pe++)if(ue[pe].text!==se[pe].text)return!1;return!0};let ne=Ya(S),te=0;for(;H(ne,S)&&te<20;)ne=Ya(S),te+=1;return ne})(q);x(P);try{if(typeof i=="function"){const R=P.filter((S,H)=>S.text===h(q[H])).length;i({shuffled:P,score:R,total:(q||[]).length,initial:!0,__ts:Date.now()})}if(typeof l=="function"&&y==="active"){const R=P.filter((S,H)=>S.text===h(q[H])).length;_.current=u,l({shuffled:P,score:R,total:(q||[]).length,initial:!0,__ts:Date.now()})}}catch{}},[u]),o.useEffect(()=>{if(y!=="active"||_.current===u||(_.current=u,typeof l!="function"))return;const q=Array.isArray(u)?u:[],P=C.filter((R,S)=>R.text===h(q[S])).length;l({shuffled:C,score:P,total:q.length,initial:!0,__ts:Date.now()})},[y,u]);const g=(q,P)=>{const R=[...C],S=q+P;if(S<0||S>=R.length)return;const H=R[S];R[S]=R[q],R[q]=H,z(R);try{if(typeof l=="function"&&y==="active"){const ne=R.filter((te,ue)=>te.text===h(d[ue])).length;l({shuffled:R,score:ne,total:(d||[]).length,__ts:Date.now()})}}catch{}},[w,N]=o.useState(null),m=o.useRef(null),A=o.useRef(null),B=o.useRef(null),j=o.useRef(null),k=o.useRef(null),E=o.useRef({x:0,y:0}),D=o.useRef(null),$=o.useRef({dx:0,dy:0}),V=()=>{if(D.current!==null)return;const q=()=>{if(!m.current){D.current=null;return}D.current=requestAnimationFrame(q);const P=E.current,R=$.current||{dx:0,dy:0};m.current&&(m.current.style.transform=`translate3d(${P.x-R.dx}px, ${P.y-R.dy}px, 0)`)};D.current=requestAnimationFrame(q)},F=o.useRef(new Map),U=o.useRef(new Map),T=()=>{const q=new Map;return F.current.forEach((P,R)=>{P&&P.getBoundingClientRect&&q.set(R,P.getBoundingClientRect())}),q},z=q=>{const P=T();x(q);try{if(typeof i=="function"){const R=q.filter((S,H)=>S.text===h(d[H])).length;i({shuffled:q,score:R,total:(d||[]).length,__ts:Date.now()})}}catch{}requestAnimationFrame(()=>{const R=T();q.forEach(S=>{const H=P.get(S.id),ne=R.get(S.id),te=F.current.get(S.id);if(!te||!H||!ne)return;const ue=H.top-ne.top;ue&&(te.style.transition="none",te.style.transform=`translateY(${ue}px)`,requestAnimationFrame(()=>{te.style.transition="transform 420ms cubic-bezier(.22,.9,.39,1)",te.style.transform="";const se=()=>{te.style.transition="",te.removeEventListener("transitionend",se)};te.addEventListener("transitionend",se)}))})})},W=(q,P)=>{try{try{P.dataTransfer?.setData("text/plain",String(q))}catch{}try{P.dataTransfer&&(P.dataTransfer.effectAllowed="move")}catch{}try{const R=document.createElement("div");R.style.cssText="position:absolute;top:-9999px;left:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(R),P.dataTransfer?.setDragImage(R,0,0),requestAnimationFrame(()=>{try{document.body.removeChild(R)}catch{}})}catch{}}catch{}N(q);try{const R=C[q],S=document.createElement("div");S.className="order-list__dragging-object order-list__dragging-object--visible",S.textContent=R&&R.text?R.text:"",document.body.appendChild(S),m.current=S;const H=F.current.get(R.id);let ne=P.clientX||0,te=P.clientY||0;try{if(H&&H.getBoundingClientRect){const O=H.getBoundingClientRect();ne=O.left+O.width/2,te=O.top+O.height/2}}catch{}const ue=S.getBoundingClientRect(),se=ue.width/2,pe=ue.height/2;$.current={dx:se,dy:pe},S.style.transition="none",E.current={x:ne,y:te},S.style.transform=`translate3d(${ne-se}px, ${te-pe}px, 0)`,requestAnimationFrame(()=>{try{S.style.transition=""}catch{}V()});const G=O=>{const I=O;E.current={x:I.clientX,y:I.clientY},V()};B.current=G,document.addEventListener("mousemove",G);const K=O=>{const I=O;E.current={x:I.clientX,y:I.clientY},V()};A.current=K,document.addEventListener("dragover",K);try{P.dataTransfer?.setData("text/plain",String(q));try{P.dataTransfer?.setData("application/json",JSON.stringify({idx:q}))}catch{}}catch{}}catch{}},ie=(q,P)=>{P.preventDefault();try{P.dataTransfer&&(P.dataTransfer.dropEffect="move")}catch{}try{k.current!==null&&(clearTimeout(k.current),k.current=null);const R=P.currentTarget&&P.currentTarget.closest?P.currentTarget.closest(".order-list__item"):null;if(R&&j.current!==R){if(j.current)try{j.current.classList.remove("drag-over")}catch{}try{R.classList.add("drag-over")}catch{}j.current=R}}catch{}},Q=(q,P)=>{P.preventDefault();const R=P.dataTransfer?.getData("text/plain")||"",S=R?parseInt(R,10):w,H=q;if(typeof S!="number"||isNaN(S)||S===H){N(null),ee(),L();return}const ne=QC(C,S,H);z(ne),N(null),L();try{if(typeof l=="function"&&y==="active"){const te=ne.filter((ue,se)=>ue.text===h(d[se])).length;l({shuffled:ne,score:te,total:(d||[]).length,__ts:Date.now()})}}catch{}try{requestAnimationFrame(()=>{const te=document.querySelectorAll(".order-list .order-list__item")[H];if(!te)return;const ue=te.querySelector(".order-list__slot")||te;try{ue.classList.add("pulse"),ue.offsetHeight,ue.classList.add("to-dark");const se=()=>{ue.classList.remove("pulse","to-dark"),ue.removeEventListener("transitionend",se)};ue.addEventListener("transitionend",se)}catch{}})}catch{}ee()},L=()=>{if(m.current){try{document.body.removeChild(m.current)}catch{}m.current=null}A.current&&(document.removeEventListener("dragover",A.current),A.current=null),B.current&&(document.removeEventListener("mousemove",B.current),B.current=null),D.current!==null&&(cancelAnimationFrame(D.current),D.current=null)},J=()=>{N(null),ee(),L()};o.useEffect(()=>()=>L(),[]);const ee=()=>{try{if(k.current!==null&&(clearTimeout(k.current),k.current=null),j.current){try{j.current.classList.remove("drag-over")}catch{}j.current=null}document.querySelectorAll(".order-list .order-list__item").forEach(q=>q.classList.remove("drag-over"))}catch{}};return o.useEffect(()=>{try{const q=Math.max(1,(C||[]).length);C.forEach((P,R)=>{const S=U.current.get(P.id);if(!S)return;let H=50;q>1&&(H=Math.round(R/(q-1)*100));try{S.style.setProperty("--marker-pos",H+"%")}catch{}})}catch{}},[C]),o.useEffect(()=>()=>{L(),k.current!==null&&(clearTimeout(k.current),k.current=null)},[]),t.jsx(Ca,{index:e,stepIndex:n,isLast:a,lockedHint:r,title:p,children:t.jsx("div",{className:"order-list",children:C.map((q,P)=>{const R=Math.max(1,(C||[]).length),S=R>1?Math.round(P/(R-1)*100):50;return t.jsx("div",{className:"order-list__item",children:t.jsxs("div",{className:"order-list__slot","data-disabled":y==="disabled","aria-disabled":y==="disabled",children:[y!=="disabled"?t.jsx("div",{className:"order-list__marker caption-1",style:{"--marker-pos":S+"%"},ref:H=>{const ne=U.current;H?ne.set(q.id,H):ne.delete(q.id)},children:t.jsx("span",{className:"order-list__slot-number button-1",children:P+1})}):null,t.jsxs("div",{ref:H=>{const ne=F.current;H?ne.set(q.id,H):ne.delete(q.id)},className:`order-list__draggable ${w===P?"dragging":""}`,"data-disabled":y==="disabled","aria-disabled":y==="disabled",tabIndex:y==="disabled"?-1:0,draggable:b,onDragStart:b?H=>W(P,H):void 0,onDragEnter:b?H=>ie(P,H):void 0,onDragOver:b?H=>ie(P,H):void 0,onDragLeave:b?()=>{try{k.current!==null&&clearTimeout(k.current),k.current=setTimeout(()=>{try{const H=document.querySelectorAll(".order-list .order-list__item");H&&H[P]&&(H[P].classList.remove("drag-over"),j.current===H[P]&&(j.current=null))}catch{}},80)}catch{}}:void 0,onDrop:b?H=>Q(P,H):void 0,onDragEnd:b?J:void 0,children:[t.jsx("span",{className:"order-list__item-text body-2",children:q.text}),b?t.jsxs("span",{className:"order-list__item-buttons",children:[t.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:()=>g(P,-1),ariaLabel:c("training.up"),icon:"chevron-up",variant:"transparent-gray",width:48,useFaded:"true",disabled:P===0,useBorder:!1,useDisabledInvisible:!0}),t.jsx(be,{htmlType:"button",size:32,type:"dot",onClick:()=>g(P,1),ariaLabel:c("training.down"),icon:"chevron-down",variant:"transparent-gray",width:48,useFaded:"true",disabled:P===C.length-1,useBorder:!1,useDisabledInvisible:!0})]}):null]})]})},q.id)})})})}const sw=8e3;function lw(e,n){return new Promise(a=>{let r=!1;const s=()=>{r||(r=!0,a())};e.then(s,s),setTimeout(s,n)})}function vd({index:e,stepIndex:n,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:f=0}){const{t:C}=Ee.useTranslation(),x=s??C("training.cardInstructions","\uB0B1\uB9D0 \uCE74\uB4DC\uB97C \uBCF4\uACE0 \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uD655\uC778\uD558\uC138\uC694."),y=o.useMemo(()=>Array.isArray(u)?u:u&&u.items||[],[u]),b=d??3,v=(y||[]).slice(0,b);(y||[]).length>b&&console.warn(`TrainingStepCard: ${y.length} items passed but only ${b} shown`);const _=typeof e=="number"?e:-1,g=typeof n!="number"?"disabled":_<n?"done":_===n?"active":"disabled",[w,N]=o.useState(null),m=o.useRef([]),[A,B]=o.useState(!1),j=o.useRef(null),k=o.useRef(!0);o.useEffect(()=>(k.current=!0,()=>{k.current=!1}),[]);const E=o.useMemo(()=>y.map(T=>T?.id??T?.word??"").join("|"),[y]);o.useEffect(()=>{N(null)},[E]);const D=o.useRef(void 0);o.useEffect(()=>{const T=D.current;typeof T=="number"&&typeof n=="number"&&typeof e=="number"&&T>=e&&n<e&&N(null),D.current=n},[n,e]);const $=o.useCallback((T,z)=>{if(c)return;const W={item:T,index:z,__ts:Date.now()};try{typeof i=="function"&&i(W)}catch{}if(g==="active"&&typeof l=="function")try{l(W)}catch{}},[c,i,g,l]),V=o.useRef(f);o.useEffect(()=>{V.current=Math.max(0,f||0)},[f]);const F=o.useCallback(async()=>{if(A||g==="disabled")return;B(!0);let T=!1;const z=new Promise(W=>{j.current=()=>{T=!0,W()}});try{for(let W=0;W<v.length&&!(!k.current||T);W++){const ie=m.current[W];if(!ie)continue;await Promise.race([lw(ie.play(),sw),z]);const Q=Math.max(0,V.current||0);Q>0&&W<v.length-1&&!T&&k.current&&await Promise.race([new Promise(L=>{setTimeout(L,Q)}),z])}}finally{j.current=null,B(!1)}},[A,g,v.length]),U=o.useCallback((T,z)=>{if(!ga(g))return;N(z);const W={selectedValue:T.word||T.title||"",selectedIndex:z,item:T,__ts:Date.now()};try{typeof i=="function"&&i(W)}catch{}if(typeof l=="function")try{l(W)}catch{}},[i,g,l]);return t.jsx(Ca,{index:e,stepIndex:n,isLast:a,lockedHint:r,title:x,onDone:l,titleProps:{usePlayAllBtn:!h&&v.length>0,onPlayAll:F,playAllActive:A},children:t.jsx("div",{className:"training-step__cards",onClickCapture:T=>{const z=j.current;if(!z)return;const W=T.target;W&&typeof W.closest=="function"&&W.closest(".training-word-card__bottom")&&z()},children:v.length===0?t.jsx("div",{className:"training-step__empty",children:C("training.noCards","\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}):v.map((T,z)=>t.jsx(gs,{ref:W=>{m.current[z]=W},item:T,disabled:g==="disabled",onPlayDone:()=>$(T,z),selectable:c,selected:c&&w===z,onSelect:c?()=>U(T,z):void 0,flipDelay:z*120,hideLabel:p,hideAudio:h},T&&T.id||z))})})}const iw=160;function uw(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 xd(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"}]}uw(Jt.t.bind(Jt)),xd(Jt.t.bind(Jt));const Zr="none",cw=.5,dw=1.5,pw=.25;function Vs({title:e,valueLabel:n,value:a,min:r,max:s,step:l,tickStep:i,size:u,disabled:c,onChange:p}){return t.jsxs(fn,{variant:"custom",label:e,useFullWidth:!0,children:[t.jsx(mc,{value:a,onChange:p,min:r,max:s,step:l,size:u,showBgTick:!0,tickStep:i,ariaLabel:e,disabled:c,className:le("noise-settings-tooltip__slider-input")}),t.jsx("div",{className:le(ke("noise-settings-tooltip__value","button-1",c?"noise-settings-tooltip__value--disabled":"")),children:n})]})}function _d({anchorRect:e,onClose:n,hideNoiseRows:a=!1}){const{t:r}=Ee.useTranslation(),s=wn("(max-width: 767px)")?40:24,l=qr(),i=Cr(l?.settings??fa),u=l?.settings.type??"defaultNoise",c=l?.settings.enabled??!0,p=l?.playbackRate??1,h=l?.mainVolume??1,d=Math.round(h*100),f=o.useCallback(v=>{try{l?.setMainVolume(Math.max(0,Math.min(1,v/100)))}catch{}},[l]),C=o.useCallback(v=>{try{l?.setPlaybackRate(v)}catch{}},[l]),x=o.useCallback(v=>{const _=Math.min(fr,Math.max(0,Math.round(v*10)/10));try{l?.setSettings({noiseRatio:_})}catch{}},[l]),y=o.useCallback(v=>{try{v===Zr?l?.setSettings({enabled:!1}):l?.setSettings({type:v,enabled:!0})}catch{}},[l]),b=[{key:Zr,label:r("training.noise.type.none","\uC5C6\uC74C")},...xd(r).map(v=>({key:v.value,label:v.label}))];return t.jsx(Bn,{anchorRect:e,offset:12,onClose:n,ariaLabel:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815"),isMobilePopup:!1,closeOnOutsideClick:!1,header:t.jsxs("div",{className:le("noise-settings-tooltip__header"),children:[t.jsx("span",{children:r("training.trainingSettingsTitle","\uD6C8\uB828 \uC124\uC815")}),t.jsx(be,{htmlType:"button",size:40,type:"dot",icon:"x",variant:"transparent-gray",useBorder:!1,ariaLabel:r("common.close","\uB2EB\uAE30"),onClick:n})]}),children:t.jsxs(dr,{className:le("noise-settings-tooltip"),useBorder:!1,labelWidth:72,children:[t.jsx(Vs,{title:r("training.playVolumeTitle","\uC804\uCCB4 \uC18C\uB9AC"),valueLabel:`${d}%`,value:d,min:0,max:100,step:10,size:s,onChange:f}),t.jsx(Vs,{title:r("training.playSpeedTitle","\uC7AC\uC0DD \uC18D\uB3C4"),valueLabel:`${p.toFixed(2)}x`,value:p,min:cw,max:dw,step:pw,size:s,onChange:C}),!a&&t.jsxs(t.Fragment,{children:[t.jsx(fn,{variant:"custom",label:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),useFullWidth:!0,children:t.jsx(kn,{ariaLabel:r("training.noiseTypeTitle","\uC18C\uC74C \uC885\uB958"),size:40,shape:"rounded",options:b,value:c?u:Zr,onChange:y})}),t.jsx(Vs,{title:r("training.noiseRatioTitle","\uC18C\uC74C \uBE44\uC728"),valueLabel:r("training.noiseRatioValue","{{ratio}}\uBC30",{ratio:i.toFixed(1)}),value:i,min:0,max:fr,step:ad,size:s,disabled:!c,onChange:x})]}),a&&t.jsx("div",{className:le("noise-settings-tooltip__width-ghost"),"aria-hidden":"true",inert:!0,children:t.jsx(fn,{variant:"custom",label:"\xA0",useFullWidth:!0,children:t.jsx(kn,{ariaLabel:"width-ghost",size:40,shape:"rounded",options:b,value:Zr,onChange:()=>{}})})})]})})}function wd({useNoiseSettingBtn:e=!1,onSettings:n,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}=Ee.useTranslation(),[d,f]=o.useState(!1),[C,x]=o.useState(null),[y,b]=o.useState(!1),v=o.useRef(null),_=o.useRef(null),g=qr(),w=u>0,N=w&&i<u-1,m=!w||i>=u-1,A=s===Math.max(0,l);o.useEffect(()=>{e||(f(!1),x(null))},[e]);const B=o.useCallback(()=>{f(!1),x(null)},[]),j=o.useCallback(()=>{if(d){f(!1),x(null);return}const z=v?.current?.getBoundingClientRect();z&&x(z),n?.(),f(!0)},[d,n]),k=o.useCallback(()=>{if(d){f(!1),x(null);return}const z=_?.current?.getBoundingClientRect();z&&x(z),n?.(),f(!0)},[d,n]),E=wn("(max-width: 767px)"),D=o.useRef(null),[$,V]=o.useState(null),F=o.useCallback(()=>{b(z=>{const W=!z;return V(W?D.current?.getBoundingClientRect()??null:null),W})},[]),U=o.useCallback(()=>{b(!1),V(null)},[]);o.useEffect(()=>{c&&(b(!1),V(null))},[c]);const T=t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"pp-bottom__meter",children:[t.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.sentence","\uC7AC\uC0DD")}),t.jsx(ps,{analyser:g?.mainAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.sentence","\uC7AC\uC0DD")})]}),t.jsxs("div",{className:"pp-bottom__meter",children:[t.jsx("span",{className:"pp-bottom__meter-label caption-1",children:h("training.meter.noise","\uC18C\uC74C")}),t.jsx(ps,{analyser:g?.noiseAnalyser??null,orientation:"horizontal",length:112,label:"db",labelPos:"left",ariaLabel:h("training.meter.noise","\uC18C\uC74C")})]})]});return gd(e&&d,()=>typeof document<"u"?document.querySelector(".noise-settings-tooltip__header")?.closest(".tooltip__content")??null:null,()=>[v.current,_.current].map(z=>z?.querySelector("button")??null).find(z=>!!z&&z.getClientRects().length>0)??v.current?.querySelector("button")??null),t.jsxs("div",{className:"pp-bottom",children:[t.jsxs("div",{className:"pp-bottom__left",children:[e?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"pp-bottom__settings--desktop",children:t.jsx("div",{ref:v,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:t.jsx(be,{htmlType:"button",size:56,type:"bar",icon:"settings",onClick:j,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})})}),t.jsx("div",{className:"pp-bottom__settings--mobile",children:t.jsx("div",{ref:_,className:"pp-bottom__tooltip-trigger","data-tooltip-ignore":!0,children:t.jsx(be,{htmlType:"button",size:56,type:"dot",shape:"pill",icon:"settings",onClick:k,className:d?"is-selected":void 0,"aria-expanded":d,"aria-haspopup":"dialog",ariaLabel:h("training.settings","\uC124\uC815")})})})]}):null,e&&t.jsx("div",{ref:D,className:"pp-bottom__meter-trigger","data-tooltip-ignore":!0,children:t.jsx(be,{htmlType:"button",size:40,type:"dot",shape:"pill",icon:"audio-lines",onClick:F,selected:y,"aria-expanded":E?y:void 0,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC")})}),e&&y&&!E&&t.jsx("div",{className:"pp-bottom__meters",children:T})]}),e&&y&&E&&$&&t.jsx(Bn,{anchorRect:$,onClose:U,ariaLabel:h("training.meter.toggle","\uC624\uB514\uC624 \uBBF8\uD130 \uD45C\uC2DC"),children:t.jsx("div",{className:"pp-bottom__meters pp-bottom__meters--floating",children:T})}),t.jsxs("div",{className:"pp-bottom__right",children:[m&&t.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:!A}),N&&t.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:!A})]}),e&&d&&t.jsx(_d,{anchorRect:C,onClose:B,hideNoiseRows:p})]})}function Bd({title:e,subtitle:n,desc:a,depth:r,icon:s,wrapperStyle:l,iconTooltip:i,pageIndex:u,pageCount:c,progressMax:p,progressIndex:h,onBack:d,onClose:f}){const{t:C}=Ee.useTranslation(),x=wn("(max-width: 767px)"),y=Number.isInteger(h)?h:u||0,b=Number.isInteger(p)?p:c||0,v=d||f,_=Array.isArray(r)?x?r[r.length-1]:r.join(" / "):r,g=typeof e=="string"?e.trim():e,w=typeof n=="string"?n.trim():n,N=!!(g||w),m=N?g||w:C("common.emptyTrainingName","\uD6C8\uB828 \uC774\uB984\uC774 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."),A=_||(g?n:void 0),B=x&&typeof A=="string"&&(A.includes(" \xB7 ")||A.includes(" / "))?A.split(/\s[·/]\s/).pop():A,j=o.useMemo(()=>{const k=l&&typeof l=="object"?{...l}:{};return!("width"in k)&&!("height"in k)&&(k.width="40px",k.height="40px"),k},[l]);return t.jsxs("header",{className:"pp-title training-popup-title",children:[t.jsxs("div",{className:"pp-title__left",children:[v?t.jsx(be,{htmlType:"button",size:48,type:"dot",icon:"chevron-left",ariaLabel:C("common.back","\uB4A4\uB85C"),onClick:v,useBorder:!1,iconSize:"large",iconColor:"--color-black",variant:"transparent-gray"}):null,t.jsx("div",{children:s?t.jsx(Pu,{icon:s,label:e,tooltip:i,wrapperStyle:j}):null}),t.jsxs("div",{className:"pp-title__text",children:[B?t.jsx("span",{className:"pp-title__depth caption-1",children:B}):null,t.jsx("span",{className:`pp-title__title h2${N?"":" pp-title__title--empty"}`,children:m}),a?t.jsx("span",{className:"pp-title__description caption-1",children:a}):null]})]}),t.jsx(bc,{max:Math.max(0,b??0),index:Math.max(0,y??0)})]})}function hw(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("speechear.popup.close"))}function mw(e){return!e&&e!==0?[]:Array.isArray(e)?e.flatMap(n=>typeof n=="string"?n.split("|").map(a=>a.trim()).filter(Boolean):n||n===0?[String(n)]:[]):typeof e=="string"?e.split("|").map(n=>n.trim()).filter(Boolean):[String(e)]}const kd=(e,n)=>{if(!n)return n;const a=typeof Jt?.t=="function"?Jt.t(e,{defaultValue:n}):void 0;return typeof a=="string"&&a?a:n};function Ad(e,n,a){const r=e,s=r?.title||r?.name||(Array.isArray(n)?n[n.length-1]:void 0)||a||"\uD6C8\uB828",l=fi().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:n,icon:l?.icon,wrapperStyle:l?.color?{"--t-item-fg":l.color}:void 0,iconTooltip:[l?kd(`topic.${l.key}`,l.label):void 0,i?kd(`topic.sub.${i.key}`,i.label):void 0].filter(Boolean).join(" / ")||void 0}}function qs(e){return e&&typeof e=="object"&&typeof e.__ts=="number"?e.__ts:0}function Nd(e,n,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&&n?{shownAt:n}:{},...r.answeredAt===void 0?{answeredAt:new Date(s).toISOString()}:{}}}function fw(e){const n=e;return Array.isArray(n?.items)?n.items:Array.isArray(e)?e:e?[e]:[]}function Cw({idPrefix:e,trainingData:n,depth:a,fallbackTitle:r="\uD6C8\uB828",pages:s=[],emptyMessage:l,buildResults:i,metaPatch:u}){const c=Ad(n,a,r),p=typeof u=="function"?u(c)||{}:u||{},h=n?.id||n?.title||s.length;return{id:`${e}:${h}`,meta:{...c,...p},pages:s,emptyMessage:l,buildResults:i}}function gw(e){if(typeof e=="string")return e;if(e&&typeof e=="object"){const n=e;return n.context||n.sentence||n.question||""||""}return""}function bw(e){if(e&&typeof e=="object"){const n=e;if(Array.isArray(n.selectedValues))return n.selectedValues;if(n.selectedValue!==void 0)return n.selectedValue;if(n.selectedIndex!==void 0)return n.selectedIndex;if(n.value!==void 0)return n.value}return e}function yw(e,n=[]){if(Array.isArray(e))return e.join(", ");if(typeof e=="number"&&Array.isArray(n))return String(n[e]??"");if(typeof e=="string")return e}function Ed(e,n){if(!(!e||typeof e!="object"))return e[`step-${n}`]}function vw(e,n,a,r){return Ed(e,n*a+r)}function xw({payload:e,selected:n,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 n=="number"&&Array.isArray(a)&&a.length)return r.some(s=>String(s)===String(a[n]));if(typeof n<"u")return r.some(s=>String(s)===String(n))}}function _w(e){return e?Array.isArray(e.items)?e.items.map(n=>{const a=n;return typeof n=="string"?{sentence:n}:{sentence:a.context||a.sentence||"",contextCode:a.contextCode||a.context_code}}):Array.isArray(e.sentences)?e.sentences.map(n=>{const a=n;return typeof n=="string"?{sentence:n}:{sentence:a.sentence||a.context||"",contextCode:a.contextCode}}):Array.isArray(e.contexts)?e.contexts:e.contextCode?[{contextCode:e.contextCode}]:[]:[]}const jd=o.createContext(null);function ww(){const e=o.useContext(jd);if(!e)throw new Error("useTrainingPagePopupContext must be used inside TrainingPagePopup");return e}function Bw({index:e,stepIndex:n,isLast:a=!1,lockedHint:r,title:s,choices:l=[],onDone:i,onChange:u}){const{t:c}=Ee.useTranslation(),p=typeof e=="number"?e:-1,h=typeof n!="number"?"disabled":p<n?"done":p===n?"active":"disabled",[d,f]=o.useState(()=>l.map(()=>null)),C=JSON.stringify(l),x=l.length;o.useEffect(()=>{f(Array.from({length:x},()=>null))},[C]);const y=o.useRef(void 0);o.useEffect(()=>{const g=y.current;typeof g=="number"&&typeof n=="number"&&typeof e=="number"&&g>=e&&n<e&&f(Array.from({length:x},()=>null)),y.current=n},[n,e,x]);const b=o.useMemo(()=>d.filter(g=>g!==null).length+1,[d]),v=o.useCallback(g=>{if(!ga(h))return;const w=d;let N;if(w[g]!=null){const A=w[g];N=w.map(B=>B!==null&&B>=A?null:B)}else N=[...w],N[g]=b;f(N);const m={selectedOrder:N,words:l,__ts:Date.now()};try{typeof u=="function"&&u(m)}catch{}if(w[g]==null&&N.length>0&&N.every(A=>A!==null))try{typeof i=="function"&&i(m)}catch{}},[h,d,b,u,i,l]),_=s??c("training.selectInOrder","\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return t.jsx(Ca,{index:e,stepIndex:n,isLast:a,lockedHint:r,title:_,onDone:i,children:t.jsx("div",{className:"training-step__cards",children:l.map((g,w)=>t.jsx(gs,{item:{word:g},disabled:h==="disabled",selectable:!0,selected:d[w]!==null,orderRank:d[w],onSelect:()=>v(w),flipDelay:w*120,hideLabel:!1,hideAudio:!0},`${g}-${w}`))})})}function Xr(e){return null}Xr.__isTrainingPage=!0;function Pa(e,n){const a=ww();return{ctx:a,index:e,stepIndex:a.currentStepIndex,isLast:typeof e=="number"&&typeof n=="number"?e===n-1:!1,onDone:r=>a.handleStepDone(r,e),onChange:r=>a.handleStepChange(r,e)}}function Dd({_stepIndex:e,_totalSteps:n,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i}=Pa(e,n);return t.jsx(Ws,{...a,index:r,stepIndex:s,isLast:l,onDone:i})}function Sd({_stepIndex:e,_totalSteps:n,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Pa(e,n);return t.jsx(Os,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function Td({_stepIndex:e,_totalSteps:n,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Pa(e,n);return t.jsx(zs,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function Md({_stepIndex:e,_totalSteps:n,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Pa(e,n);return t.jsx(Hs,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function $d({_stepIndex:e,_totalSteps:n,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Pa(e,n);return t.jsx(vd,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}function kw({_stepIndex:e,_totalSteps:n,...a}){const{index:r,stepIndex:s,isLast:l,onDone:i,onChange:u}=Pa(e,n);return t.jsx(Bw,{...a,index:r,stepIndex:s,isLast:l,onDone:i,onChange:u})}const Ld=3e4,Aw=/^(https?:|blob:|data:audio|\/|\.\/)/;function Rd(e){return typeof e=="string"&&Aw.test(e)?e:null}const Nw=e=>typeof e=="string"&&e.trim()!==""?e:null,Us=Symbol("timed-out");function Ew(e,n){if(n<=0)return Promise.resolve(Us);let a;return Promise.race([Promise.resolve(e),new Promise(r=>{a=setTimeout(()=>r(Us),n)})]).finally(()=>clearTimeout(a))}function jw(e){return e?Va()||yr()?!0:typeof window<"u"&&!!window.speechSynthesis:!1}function Dw(e,n){const a=[],r=Rd(n);r&&a.push({kind:"raw",resolve:async()=>r});const s=(e??"").trim();if(!s)return a;for(const[l,i]of[["urlResolver",Va()],["fallbackUrlResolver",yr()]])i&&a.push({kind:l,resolve:async u=>{let c;try{c=await Ew(i(s),u)}catch(h){return jt(`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===Us?(jt(`question-sound-slow-${l}`,`[core] configureTTS \uC758 ${l} \uAC00 ${Ld}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):Nw(c)||(jt(`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 Sw(){return Date.now()+Ld}const Tw=(e,n)=>Math.max(0,e-Date.now())/Math.max(1,n);function Mw(e){jt("question-sound-none",`[core] "${e}" \uC758 \uC18C\uB9AC \uC8FC\uC18C\uB97C \uD55C \uC790\uB9AC\uC5D0\uC11C\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uBE0C\uB77C\uC6B0\uC800 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4. configureTTS \uAC00 \uAC78\uB824 \uC788\uB294\uC9C0, \uB9AC\uC878\uBC84\uAC00 \uC8FC\uC18C\uB97C \uC8FC\uB294\uC9C0 \uC704 \uC904\uB4E4\uC744 \uBCF4\uB77C.`)}function Jr(...e){for(const n of e)if(typeof n=="string"){const a=n.trim();if(a.length)return a}else{if(typeof n=="number"||typeof n=="boolean")return String(n);if(Array.isArray(n)&&n.length)return n.join(", ");if(n&&typeof n=="object"){const a=n,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 $w(e){return Jr(e?.question,e?.q,e?.sentence,e?.text,e?.prompt,e?.wording)}function Lw(e){return Rd(Jr(e?.questionSound,e?.soundSrc,e?.audioSrc,e?.sound,e?.audio,e?.src))}function Pd(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 n=Jr(e?.status,e?.result,e?.judge,e?.note);if(n){const a=n.toLowerCase();if(["ok","true","\uB9DE\uC74C","\uC815\uB2F5"].some(r=>a.includes(r)))return!0;if(["ng","false","\uD2C0\uB9BC","\uC624\uB2F5"].some(r=>a.includes(r)))return!1}}function Fd(e){const{score:n,contextsLength:a,results:r=[],subtitle:s,onReplay:l,onClose:i,inline:u=!1,pending:c=!1}=e||{},{t:p}=Ee.useTranslation(),h=o.useId(),d=o.useCallback(()=>!c,[c]);o.useEffect(()=>{const k=a??0;if(n!=null&&k>0&&n/k>.5){const E=window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("party:trigger",{detail:{count:140,strength:1.6,duration:2200}}))},0);return()=>window.clearTimeout(E)}},[n,a]);const f=o.useCallback(k=>{const E=Pd(k),D=Jr(k?.wording,k?.label);return E===!0?{variant:"main",label:D??p("training.result.heardWell","\uC798 \uB4E4\uC5C8\uC5B4\uC694")}:E===!1?{variant:"danger",label:D??p("training.result.notHeard","\uBABB \uB4E4\uC5C8\uC5B4\uC694")}:{variant:"disabled",label:D??p("training.result.notJudged","\uBBF8\uD310\uC815")}},[p]),C=a??0,x=n??0,y=o.useMemo(()=>Array.isArray(r)?r:[],[r]),b=o.useRef(null),[v,_]=o.useState(null),g=o.useCallback(()=>{b.current?.(),b.current=null,_(null)},[]);o.useEffect(()=>g,[g]);const w=o.useRef(0),N=(k,E)=>{if(!Yn)return;const D=Math.round(performance.now()-w.current);console.debug(`[core][\uB2E4\uC2DC\uB4E3\uAE30] +${D}ms ${k}`,E??"")},m=o.useRef(0),A=o.useCallback((k,E,D)=>{g();const $=++m.current,V=()=>m.current===$;w.current=Yn?performance.now():0,N(`\uB20C\uB800\uB2E4 \u2014 \uC904 ${k}`,{text:E,rawUrl:D}),_(k),b.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uC8FC\uC18C \uC5BB\uAE30 \uC804)"),m.current++,yo()};const F=W=>{N("\uD2BC\uB2E4",W);const ie=sr(W,Q=>{N(`\uB05D\uB0AC\uB2E4 \u2014 ${Q?"\uB05D\uAE4C\uC9C0 \uB4E4\uC5C8\uB2E4":"\uBABB \uD2C0\uC5C8\uAC70\uB098 \uBA48\uCDC4\uB2E4"}`,{mine:V()}),Q&&V()&&(b.current=null,_(null))});return b.current=()=>{N("\uBA48\uCD94\uAC1C\uAC00 \uBD88\uB838\uB2E4(\uD2B8\uB294 \uC911)"),m.current++,ie.stop(),yo()},ie.done},U=Dw(E,D);N("\uCC28\uB840",U.map(W=>W.kind));const T=U[0]?.kind==="raw",z=T?F(D):Promise.resolve(!1);(async()=>{if(await z||!V())return;const W=Sw(),ie=T?U.slice(1):U;for(let Q=0;Q<ie.length;Q++){if(!V())return;N(`${ie[Q].kind} \uC5D0\uAC8C \uBB3B\uB294\uB2E4`);const L=await ie[Q].resolve(Tw(W,ie.length-Q));if(N(`${ie[Q].kind} \uAC00 \uB2F5\uD588\uB2E4`,L),!V()||L&&(await F(L)||!V()))return}V()&&(N("\uC8FC\uC18C\uB97C \uD558\uB098\uB3C4 \uBABB \uC5BB\uC5C8\uB2E4 \u2014 \uB0AD\uB3C5\uC73C\uB85C \uAC04\uB2E4"),Mw(E),b.current=()=>{m.current++,yo()},N("\uB0AD\uB3C5\uD55C\uB2E4"),lC(E,{onEnd:()=>{V()&&(b.current=null,_(null))}}))})()},[g]),B=o.useMemo(()=>y.map(k=>{const E=k??{},D=$w(E)||p("training.result.noContent","(\uB0B4\uC6A9\uC5C6\uC74C)"),{variant:$,label:V}=f(E),F=Array.isArray(E.corrects)?E.corrects:[],U=F.length?F.join(", "):E.answer!=null&&E.answer!==""?String(E.answer):null,T=typeof E.selectedText=="string"?E.selectedText:null,z=Pd(E)===!0,W=Lw(E),ie=!!W||jw(D);return{problem:D,variant:$,label:V,answer:U,selectedText:T,isCorrect:z,sound:W,canHear:ie}}),[y,f,p]),j=o.useMemo(()=>B.some(k=>k.answer!==null||k.selectedText!==null),[B]);return t.jsx(qn,{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:k,closeWithAnimation:E})=>t.jsxs(t.Fragment,{children:[c&&t.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.")}),t.jsxs("div",{className:"trp-actions",children:[t.jsx(be,{htmlType:"button",size:56,type:"bar",label:p("training.result.replay","\uB2E4\uC2DC\uD558\uAE30"),onClick:()=>k(l)}),t.jsx(be,{htmlType:"button",size:56,type:"bar",label:p("training.result.done","\uC644\uB8CC"),variant:"main",onClick:E,disabled:c,onDisabledClick:c?()=>{}:void 0,"aria-describedby":c?h:void 0})]})]}),children:()=>t.jsxs("div",{className:"trp-result is-on",children:[t.jsxs("header",{className:"trp-result__head",children:[t.jsx("p",{className:"trp-result__eyebrow caption-1",children:p("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")}),t.jsx("h1",{className:"trp-result__title h2",children:p("training.result.title","\uD6C8\uB828\uC744 \uBAA8\uB450 \uB9C8\uCCE4\uC2B5\uB2C8\uB2E4.")}),s&&t.jsx("p",{className:"trp-result__subtitle body-3",children:s}),t.jsx("div",{className:"trp-score",children:t.jsxs("div",{className:"trp-score__figure","aria-label":p("training.result.scoreAria",{correct:x,total:C}),children:[t.jsx("span",{className:"trp-score__big",children:x}),t.jsx("span",{className:"trp-score__sep",children:"/"}),t.jsx("span",{className:"trp-score__total",children:C})]})})]}),B.length>0&&t.jsx("section",{className:"trp-result__body",children:t.jsxs("div",{className:`result-table${j?" result-table--answer":""}`,role:"table","aria-label":p("training.result.tableAriaLabel","\uBB38\uD56D\uBCC4 \uD310\uC815"),children:[t.jsxs("div",{className:"result-table__head caption-1",role:"row",children:[t.jsx("span",{role:"columnheader",children:p("common.col.problem","\uBB38\uC81C")}),j&&t.jsx("span",{role:"columnheader",children:p("training.result.colAnswerSelected","\uC815\uB2F5 \xB7 \uC120\uD0DD")}),t.jsx("span",{className:"col-right",role:"columnheader",children:p("training.result.colJudge","\uD310\uC815")})]}),B.map((k,E)=>t.jsxs("div",{className:"result-table__row",role:"row",children:[t.jsxs("div",{className:"trp-row__problem",children:[t.jsx("span",{className:"trp-row__no caption-1",children:String(E+1).padStart(2,"0")}),t.jsx("div",{className:"trp-row__q body-2",children:k.problem}),k.canHear&&t.jsx(be,{htmlType:"button",size:32,type:"dot",useBorder:!1,icon:v===E?"square":"volume-2",className:"trp-row__replay",ariaLabel:v===E?p("training.result.replaySoundStop",{no:E+1,defaultValue:"{{no}}\uBC88 \uB4E3\uAE30 \uBA48\uCDA4"}):p("training.result.replaySound",{no:E+1,defaultValue:"{{no}}\uBC88 \uB2E4\uC2DC \uB4E3\uAE30"}),onClick:()=>v===E?g():A(E,k.problem,k.sound)})]}),j&&t.jsxs("div",{className:"trp-row__answers",children:[k.answer!==null&&t.jsxs("div",{className:"trp-row__answer-line",children:[t.jsx("span",{className:"trp-row__answer-label answer-correct caption-1",children:p("training.result.colAnswer","\uC815\uB2F5")}),t.jsx("span",{className:"trp-row__answer-value body-2",children:k.answer})]}),t.jsxs("div",{className:"trp-row__answer-line",children:[t.jsx("span",{className:`trp-row__answer-label answer-selected caption-1 ${k.isCorrect?"is-correct":"is-wrong"}`,children:p("training.result.colSelected","\uC120\uD0DD")}),t.jsx("span",{className:`trp-row__answer-value body-2 ${k.isCorrect?"is-correct":"is-wrong"}`,children:k.selectedText??"\u2014"})]})]}),t.jsx("div",{className:"trp-row__judge",children:t.jsx(un,{variant:k.variant,label:k.label,fill:"soft",minWidth:80})})]},E))]})})]})})}const Gs=new Set;function Rw(e){o.useEffect(()=>{if(!e||Gs.has(e))return;Gs.add(e);const n=()=>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)};n()&&i();const c=()=>{if(u(),a==null)return;const h=s-l;if(h<1e3||l===0&&s<5e3)return;const d=Date.now(),f=d-h;l=s,ng({trainingType:e,startedAt:new Date(f).toISOString(),endedAt:new Date(d).toISOString()})},p=()=>{n()?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(),Gs.delete(e)}},[e])}function Qr(e,n){return e&&e.id||`page-${n??0}`}function eo(e,n){return e&&e.key||`step-${n??0}`}function to(){return{pageIndex:0,stepIndex:0,answersByPage:{}}}function Pw(e,n){return typeof e?.props=="function"?e.props(n)||{}:e?.props||{}}const Fw=300,Iw=()=>{try{return typeof window<"u"&&!!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches}catch{return!1}},Kn=Object.freeze({}),Id=new Set(["LISTEN_IN_NOISE","SHORT_STORY","LONG_STORY","ORDERING_SENTENCE"]);function Ks(e){const n=e,a=n?.results||n?.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=>t.jsx(Fd,{score:e.score,contextsLength:e.contextsLength,results:e.results,onReplay:e.onReplay,onClose:e.onClose,pending:e.pending});function zw(e){const{scenario:n,title:a,subTitle:r,depth:s,icon:l,wrapperStyle:i,iconTooltip:u,pageIndex:c,pageCount:p,stepIndex:h,stepCount:d,onBack:f,onComplete:C,onRoundFinished:x,onNext:y,onSettings:b,useNoiseSetting:v=!0,children:_,ariaLabel:g,label:w,buildResults:N,onResult:m,typeKey:A,entryPoint:B,dailyTotal:j,itemRef:k,renderResultPopup:E,noiseOverride:D,hideNoiseRows:$=!1,inline:V=!1,height:F}=e;Rw(A&&!Id.has(A)?A:"");const U=o.useRef(0);o.useEffect(()=>{U.current=Date.now()},[]);const{t:T}=Ee.useTranslation(),z=m,W=!!n,ie=n?.id||null,Q=n?.meta||{},L=Array.isArray(n?.pages)?n.pages:[],J=Array.isArray(_)||o.isValidElement(_)&&typeof _!="function"?o.Children.toArray(_).filter(o.isValidElement):[],ee=J.length>0,q=me=>me===Xr||me?.__isTrainingPage===!0,P=ee&&J.some(me=>q(me.type)),R=P?J.filter(me=>q(me.type)).map((me,je)=>{const We=me.props||{};return{id:`children-page-${je}`,steps:o.Children.toArray(We.children).filter(o.isValidElement),pageTop:We.pageTop||We.top||null,pageBottom:We.pageBottom||We.bottom||null}}):[{id:"children-page-0",steps:J}],S=ee&&!W&&typeof _!="function",H=S?Math.max(1,R.length):0;o.useEffect(()=>{if(!V&&!(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(V||typeof document>"u"||!document.body)return;const me=document.body;return me.dataset.ihabTrainingPopupCount=String(Number(me.dataset.ihabTrainingPopupCount||"0")+1),me.classList.add("ihab-training-popup-open"),()=>{const je=Number(me.dataset.ihabTrainingPopupCount||"1")-1;je>0?me.dataset.ihabTrainingPopupCount=String(je):(delete me.dataset.ihabTrainingPopupCount,me.classList.remove("ihab-training-popup-open"))}},[]),o.useEffect(()=>{if(!V&&!(typeof document>"u"||!document.body))return Zv()},[]);const[ne,te]=o.useState({...fa,enabled:!1}),ue=o.useRef(ne);o.useEffect(()=>{ue.current=ne},[ne]);const se=o.useRef(D),pe=o.useRef(!1),G=o.useRef(null);o.useEffect(()=>{let me=!1;const je=We=>{if(me)return;pe.current=!0;const Y=We?ma({...fa,enabled:!1},We):{...fa},de=G.current;G.current=null;const Be=de?ma(Y,de):Y;ue.current=Be,te(Be),de&&!se.current&&So(Be),kr(Be);const Me=se.current;if(Me){const Ve=typeof Me=="function"?Me(Be):Me,Xe=ma(Be,Ve);ue.current=Xe,te(Xe),kr(Xe)}};return mg().then(We=>{if(me){const Y=G.current;if(G.current=null,Y&&!se.current){const de=We?ma({...fa,enabled:!1},We):{...fa};So(ma(de,Y))}return}je(We)}),()=>{me=!0}},[]);const[K,O]=o.useState(null),[I,re]=o.useState(null),he=o.useCallback((me,je)=>{me==="main"?O(je):re(je)},[]),ae=o.useRef(null),_e=o.useRef(null),De=o.useCallback(()=>{_e.current!==null&&(clearTimeout(_e.current),_e.current=null);const me=ae.current;ae.current=null,me&&So(me)},[]);o.useEffect(()=>{if(typeof window>"u")return;const me=()=>{document.visibilityState==="hidden"&&De()};return window.addEventListener("pagehide",De),document.addEventListener("visibilitychange",me),()=>{window.removeEventListener("pagehide",De),document.removeEventListener("visibilitychange",me),De()}},[De]);const Se=o.useCallback(me=>{const je=ma(ue.current,me);if(ue.current=je,te(je),!pe.current){G.current={...G.current??{},...me},kr(je);return}se.current||(ae.current=je,_e.current!==null&&clearTimeout(_e.current),_e.current=setTimeout(De,Fw)),kr(je)},[De]),Ne=ne.mainSpeed,He=ne.mainVolume,ve=o.useCallback(me=>Se({mainSpeed:me}),[Se]),xe=o.useCallback(me=>Se({mainVolume:me}),[Se]),we=o.useMemo(()=>({settings:ne,setSettings:Se,registerAnalyser:he,mainAnalyser:K,noiseAnalyser:I,playbackRate:Ne,setPlaybackRate:ve,mainVolume:He,setMainVolume:xe}),[ne,Se,he,K,I,Ne,ve,He,xe]),Ae=o.useRef(null),[Ie,ot]=o.useState(0),pt=o.useRef([]),[Oe,Ue]=o.useState("center"),[at,ce]=o.useState(!1),Pe=o.useRef(!1),Ye=o.useRef(null),Qe=o.useCallback(me=>{Pe.current||(Pe.current=!0,ce(!0),Ye.current=setTimeout(()=>{try{me()}catch{Pe.current=!1,ce(!1)}},Iw()?0:iw))},[]);o.useEffect(()=>()=>{Ye.current&&clearTimeout(Ye.current)},[]);const ut=o.useRef(f);o.useEffect(()=>{ut.current=f});const vt=o.useRef(typeof document>"u"?null:document.activeElement);o.useEffect(()=>{if(V)return;const me=Ae.current,je=vt.current;if(Ro(me,je),me){const We=Array.from(me.querySelectorAll($n)).filter(Y=>!Y.closest('[aria-hidden="true"]'))[0];if(We)try{We.focus()}catch{}}return()=>{const We=document.activeElement;if(!We||We===document.body||me&&me.contains(We))try{Po(je)?.focus?.()}catch{}}},[]),o.useEffect(()=>{if(!V)return la(()=>Qe(()=>{const me=ut.current;typeof me=="function"&&me()}))},[Qe,V]),$o(Ae,!V);const[ct,Gt]=o.useState(!1),xt=o.useRef(!1),[lt,st]=o.useState(null),Ot=o.useRef(0),Mt=o.useRef(0),Nt=()=>{Ot.current+=1,Mt.current+=1,st(null)},[Ft,zt]=o.useState(""),[_t,gt]=o.useState(()=>to()),Et=o.useRef(typeof c=="number"?c:null);o.useEffect(()=>{!W&&!S||(gt(to()),Nt())},[W,ie,S]),o.useEffect(()=>{S&&gt(me=>{const je=Math.max(0,Math.min(me.pageIndex,Math.max(0,H-1)));return je!==me.pageIndex?{...me,pageIndex:je,stepIndex:0}:me})},[S,H]);const It=S?Math.max(0,Math.min(_t.pageIndex,H-1)):0,et=S?R[It]:null,wt=S&&et&&Array.isArray(et.steps)?et.steps:[],tt=W?_t.pageIndex:S?It:typeof c=="number"?c:0,fe=W?L[Math.max(0,Math.min(_t.pageIndex,Math.max(0,L.length-1)))]:null,$e=W&&fe&&Array.isArray(fe.steps)?fe.steps:[],Re=W?$e.length:S?wt.length:typeof d=="number"?d:0,ze=W||S?Math.max(0,Math.min(_t.stepIndex,Math.max(0,Re))):typeof h=="number"?h:0,it=W?L.length:S?H:typeof p=="number"?p:0;o.useEffect(()=>{if(!W&&!S)return;const me=W?Qr(fe,tt):et?.id||`children-page-${tt??0}`,je=new Date().toISOString();for(let We=0;We<=ze;We+=1){const Y=W?eo($e[We],We):`step-${We}`,de=Ct(me,Y);Ke.current.has(de)||Ke.current.set(de,je)}},[W,S,tt,ze,et?.id]),o.useLayoutEffect(()=>{const me=Et.current;if(typeof tt=="number"&&me!==null&&tt!==me&&tt>me)try{zt(T("training.problemNotice",{n:tt+1}))}catch{}Et.current=typeof tt=="number"?tt:Et.current},[tt,c,T]),o.useLayoutEffect(()=>{const me=Ae.current;if(!me)return;const je=()=>me.querySelector(".page-popup__scroll");let We=null,Y=null,de=null;const Be=ft=>{const ye=je();if(!ye)return;const M=ye.scrollHeight<=ye.clientHeight;if(Ue(M?"center":"top"),ft&&!xt.current){xt.current=!0;try{Gt(!0)}catch{}try{Xe.disconnect()}catch{}}},Me=()=>{We!==null&&cancelAnimationFrame(We),We=requestAnimationFrame(()=>{Y!==null&&clearTimeout(Y),Y=setTimeout(()=>Be(!0),60)})},Ve=()=>{de!==null&&cancelAnimationFrame(de),de=requestAnimationFrame(()=>Be(!1))};Me(),window.addEventListener("resize",Ve);const Xe=new MutationObserver(Me);Xe.observe(me,{childList:!0,subtree:!0,attributes:!0});const bt=setTimeout(()=>{xt.current||Be(!0)},400);return()=>{window.removeEventListener("resize",Ve),We!==null&&cancelAnimationFrame(We),Y!==null&&clearTimeout(Y),de!==null&&cancelAnimationFrame(de),clearTimeout(bt);try{Xe.disconnect()}catch{}}},[Ae]);const on=o.useCallback(me=>{Ae.current&&(Ae.current._childOnNext=me)},[]),ht=o.useCallback(me=>{Ae.current&&(Ae.current._childOnResult=me)},[]),Ke=o.useRef(new Map),Ct=(me,je)=>`${me}\0${je}`,Bt=o.useCallback((me,je,We)=>{gt(Y=>{const de=Y.answersByPage[me]||{},Be=de[je],Me=qs(We),Ve=qs(Be);if(Be&&Ve>Me)return Y;const Xe=Nd(We,Ke.current.get(Ct(me,je)),Me);return{...Y,answersByPage:{...Y.answersByPage,[me]:{...de,[je]:Xe}}}})},[gt]),X=o.useCallback((me,je,We)=>{const Y=Qr(fe,tt),de=eo(me,je);Bt(Y,de,We)},[fe,tt,Bt]),Ce=o.useCallback((me,je,We)=>{const Y=Qr(fe,tt),de=eo(me,je);Bt(Y,de,We),!We?.allowChange&&me?.autoAdvance!==!1&&gt(Be=>({...Be,stepIndex:Math.max(Be.stepIndex,je+1)}))},[fe,tt,Bt,gt]),Ge=o.useCallback((me,je)=>{const We=et?.id||`children-page-${tt??0}`,Y=typeof je=="number"?je:ze??0,de=`step-${Y}`;Bt(We,de,me),me?.allowChange||gt(Be=>({...Be,stepIndex:Math.max(Be.stepIndex,Y+1)}))},[et,tt,ze,Bt,gt]),Ze=o.useCallback((me,je)=>{const We=et?.id||`children-page-${tt??0}`,Y=`step-${typeof je=="number"?je:ze??0}`;Bt(We,Y,me)},[et,tt,ze,Bt]),rt=S?{currentPageIndex:tt??0,currentStepIndex:ze??0,totalStepsInPage:wt.length,handleStepDone:Ge,handleStepChange:Ze}:null,mt=async()=>{const me=typeof n?.buildResults=="function"?await Promise.resolve(n.buildResults({scenario:n,pages:L,flowState:_t,answersByPage:_t.answersByPage})):null;return typeof z=="function"&&await Promise.resolve(z(me))||me},Dt=async()=>{const me=et?.id||`children-page-${_t.pageIndex}`,je=_t.answersByPage[me]||{},We=P?(()=>{const Be={};let Me=0;return R.forEach(Ve=>{const Xe=_t.answersByPage[Ve.id]||{},bt=Array.isArray(Ve.steps)?Ve.steps.length:0;for(let ft=0;ft<bt;ft+=1){const ye=Xe[`step-${ft}`];typeof ye<"u"&&(Be[`step-${Me+ft}`]=ye)}Me+=bt}),Be})():je;if(typeof N=="function"){const Be=await Promise.resolve(N(We,{pageAnswers:je,answersByPage:_t.answersByPage,pages:R,currentPageId:me}));return typeof z=="function"&&await Promise.resolve(z(Be))||Be}const Y=Object.entries(je).map(([Be,Me],Ve)=>({index:Ve,key:Be,payload:Me})),de={results:Y,answers:Y,score:0};return typeof z=="function"&&await Promise.resolve(z(de))||de},Lt=()=>{const me=++Ot.current,je=()=>me!==Ot.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(W){const de=mt();st(Kn);const Be=de;Promise.resolve(Be).then(Me=>{je()||st(Me||{isEmpty:!0})}).catch(Me=>{!je()&&st({isEmpty:!0})});return}if(S){const de=Dt();st(Kn);const Be=de;Promise.resolve(Be).then(Me=>{je()||st(Me||{isEmpty:!0})}).catch(Me=>{!je()&&st({isEmpty:!0})});return}const We=Ae.current&&Ae.current._childOnResult,Y=de=>{try{return de?de():void 0}catch{return}};if(typeof We=="function"){const de=Y(We);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:On&&On.tagName.toUpperCase()==="SCRIPT"&&On.src||new URL("components.cjs.js",document.baseURI).href}catch{}de&&typeof de.then!="function"?st(de):st(de&&typeof de.then=="function"?Kn:{});const Be=()=>{je()||st(Me=>Me===Kn?{}:Me)};Promise.resolve(de).then(Me=>{Me&&!je()?st(Me):Be()}).catch(Me=>{Be()});return}if(typeof z=="function"){const de=Y(z);try{typeof document>"u"?require("url").pathToFileURL(__filename).href:On&&On.tagName.toUpperCase()==="SCRIPT"&&On.src||new URL("components.cjs.js",document.baseURI).href}catch{}de&&typeof de.then!="function"?st(de):st(de&&typeof de.then=="function"?Kn:{});const Be=()=>{je()||st(Me=>Me===Kn?{}:Me)};Promise.resolve(de).then(Me=>{try{typeof document>"u"?require("url").pathToFileURL(__filename).href:On&&On.tagName.toUpperCase()==="SCRIPT"&&On.src||new URL("components.cjs.js",document.baseURI).href}catch{}Me&&!je()?st(Me):Be()}).catch(Me=>{console.error("viewResults external handler failed",Me),Be()});return}},Dn=()=>{if(W){if(typeof tt=="number"&&typeof it=="number"&&tt<it-1){gt(je=>({...je,pageIndex:je.pageIndex+1,stepIndex:0}));return}return Lt()}if(S){const je=wt.length;if(typeof ze=="number"&&ze<je-1){gt(We=>({...We,stepIndex:We.stepIndex+1}));return}if(typeof tt=="number"&&typeof it=="number"&&tt<it-1){gt(We=>({...We,pageIndex:We.pageIndex+1,stepIndex:0}));return}return Lt()}if(typeof y=="function"){try{y()}catch{}return}const me=Ae.current&&Ae.current._childOnNext;if(typeof me=="function"){try{me()}catch{}return}},Zt=W?Q.title||Q.label||g||T("common.popup","\uD31D\uC5C5"):a||w||(Array.isArray(s)?s[s.length-1]:void 0)||g||T("common.popup","\uD31D\uC5C5"),Sn=g||Zt,cn=W?Q.title??Q.label??Zt:a??w??Zt,Xt=(me,je)=>{const We=Qr(fe,tt),Y=eo(me,je),de=_t.answersByPage[We]?.[Y],Be=Pw(me,{page:fe,pageIndex:tt,step:me,stepIndex:je,storedPayload:de,answersByPage:_t.answersByPage,flowState:_t}),Me={key:Y,index:je,stepIndex:ze,isLast:je===$e.length-1};switch(me?.type){case"listen":return t.jsx(Ws,{...Me,...Be,onDone:Ve=>Ce(me,je,Ve)});case"confirm":return t.jsx(Os,{...Me,...Be,onDone:Ve=>Ce(me,je,Ve),onChange:Ve=>X(me,je,Ve)});case"confirmWithText":return t.jsx(zs,{...Me,...Be,onDone:Ve=>Ce(me,je,Ve),onChange:Ve=>X(me,je,Ve)});case"orderList":return t.jsx(Hs,{...Me,...Be,onDone:Ve=>Ce(me,je,Ve),onChange:Ve=>X(me,je,Ve)});default:return null}},en=o.useRef(void 0);o.useEffect(()=>{const me=en.current;if(en.current=tt,me===void 0||me===tt||!Or())return;const je=Ae.current;if(!je)return;const We=document.activeElement;if(!(!We||We===document.body||!je.contains(We)||We.disabled===!0))return;const Y=je.querySelector(`.training-steps ${$n.split(", ").join(", .training-steps ")}`)??Array.from(je.querySelectorAll($n)).find(de=>!de.closest('[aria-hidden="true"]'));try{Y?.focus()}catch{}},[tt]);const Cn=W?L.length>0?t.jsx("div",{className:"training-steps",children:$e.map((me,je)=>Xt(me,je))},`replay-${Ie}`):t.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:t.jsx("div",{className:"pp-empty",children:n?.emptyMessage||T("training.noQuestions","\uBB38\uC81C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")})}):null,tn=S?t.jsxs(jd.Provider,{value:rt,children:[et?.pageTop?t.jsx("div",{className:"training-page-top",children:et.pageTop}):null,t.jsx("div",{className:"training-steps",children:wt.map((me,je)=>{const We=me;return o.cloneElement(We,{...We.props,_stepIndex:je,_totalSteps:wt.length,_stepKey:`step-${je}`,_pageIndex:tt})})},`replay-${Ie}`),et?.pageBottom?t.jsx("div",{className:"training-page-bottom",children:et.pageBottom}):null]}):null,$t=o.useRef(-1),kt=o.useCallback(()=>{if(!A)return;const me=lt,{results:je,correct:We,total:Y}=Ks(lt),de={correct:We,total:Y,attempt:pt.current.length+1,previousAttempts:[...pt.current]};if($t.current===Mt.current)return de;$t.current=Mt.current,ag({items:hg(je),category:Id.has(A)?"sentence":"word",trainingType:A,entryPoint:B??"sentence",itemRef:k??null,correct:We,total:Y,score:typeof me?.score=="number"?me.score:null,durationSeconds:Math.max(0,Math.round((Date.now()-U.current)/1e3)),dailyTotal:j??null});try{x?.(de)}catch{}return de},[A,B,j,k,lt,x]);o.useEffect(()=>{!lt||lt===Kn||lt?.isEmpty||(Ks(lt).total??0)>0&&kt()},[lt,kt]);const qt=o.useCallback(()=>{const me=kt();Nt(),Qe(()=>{typeof C=="function"&&C(me),typeof f=="function"&&f()})},[C,f,kt,st,Qe]),Rt=o.useCallback(()=>zt(""),[zt]),Tn=o.useCallback(()=>{Qe(()=>{typeof f=="function"&&f()})},[f,Qe]),Mn=t.jsxs("div",{className:`page-popup${at?" page-popup--closing":""}${V?" page-popup--inline":""}${V&&F!=null?" page-popup--has-height":""}`,role:V?"region":"dialog","aria-modal":V?void 0:"true","aria-label":Sn,style:V&&F!=null?{"--page-popup-inline-height":typeof F=="number"?`${F}px`:F}:void 0,children:[t.jsxs("div",{ref:Ae,className:`page-popup__panel ${ct?"":"page-popup__panel--measuring"} ${Oe==="center"?"page-popup__panel--center":Oe==="top"?"page-popup__panel--top":""}`,children:[t.jsx(Bd,{title:cn,subtitle:W?Q.subtitle||Q.label:Array.isArray(s)?s.join(" / "):void 0,desc:W?void 0:r,depth:W?Q.depth:s,icon:W?Q.icon:l,wrapperStyle:W?Q.wrapperStyle:i,iconTooltip:W?Q.iconTooltip:u,progressMax:it,progressIndex:tt,pageIndex:tt,pageCount:it,onBack:V?void 0:Tn,onClose:V?void 0:Tn}),t.jsx("div",{className:"page-popup__scroll",children:t.jsx("div",{className:`page-popup__content ${Oe==="center"?"page-popup__content--center":"page-popup__content--top"}${e.contentFull?" page-popup__content--full":""}`,children:S?tn:W?Cn:typeof _=="function"?_({registerOnNext:on,registerOnResult:ht,panelRef:Ae,setResultOverlay:st}):_})}),t.jsx(wd,{onSettings:b,onNext:Dn,onResult:Lt,useNoiseSettingBtn:!!(W?Q.useNoiseSetting??!0:v),stepIndex:ze,stepCount:Re,pageIndex:tt,pageCount:it,resultOpen:!!(lt&&!lt.isEmpty),hideNoiseRows:$})]}),lt&&!lt.isEmpty&&(E??Ow)({score:lt.score,results:lt.results||lt.answers||[],contextsLength:lt.results?lt.results.length:lt.answers?lt.answers.length:0,onReplay:()=>{if(U.current=Date.now(),lt!==Kn){const{correct:me,total:je}=Ks(lt);pt.current.push({correct:me,total:je})}if(Nt(),ot(me=>me+1),W){if(gt(to()),typeof n?.onReplay=="function")try{n.onReplay()}catch{}return}if(S){gt(to());return}try{const me=Ae.current&&Ae.current._childOnResult;typeof me=="function"&&me({replay:!0})}catch{}},onClose:qt,pending:lt===Kn}),lt?.isEmpty&&t.jsx("div",{className:"page-popup page-popup--result-empty",role:"dialog","aria-modal":"true","aria-label":T("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC"),children:t.jsxs("div",{className:"page-popup__panel page-popup__panel--center",children:[t.jsx("div",{className:"page-popup__scroll",children:t.jsx("div",{className:`page-popup__content page-popup__content--center${e.contentFull?" page-popup__content--full":""}`,children:t.jsx("div",{className:"page-popup__empty",children:T("training.result.eyebrow","\uD6C8\uB828 \uC644\uB8CC")})})}),t.jsx("div",{className:"page-popup__bottom",children:t.jsx(be,{htmlType:"button",variant:"main",size:48,onClick:qt,label:T("training.result.done","\uC644\uB8CC")})})]})}),t.jsx(Ta,{message:Ft,position:"top",onClose:Rt})]}),Fn=t.jsx($s.Provider,{value:we,children:Mn});return V?Fn:typeof document<"u"&&document.body?gn.createPortal(Fn,document.body):Fn}const aa=zw;aa.Page=Xr,aa.ListenStep=Dd,aa.ConfirmStep=Sd,aa.ConfirmWithTextStep=Td,aa.OrderListStep=Md,aa.CardStep=$d,aa.CardOrderStep=kw;function Ww(e=[]){const n=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"),f=d?d.getBoundingClientRect().width:0;if(f<=u+.5)continue;const C=Math.min(i.length,Math.ceil((f+c)/(u+c)));C<=1||(h.style.gridColumn=`span ${C}`,h.setAttribute("data-wide",""))}},[]),r=o.useCallback(()=>{const s=n.current;if(s)for(const l of s.querySelectorAll(".word-search-result-block__items"))a(l)},[a]);return o.useLayoutEffect(()=>{r();const s=n.current;if(!s||typeof ResizeObserver>"u")return;const l=new ResizeObserver(()=>r());return l.observe(s),()=>l.disconnect()},[r,...e]),n}function Hw({label:e,homonum:n}){const a=_a()?.(e,n)??"",{imgRef:r,loading:s,hasImage:l,onLoad:i,onError:u}=Cs(a);return l?t.jsxs("div",{className:le("word-image-tooltip__cell"),children:[s&&t.jsx("div",{className:le("word-image-tooltip__spinner")}),t.jsx("img",{ref:r,src:a,alt:e,draggable:!1,style:{opacity:s?0:1},onLoad:i,onError:u})]}):t.jsx("div",{className:le("word-image-tooltip__cell word-image-tooltip__cell--text h3"),children:t.jsx("span",{children:e})})}function Od({words:e,anchorRect:n}){const a=o.useRef(null),[r,s]=o.useState(null);return o.useLayoutEffect(()=>{if(!n||!a.current)return;const{offsetWidth:l,offsetHeight:i}=a.current,u=window.innerWidth,c=window.innerHeight,p=8,h=n.top,d=c-n.bottom,f=h>=i+p*2||h>d,C=(b,v)=>Math.min(Math.max(p,b),Math.max(p,v)),x=C(n.left+n.width/2-l/2,u-l-p),y=C(f?n.top-i-p:n.bottom+p,c-i-p);s({left:x,top:y})},[n]),!n||e.length===0?null:gn.createPortal(t.jsx("div",{ref:a,className:le("word-image-tooltip"),style:{visibility:r?"visible":"hidden",left:r?.left??0,top:r?.top??-9999},children:t.jsx("div",{className:le("word-image-tooltip__cells"),children:e.map(l=>t.jsx(Hw,{label:l.label,homonum:l.homonum},`${l.label}_${l.homonum??1}`))})}),document.body)}function Vw({titleIcon:e,resultCount:n,resultUnit:a,searchQuery:r,items:s,groups:l,selected:i=[],onSelect:u,maxSelect:c,onClearSelection:p,onPrint:h,onPrintEmpty:d,className:f,emptyHint:C,showEmptyText:x=!0,sectionType:y="page",disc:b}){const v=_n()??mn,{t:_,i18n:g}=Ee.useTranslation(),w=g.language?.startsWith("ko")??!1,{anchorRect:N,openAt:m,close:A}=Mr(),[B,j]=o.useState(null),k=o.useCallback(()=>{A(),j(null)},[A]);C2(k,!!B);const E=(r??"").trim(),D=/^[^,[\]\s]+$/.test(E)?E:"",$=D.length>0,V=r===void 0&&n===void 0,F=$?"match":V?"original":"ganada",[U,T]=o.useState(()=>F),[z,W]=o.useState("50"),[ie,Q]=o.useState(1),[L,J]=o.useState($);L!==$&&(J($),T(F));const ee=U==="match"&&!$||U==="original"&&!V?F:U,q=o.useMemo(()=>[...$?[{value:"match",label:_("wordSearch.sort.match",{defaultValue:"\uC2DC\uC791 \uC6B0\uC120"})}]:[],...V?[{value:"original",label:_("wordSearch.sort.original",{defaultValue:"\uBC1B\uC740 \uC21C\uC11C"})}]:[],{value:"ganada",label:_("wordSearch.sort.ganada",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2191"})},{value:"ganada_desc",label:_("wordSearch.sort.ganadaDesc",{defaultValue:"\uAC00\uB098\uB2E4\uC21C \u2193"})},{value:"syllable",label:_("wordSearch.sort.syllable",{defaultValue:"\uC74C\uC808 \uC218 \u2191"})},{value:"syllable_desc",label:_("wordSearch.sort.syllableDesc",{defaultValue:"\uC74C\uC808 \uC218 \u2193"})},{value:"grade",label:_("wordSearch.sort.grade",{defaultValue:"\uB4F1\uAE09\uC21C \u2191"})},{value:"grade_desc",label:_("wordSearch.sort.gradeDesc",{defaultValue:"\uB4F1\uAE09\uC21C \u2193"})}],[_,$,V]),P=o.useMemo(()=>["10","25","50","100"].map(ve=>({value:ve,label:_("wordSearch.pageSize",{count:Number(ve),defaultValue:`${ve}\uAC1C\uC529 \uBCF4\uAE30`})})),[_]),R=ve=>ve.words?.[0],S=o.useMemo(()=>{const ve=[...D].length,xe=IC(D),we=new Map;return Ae=>{let Ie=we.get(Ae);return Ie===void 0&&(Ie=xe((Ae.words?.[0]?.label??"").slice(0,ve))?0:1,we.set(Ae,Ie)),Ie}},[D]),H=o.useCallback((ve,xe)=>{const we=ot=>R(ot)?.label??"",Ae=ot=>R(ot)?.syllables??[...we(ot)].length,Ie=ot=>(ot.words??[]).reduce((pt,Oe)=>{const Ue=parseInt(Oe.grade??"",10);return Number.isFinite(Ue)&&Ue<pt?Ue:pt},999);switch(ee){case"match":return S(ve)-S(xe)||vn(we(ve),we(xe));case"ganada":return vn(we(ve),we(xe));case"ganada_desc":return vn(we(xe),we(ve));case"syllable":return Ae(ve)-Ae(xe)||vn(we(ve),we(xe));case"syllable_desc":return Ae(xe)-Ae(ve)||vn(we(ve),we(xe));case"grade":return Ie(ve)-Ie(xe)||vn(we(ve),we(xe));case"grade_desc":return Ie(xe)-Ie(ve)||vn(we(ve),we(xe));default:return 0}},[ee,S]),ne=o.useMemo(()=>s.slice().sort(H),[s,H]),te=Number(z)||10,ue=o.useMemo(()=>(l??[]).flatMap(ve=>ve.items.slice().sort(H).map(xe=>({item:xe,label:ve.label}))),[l,H]),se=l?ue.length:ne.length,pe=Math.max(1,Math.ceil(se/te)),G=Math.min(ie,pe),K=o.useMemo(()=>ne.slice((G-1)*te,G*te),[ne,G,te]),O=o.useId(),I=o.useMemo(()=>{if(!l)return null;const ve=ue.slice((G-1)*te,G*te),xe=new Map;for(const{item:we,label:Ae}of ve)xe.has(Ae)||xe.set(Ae,[]),xe.get(Ae).push(we);return[...xe.entries()].map(([we,Ae])=>({label:we,items:Ae}))},[l,ue,G,te]);o.useEffect(()=>{Q(1)},[U,z,se,r]);const re=se>0?t.jsxs("div",{className:"word-search-result-block__toolbar",children:[t.jsx(An,{size:v,options:q,value:ee,onChange:T,ariaLabel:_("wordSearch.sort.aria",{defaultValue:"\uC815\uB82C"})}),t.jsx(An,{size:v,options:P,value:z,onChange:W,ariaLabel:_("wordSearch.pageSizeAria",{defaultValue:"\uD398\uC774\uC9C0 \uD06C\uAE30"})}),t.jsx(as,{page:G,totalPages:pe,onChange:Q})]}):void 0,he=ve=>{u&&u(ve)},ae=n!==void 0&&a?t.jsxs(t.Fragment,{children:[_("wordSearch.resultTitlePrefix","\uCD1D "),t.jsx("span",{style:{color:"var(--color-main)"},children:n}),_("wordSearch.resultTitleSuffix",{unit:w?ZC(a):a})]}):void 0,_e=n!==void 0&&n>0&&c!==void 0&&a?_("wordSearch.resultDisc",{unit:w?JC(a):a,max:c,selected:i.length}):void 0,De=b??_e,Se=l?l.length===0:s.length===0,Ne=Ww([l,K,U,te,ie]),He=Se&&!x&&!C;return t.jsxs(Ma,{type:y,className:ke("word-search-result-block",f),children:[t.jsxs("div",{ref:Ne,className:ke("word-search-result-block__inner",He&&"word-search-result-block__inner--head-only"),children:[(ae||re||De)&&t.jsxs("div",{className:"word-search-result-block__head",children:[t.jsxs("div",{className:"word-search-result-block__head-main",children:[e&&t.jsx(dt,{icon:e,className:"word-search-result-block__head-icon"}),ae&&t.jsx("span",{className:"word-search-result-block__title h3",children:ae})]}),re&&t.jsx("div",{className:"word-search-result-block__head-actions",children:re}),De&&t.jsx("div",{className:"word-search-result-block__head-disc body-3",children:De})]}),Se&&(x||C)&&t.jsxs("div",{className:"word-search-result-block__empty-wrap",children:[x&&t.jsx("p",{className:"word-search-result-block__empty body-3",children:_("wordSearch.emptyResult","\uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.")}),C&&t.jsx("p",{className:"word-search-result-block__empty-hint body-3",children:C})]}),l?(I??[]).map(ve=>t.jsxs("div",{className:"word-search-result-block__group",role:"group","aria-labelledby":`${O}-${ve.label}`,children:[t.jsx("div",{className:"word-search-result-block__group-label caption-1b",id:`${O}-${ve.label}`,children:ve.label}),t.jsx("div",{className:"word-search-result-block__items",children:ve.items.map(xe=>{const we=i.includes(xe.id);return t.jsx("div",{onMouseEnter:Ae=>{m(Ae.currentTarget),j(xe.words??[])},onMouseLeave:k,children:t.jsx(be,{htmlType:"button",size:"word",align:"grid",label:(xe.words??[]).map(Ae=>Ae.label),subLabel:(xe.words??[]).some(Ae=>Ae.subLabel)?(xe.words??[]).map(Ae=>Ae.subLabel):void 0,selected:we,onClick:()=>he(xe.id),minWidth:200})},xe.id)})})]},ve.label)):t.jsx("div",{className:"word-search-result-block__items",children:K.map(ve=>{const xe=i.includes(ve.id);return t.jsx("div",{onMouseEnter:we=>{m(we.currentTarget),j(ve.words??[])},onMouseLeave:k,children:t.jsx(be,{htmlType:"button",size:"word",align:"grid",label:(ve.words??[]).map(we=>we.label),subLabel:(ve.words??[]).some(we=>we.subLabel)?(ve.words??[]).map(we=>we.subLabel):void 0,selected:xe,onClick:()=>he(ve.id),minWidth:200})},ve.id)})}),B&&N&&t.jsx(Od,{words:B,anchorRect:N})]}),(p||h)&&t.jsxs("div",{className:"word-search-result-block__actions",children:[p&&t.jsx(be,{htmlType:"button",size:"56",type:"bar",label:_("common.resetSelection","\uC120\uD0DD \uCD08\uAE30\uD654"),selected:!1,disabled:i.length===0,onClick:i.length===0?void 0:p}),h&&t.jsx("div",{onClick:i.length===0?d:void 0,children:t.jsx(be,{htmlType:"button",size:"56",type:"bar",variant:"main",label:_("wordTable.title","\uB2E8\uC5B4 \uD45C \uB9CC\uB4E4\uAE30"),disabled:i.length===0,onClick:i.length===0?void 0:h})})]})]})}function qw(e,n){return n.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:n,count:a,onCountChange:r,maxCount:s=4,minCount:l=1,combinationSections:i,combinationSectionsForSlot:u,onSelect:c,placeholder:p="-",className:h,title:d,titleIcon:f,disc:C,showInfoButton:x=!0,onClearPhoneme:y,onSearch:b,onSearchEmpty:v,searchDisabled:_=!1,searchLabel:g,searchChecking:w=!1,pairMode:N=!1,sectionType:m="page",beforeSearchContent:A,beforeContent:B,afterContent:j,hideCountControl:k=!1,ordinal:E=!1}){const{t:D}=Ee.useTranslation(),$=o.useMemo(()=>D("wordPairs.infoNotes",{returnObjects:!0}),[D]),V=o.useMemo(()=>Array.from({length:s-l+1},(P,R)=>{const S=l+R;return{key:String(S),label:D("wordPairs.count",{n:S})}}),[D,s,l]),F=o.useMemo(()=>D("wordPairs.ordinals",{returnObjects:!0}),[D]),U=o.useCallback(P=>E?D("wordPairs.phonemeOrdinalLabel",{ordinal:F[P-1]??P}):a===1?D("wordPairs.phonemeSingleLabel","\uC74C\uC808"):D("wordPairs.phonemeN",{n:P}),[E,F,a,D]),T=o.useCallback(P=>E?D("wordPairs.phonemeContrastOrdinalLabel",{ordinal:F[P-1]??P}):a===1?D("wordPairs.phonemeContrastSingleLabel","\uB300\uB9BD \uC74C\uC808"):D("wordPairs.phonemeContrast",{n:P}),[E,F,a,D]),z=o.useCallback((P,R)=>R?t.jsxs(t.Fragment,{children:[P,t.jsx("span",{className:"phoneme-select-block__required",children:"*"})]}):P,[]),{anchorRect:W,toggleAt:ie,close:Q}=Mr(),L=o.useCallback(P=>r(Number(P)),[r]),J=wn("(max-width: 767px)"),ee=o.useCallback(P=>qw(P,e).map(({label:R,value:S,displayLabel:H})=>{const ne=!!S&&S!=="\uC5C6\uC74C";return t.jsxs("span",{className:ke("phoneme-select-block__cell-jamo-part",S?"":"phoneme-select-block__cell-jamo-part--empty",ne?"":"phoneme-select-block__cell-jamo-part--no-label"),children:[t.jsx("span",{className:`phoneme-select-block__cell-jamo-char h1${S==="\uC5C6\uC74C"?" phoneme-select-block__cell-jamo-char--excluded":""}`,children:S==="\uC5C6\uC74C"?"x":S||p}),ne&&t.jsx("span",{className:"phoneme-select-block__cell-jamo-label caption-2",children:H??R})]},R)}),[e,p]),q=t.jsxs(t.Fragment,{children:[t.jsx("div",{"data-tooltip-ignore":!0,children:t.jsx(be,{htmlType:"button",size:40,type:J?"dot":void 0,icon:"info",label:J?void 0:D("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),ariaLabel:D("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),className:W?"is-selected":void 0,"aria-expanded":!!W,"aria-haspopup":"dialog",onClick:P=>ie(P.currentTarget)})}),W&&t.jsx(Qn,{title:D("wordPairs.caution","\uC720\uC758\uC0AC\uD56D"),items:$,anchorRect:W,onClose:Q})]});return t.jsxs(Ma,{type:m,title:d,icon:f,disc:C,action:x?q:void 0,className:ke("phoneme-select-block",h),children:[B,!k&&t.jsx("div",{className:"phoneme-select-block__controls",children:t.jsx(kn,{options:V,value:String(a),onChange:L,size:40,ariaLabel:D("wordPairs.countLabel","\uC74C\uC18C \uAC1C\uC218"),className:"phoneme-select-block__count-control"})}),t.jsx("div",{className:"phoneme-select-block__cells",children:N?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((P,R)=>{const S=n[R*2]??{};return t.jsxs("div",{className:"phoneme-select-block__cell",children:[t.jsx("div",{className:"phoneme-select-block__cell-circle",children:t.jsx("div",{className:"phoneme-select-block__cell-jamo",children:ee(S)})}),t.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:U(R+1)})]},R)})}),t.jsx("span",{className:"phoneme-select-block__cell-vs h3",children:D("wordPairs.phonemeSelect.vs","\uB300")}),t.jsx("div",{className:"phoneme-select-block__cell-group",children:Array.from({length:a}).map((P,R)=>{const S=n[R*2+1]??{};return t.jsxs("div",{className:"phoneme-select-block__cell",children:[t.jsx("div",{className:"phoneme-select-block__cell-circle",children:t.jsx("div",{className:"phoneme-select-block__cell-jamo",children:ee(S)})}),t.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:T(R+1)})]},R)})})]}):n.map((P,R)=>t.jsxs("div",{className:"phoneme-select-block__cell",children:[t.jsx("div",{className:"phoneme-select-block__cell-circle",children:t.jsx("div",{className:"phoneme-select-block__cell-jamo",children:ee(P)})}),t.jsx("span",{className:"phoneme-select-block__cell-index caption-1",children:U(R+1)})]},R))}),(i||u)&&t.jsx("div",{className:"phoneme-select-block__panels",children:t.jsx("div",{className:"phoneme-select-block__detail",children:N?t.jsxs("div",{className:"phoneme-select-block__pair-panels",children:[t.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((P,R)=>{const S=n[R*2]??{};return t.jsx(Gn,{title:z(U(R+1),R===0),sections:u?u(S,R*2):i,selected:S,onSelect:c?.(R*2),align:"newline"},R)})}),t.jsx("div",{className:"phoneme-select-block__panel-group",children:Array.from({length:a}).map((P,R)=>{const S=n[R*2+1]??{};return t.jsx(Gn,{title:T(R+1),sections:u?u(S,R*2+1):i,selected:S,onSelect:c?.(R*2+1),align:"newline"},R)})})]}):n.map((P,R)=>t.jsx(Gn,{title:z(U(R+1),R===0),sections:u?u(P,R):i,selected:P,onSelect:c?.(R),align:"newline"},R))})}),A&&t.jsx("div",{className:"phoneme-select-block__before-search",children:A}),(y||b||w)&&(()=>{const P=n.every(R=>{const S=LC(R);return Object.entries(S).every(([H,ne])=>!ne||H==="coda"&&ne===ti)});return t.jsxs("div",{className:"phoneme-select-block__search-row",onClick:P?v:void 0,children:[y&&t.jsx(be,{htmlType:"button",size:"56",type:"bar",label:D("wordPairs.resetOptions","\uAC80\uC0C9 \uC635\uC158 \uCD08\uAE30\uD654"),selected:!1,disabled:P,onClick:P?void 0:y}),b?t.jsx(be,{htmlType:"button",size:"56",type:"bar",variant:"main",icon:w?t.jsx("span",{className:"phoneme-select-block__spinner","aria-hidden":"true"}):void 0,label:g??D("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30"),disabled:P||_||w,onDisabledClick:w?()=>{}:void 0,"aria-busy":w||void 0,onClick:b}):w?t.jsxs("div",{className:"phoneme-select-block__checking","aria-busy":"true",children:[t.jsx("div",{className:"phoneme-select-block__spinner"}),t.jsx("span",{className:"button-1 phoneme-select-block__checking-label",children:g??D("wordSearch.searchButton","\uAC80\uC0C9\uD558\uAE30")})]}):null]})})(),j]})}function Gw({title:e,sections:n,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:p,className:h}){const{t:d}=Ee.useTranslation();return t.jsx(Gn,{className:h,title:e??d("wordSearch.filterTitle","\uB2E8\uC5B4 \uAC80\uC0C9 \uC124\uC815"),sections:n,selected:a,onSelect:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,headerAction:p,align:"inline"})}function Kw({title:e,headerAction:n,sections:a,selected:r,onSelect:s,className:l}){const{t:i}=Ee.useTranslation();return a.length===0?null:t.jsx(Gn,{className:l,title:e??i("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),headerAction:n,sections:a,selected:r,onSelect:s,align:"newline"})}function Yw({title:e,mode:n,onModeChange:a,matchMode:r,onMatchModeChange:s,positionCount:l,onPositionCountChange:i,inputMode:u,onInputModeChange:c,className:p}){const{t:h}=Ee.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")},f=b=>h("wordPairs.count",{n:b}),C=[{label:d.searchMode,items:[d.include,d.pick,d.explicit],display:"segmented",labelAction:t.jsx(rr,{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:t.jsx(rr,{items:h("wordPairs.filter.phonemeOrderInfo",{returnObjects:!0})})},{label:d.count,items:[f(1),f(2)],display:"segmented"},{label:d.inputMode,items:[d.charInput,d.pronInput],display:"segmented",labelAction:t.jsx(rr,{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.")]})}],x={[d.searchMode]:n==="explicit"?d.explicit:n==="pick"?d.pick:d.include,[d.phonemeOrder]:r==="ordered"?d.orderMatch:d.orderAny,[d.count]:f(l),[d.inputMode]:u==="phoneme"?d.pronInput:d.charInput},y=(b,v)=>{v===d.searchMode?a(b===d.explicit?"explicit":b===d.pick?"pick":"include"):v===d.phonemeOrder?s(b===d.orderMatch?"ordered":"unordered"):v===d.count?i(b===f(2)?2:1):v===d.inputMode&&c(b===d.pronInput?"phoneme":"word")};return t.jsx(Gn,{className:p,title:e??h("wordPairs.filter.searchOptionsTitle","\uB300\uB9BD \uC124\uC815"),sections:C,selected:x,onSelect:y,align:"inline"})}function Zw(e){const{title:n,items:a,columns:r,resizeStorageKey:s,gridTemplateColumns:l,mobileGridTemplateColumns:i,searchPlaceholder:u,searchFn:c,defaultSortKey:p,defaultSortAsc:h=!0,selectedId:d,selectedIds:f,onSelect:C,onClose:x,pageSizeOptions:y=[10,25,50,100],initialPageSize:b,emptyText:v,noMatchText:_,countLabel:g,topContent:w,className:N=""}=e,{t:m}=Ee.useTranslation(),A=u??m("common.search","\uAC80\uC0C9"),B=v??m("common.emptyList","\uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."),j=_??m("common.noMatches","\uB9DE\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"),[k,E]=o.useState(""),[D,$]=o.useState(p??r[0]?.key??""),[V,F]=o.useState(h),[U,T]=o.useState(String(b??y[0]??10)),[z,W]=o.useState(1);o.useEffect(()=>{W(1)},[k,U]);const ie=c!==null,Q=o.useCallback((te,ue)=>{if(!ue)return!0;const se=ue.toLowerCase();return r.some(pe=>{const G=te[pe.key];return G==null?!1:String(G).toLowerCase().includes(se)})},[r]),L=c??Q,J=o.useMemo(()=>{const te=ie?a.filter(ue=>L(ue,k)):a;return D?[...te].sort((ue,se)=>{const pe=ue[D],G=se[D];return pe===G?0:Tr(pe,G,V)}):te},[a,k,D,V,ie,L]),ee=Math.max(1,Math.ceil(J.length/Number(U)));z>ee&&W(ee);const q=Math.min(z,ee),P=J.slice((q-1)*Number(U),q*Number(U)),R=o.useCallback(te=>{D===te?F(ue=>!ue):($(te),F(!0)),W(1)},[D]),S=o.useMemo(()=>{if(typeof g=="function"){const te=J.length,ue=g(te);if(typeof ue=="string"){const se=ue.lastIndexOf(String(te));if(se>=0)return{prefix:ue.slice(0,se),suffix:ue.slice(se+String(te).length)}}return{label:ue}}if(typeof g=="string"&&g.includes("{n}")){const[te,ue]=g.split("{n}");return{prefix:te,suffix:ue}}return{prefix:m("common.totalCountPrefix","\uCD1D "),suffix:m("common.totalCountSuffix","\uAC1C")}},[g,J.length,m]),H=o.useMemo(()=>r.map(te=>({label:te.label,onClick:te.sortable!==!1?()=>R(te.key):void 0,className:te.className,sortDir:te.sortable!==!1&&D===te.key?V?"asc":"desc":null})),[r,D,V,R]),ne=o.useMemo(()=>y.map(te=>({value:String(te),label:m("common.pageSizeLabel",{n:te})})),[y,m]);return t.jsxs(qn,{className:`popup-list ${N}`,title:n,onClose:x,children:[w,"label"in S&&t.jsx("p",{className:"toolbar__count body-1",children:S.label}),t.jsx(rs,{count:"label"in S?void 0:{value:J.length,prefix:S.prefix,suffix:S.suffix},search:ie?{value:k,onChange:E,placeholder:A}:void 0,pageSize:{options:ne,value:U,onChange:T},pagination:{page:q,total:ee,onChange:W}}),t.jsx(ms,{gridTemplateColumns:l,mobileGridTemplateColumns:i,resizable:!0,resizeStorageKey:s,fields:H,items:P,onRowClick:C,renderRow:te=>{const ue=f!=null?te.id!=null&&f.has(te.id):d!=null&&te.id===d;return r.map(se=>({content:se.render?se.render(te):te[se.key]??"",className:ke(se.className,ue&&"popup-list__row--selected")}))},empty:ie&&k!==""&&a.length>0?j:B})]})}function zd(e){const{title:n,message:a,topContent:r,details:s,children:l,confirmLabel:i,cancelLabel:u,hideCancel:c=!1,extraAction:p,confirmVariant:h="main",confirmDisabled:d=!1,onConfirm:f,closeOnConfirm:C=!0,onClose:x,inline:y,size:b="small",className:v,initialFocus:_="close"}=e,{t:g}=Ee.useTranslation(),w=o.useRef(null);o.useEffect(()=>{if(y||_==="close")return;const k=w.current?.closest(".popup-panel"),E=Array.from(k?.querySelectorAll(".popup-footer--buttons button")??[]),D=_==="confirm"?E[E.length-1]:c?void 0:E[p?1:0];D&&!D.disabled&&D.focus()},[]);const N=o.useRef(!1),[m,A]=o.useState(!1),B=k=>{let E=!1;return{close:()=>{E=!0,k()},didClose:()=>E}},j=async k=>{if(N.current)return;N.current=!0;const E=typeof document<"u"?document.activeElement:null;A(!0);let D=!1;try{D=await k()}catch($){typeof console<"u"&&console.error($)}finally{D||(N.current=!1,A(!1),requestAnimationFrame(()=>{const $=document.activeElement;(!$||$===document.body)&&E?.isConnected&&E.focus()}))}};return t.jsxs(qn,{title:n,onClose:x,closeDisabled:m,inline:y,size:b,className:ke("confirm-popup",r!=null&&"confirm-popup--has-top",v),buttons:[...p?[{label:p.label,variant:p.variant??"default",disabled:p.disabled||m,onClick:async({closeWithAnimation:k})=>{await j(async()=>{const E=B(k);await p.onClick(E.close);const D=p.closeOnClick??!0;return D&&k(),D||E.didClose()})}}]:[],...c?[]:[{label:u??g("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:m,onClick:({closeWithAnimation:k})=>k()}],{label:i??g("common.confirm","\uD655\uC778"),variant:h,disabled:d||m,onClick:async({closeWithAnimation:k})=>{await j(async()=>{const E=B(k);return await f(E.close),C&&k(),C||E.didClose()})}}],children:[r!=null&&t.jsx("div",{className:"confirm-popup__top",children:r}),s&&s.length>0&&t.jsx(dr,{children:s.map((k,E)=>t.jsx(fn,{label:k.label,children:t.jsx("span",{className:"panel-row__text body-2",children:k.value})},E))}),t.jsx("p",{ref:w,className:"body-2 confirm-popup__message",children:a}),l]})}function Xw(e,n,a={}){const{t:r}=Ee.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?t.jsx(zd,{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),n()},onClose:()=>l(!1)}):null;return{beforeClose:c,discardPopup:p,allowClose:u}}function Jw({onApply:e,onCancel:n}){const{t:a}=Ee.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 x=>{const y=r.trim();if(y){i(!0),c(null);try{await e(y),x()}catch(b){c(oi(b)),i(!1),requestAnimationFrame(()=>p.current?.focus())}}},[r,e]),f=o.useCallback((x,y)=>{x.key==="Enter"&&!x.nativeEvent.isComposing&&d(y)},[d]),C=x=>{s(x.target.value),c(null)};return t.jsx(qn,{className:"coupon-input-popup",title:a("usage.couponButton","\uCFE0\uD3F0 \uC785\uB825"),size:"small",onClose:n,closeDisabled:l,buttons:[{label:a("common.cancel","\uCDE8\uC18C"),variant:"default",disabled:l,onClick:({closeWithAnimation:x})=>x()},{label:a("coupons.applyButton","\uC801\uC6A9"),variant:"main",disabled:!r.trim()||l,onClick:({closeWithAnimation:x})=>{d(x)}}],children:({closeWithAnimation:x})=>t.jsxs(t.Fragment,{children:[t.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:C,onKeyDown:y=>f(y,x),disabled:l,autoComplete:"off",spellCheck:!1}),u&&t.jsx("p",{id:h,className:"coupon-input-popup__error caption-1",role:"alert",children:u})]})})}const Wd=["var(--color-main)","var(--color-sub)"],Qw=2e3;function e8(e,n){if(!n.startsWith("var("))return n;try{const a=n.slice(4,-1).trim();return getComputedStyle(e).getPropertyValue(a).trim()||null}catch{return null}}function Ys({active:e=!1,count:n=40,duration:a=2e3,strength:r=1,onComplete:s,trigger:l=0}){const i=o.useMemo(()=>{const y=Math.floor(n/2),b=n-y,v=(_,g)=>Array.from({length:_}).map((w,N)=>{const m=6+Math.random()*12,A=Math.round(Math.min(18,m*Math.min(1.5,1+r*.4))),B=Wd[Math.floor(Math.random()*Wd.length)],j=Math.random()*300,k=(360+Math.random()*260)*r*1.2,E=(g==="left"?-95+Math.random()*40:-85-Math.random()*40)*Math.PI/180,D=Math.cos(E)*k,$=Math.sin(E)*k*1.35,V=Math.random()*720-360,F=(1200+Math.random()*3e3)*Math.min(1.6,1+r*.3),U=Math.random()>.7?"50%":"3px";return{id:`${g}-${N}`,side:g,size:A,color:B,delay:j,vx:D,vy:$,angularVel:V,life:F,borderRadius:U}});return[...v(y,"left"),...v(b,"right")]},[n,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),f=o.useRef(null),C=()=>{if(typeof document>"u")return null;let y=document.querySelector("[data-ihab-effect-root]");return y||(y=document.createElement("div"),y.className="app-effect",y.dataset.ihabEffectRoot="",y.style.position="fixed",y.style.inset="0",y.style.pointerEvents="none",y.style.zIndex="99998",document.body.appendChild(y)),y};if(typeof document<"u"&&f.current==null&&(f.current=C()),o.useEffect(()=>{if(!e)return;if(typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches){const Q=setTimeout(()=>h.current?.(),0);return()=>clearTimeout(Q)}const y=1200,b=performance.now(),v=f.current&&f.current!==document.body?f.current.getBoundingClientRect():null,_=Math.max(60,(window.innerHeight||800)*.05),g=Q=>Math.max(40,(Q||window.innerWidth)*.02),w=v?.width||window.innerWidth||375,N=v?.height||window.innerHeight||812,m=Q=>{const L=[...Q].sort((J,ee)=>J-ee);return L[Math.floor(L.length/2)]||1},A=m(i.map(Q=>Math.abs(Q.vy))),B=m(i.map(Q=>Math.abs(Q.vx))),j=Math.sqrt(2*y*(N*.72+_))/A,k=A*j/y,E=w*.5/(B*k),D=(Q,L,J)=>Math.min(J,Math.max(L,Q)),$=D(j,.8,2.4),V=D(E,.7,2.2),F=a>0?a/Qw:1,U=i.map(Q=>({...Q,life:Q.life*F,vx:Q.vx*V,vy:Q.vy*$,startTime:b+Q.delay,ended:!1})),T=v?{x:v.left-g(v.width),y:v.top+v.height+_}:{x:-g(window.innerWidth),y:window.innerHeight+_},z=v?{x:v.left+v.width+g(v.width),y:v.top+v.height+_}:{x:window.innerWidth+g(window.innerWidth),y:window.innerHeight+_},W=Q=>{let L=!1;for(const J of U){const ee=c.current[J.id];if(!ee||!ee)continue;if(Q<J.startTime){ee.style.display="none",L=!0;continue}if(!J._inited){const pe=J.side==="left"?T.x:z.x,G=J.side==="left"?T.y:z.y;ee.style.left=`${pe}px`,ee.style.top=`${G}px`,ee.style.transform="translate3d(0px, 0px, 0)",ee.style.display="block",ee.style.zIndex="100000",typeof J.color=="string"&&J.color.startsWith("var(")&&(ee.style.background=e8(ee,J.color)??"#FF0060"),J._inited=!0}const q=(Q-J.startTime)/1e3;if(q<0)continue;const P=J.life/1e3;if(q>=P){ee.style.opacity="0",ee.style.display="none",J.ended=!0;continue}L=!0;const R=J.side==="left"?T.x:z.x,S=J.side==="left"?T.y:z.y,H=R+J.vx*q,ne=S+J.vy*q+.5*y*q*q,te=(J.angularVel||0)*q,ue=H-R,se=ne-S;ee.style.transform=`translate3d(${ue}px, ${se}px, 0) rotate(${te}deg)`,ee.style.opacity=`${Math.max(0,1-q/P)}`}L?p.current=requestAnimationFrame(W):h.current?.()};p.current=requestAnimationFrame(W);const ie=setTimeout(()=>{try{if((f.current?f.current.querySelectorAll(".confetti"):document.querySelectorAll(".confetti")).length===0&&!document.querySelector(".party-container")){const Q=document.createElement("div");Q.className="party-container",Q.style.position="fixed",Q.style.inset="0",Q.style.pointerEvents="none",Q.style.overflow="visible",Q.style.zIndex="2147483647";for(const L of i){const J=document.createElement("span");J.className=`confetti confetti--${L.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=`${L.size}px`,J.style.height=`${Math.max(4,L.size*.6)}px`,J.style.background=L.color,J.style.borderRadius=L.borderRadius,J.style.transform="translate3d(0,0,0)",J.style.opacity="0",Q.appendChild(J),c.current[L.id]=J}(document.body||f.current).appendChild(Q),d.current=Q}}catch{}},300);return()=>{if(p.current&&cancelAnimationFrame(p.current),clearTimeout(ie),d.current){try{d.current.remove()}catch{}d.current=null}}},[e,a,l,i]),!e)return null;const x=t.jsx("div",{className:"party-container",ref:u,children:i.map(y=>t.jsx("span",{"aria-hidden":!0,ref:b=>{c.current[y.id]=b},className:`confetti confetti--${y.side}`,style:{width:`${y.size}px`,height:`${Math.max(4,y.size*.6)}px`,background:y.color,borderRadius:y.borderRadius}},`${y.id}-${l}`))});return typeof document<"u"?gn.createPortal(x,f.current||document.body):x}const Zs=e=>typeof e=="number"&&Number.isFinite(e)&&e>0?e:void 0;function t8({trigger:e=0,active:n=!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:Zs(u.count),strength:Zs(u.strength),duration:Zs(u.duration)}))};return window.addEventListener("party:trigger",l),()=>window.removeEventListener("party:trigger",l)},[]);const s=o.useCallback(()=>r(null),[]);return t.jsxs(t.Fragment,{children:[t.jsx(Ys,{active:n,trigger:e}),a&&t.jsx(Ys,{active:!0,trigger:a.n,count:a.count,strength:a.strength,duration:a.duration,onComplete:s})]})}function n8({title:e,sub:n,rightAction:a,titleAction:r,badge:s,badgeVariant:l="default",documentTitle:i,onBack:u,backLabel:c,wrap:p=!1}){const{t:h}=Ee.useTranslation();n2(typeof e=="string"?e:i??null);const d=c??h("common.back","\uB4A4\uB85C");return t.jsxs("div",{className:p?"page-title page-title--wrap":"page-title",children:[t.jsxs("div",{className:"page-title__main",children:[t.jsxs("div",{className:"page-title__title-row",children:[u&&t.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}),t.jsx("h1",{className:"page-title__title h1",children:e}),s&&t.jsx("div",{className:"page-title__badge",children:t.jsx(un,{label:s,size:"small",variant:l,fill:"outline"})}),r?t.jsx("div",{className:"page-title__title-action",children:r}):null]}),n&&t.jsx("p",{className:"page-title__sub body-2",children:n})]}),a?t.jsx("div",{className:"page-title__action",children:a}):null]})}function a8(e){return e??""}const Hd=o.createContext({words:[],loading:!1});function r8(){return o.useContext(Hd)}function o8({words:e,loading:n,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c,children:p}){const h=o.useMemo(()=>({words:e,loading:n,error:a,statusMessage:r,localVersion:s,remoteVersion:l,progress:i,clearAndRefetch:u,checkRemoteVersion:c}),[e,n,a,r,s,l,i,u,c]);return t.jsx(Hd.Provider,{value:h,children:p})}function s8({items:e,actions:n,columns:a,flat:r=!1,className:s,style:l}){const i=a??e.length;return t.jsx("section",{className:ke("summary-strip",r&&"summary-strip--flat",s),style:{"--summary-strip-cols":String(i),...l},children:t.jsxs("div",{className:"summary-strip__row",children:[t.jsx("div",{className:"summary-strip__items",children:e.map((u,c)=>t.jsxs("div",{className:"summary-strip__item",children:[t.jsx("p",{className:"summary-strip__label caption-1",children:u.label}),t.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))}),n&&t.jsx("div",{className:"summary-strip__actions",children:n})]})})}const l8=(e,n)=>`${e} / ${n}`;function i8({blocks:e,sectionTitles:n,logo:a,footer:r,pageLabel:s=l8,pageWidth:l,pageHeight:i,margin:u,className:c,style:p}){const{t:h}=Ee.useTranslation(),d=o.useRef(null),f=o.useRef(null),C=o.useRef(null),x=o.useRef(null),[y,b]=o.useState(null),[v,_]=o.useState(!1);o.useEffect(()=>{const F=d.current;if(!F)return;const U=()=>_(F.scrollWidth>F.clientWidth+1);if(U(),typeof ResizeObserver>"u")return;const T=new ResizeObserver(U);return T.observe(F),()=>T.disconnect()},[y]);const g=e.map(F=>`${F.id}\0${F.section??""}\0${F.group??""}`).join(""),w=y&&y.shape===g?y.pages:null,[N,m]=o.useState(0);o.useEffect(()=>{const F=x.current;if(!F||typeof ResizeObserver>"u")return;const U=new ResizeObserver(()=>m(F.offsetHeight));return U.observe(F),()=>U.disconnect()},[]);const[A,B]=o.useState(0);o.useEffect(()=>{const F=f.current;if(!F||typeof ResizeObserver>"u")return;let U=null;const T=typeof requestAnimationFrame=="function"?ie=>requestAnimationFrame(ie):ie=>setTimeout(ie,16),z=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:ie=>clearTimeout(ie),W=new ResizeObserver(()=>{U==null&&(U=T(()=>{U=null,B(ie=>ie+1)}))});return Array.from(F.children).forEach(ie=>W.observe(ie)),()=>{W.disconnect(),U!=null&&z(U)}},[g]),o.useLayoutEffect(()=>{const F=f.current,U=x.current;if(!F||!U)return;const T=P=>P.getBoundingClientRect().height||P.offsetHeight,z=new Map;C.current?.querySelectorAll("[data-chrome-section]").forEach(P=>{z.set(P.dataset.chromeSection??"",T(P))});const W=P=>T(U)-(z.get(P??"")??0),ie=Array.from(F.children).map(P=>T(P)),Q=[];e.forEach((P,R)=>{const S=Q[Q.length-1],H=S?e[S[0]]:void 0;H&&P.group!=null&&H.group===P.group&&H.section===P.section?S.push(R):Q.push([R])});const L=[];let J=[],ee=0;const q=()=>{J.length&&L.push(J),J=[],ee=0};Q.forEach(P=>{const R=P.reduce((H,ne)=>H+ie[ne],0),S=W(e[P[0]].section);J.length&&e[J[0]].section!==e[P[0]].section&&q(),R>S?P.forEach(H=>{J.length&&ee+ie[H]>S+.01&&q(),J.push(H),ee+=ie[H]}):(J.length&&ee+R>S+.01&&q(),P.forEach(H=>J.push(H)),ee+=R)}),q(),b(P=>P&&P.shape===g&&JSON.stringify(P.pages)===JSON.stringify(L)?P:{shape:g,pages:L})},[g,N,l,i,u,A]);const j=Jo,k=j,E=r??t.jsxs(t.Fragment,{children:[t.jsx("img",{src:k,alt:"IHAB",className:"report-doc__logo"}),"\xA9 IHAB, Inc. All rights reserved."]}),D=(F,U,T)=>({header:t.jsxs("div",{className:"report-doc__header",children:[t.jsx("h2",{className:"report-doc__title h3b",children:T!=null&&n?.[T]||null}),a]}),footer:t.jsxs("div",{className:"report-doc__footer caption-1",children:[t.jsx("span",{className:"report-doc__footer-left",children:E}),t.jsx("span",{className:"report-doc__page-no",children:s(F,U)})]})}),$=Array.from(new Set(e.map(F=>F.section??""))),V={...l?{"--report-page-w":l}:null,...i?{"--report-page-h":i}:null,...u?{"--report-margin":u}:null,...p};return t.jsxs("div",{ref:d,className:ke("report-doc",c),style:V,tabIndex:v?0:void 0,role:v?"group":void 0,"aria-label":v?h("report.previewRegion","\uBCF4\uACE0\uC11C \uBBF8\uB9AC\uBCF4\uAE30"):void 0,children:[t.jsxs("div",{className:"report-doc__measure","aria-hidden":!0,children:[t.jsx("div",{ref:x,className:"report-doc__ruler"}),t.jsx("div",{ref:C,children:$.map(F=>{const U=D(1,1,F||void 0);return t.jsxs("div",{"data-chrome-section":F,children:[U.header,U.footer]},F)})}),t.jsx("div",{ref:f,className:"report-doc__measure-blocks",children:e.map(F=>t.jsx("div",{children:F.content},F.id))})]}),w&&t.jsx("div",{className:"report-doc__pages",children:w.map((F,U)=>{const{header:T,footer:z}=D(U+1,w.length,e[F[0]].section);return t.jsxs("section",{className:"report-doc__page",children:[T,F.map(W=>t.jsx("div",{children:e[W].content},e[W].id)),z]},U)})})]})}function u8({title:e,fields:n,columns:a=4,className:r,style:s}){return t.jsxs("div",{className:ke("report-info",r),style:{"--report-info-cols":String(a),...s},children:[e&&t.jsx("p",{className:"report-info__title h5b",children:e}),t.jsx("div",{className:"report-info__grid",children:n.map((l,i)=>t.jsxs("div",{className:"report-info__field body-2",children:[t.jsx("span",{className:"report-info__label body-3",children:l.label}),t.jsx("span",{className:"report-info__value",children:l.value})]},i))})]})}const ba=new Map;let no=null;const c8=12;function d8(e){for(let n=e.parentElement;n&&n!==document.body;n=n.parentElement){const a=window.getComputedStyle(n);if(a.transform&&a.transform!=="none"||a.filter&&a.filter!=="none"||a.perspective&&a.perspective!=="none"||/paint|layout|strict|content/.test(a.contain||""))return n}return document}function ao(){const e=new Map;for(const n of ba.keys()){if(!n.isConnected)continue;const a=d8(n),r=e.get(a)??[];r.push(n),e.set(a,r)}for(const n of e.values()){n.sort((r,s)=>r.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1);let a=0;for(const r of n){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+c8)}}}function p8(e){return typeof window>"u"?()=>{}:(ba.set(e,(ba.get(e)??0)+1),ba.get(e)===1&&typeof ResizeObserver<"u"&&(no??(no=new ResizeObserver(()=>ao())),no.observe(e)),ao(),()=>{const n=(ba.get(e)??1)-1;if(n>0){ba.set(e,n),ao();return}ba.delete(e),no?.unobserve(e),e.style.removeProperty("--update-alert-stack-offset"),ao()})}function h8({title:e,message:n,actionLabel:a,onAction:r,icon:s,onClose:l,className:i=""}){const{t:u}=Ee.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,f=d?.parentElement?.closest(".update-alert-stack")??d,C=f?p8(f):null;return()=>{C?.(),h.current&&d&&d.contains(document.activeElement)&&Nr(d)}},[]),t.jsxs("div",{ref:p,className:ke("update-alert",i),role:"alert",children:[l&&t.jsx("button",{type:"button",className:"update-alert__close",onClick:()=>{h.current=!0,l()},"aria-label":u("common.close","\uB2EB\uAE30"),children:"\xD7"}),t.jsxs("div",{className:"update-alert__top",children:[t.jsx("div",{className:"update-alert__icon",children:s??t.jsx(cl,{size:20,strokeWidth:2})}),t.jsxs("div",{className:"update-alert__body",children:[t.jsx("div",{className:"update-alert__title h4",children:e}),t.jsx("div",{className:"update-alert__message body-3",children:n})]})]}),r&&t.jsx(be,{htmlType:"button",size:32,variant:"main",shape:"pill",className:"update-alert__action",onClick:r,children:c})]})}function m8({title:e,titleLevel:n=3,category:a,categoryVariant:r="main",description:s,topActions:l,actions:i,children:u,footerLeft:c,footerRight:p,ariaLabel:h,onClick:d,draggable:f,onDragStart:C,onDragEnd:x,className:y}){const b=n?`h${n}`:"div",{t:v}=Ee.useTranslation(),[_,g]=o.useState(null),w=o.useCallback(()=>g(null),[]),N=o.useCallback(E=>{const D=E.currentTarget.getBoundingClientRect();g($=>$?null:{left:D.left,right:D.right,top:D.top,bottom:D.bottom,width:D.width,height:D.height,x:D.x,y:D.y})},[]),m=(i??[]).filter(Boolean),A=(m.length===1?t.jsx(be,{htmlType:"button",type:"dot",size:40,icon:m[0].icon,ariaLabel:m[0].label,showTooltipInfo:m[0].label,selected:m[0].selected,disabled:m[0].disabled,variant:m[0].variant??"transparent-lightGray",useBorder:!1,onClick:m[0].onClick}):m.length>1?t.jsx(be,{htmlType:"button",type:"dot",size:40,icon:"ellipsis",ariaLabel:v("common.more","\uB354\uBCF4\uAE30"),showTooltipInfo:v("common.more","\uB354\uBCF4\uAE30"),variant:"transparent-lightGray",useBorder:!1,"aria-haspopup":"menu","aria-expanded":!!_,onClick:N}):null)??l,B=c!=null||p!=null,j=u!=null&&u!==!1,k=o.useCallback(E=>{d&&E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),d())},[d]);return t.jsxs("div",{className:ke("training-card",d?"training-card--clickable":"",y),onClick:d,onKeyDown:d?k:void 0,role:d?"button":void 0,"aria-label":d?h??(typeof e=="string"?e:void 0):void 0,tabIndex:d?0:void 0,draggable:f,onDragStart:C,onDragEnd:x,children:[t.jsxs("div",{className:"training-card__header",children:[a!=null?t.jsx("p",{className:ke("training-card__category","caption-1",r==="sub"&&"training-card__category--sub"),children:a}):t.jsx("p",{className:"training-card__category caption-1","aria-hidden":"true",children:" "}),t.jsxs("div",{className:"training-card__title-row",children:[typeof e=="string"?t.jsx(b,{className:"training-card__title h4",children:e}):e,A!=null&&t.jsx("div",{className:"training-card__top-actions",onClick:E=>E.stopPropagation(),children:A})]}),s!=null?typeof s=="string"?t.jsx("p",{className:"training-card__description body-3",children:s}):s:t.jsx("p",{className:"training-card__description body-3","aria-hidden":"true",children:" "})]}),j?t.jsx("div",{className:"training-card__body",children:u}):t.jsx("div",{className:"training-card__body training-card__body--empty","aria-hidden":"true"}),B?t.jsxs("div",{className:"training-card__footer",children:[c!=null&&t.jsx("div",{className:"training-card__footer-left",children:c}),p!=null&&t.jsx("div",{className:"training-card__meta",children:p})]}):t.jsx("div",{className:"training-card__footer training-card__footer--empty","aria-hidden":"true"}),_&&m.length>1&&t.jsx("div",{className:"training-card__menu-host",onClick:E=>E.stopPropagation(),children:t.jsx(Bn,{anchorRect:_,onClose:w,ariaLabel:v("tooltip.menu","\uBA54\uB274"),children:t.jsx(Na,{columns:[{items:m.map(E=>({label:E.label,icon:E.icon,selected:E.selected,disabled:E.disabled,onClick:E.onClick}))}],onClose:w,size:"small"})})})]})}function f8({title:e,titleLevel:n=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:f,onDrop:C,children:x,className:y}){const{t:b}=Ee.useTranslation(),v=o.useId(),_=n?`h${n}`:"span",g=s!=null,w=ke("training-card-group",h&&"training-card-group--dragover",r&&"training-card-group--collapsed",g&&"training-card-group--collapsible",y);return t.jsxs("div",{className:w,onDragOver:d,onDragLeave:f,onDrop:C,role:typeof e=="string"&&e?"group":void 0,"aria-labelledby":typeof e=="string"&&e?v:void 0,children:[t.jsxs("header",{className:"training-card-group__header",children:[g&&t.jsx(be,{htmlType:"button",size:40,type:"dot",variant:"transparent-gray",useBorder:!1,icon:r?"chevron-right":"chevron-down",ariaLabel:typeof e=="string"&&e?r?b("common.expandFor",{name:e}):b("common.collapseFor",{name:e}):r?b("common.expand","\uD3BC\uCE58\uAE30"):b("common.collapse","\uC811\uAE30"),className:"training-card-group__chevron","aria-expanded":!r,onClick:s}),typeof e=="string"?t.jsx(_,{id:v,className:"training-card-group__title h5b",children:e}):e,a!==void 0&&t.jsx("span",{className:"training-card-group__count body-3b",children:a}),(l!=null||i||u!=null)&&t.jsxs("span",{className:"training-card-group__actions",onClick:N=>N.stopPropagation(),children:[l,i&&t.jsx(An,{size:40,options:i.options,value:i.value,placeholder:i.placeholder,onChange:i.onChange,ariaLabel:typeof e=="string"&&e?b("common.sortFor",{name:e}):void 0}),u]})]}),!r&&(c?t.jsx("div",{className:"training-card-group__empty body-3",children:p}):t.jsx("div",{className:"training-card-group__grid",children:x}))]})}const C8="speechear:saved_word_tables";function g8(e){if(typeof e!="object"||e===null)return!1;const n=e;return typeof n.id=="string"&&typeof n.name=="string"&&Array.isArray(n.items)}function b8(){try{const e=localStorage.getItem(C8);if(!e)return[];const n=JSON.parse(e);return Array.isArray(n)?n.filter(g8):[]}catch{return[]}}function Vd(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 Xs(e){return e.map(n=>n.homonum!=null?`${n.word}#${n.homonum}`:n.word).join("|")}function y8(e){const n=new Set;return e.map(a=>{let r=a.id;for(let s=2;n.has(r);s++)r=`${a.id}~${s}`;return n.add(r),r===a.id?a:{...a,id:r}})}function v8({title:e,titleIcon:n,disc:a,filterTitle:r,filterCollapsible:s,filterDefaultCollapsed:l,filterCollapsed:i,onFilterCollapsedChange:u,filterHeaderSummary:c,brand:p,code:h,baseItem:d,baseContentTypes:f,cellCapacity:C,maxItemsPerPage:x,items:y,onSaveComplete:b,onLoad:v,onRemoveItem:_,onCopyItem:g,onReplaceItem:w,onPickForm:N,onReset:m,resetLabel:A,saveButtonLabel:B,secondarySaveButtonLabel:j,onReorder:k,showCellCount:E,onAddItem:D,fillerAdd:$,className:V,renderSavePopup:F,renderWordSearch:U,hideControls:T,saveOnly:z,tableName:W,nameValue:ie,onNameChange:Q,descriptionValue:L,onDescriptionChange:J,namePlaceholder:ee,descriptionPlaceholder:q,existingNames:P,editingName:R,onCancel:S,initialItemsPerPage:H,onItemsPerPageChange:ne,renderCellAction:te,actionsLeftExtra:ue}){const{t:se}=Ee.useTranslation(),pe=A??se("wordPrint.clearAllSelection","\uBAA8\uB450 \uC120\uD0DD \uD574\uC81C"),G=y===void 0,K=!!Q,[O,I]=o.useState([]),re=(ie??"").trim(),he=re||(ee??"").trim(),ae=(L??"").trim()||(q??"").trim(),_e=(P??[]).map(Te=>Te.trim().toLowerCase()),De=[R?.trim().toLowerCase(),...O].filter(Te=>!!Te),Se=[..._e];for(const Te of De){const Je=Se.indexOf(Te);Je!==-1&&Se.splice(Je,1)}const Ne=re!==""&&Se.includes(re.toLowerCase()),[He,ve]=o.useState(Array(4).fill(null)),[xe,we]=o.useState(4),[Ae,Ie]=o.useState(null),ot=He.slice(0,xe),pt=!!p?.show,[Oe,Ue]=o.useState(!0),[at,ce]=o.useState(!0),Pe=p&&{...p,top:Oe,bottom:at},[Ye,Qe]=o.useState("landscape"),[ut,vt]=o.useState([...Ic]),[ct,Gt]=o.useState("show"),[xt,lt]=o.useState(!0),[st,Ot]=o.useState(!0),Mt=o.useRef(null),Nt=o.useRef([]),[Ft,zt]=o.useState(H==="all"?Number.POSITIVE_INFINITY:H??8),[_t,gt]=o.useState("right"),[Et,It]=o.useState(!1),[et,wt]=o.useState(!1),{toastMessage:tt,toastType:fe,showWarning:$e,clearToast:Re}=du("warning"),ze=o.useCallback(()=>Ie(null),[Ie]);d&&G&&jt("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[it,on]=o.useState(()=>Math.max(y?.length??1,1)),ht=Math.max(C??0,y?.length??0,1),Ke=C!=null||!!E,Ct=G?xe:E?Math.max(it,y?.length??1,1):ht,{width:Bt,height:X}=ha[Ye],Ce=!G&&!E,Ge=Math.max(1,Math.min(ht,x??ht)),Ze=Math.min(Ft,Ge),rt=Ce?Ze:Ct,mt=x!=null&&C!=null,Dt=mt?Math.max(1,Math.min(Ft,x)):Ze,Lt=o.useRef(ne);o.useEffect(()=>{Lt.current=ne}),o.useEffect(()=>{Ce&&Lt.current?.(Dt)},[Ce,Dt]);const Dn=Math.ceil((y?.length??0)/Math.max(1,rt)),Zt=(y?.length??0)<ht?Math.floor((y?.length??0)/Math.max(1,rt))+1:0,Sn=Ce?Math.max(1,Dn,Zt):0,cn=Ce?Array.from({length:Sn},(Te,Je)=>(y??[]).slice(Je*rt,(Je+1)*rt)):null,Xt=!!cn&&cn.length>1,en=G?ot.some(Te=>Te!==null&&Te.length>1):(y??[]).some(Te=>(Te.words??[]).length>1),Cn=W?.trim()||`${hi(Xa())} ${en?se("wordTable.printFileNamePair","\uB300\uB9BD\uC30D\uD45C"):se("wordTable.printFileNameSingle","\uB2E8\uC5B4\uD45C")}`,tn=o.useCallback(()=>Xt?Nt.current.filter(Te=>Te!==null):Mt.current?[Mt.current]:[],[Xt]),{print:$t,openNewWindow:kt,downloadHtml:qt}=js({getElements:tn,paperW:Bt,paperH:X,fileName:Cn,onPopupBlocked:()=>{$e(se("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."))}}),Rt=Te=>{we(Te),ve(Je=>Je.length>=Te?Je:[...Je,...Array(Te-Je.length).fill(null)]),Ie(null)},Tn=Te=>{ve(Je=>{const Tt=[...Je];return Tt[Te]=null,Tt}),Ae===Te&&Ie(null)},Mn=Te=>{if(Ae===null)return;const Je=Ae;ve(Nn=>{const In=[...Nn];return In[Je]=Te.length>0?Te:null,In});const Tt=ot.findIndex((Nn,In)=>In>Je&&Nn===null);Ie(Tt!==-1?Tt:null)},Fn=G?ot.some(Te=>Te?.some(Je=>!!Je.colloquialPronunciation)):(y??[]).some(Te=>(Te.words??[]).some(Je=>!!Je.colloquialLabel)),me=!G&&Oc([...d?[d]:[],...y??[]]),je=o.useMemo(()=>_a()?G?He.slice(0,xe).flatMap(Te=>(Te??[]).map(Je=>[Je.word,Je.homonum])):(Te=>Te.flatMap(Je=>(Je.words??[]).map(Tt=>[Tt.label,Tt.homonum])))([...d?[d]:[],...y??[]]):[],[G,He,xe,y,d]),[We,Y]=o.useState(!1);o.useEffect(()=>{if(je.length===0)return;let Te=!1;return Promise.all(je.map(([Je,Tt])=>Xl(Je,Tt))).then(Je=>{Te||Y(Je.some(Boolean))},()=>{}),()=>{Te=!0}},[je]);const de=je.length>0&&We,Be=o.useMemo(()=>[...G||E?[{label:se("wordTable.filter.columns","\uCE78 \uC218"),items:P4.map(Te=>({value:`${Te}\uCE78`,displayLabel:se("wordTable.filter.column",{count:Te})})),display:"segmented"}]:[],...Ce&&(y?.length??0)>0?[Kc(se,{hasPairs:en,itemCount:mt?x:ht,max:x})]:[],...Xt?[I4(se)]:[]],[se,G,E,Ce,y?.length,en,ht,x,Xt]),Me={...G||E?{[se("wordTable.filter.columns","\uCE78 \uC218")]:`${Ct}\uCE78`}:{},...Ce&&(y?.length??0)>0?{[se(en?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")]:`${Dt}\uAC1C`}:{},...Xt?{[se("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")]:_t}:{}},Ve=(Te,Je)=>{if(Je===se("wordTable.filter.columns","\uCE78 \uC218"))G?Rt(parseInt(Te)):on(parseInt(Te));else if(Je===se(en?"wordTable.filter.itemsPerPagePair":"wordTable.filter.itemsPerPageWord")){const Tt=parseInt(Te);zt(mt?Tt:Yc(Tt,ht))}else Je===se("wordTable.filter.pageNumber","\uD398\uC774\uC9C0 \uBC88\uD638")&&gt(Zc(Te))},Xe=G?y8(ot.filter(Te=>Te!==null&&Te.length>0).map(Te=>({id:Xs(Te),words:Te.map(Vd)}))):y??[],bt=()=>{G&&ve(Te=>Te.length>xe?Te.slice(0,xe):Te)},ft=(Te=!1)=>{if(wt(Te),K&&b){const Je=he.trim().toLowerCase();Je&&I(Tt=>Tt.includes(Je)?Tt:[...Tt,Je]),b(he,Xe,ae||void 0,Te),bt();return}if(z&&b){b("",Xe,void 0,Te),bt();return}if(b){It(!0);return}qt()},[ye,M]=o.useState(!1),[Z,ge]=o.useState(""),Le=Z.trim(),qe=Le!==""&&_e.includes(Le.toLowerCase()),nt=()=>{ge(he?se("wordTable.save.copyName",{name:he,defaultValue:"{{name}} (\uBCF5\uC0AC)"}):""),M(!0)},At=()=>{!Le||qe||!b||(b(Le,Xe,ae||void 0,!0),bt(),M(!1))},St=Xe.length===0,nn=St||K&&(he===""||Ne),an=()=>{if(St){$e(se("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."));return}if(K&&he===""){$e(se("wordTable.save.nameRequired","\uD45C \uC774\uB984\uC744 \uC785\uB825\uD574 \uC8FC\uC138\uC694."));return}K&&Ne&&$e(se("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."))},Fa=t.jsx($a,{items:Xe,orientation:Ye,contentTypes:ut,baseItem:d,baseContentTypes:f,cutLine:ct,showOutline:xt,showDivLine:st,count:Ct});return t.jsxs(t.Fragment,{children:[t.jsxs(Ma,{type:"page",icon:n,title:e,disc:a,className:ke("word-table-block",V),children:[ye&&t.jsx(qn,{size:"small",title:j??se("wordTable.saveAsNewButton","\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uC800\uC7A5"),onClose:()=>M(!1),footer:({closeWithAnimation:Te})=>t.jsxs(t.Fragment,{children:[t.jsx(be,{htmlType:"button",size:48,type:"bar",label:se("common.cancel","\uCDE8\uC18C"),onClick:Te}),t.jsx(be,{htmlType:"button",size:48,type:"bar",variant:"main",label:se("common.save","\uC800\uC7A5"),disabled:!Le||qe,onClick:At})]}),children:t.jsx(na,{label:se("wordTable.save.nameLabel","\uC774\uB984"),value:Z,onChange:ge,placeholder:se("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:At,error:qe?se("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0})}),Et&&b&&F?.({defaultName:typeof e=="string"?e:se("wordTable.defaultName","\uB2E8\uC5B4 \uD45C"),preview:Fa,previewW:Bt,previewH:X,items:Xe,existingNames:b8().map(Te=>Te.name),saveAsNew:et,onSave:(Te,Je)=>{b(Te,Xe,Je,et),bt(),It(!1)},onCancel:()=>It(!1)}),(G||D)&&Ae!==null&&U?.({cellIndex:Ae,onConfirm:G?Mn:Te=>{if(D){const Je=Te[0];if(Je){const Tt=new Set((y??[]).map(In=>In.id));let Nn=Xs([Je]);for(let In=2;Tt.has(Nn);In++)Nn=`${Xs([Je])}~${In}`;D({id:Nn,words:[Vd(Je)]})}}Ie(null)},onClose:ze}),!T&&t.jsx(ks,{title:r,collapsible:s,defaultCollapsed:l,collapsed:i,onCollapsedChange:u,headerSummary:c,hasImage:de,hasColloquial:Fn,hasCaption:me,contentTypes:ut,orientation:Ye,showOutline:xt,cutLine:ct,showDivLine:st,setters:{setContentTypes:vt,setOrientation:Qe,setShowOutline:lt,setCutLine:Gt,setShowDivLine:Ot,setShowTopInfo:Ue,setShowBottomInfo:ce},showCutLine:(Ce?rt:Ct)>1,showDivLine2:en,middleSections:Be,extraSelected:Me,onExtraSelect:Ve,showPaperBands:pt,showTopInfo:Oe,showBottomInfo:at}),Xt&&cn?t.jsx("div",{className:"word-table-block__pages",children:cn.map((Te,Je)=>t.jsx($a,{orientation:Ye,contentTypes:ut,cutLine:ct,showOutline:xt,showDivLine:st,count:rt,items:Te,baseItem:d,baseContentTypes:f,onRemoveItem:_,onCopyItem:g,onReplaceItem:w,onPickForm:N,onReorder:k&&((Tt,Nn)=>k(Tt+Je*rt,Nn+Je*rt)),indexOffset:Je*rt,totalCount:y?.length??0,renderCellAction:te&&((Tt,Nn)=>te(Tt+Je*rt,Nn)),showFillerAdd:!!D,fillerAdd:$,onActivateCell:D?(Tt=>Ie(Tt+Je*rt)):void 0,addableCount:Ke?Math.max(0,Math.min(rt,ht-Je*rt)):void 0,brand:Pe,code:h,contentRef:Tt=>{Nt.current[Je]=Tt},pageNumber:{current:Je+1,total:cn.length},pageNumberPosition:_t},Je))}):t.jsx($a,{orientation:Ye,contentTypes:ut,cutLine:ct,showOutline:xt,showDivLine:st,count:rt,items:G?void 0:y??[],baseItem:G?void 0:d,baseContentTypes:f,editCells:G?ot:void 0,activeCell:Ae,onActivateCell:G||D?Ie:void 0,onRemoveCell:G?Tn:void 0,onRemoveItem:G?void 0:_,onCopyItem:G?void 0:g,onReplaceItem:G?void 0:w,onPickForm:G?void 0:N,onReorder:G?void 0:k,addableCount:Ke?Ce?Math.min(rt,ht):Ct:void 0,renderCellAction:G?void 0:te,brand:Pe,code:h,showFillerAdd:!!D,fillerAdd:$,contentRef:Mt}),!T&&!z&&ue!=null&&t.jsx("div",{className:"word-table-block__table-actions",children:ue}),K&&!T&&t.jsxs(dr,{labelWidth:64,useBorder:!1,className:"word-table-block__meta",children:[t.jsx(fn,{variant:"custom",label:se("wordTable.save.nameLabel","\uC774\uB984"),required:!0,align:"vertical",useFullWidth:!0,children:t.jsx(na,{required:!0,value:ie??"",onChange:Q,placeholder:ee?ee+se("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):se("wordTable.save.placeholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:se("wordTable.save.nameLabel","\uC774\uB984"),maxLength:40,size:48,fullWidth:!0,error:Ne?se("wordTable.save.duplicateName","\uC774\uBBF8 \uC0AC\uC6A9 \uC911\uC778 \uC774\uB984\uC785\uB2C8\uB2E4."):void 0,onKeyDown:Te=>{(Te.key==="Tab"&&!Te.shiftKey||Te.key===" ")&&!(ie??"").trim()&&(ee??"").trim()&&(Te.preventDefault(),Q?.(ee??""))}})}),t.jsx(fn,{variant:"custom",label:se("wordTable.save.descriptionLabel","\uC124\uBA85"),align:"vertical",useFullWidth:!0,children:t.jsx(na,{value:L??"",onChange:J,placeholder:q?q+se("wordTable.save.autoFillHint"," (Tab \uB610\uB294 space \uC785\uB825\uC2DC \uC790\uB3D9 \uC785\uB825)"):se("wordTable.save.descriptionPlaceholder","\uC774 \uB2E8\uC5B4\uD45C\uC5D0 \uB300\uD55C \uC124\uBA85\uC744 \uC785\uB825\uD558\uC138\uC694."),ariaLabel:se("wordTable.save.descriptionLabel","\uC124\uBA85"),maxLength:200,multiline:!0,rows:2,fullWidth:!0,onKeyDown:Te=>{(Te.key==="Tab"&&!Te.shiftKey||Te.key===" ")&&!(L??"").trim()&&(q??"").trim()&&(Te.preventDefault(),J?.(q??""))}})})]})]}),!T&&t.jsxs("div",{className:"word-table-block__actions",children:[t.jsxs("div",{className:"word-table-block__actions-left",children:[!z&&v&&t.jsx(be,{htmlType:"button",size:40,type:"bar",label:se("wordTable.load","\uBD88\uB7EC\uC624\uAE30"),onClick:v}),!z&&m&&t.jsx(be,{htmlType:"button",size:40,type:"bar",label:pe,onClick:m}),!z&&t.jsx(be,{htmlType:"button",size:40,type:"bar",label:se("wordTable.openNewWindow","\uC0C8 \uCC3D\uC73C\uB85C \uBCF4\uAE30"),onClick:kt})]}),t.jsxs("div",{className:"word-table-block__actions-right",children:[S&&t.jsx(be,{htmlType:"button",size:"56",type:"bar",label:se("common.cancel","\uCDE8\uC18C"),onClick:S}),!z&&t.jsx(be,{htmlType:"button",size:"56",type:"bar",label:se("wordTable.print","\uC778\uC1C4\uD558\uAE30"),onClick:$t}),j&&t.jsx(be,{htmlType:"button",size:"56",type:"bar",label:j,onClick:()=>K?nt():ft(!0),disabled:St,onDisabledClick:()=>{$e(se("wordTable.emptyItems","\uB2E8\uC5B4\uB97C 1\uAC1C \uC774\uC0C1 \uCD94\uAC00\uD574\uC8FC\uC138\uC694."))}}),t.jsx(be,{htmlType:"button",size:"56",type:"bar",variant:"main",label:B??se("wordTable.saveButton","\uC800\uC7A5\uD558\uAE30"),onClick:()=>ft(!1),disabled:nn,onDisabledClick:an})]})]}),t.jsx(Ta,{message:tt,type:fe,onClose:Re})]})}const x8=8;function qd({items:e,className:n}){const{t:a}=Ee.useTranslation(),r=o.useRef(null),[s,l]=o.useState(null),i=o.useCallback(()=>l(r.current?.getBoundingClientRect()??null),[]),u=o.useCallback(()=>l(null),[]),c=Dr(!!s,g=>{g?i():u()},r),p=e.length,h=p<=3?1:2,d=x8,f=p>d,C=e.slice(0,f?d-1:d),x=p-C.length,y=e.slice(C.length).map(g=>g.words?.length?g.words.map(w=>w.label).join(" / "):g.id),b=Math.min(5,Math.ceil(y.length/25)),v=Math.ceil(Math.min(p,d)/h)||1,_=h*v;return t.jsx("div",{className:ke("word-table-thumb",n),style:{gridTemplateColumns:`repeat(${h}, 1fr)`},children:Array.from({length:_},(g,w)=>{if(f&&w===d-1)return t.jsxs("div",{ref:r,className:"word-table-thumb__cell word-table-thumb__cell--more",tabIndex:0,"aria-label":a("wordTable.thumbMoreAria",{count:x,words:y.join(", "),defaultValue:"\uADF8 \uBC16 {{count}}\uCE78: {{words}}"}),onPointerEnter:m=>{ea(m)||i()},onPointerLeave:m=>{ea(m)||u()},onFocus:()=>{ia()||i()},onBlur:u,onClick:m=>{m.stopPropagation(),c.touchPress()},children:[t.jsx("span",{className:"word-table-thumb__more body-3",children:a("wordTable.thumbMore",{count:x,defaultValue:"+{{count}}"})}),s&&y.length>0&&t.jsx(Qn,{anchorRect:s,items:y,showIndex:!1,closeOnOutsideClick:!1,columns:b})]},w);const N=C[w];return N?t.jsx("div",{className:"word-table-thumb__cell",children:(N.words?.length?N.words:[{label:N.id}]).map((m,A)=>t.jsxs(o.Fragment,{children:[A>0&&t.jsx("span",{className:"word-table-thumb__divider"}),t.jsx("span",{className:"word-table-thumb__word body-3",children:m.label})]},A))},w):t.jsx("div",{className:"word-table-thumb__cell word-table-thumb__cell--empty"},w)})})}function _8({items:e,name:n,description:a,createdAt:r,code:s,published:l,publishedLabel:i,shared:u,sharedLabel:c,isNew:p,publisherName:h,publishedAt:d,likeCount:f,downloadCount:C,onPublisherClick:x,selected:y,onClick:b,onMore:v,titleNode:_,className:g}){const{t:w}=Ee.useTranslation(),N=_!=null,m=h!=null||d!=null||f!=null||C!=null,A=B=>{B.target===B.currentTarget&&!N&&(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),b?.())};return t.jsxs("div",{className:ke("word-table-button",y?"word-table-button--selected":"",m?"":"word-table-button--no-footer",g),role:"button",tabIndex:0,"aria-label":s?`${n} (${s})`:n,onClick:N?void 0:b,onKeyDown:A,children:[p&&t.jsx("span",{className:"word-table-button__new-dot","aria-label":w("myWordTable.newBadge","\uC0C8\uB85C \uB9CC\uB4E0 \uD45C")}),t.jsx(qd,{items:e,className:"word-table-button__thumb"}),t.jsxs("div",{className:"word-table-button__info",children:[t.jsxs("div",{className:"word-table-button__info-text",children:[_??t.jsx("div",{className:"word-table-button__title h4",children:n}),a&&t.jsx("div",{className:"word-table-button__desc body-3",children:a})]}),v&&!N&&t.jsx(be,{htmlType:"button",className:"word-table-button__more",size:32,type:"dot",variant:"transparent-gray",useBorder:!1,icon:"ellipsis",ariaLabel:w("common.moreFor",{name:n}),onClick:B=>{B.stopPropagation(),v(B)}})]}),(s||r||l||u)&&t.jsxs("div",{className:"word-table-button__meta-row",children:[t.jsx("span",{className:"word-table-button__meta-left",children:t.jsx("span",{className:"word-table-button__meta caption-1",children:r?pi(r,w):""})}),t.jsxs("span",{className:"word-table-button__meta-right",children:[(l||u)&&t.jsxs("span",{className:"word-table-button__badges",children:[l&&t.jsx(un,{className:"word-table-button__badge",size:"small",variant:"main",fill:"soft",iconLeft:"book-marked",label:i??w("myWordTable.publishedBadge","\uBC1C\uD589\uB428")}),u&&t.jsx(un,{className:"word-table-button__badge",size:"small",fill:"soft",iconLeft:"link",label:c??w("myWordTable.sharedBadge","\uACF5\uC720 \uC911")})]}),s&&t.jsx("span",{className:"word-table-button__code caption-1",children:s})]})]}),m&&t.jsxs("div",{className:"word-table-button__footer",children:[t.jsxs("span",{className:"word-table-button__store-by",children:[h&&(x?t.jsx("button",{className:"training-card__publisher body-4",type:"button","aria-label":w("wordTable.publisherFilter",{name:h,defaultValue:"{{name}} \uAC8C\uC2DC\uD55C \uAC83\uB9CC \uBCF4\uAE30"}),onClick:B=>{B.stopPropagation(),x()},children:h}):t.jsx("span",{className:"training-card__publisher training-card__publisher--static body-4",children:h})),d&&t.jsx("span",{className:"training-card__date body-4",children:pi(d,w)})]}),t.jsxs("span",{className:"word-table-button__store-stats",children:[f!=null&&t.jsx(un,{size:"small",fill:"soft",variant:"like",iconLeft:"heart",label:String(f),"aria-label":w("common.likeCount",{count:f,defaultValue:`\uC88B\uC544\uC694 ${f}`})}),C!=null&&t.jsx(un,{size:"small",fill:"soft",variant:"main",iconLeft:"download",label:String(C),"aria-label":w("common.downloadCount",{count:C,defaultValue:`\uAC00\uC838\uAC04 \uC218 ${C}`})})]})]})]})}/**
1050
1050
  * @license lucide-react v1.38.0 - ISC
1051
1051
  *
1052
1052
  * This source code is licensed under the ISC license.
@@ -1056,4 +1056,4 @@ ${f.badge}`:f.badge:void 0;if(B&&h(f.code))return null;if(!f.badge&&!m)return C(
1056
1056
  *
1057
1057
  * This source code is licensed under the ISC license.
1058
1058
  * See the LICENSE file in the root directory of this source tree.
1059
- */const k8=[["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"}]],A8=oe("circle-x",k8);function N8(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function Js({icon:e,label:n,state:r,pct:a,subText:s}){const{t:l}=Ee.useTranslation(),i=r==="done",c=r==="pending",u=r==="error",p=i?100:a??0;return t.jsxs("div",{className:"wdup-phase-card",children:[t.jsx("div",{className:`wdup-phase-card__icon${i?" wdup-phase-card__icon--done":u?" wdup-phase-card__icon--error":""}`,children:i?t.jsx(ml,{size:22,color:"white",strokeWidth:2.5}):u?t.jsx(A8,{size:22,color:"white",strokeWidth:2.5}):t.jsx("span",{className:`wdup-phase-card__icon-inner${c?" wdup-phase-card__icon-inner--pending":""}`,children:e})}),t.jsxs("div",{className:"wdup-phase-card__body",children:[t.jsxs("div",{className:"wdup-phase-card__top",children:[t.jsx("span",{className:`wdup-phase-card__label body-2${c?" wdup-phase-card__label--pending":""}`,children:n}),i?t.jsx(un,{variant:"sub",fill:"soft",size:"small",label:l("common.done","\uC644\uB8CC")}):u?t.jsx(un,{variant:"danger",fill:"soft",size:"small",label:l("common.failed","\uC2E4\uD328")}):(s||a!==void 0)&&t.jsxs("span",{className:"wdup-phase-card__sub body-3",children:[s,s&&a!==void 0?` \xB7 ${a}%`:a!==void 0?`${a}%`:""]})]}),!c&&t.jsx("div",{className:"wdup-bar",children:t.jsx("div",{className:`wdup-bar__fill${i?" wdup-bar__fill--done":u?" wdup-bar__fill--error":""}${r==="active"&&a===void 0?" wdup-bar__fill--indeterminate":""}`,style:{width:a!==void 0||i||u?`${u?100:p}%`:void 0}})})]})]})}function E8({title:e,progress:n,onDone:r,onRetry:a,onClose:s,inline:l}){const{t:i}=Ee.useTranslation(),{phase:c,error:u,wordCount:p,imagePage:h,imageDone:d,imageTotal:m,pairPercent:C}=n,x=N8(c),y=c==="done",b=!!u;function v(A){return b&&x===A?"error":x>A?"done":x===A?"active":"pending"}const _=v(1),g=v(2),w=v(3),N=c==="image-match"&&m?Math.round((d??0)/m*100):void 0,f=o.useMemo(()=>{if(g!=="done"){if(c==="image-list")return i("wordData.checkingPage",{page:h??1});if(c==="image-match"&&m)return i("wordData.imageCount",{done:To(d),total:To(m)})}},[g,c,h,m,d,i]);return t.jsx(qn,{inline:l,className:"popup--word-data-update",title:e,footer:b&&a?t.jsx(ye,{htmlType:"button",size:56,variant:"main",onClick:a,children:i("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):b?t.jsx(ye,{htmlType:"button",size:56,variant:"main",onClick:s??r,children:i("common.close","\uB2EB\uAE30")}):t.jsx(ye,{htmlType:"button",size:56,variant:"main",disabled:!y,onClick:r,children:i("common.done","\uC644\uB8CC")}),children:t.jsxs("div",{className:"wdup-cards",children:[t.jsx(Js,{icon:t.jsx(ul,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:_,subText:_==="active"?i("wordData.downloadingCount",{n:To(p),count:p}):void 0}),t.jsx(Js,{icon:t.jsx(B8,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:g,pct:N,subText:f}),t.jsx(Js,{icon:t.jsx(pl,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:w,pct:w==="active"?C??0:void 0,subText:void 0})]})})}const j8=.15;function Ht(e,n,r=0){return{animation:`hero-visual-${e} ${n}s ease-in-out ${r}s infinite backwards`}}function Vt(e,n={}){return{className:`hero-visual__in hero-visual__in--${e}`,style:{transformOrigin:n.origin,"--hero-visual-turn":n.turn??0,...n.vars}}}const ga={pathLength:1,strokeDasharray:"1 1"},Qs={transformBox:"fill-box",transformOrigin:"center"},Fe={c1:"var(--hero-visual-1)",c2:"var(--hero-visual-2)",c3:"var(--hero-visual-3)",c4:"var(--hero-visual-4)",c5:"var(--hero-visual-5)",c6:"var(--hero-visual-6)"},el=[Fe.c1,Fe.c2,Fe.c3,Fe.c4,Fe.c5,Fe.c6];function Ud(e,n,r,a){return Array.from({length:a},(s,l)=>{const i=l/a*Math.PI*2;return{x:e+r*Math.cos(i),y:n+r*Math.sin(i)}})}const ao={blobs:{viewBox:"0 20 660 660",width:660,height:660,render:e=>t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:`${e}-big`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:".5",stopColor:"var(--color-main)"}),t.jsx("stop",{offset:".8",stopColor:"var(--color-sub)"})]}),t.jsxs("linearGradient",{id:`${e}-small`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:".5",stopColor:"var(--color-sub)"}),t.jsx("stop",{offset:".8",stopColor:"color-mix(in srgb, #ffffbb 30%, var(--color-sub))"})]})]}),t.jsx("g",{...Vt("bloom",{turn:0,origin:"330px 350px"}),children:t.jsxs("g",{style:Ht("blob-1",22),children:[t.jsx("circle",{cx:330,cy:350,r:240,fill:`url(#${e}-big)`}),[{stroke:"rgba(77, 205, 192, 0.45)",delay:0},{stroke:"rgba(73, 156, 223, 0.35)",delay:1.35},{stroke:"rgba(77, 205, 192, 0.25)",delay:2.7}].map(n=>t.jsx("circle",{className:"hero-visual__ring",cx:330,cy:350,r:241,fill:"none",stroke:n.stroke,strokeWidth:2,style:{...Qs,animation:`hero-visual-wave 4s ease-out ${n.delay}s infinite backwards`}},n.delay))]})}),t.jsx("g",{...Vt("bloom",{turn:.06,origin:"490px 490px"}),children:t.jsx("circle",{cx:490,cy:490,r:100,fill:`url(#${e}-small)`,style:Ht("blob-2",17,-5)})})]})},ribbon:{viewBox:"-40 140 880 294",width:880,height:294,render:e=>{const n="M-40,420 C140,470 240,330 360,340 S520,500 600,400 S560,200 440,250 S480,420 580,360 S740,200 840,140",r="M440,250 C320,300 480,420 580,360 S740,200 840,140";return t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:`${e}-rib`,gradientUnits:"userSpaceOnUse",x1:"0",y1:"420",x2:"760",y2:"120",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c1}),t.jsx("stop",{offset:".4",stopColor:Fe.c3}),t.jsx("stop",{offset:".7",stopColor:Fe.c4}),t.jsx("stop",{offset:"1",stopColor:Fe.c6})]}),t.jsxs("mask",{id:`${e}-mask`,maskUnits:"userSpaceOnUse",x:"-100",y:"-100",width:"1000",height:"800",children:[t.jsx("rect",{x:"-100",y:"-100",width:"1000",height:"800",fill:"#000"}),t.jsx("path",{d:n,fill:"none",stroke:"#fff",strokeWidth:62,strokeLinecap:"round"})]}),t.jsx("filter",{id:`${e}-blur`,x:"-20%",y:"-20%",width:"140%",height:"140%",children:t.jsx("feGaussianBlur",{stdDeviation:"9"})})]}),t.jsxs("g",{style:Ht("floaty",7),children:[t.jsx("path",{d:n,fill:"none",stroke:`url(#${e}-rib)`,strokeWidth:64,strokeLinecap:"round",strokeLinejoin:"round",...ga,...Vt("draw")}),t.jsx("g",{mask:`url(#${e}-mask)`,...Vt("fade",{turn:.04}),children:t.jsx("path",{d:r,fill:"none",stroke:Fe.c1,strokeWidth:64,strokeLinecap:"butt",strokeDasharray:"0 130 3000",opacity:".34",filter:`url(#${e}-blur)`,transform:"translate(0,10)"})}),t.jsx("path",{d:r,fill:"none",stroke:`url(#${e}-rib)`,strokeWidth:64,strokeLinecap:"round",strokeLinejoin:"round",...ga,...Vt("draw",{turn:.06})})]})]})}},spheres:{viewBox:"0 -10 640 580",width:640,height:580,render:e=>{const n=[{cx:450,cy:240,r:190,fill:`url(#${e}-halo)`,opacity:.8,blur:!0,idle:Ht("breathe",9),self:!0,turn:0},{cx:275,cy:45,r:55,fill:`url(#${e}-drop)`,idle:Ht("drift",8),turn:.09},{cx:310,cy:310,r:160,fill:`url(#${e}-lime)`,idle:Ht("floaty",7),turn:.03},{cx:150,cy:430,r:150,fill:`url(#${e}-fade)`,opacity:.75,blend:!0,idle:Ht("floaty",7,2.5),turn:.06},{cx:361,cy:521,r:21,fill:`url(#${e}-bead)`,idle:Ht("drift",6,1),turn:.12}];return t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("radialGradient",{id:`${e}-halo`,cx:".4",cy:".4",r:".85",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c5}),t.jsx("stop",{offset:".55",stopColor:Fe.c2}),t.jsx("stop",{offset:".72",stopColor:"#ffffff"}),t.jsx("stop",{offset:"1",stopColor:"#ffffff"})]}),t.jsxs("linearGradient",{id:`${e}-drop`,x1:"0",y1:"0",x2:"0",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c1}),t.jsx("stop",{offset:".7",stopColor:Fe.c5}),t.jsx("stop",{offset:"1",stopColor:Fe.c5,stopOpacity:"0"})]}),t.jsxs("linearGradient",{id:`${e}-lime`,x1:".67",y1:".03",x2:".33",y2:".97",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c6}),t.jsx("stop",{offset:".45",stopColor:Fe.c4}),t.jsx("stop",{offset:"1",stopColor:Fe.c1})]}),t.jsxs("linearGradient",{id:`${e}-fade`,x1:"0",y1:"0",x2:"0",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c1}),t.jsx("stop",{offset:".45",stopColor:Fe.c3}),t.jsx("stop",{offset:".95",stopColor:Fe.c3,stopOpacity:"0"})]}),t.jsxs("linearGradient",{id:`${e}-bead`,x1:"0",y1:"0",x2:"0",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c4}),t.jsx("stop",{offset:"1",stopColor:Fe.c1})]}),t.jsx("filter",{id:`${e}-soft`,x:"-30%",y:"-30%",width:"160%",height:"160%",children:t.jsx("feGaussianBlur",{stdDeviation:"34"})})]}),n.map(r=>t.jsx("g",{...Vt("settle",{turn:r.turn,origin:`${r.cx}px ${r.cy}px`}),children:t.jsx("circle",{className:r.blend?"hero-visual__blades":void 0,cx:r.cx,cy:r.cy,r:r.r,fill:r.fill,opacity:r.opacity,filter:r.blur?`url(#${e}-soft)`:void 0,style:r.self?{...Qs,...r.idle}:r.idle})},`${r.cx},${r.cy}`))]})}},clover:{viewBox:"203.5 123.5 273 273",width:273,height:273,render:e=>{const n=[{d:"M360,140 A140,140 0 0 1 220,280 L220,232 A92,92 0 0 0 312,140 Z",fill:`url(#${e}-p1)`,origin:"220px 140px",turn:0},{d:"M460,280 A140,140 0 0 1 320,140 L368,140 A92,92 0 0 0 460,232 Z",fill:`url(#${e}-p3)`,origin:"460px 140px",turn:.03},{d:"M320,380 A140,140 0 0 1 460,240 L460,288 A92,92 0 0 0 368,380 Z",fill:`url(#${e}-p4)`,origin:"460px 380px",turn:.06},{d:"M220,240 A140,140 0 0 1 360,380 L312,380 A92,92 0 0 0 220,288 Z",fill:`url(#${e}-p2)`,origin:"220px 380px",turn:.09}];return t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:`${e}-p1`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c3}),t.jsx("stop",{offset:"1",stopColor:Fe.c6})]}),t.jsxs("linearGradient",{id:`${e}-p2`,x1:"0",y1:"1",x2:"1",y2:"0",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c1}),t.jsx("stop",{offset:"1",stopColor:Fe.c4})]}),t.jsxs("linearGradient",{id:`${e}-p3`,x1:"0",y1:"0",x2:"1",y2:"0",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c4}),t.jsx("stop",{offset:"1",stopColor:Fe.c3})]}),t.jsxs("linearGradient",{id:`${e}-p4`,x1:"1",y1:"0",x2:"0",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c6}),t.jsx("stop",{offset:"1",stopColor:Fe.c3})]})]}),t.jsx("g",{className:"hero-visual__petals",children:n.map(r=>t.jsx("path",{d:r.d,fill:r.fill,...Vt("pop",{turn:r.turn,origin:r.origin})},r.origin))})]})}},stackedPills:{viewBox:"-46.5 -88.9 493 493",width:493,height:493,render:e=>t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:`${e}-p1`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c5}),t.jsx("stop",{offset:"1",stopColor:Fe.c6})]}),t.jsxs("linearGradient",{id:`${e}-p2`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c3}),t.jsx("stop",{offset:"1",stopColor:Fe.c4})]}),t.jsxs("linearGradient",{id:`${e}-p3`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c1}),t.jsx("stop",{offset:"1",stopColor:Fe.c2})]})]}),[{cy:60,angle:-16,color:`url(#${e}-p1)`,opacity:.75},{cy:160,angle:14,color:`url(#${e}-p2)`,opacity:.85},{cy:260,angle:-14,color:`url(#${e}-p3)`,opacity:.95}].map((n,r)=>t.jsx("g",{...Vt("fan",{origin:`200px ${n.cy}px`,vars:{"--dy":`${160-n.cy}px`,"--a":`${n.angle}deg`}}),children:t.jsx("rect",{x:30,y:n.cy-60,width:340,height:120,rx:60,fill:n.color,opacity:n.opacity,style:{...Qs,...Ht("sway",7,r)}})},n.cy))]})},doubleRing:{viewBox:"-3.5 -78.5 777 777",width:777,height:777,render:e=>{const n=t.jsx("g",{style:{animation:"hero-visual-rove-a 19s ease-in-out infinite"},children:t.jsx("g",{style:{transformOrigin:"290px 300px",animation:"hero-visual-revolve 26s linear infinite"},children:t.jsx("circle",{cx:290,cy:300,r:210,fill:"none",stroke:`url(#${e}-r1)`,strokeWidth:74,strokeLinecap:"round",...ga,...Vt("draw")})})});return t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:`${e}-r1`,gradientUnits:"userSpaceOnUse",x1:"60",y1:"80",x2:"520",y2:"520",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c6}),t.jsx("stop",{offset:".5",stopColor:Fe.c4}),t.jsx("stop",{offset:"1",stopColor:Fe.c2})]}),t.jsxs("linearGradient",{id:`${e}-r2`,gradientUnits:"userSpaceOnUse",x1:"300",y1:"120",x2:"700",y2:"560",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c3}),t.jsx("stop",{offset:".55",stopColor:Fe.c1}),t.jsx("stop",{offset:"1",stopColor:Fe.c1})]}),t.jsxs("mask",{id:`${e}-over`,maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"800",height:"640",children:[t.jsx("rect",{x:"0",y:"0",width:"800",height:"640",fill:"#000"}),t.jsx("circle",{cx:500,cy:340,r:190,fill:"none",stroke:"#fff",strokeWidth:82,style:{animation:"hero-visual-rove-b 23s ease-in-out infinite"}}),t.jsx("rect",{x:"0",y:"323",width:"800",height:"320",fill:"#000"})]})]}),t.jsxs("g",{style:{transformOrigin:"380px 300px",...Ht("breathe",9)},children:[n,t.jsx("g",{style:{animation:"hero-visual-rove-b 23s ease-in-out infinite"},children:t.jsx("g",{style:{transformOrigin:"500px 340px",animation:"hero-visual-revolve-r 22s linear infinite"},children:t.jsx("circle",{cx:500,cy:340,r:190,fill:"none",stroke:`url(#${e}-r2)`,strokeWidth:74,strokeLinecap:"round",...ga,...Vt("draw",{turn:.08})})})}),t.jsx("g",{mask:`url(#${e}-over)`,children:n})]})]})}},concentric:{viewBox:"-23.5 -83.5 727 727",width:727,height:727,render:e=>t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:`${e}-outer`,gradientUnits:"userSpaceOnUse",x1:"20",y1:"-40",x2:"660",y2:"600",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c3}),t.jsx("stop",{offset:"1",stopColor:Fe.c6})]}),t.jsxs("linearGradient",{id:`${e}-mid`,gradientUnits:"userSpaceOnUse",x1:"120",y1:"280",x2:"560",y2:"280",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c2}),t.jsx("stop",{offset:"1",stopColor:Fe.c4})]}),t.jsxs("linearGradient",{id:`${e}-inner`,gradientUnits:"userSpaceOnUse",x1:"200",y1:"420",x2:"480",y2:"140",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c1}),t.jsx("stop",{offset:".5",stopColor:Fe.c1}),t.jsx("stop",{offset:"1",stopColor:Fe.c3})]})]}),[{r:54,stroke:Fe.c2,opacity:1,idle:0,turn:0},{r:134,stroke:`url(#${e}-inner)`,opacity:.9,idle:.4,turn:.04},{r:214,stroke:`url(#${e}-mid)`,opacity:.8,idle:.8,turn:.08},{r:294,stroke:`url(#${e}-outer)`,opacity:.55,idle:1.2,turn:.12}].map(n=>t.jsx("g",{...Vt("pop",{turn:n.turn,origin:"340px 280px"}),children:t.jsx("circle",{cx:340,cy:280,r:n.r,fill:"none",stroke:n.stroke,strokeWidth:52,opacity:n.opacity,style:{transformOrigin:"340px 280px",...Ht("pulse",4,n.idle)}})},n.r))]})},metaball:{viewBox:"-16 82 530 536",width:530,height:536,render:e=>t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("filter",{id:`${e}-goo`,x:"-20%",y:"-20%",width:"140%",height:"140%",children:[t.jsx("feGaussianBlur",{stdDeviation:"18"}),t.jsx("feColorMatrix",{values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 26 -12"})]}),t.jsxs("linearGradient",{id:`${e}-big`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:".5",stopColor:"var(--color-main)"}),t.jsx("stop",{offset:".8",stopColor:"var(--color-sub)"})]}),t.jsxs("linearGradient",{id:`${e}-small`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:".5",stopColor:"var(--color-sub)"}),t.jsx("stop",{offset:".8",stopColor:"color-mix(in srgb, #ffffbb 30%, var(--color-sub))"})]})]}),t.jsxs("g",{filter:`url(#${e}-goo)`,children:[t.jsx("g",{...Vt("meet",{vars:{"--from":"20px"}}),children:t.jsx("circle",{cx:240,cy:350,r:240,fill:`url(#${e}-big)`,style:Ht("blob-1",22)})}),t.jsx("g",{...Vt("meet",{turn:.03,vars:{"--from":"-120px"}}),children:t.jsx("circle",{cx:400,cy:490,r:100,fill:`url(#${e}-small)`,style:Ht("blob-2",17,-5)})})]})]})},dottedRipple:{viewBox:"87.5 27.5 505 505",width:505,height:505,render:()=>t.jsxs("g",{style:{transformOrigin:"340px 280px",...Ht("breathe",6)},children:[t.jsx("g",{...Vt("pop",{turn:0,origin:"340px 280px"}),children:t.jsx("circle",{cx:340,cy:280,r:22,fill:Fe.c1})}),Array.from({length:5},(e,n)=>t.jsx("g",{...Vt("pop",{turn:.03*(n+1),origin:"340px 280px"}),children:Ud(340,280,50+42*n,8+8*n).map(r=>t.jsx("circle",{cx:r.x,cy:r.y,r:9-1.2*n,fill:el[n]},`${r.x},${r.y}`))},n))]})},vesica:{viewBox:"67.5 7.5 545 545",width:545,height:545,render:e=>t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:`${e}-cool`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c1}),t.jsx("stop",{offset:"1",stopColor:Fe.c3})]}),t.jsxs("linearGradient",{id:`${e}-warm`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c4}),t.jsx("stop",{offset:"1",stopColor:Fe.c6})]})]}),t.jsxs("g",{className:"hero-visual__lens",children:[t.jsx("g",{...Vt("meet",{vars:{"--from":"70px"}}),children:t.jsx("circle",{cx:270,cy:280,r:170,fill:`url(#${e}-cool)`,opacity:".8",style:Ht("approach-r",6)})}),t.jsx("g",{...Vt("meet",{vars:{"--from":"-70px"}}),children:t.jsx("circle",{cx:410,cy:280,r:170,fill:`url(#${e}-warm)`,opacity:".8",style:Ht("approach",6)})})]})]})},stackedDiscs:{viewBox:"112.5 67.5 455 455",width:455,height:455,render:()=>t.jsx("g",{className:"hero-visual__discs",children:el.map((e,n)=>t.jsx("g",{...Vt("pop",{turn:n*.025,origin:`340px ${150+58*n}px`}),children:t.jsx("ellipse",{cx:340,cy:150+58*n,rx:200-12*n,ry:46,fill:e,opacity:".8",style:Ht("floaty",7,.4*n)})},e))})},flower:{viewBox:"124 64 432 432",width:432,height:432,render:()=>t.jsx("g",{className:"hero-visual__blades",style:{transformOrigin:"340px 280px",...Ht("breathe",9)},children:Ud(340,280,95,6).map((e,n)=>t.jsx("g",{...Vt("unfold",{turn:n*.025,origin:"340px 280px",vars:{"--gx":`${340-e.x}px`,"--gy":`${280-e.y}px`}}),children:t.jsx("circle",{cx:e.x,cy:e.y,r:95,fill:el[n],opacity:".6",style:Ht("gather",36)})},`${e.x},${e.y}`))})},squircles:{viewBox:"7 7 186 186",width:186,height:186,render:e=>t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:`${e}-q1`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c6}),t.jsx("stop",{offset:"1",stopColor:Fe.c4})]}),t.jsxs("linearGradient",{id:`${e}-q2`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c3}),t.jsx("stop",{offset:"1",stopColor:Fe.c4})]}),t.jsxs("linearGradient",{id:`${e}-q3`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c1}),t.jsx("stop",{offset:"1",stopColor:Fe.c2})]})]}),[{d:"M100 18 C150 18 182 50 182 100 C182 150 150 182 100 182 C50 182 18 150 18 100 C18 50 50 18 100 18 Z",fill:`url(#${e}-q1)`,opacity:.55,idle:0,turn:0},{d:"M100 42 C136 42 158 64 158 100 C158 136 136 158 100 158 C64 158 42 136 42 100 C42 64 64 42 100 42 Z",fill:`url(#${e}-q2)`,opacity:.75,idle:.5,turn:.03},{d:"M100 66 C122 66 134 78 134 100 C134 122 122 134 100 134 C78 134 66 122 66 100 C66 78 78 66 100 66 Z",fill:`url(#${e}-q3)`,opacity:1,idle:1,turn:.06}].map(n=>t.jsx("g",{...Vt("bloom",{turn:n.turn,origin:"100px 100px"}),children:t.jsx("g",{style:{transformOrigin:"100px 100px",...Ht("breathe",5,n.idle)},children:t.jsx("path",{d:n.d,fill:n.fill,opacity:n.opacity})})},n.turn))]})},dotGrid:{viewBox:"14 14 172 172",width:172,height:172,render:e=>{const n=[50,100,150].flatMap((r,a)=>[50,100,150].map((s,l)=>({cx:s,cy:r,fill:`url(#${e}-${s===100&&r===100?"n3":a===2?"n2":"n1"})`,middle:s===100&&r===100,idle:(a*3+l)*.3,turn:(a*3+l)*.015})));return t.jsxs(t.Fragment,{children:[t.jsx("defs",{children:[["n1",Fe.c3,Fe.c4],["n2",Fe.c6,Fe.c5],["n3",Fe.c1,Fe.c2]].map(([r,a,s])=>t.jsxs("linearGradient",{id:`${e}-${r}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:a}),t.jsx("stop",{offset:"1",stopColor:s})]},r))}),n.map(r=>t.jsx("g",{...Vt("pop",{turn:r.turn,origin:`${r.cx}px ${r.cy}px`}),children:t.jsx("circle",{cx:r.cx,cy:r.cy,r:18,fill:r.fill,style:r.middle?void 0:Ht("blink",2.7,r.idle)})},`${r.cx},${r.cy}`))]})}},stairs:{viewBox:"13.5 18.5 175 175",width:175,height:175,render:e=>t.jsxs(t.Fragment,{children:[t.jsx("defs",{children:[["t1",Fe.c6,Fe.c5,110],["t2",Fe.c4,Fe.c3,86],["t3",Fe.c3,Fe.c2,62],["t4",Fe.c1,Fe.c2,38]].map(([n,r,a,s])=>t.jsxs("linearGradient",{id:`${e}-${n}`,gradientUnits:"userSpaceOnUse",x1:"0",y1:s,x2:"0",y2:174,children:[t.jsx("stop",{offset:"0",stopColor:a}),t.jsx("stop",{offset:"1",stopColor:r})]},n))}),[{x:24,y:110,stroke:`url(#${e}-t1)`},{x:66,y:86,stroke:`url(#${e}-t2)`},{x:108,y:62,stroke:`url(#${e}-t3)`},{x:150,y:38,stroke:`url(#${e}-t4)`}].map((n,r)=>t.jsx("g",{style:Ht("floaty",3.6,r*.3),children:t.jsx("line",{x1:n.x+14,y1:160,x2:n.x+14,y2:n.y+14,stroke:n.stroke,strokeWidth:28,strokeLinecap:"round",...ga,...Vt("draw",{turn:r*.03})})},n.x))]})}},D8=Object.keys(ao);function S8({variant:e,motion:n="loop",cycleMs:r=9e3,label:a,className:s,style:l,onCycleEnd:i}){const c=o.useRef(null),u=o.useRef(i);u.current=i,o.useEffect(()=>{if(n!=="once"||!u.current)return;const d=c.current;if(!d)return;let m=!1;const C=()=>{m||(m=!0,u.current?.())};let x=d.querySelectorAll(".hero-visual__in").length;const y=g=>{g.target?.classList?.contains("hero-visual__in")&&--x<=0&&C()};d.addEventListener("animationend",y);const b=typeof d.getAnimations=="function"?d.getAnimations({subtree:!0}).map(g=>Number(g.effect?.getComputedTiming().endTime??0)).filter(g=>Number.isFinite(g)&&g>0):[],v=b.length>0?Math.max(...b):r*(1+j8),_=setTimeout(C,v+120);return()=>{d.removeEventListener("animationend",y),clearTimeout(_)}},[n,e,r]);const p=`hero-visual-${o.useId().replace(/:/g,"")}`,h=ao[e]??ao.blobs;return ao[e]||jt(`HeroVisual: \uBAA8\uB974\uB294 variant '${e}' \u2014 blobs \uB85C \uC138\uC6B4\uB2E4`),t.jsx("div",{ref:c,className:ke("hero-visual",`hero-visual--${e}`,n==="still"&&"hero-visual--still",n==="once"&&"hero-visual--once",s),style:{aspectRatio:`${h.width} / ${h.height}`,"--hero-visual-cycle":`${r}ms`,...l},role:a?"img":void 0,"aria-label":a,"aria-hidden":a?void 0:!0,children:t.jsx("svg",{className:"hero-visual__svg",viewBox:h.viewBox,preserveAspectRatio:"xMidYMid meet",focusable:"false",children:h.render(p)})})}function T8({enabled:e=!1,renderResultPopup:n}={}){const{t:r}=Ee.useTranslation(),[a,s]=o.useState(null),[l,i]=o.useState(null),c=C=>{let x=null;C==="noise"?x={score:3,contextsLength:5,results:[{sentence:"\uBB38\uC7A5 A",judgement:!0,wording:"\uC798 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 B",judgement:!1,wording:"\uC548 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 C",judgement:!0,wording:"\uC798 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 D",judgement:null,wording:"\uC548 \uD568",useAnswer:!1},{sentence:"\uBB38\uC7A5 E",judgement:!1,wording:"\uC548 \uB4E4\uB9BC",useAnswer:!1}]}:C==="short"?x={score:2,contextsLength:3,results:[{sentence:"\uBE44\uBE54\uBC25 \uC124\uBA85",answer:"\uBE44\uBE54\uBC25",selected:"\uBE44\uBE54\uBC25",selectedText:"\uBE44\uBE54\uBC25",correct:!0},{sentence:"\uBCF4\uC308 \uC124\uBA85",answer:"\uBCF4\uC308",selected:"\uC871\uBC1C",selectedText:"\uC871\uBC1C",correct:!1},{sentence:"\uCE7C\uAD6D\uC218 \uC124\uBA85",answer:"\uCE7C\uAD6D\uC218",selected:void 0,selectedText:void 0,correct:void 0}]}:C==="long"?x={score:4,contextsLength:4,results:[{sentence:"\uAE34 \uC774\uC57C\uAE30 1",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 1",selectedText:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 1",correct:!0},{sentence:"\uAE34 \uC774\uC57C\uAE30 2",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 2",selectedText:"\uC120\uD0DD \uD14D\uC2A4\uD2B8 2",correct:!1},{sentence:"\uAE34 \uC774\uC57C\uAE30 3",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 3",selectedText:void 0,correct:void 0},{sentence:"\uAE34 \uC774\uC57C\uAE30 4",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 4",selectedText:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 4",correct:!0}]}:C==="order"&&(x={score:1,contextsLength:2,results:[{sentence:"\uC21C\uC11C \uBB38\uC81C 1",answer:"1,2,3",selectedText:"1,2,3",correct:!0},{sentence:"\uC21C\uC11C \uBB38\uC81C 2",answer:"A,B,C",selectedText:"B,A,C",correct:!1}]}),i(x),s(C)},u=o.useCallback(()=>{s(null),i(null)},[]),p=o.useCallback(()=>c("noise"),[]),h=o.useCallback(()=>c("short"),[]),d=o.useCallback(()=>c("long"),[]),m=o.useCallback(()=>c("order"),[]);return e?t.jsxs("div",{className:"debug-result-launcher",children:[t.jsxs("div",{className:"debug-buttons",children:[t.jsx("button",{type:"button",className:"debug-button",onClick:p,children:r("debug.showResult",{type:"Noise",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),t.jsx("button",{type:"button",className:"debug-button",onClick:h,children:r("debug.showResult",{type:"ShortStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),t.jsx("button",{type:"button",className:"debug-button",onClick:d,children:r("debug.showResult",{type:"LongStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),t.jsx("button",{type:"button",className:"debug-button",onClick:m,children:r("debug.showResult",{type:"Order",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})})]}),a&&l?n?.({score:l.score,contextsLength:l.contextsLength,results:l.results,onReplay:u,onClose:u}):null]}):null}exports.Accordion=j2,exports.ActionCard=zy,exports.Alert=Ev,exports.AppHeader=L2,exports.AudioMeter=ps,exports.AudioPlayer=Fs,exports.Avatar=Lv,exports.Badge=un,exports.BarChart=Rx,exports.BarChartControls=ic,exports.Board=Qv,exports.BottomNav=fu,exports.BrandIdentity=xu,exports.BrandLogo=vu,exports.Breadcrumb=Fv,exports.BulkBar=_x,exports.Button=ye,exports.CONSENT_KINDS=ec,exports.CORE_VERSION=Dy,exports.Calendar=l4,exports.CardStep=$d,exports.ChartLegend=os,exports.ChartSection=Ia,exports.ChartTotal=jr,exports.Checkbox=ns,exports.ChoiceChips=y_,exports.CircleBadge=Ln,exports.CodeBox=xx,exports.ColorPicker=Hv,exports.CompanyMeta=ox,exports.ConfirmPopup=zd,exports.ConfirmStep=Sd,exports.ConfirmWithTextStep=Td,exports.ConsentRecordPopup=Cx,exports.ContrastFilterPanel=Yw,exports.CoreScope=Wy,exports.CountTile=Yv,exports.CouponInputPopup=Jw,exports.DEFAULT_NOISE_SETTINGS=fr,exports.DatePicker=Qu,exports.DebugResultLauncher=T8,exports.DescriptionTooltip=Qn,exports.DeviceSideTable=a4,exports.Dialog=Jv,exports.Divider=kv,exports.Dropdown=kn,exports.EffectPartyPopper=Ys,exports.EffectPartyPopperHost=t8,exports.EmptyState=Iy,exports.ErrorState=Oy,exports.FILTER_ALL_VALUE=jn,exports.FileUpload=Pv,exports.FilterPanel=Gn,exports.FilterSectionInfo=aa,exports.Footer=v_,exports.GameIntro=Ix,exports.HERO_VISUAL_VARIANTS=D8,exports.Header=_u,exports.HeroVisual=S8,exports.Icon=dt,exports.IconGridMenu=b_,exports.IconRenderer=dt,exports.InfoTooltip=zn,exports.ItemActions=Bx,exports.LEVEL_MAX=Lr,exports.LINE_CHART_HOVER_DELAY_MS=uc,exports.LandingBottomSticky=__,exports.LandingButton=bv,exports.LandingCard=gv,exports.LandingHeader=x_,exports.LandingSection=fv,exports.LandingStatBand=Bv,exports.LandingTitle=Cv,exports.LineChart=Fx,exports.ListPopup=Zw,exports.ListenStep=Dd,exports.Loader=kr,exports.MARKS=Ha,exports.MARK_ICON=Nc,exports.MARK_VARIANT=Ec,exports.MediaQueryOverrideContext=Bi,exports.MenuTooltip=ta,exports.NOISE_RATIO_MAX=fa,exports.NOISE_RATIO_STEP=rd,exports.NoisePlayerContext=$s,exports.NoiseSettingsTooltip=_d,exports.NoticeBox=Vy,exports.NotifyTextPreview=kx,exports.OrderListStep=Md,exports.PASS_CARD_BG_VARS=cr,exports.POS_LABEL=Sc,exports.PROMO_BANNER_BG_COMPONENTS=ru,exports.PROMO_BANNER_BG_OPTIONS=e2,exports.PROMO_BANNER_BG_VARS=Jr,exports.Page=Xa,exports.PageTitle=n8,exports.Pagination=rs,exports.Panel=da,exports.PanelGrid=cx,exports.PanelRow=fn,exports.PanelRowDevice=ux,exports.PassCard=Tu,exports.PassCardBg=dv,exports.PassCardBgIHAB=pv,exports.PassCardBgLeftColorGrid=hv,exports.PassCardBgTwoCircle=Nu,exports.PaymentPlan=cv,exports.PersonCard=ex,exports.PhonemeFilterPanel=Kw,exports.PhonemeSelectBlock=Uw,exports.Popup=qn,exports.ProgressBar=Ux,exports.ProgressIndicator=bc,exports.PromoBanner=A2,exports.PromoBannerBgDark=Wi,exports.PromoBannerBgDeep=Ri,exports.PromoBannerBgDiagonal=Ui,exports.PromoBannerBgDots=Ki,exports.PromoBannerBgInstagram=nu,exports.PromoBannerBgMain=Di,exports.PromoBannerBgNaver=eu,exports.PromoBannerBgOutline=Zi,exports.PromoBannerBgRadial=Vi,exports.PromoBannerBgSoft=Ti,exports.PromoBannerBgSoftSub=Fi,exports.PromoBannerBgSub=$i,exports.PromoBannerBgSuccess=Ji,exports.PromoBannerBgWarm=Oi,exports.PublicationCard=nx,exports.Radio=Ru,exports.RadioGroup=Av,exports.Rating=Ov,exports.ReportDocument=i8,exports.ReportInfoPanel=u8,exports.RingChart=zx,exports.SENTENCE_TRAINING_TYPES=Ds,exports.SearchSummary=Sv,exports.Section=Tr,exports.SectionHeadFloat=nc,exports.SectionHeader=ax,exports.SegmentedControl=Bn,exports.ShortcutBadge=Lu,exports.SideNav=yu,exports.Slider=mc,exports.SoundCompass=mv,exports.SplashLogo=rx,exports.StatChart=Wx,exports.SummaryStrip=s8,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=Fu,exports.Table=ms,exports.TableFilterPanel=ks,exports.Tabs=Tv,exports.TextBoxTooltip=Ya,exports.TextField=nr,exports.Timeline=tx,exports.Toast=Sr,exports.Toggle=Hu,exports.Toolbar=as,exports.Tooltip=En,exports.TooltipInfo=zn,exports.TooltipTextBox=Ya,exports.TopBanner=N2,exports.TrainingBlock=u4,exports.TrainingBlockButton=Qo,exports.TrainingBlockGrid=d4,exports.TrainingCard=m8,exports.TrainingCardGroup=f8,exports.TrainingPagePopup=rr,exports.TrainingPagePopupBottom=wd,exports.TrainingPagePopupTitle=Bd,exports.TrainingResultPopup=Fd,exports.TrainingStep=Cr,exports.TrainingStepAudioPlayer=Fs,exports.TrainingStepBullet=Cd,exports.TrainingStepCard=vd,exports.TrainingStepConfirm=Os,exports.TrainingStepConfirmWithText=zs,exports.TrainingStepListen=Ws,exports.TrainingStepOrderList=Hs,exports.TrainingStepTextBox=yd,exports.TrainingStepTitle=bd,exports.TrainingTooltip=Iu,exports.TrainingWordCard=gs,exports.UpdateAlert=h8,exports.WAVE_A_MAX=R_,exports.WAVE_H1_PX=Rs,exports.WAVE_HMAX_PX=L_,exports.WORD_LABEL_I18N_KEYS=k4,exports.WORD_TABLE_PAPER=hr,exports.WORD_TYPE_LABEL=Tc,exports.WordDataProvider=o8,exports.WordDataUpdatePopup=E8,exports.WordImageTooltip=Od,exports.WordSearchFilterPanel=Gw,exports.WordSearchResultBlock=Vw,exports.WordTable=Mr,exports.WordTableBlock=v8,exports.WordTableButton=_8,exports.WordTablePopup=V4,exports.WordTableThumbnail=qd,exports.buildMonthChartData=Dx,exports.cellKey=J4,exports.cellLabel=X4,exports.cellsForLabels=c_,exports.chartTotalNumClass=pr,exports.clearPassCardBgTheme=Vn,exports.clearPromoBannerBgTheme=ln,exports.closeTrainingPopup=hw,exports.companyTypeLabel=r8,exports.createTrainingScenario=Cw,exports.cx=ke,exports.deriveNoiseContexts=_w,exports.derivePassCard=Bu,exports.draftValues=C_,exports.effectiveNoiseVolume=Ts,exports.effectiveSpeechVolume=od,exports.expandSlashLabel=_s,exports.formatDuration=d_,exports.getControlDateRange=Ox,exports.getPayloadTimestamp=qs,exports.getPromoBannerBgTheme=zo,exports.getSelectedFromPayload=bw,exports.getSelectedText=yw,exports.getStepPayload=Ed,exports.getSteppedPayload=vw,exports.injectPassCardBgTheme=Hn,exports.injectPromoBannerBgTheme=sn,exports.isSelectionCorrect=xw,exports.labelOfCellKey=td,exports.labelsForSave=Z4,exports.levelToPct=B_,exports.markAfterClick=Ac,exports.marksForSave=ys,exports.mergeNoiseSettings=mr,exports.missesByType=s_,exports.monthKeyOf=ma,exports.monthKeyOfDate=ss,exports.nextFocus=n_,exports.nextMisses=o_,exports.noiseElementVolume=Ms,exports.noiseRatioOf=Ca,exports.pageStartIndexes=jc,exports.parseMonthKey=Dr,exports.passCardBgIhabTheme=Mu,exports.passCardBgLeftColorGridTheme=$u,exports.passCardBgTwoCircleTheme=Au,exports.pctToLevel=k_,exports.posLabels=Mc,exports.printWordTable=v4,exports.promoBannerBgDarkTheme=zi,exports.promoBannerBgDeepTheme=Li,exports.promoBannerBgDiagonalTheme=qi,exports.promoBannerBgDotsTheme=Gi,exports.promoBannerBgInstagramTheme=tu,exports.promoBannerBgMainTheme=ji,exports.promoBannerBgNaverTheme=Qi,exports.promoBannerBgOutlineTheme=Yi,exports.promoBannerBgRadialTheme=Hi,exports.promoBannerBgSoftSubTheme=Pi,exports.promoBannerBgSoftTheme=Si,exports.promoBannerBgSubTheme=Mi,exports.promoBannerBgSuccessTheme=Xi,exports.promoBannerBgWarmTheme=Ii,exports.recommendTables=i_,exports.regenerateUnpinned=f_,exports.removeItem=m_,exports.resolveTrainingItems=fw,exports.resolveTrainingPopupMeta=Ad,exports.reviewCells=U4,exports.reviewMeta=Y4,exports.reviewSetPlan=l_,exports.reviewTableName=K4,exports.scoreKey=Wa,exports.scoreSheetHeader=Q4,exports.shouldConfirmDiscard=y4,exports.splitTrainingVariants=mw,exports.summarize=b4,exports.summarizeMisses=a_,exports.tableTrends=t_,exports.toDraft=p_,exports.toTrainingText=gw,exports.togglePin=h_,exports.uncoveredLabels=u_,exports.useAnchoredMenu=ea,exports.useBarChartControl=lc,exports.useCalendarMonth=Xu,exports.useComboboxSuggestions=Ku,exports.useDiscardGuard=Xw,exports.useFitScale=Pc,exports.useNoisePlayer=qa,exports.useSoundCompassExam=b2,exports.useToastLifecycle=Cc,exports.useWordData=a8,exports.useWordTableDisplaySettings=Qc,exports.useWordTablePrint=js,exports.waveBarPx=Ga,exports.waveBarVal=Ka,exports.weakItems=e_,exports.weekValueOf=ls,exports.withStepTimes=Nd,exports.wordTypeLabels=$c;
1059
+ */const k8=[["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"}]],A8=oe("circle-x",k8);function N8(e){return{idle:0,"word-download":1,"image-list":2,"image-match":2,"pair-build":3,done:4}[e]??0}function Js({icon:e,label:n,state:a,pct:r,subText:s}){const{t:l}=Ee.useTranslation(),i=a==="done",u=a==="pending",c=a==="error",p=i?100:r??0;return t.jsxs("div",{className:"wdup-phase-card",children:[t.jsx("div",{className:`wdup-phase-card__icon${i?" wdup-phase-card__icon--done":c?" wdup-phase-card__icon--error":""}`,children:i?t.jsx(ml,{size:22,color:"white",strokeWidth:2.5}):c?t.jsx(A8,{size:22,color:"white",strokeWidth:2.5}):t.jsx("span",{className:`wdup-phase-card__icon-inner${u?" wdup-phase-card__icon-inner--pending":""}`,children:e})}),t.jsxs("div",{className:"wdup-phase-card__body",children:[t.jsxs("div",{className:"wdup-phase-card__top",children:[t.jsx("span",{className:`wdup-phase-card__label body-2${u?" wdup-phase-card__label--pending":""}`,children:n}),i?t.jsx(un,{variant:"sub",fill:"soft",size:"small",label:l("common.done","\uC644\uB8CC")}):c?t.jsx(un,{variant:"danger",fill:"soft",size:"small",label:l("common.failed","\uC2E4\uD328")}):(s||r!==void 0)&&t.jsxs("span",{className:"wdup-phase-card__sub body-3",children:[s,s&&r!==void 0?` \xB7 ${r}%`:r!==void 0?`${r}%`:""]})]}),!u&&t.jsx("div",{className:"wdup-bar",children:t.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 E8({title:e,progress:n,onDone:a,onRetry:r,onClose:s,inline:l}){const{t:i}=Ee.useTranslation(),{phase:u,error:c,wordCount:p,imagePage:h,imageDone:d,imageTotal:f,pairPercent:C}=n,x=N8(u),y=u==="done",b=!!c;function v(A){return b&&x===A?"error":x>A?"done":x===A?"active":"pending"}const _=v(1),g=v(2),w=v(3),N=u==="image-match"&&f?Math.round((d??0)/f*100):void 0,m=o.useMemo(()=>{if(g!=="done"){if(u==="image-list")return i("wordData.checkingPage",{page:h??1});if(u==="image-match"&&f)return i("wordData.imageCount",{done:To(d),total:To(f)})}},[g,u,h,f,d,i]);return t.jsx(qn,{inline:l,className:"popup--word-data-update",title:e,footer:b&&r?t.jsx(be,{htmlType:"button",size:56,variant:"main",onClick:r,children:i("common.retry","\uB2E4\uC2DC \uC2DC\uB3C4")}):b?t.jsx(be,{htmlType:"button",size:56,variant:"main",onClick:s??a,children:i("common.close","\uB2EB\uAE30")}):t.jsx(be,{htmlType:"button",size:56,variant:"main",disabled:!y,onClick:a,children:i("common.done","\uC644\uB8CC")}),children:t.jsxs("div",{className:"wdup-cards",children:[t.jsx(Js,{icon:t.jsx(ul,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseWordDownload","\uB2E8\uC5B4 \uB370\uC774\uD130 \uB2E4\uC6B4\uB85C\uB4DC"),state:_,subText:_==="active"?i("wordData.downloadingCount",{n:To(p),count:p}):void 0}),t.jsx(Js,{icon:t.jsx(B8,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phaseImageCheck","\uC774\uBBF8\uC9C0 \uD655\uC778"),state:g,pct:N,subText:m}),t.jsx(Js,{icon:t.jsx(pl,{size:22,color:"var(--color-main, #29b6c8)",strokeWidth:1.8}),label:i("wordData.phasePairAnalysis","\uB2E8\uC5B4\uC30D \uBD84\uC11D"),state:w,pct:w==="active"?C??0:void 0,subText:void 0})]})})}const j8=.15;function Ht(e,n,a=0){return{animation:`hero-visual-${e} ${n}s ease-in-out ${a}s infinite backwards`}}function Vt(e,n={}){return{className:`hero-visual__in hero-visual__in--${e}`,style:{transformOrigin:n.origin,"--hero-visual-turn":n.turn??0,...n.vars}}}const gr={pathLength:1,strokeDasharray:"1 1"},Qs={transformBox:"fill-box",transformOrigin:"center"},Fe={c1:"var(--hero-visual-1)",c2:"var(--hero-visual-2)",c3:"var(--hero-visual-3)",c4:"var(--hero-visual-4)",c5:"var(--hero-visual-5)",c6:"var(--hero-visual-6)"},el=[Fe.c1,Fe.c2,Fe.c3,Fe.c4,Fe.c5,Fe.c6];function Ud(e,n,a,r){return Array.from({length:r},(s,l)=>{const i=l/r*Math.PI*2;return{x:e+a*Math.cos(i),y:n+a*Math.sin(i)}})}const ro={blobs:{viewBox:"0 20 660 660",width:660,height:660,render:e=>t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:`${e}-big`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:".5",stopColor:"var(--color-main)"}),t.jsx("stop",{offset:".8",stopColor:"var(--color-sub)"})]}),t.jsxs("linearGradient",{id:`${e}-small`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:".5",stopColor:"var(--color-sub)"}),t.jsx("stop",{offset:".8",stopColor:"color-mix(in srgb, #ffffbb 30%, var(--color-sub))"})]})]}),t.jsx("g",{...Vt("bloom",{turn:0,origin:"330px 350px"}),children:t.jsxs("g",{style:Ht("blob-1",22),children:[t.jsx("circle",{cx:330,cy:350,r:240,fill:`url(#${e}-big)`}),[{stroke:"rgba(77, 205, 192, 0.45)",delay:0},{stroke:"rgba(73, 156, 223, 0.35)",delay:1.35},{stroke:"rgba(77, 205, 192, 0.25)",delay:2.7}].map(n=>t.jsx("circle",{className:"hero-visual__ring",cx:330,cy:350,r:241,fill:"none",stroke:n.stroke,strokeWidth:2,style:{...Qs,animation:`hero-visual-wave 4s ease-out ${n.delay}s infinite backwards`}},n.delay))]})}),t.jsx("g",{...Vt("bloom",{turn:.06,origin:"490px 490px"}),children:t.jsx("circle",{cx:490,cy:490,r:100,fill:`url(#${e}-small)`,style:Ht("blob-2",17,-5)})})]})},ribbon:{viewBox:"-40 140 880 294",width:880,height:294,render:e=>{const n="M-40,420 C140,470 240,330 360,340 S520,500 600,400 S560,200 440,250 S480,420 580,360 S740,200 840,140",a="M440,250 C320,300 480,420 580,360 S740,200 840,140";return t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:`${e}-rib`,gradientUnits:"userSpaceOnUse",x1:"0",y1:"420",x2:"760",y2:"120",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c1}),t.jsx("stop",{offset:".4",stopColor:Fe.c3}),t.jsx("stop",{offset:".7",stopColor:Fe.c4}),t.jsx("stop",{offset:"1",stopColor:Fe.c6})]}),t.jsxs("mask",{id:`${e}-mask`,maskUnits:"userSpaceOnUse",x:"-100",y:"-100",width:"1000",height:"800",children:[t.jsx("rect",{x:"-100",y:"-100",width:"1000",height:"800",fill:"#000"}),t.jsx("path",{d:n,fill:"none",stroke:"#fff",strokeWidth:62,strokeLinecap:"round"})]}),t.jsx("filter",{id:`${e}-blur`,x:"-20%",y:"-20%",width:"140%",height:"140%",children:t.jsx("feGaussianBlur",{stdDeviation:"9"})})]}),t.jsxs("g",{style:Ht("floaty",7),children:[t.jsx("path",{d:n,fill:"none",stroke:`url(#${e}-rib)`,strokeWidth:64,strokeLinecap:"round",strokeLinejoin:"round",...gr,...Vt("draw")}),t.jsx("g",{mask:`url(#${e}-mask)`,...Vt("fade",{turn:.04}),children:t.jsx("path",{d:a,fill:"none",stroke:Fe.c1,strokeWidth:64,strokeLinecap:"butt",strokeDasharray:"0 130 3000",opacity:".34",filter:`url(#${e}-blur)`,transform:"translate(0,10)"})}),t.jsx("path",{d:a,fill:"none",stroke:`url(#${e}-rib)`,strokeWidth:64,strokeLinecap:"round",strokeLinejoin:"round",...gr,...Vt("draw",{turn:.06})})]})]})}},spheres:{viewBox:"0 -10 640 580",width:640,height:580,render:e=>{const n=[{cx:450,cy:240,r:190,fill:`url(#${e}-halo)`,opacity:.8,blur:!0,idle:Ht("breathe",9),self:!0,turn:0},{cx:275,cy:45,r:55,fill:`url(#${e}-drop)`,idle:Ht("drift",8),turn:.09},{cx:310,cy:310,r:160,fill:`url(#${e}-lime)`,idle:Ht("floaty",7),turn:.03},{cx:150,cy:430,r:150,fill:`url(#${e}-fade)`,opacity:.75,blend:!0,idle:Ht("floaty",7,2.5),turn:.06},{cx:361,cy:521,r:21,fill:`url(#${e}-bead)`,idle:Ht("drift",6,1),turn:.12}];return t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("radialGradient",{id:`${e}-halo`,cx:".4",cy:".4",r:".85",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c5}),t.jsx("stop",{offset:".55",stopColor:Fe.c2}),t.jsx("stop",{offset:".72",stopColor:"#ffffff"}),t.jsx("stop",{offset:"1",stopColor:"#ffffff"})]}),t.jsxs("linearGradient",{id:`${e}-drop`,x1:"0",y1:"0",x2:"0",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c1}),t.jsx("stop",{offset:".7",stopColor:Fe.c5}),t.jsx("stop",{offset:"1",stopColor:Fe.c5,stopOpacity:"0"})]}),t.jsxs("linearGradient",{id:`${e}-lime`,x1:".67",y1:".03",x2:".33",y2:".97",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c6}),t.jsx("stop",{offset:".45",stopColor:Fe.c4}),t.jsx("stop",{offset:"1",stopColor:Fe.c1})]}),t.jsxs("linearGradient",{id:`${e}-fade`,x1:"0",y1:"0",x2:"0",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c1}),t.jsx("stop",{offset:".45",stopColor:Fe.c3}),t.jsx("stop",{offset:".95",stopColor:Fe.c3,stopOpacity:"0"})]}),t.jsxs("linearGradient",{id:`${e}-bead`,x1:"0",y1:"0",x2:"0",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c4}),t.jsx("stop",{offset:"1",stopColor:Fe.c1})]}),t.jsx("filter",{id:`${e}-soft`,x:"-30%",y:"-30%",width:"160%",height:"160%",children:t.jsx("feGaussianBlur",{stdDeviation:"34"})})]}),n.map(a=>t.jsx("g",{...Vt("settle",{turn:a.turn,origin:`${a.cx}px ${a.cy}px`}),children:t.jsx("circle",{className:a.blend?"hero-visual__blades":void 0,cx:a.cx,cy:a.cy,r:a.r,fill:a.fill,opacity:a.opacity,filter:a.blur?`url(#${e}-soft)`:void 0,style:a.self?{...Qs,...a.idle}:a.idle})},`${a.cx},${a.cy}`))]})}},clover:{viewBox:"203.5 123.5 273 273",width:273,height:273,render:e=>{const n=[{d:"M360,140 A140,140 0 0 1 220,280 L220,232 A92,92 0 0 0 312,140 Z",fill:`url(#${e}-p1)`,origin:"220px 140px",turn:0},{d:"M460,280 A140,140 0 0 1 320,140 L368,140 A92,92 0 0 0 460,232 Z",fill:`url(#${e}-p3)`,origin:"460px 140px",turn:.03},{d:"M320,380 A140,140 0 0 1 460,240 L460,288 A92,92 0 0 0 368,380 Z",fill:`url(#${e}-p4)`,origin:"460px 380px",turn:.06},{d:"M220,240 A140,140 0 0 1 360,380 L312,380 A92,92 0 0 0 220,288 Z",fill:`url(#${e}-p2)`,origin:"220px 380px",turn:.09}];return t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:`${e}-p1`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c3}),t.jsx("stop",{offset:"1",stopColor:Fe.c6})]}),t.jsxs("linearGradient",{id:`${e}-p2`,x1:"0",y1:"1",x2:"1",y2:"0",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c1}),t.jsx("stop",{offset:"1",stopColor:Fe.c4})]}),t.jsxs("linearGradient",{id:`${e}-p3`,x1:"0",y1:"0",x2:"1",y2:"0",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c4}),t.jsx("stop",{offset:"1",stopColor:Fe.c3})]}),t.jsxs("linearGradient",{id:`${e}-p4`,x1:"1",y1:"0",x2:"0",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c6}),t.jsx("stop",{offset:"1",stopColor:Fe.c3})]})]}),t.jsx("g",{className:"hero-visual__petals",children:n.map(a=>t.jsx("path",{d:a.d,fill:a.fill,...Vt("pop",{turn:a.turn,origin:a.origin})},a.origin))})]})}},stackedPills:{viewBox:"-46.5 -88.9 493 493",width:493,height:493,render:e=>t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:`${e}-p1`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c5}),t.jsx("stop",{offset:"1",stopColor:Fe.c6})]}),t.jsxs("linearGradient",{id:`${e}-p2`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c3}),t.jsx("stop",{offset:"1",stopColor:Fe.c4})]}),t.jsxs("linearGradient",{id:`${e}-p3`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c1}),t.jsx("stop",{offset:"1",stopColor:Fe.c2})]})]}),[{cy:60,angle:-16,color:`url(#${e}-p1)`,opacity:.75},{cy:160,angle:14,color:`url(#${e}-p2)`,opacity:.85},{cy:260,angle:-14,color:`url(#${e}-p3)`,opacity:.95}].map((n,a)=>t.jsx("g",{...Vt("fan",{origin:`200px ${n.cy}px`,vars:{"--dy":`${160-n.cy}px`,"--a":`${n.angle}deg`}}),children:t.jsx("rect",{x:30,y:n.cy-60,width:340,height:120,rx:60,fill:n.color,opacity:n.opacity,style:{...Qs,...Ht("sway",7,a)}})},n.cy))]})},doubleRing:{viewBox:"-3.5 -78.5 777 777",width:777,height:777,render:e=>{const n=t.jsx("g",{style:{animation:"hero-visual-rove-a 19s ease-in-out infinite"},children:t.jsx("g",{style:{transformOrigin:"290px 300px",animation:"hero-visual-revolve 26s linear infinite"},children:t.jsx("circle",{cx:290,cy:300,r:210,fill:"none",stroke:`url(#${e}-r1)`,strokeWidth:74,strokeLinecap:"round",...gr,...Vt("draw")})})});return t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:`${e}-r1`,gradientUnits:"userSpaceOnUse",x1:"60",y1:"80",x2:"520",y2:"520",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c6}),t.jsx("stop",{offset:".5",stopColor:Fe.c4}),t.jsx("stop",{offset:"1",stopColor:Fe.c2})]}),t.jsxs("linearGradient",{id:`${e}-r2`,gradientUnits:"userSpaceOnUse",x1:"300",y1:"120",x2:"700",y2:"560",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c3}),t.jsx("stop",{offset:".55",stopColor:Fe.c1}),t.jsx("stop",{offset:"1",stopColor:Fe.c1})]}),t.jsxs("mask",{id:`${e}-over`,maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"800",height:"640",children:[t.jsx("rect",{x:"0",y:"0",width:"800",height:"640",fill:"#000"}),t.jsx("circle",{cx:500,cy:340,r:190,fill:"none",stroke:"#fff",strokeWidth:82,style:{animation:"hero-visual-rove-b 23s ease-in-out infinite"}}),t.jsx("rect",{x:"0",y:"323",width:"800",height:"320",fill:"#000"})]})]}),t.jsxs("g",{style:{transformOrigin:"380px 300px",...Ht("breathe",9)},children:[n,t.jsx("g",{style:{animation:"hero-visual-rove-b 23s ease-in-out infinite"},children:t.jsx("g",{style:{transformOrigin:"500px 340px",animation:"hero-visual-revolve-r 22s linear infinite"},children:t.jsx("circle",{cx:500,cy:340,r:190,fill:"none",stroke:`url(#${e}-r2)`,strokeWidth:74,strokeLinecap:"round",...gr,...Vt("draw",{turn:.08})})})}),t.jsx("g",{mask:`url(#${e}-over)`,children:n})]})]})}},concentric:{viewBox:"-23.5 -83.5 727 727",width:727,height:727,render:e=>t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:`${e}-outer`,gradientUnits:"userSpaceOnUse",x1:"20",y1:"-40",x2:"660",y2:"600",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c3}),t.jsx("stop",{offset:"1",stopColor:Fe.c6})]}),t.jsxs("linearGradient",{id:`${e}-mid`,gradientUnits:"userSpaceOnUse",x1:"120",y1:"280",x2:"560",y2:"280",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c2}),t.jsx("stop",{offset:"1",stopColor:Fe.c4})]}),t.jsxs("linearGradient",{id:`${e}-inner`,gradientUnits:"userSpaceOnUse",x1:"200",y1:"420",x2:"480",y2:"140",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c1}),t.jsx("stop",{offset:".5",stopColor:Fe.c1}),t.jsx("stop",{offset:"1",stopColor:Fe.c3})]})]}),[{r:54,stroke:Fe.c2,opacity:1,idle:0,turn:0},{r:134,stroke:`url(#${e}-inner)`,opacity:.9,idle:.4,turn:.04},{r:214,stroke:`url(#${e}-mid)`,opacity:.8,idle:.8,turn:.08},{r:294,stroke:`url(#${e}-outer)`,opacity:.55,idle:1.2,turn:.12}].map(n=>t.jsx("g",{...Vt("pop",{turn:n.turn,origin:"340px 280px"}),children:t.jsx("circle",{cx:340,cy:280,r:n.r,fill:"none",stroke:n.stroke,strokeWidth:52,opacity:n.opacity,style:{transformOrigin:"340px 280px",...Ht("pulse",4,n.idle)}})},n.r))]})},metaball:{viewBox:"-16 82 530 536",width:530,height:536,render:e=>t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("filter",{id:`${e}-goo`,x:"-20%",y:"-20%",width:"140%",height:"140%",children:[t.jsx("feGaussianBlur",{stdDeviation:"18"}),t.jsx("feColorMatrix",{values:"1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 26 -12"})]}),t.jsxs("linearGradient",{id:`${e}-big`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:".5",stopColor:"var(--color-main)"}),t.jsx("stop",{offset:".8",stopColor:"var(--color-sub)"})]}),t.jsxs("linearGradient",{id:`${e}-small`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:".5",stopColor:"var(--color-sub)"}),t.jsx("stop",{offset:".8",stopColor:"color-mix(in srgb, #ffffbb 30%, var(--color-sub))"})]})]}),t.jsxs("g",{filter:`url(#${e}-goo)`,children:[t.jsx("g",{...Vt("meet",{vars:{"--from":"20px"}}),children:t.jsx("circle",{cx:240,cy:350,r:240,fill:`url(#${e}-big)`,style:Ht("blob-1",22)})}),t.jsx("g",{...Vt("meet",{turn:.03,vars:{"--from":"-120px"}}),children:t.jsx("circle",{cx:400,cy:490,r:100,fill:`url(#${e}-small)`,style:Ht("blob-2",17,-5)})})]})]})},dottedRipple:{viewBox:"87.5 27.5 505 505",width:505,height:505,render:()=>t.jsxs("g",{style:{transformOrigin:"340px 280px",...Ht("breathe",6)},children:[t.jsx("g",{...Vt("pop",{turn:0,origin:"340px 280px"}),children:t.jsx("circle",{cx:340,cy:280,r:22,fill:Fe.c1})}),Array.from({length:5},(e,n)=>t.jsx("g",{...Vt("pop",{turn:.03*(n+1),origin:"340px 280px"}),children:Ud(340,280,50+42*n,8+8*n).map(a=>t.jsx("circle",{cx:a.x,cy:a.y,r:9-1.2*n,fill:el[n]},`${a.x},${a.y}`))},n))]})},vesica:{viewBox:"67.5 7.5 545 545",width:545,height:545,render:e=>t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:`${e}-cool`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c1}),t.jsx("stop",{offset:"1",stopColor:Fe.c3})]}),t.jsxs("linearGradient",{id:`${e}-warm`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c4}),t.jsx("stop",{offset:"1",stopColor:Fe.c6})]})]}),t.jsxs("g",{className:"hero-visual__lens",children:[t.jsx("g",{...Vt("meet",{vars:{"--from":"70px"}}),children:t.jsx("circle",{cx:270,cy:280,r:170,fill:`url(#${e}-cool)`,opacity:".8",style:Ht("approach-r",6)})}),t.jsx("g",{...Vt("meet",{vars:{"--from":"-70px"}}),children:t.jsx("circle",{cx:410,cy:280,r:170,fill:`url(#${e}-warm)`,opacity:".8",style:Ht("approach",6)})})]})]})},stackedDiscs:{viewBox:"112.5 67.5 455 455",width:455,height:455,render:()=>t.jsx("g",{className:"hero-visual__discs",children:el.map((e,n)=>t.jsx("g",{...Vt("pop",{turn:n*.025,origin:`340px ${150+58*n}px`}),children:t.jsx("ellipse",{cx:340,cy:150+58*n,rx:200-12*n,ry:46,fill:e,opacity:".8",style:Ht("floaty",7,.4*n)})},e))})},flower:{viewBox:"124 64 432 432",width:432,height:432,render:()=>t.jsx("g",{className:"hero-visual__blades",style:{transformOrigin:"340px 280px",...Ht("breathe",9)},children:Ud(340,280,95,6).map((e,n)=>t.jsx("g",{...Vt("unfold",{turn:n*.025,origin:"340px 280px",vars:{"--gx":`${340-e.x}px`,"--gy":`${280-e.y}px`}}),children:t.jsx("circle",{cx:e.x,cy:e.y,r:95,fill:el[n],opacity:".6",style:Ht("gather",36)})},`${e.x},${e.y}`))})},squircles:{viewBox:"7 7 186 186",width:186,height:186,render:e=>t.jsxs(t.Fragment,{children:[t.jsxs("defs",{children:[t.jsxs("linearGradient",{id:`${e}-q1`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c6}),t.jsx("stop",{offset:"1",stopColor:Fe.c4})]}),t.jsxs("linearGradient",{id:`${e}-q2`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c3}),t.jsx("stop",{offset:"1",stopColor:Fe.c4})]}),t.jsxs("linearGradient",{id:`${e}-q3`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:Fe.c1}),t.jsx("stop",{offset:"1",stopColor:Fe.c2})]})]}),[{d:"M100 18 C150 18 182 50 182 100 C182 150 150 182 100 182 C50 182 18 150 18 100 C18 50 50 18 100 18 Z",fill:`url(#${e}-q1)`,opacity:.55,idle:0,turn:0},{d:"M100 42 C136 42 158 64 158 100 C158 136 136 158 100 158 C64 158 42 136 42 100 C42 64 64 42 100 42 Z",fill:`url(#${e}-q2)`,opacity:.75,idle:.5,turn:.03},{d:"M100 66 C122 66 134 78 134 100 C134 122 122 134 100 134 C78 134 66 122 66 100 C66 78 78 66 100 66 Z",fill:`url(#${e}-q3)`,opacity:1,idle:1,turn:.06}].map(n=>t.jsx("g",{...Vt("bloom",{turn:n.turn,origin:"100px 100px"}),children:t.jsx("g",{style:{transformOrigin:"100px 100px",...Ht("breathe",5,n.idle)},children:t.jsx("path",{d:n.d,fill:n.fill,opacity:n.opacity})})},n.turn))]})},dotGrid:{viewBox:"14 14 172 172",width:172,height:172,render:e=>{const n=[50,100,150].flatMap((a,r)=>[50,100,150].map((s,l)=>({cx:s,cy:a,fill:`url(#${e}-${s===100&&a===100?"n3":r===2?"n2":"n1"})`,middle:s===100&&a===100,idle:(r*3+l)*.3,turn:(r*3+l)*.015})));return t.jsxs(t.Fragment,{children:[t.jsx("defs",{children:[["n1",Fe.c3,Fe.c4],["n2",Fe.c6,Fe.c5],["n3",Fe.c1,Fe.c2]].map(([a,r,s])=>t.jsxs("linearGradient",{id:`${e}-${a}`,x1:"0",y1:"0",x2:"1",y2:"1",children:[t.jsx("stop",{offset:"0",stopColor:r}),t.jsx("stop",{offset:"1",stopColor:s})]},a))}),n.map(a=>t.jsx("g",{...Vt("pop",{turn:a.turn,origin:`${a.cx}px ${a.cy}px`}),children:t.jsx("circle",{cx:a.cx,cy:a.cy,r:18,fill:a.fill,style:a.middle?void 0:Ht("blink",2.7,a.idle)})},`${a.cx},${a.cy}`))]})}},stairs:{viewBox:"13.5 18.5 175 175",width:175,height:175,render:e=>t.jsxs(t.Fragment,{children:[t.jsx("defs",{children:[["t1",Fe.c6,Fe.c5,110],["t2",Fe.c4,Fe.c3,86],["t3",Fe.c3,Fe.c2,62],["t4",Fe.c1,Fe.c2,38]].map(([n,a,r,s])=>t.jsxs("linearGradient",{id:`${e}-${n}`,gradientUnits:"userSpaceOnUse",x1:"0",y1:s,x2:"0",y2:174,children:[t.jsx("stop",{offset:"0",stopColor:r}),t.jsx("stop",{offset:"1",stopColor:a})]},n))}),[{x:24,y:110,stroke:`url(#${e}-t1)`},{x:66,y:86,stroke:`url(#${e}-t2)`},{x:108,y:62,stroke:`url(#${e}-t3)`},{x:150,y:38,stroke:`url(#${e}-t4)`}].map((n,a)=>t.jsx("g",{style:Ht("floaty",3.6,a*.3),children:t.jsx("line",{x1:n.x+14,y1:160,x2:n.x+14,y2:n.y+14,stroke:n.stroke,strokeWidth:28,strokeLinecap:"round",...gr,...Vt("draw",{turn:a*.03})})},n.x))]})}},D8=Object.keys(ro);function S8({variant:e,motion:n="loop",cycleMs:a=9e3,label:r,className:s,style:l,onCycleEnd:i}){const u=o.useRef(null),c=o.useRef(i);c.current=i,o.useEffect(()=>{if(n!=="once"||!c.current)return;const d=u.current;if(!d)return;let f=!1;const C=()=>{f||(f=!0,c.current?.())};let x=d.querySelectorAll(".hero-visual__in").length;const y=g=>{g.target?.classList?.contains("hero-visual__in")&&--x<=0&&C()};d.addEventListener("animationend",y);const b=typeof d.getAnimations=="function"?d.getAnimations({subtree:!0}).map(g=>Number(g.effect?.getComputedTiming().endTime??0)).filter(g=>Number.isFinite(g)&&g>0):[],v=b.length>0?Math.max(...b):a*(1+j8),_=setTimeout(C,v+120);return()=>{d.removeEventListener("animationend",y),clearTimeout(_)}},[n,e,a]);const p=`hero-visual-${o.useId().replace(/:/g,"")}`,h=ro[e]??ro.blobs;return ro[e]||jt(`HeroVisual: \uBAA8\uB974\uB294 variant '${e}' \u2014 blobs \uB85C \uC138\uC6B4\uB2E4`),t.jsx("div",{ref:u,className:ke("hero-visual",`hero-visual--${e}`,n==="still"&&"hero-visual--still",n==="once"&&"hero-visual--once",s),style:{aspectRatio:`${h.width} / ${h.height}`,"--hero-visual-cycle":`${a}ms`,...l},role:r?"img":void 0,"aria-label":r,"aria-hidden":r?void 0:!0,children:t.jsx("svg",{className:"hero-visual__svg",viewBox:h.viewBox,preserveAspectRatio:"xMidYMid meet",focusable:"false",children:h.render(p)})})}function T8({enabled:e=!1,renderResultPopup:n}={}){const{t:a}=Ee.useTranslation(),[r,s]=o.useState(null),[l,i]=o.useState(null),u=C=>{let x=null;C==="noise"?x={score:3,contextsLength:5,results:[{sentence:"\uBB38\uC7A5 A",judgement:!0,wording:"\uC798 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 B",judgement:!1,wording:"\uC548 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 C",judgement:!0,wording:"\uC798 \uB4E4\uB9BC",useAnswer:!1},{sentence:"\uBB38\uC7A5 D",judgement:null,wording:"\uC548 \uD568",useAnswer:!1},{sentence:"\uBB38\uC7A5 E",judgement:!1,wording:"\uC548 \uB4E4\uB9BC",useAnswer:!1}]}:C==="short"?x={score:2,contextsLength:3,results:[{sentence:"\uBE44\uBE54\uBC25 \uC124\uBA85",answer:"\uBE44\uBE54\uBC25",selected:"\uBE44\uBE54\uBC25",selectedText:"\uBE44\uBE54\uBC25",correct:!0},{sentence:"\uBCF4\uC308 \uC124\uBA85",answer:"\uBCF4\uC308",selected:"\uC871\uBC1C",selectedText:"\uC871\uBC1C",correct:!1},{sentence:"\uCE7C\uAD6D\uC218 \uC124\uBA85",answer:"\uCE7C\uAD6D\uC218",selected:void 0,selectedText:void 0,correct:void 0}]}:C==="long"?x={score:4,contextsLength:4,results:[{sentence:"\uAE34 \uC774\uC57C\uAE30 1",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 1",selectedText:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 1",correct:!0},{sentence:"\uAE34 \uC774\uC57C\uAE30 2",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 2",selectedText:"\uC120\uD0DD \uD14D\uC2A4\uD2B8 2",correct:!1},{sentence:"\uAE34 \uC774\uC57C\uAE30 3",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 3",selectedText:void 0,correct:void 0},{sentence:"\uAE34 \uC774\uC57C\uAE30 4",answer:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 4",selectedText:"\uC815\uB2F5 \uD14D\uC2A4\uD2B8 4",correct:!0}]}:C==="order"&&(x={score:1,contextsLength:2,results:[{sentence:"\uC21C\uC11C \uBB38\uC81C 1",answer:"1,2,3",selectedText:"1,2,3",correct:!0},{sentence:"\uC21C\uC11C \uBB38\uC81C 2",answer:"A,B,C",selectedText:"B,A,C",correct:!1}]}),i(x),s(C)},c=o.useCallback(()=>{s(null),i(null)},[]),p=o.useCallback(()=>u("noise"),[]),h=o.useCallback(()=>u("short"),[]),d=o.useCallback(()=>u("long"),[]),f=o.useCallback(()=>u("order"),[]);return e?t.jsxs("div",{className:"debug-result-launcher",children:[t.jsxs("div",{className:"debug-buttons",children:[t.jsx("button",{type:"button",className:"debug-button",onClick:p,children:a("debug.showResult",{type:"Noise",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),t.jsx("button",{type:"button",className:"debug-button",onClick:h,children:a("debug.showResult",{type:"ShortStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),t.jsx("button",{type:"button",className:"debug-button",onClick:d,children:a("debug.showResult",{type:"LongStory",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})}),t.jsx("button",{type:"button",className:"debug-button",onClick:f,children:a("debug.showResult",{type:"Order",defaultValue:"{{type}} \uACB0\uACFC\uBCF4\uAE30"})})]}),r&&l?n?.({score:l.score,contextsLength:l.contextsLength,results:l.results,onReplay:c,onClose:c}):null]}):null}exports.Accordion=j2,exports.ActionCard=zy,exports.Alert=Ev,exports.AppHeader=L2,exports.AudioMeter=ps,exports.AudioPlayer=Fs,exports.Avatar=Lv,exports.Badge=un,exports.BarChart=Rx,exports.BarChartControls=ic,exports.Board=Qv,exports.BottomNav=fu,exports.BrandIdentity=xu,exports.BrandLogo=vu,exports.Breadcrumb=Fv,exports.BulkBar=_x,exports.Button=be,exports.CONSENT_KINDS=ec,exports.CORE_VERSION=Dy,exports.Calendar=l4,exports.CardStep=$d,exports.ChartLegend=os,exports.ChartSection=Ir,exports.ChartTotal=Da,exports.Checkbox=ns,exports.ChoiceChips=y_,exports.CircleBadge=Ln,exports.CodeBox=xx,exports.ColorPicker=Hv,exports.CompanyMeta=ox,exports.ConfirmPopup=zd,exports.ConfirmStep=Sd,exports.ConfirmWithTextStep=Td,exports.ConsentRecordPopup=Cx,exports.ContrastFilterPanel=Yw,exports.CoreScope=Wy,exports.CountTile=Yv,exports.CouponInputPopup=Jw,exports.DEFAULT_NOISE_SETTINGS=fa,exports.DatePicker=Qu,exports.DebugResultLauncher=T8,exports.DescriptionTooltip=Qn,exports.DeviceSideTable=r4,exports.Dialog=Jv,exports.Divider=kv,exports.Dropdown=An,exports.EffectPartyPopper=Ys,exports.EffectPartyPopperHost=t8,exports.EmptyState=Iy,exports.ErrorState=Oy,exports.FILTER_ALL_VALUE=jn,exports.FileUpload=Pv,exports.FilterPanel=Gn,exports.FilterSectionInfo=rr,exports.Footer=v_,exports.GameIntro=Ix,exports.HERO_VISUAL_VARIANTS=D8,exports.Header=_u,exports.HeroVisual=S8,exports.Icon=dt,exports.IconGridMenu=b_,exports.IconRenderer=dt,exports.InfoTooltip=zn,exports.ItemActions=Bx,exports.LEVEL_MAX=Ra,exports.LINE_CHART_HOVER_DELAY_MS=uc,exports.LandingBottomSticky=__,exports.LandingButton=bv,exports.LandingCard=gv,exports.LandingHeader=x_,exports.LandingSection=fv,exports.LandingStatBand=Bv,exports.LandingTitle=Cv,exports.LineChart=Fx,exports.ListPopup=Zw,exports.ListenStep=Dd,exports.Loader=ka,exports.MARKS=Hr,exports.MARK_ICON=Nc,exports.MARK_VARIANT=Ec,exports.MediaQueryOverrideContext=Bi,exports.MenuTooltip=Na,exports.NOISE_RATIO_MAX=fr,exports.NOISE_RATIO_STEP=ad,exports.NoisePlayerContext=$s,exports.NoiseSettingsTooltip=_d,exports.NoticeBox=Vy,exports.NotifyTextPreview=kx,exports.OrderListStep=Md,exports.PASS_CARD_BG_VARS=ca,exports.POS_LABEL=Sc,exports.PROMO_BANNER_BG_COMPONENTS=au,exports.PROMO_BANNER_BG_OPTIONS=e2,exports.PROMO_BANNER_BG_VARS=Qa,exports.Page=Xr,exports.PageTitle=n8,exports.Pagination=as,exports.Panel=dr,exports.PanelGrid=cx,exports.PanelRow=fn,exports.PanelRowDevice=ux,exports.PassCard=Tu,exports.PassCardBg=dv,exports.PassCardBgIHAB=pv,exports.PassCardBgLeftColorGrid=hv,exports.PassCardBgTwoCircle=Nu,exports.PaymentPlan=cv,exports.PersonCard=ex,exports.PhonemeFilterPanel=Kw,exports.PhonemeSelectBlock=Uw,exports.Popup=qn,exports.ProgressBar=Ux,exports.ProgressIndicator=bc,exports.PromoBanner=A2,exports.PromoBannerBgDark=Wi,exports.PromoBannerBgDeep=Ri,exports.PromoBannerBgDiagonal=Ui,exports.PromoBannerBgDots=Ki,exports.PromoBannerBgInstagram=nu,exports.PromoBannerBgMain=Di,exports.PromoBannerBgNaver=eu,exports.PromoBannerBgOutline=Zi,exports.PromoBannerBgRadial=Vi,exports.PromoBannerBgSoft=Ti,exports.PromoBannerBgSoftSub=Fi,exports.PromoBannerBgSub=$i,exports.PromoBannerBgSuccess=Ji,exports.PromoBannerBgWarm=Oi,exports.PublicationCard=nx,exports.Radio=Ru,exports.RadioGroup=Av,exports.Rating=Ov,exports.ReportDocument=i8,exports.ReportInfoPanel=u8,exports.RingChart=zx,exports.SENTENCE_TRAINING_TYPES=Ds,exports.SearchSummary=Sv,exports.Section=Ma,exports.SectionHeadFloat=nc,exports.SectionHeader=rx,exports.SegmentedControl=kn,exports.ShortcutBadge=Lu,exports.SideNav=yu,exports.Slider=mc,exports.SoundCompass=mv,exports.SplashLogo=ax,exports.StatChart=Wx,exports.SummaryStrip=s8,exports.TRAINING_TOOLTIP_HOVER_DELAY_MS=Fu,exports.Table=ms,exports.TableFilterPanel=ks,exports.Tabs=Tv,exports.TextBoxTooltip=Yr,exports.TextField=na,exports.Timeline=tx,exports.Toast=Ta,exports.Toggle=Hu,exports.Toolbar=rs,exports.Tooltip=Bn,exports.TooltipInfo=zn,exports.TooltipTextBox=Yr,exports.TopBanner=N2,exports.TrainingBlock=u4,exports.TrainingBlockButton=Qo,exports.TrainingBlockGrid=d4,exports.TrainingCard=m8,exports.TrainingCardGroup=f8,exports.TrainingPagePopup=aa,exports.TrainingPagePopupBottom=wd,exports.TrainingPagePopupTitle=Bd,exports.TrainingResultPopup=Fd,exports.TrainingStep=Ca,exports.TrainingStepAudioPlayer=Fs,exports.TrainingStepBullet=Cd,exports.TrainingStepCard=vd,exports.TrainingStepConfirm=Os,exports.TrainingStepConfirmWithText=zs,exports.TrainingStepListen=Ws,exports.TrainingStepOrderList=Hs,exports.TrainingStepTextBox=yd,exports.TrainingStepTitle=bd,exports.TrainingTooltip=Iu,exports.TrainingWordCard=gs,exports.UpdateAlert=h8,exports.WAVE_A_MAX=R_,exports.WAVE_H1_PX=Rs,exports.WAVE_HMAX_PX=L_,exports.WORD_LABEL_I18N_KEYS=k4,exports.WORD_TABLE_PAPER=ha,exports.WORD_TYPE_LABEL=Tc,exports.WordDataProvider=o8,exports.WordDataUpdatePopup=E8,exports.WordImageTooltip=Od,exports.WordSearchFilterPanel=Gw,exports.WordSearchResultBlock=Vw,exports.WordTable=$a,exports.WordTableBlock=v8,exports.WordTableButton=_8,exports.WordTablePopup=V4,exports.WordTableThumbnail=qd,exports.buildMonthChartData=Dx,exports.cellKey=J4,exports.cellLabel=X4,exports.cellsForLabels=c_,exports.chartTotalNumClass=pa,exports.clearPassCardBgTheme=Vn,exports.clearPromoBannerBgTheme=ln,exports.closeTrainingPopup=hw,exports.companyTypeLabel=a8,exports.createTrainingScenario=Cw,exports.cx=ke,exports.deriveNoiseContexts=_w,exports.derivePassCard=Bu,exports.draftValues=C_,exports.effectiveNoiseVolume=Ts,exports.effectiveSpeechVolume=od,exports.expandSlashLabel=_s,exports.formatDuration=d_,exports.getControlDateRange=Ox,exports.getPayloadTimestamp=qs,exports.getPromoBannerBgTheme=zo,exports.getSelectedFromPayload=bw,exports.getSelectedText=yw,exports.getStepPayload=Ed,exports.getSteppedPayload=vw,exports.injectPassCardBgTheme=Hn,exports.injectPromoBannerBgTheme=sn,exports.isSelectionCorrect=xw,exports.labelOfCellKey=td,exports.labelsForSave=Z4,exports.levelToPct=B_,exports.markAfterClick=Ac,exports.marksForSave=ys,exports.mergeNoiseSettings=ma,exports.missesByType=s_,exports.monthKeyOf=mr,exports.monthKeyOfDate=ss,exports.nextFocus=n_,exports.nextMisses=o_,exports.noiseElementVolume=Ms,exports.noiseRatioOf=Cr,exports.pageStartIndexes=jc,exports.parseMonthKey=Sa,exports.passCardBgIhabTheme=Mu,exports.passCardBgLeftColorGridTheme=$u,exports.passCardBgTwoCircleTheme=Au,exports.pctToLevel=k_,exports.posLabels=Mc,exports.printWordTable=v4,exports.promoBannerBgDarkTheme=zi,exports.promoBannerBgDeepTheme=Li,exports.promoBannerBgDiagonalTheme=qi,exports.promoBannerBgDotsTheme=Gi,exports.promoBannerBgInstagramTheme=tu,exports.promoBannerBgMainTheme=ji,exports.promoBannerBgNaverTheme=Qi,exports.promoBannerBgOutlineTheme=Yi,exports.promoBannerBgRadialTheme=Hi,exports.promoBannerBgSoftSubTheme=Pi,exports.promoBannerBgSoftTheme=Si,exports.promoBannerBgSubTheme=Mi,exports.promoBannerBgSuccessTheme=Xi,exports.promoBannerBgWarmTheme=Ii,exports.recommendTables=i_,exports.regenerateUnpinned=f_,exports.removeItem=m_,exports.resolveTrainingItems=fw,exports.resolveTrainingPopupMeta=Ad,exports.reviewCells=U4,exports.reviewMeta=Y4,exports.reviewSetPlan=l_,exports.reviewTableName=K4,exports.scoreKey=Wr,exports.scoreSheetHeader=Q4,exports.shouldConfirmDiscard=y4,exports.splitTrainingVariants=mw,exports.summarize=b4,exports.summarizeMisses=r_,exports.tableTrends=t_,exports.toDraft=p_,exports.toTrainingText=gw,exports.togglePin=h_,exports.uncoveredLabels=u_,exports.useAnchoredMenu=tr,exports.useBarChartControl=lc,exports.useCalendarMonth=Xu,exports.useComboboxSuggestions=Ku,exports.useDiscardGuard=Xw,exports.useFitScale=Pc,exports.useNoisePlayer=qr,exports.useSoundCompassExam=b2,exports.useToastLifecycle=Cc,exports.useWordData=r8,exports.useWordTableDisplaySettings=Qc,exports.useWordTablePrint=js,exports.waveBarPx=Gr,exports.waveBarVal=Kr,exports.weakItems=e_,exports.weekValueOf=ls,exports.withStepTimes=Nd,exports.wordTypeLabels=$c;