1import{r as l,j as e,L as dt,i as Wr,k as hn,c as Gn,d as $r,e as _r,f as he}from"./vendor-react-Df_OrbJ8.js";import{d as Dr,a as ue,u as be,m as Pn,o as Rr,y as zr}from"./index-rKPUXJsi.js";import{l as Lr,U as Or,C as Wt,r as Yn,G as $t,a as _t,t as Jn,P as Mr,b as Nr,E as qr,h as Br,s as An,g as Fn,i as Tn,f as Kn,j as Qn,c as ft,d as mn,e as wt,k as Wn,o as Xn,m as an,n as $n,p as Hr}from"./reviewRefs-TO5psJdl.js";import{aG as Ur,p as We,l as Ae,m as rt,n as ke,T as a,A as Le,F as Zn,o as ut,q as Ye,r as Ee,c as C,B as i,s as Oe,b as Te,Z as tt,h as Vr,Q as fn,y as Gr,z as pn,G as Yr,a7 as Mt,P as Q,D as Re,w as Jr,K as we,N as er,O as ce,R as tr,U as nr,C as Dt,M as rr,W as Kr,X as $e,Y as Qr,i as Je,J as Xr,_ as qe,u as Zr,$ as eo,a0 as gn,a1 as to,a2 as or,aH as no,t as sr,aI as ar,aJ as ir,ad as je,aK as ht,a3 as Nt,a4 as qt,e as oe,a5 as Ct,a6 as lr,a8 as jn,a9 as cr,aa as dr,ab as xr,ac as yt,ae as bn,ag as yn,ah as Ve,ai as ur,aj as hr,ak as mr,al as fr,am as pr,L as Ie,d as le,an as ro,ao as oo,ap as bt,aq as so,ar as ao,as as io,at as Jt,au as lo,av as co,aw as Et,ax as It,v as xo,ay as uo,az as Kt,aA as Qt,aB as it,aC as Z,aD as Xt,aE as ho,aF as _n}from"./vendor-mui-B8ynRMiJ.js";import{n as mo}from"./normalizeProblems-Cgf0SYOI.js";import{u as pt}from"./useDataLoaded-jI8nuM1B.js";import"./vendor-BpmyTNDJ.js";const fo="https://nicheelab-api.fjyjfrtfzy.workers.dev";function gr(){return localStorage.getItem("exam_jwt_token")}function vn(o){localStorage.setItem("exam_jwt_token",o)}function po(){localStorage.removeItem("exam_jwt_token")}async function ve(o,t={}){const s=gr(),r={"Content-Type":"application/json",...t.headers||{}};s&&(r.Authorization=`Bearer ${s}`);const d=await fetch(`${fo}${o}`,{...t,headers:r});if(!d.ok){const n=await d.json().catch(()=>({error:"Network error"})),E=n.error||`HTTP ${d.status}`,p=new Error(Lr(E,n.code,d.status));throw p.status=d.status,p.code=n.code,p}return d.json()}async function Rt(o,t,s){return ve("/api/auth/send-otp",{method:"POST",body:JSON.stringify({email:o,type:t,turnstileToken:s})})}const Bt="vault-pro-exam";async function go(o){const t=await ve("/api/auth/register",{method:"POST",body:JSON.stringify({...o,productId:Bt,...Dr()})});return vn(t.token),t}async function jo(o,t,s){return ve("/api/auth/reset-password",{method:"POST",body:JSON.stringify({email:o,otpCode:t,newPassword:s})})}async function bo(o,t,s){const r=await ve(`/api/auth/login?productId=${encodeURIComponent(Bt)}`,{method:"POST",body:JSON.stringify({email:o,password:t,turnstileToken:s})});return vn(r.token),r}async function Dn(){const o=await ve(`/api/auth/me?productId=${encodeURIComponent(Bt)}`);return o.token&&vn(o.token),o}function Rn(){po()}function Zt(){return!!gr()}async function jr(o){return ve("/api/answers",{method:"POST",body:JSON.stringify(o)})}async function Sn(o,t,s){return ve(`/api/answers/history?exam_type=${o}&set=${t}&set_number=${s}`)}async function zn(o,t){return ve(`/api/answers/history/sets?exam_type=${o}&set=${t}`)}async function en(o,t){const s=new URLSearchParams;return o&&s.set("exam_type",o),t&&s.set("set",t),ve(`/api/answers/reset?${s.toString()}`,{method:"DELETE"})}async function yo(){return ve(`/api/subscription?productId=${encodeURIComponent(Bt)}`)}async function br(o){return ve("/api/consents",{method:"POST",body:JSON.stringify(o)})}async function vo(o,t){return ve(`/api/admin/questions?exam_type=${o}&set=${t}`)}async function So(o){return ve("/api/admin/questions",{method:"POST",body:JSON.stringify(o)})}async function wo(o,t){return ve(`/api/admin/questions/${o}`,{method:"PUT",body:JSON.stringify(t)})}async function Co(o){return ve(`/api/admin/questions/${o}`,{method:"DELETE"})}async function ko(){return ve("/api/admin/users")}async function Eo(){return ve("/api/admin/categories")}const yr=l.createContext(null),tn="exam_auth_user";function Io({children:o}){const[t,s]=l.useState(null),[r,d]=l.useState(!0);l.useEffect(()=>{(async()=>{if(Zt())try{const{user:u}=await Dn();s({id:u.id,email:u.email,plan:u.plan,role:u.role})}catch(u){const c=u.status;(c===401||c===404)&&Rn()}else{const u=localStorage.getItem(tn);if(u)try{s(JSON.parse(u))}catch{localStorage.removeItem(tn)}}d(!1)})()},[]),l.useEffect(()=>{const u=c=>{if(!(c.key!=="exam_jwt_token"&&c.key!==tn&&c.key!=="exam_plan_refresh")){if(!Zt()){s(null);return}Dn().then(({user:h})=>{s({id:h.id,email:h.email,plan:h.plan,role:h.role})}).catch(()=>{})}};return window.addEventListener("storage",u),()=>window.removeEventListener("storage",u)},[]);const n=l.useCallback(async(u,c,h)=>{try{const{user:g}=await bo(u,c,h);return s({id:g.id,email:g.email,plan:g.plan,role:g.role}),{ok:!0}}catch(g){return{ok:!1,status:g.status,code:g.code}}},[]),E=l.useCallback(async u=>{{const{user:c}=await go(u);s({id:c.id,email:c.email,plan:c.plan,role:c.role});return}},[]),p=l.useCallback(()=>{s(null),Rn()},[]),b=l.useCallback(async()=>
1{if(Zt())try{const u=await yo();s(c=>c?{...c,plan:u.plan}:null)}catch{}},[]),S={user:t,isLoggedIn:!!t,isSubscribed:(t==null?void 0:t.plan)==="premium",loading:r,login:n,register:E,logout:p,refreshSubscription:b};return e.jsx(yr.Provider,{value:S,children:o})}function Fe(){const o=l.useContext(yr);if(!o)throw new Error("useAuth must be used within AuthProvider");return o}const nn="vault_pro_exam_selected_type",vr=l.createContext(null),Po=["vaultPro"];function Ao(o){return!!o&&Po.includes(o)}function Fo({children:o}){const[t,s]=l.useState(()=>{const n=localStorage.getItem(nn);return Ao(n)?n:"vaultPro"});l.useEffect(()=>{t?localStorage.setItem(nn,t):localStorage.removeItem(nn)},[t]);const r=l.useCallback(n=>{s(n)},[]),d=l.useCallback(()=>{s(null)},[]);return e.jsx(vr.Provider,{value:{examType:t,setExamType:r,clearExamType:d},children:o})}function ze(){const o=l.useContext(vr);if(!o)throw new Error("useExam must be used within ExamProvider");return o}const Ln="exam_sound_enabled",Sr=l.createContext(null);function To({children:o}){const[t,s]=l.useState(!1);l.useEffect(()=>{const d=localStorage.getItem(Ln);s(d==="true")},[]);const r=l.useCallback(()=>{s(d=>{const n=!d;return localStorage.setItem(Ln,String(n)),n})},[]);return e.jsx(Sr.Provider,{value:{soundEnabled:t,toggleSound:r},children:o})}function Ht(){const o=l.useContext(Sr);if(!o)throw new Error("useSound must be used within SoundProvider");return o}const On="exam_dark_mode",wr=l.createContext(null);function Wo({children:o}){const[t,s]=l.useState(!1);l.useEffect(()=>{const d=localStorage.getItem(On);s(d==="true")},[]);const r=l.useCallback(()=>{s(d=>{const n=!d;return localStorage.setItem(On,String(n)),n})},[]);return e.jsx(wr.Provider,{value:{darkMode:t,toggleDarkMode:r},children:o})}function Be(){const o=l.useContext(wr);if(!o)throw new Error("useTheme must be used within ThemeProvider");return o}const rn="exam_easy_mode",Cr=l.createContext(null);function $o({children:o}){const[t,s]=l.useState(!0);l.useEffect(()=>{const d=localStorage.getItem(rn);d!==null?s(d==="true"):localStorage.setItem(rn,"true")},[]);const r=l.useCallback(()=>{s(d=>{const n=!d;return localStorage.setItem(rn,String(n)),n})},[]);return e.jsx(Cr.Provider,{value:{easyMode:t,toggleEasyMode:r},children:o})}function Ut(){const o=l.useContext(Cr);if(!o)throw new Error("useEasyMode must be used within EasyModeProvider");return o}function gt({color:o="inherit",justifyContent:t="center"}){const{siteLocale:s}=ue(),r=(n,E)=>s==="en"?E:n,d=n=>s==="en"?`/en${n}`:n;return e.jsxs(Ur,{direction:"row",spacing:2,justifyContent:t,useFlexGap:!0,flexWrap:"wrap",children:[e.jsx(We,{component:dt,to:d("/terms/"),underline:"hover",color:o,sx:{fontSize:13},children:r("å©ç¨è¦ç´","Terms of Service")}),e.jsx(We,{component:dt,to:d("/privacy/"),underline:"hover",color:o,sx:{fontSize:13},children:r("ãã©ã¤ãã·ã¼ããªã·ã¼","Privacy Policy")}),e.jsx(We,{component:dt,to:d("/legal/"),underline:"hover",color:o,sx:{fontSize:13},children:r("ç¹å®åå弿³ã«åºã¥ã表è¨","Notation based on the Act on Specified Commercial Transactions")}),e.jsx(We,{component:dt,to:d("/contact"),underline:"hover",color:o,sx:{fontSize:13},children:r("ãåãåããã»è§£ç´","Contact & Cancellation")})]})}const _o={squidInk:"#232F3E",darkBlue:"#1B2631",accent:"#E6B800",accentHover:"#C9A200",lightGray:"#F5F7FA",borderGray:"#E0E4E8",textPrimary:"#1B2631",textSecondary:"#545B64",textMuted:"#879596",success:"#1D8102",successLight:"#E6F4EA",error:"#D13212",errorLight:"#FDE8E4",cardBg:"#FFFFFF",accentBlue:"#F5D840",orange:"#E6B800",onAccent:"#1B2631",orangeHover:"#C9A200"},_e=_o,Ce=o=>(o==null?void 0:o.trim())||"",ln=Ce("NicheeLabï¼ä»£è¡¨ï¼åç°ç¥ç« ï¼"),cn=Ce("æ±äº¬é½æ¸è°·åºæµæ¯å¯¿è¥¿2ä¸ç®4çª8å·ã¦ã£ã³ãæµæ¯å¯¿ãã«8F"),Do=Ce("NicheeLab (Representative: Hiroaki Yoshida)"),Ro=Ce("8F Wind Ebisu Building, 2-4-8 Ebisu-nishi, Shibuya-ku, Tokyo 150-0021, Japan"),At=Ce("[email protected]"),Mn=Ce("[email protected]"),zo={ja:"Vault Operations Professionalå¦ç¿",en:"Vault Operations Professional Exam Prep"},dn=Ce("")||Ce("https://buy.stripe.com/aFafZhfdy5Kx5ib7LH1sQ03"),kr=Ce("https://billing.stripe.com/p/login/4gM8wPc1m2ylfWPc1X1sQ00"),wn=dn.length>0,Lo=kr.length>0,xn=Ce(void 0)||Ce("https://buy.stripe.com/4gM6oHe9u5KxfWP2rn1sQ0e"),Ke=xn.length>0,xt={priceLabel:{ja:"90æ¥é Â¥1,980 è²·ãåãï¼èªåæ´æ°ãªãï¼",en:"Â¥1,980 one-time for 90 days (US$12.60 · no auto-renewal)"}};function Er(o){if(!xn)return"#";const t=new URL(xn);return o!=null&&o.id&&t.searchParams.set("client_reference_id",`u${o.id}`),o!=null&&o.email&&t.searchParams.set("prefilled_email",o.email),t.toString()}function Ir(o){if(!dn)return"#";const t=new URL(dn);return o!=null&&o.id&&t.searchParams.set("client_reference_id",`u${o.id}`),o!=null&&o.email&&t.searchParams.set("prefilled_email",o.email),t.toString()}const mt=[ln?null:{ja:"äºæ¥è
å",en:"Business name"},cn?null:{ja:"使",en:"Address"},At?null:{ja:"åãåããå
ã¡ã¼ã«ã¢ãã¬ã¹",en:"Contact email address"}].filter(o=>o!==null),X={serviceName:zo,operatorName:{ja:ln||"è¦è¨å®",en:Do||ln||"Not set"},businessAddress:{ja:cn||"è¦è¨å®",en:Ro||cn||"Not set"},contactEmail:At||"[email protected]",phoneNumber:{ja:Ce("è«æ±ããã£ãå ´åãé
æ»ãªãé示ãããã¾ãã")||"è«æ±ããã£ãå ´åãé
æ»ãªãé示ãã¾ãã",en:Ce(void 0)||"Disclosed without delay upon request."},priceDisplay:{ja:Ce("åä½ãã©ã³ æé¡980åï¼ç¨è¾¼ï¼ã¾ã㯠90æ¥é 1,980åï¼ç¨è¾¼ã»è²·ãåãã»èªåæ´æ°ãªãï¼ï¼å
¨è©¦é¨ãã㯠æé¡2,980åï¼ç¨è¾¼ï¼")||"Vault Professional: æé¡980åï¼ç¨è¾¼ï¼ã¾ã㯠90æ¥é 1,980åï¼ç¨è¾¼ã»è²·ãåãã»èªåæ´æ°ãªãï¼",en:Ce("Single-exam plan: Â¥980/month or Â¥1,980 one-time for 90 days (no auto-renewal; tax included) / All-exams pack: Â¥2,980/month (tax included)")||"Vault Professional: 980 yen per month or 1,980 yen one-time for 90 days (no auto-renewal; tax included)"},paymentMethods:{ja:"ã¯ã¬ã¸ããã«ã¼ã決æ¸ï¼Stripeï¼",en:"Credit card payment (Stripe)"},serviceStartTiming:{ja:"決æ¸å®äºå¾ãç´ã¡ã«ææãã©ã³ããå©ç¨ããã ãã¾ãã",en:"The paid plan becomes available for use immediately after payment is completed."},cancellationPolicy:{ja:"Stripe Customer Portal ã¾ãã¯ã¢ããªå
ã®ããµãã¹ã¯ç®¡çããããã¤ã§ãè§£ç´ã§ãã¾ããè§£ç´å¾ã¯æ¬¡åæ´æ°æ¥ä»¥éã®èª²éã忢ãã¾ããè²·ã
1åããã©ã³ã¯èªåæ´æ°ããªããæéæºäºã§èªåçã«çµäºãã¾ãï¼è§£ç´æç¶ãã¯ä¸è¦ã§ãï¼ã",en:'You can cancel at any time from the Stripe Customer Portal or from "Manage Subscription" in the app. After cancellation, we stop billing you from the next renewal date onward. One-time 90-day plans do not auto-renew and end automatically when the period expires (no cancellation needed).'},refundPolicy:{ja:"ãã¸ã¿ã«ã³ã³ãã³ãã®æ§è³ªä¸ã決æ¸å®äºå¾ã®è¿éã¯ååã¨ãã¦æ¿ã£ã¦ãã¾ãããæ³ä»¤ä¸è¿éãå¿
è¦ãªå ´åãé¤ãã¾ãã",en:"Due to the nature of digital content, we do not accept refunds after payment is completed, as a general rule. This does not apply where a refund is required by law."},abuseContactEmail:{ja:Mn||At||"è¦è¨å®",en:Mn||At||"Not set"}},Nn={ja:"æ¬ãµã¼ãã¹ã¯è³æ ¼ãã¨ã®æé¡èª²éå¶ã§ãããµãã¹ã¯ãªãã·ã§ã³ã¯èªåæ´æ°ããã¾ããã¦ã¼ã¶ã¼ã¯ãã¤ãã¼ã¸ãããã¤ã§ãè§£ç´ã§ãã¾ããè§£ç´å¾ãæ¬¡åæ´æ°æ¥ä»¥éã®èª²éã¯è¡ããã¾ãããæ¢ã«æ¯æãããæéã®è¿éã¯è¡ãã¾ããã",en:"This service is billed monthly on a per-certification basis. Subscriptions renew automatically. Users may cancel at any time from My Page. After cancellation, no charges will be made on or after the next renewal date. Fees already paid will not be refunded."},qn={ja:"90æ¥éã®è²·ãåããã©ã³ã§ããæ±ºæ¸ã¯1åã®ã¿ã§ãèªåæ´æ°ã次å以éã®èª²éã¯ããã¾ãããæéæºäºã§èªåçã«çµäºãã¾ãï¼è§£ç´æç¶ãã¯ä¸è¦ã§ãï¼ãæ¢ã«æ¯æãããæéã®è¿éã¯è¡ãã¾ããã",en:"This is a one-time 90-day plan. You are charged once; it does not auto-renew and no further charges are made. Access ends automatically when the period expires (no cancellation needed). Fees already paid are not refunded."},zt={ja:"ä¸åæ ¼ä¿è¨¼: æææéä¸ã«æ¬è©¦é¨ãåé¨ãã¦ä¸åæ ¼ã ã£ãå ´åãã¹ã³ã¢ã¬ãã¼ãããéãããã ããã°åããã©ã³ã90æ¥éç¡åã§å»¶é·ãã¾ãï¼1åéãï¼ã",en:"Fail-safe: if you sit the real exam during your paid period and do not pass, send us your score report and we extend the same plan free of charge for 90 days (once)."},Lt={ja:"åæ ¼ãããåæ ¼å ±åï¼ã¹ã³ã¢ã¬ãã¼ãï¼ããéããã ãããæ¬¡ã®è³æ ¼ã®ååæéã30%ãªãã«ãªãã³ã¼ãããæ¸¡ããã¾ãã",en:"Passed? Send us your score report and we will give you a code for 30% off your first payment on the next certification."},Oo=[{ja:"HashiCorp Vault Operations Professional èªå®è©¦é¨ (VP-003) 対çã®ããã®å¦ç¿ãã©ãããã©ã¼ã ã§ãã",en:"This is a learning platform for preparing for the HashiCorp Vault Operations Professional (VP-003) certification exam."},{ja:"ç¡æãã©ã³ã§ã¯ä¸é¨åé¡ã®ã¿ãææãã©ã³ã§ã¯å
¨åé¡ã¨æ¨¡æ¬è©¦é¨ãå©ç¨ã§ãã¾ãã",en:"The free plan gives access to only some of the questions, while the paid plan gives access to all questions and the mock exams."},{ja:"ææãã©ã³ã¯æé¡èª²éã»èªåæ´æ°ã®ãµãã¹ã¯ãªãã·ã§ã³ãã¾ãã¯90æ¥éã®è²·ãåãï¼èªåæ´æ°ãªãã»æéæºäºã§èªåçµäºï¼ã§ãã",en:"Paid plans are either a monthly auto-renewing subscription or a one-time 90-day plan (no auto-renewal; access ends when the period expires)."},{ja:"ä¸åæ ¼ä¿è¨¼: æææéä¸ã«æ¬è©¦é¨ãåé¨ãã¦ä¸åæ ¼ã ã£ãå ´åãã¹ã³ã¢ã¬ãã¼ãã®æåºã«ããåããã©ã³ã90æ¥éç¡åã§å»¶é·ãã¾ãï¼1åéããè¿éã§ã¯ããã¾ããï¼ã",en:"Fail-safe: if you sit the real exam during your paid period and do not pass, we extend the same plan free of charge for 90 days upon submission of your score report (once; this is an extension, not a refund)."}],Mo=[{ja:"å顿ã»è§£èª¬ã»ç»åã»UI ã®ç¡æè»¢è¼ãè¤è£½ãåé
å¸",en:"Unauthorized reproduction, copying, or redistribution of questions, explanations, images, or the UI"},{ja:"ã¹ã¯ã¬ã¤ãã³ã°ãã¯ãã¼ãªã³ã°ãbot ã«ãã大éåå¾",en:"Scraping, crawling, or bulk retrieval by bots"},{ja:"䏿£ã¢ã¯ã»ã¹ãèå¼±æ§æ¢ç´¢ãèªè¨¼åé¿ã第ä¸è
ã¢ã«ã¦ã³ãã®å©ç¨",en:"Unauthorized access, vulnerability probing, circumvention of authentication, or use of a third party's account"},{ja:"ãµã¼ãã¹éå¶ã妨害ããè¡çºãæ³ä»¤ã¾ãã¯å
¬åºè¯ä¿ã«åããè¡çº",en:"Acts that interfere with the operation of the Service, or acts that violate laws and regulations or public order and morals"}],No=[{ja:"ä¼å¡ç»é²ã»ãã°ã¤ã³æã®ã¡ã¼ã«ã¢ãã¬ã¹",en:"Email address provided at registration and login"},{ja:"èªè¨¼ã»èª²é管çã«å¿
è¦ãªè奿
å ±ï¼Stripe customer ID / subscription IDï¼",en:"Identifiers required for authentication and billing management (Stripe customer ID / subscription ID)"},{ja:"ã¢ã¯ã»ã¹ãã°ãIP ã¢ãã¬ã¹ããã©ã¦ã¶æ
å ±ãæä½ãã°",en:"Access logs, IP addresses, browser information, and operation logs"},{ja:"ä¼å¡ç»é²æã®æµå
¥å
æ
å ±ï¼åç
§å
URLãutm_source / utm_medium / utm_campaignãæåã«é²è¦§ãããã¼ã¸ã®ãã¹ï¼",en:"Acquisition information recorded at registration (referring URL, utm_source / utm_medium / utm_campaign, and the path of the first page viewed)"},{ja:"Cookieããã¼ã«ã«ã¹ãã¬ã¼ã¸ãã»ãã·ã§ã³æ
å ±",en:"Cookies, local storage, and session information"}],qo=[{ja:"ä¼å¡ç»é²ãæ¬äººç¢ºèªããã°ã¤ã³èªè¨¼ããã¹ã¯ã¼ãåè¨å®",en:"Account registration, identity verification, login authentication, and password reset"},{ja:"ææãã©ã³ã®æ±ºæ¸ããµãã¹ã¯ãªãã·ã§ã³ç®¡çãè§£ç´å¯¾å¿",en:"Payment for paid plans, subscription management, and cancellation handling"},{ja:"å¦ç¿å±¥æ´ãæ£ççãå¼±ç¹åæãªã©ã®æ©è½æä¾",en:"Providing features such as study history, accuracy rate, and weak-area analysis"},{ja:"ãµã¼ãã¹æ¹åãé害調æ»ã䏿£å©ç¨æ¤ç¥ããµãã¼ã対å¿",en:"Service improvement, incident investigation, detection of fraudulent use, and support response"},{ja:"ã©ã®è¨äºã»åºåçµç±ã®ç»é²ãã®ææ¡ï¼ã³ã³ãã³ãæ¹åã®ããã®éè¨ãå人ã®è¡å追跡ã«ã¯å©ç¨ãã¾ããï¼",en:"Understanding which article or advertisement led to a registration (aggregated for content improvement; not used to track individuals)"}],Bo=[{name:"Stripe",purpose:{ja:"決æ¸å¦çããµãã¹ã¯ãªãã·ã§ã³ç®¡çãCustomer Portal æä¾",en:"Payment processing, subscription management, and provision of the Customer Portal"}},{name:"Cloudflare Turnstile",purpose:{ja:"bot 対çã䏿£ãªã¯ã¨ã¹ãææ¢",en:"Bot countermeasures and deterrence of unauthorized requests"}},{name:"Cloudflare Analytics",purpose:{ja:"ã¢ã¯ã»ã¹åæã¨å質æ¹å",en:"Access analysis and quality improvement"}},{name:"Resend",purpose:{ja:"èªè¨¼ã³ã¼ãã»æ¡å
ã¡ã¼ã«ã®éä¿¡",en:"Sending verification codes and notification emails"}}],Pr=[{ja:"æ¬ãµã¼ãã¹ã®åé¡ã»è§£èª¬ã¯å
¬å¼è©¦é¨åé¡ã®è»¢è¼ã§ã¯ãªããå
¬éããã試é¨ã¬ã¤ããå
¬å¼ããã¥ã¡ã³ãã®åºé¡ç¯å²ãåèã«ç¬èªä½æãã¦ãã¾ãã",en:"The questions and explanations on this service are not reproductions of official exam questions; they are created independently with reference to the exam scope set out in publicly available exam guides and official documentation."},{ja:"HashiCorpãVault 㯠HashiCorp, Inc. ã®åæ¨ã§ãã",en:"HashiCorp and Vault are trademarks of HashiCorp, Inc."}],Ze=_e,Bn={termsAccepted:!1,privacyAccepted:!1,autoRenewalAccepted:!1};function un({open:o,onClose:t,onConfirm:s,loading:r=!1,error:d="",plan:n="monthly"}){const{siteLocale:E,buildPath:p}=ue(),b=(g,y)=>E==="en"?y:g,[S,u]=l.useState(Bn);l.useEffect(()=>{o&&u(Bn)},[o]);const c=S.termsAccepted&&S.privacyAccepted&&S.autoRenewalAccepted,h=g=>{u(y=>({...y,[g]:!y[g]}))};return e.jsxs(Ae,{open:o,onClose:r?void 0:t,maxWidth:"sm",fullWidth:!0,children:[e.jsx(rt,{sx:{fontWeight:700,color:Ze.squidInk},children:b("ææãã©ã³ç³è¾¼ã¿åã®ã確èª","Before you subscribe")}),e.jsxs(ke,{children:[e.jsx(a,{variant:"body2",sx:{color:Ze.textSecondary,mb:2},children:b("ãç³è¾¼ã¿åã«ã以ä¸ã®åæäºé
ãã確èªãã ããã","Please review and agree to the following before continuing.")}),e.jsx(Le,{severity:"info",sx:{mb:2},children:n==="buyout"?b(qn.ja,qn.en):b(Nn.ja,Nn.en)}
1),E==="en"&&e.jsx(a,{variant:"caption",sx:{display:"block",color:"#5C6B73",mb:2},children:Or}),e.jsxs(Zn,{children:[e.jsx(ut,{control:e.jsx(Ye,{checked:S.termsAccepted,onChange:()=>h("termsAccepted")}),label:e.jsxs(a,{variant:"body2",children:[e.jsx(We,{component:dt,to:p("/vault-pro-exam/terms"),underline:"hover",target:"_blank",rel:"noreferrer",children:b("å©ç¨è¦ç´","Terms of Service")}),b("ã«åæãã","I agree to")]})}),e.jsx(ut,{control:e.jsx(Ye,{checked:S.privacyAccepted,onChange:()=>h("privacyAccepted")}),label:e.jsxs(a,{variant:"body2",children:[e.jsx(We,{component:dt,to:p("/vault-pro-exam/privacy"),underline:"hover",target:"_blank",rel:"noreferrer",children:b("ãã©ã¤ãã·ã¼ããªã·ã¼","Privacy Policy")}),b("ã«åæãã","I agree to")]})}),e.jsx(ut,{control:e.jsx(Ye,{checked:S.autoRenewalAccepted,onChange:()=>h("autoRenewalAccepted")}),label:e.jsx(a,{variant:"body2",children:n==="buyout"?b("90æ¥éã®è²·ãåãï¼èªåæ´æ°ãªãã»æéæºäºã§çµäºï¼ã§ãããã¨ã確èªãã","I understand this is a one-time 90-day plan (no auto-renewal; access ends when the period expires)"):b("æé¡èª²éã®èªåæ´æ°ã«åæãã","I agree to monthly auto-renewal")})})]}),e.jsx(a,{variant:"caption",sx:{display:"block",mt:1.5,color:Ze.textMuted},children:b(`åæè¨é²ãã¼ã¸ã§ã³: ${Wt}`,`Consent record version: ${Wt}`)}),e.jsx(Le,{severity:"warning",sx:{mt:2,"& .MuiAlert-message":{fontSize:12}},children:b("決æ¸ã«ã¯Visa / Mastercard / JCBçã®é常ã¯ã¬ã¸ããã«ã¼ãããå©ç¨ãã ãããä¸é¨ã®ããããã«ã¼ãã»ããªãã¤ãã«ã¼ãã§ã¯æ±ºæ¸ã失æããå ´åãããã¾ãã","Pay with a standard credit card such as Visa, Mastercard, or JCB. Some debit and prepaid cards may be declined.")}),d&&e.jsx(Le,{severity:"error",sx:{mt:2},children:d})]}),e.jsxs(Ee,{sx:{px:3,pb:2},children:[e.jsx(C,{onClick:t,disabled:r,sx:{color:Ze.textSecondary},children:b("ãã£ã³ã»ã«","Cancel")}),e.jsx(C,{variant:"contained",onClick:()=>s(S),disabled:r||!c,sx:{bgcolor:Ze.orange,color:Ze.squidInk,fontWeight:700,"&:hover":{bgcolor:Ze.orangeHover}},children:b("åæã㦠Stripe ã«é²ã","Agree and continue to Stripe")})]})]})}const me=_e;function Qe({open:o,onClose:t}){const s=be(),{siteLocale:r}=ue(),d=r==="en",n=(j,z)=>d?z:j,{isLoggedIn:E,user:p}=Fe(),[b,S]=l.useState(!1),[u,c]=l.useState("monthly"),[h,g]=l.useState(!1),[y,k]=l.useState(""),m=async j=>{k("");const z=u==="buyout";if(z?!Ke:!wn){k(n("Stripe ã®èª²éãªã³ã¯ãæªè¨å®ã§ããç°å¢å¤æ°ã確èªãã¦ãã ããã","The Stripe billing link is not configured. Check the environment variables."));return}const N=Yn();try{g(!0),E&&await br({consentVersion:Wt,context:"checkout",termsAccepted:j.termsAccepted,privacyAccepted:j.privacyAccepted,autoRenewalAccepted:z?!1:j.autoRenewalAccepted});try{localStorage.setItem("checkout_return_to",window.location.pathname+window.location.search)}catch{}
1N.open((z?Er:Ir)(p)),S(!1),t()}catch(T){N.cancel(),k(T.message||n("åæå
容ã®ä¿åã«å¤±æãã¾ãã","Failed to save your consent"))}finally{g(!1)}};return E?e.jsxs(Ae,{scroll:"body",open:o,onClose:t,maxWidth:"sm",fullWidth:!0,children:[e.jsx(rt,{sx:{fontWeight:700,color:me.squidInk},children:n("ææãã©ã³ã§å
¨åé¡ãè§£æ¾","Unlock all problems with the paid plan")}),e.jsxs(ke,{children:[e.jsx(a,{variant:"body2",sx:{color:me.textSecondary,mb:2},children:n(`ç¾å¨ã®ãã©ã³ã§ã¯ç·´ç¿ã»ãã 1ã${$t} ã¨æ¨¡æ¬è©¦é¨ ${_t} ååããå©ç¨ããã ãã¾ããææãã©ã³ï¼æé¡980åï¼ã«ãå å
¥ããã ãã¨ï¼`,`Your current plan includes practice sets 1-${$t} and ${_t} mock exam. Join the paid plan (Â¥980/mo, US$6.20) to unlock:`)}),e.jsx(i,{sx:{display:"flex",flexDirection:"column",gap:1},children:[n("å
¨åé¡ã«ãã«ã¢ã¯ã»ã¹","Full access to all problems"),n("æ¬çªå½¢å¼ã®æ¨¡æ¬è©¦é¨ãè§£ãæ¾é¡","Unlimited real-format mock exams"),n("å
¨åHashiCorpå
¬å¼ããã¥ã¡ã³ãæºæ ã®è©³ç´°è§£èª¬ä»ã","Every question has a detailed explanation based on the official HashiCorp documentation"),n("ãã¹ã¦ã®ã«ãã´ãªã¼ã»è©¦é¨ãã¡ã¤ã³ãç¶²ç¾
","Covers all categories and exam domains")].map((j,z)=>e.jsxs(i,{sx:{display:"flex",alignItems:"flex-start",gap:1},children:[e.jsx(Oe,{sx:{color:me.orange,fontSize:18,mt:.2}}),e.jsx(a,{variant:"body2",sx:{color:me.textPrimary},children:j})]},z))})]}),e.jsxs(Ee,{sx:{px:3,pb:2},children:[e.jsx(C,{onClick:t,sx:{color:me.textSecondary},children:n("éãã","Close")}),e.jsx(C,{variant:"contained",onClick:()=>{k(""),c("monthly"),S(!0)},sx:{bgcolor:me.orange,color:me.squidInk,fontWeight:700,"&:hover":{bgcolor:me.orangeHover}},children:n("ææãã©ã³ã«ç³ãè¾¼ã","Get the paid plan")}),Ke&&e.jsx(C,{variant:"outlined",onClick:()=>{k(""),c("buyout"),S(!0)},sx:{color:me.squidInk,borderColor:me.orange,fontWeight:700,"&:hover":{borderColor:me.orangeHover,bgcolor:"rgba(0,0,0,0.03)"}},children:n(xt.priceLabel.ja,xt.priceLabel.en)})]}),e.jsx(un,{open:b,onClose:()=>{h||(S(!1),k(""))},plan:u,onConfirm:m,loading:h,error:y})]}):e.jsxs(Ae,{scroll:"body",open:o,onClose:t,maxWidth:"sm",fullWidth:!0,children:[e.jsx(rt,{sx:{fontWeight:700,color:me.squidInk},children:n("Vault Professional ãã©ã³ã§å
¨åé¡ãè§£æ¾","Unlock every question with the Vault Professional plan")}),e.jsxs(ke,{children:[e.jsx(a,{variant:"body2",sx:{color:me.textSecondary,mb:2},children:n("æé¡980åï¼ç¨è¾¼ï¼ã§ Vault Associate + Professional ã®åé¡ï¼æ¨¡æ¬è©¦é¨ã«ãã«ã¢ã¯ã»ã¹ã§ãã¾ãã","Â¥980/month (US$6.20) (tax included) gets you full access to Vault Associate and Professional questions and mock exams.")}),e.jsx(i,{sx:{display:"flex",flexDirection:"column",gap:1},children:[n("å
¨åé¡ã«ãã«ã¢ã¯ã»ã¹ï¼ç·´ç¿ï¼æ¬çªå½¢å¼ã®æ¨¡æ¬è©¦é¨ï¼","Full access to all problems (practice + real-format mocks)"),n("å
¨åå
¬å¼ããã¥ã¡ã³ãæºæ ã®è©³ç´°è§£èª¬ä»ã","Every question has a detailed explanation aligned with official docs"),n("ã«ãã´ãªå¥ã®å¼±ç¹åæã»é²æç®¡ç","Weakness analysis & progress tracking by category"),n("決æ¸å¾ãã¡ã¼ã«ã§å±ããªã³ã¯ãããã¹ã¯ã¼ããè¨å® â ãã®ã¾ã¾ãã°ã¤ã³","After payment, set a password from the email link â log in immediately")].map((j,z)=>e.jsxs(i,{sx:{display:"flex",alignItems:"flex-start",gap:1},children:[e.jsx(Oe,{sx:{color:me.orange,fontSize:18,mt:.2}}),e.jsx(a,{variant:"body2",sx:{color:me.textPrimary},children:j})]},z))}),y&&e.jsx(a,{variant:"caption",sx:{color:"error.main",display:"block",mt:1.5},children:y})]}),e.jsxs(Ee,{sx:{px:3,pb:1,flexDirection:"column",alignItems:"stretch",gap:1},children:[e.jsx(C,{variant:"contained",onClick:()=>{k(""),c("monthly"),S(!0)},sx:{bgcolor:me.orange,color:me.squidInk,fontWeight:700,"&:hover":{bgcolor:me.orangeHover}},children:n("ææãã©ã³ã«ç³ãè¾¼ãï¼æé¡Â¥980ï¼","Get the paid plan (Â¥980/mo, US$6.20)")}),Ke&&e.jsx(C,{variant:"outlined",onClick:()=>{k(""),c("buyout"),S(!0)},sx:{color:me.squidInk,borderColor:me.orange,fontWeight:700,"&:hover":{borderColor:me.orangeHover,bgcolor:"rgba(0,0,0,0.03)"}},children:n(xt.priceLabel.ja,xt.priceLabel.en)}),e.jsx(C,{onClick:t,sx:{color:me.textSecondary},children:n("ãã¨ã§","Later")})]}),e.jsx(i,{sx:{px:3,pb:2,textAlign:"center"},children:e.jsxs(a,{variant:"caption",sx:{color:me.textSecondary},children:[n("æ¢ã«ã¢ã«ã¦ã³ãããæã¡ã®æ¹ã¯","Already have an account? ")," ",e.jsx(i,{component:"span",role:"button",onClick:()=>{t(),s("/vault-pro-exam/login")},sx:{color:me.orange,cursor:"pointer",fontWeight:600,textDecoration:"underline"},children:n("ãã°ã¤ã³","Log in")})]})}),e.jsx(un,{open:b,onClose:()=>{h||(S(!1),k(""))},plan:u,onConfirm:m,loading:h,error:y})]})}const M=_e;function Ho(){const o=be(),{siteLocale:t}=ue(),s=t==="en",r=(c,h)=>s?h:c,[d,n]=l.useState(!1),[E,p]=l.useState(0),b=[{image:"/images/vault-pro/vault-pro-badge.png",title:r("Vault Operations Professional 対ç","Vault Operations Professional Prep"),subtitle:"VOP-003",desc:r("ã¨ã³ã¿ã¼ãã©ã¤ãºã·ã¼ã¯ã¬ãã管çã»DRã»HSMã»ããã©ã¼ãã³ã¹ã¬ããªã±ã¼ã·ã§ã³ã»ç£æ»","Enterprise secrets management, DR, HSM, performance replication, auditing"),bg:`linear-gradient(135deg, #FFCF25 0%, ${M.squidInk} 100%)`}],S=l.useCallback(()=>p(c=>(c+1)%b.length),[b.length]);l.useEffect(()=>{const c=setInterval(S,4500);return()=>clearInterval(c)},[S]);const u=b[E];return e.jsxs(i,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",width:"100%"},children:[e.jsx(i,{sx:{position:"relative",background:u.bg,color:"#fff",py:{xs:5,md:8},px:{xs:2,md:4},overflow:"hidden",transition:"background 0.8s ease",minHeight:{xs:"auto",md:420}},children:e.jsxs(Te,{maxWidth:"lg",sx:{position:"relative",zIndex:1},children:[e.jsxs(i,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",gap:{xs:3,md:6}},children:[e.jsx(i,{sx:{flexShrink:0},children:e.jsx(i,{component:"img",src:u.image,alt:u.title,sx:{width:{xs:150,md:240},height:{xs:150,md:240},objectFit:"contain",filter:"drop-shadow(0 4px 20px rgba(0,0,0,0.3))"}})}),e.jsxs(i,{sx:{textAlign:{xs:"center",md:"left"},flex:1},children:[e.jsx(a,{variant:"overline",sx:{color:M.orange,fontWeight:700,letterSpacing:2,fontSize:{xs:12,md:14}},children:u.subtitle}),e.jsx(a,{variant:"h3",sx:{fontWeight:800,mb:1,fontSize:{xs:"1.8rem",md:"2.8rem"},lineHeight:1.2},children:u.title}),e.jsx(a,{variant:"h6",sx:{opacity:.9,mb:3,fontWeight:400,fontSize:{xs:"0.95rem",md:"1.15rem"}},children:u.desc}),e.jsxs(i,{sx:{display:"flex",flexDirection:{xs:"column",sm:"row"},gap:1.5,justifyContent:{xs:"center",md:"flex-start"}},children:[e.jsx(C,{variant:"contained",size:"large",onClick:()=>o("/vault-pro-exam/select"),sx:{bgcolor:M.orange,color:M.onAccent,fontWeight:700,py:1.5,px:4,fontSize:"1rem","&:hover":{bgcolor:M.orangeHover}},children:r("ä»ããç¡æã§è©¦ã","Start free now")}),e.jsx(C,{variant:"outlined",size:"large",onClick:()=>o("/vault-pro-exam/login"),sx:{borderColor:"rgba(255,255,255,0.6)",color:"#fff",py:1.5,px:4,"&:hover":{borderColor:"#fff",bgcolor:"rgba(255,255,255,0.08)"}},children:r("ãã°ã¤ã³","Log in")}),e.jsx(C,{size:"large",onClick:()=>o("/vault-pro-exam/select"),sx:{color:M.orange,fontWeight:600},endIcon:e.jsx(tt,{}),children:r("試é¨ã鏿ãã","Choose an exam")})]})]})]}),e.jsx(i,{sx:{display:"flex",justifyContent:"center",gap:1,mt:3},children:b.map((c,h)=>e.jsx(i,{onClick:()=>p(h),sx:{width:h===E?28:10,height:10,borderRadius:5,bgcolor:h===E?M.orange:"rgba(255,255,255,0.4)",cursor:"pointer",transition:"all 0.3s"}},h))})]})}),e.jsx(i,{sx:{bgcolor:M.squidInk,py:{xs:3,md:4}},children:e.jsx(Te,{maxWidth:"lg",children:e.jsx(i,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr 1fr",md:"1fr 1fr 1fr 1fr"},gap:{xs:2,md:4}},children:[{value:r("900å","900 Qs"),label:r("å
¬éå顿°","Total questions"),sub:r("ç·´ç¿ + 模æ¬è©¦é¨","Practice + mock exams")},{value:r("1è³æ ¼","1 cert"),label:r("対å¿è©¦é¨","Supported exam"),sub:"Vault Operations Professional (VOP-003)"},{value:r("æ¥è±å¯¾å¿","JA & EN"),label:r("åºé¡ã»è§£èª¬è¨èª","Question & answer language"),sub:r("English / æ¥æ¬èª","English / æ¥æ¬èª")},{value:"100%",label:r("解説ã«ãã¼ç","Explanation coverage"),sub:r("å
¨å詳細解説ä»ã","Every question has a detailed explanation")}].map((c,h)=>e.jsxs(i,{sx:{textAlign:"center"},children:[e.jsx(a,{variant:"h4",sx:{fontWeight:800,color:M.orange,fontSize:{xs:"1.5rem",md:"2rem"}},children:c.value}),e.jsx(a,{sx:{color:"#fff",fontWeight:600,fontSize:{xs:14,md:16}},children:c.label}),e.jsx(a,{sx:{color:"rgba(255,255,255,0.6)",fontSize:{xs:13,md:13}},children:c.sub})]},h))})})}),e.jsx(i,{sx:{py:{xs:5,md:7},px:2,bgcolor:M.lightGray},children:e.jsxs(Te,{maxWidth:"lg",children:[e.jsx(a,{variant:"h4",sx:{textAlign:"center",fontWeight:800,color:M.squidInk,mb:1,fontSize:{xs:"1.4rem",md:"2rem"}},children:r("é¸ã°ããçç±","Why Nicheelab")}),e.jsx(a,{sx:{textAlign:"center",color:M.textSecondary,mb:4},children:r("HashiCorpå
¬å¼è©¦é¨ã¬ã¤ãã«æºæ ããåé¡ã§åæ ¼ãç®æãã¾ã","Pass with questions aligned to HashiCorp's official Exam Guide")}),e.jsx(i,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"1fr 1fr",md:"1fr 1fr 1fr"},gap:3},children:[{icon:e.jsx(Vr,{sx:{fontSize:44,color:M.orange}}),title:r("Vault Operations Professional 対å¿","Vault Operations Professional covered"),desc:r("VOP-003 試é¨ç¯å²ãå®å
¨ã«ãã¼","Full coverage of the VOP-003 exam scope")},{icon:e.jsx(fn,{sx:{fontSize:44,color:M.orange}}),title:r("æ¥æ¬èªã»è±èªã®åé¡ã¨è©³ç´°è§£èª¬","Bilingual questions & detailed explanations"),desc:r("æ¥æ¬èªã»è±èªã§åºé¡ãHashiCorpå
¬å¼ããã¥ã¡ã³ãã«åºã¥ã900å","900 questions in Japanese and English, grounded in the official HashiCorp documentation")},{icon:e.jsx(Gr,{sx:{fontSize:44,color:M.orange}}),title:r("ã¹ããæéã§å¹çå¦ç¿","Study in your spare time"),desc:r("1åãã¤å³
1座ã«è§£èª¬ã確èªãéå¤ä¸ã伿©æéã«5åããå¦ç¿","See the explanation right after each question â study from 5 minutes during commutes or breaks")},{icon:e.jsx(pn,{sx:{fontSize:44,color:M.orange}}),title:r("æ£è§£çãã©ããã³ã°","Accuracy tracking"),desc:r("ã«ãã´ãªã¼ãã¨ã®æ£è§£çãèªåè¨é²ãå¼±ç¹ãã°ã©ãã§å¯è¦å","Automatically tracks accuracy per category and visualizes weak areas in charts")},{icon:e.jsx(Yr,{sx:{fontSize:44,color:M.orange}}),title:r("ãã«ãããã¤ã¹å¯¾å¿","Multi-device ready"),desc:r("PCã»ã¿ãã¬ããã»ã¹ããã©ã®ç«¯æ«ã§ãæé©ãªç»é¢ã§å¦ç¿","Optimized layout for desktop, tablet, and mobile")},{icon:e.jsx(Mt,{sx:{fontSize:44,color:M.orange}}),title:r("å
¬å¼ããã¥ã¡ã³ãæºæ ","Aligned with official docs"),desc:r("解説ã¯HashiCorpå
¬å¼ããã¥ã¡ã³ãã«åºã¥ã使","Explanations built from the official HashiCorp documentation")}].map((c,h)=>e.jsxs(Q,{elevation:0,sx:{p:3,borderRadius:2,border:`1px solid ${M.borderGray}`,bgcolor:M.cardBg,transition:"all 0.2s","&:hover":{boxShadow:"0 4px 20px rgba(0,0,0,0.08)",transform:"translateY(-2px)"}},children:[e.jsx(i,{sx:{mb:1.5},children:c.icon}),e.jsx(a,{variant:"h6",sx:{fontWeight:700,color:M.squidInk,mb:.5,fontSize:{xs:16,md:18}},children:c.title}),e.jsx(a,{variant:"body2",sx:{color:M.textSecondary,lineHeight:1.7},children:c.desc})]},h))})]})}),e.jsx(Re,{}),e.jsx(i,{sx:{py:{xs:5,md:7},px:2,bgcolor:"#fff"},children:e.jsxs(Te,{maxWidth:"lg",children:[e.jsx(a,{variant:"h4",sx:{textAlign:"center",fontWeight:800,color:M.squidInk,mb:4,fontSize:{xs:"1.4rem",md:"2rem"}},children:r("対å¿è©¦é¨","Supported exams")}),e.jsx(i,{sx:{display:"flex",justifyContent:"center"},children:e.jsxs(Q,{elevation:0,sx:{p:2.5,borderRadius:3,border:"2px solid #FFCF2520",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",gap:.5,transition:"all 0.2s","&:hover":{borderColor:"#FFCF25",boxShadow:"0 4px 16px #FFCF2520"}},children:[e.jsx(i,{component:"img",loading:"lazy",decoding:"async",src:"/images/vault-pro/vault-pro-badge.png",alt:"Vault Operations Professional",sx:{width:120,height:120,objectFit:"contain",mb:1}}),e.jsx(a,{variant:"body2",sx:{fontWeight:700,color:M.squidInk,lineHeight:1.3},children:"Vault Operations Professional"}),e.jsx(a,{variant:"caption",sx:{color:M.textSecondary,fontSize:12},children:r("VOP-003 | 900å","VOP-003 | 900 Qs")})]})})]})}),e.jsx(Re,{}),e.jsx(i,{sx:{py:{xs:5,md:7},px:2,bgcolor:"#fff"},children:e.jsxs(Te,{maxWidth:"md",children:[e.jsx(a,{variant:"h4",sx:{textAlign:"center",fontWeight:800,color:M.squidInk,mb:4,fontSize:{xs:"1.4rem",md:"2rem"}},children:r("æéãã©ã³","Pricing")}),e.jsxs(i,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"1fr 1fr"},gap:3,maxWidth:600,mx:"auto"},children:[e.jsxs(Q,{elevation:0,sx:{p:3,textAlign:"center",borderRadius:2,border:`1px solid ${M.borderGray}`},children:[e.jsx(a,{variant:"h6",sx:{color:M.squidInk,fontWeight:700},children:r("ç¡æã§è©¦ã","Try for free")}),e.jsx(a,{variant:"h3",sx:{fontWeight:800,my:1.5,color:M.squidInk},children:"Â¥0"}),e.jsx(a,{variant:"body2",sx:{color:M.textSecondary,mb:2},children:r("å
¬éåé¡ã§å¦ç¿ãä½é¨","Sample the public problems")}),e.jsx(C,{variant:"outlined",fullWidth:!0,size:"large",onClick:()=>o("/vault-pro-exam/select"),sx:{borderColor:M.squidInk,color:M.squidInk,fontWeight:600,"&:hover":{bgcolor:M.lightGray}},children:r("ã²ã¹ãã§è©¦ã","Try as guest")})]}),e.jsxs(Q,{elevation:2,sx:{p:3,textAlign:"center",borderRadius:2,border:`2px solid ${M.orange}`,position:"relative",overflow:"visible"},children:[e.jsxs(i,{sx:{position:"absolute",top:-14,left:"50%",transform:"translateX(-50%)",bgcolor:M.orange,color:M.onAccent,px:2,py:.4,borderRadius:1,fontSize:13,fontWeight:700,display:"flex",alignItems:"center",gap:.5,whiteSpace:"nowrap"},children:[e.jsx(Jr,{sx:{fontSize:16}})," ",r("ãããã","Recommended")]}),e.jsx(a,{variant:"h6",sx:{color:M.squidInk,fontWeight:700,mt:1},children:r("ææãã©ã³","Paid Plan")}),e.jsxs(a,{variant:"h3",sx:{fontWeight:800,my:1,color:M.orange},children:["Â¥980",e.jsx(a,{component:"span",variant:"body2",sx:{color:M.textMuted},children:r("/æ","/mo · US$6.20")})]}),e.jsx(a,{variant:"body2",sx:{color:M.textSecondary,mb:2}
1,children:r("Vaultå
¨åé¡ï¼æ¨¡æ¬è©¦é¨ã«ãã«ã¢ã¯ã»ã¹","Full access to all Vault practice + mock exams")}),e.jsx(Qe,{open:d,onClose:()=>n(!1)}),e.jsx(C,{variant:"contained",fullWidth:!0,size:"large",onClick:()=>n(!0),disabled:!wn,sx:{bgcolor:M.orange,color:M.onAccent,fontWeight:700,"&:hover":{bgcolor:M.orangeHover}},children:r("ææãã©ã³ã§å§ããï¼æé¡Â¥980ï¼","Get the paid plan (Â¥980/mo, US$6.20)")}),Ke&&e.jsx(C,{variant:"outlined",fullWidth:!0,size:"large",onClick:()=>n(!0),sx:{mt:1,color:M.orange,borderColor:M.orange,fontWeight:700,"&:hover":{borderColor:M.orangeHover,bgcolor:"rgba(0,0,0,0.03)"}},children:r("90æ¥é Â¥1,980 è²·ãåãã§å§ããï¼èªåæ´æ°ãªãï¼","Start with a one-time 90-day plan (Â¥1,980 · US$12.60 · no auto-renewal)")}),Ke&&e.jsxs(a,{variant:"caption",sx:{display:"block",mt:1.5,color:M.textSecondary,lineHeight:1.6},children:[r(zt.ja,zt.en)," ",r(Lt.ja,Lt.en)]})]})]})]})}),e.jsx(Re,{}),e.jsx(i,{sx:{py:{xs:5,md:7},px:2,bgcolor:"#fff"},children:e.jsxs(Te,{maxWidth:"lg",children:[e.jsx(a,{variant:"h4",sx:{textAlign:"center",fontWeight:800,color:M.squidInk,mb:1,fontSize:{xs:"1.4rem",md:"2rem"}},children:r("Vaultè³æ ¼ã®å¦ç¿ã¬ã¤ã","Vault Certification Study Guide")}),e.jsx(a,{sx:{textAlign:"center",color:M.textSecondary,mb:4,fontSize:{xs:14,md:16}},children:r("è¨äºã³ã³ãã³ãã¯æºåä¸ã§ã","Article content is coming soon")}),e.jsx(i,{sx:{display:"flex",justifyContent:"center"},children:e.jsx(a,{variant:"body2",sx:{color:M.textSecondary},children:r("Coming Soon - å¦ç¿ã¬ã¤ãè¨äºãé æ¬¡å
¬éäºå®ã§ã","Coming soon â study-guide articles will be rolled out shortly")})})]})}),e.jsx(Re,{}),e.jsx(i,{sx:{py:{xs:5,md:6},px:2,bgcolor:M.squidInk,textAlign:"center"},children:e.jsxs(Te,{maxWidth:"sm",children:[e.jsx(a,{variant:"h5",sx:{fontWeight:800,color:"#fff",mb:1,fontSize:{xs:"1.2rem",md:"1.5rem"}},children:r("ä»ããå¦ç¿ãå§ãã¾ããã","Start studying now")}),e.jsx(a,{sx:{color:"rgba(255,255,255,0.7)",mb:3},children:r("æ¥æ¬èªã§å¦ã¹ãVaultè³æ ¼å¦ç¿ãµã¤ãã§ãåæ ¼ãç®æãã¾ããã","Pass your Vault certifications with bilingual study resources")}),e.jsx(C,{variant:"contained",size:"large",onClick:()=>o("/vault-pro-exam/select"),endIcon:e.jsx(tt,{}),sx:{bgcolor:M.orange,color:M.onAccent,fontWeight:700,py:1.5,px:4,"&:hover":{bgcolor:M.orangeHover}},children:r("試é¨ã鏿ãã¦å¦ç¿ãã","Choose an exam and study")})]})}),e.jsxs(i,{sx:{bgcolor:M.darkBlue,py:2,px:2,textAlign:"center"},children:[e.jsx(i,{sx:{mb:1.5},children:e.jsx(gt,{color:"rgba(255,255,255,0.72)"})}),e.jsxs(a,{variant:"body2",sx:{color:"rgba(255,255,255,0.5)",fontSize:12},children:["© 2026 NicheeLab All rights reserved. | ",r("HashiCorpãVault 㯠HashiCorp, Inc. ã®åæ¨ã§ãã","HashiCorp and Vault are trademarks of HashiCorp, Inc.")]})]})]})}const Uo="0x4AAAAAACtuEvtwfKvYO0-O";function Cn({siteKey:o,onVerify:t,resetKey:s}){const r=l.useRef(null),d=l.useRef(null);return l.useEffect(()=>{const n=o||Uo,E=()=>{!r.current||!window.turnstile||(d.current&&window.turnstile.remove(d.current),d.current=window.turnstile.render(r.current,{sitekey:n,callback:t,"expired-callback":()=>t(""),"error-callback":()=>t(""),theme:"light",language:window.location.pathname.startsWith("/en/")||window.location.pathname==="/en"?"en":"ja"}))};if(window.turnstile)E();else{const p=document.createElement("script");p.src="https://challenges.cloudflare.com/turnstile/v0/api.js?onload=onTurnstileLoad",p.async=!0,window.onTurnstileLoad=E,document.head.appendChild(p)}return()=>{d.current&&window.turnstile&&(window.turnstile.remove(d.current),d.current=null)}},[o,t]),l.useEffect(()=>{s===void 0||s===0||d.current&&window.turnstile&&(t(""),window.turnstile.reset(d.current))},[s]),e.jsx(i,{ref:r,sx:{my:2,display:"flex",justifyContent:"center"}})}const on=_e;function Vo(){const{siteLocale:o}=ue(),t=(T,v)=>o==="en"?v:T,s=be(),[r]=Wr(),d=r.get("from")==="payment",{login:n}=Fe(),[E,p]=l.useState(""),[b,S]=l.useState(""),[u,c]=l.useState(""),[h,g]=l.useState(""),[y,k]=l.useState(0),[m,j]=l.useState(!1),z=l.useCallback(T=>{g(T)},[]),N=async T=>{T.preventDefault(),c("");const v=await n(E,b,h||void 0);v.ok||(g(""),k(I=>I+1)),v.ok?s(d?"/vault-pro-exam/select?payment=success":"/vault-pro-exam/select"):v.status===401?c(t("ã¡ã¼ã«ã¢ãã¬ã¹ã¾ãã¯ãã¹ã¯ã¼ããæ£ããããã¾ãã","The email address or password is incorrect")):v.status===429?c(t("試è¡åæ°ãå¤ããã¾ãã1 åã»ã©å¾
ã£ã¦ããããä¸åº¦ã試ããã ãã","Too many attempts. Please wait a minute and try again.")):v.code==="TURNSTILE_FAILED"?c(t("ãç§ã¯ããããã§ã¯ããã¾ãããã«ãã§ãã¯ãå
¥ãã¦ãããããä¸åº¦ã試ããã ãã",`Please tick the "I'm not a robot" checkbox and try again.`)):v.status===400||v.status===403?c(t("èªè¨¼ã®ç¢ºèªã«å¤±æãã¾ããããã¼ã¸ãåèªã¿è¾¼ã¿ãã¦ããä¸åº¦ã試ããã ãã","Verification failed. Please reload the page and try again.")):c(t("éä¿¡ã¨ã©ã¼ãçºçãã¾ãããæéãããã¦ããä¸åº¦ã試ããã ãã","A network error occurred. Please try again in a moment."))};return e.jsxs(i,{sx:{p:3,maxWidth:400,mx:"auto",mt:4},children:[d&&e.jsxs(i,{sx:{bgcolor:"#E8F5E9",borderRadius:2,p:2,mb:3,textAlign:"center"},children:[e.jsx(Oe,{sx:{color:"#1D8102",fontSize:32,mb:.5}}),e.jsx(a,{variant:"body1",sx:{fontWeight:700,color:"#1D8102"}
1,children:t("ãæ¯æããå®äºãã¾ãã!","Payment complete!")}),e.jsx(a,{variant:"body2",sx:{color:on.textSecondary},children:t("ãã°ã¤ã³ãã¦ææãã©ã³ãæå¹ã«ãã¦ãã ãã","Log in to activate your paid plan")})]}),e.jsx(a,{variant:"h5",sx:{mb:3,textAlign:"center"},children:t("ãã°ã¤ã³","Log in")}),e.jsxs("form",{onSubmit:N,children:[e.jsx(we,{fullWidth:!0,label:t("ã¡ã¼ã«ã¢ãã¬ã¹","Email address"),type:"email",value:E,onChange:T=>p(T.target.value),required:!0,sx:{mb:2}}),e.jsx(we,{fullWidth:!0,label:t("ãã¹ã¯ã¼ã","Password"),type:m?"text":"password",value:b,onChange:T=>S(T.target.value),required:!0,sx:{mb:2},InputProps:{endAdornment:e.jsx(er,{position:"end",children:e.jsx(ce,{onClick:()=>j(!m),edge:"end",size:"small",children:m?e.jsx(tr,{}):e.jsx(nr,{})})})}}),e.jsx(Cn,{onVerify:z,resetKey:y}),u&&e.jsx(a,{color:"error",variant:"body2",sx:{mb:1},children:u}),e.jsx(C,{type:"submit",variant:"contained",fullWidth:!0,sx:{mb:2,bgcolor:"#FF9900",color:"#232F3E","&:hover":{bgcolor:"#EC7211"}},children:t("ãã°ã¤ã³","Log in")})]}),e.jsx(a,{variant:"body2",sx:{textAlign:"center",mb:1},children:e.jsx(We,{component:"button",onClick:()=>s("/vault-pro-exam/forgot-password"),sx:{cursor:"pointer",color:on.textSecondary,fontSize:"0.85rem"},children:t("ãã¹ã¯ã¼ããå¿ããæ¹ã¯ãã¡ã","Forgot your password?")})}),e.jsxs(a,{variant:"body2",sx:{textAlign:"center"},children:[t("ã¢ã«ã¦ã³ãããæã¡ã§ãªãæ¹ã¯ ","Don't have an account? "),e.jsx(We,{component:"button",onClick:()=>s("/vault-pro-exam/register"),sx:{cursor:"pointer"},children:t("ä¼å¡ç»é²","Sign up")})]}),e.jsx(i,{sx:{mt:2},children:e.jsx(gt,{color:on.textSecondary})})]})}const fe=_e,Go=[{ja:"Vault Associate (VA-003) 対å¿ã®æ¥æ¬èªåé¡é",en:"Japanese question bank for Vault Associate (VA-003)"},{ja:"æ¬çªå½¢å¼ã®æ¨¡æ¬è©¦é¨ãåé²",en:"Includes full-length mock exams"},{ja:"å
¨åã«è©³ãã解説ä»ãï¼HashiCorpå
¬å¼ããã¥ã¡ã³ãæºæ ï¼",en:"Detailed explanations for every question (based on official HashiCorp docs)"},{ja:"åé¡ãã¨ã»ã«ãã´ãªã¼ãã¨ã®æ£è§£çãã©ããã³ã°",en:"Track your score by question and by category"},{ja:"PCã»ã¹ããã»ã¿ãã¬ããã©ãã§ãå¦ç¿å¯è½",en:"Study on desktop, phone, or tablet"}];function Yo(){const{siteLocale:o,buildPath:t}=ue(),s=(R,H)=>o==="en"?H:R,r=be(),{register:d}=Fe(),[n,E]=l.useState("form"),[p,b]=l.useState(""),[S,u]=l.useState(""),[c,h]=l.useState(""),[g,y]=l.useState(""),[k,m]=l.useState(!1),[j,z]=l.useState(""),[N,T]=l.useState(0),[v,I]=l.useState(0),[D,te]=l.useState(!1),[L,$]=l.useState(!1),[O,W]=l.useState(!1),U=l.useRef();l.useEffect(()=>()=>{U.current&&clearInterval(U.current)},[]);const ne=()=>{I(60),U.current=setInterval(()=>{I(R=>R<=1?(clearInterval(U.current),0):R-1)},1e3)},V=l.useCallback(R=>{z(R)},[]),G=async R=>{if(R.preventDefault(),y(""),!p){y(s("ã¡ã¼ã«ã¢ãã¬ã¹ãå
¥åãã¦ãã ãã","Enter your email address"));return}if(!S||S.length<8){y(s("ãã¹ã¯ã¼ãã¯8æå以ä¸ã«ãã¦ãã ãã","Your password must be at least 8 characters"));return}if(!/[a-zA-Z]/.test(S)){y(s("ãã¹ã¯ã¼ãã«è±åãå«ãã¦ãã ãã","Include at least one letter in your password"));return}if(!/[0-9]/.test(S)){y(s("ãã¹ã¯ã¼ãã«æ°åãå«ãã¦ãã ãã","Include at least one number in your password"));return}if(!D||!L){y(s("å©ç¨è¦ç´ã¨ãã©ã¤ãã·ã¼ããªã·ã¼ã¸ã®åæãå¿
è¦ã§ã","You must agree to the Terms of Service and the Privacy Policy"));return}if(!j){y(s("ç¢ºèª (bot æ¤è¨¼) ãçµããã¾ã§æ°ç§ãå¾
ã¡ãã ãã","Please wait a few seconds for the verification to finish"));return}m(!0);try{await Rt(p,"register",j||void 0),E("otp"),ne()}catch(H){z(""),T(P=>P+1),y(H.message||s("èªè¨¼ã³ã¼ãã®éä¿¡ã«å¤±æãã¾ãã","Failed to send the verification code"))}finally{m(!1)}},_=async()=>{y(""),m(!0);try{await Rt(p,"register"),ne()}catch(R){y(R.message||s("èªè¨¼ã³ã¼ãã®åéä¿¡ã«å¤±æãã¾ãã","Failed to resend the verification code"))}finally{m(!1)}},F=async R=>{if(R.preventDefault(),y(""),!c||c.length!==6){y(s("6æ¡ã®èªè¨¼ã³ã¼ããå
¥åãã¦ãã ãã","Enter the 6-digit verification code"));return}if(!D||!L){y(s("å©ç¨è¦ç´ã¨ãã©ã¤ãã·ã¼ããªã·ã¼ã¸ã®åæãå¿
è¦ã§ã","You must agree to the Terms of Service and the Privacy Policy"));return}m(!0);try{await d({email:p,password:S,otpCode:c,turnstileToken:j||void 0,termsAccepted:D,privacyAccepted:L}),Jn("sign_up"),r("/vault-pro-exam/select?registered=true")}catch(H){y(H.message||s("ç»é²ã«å¤±æãã¾ãã","Registration failed"))}finally{m(!1)}};return e.jsxs(i,{sx:{minHeight:"100vh",bgcolor:fe.lightGray,display:"flex",flexDirection:{xs:"column",md:"row"}},children:[e.jsxs(i,{sx:{flex:{xs:"none",md:1},bgcolor:fe.squidInk,color:"#fff",p:{xs:3,md:6},display:"flex",flexDirection:"column",justifyContent:"center"},children:[e.jsx(a,{variant:"h4",sx:{fontWeight:800,mb:1,fontSize:{xs:"1.3rem",md:"2rem"}},children:s("Vault Professional è³æ ¼å¦ç¿ã§","Study for Vault Professional certification")}),e.jsx(a,{variant:"h4",sx:{fontWeight:800,color:fe.orange,mb:3,fontSize:{xs:"1.3rem",md:"2rem"}},children:s("åæ ¼ã確å®ã«ã","and pass with confidence.")}),e.jsx(i,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:Go.map((R,H)=>
1e.jsxs(i,{sx:{display:"flex",alignItems:"flex-start",gap:1},children:[e.jsx(Oe,{sx:{color:fe.orange,fontSize:20,mt:.3,flexShrink:0}}),e.jsx(a,{variant:"body2",sx:{color:"rgba(255,255,255,0.9)",lineHeight:1.5},children:s(R.ja,R.en)})]},H))}),e.jsx(Re,{sx:{borderColor:"rgba(255,255,255,0.1)",my:3}}),e.jsxs(i,{sx:{display:"flex",gap:3},children:[e.jsxs(i,{children:[e.jsx(a,{variant:"h5",sx:{fontWeight:800,color:fe.orange},children:"Â¥0"}),e.jsx(a,{variant:"caption",sx:{color:"rgba(255,255,255,0.6)"},children:s("ã¢ã«ã¦ã³ã使","Create account")})]}),e.jsxs(i,{children:[e.jsx(a,{variant:"caption",sx:{color:"rgba(255,255,255,0.4)",textDecoration:"none"},children:s("æé¡ãã©ã³","Monthly plan")}),e.jsxs(a,{variant:"h5",sx:{fontWeight:800,color:fe.orange},children:["Â¥980",e.jsx(a,{component:"span",variant:"caption",sx:{color:"rgba(255,255,255,0.5)"},children:s("/æ","/month · US$6.20")})]}),e.jsx(a,{variant:"caption",sx:{color:"#ff6b6b",fontWeight:700},children:s("ã¾ã㯠90æ¥é Â¥1,980 è²·ãåãï¼èªåæ´æ°ãªãï¼","or Â¥1,980 one-time for 90 days (no auto-renewal)")})]})]})]}),e.jsx(i,{sx:{flex:{xs:"none",md:1},display:"flex",alignItems:"center",justifyContent:"center",p:{xs:3,md:6}},children:e.jsxs(Q,{sx:{p:4,maxWidth:420,width:"100%",borderRadius:2},elevation:2,children:[n==="form"?e.jsxs(e.Fragment,{children:[e.jsx(a,{variant:"h5",sx:{mb:.5,fontWeight:700,color:fe.squidInk},children:s("ã¢ã«ã¦ã³ã使","Create account")}),e.jsx(a,{variant:"body2",sx:{mb:3,color:fe.textSecondary},children:s("ç»é²ããã¨é²æã®ä¿åã¨ã¯ãã¹ããã¤ã¹åæãå©ç¨ã§ãã¾ããææãã©ã³ã¯ç»é²å¾ã«ç³è¾¼ã¿å¯è½ã§ãã","Sign up to save your progress and sync it across devices. You can subscribe to a paid plan after signing up.")}),e.jsxs("form",{onSubmit:G,children:[e.jsx(we,{fullWidth:!0,label:s("ã¡ã¼ã«ã¢ãã¬ã¹","Email address"),type:"email",value:p,onChange:R=>b(R.target.value),required:!0,sx:{mb:2}}),e.jsx(we,{fullWidth:!0,label:s("ãã¹ã¯ã¼ãï¼è±å+æ°åãå«ã8æå以ä¸ï¼","Password (8+ characters, with letters and numbers)"),type:O?"text":"password",value:S,onChange:R=>u(R.target.value),required:!0,inputProps:{minLength:8},sx:{mb:2},InputProps:{endAdornment:e.jsx(er,{position:"end",children:e.jsx(ce,{onClick:()=>W(!O),edge:"end",size:"small",children:O?e.jsx(tr,{}):e.jsx(nr,{})})})}}),e.jsxs(Zn,{sx:{mb:1},children:[e.jsx(ut,{control:e.jsx(Ye,{checked:D,onChange:R=>te(R.target.checked)}),label:e.jsxs(a,{variant:"body2",children:[e.jsx(We,{href:t("/terms/"),underline:"hover",target:"_blank",rel:"noreferrer",children:s("å©ç¨è¦ç´","Terms of Service")}),s("ã«åæãã","I agree to the")]})}),e.jsx(ut,{control:e.jsx(Ye,{checked:L,onChange:R=>$(R.target.checked)}),label:e.jsxs(a,{variant:"body2",children:[e.jsx(We,{href:t("/privacy/"),underline:"hover",target:"_blank",rel:"noreferrer",children:s("ãã©ã¤ãã·ã¼ããªã·ã¼","Privacy Policy")}),s("ã«åæãã","I agree to the")]})})]}),e.jsx(Le,{severity:"info",sx:{mb:2},children:s("ææãã©ã³ã¯ãã°ã¤ã³å¾ã«å¥ç»é¢ã§ãç³è¾¼ã¿ããã ãã¾ããæé¡èª²éã»èªåæ´æ°ã¸ã®åæã¯ãç³è¾¼ã¿æã«åå¾ãã¾ãã","Paid plans are purchased on a separate screen after you sign in. Consent to monthly billing and auto-renewal is collected at checkout.")}),e.jsx(Cn,{onVerify:V,resetKey:N}),g&&e.jsx(a,{color:"error",variant:"body2",sx:{mb:1},children:g}),e.jsx(C,{type:"submit",variant:"contained",fullWidth:!0,size:"large",disabled:k,sx:{mb:2,bgcolor:fe.orange,color:fe.squidInk,fontWeight:700,"&:hover":{bgcolor:fe.orangeHover}},children:k?e.jsx(Dt,{size:24,sx:{color:fe.squidInk}}):s("èªè¨¼ã³ã¼ããéä¿¡","Send verification code")})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs(i,{sx:{textAlign:"center",mb:2},children:[e.jsx(rr,{sx:{fontSize:48,color:fe.orange,mb:1}}),e.jsx(a,{variant:"h5",sx:{fontWeight:700,color:fe.squidInk},children:s("ã¡ã¼ã«èªè¨¼","Verify email")})]}),e.jsxs(a,{variant:"body2",sx:{mb:1,color:fe.textSecondary,textAlign:"center"},children:[e.jsx("strong",{children:p})," ",s("ã«6æ¡ã®èªè¨¼ã³ã¼ããéä¿¡ãã¾ããã"," â we sent a 6-digit verification code."),e.jsx("br",{}),s("ã¡ã¼ã«ã確èªãã¦å
¥åãã¦ãã ããã","Check your email address and enter it again.")]}
1),e.jsx(a,{variant:"caption",sx:{display:"block",mb:2,color:"#d32f2f",textAlign:"center",bgcolor:"#FFF3E0",borderRadius:1,py:.5,px:1},children:s("ã¡ã¼ã«ãå±ããªãå ´åã¯è¿·æã¡ã¼ã«ï¼ã¹ãã ï¼ãã©ã«ããã確èªãã ãã","If the email doesn't arrive, check your spam folder")}),e.jsx(Le,{severity:"success",sx:{mb:2},children:s("èªè¨¼ãå®äºããã¨ãã°ã¤ã³ç¶æ
ã«ãªã鲿ãåæã§ãã¾ããææãã©ã³ã¸ã®ç³è¾¼ã¿ã¯ãã°ã¤ã³å¾ã«è¡ãã¾ãã","Once verified, you'll be signed in and your progress will sync. You can subscribe to a paid plan after signing in.")}),e.jsxs("form",{onSubmit:F,children:[e.jsx(we,{fullWidth:!0,label:s("èªè¨¼ã³ã¼ãï¼6æ¡ï¼","Verification code (6 digits)"),value:c,onChange:R=>{const H=R.target.value.replace(/\D/g,"").slice(0,6);h(H)},required:!0,inputProps:{maxLength:6,inputMode:"numeric",style:{textAlign:"center",fontSize:24,letterSpacing:8}},sx:{mb:2}}),g&&e.jsx(a,{color:"error",variant:"body2",sx:{mb:1},children:g}),e.jsx(C,{type:"submit",variant:"contained",fullWidth:!0,size:"large",disabled:k||c.length!==6,sx:{mb:2,bgcolor:fe.orange,color:fe.squidInk,fontWeight:700,"&:hover":{bgcolor:fe.orangeHover}},children:k?e.jsx(Dt,{size:24,sx:{color:fe.squidInk}}):s("ç»é²ãå®äºãã","Complete registration")})]}),e.jsxs(i,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(C,{size:"small",onClick:()=>{E("form"),h(""),y("")},sx:{color:fe.textSecondary},children:s("æ»ã","Back")}),e.jsx(C,{size:"small",onClick:_,disabled:v>0||k,sx:{color:fe.accentBlue},children:v>0?s(`åéä¿¡ï¼${v}ç§ï¼`,`Resend (${v}s)`):s("ã³ã¼ããåéä¿¡","Resend code")})]})]}),e.jsxs(a,{variant:"body2",sx:{textAlign:"center",color:fe.textSecondary,mt:n==="otp"?2:0},children:[s("ãã§ã«ã¢ã«ã¦ã³ãããæã¡ã®æ¹ã¯ ","Already have an account? "),e.jsx(We,{component:"button",onClick:()=>r("/vault-pro-exam/login"),sx:{cursor:"pointer",color:fe.accentBlue},children:s("ãã°ã¤ã³","Log in")})]}),e.jsx(i,{sx:{mt:2},children:e.jsx(gt,{color:fe.textSecondary})})]})})]})}const xe=_e;function Jo(){const{siteLocale:o}=ue(),t=(W,U)=>o==="en"?U:W,s=be(),[r,d]=l.useState("email"),[n,E]=l.useState(""),[p,b]=l.useState(""),[S,u]=l.useState(""),[c,h]=l.useState(""),[g,y]=l.useState(""),[k,m]=l.useState(!1),[j,z]=l.useState(0),[N,T]=l.useState(""),[v,I]=l.useState(0),D=l.useRef();l.useEffect(()=>()=>{D.current&&clearInterval(D.current)},[]);const te=()=>{z(60),D.current=setInterval(()=>{z(W=>W<=1?(clearInterval(D.current),0):W-1)},1e3)},L=async W=>{if(W.preventDefault(),y(""),!n){y(t("ã¡ã¼ã«ã¢ãã¬ã¹ãå
¥åãã¦ãã ãã","Enter your email address"));return}if(!N){y(t("ç¢ºèª (bot æ¤è¨¼) ãçµããã¾ã§æ°ç§ãå¾
ã¡ãã ãã","Please wait a few seconds for the verification to finish"));return}m(!0);try{await Rt(n,"reset",N||void 0),d("otp"),te()}catch(U){T(""),I(ne=>ne+1),y(U.message||t("èªè¨¼ã³ã¼ãã®éä¿¡ã«å¤±æãã¾ãã","Failed to send the verification code"))}finally{m(!1)}},$=async()=>{y(""),m(!0);try{await Rt(n,"reset"),te()}catch(W){y(W.message||t("èªè¨¼ã³ã¼ãã®åéä¿¡ã«å¤±æãã¾ãã","Failed to resend the verification code"))}finally{m(!1)}},O=async W=>{if(W.preventDefault(),y(""),p.length!==6){y(t("6æ¡ã®èªè¨¼ã³ã¼ããå
¥åãã¦ãã ãã","Enter the 6-digit verification code"));return}if(S.length<8){y(t("ãã¹ã¯ã¼ãã¯8æå以ä¸ã«ãã¦ãã ãã","Your password must be at least 8 characters"));return}if(S!==c){y(t("ãã¹ã¯ã¼ããä¸è´ãã¾ãã","The passwords do not match"));return}m(!0);try{await jo(n,p,S),d("done")}catch(U){y(U.message||t("ãã¹ã¯ã¼ãã®åè¨å®ã«å¤±æãã¾ãã","Failed to reset your password"))}finally{m(!1)}};return e.jsx(i,{sx:{minHeight:"100vh",bgcolor:xe.lightGray,display:"flex",alignItems:"center",justifyContent:"center",p:3},children:e.jsxs(Q,{sx:{p:4,maxWidth:420,width:"100%",borderRadius:2},elevation:2,children:[r==="email"&&e.jsxs(e.Fragment,{children:[e.jsxs(i,{sx:{textAlign:"center",mb:2},children:[e.jsx(Kr,{sx:{fontSize:48,color:xe.orange,mb:1}}),e.jsx(a,{variant:"h5",sx:{fontWeight:700,color:xe.squidInk},children:t("ãã¹ã¯ã¼ãåè¨å®","Reset password")})]}),e.jsxs(a,{variant:"body2",sx:{mb:3,color:xe.textSecondary,textAlign:"center"},children:[t("ç»é²æ¸ã¿ã®ã¡ã¼ã«ã¢ãã¬ã¹ãå
¥åãã¦ãã ããã","Enter the email address you registered with."),e.jsx("br",{}),t("èªè¨¼ã³ã¼ãããéããã¾ãã","We'll send you a verification code.")]}),e.jsxs("form",{onSubmit:L,children:[e.jsx(we,{fullWidth:!0,label:t("ã¡ã¼ã«ã¢ãã¬ã¹","Email address"),type:"email",value:n,onChange:W=>E(W.target.value),required:!0,sx:{mb:2}}),e.jsx(Cn,{onVerify:T,resetKey:v}),g&&e.jsx(a,{color:"error",variant:"body2",sx:{mb:1},children:g}),e.jsx(C,{type:"submit",variant:"contained",fullWidth:!0,size:"large",disabled:k,sx:{mb:2,bgcolor:xe.orange,color:xe.squidInk,fontWeight:700,"&:hover":{bgcolor:xe.orangeHover}},children:k?e.jsx(Dt,{size:24,sx:{color:xe.squidInk}}):t("èªè¨¼ã³ã¼ããéä¿¡","Send verification code")})]})]}),r==="otp"&&e.jsxs(e.Fragment,{children:[e.jsxs(i,{sx:{textAlign:"center",mb:2},children:[e.jsx(rr,{sx:{fontSize:48,color:xe.orange,mb:1}}),e.jsx(a,{variant:"h5",sx:{fontWeight:700,color:xe.squidInk},children:t("æ°ãããã¹ã¯ã¼ããè¨å®","Set a new password")})]}),e.jsxs(a,{variant:"body2",sx:{mb:1,color:xe.textSecondary,textAlign:"center"},children:[e.jsx("strong",{children:n})," ",t("ã«éä¿¡ãããèªè¨¼ã³ã¼ãã¨"," and the verification code sent to "),e.jsx("br",{}),t("æ°ãããã¹ã¯ã¼ããå
¥åãã¦ãã ããã","Enter a new password.")]}
1),e.jsx(a,{variant:"caption",sx:{display:"block",mb:2,color:"#d32f2f",textAlign:"center",bgcolor:"#FFF3E0",borderRadius:1,py:.5,px:1},children:t("ã¡ã¼ã«ãå±ããªãå ´åã¯è¿·æã¡ã¼ã«ï¼ã¹ãã ï¼ãã©ã«ããã確èªãã ãã","If the email doesn't arrive, check your spam folder")}),e.jsxs("form",{onSubmit:O,children:[e.jsx(we,{fullWidth:!0,label:t("èªè¨¼ã³ã¼ãï¼6æ¡ï¼","Verification code (6 digits)"),value:p,onChange:W=>{const U=W.target.value.replace(/\D/g,"").slice(0,6);b(U)},required:!0,inputProps:{maxLength:6,inputMode:"numeric",style:{textAlign:"center",fontSize:24,letterSpacing:8}},sx:{mb:2}}),e.jsx(we,{fullWidth:!0,label:t("æ°ãããã¹ã¯ã¼ãï¼8æå以ä¸ï¼","New password (at least 8 characters)"),type:"password",value:S,onChange:W=>u(W.target.value),required:!0,inputProps:{minLength:8},sx:{mb:2}}),e.jsx(we,{fullWidth:!0,label:t("ãã¹ã¯ã¼ã確èª","Confirm password"),type:"password",value:c,onChange:W=>h(W.target.value),required:!0,sx:{mb:2}}),g&&e.jsx(a,{color:"error",variant:"body2",sx:{mb:1},children:g}),e.jsx(C,{type:"submit",variant:"contained",fullWidth:!0,size:"large",disabled:k,sx:{mb:2,bgcolor:xe.orange,color:xe.squidInk,fontWeight:700,"&:hover":{bgcolor:xe.orangeHover}},children:k?e.jsx(Dt,{size:24,sx:{color:xe.squidInk}}):t("ãã¹ã¯ã¼ããåè¨å®","Reset password")})]}),e.jsxs(i,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(C,{size:"small",onClick:()=>{d("email"),b(""),u(""),h(""),y("")},sx:{color:xe.textSecondary},children:t("æ»ã","Back")}),e.jsx(C,{size:"small",onClick:$,disabled:j>0||k,sx:{color:xe.accentBlue},children:j>0?t(`åéä¿¡ï¼${j}ç§ï¼`,`Resend (${j}s)`):t("ã³ã¼ããåéä¿¡","Resend code")})]})]}),r==="done"&&e.jsxs(e.Fragment,{children:[e.jsxs(i,{sx:{textAlign:"center",mb:2},children:[e.jsx(Oe,{sx:{fontSize:48,color:"#1D8102",mb:1}}),e.jsx(a,{variant:"h5",sx:{fontWeight:700,color:xe.squidInk},children:t("åè¨å®å®äº","Password reset")})]}),e.jsxs(a,{variant:"body2",sx:{mb:3,color:xe.textSecondary,textAlign:"center"},children:[t("ãã¹ã¯ã¼ããæ£å¸¸ã«åè¨å®ããã¾ããã","Your password has been reset."),e.jsx("br",{}),t("æ°ãããã¹ã¯ã¼ãã§ãã°ã¤ã³ãã¦ãã ããã","Sign in with your new password.")]}),e.jsx(C,{variant:"contained",fullWidth:!0,size:"large",onClick:()=>s("/vault-pro-exam/login"),sx:{mb:2,bgcolor:xe.orange,color:xe.squidInk,fontWeight:700,"&:hover":{bgcolor:xe.orangeHover}},children:t("ãã°ã¤ã³ãã¼ã¸ã¸","Go to login")})]}),e.jsx(a,{variant:"body2",sx:{textAlign:"center",color:xe.textSecondary,mt:1},children:e.jsx(We,{component:"button",onClick:()=>s("/vault-pro-exam/login"),sx:{cursor:"pointer",color:xe.accentBlue},children:t("ãã°ã¤ã³ã«æ»ã","Back to login")})}),e.jsx(i,{sx:{mt:2},children:e.jsx(gt,{color:xe.textSecondary})})]})})}const Hn=10,Ot={problems:[]},Ft={},Tt={};async function Ar(o){try{const t=await fetch(o);return t.ok?mo(await t.json()):Ot}catch{return Ot}}async function ot(o){if(Ft[o])return Ft[o];const t=await Ar(`/data/vault-pro/${o}Problems.json`);return Ft[o]=t,t}async function st(o){if(Tt[o])return Tt[o];const t=await Ar(`/data/vault-pro/${o}MockExamProblems.json`);return Tt[o]=t,t}function Fr(o){return at(o).problems.length}function kn(o){const t=at(o);return new Set(t.problems.map(r=>r.set_number||1)).size}function En(o){const t=Vt(o);return new Set(t.problems.map(r=>r.set_number||1)).size}function at(o){return Ft[o]||Ot}function Ge(o,t){const s=at(o),r=s.problems.filter(d=>d.set_number===t);return r.length>0?{problems:r}:{problems:s.problems}}function Vt(o){return Tt[o]||Ot}function Me(o,t){const s=Vt(o),r=s.problems.filter(d=>d.set_number===t);return r.length>0?{problems:r}:{problems:s.problems}}const ee=_e,Ko={vaultPro:"Vault Operations Professional"},Qo={vaultPro:"Vault Pro"},Xo=()=>{const o=be(),{user:t,logout:s}=Fe(),{examType:r}=ze(),{siteLocale:d}=ue(),n=(V,G)=>d==="en"?G:V,[E,p]=l.useState(!1),[b,S]=l.useState("monthly"),[u,c]=l.useState(!1),[h,g]=l.useState(!1),[y,k]=l.useState(!1),[m,j]=l.useState(""),[z,N]=l.useState(!1);if(l.useEffect(()=>{if(!r){o("/vault-pro-exam/");return}let V=!1;return Promise.all([ot(r),st(r)]).then(()=>{V||N(!0)}),()=>{V=!0}},[r,o]),!r)return null;if(!z)return e.jsx(i,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh",bgcolor:ee.lightGray},children:e.jsx(a,{sx:{color:ee.textSecondary},children:n("åé¡ãã¼ã¿ãèªã¿è¾¼ã¿ä¸...","Loading questions...")})});const T=Qo[r]||Ko[r]||r.toUpperCase(),v=Fr(r),I=kn(r),D=En(r),te=`${r}_`,L=Number(localStorage.getItem(`${te}currentSet`)||"1"),$=Number(localStorage.getItem(`${te}answeredCount`)||"0"),O=Number(localStorage.getItem(`${te}correctCount`)||"0"),W=$>0?Math.round(O/$*100):0,U=async V=>{j("");const G=b==="buyout";if(b==="all-access"?!Pn:G?!Ke:!wn){j(n("Stripe ã®èª²éãªã³ã¯ãæªè¨å®ã§ããç°å¢å¤æ°ã確èªãã¦ãã ããã","The Stripe billing link is not configured. Check the environment variables."));return}const _=Yn();try{k(!0),await br({consentVersion:Wt,context:"checkout",termsAccepted:V.termsAccepted,privacyAccepted:V.privacyAccepted,autoRenewalAccepted:G?!1:V.autoRenewalAccepted}),_.open(b==="all-access"?Rr(t):(G?Er:Ir)(t)),p(!1)}catch(F){_.cancel(),j(F.message||n("åæå
容ã®ä¿åã«å¤±æãã¾ãã","Failed to save your consent"))}finally{k(!1)}},ne=()=>{s(),g(!0),setTimeout(()=>
1o("/vault-pro-exam/login"),1200)};return e.jsxs(i,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",width:"100%",bgcolor:ee.lightGray},children:[e.jsx(i,{sx:{bgcolor:ee.squidInk,px:2,py:2.5,position:"relative"},children:e.jsxs(i,{sx:{display:"flex",alignItems:"center",maxWidth:800,mx:"auto"},children:[e.jsx(ce,{onClick:()=>o("/vault-pro-exam/"),"aria-label":n("ãããã¸æ»ã","Back to top"),sx:{color:"#fff",mr:1,minWidth:44,minHeight:44},children:e.jsx($e,{})}),e.jsx(ce,{onClick:()=>c(!0),"aria-label":n("ä»ã®è©¦é¨ã¸åãæ¿ã","Switch to another exam"),sx:{color:"#fff",mr:1,minWidth:44,minHeight:44},children:e.jsx(Qr,{})}),e.jsxs(i,{sx:{flex:1},children:[e.jsx(a,{sx:{color:"#fff",fontWeight:800,fontSize:{xs:"1.2rem",md:"1.5rem"},whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:T}),$>0&&e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[e.jsx(pn,{sx:{color:ee.accent,fontSize:16}}),e.jsx(a,{variant:"caption",sx:{color:"rgba(255,255,255,0.7)"},children:n(`æ£è§£ç ${W}%ï¼${O}/${$}åï¼`,`Accuracy ${W}% (${O}/${$} questions)`)})]})]}),t?e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(Je,{label:t.plan==="premium"?n("ææ","Paid"):n("ç¡æ","Free"),size:"small",sx:{bgcolor:t.plan==="premium"?ee.accent:"rgba(255,255,255,0.15)",color:"#fff",fontWeight:700,fontSize:11,height:24}}),e.jsx(ce,{onClick:ne,"aria-label":n("ãã°ã¢ã¦ã","Log out"),sx:{color:"rgba(255,255,255,0.6)",minWidth:40,minHeight:40},children:e.jsx(Xr,{sx:{fontSize:20}})})]}):e.jsxs(i,{sx:{display:"flex",gap:1},children:[e.jsx(C,{size:"small",variant:"outlined",onClick:()=>o("/vault-pro-exam/login"),sx:{color:"#fff",borderColor:"rgba(255,255,255,0.4)",textTransform:"none",fontSize:13,height:36},children:n("ãã°ã¤ã³","Log in")}),e.jsx(C,{size:"small",variant:"contained",onClick:()=>o("/vault-pro-exam/register"),sx:{bgcolor:ee.accent,textTransform:"none",fontSize:13,fontWeight:700,height:36,"&:hover":{bgcolor:ee.accentHover}},children:n("ç»é²","Sign up")})]})]})}),e.jsxs(Te,{maxWidth:"sm",sx:{flex:1,py:3},children:[e.jsx(Mr,{examType:r,totalProblems:v,locale:d==="en"?"en":"ja",translateCategory:V=>Nr(V,d==="en"?"en":"ja")}),$>0&&e.jsxs(Q,{role:"button",tabIndex:0,onClick:()=>o("/vault-pro-exam/practice"),onKeyDown:V=>{V.key==="Enter"&&o("/vault-pro-exam/practice")},sx:{p:2.5,mb:2.5,borderRadius:2.5,border:`2px solid ${ee.accent}`,cursor:"pointer",transition:"all 0.2s","&:hover":{boxShadow:`0 4px 16px ${ee.accent}25`},"&:focus-visible":{outline:`2px solid ${ee.accent}`,outlineOffset:2}},elevation:0,children:[e.jsxs(i,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs(i,{children:[e.jsx(a,{sx:{fontWeight:700,color:ee.textPrimary,fontSize:15},children:n("ç¶ãããå¦ç¿ãã","Continue studying")}),e.jsx(a,{variant:"caption",sx:{color:ee.textSecondary},children:n(`ç·´ç¿${L} ãè§£ãã¦ãã¾ã`,`Working on Practice ${L}`)})]}),e.jsx(tt,{sx:{color:ee.accent}})]}),e.jsx(qe,{variant:"determinate",value:Math.min($/10*100,100),sx:{mt:1.5,height:6,borderRadius:3,bgcolor:"#E0E4E8","& .MuiLinearProgress-bar":{bgcolor:ee.accent,borderRadius:3}}})]}),e.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[e.jsxs(Q,{role:"button",tabIndex:0,onClick:()=>o("/vault-pro-exam/practice"),onKeyDown:V=>{V.key==="Enter"&&o("/vault-pro-exam/practice")},sx:{p:2.5,borderRadius:2.5,cursor:"pointer",display:"flex",alignItems:"center",gap:2,transition:"all 0.2s","&:hover":{transform:"translateY(-2px)",boxShadow:"0 4px 16px rgba(0,0,0,0.08)"},"&:focus-visible":{outline:`2px solid ${ee.accent}`,outlineOffset:2}},elevation:0,children:[e.jsx(i,{sx:{width:52,height:52,borderRadius:2,bgcolor:"#E5F5FC",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e.jsx(Zr,{sx:{fontSize:28,color:ee.accent}})}),e.jsxs(i,{sx:{flex:1,minWidth:0},children:[e.jsx(a,{sx:{fontWeight:700,fontSize:16,color:ee.textPrimary},children:n("ç·´ç¿åé¡","Practice questions")}),e.jsx(a,{variant:"caption",sx:{color:ee.textSecondary},children:n(`${v}åã»${I}ã»ãã`,`${v} questions in ${I} sets`)}
1)]}),e.jsx(tt,{sx:{color:ee.textMuted,fontSize:20}})]}),e.jsxs(Q,{role:"button",tabIndex:0,onClick:()=>o("/vault-pro-exam/mock"),onKeyDown:V=>{V.key==="Enter"&&o("/vault-pro-exam/mock")},sx:{p:2.5,borderRadius:2.5,cursor:"pointer",display:"flex",alignItems:"center",gap:2,transition:"all 0.2s","&:hover":{transform:"translateY(-2px)",boxShadow:"0 4px 16px rgba(0,0,0,0.08)"},"&:focus-visible":{outline:`2px solid ${ee.accent}`,outlineOffset:2}},elevation:0,children:[e.jsx(i,{sx:{width:52,height:52,borderRadius:2,bgcolor:"#FFF3E0",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e.jsx(fn,{sx:{fontSize:28,color:"#FF9900"}})}),e.jsxs(i,{sx:{flex:1,minWidth:0},children:[e.jsx(a,{sx:{fontWeight:700,fontSize:16,color:ee.textPrimary},children:n("模æ¬è©¦é¨","Mock exams")}),e.jsx(a,{variant:"caption",sx:{color:ee.textSecondary},children:n(`æ¬çªå½¢å¼ã»${D}åå`,`Exam format, ${D} full mocks`)})]}),e.jsx(tt,{sx:{color:ee.textMuted,fontSize:20}})]}),e.jsxs(Q,{role:"button",tabIndex:0,onClick:()=>o("/vault-pro-exam/review"),onKeyDown:V=>{V.key==="Enter"&&o("/vault-pro-exam/review")},sx:{p:2.5,borderRadius:2.5,cursor:"pointer",display:"flex",alignItems:"center",gap:2,transition:"all 0.2s","&:hover":{transform:"translateY(-2px)",boxShadow:"0 4px 16px rgba(0,0,0,0.08)"},"&:focus-visible":{outline:`2px solid ${ee.accent}`,outlineOffset:2}},elevation:0,children:[e.jsx(i,{sx:{width:52,height:52,borderRadius:2,bgcolor:"#E8F5E9",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e.jsx(eo,{sx:{fontSize:28,color:"#1D8102"}})}),e.jsxs(i,{sx:{flex:1,minWidth:0},children:[e.jsx(a,{sx:{fontWeight:700,fontSize:16,color:ee.textPrimary},children:n("復ç¿","Review")}),e.jsx(a,{variant:"caption",sx:{color:ee.textSecondary},children:n("ééããåé¡ãç¹°ãè¿ãè§£ã","Practice the questions you got wrong")})]}),e.jsx(tt,{sx:{color:ee.textMuted,fontSize:20}})]}),e.jsxs(Q,{role:"button",tabIndex:0,onClick:()=>o("/vault-pro-exam/settings"),onKeyDown:V=>{V.key==="Enter"&&o("/vault-pro-exam/settings")},sx:{p:2.5,borderRadius:2.5,cursor:"pointer",display:"flex",alignItems:"center",gap:2,transition:"all 0.2s","&:hover":{transform:"translateY(-2px)",boxShadow:"0 4px 16px rgba(0,0,0,0.08)"},"&:focus-visible":{outline:`2px solid ${ee.accent}`,outlineOffset:2}},elevation:0,children:[e.jsx(i,{sx:{width:52,height:52,borderRadius:2,bgcolor:"#F5F5F5",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e.jsx(gn,{sx:{fontSize:28,color:ee.textSecondary}})}),e.jsxs(i,{sx:{flex:1,minWidth:0},children:[e.jsx(a,{sx:{fontWeight:700,fontSize:16,color:ee.textPrimary},children:n("è¨å®","Settings")}),e.jsx(a,{variant:"caption",sx:{color:ee.textSecondary},children:n("表示ã»é³å£°ã»ãã¼ã¿ç®¡ç","Display, sound, and data")})]}),e.jsx(tt,{sx:{color:ee.textMuted,fontSize:20}})]})]}),t&&t.plan!=="premium"&&e.jsxs(Q,{sx:{mt:3,p:2.5,borderRadius:2.5,bgcolor:ee.squidInk,textAlign:"center"},elevation:0,children:[e.jsx(a,{sx:{color:"#fff",fontWeight:700,fontSize:15,mb:.5},children:n("å
¨åé¡ã«ã¢ã¯ã»ã¹ãã","Get all questions")}),e.jsx(a,{variant:"caption",sx:{color:"rgba(255,255,255,0.6)",display:"block",mb:2},children:n(`ç·´ç¿ã»ãã${$t+1}以éã»æ¨¡æ¬è©¦é¨${_t+1}åç®ä»¥éã®ãã«ã¢ã¯ã»ã¹`,`Full access to Practice Set ${$t+1}+ and Mock Exam ${_t+1}+`)}),e.jsx(C,{variant:"contained",onClick:()=>{j(""),S("monthly"),p(!0)},sx:{bgcolor:ee.accent,color:ee.onAccent,fontWeight:700,borderRadius:2,textTransform:"none",px:4,"&:hover":{bgcolor:ee.accentHover}},children:n("ææãã©ã³ãè¦ã","See paid plans")}),Ke&&e.jsx(i,{sx:{mt:1.5},children:e.jsx(C,{variant:"outlined",onClick:()=>{j(""),S("buyout"),p(!0)},sx:{color:"#fff",borderColor:"rgba(255,255,255,0.6)",fontWeight:700,borderRadius:2,textTransform:"none",px:3,"&:hover":{borderColor:"#fff",bgcolor:"rgba(255,255,255,0.08)"}},children:n(xt.priceLabel.ja,xt.priceLabel.en)})}),Ke&&e.jsxs(a,{variant:"caption",sx:{display:"block",mt:1.5,color:"rgba(255,255,255,0.65)",lineHeight:1.6,textAlign:"left"},children:[n(zt.ja,zt.en)," ",n(Lt.ja,Lt.en)]}),Pn&&e.jsxs(i,{sx:{mt:2,pt:2,borderTop:"1px solid rgba(255,255,255,0.1)"},children:[e.jsx(a,{variant:"caption",sx:{color:"rgba(255,255,255,0.7)",display:"block",mb:1},children:n("å
¨è©¦é¨ã¾ã¨ãã¦ãå¾ã«","Every exam track for less")}),e.jsx(C,{variant:"outlined",size:"small",onClick:()=>{j(""),S("all-access"),p(!0)}
1,sx:{color:"#fff",borderColor:"rgba(255,255,255,0.5)",textTransform:"none",fontSize:13,"&:hover":{borderColor:"#fff",bgcolor:"rgba(255,255,255,0.08)"}},children:n("å
¨è©¦é¨ãã㯠¥2,980/æã«ã¢ããã°ã¬ã¼ã","Upgrade to the All Exams pack, Â¥2,980/month (US$18.80)")})]})]}),t&&t.plan==="premium"&&Lo&&e.jsx(i,{sx:{mt:2,textAlign:"center"},children:e.jsx(C,{size:"small",startIcon:e.jsx(to,{}),onClick:()=>window.open(kr,"_blank","noopener,noreferrer"),sx:{color:ee.textMuted,fontSize:13,textTransform:"none"},children:n("ãµãã¹ã¯ãªãã·ã§ã³ç®¡ç","Manage subscription")})})]}),e.jsx(qr,{open:u,onClose:()=>c(!1),currentPath:typeof window<"u"?window.location.pathname:void 0}),e.jsx(un,{open:E,onClose:()=>{y||(p(!1),j(""))},plan:b==="buyout"?"buyout":"monthly",onConfirm:U,loading:y,error:m}),e.jsx(or,{open:h,autoHideDuration:1500,onClose:()=>g(!1),anchorOrigin:{vertical:"top",horizontal:"center"},children:e.jsx(Le,{severity:"success",variant:"filled",onClose:()=>g(!1),sx:{fontWeight:600},children:n("ãã°ã¢ã¦ããã¾ãã","Signed out")})})]})},ge=_e;function Tr({mode:o,title:t,subtitle:s,setCount:r,getLocalResult:d,onSetClick:n,guestUnlockedSetCount:E=1,getInProgress:p,onRestart:b,getSetProblems:S}){const{siteLocale:u}=ue(),c=(_,F)=>u==="en"?F:_,h=be(),{isSubscribed:g,isLoggedIn:y}=Fe(),{examType:k}=ze(),{darkMode:m}=Be(),[j,z]=l.useState(!1),[N,T]=l.useState(new Map),[v,I]=l.useState(0),D=m?"#121212":ge.lightGray,te=m?"#1a1a2e":ge.squidInk,L=m?"#1e1e1e":"#fff",$=m?"#252540":ge.squidInk,O=m?"#2a2a2a":"#F0F0F0",W=m?"#e0e0e0":ge.textPrimary;if(l.useEffect(()=>{y&&k&&zn(k,o).then(({sets:_})=>{const F=new Map;for(const R of _)F.set(R.setNumber,R);T(F)}).catch(()=>{})},[y,k,o]),l.useEffect(()=>{if(!y||!k||!S||r===0)return;let _=!0;return Br({examType:k,kind:o==="mock"?"mock":"practice",getSets:()=>zn(k,o),getHistory:F=>Sn(k,o,F),getSetProblems:S}).then(F=>{_&&F!==null&&I(R=>R+1)}).catch(()=>{}),()=>{_=!1}},[y,k,o,r]),l.useEffect(()=>{k||h("/vault-pro-exam/select")},[k,h]),!k)return null;const U=Array.from({length:r},(_,F)=>F+1),ne=_=>S?S(_).length:0,V=_=>{if(!g&&_>E){z(!0);return}n(_)},G=U.filter(_=>{const F=N.get(_),R=y?null:d(_,k),H=ne(_);return H>0&&((F==null?void 0:F.answered)??0)>=H||((R==null?void 0:R.done)??!1)}).length;return e.jsxs(i,{sx:{display:"flex",flexDirection:"column",width:"100%",minHeight:"100vh",bgcolor:D},children:[e.jsxs(i,{sx:{bgcolor:te,display:"flex",alignItems:"center",px:1,py:2,flexShrink:0},children:[e.jsx(ce,{onClick:()=>h("/vault-pro-exam/menu"),"aria-label":c("ã¡ãã¥ã¼ã¸æ»ã","Back to menu"),sx:{color:"#fff",minWidth:44,minHeight:44},children:e.jsx($e,{})}),e.jsxs(i,{sx:{flex:1,textAlign:"center"},children:[e.jsx(a,{sx:{color:"#fff",fontWeight:700,fontSize:{xs:"1.1rem",md:"1.3rem"}},children:t}),e.jsxs(a,{variant:"caption",sx:{color:"rgba(255,255,255,0.6)"},children:[s," ",G>0&&c(`ã»${G}/${r} å®äº`,`· ${G}/${r} completed`)]})]}),e.jsx(i,{sx:{width:44}})]}),e.jsx(Te,{maxWidth:"md",sx:{flex:1,overflowY:"auto",py:3},children:e.jsx(i,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr 1fr",sm:"1fr 1fr 1fr",md:"1fr 1fr 1fr 1fr"},gap:2},children:U.map(_=>{const F=N.get(_),R=y?null:d(_,k),H=(F==null?void 0:F.answered)??0,P=ne(_),x=P>0&&H>=P,A=x?Math.round(((F==null?void 0:F.correct)??0)/P*100):(R==null?void 0:R.rate)??0,J=x||((R==null?void 0:R.done)??!1),f=!g&&_>E,B=(!f&&p?p(_):null)??(!J&&H>0?H:null);return e.jsxs(Q,{role:"button",tabIndex:0,onClick:()=>V(_),onKeyDown:re=>{(re.key==="Enter"||re.key===" ")&&V(_)},sx:{p:2,minHeight:100,bgcolor:f?O:J?L:$,borderRadius:2.5,cursor:"pointer",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:.5,transition:"transform 0.2s, box-shadow 0.2s","&:hover":{transform:"translateY(-2px)",boxShadow:"0 4px 16px rgba(0,0,0,0.1)"},"&:focus-visible":{outline:`2px solid ${ge.accent}`,outlineOffset:2},border:J?`2px solid ${A>=70?ge.success:ge.error}`:f?`1px solid ${ge.borderGray}`:"none",position:"relative"},elevation:f?0:1,children:[f&&e.jsx(no,{sx:{fontSize:20,color:ge.textMuted,mb:.5}}),J&&!f&&e.jsx(Oe,{sx:{fontSize:20,color:A>=70?ge.success:ge.error,mb:.5}}),e.jsx(a,{sx:{fontWeight:700,fontSize:18,color:f?ge.textMuted:J?W:"#fff"},children:_}),J&&!f&&B===null?e.jsx(Je,{label:`${A}%`,size:"small",sx:{height:22,fontSize:12,fontWeight:700,bgcolor:A>=70?ge.successLight:ge.errorLight,color:A>=70?ge.success:ge.error}}):e.jsx(a,{variant:"caption",sx:{color:f?ge.textMuted:B!==null?J?W:"#fff":"rgba(255,255,255,0.4)",fontSize:11,fontWeight:B!==null?700:400},children:f?c("ããã¯","Locked"):B!==null?c(`éä¸ ${B}å`,`In progress: ${B}`):c("æªåé¨","Not attempted")}),B!==null&&b&&e.jsxs(i,{sx:{display:"flex",gap:.5,mt:.25},children:[e.jsx(C,{size:"small",onClick:re=>{re.stopPropagation(),V(_)},onKeyDown:re=>re.stopPropagation(),sx:{minHeight:32,px:1,fontSize:12,fontWeight:700,textTransform:"none",textDecoration:"underline",color:J?W:"#fff"},children:c("ç¶ããã","Resume")}),e.jsx(C,{size:"small",onClick:re=>{re.stopPropagation(),b(_)},onKeyDown:re=>re.stopPropagation(),sx:{minHeight:32,px:1,fontSize:12,fontWeight:700,textTransform:"none",textDecoration:"underline",color:J?W:"#fff"},children:c("æåãã","Restart")})]}),J&&!f&&e.jsx(qe,{variant:"determinate",value:A,sx:{width:"100%",height:4,borderRadius:2,mt:.5,bgcolor:"#E0E4E8","& .MuiLinearProgress-bar":{bgcolor:A>=70?ge.success:ge.error,borderRadius:2}}})]},_)})})}),e.jsx(Qe,{open:j,onClose:()=>z(!1)})]})}function Zo(o,t){const s=localStorage.getItem(`practice_result_${t}_set${o}`);if(!s)return{rate:0,done:!1};try{const r=JSON.parse(s);return{rate:Number(r.rate)||0,done:!0}}catch{return{rate:0,done:!1}}}const sn=()=>{const{siteLocale:o}=ue(),t=(p,b)=>o==="en"?b:p,s=be(),{examType:r}=ze();pt(r?()=>ot(r):null,r);const d=r?kn(r):0,n=r?Fr(r):0,E=p=>{if(r){const b=Ge(r,p).problems,S=Fn(r);if(Tn(S,p,b.length)){const c=Kn(b,S.answeredIds);if(c!==null){s(`/vault-pro-exam/training-problem/${c}`);return}}An(r,p);const u=b.length>0?b[0].id:1;s(`/vault-pro-exam/training-problem/${u}`)}};return e.jsx(Tr,{mode:"practice",guestUnlockedSetCount:3,title:t("ç·´ç¿åé¡","Practice"),subtitle:t(`å${Hn}å / å
¨${n}å`,`${Hn} each / ${n} total`),setCount:d,getLocalResult:Zo,onSetClick:E,getSetProblems:p=>r?Ge(r,p).problems:[],getInProgress:p=>{if(!r)return null;const b=Ge(r,p).problems.length,S=Fn(r);return Tn(S,p,b)?(S==null?void 0:S.answeredIds.length)??0:null},onRestart:p=>{var S;if(!r)return;An(r,p);const b=Ge(r,p).problems;s(`/vault-pro-exam/training-problem/${((S=b[0])==null?void 0:S.id)??1}`)}})};function Ne({children:o,component:t="div",sx:s={}}){return e.jsx(i,{component:t,sx:{userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",WebkitTouchCallout:"none",...s},onCopy:r=>r.preventDefault(),onCut:r=>r.preventDefault(),onContextMenu:r=>r.preventDefault(),onDragStart:r=>r.preventDefault(),children:o})}function Gt(){l.useEffect(()=>{const o=n=>{if(n.key==="F12"){n.preventDefault();return}if(n.ctrlKey&&n.shiftKey&&(n.key==="I"||n.key==="i"||n.key==="J"||n.key==="j"||n.key==="C"||n.key==="c")){n.preventDefault();return}if(n.ctrlKey&&(n.key==="U"||n.key==="u")){n.preventDefault();return}if(n.ctrlKey&&(n.key==="S"||n.key==="s")){n.preventDefault();return}if(n.ctrlKey&&(n.key==="P"||n.key==="p")){n.preventDefault();return}if(n.ctrlKey&&(n.key==="A"||n.key==="a")){n.preventDefault();return}if(n.ctrlKey&&(n.key==="C"||n.key==="c")&&!n.shiftKey){n.preventDefault();return}},t=n=>{n.preventDefault()},s=n=>{n.preventDefault(),n.clipboardData&&n.clipboardData.setData("text/plain","")},r=n=>{n.preventDefault()},d=n=>{n.preventDefault()};return document.addEventListener("keydown",o),document.addEventListener("contextmenu",t),document.addEventListener("copy",s),document.addEventListener("dragstart",r),document.addEventListener("selectstart",d),()=>{document.removeEventListener("keydown",o),document.removeEventListener("contextmenu",t),document.removeEventListener("copy",s),document.removeEventListener("dragstart",r),document.removeEventListener("selectstart",d)}},[])}const es="/sounds/correct.mp3",ts="/sounds/incorrect.mp3",Un=()=>{l.useEffect(()=>{Jn("begin_practice")},[]),Gt();const{id:o}=hn(),t=be(),s=Number(o),{examType:r}=ze(),{soundEnabled:d}=Ht(),{darkMode:n,toggleDarkMode:E}=Be(),{easyMode:p,toggleEasyMode:b}=Ut(),{isLoggedIn:S,isSubscribed:u,loading:c}=Fe(),{siteLocale:h,effectiveStudyMode:g,isEnglishQuestionMode:y,toggleEnglishQuestionMode:k}=ue(),m=(w,K)=>h==="en"?K:w,[j,z]=l.useState(!1),[N,T]=l.useState([]),[v,I]=l.useState(null),[D,te]=l.useState(null),L=l.useRef(null),$=l.useRef(null),O=w=>{$.current||(L.current&&(clearTimeout(L.current),L.current=null),$.current=w,Gn.flushSync(()=>{I(w)}))};l.useEffect(()=>()=>{L.current&&clearTimeout(L.current)},[]);const W=Number(localStorage.getItem(`${r?r+"_":""}currentSet`)||"1");l.useEffect(()=>{if(!r)return;let w=!1;return ot(r).then(()=>{w||z(!0)}),()=>{w=!0}},[r]);const U=r&&j?Qn(at(r).problems,s):null,ne=(U==null?void 0:U.set)??W,V=r?Ge(r,ne):{problems:[]},G=U==null?void 0:U.problem,_=U==null?void 0:U.set;l.useEffect(()=>{r&&_&&_!==W&&localStorage.setItem(`${r}_currentSet`,String(_))},[r,_,W]);const F=G?ft(G,h,g):null;if(l.useEffect(()=>{F&&T(Array(F.options.length).fill(!1)),L.current&&(clearTimeout(L.current),L.current=null),$.current=null,I(null)},[s,j]),l.useEffect(()=>{d&&v==="correct"?new Audio(es).play().catch(()=>{}):d&&v==="incorrect"&&new Audio(ts).play().catch(()=>{})},[v,d]),l.useEffect(()=>{r||t("/vault-pro-exam/select")},[r,t]),G&&mn("practice",ne,{isSubscribed:u,loading:c}))return e.jsx(i,{sx:{minHeight:"100vh",bgcolor:"#F2F3F3"}
1,children:e.jsx(Qe,{open:!0,onClose:()=>t("/vault-pro-exam/practice")})});if(!j||!G||!F)return e.jsx(i,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh",bgcolor:"#f5f5f5"},children:e.jsx(a,{sx:{color:"#666"},children:j?h==="en"?`Question not found (ID: ${o})`:`åé¡ãåå¨ãã¾ãã (ID: ${o})`:m("åé¡ãã¼ã¿ãèªã¿è¾¼ã¿ä¸...","Loading questions...")})});const R=V.problems,H=R.length,P=R.findIndex(w=>w.id===s),x=r?`${r}_`:"",A=localStorage.getItem(`${x}answersDetail`)||"[]",J=new Set(JSON.parse(A).map(w=>w.questionId)).size,f=Math.min(J/H*100,100),q=w=>{$.current||(L.current&&(clearTimeout(L.current),L.current=null),T(K=>{const ie=G.correctAnswers.length;if(p&&ie===1){const ae=K.map((de,se)=>se===w);return setTimeout(()=>{if($.current)return;const de=G.correctAnswers[0]===w;O(de?"correct":"incorrect"),B(de,[w])},0),ae}const Y=[...K];Y[w]=!Y[w];const Xe=Y.filter(Boolean).length;return p&&Xe>=G.correctAnswers.length&&(L.current&&clearTimeout(L.current),L.current=setTimeout(()=>{if(L.current=null,$.current)return;const ae=Y.map((se,De)=>se?De:-1).filter(se=>se!==-1),de=ae.length===G.correctAnswers.length&&ae.every((se,De)=>se===G.correctAnswers[De]);O(de?"correct":"incorrect"),B(de,ae)},1e3)),Y}))},B=(w,K)=>{const ie=localStorage.getItem(`${x}answersDetail`)||"[]";let Y=JSON.parse(ie);Y=Y.filter(ae=>ae.questionId!==s),Y.push({questionId:s,isCorrect:w,category:G.category,ts:Date.now()}),localStorage.setItem(`${x}answersDetail`,JSON.stringify(Y));const Xe=Y.filter(ae=>ae.isCorrect).length;if(localStorage.setItem(`${x}answeredCount`,String(Y.length)),localStorage.setItem(`${x}correctCount`,String(Xe)),localStorage.setItem(`ratio_${r}_${s}`,w?"100":"0"),S&&r){const ae=K??N.map((de,se)=>de?se:-1).filter(de=>de!==-1);jr({question_id:s,selected_choice_ids:ae,is_correct:w,exam_type:r,question_set:"practice",set_number:ne}).catch(()=>{})}if(r){const ae=`${r}_wrong_answers`,de=localStorage.getItem(ae)||"[]";let se=JSON.parse(de);w?se=se.filter(De=>De!==s):se.includes(s)||se.push(s),localStorage.setItem(ae,JSON.stringify(se))}},re=()=>{if($.current)return;const w=N.map((ie,Y)=>ie?Y:-1).filter(ie=>ie!==-1),K=w.length===G.correctAnswers.length&&w.every((ie,Y)=>ie===G.correctAnswers[Y]);O(K?"correct":"incorrect"),B(K,w)},pe=()=>{$.current=null,I(null)},Pe=()=>{if(pe(),P>=0&&P<R.length-1){const w=R[P+1].id;t(`/vault-pro-exam/training-problem/${w}`)}else t("/vault-pro-exam/practice/result")},He=()=>{pe(),t(`/vault-pro-exam/training-problem/${s}/explanation`)},Se=n?"#121212":"#F2F3F3",ye=n?"#e0e0e0":"#333",kt=n?"#b0b0b0":"#444",Yt=n?"#333":"#e0e0e0";return e.jsxs(i,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",width:"100%",bgcolor:Se},children:[e.jsxs(i,{sx:{height:64,bgcolor:"#232F3E",display:"flex",alignItems:"center",px:1,flexShrink:0},children:[e.jsx(ce,{onClick:()=>t("/vault-pro-exam/practice"),"aria-label":m("æ»ã","Back"),sx:{color:"#fff",minWidth:44,minHeight:44},children:e.jsx($e,{})}),e.jsxs(i,{sx:{flex:1,textAlign:"center",minWidth:0,px:1},children:[e.jsx(a,{variant:"body2",sx:{color:"#29B5E8",fontSize:"0.75rem",lineHeight:1,fontWeight:600},children:h==="en"?`Practice ${ne}`:`ç·´ç¿${ne}`}),e.jsx(a,{sx:{color:"#fff",lineHeight:1.3,fontSize:{xs:"1rem",sm:"1.1rem",md:"1.25rem"},fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:F.title})]}),h==="ja"&&e.jsx(ce,{onClick:k,"aria-label":y?m("æ¥æ¬èªã«æ»ã","Back to Japanese"):m("è±èªã§è¡¨ç¤º","Show in English"),sx:{color:y?"#29B5E8":"rgba(255,255,255,0.6)",minWidth:44,minHeight:44},children:e.jsx(sr,{})}),e.jsx(ce,{onClick:w=>te(w.currentTarget),"aria-label":m("ã¡ãã¥ã¼","Menu"),sx:{color:"#fff",minWidth:44,minHeight:44},children:e.jsx(ar,{})}),e.jsxs(ir,{anchorEl:D,open:!!D,onClose:()=>te(null),PaperProps:{sx:{minWidth:200}},children:[e.jsxs(je,{onClick:()=>{E(),te(null)},children:[e.jsx(ht,{children:n?e.jsx(Nt,{fontSize:"small"}):e.jsx(qt,{fontSize:"small"})}),e.jsx(oe,{children:n?m("ã©ã¤ãã¢ã¼ã","Light mode"):m("ãã¼ã¯ã¢ã¼ã","Dark mode")})]}),e.jsxs(je,{onClick:()=>{b(),te(null)},children:[e.jsx(ht,{children:e.jsx(Ct,{fontSize:"small",sx:{color:p?"#FF9900":void 0}})}),e.jsx(oe,{children:p?m("ããããã¢ã¼ã OFF","Easy mode OFF"):m("ããããã¢ã¼ã ON","Easy mode ON")})]}),e.jsxs(je,{onClick:()=>{te(null),t("/vault-pro-exam/settings")},children:[e.jsx(ht,{children:e.jsx(gn,{fontSize:"small"})}),e.jsx(oe,{children:m("è¨å®","Settings")})]})]})]}),e.jsxs(i,{sx:{px:{xs:2,md:4,lg:6},pt:{xs:1.5,md:2},pb:.5,maxWidth:{md:1100},mx:{md:"auto"},width:"100%"},children:[e.jsx(qe,{variant:"determinate",value:f,sx:{height:{xs:8,md:10},borderRadius:4,bgcolor:n?"#333":"#F2F3F3","& .MuiLinearProgress-bar":{backgroundColor:"#1D8102"}}}),e.jsxs(a,{sx:{display:"block",textAlign:"center",mt:.5,color:kt,fontSize:{xs:"0.75rem",md:"0.9rem"}},children:[h==="en"?"Progress":"鲿",": ",J,"/",H]})]}),e.jsxs(i,{sx:{px:{xs:2,md:4,lg:6},py:{xs:2,md:3},flex:1,overflowY:"auto",maxWidth:{md:1100},mx:{md:"auto"},width:"100%"},children:[e.jsx(Ne,{children:e.jsx(wt,{text:F.question,sx:{color:ye,whiteSpace:"pre-line",mb:{xs:3,md:4},fontSize:{xs:"1rem",md:"1.2rem",lg:"1.3rem"},lineHeight:{xs:1.7,md:1.8},fontWeight:500}})}),e.jsx(i,{sx:{display:"flex",flexDirection:"column",gap:{xs:1.5,md:2}},children:F.options.map((w,K)=>{const ie=G.correctAnswers.length===1,Y=N[K];return e.jsxs(Q,{onClick:()=>q(K),sx:{display:"flex",alignItems:"center",bgcolor:Y?n?"#1a2a1a":"#EBF5EB":n?"#1e1e1e":"#fff",border:Y?"2px solid #1D8102":`2px solid ${Yt}`,borderRadius:2,p:{xs:1.5,md:2.25},minHeight:52,cursor:"pointer",transition:"all 0.15s"}
1,elevation:0,children:[ie?e.jsx(lr,{checked:Y,sx:{mr:{xs:1,md:1.5},p:.5,color:n?"#aaa":void 0,"&.Mui-checked":{color:"#1D8102"}}}):e.jsx(Ye,{checked:Y,sx:{mr:{xs:1,md:1.5},p:.5,color:n?"#aaa":void 0,"&.Mui-checked":{color:"#1D8102"}}}),e.jsx(Ne,{children:e.jsxs(a,{sx:{color:Y?n?"#fff":"#1B3139":kt,fontWeight:Y?600:400,fontSize:{xs:"0.95rem",md:"1.1rem",lg:"1.15rem"},lineHeight:1.6},children:[e.jsxs(i,{component:"span",sx:{fontWeight:700,mr:.5},children:[String.fromCharCode(65+K),"."]}),w]})})]},K)})})]}),!p&&e.jsx(i,{sx:{p:2,flexShrink:0},children:e.jsx(C,{variant:"contained",fullWidth:!0,onClick:re,disabled:!N.some(Boolean),sx:{height:48,bgcolor:"#FF9900",color:"#232F3E",fontSize:"1.1rem",borderRadius:2,"&:hover":{bgcolor:"#EC7211"}},children:h==="en"?"Submit":"åç"})}),e.jsxs(Ae,{open:v==="correct",onClose:pe,PaperProps:{sx:{bgcolor:n?"#1e1e1e":void 0,minWidth:{xs:"85vw",sm:380}}},children:[e.jsxs(ke,{sx:{textAlign:"center",pt:3,pb:1,px:3},children:[e.jsx(Mt,{sx:{fontSize:72,color:"#1D8102",mb:1}}),e.jsx(a,{variant:"h5",sx:{color:ye,fontWeight:700},children:h==="en"?"Correct":"æ£è§£"})]}),e.jsxs(Ee,{sx:{justifyContent:"center",pb:3,px:3,gap:1.5,flexWrap:"wrap"},children:[e.jsx(C,{variant:"contained",size:"large",sx:{bgcolor:"#FF9900",color:"#232F3E",fontWeight:700,minWidth:132,py:1.25,"&:hover":{bgcolor:"#EC7211"}},onClick:Pe,children:h==="en"?"Next":"次ã¸"}),e.jsx(C,{variant:"outlined",size:"large",sx:{fontWeight:700,minWidth:132,py:1.25,color:ye,borderColor:n?"rgba(255,255,255,0.5)":"rgba(0,0,0,0.5)"},onClick:He,children:h==="en"?"Explanation":"解説"})]})]}),e.jsxs(Ae,{open:v==="incorrect",onClose:pe,PaperProps:{sx:{bgcolor:n?"#1e1e1e":void 0,minWidth:{xs:"85vw",sm:420},maxWidth:560}},children:[e.jsxs(ke,{sx:{pt:3,pb:1,px:3},children:[e.jsxs(i,{sx:{textAlign:"center"},children:[e.jsx(jn,{sx:{fontSize:72,color:"#D13212",mb:1}}),e.jsx(a,{variant:"h5",sx:{color:ye,fontWeight:700},children:h==="en"?"Incorrect":"䏿£è§£"})]}),e.jsxs(i,{sx:{mt:2},children:[e.jsx(a,{variant:"subtitle2",sx:{mb:.75,color:n?"#bbb":"#555",fontWeight:700},children:h==="en"?"Correct answer(s)":"æ£è§£"}),G.correctAnswers.map(w=>{const K=F.options[w]??"",ie=/^[A-Z][\.\)]/.test(K.trim()),Y=String.fromCharCode(65+w);return e.jsx(i,{sx:{py:.75,px:1.25,mb:.5,borderRadius:1,bgcolor:n?"rgba(29, 129, 2, 0.18)":"#e8f5e9",border:"1px solid #1D8102"},children:e.jsxs(a,{variant:"body2",sx:{color:n?"#a5d6a7":"#1D8102",whiteSpace:"pre-wrap",wordBreak:"break-word",lineHeight:1.5},children:[ie?K:`${Y}. ${K}`," â"]})},w)})]})]}),e.jsxs(Ee,{sx:{justifyContent:"center",pb:3,px:3,gap:1.5,flexWrap:"wrap"},children:[e.jsx(C,{variant:"contained",size:"large",sx:{bgcolor:"#FF9900",color:"#232F3E",fontWeight:700,minWidth:132,py:1.25,"&:hover":{bgcolor:"#EC7211"}},onClick:Pe,children:h==="en"?"Next":"次ã¸"}),e.jsx(C,{variant:"outlined",size:"large",sx:{fontWeight:700,minWidth:132,py:1.25,color:ye,borderColor:n?"rgba(255,255,255,0.5)":"rgba(0,0,0,0.5)"},onClick:He,children:h==="en"?"Explanation":"解説"})]})]})]})},ns="https://nicheelab-api.fjyjfrtfzy.workers.dev";function rs({questionId:o,examType:t,setNumber:s,questionTitle:r}){const{siteLocale:d}=ue(),n=(T,v)=>
1d==="en"?v:T,[E,p]=l.useState(!1),[b,S]=l.useState("error"),[u,c]=l.useState(""),[h,g]=l.useState(!1),[y,k]=l.useState(!1),[m,j]=l.useState(""),z=async()=>{if(u.trim().length<5){j(n("5æå以ä¸ã§å
¥åãã¦ãã ãã","Enter at least 5 characters"));return}g(!0),j("");try{const T=localStorage.getItem("exam_jwt_token"),v=await fetch(`${ns}/api/reports`,{method:"POST",headers:{"Content-Type":"application/json",...T?{Authorization:`Bearer ${T}`}:{}},body:JSON.stringify({questionId:o,examType:t,setNumber:s,reportType:b,message:u.trim()})});if(!v.ok){const I=await v.json().catch(()=>({}));throw new Error(I.error||n("éä¿¡ã«å¤±æãã¾ãã","Failed to send"))}k(!0)}catch(T){j(T instanceof Error?T.message:n("éä¿¡ã«å¤±æãã¾ãã","Failed to send"))}finally{g(!1)}},N=()=>{p(!1),c(""),S("error"),j(""),k(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(C,{size:"small",startIcon:e.jsx(cr,{sx:{fontSize:16}}),onClick:()=>p(!0),sx:{color:"#879596",fontSize:12,textTransform:"none","&:hover":{color:"#FF3621"}},children:n("åé¡ã®èª¤ããå ±å","Report an error")}),e.jsx(Ae,{open:E,onClose:N,maxWidth:"sm",fullWidth:!0,children:y?e.jsxs(e.Fragment,{children:[e.jsxs(ke,{sx:{textAlign:"center",py:5},children:[e.jsx(Oe,{sx:{fontSize:56,color:"#1D8102",mb:2}}),e.jsx(a,{variant:"h6",sx:{fontWeight:700,mb:1},children:n("å ±åãåãä»ãã¾ãã","Report received")}),e.jsx(a,{variant:"body2",sx:{color:"#545B64"},children:n("確èªã®ãããä¿®æ£ãè¡ãã¾ãããååãããã¨ããããã¾ãã","We'll review it and make any needed fixes. Thanks for the help.")})]}),e.jsx(Ee,{children:e.jsx(C,{onClick:N,children:n("éãã","Close")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(rt,{sx:{fontWeight:700},children:n("åé¡ã®èª¤ããå ±å","Report an error")}),e.jsxs(ke,{children:[r&&e.jsx(a,{variant:"body2",sx:{color:"#545B64",mb:2,bgcolor:"#F2F3F3",p:1.5,borderRadius:1},children:n(`対象: ${r}`,`Target: ${r}`)}),e.jsxs(dr,{fullWidth:!0,sx:{mb:2},children:[e.jsx(xr,{children:n("å ±å種å¥","Report type")}),e.jsxs(yt,{value:b,label:n("å ±å種å¥","Report type"),onChange:T=>S(T.target.value),children:[e.jsx(je,{value:"error",children:n("æ£è§£ã»è§£èª¬ã®èª¤ã","Wrong answer or explanation")}),e.jsx(je,{value:"typo",children:n("誤åã»è±å","Typo")}),e.jsx(je,{value:"outdated",children:n("æ
å ±ãå¤ã","Out of date")}),e.jsx(je,{value:"unclear",children:n("å顿ããããã«ãã","Question is unclear")}),e.jsx(je,{value:"other",children:n("ãã®ä»","Other")})]})]}),e.jsx(we,{fullWidth:!0,multiline:!0,rows:4,label:n("詳細ï¼ã©ããã©ãééã£ã¦ãããï¼","Details (what is wrong and how)"),value:u,onChange:T=>c(T.target.value),placeholder:n("ä¾: æ£è§£ãAã¨ãªã£ã¦ãã¾ãããBãæ£ããã¨æãã¾ããçç±ã¯...","Example: The answer is marked A, but I believe B is correct because..."),inputProps:{maxLength:1e3}}),m&&e.jsx(a,{color:"error",variant:"body2",sx:{mt:1},children:m}),e.jsx(i,{sx:{mt:1,textAlign:"right"},children:e.jsxs(a,{variant:"caption",sx:{color:"#879596"},children:[u.length,"/1000"]})})]}),e.jsxs(Ee,{children:[e.jsx(C,{onClick:N,sx:{color:"#545B64"},children:n("ãã£ã³ã»ã«","Cancel")}),e.jsx(C,{onClick:z,variant:"contained",disabled:h,sx:{bgcolor:"#FF3621","&:hover":{bgcolor:"#E02E1B"}},children:h?n("éä¿¡ä¸...","Sending..."):n("éä¿¡","Send")})]})]})})]})}const Vn=()=>{Gt();const o=be(),{id:t}=hn(),{pathname:s}=$r(),r=Number(t),{examType:d}=ze(),{darkMode:n}=Be(),{isSubscribed:E,loading:p}=Fe(),{siteLocale:b,effectiveStudyMode:S}=ue(),u=($,O)=>b==="en"?O:$,[c,h]=l.useState(!1),g=s.includes("mock-problem"),y=d?`${d}_`:"",k=d?`${d}_mock_`:"",m=Number(localStorage.getItem(g?`${k}currentSet`:`${y}currentSet`)||"1"),j=!g&&d?Qn(at(d).problems,r):null,z=(j==null?void 0:j.set)??m;l.useEffect(()=>{if(!d)return;let $=!1;return(g?st(d):ot(d)).then(()=>{$||h(!0)}),()=>{$=!0}},[d,g]),l.useEffect(()=>{d||o("/vault-pro-exam/select")},[d,o]);const T=(d?g?Me(d,z):Ge(d,z):{problems:[]}).problems,v=T.find($=>$.id===r),I=v?ft(v,b,S):null,D=T.findIndex($=>$.id===r),te=()=>{if(D>=0&&D<T.length-1){const $=T[D+1].id;o(g?`/vault-pro-exam/mock-problem/${$}`:`/vault-pro-exam/training-problem/${$}`)}else o(g?"/vault-pro-exam/mock-exam/result":"/vault-pro-exam/practice/result")},L=()=>o("/vault-pro-exam/menu");return v&&mn(g?"mock":"practice",z,{isSubscribed:E,loading:p})?e.jsx(i,{sx:{minHeight:"100vh",bgcolor:"#F2F3F3"}
1,children:e.jsx(Qe,{open:!0,onClose:()=>o(g?"/vault-pro-exam/mock":"/vault-pro-exam/practice")})}):!c||!v||!I?e.jsx(i,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh",bgcolor:"#F5F7FA"},children:e.jsx(a,{sx:{color:"#666"},children:c?u("åé¡ãè¦ã¤ããã¾ãã","Question not found"):u("èªã¿è¾¼ã¿ä¸...","Loading...")})}):e.jsxs(i,{className:n?"nl-dark-surface":void 0,sx:{display:"flex",flexDirection:"column",minHeight:"100vh",width:"100%",bgcolor:"#F5F7FA"},children:[e.jsxs(i,{sx:{height:64,bgcolor:"#232F3E",display:"flex",alignItems:"center",px:1,flexShrink:0},children:[e.jsx(ce,{onClick:()=>o("/vault-pro-exam/menu"),"aria-label":u("æ»ã","Back"),sx:{minWidth:48,minHeight:48},children:e.jsx($e,{sx:{color:"#fff"}})}),e.jsxs(a,{variant:"h6",sx:{color:"#fff",flex:1,textAlign:"center",fontSize:{xs:"0.95rem",md:"1.25rem"}},children:[I.title," ",b==="en"?"Explanation":u("解説","Explanation")]}),e.jsx(i,{sx:{width:48}})]}),e.jsxs(i,{sx:{flex:1,overflowY:"auto",p:{xs:2,md:3},maxWidth:800,mx:"auto",width:"100%"},children:[e.jsx(Ne,{children:e.jsx(wt,{text:I.question,sx:{color:"#1B2631",whiteSpace:"pre-line",mb:3,lineHeight:1.9,fontSize:{xs:15,md:16}}})}),e.jsx(i,{sx:{display:"flex",flexDirection:"column",gap:1.5,mb:3},children:I.options.map(($,O)=>{const W=v.correctAnswers.includes(O);return e.jsxs(Q,{sx:{display:"flex",alignItems:"center",border:W?"2px solid #1D8102":"2px solid transparent",bgcolor:W?"#f0fff0":"white",borderRadius:2,p:1.5,minHeight:52,boxShadow:W?"0 2px 8px rgba(29,129,2,0.12)":"0 1px 3px rgba(0,0,0,0.06)"},elevation:0,children:[e.jsx(lr,{checked:W,sx:{color:W?"#1D8102":"#ccc",p:.5,mr:1}}),e.jsx(Ne,{children:e.jsxs(a,{variant:"body1",sx:{color:"#333",lineHeight:1.7},children:[e.jsxs(i,{component:"span",sx:{fontWeight:700,mr:.5},children:[String.fromCharCode(65+O),"."]}),$]})})]},O)})}),e.jsxs(Q,{sx:{p:{xs:2,md:3},bgcolor:"#fff",borderLeft:"4px solid #29B5E8",borderRadius:2,boxShadow:"0 1px 4px rgba(0,0,0,0.06)"},elevation:0,children:[e.jsx(a,{variant:"subtitle2",sx:{color:"#232F3E",mb:1.5,fontWeight:700},children:b==="en"?"Explanation":u("解説","Explanation")}),e.jsx(Ne,{children:e.jsx(wt,{text:I.explanation,sx:{color:"#333",whiteSpace:"pre-line",lineHeight:1.9,fontSize:{xs:14,md:15}}})})]}),Array.isArray(v.sources)&&v.sources.length>0&&e.jsxs(Q,{sx:{mt:2,p:2,bgcolor:"#f9f9f9",borderLeft:"4px solid #1976d2"},elevation:0,children:[e.jsxs(a,{variant:"subtitle2",sx:{color:"#1976d2",mb:1},children:["ð ",u("å
¬å¼ãªãã¡ã¬ã³ã¹","Official references")]}),e.jsx(i,{component:"ul",sx:{pl:2.5,m:0},children:v.sources.map(($,O)=>e.jsx(a,{component:"li",variant:"body2",sx:{mb:.5,color:"#333"},children:e.jsx(i,{component:"a",href:$,target:"_blank",rel:"noopener noreferrer",sx:{color:"#1976d2",wordBreak:"break-all",textDecoration:"underline"},children:$})},O))})]}),e.jsx(i,{sx:{mt:2,textAlign:"right"},children:e.jsx(rs,{questionId:v.id,examType:d,setNumber:z,questionTitle:v.title})})]}),e.jsxs(i,{sx:{p:{xs:2,md:3},display:"flex",gap:1.5,flexShrink:0,maxWidth:{xs:800,md:1100},mx:"auto",width:"100%"},children:[e.jsx(C,{variant:"outlined",onClick:L,startIcon:e.jsx(bn,{}),sx:{height:{xs:48,md:56},borderColor:"#232F3E",color:"#232F3E",borderRadius:2,minWidth:48,"&:hover":{bgcolor:"#f0f0f0"}},children:b==="en"?"Menu":u("ã¡ãã¥ã¼","Menu")}),e.jsx(C,{variant:"contained",fullWidth:!0,onClick:te,sx:{height:{xs:48,md:56},bgcolor:"#FF9900",color:"#232F3E",fontSize:{xs:"1.1rem",md:"1.25rem"},fontWeight:600,borderRadius:2,"&:hover":{bgcolor:"#EC7211"}},children:b==="en"?"Next":u("次ã¸","Next")})]})]})};function os(){const o=be(),[t,s]=l.useState(0),[r,d]=l.useState(!1),{examType:n}=ze(),{darkMode:E}=Be(),p=pt(n?()=>ot(n):null,n),{isLoggedIn:b}=Fe(),{isSubscribed:S}=Fe(),{siteLocale:u,studyMode:c}=ue(),h=(f,q)=>u==="en"?q:f,[g,y]=l.useState(u==="en"||c==="en-question"?"en":"ja"),k=n?`${n}_`:"",m=localStorage.getItem(`${k}currentSet`)||"1",z=(n?Ge(n,Number(m)):{problems:[]}).problems,N=z.length,T=Number(localStorage.getItem(`${k}correctCount`)||0),v=N>0?Math.round(T/N*100):0,I=localStorage.getItem(`${k}answersDetail`)||"[]",D=JSON.parse(I),te=new Map(D.map(f=>[f.questionId,f])),L={};for(const f of D){const q=z.find(re=>re.id===f.questionId);if(!q)continue;const B=q.category;L[B]||(L[B]={correct:0,total:0}),L[B].total+=1,f.isCorrect&&(L[B].correct+=1)}const $=Object.entries(L).map(([f,q])=>({category:f,correct:q.correct,total:q.total})),[O,W]=l.useState(null),[U,ne]=l.useState(null),[V,G]=l.useState(null);l.useEffect(()=>{b&&n&&Sn(n,"practice",Number(m)).then(f=>{W(f.correct),ne(f.rate),G(f.categories.map(q=>({category:q.name,correct:q.correct,total:q.total})))}).catch(()=>{})},[b,n,m]);const _=D.length>0?T:O??T,F=D.length>0?v:U??v,R=$.length>0?$:V??[];l.useEffect(()=>{if(!n){o("/vault-pro-exam/select");return}p&&N>0&&D.length>0&&localStorage.setItem(`practice_result_${n}_set${m}`,JSON.stringify({rate:F,correct:_,total:N}))},[n,o,m,F,_,N,D.length,p]);const H=Number(m)+1,P=n?kn(n):0,x=H<=P,A=!S&&H>3,J=()=>{if(A){d(!0);return}if(W(null),ne(null),G(null),n){const f=`${n}_`;localStorage.setItem(`${f}answeredCount`,"0"),localStorage.setItem(`${f}correctCount`,"0"),localStorage.setItem(`${f}answersDetail`,"[]"),localStorage.setItem(`${f}currentSet`,String(H));const q=Ge(n,H).problems,B=q.length>0?q[0].id:1;o(`/vault-pro-exam/training-problem/${B}`,{replace:!0})}else o("/vault-pro-exam/training-problem/1")};return n?p?e.jsxs(i,{className:E?"nl-dark-surface":void 0,sx:{display:"flex",flexDirection:"column",minHeight:"100vh",width:"100%"},children:[e.jsxs(i,{sx:{height:64,bgcolor:"#232F3E",display:"flex",alignItems:"center",px:1,flexShrink:0},children:[e.jsx(ce,{onClick:()=>o("/vault-pro-exam/practice"),"aria-label":h("ä¸è¦§ã¸æ»ã","Back to list"),sx:{color:"#fff",minWidth:48,minHeight:48},children:e.jsx($e,{})}),e.jsx(a,{variant:"h6",sx:{color:"#fff",flex:1,textAlign:"center"},children:u==="en"?`Practice ${m} Results`:`ç·´ç¿${m} çµæ`}),e.jsx(i,{sx:{width:48}})]}),e.jsx(i,{sx:{display:"flex",justifyContent:"flex-end",px:2,pt:1.5},children:e.jsxs(i,{sx:{display:"flex",bgcolor:"#f0f0f0",borderRadius:1.5,overflow:"hidden"},children:[e.jsx(C,{onClick:()=>y("ja"),sx:{minWidth:56,height:36,fontWeight:700,fontSize:14,bgcolor:g==="ja"?"#232F3E":"transparent",color:g==="ja"?"#fff":"#666",borderRadius:0,"&:hover":{bgcolor:g==="ja"?"#232F3E":"#e0e0e0"}},children:"JA"}),e.jsx(C,{onClick:()=>y("en"),sx:{minWidth:56,height:36,fontWeight:700,fontSize:14,bgcolor:g==="en"?"#232F3E":"transparent",color:g==="en"?"#fff":"#666",borderRadius:0,"&:hover":{bgcolor:g==="en"?"#232F3E":"#e0e0e0"}},children:"EN"})]})}),e.jsxs(i,{sx:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsxs(i,{sx:{display:"flex",alignItems:"center",borderBottom:"1px solid #e0e0e0"},children:[e.jsxs(yn,{value:t,onChange:(f,q)=>s(q),textColor:"primary",indicatorColor:"primary",sx:{flex:1},children:[e.jsx(Ve,{label:u==="en"?"Results":"試é¨çµæ"}),e.jsx(Ve,{label:u==="en"?"By Category":"ã«ãã´ãªã¼å¥"})]}),e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:.5,mr:1,flexShrink:0},children:[e.jsx(C,{onClick:()=>o("/vault-pro-exam/practice"),size:"small",sx:{minHeight:44,minWidth:56,color:"#232F3E",fontWeight:700,fontSize:"0.85rem",whiteSpace:"nowrap"},children:u==="en"?"List":"ä¸è¦§"}),x&&e.jsx(C,{onClick:J,size:"small",sx:{color:A?"#555":"#232F3E",bgcolor:A?"#E8E8E8":"#FF9900",minHeight:44,px:1.5,"&:hover":{bgcolor:A?"#DDD":"#EC7211"},fontWeight:700,fontSize:"0.85rem",whiteSpace:"nowrap"},children:A?u==="en"?"Locked":"ð æ¬¡ã¸ â¶":u==="en"?"Next â¶":"次㸠â¶"})]})]}),e.jsxs(i,{sx:{flex:1,overflowY:"auto",p:2},children:[t===0&&e.jsxs(e.Fragment,{children:[e.jsxs(Q,{sx:{p:3,mb:2,textAlign:"center"},children:[e.jsxs(a,{variant:"h4",sx:{color:"#FF9900",fontWeight:"bold",mb:1},children:[F,"%"]}),e.jsx(qe,{variant:"determinate",value:F,sx:{height:10,borderRadius:5,bgcolor:"#F2F3F3",mb:1,"& .MuiLinearProgress-bar":{backgroundColor:F>=70?"#1D8102":"#D13212"}}}),e.jsx(a,{variant:"body1",children:u==="en"?`${_} correct out of ${N}`:`${N}åä¸ ${_}åæ£è§£`})]}),F>=90&&e.jsxs(Q,{sx:{p:2,mb:2,bgcolor:"#E8F5E9",border:"1px solid #4CAF50",borderRadius:2,textAlign:"center"}
1,elevation:0,children:[e.jsx(a,{sx:{fontSize:32,mb:.5},children:"ð"}),e.jsx(a,{sx:{fontWeight:700,color:"#2E7D32",fontSize:16},children:u==="en"?"Excellent! Outstanding performance!":"ç´ æ´ãããæç¸¾ã§ãï¼"})]}),F>=70&&F<90&&e.jsx(Q,{sx:{p:2,mb:2,bgcolor:"#FFF3E0",border:"1px solid #FF9800",borderRadius:2,textAlign:"center"},elevation:0,children:e.jsx(a,{sx:{fontWeight:700,color:"#E65100",fontSize:15},children:u==="en"?"Passed! Keep building on this momentum.":"åæ ¼åå
ã§ãããã®èª¿åã§ç¶ãã¾ãããã"})}),e.jsx(a,{variant:"body2",sx:{color:"#666",mb:3},children:u==="en"?F>=70?"You have reached the passing range. Keep studying.":"You need a bit more practice. Review the questions you missed.":F>=70?h("åæ ¼ã©ã¤ã³ã«éãã¦ãã¾ããå¼ãç¶ãå¦ç¿ãç¶ãã¾ãããã","You are above the passing line. Keep going."):h("ããå°ãå¦ç¿ãå¿
è¦ã§ããééããåé¡ã復ç¿ãã¾ãããã","You need a little more study. Review the questions you missed.")}),e.jsx(a,{variant:"subtitle1",sx:{fontWeight:700,mb:1.5,color:"#232F3E"},children:u==="en"?"Question Review":"åé¡å¥ è§£çã»è§£èª¬"}),z.map((f,q)=>{const B=ft(f,g==="en"?"en":"ja",g==="en"?"en-question":"ja"),re=te.get(f.id),pe=(re==null?void 0:re.isCorrect)??!1,Pe=!!re;return e.jsxs(ur,{sx:{mb:1},children:[e.jsx(hr,{expandIcon:e.jsx(fr,{}),children:e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%"},children:[Pe?pe?e.jsx(Oe,{sx:{color:"#1D8102",fontSize:22}}):e.jsx(mr,{sx:{color:"#D13212",fontSize:22}}):e.jsx(Je,{label:u==="en"?"Not answered":"æªåç",size:"small",sx:{bgcolor:"#eee"}}),e.jsxs(a,{variant:"body2",sx:{fontWeight:600,flex:1},children:[u==="en"?"Q":"å",q+1,". ",B.question.slice(0,60),"â¦"]})]})}),e.jsxs(pr,{children:[e.jsx(a,{variant:"body2",sx:{whiteSpace:"pre-line",mb:2,color:"#333"},children:B.question}),e.jsx(i,{sx:{mb:2},children:B.options.map((He,Se)=>{const ye=f.correctAnswers.includes(Se);return e.jsx(i,{sx:{p:1,mb:.5,borderRadius:1,bgcolor:ye?"#e8f5e9":"transparent",border:ye?"1px solid #1D8102":"1px solid #eee"},children:e.jsxs(a,{variant:"body2",sx:{color:ye?"#1D8102":"#555"},children:[String.fromCharCode(65+Se),". ",He," ",ye&&"â"]})},Se)})}),e.jsxs(Q,{sx:{p:1.5,bgcolor:"#f9f9f9",borderLeft:"3px solid #232F3E"},elevation:0,children:[e.jsx(a,{variant:"caption",sx:{color:"#232F3E",fontWeight:600},children:u==="en"?"Explanation":"解説"}),e.jsx(a,{variant:"body2",sx:{color:"#333",whiteSpace:"pre-line",mt:.5},children:B.explanation})]})]})]},f.id)})]}),t===1&&e.jsxs(Q,{sx:{p:2},children:[e.jsx(a,{variant:"h6",sx:{mb:1},children:u==="en"?"Accuracy by Category":"ã«ãã´ãªã¼å¥æ£è§£ç"}),e.jsx(Ie,{children:R.map((f,q)=>{const B=f.total?Math.round(f.correct/f.total*100):0;return e.jsxs(le,{sx:{flexDirection:"column",alignItems:"stretch"},children:[e.jsx(oe,{primary:f.category,secondary:`${f.correct}/${f.total} (${B}%)`}),e.jsx(qe,{variant:"determinate",value:B,sx:{height:6,borderRadius:3,bgcolor:"#F2F3F3","& .MuiLinearProgress-bar":{backgroundColor:B>=70?"#1D8102":"#D13212"}}})]},q)})})]})]})]}),e.jsx(i,{sx:{p:2,display:"flex",justifyContent:"center",flexShrink:0},children:e.jsx(ce,{onClick:()=>o("/vault-pro-exam/practice"),sx:{bgcolor:"#232F3E",color:"white",width:48,height:48,"&:hover":{bgcolor:"#1B2631"}},title:u==="en"?"Go to practice list":"ç·´ç¿åé¡ä¸è¦§ã¸",children:e.jsx(bn,{})})}),e.jsx(Qe,{open:r,onClose:()=>d(!1)})]}):e.jsx(i,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh"},children:e.jsx(a,{sx:{color:"#666"},children:h("èªã¿è¾¼ã¿ä¸...","Loading...")})}):null}const ss=()=>{const{siteLocale:o}=ue(),t=(j,z)=>o==="en"?z:j,s=be(),{examType:r}=ze(),{darkMode:d}=Be();pt(r?()=>Promise.all([ot(r),st(r)]):null,r);const[n,E]=l.useState(!1);if(!r)return s("/vault-pro-exam/select"),null;const p=at(r).problems,b=Vt(r).problems,S=Wn(`${r}_wrong_answers`),u=Wn(`${r}_mock_wrong_answers`),c=[...p.filter(j=>S.includes(j.id)).map(j=>({ref:j.id,problem:j})),...b.filter(j=>u.includes(j.id)).map(j=>({ref:-j.id,problem:j}))],h=c.map(j=>j.problem),g=c.map(j=>j.ref),y={};for(const j of h)y[j.category]||(y[j.category]=[]),y[j.category].push(j);const k=()=>
1{if(h.length===0)return;const j=[...g].sort(()=>Math.random()-.5);localStorage.setItem(`${r}_review_queue`,JSON.stringify(j)),localStorage.setItem(`${r}_review_index`,"0"),s("/vault-pro-exam/review-problem")},m=j=>{const N=c.filter(T=>T.problem.category===j).map(T=>T.ref).sort(()=>Math.random()-.5);localStorage.setItem(`${r}_review_queue`,JSON.stringify(N)),localStorage.setItem(`${r}_review_index`,"0"),s("/vault-pro-exam/review-problem")};return e.jsxs(i,{className:d?"nl-dark-surface":void 0,sx:{display:"flex",flexDirection:"column",minHeight:"100vh",width:"100%"},children:[e.jsxs(i,{sx:{height:64,bgcolor:"#232F3E",display:"flex",alignItems:"center",px:1,flexShrink:0},children:[e.jsx(ce,{onClick:()=>s("/vault-pro-exam/menu"),children:e.jsx($e,{sx:{color:"#fff"}})}),e.jsx(a,{variant:"h6",sx:{color:"#fff",flex:1,textAlign:"center"},children:t("復ç¿","Review")}),e.jsx(i,{sx:{width:48}})]}),e.jsxs(i,{sx:{flex:1,p:2},children:[e.jsxs(Q,{sx:{p:2,mb:2,textAlign:"center",bgcolor:"#f9f9f9"},elevation:0,children:[e.jsx(a,{variant:"h5",sx:{color:"#FF9900",fontWeight:700},children:t(`${h.length}å`,`${h.length} questions`)}),e.jsx(a,{variant:"body2",sx:{color:"#666"},children:t("ééããåé¡","Missed questions")})]}),h.length===0?e.jsxs(Q,{sx:{p:4,textAlign:"center",borderRadius:2},elevation:0,children:[e.jsx(a,{sx:{fontSize:48,mb:1},children:"â¨"}),e.jsx(a,{variant:"h6",sx:{color:"#1D8102",fontWeight:700,mb:1},children:t("ééããåé¡ã¯ã¾ã ããã¾ãã","No missed questions yet")}),e.jsx(a,{variant:"body2",sx:{color:"#888",mb:2},children:t("ç·´ç¿åé¡ã模æ¬è©¦é¨ãè§£ãã¦ã¿ã¾ãããã","Try the practice questions and mock exams.")})]}):e.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2},children:[e.jsxs(Q,{onClick:k,sx:{p:2,cursor:"pointer",display:"flex",alignItems:"center",gap:2,border:"2px solid #FF9900",borderRadius:2,"&:hover":{bgcolor:"rgba(255,153,0,0.05)"}},elevation:0,children:[e.jsx(ro,{sx:{color:"#FF9900",fontSize:32}}),e.jsxs(i,{children:[e.jsx(a,{variant:"body1",sx:{fontWeight:700,color:"#232F3E"},children:t("ééããåé¡ãã©ã³ãã ã«åºé¡","Review missed questions in random order")}),e.jsx(a,{variant:"body2",sx:{color:"#888"},children:t(`${h.length}åããã©ã³ãã ã«åºé¡ãã¾ã`,`Questions are drawn at random from ${h.length} questions`)})]})]}),e.jsxs(Q,{onClick:()=>E(!n),sx:{p:2,cursor:"pointer",display:"flex",alignItems:"center",gap:2,border:"2px solid #0073BB",borderRadius:2,"&:hover":{bgcolor:"rgba(0,115,187,0.05)"}},elevation:0,children:[e.jsx(oo,{sx:{color:"#0073BB",fontSize:32}}),e.jsxs(i,{children:[e.jsx(a,{variant:"body1",sx:{fontWeight:700,color:"#232F3E"},children:t("ã«ãã´ãªã¼å¥ã«ééããåé¡ãåºé¡","Review missed questions by category")}),e.jsx(a,{variant:"body2",sx:{color:"#888"},children:t(`${Object.keys(y).length}ã«ãã´ãªã¼`,`${Object.keys(y).length} categories`)})]})]}),n&&e.jsx(Ie,{sx:{bgcolor:"#f9f9f9",borderRadius:2},children:Object.entries(y).map(([j,z])=>e.jsxs(le,{onClick:()=>m(j),sx:{cursor:"pointer","&:hover":{bgcolor:"#eee"}},children:[e.jsx(oe,{primary:j,primaryTypographyProps:{fontWeight:600}}),e.jsx(Je,{label:t(`${z.length}å`,`${z.length} questions`),size:"small",sx:{bgcolor:"#0073BB",color:"#fff"}})]},j))})]})]}),e.jsx(i,{sx:{p:2,display:"flex",justifyContent:"center",flexShrink:0},children:e.jsx(C,{variant:"outlined",onClick:()=>s("/vault-pro-exam/menu"),sx:{color:"#232F3E",borderColor:"#232F3E"},children:t("ãã¼ã ã¸æ»ã","Back to home")})})]})},as="/sounds/correct.mp3",is="/sounds/incorrect.mp3",ls=()=>{const{siteLocale:o,effectiveStudyMode:t}=ue(),s=(x,A)=>o==="en"?A:x;Gt();const r=be(),{examType:d}=ze();pt(d?()=>Promise.all([ot(d),st(d)]):null,d);const{soundEnabled:n}=Ht(),{darkMode:E,toggleDarkMode:p}=Be(),{easyMode:b,toggleEasyMode:S}=Ut(),u=l.useRef(null),c=l.useRef(null),h=x=>{c.current||(u.current&&(clearTimeout(u.current),u.current=null),c.current=x,$(x))};l.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]);const g=JSON.parse(localStorage.getItem(`${d}_review_queue`)||"[]"),y=Number(localStorage.getItem(`${d}_review_index`)||"0"),[k,m]=l.useState(y),j=g[k],z=d?at(d).problems:[],N=d?Vt(d).problems:[],T=typeof j=="number"&&j<0,v=(T?N:z).find(x=>x.id===Math.abs(j)),I=v?ft(v,o,t):null,[D,te]=l.useState([]),[L,$]=l.useState(null);l.useEffect(()=>{v&&te(Array(v.options.length).fill(!1)),u.current&&(clearTimeout(u.current),u.current=null)},[k,v==null?void 0:v.options.length]),l.useEffect(()=>{n&&L==="correct"?new Audio(as).play().catch(()=>{}):n&&L==="incorrect"&&new Audio(is).play().catch(()=>{})},[L,n]),l.useEffect(()=>{d||r("/vault-pro-exam/select")},[d,r]);const O=l.useCallback(x=>{if(d&&x){const A=T?`${d}_mock_wrong_answers`:`${d}_wrong_answers`,J=localStorage.getItem(A)||"[]";let f=JSON.parse(J);
1f=f.filter(q=>q!==Math.abs(j)),localStorage.setItem(A,JSON.stringify(f))}},[d,j,T]);if(!d||!v)return e.jsxs(i,{sx:{p:4,textAlign:"center"},children:[e.jsx(a,{variant:"h6",sx:{color:"#888",mb:2},children:s("復ç¿ããåé¡ãããã¾ãã","No questions to review")}),e.jsx(C,{variant:"outlined",onClick:()=>r("/vault-pro-exam/review"),children:s("復ç¿ã¡ãã¥ã¼ã¸æ»ã","Back to Review Menu")})]});const W=x=>{c.current||(u.current&&(clearTimeout(u.current),u.current=null),te(A=>{const J=v.correctAnswers.length;if(b&&J===1){const B=A.map((re,pe)=>pe===x);return setTimeout(()=>{if(c.current)return;const re=v.correctAnswers[0]===x;h(re?"correct":"incorrect"),O(re)},0),B}const f=[...A];f[x]=!f[x];const q=f.filter(Boolean).length;return b&&q>=v.correctAnswers.length&&(u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{if(u.current=null,c.current)return;const B=f.map((pe,Pe)=>pe?Pe:-1).filter(pe=>pe!==-1),re=B.length===v.correctAnswers.length&&B.every((pe,Pe)=>pe===v.correctAnswers[Pe]);h(re?"correct":"incorrect"),O(re)},1e3)),f}))},U=()=>{if(c.current)return;const x=D.map((J,f)=>J?f:-1).filter(J=>J!==-1),A=x.length===v.correctAnswers.length&&x.every((J,f)=>J===v.correctAnswers[f]);h(A?"correct":"incorrect"),O(A)},ne=()=>{c.current=null,$(null)},V=()=>{ne();const x=k+1;x<g.length?(localStorage.setItem(`${d}_review_index`,String(x)),m(x)):r("/vault-pro-exam/review")},G=E?"#121212":"#F2F3F3",_=E?"#e0e0e0":"#333",F=E?"#b0b0b0":"#444",R=E?"#333":"#e0e0e0",H=E?"#FF9900":"#232F3E",P=g.length>0?(k+1)/g.length*100:0;return e.jsxs(i,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",width:"100%",bgcolor:G},children:[e.jsxs(i,{sx:{height:64,bgcolor:"#232F3E",display:"flex",alignItems:"center",px:1,flexShrink:0},children:[e.jsx(ce,{onClick:()=>r("/vault-pro-exam/review"),children:e.jsx($e,{sx:{color:"#fff"}})}),e.jsx(a,{sx:{color:"#fff",flex:1,textAlign:"center",fontSize:{xs:"0.85rem",sm:"1.1rem",md:"1.25rem"},fontWeight:600},children:s(`å¾©ç¿ (${k+1}/${g.length})`,`Review (${k+1}/${g.length})`)}),e.jsx(ce,{onClick:p,children:E?e.jsx(Nt,{sx:{color:"#fff"}}):e.jsx(qt,{sx:{color:"#fff"}})}),e.jsx(ce,{onClick:S,sx:{color:b?"#FF9900":"rgba(255,255,255,0.6)"},children:e.jsx(Ct,{})})]}),e.jsxs(i,{sx:{px:2,pt:1.5,pb:.5},children:[e.jsx(qe,{variant:"determinate",value:P,sx:{height:8,borderRadius:4,bgcolor:E?"#333":"#F2F3F3","& .MuiLinearProgress-bar":{backgroundColor:"#FF9900"}}}),e.jsxs(a,{variant:"caption",sx:{display:"block",textAlign:"center",mt:.5,color:F},children:[k+1,"/",g.length]})]}),e.jsxs(i,{sx:{px:2,py:2,flex:1,overflowY:"auto"},children:[e.jsx(Ne,{children:e.jsx(wt,{text:(I==null?void 0:I.question)??"",sx:{color:_,whiteSpace:"pre-line",mb:3}})}),e.jsx(i,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:((I==null?void 0:I.options)??[]).map((x,A)=>e.jsxs(Q,{onClick:()=>W(A),sx:{display:"flex",alignItems:"center",bgcolor:b&&D[A]?E?"#2a2a2a":"#e0e0e0":E?"#1e1e1e":"#fff",border:D[A]?`2px s
1olid ${H}`:`1px solid ${R}`,borderRadius:1,p:1.5,cursor:"pointer",transition:"all 0.2s"},elevation:0,children:[e.jsx(Ye,{checked:D[A],onChange:()=>W(A),onClick:J=>J.stopPropagation(),sx:{mr:1,p:.5,color:E?"#fff":void 0}}),e.jsx(Ne,{children:e.jsx(a,{variant:"body1",sx:{color:F},children:x})})]},A))})]}),!b&&e.jsx(i,{sx:{p:2,flexShrink:0},children:e.jsx(C,{variant:"contained",fullWidth:!0,onClick:U,disabled:!D.some(Boolean),sx:{height:48,bgcolor:"#FF9900",color:"#232F3E",fontSize:"1.1rem",borderRadius:2,"&:hover":{bgcolor:"#EC7211"}},children:s("åç","Answer")})}),e.jsxs(Ae,{open:L==="correct",onClose:ne,PaperProps:{sx:{bgcolor:E?"#1e1e1e":void 0,minWidth:{xs:"85vw",sm:380}}},children:[e.jsxs(ke,{sx:{textAlign:"center",pt:3,pb:1,px:3},children:[e.jsx(Mt,{sx:{fontSize:72,color:"#1D8102",mb:1}}),e.jsx(a,{variant:"h5",sx:{color:_,fontWeight:700},children:s("æ£è§£","Correct")})]}),e.jsx(Ee,{sx:{justifyContent:"center",pb:3,px:3},children:e.jsx(C,{variant:"contained",size:"large",sx:{bgcolor:"#FF9900",color:"#232F3E",fontWeight:700,minWidth:160,py:1.25,"&:hover":{bgcolor:"#EC7211"}},onClick:V,children:s("次ã¸","Next")})})]}),e.jsxs(Ae,{open:L==="incorrect",onClose:ne,PaperProps:{sx:{bgcolor:E?"#1e1e1e":void 0,minWidth:{xs:"85vw",sm:420},maxWidth:560}},children:[e.jsxs(ke,{sx:{pt:3,pb:1,px:3},children:[e.jsxs(i,{sx:{textAlign:"center"},children:[e.jsx(jn,{sx:{fontSize:72,color:"#D13212",mb:1}}),e.jsx(a,{variant:"h5",sx:{color:_,fontWeight:700},children:s("䏿£è§£","Incorrect")})]}),e.jsxs(i,{sx:{mt:2},children:[e.jsx(a,{variant:"subtitle2",sx:{mb:.75,color:E?"#bbb":"#555",fontWeight:700},children:s("æ£è§£","Correct")}),v.correctAnswers.map(x=>{const A=(I==null?void 0:I.options[x])??"",J=/^[A-Z][\.\)]/.test(A.trim()),f=String.fromCharCode(65+x);return e.jsx(i,{sx:{py:.75,px:1.25,mb:.5,borderRadius:1,bgcolor:E?"rgba(29, 129, 2, 0.18)":"#e8f5e9",border:"1px solid #1D8102"},children:e.jsxs(a,{variant:"body2",sx:{color:E?"#a5d6a7":"#1D8102",whiteSpace:"pre-wrap",wordBreak:"break-word",lineHeight:1.5},children:[J?A:`${f}. ${A}`," â"]})},x)})]})]}),e.jsx(Ee,{sx:{justifyContent:"center",pb:3,px:3},children:e.jsx(C,{variant:"contained",size:"large",sx:{bgcolor:"#FF9900",color:"#232F3E",fontWeight:700,minWidth:160,py:1.25,"&:hover":{bgcolor:"#EC7211"}},onClick:V,children:s("次ã¸","Next")})})]})]})};function cs(o,t){const s=localStorage.getItem(`mock_result_${t}_set${o}`);if(!s)return{rate:0,done:!1};try{const r=JSON.parse(s);return{rate:Number(r.rate)||0,done:!0}}catch{return{rate:0,done:!1}}}const ds=()=>{const{siteLocale:o}=ue(),t=(u,c)=>o==="en"?c:u,s=be(),{examType:r}=ze();pt(r?()=>st(r):null,r);const d=r?En(r):0,E=(r?Me(r,1):{problems:[]}).problems.length,p=u=>{if(!r)return;Xn(r,u);const c=Me(r,u).problems;s(`/vault-pro-exam/mock-problem/${c.length>0?c[0].id:1}`)},b=u=>{if(!r)return;const c=Me(r,u).problems,h=an(r);if($n(h,u,c.length)){const g=Kn(c,h.answeredIds);s(g===null?"/vault-pro-exam/mock-exam/result":`/vault-pro-exam/mock-problem/${g}`);return}p(u)},S=u=>{if(!r)return null;const c=an(r),h=Me(r,u).problems.length;return $n(c,u,h)?c.answeredIds.length:null};return e.jsx(Tr,{mode:"mock",title:t("模æ¬è©¦é¨","Mock exam"),subtitle:t(`å${E}åã»æ¬çªå½¢å¼`,`${E} questions each, exam format`),setCount:d,getLocalResult:cs,onSetClick:b,getSetProblems:u=>r?Me(r,u).problems:[],getInProgress:S,onRestart:p})},xs="/sounds/correct.mp3",us="/sounds/incorrect.mp3",hs=()=>{Gt();const{id:o}=hn(),t=be(),s=Number(o),{examType:r}=ze(),{soundEnabled:d}=Ht(),{darkMode:n,toggleDarkMode:E}=Be(),{easyMode:p,toggleEasyMode:b}=Ut(),{isLoggedIn:S,isSubscribed:u,loading:c}=Fe(),{siteLocale:h,effectiveStudyMode:g,isEnglishQuestionMode:y,toggleEnglishQuestionMode:k}=ue(),m=(w,K)=>h==="en"?K:w,[j,z]=l.useState(!1),[N,T]=l.useState(!1),[v,I]=l.useState([]),[D,te]=l.useState(null),[L,$]=l.useState(null),O=l.useRef(null),W=l.useRef(null),U=w=>{W.current||(O.current&&(clearTimeout(O.current),O.current=null),W.current=w,Gn.flushSync(()=>{te(w)}))};l.useEffect(()=>()=>{O.current&&clearTimeout(O.current)},[]);const ne=r?`${r}_mock_`:"",V=Number(localStorage.getItem(`${ne}currentSet`)||"1");l.useEffect(()=>{if(!r)return;let w=!1;return st(r).then(()=>{w||T(!0)}),()=>{w=!0}},[r]);const G=r?Me(r,V):{problems:[]},_=G.problems.length,F=localStorage.getItem(`${ne}answersDetail`)||"[]",R=new Set(JSON.parse(F).map(w=>w.questionId)).size,H=Math.min(_>0?R/_*100:0,100),P=G.problems.find(w=>w.id===s),x=P?ft(P,h,g):null;if(l.useEffect(()=>{x&&I(Array(x.options.length).fill(!1)),W.current=null,te(null)},[s,N]),l.useEffect(()=>{d&&D==="correct"?new Audio(xs).play().catch(()=>{}):d&&D==="incorrect"&&new Audio(us).play().catch(()=>{})},[D,d]),l.useEffect(()=>{O.current&&(clearTimeout(O.current),O.current=null),x&&I(Array(x.options.length).fill(!1))},[s,x==null?void 0:x.options.length]),l.useEffect(()=>{r||t("/vault-pro-exam/select")},[r,t]),l.useEffect(()=>{var w;r&&((w=an(r))!=null&&w.completed)&&t("/vault-pro-exam/mock",{replace:!0})},[r,s,t]),P&&mn("mock",V,{isSubscribed:u,loading:c}))return e.jsx(i,{sx:{minHeight:"100vh",bgcolor:"#F2F3F3"}
1,children:e.jsx(Qe,{open:!0,onClose:()=>t("/vault-pro-exam/mock")})});if(!N||!P||!x)return e.jsx(i,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh",bgcolor:"#f5f5f5"},children:e.jsx(a,{sx:{color:"#666"},children:N?m("åé¡ãè¦ã¤ããã¾ãã","Question not found"):m("åé¡ãã¼ã¿ãèªã¿è¾¼ã¿ä¸...","Loading questions...")})});const A=w=>{W.current||(O.current&&(clearTimeout(O.current),O.current=null),I(K=>{const ie=P.correctAnswers.length;if(p&&ie===1){const ae=K.map((de,se)=>se===w);return setTimeout(()=>{if(W.current)return;const de=P.correctAnswers[0]===w;U(de?"correct":"incorrect"),J(de,[w])},0),ae}const Y=[...K];Y[w]=!Y[w];const Xe=Y.filter(Boolean).length;return p&&Xe>=P.correctAnswers.length&&(O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{if(O.current=null,W.current)return;const ae=Y.map((se,De)=>se?De:-1).filter(se=>se!==-1),de=ae.length===P.correctAnswers.length&&ae.every((se,De)=>se===P.correctAnswers[De]);U(de?"correct":"incorrect"),J(de,ae)},1e3)),Y}))},J=(w,K)=>{const ie=localStorage.getItem(`${ne}answersDetail`)||"[]";let Y=JSON.parse(ie);Y=Y.filter(ae=>ae.questionId!==s),Y.push({questionId:s,isCorrect:w,category:P.category,ts:Date.now()}),localStorage.setItem(`${ne}answersDetail`,JSON.stringify(Y));const Xe=Y.filter(ae=>ae.isCorrect).length;if(localStorage.setItem(`${ne}answeredCount`,String(Y.length)),localStorage.setItem(`${ne}correctCount`,String(Xe)),S&&r){const ae=K??v.map((de,se)=>de?se:-1).filter(de=>de!==-1);jr({question_id:s,selected_choice_ids:ae,is_correct:w,exam_type:r,question_set:"mock",set_number:V}).catch(()=>{})}if(r){const ae=`${r}_mock_wrong_answers`,de=localStorage.getItem(ae)||"[]";let se=JSON.parse(de);w?se=se.filter(De=>De!==s):se.includes(s)||se.push(s),localStorage.setItem(ae,JSON.stringify(se))}},f=()=>{if(W.current)return;const w=v.map((ie,Y)=>ie?Y:-1).filter(ie=>ie!==-1),K=w.length===P.correctAnswers.length&&w.every((ie,Y)=>ie===P.correctAnswers[Y]);U(K?"correct":"incorrect"),J(K,w)},q=()=>{W.current=null,te(null)},B=G.problems,re=B.findIndex(w=>w.id===s),pe=()=>{if(q(),re>=0&&re<B.length-1){const w=B[re+1].id;t(`/vault-pro-exam/mock-problem/${w}`)}else t("/vault-pro-exam/mock-exam/result")},Pe=()=>{q(),t(`/vault-pro-exam/mock-problem/${s}/explanation`)},He=n?"#121212":"#F2F3F3",Se=n?"#e0e0e0":"#333",ye=n?"#b0b0b0":"#444",kt=n?"#333":"#e0e0e0",Yt=n?"#FF9900":"#232F3E";return e.jsxs(i,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",width:"100%",bgcolor:He},children:[e.jsxs(i,{sx:{height:64,bgcolor:"#232F3E",display:"flex",alignItems:"center",px:1,flexShrink:0},children:[e.jsx(ce,{onClick:()=>t("/vault-pro-exam/mock"),"aria-label":m("æ»ã","Back"),sx:{color:"#fff",minWidth:44,minHeight:44},children:e.jsx($e,{})}),e.jsxs(i,{sx:{flex:1,textAlign:"center",minWidth:0,px:1},children:[e.jsx(a,{variant:"body2",sx:{color:"#FF9900",fontSize:"0.75rem",lineHeight:1,fontWeight:600},children:h==="en"?`Mock Exam ${V}`:`模æ¬è©¦é¨${V}`}),e.jsx(a,{sx:{color:"#fff",lineHeight:1.3,fontSize:{xs:"1rem",sm:"1.1rem",md:"1.25rem"},fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:x.title})]}),h==="ja"&&e.jsx(ce,{onClick:k,"aria-label":y?m("æ¥æ¬èªã«æ»ã","Back to Japanese"):m("è±èªã§è¡¨ç¤º","Show in English"),sx:{color:y?"#29B5E8":"rgba(255,255,255,0.6)",minWidth:44,minHeight:44},children:e.jsx(sr,{})}),e.jsx(ce,{onClick:w=>$(w.currentTarget),"aria-label":m("ã¡ãã¥ã¼","Menu"),sx:{color:"#fff",minWidth:44,minHeight:44},children:e.jsx(ar,{})}),e.jsxs(ir,{anchorEl:L,open:!!L,onClose:()=>$(null),PaperProps:{sx:{minWidth:200}},children:[e.jsxs(je,{onClick:()=>{E(),$(null)},children:[e.jsx(ht,{children:n?e.jsx(Nt,{fontSize:"small"}):e.jsx(qt,{fontSize:"small"})}),e.jsx(oe,{children:n?m("ã©ã¤ãã¢ã¼ã","Light mode"):m("ãã¼ã¯ã¢ã¼ã","Dark mode")})]}),e.jsxs(je,{onClick:()=>{b(),$(null)},children:[e.jsx(ht,{children:e.jsx(Ct,{fontSize:"small",sx:{color:p?"#FF9900":void 0}})}),e.jsx(oe,{children:p?m("ããããã¢ã¼ã OFF","Easy mode OFF"):m("ããããã¢ã¼ã ON","Easy mode ON")})]}),e.jsxs(je,{onClick:()=>{$(null),t("/vault-pro-exam/settings")},children:[e.jsx(ht,{children:e.jsx(gn,{fontSize:"small"})}),e.jsx(oe,{children:m("è¨å®","Settings")})]})]})]}),e.jsxs(i,{sx:{px:{xs:2,md:4,lg:6},pt:{xs:1.5,md:2},pb:.5,maxWidth:{md:1100},mx:{md:"auto"},width:"100%"},children:[e.jsx(qe,{variant:"determinate",value:H,sx:{height:{xs:8,md:10},borderRadius:4,bgcolor:n?"#333":"#F2F3F3","& .MuiLinearProgress-bar":{backgroundColor:"#1D8102"}}}),e.jsxs(a,{sx:{display:"block",textAlign:"center",mt:.5,color:ye,fontSize:{xs:"0.75rem",md:"0.9rem"}},children:[h==="en"?"Progress":"鲿",": ",R,"/",_]})]}),e.jsxs(i,{sx:{px:{xs:2,md:4,lg:6},py:{xs:2,md:3},flex:1,overflowY:"auto",maxWidth:{md:1100},mx:{md:"auto"},width:"100%"},children:[e.jsx(Ne,{children:e.jsx(wt,{text:x.question,sx:{color:Se,whiteSpace:"pre-line",mb:{xs:3,md:4},fontSize:{xs:"1rem",md:"1.2rem",lg:"1.3rem"},lineHeight:{xs:1.7,md:1.8},fontWeight:500}})}),e.jsx(i,{sx:{display:"flex",flexDirection:"column",gap:{xs:1.5,md:2}},children:x.options.map((w,K)=>e.jsxs(Q,{onClick:()=>A(K),sx:{display:"flex",alignItems:"center",bgcolor:p&&v[K]?n?"#2a2a2a":"#e0e0e0":n?"#1e1e1e":"#fff",border:v[K]?`2px solid ${Yt}`:`2px solid ${kt}`,borderRadius:2,p:{xs:1.5,md:2.25},minHeight:52,cursor:"pointer",transition:"all 0.2s"}
1,elevation:0,children:[e.jsx(Ye,{checked:v[K],onChange:()=>A(K),onClick:ie=>ie.stopPropagation(),sx:{mr:{xs:1,md:1.5},p:.5,color:n?"#fff":void 0}}),e.jsx(Ne,{children:e.jsxs(a,{sx:{color:ye,fontSize:{xs:"0.95rem",md:"1.1rem",lg:"1.15rem"},lineHeight:1.6},children:[e.jsxs(i,{component:"span",sx:{fontWeight:700,mr:.5},children:[String.fromCharCode(65+K),"."]}),w]})})]},K))})]}),!p&&e.jsx(i,{sx:{p:2,flexShrink:0},children:e.jsx(C,{variant:"contained",fullWidth:!0,onClick:f,disabled:!v.some(Boolean),sx:{height:48,bgcolor:"#FF9900",color:"#232F3E",fontSize:"1.1rem",borderRadius:2,"&:hover":{bgcolor:"#EC7211"}},children:h==="en"?"Submit":"åç"})}),e.jsxs(Ae,{open:D==="correct",onClose:q,PaperProps:{sx:{bgcolor:n?"#1e1e1e":void 0,minWidth:{xs:"85vw",sm:380}}},children:[e.jsxs(ke,{sx:{textAlign:"center",pt:3,pb:1,px:3},children:[e.jsx(Mt,{sx:{fontSize:72,color:"#1D8102",mb:1}}),e.jsx(a,{variant:"h5",sx:{color:Se,fontWeight:700},children:h==="en"?"Correct":"æ£è§£"})]}),e.jsxs(Ee,{sx:{justifyContent:"center",pb:3,px:3,gap:1.5,flexWrap:"wrap"},children:[e.jsx(C,{variant:"contained",size:"large",sx:{bgcolor:"#FF9900",color:"#232F3E",fontWeight:700,minWidth:132,py:1.25,"&:hover":{bgcolor:"#EC7211"}},onClick:pe,children:h==="en"?"Next":"次ã¸"}),e.jsx(C,{variant:"outlined",size:"large",sx:{fontWeight:700,minWidth:132,py:1.25,color:Se,borderColor:n?"rgba(255,255,255,0.5)":"rgba(0,0,0,0.5)"},onClick:Pe,children:h==="en"?"Explanation":"解説"})]})]}),e.jsxs(Ae,{open:D==="incorrect",onClose:q,PaperProps:{sx:{bgcolor:n?"#1e1e1e":void 0,minWidth:{xs:"85vw",sm:420},maxWidth:560}},children:[e.jsxs(ke,{sx:{pt:3,pb:1,px:3},children:[e.jsxs(i,{sx:{textAlign:"center"},children:[e.jsx(jn,{sx:{fontSize:72,color:"#D13212",mb:1}}),e.jsx(a,{variant:"h5",sx:{color:Se,fontWeight:700},children:h==="en"?"Incorrect":"䏿£è§£"})]}),e.jsxs(i,{sx:{mt:2},children:[e.jsx(a,{variant:"subtitle2",sx:{mb:.75,color:n?"#bbb":"#555",fontWeight:700},children:h==="en"?"Correct answer(s)":"æ£è§£"}),P.correctAnswers.map(w=>{const K=x.options[w]??"",ie=/^[A-Z][\.\)]/.test(K.trim()),Y=String.fromCharCode(65+w);return e.jsx(i,{sx:{py:.75,px:1.25,mb:.5,borderRadius:1,bgcolor:n?"rgba(29, 129, 2, 0.18)":"#e8f5e9",border:"1px solid #1D8102"},children:e.jsxs(a,{variant:"body2",sx:{color:n?"#a5d6a7":"#1D8102",whiteSpace:"pre-wrap",wordBreak:"break-word",lineHeight:1.5},children:[ie?K:`${Y}. ${K}`," â"]})},w)})]})]}),e.jsxs(Ee,{sx:{justifyContent:"center",pb:3,px:3,gap:1.5,flexWrap:"wrap"},children:[e.jsx(C,{variant:"contained",size:"large",sx:{bgcolor:"#FF9900",color:"#232F3E",fontWeight:700,minWidth:132,py:1.25,"&:hover":{bgcolor:"#EC7211"}},onClick:pe,children:h==="en"?"Next":"次ã¸"}),e.jsx(C,{variant:"outlined",size:"large",sx:{fontWeight:700,minWidth:132,py:1.25,color:Se,borderColor:n?"rgba(255,255,255,0.5)":"rgba(0,0,0,0.5)"},onClick:Pe,children:h==="en"?"Explanation":"解説"})]})]}),e.jsx(Qe,{open:j,onClose:()=>z(!1)})]})};function ms(){const o=be(),[t,s]=l.useState(0),[r,d]=l.useState(!1),{examType:n}=ze(),{darkMode:E}=Be(),p=pt(n?()=>st(n):null,n),{isLoggedIn:b,isSubscribed:S}=Fe(),{siteLocale:u,studyMode:c}=ue(),h=(f,q)=>u==="en"?q:f,[g,y]=l.useState(u==="en"||c==="en-question"?"en":"ja"),k=n?`${n}_mock_`:"",m=Number(localStorage.getItem(`${k}currentSet`)||"1"),z=(n?Me(n,m):{problems:[]}).problems,N=z.length,T=Number(localStorage.getItem(`${k}correctCount`)||0),v=N>0?Math.round(T/N*100):0,I=localStorage.getItem(`${k}answersDetail`)||"[]",D=JSON.parse(I),te=new Map(D.map(f=>[f.questionId,f])),L={};for(const f of D){const q=z.find(re=>re.id===f.questionId);if(!q)continue;const B=q.category;L[B]||(L[B]={correct:0,total:0}),L[B].total+=1,f.isCorrect&&(L[B].correct+=1)}const $=Object.entries(L).map(([f,q])=>({category:f,correct:q.correct,total:q.total})),[O,W]=l.useState(null),[U,ne]=l.useState(null),[V,G]=l.useState(null);l.useEffect(()=>{b&&n&&Sn(n,"mock",Number(m)).then(f=>{W(f.correct),ne(f.rate),G(f.categories.map(q=>({category:q.name,correct:q.correct,total:q.total})))}).catch(()=>{})},[b,n,m]);const _=D.length>0?T:O??T,F=D.length>0?v:U??v,R=$.length>0?$:V??[];l.useEffect(()=>{if(!n){o("/vault-pro-exam/select");return}m&&p&&N>0&&D.length>0&&(localStorage.setItem(`mock_result_${n}_set${m}`,JSON.stringify({rate:F,correct:_,total:N})),Hr(n,N))},[n,o,m,F,_,N,D.length,p]);const H=Number(m)+1,P=n?En(n):0,x=H<=P,A=!S&&H>1,J=()=>{var q;if(A){d(!0);return}W(null),ne(null),G(null),n&&Xn(n,H);const f=n?((q=Me(n,H).problems[0])==null?void 0:q.id)??1:1;o(`/vault-pro-exam/mock-problem/${f}`,{replace:!0})};return n?p?e.jsxs(i,{className:E?"nl-dark-surface":void 0,sx:{display:"flex",flexDirection:"column",minHeight:"100vh",width:"100%"},children:[e.jsxs(i,{sx:{height:64,bgcolor:"#232F3E",display:"flex",alignItems:"center",px:1,flexShrink:0},children:[e.jsx(ce,{onClick:()=>o("/vault-pro-exam/mock"),"aria-label":h("ä¸è¦§ã¸æ»ã","Back to list"),sx:{color:"#fff",minWidth:48,minHeight:48},children:e.jsx($e,{})}),e.jsx(a,{variant:"h6",sx:{color:"#fff",flex:1,textAlign:"center"},children:u==="en"?`Mock Exam ${m} Results`:`模æ¬è©¦é¨${m} çµæ`}),e.jsx(i,{sx:{width:48}})]}),e.jsx(i,{sx:{display:"flex",justifyContent:"flex-end",px:2,pt:1.5},children:e.jsxs(i,{sx:{display:"flex",bgcolor:"#f0f0f0",borderRadius:1.5,overflow:"hidden"},children:[e.jsx(C,{onClick:()=>y("ja"),sx:{minWidth:56,height:36,fontWeight:700,fontSize:14,bgcolor:g==="ja"?"#232F3E":"transparent",color:g==="ja"?"#fff":"#666",borderRadius:0,"&:hover":{bgcolor:g==="ja"?"#232F3E":"#e0e0e0"}},children:"JA"}),e.jsx(C,{onClick:()=>y("en"),sx:{minWidth:56,height:36,fontWeight:700,fontSize:14,bgcolor:g==="en"?"#232F3E":"transparent",color:g==="en"?"#fff":"#666",borderRadius:0,"&:hover":{bgcolor:g==="en"?"#232F3E":"#e0e0e0"}},children:"EN"})]})}),e.jsxs(i,{sx:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsxs(i,{sx:{display:"flex",alignItems:"center",borderBottom:"1px solid #e0e0e0"},children:[e.jsxs(yn,{value:t,onChange:(f,q)=>s(q),textColor:"primary",indicatorColor:"primary",sx:{flex:1},children:[e.jsx(Ve,{label:u==="en"?"Results":"試é¨çµæ"}),e.jsx(Ve,{label:u==="en"?"By Category":"ã«ãã´ãªã¼å¥"})]}),e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:.5,mr:1,flexShrink:0},children:[e.jsx(C,{onClick:()=>o("/vault-pro-exam/mock"),size:"small",sx:{minHeight:44,minWidth:56,color:"#232F3E",fontWeight:700,fontSize:"0.85rem",whiteSpace:"nowrap"},children:u==="en"?"List":"ä¸è¦§"}),x&&e.jsx(C,{onClick:J,size:"small",sx:{color:A?"#555":"#232F3E",bgcolor:A?"#E8E8E8":"#FF9900",minHeight:44,px:1.5,"&:hover":{bgcolor:A?"#DDD":"#EC7211"},fontWeight:700,fontSize:"0.85rem",whiteSpace:"nowrap"},children:A?u==="en"?"Locked":"ð æ¬¡ã¸ â¶":u==="en"?"Next â¶":"次㸠â¶"})]})]}),e.jsxs(i,{sx:{flex:1,overflowY:"auto",p:2},children:[t===0&&e.jsxs(e.Fragment,{children:[e.jsxs(Q,{sx:{p:3,mb:2,textAlign:"center"},children:[e.jsxs(a,{variant:"h4",sx:{color:"#FF9900",fontWeight:"bold",mb:1},children:[F,"%"]}),e.jsx(qe,{variant:"determinate",value:F,sx:{height:10,borderRadius:5,bgcolor:"#F2F3F3",mb:1,"& .MuiLinearProgress-bar":{backgroundColor:F>=70?"#1D8102":"#D13212"}}}),e.jsx(a,{variant:"body1",children:u==="en"?`${_} correct out of ${N}`:`${N}åä¸ ${_}åæ£è§£`})]}),F>=90&&e.jsxs(Q,{sx:{p:2,mb:2,bgcolor:"#E8F5E9",border:"1px solid #4CAF50",borderRadius:2,textAlign:"center"}
1,elevation:0,children:[e.jsx(a,{sx:{fontSize:32,mb:.5},children:"ð"}),e.jsx(a,{sx:{fontWeight:700,color:"#2E7D32",fontSize:16},children:u==="en"?"Excellent! Outstanding performance!":"ç´ æ´ãããæç¸¾ã§ãï¼"})]}),F>=70&&F<90&&e.jsx(Q,{sx:{p:2,mb:2,bgcolor:"#FFF3E0",border:"1px solid #FF9800",borderRadius:2,textAlign:"center"},elevation:0,children:e.jsx(a,{sx:{fontWeight:700,color:"#E65100",fontSize:15},children:u==="en"?"Passed! Keep building on this momentum.":"åæ ¼åå
ã§ãããã®èª¿åã§ç¶ãã¾ãããã"})}),e.jsx(a,{variant:"body2",sx:{color:"#666",mb:3},children:u==="en"?F>=70?"You have reached the passing range. Keep studying.":"You need a bit more practice. Review the questions you missed.":F>=70?h("åæ ¼ã©ã¤ã³ã«éãã¦ãã¾ããå¼ãç¶ãå¦ç¿ãç¶ãã¾ãããã","You are above the passing line. Keep going."):h("ããå°ãå¦ç¿ãå¿
è¦ã§ããééããåé¡ã復ç¿ãã¾ãããã","You need a little more study. Review the questions you missed.")}),e.jsx(a,{variant:"subtitle1",sx:{fontWeight:700,mb:1.5,color:"#232F3E"},children:u==="en"?"Question Review":"åé¡å¥ è§£çã»è§£èª¬"}),z.map((f,q)=>{const B=ft(f,g==="en"?"en":"ja",g==="en"?"en-question":"ja"),re=te.get(f.id),pe=(re==null?void 0:re.isCorrect)??!1,Pe=!!re;return e.jsxs(ur,{sx:{mb:1},children:[e.jsx(hr,{expandIcon:e.jsx(fr,{}),children:e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%"},children:[Pe?pe?e.jsx(Oe,{sx:{color:"#1D8102",fontSize:22}}):e.jsx(mr,{sx:{color:"#D13212",fontSize:22}}):e.jsx(Je,{label:u==="en"?"Not answered":"æªåç",size:"small",sx:{bgcolor:"#eee"}}),e.jsxs(a,{variant:"body2",sx:{fontWeight:600,flex:1},children:[u==="en"?"Q":"å",q+1,". ",B.question.slice(0,60),"â¦"]})]})}),e.jsxs(pr,{children:[e.jsx(a,{variant:"body2",sx:{whiteSpace:"pre-line",mb:2,color:"#333"},children:B.question}),e.jsx(i,{sx:{mb:2},children:B.options.map((He,Se)=>{const ye=f.correctAnswers.includes(Se);return e.jsx(i,{sx:{p:1,mb:.5,borderRadius:1,bgcolor:ye?"#e8f5e9":"transparent",border:ye?"1px solid #1D8102":"1px solid #eee"},children:e.jsxs(a,{variant:"body2",sx:{color:ye?"#1D8102":"#555"},children:[String.fromCharCode(65+Se),". ",He," ",ye&&"â"]})},Se)})}),e.jsxs(Q,{sx:{p:1.5,bgcolor:"#f9f9f9",borderLeft:"3px solid #232F3E"},elevation:0,children:[e.jsx(a,{variant:"caption",sx:{color:"#232F3E",fontWeight:600},children:u==="en"?"Explanation":"解説"}),e.jsx(a,{variant:"body2",sx:{color:"#333",whiteSpace:"pre-line",mt:.5},children:B.explanation})]})]})]},f.id)})]}),t===1&&e.jsxs(Q,{sx:{p:2},children:[e.jsx(a,{variant:"h6",sx:{mb:1},children:u==="en"?"Accuracy by Category":"ã«ãã´ãªã¼å¥æ£è§£ç"}),e.jsx(Ie,{children:R.map((f,q)=>{const B=f.total?Math.round(f.correct/f.total*100):0;return e.jsxs(le,{sx:{flexDirection:"column",alignItems:"stretch"},children:[e.jsx(oe,{primary:f.category,secondary:`${f.correct}/${f.total} (${B}%)`}),e.jsx(qe,{variant:"determinate",value:B,sx:{height:6,borderRadius:3,bgcolor:"#F2F3F3","& .MuiLinearProgress-bar":{backgroundColor:B>=70?"#1D8102":"#D13212"}}})]},q)})})]})]})]}),e.jsx(i,{sx:{p:2,display:"flex",justifyContent:"center",flexShrink:0},children:e.jsx(ce,{onClick:()=>o("/vault-pro-exam/mock"),sx:{bgcolor:"#232F3E",color:"white",width:48,height:48,"&:hover":{bgcolor:"#1B2631"}},title:u==="en"?"Go to mock exam list":"模æ¬è©¦é¨ä¸è¦§ã¸",children:e.jsx(bn,{})})}),e.jsx(Qe,{open:r,onClose:()=>d(!1)})]}):e.jsx(i,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh"},children:e.jsx(a,{sx:{color:"#666"},children:h("èªã¿è¾¼ã¿ä¸...","Loading...")})}):null}const et=["vaultPro"],fs=()=>{const o=be(),{soundEnabled:t,toggleSound:s}=Ht(),{darkMode:r,toggleDarkMode:d}=Be(),{easyMode:n,toggleEasyMode:E}=Ut(),{isLoggedIn:p}=Fe(),{siteLocale:b,studyMode:S,toggleEnglishQuestionMode:u}=ue(),c=(H,P)=>b==="en"?P:H,[h,g]=l.useState(!1),[y,k]=l.useState(!1),[m,j]=l.useState(null),[z,N]=l.useState(!1),[T,v]=l.useState("feedback"),[I,D]=l.useState(""),[te,L]=l.useState(!1),[$,O]=l.useState(!1),[W,U]=l.useState(""),ne="https://nicheelab-api.fjyjfrtfzy.workers.dev",V=async()=>
1{if(I.trim().length<5){U(c("5æå以ä¸ã§å
¥åãã¦ãã ãã","Enter at least 5 characters"));return}L(!0),U("");try{const H=localStorage.getItem("exam_jwt_token");if(!(await fetch(`${ne}/api/reports`,{method:"POST",headers:{"Content-Type":"application/json",...H?{Authorization:`Bearer ${H}`}:{}},body:JSON.stringify({examType:"general",reportType:T,message:I.trim()})})).ok)throw new Error(c("éä¿¡ã«å¤±æãã¾ãã","Failed to send"));O(!0)}catch{U(c("éä¿¡ã«å¤±æãã¾ãããæéãããã¦å試è¡ãã¦ãã ããã","Failed to send. Please wait a moment and try again."))}finally{L(!1)}},G=()=>{N(!1),D(""),v("feedback"),U(""),O(!1)},_=H=>{j(H),g(!0)},F=async()=>{const H=Object.keys(localStorage);if(p)try{if(m==="practice")for(const P of et)await en(P,"practice").catch(()=>{});else if(m==="mock")for(const P of et)await en(P,"mock").catch(()=>{});else if(m==="all")for(const P of et)await en(P,"all").catch(()=>{})}catch{}(m==="practice"||m==="all")&&(et.forEach(P=>{localStorage.removeItem(`${P}_answeredCount`),localStorage.removeItem(`${P}_correctCount`),localStorage.removeItem(`${P}_answersDetail`),localStorage.removeItem(`${P}_currentSet`),localStorage.removeItem(`${P}_wrong_answers`),localStorage.removeItem(`${P}_review_queue`),localStorage.removeItem(`${P}_review_index`),m==="all"&&localStorage.removeItem(`${P}_bookmarks`)}),H.forEach(P=>{et.some(x=>P.startsWith(`ratio_${x}_`)||P.startsWith(`practice_result_${x}_`))&&localStorage.removeItem(P)})),(m==="mock"||m==="all")&&(et.forEach(P=>{localStorage.removeItem(`${P}_mock_answeredCount`),localStorage.removeItem(`${P}_mock_correctCount`),localStorage.removeItem(`${P}_mock_answersDetail`),localStorage.removeItem(`${P}_mock_currentSet`),localStorage.removeItem(`${P}_mock_wrong_answers`),localStorage.removeItem(`${P}_mock_completed`)}),H.forEach(P=>{et.some(x=>P.startsWith(`mock_ratio_${x}_`)||P.startsWith(`mock_result_${x}_`))&&localStorage.removeItem(P)})),g(!1),k(!0),setTimeout(()=>window.location.reload(),500)},R={practice:c("ç·´ç¿åé¡ã®å¦ç¿ãã¼ã¿","Practice question data"),mock:c("模æ¬è©¦é¨ã®å¦ç¿ãã¼ã¿","Mock exam data"),all:c("ãã¹ã¦ã®å¦ç¿ãã¼ã¿","All study data")};return e.jsxs(i,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",width:"100%"},children:[e.jsxs(i,{sx:{height:64,bgcolor:"#1B3139",display:"flex",alignItems:"center",px:1,flexShrink:0},children:[e.jsx(ce,{onClick:()=>o("/vault-pro-exam/menu"),children:e.jsx($e,{sx:{color:"#fff"}})}),e.jsx(a,{variant:"h6",sx:{color:"#fff",flex:1,textAlign:"center"},children:c("è¨å®","Settings")}),e.jsx(i,{sx:{width:48}})]}),e.jsxs(i,{sx:{flex:1,p:2},children:[e.jsx(a,{variant:"subtitle1",sx:{color:"#888",mb:1},children:c("è¡¨ç¤ºã»æä½è¨å®","Display and controls")}),e.jsxs(Ie,{children:[e.jsxs(le,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1},children:[r?e.jsx(qt,{sx:{color:"#1B3139"}}):e.jsx(Nt,{sx:{color:"#888"}}),e.jsx(oe,{primary:c("ãã¼ã¯ã¢ã¼ã","Dark mode"),secondary:r?"ON":"OFF"})]}),e.jsx(bt,{checked:r,onChange:d,color:"primary"})]}),e.jsx(Re,{}),e.jsxs(le,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1},children:[n?e.jsx(Ct,{sx:{color:"#FF9900"}}):e.jsx(so,{sx:{color:"#888"}}),e.jsx(oe,{primary:c("ããããåçã¢ã¼ã","Easy answer mode"),secondary:n?c("ON â 鏿ããã ãã§èªååç","ON â choosing an option submits it automatically"):"OFF"})]}),e.jsx(bt,{checked:n,onChange:E,color:"warning"})]}),e.jsx(Re,{}),e.jsxs(le,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1},children:[t?e.jsx(ao,{sx:{color:"#1B3139"}}):e.jsx(io,{sx:{color:"#888"}}),e.jsx(oe,{primary:c("åçæã®é³å£°","Answer sound"),secondary:t?"ON":"OFF"})]}),e.jsx(bt,{checked:t,onChange:s,color:"primary"})]}),b==="ja"&&e.jsxs(e.Fragment,{children:[e.jsx(Re,{}),e.jsxs(le,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(Ct,{sx:{color:S==="en-question"?"#0073BB":"#888"}}),e.jsx(oe,{primary:c("å顿ã»é¸æè¢ãè±èªè¡¨ç¤º","Show questions and choices in English"),secondary:S==="en-question"?c("ON - 解説ã¨UIã¯æ¥æ¬èªã®ã¾ã¾","ON - explanations and the UI stay in Japanese"):"OFF"})]}),e.jsx(bt,{checked:S==="en-question",onChange:u,color:"info"})]})]})]}),e.jsx(a,{variant:"subtitle1",sx:{color:"#888",mt:4,mb:1},children:c("å¦ç¿ãã¼ã¿ã®ç®¡ç","Manage study data")}),e.jsxs(Ie,{children:[e.jsxs(le,{sx:{cursor:"pointer","&:hover":{bgcolor:"#f5f5f5"}},onClick:()=>_("practice"),children:[e.jsx(Jt,{sx:{color:"#0073BB",mr:2}}),e.jsx(oe,{primary:c("ç·´ç¿åé¡ãã¼ã¿ããªã»ãã","Re
1set practice data"),secondary:c("æ£è§£çã»åçå±¥æ´ãã¯ãªã¢ãã¾ã","Clears your accuracy and answer history")})]}),e.jsx(Re,{}),e.jsxs(le,{sx:{cursor:"pointer","&:hover":{bgcolor:"#f5f5f5"}},onClick:()=>_("mock"),children:[e.jsx(Jt,{sx:{color:"#0073BB",mr:2}}),e.jsx(oe,{primary:c("模æ¬è©¦é¨ãã¼ã¿ããªã»ãã","Reset mock exam data"),secondary:c("模æ¬è©¦é¨ã®æ£è§£çã»åçå±¥æ´ãã¯ãªã¢ãã¾ã","Clears your mock exam accuracy and answer history")})]}),e.jsx(Re,{}),e.jsxs(le,{sx:{cursor:"pointer","&:hover":{bgcolor:"#f5f5f5"}},onClick:()=>_("all"),children:[e.jsx(Jt,{sx:{color:"#d32f2f",mr:2}}),e.jsx(oe,{primary:c("ãã¹ã¦ã®ãã¼ã¿ããªã»ãã","Reset all data"),secondary:c("ç·´ç¿ã»æ¨¡æ¬è©¦é¨ã®å
¨ãã¼ã¿ãã¯ãªã¢ãã¾ã","Clears all practice and mock exam data"),primaryTypographyProps:{color:"#d32f2f"}})]})]}),e.jsx(a,{variant:"subtitle1",sx:{color:"#888",mt:4,mb:1},children:c("ã¢ããªæ
å ±","About this app")}),e.jsxs(Ie,{children:[e.jsx(le,{children:e.jsx(oe,{primary:c("ãã¼ã¸ã§ã³","Version"),secondary:"1.0.0"})}),e.jsx(Re,{}),e.jsx(le,{children:e.jsx(oe,{primary:c("対å¿è©¦é¨","Supported exams"),secondary:"Vault Associate (VA-003)"})})]}),e.jsxs(i,{sx:{mt:3},children:[e.jsx(a,{variant:"subtitle2",sx:{color:"#888",mb:1},children:c("ãã£ã¼ãããã¯","Feedback")}),e.jsx(C,{variant:"outlined",startIcon:e.jsx(lo,{}),fullWidth:!0,onClick:()=>N(!0),sx:{mb:1,justifyContent:"flex-start",color:"#1B3139",borderColor:"#ccc"},children:c("ãã£ã¼ãããã¯ãéã","Send feedback")}),e.jsx(a,{variant:"caption",sx:{color:"#999"},children:c("åé¡ã®èª¤ãã¯ååé¡ã®è§£èª¬ãã¼ã¸ãããåé¡ã®èª¤ããå ±åããã¿ã³ã§ãéä¿¡ã§ãã¾ã",`You can also report a mistake using the "Report an error" button on any question's explanation page.`)})]}),e.jsxs(i,{sx:{mt:2},children:[e.jsx(a,{variant:"subtitle2",sx:{color:"#888",mb:1},children:c("å©ç¨è¦ç´ã»ããªã·ã¼","Terms and Policies")}),e.jsx(gt,{color:"#0073BB",justifyContent:"flex-start"})]})]}),e.jsx(i,{sx:{p:2,display:"flex",justifyContent:"center",flexShrink:0},children:e.jsx(C,{variant:"outlined",onClick:()=>o("/vault-pro-exam/menu"),sx:{color:"#1B3139",borderColor:"#1B3139"},children:c("ãã¼ã ã¸æ»ã","Back to home")})}),e.jsxs(Ae,{open:h,onClose:()=>g(!1),children:[e.jsx(rt,{children:c("ãã¼ã¿ãªã»ãã確èª","Reset data?")}),e.jsx(ke,{children:e.jsx(co,{children:c(`${m&&R[m]}ããªã»ãããã¾ãããã®æä½ã¯åãæ¶ãã¾ããã`,`This will reset ${m&&R[m]}. This action cannot be undone.`)})}),e.jsxs(Ee,{children:[e.jsx(C,{onClick:()=>g(!1),children:c("ãã£ã³ã»ã«","Cancel")}),e.jsx(C,{onClick:F,color:"error",variant:"contained",children:c("ãªã»ãã","Reset")})]})]}),e.jsx(or,{open:y,autoHideDuration:3e3,onClose:()=>k(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},children:e.jsx(Le,{severity:"success",onClose:()=>k(!1),children:c("ãã¼ã¿ããªã»ãããã¾ãã","Data reset")})}),e.jsx(Ae,{open:z,onClose:G,maxWidth:"sm",fullWidth:!0,children:$?e.jsxs(e.Fragment,{children:[e.jsxs(ke,{sx:{textAlign:"center",py:5},children:[e.jsx(Oe,{sx:{fontSize:56,color:"#1D8102",mb:2}}),e.jsx(a,{variant:"h6",sx:{fontWeight:700,mb:1},children:c("éä¿¡ãã¾ãã","Sent")}),e.jsx(a,{variant:"body2",sx:{color:"#666"},children:c("ãæè¦ãããã¨ããããã¾ãã","Thanks for your feedback.")})]}),e.jsx(Ee,{children:e.jsx(C,{onClick:G,children:c("éãã","Close")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(rt,{sx:{fontWeight:700},children:c("ãã£ã¼ãããã¯","Feedback")}),e.jsxs(ke,{children:[e.jsxs(dr,{fullWidth:!0,sx:{mb:2,mt:1},children:[e.jsx(xr,{children:c("種å¥","Type")}),e.jsxs(yt,{value:T,label:c("種å¥","Type"),onChange:H=>v(H.target.value),children:[e.jsx(je,{value:"feedback",children:c("ãã£ã¼ãããã¯","Feedback")}),e.jsx(je,{value:"bug",children:c("ä¸å
·åå ±å","Report a bug")}),e.jsx(je,{value:"feature",children:c("æ©è½ãªã¯ã¨ã¹ã","Feature request")}),e.jsx(je,{value:"other",children:c("ãã®ä»","Other")})]})]}),e.jsx(we,{fullWidth:!0,multiline:!0,rows:4,label:c("詳細","Details"),value:
1I,onChange:H=>D(H.target.value),placeholder:c("ãæ°è»½ã«ãè¨å
¥ãã ãã","Feel free to write anything"),inputProps:{maxLength:1e3}}),W&&e.jsx(a,{color:"error",variant:"body2",sx:{mt:1},children:W}),e.jsx(i,{sx:{mt:1,textAlign:"right"},children:e.jsxs(a,{variant:"caption",sx:{color:"#999"},children:[I.length,"/1000"]})})]}),e.jsxs(Ee,{children:[e.jsx(C,{onClick:G,sx:{color:"#666"},children:c("ãã£ã³ã»ã«","Cancel")}),e.jsx(C,{onClick:V,variant:"contained",disabled:te,sx:{bgcolor:"#FF3621","&:hover":{bgcolor:"#E02E1B"}},children:te?c("éä¿¡ä¸...","Sending..."):c("éä¿¡","Send")})]})]})})]})},ps="https://nicheelab-api.fjyjfrtfzy.workers.dev";async function lt(o,t){const s=localStorage.getItem("exam_jwt_token");return(await fetch(`${ps}${o}`,{...t,headers:{"Content-Type":"application/json",Authorization:`Bearer ${s}`,...t==null?void 0:t.headers}})).json()}function gs(){var P;const{siteLocale:o}=ue(),t=(x,A)=>o==="en"?A:x,s=be(),{user:r}=Fe(),[d,n]=l.useState(0),[E,p]=l.useState([]),[b,S]=l.useState([]),[u,c]=l.useState([]),[h,g]=l.useState([]),[y,k]=l.useState(null),[m,j]=l.useState("dea"),[z,N]=l.useState("practice"),[T,v]=l.useState(!1),[I,D]=l.useState(null),[te,L]=l.useState(!1),$=(r==null?void 0:r.role)==="admin",O=l.useCallback(async()=>{try{const{questions:x}=await vo(m,z);p(x)}catch{p([])}},[m,z]),W=l.useCallback(async()=>{try{const{users:x}=await ko();S(x)}catch{S([])}},[]),U=l.useCallback(async()=>{try{const x=await lt("/api/admin/reports");g(x.reports||[])}catch{g([])}},[]),ne=l.useCallback(async()=>{var x;try{const A=await lt("/api/admin/stats");k(A)}catch{k(null)}try{const A=await lt("/api/admin/settings");L(((x=A.settings)==null?void 0:x.maintenance_mode)==="true")}catch{}},[]),V=async()=>{const x=!te;await lt("/api/admin/settings",{method:"PUT",body:JSON.stringify({key:"maintenance_mode",value:String(x)})}),L(x)},G=l.useCallback(async()=>{try{const{categories:x}=await Eo();c(x)}catch{c([])}},[]);l.useEffect(()=>{$&&(d===0&&ne(),d===1&&O(),d===2&&W(),d===3&&U())},[d,m,z,$,ne,O,W,U]),l.useEffect(()=>{$&&G()},[$,G]);const _=async x=>{confirm(t("ãã®åé¡ãåé¤ãã¾ããï¼","Delete this question?"))&&(await Co(x),O())},F=async x=>{confirm(t("ãã®ã¦ã¼ã¶ã¼ã¨é¢é£ãã¼ã¿ãå
¨ã¦åé¤ãã¾ããï¼","Delete this user and all related data?"))&&(await lt(`/api/admin/users/${x}`,{method:"DELETE"}),W())},R=async(x,A)=>{await lt(`/api/admin/reports/${x}`,{method:"PUT",body:JSON.stringify({status:A})}),U()},H=async()=>{I&&(I.id?await wo(I.id,I):await So({...I,exam_type:m,question_set:z}),v(!1),D(null),O())};return $?e.jsxs(i,{sx:{minHeight:"100vh",bgcolor:"#F2F3F3"},children:[e.jsxs(i,{sx:{height:64,bgcolor:"#1B3139",display:"flex",alignItems:"center",px:2},children:[e.jsx(ce,{onClick:()=>s("/vault-pro-exam/menu"),children:e.jsx($e,{sx:{color:"#fff"}})}),e.jsx(a,{variant:"h6",sx:{color:"#fff",ml:2},children:t("管çç»é¢","Admin")})]}),e.jsxs(Te,{maxWidth:"lg",sx:{py:3},children:[e.jsxs(yn,{value:d,onChange:(x,A)=>n(A),sx:{mb:3},variant:"scrollable",scrollButtons:"auto",children:[e.jsx(Ve,{label:t("ããã·ã¥ãã¼ã","Dashboard")}),e.jsx(Ve,{label:t("åé¡ç®¡ç","Questions")}),e.jsx(Ve,{label:t("ã¦ã¼ã¶ã¼ç®¡ç","Users")}),e.jsx(Ve,{label:t("ãã£ã¼ãããã¯","Feedback")})]}),d===0&&e.jsxs(e.Fragment,{children:[e.jsxs(Q,{sx:{p:2,mb:3,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e.jsxs(i,{children:[e.jsx(a,{sx:{fontWeight:700},children:t("ã¡ã³ããã³ã¹ã¢ã¼ã","Maintenance mode")}),e.jsx(a,{variant:"caption",sx:{color:"#666"},children:t("ONã«ããã¨ã¦ã¼ã¶ã¼ã«ã¡ã³ããã³ã¹ç»é¢ã表示ããã¾ã","When on, users see a maintenance screen")})]}),e.jsx(ut,{control:e.jsx(bt,{checked:te,onChange:V,color:"warning"}),label:te?"ON":"OFF"})]}),te&&e.jsx(Le,{severity:"warning",sx:{mb:2},children:t("ã¡ã³ããã³ã¹ã¢ã¼ããæå¹ã§ããã¦ã¼ã¶ã¼ã«ã¡ã³ããã³ã¹ç»é¢ã表示ããã¦ãã¾ãã","Maintenance mode is on. Users are seeing the maintenance screen.")})]}),d===0&&y&&e.jsxs(i,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr 1fr",md:"1fr 1fr 1fr 1fr"},gap:2,mb:3},children:[e.jsx(Et,{children:e.jsxs(It,{sx:{textAlign:"center"},children:[e.jsx(xo,{sx:{fontSize:36,color:"#1B3139"}}),e.jsx(a,{variant:"h4",sx:{fontWeight:800,color:"#1B3139"},children:y.users}),e.jsx(a,{variant:"body2",sx:{color:"#666"},children:t("ç»é²ã¦ã¼ã¶ã¼","Registered users")})]})}),e.jsx(Et,{children:e.jsxs(It,{sx:{textAlign:"center"},children:[e.jsx(pn,{sx:{fontSize:36,color:"#1D8102"}}),e.jsx(a,{variant:"h4",sx:{fontWeight:800,color:"#1D8102"},children:y.activeSubscriptions}),e.jsx(a,{variant:"body2",sx:{color:"#666"},children:t("ææä¼å¡","Paid members")})]})}),e.jsx(Et,{children:e.jsxs(It,{sx:{textAlign:"center"},children:[e.jsx(fn,{sx:{fontSize:36,color:"#FF3621"}}),e.jsx(a,{variant:"h4",sx:{fontWeight:800,color:"#FF3621"},children:y.totalAnswers}),e.jsx(a,{variant:"body2",sx:{color:"#666"},children:t("ç·åçæ°","Total answers")})]})}),e.jsx(Et,{children:e.jsxs(It,{sx:{textAlign:"center"},children:[e.jsx(cr,{sx:{fontSize:36,color:"#F59E0B"}}),e.jsx(a,{variant:"h4",sx:{fontWeight:800,color:"#F59E0B"},children:y.openReports}),e.jsx(a,{variant:"body2",sx:{color:"#666"},children:t("æªå¯¾å¿å ±å","Open reports")})]})})]}),d===1&&e.jsxs(e.Fragment,{children:[e.jsxs(i,{sx:{display:"flex",gap:2,mb:2,alignItems:"center",flexWrap:"wrap"},children:[e.jsx(yt,{value:m,onChange:x=>j(x.target.value),size:"small",children:["dea","dep","daa","mla","mlp","spark","genai"].map(x=>e.jsx(je,{value:x,children:x.toUpperCase()},x))}),e.jsxs(yt,{value:z,onChange:x=>N(x.target.value),size:"small",children:[e.jsx(je,{value:"practice",children:t("ç·´ç¿åé¡","Practice questions")}),e.jsx(je,{value:"mock",children:t("模æ¬è©¦é¨","Mock exams")})]}),e.jsx(C,{startIcon:e.jsx(uo,{}),variant:"contained",sx:{bgcolor:"#FF3621","&:hover":{bgcolor:"#E02E1B"}},onClick:()=>{var x;D({title:"",body:"",category_id:((x=u[0])==null?void 0:x.id)||1,difficulty:1,choices:[{text:"",is_correct:!1},{text:"",is_correct:!1},{text:"",is_correct:!1},{text:"",is_correct:!1}],explanation:""}),v(!0)},children:t("åé¡è¿½å ","Add question")})]}),e.jsx(Q,{sx:{overflowX:"auto"},children:e.jsxs(Kt,{size:"small",children:[e.jsx(Qt,{children:e.jsxs(it,{sx:{bgcolor:"#1B3139"},children:[e.jsx(Z,{sx:{color:"#fff"},children:"ID"}),e.jsx(Z,{sx:{color:"#fff"},children:t("ã¿ã¤ãã«","Title")}),e.jsx(Z,{sx:{color:"#fff"},children:t("ã«ãã´ãª","Category")}),e.jsx(Z,{sx:{color:"#fff"},children:t("é£æåº¦","Difficulty")}),e.jsx(Z,{sx:{color:"#fff"},children:t("æä½","Actions")})]})}),e.jsx(Xt,{children:E.map(x=>e.jsxs(it,{children:[e.jsx(Z,{children:x.id}),e.jsx(Z,{children:x.title}),e.jsx(Z,{children:x.category_name}),e.jsx(Z,{children:x.difficulty}),e.jsxs(Z,{children:[e.jsx(ce,{size:"small",onClick:()=>{D(x),v(!0)},children:e.jsx(ho,{fontSize:"small"})}),e.jsx(ce,{size:"small",color:"error",onClick:()=>_(x.id),children:e.jsx(_n,{fontSize:"small"})})]})]},x.id))})]})})]}),d===2&&e.jsx(Q,{sx:{overflowX:"auto"},children:e.jsxs(Kt,{size:"small",children:[e.jsx(Qt,{children:e.jsxs(it,{sx:{bgcolor:"#1B3139"},children:[e.jsx(Z,{sx:{color:"#fff"},children:"ID"}),e.jsx(Z,{sx:{color:"#fff"},children:t("ã¡ã¼ã«","Email")}),e.jsx(Z,{sx:{color:"#fff"},children:t("ãã©ã³","Plan")}),e.jsx(Z,{sx:{color:"#fff"},children:t("å½¹å²","Role")}),e.jsx(Z,{sx:{color:"#fff"},children:t("ç»é²æ¥","Joined")}),e.jsx(Z,{sx:{color:"#fff"},children:t("æä½","Actions")})]})}),e.jsx(Xt,{children:b.map(x=>e.jsxs(it,{children:[e.jsx(Z,{children:x.id}),e.jsx(Z,{children:x.email}),e.jsx(Z,{children:e.jsx(Je,{label:x.plan==="active"?t("ææ","Paid"):t("ç¡æ","Free"),size:"small",color:x.plan==="active"?"success":"default"})}),e.jsx(Z,{children:x.role}),e.jsx(Z,{children:new Date(x.created_at).toLocaleDateString("ja-JP")}),e.jsx(Z,{children:e.jsx(ce,{size:"small",color:"error",onClick:()=>F(x.id),title:t("ã¦ã¼ã¶ã¼åé¤","Delete user"),children:e.jsx(_n,{fontSize:"small"})})})]},x.id))})]})}),d===3&&e.jsx(Q,{sx:{overflowX:"auto"},children:e.jsxs(Kt,{size:"small",children:[e.jsx(Qt,{children:e.jsxs(it,{sx:{bgcolor:"#1B3139"},children:[e.jsx(Z,{sx:{color:"#fff"},children:"ID"}),e.jsx(Z,{sx:{color:"#fff"},children:t("種å¥","Type")}),e.jsx(Z,{sx:{color:"#fff"},children:t("試é¨","Exam")}),e.jsx(Z,{sx:{color:"#fff"},children:t("å
容","Details")}),e.jsx(Z,{sx:{color:"#fff"},children:t("ã¦ã¼ã¶ã¼","User")}),e.jsx(Z,{sx:{color:"#fff"},children:t("ã¹ãã¼ã¿ã¹","Status")}),e.jsx(Z,{sx:{color:"#fff"},children:t("æ¥æ","Date")}),e.jsx(Z,{sx:{color:"#fff"},children:t("æä½","Actions")})]})}),e.jsx(Xt,{children:h.map(x=>e.jsxs(it,{sx:{bgcolor:x.status==="open"?"#FFF8E1":void 0},children:[e.jsx(Z,{children:x.id}),e.jsx(Z,{children:e.jsx(Je,{label:x.report_type,size:"small"})}),e.jsxs(Z,{children:[x.exam_type," #",x.set_number]}),e.jsx(Z,{sx:{maxWidth:300,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:x.message}),e.jsx(Z,{children:x.user_email||t("å¿å","Anonymous")}),e.jsx(Z,{children:e.jsx(Je,{label:x.status==="open"?t("æªå¯¾å¿","Open"):x.status==="resolved"?t("解決æ¸","Resolved"):x.status,size:"small",color:x.status==="open"?"warning":"success"})}),e.jsx(Z,{children:new Date(x.created_at).toLocaleDateString("ja-JP")}),e.jsx(Z,{children:x.status==="open"&&e.jsx(C,{size:"small",variant:"outlined",color:"success",onClick:()=>R(x.id,"resolved"),children:t("解決","Resolve")})})]},x.id))})]})})]}),e.jsxs(Ae,{open:T,onClose:()=>v(!1),maxWidth:"md",fullWidth:!0,children:[e.jsx(rt,{children:I!=null&&I.id?t("åé¡ç·¨é","E
1dit question"):t("åé¡è¿½å ","Add question")}),e.jsx(ke,{children:I&&e.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2,mt:1},children:[e.jsx(we,{label:t("ã¿ã¤ãã«","Title"),value:I.title,onChange:x=>D({...I,title:x.target.value}),fullWidth:!0}),e.jsx(we,{label:t("å顿","Question"),value:I.body,onChange:x=>D({...I,body:x.target.value}),multiline:!0,rows:4,fullWidth:!0}),e.jsx(yt,{value:I.category_id,onChange:x=>D({...I,category_id:x.target.value}),size:"small",children:u.map(x=>e.jsxs(je,{value:x.id,children:[x.name," (",x.exam_type,")"]},x.id))}),e.jsx(a,{variant:"subtitle2",children:t("鏿è¢","Options")}),(P=I.choices)==null?void 0:P.map((x,A)=>e.jsxs(i,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsx(we,{label:t(`é¸æè¢ ${String.fromCharCode(65+A)}`,`Choice ${String.fromCharCode(65+A)}`),value:x.text,onChange:J=>{const f=[...I.choices];f[A]={...f[A],text:J.target.value},D({...I,choices:f})},fullWidth:!0,size:"small"}),e.jsx(C,{variant:x.is_correct?"contained":"outlined",size:"small",color:x.is_correct?"success":"inherit",onClick:()=>{const J=[...I.choices];J[A]={...J[A],is_correct:!J[A].is_correct},D({...I,choices:J})},children:t("æ£è§£","Correct")})]},A)),e.jsx(we,{label:t("解説","Explanation"),value:I.explanation,onChange:x=>D({...I,explanation:x.target.value}),multiline:!0,rows:3,fullWidth:!0})]})}),e.jsxs(Ee,{children:[e.jsx(C,{onClick:()=>v(!1),children:t("ãã£ã³ã»ã«","Cancel")}),e.jsx(C,{variant:"contained",onClick:H,sx:{bgcolor:"#FF3621","&:hover":{bgcolor:"#E02E1B"}},children:t("ä¿å","Save")})]})]})]}):e.jsxs(i,{sx:{p:4,textAlign:"center"},children:[e.jsx(a,{variant:"h5",color:"error",children:t("管çè
権éãå¿
è¦ã§ã","Admin access required")}),e.jsx(C,{onClick:()=>s("/vault-pro-exam/menu"),sx:{mt:2},children:t("ãã¼ã ã«æ»ã","Back to home")})]})}const Pt=_e,js="This English text is a reference translation. The Japanese version is the authoritative text; if the two differ, the Japanese version prevails.";function In({title:o,subtitle:t,children:s}){const{siteLocale:r}=ue(),d=r==="en",n=be();return e.jsxs(i,{sx:{minHeight:"100vh",bgcolor:Pt.lightGray},children:[e.jsx(i,{sx:{bgcolor:Pt.squidInk,color:"#fff",py:4,px:2},children:e.jsxs(Te,{maxWidth:"md",children:[e.jsx(C,{startIcon:e.jsx($e,{}),onClick:()=>n("/vault-pro-exam/"),sx:{color:"rgba(255,255,255,0.8)",mb:2},children:d?"Back to top":"ãããã¸æ»ã"}),e.jsx(a,{variant:"h4",sx:{fontWeight:800,mb:1,fontSize:{xs:"1.6rem",md:"2.1rem"}},children:o}),e.jsx(a,{sx:{color:"rgba(255,255,255,0.75)"},children:t}),d&&e.jsx(a,{sx:{mt:2,p:1.5,borderRadius:1,bgcolor:"rgba(255,255,255,0.12)",color:"rgba(255,255,255,0.9)",fontSize:"0.85rem",lineHeight:1.6},children:js})]})}),e.jsxs(Te,{maxWidth:"md",sx:{py:4},children:[e.jsx(i,{sx:{display:"flex",flexDirection:"column",gap:3},children:s}),e.jsx(i,{sx:{mt:5,pt:3,borderTop:`1px solid ${Pt.borderGray}`},children:e.jsx(gt,{color:Pt.accentBlue,justifyContent:"flex-start"})})]})]})}const nt=_e;function Ue({title:o,children:t}){return e.jsxs(Q,{elevation:0,sx:{p:3,borderRadius:2,border:`1px solid ${nt.borderGray}`},children:[e.jsx(a,{variant:"h6",sx:{fontWeight:700,color:nt.squidInk,mb:1.5},children:o}),t]})}function bs(){const{siteLocale:o}=ue(),t=(s,r)=>o==="en"?r:s;return e.jsxs(In,{title:t("å©ç¨è¦ç´","Terms of Service"),subtitle:t("æ¬ãµã¼ãã¹ã®å©ç¨æ¡ä»¶ãç¦æ¢äºé
ãå
責äºé
ãèª²éæ¡ä»¶ãå®ããè¦ç´ã§ãã","Terms that set out the conditions of use, prohibited acts, disclaimers, and billing conditions of the Service."),children:[e.jsx(Ue,{title:t("1. ãµã¼ãã¹å
容","1. Service description"),children:e.jsx(Ie,{dense:!0,disablePadding:!0,children:Oo.map(s=>e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t(s.ja,s.en)})},s.ja))})}),e.jsx(Ue,{title:t("2. æéã¨æ¯æã","2. Fees and payment"),children:e.jsxs(a,{variant:"body2",sx:{color:nt.textSecondary,lineHeight:1.8},children:[t(`ææãã©ã³ã®æé㯠${t(X.priceDisplay.ja,X.priceDisplay.en)} ã§ããæ±ºæ¸ã¯ ${t(X.paymentMethods.ja,X.paymentMethods.en)} ã«ããè¡ããã`,`The paid plan costs ${t(X.priceDisplay.ja,X.priceDisplay.en)}. Payment is made by ${t(X.paymentMethods.ja,X.paymentMethods.en)}, and`),t(`æé¡ãã©ã³ã®ãµãã¹ã¯ãªãã·ã§ã³ã¯èªåæ´æ°ããã¾ãï¼90æ¥éã®è²·ãåããã©ã³ã¯èªåæ´æ°ããããæéæºäºã§çµäºãã¾ãï¼ãè§£ç´ã¯ ${t(X.cancellationPolicy.ja,X.cancellationPolicy.en)}`,`Monthly subscriptions renew automatically (the one-time 90-day plan does not renew and ends when the peri
1od expires). Cancellation follows ${t(X.cancellationPolicy.ja,X.cancellationPolicy.en)}`)]})}),e.jsx(Ue,{title:t("3. ç¦æ¢äºé
","3. Prohibited conduct"),children:e.jsx(Ie,{dense:!0,disablePadding:!0,children:Mo.map(s=>e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t(s.ja,s.en)})},s.ja))})}),e.jsx(Ue,{title:t("4. ç¥çè²¡ç£æ¨©ã»åæ¨","4. Intellectual property rights and trademarks"),children:e.jsx(Ie,{dense:!0,disablePadding:!0,children:Pr.map(s=>e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t(s.ja,s.en)})},s.ja))})}),e.jsx(Ue,{title:t("5. å
責äºé
","5. Disclaimer"),children:e.jsxs(a,{variant:"body2",sx:{color:nt.textSecondary,lineHeight:1.8},children:[t("æ¬ãµã¼ãã¹ã¯å¦ç¿æ¯æ´ãç®çã¨ãã¦æä¾ããããã®ã§ãããè³æ ¼è©¦é¨ã®åæ ¼ãä¿è¨¼ãããã®ã§ã¯ããã¾ããã","This service is provided as a study aid and does not guarantee that you will pass any certification exam."),t("ææ°æ§ã»æ£ç¢ºæ§ã®ç¢ºä¿ã«åªãã¾ããããã®å®å
¨æ§ãä¿è¨¼ãããã®ã§ã¯ãªãã","We work to keep the content current and accurate, but we do not warrant its completeness,"),t("å©ç¨è
ã¯èªå·±ã®è²¬ä»»ã§æ¬ãµã¼ãã¹ãå©ç¨ãããã®ã¨ãã¾ãã","and you use this service at your own risk.")]})}),e.jsx(Ue,{title:t("6. ãµã¼ãã¹å¤æ´ã»åæ¢","6. Changes to and suspension of the service"),children:e.jsxs(a,{variant:"body2",sx:{color:nt.textSecondary,lineHeight:1.8},children:[t("éå¶è
ã¯ãä¿å®ãé害対å¿ãæ³ä»¤é å®ããµã¼ãã¹æ¹åãã®ä»åççãªçç±ã«ããã","For maintenance, incident response, legal compliance, service improvements, or other reasonable causes, the operator may"),t("æ¬ãµã¼ãã¹ã®å
¨é¨ã¾ãã¯ä¸é¨ã夿´ã忢ãçµäºãããã¨ãããã¾ãã","change, suspend, or discontinue all or part of this service.")]})}),e.jsx(Ue,{title:t("7. è¿éã»è§£ç´","7. Refunds and cancellation"),children:e.jsxs(a,{variant:"body2",sx:{color:nt.textSecondary,lineHeight:1.8},children:[t(X.refundPolicy.ja,X.refundPolicy.en)," ",t(X.cancellationPolicy.ja,X.cancellationPolicy.en)]})}),e.jsx(Ue,{title:t("8. æºæ æ³ã»ç®¡è½","8. Governing law and jurisdiction"),children:e.jsxs(a,{variant:"body2",sx:{color:nt.textSecondary,lineHeight:1.8},children:[t("æ¬è¦ç´ã¯æ¥æ¬æ³ã«æºæ ãã¾ããæ¬ãµã¼ãã¹ã«é¢ãã¦ç´äºãçããå ´åã¯ã","These terms are governed by the laws of Japan. In the event of a dispute concerning this service,"),t("éå¶è
ã®æå¨å°ã管è½ããè£å¤æã第ä¸å¯©ã®å°å±çåæç®¡è½è£å¤æã¨ãã¾ãã","the court with jurisdiction over the operator's location shall be the exclusive court of first instance.")]})})]})}const vt=_e;function ct({title:o,children:t}){return e.jsxs(Q,{elevation:0,sx:{p:3,borderRadius:2,border:`1px solid ${vt.borderGray}`},children:[e.jsx(a,{variant:"h6",sx:{fontWeight:700,color:vt.squidInk,mb:1.5},children:o}),t]})}function ys(){const{siteLocale:o}=ue(),t=(s,r)=>o==="en"?r:s;return e.jsxs(In,{title:t("ãã©ã¤ãã·ã¼ããªã·ã¼","Privacy Policy"),subtitle:t("å人æ
å ±ã®åå¾é
ç®ãå©ç¨ç®çã第ä¸è
æä¾ãç®¡çæ¹æ³ãå®ãã¦ãã¾ãã","Sets out the items of personal information collected, the purposes of use, provision to third parties, and management methods."),children:[mt.length>0&&e.jsx(Le,{severity:"warning",children:t(`ãªãªã¼ã¹åã«ä»¥ä¸ã®éå¶è
æ
å ±ãå¿
ã確å®ãã¦ãã ãã: ${mt.map(s=>t(s.ja,s.en)).join("ã")}`,`Finalize the following operator details before release: ${mt.map(s=>t(s.ja,s.en)).join("ã")}`)}),e.jsx(ct,{title:t("1. åå¾ããæ
å ±","1. Information collected"),children:e.jsx(Ie,{dense:!0,disablePadding:!0,children:No.map(s=>e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t(s.ja,s.en)})},s.ja))})}),e.jsx(ct,{title:t("2. å©ç¨ç®ç","2. Purposes of use"),children:e.jsx(Ie,{dense:!0,disablePadding:!0,children:qo.map(s=>e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t(s.ja,s.en)})},s.ja))})}),e.jsx(ct,{title:t("3. 第ä¸è
æä¾ã»å¤é¨ãµã¼ãã¹é£æº","3. Provision to third parties and integration with external services"),children:e.jsx(Ie,{dense:!0,disablePadding:!0,children:Bo.map(s=>e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:s.name,secondary:t(s.purpose.ja,s.purpose.en)})},s.name))})}
1),e.jsx(ct,{title:t("4. å®å
¨ç®¡çæªç½®","4. Security control measures"),children:e.jsxs(a,{variant:"body2",sx:{color:vt.textSecondary,lineHeight:1.8},children:[t("ãã¹ã¯ã¼ãã¯ããã·ã¥åãã¦ä¿åããã¯ã¬ã¸ããã«ã¼ãæ
å ±ã¯å½ãµã¼ãã¹ã§ã¯ä¿æãã Stripe å´ã§ç®¡çãã¾ãã","Passwords are stored hashed. We never hold credit card details; Stripe manages them."),t("API ã§ã¯ã¬ã¼ãå¶éãç½²åæ¤è¨¼ãbot 対çãã¢ã¯ã»ã¹å¶å¾¡ã宿½ããå¿
è¦æå°éã®æ¨©éã§éç¨ãã¾ãã","Our APIs use rate limiting, signature verification, bot protection, and access control, and run with the minimum permissions required.")]})}),e.jsx(ct,{title:t("5. Cookieã»ãã°ã®å©ç¨","5. Use of cookies and logs"),children:e.jsxs(a,{variant:"body2",sx:{color:vt.textSecondary,lineHeight:1.8},children:[t("æ¬ãµã¼ãã¹ã§ã¯ããã°ã¤ã³ç¶æ
ã®ç¶æãæä½æ§åä¸ã䏿£å©ç¨æ¤ç¥ãå©ç¨ç¶æ³åæã®ããã« Cookie ã","We use cookies,"),t("ãã¼ã«ã«ã¹ãã¬ã¼ã¸ãã¢ã¯ã»ã¹ãã°ãå©ç¨ãã¾ãããã©ã¦ã¶è¨å®ã«ãã Cookie ãå¶éããå ´åãä¸é¨æ©è½ã","local storage, and access logs to keep you signed in, improve usability, detect abuse, and analyze usage. If you restrict cookies in your browser settings, some features"),t("æ£å¸¸ã«åä½ããªããã¨ãããã¾ãã","may not work correctly.")]})}),e.jsx(ct,{title:t("6. é示ã»è¨æ£ã»åé¤çã®è«æ±","6. Requests for disclosure, correction, deletion, etc."),children:e.jsxs(a,{variant:"body2",sx:{color:vt.textSecondary,lineHeight:1.8},children:[t(`ä¿æå人ãã¼ã¿ã®é示ãè¨æ£ãåé¤ãå©ç¨åæ¢çã®ãä¾é ¼ã¯ã${X.contactEmail}`,`To request disclosure, correction, deletion, or suspension of use of your retained personal data, contact ${X.contactEmail}`),t("ã¾ã§ãé£çµ¡ãã ãããæ¬äººç¢ºèªã®ãããæ³ä»¤ã«å¾ã£ã¦å¯¾å¿ãã¾ãã",". We will verify your identity and respond as required by law.")]})})]})}const St=_e;function jt({title:o,children:t}){return e.jsxs(Q,{elevation:0,sx:{p:3,borderRadius:2,border:`1px solid ${St.borderGray}`},children:[e.jsx(a,{variant:"h6",sx:{fontWeight:700,color:St.squidInk,mb:1.5},children:o}),t]})}function vs(){const{siteLocale:o}=ue(),t=(s,r)=>o==="en"?r:s;return e.jsxs(In,{title:t("ç¹å®åå弿³ã«åºã¥ã表è¨","Notation based on the Act on Specified Commercial Transactions (Tokutei Shotorihiki Ho)"),subtitle:t("äºæ¥è
æ
å ±ãè²©å£²ä¾¡æ ¼ãæ¯ææ¹æ³ãæä¾ææãè§£ç´ã»è¿éæ¡ä»¶ãæ²è¼ãã¦ãã¾ãã","This page sets out business operator information, sale prices, payment methods, timing of provision, and cancellation and refund conditions."),children:[mt.length>0&&e.jsx(Le,{severity:"warning",children:t(`ãªãªã¼ã¹åã«ä»¥ä¸ã®é
ç®ãå®å¤ã¸å·®ãæ¿ãã¦ãã ãã: ${mt.map(s=>t(s.ja,s.en)).join("ã")}`,`Replace these fields with real values before release: ${mt.map(s=>t(s.ja,s.en)).join("ã")}`)}),e.jsx(jt,{title:t("1. äºæ¥è
æ
å ±","1. Business information"),children:e.jsxs(Ie,{dense:!0,disablePadding:!0,children:[e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t("ãµã¼ãã¹å","Service name"),secondary:t(X.serviceName.ja,X.serviceName.en)})}),e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t("äºæ¥è
å","Business operator name"),secondary:t(X.operatorName.ja,X.operatorName.en)})}),e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t("使","Address"),secondary:t(X.businessAddress.ja,X.businessAddress.en)})}),e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t("ã¡ã¼ã«ã¢ãã¬ã¹","Email address"),secondary:X.contactEmail})}),e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t("é»è©±çªå·","Telephone number"),secondary:t(X.phoneNumber.ja,X.phoneNumber.en)})})]})}),e.jsx(jt,{title:t("2. è²©å£²ä¾¡æ ¼ã»æ¯ææ¹æ³","2. Sale price and payment method"),children:e.jsxs(Ie,{dense:!0,disablePadding:!0,children:[e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t("è²©å£²ä¾¡æ ¼","Sales price"),secondary:t(X.priceDisplay.ja,X.priceDisplay.en)})}),e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t("æ¯ææ¹æ³","Payment method"),secondary:t(X.paymentMethods.ja,X.paymentMethods.en)})})]})}),e.jsx(jt,{title:t("3. ãµã¼ãã¹æä¾ææ","3. Timing of service provision"),children:e.jsx(a,{variant:"body2",sx:{color:St.textSecondary,lineHeight:1.8},children:t(X.serviceStartTiming.ja,X.serviceStartTiming.en)})}),e.jsx(jt,{title:t("4. è§£ç´ã»è¿é","4. Cancellation and refunds"),children:e.jsxs(a,{variant:"body2",sx:{color:St.textSecondary,lineHeight:1.8},children:[t(X.cancellationPolicy.ja,X.cancellationPolicy.en)," ",t(X.refundPolicy.ja,X.refundPolicy.en)]})}),e.jsxs(jt,{title:t("5. è使¨©ã»æ¨©å©ä¾µå®³ã«é¢ããé£çµ¡å
","5. Contact for copyright and rights infringement matters"),children:[e.jsxs(a,{variant:"body2",sx:{color:St.textSecondary,lineHeight:1.8,mb:1.5},children:[t("権å©ä¾µå®³ãDMCA ç¸å½ã®ç³åã忍ã»è使¨©ã«é¢ãããåãåããã¯","For infringement claims, DMCA-equivalent notices, and trademark or copyright inquiries, contact"),` ${t(X.abuseContactEmail.ja,X.abuseContactEmail.en)} `,t("ã¾ã§ãé£çµ¡ãã ããã"," for assistance.")]}),e.jsx(Ie,{dense:!0,disablePadding:!0,children:Pr.map(s=>e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t(s.ja,s.en)})},s.ja))})]})]})}function As(){return e.jsx(Io,{children:e.jsx(Fo,{children:e.jsx(To,{children:e.jsx(Wo,{children:e.jsx($o,{children:e.jsxs(_r,{children:[e.jsx(he,{index:!0,element:e.jsx(Ho,{})}),e.jsx(he,{path:"select",element:e.jsx(zr,{to:"/vault-pro-exam/menu",replace:!0})}),e.jsx(he,{path:"login",element:e.jsx(Vo,{})}),e.jsx(he,{path:"register",element:e.jsx(Yo,{})}),e.jsx(he,{path:"forgot-password",element:e.jsx(Jo,{})}),e.jsx(he,{path:"terms",element:e.jsx(bs,{})}),e.jsx(he,{path:"privacy",element:e.jsx(ys,{})}),e.jsx(he,{path:"legal",element:e.jsx(vs,{})}),e.jsx(he,{path:"menu",element:e.jsx(Xo,{})}),e.jsx(he,{path:"practice",element:e.jsx(sn,{})}),e.jsx(he,{path:"training-problem/:id",element:e.jsx(Un,{})}),e.jsx(he,{path:"training-problem/:id/explanation",element:e.jsx(Vn,{})}),e.jsx(he,{path:"practice/result",element:e.jsx(os,{})}),e.jsx(he,{path:"mock",element:e.jsx(ds,{})}),e.jsx(he,{path:"mock-problem/:id",element:e.jsx(hs,{})}),e.jsx(he,{path:"mock-problem/:id/explanation",element:e.jsx(Vn,{})}),e.jsx(he,{path:"mock-exam/result",element:e.jsx(ms,{})}),e.jsx(he,{path:"review",element:e.jsx(ss,{})}),e.jsx(he,{path:"review-problem",element:e.jsx(ls,{})}),e.jsx(he,{path:"settings",element:e.jsx(fs,{})}),e.jsx(he,{path:"admin",element:e.jsx(gs,{})}),e.jsx(he,{path:"questions",element:e.jsx(sn,{})}),e.jsx(he,{path:"questions/:id",element:e.jsx(Un,{})}),e.jsx(he,{path:"category/:name",element:e.jsx(sn,{})})]})})})})})})}export{As as default};
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.