1import{i as F,_ as nt,j as se,x as at,A as st,I as ot,c as o,d as y,u as Ee,a,f as J,t as i,G as ze,F as V,E as N,n as L,B as ye,q as lt,D as it,s as ut,o as l}from"./app-BjrRHTkE.js";var Ze={};(function w(I,B,Q,O){var re=!!(I.Worker&&I.Blob&&I.Promise&&I.OffscreenCanvas&&I.OffscreenCanvasRenderingContext2D&&I.HTMLCanvasElement&&I.HTMLCanvasElement.prototype.transferControlToOffscreen&&I.URL&&I.URL.createObjectURL),oe=typeof Path2D=="function"&&typeof DOMMatrix=="function",pe=(function(){if(!I.OffscreenCanvas)return!1;try{var t=new OffscreenCanvas(1,1),e=t.getContext("2d");e.fillRect(0,0,1,1);var u=t.transferToImageBitmap();e.createPattern(u,"no-repeat")}catch{return!1}return!0})();function U(){}function E(t){var e=B.exports.Promise,u=e!==void 0?e:I.Promise;return typeof u=="function"?new u(t):(t(U,U),null)}var q=(function(t,e){return{transform:function(u){if(t)return u;if(e.has(u))return e.get(u);var c=new OffscreenCanvas(u.width,u.height),v=c.getContext("2d");return v.drawImage(u,0,0),e.set(u,c),c},clear:function(){e.clear()}}})(pe,new Map),D=(function(){var t=Math.floor(16.666666666666668),e,u,c={},v=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(e=function(m){var h=Math.random();return c[h]=requestAnimationFrame(function d(p){v===p||v+t-1<p?(v=p,delete c[h],m()):c[h]=requestAnimationFrame(d)}),h},u=function(m){c[m]&&cancelAnimationFrame(c[m])}):(e=function(m){return setTimeout(m,t)},u=function(m){return clearTimeout(m)}),{frame:e,cancel:u}})(),le=(function(){var t,e,u={};function c(v){function m(h,d){v.postMessage({options:h||{},callback:d})}v.init=function(d){var p=d.transferControlToOffscreen();v.postMessage({canvas:p},[p])},v.fire=function(d,p,M){if(e)return m(d,null),e;var S=Math.random().toString(36).slice(2);return e=E(function(A){function T(j){j.data.callback===S&&(delete u[S],v.removeEventListener("message",T),e=null,q.clear(),M(),A())}v.addEventListener("message",T),m(d,S),u[S]=T.bind(null,{data:{callback:S}})}),e},v.reset=function(){v.postMessage({reset:!0});for(var d in u)u[d](),delete u[d]}}return function(){if(t)return t;if(!Q&&re){var v=["var CONFETTI, SIZE = {}, module = {};","("+w.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join(` 2`);try{t=new Worker(URL.createObjectURL(new Blob([v])))}catch{return typeof console<"u",null}c(t)}return t}})(),k={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function ne(t,e){return e?e(t):t}function ie(t){return t!=null}function x(t,e,u){return ne(t&&ie(t[e])?t[e]:k[e],u)}function $e(t){return t<0?0:Math.floor(t)}function ve(t,e){return Math.floor(Math.random()*(e-t))+t}function de(t){return parseInt(t,16)}function Z(t){return t.map(ge)}function ge(t){var e=String(t).replace(/[^0-9a-f]/gi,"");return e.length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),{r:de(e.substring(0,2)),g:de(e.substring(2,4)),b:de(e.substring(4,6))}}function P(t){var e=x(t,"origin",Object);return e.x=x(e,"x",Number),e.y=x(e,"y",Number),e}function _e(t){t.width=document.documentElement.clientWidth,t.height=document.documentElement.clientHeight}function fe(t){var e=t.getBoundingClientRect();t.width=e.width,t.height=e.height}function ae(t){var e=document.createElement("canvas");return e.style.position="fixed",e.style.top="0px",e.style.left="0px",e.style.pointerEvents="none",e.style.zIndex=t,e}function g(t,e,u,c,v,m,h,d,p){t.save(),t.translate(e,u),t.rotate(m),t.scale(c,v),t.arc(0,0,1,h,d,p),t.restore(
vendor: 4,945 bytes, line 2
2)}function he(t){var e=t.angle*(Math.PI/180),u=t.spread*(Math.PI/180);return{x:t.x,y:t.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:t.startVelocity*.5+Math.random()*t.startVelocity,angle2D:-e+(.5*u-Math.random()*u),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:t.color,shape:t.shape,tick:0,totalTicks:t.ticks,decay:t.decay,drift:t.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:t.gravity*3,ovalScalar:.6,scalar:t.scalar,flat:t.flat}}function be(t,e){e.x+=Math.cos(e.angle2D)*e.velocity+e.drift,e.y+=Math.sin(e.angle2D)*e.velocity+e.gravity,e.velocity*=e.decay,e.flat?(e.wobble=0,e.wobbleX=e.x+10*e.scalar,e.wobbleY=e.y+10*e.scalar,e.tiltSin=0,e.tiltCos=0,e.random=1):(e.wobble+=e.wobbleSpeed,e.wobbleX=e.x+10*e.scalar*Math.cos(e.wobble),e.wobbleY=e.y+10*e.scalar*Math.sin(e.wobble),e.tiltAngle+=.1,e.tiltSin=Math.sin(e.tiltAngle),e.tiltCos=Math.cos(e.tiltAngle),e.random=Math.random()+2);var u=e.tick++/e.totalTicks,c=e.x+e.random*e.tiltCos,v=e.y+e.random*e.tiltSin,m=e.wobbleX+e.random*e.tiltCos,h=e.wobbleY+e.random*e.tiltSin;if(t.fillStyle="rgba("+e.color.r+", "+e.color.g+", "+e.color.b+", "+(1-u)+")",t.beginPath(),oe&&e.shape.type==="path"&&typeof e.shape.path=="string"&&Array.isArray(e.shape.matrix))t.fill(Re(e.shape.path,e.shape.matrix,e.x,e.y,Math.abs(m-c)*.1,Math.abs(h-v)*.1,Math.PI/10*e.wobble));else if(e.shape.type==="bitmap"){var d=Math.PI/10*e.wobble,p=Math.abs(m-c)*.1,M=Math.abs(h-v)*.1,S=e.shape.bitmap.width*e.scalar,A=e.shape.bitmap.height*e.scalar,T=new DOMMatrix([Math.cos(d)*p,Math.sin(d)*p,-Math.sin(d)*M,Math.cos(d)*M,e.x,e.y]);T.multiplySelf(new DOMMatrix(e.shape.matrix));var j=t.createPattern(q.transform(e.shape.bitmap),"no-repeat");j.setTransform(T),t.globalAlpha=1-u,t.fillStyle=j,t.fillRect(e.x-S/2,e.y-A/2,S,A),t.globalAlpha=1}else if(e.shape==="circle")t.ellipse?t.ellipse(e.x,e.y,Math.abs(m-c)*e.ovalScalar,Math.abs(h-v)*e.ovalScalar,Math.PI/10*e.wobble,0,2*Math.PI):g(t,e.x,e.y,Math.abs(m-c)*e.ovalScalar,Math.abs(h-v)*e.ovalScalar,Math.PI/10*e.wobble,0,2*Math.PI);else if(e.shape==="star")for(var b=Math.PI/2*3,R=4*e.scalar,W=8*e.scalar,H=e.x,X=e.y,ue=5,G=Math.PI/ue;ue--;)H=e.x+Math.cos(b)*W,X=e.y+Math.sin(b)*W,t.lineTo(H,X),b+=G,H=e.x+Math.cos(b)*R,X=e.y+Math.sin(b)*R,t.lineTo(H,X),b+=G;else t.moveTo(Math.floor(e.x),Math.floor(e.y)),t.lineTo(Math.floor(e.wobbleX),Math.floor(v)),t.lineTo(Math.floor(m),Math.floor(h)),t.lineTo(Math.floor(c),Math.floor(e.wobbleY));return t.closePath(),t.fill(),e.tick<e.totalTicks}function Be(t,e,u,c,v){var m=e.slice(),h=t.getContext("2d"),d,p,M=E(function(S){function A(){d=p=null,h.clearRect(0,0,c.width,c.height),q.clear(),v(),S()}function T(){Q&&!(c.width===O.width&&c.height===O.height)&&(c.width=t.width=O.width,c.height=t.height=O.height),!c.width&&!c.height&&(u(t),c.width=t.width,c.height=t.height),h.clearRect(0,0,c.width,c.height),m=m.filter(function(j){return be(h,j)}),m.length?d=D.frame(T):A()}d=D.frame(T),p=A});return{addFettis:function(S){return m=m.concat(S),M},canvas:t,promise:M,reset:function(){d&&D.cancel(d),p&&p()}}}function Se(t,e){var u=!t,c=!!x(e||{},"resize"),v=!1,m=x(e,"disableForReducedMotion",Boolean),h=re&&!!x(e||{},"useWorker"),d=h?le():null,p=u?_e:fe,M=t&&d?!!t.__confetti_initialized:!1,S=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,A;function T(b,R,W){for(var H=x(b,"particleCount",$e),X=x(b,"angle",Number),ue=x(b,"spread",Number),G=x(b,"startVelocity",Number),Oe=x(b,"decay",Number),De=x(b,"gravity",Number),Ve=x(b,"drift",Number),ee=x(b,"colors",Z),ke=x(b,"ticks",Number),ce=x(b,"shapes"),me=x(b,"scalar"),Ne=!!x(b,"flat"),Me=P(b),Ie=H,Ce=[],Pe=t.width*Me.x,Ue=t.height*Me.y;Ie--;)Ce.push(he({x:Pe,y:Ue,angle:X,spread:ue,startVelocity:G,color:ee[Ie%ee.length],shape:ce[ve(0,ce.length)],ticks:ke,decay:Oe,gravity:De,drift:Ve,scalar:me,flat:Ne}));return A?A.addFettis(Ce):(A=Be(t,Ce,p,R,W),A.promise)}function j(b){var R=m||x(b,"disableForReducedMotion",Boolean),W=x(b,"zIndex",Number);if(R&&S)return E(function(G){G()});u&&A?t=A.canvas:u&&!t&&(t=ae(W),document.body.appendChild(t)),c&&!M&&p(t);var H={width:t.width,height:t.height};d&&!M&&d.init(t),M=!0,d&&(t.__confetti_initialized=!0);function X(){if(d){var G={getBoundingClientRect:function(){if(!u)return t.getBoundingClientRect()}};p(G),d.postMessage({resize:{width:G.width,height:G.height}});return}H.width=H.height=null}function ue(){A=null,c&&(v=!1,I.removeEventListener("resize",X)),u&&t&&(document.body.contains(t)&&document.body.removeChild(t),t=null,M=!1)}return c&&!v&&(v=!0,I.addEventListener("resize",X,!1)),d?d.fire(b,H,ue):T(b,H,ue)}return j.reset=function(){d&&d.reset(),A&&A.reset()},j}var we;function Te(){return we||(we=Se(null,{useWorker:!0,resize:!0})),we}function Re(t,e,u,c,v,m,h){var d=new Path2D(t),p=new Path2D;p.addPath(d,new DOMMatrix(e));var M=new Path2D;return M.addPath(p,new DOMMatrix([Math.cos(h)*v,Math.sin(h)*v,-Math.sin(h)*m,Math.
2cos(h)*m,u,c])),M}function Le(t){if(!oe)throw new Error("path confetti are not supported in this browser");var e,u;typeof t=="string"?e=t:(e=t.path,u=t.matrix);var c=new Path2D(e),v=document.createElement("canvas"),m=v.getContext("2d");if(!u){for(var h=1e3,d=h,p=h,M=0,S=0,A,T,j=0;j<h;j+=2)for(var b=0;b<h;b+=2)m.isPointInPath(c,j,b,"nonzero")&&(d=Math.min(d,j),p=Math.min(p,b),M=Math.max(M,j),S=Math.max(S,b));A=M-d,T=S-p;var R=10,W=Math.min(R/A,R/T);u=[W,0,0,W,-Math.round(A/2+d)*W,-Math.round(T/2+p)*W]}return{type:"path",path:e,matrix:u}}function $(t){var e,u=1,c="#000000",v='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof t=="string"?e=t:(e=t.text,u="scalar"in t?t.scalar:u,v="fontFamily"in t?t.fontFamily:v,c="color"in t?t.color:c);var m=10*u,h=""+m+"px "+v,d=new OffscreenCanvas(m,m),p=d.getContext("2d");p.font=h;var M=p.measureText(e),S=Math.ceil(M.actualBoundingBoxRight+M.actualBoundingBoxLeft),A=Math.ceil(M.actualBoundingBoxAscent+M.actualBoundingBoxDescent),T=2,j=M.actualBoundingBoxLeft+T,b=M.actualBoundingBoxAscent+T;S+=T+T,A+=T+T,d=new OffscreenCanvas(S,A),p=d.getContext("2d"),p.font=h,p.fillStyle=c,p.fillText(e,j,b);var R=1/u;return{type:"bitmap",bitmap:d.transferToImageBitmap(),matrix:[R,0,0,R,-S*R/2,-A*R/2]}}B.exports=function(){return Te().apply(this,arguments)},B.exports.reset=function(){Te().reset()},B.exports.create=Se,B.exports.shapeFromPath=Le,B.exports.shapeFromText=$})((function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}})(),Ze,!1);const xe=Ze.exports;Ze.exports.create;const et="quiz_sounds_enabled",te=F(localStorage.getItem(et)!=="false");let Ae=null;function Ge(){if(!Ae){const w=window.AudioContext||window.webkitAudioContext;if(!w)return null;try{Ae=new w}catch{return null}}return Ae.state==="suspended"&&Ae.resume().catch(()=>{}),Ae}function _(w,I,B={}){const Q=Ge();if(!Q)return;const{type:O="sine",volume:re=.3,attack:oe=.01,decay:pe=.05,startAt:U=0}=B,E=Q.currentTime+U,q=Q.createOscillator(),D=Q.createGain();q.type=O,q.frequency.setValueAtTime(w,E),D.gain.setValueAtTime(0,E),D.gain.linearRampToValueAtTime(re,E+oe),D.gain.linearRampToValueAtTime(re*.7,E+oe+pe),D.gain.exponentialRampToValueAtTime(.001,E+I),q.connect(D),D.connect(Q.destination),q.start(E),q.stop(E+I+.05)}function tt(w,I,B,Q={}){const O=Ge();if(!O)return;const{type:re="sine",volume:oe=.2,startAt:pe=0}=Q,U=O.currentTime+pe,E=O.createOscillator(),q=O.createGain();E.type=re,E.frequency.setValueAtTime(w,U),E.frequency.exponentialRampToValueAtTime(I,U+B),q.gain.setValueAtTime(0,U),q.gain.linearRampToValueAtTime(oe,U+.02),q.gain.exponentialRampToValueAtTime(.001,U+B),E.connect(q),q.connect(O.destination),E.start(U),E.stop(U+B+.05)}function dt(){if(!te.value)return;const w=Ge();_(800,.08,{type:"sine",volume:.15,attack:.005,decay:.02}),_(1200,.08,{type:"sine",volume:.1,attack:.005,decay:.02,startAt:.02})}function ct(){te.value&&tt(400,800,.15,{type:"triangle",volume:.2})}function pt(){te.value&&tt(800,400,.15,{type:"triangle",volume:.15})}function vt(){te.value&&(_(523,.1,{type:"sine",volume:.2}),_(659,.1,{type:"sine",volume:.2,startAt:.1}),_(784,.2,{type:"sine",volume:.25,startAt:.2}))}function ft(){te.value&&(_(523,.15,{type:"triangle",volume:.25}),_(659,.15,{type:"triangle",volume:.25,startAt:.1}),_(784,.15,{type:"triangle",volume:.25,startAt:.2}),_(1047,.4,{type:"triangle",volume:.3,startAt:.3}),_(1568,.1,{type:"sine",volume:.15,startAt:.5}),_(2093,.15,{type:"sine",volume:.15,startAt:.55}))}function mt(){if(!te.value)return;const w=0;_(523,.2,{type:"triangle",volume:.25,startAt:w}),_(659,.2,{type:"triangle",volume:.25,startAt:w}),_(784,.2,{type:"triangle",volume:.25,startAt:w}),_(698,.2,{type:"triangle",volume:.25,startAt:w+.2}),_(880,.2,{type:"triangle",volume:.25,startAt:w+.2}),_(1047,.2,{type:"triangle",volume:.25,startAt:w+.2}),_(784,.2,{type:"triangle",volume:.25,startAt:w+.4}),_(988,.2,{type:"triangle",volume:.25,startAt:w+.4}),_(1175,.2,{type:"triangle",volume:.25,startAt:w+.4}),_(1047,.5,{type:"triangle",volume:.3,startAt:w+.6}),_(1319,.5,{type:"triangle",volume:.3,startAt:w+.6}),_(1568,.5,{type:"triangle",volume:.3,startAt:w+.6}
2),_(2093,.15,{type:"sine",volume:.15,startAt:w+.7}),_(2637,.15,{type:"sine",volume:.15,startAt:w+.85}),_(3136,.2,{type:"sine",volume:.15,startAt:w+1})}function gt(){te.value&&(_(587,.2,{type:"triangle",volume:.2}),_(523,.2,{type:"triangle",volume:.2,startAt:.15}),_(494,.3,{type:"triangle",volume:.2,startAt:.3}))}function ht(){function w(){te.value=!te.value,localStorage.setItem(et,te.value?"true":"false")}return{soundsEnabled:te,toggleSounds:w,playSelectSound:dt,playNextSound:ct,playPrevSound:pt,playStartSound:vt,playPassSound:ft,playPerfectSound:mt,playFailSound:gt}}const bt={class:"max-w-3xl mx-auto p-4 sm:p-6 pb-20 relative"},yt=["title"],xt={key:0,class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},_t={key:1,class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},wt={key:1,class:"text-center py-20"},kt={key:2,class:"bg-white rounded-xl shadow-sm p-6 sm:p-8"},Mt={class:"text-center"},Ct={class:"text-2xl sm:text-3xl font-bold text-gray-900"},At={key:0,class:"text-gray-600 mt-2"},St={class:"mt-5 inline-flex flex-wrap gap-2 justify-center"},Tt={key:1,class:"text-xs bg-gray-100 text-gray-700 px-3 py-1 rounded-full"},It={class:"mt-6 grid grid-cols-3 gap-3"},Pt={class:"bg-gray-50 rounded-lg p-3 text-center"},jt={class:"text-2xl font-bold text-gray-900"},Et={class:"bg-gray-50 rounded-lg p-3 text-center"},zt={class:"text-2xl font-bold text-gray-900"},Ft={class:"bg-gray-50 rounded-lg p-3 text-center"},qt={class:"text-2xl font-bold text-gray-900"},$t={key:0,class:"mt-5"},Bt={class:"grid grid-cols-1 sm:grid-cols-2 gap-2"},Rt=["onClick"],Lt=["src","alt"],Ot={key:1,class:"w-10 h-10 rounded-full bg-gradient-to-br from-purple-400 to-green-400 flex items-center justify-center text-white font-bold"},Dt={class:"min-w-0 flex-1"},Vt={class:"text-sm font-semibold text-gray-900 truncate"},Nt={key:0,class:"text-xs text-gray-500 truncate"},Ut={key:1,class:"mt-5 grid gap-2"},Qt={class:"text-lg"},Wt={key:2,class:"mt-5 bg-gray-50 rounded-lg p-4"},Ht={class:"text-sm font-medium text-gray-700 mb-2"},Zt=["viewBox"],Gt=["y1","x2","y2"],Kt=["y"],Yt=["points"],Jt=["cx","cy"],Xt=["points"],er=["cx","cy"],tr=["x","y"],rr={class:"flex justify-center gap-4 text-xs text-gray-600 mt-1"},nr={key:0,class:"inline-flex items-center gap-1"},ar={key:3,class:"mt-5 border-t pt-4"},sr={class:"text-sm font-medium text-gray-700 mb-2"},or={class:"space-y-1"},lr=["onClick"],ir={class:"flex items-center gap-2"},ur={class:"text-gray-600"},dr={key:0,class:"text-blue-600"},cr={class:"flex items-center gap-2"},pr=["disabled"],vr={key:3,class:"bg-white rounded-xl shadow-sm"},fr={class:"p-4 border-b sticky top-0 bg-white z-10"},mr={class:"flex items-center justify-between mb-2"},gr={class:"text-sm font-medium text-gray-600"},hr={class:"w-full bg-gray-200 rounded-full h-2"},br={key:0,class:"mt-2 flex justify-end"},yr={class:"text-lg sm:text-xl font-bold text-gray-900 break-words"},xr=["src","alt"],_r={key:1,class:"mt-3"},wr={key:1,class:"bg-amber-50 border border-amber-200 rounded-lg p-3 text-sm text-amber-900"},kr={class:"mt-6 space-y-2"},Mr=["onClick","disabled"],Cr={key:0,class:"w-3.5 h-3.5 text-white",fill:"none",stroke:"currentColor","stroke-width":"3",viewBox:"0 0 24 24"},Ar={key:1,class:"w-3.5 h-3.5 text-white",fill:"none",stroke:"currentColor","stroke-width":"3",viewBox:"0 0 24 24"},Sr={key:2,class:"w-3.5 h-3.5 text-white",fill:"none",stroke:"currentColor","stroke-width":"3",viewBox:"0 0 24 24"},Tr={class:"min-w-0 flex-1"},Ir=["src"],Pr={key:1,class:"text-base text-gray-900 break-words"},jr={class:"font-bold text-lg flex items-center gap-2"},Er={key:0,class:"text-sm mt-2"},zr={key:1,class:"text-sm mt-2"},Fr={class:"p-4 border-t bg-gray-50 flex gap-2"},qr=["disabled"],$r=["disabled"],Br={key:4,class:"space-y-4"},Rr={class:"bg-white rounded-xl shadow-sm p-6 sm:p-8 text-center"},Lr={class:"text-6xl mb-3"},Or={class:"text-2xl sm:text-3xl font-bold text-gray-900"},Dr={class:"text-gray-600 mt-2"},Vr={class:"mt-5 inline-block bg-gradient-to-br from-purple-500 to-green-500 text-white rounded-2xl p-6"},Nr={class:"text-5xl font-bold"},Ur={class:"text-sm opacity-90 mt-1"},Qr={key:0,class:"bg-white rounded-xl shadow-sm p-5 sm:p-6"},Wr={class:"space-y-3"},Hr={class:"flex items-center justify-between mb-1 gap-2"},Zr={class:"text-sm font-medium text-gray-800 truncate"},Gr={class:"w-full h-2.5 bg-gray-100 rounded-full overflow-hidden"},Kr={key:0},Yr={key:1,class:"bg-white rounded-xl shadow-sm p-5 sm:p-6"},Jr={class:"space-y-3"},Xr={class:"flex items-center justify-between mb-1"},en={class:"text-sm font-medium text-gray-800 truncate mr-2"},tn={class:"w-full h-3 bg-gray-100 rounded-full overflow-hidden"},rn={key:2,class:"bg-amber-50 border border-amber-200 rounded-xl p-5 sm:p-6"},nn={class:"space-y-2"},an={class:"flex-1"},sn={key:0,class:"text-xs bg-amber-200 px-2 py-0.5 rounded-full"},on={class:"bg-white rounded-xl shadow-sm p-5 sm:p-6"},ln={class:"space-y-4"},un={class:"text-sm font-medium text-gray-900 break-words"},dn={class:"text-xs bg-gray-100 px-2 py-0.5 rounded-full mr-2"},cn=["src"],pn={class:"mt-2 space-y-1"},vn={key:0,class:"w-4 h-4 flex-shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2.5",viewBox:"0 0 24 24"},fn={key:1,class:"w-4 h-4 flex-shrink-0 text-red-500",fill:"none",stroke:"currentColor","stroke-width":"2.5",viewBox:"0 0 24 24"},mn={key:2,class:"w-4 h-4 flex-shrink-0"},gn=["src"],hn={class:"break-words"},bn={key:4,class:"text-xs ml-auto font-medium"},yn={key:1,class:"mt-2 bg-yellow-50 border border-yellow-200 rounded p-2 text-xs text-yellow-900"},xn={key:2,class:"mt-2 bg-blue-50 border border-blue-200 rounded p-2 text-xs text-blue-800"},_n={key:3,class:"mt-2 flex flex-wrap gap-1"},We=320,Fe=140,He=40,wn=10,qe=10,Xe=25,kn={__name:"LibraryQuizPlay",setup(w){const I=lt(),B=ut(),{soundsEnabled:Q,toggleSounds:O,playSelectSound:re,playNextSound:oe,playStartSound:pe,playPassSound:U,playPerfectSound:E,playFailSound:q}=ht(),D=F(!0),le=F("intro"),k=F(null),ne=F([]),ie=F([]),x=F(null),$e=se(()=>ie.value.find(r=>r.id===x.value)),ve=se(()=>{var r;return((r=$e.value)==null?void 0:r.name)||""}),de=F(!1),Z=F(!1),ge=F(null),P=F(null),_e=F(10),fe=F(0),ae=F(null),g=F(null),he=F({});let be=null;function Be(r){he.value[r]=!0}const Se={basico:"Basico",intermedio:"Intermedio",avanzado:"Avanzado",desafio:"Desafio"};function we(r){return Se[r]||r}function Te(r){switch(r){case"basico":return"bg-green-100 text-green-700";case"intermedio":return"bg-blue-100 text-blue-700";case"avanzado":return"bg-purple-100 text-purple-700";case"desafio":return"bg-red-100 text-red-700";default:return"bg-gray-100 text-gray-700"}}function Re(r){return g.value?r.id===g.value.correct_option_id?"border-green-500 bg-green-50 cursor-default":r.id===g.value.selected_option_id&&!g.value.is_correct?"border-red-400 bg-red-50 cursor-default":"border-gray-200 bg-white opacity-60 cursor-default":ae.value===r.id?"border-purple-500 bg-purple-50 selected-pop":"border-gray-200 hover:border-purple-300 bg-white"}function Le(r){return g.value?r.id===g.value.correct_option_id?"border-green-600 bg-green-600":r.id===g.value.selected_option_id&&!g.value.is_correct?"border-red-500 bg-red-500":"border-gray-300":ae.value===r.id?"border-purple-600 bg-purple-600":"border-gray-300"}const $=F(null),t=se(()=>{var r;return((r=$.value)==null?void 0:r.habilidades)||[]});function e(r){return r.total<2?r.score>=1?"correcta":"a revisar":r.score>=.8?"lograda":r.score>=.5?"en desarrollo":"necesita refuerzo"}function u(r){return r.total<2?r.score>=1?"bg-gray-100 text-gray-600":"bg-amber-50 text-amber-700":r.score>=.8?"bg-green-100 text-green-700":r.score>=.5?"bg-blue-100 text-blue-700":"bg-amber-100 text-amber-700"}const c=se(()=>{var f;if(!((f=$.value)!=null&&f.skill_scores))return[];const r=$.value.skill_scores;return(Array.isArray(r)?r:Object.entries(r).map(([z,s])=>({topic_id:z,...s}))).sort((z,s)=>s.score-z.score)});function v(r){return r>=.8?"text-green-600":r>=.5?"text-blue-600":r>=.3?"text-amber-600":"text-red-600"}function m(r){return r>=.8?"bg-green-500":r>=.5?"bg-blue-500":r>=.3?"bg-amber-500":"bg-red-500"}function h(r){return r>=.8?"¡Dominas este objetivo!":r>=.5?"Vas bien, sigue practicando":r>=.3?"Repasa este objetivo":"Este objetivo necesita más práctica"}const d=F(null);let p=null;function M(r){g.value||(ae.value=r,re())}async function S(){if(ie.value.length>=2&&!x.value){window.$toast&&window.$toast.error("Selecciona para que hijo es la prueba");return}de.value=!0;try{const r={};x.value&&(r.student_id=x.value);const f=(await ye.post(`/library/quizzes/${k.value.id}/attempts`,r)).data.data;if(ge.value=f.attempt_id,_e.value=f.max_questions||10,P.value=f.question,fe.value=0,ae.value=null,g.value=null,he.value={},be=Date.now(),f.finished||!P.value){await j();return}le.value="play",await it(),pe(),k.value.time_limit_minutes&&(d.value=k.value.time_limit_minutes*60,p=setInterval(()=>{d.value>0?d.value--:(clearInterval(p),j())},1e3))}catch{window.$toast&&window.$toast.error("Error al iniciar la prueba")}finally{de.value=!1}}async function A(){var n,f;if(Z.value||!P.value||g.value)return;Z.value=!0;const r=be?Math.max(0,Math.round((Date.now()-be)/1e3)):0;try{const s=(await ye.post(`/library/quizzes/${k.value.id}/attempts/${ge.value}/answer`,{question_id:P.value.id,selected_option_id:ae.value,time_spent_seconds:r,used_hint:!!he.value[P.value.id]})).data.data;g.value={...s.answered,finished:s.finished,next_question:s.question},fe.value+=1,s.answered.is_correct&&re()}catch(z){window.$toast&&window.$toast.error(((f=(n=z.response)==null?void 0:n.data)==null?void 0:f.message)||"Error al enviar respuesta")}finally{Z.value=!1}}function T(){if(g.value){if(g.value.finished)return j();P.value=g.value.next_question,g.value=null,ae.value=null,be=Date.now(),oe(),window.scrollTo({top:0,behavior:"smooth"})}}async function j(){var r,n;if(!Z.value){Z.value=!0,p&&clearInterval(p);try{const f=await ye.post(`/library/quizzes/${k.value.id}/attempts/${ge.value}/finish`);$.value=f.data.data,le.value="result",P.value=null,g.value=null,window.scrollTo({top:0,behavior:"smooth"}),b($.value)}catch(f){window.$toast&&window.$toast.error(((n=(r=f.response)==null?void 0:r.data)==null?void 0:n.message)||"Error al cerrar la prueba")}finally{Z.value=!1}}}function b(r){if(!r)return;const n=r.score===100,f=r.passed;n?(E(),W()):f?(U(),R()):q()}function R(){const n=Date.now()+2500,f=["#8b5cf6","#10b981","#3b82f6","#f59e0b"];(function z(){xe({particleCount:3,angle:60,spread:55,origin:{x:0,y:.7},colors:f,disableForReducedMotion:!0}
2),xe({particleCount:3,angle:120,spread:55,origin:{x:1,y:.7},colors:f,disableForReducedMotion:!0}),Date.now()<n&&requestAnimationFrame(z)})()}function W(){const n=Date.now()+5e3,f=["#fbbf24","#f59e0b","#10b981","#8b5cf6","#ec4899","#3b82f6"];xe({particleCount:150,spread:100,origin:{y:.6},colors:f,disableForReducedMotion:!0}),(function C(){xe({particleCount:5,angle:60,spread:70,origin:{x:0,y:.7},colors:f,disableForReducedMotion:!0}),xe({particleCount:5,angle:120,spread:70,origin:{x:1,y:.7},colors:f,disableForReducedMotion:!0}),Date.now()<n&&requestAnimationFrame(C)})();let z=6;const s=setInterval(()=>{xe({particleCount:30,startVelocity:25,spread:360,ticks:100,origin:{x:Math.random(),y:Math.random()*.4},colors:f,shapes:["star"],scalar:1.2,disableForReducedMotion:!0}),--z<=0&&clearInterval(s)},600)}async function H(){le.value="intro",$.value=null,ge.value=null,await Qe(),window.scrollTo({top:0,behavior:"smooth"})}function X(){var n;const r=(n=k.value)==null?void 0:n.topic_id;r?B.push({path:"/biblioteca",query:{topic:r}}):B.push("/biblioteca")}async function ue(){le.value="intro",await Ke()}function G(r,n){return n.is_correct?"bg-green-50 text-green-800 font-medium":r.selected_option_id===n.id&&!r.is_correct?"bg-red-50 text-red-800":"bg-gray-50 text-gray-600"}function Oe(r){const n=Math.floor(r/60),f=r%60;return`${n}:${f.toString().padStart(2,"0")}`}function De(r){return r?new Date(r).toLocaleDateString("es-CL",{day:"2-digit",month:"2-digit",year:"numeric"}):""}function Ve(r){if(r==null)return"";if(r<60)return r+"s";const n=Math.floor(r/60),f=r%60;return`${n}m ${f}s`}const ee=se(()=>[...ne.value].reverse().slice(-10)),ke=se(()=>ee.value.some(r=>r.duration_seconds!==null&&r.duration_seconds>0));function ce(r){const n=ee.value.length;if(n<=1)return He;const f=We-He-wn;return He+r*f/(n-1)}function me(r){const n=Fe-qe-Xe;return qe+n-r/100*n}const Ne=se(()=>Math.max(...ee.value.map(n=>n.duration_seconds||0),1));function Me(r){const n=Fe-qe-Xe;return qe+r/Ne.value*n}const Ie=se(()=>ee.value.map((r,n)=>`${ce(n)},${me(r.score)}`).join(" ")),Ce=se(()=>ee.value.map((r,n)=>`${ce(n)},${Me(r.duration_seconds||0)}`).join(" ")),Pe=se(()=>{var Ye;const r=[],n=ne.value;if(n.length===0)return r;const f=[...n].reverse(),z=f[f.length-1],s=ve.value||((Ye=z.student)==null?void 0:Ye.name)||"",C=s?`${s}`:"Tu hijo",je=Math.max(...n.map(Y=>Y.score));if(z.score===je&&n.length>1&&r.push({type:"success",icon:"ð",text:`${C} obtuvo su mejor puntaje en esta prueba`}),n.filter(Y=>Y.passed).length===1&&z.passed&&r.push({type:"success",icon:"ð¯",text:`${C} aprobo por primera vez`}),f.length>=3){const Y=f.slice(-3);Y[2].score>Y[1].score&&Y[1].score>Y[0].score&&r.push({type:"success",icon:"ð",text:`${C} ha mejorado 3 intentos seguidos`})}if(f.length>=2&&f[0].duration_seconds&&z.duration_seconds){const Y=f[0].duration_seconds,Je=z.duration_seconds;if(Je<Y*.7){const rt=Math.round((Y-Je)/Y*100);r.push({type:"info",icon:"â¡",text:`${C} es ${rt}% mas rapido que en su primer intento`})}}return z.score===100&&r.push({type:"success",icon:"ð",text:`${C} obtuvo puntaje perfecto en el ultimo intento`}),r.slice(0,3)});function Ue(r){B.push({name:"library-quiz-attempt-detail",params:{quizId:I.params.quizId,attemptId:r}})}async function Qe(){try{const r={};x.value&&(r.student_id=x.value);const n=await ye.get(`/library/quizzes/${I.params.quizId}/my-attempts`,{params:r});ne.value=n.data.data||[]}catch{ne.value=[]}}async function Ke(){D.value=!0;try{const[r,n]=await Promise.all([ye.get(`/library/quizzes/${I.params.quizId}`),ye.get("/library/my-students")]);k.value=r.data.data,ie.value=n.data.data||[],ie.value.length===1&&(x.value=ie.value[0].id),await Qe()}catch{window.$toast&&window.$toast.error("Error cargando la prueba")}finally{D.value=!1}}return at(x,()=>{x.value&&Qe()}),st(Ke),ot(()=>{p&&clearInterval(p)}),(r,n)=>{var f,z;return l(),o("div",bt,[D.value?y("",!0):(l(),o("button",{key:0,onClick:n[0]||(n[0]=(...s)=>Ee(O)&&Ee(O)(...s)),class:"fixed top-20 right-4 sm:top-24 sm:right-6 z-50 w-10 h-10 rounded-full shadow-md bg-white border border-gray-200 hover:bg-gray-50 flex items-center justify-center text-gray-700",title:Ee(Q)?"Silenciar sonidos":"Activar sonidos"},[Ee(Q)?(l(),o("svg",xt,[...n[3]||(n[3]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15z"},null,-1)])])):(l(),o("svg",_t,[...n[4]||(n[4]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5.586 15H4a1 1 0 01-1-1v-4a1 1 0 011-1h1.586l4.707-4.707C10.923 3.663 12 4.109 12 5v14c0 .891-1.077 1.337-1.707.707L5.586 15zM17 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2"},null,-1)])]))],8,yt)),D.value?(l(),o("div",wt,[...n[5]||(n[5]=[a("div",{class:"animate-spin text-3xl inline-block"},"â",-1),a("p",{class:"text-gray-500 mt-2"},"Cargando prueba...",-1)])])):le.value==="intro"?(l(),o("div",kt,[a("button",{onClick:n[1]||(n[1]=s=>r.$router.back()),class:"text-sm text-purple-600 hover:underline inline-flex items-center gap-1 mb-4"},[...n[6]||(n[6]=[a("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1),J(" Volver ",-1)])]),a("div",Mt,[n[7]||(n[7]=a("div",{class:"text-6xl mb-3"}
2,"ð¯",-1)),a("h1",Ct,i(k.value.title),1),k.value.description?(l(),o("p",At,i(k.value.description),1)):y("",!0),a("div",St,[k.value.subject_name?(l(),o("span",{key:0,class:"text-xs px-3 py-1 rounded-full font-medium",style:ze({backgroundColor:(k.value.subject_color||"#6b7280")+"20",color:k.value.subject_color||"#6b7280"})},i(k.value.subject_name),5)):y("",!0),k.value.topic_name?(l(),o("span",Tt,i(k.value.topic_name),1)):y("",!0)])]),a("div",It,[a("div",Pt,[a("p",jt,i(k.value.max_questions&&k.value.max_questions<k.value.questions_count?k.value.max_questions:k.value.questions_count),1),n[8]||(n[8]=a("p",{class:"text-xs text-gray-500"},"Preguntas",-1))]),a("div",Et,[a("p",zt,i(k.value.time_limit_minutes?k.value.time_limit_minutes+" min":"â"),1),n[9]||(n[9]=a("p",{class:"text-xs text-gray-500"},"Tiempo",-1))]),a("div",Ft,[a("p",qt,i(k.value.passing_score)+"%",1),n[10]||(n[10]=a("p",{class:"text-xs text-gray-500"},"Aprobacion",-1))])]),ie.value.length>=2?(l(),o("div",$t,[n[11]||(n[11]=a("label",{class:"block text-sm font-medium text-gray-700 mb-2"},"¿Para que hijo es?",-1)),a("div",Bt,[(l(!0),o(V,null,N(ie.value,s=>(l(),o("button",{key:s.id,type:"button",onClick:C=>x.value=s.id,class:L(["flex items-center gap-3 p-3 border-2 rounded-lg transition-all text-left",x.value===s.id?"border-purple-500 bg-purple-50":"border-gray-200 hover:border-purple-300"])},[s.photo_url?(l(),o("img",{key:0,src:s.photo_url,alt:s.name,class:"w-10 h-10 rounded-full object-cover"},null,8,Lt)):(l(),o("div",Ot,i((s.name||"?").charAt(0).toUpperCase()),1)),a("div",Dt,[a("p",Vt,i(s.name),1),s.course?(l(),o("p",Nt,i(s.course.display_name),1)):y("",!0)])],10,Rt))),128))])])):y("",!0),Pe.value.length>0?(l(),o("div",Ut,[(l(!0),o(V,null,N(Pe.value,(s,C)=>(l(),o("div",{key:C,class:L(["flex items-center gap-2 text-sm rounded-lg p-3",s.type==="success"?"bg-green-50 text-green-800 border border-green-200":s.type==="info"?"bg-blue-50 text-blue-800 border border-blue-200":"bg-amber-50 text-amber-800 border border-amber-200"])},[a("span",Qt,i(s.icon),1),a("span",null,i(s.text),1)],2))),128))])):y("",!0),ne.value.length>=3?(l(),o("div",Wt,[a("p",Ht,i(ve.value?`Evolucion de ${ve.value}`:"Evolucion"),1),(l(),o("svg",{viewBox:`0 0 ${We} ${Fe}`,class:"w-full h-40"},[(l(),o(V,null,N([0,25,50,75,100],(s,C)=>a("line",{key:C,x1:40,y1:me(s),x2:We-10,y2:me(s),stroke:"#e5e7eb","stroke-width":"1"},null,8,Gt)),64)),(l(),o(V,null,N([0,50,100],(s,C)=>a("text",{key:"l"+C,x:35,y:me(s)+4,"text-anchor":"end","font-size":"10",fill:"#6b7280"},i(s),9,Kt)),64)),a("polyline",{points:Ie.value,fill:"none",stroke:"#8b5cf6","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Yt),(l(!0),o(V,null,N(ee.value,(s,C)=>(l(),o("circle",{key:"sp"+C,cx:ce(C),cy:me(s.score),r:"4",fill:"#8b5cf6"},null,8,Jt))),128)),ke.value?(l(),o("polyline",{key:0,points:Ce.value,fill:"none",stroke:"#10b981","stroke-width":"2","stroke-dasharray":"4,3","stroke-linecap":"round","stroke-linejoin":"round"},null,8,Xt)):y("",!0),ke.value?(l(!0),o(V,{key:1},N(ee.value,(s,C)=>(l(),o("circle",{key:"tp"+C,cx:ce(C),cy:Me(s.duration_seconds||0),r:"3",fill:"#10b981"},null,8,er))),128)):y("",!0),(l(!0),o(V,null,N(ee.value,(s,C)=>(l(),o("text",{key:"x"+C,x:ce(C),y:Fe-6,"text-anchor":"middle","font-size":"10",fill:"#6b7280"},i(C+1),9,tr))),128))],8,Zt)),a("div",rr,[n[13]||(n[13]=a("span",{class:"inline-flex items-center gap-1"},[a("span",{class:"w-3 h-0.5 bg-purple-500 inline-block"}),J(" Puntaje")],-1)),ke.value?(l(),o("span",nr,[...n[12]||(n[12]=[a("span",{class:"w-3 h-0.5 bg-green-500 inline-block border-dashed"},null,-1),J(" Tiempo",-1)])])):y("",!0)])])):y("",!0),ne.value.length>0?(l(),o("div",ar,[a("p",sr,i(ve.value?`Intentos anteriores de ${ve.value}:`:"Intentos anteriores:"),1),a("div",or,[(l(!0),o(V,null,N(ne.value.slice(0,5),s=>(l(),o("button",{key:s.id,type:"button",onClick:C=>Ue(s.id),class:"w-full flex items-center justify-between text-xs bg-gray-50 hover:bg-purple-50 rounded p-2 transition-colors"},[a("div",ir,[a("span",ur,i(De(s.finished_at)),1),s.duration_seconds!==null?(l(),o("span",dr,"â± "+i(Ve(s.duration_seconds)),1)):y("",!0)]),a("div",cr,[a("span",{class:L(["font-medium",s.passed?"text-green-600":"text-amber-600"])},i(s.correct_answers)+"/"+i(s.total_questions)+" ("+i(s.score)+"%) "+i(s.passed?"â":""),3),n[14]||(n[14]=a("svg",{class:"w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1))])],8,lr))),128))])])):y("",!0),a("button",{onClick:S,disabled:de.value||k.value.questions_count===0,class:"mt-6 w-full btn-schoolface text-lg disabled:opacity-50"},i(de.value?"Iniciando...":k.value.questions_count===0?"Sin preguntas aun":ne.value.length>0?"Intentar de nuevo":"Empezar prueba"),9,pr)])):le.value==="play"&&P.value?(l(),o("div",vr,[a("div",fr,[a("div",mr,[a("p",gr," Pregunta "+i(fe.value+1)+" de "+i(_e.value),1),d.value!==null?(l(),o("p",{key:0,class:L(["text-sm font-mono",d.value<60?"text-red-600":"text-gray-600"])}," â± "+i(Oe(d.value)),3)):y("",!0)]),a("div",hr,[a("div",{class:"bg-gradient-to-r from-purple-500 to-green-500 h-2 rounded-full transition-all",style:ze({width:(fe.value+(g.value?1:0))/_e.value*100+"%"})},null,4)]),P.value.difficulty_level?(l(),o("div",br,[a("span",{class:L(["text-[10px] uppercase tracking-wider font-semibold px-2 py-0.5 rounded-full",Te(P.value.difficulty_level)])},i(we(P.value.difficulty_level)),3)])):y("",!0)]),(l(),o("div",{key:P.value.id,class:"p-5 sm:p-6 question-fade-in"},[a("h2",yr,i(P.value.statement),1),P.value.image_url?(l(),o("img",{key:0,src:P.value.image_url,alt:`Pregunta ${fe.value+1}`,class:"mt-4 max-h-72 mx-auto rounded-lg"},null,8,xr)):y("",!0),P.value.hint&&!g.value?(l(),o("div",_r,[he.value[P.value.id]?(l(),o("div",wr,[n[16]||(n[16]=a("span",{class:"font-medium"},"ð¡ Pista:",-1)),J(" "+i(P.value.hint),1)])):(l(),o("button",{key:0,t
2ype:"button",onClick:n[2]||(n[2]=s=>Be(P.value.id)),class:"inline-flex items-center gap-1.5 text-sm text-amber-700 hover:text-amber-800 hover:bg-amber-50 px-3 py-1.5 rounded-lg border border-amber-200"},[...n[15]||(n[15]=[a("span",null,"ð¡",-1),a("span",null,"Ver pista",-1)])]))])):y("",!0),a("div",kr,[(l(!0),o(V,null,N(P.value.options,s=>(l(),o("button",{key:s.id,type:"button",onClick:C=>M(s.id),disabled:!!g.value,class:L(["option-button w-full text-left p-4 rounded-lg border-2 transition-all flex items-start gap-3 active:scale-95",Re(s)])},[a("div",{class:L(["w-6 h-6 rounded-full border-2 flex-shrink-0 mt-0.5 flex items-center justify-center",Le(s)])},[!g.value&&ae.value===s.id?(l(),o("svg",Cr,[...n[17]||(n[17]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"},null,-1)])])):g.value&&s.id===g.value.correct_option_id?(l(),o("svg",Ar,[...n[18]||(n[18]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"},null,-1)])])):g.value&&s.id===g.value.selected_option_id&&!g.value.is_correct?(l(),o("svg",Sr,[...n[19]||(n[19]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"},null,-1)])])):y("",!0)],2),a("div",Tr,[s.image_url?(l(),o("img",{key:0,src:s.image_url,alt:"Opcion",class:"max-h-32 rounded mb-1"},null,8,Ir)):y("",!0),s.text?(l(),o("p",Pr,i(s.text),1)):y("",!0)])],10,Mr))),128))]),g.value?(l(),o("div",{key:2,class:L(["mt-4 rounded-lg p-4 border feedback-fade-in",g.value.is_correct?"bg-green-50 border-green-200 text-green-900":"bg-red-50 border-red-200 text-red-900"])},[a("p",jr,[a("span",null,i(g.value.is_correct?"â
¡Correcto!":"â Incorrecto"),1)]),g.value.feedback_text?(l(),o("p",Er," ð¬ "+i(g.value.feedback_text),1)):y("",!0),!g.value.is_correct&&g.value.explanation?(l(),o("p",zr," ð¡ "+i(g.value.explanation),1)):y("",!0)],2)):y("",!0)])),a("div",Fr,[g.value?g.value.finished?(l(),o("button",{key:2,onClick:j,disabled:Z.value,class:"flex-1 btn-schoolface bg-gradient-to-r from-green-500 to-purple-600"},i(Z.value?"Cerrando...":"Ver resultados"),9,$r)):(l(),o("button",{key:1,onClick:T,class:"flex-1 btn-schoolface"}," Siguiente pregunta â ")):(l(),o("button",{key:0,onClick:A,disabled:!ae.value||Z.value,class:"flex-1 btn-schoolface disabled:opacity-50"},i(Z.value?"Enviando...":"Responder"),9,qr))])])):le.value==="result"?(l(),o("div",Br,[a("div",Rr,[a("div",Lr,i($.value.passed?"ð":"ðª"),1),a("h2",Or,i($.value.passed?"¡Aprobaste!":"Sigue practicando"),1),a("p",Dr," Acertaste "+i($.value.correct_answers)+" de "+i($.value.total_questions)+" preguntas ",1),a("div",Vr,[a("p",Nr,[J(i($.value.score),1),n[20]||(n[20]=a("span",{class:"text-2xl"},"%",-1))]),a("p",Ur,"Aprobacion: "+i($.value.passing_score)+"%",1)]),a("div",{class:"mt-5 flex flex-col sm:flex-row gap-2 justify-center"},[a("button",{onClick:ue,class:"px-5 py-2.5 border rounded-lg text-purple-700 border-purple-300 hover:bg-purple-50"}," ð Intentar de nuevo "),a("button",{onClick:H,class:"px-5 py-2.5 border rounded-lg text-purple-700 border-purple-300 hover:bg-purple-50"}," ð Ver estadisticas "),a("button",{onClick:X,class:"px-5 py-2.5 btn-schoolface"}," ð Volver al tema ")])]),t.value.length>0?(l(),o("div",Qr,[n[21]||(n[21]=a("h3",{class:"text-lg font-bold text-gray-900 mb-1 flex items-center gap-2"},[a("span",null,"ð§ "),J(" Habilidades evaluadas ")],-1)),n[22]||(n[22]=a("p",{class:"text-sm text-gray-600 mb-4"}," Esto es lo que muestra el ensayo sobre cada habilidad. ",-1)),a("div",Wr,[(l(!0),o(V,null,N(t.value,s=>(l(),o("div",{key:s.skill},[a("div",Hr,[a("span",Zr,i(s.label),1),a("span",{class:L(["text-[11px] font-bold uppercase tracking-wide px-2 py-0.5 rounded-full flex-shrink-0",u(s)])},i(e(s)),3)]),a("div",Gr,[a("div",{class:L(["h-full rounded-full transition-all duration-700",m(s.score)]),style:ze({width:`${Math.max(s.score*100,4)}%`})},null,6)]),a("p",{class:L(["text-[11px] mt-1",s.total<2?"text-gray-400 italic":"text-gray-400"])},[J(i(s.correct)+" de "+i(s.total)+" "+i(s.total===1?"pregunta":"preguntas")+" ",1),s.total<2?(l(),o("span",Kr,"· indicio, no diagnostico")):y("",!0)],2)]))),128))])])):y("",!0),c.value.length>0?(l(),o("div",Yr,[n[23]||(n[23]=a("h3",{class:"text-lg font-bold text-gray-900 mb-4 flex items-center gap-2"},[a("span",null,"ð¯"),J(" Tu desempeño por habilidad ")],-1)),n[24]||(n[24]=a("p",{class:"text-sm text-gray-600 mb-4"}," Estos son los objetivos de aprendizaje que evaluamos y cómo te fue en cada uno. ",-1)),a("div",Jr,[(l(!0),o(V,null,N(c.value,s=>(l(),o("div",{key:s.topic_id},[a("div",Xr,[a("span",en,i(s.name),1),a("span",{class:L(["text-sm font-semibold flex-shrink-0",v(s.score)])},i(s.correct)+"/"+i(s.total),3)]),a("div",tn,[a("div",{class:L(["h-full rounded-full transition-all duration-700",m(s.score)]),style:ze({width:`${s.score*100}%`})},null,6)]),a("p",{class:L(["text-xs mt-1",v(s.score)])},i(h(s.score)),3)]))),128))])])):y("",!0),((z=(f=$.value)==null?void 0:f.misconceptions)==null?void 0:z.length)>0?(l(),o("div",rn,[n[26]||(n[26]=a("h3",{class:"text-lg font-bold text-amber-900 mb
2-3 flex items-center gap-2"},[a("span",null,"ð¡"),J(" Errores comunes detectados ")],-1)),n[27]||(n[27]=a("p",{class:"text-sm text-amber-800 mb-3"}," Estos son los tipos de error que aparecieron en tus respuestas. Es normal, todos aprendemos asÃ: ",-1)),a("ul",nn,[(l(!0),o(V,null,N($.value.misconceptions,s=>(l(),o("li",{key:s.tag,class:"flex items-start gap-2 bg-white/60 rounded-lg p-2 text-sm text-amber-900"},[n[25]||(n[25]=a("span",null,"â ï¸",-1)),a("span",an,i(s.tag),1),s.count>1?(l(),o("span",sn,i(s.count)+"x",1)):y("",!0)]))),128))])])):y("",!0),a("div",on,[n[32]||(n[32]=a("h3",{class:"text-lg font-bold text-gray-900 mb-4"},"Revision de respuestas",-1)),a("div",ln,[(l(!0),o(V,null,N($.value.review,(s,C)=>{var je;return l(),o("div",{key:s.question_id,class:L(["border-l-4 pl-4",s.is_correct?"border-green-500":"border-red-400"])},[a("p",un,[a("span",dn,i(C+1),1),J(" "+i(s.statement),1)]),s.image_url?(l(),o("img",{key:0,src:s.image_url,alt:"Pregunta",class:"mt-2 max-h-32 rounded"},null,8,cn)):y("",!0),a("div",pn,[(l(!0),o(V,null,N(s.options,K=>(l(),o("div",{key:K.id,class:L(["text-sm px-3 py-2 rounded flex items-center gap-2",G(s,K)])},[K.is_correct?(l(),o("svg",vn,[...n[28]||(n[28]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)])])):s.selected_option_id===K.id&&!s.is_correct?(l(),o("svg",fn,[...n[29]||(n[29]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"},null,-1)])])):(l(),o("span",mn)),K.image_url?(l(),o("img",{key:3,src:K.image_url,alt:"",class:"w-8 h-8 rounded object-cover"},null,8,gn)):y("",!0),a("span",hn,i(K.text),1),s.selected_option_id===K.id?(l(),o("span",bn," (Tu respuesta) ")):y("",!0)],2))),128))]),s.feedback_text?(l(),o("div",yn,[n[30]||(n[30]=a("span",{class:"font-semibold"},"ð¬ Retroalimentacion:",-1)),J(" "+i(s.feedback_text),1)])):y("",!0),s.explanation?(l(),o("div",xn,[n[31]||(n[31]=a("span",{class:"font-semibold"},"ð¡ Explicacion:",-1)),J(" "+i(s.explanation),1)])):y("",!0),((je=s.learning_objectives)==null?void 0:je.length)>0?(l(),o("div",_n,[(l(!0),o(V,null,N(s.learning_objectives,K=>(l(),o("span",{key:K.id,class:"text-[10px] px-2 py-0.5 bg-purple-50 text-purple-700 border border-purple-200 rounded-full"}," ð "+i(K.name),1))),128))])):y("",!0)],2)}),128))])])])):y("",!0)])}}},Cn=nt(kn,[["__scopeId","data-v-1cf299ab"]]);export{Cn 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.