1import{r as l,j as e,L as xt,i as Qn,k as fn,c as Vn,d as Mr,e as Or,f as fe}from"./vendor-react-Df_OrbJ8.js";import{l as qr,U as Nr,C as $t,r as Xn,G as Rt,a as _t,t as Zn,P as Br,b as Hr,E as Kr,h as Ur,s as Dn,g as Fn,i as Wn,f as er,j as tr,c as pt,d as mn,e as wt,k as Tn,o as nr,m as ln,n as $n,p as Gr}from"./reviewRefs-TO5psJdl.js";import{d as Yr,a as de,u as ge,j as Jr,m as Rn,o as Qr}from"./index-rKPUXJsi.js";import{aG as Vr,p as $e,l as Ie,m as ot,n as Se,T as a,A as Oe,F as rr,o as ht,q as Qe,r as Ce,c as v,B as i,s as Me,b as Fe,Z as nt,h as or,Q as pn,y as Xr,z as gn,G as Zr,a7 as qt,P as J,D as Le,w as sr,H as _n,I as eo,J as ar,i as Ne,K as Ae,N as ir,O as ce,R as lr,U as cr,C as zt,M as dr,W as to,X as Re,Y as no,_ as He,u as ro,$ as oo,a0 as bn,a1 as so,a2 as xr,aH as ao,t as ur,aI as hr,aJ as fr,ad as ye,aK as ft,a3 as Nt,a4 as Bt,e as oe,a5 as At,a6 as mr,a8 as jn,a9 as pr,aa as gr,ab as br,ac as kt,ae as yn,ag as kn,ah as Ye,ai as jr,aj as yr,ak as kr,al as Sr,am as vr,L as Ee,d as le,an as io,ao as lo,ap as yt,aq as co,ar as xo,as as uo,at as Qt,au as ho,av as fo,aw as It,ax as Pt,v as mo,ay as po,az as Vt,aA as Xt,aB as lt,aC as ee,aD as Zt,aE as go,aF as zn}from"./vendor-mui-B8ynRMiJ.js";import{M as bo}from"./MobileAppSection-DF04sQ8n.js";import{u as gt}from"./useDataLoaded-jI8nuM1B.js";import"./vendor-BpmyTNDJ.js";const jo="https://nicheelab-api.fjyjfrtfzy.workers.dev";function Cr(){return localStorage.getItem("exam_jwt_token")}function Sn(o){localStorage.setItem("exam_jwt_token",o)}function yo(){localStorage.removeItem("exam_jwt_token")}async function ve(o,t={}){const s=Cr(),n={"Content-Type":"application/json",...t.headers||{}};s&&(n.Authorization=`Bearer ${s}`);const d=await fetch(`${jo}${o}`,{...t,headers:n});if(!d.ok){const r=await d.json().catch(()=>({error:"Network error"})),E=r.error||`HTTP ${d.status}`,m=new Error(qr(E,r.code,d.status));throw m.status=d.status,m.code=r.code,m}return d.json()}async function Lt(o,t,s){return ve("/api/auth/send-otp",{method:"POST",body:JSON.stringify({email:o,type:t,turnstileToken:s})})}const Ht="kafka-exam";async function ko(o){const t=await ve("/api/auth/register",{method:"POST",body:JSON.stringify({...o,productId:Ht,...Yr()})});return Sn(t.token),t}async function So(o,t,s){return ve("/api/auth/reset-password",{method:"POST",body:JSON.stringify({email:o,otpCode:t,newPassword:s})})}async function vo(o,t,s){const n=await ve(`/api/auth/login?productId=${encodeURIComponent(Ht)}`,{method:"POST",body:JSON.stringify({email:o,password:t,turnstileToken:s})});return Sn(n.token),n}async function Ln(){const o=await ve(`/api/auth/me?productId=${encodeURIComponent(Ht)}`);return o.token&&Sn(o.token),o}function Mn(){yo()}function en(){return!!Cr()}async function wr(o){return ve("/api/answers",{method:"POST",body:JSON.stringify(o)})}async function vn(o,t,s){return ve(`/api/answers/history?exam_type=${o}&set=${t}&set_number=${s}`)}async function On(o,t){return ve(`/api/answers/history/sets?exam_type=${o}&set=${t}`)}async function tn(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 Co(){return ve(`/api/subscription?productId=${encodeURIComponent(Ht)}`)}async function Ar(o){return ve("/api/consents",{method:"POST",body:JSON.stringify(o)})}async function wo(o,t){return ve(`/api/admin/questions?exam_type=${o}&set=${t}`)}async function Ao(o){return ve("/api/admin/questions",{method:"POST",body:JSON.stringify(o)})}async function Eo(o,t){return ve(`/api/admin/questions/${o}`,{method:"PUT",body:JSON.stringify(t)})}async function Io(o){return ve(`/api/admin/questions/${o}`,{method:"DELETE"})}async function Po(){return ve("/api/admin/users")}async function Do(){return ve("/api/admin/categories")}const Er=l.createContext(null),nn="exam_auth_user";function Fo({children:o}){const[t,s]=l.useState(null),[n,d]=l.useState(!0);l.useEffect(()=>{(async()=>{if(en())try{const{user:u}=await Ln();s({id:u.id,email:u.email,plan:u.plan,role:u.role})}catch(u){const c=u.status;(c===401||c===404)&&Mn()}else{const u=localStorage.getItem(nn);if(u)try{s(JSON.parse(u))}catch{localStorage.removeItem(nn)}}d(!1)})()},[]),l.useEffect(()=>{const u=c=>{if(!(c.key!=="exam_jwt_token"&&c.key!==nn&&c.key!=="exam_plan_refresh")){if(!en()){s(null);return}Ln().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 r=l.useCallback(async(u,c,h)=>{try{const{user:y}=await vo(u,c,h);return s({id:y.id,email:y.email,plan:y.plan,role:y.role}),{ok:!0}}catch(y){return{ok:!1,status:y.status,code:y.code}}},[]),E=l.useCallback(async u=>{{const{user:c}=await ko(u);s({id:c.id,email:c.email,plan:c.plan,role:c.role});return}},[]),m=l.useCallback(()=>{s(null),Mn()},[]),j=l.useCallback(async()=>
1{if(en())try{const u=await Co();s(c=>c?{...c,plan:u.plan}:null)}catch{}},[]),S={user:t,isLoggedIn:!!t,isSubscribed:(t==null?void 0:t.plan)==="premium",loading:n,login:r,register:E,logout:m,refreshSubscription:j};return e.jsx(Er.Provider,{value:S,children:o})}function Pe(){const o=l.useContext(Er);if(!o)throw new Error("useAuth must be used within AuthProvider");return o}const rn="kafka_exam_selected_type",Ir=l.createContext(null),Wo=["ccdak","ccaak","ccsd"];function To(o){return!!o&&Wo.includes(o)}function $o({children:o}){const[t,s]=l.useState(()=>{const r=localStorage.getItem(rn);return To(r)?r:null});l.useEffect(()=>{t?localStorage.setItem(rn,t):localStorage.removeItem(rn)},[t]);const n=l.useCallback(r=>{s(r)},[]),d=l.useCallback(()=>{s(null)},[]);return e.jsx(Ir.Provider,{value:{examType:t,setExamType:n,clearExamType:d},children:o})}function _e(){const o=l.useContext(Ir);if(!o)throw new Error("useExam must be used within ExamProvider");return o}const qn="exam_sound_enabled",Pr=l.createContext(null);function Ro({children:o}){const[t,s]=l.useState(!1);l.useEffect(()=>{const d=localStorage.getItem(qn);s(d==="true")},[]);const n=l.useCallback(()=>{s(d=>{const r=!d;return localStorage.setItem(qn,String(r)),r})},[]);return e.jsx(Pr.Provider,{value:{soundEnabled:t,toggleSound:n},children:o})}function Kt(){const o=l.useContext(Pr);if(!o)throw new Error("useSound must be used within SoundProvider");return o}const Nn="exam_dark_mode",Dr=l.createContext(null);function _o({children:o}){const[t,s]=l.useState(!1);l.useEffect(()=>{const d=localStorage.getItem(Nn);s(d==="true")},[]);const n=l.useCallback(()=>{s(d=>{const r=!d;return localStorage.setItem(Nn,String(r)),r})},[]);return e.jsx(Dr.Provider,{value:{darkMode:t,toggleDarkMode:n},children:o})}function Ke(){const o=l.useContext(Dr);if(!o)throw new Error("useTheme must be used within ThemeProvider");return o}const on="exam_easy_mode",Fr=l.createContext(null);function zo({children:o}){const[t,s]=l.useState(!0);l.useEffect(()=>{const d=localStorage.getItem(on);d!==null?s(d==="true"):localStorage.setItem(on,"true")},[]);const n=l.useCallback(()=>{s(d=>{const r=!d;return localStorage.setItem(on,String(r)),r})},[]);return e.jsx(Fr.Provider,{value:{easyMode:t,toggleEasyMode:n},children:o})}function Ut(){const o=l.useContext(Fr);if(!o)throw new Error("useEasyMode must be used within EasyModeProvider");return o}function bt({color:o="inherit",justifyContent:t="center"}){const{siteLocale:s}=de(),n=(r,E)=>s==="en"?E:r,d=r=>s==="en"?`/en${r}`:r;return e.jsxs(Vr,{direction:"row",spacing:2,justifyContent:t,useFlexGap:!0,flexWrap:"wrap",children:[e.jsx($e,{component:xt,to:d("/terms/"),underline:"hover",color:o,sx:{fontSize:13},children:n("å©ç¨è¦ç´","Terms of Service")}),e.jsx($e,{component:xt,to:d("/privacy/"),underline:"hover",color:o,sx:{fontSize:13},children:n("ãã©ã¤ãã·ã¼ããªã·ã¼","Privacy Policy")}),e.jsx($e,{component:xt,to:d("/legal/"),underline:"hover",color:o,sx:{fontSize:13},children:n("ç¹å®åå弿³ã«åºã¥ã表è¨","Notation based on the Act on Specified Commercial Transactions")}),e.jsx($e,{component:xt,to:d("/contact"),underline:"hover",color:o,sx:{fontSize:13},children:n("ãåãåããã»è§£ç´","Contact & Cancellation")})]})}const Lo={squidInk:"#232F3E",darkBlue:"#1B2631",accent:"#1DA1F2",accentHover:"#1A8CD8",lightGray:"#F5F7FA",borderGray:"#E0E4E8",textPrimary:"#1B2631",textSecondary:"#545B64",textMuted:"#879596",success:"#1D8102",successLight:"#E6F4EA",error:"#D13212",errorLight:"#FDE8E4",cardBg:"#FFFFFF",accentBlue:"#4DB8F5",orange:"#1DA1F2",onAccent:"#1B2631",orangeHover:"#1A8CD8"},Te=Lo,We=o=>(o==null?void 0:o.trim())||"",cn=We("NicheeLabï¼ä»£è¡¨ï¼åç°ç¥ç« ï¼"),dn=We("æ±äº¬é½æ¸è°·åºæµæ¯å¯¿è¥¿2ä¸ç®4çª8å·ã¦ã£ã³ãæµæ¯å¯¿ãã«8F"),Mo=We("NicheeLab (Representative: Hiroaki Yoshida)"),Oo=We("8F Wind Ebisu Building, 2-4-8 Ebisu-nishi, Shibuya-ku, Tokyo 150-0021, Japan"),Ft=We("[email protected]"),Bn=We("[email protected]"),qo={ja:"Kafkaè³æ ¼å¦ç¿",en:"Kafka Certification Exam Prep"},xn=We("https://buy.stripe.com/4gM8wP4yU5Kx11Vea51sQ05"),Wr=We("https://billing.stripe.com/p/login/4gM8wPc1m2ylfWPc1X1sQ00"),Cn=xn.length>0,No=Wr.length>0,un=We("https://buy.stripe.com/8x26oH2qM8WJcKDaXT1sQ0g"),Ve=un.length>0,ut={priceLabel:{ja:"90æ¥é Â¥1,980 è²·ãåãï¼èªåæ´æ°ãªãï¼",en:"Â¥1,980 one-time for 90 days (US$12.60 · no auto-renewal)"}};function Tr(o){if(!un)return"#";const t=new URL(un);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()}
1function wn(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()}const mt=[cn?null:{ja:"äºæ¥è
å",en:"Business name"},dn?null:{ja:"使",en:"Address"},Ft?null:{ja:"åãåããå
ã¡ã¼ã«ã¢ãã¬ã¹",en:"Contact email address"}].filter(o=>o!==null),Z={serviceName:qo,operatorName:{ja:cn||"è¦è¨å®",en:Mo||cn||"Not set"},businessAddress:{ja:dn||"è¦è¨å®",en:Oo||dn||"Not set"},contactEmail:Ft||"[email protected]",phoneNumber:{ja:We("è«æ±ããã£ãå ´åãé
æ»ãªãé示ãããã¾ãã")||"è«æ±ããã£ãå ´åãé
æ»ãªãé示ãã¾ãã",en:We(void 0)||"Disclosed without delay upon request."},priceDisplay:{ja:We("åä½ãã©ã³ æé¡980åï¼ç¨è¾¼ï¼ã¾ã㯠90æ¥é 1,980åï¼ç¨è¾¼ã»è²·ãåãã»èªåæ´æ°ãªãï¼ï¼å
¨è©¦é¨ãã㯠æé¡2,980åï¼ç¨è¾¼ï¼")||"Kafkaè³æ ¼: æé¡980åï¼ç¨è¾¼ï¼ã¾ã㯠90æ¥é 1,980åï¼ç¨è¾¼ã»è²·ãåãã»èªåæ´æ°ãªãï¼",en:We("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)")||"Kafka certification: 980 yen/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 ã¾ãã¯ã¢ããªå
ã®ããµãã¹ã¯ç®¡çããããã¤ã§ãè§£ç´ã§ãã¾ããè§£ç´å¾ã¯æ¬¡åæ´æ°æ¥ä»¥éã®èª²éã忢ãã¾ããè²·ãåããã©ã³ã¯èªåæ´æ°ããªããæéæºäºã§èªåçã«çµäºãã¾ãï¼è§£ç´æç¶ãã¯ä¸è¦ã§ãï¼ã",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."}
1,abuseContactEmail:{ja:Bn||Ft||"è¦è¨å®",en:Bn||Ft||"Not set"}},Hn={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."},Kn={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."},Mt={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)."},Ot={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."},Bo=[{ja:"æ¬ãµã¼ãã¹ã¯ Confluent Certified Developer for Apache Kafka (CCDAK) èªå®è©¦é¨å¯¾çã®ããã®å¦ç¿ãã©ãããã©ã¼ã ã§ãã",en:"This service is a learning platform for preparing for the Confluent Certified Developer for Apache Kafka (CCDAK) 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)."}],Ho=[{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"}],Ko=[{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"}],Uo=[{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)"}],Go=[{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"}}],$r=[{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:"Apache Kafka 㯠Apache Software Foundation ã®åæ¨ã§ããConfluent 㯠Confluent, Inc. ã®åæ¨ã§ãã",en:"Apache Kafka is a trademark of the Apache Software Foundation. Confluent is a trademark of Confluent, Inc."}],et=Te,Un={termsAccepted:!1,privacyAccepted:!1,autoRenewalAccepted:!1};function hn({open:o,onClose:t,onConfirm:s,loading:n=!1,error:d="",plan:r="monthly"}){const{siteLocale:E,buildPath:m}=de(),j=(y,g)=>E==="en"?g:y,[S,u]=l.useState(Un);l.useEffect(()=>{o&&u(Un)},[o]);const c=S.termsAccepted&&S.privacyAccepted&&S.autoRenewalAccepted,h=y=>{u(g=>({...g,[y]:!g[y]}))};return e.jsxs(Ie,{open:o,onClose:n?void 0:t,maxWidth:"sm",fullWidth:!0,children:[e.jsx(ot,{sx:{fontWeight:700,color:et.squidInk},children:j("ææãã©ã³ç³è¾¼ã¿åã®ã確èª","Before you subscribe")}),e.jsxs(Se,{children:[e.jsx(a,{variant:"body2",sx:{color:et.textSecondary,mb:2},children:j("ãç³è¾¼ã¿åã«ã以ä¸ã®åæäºé
ãã確èªãã ããã","Please review and agree to the following before continuing.")}),e.jsx(Oe,{severity:"info",sx:{mb:2},children:r==="buyout"?j(Kn.ja,Kn.en):j(Hn.ja,Hn.en)}
1),E==="en"&&e.jsx(a,{variant:"caption",sx:{display:"block",color:"#5C6B73",mb:2},children:Nr}),e.jsxs(rr,{children:[e.jsx(ht,{control:e.jsx(Qe,{checked:S.termsAccepted,onChange:()=>h("termsAccepted")}),label:e.jsxs(a,{variant:"body2",children:[e.jsx($e,{component:xt,to:m("/kafka-exam/terms"),underline:"hover",target:"_blank",rel:"noreferrer",children:j("å©ç¨è¦ç´","Terms of Service")}),j("ã«åæãã","I agree to")]})}),e.jsx(ht,{control:e.jsx(Qe,{checked:S.privacyAccepted,onChange:()=>h("privacyAccepted")}),label:e.jsxs(a,{variant:"body2",children:[e.jsx($e,{component:xt,to:m("/kafka-exam/privacy"),underline:"hover",target:"_blank",rel:"noreferrer",children:j("ãã©ã¤ãã·ã¼ããªã·ã¼","Privacy Policy")}),j("ã«åæãã","I agree to")]})}),e.jsx(ht,{control:e.jsx(Qe,{checked:S.autoRenewalAccepted,onChange:()=>h("autoRenewalAccepted")}),label:e.jsx(a,{variant:"body2",children:r==="buyout"?j("90æ¥éã®è²·ãåãï¼èªåæ´æ°ãªãã»æéæºäºã§çµäºï¼ã§ãããã¨ã確èªãã","I understand this is a one-time 90-day plan (no auto-renewal; access ends when the period expires)"):j("æé¡èª²éã®èªåæ´æ°ã«åæãã","I agree to monthly auto-renewal")})})]}),e.jsx(a,{variant:"caption",sx:{display:"block",mt:1.5,color:et.textMuted},children:j(`åæè¨é²ãã¼ã¸ã§ã³: ${$t}`,`Consent record version: ${$t}`)}),e.jsx(Oe,{severity:"warning",sx:{mt:2,"& .MuiAlert-message":{fontSize:12}},children:j("決æ¸ã«ã¯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(Oe,{severity:"error",sx:{mt:2},children:d})]}),e.jsxs(Ce,{sx:{px:3,pb:2},children:[e.jsx(v,{onClick:t,disabled:n,sx:{color:et.textSecondary},children:j("ãã£ã³ã»ã«","Cancel")}),e.jsx(v,{variant:"contained",onClick:()=>s(S),disabled:n||!c,sx:{bgcolor:et.orange,color:et.squidInk,fontWeight:700,"&:hover":{bgcolor:et.orangeHover}},children:j("åæã㦠Stripe ã«é²ã","Agree and continue to Stripe")})]})]})}const me=Te;function Xe({open:o,onClose:t}){const s=ge(),{siteLocale:n}=de(),d=n==="en",r=(k,M)=>d?M:k,{isLoggedIn:E,user:m}=Pe(),[j,S]=l.useState(!1),[u,c]=l.useState("monthly"),[h,y]=l.useState(!1),[g,C]=l.useState(""),f=async k=>{C("");const M=u==="buyout";if(M?!Ve:!Cn){C(r("Stripe ã®èª²éãªã³ã¯ãæªè¨å®ã§ããç°å¢å¤æ°ã確èªãã¦ãã ããã","The Stripe billing link is not configured. Check the environment variables."));return}const I=Xn();try{y(!0),E&&await Ar({consentVersion:$t,context:"checkout",termsAccepted:k.termsAccepted,privacyAccepted:k.privacyAccepted,autoRenewalAccepted:M?!1:k.autoRenewalAccepted});try{localStorage.setItem("checkout_return_to",window.location.pathname+window.location.search)}catch{}I.open((M?Tr:wn)(m)),S(!1),t()}catch(P){I.cancel(),C(P.message||r("åæå
容ã®ä¿åã«å¤±æãã¾ãã","Failed to save your consent"))}finally{y(!1)}};return E?e.jsxs(Ie,{scroll:"body",open:o,onClose:t,maxWidth:"sm",fullWidth:!0,children:[e.jsx(ot,{sx:{fontWeight:700,color:me.squidInk},children:r("ææãã©ã³ã§å
¨åé¡ãè§£æ¾","Unlock all problems with the paid plan")}),e.jsxs(Se,{children:[e.jsx(a,{variant:"body2",sx:{color:me.textSecondary,mb:2},children:r(`ç¾å¨ã®ãã©ã³ã§ã¯ç·´ç¿ã»ãã 1ã${Rt} ã¨æ¨¡æ¬è©¦é¨ ${_t} ååããå©ç¨ããã ãã¾ããææãã©ã³ï¼æé¡980åï¼ã«ãå å
¥ããã ãã¨ï¼`,`Your current plan includes practice sets 1-${Rt} 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:[r("å
¨åé¡ã«ãã«ã¢ã¯ã»ã¹","Full access to all problems"),r("æ¬çªå½¢å¼ã®æ¨¡æ¬è©¦é¨ãè§£ãæ¾é¡","Unlimited real-format mock exams"),r("å
¨åConfluent/Apache Kafkaå
¬å¼ããã¥ã¡ã³ãæºæ ã®è©³ç´°è§£èª¬ä»ã","Every question has a detailed explanation based on the official Confluent / Apache Kafka documentation"),r("ãã¹ã¦ã®ã«ãã´ãªã¼ã»è©¦é¨ãã¡ã¤ã³ãç¶²ç¾
","Covers all categories and exam domains")].map((k,M)=>
1e.jsxs(i,{sx:{display:"flex",alignItems:"flex-start",gap:1},children:[e.jsx(Me,{sx:{color:me.orange,fontSize:18,mt:.2}}),e.jsx(a,{variant:"body2",sx:{color:me.textPrimary},children:k})]},M))})]}),e.jsxs(Ce,{sx:{px:3,pb:2},children:[e.jsx(v,{onClick:t,sx:{color:me.textSecondary},children:r("éãã","Close")}),e.jsx(v,{variant:"contained",onClick:()=>{C(""),c("monthly"),S(!0)},sx:{bgcolor:me.orange,color:me.squidInk,fontWeight:700,"&:hover":{bgcolor:me.orangeHover}},children:r("ææãã©ã³ã«ç³ãè¾¼ã","Get the paid plan")}),Ve&&e.jsx(v,{variant:"outlined",onClick:()=>{C(""),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:r(ut.priceLabel.ja,ut.priceLabel.en)})]}),e.jsx(hn,{open:j,onClose:()=>{h||(S(!1),C(""))},plan:u,onConfirm:f,loading:h,error:g})]}):e.jsxs(Ie,{scroll:"body",open:o,onClose:t,maxWidth:"sm",fullWidth:!0,children:[e.jsx(ot,{sx:{fontWeight:700,color:me.squidInk},children:r("Kafka ææãã©ã³ã§å
¨åé¡ãè§£æ¾","Unlock every question with Kafka Pro")}),e.jsxs(Se,{children:[e.jsx(a,{variant:"body2",sx:{color:me.textSecondary,mb:2},children:r("æé¡980åï¼ç¨è¾¼ï¼ã§ Kafka Developer + Administrator + Streams ã®åé¡ï¼æ¨¡æ¬è©¦é¨ã«ãã«ã¢ã¯ã»ã¹ã§ãã¾ãã","Â¥980/month (US$6.20) (tax incl.) for full access to Kafka Developer, Administrator, and Streams questions and mock exams.")}),e.jsx(i,{sx:{display:"flex",flexDirection:"column",gap:1},children:[r("å
¨åé¡ã«ãã«ã¢ã¯ã»ã¹ï¼ç·´ç¿ï¼æ¬çªå½¢å¼ã®æ¨¡æ¬è©¦é¨ï¼","Full access to all problems (practice + real-format mocks)"),r("å
¨åå
¬å¼ããã¥ã¡ã³ãæºæ ã®è©³ç´°è§£èª¬ä»ã","Every question has a detailed explanation aligned with official docs"),r("ã«ãã´ãªå¥ã®å¼±ç¹åæã»é²æç®¡ç","Weakness analysis & progress tracking by category"),r("決æ¸å¾ãã¡ã¼ã«ã§å±ããªã³ã¯ãããã¹ã¯ã¼ããè¨å® â ãã®ã¾ã¾ãã°ã¤ã³","After payment, set a password from the email link â log in immediately")].map((k,M)=>e.jsxs(i,{sx:{display:"flex",alignItems:"flex-start",gap:1},children:[e.jsx(Me,{sx:{color:me.orange,fontSize:18,mt:.2}}),e.jsx(a,{variant:"body2",sx:{color:me.textPrimary},children:k})]},M))}),g&&e.jsx(a,{variant:"caption",sx:{color:"error.main",display:"block",mt:1.5},children:g})]}),e.jsxs(Ce,{sx:{px:3,pb:1,flexDirection:"column",alignItems:"stretch",gap:1},children:[e.jsx(v,{variant:"contained",onClick:()=>{C(""),c("monthly"),S(!0)},sx:{bgcolor:me.orange,color:me.squidInk,fontWeight:700,"&:hover":{bgcolor:me.orangeHover}},children:r("ææãã©ã³ã«ç³ãè¾¼ãï¼æé¡Â¥980ï¼","Get the paid plan (Â¥980/mo, US$6.20)")}),Ve&&e.jsx(v,{variant:"outlined",onClick:()=>{C(""),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:r(ut.priceLabel.ja,ut.priceLabel.en)}),e.jsx(v,{onClick:t,sx:{color:me.textSecondary},children:r("ãã¨ã§","Later")})]}),e.jsx(i,{sx:{px:3,pb:2,textAlign:"center"},children:e.jsxs(a,{variant:"caption",sx:{color:me.textSecondary},children:[r("æ¢ã«ã¢ã«ã¦ã³ãããæã¡ã®æ¹ã¯","Already have an account? ")," ",e.jsx(i,{component:"span",role:"button",onClick:()=>{t(),s("/kafka-exam/login")},sx:{color:me.orange,cursor:"pointer",fontWeight:600,textDecoration:"underline"},children:r("ãã°ã¤ã³","Log in")})]})}),e.jsx(hn,{open:j,onClose:()=>{h||(S(!1),C(""))},plan:u,onConfirm:f,loading:h,error:g})]})}const z=Te;function Yo(){const o=ge(),{siteLocale:t}=de(),s=t==="en",n=(c,h)=>s?h:c,[d,r]=l.useState(!1),[E,m]=l.useState(0),j=[{image:"/images/kafka/confluent-developer-badge.png",title:n("CCDAK 対ç","CCDAK Prep"),subtitle:"Confluent Certified Developer",desc:n("Kafka Producer/Consumerã»Streamsã»Connectã»Schema Registryã»ksqlDB","Kafka Producer/Consumer, Streams, Connect, Schema Registry, ksqlDB"),bg:`linear-gradient(135deg, #1DA1F2 0%, ${z.squidInk} 100%)`}],S=l.useCallback(()=>m(c=>(c+1)%j.length),[j.length]);l.useEffect(()=>{const c=setInterval(S,4500);return()=>clearInterval(c)},[S]);const u=j[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(Fe,{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:z.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(v,{variant:"contained",size:"large",onClick:()=>o("/kafka-exam/select"),sx:{bgcolor:z.orange,color:z.onAccent,fontWeight:700,py:1.5,px:4,fontSize:"1rem","&:hover":{bgcolor:z.orangeHover}},children:n("ä»ããç¡æã§è©¦ã","Start free now")}),e.jsx(v,{variant:"outlined",size:"large",onClick:()=>o("/kafka-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:n("ãã°ã¤ã³","Log in")}),e.jsx(v,{size:"large",onClick:()=>o("/kafka-exam/select"),sx:{color:z.orange,fontWeight:600},endIcon:e.jsx(nt,{}),children:n("試é¨ã鏿ãã","Choose an exam")})]})]})]}),e.jsx(i,{sx:{display:"flex",justifyContent:"center",gap:1,mt:3},children:j.map((c,h)=>e.jsx(i,{onClick:()=>m(h),sx:{width:h===E?28:10,height:10,borderRadius:5,bgcolor:h===E?z.orange:"rgba(255,255,255,0.4)",cursor:"pointer",transition:"all 0.3s"}},h))})]})}),e.jsx(i,{sx:{bgcolor:z.squidInk,py:{xs:3,md:4}},children:e.jsx(Fe,{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:n("900å","900 Qs"),label:n("å
¬éå顿°","Total questions"),sub:n("ç·´ç¿ + 模æ¬è©¦é¨","Practice + mock exams")},{value:n("3è³æ ¼","3 certs"),label:n("対å¿è©¦é¨","Supported exams"),sub:"CCDAK + CCSD + CCAAK"},{value:n("æ¥è±å¯¾å¿","JA & EN"),label:n("åºé¡ã»è§£èª¬è¨èª","Question & answer language"),sub:n("English / æ¥æ¬èª","English / æ¥æ¬èª")},{value:"100%",label:n("解説ã«ãã¼ç","Explanation coverage"),sub:n("å
¨å詳細解説ä»ã","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:z.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:z.lightGray},children:e.jsxs(Fe,{maxWidth:"lg",children:[e.jsx(a,{variant:"h4",sx:{textAlign:"center",fontWeight:800,color:z.squidInk,mb:1,fontSize:{xs:"1.4rem",md:"2rem"}},children:n("é¸ã°ããçç±","Why Nicheelab")}),e.jsx(a,{sx:{textAlign:"center",color:z.textSecondary,mb:4},children:n("Confluentå
¬å¼è©¦é¨ã¬ã¤ãã«æºæ ããåé¡ã§åæ ¼ãç®æãã¾ã","Pass with questions aligned to Confluent'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(or,{sx:{fontSize:44,color:z.orange}}
1),title:n("CCDAK 対å¿","CCDAK covered"),desc:n("Confluent Certified Developer 試é¨ç¯å²ãå®å
¨ã«ãã¼","Full coverage of the Confluent Certified Developer exam scope")},{icon:e.jsx(pn,{sx:{fontSize:44,color:z.orange}}),title:n("æ¥æ¬èªã»è±èªã®åé¡ã¨è©³ç´°è§£èª¬","Bilingual questions & detailed explanations"),desc:n("æ¥æ¬èªã»è±èªã§åºé¡ãConfluent/Apache Kafkaå
¬å¼ããã¥ã¡ã³ãã«åºã¥ã900å","900 questions in Japanese and English, grounded in the official Confluent/Apache Kafka documentation")},{icon:e.jsx(Xr,{sx:{fontSize:44,color:z.orange}}),title:n("ã¹ããæéã§å¹çå¦ç¿","Study in your spare time"),desc:n("1åãã¤å³åº§ã«è§£èª¬ã確èªãéå¤ä¸ã伿©æéã«5åããå¦ç¿","See the explanation right after each question â study from 5 minutes during commutes or breaks")},{icon:e.jsx(gn,{sx:{fontSize:44,color:z.orange}}),title:n("æ£è§£çãã©ããã³ã°","Accuracy tracking"),desc:n("ã«ãã´ãªã¼ãã¨ã®æ£è§£çãèªåè¨é²ãå¼±ç¹ãã°ã©ãã§å¯è¦å","Automatically tracks accuracy per category and visualizes weak areas in charts")},{icon:e.jsx(Zr,{sx:{fontSize:44,color:z.orange}}),title:n("ãã«ãããã¤ã¹å¯¾å¿","Multi-device ready"),desc:n("PCã»ã¿ãã¬ããã»ã¹ããã©ã®ç«¯æ«ã§ãæé©ãªç»é¢ã§å¦ç¿","Optimized layout for desktop, tablet, and mobile")},{icon:e.jsx(qt,{sx:{fontSize:44,color:z.orange}}),title:n("å
¬å¼ããã¥ã¡ã³ãæºæ ","Aligned with official docs"),desc:n("解説ã¯Confluent/Apache Kafkaå
¬å¼ããã¥ã¡ã³ãã«åºã¥ã使","Explanations built from the official Confluent/Apache Kafka documentation")}].map((c,h)=>e.jsxs(J,{elevation:0,sx:{p:3,borderRadius:2,border:`1px solid ${z.borderGray}`,bgcolor:z.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:z.squidInk,mb:.5,fontSize:{xs:16,md:18}},children:c.title}),e.jsx(a,{variant:"body2",sx:{color:z.textSecondary,lineHeight:1.7},children:c.desc})]},h))})]})}),e.jsx(Le,{}),e.jsx(i,{sx:{py:{xs:5,md:7},px:2,bgcolor:"#fff"},children:e.jsxs(Fe,{maxWidth:"lg",children:[e.jsx(a,{variant:"h4",sx:{textAlign:"center",fontWeight:800,color:z.squidInk,mb:4,fontSize:{xs:"1.4rem",md:"2rem"}},children:n("対å¿è©¦é¨","Supported exams")}),e.jsxs(i,{sx:{display:"flex",justifyContent:"center",gap:3,flexWrap:"wrap"},children:[e.jsxs(J,{elevation:0,onClick:()=>o("/kafka-exam/select"),sx:{p:2.5,borderRadius:3,border:"2px solid #1DA1F220",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",gap:.5,cursor:"pointer",transition:"all 0.2s","&:hover":{borderColor:"#1DA1F2",boxShadow:"0 4px 16px #1DA1F220"}},children:[e.jsx(i,{component:"img",loading:"lazy",decoding:"async",src:"/images/kafka/confluent-developer-badge.png",alt:"CCDAK",sx:{width:120,height:120,objectFit:"contain",mb:1}}),e.jsx(a,{variant:"body2",sx:{fontWeight:700,color:z.squidInk,lineHeight:1.3},children:"Confluent Certified Developer"}),e.jsx(a,{variant:"caption",sx:{color:z.textSecondary,fontSize:12},children:n("CCDAK | 900å","CCDAK | 900 Qs")})]}),e.jsxs(J,{elevation:0,onClick:()=>o("/kafka-exam/select"),sx:{p:2.5,borderRadius:3,border:"2px solid #1DA1F220",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",gap:.5,cursor:"pointer",transition:"all 0.2s","&:hover":{borderColor:"#1DA1F2",boxShadow:"0 4px 16px #1DA1F220"}},children:[e.jsx(i,{component:"img",loading:"lazy",decoding:"async",src:"/images/kafka-streams/kafka-streams-badge.png",alt:"CCSD",sx:{width:120,height:120,objectFit:"contain",mb:1}}),e.jsx(a,{variant:"body2",sx:{fontWeight:700,color:z.squidInk,lineHeight:1.3},children:"Confluent Kafka Streams Developer"}),e.jsx(a,{variant:"caption",sx:{color:z.textSecondary,fontSize:12},children:n("CCSD | 900å","CCSD | 900 Qs")})]}),e.jsxs(J,{elevation:0,onClick:()=>o("/kafka-exam/select"),sx:{p:2.5,borderRadius:3,border:"2px solid #1DA1F220",display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",gap:.5,cursor:"pointer",transition:"all 0.2s","&:hover":{borderColor:"#1DA1F2",boxShadow:"0 4px 16px #1DA1F220"}},children:[e.jsx(i,{component:"img",loading:"lazy",decoding:"async",src:"/images/kafka-admin/kafka-admin-badge.png",alt:"CCAAK",sx:{width:120,height:120,objectFit:"contain",mb:1}}),e.jsx(a,{variant:"body2",sx:{fontWeight:700,color:z.squidInk,lineHeight:1.3},children:"Confluent Kafka Administrator"}),e.jsx(a,{variant:"caption",sx:{color:z.textSecondary,fontSize:12},children:n("CCAAK | 900å","CCAAK | 900 Qs")})]})]})]})}),e.jsx(Le,{}),e.jsx(i,{sx:{py:{xs:5,md:7},px:2,bgcolor:"#fff"},children:e.jsxs(Fe,{maxWidth:"md",children:[e.jsx(a,{variant:"h4",sx:{textAlign:"center",fontWeight:800,color:z.squidInk,mb:4,fontSize:{xs:"1.4rem",md:"2rem"}},children:n("æéãã©ã³","Pricing")}),e.jsxs(i,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"1fr 1fr"},gap:3,maxWidth:600,mx:"auto"},children:[e.jsxs(J,{elevation:0,sx:{p:3,textAlign:"center",borderRadius:2,border:`1px solid ${z.borderGray}`},children:[e.jsx(a,{variant:"h6",sx:{color:z.squidInk,fontWeight:700},children:n("ç¡æã§è©¦ã","Try for free")}),e.jsx(a,{variant:"h3",sx:{fontWeight:800,my:1.5,color:z.squidInk},children:"Â¥0"}),e.jsx(a,{variant:"body2",sx:{color:z.textSecondary,mb:2},children:n("å
¬éåé¡ã§å¦ç¿ãä½é¨","Sample the public problems")}),e.jsx(v,{variant:"outlined",fullWidth:!0,size:"large",onClick:()=>o("/kafka-exam/select"),sx:{borderColor:z.squidInk,color:z.squidInk,fontWeight:600,"&:hover":{bgcolor:z.lightGray}},children:n("ã²ã¹ãã§è©¦ã","Try as guest")})]}),e.jsxs(J,{elevation:2,sx:{p:3,textAlign:"center",borderRadius:2,border:`2px solid ${z.orange}`,position:"relative",overflow:"visible"},children:[e.jsxs(i,{sx:{position:"absolute",top:-14,left:"50%",transform:"translateX(-50%)",bgcolor:z.orange,color:z.onAccent,px:2,py:.4,borderRadius:1,fontSize:13,fontWeight:700,display:"flex",alignItems:"center",gap:.5,whiteSpace:"nowrap"},children:[e.jsx(sr,{sx:{fontSize:16}})," ",n("ãããã","Recommended")]}),e.jsx(a,{variant:"h6",sx:{color:z.squidInk,fontWeight:700,mt:1},children:n("ææãã©ã³","Paid Plan")}),e.jsxs(a,{variant:"h3",sx:{fontWeight:800,my:1,color:z.orange},children:["Â¥980",e.jsx(a,{component:"span",variant:"body2",sx:{color:z.textMuted},children:n("/æ","/mo · US$6.20")})]}),e.jsx(a,{variant:"body2",sx:{color:z.textSecondary,mb:2},children:n("Kafkaå
¨åé¡ï¼æ¨¡æ¬è©¦é¨ã«ãã«ã¢ã¯ã»ã¹","Full access to all Kafka practice + mock exams")}),e.jsx(Xe,{open:d,onClose:()=>r(!1)}),e.jsx(v,{variant:"contained",fullWidth:!0,size:"large",onClick:()=>r(!0),disabled:!Cn,sx:{bgcolor:z.orange,color:z.onAccent,fontWeight:700,"&:hover":{bgcolor:z.orangeHover}},children:n("ææãã©ã³ã§å§ããï¼æé¡Â¥980ï¼","Get the paid plan (Â¥980/mo, US$6.20)")}),Ve&&e.jsx(v,{variant:"outlined",fullWidth:!0,size:"large",onClick:()=>r(!0),sx:{mt:1,color:z.orange,borderColor:z.orange,fontWeight:700,"&:hover":{borderColor:z.orangeHover,bgcolor:"rgba(0,0,0,0.03)"}},children:n("90æ¥é Â¥1,980 è²·ãåãã§å§ããï¼èªåæ´æ°ãªãï¼","Start with a one-time 90-day plan (Â¥1,980 · US$12.60 · no auto-renewal)")}
1),Ve&&e.jsxs(a,{variant:"caption",sx:{display:"block",mt:1.5,color:z.textSecondary,lineHeight:1.6},children:[n(Mt.ja,Mt.en)," ",n(Ot.ja,Ot.en)]})]})]})]})}),e.jsx(Le,{}),e.jsx(i,{sx:{py:{xs:5,md:7},px:2,bgcolor:"#fff"},children:e.jsxs(Fe,{maxWidth:"lg",children:[e.jsx(a,{variant:"h4",sx:{textAlign:"center",fontWeight:800,color:z.squidInk,mb:1,fontSize:{xs:"1.4rem",md:"2rem"}},children:n("Kafkaè³æ ¼ã®å¦ç¿ã¬ã¤ã","Kafka Certification Study Guide")}),e.jsx(a,{sx:{textAlign:"center",color:z.textSecondary,mb:4,fontSize:{xs:14,md:16}},children:n("試é¨å¯¾çã«å½¹ç«ã¤è¨äºãå
¬éä¸","Articles to support your exam prep")}),e.jsx(i,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"1fr 1fr",md:"1fr 1fr 1fr"},gap:2},children:[{title:n("è³æ ¼å
¨ä½å","Certification Overview"),desc:n("CCDAKã»CCAAKã®ä½ç½®ä»ãã¨é¸ã³æ¹","Where CCDAK & CCAAK fit and how to choose"),to:"/articles/kafka/certifications/"},{title:n("CCDAK試é¨ã¬ã¤ã","CCDAK Exam Guide"),desc:n("åºé¡ç¯å²ã»é
ç¹ã»ç³è¾¼ã¿ã»å¯¾ç","Scope, weighting, registration, prep"),to:"/articles/kafka/ccdak-exam/"},{title:n("CCAAK試é¨ã¬ã¤ã","CCAAK Exam Guide"),desc:n("éç¨è¦³ç¹ã®åºé¡ã¨å¯¾ç","Operations-focused questions and prep"),to:"/articles/kafka/ccaak-exam/"},{title:n("é£æåº¦æ¯è¼","Difficulty Comparison"),desc:n("CCDAK/CCAAKã®å¦ç¿æéã¨é£ãã","Study time and difficulty: CCDAK vs CCAAK"),to:"/articles/kafka/difficulty/"},{title:n("åå¼·æ¹æ³ã¬ã¤ã","Study Strategy Guide"),desc:n("å
¬å¼ããã¥ã¡ã³ãã»æ¼ç¿ã®é²ãæ¹","How to use official docs and exercises"),to:"/articles/kafka/study-guide/"},{title:n("åé¡ä¾","Sample Questions"),desc:n("主è¦ãã¡ã¤ã³å¥ã®ãµã³ãã«åé¡","Sample questions by major domain"),to:"/articles/kafka/sample-questions/"},{title:n("å鍿ã¬ã¤ã","Exam Cost Guide"),desc:n("è²»ç¨ã»ãã¦ãã£ã¼ã»ååé¨è¦å","Fees, vouchers, retake rules"),to:"/articles/kafka/exam-cost/"},{title:n("åæ ¼ä½é¨è¨","Pass Stories"),desc:n("彿¥ã®æµãã»ãã¼ã«ã»æ³¨æç¹","Test-day flow, tools, gotchas"),to:"/articles/kafka/exam-experience/"},{title:n("Confluent Cloud ç¡ææ ","Confluent Cloud Free Tier"),desc:n("å¦ç¿ç¨ã¯ã©ã¹ã¿æ§ç¯ã¨å®æ©æ¼ç¿","Spinning up a learning cluster and hands-on"),to:"/articles/kafka/free-trial/"},{title:n("ãã£ãªã¢ä¾¡å¤","Career Value"),desc:n("ã¹ããªã¼ãã³ã°é åã®å¸å ´ä¾¡å¤","Market value in the streaming space"),to:"/articles/kafka/career/"},{title:n("Topic 㨠Partition","Topics & Partitions"),desc:n("忣ã¨ã¹ã±ã¼ã©ããªãã£ã®è¦","Core of distribution and scalability"),to:"/articles/kafka/topics-partitions/"},{title:n("Replica 㨠ISR","Replicas & ISR"),desc:n("èé害æ§ã»ä¸è²«æ§ã®è¨è¨","Fault tolerance and consistency design"),to:"/articles/kafka/replicas-isr/"},{title:"Consumer Groups",desc:n("並åå¦çã»ã°ã«ã¼ã調æ´","Parallelism and group coordination"),to:"/articles/kafka/consumer-groups/"},{title:n("acks è¨å®","acks setting"),desc:n("èä¹
æ§ vs ã¬ã¤ãã³ã·ã®ãã¬ã¼ããªã","Durability vs latency trade-off"),to:"/articles/kafka/acks-config/"}
1,{title:"Idempotent Producer",desc:n("éè¤æé¤ã®ä»çµã¿","Deduplication mechanics"),to:"/articles/kafka/idempotent-producer/"},{title:"Exactly-Once",desc:n("EOS ã®ä¿è¨¼ç¯å²ã¨æ¡ä»¶","EOS guarantees: scope and conditions"),to:"/articles/kafka/exactly-once/"},{title:"Schema Registry",desc:n("ã¹ãã¼ãé²åã¨äºææ§","Schema evolution and compatibility"),to:"/articles/kafka/schema-registry/"},{title:n("Avro ã¹ãã¼ã","Avro Schemas"),desc:n("ãã£ã¼ã«ãé²åã»ããã©ã«ãå¤","Field evolution and defaults"),to:"/articles/kafka/avro-schemas/"},{title:"Kafka Connect",desc:n("Source/Sinkã»åæ£ã¢ã¼ã","Source/Sink, distributed mode"),to:"/articles/kafka/kafka-connect/"},{title:"Kafka Streams",desc:n("KStream/KTableã®ä½¿ãåã","When to use KStream vs KTable"),to:"/articles/kafka/kafka-streams/"},{title:"ksqlDB",desc:n("SQLã©ã¤ã¯ãªã¹ããªã¼ã å¦ç","SQL-like stream processing"),to:"/articles/kafka/ksqldb/"},{title:n("å§ç¸®ã¿ã¤ãæ¯è¼","Compression Comparison"),desc:"gzip/snappy/lz4/zstd",to:"/articles/kafka/compression/"},{title:n("ç£è¦ã»ã¡ããªã¯ã¹","Monitoring & Metrics"),desc:n("JMXã»ããã¼ã«ã¼è¦³æ¸¬ãã¤ã³ã","JMX and broker observation points"),to:"/articles/kafka/monitoring/"},{title:"Partition Assignor",desc:"Range/RoundRobin/Sticky",to:"/articles/kafka/partition-assignment/"}].map((c,h)=>e.jsxs(J,{onClick:()=>o(c.to),elevation:0,sx:{p:2.5,cursor:"pointer",borderRadius:2,border:`1px solid ${z.borderGray}`,transition:"box-shadow 0.2s, transform 0.2s","&:hover":{boxShadow:"0 4px 16px rgba(0,0,0,0.08)",transform:"translateY(-2px)"}},children:[e.jsx(a,{sx:{fontWeight:700,color:z.squidInk,fontSize:15,mb:.5},children:c.title}),e.jsx(a,{variant:"body2",sx:{color:z.textSecondary,fontSize:13},children:c.desc})]},h))})]})}),e.jsx(bo,{app:Jr("kafka-exam")}),e.jsx(Le,{}),e.jsx(i,{sx:{py:{xs:5,md:6},px:2,bgcolor:z.squidInk,textAlign:"center"},children:e.jsxs(Fe,{maxWidth:"sm",children:[e.jsx(a,{variant:"h5",sx:{fontWeight:800,color:"#fff",mb:1,fontSize:{xs:"1.2rem",md:"1.5rem"}},children:n("ä»ããå¦ç¿ãå§ãã¾ããã","Start studying now")}),e.jsx(a,{sx:{color:"rgba(255,255,255,0.7)",mb:3},children:n("æ¥æ¬èªã§å¦ã¹ãKafkaè³æ ¼å¦ç¿ãµã¤ãã§ãåæ ¼ãç®æãã¾ããã","Pass your Kafka certifications with bilingual study resources")}),e.jsx(v,{variant:"contained",size:"large",onClick:()=>o("/kafka-exam/select"),endIcon:e.jsx(nt,{}),sx:{bgcolor:z.orange,color:z.onAccent,fontWeight:700,py:1.5,px:4,"&:hover":{bgcolor:z.orangeHover}},children:n("試é¨ã鏿ãã¦å¦ç¿ãã","Choose an exam and study")})]})}),e.jsxs(i,{sx:{bgcolor:z.darkBlue,py:2,px:2,textAlign:"center"},children:[e.jsx(i,{sx:{mb:1.5},children:e.jsx(bt,{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. | ",n("Apache Kafka 㯠Apache Software Foundation ã®åæ¨ã§ããConfluent 㯠Confluent, Inc. ã®åæ¨ã§ãã","Apache Kafka is a trademark of the Apache Software Foundation. Confluent is a trademark of Confluent, Inc.")]})]})]})}const ue=Te,Jo=[{type:"ccdak",img:"/images/kafka/confluent-developer-badge.png",name:"Certified Developer",sub:"CCDAK",borderColor:"#1DA1F2",category:"Developer"},{type:"ccsd",img:"/images/kafka-streams/kafka-streams-badge.png",name:"Kafka Streams Developer",sub:"CCSD",borderColor:"#1DA1F2",category:"Streams",noCert:{ja:"Confluent 㯠Kafka Streams åç¬ã®èªå®è³æ ¼ãæä¾ãã¦ãã¾ãããå¦ç¿ç¨ã®ææã§ãã",en:"Confluent does not offer a standalone Kafka Streams certification. This is study material."}},{type:"ccaak",img:"/images/kafka-admin/kafka-admin-badge.png",name:"Kafka Administrator",sub:"CCAAK",borderColor:"#1DA1F2",category:"Administrator"}];function Qo(){const o=ge(),{siteLocale:t}=de(),s=t==="en",n=(I,P)=>s?P:I,[d,r]=Qn(),{user:E,isLoggedIn:m,loading:j,logout:S,refreshSubscription:u}=Pe(),{setExamType:c}=_e(),[h,y]=l.useState(!1),[g,C]=l.useState(!1);l.useEffect(()=>{j||d.get("registered")==="true"&&m&&(C(!0),r({},{replace:!0}))},[j,m,d,r]),l.useEffect(()=>{if(j||d.get("payment")!=="success")return;if(!m){o("/kafka-exam/login?from=payment");return}y(!0),r({},{replace:!0});let I=!1;return(async()=>{for(let P=0;P<15;P++){if(I)return;await u(),await new Promise(b=>setTimeout(b,3e3))}})(),()=>{I=!0}},[j,m]);const f=I=>{c(I.type),o("/kafka-exam/menu")},k=()=>{S(),o("/kafka-exam/")},M=["Developer","Streams","Administrator"];return e.jsxs(i,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",bgcolor:ue.lightGray},children:[e.jsxs(Ie,{open:h,onClose:()=>y(!1),maxWidth:"sm",fullWidth:!0,children:[e.jsxs(Se,{sx:{textAlign:"center",pt:4,pb:2},children:[e.jsxs(i,{sx:{display:"flex",justifyContent:"center",gap:1,mb:2},children:[e.jsx(_n,{sx:{fontSize:48,color:ue.orange}}),e.jsx(eo,{sx:{fontSize:48,color:"#1D8102"}})]}),e.jsx(a,{variant:"h5",sx:{fontWeight:800,color:ue.squidInk,mb:1},children:n("ææãã©ã³ãæå¹ã«ãªãã¾ãã!","Paid plan activated!")}),e.jsx(a,{variant:"body1",sx:{color:ue.textSecondary,mb:2},children:n("ãã¹ã¦ã®æ©è½ãããã¯è§£é¤ããã¾ãã","All features unlocked")}),e.jsx(i,{sx:{display:"flex",flexDirection:"column",gap:1,textAlign:"left",bgcolor:ue.lightGray,borderRadius:2,p:2,mx:"auto",maxWidth:360},children:[n("å
¨åé¡ã«ãã«ã¢ã¯ã»ã¹","Full access to every question"),n("Confluent Certified Developer å
¨1è³æ ¼å¯¾å¿","Covers 1 certification: Confluent Certified Developer"),n("å
¨åé¡ã«è§£èª¬ä»ã","An explanation for every question"),n("ã«ãã´ãªã¼å¥å¼±ç¹åæ","Weak-area analysis by category")].map((I,P)=>e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(Me,{sx:{color:"#1D8102",fontSize:20}}),e.jsx(a,{variant:"body2",sx:{color:ue.squidInk,fontWeight:500},children:I})]},P))})]}),e.jsx(Ce,{sx:{justifyContent:"center",pb:3},children:e.jsx(v,{variant:"contained",size:"large",onClick:()=>y(!1),sx:{bgcolor:ue.orange,color:ue.onAccent,fontWeight:700,px:5,"&:hover":{bgcolor:ue.orangeHover}}
1,children:n("ãã£ããå¦ç¿ãå§ãã","Start studying now")})})]}),e.jsx(Ie,{open:g,onClose:()=>C(!1),maxWidth:"sm",fullWidth:!0,children:e.jsxs(Se,{sx:{textAlign:"center",pt:4,pb:2},children:[e.jsx(_n,{sx:{fontSize:56,color:ue.orange,mb:1}}),e.jsx(a,{variant:"h5",sx:{fontWeight:800,color:ue.squidInk,mb:1},children:n("ä¼å¡ç»é²ãå®äºãã¾ããï¼","Welcome! Your account is ready.")}),e.jsx(a,{variant:"body1",sx:{color:ue.textSecondary,mb:3},children:n("NicheeLab ã¸ãããããã¾ãã¯ç¡æã§åé¡ãè§£ãã¦ã¿ã¾ãããã","Welcome to NicheeLab. Try free problems to get started.")}),e.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:1.5,maxWidth:400,mx:"auto"},children:[e.jsx(v,{variant:"contained",size:"large",fullWidth:!0,startIcon:e.jsx(sr,{}),onClick:()=>{C(!1),window.open(wn(E),"_blank")},sx:{bgcolor:ue.orange,color:ue.onAccent,fontWeight:700,py:1.5,"&:hover":{bgcolor:ue.orangeHover}},children:n("ææãã©ã³ã«ç³ãè¾¼ãï¼Â¥980/æï¼","Get the paid plan (Â¥980/mo, US$6.20)")}),e.jsx(a,{variant:"caption",sx:{color:ue.textMuted},children:e.jsx(e.Fragment,{children:n("Â¥980/æãã¾ã㯠90æ¥é Â¥1,980 è²·ãåãï¼èªåæ´æ°ãªãï¼","Â¥980/mo (US$6.20), or Â¥1,980 one-time for 90 days (no auto-renewal)")})}),e.jsx(v,{variant:"outlined",size:"large",fullWidth:!0,startIcon:e.jsx(or,{}),onClick:()=>C(!1),sx:{borderColor:ue.squidInk,color:ue.squidInk,fontWeight:600,py:1.5},children:n("ã¾ãã¯ç¡æã§è©¦ãã¦ã¿ã","Try free first")})]})]})}),e.jsxs(i,{sx:{bgcolor:ue.squidInk,px:2,pt:{xs:1.5,md:2},pb:{xs:2,md:3}},children:[e.jsx(i,{sx:{display:"flex",justifyContent:"flex-end",mb:{xs:.5,md:1},gap:1},children:m?e.jsx(v,{size:"small",startIcon:e.jsx(ar,{fontSize:"small"}),onClick:k,sx:{color:"rgba(255,255,255,0.85)",textTransform:"none",fontWeight:600},children:n("ãã°ã¢ã¦ã","Log out")}):e.jsxs(e.Fragment,{children:[e.jsx(v,{size:"small",variant:"outlined",onClick:()=>o("/kafka-exam/login"),sx:{color:"#fff",borderColor:"rgba(255,255,255,0.5)",textTransform:"none"},children:n("ãã°ã¤ã³","Log in")}),e.jsx(v,{size:"small",variant:"contained",onClick:()=>o("/kafka-exam/register"),sx:{bgcolor:ue.orange,textTransform:"none","&:hover":{bgcolor:ue.orangeHover}},children:n("æ°è¦ç»é²","Sign up")})]})}),e.jsxs(i,{sx:{textAlign:"center"},children:[e.jsx(a,{sx:{color:"#fff",fontWeight:700,fontSize:{xs:"1.15rem",sm:"1.35rem",md:"1.5rem"}},children:n("Kafka 試é¨ã鏿","Choose a Kafka exam")}),m&&E?e.jsxs(a,{variant:"body2",sx:{color:"rgba(255,255,255,0.7)",mt:.5},children:[E.email," | ",E.plan==="premium"?n("ææãã©ã³","Paid plan"):n("ç¡æãã©ã³","Free plan")]}):e.jsx(a,{variant:"body2",sx:{color:ue.orange,mt:.5},children:n("ã²ã¹ãã¢ã¼ã","Guest mode")})]})]}),e.jsx(Fe,{maxWidth:"lg",sx:{flex:1,py:4},children:M.map(I=>{const P=Jo.filter(b=>b.category===I);return P.length?e.jsxs(i,{sx:{mb:4},children:[e.jsx(Ne,{label:I,sx:{mb:2,bgcolor:I==="Advanced"?"#1B4B8F":I==="Specialty"?"#56CCF2":"#29B5E8",color:"#fff",fontWeight:700}}),e.jsx(i,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"1fr 1fr",md:"1fr 1fr 1fr"},gap:2},children:P.map(b=>e.jsxs(J,{role:"button",tabIndex:0,onClick:()=>f(b),onKeyDown:w=>{(w.key==="Enter"||w.key===" ")&&f(b)},sx:{p:2.5,cursor:"pointer",display:"flex",alignItems:"center",gap:2,bgcolor:"#fff",border:`2px solid ${b.borderColor}`,borderRadius:2,minHeight:80,transition:"transform 0.2s, box-shadow 0.2s","&:hover":{transform:"translateY(-2px)",boxShadow:"0 4px 20px rgba(0,0,0,0.1)"},"&:focus-visible":{outline:"2px solid #29B5E8",outlineOffset:2}},elevation:0,children:[e.jsx(i,{component:"img",src:b.img,alt:b.name,sx:{width:{xs:64,md:80},height:{xs:64,md:80},objectFit:"contain"}}),e.jsxs(i,{children:[e.jsx(a,{variant:"subtitle1",sx:{color:ue.squidInk,fontWeight:700,lineHeight:1.3,fontSize:{xs:14,md:15}},children:b.name}),e.jsx(a,{variant:"caption",sx:{color:ue.textSecondary},children:b.sub}),b.noCert&&e.jsx(a,{variant:"caption",sx:{color:ue.textSecondary,display:"block",mt:.5,fontSize:11,lineHeight:1.4},children:n(b.noCert.ja,b.noCert.en)})]})]},b.name))})]},I):null})})]})}const Vo="0x4AAAAAACtuEvtwfKvYO0-O";function An({siteKey:o,onVerify:t,resetKey:s}){const n=l.useRef(null),d=l.useRef(null);return l.useEffect(()=>{const r=o||Vo,E=()=>{!n.current||!window.turnstile||(d.current&&window.turnstile.remove(d.current),d.current=window.turnstile.render(n.current,{sitekey:r,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();
1else{const m=document.createElement("script");m.src="https://challenges.cloudflare.com/turnstile/v0/api.js?onload=onTurnstileLoad",m.async=!0,window.onTurnstileLoad=E,document.head.appendChild(m)}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:n,sx:{my:2,display:"flex",justifyContent:"center"}})}const sn=Te;function Xo(){const{siteLocale:o}=de(),t=(P,b)=>o==="en"?b:P,s=ge(),[n]=Qn(),d=n.get("from")==="payment",{login:r}=Pe(),[E,m]=l.useState(""),[j,S]=l.useState(""),[u,c]=l.useState(""),[h,y]=l.useState(""),[g,C]=l.useState(0),[f,k]=l.useState(!1),M=l.useCallback(P=>{y(P)},[]),I=async P=>{P.preventDefault(),c("");const b=await r(E,j,h||void 0);b.ok||(y(""),C(w=>w+1)),b.ok?s(d?"/kafka-exam/select?payment=success":"/kafka-exam/select"):b.status===401?c(t("ã¡ã¼ã«ã¢ãã¬ã¹ã¾ãã¯ãã¹ã¯ã¼ããæ£ããããã¾ãã","The email address or password is incorrect")):b.status===429?c(t("試è¡åæ°ãå¤ããã¾ãã1 åã»ã©å¾
ã£ã¦ããããä¸åº¦ã試ããã ãã","Too many attempts. Please wait a minute and try again.")):b.code==="TURNSTILE_FAILED"?c(t("ãç§ã¯ããããã§ã¯ããã¾ãããã«ãã§ãã¯ãå
¥ãã¦ãããããä¸åº¦ã試ããã ãã",`Please tick the "I'm not a robot" checkbox and try again.`)):b.status===400||b.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(Me,{sx:{color:"#1D8102",fontSize:32,mb:.5}}),e.jsx(a,{variant:"body1",sx:{fontWeight:700,color:"#1D8102"},children:t("ãæ¯æããå®äºãã¾ãã!","Payment complete!")}),e.jsx(a,{variant:"body2",sx:{color:sn.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:I,children:[e.jsx(Ae,{fullWidth:!0,label:t("ã¡ã¼ã«ã¢ãã¬ã¹","Email address"),type:"email",value:E,onChange:P=>m(P.target.value),required:!0,sx:{mb:2}}),e.jsx(Ae,{fullWidth:!0,label:t("ãã¹ã¯ã¼ã","Password"),type:f?"text":"password",value:j,onChange:P=>S(P.target.value),required:!0,sx:{mb:2},InputProps:{endAdornment:e.jsx(ir,{position:"end",children:e.jsx(ce,{onClick:()=>k(!f),edge:"end",size:"small",children:f?e.jsx(lr,{}):e.jsx(cr,{})})})}}),e.jsx(An,{onVerify:M,resetKey:g}),u&&e.jsx(a,{color:"error",variant:"body2",sx:{mb:1},children:u}),e.jsx(v,{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($e,{component:"button",onClick:()=>s("/kafka-exam/forgot-password"),sx:{cursor:"pointer",color:sn.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($e,{component:"button",onClick:()=>s("/kafka-exam/register"),sx:{cursor:"pointer"},children:t("ä¼å¡ç»é²","Sign up")})]}),e.jsx(i,{sx:{mt:2},children:e.jsx(bt,{color:sn.textSecondary})})]})}const pe=Te,Zo=[{ja:"Confluent CCDAK 対å¿ã®æ¥æ¬èªåé¡é",en:"Question bank for Confluent CCDAK"},{ja:"æ¬çªå½¢å¼ã®æ¨¡æ¬è©¦é¨ãåé²",en:"Includes full-length mock exams"},{ja:"å
¨åã«è©³ãã解説ä»ãï¼Confluent/Apache Kafkaå
¬å¼ããã¥ã¡ã³ãæºæ ï¼",en:"Detailed explanations for every question (based on official Confluent/Apache Kafka docs)"},{ja:"åé¡ãã¨ã»ã«ãã´ãªã¼ãã¨ã®æ£è§£çãã©ããã³ã°",en:"Track your score by question and by category"},{ja:"PCã»ã¹ããã»ã¿ãã¬ããã©ãã§ãå¦ç¿å¯è½",en:"Study on desktop, phone, or tablet"}];function es(){const{siteLocale:o,buildPath:t}=de(),s=(L,H)=>o==="en"?H:L,n=ge(),{register:d}=Pe(),[r,E]=l.useState("form"),[m,j]=l.useState(""),[S,u]=l.useState(""),[c,h]=l.useState(""),[y,g]=l.useState(""),[C,f]=l.useState(!1),[k,M]=l.useState(""),[I,P]=l.useState(0),[b,w]=l.useState(0),[R,X]=l.useState(!1),[O,K]=l.useState(!1),[T,D]=l.useState(!1),N=l.useRef();l.useEffect(()=>()=>{N.current&&clearInterval(N.current)},[]);const ne=()=>{w(60),N.current=setInterval(()=>{w(L=>L<=1?(clearInterval(N.current),0):L-1)},1e3)},U=l.useCallback(L=>{M(L)},[]),G=async L=>{if(L.preventDefault(),g(""),!m){g(s("ã¡ã¼ã«ã¢ãã¬ã¹ãå
¥åãã¦ãã ãã","Enter your email address"));return}if(!S||S.length<8){g(s("ãã¹ã¯ã¼ãã¯8æå以ä¸ã«ãã¦ãã ãã","Your password must be at least 8 characters"));return}if(!/[a-zA-Z]/.test(S)){g(s("ãã¹ã¯ã¼ãã«è±åãå«ãã¦ãã ãã","Include at least one letter in your password"));return}if(!/[0-9]/.test(S)){g(s("ãã¹ã¯ã¼ãã«æ°åãå«ãã¦ãã ãã","Include at least one number in your password"));return}if(!R||!O){g(s("å©ç¨è¦ç´ã¨ãã©ã¤ãã·ã¼ããªã·ã¼ã¸ã®åæãå¿
è¦ã§ã","You must agree to the Terms of Service and the Privacy Policy"));return}if(!k){g(s("ç¢ºèª (bot æ¤è¨¼) ãçµããã¾ã§æ°ç§ãå¾
ã¡ãã ãã","Please wait a few seconds for the verification to finish"));return}f(!0);try{await Lt(m,"register",k||void 0),E("otp"),ne()}catch(H){M(""),P(F=>F+1),g(H.message||s("èªè¨¼ã³ã¼ãã®éä¿¡ã«å¤±æãã¾ãã","Failed to send the verification code"))}finally{f(!1)}},_=async()=>{g(""),f(!0);try{await Lt(m,"register"),ne()}catch(L){g(L.message||s("èªè¨¼ã³ã¼ãã®åéä¿¡ã«å¤±æãã¾ãã","Failed to resend the verification code"))}finally{f(!1)}},$=async L=>{if(L.preventDefault(),g(""),!c||c.length!==6){g(s("6æ¡ã®èªè¨¼ã³ã¼ããå
¥åãã¦ãã ãã","Enter the 6-digit verification code"));return}if(!R||!O){g(s("å©ç¨è¦ç´ã¨ãã©ã¤ãã·ã¼ããªã·ã¼ã¸ã®åæãå¿
è¦ã§ã","You must agree to the Terms of Service and the Privacy Policy"));return}f(!0);try{await d({email:m,password:S,otpCode:c,turnstileToken:k||void 0,termsAccepted:R,privacyAccepted:O}),Zn("sign_up"),n("/kafka-exam/select?registered=true")}catch(H){g(H.message||s("ç»é²ã«å¤±æãã¾ãã","Registration failed"))}finally{f(!1)}};return e.jsxs(i,{sx:{minHeight:"100vh",bgcolor:pe.lightGray,display:"flex",flexDirection:{xs:"column",md:"row"}},children:[e.jsxs(i,{sx:{flex:{xs:"none",md:1},bgcolor:pe.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("Kafka Developer è³æ ¼å¦ç¿ã§","Study for Kafka Developer certification")}),e.jsx(a,{variant:"h4",sx:{fontWeight:800,color:pe.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:Zo.map((L,H)=>
1e.jsxs(i,{sx:{display:"flex",alignItems:"flex-start",gap:1},children:[e.jsx(Me,{sx:{color:pe.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(L.ja,L.en)})]},H))}),e.jsx(Le,{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:pe.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:pe.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(J,{sx:{p:4,maxWidth:420,width:"100%",borderRadius:2},elevation:2,children:[r==="form"?e.jsxs(e.Fragment,{children:[e.jsx(a,{variant:"h5",sx:{mb:.5,fontWeight:700,color:pe.squidInk},children:s("ã¢ã«ã¦ã³ã使","Create account")}),e.jsx(a,{variant:"body2",sx:{mb:3,color:pe.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(Ae,{fullWidth:!0,label:s("ã¡ã¼ã«ã¢ãã¬ã¹","Email address"),type:"email",value:m,onChange:L=>j(L.target.value),required:!0,sx:{mb:2}}),e.jsx(Ae,{fullWidth:!0,label:s("ãã¹ã¯ã¼ãï¼è±å+æ°åãå«ã8æå以ä¸ï¼","Password (8+ characters, with letters and numbers)"),type:T?"text":"password",value:S,onChange:L=>u(L.target.value),required:!0,inputProps:{minLength:8},sx:{mb:2},InputProps:{endAdornment:e.jsx(ir,{position:"end",children:e.jsx(ce,{onClick:()=>D(!T),edge:"end",size:"small",children:T?e.jsx(lr,{}):e.jsx(cr,{})})})}}),e.jsxs(rr,{sx:{mb:1},children:[e.jsx(ht,{control:e.jsx(Qe,{checked:R,onChange:L=>X(L.target.checked)}),label:e.jsxs(a,{variant:"body2",children:[e.jsx($e,{href:t("/terms/"),underline:"hover",target:"_blank",rel:"noreferrer",children:s("å©ç¨è¦ç´","Terms of Service")}),s("ã«åæãã","I agree to the")]})}),e.jsx(ht,{control:e.jsx(Qe,{checked:O,onChange:L=>K(L.target.checked)}),label:e.jsxs(a,{variant:"body2",children:[e.jsx($e,{href:t("/privacy/"),underline:"hover",target:"_blank",rel:"noreferrer",children:s("ãã©ã¤ãã·ã¼ããªã·ã¼","Privacy Policy")}),s("ã«åæãã","I agree to the")]})})]}),e.jsx(Oe,{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(An,{onVerify:U,resetKey:I}),y&&e.jsx(a,{color:"error",variant:"body2",sx:{mb:1},children:y}),e.jsx(v,{type:"submit",variant:"contained",fullWidth:!0,size:"large",disabled:C,sx:{mb:2,bgcolor:pe.orange,color:pe.squidInk,fontWeight:700,"&:hover":{bgcolor:pe.orangeHover}},children:C?e.jsx(zt,{size:24,sx:{color:pe.squidInk}}):s("èªè¨¼ã³ã¼ããéä¿¡","Send verification code")})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs(i,{sx:{textAlign:"center",mb:2},children:[e.jsx(dr,{sx:{fontSize:48,color:pe.orange,mb:1}}),e.jsx(a,{variant:"h5",sx:{fontWeight:700,color:pe.squidInk},children:s("ã¡ã¼ã«èªè¨¼","Verify email")})]}),e.jsxs(a,{variant:"body2",sx:{mb:1,color:pe.textSecondary,textAlign:"center"},children:[e.jsx("strong",{children:m})," ",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(Oe,{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:$,children:[e.jsx(Ae,{fullWidth:!0,label:s("èªè¨¼ã³ã¼ãï¼6æ¡ï¼","Verification code (6 digits)"),value:c,onChange:L=>{const H=L.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}}),y&&e.jsx(a,{color:"error",variant:"body2",sx:{mb:1},children:y}),e.jsx(v,{type:"submit",variant:"contained",fullWidth:!0,size:"large",disabled:C||c.length!==6,sx:{mb:2,bgcolor:pe.orange,color:pe.squidInk,fontWeight:700,"&:hover":{bgcolor:pe.orangeHover}},children:C?e.jsx(zt,{size:24,sx:{color:pe.squidInk}}):s("ç»é²ãå®äºãã","Complete registration")})]}),e.jsxs(i,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(v,{size:"small",onClick:()=>{E("form"),h(""),g("")},sx:{color:pe.textSecondary},children:s("æ»ã","Back")}),e.jsx(v,{size:"small",onClick:_,disabled:b>0||C,sx:{color:pe.accentBlue},children:b>0?s(`åéä¿¡ï¼${b}ç§ï¼`,`Resend (${b}s)`):s("ã³ã¼ããåéä¿¡","Resend code")})]})]}),e.jsxs(a,{variant:"body2",sx:{textAlign:"center",color:pe.textSecondary,mt:r==="otp"?2:0},children:[s("ãã§ã«ã¢ã«ã¦ã³ãããæã¡ã®æ¹ã¯ ","Already have an account? "),e.jsx($e,{component:"button",onClick:()=>n("/kafka-exam/login"),sx:{cursor:"pointer",color:pe.accentBlue},children:s("ãã°ã¤ã³","Log in")})]}),e.jsx(i,{sx:{mt:2},children:e.jsx(bt,{color:pe.textSecondary})})]})})]})}const he=Te;function ts(){const{siteLocale:o}=de(),t=(D,N)=>o==="en"?N:D,s=ge(),[n,d]=l.useState("email"),[r,E]=l.useState(""),[m,j]=l.useState(""),[S,u]=l.useState(""),[c,h]=l.useState(""),[y,g]=l.useState(""),[C,f]=l.useState(!1),[k,M]=l.useState(0),[I,P]=l.useState(""),[b,w]=l.useState(0),R=l.useRef();l.useEffect(()=>()=>{R.current&&clearInterval(R.current)},[]);const X=()=>{M(60),R.current=setInterval(()=>{M(D=>D<=1?(clearInterval(R.current),0):D-1)},1e3)},O=async D=>{if(D.preventDefault(),g(""),!r){g(t("ã¡ã¼ã«ã¢ãã¬ã¹ãå
¥åãã¦ãã ãã","Enter your email address"));return}if(!I){g(t("ç¢ºèª (bot æ¤è¨¼) ãçµããã¾ã§æ°ç§ãå¾
ã¡ãã ãã","Please wait a few seconds for the verification to finish"));return}f(!0);try{await Lt(r,"reset",I||void 0),d("otp"),X()}catch(N){P(""),w(ne=>ne+1),g(N.message||t("èªè¨¼ã³ã¼ãã®éä¿¡ã«å¤±æãã¾ãã","Failed to send the verification code"))}finally{f(!1)}},K=async()=>{g(""),f(!0);try{await Lt(r,"reset"),X()}catch(D){g(D.message||t("èªè¨¼ã³ã¼ãã®åéä¿¡ã«å¤±æãã¾ãã","Failed to resend the verification code"))}finally{f(!1)}},T=async D=>{if(D.preventDefault(),g(""),m.length!==6){g(t("6æ¡ã®èªè¨¼ã³ã¼ããå
¥åãã¦ãã ãã","Enter the 6-digit verification code"));return}if(S.length<8){g(t("ãã¹ã¯ã¼ãã¯8æå以ä¸ã«ãã¦ãã ãã","Your password must be at least 8 characters"));return}if(S!==c){g(t("ãã¹ã¯ã¼ããä¸è´ãã¾ãã","The passwords do not match"));return}f(!0);try{await So(r,m,S),d("done")}catch(N){g(N.message||t("ãã¹ã¯ã¼ãã®åè¨å®ã«å¤±æãã¾ãã","Failed to reset your password"))}finally{f(!1)}};return e.jsx(i,{sx:{minHeight:"100vh",bgcolor:he.lightGray,display:"flex",alignItems:"center",justifyContent:"center",p:3},children:e.jsxs(J,{sx:{p:4,maxWidth:420,width:"100%",borderRadius:2},elevation:2,children:[n==="email"&&e.jsxs(e.Fragment,{children:[e.jsxs(i,{sx:{textAlign:"center",mb:2},children:[e.jsx(to,{sx:{fontSize:48,color:he.orange,mb:1}}),e.jsx(a,{variant:"h5",sx:{fontWeight:700,color:he.squidInk},children:t("ãã¹ã¯ã¼ãåè¨å®","Reset password")})]}),e.jsxs(a,{variant:"body2",sx:{mb:3,color:he.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:O,children:[e.jsx(Ae,{fullWidth:!0,label:t("ã¡ã¼ã«ã¢ãã¬ã¹","Email address"),type:"email",value:r,onChange:D=>E(D.target.value),required:!0,sx:{mb:2}}),e.jsx(An,{onVerify:P,resetKey:b}),y&&e.jsx(a,{color:"error",variant:"body2",sx:{mb:1},children:y}),e.jsx(v,{type:"submit",variant:"contained",fullWidth:!0,size:"large",disabled:C,sx:{mb:2,bgcolor:he.orange,color:he.squidInk,fontWeight:700,"&:hover":{bgcolor:he.orangeHover}},children:C?e.jsx(zt,{size:24,sx:{color:he.squidInk}}):t("èªè¨¼ã³ã¼ããéä¿¡","Send verification code")})]})]}),n==="otp"&&e.jsxs(e.Fragment,{children:[e.jsxs(i,{sx:{textAlign:"center",mb:2},children:[e.jsx(dr,{sx:{fontSize:48,color:he.orange,mb:1}}),e.jsx(a,{variant:"h5",sx:{fontWeight:700,color:he.squidInk},children:t("æ°ãããã¹ã¯ã¼ããè¨å®","Set a new password")})]}),e.jsxs(a,{variant:"body2",sx:{mb:1,color:he.textSecondary,textAlign:"center"},children:[e.jsx("strong",{children:r})," ",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:T,children:[e.jsx(Ae,{fullWidth:!0,label:t("èªè¨¼ã³ã¼ãï¼6æ¡ï¼","Verification code (6 digits)"),value:m,onChange:D=>{const N=D.target.value.replace(/\D/g,"").slice(0,6);j(N)},required:!0,inputProps:{maxLength:6,inputMode:"numeric",style:{textAlign:"center",fontSize:24,letterSpacing:8}},sx:{mb:2}}),e.jsx(Ae,{fullWidth:!0,label:t("æ°ãããã¹ã¯ã¼ãï¼8æå以ä¸ï¼","New password (at least 8 characters)"),type:"password",value:S,onChange:D=>u(D.target.value),required:!0,inputProps:{minLength:8},sx:{mb:2}}),e.jsx(Ae,{fullWidth:!0,label:t("ãã¹ã¯ã¼ã確èª","Confirm password"),type:"password",value:c,onChange:D=>h(D.target.value),required:!0,sx:{mb:2}}),y&&e.jsx(a,{color:"error",variant:"body2",sx:{mb:1},children:y}),e.jsx(v,{type:"submit",variant:"contained",fullWidth:!0,size:"large",disabled:C,sx:{mb:2,bgcolor:he.orange,color:he.squidInk,fontWeight:700,"&:hover":{bgcolor:he.orangeHover}},children:C?e.jsx(zt,{size:24,sx:{color:he.squidInk}}):t("ãã¹ã¯ã¼ããåè¨å®","Reset password")})]}),e.jsxs(i,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx(v,{size:"small",onClick:()=>{d("email"),j(""),u(""),h(""),g("")},sx:{color:he.textSecondary},children:t("æ»ã","Back")}),e.jsx(v,{size:"small",onClick:K,disabled:k>0||C,sx:{color:he.accentBlue},children:k>0?t(`åéä¿¡ï¼${k}ç§ï¼`,`Resend (${k}s)`):t("ã³ã¼ããåéä¿¡","Resend code")})]})]}),n==="done"&&e.jsxs(e.Fragment,{children:[e.jsxs(i,{sx:{textAlign:"center",mb:2},children:[e.jsx(Me,{sx:{fontSize:48,color:"#1D8102",mb:1}}),e.jsx(a,{variant:"h5",sx:{fontWeight:700,color:he.squidInk},children:t("åè¨å®å®äº","Password reset")})]}),e.jsxs(a,{variant:"body2",sx:{mb:3,color:he.textSecondary,textAlign:"center"},children:[t("ãã¹ã¯ã¼ããæ£å¸¸ã«åè¨å®ããã¾ããã","Your password has been reset."),e.jsx("br",{}),t("æ°ãããã¹ã¯ã¼ãã§ãã°ã¤ã³ãã¦ãã ããã","Sign in with your new password.")]}),e.jsx(v,{variant:"contained",fullWidth:!0,size:"large",onClick:()=>s("/kafka-exam/login"),sx:{mb:2,bgcolor:he.orange,color:he.squidInk,fontWeight:700,"&:hover":{bgcolor:he.orangeHover}},children:t("ãã°ã¤ã³ãã¼ã¸ã¸","Go to login")})]}),e.jsx(a,{variant:"body2",sx:{textAlign:"center",color:he.textSecondary,mt:1},children:e.jsx($e,{component:"button",onClick:()=>s("/kafka-exam/login"),sx:{cursor:"pointer",color:he.accentBlue},children:t("ãã°ã¤ã³ã«æ»ã","Back to login")})}),e.jsx(i,{sx:{mt:2},children:e.jsx(bt,{color:he.textSecondary})})]})})}const Gn=10,St={problems:[]},Wt={},Tt={};async function Rr(o){try{const t=await fetch(o);if(!t.ok)return St;const s=await t.json();return Array.isArray(s)?{problems:s}:s&&Array.isArray(s.problems)?s:St}catch{return St}}const _r={ccdak:"/data/kafka",ccaak:"/data/kafka-admin",ccsd:"/data/kafka-streams"};async function st(o){if(Wt[o])return Wt[o];const t=await Rr(`${_r[o]}/${o}Problems.json`);return Wt[o]=t,t}async function at(o){if(Tt[o])return Tt[o];const t=await Rr(`${_r[o]}/${o}MockExamProblems.json`);return Tt[o]=t,t}function zr(o){return it(o).problems.length}function En(o){const t=it(o);return new Set(t.problems.map(n=>n.set_number||1)).size}function In(o){const t=Gt(o);return new Set(t.problems.map(n=>n.set_number||1)).size}function it(o){return Wt[o]||St}function Je(o,t){const s=it(o),n=s.problems.filter(d=>d.set_number===t);return n.length>0?{problems:n}:{problems:s.problems}}function Gt(o){return Tt[o]||St}function qe(o,t){const s=Gt(o),n=s.problems.filter(d=>d.set_number===t);return n.length>0?{problems:n}:{problems:s.problems}}const te=Te,ns={ccdak:"Certified Developer",ccaak:"Certified Administrator",ccsd:"Kafka Streams Developer"},rs={ccdak:"CCDAK",ccaak:"CCAAK",ccsd:"CCSD"},os=()=>{const o=ge(),{user:t,logout:s}=Pe(),{examType:n}=_e(),{siteLocale:d}
1=de(),r=(U,G)=>d==="en"?G:U,[E,m]=l.useState(!1),[j,S]=l.useState("monthly"),[u,c]=l.useState(!1),[h,y]=l.useState(!1),[g,C]=l.useState(!1),[f,k]=l.useState(""),[M,I]=l.useState(!1);if(l.useEffect(()=>{if(!n){o("/kafka-exam/select");return}let U=!1;return Promise.all([st(n),at(n)]).then(()=>{U||I(!0)}),()=>{U=!0}},[n,o]),!n)return null;if(!M)return e.jsx(i,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh",bgcolor:te.lightGray},children:e.jsx(a,{sx:{color:te.textSecondary},children:r("åé¡ãã¼ã¿ãèªã¿è¾¼ã¿ä¸...","Loading questions...")})});const P=rs[n]||ns[n]||n.toUpperCase(),b=zr(n),w=En(n),R=In(n),X=`${n}_`,O=Number(localStorage.getItem(`${X}currentSet`)||"1"),K=Number(localStorage.getItem(`${X}answeredCount`)||"0"),T=Number(localStorage.getItem(`${X}correctCount`)||"0"),D=K>0?Math.round(T/K*100):0,N=async U=>{k("");const G=j==="buyout";if(j==="all-access"?!Rn:G?!Ve:!Cn){k(r("Stripe ã®èª²éãªã³ã¯ãæªè¨å®ã§ããç°å¢å¤æ°ã確èªãã¦ãã ããã","The Stripe billing link is not configured. Check the environment variables."));return}const _=Xn();try{C(!0),await Ar({consentVersion:$t,context:"checkout",termsAccepted:U.termsAccepted,privacyAccepted:U.privacyAccepted,autoRenewalAccepted:G?!1:U.autoRenewalAccepted}),_.open(j==="all-access"?Qr(t):(G?Tr:wn)(t)),m(!1)}catch($){_.cancel(),k($.message||r("åæå
容ã®ä¿åã«å¤±æãã¾ãã","Failed to save your consent"))}finally{C(!1)}},ne=()=>{s(),y(!0),setTimeout(()=>o("/kafka-exam/login"),1200)};return e.jsxs(i,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",width:"100%",bgcolor:te.lightGray},children:[e.jsx(i,{sx:{bgcolor:te.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("/kafka-exam/select"),"aria-label":r("試é¨é¸æã¸æ»ã","Back to exam selection"),sx:{color:"#fff",mr:1,minWidth:44,minHeight:44},children:e.jsx(Re,{})}),e.jsx(ce,{onClick:()=>c(!0),"aria-label":r("ä»ã®è©¦é¨ã¸åãæ¿ã","Switch to another exam"),sx:{color:"#fff",mr:1,minWidth:44,minHeight:44},children:e.jsx(no,{})}),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:P}),K>0&&e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[e.jsx(gn,{sx:{color:te.accent,fontSize:16}}),e.jsx(a,{variant:"caption",sx:{color:"rgba(255,255,255,0.7)"},children:r(`æ£è§£ç ${D}%ï¼${T}/${K}åï¼`,`Accuracy ${D}% (${T}/${K} questions)`)})]})]}),t?e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(Ne,{label:t.plan==="premium"?r("ææ","Paid"):r("ç¡æ","Free"),size:"small",sx:{bgcolor:t.plan==="premium"?te.accent:"rgba(255,255,255,0.15)",color:"#fff",fontWeight:700,fontSize:11,height:24}}),e.jsx(ce,{onClick:ne,"aria-label":r("ãã°ã¢ã¦ã","Log out"),sx:{color:"rgba(255,255,255,0.6)",minWidth:40,minHeight:40},children:e.jsx(ar,{sx:{fontSize:20}})})]}):e.jsxs(i,{sx:{display:"flex",gap:1},children:[e.jsx(v,{size:"small",variant:"outlined",onClick:()=>o("/kafka-exam/login"),sx:{color:"#fff",borderColor:"rgba(255,255,255,0.4)",textTransform:"none",fontSize:13,height:36,whiteSpace:"nowrap",flexShrink:0},children:r("ãã°ã¤ã³","Log in")}),e.jsx(v,{size:"small",variant:"contained",onClick:()=>o("/kafka-exam/register"),sx:{bgcolor:te.accent,textTransform:"none",fontSize:13,fontWeight:700,height:36,"&:hover":{bgcolor:te.accentHover},whiteSpace:"nowrap",flexShrink:0},children:r("ç»é²","Sign up")})]})]})}),e.jsxs(Fe,{maxWidth:"sm",sx:{flex:1,py:3},children:[e.jsx(Br,{examType:n,totalProblems:b,locale:d==="en"?"en":"ja",translateCategory:U=>Hr(U,d==="en"?"en":"ja")}),K>0&&e.jsxs(J,{role:"button",tabIndex:0,onClick:()=>o("/kafka-exam/practice"),onKeyDown:U=>{U.key==="Enter"&&o("/kafka-exam/practice")},sx:{p:2.5,mb:2.5,borderRadius:2.5,border:`2px solid ${te.accent}`,cursor:"pointer",transition:"all 0.2s","&:hover":{boxShadow:`0 4px 16px ${te.accent}25`},"&:focus-visible":{outline:`2px solid ${te.accent}`,outlineOffset:2}}
1,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:te.textPrimary,fontSize:15},children:r("ç¶ãããå¦ç¿ãã","Continue studying")}),e.jsx(a,{variant:"caption",sx:{color:te.textSecondary},children:r(`ç·´ç¿${O} ãè§£ãã¦ãã¾ã`,`Working on Practice ${O}`)})]}),e.jsx(nt,{sx:{color:te.accent}})]}),e.jsx(He,{variant:"determinate",value:Math.min(K/10*100,100),sx:{mt:1.5,height:6,borderRadius:3,bgcolor:"#E0E4E8","& .MuiLinearProgress-bar":{bgcolor:te.accent,borderRadius:3}}})]}),e.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[e.jsxs(J,{role:"button",tabIndex:0,onClick:()=>o("/kafka-exam/practice"),onKeyDown:U=>{U.key==="Enter"&&o("/kafka-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 ${te.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(ro,{sx:{fontSize:28,color:te.accent}})}),e.jsxs(i,{sx:{flex:1,minWidth:0},children:[e.jsx(a,{sx:{fontWeight:700,fontSize:16,color:te.textPrimary},children:r("ç·´ç¿åé¡","Practice questions")}),e.jsx(a,{variant:"caption",sx:{color:te.textSecondary},children:r(`${b}åã»${w}ã»ãã`,`${b} questions in ${w} sets`)})]}),e.jsx(nt,{sx:{color:te.textMuted,fontSize:20}})]}),e.jsxs(J,{role:"button",tabIndex:0,onClick:()=>o("/kafka-exam/mock"),onKeyDown:U=>{U.key==="Enter"&&o("/kafka-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 ${te.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(pn,{sx:{fontSize:28,color:"#FF9900"}})}),e.jsxs(i,{sx:{flex:1,minWidth:0},children:[e.jsx(a,{sx:{fontWeight:700,fontSize:16,color:te.textPrimary},children:r("模æ¬è©¦é¨","Mock exams")}),e.jsx(a,{variant:"caption",sx:{color:te.textSecondary},children:r(`æ¬çªå½¢å¼ã»${R}åå`,`Exam format, ${R} full mocks`)})]}),e.jsx(nt,{sx:{color:te.textMuted,fontSize:20}})]}),e.jsxs(J,{role:"button",tabIndex:0,onClick:()=>o("/kafka-exam/review"),onKeyDown:U=>{U.key==="Enter"&&o("/kafka-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 ${te.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(oo,{sx:{fontSize:28,color:"#1D8102"}})}),e.jsxs(i,{sx:{flex:1,minWidth:0},children:[e.jsx(a,{sx:{fontWeight:700,fontSize:16,color:te.textPrimary},children:r("復ç¿","Review")}),e.jsx(a,{variant:"caption",sx:{color:te.textSecondary},children:r("ééããåé¡ãç¹°ãè¿ãè§£ã","Practice the questions you got wrong")})]}),e.jsx(nt,{sx:{color:te.textMuted,fontSize:20}})]}),e.jsxs(J,{role:"button",tabIndex:0,onClick:()=>o("/kafka-exam/settings"),onKeyDown:U=>{U.key==="Enter"&&o("/kafka-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 ${te.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(bn,{sx:{fontSize:28,color:te.textSecondary}})}),e.jsxs(i,{sx:{flex:1,minWidth:0},children:[e.jsx(a,{sx:{fontWeight:700,fontSize:16,color:te.textPrimary},children:r("è¨å®","Settings")}),e.jsx(a,{variant:"caption",sx:{color:te.textSecondary},children:r("表示ã»é³å£°ã»ãã¼ã¿ç®¡ç","Display, sound, and data")})]}),e.jsx(nt,{sx:{color:te.textMuted,fontSize:20}})]})]}),t&&t.plan!=="premium"&&e.jsxs(J,{sx:{mt:3,p:2.5,borderRadius:2.5,bgcolor:te.squidInk,textAlign:"center"}
1,elevation:0,children:[e.jsx(a,{sx:{color:"#fff",fontWeight:700,fontSize:15,mb:.5},children:r("å
¨åé¡ã«ã¢ã¯ã»ã¹ãã","Get all questions")}),e.jsx(a,{variant:"caption",sx:{color:"rgba(255,255,255,0.6)",display:"block",mb:2},children:r(`ç·´ç¿ã»ãã${Rt+1}以éã»æ¨¡æ¬è©¦é¨${_t+1}åç®ä»¥éã®ãã«ã¢ã¯ã»ã¹`,`Full access to Practice Set ${Rt+1}+ and Mock Exam ${_t+1}+`)}),e.jsx(v,{variant:"contained",onClick:()=>{k(""),S("monthly"),m(!0)},sx:{bgcolor:te.accent,color:te.onAccent,fontWeight:700,borderRadius:2,textTransform:"none",px:4,"&:hover":{bgcolor:te.accentHover}},children:r("ææãã©ã³ãè¦ã","See paid plans")}),Ve&&e.jsx(i,{sx:{mt:1.5},children:e.jsx(v,{variant:"outlined",onClick:()=>{k(""),S("buyout"),m(!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:r(ut.priceLabel.ja,ut.priceLabel.en)})}),Ve&&e.jsxs(a,{variant:"caption",sx:{display:"block",mt:1.5,color:"rgba(255,255,255,0.65)",lineHeight:1.6,textAlign:"left"},children:[r(Mt.ja,Mt.en)," ",r(Ot.ja,Ot.en)]}),Rn&&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:r("å
¨è©¦é¨ã¾ã¨ãã¦ãå¾ã«","Every exam track for less")}),e.jsx(v,{variant:"outlined",size:"small",onClick:()=>{k(""),S("all-access"),m(!0)},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:r("å
¨è©¦é¨ãã㯠¥2,980/æã«ã¢ããã°ã¬ã¼ã","Upgrade to the All Exams pack, Â¥2,980/month (US$18.80)")})]})]}),t&&t.plan==="premium"&&No&&e.jsx(i,{sx:{mt:2,textAlign:"center"},children:e.jsx(v,{size:"small",startIcon:e.jsx(so,{}),onClick:()=>window.open(Wr,"_blank","noopener,noreferrer"),sx:{color:te.textMuted,fontSize:13,textTransform:"none"},children:r("ãµãã¹ã¯ãªãã·ã§ã³ç®¡ç","Manage subscription")})})]}),e.jsx(Kr,{open:u,onClose:()=>c(!1),currentPath:typeof window<"u"?window.location.pathname:void 0}),e.jsx(hn,{open:E,onClose:()=>{g||(m(!1),k(""))},plan:j==="buyout"?"buyout":"monthly",onConfirm:N,loading:g,error:f}),e.jsx(xr,{open:h,autoHideDuration:1500,onClose:()=>y(!1),anchorOrigin:{vertical:"top",horizontal:"center"},children:e.jsx(Oe,{severity:"success",variant:"filled",onClose:()=>y(!1),sx:{fontWeight:600},children:r("ãã°ã¢ã¦ããã¾ãã","Signed out")})})]})},je=Te;function Lr({mode:o,title:t,subtitle:s,setCount:n,getLocalResult:d,onSetClick:r,guestUnlockedSetCount:E=1,getInProgress:m,onRestart:j,getSetProblems:S}){const{siteLocale:u}=de(),c=(_,$)=>u==="en"?$:_,h=ge(),{isSubscribed:y,isLoggedIn:g}=Pe(),{examType:C}=_e(),{darkMode:f}=Ke(),[k,M]=l.useState(!1),[I,P]=l.useState(new Map),[b,w]=l.useState(0),R=f?"#121212":je.lightGray,X=f?"#1a1a2e":je.squidInk,O=f?"#1e1e1e":"#fff",K=f?"#252540":je.squidInk,T=f?"#2a2a2a":"#F0F0F0",D=f?"#e0e0e0":je.textPrimary;if(l.useEffect(()=>{g&&C&&On(C,o).then(({sets:_})=>{const $=new Map;for(const L of _)$.set(L.setNumber,L);P($)}).catch(()=>{})},[g,C,o]),l.useEffect(()=>{if(!g||!C||!S||n===0)return;let _=!0;return Ur({examType:C,kind:o==="mock"?"mock":"practice",getSets:()=>On(C,o),getHistory:$=>vn(C,o,$),getSetProblems:S}).then($=>{_&&$!==null&&w(L=>L+1)}).catch(()=>{}),()=>{_=!1}},[g,C,o,n]),l.useEffect(()=>{C||h("/kafka-exam/select")},[C,h]),!C)return null;const N=Array.from({length:n},(_,$)=>$+1),ne=_=>S?S(_).length:0,U=_=>{if(!y&&_>E){M(!0);return}r(_)},G=N.filter(_=>{const $=I.get(_),L=g?null:d(_,C),H=ne(_);return H>0&&(($==null?void 0:$.answered)??0)>=H||((L==null?void 0:L.done)??!1)}).length;return e.jsxs(i,{sx:{display:"flex",flexDirection:"column",width:"100%",minHeight:"100vh",bgcolor:R},children:[e.jsxs(i,{sx:{bgcolor:X,display:"flex",alignItems:"center",px:1,py:2,flexShrink:0},children:[e.jsx(ce,{onClick:()=>h("/kafka-exam/menu"),"aria-label":c("ã¡ãã¥ã¼ã¸æ»ã","Back to menu"),sx:{color:"#fff",minWidth:44,minHeight:44},children:e.jsx(Re,{})}),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}/${n} å®äº`,`· ${G}/${n} completed`)]})]}),e.jsx(i,{sx:{width:44}})]}),e.jsx(Fe,{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:N.map(_=>{const $=I.get(_),L=g?null:d(_,C),H=($==null?void 0:$.answered)??0,F=ne(_),x=F>0&&H>=F,W=x?Math.round((($==null?void 0:$.correct)??0)/F*100):(L==null?void 0:L.rate)??0,Q=x||((L==null?void 0:L.done)??!1),p=!y&&_>E,B=(!p&&m?m(_):null)??(!Q&&H>0?H:null);return e.jsxs(J,{role:"button",tabIndex:0,onClick:()=>U(_),onKeyDown:re=>{(re.key==="Enter"||re.key===" ")&&U(_)},sx:{p:2,minHeight:100,bgcolor:p?T:Q?O:K,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 ${je.accent}`,outlineOffset:2},border:Q?`2px solid ${W>=70?je.success:je.error}`:p?`1px solid ${je.borderGray}`:"none",position:"relative"},elevation:p?0:1,children:[p&&e.jsx(ao,{sx:{fontSize:20,color:je.textMuted,mb:.5}}),Q&&!p&&e.jsx(Me,{sx:{fontSize:20,color:W>=70?je.success:je.error,mb:.5}}),e.jsx(a,{sx:{fontWeight:700,fontSize:18,color:p?je.textMuted:Q?D:"#fff"},children:_}),Q&&!p&&B===null?e.jsx(Ne,{label:`${W}%`,size:"small",sx:{height:22,fontSize:12,fontWeight:700,bgcolor:W>=70?je.successLight:je.errorLight,color:W>=70?je.success:je.error}}):e.jsx(a,{variant:"caption",sx:{color:p?je.textMuted:B!==null?Q?D:"#fff":"rgba(255,255,255,0.4)",fontSize:11,fontWeight:B!==null?700:400},children:p?c("ããã¯","Locked"):B!==null?c(`éä¸ ${B}å`,`In progress: ${B}`):c("æªåé¨","Not attempted")}),B!==null&&j&&e.jsxs(i,{sx:{display:"flex",gap:.5,mt:.25},children:[e.jsx(v,{size:"small",onClick:re=>{re.stopPropagation(),U(_)},onKeyDown:re=>re.stopPropagation(),sx:{minHeight:32,px:1,fontSize:12,fontWeight:700,textTransform:"none",textDecoration:"underline",color:Q?D:"#fff"},children:c("ç¶ããã","Resume")}),e.jsx(v,{size:"small",onClick:re=>{re.stopPropagation(),j(_)},onKeyDown:re=>re.stopPropagation(),sx:{minHeight:32,px:1,fontSize:12,fontWeight:700,textTransform:"none",textDecoration:"underline",color:Q?D:"#fff"},children:c("æåãã","Restart")})]}),Q&&!p&&e.jsx(He,{variant:"determinate",value:W,sx:{width:"100%",height:4,borderRadius:2,mt:.5,bgcolor:"#E0E4E8","& .MuiLinearProgress-bar":{bgcolor:W>=70?je.success:je.error,borderRadius:2}}})]},_)})})}),e.jsx(Xe,{open:k,onClose:()=>M(!1)})]})}function ss(o,t){const s=localStorage.getItem(`practice_result_${t}_set${o}`);if(!s)return{rate:0,done:!1};try{const n=JSON.parse(s);return{rate:Number(n.rate)||0,done:!0}}catch{return{rate:0,done:!1}}}const an=()=>{const{siteLocale:o}=de(),t=(m,j)=>o==="en"?j:m,s=ge(),{examType:n}=_e();gt(n?()=>st(n):null,n);const d=n?En(n):0,r=n?zr(n):0,E=m=>{if(n){const j=Je(n,m).problems,S=Fn(n);if(Wn(S,m,j.length)){const c=er(j,S.answeredIds);if(c!==null){s(`/kafka-exam/training-problem/${c}`);return}}Dn(n,m);const u=j.length>0?j[0].id:1;s(`/kafka-exam/training-problem/${u}`)}};return e.jsx(Lr,{mode:"practice",guestUnlockedSetCount:3,title:t("ç·´ç¿åé¡","Practice"),subtitle:t(`å${Gn}å / å
¨${r}å`,`${Gn} each / ${r} total`),setCount:d,getLocalResult:ss,onSetClick:E,getSetProblems:m=>n?Je(n,m).problems:[],getInProgress:m=>{if(!n)return null;const j=Je(n,m).problems.length,S=Fn(n);return Wn(S,m,j)?(S==null?void 0:S.answeredIds.length)??0:null},onRestart:m=>{var S;if(!n)return;Dn(n,m);const j=Je(n,m).problems;s(`/kafka-exam/training-problem/${((S=j[0])==null?void 0:S.id)??1}`)}})};function Be({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:n=>n.preventDefault(),onCut:n=>n.preventDefault(),onContextMenu:n=>n.preventDefault(),onDragStart:n=>n.preventDefault(),children:o})}function Yt(){l.useEffect(()=>{const o=r=>{if(r.key==="F12"){r.preventDefault();return}
1if(r.ctrlKey&&r.shiftKey&&(r.key==="I"||r.key==="i"||r.key==="J"||r.key==="j"||r.key==="C"||r.key==="c")){r.preventDefault();return}if(r.ctrlKey&&(r.key==="U"||r.key==="u")){r.preventDefault();return}if(r.ctrlKey&&(r.key==="S"||r.key==="s")){r.preventDefault();return}if(r.ctrlKey&&(r.key==="P"||r.key==="p")){r.preventDefault();return}if(r.ctrlKey&&(r.key==="A"||r.key==="a")){r.preventDefault();return}if(r.ctrlKey&&(r.key==="C"||r.key==="c")&&!r.shiftKey){r.preventDefault();return}},t=r=>{r.preventDefault()},s=r=>{r.preventDefault(),r.clipboardData&&r.clipboardData.setData("text/plain","")},n=r=>{r.preventDefault()},d=r=>{r.preventDefault()};return document.addEventListener("keydown",o),document.addEventListener("contextmenu",t),document.addEventListener("copy",s),document.addEventListener("dragstart",n),document.addEventListener("selectstart",d),()=>{document.removeEventListener("keydown",o),document.removeEventListener("contextmenu",t),document.removeEventListener("copy",s),document.removeEventListener("dragstart",n),document.removeEventListener("selectstart",d)}},[])}const as="/sounds/correct.mp3",is="/sounds/incorrect.mp3",Yn=()=>{l.useEffect(()=>{Zn("begin_practice")},[]),Yt();const{id:o}=fn(),t=ge(),s=Number(o),{examType:n}=_e(),{soundEnabled:d}=Kt(),{darkMode:r,toggleDarkMode:E}=Ke(),{easyMode:m,toggleEasyMode:j}=Ut(),{isLoggedIn:S,isSubscribed:u,loading:c}=Pe(),{siteLocale:h,effectiveStudyMode:y,isEnglishQuestionMode:g,toggleEnglishQuestionMode:C}=de(),f=(A,V)=>h==="en"?V:A,[k,M]=l.useState(!1),[I,P]=l.useState([]),[b,w]=l.useState(null),[R,X]=l.useState(null),O=l.useRef(null),K=l.useRef(null),T=A=>{K.current||(O.current&&(clearTimeout(O.current),O.current=null),K.current=A,Vn.flushSync(()=>{w(A)}))};l.useEffect(()=>()=>{O.current&&clearTimeout(O.current)},[]);const D=Number(localStorage.getItem(`${n?n+"_":""}currentSet`)||"1");l.useEffect(()=>{if(!n)return;let A=!1;return st(n).then(()=>{A||M(!0)}),()=>{A=!0}},[n]);const N=n&&k?tr(it(n).problems,s):null,ne=(N==null?void 0:N.set)??D,U=n?Je(n,ne):{problems:[]},G=N==null?void 0:N.problem,_=N==null?void 0:N.set;l.useEffect(()=>{n&&_&&_!==D&&localStorage.setItem(`${n}_currentSet`,String(_))},[n,_,D]);const $=G?pt(G,h,y):null;if(l.useEffect(()=>{$&&P(Array($.options.length).fill(!1)),O.current&&(clearTimeout(O.current),O.current=null),K.current=null,w(null)},[s,k]),l.useEffect(()=>{d&&b==="correct"?new Audio(as).play().catch(()=>{}):d&&b==="incorrect"&&new Audio(is).play().catch(()=>{})},[b,d]),l.useEffect(()=>{n||t("/kafka-exam/select")},[n,t]),G&&mn("practice",ne,{isSubscribed:u,loading:c}))return e.jsx(i,{sx:{minHeight:"100vh",bgcolor:"#F2F3F3"},children:e.jsx(Xe,{open:!0,onClose:()=>t("/kafka-exam/practice")})});if(!k||!G||!$)return e.jsx(i,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh",bgcolor:"#f5f5f5"},children:e.jsx(a,{sx:{color:"#666"},children:k?h==="en"?`Question not found (ID: ${o})`:`åé¡ãåå¨ãã¾ãã (ID: ${o})`:f("åé¡ãã¼ã¿ãèªã¿è¾¼ã¿ä¸...","Loading questions...")})});const L=U.problems,H=L.length,F=L.findIndex(A=>A.id===s),x=n?`${n}_`:"",W=localStorage.getItem(`${x}answersDetail`)||"[]",Q=new Set(JSON.parse(W).map(A=>
1A.questionId)).size,p=Math.min(Q/H*100,100),q=A=>{K.current||(O.current&&(clearTimeout(O.current),O.current=null),P(V=>{const ie=G.correctAnswers.length;if(m&&ie===1){const ae=V.map((xe,se)=>se===A);return setTimeout(()=>{if(K.current)return;const xe=G.correctAnswers[0]===A;T(xe?"correct":"incorrect"),B(xe,[A])},0),ae}const Y=[...V];Y[A]=!Y[A];const Ze=Y.filter(Boolean).length;return m&&Ze>=G.correctAnswers.length&&(O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{if(O.current=null,K.current)return;const ae=Y.map((se,ze)=>se?ze:-1).filter(se=>se!==-1),xe=ae.length===G.correctAnswers.length&&ae.every((se,ze)=>se===G.correctAnswers[ze]);T(xe?"correct":"incorrect"),B(xe,ae)},1e3)),Y}))},B=(A,V)=>{const ie=localStorage.getItem(`${x}answersDetail`)||"[]";let Y=JSON.parse(ie);Y=Y.filter(ae=>ae.questionId!==s),Y.push({questionId:s,isCorrect:A,category:G.category,ts:Date.now()}),localStorage.setItem(`${x}answersDetail`,JSON.stringify(Y));const Ze=Y.filter(ae=>ae.isCorrect).length;if(localStorage.setItem(`${x}answeredCount`,String(Y.length)),localStorage.setItem(`${x}correctCount`,String(Ze)),localStorage.setItem(`ratio_${n}_${s}`,A?"100":"0"),S&&n){const ae=V??I.map((xe,se)=>xe?se:-1).filter(xe=>xe!==-1);wr({question_id:s,selected_choice_ids:ae,is_correct:A,exam_type:n,question_set:"practice",set_number:ne}).catch(()=>{})}if(n){const ae=`${n}_wrong_answers`,xe=localStorage.getItem(ae)||"[]";let se=JSON.parse(xe);A?se=se.filter(ze=>ze!==s):se.includes(s)||se.push(s),localStorage.setItem(ae,JSON.stringify(se))}},re=()=>{if(K.current)return;const A=I.map((ie,Y)=>ie?Y:-1).filter(ie=>ie!==-1),V=A.length===G.correctAnswers.length&&A.every((ie,Y)=>ie===G.correctAnswers[Y]);T(V?"correct":"incorrect"),B(V,A)},be=()=>{K.current=null,w(null)},De=()=>{if(be(),F>=0&&F<L.length-1){const A=L[F+1].id;t(`/kafka-exam/training-problem/${A}`)}else t("/kafka-exam/practice/result")},Ue=()=>{be(),t(`/kafka-exam/training-problem/${s}/explanation`)},we=r?"#121212":"#F2F3F3",ke=r?"#e0e0e0":"#333",Et=r?"#b0b0b0":"#444",Jt=r?"#333":"#e0e0e0";return e.jsxs(i,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",width:"100%",bgcolor:we},children:[e.jsxs(i,{sx:{height:64,bgcolor:"#232F3E",display:"flex",alignItems:"center",px:1,flexShrink:0},children:[e.jsx(ce,{onClick:()=>t("/kafka-exam/practice"),"aria-label":f("æ»ã","Back"),sx:{color:"#fff",minWidth:44,minHeight:44},children:e.jsx(Re,{})}),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:$.title})]}),h==="ja"&&e.jsx(ce,{onClick:C,"aria-label":g?f("æ¥æ¬èªã«æ»ã","Back to Japanese"):f("è±èªã§è¡¨ç¤º","Show in English"),sx:{color:g?"#29B5E8":"rgba(255,255,255,0.6)",minWidth:44,minHeight:44},children:e.jsx(ur,{})}),e.jsx(ce,{onClick:A=>X(A.currentTarget),"aria-label":f("ã¡ãã¥ã¼","Menu"),sx:{color:"#fff",minWidth:44,minHeight:44},children:e.jsx(hr,{})}),e.jsxs(fr,{anchorEl:R,open:!!R,onClose:()=>X(null),PaperProps:{sx:{minWidth:200}},children:[e.jsxs(ye,{onClick:()=>{E(),X(null)},children:[e.jsx(ft,{children:r?e.jsx(Nt,{fontSize:"small"}):e.jsx(Bt,{fontSize:"small"})}),e.jsx(oe,{children:r?f("ã©ã¤ãã¢ã¼ã","Light mode"):f("ãã¼ã¯ã¢ã¼ã","Dark mode")})]}),e.jsxs(ye,{onClick:()=>{j(),X(null)},children:[e.jsx(ft,{children:e.jsx(At,{fontSize:"small",sx:{color:m?"#FF9900":void 0}})}),e.jsx(oe,{children:m?f("ããããã¢ã¼ã OFF","Easy mode OFF"):f("ããããã¢ã¼ã ON","Easy mode ON")})]}),e.jsxs(ye,{onClick:()=>{X(null),t("/kafka-exam/settings")},children:[e.jsx(ft,{children:e.jsx(bn,{fontSize:"small"})}),e.jsx(oe,{children:f("è¨å®","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(He,{variant:"determinate",value:p,sx:{height:{xs:8,md:10},borderRadius:4,bgcolor:r?"#333":"#F2F3F3","& .MuiLinearProgress-bar":{backgroundColor:"#1D8102"}}}),e.jsxs(a,{sx:{display:"block",textAlign:"center",mt:.5,color:Et,fontSize:{xs:"0.75rem",md:"0.9rem"}},children:[h==="en"?"Progress":"鲿",": ",Q,"/",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(Be,{children:e.jsx(wt,{text:$.question,sx:{color:ke,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:$.options.map((A,V)=>{const ie=G.correctAnswers.length===1,Y=I[V];return e.jsxs(J,{onClick:()=>q(V),sx:{display:"flex",alignItems:"center",bgcolor:Y?r?"#1a2a1a":"#EBF5EB":r?"#1e1e1e":"#fff",border:Y?"2px solid #1D8102":`2px solid ${Jt}`,borderRadius:2,p:{xs:1.5,md:2.25},minHeight:52,cursor:"pointer",transition:"all 0.15s"}
1,elevation:0,children:[ie?e.jsx(mr,{checked:Y,sx:{mr:{xs:1,md:1.5},p:.5,color:r?"#aaa":void 0,"&.Mui-checked":{color:"#1D8102"}}}):e.jsx(Qe,{checked:Y,sx:{mr:{xs:1,md:1.5},p:.5,color:r?"#aaa":void 0,"&.Mui-checked":{color:"#1D8102"}}}),e.jsx(Be,{children:e.jsxs(a,{sx:{color:Y?r?"#fff":"#1B3139":Et,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+V),"."]}),A]})})]},V)})})]}),!m&&e.jsx(i,{sx:{p:2,flexShrink:0},children:e.jsx(v,{variant:"contained",fullWidth:!0,onClick:re,disabled:!I.some(Boolean),sx:{height:48,bgcolor:"#FF9900",color:"#232F3E",fontSize:"1.1rem",borderRadius:2,"&:hover":{bgcolor:"#EC7211"}},children:h==="en"?"Submit":"åç"})}),e.jsxs(Ie,{open:b==="correct",onClose:be,PaperProps:{sx:{bgcolor:r?"#1e1e1e":void 0,minWidth:{xs:"85vw",sm:380}}},children:[e.jsxs(Se,{sx:{textAlign:"center",pt:3,pb:1,px:3},children:[e.jsx(qt,{sx:{fontSize:72,color:"#1D8102",mb:1}}),e.jsx(a,{variant:"h5",sx:{color:ke,fontWeight:700},children:h==="en"?"Correct":"æ£è§£"})]}),e.jsxs(Ce,{sx:{justifyContent:"center",pb:3,px:3,gap:1.5,flexWrap:"wrap"},children:[e.jsx(v,{variant:"contained",size:"large",sx:{bgcolor:"#FF9900",color:"#232F3E",fontWeight:700,minWidth:132,py:1.25,"&:hover":{bgcolor:"#EC7211"}},onClick:De,children:h==="en"?"Next":"次ã¸"}),e.jsx(v,{variant:"outlined",size:"large",sx:{fontWeight:700,minWidth:132,py:1.25,color:ke,borderColor:r?"rgba(255,255,255,0.5)":"rgba(0,0,0,0.5)"},onClick:Ue,children:h==="en"?"Explanation":"解説"})]})]}),e.jsxs(Ie,{open:b==="incorrect",onClose:be,PaperProps:{sx:{bgcolor:r?"#1e1e1e":void 0,minWidth:{xs:"85vw",sm:420},maxWidth:560}},children:[e.jsxs(Se,{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:ke,fontWeight:700},children:h==="en"?"Incorrect":"䏿£è§£"})]}),e.jsxs(i,{sx:{mt:2},children:[e.jsx(a,{variant:"subtitle2",sx:{mb:.75,color:r?"#bbb":"#555",fontWeight:700},children:h==="en"?"Correct answer(s)":"æ£è§£"}),G.correctAnswers.map(A=>{const V=$.options[A]??"",ie=/^[A-Z][\.\)]/.test(V.trim()),Y=String.fromCharCode(65+A);return e.jsx(i,{sx:{py:.75,px:1.25,mb:.5,borderRadius:1,bgcolor:r?"rgba(29, 129, 2, 0.18)":"#e8f5e9",border:"1px solid #1D8102"},children:e.jsxs(a,{variant:"body2",sx:{color:r?"#a5d6a7":"#1D8102",whiteSpace:"pre-wrap",wordBreak:"break-word",lineHeight:1.5},children:[ie?V:`${Y}. ${V}`," â"]})},A)})]})]}),e.jsxs(Ce,{sx:{justifyContent:"center",pb:3,px:3,gap:1.5,flexWrap:"wrap"},children:[e.jsx(v,{variant:"contained",size:"large",sx:{bgcolor:"#FF9900",color:"#232F3E",fontWeight:700,minWidth:132,py:1.25,"&:hover":{bgcolor:"#EC7211"}},onClick:De,children:h==="en"?"Next":"次ã¸"}),e.jsx(v,{variant:"outlined",size:"large",sx:{fontWeight:700,minWidth:132,py:1.25,color:ke,borderColor:r?"rgba(255,255,255,0.5)":"rgba(0,0,0,0.5)"},onClick:Ue,children:h==="en"?"Explanation":"解説"})]})]})]})},ls="https://nicheelab-api.fjyjfrtfzy.workers.dev";function cs({questionId:o,examType:t,setNumber:s,questionTitle:n}){const{siteLocale:d}=de(),r=(P,b)=>d==="en"?b:P,[E,m]=l.useState(!1),[j,S]=l.useState("error"),[u,c]=l.useState(""),[h,y]=l.useState(!1),[g,C]=l.useState(!1),[f,k]=l.useState(""),M=async()=>{if(u.trim().length<5){k(r("5æå以ä¸ã§å
¥åãã¦ãã ãã","Enter at least 5 characters"));return}y(!0),k("");try{const P=localStorage.getItem("exam_jwt_token"),b=await fetch(`${ls}/api/reports`,{method:"POST",headers:{"Content-Type":"application/json",...P?{Authorization:`Bearer ${P}`}:{}},body:JSON.stringify({questionId:o,examType:t,setNumber:s,reportType:j,message:u.trim()})});if(!b.ok){const w=await b.json().catch(()=>({}));throw new Error(w.error||r("éä¿¡ã«å¤±æãã¾ãã","Failed to send"))}C(!0)}catch(P){k(P instanceof Error?P.message:r("éä¿¡ã«å¤±æãã¾ãã","Failed to send"))}finally{y(!1)}},I=()=>{m(!1),c(""),S("error"),k(""),C(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(v,{size:"small",startIcon:e.jsx(pr,{sx:{fontSize:16}}),onClick:()=>
1m(!0),sx:{color:"#879596",fontSize:12,textTransform:"none","&:hover":{color:"#FF3621"}},children:r("åé¡ã®èª¤ããå ±å","Report an error")}),e.jsx(Ie,{open:E,onClose:I,maxWidth:"sm",fullWidth:!0,children:g?e.jsxs(e.Fragment,{children:[e.jsxs(Se,{sx:{textAlign:"center",py:5},children:[e.jsx(Me,{sx:{fontSize:56,color:"#1D8102",mb:2}}),e.jsx(a,{variant:"h6",sx:{fontWeight:700,mb:1},children:r("å ±åãåãä»ãã¾ãã","Report received")}),e.jsx(a,{variant:"body2",sx:{color:"#545B64"},children:r("確èªã®ãããä¿®æ£ãè¡ãã¾ãããååãããã¨ããããã¾ãã","We'll review it and make any needed fixes. Thanks for the help.")})]}),e.jsx(Ce,{children:e.jsx(v,{onClick:I,children:r("éãã","Close")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(ot,{sx:{fontWeight:700},children:r("åé¡ã®èª¤ããå ±å","Report an error")}),e.jsxs(Se,{children:[n&&e.jsx(a,{variant:"body2",sx:{color:"#545B64",mb:2,bgcolor:"#F2F3F3",p:1.5,borderRadius:1},children:r(`対象: ${n}`,`Target: ${n}`)}),e.jsxs(gr,{fullWidth:!0,sx:{mb:2},children:[e.jsx(br,{children:r("å ±å種å¥","Report type")}),e.jsxs(kt,{value:j,label:r("å ±å種å¥","Report type"),onChange:P=>S(P.target.value),children:[e.jsx(ye,{value:"error",children:r("æ£è§£ã»è§£èª¬ã®èª¤ã","Wrong answer or explanation")}),e.jsx(ye,{value:"typo",children:r("誤åã»è±å","Typo")}),e.jsx(ye,{value:"outdated",children:r("æ
å ±ãå¤ã","Out of date")}),e.jsx(ye,{value:"unclear",children:r("å顿ããããã«ãã","Question is unclear")}),e.jsx(ye,{value:"other",children:r("ãã®ä»","Other")})]})]}),e.jsx(Ae,{fullWidth:!0,multiline:!0,rows:4,label:r("詳細ï¼ã©ããã©ãééã£ã¦ãããï¼","Details (what is wrong and how)"),value:u,onChange:P=>c(P.target.value),placeholder:r("ä¾: æ£è§£ãAã¨ãªã£ã¦ãã¾ãããBãæ£ããã¨æãã¾ããçç±ã¯...","Example: The answer is marked A, but I believe B is correct because..."),inputProps:{maxLength:1e3}}),f&&e.jsx(a,{color:"error",variant:"body2",sx:{mt:1},children:f}),e.jsx(i,{sx:{mt:1,textAlign:"right"},children:e.jsxs(a,{variant:"caption",sx:{color:"#879596"},children:[u.length,"/1000"]})})]}),e.jsxs(Ce,{children:[e.jsx(v,{onClick:I,sx:{color:"#545B64"},children:r("ãã£ã³ã»ã«","Cancel")}),e.jsx(v,{onClick:M,variant:"contained",disabled:h,sx:{bgcolor:"#FF3621","&:hover":{bgcolor:"#E02E1B"}},children:h?r("éä¿¡ä¸...","Sending..."):r("éä¿¡","Send")})]})]})})]})}const Jn=()=>{Yt();const o=ge(),{id:t}=fn(),{pathname:s}=Mr(),n=Number(t),{examType:d}=_e(),{darkMode:r}=Ke(),{isSubscribed:E,loading:m}=Pe(),{siteLocale:j,effectiveStudyMode:S}=de(),u=j==="en",c=(T,D)=>u?D:T,[h,y]=l.useState(!1),g=s.includes("mock-problem"),C=d?`${d}_`:"",f=d?`${d}_mock_`:"",k=Number(localStorage.getItem(g?`${f}currentSet`:`${C}currentSet`)||"1"),M=!g&&d?tr(it(d).problems,n):null,I=(M==null?void 0:M.set)??k;l.useEffect(()=>{if(!d)return;let T=!1;return(g?at(d):st(d)).then(()=>{T||y(!0)}),()=>{T=!0}},[d,g]),l.useEffect(()=>{d||o("/kafka-exam/select")},[d,o]);const b=(d?g?qe(d,I):Je(d,I):{problems:[]}).problems,w=b.find(T=>T.id===n),R=w?pt(w,j,S):null,X=b.findIndex(T=>T.id===n),O=()=>{if(X>=0&&X<b.length-1){const T=b[X+1].id;o(g?`/kafka-exam/mock-problem/${T}`:`/kafka-exam/training-problem/${T}`)}else o(g?"/kafka-exam/mock-exam/result":"/kafka-exam/practice/result")},K=()=>o("/kafka-exam/menu");return w&&mn(g?"mock":"practice",I,{isSubscribed:E,loading:m})?e.jsx(i,{sx:{minHeight:"100vh",bgcolor:"#F2F3F3"},children:e.jsx(Xe,{open:!0,onClose:()=>o(g?"/kafka-exam/mock":"/kafka-exam/practice")})}):!h||!w||!R?e.jsx(i,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh",bgcolor:"#F5F7FA"},children:e.jsx(a,{sx:{color:"#666"},children:h?c("åé¡ãè¦ã¤ããã¾ãã","Question not found"):c("èªã¿è¾¼ã¿ä¸...","Loading...")})}):e.jsxs(i,{className:r?"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("/kafka-exam/menu"),"aria-label":c("æ»ã","Back"),sx:{minWidth:48,minHeight:48},children:e.jsx(Re,{sx:{color:"#fff"}})}),e.jsxs(a,{variant:"h6",sx:{color:"#fff",flex:1,textAlign:"center",fontSize:{xs:"0.95rem",md:"1.25rem"}},children:[R.title," ",j==="en"?"Explanation":c("解説","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(Be,{children:e.jsx(wt,{text:R.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:R.options.map((T,D)=>{const N=w.correctAnswers.includes(D);return e.jsxs(J,{sx:{display:"flex",alignItems:"center",border:N?"2px solid #1D8102":"2px s
1olid transparent",bgcolor:N?"#f0fff0":"white",borderRadius:2,p:1.5,minHeight:52,boxShadow:N?"0 2px 8px rgba(29,129,2,0.12)":"0 1px 3px rgba(0,0,0,0.06)"},elevation:0,children:[e.jsx(mr,{checked:N,sx:{color:N?"#1D8102":"#ccc",p:.5,mr:1}}),e.jsx(Be,{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+D),"."]}),T]})})]},D)})}),e.jsxs(J,{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:j==="en"?"Explanation":c("解説","Explanation")}),e.jsx(Be,{children:e.jsx(wt,{text:R.explanation,sx:{color:"#333",whiteSpace:"pre-line",lineHeight:1.9,fontSize:{xs:14,md:15}}})})]}),Array.isArray(w.sources)&&w.sources.length>0&&e.jsxs(J,{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:["ð ",c("å
¬å¼ãªãã¡ã¬ã³ã¹","Official references")]}),e.jsx(i,{component:"ul",sx:{pl:2.5,m:0},children:w.sources.map((T,D)=>e.jsx(a,{component:"li",variant:"body2",sx:{mb:.5,color:"#333"},children:e.jsx(i,{component:"a",href:T,target:"_blank",rel:"noopener noreferrer",sx:{color:"#1976d2",wordBreak:"break-all",textDecoration:"underline"},children:T})},D))})]}),e.jsx(i,{sx:{mt:2,textAlign:"right"},children:e.jsx(cs,{questionId:w.id,examType:d,setNumber:I,questionTitle:w.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(v,{variant:"outlined",onClick:K,startIcon:e.jsx(yn,{}),sx:{height:{xs:48,md:56},borderColor:"#232F3E",color:"#232F3E",borderRadius:2,minWidth:48,"&:hover":{bgcolor:"#f0f0f0"}},children:j==="en"?"Menu":c("ã¡ãã¥ã¼","Menu")}),e.jsx(v,{variant:"contained",fullWidth:!0,onClick:O,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:j==="en"?"Next":c("次ã¸","Next")})]})]})};function ds(){const o=ge(),[t,s]=l.useState(0),[n,d]=l.useState(!1),{examType:r}=_e(),{darkMode:E}=Ke(),m=gt(r?()=>st(r):null,r),{isLoggedIn:j}=Pe(),{isSubscribed:S}=Pe(),{siteLocale:u,studyMode:c}=de(),h=(p,q)=>u==="en"?q:p,[y,g]=l.useState(u==="en"||c==="en-question"?"en":"ja"),C=r?`${r}_`:"",f=localStorage.getItem(`${C}currentSet`)||"1",M=(r?Je(r,Number(f)):{problems:[]}).problems,I=M.length,P=Number(localStorage.getItem(`${C}correctCount`)||0),b=I>0?Math.round(P/I*100):0,w=localStorage.getItem(`${C}answersDetail`)||"[]",R=JSON.parse(w),X=new Map(R.map(p=>[p.questionId,p])),O={};for(const p of R){const q=M.find(re=>re.id===p.questionId);if(!q)continue;const B=q.category;O[B]||(O[B]={correct:0,total:0}),O[B].total+=1,p.isCorrect&&(O[B].correct+=1)}const K=Object.entries(O).map(([p,q])=>({category:p,correct:q.correct,total:q.total})),[T,D]=l.useState(null),[N,ne]=l.useState(null),[U,G]=l.useState(null);l.useEffect(()=>{j&&r&&vn(r,"practice",Number(f)).then(p=>{D(p.correct),ne(p.rate),G(p.categories.map(q=>({category:q.name,correct:q.correct,total:q.total})))}).catch(()=>{})},[j,r,f]);const _=R.length>0?P:T??P,$=R.length>0?b:N??b,L=K.length>0?K:U??[];l.useEffect(()=>{if(!r){o("/kafka-exam/select");return}m&&I>0&&R.length>0&&localStorage.setItem(`practice_result_${r}_set${f}`,JSON.stringify({rate:$,correct:_,total:I}))},[r,o,f,$,_,I,R.length,m]);const H=Number(f)+1,F=r?En(r):0,x=H<=F,W=!S&&H>3,Q=()=>{if(W){d(!0);return}if(D(null),ne(null),G(null),r){const p=`${r}_`;localStorage.setItem(`${p}answeredCount`,"0"),localStorage.setItem(`${p}correctCount`,"0"),localStorage.setItem(`${p}answersDetail`,"[]"),localStorage.setItem(`${p}currentSet`,String(H));const q=Je(r,H).problems,B=q.length>0?q[0].id:1;o(`/kafka-exam/training-problem/${B}`,{replace:!0})}else o("/kafka-exam/training-problem/1")};return r?m?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("/kafka-exam/practice"),"aria-label":h("ä¸è¦§ã¸æ»ã","Back to list"),sx:{color:"#fff",minWidth:48,minHeight:48},children:e.jsx(Re,{})}),e.jsx(a,{variant:"h6",sx:{color:"#fff",flex:1,textAlign:"center"},children:u==="en"?`Practice ${f} Results`:`ç·´ç¿${f} çµæ`}),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(v,{onClick:()=>g("ja"),sx:{minWidth:56,height:36,fontWeight:700,fontSize:14,bgcolor:y==="ja"?"#232F3E":"transparent",color:y==="ja"?"#fff":"#666",borderRadius:0,"&:hover":{bgcolor:y==="ja"?"#232F3E":"#e0e0e0"}},children:"JA"}),e.jsx(v,{onClick:()=>g("en"),sx:{minWidth:56,height:36,fontWeight:700,fontSize:14,bgcolor:y==="en"?"#232F3E":"transparent",color:y==="en"?"#fff":"#666",borderRadius:0,"&:hover":{bgcolor:y==="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(kn,{value:t,onChange:(p,q)=>s(q),textColor:"primary",indicatorColor:"primary",sx:{flex:1},children:[e.jsx(Ye,{label:u==="en"?"Results":"試é¨çµæ"}),e.jsx(Ye,{label:u==="en"?"By Category":"ã«ãã´ãªã¼å¥"})]}),e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:.5,mr:1,flexShrink:0},children:[e.jsx(v,{onClick:()=>o("/kafka-exam/practice"),size:"small",sx:{color:"#232F3E",fontWeight:700,fontSize:"0.85rem",whiteSpace:"nowrap",minHeight:44,minWidth:56},children:u==="en"?"List":"ä¸è¦§"}),x&&e.jsx(v,{onClick:Q,size:"small",sx:{color:W?"#555":"#232F3E",bgcolor:W?"#E8E8E8":"#FF9900",minHeight:44,px:1.5,"&:hover":{bgcolor:W?"#DDD":"#EC7211"},fontWeight:700,fontSize:"0.85rem",whiteSpace:"nowrap"},children:W?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(J,{sx:{p:3,mb:2,textAlign:"center"},children:[e.jsxs(a,{variant:"h4",sx:{color:"#FF9900",fontWeight:"bold",mb:1},children:[$,"%"]}),e.jsx(He,{variant:"determinate",value:$,sx:{height:10,borderRadius:5,bgcolor:"#F2F3F3",mb:1,"& .MuiLinearProgress-bar":{backgroundColor:$>=70?"#1D8102":"#D13212"}}}),e.jsx(a,{variant:"body1",children:u==="en"?`${_} correct out of ${I}`:`${I}åä¸ ${_}åæ£è§£`})]}),$>=90&&e.jsxs(J,{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!":"ç´ æ´ãããæç¸¾ã§ãï¼"})]}),$>=70&&$<90&&e.jsx(J,{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"?$>=70?"You have reached the passing range. Keep studying.":"You need a bit more practice. Review the questions you missed.":$>=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":"åé¡å¥ è§£çã»è§£èª¬"}),M.map((p,q)=>{const B=pt(p,y==="en"?"en":"ja",y==="en"?"en-question":"ja"),re=X.get(p.id),be=(re==null?void 0:re.isCorrect)??!1,De=!!re;return e.jsxs(jr,{sx:{mb:1},children:[e.jsx(yr,{expandIcon:e.jsx(Sr,{}),children:e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%"},children:[De?be?e.jsx(Me,{sx:{color:"#1D8102",fontSize:22}}):e.jsx(kr,{sx:{color:"#D13212",fontSize:22}}):e.jsx(Ne,{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(vr,{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((Ue,we)=>{const ke=p.correctAnswers.includes(we);return e.jsx(i,{sx:{p:1,mb:.5,borderRadius:1,bgcolor:ke?"#e8f5e9":"transparent",border:ke?"1px solid #1D8102":"1px solid #eee"},children:e.jsxs(a,{variant:"body2",sx:{color:ke?"#1D8102":"#555"},children:[String.fromCharCode(65+we),". ",Ue," ",ke&&"â"]})},we)})}),e.jsxs(J,{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})]})]})]},p.id)})]}),t===1&&e.jsxs(J,{sx:{p:2},children:[e.jsx(a,{variant:"h6",sx:{mb:1},children:u==="en"?"Accuracy by Category":"ã«ãã´ãªã¼å¥æ£è§£ç"}),e.jsx(Ee,{children:L.map((p,q)=>{const B=p.total?Math.round(p.correct/p.total*100):0;return e.jsxs(le,{sx:{flexDirection:"column",alignItems:"stretch"},children:[e.jsx(oe,{primary:p.category,secondary:`${p.correct}/${p.total} (${B}%)`}),e.jsx(He,{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("/kafka-exam/practice"),sx:{bgcolor:"#232F3E",color:"white",width:48,height:48,"&:hover":{bgcolor:"#1B2631"}},title:u==="en"?"Go to practice list":"ç·´ç¿åé¡ä¸è¦§ã¸",children:e.jsx(yn,{})})}),e.jsx(Xe,{open:n,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 xs=()=>{const{siteLocale:o}=de(),t=(k,M)=>o==="en"?M:k,s=ge(),{examType:n}=_e(),{darkMode:d}=Ke();gt(n?()=>Promise.all([st(n),at(n)]):null,n);const[r,E]=l.useState(!1);if(!n)return s("/kafka-exam/select"),null;const m=it(n).problems,j=Gt(n).problems,S=Tn(`${n}_wrong_answers`),u=Tn(`${n}_mock_wrong_answers`),c=[...m.filter(k=>S.includes(k.id)).map(k=>({ref:k.id,problem:k})),...j.filter(k=>u.includes(k.id)).map(k=>({ref:-k.id,problem:k}))],h=c.map(k=>k.problem),y=c.map(k=>k.ref),g={};for(const k of h)g[k.category]||(g[k.category]=[]),g[k.category].push(k);const C=()=>
1{if(h.length===0)return;const k=[...y].sort(()=>Math.random()-.5);localStorage.setItem(`${n}_review_queue`,JSON.stringify(k)),localStorage.setItem(`${n}_review_index`,"0"),s("/kafka-exam/review-problem")},f=k=>{const I=c.filter(P=>P.problem.category===k).map(P=>P.ref).sort(()=>Math.random()-.5);localStorage.setItem(`${n}_review_queue`,JSON.stringify(I)),localStorage.setItem(`${n}_review_index`,"0"),s("/kafka-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("/kafka-exam/menu"),children:e.jsx(Re,{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(J,{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(J,{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(J,{onClick:C,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(io,{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(J,{onClick:()=>E(!r),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(lo,{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(g).length}ã«ãã´ãªã¼`,`${Object.keys(g).length} categories`)})]})]}),r&&e.jsx(Ee,{sx:{bgcolor:"#f9f9f9",borderRadius:2},children:Object.entries(g).map(([k,M])=>e.jsxs(le,{onClick:()=>f(k),sx:{cursor:"pointer","&:hover":{bgcolor:"#eee"}},children:[e.jsx(oe,{primary:k,primaryTypographyProps:{fontWeight:600}}),e.jsx(Ne,{label:t(`${M.length}å`,`${M.length} questions`),size:"small",sx:{bgcolor:"#0073BB",color:"#fff"}})]},k))})]})]}),e.jsx(i,{sx:{p:2,display:"flex",justifyContent:"center",flexShrink:0},children:e.jsx(v,{variant:"outlined",onClick:()=>s("/kafka-exam/menu"),sx:{color:"#232F3E",borderColor:"#232F3E"},children:t("ãã¼ã ã¸æ»ã","Back to home")})})]})},us="/sounds/correct.mp3",hs="/sounds/incorrect.mp3",fs=()=>{const{siteLocale:o,effectiveStudyMode:t}=de(),s=(x,W)=>o==="en"?W:x;Yt();const n=ge(),{examType:d}=_e();gt(d?()=>Promise.all([st(d),at(d)]):null,d);const{soundEnabled:r}=Kt(),{darkMode:E,toggleDarkMode:m}=Ke(),{easyMode:j,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,K(x))};l.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]);const y=JSON.parse(localStorage.getItem(`${d}_review_queue`)||"[]"),g=Number(localStorage.getItem(`${d}
1_review_index`)||"0"),[C,f]=l.useState(g),k=y[C],M=d?it(d).problems:[],I=d?Gt(d).problems:[],P=typeof k=="number"&&k<0,b=(P?I:M).find(x=>x.id===Math.abs(k)),w=b?pt(b,o,t):null,[R,X]=l.useState([]),[O,K]=l.useState(null);l.useEffect(()=>{b&&X(Array(b.options.length).fill(!1)),u.current&&(clearTimeout(u.current),u.current=null)},[C,b==null?void 0:b.options.length]),l.useEffect(()=>{r&&O==="correct"?new Audio(us).play().catch(()=>{}):r&&O==="incorrect"&&new Audio(hs).play().catch(()=>{})},[O,r]),l.useEffect(()=>{d||n("/kafka-exam/select")},[d,n]);const T=l.useCallback(x=>{if(d&&x){const W=P?`${d}_mock_wrong_answers`:`${d}_wrong_answers`,Q=localStorage.getItem(W)||"[]";let p=JSON.parse(Q);p=p.filter(q=>q!==Math.abs(k)),localStorage.setItem(W,JSON.stringify(p))}},[d,k,P]);if(!d||!b)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(v,{variant:"outlined",onClick:()=>n("/kafka-exam/review"),children:s("復ç¿ã¡ãã¥ã¼ã¸æ»ã","Back to Review Menu")})]});const D=x=>{c.current||(u.current&&(clearTimeout(u.current),u.current=null),X(W=>{const Q=b.correctAnswers.length;if(j&&Q===1){const B=W.map((re,be)=>be===x);return setTimeout(()=>{if(c.current)return;const re=b.correctAnswers[0]===x;h(re?"correct":"incorrect"),T(re)},0),B}const p=[...W];p[x]=!p[x];const q=p.filter(Boolean).length;return j&&q>=b.correctAnswers.length&&(u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{if(u.current=null,c.current)return;const B=p.map((be,De)=>be?De:-1).filter(be=>be!==-1),re=B.length===b.correctAnswers.length&&B.every((be,De)=>be===b.correctAnswers[De]);h(re?"correct":"incorrect"),T(re)},1e3)),p}))},N=()=>{if(c.current)return;const x=R.map((Q,p)=>Q?p:-1).filter(Q=>Q!==-1),W=x.length===b.correctAnswers.length&&x.every((Q,p)=>Q===b.correctAnswers[p]);h(W?"correct":"incorrect"),T(W)},ne=()=>{c.current=null,K(null)},U=()=>{ne();const x=C+1;x<y.length?(localStorage.setItem(`${d}_review_index`,String(x)),f(x)):n("/kafka-exam/review")},G=E?"#121212":"#F2F3F3",_=E?"#e0e0e0":"#333",$=E?"#b0b0b0":"#444",L=E?"#333":"#e0e0e0",H=E?"#FF9900":"#232F3E",F=y.length>0?(C+1)/y.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:()=>n("/kafka-exam/review"),children:e.jsx(Re,{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(`å¾©ç¿ (${C+1}/${y.length})`,`Review (${C+1}/${y.length})`)}),e.jsx(ce,{onClick:m,children:E?e.jsx(Nt,{sx:{color:"#fff"}}):e.jsx(Bt,{sx:{color:"#fff"}})}
1),e.jsx(ce,{onClick:S,sx:{color:j?"#FF9900":"rgba(255,255,255,0.6)"},children:e.jsx(At,{})})]}),e.jsxs(i,{sx:{px:2,pt:1.5,pb:.5},children:[e.jsx(He,{variant:"determinate",value:F,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:$},children:[C+1,"/",y.length]})]}),e.jsxs(i,{sx:{px:2,py:2,flex:1,overflowY:"auto"},children:[e.jsx(Be,{children:e.jsx(wt,{text:(w==null?void 0:w.question)??"",sx:{color:_,whiteSpace:"pre-line",mb:3}})}),e.jsx(i,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:((w==null?void 0:w.options)??[]).map((x,W)=>e.jsxs(J,{onClick:()=>D(W),sx:{display:"flex",alignItems:"center",bgcolor:j&&R[W]?E?"#2a2a2a":"#e0e0e0":E?"#1e1e1e":"#fff",border:R[W]?`2px solid ${H}`:`1px solid ${L}`,borderRadius:1,p:1.5,cursor:"pointer",transition:"all 0.2s"},elevation:0,children:[e.jsx(Qe,{checked:R[W],onChange:()=>D(W),onClick:Q=>Q.stopPropagation(),sx:{mr:1,p:.5,color:E?"#fff":void 0}}),e.jsx(Be,{children:e.jsx(a,{variant:"body1",sx:{color:$},children:x})})]},W))})]}),!j&&e.jsx(i,{sx:{p:2,flexShrink:0},children:e.jsx(v,{variant:"contained",fullWidth:!0,onClick:N,disabled:!R.some(Boolean),sx:{height:48,bgcolor:"#FF9900",color:"#232F3E",fontSize:"1.1rem",borderRadius:2,"&:hover":{bgcolor:"#EC7211"}},children:s("åç","Answer")})}),e.jsxs(Ie,{open:O==="correct",onClose:ne,PaperProps:{sx:{bgcolor:E?"#1e1e1e":void 0,minWidth:{xs:"85vw",sm:380}}},children:[e.jsxs(Se,{sx:{textAlign:"center",pt:3,pb:1,px:3},children:[e.jsx(qt,{sx:{fontSize:72,color:"#1D8102",mb:1}}),e.jsx(a,{variant:"h5",sx:{color:_,fontWeight:700},children:s("æ£è§£","Correct")})]}),e.jsx(Ce,{sx:{justifyContent:"center",pb:3,px:3},children:e.jsx(v,{variant:"contained",size:"large",sx:{bgcolor:"#FF9900",color:"#232F3E",fontWeight:700,minWidth:160,py:1.25,"&:hover":{bgcolor:"#EC7211"}},onClick:U,children:s("次ã¸","Next")})})]}),e.jsxs(Ie,{open:O==="incorrect",onClose:ne,PaperProps:{sx:{bgcolor:E?"#1e1e1e":void 0,minWidth:{xs:"85vw",sm:420},maxWidth:560}},children:[e.jsxs(Se,{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")}),b.correctAnswers.map(x=>{const W=(w==null?void 0:w.options[x])??"",Q=/^[A-Z][\.\)]/.test(W.trim()),p=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:[Q?W:`${p}. ${W}`," â"]})},x)})]})]}),e.jsx(Ce,{sx:{justifyContent:"center",pb:3,px:3},children:e.jsx(v,{variant:"contained",size:"large",sx:{bgcolor:"#FF9900",color:"#232F3E",fontWeight:700,minWidth:160,py:1.25,"&:hover":{bgcolor:"#EC7211"}},onClick:U,children:s("次ã¸","Next")})})]})]})};function ms(o,t){const s=localStorage.getItem(`mock_result_${t}_set${o}`);if(!s)return{rate:0,done:!1};try{const n=JSON.parse(s);return{rate:Number(n.rate)||0,done:!0}}catch{return{rate:0,done:!1}}}const ps=()=>{const{siteLocale:o}=de(),t=(u,c)=>o==="en"?c:u,s=ge(),{examType:n}=_e();gt(n?()=>at(n):null,n);const d=n?In(n):0,E=(n?qe(n,1):{problems:[]}).problems.length,m=u=>{if(!n)return;nr(n,u);const c=qe(n,u).problems;s(`/kafka-exam/mock-problem/${c.length>0?c[0].id:1}`)},j=u=>{if(!n)return;const c=qe(n,u).problems,h=ln(n);if($n(h,u,c.length)){const y=er(c,h.answeredIds);s(y===null?"/kafka-exam/mock-exam/result":`/kafka-exam/mock-problem/${y}`);return}m(u)},S=u=>{if(!n)return null;const c=ln(n),h=qe(n,u).problems.length;return $n(c,u,h)?c.answeredIds.length:null};return e.jsx(Lr,{mode:"mock",title:t("模æ¬è©¦é¨","Mock exam"),subtitle:t(`å${E}åã»æ¬çªå½¢å¼`,`${E} questions each, exam format`),setCount:d,getLocalResult:ms,onSetClick:j,getSetProblems:u=>n?qe(n,u).problems:[],getInProgress:S,onRestart:m})},gs="/sounds/correct.mp3",bs="/sounds/incorrect.mp3",js=()=>{Yt();const{id:o}=fn(),t=ge(),s=Number(o),{examType:n}=_e(),{soundEnabled:d}=Kt(),{darkMode:r,toggleDarkMode:E}=Ke(),{easyMode:m,toggleEasyMode:j}=Ut(),{isLoggedIn:S,isSubscribed:u,loading:c}=Pe(),{siteLocale:h,effectiveStudyMode:y,isEnglishQuestionMode:g,toggleEnglishQuestionMode:C}=de(),f=(A,V)=>h==="en"?V:A,[k,M]=l.useState(!1),[I,P]=l.useState(!1),[b,w]=l.useState([]),[R,X]=l.useState(null),[O,K]=l.useState(null),T=l.useRef(null),D=l.useRef(null),N=A=>{D.current||(T.current&&(clearTimeout(T.current),T.current=null),D.current=A,Vn.flushSync(()=>{X(A)}))};l.useEffect(()=>()=>{T.current&&clearTimeout(T.current)},[]);const ne=n?`${n}_mock_`:"",U=Number(localStorage.getItem(`${ne}currentSet`)||"1");l.useEffect(()=>{if(!n)return;let A=!1;return at(n).then(()=>{A||P(!0)}),()=>{A=!0}},[n]);const G=n?qe(n,U):{problems:[]},_=G.problems.length,$=localStorage.getItem(`${ne}answersDetail`)||"[]",L=new Set(JSON.parse($).map(A=>A.questionId)).size,H=Math.min(_>0?L/_*100:0,100),F=G.problems.find(A=>A.id===s),x=F?pt(F,h,y):null;if(l.useEffect(()=>{x&&w(Array(x.options.length).fill(!1)),D.current=null,X(null)},[s,I]),l.useEffect(()=>{d&&R==="correct"?new Audio(gs).play().catch(()=>{}):d&&R==="incorrect"&&new Audio(bs).play().catch(()=>{})},[R,d]),l.useEffect(()=>{T.current&&(clearTimeout(T.current),T.current=null),x&&w(Array(x.options.length).fill(!1))},[s,x==null?void 0:x.options.length]),l.useEffect(()=>{n||t("/kafka-exam/select")},[n,t]),l.useEffect(()=>{var A;n&&((A=ln(n))!=null&&A.completed)&&t("/kafka-exam/mock",{replace:!0})},[n,s,t]),F&&mn("mock",U,{isSubscribed:u,loading:c}))return e.jsx(i,{sx:{minHeight:"100vh",bgcolor:"#F2F3F3"}
1,children:e.jsx(Xe,{open:!0,onClose:()=>t("/kafka-exam/mock")})});if(!I||!F||!x)return e.jsx(i,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"100vh",bgcolor:"#f5f5f5"},children:e.jsx(a,{sx:{color:"#666"},children:I?f("åé¡ãè¦ã¤ããã¾ãã","Question not found"):f("åé¡ãã¼ã¿ãèªã¿è¾¼ã¿ä¸...","Loading questions...")})});const W=A=>{D.current||(T.current&&(clearTimeout(T.current),T.current=null),w(V=>{const ie=F.correctAnswers.length;if(m&&ie===1){const ae=V.map((xe,se)=>se===A);return setTimeout(()=>{if(D.current)return;const xe=F.correctAnswers[0]===A;N(xe?"correct":"incorrect"),Q(xe,[A])},0),ae}const Y=[...V];Y[A]=!Y[A];const Ze=Y.filter(Boolean).length;return m&&Ze>=F.correctAnswers.length&&(T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{if(T.current=null,D.current)return;const ae=Y.map((se,ze)=>se?ze:-1).filter(se=>se!==-1),xe=ae.length===F.correctAnswers.length&&ae.every((se,ze)=>se===F.correctAnswers[ze]);N(xe?"correct":"incorrect"),Q(xe,ae)},1e3)),Y}))},Q=(A,V)=>{const ie=localStorage.getItem(`${ne}answersDetail`)||"[]";let Y=JSON.parse(ie);Y=Y.filter(ae=>ae.questionId!==s),Y.push({questionId:s,isCorrect:A,category:F.category,ts:Date.now()}),localStorage.setItem(`${ne}answersDetail`,JSON.stringify(Y));const Ze=Y.filter(ae=>ae.isCorrect).length;if(localStorage.setItem(`${ne}answeredCount`,String(Y.length)),localStorage.setItem(`${ne}correctCount`,String(Ze)),S&&n){const ae=V??b.map((xe,se)=>xe?se:-1).filter(xe=>xe!==-1);wr({question_id:s,selected_choice_ids:ae,is_correct:A,exam_type:n,question_set:"mock",set_number:U}).catch(()=>{})}if(n){const ae=`${n}_mock_wrong_answers`,xe=localStorage.getItem(ae)||"[]";let se=JSON.parse(xe);A?se=se.filter(ze=>ze!==s):se.includes(s)||se.push(s),localStorage.setItem(ae,JSON.stringify(se))}},p=()=>{if(D.current)return;const A=b.map((ie,Y)=>ie?Y:-1).filter(ie=>ie!==-1),V=A.length===F.correctAnswers.length&&A.every((ie,Y)=>ie===F.correctAnswers[Y]);N(V?"correct":"incorrect"),Q(V,A)},q=()=>{D.current=null,X(null)},B=G.problems,re=B.findIndex(A=>A.id===s),be=()=>{if(q(),re>=0&&re<B.length-1){const A=B[re+1].id;t(`/kafka-exam/mock-problem/${A}`)}else t("/kafka-exam/mock-exam/result")},De=()=>{q(),t(`/kafka-exam/mock-problem/${s}/explanation`)},Ue=r?"#121212":"#F2F3F3",we=r?"#e0e0e0":"#333",ke=r?"#b0b0b0":"#444",Et=r?"#333":"#e0e0e0",Jt=r?"#FF9900":"#232F3E";return e.jsxs(i,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",width:"100%",bgcolor:Ue},children:[e.jsxs(i,{sx:{height:64,bgcolor:"#232F3E",display:"flex",alignItems:"center",px:1,flexShrink:0},children:[e.jsx(ce,{onClick:()=>t("/kafka-exam/mock"),"aria-label":f("æ»ã","Back"),sx:{color:"#fff",minWidth:44,minHeight:44},children:e.jsx(Re,{})}),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 ${U}`:`模æ¬è©¦é¨${U}`}),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:C,"aria-label":g?f("æ¥æ¬èªã«æ»ã","Back to Japanese"):f("è±èªã§è¡¨ç¤º","Show in English"),sx:{color:g?"#29B5E8":"rgba(255,255,255,0.6)",minWidth:44,minHeight:44},children:e.jsx(ur,{})}),e.jsx(ce,{onClick:A=>K(A.currentTarget),"aria-label":f("ã¡ãã¥ã¼","Menu"),sx:{color:"#fff",minWidth:44,minHeight:44},children:e.jsx(hr,{})}),e.jsxs(fr,{anchorEl:O,open:!!O,onClose:()=>K(null),PaperProps:{sx:{minWidth:200}},children:[e.jsxs(ye,{onClick:()=>{E(),K(null)},children:[e.jsx(ft,{children:r?e.jsx(Nt,{fontSize:"small"}):e.jsx(Bt,{fontSize:"small"})}),e.jsx(oe,{children:r?f("ã©ã¤ãã¢ã¼ã","Light mode"):f("ãã¼ã¯ã¢ã¼ã","Dark mode")})]}),e.jsxs(ye,{onClick:()=>{j(),K(null)},children:[e.jsx(ft,{children:e.jsx(At,{fontSize:"small",sx:{color:m?"#FF9900":void 0}})}),e.jsx(oe,{children:m?f("ããããã¢ã¼ã OFF","Easy mode OFF"):f("ããããã¢ã¼ã ON","Easy mode ON")})]}),e.jsxs(ye,{onClick:()=>{K(null),t("/kafka-exam/settings")},children:[e.jsx(ft,{children:e.jsx(bn,{fontSize:"small"})}),e.jsx(oe,{children:f("è¨å®","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(He,{variant:"determinate",value:H,sx:{height:{xs:8,md:10},borderRadius:4,bgcolor:r?"#333":"#F2F3F3","& .MuiLinearProgress-bar":{backgroundColor:"#1D8102"}}}),e.jsxs(a,{sx:{display:"block",textAlign:"center",mt:.5,color:ke,fontSize:{xs:"0.75rem",md:"0.9rem"}},children:[h==="en"?"Progress":"鲿",": ",L,"/",_]})]}),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(Be,{children:e.jsx(wt,{text:x.question,sx:{color:we,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((A,V)=>e.jsxs(J,{onClick:()=>W(V),sx:{display:"flex",alignItems:"center",bgcolor:m&&b[V]?r?"#2a2a2a":"#e0e0e0":r?"#1e1e1e":"#fff",border:b[V]?`2px solid ${Jt}`:`2px solid ${Et}`,borderRadius:2,p:{xs:1.5,md:2.25},minHeight:52,cursor:"pointer",transition:"all 0.2s"}
1,elevation:0,children:[e.jsx(Qe,{checked:b[V],onChange:()=>W(V),onClick:ie=>ie.stopPropagation(),sx:{mr:{xs:1,md:1.5},p:.5,color:r?"#fff":void 0}}),e.jsx(Be,{children:e.jsxs(a,{sx:{color:ke,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+V),"."]}),A]})})]},V))})]}),!m&&e.jsx(i,{sx:{p:2,flexShrink:0},children:e.jsx(v,{variant:"contained",fullWidth:!0,onClick:p,disabled:!b.some(Boolean),sx:{height:48,bgcolor:"#FF9900",color:"#232F3E",fontSize:"1.1rem",borderRadius:2,"&:hover":{bgcolor:"#EC7211"}},children:h==="en"?"Submit":"åç"})}),e.jsxs(Ie,{open:R==="correct",onClose:q,PaperProps:{sx:{bgcolor:r?"#1e1e1e":void 0,minWidth:{xs:"85vw",sm:380}}},children:[e.jsxs(Se,{sx:{textAlign:"center",pt:3,pb:1,px:3},children:[e.jsx(qt,{sx:{fontSize:72,color:"#1D8102",mb:1}}),e.jsx(a,{variant:"h5",sx:{color:we,fontWeight:700},children:h==="en"?"Correct":"æ£è§£"})]}),e.jsxs(Ce,{sx:{justifyContent:"center",pb:3,px:3,gap:1.5,flexWrap:"wrap"},children:[e.jsx(v,{variant:"contained",size:"large",sx:{bgcolor:"#FF9900",color:"#232F3E",fontWeight:700,minWidth:132,py:1.25,"&:hover":{bgcolor:"#EC7211"}},onClick:be,children:h==="en"?"Next":"次ã¸"}),e.jsx(v,{variant:"outlined",size:"large",sx:{fontWeight:700,minWidth:132,py:1.25,color:we,borderColor:r?"rgba(255,255,255,0.5)":"rgba(0,0,0,0.5)"},onClick:De,children:h==="en"?"Explanation":"解説"})]})]}),e.jsxs(Ie,{open:R==="incorrect",onClose:q,PaperProps:{sx:{bgcolor:r?"#1e1e1e":void 0,minWidth:{xs:"85vw",sm:420},maxWidth:560}},children:[e.jsxs(Se,{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:we,fontWeight:700},children:h==="en"?"Incorrect":"䏿£è§£"})]}),e.jsxs(i,{sx:{mt:2},children:[e.jsx(a,{variant:"subtitle2",sx:{mb:.75,color:r?"#bbb":"#555",fontWeight:700},children:h==="en"?"Correct answer(s)":"æ£è§£"}),F.correctAnswers.map(A=>{const V=x.options[A]??"",ie=/^[A-Z][\.\)]/.test(V.trim()),Y=String.fromCharCode(65+A);return e.jsx(i,{sx:{py:.75,px:1.25,mb:.5,borderRadius:1,bgcolor:r?"rgba(29, 129, 2, 0.18)":"#e8f5e9",border:"1px solid #1D8102"},children:e.jsxs(a,{variant:"body2",sx:{color:r?"#a5d6a7":"#1D8102",whiteSpace:"pre-wrap",wordBreak:"break-word",lineHeight:1.5},children:[ie?V:`${Y}. ${V}`," â"]})},A)})]})]}),e.jsxs(Ce,{sx:{justifyContent:"center",pb:3,px:3,gap:1.5,flexWrap:"wrap"},children:[e.jsx(v,{variant:"contained",size:"large",sx:{bgcolor:"#FF9900",color:"#232F3E",fontWeight:700,minWidth:132,py:1.25,"&:hover":{bgcolor:"#EC7211"}},onClick:be,children:h==="en"?"Next":"次ã¸"}),e.jsx(v,{variant:"outlined",size:"large",sx:{fontWeight:700,minWidth:132,py:1.25,color:we,borderColor:r?"rgba(255,255,255,0.5)":"rgba(0,0,0,0.5)"},onClick:De,children:h==="en"?"Explanation":"解説"})]})]}),e.jsx(Xe,{open:k,onClose:()=>M(!1)})]})};function ys(){const o=ge(),[t,s]=l.useState(0),[n,d]=l.useState(!1),{examType:r}=_e(),{darkMode:E}=Ke(),m=gt(r?()=>at(r):null,r),{isLoggedIn:j,isSubscribed:S}=Pe(),{siteLocale:u,studyMode:c}=de(),h=(p,q)=>u==="en"?q:p,[y,g]=l.useState(u==="en"||c==="en-question"?"en":"ja"),C=r?`${r}_mock_`:"",f=Number(localStorage.getItem(`${C}currentSet`)||"1"),M=(r?qe(r,f):{problems:[]}).problems,I=M.length,P=Number(localStorage.getItem(`${C}correctCount`)||0),b=I>0?Math.round(P/I*100):0,w=localStorage.getItem(`${C}answersDetail`)||"[]",R=JSON.parse(w),X=new Map(R.map(p=>[p.questionId,p])),O={};for(const p of R){const q=M.find(re=>re.id===p.questionId);if(!q)continue;const B=q.category;O[B]||(O[B]={correct:0,total:0}),O[B].total+=1,p.isCorrect&&(O[B].correct+=1)}const K=Object.entries(O).map(([p,q])=>({category:p,correct:q.correct,total:q.total})),[T,D]=l.useState(null),[N,ne]=l.useState(null),[U,G]=l.useState(null);l.useEffect(()=>{j&&r&&vn(r,"mock",Number(f)).then(p=>{D(p.correct),ne(p.rate),G(p.categories.map(q=>({category:q.name,correct:q.correct,total:q.total})))}).catch(()=>{})},[j,r,f]);const _=R.length>0?P:T??P,$=R.length>0?b:N??b,L=K.length>0?K:U??[];l.useEffect(()=>{if(!r){o("/kafka-exam/select");return}f&&m&&I>0&&R.length>0&&(localStorage.setItem(`mock_result_${r}_set${f}`,JSON.stringify({rate:$,correct:_,total:I})),Gr(r,I))},[r,o,f,$,_,I,R.length,m]);const H=Number(f)+1,F=r?In(r):0,x=H<=F,W=!S&&H>1,Q=()=>{var q;if(W){d(!0);return}D(null),ne(null),G(null),r&&nr(r,H);const p=r?((q=qe(r,H).problems[0])==null?void 0:q.id)??1:1;o(`/kafka-exam/mock-problem/${p}`,{replace:!0})};return r?m?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("/kafka-exam/mock"),"aria-label":h("ä¸è¦§ã¸æ»ã","Back to list"),sx:{color:"#fff",minWidth:48,minHeight:48},children:e.jsx(Re,{})}),e.jsx(a,{variant:"h6",sx:{color:"#fff",flex:1,textAlign:"center"},children:u==="en"?`Mock Exam ${f} Results`:`模æ¬è©¦é¨${f} çµæ`}),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(v,{onClick:()=>g("ja"),sx:{minWidth:56,height:36,fontWeight:700,fontSize:14,bgcolor:y==="ja"?"#232F3E":"transparent",color:y==="ja"?"#fff":"#666",borderRadius:0,"&:hover":{bgcolor:y==="ja"?"#232F3E":"#e0e0e0"}},children:"JA"}),e.jsx(v,{onClick:()=>g("en"),sx:{minWidth:56,height:36,fontWeight:700,fontSize:14,bgcolor:y==="en"?"#232F3E":"transparent",color:y==="en"?"#fff":"#666",borderRadius:0,"&:hover":{bgcolor:y==="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(kn,{value:t,onChange:(p,q)=>s(q),textColor:"primary",indicatorColor:"primary",sx:{flex:1},children:[e.jsx(Ye,{label:u==="en"?"Results":"試é¨çµæ"}),e.jsx(Ye,{label:u==="en"?"By Category":"ã«ãã´ãªã¼å¥"})]}),e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:.5,mr:1,flexShrink:0},children:[e.jsx(v,{onClick:()=>o("/kafka-exam/mock"),size:"small",sx:{color:"#232F3E",fontWeight:700,fontSize:"0.85rem",whiteSpace:"nowrap",minHeight:44,minWidth:56},children:u==="en"?"List":"ä¸è¦§"}),x&&e.jsx(v,{onClick:Q,size:"small",sx:{color:W?"#555":"#232F3E",bgcolor:W?"#E8E8E8":"#FF9900",minHeight:44,px:1.5,"&:hover":{bgcolor:W?"#DDD":"#EC7211"},fontWeight:700,fontSize:"0.85rem",whiteSpace:"nowrap"},children:W?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(J,{sx:{p:3,mb:2,textAlign:"center"},children:[e.jsxs(a,{variant:"h4",sx:{color:"#FF9900",fontWeight:"bold",mb:1},children:[$,"%"]}),e.jsx(He,{variant:"determinate",value:$,sx:{height:10,borderRadius:5,bgcolor:"#F2F3F3",mb:1,"& .MuiLinearProgress-bar":{backgroundColor:$>=70?"#1D8102":"#D13212"}}}),e.jsx(a,{variant:"body1",children:u==="en"?`${_} correct out of ${I}`:`${I}åä¸ ${_}åæ£è§£`})]}),$>=90&&e.jsxs(J,{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!":"ç´ æ´ãããæç¸¾ã§ãï¼"})]}),$>=70&&$<90&&e.jsx(J,{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"?$>=70?"You have reached the passing range. Keep studying.":"You need a bit more practice. Review the questions you missed.":$>=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":"åé¡å¥ è§£çã»è§£èª¬"}),M.map((p,q)=>{const B=pt(p,y==="en"?"en":"ja",y==="en"?"en-question":"ja"),re=X.get(p.id),be=(re==null?void 0:re.isCorrect)??!1,De=!!re;return e.jsxs(jr,{sx:{mb:1},children:[e.jsx(yr,{expandIcon:e.jsx(Sr,{}),children:e.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:1,width:"100%"},children:[De?be?e.jsx(Me,{sx:{color:"#1D8102",fontSize:22}}):e.jsx(kr,{sx:{color:"#D13212",fontSize:22}}):e.jsx(Ne,{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(vr,{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((Ue,we)=>{const ke=p.correctAnswers.includes(we);return e.jsx(i,{sx:{p:1,mb:.5,borderRadius:1,bgcolor:ke?"#e8f5e9":"transparent",border:ke?"1px solid #1D8102":"1px solid #eee"},children:e.jsxs(a,{variant:"body2",sx:{color:ke?"#1D8102":"#555"},children:[String.fromCharCode(65+we),". ",Ue," ",ke&&"â"]})},we)})}),e.jsxs(J,{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})]})]})]},p.id)})]}),t===1&&e.jsxs(J,{sx:{p:2},children:[e.jsx(a,{variant:"h6",sx:{mb:1},children:u==="en"?"Accuracy by Category":"ã«ãã´ãªã¼å¥æ£è§£ç"}),e.jsx(Ee,{children:L.map((p,q)=>{const B=p.total?Math.round(p.correct/p.total*100):0;return e.jsxs(le,{sx:{flexDirection:"column",alignItems:"stretch"},children:[e.jsx(oe,{primary:p.category,secondary:`${p.correct}/${p.total} (${B}%)`}),e.jsx(He,{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("/kafka-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(yn,{})})}),e.jsx(Xe,{open:n,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 tt=["ccdak","ccaak","ccsd"],ks=()=>{const o=ge(),{soundEnabled:t,toggleSound:s}=Kt(),{darkMode:n,toggleDarkMode:d}=Ke(),{easyMode:r,toggleEasyMode:E}=Ut(),{isLoggedIn:m}=Pe(),{siteLocale:j,studyMode:S,toggleEnglishQuestionMode:u}=de(),c=(H,F)=>j==="en"?F:H,[h,y]=l.useState(!1),[g,C]=l.useState(!1),[f,k]=l.useState(null),[M,I]=l.useState(!1),[P,b]=l.useState("feedback"),[w,R]=l.useState(""),[X,O]=l.useState(!1),[K,T]=l.useState(!1),[D,N]=l.useState(""),ne="https://nicheelab-api.fjyjfrtfzy.workers.dev",U=async()=>
1{if(w.trim().length<5){N(c("5æå以ä¸ã§å
¥åãã¦ãã ãã","Enter at least 5 characters"));return}O(!0),N("");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:P,message:w.trim()})})).ok)throw new Error(c("éä¿¡ã«å¤±æãã¾ãã","Failed to send"));T(!0)}catch{N(c("éä¿¡ã«å¤±æãã¾ãããæéãããã¦å試è¡ãã¦ãã ããã","Failed to send. Please wait a moment and try again."))}finally{O(!1)}},G=()=>{I(!1),R(""),b("feedback"),N(""),T(!1)},_=H=>{k(H),y(!0)},$=async()=>{const H=Object.keys(localStorage);if(m)try{if(f==="practice")for(const F of tt)await tn(F,"practice").catch(()=>{});else if(f==="mock")for(const F of tt)await tn(F,"mock").catch(()=>{});else if(f==="all")for(const F of tt)await tn(F,"all").catch(()=>{})}catch{}(f==="practice"||f==="all")&&(tt.forEach(F=>{localStorage.removeItem(`${F}_answeredCount`),localStorage.removeItem(`${F}_correctCount`),localStorage.removeItem(`${F}_answersDetail`),localStorage.removeItem(`${F}_currentSet`),localStorage.removeItem(`${F}_wrong_answers`),localStorage.removeItem(`${F}_review_queue`),localStorage.removeItem(`${F}_review_index`),f==="all"&&localStorage.removeItem(`${F}_bookmarks`)}),H.forEach(F=>{tt.some(x=>F.startsWith(`ratio_${x}_`)||F.startsWith(`practice_result_${x}_`))&&localStorage.removeItem(F)})),(f==="mock"||f==="all")&&(tt.forEach(F=>{localStorage.removeItem(`${F}_mock_answeredCount`),localStorage.removeItem(`${F}_mock_correctCount`),localStorage.removeItem(`${F}_mock_answersDetail`),localStorage.removeItem(`${F}_mock_currentSet`),localStorage.removeItem(`${F}_mock_wrong_answers`),localStorage.removeItem(`${F}_mock_completed`)}),H.forEach(F=>{tt.some(x=>F.startsWith(`mock_ratio_${x}_`)||F.startsWith(`mock_result_${x}_`))&&localStorage.removeItem(F)})),y(!1),C(!0),setTimeout(()=>window.location.reload(),500)},L={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("/kafka-exam/menu"),children:e.jsx(Re,{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(Ee,{children:[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(Bt,{sx:{color:"#1B3139"}}):e.jsx(Nt,{sx:{color:"#888"}}),e.jsx(oe,{primary:c("ãã¼ã¯ã¢ã¼ã","Dark mode"),secondary:n?"ON":"OFF"})]}),e.jsx(yt,{checked:n,onChange:d,color:"primary"})]}),e.jsx(Le,{}),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(At,{sx:{color:"#FF9900"}}):e.jsx(co,{sx:{color:"#888"}}),e.jsx(oe,{primary:c("ããããåçã¢ã¼ã","Easy answer mode"),secondary:r?c("ON â 鏿ããã ãã§èªååç","ON â choosing an option submits it automatically"):"OFF"})]}),e.jsx(yt,{checked:r,onChange:E,color:"warning"})]}),e.jsx(Le,{}),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(xo,{sx:{color:"#1B3139"}}):e.jsx(uo,{sx:{color:"#888"}}),e.jsx(oe,{primary:c("åçæã®é³å£°","Answer sound"),secondary:t?"ON":"OFF"})]}),e.jsx(yt,{checked:t,onChange:s,color:"primary"})]}),j==="ja"&&e.jsxs(e.Fragment,{children:[e.jsx(Le,{}),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(At,{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(yt,{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(Ee,{children:[e.jsxs(le,{sx:{cursor:"pointer","&:hover":{bgcolor:"#f5f5f5"}},onClick:()=>_("practice"),children:[e.jsx(Qt,{sx:{color:"#0073BB",mr:2}}),e.jsx(oe,{primary:c("ç·´ç¿åé¡ãã¼ã¿ããªã»ãã","Re
1set practice data"),secondary:c("æ£è§£çã»åçå±¥æ´ãã¯ãªã¢ãã¾ã","Clears your accuracy and answer history")})]}),e.jsx(Le,{}),e.jsxs(le,{sx:{cursor:"pointer","&:hover":{bgcolor:"#f5f5f5"}},onClick:()=>_("mock"),children:[e.jsx(Qt,{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(Le,{}),e.jsxs(le,{sx:{cursor:"pointer","&:hover":{bgcolor:"#f5f5f5"}},onClick:()=>_("all"),children:[e.jsx(Qt,{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(Ee,{children:[e.jsx(le,{children:e.jsx(oe,{primary:c("ãã¼ã¸ã§ã³","Version"),secondary:"1.0.0"})}),e.jsx(Le,{}),e.jsx(le,{children:e.jsx(oe,{primary:c("対å¿è©¦é¨","Supported exams"),secondary:"Confluent Certified Developer for Apache Kafka (CCDAK)"})})]}),e.jsxs(i,{sx:{mt:3},children:[e.jsx(a,{variant:"subtitle2",sx:{color:"#888",mb:1},children:c("ãã£ã¼ãããã¯","Feedback")}),e.jsx(v,{variant:"outlined",startIcon:e.jsx(ho,{}),fullWidth:!0,onClick:()=>I(!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(bt,{color:"#0073BB",justifyContent:"flex-start"})]})]}),e.jsx(i,{sx:{p:2,display:"flex",justifyContent:"center",flexShrink:0},children:e.jsx(v,{variant:"outlined",onClick:()=>o("/kafka-exam/menu"),sx:{color:"#1B3139",borderColor:"#1B3139"},children:c("ãã¼ã ã¸æ»ã","Back to home")})}),e.jsxs(Ie,{open:h,onClose:()=>y(!1),children:[e.jsx(ot,{children:c("ãã¼ã¿ãªã»ãã確èª","Reset data?")}),e.jsx(Se,{children:e.jsx(fo,{children:c(`${f&&L[f]}ããªã»ãããã¾ãããã®æä½ã¯åãæ¶ãã¾ããã`,`This will reset ${f&&L[f]}. This action cannot be undone.`)})}),e.jsxs(Ce,{children:[e.jsx(v,{onClick:()=>y(!1),children:c("ãã£ã³ã»ã«","Cancel")}),e.jsx(v,{onClick:$,color:"error",variant:"contained",children:c("ãªã»ãã","Reset")})]})]}),e.jsx(xr,{open:g,autoHideDuration:3e3,onClose:()=>C(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},children:e.jsx(Oe,{severity:"success",onClose:()=>C(!1),children:c("ãã¼ã¿ããªã»ãããã¾ãã","Data reset")})}),e.jsx(Ie,{open:M,onClose:G,maxWidth:"sm",fullWidth:!0,children:K?e.jsxs(e.Fragment,{children:[e.jsxs(Se,{sx:{textAlign:"center",py:5},children:[e.jsx(Me,{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(Ce,{children:e.jsx(v,{onClick:G,children:c("éãã","Close")})})]}):e.jsxs(e.Fragment,{children:[e.jsx(ot,{sx:{fontWeight:700},children:c("ãã£ã¼ãããã¯","Feedback")}),e.jsxs(Se,{children:[e.jsxs(gr,{fullWidth:!0,sx:{mb:2,mt:1},children:[e.jsx(br,{children:c("種å¥","Type")}),e.jsxs(kt,{value:P,label:c("種å¥","Type"),onChange:H=>b(H.target.value),children:[e.jsx(ye,{value:"feedback",children:c("ãã£ã¼ãããã¯","Feedback")}),e.jsx(ye,{value:"bug",children:c("ä¸å
·åå ±å","Report a bug")}),e.jsx(ye,{value:"feature",children:c("æ©è½ãªã¯ã¨ã¹ã","Feature request")}),e.jsx(ye,{value:"other",children:c("ãã®ä»","Other")})]})]}),e.jsx(Ae,{fullWidth:!0,multiline:!0,rows:4,label:c("詳細","Details"),value:w,onChange:H=>R(H.target.value),placeholder:c("ãæ°è»½ã«ãè¨å
¥ãã ãã","Feel free to write anything"),inputProps:{maxLength:1e3}}),D&&e.jsx(a,{color:"error",variant:"body2",sx:{mt:1},children:D}),e.jsx(i,{sx:{mt:1,textAlign:"right"},children:e.jsxs(a,{variant:"caption",sx:{color:"#999"},children:[w.length,"/1000"]})})]}),e.jsxs(Ce,{children:[e.jsx(v,{onClick:G,sx:{color:"#666"},children:c("ãã£ã³ã»ã«","Cancel")}),e.jsx(v,{onClick:U,variant:"contained",disabled:X,sx:{bgcolor:"#FF3621","&:hover":{bgcolor:"#E02E1B"}},children:X?c("éä¿¡ä¸...","Sending..."):c("éä¿¡","Send")})]})]})})]})},Ss="https://nicheelab-api.fjyjfrtfzy.workers.dev";async function ct(o,t){const s=localStorage.getItem("exam_jwt_token");return(await fetch(`${Ss}${o}`,{...t,headers:{"Content-Type":"application/json",Authorization:`Bearer ${s}`,...t==null?void 0:t.headers}})).json()}function vs(){var F;const{siteLocale:o}=de(),t=(x,W)=>o==="en"?W:x,s=ge(),{user:n}=Pe(),[d,r]=l.useState(0),[E,m]=l.useState([]),[j,S]=l.useState([]),[u,c]=l.useState([]),[h,y]=l.useState([]),[g,C]=l.useState(null),[f,k]=l.useState("dea"),[M,I]=l.useState("practice"),[P,b]=l.useState(!1),[w,R]=l.useState(null),[X,O]=l.useState(!1),K=(n==null?void 0:n.role)==="admin",T=l.useCallback(async()=>{try{const{questions:x}=await wo(f,M);m(x)}catch{m([])}},[f,M]),D=l.useCallback(async()=>{try{const{users:x}=await Po();S(x)}catch{S([])}},[]),N=l.useCallback(async()=>{try{const x=await ct("/api/admin/reports");y(x.reports||[])}catch{y([])}},[]),ne=l.useCallback(async()=>{var x;try{const W=await ct("/api/admin/stats");C(W)}catch{C(null)}try{const W=await ct("/api/admin/settings");O(((x=W.settings)==null?void 0:x.maintenance_mode)==="true")}catch{}},[]),U=async()=>{const x=!X;await ct("/api/admin/settings",{method:"PUT",body:JSON.stringify({key:"maintenance_mode",value:String(x)})}),O(x)},G=l.useCallback(async()=>{try{const{categories:x}=await Do();c(x)}catch{c([])}},[]);l.useEffect(()=>{K&&(d===0&&ne(),d===1&&T(),d===2&&D(),d===3&&N())},[d,f,M,K,ne,T,D,N]),l.useEffect(()=>{K&&G()},[K,G]);const _=async x=>
1{confirm(t("ãã®åé¡ãåé¤ãã¾ããï¼","Delete this question?"))&&(await Io(x),T())},$=async x=>{confirm(t("ãã®ã¦ã¼ã¶ã¼ã¨é¢é£ãã¼ã¿ãå
¨ã¦åé¤ãã¾ããï¼","Delete this user and all related data?"))&&(await ct(`/api/admin/users/${x}`,{method:"DELETE"}),D())},L=async(x,W)=>{await ct(`/api/admin/reports/${x}`,{method:"PUT",body:JSON.stringify({status:W})}),N()},H=async()=>{w&&(w.id?await Eo(w.id,w):await Ao({...w,exam_type:f,question_set:M}),b(!1),R(null),T())};return K?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("/kafka-exam/menu"),children:e.jsx(Re,{sx:{color:"#fff"}})}),e.jsx(a,{variant:"h6",sx:{color:"#fff",ml:2},children:t("管çç»é¢","Admin")})]}),e.jsxs(Fe,{maxWidth:"lg",sx:{py:3},children:[e.jsxs(kn,{value:d,onChange:(x,W)=>r(W),sx:{mb:3},variant:"scrollable",scrollButtons:"auto",children:[e.jsx(Ye,{label:t("ããã·ã¥ãã¼ã","Dashboard")}),e.jsx(Ye,{label:t("åé¡ç®¡ç","Questions")}),e.jsx(Ye,{label:t("ã¦ã¼ã¶ã¼ç®¡ç","Users")}),e.jsx(Ye,{label:t("ãã£ã¼ãããã¯","Feedback")})]}),d===0&&e.jsxs(e.Fragment,{children:[e.jsxs(J,{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(ht,{control:e.jsx(yt,{checked:X,onChange:U,color:"warning"}),label:X?"ON":"OFF"})]}),X&&e.jsx(Oe,{severity:"warning",sx:{mb:2},children:t("ã¡ã³ããã³ã¹ã¢ã¼ããæå¹ã§ããã¦ã¼ã¶ã¼ã«ã¡ã³ããã³ã¹ç»é¢ã表示ããã¦ãã¾ãã","Maintenance mode is on. Users are seeing the maintenance screen.")})]}),d===0&&g&&e.jsxs(i,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr 1fr",md:"1fr 1fr 1fr 1fr"},gap:2,mb:3},children:[e.jsx(It,{children:e.jsxs(Pt,{sx:{textAlign:"center"},children:[e.jsx(mo,{sx:{fontSize:36,color:"#1B3139"}}),e.jsx(a,{variant:"h4",sx:{fontWeight:800,color:"#1B3139"},children:g.users}),e.jsx(a,{variant:"body2",sx:{color:"#666"},children:t("ç»é²ã¦ã¼ã¶ã¼","Registered users")})]})}),e.jsx(It,{children:e.jsxs(Pt,{sx:{textAlign:"center"},children:[e.jsx(gn,{sx:{fontSize:36,color:"#1D8102"}}),e.jsx(a,{variant:"h4",sx:{fontWeight:800,color:"#1D8102"},children:g.activeSubscriptions}),e.jsx(a,{variant:"body2",sx:{color:"#666"},children:t("ææä¼å¡","Paid members")})]})}),e.jsx(It,{children:e.jsxs(Pt,{sx:{textAlign:"center"},children:[e.jsx(pn,{sx:{fontSize:36,color:"#FF3621"}}),e.jsx(a,{variant:"h4",sx:{fontWeight:800,color:"#FF3621"},children:g.totalAnswers}),e.jsx(a,{variant:"body2",sx:{color:"#666"},children:t("ç·åçæ°","Total answers")})]})}),e.jsx(It,{children:e.jsxs(Pt,{sx:{textAlign:"center"},children:[e.jsx(pr,{sx:{fontSize:36,color:"#F59E0B"}}),e.jsx(a,{variant:"h4",sx:{fontWeight:800,color:"#F59E0B"},children:g.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(kt,{value:f,onChange:x=>k(x.target.value),size:"small",children:["dea","dep","daa","mla","mlp","spark","genai"].map(x=>e.jsx(ye,{value:x,children:x.toUpperCase()},x))}),e.jsxs(kt,{value:M,onChange:x=>I(x.target.value),size:"small",children:[e.jsx(ye,{value:"practice",children:t("ç·´ç¿åé¡","Practice questions")}),e.jsx(ye,{value:"mock",children:t("模æ¬è©¦é¨","Mock exams")})]}),e.jsx(v,{startIcon:e.jsx(po,{}),variant:"contained",sx:{bgcolor:"#FF3621","&:hover":{bgcolor:"#E02E1B"}},onClick:()=>{var x;R({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:""}),b(!0)},children:t("åé¡è¿½å ","Add question")})]}),e.jsx(J,{sx:{overflowX:"auto"},children:e.jsxs(Vt,{size:"small",children:[e.jsx(Xt,{children:e.jsxs(lt,{sx:{bgcolor:"#1B3139"},children:[e.jsx(ee,{sx:{color:"#fff"},children:"ID"}),e.jsx(ee,{sx:{color:"#fff"},children:t("ã¿ã¤ãã«","Title")}),e.jsx(ee,{sx:{color:"#fff"},children:t("ã«ãã´ãª","Category")}),e.jsx(ee,{sx:{color:"#fff"},children:t("é£æåº¦","Difficulty")}),e.jsx(ee,{sx:{color:"#fff"},children:t("æä½","Actions")})]})}),e.jsx(Zt,{children:E.map(x=>e.jsxs(lt,{children:[e.jsx(ee,{children:x.id}),e.jsx(ee,{children:x.title}),e.jsx(ee,{children:x.category_name}),e.jsx(ee,{children:x.difficulty}),e.jsxs(ee,{children:[e.jsx(ce,{size:"small",onClick:()=>{R(x),b(!0)},children:e.jsx(go,{fontSize:"small"})}),e.jsx(ce,{size:"small",color:"error",onClick:()=>_(x.id),children:e.jsx(zn,{fontSize:"small"})})]})]},x.id))})]})})]}),d===2&&e.jsx(J,{sx:{overflowX:"auto"},children:e.jsxs(Vt,{size:"small",children:[e.jsx(Xt,{children:e.jsxs(lt,{sx:{bgcolor:"#1B3139"},children:[e.jsx(ee,{sx:{color:"#fff"},children:"ID"}),e.jsx(ee,{sx:{color:"#fff"},children:t("ã¡ã¼ã«","Email")}),e.jsx(ee,{sx:{color:"#fff"},children:t("ãã©ã³","Plan")}),e.jsx(ee,{sx:{color:"#fff"},children:t("å½¹å²","Role")}),e.jsx(ee,{sx:{color:"#fff"},children:t("ç»é²æ¥","Joined")}),e.jsx(ee,{sx:{color:"#fff"},children:t("æä½","Actions")})]})}),e.jsx(Zt,{children:j.map(x=>e.jsxs(lt,{children:[e.jsx(ee,{children:x.id}),e.jsx(ee,{children:x.email}),e.jsx(ee,{children:e.jsx(Ne,{label:x.plan==="active"?t("ææ","Paid"):t("ç¡æ","Free"),size:"small",color:x.plan==="active"?"success":"default"})}),e.jsx(ee,{children:x.role}),e.jsx(ee,{children:new Date(x.created_at).toLocaleDateString("ja-JP")}),e.jsx(ee,{children:e.jsx(ce,{size:"small",color:"error",onClick:()=>$(x.id),title:t("ã¦ã¼ã¶ã¼åé¤","Delete user"),children:e.jsx(zn,{fontSize:"small"})})})]},x.id))})]})}),d===3&&e.jsx(J,{sx:{overflowX:"auto"},children:e.jsxs(Vt,{size:"small",children:[e.jsx(Xt,{children:e.jsxs(lt,{sx:{bgcolor:"#1B3139"},children:[e.jsx(ee,{sx:{color:"#fff"},children:"ID"}),e.jsx(ee,{sx:{color:"#fff"},children:t("種å¥","Type")}),e.jsx(ee,{sx:{color:"#fff"},children:t("試é¨","Exam")}),e.jsx(ee,{sx:{color:"#fff"},children:t("å
容","Details")}),e.jsx(ee,{sx:{color:"#fff"},children:t("ã¦ã¼ã¶ã¼","User")}),e.jsx(ee,{sx:{color:"#fff"},children:t("ã¹ãã¼ã¿ã¹","Status")}),e.jsx(ee,{sx:{color:"#fff"},children:t("æ¥æ","Date")}),e.jsx(ee,{sx:{color:"#fff"},children:t("æä½","Actions")})]})}),e.jsx(Zt,{children:h.map(x=>e.jsxs(lt,{sx:{bgcolor:x.status==="open"?"#FFF8E1":void 0},children:[e.jsx(ee,{children:x.id}),e.jsx(ee,{children:e.jsx(Ne,{label:x.report_type,size:"small"})}),e.jsxs(ee,{children:[x.exam_type," #",x.set_number]}),e.jsx(ee,{sx:{maxWidth:300,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:x.message}),e.jsx(ee,{children:x.user_email||t("å¿å","Anonymous")}),e.jsx(ee,{children:e.jsx(Ne,{label:x.status==="open"?t("æªå¯¾å¿","Open"):x.status==="resolved"?t("解決æ¸","Resolved"):x.status,size:"small",color:x.status==="open"?"warning":"success"})}),e.jsx(ee,{children:new Date(x.created_at).toLocaleDateString("ja-JP")}),e.jsx(ee,{children:x.status==="open"&&e.jsx(v,{size:"small",variant:"outlined",color:"success",onClick:()=>L(x.id,"resolved"),children:t("解決","Resolve")})})]},x.id))})]})})]}),e.jsxs(Ie,{open:P,onClose:()=>b(!1),maxWidth:"md",fullWidth:!0,children:[e.jsx(ot,{children:w!=null&&w.id?t("åé¡ç·¨é","E
1dit question"):t("åé¡è¿½å ","Add question")}),e.jsx(Se,{children:w&&e.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2,mt:1},children:[e.jsx(Ae,{label:t("ã¿ã¤ãã«","Title"),value:w.title,onChange:x=>R({...w,title:x.target.value}),fullWidth:!0}),e.jsx(Ae,{label:t("å顿","Question"),value:w.body,onChange:x=>R({...w,body:x.target.value}),multiline:!0,rows:4,fullWidth:!0}),e.jsx(kt,{value:w.category_id,onChange:x=>R({...w,category_id:x.target.value}),size:"small",children:u.map(x=>e.jsxs(ye,{value:x.id,children:[x.name," (",x.exam_type,")"]},x.id))}),e.jsx(a,{variant:"subtitle2",children:t("鏿è¢","Options")}),(F=w.choices)==null?void 0:F.map((x,W)=>e.jsxs(i,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsx(Ae,{label:t(`é¸æè¢ ${String.fromCharCode(65+W)}`,`Choice ${String.fromCharCode(65+W)}`),value:x.text,onChange:Q=>{const p=[...w.choices];p[W]={...p[W],text:Q.target.value},R({...w,choices:p})},fullWidth:!0,size:"small"}),e.jsx(v,{variant:x.is_correct?"contained":"outlined",size:"small",color:x.is_correct?"success":"inherit",onClick:()=>{const Q=[...w.choices];Q[W]={...Q[W],is_correct:!Q[W].is_correct},R({...w,choices:Q})},children:t("æ£è§£","Correct")})]},W)),e.jsx(Ae,{label:t("解説","Explanation"),value:w.explanation,onChange:x=>R({...w,explanation:x.target.value}),multiline:!0,rows:3,fullWidth:!0})]})}),e.jsxs(Ce,{children:[e.jsx(v,{onClick:()=>b(!1),children:t("ãã£ã³ã»ã«","Cancel")}),e.jsx(v,{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(v,{onClick:()=>s("/kafka-exam/menu"),sx:{mt:2},children:t("ãã¼ã ã«æ»ã","Back to home")})]})}const Dt=Te,Cs="This English text is a reference translation. The Japanese version is the authoritative text; if the two differ, the Japanese version prevails.";function Pn({title:o,subtitle:t,children:s}){const{siteLocale:n}=de(),d=n==="en",r=ge();return e.jsxs(i,{sx:{minHeight:"100vh",bgcolor:Dt.lightGray},children:[e.jsx(i,{sx:{bgcolor:Dt.squidInk,color:"#fff",py:4,px:2},children:e.jsxs(Fe,{maxWidth:"md",children:[e.jsx(v,{startIcon:e.jsx(Re,{}),onClick:()=>r("/kafka-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:Cs})]})}),e.jsxs(Fe,{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 ${Dt.borderGray}`},children:e.jsx(bt,{color:Dt.accentBlue,justifyContent:"flex-start"})})]})]})}const rt=Te;function Ge({title:o,children:t}){return e.jsxs(J,{elevation:0,sx:{p:3,borderRadius:2,border:`1px solid ${rt.borderGray}`},children:[e.jsx(a,{variant:"h6",sx:{fontWeight:700,color:rt.squidInk,mb:1.5},children:o}),t]})}function ws(){const{siteLocale:o}=de(),t=(s,n)=>o==="en"?n:s;return e.jsxs(Pn,{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(Ge,{title:t("1. ãµã¼ãã¹å
容","1. Service description"),children:e.jsx(Ee,{dense:!0,disablePadding:!0,children:Bo.map(s=>e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t(s.ja,s.en)})},s.ja))})}),e.jsx(Ge,{title:t("2. æéã¨æ¯æã","2. Fees and payment"),children:e.jsxs(a,{variant:"body2",sx:{color:rt.textSecondary,lineHeight:1.8},children:[t(`ææãã©ã³ã®æé㯠${t(Z.priceDisplay.ja,Z.priceDisplay.en)} ã§ããæ±ºæ¸ã¯ ${t(Z.paymentMethods.ja,Z.paymentMethods.en)} ã«ããè¡ããã`,`The paid plan costs ${t(Z.priceDisplay.ja,Z.priceDisplay.en)}. Payment is made by ${t(Z.paymentMethods.ja,Z.paymentMethods.en)}, and`),t(`æé¡ãã©ã³ã®ãµãã¹ã¯ãªãã·ã§ã³ã¯èªåæ´æ°ããã¾ãï¼90æ¥éã®è²·ãåããã©ã³ã¯èªåæ´æ°ããããæéæºäºã§çµäºãã¾ãï¼ãè§£ç´ã¯ ${t(Z.cancellationPolicy.ja,Z.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(Z.cancellationPolicy.ja,Z.cancellationPolicy.en)}`)]})}),e.jsx(Ge,{title:t("3. ç¦æ¢äºé
","3. Prohibited conduct"),children:e.jsx(Ee,{dense:!0,disablePadding:!0,children:Ho.map(s=>e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t(s.ja,s.en)})},s.ja))})}),e.jsx(Ge,{title:t("4. ç¥çè²¡ç£æ¨©ã»åæ¨","4. Intellectual property rights and trademarks"),children:e.jsx(Ee,{dense:!0,disablePadding:!0,children:$r.map(s=>e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t(s.ja,s.en)})},s.ja))})}),e.jsx(Ge,{title:t("5. å
責äºé
","5. Disclaimer"),children:e.jsxs(a,{variant:"body2",sx:{color:rt.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(Ge,{title:t("6. ãµã¼ãã¹å¤æ´ã»åæ¢","6. Changes to and suspension of the service"),children:e.jsxs(a,{variant:"body2",sx:{color:rt.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(Ge,{title:t("7. è¿éã»è§£ç´","7. Refunds and cancellation"),children:e.jsxs(a,{variant:"body2",sx:{color:rt.textSecondary,lineHeight:1.8},children:[t(Z.refundPolicy.ja,Z.refundPolicy.en)," ",t(Z.cancellationPolicy.ja,Z.cancellationPolicy.en)]})}),e.jsx(Ge,{title:t("8. æºæ æ³ã»ç®¡è½","8. Governing law and jurisdiction"),children:e.jsxs(a,{variant:"body2",sx:{color:rt.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=Te;function dt({title:o,children:t}){return e.jsxs(J,{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 As(){const{siteLocale:o}=de(),t=(s,n)=>o==="en"?n:s;return e.jsxs(Pn,{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(Oe,{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(dt,{title:t("1. åå¾ããæ
å ±","1. Information collected"),children:e.jsx(Ee,{dense:!0,disablePadding:!0,children:Ko.map(s=>e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t(s.ja,s.en)})},s.ja))})}),e.jsx(dt,{title:t("2. å©ç¨ç®ç","2. Purposes of use"),children:e.jsx(Ee,{dense:!0,disablePadding:!0,children:Uo.map(s=>e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t(s.ja,s.en)})},s.ja))})}),e.jsx(dt,{title:t("3. 第ä¸è
æä¾ã»å¤é¨ãµã¼ãã¹é£æº","3. Provision to third parties and integration with external services"),children:e.jsx(Ee,{dense:!0,disablePadding:!0,children:Go.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(dt,{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(dt,{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(dt,{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(`ä¿æå人ãã¼ã¿ã®é示ãè¨æ£ãåé¤ãå©ç¨åæ¢çã®ãä¾é ¼ã¯ã${Z.contactEmail}`,`To request disclosure, correction, deletion, or suspension of use of your retained personal data, contact ${Z.contactEmail}`),t("ã¾ã§ãé£çµ¡ãã ãããæ¬äººç¢ºèªã®ãããæ³ä»¤ã«å¾ã£ã¦å¯¾å¿ãã¾ãã",". We will verify your identity and respond as required by law.")]})})]})}const Ct=Te;function jt({title:o,children:t}){return e.jsxs(J,{elevation:0,sx:{p:3,borderRadius:2,border:`1px solid ${Ct.borderGray}`},children:[e.jsx(a,{variant:"h6",sx:{fontWeight:700,color:Ct.squidInk,mb:1.5},children:o}),t]})}function Es(){const{siteLocale:o}=de(),t=(s,n)=>o==="en"?n:s;return e.jsxs(Pn,{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(Oe,{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(Ee,{dense:!0,disablePadding:!0,children:[e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t("ãµã¼ãã¹å","Service name"),secondary:t(Z.serviceName.ja,Z.serviceName.en)})}),e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t("äºæ¥è
å","Business operator name"),secondary:t(Z.operatorName.ja,Z.operatorName.en)})}),e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t("使","Address"),secondary:t(Z.businessAddress.ja,Z.businessAddress.en)})}),e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t("ã¡ã¼ã«ã¢ãã¬ã¹","Email address"),secondary:Z.contactEmail})}),e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t("é»è©±çªå·","Telephone number"),secondary:t(Z.phoneNumber.ja,Z.phoneNumber.en)})})]})}),e.jsx(jt,{title:t("2. è²©å£²ä¾¡æ ¼ã»æ¯ææ¹æ³","2. Sale price and payment method"),children:e.jsxs(Ee,{dense:!0,disablePadding:!0,children:[e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t("è²©å£²ä¾¡æ ¼","Sales price"),secondary:t(Z.priceDisplay.ja,Z.priceDisplay.en)})}),e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t("æ¯ææ¹æ³","Payment method"),secondary:t(Z.paymentMethods.ja,Z.paymentMethods.en)})})]})}),e.jsx(jt,{title:t("3. ãµã¼ãã¹æä¾ææ","3. Timing of service provision"),children:e.jsx(a,{variant:"body2",sx:{color:Ct.textSecondary,lineHeight:1.8},children:t(Z.serviceStartTiming.ja,Z.serviceStartTiming.en)})}),e.jsx(jt,{title:t("4. è§£ç´ã»è¿é","4. Cancellation and refunds"),children:e.jsxs(a,{variant:"body2",sx:{color:Ct.textSecondary,lineHeight:1.8},children:[t(Z.cancellationPolicy.ja,Z.cancellationPolicy.en)," ",t(Z.refundPolicy.ja,Z.refundPolicy.en)]})}),e.jsxs(jt,{title:t("5. è使¨©ã»æ¨©å©ä¾µå®³ã«é¢ããé£çµ¡å
","5. Contact for copyright and rights infringement matters"),children:[e.jsxs(a,{variant:"body2",sx:{color:Ct.textSecondary,lineHeight:1.8,mb:1.5},children:[t("権å©ä¾µå®³ãDMCA ç¸å½ã®ç³åã忍ã»è使¨©ã«é¢ãããåãåããã¯","For infringement claims, DMCA-equivalent notices, and trademark or copyright inquiries, contact"),` ${t(Z.abuseContactEmail.ja,Z.abuseContactEmail.en)} `,t("ã¾ã§ãé£çµ¡ãã ããã"," for assistance.")]}),e.jsx(Ee,{dense:!0,disablePadding:!0,children:$r.map(s=>e.jsx(le,{disableGutters:!0,children:e.jsx(oe,{primary:t(s.ja,s.en)})},s.ja))})]})]})}function Rs(){return e.jsx(Fo,{children:e.jsx($o,{children:e.jsx(Ro,{children:e.jsx(_o,{children:e.jsx(zo,{children:e.jsxs(Or,{children:[e.jsx(fe,{index:!0,element:e.jsx(Yo,{})}),e.jsx(fe,{path:"select",element:e.jsx(Qo,{})}),e.jsx(fe,{path:"login",element:e.jsx(Xo,{})}),e.jsx(fe,{path:"register",element:e.jsx(es,{})}),e.jsx(fe,{path:"forgot-password",element:e.jsx(ts,{})}),e.jsx(fe,{path:"terms",element:e.jsx(ws,{})}),e.jsx(fe,{path:"privacy",element:e.jsx(As,{})}),e.jsx(fe,{path:"legal",element:e.jsx(Es,{})}),e.jsx(fe,{path:"menu",element:e.jsx(os,{})}),e.jsx(fe,{path:"practice",element:e.jsx(an,{})}),e.jsx(fe,{path:"training-problem/:id",element:e.jsx(Yn,{})}),e.jsx(fe,{path:"training-problem/:id/explanation",element:e.jsx(Jn,{})}),e.jsx(fe,{path:"practice/result",element:e.jsx(ds,{})}),e.jsx(fe,{path:"mock",element:e.jsx(ps,{})}),e.jsx(fe,{path:"mock-problem/:id",element:e.jsx(js,{})}),e.jsx(fe,{path:"mock-problem/:id/explanation",element:e.jsx(Jn,{})}),e.jsx(fe,{path:"mock-exam/result",element:e.jsx(ys,{})}),e.jsx(fe,{path:"review",element:e.jsx(xs,{})}),e.jsx(fe,{path:"review-problem",element:e.jsx(fs,{})}),e.jsx(fe,{path:"settings",element:e.jsx(ks,{})}),e.jsx(fe,{path:"admin",element:e.jsx(vs,{})}),e.jsx(fe,{path:"questions",element:e.jsx(an,{})}),e.jsx(fe,{path:"questions/:id",element:e.jsx(Yn,{})}),e.jsx(fe,{path:"category/:name",element:e.jsx(an,{})})]})})})})})})}export{Rs 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.