@ihabdevteam/core 0.35.0 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.cjs.js +175 -175
- package/dist/components.esm.css +4 -4
- package/dist/hooks.cjs.js +1 -1
- package/dist/ihabdevteam-core-tokens.css +1 -1
- package/dist/ihabdevteam-core.cjs.js +181 -181
- package/dist/ihabdevteam-core.css +1 -1
- package/dist/ihabdevteam-core.d.ts +1 -1
- package/dist/packages/core/src/components/ActionCard.css +3 -11
- package/dist/packages/core/src/components/Badge.css +2 -15
- package/dist/packages/core/src/components/BulkBar.css +1 -3
- package/dist/packages/core/src/components/Button.css +2 -6
- package/dist/packages/core/src/components/Calendar.css +9 -21
- package/dist/packages/core/src/components/CodeBox.css +6 -18
- package/dist/packages/core/src/components/DatePicker.css +1 -3
- package/dist/packages/core/src/components/DatePicker.js +84 -3
- package/dist/packages/core/src/components/Dropdown.css +1 -3
- package/dist/packages/core/src/components/FileUpload.css +1 -3
- package/dist/packages/core/src/components/HearingDeviceInfo.css +1 -2
- package/dist/packages/core/src/components/LandingHeader.css +3 -4
- package/dist/packages/core/src/components/Panel.css +3 -8
- package/dist/packages/core/src/components/Popup/DeviceListPopup.css +1 -2
- package/dist/packages/core/src/components/RingChart.css +1 -3
- package/dist/packages/core/src/components/SearchSummary.css +2 -4
- package/dist/packages/core/src/components/Slider.css +2 -5
- package/dist/packages/core/src/components/StatChart.css +2 -7
- package/dist/packages/core/src/components/SummaryStrip.css +0 -5
- package/dist/packages/core/src/components/Table.css +2 -5
- package/dist/packages/core/src/components/Tabs.css +1 -3
- package/dist/packages/core/src/components/TextField.css +2 -6
- package/dist/packages/core/src/components/Toolbar.css +1 -1
- package/dist/packages/core/src/components/Word/PhonemeSelectBlock.css +1 -2
- package/dist/packages/core/src/tokens.css +2 -8
- package/dist/packages/core/src/version.d.ts +1 -1
- package/dist/packages/core/src/version.js +1 -1
- package/dist/utils.cjs.js +1 -1
- package/package.json +1 -4
package/dist/hooks.cjs.js
CHANGED
|
@@ -785,4 +785,4 @@
|
|
|
785
785
|
* See the LICENSE file in the root directory of this source tree.
|
|
786
786
|
*/const C0=[["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"}]],y0=C("thumbs-up",C0),fu={"alert-triangle":cu,"align-start-vertical":Ya,anchor:M1,armchair:T1,"arrow-down":Wa,"arrow-left":Xa,"arrow-right":Ja,"arrow-right-left":ei,"arrow-up-a-z":B1,"audio-lines":ni,baby:ui,ban:ai,"bar-chart-2":v1,bell:si,"book-marked":ci,"book-open":hi,"bow-arrow":pi,braces:yi,bug:gi,calendar:L1,"calendar-check":Ei,"calendar-days":Si,camera:Ai,car:I1,"chart-column":Mi,"chart-line":Ti,"chart-pie":Bi,check:vi,"chevron-down":u0,"chevron-left":Li,"chevron-right":Ii,"chevron-up":a0,circle:s0,"clipboard-list":Pi,coffee:P1,combine:Fi,copy:zi,"credit-card":Ui,database:Yi,diff:Wi,download:Xi,ear:Ji,edit:es,"edit-2":ns,"edit-3":us,ellipsis:du,eraser:is,"external-link":ls,eye:ds,"file-text":fs,"flip-horizontal":Cs,"folder-open":ms,"folder-plus":_s,gamepad:bs,"gamepad-2":F1,gavel:ks,"git-merge":ws,globe:Ns,headphones:xs,heart:Ds,home:Os,inbox:z1,info:Rs,"key-round":js,landmark:$s,layers:Hs,"layout-dashboard":Vs,leaf:Gs,lightbulb:qs,link:Ks,"link-2":Zs,"link-2-off":Qs,list:tl,"list-checks":ol,"list-ordered":rl,"list-tree":U1,loader:il,"log-out":ll,mail:dl,"map-pin":fl,menu:h0,"message-circle":Cl,"message-circle-question-mark":ml,"message-square":_l,"message-square-more":Y1,"message-square-text":bl,minus:W1,"minus-circle":kl,moon:p0,"more-horizontal":du,package:wl,palette:Nl,"party-popper":xl,pause:Dl,pencil:Ol,phone:Rl,play:jl,"play-circle":$l,plus:Hl,printer:Vl,"refresh-cw":Gl,repeat:ql,replace:Kl,rocket:Zl,"rotate-ccw":Ql,"rotate-cw":tc,salad:oc,"scan-search":rc,search:cc,"circle-alert":hu,"alert-circle":hu,"check-circle":sc,scissors:hc,"search-x":pc,send:yc,settings:gc,"share-2":X1,"shield-check":Ec,"shopping-cart":Sc,shuffle:Ac,"skip-back":Mc,"skip-forward":Tc,sparkles:J1,square:Bc,star:vc,store:Lc,"sun-medium":Ic,table:Pc,"table-2":Fc,terminal:zc,"text-cursor-input":Uc,"text-initial":Yc,"thumbs-up":y0,ticket:Wc,triangle:c0,"trash-2":Xc,"trending-up":Jc,"triangle-alert":cu,trophy:e1,type:e0,unlink:n1,upload:u1,user:a1,"user-plus":s1,"user-round":c1,"user-round-check":h1,users:p1,"users-round":y1,volume:n0,"volume-2":g1,wrench:E1,x:S1,zap:A1};function m0(e){return fu[e]??null}const pu=new Set;function g0(e){return ja&&!(e in fu)&&!pu.has(e)&&(pu.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 _0=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 E0(e){const t=e.toLowerCase();if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("data:")||e.includes("/assets/"))return null;const n=(e.split("/").pop()||"").replace(/\.svg$/,"");return n?_0(n):null}const Cu=new Map;function b0(e){const t=typeof e=="string"?E0(e):null,n=t?m0(t)??Cu.get(t)??null:null,[o,u]=l.useState(null);return l.useEffect(()=>{if(!t||n)return;let r=!1;return g0(t).then(i=>{Cu.set(t,i),r||u(i)}),()=>{r=!0}},[t,n]),n??o}/*! @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 yu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function S0(e){if(Array.isArray(e))return e}function k0(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o,u,r,i,s=[],d=!0,p=!1;try{if(r=(n=n.call(e)).next,t!==0)for(;!(d=(o=r.call(n)).done)&&(s.push(o.value),s.length!==t);d=!0);}catch(f){p=!0,u=f}finally{try{if(!d&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(p)throw u}}return s}}function A0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
787
787
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w0(e,t){return S0(e)||k0(e,t)||M0(e,t)||A0()}function M0(e,t){if(e){if(typeof e=="string")return yu(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yu(e,t):void 0}}const mu=Object.entries,gu=Object.setPrototypeOf,N0=Object.isFrozen,T0=Object.getPrototypeOf,x0=Object.getOwnPropertyDescriptor;let Ce=Object.freeze,ge=Object.seal,vt=Object.create,_u=typeof Reflect<"u"&&Reflect,Wn=_u.apply,Kn=_u.construct;Ce||(Ce=function(t){return t}),ge||(ge=function(t){return t}),Wn||(Wn=function(t,n){for(var o=arguments.length,u=new Array(o>2?o-2:0),r=2;r<o;r++)u[r-2]=arguments[r];return t.apply(n,u)}),Kn||(Kn=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),u=1;u<n;u++)o[u-1]=arguments[u];return new t(...o)});const St=fe(Array.prototype.forEach),B0=fe(Array.prototype.lastIndexOf),Eu=fe(Array.prototype.pop),qt=fe(Array.prototype.push),D0=fe(Array.prototype.splice),Ot=Array.isArray,Wt=fe(String.prototype.toLowerCase),Xn=fe(String.prototype.toString),bu=fe(String.prototype.match),Kt=fe(String.prototype.replace),Su=fe(String.prototype.indexOf),v0=fe(String.prototype.trim),O0=fe(Number.prototype.toString),L0=fe(Boolean.prototype.toString),ku=typeof BigInt>"u"?null:fe(BigInt.prototype.toString),Au=typeof Symbol>"u"?null:fe(Symbol.prototype.toString),De=fe(Object.prototype.hasOwnProperty),Xt=fe(Object.prototype.toString),we=fe(RegExp.prototype.test),kt=R0(TypeError);function fe(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),u=1;u<n;u++)o[u-1]=arguments[u];return Wn(e,t,o)}}function R0(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Kn(e,n)}}function J(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Wt;if(gu&&gu(e,null),!Ot(t))return e;let o=t.length;for(;o--;){let u=t[o];if(typeof u=="string"){const r=n(u);r!==u&&(N0(t)||(t[o]=r),u=r)}e[u]=!0}return e}function I0(e){for(let t=0;t<e.length;t++)De(e,t)||(e[t]=null);return e}function Re(e){const t=vt(null);for(const o of mu(e)){var n=w0(o,2);const u=n[0],r=n[1];De(e,u)&&(Ot(r)?t[u]=I0(r):r&&typeof r=="object"&&r.constructor===Object?t[u]=Re(r):t[u]=r)}return t}function j0(e){switch(typeof e){case"string":return e;case"number":return O0(e);case"boolean":return L0(e);case"bigint":return ku?ku(e):"0";case"symbol":return Au?Au(e):"Symbol()";case"undefined":return Xt(e);case"function":case"object":{if(e===null)return Xt(e);const t=e,n=qe(t,"toString");if(typeof n=="function"){const o=n(t);return typeof o=="string"?o:Xt(o)}return Xt(e)}default:return Xt(e)}}function qe(e,t){for(;e!==null;){const o=x0(e,t);if(o){if(o.get)return fe(o.get);if(typeof o.value=="function")return fe(o.value)}e=T0(e)}function n(){return null}return n}function P0(e){try{return we(e,""),!0}catch{return!1}}const wu=Ce(["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"]),Zn=Ce(["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"]),Jn=Ce(["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"]),$0=Ce(["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"]),Qn=Ce(["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"]),F0=Ce(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Mu=Ce(["#text"]),Nu=Ce(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),eo=Ce(["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"]),Tu=Ce(["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"]),Sn=Ce(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H0=ge(/{{[\w\W]*|^[\w\W]*}}/g),z0=ge(/<%[\w\W]*|^[\w\W]*%>/g),V0=ge(/\${[\w\W]*/g),U0=ge(/^data-[\-\w.\u00B7-\uFFFF]+$/),G0=ge(/^aria-[\-\w]+$/),xu=ge(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Y0=ge(/^(?:\w+script|data):/i),q0=ge(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W0=ge(/^html$/i),K0=ge(/^[a-z][.\w]*(-[.\w]+)+$/i),Bu=ge(/<[/\w!]/g),Du=ge(/<[/\w]/g),X0=ge(/<\/no(script|embed|frames)/i),Z0=ge(/\/>/i),Ie={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},vu=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],J0=Ce(J({},vu)),Q0=(function(){const e={};return St(vu,t=>{e[t]=ge(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),Ce(e)})(),ed=function(){return typeof window>"u"?null:window},td=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null;const u="data-tt-policy-suffix";n&&n.hasAttribute(u)&&(o=n.getAttribute(u));const r="dompurify"+(o?"#"+o:"");try{return t.createPolicy(r,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},Ou=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ht=function(t,n,o,u){return De(t,n)&&Ot(t[n])?J(u.base?Re(u.base):{},t[n],u.transform):o},to=function(t,n,o){const u=De(t,n)?t[n]:void 0;return u&&typeof u=="object"?Re(u):o()};function Lu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ed();const t=N=>Lu(N);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==Ie.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const o=n,u=o.currentScript;e.DocumentFragment;const r=e.HTMLTemplateElement,i=e.Node,s=e.Element,d=e.NodeFilter,p=e.NamedNodeMap;p===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const f=e.DOMParser,y=e.trustedTypes,c=s.prototype,m=qe(c,"cloneNode"),S=qe(c,"remove"),w=qe(c,"nextSibling"),_=qe(c,"childNodes"),g=qe(c,"parentNode"),k=qe(c,"shadowRoot"),A=qe(c,"attributes"),T=i&&i.prototype?qe(i.prototype,"nodeType"):null,v=i&&i.prototype?qe(i.prototype,"nodeName"):null,D=i&&i.prototype?qe(i.prototype,"ownerDocument"):null,I=function(a){return T?T(a):a.nodeType},$=function(a){return v?v(a):a.nodeName};if(typeof r=="function"){const N=n.createElement("template");N.content&&N.content.ownerDocument&&(n=N.content.ownerDocument)}let G,P="",Q,Y=!1,W=0;const F=function(){if(W>0)throw kt('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.')},B=function(a){F(),W++;try{return G.createHTML(a)}finally{W--}},O=function(a){F(),W++;try{return G.createScriptURL(a)}finally{W--}},ye=function(){return Y||(Q=td(y,u),Y=!0),Q},Z=n,ee=Z.implementation,M=Z.createNodeIterator,j=Z.createDocumentFragment,ae=Z.getElementsByTagName,ne=o.importNode;let q=Ou();t.isSupported=typeof mu=="function"&&typeof g=="function"&&ee&&ee.createHTMLDocument!==void 0;const Me=H0,X=z0,he=V0,H=U0,He=G0,ze=Y0,je=q0,tt=K0;let Ve=xu,te=null;const nt=J({},[...wu,...Zn,...Jn,...Qn,...Mu]);let oe=null;const pt=J({},[...Nu,...eo,...Tu,...Sn]);let pe=Object.seal(vt(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}})),E=null,z=null;const L=Object.seal(vt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let K=!0,ie=!0,Pe=!1,ve=!0,be=!1,Ne=!0,Se=!1,Ct=!1,We=null,ot=null,Ue=!1,$e=!1,lt=!1,yt=!1,Rt=!0,me=!1;const At="user-content-";let wt=!0,ut=!1,ct={},Ke=null;const ue=J({},["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 Xe=null;const It=J({},["audio","video","img","source","image","track"]);let Mt=null;const po=J({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),rn="http://www.w3.org/1998/Math/MathML",an="http://www.w3.org/2000/svg",Ze="http://www.w3.org/1999/xhtml";let Nt=Ze,Bn=!1,Dn=null;const nr=J({},[rn,an,Ze],Xn),Co=Ce(["mi","mo","mn","ms","mtext"]);let vn=J({},Co);const yo=Ce(["annotation-xml"]);let On=J({},yo);const or=J({},["title","style","font","a","script"]);let jt=null;const ur=["application/xhtml+xml","text/html"],rr="text/html";let de=null,Tt=null;const ar=n.createElement("form"),mo=function(a){return a instanceof RegExp||a instanceof Function},Ln=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Tt&&Tt===a)return;(!a||typeof a!="object")&&(a={}),a=Re(a),jt=ur.indexOf(a.PARSER_MEDIA_TYPE)===-1?rr:a.PARSER_MEDIA_TYPE,de=jt==="application/xhtml+xml"?Xn:Wt,te=ht(a,"ALLOWED_TAGS",nt,{transform:de}),oe=ht(a,"ALLOWED_ATTR",pt,{transform:de}),Dn=ht(a,"ALLOWED_NAMESPACES",nr,{transform:Xn}),Mt=ht(a,"ADD_URI_SAFE_ATTR",po,{transform:de,base:po}),Xe=ht(a,"ADD_DATA_URI_TAGS",It,{transform:de,base:It}),Ke=ht(a,"FORBID_CONTENTS",ue,{transform:de}),E=ht(a,"FORBID_TAGS",Re({}),{transform:de}),z=ht(a,"FORBID_ATTR",Re({}),{transform:de}),ct=De(a,"USE_PROFILES")?a.USE_PROFILES&&typeof a.USE_PROFILES=="object"?Re(a.USE_PROFILES):a.USE_PROFILES:!1,K=a.ALLOW_ARIA_ATTR!==!1,ie=a.ALLOW_DATA_ATTR!==!1,Pe=a.ALLOW_UNKNOWN_PROTOCOLS||!1,ve=a.ALLOW_SELF_CLOSE_IN_ATTR!==!1,be=a.SAFE_FOR_TEMPLATES||!1,Ne=a.SAFE_FOR_XML!==!1,Se=a.WHOLE_DOCUMENT||!1,$e=a.RETURN_DOM||!1,lt=a.RETURN_DOM_FRAGMENT||!1,yt=a.RETURN_TRUSTED_TYPE||!1,Ue=a.FORCE_BODY||!1,Rt=a.SANITIZE_DOM!==!1,me=a.SANITIZE_NAMED_PROPS||!1,wt=a.KEEP_CONTENT!==!1,ut=a.IN_PLACE||!1,Ve=P0(a.ALLOWED_URI_REGEXP)?a.ALLOWED_URI_REGEXP:xu,Nt=typeof a.NAMESPACE=="string"?a.NAMESPACE:Ze,vn=to(a,"MATHML_TEXT_INTEGRATION_POINTS",()=>J({},Co)),On=to(a,"HTML_INTEGRATION_POINTS",()=>J({},yo));const h=to(a,"CUSTOM_ELEMENT_HANDLING",()=>vt(null));if(pe=vt(null),De(h,"tagNameCheck")&&mo(h.tagNameCheck)&&(pe.tagNameCheck=h.tagNameCheck),De(h,"attributeNameCheck")&&mo(h.attributeNameCheck)&&(pe.attributeNameCheck=h.attributeNameCheck),De(h,"allowCustomizedBuiltInElements")&&typeof h.allowCustomizedBuiltInElements=="boolean"&&(pe.allowCustomizedBuiltInElements=h.allowCustomizedBuiltInElements),ge(pe),be&&(ie=!1),lt&&($e=!0),ct&&(te=J({},Mu),oe=vt(null),ct.html===!0&&(J(te,wu),J(oe,Nu)),ct.svg===!0&&(J(te,Zn),J(oe,eo),J(oe,Sn)),ct.svgFilters===!0&&(J(te,Jn),J(oe,eo),J(oe,Sn)),ct.mathMl===!0&&(J(te,Qn),J(oe,Tu),J(oe,Sn))),L.tagCheck=null,L.attributeCheck=null,De(a,"ADD_TAGS")&&(typeof a.ADD_TAGS=="function"?L.tagCheck=a.ADD_TAGS:Ot(a.ADD_TAGS)&&(te===nt&&(te=Re(te)),J(te,a.ADD_TAGS,de))),De(a,"ADD_ATTR")&&(typeof a.ADD_ATTR=="function"?L.attributeCheck=a.ADD_ATTR:Ot(a.ADD_ATTR)&&(oe===pt&&(oe=Re(oe)),J(oe,a.ADD_ATTR,de))),De(a,"ADD_FORBID_CONTENTS")&&Ot(a.ADD_FORBID_CONTENTS)&&(Ke===ue&&(Ke=Re(Ke)),J(Ke,a.ADD_FORBID_CONTENTS,de)),wt&&(te["#text"]=!0),Se&&J(te,["html","head","body"]),te.table&&(J(te,["tbody"]),delete E.tbody),a.TRUSTED_TYPES_POLICY){if(typeof a.TRUSTED_TYPES_POLICY.createHTML!="function")throw kt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof a.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw kt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const b=G;G=a.TRUSTED_TYPES_POLICY;try{P=B("")}catch(x){throw G=b,x}}else a.TRUSTED_TYPES_POLICY===null?(G=void 0,P=""):(G===void 0&&(G=ye()),G&&typeof P=="string"&&(P=B("")));Ce&&Ce(a),Tt=a},go=J({},[...Zn,...Jn,...$0]),_o=J({},[...Qn,...F0]),ir=function(a,h,b){return h.namespaceURI===Ze?a==="svg":h.namespaceURI===rn?a==="svg"&&(b==="annotation-xml"||vn[b]):!!go[a]},sr=function(a,h,b){return h.namespaceURI===Ze?a==="math":h.namespaceURI===an?a==="math"&&On[b]:!!_o[a]},lr=function(a,h,b){return h.namespaceURI===an&&!On[b]||h.namespaceURI===rn&&!vn[b]?!1:!_o[a]&&(or[a]||!go[a])},cr=function(a){let h=g(a);(!h||!h.tagName)&&(h={namespaceURI:Nt,tagName:"template"});const b=Wt(a.tagName),x=Wt(h.tagName);return Dn[a.namespaceURI]?a.namespaceURI===an?ir(b,h,x):a.namespaceURI===rn?sr(b,h,x):a.namespaceURI===Ze?lr(b,h,x):!!(jt==="application/xhtml+xml"&&Dn[a.namespaceURI]):!1},dt=function(a){qt(t.removed,{element:a});try{g(a).removeChild(a)}catch{if(S(a),!g(a))throw kt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Eo=function(a,h,b){try{a.removeAttributeNode(h)}catch{try{a.removeAttribute(b)}catch{}}},sn=function(a){ln(a);const h=_(a);if(h){const x=[];St(h,R=>{qt(x,R)}),St(x,R=>{try{S(R)}catch{}})}const b=A(a);if(b)for(let x=b.length-1;x>=0;--x){const R=b[x],U=R&&R.name;typeof U=="string"&&Eo(a,R,U)}},mt=function(a,h,b){if(!b)try{b=h.getAttributeNode(a)}catch{b=null}qt(t.removed,{attribute:b||null,from:h});try{b?h.removeAttributeNode(b):h.removeAttribute(a)}catch{try{h.removeAttribute(a)}catch{}}if(a==="is")if($e||lt)try{dt(h)}catch{}else try{h.setAttribute(a,"")}catch{}},dr=function(a){const h=A(a);if(h)for(let b=h.length-1;b>=0;--b){const x=h[b],R=x&&x.name;typeof R!="string"||oe[de(R)]||Eo(a,x,R)}},ln=function(a){const h=[a];for(;h.length>0;){const b=h.pop();I(b)===Ie.element&&dr(b);const R=_(b);if(R)for(let U=R.length-1;U>=0;--U)h.push(R[U])}},bo=function(a,h){return Ne?a==="patchsrc"?!0:a==="for"&&h!=="label"&&h!=="output":!1},hr=function(a){if(!Ne)return;const h=[a];for(;h.length>0;){const b=h.pop(),x=I(b);if(x===Ie.processingInstruction||x===Ie.comment&&we(Du,b.data)){try{S(b)}catch{}continue}if(x===Ie.element){const U=b,se=de($(b));try{U.hasAttribute&&U.hasAttribute("patchsrc")&&U.removeAttribute("patchsrc"),U.hasAttribute&&U.hasAttribute("for")&&bo("for",se)&&U.removeAttribute("for")}catch{}}const R=_(b);if(R)for(let U=R.length-1;U>=0;--U)h.push(R[U])}},So=function(a){let h=null,b=null;if(Ue)a="<remove></remove>"+a;else{const U=bu(a,/^[\r\n\t ]+/);b=U&&U[0]}jt==="application/xhtml+xml"&&Nt===Ze&&(a='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+a+"</body></html>");const x=G?B(a):a;if(Nt===Ze)try{h=new f().parseFromString(x,jt)}catch{}if(!h||!h.documentElement){h=ee.createDocument(Nt,"template",null);try{h.documentElement.innerHTML=Bn?P:x}catch{}}const R=h.body||h.documentElement;return a&&b&&R.insertBefore(n.createTextNode(b),R.childNodes[0]||null),Nt===Ze?ae.call(h,Se?"html":"body")[0]:Se?h.documentElement:R},ko=function(a){const h=D?D(a):a.ownerDocument;return M.call(h||a,a,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},cn=function(a){return a=Kt(a,Me," "),a=Kt(a,X," "),a=Kt(a,he," "),a},Rn=function(a){var h;a.normalize();const b=D?D(a):a.ownerDocument,x=M.call(b||a,a,d.SHOW_TEXT|d.SHOW_COMMENT|d.SHOW_CDATA_SECTION|d.SHOW_PROCESSING_INSTRUCTION,null);let R=x.nextNode();for(;R;)R.data=cn(R.data),R=x.nextNode();const U=(h=a.querySelectorAll)===null||h===void 0?void 0:h.call(a,"template");U&&St(U,se=>{xt(se.content)&&Rn(se.content)})},dn=function(a){const h=v?v(a):null;return typeof h!="string"||de(h)!=="form"?!1:typeof a.nodeName!="string"||typeof a.textContent!="string"||typeof a.removeChild!="function"||a.attributes!==A(a)||typeof a.removeAttribute!="function"||typeof a.setAttribute!="function"||typeof a.namespaceURI!="string"||typeof a.insertBefore!="function"||typeof a.hasChildNodes!="function"||a.nodeType!==T(a)||a.childNodes!==_(a)},xt=function(a){if(!T||typeof a!="object"||a===null)return!1;try{return T(a)===Ie.documentFragment}catch{return!1}},Pt=function(a){if(!T||typeof a!="object"||a===null)return!1;try{return typeof T(a)=="number"}catch{return!1}};function Je(N,a,h){N.length!==0&&St(N,b=>{b.call(t,a,h,Tt)})}const fr=function(a,h){return!!(Ne&&a.hasChildNodes()&&!Pt(a.firstElementChild)&&we(Bu,a.textContent)&&we(Bu,a.innerHTML)||Ne&&a.namespaceURI===Ze&&J0[h]&&(Pt(a.firstElementChild)||typeof a.textContent=="string"&&we(Q0[h],a.textContent))||a.nodeType===Ie.processingInstruction||Ne&&a.nodeType===Ie.comment&&we(Du,a.data))},hn=function(a,h){if(a instanceof RegExp)return we(a,h);if(a instanceof Function){for(var b=arguments.length,x=new Array(b>2?b-2:0),R=2;R<b;R++)x[R-2]=arguments[R];return!!a(h,...x)}return!1},pr=function(a,h,b){if(!E[h]&&To(h)&&hn(pe.tagNameCheck,h))return!1;if(wt&&!Ke[h]){const x=g(a),R=_(a);if(R&&x){const U=R.length;for(let se=U-1;se>=0;--se){const ce=a===b?m(R[se],!0):R[se];x.insertBefore(ce,w(a))}}}return dt(a),!0},Ao=function(a,h,b,x){return a.length===0?h:h===b||h===x?Re(h):h},wo=function(a,h){return a===h||g(a)!==null?!1:(ut&&ln(a),!0)},Mo=function(a,h){if(Je(q.beforeSanitizeElements,a,null),wo(a,h))return!0;if(dn(a))return dt(a),!0;const b=de($(a));if(te=Ao(q.uponSanitizeElement,te,nt,We),Je(q.uponSanitizeElement,a,{tagName:b,allowedTags:te}),wo(a,h))return!0;if(fr(a,b))return dt(a),!0;if(E[b]||!(L.tagCheck instanceof Function&&L.tagCheck(b))&&!te[b]){const R=pr(a,b,h);return R===!1&&Je(q.afterSanitizeElements,a,null),R}if(I(a)===Ie.element&&!cr(a)||(b==="noscript"||b==="noembed"||b==="noframes")&&we(X0,a.innerHTML))return dt(a),!0;if(be&&a.nodeType===Ie.text){const R=cn(a.textContent);a.textContent!==R&&(qt(t.removed,{element:a.cloneNode()}),a.textContent=R)}return Je(q.afterSanitizeElements,a,null),!1},No=function(a,h,b){if(z[h]||bo(h,a)||Rt&&(h==="id"||h==="name")&&(b in n||b in ar))return!1;const x=oe[h]||L.attributeCheck instanceof Function&&L.attributeCheck(h,a);return ie&&we(H,h)||K&&we(He,h)?!0:x?Mt[h]||we(Ve,Kt(b,je,""))||(h==="src"||h==="xlink:href"||h==="href")&&a!=="script"&&Su(b,"data:")===0&&Xe[a]||Pe&&!we(ze,Kt(b,je,""))?!0:!b:To(a)&&hn(pe.tagNameCheck,a)&&hn(pe.attributeNameCheck,h,a)||h==="is"&&pe.allowCustomizedBuiltInElements&&hn(pe.tagNameCheck,b)},Cr=J({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),To=function(a){return!Cr[Wt(a)]&&we(tt,a)},yr=function(a,h,b,x){if(G&&typeof y=="object"&&typeof y.getAttributeType=="function"&&!b)switch(y.getAttributeType(a,h)){case"TrustedHTML":return B(x);case"TrustedScriptURL":return O(x)}return x},mr=function(a,h,b,x){try{b?a.setAttributeNS(b,h,x):a.setAttribute(h,x),dn(a)?dt(a):Eu(t.removed)}catch{mt(h,a)}},xo=function(a){Je(q.beforeSanitizeAttributes,a,null);const h=a.attributes;if(!h||dn(a))return;oe=Ao(q.uponSanitizeAttribute,oe,pt,ot);const b={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:oe,forceKeepAttr:void 0};let x=h.length;const R=de(a.nodeName);for(;x--;){const U=h[x],se=U.name,ce=U.namespaceURI,xe=U.value,Be=de(se),jn=xe;let Te=se==="value"?jn:v0(jn);if(b.attrName=Be,b.attrValue=Te,b.keepAttr=!0,b.forceKeepAttr=void 0,Je(q.uponSanitizeAttribute,a,b),Te=b.attrValue,me&&(Be==="id"||Be==="name")&&Su(Te,At)!==0&&(mt(se,a,U),Te=At+Te),Ne&&we(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Te)){mt(se,a,U);continue}if(Be==="attributename"&&bu(Te,"href")){mt(se,a,U);continue}if(!b.forceKeepAttr){if(!b.keepAttr){mt(se,a,U);continue}if(!ve&&we(Z0,Te)){mt(se,a,U);continue}if(be&&(Te=cn(Te)),!No(R,Be,Te)){mt(se,a,U);continue}Te=yr(R,Be,ce,Te),Te!==jn&&mr(a,se,ce,Te)}}Je(q.afterSanitizeAttributes,a,null)},fn=function(a){let h=null;const b=ko(a);for(Je(q.beforeSanitizeShadowDOM,a,null);h=b.nextNode();)if(Je(q.uponSanitizeShadowNode,h,null),Mo(h,a),xo(h),xt(h.content)&&fn(h.content),I(h)===Ie.element){const x=k(h);xt(x)&&(In(x),fn(x))}Je(q.afterSanitizeShadowDOM,a,null)},In=function(a){const h=[{node:a,shadow:null}];for(;h.length>0;){const b=h.pop();if(b.shadow){fn(b.shadow);continue}const x=b.node,U=I(x)===Ie.element,se=_(x);if(se)for(let ce=se.length-1;ce>=0;--ce)h.push({node:se[ce],shadow:null});if(U){const ce=v?v(x):null;if(typeof ce=="string"&&de(ce)==="template"){const xe=x.content;xt(xe)&&h.push({node:xe,shadow:null})}}if(U){const ce=k(x);xt(ce)&&h.push({node:null,shadow:ce},{node:ce,shadow:null})}}};return t.sanitize=function(N){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=null,b=null,x=null,R=null;if(Bn=!N,Bn&&(N="<!-->"),typeof N!="string"&&!Pt(N)&&(N=j0(N),typeof N!="string"))throw kt("dirty is not a string, aborting");if(!t.isSupported)return N;Ct?(te=We,oe=ot):Ln(a),(q.uponSanitizeElement.length>0||q.uponSanitizeAttribute.length>0)&&(te=Re(te)),q.uponSanitizeAttribute.length>0&&(oe=Re(oe)),t.removed=[];const U=ut&&typeof N!="string"&&Pt(N);if(U){hr(N);const xe=$(N);if(typeof xe=="string"){const Be=de(xe);if(!te[Be]||E[Be])throw sn(N),kt("root node is forbidden and cannot be sanitized in-place")}if(dn(N))throw sn(N),kt("root node is clobbered and cannot be sanitized in-place");try{In(N)}catch(Be){throw sn(N),Be}}else if(Pt(N))h=So("<!---->"),b=h.ownerDocument.importNode(N,!0),b.nodeType===Ie.element&&b.nodeName==="BODY"||b.nodeName==="HTML"?h=b:h.appendChild(b),In(b);else{if(!$e&&!be&&!Se&&N.indexOf("<")===-1)return G&&yt?B(N):N;if(h=So(N),!h)return $e?null:yt?P:""}h&&Ue&&dt(h.firstChild);const se=U?N:h;try{const xe=ko(se);for(;x=xe.nextNode();)Mo(x,se),xo(x),xt(x.content)&&fn(x.content)}catch(xe){throw U&&(sn(N),St(t.removed,Be=>{Be.element&&ln(Be.element)})),xe}if(U)return St(t.removed,xe=>{xe.element&&ln(xe.element)}),be&&Rn(N),N;if($e){if(be&&Rn(h),lt)for(R=j.call(h.ownerDocument);h.firstChild;)R.appendChild(h.firstChild);else R=h;return(oe.shadowroot||oe.shadowrootmode)&&(R=ne.call(o,R,!0)),R}let ce=Se?h.outerHTML:h.innerHTML;return Se&&te["!doctype"]&&h.ownerDocument&&h.ownerDocument.doctype&&h.ownerDocument.doctype.name&&we(W0,h.ownerDocument.doctype.name)&&(ce="<!DOCTYPE "+h.ownerDocument.doctype.name+`>
|
|
788
|
-
`+ce),be&&(ce=cn(ce)),G&&yt?B(ce):ce},t.setConfig=function(){let N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ln(N),Ct=!0,We=te,ot=oe},t.clearConfig=function(){Tt=null,Ct=!1,We=null,ot=null,G=Q,P=""},t.isValidAttribute=function(N,a,h){Tt||Ln({});const b=de(N),x=de(a);return No(b,x,h)},t.addHook=function(N,a){typeof a=="function"&&De(q,N)&&qt(q[N],a)},t.removeHook=function(N,a){if(De(q,N)){if(a!==void 0){const h=B0(q[N],a);return h===-1?void 0:D0(q[N],h,1)[0]}return Eu(q[N])}},t.removeHooks=function(N){De(q,N)&&(q[N]=[])},t.removeAllHooks=function(){q=Ou()},t}var nd=Lu();const od=/^(?:[a-z]+:)?\/\//i;let ud="";function rd(){return ud}function no(e){const t=String(e||"").trim();if(!t)return"";if(od.test(t)||t.startsWith("data:")||t.startsWith("blob:"))return t;const n=t.startsWith("/")?t:`/${t}`,o=rd();return o?`${o}${n}`:n}function ad(){return kn(new Date)}function kn(e){if(e==null||e==="")return"";const t=e instanceof Date?e:new Date(e);return isNaN(t.getTime())?"":new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t)}const Zt=[],Jt=[],Qt=[],en=[],An={LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]},wn={LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]},id={LISTEN_IN_NOISE:3,SHORT_STORY:2,LONG_STORY:1,ORDERING_SENTENCE:2};let oo=null,Ru=null,ft=null;function sd({counts:e,forceRefresh:t}={}){const n=Object.assign({},id,e||{}),o=ad(),u=kn(new Date(`${o}T00:00:00+09:00`).getTime()-864e5),r=JSON.stringify(n);if(!t&&Ru===o&&oo===r&&ft)return Object.assign(An,ft.today),Object.assign(wn,ft.yesterday?.selection||{LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]}),{today:An,yesterday:wn};const i={LISTEN_IN_NOISE:at(Zt,Math.max(0,Number(n.LISTEN_IN_NOISE)||0)),SHORT_STORY:at(Jt,Math.max(0,Number(n.SHORT_STORY)||0)),LONG_STORY:at(Qt,Math.max(0,Number(n.LONG_STORY)||0)),ORDERING_SENTENCE:at(en,Math.max(0,Number(n.ORDERING_SENTENCE)||0))};let s=null;return ft&&oo===r&&ft.yesterday&&ft.yesterday.date===u&&(s=ft.yesterday.selection),s||(s={LISTEN_IN_NOISE:at(Zt,Math.max(0,Number(n.LISTEN_IN_NOISE)||0)),SHORT_STORY:at(Jt,Math.max(0,Number(n.SHORT_STORY)||0)),LONG_STORY:at(Qt,Math.max(0,Number(n.LONG_STORY)||0)),ORDERING_SENTENCE:at(en,Math.max(0,Number(n.ORDERING_SENTENCE)||0))}),Object.assign(An,i),Object.assign(wn,s),Ru=o,oo=r,ft={today:i,yesterday:{date:u,countsKey:r,selection:s}},{today:An,yesterday:wn}}let Iu=!1,tn=null;async function ld(){try{const e={url:typeof document>"u"?require("url").pathToFileURL(__filename).href:Pn&&Pn.tagName.toUpperCase()==="SCRIPT"&&Pn.src||new URL("hooks.cjs.js",document.baseURI).href}&&void 0||"/",t=await fetch(`${e}data/allTrainingData.json`);return t.ok?await t.json():null}catch{return null}}async function cd(){if(!Iu)return tn||(tn=(async()=>{const e=await ld();if(!e){tn=null;try{window.dispatchEvent(new Event("speechear.data.error"))}catch{}return}try{for(const t of Object.keys(e||{})){const n=e[t]||[];for(const o of n){const u=o,r=String(u.training_type||t),i=String(u.category_main_code||u.category_main||u.category_0||""),s=String(u.category_sub_code||u.category_sub||u.category_1||""),d=Object.assign({},u,{training_type:r,category_0:i,category_1:s});r==="LISTEN_IN_NOISE"?Zt.push(d):r==="SHORT_STORY"?Jt.push(d):r==="LONG_STORY"?Qt.push(d):r==="ORDERING_SENTENCE"&&en.push(d)}}}catch{tn=null;try{window.dispatchEvent(new Event("speechear.data.error"))}catch{}return}try{window.dispatchEvent(new Event("speechear.data.updated"))}catch{}try{sd()}catch{}Iu=!0})(),tn)}async function dd(e=3e3){const t=cd();return Promise.race([t,new Promise(n=>setTimeout(n,e))])}const hd=[{key:"LISTEN_IN_NOISE",label:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",icon:"party-popper",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."}],fd={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function pd(e){return hd.map(t=>{const n=fd[t.key];return n?{...t,label:e(`trainingType.${n}.title`),desc:e(`trainingType.${n}.desc`)}:t})}const Cd="0.35.0";function yd(e){return typeof window>"u"?"":nd.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use"],FORBID_ATTR:["xlink:href","href"]})}function md(e){const[t,n]=l.useState(null),[o,u]=l.useState(null),[r,i]=l.useState(null),[s,d]=l.useState(null);return l.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){n(null),u(null),i(null);return}const p=e.split("/").pop();let f=e;p&&(e.startsWith("/")?f=no(e):/^(Logo|Symbol)/i.test(p)?f=no(`logo/${p}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),f=e)),n(f)},[e]),l.useEffect(()=>{if(!t)return;let p=!1;async function f(){try{let y=await fetch(t);y.ok||(y=await fetch(t));const c=y.headers.get("content-type")||"";if(p)return;if(c.includes("svg")){u("mask");return}if(c.startsWith("image/")){u("img");return}const m=await fetch(t);if(!m.ok)throw new Error("not ok");const S=await m.text();if(p)return;if(/^\s*<svg[\s>]/i.test(S)){const w=yd(S);if(!w){u("none");return}i(w),u("inline");return}u("none")}catch{p||u("none")}}return f(),()=>{p=!0}},[t]),l.useEffect(()=>{let p=!1,f=null;return o==="mask"&&t&&fetch(t).then(y=>{if(!y.ok)throw new Error("fetch failed");return y.blob()}).then(y=>{p||(f=URL.createObjectURL(y),d(f))}).catch(()=>{p||u("img")}),()=>{p=!0,f&&URL.revokeObjectURL(f),d(null)}},[o,t]),{iconToUse:t,mode:o,svgText:r,blobUrl:s}}function gd(e){const{icon:t,label:n,className:o,imgClassName:u,maskClassName:r,svgClassName:i,wrapperStyle:s,size:d}=e||{},p=o??"iconRenderer-icon",f=u??"iconRenderer-icon-image",y=r??"iconRenderer-icon-mask",c=i??"iconRenderer-icon-svg",m=typeof t=="string"?t:null,S=b0(m),{iconToUse:w,mode:_,svgText:g,blobUrl:k}=md(m),A=(I,$={})=>V.jsx("span",{className:p,style:s,...$,children:I}),T=(I,$={})=>V.jsx("img",{src:I,alt:typeof n=="string"?n:n?String(n):"",className:f,...$});if(!t)return null;if(typeof t!="string")return A(t);if(t==="none")return A(V.jsx("span",{className:c,dangerouslySetInnerHTML:{__html:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true"></svg>'}}),{"aria-hidden":"true"});if(S)try{return A(l.createElement(S,{className:c,size:typeof d=="number"?d:20}),{"aria-hidden":"true"})}catch{}if(w&&w.endsWith(".svg")){if(_==="mask"){const I={"--icon-url":k?`url(${k})`:`url(${w})`};return A(V.jsx("span",{className:y,style:I}),{"aria-hidden":"true"})}return _==="img"?A(T(w,{onError:I=>{I.currentTarget.onerror=null,I.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):_==="inline"?A(V.jsx("span",{className:c,dangerouslySetInnerHTML:g?{__html:g}:void 0}),{"aria-hidden":"true"}):A(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return T(no(t),{style:s,onError:I=>{I.currentTarget.onerror=null,I.currentTarget.style.display="none"}});const v=typeof d=="number"?d:20,D=`<svg width="${v}" height="${v}" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="3" y="3" width="18" height="18" rx="2" ry="2" style="fill:none;stroke:currentColor;stroke-width:2"/></svg>`;return A(V.jsx("span",{className:c,dangerouslySetInnerHTML:{__html:D}}),{"aria-hidden":"true"})}function ju(e){const{anchorRect:t,anchorEl:n,offset:o=20,edgeMargin:u=20,onClose:r,closeOnOutsideClick:i=!0,className:s="",role:d="dialog",ariaLabel:p="",children:f,backdrop:y=!1,isMobilePopup:c=!1,useBorder:m=!0,header:S}=e||{},w=l.useRef(null),[_,g]=l.useState({position:"fixed",left:0,top:-9999}),[k,A]=l.useState(!1),[T,v]=l.useState("bottom"),[D,I]=l.useState(!1),[$,G]=l.useState(!1),P=!t&&!n,Q=l.useCallback((B=!1)=>{if($&&c)return;const O=n?n.getBoundingClientRect():t;if(!O||!w.current)return;const ye=w.current,{offsetWidth:Z,offsetHeight:ee}=ye,M=window.innerWidth,j=window.innerHeight,ae=M-O.right,ne=O.left,q=O.top,Me=j-O.bottom;let X=0,he=0,H="top";if(q>=ee+o)H="top",he=O.top-o-ee,X=O.left+O.width/2-Z/2;else if(Me>=ee+o)H="bottom",he=O.bottom+o,X=O.left+O.width/2-Z/2;else if(ae>=Z+o)H="right",X=O.right+o,he=O.top+O.height/2-ee/2;else if(ne>=Z+o)H="left",X=O.left-o-Z,he=O.top+O.height/2-ee/2;else{const tt=Math.max(q,Me,ae,ne);tt===q?(H="top",he=O.top-o-ee,X=O.left+O.width/2-Z/2):tt===Me?(H="bottom",he=O.bottom+o,X=O.left+O.width/2-Z/2):tt===ae?(H="right",X=O.right+o,he=O.top+O.height/2-ee/2):(H="left",X=O.left-o-Z,he=O.top+O.height/2-ee/2)}const He=Number(u)||8;X=Math.min(Math.max(X,He),M-Z-He),he=Math.min(Math.max(he,He),j-ee-He);const ze=Math.round(X),je=Math.round(he);B&&w.current?(w.current.style.left=`${ze}px`,w.current.style.top=`${je}px`,w.current.dataset.placement=H):(v(H||T),g({position:"fixed",left:ze,top:je}),I(!0))},[$,c,n,t,o,u,T]);l.useLayoutEffect(()=>{if(P)return;if($&&c){g({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),I(!0);return}Q();const B=requestAnimationFrame(()=>Q());return()=>cancelAnimationFrame(B)},[t,n,o,f,u,P,$,c,Q]),l.useEffect(()=>{if(P||$&&c||!w.current||typeof ResizeObserver>"u")return;const B=new ResizeObserver(()=>{t&&Q()});return B.observe(w.current),()=>B.disconnect()},[t,f,u,P,$,c,Q]),l.useEffect(()=>{if(P||$&&c)return;const B=()=>Q(!0);return window.addEventListener("resize",B),document.addEventListener("scroll",B,{passive:!0,capture:!0}),()=>{window.removeEventListener("resize",B),document.removeEventListener("scroll",B,{capture:!0})}},[t,o,f,u,P,$,c,Q]),l.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const B=window.matchMedia("(max-width: 768px)"),O=()=>G(!!B.matches);O();try{B.addEventListener?B.addEventListener("change",O):B.addListener(O)}catch{try{B.addListener(O)}catch{}}return()=>{try{B.removeEventListener?B.removeEventListener("change",O):B.removeListener(O)}catch{}}},[]);const Y=l.useRef(!1),W=l.useCallback((B=!1)=>{if(!(k||Y.current)){if(Y.current=!0,B){A(!0);try{r&&r()}catch{}return}A(!0),setTimeout(()=>{r&&r()},200)}},[k,r,A]);l.useEffect(()=>{const B=Z=>{const ee=w.current;if(!ee)return;const M=Z.target;if(M&&!ee.contains(M)){try{if(M.closest&&M.closest("[data-tooltip-ignore]"))return}catch{}i&&W(!0)}},O=Z=>{const ee=w.current;if(!ee)return;const M=Z.target;if(M&&!ee.contains(M)){try{if(M.closest&&M.closest("[data-tooltip-ignore]"))return}catch{}i&&W(!0)}},ye=Z=>{if(Z.key==="Escape"){Z.stopPropagation(),W();return}if(Z.key==="Tab"){const ee=w.current;if(!ee)return;const M=ee.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(!M||M.length===0)return;const j=M[0],ae=M[M.length-1],ne=document.activeElement;Z.shiftKey?ne===j&&(Z.preventDefault(),ae.focus()):ne===ae&&(Z.preventDefault(),j.focus())}};return document.addEventListener("pointerdown",B,!0),document.addEventListener("click",O,!0),document.addEventListener("keydown",ye),()=>{document.removeEventListener("pointerdown",B,!0),document.removeEventListener("click",O,!0),document.removeEventListener("keydown",ye)}},[r,i,W]),l.useEffect(()=>{const B=()=>{W(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",B),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",B)}},[W]);const F=V.jsxs("div",{ref:w,className:`tooltip-content ${m?"tooltip-content--bordered":""} ${k?"is-closing":""} ${s} ${$&&c?"is-mobile":""}`,role:d,"aria-label":p||void 0,style:P?{}:{..._,visibility:D?"visible":"hidden"},tabIndex:-1,"data-placement":T,"data-left":P?"":_.left,"data-top":P?"":_.top,"data-anchor-left":t?Math.round(t.left):"","data-anchor-top":t?Math.round(t.top):"","data-anchor-width":t?Math.round(t.width):"","data-anchor-height":t?Math.round(t.height):"",children:[S!=null&&V.jsx("div",{className:"tooltip-content__header h5",children:S}),f]});if(P||typeof document>"u")return F;if(y||$&&c){const B=V.jsxs("div",{className:"tooltip-portal",children:[V.jsx("div",{className:"tooltip-backdrop",onClick:()=>{i&&W(!0)}}),F]});return Bo.createPortal(B,document.body)}return Bo.createPortal(F,document.body)}function _d(e){const{anchorRect:t,text:n,offset:o=8,onClose:u,className:r="",ariaLabel:i}=e||{};return n?V.jsx(ju,{anchorRect:t,offset:o,onClose:u,closeOnOutsideClick:!1,className:`tooltip-info ${r}`,ariaLabel:i||n,children:V.jsx("div",{className:"tooltip-info__content body-3",children:n})}):null}function Pu(e){const{anchorRect:t,title:n,items:o,activeIndex:u=-1,showIndex:r=!0,onClose:i,offset:s=12}=e||{},d=Array.isArray(o)?o:o?[o]:[];return!d.length&&!n?null:V.jsx(ju,{anchorRect:t,offset:s,onClose:i,closeOnOutsideClick:!0,useBorder:!1,className:"tooltip-description",children:V.jsxs("div",{className:"tooltip-description__box",children:[n&&V.jsx("span",{className:"tooltip-description__title body-2",children:n}),V.jsx("ol",{className:"tooltip-description__items",children:d.map((p,f)=>V.jsxs("li",{className:`tooltip-description__item body-3${f===u?" tooltip-description__item--active":""}`,children:[r&&d.length>1&&V.jsxs("span",{className:"tooltip-description__index button-1",children:[f+1,"."]}),V.jsx("span",{children:p})]},f))})]})})}function Ed(e){const{size:t=48,type:n,htmlType:o,href:u,target:r,rel:i,icon:s,rightIcon:d,label:p,count:f,subLabel:y,children:c,ariaLabel:m,variant:S="default",align:w="center",selected:_,toggleable:g=!1,disabled:k=!1,useLabel:A=!0,useBorder:T=!0,useBG:v=!0,useDisabledCovered:D=!1,useDisabledInvisible:I=!1,width:$,minWidth:G,onClick:P,onDisabledClick:Q,showTooltipInfo:Y=!1,tooltipInfoText:W=null,tooltipDescription:F=null,iconSize:B="medium",iconColor:O,shape:ye="rounded",color:Z,className:ee,...M}=e,j=typeof t=="string"&&isNaN(Number(t))?t.toLowerCase():String(Number(t)||48),ae=j.match(/^\d+$/)?`button${j}`:`button-${j}`,ne=Number(t),q=!isNaN(ne)&&ne<40?"button-2":"button-1",Me=p??c,X=k||!!M.disabled,he=X?D?"disabled-covered":I?"disabled-invisibled":"disabled":S,H=he?`button--variant-${he}`:"",He=w?`button--align-${w}`:"",ze=ye?`button--shape-${ye}`:"",je=typeof O=="string"&&O.startsWith("--")?`var(${O})`:O,tt={...$?{width:typeof $=="number"?`${$}px`:$}:{},...G?{minWidth:typeof G=="number"?`${G}px`:G}:{},...T?{}:{"--button-border":X?"0":"1px solid transparent"},...je?{"--button-icon-color":je}:{},...Z?{"--color-main":Z}:{}},Ve=A===!1?"":Me,te=Array.isArray(Ve)?Ve.length>0:!!Ve,nt=!!d,oe=n??(te||s||nt?"bar":"dot"),pt=`${ae}--${oe}`,pe=l.useRef(null),E=l.useRef(X),[z,L]=l.useState(!!_),[K,ie]=l.useState(!1),[Pe,ve]=l.useState(null),be=l.useCallback(()=>ie(!1),[]);l.useEffect(()=>{(Y||F)&&X&&K&&(ie(!1),ve(null))},[X,Y,F,K]),l.useEffect(()=>{typeof _=="boolean"&&L(_)},[_]),l.useEffect(()=>{if(E.current&&!X&&pe.current){const ue=pe.current;ue.blur(),ue.style.pointerEvents="none";const Xe=requestAnimationFrame(()=>{requestAnimationFrame(()=>{pe.current&&(pe.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(Xe)}E.current=X},[X]);const Ne=typeof _=="boolean"?!!_:z,Se=g||typeof _=="boolean"?Ne?"true":"false":void 0,Ct=Ia("button",ae,pt,H,He,ze,Ne?"is-selected":null,v?null:"button--no-bg",ee),We=`button__icon button__icon--${B}`,ot=Array.isArray(y)?y:y!==void 0?[y]:[],Ue=()=>{if(Array.isArray(Ve))return Ve.map((Xe,It)=>{const Mt=ot[It];return V.jsxs("span",{className:`button__label-text${Mt!==void 0?" button__label-text--has-sub":""}`,children:[Xe,Mt!==void 0&&V.jsx("span",{className:"button__sub-label-text caption-1",children:Mt})]},It)});const ue=y!==void 0;return V.jsxs("span",{className:`button__label-text${ue?" button__label-text--has-sub":""}`,children:[Ve,f!=null&&V.jsx("span",{className:"button__count",children:f}),ue&&V.jsx("span",{className:"button__sub-label-text caption-1",children:y})]})},$e=ue=>{X||(typeof M.onMouseLeave=="function"&&M.onMouseLeave(ue),typeof _!="boolean"&&L(!1),ue.currentTarget.blur())},lt=ue=>{if(X){Q?.(ue);return}typeof _!="boolean"&&g&&L(Xe=>!Xe),P?.(ue)},yt=l.useCallback(()=>{!X&&(Y||F)&&(ie(!0),ve(pe.current?.getBoundingClientRect()??null))},[X,Y,F]),Rt=l.useCallback(()=>{(Y||F)&&(ie(!1),ve(null))},[Y,F]),me={...M};delete me.disabled,delete me.className,delete me.faded,delete me.useFaded,delete me.loading,delete me.onMouseLeave,delete me.onPointerEnter,delete me.onPointerLeave,delete me.onFocus,delete me.onBlur,X&&(Object.keys(me).forEach(ue=>{/^on[A-Z]/.test(ue)&&typeof me[ue]=="function"&&delete me[ue]}),me["aria-disabled"]="true");const At=(typeof Y=="string"?Y:null)??(typeof W=="string"?W:null)??(typeof m=="string"?m:null)??(typeof Me=="string"?Me:null)??void 0,wt=typeof m=="string"?m:typeof Me=="string"?Me:At,ut=(ue,Xe)=>V.jsx(gd,{icon:ue,label:Xe??wt,className:We,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),ct=()=>oe==="dot"?V.jsxs(V.Fragment,{children:[ut(s),te&&V.jsx("span",{className:`button__label ${q}`,children:Ue()})]}):w==="center"&&s?V.jsxs(V.Fragment,{children:[V.jsxs("span",{className:"button__center-group",children:[V.jsx("span",{className:"button__left",children:ut(s)}),te&&V.jsx("span",{className:`button__label ${q}`,children:Ue()})]}),nt&&V.jsx("span",{className:"button__right",children:ut(d)})]}):V.jsxs(V.Fragment,{children:[s&&V.jsx("span",{className:"button__left",children:ut(s,m??Me)}),te&&V.jsx("span",{className:`button__label ${q}`,children:Ue()}),nt&&V.jsx("span",{className:"button__right",children:ut(d)})]}),Ke=!!u&&!X;return V.jsxs(V.Fragment,{children:[V.jsx(Ke?"a":"button",{...me,ref:pe,...Ke?{href:u,target:r,rel:i??(r==="_blank"?"noreferrer":void 0)}:{type:o,disabled:X&&!Q},className:Ct,"aria-pressed":Se,"aria-label":wt,"aria-disabled":Ke&&X?!0:void 0,style:tt,onClick:lt,onMouseLeave:$e,onPointerEnter:ue=>{yt(),!X&&typeof M.onPointerEnter=="function"&&M.onPointerEnter(ue)},onPointerLeave:ue=>{Rt(),!X&&typeof M.onPointerLeave=="function"&&M.onPointerLeave(ue)},onFocus:ue=>{yt(),!X&&typeof M.onFocus=="function"&&M.onFocus(ue)},onBlur:ue=>{$e(ue),Rt(),!X&&typeof M.onBlur=="function"&&M.onBlur(ue)},children:ct()}),K&&F?V.jsx(Pu,{anchorRect:Pe,title:F.title,items:F.items,onClose:be}):K&&At?V.jsx(_d,{anchorRect:Pe,text:At,onClose:be}):null]})}function $u(){const[e,t]=l.useState(null),n=l.useCallback(r=>t(r.getBoundingClientRect()),[]),o=l.useCallback(()=>t(null),[]),u=l.useCallback(r=>{const i=r.getBoundingClientRect();t(s=>s?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:n,close:o,toggleAt:u}}function bd(e){const[t,n]=l.useState(null),[o,u]=l.useState(null),r=l.useRef(null);l.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]);const i=l.useCallback((d,p)=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{n(d),u(p)},e)},[e]),s=l.useCallback(()=>{r.current&&clearTimeout(r.current),n(null),u(null)},[]);return{payload:t,anchorRect:o,openAfterDelay:i,close:s}}function Sd({title:e,items:t}){const{t:n}=gt.useTranslation(),{anchorRect:o,openAt:u,close:r}=$u();return V.jsxs(V.Fragment,{children:[V.jsx(Ed,{size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!o,ariaLabel:n("common.info","\uC124\uBA85"),onPointerEnter:i=>u(i.currentTarget),onPointerLeave:r,onFocus:i=>u(i.currentTarget),onBlur:r}),o&&V.jsx(Pu,{title:e,items:t,showIndex:t.length>1,anchorRect:o,onClose:r})]})}function Fu(){const{t:e}=gt.useTranslation();return l.useMemo(()=>({difficulty:e("wordSearch.filter.difficulty","\uB4F1\uAE09"),syllables:e("wordSearch.filter.syllables","\uC74C\uC808 \uC218"),syllable5plus:e("wordSearch.filter.syllable5plus","5\uC74C\uC808 \uC774\uC0C1"),partOfSpeech:e("wordSearch.filter.partOfSpeech","\uD488\uC0AC"),wordType:e("wordSearch.filter.wordType","\uC720\uD615"),posMap:{[e("wordSearch.filter.pos.noun","\uCCB4\uC5B8(\uBA85\uC0AC, \uC218\uC0AC)")]:["\uBA85","\uC218"],[e("wordSearch.filter.pos.verb","\uC6A9\uC5B8(\uB3D9\uC0AC, \uD615\uC6A9\uC0AC)")]:["\uB3D9","\uD615"],[e("wordSearch.filter.pos.modifier","\uC218\uC2DD\uC5B8(\uBD80\uC0AC, \uAD00\uD615\uC0AC)")]:["\uBD80","\uAD00"]},typeMap:{[e("wordSearch.filter.type.native","\uACE0\uC720\uC5B4")]:"\uACE0\uC720",[e("wordSearch.filter.type.sino","\uD55C\uC790\uC5B4")]:"\uD55C\uC790",[e("wordSearch.filter.type.foreign","\uC678\uB798\uC5B4")]:"\uC678\uB798",[e("wordSearch.filter.type.mixed","\uD63C\uC885\uC5B4")]:"\uD63C\uC885"}}),[e])}function Hu(e,t,n){return{label:t.difficulty,items:[1,2,3,4].map(o=>e("wordSearch.filter.grade",{n:o})),multiple:!0,allOption:!0,allLabel:n?.allLabel,labelAction:n?.labelAction}}function zu(e){return{label:e.partOfSpeech,items:Object.keys(e.posMap),multiple:!0,allOption:!0}}function Vu(e){return{label:e.wordType,items:Object.keys(e.typeMap),multiple:!0,allOption:!0}}function kd(e,t){return{label:t.syllables,items:[e("wordSearch.filter.syllable",{n:1}),e("wordSearch.filter.syllable",{n:2}),e("wordSearch.filter.syllable",{n:3}),e("wordSearch.filter.syllable",{n:4}),t.syllable5plus],multiple:!0,allOption:!0}}function Ad(e,t){const n=[e("wordPairs.filter.onlyHasImage","\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC")];return t?.includeStructure&&n.push(e("wordPairs.filter.onlySameStructure","\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC")),{label:e("wordPairs.filter.selectLabel","\uC120\uD0DD"),items:n,multiple:!0,labelAction:t?.labelAction}}function wd(e,t){const{label:n,headValue:o,midValue:u,tailValue:r,includeMid:i=!0,headDisabled:s,midDisabled:d,tailDisabled:p,allOptionDisabled:f,groupLabel:y,labelAction:c}=t;return{label:n,...y?{groupLabel:y}:{},...c?{labelAction:c}:{},allOption:!0,allLabel:e("wordSearch.filter.positionAny",{defaultValue:"\uBB34\uAD00"}),...f?{allOptionDisabled:f}:{},items:[{value:o,displayLabel:e("wordSearch.filter.positionHead",{defaultValue:"\uC5B4\uB450"}),disabled:s},...i?[{value:u,displayLabel:e("wordSearch.filter.positionMid",{defaultValue:"\uC5B4\uC911"}),disabled:d}]:[],{value:r,displayLabel:e("wordSearch.filter.positionTail",{defaultValue:"\uC5B4\uB9D0"}),disabled:p}]}}function Md(e,t,n){if(t===bt){const{[n]:r,...i}=e;return i}const o=e[n]??[],u=o.includes(t)?o.filter(r=>r!==t):[...o,t];if(u.length===0){const{[n]:r,...i}=e;return i}return{...e,[n]:u}}Object.fromEntries(Object.entries(Jr).map(([e,{nucleus:t}])=>[e,t]));const Nd={\uACE0\uC720\uC5B4:"\uACE0\uC720",\uD55C\uC790\uC5B4:"\uD55C\uC790",\uC678\uB798\uC5B4:"\uC678\uB798",\uD63C\uC885\uC5B4:"\uD63C\uC885"},Td={"\uCCB4\uC5B8(\uBA85\uC0AC,\uC218\uC0AC)":["\uBA85","\uC218"],"\uC6A9\uC5B8(\uB3D9\uC0AC,\uD615\uC6A9\uC0AC)":["\uB3D9","\uD615"],"\uC218\uC2DD\uC5B8(\uBD80\uC0AC,\uAD00\uD615\uC0AC)":["\uBD80","\uAD00"]},xd={difficulty:"\uB09C\uC774\uB3C4 \uB4F1\uAE09",syllables:"\uC74C\uC808 \uC218",syllable5plus:"5\uC74C\uC808 \uC774\uC0C1",partOfSpeech:"\uD488\uC0AC",wordType:"\uC720\uD615",posMap:Td,typeMap:Nd};function Bd(e,t,n=xd){const o=t[n.difficulty];if(o?.length&&!o.some(s=>e.grade===s.replace(/\D/g,"")))return!1;const u=t[n.syllables];if(u?.length){const s=e.syllables??0;if(!u.some(d=>d===n.syllable5plus?s>=5:s===parseInt(d)))return!1}const r=t[n.partOfSpeech];if(r?.length&&!r.flatMap(s=>n.posMap[s]??[s]).some(s=>(e.pos??"").includes(s)))return!1;const i=t[n.wordType];return!(i?.length&&!i.some(s=>e.wordType===n.typeMap[s]))}const it=(e,t)=>t.map(n=>({jamos:[n],tooltip:e})),Ee=(e,t)=>({jamos:[...e],tooltip:t}),uo={cho:[it("\uC591\uC21C\uC74C",["\u3142","\u3143","\u314D","\u3141"]),it("\uCE58\uC870\uC74C",["\u3137","\u3138","\u314C","\u3134","\u3139"]),it("\uCE58\uC870\uC74C",["\u3145","\u3146"]),it("\uACBD\uAD6C\uAC1C\uC74C",["\u3148","\u3149","\u314A"]),it("\uC5F0\uAD6C\uAC1C\uC74C",["\u3131","\u3132","\u314B"]),it("\uC131\uBB38\uC74C",["\u314E"])],jung:[[Ee("\u3163","\uC804\uC124 \uACE0\uBAA8\uC74C"),Ee("\u315F","\uC804\uC124 \uACE0\uBAA8\uC74C \xB7 w\uD65C\uC74C"),Ee("\u3162","\uC804\uC124 \uACE0\uBAA8\uC74C \xB7 \u0270\uD65C\uC74C")],[Ee("\u3161","\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C")],[Ee("\u315C","\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C"),Ee("\u3160","\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C \xB7 j\uD65C\uC74C")],[Ee("\u3154\u3150","\uC804\uC124 \uC911\uBAA8\uC74C"),Ee("\u3156\u3152","\uC804\uC124 \uC911\uBAA8\uC74C \xB7 j\uD65C\uC74C"),Ee("\u3159\u315A\u315E","\uC804\uC124 \uC911\uBAA8\uC74C \xB7 w\uD65C\uC74C")],[Ee("\u3153","\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C"),Ee("\u3155","\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C \xB7 j\uD65C\uC74C"),Ee("\u315D","\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C \xB7 w\uD65C\uC74C")],[Ee("\u3157","\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C"),Ee("\u315B","\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C \xB7 j\uD65C\uC74C")],[Ee("\u314F","\uC800\uBAA8\uC74C"),Ee("\u3151","\uC800\uBAA8\uC74C \xB7 j\uD65C\uC74C"),Ee("\u3158","\uC800\uBAA8\uC74C \xB7 w\uD65C\uC74C")]],jong:[it("\uC591\uC21C\uC74C",["\u3142","\u3141"]),it("\uCE58\uC870\uC74C",["\u3137","\u3134","\u3139"]),it("\uC5F0\uAD6C\uAC1C\uC74C",["\u3131","\u3147"])]},Dd=[...ke],vd=[...rt],Od=Fe.filter(e=>e!==""),st=e=>e===Qe?[]:Array.from(e),Qe="__NO_CODA__",Uu=[1,2,3,4],et=5,Ld=12,Gu="SYL_",ro=e=>`${Gu}${e}`,Rd=e=>Number(e.slice(Gu.length));function ao(e){return e>=et?Array.from({length:Ld-et+1},(t,n)=>et+n):[e]}const Yu={cho:Dd,jung:vd,jong:Od},io=e=>e.map(t=>t.map(({jamos:n,tooltip:o})=>({v:n.join(""),tooltip:o}))),so={cho:io(uo.cho),jung:io(uo.jung),jong:io(uo.jong)},qu={};so.jung.flat().forEach(({v:e})=>{for(const t of st(e))qu[t]=e});const Id=new Set(so.cho.flat().map(e=>e.v));function Wu(e,t){return e==="cho"?Id.has(t)?t:null:e==="jung"?qu[t]??t:qo(t)}function Ku(e,t,n){if(e==="jung"){const o=st(t);return n&&o.includes(n)?n:o[0]??t}return t}function Xu(e,t,n){const o=(u,r)=>r?u==="jong"&&r===Qe?Qe:t==="pron"?Wu(u,r):Ku(u,r,u==="jung"?n:null):null;return{...e,cho:o("cho",e.cho),jung:o("jung",e.jung),jong:o("jong",e.jong)}}const lo={cho:null,jung:null,jong:null,syllable:null},jd="wt_filter",Zu=e=>`wt_filter_${e}`;function Ju(e){try{const t=localStorage.getItem(Zu(e))??localStorage.getItem(jd);if(t)return JSON.parse(t)}catch{}return null}function Pd(e){const t=e;return t?.composition?{cho:t.composition.cho??null,jung:t.composition.jung??null,jong:t.composition.jong??null,syllable:t.composition.syllable??null}:t?.choseong?{...lo,cho:t.choseong}:lo}function $d(e,t,n){const{t:o,i18n:u}=gt.useTranslation(),[r]=l.useState(()=>n?.resetOnMount?null:Ju(e)),i=r?.contrastCount,s=typeof i=="number"&&Number.isFinite(i)?i:1,[d,p]=l.useState(Math.min(5,Math.max(1,s))),[f,y]=l.useState(r?.phonemeView==="pron"?"pron":r?.phonemeView==="direct"?"direct":"char"),[c,m]=l.useState(()=>Pd(r)),S=l.useCallback(()=>t.requireSyllable?{cho:"\u3131",jung:"\u314F",jong:Qe,syllable:t.fixedSyllable??null}:{cho:null,jung:null,jong:t.fixedNoCoda?Qe:null,syllable:t.fixedSyllable??null},[t.requireSyllable,t.fixedSyllable,t.fixedNoCoda]);l.useEffect(()=>{!t.requireSyllable&&t.fixedSyllable==null&&!t.fixedNoCoda||m(E=>E.cho||E.jung||E.syllable!=null||E.jong?E:S())},[]);const w=l.useMemo(()=>_e(c.cho)||_e(c.jung)||_e(c.jong)?"count":"random",[c.cho,c.jung,c.jong]),_=l.useRef(f==="char"?c.jung:null);l.useEffect(()=>{f==="char"&&(_.current=c.jung)},[f,c.jung]);const[g,k]=l.useState(n?.resetOnMount?!!n?.defaultImageOnly:r?.excludeNoImage??!0),[A,T]=l.useState(n?.resetOnMount?!1:r?.sameStructureOnly??!0),[v,D]=l.useState(Array.isArray(r?.gradeFilter)?r.gradeFilter:[]),[I,$]=l.useState(Array.isArray(r?.posFilter)?r.posFilter:[]),[G,P]=l.useState(Array.isArray(r?.wordTypeFilter)?r.wordTypeFilter:[]),Q=l.useRef(n?.resetKey);l.useEffect(()=>{Q.current!==n?.resetKey&&(Q.current=n?.resetKey,m(S()),k(!1),T(!1),D([]),$([]),P([]),p(1))},[n?.resetKey]);const Y=Fu(),[W,F]=l.useState({cho:new Set,jung:new Set,jong:new Set,syllable:new Set}),[B,O]=l.useState(!1),[ye,Z]=l.useState(null),ee=1,M=Math.max(1,[c.cho,c.jung,c.jong].filter(Boolean).length);l.useEffect(()=>{d<M&&p(M)},[M,d]);const[j,ae]=l.useState(e);l.useEffect(()=>{if(j!==e){if(!n?.resetOnMount){const E=Ju(e),z=typeof E?.contrastCount=="number"&&Number.isFinite(E.contrastCount)?E.contrastCount:1;p(Math.min(5,Math.max(1,z))),m(E?.composition??S()),k(E?.excludeNoImage??!0),T(E?.sameStructureOnly??!0),y(E?.phonemeView==="pron"?"pron":"char"),D(Array.isArray(E?.gradeFilter)?E.gradeFilter:[]),$(Array.isArray(E?.posFilter)?E.posFilter:[]),P(Array.isArray(E?.wordTypeFilter)?E.wordTypeFilter:[])}ae(e)}},[e,j,n?.resetOnMount]),l.useEffect(()=>{if(!n?.resetOnMount&&j===e)try{localStorage.setItem(Zu(e),JSON.stringify({contrastCount:d,composition:c,excludeNoImage:g,sameStructureOnly:A,phonemeView:f,gradeFilter:v,posFilter:I,wordTypeFilter:G}))}catch{}},[n?.resetOnMount,e,j,d,c,g,A,f,v,I,G]);const[ne,q]=l.useState(0);Oo("wordpool:update",()=>q(E=>E+1));const Me=l.useRef(u.language);l.useEffect(()=>{Me.current!==u.language&&(Me.current=u.language,q(E=>E+1))},[u.language]),l.useEffect(()=>{if(!t.choseong)return;let E=!1;return Ra({difficulty:w,excludeNoImage:g}).then(z=>{E||(F(z),z.cho.size+z.jung.size+z.jong.size>0&&O(!0))}).catch(()=>{E||F({cho:new Set,jung:new Set,jong:new Set,syllable:new Set})}),()=>{E=!0}},[t.choseong,w,g,ne]),l.useEffect(()=>{let E=!1;const z=c,L=z.cho?st(z.cho):null,K=z.jung?st(z.jung):null,ie=z.jong===Qe,Pe=ie?null:z.jong?st(z.jong):null,ve=z.syllable!=null?ao(z.syllable):null,be=!!(L||K||Pe||ie||ve);return La({difficulty:t.difficulty?w:null,contrastCount:t.difficulty?d:1,composition:t.choseong&&be?{cho:L,jung:K,jong:Pe,jongNone:ie,syllable:ve}:null,excludeNoImage:g,sameStructureOnly:A,phonemeView:f==="pron"?"pron":"char",grade:v.length>0?v:null}).then(Ne=>{E||Z(Ne)}).catch(()=>{E||Z(null)}),()=>{E=!0}},[t.choseong,t.difficulty,w,d,c,f,g,A,ne,v]),l.useEffect(()=>{B&&m(E=>{const z={...E};let L=!1;return["cho","jung","jong"].forEach(K=>{const ie=E[K];!ie||ie===Qe||st(ie).some(Pe=>W[K].has(Pe))||(z[K]=null,L=!0)}),E.syllable!=null&&t.fixedSyllable==null&&(E.syllable>=et?[...W.syllable].some(K=>K>=et)||(z.syllable=null,L=!0):(!W.syllable.has(E.syllable)||E.syllable<ee)&&(z.syllable=null,L=!0)),L?z:E})},[W,B,ee,t.fixedSyllable]);const X=l.useMemo(()=>{const E=z=>{const L=new Set;for(const K of Yu[z])W[z].has(K)&&L.add(K);return L};return{cho:E("cho"),jung:E("jung"),jong:E("jong")}},[W]),he=l.useMemo(()=>({exact:new Set(Uu.filter(E=>W.syllable.has(E))),min:[...W.syllable].some(E=>E>=et)}),[W]),H=l.useMemo(()=>({diffPhonemeCount:o("training.contrast.diffPhonemeCount",{defaultValue:"\uB2E4\uB978 \uC74C\uC18C\uC758 \uCD1D \uAC2F\uC218"}),composition:o("wordPairs.composition","\uC815\uB2F5 \uB2E8\uC5B4 \uAD6C\uC131"),syllableCount:o("wordPairs.syllableCount","\uC74C\uC808 \uC218"),onset:o("wordPairs.onset","\uCD08\uC131"),vowel:o("wordPairs.vowel","\uBAA8\uC74C"),coda:o("wordPairs.coda","\uC885\uC131"),phonemeGroup:o("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),trainOnset:o("training.filter.trainOnset",{defaultValue:"\uCD08\uC131"}),trainVowel:o("training.filter.trainVowel",{defaultValue:"\uBAA8\uC74C"}),trainCoda:o("training.filter.trainCoda",{defaultValue:"\uC885\uC131"}),random:o("training.filter.random","\uBB34\uC791\uC704"),exclude:o("wordSearch.filter.exclude","\uC81C\uC678"),selectLabel:o("training.filter.selectSection",{defaultValue:"\uC120\uD0DD"}),none:o("common.none","\uC5C6\uC74C"),noImage:o("wordSearch.filter.excludeNoImage","\uC774\uBBF8\uC9C0 \uC5C6\uC74C"),excludeImage:o("training.filter.excludeImage",{defaultValue:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC"}),sameStructure:o("training.filter.sameStructure",{defaultValue:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"}),noLimit:o("training.filter.noLimit",{defaultValue:"\uBB34\uAD00"}),codaExclude:o("training.filter.codaExclude",{defaultValue:"\uC81C\uC678"}),gradeLabel:o("training.filter.gradeLabel",{defaultValue:"\uB09C\uC774\uB3C4 \uB4F1\uAE09"})}),[o]),He=l.useMemo(()=>({[H.trainOnset]:"cho",[H.trainVowel]:"jung",[H.trainCoda]:"jong"}),[H]),ze=l.useCallback((E,z)=>l.createElement(Sd,{title:z,items:E}),[]),je=l.useMemo(()=>[o("training.filter.excludeImageInfo",{defaultValue:"\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."}),o("training.filter.sameStructureInfo",{defaultValue:"\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."})],[o]),tt=l.useMemo(()=>{const E=[];if(t.choseong){const z={value:Qe,displayLabel:H.codaExclude},L=t.fixedNoCoda===!0,K=(ie,Pe)=>{const ve=L&&ie==="jong",be={label:Pe,groupLabel:H.phonemeGroup,allOption:!t.requireSyllable,allLabel:H.noLimit,allOptionDisabled:ve};if(f==="pron"){const Se=so[ie].map(Ct=>Ct.map(({v:We,tooltip:ot})=>{const Ue=st(We),$e=ve||!Ue.some(lt=>W[ie].has(lt));return Ue.length>1?{value:We,labels:Ue,tooltip:ot,disabled:$e}:{value:We,tooltip:ot,disabled:$e}}));return ie==="jong"&&!t.requireCoda&&Se.unshift([z]),{...be,groups:Se}}const Ne=Yu[ie].map(Se=>!ve&&X[ie].has(Se)?Se:{value:Se,disabled:!0});return{...be,items:ie==="jong"&&!t.requireCoda?[z,...Ne]:Ne}};E.push(K("cho",H.trainOnset)),E.push(K("jung",H.trainVowel)),E.push(K("jong",H.trainCoda))}if(E.push({...Hu(o,Y,{labelAction:ze([o("wordPairs.filter.difficultyInfo",{defaultValue:"\uAD6D\uB9BD\uAD6D\uC5B4\uC6D0\uC758 \uAE30\uCD08 \uC5B4\uD718 \uB4F1\uAE09\uC774 \uACB0\uACFC\uC5D0 \uBC18\uC601\uB429\uB2C8\uB2E4."})])}),label:H.gradeLabel}),t.partOfSpeech&&E.push(zu(Y)),t.wordType&&E.push(Vu(Y)),t.choseong||t.fixedSyllable!=null){const z=t.fixedSyllable;E.push({label:H.syllableCount,items:[...Uu.map(L=>({value:ro(L),displayLabel:o("wordPairs.syllableN",{n:L,defaultValue:"{{n}}\uC74C\uC808"}),disabled:z!=null?L!==z:!he.exact.has(L)||L<ee})),{value:ro(et),displayLabel:o("wordPairs.syllableNPlus",{n:et,defaultValue:"{{n}}\uC74C\uC808 \uC774\uC0C1"}),disabled:z!=null?et!==z:!he.min}],allOption:!0,allOptionDisabled:z!=null})}return t.choseong?E.push({label:H.exclude,displayLabel:H.selectLabel,multiple:!0,items:[H.excludeImage,H.sameStructure],labelAction:ze(je)}):E.push({label:H.exclude,displayLabel:H.selectLabel,multiple:!0,items:[H.excludeImage],labelAction:ze([je[0]])}),E},[t.choseong,t.partOfSpeech,t.wordType,t.requireSyllable,t.fixedSyllable,t.fixedNoCoda,t.requireCoda,ee,X,W,f,he,H,o,ze,je,Y]),Ve={...t.difficulty?{[H.diffPhonemeCount]:String(d)}:{},...(t.choseong||t.fixedSyllable!=null)&&c.syllable!=null?{[H.syllableCount]:ro(c.syllable)}:{},...t.choseong&&c.cho?{[H.trainOnset]:c.cho}:{},...t.choseong&&c.jung?{[H.trainVowel]:c.jung}:{},...t.choseong&&c.jong?{[H.trainCoda]:c.jong}:{},[H.exclude]:[...g?[H.excludeImage]:[],...A?[H.sameStructure]:[]],[H.gradeLabel]:v.map(E=>o("wordSearch.filter.grade",{n:Number(E),defaultValue:"{{n}}\uB4F1\uAE09"})),...t.partOfSpeech?{[Y.partOfSpeech]:I}:{},...t.wordType?{[Y.wordType]:G}:{}},te=l.useCallback((E,z)=>{if(z===H.diffPhonemeCount){const L=Number(E);L>=1&&p(L)}else if(z===H.exclude)E===H.excludeImage?k(L=>!L):E===H.sameStructure&&T(L=>!L);else if(z===H.syllableCount)m(L=>{if(!E||E===bt)return{...L,syllable:null};const K=Rd(E);return{...L,syllable:L.syllable===K?null:K}});else if(z===H.gradeLabel){if(!E||E===bt){D([]);return}const L=E.replace(/\D/g,"");D(K=>K.includes(L)?K.filter(ie=>ie!==L):[...K,L])}else if(z===Y.partOfSpeech){if(!E||E===bt){$([]);return}$(L=>L.includes(E)?L.filter(K=>K!==E):[...L,E])}else if(z===Y.wordType){if(!E||E===bt){P([]);return}P(L=>L.includes(E)?L.filter(K=>K!==E):[...L,E])}else{const L=He[z];if(!L)return;m(K=>t.requireSyllable?E&&E!==bt?{...K,[L]:E}:K:!E||E===bt||K[L]===E?{...K,[L]:null}:{...K,[L]:E})}},[H,He,Y,t.requireSyllable]),nt=l.useCallback(E=>!t.partOfSpeech&&!t.wordType?!0:Bd(E,{...t.partOfSpeech?{[Y.partOfSpeech]:I}:{},...t.wordType?{[Y.wordType]:G}:{}},Y),[t.partOfSpeech,t.wordType,I,G,Y]),oe=l.useCallback(E=>{E!==f&&(E!=="direct"&&f!=="direct"&&m(z=>Xu(z,E,_.current)),y(E))},[f]),pt=l.useCallback(()=>({composition:c,contrastCount:d,excludeNoImage:g,sameStructureOnly:A,phonemeView:f,gradeFilter:v}),[c,d,g,A,f,v]),pe=l.useCallback(E=>{m(E.composition),p(E.contrastCount),k(E.excludeNoImage),T(E.sameStructureOnly??!0),y(E.phonemeView),D(Array.isArray(E.gradeFilter)?E.gradeFilter:[])},[]);return{difficulty:w,contrastCount:d,composition:c,choseong:c.cho,excludeNoImage:g,sameStructureOnly:A,gradeFilter:v,posFilter:I,wordTypeFilter:G,matchesWordAttributes:nt,poolVersion:ne,filterSections:tt,filterSelected:Ve,handleFilterSelect:te,phonemeView:f,setPhonemeView:oe,phonemeGroupLabel:H.phonemeGroup,wordCount:ye,getFilterSnapshot:pt,restoreFilterSnapshot:pe}}function Fd(e){const t=s=>s?st(s):null,n=t(e.cho),o=t(e.jung),u=e.jong===Qe,r=u?null:t(e.jong),i=e.syllable!=null?ao(e.syllable):null;return!n&&!o&&!r&&!u&&!i?null:{cho:n,jung:o,jong:r,jongNone:u,syllable:i}}function Hd(e,t,n,o,u,r,i=!0,s="char",d=[]){const[p,f]=l.useState({}),[y,c]=l.useState(!1),{cho:m=null,jung:S=null,jong:w=null,syllable:_=null}=o??{},g=d.length>0?d.slice().sort().join(","):"";return l.useEffect(()=>{r>0&&Oa(u).catch(()=>{})},[r,u]),l.useEffect(()=>{let k=!1;return c(!0),(async()=>{const A=Fd({cho:m,jung:S,jong:w,syllable:_}),T=`${m??""}_${S??""}_${w??""}_${_??""}_${g}`,v={};await Promise.all(e.map(async D=>{const I=Fn[D.key];try{const $=await iu(D.key,{difficulty:I.difficulty?t:null,contrastCount:I.difficulty?n:1,composition:I.choseong?A:null,count:5,excludeNoImage:u,sameStructureOnly:i,phonemeView:s,grade:d.length>0?d:null});$&&$.length>0?v[D.key]={id:`wt-${D.key}-${t}-${T}-${Date.now()}`,name:D.label,training_type:D.key,category_main_code:"WORD",iconColor:D.color,subTitle:D.subTitle,items:$,itemCount:$.length}:v[D.key]={id:`wt-${D.key}-empty`,name:D.label,training_type:D.key,category_main_code:"WORD",iconColor:D.color,subTitle:D.subTitle,items:[],itemCount:0,__empty:!0}}catch{v[D.key]=null}})),k||(f(v),c(!1))})(),()=>{k=!0}},[t,n,m,S,w,_,u,i,s,r,g]),{perTypeData:p,generating:y}}function zd(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Vd(e){let t=e>>>0;return()=>{t|=0,t=t+1831565813|0;let n=Math.imul(t^t>>>15,1|t);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}const Mn=at;function co(e,t){const n=t?Vd(zd(t)):Math.random;return{LISTEN_IN_NOISE:Mn(Zt,Math.max(0,e.LISTEN_IN_NOISE||0),n),SHORT_STORY:Mn(Jt,Math.max(0,e.SHORT_STORY||0),n),LONG_STORY:Mn(Qt,Math.max(0,e.LONG_STORY||0),n),ORDERING_SENTENCE:Mn(en,Math.max(0,e.ORDERING_SENTENCE||0),n)}}function Qu(e){return e?!!(e.LISTEN_IN_NOISE?.length||e.SHORT_STORY?.length||e.LONG_STORY?.length||e.ORDERING_SENTENCE?.length):!1}const Ud={LISTEN_IN_NOISE:3,SHORT_STORY:2,LONG_STORY:1,ORDERING_SENTENCE:2};function er(e=!1,t=Ud,n){const o=kn(Date.now()),u=kn(Date.now()-864e5),r=`${n??""}|${o}`,i=`${n??""}|${u}`;return Zt.length>0||Jt.length>0||Qt.length>0||en.length>0?{today:co(t,r),yesterday:co(t,i)}:{today:co(t,r),yesterday:null}}function Gd(e){const t=l.useRef({LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]}),n=l.useRef(null),[o,u]=l.useState(!1),[r,i]=l.useState(!1),[s,d]=l.useState(0),[p,f]=l.useState(!1);l.useEffect(()=>{let c=!1,m,S=0;const w=40,_=()=>{m!==void 0&&(clearInterval(m),m=void 0)};let g=!1;try{const T=new URLSearchParams(window.location.search),v=T.get("forceRefresh")||T.get("force");g=v==="1"||v==="true"}catch{}const k=T=>{t.current=T.today,n.current=T.yesterday,u(!0),f(!0),d(v=>v+1),c=!0,_()},A=async()=>{if(c)return;if(!g){const v=er(!1,void 0,e);if(Qu(v.today)){k(v);return}}try{await dd(3e3)}catch{}if(c)return;const T=er(g,void 0,e);if(Qu(T.today)){k(T);return}++S>=w&&(u(!0),f(!1),c=!0,_())};return A(),m=setInterval(A,250),()=>{c=!0,_()}},[e]);const y=l.useCallback(c=>{const m=r?n.current:t.current,S=r?t.current:n.current;return m?.[c]?.length?m[c]:S?.[c]?.length?S[c]:void 0},[r,s]);return{loaded:o,hasData:p,showYesterday:r,setShowYesterday:i,getTrainingPerType:y}}const Lt=[];let Nn=!1;function tr(e){if(e.key!=="Escape"||e.defaultPrevented)return;const t=Lt[Lt.length-1];t&&(e.stopPropagation(),t())}function Yd(e){return Lt.push(e),!Nn&&typeof document<"u"&&(document.addEventListener("keydown",tr),Nn=!0),()=>{const t=Lt.lastIndexOf(e);t>=0&&Lt.splice(t,1),Lt.length===0&&Nn&&typeof document<"u"&&(document.removeEventListener("keydown",tr),Nn=!1)}}function qd(e,t=!0){const n=vo(e);l.useEffect(()=>{if(t)return Yd(()=>{n.current?.()})},[t,n])}const ho=(e,t)=>`${e}:${t??1}`,fo=new Map;function Wd(e,t){const[n,o]=l.useState(0),u=e.map(r=>ho(r.word,r.homonum)).join("|");return l.useEffect(()=>{const r=(u?u.split("|"):[]).filter(d=>!fo.has(d));if(r.length===0)return;let i=!1;const s=Array.from(new Set(r.map(d=>d.slice(0,d.lastIndexOf(":")))));return t(s).then(d=>{if(!(i||d.length===0)){for(const p of d)p.Meaning&&fo.set(ho(p.Word,p.Homonum??void 0),p.Meaning);o(p=>p+1)}}),()=>{i=!0}},[u,t]),l.useMemo(()=>{const r=u?u.split("|"):[],i=new Map;for(const s of r){const d=fo.get(s);d!=null&&i.set(s,d)}return i},[u,n])}function Kd(e,t,n){const o=Number.isFinite(t)&&t>=1?Math.floor(t):1,u=Math.max(1,Math.ceil(e.length/o)),r=Number.isFinite(n)?Math.min(Math.max(1,Math.floor(n)),u):1;return{pageItems:l.useMemo(()=>e.slice((r-1)*o,r*o),[e,r,o]),totalPages:u,curPage:r}}function Xd(e="warning"){const[t,n]=l.useState(""),[o,u]=l.useState(e),[r,i]=l.useState(0),s=l.useCallback((y,c)=>{u(c),n(y),i(m=>m+1)},[]),d=l.useCallback(y=>s(y,"warning"),[s]),p=l.useCallback(y=>s(y,"normal"),[s]),f=l.useCallback(()=>n(""),[]);return{toastMessage:t,toastType:o,toastKey:r,showToast:s,showWarning:d,showNormal:p,clearToast:f}}const nn={blue:"#60A5FA",green:"#4ADE80",amber:"#FBBF24",purple:"#A78BFA",pink:"#F472B6"},on=nn.blue,Tn=nn.green,un=nn.amber,xn=nn.purple,Zd=nn.pink,Jd=[{key:"discrimination",label:"\uBCC0\uBCC4\uD6C8\uB828",disc:"\uB450 \uC18C\uB9AC\uAC00 \uAC19\uC740\uC9C0 \uB2E4\uB978\uC9C0, \uB610\uB294 \uD2B9\uC815 \uC18C\uB9AC\uB97C \uAD6C\uBCC4\uD558\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"ear",types:[{key:"SAME_SOUND_PICK",label:"\uAC19\uC740 \uC18C\uB9AC \uACE0\uB974\uAE30",icon:"volume-2",color:on,subTitle:"\uB4E4\uC740 \uC18C\uB9AC\uC640 \uAC19\uC740 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},{key:"SAME_OR_DIFF",label:"\uAC19\uC740\uC9C0 \uB2E4\uB978\uC9C0 \uB9DE\uD788\uAE30",icon:"diff",color:on,subTitle:"\uB450 \uC18C\uB9AC\uAC00 \uAC19\uC740\uC9C0, \uB2E4\uB978\uC9C0 \uAD6C\uBD84\uD558\uC138\uC694."},{key:"HEAR_AND_PICK_SAME",label:"\uC77C\uCE58\uD558\uB294 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",icon:"headphones",color:on,subTitle:"\uB4E4\uC740 \uC18C\uB9AC\uC758 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},{key:"HEAR_AND_PICK_INCLUDED",label:"\uD55C \uC74C\uC808 \uD3EC\uD568 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",icon:"scan-search",color:on,subTitle:"\uB4E4\uC740 \uC74C\uC808\uC774 \uD3EC\uD568\uB41C \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},{key:"STARTS_WITH_SAME_SOUND",label:"\uCCAB \uC74C\uC808\uC774 \uAC19\uC740 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",icon:"play-circle",color:on,subTitle:"\uB4E4\uC740 \uB2E8\uC5B4\uC640 \uAC19\uC740 \uC18C\uB9AC\uB85C \uC2DC\uC791\uD558\uB294 \uB2E8\uC5B4\uB97C \uACE0\uB974\uC138\uC694."}]},{key:"synthesis",label:"\uD569\uC131\uD6C8\uB828",disc:"\uB450 \uAC1C \uC774\uC0C1\uC758 \uC74C\uC808\uC774\uB098 \uC74C\uC18C\uB97C \uD569\uCCD0 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"git-merge",types:[{key:"MERGE_2_SYLLABLES",label:"\uC74C\uC808 2\uAC1C \uD569\uCE58\uAE30",icon:"link-2",color:Tn,subTitle:"\uB450 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},{key:"MERGE_3_SYLLABLES",label:"\uC74C\uC808 3\uAC1C \uD569\uCE58\uAE30",icon:"git-merge",color:Tn,subTitle:"\uC138 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},{key:"MERGE_2_PHONEMES",label:"\uC74C\uC18C 2\uAC1C \uD569\uCE58\uAE30",icon:"combine",color:Tn,subTitle:"\uB450 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"MERGE_3_PHONEMES",label:"\uC74C\uC18C 3\uAC1C \uD569\uCE58\uAE30",icon:"braces",color:Tn,subTitle:"\uC138 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"}]},{key:"deletion",label:"\uD0C8\uB77D\uD6C8\uB828",disc:"\uB2E8\uC5B4\uC5D0\uC11C \uC74C\uC808\uC774\uB098 \uC74C\uC18C\uB97C \uC81C\uAC70\uD588\uC744 \uB54C \uB0A8\uB294 \uC18C\uB9AC\uB97C \uC778\uC2DD\uD558\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"scissors",types:[{key:"DROP_1_FROM_2SYLL",label:"2\uC74C\uC808\uC5D0\uC11C 1\uC74C\uC808 \uD0C8\uB77D",icon:"scissors",color:un,subTitle:"2\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"DROP_1_FROM_3SYLL",label:"3\uC74C\uC808\uC5D0\uC11C 1\uC74C\uC808 \uD0C8\uB77D",icon:"minus-circle",color:un,subTitle:"3\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"DROP_PART_FROM_COMPOUND",label:"\uD569\uC131\uC5B4\uC5D0\uC11C \uBD80\uBD84\uD0C8\uB77D",icon:"unlink",color:un,subTitle:"\uD569\uC131\uC5B4\uC758 \uC77C\uBD80\uB97C \uBE7C\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},{key:"DROP_FINAL_CONSONANT_FROM_1SYLL",label:"1\uC74C\uC808\uC5D0\uC11C \uBC1B\uCE68 \uD0C8\uB77D",icon:"eraser",color:un,subTitle:"\uBC1B\uCE68\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"REMOVE_CONSONANT_AND_IDENTIFY_PHONEME",label:"1\uC74C\uC808\uC5D0\uC11C \uC790\uC74C \uD0C8\uB77D",icon:"audio-lines",color:un,subTitle:"\uC790\uC74C\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB0A8\uC744\uAE4C\uC694?"}]},{key:"substitution",label:"\uB300\uCE58\uD6C8\uB828",disc:"\uB2E8\uC5B4\uC758 \uC77C\uBD80 \uC74C\uC808\uC774\uB098 \uC74C\uC18C\uB97C \uBC14\uAFB8\uC5B4 \uC0C8\uB85C\uC6B4 \uC18C\uB9AC\uB97C \uB9CC\uB4DC\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"replace",types:[{key:"CHANGE_1_SYLL_IN_2SYLL",label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",icon:"replace",color:xn,subTitle:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},{key:"CHANGE_1_SYLL_IN_3SYLL",label:"3\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",icon:"shuffle",color:xn,subTitle:"3\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},{key:"CHANGE_1_PHONEME_IN_1SYLL",label:"1\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC18C \uBC14\uAFB8\uAE30",icon:"arrow-right-left",color:xn,subTitle:"1\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uC18C\uB9AC\uB97C \uB9CC\uB4DC\uC138\uC694."},{key:"CHANGE_1_PHONEME_IN_2SYLL",label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC18C \uBC14\uAFB8\uAE30",icon:"flip-horizontal",color:xn,subTitle:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."}]},{key:"attention",label:"\uCCAD\uAC01\uC801\uC8FC\uC758\uB825\uD6C8\uB828",disc:"\uC5EC\uB7EC \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uC21C\uC11C\uB97C \uAE30\uC5B5\uD558\uB294 \uC8FC\uC758\uB825\uACFC \uB2E8\uAE30 \uAE30\uC5B5 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"list-ordered",types:[{key:"LISTEN_AND_REMEMBER_ORDER",label:"\uB4E3\uACE0 \uC21C\uC11C\uB300\uB85C \uAE30\uC5B5\uD558\uAE30",icon:"list-ordered",color:Zd,subTitle:"\uC138 \uB2E8\uC5B4\uB97C \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694."}]}];function Qd(){const{t:e}=gt.useTranslation();return l.useMemo(()=>{const t=Object.fromEntries(pd(e).map(o=>[o.key,o.label])),n={...t};return Jd.flatMap(o=>o.types).forEach(o=>{n[o.key]=e(`trainingType.${o.key}.label`,{defaultValue:o.label})}),{sentence:t,all:n}},[e])}exports.CACHE_GROUPS=Ho,exports.CORE_VERSION=Cd,exports.DocumentTitleSuppressContext=Ro,exports.EMPTY_COMPOSITION=lo,exports.MediaQueryOverrideContext=Do,exports.NO_CODA=Qe,exports.SYLLABLE_MIN=et,exports.VAP_PAGE_SIZE_OPTIONS=Go,exports.buildGradeSection=Hu,exports.buildPartOfSpeechSection=zu,exports.buildPositionSection=wd,exports.buildSelectSection=Ad,exports.buildSyllableSection=kd,exports.buildWordTypeSection=Vu,exports.charToPronValue=Wu,exports.convertComposition=Xu,exports.fmtBytes=Pr,exports.lsBytes=zo,exports.meaningKey=ho,exports.pronToCharValue=Ku,exports.syllableToFilter=ao,exports.today=zt,exports.toggleAttributeFilter=Md,exports.useCacheManagement=$r,exports.useDailyTrainingSelection=Gd,exports.useDelayedHoverAnchor=bd,exports.useDeviceManagement=Wr,exports.useDocumentTitle=br,exports.useEscToClose=qd,exports.useFontScale=gr,exports.useHoverAnchor=$u,exports.useMediaQuery=Er,exports.usePagedList=Kd,exports.usePasswordChange=kr,exports.useRelativeDay=Sr,exports.useTablePaging=Yr,exports.useTableSort=qr,exports.useToastState=Xd,exports.useTrainingTypeLabels=Qd,exports.useVisitAllPanel=Gr,exports.useVisitHistory=zr,exports.useVisitSchedule=Ur,exports.useWindowEvent=Oo,exports.useWordAttributeFilterKeys=Fu,exports.useWordDataStats=Fr,exports.useWordMeanings=Wd,exports.useWordTrainingDataGeneration=Hd,exports.useWordTrainingFilter=$d,exports.valueToJamos=st;
|
|
788
|
+
`+ce),be&&(ce=cn(ce)),G&&yt?B(ce):ce},t.setConfig=function(){let N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ln(N),Ct=!0,We=te,ot=oe},t.clearConfig=function(){Tt=null,Ct=!1,We=null,ot=null,G=Q,P=""},t.isValidAttribute=function(N,a,h){Tt||Ln({});const b=de(N),x=de(a);return No(b,x,h)},t.addHook=function(N,a){typeof a=="function"&&De(q,N)&&qt(q[N],a)},t.removeHook=function(N,a){if(De(q,N)){if(a!==void 0){const h=B0(q[N],a);return h===-1?void 0:D0(q[N],h,1)[0]}return Eu(q[N])}},t.removeHooks=function(N){De(q,N)&&(q[N]=[])},t.removeAllHooks=function(){q=Ou()},t}var nd=Lu();const od=/^(?:[a-z]+:)?\/\//i;let ud="";function rd(){return ud}function no(e){const t=String(e||"").trim();if(!t)return"";if(od.test(t)||t.startsWith("data:")||t.startsWith("blob:"))return t;const n=t.startsWith("/")?t:`/${t}`,o=rd();return o?`${o}${n}`:n}function ad(){return kn(new Date)}function kn(e){if(e==null||e==="")return"";const t=e instanceof Date?e:new Date(e);return isNaN(t.getTime())?"":new Intl.DateTimeFormat("fr-CA",{timeZone:"Asia/Seoul"}).format(t)}const Zt=[],Jt=[],Qt=[],en=[],An={LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]},wn={LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]},id={LISTEN_IN_NOISE:3,SHORT_STORY:2,LONG_STORY:1,ORDERING_SENTENCE:2};let oo=null,Ru=null,ft=null;function sd({counts:e,forceRefresh:t}={}){const n=Object.assign({},id,e||{}),o=ad(),u=kn(new Date(`${o}T00:00:00+09:00`).getTime()-864e5),r=JSON.stringify(n);if(!t&&Ru===o&&oo===r&&ft)return Object.assign(An,ft.today),Object.assign(wn,ft.yesterday?.selection||{LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]}),{today:An,yesterday:wn};const i={LISTEN_IN_NOISE:at(Zt,Math.max(0,Number(n.LISTEN_IN_NOISE)||0)),SHORT_STORY:at(Jt,Math.max(0,Number(n.SHORT_STORY)||0)),LONG_STORY:at(Qt,Math.max(0,Number(n.LONG_STORY)||0)),ORDERING_SENTENCE:at(en,Math.max(0,Number(n.ORDERING_SENTENCE)||0))};let s=null;return ft&&oo===r&&ft.yesterday&&ft.yesterday.date===u&&(s=ft.yesterday.selection),s||(s={LISTEN_IN_NOISE:at(Zt,Math.max(0,Number(n.LISTEN_IN_NOISE)||0)),SHORT_STORY:at(Jt,Math.max(0,Number(n.SHORT_STORY)||0)),LONG_STORY:at(Qt,Math.max(0,Number(n.LONG_STORY)||0)),ORDERING_SENTENCE:at(en,Math.max(0,Number(n.ORDERING_SENTENCE)||0))}),Object.assign(An,i),Object.assign(wn,s),Ru=o,oo=r,ft={today:i,yesterday:{date:u,countsKey:r,selection:s}},{today:An,yesterday:wn}}let Iu=!1,tn=null;async function ld(){try{const e={url:typeof document>"u"?require("url").pathToFileURL(__filename).href:Pn&&Pn.tagName.toUpperCase()==="SCRIPT"&&Pn.src||new URL("hooks.cjs.js",document.baseURI).href}&&void 0||"/",t=await fetch(`${e}data/allTrainingData.json`);return t.ok?await t.json():null}catch{return null}}async function cd(){if(!Iu)return tn||(tn=(async()=>{const e=await ld();if(!e){tn=null;try{window.dispatchEvent(new Event("speechear.data.error"))}catch{}return}try{for(const t of Object.keys(e||{})){const n=e[t]||[];for(const o of n){const u=o,r=String(u.training_type||t),i=String(u.category_main_code||u.category_main||u.category_0||""),s=String(u.category_sub_code||u.category_sub||u.category_1||""),d=Object.assign({},u,{training_type:r,category_0:i,category_1:s});r==="LISTEN_IN_NOISE"?Zt.push(d):r==="SHORT_STORY"?Jt.push(d):r==="LONG_STORY"?Qt.push(d):r==="ORDERING_SENTENCE"&&en.push(d)}}}catch{tn=null;try{window.dispatchEvent(new Event("speechear.data.error"))}catch{}return}try{window.dispatchEvent(new Event("speechear.data.updated"))}catch{}try{sd()}catch{}Iu=!0})(),tn)}async function dd(e=3e3){const t=cd();return Promise.race([t,new Promise(n=>setTimeout(n,e))])}const hd=[{key:"LISTEN_IN_NOISE",label:"\uC18C\uC74C \uD558 \uBB38\uC7A5 \uB4E3\uAE30",icon:"party-popper",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."}],fd={LISTEN_IN_NOISE:"listenInNoise",SHORT_STORY:"shortStory",LONG_STORY:"longStory",ORDERING_SENTENCE:"orderingSentence"};function pd(e){return hd.map(t=>{const n=fd[t.key];return n?{...t,label:e(`trainingType.${n}.title`),desc:e(`trainingType.${n}.desc`)}:t})}const Cd="0.37.0";function yd(e){return typeof window>"u"?"":nd.sanitize(e,{USE_PROFILES:{svg:!0,svgFilters:!0},FORBID_TAGS:["script","use"],FORBID_ATTR:["xlink:href","href"]})}function md(e){const[t,n]=l.useState(null),[o,u]=l.useState(null),[r,i]=l.useState(null),[s,d]=l.useState(null);return l.useEffect(()=>{if(!e||typeof e!="string"||!e.endsWith(".svg")){n(null),u(null),i(null);return}const p=e.split("/").pop();let f=e;p&&(e.startsWith("/")?f=no(e):/^(Logo|Symbol)/i.test(p)?f=no(`logo/${p}`):(/^https?:\/\//i.test(e)||e.startsWith("data:"),f=e)),n(f)},[e]),l.useEffect(()=>{if(!t)return;let p=!1;async function f(){try{let y=await fetch(t);y.ok||(y=await fetch(t));const c=y.headers.get("content-type")||"";if(p)return;if(c.includes("svg")){u("mask");return}if(c.startsWith("image/")){u("img");return}const m=await fetch(t);if(!m.ok)throw new Error("not ok");const S=await m.text();if(p)return;if(/^\s*<svg[\s>]/i.test(S)){const w=yd(S);if(!w){u("none");return}i(w),u("inline");return}u("none")}catch{p||u("none")}}return f(),()=>{p=!0}},[t]),l.useEffect(()=>{let p=!1,f=null;return o==="mask"&&t&&fetch(t).then(y=>{if(!y.ok)throw new Error("fetch failed");return y.blob()}).then(y=>{p||(f=URL.createObjectURL(y),d(f))}).catch(()=>{p||u("img")}),()=>{p=!0,f&&URL.revokeObjectURL(f),d(null)}},[o,t]),{iconToUse:t,mode:o,svgText:r,blobUrl:s}}function gd(e){const{icon:t,label:n,className:o,imgClassName:u,maskClassName:r,svgClassName:i,wrapperStyle:s,size:d}=e||{},p=o??"iconRenderer-icon",f=u??"iconRenderer-icon-image",y=r??"iconRenderer-icon-mask",c=i??"iconRenderer-icon-svg",m=typeof t=="string"?t:null,S=b0(m),{iconToUse:w,mode:_,svgText:g,blobUrl:k}=md(m),A=(I,$={})=>V.jsx("span",{className:p,style:s,...$,children:I}),T=(I,$={})=>V.jsx("img",{src:I,alt:typeof n=="string"?n:n?String(n):"",className:f,...$});if(!t)return null;if(typeof t!="string")return A(t);if(t==="none")return A(V.jsx("span",{className:c,dangerouslySetInnerHTML:{__html:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true"></svg>'}}),{"aria-hidden":"true"});if(S)try{return A(l.createElement(S,{className:c,size:typeof d=="number"?d:20}),{"aria-hidden":"true"})}catch{}if(w&&w.endsWith(".svg")){if(_==="mask"){const I={"--icon-url":k?`url(${k})`:`url(${w})`};return A(V.jsx("span",{className:y,style:I}),{"aria-hidden":"true"})}return _==="img"?A(T(w,{onError:I=>{I.currentTarget.onerror=null,I.currentTarget.style.display="none"}}),{"aria-hidden":"true"}):_==="inline"?A(V.jsx("span",{className:c,dangerouslySetInnerHTML:g?{__html:g}:void 0}),{"aria-hidden":"true"}):A(null,{"aria-hidden":"true"})}if(t.startsWith("/")||t.includes("/assets/")||t.match(/\.(png|jpg|jpeg|webp|gif)$/i))return T(no(t),{style:s,onError:I=>{I.currentTarget.onerror=null,I.currentTarget.style.display="none"}});const v=typeof d=="number"?d:20,D=`<svg width="${v}" height="${v}" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect x="3" y="3" width="18" height="18" rx="2" ry="2" style="fill:none;stroke:currentColor;stroke-width:2"/></svg>`;return A(V.jsx("span",{className:c,dangerouslySetInnerHTML:{__html:D}}),{"aria-hidden":"true"})}function ju(e){const{anchorRect:t,anchorEl:n,offset:o=20,edgeMargin:u=20,onClose:r,closeOnOutsideClick:i=!0,className:s="",role:d="dialog",ariaLabel:p="",children:f,backdrop:y=!1,isMobilePopup:c=!1,useBorder:m=!0,header:S}=e||{},w=l.useRef(null),[_,g]=l.useState({position:"fixed",left:0,top:-9999}),[k,A]=l.useState(!1),[T,v]=l.useState("bottom"),[D,I]=l.useState(!1),[$,G]=l.useState(!1),P=!t&&!n,Q=l.useCallback((B=!1)=>{if($&&c)return;const O=n?n.getBoundingClientRect():t;if(!O||!w.current)return;const ye=w.current,{offsetWidth:Z,offsetHeight:ee}=ye,M=window.innerWidth,j=window.innerHeight,ae=M-O.right,ne=O.left,q=O.top,Me=j-O.bottom;let X=0,he=0,H="top";if(q>=ee+o)H="top",he=O.top-o-ee,X=O.left+O.width/2-Z/2;else if(Me>=ee+o)H="bottom",he=O.bottom+o,X=O.left+O.width/2-Z/2;else if(ae>=Z+o)H="right",X=O.right+o,he=O.top+O.height/2-ee/2;else if(ne>=Z+o)H="left",X=O.left-o-Z,he=O.top+O.height/2-ee/2;else{const tt=Math.max(q,Me,ae,ne);tt===q?(H="top",he=O.top-o-ee,X=O.left+O.width/2-Z/2):tt===Me?(H="bottom",he=O.bottom+o,X=O.left+O.width/2-Z/2):tt===ae?(H="right",X=O.right+o,he=O.top+O.height/2-ee/2):(H="left",X=O.left-o-Z,he=O.top+O.height/2-ee/2)}const He=Number(u)||8;X=Math.min(Math.max(X,He),M-Z-He),he=Math.min(Math.max(he,He),j-ee-He);const ze=Math.round(X),je=Math.round(he);B&&w.current?(w.current.style.left=`${ze}px`,w.current.style.top=`${je}px`,w.current.dataset.placement=H):(v(H||T),g({position:"fixed",left:ze,top:je}),I(!0))},[$,c,n,t,o,u,T]);l.useLayoutEffect(()=>{if(P)return;if($&&c){g({position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 40px)",maxWidth:"calc(100% - 40px)"}),I(!0);return}Q();const B=requestAnimationFrame(()=>Q());return()=>cancelAnimationFrame(B)},[t,n,o,f,u,P,$,c,Q]),l.useEffect(()=>{if(P||$&&c||!w.current||typeof ResizeObserver>"u")return;const B=new ResizeObserver(()=>{t&&Q()});return B.observe(w.current),()=>B.disconnect()},[t,f,u,P,$,c,Q]),l.useEffect(()=>{if(P||$&&c)return;const B=()=>Q(!0);return window.addEventListener("resize",B),document.addEventListener("scroll",B,{passive:!0,capture:!0}),()=>{window.removeEventListener("resize",B),document.removeEventListener("scroll",B,{capture:!0})}},[t,o,f,u,P,$,c,Q]),l.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const B=window.matchMedia("(max-width: 768px)"),O=()=>G(!!B.matches);O();try{B.addEventListener?B.addEventListener("change",O):B.addListener(O)}catch{try{B.addListener(O)}catch{}}return()=>{try{B.removeEventListener?B.removeEventListener("change",O):B.removeListener(O)}catch{}}},[]);const Y=l.useRef(!1),W=l.useCallback((B=!1)=>{if(!(k||Y.current)){if(Y.current=!0,B){A(!0);try{r&&r()}catch{}return}A(!0),setTimeout(()=>{r&&r()},200)}},[k,r,A]);l.useEffect(()=>{const B=Z=>{const ee=w.current;if(!ee)return;const M=Z.target;if(M&&!ee.contains(M)){try{if(M.closest&&M.closest("[data-tooltip-ignore]"))return}catch{}i&&W(!0)}},O=Z=>{const ee=w.current;if(!ee)return;const M=Z.target;if(M&&!ee.contains(M)){try{if(M.closest&&M.closest("[data-tooltip-ignore]"))return}catch{}i&&W(!0)}},ye=Z=>{if(Z.key==="Escape"){Z.stopPropagation(),W();return}if(Z.key==="Tab"){const ee=w.current;if(!ee)return;const M=ee.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(!M||M.length===0)return;const j=M[0],ae=M[M.length-1],ne=document.activeElement;Z.shiftKey?ne===j&&(Z.preventDefault(),ae.focus()):ne===ae&&(Z.preventDefault(),j.focus())}};return document.addEventListener("pointerdown",B,!0),document.addEventListener("click",O,!0),document.addEventListener("keydown",ye),()=>{document.removeEventListener("pointerdown",B,!0),document.removeEventListener("click",O,!0),document.removeEventListener("keydown",ye)}},[r,i,W]),l.useEffect(()=>{const B=()=>{W(!0)};return typeof document<"u"&&document.addEventListener("speechear-close-tooltips",B),()=>{typeof document<"u"&&document.removeEventListener("speechear-close-tooltips",B)}},[W]);const F=V.jsxs("div",{ref:w,className:`tooltip-content ${m?"tooltip-content--bordered":""} ${k?"is-closing":""} ${s} ${$&&c?"is-mobile":""}`,role:d,"aria-label":p||void 0,style:P?{}:{..._,visibility:D?"visible":"hidden"},tabIndex:-1,"data-placement":T,"data-left":P?"":_.left,"data-top":P?"":_.top,"data-anchor-left":t?Math.round(t.left):"","data-anchor-top":t?Math.round(t.top):"","data-anchor-width":t?Math.round(t.width):"","data-anchor-height":t?Math.round(t.height):"",children:[S!=null&&V.jsx("div",{className:"tooltip-content__header h5",children:S}),f]});if(P||typeof document>"u")return F;if(y||$&&c){const B=V.jsxs("div",{className:"tooltip-portal",children:[V.jsx("div",{className:"tooltip-backdrop",onClick:()=>{i&&W(!0)}}),F]});return Bo.createPortal(B,document.body)}return Bo.createPortal(F,document.body)}function _d(e){const{anchorRect:t,text:n,offset:o=8,onClose:u,className:r="",ariaLabel:i}=e||{};return n?V.jsx(ju,{anchorRect:t,offset:o,onClose:u,closeOnOutsideClick:!1,className:`tooltip-info ${r}`,ariaLabel:i||n,children:V.jsx("div",{className:"tooltip-info__content body-3",children:n})}):null}function Pu(e){const{anchorRect:t,title:n,items:o,activeIndex:u=-1,showIndex:r=!0,onClose:i,offset:s=12}=e||{},d=Array.isArray(o)?o:o?[o]:[];return!d.length&&!n?null:V.jsx(ju,{anchorRect:t,offset:s,onClose:i,closeOnOutsideClick:!0,useBorder:!1,className:"tooltip-description",children:V.jsxs("div",{className:"tooltip-description__box",children:[n&&V.jsx("span",{className:"tooltip-description__title body-2",children:n}),V.jsx("ol",{className:"tooltip-description__items",children:d.map((p,f)=>V.jsxs("li",{className:`tooltip-description__item body-3${f===u?" tooltip-description__item--active":""}`,children:[r&&d.length>1&&V.jsxs("span",{className:"tooltip-description__index button-1",children:[f+1,"."]}),V.jsx("span",{children:p})]},f))})]})})}function Ed(e){const{size:t=48,type:n,htmlType:o,href:u,target:r,rel:i,icon:s,rightIcon:d,label:p,count:f,subLabel:y,children:c,ariaLabel:m,variant:S="default",align:w="center",selected:_,toggleable:g=!1,disabled:k=!1,useLabel:A=!0,useBorder:T=!0,useBG:v=!0,useDisabledCovered:D=!1,useDisabledInvisible:I=!1,width:$,minWidth:G,onClick:P,onDisabledClick:Q,showTooltipInfo:Y=!1,tooltipInfoText:W=null,tooltipDescription:F=null,iconSize:B="medium",iconColor:O,shape:ye="rounded",color:Z,className:ee,...M}=e,j=typeof t=="string"&&isNaN(Number(t))?t.toLowerCase():String(Number(t)||48),ae=j.match(/^\d+$/)?`button${j}`:`button-${j}`,ne=Number(t),q=!isNaN(ne)&&ne<40?"button-2":"button-1",Me=p??c,X=k||!!M.disabled,he=X?D?"disabled-covered":I?"disabled-invisibled":"disabled":S,H=he?`button--variant-${he}`:"",He=w?`button--align-${w}`:"",ze=ye?`button--shape-${ye}`:"",je=typeof O=="string"&&O.startsWith("--")?`var(${O})`:O,tt={...$?{width:typeof $=="number"?`${$}px`:$}:{},...G?{minWidth:typeof G=="number"?`${G}px`:G}:{},...T?{}:{"--button-border":X?"0":"1px solid transparent"},...je?{"--button-icon-color":je}:{},...Z?{"--color-main":Z}:{}},Ve=A===!1?"":Me,te=Array.isArray(Ve)?Ve.length>0:!!Ve,nt=!!d,oe=n??(te||s||nt?"bar":"dot"),pt=`${ae}--${oe}`,pe=l.useRef(null),E=l.useRef(X),[z,L]=l.useState(!!_),[K,ie]=l.useState(!1),[Pe,ve]=l.useState(null),be=l.useCallback(()=>ie(!1),[]);l.useEffect(()=>{(Y||F)&&X&&K&&(ie(!1),ve(null))},[X,Y,F,K]),l.useEffect(()=>{typeof _=="boolean"&&L(_)},[_]),l.useEffect(()=>{if(E.current&&!X&&pe.current){const ue=pe.current;ue.blur(),ue.style.pointerEvents="none";const Xe=requestAnimationFrame(()=>{requestAnimationFrame(()=>{pe.current&&(pe.current.style.pointerEvents="")})});return()=>cancelAnimationFrame(Xe)}E.current=X},[X]);const Ne=typeof _=="boolean"?!!_:z,Se=g||typeof _=="boolean"?Ne?"true":"false":void 0,Ct=Ia("button",ae,pt,H,He,ze,Ne?"is-selected":null,v?null:"button--no-bg",ee),We=`button__icon button__icon--${B}`,ot=Array.isArray(y)?y:y!==void 0?[y]:[],Ue=()=>{if(Array.isArray(Ve))return Ve.map((Xe,It)=>{const Mt=ot[It];return V.jsxs("span",{className:`button__label-text${Mt!==void 0?" button__label-text--has-sub":""}`,children:[Xe,Mt!==void 0&&V.jsx("span",{className:"button__sub-label-text caption-1",children:Mt})]},It)});const ue=y!==void 0;return V.jsxs("span",{className:`button__label-text${ue?" button__label-text--has-sub":""}`,children:[Ve,f!=null&&V.jsx("span",{className:"button__count",children:f}),ue&&V.jsx("span",{className:"button__sub-label-text caption-1",children:y})]})},$e=ue=>{X||(typeof M.onMouseLeave=="function"&&M.onMouseLeave(ue),typeof _!="boolean"&&L(!1),ue.currentTarget.blur())},lt=ue=>{if(X){Q?.(ue);return}typeof _!="boolean"&&g&&L(Xe=>!Xe),P?.(ue)},yt=l.useCallback(()=>{!X&&(Y||F)&&(ie(!0),ve(pe.current?.getBoundingClientRect()??null))},[X,Y,F]),Rt=l.useCallback(()=>{(Y||F)&&(ie(!1),ve(null))},[Y,F]),me={...M};delete me.disabled,delete me.className,delete me.faded,delete me.useFaded,delete me.loading,delete me.onMouseLeave,delete me.onPointerEnter,delete me.onPointerLeave,delete me.onFocus,delete me.onBlur,X&&(Object.keys(me).forEach(ue=>{/^on[A-Z]/.test(ue)&&typeof me[ue]=="function"&&delete me[ue]}),me["aria-disabled"]="true");const At=(typeof Y=="string"?Y:null)??(typeof W=="string"?W:null)??(typeof m=="string"?m:null)??(typeof Me=="string"?Me:null)??void 0,wt=typeof m=="string"?m:typeof Me=="string"?Me:At,ut=(ue,Xe)=>V.jsx(gd,{icon:ue,label:Xe??wt,className:We,imgClassName:"button__icon-img",maskClassName:"button__icon-mask",svgClassName:"button__icon-svg"}),ct=()=>oe==="dot"?V.jsxs(V.Fragment,{children:[ut(s),te&&V.jsx("span",{className:`button__label ${q}`,children:Ue()})]}):w==="center"&&s?V.jsxs(V.Fragment,{children:[V.jsxs("span",{className:"button__center-group",children:[V.jsx("span",{className:"button__left",children:ut(s)}),te&&V.jsx("span",{className:`button__label ${q}`,children:Ue()})]}),nt&&V.jsx("span",{className:"button__right",children:ut(d)})]}):V.jsxs(V.Fragment,{children:[s&&V.jsx("span",{className:"button__left",children:ut(s,m??Me)}),te&&V.jsx("span",{className:`button__label ${q}`,children:Ue()}),nt&&V.jsx("span",{className:"button__right",children:ut(d)})]}),Ke=!!u&&!X;return V.jsxs(V.Fragment,{children:[V.jsx(Ke?"a":"button",{...me,ref:pe,...Ke?{href:u,target:r,rel:i??(r==="_blank"?"noreferrer":void 0)}:{type:o,disabled:X&&!Q},className:Ct,"aria-pressed":Se,"aria-label":wt,"aria-disabled":Ke&&X?!0:void 0,style:tt,onClick:lt,onMouseLeave:$e,onPointerEnter:ue=>{yt(),!X&&typeof M.onPointerEnter=="function"&&M.onPointerEnter(ue)},onPointerLeave:ue=>{Rt(),!X&&typeof M.onPointerLeave=="function"&&M.onPointerLeave(ue)},onFocus:ue=>{yt(),!X&&typeof M.onFocus=="function"&&M.onFocus(ue)},onBlur:ue=>{$e(ue),Rt(),!X&&typeof M.onBlur=="function"&&M.onBlur(ue)},children:ct()}),K&&F?V.jsx(Pu,{anchorRect:Pe,title:F.title,items:F.items,onClose:be}):K&&At?V.jsx(_d,{anchorRect:Pe,text:At,onClose:be}):null]})}function $u(){const[e,t]=l.useState(null),n=l.useCallback(r=>t(r.getBoundingClientRect()),[]),o=l.useCallback(()=>t(null),[]),u=l.useCallback(r=>{const i=r.getBoundingClientRect();t(s=>s?null:i)},[]);return{anchorRect:e,isOpen:e!=null,openAt:n,close:o,toggleAt:u}}function bd(e){const[t,n]=l.useState(null),[o,u]=l.useState(null),r=l.useRef(null);l.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]);const i=l.useCallback((d,p)=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{n(d),u(p)},e)},[e]),s=l.useCallback(()=>{r.current&&clearTimeout(r.current),n(null),u(null)},[]);return{payload:t,anchorRect:o,openAfterDelay:i,close:s}}function Sd({title:e,items:t}){const{t:n}=gt.useTranslation(),{anchorRect:o,openAt:u,close:r}=$u();return V.jsxs(V.Fragment,{children:[V.jsx(Ed,{size:24,type:"dot",icon:"info",variant:"transparent-gray",useBorder:!1,selected:!!o,ariaLabel:n("common.info","\uC124\uBA85"),onPointerEnter:i=>u(i.currentTarget),onPointerLeave:r,onFocus:i=>u(i.currentTarget),onBlur:r}),o&&V.jsx(Pu,{title:e,items:t,showIndex:t.length>1,anchorRect:o,onClose:r})]})}function Fu(){const{t:e}=gt.useTranslation();return l.useMemo(()=>({difficulty:e("wordSearch.filter.difficulty","\uB4F1\uAE09"),syllables:e("wordSearch.filter.syllables","\uC74C\uC808 \uC218"),syllable5plus:e("wordSearch.filter.syllable5plus","5\uC74C\uC808 \uC774\uC0C1"),partOfSpeech:e("wordSearch.filter.partOfSpeech","\uD488\uC0AC"),wordType:e("wordSearch.filter.wordType","\uC720\uD615"),posMap:{[e("wordSearch.filter.pos.noun","\uCCB4\uC5B8(\uBA85\uC0AC, \uC218\uC0AC)")]:["\uBA85","\uC218"],[e("wordSearch.filter.pos.verb","\uC6A9\uC5B8(\uB3D9\uC0AC, \uD615\uC6A9\uC0AC)")]:["\uB3D9","\uD615"],[e("wordSearch.filter.pos.modifier","\uC218\uC2DD\uC5B8(\uBD80\uC0AC, \uAD00\uD615\uC0AC)")]:["\uBD80","\uAD00"]},typeMap:{[e("wordSearch.filter.type.native","\uACE0\uC720\uC5B4")]:"\uACE0\uC720",[e("wordSearch.filter.type.sino","\uD55C\uC790\uC5B4")]:"\uD55C\uC790",[e("wordSearch.filter.type.foreign","\uC678\uB798\uC5B4")]:"\uC678\uB798",[e("wordSearch.filter.type.mixed","\uD63C\uC885\uC5B4")]:"\uD63C\uC885"}}),[e])}function Hu(e,t,n){return{label:t.difficulty,items:[1,2,3,4].map(o=>e("wordSearch.filter.grade",{n:o})),multiple:!0,allOption:!0,allLabel:n?.allLabel,labelAction:n?.labelAction}}function zu(e){return{label:e.partOfSpeech,items:Object.keys(e.posMap),multiple:!0,allOption:!0}}function Vu(e){return{label:e.wordType,items:Object.keys(e.typeMap),multiple:!0,allOption:!0}}function kd(e,t){return{label:t.syllables,items:[e("wordSearch.filter.syllable",{n:1}),e("wordSearch.filter.syllable",{n:2}),e("wordSearch.filter.syllable",{n:3}),e("wordSearch.filter.syllable",{n:4}),t.syllable5plus],multiple:!0,allOption:!0}}function Ad(e,t){const n=[e("wordPairs.filter.onlyHasImage","\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC")];return t?.includeStructure&&n.push(e("wordPairs.filter.onlySameStructure","\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC")),{label:e("wordPairs.filter.selectLabel","\uC120\uD0DD"),items:n,multiple:!0,labelAction:t?.labelAction}}function wd(e,t){const{label:n,headValue:o,midValue:u,tailValue:r,includeMid:i=!0,headDisabled:s,midDisabled:d,tailDisabled:p,allOptionDisabled:f,groupLabel:y,labelAction:c}=t;return{label:n,...y?{groupLabel:y}:{},...c?{labelAction:c}:{},allOption:!0,allLabel:e("wordSearch.filter.positionAny",{defaultValue:"\uBB34\uAD00"}),...f?{allOptionDisabled:f}:{},items:[{value:o,displayLabel:e("wordSearch.filter.positionHead",{defaultValue:"\uC5B4\uB450"}),disabled:s},...i?[{value:u,displayLabel:e("wordSearch.filter.positionMid",{defaultValue:"\uC5B4\uC911"}),disabled:d}]:[],{value:r,displayLabel:e("wordSearch.filter.positionTail",{defaultValue:"\uC5B4\uB9D0"}),disabled:p}]}}function Md(e,t,n){if(t===bt){const{[n]:r,...i}=e;return i}const o=e[n]??[],u=o.includes(t)?o.filter(r=>r!==t):[...o,t];if(u.length===0){const{[n]:r,...i}=e;return i}return{...e,[n]:u}}Object.fromEntries(Object.entries(Jr).map(([e,{nucleus:t}])=>[e,t]));const Nd={\uACE0\uC720\uC5B4:"\uACE0\uC720",\uD55C\uC790\uC5B4:"\uD55C\uC790",\uC678\uB798\uC5B4:"\uC678\uB798",\uD63C\uC885\uC5B4:"\uD63C\uC885"},Td={"\uCCB4\uC5B8(\uBA85\uC0AC,\uC218\uC0AC)":["\uBA85","\uC218"],"\uC6A9\uC5B8(\uB3D9\uC0AC,\uD615\uC6A9\uC0AC)":["\uB3D9","\uD615"],"\uC218\uC2DD\uC5B8(\uBD80\uC0AC,\uAD00\uD615\uC0AC)":["\uBD80","\uAD00"]},xd={difficulty:"\uB09C\uC774\uB3C4 \uB4F1\uAE09",syllables:"\uC74C\uC808 \uC218",syllable5plus:"5\uC74C\uC808 \uC774\uC0C1",partOfSpeech:"\uD488\uC0AC",wordType:"\uC720\uD615",posMap:Td,typeMap:Nd};function Bd(e,t,n=xd){const o=t[n.difficulty];if(o?.length&&!o.some(s=>e.grade===s.replace(/\D/g,"")))return!1;const u=t[n.syllables];if(u?.length){const s=e.syllables??0;if(!u.some(d=>d===n.syllable5plus?s>=5:s===parseInt(d)))return!1}const r=t[n.partOfSpeech];if(r?.length&&!r.flatMap(s=>n.posMap[s]??[s]).some(s=>(e.pos??"").includes(s)))return!1;const i=t[n.wordType];return!(i?.length&&!i.some(s=>e.wordType===n.typeMap[s]))}const it=(e,t)=>t.map(n=>({jamos:[n],tooltip:e})),Ee=(e,t)=>({jamos:[...e],tooltip:t}),uo={cho:[it("\uC591\uC21C\uC74C",["\u3142","\u3143","\u314D","\u3141"]),it("\uCE58\uC870\uC74C",["\u3137","\u3138","\u314C","\u3134","\u3139"]),it("\uCE58\uC870\uC74C",["\u3145","\u3146"]),it("\uACBD\uAD6C\uAC1C\uC74C",["\u3148","\u3149","\u314A"]),it("\uC5F0\uAD6C\uAC1C\uC74C",["\u3131","\u3132","\u314B"]),it("\uC131\uBB38\uC74C",["\u314E"])],jung:[[Ee("\u3163","\uC804\uC124 \uACE0\uBAA8\uC74C"),Ee("\u315F","\uC804\uC124 \uACE0\uBAA8\uC74C \xB7 w\uD65C\uC74C"),Ee("\u3162","\uC804\uC124 \uACE0\uBAA8\uC74C \xB7 \u0270\uD65C\uC74C")],[Ee("\u3161","\uD6C4\uC124 \uACE0\uBAA8\uC74C \uD3C9\uC21C")],[Ee("\u315C","\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C"),Ee("\u3160","\uD6C4\uC124 \uACE0\uBAA8\uC74C \uC6D0\uC21C \xB7 j\uD65C\uC74C")],[Ee("\u3154\u3150","\uC804\uC124 \uC911\uBAA8\uC74C"),Ee("\u3156\u3152","\uC804\uC124 \uC911\uBAA8\uC74C \xB7 j\uD65C\uC74C"),Ee("\u3159\u315A\u315E","\uC804\uC124 \uC911\uBAA8\uC74C \xB7 w\uD65C\uC74C")],[Ee("\u3153","\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C"),Ee("\u3155","\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C \xB7 j\uD65C\uC74C"),Ee("\u315D","\uD6C4\uC124 \uC911\uBAA8\uC74C \uD3C9\uC21C \xB7 w\uD65C\uC74C")],[Ee("\u3157","\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C"),Ee("\u315B","\uD6C4\uC124 \uC911\uBAA8\uC74C \uC6D0\uC21C \xB7 j\uD65C\uC74C")],[Ee("\u314F","\uC800\uBAA8\uC74C"),Ee("\u3151","\uC800\uBAA8\uC74C \xB7 j\uD65C\uC74C"),Ee("\u3158","\uC800\uBAA8\uC74C \xB7 w\uD65C\uC74C")]],jong:[it("\uC591\uC21C\uC74C",["\u3142","\u3141"]),it("\uCE58\uC870\uC74C",["\u3137","\u3134","\u3139"]),it("\uC5F0\uAD6C\uAC1C\uC74C",["\u3131","\u3147"])]},Dd=[...ke],vd=[...rt],Od=Fe.filter(e=>e!==""),st=e=>e===Qe?[]:Array.from(e),Qe="__NO_CODA__",Uu=[1,2,3,4],et=5,Ld=12,Gu="SYL_",ro=e=>`${Gu}${e}`,Rd=e=>Number(e.slice(Gu.length));function ao(e){return e>=et?Array.from({length:Ld-et+1},(t,n)=>et+n):[e]}const Yu={cho:Dd,jung:vd,jong:Od},io=e=>e.map(t=>t.map(({jamos:n,tooltip:o})=>({v:n.join(""),tooltip:o}))),so={cho:io(uo.cho),jung:io(uo.jung),jong:io(uo.jong)},qu={};so.jung.flat().forEach(({v:e})=>{for(const t of st(e))qu[t]=e});const Id=new Set(so.cho.flat().map(e=>e.v));function Wu(e,t){return e==="cho"?Id.has(t)?t:null:e==="jung"?qu[t]??t:qo(t)}function Ku(e,t,n){if(e==="jung"){const o=st(t);return n&&o.includes(n)?n:o[0]??t}return t}function Xu(e,t,n){const o=(u,r)=>r?u==="jong"&&r===Qe?Qe:t==="pron"?Wu(u,r):Ku(u,r,u==="jung"?n:null):null;return{...e,cho:o("cho",e.cho),jung:o("jung",e.jung),jong:o("jong",e.jong)}}const lo={cho:null,jung:null,jong:null,syllable:null},jd="wt_filter",Zu=e=>`wt_filter_${e}`;function Ju(e){try{const t=localStorage.getItem(Zu(e))??localStorage.getItem(jd);if(t)return JSON.parse(t)}catch{}return null}function Pd(e){const t=e;return t?.composition?{cho:t.composition.cho??null,jung:t.composition.jung??null,jong:t.composition.jong??null,syllable:t.composition.syllable??null}:t?.choseong?{...lo,cho:t.choseong}:lo}function $d(e,t,n){const{t:o,i18n:u}=gt.useTranslation(),[r]=l.useState(()=>n?.resetOnMount?null:Ju(e)),i=r?.contrastCount,s=typeof i=="number"&&Number.isFinite(i)?i:1,[d,p]=l.useState(Math.min(5,Math.max(1,s))),[f,y]=l.useState(r?.phonemeView==="pron"?"pron":r?.phonemeView==="direct"?"direct":"char"),[c,m]=l.useState(()=>Pd(r)),S=l.useCallback(()=>t.requireSyllable?{cho:"\u3131",jung:"\u314F",jong:Qe,syllable:t.fixedSyllable??null}:{cho:null,jung:null,jong:t.fixedNoCoda?Qe:null,syllable:t.fixedSyllable??null},[t.requireSyllable,t.fixedSyllable,t.fixedNoCoda]);l.useEffect(()=>{!t.requireSyllable&&t.fixedSyllable==null&&!t.fixedNoCoda||m(E=>E.cho||E.jung||E.syllable!=null||E.jong?E:S())},[]);const w=l.useMemo(()=>_e(c.cho)||_e(c.jung)||_e(c.jong)?"count":"random",[c.cho,c.jung,c.jong]),_=l.useRef(f==="char"?c.jung:null);l.useEffect(()=>{f==="char"&&(_.current=c.jung)},[f,c.jung]);const[g,k]=l.useState(n?.resetOnMount?!!n?.defaultImageOnly:r?.excludeNoImage??!0),[A,T]=l.useState(n?.resetOnMount?!1:r?.sameStructureOnly??!0),[v,D]=l.useState(Array.isArray(r?.gradeFilter)?r.gradeFilter:[]),[I,$]=l.useState(Array.isArray(r?.posFilter)?r.posFilter:[]),[G,P]=l.useState(Array.isArray(r?.wordTypeFilter)?r.wordTypeFilter:[]),Q=l.useRef(n?.resetKey);l.useEffect(()=>{Q.current!==n?.resetKey&&(Q.current=n?.resetKey,m(S()),k(!1),T(!1),D([]),$([]),P([]),p(1))},[n?.resetKey]);const Y=Fu(),[W,F]=l.useState({cho:new Set,jung:new Set,jong:new Set,syllable:new Set}),[B,O]=l.useState(!1),[ye,Z]=l.useState(null),ee=1,M=Math.max(1,[c.cho,c.jung,c.jong].filter(Boolean).length);l.useEffect(()=>{d<M&&p(M)},[M,d]);const[j,ae]=l.useState(e);l.useEffect(()=>{if(j!==e){if(!n?.resetOnMount){const E=Ju(e),z=typeof E?.contrastCount=="number"&&Number.isFinite(E.contrastCount)?E.contrastCount:1;p(Math.min(5,Math.max(1,z))),m(E?.composition??S()),k(E?.excludeNoImage??!0),T(E?.sameStructureOnly??!0),y(E?.phonemeView==="pron"?"pron":"char"),D(Array.isArray(E?.gradeFilter)?E.gradeFilter:[]),$(Array.isArray(E?.posFilter)?E.posFilter:[]),P(Array.isArray(E?.wordTypeFilter)?E.wordTypeFilter:[])}ae(e)}},[e,j,n?.resetOnMount]),l.useEffect(()=>{if(!n?.resetOnMount&&j===e)try{localStorage.setItem(Zu(e),JSON.stringify({contrastCount:d,composition:c,excludeNoImage:g,sameStructureOnly:A,phonemeView:f,gradeFilter:v,posFilter:I,wordTypeFilter:G}))}catch{}},[n?.resetOnMount,e,j,d,c,g,A,f,v,I,G]);const[ne,q]=l.useState(0);Oo("wordpool:update",()=>q(E=>E+1));const Me=l.useRef(u.language);l.useEffect(()=>{Me.current!==u.language&&(Me.current=u.language,q(E=>E+1))},[u.language]),l.useEffect(()=>{if(!t.choseong)return;let E=!1;return Ra({difficulty:w,excludeNoImage:g}).then(z=>{E||(F(z),z.cho.size+z.jung.size+z.jong.size>0&&O(!0))}).catch(()=>{E||F({cho:new Set,jung:new Set,jong:new Set,syllable:new Set})}),()=>{E=!0}},[t.choseong,w,g,ne]),l.useEffect(()=>{let E=!1;const z=c,L=z.cho?st(z.cho):null,K=z.jung?st(z.jung):null,ie=z.jong===Qe,Pe=ie?null:z.jong?st(z.jong):null,ve=z.syllable!=null?ao(z.syllable):null,be=!!(L||K||Pe||ie||ve);return La({difficulty:t.difficulty?w:null,contrastCount:t.difficulty?d:1,composition:t.choseong&&be?{cho:L,jung:K,jong:Pe,jongNone:ie,syllable:ve}:null,excludeNoImage:g,sameStructureOnly:A,phonemeView:f==="pron"?"pron":"char",grade:v.length>0?v:null}).then(Ne=>{E||Z(Ne)}).catch(()=>{E||Z(null)}),()=>{E=!0}},[t.choseong,t.difficulty,w,d,c,f,g,A,ne,v]),l.useEffect(()=>{B&&m(E=>{const z={...E};let L=!1;return["cho","jung","jong"].forEach(K=>{const ie=E[K];!ie||ie===Qe||st(ie).some(Pe=>W[K].has(Pe))||(z[K]=null,L=!0)}),E.syllable!=null&&t.fixedSyllable==null&&(E.syllable>=et?[...W.syllable].some(K=>K>=et)||(z.syllable=null,L=!0):(!W.syllable.has(E.syllable)||E.syllable<ee)&&(z.syllable=null,L=!0)),L?z:E})},[W,B,ee,t.fixedSyllable]);const X=l.useMemo(()=>{const E=z=>{const L=new Set;for(const K of Yu[z])W[z].has(K)&&L.add(K);return L};return{cho:E("cho"),jung:E("jung"),jong:E("jong")}},[W]),he=l.useMemo(()=>({exact:new Set(Uu.filter(E=>W.syllable.has(E))),min:[...W.syllable].some(E=>E>=et)}),[W]),H=l.useMemo(()=>({diffPhonemeCount:o("training.contrast.diffPhonemeCount",{defaultValue:"\uB2E4\uB978 \uC74C\uC18C\uC758 \uCD1D \uAC2F\uC218"}),composition:o("wordPairs.composition","\uC815\uB2F5 \uB2E8\uC5B4 \uAD6C\uC131"),syllableCount:o("wordPairs.syllableCount","\uC74C\uC808 \uC218"),onset:o("wordPairs.onset","\uCD08\uC131"),vowel:o("wordPairs.vowel","\uBAA8\uC74C"),coda:o("wordPairs.coda","\uC885\uC131"),phonemeGroup:o("training.filter.phonemeGroup",{defaultValue:"\uD6C8\uB828 \uC74C\uC808"}),trainOnset:o("training.filter.trainOnset",{defaultValue:"\uCD08\uC131"}),trainVowel:o("training.filter.trainVowel",{defaultValue:"\uBAA8\uC74C"}),trainCoda:o("training.filter.trainCoda",{defaultValue:"\uC885\uC131"}),random:o("training.filter.random","\uBB34\uC791\uC704"),exclude:o("wordSearch.filter.exclude","\uC81C\uC678"),selectLabel:o("training.filter.selectSection",{defaultValue:"\uC120\uD0DD"}),none:o("common.none","\uC5C6\uC74C"),noImage:o("wordSearch.filter.excludeNoImage","\uC774\uBBF8\uC9C0 \uC5C6\uC74C"),excludeImage:o("training.filter.excludeImage",{defaultValue:"\uC774\uBBF8\uC9C0 \uC788\uB294 \uB2E8\uC5B4\uB9CC"}),sameStructure:o("training.filter.sameStructure",{defaultValue:"\uC74C\uC18C \uAD6C\uC870 \uAC19\uC740 \uB2E8\uC5B4\uB9CC"}),noLimit:o("training.filter.noLimit",{defaultValue:"\uBB34\uAD00"}),codaExclude:o("training.filter.codaExclude",{defaultValue:"\uC81C\uC678"}),gradeLabel:o("training.filter.gradeLabel",{defaultValue:"\uB09C\uC774\uB3C4 \uB4F1\uAE09"})}),[o]),He=l.useMemo(()=>({[H.trainOnset]:"cho",[H.trainVowel]:"jung",[H.trainCoda]:"jong"}),[H]),ze=l.useCallback((E,z)=>l.createElement(Sd,{title:z,items:E}),[]),je=l.useMemo(()=>[o("training.filter.excludeImageInfo",{defaultValue:"\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."}),o("training.filter.sameStructureInfo",{defaultValue:"\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."})],[o]),tt=l.useMemo(()=>{const E=[];if(t.choseong){const z={value:Qe,displayLabel:H.codaExclude},L=t.fixedNoCoda===!0,K=(ie,Pe)=>{const ve=L&&ie==="jong",be={label:Pe,groupLabel:H.phonemeGroup,allOption:!t.requireSyllable,allLabel:H.noLimit,allOptionDisabled:ve};if(f==="pron"){const Se=so[ie].map(Ct=>Ct.map(({v:We,tooltip:ot})=>{const Ue=st(We),$e=ve||!Ue.some(lt=>W[ie].has(lt));return Ue.length>1?{value:We,labels:Ue,tooltip:ot,disabled:$e}:{value:We,tooltip:ot,disabled:$e}}));return ie==="jong"&&!t.requireCoda&&Se.unshift([z]),{...be,groups:Se}}const Ne=Yu[ie].map(Se=>!ve&&X[ie].has(Se)?Se:{value:Se,disabled:!0});return{...be,items:ie==="jong"&&!t.requireCoda?[z,...Ne]:Ne}};E.push(K("cho",H.trainOnset)),E.push(K("jung",H.trainVowel)),E.push(K("jong",H.trainCoda))}if(E.push({...Hu(o,Y,{labelAction:ze([o("wordPairs.filter.difficultyInfo",{defaultValue:"\uAD6D\uB9BD\uAD6D\uC5B4\uC6D0\uC758 \uAE30\uCD08 \uC5B4\uD718 \uB4F1\uAE09\uC774 \uACB0\uACFC\uC5D0 \uBC18\uC601\uB429\uB2C8\uB2E4."})])}),label:H.gradeLabel}),t.partOfSpeech&&E.push(zu(Y)),t.wordType&&E.push(Vu(Y)),t.choseong||t.fixedSyllable!=null){const z=t.fixedSyllable;E.push({label:H.syllableCount,items:[...Uu.map(L=>({value:ro(L),displayLabel:o("wordPairs.syllableN",{n:L,defaultValue:"{{n}}\uC74C\uC808"}),disabled:z!=null?L!==z:!he.exact.has(L)||L<ee})),{value:ro(et),displayLabel:o("wordPairs.syllableNPlus",{n:et,defaultValue:"{{n}}\uC74C\uC808 \uC774\uC0C1"}),disabled:z!=null?et!==z:!he.min}],allOption:!0,allOptionDisabled:z!=null})}return t.choseong?E.push({label:H.exclude,displayLabel:H.selectLabel,multiple:!0,items:[H.excludeImage,H.sameStructure],labelAction:ze(je)}):E.push({label:H.exclude,displayLabel:H.selectLabel,multiple:!0,items:[H.excludeImage],labelAction:ze([je[0]])}),E},[t.choseong,t.partOfSpeech,t.wordType,t.requireSyllable,t.fixedSyllable,t.fixedNoCoda,t.requireCoda,ee,X,W,f,he,H,o,ze,je,Y]),Ve={...t.difficulty?{[H.diffPhonemeCount]:String(d)}:{},...(t.choseong||t.fixedSyllable!=null)&&c.syllable!=null?{[H.syllableCount]:ro(c.syllable)}:{},...t.choseong&&c.cho?{[H.trainOnset]:c.cho}:{},...t.choseong&&c.jung?{[H.trainVowel]:c.jung}:{},...t.choseong&&c.jong?{[H.trainCoda]:c.jong}:{},[H.exclude]:[...g?[H.excludeImage]:[],...A?[H.sameStructure]:[]],[H.gradeLabel]:v.map(E=>o("wordSearch.filter.grade",{n:Number(E),defaultValue:"{{n}}\uB4F1\uAE09"})),...t.partOfSpeech?{[Y.partOfSpeech]:I}:{},...t.wordType?{[Y.wordType]:G}:{}},te=l.useCallback((E,z)=>{if(z===H.diffPhonemeCount){const L=Number(E);L>=1&&p(L)}else if(z===H.exclude)E===H.excludeImage?k(L=>!L):E===H.sameStructure&&T(L=>!L);else if(z===H.syllableCount)m(L=>{if(!E||E===bt)return{...L,syllable:null};const K=Rd(E);return{...L,syllable:L.syllable===K?null:K}});else if(z===H.gradeLabel){if(!E||E===bt){D([]);return}const L=E.replace(/\D/g,"");D(K=>K.includes(L)?K.filter(ie=>ie!==L):[...K,L])}else if(z===Y.partOfSpeech){if(!E||E===bt){$([]);return}$(L=>L.includes(E)?L.filter(K=>K!==E):[...L,E])}else if(z===Y.wordType){if(!E||E===bt){P([]);return}P(L=>L.includes(E)?L.filter(K=>K!==E):[...L,E])}else{const L=He[z];if(!L)return;m(K=>t.requireSyllable?E&&E!==bt?{...K,[L]:E}:K:!E||E===bt||K[L]===E?{...K,[L]:null}:{...K,[L]:E})}},[H,He,Y,t.requireSyllable]),nt=l.useCallback(E=>!t.partOfSpeech&&!t.wordType?!0:Bd(E,{...t.partOfSpeech?{[Y.partOfSpeech]:I}:{},...t.wordType?{[Y.wordType]:G}:{}},Y),[t.partOfSpeech,t.wordType,I,G,Y]),oe=l.useCallback(E=>{E!==f&&(E!=="direct"&&f!=="direct"&&m(z=>Xu(z,E,_.current)),y(E))},[f]),pt=l.useCallback(()=>({composition:c,contrastCount:d,excludeNoImage:g,sameStructureOnly:A,phonemeView:f,gradeFilter:v}),[c,d,g,A,f,v]),pe=l.useCallback(E=>{m(E.composition),p(E.contrastCount),k(E.excludeNoImage),T(E.sameStructureOnly??!0),y(E.phonemeView),D(Array.isArray(E.gradeFilter)?E.gradeFilter:[])},[]);return{difficulty:w,contrastCount:d,composition:c,choseong:c.cho,excludeNoImage:g,sameStructureOnly:A,gradeFilter:v,posFilter:I,wordTypeFilter:G,matchesWordAttributes:nt,poolVersion:ne,filterSections:tt,filterSelected:Ve,handleFilterSelect:te,phonemeView:f,setPhonemeView:oe,phonemeGroupLabel:H.phonemeGroup,wordCount:ye,getFilterSnapshot:pt,restoreFilterSnapshot:pe}}function Fd(e){const t=s=>s?st(s):null,n=t(e.cho),o=t(e.jung),u=e.jong===Qe,r=u?null:t(e.jong),i=e.syllable!=null?ao(e.syllable):null;return!n&&!o&&!r&&!u&&!i?null:{cho:n,jung:o,jong:r,jongNone:u,syllable:i}}function Hd(e,t,n,o,u,r,i=!0,s="char",d=[]){const[p,f]=l.useState({}),[y,c]=l.useState(!1),{cho:m=null,jung:S=null,jong:w=null,syllable:_=null}=o??{},g=d.length>0?d.slice().sort().join(","):"";return l.useEffect(()=>{r>0&&Oa(u).catch(()=>{})},[r,u]),l.useEffect(()=>{let k=!1;return c(!0),(async()=>{const A=Fd({cho:m,jung:S,jong:w,syllable:_}),T=`${m??""}_${S??""}_${w??""}_${_??""}_${g}`,v={};await Promise.all(e.map(async D=>{const I=Fn[D.key];try{const $=await iu(D.key,{difficulty:I.difficulty?t:null,contrastCount:I.difficulty?n:1,composition:I.choseong?A:null,count:5,excludeNoImage:u,sameStructureOnly:i,phonemeView:s,grade:d.length>0?d:null});$&&$.length>0?v[D.key]={id:`wt-${D.key}-${t}-${T}-${Date.now()}`,name:D.label,training_type:D.key,category_main_code:"WORD",iconColor:D.color,subTitle:D.subTitle,items:$,itemCount:$.length}:v[D.key]={id:`wt-${D.key}-empty`,name:D.label,training_type:D.key,category_main_code:"WORD",iconColor:D.color,subTitle:D.subTitle,items:[],itemCount:0,__empty:!0}}catch{v[D.key]=null}})),k||(f(v),c(!1))})(),()=>{k=!0}},[t,n,m,S,w,_,u,i,s,r,g]),{perTypeData:p,generating:y}}function zd(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function Vd(e){let t=e>>>0;return()=>{t|=0,t=t+1831565813|0;let n=Math.imul(t^t>>>15,1|t);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}const Mn=at;function co(e,t){const n=t?Vd(zd(t)):Math.random;return{LISTEN_IN_NOISE:Mn(Zt,Math.max(0,e.LISTEN_IN_NOISE||0),n),SHORT_STORY:Mn(Jt,Math.max(0,e.SHORT_STORY||0),n),LONG_STORY:Mn(Qt,Math.max(0,e.LONG_STORY||0),n),ORDERING_SENTENCE:Mn(en,Math.max(0,e.ORDERING_SENTENCE||0),n)}}function Qu(e){return e?!!(e.LISTEN_IN_NOISE?.length||e.SHORT_STORY?.length||e.LONG_STORY?.length||e.ORDERING_SENTENCE?.length):!1}const Ud={LISTEN_IN_NOISE:3,SHORT_STORY:2,LONG_STORY:1,ORDERING_SENTENCE:2};function er(e=!1,t=Ud,n){const o=kn(Date.now()),u=kn(Date.now()-864e5),r=`${n??""}|${o}`,i=`${n??""}|${u}`;return Zt.length>0||Jt.length>0||Qt.length>0||en.length>0?{today:co(t,r),yesterday:co(t,i)}:{today:co(t,r),yesterday:null}}function Gd(e){const t=l.useRef({LISTEN_IN_NOISE:[],SHORT_STORY:[],LONG_STORY:[],ORDERING_SENTENCE:[]}),n=l.useRef(null),[o,u]=l.useState(!1),[r,i]=l.useState(!1),[s,d]=l.useState(0),[p,f]=l.useState(!1);l.useEffect(()=>{let c=!1,m,S=0;const w=40,_=()=>{m!==void 0&&(clearInterval(m),m=void 0)};let g=!1;try{const T=new URLSearchParams(window.location.search),v=T.get("forceRefresh")||T.get("force");g=v==="1"||v==="true"}catch{}const k=T=>{t.current=T.today,n.current=T.yesterday,u(!0),f(!0),d(v=>v+1),c=!0,_()},A=async()=>{if(c)return;if(!g){const v=er(!1,void 0,e);if(Qu(v.today)){k(v);return}}try{await dd(3e3)}catch{}if(c)return;const T=er(g,void 0,e);if(Qu(T.today)){k(T);return}++S>=w&&(u(!0),f(!1),c=!0,_())};return A(),m=setInterval(A,250),()=>{c=!0,_()}},[e]);const y=l.useCallback(c=>{const m=r?n.current:t.current,S=r?t.current:n.current;return m?.[c]?.length?m[c]:S?.[c]?.length?S[c]:void 0},[r,s]);return{loaded:o,hasData:p,showYesterday:r,setShowYesterday:i,getTrainingPerType:y}}const Lt=[];let Nn=!1;function tr(e){if(e.key!=="Escape"||e.defaultPrevented)return;const t=Lt[Lt.length-1];t&&(e.stopPropagation(),t())}function Yd(e){return Lt.push(e),!Nn&&typeof document<"u"&&(document.addEventListener("keydown",tr),Nn=!0),()=>{const t=Lt.lastIndexOf(e);t>=0&&Lt.splice(t,1),Lt.length===0&&Nn&&typeof document<"u"&&(document.removeEventListener("keydown",tr),Nn=!1)}}function qd(e,t=!0){const n=vo(e);l.useEffect(()=>{if(t)return Yd(()=>{n.current?.()})},[t,n])}const ho=(e,t)=>`${e}:${t??1}`,fo=new Map;function Wd(e,t){const[n,o]=l.useState(0),u=e.map(r=>ho(r.word,r.homonum)).join("|");return l.useEffect(()=>{const r=(u?u.split("|"):[]).filter(d=>!fo.has(d));if(r.length===0)return;let i=!1;const s=Array.from(new Set(r.map(d=>d.slice(0,d.lastIndexOf(":")))));return t(s).then(d=>{if(!(i||d.length===0)){for(const p of d)p.Meaning&&fo.set(ho(p.Word,p.Homonum??void 0),p.Meaning);o(p=>p+1)}}),()=>{i=!0}},[u,t]),l.useMemo(()=>{const r=u?u.split("|"):[],i=new Map;for(const s of r){const d=fo.get(s);d!=null&&i.set(s,d)}return i},[u,n])}function Kd(e,t,n){const o=Number.isFinite(t)&&t>=1?Math.floor(t):1,u=Math.max(1,Math.ceil(e.length/o)),r=Number.isFinite(n)?Math.min(Math.max(1,Math.floor(n)),u):1;return{pageItems:l.useMemo(()=>e.slice((r-1)*o,r*o),[e,r,o]),totalPages:u,curPage:r}}function Xd(e="warning"){const[t,n]=l.useState(""),[o,u]=l.useState(e),[r,i]=l.useState(0),s=l.useCallback((y,c)=>{u(c),n(y),i(m=>m+1)},[]),d=l.useCallback(y=>s(y,"warning"),[s]),p=l.useCallback(y=>s(y,"normal"),[s]),f=l.useCallback(()=>n(""),[]);return{toastMessage:t,toastType:o,toastKey:r,showToast:s,showWarning:d,showNormal:p,clearToast:f}}const nn={blue:"#60A5FA",green:"#4ADE80",amber:"#FBBF24",purple:"#A78BFA",pink:"#F472B6"},on=nn.blue,Tn=nn.green,un=nn.amber,xn=nn.purple,Zd=nn.pink,Jd=[{key:"discrimination",label:"\uBCC0\uBCC4\uD6C8\uB828",disc:"\uB450 \uC18C\uB9AC\uAC00 \uAC19\uC740\uC9C0 \uB2E4\uB978\uC9C0, \uB610\uB294 \uD2B9\uC815 \uC18C\uB9AC\uB97C \uAD6C\uBCC4\uD558\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"ear",types:[{key:"SAME_SOUND_PICK",label:"\uAC19\uC740 \uC18C\uB9AC \uACE0\uB974\uAE30",icon:"volume-2",color:on,subTitle:"\uB4E4\uC740 \uC18C\uB9AC\uC640 \uAC19\uC740 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},{key:"SAME_OR_DIFF",label:"\uAC19\uC740\uC9C0 \uB2E4\uB978\uC9C0 \uB9DE\uD788\uAE30",icon:"diff",color:on,subTitle:"\uB450 \uC18C\uB9AC\uAC00 \uAC19\uC740\uC9C0, \uB2E4\uB978\uC9C0 \uAD6C\uBD84\uD558\uC138\uC694."},{key:"HEAR_AND_PICK_SAME",label:"\uC77C\uCE58\uD558\uB294 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",icon:"headphones",color:on,subTitle:"\uB4E4\uC740 \uC18C\uB9AC\uC758 \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},{key:"HEAR_AND_PICK_INCLUDED",label:"\uD55C \uC74C\uC808 \uD3EC\uD568 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",icon:"scan-search",color:on,subTitle:"\uB4E4\uC740 \uC74C\uC808\uC774 \uD3EC\uD568\uB41C \uB2E8\uC5B4 \uCE74\uB4DC\uB97C \uACE0\uB974\uC138\uC694."},{key:"STARTS_WITH_SAME_SOUND",label:"\uCCAB \uC74C\uC808\uC774 \uAC19\uC740 \uB2E8\uC5B4 \uB9DE\uD788\uAE30",icon:"play-circle",color:on,subTitle:"\uB4E4\uC740 \uB2E8\uC5B4\uC640 \uAC19\uC740 \uC18C\uB9AC\uB85C \uC2DC\uC791\uD558\uB294 \uB2E8\uC5B4\uB97C \uACE0\uB974\uC138\uC694."}]},{key:"synthesis",label:"\uD569\uC131\uD6C8\uB828",disc:"\uB450 \uAC1C \uC774\uC0C1\uC758 \uC74C\uC808\uC774\uB098 \uC74C\uC18C\uB97C \uD569\uCCD0 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"git-merge",types:[{key:"MERGE_2_SYLLABLES",label:"\uC74C\uC808 2\uAC1C \uD569\uCE58\uAE30",icon:"link-2",color:Tn,subTitle:"\uB450 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},{key:"MERGE_3_SYLLABLES",label:"\uC74C\uC808 3\uAC1C \uD569\uCE58\uAE30",icon:"git-merge",color:Tn,subTitle:"\uC138 \uC74C\uC808\uC744 \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},{key:"MERGE_2_PHONEMES",label:"\uC74C\uC18C 2\uAC1C \uD569\uCE58\uAE30",icon:"combine",color:Tn,subTitle:"\uB450 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"MERGE_3_PHONEMES",label:"\uC74C\uC18C 3\uAC1C \uD569\uCE58\uAE30",icon:"braces",color:Tn,subTitle:"\uC138 \uC74C\uC18C\uB97C \uD569\uCE58\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"}]},{key:"deletion",label:"\uD0C8\uB77D\uD6C8\uB828",disc:"\uB2E8\uC5B4\uC5D0\uC11C \uC74C\uC808\uC774\uB098 \uC74C\uC18C\uB97C \uC81C\uAC70\uD588\uC744 \uB54C \uB0A8\uB294 \uC18C\uB9AC\uB97C \uC778\uC2DD\uD558\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"scissors",types:[{key:"DROP_1_FROM_2SYLL",label:"2\uC74C\uC808\uC5D0\uC11C 1\uC74C\uC808 \uD0C8\uB77D",icon:"scissors",color:un,subTitle:"2\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"DROP_1_FROM_3SYLL",label:"3\uC74C\uC808\uC5D0\uC11C 1\uC74C\uC808 \uD0C8\uB77D",icon:"minus-circle",color:un,subTitle:"3\uC74C\uC808 \uB2E8\uC5B4\uC5D0\uC11C \uD55C \uC74C\uC808\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"DROP_PART_FROM_COMPOUND",label:"\uD569\uC131\uC5B4\uC5D0\uC11C \uBD80\uBD84\uD0C8\uB77D",icon:"unlink",color:un,subTitle:"\uD569\uC131\uC5B4\uC758 \uC77C\uBD80\uB97C \uBE7C\uBA74 \uC5B4\uB5A4 \uB2E8\uC5B4\uAC00 \uB420\uAE4C\uC694?"},{key:"DROP_FINAL_CONSONANT_FROM_1SYLL",label:"1\uC74C\uC808\uC5D0\uC11C \uBC1B\uCE68 \uD0C8\uB77D",icon:"eraser",color:un,subTitle:"\uBC1B\uCE68\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB420\uAE4C\uC694?"},{key:"REMOVE_CONSONANT_AND_IDENTIFY_PHONEME",label:"1\uC74C\uC808\uC5D0\uC11C \uC790\uC74C \uD0C8\uB77D",icon:"audio-lines",color:un,subTitle:"\uC790\uC74C\uC744 \uBE7C\uBA74 \uC5B4\uB5A4 \uC18C\uB9AC\uAC00 \uB0A8\uC744\uAE4C\uC694?"}]},{key:"substitution",label:"\uB300\uCE58\uD6C8\uB828",disc:"\uB2E8\uC5B4\uC758 \uC77C\uBD80 \uC74C\uC808\uC774\uB098 \uC74C\uC18C\uB97C \uBC14\uAFB8\uC5B4 \uC0C8\uB85C\uC6B4 \uC18C\uB9AC\uB97C \uB9CC\uB4DC\uB294 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"replace",types:[{key:"CHANGE_1_SYLL_IN_2SYLL",label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",icon:"replace",color:xn,subTitle:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},{key:"CHANGE_1_SYLL_IN_3SYLL",label:"3\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC808 \uBC14\uAFB8\uAE30",icon:"shuffle",color:xn,subTitle:"3\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC808\uC744 \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."},{key:"CHANGE_1_PHONEME_IN_1SYLL",label:"1\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC18C \uBC14\uAFB8\uAE30",icon:"arrow-right-left",color:xn,subTitle:"1\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uC18C\uB9AC\uB97C \uB9CC\uB4DC\uC138\uC694."},{key:"CHANGE_1_PHONEME_IN_2SYLL",label:"2\uC74C\uC808\uC5D0\uC11C \uD55C \uC74C\uC18C \uBC14\uAFB8\uAE30",icon:"flip-horizontal",color:xn,subTitle:"2\uC74C\uC808 \uB2E8\uC5B4\uC758 \uD55C \uC74C\uC18C\uB97C \uBC14\uAFD4 \uC0C8 \uB2E8\uC5B4\uB97C \uB9CC\uB4DC\uC138\uC694."}]},{key:"attention",label:"\uCCAD\uAC01\uC801\uC8FC\uC758\uB825\uD6C8\uB828",disc:"\uC5EC\uB7EC \uC18C\uB9AC\uB97C \uB4E3\uACE0 \uC21C\uC11C\uB97C \uAE30\uC5B5\uD558\uB294 \uC8FC\uC758\uB825\uACFC \uB2E8\uAE30 \uAE30\uC5B5 \uD6C8\uB828\uC785\uB2C8\uB2E4.",icon:"list-ordered",types:[{key:"LISTEN_AND_REMEMBER_ORDER",label:"\uB4E3\uACE0 \uC21C\uC11C\uB300\uB85C \uAE30\uC5B5\uD558\uAE30",icon:"list-ordered",color:Zd,subTitle:"\uC138 \uB2E8\uC5B4\uB97C \uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCE74\uB4DC\uB97C \uC120\uD0DD\uD558\uC138\uC694."}]}];function Qd(){const{t:e}=gt.useTranslation();return l.useMemo(()=>{const t=Object.fromEntries(pd(e).map(o=>[o.key,o.label])),n={...t};return Jd.flatMap(o=>o.types).forEach(o=>{n[o.key]=e(`trainingType.${o.key}.label`,{defaultValue:o.label})}),{sentence:t,all:n}},[e])}exports.CACHE_GROUPS=Ho,exports.CORE_VERSION=Cd,exports.DocumentTitleSuppressContext=Ro,exports.EMPTY_COMPOSITION=lo,exports.MediaQueryOverrideContext=Do,exports.NO_CODA=Qe,exports.SYLLABLE_MIN=et,exports.VAP_PAGE_SIZE_OPTIONS=Go,exports.buildGradeSection=Hu,exports.buildPartOfSpeechSection=zu,exports.buildPositionSection=wd,exports.buildSelectSection=Ad,exports.buildSyllableSection=kd,exports.buildWordTypeSection=Vu,exports.charToPronValue=Wu,exports.convertComposition=Xu,exports.fmtBytes=Pr,exports.lsBytes=zo,exports.meaningKey=ho,exports.pronToCharValue=Ku,exports.syllableToFilter=ao,exports.today=zt,exports.toggleAttributeFilter=Md,exports.useCacheManagement=$r,exports.useDailyTrainingSelection=Gd,exports.useDelayedHoverAnchor=bd,exports.useDeviceManagement=Wr,exports.useDocumentTitle=br,exports.useEscToClose=qd,exports.useFontScale=gr,exports.useHoverAnchor=$u,exports.useMediaQuery=Er,exports.usePagedList=Kd,exports.usePasswordChange=kr,exports.useRelativeDay=Sr,exports.useTablePaging=Yr,exports.useTableSort=qr,exports.useToastState=Xd,exports.useTrainingTypeLabels=Qd,exports.useVisitAllPanel=Gr,exports.useVisitHistory=zr,exports.useVisitSchedule=Ur,exports.useWindowEvent=Oo,exports.useWordAttributeFilterKeys=Fu,exports.useWordDataStats=Fr,exports.useWordMeanings=Wd,exports.useWordTrainingDataGeneration=Hd,exports.useWordTrainingFilter=$d,exports.valueToJamos=st;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{color-scheme:light;--brand-main:#499cdf;--brand-sub:#4dcdc0;--color-lightMain:var(--brand-lightMain,#d2e2ef);--color-softMain:var(--brand-softMain,#8bbce4);--color-main:var(--brand-main);--color-main-a10:color-mix(in srgb,var(--color-main) 10%,transparent);--color-main-a20:color-mix(in srgb,var(--color-main) 20%,transparent);--color-deepMain:var(--brand-deepMain,#418ecd);--color-darkMain:var(--brand-darkMain,#1e5a8f);--color-lightSub:var(--brand-lightSub,#d5ecea);--color-softSub:var(--brand-softSub,#92ddd5);--color-sub:var(--brand-sub);--color-sub-a10:color-mix(in srgb,var(--color-sub) 10%,transparent);--color-deepSub:var(--brand-deepSub,#45bbaf);--color-darkSub:var(--brand-darkSub,#257e76);--color-text-main:var(--color-darkMain);--color-text-sub:var(--color-darkSub);--color-infoLink:#2f7fd1;--color-uiAccent:#32bbae;--color-success:#2fae9e;--color-warn:#e6b94e;--color-warn-a10:#e6b94e1a;--color-error:#d9534f;--color-error-a10:#d9534f1a;--color-like:#e06b68;--color-disabled:#bfc7d1;--color-pureWhite:#fff;--color-white:#fbfdff;--color-white-a10:#fbfdff1a;--color-white-a30:#fbfdff4d;--color-white-a60:#fbfdff99;--color-white-a80:#fbfdffcc;--color-deepWhite:#f8fafc;--color-darkWhite:#eef2f6;--color-whiteLine:#dde3ec;--color-lightGray:#96a4b8;--color-lightGray-a10:#96a4b81a;--color-lightGray-a80:#96a4b8cc;--color-softGray:#7b8ca3;--color-gray:#64748b;--color-gray-a10:#64748b1a;--color-gray-a60:#64748b99;--color-gray-a80:#64748bcc;--color-deepGray:#546170;--color-darkGray:#434d56;--color-darkGray-a10:#434d561a;--color-lightBlack:#32393f;--color-softBlack:#222528;--color-black:#111;--color-pureBlack:#000;--color-popupBlock:rgba(16,24,32,.6);--color-text-primary:var(--color-black);--color-text-secondary:var(--color-gray);--color-text-muted:var(--color-lightGray);--color-text-on-brand:var(--color-pureWhite);--color-surface:var(--color-white);--color-surface-raised:var(--color-deepWhite);--color-surface-sunken:var(--color-darkWhite);--color-border:var(--color-whiteLine);--color-overlay:var(--color-popupBlock);--shadow-popup:20px 20px 20px rgba(0,0,0,.05);--shadow-tooltip:8px 8px 8px rgba(0,0,0,.05);--shadow-button:4px 4px 4px rgba(0,0,0,.05);--shadow-menu:20px 20px 20px rgba(0,0,0,.05);--shadow-card:2px 2px 8px rgba(0,0,0,.06);--shadow-dropdown:8px 8px 24px rgba(0,0,0,.06);--shadow-panel:4px 4px 20px rgba(0,0,0,.06);--font-family:"Pretendard Variable","Pretendard",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;--text-display-1-size:clamp(44px,6.6vw,72px);--text-display-1-line:1.05;--text-display-1-spacing:-0.04em;--text-display-1-weight:800;--text-display-1-weight-bold:900;--text-display-2-size:clamp(38px,5.2vw,56px);--text-display-2-line:1.12;--text-display-2-spacing:-0.03em;--text-display-2-weight:700;--text-display-2-weight-bold:800;--text-display-3-size:clamp(34px,4.1vw,44px);--text-display-3-line:1.2;--text-display-3-spacing:-0.02em;--text-display-3-weight:700;--text-display-3-weight-bold:800;--text-h0-size:40px;--text-h0-line:52px;--text-h0-spacing:-1px;--text-h0-weight:700;--text-h0-weight-bold:800;--text-h1-size:32px;--text-h1-line:44px;--text-h1-spacing:-0.5px;--text-h1-weight:700;--text-h1-weight-bold:800;--text-h2-size:24px;--text-h2-line:34px;--text-h2-spacing:-0.25px;--text-h2-weight:500;--text-h2-weight-bold:600;--text-h3-size:20px;--text-h3-line:30px;--text-h3-spacing:normal;--text-h3-weight:500;--text-h3-weight-bold:600;--text-h4-size:17px;--text-h4-line:26px;--text-h4-spacing:normal;--text-h4-weight:500;--text-h4-weight-bold:600;--text-h5-size:15px;--text-h5-line:23px;--text-h5-spacing:normal;--text-h5-weight:500;--text-h5-weight-bold:600;--text-body-1-size:18px;--text-body-1-line:28px;--text-body-1-weight:400;--text-body-1-weight-bold:600;--text-body-2-size:16px;--text-body-2-line:26px;--text-body-2-weight:400;--text-body-2-weight-bold:600;--text-body-3-size:14px;--text-body-3-line:22px;--text-body-3-weight:400;--text-body-3-weight-bold:600;--text-button-1-size:14px;--text-button-1-line:20px;--text-button-1-weight:500;--text-button-2-size:13px;--text-button-2-line:18px;--text-button-2-weight:400;--text-caption-1-size:12px;--text-caption-1-line:17px;--text-caption-1-weight:400;--text-caption-1-weight-bold:600;--text-caption-2-size:11px;--text-caption-2-line:15px;--text-caption-2-weight:400;--text-caption-2-weight-bold:600;--spacing-xs:8px;--spacing-s:12px;--spacing-m:16px;--spacing-l:20px;--spacing-xl:24px;--spacing-page:60px;--spacing-content:20px;--container-page:1920px;--margin-page:var(--spacing-page);--margin-content:var(--spacing-content);--duration-fast:120ms;--duration-base:200ms;--duration-slow:320ms;--ease-out:cubic-bezier(0.22,0.9,0.3,1);--ease-in-out:cubic-bezier(0.4,0,0.2,1);--bp-tablet:768px;--bp-desktop:1024px;--radius-xs:4px;--radius-sm:8px;--radius-s:10px;--radius-card:12px;--radius-m:20px;--radius-l:40px;--radius-full:999px;--radius-dialog:var(--radius-m);--z-base:0;--z-content:1;--z-dropdown:200;--z-sticky:500;--z-nav:1000;--z-sidebar:1100;--z-overlay:2000;--z-page-popup:2100;--z-fab:2150;--z-modal:2200;--focus-ring:var(--color-deepMain);--z-popover:2300;--z-tooltip:3000;--z-alert:3100;--z-toast:3200}@media (min-width:768px) and (max-width:1023px){:root{--spacing-page:40px;--spacing-content:15px;--text-h0-size:32px;--text-h0-line:44px;--text-h0-spacing:-0.75px;--text-h1-size:28px;--text-h1-line:40px;--text-h1-spacing:-0.4px;--text-h2-size:22px;--text-h2-line:32px;--text-h2-spacing:-0.2px;--text-h3-size:18px;--text-h3-line:28px;--text-h4-size:16px;--text-h4-line:24px;--text-h5-size:14px;--text-h5-line:21px;--text-body-1-size:17px;--text-body-1-line:27px;--text-body-2-size:15px;--text-body-2-line:24px;--text-body-3-size:14px;--text-body-3-line:22px}}@media (max-width:767px){:root{--spacing-page:20px;--spacing-content:10px;--text-h0-size:28px;--text-h0-line:38px;--text-h0-spacing:-0.5px;--text-h1-size:24px;--text-h1-line:34px;--text-h1-spacing:-0.3px;--text-h2-size:20px;--text-h2-line:29px;--text-h2-spacing:-0.2px;--text-h3-size:17px;--text-h3-line:26px;--text-h4-size:15px;--text-h4-line:23px;--text-h5-size:13px;--text-h5-line:20px;--text-body-1-size:17px;--text-body-1-line:27px;--text-body-2-size:15px;--text-body-2-line:23px;--text-body-3-size:13px;--text-body-3-line:21px}}[data-font-scale=large1]{--text-h4-size:19px;--text-h4-line:29px;--text-h5-size:17px;--text-h5-line:26px;--text-body-1-size:20px;--text-body-1-line:31px;--text-body-2-size:18px;--text-body-2-line:28px;--text-body-3-size:16px;--text-body-3-line:25px;--text-button-1-size:16px;--text-button-1-line:23px;--text-button-2-size:15px;--text-button-2-line:21px;--text-caption-1-size:14px;--text-caption-1-line:20px;--text-caption-2-size:12px;--text-caption-2-line:17px}[data-font-scale=large2]{--text-h4-size:21px;--text-h4-line:32px;--text-h5-size:19px;--text-h5-line:29px;--text-body-1-size:23px;--text-body-1-line:36px;--text-body-2-size:20px;--text-body-2-line:31px;--text-body-3-size:18px;--text-body-3-line:28px;--text-button-1-size:18px;--text-button-1-line:26px;--text-button-2-size:16px;--text-button-2-line:23px;--text-caption-1-size:15px;--text-caption-1-line:21px;--text-caption-2-size:14px;--text-caption-2-line:19px}[data-font-scale=large3]{--text-h4-size:23px;--text-h4-line:35px;--text-h5-size:21px;--text-h5-line:32px;--text-body-1-size:25px;--text-body-1-line:39px;--text-body-2-size:22px;--text-body-2-line:34px;--text-body-3-size:19px;--text-body-3-line:30px;--text-button-1-size:19px;--text-button-1-line:27px;--text-button-2-size:18px;--text-button-2-line:26px;--text-caption-1-size:17px;--text-caption-1-line:24px;--text-caption-2-size:15px;--text-caption-2-line:21px}[data-theme=dark]{color-scheme:dark;--color-white:#1e2227;--color-deepWhite:#252a30;--color-darkWhite:#2d3238;--color-whiteLine:hsla(0,0%,100%,.08);--color-black:#f0f2f5;--color-softBlack:#dde1e7;--color-lightBlack:#cbd1da;--color-darkGray:#b8c0cc;--color-deepGray:#a1aab7;--color-gray:#8b95a1;--color-softGray:#737f90;--color-lightGray:#60697a;--color-text-main:var(--color-softMain);--color-text-sub:var(--color-softSub);--color-text-primary:var(--color-black);--color-text-secondary:var(--color-gray);--color-text-muted:var(--color-lightGray);--color-text-on-brand:var(--color-pureWhite);--color-surface:var(--color-white);--color-surface-raised:var(--color-deepWhite);--color-surface-sunken:var(--color-darkWhite);--color-border:var(--color-whiteLine);--color-pureWhite:#0f1215;--color-pureBlack:#f0f2f5;--color-disabled:#3f4650}@media (prefers-color-scheme:dark){:root:not([data-theme=light]):not([data-theme=dark]),[data-theme=auto]{color-scheme:dark;--color-white:#1e2227;--color-deepWhite:#252a30;--color-darkWhite:#2d3238;--color-whiteLine:hsla(0,0%,100%,.08);--color-black:#f0f2f5;--color-softBlack:#dde1e7;--color-lightBlack:#cbd1da;--color-darkGray:#b8c0cc;--color-deepGray:#a1aab7;--color-gray:#8b95a1;--color-softGray:#737f90;--color-lightGray:#60697a;--color-text-main:var(--color-softMain);--color-text-sub:var(--color-softSub);--color-text-primary:var(--color-black);--color-text-secondary:var(--color-gray);--color-text-muted:var(--color-lightGray);--color-text-on-brand:var(--color-pureWhite);--color-surface:var(--color-white);--color-surface-raised:var(--color-deepWhite);--color-surface-sunken:var(--color-darkWhite);--color-border:var(--color-whiteLine);--color-pureWhite:#0f1215;--color-pureBlack:#f0f2f5;--color-disabled:#3f4650}}.force-light-scheme{color-scheme:light;--color-pureWhite:#fff;--color-white:#fbfdff;--color-deepWhite:#f8fafc;--color-darkWhite:#eef2f6;--color-whiteLine:#dde3ec;--color-lightGray:#96a4b8;--color-softGray:#7b8ca3;--color-gray:#64748b;--color-deepGray:#546170;--color-darkGray:#434d56;--color-lightBlack:#32393f;--color-softBlack:#222528;--color-black:#111;--color-pureBlack:#000;--color-disabled:#bfc7d1;--color-text-main:var(--color-darkMain);--color-text-sub:var(--color-darkSub);--color-text-primary:var(--color-black);--color-text-secondary:var(--color-gray);--color-text-muted:var(--color-lightGray);--color-text-on-brand:var(--color-pureWhite);--color-surface:var(--color-white);--color-surface-raised:var(--color-deepWhite);--color-surface-sunken:var(--color-darkWhite);--color-border:var(--color-whiteLine)}
|
|
1
|
+
:root{color-scheme:light;--brand-main:#499cdf;--brand-sub:#4dcdc0;--color-lightMain:var(--brand-lightMain,#d2e2ef);--color-softMain:var(--brand-softMain,#8bbce4);--color-main:var(--brand-main);--color-main-a10:color-mix(in srgb,var(--color-main) 10%,transparent);--color-main-a20:color-mix(in srgb,var(--color-main) 20%,transparent);--color-deepMain:var(--brand-deepMain,#418ecd);--color-darkMain:var(--brand-darkMain,#1e5a8f);--color-lightSub:var(--brand-lightSub,#d5ecea);--color-softSub:var(--brand-softSub,#92ddd5);--color-sub:var(--brand-sub);--color-sub-a10:color-mix(in srgb,var(--color-sub) 10%,transparent);--color-deepSub:var(--brand-deepSub,#45bbaf);--color-darkSub:var(--brand-darkSub,#257e76);--color-text-main:var(--color-darkMain);--color-text-sub:var(--color-darkSub);--color-infoLink:#2f7fd1;--color-uiAccent:#32bbae;--color-success:#2fae9e;--color-warn:#e6b94e;--color-warn-a10:#e6b94e1a;--color-error:#d9534f;--color-error-a10:#d9534f1a;--color-like:#e06b68;--color-disabled:#bfc7d1;--color-pureWhite:#fff;--color-white:#fbfdff;--color-white-a10:#fbfdff1a;--color-white-a30:#fbfdff4d;--color-white-a60:#fbfdff99;--color-white-a80:#fbfdffcc;--color-deepWhite:#f8fafc;--color-darkWhite:#eef2f6;--color-whiteLine:#dde3ec;--color-lightGray:#96a4b8;--color-lightGray-a10:#96a4b81a;--color-lightGray-a80:#96a4b8cc;--color-softGray:#7b8ca3;--color-gray:#64748b;--color-gray-a10:#64748b1a;--color-gray-a60:#64748b99;--color-gray-a80:#64748bcc;--color-deepGray:#546170;--color-darkGray:#434d56;--color-darkGray-a10:#434d561a;--color-lightBlack:#32393f;--color-softBlack:#222528;--color-black:#111;--color-pureBlack:#000;--color-popupBlock:rgba(16,24,32,.6);--color-text-primary:var(--color-black);--color-text-secondary:var(--color-gray);--color-text-muted:var(--color-lightGray);--color-text-on-brand:var(--color-pureWhite);--color-surface:var(--color-white);--color-surface-raised:var(--color-deepWhite);--color-surface-sunken:var(--color-darkWhite);--color-border:var(--color-whiteLine);--color-overlay:var(--color-popupBlock);--shadow-popup:20px 20px 20px rgba(0,0,0,.05);--shadow-tooltip:8px 8px 8px rgba(0,0,0,.05);--shadow-button:4px 4px 4px rgba(0,0,0,.05);--shadow-menu:20px 20px 20px rgba(0,0,0,.05);--shadow-card:2px 2px 8px rgba(0,0,0,.06);--shadow-dropdown:8px 8px 24px rgba(0,0,0,.06);--shadow-panel:4px 4px 20px rgba(0,0,0,.06);--font-family:"Pretendard Variable","Pretendard",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;--text-display-1-size:clamp(44px,6.6vw,72px);--text-display-1-line:1.05;--text-display-1-spacing:-0.04em;--text-display-1-weight:800;--text-display-1-weight-bold:900;--text-display-2-size:clamp(38px,5.2vw,56px);--text-display-2-line:1.12;--text-display-2-spacing:-0.03em;--text-display-2-weight:700;--text-display-2-weight-bold:800;--text-display-3-size:clamp(34px,4.1vw,44px);--text-display-3-line:1.2;--text-display-3-spacing:-0.02em;--text-display-3-weight:700;--text-display-3-weight-bold:800;--text-h0-size:40px;--text-h0-line:52px;--text-h0-spacing:-1px;--text-h0-weight:700;--text-h0-weight-bold:800;--text-h1-size:32px;--text-h1-line:44px;--text-h1-spacing:-0.5px;--text-h1-weight:700;--text-h1-weight-bold:800;--text-h2-size:24px;--text-h2-line:34px;--text-h2-spacing:-0.25px;--text-h2-weight:500;--text-h2-weight-bold:600;--text-h3-size:20px;--text-h3-line:30px;--text-h3-spacing:normal;--text-h3-weight:500;--text-h3-weight-bold:600;--text-h4-size:17px;--text-h4-line:26px;--text-h4-spacing:normal;--text-h4-weight:500;--text-h4-weight-bold:600;--text-h5-size:15px;--text-h5-line:23px;--text-h5-spacing:normal;--text-h5-weight:500;--text-h5-weight-bold:600;--text-body-1-size:18px;--text-body-1-line:28px;--text-body-1-weight:400;--text-body-1-weight-bold:600;--text-body-2-size:16px;--text-body-2-line:26px;--text-body-2-weight:400;--text-body-2-weight-bold:600;--text-body-3-size:14px;--text-body-3-line:22px;--text-body-3-weight:400;--text-body-3-weight-bold:600;--text-button-1-size:14px;--text-button-1-line:20px;--text-button-1-weight:500;--text-button-2-size:13px;--text-button-2-line:18px;--text-button-2-weight:400;--text-caption-1-size:12px;--text-caption-1-line:17px;--text-caption-1-weight:400;--text-caption-1-weight-bold:600;--text-caption-2-size:11px;--text-caption-2-line:15px;--text-caption-2-weight:400;--text-caption-2-weight-bold:600;--spacing-xs:8px;--spacing-s:12px;--spacing-m:16px;--spacing-l:20px;--spacing-xl:24px;--spacing-page:60px;--spacing-content:20px;--container-page:1920px;--margin-page:var(--spacing-page);--margin-content:var(--spacing-content);--duration-fast:120ms;--duration-base:200ms;--duration-slow:320ms;--ease-out:cubic-bezier(0.22,0.9,0.3,1);--ease-in-out:cubic-bezier(0.4,0,0.2,1);--bp-tablet:768px;--bp-desktop:1024px;--radius-xs:4px;--radius-sm:8px;--radius-s:10px;--radius-card:12px;--radius-m:20px;--radius-l:40px;--radius-full:999px;--radius-dialog:var(--radius-m);--z-base:0;--z-content:1;--z-dropdown:200;--z-sticky:500;--z-nav:1000;--z-sidebar:1100;--z-overlay:2000;--z-page-popup:2100;--z-fab:2150;--z-modal:2200;--focus-ring:var(--color-main);--z-popover:2300;--z-tooltip:3000;--z-alert:3100;--z-toast:3200}@media (min-width:768px) and (max-width:1023px){:root{--spacing-page:40px;--spacing-content:15px;--text-h0-size:32px;--text-h0-line:44px;--text-h0-spacing:-0.75px;--text-h1-size:28px;--text-h1-line:40px;--text-h1-spacing:-0.4px;--text-h2-size:22px;--text-h2-line:32px;--text-h2-spacing:-0.2px;--text-h3-size:18px;--text-h3-line:28px;--text-h4-size:16px;--text-h4-line:24px;--text-h5-size:14px;--text-h5-line:21px;--text-body-1-size:17px;--text-body-1-line:27px;--text-body-2-size:15px;--text-body-2-line:24px;--text-body-3-size:14px;--text-body-3-line:22px}}@media (max-width:767px){:root{--spacing-page:20px;--spacing-content:10px;--text-h0-size:28px;--text-h0-line:38px;--text-h0-spacing:-0.5px;--text-h1-size:24px;--text-h1-line:34px;--text-h1-spacing:-0.3px;--text-h2-size:20px;--text-h2-line:29px;--text-h2-spacing:-0.2px;--text-h3-size:17px;--text-h3-line:26px;--text-h4-size:15px;--text-h4-line:23px;--text-h5-size:13px;--text-h5-line:20px;--text-body-1-size:17px;--text-body-1-line:27px;--text-body-2-size:15px;--text-body-2-line:23px;--text-body-3-size:13px;--text-body-3-line:21px}}[data-font-scale=large1]{--text-h4-size:19px;--text-h4-line:29px;--text-h5-size:17px;--text-h5-line:26px;--text-body-1-size:20px;--text-body-1-line:31px;--text-body-2-size:18px;--text-body-2-line:28px;--text-body-3-size:16px;--text-body-3-line:25px;--text-button-1-size:16px;--text-button-1-line:23px;--text-button-2-size:15px;--text-button-2-line:21px;--text-caption-1-size:14px;--text-caption-1-line:20px;--text-caption-2-size:12px;--text-caption-2-line:17px}[data-font-scale=large2]{--text-h4-size:21px;--text-h4-line:32px;--text-h5-size:19px;--text-h5-line:29px;--text-body-1-size:23px;--text-body-1-line:36px;--text-body-2-size:20px;--text-body-2-line:31px;--text-body-3-size:18px;--text-body-3-line:28px;--text-button-1-size:18px;--text-button-1-line:26px;--text-button-2-size:16px;--text-button-2-line:23px;--text-caption-1-size:15px;--text-caption-1-line:21px;--text-caption-2-size:14px;--text-caption-2-line:19px}[data-font-scale=large3]{--text-h4-size:23px;--text-h4-line:35px;--text-h5-size:21px;--text-h5-line:32px;--text-body-1-size:25px;--text-body-1-line:39px;--text-body-2-size:22px;--text-body-2-line:34px;--text-body-3-size:19px;--text-body-3-line:30px;--text-button-1-size:19px;--text-button-1-line:27px;--text-button-2-size:18px;--text-button-2-line:26px;--text-caption-1-size:17px;--text-caption-1-line:24px;--text-caption-2-size:15px;--text-caption-2-line:21px}[data-theme=dark]{color-scheme:dark;--color-white:#1e2227;--color-deepWhite:#252a30;--color-darkWhite:#2d3238;--color-whiteLine:hsla(0,0%,100%,.08);--color-black:#f0f2f5;--color-softBlack:#dde1e7;--color-lightBlack:#cbd1da;--color-darkGray:#b8c0cc;--color-deepGray:#a1aab7;--color-gray:#8b95a1;--color-softGray:#737f90;--color-lightGray:#60697a;--color-text-main:var(--color-softMain);--color-text-sub:var(--color-softSub);--color-text-primary:var(--color-black);--color-text-secondary:var(--color-gray);--color-text-muted:var(--color-lightGray);--color-text-on-brand:var(--color-pureWhite);--color-surface:var(--color-white);--color-surface-raised:var(--color-deepWhite);--color-surface-sunken:var(--color-darkWhite);--color-border:var(--color-whiteLine);--color-pureWhite:#0f1215;--color-pureBlack:#f0f2f5;--color-disabled:#3f4650}@media (prefers-color-scheme:dark){:root:not([data-theme=light]):not([data-theme=dark]),[data-theme=auto]{color-scheme:dark;--color-white:#1e2227;--color-deepWhite:#252a30;--color-darkWhite:#2d3238;--color-whiteLine:hsla(0,0%,100%,.08);--color-black:#f0f2f5;--color-softBlack:#dde1e7;--color-lightBlack:#cbd1da;--color-darkGray:#b8c0cc;--color-deepGray:#a1aab7;--color-gray:#8b95a1;--color-softGray:#737f90;--color-lightGray:#60697a;--color-text-main:var(--color-softMain);--color-text-sub:var(--color-softSub);--color-text-primary:var(--color-black);--color-text-secondary:var(--color-gray);--color-text-muted:var(--color-lightGray);--color-text-on-brand:var(--color-pureWhite);--color-surface:var(--color-white);--color-surface-raised:var(--color-deepWhite);--color-surface-sunken:var(--color-darkWhite);--color-border:var(--color-whiteLine);--color-pureWhite:#0f1215;--color-pureBlack:#f0f2f5;--color-disabled:#3f4650}}.force-light-scheme{color-scheme:light;--color-pureWhite:#fff;--color-white:#fbfdff;--color-deepWhite:#f8fafc;--color-darkWhite:#eef2f6;--color-whiteLine:#dde3ec;--color-lightGray:#96a4b8;--color-softGray:#7b8ca3;--color-gray:#64748b;--color-deepGray:#546170;--color-darkGray:#434d56;--color-lightBlack:#32393f;--color-softBlack:#222528;--color-black:#111;--color-pureBlack:#000;--color-disabled:#bfc7d1;--color-text-main:var(--color-darkMain);--color-text-sub:var(--color-darkSub);--color-text-primary:var(--color-black);--color-text-secondary:var(--color-gray);--color-text-muted:var(--color-lightGray);--color-text-on-brand:var(--color-pureWhite);--color-surface:var(--color-white);--color-surface-raised:var(--color-deepWhite);--color-surface-sunken:var(--color-darkWhite);--color-border:var(--color-whiteLine)}
|