1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,716915,(e,t,r)=>{!function(n,a){if("function"==typeof define&&define.amd){let n;void 0!==(n=a(e.r,r,t))&&e.v(n)}else t.exports=a()}(e.e,function(){var e,t,r,n={};n.version="0.2.0";var a=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function s(e,t,r){return e<t?t:e>r?r:e}n.configure=function(e){var t,r;for(t in e)void 0!==(r=e[t])&&e.hasOwnProperty(t)&&(a[t]=r);return this},n.status=null,n.set=function(e){var t=n.isStarted();n.status=1===(e=s(e,a.minimum,1))?null:e;var r=n.render(!t),l=r.querySelector(a.barSelector),c=a.speed,d=a.easing;return r.offsetWidth,i(function(t){var s,i,u,x;""===a.positionUsing&&(a.positionUsing=n.getPositioningCSS()),o(l,(s=e,i=c,u=d,(x="translate3d"===a.positionUsing?{transform:"translate3d("+(-1+s)*100+"%,0,0)"}:"translate"===a.positionUsing?{transform:"translate("+(-1+s)*100+"%,0)"}:{"margin-left":(-1+s)*100+"%"}).transition="all "+i+"ms "+u,x)),1===e?(o(r,{transition:"none",opacity:1}),r.offsetWidth,setTimeout(function(){o(r,{transition:"all "+c+"ms linear",opacity:0}),setTimeout(function(){n.remove(),t()},c)},c)):setTimeout(t,c)}),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout(function(){n.status&&(n.trickle(),e())},a.trickleSpeed)};return a.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*s(Math.random()*t,.1,.95)),t=s(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*a.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()&&(0===t&&n.start(),e++,t++,r.always(function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=a.template;var r,s=t.querySelector(a.barSelector),i=e?"-100":(-1+(n.status||0))*100,l=document.querySelector(a.parent);return o(s,{transition:"all 0 linear",transform:"translate3d("+i+"%,0,0)"}),!a.showSpinner&&(r=t.querySelector(a.spinnerSelector))&&x(r),l!=document.body&&c(l,"nprogress-custom-parent"),l.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(a.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&x(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var i=(r=[],function(e){r.push(e),1==r.length&&function e(){var t=r.shift();t&&t(e)}()}),o=function(){var e=["Webkit","O","Moz","ms"],t={};function r(r,n,a){var s;n=t[s=(s=n).replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})]||(t[s]=function(t){var r=document.body.style;if(t in r)return t;for(var n,a=e.length,s=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((n=e[a]+s)in r)return n;return t}(s)),r.style[n]=a}return function(e,t){var n,a,s=arguments;if(2==s.length)for(n in t)void 0!==(a=t[n])&&t.hasOwnProperty(n)&&r(e,n,a);else r(e,s[1],s[2])}}();function l(e,t){return("string"==typeof e?e:u(e)).indexOf(" "+t+" ")>=0}function c(e,t){var r=u(e),n=r+t;l(r,t)||(e.className=n.substring(1))}function d(e,t){var r,n=u(e);l(e,t)&&(e.className=(r=n.replace(" "+t+" "," ")).substring(1,r.length-1))}function u(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function x(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n})},818421,(e,t,r)=>{var n=Object.create,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(e,t)=>a(e,"name",{value:t,configurable:!0}),d=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of i(t))l.call(e,o)||o===r||a(e,o,{get:()=>t[o],enumerable:!(n=s(t,o))||n.enumerable});return e},u=(e,t,r)=>(r=null!=e?n(o(e)):{}
1,d(!t&&e&&e.__esModule?r:a(r,"default",{value:e,enumerable:!0}),e)),x={},m={default:()=>y,useTopLoader:()=>v};for(var p in m)a(x,p,{get:m[p],enumerable:!0});t.exports=d(a({},"__esModule",{value:!0}),x);var h=u(e.r(745009)),f=u(e.r(271645)),g=u(e.r(716915)),b=u(e.r(716915)),v=c(()=>({start:()=>b.start(),done:e=>b.done(e),remove:()=>b.remove(),setProgress:e=>b.set(e),inc:e=>b.inc(e),trickle:()=>b.trickle(),isStarted:()=>b.isStarted(),isRendered:()=>b.isRendered(),getPositioningCSS:()=>b.getPositioningCSS()}),"useTopLoader"),w=c(({color:e,height:t,showSpinner:r,crawl:n,crawlSpeed:a,initialPosition:s,easing:i,speed:o,shadow:l,template:d,zIndex:u=1600,showAtBottom:x=!1,showForHashAnchor:m=!0,nonce:p})=>{let h=null!=e?e:"#29d",b=l||void 0===l?l?`box-shadow:${l}`:`box-shadow:0 0 10px ${h},0 0 5px ${h}`:"",v=f.createElement("style",{nonce:p},`#nprogress{pointer-events:none}#nprogress .bar{background:${h};position:fixed;z-index:${u};${x?"bottom: 0;":"top: 0;"}left:0;width:100%;height:${null!=t?t:3}px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;${b};opacity:1;-webkit-transform:rotate(3deg) translate(0px,-4px);-ms-transform:rotate(3deg) translate(0px,-4px);transform:rotate(3deg) translate(0px,-4px)}#nprogress .spinner{display:block;position:fixed;z-index:${u};${x?"bottom: 15px;":"top: 15px;"}right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:${h};border-left-color:${h};border-radius:50%;-webkit-animation:nprogress-spinner 400ms linear infinite;animation:nprogress-spinner 400ms linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}`),w=c(e=>new URL(e,window.location.href).href,"toAbsoluteURL"),y=c((e,t)=>{let r=new URL(w(e)),n=new URL(w(t));return r.href.split("#")[0]===n.href.split("#")[0]},"isHashAnchor"),j=c((e,t)=>{let r=new URL(w(e)),n=new URL(w(t));return r.hostname.replace(/^www\./,"")===n.hostname.replace(/^www\./,"")},"isSameHostName");return f.useEffect(()=>{let e,t;function l(e,t){let r=new URL(e),n=new URL(t);if(r.hostname===n.hostname&&r.pathname===n.pathname&&r.search===n.search){let e=r.hash,t=n.hash;return e!==t&&r.href.replace(e,"")===n.href.replace(t,"")}return!1}g.configure({showSpinner:null==r||r,trickle:null==n||n,trickleSpeed:null!=a?a:200,minimum:null!=s?s:.08,easing:null!=i?i:"ease",speed:null!=o?o:200,template:null!=d?d:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'}),c(l,"isAnchorOfCurrentUrl");var u,x,p=document.querySelectorAll("html");let h=c(()=>p.forEach(e=>e.classList.remove("nprogress-busy")),"removeNProgressClass");function f(e){for(;e&&"a"!==e.tagName.toLowerCase();)e=e.parentElement;return e}function b(e){try{let t=e.target,r=f(t),n=null==r?void 0:r.href;if(n){let t=window.location.href,a=""!==r.target,s=["tel:","mailto:","sms:","blob:","download:"].some(e=>n.startsWith(e));if(!j(window.location.href,r.href))return;let i=l(t,n)||y(window.location.href,r.href);if(!m&&i)return;n===t||a||s||i||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||!w(r.href).startsWith("http")?(g.start(),g.done(),h()):g.start()}}catch(e){g.start(),g.done()}}function v(){g.done(),h()}function N(){g.done()}return c(f,"findClosestAnchor"),c(b,"handleClick"),e=(u=window.history).pushState,u.pushState=(...t)=>(g.done(),h(),e.apply(u,t)),t=(x=window.history).replaceState,x.replaceState=(...e)=>(g.done(),h(),t.apply(x,e)),c(v,"handlePageHide"),c(N,"handleBackAndForth"),window.addEventListener("popstate",N),document.addEventListener("click",b),window.addEventListener("pagehide",v),()=>{document.removeEventListener("click",b),window.removeEventListener("pagehide",v),window.removeEventListener("popstate",N)}},[]),v},"NextTopLoader"),y=w;w.propTypes={color:h.string,height:h.number,showSpinner:h.bool,crawl:h.bool,crawlSpeed:h.number,initialPosition:h.number,easing:h.string,
1speed:h.number,template:h.string,shadow:h.oneOfType([h.string,h.bool]),zIndex:h.number,showAtBottom:h.bool}},117595,e=>{"use strict";function t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var r=function e(r,n){function a(e,a,s){if("u">typeof document){"number"==typeof(s=t({},n,s)).expires&&(s.expires=new Date(Date.now()+864e5*s.expires)),s.expires&&(s.expires=s.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var o in s)s[o]&&(i+="; "+o,!0!==s[o]&&(i+="="+s[o].split(";")[0]));return document.cookie=e+"="+r.write(a,e)+i}}return Object.create({set:a,get:function(e){if("u">typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],n={},a=0;a<t.length;a++){var s=t[a].split("="),i=s.slice(1).join("=");try{var o=decodeURIComponent(s[0]);if(n[o]=r.read(i,o),e===o)break}catch(e){}}return e?n[e]:n}},remove:function(e,r){a(e,"",t({},r,{expires:-1}))},withAttributes:function(r){return e(this.converter,t({},this.attributes,r))},withConverter:function(r){return e(t({},this.converter,r),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(r)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});e.s(["default",()=>r])},772400,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(618566),a=e.i(117595);let s={vi:"Chà o bạn! Bạn có muá»n luyá»n Shadowing vá»i giao diá»n tiếng Viá»t không?",ko:"ìë
íì¸ì! ShadowingEnglish를 íêµì´ë¡ ì¬ì©íìê² ì´ì?",ja:"ããã«ã¡ã¯ï¼ShadowingEnglishãæ¥æ¬èªã§ä½¿ãã¾ããï¼",hi:"नमसà¥à¤¤à¥! à¤à¥à¤¯à¤¾ à¤à¤ª ShadowingEnglish à¤à¥ हिà¤à¤¦à¥ मà¥à¤ à¤à¤¸à¥à¤¤à¥à¤®à¤¾à¤² à¤à¤°à¤¨à¤¾ à¤à¤¾à¤¹à¥à¤à¤à¥?",ar:"Ù
Ø±ØØ¨Ùا! ÙÙ ØªØ±ÙØ¯ استخداÙ
ShadowingEnglish باÙÙØºØ© Ø§ÙØ¹Ø±Ø¨ÙØ©Ø",fr:"Bonjour ! Souhaitez-vous utiliser ShadowingEnglish en français ?",pt:"Olá! Gostaria de usar o ShadowingEnglish em português?",zh:"ä½ å¥½ï¼æ³è¦ä½¿ç¨ä¸æç ShadowingEnglish åï¼",th:"สวัสà¸à¸µ! à¸à¸¸à¸à¸à¹à¸à¸à¸à¸²à¸£à¹à¸à¹ ShadowingEnglish à¹à¸à¹à¸à¸ าษาà¹à¸à¸¢à¹à¸«à¸¡?",it:"Ciao! Vuoi usare ShadowingEnglish in italiano?",ru:"ÐÑивеÑ! ХоÑиÑе иÑполÑзоваÑÑ ShadowingEnglish на ÑÑÑÑком ÑзÑке?"},i={vi:{switch:"Chuyá»n sang tiếng Viá»t",dismiss:"Giữ tiếng Anh"},ko:{switch:"íêµì´ë¡ ì í",dismiss:"ìì´ ì ì§"},ja:{switch:"æ¥æ¬èªã«åãæ¿ã",dismiss:"è±èªã®ã¾ã¾"},hi:{switch:"हिà¤à¤¦à¥ मà¥à¤ बदलà¥à¤",dismiss:"à¤
à¤à¤à¥à¤°à¥à¤à¤¼à¥ मà¥à¤ रहà¥à¤"},ar:{switch:"Ø§ÙØªØ¨Ø¯ÙÙ ÙÙØ¹Ø±Ø¨ÙØ©",dismiss:"Ø§ÙØ¨Ùاء Ø¨Ø§ÙØ¥ÙجÙÙØ²ÙØ©"},fr:{switch:"Passer au français",dismiss:"Rester en anglais"},pt:{switch:"Mudar para português",dismiss:"Manter em inglês"},zh:{switch:"忢å°ä¸æ",dismiss:"ä¿æè±æ"},th:{switch:"à¹à¸à¸¥à¸µà¹à¸¢à¸à¹à¸à¹à¸à¸ าษาà¹à¸à¸¢",dismiss:"à¹à¸à¹à¸ าษาà¸à¸±à¸à¸à¸¤à¸©"},it:{switch:"Passa all'italiano",dismiss:"Mantieni inglese"},ru:{switch:"ÐеÑеклÑÑиÑÑ Ð½Ð° ÑÑÑÑкий",dismiss:"ÐÑÑавиÑÑ Ð°Ð½Ð³Ð»Ð¸Ð¹Ñкий"}};function o({suggestedLocale:e}){let o=(0,n.useRouter)(),l=(0,n.usePathname)(),[c,d]=(0,r.useState)(!1);if((0,r.useEffect)(()=>{a.default.get("NEXT_LOCALE")||d(!0)},[]),!c)return null;let u=()=>{a.default.set("NEXT_LOCALE",e,{expires:365,path:"/"}),d(!1);let t=l;for(let e of["en","vi","ko","ja","zh","hi","ar","fr","pt","th","it","de","ru"]){if(l===`/${e}`){t="/";break}if(l.startsWith(`/${e}/`)){t=l.slice(e.length+1);break}}o.push(`/${e}${"/"===t?"":t}`)},x=()=>{a.default.set("NEXT_LOCALE","en",{expires:365,path:"/"}),d(!1)},m=s[e]||s.vi,p=i[e]||i.vi;return(0,t.jsxs)("div",{className:"bg-glass-hover border-b border-border/50 text-txt-primary animate-fadeIn",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 px-3 py-2.5 sm:hidden",children:[(0,t.jsx)("span",{className:"text-[13px] text-center leading-snug",children:m}),(0,t.jsxs)("div",{className:"flex items-center gap-2 font-medium w-full",children:[(0,t.jsx)("button",{onClick:u,className:"flex-1 text-white sp-gradient-bg text-[12px] px-3 py-1.5 rounded-md hover:opacity-90 transition-opacity whitespace-nowrap",children:p.switch}),(0,t.jsx)("button",{onClick:x,className:"flex-1 text-txt-muted hover:text-txt-secondary border border-border/50 text-[12px] px-3 py-1.5 rounded-md transition-colors whitespace-nowrap",children:p.dismiss})]})]}),(0,t.jsxs)("div",{className:"hidden sm:flex items-center justify-center gap-4 px-4 py-3 text-[15px]",children:[(0,t.jsx)("span",{className:"flex-1 max-w-[800px] text-center",children:m}),(0,t.jsxs)("div",{className:"flex items-center gap-3 font-medium flex-shrink-0",children:[(0,t.jsx)("button",{onClick:u,className:"text-white sp-gradient-bg px-3.5 py-1.5 rounded-md hover:opacity-90 transition-opacity",children:p.switch}),(0,t.jsx)("button",{onClick:x,className:"text-txt-muted hover:text-txt-secondary border border-transparent hover:border-border/50 px-3 py-1.5 rounded-md transition-colors",children:p.dismiss})]})]})]})}e.s(["default",()=>o])},519719,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let n=(0,r.createContext)(null);function a({children:e}){let[a,s]=(0,r.useState)(!1),i=(0,r.useCallback)(()=>s(e=>!e),[]),o=(0,r.useMemo)(()=>({open:a,setOpen:s,toggle:i}),[a,i]);return(0,t.jsx)(n.Provider,{value:o,children:e})}function s(){let e=(0,r.useContext)(n);return e||{open:!1,setOpen:()=>{},toggle:()=>{}}}e.s(["SiteNavProvider",()=>a,"useSiteNav",()=>s])},335767,e=>{"use strict";function t(e,r,n={}){let a=[{href:`${r}/practice`,label:e?.practice?.practice||"Practice",emoji:"ð¤",tint:"from-rose-200 to-pink-300"},{href:`${r}/practice/level`,label:e?.practice?.practiceByLevel||"By Level",emoji:"ð",tint:"from-
1amber-200 to-orange-300"},{href:`${r}/practice/topic`,label:e?.practice?.practiceByTopic||"Topics",emoji:"ð§©",tint:"from-lime-200 to-emerald-300"},{href:`${r}/my-videos`,label:e?.myVideos?.title||"My Videos",emoji:"ð¬",tint:"from-violet-200 to-purple-300"},{href:`${r}/games`,label:e?.games?.title||"Games",emoji:"ð®",tint:"from-fuchsia-200 to-rose-300"},{href:`${r}/download`,label:e?.download?.title||"Download App",emoji:"ð±",tint:"from-indigo-200 to-blue-300"},{href:`${r}/training`,label:e?.trainHub?.navLabel||"Training",emoji:"ðï¸",tint:"from-sky-200 to-blue-300",highlight:!0}];return n.authed&&a.unshift({href:`${r}/me`,label:e?.me?.navLabel||"My Progress",emoji:"ð",tint:"from-cyan-200 to-sky-300"}),a}e.s(["getNavItems",()=>t])},340715,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(522016),a=e.i(618566),s=e.i(277149),i=e.i(830058),o=e.i(284614),l=e.i(292270),c=e.i(664030),d=e.i(664659),u=e.i(870273),x=e.i(239616),m=e.i(958377),p=e.i(810980),h=e.i(278716),f=e.i(662031),g=e.i(217923),b=e.i(44951),v=e.i(770703),w=e.i(863774);let y=(0,v.default)(()=>e.A(407805),{loadableGenerated:{modules:[67833]},ssr:!1}),j=(0,v.default)(()=>e.A(811289),{loadableGenerated:{modules:[849043]},ssr:!1});function N(){let{user:e,loading:a,logout:v,progress:N}=(0,i.useAuth)(),k=(0,s.useDictionary)(),S=(0,b.useLangPrefix)(),[C,E]=(0,r.useState)(!1),[_,L]=(0,r.useState)(!1),[T,$]=(0,r.useState)("login"),P=(0,r.useRef)(null),[z,A]=(0,r.useState)(!1),[I,O]=(0,r.useState)(1),U=(0,r.useRef)(null);return((0,r.useEffect)(()=>{function e(e){P.current&&!P.current.contains(e.target)&&L(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,r.useEffect)(()=>{let e=()=>{$("login"),E(!0)},t=()=>{$("register"),E(!0)},r=()=>{$("forgot_password"),E(!0)};return document.addEventListener("open-login",e),document.addEventListener("open-register",t),document.addEventListener("open-forgot-password",r),()=>{document.removeEventListener("open-login",e),document.removeEventListener("open-register",t),document.removeEventListener("open-forgot-password",r)}},[]),(0,r.useEffect)(()=>{let e=new URLSearchParams(window.location.search),t=e.get("auth");if(!t)return;if("forgot-password"===t||"forgot"===t)$("forgot_password"),E(!0);else if("login"===t)$("login"),E(!0);else{if("register"!==t&&"signup"!==t)return;$("register"),E(!0)}e.delete("auth");let r=e.toString(),n=window.location.pathname+(r?`?${r}`:"")+window.location.hash;window.history.replaceState({},"",n)},[]),(0,r.useEffect)(()=>{if(!e){U.current=null;return}let t=e.level||1;null!==U.current&&t>U.current&&(O(t),A(!0)),U.current=t},[e?.level,e?.totalPoints]),a)?(0,t.jsx)("div",{className:"flex items-center",children:(0,t.jsx)("div",{className:"um-skeleton-shimmer w-8 h-8 rounded-full"})}):e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"relative",ref:P,children:[(0,t.jsxs)("button",{className:"flex items-center gap-2.5 pl-1.5 pr-3 py-1.5 bg-card border-2 border-[var(--mo-line)] rounded-full cursor-pointer transition-all hover:border-[var(--accent-primary)]/45 max-md:p-1 max-md:border-2",onClick:()=>L(!_),children:[(0,t.jsx)("div",{className:"w-8 h-8 rounded-full flex items-center justify-center text-white font-bold text-sm overflow-hidden shrink-0",children:e.avatar?(0,t.jsx)("img",{src:e.avatar,alt:"",width:32,height:32,loading:"lazy",className:"w-full h-full object-cover"}):(0,t.jsx)("div",{className:"w-full h-full sp-gradient-bg flex items-center justify-center",children:e.username.charAt(0).toUpperCase()})}),(0,t.jsxs)("div",{className:"flex flex-col items-start max-md:hidden",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-[13px] font-semibold text-txt-primary leading-tight",children:[e.username,e.country&&(0,t.jsx)("span",{className:"text-base leading-none",children:(0,w.countryToFlag)(e.country)})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("span",{className:"flex items-center gap-[3px] text-[11px] text-accent-light font-medium",children:[(0,t.jsx)(c.Trophy,{size:12}),"Lv.",e.level||1]}),(0,t.jsxs)("span",{className:"flex items-center gap-[3px] text-[11px] text-orange-400 font-medium",children:[(0,t.jsx)(m.Flame,{size:12}),e.streak||0]})]})]}
1),(0,t.jsx)(d.ChevronDown,{size:16,className:`text-txt-muted transition-transform max-md:hidden ${_?"rotate-180":""}`})]}),_&&(0,t.jsxs)("div",{className:"um-dropdown-enter absolute top-[calc(100%+8px)] right-0 w-[300px] bg-card border border-border rounded-lg shadow-lg backdrop-blur-[20px] z-[100] overflow-hidden max-md:w-[280px] max-md:-right-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,t.jsx)("div",{className:"w-10 h-10 rounded-full flex items-center justify-center text-white font-bold text-base shrink-0 overflow-hidden",children:e.avatar?(0,t.jsx)("img",{src:e.avatar,alt:"",width:40,height:40,loading:"lazy",className:"w-full h-full object-cover"}):(0,t.jsx)("div",{className:"w-full h-full sp-gradient-bg flex items-center justify-center",children:e.username.charAt(0).toUpperCase()})}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-[15px] font-semibold text-txt-primary",children:[e.username,e.country&&(0,t.jsx)("span",{className:"text-base leading-none",children:(0,w.countryToFlag)(e.country)})]}),(0,t.jsx)("div",{className:"text-xs text-txt-muted",children:e.email})]})]}),(0,t.jsx)("div",{className:"h-px bg-border"}),N.length>0&&!1,(0,t.jsxs)(n.default,{href:`${S}/me`,className:"flex items-center gap-2.5 w-full px-4 py-3.5 bg-transparent text-txt-primary text-sm font-semibold cursor-pointer transition-colors hover:bg-glass-hover no-underline",onClick:()=>L(!1),children:[(0,t.jsx)(g.BarChart3,{size:16,className:"text-accent-primary"}),k.me?.navLabel||"My Progress"]}),(0,t.jsxs)(n.default,{href:`${S}/profile`,className:"flex items-center gap-2.5 w-full px-4 py-3.5 bg-transparent text-txt-primary text-sm font-medium cursor-pointer transition-colors hover:bg-glass-hover no-underline",onClick:()=>L(!1),children:[(0,t.jsx)(x.Settings,{size:16,className:"text-txt-muted"}),k.profile?.editProfile||"Edit Profile"]}),(0,t.jsxs)(n.default,{href:`${S}/my-videos`,className:"flex items-center gap-2.5 w-full px-4 py-3.5 bg-transparent text-txt-primary text-sm font-medium cursor-pointer transition-colors hover:bg-glass-hover no-underline",onClick:()=>L(!1),children:[(0,t.jsx)(h.Video,{size:16,className:"text-txt-muted"}),"My Videos"]}),(0,t.jsxs)(n.default,{href:`${S}/my-shares`,className:"flex items-center gap-2.5 w-full px-4 py-3.5 bg-transparent text-txt-primary text-sm font-medium cursor-pointer transition-colors hover:bg-glass-hover no-underline",onClick:()=>L(!1),children:[(0,t.jsx)(f.Share2,{size:16,className:"text-txt-muted"}),"My Saved Practice"]}),(0,t.jsxs)(n.default,{href:`${S}/training/vocabulary`,className:"flex items-center gap-2.5 w-full px-4 py-3.5 bg-transparent text-txt-primary text-sm font-medium cursor-pointer transition-colors hover:bg-glass-hover no-underline",onClick:()=>L(!1),children:[(0,t.jsx)(p.BookOpen,{size:16,className:"text-txt-muted"}),"My Vocabulary"]}),(0,t.jsx)("div",{className:"h-px bg-border"}),(0,t.jsxs)("button",{className:"flex items-center gap-2.5 w-full px-4 py-3.5 bg-transparent border-none text-error text-sm font-medium cursor-pointer transition-colors hover:bg-red-600/[0.06]",onClick:v,children:[(0,t.jsx)(l.LogOut,{size:16}),k.auth.signOut]})]})]}),(0,t.jsx)(j,{show:z,newLevel:I,onClose:()=>A(!1)})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"relative md:hidden",ref:P,children:[(0,t.jsx)("button",{type:"button","aria-label":k.auth.signIn,"aria-haspopup":"menu","aria-expanded":_,className:"flex items-center justify-center w-10 h-10 rounded-full bg-card border-2 border-[var(--mo-line)] text-txt-secondary cursor-pointer transition-all shadow-[0_3px_0_var(--mo-line)] active:translate-y-[3px] active:shadow-none",onClick:()=>L(!_),children:(0,t.jsx)(o.User,{size:19})}),_&&(0,t.jsxs)("div",{role:"menu",className:"um-dropdown-enter absolute top-[calc(100%+8px)] right-0 w-[190p
1x] bg-card border border-border rounded-xl shadow-lg backdrop-blur-[20px] z-[100] overflow-hidden",children:[(0,t.jsxs)("button",{role:"menuitem",className:"flex items-center gap-2.5 w-full px-4 py-3.5 bg-transparent border-none text-txt-primary text-sm font-semibold cursor-pointer transition-colors hover:bg-glass-hover",onClick:()=>{L(!1),$("login"),E(!0)},children:[(0,t.jsx)(o.User,{size:16,className:"text-txt-muted"}),k.auth.signIn]}),(0,t.jsx)("div",{className:"h-px bg-border"}),(0,t.jsxs)("button",{role:"menuitem",className:"flex items-center gap-2.5 w-full px-4 py-3.5 bg-transparent border-none text-accent-primary text-sm font-extrabold cursor-pointer transition-colors hover:bg-glass-hover",onClick:()=>{L(!1),$("register"),E(!0)},children:[(0,t.jsx)(u.Star,{size:16,className:"text-accent-primary"}),k.auth.signUp]})]})]}),(0,t.jsxs)("div",{className:"hidden md:flex gap-2 items-center",children:[(0,t.jsxs)("button",{className:"flex items-center gap-1.5 px-4 py-2 bg-card border-2 border-[var(--mo-line)] rounded-full text-txt-primary text-[13px] font-bold cursor-pointer transition-all whitespace-nowrap shadow-[0_4px_0_var(--mo-line)] hover:text-accent-primary active:translate-y-[3px] active:shadow-[0_1px_0_var(--mo-line)]",onClick:()=>{$("login"),E(!0)},children:[(0,t.jsx)(o.User,{size:16}),k.auth.signIn]}),(0,t.jsx)("button",{className:"px-5 py-2 bg-[var(--accent-primary)] border-none rounded-full text-white text-[13px] font-extrabold cursor-pointer transition-all whitespace-nowrap shadow-[0_4px_0_var(--accent-primary-dark)] hover:brightness-105 active:translate-y-[3px] active:shadow-[0_1px_0_var(--accent-primary-dark)]",onClick:()=>{$("register"),E(!0)},children:k.auth.signUp})]}),(0,t.jsx)(y,{isOpen:C,onClose:()=>E(!1),initialMode:T})]})}var k=e.i(519719),S=e.i(335767);function C({langPrefix:e}){let o=(0,s.useDictionary)(),l=(0,a.usePathname)(),c=(0,a.useSearchParams)(),{trackPage:d,user:u}=(0,i.useAuth)(),{toggle:x,open:m}=(0,k.useSiteNav)(),p=(0,S.getNavItems)(o,e,{authed:!!u});(0,r.useEffect)(()=>{d(l,e.replace("/","")||"en",c.get("source")||void 0,c.toString()||void 0)},[l,e,d,c]);let[h,f]=(0,r.useState)(!1);(0,r.useEffect)(()=>f(!0),[]);let[g,b]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e,t=()=>{(clearTimeout(e),window.scrollY<=10)?b(!1):(b(!1),e=setTimeout(()=>b(!0),1500))};return window.addEventListener("scroll",t,{passive:!0}),t(),()=>{window.removeEventListener("scroll",t),clearTimeout(e)}},[]);let v=h?p.filter(e=>l===e.href||l.startsWith(`${e.href}/`)).reduce((e,t)=>e&&e.length>=t.href.length?e:t.href,null):null;return(0,t.jsx)("header",{className:`sticky top-0 z-40 w-full bg-[color-mix(in_srgb,var(--bg-primary)_88%,transparent)] backdrop-blur-md border-b border-[var(--mo-line)] transition-transform duration-300 ${g&&!m?"-translate-y-full":"translate-y-0"}`,children:(0,t.jsxs)("div",{className:"max-w-[1440px] mx-auto px-4 sm:px-6 h-16 flex items-center gap-3",children:[(0,t.jsx)("button",{type:"button","aria-label":"Open menu","aria-expanded":m,onClick:x,className:"md:hidden inline-flex items-center justify-center w-10 h-10 rounded-xl border-2 border-[var(--mo-line)] bg-card text-txt-primary shadow-[0_3px_0_var(--mo-line)] hover:border-[var(--accent-primary)]/45 hover:text-[var(--accent-primary)] active:translate-y-[3px] active:shadow-none transition-all shrink-0",children:(0,t.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),(0,t.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),(0,t.jsx)("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),(0,t.jsxs)(n.default,{href:`${e}/`,className:"inline-flex items-center gap-1.5 sm:gap-2 no-underline cursor-pointer min-w-0",children:[(0,t.jsx)("img",{src:"/logo.svg",alt:"ShadowingEnglish",width:32,height:32,className:"w-7 h-7 sm:w-8 sm:h-8 shrink-0"}),(0,t.jsxs)("span",{className:"text-[13px] sm:text-lg font-extrabold tracking-tight whitespace-nowrap text-txt-primary",children:["Shadowing",(0,t.jsx)("span",{className:"text-accent-primary",children:"English"})]})]}),(0,t.jsx)("nav",{className:"hidden md:flex items-center gap-1 ml-2 py-2 overflow-x-auto scrollbar-none",children:p.map(e=>{let r=e.href===v;return(0,t.jsxs)(n.default,{href:e.href,title:e.label,className:`inline-flex items-center px-3.5 py-2 rounded-full text-[13px] font-extrabold whitespace-nowrap transition-all ${r?"text-white hover:text-white bg-[var(--accent-primary)] shadow-[0_3px_0_var(--accent-primary-dark)]":"text-txt-secondary hover:text-[var(--accent-primary)] hover:bg-[var(--accent-primary)]/[0.07]"}`,children:[(0,t.jsx)("span",{children:e.label}
1),e.highlight&&(0,t.jsx)("span",{"aria-hidden":!0,className:`ml-0.5 text-[15px] leading-none ${r?"text-white/85":"text-[var(--accent-secondary)]"}`,children:"*"})]},e.href)})}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsx)("div",{className:"shrink-0",children:(0,t.jsx)(N,{})})]})})}e.s(["default",()=>C],340715)},805803,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(522016),a=e.i(618566),s=e.i(277149),i=e.i(830058),o=e.i(519719),l=e.i(335767);function c({langPrefix:e}){let c=(0,s.useDictionary)(),d=(0,a.usePathname)(),{open:u,setOpen:x}=(0,o.useSiteNav)(),{user:m}=(0,i.useAuth)(),p=(0,l.getNavItems)(c,e,{authed:!!m}),[h,f]=(0,r.useState)(!1);(0,r.useEffect)(()=>f(!0),[]);let g=h?p.filter(e=>d===e.href||d.startsWith(`${e.href}/`)).reduce((e,t)=>e&&e.length>=t.href.length?e:t.href,null):null;return(0,r.useEffect)(()=>{if(!u)return;let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[u]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{onClick:()=>x(!1),"aria-hidden":"true",className:`md:hidden fixed inset-0 z-40 bg-black/40 transition-opacity duration-300 ${u?"opacity-100":"opacity-0 pointer-events-none"}`}),(0,t.jsxs)("aside",{className:`md:hidden fixed top-0 left-0 bottom-0 z-50 w-[300px] max-w-[82%] bg-[var(--bg-card)] border-r-2 border-[var(--mo-line)] rounded-r-3xl shadow-2xl transform transition-transform duration-300 ease-out ${u?"translate-x-0":"-translate-x-full"}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3.5 border-b-2 border-[var(--mo-line)]",children:[(0,t.jsx)("span",{className:"text-lg font-extrabold tracking-tight text-txt-primary",children:"Menu"}),(0,t.jsx)("button",{type:"button","aria-label":"Close menu",onClick:()=>x(!1),className:"inline-flex items-center justify-center w-9 h-9 rounded-xl border-2 border-[var(--mo-line)] bg-card text-txt-primary shadow-[0_3px_0_var(--mo-line)] hover:border-[var(--accent-primary)]/45 hover:text-[var(--accent-primary)] active:translate-y-[3px] active:shadow-none transition-all",children:(0,t.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,t.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),(0,t.jsx)("ul",{className:"flex flex-col gap-1.5 p-3",children:p.map(e=>{let r=e.href===g;return(0,t.jsx)("li",{children:(0,t.jsxs)(n.default,{href:e.href,onClick:()=>x(!1),className:`flex items-center gap-3 px-3 py-2.5 rounded-2xl text-[15px] font-extrabold transition-all active:translate-y-px ${r?"text-white bg-[var(--accent-primary)] shadow-[0_3px_0_var(--accent-primary-dark)]":"text-txt-secondary hover:text-[var(--accent-primary)] hover:bg-[var(--accent-primary)]/[0.07]"}`,children:[(0,t.jsx)("span",{"aria-hidden":!0,className:`inline-flex items-center justify-center w-9 h-9 rounded-2xl bg-gradient-to-br ${e.tint} text-base shadow-[0_2px_0_rgba(42,42,51,0.12)] ${r?"ring-2 ring-white/70":"ring-1 ring-white/60"}`,children:e.emoji}),e.label,e.highlight&&(0,t.jsx)("span",{"aria-hidden":!0,className:`text-[17px] leading-none ${r?"text-white/85":"text-[var(--accent-secondary)]"}`,children:"*"})]})},e.href)})})]})]})}e.s(["default",()=>c])},425746,e=>{"use strict";var t=e.i(843476),r=e.i(522016),n=e.i(618566),a=e.i(277149),s=e.i(117595),i=e.i(375679);let o=[{label:"Pronunciation Practice Exercises",href:"/pronunciation-practice-exercises"},{label:"IELTS Speaking Practice",href:"/ielts-speaking-practice"},{label:"Shadowing Technique Guide",href:"/shadowing-technique-guide"},{label:"Effective English Speaking Practice",href:"/effective-english-speaking-practice"},{label:"Accurate English Pronunciation",href:"/accurate-english-pronunciation"},{label:"Effective Shadowing Method",href:"/effective-shadowing-method"}];function l({langPrefix:e}){return(0,t.jsx)("section",{"aria-label":"Featured pages",className:"border-t border-[var(--border-color)] bg-[var(--bg-secondary)]",children:(0,t.jsxs)("div",{className:"max-w-[1440px] mx-auto px-6 py-6",children:[(0,t.jsx)("h4",{className:"text-[11px] font-semibold uppercase tracking-widest text-[var(--text-muted)] mb-3",children:"ð Featured pages"}),(0,t.jsx)("ul",{className:"list-none m-0 p-0 flex flex-wrap gap-2",children:o.map(n=>(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{href:`${e}${n.href}`,className:"inline-block text-[12.5px] px-3 py-1.5 rounded-full border border-[var(--border-color)] bg-[var(--bg-card)] text-[var(--text-secondary)] no-u
1nderline hover:border-[var(--accent-primary-light)] hover:text-[var(--accent-primary-light)] transition-colors",children:n.label})},n.href))})]})})}let c=["en","vi","ko","ja","zh","hi","ar","fr","pt","th","it","de","ru"],d=new Date().getFullYear(),u=[{code:"en",label:"English"},{code:"vi",label:"Tiếng Viá»t"},{code:"ja",label:"æ¥æ¬èª"},{code:"ko",label:"íêµì´"},{code:"zh",label:"䏿"},{code:"fr",label:"Français"},{code:"pt",label:"Português"},{code:"hi",label:"हिनà¥à¤¦à¥"},{code:"ar",label:"Ø§ÙØ¹Ø±Ø¨ÙØ©"},{code:"th",label:"à¹à¸à¸¢"},{code:"it",label:"Italiano"},{code:"de",label:"Deutsch"},{code:"ru",label:"Ð ÑÑÑкий"}];function x({langPrefix:e}){let o,x=(0,a.useDictionary)(),m=(0,n.usePathname)(),p=function(e){for(let t of c){if(e===`/${t}`)return"/";if(e.startsWith(`/${t}/`))return e.slice(t.length+1)}return e}(m),h=(o=m.split("/")[1],c.includes(o)?o:"en");return(0,t.jsxs)("footer",{className:"relative z-0 mt-16 border-t border-[var(--border-color)]",children:[(0,t.jsx)("div",{className:"max-w-[1440px] mx-auto px-6 pt-12 pb-8",children:(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-10 md:gap-8",children:[(0,t.jsxs)("div",{className:"md:col-span-1",children:[(0,t.jsxs)(r.default,{href:`${e}/`,className:"inline-flex items-center gap-2 no-underline mb-3",children:[(0,t.jsx)("img",{src:"/logo.svg",alt:"ShadowingEnglish",width:28,height:28}),(0,t.jsxs)("span",{className:"text-lg font-bold text-txt-primary",children:["Shadowing",(0,t.jsx)("span",{className:"text-accent-primary",children:"English"})]})]}),(0,t.jsx)("p",{className:"text-[13px] leading-relaxed text-[var(--text-muted)] mt-2 max-w-[260px]",children:x.home?.subtitle?x.home.subtitle:"Practice English speaking with the Shadowing technique â listen and repeat with any video."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-[11px] font-semibold uppercase tracking-widest text-[var(--text-muted)] mb-4",children:"Quick Links"}),(0,t.jsxs)("ul",{className:"list-none m-0 p-0 space-y-2.5",children:[(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{href:`${e}/`,className:"text-[13px] text-[var(--text-secondary)] no-underline hover:text-[var(--accent-primary-light)] transition-colors",children:"ð Home"})}),(0,t.jsx)("li",{children:(0,t.jsxs)(r.default,{href:`${e}/practice`,className:"text-[13px] text-[var(--text-secondary)] no-underline hover:text-[var(--accent-primary-light)] transition-colors",children:["ð ",x.player?.practice||"Practice"]})}),(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{href:`${e}/practice/level`,className:"text-[13px] text-[var(--text-secondary)] no-underline hover:text-[var(--accent-primary-light)] transition-colors",children:"ð Practice by Level"})}),(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{href:`${e}/practice/topic`,className:"text-[13px] text-[var(--text-secondary)] no-underline hover:text-[var(--accent-primary-light)] transition-colors",children:"ð·ï¸ Practice by Topic"})}),(0,t.jsx)("li",{children:(0,t.jsxs)(r.default,{href:`${e}/help`,className:"text-[13px] text-[var(--text-secondary)] no-underline hover:text-[var(--accent-primary-light)] transition-colors",children:["ð¬ ",x.footer?.help||"Help & Support"]})}),(0,t.jsx)("li",{children:(0,t.jsxs)(r.default,{href:`${e}/upgrade`,className:"text-[13px] font-semibold text-[var(--accent-primary)] no-underline hover:text-[var(--accent-primary-light)] transition-colors",children:["ð ",x.footer?.upgrade||"Upgrade to Premium"]})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-[11px] font-semibold uppercase tracking-widest text-[var(--text-muted)] mb-4",children:"Blog"}),(0,t.jsxs)("ul",{className:"list-none m-0 p-0 space-y-2.5",children:[(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{href:`${e}/blog`,className:"text-[13px] text-[var(--text-secondary)] no-underline hover:text-[var(--accent-primary-light)] transition-colors",children:"âï¸ Blog"})}),(0,t.jsx)("li",{children:(0,t.jsxs)(r.default,{href:`${e}/page/about-us`,className:"text-[13px] text-[var(--text-secondary)] no-underline hover:text-[var(--accent-primary-light)] transition-colors",children:["ð ",x.footer?.about||"About Us"]})}),(0,t.jsx)("li",{children:(0,t.jsxs)(r.default,{href:`${e}/page/contact-us`,className:"text-[13px] text-[var(--text-secondary)] no-u
1nderline hover:text-[var(--accent-primary-light)] transition-colors",children:["ð© ",x.footer?.contact||"Contact Us"]})}),(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{href:`${e}/page/privacy-policy`,className:"text-[13px] text-[var(--text-secondary)] no-underline hover:text-[var(--accent-primary-light)] transition-colors",children:"ð Privacy Policy"})}),(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{href:`${e}/page/terms-of-service`,className:"text-[13px] text-[var(--text-secondary)] no-underline hover:text-[var(--accent-primary-light)] transition-colors",children:"âï¸ Terms of Service"})})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-[11px] font-semibold uppercase tracking-widest text-[var(--text-muted)] mb-4",children:"ð Languages"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:u.map(e=>{var r;let n,a=(n=(r=e.code)!==h&&/^\/blog\/[^/]+/.test(p)?"/blog":p,"en"===r?n:`/${r}${"/"===n?"":n}`);return(0,t.jsx)("a",{href:a,onClick:t=>{t.preventDefault(),(0,i.trackLanguageSwitch)(h,e.code),s.default.set("NEXT_LOCALE",e.code,{expires:365,path:"/"}),window.location.href=a},className:"text-[11px] px-2.5 py-1 rounded-full border border-[var(--border-color)] text-[var(--text-muted)] no-underline hover:border-[var(--accent-primary-light)] hover:text-[var(--accent-primary-light)] transition-colors cursor-pointer",children:e.label},e.code)})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-[11px] font-semibold uppercase tracking-widest text-[var(--text-muted)] mb-4",children:"ð± Download App"}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsxs)("a",{href:"https://apps.apple.com/app/apple-store/id6763068329?pt=128815596&ct=website_footer&mt=8",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2.5 bg-black text-white no-underline px-4 py-2.5 rounded-lg hover:bg-gray-900 transition-colors w-fit border border-white/10",children:[(0,t.jsx)("svg",{viewBox:"0 0 384 512",className:"w-[18px] h-[18px] fill-current flex-shrink-0",children:(0,t.jsx)("path",{d:"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"})}),(0,t.jsxs)("div",{className:"flex flex-col leading-none",children:[(0,t.jsx)("span",{className:"text-[8px] uppercase tracking-wider text-gray-400",children:"Download on the"}),(0,t.jsx)("span",{className:"text-[15px] font-semibold mt-0.5",children:"App Store"})]})]}),(0,t.jsxs)("a",{href:"https://play.google.com/store/apps/details?id=com.shadowingenglish.app&referrer=utm_source%3Dwebsite%26utm_medium%3Dfooter",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2.5 bg-black text-white no-underline px-4 py-2.5 rounded-lg hover:bg-gray-900 transition-colors w-fit border border-white/10",children:[(0,t.jsx)("svg",{viewBox:"0 0 512 512",className:"w-[18px] h-[18px] fill-current flex-shrink-0",children:(0,t.jsx)("path",{d:"M325.3 234.3L104.6 13l280.8 161.2-60.1 60.1zM47 0C34 6.8 25.3 19.2 25.3 35.3v441.3c0 16.1 8.7 28.5 21.7 35.3l256.6-256L47 0zm425.2 225.6l-58.9-34.1-65.7 64.5 65.7 64.5 60.1-34.1c18-14.3 18-46.5-1.2-60.8zM104.6 499l280.8-161.2-60.1-60.1L104.6 499z"})}),(0,t.jsxs)("div",{className:"flex flex-col leading-none",children:[(0,t.jsx)("span",{className:"text-[8px] uppercase tracking-wider text-gray-400",children:"GET IT ON"}),(0,t.jsx)("span",{className:"text-[15px] font-semibold mt-0.5",children:"Google Play"})]})]})]}),(0,t.jsxs)("div",{className:"hidden md:flex items-center gap-3 mt-1",children:[(0,t.jsx)("div",{className:"p-1.5 bg-white rounded-lg shadow-sm border border-gray-100",children:(0,t.jsx)("img",{src:"/images/qr-download-v2.png",alt:x.footer?.scanToDownload||"Scan to download the app",width:64,height:64,className:"rounded-md"})}),(0,t.jsx)("span",{className:"text-[9px] text-[var(--text-muted)] uppercase tracking-wider font-semibold max-w-[60px] leading-tight",children:x.footer?.scanToDownload||"Scan to download the app"})]})]})]})]})}),(0,t.jsx)(l,{langPrefix:e}),(0,t.jsx)("div",{className:"border-t border-[var(--border-color)]",children:(0,t.jsxs)("div",{className:"max-w-[1440px] mx-auto px-6 py-4 flex flex-col md:flex-row items-center gap-2 md:gap-4",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-widest text-[var(--text-muted)]",children:x.footer?.ecosystem||"Our Ecosystem"}),(0,t.jsx)("a",{href:"https://shadowingchinese.com",target:"_blank",rel:"noopener",title:"ShadowingChinese â Learn Chinese with the Shadowing technique",className:"text-[13px] text-[var(--text-secondary)] no-u
1nderline hover:text-[var(--accent-primary-light)] transition-colors",children:"ð ShadowingChinese â Learn Chinese with Shadowing"})]})}),(0,t.jsx)("div",{className:"border-t border-[var(--border-color)]",children:(0,t.jsxs)("div",{className:"max-w-[1440px] mx-auto px-6 py-5 flex flex-col md:flex-row items-center justify-between gap-3",children:[(0,t.jsxs)("p",{className:"text-[12px] text-[var(--text-muted)] text-center md:text-left",children:["© ",d," ShadowingEnglish. All rights reserved."]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-[12px] text-[var(--text-muted)]",children:[(0,t.jsxs)("a",{href:"https://www.facebook.com/people/ShadowingEnglish-Master-English-Speaking-with-Shadowing/61571985035931/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-[var(--text-muted)] no-underline hover:text-[#1877F2] transition-colors",children:[(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:(0,t.jsx)("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})}),"Facebook"]}),(0,t.jsx)("span",{className:"w-px h-3 bg-[var(--border-color)]"}),(0,t.jsx)("span",{className:"flex items-center gap-1.5",children:"ð Trusted by learners worldwide"})]})]})})]})}e.s(["default",()=>x],425746)},386254,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(618566),a=e.i(37727),s=e.i(958377),i=e.i(25652),o=e.i(243553),l=e.i(174080),c=e.i(830058),d=e.i(277149);let u="sp_streak_celebrated_date";function x(){let e=new Date,t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${n}`}function m(){let{user:e,loading:m,progress:p}=(0,c.useAuth)(),h=(0,d.useDictionary)(),f=(0,n.usePathname)(),[g,b]=(0,r.useState)(!1),[v,w]=(0,r.useState)(!1),[y,j]=(0,r.useState)(!1),[N,k]=(0,r.useState)(null),S=e?.streak??0,C=f.includes("/practice/"),E=h.streakCelebration||{},_=p.length,L=0===_?0:Math.round(p.reduce((e,t)=>e+(t.percent||0),0)/_);(0,r.useEffect)(()=>{w(!0)},[]),(0,r.useEffect)(()=>{if(!v||m||!e||S<2||C||localStorage.getItem(u)===x())return;let t=setTimeout(()=>{b(!0),requestAnimationFrame(()=>requestAnimationFrame(()=>j(!0)))},1500);return()=>clearTimeout(t)},[v,m,e,S,C]),(0,r.useEffect)(()=>{if(!g)return;let e=!1;return fetch("/api/auth/me/streak-percentile").then(e=>e.ok?e.json():null).then(t=>{!e&&t&&"number"==typeof t.topPercent&&k(t.topPercent)}).catch(()=>{}),()=>{e=!0}},[g]);let T=()=>{j(!1),localStorage.setItem(u,x()),setTimeout(()=>b(!1),300)};if(!g||!e)return null;let $=(E.streakDays||"Reach {n+1} days").replace("{n+1}",String(S+1)).replace("{n}",String(S+1)),P=E.title||"You're heading for day {n+1}! Practice now.",[z,A]=P.includes("{n+1}")?P.split("{n+1}"):[P,""],I=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:`fixed inset-0 z-[99999] transition-all duration-300 ${y?"bg-black/60 backdrop-blur-sm":"bg-transparent"}`,onClick:T}),(0,t.jsx)("div",{className:`fixed z-[99999] top-1/2 left-1/2 w-[calc(100%-32px)] max-w-[380px] transition-all duration-300 ${y?"opacity-100 scale-100":"opacity-0 scale-90"}`,style:{transform:"translate(-50%, -50%)"},role:"dialog","aria-label":E.title||"Streak celebration",onClick:e=>e.stopPropagation(),children:(0,t.jsxs)("div",{className:"relative bg-card border border-border rounded-2xl shadow-2xl backdrop-blur-[20px] overflow-hidden text-center",children:[(0,t.jsx)("div",{className:"absolute top-0 left-0 right-0 h-1 sp-gradient-bg"}),(0,t.jsx)("button",{onClick:T,className:"absolute top-3 right-3 z-10 w-8 h-8 flex items-center justify-center rounded-full bg-glass border border-border text-txt-muted hover:text-txt-primary transition-all cursor-pointer","aria-label":E.close||"Close",children:(0,t.jsx)(a.X,{size:16})}),(0,t.jsxs)("div",{className:"px-6 pt-8 pb-6",children:[(0,t.jsxs)("div",{className:"relative mx-auto w-20 h-20 mb-4",children:[(0,t.jsx)("div",{className:"absolute inset-0 rounded-full bg-amber-500/20 blur-xl animate-pulse"}),(0,t.jsx)("div",{className:"relative w-full h-full rounded-full bg-gradient-to-br from-amber-400 to-orange-500 flex items-center justify-center shadow-lg shadow-amber-500/40",children:(0,t.jsx)(s.Flame,{size:40,className:"text-white drop-shadow",fill:"white",fillOpacity:.25})})]}),(0,t.jsxs)("h3",{className:"text-lg font-bold text-txt-primary mb-2 leading-snug",children:[z,""!==A||z!==P?(0,t.jsx)("span",{className:"text-amber-400",children:S+1}):null,A]}),(0,t.jsx)("p",{className:"text-[13px] text-txt-muted mb-4",children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 px-3 py-1 rounded-full bg-amber-500/10 border border-amber-500/20 text-amber-400 font-bold text-[15px]",children:["ð¥ ",$]})}),(null!==N||_>0)&&(0,t.jsxs)("div",{className:"flex flex-col gap-2 mb-5",children:[null!==N&&(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 px-3 py-2 rounded-xl bg-glass border border-border",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)(o.Crown,{size:16,className:"text-amber-400 shrink-0"}),(0,t.jsx)("span",{className:"text-[12px] font-medium text-txt-secondary truncate",children:E.topPercentLabel||"Top dedicated learners"})]}),(0,t.jsx)("span",{className:"text-[14px] font-bold text-amber-400 tabular-nums whitespace-nowrap",children:(E.topPercentValue||"Top {n}%").replace("{n}",String(N))})]}),_>0&&(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 px-3 py-2 rounded-xl bg-glass border border-border",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,t.jsx)(i.TrendingUp,{size:16,className:"text-accent-light shrink-0"}),(0,t.jsx)("span",{className:"text-[12px] font-medium text-txt-secondary truncate",children:E.avgCompletionLabel||"Avg lesson completion"})]}),(0,t.jsxs)("span",{className:`text-[14px] font-bold tabular-nums whitespace-nowrap ${L>=70?"text-emerald-400":L>=30?"text-sky-400":"text-amber-400"}`,children:[L,"%"]})]})]}),(0,t.jsx)("button",{onClick:T,className:"w-full px-4 py-2.5 sp-gradient-bg text-white text-[13px] font-semibold rounded-xl hover:shadow-glow transition-all hover:-translate-y-
1px cursor-pointer",children:E.cta||"Keep it up!"})]})]})})]});return(0,l.createPortal)(I,document.body)}e.s(["default",()=>m])},26126,e=>{"use strict";var t=e.i(247167),r=e.i(271645);let n=t.default.env.NEXT_PUBLIC_VAPID_PUBLIC_KEY||"";function a(){return(0,r.useEffect)(()=>{if(!("serviceWorker"in navigator)||!("PushManager"in window)||!n||"u"<typeof Notification||"granted"!==Notification.permission)return;let e=!1;return(async()=>{try{let t=await navigator.serviceWorker.register("/sw.js");if(await navigator.serviceWorker.ready,e)return;let r=await t.pushManager.getSubscription();r||(r=await t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:function(e){let t="=".repeat((4-e.length%4)%4),r=(e+t).replace(/-/g,"+").replace(/_/g,"/"),n=window.atob(r),a=new Uint8Array(n.length);for(let e=0;e<n.length;++e)a[e]=n.charCodeAt(e);return a}(n)}));let a=Intl.DateTimeFormat().resolvedOptions().timeZone||null;await fetch("/api/notifications/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({subscription:r.toJSON(),timezone:a})})}catch(e){console.error("[Push] Registration error:",e)}})(),()=>{e=!0}},[]),null}e.s(["default",()=>a])},279277,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(618566),a=e.i(37727),s=e.i(174886),i=e.i(643531),o=e.i(790597),l=e.i(277149);function c(){let e=(0,n.useParams)().lang||"en",c=(0,l.useDictionary)(),[d,u]=(0,r.useState)(null),[x,m]=(0,r.useState)(!1),[p,h]=(0,r.useState)(!1),[f,g]=(0,r.useState)(!1),[b,v]=(0,r.useState)(null),[w,y]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e,t=(e=document.cookie.match(RegExp("(?:^|; )cf_country=([^;]*)")))?decodeURIComponent(e[1]):null;if(t)v(t);else{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;("Asia/Ho_Chi_Minh"===e||"Asia/Saigon"===e)&&v("VN")}},[]),(0,r.useEffect)(()=>{let e=!0;return(async()=>{try{let t=await fetch("/api/broadcast");if(!t.ok)return;let r=await t.json();if(!r.broadcast||!e)return;let n=`broadcast_seen_${r.broadcast.id}`;if(localStorage.getItem(n))return;localStorage.setItem(n,"true"),u(r.broadcast),m(!0),setTimeout(()=>{e&&j()},8e3)}catch{}})(),()=>{e=!1}},[]);let j=(0,r.useCallback)(()=>{y(!0),setTimeout(()=>{m(!1),y(!1)},400)},[]),N=()=>{h(!1)},k="VN"===b||"vi"===e;return k?null:(0,t.jsxs)(t.Fragment,{children:[x&&d&&(0,t.jsx)("div",{onClick:()=>{j(),h(!0)},className:`fixed top-4 left-1/2 -translate-x-1/2 z-[200] max-w-[420px] w-[calc(100%-32px)] cursor-pointer ${w?"animate-toast-exit":"animate-toast-enter"}`,children:(0,t.jsxs)("div",{className:"relative flex items-center gap-3 px-4 py-3 rounded-2xl border border-amber-500/30 bg-[#1a1a2e]/95 backdrop-blur-xl shadow-2xl shadow-amber-500/10",children:[(0,t.jsx)("div",{className:"absolute -top-4 -right-4 w-20 h-20 bg-amber-500/15 rounded-full blur-2xl pointer-events-none"}),(0,t.jsx)("div",{className:"w-10 h-10 rounded-xl bg-[#d97706] flex items-center justify-center shrink-0 shadow-md",children:(0,t.jsx)("span",{className:"text-lg",children:"â"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0 z-10",children:[(0,t.jsx)("p",{className:"text-[13px] font-semibold text-white/90 leading-snug line-clamp-2",children:d.message}),(0,t.jsx)("p",{className:"text-[11px] text-amber-400/80 mt-0.5 font-medium",children:k?"Nhấn Äá» á»§ng há»":"Tap to support"})]}),(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),j()},className:"w-7 h-7 flex items-center justify-center rounded-full bg-white/5 hover:bg-white/10 text-white/50 hover:text-white/80 transition-colors shrink-0 z-10",children:(0,t.jsx)(a.X,{size:14,strokeWidth:2.5})})]})}),p&&(0,t.jsx)("div",{className:"fixed inset-0 z-[300] flex items-center justify-center bg-black/60 backdrop-blur-[2px] px-4 animate-in fade-in duration-300",onClick:N,children:(0,t.jsxs)("div",{className:"relative w-full max-w-[420px] bg-white dark:bg-[#111827] rounded-3xl shadow-2xl p-6 md:p-8 border border-white/10 animate-in zoom-in-95 duration-300",onClick:e=>e.stopPropagation(),children:[(0,t.jsx)("button",{onClick:N,className:"absolute top-4 right-4 w-8 h-8 flex items-center justify-center rounded-full bg-gray-100 dark:bg-white/10 text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white transition-colors",children:(0,t.jsx)(a.X,{size:18,strokeWidth:2.5})}),(0,t.jsxs)("div",{className:"flex flex-col items-center text-center",children:[(0,t.jsx)("div",{className:"w-16 h-16 bg-[#d97706] rounded-2xl flex items-center justify-center mb-5 shadow-lg shadow-orange-500/20 rotate-3",children:(0,t.jsx)("span",{className:"text-3xl",children:"â"})}),d&&(0,t.jsx)("div",{className:"bg-amber-50 dark:bg-amber-500/10 border border-amber-200 dark:border-amber-500/20 rounded-xl px-4 py-3 mb-5 w-full",children:(0,t.jsx)("p",{className:"text-[14px] font-semibold text-amber-700 dark:text-amber-300 leading-snug",children:d.message})}),(0,t.jsx)("h2",{className:"text-[20px] font-bold text-gray-900 dark:text-white mb-2 leading-tight",children:k?"Ủng há» ShadowingEnglish":"Support ShadowingEnglish"}),(0,t.jsx)("p",{className:"text-gray-600 dark:text-gray-300 mb-6 text-[14px] leading-relaxed",children:k?"ShadowingEnglish duy trì miá»
n phà 100% nhá» sá»± á»§ng há» cá»§a bạn. Chi phà máy chá»
1§ và AI rất lá»n â 1 ly cà phê là Äá»ng lá»±c rất lá»n! ð":"ShadowingEnglish remains 100% free thanks to your support. Server and AI costs are high â your coffee keeps us going! ð"}),k?(0,t.jsxs)("div",{className:"bg-amber-50 dark:bg-[rgba(217,119,6,0.08)] border border-amber-200 dark:border-amber-500/20 rounded-2xl p-5 w-full flex flex-col items-center",children:[(0,t.jsx)("div",{className:"bg-white p-2 rounded-xl border border-black/5 shadow-sm mb-4",children:(0,t.jsx)("img",{src:"/donate-qr.jpg",alt:"QR chuyá»n khoản",className:"w-[130px] h-[130px] rounded object-cover"})}),(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 text-gray-800 dark:text-amber-50 text-[13px] w-full",children:[(0,t.jsx)("div",{className:"font-semibold px-3 py-1 bg-black/5 dark:bg-white/10 rounded-full",children:"Techcombank ⢠MAC TRAN TUNG"}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1 w-full justify-center",children:[(0,t.jsx)("code",{className:"text-[15px] font-mono font-bold text-amber-600 dark:text-amber-400 tracking-wider",children:"19036284394017"}),(0,t.jsxs)("button",{onClick:e=>{e.stopPropagation(),navigator.clipboard.writeText("19036284394017").then(()=>{g(!0),setTimeout(()=>g(!1),2e3)})},className:"inline-flex items-center justify-center gap-1.5 px-3 py-1.5 rounded-lg text-[12px] font-bold text-white transition-all shadow-sm active:scale-95 hover:brightness-110",style:{backgroundColor:f?"#10b981":"#f59e0b"},children:[f?(0,t.jsx)(i.Check,{size:14,strokeWidth:3}):(0,t.jsx)(s.Copy,{size:14}),f?"Äã chép":"Copy"]})]})]})]}):(0,t.jsxs)("div",{className:"bg-sky-50 dark:bg-[rgba(59,130,246,0.08)] border border-sky-200 dark:border-sky-500/20 rounded-2xl p-6 w-full flex flex-col items-center",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-[80px] h-[80px] rounded-full bg-[#3b82f6] shadow-[0_4px_14px_rgba(59,130,246,0.25)] mb-6",children:(0,t.jsx)(o.Heart,{className:"text-white fill-white/20",size:36})}),(0,t.jsx)("a",{href:"https://paypal.me/mactung",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-6 py-3.5 rounded-xl text-[15px] font-bold transition-all shadow-[0_4px_14px_rgba(59,130,246,0.25)] hover:scale-[1.03] active:scale-95 bg-[#3b82f6] text-white w-full justify-center",children:c.donate?.button||"Donate via PayPal"})]}),(0,t.jsx)("button",{onClick:N,className:"mt-5 text-[13.5px] font-medium text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 underline underline-offset-4",children:k?"Äá» sau nhé":"Maybe later"})]})]})})]})}e.s(["default",()=>c])},822927,e=>{"use strict";var t=e.i(247167),r=e.i(271645),n=e.i(830058);function a(){let{user:e,loading:a,refreshUser:s}=(0,n.useAuth)();(0,r.useEffect)(()=>{if(!a){if(e){window.google?.accounts?.id?.cancel&&window.google.accounts.id.cancel();return}if(window.google)i();else{let e=document.createElement("script");return e.src="https://accounts.google.com/gsi/client",e.async=!0,e.defer=!0,document.head.appendChild(e),e.onload=()=>{i()},()=>{document.head.removeChild(e)}}}},[e,a,s]);let i=async()=>{if(!window.google)return;let e=t.default.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID;e?(window.google.accounts.id.initialize({client_id:e,callback:o,auto_select:!0,itp_support:!0,use_fedcm_for_prompt:!0}),window.google.accounts.id.prompt()):console.warn("[GoogleOneTap] NEXT_PUBLIC_GOOGLE_CLIENT_ID not set")},o=async e=>{let t=e.credential;try{(await fetch("/api/auth/google-one-tap",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:t})})).ok?(await s(),window.google?.accounts?.id?.cancel&&window.google.accounts.id.cancel()):console.error("[GoogleOneTap] Auth failed")}catch(e){console.error("[GoogleOneTap] Error:",e)}};return null}e.s(["default",()=>a])},987555,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(37727),a=e.i(931091);function s(){let[e,s]=(0,r.useState)([]),[i,o]=(0,r.useState)(0),[l,c]=(0,r.useState)(!1),[d,u]=(0,r.useState)(!1),[x,m]=(0,r.useState)(!1),p=(0,r.useRef)(null),h=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=sessionStorage.getItem("announcement_dismissed");e&&Date.now()<parseInt(e,10)?c(!0):fetch("/api/announcements").then(e=>e.ok?e.json():{items:[]}).then(e=>{e.items?.length>0&&s(e.items)}).catch(()=>{})},[]),(0,r.useEffect)(()=>
1{if(e.length<=1)return;let t=setInterval(()=>{u(!0),setTimeout(()=>{o(t=>(t+1)%e.length),u(!1)},400)},1e4);return()=>clearInterval(t)},[e.length]),(0,r.useEffect)(()=>{let e=()=>{if(p.current&&h.current){let e=p.current.scrollWidth,t=h.current.clientWidth,r=e>t;m(r),r&&p.current.style.setProperty("--wrapper-width",`${t}px`)}},t=setTimeout(e,50);return window.addEventListener("resize",e),()=>{clearTimeout(t),window.removeEventListener("resize",e)}},[i,e]);let f=(0,r.useCallback)(()=>{c(!0),sessionStorage.setItem("announcement_dismissed",String(Date.now()+18e5))},[]);if(l||0===e.length)return null;let g=e[i];return(0,t.jsx)("div",{className:"announcement-bar",children:(0,t.jsxs)("div",{className:"announcement-bar-inner",children:[(0,t.jsx)(a.Megaphone,{size:14,className:"announcement-bar-icon"}),(0,t.jsx)("div",{className:"announcement-bar-text-wrapper",ref:h,children:(0,t.jsx)("span",{ref:p,className:`announcement-bar-text ${d?"announcement-slide-out":"announcement-slide-in"} ${x&&!d?"announcement-marquee":""}`,children:g.message},g.id)}),(0,t.jsx)("button",{className:"announcement-bar-close",onClick:f,"aria-label":"Dismiss announcement",children:(0,t.jsx)(n.X,{size:14})})]})})}e.s(["default",()=>s])},312204,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(618566),a=e.i(174886),s=e.i(643531),i=e.i(790597),o=e.i(37727);let l=(0,e.i(475254).default)("coins",[["path",{d:"M13.744 17.736a6 6 0 1 1-7.48-7.48",key:"bq4yh3"}],["path",{d:"M15 6h1v4",key:"11y1tn"}],["path",{d:"m6.134 14.768.866-.5 2 3.464",key:"17snzx"}],["circle",{cx:"16",cy:"8",r:"6",key:"14bfc9"}]]);var c=e.i(277149),d=e.i(830058);function u(){let{user:e}=(0,d.useAuth)(),u=(0,n.useParams)().lang||"en",x=(0,c.useDictionary)(),[m,p]=(0,r.useState)(!1),[h,f]=(0,r.useState)(!1),[g,b]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=function(e){if("u"<typeof document)return null;let t=document.cookie.match(RegExp(`(?:^|; )${e}=([^;]*)`));return t?decodeURIComponent(t[1]):null}("cf_country");if(e)b(e);else{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;("Asia/Ho_Chi_Minh"===e||"Asia/Saigon"===e)&&b("VN")}},[]),(0,r.useEffect)(()=>{if(e&&10===e.streak){let t=`donate_popup_seen_${e.id}_streak_10`;if(!localStorage.getItem(t)){let e=setTimeout(()=>{p(!0)},1500);return()=>clearTimeout(e)}}},[e]);let v=()=>{e&&localStorage.setItem(`donate_popup_seen_${e.id}_streak_10`,"true"),p(!1)};return"VN"!==g&&"vi"!==u&&m?(0,t.jsx)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 shadow-2xl backdrop-blur-[2px] px-4 animate-in fade-in duration-300",children:(0,t.jsxs)("div",{className:"relative w-full max-w-[420px] bg-white dark:bg-[#111827] rounded-3xl shadow-2xl p-6 md:p-8 border border-white/10 animate-in zoom-in-95 duration-300",children:[(0,t.jsx)("button",{onClick:v,className:"absolute top-4 right-4 w-8 h-8 flex items-center justify-center rounded-full bg-gray-100 dark:bg-white/10 text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white transition-colors",children:(0,t.jsx)(o.X,{size:18,strokeWidth:2.5})}),(0,t.jsxs)("div",{className:"flex flex-col items-center text-center",children:[(0,t.jsx)("div",{className:"w-16 h-16 bg-[#d97706] rounded-2xl flex items-center justify-center mb-5 shadow-[0_4px_14px_rgba(217,119,6,0.25)] rotate-3",children:(0,t.jsx)(l,{size:32,className:"text-white drop-shadow-sm"})}),(0,t.jsx)("h2",{className:"text-[22px] font-bold text-gray-900 dark:text-white mb-2 leading-tight",children:"VN"===g||"vi"===u?"Ủng há» dá»± án":"Support ShadowingEnglish"}),(0,t.jsx)("p",{className:"text-gray-600 dark:text-gray-300 mb-6 text-[14.5px] leading-relaxed",children:"VN"===g||"vi"===u?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"block text-[18px] font-bold text-red-600 dark:text-red-400 mb-3",children:"Tôi rất cần sá»± giúp Äỡ cá»§a bạn."}),"Chá» vá»i ",(0,t.jsx)("strong",{className:"text-lg text-orange-600 dark:text-orange-400",children:"30.000Ä"})," bạn sẽ giúp tôi duy trì website lâu hÆ¡n. Cảm Æ¡n bạn Äã giúp những ngưá»i dùng khác có má»t công cụ há»c táºp má»i ngà y. ð"]}):"ShadowingEnglish remains 100% free thanks to your support. Server and AI costs are high â your support keeps me going! ð"}),"VN"===g||"vi"===u?(0,t.jsxs)("div",{className:"bg-amber-50 dark:bg-[rgba(217,119,6,0.08)] border border-amber-200 dark:border-amber-500/20 rounded-2xl p-5 w-full flex flex-col items-center",children:[(0,t.jsx)("div",{className:"bg-white p-2 rounded-xl border border-black/5 shadow-sm mb-4",children:(0,t.jsx)("img",{src:"/donate-qr.jpg",alt:"QR chuyá»n khoản",className:"w-[130px] h-[130px] rounded object-cover"})}),(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 text-gray-800 dark:text-amber-50 text-[13px] w-full",children:[(0,t.jsx)("div",{className:"font-semibold px-3 py-1 bg-black/5 dark:bg-white/10 rounded-full",children:"Techcombank ⢠MAC TRAN TUNG"}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-1 w-full justify-center",children:[(0,t.jsx)("code",{className:"text-[15px] font-mono font-bold text-amber-600 dar
1k:text-amber-400 tracking-wider",children:"19036284394017"}),(0,t.jsxs)("button",{onClick:()=>{navigator.clipboard.writeText("19036284394017").then(()=>{f(!0),setTimeout(()=>f(!1),2e3)})},className:"inline-flex items-center justify-center gap-1.5 px-3 py-1.5 rounded-lg text-[12px] font-bold text-white transition-all shadow-sm active:scale-95 hover:brightness-110",style:{backgroundColor:h?"#10b981":"#f59e0b"},children:[h?(0,t.jsx)(s.Check,{size:14,strokeWidth:3}):(0,t.jsx)(a.Copy,{size:14}),h?"Äã chép":"Copy"]})]})]})]}):(0,t.jsxs)("div",{className:"bg-sky-50 dark:bg-[rgba(59,130,246,0.08)] border border-sky-200 dark:border-sky-500/20 rounded-2xl p-6 w-full flex flex-col items-center",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-[80px] h-[80px] rounded-full bg-[#3b82f6] shadow-[0_4px_14px_rgba(59,130,246,0.25)] mb-6",children:(0,t.jsx)(i.Heart,{className:"text-white fill-white/20",size:36})}),(0,t.jsx)("a",{href:"https://paypal.me/mactung",target:"_blank",rel:"noopener noreferrer",onClick:v,className:"inline-flex items-center gap-2 px-6 py-3.5 rounded-xl text-[15px] font-bold transition-all shadow-[0_4px_14px_rgba(59,130,246,0.25)] hover:scale-[1.03] active:scale-95 bg-[#3b82f6] text-white w-full justify-center",children:x.donate?.button||"Donate via PayPal"})]}),(0,t.jsx)("button",{onClick:v,className:"mt-5 text-[13.5px] font-medium text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 underline underline-offset-4",children:"VN"===g||"vi"===u?"Äá» sau nhé":"Maybe later"})]})]})}):null}e.s(["default",()=>u],312204)},867217,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(522016),a=e.i(618566);let s=(0,e.i(475254).default)("cookie",[["path",{d:"M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5",key:"laymnq"}],["path",{d:"M8.5 8.5v.01",key:"ue8clq"}],["path",{d:"M16 15.5v.01",key:"14dtrp"}],["path",{d:"M12 12v.01",key:"u5ubse"}],["path",{d:"M11 17v.01",key:"1hyl5a"}],["path",{d:"M7 14v.01",key:"uct60s"}]]);var i=e.i(277149);let o="cookie_consent_v1",l=["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO","GB","CH"];function c(e){window.dataLayer=window.dataLayer||[],"function"!=typeof window.gtag&&(window.gtag=function(){window.dataLayer.push(arguments)}),window.gtag("consent","update",{ad_storage:e.ads,ad_user_data:e.ads,ad_personalization:e.ads,analytics_storage:e.analytics})}function d(){let e=(0,a.useParams)(),d=e?.lang||"en",u="en"===d?"":`/${d}`,x=(0,i.useDictionary)(),m=x?.cookieConsent||{},[p,h]=(0,r.useState)(!1),[f,g]=(0,r.useState)(!1);(0,r.useEffect)(()=>{var e;let t=function(e,t=Date.now()){if(!e)return null;try{let r=JSON.parse(e),n="granted"===r.analytics?"granted":"denied"===r.analytics?"denied":null,a="granted"===r.ads?"granted":"denied"===r.ads?"denied":null;if(!n||!a||"number"!=typeof r.ts||!Number.isFinite(r.ts)||t-r.ts>31536e6)return null;return{analytics:n,ads:a,ts:r.ts}}catch{return null}}(localStorage.getItem(o));if(t)return void c(t);let r=function(e){if("u"<typeof document)return null;let t=document.cookie.match(RegExp(`(?:^|; )${e}=([^;]*)`));return t?decodeURIComponent(t[1]):null}("cf_country");if(!(r?!r||l.includes(r.trim().toUpperCase()):!!(e=Intl.DateTimeFormat().resolvedOptions().timeZone)&&(e.startsWith("Europe/")||"Atlantic/Reykjavik"===e||"Atlantic/Canary"===e)))return;let n=requestAnimationFrame(()=>h(!0));return()=>cancelAnimationFrame(n)},[]);let b=(0,r.useCallback)(e=>{!function(e,t=Date.now()){let r={...e,ts:t};try{localStorage.setItem(o,JSON.stringify(r))}catch{}}(e),c(e),g(!0),setTimeout(()=>h(!1),200)},[]);return p?(0,t.jsx)("div",{role:"dialog","aria-live":"polite","aria-label":m.title||"Cookie settings",className:`fixed bottom-0 left-0 right-0 z-[250] px-3 pb-3 sm:px-4 sm:pb-4 ${f?"opacity-0 transition-opacity duration-200":"animate-slideUp"}`,children:(0,t.jsx)("div",{className:"mx-auto max-w-[880px] bg-card border border-border rounded-xl shadow-lg p-4 sm:p-5",children:(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"w-9 h-9 rounded-lg bg-glass flex items-center justify-center shrink-0 text-accent-primary",children:(0,t.jsx)(s,{size:18,strokeWidth:2})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h2",{className:"text-[15px] font-semibold text-txt-primary leading-snug",children:m.title||"We value your privacy"}),(0,t.jsxs)("p",{className:"text-[13px] text-txt-secondary leading-relaxed mt-1",children:[m.description||"We use cookies to analyse traffic and improve your learning experience. You can accept all cookies or continue with essential ones only."," ",(0,t.jsx)(n.default,{href:`${u}/page/privacy-policy`,className:"text-accent-primary hover:text-accent-dark underline underline-offset-2",children:m.privacyLink||"Privacy Policy"})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 sm:gap-3 shrink-0",children:[(0,t.jsx)("button",{onClick:()=>b({analytics:"denied",ads:"denied"}),className:"flex-1 sm:flex-none text-[13px] font-medium text-txt-secondary hover:text-txt-primary border border-border hover:border-border-focus px-4 py-2 rounded-md transition-colors whitespace-nowrap",children:m.rejectAll||"Essential only"}),(0,t.jsx)("button",{onClick:()=>b({analytics:"granted",ads:"granted"}),className:"flex-1 sm:flex-none text-[13px] font-medium text-white sp-gradient-bg px-4 py-2 rounded-md hover:opacity-90 transition-opacity whitespace-nowrap",children:m.acceptAll||"Accept all"})]})]})})}):null}e.s(["default",()=>d],867217)},581391,e=>{"use strict";var t=e.i(271645),r=e.i(375679);function n(){return(0,t.useEffect)(()=>{let e=new Set,t=0,n=(n,a,s)=>{if(t>=10)return;let i=`${a?"F":"N"}|${n}|${s?.source??""}|${s?.lineno??""}`;if(!e.has(i)){e.add(i),t++;try{(0,r.trackException)(n,a,s)}catch{}}},a=e=>{let t=e.message||"";("Script error."!==t||e.error)&&n((e.error?.stack?String(e.error.stack).slice(0,200):"")||`${t} @ ${e.filename}:${e.lineno}:${e.colno}`,/ChunkLoadError|Loading chunk|Failed to fetch dynamically imported module/i.test(t+" "+(e.error?.name||"")),{type:e.error?.name||"Error",source:e.filename||"",lineno:e.lineno||0})},s=e=>{let t=e.reason,r=t instanceof Error?t.message:String(t??"unhandled rejection"),a=t instanceof Error&&t.stack?String(t.stack).slice(0,200):"",s=/ChunkLoadError|Loading chunk|Failed to fetch dynamically imported module/i.test(r+" "+(t?.name||""));n(a||r,s,{type:t?.name||"UnhandledRejection"})};return window.addEventListener("error",a),window.addEventListener("unhandledrejection",s),()=>{window.removeEventListener("error",a),window.removeEventListener("unhandledrejection",s)}},[]),null}e.s(["default",()=>n])},671231,e=>{"use strict";var t=e.i(271645),r=e.i(402842);function n(){return(0,t.useEffect)(()=>{(0,r.recordReturnVisit)()},[]),null}e.s(["default",()=>n])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.