diff --git a/assets/AIChatPage-DcGfVQjX.js b/assets/AIChatPage-CZPJTGvo.js similarity index 93% rename from assets/AIChatPage-DcGfVQjX.js rename to assets/AIChatPage-CZPJTGvo.js index f7467cb269d49beddfcdc68e346eaf806009c981..65093b06ef6c9cfba6e47c43c89044d0de8b50c7 100644 --- a/assets/AIChatPage-DcGfVQjX.js +++ b/assets/AIChatPage-CZPJTGvo.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-fWY85Kyg.js","assets/vendor-react-B4AQeu28.js","assets/vendor-firebase-auth-BW5XT768.js","assets/vendor-firebase-core-y3En_kpN.js","assets/vendor-firebase-firestore-52DD1vc9.js","assets/vendor-firebase-storage-DNmrKfQ-.js","assets/vendor-firebase-analytics-DZd0u9yk.js","assets/vendor-radix-DnWAlVSW.js","assets/vendor-charts-BHw0fhqZ.js","assets/vendor-markdown-yqZQ_iQm.js","assets/vendor-markdown-CfVKi3_s.css","assets/index-CcVKs9hN.css"])))=>i.map(i=>d[i]); -import{al as F,u as $,_ as z,h as k,m as S,U as O}from"./index-fWY85Kyg.js";import{r as a,j as e}from"./vendor-react-B4AQeu28.js";import{B as H}from"./button-BSRmUN27.js";import{I as C}from"./input-B3NSXxdz.js";import Y from"./ChatMarkdown-C-_pyfsw.js";import{P as D}from"./plus-CRabOymo.js";import{S as G}from"./search-DoNO8thr.js";import{T as Q}from"./trash-2-PgvGautk.js";import{S as U}from"./send-86vsPrek.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";const ce=()=>{const{sessions:I,activeSessionId:r,isLoading:l,loadingSessionId:A,setActiveSessionId:i,createNewSession:u,sendMessage:L,deleteSession:_,getActiveSession:T}=F(),{userProfile:f}=$(),[d,P]=a.useState(""),[o,b]=a.useState(""),[y,g]=a.useState(!1),c=a.useRef(null),x=a.useRef(!0),m=a.useRef(!1),n=T(),h=n?.messages||[],M=h.some(t=>t.sender==="ai"&&t.id.startsWith("stream-")),j=l&&r===A&&!M,v=(t="auto")=>{const s=c.current;s&&s.scrollTo({top:s.scrollHeight,behavior:t})},E=()=>{const t=c.current;return t?t.scrollHeight-t.scrollTop-t.clientHeight<=120:!0},R=()=>{x.current=E()};a.useEffect(()=>{z(async()=>{const{warmupBackend:t}=await import("./index-fWY85Kyg.js").then(s=>s.az);return{warmupBackend:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])).then(({warmupBackend:t})=>{t()}).catch(t=>{console.warn("AI chat warmup skipped:",t)})},[]),a.useEffect(()=>{if(!x.current)return;const t=window.requestAnimationFrame(()=>v("auto"));return()=>window.cancelAnimationFrame(t)},[h,j]),a.useEffect(()=>{x.current=!0,v("auto")},[r]);const w=async()=>{if(!(!o.trim()||l||y||m.current)){m.current=!0,g(!0);try{let t=r;t||(t=u(),i(t));const s=o.trim();b(""),await L(t,s)}finally{m.current=!1,g(!1)}}},N=()=>{const t=u();i(t)},B=(t,s)=>{s.stopPropagation(),_(t)},p=I.filter(t=>t.title.toLowerCase().includes(d.toLowerCase())||t.preview.toLowerCase().includes(d.toLowerCase()));return e.jsxs("div",{className:"h-full min-h-0 overflow-hidden flex gap-4 px-4 sm:px-6 xl:px-10 py-6",children:[e.jsxs("div",{className:"w-80 min-h-0 flex flex-col bg-[#f7f9fc] rounded-3xl border border-[#dde3eb] overflow-hidden",children:[e.jsxs("div",{className:"p-4 border-b border-[#dde3eb] flex-shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-12 h-12 bg-gradient-to-r from-sky-600 to-sky-500 rounded-2xl flex items-center justify-center",children:e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"AI Tutor",className:"w-10 h-10 object-contain drop-shadow-md"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-bold font-display text-[#0a1628]",children:"L.O.L.I."}),e.jsx("p",{className:"text-[10px] text-[#5a6578]",children:"Your AI Math Tutor"})]})]}),e.jsxs("button",{onClick:N,className:"w-full bg-gradient-to-r from-sky-600 to-sky-500 hover:from-sky-700 hover:to-sky-600 text-white px-4 py-3 rounded-xl text-sm font-bold transition-all shadow-md hover:shadow-lg flex items-center justify-center gap-2",children:[e.jsx(D,{size:18}),"New Chat"]}),e.jsxs("div",{className:"relative mt-3",children:[e.jsx(G,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500",size:14}),e.jsx(C,{type:"text",placeholder:"Search conversations...",value:d,onChange:t=>P(t.target.value),className:"w-full pl-9 pr-3 py-2 text-xs rounded-xl border-[#dde3eb] focus:border-sky-600 focus:ring-2 focus:ring-sky-100"})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-3 space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between mb-2 px-2",children:e.jsxs("span",{className:"text-xs font-bold text-[#5a6578]",children:[p.length," Conversations"]})}),e.jsx(k,{children:p.map(t=>e.jsxs(S.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},onClick:()=>i(t.id),className:`group p-3 rounded-2xl cursor-pointer transition-all duration-200 border relative ${r===t.id?"bg-sky-50 border-sky-200 shadow-sm":"bg-[#edf1f7] border-transparent hover:bg-[#dde3eb] hover:border-[#dde3eb]"}`,children:[e.jsxs("div",{className:"flex items-start justify-between mb-1",children:[e.jsx("h3",{className:`text-xs font-bold mb-0.5 pr-6 line-clamp-1 ${r===t.id?"text-sky-700":"text-[#0a1628]"}`,children:t.title}),e.jsx("button",{onClick:s=>B(t.id,s),className:"absolute top-2 right-2 p-1.5 rounded-lg opacity-0 group-hover:opacity-100 hover:bg-red-100 text-slate-500 hover:text-red-600 transition-all",children:e.jsx(Q,{size:12})})]}),e.jsx("p",{className:"text-[10px] text-[#5a6578] mb-2 line-clamp-2",children:t.preview}),e.jsxs("div",{className:"flex items-center justify-between text-[10px]",children:[e.jsx("span",{className:"text-slate-500",children:t.date}),e.jsxs("span",{className:`px-2 py-0.5 rounded-full ${r===t.id?"bg-sky-100 text-sky-600":"bg-[#dde3eb] text-[#5a6578]"}`,children:[t.messageCount," msgs"]})]})]},t.id))}),p.length===0&&e.jsxs("div",{className:"text-center py-8",children:[e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"AI Tutor",className:"w-16 h-16 object-contain mx-auto mb-2 opacity-60 drop-shadow-sm grayscale contrast-50"}),e.jsx("p",{className:"text-sm text-slate-500",children:"No conversations found"}),e.jsx("p",{className:"text-xs text-slate-500/60 mt-1",children:"Start a new chat!"})]})]})]}),e.jsx("div",{className:"flex-1 min-h-0 flex flex-col bg-[#f7f9fc] rounded-3xl border border-[#dde3eb] overflow-hidden",children:r?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"p-4 border-b border-[#dde3eb] flex items-center justify-between flex-shrink-0",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold font-display text-[#0a1628]",children:n?.title}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:n?.date})]}),e.jsx("div",{className:"flex items-center gap-2",children:n?.topics.map((t,s)=>e.jsx("span",{className:"px-3 py-1 bg-sky-50 text-sky-600 text-xs font-bold rounded-lg",children:t},s))})]}),e.jsxs("div",{ref:c,onScroll:R,className:"flex-1 overflow-y-auto overscroll-contain p-6 space-y-4 bg-[#edf1f7] min-h-0",children:[e.jsx(k,{children:h.map(t=>e.jsxs(S.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`flex items-end gap-2 ${t.sender==="user"?"justify-end":"justify-start"}`,children:[t.sender!=="user"&&e.jsx("div",{className:"w-7 h-7 rounded-full bg-gradient-to-r from-sky-600 to-sky-500 flex items-center justify-center flex-shrink-0 mb-1",children:e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"AI",className:"w-5 h-5 object-contain"})}),e.jsxs("div",{className:`max-w-[70%] rounded-2xl px-5 py-3 ${t.sender==="user"?"bg-gradient-to-r from-sky-600 to-sky-500 text-white":"bg-white text-[#0a1628] shadow-md border border-[#dde3eb]"}`,children:[t.sender==="user"?e.jsx("p",{className:"text-sm whitespace-pre-wrap leading-relaxed",children:t.text}):e.jsx(Y,{children:t.text}),e.jsx("p",{className:`text-[10px] mt-1.5 ${t.sender==="user"?"text-sky-200":"text-slate-500"}`,children:t.timestamp})]}),t.sender==="user"&&e.jsx(O,{src:f?.photo,name:f?.name,className:"w-7 h-7 flex-shrink-0 mb-1",fallbackClassName:"text-[10px]"})]},t.id))}),j&&e.jsx("div",{className:"flex justify-start",children:e.jsx("div",{className:"bg-white text-[#0a1628] shadow-md border border-[#dde3eb] rounded-2xl px-5 py-3 max-w-[70%]",children:e.jsxs("div",{className:"flex gap-1",children:[e.jsx("div",{className:"w-2 h-2 bg-sky-400 rounded-full animate-bounce"}),e.jsx("div",{className:"w-2 h-2 bg-sky-400 rounded-full animate-bounce [animation-delay:150ms]"}),e.jsx("div",{className:"w-2 h-2 bg-sky-400 rounded-full animate-bounce [animation-delay:300ms]"})]})})})]}),e.jsx("div",{className:"p-4 border-t border-[#dde3eb] bg-white flex-shrink-0",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx(C,{type:"text",value:o,onChange:t=>b(t.target.value),onKeyPress:t=>t.key==="Enter"&&w(),placeholder:"Ask me anything about math...",className:"flex-1 px-5 py-3 rounded-xl border-[#dde3eb] focus:border-sky-600 focus:ring-2 focus:ring-sky-100 text-sm"}),e.jsx(H,{onClick:w,disabled:!o.trim()||l||y,className:"px-6 bg-gradient-to-r from-sky-600 to-sky-500 hover:from-sky-700 hover:to-sky-600 text-white rounded-xl transition-all disabled:opacity-50 disabled:cursor-not-allowed shadow-md hover:shadow-lg",children:e.jsx(U,{size:18})})]})})]}):e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center p-8 text-center",children:[e.jsx("div",{className:"w-24 h-24 bg-gradient-to-r from-sky-100 to-cyan-100 rounded-3xl flex items-center justify-center mb-6",children:e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"AI Tutor",className:"w-20 h-20 object-contain drop-shadow-lg"})}),e.jsx("h2",{className:"text-2xl font-bold font-display text-[#0a1628] mb-1",children:"Welcome to L.O.L.I."}),e.jsx("p",{className:"text-sky-600 text-sm font-bold tracking-wide uppercase mb-4",children:"Logical Operations & Learning Intelligence"}),e.jsx("p",{className:"text-[#5a6578] mb-6 max-w-md",children:"Your personal AI math tutor is here to help! Start a new conversation or select one from the sidebar."}),e.jsx("button",{onClick:N,className:"px-6 py-3 bg-gradient-to-r from-sky-600 to-sky-500 hover:from-sky-700 hover:to-sky-600 text-white rounded-xl font-bold shadow-lg hover:shadow-xl transition-all",children:"Start Your First Chat"}),e.jsx("div",{className:"mt-8 grid grid-cols-3 gap-4 max-w-2xl",children:["Algebra","Geometry","Calculus"].map(t=>e.jsxs("div",{className:"p-4 bg-[#edf1f7] rounded-xl border border-[#dde3eb]",children:[e.jsx("p",{className:"text-sm font-bold text-[#0a1628]",children:t}),e.jsxs("p",{className:"text-xs text-[#5a6578] mt-1",children:["Get help with ",t.toLowerCase()]})]},t))})]})})]})};export{ce as default}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Du57tmo9.js","assets/vendor-react-B4AQeu28.js","assets/vendor-firebase-auth-BW5XT768.js","assets/vendor-firebase-core-y3En_kpN.js","assets/vendor-firebase-firestore-52DD1vc9.js","assets/vendor-firebase-storage-DNmrKfQ-.js","assets/vendor-firebase-analytics-DZd0u9yk.js","assets/vendor-radix-DnWAlVSW.js","assets/vendor-charts-BHw0fhqZ.js","assets/vendor-markdown-yqZQ_iQm.js","assets/vendor-markdown-CfVKi3_s.css","assets/index-BQ2D57Uc.css"])))=>i.map(i=>d[i]); +import{ak as F,u as $,_ as z,h as k,m as S,U as O}from"./index-Du57tmo9.js";import{r as a,j as e}from"./vendor-react-B4AQeu28.js";import{B as H}from"./button-C6pFOjcg.js";import{I as C}from"./input-DtBdbulD.js";import Y from"./ChatMarkdown-Dqp-2Avv.js";import{P as D}from"./plus-gReuWg-C.js";import{S as G}from"./search-Dz1wkXyZ.js";import{T as Q}from"./trash-2-uIChez5o.js";import{S as U}from"./send-DWW_bMCz.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";const ce=()=>{const{sessions:I,activeSessionId:r,isLoading:l,loadingSessionId:A,setActiveSessionId:i,createNewSession:u,sendMessage:L,deleteSession:_,getActiveSession:T}=F(),{userProfile:f}=$(),[d,P]=a.useState(""),[o,b]=a.useState(""),[y,g]=a.useState(!1),c=a.useRef(null),x=a.useRef(!0),m=a.useRef(!1),n=T(),h=n?.messages||[],M=h.some(t=>t.sender==="ai"&&t.id.startsWith("stream-")),j=l&&r===A&&!M,v=(t="auto")=>{const s=c.current;s&&s.scrollTo({top:s.scrollHeight,behavior:t})},E=()=>{const t=c.current;return t?t.scrollHeight-t.scrollTop-t.clientHeight<=120:!0},R=()=>{x.current=E()};a.useEffect(()=>{z(async()=>{const{warmupBackend:t}=await import("./index-Du57tmo9.js").then(s=>s.ay);return{warmupBackend:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])).then(({warmupBackend:t})=>{t()}).catch(t=>{console.warn("AI chat warmup skipped:",t)})},[]),a.useEffect(()=>{if(!x.current)return;const t=window.requestAnimationFrame(()=>v("auto"));return()=>window.cancelAnimationFrame(t)},[h,j]),a.useEffect(()=>{x.current=!0,v("auto")},[r]);const w=async()=>{if(!(!o.trim()||l||y||m.current)){m.current=!0,g(!0);try{let t=r;t||(t=u(),i(t));const s=o.trim();b(""),await L(t,s)}finally{m.current=!1,g(!1)}}},N=()=>{const t=u();i(t)},B=(t,s)=>{s.stopPropagation(),_(t)},p=I.filter(t=>t.title.toLowerCase().includes(d.toLowerCase())||t.preview.toLowerCase().includes(d.toLowerCase()));return e.jsxs("div",{className:"h-full min-h-0 overflow-hidden flex gap-4 px-4 sm:px-6 xl:px-10 py-6",children:[e.jsxs("div",{className:"w-80 min-h-0 flex flex-col bg-[#f7f9fc] rounded-3xl border border-[#dde3eb] overflow-hidden",children:[e.jsxs("div",{className:"p-4 border-b border-[#dde3eb] flex-shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-12 h-12 bg-gradient-to-r from-sky-600 to-sky-500 rounded-2xl flex items-center justify-center",children:e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"AI Tutor",className:"w-10 h-10 object-contain drop-shadow-md"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-bold font-display text-[#0a1628]",children:"L.O.L.I."}),e.jsx("p",{className:"text-[10px] text-[#5a6578]",children:"Your AI Math Tutor"})]})]}),e.jsxs("button",{onClick:N,className:"w-full bg-gradient-to-r from-sky-600 to-sky-500 hover:from-sky-700 hover:to-sky-600 text-white px-4 py-3 rounded-xl text-sm font-bold transition-all shadow-md hover:shadow-lg flex items-center justify-center gap-2",children:[e.jsx(D,{size:18}),"New Chat"]}),e.jsxs("div",{className:"relative mt-3",children:[e.jsx(G,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500",size:14}),e.jsx(C,{type:"text",placeholder:"Search conversations...",value:d,onChange:t=>P(t.target.value),className:"w-full pl-9 pr-3 py-2 text-xs rounded-xl border-[#dde3eb] focus:border-sky-600 focus:ring-2 focus:ring-sky-100"})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-3 space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between mb-2 px-2",children:e.jsxs("span",{className:"text-xs font-bold text-[#5a6578]",children:[p.length," Conversations"]})}),e.jsx(k,{children:p.map(t=>e.jsxs(S.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},onClick:()=>i(t.id),className:`group p-3 rounded-2xl cursor-pointer transition-all duration-200 border relative ${r===t.id?"bg-sky-50 border-sky-200 shadow-sm":"bg-[#edf1f7] border-transparent hover:bg-[#dde3eb] hover:border-[#dde3eb]"}`,children:[e.jsxs("div",{className:"flex items-start justify-between mb-1",children:[e.jsx("h3",{className:`text-xs font-bold mb-0.5 pr-6 line-clamp-1 ${r===t.id?"text-sky-700":"text-[#0a1628]"}`,children:t.title}),e.jsx("button",{onClick:s=>B(t.id,s),className:"absolute top-2 right-2 p-1.5 rounded-lg opacity-0 group-hover:opacity-100 hover:bg-red-100 text-slate-500 hover:text-red-600 transition-all",children:e.jsx(Q,{size:12})})]}),e.jsx("p",{className:"text-[10px] text-[#5a6578] mb-2 line-clamp-2",children:t.preview}),e.jsxs("div",{className:"flex items-center justify-between text-[10px]",children:[e.jsx("span",{className:"text-slate-500",children:t.date}),e.jsxs("span",{className:`px-2 py-0.5 rounded-full ${r===t.id?"bg-sky-100 text-sky-600":"bg-[#dde3eb] text-[#5a6578]"}`,children:[t.messageCount," msgs"]})]})]},t.id))}),p.length===0&&e.jsxs("div",{className:"text-center py-8",children:[e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"AI Tutor",className:"w-16 h-16 object-contain mx-auto mb-2 opacity-60 drop-shadow-sm grayscale contrast-50"}),e.jsx("p",{className:"text-sm text-slate-500",children:"No conversations found"}),e.jsx("p",{className:"text-xs text-slate-500/60 mt-1",children:"Start a new chat!"})]})]})]}),e.jsx("div",{className:"flex-1 min-h-0 flex flex-col bg-[#f7f9fc] rounded-3xl border border-[#dde3eb] overflow-hidden",children:r?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"p-4 border-b border-[#dde3eb] flex items-center justify-between flex-shrink-0",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"font-bold font-display text-[#0a1628]",children:n?.title}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:n?.date})]}),e.jsx("div",{className:"flex items-center gap-2",children:n?.topics.map((t,s)=>e.jsx("span",{className:"px-3 py-1 bg-sky-50 text-sky-600 text-xs font-bold rounded-lg",children:t},s))})]}),e.jsxs("div",{ref:c,onScroll:R,className:"flex-1 overflow-y-auto overscroll-contain p-6 space-y-4 bg-[#edf1f7] min-h-0",children:[e.jsx(k,{children:h.map(t=>e.jsxs(S.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`flex items-end gap-2 ${t.sender==="user"?"justify-end":"justify-start"}`,children:[t.sender!=="user"&&e.jsx("div",{className:"w-7 h-7 rounded-full bg-gradient-to-r from-sky-600 to-sky-500 flex items-center justify-center flex-shrink-0 mb-1",children:e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"AI",className:"w-5 h-5 object-contain"})}),e.jsxs("div",{className:`max-w-[70%] rounded-2xl px-5 py-3 ${t.sender==="user"?"bg-gradient-to-r from-sky-600 to-sky-500 text-white":"bg-white text-[#0a1628] shadow-md border border-[#dde3eb]"}`,children:[t.sender==="user"?e.jsx("p",{className:"text-sm whitespace-pre-wrap leading-relaxed",children:t.text}):e.jsx(Y,{children:t.text}),e.jsx("p",{className:`text-[10px] mt-1.5 ${t.sender==="user"?"text-sky-200":"text-slate-500"}`,children:t.timestamp})]}),t.sender==="user"&&e.jsx(O,{src:f?.photo,name:f?.name,className:"w-7 h-7 flex-shrink-0 mb-1",fallbackClassName:"text-[10px]"})]},t.id))}),j&&e.jsx("div",{className:"flex justify-start",children:e.jsx("div",{className:"bg-white text-[#0a1628] shadow-md border border-[#dde3eb] rounded-2xl px-5 py-3 max-w-[70%]",children:e.jsxs("div",{className:"flex gap-1",children:[e.jsx("div",{className:"w-2 h-2 bg-sky-400 rounded-full animate-bounce"}),e.jsx("div",{className:"w-2 h-2 bg-sky-400 rounded-full animate-bounce [animation-delay:150ms]"}),e.jsx("div",{className:"w-2 h-2 bg-sky-400 rounded-full animate-bounce [animation-delay:300ms]"})]})})})]}),e.jsx("div",{className:"p-4 border-t border-[#dde3eb] bg-white flex-shrink-0",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx(C,{type:"text",value:o,onChange:t=>b(t.target.value),onKeyPress:t=>t.key==="Enter"&&w(),placeholder:"Ask me anything about math...",className:"flex-1 px-5 py-3 rounded-xl border-[#dde3eb] focus:border-sky-600 focus:ring-2 focus:ring-sky-100 text-sm"}),e.jsx(H,{onClick:w,disabled:!o.trim()||l||y,className:"px-6 bg-gradient-to-r from-sky-600 to-sky-500 hover:from-sky-700 hover:to-sky-600 text-white rounded-xl transition-all disabled:opacity-50 disabled:cursor-not-allowed shadow-md hover:shadow-lg",children:e.jsx(U,{size:18})})]})})]}):e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center p-8 text-center",children:[e.jsx("div",{className:"w-24 h-24 bg-gradient-to-r from-sky-100 to-cyan-100 rounded-3xl flex items-center justify-center mb-6",children:e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"AI Tutor",className:"w-20 h-20 object-contain drop-shadow-lg"})}),e.jsx("h2",{className:"text-2xl font-bold font-display text-[#0a1628] mb-1",children:"Welcome to L.O.L.I."}),e.jsx("p",{className:"text-sky-600 text-sm font-bold tracking-wide uppercase mb-4",children:"Logical Operations & Learning Intelligence"}),e.jsx("p",{className:"text-[#5a6578] mb-6 max-w-md",children:"Your personal AI math tutor is here to help! Start a new conversation or select one from the sidebar."}),e.jsx("button",{onClick:N,className:"px-6 py-3 bg-gradient-to-r from-sky-600 to-sky-500 hover:from-sky-700 hover:to-sky-600 text-white rounded-xl font-bold shadow-lg hover:shadow-xl transition-all",children:"Start Your First Chat"}),e.jsx("div",{className:"mt-8 grid grid-cols-3 gap-4 max-w-2xl",children:["Algebra","Geometry","Calculus"].map(t=>e.jsxs("div",{className:"p-4 bg-[#edf1f7] rounded-xl border border-[#dde3eb]",children:[e.jsx("p",{className:"text-sm font-bold text-[#0a1628]",children:t}),e.jsxs("p",{className:"text-xs text-[#5a6578] mt-1",children:["Get help with ",t.toLowerCase()]})]},t))})]})})]})};export{ce as default}; diff --git a/assets/AdminDashboard-C42SbQoX.js b/assets/AdminDashboard-B3V_f98_.js similarity index 98% rename from assets/AdminDashboard-C42SbQoX.js rename to assets/AdminDashboard-B3V_f98_.js index 3e57bf674b6f1e7f9d71c0376fba4e9082a08da9..7fd59b08149fd6f5dae82c516174a912195fafbe 100644 --- a/assets/AdminDashboard-C42SbQoX.js +++ b/assets/AdminDashboard-B3V_f98_.js @@ -1,4 +1,4 @@ -import{r,d as Rt,j as e}from"./vendor-react-B4AQeu28.js";import Ts from"./Sidebar-D_VIy77A.js";import He from"./ConfirmModal-Bs6qCyoa.js";import{c as ae,e as Ne,t as T,T as de,d as se,p as It,q as Lt,i as Js,m as U,j as Ge,u as Ke,Z as hs,D as Ut,r as $t,v as Ft,f as Bt,w as Ms,x as Rs,y as Is,F as Ks,k as Ot,M as qt,U as Gt}from"./index-fWY85Kyg.js";import{B as L}from"./button-BSRmUN27.js";import{S as Q,a as J,b as K,c as Y,d as C}from"./select-BwzsWVap.js";import{I as O}from"./input-B3NSXxdz.js";import{S as _e}from"./subjects-BlAP40QQ.js";import{U as os}from"./upload-DodiG981.js";import{F as us,I as Ee,D as Ys,f as Zs,g as et,h as st,i as tt,l as ze,j as _t,k as Ht,T as Wt,a as Vt,b as Ls,c as Ce,d as Xt,e as Ae}from"./dialog-TlKhS4yO.js";import{C as Us,L as Qt}from"./lightbulb-D3kdQgij.js";import{L as Z}from"./loader-circle-id_hZlNw.js";import{C as We}from"./chart-column-V8fKqOo0.js";import{R as Te}from"./refresh-cw-Dr342wB2.js";import{C as Ve}from"./circle-check-big-Qn5jJKfH.js";import{h as le,e as te,q as gs,o as at,l as ps,w as $s,m as Jt,a as Kt}from"./vendor-firebase-firestore-52DD1vc9.js";import{C as fs}from"./calendar-ClpJmmLI.js";import{C as ye,a as Yt}from"./circle-alert-KkqOOEPJ.js";import{S as rt}from"./search-DoNO8thr.js";import{E as Xe,a as Fs}from"./eye-DQlJQwuY.js";import{S as Me}from"./shield-vTl0KLH8.js";import{S as ne}from"./switch-CiNZ7HsE.js";import{S as Zt,M as ea}from"./LogoutActionButton-w1PkauXp.js";import{B as he}from"./book-open-D5mR6gz9.js";import{B as sa}from"./bell-BwBudSvY.js";import{S as lt}from"./save-_nGsRc5b.js";import{C as ta,b as aa}from"./vendor-radix-DnWAlVSW.js";import{C as ra}from"./check-Cs-4n4yC.js";import{P as la}from"./plus-CRabOymo.js";import{M as ia}from"./mail-BS9lcBqF.js";import{D as it}from"./download-Dl_jNVXs.js";import{T as Bs}from"./trash-2-PgvGautk.js";import{U as Qe}from"./users-CX_H_2cY.js";import{G as js}from"./graduation-cap-B4Q4YTk8.js";import{T as nt}from"./target-B6MOj4Ln.js";import{C as dt}from"./clock-BJCraYVD.js";import{A as Je}from"./award-DBHp-ybd.js";import{B as na}from"./brain-COga8OrM.js";import{F as da}from"./funnel-DjeGbYf2.js";import{S as X}from"./skeleton-ISwUzksB.js";import{T as ct}from"./trending-up-Do7UgIZi.js";import{u as ca,t as oa,a as ma}from"./useSubjectAvailability-Wk6vHhYW.js";import{L as xa}from"./lock-6q-juSdu.js";import{u as ha}from"./useQuery-Dajy9lf6.js";import{a as ua}from"./chevron-up-Bup_RJHP.js";import{M as ga}from"./minus-Db4XvxwC.js";import"./tooltip-DQuc9Ksp.js";import"./x-BLLfAvOF.js";import"./chevron-right-mxUv3EB7.js";import"./chevron-left-KucdseP8.js";import"./swords-Btzyg4ct.js";import"./trophy-fJOOsc_0.js";import"./shirt-hGG3zHVe.js";import"./log-out-aQvvB_kG.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";/** +import{r,d as Rt,j as e}from"./vendor-react-B4AQeu28.js";import Ts from"./Sidebar-SiyazvIi.js";import He from"./ConfirmModal-CGEO_l_6.js";import{c as ae,e as Ne,t as T,T as de,d as se,p as It,q as Lt,i as Js,m as U,j as Ge,u as Ke,Z as hs,D as Ut,r as $t,v as Ft,f as Bt,w as Ms,x as Rs,y as Is,F as Ks,k as Ot,M as qt,U as Gt}from"./index-Du57tmo9.js";import{B as L}from"./button-C6pFOjcg.js";import{S as Q,a as J,b as K,c as Y,d as C}from"./select-BO-JyJ96.js";import{I as O}from"./input-DtBdbulD.js";import{S as _e}from"./subjects-DLaBFkP9.js";import{U as os}from"./upload-CONq3UoZ.js";import{F as us,I as Ee,D as Ys,f as Zs,g as et,h as st,i as tt,l as ze,j as _t,k as Ht,T as Wt,a as Vt,b as Ls,c as Ce,d as Xt,e as Ae}from"./dialog-fRGvTlwY.js";import{C as Us,L as Qt}from"./lightbulb-2ipA_Yda.js";import{L as Z}from"./loader-circle-Bluo8e0c.js";import{C as We}from"./chart-column-Cqncpeum.js";import{R as Te}from"./refresh-cw-BDWpfygR.js";import{C as Ve}from"./circle-check-big-DC9utj0Y.js";import{h as le,e as te,q as gs,o as at,l as ps,w as $s,m as Jt,a as Kt}from"./vendor-firebase-firestore-52DD1vc9.js";import{C as fs}from"./calendar-DguKdDEr.js";import{C as ye,a as Yt}from"./circle-alert-mPiSlvKL.js";import{S as rt}from"./search-Dz1wkXyZ.js";import{E as Xe,a as Fs}from"./eye-Duf559JU.js";import{S as Me}from"./shield-QK9XTLqm.js";import{S as ne}from"./switch-YVS1owKs.js";import{S as Zt,M as ea}from"./LogoutActionButton-XXsvBOAH.js";import{B as he}from"./book-open-cmOvedFO.js";import{B as sa}from"./bell-CVB0-Rn1.js";import{S as lt}from"./save-BYv1sqTn.js";import{C as ta,b as aa}from"./vendor-radix-DnWAlVSW.js";import{C as ra}from"./check-BAMSfVKd.js";import{P as la}from"./plus-gReuWg-C.js";import{M as ia}from"./mail-B4r1HZjf.js";import{D as it}from"./download-VEXmhhD6.js";import{T as Bs}from"./trash-2-uIChez5o.js";import{U as Qe}from"./users--M0GUX5u.js";import{G as js}from"./graduation-cap-D6QMIGIe.js";import{T as nt}from"./target-B_JwHjFq.js";import{C as dt}from"./clock-BtWjBj1h.js";import{A as Je}from"./award-ZQxHm68j.js";import{B as na}from"./brain-CEG2uNCc.js";import{F as da}from"./funnel-N-2rOOix.js";import{S as X}from"./skeleton-08qYl7s6.js";import{T as ct}from"./trending-up-BgWHLAjl.js";import{u as ca,t as oa,a as ma}from"./useSubjectAvailability-BhYsHQ11.js";import{L as xa}from"./lock-CtsU7Hj2.js";import{u as ha}from"./useQuery-CDdIlAcl.js";import{a as ua}from"./chevron-up-Dmffgx6p.js";import{M as ga}from"./minus-DyrqHtmD.js";import"./tooltip-C0JcTMbS.js";import"./x-Cwkkamrh.js";import"./chevron-right-CFOFOVBg.js";import"./chevron-left-mWdIDmIc.js";import"./swords-Bu0_wc8h.js";import"./trophy-8udS7pQx.js";import"./shirt-wJF8-Ry8.js";import"./log-out-SC88Jnul.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/AssessmentPage-Bf02LBPz.js b/assets/AssessmentPage-B-axolaD.js similarity index 94% rename from assets/AssessmentPage-Bf02LBPz.js rename to assets/AssessmentPage-B-axolaD.js index 203ffe24cbc24d8da5fcfb2588f6efdb58b0b9b6..77f1e93c69852644c16dedcf6a5102516fcbaf74 100644 --- a/assets/AssessmentPage-Bf02LBPz.js +++ b/assets/AssessmentPage-B-axolaD.js @@ -1 +1 @@ -import{r as n,j as e}from"./vendor-react-B4AQeu28.js";import{B as T}from"./button-BSRmUN27.js";import{s as $}from"./diagnosticService-BbwguGxN.js";import{C as B}from"./clock-BJCraYVD.js";import{m}from"./index-fWY85Kyg.js";import{C as M}from"./chevron-right-mxUv3EB7.js";import{L as Q}from"./loader-circle-id_hZlNw.js";import{C as q}from"./circle-check-big-Qn5jJKfH.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-markdown-yqZQ_iQm.js";const se=({testId:N,questions:u,userName:v,onComplete:y,onCancel:w})=>{const[d,p]=n.useState("testing"),[i,S]=n.useState(0),[a,f]=n.useState(null),[_,C]=n.useState(()=>{try{const t=sessionStorage.getItem("mathpulse_diagnostic_responses");return t?JSON.parse(t):[]}catch{return[]}}),[k,I]=n.useState(0),[h,b]=n.useState(null),l=n.useRef(null),x=n.useRef(Date.now()),c=u.length,o=u[i],g=Math.round((i+(a?1:0))/c*100),j=n.useCallback(()=>{x.current=Date.now(),l.current&&clearInterval(l.current),l.current=setInterval(()=>{I(Math.floor((Date.now()-x.current)/1e3))},200)},[]);n.useEffect(()=>(j(),()=>{l.current&&clearInterval(l.current)}),[i,j]);const R=t=>{a||f(t)},z=()=>{if(!a)return;l.current&&clearInterval(l.current);const t=Math.floor((Date.now()-x.current)/1e3),s=[..._,{question_id:o.question_id,student_answer:a,time_spent_seconds:t}];C(s),f(null),ir+1):A(s)},A=async t=>{p("submitting"),b(null);try{sessionStorage.setItem("mathpulse_diagnostic_responses",JSON.stringify(t))}catch{}try{const s=await $(N,t);sessionStorage.removeItem("mathpulse_diagnostic"),sessionStorage.removeItem("mathpulse_diagnostic_responses"),p("results"),setTimeout(()=>{y({overallRisk:s.overall_risk,overallScorePercent:s.overall_score_percent,intervention:s.recommended_intervention,xpEarned:s.xp_earned,badgeUnlocked:s.badge_unlocked})},3e3)}catch(s){const r=s instanceof Error?s.message:"Submission failed. Your answers are saved locally.";b(r)}},D=t=>{const s=Math.floor(t/60),r=t%60;return`${s}:${r.toString().padStart(2,"0")}`},E=["A","B","C","D"];return e.jsxs("div",{className:"fixed inset-0 z-50 bg-white flex flex-col",children:[d==="testing"&&e.jsxs("div",{className:"flex flex-col h-full max-w-2xl mx-auto w-full px-4 sm:px-6",children:[e.jsxs("div",{className:"flex items-center justify-between py-4 border-b border-[#dde3eb]",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-sm font-bold text-[#5a6578]",children:["Question ",i+1," of ",c]}),e.jsxs("span",{className:"text-xs text-slate-400 flex items-center gap-1",children:[e.jsx(B,{size:12}),D(k)]})]}),e.jsx("button",{onClick:w,className:"text-xs text-slate-400 hover:text-slate-600 font-medium transition-colors",children:"Cancel"})]}),e.jsx("div",{className:"h-1.5 bg-[#edf1f7] rounded-full overflow-hidden mt-3",children:e.jsx(m.div,{className:"h-full bg-purple-600 rounded-full origin-left",initial:{scaleX:0},animate:{scaleX:g/100},transition:{duration:.3,ease:"easeOut"},style:{willChange:"transform"}})}),e.jsxs("p",{className:"text-[11px] text-slate-400 text-right mt-1",children:[g,"%"]}),e.jsxs("div",{className:"flex-1 flex flex-col justify-center py-6 space-y-6",children:[e.jsxs("div",{className:"bg-[#edf1f7] p-5 rounded-2xl border border-[#dde3eb]",children:[e.jsxs("p",{className:"text-xs font-bold uppercase tracking-wide text-slate-500 mb-2",children:[o.domain," • ",o.difficulty]}),e.jsx("h3",{className:"text-lg font-bold text-[#0a1628] leading-relaxed",children:o.question_text})]}),e.jsx("div",{className:"grid grid-cols-1 gap-2.5",children:E.map(t=>{const s=o.options[t];if(!s)return null;const r=a===t;return e.jsxs("button",{onClick:()=>R(t),disabled:!!a,className:`w-full text-left p-3.5 rounded-xl border-2 transition-all font-medium text-sm flex items-center gap-3 ${r?"border-purple-600 bg-purple-50 text-[#0a1628]":"border-[#dde3eb] hover:border-purple-400 hover:bg-purple-50/50 text-[#0a1628]"} ${a&&!r?"opacity-50":""}`,children:[e.jsx("span",{className:`w-8 h-8 rounded-lg flex items-center justify-center text-xs font-bold flex-shrink-0 ${r?"bg-purple-600 text-white":"bg-white border border-[#dde3eb] text-[#5a6578]"}`,children:t}),e.jsx("span",{className:"flex-1",children:s}),r&&e.jsx(M,{size:18,className:"text-purple-600 flex-shrink-0"})]},t)})})]}),e.jsx("div",{className:"py-4 border-t border-[#dde3eb]",children:e.jsx(T,{onClick:z,disabled:!a,className:"w-full bg-purple-600 hover:bg-purple-700 text-white py-3 rounded-xl font-bold text-sm disabled:opacity-40",children:i{const[d,p]=n.useState("testing"),[i,S]=n.useState(0),[a,f]=n.useState(null),[_,C]=n.useState(()=>{try{const t=sessionStorage.getItem("mathpulse_diagnostic_responses");return t?JSON.parse(t):[]}catch{return[]}}),[k,I]=n.useState(0),[h,b]=n.useState(null),l=n.useRef(null),x=n.useRef(Date.now()),c=u.length,o=u[i],g=Math.round((i+(a?1:0))/c*100),j=n.useCallback(()=>{x.current=Date.now(),l.current&&clearInterval(l.current),l.current=setInterval(()=>{I(Math.floor((Date.now()-x.current)/1e3))},200)},[]);n.useEffect(()=>(j(),()=>{l.current&&clearInterval(l.current)}),[i,j]);const R=t=>{a||f(t)},z=()=>{if(!a)return;l.current&&clearInterval(l.current);const t=Math.floor((Date.now()-x.current)/1e3),s=[..._,{question_id:o.question_id,student_answer:a,time_spent_seconds:t}];C(s),f(null),ir+1):A(s)},A=async t=>{p("submitting"),b(null);try{sessionStorage.setItem("mathpulse_diagnostic_responses",JSON.stringify(t))}catch{}try{const s=await $(N,t);sessionStorage.removeItem("mathpulse_diagnostic"),sessionStorage.removeItem("mathpulse_diagnostic_responses"),p("results"),setTimeout(()=>{y({overallRisk:s.overall_risk,overallScorePercent:s.overall_score_percent,intervention:s.recommended_intervention,xpEarned:s.xp_earned,badgeUnlocked:s.badge_unlocked})},3e3)}catch(s){const r=s instanceof Error?s.message:"Submission failed. Your answers are saved locally.";b(r)}},D=t=>{const s=Math.floor(t/60),r=t%60;return`${s}:${r.toString().padStart(2,"0")}`},E=["A","B","C","D"];return e.jsxs("div",{className:"fixed inset-0 z-50 bg-white flex flex-col",children:[d==="testing"&&e.jsxs("div",{className:"flex flex-col h-full max-w-2xl mx-auto w-full px-4 sm:px-6",children:[e.jsxs("div",{className:"flex items-center justify-between py-4 border-b border-[#dde3eb]",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-sm font-bold text-[#5a6578]",children:["Question ",i+1," of ",c]}),e.jsxs("span",{className:"text-xs text-slate-400 flex items-center gap-1",children:[e.jsx(B,{size:12}),D(k)]})]}),e.jsx("button",{onClick:w,className:"text-xs text-slate-400 hover:text-slate-600 font-medium transition-colors",children:"Cancel"})]}),e.jsx("div",{className:"h-1.5 bg-[#edf1f7] rounded-full overflow-hidden mt-3",children:e.jsx(m.div,{className:"h-full bg-purple-600 rounded-full origin-left",initial:{scaleX:0},animate:{scaleX:g/100},transition:{duration:.3,ease:"easeOut"},style:{willChange:"transform"}})}),e.jsxs("p",{className:"text-[11px] text-slate-400 text-right mt-1",children:[g,"%"]}),e.jsxs("div",{className:"flex-1 flex flex-col justify-center py-6 space-y-6",children:[e.jsxs("div",{className:"bg-[#edf1f7] p-5 rounded-2xl border border-[#dde3eb]",children:[e.jsxs("p",{className:"text-xs font-bold uppercase tracking-wide text-slate-500 mb-2",children:[o.domain," • ",o.difficulty]}),e.jsx("h3",{className:"text-lg font-bold text-[#0a1628] leading-relaxed",children:o.question_text})]}),e.jsx("div",{className:"grid grid-cols-1 gap-2.5",children:E.map(t=>{const s=o.options[t];if(!s)return null;const r=a===t;return e.jsxs("button",{onClick:()=>R(t),disabled:!!a,className:`w-full text-left p-3.5 rounded-xl border-2 transition-all font-medium text-sm flex items-center gap-3 ${r?"border-purple-600 bg-purple-50 text-[#0a1628]":"border-[#dde3eb] hover:border-purple-400 hover:bg-purple-50/50 text-[#0a1628]"} ${a&&!r?"opacity-50":""}`,children:[e.jsx("span",{className:`w-8 h-8 rounded-lg flex items-center justify-center text-xs font-bold flex-shrink-0 ${r?"bg-purple-600 text-white":"bg-white border border-[#dde3eb] text-[#5a6578]"}`,children:t}),e.jsx("span",{className:"flex-1",children:s}),r&&e.jsx(M,{size:18,className:"text-purple-600 flex-shrink-0"})]},t)})})]}),e.jsx("div",{className:"py-4 border-t border-[#dde3eb]",children:e.jsx(T,{onClick:z,disabled:!a,className:"w-full bg-purple-600 hover:bg-purple-700 text-white py-3 rounded-xl font-bold text-sm disabled:opacity-40",children:i{const{userProfile:i,refreshProfile:U}=se(),$=!1,[m,k]=l.useState({top:i?.avatarLayers?.top??q,bottom:i?.avatarLayers?.bottom||"",shoes:i?.avatarLayers?.shoes||"",accessory:i?.avatarLayers?.accessory||""}),[x,p]=l.useState(!1),[f,A]=l.useState([]),[D,E]=l.useState(0),[T,_]=l.useState(null),[d,h]=l.useState(null),[I,P]=l.useState(y),[B,H]=l.useState("top"),C=l.useRef(i);C.current=i;const b=l.useRef(!1),v=l.useRef(null);l.useEffect(()=>{if(typeof window>"u")return;const t=Date.now();try{const o=sessionStorage.getItem(Y);if(o){const s=JSON.parse(o);if(Array.isArray(s.items)&&typeof s.expiresAt=="number"&&s.expiresAt>t){P(s.items);return}}}catch{}P(y);try{sessionStorage.setItem(Y,JSON.stringify({expiresAt:t+ve,items:y}))}catch{}},[]),l.useEffect(()=>{if(i&&i.role==="student"){const t=i;A(t.ownedAvatarItems||[]),E(t.currentXP||0)}},[i]),l.useEffect(()=>{k({top:i?.avatarLayers?.top??q,bottom:i?.avatarLayers?.bottom||"",shoes:i?.avatarLayers?.shoes||"",accessory:i?.avatarLayers?.accessory||""})},[]),l.useEffect(()=>{if(!d){const t=setInterval(()=>{Math.random()>.6&&h(X[Math.floor(Math.random()*X.length)])},4e3);return()=>clearInterval(t)}},[d]),l.useEffect(()=>{if(d){const t=setTimeout(()=>{h(null)},3500);return()=>clearTimeout(t)}},[d]);const G=(t,o)=>{const s=I.find(n=>n.id===o);if(s&&(s.price&&s.price>0||s.isReward)&&!f.includes(o)){c.error("This item is locked. Earn or purchase it first!");return}const a={...m,[t]:m[t]===o?"":o};k(a),h(V[Math.floor(Math.random()*V.length)]),g(a,{showSuccessToast:!1,showSavingState:!1})},K=async(t,o,s)=>{if(t.stopPropagation(),!i?.uid){c.error("You must be logged in to purchase items");return}if(f.includes(o)){c.info("You already own this item");return}_(o);try{const a=await re(i.uid,o,s);a.success?(c.success(a.message||"Item purchased!"),A(n=>[...n,o]),a.currentXP!==void 0&&E(a.currentXP),await U()):c.error(a.message||"Failed to purchase item")}catch(a){console.error("Purchase error:",a),c.error("Error purchasing item")}finally{_(null)}},z=t=>({top:typeof t.top=="string"?t.top:"",bottom:typeof t.bottom=="string"?t.bottom:"",shoes:typeof t.shoes=="string"?t.shoes:"",accessory:typeof t.accessory=="string"?t.accessory:""}),Z=(t,o,s)=>{let a;const n=new Promise((r,u)=>{a=setTimeout(()=>{u(new Error(`${s} timed out after ${Math.round(o/1e3)}s`))},o)});return Promise.race([t,n]).finally(()=>{a!==void 0&&clearTimeout(a)})},g=async(t,o={})=>{const s=C.current;if(!s?.uid)return;const{showSuccessToast:a=!0,showSavingState:n=!0}=o;if(b.current){v.current={layers:z(t),options:{showSuccessToast:a,showSavingState:n}},n&&p(!0);return}b.current=!0,n&&p(!0);try{const r=z(t);await Z(oe(s.uid,{avatarLayers:r}),ge,"Avatar save"),S&&S(r),a&&c.success("Avatar saved successfully")}catch(r){if(console.error(r),a){const u=r instanceof Error&&r.message.includes("timed out");c.error(u?"Avatar save timed out. Please try again.":"Failed to save avatar")}}finally{const r=v.current;if(v.current=null,b.current=!1,r){g(r.layers,r.options);return}(n||x)&&p(!1)}},J=async()=>{await g(m,{showSuccessToast:!0,showSavingState:!0})},M=[{id:"top",label:"Tops",icon:e.jsx(me,{size:16})},{id:"bottom",label:"Bottoms",icon:e.jsx(fe,{size:16,className:"rotate-90"})},{id:"shoes",label:"Shoes",icon:e.jsx(xe,{size:16})},{id:"accessory",label:"Accessories",icon:e.jsx(R,{size:16})}];return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:be}),e.jsx("div",{className:"h-full w-full flex items-start xl:items-center justify-center p-4 sm:p-6 lg:p-8 overflow-y-auto xl:overflow-hidden",children:e.jsxs("div",{className:"relative w-full max-w-[1000px] min-h-[500px] xl:h-[80vh] xl:max-h-[700px] rounded-[2rem] p-6 lg:p-8 bg-gradient-to-br from-white via-sky-50/30 to-white border border-slate-200/80 shadow-[0_8px_30px_rgb(0,0,0,0.04)] flex flex-col xl:flex-row gap-8 xl:gap-12 overflow-visible xl:overflow-hidden",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden rounded-[2rem] pointer-events-none",children:[e.jsx("div",{className:"absolute top-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-sky-400/30 to-transparent"}),e.jsx("div",{className:"absolute -top-40 -right-40 w-96 h-96 bg-blue-100/40 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute -bottom-40 -left-40 w-96 h-96 bg-purple-100/30 rounded-full blur-3xl"})]}),e.jsxs("div",{className:"flex flex-col xl:h-full min-h-0 relative z-10 w-full xl:w-[50%] mx-auto xl:mx-0 flex-1",children:[e.jsxs("div",{className:"mb-6 flex flex-col gap-2 shrink-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between xl:justify-start gap-4",children:[e.jsxs("h1",{className:"text-3xl md:text-4xl font-display font-black text-[#0a1628] tracking-tight flex items-center gap-2.5",children:[e.jsx("span",{className:"whitespace-nowrap",children:"Avatar Studio"})," ",e.jsx(L,{className:"text-blue-500 fill-blue-500",size:28})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[$,e.jsxs("div",{className:"bg-gradient-to-br from-amber-400 to-orange-500 rounded-xl px-3 py-1.5 shadow-md flex items-center gap-2 h-fit",children:[e.jsx(j,{className:"text-white shrink-0",size:16}),e.jsxs(ie,{children:[e.jsx(le,{asChild:!0,children:e.jsxs("button",{onClick:F,className:"cursor-pointer hover:opacity-90 transition-opacity active:scale-95 text-left",children:[e.jsx("p",{className:"text-white text-[9px] font-bold uppercase tracking-wider leading-none mb-0.5",children:"XP Balance"}),e.jsx("p",{className:"text-white text-base font-black leading-none",children:D})]})}),e.jsx(ne,{side:"bottom",className:"bg-slate-900 text-white border border-slate-700",children:"Review more lessons to earn more XP!"})]})]})]})]}),e.jsx("p",{className:"text-slate-500 font-medium text-sm md:text-base",children:"Design your perfect learning companion."})]}),e.jsxs(W,{value:B,onValueChange:t=>H(t),className:"flex flex-col flex-1 min-h-0",children:[e.jsx(Q,{className:"flex flex-nowrap shrink-0 justify-start space-x-1 sm:space-x-2 mb-4 bg-white shadow-sm p-1 rounded-full border border-slate-100 w-fit overflow-x-auto max-w-full scrollbar-hide",children:M.map(t=>e.jsxs(ee,{value:t.id,className:"flex items-center gap-1.5 px-4 py-2 rounded-full font-bold text-[13px] text-slate-500 hover:bg-slate-50 data-[state=active]:bg-gradient-to-r data-[state=active]:from-blue-600 data-[state=active]:to-sky-500 data-[state=active]:text-white transition-all shadow-sm outline-none whitespace-nowrap",children:[t.icon,t.label]},t.id))}),e.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden min-h-0 pb-6 scrollbar-hide px-2 -mx-2",children:M.map(t=>{const o=I.filter(s=>s.category===t.id);return e.jsx(te,{value:t.id,className:"outline-none pt-2 h-full",children:o.length===0?e.jsxs("div",{className:"w-full h-full min-h-[250px] flex flex-col items-center justify-center border-2 border-dashed border-slate-200 rounded-[2rem] bg-slate-50/50 p-8 text-center",children:[e.jsx(R,{size:48,className:"text-slate-300 mb-4 opacity-50"}),e.jsx("h3",{className:"font-bold text-xl text-slate-500 mb-2",children:"Accessories coming soon"}),e.jsx("p",{className:"text-slate-400 text-sm max-w-xs",children:"We're crafting some awesome gear for your avatar! Check back later."})]}):e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 lg:gap-6",children:o.map(s=>{const a=m[t.id]===s.id,n=f.includes(s.id),r=!!((s.price&&s.price>0||s.isReward)&&!n);return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("button",{onClick:()=>!r&&G(t.id,s.id),disabled:r,className:`relative w-full aspect-square rounded-2xl border-2 transition-all flex flex-col items-center justify-center group ${a&&!r?"bg-white border-blue-500 shadow-md scale-[1.02] z-10":r?"bg-slate-50 border-slate-200 opacity-50 cursor-not-allowed":"bg-white border-slate-100 hover:border-sky-300 hover:shadow-lg hover:scale-[1.02] hover:z-10"}`,children:[a&&!r&&e.jsxs("div",{className:"absolute top-1.5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 bg-gradient-to-r from-blue-500 to-sky-400 text-white text-[9px] font-black rounded-full flex items-center gap-1 z-10 whitespace-nowrap",children:["Equipped ",e.jsx(L,{size:9,className:"fill-white"})]}),r&&e.jsx("div",{className:"absolute inset-0 bg-black/20 z-20 flex items-center justify-center rounded-[1rem]",children:e.jsx(O,{className:"text-white",size:24})}),e.jsx("img",{src:s.thumbnail,alt:s.name,className:`w-3/4 h-3/4 object-contain transition-transform e-filter ${!r&&"group-hover:scale-110"}`,style:{"--filter":r?"grayscale(70%)":"none"}})]}),e.jsx("p",{className:"text-xs font-bold text-slate-700 text-center line-clamp-2",children:s.name}),r&&(s.isReward?e.jsxs("div",{className:"w-full py-1 bg-slate-200 text-slate-500 text-[9px] font-bold flex items-center justify-center gap-1 rounded shadow-sm border border-slate-300",children:[e.jsx(O,{size:11})," Exclusive Reward"]}):e.jsx(w.button,{initial:{opacity:0},animate:{opacity:1},onClick:u=>K(u,s.id,s.price||0),disabled:T===s.id,className:"w-full py-1 bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-600 hover:to-orange-600 text-white text-[9px] font-bold flex items-center justify-center gap-1 rounded shadow-sm transition-all disabled:opacity-70",children:T===s.id?e.jsx(w.div,{animate:{rotate:360},transition:{repeat:1/0,duration:1},children:e.jsx(j,{size:11})}):e.jsxs(e.Fragment,{children:[e.jsx(j,{size:11}),s.price," XP"]})}))]},s.id)})})},t.id)})})]})]}),e.jsxs("div",{className:"flex flex-col gap-4 relative z-10 w-full xl:w-[350px] max-w-[420px] xl:max-w-none shrink-0 xl:self-center mx-auto xl:mx-0",children:[e.jsxs("div",{className:"bg-[#0f1422] rounded-[2rem] overflow-hidden relative shadow-[0_20px_50px_rgba(15,20,34,0.2)] h-[400px] w-full flex items-center justify-center mx-auto border-4 border-slate-800",children:[e.jsx("div",{className:"absolute top-[-10%] left-0 right-0 h-[110%] pointer-events-none mix-blend-screen opacity-70 avatar-gloss"}),e.jsx("div",{className:"absolute bottom-12 left-1/2 -translate-x-1/2 w-[220px] h-[25px] bg-sky-500/20 blur-xl rounded-full"}),e.jsxs("div",{className:"relative w-full h-[80%] z-10 flex justify-center items-center animate-avatar-float",children:[e.jsx(ce,{layers:m,className:"w-full h-full absolute inset-0 z-20"}),e.jsx(ae,{children:d&&e.jsxs(w.div,{initial:{opacity:0,y:-10,scale:.8},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:10,scale:.8},transition:{duration:.3},className:"absolute -top-24 left-1/2 -translate-x-1/2 z-30 bg-white text-slate-800 px-4 py-2 rounded-full shadow-lg border-2 border-sky-300 whitespace-nowrap font-bold text-sm max-w-xs text-center",children:[d,e.jsx("div",{className:"absolute -bottom-2 left-1/2 -translate-x-1/2 w-0 h-0 border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-white"})]})})]})]}),e.jsxs("button",{onClick:J,disabled:x,className:"w-full max-w-[450px] mx-auto h-[54px] bg-blue-600 hover:bg-blue-500 text-white rounded-xl font-bold text-base flex items-center justify-center gap-2 transition-colors shadow-md disabled:opacity-70 disabled:cursor-not-allowed active:scale-[0.98]",children:[x?e.jsx("div",{className:"animate-spin-slow",children:e.jsx(de,{size:24,className:"opacity-50"})}):null,x?"Saving...":"Save Profile Avatar"]})]})]})})]})};export{Oe as default}; +`,q=["Wow!","Cute!","I love it!","Perfect!","So cool!","Awesome!"],V=["Gain more XP to buy me more clothes!","Help me get stylish!","Let's earn some XP to unlock more!","I'd love to try on more outfits!","Keep learning to unlock new looks!"],X="top_blue",Y="mathpulse:avatar-inventory:v2",ve=600*1e3,ge=2e4,Oe=({onSaveProfile:S,onNavigateToModules:F})=>{const{userProfile:i,refreshProfile:U}=se(),$=!1,[m,k]=l.useState({top:i?.avatarLayers?.top??X,bottom:i?.avatarLayers?.bottom||"",shoes:i?.avatarLayers?.shoes||"",accessory:i?.avatarLayers?.accessory||""}),[x,p]=l.useState(!1),[f,A]=l.useState([]),[D,E]=l.useState(0),[T,_]=l.useState(null),[d,h]=l.useState(null),[I,P]=l.useState(y),[B,H]=l.useState("top"),C=l.useRef(i);C.current=i;const b=l.useRef(!1),v=l.useRef(null);l.useEffect(()=>{if(typeof window>"u")return;const t=Date.now();try{const o=sessionStorage.getItem(Y);if(o){const s=JSON.parse(o);if(Array.isArray(s.items)&&typeof s.expiresAt=="number"&&s.expiresAt>t){P(s.items);return}}}catch{}P(y);try{sessionStorage.setItem(Y,JSON.stringify({expiresAt:t+ve,items:y}))}catch{}},[]),l.useEffect(()=>{if(i&&i.role==="student"){const t=i;A(t.ownedAvatarItems||[]),E(t.currentXP||0)}},[i]),l.useEffect(()=>{k({top:i?.avatarLayers?.top??X,bottom:i?.avatarLayers?.bottom||"",shoes:i?.avatarLayers?.shoes||"",accessory:i?.avatarLayers?.accessory||""})},[]),l.useEffect(()=>{if(!d){const t=setInterval(()=>{Math.random()>.6&&h(V[Math.floor(Math.random()*V.length)])},4e3);return()=>clearInterval(t)}},[d]),l.useEffect(()=>{if(d){const t=setTimeout(()=>{h(null)},3500);return()=>clearTimeout(t)}},[d]);const G=(t,o)=>{const s=I.find(n=>n.id===o);if(s&&(s.price&&s.price>0||s.isReward)&&!f.includes(o)){c.error("This item is locked. Earn or purchase it first!");return}const a={...m,[t]:m[t]===o?"":o};k(a),h(q[Math.floor(Math.random()*q.length)]),g(a,{showSuccessToast:!1,showSavingState:!1})},K=async(t,o,s)=>{if(t.stopPropagation(),!i?.uid){c.error("You must be logged in to purchase items");return}if(f.includes(o)){c.info("You already own this item");return}_(o);try{const a=await re(i.uid,o,s);a.success?(c.success(a.message||"Item purchased!"),A(n=>[...n,o]),a.currentXP!==void 0&&E(a.currentXP),await U()):c.error(a.message||"Failed to purchase item")}catch(a){console.error("Purchase error:",a),c.error("Error purchasing item")}finally{_(null)}},z=t=>({top:typeof t.top=="string"?t.top:"",bottom:typeof t.bottom=="string"?t.bottom:"",shoes:typeof t.shoes=="string"?t.shoes:"",accessory:typeof t.accessory=="string"?t.accessory:""}),Z=(t,o,s)=>{let a;const n=new Promise((r,u)=>{a=setTimeout(()=>{u(new Error(`${s} timed out after ${Math.round(o/1e3)}s`))},o)});return Promise.race([t,n]).finally(()=>{a!==void 0&&clearTimeout(a)})},g=async(t,o={})=>{const s=C.current;if(!s?.uid)return;const{showSuccessToast:a=!0,showSavingState:n=!0}=o;if(b.current){v.current={layers:z(t),options:{showSuccessToast:a,showSavingState:n}},n&&p(!0);return}b.current=!0,n&&p(!0);try{const r=z(t);await Z(oe(s.uid,{avatarLayers:r}),ge,"Avatar save"),S&&S(r),a&&c.success("Avatar saved successfully")}catch(r){if(console.error(r),a){const u=r instanceof Error&&r.message.includes("timed out");c.error(u?"Avatar save timed out. Please try again.":"Failed to save avatar")}}finally{const r=v.current;if(v.current=null,b.current=!1,r){g(r.layers,r.options);return}(n||x)&&p(!1)}},J=async()=>{await g(m,{showSuccessToast:!0,showSavingState:!0})},M=[{id:"top",label:"Tops",icon:e.jsx(me,{size:16})},{id:"bottom",label:"Bottoms",icon:e.jsx(fe,{size:16,className:"rotate-90"})},{id:"shoes",label:"Shoes",icon:e.jsx(xe,{size:16})},{id:"accessory",label:"Accessories",icon:e.jsx(R,{size:16})}];return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:be}),e.jsx("div",{className:"h-full w-full flex items-start xl:items-center justify-center p-4 sm:p-6 lg:p-8 overflow-y-auto xl:overflow-hidden",children:e.jsxs("div",{className:"relative w-full max-w-[1000px] min-h-[500px] xl:h-[80vh] xl:max-h-[700px] rounded-[2rem] p-6 lg:p-8 bg-gradient-to-br from-white via-sky-50/30 to-white border border-slate-200/80 shadow-[0_8px_30px_rgb(0,0,0,0.04)] flex flex-col xl:flex-row gap-8 xl:gap-12 overflow-visible xl:overflow-hidden",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden rounded-[2rem] pointer-events-none",children:[e.jsx("div",{className:"absolute top-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-sky-400/30 to-transparent"}),e.jsx("div",{className:"absolute -top-40 -right-40 w-96 h-96 bg-blue-100/40 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute -bottom-40 -left-40 w-96 h-96 bg-purple-100/30 rounded-full blur-3xl"})]}),e.jsxs("div",{className:"flex flex-col xl:h-full min-h-0 relative z-10 w-full xl:w-[50%] mx-auto xl:mx-0 flex-1",children:[e.jsxs("div",{className:"mb-6 flex flex-col gap-2 shrink-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between xl:justify-start gap-4",children:[e.jsxs("h1",{className:"text-3xl md:text-4xl font-display font-black text-[#0a1628] tracking-tight flex items-center gap-2.5",children:[e.jsx("span",{className:"whitespace-nowrap",children:"Avatar Studio"})," ",e.jsx(L,{className:"text-blue-500 fill-blue-500",size:28})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[$,e.jsxs("div",{className:"bg-gradient-to-br from-amber-400 to-orange-500 rounded-xl px-3 py-1.5 shadow-md flex items-center gap-2 h-fit",children:[e.jsx(j,{className:"text-white shrink-0",size:16}),e.jsxs(ie,{children:[e.jsx(le,{asChild:!0,children:e.jsxs("button",{onClick:F,className:"cursor-pointer hover:opacity-90 transition-opacity active:scale-95 text-left",children:[e.jsx("p",{className:"text-white text-[9px] font-bold uppercase tracking-wider leading-none mb-0.5",children:"XP Balance"}),e.jsx("p",{className:"text-white text-base font-black leading-none",children:D})]})}),e.jsx(ne,{side:"bottom",className:"bg-slate-900 text-white border border-slate-700",children:"Review more lessons to earn more XP!"})]})]})]})]}),e.jsx("p",{className:"text-slate-500 font-medium text-sm md:text-base",children:"Design your perfect learning companion."})]}),e.jsxs(W,{value:B,onValueChange:t=>H(t),className:"flex flex-col flex-1 min-h-0",children:[e.jsx(Q,{className:"flex flex-nowrap shrink-0 justify-start space-x-1 sm:space-x-2 mb-4 bg-white shadow-sm p-1 rounded-full border border-slate-100 w-fit overflow-x-auto max-w-full scrollbar-hide",children:M.map(t=>e.jsxs(ee,{value:t.id,className:"flex items-center gap-1.5 px-4 py-2 rounded-full font-bold text-[13px] text-slate-500 hover:bg-slate-50 data-[state=active]:bg-gradient-to-r data-[state=active]:from-blue-600 data-[state=active]:to-sky-500 data-[state=active]:text-white transition-all shadow-sm outline-none whitespace-nowrap",children:[t.icon,t.label]},t.id))}),e.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden min-h-0 pb-6 scrollbar-hide px-2 -mx-2",children:M.map(t=>{const o=I.filter(s=>s.category===t.id);return e.jsx(te,{value:t.id,className:"outline-none pt-2 h-full",children:o.length===0?e.jsxs("div",{className:"w-full h-full min-h-[250px] flex flex-col items-center justify-center border-2 border-dashed border-slate-200 rounded-[2rem] bg-slate-50/50 p-8 text-center",children:[e.jsx(R,{size:48,className:"text-slate-300 mb-4 opacity-50"}),e.jsx("h3",{className:"font-bold text-xl text-slate-500 mb-2",children:"Accessories coming soon"}),e.jsx("p",{className:"text-slate-400 text-sm max-w-xs",children:"We're crafting some awesome gear for your avatar! Check back later."})]}):e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 lg:gap-6",children:o.map(s=>{const a=m[t.id]===s.id,n=f.includes(s.id),r=!!((s.price&&s.price>0||s.isReward)&&!n);return e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs("button",{onClick:()=>!r&&G(t.id,s.id),disabled:r,className:`relative w-full aspect-square rounded-2xl border-2 transition-all flex flex-col items-center justify-center group ${a&&!r?"bg-white border-blue-500 shadow-md scale-[1.02] z-10":r?"bg-slate-50 border-slate-200 opacity-50 cursor-not-allowed":"bg-white border-slate-100 hover:border-sky-300 hover:shadow-lg hover:scale-[1.02] hover:z-10"}`,children:[a&&!r&&e.jsxs("div",{className:"absolute top-1.5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 bg-gradient-to-r from-blue-500 to-sky-400 text-white text-[9px] font-black rounded-full flex items-center gap-1 z-10 whitespace-nowrap",children:["Equipped ",e.jsx(L,{size:9,className:"fill-white"})]}),r&&e.jsx("div",{className:"absolute inset-0 bg-black/20 z-20 flex items-center justify-center rounded-[1rem]",children:e.jsx(O,{className:"text-white",size:24})}),e.jsx("img",{src:s.thumbnail,alt:s.name,className:`w-3/4 h-3/4 object-contain transition-transform e-filter ${!r&&"group-hover:scale-110"}`,style:{"--filter":r?"grayscale(70%)":"none"}})]}),e.jsx("p",{className:"text-xs font-bold text-slate-700 text-center line-clamp-2",children:s.name}),r&&(s.isReward?e.jsxs("div",{className:"w-full py-1 bg-slate-200 text-slate-500 text-[9px] font-bold flex items-center justify-center gap-1 rounded shadow-sm border border-slate-300",children:[e.jsx(O,{size:11})," Exclusive Reward"]}):e.jsx(w.button,{initial:{opacity:0},animate:{opacity:1},onClick:u=>K(u,s.id,s.price||0),disabled:T===s.id,className:"w-full py-1 bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-600 hover:to-orange-600 text-white text-[9px] font-bold flex items-center justify-center gap-1 rounded shadow-sm transition-all disabled:opacity-70",children:T===s.id?e.jsx(w.div,{animate:{rotate:360},transition:{repeat:1/0,duration:1},children:e.jsx(j,{size:11})}):e.jsxs(e.Fragment,{children:[e.jsx(j,{size:11}),s.price," XP"]})}))]},s.id)})})},t.id)})})]})]}),e.jsxs("div",{className:"flex flex-col gap-4 relative z-10 w-full xl:w-[350px] max-w-[420px] xl:max-w-none shrink-0 xl:self-center mx-auto xl:mx-0",children:[e.jsxs("div",{className:"bg-[#0f1422] rounded-[2rem] overflow-hidden relative shadow-[0_20px_50px_rgba(15,20,34,0.2)] h-[400px] w-full flex items-center justify-center mx-auto border-4 border-slate-800",children:[e.jsx("div",{className:"absolute top-[-10%] left-0 right-0 h-[110%] pointer-events-none mix-blend-screen opacity-70 avatar-gloss"}),e.jsx("div",{className:"absolute bottom-12 left-1/2 -translate-x-1/2 w-[220px] h-[25px] bg-sky-500/20 blur-xl rounded-full"}),e.jsxs("div",{className:"relative w-full h-[80%] z-10 flex justify-center items-center animate-avatar-float",children:[e.jsx(ce,{layers:m,className:"w-full h-full absolute inset-0 z-20"}),e.jsx(ae,{children:d&&e.jsxs(w.div,{initial:{opacity:0,y:-10,scale:.8},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:10,scale:.8},transition:{duration:.3},className:"absolute -top-24 left-1/2 -translate-x-1/2 z-30 bg-white text-slate-800 px-4 py-2 rounded-full shadow-lg border-2 border-sky-300 whitespace-nowrap font-bold text-sm max-w-xs text-center",children:[d,e.jsx("div",{className:"absolute -bottom-2 left-1/2 -translate-x-1/2 w-0 h-0 border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-white"})]})})]})]}),e.jsxs("button",{onClick:J,disabled:x,className:"w-full max-w-[450px] mx-auto h-[54px] bg-blue-600 hover:bg-blue-500 text-white rounded-xl font-bold text-base flex items-center justify-center gap-2 transition-colors shadow-md disabled:opacity-70 disabled:cursor-not-allowed active:scale-[0.98]",children:[x?e.jsx("div",{className:"animate-spin-slow",children:e.jsx(de,{size:24,className:"opacity-50"})}):null,x?"Saving...":"Save Profile Avatar"]})]})]})})]})};export{Oe as default}; diff --git a/assets/ChatMarkdown-C-_pyfsw.js b/assets/ChatMarkdown-Dqp-2Avv.js similarity index 97% rename from assets/ChatMarkdown-C-_pyfsw.js rename to assets/ChatMarkdown-Dqp-2Avv.js index 8b7c272aa5365f5d3b336875f1eb7f1719071520..e05eb6ace77603f0abc04f6fa80f219da9723d4f 100644 --- a/assets/ChatMarkdown-C-_pyfsw.js +++ b/assets/ChatMarkdown-Dqp-2Avv.js @@ -1,2 +1,2 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-markdown-yqZQ_iQm.js","assets/vendor-react-B4AQeu28.js","assets/vendor-markdown-CfVKi3_s.css"])))=>i.map(i=>d[i]); -import{ax as d,_ as c}from"./index-fWY85Kyg.js";import{r as m,j as r}from"./vendor-react-B4AQeu28.js";import{M as h,r as x,a as y}from"./vendor-markdown-yqZQ_iQm.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";let s=null;const p=()=>(s||(s=c(()=>import("./vendor-markdown-yqZQ_iQm.js").then(l=>l.k),__vite__mapDeps([0,1,2]))),s),M=({children:l})=>{if(m.useEffect(()=>{p()},[]),!l||typeof l!="string")return null;const t=d(l);return r.jsx("div",{className:"chat-markdown",children:r.jsx(h,{remarkPlugins:[y],rehypePlugins:[x],components:{a:({href:e,children:a})=>r.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:a}),code:e=>{const{inline:a,className:o,children:n,...i}=e;return r.jsx("code",{className:`${a?"bg-gray-100 dark:bg-gray-800 rounded px-1 py-0.5 text-sm":"block bg-gray-100 dark:bg-gray-900 rounded p-3 overflow-x-auto my-2"} ${o||""}`,...i,children:n})},blockquote:({children:e})=>r.jsx("blockquote",{className:"border-l-4 border-gray-300 dark:border-gray-600 pl-4 italic text-gray-600 dark:text-gray-400 my-2",children:e}),h1:({children:e})=>r.jsx("h1",{className:"text-2xl font-bold my-2",children:e}),h2:({children:e})=>r.jsx("h2",{className:"text-xl font-bold my-2",children:e}),h3:({children:e})=>r.jsx("h3",{className:"text-lg font-bold my-2",children:e}),h4:({children:e})=>r.jsx("h4",{className:"text-base font-bold my-2",children:e}),h5:({children:e})=>r.jsx("h5",{className:"text-sm font-bold my-2",children:e}),h6:({children:e})=>r.jsx("h6",{className:"text-xs font-bold my-2",children:e}),ul:({children:e})=>r.jsx("ul",{className:"list-disc list-inside my-2",children:e}),ol:({children:e})=>r.jsx("ol",{className:"list-decimal list-inside my-2",children:e}),li:({children:e})=>r.jsx("li",{className:"ml-2",children:e}),hr:()=>r.jsx("hr",{className:"my-4 border-t border-gray-300 dark:border-gray-600"}),p:({children:e})=>r.jsx("p",{className:"my-1",children:e})},children:t})})};export{M as default}; +import{aw as d,_ as c}from"./index-Du57tmo9.js";import{r as m,j as r}from"./vendor-react-B4AQeu28.js";import{M as h,r as x,a as y}from"./vendor-markdown-yqZQ_iQm.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";let s=null;const p=()=>(s||(s=c(()=>import("./vendor-markdown-yqZQ_iQm.js").then(l=>l.k),__vite__mapDeps([0,1,2]))),s),M=({children:l})=>{if(m.useEffect(()=>{p()},[]),!l||typeof l!="string")return null;const t=d(l);return r.jsx("div",{className:"chat-markdown",children:r.jsx(h,{remarkPlugins:[y],rehypePlugins:[x],components:{a:({href:e,children:a})=>r.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:a}),code:e=>{const{inline:a,className:o,children:n,...i}=e;return r.jsx("code",{className:`${a?"bg-gray-100 dark:bg-gray-800 rounded px-1 py-0.5 text-sm":"block bg-gray-100 dark:bg-gray-900 rounded p-3 overflow-x-auto my-2"} ${o||""}`,...i,children:n})},blockquote:({children:e})=>r.jsx("blockquote",{className:"border-l-4 border-gray-300 dark:border-gray-600 pl-4 italic text-gray-600 dark:text-gray-400 my-2",children:e}),h1:({children:e})=>r.jsx("h1",{className:"text-2xl font-bold my-2",children:e}),h2:({children:e})=>r.jsx("h2",{className:"text-xl font-bold my-2",children:e}),h3:({children:e})=>r.jsx("h3",{className:"text-lg font-bold my-2",children:e}),h4:({children:e})=>r.jsx("h4",{className:"text-base font-bold my-2",children:e}),h5:({children:e})=>r.jsx("h5",{className:"text-sm font-bold my-2",children:e}),h6:({children:e})=>r.jsx("h6",{className:"text-xs font-bold my-2",children:e}),ul:({children:e})=>r.jsx("ul",{className:"list-disc list-inside my-2",children:e}),ol:({children:e})=>r.jsx("ol",{className:"list-decimal list-inside my-2",children:e}),li:({children:e})=>r.jsx("li",{className:"ml-2",children:e}),hr:()=>r.jsx("hr",{className:"my-4 border-t border-gray-300 dark:border-gray-600"}),p:({children:e})=>r.jsx("p",{className:"my-1",children:e})},children:t})})};export{M as default}; diff --git a/assets/CompetencyRadarChart-Dj3tHzDW.js b/assets/CompetencyRadarChart-Czkg0oSg.js similarity index 96% rename from assets/CompetencyRadarChart-Dj3tHzDW.js rename to assets/CompetencyRadarChart-Czkg0oSg.js index ef108758ec5f9c5aa9deb68e7a544f9a7cc5520b..d4ed80c039336e8bcf1f43f7b0624fecc41e6e4e 100644 --- a/assets/CompetencyRadarChart-Dj3tHzDW.js +++ b/assets/CompetencyRadarChart-Czkg0oSg.js @@ -1 +1 @@ -import{r as d,j as e}from"./vendor-react-B4AQeu28.js";import{u as W,L as H,m as K}from"./index-fWY85Kyg.js";import{g as O,s as P}from"./subjects-BlAP40QQ.js";import{B as U}from"./brain-COga8OrM.js";import{S as Y}from"./sparkles-BY90tCLG.js";import{R as J,d as Q,P as V,e as X,f as Z,g as $,T as ee}from"./vendor-charts-BHw0fhqZ.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-markdown-yqZQ_iQm.js";import"./chart-column-V8fKqOo0.js";const fe=()=>{const{userProfile:u}=W(),[F,D]=d.useState([]),[p,R]=d.useState([]),[B,I]=d.useState("N/A"),[b,f]=d.useState(!0),[T,j]=d.useState(!1),v=["#1FA7E1","#9956DE","#75D06A","#FFB356","#7274ED","#FF8B8B","#6ED1CF","#FB96BB"];return d.useEffect(()=>{if(!u?.uid){f(!1);return}const s=u.role==="student"?u.grade:null,r=O(s)[0]??"gen-math",h=P.find(t=>t.id===r)?.modules||[],y=new Map;P.forEach(t=>{t.modules.forEach(i=>y.set(i.id,t.id))});const N=h.map((t,i)=>({id:t.id,name:t.title.length>15?t.title.substring(0,15).trim()+"...":t.title,color:v[i%v.length]}));R(N);const k=[{key:"progress",label:"Overall Mastery"},{key:"concept",label:"Concept Grasp"},{key:"application",label:"Application"},{key:"engagement",label:"Engagement"},{key:"consistency",label:"Consistency"}],_=t=>{let i=-1,w="N/A";const M=k.map(l=>{const x={metric:l.label,fullMark:100};return h.forEach(a=>{const n=y.get(a.id),o=n?t?.subjects?.[n]?.modulesProgress?.[a.id]:null,E=o?.progress||0,q=t?.lessons??{},S=a.lessons.length?a.lessons.reduce((A,C)=>{const g=q?.[C.id]?.progressPercent;if(typeof g=="number"&&Number.isFinite(g))return A+Math.max(0,Math.min(100,g));const G=!!o?.lessonsCompleted?.includes?.(C.id);return A+(G?100:0)},0)/a.lessons.length:0,z=a.quizzes.length?(o?.quizzesCompleted?.length||0)/a.quizzes.length*100:0;let c=0;l.key==="progress"?c=E:l.key==="concept"?c=S:l.key==="application"?c=z:l.key==="engagement"?c=Math.min(100,(S+z*2)/1.5):l.key==="consistency"&&(c=Math.min(100,40+E*.6)),x[a.id]=c||0}),x});h.forEach(l=>{let x=0;M.forEach(n=>{const o=n[l.id];x+=typeof o=="number"?o:0});const a=x/k.length;a>i&&(i=a,w=N.find(n=>n.id===l.id)?.name||"N/A")}),I(w),D(M),f(!1)};f(!0);const L=H(u.uid,t=>{_(t)});return()=>L()},[u?.uid]),e.jsxs(K.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,ease:[.22,1,.36,1]},className:"relative overflow-hidden bg-white/80 backdrop-blur-xl border border-white/50 shadow-[0_8px_30px_rgb(0,0,0,0.04)] rounded-[2rem] p-6 lg:p-8 isolate group",onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),children:[e.jsx("div",{className:"absolute top-0 right-0 w-64 h-64 bg-violet-400/5 rounded-full blur-3xl -translate-y-1/2 translate-x-1/4"}),e.jsx("div",{className:"absolute bottom-0 left-0 w-48 h-48 bg-rose-400/5 rounded-full blur-3xl translate-y-1/3 -translate-x-1/3"}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between mb-8 relative z-10 gap-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"p-2 bg-violet-100 text-violet-600 rounded-xl",children:e.jsx(U,{size:20,className:"stroke-[2.5]"})}),e.jsx("h3",{className:"text-xl font-display font-extrabold text-[#0a1628] tracking-tight",children:"Competency Matrix"})]}),e.jsx("p",{className:"text-sm text-[#5a6578] font-body ml-12",children:"Your realtime performance across modules"})]}),e.jsxs("div",{className:"flex items-center gap-3 bg-slate-50 border border-slate-100 px-4 py-2 rounded-2xl ml-12 sm:ml-0",children:[e.jsx("div",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-white shadow-sm border border-slate-100",children:e.jsx(Y,{size:14,className:"text-amber-500"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"Top Module"}),e.jsx("p",{className:"text-sm font-bold text-slate-700",children:B})]})]})]}),e.jsx("div",{className:"h-[300px] sm:h-[360px] w-full relative z-10",children:b?e.jsx("div",{className:"w-full h-full flex items-center justify-center",children:e.jsxs("div",{className:"flex flex-col items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 border-4 border-violet-200 border-t-violet-500 rounded-full animate-spin"}),e.jsx("p",{className:"text-sm text-slate-400 font-medium",children:"Analyzing skill vectors..."})]})}):e.jsx(J,{width:"100%",height:"100%",children:e.jsxs(Q,{cx:"50%",cy:"50%",outerRadius:T?"75%":"70%",data:F,children:[e.jsx(V,{stroke:"#e2e8f0",strokeDasharray:"4 4",polarRadius:[20,40,60,80,100]}),e.jsx(X,{dataKey:"metric",tick:{fill:"#475569",fontSize:12,fontWeight:600,fontFamily:"Inter, sans-serif"}}),e.jsx(Z,{angle:90,domain:[0,100],tick:{fill:"#94a3b8",fontSize:10},tickCount:6,axisLine:!1}),p.map(s=>e.jsx($,{name:s.name,dataKey:s.id,stroke:s.color,strokeWidth:2,fill:s.color,fillOpacity:.35,dot:{r:3,fill:"#fff",stroke:s.color,strokeWidth:2},activeDot:{r:5,fill:s.color,stroke:"#fff",strokeWidth:2},isAnimationActive:!0,animationDuration:1500,animationEasing:"ease-out"},s.id)),e.jsx(ee,{cursor:!1,content:({active:s,payload:m})=>s&&m&&m.length?e.jsxs("div",{className:"bg-white/95 backdrop-blur shadow-[0_10px_40px_-10px_rgba(0,0,0,0.15)] border border-slate-100 rounded-xl p-4",children:[e.jsx("p",{className:"font-display font-bold text-slate-800 text-sm mb-3",children:m[0].payload.metric}),e.jsx("div",{className:"flex flex-col gap-2",children:m.map(r=>e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full e-bg",style:{"--bg":r.stroke}}),e.jsx("span",{className:"text-xs font-bold text-slate-600 uppercase tracking-wide truncate max-w-[120px]",title:String(r.name),children:String(r.name)})]}),e.jsxs("span",{className:"text-sm font-black e-color",style:{"--c":r.stroke},children:[Math.round(r.value),"%"]})]},r.name))})]}):null})]})})}),!b&&p.length>0&&e.jsx("div",{className:"flex flex-wrap justify-center items-center gap-3 md:gap-5 mt-[5px] z-10 relative",children:p.map(s=>e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-2.5 h-2.5 rounded-full e-bg",style:{"--bg":s.color}}),e.jsx("span",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest",children:s.name.length>15?s.name.substring(0,12)+"...":s.name})]},s.id))})]})};export{fe as CompetencyRadarChart}; +import{r as d,j as e}from"./vendor-react-B4AQeu28.js";import{u as W,L as H,m as K}from"./index-Du57tmo9.js";import{g as O,s as P}from"./subjects-DLaBFkP9.js";import{B as U}from"./brain-CEG2uNCc.js";import{S as Y}from"./sparkles-DseoQb3m.js";import{R as J,d as Q,P as V,e as X,f as Z,g as $,T as ee}from"./vendor-charts-BHw0fhqZ.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-markdown-yqZQ_iQm.js";import"./chart-column-Cqncpeum.js";const fe=()=>{const{userProfile:u}=W(),[F,D]=d.useState([]),[p,R]=d.useState([]),[B,I]=d.useState("N/A"),[b,f]=d.useState(!0),[T,j]=d.useState(!1),v=["#1FA7E1","#9956DE","#75D06A","#FFB356","#7274ED","#FF8B8B","#6ED1CF","#FB96BB"];return d.useEffect(()=>{if(!u?.uid){f(!1);return}const s=u.role==="student"?u.grade:null,r=O(s)[0]??"gen-math",h=P.find(t=>t.id===r)?.modules||[],y=new Map;P.forEach(t=>{t.modules.forEach(i=>y.set(i.id,t.id))});const N=h.map((t,i)=>({id:t.id,name:t.title.length>15?t.title.substring(0,15).trim()+"...":t.title,color:v[i%v.length]}));R(N);const k=[{key:"progress",label:"Overall Mastery"},{key:"concept",label:"Concept Grasp"},{key:"application",label:"Application"},{key:"engagement",label:"Engagement"},{key:"consistency",label:"Consistency"}],_=t=>{let i=-1,w="N/A";const M=k.map(l=>{const x={metric:l.label,fullMark:100};return h.forEach(a=>{const n=y.get(a.id),o=n?t?.subjects?.[n]?.modulesProgress?.[a.id]:null,E=o?.progress||0,q=t?.lessons??{},S=a.lessons.length?a.lessons.reduce((A,C)=>{const g=q?.[C.id]?.progressPercent;if(typeof g=="number"&&Number.isFinite(g))return A+Math.max(0,Math.min(100,g));const G=!!o?.lessonsCompleted?.includes?.(C.id);return A+(G?100:0)},0)/a.lessons.length:0,z=a.quizzes.length?(o?.quizzesCompleted?.length||0)/a.quizzes.length*100:0;let c=0;l.key==="progress"?c=E:l.key==="concept"?c=S:l.key==="application"?c=z:l.key==="engagement"?c=Math.min(100,(S+z*2)/1.5):l.key==="consistency"&&(c=Math.min(100,40+E*.6)),x[a.id]=c||0}),x});h.forEach(l=>{let x=0;M.forEach(n=>{const o=n[l.id];x+=typeof o=="number"?o:0});const a=x/k.length;a>i&&(i=a,w=N.find(n=>n.id===l.id)?.name||"N/A")}),I(w),D(M),f(!1)};f(!0);const L=H(u.uid,t=>{_(t)});return()=>L()},[u?.uid]),e.jsxs(K.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,ease:[.22,1,.36,1]},className:"relative overflow-hidden bg-white/80 backdrop-blur-xl border border-white/50 shadow-[0_8px_30px_rgb(0,0,0,0.04)] rounded-[2rem] p-6 lg:p-8 isolate group",onMouseEnter:()=>j(!0),onMouseLeave:()=>j(!1),children:[e.jsx("div",{className:"absolute top-0 right-0 w-64 h-64 bg-violet-400/5 rounded-full blur-3xl -translate-y-1/2 translate-x-1/4"}),e.jsx("div",{className:"absolute bottom-0 left-0 w-48 h-48 bg-rose-400/5 rounded-full blur-3xl translate-y-1/3 -translate-x-1/3"}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between mb-8 relative z-10 gap-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"p-2 bg-violet-100 text-violet-600 rounded-xl",children:e.jsx(U,{size:20,className:"stroke-[2.5]"})}),e.jsx("h3",{className:"text-xl font-display font-extrabold text-[#0a1628] tracking-tight",children:"Competency Matrix"})]}),e.jsx("p",{className:"text-sm text-[#5a6578] font-body ml-12",children:"Your realtime performance across modules"})]}),e.jsxs("div",{className:"flex items-center gap-3 bg-slate-50 border border-slate-100 px-4 py-2 rounded-2xl ml-12 sm:ml-0",children:[e.jsx("div",{className:"flex items-center justify-center w-8 h-8 rounded-full bg-white shadow-sm border border-slate-100",children:e.jsx(Y,{size:14,className:"text-amber-500"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"Top Module"}),e.jsx("p",{className:"text-sm font-bold text-slate-700",children:B})]})]})]}),e.jsx("div",{className:"h-[300px] sm:h-[360px] w-full relative z-10",children:b?e.jsx("div",{className:"w-full h-full flex items-center justify-center",children:e.jsxs("div",{className:"flex flex-col items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 border-4 border-violet-200 border-t-violet-500 rounded-full animate-spin"}),e.jsx("p",{className:"text-sm text-slate-400 font-medium",children:"Analyzing skill vectors..."})]})}):e.jsx(J,{width:"100%",height:"100%",children:e.jsxs(Q,{cx:"50%",cy:"50%",outerRadius:T?"75%":"70%",data:F,children:[e.jsx(V,{stroke:"#e2e8f0",strokeDasharray:"4 4",polarRadius:[20,40,60,80,100]}),e.jsx(X,{dataKey:"metric",tick:{fill:"#475569",fontSize:12,fontWeight:600,fontFamily:"Inter, sans-serif"}}),e.jsx(Z,{angle:90,domain:[0,100],tick:{fill:"#94a3b8",fontSize:10},tickCount:6,axisLine:!1}),p.map(s=>e.jsx($,{name:s.name,dataKey:s.id,stroke:s.color,strokeWidth:2,fill:s.color,fillOpacity:.35,dot:{r:3,fill:"#fff",stroke:s.color,strokeWidth:2},activeDot:{r:5,fill:s.color,stroke:"#fff",strokeWidth:2},isAnimationActive:!0,animationDuration:1500,animationEasing:"ease-out"},s.id)),e.jsx(ee,{cursor:!1,content:({active:s,payload:m})=>s&&m&&m.length?e.jsxs("div",{className:"bg-white/95 backdrop-blur shadow-[0_10px_40px_-10px_rgba(0,0,0,0.15)] border border-slate-100 rounded-xl p-4",children:[e.jsx("p",{className:"font-display font-bold text-slate-800 text-sm mb-3",children:m[0].payload.metric}),e.jsx("div",{className:"flex flex-col gap-2",children:m.map(r=>e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-2 h-2 rounded-full e-bg",style:{"--bg":r.stroke}}),e.jsx("span",{className:"text-xs font-bold text-slate-600 uppercase tracking-wide truncate max-w-[120px]",title:String(r.name),children:String(r.name)})]}),e.jsxs("span",{className:"text-sm font-black e-color",style:{"--c":r.stroke},children:[Math.round(r.value),"%"]})]},r.name))})]}):null})]})})}),!b&&p.length>0&&e.jsx("div",{className:"flex flex-wrap justify-center items-center gap-3 md:gap-5 mt-[5px] z-10 relative",children:p.map(s=>e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-2.5 h-2.5 rounded-full e-bg",style:{"--bg":s.color}}),e.jsx("span",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest",children:s.name.length>15?s.name.substring(0,12)+"...":s.name})]},s.id))})]})};export{fe as CompetencyRadarChart}; diff --git a/assets/ConfirmModal-Bs6qCyoa.js b/assets/ConfirmModal-CGEO_l_6.js similarity index 91% rename from assets/ConfirmModal-Bs6qCyoa.js rename to assets/ConfirmModal-CGEO_l_6.js index 0114b506de4d66e0e2788406385db0913969fb00..1327b1a83079e2d2ba44b00f9dba66e670d8303c 100644 --- a/assets/ConfirmModal-Bs6qCyoa.js +++ b/assets/ConfirmModal-CGEO_l_6.js @@ -1 +1 @@ -import{j as e}from"./vendor-react-B4AQeu28.js";import{B as i}from"./button-BSRmUN27.js";import{h as u,m as r,T as f}from"./index-fWY85Kyg.js";import{X as y}from"./x-BLLfAvOF.js";import{T as j}from"./trash-2-PgvGautk.js";import{L as w}from"./log-out-aQvvB_kG.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-markdown-yqZQ_iQm.js";const O=({isOpen:s,onClose:t,onConfirm:n,title:a,message:l,confirmText:c="Confirm",cancelText:d="Cancel",type:m="warning",icon:x="warning",zIndexClass:g="z-50"})=>{const b=()=>{switch(x){case"logout":return e.jsx(w,{size:32});case"delete":return e.jsx(j,{size:32});case"warning":default:return e.jsx(f,{size:32})}},o=(()=>{switch(m){case"danger":return{iconBg:"bg-red-100",iconColor:"text-red-600",buttonBg:"bg-red-600 hover:bg-red-700",buttonText:"text-white"};case"warning":return{iconBg:"bg-rose-100",iconColor:"text-rose-600",buttonBg:"bg-rose-600 hover:bg-rose-700",buttonText:"text-white"};case"info":default:return{iconBg:"bg-sky-100",iconColor:"text-sky-600",buttonBg:"bg-sky-600 hover:bg-sky-700",buttonText:"text-white"}}})(),p=async()=>{try{await n(),t()}catch{}};return e.jsx(u,{children:s&&e.jsx(e.Fragment,{children:e.jsx(r.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:`fixed inset-0 bg-black/50 backdrop-blur-sm ${g} flex items-center justify-center p-4`,children:e.jsxs(r.div,{initial:{opacity:0,scale:.9,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:20},transition:{type:"spring",damping:25,stiffness:300},onClick:h=>h.stopPropagation(),className:"bg-[#f7f9fc] rounded-3xl shadow-2xl max-w-md w-full overflow-hidden border border-[#dde3eb]",children:[e.jsx("button",{onClick:t,className:"absolute top-4 right-4 p-2 text-slate-500 hover:text-[#0a1628] hover:bg-[#dde3eb] rounded-xl transition-colors z-10",children:e.jsx(y,{size:20})}),e.jsxs("div",{className:"p-8 text-center",children:[e.jsx(r.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.1,type:"spring",damping:15},className:`w-20 h-20 ${o.iconBg} rounded-full flex items-center justify-center mx-auto mb-6 ${o.iconColor}`,children:b()}),e.jsx("h2",{className:"text-2xl font-display font-bold text-[#0a1628] mb-3",children:a}),e.jsx("p",{className:"text-[#5a6578] mb-8 leading-relaxed",children:l}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(i,{onClick:t,variant:"outline",size:"lg",className:"flex-1 h-12 rounded-xl border-[#dde3eb] hover:border-[#d1cec6] hover:bg-[#edf1f7] font-bold",children:d}),e.jsx(i,{onClick:p,size:"lg",className:`flex-1 h-12 rounded-xl font-bold ${o.buttonBg} ${o.buttonText} transition-colors shadow-lg`,children:c})]})]})]})})})})};export{O as default}; +import{j as e}from"./vendor-react-B4AQeu28.js";import{B as i}from"./button-C6pFOjcg.js";import{h as u,m as r,T as f}from"./index-Du57tmo9.js";import{X as y}from"./x-Cwkkamrh.js";import{T as j}from"./trash-2-uIChez5o.js";import{L as w}from"./log-out-SC88Jnul.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-markdown-yqZQ_iQm.js";const O=({isOpen:s,onClose:t,onConfirm:n,title:a,message:l,confirmText:c="Confirm",cancelText:d="Cancel",type:m="warning",icon:x="warning",zIndexClass:g="z-50"})=>{const b=()=>{switch(x){case"logout":return e.jsx(w,{size:32});case"delete":return e.jsx(j,{size:32});case"warning":default:return e.jsx(f,{size:32})}},o=(()=>{switch(m){case"danger":return{iconBg:"bg-red-100",iconColor:"text-red-600",buttonBg:"bg-red-600 hover:bg-red-700",buttonText:"text-white"};case"warning":return{iconBg:"bg-rose-100",iconColor:"text-rose-600",buttonBg:"bg-rose-600 hover:bg-rose-700",buttonText:"text-white"};case"info":default:return{iconBg:"bg-sky-100",iconColor:"text-sky-600",buttonBg:"bg-sky-600 hover:bg-sky-700",buttonText:"text-white"}}})(),p=async()=>{try{await n(),t()}catch{}};return e.jsx(u,{children:s&&e.jsx(e.Fragment,{children:e.jsx(r.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t,className:`fixed inset-0 bg-black/50 backdrop-blur-sm ${g} flex items-center justify-center p-4`,children:e.jsxs(r.div,{initial:{opacity:0,scale:.9,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:20},transition:{type:"spring",damping:25,stiffness:300},onClick:h=>h.stopPropagation(),className:"bg-[#f7f9fc] rounded-3xl shadow-2xl max-w-md w-full overflow-hidden border border-[#dde3eb]",children:[e.jsx("button",{onClick:t,className:"absolute top-4 right-4 p-2 text-slate-500 hover:text-[#0a1628] hover:bg-[#dde3eb] rounded-xl transition-colors z-10",children:e.jsx(y,{size:20})}),e.jsxs("div",{className:"p-8 text-center",children:[e.jsx(r.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.1,type:"spring",damping:15},className:`w-20 h-20 ${o.iconBg} rounded-full flex items-center justify-center mx-auto mb-6 ${o.iconColor}`,children:b()}),e.jsx("h2",{className:"text-2xl font-display font-bold text-[#0a1628] mb-3",children:a}),e.jsx("p",{className:"text-[#5a6578] mb-8 leading-relaxed",children:l}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(i,{onClick:t,variant:"outline",size:"lg",className:"flex-1 h-12 rounded-xl border-[#dde3eb] hover:border-[#d1cec6] hover:bg-[#edf1f7] font-bold",children:d}),e.jsx(i,{onClick:p,size:"lg",className:`flex-1 h-12 rounded-xl font-bold ${o.buttonBg} ${o.buttonText} transition-colors shadow-lg`,children:c})]})]})]})})})})};export{O as default}; diff --git a/assets/FloatingAITutor-CZdidaqQ.js b/assets/FloatingAITutor-CK0p1jTY.js similarity index 94% rename from assets/FloatingAITutor-CZdidaqQ.js rename to assets/FloatingAITutor-CK0p1jTY.js index 12c87f05047fb1b32d2194a5117b942b6df4ee73..68515ccc7608b5946509932e41093827ca373d3e 100644 --- a/assets/FloatingAITutor-CZdidaqQ.js +++ b/assets/FloatingAITutor-CK0p1jTY.js @@ -1,7 +1,7 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ChatMarkdown-C-_pyfsw.js","assets/index-fWY85Kyg.js","assets/vendor-react-B4AQeu28.js","assets/vendor-firebase-auth-BW5XT768.js","assets/vendor-firebase-core-y3En_kpN.js","assets/vendor-firebase-firestore-52DD1vc9.js","assets/vendor-firebase-storage-DNmrKfQ-.js","assets/vendor-firebase-analytics-DZd0u9yk.js","assets/vendor-radix-DnWAlVSW.js","assets/vendor-charts-BHw0fhqZ.js","assets/vendor-markdown-yqZQ_iQm.js","assets/vendor-markdown-CfVKi3_s.css","assets/index-CcVKs9hN.css"])))=>i.map(i=>d[i]); -import{c as S,al as C,_ as y,m as f,B as A}from"./index-fWY85Kyg.js";import{r as a,j as e}from"./vendor-react-B4AQeu28.js";import{M as b}from"./minus-Db4XvxwC.js";import{X as w}from"./x-BLLfAvOF.js";import{S as M}from"./send-86vsPrek.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ChatMarkdown-Dqp-2Avv.js","assets/index-Du57tmo9.js","assets/vendor-react-B4AQeu28.js","assets/vendor-firebase-auth-BW5XT768.js","assets/vendor-firebase-core-y3En_kpN.js","assets/vendor-firebase-firestore-52DD1vc9.js","assets/vendor-firebase-storage-DNmrKfQ-.js","assets/vendor-firebase-analytics-DZd0u9yk.js","assets/vendor-radix-DnWAlVSW.js","assets/vendor-charts-BHw0fhqZ.js","assets/vendor-markdown-yqZQ_iQm.js","assets/vendor-markdown-CfVKi3_s.css","assets/index-BQ2D57Uc.css"])))=>i.map(i=>d[i]); +import{c as S,ak as C,_ as y,m as f,B as A}from"./index-Du57tmo9.js";import{r as a,j as e}from"./vendor-react-B4AQeu28.js";import{M as b}from"./minus-DyrqHtmD.js";import{X as w}from"./x-Cwkkamrh.js";import{S as M}from"./send-DWW_bMCz.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const L=[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]],E=S("maximize-2",L),O=a.lazy(()=>y(()=>import("./ChatMarkdown-C-_pyfsw.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]))),Q=({constraintsRef:R,onFullScreen:g})=>{const{activeSessionId:n,setActiveSessionId:j,createNewSession:v,getActiveSession:N,sendMessage:k,isLoading:o}=C(),[s,r]=a.useState(!1),[l,d]=a.useState(()=>typeof window>"u"?!1:window.localStorage.getItem("floating_ai_tutor_minimized")==="1"),[i,u]=a.useState(""),m=a.useRef(null);a.useEffect(()=>{typeof window>"u"||window.localStorage.setItem("floating_ai_tutor_minimized",l?"1":"0")},[l]),a.useEffect(()=>{s&&y(async()=>{const{warmupBackend:t}=await import("./index-fWY85Kyg.js").then(c=>c.az);return{warmupBackend:t}},__vite__mapDeps([1,2,3,4,5,6,7,8,9,10,11,12])).then(({warmupBackend:t})=>{t()}).catch(t=>{console.warn("Floating tutor warmup skipped:",t)})},[s]),a.useEffect(()=>{if(s&&!n){const t={id:"1",sender:"ai",text:"Hi! I'm your AI math tutor. What would you like to learn about today?",timestamp:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})},c=v(t);j(c)}},[s]);const x=N()?.messages||[],I=()=>{m.current?.scrollIntoView({behavior:"smooth"})};a.useEffect(()=>{I()},[x]);const h=async()=>{if(!i.trim()||!n||o)return;const t=i.trim();u(""),await k(n,t)},_=()=>{g()},p=()=>{r(!1),d(!0)},z=()=>{d(!1)};return e.jsxs("div",{className:"pointer-events-none flex flex-col items-end",children:[e.jsxs("div",{className:`pointer-events-auto mb-4 w-80 bg-[#f7f9fc] rounded-3xl shadow-2xl border border-[#dde3eb] flex flex-col overflow-hidden transition-all duration-300 origin-bottom-right select-none ${s?"opacity-100 scale-100 translate-y-0":"opacity-0 scale-95 translate-y-10 pointer-events-none h-0"}`,style:{"--max-h":s?"32rem":"0",willChange:"transform, opacity"},children:[e.jsxs("div",{className:"bg-gradient-to-r from-sky-600 to-sky-500 p-4 flex items-center justify-between flex-shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-white/20 rounded-xl flex items-center justify-center backdrop-blur-sm",children:e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"AI Tutor",className:"w-9 h-9 object-contain drop-shadow-md"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-white font-bold text-sm",children:"L.O.L.I."}),e.jsxs("p",{className:"text-sky-100 text-[10px] leading-tight",children:["Logical Operations &",e.jsx("br",{}),"Learning Intelligence"]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:_,type:"button","aria-label":"Open fullscreen",className:"p-2 hover:bg-white/20 rounded-lg transition-colors",title:"Open fullscreen",children:e.jsx(E,{size:16,className:"text-white"})}),e.jsx("button",{type:"button","aria-label":"Minimize AI tutor launcher",onClick:p,className:"p-2 hover:bg-white/20 rounded-lg transition-colors",title:"Minimize",children:e.jsx(b,{size:16,className:"text-white"})}),e.jsx("button",{type:"button","aria-label":"Close chat",onClick:()=>r(!1),className:"p-2 hover:bg-white/20 rounded-lg transition-colors",children:e.jsx(w,{size:16,className:"text-white"})})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 bg-[#edf1f7]",children:[x.map(t=>e.jsx("div",{className:`flex ${t.sender==="user"?"justify-end":"justify-start"}`,children:e.jsxs("div",{className:`max-w-[75%] rounded-2xl px-4 py-2.5 ${t.sender==="user"?"bg-sky-600 text-white":"bg-white text-[#0a1628] shadow-sm border border-[#dde3eb]"}`,children:[t.sender==="user"?e.jsx("p",{className:"text-sm whitespace-pre-wrap",children:t.text}):e.jsx(a.Suspense,{fallback:e.jsx("p",{className:"text-sm whitespace-pre-wrap",children:t.text}),children:e.jsx(O,{children:t.text})}),e.jsx("p",{className:`text-[10px] mt-1 ${t.sender==="user"?"text-sky-200":"text-slate-500"}`,children:t.timestamp})]})},t.id)),o&&e.jsx("div",{className:"flex justify-start",children:e.jsx("div",{className:"bg-white text-[#0a1628] shadow-sm border border-[#dde3eb] rounded-2xl px-4 py-2.5 max-w-[75%]",children:e.jsxs("div",{className:"flex gap-1",children:[e.jsx("div",{className:"w-2 h-2 bg-sky-400 rounded-full animate-bounce"}),e.jsx("div",{className:"w-2 h-2 bg-sky-400 rounded-full animate-bounce [animation-delay:150ms]"}),e.jsx("div",{className:"w-2 h-2 bg-sky-400 rounded-full animate-bounce [animation-delay:300ms]"})]})})}),e.jsx("div",{ref:m})]}),e.jsx("div",{className:"p-4 border-t border-[#dde3eb] bg-white flex-shrink-0",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{id:"ai-tutor-input",name:"ai-tutor-input","aria-label":"Ask AI tutor a question",type:"text",value:i,onChange:t=>u(t.target.value),onKeyPress:t=>t.key==="Enter"&&h(),placeholder:"Ask me anything...",className:"flex-1 px-4 py-2.5 rounded-xl border border-[#dde3eb] focus:outline-none focus:ring-2 focus:ring-sky-500 text-sm bg-[#f7f9fc]"}),e.jsx("button",{type:"button","aria-label":"Send message",onClick:h,className:"p-2.5 bg-sky-600 hover:bg-sky-700 text-white rounded-xl transition-colors disabled:opacity-50 disabled:cursor-not-allowed",disabled:!i.trim()||o,children:e.jsx(M,{size:18})})]})})]}),e.jsx("div",{className:"pointer-events-auto relative self-end",children:l?e.jsx(f.button,{type:"button",onClick:z,whileHover:{scale:1.08},whileTap:{scale:.95},transition:{duration:.15,ease:"easeOut"},className:"h-9 w-9 rounded-full bg-slate-900/85 text-white shadow-lg ring-1 ring-white/20 backdrop-blur-sm flex items-center justify-center","aria-label":"Restore AI tutor launcher",title:"Show AI tutor",style:{willChange:"transform"},children:e.jsx(A,{size:14})}):e.jsxs("div",{className:"relative group",children:[!s&&e.jsxs("div",{className:"absolute right-full mr-4 top-1/2 -translate-y-1/2 px-4 py-2 bg-slate-800 text-white text-sm rounded-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none whitespace-nowrap shadow-xl z-50",children:["Hello! I'm L.O.L.I., how may I help you?",e.jsx("div",{className:"absolute top-1/2 -translate-y-1/2 -right-1 w-3 h-3 bg-slate-800 rotate-45"})]}),!s&&e.jsx("button",{type:"button","aria-label":"Minimize AI tutor launcher",title:"Minimize",onClick:p,className:"absolute -top-2 -left-2 z-10 h-6 w-6 rounded-full bg-white text-slate-700 border border-slate-200 shadow-md hover:bg-slate-100 transition-colors flex items-center justify-center",children:e.jsx(b,{size:12})}),e.jsx(f.button,{type:"button",onClick:()=>r(!s),whileHover:{scale:1.1},whileTap:{scale:.9},transition:{duration:.15,ease:"easeOut"},className:"w-16 h-16 bg-gradient-to-br from-sky-600 to-sky-500 rounded-xl shadow-2xl flex items-center justify-center text-white hover:shadow-sky-300/50 transition-all","aria-label":s?"Close AI tutor chat":"Open AI tutor chat",style:{willChange:"transform"},children:s?e.jsx(w,{size:28}):e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"AI Tutor",className:"w-14 h-14 object-contain drop-shadow-lg"})})]})})]})};export{Q as default}; + */const L=[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]],E=S("maximize-2",L),O=a.lazy(()=>y(()=>import("./ChatMarkdown-Dqp-2Avv.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]))),Q=({constraintsRef:R,onFullScreen:g})=>{const{activeSessionId:n,setActiveSessionId:j,createNewSession:v,getActiveSession:N,sendMessage:k,isLoading:o}=C(),[s,r]=a.useState(!1),[l,d]=a.useState(()=>typeof window>"u"?!1:window.localStorage.getItem("floating_ai_tutor_minimized")==="1"),[i,u]=a.useState(""),m=a.useRef(null);a.useEffect(()=>{typeof window>"u"||window.localStorage.setItem("floating_ai_tutor_minimized",l?"1":"0")},[l]),a.useEffect(()=>{s&&y(async()=>{const{warmupBackend:t}=await import("./index-Du57tmo9.js").then(c=>c.ay);return{warmupBackend:t}},__vite__mapDeps([1,2,3,4,5,6,7,8,9,10,11,12])).then(({warmupBackend:t})=>{t()}).catch(t=>{console.warn("Floating tutor warmup skipped:",t)})},[s]),a.useEffect(()=>{if(s&&!n){const t={id:"1",sender:"ai",text:"Hi! I'm your AI math tutor. What would you like to learn about today?",timestamp:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})},c=v(t);j(c)}},[s]);const x=N()?.messages||[],I=()=>{m.current?.scrollIntoView({behavior:"smooth"})};a.useEffect(()=>{I()},[x]);const h=async()=>{if(!i.trim()||!n||o)return;const t=i.trim();u(""),await k(n,t)},_=()=>{g()},p=()=>{r(!1),d(!0)},z=()=>{d(!1)};return e.jsxs("div",{className:"pointer-events-none flex flex-col items-end",children:[e.jsxs("div",{className:`pointer-events-auto mb-4 w-80 bg-[#f7f9fc] rounded-3xl shadow-2xl border border-[#dde3eb] flex flex-col overflow-hidden transition-all duration-300 origin-bottom-right select-none ${s?"opacity-100 scale-100 translate-y-0":"opacity-0 scale-95 translate-y-10 pointer-events-none h-0"}`,style:{"--max-h":s?"32rem":"0",willChange:"transform, opacity"},children:[e.jsxs("div",{className:"bg-gradient-to-r from-sky-600 to-sky-500 p-4 flex items-center justify-between flex-shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-white/20 rounded-xl flex items-center justify-center backdrop-blur-sm",children:e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"AI Tutor",className:"w-9 h-9 object-contain drop-shadow-md"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-white font-bold text-sm",children:"L.O.L.I."}),e.jsxs("p",{className:"text-sky-100 text-[10px] leading-tight",children:["Logical Operations &",e.jsx("br",{}),"Learning Intelligence"]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:_,type:"button","aria-label":"Open fullscreen",className:"p-2 hover:bg-white/20 rounded-lg transition-colors",title:"Open fullscreen",children:e.jsx(E,{size:16,className:"text-white"})}),e.jsx("button",{type:"button","aria-label":"Minimize AI tutor launcher",onClick:p,className:"p-2 hover:bg-white/20 rounded-lg transition-colors",title:"Minimize",children:e.jsx(b,{size:16,className:"text-white"})}),e.jsx("button",{type:"button","aria-label":"Close chat",onClick:()=>r(!1),className:"p-2 hover:bg-white/20 rounded-lg transition-colors",children:e.jsx(w,{size:16,className:"text-white"})})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 bg-[#edf1f7]",children:[x.map(t=>e.jsx("div",{className:`flex ${t.sender==="user"?"justify-end":"justify-start"}`,children:e.jsxs("div",{className:`max-w-[75%] rounded-2xl px-4 py-2.5 ${t.sender==="user"?"bg-sky-600 text-white":"bg-white text-[#0a1628] shadow-sm border border-[#dde3eb]"}`,children:[t.sender==="user"?e.jsx("p",{className:"text-sm whitespace-pre-wrap",children:t.text}):e.jsx(a.Suspense,{fallback:e.jsx("p",{className:"text-sm whitespace-pre-wrap",children:t.text}),children:e.jsx(O,{children:t.text})}),e.jsx("p",{className:`text-[10px] mt-1 ${t.sender==="user"?"text-sky-200":"text-slate-500"}`,children:t.timestamp})]})},t.id)),o&&e.jsx("div",{className:"flex justify-start",children:e.jsx("div",{className:"bg-white text-[#0a1628] shadow-sm border border-[#dde3eb] rounded-2xl px-4 py-2.5 max-w-[75%]",children:e.jsxs("div",{className:"flex gap-1",children:[e.jsx("div",{className:"w-2 h-2 bg-sky-400 rounded-full animate-bounce"}),e.jsx("div",{className:"w-2 h-2 bg-sky-400 rounded-full animate-bounce [animation-delay:150ms]"}),e.jsx("div",{className:"w-2 h-2 bg-sky-400 rounded-full animate-bounce [animation-delay:300ms]"})]})})}),e.jsx("div",{ref:m})]}),e.jsx("div",{className:"p-4 border-t border-[#dde3eb] bg-white flex-shrink-0",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{id:"ai-tutor-input",name:"ai-tutor-input","aria-label":"Ask AI tutor a question",type:"text",value:i,onChange:t=>u(t.target.value),onKeyPress:t=>t.key==="Enter"&&h(),placeholder:"Ask me anything...",className:"flex-1 px-4 py-2.5 rounded-xl border border-[#dde3eb] focus:outline-none focus:ring-2 focus:ring-sky-500 text-sm bg-[#f7f9fc]"}),e.jsx("button",{type:"button","aria-label":"Send message",onClick:h,className:"p-2.5 bg-sky-600 hover:bg-sky-700 text-white rounded-xl transition-colors disabled:opacity-50 disabled:cursor-not-allowed",disabled:!i.trim()||o,children:e.jsx(M,{size:18})})]})})]}),e.jsx("div",{className:"pointer-events-auto relative self-end",children:l?e.jsx(f.button,{type:"button",onClick:z,whileHover:{scale:1.08},whileTap:{scale:.95},transition:{duration:.15,ease:"easeOut"},className:"h-9 w-9 rounded-full bg-slate-900/85 text-white shadow-lg ring-1 ring-white/20 backdrop-blur-sm flex items-center justify-center","aria-label":"Restore AI tutor launcher",title:"Show AI tutor",style:{willChange:"transform"},children:e.jsx(A,{size:14})}):e.jsxs("div",{className:"relative group",children:[!s&&e.jsxs("div",{className:"absolute right-full mr-4 top-1/2 -translate-y-1/2 px-4 py-2 bg-slate-800 text-white text-sm rounded-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none whitespace-nowrap shadow-xl z-50",children:["Hello! I'm L.O.L.I., how may I help you?",e.jsx("div",{className:"absolute top-1/2 -translate-y-1/2 -right-1 w-3 h-3 bg-slate-800 rotate-45"})]}),!s&&e.jsx("button",{type:"button","aria-label":"Minimize AI tutor launcher",title:"Minimize",onClick:p,className:"absolute -top-2 -left-2 z-10 h-6 w-6 rounded-full bg-white text-slate-700 border border-slate-200 shadow-md hover:bg-slate-100 transition-colors flex items-center justify-center",children:e.jsx(b,{size:12})}),e.jsx(f.button,{type:"button",onClick:()=>r(!s),whileHover:{scale:1.1},whileTap:{scale:.9},transition:{duration:.15,ease:"easeOut"},className:"w-16 h-16 bg-gradient-to-br from-sky-600 to-sky-500 rounded-xl shadow-2xl flex items-center justify-center text-white hover:shadow-sky-300/50 transition-all","aria-label":s?"Close AI tutor chat":"Open AI tutor chat",style:{willChange:"transform"},children:s?e.jsx(w,{size:28}):e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"AI Tutor",className:"w-14 h-14 object-contain drop-shadow-lg"})})]})})]})};export{Q as default}; diff --git a/assets/GradesPage-OZOkejf2.js b/assets/GradesPage-BANrJIHK.js similarity index 96% rename from assets/GradesPage-OZOkejf2.js rename to assets/GradesPage-BANrJIHK.js index a882f87626fc0167e764ca861f09ac7225a7862b..f06c97dc00c443ae8e87ca6025644ef7d7959588 100644 --- a/assets/GradesPage-OZOkejf2.js +++ b/assets/GradesPage-BANrJIHK.js @@ -1,2 +1,2 @@ -import{r as i,j as e}from"./vendor-react-B4AQeu28.js";import{B as v}from"./button-BSRmUN27.js";import{u as Y,l as J}from"./index-fWY85Kyg.js";import{g as K,S as R}from"./subjects-BlAP40QQ.js";import{u as X}from"./useCurriculum-DKgroDSx.js";import{C as Z}from"./calendar-ClpJmmLI.js";import{D as q}from"./download-Dl_jNVXs.js";import{A as ee}from"./award-DBHp-ybd.js";import{T as D}from"./target-B6MOj4Ln.js";import{T as L}from"./trending-up-Do7UgIZi.js";import{F as M}from"./funnel-DjeGbYf2.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-markdown-yqZQ_iQm.js";import"./chart-column-V8fKqOo0.js";const we=()=>{const{currentUser:c,userProfile:w}=Y(),[o,N]=i.useState("all"),[m,Q]=i.useState("all"),[F,y]=i.useState(!0),[u,U]=i.useState(null),S=w?.grade,_=K(S),k=new Set(_),{isLoading:A,refetch:T}=X(S);i.useEffect(()=>{A||(console.log("[GradesPage] Curriculum ready"),T())},[A,T]);const O=t=>{if(t==null)return"N/A";const s=t instanceof Date?t:new Date(t);return Number.isNaN(s.getTime())?"N/A":s.toISOString().split("T")[0]};i.useEffect(()=>{(async()=>{if(c){y(!0);try{const s=await J(c.uid);U(s)}catch(s){console.error("Failed to load progress for grades:",s)}finally{y(!1)}}})()},[c]);const C=u?.quizAttempts||[],G=u?.totalQuizzesCompleted||0,f=u?.averageScore||0,B=f>0?Math.min(f/25,4).toFixed(2):"0.00",I={"gen-math":"indigo","stats-prob":"violet"},z={indigo:{dot:"bg-indigo-500",bar:"bg-indigo-500"},violet:{dot:"bg-violet-500",bar:"bg-violet-500"},fuchsia:{dot:"bg-fuchsia-500",bar:"bg-fuchsia-500"},purple:{dot:"bg-purple-500",bar:"bg-purple-500"},slate:{dot:"bg-slate-500",bar:"bg-slate-500"}},g=R.reduce((t,s)=>(t[s.id]={label:s.name,color:I[s.id]||"slate"},t),{}),d=R.filter(t=>k.has(t.id)).map(t=>t.name),P=Object.entries(u?.subjects||{}).filter(([t])=>k.has(t)).map(([t,s])=>{const r=g[t]||{label:t,color:"slate"},l=C.filter(x=>x.quizId?.startsWith(t)),n=l.length>0?Math.round(l.reduce((x,b)=>x+b.score,0)/l.length):Math.round(s?.progress??0);return{subject:r.label,average:n,quizzes:l.length||s?.completedModules,color:r.color}}),H=_.map(t=>{const s=g[t]||{label:t,color:"slate"};return{subject:s.label,average:0,quizzes:0,color:s.color}}),E=P.length>0?P:H,$=C.slice().sort((t,s)=>new Date(s.completedAt).getTime()-new Date(t.completedAt).getTime()).slice(0,10).map((t,s)=>{const l=Object.entries(g).find(([n])=>t.quizId?.startsWith(n))?.[1]?.label||"General";return{id:s+1,title:t.quizId?.replace(/-/g," ").replace(/\b\w/g,n=>n.toUpperCase())||`Quiz ${s+1}`,subject:l,score:t.score,date:O(t.completedAt),type:t.quizId?.includes("practice")?"practice":"module",status:t.score>=80?"Excellent":t.score>=60?"Passing":"Needs Review"}}).filter(t=>d.includes(t.subject)),h=$.filter(t=>{if(!d.includes(t.subject))return!1;const s=o==="all"||t.subject===o,r=m==="all"||t.type===m;return s&&r});i.useEffect(()=>{o!=="all"&&(d.includes(o)||N("all"))},[d,o]);const V=()=>{const t=a=>{const j=String(a??"");return/[",\n]/.test(j)?`"${j.replace(/"/g,'""')}"`:j},s=[],r=w?.name||c?.displayName||c?.email||"Student",l=new Date().toISOString().split("T")[0];s.push("Grade Report"),s.push(`Student,${t(r)}`),s.push(`Export Date,${t(l)}`),s.push(`Subject Filter,${t(o)}`),s.push(`Type Filter,${t(m)}`),s.push(""),s.push("Subject Performance"),s.push("Subject,Average Score"),E.forEach(a=>{s.push([t(a.subject),t(a.average)].join(","))}),s.push(""),s.push("Recent Quizzes"),s.push("Title,Subject,Score,Date,Type,Status"),h.length===0?s.push("No quiz data available for the selected filters"):h.forEach(a=>{s.push([t(a.title),t(a.subject),t(a.score),t(a.date),t(a.type),t(a.status)].join(","))});const n=s.join(` +import{r as i,j as e}from"./vendor-react-B4AQeu28.js";import{B as v}from"./button-C6pFOjcg.js";import{u as Y,l as J}from"./index-Du57tmo9.js";import{g as K,S as R}from"./subjects-DLaBFkP9.js";import{u as X}from"./useCurriculum-7SWvm23j.js";import{C as Z}from"./calendar-DguKdDEr.js";import{D as q}from"./download-VEXmhhD6.js";import{A as ee}from"./award-ZQxHm68j.js";import{T as D}from"./target-B_JwHjFq.js";import{T as L}from"./trending-up-BgWHLAjl.js";import{F as M}from"./funnel-N-2rOOix.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-markdown-yqZQ_iQm.js";import"./chart-column-Cqncpeum.js";const we=()=>{const{currentUser:c,userProfile:w}=Y(),[o,N]=i.useState("all"),[m,Q]=i.useState("all"),[F,y]=i.useState(!0),[u,U]=i.useState(null),S=w?.grade,_=K(S),k=new Set(_),{isLoading:A,refetch:T}=X(S);i.useEffect(()=>{A||(console.log("[GradesPage] Curriculum ready"),T())},[A,T]);const O=t=>{if(t==null)return"N/A";const s=t instanceof Date?t:new Date(t);return Number.isNaN(s.getTime())?"N/A":s.toISOString().split("T")[0]};i.useEffect(()=>{(async()=>{if(c){y(!0);try{const s=await J(c.uid);U(s)}catch(s){console.error("Failed to load progress for grades:",s)}finally{y(!1)}}})()},[c]);const C=u?.quizAttempts||[],G=u?.totalQuizzesCompleted||0,f=u?.averageScore||0,B=f>0?Math.min(f/25,4).toFixed(2):"0.00",I={"gen-math":"indigo","stats-prob":"violet"},z={indigo:{dot:"bg-indigo-500",bar:"bg-indigo-500"},violet:{dot:"bg-violet-500",bar:"bg-violet-500"},fuchsia:{dot:"bg-fuchsia-500",bar:"bg-fuchsia-500"},purple:{dot:"bg-purple-500",bar:"bg-purple-500"},slate:{dot:"bg-slate-500",bar:"bg-slate-500"}},g=R.reduce((t,s)=>(t[s.id]={label:s.name,color:I[s.id]||"slate"},t),{}),d=R.filter(t=>k.has(t.id)).map(t=>t.name),P=Object.entries(u?.subjects||{}).filter(([t])=>k.has(t)).map(([t,s])=>{const r=g[t]||{label:t,color:"slate"},l=C.filter(x=>x.quizId?.startsWith(t)),n=l.length>0?Math.round(l.reduce((x,b)=>x+b.score,0)/l.length):Math.round(s?.progress??0);return{subject:r.label,average:n,quizzes:l.length||s?.completedModules,color:r.color}}),H=_.map(t=>{const s=g[t]||{label:t,color:"slate"};return{subject:s.label,average:0,quizzes:0,color:s.color}}),E=P.length>0?P:H,$=C.slice().sort((t,s)=>new Date(s.completedAt).getTime()-new Date(t.completedAt).getTime()).slice(0,10).map((t,s)=>{const l=Object.entries(g).find(([n])=>t.quizId?.startsWith(n))?.[1]?.label||"General";return{id:s+1,title:t.quizId?.replace(/-/g," ").replace(/\b\w/g,n=>n.toUpperCase())||`Quiz ${s+1}`,subject:l,score:t.score,date:O(t.completedAt),type:t.quizId?.includes("practice")?"practice":"module",status:t.score>=80?"Excellent":t.score>=60?"Passing":"Needs Review"}}).filter(t=>d.includes(t.subject)),h=$.filter(t=>{if(!d.includes(t.subject))return!1;const s=o==="all"||t.subject===o,r=m==="all"||t.type===m;return s&&r});i.useEffect(()=>{o!=="all"&&(d.includes(o)||N("all"))},[d,o]);const V=()=>{const t=a=>{const j=String(a??"");return/[",\n]/.test(j)?`"${j.replace(/"/g,'""')}"`:j},s=[],r=w?.name||c?.displayName||c?.email||"Student",l=new Date().toISOString().split("T")[0];s.push("Grade Report"),s.push(`Student,${t(r)}`),s.push(`Export Date,${t(l)}`),s.push(`Subject Filter,${t(o)}`),s.push(`Type Filter,${t(m)}`),s.push(""),s.push("Subject Performance"),s.push("Subject,Average Score"),E.forEach(a=>{s.push([t(a.subject),t(a.average)].join(","))}),s.push(""),s.push("Recent Quizzes"),s.push("Title,Subject,Score,Date,Type,Status"),h.length===0?s.push("No quiz data available for the selected filters"):h.forEach(a=>{s.push([t(a.title),t(a.subject),t(a.score),t(a.date),t(a.type),t(a.status)].join(","))});const n=s.join(` `),x=new Blob([n],{type:"text/csv;charset=utf-8;"}),b=window.URL.createObjectURL(x),p=document.createElement("a"),W=r.replace(/[^a-z0-9]+/gi,"-").replace(/^-+|-+$/g,"").toLowerCase()||"student";p.href=b,p.setAttribute("download",`grade-report-${W}-${l}.csv`),document.body.appendChild(p),p.click(),document.body.removeChild(p),window.URL.revokeObjectURL(b)};return F?e.jsx("div",{className:"p-8 flex justify-center items-center h-full",children:e.jsx("div",{className:"w-10 h-10 border-4 border-indigo-500 border-t-transparent rounded-full animate-spin"})}):e.jsxs("div",{className:"p-4 sm:p-6 lg:p-8 space-y-8 max-w-7xl mx-auto",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4 bg-white p-6 rounded-[2rem] shadow-[0_8px_30px_-12px_rgba(0,0,0,0.06)] border border-slate-50",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-display font-black text-slate-800 tracking-tight",children:"Assessment"}),e.jsx("p",{className:"text-slate-400 font-bold mt-1 text-[13px]",children:"Review your performance across subjects"})]}),e.jsxs("div",{className:"flex gap-3 w-full sm:w-auto",children:[e.jsxs(v,{variant:"outline",className:"flex-1 sm:flex-none border-slate-200 text-slate-500 font-bold rounded-xl h-11 px-5 hover:bg-slate-50 hover:text-slate-700",children:[e.jsx(Z,{className:"w-4 h-4 mr-2 text-slate-400"}),"This Semester"]}),e.jsxs(v,{className:"flex-1 sm:flex-none bg-indigo-600 hover:bg-indigo-700 text-white font-bold rounded-xl h-11 px-5 shadow-[0_8px_20px_-8px_rgba(79,70,229,0.5)] hover:-translate-y-0.5 transition-all",onClick:V,children:[e.jsx(q,{className:"w-4 h-4 mr-2"}),"Report"]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"bg-white rounded-[2rem] border border-slate-100 p-6 sm:p-8 shadow-[0_8px_24px_-10px_rgba(0,0,0,0.05)] relative overflow-hidden group hover:border-indigo-100 transition-colors",children:[e.jsx("div",{className:"absolute -right-8 -top-8 w-32 h-32 bg-indigo-50 rounded-full group-hover:scale-110 transition-transform duration-500"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-14 h-14 bg-indigo-100 text-indigo-600 rounded-2xl flex items-center justify-center mb-6 shadow-sm",children:e.jsx(ee,{className:"w-7 h-7"})}),e.jsx("p",{className:"text-slate-400 font-bold text-sm tracking-wide uppercase",children:"Overall GPA"}),e.jsx("div",{className:"flex items-end gap-2 mt-2",children:e.jsx("h3",{className:"text-4xl font-display font-black text-slate-800",children:B})})]})]}),e.jsxs("div",{className:"bg-white rounded-[2rem] border border-slate-100 p-6 sm:p-8 shadow-[0_8px_24px_-10px_rgba(0,0,0,0.05)] relative overflow-hidden group hover:border-emerald-100 transition-colors",children:[e.jsx("div",{className:"absolute -right-8 -top-8 w-32 h-32 bg-emerald-50 rounded-full group-hover:scale-110 transition-transform duration-500"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-14 h-14 bg-emerald-100 text-emerald-600 rounded-2xl flex items-center justify-center mb-6 shadow-sm",children:e.jsx(D,{className:"w-7 h-7"})}),e.jsx("p",{className:"text-slate-400 font-bold text-sm tracking-wide uppercase",children:"Average Score"}),e.jsx("div",{className:"flex items-end gap-2 mt-2",children:e.jsxs("h3",{className:"text-4xl font-display font-black text-slate-800",children:[f,"%"]})})]})]}),e.jsxs("div",{className:"bg-white rounded-[2rem] border border-slate-100 p-6 sm:p-8 shadow-[0_8px_24px_-10px_rgba(0,0,0,0.05)] relative overflow-hidden group hover:border-violet-100 transition-colors",children:[e.jsx("div",{className:"absolute -right-8 -top-8 w-32 h-32 bg-violet-50 rounded-full group-hover:scale-110 transition-transform duration-500"}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-14 h-14 bg-violet-100 text-violet-600 rounded-2xl flex items-center justify-center mb-6 shadow-sm",children:e.jsx(L,{className:"w-7 h-7"})}),e.jsx("p",{className:"text-slate-400 font-bold text-sm tracking-wide uppercase",children:"Quizzes Completed"}),e.jsx("div",{className:"flex items-end gap-2 mt-2",children:e.jsx("h3",{className:"text-4xl font-display font-black text-slate-800",children:G})})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[e.jsx("div",{className:"lg:col-span-2",children:e.jsxs("div",{className:"bg-white rounded-[2rem] border border-slate-100 shadow-[0_8px_30px_-12px_rgba(0,0,0,0.06)] overflow-hidden flex flex-col h-full",children:[e.jsxs("div",{className:"p-6 sm:p-8 border-b border-slate-50 flex flex-col sm:flex-row justify-between items-start sm:items-center gap-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-display font-black text-xl text-slate-800",children:"Recent Assessments"}),e.jsx("p",{className:"text-slate-400 font-bold text-[13px] mt-1",children:"Your latest quiz and practice results"})]}),e.jsxs("div",{className:"flex items-center gap-3 w-full sm:w-auto",children:[e.jsxs("div",{className:"relative flex-1 sm:flex-none",children:[e.jsxs("select",{value:o,onChange:t=>N(t.target.value),className:"appearance-none w-full pl-4 pr-10 py-2.5 border-none bg-slate-50 rounded-xl text-sm font-bold text-slate-600 focus:ring-2 focus:ring-indigo-500/30 transition-all cursor-pointer min-w-[140px] shadow-sm",children:[e.jsx("option",{value:"all",children:"All Subjects"}),d.map(t=>e.jsx("option",{value:t,children:t},t))]}),e.jsx(M,{className:"w-4 h-4 text-slate-400 absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none"})]}),e.jsxs("div",{className:"relative flex-1 sm:flex-none",children:[e.jsxs("select",{value:m,onChange:t=>Q(t.target.value),className:"appearance-none w-full pl-4 pr-10 py-2.5 border-none bg-slate-50 rounded-xl text-sm font-bold text-slate-600 focus:ring-2 focus:ring-indigo-500/30 transition-all cursor-pointer min-w-[120px] shadow-sm",children:[e.jsx("option",{value:"all",children:"All Types"}),e.jsx("option",{value:"module",children:"Module Quiz"}),e.jsx("option",{value:"practice",children:"Practice"})]}),e.jsx(M,{className:"w-4 h-4 text-slate-400 absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none"})]})]})]}),e.jsx("div",{className:"overflow-x-auto flex-1 p-2",children:e.jsxs("table",{className:"w-full text-left border-separate border-spacing-y-2 px-4 sm:px-6 mb-4",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-3 text-[11px] font-bold text-slate-400 uppercase tracking-wider border-b border-transparent",children:"Assessment"}),e.jsx("th",{className:"px-4 py-3 text-[11px] font-bold text-slate-400 uppercase tracking-wider border-b border-transparent min-w-[120px]",children:"Subject"}),e.jsx("th",{className:"px-4 py-3 text-[11px] font-bold text-slate-400 uppercase tracking-wider border-b border-transparent",children:"Type"}),e.jsx("th",{className:"px-4 py-3 text-[11px] font-bold text-slate-400 uppercase tracking-wider text-right border-b border-transparent",children:"Score"})]})}),e.jsx("tbody",{children:h.length>0?h.map(t=>e.jsxs("tr",{className:"group hover:bg-slate-50/70 transition-colors",children:[e.jsxs("td",{className:"px-4 py-4 rounded-l-2xl",children:[e.jsx("p",{className:"text-[14px] font-bold text-slate-800",children:t.title}),e.jsx("p",{className:"text-[11px] font-bold text-slate-400 mt-1",children:t.date})]}),e.jsx("td",{className:"px-4 py-4",children:e.jsx("span",{className:"inline-flex flex-col gap-1 items-start",children:e.jsx("span",{className:"text-[13px] font-bold text-slate-600 truncate max-w-[140px] block",children:t.subject})})}),e.jsx("td",{className:"px-4 py-4",children:e.jsx("span",{className:`inline-flex items-center px-3 py-1.5 rounded-lg text-[11px] font-bold uppercase tracking-wide ${t.type==="practice"?"bg-emerald-100/50 text-emerald-600":"bg-indigo-100/50 text-indigo-600"}`,children:t.type==="practice"?"Practice":"Quiz"})}),e.jsx("td",{className:"px-4 py-4 text-right rounded-r-2xl",children:e.jsxs("span",{className:`inline-flex items-center px-3 py-1.5 rounded-xl text-[13px] font-black ${t.score>=80?"bg-emerald-100 text-emerald-700":t.score>=60?"bg-amber-100 text-amber-700":"bg-rose-100 text-rose-700"}`,children:[t.score,"%"]})})]},t.id)):e.jsx("tr",{children:e.jsx("td",{colSpan:4,className:"px-6 py-16 text-center",children:e.jsxs("div",{className:"flex flex-col items-center justify-center",children:[e.jsx("div",{className:"w-16 h-16 bg-slate-50 rounded-full flex items-center justify-center mb-4",children:e.jsx(D,{className:"w-8 h-8 text-slate-300"})}),e.jsx("p",{className:"text-slate-500 font-bold text-sm",children:"No recent assessments match the selected filters."})]})})})})]})})]})}),e.jsxs("div",{className:"space-y-6 lg:space-y-8 flex flex-col",children:[e.jsxs("div",{className:"bg-white rounded-[2rem] border border-slate-100 p-6 sm:p-8 shadow-[0_8px_30px_-12px_rgba(0,0,0,0.06)]",children:[e.jsx("div",{className:"flex items-center justify-between mb-8",children:e.jsx("h3",{className:"font-display font-black text-lg text-slate-800",children:"Subject Performance"})}),e.jsx("div",{className:"space-y-7",children:E.map((t,s)=>{const r=z[t.color]||z.slate;return e.jsxs("div",{className:"group",children:[e.jsxs("div",{className:"flex justify-between items-end mb-3",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-[14px] font-bold text-slate-800 flex items-center gap-2",children:[e.jsx("span",{className:`w-2 h-2 rounded-full ${r.dot} group-hover:scale-125 transition-transform`}),t.subject]}),e.jsxs("p",{className:"text-[11px] text-slate-400 font-bold ml-4 mt-0.5",children:[t.quizzes," activities"]})]}),e.jsxs("span",{className:"text-[15px] font-black text-slate-800",children:[t.average,"%"]})]}),e.jsx("div",{className:"h-2.5 w-full bg-slate-100 rounded-full overflow-hidden shadow-inner",children:e.jsx("div",{className:`h-full rounded-full e-w ${r.bar} shadow-sm relative overflow-hidden transition-all duration-1000`,style:{"--w":`${Math.max(t.average,5)}%`},children:e.jsx("div",{className:"absolute inset-0 bg-white/20 w-1/2 -skew-x-12 translate-x-[-100%] group-hover:animate-[shimmer_1.5s_ease-out]"})})})]},s)})})]}),e.jsxs("div",{className:"relative bg-gradient-to-br from-indigo-600 to-violet-700 rounded-[2rem] p-6 sm:p-8 shadow-[0_12px_30px_-10px_rgba(79,70,229,0.5)] text-white overflow-hidden group",children:[e.jsx("div",{className:"absolute top-0 right-0 w-48 h-48 bg-white/10 rounded-full blur-3xl -mt-10 -mr-10 group-hover:bg-white/20 transition-all duration-700 ease-in-out"}),e.jsx("div",{className:"absolute bottom-0 left-0 w-32 h-32 bg-indigo-400/30 rounded-full blur-2xl -mb-10 -ml-10"}),e.jsxs("div",{className:"relative z-10",children:[e.jsx("div",{className:"w-12 h-12 bg-white/10 rounded-2xl flex items-center justify-center mb-5 backdrop-blur-sm border border-white/20 shadow-sm group-hover:scale-110 transition-transform",children:e.jsx(L,{className:"w-6 h-6 text-white"})}),e.jsx("h3",{className:"text-2xl font-display font-black tracking-tight mb-2 leading-tight",children:"Keep up the momentum!"}),e.jsxs("p",{className:"text-white/80 text-[13px] font-medium leading-relaxed mb-8 max-w-[90%]",children:["You've completed ",e.jsx("span",{className:"font-black text-white",children:$.length})," activities recently. Try a practice session to boost your lowest scores."]}),e.jsx(v,{className:"w-full bg-white text-indigo-600 hover:bg-slate-50 border-0 font-black h-12 rounded-xl shadow-[0_8px_16px_rgba(0,0,0,0.15)] hover:shadow-[0_8px_24px_rgba(0,0,0,0.2)] hover:-translate-y-0.5 transition-all",children:"Start Practice Session"})]})]})]})]})]})};export{we as default}; diff --git a/assets/HeroBanner-B-jp-_T1.js b/assets/HeroBanner-C7eH_2x2.js similarity index 97% rename from assets/HeroBanner-B-jp-_T1.js rename to assets/HeroBanner-C7eH_2x2.js index 3792f104fd25a6ed5bc79b244c45ab8c9d6e526d..3de8c310b90275ddd4f54e224e9ba82e2df9c28c 100644 --- a/assets/HeroBanner-B-jp-_T1.js +++ b/assets/HeroBanner-C7eH_2x2.js @@ -1,5 +1,5 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardAvatar-CbAKGmA6.js","assets/vendor-react-B4AQeu28.js","assets/avatarData-BuQSOXo3.js"])))=>i.map(i=>d[i]); -import{c as x,m as t,Z as c,A as p,_ as b}from"./index-fWY85Kyg.js";import{j as e,r}from"./vendor-react-B4AQeu28.js";import{B as h}from"./brain-COga8OrM.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";/** +import{c as x,m as t,Z as c,A as p,_ as b}from"./index-Du57tmo9.js";import{j as e,r}from"./vendor-react-B4AQeu28.js";import{B as h}from"./brain-CEG2uNCc.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/InitialAssessmentModal-B6OcOqjq.js b/assets/InitialAssessmentModal-CKoRHDsn.js similarity index 94% rename from assets/InitialAssessmentModal-B6OcOqjq.js rename to assets/InitialAssessmentModal-CKoRHDsn.js index 8badbdbc3711b9bfabf50034b05cb5682e346627..21ebf3258ed7b299d75f04680fafe74876a9399a 100644 --- a/assets/InitialAssessmentModal-B6OcOqjq.js +++ b/assets/InitialAssessmentModal-CKoRHDsn.js @@ -1 +1 @@ -import{r as c,j as e}from"./vendor-react-B4AQeu28.js";import{B as g}from"./button-BSRmUN27.js";import{g as b}from"./diagnosticService-BbwguGxN.js";import{s as j,d as y,a as N}from"./vendor-firebase-firestore-52DD1vc9.js";import{m,T as v,d as w}from"./index-fWY85Kyg.js";import{B as k}from"./brain-COga8OrM.js";import{C as L}from"./circle-check-big-Qn5jJKfH.js";import{L as z}from"./loader-circle-id_hZlNw.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-markdown-yqZQ_iQm.js";const W=({isOpen:x,onClose:a,userId:r,strand:i,gradeLevel:l,onAssessmentStart:p})=>{const[s,o]=c.useState(!1),[n,d]=c.useState(null),u=async()=>{o(!0),d(null);try{const t=await b(i,l);sessionStorage.setItem("mathpulse_diagnostic",JSON.stringify({testId:t.test_id,questions:t.questions,totalItems:t.total_items,estimatedMinutes:t.estimated_minutes})),p(t.test_id,t.questions)}catch(t){const f=t instanceof Error?t.message:"Failed to load assessment";d(f),o(!1)}},h=async()=>{try{await j(y(w,"diagnosticResults",r),{userId:r,status:"skipped",skippedAt:N(),strand:i,gradeLevel:l})}catch(t){console.error("[diagnostic] Failed to save skip state:",t)}a()};return x?e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm",onClick:a,children:e.jsxs(m.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{type:"spring",damping:25,stiffness:200},className:"bg-white rounded-2xl shadow-2xl max-w-[36rem] w-full flex flex-col overflow-hidden pointer-events-auto",onClick:t=>t.stopPropagation(),style:{willChange:"transform, opacity"},children:[e.jsx("div",{className:"px-5 py-3 border-b border-[#dde3eb] flex items-center justify-between bg-[#edf1f7] flex-shrink-0",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 bg-purple-100 rounded-lg flex items-center justify-center text-purple-600",children:e.jsx(k,{size:18})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-bold text-[#0a1628] leading-tight",children:"Initial Assessment"}),e.jsx("p",{className:"text-[11px] text-[#5a6578]",children:"Analyze your strengths & weaknesses"})]})]})}),e.jsx("div",{className:"p-5 text-center space-y-3",children:e.jsxs(m.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut"},children:[e.jsx("div",{className:"w-20 h-20 bg-purple-50 rounded-full flex items-center justify-center mx-auto mb-3",children:e.jsx("svg",{className:"w-9 h-9 text-purple-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 00-2.455 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 00-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 001.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 001.423 1.423l1.183.394-1.183.394a2.25 2.25 0 00-1.423 1.423z"})})}),e.jsx("h3",{className:"text-lg font-bold text-[#0a1628]",children:"Welcome to MathPulse AI!"}),e.jsx("p",{className:"text-[13px] text-[#5a6578] max-w-[19rem] mx-auto leading-relaxed",children:"To personalize your learning path, complete a DepEd competency-based SHS diagnostic (15 items, around 11.6 minutes)."}),e.jsxs("div",{className:"grid grid-cols-2 gap-2.5 max-w-[22rem] mx-auto text-left mt-4",children:[e.jsxs("div",{className:"bg-[#edf1f7] p-2.5 rounded-lg border border-[#dde3eb]",children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-[13px] text-[#0a1628] mb-1",children:[e.jsx(L,{size:14,className:"text-teal-500"}),"Personalized Path"]}),e.jsx("p",{className:"text-[10px] text-[#5a6578] pl-[18px]",children:"Get recommendations based on your level."})]}),e.jsxs("div",{className:"bg-[#edf1f7] p-2.5 rounded-lg border border-[#dde3eb]",children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-[13px] text-[#0a1628] mb-1",children:[e.jsx(v,{size:14,className:"text-rose-500"}),"Identify Risks"]}),e.jsx("p",{className:"text-[10px] text-[#5a6578] pl-[18px]",children:"Spot areas that need more attention early."})]})]}),n&&e.jsx("div",{className:"mt-3 p-2.5 bg-red-50 border border-red-200 rounded-lg",children:e.jsx("p",{className:"text-xs text-red-700",children:n})}),e.jsxs("div",{className:"pt-3 space-y-2.5",children:[e.jsx(g,{onClick:u,disabled:s,className:"bg-gradient-to-r from-purple-600 to-purple-500 hover:from-purple-700 hover:to-purple-600 text-white px-5 py-3 rounded-xl text-sm font-bold shadow-lg shadow-purple-200 w-full max-w-[190px] mx-auto",children:s?e.jsxs(e.Fragment,{children:[e.jsx(z,{size:16,className:"animate-spin mr-2"}),"Crafting your assessment..."]}):"Start Assessment"}),s&&e.jsx("p",{className:"text-[10px] text-slate-400 max-w-[18rem] mx-auto text-center leading-relaxed",children:"This may take up to 90 seconds while AI generates your personalized test."}),!s&&e.jsx("button",{onClick:h,disabled:s,className:"block mx-auto text-xs text-slate-500 hover:text-[#5a6578] transition-colors font-medium disabled:opacity-40",children:"Skip for now →"})]})]})})]})}):null};export{W as default}; +import{r as c,j as e}from"./vendor-react-B4AQeu28.js";import{B as g}from"./button-C6pFOjcg.js";import{g as b}from"./diagnosticService-EjsgXhrt.js";import{s as j,d as y,a as N}from"./vendor-firebase-firestore-52DD1vc9.js";import{m,T as v,d as w}from"./index-Du57tmo9.js";import{B as k}from"./brain-CEG2uNCc.js";import{C as L}from"./circle-check-big-DC9utj0Y.js";import{L as z}from"./loader-circle-Bluo8e0c.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-markdown-yqZQ_iQm.js";const W=({isOpen:x,onClose:a,userId:r,strand:i,gradeLevel:l,onAssessmentStart:p})=>{const[s,o]=c.useState(!1),[n,d]=c.useState(null),u=async()=>{o(!0),d(null);try{const t=await b(i,l);sessionStorage.setItem("mathpulse_diagnostic",JSON.stringify({testId:t.test_id,questions:t.questions,totalItems:t.total_items,estimatedMinutes:t.estimated_minutes})),p(t.test_id,t.questions)}catch(t){const f=t instanceof Error?t.message:"Failed to load assessment";d(f),o(!1)}},h=async()=>{try{await j(y(w,"diagnosticResults",r),{userId:r,status:"skipped",skippedAt:N(),strand:i,gradeLevel:l})}catch(t){console.error("[diagnostic] Failed to save skip state:",t)}a()};return x?e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm",onClick:a,children:e.jsxs(m.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{type:"spring",damping:25,stiffness:200},className:"bg-white rounded-2xl shadow-2xl max-w-[36rem] w-full flex flex-col overflow-hidden pointer-events-auto",onClick:t=>t.stopPropagation(),style:{willChange:"transform, opacity"},children:[e.jsx("div",{className:"px-5 py-3 border-b border-[#dde3eb] flex items-center justify-between bg-[#edf1f7] flex-shrink-0",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 bg-purple-100 rounded-lg flex items-center justify-center text-purple-600",children:e.jsx(k,{size:18})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-base font-bold text-[#0a1628] leading-tight",children:"Initial Assessment"}),e.jsx("p",{className:"text-[11px] text-[#5a6578]",children:"Analyze your strengths & weaknesses"})]})]})}),e.jsx("div",{className:"p-5 text-center space-y-3",children:e.jsxs(m.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut"},children:[e.jsx("div",{className:"w-20 h-20 bg-purple-50 rounded-full flex items-center justify-center mx-auto mb-3",children:e.jsx("svg",{className:"w-9 h-9 text-purple-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 00-2.455 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 00-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 001.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 001.423 1.423l1.183.394-1.183.394a2.25 2.25 0 00-1.423 1.423z"})})}),e.jsx("h3",{className:"text-lg font-bold text-[#0a1628]",children:"Welcome to MathPulse AI!"}),e.jsx("p",{className:"text-[13px] text-[#5a6578] max-w-[19rem] mx-auto leading-relaxed",children:"To personalize your learning path, complete a DepEd competency-based SHS diagnostic (15 items, around 11.6 minutes)."}),e.jsxs("div",{className:"grid grid-cols-2 gap-2.5 max-w-[22rem] mx-auto text-left mt-4",children:[e.jsxs("div",{className:"bg-[#edf1f7] p-2.5 rounded-lg border border-[#dde3eb]",children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-[13px] text-[#0a1628] mb-1",children:[e.jsx(L,{size:14,className:"text-teal-500"}),"Personalized Path"]}),e.jsx("p",{className:"text-[10px] text-[#5a6578] pl-[18px]",children:"Get recommendations based on your level."})]}),e.jsxs("div",{className:"bg-[#edf1f7] p-2.5 rounded-lg border border-[#dde3eb]",children:[e.jsxs("div",{className:"flex items-center gap-1.5 font-bold text-[13px] text-[#0a1628] mb-1",children:[e.jsx(v,{size:14,className:"text-rose-500"}),"Identify Risks"]}),e.jsx("p",{className:"text-[10px] text-[#5a6578] pl-[18px]",children:"Spot areas that need more attention early."})]})]}),n&&e.jsx("div",{className:"mt-3 p-2.5 bg-red-50 border border-red-200 rounded-lg",children:e.jsx("p",{className:"text-xs text-red-700",children:n})}),e.jsxs("div",{className:"pt-3 space-y-2.5",children:[e.jsx(g,{onClick:u,disabled:s,className:"bg-gradient-to-r from-purple-600 to-purple-500 hover:from-purple-700 hover:to-purple-600 text-white px-5 py-3 rounded-xl text-sm font-bold shadow-lg shadow-purple-200 w-full max-w-[190px] mx-auto",children:s?e.jsxs(e.Fragment,{children:[e.jsx(z,{size:16,className:"animate-spin mr-2"}),"Crafting your assessment..."]}):"Start Assessment"}),s&&e.jsx("p",{className:"text-[10px] text-slate-400 max-w-[18rem] mx-auto text-center leading-relaxed",children:"This may take up to 90 seconds while AI generates your personalized test."}),!s&&e.jsx("button",{onClick:h,disabled:s,className:"block mx-auto text-xs text-slate-500 hover:text-[#5a6578] transition-colors font-medium disabled:opacity-40",children:"Skip for now →"})]})]})})]})}):null};export{W as default}; diff --git a/assets/LeaderboardPage-fMeUqEhL.js b/assets/LeaderboardPage-8P9vlsJH.js similarity index 97% rename from assets/LeaderboardPage-fMeUqEhL.js rename to assets/LeaderboardPage-8P9vlsJH.js index d910539ee6484bfa730dc08930f0cbb31111d053..7b9bd1a274c84f2e5bc6c3bca649b59e250fe02a 100644 --- a/assets/LeaderboardPage-fMeUqEhL.js +++ b/assets/LeaderboardPage-8P9vlsJH.js @@ -1,4 +1,4 @@ -import{r as l,j as e}from"./vendor-react-B4AQeu28.js";import{c as Y,an as O,h as U,m as x,F as B,E as T,u as H,ao as W}from"./index-fWY85Kyg.js";import{X as q}from"./x-BLLfAvOF.js";import{B as w}from"./book-open-D5mR6gz9.js";import{T as L}from"./target-B6MOj4Ln.js";import{A as y}from"./award-DBHp-ybd.js";import{C as $}from"./clock-BJCraYVD.js";import{T as h}from"./trophy-fJOOsc_0.js";import{T as P}from"./trending-up-Do7UgIZi.js";import{L as X}from"./loader-circle-id_hZlNw.js";import{S as G}from"./star-BKdRsvg1.js";import{R as K}from"./refresh-cw-Dr342wB2.js";import{U as E}from"./user-Cp86-wJG.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";/** +import{r as l,j as e}from"./vendor-react-B4AQeu28.js";import{c as Y,am as O,h as U,m as x,F as B,E as T,u as H,an as W}from"./index-Du57tmo9.js";import{X as q}from"./x-Cwkkamrh.js";import{B as w}from"./book-open-cmOvedFO.js";import{T as L}from"./target-B_JwHjFq.js";import{A as y}from"./award-ZQxHm68j.js";import{C as $}from"./clock-BtWjBj1h.js";import{T as h}from"./trophy-8udS7pQx.js";import{T as P}from"./trending-up-BgWHLAjl.js";import{L as X}from"./loader-circle-Bluo8e0c.js";import{S as G}from"./star-BBetp7Wf.js";import{R as K}from"./refresh-cw-BDWpfygR.js";import{U as E}from"./user-DPqSTqXe.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/LearningPath-D6nfM5qD.js b/assets/LearningPath-CnmA03m9.js similarity index 87% rename from assets/LearningPath-D6nfM5qD.js rename to assets/LearningPath-CnmA03m9.js index da440c07c3c6a9f4aca60389e40129f6e8f39713..63fd60300702fb0a206b713b0ccb02f6be2303ca 100644 --- a/assets/LearningPath-D6nfM5qD.js +++ b/assets/LearningPath-CnmA03m9.js @@ -1 +1 @@ -import{r as m,d as p,j as r}from"./vendor-react-B4AQeu28.js";import{u as j,J as P,K as I,l as N,A as k}from"./index-fWY85Kyg.js";import{M as L}from"./ModuleFolderCard-BJl0S3M8.js";import{B as S}from"./book-open-D5mR6gz9.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";import"./useSubjectAvailability-Wk6vHhYW.js";import"./clock-BJCraYVD.js";import"./lock-6q-juSdu.js";const U=({onNavigateToModules:c,atRiskSubjects:d=[],priorityTopics:o=[],modules:a})=>{const{userProfile:l}=j(),[u,h]=m.useState(null),i=p.useMemo(()=>{const e=o.length>0?o:d.map(s=>P(s)).filter(s=>s!==null),t=new Set;return e.filter(s=>t.has(s)?!1:(t.add(s),!0))},[o,d]),x=p.useMemo(()=>{if(i.length===0)return a.slice(0,3);const e=new Map(i.map((t,s)=>[I[t],s]));return[...a].sort((t,s)=>{const n=e.get(t.id)??Number.POSITIVE_INFINITY,b=e.get(s.id)??Number.POSITIVE_INFINITY;return n-b}).slice(0,3)},[a,i]);m.useEffect(()=>{l?.uid&&N(l.uid).then(h).catch(console.error)},[l?.uid]);const g=x.slice(0,3).map(e=>{const t=u?.subjects?.[e.subject]?.modulesProgress?.[e.id],s=e.lessons.length,n=t?.progress??(s>0?Math.round((t?.lessonsCompleted?.length||0)/s*100):0);return{...e,progress:n,status:n===100?"Completed":n>0?"In Progress":"Not Started"}}),f=g.some(e=>e.progress>0)?"Continue Learning":"Start Learning";return r.jsxs("div",{children:[r.jsxs("div",{className:"flex justify-between items-center mb-6 px-1",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-10 h-10 rounded-[14px] bg-indigo-50 border border-indigo-100 flex items-center justify-center text-indigo-500 shadow-inner",children:r.jsx(S,{size:20,strokeWidth:2.5})}),r.jsx("h2",{className:"font-display font-black text-[24px] text-slate-800 tracking-tight",children:f})]}),r.jsxs("button",{onClick:()=>c?.(),className:"text-primary font-bold text-sm flex items-center gap-1 hover:gap-2 transition-all bg-primary/10 px-4 py-2 rounded-xl hover:bg-primary/20",children:["View All ",r.jsx(k,{size:16})]})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 gap-6",children:g.map((e,t)=>r.jsx(L,{module:e,index:t,onClick:()=>c?.(e.id),isAtRisk:i.length>0,badgeLabel:e.status!=="Not Started"?e.status:void 0},e.id))})]})};export{U as default}; +import{r as m,d as p,j as r}from"./vendor-react-B4AQeu28.js";import{u as j,J as P,K as I,l as N,A as k}from"./index-Du57tmo9.js";import{M as L}from"./ModuleFolderCard-DFi0m1Zn.js";import{B as S}from"./book-open-cmOvedFO.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";import"./useSubjectAvailability-BhYsHQ11.js";import"./clock-BtWjBj1h.js";import"./lock-CtsU7Hj2.js";const U=({onNavigateToModules:c,atRiskSubjects:d=[],priorityTopics:o=[],modules:a})=>{const{userProfile:l}=j(),[u,h]=m.useState(null),i=p.useMemo(()=>{const e=o.length>0?o:d.map(s=>P(s)).filter(s=>s!==null),t=new Set;return e.filter(s=>t.has(s)?!1:(t.add(s),!0))},[o,d]),x=p.useMemo(()=>{if(i.length===0)return a.slice(0,3);const e=new Map(i.map((t,s)=>[I[t],s]));return[...a].sort((t,s)=>{const n=e.get(t.id)??Number.POSITIVE_INFINITY,b=e.get(s.id)??Number.POSITIVE_INFINITY;return n-b}).slice(0,3)},[a,i]);m.useEffect(()=>{l?.uid&&N(l.uid).then(h).catch(console.error)},[l?.uid]);const g=x.slice(0,3).map(e=>{const t=u?.subjects?.[e.subject]?.modulesProgress?.[e.id],s=e.lessons.length,n=t?.progress??(s>0?Math.round((t?.lessonsCompleted?.length||0)/s*100):0);return{...e,progress:n,status:n===100?"Completed":n>0?"In Progress":"Not Started"}}),f=g.some(e=>e.progress>0)?"Continue Learning":"Start Learning";return r.jsxs("div",{children:[r.jsxs("div",{className:"flex justify-between items-center mb-6 px-1",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-10 h-10 rounded-[14px] bg-indigo-50 border border-indigo-100 flex items-center justify-center text-indigo-500 shadow-inner",children:r.jsx(S,{size:20,strokeWidth:2.5})}),r.jsx("h2",{className:"font-display font-black text-[24px] text-slate-800 tracking-tight",children:f})]}),r.jsxs("button",{onClick:()=>c?.(),className:"text-primary font-bold text-sm flex items-center gap-1 hover:gap-2 transition-all bg-primary/10 px-4 py-2 rounded-xl hover:bg-primary/20",children:["View All ",r.jsx(k,{size:16})]})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 gap-6",children:g.map((e,t)=>r.jsx(L,{module:e,index:t,onClick:()=>c?.(e.id),isAtRisk:i.length>0,badgeLabel:e.status!=="Not Started"?e.status:void 0},e.id))})]})};export{U as default}; diff --git a/assets/LoginPage-C8bC1ar4.js b/assets/LoginPage-BmZHRSsl.js similarity index 96% rename from assets/LoginPage-C8bC1ar4.js rename to assets/LoginPage-BmZHRSsl.js index 42ffb8e890efdd5c40a7ff181fd8b13f94fcc20d..54f0f69dd613fdf7f109658799bc6831501ea1bb 100644 --- a/assets/LoginPage-C8bC1ar4.js +++ b/assets/LoginPage-BmZHRSsl.js @@ -1 +1 @@ -import{r as s,j as e}from"./vendor-react-B4AQeu28.js";import{B as Me}from"./button-BSRmUN27.js";import{I as D}from"./input-B3NSXxdz.js";import{m as r,A as te,s as se,a as Ee,b as ae}from"./index-fWY85Kyg.js";import{S as Te}from"./sparkles-BY90tCLG.js";import{B as Re}from"./brain-COga8OrM.js";import{T as Ce}from"./trending-up-Do7UgIZi.js";import{A as Ie}from"./award-DBHp-ybd.js";import{U as re}from"./users-CX_H_2cY.js";import{G as oe}from"./graduation-cap-B4Q4YTk8.js";import{B as ie}from"./book-open-D5mR6gz9.js";import{M as Le}from"./mail-BS9lcBqF.js";import{L as le}from"./lock-6q-juSdu.js";import{E as De,a as Be}from"./eye-DQlJQwuY.js";import{S as ze}from"./shield-check-DJHCbiaj.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-markdown-yqZQ_iQm.js";const ne="/assets/shader-bg-DA7bEbBA.mp4",qe=[{id:"length",label:"At least 8 characters",test:o=>o.length>=8},{id:"upper-lower",label:"Contains uppercase and lowercase letters",test:o=>/[A-Z]/.test(o)&&/[a-z]/.test(o)},{id:"number",label:"Contains at least one number",test:o=>/\d/.test(o)},{id:"special",label:"Contains at least one special character",test:o=>/[^A-Za-z0-9]/.test(o)}],B="Use at least 8 characters with uppercase, lowercase, number, and special character.",Oe=o=>{const c=typeof o=="object"&&o!==null?o:null,i=o instanceof Error?o.message:"";if(c?.code&&typeof c.code=="string")return{code:c.code.toLowerCase(),message:i};const d=i.match(/auth\/[a-z-]+/i);return{code:d?d[0].toLowerCase():"",message:i}},_e=o=>o.replace(/^Firebase:\s*/i,"").replace(/\s*\(auth\/[a-z-]+\)\.?/i,"").trim(),ce=(o,c)=>{const{code:i,message:d}=Oe(o),h=_e(d);return i==="auth/invalid-credential"||i==="auth/wrong-password"||i==="auth/user-not-found"?"Invalid email or password. Please check your credentials and try again.":i==="auth/email-already-in-use"?"This email is already registered. Please sign in instead.":i==="auth/weak-password"||i==="auth/password-does-not-meet-requirements"?h?`Password does not meet signup requirements. ${h}`:`Password does not meet signup requirements. ${B}`:i==="auth/too-many-requests"?"Access to this account has been temporarily disabled due to many failed login attempts. You can immediately restore it by resetting your password or you can try again later.":i==="auth/network-request-failed"?"Network error. Please check your internet connection and try again.":i.startsWith("auth/")?h||c:d.includes("Firebase:")||d.includes("auth/")?c:d||c},mt=()=>{const o=["Grade 11","Grade 12"],c={"Grade 11":["STEM A","STEM B","ABM A","HUMSS A"],"Grade 12":["STEM A","STEM B","ABM A","HUMSS A"]},i={teacher:["Mathematics","Science","English","Technology","Humanities"]},[d,h]=s.useState(""),[b,z]=s.useState(""),[A,de]=s.useState(!1),[l,q]=s.useState(!1),[M,me]=s.useState(""),[n,O]=s.useState("student"),[f,ue]=s.useState("Grade 11"),[w,_]=s.useState(c["Grade 11"][0]),[g,G]=s.useState("Mathematics"),[V,x]=s.useState(!1),[v,u]=s.useState(null),[pe,xe]=s.useState(!1),[ye,he]=s.useState(!1),[E,fe]=s.useState(16),[F,U]=s.useState("primary"),[$,T]=s.useState(0),R=s.useRef(null),C=s.useRef(null),N=pe&&ye,j=s.useRef("primary"),k=s.useRef(0),S=s.useRef(!1),W=1.1,H=.34,Y=t=>{const a=Math.max(0,Math.min(1,t));Math.abs(k.current-a)<.02||(k.current=a,T(a))},Z=t=>{!Number.isFinite(t)||t<=0||Math.abs(E-t)>.05&&fe(t)},I=s.useMemo(()=>qe.map(t=>({...t,met:t.test(b)})),[b]),be=s.useMemo(()=>I.every(t=>t.met),[I]),J=s.useMemo(()=>{if(!l||!v)return!1;const t=v.toLowerCase();return t.includes("password requirements not met")||t.includes("password does not meet")},[v,l]),ge=()=>{const t=R.current?.duration;t&&Number.isFinite(t)&&t>0&&Z(t)},ve=()=>{const t=C.current?.duration;t&&Number.isFinite(t)&&t>0&&Z(t)};s.useEffect(()=>{if(!N)return;const t=R.current,a=C.current;if(!t||!a)return;let m=!1,p=0;j.current="primary",U("primary"),S.current=!1,k.current=0,T(0),t.loop=!1,a.loop=!1,t.currentTime=0,a.currentTime=0,a.pause(),t.play().catch(()=>{});const P=()=>{if(m)return;const y=j.current==="primary"?t:a,K=j.current==="primary"?a:t,Pe=Number.isFinite(y.duration)&&y.duration>0?y.duration:E,L=Math.max(Pe-y.currentTime,0);if(L<=W){S.current||(S.current=!0,K.currentTime=0,K.play().catch(()=>{}));const Ae=1-L/W;if(Y(Ae),L<=.03||y.ended){y.pause(),y.currentTime=0;const ee=j.current==="primary"?"secondary":"primary";j.current=ee,U(ee),S.current=!1,k.current=0,T(0)}}else Y(0);p=window.requestAnimationFrame(P)};return p=window.requestAnimationFrame(P),()=>{m=!0,p&&window.cancelAnimationFrame(p)}},[E,N]);const Q=N?H*(1-$):0,X=N?H*$:0,je=F==="primary"?Q:X,we=F==="secondary"?Q:X;s.useEffect(()=>{n==="teacher"&&!i.teacher.includes(g)&&G(i.teacher[0])},[g,n]),s.useEffect(()=>{const t=c[f]||[];t.length>0&&!t.includes(w)&&_(t[0])},[f,w]);const Ne=[{label:"Student",role:"student",email:"teststudent@school.edu",password:"TestPass123!",icon:oe,color:"sky"},{label:"Teacher",role:"teacher",email:"testteacher@school.edu",password:"TestPass123!",icon:ie,color:"emerald"},{label:"Admin",role:"admin",email:"testadmin@school.edu",password:"TestPass123!",icon:ze,color:"rose"}],ke=async(t,a,m)=>{u(null),x(!0),h(t),z(a),O(m),q(!1);try{se(m),await ae(t,a)}catch(p){u(ce(p,"Demo sign-in failed. Please try again.")),x(!1)}},Se=async t=>{t.preventDefault(),u(null),x(!0);try{if(l){if(!M.trim()){u("Please enter your name"),x(!1);return}if(n==="student"&&!f){u("Please select a grade level"),x(!1);return}if(n!=="student"&&!g){u("Please select a department"),x(!1);return}if(n==="admin"){u("Admin account creation is restricted. Please contact an existing administrator."),x(!1);return}if(!be){u(`Password does not meet signup requirements. ${B}`),x(!1);return}se(n),await Ee(d,b,M,n,n==="student"?{grade:f,section:w}:{department:g})}else await ae(d,b)}catch(a){const m=l?`Sign-up failed. ${B}`:"Sign-in failed. Please check your credentials and try again.";u(ce(a,m)),x(!1)}};return e.jsxs("div",{className:"h-screen w-full flex items-center justify-center px-6 overflow-hidden relative login-bg",children:[e.jsx("video",{ref:R,autoPlay:!0,muted:!0,playsInline:!0,preload:"auto",onCanPlay:()=>xe(!0),onLoadedMetadata:ge,className:"absolute inset-0 w-full h-full object-cover transition-opacity duration-150 e-opacity",style:{"--o":je},src:ne}),e.jsx("video",{ref:C,autoPlay:!0,muted:!0,playsInline:!0,preload:"auto",onCanPlay:()=>he(!0),onLoadedMetadata:ve,className:"absolute inset-0 w-full h-full object-cover transition-opacity duration-150 e-opacity",style:{"--o":we},src:ne}),e.jsx("div",{className:"absolute inset-0 pointer-events-none login-frost-overlay"}),e.jsx("div",{className:"absolute top-[10%] left-[-10%] w-[60%] h-[60%] rounded-full blur-[140px] pointer-events-none mix-blend-multiply login-orb-purple"}),e.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] w-[70%] h-[70%] rounded-full blur-[160px] pointer-events-none mix-blend-multiply login-orb-pink"}),e.jsx("div",{className:"absolute top-[40%] left-[40%] w-[40%] h-[40%] rounded-full blur-[120px] pointer-events-none mix-blend-screen login-orb-blue"}),e.jsx("div",{className:"relative z-10 w-full max-w-6xl mx-auto",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 lg:gap-12 items-center",children:[e.jsxs(r.div,{initial:{opacity:0,x:-40},animate:{opacity:1,x:0},transition:{duration:.8,ease:[.22,1,.36,1]},className:"flex flex-col justify-center space-y-8",children:[e.jsxs(r.div,{className:"flex items-center gap-2.5",children:[e.jsx(r.div,{className:"relative flex items-center justify-center drop-shadow-md",children:e.jsx("img",{src:"/mathpulse_logo.png",alt:"MathPulse AI Logo",className:"w-16 h-16 object-contain flex-shrink-0"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-display font-black tracking-tight text-slate-900 bg-clip-text text-transparent bg-gradient-to-r from-purple-600 via-pink-600 to-sky-500",children:"MathPulse"}),e.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5",children:[e.jsx(Te,{size:12,className:"text-rose-500"}),e.jsx("span",{className:"text-xs text-slate-500 font-body font-medium tracking-wide",children:"Powered by Machine Learning"})]})]})]}),e.jsxs(r.div,{className:"space-y-5",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2,duration:.8},children:[e.jsxs("h2",{className:"text-4xl lg:text-5xl xl:text-[3.4rem] font-display font-extrabold leading-[1.1] tracking-tight text-slate-900",children:["Transform Your",e.jsx("br",{}),e.jsx("span",{className:"bg-gradient-to-r from-sky-600 via-cyan-500 to-sky-500 bg-clip-text text-transparent",children:"Math Journey"})]}),e.jsx("p",{className:"text-base text-slate-500 leading-relaxed max-w-md font-body",children:"AI-powered predictive system designed to identify at-risk students and provide personalized learning recommendations."})]}),e.jsx("div",{className:"grid grid-cols-3 gap-3",children:[{icon:Re,label:"AI Predictions",desc:"Smart detection",color:"sky"},{icon:Ce,label:"Analytics",desc:"Real-time data",color:"rose"},{icon:Ie,label:"Gamified",desc:"Learn & earn",color:"emerald"}].map((t,a)=>{const m=t.icon,p={sky:"border-sky-200/60 hover:border-sky-300",rose:"border-rose-200/60 hover:border-rose-300",emerald:"border-emerald-200/60 hover:border-emerald-300"},P={sky:"text-sky-600",rose:"text-rose-500",emerald:"text-emerald-600"},y={sky:"bg-sky-100",rose:"bg-rose-100",emerald:"bg-emerald-100"};return e.jsxs(r.div,{className:`bg-white/80 backdrop-blur-xl border ${p[t.color]} rounded-xl p-4 transition-all cursor-pointer group shadow-md shadow-slate-900/[0.04]`,initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5+a*.1},whileHover:{scale:1.03,y:-4},children:[e.jsx("div",{className:`w-9 h-9 rounded-lg ${y[t.color]} flex items-center justify-center mb-3`,children:e.jsx(m,{size:18,className:P[t.color]})}),e.jsx("h3",{className:"text-sm font-display font-semibold text-slate-800 mb-0.5",children:t.label}),e.jsx("p",{className:"text-xs text-slate-400 font-body",children:t.desc})]},a)})})]}),e.jsx(r.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.15,ease:[.22,1,.36,1]},className:"relative flex justify-center lg:justify-end",children:e.jsxs("div",{className:"bg-white/85 backdrop-blur-2xl border border-slate-200/60 rounded-3xl p-7 w-full max-w-md relative overflow-hidden shadow-[0_20px_60px_-15px_rgba(168,85,247,0.15)]",children:[e.jsx("div",{className:"absolute top-0 left-0 right-0 h-[3px] bg-gradient-to-r from-purple-500 via-pink-500 to-sky-500"}),e.jsx("div",{className:"absolute -top-40 left-1/2 -translate-x-1/2 w-80 h-80 bg-gradient-to-br from-purple-400/20 to-pink-400/20 rounded-full blur-[60px] pointer-events-none"}),e.jsxs("div",{className:"text-center mb-6 relative",children:[e.jsx(r.h3,{className:"text-2xl font-display font-bold text-slate-900 mb-2",initial:{opacity:0},animate:{opacity:1},transition:{delay:.4},children:l?"Create Account":"Welcome Back"}),e.jsx(r.p,{className:"text-sm text-slate-500 font-body",initial:{opacity:0},animate:{opacity:1},transition:{delay:.5},children:l?"Begin your learning journey":"Sign in to continue learning"})]}),e.jsxs("form",{onSubmit:Se,className:"space-y-4 mb-5 relative",children:[v&&!J&&e.jsx(r.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"bg-rose-50 border border-rose-200 text-rose-600 px-4 py-3 rounded-lg text-sm font-body",children:v}),l&&e.jsxs(r.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},children:[e.jsx("label",{className:"block text-xs font-body font-semibold text-slate-500 mb-2 uppercase tracking-wider",children:"Full Name"}),e.jsxs("div",{className:"relative",children:[e.jsx(re,{size:16,className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400"}),e.jsx(D,{type:"text",placeholder:"Your Name",value:M,onChange:t=>me(t.target.value),className:"w-full pl-11 pr-4 py-3 rounded-lg bg-slate-100/70 border-slate-200/80 text-slate-900 placeholder:text-slate-400 focus:border-sky-400 focus:ring-2 focus:ring-sky-400/20 focus:bg-white text-sm font-body transition-all",required:!0})]})]}),l&&e.jsxs(r.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.45},children:[e.jsx("label",{className:"block text-xs font-body font-semibold text-slate-500 mb-2 uppercase tracking-wider",children:"Account Type"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:[{role:"student",label:"Student"},{role:"teacher",label:"Teacher"}].map(t=>{const a=n===t.role;return e.jsx("button",{type:"button",onClick:()=>O(t.role),className:`rounded-lg border px-3 py-2 text-xs font-body font-semibold transition-all ${a?"border-sky-400 bg-sky-50 text-sky-700":"border-slate-200 bg-slate-50 text-slate-500 hover:border-slate-300"}`,children:t.label},t.role)})})]}),l&&n==="student"&&e.jsxs(r.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},children:[e.jsx("label",{className:"block text-xs font-body font-semibold text-slate-500 mb-2 uppercase tracking-wider",children:"Grade Level"}),e.jsxs("div",{className:"relative",children:[e.jsx(oe,{size:16,className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400"}),e.jsx("select",{value:f,onChange:t=>ue(t.target.value),className:"w-full pl-11 pr-4 py-3 rounded-lg bg-slate-100/70 border border-slate-200/80 text-slate-900 focus:border-sky-400 focus:ring-2 focus:ring-sky-400/20 focus:bg-white text-sm font-body transition-all appearance-none",required:!0,children:o.map(t=>e.jsx("option",{value:t,children:t},t))})]})]}),l&&n==="student"&&e.jsxs(r.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},children:[e.jsx("label",{className:"block text-xs font-body font-semibold text-slate-500 mb-2 uppercase tracking-wider",children:"Section"}),e.jsxs("div",{className:"relative",children:[e.jsx(re,{size:16,className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400"}),e.jsx("select",{value:w,onChange:t=>_(t.target.value),className:"w-full pl-11 pr-4 py-3 rounded-lg bg-slate-100/70 border border-slate-200/80 text-slate-900 focus:border-sky-400 focus:ring-2 focus:ring-sky-400/20 focus:bg-white text-sm font-body transition-all appearance-none",required:!0,children:(c[f]||[]).map(t=>e.jsx("option",{value:t,children:t},t))})]})]}),l&&n!=="student"&&e.jsxs(r.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},children:[e.jsx("label",{className:"block text-xs font-body font-semibold text-slate-500 mb-2 uppercase tracking-wider",children:"Department"}),e.jsxs("div",{className:"relative",children:[e.jsx(ie,{size:16,className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400"}),e.jsx("select",{value:g,onChange:t=>G(t.target.value),className:"w-full pl-11 pr-4 py-3 rounded-lg bg-slate-100/70 border border-slate-200/80 text-slate-900 focus:border-sky-400 focus:ring-2 focus:ring-sky-400/20 focus:bg-white text-sm font-body transition-all appearance-none",required:!0,children:i.teacher.map(t=>e.jsx("option",{value:t,children:t},t))})]})]}),e.jsxs(r.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.5},children:[e.jsx("label",{className:"block text-xs font-body font-semibold text-slate-500 mb-2 uppercase tracking-wider",children:"Email Address"}),e.jsxs("div",{className:"relative",children:[e.jsx(Le,{size:16,className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400"}),e.jsx(D,{type:"email",placeholder:"your.email@school.edu",value:d,onChange:t=>h(t.target.value),className:"w-full pl-11 pr-4 py-3 rounded-lg bg-slate-100/70 border-slate-200/80 text-slate-900 placeholder:text-slate-400 focus:border-sky-400 focus:ring-2 focus:ring-sky-400/20 focus:bg-white text-sm font-body transition-all",required:!0})]})]}),e.jsxs(r.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.6},children:[e.jsx("label",{className:"block text-xs font-body font-semibold text-slate-500 mb-2 uppercase tracking-wider",children:"Password"}),e.jsxs("div",{className:"relative",children:[e.jsx(le,{size:16,className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400"}),e.jsx(D,{type:A?"text":"password",placeholder:"••••••••",value:b,onChange:t=>z(t.target.value),className:"w-full pl-11 pr-11 py-3 rounded-lg bg-slate-100/70 border-slate-200/80 text-slate-900 placeholder:text-slate-400 focus:border-sky-400 focus:ring-2 focus:ring-sky-400/20 focus:bg-white text-sm font-body transition-all",required:!0,minLength:l?8:6}),e.jsx(r.button,{type:"button",onClick:()=>de(!A),className:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 transition-colors",whileTap:{scale:.9},children:A?e.jsx(De,{size:16}):e.jsx(Be,{size:16})})]}),l&&e.jsxs("div",{className:"mt-2 rounded-lg border border-sky-100/80 bg-sky-50/70 px-3 py-2",children:[e.jsx("p",{className:"text-[11px] font-body font-semibold uppercase tracking-wider text-slate-600",children:"Password requirements"}),e.jsx("ul",{className:"mt-2 space-y-1",children:I.map(t=>e.jsxs("li",{className:`flex items-center gap-2 text-[11px] font-body ${t.met?"text-emerald-700":"text-slate-500"}`,children:[e.jsx("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${t.met?"bg-emerald-500":"bg-slate-300"}`}),e.jsx("span",{children:t.label})]},t.id))}),J&&e.jsx("p",{className:"mt-2 text-[11px] font-body font-semibold text-rose-600",children:"Password does not meet signup requirements."})]})]}),e.jsx(r.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.7},children:e.jsxs(Me,{type:"submit",disabled:V,className:"w-full bg-gradient-to-r from-purple-600 to-pink-500 hover:from-purple-500 hover:to-pink-400 text-white font-body font-semibold py-3 rounded-xl shadow-lg shadow-purple-600/25 hover:shadow-pink-500/35 hover:scale-[1.02] transition-all text-sm group relative overflow-hidden disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx(r.span,{className:"absolute inset-0 bg-gradient-to-r from-white/0 via-white/15 to-white/0",animate:{x:["-100%","100%"]},transition:{duration:3,repeat:1/0,repeatDelay:2}}),e.jsxs("span",{className:"relative flex items-center justify-center gap-2",children:[V?"Please wait...":l?"Create Account":"Sign In",e.jsx(te,{size:16,className:"group-hover:translate-x-1 transition-transform"})]})]})}),e.jsx("div",{className:"text-center",children:e.jsx("button",{type:"button",onClick:()=>{q(!l),u(null)},className:"text-sm text-slate-400 hover:text-sky-500 font-body font-medium transition-colors",children:l?"Already have an account? Sign in":"Don't have an account? Create one"})})]}),!l&&e.jsxs(r.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.85},className:"mb-4 relative",children:[e.jsxs("div",{className:"relative flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"flex-1 h-px bg-slate-200"}),e.jsx("span",{className:"text-[10px] font-body font-semibold text-slate-400 uppercase tracking-widest",children:"Quick Demo Access"}),e.jsx("div",{className:"flex-1 h-px bg-slate-200"})]}),e.jsx("div",{className:"flex flex-col gap-2",children:Ne.map(t=>{const a=t.icon,m={sky:"bg-sky-100",emerald:"bg-emerald-100",rose:"bg-rose-100"},p={sky:"text-sky-600",emerald:"text-emerald-600",rose:"text-rose-500"};return e.jsxs(r.button,{type:"button",onClick:()=>ke(t.email,t.password,t.role),className:"group flex items-center gap-3 w-full px-4 py-2.5 rounded-lg bg-slate-50/80 border border-slate-200/70 hover:border-sky-300 hover:bg-sky-50/80 hover:shadow-sm transition-all text-left",whileHover:{scale:1.01},whileTap:{scale:.99},children:[e.jsx("div",{className:`w-8 h-8 rounded-md flex items-center justify-center shrink-0 ${m[t.color]}`,children:e.jsx(a,{size:15,className:p[t.color]})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("p",{className:"text-xs font-body font-semibold text-slate-700 group-hover:text-sky-600 transition-colors",children:[t.label," Account"]}),e.jsx("p",{className:"text-[10px] text-slate-400 font-body truncate",children:t.email})]}),e.jsx(te,{size:14,className:"text-slate-300 group-hover:text-sky-500 group-hover:translate-x-0.5 transition-all shrink-0"})]},t.label)})})]}),e.jsxs(r.p,{className:"text-xs text-slate-400 text-center mt-4 font-body relative",initial:{opacity:0},animate:{opacity:1},transition:{delay:1},children:[e.jsx(le,{size:10,className:"inline mr-1 -mt-0.5"})," Your data is encrypted and secure"]})]})})]})})]})};export{mt as default}; +import{r as s,j as e}from"./vendor-react-B4AQeu28.js";import{B as Me}from"./button-C6pFOjcg.js";import{I as D}from"./input-DtBdbulD.js";import{m as r,A as te,s as se,a as Ee,b as ae}from"./index-Du57tmo9.js";import{S as Te}from"./sparkles-DseoQb3m.js";import{B as Re}from"./brain-CEG2uNCc.js";import{T as Ce}from"./trending-up-BgWHLAjl.js";import{A as Ie}from"./award-ZQxHm68j.js";import{U as re}from"./users--M0GUX5u.js";import{G as oe}from"./graduation-cap-D6QMIGIe.js";import{B as ie}from"./book-open-cmOvedFO.js";import{M as Le}from"./mail-B4r1HZjf.js";import{L as le}from"./lock-CtsU7Hj2.js";import{E as De,a as Be}from"./eye-Duf559JU.js";import{S as ze}from"./shield-check-DJtXN0Ez.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-markdown-yqZQ_iQm.js";const ne="/assets/shader-bg-DA7bEbBA.mp4",qe=[{id:"length",label:"At least 8 characters",test:o=>o.length>=8},{id:"upper-lower",label:"Contains uppercase and lowercase letters",test:o=>/[A-Z]/.test(o)&&/[a-z]/.test(o)},{id:"number",label:"Contains at least one number",test:o=>/\d/.test(o)},{id:"special",label:"Contains at least one special character",test:o=>/[^A-Za-z0-9]/.test(o)}],B="Use at least 8 characters with uppercase, lowercase, number, and special character.",Oe=o=>{const c=typeof o=="object"&&o!==null?o:null,i=o instanceof Error?o.message:"";if(c?.code&&typeof c.code=="string")return{code:c.code.toLowerCase(),message:i};const d=i.match(/auth\/[a-z-]+/i);return{code:d?d[0].toLowerCase():"",message:i}},_e=o=>o.replace(/^Firebase:\s*/i,"").replace(/\s*\(auth\/[a-z-]+\)\.?/i,"").trim(),ce=(o,c)=>{const{code:i,message:d}=Oe(o),h=_e(d);return i==="auth/invalid-credential"||i==="auth/wrong-password"||i==="auth/user-not-found"?"Invalid email or password. Please check your credentials and try again.":i==="auth/email-already-in-use"?"This email is already registered. Please sign in instead.":i==="auth/weak-password"||i==="auth/password-does-not-meet-requirements"?h?`Password does not meet signup requirements. ${h}`:`Password does not meet signup requirements. ${B}`:i==="auth/too-many-requests"?"Access to this account has been temporarily disabled due to many failed login attempts. You can immediately restore it by resetting your password or you can try again later.":i==="auth/network-request-failed"?"Network error. Please check your internet connection and try again.":i.startsWith("auth/")?h||c:d.includes("Firebase:")||d.includes("auth/")?c:d||c},mt=()=>{const o=["Grade 11","Grade 12"],c={"Grade 11":["STEM A","STEM B","ABM A","HUMSS A"],"Grade 12":["STEM A","STEM B","ABM A","HUMSS A"]},i={teacher:["Mathematics","Science","English","Technology","Humanities"]},[d,h]=s.useState(""),[b,z]=s.useState(""),[A,de]=s.useState(!1),[l,q]=s.useState(!1),[M,me]=s.useState(""),[n,O]=s.useState("student"),[f,ue]=s.useState("Grade 11"),[w,_]=s.useState(c["Grade 11"][0]),[g,G]=s.useState("Mathematics"),[V,x]=s.useState(!1),[v,u]=s.useState(null),[pe,xe]=s.useState(!1),[ye,he]=s.useState(!1),[E,fe]=s.useState(16),[F,U]=s.useState("primary"),[$,T]=s.useState(0),R=s.useRef(null),C=s.useRef(null),N=pe&&ye,j=s.useRef("primary"),k=s.useRef(0),S=s.useRef(!1),W=1.1,H=.34,Y=t=>{const a=Math.max(0,Math.min(1,t));Math.abs(k.current-a)<.02||(k.current=a,T(a))},Z=t=>{!Number.isFinite(t)||t<=0||Math.abs(E-t)>.05&&fe(t)},I=s.useMemo(()=>qe.map(t=>({...t,met:t.test(b)})),[b]),be=s.useMemo(()=>I.every(t=>t.met),[I]),J=s.useMemo(()=>{if(!l||!v)return!1;const t=v.toLowerCase();return t.includes("password requirements not met")||t.includes("password does not meet")},[v,l]),ge=()=>{const t=R.current?.duration;t&&Number.isFinite(t)&&t>0&&Z(t)},ve=()=>{const t=C.current?.duration;t&&Number.isFinite(t)&&t>0&&Z(t)};s.useEffect(()=>{if(!N)return;const t=R.current,a=C.current;if(!t||!a)return;let m=!1,p=0;j.current="primary",U("primary"),S.current=!1,k.current=0,T(0),t.loop=!1,a.loop=!1,t.currentTime=0,a.currentTime=0,a.pause(),t.play().catch(()=>{});const P=()=>{if(m)return;const y=j.current==="primary"?t:a,K=j.current==="primary"?a:t,Pe=Number.isFinite(y.duration)&&y.duration>0?y.duration:E,L=Math.max(Pe-y.currentTime,0);if(L<=W){S.current||(S.current=!0,K.currentTime=0,K.play().catch(()=>{}));const Ae=1-L/W;if(Y(Ae),L<=.03||y.ended){y.pause(),y.currentTime=0;const ee=j.current==="primary"?"secondary":"primary";j.current=ee,U(ee),S.current=!1,k.current=0,T(0)}}else Y(0);p=window.requestAnimationFrame(P)};return p=window.requestAnimationFrame(P),()=>{m=!0,p&&window.cancelAnimationFrame(p)}},[E,N]);const Q=N?H*(1-$):0,X=N?H*$:0,je=F==="primary"?Q:X,we=F==="secondary"?Q:X;s.useEffect(()=>{n==="teacher"&&!i.teacher.includes(g)&&G(i.teacher[0])},[g,n]),s.useEffect(()=>{const t=c[f]||[];t.length>0&&!t.includes(w)&&_(t[0])},[f,w]);const Ne=[{label:"Student",role:"student",email:"teststudent@school.edu",password:"TestPass123!",icon:oe,color:"sky"},{label:"Teacher",role:"teacher",email:"testteacher@school.edu",password:"TestPass123!",icon:ie,color:"emerald"},{label:"Admin",role:"admin",email:"testadmin@school.edu",password:"TestPass123!",icon:ze,color:"rose"}],ke=async(t,a,m)=>{u(null),x(!0),h(t),z(a),O(m),q(!1);try{se(m),await ae(t,a)}catch(p){u(ce(p,"Demo sign-in failed. Please try again.")),x(!1)}},Se=async t=>{t.preventDefault(),u(null),x(!0);try{if(l){if(!M.trim()){u("Please enter your name"),x(!1);return}if(n==="student"&&!f){u("Please select a grade level"),x(!1);return}if(n!=="student"&&!g){u("Please select a department"),x(!1);return}if(n==="admin"){u("Admin account creation is restricted. Please contact an existing administrator."),x(!1);return}if(!be){u(`Password does not meet signup requirements. ${B}`),x(!1);return}se(n),await Ee(d,b,M,n,n==="student"?{grade:f,section:w}:{department:g})}else await ae(d,b)}catch(a){const m=l?`Sign-up failed. ${B}`:"Sign-in failed. Please check your credentials and try again.";u(ce(a,m)),x(!1)}};return e.jsxs("div",{className:"h-screen w-full flex items-center justify-center px-6 overflow-hidden relative login-bg",children:[e.jsx("video",{ref:R,autoPlay:!0,muted:!0,playsInline:!0,preload:"auto",onCanPlay:()=>xe(!0),onLoadedMetadata:ge,className:"absolute inset-0 w-full h-full object-cover transition-opacity duration-150 e-opacity",style:{"--o":je},src:ne}),e.jsx("video",{ref:C,autoPlay:!0,muted:!0,playsInline:!0,preload:"auto",onCanPlay:()=>he(!0),onLoadedMetadata:ve,className:"absolute inset-0 w-full h-full object-cover transition-opacity duration-150 e-opacity",style:{"--o":we},src:ne}),e.jsx("div",{className:"absolute inset-0 pointer-events-none login-frost-overlay"}),e.jsx("div",{className:"absolute top-[10%] left-[-10%] w-[60%] h-[60%] rounded-full blur-[140px] pointer-events-none mix-blend-multiply login-orb-purple"}),e.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] w-[70%] h-[70%] rounded-full blur-[160px] pointer-events-none mix-blend-multiply login-orb-pink"}),e.jsx("div",{className:"absolute top-[40%] left-[40%] w-[40%] h-[40%] rounded-full blur-[120px] pointer-events-none mix-blend-screen login-orb-blue"}),e.jsx("div",{className:"relative z-10 w-full max-w-6xl mx-auto",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 lg:gap-12 items-center",children:[e.jsxs(r.div,{initial:{opacity:0,x:-40},animate:{opacity:1,x:0},transition:{duration:.8,ease:[.22,1,.36,1]},className:"flex flex-col justify-center space-y-8",children:[e.jsxs(r.div,{className:"flex items-center gap-2.5",children:[e.jsx(r.div,{className:"relative flex items-center justify-center drop-shadow-md",children:e.jsx("img",{src:"/mathpulse_logo.png",alt:"MathPulse AI Logo",className:"w-16 h-16 object-contain flex-shrink-0"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-display font-black tracking-tight text-slate-900 bg-clip-text text-transparent bg-gradient-to-r from-purple-600 via-pink-600 to-sky-500",children:"MathPulse"}),e.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5",children:[e.jsx(Te,{size:12,className:"text-rose-500"}),e.jsx("span",{className:"text-xs text-slate-500 font-body font-medium tracking-wide",children:"Powered by Machine Learning"})]})]})]}),e.jsxs(r.div,{className:"space-y-5",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2,duration:.8},children:[e.jsxs("h2",{className:"text-4xl lg:text-5xl xl:text-[3.4rem] font-display font-extrabold leading-[1.1] tracking-tight text-slate-900",children:["Transform Your",e.jsx("br",{}),e.jsx("span",{className:"bg-gradient-to-r from-sky-600 via-cyan-500 to-sky-500 bg-clip-text text-transparent",children:"Math Journey"})]}),e.jsx("p",{className:"text-base text-slate-500 leading-relaxed max-w-md font-body",children:"AI-powered predictive system designed to identify at-risk students and provide personalized learning recommendations."})]}),e.jsx("div",{className:"grid grid-cols-3 gap-3",children:[{icon:Re,label:"AI Predictions",desc:"Smart detection",color:"sky"},{icon:Ce,label:"Analytics",desc:"Real-time data",color:"rose"},{icon:Ie,label:"Gamified",desc:"Learn & earn",color:"emerald"}].map((t,a)=>{const m=t.icon,p={sky:"border-sky-200/60 hover:border-sky-300",rose:"border-rose-200/60 hover:border-rose-300",emerald:"border-emerald-200/60 hover:border-emerald-300"},P={sky:"text-sky-600",rose:"text-rose-500",emerald:"text-emerald-600"},y={sky:"bg-sky-100",rose:"bg-rose-100",emerald:"bg-emerald-100"};return e.jsxs(r.div,{className:`bg-white/80 backdrop-blur-xl border ${p[t.color]} rounded-xl p-4 transition-all cursor-pointer group shadow-md shadow-slate-900/[0.04]`,initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5+a*.1},whileHover:{scale:1.03,y:-4},children:[e.jsx("div",{className:`w-9 h-9 rounded-lg ${y[t.color]} flex items-center justify-center mb-3`,children:e.jsx(m,{size:18,className:P[t.color]})}),e.jsx("h3",{className:"text-sm font-display font-semibold text-slate-800 mb-0.5",children:t.label}),e.jsx("p",{className:"text-xs text-slate-400 font-body",children:t.desc})]},a)})})]}),e.jsx(r.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.15,ease:[.22,1,.36,1]},className:"relative flex justify-center lg:justify-end",children:e.jsxs("div",{className:"bg-white/85 backdrop-blur-2xl border border-slate-200/60 rounded-3xl p-7 w-full max-w-md relative overflow-hidden shadow-[0_20px_60px_-15px_rgba(168,85,247,0.15)]",children:[e.jsx("div",{className:"absolute top-0 left-0 right-0 h-[3px] bg-gradient-to-r from-purple-500 via-pink-500 to-sky-500"}),e.jsx("div",{className:"absolute -top-40 left-1/2 -translate-x-1/2 w-80 h-80 bg-gradient-to-br from-purple-400/20 to-pink-400/20 rounded-full blur-[60px] pointer-events-none"}),e.jsxs("div",{className:"text-center mb-6 relative",children:[e.jsx(r.h3,{className:"text-2xl font-display font-bold text-slate-900 mb-2",initial:{opacity:0},animate:{opacity:1},transition:{delay:.4},children:l?"Create Account":"Welcome Back"}),e.jsx(r.p,{className:"text-sm text-slate-500 font-body",initial:{opacity:0},animate:{opacity:1},transition:{delay:.5},children:l?"Begin your learning journey":"Sign in to continue learning"})]}),e.jsxs("form",{onSubmit:Se,className:"space-y-4 mb-5 relative",children:[v&&!J&&e.jsx(r.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"bg-rose-50 border border-rose-200 text-rose-600 px-4 py-3 rounded-lg text-sm font-body",children:v}),l&&e.jsxs(r.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},children:[e.jsx("label",{className:"block text-xs font-body font-semibold text-slate-500 mb-2 uppercase tracking-wider",children:"Full Name"}),e.jsxs("div",{className:"relative",children:[e.jsx(re,{size:16,className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400"}),e.jsx(D,{type:"text",placeholder:"Your Name",value:M,onChange:t=>me(t.target.value),className:"w-full pl-11 pr-4 py-3 rounded-lg bg-slate-100/70 border-slate-200/80 text-slate-900 placeholder:text-slate-400 focus:border-sky-400 focus:ring-2 focus:ring-sky-400/20 focus:bg-white text-sm font-body transition-all",required:!0})]})]}),l&&e.jsxs(r.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.45},children:[e.jsx("label",{className:"block text-xs font-body font-semibold text-slate-500 mb-2 uppercase tracking-wider",children:"Account Type"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:[{role:"student",label:"Student"},{role:"teacher",label:"Teacher"}].map(t=>{const a=n===t.role;return e.jsx("button",{type:"button",onClick:()=>O(t.role),className:`rounded-lg border px-3 py-2 text-xs font-body font-semibold transition-all ${a?"border-sky-400 bg-sky-50 text-sky-700":"border-slate-200 bg-slate-50 text-slate-500 hover:border-slate-300"}`,children:t.label},t.role)})})]}),l&&n==="student"&&e.jsxs(r.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},children:[e.jsx("label",{className:"block text-xs font-body font-semibold text-slate-500 mb-2 uppercase tracking-wider",children:"Grade Level"}),e.jsxs("div",{className:"relative",children:[e.jsx(oe,{size:16,className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400"}),e.jsx("select",{value:f,onChange:t=>ue(t.target.value),className:"w-full pl-11 pr-4 py-3 rounded-lg bg-slate-100/70 border border-slate-200/80 text-slate-900 focus:border-sky-400 focus:ring-2 focus:ring-sky-400/20 focus:bg-white text-sm font-body transition-all appearance-none",required:!0,children:o.map(t=>e.jsx("option",{value:t,children:t},t))})]})]}),l&&n==="student"&&e.jsxs(r.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},children:[e.jsx("label",{className:"block text-xs font-body font-semibold text-slate-500 mb-2 uppercase tracking-wider",children:"Section"}),e.jsxs("div",{className:"relative",children:[e.jsx(re,{size:16,className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400"}),e.jsx("select",{value:w,onChange:t=>_(t.target.value),className:"w-full pl-11 pr-4 py-3 rounded-lg bg-slate-100/70 border border-slate-200/80 text-slate-900 focus:border-sky-400 focus:ring-2 focus:ring-sky-400/20 focus:bg-white text-sm font-body transition-all appearance-none",required:!0,children:(c[f]||[]).map(t=>e.jsx("option",{value:t,children:t},t))})]})]}),l&&n!=="student"&&e.jsxs(r.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},children:[e.jsx("label",{className:"block text-xs font-body font-semibold text-slate-500 mb-2 uppercase tracking-wider",children:"Department"}),e.jsxs("div",{className:"relative",children:[e.jsx(ie,{size:16,className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400"}),e.jsx("select",{value:g,onChange:t=>G(t.target.value),className:"w-full pl-11 pr-4 py-3 rounded-lg bg-slate-100/70 border border-slate-200/80 text-slate-900 focus:border-sky-400 focus:ring-2 focus:ring-sky-400/20 focus:bg-white text-sm font-body transition-all appearance-none",required:!0,children:i.teacher.map(t=>e.jsx("option",{value:t,children:t},t))})]})]}),e.jsxs(r.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.5},children:[e.jsx("label",{className:"block text-xs font-body font-semibold text-slate-500 mb-2 uppercase tracking-wider",children:"Email Address"}),e.jsxs("div",{className:"relative",children:[e.jsx(Le,{size:16,className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400"}),e.jsx(D,{type:"email",placeholder:"your.email@school.edu",value:d,onChange:t=>h(t.target.value),className:"w-full pl-11 pr-4 py-3 rounded-lg bg-slate-100/70 border-slate-200/80 text-slate-900 placeholder:text-slate-400 focus:border-sky-400 focus:ring-2 focus:ring-sky-400/20 focus:bg-white text-sm font-body transition-all",required:!0})]})]}),e.jsxs(r.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.6},children:[e.jsx("label",{className:"block text-xs font-body font-semibold text-slate-500 mb-2 uppercase tracking-wider",children:"Password"}),e.jsxs("div",{className:"relative",children:[e.jsx(le,{size:16,className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400"}),e.jsx(D,{type:A?"text":"password",placeholder:"••••••••",value:b,onChange:t=>z(t.target.value),className:"w-full pl-11 pr-11 py-3 rounded-lg bg-slate-100/70 border-slate-200/80 text-slate-900 placeholder:text-slate-400 focus:border-sky-400 focus:ring-2 focus:ring-sky-400/20 focus:bg-white text-sm font-body transition-all",required:!0,minLength:l?8:6}),e.jsx(r.button,{type:"button",onClick:()=>de(!A),className:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 transition-colors",whileTap:{scale:.9},children:A?e.jsx(De,{size:16}):e.jsx(Be,{size:16})})]}),l&&e.jsxs("div",{className:"mt-2 rounded-lg border border-sky-100/80 bg-sky-50/70 px-3 py-2",children:[e.jsx("p",{className:"text-[11px] font-body font-semibold uppercase tracking-wider text-slate-600",children:"Password requirements"}),e.jsx("ul",{className:"mt-2 space-y-1",children:I.map(t=>e.jsxs("li",{className:`flex items-center gap-2 text-[11px] font-body ${t.met?"text-emerald-700":"text-slate-500"}`,children:[e.jsx("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${t.met?"bg-emerald-500":"bg-slate-300"}`}),e.jsx("span",{children:t.label})]},t.id))}),J&&e.jsx("p",{className:"mt-2 text-[11px] font-body font-semibold text-rose-600",children:"Password does not meet signup requirements."})]})]}),e.jsx(r.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.7},children:e.jsxs(Me,{type:"submit",disabled:V,className:"w-full bg-gradient-to-r from-purple-600 to-pink-500 hover:from-purple-500 hover:to-pink-400 text-white font-body font-semibold py-3 rounded-xl shadow-lg shadow-purple-600/25 hover:shadow-pink-500/35 hover:scale-[1.02] transition-all text-sm group relative overflow-hidden disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx(r.span,{className:"absolute inset-0 bg-gradient-to-r from-white/0 via-white/15 to-white/0",animate:{x:["-100%","100%"]},transition:{duration:3,repeat:1/0,repeatDelay:2}}),e.jsxs("span",{className:"relative flex items-center justify-center gap-2",children:[V?"Please wait...":l?"Create Account":"Sign In",e.jsx(te,{size:16,className:"group-hover:translate-x-1 transition-transform"})]})]})}),e.jsx("div",{className:"text-center",children:e.jsx("button",{type:"button",onClick:()=>{q(!l),u(null)},className:"text-sm text-slate-400 hover:text-sky-500 font-body font-medium transition-colors",children:l?"Already have an account? Sign in":"Don't have an account? Create one"})})]}),!l&&e.jsxs(r.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.85},className:"mb-4 relative",children:[e.jsxs("div",{className:"relative flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"flex-1 h-px bg-slate-200"}),e.jsx("span",{className:"text-[10px] font-body font-semibold text-slate-400 uppercase tracking-widest",children:"Quick Demo Access"}),e.jsx("div",{className:"flex-1 h-px bg-slate-200"})]}),e.jsx("div",{className:"flex flex-col gap-2",children:Ne.map(t=>{const a=t.icon,m={sky:"bg-sky-100",emerald:"bg-emerald-100",rose:"bg-rose-100"},p={sky:"text-sky-600",emerald:"text-emerald-600",rose:"text-rose-500"};return e.jsxs(r.button,{type:"button",onClick:()=>ke(t.email,t.password,t.role),className:"group flex items-center gap-3 w-full px-4 py-2.5 rounded-lg bg-slate-50/80 border border-slate-200/70 hover:border-sky-300 hover:bg-sky-50/80 hover:shadow-sm transition-all text-left",whileHover:{scale:1.01},whileTap:{scale:.99},children:[e.jsx("div",{className:`w-8 h-8 rounded-md flex items-center justify-center shrink-0 ${m[t.color]}`,children:e.jsx(a,{size:15,className:p[t.color]})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("p",{className:"text-xs font-body font-semibold text-slate-700 group-hover:text-sky-600 transition-colors",children:[t.label," Account"]}),e.jsx("p",{className:"text-[10px] text-slate-400 font-body truncate",children:t.email})]}),e.jsx(te,{size:14,className:"text-slate-300 group-hover:text-sky-500 group-hover:translate-x-0.5 transition-all shrink-0"})]},t.label)})})]}),e.jsxs(r.p,{className:"text-xs text-slate-400 text-center mt-4 font-body relative",initial:{opacity:0},animate:{opacity:1},transition:{delay:1},children:[e.jsx(le,{size:10,className:"inline mr-1 -mt-0.5"})," Your data is encrypted and secure"]})]})})]})})]})};export{mt as default}; diff --git a/assets/LogoutActionButton-w1PkauXp.js b/assets/LogoutActionButton-XXsvBOAH.js similarity index 96% rename from assets/LogoutActionButton-w1PkauXp.js rename to assets/LogoutActionButton-XXsvBOAH.js index cfbf5ec9da1c6741f48f73015bafd479fe834ab9..6d4d880a41c0902649b8e64696cfade297474c2f 100644 --- a/assets/LogoutActionButton-w1PkauXp.js +++ b/assets/LogoutActionButton-XXsvBOAH.js @@ -1,4 +1,4 @@ -import{c as a,m as s,f as i}from"./index-fWY85Kyg.js";import{j as t}from"./vendor-react-B4AQeu28.js";import{L as l}from"./log-out-aQvvB_kG.js";/** +import{c as a,m as s,f as i}from"./index-Du57tmo9.js";import{j as t}from"./vendor-react-B4AQeu28.js";import{L as l}from"./log-out-SC88Jnul.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ModuleFolderCard-BJl0S3M8.js b/assets/ModuleFolderCard-DFi0m1Zn.js similarity index 96% rename from assets/ModuleFolderCard-BJl0S3M8.js rename to assets/ModuleFolderCard-DFi0m1Zn.js index a3a87746a3cf1837e94acaa4e49c36bf489f93fe..611ace6928892cc8e18fdcba5520cf1650e1ca4b 100644 --- a/assets/ModuleFolderCard-BJl0S3M8.js +++ b/assets/ModuleFolderCard-DFi0m1Zn.js @@ -1,4 +1,4 @@ -import{j as e}from"./vendor-react-B4AQeu28.js";import{u as g}from"./useSubjectAvailability-Wk6vHhYW.js";import{c as u,m as w,T as f}from"./index-fWY85Kyg.js";import{B as j}from"./book-open-D5mR6gz9.js";import{C as v}from"./clock-BJCraYVD.js";import{L as k}from"./lock-6q-juSdu.js";/** +import{j as e}from"./vendor-react-B4AQeu28.js";import{u as g}from"./useSubjectAvailability-BhYsHQ11.js";import{c as u,m as w,T as f}from"./index-Du57tmo9.js";import{B as j}from"./book-open-cmOvedFO.js";import{C as v}from"./clock-BtWjBj1h.js";import{L as k}from"./lock-CtsU7Hj2.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ModulesPage-CaIkpigw.js b/assets/ModulesPage-CaIkpigw.js new file mode 100644 index 0000000000000000000000000000000000000000..f322ab89c6dfe99066d0ee7d87091e595921e2b4 --- /dev/null +++ b/assets/ModulesPage-CaIkpigw.js @@ -0,0 +1,187 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-firebase-auth-BW5XT768.js","assets/vendor-firebase-core-y3En_kpN.js"])))=>i.map(i=>d[i]); +import{r as s,j as e,b as ct,d as we}from"./vendor-react-B4AQeu28.js";import{u as Os}from"./useQuery-CDdIlAcl.js";import{M as Ft}from"./ModuleFolderCard-DFi0m1Zn.js";import{c as ee,m as k,Z as Me,C as ot,h as Re,F as Ht,M as Qs,A as pt,_ as Wt,O as qs,f as vt,T as vs,u as Ot,L as ts,P as Xs,Q as ss,R as Us,S as Vs,l as Gs,V as Ys,d as Qt,W as Ks,X as Ns,Y as Zs,$ as Js,J as ea,k as ta,a0 as as,a1 as sa,a2 as rs,a3 as aa,I as ra,t as Dt,K as la}from"./index-Du57tmo9.js";import{B as he}from"./button-C6pFOjcg.js";import ks from"./ScientificCalculator-3ObnUHS8.js";import{C as kt}from"./check-BAMSfVKd.js";import{X as Ue}from"./x-Cwkkamrh.js";import{V as Ss,a as Cs,M as zs,b as Ms}from"./volume-x-Bj_FF_0v.js";import{C as _s}from"./chevron-left-mWdIDmIc.js";import{C as ht}from"./chevron-right-CFOFOVBg.js";import{T as St}from"./trending-up-BgWHLAjl.js";import{T as Ge}from"./target-B_JwHjFq.js";import{S as As}from"./star-BBetp7Wf.js";import{R as Ps}from"./refresh-cw-BDWpfygR.js";import{T as Ct}from"./trophy-8udS7pQx.js";import{C as st}from"./clock-BtWjBj1h.js";import{L as Es,C as It}from"./lightbulb-2ipA_Yda.js";import{C as Ts}from"./clipboard-check-fEagN09v.js";import{A as Mt}from"./award-ZQxHm68j.js";import{B as Ve}from"./book-open-cmOvedFO.js";import{C as bt}from"./circle-check-big-DC9utj0Y.js";import{s as zt}from"./subjects-DLaBFkP9.js";import{L as qt}from"./lock-CtsU7Hj2.js";import{triggerQuizSubmitted as na}from"./automationService-ChmA_Dh7.js";import{b as ia,L as oa,E as ca}from"./quizService-DQwJWsyM.js";import ls from"./confetti.module-C94ZD2ww.js";import{g as da,r as xa,a as ma,d as Ds}from"./vendor-firebase-firestore-52DD1vc9.js";import{u as ua}from"./useCurriculum-7SWvm23j.js";import{S as pa}from"./search-Dz1wkXyZ.js";import{F as ha}from"./funnel-N-2rOOix.js";import{S as fa}from"./sparkles-DseoQb3m.js";import"./useSubjectAvailability-BhYsHQ11.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";import"./chevron-up-Dmffgx6p.js";import"./chart-column-Cqncpeum.js";/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ba=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Rt=ee("arrow-left",ba);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ga=[["rect",{x:"14",y:"14",width:"4",height:"6",rx:"2",key:"p02svl"}],["rect",{x:"6",y:"4",width:"4",height:"6",rx:"2",key:"xm4xkj"}],["path",{d:"M6 20h4",key:"1i6q5t"}],["path",{d:"M14 10h4",key:"ru81e7"}],["path",{d:"M6 14h2v6",key:"16z9wg"}],["path",{d:"M14 4h2v6",key:"1idq9u"}]],wa=ee("binary",ga);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ya=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],ns=ee("bookmark",ya);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ja=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],is=ee("box",ja);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const va=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],os=ee("braces",va);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Na=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ka=ee("circle-check",Na);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sa=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Ca=ee("circle-help",Sa);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const za=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],cs=ee("circle",za);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ma=[["circle",{cx:"12",cy:"6",r:"1",key:"1bh7o1"}],["line",{x1:"5",x2:"19",y1:"12",y2:"12",key:"13b5wn"}],["circle",{cx:"12",cy:"18",r:"1",key:"lqb9t5"}]],Lt=ee("divide",Ma);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _a=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],ds=ee("hash",_a);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Aa=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Pa=ee("key",Aa);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ea=[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]],Is=ee("notebook-pen",Ea);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ta=[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]],Bt=ee("pen-tool",Ta);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Da=[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]],xs=ee("percent",Da);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ia=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],Ls=ee("play",Ia);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const La=[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]],$a=ee("ruler",La);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Fa=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M14 15H9v-5",key:"pi4jk9"}],["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M21 3 9 15",key:"15kdhq"}]],Ra=ee("scaling",Fa);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ba=[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]],ms=ee("sigma",Ba);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ha=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3",key:"m1af9g"}],["path",{d:"M9 11.2h5.7",key:"3zgcl2"}]],$t=ee("square-function",Ha);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Wa=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],us=ee("square",Wa);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Oa=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],Qa=ee("timer",Oa);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const qa=[["path",{d:"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"14u9p9"}]],ps=ee("triangle",qa);function Xa(t){let a=t>>>0;return()=>{a+=1831565813;let o=Math.imul(a^a>>>15,a|1);return o^=o+Math.imul(o^o>>>7,o|61),((o^o>>>14)>>>0)/4294967296}}function Ua(t,a){const o=[...t],i=Xa(a);for(let n=o.length-1;n>0;n--){const l=Math.floor(i()*(n+1));[o[n],o[l]]=[o[l],o[n]]}return o}function Xt(t){const a=t??new Date;return new Intl.DateTimeFormat("en-CA",{timeZone:"Asia/Manila",year:"numeric",month:"2-digit",day:"2-digit"}).format(a)}function Ut(t){const a=new Date,o=new Intl.DateTimeFormat("en-US",{timeZone:"Asia/Manila",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}).formatToParts(a),i=n=>parseInt(o.find(l=>l.type===n)?.value??"0",10);return new Date(i("year"),i("month")-1,i("day"),i("hour"),i("minute"),i("second"))}function Vt(t){const a=Ut(),o=a.getFullYear(),i=(a.getDay()+6)%7,n=new Date(a);n.setDate(a.getDate()-i+3);const l=new Date(n.getFullYear(),0,1),r=Math.floor((n.getTime()-l.getTime())/(1440*60*1e3)),d=Math.floor(r/7)+1;return o*100+d}function Gt(t){return(Ut().getDay()+6)%7}function Va(t){const a=new Date,o=480*60*1e3,i=a.getTime()+o,l=(new Date(i).getUTCDay()+6)%7,r=l===0?7:7-l,g=i-i%(1440*60*1e3)+r*24*60*60*1e3;return new Date(g-o)}const Ga=[{id:"xp_50",label:"+50 XP Boost",description:"Bonus XP on your next quiz",icon:"⚡",type:"xp",value:50,rarity:"common",color:"#4ade80"},{id:"xp_100",label:"+100 XP Boost",description:"Double bonus XP reward",icon:"🌟",type:"xp",value:100,rarity:"rare",color:"#facc15"},{id:"xp_200",label:"+200 XP Epic Boost",description:"Massive XP surge",icon:"💥",type:"xp",value:200,rarity:"epic",color:"#f97316"},{id:"coins_25",label:"25 Math Coins",description:"Spend on hints or power-ups",icon:"🪙",type:"coins",value:25,rarity:"common",color:"#fbbf24"},{id:"coins_50",label:"50 Math Coins",description:"Bigger coin reward",icon:"💰",type:"coins",value:50,rarity:"rare",color:"#f59e0b"},{id:"streak_shield",label:"Streak Shield",description:"Protects streak if you miss a day",icon:"🛡️",type:"streak_shield",value:1,rarity:"rare",color:"#60a5fa"},{id:"hint_x3",label:"3 Hint Tokens",description:"Use in-quiz hints",icon:"💡",type:"hint_token",value:3,rarity:"common",color:"#a78bfa"},{id:"hint_x5",label:"5 Hint Tokens",description:"More hints to use",icon:"🔦",type:"hint_token",value:5,rarity:"rare",color:"#8b5cf6"},{id:"xp_mult_1h",label:"1-Hour XP ×1.5",description:"1.5× XP for all quizzes for 1 hour",icon:"⏰",type:"xp_multiplier",value:60,rarity:"epic",color:"#ec4899"},{id:"xp_mult_30m",label:"30-Min XP ×2",description:"2× XP for 30 minutes",icon:"🚀",type:"xp_multiplier",value:30,rarity:"epic",color:"#e11d48"},{id:"xp_75",label:"+75 XP Boost",description:"Solid XP reward",icon:"✨",type:"xp",value:75,rarity:"common",color:"#34d399"},{id:"coins_75",label:"75 Math Coins",description:"Premium coin haul",icon:"🏅",type:"coins",value:75,rarity:"epic",color:"#d97706"},{id:"hint_x2",label:"2 Hint Tokens",description:"Quick hint pack",icon:"🕯️",type:"hint_token",value:2,rarity:"common",color:"#7c3aed"},{id:"xp_streak_150",label:"+150 XP + Streak Save",description:"XP boost + streak protection combo",icon:"🔥",type:"xp",value:150,rarity:"epic",color:"#dc2626"},{id:"coins_100",label:"100 Math Coins",description:"Jackpot coin reward",icon:"🎰",type:"coins",value:100,rarity:"epic",color:"#b45309"},{id:"xp_25",label:"+25 XP Starter",description:"Small but reliable XP",icon:"🌱",type:"xp",value:25,rarity:"common",color:"#86efac"},{id:"hint_x1",label:"1 Hint Token",description:"A single lifeline",icon:"🔍",type:"hint_token",value:1,rarity:"common",color:"#c4b5fd"},{id:"coins_10",label:"10 Math Coins",description:"Daily pocket change",icon:"🪙",type:"coins",value:10,rarity:"common",color:"#fde68a"},{id:"streak_shield2",label:"2 Streak Shields",description:"Double streak protection",icon:"🏰",type:"streak_shield",value:2,rarity:"epic",color:"#3b82f6"},{id:"xp_120",label:"+120 XP Power Surge",description:"Strong XP reward for the day",icon:"⚡",type:"xp",value:120,rarity:"rare",color:"#16a34a"},{id:"hint_x4",label:"4 Hint Tokens",description:"Generous hint pack",icon:"📚",type:"hint_token",value:4,rarity:"rare",color:"#9333ea"}];function Ya(t){return Ua(Ga,t).slice(0,7).map((i,n)=>({...i,day:n}))}function Yt(){return Ya(Vt())}function Ka(){const t=Yt(),a=Gt();return t[a]}const hs=({value:t,label:a,delay:o=0,icon:i})=>{const[n,l]=we.useState(0);return we.useEffect(()=>{if(t<=0)return;const r=1e3,d=30,g=Math.abs(Math.floor(r/d));let j=0;const x=setTimeout(()=>{const z=setInterval(()=>{j+=Math.max(1,Math.floor(t/d)),j>=t?(l(t),clearInterval(z)):l(j)},g);return()=>clearInterval(z)},o);return()=>clearTimeout(x)},[t,o]),t<0?null:e.jsxs(k.div,{initial:{opacity:0,transform:"translateX(-20px)"},animate:{opacity:1,transform:"translateX(0)"},transition:{delay:o/1e3,duration:.5},className:"flex items-center justify-between bg-slate-50 border border-slate-100 rounded-xl p-3",children:[e.jsxs("div",{className:"flex items-center gap-3 text-slate-500 font-bold uppercase tracking-wider text-[10px]",children:[i,a]}),e.jsxs("div",{className:"text-xl font-black text-purple-600 tabular-nums",children:["+",n]})]})},Za=({viewportHeight:t})=>{const a=we.useMemo(()=>[...Array(40)].map((o,i)=>({id:i,left:`${Math.random()*100}%`,duration:.6+Math.random()*.4,delay:Math.random()*.4})),[t]);return e.jsx("div",{className:"absolute inset-0 pointer-events-none z-[250] overflow-hidden flex justify-between",children:a.map(o=>e.jsx(k.div,{className:"absolute w-0.5 h-16 bg-blue-400/40 rounded-full",style:{left:o.left,top:"-10%"},animate:{y:[0,t*1.2]},transition:{duration:o.duration,ease:"linear",delay:o.delay}},o.id))})},Ja=({viewportHeight:t,viewportWidth:a})=>{const o=we.useMemo(()=>[...Array(30)].map((i,n)=>({id:n,xShift:(Math.random()-.5)*a*.8,yShift:(Math.random()-.5)*t*.8,scale:Math.random()*1.5+.5,duration:2+Math.random()*1.5,delay:Math.random()*.35})),[t,a]);return e.jsx("div",{className:"absolute inset-0 pointer-events-none z-[250] overflow-hidden flex items-center justify-center",children:o.map(i=>e.jsx(k.div,{className:"absolute w-2 h-2 bg-amber-400 rounded-full shadow-[0_0_10px_rgba(251,191,36,0.6)]",style:{left:"50%",top:"50%"},animate:{y:[0,i.yShift],x:[0,i.xShift],scale:[0,i.scale,0],opacity:[0,1,0]},transition:{duration:i.duration,ease:"easeOut",delay:i.delay}},i.id))})},er=()=>{const t=we.useMemo(()=>[...Array(60)].map((a,o)=>({id:o,left:`${Math.random()*100}%`,backgroundColor:["#75D06A","#6ED1CF","#9956DE","#FB96BB","#FFB356"][o%5],duration:2+Math.random()*2,delay:Math.random()*.5,size:6+Math.random()*8,borderRadius:Math.random()>.5?"50%":"2px"})),[]);return e.jsxs("div",{className:"absolute inset-0 pointer-events-none z-[250] overflow-hidden",children:[e.jsx("style",{children:` + @keyframes confetti-fall { + 0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; } + 100% { transform: translateY(110vh) rotate(720deg); opacity: 0; } + } + .confetti-piece { + animation-name: confetti-fall; + animation-timing-function: linear; + animation-fill-mode: forwards; + } + `}),t.map(a=>e.jsx("div",{className:"confetti-piece absolute",style:{left:a.left,top:"-10%",backgroundColor:a.backgroundColor,width:a.size,height:a.size,borderRadius:a.borderRadius,animationDuration:`${a.duration}s`,animationDelay:`${a.delay}s`}},a.id))]})},tr=({lesson:t,questions:a,onComplete:o,onBack:i})=>{const[n,l]=s.useState(0),[r,d]=s.useState(0),[g,j]=s.useState(null),[x,z]=s.useState(""),[R,u]=s.useState(!1),[P,T]=s.useState(!1),[D,$]=s.useState(0),[p,M]=s.useState(0),[h,C]=s.useState(0),[H,I]=s.useState(!1),[U,V]=s.useState([]),[G,se]=s.useState(!1),[ce,E]=s.useState(!1),[fe,Le]=s.useState(null),[_e,$e]=s.useState(null),[ke,be]=s.useState(!1),[b,w]=s.useState(!1),[N,F]=s.useState(!1),[W,de]=s.useState(!1),[pe,Ye]=s.useState(!1),[Fe,Ke]=s.useState(typeof window<"u"?window.innerHeight:800),[dt,at]=s.useState(typeof window<"u"?window.innerWidth:1200),[Ze,ye]=s.useState([]),[Ae]=s.useState(Date.now()),[gt,ue]=s.useState(0),[Se,Be]=s.useState(!1),[He,rt]=s.useState(!0),[Je,We]=s.useState(!1),[lt,c]=s.useState(!1),[_,X]=s.useState(!1),[xe,Z]=s.useState(!1),[je,Pe]=s.useState(0),[Ce,Ee]=s.useState({}),[B,ze]=s.useState(5),[me,Oe]=s.useState(15),[ne,Y]=s.useState(null),[wt,At]=s.useState(!1),[Qe,Pt]=s.useState(900*1e3),[Te,yt]=s.useState({}),[et,nt]=s.useState({}),[jt,ie]=s.useState(!1),[te,xt]=s.useState(!1),[v,y]=s.useState(null),[Q]=s.useState(Array.from({length:15},(m,S)=>({id:S,size:Math.random()*120+60,x:Math.random()*100,y:Math.random()*100,duration:Math.random()*25+15,delay:Math.random()*-20,color:["bg-white/5","bg-indigo-300/10","bg-sky-300/10","bg-purple-300/10"][Math.floor(Math.random()*4)]}))),f=a[r],A=r{if(He)try{const S=window.AudioContext||window.webkitAudioContext;if(!S)return;const L=new S,q=L.currentTime,le=(K,O,J,ve=.1,it="sine")=>{const Xe=L.createOscillator(),tt=L.createGain();Xe.type=it,Xe.frequency.value=K,tt.gain.setValueAtTime(0,O),tt.gain.linearRampToValueAtTime(ve,O+.05),tt.gain.exponentialRampToValueAtTime(.001,O+J),Xe.connect(tt),tt.connect(L.destination),Xe.start(O),Xe.stop(O+J)};m==="correct"?(le(880,q,.1,.1,"sine"),le(1108.73,q+.1,.2,.1,"sine")):m==="incorrect"?(le(300,q,.2,.05,"sawtooth"),le(250,q+.15,.3,.05,"sawtooth")):m==="streak"?(le(440,q,.1,.05,"square"),le(554.37,q+.1,.1,.05,"square"),le(659.25,q+.2,.1,.05,"square"),le(880,q+.3,.4,.05,"square")):m==="complete"&&(le(523.25,q,.1,.1),le(659.25,q+.15,.1,.1),le(783.99,q+.3,.1,.1),le(1046.5,q+.45,.5,.1))}catch{}};s.useEffect(()=>{const m=()=>{Ke(window.innerHeight),at(window.innerWidth)};return window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]),s.useEffect(()=>{if(f?.type==="multiple-choice"&&f.options){const m=f.options.map((S,L)=>({id:`${f.id}-${L}`,text:S}));for(let S=m.length-1;S>0;S--){const L=Math.floor(Math.random()*(S+1));[m[S],m[L]]=[m[L],m[S]]}V(m)}else V([])},[n,f]),s.useEffect(()=>{c(!1),X(!1)},[n]);const Ie=()=>{document.fullscreenElement?(document.exitFullscreen().catch(()=>{}),We(!1)):(document.documentElement.requestFullscreen().catch(()=>{}),We(!0))},oe=()=>X(m=>!m);s.useEffect(()=>{const m=S=>{S.key==="Enter"&&(!R&&re()?Zt():R&&mt())};return window.addEventListener("keypress",m),()=>window.removeEventListener("keypress",m)},[R,g,x]),s.useEffect(()=>{me===0&&!ne&&(Y(Date.now()),At(!0))},[me,ne]),s.useEffect(()=>{if(!wt||!ne)return;const m=setInterval(()=>{const S=Date.now()-ne,L=Math.max(0,900*1e3-S);Pt(L)},1e3);return()=>clearInterval(m)},[wt,ne]);const re=()=>f.type==="fill-in-blank"?x.trim().length>0:g!==null,qe=()=>{if(B<=0||R||Te[n]||_)return;const m=Ce[n]||[],S=U.filter(q=>q.text!==f.correctAnswer).filter(q=>!m.includes(q.text));if(S.length===0)return;const L=S[Math.floor(Math.random()*S.length)];Ee(q=>({...q,[n]:[...m,L.text]})),ze(q=>Math.max(0,q-1)),Pe(q=>Math.max(0,q-5)),ae("correct")},Bs=()=>{Te[n]||R||_||(yt(m=>({...m,[n]:!0})),c(!0))},Zt=m=>{if(G||rJ.id===g);L=O?O.text:""}else{se(!1);return}S=L===f.correctAnswer}if(!S){ie(!0),ae("incorrect"),setTimeout(()=>ie(!1),500),Oe(J=>Math.max(0,J-1)),M(0);const O=[...et[n]||[],L];if(nt(J=>({...J,[n]:O})),f.type==="multiple-choice"||f.type==="true-false"){const J=f.options?f.options.length-1:1;O.length>=J&&(T(!1),u(!0),ye(ve=>{const it=[...ve];return it[r]=!1,it}))}else O.length>=3&&(T(!1),u(!0),ye(J=>{const ve=[...J];return ve[r]=!1,ve}));se(!1);return}T(!0),u(!0),ye(O=>{const J=[...O];return J[r]=!0,J});const le=(Ce[n]||[]).length>0?5:10;Pe(O=>O+le),$(O=>O+1);const K=p+1;if(M(K),C(Math.max(h,K)),K===2?y("streak"):K===3&&es<2?y("multiplier2"):K===5&&es<3&&y("multiplier3"),K>0&&K%3===0){const O=K*5;ue(J=>J+O),ae("streak")}else ae("correct");Z(!0),setTimeout(()=>{Z(!1),y(null),setTimeout(()=>mt(),500)},1200),Wt(()=>import("./confetti.module-C94ZD2ww.js"),[]).then(O=>{O.default({particleCount:30,spread:40,colors:["#75D06A","#6ED1CF"],origin:{y:.6}})}).finally(()=>se(!1))},mt=()=>{nm+1),d(m=>m+1),u(!1),j(null),z(""),T(!1)):Hs()},Hs=()=>{const m=Math.round(D/a.length*100);I(!0),m>=80||(m>=50?(de(!0),setTimeout(()=>de(!1),5e3)):(F(!0),setTimeout(()=>F(!1),5e3))),ae("complete")},Jt=ge==="quiz"?{gradient:"bg-gradient-to-br from-[#7274ED] via-[#9956DE] to-[#7274ED]"}:{gradient:"bg-gradient-to-br from-[#75D06A] via-[#6ED1CF] to-[#75D06A]"},Et=(()=>{const m=De.toLowerCase();return m.includes("geometry")||m.includes("shape")?[ps,cs,us,is,$a,Ra]:m.includes("algebra")||m.includes("equation")?[Ue,Lt,os,$t,ot,xs]:m.includes("calculus")||m.includes("derivative")||m.includes("integral")?[ms,$t,St,ot,Lt,os]:m.includes("statistics")||m.includes("probability")?[Ge,St,is,cs,ps,us]:[ot,ms,Lt,xs,$t,wa]})();Et[0];const es=Math.min(2,1+p*.1);if(H){const m=Math.round(D/a.length*100),S=m>=80,L=m>=50&&m<80,q=ge==="quiz"?100:50,le=Math.round(D/a.length*100),K=q+le+gt,O=document.getElementById("modal-root"),J=e.jsxs("div",{className:"fixed inset-0 z-[200] flex items-center justify-center p-4 bg-slate-900/40",children:[W&&e.jsx(Ja,{viewportHeight:Fe,viewportWidth:dt}),N&&e.jsx(Za,{viewportHeight:Fe}),S&&e.jsx(er,{}),e.jsxs(k.div,{initial:{opacity:0,scale:.8,y:40},animate:{opacity:1,scale:1,y:0},transition:{type:"spring",damping:18,stiffness:200},className:"w-full max-w-xs sm:max-w-sm bg-white border-2 border-slate-200 shadow-[0_25px_60px_rgba(0,0,0,0.15)] rounded-[2rem] p-4 sm:p-5 text-center relative z-10",children:[e.jsx(k.div,{initial:{scale:0,rotate:-180},animate:{scale:1,rotate:0},transition:{type:"spring",damping:12,stiffness:150,delay:.2},className:"mb-3",children:e.jsx("img",{src:"/mascot/modules_avatar.png",alt:"Mascot",className:"w-16 h-16 sm:w-20 sm:h-20 mx-auto drop-shadow-xl"})}),e.jsx(k.h2,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},className:`text-xl sm:text-2xl font-black uppercase tracking-tight mb-1 drop-shadow-sm ${S?"text-emerald-500":L?"text-amber-500":"text-rose-500"}`,children:S?"EXCELLENT!":L?"GOOD JOB!":"KEEP TRYING!"}),e.jsxs("p",{className:"text-slate-400 font-bold text-[10px] mb-3 uppercase tracking-widest",children:["Quiz Complete • Score: ",D,"/",a.length]}),e.jsx(k.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"bg-slate-50/50 rounded-xl p-3 mb-4 border border-slate-100 flex flex-col gap-2",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-slate-400 text-[9px] font-black uppercase tracking-widest text-left mb-1.5 ml-1",children:"Performance Details"}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(hs,{value:D,label:"Correct Answers",delay:500,icon:e.jsx(kt,{size:14,className:"h-3 w-3 text-emerald-500"})}),e.jsx(hs,{value:je,label:"Total XP Earned",delay:800,icon:e.jsx(Me,{size:14,className:"h-3 w-3 text-amber-500"})}),e.jsxs(k.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:1.2,duration:.4},className:"flex items-center justify-between pt-1.5 mt-1 border-t border-slate-100",children:[e.jsx("span",{className:"text-slate-400 text-[9px] font-black uppercase tracking-widest",children:"Final Accuracy"}),e.jsxs("span",{className:"text-lg font-black text-slate-800 tabular-nums",children:[m,"%"]})]})]})]})}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(he,{size:"lg",onClick:()=>{l(0),d(0),j(null),z(""),$(0),M(0),C(0),Pe(0),ye([]),u(!1),T(!1),I(!1),Ee({}),yt({}),nt({}),Ye(!1)},className:"w-full h-10 sm:h-11 rounded-2xl text-xs font-black bg-white hover:bg-slate-50 text-purple-600 border-2 border-purple-100",children:"RETAKE QUIZ"}),e.jsx(he,{size:"lg",onClick:()=>o(m,K),className:"w-full h-10 sm:h-11 rounded-2xl text-xs font-black bg-purple-600 hover:bg-purple-700 text-white shadow-lg shadow-purple-200",children:"BACK TO MODULE"})]})]})]});return ct.createPortal(J,O)}return e.jsxs(e.Fragment,{children:[te&&ct.createPortal(e.jsx(k.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},className:"fixed right-6 top-1/2 -translate-y-1/2 z-[9999] w-64",children:e.jsxs("div",{className:"bg-white rounded-2xl p-3 border border-slate-200 shadow-[0_10px_40px_rgba(0,0,0,0.2)]",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2 px-1",children:[e.jsxs("h4",{className:"text-xs font-bold text-[#0a1628] flex items-center gap-2",children:[e.jsx(ot,{size:14,className:"text-purple-600"})," Calculator"]}),e.jsx("button",{onClick:()=>xt(!1),className:"w-6 h-6 rounded-full bg-slate-100 flex items-center justify-center text-slate-500 hover:text-slate-800 hover:bg-slate-200 transition-colors",children:e.jsx(Ue,{size:12})})]}),e.jsx(ks,{isOpen:!0,onClose:()=>xt(!1),inline:!0})]})}),document.getElementById("modal-root")),wt&&ct.createPortal(e.jsx("div",{className:"fixed inset-0 z-[200] flex items-center justify-center p-4 bg-slate-900/50",children:e.jsxs(k.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},className:"bg-white rounded-[2rem] p-6 max-w-xs w-full text-center border-2 border-rose-200 shadow-[0_25px_60px_rgba(0,0,0,0.15)]",children:[e.jsx(k.div,{animate:{scale:[1,1.1,1]},transition:{duration:1,repeat:1/0},className:"text-6xl mb-4",children:"💔"}),e.jsx("h2",{className:"text-2xl font-black text-slate-800 mb-3",children:"Out of Lives!"}),e.jsx("p",{className:"text-slate-500 text-sm mb-4",children:"Your hearts have run out. You can wait for them to refill or head back and review your lessons in the meantime."}),e.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2 text-rose-500 font-bold",children:[e.jsx("img",{src:"/icons/quiz_heart.png",alt:"Hearts",className:"w-5 h-5"}),e.jsx("span",{children:"0 / 15 hearts"})]}),e.jsxs("p",{className:"text-slate-400 text-xs mb-4",children:["Next heart in: ",e.jsxs("span",{className:"font-bold text-slate-600",children:[Math.floor(Qe/6e4),":",Math.floor(Qe%6e4/1e3).toString().padStart(2,"0")]})," (15 minutes per heart)"]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(he,{onClick:i,className:"w-full py-3 bg-rose-500 hover:bg-rose-600 text-white font-bold rounded-full",children:"Exit Quiz"}),e.jsx(he,{onClick:()=>{At(!1)},className:"w-full py-3 bg-slate-100 hover:bg-slate-200 text-slate-700 font-bold rounded-full",children:"Review Lessons"})]})]})}),document.getElementById("modal-root")),e.jsxs(Re,{children:[ke&&_e&&e.jsx(k.div,{initial:{y:-20,opacity:0},animate:{y:0,opacity:1},exit:{y:-20,opacity:0},transition:{type:"spring",damping:20,stiffness:300},className:"fixed top-24 left-1/2 -translate-x-1/2 z-[75] pointer-events-none",style:{willChange:"transform, opacity"},children:e.jsx("div",{className:"bg-white/90 px-4 py-2 rounded-2xl shadow-xl font-bold text-sm",children:_e})},"popup"),xe&&e.jsx(k.div,{initial:{opacity:0,scale:.8,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:1.1,filter:"blur(10px)"},transition:{type:"spring",damping:20,stiffness:300},className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-[100] pointer-events-none flex flex-col items-center justify-center",children:e.jsxs("div",{className:"bg-white/95 backdrop-blur-xl border border-slate-200 rounded-[2rem] p-6 md:p-8 shadow-[0_30px_80px_rgba(0,0,0,0.15)] flex flex-col items-center min-w-[280px] md:min-w-[320px]",children:[e.jsx("img",{src:"/mascot/modules_avatar.png",alt:"Mascot",className:"w-24 h-24 md:w-32 md:h-32 mb-4 drop-shadow-[0_10px_20px_rgba(0,0,0,0.15)]"}),e.jsx("h2",{className:`text-3xl md:text-4xl font-black mb-4 uppercase tracking-widest ${P?"text-emerald-500":"text-rose-500"}`,children:P?"Correct!":"Incorrect"}),P?e.jsxs("div",{className:"flex flex-col items-center gap-3 w-full justify-center",children:[e.jsx("div",{className:"flex items-center gap-2 bg-emerald-500/20 text-emerald-400 px-4 py-2 rounded-full font-bold border border-emerald-500/30",children:e.jsxs("span",{children:["+ ",(Ce[n]||[]).length>0?5:10," XP"]})}),v==="streak"&&e.jsxs("div",{className:"flex items-center gap-2 bg-orange-500/20 text-orange-400 px-4 py-1.5 rounded-full text-sm font-bold border border-orange-500/30",children:[e.jsx(Ht,{size:14})," Streak Started!"]}),v==="multiplier2"&&e.jsxs("div",{className:"flex items-center gap-2 bg-amber-500/20 text-amber-400 px-4 py-1.5 rounded-full text-sm font-bold border border-amber-500/30",children:[e.jsx(Me,{size:14})," Multiplier ×2!"]}),v==="multiplier3"&&e.jsxs("div",{className:"flex items-center gap-2 bg-amber-500/20 text-amber-400 px-4 py-1.5 rounded-full text-sm font-bold border border-amber-500/30",children:[e.jsx(Me,{size:14})," Multiplier ×3!"]})]}):e.jsxs("div",{className:"bg-rose-500/20 border border-rose-500/30 text-rose-400 font-bold px-5 py-2 rounded-xl text-center",children:["Correct: ",f.correctAnswer]})]})},"round-result")]}),e.jsxs("div",{className:"fixed inset-0 z-50 h-screen w-full flex flex-col bg-slate-50 overflow-hidden",children:[e.jsxs("header",{className:`relative shrink-0 flex flex-col items-center justify-start px-4 pt-4 sm:pt-6 pb-6 z-[60] shadow-md overflow-hidden ${Jt.gradient} rounded-b-[32px] sm:rounded-b-[40px] min-h-[110px] sm:min-h-[130px]`,children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none",children:[e.jsx("div",{className:"absolute top-0 left-0 w-64 h-64 bg-white opacity-10 rounded-full -translate-x-1/2 -translate-y-1/2 blur-2xl"}),e.jsx("div",{className:"absolute bottom-0 right-0 w-80 h-80 bg-white opacity-10 rounded-full translate-x-1/3 translate-y-1/3 blur-3xl"}),Et.map((m,S)=>e.jsx("div",{className:"absolute text-white/10",style:{top:`${10+S*15}%`,left:`${10+S*25%80}%`,transform:`rotate(${S*45}deg) scale(${1+S%3*.2})`},children:e.jsx(m,{size:48+S%2*32})},S))]}),e.jsxs("div",{className:"w-full max-w-7xl flex items-start justify-between relative z-10 mb-4 sm:mb-6",children:[e.jsx("div",{className:"flex-1 pointer-events-none"}),e.jsxs("div",{className:"relative flex items-center justify-center bg-purple-900/40 backdrop-blur-md px-6 sm:px-8 py-3 rounded-full border border-white/10 gap-3 sm:gap-4 shadow-inner",children:[e.jsx("div",{className:"w-3 h-3 sm:w-4 sm:h-4 rounded-full bg-yellow-400 shrink-0 shadow-[0_0_10px_rgba(250,204,21,0.6)]"}),e.jsxs("div",{className:"flex flex-col items-start justify-center",children:[e.jsx("span",{className:"text-[10px] sm:text-[11px] font-black text-purple-200 uppercase tracking-widest leading-none mb-1",children:"Try It Yourself!"}),e.jsxs("span",{className:"font-bold text-white tracking-wide text-base sm:text-lg leading-none truncate max-w-[200px] sm:max-w-[300px]",children:["LESSON ",t.id||"1"]})]})]}),e.jsxs("div",{className:"flex-1 flex justify-end gap-2 sm:gap-3 relative pointer-events-auto",children:[e.jsx("button",{onClick:()=>rt(!He),className:"w-10 h-10 sm:w-12 sm:h-12 rounded-full bg-purple-900/20 text-white flex items-center justify-center hover:bg-purple-900/40 transition-colors shadow-sm border border-white/10",children:He?e.jsx(Ss,{size:20}):e.jsx(Cs,{size:20})}),e.jsx("button",{onClick:Ie,className:"hidden sm:flex w-10 h-10 sm:w-12 sm:h-12 rounded-full bg-purple-900/20 text-white items-center justify-center hover:bg-purple-900/40 transition-colors shadow-sm border border-white/10",children:Je?e.jsx(zs,{size:20}):e.jsx(Ms,{size:20})}),e.jsx("button",{onClick:()=>Be(!0),className:"w-10 h-10 sm:w-12 sm:h-12 rounded-full bg-purple-900/20 text-white flex items-center justify-center hover:bg-purple-900/40 transition-colors shadow-sm border border-white/10",children:e.jsx(Qs,{size:20})})]})]}),e.jsx("div",{className:"w-full max-w-[50rem] flex items-center justify-center px-4 z-10",children:e.jsx("div",{className:"w-full flex items-center gap-2 sm:gap-3",children:a.map((m,S)=>e.jsx("div",{className:`h-1.5 sm:h-2 rounded-full flex-1 transition-all ${S<=n?"bg-white shadow-[0_0_8px_rgba(255,255,255,0.8)]":"bg-white/20"}`},S))})})]}),e.jsx(Re,{children:Se&&e.jsx(k.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] bg-black/60 backdrop-blur-sm flex items-center justify-center p-4",onClick:()=>Be(!1),children:e.jsxs(k.div,{onClick:m=>m.stopPropagation(),initial:{scale:.9,opacity:0,y:20},animate:{scale:1,opacity:1,y:0},exit:{scale:.9,opacity:0,y:20},className:"bg-white rounded-[32px] p-6 sm:p-8 max-w-sm w-full shadow-2xl border border-slate-200 flex flex-col gap-4 text-center",children:[e.jsx("h2",{className:"text-2xl font-black text-[#0a1628]",children:"Pause Menu"}),e.jsx(he,{onClick:()=>Be(!1),className:"w-full py-6 rounded-2xl bg-slate-100 text-slate-700 font-bold",children:"Continue Quiz"}),e.jsx(he,{onClick:i,className:"w-full py-6 rounded-2xl bg-red-500 text-white font-bold",children:"Exit Quiz"})]})})}),e.jsxs("div",{className:"w-full max-w-[54rem] mx-auto shrink-0 flex items-center justify-between px-4 sm:px-6 py-2 sm:py-3 z-[50] relative mt-4",children:[e.jsx("button",{onClick:()=>d(m=>Math.max(0,m-1)),disabled:r===0,className:`w-10 h-10 sm:w-12 sm:h-12 shrink-0 rounded-full flex items-center justify-center shadow-md border-2 transition-all ${r===0?"bg-slate-100 text-slate-400 border-slate-200 cursor-not-allowed":"bg-white text-purple-600 border-purple-100 hover:bg-purple-50 hover:border-purple-200 hover:scale-105 active:scale-95"}`,children:e.jsx(_s,{size:24})}),e.jsxs("div",{className:"flex items-center justify-center gap-3 sm:gap-5 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 px-8 sm:px-10 py-2 rounded-full bg-white shadow-md border border-slate-200/60 text-rose-500 font-extrabold text-sm sm:text-base",children:[e.jsx("img",{src:"/icons/quiz_heart.png",alt:"Hearts",className:"w-5 h-5 object-contain"}),me]}),e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 px-8 sm:px-10 py-2 rounded-full bg-white shadow-md border border-slate-200/60 text-yellow-500 font-extrabold text-sm sm:text-base",children:[e.jsx("img",{src:"/icons/quiz_key.png",alt:"Keys",className:"w-5 h-5 object-contain"}),B]}),e.jsxs("div",{className:"flex items-center gap-3 sm:gap-4 px-3 py-1.5 pl-5 sm:pl-6 rounded-full bg-white shadow-md border border-slate-200/60",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-orange-500 font-extrabold text-sm sm:text-base",children:[e.jsx("img",{src:"/icons/quiz_streak.png",alt:"Streak",className:"w-5 h-5 object-contain"})," ",p]}),e.jsxs("div",{className:"bg-emerald-100 text-emerald-800 px-4 py-1.5 rounded-full font-bold text-sm sm:text-base shadow-inner border border-emerald-200/50",children:["+ ",je," pts"]})]})]}),e.jsx("button",{onClick:()=>d(m=>Math.min(n,m+1)),disabled:r>=n,className:`w-10 h-10 sm:w-12 sm:h-12 shrink-0 rounded-full flex items-center justify-center shadow-md border-2 transition-all ${r>=n?"bg-slate-100 text-slate-400 border-slate-200 cursor-not-allowed":"bg-white text-purple-600 border-purple-100 hover:bg-purple-50 hover:border-purple-200 hover:scale-105 active:scale-95"}`,children:e.jsx(ht,{size:24})})]}),e.jsx("main",{className:"flex-1 overflow-y-auto w-full px-4 sm:px-6 pt-0 pb-6 flex flex-col items-center relative z-10",children:e.jsxs(k.div,{initial:{opacity:0,x:20},animate:jt?{x:[-10,10,-10,10,0],scale:[1,1.01,1],opacity:1}:{opacity:1,x:0},className:"w-full max-w-3xl flex flex-col mt-2",children:[e.jsxs("div",{className:"bg-white rounded-3xl shadow-lg border-t-[6px] border-purple-500 p-6 sm:p-8 text-center flex flex-col items-center mb-6 w-full relative overflow-hidden",children:[(()=>{const S=[{label:"New",color:"bg-blue-100 text-blue-700",icon:e.jsx(As,{size:14,className:"mr-1.5"})},{label:"Learning",color:"bg-amber-100 text-amber-700",icon:e.jsx(St,{size:14,className:"mr-1.5"})},{label:"Retry",color:"bg-rose-100 text-rose-700",icon:e.jsx(Ps,{size:14,className:"mr-1.5"})},{label:"Mastered",color:"bg-emerald-100 text-emerald-700",icon:e.jsx(Ct,{size:14,className:"mr-1.5"})}][r%4];return e.jsxs("div",{className:`${S.color} px-4 py-1.5 rounded-full text-[11px] sm:text-xs font-black uppercase tracking-widest mb-6 flex items-center shadow-sm`,children:[S.icon," ",S.label]})})(),e.jsx("h2",{className:"text-xl sm:text-2xl font-extrabold text-[#0a1628] leading-tight w-full",children:f.question.includes("___")?e.jsx("span",{children:f.question.split("___").map((m,S,L)=>e.jsxs(we.Fragment,{children:[m,S0,value:x,onChange:q=>z(q.target.value),className:`inline-block w-24 mx-2 border-b-4 outline-none text-center bg-transparent font-bold ${A?Ze[r]?"border-[#75D06A] text-[#75D06A]":"border-rose-500 text-rose-500":"border-[#7C3AED] text-[#7C3AED] focus:border-[#75D06A]"}`})]},S))}):f.question})]}),e.jsxs("div",{className:"w-full flex flex-col items-center",children:[(f.type==="multiple-choice"||f.type==="true-false")&&e.jsx("div",{className:"w-full grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-5",children:(f.type==="true-false"?["True","False"]:U).map((m,S)=>{const L=typeof m=="string"?m:m.text,q=typeof m=="string"?`${f.id}-${S}`:m.id,K=(et[r]||[]).includes(L),O=Te[r]||_,J=Ce[n]||[],ve=J.includes(L),it=J.length,Xe=U.filter(Ws=>Ws.text!==f.correctAnswer).length,tt=r===n&&Xe>0&&it>=Xe;let Ne="bg-white hover:bg-slate-50 border-transparent text-slate-700 hover:border-slate-200",Tt=!1;return tt?(Tt=!0,L===f.correctAnswer?Ne="bg-emerald-50 border-emerald-400 text-emerald-800":K?Ne="bg-rose-50 border-rose-400 text-rose-800 opacity-80":Ne="bg-slate-100 border-slate-200 text-slate-400 opacity-40 line-through"):ve?Ne="bg-slate-100 border-slate-200 text-slate-400 opacity-40 line-through cursor-not-allowed":O?L===f.correctAnswer?Ne="bg-emerald-50 border-emerald-400 text-emerald-800 shadow-[0_0_15px_rgba(16,185,129,0.2)] scale-[1.02] z-10":Ne="bg-slate-50 border-slate-200 text-slate-400 opacity-60":A?L===f.correctAnswer?Ne="bg-emerald-50 border-emerald-400 text-emerald-800 shadow-[0_0_15px_rgba(16,185,129,0.2)] scale-[1.02] z-10":K?Ne="bg-rose-50 border-rose-400 text-rose-800 opacity-60":Ne="bg-slate-50 border-slate-200 text-slate-400 opacity-60":K?Ne="bg-rose-50 border-rose-400 text-rose-800 opacity-60":g===q&&(Ne="bg-purple-50 border-[#9956DE] text-[#9956DE]"),e.jsxs("button",{disabled:Tt||A||K||O||ve,onClick:()=>{Tt||A||G||K||O||ve||(j(q),Zt(L))},className:`p-4 sm:p-5 rounded-2xl shadow-sm border-[3px] font-extrabold text-base sm:text-lg text-left transition-all flex items-center justify-between ${Ne} ${A||O||ve?"cursor-default":"hover:shadow-md hover:-translate-y-0.5 active:translate-y-0"}`,children:[e.jsx("span",{className:"truncate pr-4",children:L}),ve&&e.jsx(Ue,{size:20,className:"text-slate-400 shrink-0"}),O&&L===f.correctAnswer&&e.jsx(kt,{size:24,className:"text-emerald-500 shrink-0"}),A&&L===f.correctAnswer&&!O&&e.jsx(kt,{size:24,className:"text-emerald-500 shrink-0"}),(A||K)&&K&&e.jsx(Ue,{size:24,className:"text-rose-500 shrink-0"})]},q)})}),_&&e.jsx(k.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"w-full mt-6 space-y-4 max-w-3xl",children:e.jsxs("div",{className:"border-2 rounded-2xl p-5 flex items-start gap-4 bg-sky-50 border-sky-200",children:[e.jsx("img",{src:"/mascot/modules_avatar.png",className:"w-10 h-10 shrink-0",alt:"AI Explain"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-extrabold text-lg mb-1 text-sky-700",children:"Explanation"}),e.jsx("p",{className:"text-base leading-relaxed text-sky-800",children:f.explanation||`The correct answer is: ${f.correctAnswer}`})]})]})})]})]},r)}),e.jsxs("footer",{className:`shrink-0 relative z-[60] flex flex-col items-center justify-center p-4 sm:p-6 ${Jt.gradient} rounded-t-[32px] sm:rounded-t-[40px] shadow-[0_-10px_40px_rgba(0,0,0,0.15)]`,children:[e.jsx("div",{className:"absolute inset-0 z-0 pointer-events-none opacity-20",children:Et.slice(0,3).map((m,S)=>e.jsx("div",{className:"absolute text-white",style:{top:`${20+S*20}%`,left:`${20+S*30}%`,transform:`rotate(${S*30}deg) scale(1.5)`},children:e.jsx(m,{size:32})},S))}),e.jsx("div",{className:"relative z-10 flex flex-col gap-3",children:rd(n),className:"bg-white text-slate-700 font-extrabold text-lg px-6 sm:px-8 py-3 sm:py-4 rounded-full flex items-center gap-2 sm:gap-3 shadow-lg hover:bg-slate-50 transition-transform hover:scale-105 active:scale-95 border border-slate-200",children:[e.jsx(ht,{size:20,className:"sm:w-6 sm:h-6"}),"Back to Current Question"]})]}):e.jsx(e.Fragment,{children:(()=>{const m=(Ce[n]||[]).length,S=U.filter(K=>K.text!==f.correctAnswer).length,L=S>0&&m>=S,q=R&&!P||Te[n]||_||L;if(_)return e.jsxs("button",{onClick:mt,className:"bg-orange-500 hover:bg-orange-600 text-white font-extrabold text-lg px-8 py-4 rounded-full flex items-center justify-center gap-3 shadow-xl hover:scale-[1.02] active:scale-[0.98] transition-all w-full",children:[n0&&!R&&!Te[n]&&!_&&!L;return e.jsxs("div",{className:"flex flex-wrap justify-center gap-3 sm:gap-4",children:[e.jsxs("button",{onClick:qe,disabled:!le,className:"bg-white hover:bg-slate-50 disabled:opacity-70 disabled:cursor-not-allowed text-slate-700 font-bold px-6 sm:px-8 py-3 sm:py-3.5 rounded-full flex items-center gap-2 shadow-lg transition-transform hover:scale-105 active:scale-95 border border-slate-200",children:[e.jsx("img",{src:"/icons/quiz_key.png",alt:"Hint",className:"w-5 h-5 object-contain"}),"Hint"]}),e.jsxs("button",{onClick:Bs,disabled:Te[n]||R||_,className:"bg-white hover:bg-slate-50 disabled:opacity-70 disabled:cursor-not-allowed text-slate-700 font-bold px-6 sm:px-8 py-3 sm:py-3.5 rounded-full flex items-center gap-2 shadow-lg transition-transform hover:scale-105 active:scale-95 border border-slate-200",children:[e.jsx(Ca,{size:18,className:"text-purple-500"}),"Reveal"]}),e.jsxs("button",{onClick:oe,className:"bg-white hover:bg-slate-50 text-slate-700 font-bold px-6 sm:px-8 py-3 sm:py-3.5 rounded-full flex items-center gap-2 shadow-lg transition-transform hover:scale-105 active:scale-95 border border-slate-200",children:[e.jsx("img",{src:"/mascot/modules_avatar.png",className:"w-5 h-5 drop-shadow-sm",alt:"AI Explain"}),"Explain"]}),e.jsx("button",{onClick:()=>xt(K=>!K),className:`w-11 h-11 sm:w-12 sm:h-12 rounded-full flex items-center justify-center shadow-lg transition-transform hover:scale-105 active:scale-95 border border-slate-200 ${te?"bg-purple-100 text-purple-600 border-purple-300":"bg-white hover:bg-slate-50 text-slate-700"}`,children:e.jsx(ot,{size:20})})]})})()})})]})]})]})};function sr(){return e.jsxs("div",{className:"rounded-2xl overflow-hidden bg-slate-900 shadow-lg",children:[e.jsx("div",{className:"relative w-full aspect-video bg-slate-800 animate-pulse"}),e.jsxs("div",{className:"px-4 py-3 bg-slate-800 space-y-2",children:[e.jsx("div",{className:"h-4 bg-slate-700 rounded w-3/4 animate-pulse"}),e.jsx("div",{className:"h-3 bg-slate-700 rounded w-1/2 animate-pulse"})]})]})}const ar=({videos:t,topic:a})=>{const[o,i]=s.useState(0);if(!t||t.length===0)return e.jsx(sr,{});const n=t[o],l=t.filter((r,d)=>d!==o);return e.jsxs("div",{className:"space-y-4",children:[e.jsx(Re,{mode:"wait",children:e.jsxs(k.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"rounded-2xl overflow-hidden bg-slate-900 shadow-lg",children:[e.jsx("div",{className:"relative w-full aspect-video",children:e.jsx("iframe",{src:`https://www.youtube.com/embed/${n.videoId}?rel=0&modestbranding=1`,title:n.title,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"absolute inset-0 w-full h-full border-0"})}),e.jsxs("div",{className:"px-4 py-3 bg-slate-800",children:[e.jsx("p",{className:"text-slate-200 text-sm font-medium truncate",children:n.title}),e.jsx("p",{className:"text-slate-400 text-xs mt-0.5",children:n.channelTitle})]})]},n.videoId)}),l.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs text-slate-500 font-medium uppercase tracking-wide",children:"More videos"}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:l.slice(0,2).map(r=>{const d=t.findIndex(g=>g.videoId===r.videoId);return e.jsxs("button",{onClick:()=>i(d),className:"group text-left rounded-xl overflow-hidden border border-slate-200 hover:border-rose-300 hover:shadow-md transition-all duration-200 bg-white",children:[e.jsxs("div",{className:"relative aspect-video",children:[e.jsx("img",{src:r.thumbnailUrl,alt:r.title,loading:"lazy",className:"w-full h-full object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors flex items-center justify-center",children:e.jsx("div",{className:"w-8 h-8 rounded-full bg-white/90 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity shadow-sm",children:e.jsx(Ls,{size:14,className:"text-rose-500 ml-0.5"})})})]}),e.jsxs("div",{className:"p-2.5",children:[e.jsx("p",{className:"text-slate-700 text-xs font-medium line-clamp-2 leading-snug",children:r.title}),e.jsx("p",{className:"text-slate-400 text-[10px] mt-0.5 truncate",children:r.channelTitle})]})]},r.videoId)})})]})]})},rr="https://deign86-mathpulse-api-v3test.hf.space";async function $s(t,a,o=!1){const i={"Content-Type":"application/json",...a?.headers||{}},n=qs.currentUser;if(n)try{const r=await n.getIdToken(o);r&&(i.Authorization=`Bearer ${r}`)}catch(r){throw console.error("[lessonService] Failed to get Firebase ID token:",r),new Error("Authentication failed. Please sign in again.")}const l=await fetch(`${rr}${t}`,{...a,headers:i});if(l.status===401&&n&&!o)return $s(t,a,!0);if(!l.ok){let r;try{r=await l.json()}catch{r=await l.text()}const d=new Error(typeof r=="object"?JSON.stringify(r):r);throw d.status=l.status,d.body=r,d}return l.json()}async function lr(t){return $s("/api/rag/lesson",{method:"POST",body:JSON.stringify(t)})}const nr="rag_lesson_";function Kt(t){return`${nr}${t}`}function ir(t){try{const a=sessionStorage.getItem(Kt(t));if(a)return JSON.parse(a)}catch{}return null}function or(t,a){try{sessionStorage.setItem(Kt(t),JSON.stringify(a))}catch{}}function cr(t,a,o=!0){const[i,n]=s.useState([]),[l,r]=s.useState(!0),[d,g]=s.useState(null),[j,x]=s.useState([]),[z,R]=s.useState("low"),[u,P]=s.useState(0),[T,D]=s.useState(!1),[$,p]=s.useState(void 0),[M,h]=s.useState(!1),C=s.useCallback(async()=>{if(!o||!t)return;const I=ir(t);if(I){n(I.sections),x(I.sources),R(I.retrievalBand),P(I.retrievalConfidence),D(I.needsReview),p(I.activeModel),r(!1),g(null),h(!1);return}r(!0),g(null),h(!1);try{const V=(await Wt(()=>import("./vendor-firebase-auth-BW5XT768.js"),__vite__mapDeps([0,1])).then(se=>se.getAuth().currentUser))?.uid,G=await lr({...a,lessonId:t,userId:V});n(G.sections),x(G.sources||[]),R(G.retrievalBand),P(G.retrievalConfidence),D(G.needsReview),p(G.activeModel),or(t,G),g(null),h(!1)}catch(U){const V=U.status||U.response?.status,G=U.body||U.response;let se="Failed to load lesson content.",ce=!1;V===404&&G?.error==="no_curriculum_context"?(se=G.message||"Lesson source PDF not found or not yet ingested.",ce=!0):V===401?se="Please sign in again to access lessons.":navigator.onLine||(se="No internet connection. Please try again when online.",ce=!0),g(se),h(ce),n([])}finally{r(!1)}},[t,o,JSON.stringify(a)]);s.useEffect(()=>{C()},[C]);const H=s.useCallback(()=>{t&&sessionStorage.removeItem(Kt(t)),r(!0),g(null),C()},[C,t]);return{sections:i,isLoading:l,error:d,retry:H,sources:j,retrievalBand:z,retrievalConfidence:u,needsReview:T,activeModel:$,isOffline:M}}function dr(){return e.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-slate-50 gap-5",children:[e.jsx("div",{className:"w-12 h-12 rounded-full border-4 border-rose-400 border-t-transparent animate-spin"}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-slate-700 font-semibold text-base",children:"Loading lesson from DepEd curriculum..."}),e.jsx("p",{className:"text-slate-400 text-xs max-w-xs",children:"This may take a moment while the AI retrieves curriculum content."})]}),e.jsx("div",{className:"w-64 h-2 bg-slate-200 rounded-full overflow-hidden",children:e.jsx(k.div,{className:"h-full bg-rose-300 rounded-full",animate:{x:["-100%","100%"]},transition:{duration:1.2,repeat:1/0,ease:"easeInOut"},style:{width:"50%"}})})]})}function xr({message:t,onRetry:a,isOffline:o}){return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-50 p-6",children:e.jsxs(k.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"bg-white rounded-3xl p-8 max-w-md w-full shadow-xl border border-slate-200 text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-red-50 rounded-2xl flex items-center justify-center mx-auto mb-5",children:e.jsx(vs,{className:"text-red-500",size:32})}),e.jsx("h2",{className:"text-xl font-bold text-slate-800 mb-2",children:o?"Lesson Source Unavailable":"Failed to Load Lesson"}),e.jsx("p",{className:"text-slate-500 text-sm leading-relaxed mb-6",children:t}),e.jsxs(he,{onClick:a,className:"w-full py-3 rounded-xl font-bold bg-rose-500 hover:bg-rose-600 text-white flex items-center justify-center gap-2",children:[e.jsx(Ps,{size:16}),"Try Again"]}),e.jsx("button",{onClick:a,className:"mt-3 text-slate-400 text-xs hover:text-slate-600 underline",children:"Retry"})]})})}function mr({section:t,sectionIndex:a,onShowSolution:o,expandedIndex:i,lesson:n,practiceQuiz:l,practiceQuizCompleted:r,practiceQuizScore:d,onStartPractice:g,lessonSpecificTopic:j}){switch(t.type){case"introduction":return e.jsx("div",{className:"space-y-4",children:t.content?.trim()?e.jsx("p",{className:"text-slate-700 leading-relaxed text-base whitespace-pre-line",children:t.content}):e.jsx("p",{className:"text-slate-400 text-sm italic",children:"Introduction content is being prepared. Please proceed to the next section or try refreshing the lesson."})});case"key_concepts":return e.jsxs("div",{className:"space-y-4",children:[t.content?.trim()?e.jsx("p",{className:"text-slate-700 leading-relaxed text-base whitespace-pre-line mb-4",children:t.content}):e.jsx("p",{className:"text-slate-400 text-sm italic mb-4",children:"Key concepts are being compiled. Review the curriculum sources below for reference material."}),t.callouts&&t.callouts.length>0&&e.jsx("div",{className:"space-y-2",children:t.callouts.map((x,z)=>e.jsxs("div",{className:`rounded-xl p-4 border-l-4 flex items-start gap-3 ${x.type==="important"?"bg-rose-50 border-rose-400":x.type==="tip"?"bg-emerald-50 border-emerald-400":"bg-amber-50 border-amber-400"}`,children:[e.jsx(Es,{size:18,className:x.type==="important"?"text-rose-500 mt-0.5":x.type==="tip"?"text-emerald-500 mt-0.5":"text-amber-500 mt-0.5"}),e.jsx("p",{className:"text-sm text-slate-700",children:x.text})]},z))})]});case"video":return e.jsxs("div",{className:"space-y-4",children:[t.content?.trim()?e.jsx("p",{className:"text-slate-600 text-sm",children:t.content}):e.jsx("p",{className:"text-slate-400 text-sm italic",children:"Video explanation loading..."}),e.jsx(ar,{videos:t.videos||[],topic:n.title})]});case"worked_examples":return e.jsx("div",{className:"space-y-4",children:t.examples&&t.examples.length>0?t.examples.map((x,z)=>e.jsxs("div",{className:"bg-gradient-to-br from-rose-50 to-orange-50 rounded-2xl p-5 border border-rose-100",children:[e.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[e.jsx("div",{className:"w-8 h-8 bg-rose-500 rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx(ot,{size:16,className:"text-white"})}),e.jsx("p",{className:"font-semibold text-slate-800 text-sm pt-1",children:x.problem})]}),e.jsxs("div",{className:"space-y-1.5 ml-11",children:[x.steps.map((R,u)=>e.jsxs("p",{className:"text-slate-600 text-sm",children:[u+1,". ",R]},u)),x.answer&&e.jsxs("p",{className:"text-slate-800 text-sm font-semibold mt-2 pt-2 border-t border-rose-100",children:["Answer: ",x.answer]})]})]},z)):e.jsx("p",{className:"text-slate-400 text-sm italic",children:"No worked examples available for this lesson."})});case"important_notes":return e.jsx("div",{className:"space-y-2",children:t.bulletPoints&&t.bulletPoints.length>0?t.bulletPoints.map((x,z)=>e.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-xl bg-slate-50 border border-slate-100",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-rose-400 mt-2 flex-shrink-0"}),e.jsx("p",{className:"text-slate-700 text-sm leading-relaxed",children:x})]},z)):e.jsx("p",{className:"text-slate-400 text-sm italic",children:"No notes available for this lesson."})});case"try_it_yourself":return e.jsx("div",{className:"space-y-4",children:e.jsx("div",{className:"bg-white rounded-2xl p-5 border border-slate-200 shadow-sm",children:e.jsxs("div",{className:"text-center sm:text-left",children:[e.jsxs("div",{className:"flex items-center justify-center sm:justify-start gap-3 mb-3",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-rose-400 to-orange-400 rounded-xl flex items-center justify-center shadow-sm",children:e.jsx(Me,{size:20,className:"text-white"})}),e.jsx("h3",{className:"text-base font-bold text-slate-800",children:"Try It Yourself!"})]}),e.jsx("p",{className:"text-sm text-slate-600 mb-4 max-w-lg",children:"Test your understanding of this lesson with an interactive quiz. Answer questions, get instant feedback, and track your progress to reinforce what you've learned."}),l&&e.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-4 bg-slate-50 rounded-xl p-4",children:[e.jsxs("div",{className:"flex items-center gap-3 text-xs text-slate-500 font-medium",children:[e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(Is,{size:12})," ",l.questions," questions"]}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(st,{size:12})," ",l.duration]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-amber-500",children:[e.jsx(Me,{size:12,className:"fill-amber-300"})," +50 XP"]})]}),r?e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 bg-emerald-50 rounded-xl",children:[e.jsx(bt,{size:16,className:"text-emerald-600"}),e.jsxs("span",{className:"text-sm font-bold text-emerald-700",children:["Quiz Complete",typeof d=="number"&&e.jsxs("span",{className:"ml-1 text-emerald-600",children:[d,"%"]})]})]}):e.jsxs("button",{onClick:g,className:"px-5 py-2.5 rounded-xl bg-gradient-to-r from-rose-500 to-orange-400 text-white text-sm font-bold hover:opacity-90 transition-opacity shadow-md flex items-center justify-center gap-2",children:[e.jsx(Ts,{size:16}),"Start Quiz"]})]})]})})});case"summary":return e.jsx("div",{className:"space-y-3",children:t.content?.trim()?e.jsx("p",{className:"text-slate-700 text-base leading-relaxed whitespace-pre-line",children:t.content}):e.jsx("p",{className:"text-slate-400 text-sm italic",children:"Summary is being prepared. Review the lesson sections above to reinforce your understanding."})});default:return e.jsx("p",{className:"text-slate-500 text-sm italic",children:"Section content not available."})}}const ut=[{type:"introduction",label:"Intro",helper:"Welcome note",icon:st,accent:"from-[#1a85a4] to-[#126b84]",tint:"bg-[#1a85a4] text-white border-transparent",tabBg:"bg-[#1a85a4]"},{type:"key_concepts",label:"Concepts",helper:"Core ideas",icon:Pa,accent:"from-[#fbab41] to-[#e0983a]",tint:"bg-[#fbab41] text-white border-transparent",tabBg:"bg-[#fbab41]"},{type:"video",label:"Video",helper:"Watch and learn",icon:Es,accent:"from-[#e66a5e] to-[#ce5e53]",tint:"bg-[#e66a5e] text-white border-transparent",tabBg:"bg-[#e66a5e]"},{type:"worked_examples",label:"Examples",helper:"Guided solving",icon:Ts,accent:"from-[#7ec16d] to-[#71ad62]",tint:"bg-[#7ec16d] text-white border-transparent",tabBg:"bg-[#7ec16d]"},{type:"important_notes",label:"Notes",helper:"Key reminders",icon:Is,accent:"from-[#9a67d0] to-[#8a5cc0]",tint:"bg-[#9a67d0] text-white border-transparent",tabBg:"bg-[#9a67d0]"},{type:"try_it_yourself",label:"Practice",helper:"Try it yourself",icon:Ge,accent:"from-[#eb74a6] to-[#d46895]",tint:"bg-[#eb74a6] text-white border-transparent",tabBg:"bg-[#eb74a6]"},{type:"summary",label:"Summary",helper:"Wrap-up",icon:Mt,accent:"from-[#48bca6] to-[#40a794]",tint:"bg-[#48bca6] text-white border-transparent",tabBg:"bg-[#48bca6]"}],ur=({lesson:t,lessonCompletionXP:a=10,practiceQuiz:o,practiceQuizCompleted:i=!1,practiceQuizScore:n,initialSection:l=0,onStartPractice:r,onBack:d,onComplete:g,onProgressUpdate:j})=>{const[x,z]=s.useState(0),[R,u]=s.useState(1),[P,T]=s.useState(!1),[D,$]=s.useState(null),p={topic:t.title,subject:t.subject||"General Mathematics",quarter:t.quarter||1,lessonTitle:t.title,moduleId:t.subjectId,lessonId:t.id,competencyCode:t.competencyCode,learnerLevel:"Grade 11-12",storagePath:t.storagePath},{sections:M,isLoading:h,error:C,retry:H,sources:I,retrievalBand:U,activeModel:V,isOffline:G}=cr(t.id,p,!0),[se,ce]=s.useState(null);s.useEffect(()=>{if(M.length>0){const w=M.find(N=>N.type==="introduction");if(w?.title){const F=w.title.replace(/^Introduction\s+(to|-|:|—)\s+/i,"").replace(/\s*[-:—]\s*Introduction$/i,"").replace(/\s+Introduction$/i,"").trim();F&&F.toLowerCase()!=="introduction"&&ce(F)}}},[M]);const E=M.length||ut.length;if(s.useEffect(()=>{l>=0&&l{const w=M.findIndex(N=>N.type==="try_it_yourself");l===-1&&w>=0&&z(w)},[M,l]),s.useEffect(()=>{const w=E>0?(x+1)/E*100:0;j?.(w)},[x,E,j]),h)return e.jsx(dr,{});if(C&&M.length===0)return e.jsx(xr,{message:C,onRetry:H,isOffline:G});const fe=M[x]||{type:"introduction",title:"Loading...",content:"Lesson content is loading. Please wait a moment."},Le=()=>{xw+1)):(!o||i)&&T(!0)},_e=()=>{x>0&&(u(-1),z(w=>w-1))},$e=w=>{g(void 0,void 0,w)},ke=!!(o&&!i),be=ut[x]||ut[0],b=be.icon;return e.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col bg-slate-50 overflow-hidden font-sans",children:[e.jsx("header",{className:"flex-none bg-transparent px-4 sm:px-8 py-6 relative z-40",children:e.jsxs("div",{className:"max-w-6xl mx-auto flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-4 min-w-0",children:[e.jsx("button",{onClick:d,className:"w-10 h-10 rounded-full bg-white border border-slate-200 hover:bg-slate-50 flex items-center justify-center text-slate-600 transition-colors flex-shrink-0 shadow-sm","aria-label":"Go back",children:e.jsx(Rt,{size:18})}),e.jsxs("div",{className:"min-w-0 flex flex-col justify-center",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-0.5",children:[e.jsx(Ve,{size:12}),e.jsx("span",{children:"NOTEBOOK LESSON"}),V&&e.jsx("span",{className:"text-slate-400 bg-slate-100 px-1.5 py-0.5 rounded font-mono",children:V.split("/").pop()}),U==="high"&&e.jsx("span",{className:"text-emerald-600 bg-emerald-50 px-1.5 py-0.5 rounded text-[10px] font-semibold border border-emerald-200",children:"DepEd Source"})]}),e.jsx("h1",{className:"font-bold text-slate-800 text-sm truncate",children:t.title})]})]}),e.jsxs("div",{className:"flex items-center gap-4 flex-shrink-0",children:[e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wider",children:"Progress"}),e.jsxs("p",{className:"text-sm font-bold text-slate-800",children:[Math.round((x+1)/E*100),"%"]})]}),e.jsx("div",{className:"w-24 sm:w-32 h-2 bg-slate-200 rounded-full overflow-hidden",children:e.jsx(k.div,{className:"h-full bg-[#7ec16d] rounded-full",animate:{width:`${(x+1)/E*100}%`},transition:{duration:.25}})})]})]})}),e.jsx("main",{className:"flex-1 overflow-hidden px-4 sm:px-8 pb-8 relative flex justify-center",children:e.jsxs("div",{className:"w-full max-w-5xl h-full relative flex md:pl-16",children:[e.jsx("div",{className:"hidden md:flex absolute left-0 top-8 bottom-8 w-20 flex-col justify-between z-0 py-2",children:ut.map((w,N)=>{const F=N===x,W=w.icon;return e.jsxs("button",{onClick:()=>{u(N>x?1:-1),z(N)},className:vt("group relative flex items-center justify-start pl-4 rounded-l-[1.5rem] transition-all duration-300 shadow-sm border-r-0 flex-shrink-0",w.tabBg,F?"w-24 h-20 -translate-x-4 shadow-xl z-20 brightness-105":"w-16 h-16 hover:w-24 hover:h-20 hover:-translate-x-4 hover:brightness-110 opacity-90 hover:opacity-100 z-10"),"aria-label":`Go to ${w.label} section`,children:[e.jsx("div",{className:vt("transition-all duration-300 rounded-xl",F?"bg-white/30 p-2.5":"bg-white/20 p-2 group-hover:bg-white/30 group-hover:p-2.5"),children:e.jsx(W,{size:F?24:20,className:"text-white transition-transform duration-300 group-hover:scale-110"})}),e.jsxs("div",{className:"absolute right-full mr-3 px-3 py-1.5 bg-slate-800 text-white text-xs font-bold rounded-lg opacity-0 group-hover:opacity-100 pointer-events-none transition-opacity whitespace-nowrap z-[100] shadow-xl border border-slate-700/50",children:[e.jsx("div",{className:"absolute top-1/2 -right-1 -translate-y-1/2 w-2 h-2 bg-slate-800 rotate-45 border-r border-t border-slate-700/50"}),w.label]})]},w.type)})}),e.jsxs("div",{className:vt("flex-1 rounded-[2rem] shadow-2xl flex flex-col overflow-hidden relative z-10 transition-colors duration-500",be.tabBg),children:[e.jsxs("div",{className:"px-6 sm:px-8 py-5 flex items-center gap-4 text-white",children:[e.jsx("div",{className:"bg-white/20 p-2.5 rounded-xl shrink-0",children:e.jsx(b,{size:28,className:"text-white"})}),e.jsxs("div",{className:"flex flex-col min-w-0",children:[e.jsx("h2",{className:"text-2xl sm:text-3xl font-bold truncate",title:fe.title,children:fe.title}),e.jsx("p",{className:"text-white/90 text-sm font-medium truncate mt-0.5",title:t.title,children:t.title})]})]}),e.jsxs("div",{className:"flex-1 bg-[#fdfdfd] rounded-[1.5rem] m-2 mt-0 relative overflow-hidden shadow-inner flex flex-col",children:[e.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-30",style:{backgroundImage:"linear-gradient(transparent 95%, #cbd5e1 95%)",backgroundSize:"100% 40px",backgroundPosition:"0 0"}}),e.jsx("div",{className:"absolute top-0 bottom-0 left-12 md:left-16 w-[2px] bg-rose-300/60 pointer-events-none z-0"}),e.jsxs("div",{className:"relative z-10 flex-1 overflow-y-auto px-6 md:pl-24 md:pr-12 py-8",children:[e.jsx("div",{className:"md:hidden flex gap-2 overflow-x-auto pb-4 mb-4 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:ut.map((w,N)=>{const F=N===x,W=w.icon;return e.jsx("button",{onClick:()=>{u(N>x?1:-1),z(N)},className:vt("min-w-[100px] rounded-2xl px-3 py-2 text-left transition-all duration-200",F?`${w.tabBg} text-white shadow-md`:"bg-slate-100 text-slate-600 border border-slate-200"),children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{size:14}),e.jsx("span",{className:"text-xs font-bold",children:w.label})]})},w.type)})}),e.jsx(Re,{mode:"wait",children:e.jsxs(k.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:"space-y-6",children:[e.jsx("div",{className:"bg-white/90 backdrop-blur-sm rounded-[1.5rem] p-6 sm:p-8 shadow-sm border border-slate-100/50",children:e.jsx(mr,{section:fe,sectionIndex:x,onShowSolution:w=>$(D===w?null:w),expandedIndex:D,lesson:t,lessonSpecificTopic:se})}),I.length>0&&e.jsxs("details",{className:"rounded-xl border border-slate-200 bg-white/90 backdrop-blur-sm px-4 py-3 text-xs text-slate-500 shadow-sm",children:[e.jsxs("summary",{className:"cursor-pointer font-semibold text-slate-600 hover:text-slate-800",children:[I.length," source",I.length>1?"s":""," used"]}),e.jsx("div",{className:"mt-2 space-y-1 pl-2",children:I.slice(0,3).map((w,N)=>e.jsxs("p",{className:"font-mono truncate",children:[w.source_file," p.",w.page," (",Math.round((w.score||0)*100),"%)"]},N))})]})]},x)})]},x)]})]})]})}),e.jsx("footer",{className:"bg-transparent px-4 sm:px-8 flex-shrink-0 relative z-40 w-full flex justify-center items-center h-20",children:e.jsxs("div",{className:"w-full max-w-5xl flex flex-col items-center",children:[e.jsxs("div",{className:"flex items-center justify-center gap-8 w-full md:ml-16",children:[e.jsxs(he,{onClick:_e,disabled:x===0,variant:"outline",className:"px-6 py-3 rounded-full font-bold text-sm bg-white border-slate-200 text-slate-600 shadow-sm disabled:opacity-40 hover:bg-slate-50 transition-colors flex items-center gap-2",children:[e.jsx(Rt,{size:16}),"Previous"]}),e.jsxs("p",{className:"text-sm text-slate-500 font-bold tabular-nums",children:[x+1," / ",E]}),e.jsx(he,{onClick:Le,disabled:x===E-1&&ke,className:"px-8 py-3 rounded-full font-bold text-sm bg-[#7ec16d] text-white hover:bg-[#6ab359] shadow-md transition-colors disabled:opacity-40 flex items-center gap-2",children:x===E-1?e.jsxs(e.Fragment,{children:["Complete",e.jsx(bt,{size:16})]}):e.jsxs(e.Fragment,{children:["Next",e.jsx(pt,{size:16})]})})]}),x===E-1&&ke&&e.jsx("p",{className:"text-center text-xs font-semibold text-amber-600 mt-3 md:ml-16",children:"Complete the practice quiz first to unlock lesson completion."})]})}),e.jsx(Re,{children:P&&e.jsx(k.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 z-[100] flex items-center justify-center bg-slate-900/40 backdrop-blur-sm p-4",children:e.jsxs(k.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},className:"bg-white rounded-[2rem] p-8 max-w-sm w-full text-center shadow-2xl",children:[e.jsx("div",{className:"w-20 h-20 bg-[#7ec16d] rounded-full flex items-center justify-center mx-auto mb-5 shadow-lg",children:e.jsx(bt,{size:40,className:"text-white"})}),e.jsx("h2",{className:"text-2xl font-black text-slate-800 mb-2",children:"Lesson Complete!"}),e.jsxs("p",{className:"text-slate-500 text-sm mb-6 leading-relaxed",children:["Great job finishing ",e.jsx("strong",{className:"text-slate-700",children:t.title}),"."]}),e.jsxs("div",{className:"bg-emerald-50 rounded-2xl p-4 mb-6 border border-emerald-100",children:[e.jsx("div",{className:"flex items-center justify-center mb-1",children:e.jsx(Mt,{className:"text-[#7ec16d]",size:22})}),e.jsx("p",{className:"text-xs text-[#7ec16d] font-bold uppercase tracking-wider mb-0.5",children:"XP Earned"}),e.jsxs("p",{className:"text-3xl font-black text-[#7ec16d]",children:["+",a]})]}),e.jsxs("div",{className:"space-y-2.5",children:[e.jsx("button",{onClick:()=>$e(!0),disabled:ke,className:"w-full py-3 rounded-xl font-bold text-sm bg-[#1a85a4] text-white hover:bg-[#126b84] transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:"Continue to Next Lesson"}),e.jsx("button",{onClick:()=>$e(!1),className:"w-full py-3 rounded-xl font-bold text-sm bg-slate-100 text-slate-600 hover:bg-slate-200 transition-colors",children:"Back to Modules"})]})]})})})]})};function pr(t){return 6}const Nt={},hr=(t,a)=>{if(Nt[t]&&Nt[t].length)return Nt[t];const i=Array.from({length:8}).map((n,l)=>{const r=l+2,d=l+3,g=(r+d).toString();return{id:l+1,type:"multiple-choice",question:`Compute: ${r} + ${d}`,options:[g,(r*d).toString(),Math.abs(r-d).toString(),(r+d+1).toString()],correctAnswer:g,explanation:`Add ${r} and ${d} to get ${g}.`}});return Nt[t]=i,i},fr=({module:t,onBack:a,onEarnXP:o,isInQuizMode:i=!1,setIsInQuizMode:n})=>{const[r,d]=s.useState(null),{userProfile:g}=Ot(),[j,x]=s.useState(null),z=s.useRef(o);s.useEffect(()=>{z.current=o},[o]);const R=s.useRef(r);s.useEffect(()=>{R.current=r},[r]),s.useEffect(()=>{try{const b=sessionStorage.getItem(`mathpulse_module_${t.id}_selectedLesson`);if(b){const{lessonId:w}=JSON.parse(b),N=t.lessons.find(F=>F.id===w);N&&d({lesson:N,type:"lesson"})}}catch{}},[]),s.useEffect(()=>{if(r?.type==="lesson"&&r.lesson)try{sessionStorage.setItem(`mathpulse_module_${t.id}_selectedLesson`,JSON.stringify({lessonId:r.lesson.id}))}catch{}else if(r===null)try{sessionStorage.removeItem(`mathpulse_module_${t.id}_selectedLesson`)}catch{}},[r,t.id]);const u=s.useMemo(()=>{const b=Number(t.id.split("-").pop());return Number.isFinite(b)&&b>0?b:1},[t.id]),P=s.useMemo(()=>{const b=t.subjectId;return b||(zt.find(N=>N.modules.some(F=>F.id===t.id))?.id??null)},[t.id]),T=["#1FA7E1","#9956DE","#75D06A","#FFB356","#7274ED","#FF8B8B","#6ED1CF","#FB96BB"];s.useMemo(()=>{const b=t.subjectAccentColor;if(b)return b;const N=(P?zt.find(W=>W.id===P):null)?.modules?.findIndex(W=>W.id===t.id)??0,F=N>=0?N:0;return T[F%T.length]},[t,t.id,P]),s.useEffect(()=>{if(g?.uid)return ts(g.uid,x)},[g?.uid]);const D=s.useMemo(()=>P?j?.subjects?.[P]?.modulesProgress?.[t.id]??null:null,[t.id,P,j?.subjects]),[$,p]=s.useState(null),M=s.useMemo(()=>{const b=D?.lessonsCompleted??[];return new Set(b)},[D?.lessonsCompleted]),h=s.useMemo(()=>{const b=D?.quizzesCompleted??[];return new Set(b)},[D?.quizzesCompleted]),C=D?.lessonsCompleted?.length??t.lessons.filter(b=>b.completed).length,H=D?.quizzesCompleted?.length??t.quizzes.filter(b=>b.completed).length,I=D?.progress??t.progress,U=t.lessons.length+t.quizzes.length,V=C+H;t.lessons.length&&C/t.lessons.length*100,t.quizzes.length&&H/t.quizzes.length*100;const G=(b,w)=>{const N=j?.lessons?.[b]?.score;return typeof N=="number"&&Number.isFinite(N)?Math.max(0,Math.min(100,N)):w?100:0},se=s.useMemo(()=>{if(!U)return 0;const b=t.lessons.reduce((N,F)=>{const W=M.has(F.id)||F.completed;return N+G(F.id,W)},0),w=H*100;return Math.round((b+w)/U)},[M,H,t.lessons,t.quizzes.length,U,j?.lessons]),ce=I>0?I:se,E=s.useMemo(()=>{const b=t.quizzes.find(N=>N.type==="final"||/module\s+quiz|general\s+quiz/i.test(N.title));if(b)return b;const w=t.quizzes.find(N=>N.isStandalone===!0);return w||(t.quizzes.length?t.quizzes[0]:null)},[t.quizzes]),fe=s.useMemo(()=>{const b=new Map;t.lessons.forEach(N=>{b.set(N.id,[])});const w=t.lessons.length;return w===0||t.quizzes.forEach((N,F)=>{if(E?.id===N.id)return;const W=Math.min(F,w-1),de=t.lessons[W];if(!de)return;const pe=b.get(de.id)??[];pe.push(N),b.set(de.id,pe)}),b},[t.lessons,t.quizzes,E?.id]),Le=s.useMemo(()=>Math.max(1,Math.ceil(t.lessons.length/2)),[t.lessons.length]),_e=s.useCallback(()=>{d(null),p(null)},[]),$e=s.useCallback(()=>{const b=R.current?.type==="lesson"?R.current.lesson:null;if(!b)return;const w={id:`${b.id}-practice`,title:`Practice Quiz: ${b.title}`,questions:pr(),duration:b.duration,completed:!1,locked:!1,type:"practice"};p(b),d({type:"quiz",quiz:w})},[]),ke=s.useCallback((b,w,N)=>{const F=R.current;if(F?.type!=="lesson"||!F.lesson)return;const W=F.lesson,de=10;if(z.current?.(de,`Completed "${W.title}"`),g?.uid&&P&&(async()=>{try{await Xs(g.uid,P,t.id,W.id,0,de),await ss(g.uid,P,t.id,t.lessons.length,t.quizzes.length)}catch(pe){console.error("[LessonComplete] Failed to persist progress:",pe)}})(),N){const pe=t.lessons.findIndex(Ye=>Ye.id===W.id);pe!==-1&&pe0?d({type:"quiz",quiz:t.quizzes[0]}):d(null)}else d(null)},[P,t.id,t.lessons.length,t.quizzes.length]),be=s.useCallback(b=>{if(!g?.uid||!R.current||R.current.type!=="lesson")return;const w=R.current.lesson.id;(async()=>{try{await Us(g.uid,w,b)}catch(N){console.warn("[ModuleDetailView] Failed to persist lesson progress:",N)}})()},[g?.uid,t.id]);if(r)if(r.type==="lesson"){const b=fe.get(r.lesson.id)?.[0]??null,w=b?h.has(b.id)||b.completed:!1;return e.jsx(ur,{lesson:r.lesson,lessonCompletionXP:10,practiceQuiz:b,practiceQuizCompleted:w,initialSection:r.returnFromQuiz?-1:0,onBack:_e,onStartPractice:$e,onProgressUpdate:be,onComplete:ke})}else{const b=hr(r.quiz.id);return e.jsx(tr,{lesson:{id:parseInt(r.quiz.id.split("-").pop()||"1"),title:r.quiz.title,duration:r.quiz.duration,type:"quiz",completed:r.quiz.completed,locked:r.quiz.locked},questions:b,onBack:()=>{$?(d({type:"lesson",lesson:$,returnFromQuiz:!0}),p(null)):d(null),n&&n(!1)},onComplete:(w,N)=>{console.log("[QuizComplete] Score:",w,"totalXP from calculator:",N),g?.uid&&P&&(async()=>{try{await Vs(g.uid,P,t.id,r.quiz.id,w,[],0,N),await ss(g.uid,P,t.id,t.lessons.length,t.quizzes.length),await ts(g.uid,x)}catch(F){console.warn("[Quiz] Progress persist failed:",F)}o&&o(N??0,`Quiz Complete! +${N??0} XP`)})(),$?(d({type:"lesson",lesson:$,returnFromQuiz:!0}),p(null)):d(null),n&&n(!1)}})}return e.jsxs("div",{className:"h-full overflow-y-auto scrollbar-hide px-4 sm:px-6 xl:px-10 py-6 sm:py-8 relative",children:[e.jsx("div",{className:"relative mb-6 xl:mb-8 w-full sm:w-max",children:e.jsxs("button",{onClick:a,className:"flex items-center gap-2 px-4 py-2.5 rounded-full bg-white/80 backdrop-blur-xl border border-slate-200/60 text-slate-600 hover:text-indigo-600 font-bold text-sm tracking-wide transition-all hover:-translate-x-1 shadow-sm hover:shadow-md",children:[e.jsx(Rt,{size:18}),"Back"]})}),e.jsxs(k.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:`relative mb-6 lg:mb-8 rounded-[2rem] ${t.accentColor} shadow-[0_20px_40px_-15px_rgba(0,0,0,0.3)] shrink-0 overflow-hidden`,children:[e.jsx("div",{className:"absolute inset-0 bg-black/60 pointer-events-none z-0"}),e.jsx("div",{className:"absolute inset-0 opacity-10 pointer-events-none module-detail-grid-pattern"}),e.jsx("div",{className:"absolute top-0 right-0 w-[400px] h-[400px] bg-sky-500/20 blur-[100px] rounded-full pointer-events-none"}),e.jsxs("div",{className:"relative p-5 sm:p-7 md:p-10 flex flex-col md:flex-row md:items-center justify-between gap-6 md:gap-8",children:[e.jsxs("div",{className:"flex-1 text-white",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-4 md:mb-5",children:[e.jsxs("div",{className:"px-3 py-1 bg-white/10 backdrop-blur-md rounded-full text-[11px] font-black uppercase tracking-widest text-[#f8fafc] border border-white/20 shadow-sm flex items-center gap-1.5",children:[e.jsx(ns,{size:14})," Chapter ",t.id.split("-").pop()||"1"]}),e.jsxs("div",{className:"px-3 py-1 bg-white/10 backdrop-blur-md rounded-full text-[11px] font-black uppercase tracking-widest text-emerald-400 border border-emerald-400/30",children:["Lv ",u]})]}),e.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-display font-black text-white mb-3 md:mb-4 tracking-[-0.02em] leading-tight",children:t.title}),e.jsx("p",{className:"text-slate-300 text-sm md:text-[15px] max-w-2xl font-medium leading-relaxed mb-6 md:mb-8",children:t.description}),e.jsxs("div",{className:"bg-black/20 backdrop-blur-md rounded-2xl p-4 md:p-5 border border-white/10 max-w-xl",children:[e.jsxs("div",{className:"flex justify-between items-end mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(Mt,{size:20,className:"text-emerald-400"}),e.jsx("span",{className:"text-[12px] md:text-[13px] font-black text-white uppercase tracking-wider",children:"Module Mastery"})]}),e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsxs("span",{className:"text-[12px] md:text-[13px] font-bold text-slate-400 mb-0.5",children:[V,"/",U," steps"]}),e.jsxs("span",{className:"text-xl md:text-2xl font-black text-white shrink-0 leading-none",children:[Math.round(ce),"%"]})]})]}),e.jsx("div",{className:"h-3 bg-black/40 rounded-full overflow-hidden shadow-inner ring-1 ring-white/10 p-0.5",children:e.jsx(k.div,{initial:{width:0},animate:{width:`${ce}%`},transition:{duration:1.5,ease:"easeOut",delay:.2},className:`h-full rounded-full relative ${ce===100?"bg-gradient-to-r from-emerald-400 to-teal-300":t.accentColor}`,children:e.jsx("div",{className:"absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4IiBoZWlnaHQ9IjgiPgo8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMSI+PC9yZWN0Pgo8L3N2Zz4=')] opacity-30 mix-blend-overlay"})})})]})]}),e.jsxs("div",{className:"hidden lg:flex w-48 h-48 bg-white/5 rounded-[2rem] border border-white/10 backdrop-blur-md items-center justify-center transform rotate-[-3deg] shadow-2xl relative group hover:rotate-0 transition-all duration-500 shrink-0",children:[e.jsx("div",{className:`absolute inset-0 opacity-40 rounded-[2rem] ${t.progress===100?"bg-gradient-to-br from-emerald-400 to-teal-600":t.accentColor}`}),ce===100?e.jsx(Ct,{size:80,className:"text-white drop-shadow-xl z-10 scale-100 group-hover:scale-110 transition-transform duration-500",strokeWidth:1}):e.jsx(Ve,{size:80,className:"text-white drop-shadow-xl z-10 scale-100 group-hover:scale-110 transition-transform duration-500",strokeWidth:1}),e.jsx(k.div,{animate:{y:[-5,5,-5],rotate:[-10,10,-10]},transition:{duration:4,repeat:1/0},className:"absolute top-6 left-6 text-emerald-300 z-20",children:e.jsx(As,{size:20,fill:"currentColor"})}),e.jsx(k.div,{animate:{y:[5,-5,5],rotate:[10,-10,10]},transition:{duration:3.5,repeat:1/0},className:"absolute bottom-8 right-6 text-sky-300 z-20",children:e.jsx(ds,{size:24})})]})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto pr-2 pb-8 scrollbar-hide",children:e.jsxs("div",{className:"relative rounded-[2rem] border border-slate-200 bg-white/90 shadow-sm overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 pointer-events-none bg-[radial-gradient(circle_at_top_right,rgba(153,86,222,0.08),transparent_45%),radial-gradient(circle_at_bottom_left,rgba(31,167,225,0.08),transparent_45%)]"}),e.jsxs("div",{className:"relative z-10 px-4 sm:px-6 md:px-8 py-5 md:py-6 border-b border-slate-200/70 bg-white/70 backdrop-blur-sm flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("h2",{className:"font-display font-black text-xl md:text-2xl text-slate-800 flex items-center gap-3",children:[e.jsx(Ve,{size:24,className:"text-sky-500"}),"Study Journey"]}),e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsxs("div",{className:"text-xs md:text-sm font-bold bg-sky-100 text-sky-700 px-3 py-1 rounded-full shadow-sm border border-sky-200/50",children:["Lessons ",C,"/",t.lessons.length]}),e.jsxs("div",{className:"text-xs md:text-sm font-bold bg-rose-100 text-rose-700 px-3 py-1 rounded-full shadow-sm border border-rose-200/50",children:["Quizzes ",H,"/",t.quizzes.length]})]})]}),e.jsxs("div",{className:"relative z-10 px-4 sm:px-6 md:px-8 py-5 md:py-6 space-y-5",children:[t.lessons.map((b,w)=>{const N=M.has(b.id)||b.completed,F=G(b.id,N),W=T[w%T.length];return e.jsxs(we.Fragment,{children:[e.jsxs(k.div,{initial:{opacity:0,y:14},animate:{opacity:1,y:0},transition:{delay:w*.05},className:`relative rounded-[1.5rem] border overflow-hidden group transition-all duration-500 mb-6 ${b.locked?"border-slate-200 opacity-65 saturate-50":"border-slate-200/80 hover:border-slate-300 hover:shadow-[0_16px_40px_-15px_rgba(0,0,0,0.12)] hover:-translate-y-0.5"}`,children:[e.jsx("div",{className:"absolute top-0 left-0 right-0 h-[6px] z-20 bg-slate-100 overflow-hidden",children:e.jsx(k.div,{initial:{width:0},animate:{width:`${Math.max(2,F)}%`},transition:{duration:1.2,ease:"easeOut",delay:.1+w*.05},className:"h-full relative",style:{backgroundColor:W},children:e.jsx("div",{className:"absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4IiBoZWlnaHQ9IjgiPgo8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMSI+PC9yZWN0Pgo8L3N2Zz4=')] opacity-30 mix-blend-overlay"})})}),e.jsx("div",{className:"absolute inset-0 bg-white transition-opacity duration-500 group-hover:opacity-90",style:{backgroundImage:`linear-gradient(to right, ${W}44 0%, ${W}11 50%, white 100%)`}}),e.jsx("div",{className:"absolute inset-0 opacity-[0.2] pointer-events-none",style:{backgroundImage:`radial-gradient(circle at 2px 2px, ${W} 1.5px, transparent 0)`,backgroundSize:"24px 24px"}}),e.jsx("div",{className:"absolute -top-12 -left-10 h-40 w-40 rounded-full blur-[32px] pointer-events-none transition-transform duration-700 group-hover:scale-[1.3] group-hover:translate-x-4",style:{backgroundColor:`${W}22`}}),e.jsx("div",{className:"absolute -bottom-8 right-8 h-32 w-32 rounded-full blur-2xl pointer-events-none transition-transform duration-700 group-hover:scale-125 group-hover:-translate-y-4",style:{backgroundColor:`${W}11`}}),e.jsx("div",{className:"absolute right-4 top-4 opacity-10 pointer-events-none transition-all duration-500 group-hover:rotate-12 group-hover:scale-110 drop-shadow-sm",style:{color:W},children:e.jsx(ds,{size:56,strokeWidth:1})}),e.jsx("div",{className:"absolute right-16 bottom-5 opacity-10 pointer-events-none transition-all duration-500 group-hover:-rotate-6 group-hover:-translate-y-2 drop-shadow-sm",style:{color:W},children:e.jsx(Ve,{size:40,strokeWidth:1})}),e.jsxs("div",{className:"relative z-10 p-4 md:p-5 pt-6 space-y-4",children:[e.jsxs("button",{type:"button",onClick:()=>!b.locked&&d({lesson:b,type:"lesson"}),className:`w-full text-left flex flex-wrap items-center justify-between gap-3 rounded-2xl px-5 py-4 transition shadow-sm ${b.locked?"cursor-not-allowed border border-slate-200 bg-white/70":"cursor-pointer bg-white hover:bg-slate-50"}`,children:[e.jsxs("div",{className:"flex items-center gap-4 min-w-0",children:[e.jsx("div",{className:`w-12 h-12 rounded-full flex items-center justify-center shrink-0 transition-colors shadow-sm ${b.locked?"bg-slate-100 text-slate-400":"text-white"}`,style:b.locked?{}:N?{backgroundColor:"#0ea5e9"}:{backgroundColor:W},children:b.locked?e.jsx(qt,{size:18}):N?e.jsx(ka,{size:24}):e.jsx(Ls,{size:20,className:"ml-0.5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("p",{className:"text-[11px] md:text-[12px] font-black uppercase tracking-wider text-slate-500 mb-0.5",children:["Lesson ",w+1]}),e.jsx("h3",{className:"font-bold text-[16px] md:text-[18px] text-[#0a1628] truncate",children:b.title})]})]}),e.jsx("div",{className:"flex items-center justify-end",children:e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-slate-500 text-xs md:text-sm font-semibold bg-slate-100/80 px-3 py-1.5 rounded-xl",children:[e.jsx(st,{size:14}),b.duration]})})]}),e.jsxs("div",{className:"flex flex-wrap gap-3 px-1",children:[e.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-full bg-white px-4 py-1.5 text-[12px] font-bold shadow-sm transition hover:-translate-y-0.5",style:{color:W},children:[e.jsx(Ve,{size:14})," Study Materials"]}),e.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-full bg-white px-4 py-1.5 text-[12px] font-bold shadow-sm transition hover:-translate-y-0.5",style:{color:W},children:[e.jsx(ns,{size:14})," Quiz"]})]})]})]}),E&&w===Le-1&&e.jsxs(k.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{delay:.15+w*.03},className:"mt-8 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[e.jsx("div",{className:"flex-1 h-px bg-slate-200"}),e.jsx("span",{className:"text-xs font-bold text-indigo-400 uppercase tracking-widest text-center",children:"mid-module checkpoint"}),e.jsx("div",{className:"flex-1 h-px bg-slate-200"})]}),e.jsxs("div",{className:"relative rounded-[1.5rem] bg-[#533ab6] p-5 shadow-lg overflow-hidden group transition-all hover:shadow-xl hover:-translate-y-1",children:[e.jsx("div",{className:"absolute right-4 md:right-10 top-1/2 -translate-y-1/2 text-white/5 text-[140px] font-black font-display pointer-events-none group-hover:scale-110 transition-transform duration-500",children:"?"}),e.jsxs("div",{className:"relative z-10 flex flex-wrap items-center gap-4 md:gap-5",children:[e.jsx("div",{className:"w-14 h-14 rounded-[14px] bg-white/10 backdrop-blur-md border border-white/10 shrink-0 flex items-center justify-center shadow-inner",children:e.jsx(Ge,{size:28,className:"text-rose-400"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-[10px] md:text-[11px] font-black uppercase tracking-widest text-[#a3b1ee] mb-1 drop-shadow-sm",children:"COMPETENCY CHECK · General Quiz"}),e.jsx("h3",{className:"font-display font-medium text-[20px] md:text-[22px] text-white leading-tight mb-2 tracking-tight",children:E.title}),e.jsxs("p",{className:"text-xs font-semibold text-white/80 flex items-center gap-3",children:[e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(Bt,{size:12})," ",E.questions," Qs"]}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(st,{size:12})," ",E.duration]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-amber-300 drop-shadow-md",children:[e.jsx(Me,{size:12,className:"fill-amber-300"})," +50 XP"]})]})]}),e.jsx("button",{type:"button",onClick:()=>!E.locked&&(d({quiz:E,type:"quiz"}),n&&n(!0)),className:`px-6 py-2.5 rounded-xl text-xs md:text-sm font-bold tracking-wider transition-all backdrop-blur-sm self-center shrink-0 ${E.locked?"bg-white/5 text-white/30 border border-white/10 cursor-not-allowed":h.has(E.id)||E.completed?"bg-white/20 text-white border border-white/40 hover:bg-white/30 shadow-sm":"bg-transparent text-white border border-white/40 hover:bg-white/10 shadow-sm"}`,children:h.has(E.id)||E.completed?"REVIEW":"START"})]})]})]})]},b.id)}),t.lessons.length===0&&E&&e.jsxs("div",{className:"relative rounded-[1.5rem] bg-[#533ab6] p-5 shadow-lg overflow-hidden group",children:[e.jsx("div",{className:"absolute right-4 md:right-10 top-1/2 -translate-y-1/2 text-white/5 text-[140px] font-black font-display pointer-events-none group-hover:scale-110 transition-transform duration-500",children:"?"}),e.jsxs("div",{className:"relative z-10 flex flex-wrap items-center justify-between gap-4 md:gap-5",children:[e.jsxs("div",{className:"flex items-center gap-4 flex-1",children:[e.jsx("div",{className:"w-14 h-14 rounded-[14px] bg-white/10 backdrop-blur-md border border-white/10 shrink-0 flex items-center justify-center shadow-inner",children:e.jsx(Ge,{size:28,className:"text-rose-400"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] md:text-[11px] font-black uppercase tracking-widest text-[#a3b1ee] mb-1 drop-shadow-sm",children:"COMPETENCY CHECK · General Quiz"}),e.jsx("h3",{className:"font-display font-medium text-[20px] md:text-[22px] text-white leading-tight mb-2 tracking-tight",children:E.title}),e.jsxs("p",{className:"text-xs font-semibold text-white/80 flex items-center gap-3",children:[e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(Bt,{size:12})," ",E.questions," Qs"]}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(st,{size:12})," ",E.duration]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-amber-300 drop-shadow-md",children:[e.jsx(Me,{size:12,className:"fill-amber-300"})," +50 XP"]})]})]})]}),e.jsx("button",{type:"button",onClick:()=>!E.locked&&(d({quiz:E,type:"quiz"}),n&&n(!0)),className:`px-6 py-2.5 rounded-xl text-xs md:text-sm font-bold tracking-wider transition-all backdrop-blur-sm self-center shrink-0 ${E.locked?"bg-white/5 text-white/30 border border-white/10 cursor-not-allowed":h.has(E.id)||E.completed?"bg-white/20 text-white border border-white/40 hover:bg-white/30 shadow-sm":"bg-transparent text-white border border-white/40 hover:bg-white/10 shadow-sm"}`,children:h.has(E.id)||E.completed?"REVIEW":"START"})]})]})]})]})})]})},br=({onStartQuiz:t,searchQuery:a="",allowedSubjectIds:o})=>{const{userProfile:i}=Ot(),[n,l]=s.useState("all"),[r,d]=s.useState("all"),[g,j]=s.useState(null),x=s.useMemo(()=>!o||o.length===0?zt:zt.filter(p=>o.includes(p.id)),[o]);s.useEffect(()=>{i?.uid&&Gs(i.uid).then(j).catch(console.error)},[i?.uid]),s.useEffect(()=>{if(r==="all")return;x.some(M=>M.title===r)||d("all")},[x,r]);const z=g?.totalQuizzesCompleted||0,R=i?.totalXP||0,u=g?.averageScore?Math.round(g.averageScore):0,P=new Set(g?.quizAttempts?.map(p=>p.quizId)||[]),T={};if(g?.quizAttempts)for(const p of g.quizAttempts)(!T[p.quizId]||p.score>T[p.quizId])&&(T[p.quizId]=p.score);const $=x.flatMap(p=>p.modules.flatMap(M=>M.quizzes.map(h=>({id:h.id,title:h.title,subject:p.title,difficulty:h.type==="module"?"Medium":"Easy",questions:h.questions,duration:h.duration,xpReward:h.questions*5,type:h.type==="module"?"challenge":"practice",completed:P.has(h.id),bestScore:T[h.id],locked:h.locked})))).filter(p=>{const M=n==="all"||p.type===n,h=r==="all"||p.subject===r,C=!a||p.title.toLowerCase().includes(a.toLowerCase())||p.subject.toLowerCase().includes(a.toLowerCase());return M&&h&&C});return e.jsxs("div",{className:"px-4 sm:px-6 xl:px-10 py-4 sm:py-6",children:[e.jsxs("div",{className:"grid grid-cols-3 gap-4 mb-6",children:[e.jsxs(k.div,{whileHover:{scale:1.02},className:"bg-gradient-to-br from-sky-700 to-sky-500 rounded-2xl p-5 text-white shadow-lg",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("div",{className:"w-12 h-12 bg-white/20 rounded-xl flex items-center justify-center",children:e.jsx(Mt,{size:24})}),e.jsx("span",{className:"text-3xl font-bold",children:z})]}),e.jsx("p",{className:"text-sm font-medium text-sky-100",children:"Quizzes Completed"})]}),e.jsxs(k.div,{whileHover:{scale:1.02},className:"bg-gradient-to-br from-rose-500 to-rose-600 rounded-2xl p-5 text-white shadow-lg",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("div",{className:"w-12 h-12 bg-white/20 rounded-xl flex items-center justify-center",children:e.jsx(Me,{size:24})}),e.jsx("span",{className:"text-3xl font-bold",children:R.toLocaleString()})]}),e.jsx("p",{className:"text-sm font-medium text-cyan-100",children:"Total XP Earned"})]}),e.jsxs(k.div,{whileHover:{scale:1.02},className:"bg-gradient-to-br from-indigo-600 to-indigo-700 rounded-2xl p-5 text-white shadow-lg",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("div",{className:"w-12 h-12 bg-white/20 rounded-xl flex items-center justify-center",children:e.jsx(Ge,{size:24})}),e.jsxs("span",{className:"text-3xl font-bold",children:[u,"%"]})]}),e.jsx("p",{className:"text-sm font-medium text-sky-100",children:"Average Score"})]})]}),e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-2 bg-white rounded-xl p-1 shadow-sm",children:[e.jsx("button",{onClick:()=>l("all"),className:`px-4 py-2 rounded-lg text-sm font-bold transition-all ${n==="all"?"bg-sky-600 text-white shadow-md":"text-[#5a6578] hover:bg-[#edf1f7]"}`,children:"All"}),e.jsx("button",{onClick:()=>l("practice"),className:`px-4 py-2 rounded-lg text-sm font-bold transition-all ${n==="practice"?"bg-sky-500 text-white shadow-md":"text-[#5a6578] hover:bg-[#edf1f7]"}`,children:"Practice"}),e.jsx("button",{onClick:()=>l("challenge"),className:`px-4 py-2 rounded-lg text-sm font-bold transition-all ${n==="challenge"?"bg-orange-500 text-white shadow-md":"text-[#5a6578] hover:bg-[#edf1f7]"}`,children:"Challenge"}),e.jsx("button",{onClick:()=>l("mastery"),className:`px-4 py-2 rounded-lg text-sm font-bold transition-all ${n==="mastery"?"bg-sky-500 text-white shadow-md":"text-[#5a6578] hover:bg-[#edf1f7]"}`,children:"Mastery"})]}),e.jsxs("select",{value:r,onChange:p=>d(p.target.value),className:"px-4 py-2.5 bg-white border-2 border-[#dde3eb] rounded-xl text-sm font-bold text-[#0a1628] focus:border-indigo-600 focus:outline-none",children:[e.jsx("option",{value:"all",children:"All Subjects"}),x.map(p=>e.jsx("option",{value:p.title,children:p.title},p.id))]})]}),e.jsxs("div",{className:"pr-2 pb-4 rounded-[2rem] border border-slate-200 shadow-inner relative",style:{backgroundImage:"radial-gradient(#CBD5E1 1px, transparent 1px)",backgroundSize:"24px 24px",backgroundPosition:"-12px -12px",backgroundColor:"#FAFAFA"},children:[e.jsx("div",{className:"absolute left-12 top-0 bottom-0 w-0.5 bg-rose-200/60 pointer-events-none z-0"}),e.jsx("div",{className:"absolute left-[54px] top-0 bottom-0 w-px bg-rose-100/40 pointer-events-none z-0"}),e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 lg:gap-5 p-4 md:p-6 relative z-10",children:$.map((p,M)=>{const h=p.locked,C=p.difficulty==="Hard",H=p.type==="challenge";return e.jsx(k.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:M*.05},onClick:()=>!h&&t?.(p),className:`bg-white/90 backdrop-blur-sm rounded-2xl p-4 md:p-5 border-2 relative select-none transition-all duration-300 ${h?"border-slate-200 opacity-60 saturate-50 cursor-not-allowed":p.completed?"border-teal-200 shadow-sm hover:border-teal-300 hover:shadow-md cursor-pointer":C?"border-indigo-200 shadow-sm hover:border-indigo-300 hover:shadow-md cursor-pointer":"border-orange-200 shadow-sm hover:border-orange-300 hover:shadow-md cursor-pointer"} group`,children:e.jsxs("div",{className:"flex items-center justify-between gap-3 md:gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3 md:gap-4 flex-1",children:[e.jsx("div",{className:`w-10 h-10 md:w-12 md:h-12 rounded-xl flex items-center justify-center shrink-0 shadow-sm transform group-hover:rotate-3 transition-transform ${h?"bg-slate-100 text-slate-400":p.completed?"bg-teal-500 text-white":C?"bg-indigo-500 text-white":"bg-orange-500 text-white"}`,children:h?e.jsx(qt,{size:18}):p.completed?e.jsx(Ct,{size:18}):e.jsx(Bt,{size:18})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[e.jsxs("span",{className:`px-2 py-0.5 rounded-[6px] text-[9px] md:text-[10px] font-black uppercase tracking-wider ${C?"bg-indigo-100 text-indigo-700":H?"bg-orange-100 text-orange-700":"bg-sky-100 text-sky-700"}`,children:[p.type," ΓÇó ",p.difficulty]}),!h&&!p.completed&&e.jsx("span",{className:"w-1.5 h-1.5 md:w-2 md:h-2 rounded-full bg-rose-500 animate-pulse"})]}),e.jsx("h3",{className:`font-bold text-[14px] md:text-[16px] leading-tight mb-1 md:mb-1.5 transition-colors ${h?"text-slate-600":"text-[#0a1628]"}`,children:p.title}),e.jsx("p",{className:"text-[11px] md:text-[12px] text-slate-500 mb-1.5 line-clamp-1",children:p.subject}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 md:gap-3 text-[11px] md:text-[12px] font-bold text-slate-400",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ve,{size:12})," ",p.questions," Qs"]}),e.jsx("span",{className:"hidden sm:inline",children:"ΓÇó"}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(st,{size:12})," ",p.duration]}),e.jsx("span",{className:"hidden sm:inline",children:"ΓÇó"}),e.jsxs("span",{className:"flex items-center gap-1 text-rose-500",children:[e.jsx(Ct,{size:12})," +",p.xpReward," XP"]})]})]})]}),e.jsxs("div",{className:"flex flex-col items-end gap-2 shrink-0",children:[p.bestScore!==void 0&&e.jsxs("div",{className:"text-right",children:[e.jsxs("div",{className:`text-xl md:text-2xl font-black leading-none ${p.bestScore>=80?"text-teal-600":"text-orange-500"}`,children:[p.bestScore,"%"]}),e.jsx("div",{className:"text-[9px] uppercase tracking-wide text-slate-400 font-bold mt-1",children:"Best Score"})]}),!h&&e.jsx("div",{className:`px-3 py-1.5 md:px-4 md:py-2 rounded-xl text-[11px] md:text-[12px] font-black uppercase tracking-wider shadow-sm transition-all ${p.completed?"bg-white border border-slate-200 text-slate-600 group-hover:bg-slate-50":"bg-slate-900 text-white group-hover:bg-slate-600"}`,children:p.completed?"Review":"Start"})]})]})},p.id)})}),$.length===0&&e.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-slate-500 relative z-10",children:[e.jsx(Ge,{size:48,className:"mb-3"}),e.jsx("p",{className:"font-medium",children:"No quizzes found"}),e.jsx("p",{className:"text-sm",children:"Try adjusting your filters or search query"})]})]})]})},gr=` + @keyframes head-sway { + 0%, 100% { transform: rotate(-2deg) translateY(0); } + 50% { transform: rotate(2deg) translateY(-2px); } + } + @keyframes horn-left-wiggle { + 0%, 100% { transform: rotate(-4deg); } + 50% { transform: rotate(4deg); } + } + @keyframes horn-right-wiggle { + 0%, 100% { transform: rotate(4deg); } + 50% { transform: rotate(-4deg); } + } + @keyframes blink { + 0%, 90%, 100% { transform: scaleY(1); } + 95% { transform: scaleY(0.1); } + } + @keyframes mouth-talk { + 0%, 100% { transform: scaleY(1) scaleX(1); } + 25% { transform: scaleY(1.1) scaleX(0.98); } + 50% { transform: scaleY(0.9) scaleX(1.02); } + 75% { transform: scaleY(1.05) scaleX(0.98); } + } + .animate-head-sway { + transform-origin: 50% 75%; + animation: head-sway 4s ease-in-out infinite; + } + .animate-horn-left { + transform-origin: 50% 45%; + animation: horn-left-wiggle 4s ease-in-out infinite; + } + .animate-horn-right { + transform-origin: 50% 45%; + animation: horn-right-wiggle 4s ease-in-out infinite; + } + .animate-blink { + transform-origin: 50% 45%; + animation: blink 3.7s ease-in-out infinite; + } + .animate-mouth { + transform-origin: 50% 55%; + animation: mouth-talk 3s ease-in-out infinite; + } +`,wr=()=>{const t="absolute inset-0 w-full h-full object-contain";return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:gr}),e.jsxs("div",{className:"relative w-full h-[250px] flex items-end justify-center drop-shadow-sm select-none pointer-events-none",children:[e.jsx("img",{src:"/mascot/modules_avatar_body.png",alt:"Desk setup",className:`${t} z-10`}),e.jsxs("div",{className:`${t} z-20 animate-head-sway`,children:[e.jsx("img",{src:"/mascot/modules_left_horn.png",alt:"Left Horn",className:`${t} z-0 animate-horn-left`}),e.jsx("img",{src:"/mascot/modules_right_horn.png",alt:"Right Horn",className:`${t} z-0 animate-horn-right`}),e.jsx("img",{src:"/mascot/modules_head.png",alt:"Mascot Head",className:`${t} z-[1]`}),e.jsx("img",{src:"/mascot/modules_eyes.png",alt:"Eyes",className:`${t} z-[2] animate-blink`}),e.jsx("img",{src:"/mascot/modules_mouth.png",alt:"Mouth",className:`${t} z-[3] animate-mouth`})]})]})]})},fs=` + @keyframes score-pop { + 0% { transform: scale(1); } + 50% { transform: scale(1.4); } + 100% { transform: scale(1); } + } + @keyframes overlay-slide-up { + 0% { transform: translateY(40px) scale(0.85); opacity: 0; } + 100% { transform: translateY(0) scale(1); opacity: 1; } + } + @keyframes confetti-fall { + 0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; } + 100% { transform: translateY(110vh) rotate(720deg); opacity: 0; } + } + .animate-score-pop { animation: score-pop 0.5s ease-out forwards; } + .animate-overlay-slide-up { animation: overlay-slide-up 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards; } + .confetti-piece { + position: absolute; + width: 10px; + height: 10px; + animation: confetti-fall linear forwards; + } +`,yr=({viewportHeight:t})=>e.jsx("div",{className:"absolute inset-0 pointer-events-none z-[250] overflow-hidden flex justify-between bg-slate-900/5",children:we.useMemo(()=>[...Array(40)].map((a,o)=>({id:o,left:`${Math.random()*100}%`,duration:.6+Math.random()*.4,delay:Math.random()*.4})),[t]).map(a=>e.jsx(k.div,{className:"absolute w-0.5 h-16 bg-blue-400/30 rounded-full",style:{left:a.left,top:"-10%"},animate:{y:[0,t*1.2]},transition:{duration:a.duration,ease:"linear",delay:a.delay}},a.id))}),jr=()=>{const t=we.useMemo(()=>[...Array(60)].map((a,o)=>({id:o,left:`${Math.random()*100}%`,backgroundColor:["#75D06A","#6ED1CF","#9956DE","#FB96BB","#FFB356"][o%5],duration:2+Math.random()*2,delay:Math.random()*.5,size:6+Math.random()*8,borderRadius:Math.random()>.5?"50%":"2px"})),[]);return e.jsx("div",{className:"absolute inset-0 pointer-events-none z-[250] overflow-hidden",children:t.map(a=>e.jsx("div",{className:"confetti-piece",style:{left:a.left,top:"-10%",backgroundColor:a.backgroundColor,width:a.size,height:a.size,borderRadius:a.borderRadius,animationDuration:`${a.duration}s`,animationDelay:`${a.delay}s`}},a.id))})},vr=({viewportHeight:t,viewportWidth:a})=>{const o=we.useMemo(()=>[...Array(30)].map((i,n)=>({id:n,xShift:(Math.random()-.5)*a*.8,yShift:(Math.random()-.5)*t*.8,scale:Math.random()*1.5+.5,duration:2+Math.random()*1.5,delay:Math.random()*.35})),[t,a]);return e.jsx("div",{className:"absolute inset-0 pointer-events-none z-[250] overflow-hidden flex items-center justify-center",children:o.map(i=>e.jsx(k.div,{className:"absolute w-2 h-2 bg-amber-400 rounded-full shadow-[0_0_10px_rgba(251,191,36,0.5)]",style:{left:"50%",top:"50%"},animate:{y:[0,i.yShift],x:[0,i.xShift],scale:[0,i.scale,0],opacity:[0,1,0]},transition:{duration:i.duration,ease:"easeOut",delay:i.delay}},i.id))})},bs=({value:t,label:a,delay:o=0,icon:i})=>{const[n,l]=we.useState(0);return we.useEffect(()=>{if(t<=0)return;const r=1e3,d=30,g=Math.abs(Math.floor(r/d));let j=0;const x=setTimeout(()=>{const z=setInterval(()=>{j+=Math.max(1,Math.floor(t/d)),j>=t?(l(t),clearInterval(z)):l(j)},g);return()=>clearInterval(z)},o);return()=>clearTimeout(x)},[t,o]),t<0?null:e.jsxs(k.div,{initial:{opacity:0,transform:"translateX(-20px)"},animate:{opacity:1,transform:"translateX(0)"},transition:{delay:o/1e3,duration:.5},className:"flex items-center justify-between bg-slate-50 border border-slate-100 rounded-xl p-3",children:[e.jsxs("div",{className:"flex items-center gap-3 text-slate-500 font-bold uppercase tracking-wider text-[10px]",children:[i,a]}),e.jsxs("div",{className:"text-xl font-black text-purple-600 tabular-nums",children:["+",n]})]})};function Nr(t){if(t.questionType==="multiple_choice"&&t.options&&t.options.length>0){const a=t.options.findIndex(o=>o.trim().toLowerCase()===t.correctAnswer.trim().toLowerCase());return{id:t.id,question:t.question,options:t.options,correctAnswer:a>=0?a:0,correctAnswerText:t.correctAnswer,explanation:t.explanation,questionType:t.questionType,points:t.points,difficulty:t.difficulty,topic:t.topic,bloomLevel:t.bloomLevel}}return{id:t.id,question:t.question,options:[],correctAnswer:-1,correctAnswerText:t.correctAnswer,explanation:t.explanation,questionType:t.questionType,points:t.points,difficulty:t.difficulty,topic:t.topic,bloomLevel:t.bloomLevel}}function gs(t){return t.replace(/²/g,"^2").replace(/³/g,"^3").replace(/⁻¹/g,"^-1").replace(/⁰/g,"^0").replace(/¹/g,"^1").replace(/⁴/g,"^4").replace(/⁵/g,"^5").replace(/⁶/g,"^6").replace(/⁷/g,"^7").replace(/⁸/g,"^8").replace(/⁹/g,"^9").replace(/π/g,"pi").replace(/√/g,"sqrt").replace(/×/g,"*").replace(/÷/g,"/").replace(/\s+/g,"").toLowerCase().trim()}function kr(t,a,o){const i=n=>n.trim().toLowerCase().replace(/\s+/g," ");switch(o){case"identification":return i(t)===i(a);case"enumeration":{const n=t.split(",").map(r=>i(r)).filter(Boolean).sort(),l=a.split(",").map(r=>i(r)).filter(Boolean).sort();return JSON.stringify(n)===JSON.stringify(l)}case"word_problem":case"equation_based":{const n=gs(t),l=gs(a);if(n===l)return!0;const r=parseFloat(t.replace(/[^\d.\-]/g,"")),d=parseFloat(a.replace(/[^\d.\-]/g,""));return!isNaN(r)&&!isNaN(d)?Math.abs(r-d)<=.01:i(t)===i(a)}default:return i(t)===i(a)}}const Sr=({quiz:t,onClose:a,onComplete:o,studentId:i,atRiskSubjects:n=[]})=>{const[l,r]=s.useState(0),[d,g]=s.useState(null),[j,x]=s.useState(""),[z,R]=s.useState(!1),[u,P]=s.useState(!1),[T,D]=s.useState(!1),[$,p]=s.useState(0),[M,h]=s.useState(0),[C,H]=s.useState(1),[I,U]=s.useState([]),[V,G]=s.useState([]),[se,ce]=s.useState(Date.now()),[E,fe]=s.useState(!1),[Le,_e]=s.useState(!1),[$e,ke]=s.useState(null),[be,b]=s.useState(0),[w,N]=s.useState(0),[F,W]=s.useState(!1),[de,pe]=s.useState(!0),[Ye,Fe]=s.useState(!1),[Ke,dt]=s.useState({width:1280,height:720});s.useEffect(()=>{const v=()=>dt({width:window.innerWidth,height:window.innerHeight});return v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[]);const[at,Ze]=s.useState(0),[ye,Ae]=s.useState({}),[gt,ue]=s.useState(!1),[Se,Be]=s.useState(!1),[He,rt]=s.useState(!1),[Je,We]=s.useState(5),[lt,c]=s.useState(15),[_,X]=s.useState(null),[xe,Z]=s.useState(!1),[je,Pe]=s.useState(900*1e3),[Ce,Ee]=s.useState([]),[B,ze]=s.useState(0),[me,Oe]=s.useState(null),[ne]=s.useState(()=>t.loadedQuestions&&t.loadedQuestions.length>0?t.loadedQuestions.map(Nr):Array.from({length:t.questions},(v,y)=>({id:`q${y+1}`,question:Cr(t.subject,y),options:zr(t.subject,y),correctAnswer:Mr(t.subject,y),explanation:_r(t.subject,y,t.difficulty)})));s.useEffect(()=>{Ae({}),Ee([]),We(5),c(15),Ze(0),p(0),h(0),H(1)},[t.id]);const Y=ne[l];s.useEffect(()=>{const v=parseInt(t.duration)||10;b(v*60);const y=setInterval(()=>{b(Q=>Q<=1?(clearInterval(y),Pt(),0):Q-1)},1e3);return()=>clearInterval(y)},[]),s.useEffect(()=>{lt===0&&!_&&(X(Date.now()),Z(!0))},[lt,_]),s.useEffect(()=>{if(!xe||!_)return;const v=setInterval(()=>{const y=Date.now()-_,Q=Math.max(0,900*1e3-y);Pe(Q)},1e3);return()=>clearInterval(v)},[xe,_]);const[wt,At]=s.useState(Array.from({length:15},(v,y)=>({id:y,size:Math.random()*120+40,x:Math.random()*100,y:Math.random()*100,duration:Math.random()*20+15,delay:Math.random()*-20,color:["bg-purple-500/10","bg-blue-500/10","bg-cyan-500/10","bg-emerald-500/10"][Math.floor(Math.random()*4)]}))),Qe=v=>{if(de)try{const y=window.AudioContext||window.webkitAudioContext;if(!y)return;const Q=new y,f=Q.currentTime,A=(De,ge,ae,Ie=.1,oe="sine")=>{const re=Q.createOscillator(),qe=Q.createGain();re.type=oe,re.frequency.value=De,qe.gain.setValueAtTime(0,ge),qe.gain.linearRampToValueAtTime(Ie,ge+.05),qe.gain.exponentialRampToValueAtTime(.001,ge+ae),re.connect(qe),qe.connect(Q.destination),re.start(ge),re.stop(ge+ae)};v==="correct"?(A(880,f,.1,.1,"sine"),A(1108.73,f+.1,.2,.1,"sine")):v==="incorrect"?(A(300,f,.2,.05,"sawtooth"),A(250,f+.15,.3,.05,"sawtooth")):v==="combo"?(A(440,f,.1,.05,"square"),A(554.37,f+.1,.1,.05,"square"),A(659.25,f+.2,.1,.05,"square"),A(880,f+.3,.4,.05,"square")):v==="complete"&&(A(523.25,f,.1,.1),A(659.25,f+.15,.1,.1),A(783.99,f+.3,.1,.1),A(1046.5,f+.45,.5,.1))}catch{}},Pt=()=>{fe(!0),jt()},Te=()=>{if(Je<=0||u)return;const v=ye[l]||[],y=Y.options.filter(f=>f!==Y.correctAnswerText).filter(f=>!v.includes(f));if(y.length===0)return;const Q=y[Math.floor(Math.random()*y.length)];Ae(f=>({...f,[l]:[...v,Q]})),We(f=>Math.max(0,f-1)),Qe("correct")},yt=v=>{u||ie||(g(v),setTimeout(()=>{et(v)},150))},et=v=>{const y=Y.questionType!=null&&Y.questionType!=="multiple_choice",Q=v!==void 0?v:d;if(y){if(!j.trim())return}else if(Q===null)return;const f=y?kr(j,Y.correctAnswerText||"",Y.questionType||""):Q===Y.correctAnswer,A=y?j:String(Q),De=Math.round((Date.now()-se)/1e3);G(re=>[...re,{questionId:Y.id,answer:A,correct:f,timeSpent:De}]);const ge=[...I];if(ge[l]=f?1:0,U(ge),R(f),P(!0),!f){Be(!0),Qe("incorrect"),setTimeout(()=>Be(!1),500),c(re=>Math.max(0,re-1)),h(0),H(1),setTimeout(()=>{nt()},1500);return}Qe("correct");const Ie=(ye[l]||[]).length>0?5:10;Ze(re=>re+Ie),p($+1);const oe=M+1;h(oe),oe===2?Oe("streak"):oe===3&&C<2?Oe("multiplier2"):oe===5&&C<3&&Oe("multiplier3"),oe>0&&oe%3===0&&Qe("combo"),oe>=5?H(3):oe>=3?H(2):H(1),Wt(()=>import("./confetti.module-C94ZD2ww.js"),[]).then(re=>{re.default({particleCount:30,spread:40,colors:["#75D06A","#6ED1CF"],origin:{y:.6}})}),rt(!0),setTimeout(()=>{rt(!1),Oe(null),setTimeout(()=>nt(),300)},1500)},nt=()=>{if(l{const v=Math.round($/ne.length*100);let y=t.xpReward;v>=90?y=Math.round(y*1.5):v>=80&&(y=Math.round(y*1.25));const Q=parseInt(t.duration)*60;be>Q*.5&&(y=Math.round(y*1.2)),N(y);const f=Q-be;i&&na({lrn:i,quizId:t.id,subject:t.subject,score:v,totalQuestions:ne.length,correctAnswers:$,timeSpentSeconds:f}).catch(A=>console.error("[WARN] Automation: quiz pipeline failed:",A)),t.source==="ai_generated"&&i?ia(i,t.id,t.generatedQuizId,t.subject,t.source,v,y,f,V,ne.map(A=>({topic:A.topic||t.subject,difficulty:A.difficulty||"medium",bloomLevel:A.bloomLevel||"understand"}))).catch(A=>console.error("[WARN] Quiz result save failed:",A)):i&&Ys(i,t.id,t.subject,v,V.map(A=>({questionId:A.questionId,selectedAnswer:A.answer,isCorrect:A.correct})),f).catch(A=>console.error("[WARN] Practice quiz persist failed:",A)),Qe("complete")},ie=B{document.fullscreenElement?(document.exitFullscreen().catch(()=>{}),Fe(!1)):(document.documentElement.requestFullscreen().catch(()=>{}),Fe(!0))};if(E){const v=Math.round($/ne.length*100),y=v>=80,Q=v>=50&&v<80,f=v<50,A=document.getElementById("modal-root"),De=e.jsxs("div",{className:"fixed inset-0 z-[200] flex items-center justify-center p-4 bg-slate-900/50 backdrop-blur-sm",children:[e.jsx("style",{children:fs}),y&&e.jsx(jr,{}),Q&&e.jsx(vr,{viewportHeight:Ke.height,viewportWidth:Ke.width}),f&&e.jsx(yr,{viewportHeight:Ke.height}),e.jsxs(k.div,{initial:{opacity:0,scale:.8,y:40},animate:{opacity:1,scale:1,y:0},transition:{type:"spring",damping:18,stiffness:200},className:"w-full max-w-xs sm:max-w-sm bg-white border-2 border-slate-200 shadow-[0_25px_60px_rgba(0,0,0,0.15)] rounded-[2rem] p-4 sm:p-5 text-center relative z-10",children:[e.jsx(k.div,{initial:{scale:0,rotate:-180},animate:{scale:1,rotate:0},transition:{type:"spring",damping:12,stiffness:150,delay:.2},className:"mb-3",children:e.jsx("img",{src:"/mascot/modules_avatar.png",alt:"Mascot",className:"w-16 h-16 sm:w-20 sm:h-20 mx-auto drop-shadow-xl animate-mascot-float"})}),e.jsx(k.h2,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.3},className:`text-xl sm:text-2xl font-black uppercase tracking-tight mb-1 drop-shadow-sm ${y?"text-emerald-500":Q?"text-amber-500":"text-rose-500"}`,children:y?"EXCELLENT!":Q?"GOOD JOB!":"KEEP TRYING!"}),e.jsxs("p",{className:"text-slate-400 font-bold text-[10px] mb-3 uppercase tracking-widest",children:["Quiz Complete • Score: ",$,"/",ne.length]}),e.jsx(k.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"bg-slate-50/50 rounded-xl p-3 mb-4 border border-slate-100 flex flex-col gap-2",children:e.jsxs("div",{children:[e.jsx("h3",{className:"text-slate-400 text-[9px] font-black uppercase tracking-widest text-left mb-1.5 ml-1",children:"Performance Details"}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(bs,{value:$,label:"Correct Answers",delay:500,icon:e.jsx(kt,{className:"h-3 w-3 text-emerald-500"})}),e.jsx(bs,{value:at,label:"Total XP Earned",delay:800,icon:e.jsx(Me,{className:"h-3 w-3 text-amber-500"})}),e.jsxs(k.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:1.2,duration:.4},className:"flex items-center justify-between pt-1.5 mt-1 border-t border-slate-100",children:[e.jsx("span",{className:"text-slate-400 text-[9px] font-black uppercase tracking-widest",children:"Final Accuracy"}),e.jsxs("span",{className:"text-lg font-black text-slate-800 tabular-nums",children:[v,"%"]})]})]})]})}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(he,{size:"lg",onClick:()=>{r(0),ze(0),g(null),x(""),p(0),h(0),H(1),U([]),G([]),Ze(0),fe(!1),P(!1),D(!1),ce(Date.now()),Ae({}),Ee([]),ue(!1),We(5),_e(!1)},className:"w-full h-10 sm:h-11 rounded-2xl text-xs font-black bg-white hover:bg-slate-50 text-purple-600 border-2 border-purple-100",children:"RETAKE QUIZ"}),e.jsx(he,{size:"lg",onClick:a,className:"w-full h-10 sm:h-11 rounded-2xl text-xs font-black bg-purple-600 hover:bg-purple-700 text-white shadow-lg shadow-purple-200",children:"BACK TO PRACTICE CENTER"})]})]})]});return ct.createPortal(De,A)}return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:fs}),F&&ct.createPortal(e.jsx(k.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},className:"fixed right-6 top-1/2 -translate-y-1/2 z-[9999] w-64",children:e.jsxs("div",{className:"bg-white rounded-2xl p-3 border border-slate-200 shadow-[0_10px_40px_rgba(0,0,0,0.3)]",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2 px-1",children:[e.jsxs("h4",{className:"text-xs font-bold text-[#0a1628] flex items-center gap-2",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-purple-600",children:[e.jsx("rect",{x:"4",y:"2",width:"16",height:"20",rx:"2"}),e.jsx("line",{x1:"8",x2:"16",y1:"6",y2:"6"})]}),"Calculator"]}),e.jsx("button",{onClick:()=>W(!1),className:"w-6 h-6 rounded-full bg-slate-100 flex items-center justify-center text-slate-500 hover:text-slate-800 hover:bg-slate-200 transition-colors",children:e.jsx(Ue,{size:12})})]}),e.jsx(ks,{isOpen:!0,onClose:()=>W(!1),inline:!0})]})}),document.getElementById("modal-root")),xe&&ct.createPortal(e.jsx("div",{className:"fixed inset-0 z-[200] flex items-center justify-center p-4 bg-slate-900/50",children:e.jsxs(k.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},className:"bg-white rounded-[2rem] p-6 max-w-xs w-full text-center border-2 border-rose-200 shadow-[0_25px_60px_rgba(0,0,0,0.15)]",children:[e.jsx(k.div,{animate:{scale:[1,1.1,1]},transition:{duration:1,repeat:1/0},className:"text-6xl mb-4",children:"💔"}),e.jsx("h2",{className:"text-2xl font-black text-slate-800 mb-3",children:"Out of Lives!"}),e.jsx("p",{className:"text-slate-500 text-sm mb-4",children:"Your hearts have run out. You can wait for them to refill or head back and review your lessons in the meantime."}),e.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2 text-rose-500 font-bold",children:[e.jsx("img",{src:"/icons/quiz_heart.png",alt:"Hearts",className:"w-5 h-5"}),e.jsx("span",{children:"0 / 15 hearts"})]}),e.jsxs("p",{className:"text-slate-400 text-xs mb-4",children:["Next heart in: ",e.jsxs("span",{className:"font-bold text-slate-600",children:[Math.floor(je/6e4),":",Math.floor(je%6e4/1e3).toString().padStart(2,"0")]})," (15 minutes per heart)"]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(he,{onClick:a,className:"w-full py-3 bg-rose-500 hover:bg-rose-600 text-white font-bold rounded-full",children:"Exit Quiz"}),e.jsx(he,{onClick:()=>{Z(!1)},className:"w-full py-3 bg-slate-100 hover:bg-slate-200 text-slate-700 font-bold rounded-full",children:"Review Lessons"})]})]})}),document.getElementById("modal-root")),e.jsx(Re,{children:He&&z&&e.jsx(k.div,{initial:{opacity:0,scale:.8,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:1.1,filter:"blur(10px)"},transition:{type:"spring",damping:20,stiffness:300},className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-[200] pointer-events-none flex flex-col items-center justify-center",children:e.jsxs("div",{className:"bg-white/95 backdrop-blur-xl border border-slate-200 rounded-[2rem] p-6 md:p-8 shadow-[0_30px_80px_rgba(0,0,0,0.15)] flex flex-col items-center min-w-[280px] md:min-w-[320px]",children:[e.jsx("img",{src:"/mascot/modules_avatar.png",alt:"Mascot",className:"w-24 h-24 md:w-32 md:h-32 mb-4 drop-shadow-[0_10px_20px_rgba(0,0,0,0.15)]"}),e.jsx("h2",{className:"text-3xl md:text-4xl font-black mb-4 uppercase tracking-widest text-emerald-500",children:"Correct!"}),e.jsxs("div",{className:"flex flex-col items-center gap-3 w-full justify-center",children:[e.jsx("div",{className:"flex items-center gap-2 bg-emerald-500/20 text-emerald-400 px-4 py-2 rounded-full font-bold border border-emerald-500/30",children:e.jsxs("span",{children:["+ ",(ye[l]||[]).length>0?5:10," XP"]})}),me==="streak"&&e.jsxs("div",{className:"flex items-center gap-2 bg-orange-500/20 text-orange-400 px-4 py-1.5 rounded-full text-sm font-bold border border-orange-500/30",children:[e.jsx(Ht,{size:14})," Streak Started!"]}),me==="multiplier2"&&e.jsxs("div",{className:"flex items-center gap-2 bg-amber-500/20 text-amber-400 px-4 py-1.5 rounded-full text-sm font-bold border border-amber-500/30",children:[e.jsx(Me,{size:14})," Multiplier ×2!"]}),me==="multiplier3"&&e.jsxs("div",{className:"flex items-center gap-2 bg-amber-500/20 text-amber-400 px-4 py-1.5 rounded-full text-sm font-bold border border-amber-500/30",children:[e.jsx(Me,{size:14})," Multiplier ×3!"]})]})]})},"round-result")}),e.jsxs("div",{className:"fixed inset-0 z-[100] h-screen w-full flex flex-col bg-slate-50 overflow-hidden",children:[e.jsxs("header",{className:"relative shrink-0 flex flex-col items-center justify-start px-4 pt-4 sm:pt-6 pb-6 z-[60] shadow-md overflow-hidden bg-gradient-to-r from-purple-600 to-indigo-400 rounded-b-[32px] sm:rounded-b-[40px] min-h-[110px] sm:min-h-[130px]",children:[e.jsxs("div",{className:"absolute inset-0 z-0 pointer-events-none",children:[e.jsx("div",{className:"absolute top-0 left-0 w-64 h-64 bg-white opacity-10 rounded-full -translate-x-1/2 -translate-y-1/2 blur-2xl"}),e.jsx("div",{className:"absolute bottom-0 right-0 w-80 h-80 bg-white opacity-10 rounded-full translate-x-1/3 translate-y-1/3 blur-3xl"})]}),e.jsxs("div",{className:"w-full max-w-7xl flex items-start justify-between relative z-10 mb-4 sm:mb-6",children:[e.jsx("div",{className:"flex-1 flex items-center gap-2",children:e.jsxs("div",{className:"flex items-center gap-1 bg-white/20 px-3 py-1.5 rounded-full text-white text-sm font-bold",children:[e.jsx(st,{size:16})," ",Ar(be)]})}),e.jsxs("div",{className:"relative flex items-center justify-center bg-purple-900/40 backdrop-blur-md px-6 sm:px-8 py-3 rounded-full border border-white/10 gap-3 sm:gap-4 shadow-inner",children:[e.jsx("div",{className:"w-3 h-3 sm:w-4 sm:h-4 rounded-full bg-yellow-400 shrink-0 shadow-[0_0_10px_rgba(250,204,21,0.6)]"}),e.jsxs("div",{className:"flex flex-col items-start justify-center",children:[e.jsx("span",{className:"text-[10px] sm:text-[11px] font-black text-purple-200 uppercase tracking-widest leading-none mb-1",children:"Try It Yourself!"}),e.jsx("span",{className:"font-bold text-white tracking-wide text-base sm:text-lg leading-none truncate max-w-[200px] sm:max-w-[300px]",children:t.title||t.subject})]})]}),e.jsxs("div",{className:"flex-1 flex justify-end gap-2 sm:gap-3 relative pointer-events-auto",children:[e.jsx("button",{onClick:()=>pe(!de),className:"w-10 h-10 sm:w-12 sm:h-12 rounded-full bg-purple-900/20 text-white flex items-center justify-center hover:bg-purple-900/40 transition-colors shadow-sm border border-white/10",children:de?e.jsx(Ss,{size:20}):e.jsx(Cs,{size:20})}),e.jsx("button",{onClick:xt,className:"w-10 h-10 sm:w-12 sm:h-12 rounded-full bg-purple-900/20 text-white flex items-center justify-center hover:bg-purple-900/40 transition-colors shadow-sm border border-white/10",children:Ye?e.jsx(zs,{size:20}):e.jsx(Ms,{size:20})}),e.jsx("button",{onClick:a,className:"w-10 h-10 sm:w-12 sm:h-12 rounded-full bg-purple-900/20 text-white flex items-center justify-center hover:bg-purple-900/40 transition-colors shadow-sm border border-white/10",children:e.jsx(Ue,{size:20})})]})]}),e.jsx("div",{className:"w-full max-w-[50rem] flex items-center justify-center px-4 z-10",children:e.jsx("div",{className:"w-full flex items-center gap-2 sm:gap-3",children:ne.map((v,y)=>{let Q=y<=l?"bg-white shadow-[0_0_8px_rgba(255,255,255,0.8)]":"bg-white/20";return e.jsx("div",{className:`h-1.5 sm:h-2 rounded-full flex-1 transition-all ${Q}`},y)})})})]}),e.jsxs("div",{className:"w-full max-w-[54rem] mx-auto shrink-0 flex items-center justify-between px-4 sm:px-6 py-2 sm:py-3 z-[50] relative mt-8",children:[e.jsx("button",{onClick:()=>ze(v=>Math.max(0,v-1)),disabled:B===0,className:`w-10 h-10 sm:w-12 sm:h-12 shrink-0 rounded-full flex items-center justify-center shadow-md border-2 transition-all ${B===0?"bg-slate-100 text-slate-400 border-slate-200 cursor-not-allowed":"bg-white text-purple-600 border-purple-100 hover:bg-purple-50 hover:border-purple-200 hover:scale-105 active:scale-95"}`,children:e.jsx(_s,{size:24})}),e.jsxs("div",{className:"flex items-center justify-center gap-3 sm:gap-5 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 px-8 sm:px-10 py-2 rounded-full bg-white shadow-md border border-slate-200/60 text-rose-500 font-extrabold text-sm sm:text-base",children:[e.jsx("img",{src:"/icons/quiz_heart.png",alt:"Hearts",className:"w-5 h-5 object-contain"})," ",lt]}),e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 px-8 sm:px-10 py-2 rounded-full bg-white shadow-md border border-slate-200/60 text-yellow-500 font-extrabold text-sm sm:text-base",children:[e.jsx("img",{src:"/icons/quiz_key.png",alt:"Keys",className:"w-5 h-5 object-contain"})," ",Je]}),e.jsxs("div",{className:"flex items-center gap-3 sm:gap-4 px-3 py-1.5 pl-5 sm:pl-6 rounded-full bg-white shadow-md border border-slate-200/60",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-orange-500 font-extrabold text-sm sm:text-base",children:[e.jsx("img",{src:"/icons/quiz_streak.png",alt:"Streak",className:"w-5 h-5 object-contain"})," ",M]}),e.jsxs("div",{className:"bg-emerald-100 text-emerald-800 px-4 py-1.5 rounded-full font-bold text-sm sm:text-base shadow-inner border border-emerald-200/50",children:["+ ",at," pts"]})]})]}),e.jsx("button",{onClick:()=>ze(v=>Math.min(l,v+1)),disabled:B>=l,className:`w-10 h-10 sm:w-12 sm:h-12 shrink-0 rounded-full flex items-center justify-center shadow-md border-2 transition-all ${B>=l?"bg-slate-100 text-slate-400 border-slate-200 cursor-not-allowed":"bg-white text-purple-600 border-purple-100 hover:bg-purple-50 hover:border-purple-200 hover:scale-105 active:scale-95"}`,children:e.jsx(ht,{size:24})})]}),e.jsx("main",{className:"flex-1 overflow-y-auto w-full px-4 sm:px-6 pt-0 pb-6 flex flex-col items-center relative z-10",children:e.jsxs(k.div,{initial:{opacity:0,x:20},animate:Se?{x:[-10,10,-10,10,0],scale:[1,1.01,1],opacity:1}:{opacity:1,x:0},className:"w-full max-w-3xl flex flex-col mt-2",children:[e.jsxs("div",{className:"bg-white rounded-3xl shadow-lg border-t-[6px] border-purple-500 p-6 sm:p-8 text-center flex flex-col items-center mb-6 w-full relative overflow-hidden",children:[e.jsxs("div",{className:"bg-slate-100 text-slate-600 px-4 py-1.5 rounded-full text-[11px] sm:text-xs font-black uppercase tracking-widest mb-4 flex items-center shadow-sm",children:["Q",B+1," of ",ne.length]}),e.jsx("h2",{className:"text-xl sm:text-2xl font-extrabold text-[#0a1628] leading-tight w-full",children:te.question.includes("___")?e.jsx("span",{children:te.question.split("___").map((v,y,Q)=>e.jsxs(we.Fragment,{children:[v,yx(f.target.value),onKeyDown:f=>{f.key==="Enter"&&!u&&et()},className:`inline-block w-24 mx-2 border-b-4 outline-none text-center bg-transparent font-bold ${ie?"border-slate-300 text-slate-500":"border-[#7C3AED] text-[#7C3AED] focus:border-[#75D06A]"}`})]},y))}):te.question})]}),e.jsxs("div",{className:"w-full flex flex-col items-center",children:[te.questionType==="multiple_choice"||!te.questionType?e.jsx("div",{className:"w-full grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-5",children:(te.options||[]).map((v,y)=>{const Q=ye[l]||[],f=Q.includes(v),A=Q.length,De=(te.options||[]).length-1,ge=De>0&&A>=De;let ae="bg-white hover:bg-slate-50 border-transparent text-slate-700 hover:border-slate-200",Ie=!1;if(ge){Ie=!0;const oe=te.options?.[te.correctAnswer];v===oe?ae="bg-emerald-50 border-emerald-400 text-emerald-800":V[B]?.answer===String(y)?ae="bg-rose-50 border-rose-400 text-rose-800 opacity-80":ae="bg-slate-100 border-slate-200 text-slate-400 opacity-40 line-through"}else if(f)ae="bg-slate-100 border-slate-200 text-slate-400 opacity-40 line-through cursor-not-allowed";else if(ie){const oe=y===te.correctAnswer,re=B===l&&(d===y||$e===y)||B{Ie||ie||f||yt(y)},className:`p-4 sm:p-5 rounded-2xl shadow-sm border-[3px] font-extrabold text-base sm:text-lg text-left transition-all flex items-center justify-between ${ae} ${Ie||ie||f?"cursor-default":"hover:shadow-md hover:-translate-y-0.5 active:translate-y-0"}`,children:[e.jsx("span",{className:"truncate pr-4",children:v}),f&&e.jsx(It,{size:20,className:"text-slate-400 shrink-0"}),ie&&y===te.correctAnswer&&e.jsx(bt,{size:22,className:"text-emerald-500 shrink-0"}),ie&&d===y&&y!==te.correctAnswer&&e.jsx(It,{size:22,className:"text-rose-500 shrink-0"})]},y)})}):e.jsx("div",{className:"w-full max-w-2xl mx-auto flex flex-col gap-4",children:!te.question.includes("___")&&e.jsx("input",{type:"text",disabled:ie,value:B===l?j:"",onChange:v=>x(v.target.value),onKeyDown:v=>{v.key==="Enter"&&!u&&et()},placeholder:"Type your answer here...",className:`w-full p-4 sm:p-5 rounded-2xl border-[3px] font-extrabold text-lg text-center outline-none transition-colors ${ie?z?"border-emerald-400 text-emerald-700 bg-emerald-50":"border-rose-400 text-rose-700 bg-rose-50":"border-slate-200 focus:border-[#7C3AED] bg-white text-slate-800"}`})}),ie&&T&&e.jsxs("div",{className:"w-full max-w-3xl mt-6 flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-[#0a1628]",children:te.topic||t?.subject||"General Math"}),e.jsxs("p",{className:"text-sm text-slate-500",children:["Question ",B+1," Explanation"]})]}),e.jsx("img",{src:"/icons/default-module-avatar.png",alt:"Module Avatar",className:"w-12 h-12 rounded-full object-cover border-2 border-slate-200"})]}),ie&&T&&e.jsx(k.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"w-full mt-4 space-y-4 max-w-3xl",children:e.jsxs("div",{className:`border-2 rounded-2xl p-5 flex items-start gap-4 ${(B===l?z:V[B]?.correct)?"bg-emerald-50 border-emerald-200":"bg-rose-50 border-rose-200"}`,children:[(B===l?z:V[B]?.correct)?e.jsx(bt,{size:28,className:"text-emerald-500 shrink-0 mt-0.5"}):e.jsx(It,{size:28,className:"text-rose-500 shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:`font-extrabold text-lg mb-1 ${(B===l?z:V[B]?.correct)?"text-emerald-700":"text-rose-700"}`,children:(B===l?z:V[B]?.correct)?"Correct!":"Incorrect"}),e.jsx("p",{className:`text-base leading-relaxed ${(B===l?z:V[B]?.correct)?"text-emerald-800":"text-rose-800"}`,children:te.explanation||`Correct Answer: ${te.correctAnswerText||te.options?.[te.correctAnswer]}`})]})]})})]})]},B)}),e.jsx("footer",{className:"shrink-0 relative z-[60] flex flex-col items-center justify-center p-4 sm:p-6 bg-gradient-to-r from-purple-600 to-indigo-400 rounded-t-[32px] sm:rounded-t-[40px] shadow-[0_-10px_40px_rgba(0,0,0,0.15)]",children:(()=>{const v=(ye[l]||[]).length,y=(Y.options||[]).length-1,Q=y>0&&v>=y;return Q||ie&&!z?e.jsxs("button",{onClick:nt,className:"bg-orange-500 hover:bg-orange-600 text-white font-extrabold text-lg px-8 py-4 rounded-full flex items-center justify-center gap-3 shadow-xl hover:scale-[1.02] active:scale-[0.98] transition-all w-full max-w-md mx-auto",children:[l{const A=Je>0&&!u&&!Q;return e.jsxs("button",{onClick:Te,disabled:!A,className:"bg-white hover:bg-slate-50 disabled:opacity-70 disabled:cursor-not-allowed text-slate-700 font-bold px-6 sm:px-8 py-3 sm:py-3.5 rounded-full flex items-center gap-2 shadow-lg transition-transform hover:scale-105 active:scale-95 border border-slate-200",children:[e.jsx("img",{src:"/icons/quiz_key.png",alt:"Key",className:"w-5 h-5 object-contain"})," Hint"]})})(),ie&&e.jsxs("button",{onClick:()=>D(!0),className:"bg-white hover:bg-slate-50 text-slate-700 font-bold px-6 sm:px-8 py-3 sm:py-3.5 rounded-full flex items-center gap-2 shadow-lg transition-transform hover:scale-105 active:scale-95 border border-slate-200",children:[e.jsx(Ve,{size:20})," Explain"]}),e.jsx("button",{onClick:()=>W(A=>!A),className:`w-11 h-11 sm:w-12 sm:h-12 rounded-full flex items-center justify-center shadow-lg transition-transform hover:scale-105 active:scale-95 border border-slate-200 ${F?"bg-purple-100 text-purple-600 border-purple-300":"bg-white hover:bg-slate-50 text-slate-700"}`,children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"4",y:"2",width:"16",height:"20",rx:"2"}),e.jsx("line",{x1:"8",x2:"16",y1:"6",y2:"6"}),e.jsx("path",{d:"M16 10h.01"}),e.jsx("path",{d:"M12 10h.01"}),e.jsx("path",{d:"M8 10h.01"}),e.jsx("path",{d:"M12 14h.01"}),e.jsx("path",{d:"M8 14h.01"}),e.jsx("path",{d:"M12 18h.01"}),e.jsx("path",{d:"M8 18h.01"}),e.jsx("line",{x1:"16",x2:"16",y1:"14",y2:"18"})]})})]}):Bze(l),className:"bg-white text-slate-700 font-extrabold text-lg px-6 sm:px-8 py-3 sm:py-4 rounded-full inline-flex items-center gap-2 sm:gap-3 shadow-lg hover:bg-slate-50 transition-transform hover:scale-105 active:scale-95 border border-slate-200",children:[e.jsx(ht,{size:20}),"Back to Current Question"]}):null})()})]})]})};function Cr(t,a){const o={"Pre-Calculus":["What is the domain of the function f(x) = √(x - 2)?","Solve for x: 2^x = 16","What is the period of the function y = sin(2x)?","Find the inverse of f(x) = 3x + 5","What is the value of log₂(32)?","Simplify: (x² - 9) / (x - 3)","What is the range of f(x) = |x| - 3?","If f(x) = 2x + 1 and g(x) = x², find f(g(2)).","What is the amplitude of y = 3cos(x)?","Solve: log₃(x) = 4"],"General Mathematics":["Simplify: (2x + 3)(x - 4)","What is 15% of 240?","Solve: 3x + 7 = 22","What is the value of 5! (5 factorial)?","Convert 0.75 to a fraction","What is 25% of 360?","Simplify: 12/18","What is the GCD of 24 and 36?","Convert 3/8 to a decimal","If a shirt costs $40 and is 20% off, what is the sale price?","What is 2/3 + 1/4?","Calculate: 15% tip on a $80 bill","Simplify: 45/60","What fraction is equivalent to 0.125?","If 30% of a number is 45, what is the number?"],"Statistics and Probability":["What is the probability of rolling a 6 on a fair die?","Calculate the mean of: 4, 7, 9, 12, 15","What is the median of: 2, 5, 8, 11, 14?","In a bag with 5 red and 3 blue balls, what is P(red)?","What is the range of: 10, 15, 20, 25, 30?","What is the mode of: 3, 5, 5, 7, 8, 5, 9?","What is the standard deviation concept?","P(A) = 0.3, P(B) = 0.5, events independent. P(A and B) = ?","What is the median of: 4, 7, 10, 13?","How many ways can you arrange 3 books?"],"Basic Calculus":["Find the derivative of f(x) = 3x²","What is the limit of (x² - 4)/(x - 2) as x → 2?","Integrate: ∫ 2x dx","Find f'(x) if f(x) = 5x³ - 2x","What is the derivative of sin(x)?","Find the derivative of f(x) = eˣ + 3x","What is ∫ cos(x) dx?","Find the derivative of f(x) = ln(x)","What is the limit of 1/x as x → ∞?","Find f'(x) if f(x) = x⁴ - 2x² + 1"]},i=_t(t),n=o[i]||o["General Mathematics"];return n[a%n.length]}function _t(t){const a=t.toLowerCase();return a.includes("pre-calc")||a.includes("pre calc")||a.includes("precalc")?"Pre-Calculus":a.includes("statistic")||a.includes("probability")?"Statistics and Probability":a.includes("calculus")&&!a.includes("pre")?"Basic Calculus":a.includes("general")||a.includes("math")||a.includes("algebra")||a.includes("fraction")||a.includes("percent")||a.includes("ratio")||a.includes("geometry")?"General Mathematics":a.includes("derivative")||a.includes("integral")||a.includes("limit")?"Basic Calculus":a.includes("trig")||a.includes("function")||a.includes("log")?"Pre-Calculus":a.includes("mean")||a.includes("median")||a.includes("data")?"Statistics and Probability":"General Mathematics"}function zr(t,a){const o={"Pre-Calculus":[["x ≥ 2","x ≤ 2","x ≥ 0","All real numbers"],["x = 2","x = 4","x = 8","x = 16"],["π","2π","π/2","4π"],["f⁻¹(x) = (x - 5)/3","f⁻¹(x) = 3x - 5","f⁻¹(x) = x/3 - 5","f⁻¹(x) = (x + 5)/3"],["4","5","6","7"],["x + 3","x - 3","x² + 3","(x + 3)(x - 3)"],["y ≥ -3","y ≥ 0","All real numbers","y > -3"],["9","5","7","3"],["1","2","3","1/3"],["12","27","64","81"]],"General Mathematics":[["2x² - 5x - 12","2x² + 5x - 12","2x² - 8x + 12","2x² - 5x + 12"],["36","32","28","24"],["x = 5","x = 4","x = 6","x = 7"],["120","24","60","720"],["3/4","1/2","2/3","4/5"],["90","80","100","72"],["2/3","3/4","4/6","6/9"],["12","6","8","4"],["0.375","0.38","0.35","0.325"],["$32","$28","$30","$36"],["11/12","3/7","5/6","2/3"],["$12","$10","$15","$8"],["3/4","2/3","4/5","9/12"],["1/8","1/4","1/5","1/6"],["150","135","120","160"]],"Statistics and Probability":[["1/6","1/3","1/2","2/3"],["9.4","8.5","10.2","7.8"],["8","9","7","10"],["5/8","3/8","1/2","2/5"],["20","15","25","30"],["5","3","7","8"],["Spread of data from the mean","The highest value","The average","The middle value"],["0.15","0.8","0.35","0.2"],["8.5","7","10","9"],["6","3","9","12"]],"Basic Calculus":[["6x","3x","9x²","6x²"],["4","2","0","undefined"],["x² + C","2x² + C","x²/2 + C","2x + C"],["15x² - 2","15x² - 2x","5x² - 2","15x - 2"],["cos(x)","-cos(x)","tan(x)","-sin(x)"],["eˣ + 3","eˣ + 3x","xeˣ + 3","eˣ"],["sin(x) + C","-sin(x) + C","tan(x) + C","-cos(x) + C"],["1/x","x","ln(x)","-1/x²"],["0","1","∞","undefined"],["4x³ - 4x","4x³ - 2x","x³ - 4x","4x⁴ - 4x²"]]},i=_t(t),n=o[i]||o["General Mathematics"];return n[a%n.length]}function Mr(t,a){const o={"Pre-Calculus":[0,1,0,0,1,0,0,0,2,3],"General Mathematics":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"Statistics and Probability":[0,0,0,0,0,0,0,0,0,0],"Basic Calculus":[0,0,0,0,0,0,0,0,0,0]},i=_t(t),n=o[i]||o["General Mathematics"];return n[a%n.length]}function _r(t,a,o){const i={"Pre-Calculus":["The expression under the square root must be non-negative: x - 2 ≥ 0, so x ≥ 2.","Since 2⁴ = 16, we get x = 4.","The period of sin(kx) is 2π/k. Here k = 2, so period = 2π/2 = π.","To find the inverse: y = 3x + 5 → x = 3y + 5 → y = (x - 5)/3.","Since 2⁵ = 32, log₂(32) = 5.","(x² - 9)/(x - 3) = (x+3)(x-3)/(x-3) = x + 3 (for x ≠ 3).","The absolute value |x| ≥ 0 for all x, so |x| - 3 ≥ -3. The range is y ≥ -3.","g(2) = 4, then f(4) = 2(4) + 1 = 9.","The amplitude of y = Acos(x) is |A|. Here A = 3, so amplitude = 3.","log₃(x) = 4 means 3⁴ = x, so x = 81."],"General Mathematics":["(2x + 3)(x - 4) = 2x² - 8x + 3x - 12 = 2x² - 5x - 12","15% of 240 = 0.15 × 240 = 36","3x + 7 = 22 → 3x = 15 → x = 5","5! = 5 × 4 × 3 × 2 × 1 = 120","0.75 = 75/100 = 3/4 after simplifying by dividing both by 25","25% of 360 = 0.25 × 360 = 90","12/18 = (12÷6)/(18÷6) = 2/3","Factors of 24: {1,2,3,4,6,8,12,24}. Factors of 36: {1,2,3,4,6,9,12,18,36}. GCD = 12","3 ÷ 8 = 0.375","20% off $40 = $40 × 0.80 = $32","2/3 + 1/4 = 8/12 + 3/12 = 11/12","15% of $80 = 0.15 × 80 = $12","45/60 = (45÷15)/(60÷15) = 3/4","0.125 = 125/1000 = 1/8","30% × N = 45 → N = 45/0.30 = 150"],"Statistics and Probability":["A fair die has 6 outcomes, each equally likely. P(6) = 1/6.","Mean = (4 + 7 + 9 + 12 + 15) / 5 = 47/5 = 9.4","Sorted: 2, 5, 8, 11, 14. The middle value is 8.","P(red) = 5/(5+3) = 5/8","Range = max - min = 30 - 10 = 20","The value 5 appears 3 times, more than any other value. Mode = 5.","Standard deviation measures how spread out data points are from the mean.","For independent events: P(A and B) = P(A) × P(B) = 0.3 × 0.5 = 0.15","For even-count dataset {4,7,10,13}: median = (7+10)/2 = 8.5","3 books can be arranged in 3! = 3 × 2 × 1 = 6 ways."],"Basic Calculus":["Using the power rule: d/dx[3x²] = 3 × 2x = 6x","Factor: (x²-4)/(x-2) = (x+2)(x-2)/(x-2) = x+2. As x→2: 2+2 = 4","∫ 2x dx = 2 × x²/2 + C = x² + C","f'(x) = 5 × 3x² - 2 = 15x² - 2","The derivative of sin(x) is cos(x). This is a fundamental trigonometric derivative.","d/dx[eˣ + 3x] = eˣ + 3. The derivative of eˣ is eˣ and of 3x is 3.","∫ cos(x) dx = sin(x) + C. Integration is the reverse of differentiation.","The derivative of ln(x) is 1/x. This is a fundamental logarithmic derivative.","As x → ∞, 1/x approaches 0. The function gets infinitely close to zero.","f'(x) = 4x³ - 4x using the power rule on each term."]},n=_t(t),l=i[n]||i["General Mathematics"];return l[a%l.length]}function Ar(t){const a=Math.floor(t/60),o=t%60;return`${a}:${o.toString().padStart(2,"0")}`}const ws={common:"bg-slate-100 text-slate-500",rare:"bg-blue-50 text-blue-500",epic:"bg-amber-50 text-amber-500"},ys=["bg-[#1FA7E1]/80 text-white","bg-[#9956DE]/80 text-white","bg-[#FFB356]/90 text-white","bg-[#7274ED]/80 text-white","bg-[#1FA7E1]/80 text-white","bg-[#9956DE]/80 text-white","bg-gradient-to-r from-[#FFB356] to-[#FF8C00] text-white"],Pr=({isOpen:t,onClose:a,onClaim:o,weekRewards:i,todayReward:n,canClaim:l,isClaiming:r,claimedDays:d,currentDayIndex:g,streakCount:j,timeUntilReset:x})=>{const[z,R]=s.useState(!1);if(!t)return null;const u=()=>{if(!l||z)return;R(!0);const h=n?.rarity==="epic",C=j>0&&(j+1)%7===0;h||C?ls({particleCount:150,spread:80,origin:{y:.6},colors:["#FFD700","#FFA500","#FF8C00","#FF6B6B","#4ade80"]}):ls({particleCount:100,spread:70,origin:{y:.6},colors:["#FFD700","#FFA500","#FF8C00"]}),setTimeout(()=>{R(!1),o()},1200)},P=h=>h+1,T=h=>h===g,D=h=>d.includes(h),$=h=>h>g,p=i.slice(0,6),M=i[6];return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-8",children:[e.jsx(Re,{children:t&&e.jsx(k.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 bg-slate-900/60 backdrop-blur-sm",onClick:a})}),e.jsxs(k.div,{initial:{scale:.9,opacity:0,y:20},animate:{scale:1,opacity:1,y:0},exit:{scale:.9,opacity:0,y:20},className:"relative w-full max-w-[420px] bg-[#f7f9fc] rounded-3xl border border-[#dde3eb] shadow-2xl flex flex-col items-center p-5 overflow-visible",children:[e.jsxs("div",{className:"absolute -top-6 w-[85%] h-12 bg-gradient-to-r from-[#9956DE] via-[#7274ED] to-[#1FA7E1] rounded-xl shadow-lg flex items-center justify-center z-20",children:[e.jsx("div",{className:"absolute -left-2.5 -z-10 w-5 h-8 bg-[#633299] rounded-l-full rotate-12 top-1.5"}),e.jsx("div",{className:"absolute -right-2.5 -z-10 w-5 h-8 bg-[#10709b] rounded-r-full -rotate-12 top-1.5"}),e.jsx("h2",{className:"text-white font-black text-lg tracking-wide uppercase drop-shadow-sm font-display",children:"Daily Rewards"})]}),e.jsx("button",{onClick:a,className:"absolute -right-3 -top-3 w-8 h-8 bg-white hover:bg-slate-100 border border-slate-200 text-slate-500 hover:text-slate-800 rounded-full flex items-center justify-center z-30 shadow-md transition-transform hover:scale-105 active:scale-95",children:e.jsx(Ue,{size:16,strokeWidth:3})}),e.jsxs("div",{className:"mt-6 mb-2 text-center w-full",children:[e.jsx("h3",{className:"text-xl font-bold text-slate-800 font-display mt-2",children:"Welcome Back!"}),e.jsx("p",{className:"text-slate-500 font-medium text-xs mt-0.5",children:"Claim your daily reward to keep the streak going."}),j>0&&e.jsxs("div",{className:"mt-2 inline-flex items-center gap-1 rounded-full bg-orange-50 px-3 py-1 text-xs font-bold text-orange-600 border border-orange-200",children:[e.jsx(Ht,{size:14,className:"text-orange-500"}),e.jsxs("span",{children:[j," day streak"]})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-2 w-full mb-5 relative z-10",children:[p.map((h,C)=>{const H=P(C),I=D(C),U=T(C),V=$(C);return e.jsxs("div",{className:`relative rounded-xl flex flex-col overflow-hidden border-[1.5px] transition-all ${U&&!I?"border-amber-400 shadow-[0_0_15px_rgba(251,191,36,0.25)] scale-105 z-10 bg-amber-50":I?"border-[#dde3eb] bg-slate-200/50":"border-[#dde3eb] bg-white"}`,children:[e.jsxs("div",{className:`py-0.5 text-center font-black text-[10px] uppercase tracking-wider ${U&&!I?"bg-amber-400 text-amber-900":ys[C]}`,children:["Day ",H]}),e.jsx("div",{className:"absolute top-5 right-1 z-10",children:e.jsx("span",{className:`text-[8px] font-bold uppercase px-1 rounded ${ws[h.rarity]}`,children:h.rarity})}),e.jsxs("div",{className:"flex-1 p-2 flex flex-col items-center justify-center relative min-h-[75px]",children:[I&&e.jsx(k.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",bounce:.5},className:"absolute inset-0 flex items-center justify-center z-20 pointer-events-none",children:e.jsxs("div",{className:"relative w-14 h-14 rounded-full border-[3px] border-rose-500 bg-rose-50 flex items-center justify-center transform -rotate-12 shadow-sm opacity-90",children:[e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"Claimed",className:"w-10 h-10 object-contain drop-shadow-sm"}),e.jsx("div",{className:"absolute -bottom-2 bg-rose-500 rounded px-1.5 py-0.5 border border-rose-200 shadow-sm",children:e.jsx("span",{className:"text-[8px] font-black text-white uppercase tracking-widest leading-none",children:"Claimed"})})]})}),V&&e.jsx("div",{className:"absolute top-1 right-1 bg-slate-200 rounded-full p-0.5 z-10",children:e.jsx(qt,{size:8,className:"text-slate-400"})}),e.jsxs("div",{className:`flex flex-col items-center transition-all w-full ${I?"opacity-30 grayscale":""}`,children:[e.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center border-2 mb-1",style:{backgroundColor:h.color+"20",borderColor:h.color+"40"},children:e.jsx("span",{className:"text-lg",children:h.icon})}),e.jsx("div",{className:`font-black text-xs leading-none mt-0.5 text-center ${U?"text-amber-600":I?"text-slate-500":"text-slate-600"}`,children:h.label})]})]})]},h.id)}),M&&e.jsxs("div",{className:`col-span-3 relative rounded-xl flex flex-col overflow-hidden border-[1.5px] transition-all mt-1 ${T(6)&&!D(6)?"border-amber-400 shadow-[0_0_20px_rgba(251,191,36,0.3)] scale-[1.02] z-10 bg-amber-50":D(6)?"border-[#dde3eb] bg-slate-200/50":"border-[#dde3eb] bg-white"}`,children:[e.jsx("div",{className:`py-1 text-center font-black text-[10px] uppercase tracking-widest ${T(6)&&!D(6)?"bg-amber-400 text-amber-900":ys[6]}`,children:"Day 7 • Epic Reward"}),e.jsx("div",{className:"absolute top-6 right-2 z-10",children:e.jsx("span",{className:`text-[8px] font-bold uppercase px-1.5 py-0.5 rounded ${ws[M.rarity]}`,children:M.rarity})}),e.jsxs("div",{className:"flex items-center justify-center gap-5 p-3 relative",children:[D(6)&&e.jsx(k.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",bounce:.5},className:"absolute inset-0 flex items-center justify-center z-20 pointer-events-none",children:e.jsxs("div",{className:"relative w-20 h-20 rounded-full border-[4px] border-rose-500 bg-rose-50 flex items-center justify-center transform rotate-12 shadow-sm opacity-90",children:[e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"Claimed",className:"w-14 h-14 object-contain drop-shadow-sm"}),e.jsx("div",{className:"absolute -bottom-2.5 bg-rose-500 rounded-md px-2 py-0.5 border border-rose-200 shadow-md",children:e.jsx("span",{className:"text-[10px] font-black text-white uppercase tracking-widest leading-none",children:"Claimed"})})]})}),e.jsxs("div",{className:`flex items-center justify-center gap-5 w-full transition-all ${D(6)?"opacity-30 grayscale":""}`,children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:"w-12 h-12 rounded-full flex items-center justify-center border-2 shadow-sm mb-0.5",style:{backgroundColor:M.color+"20",borderColor:M.color+"40"},children:e.jsx("span",{className:"text-2xl",children:M.icon})}),e.jsx("span",{className:`font-black text-sm ${T(6)?"text-amber-600":"text-slate-600"}`,children:M.label})]}),M.rarity==="epic"&&e.jsxs("div",{className:"relative mt-1",children:[e.jsx("div",{className:"w-14 h-14 bg-purple-50 rounded-xl flex items-center justify-center border-2 border-purple-200 shadow-sm",children:e.jsx("span",{className:"text-3xl drop-shadow-md",children:"🎁"})}),e.jsx("div",{className:"absolute -right-5 -bottom-4 w-14 h-14 bg-white rounded-xl p-1 border-2 border-amber-300 shadow-lg transform rotate-[-5deg]",children:e.jsx("img",{src:"/avatar/crown_thumbnail.png",alt:"Crown",className:"w-full h-full object-contain drop-shadow-md"})})]})]})]})]})]}),e.jsxs("div",{className:"mb-3 flex items-center gap-2 text-xs text-slate-400",children:[e.jsx(Qa,{size:14}),e.jsx("span",{className:"font-mono font-medium",children:x}),e.jsx("span",{children:"until next reset"})]}),e.jsx(k.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:u,disabled:!l||r||z,className:`w-[85%] py-3 rounded-full font-black text-base tracking-wide uppercase shadow-lg transition-all mt-2 ${!l||r||z?"bg-slate-200 text-slate-400 cursor-not-allowed border border-slate-300":"bg-gradient-to-r from-[#FFB356] to-[#FF8C00] text-white hover:from-[#FFA500] hover:to-[#FF7F00] border-b-4 border-[#e67e00]"}`,children:r||z?"Claiming...":l?"Claim!":"Claimed"})]})]})},Er=new Set([7,14,30,60,100]),ft={lastClaimedDate:"",lastClaimedWeekSeed:0,claimedDays:[],currentStreak:0,longestStreak:0,totalClaimed:0,coins:0,hintTokens:0,streakShields:0,activeMultiplier:null};function Tr(t){if(t<=0)return"00:00:00";const a=Math.floor(t/1e3),o=Math.floor(a/3600),i=Math.floor(a%3600/60),n=a%60;return`${String(o).padStart(2,"0")}:${String(i).padStart(2,"0")}:${String(n).padStart(2,"0")}`}function Dr(){const t=Ut();return t.setDate(t.getDate()-1),Xt(t)}function Fs(t){return t?new Date(t.expiresAt).getTime()>Date.now():!1}function Rs(t){return Ds(Qt,"users",t,"dailyRewards",t)}function Ir(t){return Ds(Qt,"users",t)}async function js(t){try{const a=Rs(t),o=await da(a);if(!o.exists())return{...ft};const i=o.data(),n=Vt();return i.lastClaimedWeekSeed&&i.lastClaimedWeekSeed!==n?{...i,claimedDays:[],lastClaimedWeekSeed:n}:{...ft,...i,activeMultiplier:i.activeMultiplier&&Fs(i.activeMultiplier)?i.activeMultiplier:null}}catch(a){return console.error("[dailyRewardService] Error getting state:",a),{...ft}}}function Lr(t){const a=Xt();return t.lastClaimedDate!==a}async function $r(t){const a=Xt(),o=Vt(),i=Gt(),l=Yt()[i];if(!l)throw new Error(`No reward found for day index ${i}`);try{const r=await xa(Qt,async g=>{const j=Rs(t),x=Ir(t),z=await g.get(j),R=await g.get(x);let u;if(z.exists()?u={...ft,...z.data()}:(u={...ft,lastClaimedWeekSeed:o},g.set(j,u)),u.lastClaimedWeekSeed!==o&&(u.claimedDays=[],u.lastClaimedWeekSeed=o),u.lastClaimedDate===a)return{code:"ALREADY_CLAIMED",state:u};let P=u.currentStreak,T=!1;if(!u.lastClaimedDate||u.currentStreak===0)P=1;else{const h=Dr();u.lastClaimedDate===h?P=u.currentStreak+1:u.streakShields>0?(u.streakShields-=1,P=u.currentStreak+1,T=!0):P=1}const D=Math.max(u.longestStreak,P);let $=0,p=1;switch(l.type){case"xp":{const h=typeof l.value=="number"?l.value:parseInt(l.value,10)||0;p=Fs(u.activeMultiplier)?u.activeMultiplier?.multiplier??1:1,$=Math.floor(h*p);break}case"coins":{const h=typeof l.value=="number"?l.value:parseInt(l.value,10)||0;u.coins+=h;break}case"hint_token":{const h=typeof l.value=="number"?l.value:parseInt(l.value,10)||0;u.hintTokens+=h;break}case"streak_shield":{const h=typeof l.value=="number"?l.value:parseInt(l.value,10)||0;u.streakShields+=h;break}case"xp_multiplier":{const h=typeof l.value=="number"?l.value:parseInt(l.value,10)||60,C=l.id.includes("2")?2:1.5,H=new Date;H.setMinutes(H.getMinutes()+h),u.activeMultiplier={multiplier:C,expiresAt:H.toISOString()};break}case"badge_unlock":break}const M=[...u.claimedDays,i];return u.lastClaimedDate=a,u.currentStreak=P,u.longestStreak=D,u.totalClaimed+=1,g.set(j,u,{merge:!0}),R.exists()&&g.update(x,{coins:u.coins,hintTokens:u.hintTokens,streakShields:u.streakShields,activeMultiplier:u.activeMultiplier,lastClaimedDate:u.lastClaimedDate,updatedAt:ma()}),{code:"SUCCESS",state:u,newClaimedDays:M,newStreak:P,newLongestStreak:D,xpAwarded:$,multiplierApplied:p,streakPreserved:T}});if(r.code==="ALREADY_CLAIMED")return{success:!1,reward:l,dayIndex:i,streakAfter:r.state.currentStreak,longestStreakAfter:r.state.longestStreak,coinsAfter:r.state.coins,hintTokensAfter:r.state.hintTokens,streakShieldsAfter:r.state.streakShields,streakPreserved:!1,xpAwarded:0,multiplierApplied:1,isMilestone:!1,error:"Already claimed today"};if(r.xpAwarded>0)try{await Ks(t,r.xpAwarded,"daily_reward",`Daily Reward Day ${i+1}! +${r.xpAwarded} XP`)}catch(g){console.error("[dailyRewardService] Error awarding XP:",g)}if(l.type==="badge_unlock"&&typeof l.value=="string")try{await Ns(t,l.value)}catch(g){console.error("[dailyRewardService] Error unlocking avatar item:",g)}const d=Er.has(r.newStreak);return{success:!0,reward:l,dayIndex:i,streakAfter:r.newStreak,longestStreakAfter:r.newLongestStreak,coinsAfter:r.state.coins,hintTokensAfter:r.state.hintTokens,streakShieldsAfter:r.state.streakShields,streakPreserved:r.streakPreserved,xpAwarded:r.xpAwarded,multiplierApplied:r.multiplierApplied,isMilestone:d}}catch(r){throw console.error("[dailyRewardService] Error claiming daily reward:",r),r}}function Fr(t){const[a,o]=s.useState(null),[i,n]=s.useState(!1),[l,r]=s.useState(!1),[d,g]=s.useState(null),[j,x]=s.useState(null),[z,R]=s.useState("00:00:00"),u=s.useRef(null),P=s.useMemo(()=>Yt(),[]),T=s.useMemo(()=>Ka(),[]),D=s.useCallback(async()=>{if(!t){o(null);return}try{x(null);const C=await js(t);o(C)}catch(C){const H=C instanceof Error?C.message:"Failed to load rewards";x(H),console.error("[useDailyReward] refresh error:",C)}},[t]);s.useEffect(()=>{D()},[D]),s.useEffect(()=>{const C=()=>{const I=Va().getTime()-Date.now();R(Tr(I))};return C(),u.current=setInterval(C,1e3),()=>{u.current&&(clearInterval(u.current),u.current=null)}},[]);const $=s.useMemo(()=>!a||i?!1:Lr(a),[a,i]),p=s.useMemo(()=>!a?.activeMultiplier||new Date(a.activeMultiplier.expiresAt).getTime()<=Date.now()?null:a.activeMultiplier,[a?.activeMultiplier]),M=s.useCallback(async()=>{if(!(!t||!$)){n(!0),x(null);try{const C=await $r(t);if(g(C),C.success){r(!0);const H=await js(t);o(H)}else x(C.error||"Claim failed")}catch(C){const H=C instanceof Error?C.message:"Claim failed";x(H),console.error("[useDailyReward] claim error:",C)}finally{n(!1)}}},[t,$]),h=s.useCallback(()=>{r(!1)},[]);return{weekRewards:P,todayReward:T,canClaim:$,isClaiming:i,claimedDays:a?.claimedDays??[],currentStreak:a?.currentStreak??0,longestStreak:a?.longestStreak??0,totalClaimed:a?.totalClaimed??0,coins:a?.coins??0,hintTokens:a?.hintTokens??0,streakShields:a?.streakShields??0,activeMultiplier:p,timeUntilReset:z,showModal:l,lastClaimResult:d,error:j,claim:M,dismissModal:h,refresh:D}}const Rr=["all","Q1","Q2","Q3","Q4"],Pl=({onEarnXP:t,atRiskSubjects:a=[],priorityTopics:o=[],initialModuleId:i=null,isInQuizMode:n=!1,setIsInQuizMode:l})=>{const{userProfile:r}=Ot(),[d,g]=s.useState("modules"),j=r;j?.grade;const x=aa(),{isLoading:z,refetch:R}=ua(x);s.useEffect(()=>{z||(console.log("[ModulesPage] Curriculum ready"),R())},[z,R]);const[u,P]=s.useState(""),[T,D]=s.useState("all"),[$,p]=s.useState("all"),[M,h]=s.useState("all"),[C,H]=s.useState(!1),[I,U]=s.useState(null),V=s.useMemo(()=>{const c=j?.learnerCurriculumAssignments?.subjects??j?.assignedSubjects??j?.curriculumAssignedSubjects??[];return Array.isArray(c)?c:[]},[j]),G=s.useMemo(()=>Zs(x,V),[x,V]),se=i&&G.find(c=>c.id===i)||null,[ce,E]=s.useState(se),[fe,Le]=s.useState(null),[_e,$e]=s.useState(null),[ke,be]=s.useState(!1),[b,w]=s.useState(null),[N,F]=s.useState(!1),[W,de]=s.useState(!1),{weekRewards:pe,todayReward:Ye,canClaim:Fe,isClaiming:Ke,claimedDays:dt,currentStreak:at,timeUntilReset:Ze,claim:ye,lastClaimResult:Ae}=Fr(r?.uid??null);s.useEffect(()=>{if(!r?.uid)return;let c=!1;const _=async Z=>{c||(Fe||Z)&&de(!0)},X=Z=>{Z.detail?.tab==="Modules"&&_(!0)},xe=setTimeout(()=>_(),500);return window.addEventListener("mathpulse:navigate",X),()=>{c=!0,clearTimeout(xe),window.removeEventListener("mathpulse:navigate",X)}},[r?.uid,Fe]);const gt=async()=>{if(r?.uid)try{await ye(),Ae?.success&&(ra({userId:r.uid,type:"daily_checkin",title:"Daily Reward Claimed!",message:`You earned ${Ae.reward.label} and kept your streak alive!`,metadata:{rewardId:Ae.reward.id,streakDay:Ae.dayIndex+1}}).catch(console.error),Ae.reward.rarity==="epic"&&Ns(r.uid,"acc_crown").then(()=>Dt.success("👑 Epic reward unlocked!")).catch(console.error)),setTimeout(()=>de(!1),1e3)}catch(c){const _=c instanceof Error?c.message:"";console.error("Failed to claim daily reward:",c),_.includes("Already claimed")?Dt.info("You already claimed your reward today!"):Dt.error("Failed to claim daily reward. Please try again.")}};s.useEffect(()=>{if(i){const c=G.find(_=>_.id===i);c&&E(c)}},[i,G]),s.useEffect(()=>{r?.uid&&(F(!0),Js(r.uid).then(c=>{w(c)}).catch(c=>{console.error("Failed to load competency profile:",c)}).finally(()=>{F(!1)}))},[r?.uid]);const ue=s.useMemo(()=>{const c=o.length>0?o:a.map(X=>ea(X)).filter(X=>X!==null),_=new Set;return c.filter(X=>_.has(X)?!1:(_.add(X),!0))},[o,a]),{data:Se=[]}=Os({queryKey:ta.modules(x,ue),enabled:!0,staleTime:600*1e3,gcTime:1800*1e3,queryFn:async()=>{const c=G;if(ue.length===0)return c;const _=new Map(ue.map((X,xe)=>[la[X],xe]));return[...c].sort((X,xe)=>{const Z=_.get(X.id)??Number.POSITIVE_INFINITY,je=_.get(xe.id)??Number.POSITIVE_INFINITY;return Z-je})}}),Be=s.useMemo(()=>{const c=new Set;return Se.forEach(_=>c.add(_.competency_group)),Array.from(c)},[Se]),He=s.useMemo(()=>{const c=u.trim().toLowerCase(),_=Se.filter(X=>{const xe=!c||X.title.toLowerCase().includes(c),Z=!c||X.description.toLowerCase().includes(c),je=!c||X.lessons.some(me=>me.title.toLowerCase().includes(c)),Pe=!c||X.quizzes.some(me=>me.title.toLowerCase().includes(c)),Ce=c?X.competencies.some(me=>me.outcome.toLowerCase().includes(c)||me.code.toLowerCase().includes(c)):!0,Ee=T==="all"||X.subjectId===T,B=$==="all"||X.quarter===$,ze=M==="all"||X.competency_group===M;return(xe||Z||je||Pe||Ce)&&Ee&&B&&ze});if(b?.competencies){const X=new Set(Object.entries(b.competencies).filter(([,Z])=>Z.score<50).map(([Z])=>Z)),xe=new Set(Object.entries(b.competencies).filter(([,Z])=>Z.score>=80).map(([Z])=>Z));return _.sort((Z,je)=>{const Pe=Z.competencies.map(Y=>Y.code),Ce=je.competencies.map(Y=>Y.code),Ee=Pe.some(Y=>X.has(Y))?1:0,B=Ce.some(Y=>X.has(Y))?1:0,ze=Pe.some(Y=>xe.has(Y))?1:0,me=Ce.some(Y=>xe.has(Y))?1:0,Oe=Ee*2+ze;return B*2+me-Oe})}return _},[Se,u,T,$,M,b]),rt=s.useMemo(()=>{const c=$==="all"?"All Quarters":$,_=T==="all"?"All Subjects":as[T]?.label??"Subject";return`${x} · ${_} · ${c}`},[x,T,$]),Je=s.useMemo(()=>{const c=new Set(Se.map(_=>_.subjectId));return Array.from(c)},[Se]),We=()=>{D("all"),p("all"),h("all"),P("")};s.useEffect(()=>{d!=="recommended"||ue.length===0||(be(!0),sa({weakTopics:ue.map(c=>rs[c]),subject:T!=="all"?T:"General Mathematics",userId:r?.uid}).then(c=>{$e(c.curriculumContext),be(!1)}).catch(()=>be(!1)))},[d,ue]);const lt=(c,_)=>{t&&t(_,`Quiz Completed! +${_} XP`),Le(null),l&&l(!1)};return fe?(l&&l(!0),e.jsx(Sr,{quiz:fe,onClose:()=>Le(null),onComplete:lt,studentId:r?.uid})):ce?e.jsx(fr,{module:ce,onBack:()=>E(null),onEarnXP:t,isInQuizMode:n,setIsInQuizMode:l}):e.jsxs("div",{className:"h-full overflow-y-auto px-4 sm:px-6 xl:px-10 pb-8 scrollbar-hide scroll-smooth relative",onScroll:c=>H(c.currentTarget.scrollTop>100),children:[e.jsx(Pr,{isOpen:W,onClose:()=>de(!1),onClaim:gt,weekRewards:pe,todayReward:Ye,canClaim:Fe,isClaiming:Ke,claimedDays:dt,currentDayIndex:Gt(),streakCount:at,timeUntilReset:Ze}),e.jsxs("div",{className:"flex flex-col lg:flex-row justify-between items-start lg:items-center py-6 gap-6",children:[e.jsxs("div",{className:"flex-1 max-w-3xl",children:[e.jsx("h1",{className:"text-[36px] md:text-[44px] font-display font-black text-[#202124] tracking-tight leading-[1.1] mb-4",children:"Curriculum Modules"}),e.jsx("p",{className:"text-[#3c4043] text-[16px] md:text-[17px] leading-[1.7] md:pr-10",children:"MathPulse AI loads modules directly from DepEd Strengthened SHS curriculum guides with AI-powered RAG lesson generation. Currently available: General Mathematics, Business Mathematics, and Statistics & Probability. Pre-Calculus and Basic Calculus modules are coming soon once teaching module PDFs are sourced."}),e.jsx("div",{className:"mt-4 inline-flex items-center rounded-full border border-sky-200 bg-sky-50 px-4 py-2 text-sm font-bold text-sky-900",children:rt})]}),e.jsx("div",{className:"flex flex-shrink-0 items-center justify-center lg:justify-end w-full lg:w-[350px] mt-4 lg:mt-0",children:e.jsx(wr,{})})]}),e.jsxs("div",{className:`sticky top-0 z-30 -mx-4 px-4 sm:-mx-6 sm:px-6 xl:-mx-10 xl:px-10 pt-3 pb-3 space-y-3 transition-colors duration-300 ${C?"bg-[#f8faff] border-b border-[#dde3eb] shadow-sm":"bg-transparent"}`,children:[e.jsxs("div",{className:"flex flex-col lg:flex-row items-center gap-3 w-full",children:[e.jsxs("div",{className:"relative flex-1 w-full",children:[e.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-[#5f6368]",children:e.jsx(pa,{size:16,strokeWidth:2.5})}),e.jsx("input",{id:"modules-search",name:"modules-search","aria-label":"Search modules",type:"text",value:u,onChange:c=>P(c.target.value),placeholder:"Search modules, lessons, or assessments...",className:"w-full pl-10 pr-10 py-2 rounded-xl border border-[#dadce0] bg-white text-[#202124] text-[13px] font-medium focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all shadow-sm"}),!1]}),e.jsxs("div",{className:"flex flex-wrap md:flex-nowrap items-center gap-2 w-full lg:w-auto shrink-0",children:[e.jsxs("select",{value:T,onChange:c=>D(c.target.value),className:"w-full md:w-auto rounded-xl border border-slate-200 bg-white pl-3 pr-8 py-2 text-xs font-semibold text-slate-700 focus:border-sky-400 focus:outline-none shadow-sm","aria-label":"Subject",children:[e.jsx("option",{value:"all",children:"All Subjects"}),Je.map(c=>e.jsx("option",{value:c,children:as[c].label},c))]}),e.jsx("select",{value:$,onChange:c=>p(c.target.value),className:"w-full md:w-auto rounded-xl border border-slate-200 bg-white pl-3 pr-8 py-2 text-xs font-semibold text-slate-700 focus:border-sky-400 focus:outline-none shadow-sm","aria-label":"Quarter",children:Rr.map(c=>e.jsx("option",{value:c,children:c==="all"?"All Quarters":c},c))}),e.jsxs("select",{value:M,onChange:c=>h(c.target.value),className:"w-full md:w-auto rounded-xl border border-slate-200 bg-white pl-3 pr-8 py-2 text-xs font-semibold text-slate-700 focus:border-sky-400 focus:outline-none shadow-sm","aria-label":"Competency Group",children:[e.jsx("option",{value:"all",children:"All Competencies"}),Be.map(c=>e.jsx("option",{value:c,children:c},c))]}),e.jsxs("button",{type:"button",onClick:We,className:"inline-flex w-full md:w-auto items-center justify-center gap-1.5 rounded-xl border border-slate-200 bg-white px-3 py-2 text-xs font-bold text-slate-700 transition-colors hover:bg-slate-50 shadow-sm shrink-0",children:[e.jsx(ha,{size:14}),"Reset"]})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex items-center bg-slate-100/80 p-1 rounded-full border border-slate-200/60 shadow-inner gap-1 overflow-x-auto no-scrollbar",children:[{id:"modules",label:"Modules",icon:Ve,color:"text-[#1FA7E1]"},{id:"recommended",label:"Recommended",icon:St,color:"text-[#75D06A]"},{id:"practice",label:"Practice",icon:Ge,color:"text-[#FFB356]"}].map(c=>{const _=d===c.id;return e.jsxs("button",{onClick:()=>g(c.id),className:`relative flex items-center gap-1.5 px-4 py-1.5 rounded-full text-[13px] font-bold transition-all duration-300 flex-shrink-0 ${_?"shadow-sm":"text-slate-500 hover:text-slate-700 hover:bg-slate-200/50"}`,children:[_&&e.jsx(k.div,{layoutId:"modulesTabBackground",className:"absolute inset-0 bg-white rounded-full shadow-[0_2px_15px_-3px_rgba(0,0,0,0.1)] border border-slate-100",transition:{type:"spring",bounce:.2,duration:.6}}),e.jsxs("span",{className:`relative z-10 flex items-center gap-1.5 ${_?c.color:""}`,children:[e.jsx(c.icon,{size:15,strokeWidth:_?2.5:2}),c.label]})]},c.id)})}),e.jsxs("div",{className:"flex items-center gap-2 ml-1",children:[d==="modules"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-7 h-7 rounded-lg bg-indigo-50 border border-indigo-100 flex items-center justify-center text-indigo-500",children:e.jsx(oa,{size:15,strokeWidth:2.5})}),e.jsx("span",{className:"font-display font-black text-[15px] text-slate-700 tracking-tight whitespace-nowrap",children:"DepEd Strengthened SHS Modules"})]}),d==="recommended"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-7 h-7 rounded-lg bg-[#75D06A]/10 flex items-center justify-center",children:e.jsx(fa,{size:15,className:"text-[#75D06A]"})}),e.jsx("span",{className:"font-display font-black text-[15px] text-slate-700 tracking-tight whitespace-nowrap",children:"Suggested Next"})]}),d==="practice"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-7 h-7 rounded-lg bg-[#FFB356]/10 flex items-center justify-center",children:e.jsx(Ge,{size:15,className:"text-[#FFB356]"})}),e.jsx("span",{className:"font-display font-black text-[15px] text-slate-700 tracking-tight whitespace-nowrap",children:"Practice Center"})]})]})]})]}),e.jsxs("div",{className:"pt-4",children:[ue.length>0&&e.jsxs("div",{className:"mb-4 rounded-2xl border border-amber-300 bg-amber-50 px-5 py-4 shadow-sm",children:[e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"inline-flex items-center gap-2 text-sm font-black text-amber-900",children:[e.jsx(vs,{size:15}),"Assessment Focus Areas"]}),e.jsx("p",{className:"mt-1 text-sm text-amber-900/80",children:"Modules are currently prioritized by your latest diagnostic needs."})]}),e.jsxs("button",{type:"button",onClick:()=>g("recommended"),className:"inline-flex items-center gap-1.5 rounded-xl bg-amber-600 px-3 py-2 text-xs font-bold text-white transition-colors hover:bg-amber-700",children:["View Recommended",e.jsx(pt,{size:14})]})]}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:ue.map((c,_)=>e.jsxs("span",{className:"rounded-full bg-white px-3 py-1 text-xs font-semibold text-amber-900 shadow-sm",children:[_+1,". ",rs[c]]},c))})]}),e.jsx(Re,{mode:"wait",children:e.jsx(k.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.3},className:"pb-8 mt-4",children:d==="practice"?e.jsx(br,{onStartQuiz:Le,searchQuery:u}):d==="modules"?e.jsx(Br,{modules:He,onSelectModule:E,onPreviewSources:U,isAtRisk:ue.length>0}):e.jsx(Hr,{modules:He,fullPool:Se,onSelectModule:E,onPreviewSources:U,isAtRisk:ue.length>0,learningPathContext:_e,learningPathLoading:ke})},d)})]}),e.jsx(Re,{children:I&&e.jsxs(k.aside,{initial:{opacity:0,x:24},animate:{opacity:1,x:0},exit:{opacity:0,x:24},transition:{duration:.25},className:"fixed inset-y-0 right-0 z-[80] w-full max-w-xl border-l border-slate-200 bg-white p-6 shadow-2xl",children:[e.jsxs("div",{className:"mb-4 flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-black uppercase tracking-wide text-sky-700",children:"Curriculum Preview"}),e.jsx("h3",{className:"mt-1 text-xl font-black text-slate-900",children:I.title}),e.jsxs("p",{className:"mt-1 text-sm text-slate-600",children:[I.active_grade_level," · ",I.subject," · ",I.quarter]})]}),e.jsx("button",{type:"button",onClick:()=>U(null),className:"rounded-lg border border-slate-200 p-2 text-slate-500 hover:bg-slate-50",children:e.jsx(Ue,{size:16})})]}),e.jsxs("div",{className:"space-y-4 overflow-y-auto pr-1",children:[e.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-slate-50 p-4",children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-wide text-slate-500",children:"Competency Group"}),e.jsx("p",{className:"mt-1 text-sm font-semibold text-slate-800",children:I.competency_group})]}),e.jsxs("div",{className:"rounded-2xl border border-slate-200 p-4",children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-wide text-slate-500",children:"Performance Standard"}),e.jsx("p",{className:"mt-1 text-sm text-slate-700",children:I.performance_standard})]}),e.jsxs("div",{className:"rounded-2xl border border-slate-200 p-4",children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-wide text-slate-500",children:"Competencies"}),e.jsx("div",{className:"mt-2 space-y-2",children:I.competencies.map(c=>e.jsxs("div",{className:"rounded-xl border border-slate-100 bg-slate-50 p-3",children:[e.jsx("p",{className:"text-xs font-black text-slate-600",children:c.code}),e.jsx("p",{className:"mt-1 text-sm text-slate-700",children:c.outcome})]},c.code))})]}),e.jsxs("div",{className:"rounded-2xl border border-slate-200 p-4",children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-wide text-slate-500",children:"Sources"}),e.jsx("div",{className:"mt-2 space-y-2",children:I.module_sources.map(c=>e.jsxs("a",{href:c.url,target:"_blank",rel:"noreferrer",className:"flex items-center justify-between rounded-xl border border-slate-100 px-3 py-2 text-sm font-semibold text-slate-700 hover:bg-slate-50",children:[e.jsx("span",{children:c.title}),e.jsx(ca,{size:14,className:"text-slate-400"})]},c.id))})]})]})]})})]})},Br=({modules:t,onSelectModule:a,onPreviewSources:o,isAtRisk:i=!1})=>e.jsx("div",{className:"pr-2 space-y-8",children:e.jsx("div",{children:t.length===0?e.jsxs("div",{className:"bg-white rounded-2xl border border-[#dde3eb] p-8 text-center",children:[e.jsx("p",{className:"text-slate-700 font-semibold",children:"No matching modules found."}),e.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"If modules are not yet available for your selected view, this area will unlock after assessment sync and content rollout."})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 gap-6",children:t.map((n,l)=>e.jsx(Ft,{module:n,index:l,onClick:()=>a(n),onPreviewSources:()=>o(n),isAtRisk:i},n.id))})})}),Hr=({modules:t,fullPool:a,onSelectModule:o,onPreviewSources:i,isAtRisk:n=!1,learningPathContext:l=null,learningPathLoading:r=!1})=>{const d=t.filter(j=>j.progress>0&&j.progress<100),g=(t.length>0?t:a).filter(j=>j.progress===0).slice(0,6);return e.jsxs("div",{className:"pr-2 space-y-10",children:[r&&e.jsxs("div",{className:"mb-6 rounded-2xl border border-sky-200 bg-sky-50 px-5 py-4 flex items-center gap-3",children:[e.jsx("div",{className:"w-5 h-5 rounded-full border-2 border-sky-400 border-t-transparent animate-spin flex-shrink-0"}),e.jsx("p",{className:"text-sm font-semibold text-sky-800",children:"Building your personalized learning path from DepEd curriculum..."})]}),l&&!r&&e.jsxs("div",{className:"mb-6 rounded-2xl border border-indigo-200 bg-gradient-to-br from-indigo-50 to-purple-50 px-5 py-4 shadow-sm",children:[e.jsx("p",{className:"text-xs font-black uppercase tracking-wide text-indigo-700 mb-2",children:"📚 Your Personalized Learning Path"}),e.jsx("pre",{className:"whitespace-pre-wrap text-sm text-indigo-900 font-medium leading-relaxed font-sans",children:l})]}),d.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx("div",{className:"w-10 h-10 rounded-[14px] bg-[#FF8B8B]/10 flex items-center justify-center text-[20px] shadow-inner",children:"🔥"}),e.jsx("h2",{className:"font-display font-black text-[24px] text-slate-800 tracking-tight",children:"Continue This Module"})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 gap-6",children:d.slice(0,4).map((j,x)=>e.jsx(Ft,{module:j,index:x,onClick:()=>o(j),onPreviewSources:()=>i(j),isAtRisk:n,badgeLabel:"In Progress"},j.id))})]}),e.jsx("div",{children:g.length===0?e.jsx("div",{className:"bg-white rounded-2xl border border-[#dde3eb] p-8 text-center text-slate-500 font-medium",children:"You are all caught up. Practice more quizzes to unlock additional recommendations."}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 gap-6",children:g.map((j,x)=>e.jsx(Ft,{module:j,index:x,onClick:()=>o(j),onPreviewSources:()=>i(j),isAtRisk:n,badgeLabel:"Start"},j.id))})})]})};export{Pl as default}; diff --git a/assets/ModulesPage-DHibj58D.js b/assets/ModulesPage-DHibj58D.js deleted file mode 100644 index 7c3ca7da66ed731e93c9d107e43a902c1011b536..0000000000000000000000000000000000000000 --- a/assets/ModulesPage-DHibj58D.js +++ /dev/null @@ -1,170 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-firebase-auth-BW5XT768.js","assets/vendor-firebase-core-y3En_kpN.js"])))=>i.map(i=>d[i]); -import{r as s,j as e,d as Pe}from"./vendor-react-B4AQeu28.js";import{u as Ot}from"./useQuery-Dajy9lf6.js";import{M as Ue}from"./ModuleFolderCard-BJl0S3M8.js";import{B as je}from"./button-BSRmUN27.js";import{c as te,m as v,Z as be,F as Ce,h as pe,A as Ze,C as Me,_ as Ke,O as Wt,u as Je,f as Fe,T as Dt,j as Ht,L as Xt,P as Vt,Q as Ut,R as ot,S as ct,V as Gt,W as Yt,d as et,X as Zt,Y as Pt,$ as Kt,a0 as Jt,J as es,k as ts,a1 as dt,a2 as ss,a3 as xt,a4 as as,I as rs,t as We,K as ns}from"./index-fWY85Kyg.js";import{T as Re}from"./trophy-fJOOsc_0.js";import{S as Ge}from"./sparkles-BY90tCLG.js";import{T as ve}from"./target-B6MOj4Ln.js";import{A as Ee}from"./award-DBHp-ybd.js";import{S as tt}from"./star-BKdRsvg1.js";import{C as ke}from"./check-Cs-4n4yC.js";import{X as me}from"./x-BLLfAvOF.js";import{T as $e}from"./trending-up-Do7UgIZi.js";import{B as mt}from"./brain-COga8OrM.js";import{L as st,C as He}from"./lightbulb-D3kdQgij.js";import{C as is}from"./chevron-left-KucdseP8.js";import{C as It}from"./chevron-right-mxUv3EB7.js";import{C as Ae}from"./clock-BJCraYVD.js";import{C as Et}from"./clipboard-check-DbpvA-N4.js";import{B as ze}from"./book-open-D5mR6gz9.js";import{C as Ie}from"./circle-check-big-Qn5jJKfH.js";import{R as ls}from"./refresh-cw-Dr342wB2.js";import{s as ut}from"./subjects-BlAP40QQ.js";import{L as Ft}from"./lock-6q-juSdu.js";import Te from"./confetti.module-C94ZD2ww.js";import{triggerQuizSubmitted as os}from"./automationService-DoO5SNeM.js";import{b as cs,P as ds,L as xs,E as ms}from"./quizService-hKqxJjxh.js";import us from"./ScientificCalculator-YnJAbv_n.js";import pt from"./SupplementalBanner-BWRH1BJK.js";import{g as ps,r as hs,a as fs,d as Lt}from"./vendor-firebase-firestore-52DD1vc9.js";import{u as bs}from"./useCurriculum-DKgroDSx.js";import{S as gs}from"./search-DoNO8thr.js";import{F as ys}from"./funnel-DjeGbYf2.js";import"./useSubjectAvailability-Wk6vHhYW.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-markdown-yqZQ_iQm.js";import"./chart-column-V8fKqOo0.js";import"./chevron-up-Bup_RJHP.js";/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ws=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Ye=te("arrow-left",ws);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const js=[["rect",{x:"14",y:"14",width:"4",height:"6",rx:"2",key:"p02svl"}],["rect",{x:"6",y:"4",width:"4",height:"6",rx:"2",key:"xm4xkj"}],["path",{d:"M6 20h4",key:"1i6q5t"}],["path",{d:"M14 10h4",key:"ru81e7"}],["path",{d:"M6 14h2v6",key:"16z9wg"}],["path",{d:"M14 4h2v6",key:"1idq9u"}]],vs=te("binary",js);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ns=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],ht=te("bookmark",Ns);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ks=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],ft=te("box",ks);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Cs=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],bt=te("braces",Cs);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ss=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],zs=te("circle-check",Ss);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const As=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],_s=te("circle-help",As);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ms=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],gt=te("circle",Ms);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ts=[["circle",{cx:"12",cy:"6",r:"1",key:"1bh7o1"}],["line",{x1:"5",x2:"19",y1:"12",y2:"12",key:"13b5wn"}],["circle",{cx:"12",cy:"18",r:"1",key:"lqb9t5"}]],Xe=te("divide",Ts);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ds=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],yt=te("hash",Ds);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ps=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Is=te("key",Ps);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Es=[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]],Fs=te("notebook-pen",Es);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ls=[["path",{d:"M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z",key:"nt11vn"}],["path",{d:"m18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18",key:"15qc1e"}],["path",{d:"m2.3 2.3 7.286 7.286",key:"1wuzzi"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]],wt=te("pen-tool",Ls);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $s=[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]],jt=te("percent",$s);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Bs=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],$t=te("play",Bs);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Rs=[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]],qs=te("ruler",Rs);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Qs=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M14 15H9v-5",key:"pi4jk9"}],["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M21 3 9 15",key:"15kdhq"}]],Os=te("scaling",Qs);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ws=[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]],vt=te("sigma",Ws);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Hs=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3",key:"m1af9g"}],["path",{d:"M9 11.2h5.7",key:"3zgcl2"}]],Ve=te("square-function",Hs);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Xs=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Nt=te("square",Xs);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Vs=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],Us=te("timer",Vs);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Gs=[["path",{d:"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"14u9p9"}]],kt=te("triangle",Gs);function Ys(t){let a=t>>>0;return()=>{a+=1831565813;let c=Math.imul(a^a>>>15,a|1);return c^=c+Math.imul(c^c>>>7,c|61),((c^c>>>14)>>>0)/4294967296}}function Zs(t,a){const c=[...t],x=Ys(a);for(let r=c.length-1;r>0;r--){const l=Math.floor(x()*(r+1));[c[r],c[l]]=[c[l],c[r]]}return c}function at(t){const a=t??new Date;return new Intl.DateTimeFormat("en-CA",{timeZone:"Asia/Manila",year:"numeric",month:"2-digit",day:"2-digit"}).format(a)}function qe(t){const a=t??new Date,c=new Intl.DateTimeFormat("en-US",{timeZone:"Asia/Manila",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1}).formatToParts(a),x=r=>parseInt(c.find(l=>l.type===r)?.value??"0",10);return new Date(x("year"),x("month")-1,x("day"),x("hour"),x("minute"),x("second"))}function rt(t){const a=qe(t),c=a.getFullYear(),x=(a.getDay()+6)%7,r=new Date(a);r.setDate(a.getDate()-x+3);const l=new Date(r.getFullYear(),0,1),m=Math.floor((r.getTime()-l.getTime())/(1440*60*1e3)),_=Math.floor(m/7)+1;return c*100+_}function Qe(t){return(qe(t).getDay()+6)%7}function Ks(t){const a=qe(t),c=Qe(a),x=c===0?7:7-c,r=new Date(a);return r.setDate(a.getDate()+x),r.setHours(0,0,0,0),r}const Js=[{id:"xp_50",label:"+50 XP Boost",description:"Bonus XP on your next quiz",icon:"⚡",type:"xp",value:50,rarity:"common",color:"#4ade80"},{id:"xp_100",label:"+100 XP Boost",description:"Double bonus XP reward",icon:"🌟",type:"xp",value:100,rarity:"rare",color:"#facc15"},{id:"xp_200",label:"+200 XP Epic Boost",description:"Massive XP surge",icon:"💥",type:"xp",value:200,rarity:"epic",color:"#f97316"},{id:"coins_25",label:"25 Math Coins",description:"Spend on hints or power-ups",icon:"🪙",type:"coins",value:25,rarity:"common",color:"#fbbf24"},{id:"coins_50",label:"50 Math Coins",description:"Bigger coin reward",icon:"💰",type:"coins",value:50,rarity:"rare",color:"#f59e0b"},{id:"streak_shield",label:"Streak Shield",description:"Protects streak if you miss a day",icon:"🛡️",type:"streak_shield",value:1,rarity:"rare",color:"#60a5fa"},{id:"hint_x3",label:"3 Hint Tokens",description:"Use in-quiz hints",icon:"💡",type:"hint_token",value:3,rarity:"common",color:"#a78bfa"},{id:"hint_x5",label:"5 Hint Tokens",description:"More hints to use",icon:"🔦",type:"hint_token",value:5,rarity:"rare",color:"#8b5cf6"},{id:"xp_mult_1h",label:"1-Hour XP ×1.5",description:"1.5× XP for all quizzes for 1 hour",icon:"⏰",type:"xp_multiplier",value:60,rarity:"epic",color:"#ec4899"},{id:"xp_mult_30m",label:"30-Min XP ×2",description:"2× XP for 30 minutes",icon:"🚀",type:"xp_multiplier",value:30,rarity:"epic",color:"#e11d48"},{id:"xp_75",label:"+75 XP Boost",description:"Solid XP reward",icon:"✨",type:"xp",value:75,rarity:"common",color:"#34d399"},{id:"coins_75",label:"75 Math Coins",description:"Premium coin haul",icon:"🏅",type:"coins",value:75,rarity:"epic",color:"#d97706"},{id:"hint_x2",label:"2 Hint Tokens",description:"Quick hint pack",icon:"🕯️",type:"hint_token",value:2,rarity:"common",color:"#7c3aed"},{id:"xp_streak_150",label:"+150 XP + Streak Save",description:"XP boost + streak protection combo",icon:"🔥",type:"xp",value:150,rarity:"epic",color:"#dc2626"},{id:"coins_100",label:"100 Math Coins",description:"Jackpot coin reward",icon:"🎰",type:"coins",value:100,rarity:"epic",color:"#b45309"},{id:"xp_25",label:"+25 XP Starter",description:"Small but reliable XP",icon:"🌱",type:"xp",value:25,rarity:"common",color:"#86efac"},{id:"hint_x1",label:"1 Hint Token",description:"A single lifeline",icon:"🔍",type:"hint_token",value:1,rarity:"common",color:"#c4b5fd"},{id:"coins_10",label:"10 Math Coins",description:"Daily pocket change",icon:"🪙",type:"coins",value:10,rarity:"common",color:"#fde68a"},{id:"streak_shield2",label:"2 Streak Shields",description:"Double streak protection",icon:"🏰",type:"streak_shield",value:2,rarity:"epic",color:"#3b82f6"},{id:"xp_120",label:"+120 XP Power Surge",description:"Strong XP reward for the day",icon:"⚡",type:"xp",value:120,rarity:"rare",color:"#16a34a"},{id:"hint_x4",label:"4 Hint Tokens",description:"Generous hint pack",icon:"📚",type:"hint_token",value:4,rarity:"rare",color:"#9333ea"}];function ea(t){return Zs(Js,t).slice(0,7).map((x,r)=>({...x,day:r}))}function nt(){return ea(rt())}function ta(){const t=nt(),a=Qe();return t[a]}const Ct=()=>{const t=["#4F46E5","#EC4899","#f43f5e","#10B981","#0ea5e9"],a=Array.from({length:50},(c,x)=>({id:x,left:Math.random()*100,animationDelay:Math.random()*.5,backgroundColor:t[Math.floor(Math.random()*t.length)],rotation:Math.random()*360}));return e.jsx("div",{className:"fixed inset-0 pointer-events-none z-[100] overflow-hidden",children:a.map(c=>e.jsx(v.div,{initial:{y:-20,x:`${c.left}vw`,opacity:1,rotate:0},animate:{y:"100vh",rotate:c.rotation,opacity:0},transition:{duration:2+Math.random()*2,delay:c.animationDelay,ease:"easeIn"},style:{position:"absolute",width:"10px",height:"10px",backgroundColor:c.backgroundColor,willChange:"transform, opacity"},className:"rounded-sm"},c.id))})},sa=({streak:t})=>t<3?null:e.jsx(v.div,{initial:{scale:0,y:50},animate:{scale:1,y:0},exit:{scale:0,opacity:0},transition:{type:"spring",damping:25,stiffness:200},className:"fixed top-24 left-1/2 -translate-x-1/2 z-[70] pointer-events-none",style:{willChange:"transform, opacity"},children:e.jsxs("div",{className:"bg-gradient-to-r from-[#FFB356] to-[#FF8B8B] text-white px-6 py-3 rounded-2xl shadow-2xl flex items-center gap-3",children:[e.jsx(Ce,{size:24,className:"animate-pulse"}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-lg font-black",children:[t,"x STREAK!"]}),e.jsxs("p",{className:"text-xs font-bold opacity-90",children:["+",t*5," Bonus XP"]})]})]})}),aa=({lesson:t,questions:a,onComplete:c,onBack:x})=>{const[r,l]=s.useState(0),[m,_]=s.useState(null),[S,p]=s.useState(""),[w,E]=s.useState(!1),[T,n]=s.useState(!1),[$,f]=s.useState(0),[F,P]=s.useState(0),[R,M]=s.useState(0),[b,u]=s.useState(!1),[A,N]=s.useState([]),[O,K]=s.useState(!1),[U,J]=s.useState(!1),[ae,ne]=s.useState([]),[ce]=s.useState(Date.now()),[re,L]=s.useState(0),[oe,X]=s.useState(0),[le,de]=s.useState({}),[k,W]=s.useState(!1),[o]=s.useState(Array.from({length:15},(j,Q)=>({id:Q,size:Math.random()*120+60,x:Math.random()*100,y:Math.random()*100,duration:Math.random()*25+15,delay:Math.random()*-20,color:["bg-white/5","bg-indigo-300/10","bg-sky-300/10","bg-purple-300/10"][Math.floor(Math.random()*4)]}))),i=a[r],y=t.title,z=t.type;if(!i)return e.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center bg-black/60 backdrop-blur-md p-4",children:e.jsxs("div",{className:"w-full max-w-xl rounded-[32px] bg-white p-6 text-center shadow-2xl",children:[e.jsx("div",{className:"mx-auto mb-4 h-12 w-12 rounded-full border-4 border-[#9956DE] border-t-transparent animate-spin"}),e.jsx("h2",{className:"text-2xl font-black text-[#0a1628] mb-2",children:"Preparing checkpoint"}),e.jsx("p",{className:"text-sm text-[#5a6578] mb-5",children:"We are loading or rebuilding the quiz so the module can open safely."}),e.jsx(je,{onClick:x,className:"rounded-xl bg-[#9956DE] hover:bg-[#8544c7] text-white font-bold",children:"Back to module"})]})});const D=j=>{try{const Q=window.AudioContext||window.webkitAudioContext;if(!Q)return;const ee=new Q,Y=ee.currentTime,V=(d,B,H,g=.1,h="sine")=>{const C=ee.createOscillator(),I=ee.createGain();C.type=h,C.frequency.value=d,I.gain.setValueAtTime(0,B),I.gain.linearRampToValueAtTime(g,B+.05),I.gain.exponentialRampToValueAtTime(.001,B+H),C.connect(I),I.connect(ee.destination),C.start(B),C.stop(B+H)};j==="correct"?(V(880,Y,.1,.1,"sine"),V(1108.73,Y+.1,.2,.1,"sine")):j==="incorrect"?(V(300,Y,.2,.05,"sawtooth"),V(250,Y+.15,.3,.05,"sawtooth")):j==="streak"?(V(440,Y,.1,.05,"square"),V(554.37,Y+.1,.1,.05,"square"),V(659.25,Y+.2,.1,.05,"square"),V(880,Y+.3,.4,.05,"square")):j==="complete"&&(V(523.25,Y,.1,.1),V(659.25,Y+.15,.1,.1),V(783.99,Y+.3,.1,.1),V(1046.5,Y+.45,.5,.1))}catch{}};s.useEffect(()=>{i?.type==="multiple-choice"&&i.options&&N([...i.options].sort(()=>Math.random()-.5))},[r,i]),s.useEffect(()=>{const j=Q=>{Q.key==="Enter"&&(!w&&se()?ge():w&&Se())};return window.addEventListener("keypress",j),()=>window.removeEventListener("keypress",j)},[w,m,S]);const se=()=>i.type==="fill-in-blank"?S.trim().length>0:m!==null,Z=()=>{!le[r]&&!w&&(de(j=>({...j,[r]:!0})),X(j=>Math.max(0,j-5)),D("correct"))},ge=()=>{if(!se())return;let j=!1,Q="";if(i.type==="fill-in-blank"){Q=S.trim().toLowerCase();const V=i.correctAnswer.toLowerCase().trim();j=Q===V||Q.replace(/\s+/g,"")===V.replace(/\s+/g,"")}else{if(!m)return;Q=m,j=Q===i.correctAnswer}if(n(j),E(!0),ne([...ae,j]),!j){W(!0),D("incorrect"),setTimeout(()=>W(!1),500),P(0);return}const ee=le[r]?5:10;X(V=>V+ee),f(V=>V+1);const Y=F+1;if(P(Y),M(Math.max(R,Y)),Y>0&&Y%3===0){const V=Y*5;L(d=>d+V),K(!0),D("streak"),setTimeout(()=>K(!1),2e3)}else D("correct");Ke(()=>import("./confetti.module-C94ZD2ww.js"),[]).then(V=>{V.default({particleCount:30,spread:40,colors:["#75D06A","#6ED1CF"],origin:{y:.6}})})},Se=()=>{rj+1),E(!1),_(null),p(""),n(!1)):ye()},ye=()=>{u(!0),J(!0),D("complete"),setTimeout(()=>J(!1),5e3)},q=z==="quiz"?{gradient:"bg-gradient-to-br from-[#7274ED] via-[#9956DE] to-[#7274ED]",text:"text-[#7274ED]",bgLight:"bg-[#7274ED]/10",border:"border-[#7274ED]/30"}:{gradient:"bg-gradient-to-br from-[#75D06A] via-[#6ED1CF] to-[#75D06A]",text:"text-[#75D06A]",bgLight:"bg-[#75D06A]/10",border:"border-[#75D06A]/30"},ue=(()=>{const j=y.toLowerCase();return j.includes("geometry")||j.includes("shape")?[kt,gt,Nt,ft,qs,Os]:j.includes("algebra")||j.includes("equation")?[me,Xe,bt,Ve,Me,jt]:j.includes("calculus")||j.includes("derivative")||j.includes("integral")?[vt,Ve,$e,Me,Xe,bt]:j.includes("statistics")||j.includes("probability")?[ve,$e,ft,gt,kt,Nt]:[Me,vt,Xe,jt,Ve,vs]})(),fe=ue[0];if(b){const j=Math.round($/a.length*100),Q=z==="quiz"?100:50,ee=Math.round($/a.length*100),Y=Q+ee+re,V=Math.floor((Date.now()-ce)/1e3),d=Math.floor(V/60),B=V%60;return e.jsxs(e.Fragment,{children:[U&&e.jsx(Ct,{}),e.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center bg-black/60 backdrop-blur-md p-4 animate-in fade-in duration-500",children:e.jsxs(v.div,{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},transition:{type:"spring",damping:25,stiffness:200},className:"bg-white rounded-[32px] w-full max-w-lg p-6 text-center shadow-2xl relative overflow-hidden",style:{willChange:"transform, opacity"},children:[e.jsx("div",{className:`absolute top-0 left-0 w-full h-24 ${q.gradient} opacity-10 rounded-b-[50%]`}),e.jsx("div",{className:"absolute inset-0 overflow-hidden pointer-events-none opacity-[0.03]",children:ue.map((H,g)=>e.jsx(H,{className:"absolute text-[#0a1628]",size:30+g%3*15,style:{top:`${Math.random()*100}%`,left:`${Math.random()*100}%`,transform:`rotate(${Math.random()*360}deg)`}},g))}),e.jsxs("div",{className:"relative mb-4 flex justify-center",children:[e.jsx(v.div,{initial:{scale:0,rotate:-180},animate:{scale:1,rotate:0},transition:{type:"spring",damping:25,stiffness:200,delay:.2},className:"w-20 h-20 bg-gradient-to-br from-[#FB96BB] to-[#FFB356] rounded-full flex items-center justify-center text-white shadow-2xl shadow-rose-200",style:{willChange:"transform"},children:e.jsx(Re,{size:40,fill:"currentColor"})}),e.jsx(v.div,{animate:{scale:[1,1.2,1],rotate:[0,180,360]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"absolute top-0 right-1/3 text-xl",children:e.jsx(Ge,{size:20,className:"text-rose-400"})}),e.jsx(v.div,{animate:{scale:[1,1.2,1],rotate:[0,-180,-360]},transition:{duration:2,repeat:1/0,delay:.5,ease:"easeInOut"},className:"absolute bottom-0 left-1/3 text-xl",children:e.jsx(Ge,{size:20,className:"text-rose-400"})})]}),e.jsx(v.h2,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{duration:.4,delay:.3,ease:"easeOut"},className:"text-3xl font-bold text-[#0a1628] mb-2",style:{willChange:"transform, opacity"},children:j>=90?"Perfect!":j>=80?"Excellent Job!":j>=70?"Great Work!":j>=60?"Good Effort!":"Keep Practicing!"}),e.jsxs(v.p,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{duration:.4,delay:.4,ease:"easeOut"},className:"text-[#5a6578] mb-6 font-medium",style:{willChange:"transform, opacity"},children:["You answered ",$," out of ",a.length," questions correctly"]}),e.jsxs(v.div,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{duration:.4,delay:.5,ease:"easeOut"},className:"grid grid-cols-2 gap-3 mb-5",style:{willChange:"transform, opacity"},children:[e.jsxs("div",{className:"bg-gradient-to-br from-indigo-50 to-indigo-100 rounded-2xl p-4 border-2 border-[#7274ED]/30",children:[e.jsx("div",{className:"flex items-center justify-center mb-1",children:e.jsx(ve,{className:"text-sky-600",size:20})}),e.jsx("p",{className:"text-[10px] text-sky-600 font-bold uppercase mb-1 tracking-wider",children:"Accuracy"}),e.jsxs("p",{className:"text-3xl font-black text-sky-700",children:[j,"%"]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-orange-50 to-orange-100 rounded-2xl p-4 border-2 border-[#FFB356]/30",children:[e.jsx("div",{className:"flex items-center justify-center mb-1",children:e.jsx(be,{className:"text-orange-600",size:20})}),e.jsx("p",{className:"text-[10px] text-orange-600 font-bold uppercase mb-1 tracking-wider",children:"Total XP"}),e.jsxs("p",{className:"text-3xl font-black text-orange-600",children:["+",Y]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-teal-50 to-teal-100 rounded-2xl p-4 border-2 border-[#75D06A]/30",children:[e.jsx("div",{className:"flex items-center justify-center mb-1",children:e.jsx(Ce,{className:"text-[#75D06A]",size:20})}),e.jsx("p",{className:"text-[10px] text-[#75D06A] font-bold uppercase mb-1 tracking-wider",children:"Best Streak"}),e.jsxs("p",{className:"text-3xl font-black text-teal-700",children:[R,"x"]})]}),e.jsxs("div",{className:"bg-gradient-to-br from-sky-50 to-sky-100 rounded-2xl p-4 border-2 border-[#7274ED]/30",children:[e.jsx("div",{className:"flex items-center justify-center mb-1",children:e.jsx(Ee,{className:"text-sky-600",size:20})}),e.jsx("p",{className:"text-[10px] text-sky-600 font-bold uppercase mb-1 tracking-wider",children:"Time"}),e.jsxs("p",{className:"text-3xl font-black text-sky-700",children:[d,":",B.toString().padStart(2,"0")]})]})]}),e.jsxs(v.div,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{duration:.4,delay:.6,ease:"easeOut"},className:"bg-[#edf1f7] rounded-2xl p-4 mb-5 text-left",style:{willChange:"transform, opacity"},children:[e.jsxs("h3",{className:"font-bold text-[#0a1628] mb-2 flex items-center gap-2 text-sm",children:[e.jsx(tt,{className:"text-rose-500",size:16}),"XP Breakdown"]}),e.jsxs("div",{className:"space-y-1.5 text-sm",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("span",{className:"text-[#5a6578] text-xs",children:["Base XP (",z,")"]}),e.jsxs("span",{className:"font-bold text-[#0a1628] text-sm",children:["+",Q]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("span",{className:"text-[#5a6578] text-xs",children:["Score Bonus (",j,"%)"]}),e.jsxs("span",{className:"font-bold text-[#0a1628] text-sm",children:["+",ee]})]}),re>0&&e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-[#5a6578] text-xs",children:"Streak Bonuses"}),e.jsxs("span",{className:"font-bold text-orange-600 text-sm",children:["+",re]})]}),e.jsxs("div",{className:"border-t-2 border-[#dde3eb] pt-1.5 flex justify-between items-center",children:[e.jsx("span",{className:"text-[#0a1628] font-bold text-xs",children:"Total XP Earned"}),e.jsxs("span",{className:"font-black text-orange-600",children:["+",Y]})]})]})]}),e.jsx(v.div,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{duration:.4,delay:.7,ease:"easeOut"},className:"flex items-center justify-center gap-1.5 mb-6",style:{willChange:"transform, opacity"},children:ae.map((H,g)=>e.jsx(v.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",damping:25,stiffness:200,delay:.7+g*.05},className:`w-7 h-7 rounded-lg flex items-center justify-center ${H?"bg-[#75D06A]/100":"bg-red-400"}`,style:{willChange:"transform"},children:H?e.jsx(ke,{className:"text-white",size:14}):e.jsx(me,{className:"text-white",size:14})},g))}),e.jsx(v.div,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{duration:.4,delay:.8,ease:"easeOut"},style:{willChange:"transform, opacity"},children:e.jsx(je,{onClick:()=>c(j,Y),className:`w-full py-5 rounded-2xl font-bold ${q.gradient} text-white hover:opacity-90 shadow-xl hover:shadow-2xl transition-all hover:scale-[1.02] active:scale-[0.98]`,children:"Continue Learning"})})]})})]})}return e.jsxs(e.Fragment,{children:[U&&e.jsx(Ct,{}),e.jsx(pe,{children:O&&e.jsx(sa,{streak:F})}),e.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col bg-[#edf1f7] overflow-hidden font-sans",children:[e.jsxs("div",{className:`absolute top-0 left-0 right-0 h-[45vh] ${q.gradient} rounded-b-[60px] md:rounded-b-[80px] shadow-2xl z-0 overflow-hidden`,children:[e.jsx("div",{className:"absolute top-0 left-0 w-64 h-64 bg-white opacity-5 rounded-full -translate-x-1/2 -translate-y-1/2 blur-2xl"}),e.jsx("div",{className:"absolute bottom-0 right-0 w-80 h-80 bg-white opacity-10 rounded-full translate-x-1/3 translate-y-1/3 blur-3xl"}),e.jsx("div",{className:"absolute top-1/4 right-1/4 w-32 h-32 bg-white opacity-5 rounded-full blur-xl"}),e.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[ue.map((j,Q)=>e.jsx("div",{className:"absolute text-white/10 animate-pulse",style:{top:`${10+Q*15}%`,left:`${10+Q*25%80}%`,animationDuration:`${3+Q}s`,transform:`rotate(${Q*45}deg) scale(${1+Q%3*.2})`},children:e.jsx(j,{size:48+Q%2*32})},Q)),e.jsx("div",{className:"absolute -bottom-10 -left-10 text-white/5 rotate-12",children:e.jsx(fe,{size:200})})]})]}),e.jsxs("header",{className:"relative z-[60] h-20 flex items-center justify-between px-6 pt-2 shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-4 flex-1",children:[e.jsx("button",{onClick:x,className:"w-10 h-10 rounded-xl bg-white/20 backdrop-blur-md flex items-center justify-center text-white hover:bg-white/30 transition-all border border-slate-300 hover:scale-110 active:scale-95",children:e.jsx(me,{size:20})}),e.jsxs("div",{className:"text-white",children:[e.jsx("h1",{className:"font-bold text-lg leading-tight",children:y}),e.jsxs("div",{className:"flex items-center gap-2 opacity-80 text-xs font-medium uppercase tracking-wide",children:[e.jsx("span",{children:z}),e.jsx("span",{className:"w-1 h-1 bg-white rounded-full"}),e.jsxs("span",{children:["Question ",r+1,"/",a.length]})]})]})]}),e.jsx("div",{className:"flex items-center justify-center flex-1"}),e.jsx("div",{className:"flex items-center justify-end gap-4 flex-1"})]}),e.jsx("div",{className:"absolute inset-0 pointer-events-none z-0 overflow-hidden",children:o.map(j=>e.jsx(v.div,{className:`absolute rounded-full blur-3xl ${j.color}`,style:{width:j.size,height:j.size,left:`${j.x}%`,top:`${j.y}%`,willChange:"transform"},animate:{x:[0,Math.random()*100-50,0],y:[0,Math.random()*100-50,0],scale:[1,1.2,1]},transition:{duration:j.duration,repeat:1/0,ease:"linear",delay:j.delay}},j.id))}),e.jsxs("main",{className:"relative z-10 flex-1 flex flex-col items-center justify-start px-4 sm:px-6 xl:px-10 pb-8 pt-4 md:pt-8 overflow-y-auto",children:[e.jsxs("div",{className:"w-full max-w-lg mb-6 sm:mb-8 px-2 flex items-center justify-between gap-6 shrink-0 mt-2",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex justify-between items-center text-[10px] font-bold text-white/80 mb-2 uppercase tracking-wider",children:[e.jsx("span",{children:"Progress"}),e.jsxs("span",{className:"bg-white/20 px-2 py-0.5 rounded-full flex items-center gap-1",children:[e.jsx(be,{size:10})," ",oe," pts"]})]}),e.jsx("div",{className:"flex items-center justify-between gap-1 w-full backdrop-blur-sm",children:a.map((j,Q)=>{let ee="bg-white/30";return Q=10?"text-red-600 drop-shadow-[0_0_15px_rgba(220,38,38,0.8)]":F>=5?"text-red-500 drop-shadow-[0_0_10px_rgba(239,68,68,0.7)]":F>=3?"text-orange-500 drop-shadow-[0_0_8px_rgba(249,115,22,0.6)]":F>=1?"text-orange-400 drop-shadow-[0_0_6px_rgba(251,146,60,0.5)]":"text-yellow-400 opacity-60"}`,fill:"currentColor",strokeWidth:1}),e.jsx("span",{className:"absolute z-10 text-white font-black text-xl mt-3 drop-shadow-md",children:F})]})})]}),r===Math.floor(a.length/2)&&r>0&&!w&&e.jsxs(v.div,{initial:{scale:0,y:20},animate:{scale:1,y:0},transition:{type:"spring",damping:25,stiffness:200},className:"mb-4 bg-white/20 backdrop-blur-md text-white px-6 py-3 rounded-2xl font-bold shadow-lg",style:{willChange:"transform"},children:[e.jsx(ve,{size:20,className:"inline mr-2 text-white"}),"Halfway there! Keep it up!"]}),e.jsx(pe,{mode:"wait",children:e.jsxs(v.div,{initial:{opacity:0,x:100},animate:k?{x:[-10,10,-10,10,0],scale:[1,1.01,1],opacity:1}:{opacity:1,x:0},transition:k?{duration:.4}:{type:"spring",damping:30,stiffness:300},exit:{opacity:0,x:-100},className:"w-full max-w-[50rem] mx-auto flex flex-col flex-1 pb-10",style:{willChange:"transform, opacity"},children:[e.jsxs("div",{className:"bg-white rounded-[32px] sm:rounded-[40px] shadow-[0_20px_60px_-15px_rgba(0,0,0,0.2)] overflow-hidden border border-[#dde3eb] flex flex-col relative flex-1 min-h-[450px]",children:[e.jsx(v.div,{animate:{backgroundColor:w?T?"#75D06A":"#FF8B8B":"#7C3AED"},className:"h-2 w-full absolute top-0 left-0 z-20",style:{willChange:"background-color"}}),e.jsxs("div",{className:"p-6 sm:p-8 md:p-10 shrink-0 flex flex-col items-center justify-center text-center mt-2",children:[e.jsx("span",{className:`inline-block px-4 py-1.5 ${q.bgLight} ${q.text} rounded-full text-[10px] sm:text-[11px] font-black mb-4 sm:mb-8 uppercase tracking-widest border ${q.border}`,children:i.type==="multiple-choice"?"Multiple Choice":i.type==="true-false"?"True or False":"Fill in the Blank"}),e.jsx("h2",{className:"text-xl sm:text-2xl md:text-3xl font-bold text-[#0a1628] leading-snug w-full",children:i.question.includes("___")?e.jsx("span",{children:i.question.split("___").map((j,Q,ee)=>e.jsxs(Pe.Fragment,{children:[j,Qp(Y.target.value),className:`inline-block w-24 mx-2 border-b-4 outline-none text-center bg-transparent font-bold ${w?T?"border-[#75D06A] text-[#75D06A]":"border-red-500 text-red-500":"border-[#7C3AED] text-[#7C3AED] focus:border-[#75D06A]"}`})]},Q))}):i.question}),!w&&i.explanation&&e.jsxs("button",{onClick:Z,disabled:le[r],className:`mt-6 flex items-center gap-1 text-xs font-bold px-3 py-1.5 rounded-full transition-all ${le[r]?"bg-slate-200 text-slate-400 cursor-not-allowed":"bg-orange-100 text-orange-600 hover:bg-orange-200 shadow-sm"}`,children:[e.jsx(be,{size:14}),le[r]?"Hint Used":"Use Hint (-5 pts)"]}),le[r]&&!w&&e.jsxs("div",{className:"mt-4 text-sm bg-orange-50 border border-orange-200 text-orange-700 px-4 py-2 rounded-xl",children:[e.jsx("strong",{children:"Hint:"})," ",typeof i.explanation=="string"?i.explanation.substring(0,80):"Check your concepts..."]})]}),e.jsxs("div",{className:"p-4 sm:p-6 md:p-8 bg-[#edf1f7]/80 backdrop-blur-sm border-t border-[#dde3eb] flex-1 overflow-y-auto flex flex-col justify-center",children:[(i.type==="multiple-choice"||i.type==="true-false")&&e.jsxs("div",{className:"w-full max-w-4xl mx-auto flex flex-col",children:[e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4 w-full",children:(i.type==="true-false"?["True","False"]:A).map((j,Q)=>{let ee="hover:border-[#dde3eb] hover:shadow-lg bg-white border-[#dde3eb] text-[#5a6578] shadow-sm";return w?j===i.correctAnswer?ee="bg-[#75D06A]/10 border-[#75D06A] text-teal-700 shadow-teal-100 ring-2 ring-teal-200":j===m?ee="bg-red-50 border-red-500 text-red-700 shadow-red-100 ring-2 ring-red-200 opacity-80":ee="bg-[#edf1f7] border-[#dde3eb] text-slate-500 opacity-60 scale-[0.98]":m===j&&(ee="bg-purple-50 border-[#7C3AED] text-[#7C3AED] ring-2 ring-indigo-100 shadow-md scale-[1.02] z-10"),e.jsxs(v.button,{disabled:w,onClick:()=>_(j),whileHover:w?{}:{scale:1.02},whileTap:w?{}:{scale:.98},transition:{duration:.15,ease:"easeOut"},className:` - relative p-4 sm:p-5 md:p-6 rounded-2xl md:rounded-[20px] border-2 font-bold text-base sm:text-lg transition-all duration-200 text-left flex items-center justify-between group min-h-[4rem] sm:min-h-[5rem] w-full - ${ee} - `,style:{willChange:"transform"},children:[e.jsx("span",{className:"relative z-10 break-words line-clamp-3 pr-2 w-full",children:j}),w&&j===i.correctAnswer&&e.jsx(v.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",damping:25,stiffness:200},className:"bg-[#75D06A] p-1 rounded-full",style:{willChange:"transform"},children:e.jsx(ke,{size:18,className:"text-white"})}),w&&j===m&&j!==i.correctAnswer&&e.jsx(v.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",damping:25,stiffness:200},className:"bg-red-100 p-1 rounded-full",style:{willChange:"transform"},children:e.jsx(me,{size:18,className:"text-red-600"})}),!w&&e.jsx("div",{className:`w-6 h-6 rounded-full border-2 border-[#dde3eb] group-hover:border-[#dde3eb] transition-colors ${m===j?`bg-current border-current ${q.text}`:""}`})]},Q)})}),w&&e.jsxs(v.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},className:"space-y-3 mt-6 w-full",style:{willChange:"transform, opacity"},children:[!T&&m&&m!==i.correctAnswer&&e.jsx("div",{className:"bg-red-50 border-2 border-red-200 rounded-2xl p-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex-shrink-0 mt-0.5",children:e.jsx(me,{size:20,className:"text-red-500"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-bold text-red-700 mb-1",children:"Incorrect"}),e.jsx("p",{className:"text-red-800 text-sm leading-relaxed",children:typeof i.explanation=="string"?i.explanation:i.explanation?.incorrect})]})]})}),e.jsx("div",{className:`bg-[#75D06A]/10 border-2 border-[#75D06A]/30 rounded-2xl p-4 ${T?"block":"hidden"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"flex-shrink-0 mt-0.5",children:e.jsx(ke,{size:20,className:"text-[#75D06A]"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-bold text-teal-700 mb-1",children:"Correct!"}),e.jsx("p",{className:"text-teal-800 text-sm leading-relaxed",children:typeof i.explanation=="string"?i.explanation:i.explanation?.correct})]})]})})]})]}),i.type==="fill-in-blank"&&w&&!T&&e.jsxs(v.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},className:"mt-4 text-center w-full",style:{willChange:"transform, opacity"},children:[e.jsx("p",{className:"text-slate-500 text-xs font-bold uppercase tracking-wider mb-1",children:"Correct answer"}),e.jsx("p",{className:"text-[#75D06A] font-black text-2xl bg-[#75D06A]/10 py-3 rounded-2xl border-2 border-[#75D06A]/30 inline-block px-10",children:i.correctAnswer}),i.explanation&&e.jsxs("div",{className:"mt-6 mx-auto max-w-lg bg-red-50 border border-red-200 text-red-800 rounded-xl p-4 flex gap-3 text-left",children:[e.jsx(me,{size:20,className:"shrink-0 text-red-500"}),e.jsx("div",{className:"text-sm font-medium",children:typeof i.explanation=="string"?i.explanation:i.explanation?.incorrect})]})]}),i.type==="fill-in-blank"&&w&&T&&i.explanation&&e.jsxs(v.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},className:"mt-4 bg-[#75D06A]/10 border border-[#75D06A]/30 text-teal-800 rounded-xl p-4 flex gap-3 text-left max-w-lg mx-auto w-full text-sm font-medium",style:{willChange:"transform, opacity"},children:[e.jsx(ke,{size:20,className:"shrink-0 text-[#75D06A]"}),e.jsxs("div",{children:[e.jsx("span",{className:"font-bold block mb-1",children:"Correct! "}),typeof i.explanation=="string"?i.explanation:i.explanation?.correct]})]})]}),e.jsx("div",{className:"p-4 sm:p-6 border-t border-[#dde3eb] bg-white flex items-center justify-between shrink-0 gap-4",children:w?e.jsxs(je,{onClick:Se,className:`w-full px-10 py-7 rounded-2xl font-bold text-base shadow-xl transition-all flex items-center justify-center gap-2 hover:-translate-y-1 ${T?"bg-[#75D06A]/100 hover:bg-teal-600 text-white shadow-teal-200":"bg-orange-500 hover:bg-orange-600 text-white shadow-sm"}`,children:[r{const[c,x]=s.useState(0);if(!t||t.length===0)return e.jsx(ra,{});const r=t[c],l=t.filter((m,_)=>_!==c);return e.jsxs("div",{className:"space-y-4",children:[e.jsx(pe,{mode:"wait",children:e.jsxs(v.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"rounded-2xl overflow-hidden bg-slate-900 shadow-lg",children:[e.jsx("div",{className:"relative w-full aspect-video",children:e.jsx("iframe",{src:`https://www.youtube.com/embed/${r.videoId}?rel=0&modestbranding=1`,title:r.title,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"absolute inset-0 w-full h-full border-0"})}),e.jsxs("div",{className:"px-4 py-3 bg-slate-800",children:[e.jsx("p",{className:"text-slate-200 text-sm font-medium truncate",children:r.title}),e.jsx("p",{className:"text-slate-400 text-xs mt-0.5",children:r.channelTitle})]})]},r.videoId)}),l.length>0&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs text-slate-500 font-medium uppercase tracking-wide",children:"More videos"}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:l.slice(0,2).map(m=>{const _=t.findIndex(S=>S.videoId===m.videoId);return e.jsxs("button",{onClick:()=>x(_),className:"group text-left rounded-xl overflow-hidden border border-slate-200 hover:border-rose-300 hover:shadow-md transition-all duration-200 bg-white",children:[e.jsxs("div",{className:"relative aspect-video",children:[e.jsx("img",{src:m.thumbnailUrl,alt:m.title,loading:"lazy",className:"w-full h-full object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors flex items-center justify-center",children:e.jsx("div",{className:"w-8 h-8 rounded-full bg-white/90 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity shadow-sm",children:e.jsx($t,{size:14,className:"text-rose-500 ml-0.5"})})})]}),e.jsxs("div",{className:"p-2.5",children:[e.jsx("p",{className:"text-slate-700 text-xs font-medium line-clamp-2 leading-snug",children:m.title}),e.jsx("p",{className:"text-slate-400 text-[10px] mt-0.5 truncate",children:m.channelTitle})]})]},m.videoId)})})]})]})},ia=({lessonId:t,lessonTitle:a,topic:c,subjectId:x,competencyCode:r,onComplete:l,onQuizComplete:m,onClose:_,onContinueLearning:S})=>{const[p,w]=s.useState([]),[E,T]=s.useState(!0),[n,$]=s.useState(null),[f,F]=s.useState(0),[P,R]=s.useState(null),[M,b]=s.useState(!1),[u,A]=s.useState(!1),[N,O]=s.useState([]),[K,U]=s.useState(!1),[J,ae]=s.useState(!1),ne=N.reduce((k,W)=>k+(W?.correct?1:0),0),ce=s.useCallback(async()=>{T(!0),$(null);try{const{generateLessonQuiz:k}=await Ke(async()=>{const{generateLessonQuiz:o}=await Promise.resolve().then(()=>ya);return{generateLessonQuiz:o}},void 0),W=await k({lessonId:t,lessonTitle:a,topic:c,subjectId:x,competencyCode:r,questionCount:10});if(W.length===0){$("No questions available for this topic.");return}w(W)}catch(k){console.error("[TryItYourselfQuiz] Generation failed:",k),$("Failed to generate quiz. Please try again.")}finally{T(!1)}},[t,a,c,x,r]);s.useEffect(()=>{if(p.length>0&&N.length>0)try{const k=N.every(W=>W!==void 0);sessionStorage.setItem(`quiz_${t}`,JSON.stringify({answers:N,currentIndex:f,questions:p,isCompleted:k}))}catch{}},[N,f,t,p]),s.useEffect(()=>{if(!J){try{const k=sessionStorage.getItem(`quiz_${t}`);if(k){const{answers:W,currentIndex:o,questions:i,isCompleted:y}=JSON.parse(k);if(W?.length&&i?.length){O(W),F(o),w(i),T(!1);const z=W[o];z&&(R(z.userAnswer),b(!0),A(z.correct)),y&&U(!0),ae(!0);return}}}catch{}ce()}},[t]);const re=s.useCallback(k=>{if(M)return;const W=p[f],o=k.toLowerCase().trim(),i=W.correctAnswer?.toLowerCase().trim()||"";let y=o===i;if(!y&&W.options&&W.options.length>0){const z=W.options.map(se=>se.toLowerCase().trim()),D=z.includes(o);(D&&z.includes(i)||D&&z.length===2)&&(y=!0)}R(k),b(!0),A(y),O(z=>{const D=[...z];return D[f]={correct:y,userAnswer:k},D})},[f,M,p]),L=()=>{if(fW+1);const k=N[f+1];k?(R(k.userAnswer),b(!0),A(k.correct)):(R(null),b(!1),A(!1))}else{const k=N.reduce((o,i)=>o+(i?.correct?1:0),0),W=Math.round(k/p.length*100);l?.(k,p.length),m?.(W),U(!0)}},oe=()=>{if(f>0){F(W=>W-1);const k=N[f-1];k?(R(k.userAnswer),b(!0),A(k.correct)):(R(null),b(!1),A(!1))}},X=p[f],le=(f+1)/p.length*100;if(E)return e.jsx("div",{className:"bg-white rounded-2xl p-6 border border-slate-200 shadow-sm",children:e.jsxs("div",{className:"flex flex-col items-center justify-center py-8",children:[e.jsx("div",{className:"w-12 h-12 rounded-full border-4 border-rose-400 border-t-transparent animate-spin mb-4"}),e.jsx("p",{className:"text-slate-600 font-medium",children:"Generating your practice quiz..."}),e.jsx("p",{className:"text-slate-400 text-sm mt-1",children:"Creating 10 unique questions with variance"})]})});if(n)return e.jsx("div",{className:"bg-white rounded-2xl p-6 border border-slate-200 shadow-sm",children:e.jsxs("div",{className:"text-center py-6",children:[e.jsx("div",{className:"w-12 h-12 rounded-full bg-rose-100 flex items-center justify-center mx-auto mb-4",children:e.jsx(me,{className:"text-rose-500",size:24})}),e.jsx("p",{className:"text-slate-700 font-medium mb-2",children:n}),e.jsx("button",{onClick:ce,className:"px-4 py-2 bg-rose-500 text-white rounded-lg font-semibold text-sm hover:bg-rose-600 transition-colors",children:"Try Again"})]})});if(!X)return null;const de=f===p.length-1;return e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"bg-gradient-to-r from-rose-500 to-orange-400 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white",children:[e.jsx(mt,{size:20}),e.jsx("span",{className:"font-bold",children:"Practice Quiz"})]}),e.jsxs("div",{className:"text-white/90 text-sm font-semibold",children:[ne,"/",p.length," correct"]})]}),e.jsx("div",{className:"h-2 bg-white/30 rounded-full overflow-hidden",children:e.jsx(v.div,{className:"h-full bg-white rounded-full",initial:{width:0},animate:{width:`${le}%`},transition:{duration:.3}})}),e.jsxs("div",{className:"flex justify-between text-white/80 text-xs mt-1",children:[e.jsxs("span",{children:["Question ",f+1," of ",p.length]}),e.jsxs("span",{children:[Math.round(le),"% complete"]})]})]}),e.jsxs("div",{className:"p-5",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[f<2&&e.jsxs("span",{className:"px-2 py-0.5 bg-blue-100 text-blue-700 text-xs font-semibold rounded-full flex items-center gap-1",children:[e.jsx(st,{size:12})," Recall"]}),f>=2&&f<6&&e.jsxs("span",{className:"px-2 py-0.5 bg-emerald-100 text-emerald-700 text-xs font-semibold rounded-full flex items-center gap-1",children:[e.jsx(ve,{size:12})," Application"]}),f>=6&&f<9&&e.jsxs("span",{className:"px-2 py-0.5 bg-purple-100 text-purple-700 text-xs font-semibold rounded-full flex items-center gap-1",children:[e.jsx(be,{size:12})," Mixed"]}),f===9&&e.jsxs("span",{className:"px-2 py-0.5 bg-amber-100 text-amber-700 text-xs font-semibold rounded-full flex items-center gap-1",children:[e.jsx(mt,{size:12})," Metacognitive"]}),X.type==="true-false"&&e.jsx("span",{className:"px-2 py-0.5 bg-slate-100 text-slate-700 text-xs font-semibold rounded-full uppercase tracking-wide border border-slate-200",children:"True or False"})]}),e.jsx("p",{className:"text-slate-800 text-base font-medium leading-relaxed mb-5",children:X.question}),e.jsx("div",{className:"space-y-2",children:X.type==="true-false"?e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>re("True"),disabled:M,className:`flex-1 py-4 rounded-xl font-bold text-lg transition-all ${M?P==="True"?X.correctAnswer==="True"?"bg-emerald-500 text-white":"bg-rose-500 text-white":"bg-slate-200 text-slate-400":"bg-purple-100 text-purple-700 hover:bg-purple-200"}`,children:"True"}),e.jsx("button",{onClick:()=>re("False"),disabled:M,className:`flex-1 py-4 rounded-xl font-bold text-lg transition-all ${M?P==="False"?X.correctAnswer==="False"?"bg-emerald-500 text-white":"bg-rose-500 text-white":"bg-slate-200 text-slate-400":"bg-purple-100 text-purple-700 hover:bg-purple-200"}`,children:"False"})]}):X.options?X.options.map((k,W)=>e.jsx(v.button,{whileHover:{scale:M?1:1.01},whileTap:{scale:M?1:.99},onClick:()=>re(k),disabled:M,className:` - w-full p-4 rounded-xl text-left font-medium transition-all border-2 - ${M?k===X.correctAnswer?"bg-emerald-50 border-emerald-500 text-emerald-700":k===P?"bg-rose-50 border-rose-500 text-rose-700":"bg-slate-50 border-slate-200 text-slate-500 opacity-50":"bg-slate-50 border-slate-200 text-slate-700 hover:border-rose-300 hover:bg-rose-50"} - `,children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:` - w-7 h-7 rounded-full flex items-center justify-center text-sm font-bold shrink-0 - ${M&&k===X.correctAnswer?"bg-emerald-500 text-white":M&&k===P?"bg-rose-500 text-white":"bg-slate-200 text-slate-600"} - `,children:String.fromCharCode(65+W)}),e.jsx("span",{className:"flex-1",children:k}),M&&k===X.correctAnswer&&e.jsx(ke,{className:"text-emerald-500",size:20}),M&&k===P&&k!==X.correctAnswer&&e.jsx(me,{className:"text-rose-500",size:20})]})},W)):e.jsxs("div",{className:"space-y-3",children:[e.jsx("input",{type:"text",value:P||"",onChange:k=>!M&&R(k.target.value),onKeyDown:k=>{k.key==="Enter"&&!M&&P?.trim()?re(P.trim()):k.key==="Enter"&&M&&L()},disabled:M,placeholder:"Type your answer and press Enter or click Submit...",className:` - w-full p-4 rounded-xl text-slate-700 font-medium border-2 transition-all - ${M?u?"bg-emerald-50 border-emerald-500":"bg-rose-50 border-rose-500":"bg-slate-50 border-slate-200 focus:border-rose-400 focus:outline-none"} - `}),M?e.jsx("button",{onClick:L,className:"w-full py-3 bg-rose-500 text-white rounded-xl font-bold hover:bg-rose-600 transition-colors",children:de?"Finish Quiz":"Next Question"}):e.jsxs("button",{onClick:()=>{P?.trim()&&re(P.trim())},disabled:!P?.trim(),className:"w-full py-3 bg-rose-500 text-white rounded-xl font-bold hover:bg-rose-600 transition-colors disabled:opacity-40 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:[e.jsx(ke,{size:16}),"Submit Answer"]})]})}),e.jsx(pe,{children:M&&e.jsx(v.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`mt-4 p-4 rounded-xl ${u?"bg-emerald-50 border border-emerald-200":"bg-rose-50 border border-rose-200"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[u?e.jsx(ke,{className:"text-emerald-500 mt-0.5 shrink-0",size:20}):e.jsx(me,{className:"text-rose-500 mt-0.5 shrink-0",size:20}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:`font-bold text-sm ${u?"text-emerald-700":"text-rose-700"}`,children:u?"Correct!":"Not quite right"}),X.explanation&&e.jsx("p",{className:"text-slate-600 text-sm mt-1 leading-relaxed",children:X.explanation}),!u&&e.jsxs("p",{className:"text-rose-600 text-sm mt-1 font-medium",children:["Correct answer: ",X.correctAnswer]})]})]})})}),M&&e.jsxs("div",{className:"flex items-center justify-between mt-5 pt-4 border-t border-slate-100",children:[e.jsxs("button",{onClick:oe,disabled:f===0,className:` - flex items-center gap-1 px-4 py-2 rounded-lg font-semibold text-sm transition-colors - ${f===0?"text-slate-300 cursor-not-allowed":"text-slate-600 hover:bg-slate-100"} - `,children:[e.jsx(is,{size:18}),"Previous"]}),e.jsxs("button",{onClick:L,className:"flex items-center gap-1 px-6 py-2.5 bg-rose-500 text-white rounded-xl font-bold text-sm hover:bg-rose-600 transition-colors shadow-md",children:[de?"Finish":"Next",e.jsx(It,{size:18})]})]})]}),K&&e.jsx(v.div,{initial:{opacity:0},animate:{opacity:1},className:"fixed inset-0 bg-black/60 backdrop-blur-sm z-50 flex items-center justify-center p-4",children:e.jsxs(v.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},className:"bg-white rounded-3xl p-8 max-w-sm w-full text-center shadow-2xl",children:[e.jsx("div",{className:"w-20 h-20 rounded-full bg-gradient-to-br from-rose-400 to-orange-400 flex items-center justify-center mx-auto mb-5",children:e.jsx(Re,{className:"text-white",size:40})}),e.jsx("h2",{className:"text-2xl font-black text-slate-800 mb-2",children:"Quiz Complete!"}),e.jsxs("p",{className:"text-slate-500 text-sm mb-6",children:["You got ",e.jsx("span",{className:"font-bold text-rose-500",children:ne})," out of ",e.jsx("span",{className:"font-bold",children:p.length})," correct"]}),e.jsx("div",{className:"mb-6",children:e.jsx("div",{className:"w-full h-4 bg-slate-100 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-gradient-to-r from-rose-400 to-orange-400 rounded-full transition-all duration-1000",style:{width:`${ne/p.length*100}%`}})})}),e.jsx("button",{onClick:()=>{U(!1),_?.(),S?.()},className:"w-full py-3 bg-rose-500 text-white rounded-xl font-bold hover:bg-rose-600 transition-colors",children:"Continue Learning"})]})})]})},la="https://deign86-mathpulse-api-v3test.hf.space";async function Bt(t,a,c=!1){const x={"Content-Type":"application/json",...a?.headers||{}},r=Wt.currentUser;if(r)try{const m=await r.getIdToken(c);m&&(x.Authorization=`Bearer ${m}`)}catch(m){throw console.error("[lessonService] Failed to get Firebase ID token:",m),new Error("Authentication failed. Please sign in again.")}const l=await fetch(`${la}${t}`,{...a,headers:x});if(l.status===401&&r&&!c)return Bt(t,a,!0);if(!l.ok){let m;try{m=await l.json()}catch{m=await l.text()}const _=new Error(typeof m=="object"?JSON.stringify(m):m);throw _.status=l.status,_.body=m,_}return l.json()}async function oa(t){return Bt("/api/rag/lesson",{method:"POST",body:JSON.stringify(t)})}const ca="rag_lesson_";function it(t){return`${ca}${t}`}function da(t){try{const a=sessionStorage.getItem(it(t));if(a)return JSON.parse(a)}catch{}return null}function xa(t,a){try{sessionStorage.setItem(it(t),JSON.stringify(a))}catch{}}function ma(t,a,c=!0){const[x,r]=s.useState([]),[l,m]=s.useState(!0),[_,S]=s.useState(null),[p,w]=s.useState([]),[E,T]=s.useState("low"),[n,$]=s.useState(0),[f,F]=s.useState(!1),[P,R]=s.useState(void 0),[M,b]=s.useState(!1),u=s.useCallback(async()=>{if(!c||!t)return;const N=da(t);if(N){r(N.sections),w(N.sources),T(N.retrievalBand),$(N.retrievalConfidence),F(N.needsReview),R(N.activeModel),m(!1),S(null),b(!1);return}m(!0),S(null),b(!1);try{const K=(await Ke(()=>import("./vendor-firebase-auth-BW5XT768.js"),__vite__mapDeps([0,1])).then(J=>J.getAuth().currentUser))?.uid,U=await oa({...a,lessonId:t,userId:K});r(U.sections),w(U.sources||[]),T(U.retrievalBand),$(U.retrievalConfidence),F(U.needsReview),R(U.activeModel),xa(t,U),S(null),b(!1)}catch(O){const K=O.status||O.response?.status,U=O.body||O.response;let J="Failed to load lesson content.",ae=!1;K===404&&U?.error==="no_curriculum_context"?(J=U.message||"Lesson source PDF not found or not yet ingested.",ae=!0):K===401?J="Please sign in again to access lessons.":navigator.onLine||(J="No internet connection. Please try again when online.",ae=!0),S(J),b(ae),r([])}finally{m(!1)}},[t,c,JSON.stringify(a)]);s.useEffect(()=>{u()},[u]);const A=s.useCallback(()=>{t&&sessionStorage.removeItem(it(t)),m(!0),S(null),u()},[u,t]);return{sections:x,isLoading:l,error:_,retry:A,sources:p,retrievalBand:E,retrievalConfidence:n,needsReview:f,activeModel:P,isOffline:M}}function ua(){return e.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-slate-50 gap-5",children:[e.jsx("div",{className:"w-12 h-12 rounded-full border-4 border-rose-400 border-t-transparent animate-spin"}),e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx("p",{className:"text-slate-700 font-semibold text-base",children:"Loading lesson from DepEd curriculum..."}),e.jsx("p",{className:"text-slate-400 text-xs max-w-xs",children:"This may take a moment while the AI retrieves curriculum content."})]}),e.jsx("div",{className:"w-64 h-2 bg-slate-200 rounded-full overflow-hidden",children:e.jsx(v.div,{className:"h-full bg-rose-300 rounded-full",animate:{x:["-100%","100%"]},transition:{duration:1.2,repeat:1/0,ease:"easeInOut"},style:{width:"50%"}})})]})}function pa({message:t,onRetry:a,isOffline:c}){return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-slate-50 p-6",children:e.jsxs(v.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"bg-white rounded-3xl p-8 max-w-md w-full shadow-xl border border-slate-200 text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-red-50 rounded-2xl flex items-center justify-center mx-auto mb-5",children:e.jsx(Dt,{className:"text-red-500",size:32})}),e.jsx("h2",{className:"text-xl font-bold text-slate-800 mb-2",children:c?"Lesson Source Unavailable":"Failed to Load Lesson"}),e.jsx("p",{className:"text-slate-500 text-sm leading-relaxed mb-6",children:t}),e.jsxs(je,{onClick:a,className:"w-full py-3 rounded-xl font-bold bg-rose-500 hover:bg-rose-600 text-white flex items-center justify-center gap-2",children:[e.jsx(ls,{size:16}),"Try Again"]}),e.jsx("button",{onClick:a,className:"mt-3 text-slate-400 text-xs hover:text-slate-600 underline",children:"Retry"})]})})}function ha({section:t,sectionIndex:a,onShowSolution:c,expandedIndex:x,lesson:r,practiceQuiz:l,practiceQuizCompleted:m,practiceQuizScore:_,onStartPractice:S,lessonSpecificTopic:p,onTryItQuizComplete:w,onContinueLearning:E}){switch(t.type){case"introduction":return e.jsx("div",{className:"space-y-4",children:t.content?.trim()?e.jsx("p",{className:"text-slate-700 leading-relaxed text-base whitespace-pre-line",children:t.content}):e.jsx("p",{className:"text-slate-400 text-sm italic",children:"Introduction content is being prepared. Please proceed to the next section or try refreshing the lesson."})});case"key_concepts":return e.jsxs("div",{className:"space-y-4",children:[t.content?.trim()?e.jsx("p",{className:"text-slate-700 leading-relaxed text-base whitespace-pre-line mb-4",children:t.content}):e.jsx("p",{className:"text-slate-400 text-sm italic mb-4",children:"Key concepts are being compiled. Review the curriculum sources below for reference material."}),t.callouts&&t.callouts.length>0&&e.jsx("div",{className:"space-y-2",children:t.callouts.map((T,n)=>e.jsxs("div",{className:`rounded-xl p-4 border-l-4 flex items-start gap-3 ${T.type==="important"?"bg-rose-50 border-rose-400":T.type==="tip"?"bg-emerald-50 border-emerald-400":"bg-amber-50 border-amber-400"}`,children:[e.jsx(st,{size:18,className:T.type==="important"?"text-rose-500 mt-0.5":T.type==="tip"?"text-emerald-500 mt-0.5":"text-amber-500 mt-0.5"}),e.jsx("p",{className:"text-sm text-slate-700",children:T.text})]},n))})]});case"video":return e.jsxs("div",{className:"space-y-4",children:[t.content?.trim()?e.jsx("p",{className:"text-slate-600 text-sm",children:t.content}):e.jsx("p",{className:"text-slate-400 text-sm italic",children:"Video explanation loading..."}),e.jsx(na,{videos:t.videos||[],topic:r.title})]});case"worked_examples":return e.jsx("div",{className:"space-y-4",children:t.examples&&t.examples.length>0?t.examples.map((T,n)=>e.jsxs("div",{className:"bg-gradient-to-br from-rose-50 to-orange-50 rounded-2xl p-5 border border-rose-100",children:[e.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[e.jsx("div",{className:"w-8 h-8 bg-rose-500 rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx(Me,{size:16,className:"text-white"})}),e.jsx("p",{className:"font-semibold text-slate-800 text-sm pt-1",children:T.problem})]}),e.jsxs("div",{className:"space-y-1.5 ml-11",children:[T.steps.map(($,f)=>e.jsxs("p",{className:"text-slate-600 text-sm",children:[f+1,". ",$]},f)),T.answer&&e.jsxs("p",{className:"text-slate-800 text-sm font-semibold mt-2 pt-2 border-t border-rose-100",children:["Answer: ",T.answer]})]})]},n)):e.jsx("p",{className:"text-slate-400 text-sm italic",children:"No worked examples available for this lesson."})});case"important_notes":return e.jsx("div",{className:"space-y-2",children:t.bulletPoints&&t.bulletPoints.length>0?t.bulletPoints.map((T,n)=>e.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-xl bg-slate-50 border border-slate-100",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-rose-400 mt-2 flex-shrink-0"}),e.jsx("p",{className:"text-slate-700 text-sm leading-relaxed",children:T})]},n)):e.jsx("p",{className:"text-slate-400 text-sm italic",children:"No notes available for this lesson."})});case"try_it_yourself":return e.jsxs("div",{className:"space-y-4",children:[l&&e.jsx("div",{className:"bg-white rounded-2xl p-5 border border-slate-200 shadow-sm",children:m?e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-emerald-100 rounded-xl flex items-center justify-center",children:e.jsx(Ie,{size:20,className:"text-emerald-600"})}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm font-bold text-emerald-700",children:["Quiz Complete",typeof _=="number"&&e.jsxs("span",{className:"ml-2 text-emerald-600",children:[_,"%"]})]}),e.jsx("p",{className:"text-xs text-emerald-600/80",children:"Great job! You can now complete this lesson."})]})]}):e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-gradient-to-br from-rose-400 to-orange-400 rounded-xl flex items-center justify-center",children:e.jsx(be,{size:20,className:"text-white"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-slate-800",children:"Practice Quiz"}),e.jsxs("p",{className:"text-xs text-slate-500",children:[l.questions," questions · ",l.duration]})]})]}),e.jsxs("button",{onClick:S,className:"w-full sm:w-auto px-5 py-2.5 rounded-xl bg-gradient-to-r from-rose-500 to-orange-400 text-white text-sm font-bold hover:opacity-90 transition-opacity shadow-md flex items-center justify-center gap-2",children:[e.jsx(Et,{size:16}),"Start Practice Quiz"]})]})}),e.jsx(ia,{lessonId:r.id?.toString()||"unknown",lessonTitle:r.title,topic:p||t.title||r.title,subjectId:r.subjectId,competencyCode:r.competencyCode,onComplete:(T,n)=>{console.log(`[TryItYourselfQuiz] Completed: ${T}/${n}`)},onQuizComplete:w,onClose:E,onContinueLearning:E})]});case"summary":return e.jsx("div",{className:"space-y-3",children:t.content?.trim()?e.jsx("p",{className:"text-slate-700 text-base leading-relaxed whitespace-pre-line",children:t.content}):e.jsx("p",{className:"text-slate-400 text-sm italic",children:"Summary is being prepared. Review the lesson sections above to reinforce your understanding."})});default:return e.jsx("p",{className:"text-slate-500 text-sm italic",children:"Section content not available."})}}const _e=[{type:"introduction",label:"Intro",helper:"Welcome note",icon:Ae,accent:"from-[#1a85a4] to-[#126b84]",tint:"bg-[#1a85a4] text-white border-transparent",tabBg:"bg-[#1a85a4]"},{type:"key_concepts",label:"Concepts",helper:"Core ideas",icon:Is,accent:"from-[#fbab41] to-[#e0983a]",tint:"bg-[#fbab41] text-white border-transparent",tabBg:"bg-[#fbab41]"},{type:"video",label:"Video",helper:"Watch and learn",icon:st,accent:"from-[#e66a5e] to-[#ce5e53]",tint:"bg-[#e66a5e] text-white border-transparent",tabBg:"bg-[#e66a5e]"},{type:"worked_examples",label:"Examples",helper:"Guided solving",icon:Et,accent:"from-[#7ec16d] to-[#71ad62]",tint:"bg-[#7ec16d] text-white border-transparent",tabBg:"bg-[#7ec16d]"},{type:"important_notes",label:"Notes",helper:"Key reminders",icon:Fs,accent:"from-[#9a67d0] to-[#8a5cc0]",tint:"bg-[#9a67d0] text-white border-transparent",tabBg:"bg-[#9a67d0]"},{type:"try_it_yourself",label:"Practice",helper:"Try it yourself",icon:ve,accent:"from-[#eb74a6] to-[#d46895]",tint:"bg-[#eb74a6] text-white border-transparent",tabBg:"bg-[#eb74a6]"},{type:"summary",label:"Summary",helper:"Wrap-up",icon:Ee,accent:"from-[#48bca6] to-[#40a794]",tint:"bg-[#48bca6] text-white border-transparent",tabBg:"bg-[#48bca6]"}],fa=({lesson:t,lessonCompletionXP:a=10,practiceQuiz:c,practiceQuizCompleted:x=!1,practiceQuizScore:r,initialSection:l=0,onStartPractice:m,onBack:_,onComplete:S,onProgressUpdate:p,onTryItQuizComplete:w,onContinueLearning:E})=>{const{userProfile:T}=Je(),[n,$]=s.useState(0),[f,F]=s.useState(1),[P,R]=s.useState(!1),[M,b]=s.useState(null),u={topic:t.title,subject:t.subject||"General Mathematics",quarter:t.quarter||1,lessonTitle:t.title,moduleId:t.subjectId,lessonId:t.id,competencyCode:t.competencyCode,learnerLevel:"Grade 11-12",storagePath:t.storagePath},{sections:A,isLoading:N,error:O,retry:K,sources:U,retrievalBand:J,activeModel:ae,isOffline:ne}=ma(t.id,u,!0),[ce,re]=s.useState(null);s.useEffect(()=>{if(A.length>0){const i=A.find(y=>y.type==="introduction");if(i?.title){const z=i.title.replace(/^Introduction\s+(to|-|:|—)\s+/i,"").replace(/\s*[-:—]\s*Introduction$/i,"").replace(/\s+Introduction$/i,"").trim();z&&z.toLowerCase()!=="introduction"&&re(z)}}},[A]);const L=A.length||_e.length;if(s.useEffect(()=>{l>=0&&l{const i=A.findIndex(y=>y.type==="try_it_yourself");l===-1&&i>=0&&$(i)},[A,l]),s.useEffect(()=>{const i=L>0?(n+1)/L*100:0;p?.(i)},[n,L,p]),N)return e.jsx(ua,{});if(O&&A.length===0)return e.jsx(pa,{message:O,onRetry:K,isOffline:ne});const oe=A[n]||{type:"introduction",title:"Loading...",content:"Lesson content is loading. Please wait a moment."},X=()=>{ni+1)):(!c||x)&&R(!0)},le=()=>{n>0&&(F(-1),$(i=>i-1))},de=i=>{S(void 0,void 0,i)},k=!!(c&&!x),W=_e[n]||_e[0],o=W.icon;return e.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col bg-slate-50 overflow-hidden font-sans",children:[e.jsx("header",{className:"flex-none bg-transparent px-4 sm:px-8 py-6 relative z-40",children:e.jsxs("div",{className:"max-w-6xl mx-auto flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-4 min-w-0",children:[e.jsx("button",{onClick:_,className:"w-10 h-10 rounded-full bg-white border border-slate-200 hover:bg-slate-50 flex items-center justify-center text-slate-600 transition-colors flex-shrink-0 shadow-sm","aria-label":"Go back",children:e.jsx(Ye,{size:18})}),e.jsxs("div",{className:"min-w-0 flex flex-col justify-center",children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-0.5",children:[e.jsx(ze,{size:12}),e.jsx("span",{children:"NOTEBOOK LESSON"}),ae&&e.jsx("span",{className:"text-slate-400 bg-slate-100 px-1.5 py-0.5 rounded font-mono",children:ae.split("/").pop()}),J==="high"&&e.jsx("span",{className:"text-emerald-600 bg-emerald-50 px-1.5 py-0.5 rounded text-[10px] font-semibold border border-emerald-200",children:"DepEd Source"})]}),e.jsx("h1",{className:"font-bold text-slate-800 text-sm truncate",children:t.title})]})]}),e.jsxs("div",{className:"flex items-center gap-4 flex-shrink-0",children:[e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-wider",children:"Progress"}),e.jsxs("p",{className:"text-sm font-bold text-slate-800",children:[Math.round((n+1)/L*100),"%"]})]}),e.jsx("div",{className:"w-24 sm:w-32 h-2 bg-slate-200 rounded-full overflow-hidden",children:e.jsx(v.div,{className:"h-full bg-[#7ec16d] rounded-full",animate:{width:`${(n+1)/L*100}%`},transition:{duration:.25}})})]})]})}),e.jsx("main",{className:"flex-1 overflow-hidden px-4 sm:px-8 pb-8 relative flex justify-center",children:e.jsxs("div",{className:"w-full max-w-5xl h-full relative flex md:pl-16",children:[e.jsx("div",{className:"hidden md:flex absolute left-0 top-8 bottom-8 w-20 flex-col justify-between z-0 py-2",children:_e.map((i,y)=>{const z=y===n,D=i.icon;return e.jsxs("button",{onClick:()=>{F(y>n?1:-1),$(y)},className:Fe("group relative flex items-center justify-start pl-4 rounded-l-[1.5rem] transition-all duration-300 shadow-sm border-r-0 flex-shrink-0",i.tabBg,z?"w-24 h-20 -translate-x-4 shadow-xl z-20 brightness-105":"w-16 h-16 hover:w-24 hover:h-20 hover:-translate-x-4 hover:brightness-110 opacity-90 hover:opacity-100 z-10"),"aria-label":`Go to ${i.label} section`,children:[e.jsx("div",{className:Fe("transition-all duration-300 rounded-xl",z?"bg-white/30 p-2.5":"bg-white/20 p-2 group-hover:bg-white/30 group-hover:p-2.5"),children:e.jsx(D,{size:z?24:20,className:"text-white transition-transform duration-300 group-hover:scale-110"})}),e.jsxs("div",{className:"absolute right-full mr-3 px-3 py-1.5 bg-slate-800 text-white text-xs font-bold rounded-lg opacity-0 group-hover:opacity-100 pointer-events-none transition-opacity whitespace-nowrap z-[100] shadow-xl border border-slate-700/50",children:[e.jsx("div",{className:"absolute top-1/2 -right-1 -translate-y-1/2 w-2 h-2 bg-slate-800 rotate-45 border-r border-t border-slate-700/50"}),i.label]})]},i.type)})}),e.jsxs("div",{className:Fe("flex-1 rounded-[2rem] shadow-2xl flex flex-col overflow-hidden relative z-10 transition-colors duration-500",W.tabBg),children:[e.jsxs("div",{className:"px-6 sm:px-8 py-5 flex items-center gap-4 text-white",children:[e.jsx("div",{className:"bg-white/20 p-2.5 rounded-xl shrink-0",children:e.jsx(o,{size:28,className:"text-white"})}),e.jsxs("div",{className:"flex flex-col min-w-0",children:[e.jsx("h2",{className:"text-2xl sm:text-3xl font-bold truncate",title:oe.title,children:oe.title}),e.jsx("p",{className:"text-white/90 text-sm font-medium truncate mt-0.5",title:t.title,children:t.title})]})]}),e.jsxs("div",{className:"flex-1 bg-[#fdfdfd] rounded-[1.5rem] m-2 mt-0 relative overflow-hidden shadow-inner flex flex-col",children:[e.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-30",style:{backgroundImage:"linear-gradient(transparent 95%, #cbd5e1 95%)",backgroundSize:"100% 40px",backgroundPosition:"0 0"}}),e.jsx("div",{className:"absolute top-0 bottom-0 left-12 md:left-16 w-[2px] bg-rose-300/60 pointer-events-none z-0"}),e.jsxs("div",{className:"relative z-10 flex-1 overflow-y-auto px-6 md:pl-24 md:pr-12 py-8",children:[e.jsx("div",{className:"md:hidden flex gap-2 overflow-x-auto pb-4 mb-4 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:_e.map((i,y)=>{const z=y===n,D=i.icon;return e.jsx("button",{onClick:()=>{F(y>n?1:-1),$(y)},className:Fe("min-w-[100px] rounded-2xl px-3 py-2 text-left transition-all duration-200",z?`${i.tabBg} text-white shadow-md`:"bg-slate-100 text-slate-600 border border-slate-200"),children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(D,{size:14}),e.jsx("span",{className:"text-xs font-bold",children:i.label})]})},i.type)})}),e.jsx(pe,{mode:"wait",children:e.jsxs(v.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:"space-y-6",children:[e.jsx("div",{className:"bg-white/90 backdrop-blur-sm rounded-[1.5rem] p-6 sm:p-8 shadow-sm border border-slate-100/50",children:e.jsx(ha,{section:oe,sectionIndex:n,onShowSolution:i=>b(M===i?null:i),expandedIndex:M,lesson:t,lessonSpecificTopic:ce,onTryItQuizComplete:w,onContinueLearning:E})}),U.length>0&&(T?.role==="admin"||T?.role==="teacher")&&e.jsxs("details",{className:"rounded-xl border border-slate-200 bg-white/90 backdrop-blur-sm px-4 py-3 text-xs text-slate-500 shadow-sm",children:[e.jsxs("summary",{className:"cursor-pointer font-semibold text-slate-600 hover:text-slate-800",children:[U.length," source",U.length>1?"s":""," used"]}),e.jsx("div",{className:"mt-2 space-y-1 pl-2",children:U.slice(0,3).map((i,y)=>e.jsxs("p",{className:"font-mono truncate",children:[i.source_file," p.",i.page," (",Math.round((i.score||0)*100),"%)"]},y))})]})]},n)})]},n)]})]})]})}),e.jsx("footer",{className:"bg-transparent px-4 sm:px-8 flex-shrink-0 relative z-40 w-full flex justify-center items-center h-20",children:e.jsxs("div",{className:"w-full max-w-5xl flex flex-col items-center",children:[e.jsxs("div",{className:"flex items-center justify-center gap-8 w-full md:ml-16",children:[e.jsxs(je,{onClick:le,disabled:n===0,variant:"outline",className:"px-6 py-3 rounded-full font-bold text-sm bg-white border-slate-200 text-slate-600 shadow-sm disabled:opacity-40 hover:bg-slate-50 transition-colors flex items-center gap-2",children:[e.jsx(Ye,{size:16}),"Previous"]}),e.jsxs("p",{className:"text-sm text-slate-500 font-bold tabular-nums",children:[n+1," / ",L]}),e.jsx(je,{onClick:X,disabled:n===L-1&&k,className:"px-8 py-3 rounded-full font-bold text-sm bg-[#7ec16d] text-white hover:bg-[#6ab359] shadow-md transition-colors disabled:opacity-40 flex items-center gap-2",children:n===L-1?e.jsxs(e.Fragment,{children:["Complete",e.jsx(Ie,{size:16})]}):e.jsxs(e.Fragment,{children:["Next",e.jsx(Ze,{size:16})]})})]}),n===L-1&&k&&e.jsx("p",{className:"text-center text-xs font-semibold text-amber-600 mt-3 md:ml-16",children:"Complete the practice quiz first to unlock lesson completion."})]})}),e.jsx(pe,{children:P&&e.jsx(v.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 z-[100] flex items-center justify-center bg-slate-900/40 backdrop-blur-sm p-4",children:e.jsxs(v.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},className:"bg-white rounded-[2rem] p-8 max-w-sm w-full text-center shadow-2xl",children:[e.jsx("div",{className:"w-20 h-20 bg-[#7ec16d] rounded-full flex items-center justify-center mx-auto mb-5 shadow-lg",children:e.jsx(Ie,{size:40,className:"text-white"})}),e.jsx("h2",{className:"text-2xl font-black text-slate-800 mb-2",children:"Lesson Complete!"}),e.jsxs("p",{className:"text-slate-500 text-sm mb-6 leading-relaxed",children:["Great job finishing ",e.jsx("strong",{className:"text-slate-700",children:t.title}),"."]}),e.jsxs("div",{className:"bg-emerald-50 rounded-2xl p-4 mb-6 border border-emerald-100",children:[e.jsx("div",{className:"flex items-center justify-center mb-1",children:e.jsx(Ee,{className:"text-[#7ec16d]",size:22})}),e.jsx("p",{className:"text-xs text-[#7ec16d] font-bold uppercase tracking-wider mb-0.5",children:"XP Earned"}),e.jsxs("p",{className:"text-3xl font-black text-[#7ec16d]",children:["+",a]})]}),e.jsxs("div",{className:"space-y-2.5",children:[e.jsx("button",{onClick:()=>de(!0),disabled:k,className:"w-full py-3 rounded-xl font-bold text-sm bg-[#1a85a4] text-white hover:bg-[#126b84] transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:"Continue to Next Lesson"}),e.jsx("button",{onClick:()=>de(!1),className:"w-full py-3 rounded-xl font-bold text-sm bg-slate-100 text-slate-600 hover:bg-slate-200 transition-colors",children:"Back to Modules"})]})]})})})]})},ba=[{id:1,type:"multiple-choice",question:"What is the value of π (pi) to two decimal places?",options:["3.12","3.14","3.16","3.18"],correctAnswer:"3.14",explanation:"π ≈ 3.14159..., so to two decimal places it is 3.14."},{id:2,type:"true-false",question:"The sum of angles in a triangle is 180 degrees.",correctAnswer:"True",explanation:"The interior angles of any Euclidean triangle sum to 180°."},{id:3,type:"fill-in-blank",question:"If 2x + 5 = 13, then x = ___.",correctAnswer:"4",explanation:"2x = 13 - 5 = 8 → x = 4."},{id:4,type:"multiple-choice",question:"Which of the following is a prime number?",options:["9","15","17","21"],correctAnswer:"17",explanation:"17 is only divisible by 1 and itself. 9=3×3, 15=3×5, 21=3×7."},{id:5,type:"true-false",question:"The slope of a horizontal line is zero.",correctAnswer:"True",explanation:"A horizontal line has no rise, so rise/run = 0."},{id:6,type:"fill-in-blank",question:"The square root of 144 is ___.",correctAnswer:"12",explanation:"12 × 12 = 144, so √144 = 12."}];async function lt(t){const{lessonTitle:a,topic:c,subjectId:x,competencyCode:r,questionCount:l=6}=t,m=ga(x)||"General Mathematics",_=t.lessonId?Math.abs(t.lessonId.split("").reduce((S,p)=>Math.imul(31,S)+p.charCodeAt(0)|0,0))%1e6:Math.floor(Math.random()*1e6);try{const S=await Ht("/api/quiz/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({topic:c||a,subject:m,lessonTitle:a,questionCount:l,questionTypes:["multiple-choice","true-false","fill-in-blank"],difficulty:"medium",competencyCode:r,varianceSeed:_})});return!S.questions||S.questions.length===0?(console.warn("[lessonQuizService] API returned empty questions, using fallback"),St(l)):S.questions.map(p=>({id:p.id,type:p.type,question:p.question,options:p.options||void 0,correctAnswer:p.correctAnswer,explanation:p.explanation}))}catch(S){return console.error("[lessonQuizService] Failed to generate quiz via API:",S),console.warn("[lessonQuizService] Using fallback questions"),St(l)}}function Be(t){return t==="quiz"?8:6}function ga(t){if(!t)return null;const a=t.toLowerCase();return a.includes("gen-math")||a.includes("gen_math")?"General Mathematics":a.includes("stats")||a.includes("prob")?"Statistics and Probability":a.includes("pre-calc")||a.includes("pre_calc")?"Pre-Calculus":a.includes("basic-calc")||a.includes("basic_calc")||a.includes("calculus")?"Basic Calculus":null}function St(t){const a=[...ba].sort(()=>Math.random()-.5);return a.slice(0,Math.min(t,a.length)).map((c,x)=>({...c,id:x+1}))}const ya=Object.freeze(Object.defineProperty({__proto__:null,generateLessonQuiz:lt,getQuestionCountForQuiz:Be},Symbol.toStringTag,{value:"Module"})),Le={},wa=async(t,a)=>{const c=`${t.id}-${a}`;if(Le[c])return Promise.resolve(Le[c]);const x=Be(a),r=lt({lessonId:t.id,lessonTitle:t.title,subjectId:t.subjectId,questionCount:x});Le[c]=r;const l=await r;return Le[c]=l,l},ja=({module:t,onBack:a,onEarnXP:c})=>{const[r,l]=s.useState(null),[m,_]=s.useState([]),[S,p]=s.useState(!1),{userProfile:w}=Je(),[E,T]=s.useState(null),n=s.useRef(c);s.useEffect(()=>{n.current=c},[c]),s.useEffect(()=>{try{const o=sessionStorage.getItem(`mathpulse_module_${t.id}_selectedLesson`);if(o){const{lessonId:i}=JSON.parse(o),y=t.lessons.find(z=>z.id===i);y&&l({lesson:y,type:"lesson"})}}catch{}},[]),s.useEffect(()=>{if(r?.type==="lesson"&&r.lesson)try{sessionStorage.setItem(`mathpulse_module_${t.id}_selectedLesson`,JSON.stringify({lessonId:r.lesson.id}))}catch{}else if(r===null)try{sessionStorage.removeItem(`mathpulse_module_${t.id}_selectedLesson`)}catch{}},[r,t.id]);const $=s.useMemo(()=>{const o=Number(t.id.split("-").pop());return Number.isFinite(o)&&o>0?o:1},[t.id]),f=s.useMemo(()=>{const o=t.subjectId;return o||(ut.find(y=>y.modules.some(z=>z.id===t.id))?.id??null)},[t.id]),F=["#1FA7E1","#9956DE","#75D06A","#FFB356","#7274ED","#FF8B8B","#6ED1CF","#FB96BB"];s.useMemo(()=>{const o=t.subjectAccentColor;if(o)return o;const y=(f?ut.find(D=>D.id===f):null)?.modules?.findIndex(D=>D.id===t.id)??0,z=y>=0?y:0;return F[z%F.length]},[t,t.id,f]),s.useEffect(()=>{if(w?.uid)return Xt(w.uid,T)},[w?.uid]),s.useEffect(()=>{if(r?.type!=="quiz"){_([]);return}const o={id:r.quiz.id,title:r.quiz.title,duration:r.quiz.duration,completed:r.quiz.completed,locked:r.quiz.locked};p(!0),wa(o,"quiz").then(i=>{_(i)}).catch(i=>{console.error("[ModuleDetailView] Failed to load quiz questions:",i)}).finally(()=>{p(!1)})},[r]);const P=s.useMemo(()=>f?E?.subjects?.[f]?.modulesProgress?.[t.id]??null:null,[t.id,f,E?.subjects]),[R,M]=s.useState(null),b=s.useRef(r);s.useEffect(()=>{b.current=r});const u=s.useCallback(o=>{const i=b.current;w?.uid&&i?.type==="lesson"&&Vt(w.uid,i.lesson.id,o),T(y=>{if(!y)return y;const z=i?.type==="lesson"?i.lesson.id:null;if(!z)return y;const D=y.lessons?.[z]?.score,se=typeof D=="number"&&Number.isFinite(D)?D:0,Z=Math.max(se,Math.max(0,Math.min(100,o)));return{...y,lessons:{...y.lessons||{},[z]:{...y.lessons?.[z]||{},lessonId:z,score:Z}},updatedAt:new Date}})},[w?.uid]),A=s.useMemo(()=>{const o=P?.lessonsCompleted??[];return new Set(o)},[P?.lessonsCompleted]),N=s.useMemo(()=>{const o=P?.quizzesCompleted??[];return new Set(o)},[P?.quizzesCompleted]),O=P?.lessonsCompleted?.length??t.lessons.filter(o=>o.completed).length,K=P?.quizzesCompleted?.length??t.quizzes.filter(o=>o.completed).length,U=P?.progress??t.progress,J=t.lessons.length+t.quizzes.length,ae=O+K;t.lessons.length&&O/t.lessons.length*100,t.quizzes.length&&K/t.quizzes.length*100;const ne=(o,i)=>{const y=E?.lessons?.[o]?.score;return typeof y=="number"&&Number.isFinite(y)?Math.max(0,Math.min(100,y)):i?100:0},ce=s.useMemo(()=>{if(!J)return 0;const o=t.lessons.reduce((y,z)=>{const D=A.has(z.id)||z.completed;return y+ne(z.id,D)},0),i=K*100;return Math.round((o+i)/J)},[A,K,t.lessons,t.quizzes.length,J,E?.lessons]),re=U>0?U:ce,L=s.useMemo(()=>{const o=t.quizzes.find(y=>y.type==="final"||/module\s+quiz|general\s+quiz/i.test(y.title));if(o)return o;const i=t.quizzes.find(y=>y.isStandalone===!0);return i||(t.quizzes.length?t.quizzes[0]:null)},[t.quizzes]),oe=s.useMemo(()=>{const o=new Map;t.lessons.forEach(y=>{o.set(y.id,[])});const i=t.lessons.length;return i===0||t.quizzes.forEach((y,z)=>{if(L?.id===y.id)return;const D=Math.min(z,i-1),se=t.lessons[D];if(!se)return;const Z=o.get(se.id)??[];Z.push(y),o.set(se.id,Z)}),o},[t.lessons,t.quizzes,L?.id]),X=s.useMemo(()=>Math.max(1,Math.ceil(t.lessons.length/2)),[t.lessons.length]),le=s.useCallback(()=>{l(null),M(null)},[]),de=s.useCallback(()=>{const o=b.current?.type==="lesson"?b.current.lesson:null;if(!o)return;const i={id:`${o.id}-practice`,title:`Practice Quiz: ${o.title}`,questions:Be("practice"),duration:o.duration,completed:!1,locked:!1,type:"practice"};M(o),l({type:"quiz",quiz:i})},[]),k=s.useCallback((o,i,y)=>{const z=b.current;if(z?.type!=="lesson"||!z.lesson)return;const D=z.lesson,se=10;if(n.current?.(se,`Completed "${D.title}"`),w?.uid&&f&&(async()=>{try{await Ut(w.uid,f,t.id,D.id,0,se),await ot(w.uid,f,t.id,t.lessons.length,t.quizzes.length)}catch(Z){console.error("[LessonComplete] Failed to persist progress:",Z)}})(),y){const Z=t.lessons.findIndex(ge=>ge.id===D.id);Z!==-1&&Z0?l({type:"quiz",quiz:t.quizzes[0]}):l(null)}else l(null)},[f,t.id,t.lessons.length,t.quizzes.length]),W=s.useCallback(o=>{const i=b.current;if(i?.type!=="lesson"||!i.lesson||!w?.uid)return;const y=i.lesson.id;(async()=>{try{await ct(w.uid,y,o,!0)}catch(D){console.error("[handleTryItQuizComplete] Failed to persist quiz completion:",D)}})();const z=o;n.current?.(z,`Practice quiz completed: ${Math.round(o)}%`)},[w?.uid]);if(r)if(r.type==="lesson"){const i=oe.get(r.lesson.id)?.[0]??null??{id:`${r.lesson.id}-practice`,title:`Practice Quiz: ${r.lesson.title}`,questions:Be("practice"),duration:r.lesson.duration,completed:!1,locked:!1,type:"practice"},y=E?.lessons?.[r.lesson.id],z=N.has(i.id)||i.completed||y?.quizCompleted===!0,D=y?.quizScore;return e.jsx(fa,{lesson:r.lesson,lessonCompletionXP:10,practiceQuiz:i,practiceQuizCompleted:z,practiceQuizScore:D,initialSection:r.returnFromQuiz?-1:0,onBack:le,onStartPractice:de,onProgressUpdate:u,onComplete:k,onTryItQuizComplete:W,onContinueLearning:()=>k(void 0,void 0,!0)})}else return S||m.length===0?e.jsx("div",{className:"fixed inset-0 z-[60] flex items-center justify-center bg-black/60 backdrop-blur-md p-4",children:e.jsxs("div",{className:"w-full max-w-xl rounded-[32px] bg-white p-6 text-center shadow-2xl",children:[e.jsx("div",{className:"mx-auto mb-4 h-12 w-12 rounded-full border-4 border-[#9956DE] border-t-transparent animate-spin"}),e.jsx("h2",{className:"text-2xl font-black text-[#0a1628] mb-2",children:"Preparing Quiz"}),e.jsx("p",{className:"text-sm text-[#5a6578] mb-5",children:"Generating questions from curriculum using AI..."}),e.jsx(je,{onClick:()=>l(null),className:"rounded-xl bg-[#9956DE] hover:bg-[#8544c7] text-white font-bold",children:"Back to Module"})]})}):e.jsx(aa,{lesson:{id:parseInt(r.quiz.id.split("-").pop()||"1"),title:r.quiz.title,duration:r.quiz.duration,type:"quiz",completed:r.quiz.completed,locked:r.quiz.locked},questions:m,onBack:()=>{R?(l({type:"lesson",lesson:R,returnFromQuiz:!0}),M(null)):l(null)},onComplete:(o,i)=>{w?.uid&&f&&(async()=>{try{await Gt(w.uid,f,t.id,r.quiz.id,o,[],0,i),R&&await ct(w.uid,R.id,o,!0),await ot(w.uid,f,t.id,t.lessons.length,t.quizzes.length)}catch(y){console.error("[QuizComplete] Failed to persist progress:",y)}})(),R?(l({type:"lesson",lesson:R,returnFromQuiz:!0}),M(null)):l(null)}});return e.jsxs("div",{className:"h-full overflow-y-auto scrollbar-hide px-4 sm:px-6 xl:px-10 py-6 sm:py-8 relative",children:[e.jsx("div",{className:"relative mb-6 xl:mb-8 w-full sm:w-max",children:e.jsxs("button",{onClick:a,className:"flex items-center gap-2 px-4 py-2.5 rounded-full bg-white/80 backdrop-blur-xl border border-slate-200/60 text-slate-600 hover:text-indigo-600 font-bold text-sm tracking-wide transition-all hover:-translate-x-1 shadow-sm hover:shadow-md",children:[e.jsx(Ye,{size:18}),"Back"]})}),e.jsxs(v.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:`relative mb-6 lg:mb-8 rounded-[2rem] ${t.accentColor} shadow-[0_20px_40px_-15px_rgba(0,0,0,0.3)] shrink-0 overflow-hidden`,children:[e.jsx("div",{className:"absolute inset-0 bg-black/60 pointer-events-none z-0"}),e.jsx("div",{className:"absolute inset-0 opacity-10 pointer-events-none module-detail-grid-pattern"}),e.jsx("div",{className:"absolute top-0 right-0 w-[400px] h-[400px] bg-sky-500/20 blur-[100px] rounded-full pointer-events-none"}),e.jsxs("div",{className:"relative p-5 sm:p-7 md:p-10 flex flex-col md:flex-row md:items-center justify-between gap-6 md:gap-8",children:[e.jsxs("div",{className:"flex-1 text-white",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-4 md:mb-5",children:[e.jsxs("div",{className:"px-3 py-1 bg-white/10 backdrop-blur-md rounded-full text-[11px] font-black uppercase tracking-widest text-[#f8fafc] border border-white/20 shadow-sm flex items-center gap-1.5",children:[e.jsx(ht,{size:14})," Chapter ",t.id.split("-").pop()||"1"]}),e.jsxs("div",{className:"px-3 py-1 bg-white/10 backdrop-blur-md rounded-full text-[11px] font-black uppercase tracking-widest text-emerald-400 border border-emerald-400/30",children:["Lv ",$]})]}),e.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-display font-black text-white mb-3 md:mb-4 tracking-[-0.02em] leading-tight",children:t.title}),e.jsx("p",{className:"text-slate-300 text-sm md:text-[15px] max-w-2xl font-medium leading-relaxed mb-6 md:mb-8",children:t.description}),e.jsxs("div",{className:"bg-black/20 backdrop-blur-md rounded-2xl p-4 md:p-5 border border-white/10 max-w-xl",children:[e.jsxs("div",{className:"flex justify-between items-end mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(Ee,{size:20,className:"text-emerald-400"}),e.jsx("span",{className:"text-[12px] md:text-[13px] font-black text-white uppercase tracking-wider",children:"Module Mastery"})]}),e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsxs("span",{className:"text-[12px] md:text-[13px] font-bold text-slate-400 mb-0.5",children:[ae,"/",J," steps"]}),e.jsxs("span",{className:"text-xl md:text-2xl font-black text-white shrink-0 leading-none",children:[Math.round(re),"%"]})]})]}),e.jsx("div",{className:"h-3 bg-black/40 rounded-full overflow-hidden shadow-inner ring-1 ring-white/10 p-0.5",children:e.jsx(v.div,{initial:{width:0},animate:{width:`${re}%`},transition:{duration:1.5,ease:"easeOut",delay:.2},className:`h-full rounded-full relative ${re===100?"bg-gradient-to-r from-emerald-400 to-teal-300":t.accentColor}`,children:e.jsx("div",{className:"absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4IiBoZWlnaHQ9IjgiPgo8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMSI+PC9yZWN0Pgo8L3N2Zz4=')] opacity-30 mix-blend-overlay"})})})]})]}),e.jsxs("div",{className:"hidden lg:flex w-48 h-48 bg-white/5 rounded-[2rem] border border-white/10 backdrop-blur-md items-center justify-center transform rotate-[-3deg] shadow-2xl relative group hover:rotate-0 transition-all duration-500 shrink-0",children:[e.jsx("div",{className:`absolute inset-0 opacity-40 rounded-[2rem] ${t.progress===100?"bg-gradient-to-br from-emerald-400 to-teal-600":t.accentColor}`}),re===100?e.jsx(Re,{size:80,className:"text-white drop-shadow-xl z-10 scale-100 group-hover:scale-110 transition-transform duration-500",strokeWidth:1}):e.jsx(ze,{size:80,className:"text-white drop-shadow-xl z-10 scale-100 group-hover:scale-110 transition-transform duration-500",strokeWidth:1}),e.jsx(v.div,{animate:{y:[-5,5,-5],rotate:[-10,10,-10]},transition:{duration:4,repeat:1/0},className:"absolute top-6 left-6 text-emerald-300 z-20",children:e.jsx(tt,{size:20,fill:"currentColor"})}),e.jsx(v.div,{animate:{y:[5,-5,5],rotate:[10,-10,10]},transition:{duration:3.5,repeat:1/0},className:"absolute bottom-8 right-6 text-sky-300 z-20",children:e.jsx(yt,{size:24})})]})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto pr-2 pb-8 scrollbar-hide",children:e.jsxs("div",{className:"relative rounded-[2rem] border border-slate-200 bg-white/90 shadow-sm overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 pointer-events-none bg-[radial-gradient(circle_at_top_right,rgba(153,86,222,0.08),transparent_45%),radial-gradient(circle_at_bottom_left,rgba(31,167,225,0.08),transparent_45%)]"}),e.jsxs("div",{className:"relative z-10 px-4 sm:px-6 md:px-8 py-5 md:py-6 border-b border-slate-200/70 bg-white/70 backdrop-blur-sm flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("h2",{className:"font-display font-black text-xl md:text-2xl text-slate-800 flex items-center gap-3",children:[e.jsx(ze,{size:24,className:"text-sky-500"}),"Study Journey"]}),e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsxs("div",{className:"text-xs md:text-sm font-bold bg-sky-100 text-sky-700 px-3 py-1 rounded-full shadow-sm border border-sky-200/50",children:["Lessons ",O,"/",t.lessons.length]}),e.jsxs("div",{className:"text-xs md:text-sm font-bold bg-rose-100 text-rose-700 px-3 py-1 rounded-full shadow-sm border border-rose-200/50",children:["Quizzes ",K,"/",t.quizzes.length]})]})]}),e.jsxs("div",{className:"relative z-10 px-4 sm:px-6 md:px-8 py-5 md:py-6 space-y-5",children:[t.lessons.map((o,i)=>{const y=A.has(o.id)||o.completed,z=ne(o.id,y),D=F[i%F.length];return e.jsxs(Pe.Fragment,{children:[e.jsxs(v.div,{initial:{opacity:0,y:14},animate:{opacity:1,y:0},transition:{delay:i*.05},className:`relative rounded-[1.5rem] border overflow-hidden group transition-all duration-500 mb-6 ${o.locked?"border-slate-200 opacity-65 saturate-50":"border-slate-200/80 hover:border-slate-300 hover:shadow-[0_16px_40px_-15px_rgba(0,0,0,0.12)] hover:-translate-y-0.5"}`,children:[e.jsx("div",{className:"absolute top-0 left-0 right-0 h-[6px] z-20 bg-slate-100 overflow-hidden",children:e.jsx(v.div,{initial:{width:0},animate:{width:`${Math.max(2,z)}%`},transition:{duration:1.2,ease:"easeOut",delay:.1+i*.05},className:"h-full relative",style:{backgroundColor:D},children:e.jsx("div",{className:"absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4IiBoZWlnaHQ9IjgiPgo8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMSI+PC9yZWN0Pgo8L3N2Zz4=')] opacity-30 mix-blend-overlay"})})}),e.jsx("div",{className:"absolute inset-0 bg-white transition-opacity duration-500 group-hover:opacity-90",style:{backgroundImage:`linear-gradient(to right, ${D}44 0%, ${D}11 50%, white 100%)`}}),e.jsx("div",{className:"absolute inset-0 opacity-[0.2] pointer-events-none",style:{backgroundImage:`radial-gradient(circle at 2px 2px, ${D} 1.5px, transparent 0)`,backgroundSize:"24px 24px"}}),e.jsx("div",{className:"absolute -top-12 -left-10 h-40 w-40 rounded-full blur-[32px] pointer-events-none transition-transform duration-700 group-hover:scale-[1.3] group-hover:translate-x-4",style:{backgroundColor:`${D}22`}}),e.jsx("div",{className:"absolute -bottom-8 right-8 h-32 w-32 rounded-full blur-2xl pointer-events-none transition-transform duration-700 group-hover:scale-125 group-hover:-translate-y-4",style:{backgroundColor:`${D}11`}}),e.jsx("div",{className:"absolute right-4 top-4 opacity-10 pointer-events-none transition-all duration-500 group-hover:rotate-12 group-hover:scale-110 drop-shadow-sm",style:{color:D},children:e.jsx(yt,{size:56,strokeWidth:1})}),e.jsx("div",{className:"absolute right-16 bottom-5 opacity-10 pointer-events-none transition-all duration-500 group-hover:-rotate-6 group-hover:-translate-y-2 drop-shadow-sm",style:{color:D},children:e.jsx(ze,{size:40,strokeWidth:1})}),e.jsxs("div",{className:"relative z-10 p-4 md:p-5 pt-6 space-y-4",children:[e.jsxs("button",{type:"button",onClick:()=>!o.locked&&l({lesson:o,type:"lesson"}),className:`w-full text-left flex flex-wrap items-center justify-between gap-3 rounded-2xl px-5 py-4 transition shadow-sm ${o.locked?"cursor-not-allowed border border-slate-200 bg-white/70":"cursor-pointer bg-white hover:bg-slate-50"}`,children:[e.jsxs("div",{className:"flex items-center gap-4 min-w-0",children:[e.jsx("div",{className:`w-12 h-12 rounded-full flex items-center justify-center shrink-0 transition-colors shadow-sm ${o.locked?"bg-slate-100 text-slate-400":"text-white"}`,style:o.locked?{}:y?{backgroundColor:"#0ea5e9"}:{backgroundColor:D},children:o.locked?e.jsx(Ft,{size:18}):y?e.jsx(zs,{size:24}):e.jsx($t,{size:20,className:"ml-0.5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("p",{className:"text-[11px] md:text-[12px] font-black uppercase tracking-wider text-slate-500 mb-0.5",children:["Lesson ",i+1]}),e.jsx("h3",{className:"font-bold text-[16px] md:text-[18px] text-[#0a1628] truncate",children:o.title})]})]}),e.jsx("div",{className:"flex items-center justify-end",children:e.jsxs("span",{className:"inline-flex items-center gap-1.5 text-slate-500 text-xs md:text-sm font-semibold bg-slate-100/80 px-3 py-1.5 rounded-xl",children:[e.jsx(Ae,{size:14}),o.duration]})})]}),e.jsxs("div",{className:"flex flex-wrap gap-3 px-1",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-white px-4 py-1.5 text-[12px] font-bold shadow-sm",style:{color:D},children:[e.jsx(ze,{size:14})," Study Materials"]}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full bg-white px-4 py-1.5 text-[12px] font-bold shadow-sm",style:{color:D},children:[e.jsx(ht,{size:14})," Quiz"]})]})]})]}),L&&i===X-1&&e.jsxs(v.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{delay:.15+i*.03},className:"mt-8 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[e.jsx("div",{className:"flex-1 h-px bg-slate-200"}),e.jsx("span",{className:"text-xs font-bold text-indigo-400 uppercase tracking-widest text-center",children:"mid-module checkpoint"}),e.jsx("div",{className:"flex-1 h-px bg-slate-200"})]}),e.jsxs("div",{className:"relative rounded-[1.5rem] bg-[#533ab6] p-5 shadow-lg overflow-hidden group transition-all hover:shadow-xl hover:-translate-y-1",children:[e.jsx("div",{className:"absolute right-4 md:right-10 top-1/2 -translate-y-1/2 text-white/5 text-[140px] font-black font-display pointer-events-none group-hover:scale-110 transition-transform duration-500",children:"?"}),e.jsxs("div",{className:"relative z-10 flex flex-wrap items-center gap-4 md:gap-5",children:[e.jsx("div",{className:"w-14 h-14 rounded-[14px] bg-white/10 backdrop-blur-md border border-white/10 shrink-0 flex items-center justify-center shadow-inner",children:e.jsx(ve,{size:28,className:"text-rose-400"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-[10px] md:text-[11px] font-black uppercase tracking-widest text-[#a3b1ee] mb-1 drop-shadow-sm",children:"Module Task G╟≤ General Quiz"}),e.jsx("h3",{className:"font-display font-medium text-[20px] md:text-[22px] text-white leading-tight mb-2 tracking-tight",children:L.title}),e.jsxs("p",{className:"text-xs font-semibold text-white/80 flex items-center gap-3",children:[e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(wt,{size:12})," ",L.questions," Qs"]}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(Ae,{size:12})," ",L.duration]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-amber-300 drop-shadow-md",children:[e.jsx(be,{size:12,className:"fill-amber-300"})," +50 XP"]})]})]}),e.jsx("button",{type:"button",onClick:()=>!L.locked&&l({quiz:L,type:"quiz"}),className:`px-6 py-2.5 rounded-xl text-xs md:text-sm font-bold tracking-wider transition-all backdrop-blur-sm self-center shrink-0 ${L.locked?"bg-white/5 text-white/30 border border-white/10 cursor-not-allowed":N.has(L.id)||L.completed?"bg-white/20 text-white border border-white/40 hover:bg-white/30 shadow-sm":"bg-transparent text-white border border-white/40 hover:bg-white/10 shadow-sm"}`,children:N.has(L.id)||L.completed?"REVIEW":"START"})]})]})]})]},o.id)}),t.lessons.length===0&&L&&e.jsxs("div",{className:"relative rounded-[1.5rem] bg-[#533ab6] p-5 shadow-lg overflow-hidden group",children:[e.jsx("div",{className:"absolute right-4 md:right-10 top-1/2 -translate-y-1/2 text-white/5 text-[140px] font-black font-display pointer-events-none group-hover:scale-110 transition-transform duration-500",children:"?"}),e.jsxs("div",{className:"relative z-10 flex flex-wrap items-center justify-between gap-4 md:gap-5",children:[e.jsxs("div",{className:"flex items-center gap-4 flex-1",children:[e.jsx("div",{className:"w-14 h-14 rounded-[14px] bg-white/10 backdrop-blur-md border border-white/10 shrink-0 flex items-center justify-center shadow-inner",children:e.jsx(ve,{size:28,className:"text-rose-400"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] md:text-[11px] font-black uppercase tracking-widest text-[#a3b1ee] mb-1 drop-shadow-sm",children:"Module Task G╟≤ General Quiz"}),e.jsx("h3",{className:"font-display font-medium text-[20px] md:text-[22px] text-white leading-tight mb-2 tracking-tight",children:L.title}),e.jsxs("p",{className:"text-xs font-semibold text-white/80 flex items-center gap-3",children:[e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(wt,{size:12})," ",L.questions," Qs"]}),e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(Ae,{size:12})," ",L.duration]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-amber-300 drop-shadow-md",children:[e.jsx(be,{size:12,className:"fill-amber-300"})," +50 XP"]})]})]})]}),e.jsx("button",{type:"button",onClick:()=>!L.locked&&l({quiz:L,type:"quiz"}),className:`px-6 py-2.5 rounded-xl text-xs md:text-sm font-bold tracking-wider transition-all backdrop-blur-sm self-center shrink-0 ${L.locked?"bg-white/5 text-white/30 border border-white/10 cursor-not-allowed":N.has(L.id)||L.completed?"bg-white/20 text-white border border-white/40 hover:bg-white/30 shadow-sm":"bg-transparent text-white border border-white/40 hover:bg-white/10 shadow-sm"}`,children:N.has(L.id)||L.completed?"REVIEW":"START"})]})]})]})]})})]})},va=` - @keyframes head-sway { - 0%, 100% { transform: rotate(-2deg) translateY(0); } - 50% { transform: rotate(2deg) translateY(-2px); } - } - @keyframes horn-left-wiggle { - 0%, 100% { transform: rotate(-4deg); } - 50% { transform: rotate(4deg); } - } - @keyframes horn-right-wiggle { - 0%, 100% { transform: rotate(4deg); } - 50% { transform: rotate(-4deg); } - } - @keyframes blink { - 0%, 90%, 100% { transform: scaleY(1); } - 95% { transform: scaleY(0.1); } - } - @keyframes mouth-talk { - 0%, 100% { transform: scaleY(1) scaleX(1); } - 25% { transform: scaleY(1.1) scaleX(0.98); } - 50% { transform: scaleY(0.9) scaleX(1.02); } - 75% { transform: scaleY(1.05) scaleX(0.98); } - } - .animate-head-sway { - transform-origin: 50% 75%; - animation: head-sway 4s ease-in-out infinite; - } - .animate-horn-left { - transform-origin: 50% 45%; - animation: horn-left-wiggle 4s ease-in-out infinite; - } - .animate-horn-right { - transform-origin: 50% 45%; - animation: horn-right-wiggle 4s ease-in-out infinite; - } - .animate-blink { - transform-origin: 50% 45%; - animation: blink 3.7s ease-in-out infinite; - } - .animate-mouth { - transform-origin: 50% 55%; - animation: mouth-talk 3s ease-in-out infinite; - } -`,Na=()=>{const t="absolute inset-0 w-full h-full object-contain";return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:va}),e.jsxs("div",{className:"relative w-full h-[250px] flex items-end justify-center drop-shadow-sm select-none pointer-events-none",children:[e.jsx("img",{src:"/mascot/modules_avatar_body.png",alt:"Desk setup",className:`${t} z-10`}),e.jsxs("div",{className:`${t} z-20 animate-head-sway`,children:[e.jsx("img",{src:"/mascot/modules_left_horn.png",alt:"Left Horn",className:`${t} z-0 animate-horn-left`}),e.jsx("img",{src:"/mascot/modules_right_horn.png",alt:"Right Horn",className:`${t} z-0 animate-horn-right`}),e.jsx("img",{src:"/mascot/modules_head.png",alt:"Mascot Head",className:`${t} z-[1]`}),e.jsx("img",{src:"/mascot/modules_eyes.png",alt:"Eyes",className:`${t} z-[2] animate-blink`}),e.jsx("img",{src:"/mascot/modules_mouth.png",alt:"Mouth",className:`${t} z-[3] animate-mouth`})]})]})]})},zt={0:"⁰",1:"¹",2:"²",3:"³",4:"⁴",5:"⁵",6:"⁶",7:"⁷",8:"⁸",9:"⁹"};function ka(t){let a=t;return a=a.replace(/sin⁻¹/g,"sin-1"),a=a.replace(/cos⁻¹/g,"cos-1"),a=a.replace(/tan⁻¹/g,"tan-1"),a=a.replace(/⁻¹/g,"-1"),a=a.replace(/²/g,"2"),a=a.replace(/³/g,"3"),a=a.replace(/[⁰¹⁴⁵⁶⁷⁸⁹]/g,c=>`${{"⁰":"0","¹":"1","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9"}[c]??c}`),a=a.replace(/√/g,"√"),a=a.replace(/π/g,"π"),a=a.replace(/<(?!\/?(?:sup|sub)\b)[^>]*>/gi,""),a}const Ca=({value:t,onChange:a,placeholder:c,onCalculatorOpen:x,onSubmit:r})=>{const[l,m]=s.useState(!1),[_,S]=s.useState(null),[p,w]=s.useState({top:0,left:0}),E=s.useRef(null),T=s.useRef(!1),n=s.useCallback(u=>{const A=E.current;if(!A){a(t+u);return}const N=A.selectionStart??t.length,O=A.selectionEnd??t.length,K=t.slice(0,N)+u+t.slice(O);a(K),setTimeout(()=>{A.setSelectionRange(N+u.length,N+u.length),A.focus()},0)},[t,a]),$=s.useCallback(u=>{const A=u.key;if(A==="Enter"){u.preventDefault(),r?.();return}if(A==="^"){T.current=!0,u.preventDefault();return}if(T.current){if(A==="-"){n("⁻"),u.preventDefault();return}if(/^[0-9]$/.test(A)&&zt[A]){n(zt[A]),T.current=!1,u.preventDefault();return}T.current=!1}if(A==="Tab"&&_!==null){n(_),S(null),u.preventDefault();return}setTimeout(()=>{const N=E.current?.value??t;if(N.endsWith("pi"))a(N.slice(0,-2)+"π"),S(null);else if(N.endsWith("sqrt"))a(N.slice(0,-4)+"√");else if(N.endsWith("sin-1")||N.endsWith("sin^-1")){const O=N.endsWith("sin^-1")?6:5;a(N.slice(0,-O)+"sin⁻¹")}else if(N.endsWith("cos-1")||N.endsWith("cos^-1")){const O=N.endsWith("cos^-1")?6:5;a(N.slice(0,-O)+"cos⁻¹")}else if(N.endsWith("tan-1")||N.endsWith("tan^-1")){const O=N.endsWith("tan^-1")?6:5;a(N.slice(0,-O)+"tan⁻¹")}},0)},[t,a,_,n,r]),f=s.useCallback(()=>{if(E.current){const u=E.current.getBoundingClientRect();w({top:Math.max(20,u.bottom-280),left:Math.max(10,u.left-240)})}},[]),F=s.useCallback(()=>{f(),m(!0)},[f]);Pe.useEffect(()=>{const u=setTimeout(()=>{f(),m(!0)},50);return()=>clearTimeout(u)},[f]),Pe.useEffect(()=>{if(l)return window.addEventListener("resize",f),window.addEventListener("scroll",f,!0),()=>{window.removeEventListener("resize",f),window.removeEventListener("scroll",f,!0)}},[l,f]);const P=s.useCallback(()=>{},[]),R=ka(t),M=R!==t&&t.length>0,b="bg-slate-100 hover:bg-slate-200 text-[#0a1628] text-sm px-2 py-1 rounded-lg transition-colors";return e.jsxs("div",{className:"relative",children:[l&&e.jsxs("div",{className:"fixed z-[60] bg-white border border-slate-200 rounded-xl shadow-xl px-3 py-3 flex flex-col gap-3 w-[220px] pointer-events-auto e-left-top",style:{"--top":`${p.top}px`,"--left":`${p.left}px`},onMouseDown:u=>u.preventDefault(),children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] text-[#5a6578] uppercase tracking-wider mb-0.5 block",children:"Powers"}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx("button",{type:"button",className:b,title:"Square",onClick:()=>n("²"),children:"x²"}),e.jsx("button",{type:"button",className:b,title:"Cube",onClick:()=>n("³"),children:"x³"}),e.jsx("button",{type:"button",className:b,title:"Power",onClick:()=>n("^"),children:"xⁿ"}),e.jsx("button",{type:"button",className:b,title:"Inverse",onClick:()=>n("⁻¹"),children:"x⁻¹"}),e.jsx("button",{type:"button",className:b,title:"Square root",onClick:()=>n("√("),children:"√"}),e.jsx("button",{type:"button",className:b,title:"Cube root",onClick:()=>n("∛("),children:"∛"})]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] text-[#5a6578] uppercase tracking-wider mb-0.5 block",children:"Inverse Trig"}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx("button",{type:"button",className:b,title:"Inverse sine",onClick:()=>n("sin⁻¹("),children:"sin⁻¹"}),e.jsx("button",{type:"button",className:b,title:"Inverse cosine",onClick:()=>n("cos⁻¹("),children:"cos⁻¹"}),e.jsx("button",{type:"button",className:b,title:"Inverse tangent",onClick:()=>n("tan⁻¹("),children:"tan⁻¹"})]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] text-[#5a6578] uppercase tracking-wider mb-0.5 block",children:"Symbols"}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx("button",{type:"button",className:b,title:"Pi",onClick:()=>n("π"),children:"π"}),e.jsx("button",{type:"button",className:b,title:"Euler's number",onClick:()=>n("e"),children:"e"}),e.jsx("button",{type:"button",className:b,title:"Infinity",onClick:()=>n("∞"),children:"∞"}),e.jsx("button",{type:"button",className:b,title:"Plus-minus",onClick:()=>n("±"),children:"±"}),e.jsx("button",{type:"button",className:b,title:"Approximately",onClick:()=>n("≈"),children:"≈"}),e.jsx("button",{type:"button",className:b,title:"Degree",onClick:()=>n("°"),children:"°"})]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] text-[#5a6578] uppercase tracking-wider mb-0.5 block",children:"Other"}),e.jsxs("div",{className:"flex gap-1 items-center",children:[e.jsx("button",{type:"button",className:b,title:"Fraction",onClick:()=>n("(/)"),children:"a/b"}),e.jsx("div",{className:"ml-auto",children:e.jsxs("button",{type:"button",className:"bg-sky-600 hover:bg-rose-500 text-white text-xs px-3 py-1 rounded-lg flex items-center gap-1",onClick:()=>x?.(),children:[e.jsx(Me,{size:12}),"Use Calc"]})})]})]})]}),e.jsx("input",{ref:E,id:"math-answer-input",name:"math-answer-input","aria-label":"Math answer input",type:"text",value:t,onChange:u=>a(u.target.value),onKeyDown:$,onFocus:F,onBlur:P,placeholder:c||"Type your answer... use ^ for powers e.g. x^2 for x²",className:"w-full bg-white border border-slate-200 focus:border-sky-500 rounded-xl px-4 py-3 text-[#0a1628] font-mono text-base outline-none transition-colors"}),M&&e.jsx("div",{className:"text-rose-300 text-sm font-mono mt-1",dangerouslySetInnerHTML:{__html:R}})]})};function Sa(t){return t?{"multiple-choice":"multiple_choice","true-false":"true_false","fill-in-blank":"fill_in_blank",identification:"identification","word-problem":"word_problem"}[t]||t:"identification"}function za(t){const a=t.type||t.questionType;if((Sa(a)==="multiple_choice"||t.questionType==="multiple_choice")&&t.options&&t.options.length>0){const r=t.options.findIndex(l=>l.trim().toLowerCase()===t.correctAnswer.trim().toLowerCase());return{id:t.id,question:t.question,options:t.options,correctAnswer:r>=0?r:0,correctAnswerText:t.correctAnswer,explanation:t.explanation,questionType:t.questionType,points:t.points,difficulty:t.difficulty,topic:t.topic,bloomLevel:t.bloomLevel}}return{id:t.id,question:t.question,options:[],correctAnswer:-1,correctAnswerText:t.correctAnswer,explanation:t.explanation,questionType:t.questionType,points:t.points,difficulty:t.difficulty,topic:t.topic,bloomLevel:t.bloomLevel}}function At(t){return t.replace(/²/g,"^2").replace(/³/g,"^3").replace(/⁻¹/g,"^-1").replace(/⁰/g,"^0").replace(/¹/g,"^1").replace(/⁴/g,"^4").replace(/⁵/g,"^5").replace(/⁶/g,"^6").replace(/⁷/g,"^7").replace(/⁸/g,"^8").replace(/⁹/g,"^9").replace(/π/g,"pi").replace(/√/g,"sqrt").replace(/×/g,"*").replace(/÷/g,"/").replace(/\s+/g,"").toLowerCase().trim()}function Aa(t,a,c){const x=r=>r.trim().toLowerCase().replace(/\s+/g," ");switch(c){case"identification":return x(t)===x(a);case"enumeration":{const r=t.split(",").map(m=>x(m)).filter(Boolean).sort(),l=a.split(",").map(m=>x(m)).filter(Boolean).sort();return JSON.stringify(r)===JSON.stringify(l)}case"word_problem":case"equation_based":{const r=At(t),l=At(a);if(r===l)return!0;const m=parseFloat(t.replace(/[^\d.\-]/g,"")),_=parseFloat(a.replace(/[^\d.\-]/g,""));return!isNaN(m)&&!isNaN(_)?Math.abs(m-_)<=.01:x(t)===x(a)}default:return x(t)===x(a)}}function _a(t){switch(t){case"identification":return"Type your answer below";case"enumeration":return"List your answers separated by commas";case"word_problem":return"Show your work and type the final answer";case"equation_based":return"Solve the equation and type the result";default:return"Select the correct answer"}}const Ma=({quiz:t,onClose:a,onComplete:c,studentId:x,atRiskSubjects:r=[]})=>{const[l,m]=s.useState(0),[_,S]=s.useState(null),[p,w]=s.useState(""),[E,T]=s.useState(!1),[n,$]=s.useState(!1),[f,F]=s.useState(0),[P,R]=s.useState(0),[M,b]=s.useState(1),[u,A]=s.useState([]),[N,O]=s.useState([]),[K,U]=s.useState(Date.now()),[J,ae]=s.useState(!1),[ne,ce]=s.useState(0),[re,L]=s.useState(0),[oe,X]=s.useState(!1),[le,de]=s.useState(0),[k,W]=s.useState({}),[o,i]=s.useState(!1),[y,z]=s.useState(!1),[D,se]=s.useState(!1),[Z,ge]=s.useState([]),[Se,ye]=s.useState(!0);s.useEffect(()=>{let g=!1;async function h(){try{if(t.loadedQuestions&&t.loadedQuestions.length>0)ge(t.loadedQuestions.map(za));else{const C=await lt({lessonId:t.id,lessonTitle:t.title,questionCount:t.questions});g||ge(C.map((I,G)=>({id:`q${G+1}`,question:I.question,options:I.options||[],correctAnswer:I.options?I.options.findIndex(ie=>ie.trim().toLowerCase()===I.correctAnswer.trim().toLowerCase()):-1,correctAnswerText:I.correctAnswer,explanation:I.explanation||"",questionType:I.type})))}}catch(C){console.error("[QuizExperience] Failed to load questions:",C)}finally{g||ye(!1)}}return h(),()=>{g=!0}},[t.id,t.title,t.questions,t.loadedQuestions]);const q=Z[l];s.useEffect(()=>{const g=parseInt(t.duration);ce(g*60);const h=setInterval(()=>{ce(C=>C<=1?(clearInterval(h),j(),0):C-1)},1e3);return()=>clearInterval(h)},[]);const[xe,ue]=s.useState(Array.from({length:15},(g,h)=>({id:h,size:Math.random()*120+40,x:Math.random()*100,y:Math.random()*100,duration:Math.random()*20+15,delay:Math.random()*-20,color:["bg-purple-500/10","bg-blue-500/10","bg-cyan-500/10","bg-emerald-500/10"][Math.floor(Math.random()*4)]}))),fe=g=>{const h=new(window.AudioContext||window.webkitAudioContext),C=h.createOscillator(),I=h.createGain();switch(C.connect(I),I.connect(h.destination),g){case"correct":C.frequency.value=800,I.gain.setValueAtTime(.3,h.currentTime),I.gain.exponentialRampToValueAtTime(.01,h.currentTime+.3),C.start(h.currentTime),C.stop(h.currentTime+.3);break;case"incorrect":C.frequency.value=200,I.gain.setValueAtTime(.3,h.currentTime),I.gain.exponentialRampToValueAtTime(.01,h.currentTime+.2),C.start(h.currentTime),C.stop(h.currentTime+.2);break;case"combo":C.frequency.value=1200,I.gain.setValueAtTime(.2,h.currentTime),I.gain.exponentialRampToValueAtTime(.01,h.currentTime+.4),C.start(h.currentTime),C.stop(h.currentTime+.4);break;case"complete":C.frequency.value=600,I.gain.setValueAtTime(.3,h.currentTime),I.gain.exponentialRampToValueAtTime(.01,h.currentTime+.5),C.start(h.currentTime),C.stop(h.currentTime+.5);break}},j=()=>{ae(!0),B()},Q=g=>{n||S(g)},ee=()=>{!k[l]&&!n&&!o&&(W(g=>({...g,[l]:!0})),de(g=>Math.max(0,g-2)),fe("correct"))},Y=()=>{const g=[...u];g[l]=0,A(g),T(!1),$(!0),R(0),b(1);const h=Math.round((Date.now()-K)/1e3);O(C=>[...C,{questionId:q.id,answer:"show_answer",correct:!1,timeSpent:h}])},V=()=>{const g=q.questionType!=null&&q.questionType!=="multiple_choice";if(g){if(!p.trim())return}else if(_===null)return;if(!(g?Aa(p,q.correctAnswerText||"",q.questionType||""):_===q.correctAnswer)){i(!0),z(!0),fe("incorrect"),setTimeout(()=>z(!1),500);return}const C=[...u];C[l]=1,A(C),T(!0);const I=k[l]?5:10;de(Ne=>Ne+I);const G=Math.round((Date.now()-K)/1e3);O(Ne=>[...Ne,{questionId:q.id,answer:g?p:String(_),correct:!0,timeSpent:G}]),fe("correct"),F(f+1);const ie=P+1;R(ie),ie>0&&ie%3===0&&(se(!0),setTimeout(()=>se(!1),2500)),ie>=5?(b(3),fe("combo"),Te({particleCount:50,spread:60,origin:{y:.6}})):ie>=3?(b(2),fe("combo")):b(1),Te({particleCount:30,spread:40,colors:["#75D06A","#6ED1CF"],origin:{y:.6}}),$(!0)},d=()=>{l{const g=Math.round(f/Z.length*100);let h=t.xpReward;g>=90?h=Math.round(h*1.5):g>=80&&(h=Math.round(h*1.25));const C=parseInt(t.duration)*60;ne>C*.5&&(h=Math.round(h*1.2)),L(h);const I=C-ne;x&&os({lrn:x,quizId:t.id,subject:t.subject,score:g,totalQuestions:Z.length,correctAnswers:f,timeSpentSeconds:I}).catch(G=>console.error("[WARN] Automation: quiz pipeline failed:",G)),t.source==="ai_generated"&&x?cs(x,t.id,t.generatedQuizId,t.subject,t.source,g,h,I,N,Z.map(G=>({topic:G.topic||t.subject,difficulty:G.difficulty||"medium",bloomLevel:G.bloomLevel||"understand"}))).catch(G=>console.error("[WARN] Quiz result save failed:",G)):x&&Yt(x,t.id,t.subject,g,N.map(G=>({questionId:G.questionId,selectedAnswer:G.answer,isCorrect:G.correct})),I).catch(G=>console.error("[WARN] Practice quiz persist failed:",G)),fe("complete"),Te({particleCount:100,spread:70,origin:{y:.6}}),setTimeout(()=>{c(g,h)},3e3)},H=g=>{const h=Math.floor(g/60),C=g%60;return`${h}:${C.toString().padStart(2,"0")}`};if(Se||Z.length===0)return e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-4 sm:p-5",children:e.jsxs(v.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},className:"bg-white rounded-[28px] shadow-2xl max-w-md w-full p-8 text-center",children:[e.jsx("div",{className:"mx-auto mb-4 h-12 w-12 rounded-full border-4 border-[#9956DE] border-t-transparent animate-spin"}),e.jsx("h2",{className:"text-2xl font-bold text-[#0a1628] mb-2",children:"Preparing Quiz"}),e.jsx("p",{className:"text-sm text-[#5a6578]",children:"Generating questions from curriculum using AI..."})]})});if(J){const g=Math.round(f/Z.length*100),h=g>=70;return e.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-4 sm:p-5 overflow-y-auto",children:e.jsxs(v.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},className:"bg-white rounded-[28px] shadow-2xl max-w-xl w-full p-6 sm:p-7",children:[e.jsxs("div",{className:"text-center mb-6 sm:mb-7",children:[e.jsx(v.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.2,type:"spring"},className:`w-20 h-20 mx-auto rounded-full flex items-center justify-center mb-3 ${h?"bg-gradient-to-br from-[#75D06A] to-[#6ED1CF]":"bg-gradient-to-br from-[#FFB356] to-[#FF8B8B]"}`,children:h?e.jsx(Re,{size:36,className:"text-white"}):e.jsx(ve,{size:36,className:"text-white"})}),e.jsx("h2",{className:"text-2xl sm:text-3xl font-bold font-display text-[#0a1628] mb-2",children:h?"Great Job!":"Keep Practicing!"}),e.jsx("p",{className:"text-sm sm:text-base text-[#5a6578]",children:t.title})]}),e.jsxs("div",{className:"bg-gradient-to-br from-[#1FA7E1]/10 to-[#6ED1CF]/10 rounded-2xl p-5 mb-5 sm:mb-6",children:[e.jsxs("div",{className:"text-center mb-4",children:[e.jsxs("div",{className:"text-5xl sm:text-6xl font-bold text-[#1FA7E1] mb-2",children:[g,"%"]}),e.jsx("p",{className:"text-[#5a6578]",children:"Final Score"})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-3 sm:gap-4",children:[e.jsxs("div",{className:"bg-white rounded-xl p-3 sm:p-4 text-center",children:[e.jsx(Ie,{size:24,className:"mx-auto mb-2 text-[#75D06A]"}),e.jsx("p",{className:"text-xl sm:text-2xl font-bold text-[#0a1628]",children:f}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"Correct"})]}),e.jsxs("div",{className:"bg-white rounded-xl p-3 sm:p-4 text-center",children:[e.jsx(He,{size:24,className:"mx-auto mb-2 text-[#FF8B8B]"}),e.jsx("p",{className:"text-xl sm:text-2xl font-bold text-[#0a1628]",children:Z.length-f}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"Incorrect"})]}),e.jsxs("div",{className:"bg-white rounded-xl p-3 sm:p-4 text-center",children:[e.jsx(be,{size:24,className:"mx-auto mb-2 text-rose-500"}),e.jsxs("p",{className:"text-xl sm:text-2xl font-bold text-[#0a1628]",children:["+",re]}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"XP Earned"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 mb-5 sm:mb-6",children:[g>=90&&e.jsxs("div",{className:"bg-sky-50 border border-sky-200 rounded-xl p-3 flex items-center gap-3",children:[e.jsx(tt,{size:20,className:"text-[#1FA7E1]"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-bold text-sm text-[#0a1628]",children:"Perfect Score!"}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"+50% Bonus XP"})]})]}),ne>parseInt(t.duration)*30&&e.jsxs("div",{className:"bg-sky-50 border border-sky-200 rounded-xl p-3 flex items-center gap-3",children:[e.jsx(Ae,{size:20,className:"text-[#1FA7E1]"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-bold text-sm text-[#0a1628]",children:"Speed Demon"}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"+20% Bonus XP"})]})]}),P>=5&&e.jsxs("div",{className:"bg-orange-50 border border-orange-200 rounded-xl p-3 flex items-center gap-3",children:[e.jsx(Ce,{size:20,className:"text-orange-600"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-bold text-sm text-[#0a1628]",children:"Hot Streak!"}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"3x Combo Achieved"})]})]})]}),e.jsx(pt,{variant:"results",quizSubject:t.subject,quizScore:g,atRiskSubjects:r}),e.jsx("button",{onClick:a,className:"w-full bg-gradient-to-r from-sky-600 to-sky-500 hover:from-sky-700 hover:to-sky-600 text-white font-bold py-3.5 rounded-xl transition-all mt-3 sm:mt-4",children:"Continue"})]})})}return e.jsxs("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-md z-50 flex items-center justify-center p-4 sm:p-6 overflow-hidden",children:[e.jsx(pe,{children:D&&e.jsxs(v.div,{initial:{opacity:0,y:-50,scale:.9},animate:{opacity:1,y:30,scale:1},exit:{opacity:0,y:-20},className:"fixed top-4 left-1/2 -translate-x-1/2 z-[60] bg-orange-500 text-white font-bold px-6 py-3 rounded-full shadow-2xl flex items-center justify-center gap-2 border-2 border-white",children:[e.jsx(Ce,{size:20,className:"animate-pulse"}),P," In a Row! Hot Streak!"]})}),e.jsxs(v.div,{animate:y?{x:[-10,10,-10,10,0],scale:[1,1.01,1]}:{},transition:{duration:.4},className:"bg-white/95 backdrop-blur-xl border border-white/20 rounded-3xl shadow-[0_0_50px_rgba(0,0,0,0.3)] max-w-4xl w-full h-[95vh] sm:h-[90vh] md:h-[85vh] flex flex-col relative z-10 overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 pointer-events-none z-0",children:xe.map(g=>e.jsx(v.div,{className:`absolute rounded-full blur-3xl ${g.color.replace("/10","/30")}`,style:{width:g.size*1.5,height:g.size*1.5,left:`${g.x}%`,top:`${g.y}%`},animate:{x:[0,Math.random()*200-100,0],y:[0,Math.random()*200-100,0],scale:[1,1.5,1]},transition:{duration:g.duration,repeat:1/0,ease:"linear",delay:g.delay}},g.id))}),e.jsxs(v.div,{animate:{backgroundColor:n?E?"#75D06A":"#FFB356":o?"#FF8B8B":"#7C3AED"},className:"shrink-0 p-4 sm:p-6 text-white border-b border-white/10 shadow-md relative z-10",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3 sm:mb-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl sm:text-2xl font-bold",children:t.title}),e.jsx("p",{className:"text-white/80 text-xs sm:text-sm font-medium",children:t.subject})]}),e.jsx("button",{onClick:a,className:"w-8 h-8 sm:w-10 sm:h-10 bg-white/20 hover:bg-white/30 rounded-xl flex items-center justify-center transition-colors",children:e.jsx(me,{size:20})})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 mb-3",children:[e.jsxs("button",{onClick:()=>X(g=>!g),className:`flex items-center gap-1.5 px-3 py-1 rounded-full text-sm font-semibold transition-all ${oe?"bg-white/40 text-white ring-1 ring-white/50":"bg-white/20 hover:bg-white/30 text-white"}`,title:"Toggle Scientific Calculator",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"4",y:"2",width:"16",height:"20",rx:"2"}),e.jsx("line",{x1:"8",x2:"16",y1:"6",y2:"6"}),e.jsx("line",{x1:"16",x2:"16",y1:"14",y2:"18"}),e.jsx("path",{d:"M16 10h.01"}),e.jsx("path",{d:"M12 10h.01"}),e.jsx("path",{d:"M8 10h.01"}),e.jsx("path",{d:"M12 14h.01"}),e.jsx("path",{d:"M8 14h.01"}),e.jsx("path",{d:"M12 18h.01"}),e.jsx("path",{d:"M8 18h.01"})]}),"Calc"]}),e.jsxs("div",{className:"bg-white/20 px-3 py-1 rounded-full flex items-center gap-1",children:[e.jsx(be,{size:16}),e.jsxs("span",{className:"font-bold text-sm",children:[le," pts"]})]})]}),e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[e.jsxs("span",{className:"text-sm font-medium",children:["Question ",l+1," of ",Z.length]}),e.jsxs("div",{className:"flex items-center gap-4",children:[P>0&&e.jsxs("div",{className:"flex items-center gap-1 bg-gradient-to-r from-orange-400 to-rose-500 px-3 py-1 rounded-full border border-white/20",children:[e.jsx(Ce,{size:16,className:"animate-pulse"}),e.jsxs("span",{className:"text-sm font-bold",children:[P," Streak"]}),M>1&&e.jsxs("span",{className:"text-xs ml-1 font-black",children:["x",M]})]}),e.jsxs("div",{className:"flex items-center gap-1 bg-white/20 px-3 py-1 rounded-full",children:[e.jsx(Ae,{size:16}),e.jsx("span",{className:"text-sm font-bold",children:H(ne)})]})]})]}),e.jsx("div",{className:"flex items-center justify-between gap-1 mt-2",children:Z.map((g,h)=>{let C="bg-white/30";return hX(!1),className:"text-slate-500 hover:text-[#5a6578] transition-colors",children:e.jsx(me,{size:14})})]}),e.jsx(us,{isOpen:!0,onClose:()=>X(!1),inline:!0})]})})}),l===0&&e.jsx(pt,{variant:"compact",quizSubject:t.subject,atRiskSubjects:r}),e.jsx(pe,{mode:"wait",children:e.jsxs(v.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"flex flex-col flex-1 relative z-10",children:[e.jsxs("div",{className:"mb-4 sm:mb-6 shrink-0 text-center sm:text-left pt-2",children:[e.jsx("h3",{className:"text-xl sm:text-2xl lg:text-3xl font-extrabold text-[#0a1628] leading-snug",children:q.question.includes("___")?e.jsx("span",{children:q.question.split("___").map((g,h,C)=>e.jsxs(Pe.Fragment,{children:[g,hw(I.target.value),onKeyDown:I=>{I.key==="Enter"&&!n&&V()},className:"inline-block w-24 mx-2 border-b-4 border-[#7C3AED] focus:border-[#75D06A] outline-none text-center bg-transparent text-[#7C3AED] font-bold"})]},h))}):q.question}),e.jsxs("div",{className:"flex items-center gap-3 mt-4",children:[e.jsx("p",{className:"text-xs sm:text-sm font-semibold opacity-70 uppercase tracking-wide text-[#7C3AED]",children:_a(q.questionType)}),!n&&!o&&q.explanation&&e.jsxs("button",{onClick:ee,disabled:k[l],className:`flex items-center gap-1 text-xs font-bold px-3 py-1 rounded-full transition-all ${k[l]?"bg-slate-200 text-slate-400":"bg-orange-100 text-orange-600 hover:bg-orange-200"}`,children:[e.jsx(be,{size:14}),k[l]?"Hint Used":"Use Hint (-5 pts)"]}),k[l]&&!n&&e.jsxs("div",{className:"text-sm bg-orange-50 border border-orange-200 text-orange-700 px-3 py-1.5 rounded-lg flex-1",children:[e.jsx("strong",{children:"Hint:"})," ",q.explanation.substring(0,50),"..."]})]})]}),q.questionType&&q.questionType!=="multiple_choice"?e.jsxs("div",{className:"mb-6",children:[!q.question.includes("___")&&e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-3 top-3.5",children:e.jsx(ds,{size:16,className:"text-slate-500"})}),q.questionType==="enumeration"?e.jsx("textarea",{value:p,onChange:g=>w(g.target.value),disabled:n||o,placeholder:"Type each answer separated by commas…",rows:4,className:`w-full pl-10 pr-4 py-3 rounded-xl border-2 text-sm outline-none transition-all resize-none ${n?E?"bg-[#75D06A]/10 border-teal-400":"bg-[#FF8B8B]/10 border-red-400":o?"bg-[#FF8B8B]/10 border-red-400":"border-[#dde3eb] focus:border-[#7C3AED] bg-white"}`}):q.questionType==="equation_based"||q.questionType==="word_problem"?e.jsx(Ca,{value:p,onChange:w,placeholder:q.questionType==="equation_based"?"Enter the numerical result…":"Enter your answer…",onCalculatorOpen:()=>X(!0)}):e.jsx("input",{type:"text",value:p,onChange:g=>w(g.target.value),disabled:n||o,onKeyDown:g=>{g.key==="Enter"&&!n&&V()},placeholder:"Type your answer…",className:`w-full pl-10 pr-4 py-3.5 rounded-xl border-2 text-sm outline-none transition-all ${n?E?"bg-[#75D06A]/10 border-teal-400":"bg-[#FFB356]/10 border-orange-400":o?"bg-[#FF8B8B]/10 border-red-400":"border-[#dde3eb] focus:border-[#7C3AED] bg-white"}`})]}),n&&!E&&e.jsxs("p",{className:"mt-2 text-base font-semibold text-orange-600",children:["Correct answer: ",q.correctAnswerText]}),o&&!n&&e.jsx(v.div,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},className:"mt-4 flex gap-3 items-center",children:e.jsx("p",{className:"text-red-500 font-bold flex-1",children:"Not quite right. Try again, or use an escape hatch."})})]}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 sm:gap-4 mb-4 sm:mb-6 overflow-y-auto",children:q.options.map((g,h)=>{const C=_===h,I=h===q.correctAnswer,G=n;let ie="bg-[#edf1f7] hover:bg-[#dde3eb] border-[#dde3eb]";return G?I?ie="bg-[#75D06A]/10 border-[#75D06A]":C&&!I&&(ie="bg-[#FF8B8B]/10 border-red-500"):o?C?ie="bg-[#FF8B8B]/10 border-red-500 opacity-60":ie="bg-white hover:bg-[#dde3eb] border-[#dde3eb]":C&&(ie="bg-purple-50 border-[#7C3AED]"),e.jsx(v.button,{whileHover:n?{}:{scale:1.02},whileTap:n?{}:{scale:.98},onClick:()=>Q(h),disabled:n||o&&C,className:`w-full text-left p-4 sm:p-5 rounded-[20px] border-2 transition-all ${ie} ${n||o&&C?"cursor-default":"cursor-pointer shadow-sm hover:shadow-md"} flex items-center min-h-[4rem] sm:min-h-[5rem]`,children:e.jsxs("div",{className:"flex items-center gap-3 w-full",children:[e.jsx("div",{className:`w-8 h-8 sm:w-10 sm:h-10 rounded-xl shrink-0 flex items-center justify-center font-bold text-sm sm:text-base transition-colors ${G&&I?"bg-[#75D06A] text-white shadow-inner":G&&C&&!I?"bg-[#FF8B8B] text-white shadow-inner":o&&C?"bg-red-300 text-white shadow-inner":C?"bg-[#7C3AED] text-white shadow-inner":"bg-white text-[#0a1628] shadow-sm"}`,children:String.fromCharCode(65+h)}),e.jsx("span",{className:"font-semibold sm:font-bold text-[#0a1628] sm:text-lg break-words line-clamp-3",children:g}),G&&I&&e.jsx(Ie,{size:20,className:"ml-auto text-[#75D06A]"}),G&&C&&!I&&e.jsx(He,{size:20,className:"ml-auto text-red-600"}),o&&C&&!G&&e.jsx(He,{size:20,className:"ml-auto text-red-400"})]})},h)})}),n&&e.jsx(v.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:`p-4 rounded-xl border-2 ${E?"bg-[#75D06A]/10 border-[#75D06A]/30":"bg-orange-50 border-orange-200"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`w-8 h-8 rounded-lg flex items-center justify-center flex-shrink-0 ${E?"bg-[#75D06A]":"bg-orange-500"}`,children:e.jsx(Ee,{size:18,className:"text-white"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-bold text-[#0a1628] mb-1",children:E?"Correct!":"Keep Practicing"}),e.jsx("p",{className:"text-sm text-[#5a6578]",children:q.explanation})]})]})})]},l)})]}),e.jsx("div",{className:"p-6 bg-[#edf1f7] border-t border-[#dde3eb]",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-sm text-[#5a6578]",children:n?e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx($e,{size:16}),E?"Awesome job!":"You've got this!"]}):o?e.jsx("span",{className:"flex items-center gap-2 text-red-500 font-bold",children:"Pick another answer or show solution."}):e.jsx("span",{children:"Select an answer to continue"})}),e.jsxs("div",{className:"flex gap-3",children:[o&&!n&&e.jsx("button",{onClick:Y,className:"font-bold px-6 py-3 rounded-xl transition-all border-2 border-orange-500 text-orange-600 hover:bg-orange-50",children:"Show Answer"}),n?e.jsxs("button",{onClick:d,className:"bg-[#75D06A] hover:bg-[#68c05c] text-white font-bold px-8 py-3 rounded-xl flex items-center gap-2 transition-all shadow-md hover:shadow-lg",children:[l{const[E,T]=s.useState(!1);if(!t)return null;const n=()=>{if(!l||E)return;T(!0);const b=r?.rarity==="epic",u=p>0&&(p+1)%7===0;b||u?Te({particleCount:150,spread:80,origin:{y:.6},colors:["#FFD700","#FFA500","#FF8C00","#FF6B6B","#4ade80"]}):Te({particleCount:100,spread:70,origin:{y:.6},colors:["#FFD700","#FFA500","#FF8C00"]}),setTimeout(()=>{T(!1),c()},1200)},$=b=>b+1,f=b=>b===S,F=b=>_.includes(b),P=b=>b>S,R=x.slice(0,6),M=x[6];return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-8",children:[e.jsx(pe,{children:t&&e.jsx(v.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 bg-slate-900/60 backdrop-blur-sm",onClick:a})}),e.jsxs(v.div,{initial:{scale:.9,opacity:0,y:20},animate:{scale:1,opacity:1,y:0},exit:{scale:.9,opacity:0,y:20},className:"relative w-full max-w-[420px] bg-[#f7f9fc] rounded-3xl border border-[#dde3eb] shadow-2xl flex flex-col items-center p-5 overflow-visible",children:[e.jsxs("div",{className:"absolute -top-6 w-[85%] h-12 bg-gradient-to-r from-[#9956DE] via-[#7274ED] to-[#1FA7E1] rounded-xl shadow-lg flex items-center justify-center z-20",children:[e.jsx("div",{className:"absolute -left-2.5 -z-10 w-5 h-8 bg-[#633299] rounded-l-full rotate-12 top-1.5"}),e.jsx("div",{className:"absolute -right-2.5 -z-10 w-5 h-8 bg-[#10709b] rounded-r-full -rotate-12 top-1.5"}),e.jsx("h2",{className:"text-white font-black text-lg tracking-wide uppercase drop-shadow-sm font-display",children:"Daily Rewards"})]}),e.jsx("button",{onClick:a,className:"absolute -right-3 -top-3 w-8 h-8 bg-white hover:bg-slate-100 border border-slate-200 text-slate-500 hover:text-slate-800 rounded-full flex items-center justify-center z-30 shadow-md transition-transform hover:scale-105 active:scale-95",children:e.jsx(me,{size:16,strokeWidth:3})}),e.jsxs("div",{className:"mt-6 mb-2 text-center w-full",children:[e.jsx("h3",{className:"text-xl font-bold text-slate-800 font-display mt-2",children:"Welcome Back!"}),e.jsx("p",{className:"text-slate-500 font-medium text-xs mt-0.5",children:"Claim your daily reward to keep the streak going."}),p>0&&e.jsxs("div",{className:"mt-2 inline-flex items-center gap-1 rounded-full bg-orange-50 px-3 py-1 text-xs font-bold text-orange-600 border border-orange-200",children:[e.jsx(Ce,{size:14,className:"text-orange-500"}),e.jsxs("span",{children:[p," day streak"]})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-2 w-full mb-5 relative z-10",children:[R.map((b,u)=>{const A=$(u),N=F(u),O=f(u),K=P(u);return e.jsxs("div",{className:`relative rounded-xl flex flex-col overflow-hidden border-[1.5px] transition-all ${O&&!N?"border-amber-400 shadow-[0_0_15px_rgba(251,191,36,0.25)] scale-105 z-10 bg-amber-50":N?"border-[#dde3eb] bg-slate-200/50":"border-[#dde3eb] bg-white"}`,children:[e.jsxs("div",{className:`py-0.5 text-center font-black text-[10px] uppercase tracking-wider ${O&&!N?"bg-amber-400 text-amber-900":Mt[u]}`,children:["Day ",A]}),e.jsx("div",{className:"absolute top-5 right-1 z-10",children:e.jsx("span",{className:`text-[8px] font-bold uppercase px-1 rounded ${_t[b.rarity]}`,children:b.rarity})}),e.jsxs("div",{className:"flex-1 p-2 flex flex-col items-center justify-center relative min-h-[75px]",children:[N&&e.jsx(v.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",bounce:.5},className:"absolute inset-0 flex items-center justify-center z-20 pointer-events-none",children:e.jsxs("div",{className:"relative w-14 h-14 rounded-full border-[3px] border-rose-500 bg-rose-50 flex items-center justify-center transform -rotate-12 shadow-sm opacity-90",children:[e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"Claimed",className:"w-10 h-10 object-contain drop-shadow-sm"}),e.jsx("div",{className:"absolute -bottom-2 bg-rose-500 rounded px-1.5 py-0.5 border border-rose-200 shadow-sm",children:e.jsx("span",{className:"text-[8px] font-black text-white uppercase tracking-widest leading-none",children:"Claimed"})})]})}),K&&e.jsx("div",{className:"absolute top-1 right-1 bg-slate-200 rounded-full p-0.5 z-10",children:e.jsx(Ft,{size:8,className:"text-slate-400"})}),e.jsxs("div",{className:`flex flex-col items-center transition-all w-full ${N?"opacity-30 grayscale":""}`,children:[e.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center border-2 mb-1",style:{backgroundColor:b.color+"20",borderColor:b.color+"40"},children:e.jsx("span",{className:"text-lg",children:b.icon})}),e.jsx("div",{className:`font-black text-xs leading-none mt-0.5 text-center ${O?"text-amber-600":N?"text-slate-500":"text-slate-600"}`,children:b.label})]})]})]},b.id)}),M&&e.jsxs("div",{className:`col-span-3 relative rounded-xl flex flex-col overflow-hidden border-[1.5px] transition-all mt-1 ${f(6)&&!F(6)?"border-amber-400 shadow-[0_0_20px_rgba(251,191,36,0.3)] scale-[1.02] z-10 bg-amber-50":F(6)?"border-[#dde3eb] bg-slate-200/50":"border-[#dde3eb] bg-white"}`,children:[e.jsx("div",{className:`py-1 text-center font-black text-[10px] uppercase tracking-widest ${f(6)&&!F(6)?"bg-amber-400 text-amber-900":Mt[6]}`,children:"Day 7 • Epic Reward"}),e.jsx("div",{className:"absolute top-6 right-2 z-10",children:e.jsx("span",{className:`text-[8px] font-bold uppercase px-1.5 py-0.5 rounded ${_t[M.rarity]}`,children:M.rarity})}),e.jsxs("div",{className:"flex items-center justify-center gap-5 p-3 relative",children:[F(6)&&e.jsx(v.div,{initial:{scale:0},animate:{scale:1},transition:{type:"spring",bounce:.5},className:"absolute inset-0 flex items-center justify-center z-20 pointer-events-none",children:e.jsxs("div",{className:"relative w-20 h-20 rounded-full border-[4px] border-rose-500 bg-rose-50 flex items-center justify-center transform rotate-12 shadow-sm opacity-90",children:[e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"Claimed",className:"w-14 h-14 object-contain drop-shadow-sm"}),e.jsx("div",{className:"absolute -bottom-2.5 bg-rose-500 rounded-md px-2 py-0.5 border border-rose-200 shadow-md",children:e.jsx("span",{className:"text-[10px] font-black text-white uppercase tracking-widest leading-none",children:"Claimed"})})]})}),e.jsxs("div",{className:`flex items-center justify-center gap-5 w-full transition-all ${F(6)?"opacity-30 grayscale":""}`,children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:"w-12 h-12 rounded-full flex items-center justify-center border-2 shadow-sm mb-0.5",style:{backgroundColor:M.color+"20",borderColor:M.color+"40"},children:e.jsx("span",{className:"text-2xl",children:M.icon})}),e.jsx("span",{className:`font-black text-sm ${f(6)?"text-amber-600":"text-slate-600"}`,children:M.label})]}),M.rarity==="epic"&&e.jsxs("div",{className:"relative mt-1",children:[e.jsx("div",{className:"w-14 h-14 bg-purple-50 rounded-xl flex items-center justify-center border-2 border-purple-200 shadow-sm",children:e.jsx("span",{className:"text-3xl drop-shadow-md",children:"🎁"})}),e.jsx("div",{className:"absolute -right-5 -bottom-4 w-14 h-14 bg-white rounded-xl p-1 border-2 border-amber-300 shadow-lg transform rotate-[-5deg]",children:e.jsx("img",{src:"/avatar/crown_thumbnail.png",alt:"Crown",className:"w-full h-full object-contain drop-shadow-md"})})]})]})]})]})]}),e.jsxs("div",{className:"mb-3 flex items-center gap-2 text-xs text-slate-400",children:[e.jsx(Us,{size:14}),e.jsx("span",{className:"font-mono font-medium",children:w}),e.jsx("span",{children:"until next reset"})]}),e.jsx(v.button,{whileHover:{scale:1.05},whileTap:{scale:.95},onClick:n,disabled:!l||m||E,className:`w-[85%] py-3 rounded-full font-black text-base tracking-wide uppercase shadow-lg transition-all mt-2 ${!l||m||E?"bg-slate-200 text-slate-400 cursor-not-allowed border border-slate-300":"bg-gradient-to-r from-[#FFB356] to-[#FF8C00] text-white hover:from-[#FFA500] hover:to-[#FF7F00] border-b-4 border-[#e67e00]"}`,children:m||E?"Claiming...":l?"Claim!":"Claimed"})]})]})},Da=new Set([7,14,30,60,100]),De={lastClaimedDate:"",lastClaimedWeekSeed:0,claimedDays:[],currentStreak:0,longestStreak:0,totalClaimed:0,coins:0,hintTokens:0,streakShields:0,activeMultiplier:null};function Pa(t){if(t<=0)return"00:00:00";const a=Math.floor(t/1e3),c=Math.floor(a/3600),x=Math.floor(a%3600/60),r=a%60;return`${String(c).padStart(2,"0")}:${String(x).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function Ia(){const t=qe();return t.setDate(t.getDate()-1),at(t)}function Rt(t){return t?new Date(t.expiresAt).getTime()>Date.now():!1}function qt(t){return Lt(et,"users",t,"dailyRewards",t)}function Ea(t){return Lt(et,"users",t)}async function Tt(t){try{const a=qt(t),c=await ps(a);if(!c.exists())return{...De};const x=c.data(),r=rt();return x.lastClaimedWeekSeed&&x.lastClaimedWeekSeed!==r?{...x,claimedDays:[],lastClaimedWeekSeed:r}:{...De,...x,activeMultiplier:x.activeMultiplier&&Rt(x.activeMultiplier)?x.activeMultiplier:null}}catch(a){return console.error("[dailyRewardService] Error getting state:",a),{...De}}}function Fa(t){const a=at();return t.lastClaimedDate!==a}async function La(t){const a=at(),c=rt(),x=Qe(),l=nt()[x];if(!l)throw new Error(`No reward found for day index ${x}`);try{const m=await hs(et,async S=>{const p=qt(t),w=Ea(t),E=await S.get(p),T=await S.get(w);let n;if(E.exists()?n={...De,...E.data()}:(n={...De,lastClaimedWeekSeed:c},S.set(p,n)),n.lastClaimedWeekSeed!==c&&(n.claimedDays=[],n.lastClaimedWeekSeed=c),n.lastClaimedDate===a)return{code:"ALREADY_CLAIMED",state:n};let $=n.currentStreak,f=!1;if(!n.lastClaimedDate||n.currentStreak===0)$=1;else{const b=Ia();n.lastClaimedDate===b?$=n.currentStreak+1:n.streakShields>0?(n.streakShields-=1,$=n.currentStreak+1,f=!0):$=1}const F=Math.max(n.longestStreak,$);let P=0,R=1;switch(l.type){case"xp":{const b=typeof l.value=="number"?l.value:parseInt(l.value,10)||0;R=Rt(n.activeMultiplier)?n.activeMultiplier?.multiplier??1:1,P=Math.floor(b*R);break}case"coins":{const b=typeof l.value=="number"?l.value:parseInt(l.value,10)||0;n.coins+=b;break}case"hint_token":{const b=typeof l.value=="number"?l.value:parseInt(l.value,10)||0;n.hintTokens+=b;break}case"streak_shield":{const b=typeof l.value=="number"?l.value:parseInt(l.value,10)||0;n.streakShields+=b;break}case"xp_multiplier":{const b=typeof l.value=="number"?l.value:parseInt(l.value,10)||60,u=l.id.includes("2")?2:1.5,A=new Date;A.setMinutes(A.getMinutes()+b),n.activeMultiplier={multiplier:u,expiresAt:A.toISOString()};break}case"badge_unlock":break}const M=[...n.claimedDays,x];return n.lastClaimedDate=a,n.currentStreak=$,n.longestStreak=F,n.totalClaimed+=1,S.set(p,n,{merge:!0}),T.exists()&&S.update(w,{coins:n.coins,hintTokens:n.hintTokens,streakShields:n.streakShields,activeMultiplier:n.activeMultiplier,lastClaimedDate:n.lastClaimedDate,updatedAt:fs()}),{code:"SUCCESS",state:n,newClaimedDays:M,newStreak:$,newLongestStreak:F,xpAwarded:P,multiplierApplied:R,streakPreserved:f}});if(m.code==="ALREADY_CLAIMED")return{success:!1,reward:l,dayIndex:x,streakAfter:m.state.currentStreak,longestStreakAfter:m.state.longestStreak,coinsAfter:m.state.coins,hintTokensAfter:m.state.hintTokens,streakShieldsAfter:m.state.streakShields,streakPreserved:!1,xpAwarded:0,multiplierApplied:1,isMilestone:!1,error:"Already claimed today"};if(m.xpAwarded>0)try{await Zt(t,m.xpAwarded,"daily_reward",`Daily Reward Day ${x+1}! +${m.xpAwarded} XP`)}catch(S){console.error("[dailyRewardService] Error awarding XP:",S)}if(l.type==="badge_unlock"&&typeof l.value=="string")try{await Pt(t,l.value)}catch(S){console.error("[dailyRewardService] Error unlocking avatar item:",S)}const _=Da.has(m.newStreak);return{success:!0,reward:l,dayIndex:x,streakAfter:m.newStreak,longestStreakAfter:m.newLongestStreak,coinsAfter:m.state.coins,hintTokensAfter:m.state.hintTokens,streakShieldsAfter:m.state.streakShields,streakPreserved:m.streakPreserved,xpAwarded:m.xpAwarded,multiplierApplied:m.multiplierApplied,isMilestone:_}}catch(m){throw console.error("[dailyRewardService] Error claiming daily reward:",m),m}}function $a(t){const[a,c]=s.useState(null),[x,r]=s.useState(!1),[l,m]=s.useState(!1),[_,S]=s.useState(null),[p,w]=s.useState(null),[E,T]=s.useState("00:00:00"),n=s.useRef(null),$=s.useMemo(()=>nt(),[]),f=s.useMemo(()=>ta(),[]),F=s.useCallback(async()=>{if(!t){c(null);return}try{w(null);const u=await Tt(t);c(u)}catch(u){const A=u instanceof Error?u.message:"Failed to load rewards";w(A),console.error("[useDailyReward] refresh error:",u)}},[t]);s.useEffect(()=>{F()},[F]),s.useEffect(()=>{const u=()=>{const N=Ks().getTime()-Date.now();T(Pa(N))};return u(),n.current=setInterval(u,1e3),()=>{n.current&&(clearInterval(n.current),n.current=null)}},[]);const P=s.useMemo(()=>!a||x?!1:Fa(a),[a,x]),R=s.useMemo(()=>!a?.activeMultiplier||new Date(a.activeMultiplier.expiresAt).getTime()<=Date.now()?null:a.activeMultiplier,[a?.activeMultiplier]),M=s.useCallback(async()=>{if(!(!t||!P)){r(!0),w(null);try{const u=await La(t);if(S(u),u.success){m(!0);const A=await Tt(t);c(A)}else w(u.error||"Claim failed")}catch(u){const A=u instanceof Error?u.message:"Claim failed";w(A),console.error("[useDailyReward] claim error:",u)}finally{r(!1)}}},[t,P]),b=s.useCallback(()=>{m(!1)},[]);return{weekRewards:$,todayReward:f,canClaim:P,isClaiming:x,claimedDays:a?.claimedDays??[],currentStreak:a?.currentStreak??0,longestStreak:a?.longestStreak??0,totalClaimed:a?.totalClaimed??0,coins:a?.coins??0,hintTokens:a?.hintTokens??0,streakShields:a?.streakShields??0,activeMultiplier:R,timeUntilReset:E,showModal:l,lastClaimResult:_,error:p,claim:M,dismissModal:b,refresh:F}}const Ba=["all","Q1","Q2","Q3","Q4"],Dr=({onEarnXP:t,atRiskSubjects:a=[],priorityTopics:c=[],initialModuleId:x=null})=>{const{userProfile:r}=Je(),[l,m]=s.useState("modules"),_=r;_?.grade;const S=as(),{isLoading:p,refetch:w}=bs(S);s.useEffect(()=>{p||(console.log("[ModulesPage] Curriculum ready"),w())},[p,w]);const[E,T]=s.useState(""),[n,$]=s.useState("all"),[f,F]=s.useState("all"),[P,R]=s.useState("all"),[M,b]=s.useState(!1),[u,A]=s.useState(null),N=s.useMemo(()=>{const d=_?.learnerCurriculumAssignments?.subjects??_?.assignedSubjects??_?.curriculumAssignedSubjects??[];return Array.isArray(d)?d:[]},[_]),O=s.useMemo(()=>Kt(S,N),[S,N]),K=x&&O.find(d=>d.id===x)||null,[U,J]=s.useState(K),[ae,ne]=s.useState(null),[ce,re]=s.useState(null),[L,oe]=s.useState(!1),[X,le]=s.useState(null),[de,k]=s.useState(!1),[W,o]=s.useState(!1),{weekRewards:i,todayReward:y,canClaim:z,isClaiming:D,claimedDays:se,currentStreak:Z,timeUntilReset:ge,claim:Se,lastClaimResult:ye}=$a(r?.uid??null);s.useEffect(()=>{if(!r?.uid)return;let d=!1;const B=async h=>{d||(z||h)&&o(!0)},H=h=>{h.detail?.tab==="Modules"&&B(!0)},g=setTimeout(()=>B(),500);return window.addEventListener("mathpulse:navigate",H),()=>{d=!0,clearTimeout(g),window.removeEventListener("mathpulse:navigate",H)}},[r?.uid,z]);const q=async()=>{if(r?.uid)try{await Se(),ye?.success&&(rs({userId:r.uid,type:"daily_checkin",title:"Daily Reward Claimed!",message:`You earned ${ye.reward.label} and kept your streak alive!`,metadata:{rewardId:ye.reward.id,streakDay:ye.dayIndex+1}}).catch(console.error),ye.reward.rarity==="epic"&&Pt(r.uid,"acc_crown").then(()=>We.success("👑 Epic reward unlocked!")).catch(console.error)),setTimeout(()=>o(!1),1e3)}catch(d){const B=d instanceof Error?d.message:"";console.error("Failed to claim daily reward:",d),B.includes("Already claimed")?We.info("You already claimed your reward today!"):We.error("Failed to claim daily reward. Please try again.")}};s.useEffect(()=>{if(x){const d=O.find(B=>B.id===x);d&&J(d)}},[x,O]),s.useEffect(()=>{r?.uid&&(k(!0),Jt(r.uid).then(d=>{le(d)}).catch(d=>{console.error("Failed to load competency profile:",d)}).finally(()=>{k(!1)}))},[r?.uid]);const xe=s.useMemo(()=>{const d=c.length>0?c:a.map(H=>es(H)).filter(H=>H!==null),B=new Set;return d.filter(H=>B.has(H)?!1:(B.add(H),!0))},[c,a]),{data:ue=[]}=Ot({queryKey:ts.modules(S,xe),enabled:!0,staleTime:600*1e3,gcTime:1800*1e3,queryFn:async()=>{const d=O;if(xe.length===0)return d;const B=new Map(xe.map((H,g)=>[ns[H],g]));return[...d].sort((H,g)=>{const h=B.get(H.id)??Number.POSITIVE_INFINITY,C=B.get(g.id)??Number.POSITIVE_INFINITY;return h-C})}}),fe=s.useMemo(()=>{const d=new Set;return ue.forEach(B=>d.add(B.competency_group)),Array.from(d)},[ue]),j=s.useMemo(()=>{const d=E.trim().toLowerCase(),B=ue.filter(H=>{const g=!d||H.title.toLowerCase().includes(d),h=!d||H.description.toLowerCase().includes(d),C=!d||H.lessons.some(we=>we.title.toLowerCase().includes(d)),I=!d||H.quizzes.some(we=>we.title.toLowerCase().includes(d)),G=d?H.competencies.some(we=>we.outcome.toLowerCase().includes(d)||we.code.toLowerCase().includes(d)):!0,ie=n==="all"||H.subjectId===n,Ne=f==="all"||H.quarter===f,Oe=P==="all"||H.competency_group===P;return(g||h||C||I||G)&&ie&&Ne&&Oe});if(X?.competencies){const H=new Set(Object.entries(X.competencies).filter(([,h])=>h.score<50).map(([h])=>h)),g=new Set(Object.entries(X.competencies).filter(([,h])=>h.score>=80).map(([h])=>h));return B.sort((h,C)=>{const I=h.competencies.map(he=>he.code),G=C.competencies.map(he=>he.code),ie=I.some(he=>H.has(he))?1:0,Ne=G.some(he=>H.has(he))?1:0,Oe=I.some(he=>g.has(he))?1:0,we=G.some(he=>g.has(he))?1:0,Qt=ie*2+Oe;return Ne*2+we-Qt})}return B},[ue,E,n,f,P,X]),Q=s.useMemo(()=>{const d=f==="all"?"All Quarters":f,B=n==="all"?"All Subjects":dt[n]?.label??"Subject";return`${S} · ${B} · ${d}`},[S,n,f]),ee=s.useMemo(()=>{const d=new Set(ue.map(B=>B.subjectId));return Array.from(d)},[ue]),Y=()=>{$("all"),F("all"),R("all"),T("")};s.useEffect(()=>{l!=="recommended"||xe.length===0||(oe(!0),ss({weakTopics:xe.map(d=>xt[d]),subject:n!=="all"?n:"General Mathematics",userId:r?.uid}).then(d=>{re(d.curriculumContext),oe(!1)}).catch(()=>oe(!1)))},[l,xe]);const V=(d,B)=>{t&&t(B,`Quiz Completed! +${B} XP`),ne(null)};return ae?e.jsx(Ma,{quiz:ae,onClose:()=>ne(null),onComplete:V,studentId:r?.uid}):U?e.jsx(ja,{module:U,onBack:()=>J(null),onEarnXP:t}):e.jsxs("div",{className:"h-full overflow-y-auto px-4 sm:px-6 xl:px-10 pb-8 scrollbar-hide scroll-smooth relative",onScroll:d=>b(d.currentTarget.scrollTop>100),children:[e.jsx(Ta,{isOpen:W,onClose:()=>o(!1),onClaim:q,weekRewards:i,todayReward:y,canClaim:z,isClaiming:D,claimedDays:se,currentDayIndex:Qe(),streakCount:Z,timeUntilReset:ge}),e.jsxs("div",{className:"flex flex-col lg:flex-row justify-between items-start lg:items-center py-6 gap-6",children:[e.jsxs("div",{className:"flex-1 max-w-3xl",children:[e.jsx("h1",{className:"text-[36px] md:text-[44px] font-display font-black text-[#202124] tracking-tight leading-[1.1] mb-4",children:"Curriculum Modules"}),e.jsx("p",{className:"text-[#3c4043] text-[16px] md:text-[17px] leading-[1.7] md:pr-10",children:"MathPulse AI loads modules directly from DepEd Strengthened SHS curriculum guides with AI-powered RAG lesson generation. Currently available: General Mathematics, Business Mathematics, and Statistics & Probability. Pre-Calculus and Basic Calculus modules are coming soon once teaching module PDFs are sourced."}),e.jsx("div",{className:"mt-4 inline-flex items-center rounded-full border border-sky-200 bg-sky-50 px-4 py-2 text-sm font-bold text-sky-900",children:Q})]}),e.jsx("div",{className:"flex flex-shrink-0 items-center justify-center lg:justify-end w-full lg:w-[350px] mt-4 lg:mt-0",children:e.jsx(Na,{})})]}),e.jsxs("div",{className:`sticky top-0 z-30 -mx-4 px-4 sm:-mx-6 sm:px-6 xl:-mx-10 xl:px-10 pt-3 pb-3 space-y-3 transition-colors duration-300 ${M?"bg-[#f8faff] border-b border-[#dde3eb] shadow-sm":"bg-transparent"}`,children:[e.jsxs("div",{className:"flex flex-col lg:flex-row items-center gap-3 w-full",children:[e.jsxs("div",{className:"relative flex-1 w-full",children:[e.jsx("div",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-[#5f6368]",children:e.jsx(gs,{size:16,strokeWidth:2.5})}),e.jsx("input",{id:"modules-search",name:"modules-search","aria-label":"Search modules",type:"text",value:E,onChange:d=>T(d.target.value),placeholder:"Search modules, lessons, or assessments...",className:"w-full pl-10 pr-10 py-2 rounded-xl border border-[#dadce0] bg-white text-[#202124] text-[13px] font-medium focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all shadow-sm"}),!1]}),e.jsxs("div",{className:"flex flex-wrap md:flex-nowrap items-center gap-2 w-full lg:w-auto shrink-0",children:[e.jsxs("select",{value:n,onChange:d=>$(d.target.value),className:"w-full md:w-auto rounded-xl border border-slate-200 bg-white pl-3 pr-8 py-2 text-xs font-semibold text-slate-700 focus:border-sky-400 focus:outline-none shadow-sm","aria-label":"Subject",children:[e.jsx("option",{value:"all",children:"All Subjects"}),ee.map(d=>e.jsx("option",{value:d,children:dt[d].label},d))]}),e.jsx("select",{value:f,onChange:d=>F(d.target.value),className:"w-full md:w-auto rounded-xl border border-slate-200 bg-white pl-3 pr-8 py-2 text-xs font-semibold text-slate-700 focus:border-sky-400 focus:outline-none shadow-sm","aria-label":"Quarter",children:Ba.map(d=>e.jsx("option",{value:d,children:d==="all"?"All Quarters":d},d))}),e.jsxs("select",{value:P,onChange:d=>R(d.target.value),className:"w-full md:w-auto rounded-xl border border-slate-200 bg-white pl-3 pr-8 py-2 text-xs font-semibold text-slate-700 focus:border-sky-400 focus:outline-none shadow-sm","aria-label":"Competency Group",children:[e.jsx("option",{value:"all",children:"All Competencies"}),fe.map(d=>e.jsx("option",{value:d,children:d},d))]}),e.jsxs("button",{type:"button",onClick:Y,className:"inline-flex w-full md:w-auto items-center justify-center gap-1.5 rounded-xl border border-slate-200 bg-white px-3 py-2 text-xs font-bold text-slate-700 transition-colors hover:bg-slate-50 shadow-sm shrink-0",children:[e.jsx(ys,{size:14}),"Reset"]})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex items-center bg-slate-100/80 p-1 rounded-full border border-slate-200/60 shadow-inner gap-1 overflow-x-auto no-scrollbar",children:[{id:"modules",label:"Modules",icon:ze,color:"text-[#1FA7E1]"},{id:"recommended",label:"Recommended",icon:$e,color:"text-[#75D06A]"}].map(d=>{const B=l===d.id;return e.jsxs("button",{onClick:()=>m(d.id),className:`relative flex items-center gap-1.5 px-4 py-1.5 rounded-full text-[13px] font-bold transition-all duration-300 flex-shrink-0 ${B?"shadow-sm":"text-slate-500 hover:text-slate-700 hover:bg-slate-200/50"}`,children:[B&&e.jsx(v.div,{layoutId:"modulesTabBackground",className:"absolute inset-0 bg-white rounded-full shadow-[0_2px_15px_-3px_rgba(0,0,0,0.1)] border border-slate-100",transition:{type:"spring",bounce:.2,duration:.6}}),e.jsxs("span",{className:`relative z-10 flex items-center gap-1.5 ${B?d.color:""}`,children:[e.jsx(d.icon,{size:15,strokeWidth:B?2.5:2}),d.label]})]},d.id)})}),e.jsxs("div",{className:"flex items-center gap-2 ml-1",children:[l==="modules"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-7 h-7 rounded-lg bg-indigo-50 border border-indigo-100 flex items-center justify-center text-indigo-500",children:e.jsx(xs,{size:15,strokeWidth:2.5})}),e.jsx("span",{className:"font-display font-black text-[15px] text-slate-700 tracking-tight whitespace-nowrap",children:"DepEd Strengthened SHS Modules"})]}),l==="recommended"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-7 h-7 rounded-lg bg-[#75D06A]/10 flex items-center justify-center",children:e.jsx(Ge,{size:15,className:"text-[#75D06A]"})}),e.jsx("span",{className:"font-display font-black text-[15px] text-slate-700 tracking-tight whitespace-nowrap",children:"Suggested Next"})]})]})]})]}),e.jsxs("div",{className:"pt-4",children:[xe.length>0&&e.jsxs("div",{className:"mb-4 rounded-2xl border border-amber-300 bg-amber-50 px-5 py-4 shadow-sm",children:[e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"inline-flex items-center gap-2 text-sm font-black text-amber-900",children:[e.jsx(Dt,{size:15}),"Assessment Focus Areas"]}),e.jsx("p",{className:"mt-1 text-sm text-amber-900/80",children:"Modules are currently prioritized by your latest diagnostic needs."})]}),e.jsxs("button",{type:"button",onClick:()=>m("recommended"),className:"inline-flex items-center gap-1.5 rounded-xl bg-amber-600 px-3 py-2 text-xs font-bold text-white transition-colors hover:bg-amber-700",children:["View Recommended",e.jsx(Ze,{size:14})]})]}),e.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:xe.map((d,B)=>e.jsxs("span",{className:"rounded-full bg-white px-3 py-1 text-xs font-semibold text-amber-900 shadow-sm",children:[B+1,". ",xt[d]]},d))})]}),e.jsx(pe,{mode:"wait",children:e.jsx(v.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.3},className:"pb-8 mt-4",children:l==="modules"?e.jsx(Ra,{modules:j,onSelectModule:J,onPreviewSources:A,isAtRisk:xe.length>0}):e.jsx(qa,{modules:j,fullPool:ue,onSelectModule:J,onPreviewSources:A,isAtRisk:xe.length>0,learningPathContext:ce,learningPathLoading:L})},l)})]}),e.jsx(pe,{children:u&&e.jsxs(v.aside,{initial:{opacity:0,x:24},animate:{opacity:1,x:0},exit:{opacity:0,x:24},transition:{duration:.25},className:"fixed inset-y-0 right-0 z-[80] w-full max-w-xl border-l border-slate-200 bg-white p-6 shadow-2xl",children:[e.jsxs("div",{className:"mb-4 flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-black uppercase tracking-wide text-sky-700",children:"Curriculum Preview"}),e.jsx("h3",{className:"mt-1 text-xl font-black text-slate-900",children:u.title}),e.jsxs("p",{className:"mt-1 text-sm text-slate-600",children:[u.active_grade_level," · ",u.subject," · ",u.quarter]})]}),e.jsx("button",{type:"button",onClick:()=>A(null),className:"rounded-lg border border-slate-200 p-2 text-slate-500 hover:bg-slate-50",children:e.jsx(me,{size:16})})]}),e.jsxs("div",{className:"space-y-4 overflow-y-auto pr-1",children:[e.jsxs("div",{className:"rounded-2xl border border-slate-200 bg-slate-50 p-4",children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-wide text-slate-500",children:"Competency Group"}),e.jsx("p",{className:"mt-1 text-sm font-semibold text-slate-800",children:u.competency_group})]}),e.jsxs("div",{className:"rounded-2xl border border-slate-200 p-4",children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-wide text-slate-500",children:"Performance Standard"}),e.jsx("p",{className:"mt-1 text-sm text-slate-700",children:u.performance_standard})]}),e.jsxs("div",{className:"rounded-2xl border border-slate-200 p-4",children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-wide text-slate-500",children:"Competencies"}),e.jsx("div",{className:"mt-2 space-y-2",children:u.competencies.map(d=>e.jsxs("div",{className:"rounded-xl border border-slate-100 bg-slate-50 p-3",children:[e.jsx("p",{className:"text-xs font-black text-slate-600",children:d.code}),e.jsx("p",{className:"mt-1 text-sm text-slate-700",children:d.outcome})]},d.code))})]}),e.jsxs("div",{className:"rounded-2xl border border-slate-200 p-4",children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-wide text-slate-500",children:"Sources"}),e.jsx("div",{className:"mt-2 space-y-2",children:u.module_sources.map(d=>e.jsxs("a",{href:d.url,target:"_blank",rel:"noreferrer",className:"flex items-center justify-between rounded-xl border border-slate-100 px-3 py-2 text-sm font-semibold text-slate-700 hover:bg-slate-50",children:[e.jsx("span",{children:d.title}),e.jsx(ms,{size:14,className:"text-slate-400"})]},d.id))})]})]})]})})]})},Ra=({modules:t,onSelectModule:a,onPreviewSources:c,isAtRisk:x=!1})=>e.jsx("div",{className:"pr-2 space-y-8",children:e.jsx("div",{children:t.length===0?e.jsxs("div",{className:"bg-white rounded-2xl border border-[#dde3eb] p-8 text-center",children:[e.jsx("p",{className:"text-slate-700 font-semibold",children:"No matching modules found."}),e.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"If modules are not yet available for your selected view, this area will unlock after assessment sync and content rollout."})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 gap-6",children:t.map((r,l)=>e.jsx(Ue,{module:r,index:l,onClick:()=>a(r),onPreviewSources:()=>c(r),isAtRisk:x},r.id))})})}),qa=({modules:t,fullPool:a,onSelectModule:c,onPreviewSources:x,isAtRisk:r=!1,learningPathContext:l=null,learningPathLoading:m=!1})=>{const _=t.filter(p=>p.progress>0&&p.progress<100),S=(t.length>0?t:a).filter(p=>p.progress===0).slice(0,6);return e.jsxs("div",{className:"pr-2 space-y-10",children:[m&&e.jsxs("div",{className:"mb-6 rounded-2xl border border-sky-200 bg-sky-50 px-5 py-4 flex items-center gap-3",children:[e.jsx("div",{className:"w-5 h-5 rounded-full border-2 border-sky-400 border-t-transparent animate-spin flex-shrink-0"}),e.jsx("p",{className:"text-sm font-semibold text-sky-800",children:"Building your personalized learning path from DepEd curriculum..."})]}),l&&!m&&e.jsxs("div",{className:"mb-6 rounded-2xl border border-indigo-200 bg-gradient-to-br from-indigo-50 to-purple-50 px-5 py-4 shadow-sm",children:[e.jsx("p",{className:"text-xs font-black uppercase tracking-wide text-indigo-700 mb-2",children:"📚 Your Personalized Learning Path"}),e.jsx("pre",{className:"whitespace-pre-wrap text-sm text-indigo-900 font-medium leading-relaxed font-sans",children:l})]}),_.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx("div",{className:"w-10 h-10 rounded-[14px] bg-[#FF8B8B]/10 flex items-center justify-center text-[20px] shadow-inner",children:"🔥"}),e.jsx("h2",{className:"font-display font-black text-[24px] text-slate-800 tracking-tight",children:"Continue This Module"})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 gap-6",children:_.slice(0,4).map((p,w)=>e.jsx(Ue,{module:p,index:w,onClick:()=>c(p),onPreviewSources:()=>x(p),isAtRisk:r,badgeLabel:"In Progress"},p.id))})]}),e.jsx("div",{children:S.length===0?e.jsx("div",{className:"bg-white rounded-2xl border border-[#dde3eb] p-8 text-center text-slate-500 font-medium",children:"You are all caught up. Practice more quizzes to unlock additional recommendations."}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 gap-6",children:S.map((p,w)=>e.jsx(Ue,{module:p,index:w,onClick:()=>c(p),onPreviewSources:()=>x(p),isAtRisk:r,badgeLabel:"Start"},p.id))})})]})};export{Dr as default}; diff --git a/assets/ProfileModal-CCkbSstb.js b/assets/ProfileModal-D0s9Ytgo.js similarity index 96% rename from assets/ProfileModal-CCkbSstb.js rename to assets/ProfileModal-D0s9Ytgo.js index c74919ed5c4d4dc7302cdac3a0b189e583a745ca..09ec0c83d3d07160c242551c893ac4ab808823e7 100644 --- a/assets/ProfileModal-CCkbSstb.js +++ b/assets/ProfileModal-D0s9Ytgo.js @@ -1,4 +1,4 @@ -import{r,j as e}from"./vendor-react-B4AQeu28.js";import{B as c}from"./button-BSRmUN27.js";import{I as l}from"./input-B3NSXxdz.js";import{c as w,h as M,m as N,ao as P,at as A}from"./index-fWY85Kyg.js";import{P as R,G as U}from"./ProfilePictureUploader-BVT_TKTZ.js";import{X as B}from"./x-BLLfAvOF.js";import{U as u}from"./users-CX_H_2cY.js";import{M as D}from"./mail-BS9lcBqF.js";import{A as b}from"./award-DBHp-ybd.js";import{B as k}from"./book-open-D5mR6gz9.js";import{C as F}from"./calendar-ClpJmmLI.js";import{S as T}from"./save-_nGsRc5b.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-markdown-yqZQ_iQm.js";import"./minus-Db4XvxwC.js";import"./plus-CRabOymo.js";import"./upload-DodiG981.js";/** +import{r,j as e}from"./vendor-react-B4AQeu28.js";import{B as c}from"./button-C6pFOjcg.js";import{I as l}from"./input-DtBdbulD.js";import{c as w,h as M,m as N,an as P,as as A}from"./index-Du57tmo9.js";import{P as R,G as U}from"./ProfilePictureUploader-CmusgPWl.js";import{X as B}from"./x-Cwkkamrh.js";import{U as u}from"./users--M0GUX5u.js";import{M as D}from"./mail-B4r1HZjf.js";import{A as b}from"./award-ZQxHm68j.js";import{B as k}from"./book-open-cmOvedFO.js";import{C as F}from"./calendar-DguKdDEr.js";import{S as T}from"./save-BYv1sqTn.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-markdown-yqZQ_iQm.js";import"./minus-DyrqHtmD.js";import"./plus-gReuWg-C.js";import"./upload-CONq3UoZ.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ProfilePictureUploader-BVT_TKTZ.js b/assets/ProfilePictureUploader-CmusgPWl.js similarity index 99% rename from assets/ProfilePictureUploader-BVT_TKTZ.js rename to assets/ProfilePictureUploader-CmusgPWl.js index f6a3f6fc2d999c285046ebc9dc53750f5b44fa91..f51e8fc59745a8fd619a61a012b2f78312bec04b 100644 --- a/assets/ProfilePictureUploader-BVT_TKTZ.js +++ b/assets/ProfilePictureUploader-CmusgPWl.js @@ -1,4 +1,4 @@ -import{c as ue,f as B,O as q,au as ge,av as ve,u as we,w as xe,x as ye,y as be,h as Ce,m as V,t as K}from"./index-fWY85Kyg.js";import{g as Pe,r as v,j as p}from"./vendor-react-B4AQeu28.js";import{_ as Re,B as b,E as Ee,G as Se,H as _e,J as ze}from"./vendor-radix-DnWAlVSW.js";import{B as J}from"./button-BSRmUN27.js";import{updateProfile as De}from"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import{r as Me,u as Ae,a as Ne}from"./vendor-firebase-storage-DNmrKfQ-.js";import{X as Te}from"./x-BLLfAvOF.js";import{M as je}from"./minus-Db4XvxwC.js";import{P as Ue}from"./plus-CRabOymo.js";import{U as Fe}from"./upload-DodiG981.js";/** +import{c as ue,f as B,O as q,at as ge,au as ve,u as we,w as xe,x as ye,y as be,h as Ce,m as V,t as K}from"./index-Du57tmo9.js";import{g as Pe,r as v,j as p}from"./vendor-react-B4AQeu28.js";import{_ as Re,B as b,E as Ee,G as Se,H as _e,J as ze}from"./vendor-radix-DnWAlVSW.js";import{B as J}from"./button-C6pFOjcg.js";import{updateProfile as De}from"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import{r as Me,u as Ae,a as Ne}from"./vendor-firebase-storage-DNmrKfQ-.js";import{X as Te}from"./x-Cwkkamrh.js";import{M as je}from"./minus-DyrqHtmD.js";import{P as Ue}from"./plus-gReuWg-C.js";import{U as Fe}from"./upload-CONq3UoZ.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/QuizBattlePage-1dVgBLvH.js b/assets/QuizBattlePage-1dVgBLvH.js new file mode 100644 index 0000000000000000000000000000000000000000..5c6a2fa7ad1ac7a3ab8fb3a06e01968c5d4a4eef --- /dev/null +++ b/assets/QuizBattlePage-1dVgBLvH.js @@ -0,0 +1,111 @@ +import{c as Et,f as x,m as y,d as tt,ao as De,O as rt,ap as Q,F as Va,M as Wa,B as Pe,h as Ke,u as Ua,_ as Ya,E as Xa}from"./index-Du57tmo9.js";import{r as i,j as e,d as Rt}from"./vendor-react-B4AQeu28.js";import{q as wt}from"./quiz_battle_avatar-BXHPSput.js";import{g as Ga,s as ea}from"./subjects-DLaBFkP9.js";import{d as Za,g as Ka,w as ta,o as pa,l as Ct,h as zt,q as It,e as Mt}from"./vendor-firebase-firestore-52DD1vc9.js";import{Z as q,$ as ha,a0 as ba,a1 as Ie,a2 as Ja}from"./vendor-firebase-core-y3En_kpN.js";import{B as A}from"./button-C6pFOjcg.js";import{a as te,b as le,c as ie,e as pe,d as ge,C as aa}from"./card-BdmZcu-T.js";import{f as es,g as ts}from"./vendor-radix-DnWAlVSW.js";import{S as _e,a as Se,b as Ae,c as Ce,d as J}from"./select-BO-JyJ96.js";import{I as as}from"./input-DtBdbulD.js";import{S as sa}from"./switch-YVS1owKs.js";import{S as we}from"./skeleton-08qYl7s6.js";import{T as Bt}from"./target-B_JwHjFq.js";import{V as fa,a as ga,M as ss,b as rs}from"./volume-x-Bj_FF_0v.js";import{C as ns}from"./CompositeAvatar-Col05lJc.js";import{U as ve}from"./users--M0GUX5u.js";import{L as Je}from"./loader-circle-Bluo8e0c.js";import{S as et}from"./sparkles-DseoQb3m.js";import{C as vt}from"./check-BAMSfVKd.js";import{S as jt}from"./swords-Bu0_wc8h.js";import{S as yt}from"./star-BBetp7Wf.js";import{T as kt}from"./trophy-8udS7pQx.js";import{C as Ye}from"./chevron-right-CFOFOVBg.js";import{S as os}from"./shield-check-DJtXN0Ez.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";import"./chart-column-Cqncpeum.js";import"./chevron-up-Dmffgx6p.js";import"./avatarData-BuQSOXo3.js";/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ls=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]],ra=Et("clock-3",ls);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const is=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],na=Et("history",is);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ds=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],cs=Et("pause",ds),Xe=({width:a,x:r,delay:n,duration:c})=>{const d=["#9956DE","#7274ED","#1FA7E1","#6ED1CF","#75D06A","#FFB356","#FF8B8B","#FB96BB"],l=d[Math.floor(Math.random()*d.length)],w=Math.floor(Math.random()*10)+1;return e.jsx(y.div,{style:{"--x":`${r}`,"--width":`${a}`,"--aspect-ratio":`${w}`,"--background":`linear-gradient(${l}cc, transparent)`},className:"absolute left-[var(--x)] top-0 [aspect-ratio:1/var(--aspect-ratio)] [background:var(--background)] [width:var(--width)]",initial:{y:"100cqmax",x:"-50%"},animate:{y:"-100%",x:"-50%"},transition:{duration:c,delay:n,repeat:Number.POSITIVE_INFINITY,ease:"linear"}})},oa=({children:a,perspective:r=100,className:n,bgVideo:c,beamsPerSide:d=6,beamSize:l=4,beamDelayMax:w=1.5,beamDelayMin:z=0,beamDuration:g=4,gridColor:k="rgba(100, 116, 139, 0.08)",...b})=>{const j=i.useCallback(()=>{const S=[],Y=Math.floor(100/l)/d;for(let ae=0;aej(),[j]),u=i.useMemo(()=>j(),[j]),v=i.useMemo(()=>j(),[j]),U=i.useMemo(()=>j(),[j]);return e.jsxs("div",{className:x("relative w-full h-full",n),...b,children:[c?e.jsx("video",{autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"pointer-events-none absolute inset-0 w-full h-full object-cover -z-10",src:c}):e.jsxs("div",{style:{"--perspective":`${r}px`,"--grid-color":k,"--beam-size":`${l}%`},className:"pointer-events-none absolute inset-0 overflow-hidden [clip-path:inset(0)] [container-type:size] [perspective:var(--perspective)] [transform-style:preserve-3d] -z-10 bg-[#42389d]",children:[e.jsx("div",{className:"absolute [transform-style:preserve-3d] [background-size:var(--beam-size)_var(--beam-size)] [background:linear-gradient(var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_-0.5px_/var(--beam-size)_var(--beam-size),linear-gradient(90deg,_var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_50%_/var(--beam-size)_var(--beam-size)] [container-type:inline-size] [height:100cqmax] [transform-origin:50%_0%] [transform:rotateX(-90deg)] [width:100cqi]",children:h.map((S,E)=>e.jsx(Xe,{width:`${l}%`,x:`${S.x*l}%`,delay:S.delay,duration:g},`top-${E}`))}),e.jsx("div",{className:"absolute top-full [transform-style:preserve-3d] [background-size:var(--beam-size)_var(--beam-size)] [background:linear-gradient(var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_-0.5px_/var(--beam-size)_var(--beam-size),linear-gradient(90deg,_var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_50%_/var(--beam-size)_var(--beam-size)] [container-type:inline-size] [height:100cqmax] [transform-origin:50%_0%] [transform:rotateX(-90deg)] [width:100cqi]",children:v.map((S,E)=>e.jsx(Xe,{width:`${l}%`,x:`${S.x*l}%`,delay:S.delay,duration:g},`bottom-${E}`))}),e.jsx("div",{className:"absolute left-0 top-0 [transform-style:preserve-3d] [background-size:var(--beam-size)_var(--beam-size)] [background:linear-gradient(var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_-0.5px_/var(--beam-size)_var(--beam-size),linear-gradient(90deg,_var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_50%_/var(--beam-size)_var(--beam-size)] [container-type:inline-size] [height:100cqmax] [transform-origin:0%_0%] [transform:rotate(90deg)_rotateX(-90deg)] [width:100cqh]",children:U.map((S,E)=>e.jsx(Xe,{width:`${l}%`,x:`${S.x*l}%`,delay:S.delay,duration:g},`left-${E}`))}),e.jsx("div",{className:"absolute right-0 top-0 [transform-style:preserve-3d] [background-size:var(--beam-size)_var(--beam-size)] [background:linear-gradient(var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_-0.5px_/var(--beam-size)_var(--beam-size),linear-gradient(90deg,_var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_50%_/var(--beam-size)_var(--beam-size)] [container-type:inline-size] [height:100cqmax] [width:100cqh] [transform-origin:100%_0%] [transform:rotate(-90deg)_rotateX(-90deg)]",children:u.map((S,E)=>e.jsx(Xe,{width:`${l}%`,x:`${S.x*l}%`,delay:S.delay,duration:g},`right-${E}`))})]}),e.jsx("div",{className:"relative z-10 w-full h-full",children:a})]})},us=15e3,ms="mathpulse.quizBattle.local",la="".toLowerCase()==="true",nt=typeof window<"u",at=()=>nt&&!1,Tt=()=>{const a=rt.currentUser?.uid;return a||"local-student"},wa=a=>`${ms}.${a}`,Qe=a=>{const r={stats:Me(a),history:[],queueStatus:"idle"};if(!nt)return r;try{const n=window.localStorage.getItem(wa(a));if(!n)return r;const c=JSON.parse(n),d=Array.isArray(c.history)?c.history.map(w=>Ft(w.matchId||"local-match",w)):[];return{stats:c.stats?{...Me(a),...c.stats,userId:a,updatedAt:st(c.stats.updatedAt)}:Me(a),history:d,queueStatus:c.queueStatus==="queued"||c.queueStatus==="matched"?c.queueStatus:"idle"}}catch(n){return console.error("Error reading local Quiz Battle fallback store:",n),r}},va=(a,r)=>{if(nt)try{window.localStorage.setItem(wa(a),JSON.stringify(r))}catch(n){console.error("Error writing local Quiz Battle fallback store:",n)}},ja=a=>{const r=a||{},n=typeof r.code=="string"?r.code:"";return n?n.startsWith("functions/")?n.replace("functions/",""):n:""},ce=a=>{if(!at())return!1;const r=ja(a);if(["internal","not-found","unavailable","deadline-exceeded"].includes(r))return!0;const n=a||{},c=(typeof n.message=="string"?n.message:a instanceof Error?a.message:"").toLowerCase();return c?c.includes("cors policy")||c.includes("no access-control-allow-origin")||c.includes("failed to fetch")||c.includes("network error")||c.includes("err_failed"):!1},Ge=(a,r)=>Math.floor(Math.random()*(r-a+1))+a,xs=(a,r)=>{const n=Math.max(3,a),c=r==="easy"?0:r==="medium"?1:r==="hard"?2:1,d=Ge(Math.max(0,n-3-c),n),l=Ge(Math.max(0,n-4+c),n),w=Math.min(n,Math.max(0,d)),z=Math.min(n,Math.max(0,l)),g=Math.max(0,Math.min(100,w/n*100+Ge(-8,6))),k=Ge(1800,6200);return{scoreFor:w,scoreAgainst:z,accuracy:g,averageResponseMs:k}},ps=a=>{const r=Tt(),n=Qe(r),c=`local-bot-${Date.now()}-${Math.random().toString(16).slice(2,8)}`,d=xs(a.rounds,a.botDifficulty),l=d.scoreFor>d.scoreAgainst?"win":d.scoreFor0?u/h*100:0,averageAccuracy:h>0?(n.stats.averageAccuracy*n.stats.matchesPlayed+d.accuracy)/h:d.accuracy,averageResponseMs:h>0?Math.round((n.stats.averageResponseMs*n.stats.matchesPlayed+d.averageResponseMs)/h):d.averageResponseMs,currentStreak:S,bestStreak:E,favoriteTopicId:a.topicId,leaderboardScore:n.stats.leaderboardScore+j.xpEarned,updatedAt:w};return va(r,{stats:Y,history:[j,...n.history].slice(0,50),queueStatus:"idle"}),{success:!0,matchId:c,status:"ready",botDifficulty:a.botDifficulty}},ya=a=>{const r=Tt(),n=Qe(r);va(r,{...n,queueStatus:a})},hs=()=>Math.random().toString(36).slice(2,8).toUpperCase(),Pt=a=>{const r=Tt();return{roomId:`local-room-${Date.now()}`,roomCode:a||hs(),ownerStudentId:r,participantIds:[r],participantCount:1,status:"waiting",subjectId:"gen-math",topicId:"functions",difficulty:"medium",rounds:5,timePerQuestionSec:30,isOwner:!0}},ka=()=>nt&&!!rt.currentUser?.uid&&!!De,Na=(a,r,n)=>`quizBattlePresence/${a}/${r}/${n}`,bs=async(a,r)=>{if(!ka()||!r.trim()||!De)return;const n=rt.currentUser?.uid;if(!n)return;const c=ha(De,Na(a,r,n));try{await ba(c,{studentId:n,scope:a,resourceId:r,online:!0,heartbeatAt:Ie(),updatedAt:Ie()}),await Ja(c).update({online:!1,updatedAt:Ie(),disconnectedAt:Ie()})}catch(d){console.warn("Realtime presence connect failed:",d)}},fs=async(a,r)=>{if(!ka()||!r.trim()||!De)return;const n=rt.currentUser?.uid;if(!n)return;const c=ha(De,Na(a,r,n));try{await ba(c,{studentId:n,scope:a,resourceId:r,online:!1,updatedAt:Ie(),disconnectedAt:Ie()})}catch(d){console.warn("Realtime presence disconnect failed:",d)}},H=(a,r)=>{const n=`Unable to continue while ${a}. Please try again.`;if(r instanceof Error&&r.message.startsWith("Timed out while"))return r.message;const c=r||{},d=ja(r),l=typeof c.message=="string"?c.message.trim():"";return d==="unauthenticated"?"Your session has expired. Sign in again before starting a battle.":d==="permission-denied"?"Only student accounts can access Quiz Battle matchmaking.":d==="invalid-argument"?l||"Battle setup is invalid. Review the selected options and try again.":d==="already-exists"?l||"This room is already full. Try another room code.":d==="failed-precondition"?l||"Battle state changed. Please refresh and continue.":d==="unavailable"||d==="internal"||d==="not-found"||d==="deadline-exceeded"?/question generation temporarily unavailable/i.test(l)?l:"Quiz Battle service is temporarily unavailable. Please retry in a moment.":n},L=async(a,r,n=us)=>{let c;try{return await Promise.race([r,new Promise((d,l)=>{c=setTimeout(()=>{l(new Error(`Timed out while ${a}. Please try again.`))},n)})])}finally{c&&clearTimeout(c)}},st=a=>{if(!a)return new Date;if(a instanceof Date)return a;if(typeof a=="string"){const r=Date.parse(a);return Number.isNaN(r)?new Date:new Date(r)}if(typeof a=="number")return new Date(a);if(typeof a=="object"){const r=a;if(typeof r.toDate=="function")return r.toDate();if(typeof r.seconds=="number")return new Date(r.seconds*1e3)}return new Date},gs=()=>({mode:"online",subjectId:"gen-math",topicId:"",difficulty:"medium",rounds:5,timePerQuestionSec:30,queueType:"public_matchmaking",botDifficulty:"medium",adaptiveBot:!1}),ws=a=>{const r=[];return a.subjectId.trim()||r.push({field:"subjectId",message:"Choose a category before starting."}),a.topicId.trim()||r.push({field:"topicId",message:"Choose a strand or topic before starting."}),(a.rounds<3||a.rounds>20)&&r.push({field:"rounds",message:"Questions must be between 3 and 20."}),(a.timePerQuestionSec<10||a.timePerQuestionSec>180)&&r.push({field:"timePerQuestionSec",message:"Timer must be between 10s and 180s."}),a.mode==="bot"&&a.queueType!=="public_matchmaking"&&r.push({field:"queueType",message:"Bot battles use instant start and do not support private room mode."}),r},Me=a=>({userId:a,matchesPlayed:0,wins:0,losses:0,draws:0,winRate:0,averageAccuracy:0,averageResponseMs:0,bestStreak:0,currentStreak:0,favoriteTopicId:void 0,leaderboardScore:0,updatedAt:new Date}),vs=async a=>{try{const r=Za(tt,"studentBattleStats",a),n=await Ka(r),c=at()?Qe(a).stats:null;if(!n.exists())return c&&c.matchesPlayed>0?c:Me(a);const d=n.data(),l={...Me(a),...d,userId:a,updatedAt:st(d.updatedAt)};return c&&c.matchesPlayed>l.matchesPlayed?c:l}catch(r){if(console.error("Error loading battle stats:",r),at()){const n=Qe(a).stats;if(n.matchesPlayed>0)return n}return Me(a)}},Ft=(a,r)=>({matchId:r.matchId||a,mode:r.mode||"online",status:r.status||"completed",subjectId:r.subjectId||"gen-math",topicId:r.topicId||"unknown-topic",difficulty:r.difficulty||"medium",rounds:r.rounds||0,timePerQuestionSec:r.timePerQuestionSec||0,scoreFor:r.scoreFor||0,scoreAgainst:r.scoreAgainst||0,outcome:r.outcome||"draw",accuracy:r.accuracy||0,averageResponseMs:r.averageResponseMs||0,bestStreak:r.bestStreak||0,xpEarned:r.xpEarned||0,opponentName:r.opponentName||"Unknown opponent",opponentType:r.opponentType||"student",createdAt:st(r.createdAt),endedAt:st(r.endedAt)}),js=async(a,r={})=>{const n=r.limitCount||25,c=at()?Qe(a).history:[],d=w=>w.filter(g=>!(r.mode&&r.mode!=="all"&&g.mode!==r.mode||r.subjectId&&g.subjectId!==r.subjectId||r.startDate&&g.endedAtr.endDate)).sort((g,k)=>k.endedAt.getTime()-g.endedAt.getTime()).slice(0,n),l=w=>{if(c.length===0)return d(w);const z=new Map;return[...c,...w].forEach(g=>{z.set(g.matchId,g)}),d(Array.from(z.values()))};try{const w=[ta("studentId","==",a),pa("endedAt","desc"),Ct(n)],g=(await zt(It(Mt(tt,"quizBattleHistory"),...w))).docs.map(k=>Ft(k.id,k.data()));return l(g)}catch(w){try{const g=(await zt(It(Mt(tt,"quizBattleHistory"),ta("studentId","==",a),Ct(n)))).docs.map(k=>Ft(k.id,k.data())).sort((k,b)=>b.endedAt.getTime()-k.endedAt.getTime());return l(g)}catch(z){return console.error("Error loading battle history:",w,z),d(c)}}},ys=async a=>{const r=q(Q,"quizBattleJoinQueue");try{return(await L("joining Quiz Battle matchmaking queue",r({setup:a}))).data}catch(n){if(ce(n))return ya("queued"),{success:!0,status:"queued",queueEntryId:`local-queue-${Date.now()}`};throw new Error(H("joining Quiz Battle matchmaking queue",n))}},ia=async()=>{const a=q(Q,"quizBattleLeaveQueue");try{return(await L("leaving Quiz Battle matchmaking queue",a({}))).data}catch(r){if(ce(r))return ya("idle"),{success:!0,status:"idle"};throw new Error(H("leaving Quiz Battle matchmaking queue",r))}},ks=async a=>{const r=q(Q,"quizBattleCreatePrivateRoom");try{return(await L("creating Quiz Battle private room",r({setup:a}))).data}catch(n){if(ce(n))return{success:!0,room:Pt()};throw new Error(H("creating Quiz Battle private room",n))}},Ns=async a=>{const r=q(Q,"quizBattleJoinPrivateRoom");try{return(await L("joining Quiz Battle private room",r({roomCode:a}),2e4)).data}catch(n){if(ce(n))return{success:!0,room:Pt(a.trim().toUpperCase()||void 0)};throw new Error(H("joining Quiz Battle private room",n))}},_s=async a=>{const r=q(Q,"quizBattleGetPrivateRoomState");try{return(await L("loading Quiz Battle private room state",r(a),2e4)).data}catch(n){if(ce(n))return{success:!0,room:Pt(a.roomCode?.trim().toUpperCase()||void 0)};throw new Error(H("loading Quiz Battle private room state",n))}},Ss=async(a={})=>{const r=q(Q,"quizBattleLeavePrivateRoom");try{return(await L("leaving Quiz Battle private room",r(a),2e4)).data}catch(n){if(ce(n))return{success:!0,status:"idle"};throw new Error(H("leaving Quiz Battle private room",n))}},da=async()=>{const a=q(Q,"quizBattleResumeSession");try{return(await L("resuming Quiz Battle session",a({}),2e4)).data}catch(r){if(ce(r))return{success:!0,sessionType:"idle"};throw new Error(H("resuming Quiz Battle session",r))}},As=async(a,r)=>{if(!r.trim())return;const n=q(Q,"quizBattleHeartbeat");await bs(a,r);try{await L("sending Quiz Battle heartbeat",n({scope:a,resourceId:r}),12e3)}catch(c){if(!ce(c))throw new Error(H("sending Quiz Battle heartbeat",c))}},Cs=async a=>{const r=q(Q,"quizBattleCreateBotMatch");try{return(await L("starting Quiz Battle bot match",r({setup:a}))).data}catch(n){if(ce(n))return ps(a);throw new Error(H("starting Quiz Battle bot match",n))}},zs=async a=>{const r=q(Q,"quizBattleGetGenerationAudit");return(await L("verifying Quiz Battle generation metadata",r({matchId:a}),2e4)).data},de=async a=>{const r=q(Q,"quizBattleStartMatch");try{const c=(await L("starting Quiz Battle match",r({matchId:a}),2e4)).data.match;if(c.mode==="online")try{const d=await zs(a);if(la&&!d.isAiSource)throw new Error(`Quiz Battle generation audit failed: expected AI source, got "${d.questionSetSource||"unknown"}".`)}catch(d){if(d instanceof Error&&d.message.startsWith("Quiz Battle generation audit failed"))throw d;if(console.warn("Quiz Battle generation audit unavailable:",d),la)throw new Error("Unable to verify Quiz Battle generation metadata. Please retry in a moment.")}return c}catch(n){throw new Error(H("starting Quiz Battle match",n))}},Nt=async a=>{const r=q(Q,"quizBattleGetMatchState");try{return(await L("loading Quiz Battle match state",r({matchId:a}),2e4)).data.match}catch(n){throw new Error(H("loading Quiz Battle match state",n))}},Is=async a=>{const r=q(Q,"quizBattleSubmitAnswer");try{return(await L("submitting Quiz Battle answer",r({...a,idempotencyKey:a.idempotencyKey||`client-${Date.now()}-${Math.random().toString(16).slice(2,8)}`}),2e4)).data}catch(n){throw new Error(H("submitting Quiz Battle answer",n))}},Ms=async a=>{const r=q(Q,"quizBattleRequestRematch");try{return(await L("creating Quiz Battle rematch",r({matchId:a}),2e4)).data}catch(n){throw new Error(H("creating Quiz Battle rematch",n))}},Bs=async(a=20)=>{try{const r=It(Mt(tt,"studentBattleLeaderboard"),pa("leaderboardScore","desc"),Ct(a));return(await zt(r)).docs.map((c,d)=>{const l=c.data();return{userId:l.userId||c.id,displayName:l.displayName||"Student",photo:l.photo,rank:l.rank||d+1,leaderboardScore:l.leaderboardScore||0,winRate:l.winRate||0,bestStreak:l.bestStreak||0}})}catch(r){return console.error("Error loading Quiz Battle leaderboard:",r),[]}};function Fs({className:a,...r}){return e.jsx(es,{"data-slot":"tabs",className:x("flex flex-col gap-2",a),...r})}function ze({className:a,...r}){return e.jsx(ts,{"data-slot":"tabs-content",className:x("flex-1 outline-none",a),...r})}const _a=Rt.memo(({playerRoundStreak:a,playerVisualMultiplier:r,liveXpEarned:n,activeMatch:c,subjects:d,battleSoundEnabled:l,onToggleSound:w,isFullscreen:z,onToggleFullscreen:g,isDesignPauseAvailable:k,onTogglePause:b})=>e.jsxs("header",{className:"flex items-center justify-between shrink-0 h-16 relative gap-4",children:[e.jsx("div",{className:"flex items-center min-w-0",children:e.jsxs("div",{className:"flex items-center gap-3 md:gap-4 px-4 py-2 md:px-5 md:py-2.5 rounded-full bg-white/5 border border-white/10 backdrop-blur-md min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-amber-400 font-bold text-sm shrink-0",children:[e.jsx(Va,{className:"w-4 h-4"})," ",a]}),e.jsx("div",{className:"w-px h-4 bg-white/10 shrink-0"}),e.jsxs("div",{className:"flex items-center gap-1.5 text-violet-300 font-bold text-sm shrink-0",children:[e.jsx(Bt,{className:"w-4 h-4"})," ",r.toFixed(2),"x"]}),e.jsx("div",{className:"w-px h-4 bg-white/10 shrink-0"}),e.jsxs(y.div,{animate:n>0?{scale:[1,1.25,1]}:{},transition:{duration:.35},className:"flex flex-col items-center text-emerald-400 bg-emerald-500/10 px-3 py-0.5 rounded-full border border-emerald-500/20 font-bold shadow-[0_0_10px_rgba(16,185,129,0.15)] shrink-0",children:[e.jsxs("span",{className:"text-sm leading-none tabular-nums",children:[n," pts"]}),e.jsx("span",{className:"text-[8px] leading-none text-emerald-500/70 uppercase tracking-widest font-black whitespace-nowrap",children:"Battle Score"})]},n)]})}),e.jsxs("div",{className:"absolute left-1/2 -translate-x-1/2 hidden md:flex items-center gap-3 bg-black/20 px-5 py-2 rounded-full border border-white/5 min-w-0 max-w-[48%]",children:[e.jsx("div",{className:"w-3.5 h-3.5 rounded-sm bg-orange-400 shadow-[0_0_10px_rgba(251,146,60,0.5)] shrink-0"}),e.jsx("div",{className:"flex flex-col items-start justify-center -space-y-0.5 min-w-0",children:(()=>{if(!c?.topicId)return e.jsx("span",{className:"font-bold text-white/90 tracking-wide text-sm leading-none truncate",children:"Practice Match"});for(const j of d){const h=j.modules?.find(u=>u.id===c.topicId);if(h)return e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-[9px] font-black text-white/40 uppercase tracking-widest leading-none",children:j.title}),e.jsx("span",{className:"font-bold text-white/90 tracking-wide text-sm leading-none pt-1 truncate",children:h.title})]})}return e.jsx("span",{className:"font-bold text-white/90 tracking-wide text-sm leading-none truncate",children:c.topicId.split("-").map(j=>j.charAt(0).toUpperCase()+j.slice(1)).join(" ")})})()})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(A,{variant:"outline",size:"icon",className:"h-12 w-12 rounded-full border-white/20 bg-black/20 hover:bg-white/10 text-white",onClick:w,children:l?e.jsx(fa,{className:"h-5 w-5"}):e.jsx(ga,{className:"h-5 w-5"})}),e.jsx(A,{variant:"outline",size:"icon",className:"h-12 w-12 rounded-full border-white/20 bg-black/20 hover:bg-white/10 text-white",onClick:g,children:z?e.jsx(ss,{className:"h-5 w-5"}):e.jsx(rs,{className:"h-5 w-5"})}),e.jsx(A,{variant:"outline",size:"icon",className:x("h-12 w-12 rounded-full border-white/20 text-white",k?"bg-black/20 hover:bg-white/10":"bg-black/10 opacity-50 cursor-not-allowed"),onClick:b,disabled:!k,children:e.jsx(Wa,{className:"h-5 w-5"})})]})]}));_a.displayName="BattleHeader";const Sa=Rt.memo(({studentProfile:a,activeMatch:r,scorePulseTarget:n,quizBattleAvatar:c})=>e.jsxs("div",{className:"absolute bottom-0 left-0 right-0 w-full xl:max-w-[1400px] mx-auto px-4 md:px-8 shrink-0 h-32 md:h-48 flex justify-between items-end pb-0 pointer-events-none z-30",children:[e.jsxs("div",{className:"flex items-end gap-3 sm:gap-6 relative pointer-events-auto",children:[e.jsx("div",{className:"relative w-28 h-28 md:w-40 md:h-40 rounded-t-[40px] flex items-end",children:e.jsx(ns,{layers:a?.avatarLayers||{},className:"w-full h-full object-contain origin-bottom scale-[1.15]"})}),e.jsxs("div",{className:"bg-black/40 backdrop-blur-xl border border-white/20 rounded-2xl px-4 py-3 md:px-5 shadow-[0_8px_30px_rgba(0,0,0,0.5)] flex items-center gap-3 md:gap-4 mb-4 max-w-[220px] md:max-w-[280px]",children:[e.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[e.jsx("span",{className:"text-white font-black text-base md:text-lg truncate tracking-wide",children:a?.name||"Player"}),e.jsxs("span",{className:"text-xs md:text-sm text-white/50 font-bold uppercase tracking-wider",children:["Level ",a?.level||1]})]}),e.jsx("div",{className:"h-10 w-px bg-white/20"}),e.jsxs("div",{className:"flex flex-col items-center justify-center shrink-0 w-10 md:w-12",children:[e.jsx(y.span,{animate:n==="player"?{scale:[1,1.4,1],color:["#fff","#34d399","#fff"]}:{},transition:{duration:.5},className:"text-2xl md:text-3xl font-black text-white leading-none",children:r.scoreFor}),e.jsx("span",{className:"text-[9px] md:text-[10px] text-emerald-400 font-bold uppercase tracking-widest mt-1 leading-none",children:"Score"})]})]})]}),e.jsxs("div",{className:"flex items-end gap-3 sm:gap-6 relative flex-row-reverse pointer-events-auto",children:[e.jsx("div",{className:"relative w-28 h-28 md:w-40 md:h-40 bg-[#1a2030] rounded-t-[40px] flex items-end justify-center border-t-4 border-slate-700/50 shadow-inner",children:r.mode==="bot"?e.jsx(Pe,{className:"h-16 w-16 md:h-20 md:w-20 text-rose-400 mb-6 drop-shadow-xl",strokeWidth:1.5}):e.jsx(ve,{className:"h-16 w-16 md:h-20 md:w-20 text-slate-500 mb-6 drop-shadow-xl",strokeWidth:1.5})}),e.jsxs("div",{className:"bg-black/40 backdrop-blur-xl border border-white/20 rounded-2xl px-4 py-3 md:px-5 shadow-[0_8px_30px_rgba(0,0,0,0.5)] flex items-center gap-3 md:gap-4 mb-4 flex-row-reverse text-right max-w-[220px] md:max-w-[280px]",children:[e.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[e.jsx("span",{className:"text-white font-black text-base md:text-lg truncate tracking-wide",children:r.opponentName||"Anonymous"}),e.jsx("span",{className:"text-xs md:text-sm text-rose-400 font-bold uppercase tracking-wider",children:r.mode==="bot"?"System Bot":"Challenger"})]}),e.jsx("div",{className:"h-10 w-px bg-white/20"}),e.jsxs("div",{className:"flex flex-col items-center justify-center shrink-0 w-10 md:w-12",children:[e.jsx(y.span,{animate:n==="opponent"?{scale:[1,1.4,1],color:["#fff","#fb7185","#fff"]}:{},transition:{duration:.5},className:"text-2xl md:text-3xl font-black text-white leading-none",children:r.scoreAgainst}),e.jsx("span",{className:"text-[9px] md:text-[10px] text-rose-400 font-bold uppercase tracking-widest mt-1 leading-none",children:"Score"})]})]})]})]}));Sa.displayName="BattleFooter";const Aa=Rt.memo(({activeMatch:a,roundSecondsLeft:r,lastRoundResult:n,selectedOptionIndex:c,roundLocked:d,answerSubmitting:l,designPauseActive:w,onOptionSelect:z,floatingMomentum:g,lastRoundMomentumDelta:k,studentProfile:b,quizBattleAvatar:j})=>e.jsxs("div",{className:"flex-1 flex flex-col justify-center items-center gap-4 md:gap-6 w-full min-h-0 overflow-y-auto pt-4 pb-28 z-20 no-scrollbar",children:[e.jsxs("div",{className:x("relative bg-[#1e2536] border shadow-[0_20px_60px_rgba(0,0,0,0.4)] rounded-[1.5rem] p-5 md:p-6 w-full max-w-4xl text-center flex flex-col items-center",r<=3?"border-rose-400/50":"border-white/10"),children:[e.jsxs("div",{className:"absolute -top-3.5 bg-[#2f3547] border border-white/10 text-white/80 px-4 py-1 rounded-full text-xs font-black shadow-lg uppercase tracking-wider",children:[a.currentRound," / ",a.totalRounds]}),e.jsx(Ke,{children:g&&g.tone==="positive"&&e.jsx(y.div,{initial:{opacity:0,y:14,scale:.92},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.9},className:x("absolute -top-12 rounded-full border px-3 py-1 text-[10px] font-black uppercase tracking-[0.15em] backdrop-blur-lg",g.tone==="positive"?"border-emerald-300/70 bg-emerald-500/20 text-emerald-100":g.tone==="negative"?"border-rose-300/70 bg-rose-500/20 text-rose-100":"border-slate-300/50 bg-slate-500/20 text-slate-100"),children:g.label},g.id)}),e.jsx("p",{className:"text-base sm:text-lg md:text-xl text-white font-extrabold leading-tight tracking-tight mt-1 min-h-[40px] flex items-center justify-center",children:a.currentQuestion?.prompt}),typeof window<"u"&&window.location.search.includes("debug=true")&&a.currentQuestion?.varianceApplied&&e.jsx("div",{className:"flex flex-wrap gap-1 mt-2 justify-center",children:a.currentQuestion.varianceApplied.map(h=>e.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-[10px] font-medium bg-blue-500/20 text-blue-200 border border-blue-400/30",children:h.replace(/_/g," ")},h))})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 md:gap-4 w-full max-w-4xl px-4",children:a.currentQuestion?.choices.map((h,u)=>{const v=c===u,U=l||d,S=!!n&&n.roundNumber===a.currentRound,E=S&&n.correctOptionIndex===u;let Y=-1;if(S)if(a.mode==="bot")if(n.botCorrect)Y=n.correctOptionIndex;else{const V=[0,1,2,3].filter(C=>C!==n.correctOptionIndex);Y=V[n.roundNumber%V.length]}else Y=typeof n.botSelectedIndex=="number"?n.botSelectedIndex:-1;const ae=Y===u;let T="bg-[#1e2433] hover:bg-[#283042] border-[#2f384e] text-white shadow-[0_6px_0_rgba(15,20,30,0.5)]";return S?E?T="bg-emerald-500 text-emerald-950 border-emerald-400 shadow-[0_6px_0_rgba(5,150,105,1)]":v?T="bg-rose-500 text-white border-rose-400 shadow-[0_6px_0_rgba(225,29,72,1)]":T="bg-[#1e2433] opacity-40 border-[#2f384e] shadow-[0_6px_0_rgba(15,20,30,0.5)] text-white":v&&(T="bg-indigo-500 text-white border-indigo-400 shadow-[0_6px_0_rgba(79,70,229,1)]"),e.jsxs(y.button,{whileTap:{y:8,scale:.98},whileHover:!S&&!U?{scale:1.02}:{},disabled:U||d||w,onClick:()=>z(u),className:x("relative h-16 md:h-20 rounded-2xl md:rounded-3xl font-black text-base md:text-lg pl-6 pr-20 border-[2px] border-b-[4px] flex items-center justify-start text-left transition-all disabled:cursor-not-allowed",T,v&&!S?"ring-[4px] ring-white/20 ring-offset-[4px] ring-offset-[#0B0F19]":"",r<=3&&!U&&!S?"shadow-[0_0_0_2px_rgba(251,113,133,0.45),0_6px_0_rgba(127,29,29,1)]":""),children:[e.jsx("span",{className:"mr-3 md:mr-4 text-xs md:text-sm opacity-60 bg-black/20 px-3 py-1 rounded-full",children:String.fromCharCode(65+u)}),e.jsx("span",{className:"line-clamp-2",children:h}),e.jsxs("div",{className:"absolute right-3 md:right-4 flex items-center gap-1.5 md:gap-2",children:[ae&&e.jsx(y.div,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},className:"w-8 h-8 md:w-10 md:h-10 rounded-full border-[3px] border-[#0B0F19] overflow-hidden bg-rose-500 shadow-lg flex items-center justify-center z-10",children:a.mode==="bot"?e.jsx(Pe,{className:"w-4 h-4 md:w-5 md:h-5 text-white"}):e.jsx(ve,{className:"w-4 h-4 md:w-5 md:h-5 text-white"})}),v&&e.jsx(y.div,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},className:"w-8 h-8 md:w-10 md:h-10 rounded-full border-[3px] border-[#0B0F19] overflow-hidden bg-indigo-200 shadow-lg z-20",children:e.jsx("img",{src:b?.photo||j,alt:"You",className:"w-full h-full object-cover"})})]})]},u)})}),e.jsx(Ke,{children:d&&!n&&a.mode==="online"&&e.jsxs(y.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},className:"mt-4 flex flex-col items-center gap-1",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white/70 font-semibold bg-black/30 px-6 py-2 rounded-full border border-white/10",children:[e.jsx(Je,{className:"w-4 h-4 animate-spin text-amber-400"}),"Waiting for opponent..."]}),e.jsx("p",{className:"text-white/30 text-[11px] mt-1",children:"Choices locked until round resolves"})]})}),e.jsx(Ke,{children:n?.studentCorrect&&e.jsx(y.div,{initial:{opacity:0,scale:.8,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:1.1,filter:"blur(10px)"},transition:{type:"spring",damping:20,stiffness:300},className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-[100] pointer-events-none flex flex-col items-center justify-center",children:e.jsxs("div",{className:"bg-[#1e2433]/95 backdrop-blur-xl border border-white/10 rounded-[2rem] p-6 md:p-8 shadow-[0_30px_80px_rgba(0,0,0,0.6)] flex flex-col items-center min-w-[280px] md:min-w-[320px]",children:[e.jsx("img",{src:j,alt:"Mascot",className:"w-24 h-24 md:w-32 md:h-32 mb-4 drop-shadow-xl"}),e.jsx("h2",{className:x("text-3xl md:text-4xl font-black mb-4 uppercase tracking-widest",n.studentCorrect?"text-emerald-400":"text-rose-400"),children:n.studentCorrect?"Correct!":"Incorrect"}),n.studentCorrect?e.jsxs("div",{className:"flex items-center gap-3 w-full justify-center",children:[e.jsx("div",{className:"flex items-center gap-2 bg-emerald-500/20 text-emerald-400 px-4 py-2 rounded-2xl font-bold border border-emerald-500/30",children:e.jsx("span",{children:"+ 10 XP"})}),k!==null&&k>0&&e.jsx("div",{className:"flex items-center gap-2 bg-amber-500/20 text-amber-400 px-4 py-2 rounded-2xl font-bold border border-amber-500/30",children:e.jsxs("span",{children:["+ ",k," ",e.jsx(et,{className:"w-4 h-4 inline"})]})})]}):e.jsxs("div",{className:"bg-rose-500/20 border border-rose-500/30 text-rose-400 font-bold px-5 py-2 rounded-xl text-center",children:["Correct: ",String.fromCharCode(65+n.correctOptionIndex)]})]})})})]}));Aa.displayName="BattleActiveContent";const _t={width:1280,height:720},St=` + @keyframes mascot-float { + 0%, 100% { transform: translateY(0) rotate(-3deg); } + 50% { transform: translateY(-24px) rotate(3deg); } + } + @keyframes vs-pulse { + 0%, 100% { transform: scale(1.1); } + 50% { transform: scale(1.15); } + } + @keyframes avatar-left { + 0%, 100% { transform: translateY(0); } + 50% { transform: translateY(-5px); } + } + @keyframes avatar-right { + 0%, 100% { transform: translateY(0); } + 50% { transform: translateY(-4px); } + } + @keyframes ghost-left { + 0%, 100% { transform: translateY(0); } + 50% { transform: translateY(-3px); } + } + @keyframes ghost-right { + 0%, 100% { transform: translateY(0); } + 50% { transform: translateY(-3px); } + } + @keyframes main-avatar { + 0%, 100% { transform: translateY(0); } + 50% { transform: translateY(-5px); } + } + @keyframes star-float { + 0%, 100% { transform: translateY(-4px); } + 50% { transform: translateY(4px); } + } + @keyframes marquee { + 0% { transform: translateX(0); } + 100% { transform: translateX(-50%); } + } + @keyframes orb-pulse { + 0%, 100% { transform: scale(1); opacity: 0.3; } + 50% { transform: scale(1.2); opacity: 0.6; } + } + @keyframes orb-pulse-delayed { + 0%, 100% { transform: scale(1); opacity: 0.2; } + 50% { transform: scale(1.3); opacity: 0.5; } + } + @keyframes icon-bob { + 0%, 100% { transform: translateY(-3px); } + 50% { transform: translateY(3px); } + } + @keyframes icon-rotate { + 0%, 100% { transform: rotate(-5deg); } + 50% { transform: rotate(5deg); } + } + @keyframes reward-pop { + 0% { transform: scale(0.9) translateY(10px); opacity: 0; } + 100% { transform: scale(1) translateY(0); opacity: 1; } + } + @keyframes score-pop { + 0% { transform: scale(1); } + 50% { transform: scale(1.4); } + 100% { transform: scale(1); } + } + @keyframes overlay-fade-in { + 0% { opacity: 0; } + 100% { opacity: 1; } + } + @keyframes overlay-slide-up { + 0% { transform: translateY(40px) scale(0.85); opacity: 0; } + 100% { transform: translateY(0) scale(1); opacity: 1; } + } + @keyframes badge-float-in { + 0% { transform: translateY(14px) scale(0.92); opacity: 0; } + 100% { transform: translateY(0) scale(1); opacity: 1; } + } + @keyframes badge-float-out { + 0% { transform: translateY(0) scale(1); opacity: 1; } + 100% { transform: translateY(-10px) scale(0.9); opacity: 0; } + } + .animate-mascot-float { animation: mascot-float 4s ease-in-out infinite; } + .animate-vs-pulse { animation: vs-pulse 2s ease-in-out infinite; } + .animate-avatar-left { animation: avatar-left 4s ease-in-out infinite; } + .animate-avatar-right { animation: avatar-right 4s ease-in-out infinite 0.4s; } + .animate-ghost-left { animation: ghost-left 3.5s ease-in-out infinite 0.3s; } + .animate-ghost-right { animation: ghost-right 3.5s ease-in-out infinite 0.6s; } + .animate-main-avatar { animation: main-avatar 3.5s ease-in-out infinite; } + .animate-star-float { animation: star-float 3s ease-in-out infinite; } + .animate-marquee { animation: marquee 15s linear infinite; } + .animate-orb-pulse { animation: orb-pulse 5s ease-in-out infinite; } + .animate-orb-pulse-delayed { animation: orb-pulse-delayed 4s ease-in-out infinite 1.5s; } + .animate-icon-bob { animation: icon-bob 3s ease-in-out infinite; } + .animate-icon-rotate { animation: icon-rotate 4s ease-in-out infinite; } + .animate-reward-pop { animation: reward-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards; } + .animate-score-pop { animation: score-pop 0.5s ease-out forwards; } + .animate-overlay-slide-up { animation: overlay-slide-up 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards; } +`,Es=300*1e3,Rs=({viewportHeight:a})=>e.jsx("div",{className:"absolute inset-0 pointer-events-none z-[50] overflow-hidden flex justify-between bg-slate-900/10",children:i.useMemo(()=>[...Array(40)].map((r,n)=>({id:n,left:`${Math.random()*100}%`,duration:.6+Math.random()*.4,delay:Math.random()*.4})),[a]).map(r=>e.jsx(y.div,{className:"absolute w-0.5 h-16 bg-blue-300/40 rounded-full e-left-top",style:{"--left":r.left,"--top":"-10%"},animate:{y:[0,a*1.2]},transition:{duration:r.duration,ease:"linear",delay:r.delay}},r.id))}),Ts=({viewportHeight:a,viewportWidth:r})=>{const n=i.useMemo(()=>[...Array(30)].map((c,d)=>({id:d,xShift:(Math.random()-.5)*r*.8,yShift:(Math.random()-.5)*a*.8,scale:Math.random()*1.5+.5,duration:2+Math.random()*1.5,delay:Math.random()*.35})),[a,r]);return e.jsx("div",{className:"absolute inset-0 pointer-events-none z-[50] overflow-hidden flex items-center justify-center",children:n.map(c=>e.jsx(y.div,{className:"absolute w-2 h-2 bg-amber-400 rounded-full shadow-[0_0_10px_rgba(251,191,36,0.8)] e-left-top",style:{"--left":"50%","--top":"50%"},animate:{y:[0,c.yShift],x:[0,c.xShift],scale:[0,c.scale,0],opacity:[0,1,0]},transition:{duration:c.duration,ease:"easeOut",delay:c.delay}},c.id))})},ca=({value:a,label:r,delay:n=0,icon:c})=>{const[d,l]=i.useState(0);return i.useEffect(()=>{if(a<=0)return;const w=1e3,z=30,g=Math.abs(Math.floor(w/z));let k=0;const b=setTimeout(()=>{const j=setInterval(()=>{k+=Math.max(1,Math.floor(a/z)),k>=a?(l(a),clearInterval(j)):l(k)},g);return()=>clearInterval(j)},n);return()=>clearTimeout(b)},[a,n]),a<=0?null:e.jsxs(y.div,{initial:{opacity:0,transform:"translateX(-20px)"},animate:{opacity:1,transform:"translateX(0)"},transition:{delay:n/1e3,duration:.5},className:"flex items-center justify-between bg-white/5 border border-white/10 rounded-xl p-3",children:[e.jsxs("div",{className:"flex items-center gap-3 text-white/80 font-bold uppercase tracking-wider text-sm",children:[c,r]}),e.jsxs("div",{className:"text-2xl font-black text-amber-400 tabular-nums",children:["+",d]})]})},O="border border-border bg-card text-card-foreground shadow-sm dark:border-[#2b3140] dark:bg-[#181d27] dark:text-[#f5f7fb] dark:shadow-[0_12px_24px_rgba(0,0,0,0.22)]",Ps=a=>a<=0?"--":`${(a/1e3).toFixed(2)}s`,Ds=a=>a==="win"?"Win":a==="loss"?"Loss":"Draw",Ze=(a,r,n)=>Math.max(r,Math.min(n,a)),ua=a=>{const r=Math.floor(a/60),n=a%60;return`${r}:${String(n).padStart(2,"0")}`},Qs=a=>{const r=a.trim().split(/\s+/).filter(Boolean).slice(0,2);return r.length===0?"ST":r.map(n=>n[0]?.toUpperCase()||"").join("")},ma=(a,r)=>a?a.eventType==="round_started"?`Round ${a.roundNumber} started.`:a.eventType==="answer_locked"?a.lockedByStudentId&&r&&a.lockedByStudentId===r?`Round ${a.roundNumber}: your answer is locked.`:`Round ${a.roundNumber}: opponent answer locked.`:a.eventType==="round_result"?`Round ${a.roundNumber} resolved.`:"Match completed.":null;let At=null;const xa=()=>{if(typeof window>"u")return null;if(!At){const a=window.AudioContext||window.webkitAudioContext;a&&(At=new a)}return At},wr=()=>{const{userProfile:a,userRole:r}=Ua(),n=a,[c,d]=i.useState("hub"),[l,w]=i.useState(gs),[z,g]=i.useState([]),[k,b]=i.useState({status:"idle"}),[j,h]=i.useState(!1),[u,v]=i.useState(null),[U,S]=i.useState(""),[E,Y]=i.useState(null),[ae,T]=i.useState(0),[V,C]=i.useState(null),[ee,Dt]=i.useState(()=>typeof window>"u"?!0:window.localStorage.getItem("quiz_battle_sound_enabled")!=="0"),[he,Ca]=i.useState(()=>{if(typeof window>"u")return .7;const t=Number(window.localStorage.getItem("quiz_battle_sound_volume")||"0.7");return Number.isFinite(t)?Ze(t,0,1):.7}),[Qt,I]=i.useState("connected"),[je,za]=i.useState("all"),[qt,ot]=i.useState(!0),[se,lt]=i.useState(null),[it,dt]=i.useState([]),[Ia,Lt]=i.useState(!1),[$t,Ma]=i.useState([]),[qe,Ba]=i.useState("alias"),[ct,Fa]=i.useState(!1),[s,_]=i.useState(null),[ye,X]=i.useState(null),[G,Be]=i.useState(!1),[P,Fe]=i.useState(0),[Z,K]=i.useState(!1),[B,ut]=i.useState(!1),[Ea,Ra]=i.useState(!1),[mt,Ta]=i.useState(_t),[M,re]=i.useState(null),[Pa,xt]=i.useState(!1),[Le,pt]=i.useState(null),[Da,ht]=i.useState(null),[Qa,$e]=i.useState(null),Ot=i.useRef(""),bt=i.useRef(null),ke=i.useRef(null),ue=i.useRef(0),Ht=i.useRef(""),Ee=i.useRef(0),ft=i.useRef(0),Oe=i.useRef(null),Re=i.useRef(null),He=i.useRef(-1),gt=!1,me=i.useMemo(()=>{const t=Ga(n?.grade);return ea.filter(o=>t.includes(o.id))},[n?.grade]),qa=i.useMemo(()=>(me.find(o=>o.id===l.subjectId)?.modules||[]).map(o=>({value:o.id,label:o.title})),[me,l.subjectId]),$=i.useMemo(()=>{const t=s?.roundResults||[];let o=0;return t.forEach(p=>{o=p.studentCorrect?o+1:0}),o},[s?.roundResults]),La=i.useMemo(()=>{const t=Math.max(0,$-1)*.12;return Number((1+Math.min(.72,t)).toFixed(2))},[$]),$a=i.useMemo(()=>{if(!s)return 0;if(s.status==="completed")return s.xpEarned||0;const t=s.roundResults||[];let o=0,p=0;for(const m of t)if(m.studentCorrect){o++;const N=o>=2?Math.min(25,(o-1)*5):0;p+=10+N}else o=0;return p},[s?.status,s?.xpEarned,s?.roundResults]),Vt=i.useMemo(()=>{const t=s?.roundResults||[];let o=0;return t.forEach(p=>{o=p.botCorrect?o+1:0}),o},[s?.roundResults]);i.useMemo(()=>{const t=Math.max(0,Vt-1)*.1;return Number((1+Math.min(.5,t)).toFixed(2))},[Vt]),i.useMemo(()=>$>=5?{label:"Inferno",badgeClass:"text-amber-300 border-amber-300/50 bg-amber-500/20 shadow-[0_0_18px_rgba(251,191,36,0.35)]"}:$>=3?{label:"Heating Up",badgeClass:"text-orange-300 border-orange-300/50 bg-orange-500/15 shadow-[0_0_16px_rgba(249,115,22,0.3)]"}:M?.studentCorrect?{label:"Steady",badgeClass:"text-emerald-300 border-emerald-300/40 bg-emerald-500/15 shadow-[0_0_14px_rgba(16,185,129,0.25)]"}:{label:"Rebuild",badgeClass:"text-slate-300 border-slate-300/30 bg-slate-500/15 shadow-[0_0_14px_rgba(148,163,184,0.2)]"},[M?.studentCorrect,$]);const xe=i.useMemo(()=>{if(!M)return null;const t=M.studentCorrect?12:-8,o=M.studentCorrect&&!M.botCorrect?6:0,p=M.studentCorrect?Math.max(0,($-1)*2):0;return t+o+p},[M,$]),D=i.useCallback(t=>{if(!(!ee||he<=0||typeof window>"u"))try{const o=xa();if(!o)return;o.state==="suspended"&&o.resume().catch(()=>{});const m={tick:{notes:[740],duration:.06,type:"triangle",volume:.03},lock:{notes:[520],duration:.08,type:"square",volume:.04},result:{notes:[660,720],duration:.08,type:"sine",volume:.04},win:{notes:[920,1040,1180],duration:.12,type:"triangle",volume:.05},loss:{notes:[260,220],duration:.14,type:"sawtooth",volume:.045},streak:{notes:[780,920],duration:.09,type:"triangle",volume:.045},multiplier:{notes:[660,880,1120],duration:.08,type:"triangle",volume:.05}}[t],N=o.currentTime,R=.07,f=Ze(m.volume*he,.004,.08);m.notes.forEach((F,oe)=>{const fe=o.createOscillator(),Te=o.createGain(),Ne=N+oe*R;fe.type=m.type,fe.frequency.setValueAtTime(F,Ne),Te.gain.setValueAtTime(1e-4,Ne),Te.gain.exponentialRampToValueAtTime(f,Ne+.012),Te.gain.exponentialRampToValueAtTime(1e-4,Ne+m.duration),fe.connect(Te),Te.connect(o.destination),fe.start(Ne),fe.stop(Ne+m.duration+.02)})}catch(o){console.warn("Battle tone playback skipped or blocked:",o)}},[ee,he]),Wt=i.useCallback(async t=>{if(!(!t||typeof window>"u"))try{await window.navigator.clipboard.writeText(t),Y(t),window.setTimeout(()=>{Y(o=>o===t?null:o)},1600)}catch{b({status:"error",message:"Unable to copy room code automatically. Please copy it manually."})}},[]),Ut=i.useCallback(()=>{},[gt]),Yt=i.useCallback(t=>{h(!1),v(null),_(null),T(0),C(null),b({status:"error",message:t}),d("setup")},[]),ne=i.useCallback(async()=>{if(!n?.uid)return null;const[t,o]=await Promise.all([vs(n.uid),js(n.uid,{mode:je,limitCount:8})]);return{stats:t,history:o}},[je,n?.uid]);i.useEffect(()=>{if(me.length===0)return;const o=me.some(N=>N.id===l.subjectId)?l.subjectId:me[0].id,p=me.find(N=>N.id===o),m=p?.modules?.[0]?.id||"";w(N=>{const R=p?.modules?.some(f=>f.id===N.topicId)?N.topicId:m;return N.subjectId===o&&N.topicId===R?N:{...N,subjectId:o,topicId:R}})},[me,l.subjectId]),i.useEffect(()=>{if(!n?.uid){lt(null),dt([]),ot(!1);return}let t=!0;return ot(!0),(async()=>{const p=await ne();t&&(p&&(lt(p.stats),dt(p.history)),ot(!1))})(),()=>{t=!1}},[ne,n?.uid]);const Ve=i.useMemo(()=>je==="all"?it:it.filter(t=>t.mode===je),[it,je]),Xt=i.useMemo(()=>$t.map((t,o)=>{const p=t.rank||o+1,m=t.userId===n?.uid,N=`Student-${t.userId.slice(-4).toUpperCase()}`,R=qe==="full"?t.displayName:qe==="initials"?Qs(t.displayName):N,f=Math.floor(t.leaderboardScore/25)*25,F=ct||m?`${t.leaderboardScore} pts`:`${f}-${f+24} pts`;return{...t,rank:p,isSelf:m,displayName:R,scoreLabel:F}}),[$t,qe,ct,n?.uid]);i.useEffect(()=>{if(c!=="leaderboard"&&c!=="hub")return;let t=!0;return Lt(!0),(async()=>{const p=await Bs(20);t&&(Ma(p),Lt(!1))})(),()=>{t=!1}},[c]);const We=i.useCallback(async()=>{if(n?.uid)try{const t=await da();if(t.sessionType==="match"&&t.match){let o=t.match;if(t.match.mode==="bot"&&t.match.status==="ready")try{o=await de(t.match.matchId),Ee.current=0}catch(p){const m=p;h(!1),v(null),_(null),d("setup"),I(typeof window<"u"&&window.navigator.onLine?"connected":"disconnected"),b({status:"error",message:m?.message||"Unable to resume bot battle. Please start a new match."});return}h(!1),v(t.room||null),_(o),C(t.queue?.expiresAtMs||o.expiresAtMs||null),d("battle"),I("connected");return}if(t.sessionType==="room"&&t.room){h(!1),v(t.room),_(o=>o?.mode==="bot"?o:null),C(null),I("connected");return}if(t.sessionType==="queue"){h(!0),v(null),_(o=>o?.mode==="bot"?o:null),C(t.queue?.expiresAtMs||null),I("connected");return}h(!1),v(null),_(o=>o?.mode==="bot"?o:null),C(null),I("connected")}catch(t){console.warn("Quiz Battle session resume failed:",t),I("reconnecting")}},[n?.uid]);i.useEffect(()=>{n?.uid&&We()},[n?.uid,We]),i.useEffect(()=>{typeof window>"u"||window.localStorage.setItem("quiz_battle_sound_enabled",ee?"1":"0")},[ee]),i.useEffect(()=>{typeof window>"u"||window.localStorage.setItem("quiz_battle_sound_volume",he.toFixed(2))},[he]),i.useEffect(()=>{if(typeof window>"u")return;const t=()=>{const o=window.innerWidth,p=window.innerHeight;Ta({width:Number.isFinite(o)&&o>0?o:_t.width,height:Number.isFinite(p)&&p>0?p:_t.height})};return t(),window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),i.useEffect(()=>{if(typeof document>"u")return;const t=()=>{Ra(!!document.fullscreenElement)};return t(),document.addEventListener("fullscreenchange",t),()=>{document.removeEventListener("fullscreenchange",t)}},[]),i.useEffect(()=>{const t=V!==null;if(!(j||u&&(u.status==="waiting"||u.status==="ready")||t)){T(0);return}const o=()=>{if(!V){T(m=>m+1);return}T(Math.max(0,Math.ceil((V-Date.now())/1e3)))};o();const p=window.setInterval(o,1e3);return()=>{window.clearInterval(p)}},[j,u?.status,u?.roomId,V]),i.useEffect(()=>{if(!V)return;const t=window.setInterval(()=>{V-Date.now()<=0&&(window.clearInterval(t),(async()=>{try{(j||!u)&&await ia()}catch{}finally{Yt("Public matchmaking timed out after 5 minutes. Please start again.")}})())},1e3);return()=>{window.clearInterval(t)}},[u,Yt,j,V]),i.useEffect(()=>{if(typeof window>"u")return;I(window.navigator.onLine?"connected":"disconnected");const t=()=>{I("reconnecting"),We()},o=()=>{I("disconnected")};return window.addEventListener("online",t),window.addEventListener("offline",o),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",o)}},[We]),i.useEffect(()=>{const t=s?.mode==="online"&&(s.status==="ready"||s.status==="in_progress"),o=s?.mode==="bot"&&s.status==="ready",p=!!(u&&(u.status==="waiting"||u.status==="ready"));if(o||(Ee.current=0),!j&&!p&&!t&&!o||B)return;let m=!1;const N=async()=>{try{if(s?.mode==="bot"&&s.status==="ready"){const f=await de(s.matchId);if(m)return;_(f),I("connected"),C(f.expiresAtMs||null),Ee.current=0,f.status==="in_progress"&&b({status:"queued",message:"Practice bot match started."});return}if(s?.mode==="online"){if(s.status==="ready"){const oe=await de(s.matchId);if(m)return;_(oe),I("connected"),C(oe.expiresAtMs||null),oe.status==="in_progress"&&b({status:"queued",message:"Match started. Round timer is live."});return}const f=await Nt(s.matchId);if(m)return;const F=f.roundResults.filter(oe=>oe.roundNumber>He.current).sort((oe,fe)=>oe.roundNumber-fe.roundNumber)[0];F?(He.current=F.roundNumber,re(F),pt(f)):(_(f),f.status==="completed"&&(h(!1),v(null),C(null)),f.status==="cancelled"&&s.status==="in_progress"&&(xt(!0),K(!1))),I("connected");return}if(u?.roomId){const f=await _s({roomId:u.roomId});if(m)return;if(v(f.room),f.match){const F=await de(f.match.matchId);if(m)return;_(F),v(f.room),h(!1),C(F.expiresAtMs||null),d("battle"),I("connected"),b({status:"queued",message:F.status==="ready"?"Opponent connected. Waiting for synchronized start...":"Private room match started."})}return}if(j){const f=await da();if(m)return;if(f.sessionType==="match"&&f.match){const F=await de(f.match.matchId);if(m)return;_(F),v(f.room||null),h(!1),C(F.expiresAtMs||null),d("battle"),I("connected"),b({status:"queued",message:"Opponent found. Preparing synchronized start..."});return}if(f.sessionType==="room"&&f.room){h(!1),v(f.room),C(null),I("connected");return}I("connected")}}catch(f){if(!m){if(console.warn("Quiz Battle sync poll failed:",f),s?.mode==="bot"&&s.status==="ready"&&(Ee.current+=1,Ee.current>=3)){const F=f;h(!1),v(null),_(null),d("setup"),b({status:"error",message:F?.message||"Unable to start bot battle. Please try again."}),I("disconnected");return}I("reconnecting")}}};N();const R=window.setInterval(()=>{N()},3e3);return()=>{m=!0,window.clearInterval(R)}},[s?.matchId,s?.mode,s?.status,u?.roomId,u?.status,B,j]);const be=i.useMemo(()=>s?.mode==="online"&&(s.status==="ready"||s.status==="in_progress")?{scope:"match",resourceId:s.matchId}:u&&(u.status==="waiting"||u.status==="ready")?{scope:"room",resourceId:u.roomId}:j&&n?.uid?{scope:"queue",resourceId:n.uid}:null,[s,u,j,n?.uid]);i.useEffect(()=>{if(!be)return;let t=!1;const o=async()=>{try{await As(be.scope,be.resourceId),t||I("connected")}catch(m){t||(console.warn("Quiz Battle heartbeat failed:",m),I("reconnecting"))}};o();const p=window.setInterval(()=>{o()},8e3);return()=>{t=!0,window.clearInterval(p),fs(be.scope,be.resourceId)}},[be?.scope,be?.resourceId]),i.useEffect(()=>{if(!s||s.status!=="in_progress"){K(!1),ke.current=null,ue.current=0;return}ke.current=null,ue.current=0;const t=s.roundDeadlineAtMs?Math.max(0,Math.ceil((s.roundDeadlineAtMs-Date.now())/1e3)):s.timePerQuestionSec;Fe(t),X(null),K(!1)},[s?.matchId,s?.status,s?.currentRound,s?.timePerQuestionSec]),i.useEffect(()=>{B&&(!s||s.status!=="in_progress")&&ut(!1)},[s?.matchId,s?.status,B]),i.useEffect(()=>{const t=s?.lifecycle;if(!t?.eventType)return;const o=`${t.eventType}:${t.sequence}`;Ot.current!==o&&(Ot.current=o,t.eventType==="answer_locked"?D("lock"):t.eventType==="round_result"&&D("result"))},[s?.lifecycle?.eventType,s?.lifecycle?.sequence,D]),i.useEffect(()=>{!s||s.status!=="completed"||Ht.current!==s.matchId&&(Ht.current=s.matchId,D(s.outcome==="loss"?"loss":"win"),s.outcome==="win"&&Ya(()=>import("./confetti.module-C94ZD2ww.js"),[]).then(t=>{t.default({particleCount:110,spread:78,origin:{y:.62},ticks:160})}).catch(()=>{}))},[s?.matchId,s?.status,s?.outcome,D]),i.useEffect(()=>{if(!s||s.status!=="in_progress"||Z||G||B){bt.current=null;return}P<=3&&P>0&&bt.current!==P&&(bt.current=P,D("tick"))},[s?.status,P,Z,G,B,D]),i.useEffect(()=>{if(!s||s.status!=="in_progress"){ft.current=0;return}$>ft.current&&$>=2&&D($>=4?"multiplier":"streak"),ft.current=$},[s?.matchId,s?.status,$,D]),i.useEffect(()=>{if(!s){Oe.current=null,$e(null);return}const t=Oe.current;if(!t||t.matchId!==s.matchId){Oe.current={matchId:s.matchId,scoreFor:s.scoreFor,scoreAgainst:s.scoreAgainst},$e(null);return}if(s.scoreFor!==t.scoreFor||s.scoreAgainst!==t.scoreAgainst){const o=s.scoreFor>t.scoreFor?"player":"opponent";$e(o),Re.current&&window.clearTimeout(Re.current),Re.current=window.setTimeout(()=>{$e(null)},850)}Oe.current={matchId:s.matchId,scoreFor:s.scoreFor,scoreAgainst:s.scoreAgainst}},[s?.matchId,s?.scoreAgainst,s?.scoreFor]),i.useEffect(()=>()=>{Re.current&&window.clearTimeout(Re.current)},[]),i.useEffect(()=>{if(!M?.studentCorrect||xe===null||xe<=0){ht(null);return}const t=xe>0?"positive":xe<0?"negative":"neutral";ht({id:Date.now(),label:`${xe>=0?"+":""}${xe} Momentum`,tone:t});const o=window.setTimeout(()=>{ht(null)},1400);return()=>{window.clearTimeout(o)}},[xe,M]),i.useEffect(()=>{if(M&&Le){M.studentCorrect?D("win"):D("loss");const t=window.setTimeout(()=>{_(Le),re(null),X(null),K(!1),pt(null),Le.status==="completed"&&(h(!1),v(null),ne(),He.current=-1)},1500);return()=>window.clearTimeout(t)}},[M,Le,D,ne]);const Ue=i.useCallback(async t=>{if(!s||s.status!=="in_progress"||Z||B)return;Be(!0);const o=window.setTimeout(()=>{Be(!1),b({status:"error",message:"Submission took too long. Syncing latest match state now..."}),Nt(s.matchId).then(p=>{_(p),p.status==="completed"&&(h(!1),v(null),C(null))}).catch(()=>{})},12e3);try{const p=s.roundDeadlineAtMs?Ze(s.timePerQuestionSec*1e3-Math.max(0,s.roundDeadlineAtMs-Date.now()),0,s.timePerQuestionSec*1e3):Math.max(0,(s.timePerQuestionSec-P)*1e3),m=await Is({matchId:s.matchId,roundNumber:s.currentRound,selectedOptionIndex:t,responseMs:p});ke.current=null,ue.current=0,m.roundResult?(He.current=m.roundResult.roundNumber,re(m.roundResult),pt(m.match)):(_(m.match),re(null),m.match.mode==="online"&&m.match.status==="in_progress"?(K(!0),b({status:"queued",message:"Answer locked. Waiting for opponent to finish the round..."})):X(null)),m.match.status==="completed"&&(h(!1),v(null),C(null),ne(),b({status:"queued",message:m.completion?`Match finished (${m.completion.outcome.toUpperCase()}) +${m.completion.xpEarned} XP`:"Match finished. Results saved."}))}catch(p){const N=p?.message||"Unable to submit answer right now. Please try again.";if(t===null||N.includes("Round timer elapsed")||N.includes("Expected round")||N.includes("Match is not currently active"))try{const f=await Nt(s.matchId),F=f.currentRound!==s.currentRound;if(_(f),X(null),K(!1),F||f.status==="completed"?(ke.current=null,ue.current=0):t===null&&(ue.current=Date.now()+3e3),f.status==="completed"){h(!1),v(null),C(null),ne(),b({status:"queued",message:"Match finished. Results synchronized."});return}b({status:"queued",message:"Round timed out. Synced to the latest battle state."});return}catch{}t===null&&(ue.current=Date.now()+3e3),b({status:"error",message:N})}finally{window.clearTimeout(o),Be(!1)}},[s,B,ne,Z,P]);i.useEffect(()=>{if(!s||s.status!=="in_progress"||B||G||Z)return;const t=s.roundDeadlineAtMs?Math.max(0,Math.ceil((s.roundDeadlineAtMs-Date.now())/1e3)):P;if(s.roundDeadlineAtMs&&t!==P&&Fe(t),ye===null?t<=1:t<=0){if(ke.current===s.currentRound&&Date.now(){s.roundDeadlineAtMs?Fe(Math.max(0,Math.ceil((s.roundDeadlineAtMs-Date.now())/1e3))):Fe(m=>Math.max(0,m-1))},1e3);return()=>{window.clearTimeout(p)}},[s,G,B,Z,P,ye,Ue]);const Gt=i.useCallback(async()=>{if(!(!s||s.mode!=="bot")){Be(!0),b({status:"validating"});try{const t=await Ms(s.matchId),o=await de(t.matchId);_(o),v(null),h(!1),C(null),re(null),X(null),K(!1),d("battle"),b({status:"queued",message:`Rematch ready (${t.botDifficulty}). Good luck!`})}catch(t){b({status:"error",message:t?.message||"Unable to start rematch right now."})}finally{Be(!1)}}},[s]);if(r!=="student")return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:St}),e.jsx("div",{className:"px-4 sm:px-6 xl:px-10 py-6 sm:py-8",children:e.jsx(te,{className:x(O,"max-w-2xl"),children:e.jsxs(le,{children:[e.jsx(ie,{children:"Quiz Battle is student-only"}),e.jsx(pe,{className:"text-muted-foreground dark:text-[#aab3c7]",children:"Your account role does not have access to this module."})]})})})]});const Zt=t=>{g([]),b({status:"idle"}),ut(!1),h(!1),v(null),S(""),_(null),re(null),X(null),K(!1),C(null),w(o=>({...o,mode:t,queueType:t==="online"?o.queueType:"public_matchmaking"})),T(0),d("setup")},Kt=async()=>{b({status:"validating"});try{u?.roomId?await Ss({roomId:u.roomId}):await ia(),h(!1),v(null),_(t=>!t||t.mode!=="online"?t:t.status==="ready"||t.status==="cancelled"?null:t),S(""),T(0),C(null),b({status:"queued",message:u?.roomId?"Private room cancelled.":"Left matchmaking queue."})}catch(t){b({status:"error",message:t?.message||"Unable to cancel this online session right now. Please try again."})}},Oa=async()=>{b({status:"validating"});const t=ws(l);if(t.length>0){g(t),b({status:"error",message:"Fix the highlighted setup fields before starting."});return}g([]);try{if(l.mode==="online"){if(l.queueType==="private_room"){const N=U.trim().toUpperCase(),R=N?await Ns(N):await ks(l);if(h(!1),v(R.room),S(""),C(R.match?.expiresAtMs||null),R.match){const f=await de(R.match.matchId);_(f),re(null),X(null),K(!1),d("battle"),C(f.expiresAtMs||null),b({status:"queued",message:f.status==="ready"?`Room ${R.room.roomCode} linked. Waiting for synchronized start...`:"Private room match started."});return}_(null),C(null),b({status:"queued",message:N?"Joined private room. Waiting for opponent...":"Private room created. Share code:"});return}const m=await ys(l);if(m.status==="matched"&&m.matchId){const N=await de(m.matchId);h(!1),v(null),_(N),re(null),X(null),K(!1),d("battle"),C(N.expiresAtMs||null),b({status:"queued",message:"Opponent found. Preparing synchronized start..."});return}h(!0),v(null),_(null),C(m.expiresAtMs||Date.now()+Es),T(0),b({status:"queued",message:"Joined matchmaking queue. Waiting for an opponent..."});return}const o=await Cs(l),p=await de(o.matchId);h(!1),v(null),_(p),re(null),X(null),K(!1),Fe(p.timePerQuestionSec),C(null),d("battle"),b({status:"queued",message:`Bot match ${o.matchId.slice(0,8)} live (${o.botDifficulty}).`}),ne().then(m=>{m&&(lt(m.stats),dt(m.history))})}catch(o){h(!1),b({status:"error",message:o?.message||"Unable to start battle. Please try again."})}},W=t=>z.find(o=>o.field===t)?.message;se?.winRate;const Jt=!!(l.mode==="online"&&u&&(u.status==="waiting"||u.status==="ready")&&(!s||s.status!=="completed")),Ha=!!(j||u&&(u.status==="waiting"||u.status==="ready")&&(!s||s.status==="ready"||s.status==="cancelled"));return s&&(s.status==="in_progress"||s.status==="completed")?e.jsxs(e.Fragment,{children:[e.jsx("style",{children:St}),e.jsxs("div",{className:"fixed inset-0 z-[100] bg-[#0B0F19] text-white flex flex-col overflow-hidden",children:[s.status==="completed"&&s.outcome==="loss"&&e.jsx(Rs,{viewportHeight:mt.height}),s.status==="completed"&&s.outcome==="draw"&&e.jsx(Ts,{viewportHeight:mt.height,viewportWidth:mt.width}),e.jsx("div",{className:"absolute inset-0 z-0 opacity-40",children:e.jsx(oa,{children:e.jsx("div",{className:"h-full w-full"})})}),e.jsx(Ke,{children:Pa&&e.jsx(y.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 z-[120] bg-black/70 backdrop-blur-md flex flex-col items-center justify-center px-6",children:e.jsxs(y.div,{initial:{opacity:0,transform:"translateY(40px) scale(0.85)"},animate:{opacity:1,transform:"translateY(0) scale(1)"},transition:{type:"spring",damping:18,stiffness:250,delay:.1},className:"bg-[#1e2433] border border-white/10 rounded-[2rem] p-8 flex flex-col items-center gap-5 max-w-sm w-full shadow-[0_30px_80px_rgba(0,0,0,0.6)]",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-24 h-24 rounded-full bg-[#1a2030] border-4 border-rose-500/50 overflow-hidden flex items-end justify-center shadow-xl",children:s.mode==="bot"?e.jsx(Pe,{className:"h-16 w-16 text-rose-400 mb-2",strokeWidth:1.5}):e.jsx(ve,{className:"h-14 w-14 text-slate-500 mb-2",strokeWidth:1.5})}),e.jsx(y.div,{initial:{opacity:0,transform:"scale(0.5) translateX(-10px)"},animate:{opacity:1,transform:"scale(1) translateX(0)"},transition:{delay:.4,type:"spring",stiffness:300},className:"absolute -top-2 left-full ml-2 bg-white text-slate-900 text-xs font-black px-3 py-1.5 rounded-2xl rounded-bl-none whitespace-nowrap shadow-lg",children:"I give up! 🏳️"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("h2",{className:"text-2xl font-black text-white mb-1",children:"Opponent Surrendered"}),e.jsxs("p",{className:"text-white/50 text-sm",children:[e.jsx("span",{className:"font-bold text-white/70",children:s.opponentName||"Your opponent"})," left the match. You win! 🏆"]})]}),e.jsxs("div",{className:"flex flex-col gap-3 w-full",children:[e.jsx(A,{size:"lg",className:"w-full h-12 bg-emerald-500 hover:bg-emerald-400 text-white font-black rounded-xl",onClick:()=>{xt(!1),_(null),v(null),h(!1),b({status:"idle"}),d("hub"),ne()},children:"🏆 Claim Victory"}),e.jsx(A,{size:"lg",variant:"outline",className:"w-full h-12 border-white/20 text-white/70 hover:bg-white/10 rounded-xl",onClick:()=>{xt(!1),_(null),v(null),h(!1),b({status:"idle"}),d("hub")},children:"Back to Arena"})]})]})})}),B&&e.jsx("div",{className:"absolute inset-0 z-[110] bg-black/60 backdrop-blur-md flex items-center justify-center",children:e.jsxs(te,{className:"w-full max-w-sm border-border/50 bg-[#181d27] shadow-[0_20px_50px_rgba(0,0,0,0.5)]",children:[e.jsxs(le,{className:"text-center",children:[e.jsx(ie,{className:"text-3xl font-black text-white",children:"PAUSED"}),e.jsx(pe,{className:"text-base text-muted-foreground mt-2",children:s.mode==="online"?"Online match - timer continues in the background! Hurry!":"Bot match - round timer frozen."})]}),e.jsxs(ge,{className:"flex flex-col gap-3",children:[e.jsx(A,{variant:"default",size:"lg",className:"w-full text-lg h-12",onClick:Ut,children:"Resume Match"}),e.jsx(A,{variant:"outline",size:"lg",className:"w-full text-lg h-12 border-rose-500/20 text-rose-500 hover:bg-rose-500/10",onClick:()=>{ut(!1),_(null),v(null),h(!1),b({status:"idle"}),d("setup")},children:"Leave Match"})]})]})}),e.jsxs("div",{className:"relative z-10 flex flex-col h-full w-full max-w-[1400px] mx-auto px-4 md:px-8 py-4",children:[e.jsx(_a,{playerRoundStreak:$,playerVisualMultiplier:La,liveXpEarned:$a,activeMatch:s,subjects:ea,battleSoundEnabled:ee,onToggleSound:()=>Dt(t=>!t),isFullscreen:Ea,onToggleFullscreen:()=>{typeof document>"u"||(document.fullscreenElement?document.exitFullscreen().catch(t=>{console.warn("Fullscreen mode unavailable or blocked by browser (exit):",t)}):document.documentElement.requestFullscreen().catch(t=>{console.warn("Fullscreen mode unavailable or blocked by browser (enter):",t)}))},isDesignPauseAvailable:gt,onTogglePause:Ut}),s.status==="in_progress"?e.jsx("div",{className:"shrink-0 w-full max-w-4xl mx-auto h-2 bg-white/10 rounded-full overflow-hidden mt-6 mb-4",children:e.jsx(y.div,{className:"h-full",animate:{width:`${Math.max(0,P/s.timePerQuestionSec*100)}%`,backgroundColor:P>Math.floor(s.timePerQuestionSec/2)?"#10b981":P>3?"#f59e0b":"#ef4444"},transition:{duration:1,ease:"linear"}})}):e.jsx("div",{className:"shrink-0 h-6 md:h-10 w-full"}),e.jsx("div",{className:"flex-1 flex flex-col justify-center items-center w-full min-h-0 relative",children:s.status==="completed"?e.jsx("div",{className:"fixed inset-0 z-[200] flex flex-col items-center justify-center bg-slate-900/50 backdrop-blur-md px-4",children:e.jsxs(y.div,{initial:{opacity:0,scale:.9,y:10},animate:{opacity:1,scale:1,y:0},className:"w-full max-w-sm sm:max-w-md bg-[#161a25]/90 border border-white/20 shadow-[0_30px_80px_rgba(0,0,0,0.8)] rounded-[1.5rem] p-6 text-center",children:[e.jsx("h2",{className:x("text-3xl font-black uppercase tracking-widest drop-shadow-md mb-2",s.outcome==="win"?"text-emerald-400":s.outcome==="loss"?"text-rose-400":"text-amber-400"),children:s.outcome==="win"?"VICTORY!":s.outcome==="loss"?"DEFEAT":"DRAW MATCH"}),e.jsxs("p",{className:"text-white/80 font-bold text-sm mb-4 uppercase tracking-widest",children:["Final Score: ",s.scoreFor," - ",s.scoreAgainst]}),e.jsxs("div",{className:"bg-black/50 rounded-xl p-4 mb-5 border border-white/5 flex flex-col gap-3",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-white/40 text-[10px] font-black uppercase tracking-widest text-left mb-2",children:"Battle Score"}),(()=>{const t=s.roundResults||[];let o=0,p=0,m=0;for(const N of t)if(N.studentCorrect){o++;const R=o>=2?Math.min(15,(o-1)*5):0;p+=10,m+=R}else o=0;return e.jsxs(e.Fragment,{children:[e.jsx(ca,{value:p,label:"Correct Answers",delay:300,icon:e.jsx(vt,{className:"h-3 w-3 text-emerald-400"})}),e.jsx(ca,{value:m,label:"Streak Bonus",delay:900,icon:e.jsx(et,{className:"h-3 w-3 text-amber-400"})}),e.jsxs(y.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:1.5,duration:.4},className:"flex items-center justify-between pt-1 mt-1 border-t border-white/5",children:[e.jsx("span",{className:"text-white/50 text-xs font-bold uppercase tracking-widest",children:"Total"}),e.jsxs("span",{className:"text-base font-black text-white/80",children:[p+m," pts"]})]})]})})()]}),e.jsx("div",{className:"w-full h-px bg-white/10"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-white/40 text-[10px] font-black uppercase tracking-widest text-left mb-2",children:"Match Reward"}),e.jsxs(y.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:2,duration:.5,type:"spring"},className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-white/70 text-sm font-bold",children:s.outcome==="win"?"🏆 Victory Reward":s.outcome==="draw"?"🤝 Draw Reward":"📘 Participation Reward"}),e.jsxs("span",{className:"text-2xl font-black text-amber-400 drop-shadow-md",children:["+",s.xpEarned||(s.outcome==="win"?80:s.outcome==="draw"?55:35)," XP"]})]}),e.jsx("p",{className:"text-white/25 text-[9px] mt-1 text-right uppercase tracking-widest",children:"Credited to your profile"})]})]}),e.jsxs("div",{className:"flex flex-col gap-3 justify-center",children:[e.jsx(A,{size:"lg",onClick:()=>{_(null),v(null),h(!1),d("hub")},className:"w-full h-12 rounded-xl text-sm font-black bg-white/10 hover:bg-white/20 text-white border border-white/20",children:"BACK TO ARENA"}),s.mode==="bot"&&e.jsx(A,{size:"lg",onClick:()=>void Gt(),disabled:G,className:"w-full h-12 rounded-xl text-sm font-black bg-violet-600 hover:bg-violet-500 text-white border-b-2 border-violet-800 active:border-b-0 active:translate-y-[2px]",children:"REMATCH"})]})]})}):e.jsx(Aa,{activeMatch:s,roundSecondsLeft:P,lastRoundResult:M,selectedOptionIndex:ye,roundLocked:Z,answerSubmitting:G,designPauseActive:B,onOptionSelect:t=>{M&&M.roundNumber===s.currentRound||G||Z||(xa()?.resume().catch(()=>{}),D("lock"),X(t),Ue(t))},floatingMomentum:Da,lastRoundMomentumDelta:xe,studentProfile:n,quizBattleAvatar:wt})}),e.jsx(Sa,{studentProfile:n,activeMatch:s,scorePulseTarget:Qa,quizBattleAvatar:wt})]})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("style",{children:St}),e.jsx(oa,{bgVideo:"/videos/warp_bg.mp4",className:"-mx-3 lg:-mx-4 -mt-3 lg:-mt-4 -mb-8 px-4 sm:px-6 xl:px-10 py-6 sm:py-8 min-h-[calc(100vh-3.5rem)] !w-auto overflow-hidden relative",children:e.jsx("div",{className:"h-full flex flex-col max-w-[1400px] mx-auto w-full",children:e.jsx(y.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.24,ease:[.22,1,.36,1]},className:"space-y-3 lg:space-y-4",children:e.jsxs(Fs,{value:c,onValueChange:t=>d(t),children:[e.jsx(ze,{value:"hub",className:"mt-0 outline-none",children:e.jsx(y.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:-12},className:"space-y-5",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_300px] xl:grid-cols-[1fr_320px] gap-6 sm:gap-8 lg:gap-10",children:[e.jsxs("div",{className:"space-y-3 lg:space-y-4",children:[e.jsxs("div",{className:"relative select-none isolate bg-indigo-600 rounded-[2rem] shadow-[0_20px_45px_-15px_rgba(0,0,0,0.3)] shrink-0",children:[e.jsx("div",{className:"absolute inset-0 bg-black/60 pointer-events-none z-0 rounded-[2rem]"}),e.jsx("div",{className:"absolute inset-0 opacity-10 pointer-events-none rounded-[2rem] overflow-hidden repeating-stripe-bg"}),e.jsx("div",{className:"absolute top-0 right-0 w-[400px] h-[400px] bg-sky-500/20 blur-[100px] rounded-full pointer-events-none"}),e.jsxs("div",{className:"relative z-10 flex flex-col md:flex-row items-center justify-between p-6 lg:p-8 h-full min-h-[140px] lg:min-h-[160px]",children:[e.jsx("div",{className:"flex-1 space-y-3 w-full pr-0 md:pr-[240px] lg:pr-[280px]",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"flex items-center gap-3 text-3xl sm:text-4xl lg:text-[46px] font-black tracking-tight text-white mb-2 sm:mb-4",children:[e.jsx(jt,{className:"h-8 w-8 sm:h-10 sm:w-10 lg:h-12 lg:w-12 text-[#d1abff]",strokeWidth:2.5}),"Quiz Battle"]}),e.jsx("p",{className:"text-base sm:text-lg lg:text-xl text-white mt-1.5 sm:mt-2 max-w-2xl leading-relaxed",children:"Timed student duels with synchronized rounds, instant feedback, and progression rewards."}),e.jsxs("p",{className:"text-xs lg:text-sm font-semibold uppercase tracking-[0.15em] text-[#8a7fbc] mt-3",children:["Connection: ",e.jsx("span",{className:Qt==="connected"?"text-emerald-400":"text-amber-400",children:Qt})]})]})}),e.jsx("div",{className:"hidden md:block absolute right-[-5px] lg:right-[-15px] top-0 lg:top-[5px] w-[200px] lg:w-[260px] shrink-0 pointer-events-none z-20",children:e.jsx("img",{src:wt,alt:"Mascot",className:"w-full h-full object-contain animate-mascot-float"})})]})]}),e.jsxs("div",{className:"pt-4 lg:pt-6",children:[e.jsxs("h2",{className:"flex items-center gap-2 pb-4 text-xl lg:text-2xl font-black tracking-wide uppercase text-white drop-shadow-[0_0_12px_rgba(255,255,255,0.4)]",children:[e.jsx(jt,{className:"h-6 w-6 lg:h-8 lg:w-8 text-amber-400 drop-shadow-[0_0_8px_rgba(251,191,36,0.9)]"})," BATTLE MODES"]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 lg:gap-6 relative z-10 w-full mb-2",children:[e.jsxs(y.button,{type:"button",onClick:()=>Zt("online"),whileHover:{scale:1.025},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:15},className:"w-full h-[205px] sm:h-[245px] lg:h-[265px] bg-[#8A3FD3] rounded-[22px] border-none relative text-left shadow-[0_8px_30px_rgba(138,63,211,0.2)] hover:shadow-[0_12px_45px_rgba(138,63,211,0.4)] block flex-col group",children:[e.jsx("div",{className:"absolute inset-0 rounded-[22px] shadow-[inset_0_6px_15px_rgba(255,255,255,0.4)] pointer-events-none z-40"}),e.jsxs("div",{className:"absolute top-4 -left-4 z-20 w-[100px] h-[40px] opacity-100",children:[e.jsx("svg",{viewBox:"0 0 100 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-full h-full block drop-shadow-md",children:e.jsx("path",{d:"M0 0 H94 Q100 0 100 6 V34 Q100 40 94 40 H0 L14 20 Z",fill:"#b91c1c"})}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-end pr-3 font-black text-[13px] text-white tracking-[0.3px] opacity-100 font-nunito",children:"VS Player"})]}),e.jsxs("div",{className:"rounded-[22px] overflow-hidden relative isolate h-full flex flex-col justify-end",children:[e.jsx("div",{className:"absolute top-0 -left-[150%] w-[100%] h-full bg-gradient-to-r from-transparent via-white/40 to-transparent -skew-x-12 z-50 pointer-events-none transition-all duration-0 group-hover:duration-[800ms] ease-in-out group-hover:left-[150%]"}),e.jsxs("div",{className:"flex-1 w-full flex items-end justify-center relative pt-2 pointer-events-none",children:[e.jsx("div",{className:"absolute bottom-0 left-0 w-full h-[70px] sm:h-[95px] bg-[#662AA8] rounded-[50%_50%_0_0/100%_100%_0_0] scale-[1.05] z-0"}),e.jsxs("div",{className:"relative z-10 flex items-center justify-center mb-[2px] h-[120px] sm:h-[140px] w-full",children:[e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"",className:"h-[120%] sm:h-[125%] object-contain relative z-20 origin-bottom right-[-15px] drop-shadow-[0_12px_15px_rgba(0,0,0,0.3)] animate-avatar-left"}),e.jsx("div",{className:"relative z-30 flex flex-col items-center mx-[-20px] scale-[1.1] animate-vs-pulse",children:e.jsxs("span",{className:"font-black italic text-[40px] text-gray-200 tracking-tighter leading-none drop-shadow-[-2px_3px_0px_rgba(0,0,0,0.8)] webkit-text-stroke",children:[e.jsx("span",{className:"text-gray-300",children:"V"}),e.jsx("span",{className:"text-gray-400",children:"S"})]})}),e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"",className:"h-[120%] sm:h-[125%] object-contain relative z-10 scale-x-[-1] origin-bottom left-[-20px] drop-shadow-[0_12px_15px_rgba(0,0,0,0.3)] animate-avatar-right"})]})]}),e.jsx("div",{className:"relative z-10 w-full px-5 py-3 sm:py-4 text-center bg-[#662AA8]",children:e.jsx("p",{className:"text-[13px] font-bold text-white leading-[1.45] font-nunito",children:"Queue or room-code match with another student."})})]})]}),e.jsxs(y.button,{type:"button",onClick:()=>Zt("bot"),whileHover:{scale:1.025},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:15},className:"w-full h-[205px] sm:h-[245px] lg:h-[265px] bg-[#1FA7E1] rounded-[22px] border-none relative text-left shadow-[0_8px_30px_rgba(31,167,225,0.2)] hover:shadow-[0_12px_45px_rgba(31,167,225,0.4)] block flex-col group",children:[e.jsx("div",{className:"absolute inset-0 rounded-[22px] shadow-[inset_0_6px_15px_rgba(255,255,255,0.4)] pointer-events-none z-40"}),e.jsxs("div",{className:"absolute top-4 -left-4 z-20 w-[100px] h-[40px] opacity-100",children:[e.jsx("svg",{viewBox:"0 0 100 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-full h-full block drop-shadow-md",children:e.jsx("path",{d:"M0 0 H94 Q100 0 100 6 V34 Q100 40 94 40 H0 L14 20 Z",fill:"#b91c1c"})}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-end pr-3 font-black text-[13px] text-white tracking-[0.3px] opacity-100 font-nunito",children:"VS Bot"})]}),e.jsxs("div",{className:"rounded-[22px] overflow-hidden relative isolate h-full flex flex-col justify-end",children:[e.jsx("div",{className:"absolute top-0 -left-[150%] w-[100%] h-full bg-gradient-to-r from-transparent via-white/40 to-transparent -skew-x-12 z-50 pointer-events-none transition-all duration-0 group-hover:duration-[800ms] ease-in-out group-hover:left-[150%]"}),e.jsxs("div",{className:"flex-1 w-full flex items-end justify-center relative pt-2 pointer-events-none",children:[e.jsx("div",{className:"absolute bottom-0 left-0 w-full h-[70px] sm:h-[95px] bg-[#127DA6] rounded-[50%_50%_0_0/100%_100%_0_0] scale-[1.05] z-0"}),e.jsxs("div",{className:"relative z-10 flex items-end justify-center mb-[2px] h-[125px] sm:h-[145px] w-full",children:[e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"",className:"absolute opacity-40 blur-[1px] h-full object-contain origin-bottom -translate-x-[45px] sm:-translate-x-[60px] scale-[0.80] sm:scale-[0.85] animate-ghost-left"}),e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"",className:"absolute opacity-40 blur-[1px] h-full object-contain origin-bottom translate-x-[45px] sm:translate-x-[60px] scale-[0.80] sm:scale-[0.85] animate-ghost-right"}),e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"VS Bot",className:"relative opacity-100 scale-100 h-[105%] sm:h-[115%] object-contain drop-shadow-[0_15px_15px_rgba(0,0,0,0.3)] z-20 origin-bottom animate-main-avatar"})]})]}),e.jsx("div",{className:"relative z-10 w-full px-5 py-3 sm:py-4 text-center bg-[#127DA6]",children:e.jsx("p",{className:"text-[13px] font-bold text-white leading-[1.45] font-nunito",children:"Instant solo duel with selectable bot difficulty."})})]})]})]})]})]}),e.jsxs("div",{className:"space-y-3 lg:space-y-4 flex flex-col h-full justify-between",children:[e.jsx("div",{onClick:()=>d("leaderboard"),className:"relative w-full h-[155px] sm:h-[165px] cursor-pointer group flex items-end justify-center overflow-visible mt-1 mb-2 scale-[0.75] origin-bottom sm:scale-[0.80] lg:scale-[0.85] lg:origin-center",children:e.jsxs(y.div,{className:"relative w-full h-full flex flex-col items-center justify-end",whileHover:{scale:1.03},whileTap:{scale:.98},children:[e.jsxs("div",{className:"absolute top-[1px] sm:-top-[30px] w-full flex justify-center items-end px-2 z-0",children:[e.jsx(yt,{strokeWidth:0,fill:"currentColor",className:"w-[35px] h-[35px] text-[#fde047] -rotate-[15deg] -mr-3 mb-1 z-0 drop-shadow-[0_0_15px_rgba(253,224,71,0.6)]"}),e.jsx("div",{className:"z-10 relative animate-star-float",children:e.jsx(yt,{strokeWidth:0,fill:"currentColor",className:"w-[60px] h-[60px] text-[#fcd34d] drop-shadow-[0_0_25px_rgba(252,211,77,0.9)]"})}),e.jsx(yt,{strokeWidth:0,fill:"currentColor",className:"w-[35px] h-[35px] text-[#fde047] rotate-[15deg] -ml-3 mb-1 z-0 drop-shadow-[0_0_15px_rgba(253,224,71,0.6)]"})]}),e.jsx("div",{className:`absolute inset-x-0 bottom-[40px] top-0 z-10 flex flex-col items-center justify-end + filter drop-shadow-[0px_3px_0px_white] drop-shadow-[0px_-3px_0px_white] drop-shadow-[3px_0px_0px_white] drop-shadow-[-3px_0px_0px_white] drop-shadow-[2px_2px_0px_white] drop-shadow-[-2px_-2px_0px_white] drop-shadow-[2px_-2px_0px_white] drop-shadow-[-2px_2px_0px_white]`,children:e.jsxs("div",{className:"flex items-end justify-center z-20 relative px-4",children:[e.jsxs("div",{className:"flex flex-col items-center w-[65px] relative",children:[e.jsx("div",{className:"w-full h-[14px] bg-[#d24b4b] rounded-[2px] relative z-10 -mb-[1px]"}),e.jsxs("div",{className:"w-[85%] h-[50px] bg-[#fe5c5c] rounded-b-[2px] flex flex-col justify-center items-center gap-1.5 pb-1.5",children:[e.jsx("div",{className:"w-6 h-1.5 bg-white rounded-full opacity-95"}),e.jsx("div",{className:"w-6 h-1.5 bg-white rounded-full opacity-95"})]})]}),e.jsxs("div",{className:"flex flex-col items-center w-[75px] -mx-[4px] z-20 relative",children:[e.jsx("div",{className:"w-full h-[18px] bg-[#f2812d] rounded-[2px] relative z-10 -mb-[1px]"}),e.jsxs("div",{className:"w-[85%] h-[75px] bg-[#fa9746] rounded-b-[2px] flex flex-col justify-start items-center pt-4 gap-1.5",children:[e.jsx("div",{className:"w-9 h-1.5 bg-white rounded-full opacity-95"}),e.jsx("div",{className:"w-9 h-1.5 bg-white rounded-full opacity-95"})]})]}),e.jsxs("div",{className:"flex flex-col items-center w-[65px] relative",children:[e.jsx("div",{className:"w-full h-[14px] bg-[#d24b4b] rounded-[2px] relative z-10 -mb-[1px]"}),e.jsxs("div",{className:"w-[85%] h-[50px] bg-[#fe5c5c] rounded-b-[2px] flex flex-col justify-center items-center gap-1.5 pb-1.5",children:[e.jsx("div",{className:"w-6 h-1.5 bg-white rounded-full opacity-95"}),e.jsx("div",{className:"w-6 h-1.5 bg-white rounded-full opacity-95"})]})]})]})}),e.jsx("div",{className:"absolute bottom-2 w-[110%] max-w-[280px] z-30 drop-shadow-2xl",children:e.jsxs("div",{className:"relative w-full h-[52px] flex justify-center items-center",children:[e.jsx("div",{className:"absolute -left-1 top-2 w-[55px] h-[40px] bg-[#8b0d0d] z-0 clip-poly-left"}),e.jsx("div",{className:"absolute -right-1 top-2 w-[55px] h-[40px] bg-[#8b0d0d] z-0 clip-poly-right"}),e.jsxs("div",{className:"absolute inset-x-6 top-0 bottom-0 bg-[#b61515] shadow-[inset_0_2px_4px_rgba(255,255,255,0.1),_inset_0_-4px_4px_rgba(0,0,0,0.2)] z-10 flex flex-col items-center justify-center",children:[e.jsx("h3",{className:"text-lg sm:text-xl font-black text-white tracking-widest leading-none drop-shadow-md font-nunito",children:"Hall of Fame"}),e.jsx("span",{className:"text-[9px] sm:text-[10px] font-bold text-white/90 tracking-widest mt-0.5",children:"View Page >"})]})]})})]})}),e.jsxs("div",{className:"relative w-full bg-[#3b3a82] dark:bg-[#2b2b5f] rounded-[24px] overflow-hidden flex flex-col shadow-[0_8px_30px_rgba(59,58,130,0.3)]",children:[e.jsxs("div",{className:"flex flex-row items-end justify-between px-5 pt-4 pb-2 relative z-10",children:[e.jsx("h3",{className:"text-[18px] font-black text-white tracking-wide leading-none drop-shadow-md font-nunito",children:"My Stats"}),e.jsx(A,{variant:"link",className:"text-white/80 hover:text-white p-0 h-auto font-semibold text-[13px] tracking-wide",onClick:()=>d("stats"),children:"View Stats >"})]}),e.jsxs("div",{className:"relative z-10 w-full overflow-hidden pb-4",children:[e.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-6 bg-gradient-to-r from-[#3b3a82] to-transparent z-20 pointer-events-none dark:from-[#2b2b5f]"}),e.jsx("div",{className:"absolute right-0 top-0 bottom-0 w-6 bg-gradient-to-l from-[#3b3a82] to-transparent z-20 pointer-events-none dark:from-[#2b2b5f]"}),e.jsx("div",{className:"flex w-max pl-3 animate-marquee",children:[0,1].map(t=>e.jsxs("div",{className:"flex gap-2.5 pr-2.5",children:[e.jsxs("div",{className:"flex-none w-[60px] sm:w-[65px] lg:w-[70px] xl:w-[75px] aspect-square rounded-[12px] bg-[#f0eaff] p-1.5 flex flex-col justify-between relative overflow-hidden group shadow-sm dark:bg-[#d6ccf5]",children:[e.jsx(kt,{className:"absolute -bottom-1 -right-2 w-6 h-6 sm:w-8 sm:h-8 text-[#a06aec]/10 -rotate-12 transition-transform group-hover:scale-110"}),e.jsx("span",{className:"text-[12px] drop-shadow-sm leading-none",children:"🏆"}),e.jsxs("div",{className:"relative z-10 space-y-[1px]",children:[e.jsxs("h4",{className:"text-[12px] sm:text-[14px] lg:text-[16px] font-black text-[#8f5ae2] leading-none tracking-tight",children:[Math.round(se?.winRate||0)," %"]}),e.jsx("p",{className:"text-[6px] lg:text-[7px] font-extrabold text-[#baa4df] uppercase tracking-wider leading-none",children:"Win Rate"})]})]}),e.jsxs("div",{className:"flex-none w-[60px] sm:w-[65px] lg:w-[70px] xl:w-[75px] aspect-square rounded-[12px] bg-[#e1f5f7] p-1.5 flex flex-col justify-between relative overflow-hidden group shadow-sm dark:bg-[#b0e6eb]",children:[e.jsx(Bt,{className:"absolute -bottom-1 -right-2 w-6 h-6 sm:w-8 sm:h-8 text-[#35a8bc]/10 rotate-12 transition-transform group-hover:scale-110"}),e.jsx("span",{className:"text-[12px] drop-shadow-sm leading-none",children:"🎯"}),e.jsxs("div",{className:"relative z-10 space-y-[1px]",children:[e.jsx("h4",{className:"text-[12px] sm:text-[14px] lg:text-[16px] font-black text-[#319ab4] leading-none tracking-tight",children:se?.matchesPlayed||0}),e.jsx("p",{className:"text-[6px] lg:text-[7px] font-extrabold text-[#7eafbe] uppercase tracking-wider leading-none",children:"Matches"})]})]}),e.jsxs("div",{className:"flex-none w-[60px] sm:w-[65px] lg:w-[70px] xl:w-[75px] aspect-square rounded-[12px] bg-[#fef5e7] p-1.5 flex flex-col justify-between relative overflow-hidden group shadow-sm dark:bg-[#f6ebd2]",children:[e.jsx(ra,{className:"absolute -bottom-1 -right-2 w-6 h-6 sm:w-8 sm:h-8 text-[#e87a42]/10 -rotate-12 transition-transform group-hover:scale-110"}),e.jsx("span",{className:"text-[12px] drop-shadow-sm leading-none",children:"⏱️"}),e.jsxs("div",{className:"relative z-10 space-y-[1px]",children:[e.jsxs("h4",{className:"text-[12px] sm:text-[14px] lg:text-[16px] font-black text-[#db734b] leading-none tracking-tight",children:[se?.averageResponseMs?(se.averageResponseMs/1e3).toFixed(1):0,"s"]}),e.jsx("p",{className:"text-[6px] lg:text-[7px] font-extrabold text-[#d2a893] uppercase tracking-wider leading-none whitespace-nowrap",children:"Response"})]})]}),e.jsxs("div",{className:"flex-none w-[60px] sm:w-[65px] lg:w-[70px] xl:w-[75px] aspect-square rounded-[12px] bg-[#fdeceb] p-1.5 flex flex-col justify-between relative overflow-hidden group shadow-sm dark:bg-[#fbd3d3]",children:[e.jsx(et,{className:"absolute -bottom-1 -right-2 w-6 h-6 sm:w-8 sm:h-8 text-[#df655a]/10 rotate-12 transition-transform group-hover:scale-110"}),e.jsx("span",{className:"text-[12px] drop-shadow-sm leading-none",children:"✨"}),e.jsxs("div",{className:"relative z-10 space-y-[1px]",children:[e.jsx("h4",{className:"text-[12px] sm:text-[14px] lg:text-[16px] font-black text-[#d05c54] leading-none tracking-tight",children:n?.currentXP||0}),e.jsx("p",{className:"text-[6px] lg:text-[7px] font-extrabold text-[#dd9a9a] uppercase tracking-wider leading-none whitespace-nowrap",children:"Total XP"})]})]})]},t))})]})]}),e.jsxs(te,{className:x(O,"rounded-[18px] flex flex-col min-h-[200px]"),children:[e.jsxs(le,{className:"pb-0 pt-3 px-4 flex flex-row items-center justify-between",children:[e.jsxs(ie,{className:"text-[14px] font-black flex items-center gap-2 text-[#2e2b5e] dark:text-[#f5f7fb]",children:[e.jsx(na,{className:"h-[16px] w-[16px] text-[#2e2b5e] dark:text-[#9e8fff]"})," Match History"]}),e.jsx(A,{variant:"link",size:"sm",className:"h-auto p-0 text-[12px] font-semibold text-muted-foreground dark:text-[#95a0bb] hover:text-primary transition-colors",onClick:()=>d("history"),children:"View All"})]}),e.jsxs(ge,{className:"space-y-1.5 px-4 pt-1 pb-3 overflow-y-auto",children:[e.jsx("div",{className:"text-[11px] text-muted-foreground dark:text-[#8b95ad] mb-1.5 leading-relaxed",children:"Your recent student battles only."}),qt?e.jsxs("div",{className:"space-y-2",children:[e.jsx(we,{className:"h-10 w-full rounded-xl bg-muted dark:bg-[#2a3143]"}),e.jsx(we,{className:"h-10 w-full rounded-xl bg-muted dark:bg-[#2a3143]"})]}):Ve.length===0?e.jsx("p",{className:"text-xs text-center text-muted-foreground dark:text-[#a8b2c9] py-2",children:"No battle history yet."}):Ve.slice(0,3).map(t=>{const o=t.outcome==="win",p=t.outcome==="loss",m=t.opponentName.split(" ").map(N=>N[0]).join("").substring(0,2).toUpperCase()||"OP";return e.jsxs("div",{className:"group relative overflow-hidden rounded-[14px] border border-muted-foreground/15 bg-white dark:bg-[#11151d] dark:border-[#2f3547] p-2 shadow-sm transition-all hover:scale-[1.01] hover:shadow-md",children:[e.jsx("div",{className:x("absolute inset-y-0 right-0 w-[55%] pointer-events-none opacity-[0.2] dark:opacity-[0.25] mix-blend-multiply dark:mix-blend-screen transition-all",o?"bg-gradient-to-l from-emerald-500 via-emerald-500/40 to-transparent":p?"bg-gradient-to-l from-rose-500 via-rose-500/40 to-transparent":"bg-gradient-to-l from-amber-400 via-amber-400/40 to-transparent")}),e.jsxs("div",{className:"flex items-center gap-2.5 relative z-10 w-full",children:[e.jsx("div",{className:x("w-9 h-9 rounded-full flex items-center justify-center font-black text-[12px] tracking-wide text-white flex-shrink-0 shadow-inner",o?"bg-[#34d399] dark:bg-[#15803d]":p?"bg-[#fb7185] dark:bg-[#be123c]":"bg-[#fbbf24] dark:bg-[#b45309]"),children:m}),e.jsxs("div",{className:"flex-grow min-w-0 flex flex-col justify-center",children:[e.jsxs("p",{className:"text-[13px] font-extrabold text-[#36326e] dark:text-[#e4e7f1] truncate leading-tight",children:["vs ",t.opponentName]}),e.jsxs("p",{className:"text-[10px] font-bold text-muted-foreground/60 dark:text-[#7f88a3] truncate flex items-center gap-1 mt-0.5",children:[t.subjectId," ",e.jsx("span",{className:"w-1 h-1 rounded-full bg-muted-foreground/30"})," ",t.difficulty||"Medium"," ",e.jsx("span",{className:"w-1 h-1 rounded-full bg-muted-foreground/30"})," ",t.rounds||"5"," rnds"]})]}),e.jsxs("div",{className:"text-right flex flex-col items-end justify-center pl-2 flex-shrink-0",children:[e.jsxs("p",{className:"tabular-nums text-[16px] leading-[1.1] font-black text-[#2e2b5e] dark:text-[#f5f7fb] tracking-tighter",children:[t.scoreFor,e.jsx("span",{className:"text-muted-foreground/40 mx-[1px]",children:"-"}),t.scoreAgainst]}),e.jsx("p",{className:x("text-[9px] font-black uppercase tracking-[0.1em]",o?"text-emerald-500 dark:text-emerald-400":p?"text-rose-500 dark:text-rose-400":"text-amber-500 dark:text-amber-400"),children:t.outcome})]})]})]},t.matchId)})]})]})]})]})},"hub")}),e.jsx(ze,{value:"setup",className:"mt-0 outline-none",children:e.jsxs(y.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:-12},className:"w-full space-y-6",children:[e.jsxs(y.div,{className:x(O,"relative overflow-hidden rounded-[24px] mb-6 shadow-lg",l.mode==="online"?"border-purple-500/20 shadow-[0_0_40px_-10px_rgba(138,63,211,0.2)]":"border-sky-500/20 shadow-[0_0_40px_-10px_rgba(31,167,225,0.2)]"),whileHover:{scale:1.01},transition:{type:"spring",stiffness:300,damping:20},children:[e.jsx("div",{className:x("pointer-events-none absolute inset-0 bg-gradient-to-r",l.mode==="online"?"from-purple-500/20 via-fuchsia-500/10 to-purple-600/5 dark:from-purple-500/20 dark:via-fuchsia-500/10 dark:to-purple-900/10":"from-sky-500/20 via-cyan-500/10 to-sky-600/5 dark:from-sky-500/20 dark:via-cyan-500/10 dark:to-sky-900/10")}),e.jsx("div",{className:x("pointer-events-none absolute -top-24 -right-24 h-64 w-64 rounded-full blur-3xl animate-orb-pulse",l.mode==="online"?"bg-purple-400/20":"bg-sky-400/20")}),e.jsx("div",{className:x("pointer-events-none absolute -bottom-12 -left-12 h-40 w-40 rounded-full blur-2xl animate-orb-pulse-delayed",l.mode==="online"?"bg-fuchsia-400/30":"bg-cyan-400/30")}),e.jsx("div",{className:"absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAiLz4KPHBhdGggZD0iTTAgMEgxdjFIMHoiIGZpbGw9IiM2MzY2ZjEiIGZpbGwtb3BhY2l0eT0iMC4wNSIvPgo8L3N2Zz4=')] opacity-30 dark:opacity-10 mix-blend-overlay"}),e.jsxs("div",{className:"relative p-6 sm:p-8 md:px-10 flex items-center gap-5 sm:gap-8 z-10",children:[e.jsx(A,{variant:"ghost",onClick:()=>d("hub"),className:x("h-12 w-12 sm:h-14 sm:w-14 p-0 rounded-full hover:scale-105 transition-all backdrop-blur-md shadow-lg shrink-0 flex items-center justify-center group",l.mode==="online"?"bg-white/50 dark:bg-black/40 hover:bg-white/80 dark:hover:bg-black/60 border border-purple-500/30":"bg-white/50 dark:bg-black/40 hover:bg-white/80 dark:hover:bg-black/60 border border-sky-500/30"),children:e.jsx(Ye,{className:x("h-6 w-6 sm:h-8 sm:w-8 rotate-180 transition-transform group-hover:-translate-x-0.5",l.mode==="online"?"text-purple-800 dark:text-purple-300":"text-sky-800 dark:text-sky-300")})}),e.jsxs("div",{children:[e.jsxs("h2",{className:x("flex items-center gap-3 text-3xl sm:text-4xl font-black tracking-tight text-transparent bg-clip-text bg-gradient-to-br drop-shadow-sm",l.mode==="online"?"from-purple-600 to-fuchsia-500 dark:from-purple-300 dark:to-fuchsia-200":"from-sky-600 to-cyan-500 dark:from-sky-300 dark:to-cyan-200"),children:[e.jsx("div",{className:x("p-2 rounded-2xl shadow-inner border animate-icon-bob",l.mode==="online"?"bg-purple-100 dark:bg-purple-900/50 border-purple-200 dark:border-purple-700/50":"bg-sky-100 dark:bg-sky-900/50 border-sky-200 dark:border-sky-700/50"),children:l.mode==="online"?e.jsx(ve,{className:"h-8 w-8 text-purple-600 dark:text-purple-400 drop-shadow-[0_0_8px_rgba(138,63,211,0.5)]"}):e.jsx(Pe,{className:"h-8 w-8 text-sky-600 dark:text-sky-400 drop-shadow-[0_0_8px_rgba(31,167,225,0.5)]"})}),l.mode==="online"?"1v1 Online":"1v1 vs Bot"]}),e.jsx("p",{className:x("text-[10px] sm:text-[12px] font-black uppercase tracking-[0.2em] mt-1.5 drop-shadow-sm",l.mode==="online"?"text-purple-600/80 dark:text-purple-400/80":"text-sky-600/80 dark:text-sky-400/80"),children:l.mode==="online"?"CHALLENGE YOUR SCHOOLMATES AND PROVE YOUR SKILLS.":"CHALLENGE THE AI AND SHARPEN YOUR SKILLS."})]})]})]}),e.jsx("div",{className:"rounded-[24px] border border-white/40 bg-white/85 dark:border-white/10 dark:bg-black/80 backdrop-blur-xl p-5 sm:p-7 shadow-xl",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-10",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1.5 group",children:[e.jsx("label",{className:x("text-[11px] font-black uppercase tracking-[0.12em] ml-1",l.mode==="online"?"text-[#8A3FD3] dark:text-[#a35ceb]":"text-[#1FA7E1] dark:text-[#4bc1f2]"),children:"Category"}),e.jsxs(_e,{value:l.subjectId,onValueChange:t=>w(o=>({...o,subjectId:t})),children:[e.jsx(Se,{className:x("rounded-xl h-11 border-white/20 bg-white/60 dark:bg-black/50 dark:border-white/10 transition-colors shadow-inner",l.mode==="online"?"hover:border-[#8A3FD3]/50":"hover:border-[#1FA7E1]/50",W("subjectId")&&"border-rose-400"),children:e.jsx(Ae,{placeholder:"Select category"})}),e.jsx(Ce,{className:"rounded-xl backdrop-blur-xl bg-white/90 dark:bg-[#1a1f2e]/90",children:me.map(t=>e.jsx(J,{value:t.id,className:"rounded-lg",children:t.title},t.id))})]}),W("subjectId")&&e.jsx("p",{className:"text-xs text-destructive dark:text-rose-300 ml-1",children:W("subjectId")})]}),e.jsxs("div",{className:"space-y-1.5 group",children:[e.jsx("label",{className:x("text-[11px] font-black uppercase tracking-[0.12em] ml-1",l.mode==="online"?"text-[#8A3FD3] dark:text-[#a35ceb]":"text-[#1FA7E1] dark:text-[#4bc1f2]"),children:"Strand / Topic Group"}),e.jsxs(_e,{value:l.topicId,onValueChange:t=>w(o=>({...o,topicId:t})),children:[e.jsx(Se,{className:x("rounded-xl h-11 border-white/20 bg-white/60 dark:bg-black/50 dark:border-white/10 transition-colors shadow-inner",l.mode==="online"?"hover:border-[#8A3FD3]/50":"hover:border-[#1FA7E1]/50",W("topicId")&&"border-rose-400"),children:e.jsx(Ae,{placeholder:"Select topic group"})}),e.jsx(Ce,{className:"rounded-xl backdrop-blur-xl bg-white/90 dark:bg-[#1a1f2e]/90",children:qa.map(t=>e.jsx(J,{value:t.value,className:"rounded-lg",children:t.label},t.value))})]}),W("topicId")&&e.jsx("p",{className:"text-xs text-destructive dark:text-rose-300 ml-1",children:W("topicId")})]}),e.jsxs("div",{className:"space-y-1.5 group",children:[e.jsx("label",{className:x("text-[11px] font-black uppercase tracking-[0.12em] ml-1",l.mode==="online"?"text-[#8A3FD3] dark:text-[#a35ceb]":"text-[#1FA7E1] dark:text-[#4bc1f2]"),children:l.mode==="online"?"Difficulty":"Bot Difficulty"}),e.jsxs(_e,{value:l.mode==="bot"?l.adaptiveBot?"adaptive":l.botDifficulty:l.difficulty,onValueChange:t=>w(o=>o.mode==="bot"?{...o,botDifficulty:t,adaptiveBot:t==="adaptive"}:{...o,difficulty:t}),children:[e.jsx(Se,{className:x("rounded-xl h-11 border-white/20 bg-white/60 dark:bg-black/50 dark:border-white/10 transition-colors shadow-inner",l.mode==="online"?"hover:border-[#8A3FD3]/50":"hover:border-[#1FA7E1]/50"),children:e.jsx(Ae,{})}),e.jsxs(Ce,{className:"rounded-xl backdrop-blur-xl bg-white/90 dark:bg-[#1a1f2e]/90",children:[e.jsx(J,{value:"easy",className:"rounded-lg",children:"Easy"}),e.jsx(J,{value:"medium",className:"rounded-lg",children:"Medium"}),e.jsx(J,{value:"hard",className:"rounded-lg",children:"Hard"}),l.mode==="bot"&&e.jsx(J,{value:"adaptive",className:"rounded-lg",children:"Adaptive"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1.5 group",children:[e.jsx("label",{className:x("text-[10px] sm:text-[11px] font-black uppercase tracking-[0.12em] ml-1",l.mode==="online"?"text-[#8A3FD3] dark:text-[#a35ceb]":"text-[#1FA7E1] dark:text-[#4bc1f2]"),children:"Questions"}),e.jsxs(_e,{value:String(l.rounds),onValueChange:t=>w(o=>({...o,rounds:Number(t)})),children:[e.jsx(Se,{className:x("rounded-xl h-11 border-white/20 bg-white/60 dark:bg-black/50 dark:border-white/10 transition-colors shadow-inner",l.mode==="online"?"hover:border-[#8A3FD3]/50":"hover:border-[#1FA7E1]/50",W("rounds")&&"border-rose-400"),children:e.jsx(Ae,{})}),e.jsx(Ce,{className:"rounded-xl backdrop-blur-xl bg-white/90 dark:bg-[#1a1f2e]/90",children:[3,5,7,10,12,15].map(t=>e.jsx(J,{value:String(t),className:"rounded-lg",children:t},t))})]}),W("rounds")&&e.jsx("p",{className:"text-xs text-destructive dark:text-rose-300 ml-1",children:W("rounds")})]}),e.jsxs("div",{className:"space-y-1.5 group",children:[e.jsx("label",{className:x("text-[10px] sm:text-[11px] font-black uppercase tracking-[0.12em] ml-1 line-clamp-1",l.mode==="online"?"text-[#8A3FD3] dark:text-[#a35ceb]":"text-[#1FA7E1] dark:text-[#4bc1f2]"),children:"Time / Q"}),e.jsxs(_e,{value:String(l.timePerQuestionSec),onValueChange:t=>w(o=>({...o,timePerQuestionSec:Number(t)})),children:[e.jsx(Se,{className:x("rounded-xl h-11 border-white/20 bg-white/60 dark:bg-black/50 dark:border-white/10 transition-colors shadow-inner",l.mode==="online"?"hover:border-[#8A3FD3]/50":"hover:border-[#1FA7E1]/50",W("timePerQuestionSec")&&"border-rose-400"),children:e.jsx(Ae,{})}),e.jsx(Ce,{className:"rounded-xl backdrop-blur-xl bg-white/90 dark:bg-[#1a1f2e]/90",children:[15,20,30,45,60,90].map(t=>e.jsxs(J,{value:String(t),className:"rounded-lg",children:[t," sec"]},t))})]}),W("timePerQuestionSec")&&e.jsx("p",{className:"text-xs text-destructive dark:text-rose-300 ml-1",children:W("timePerQuestionSec")})]})]})]}),e.jsxs("div",{className:"flex flex-col justify-between space-y-6",children:[e.jsxs("div",{className:"space-y-5",children:[l.mode==="online"&&e.jsxs("div",{className:"space-y-3 rounded-2xl border border-[#8A3FD3]/20 bg-[#8A3FD3]/5 dark:border-[#8A3FD3]/20 p-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-[11px] font-black uppercase tracking-[0.12em] text-[#8A3FD3] dark:text-[#a35ceb] ml-1",children:"Online Match Type"}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:[{value:"public_matchmaking",label:"Public Queue"},{value:"private_room",label:"Private Room"}].map(t=>e.jsx(A,{type:"button",variant:l.queueType===t.value?"default":"outline",className:x("rounded-xl h-11 transition-all border-none font-bold text-xs",l.queueType===t.value?"bg-[#8A3FD3] hover:bg-[#7b35c0] text-white shadow-md shadow-[#8A3FD3]/30":"bg-white/50 hover:bg-white/80 dark:bg-black/30 dark:hover:bg-black/50 text-[#8A3FD3] dark:text-[#d3a8ff]"),onClick:()=>w(o=>({...o,queueType:t.value})),children:t.label},t.value))})]}),l.queueType==="private_room"&&e.jsxs(y.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"pt-2 space-y-2",children:[e.jsx("label",{className:"text-[11px] font-black uppercase tracking-[0.12em] text-[#8A3FD3] dark:text-[#a35ceb] ml-1",children:"Room Code (optional)"}),e.jsx(as,{value:U,onChange:t=>S(t.target.value.toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,6)),placeholder:"Leave blank to create a room",className:"rounded-xl h-12 text-center text-lg uppercase font-bold tracking-[0.25em] border-[#8A3FD3]/30 bg-white/80 dark:bg-black/50 dark:border-[#8A3FD3]/20 focus-visible:ring-[#8A3FD3]/50 shadow-inner",maxLength:6}),e.jsx("div",{className:"rounded-xl border border-[#8A3FD3]/30 bg-[#8A3FD3]/10 px-3 py-3 text-[12px] font-semibold text-[#6620a2] leading-snug dark:border-[#8A3FD3]/30 dark:bg-[#8A3FD3]/10 dark:text-[#d3a8ff]",children:"Enter a room code to join an existing battle, or leave it blank to create a new room and share your code."})]})]}),e.jsxs("label",{className:x("flex flex-col sm:flex-row sm:items-center justify-between rounded-[16px] border bg-white/50 p-4 transition-colors cursor-pointer shadow-sm dark:bg-black/50 group",l.mode==="online"?"border-[#8A3FD3]/20 hover:bg-[#8A3FD3]/5 dark:border-[#8A3FD3]/20 dark:hover:bg-[#8A3FD3]/10":"border-[#1FA7E1]/20 hover:bg-[#1FA7E1]/5 dark:border-[#1FA7E1]/20 dark:hover:bg-[#1FA7E1]/10"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:x("h-11 w-11 rounded-full flex items-center justify-center group-hover:scale-110 transition-transform",l.mode==="online"?"bg-[#8A3FD3]/10 text-[#8A3FD3] dark:text-[#c48bfc]":"bg-[#1FA7E1]/10 text-[#1FA7E1] dark:text-[#7ad8ff]"),children:ee?e.jsx(fa,{className:"h-5 w-5"}):e.jsx(ga,{className:"h-5 w-5 opacity-60"})}),e.jsxs("div",{className:"mb-3 sm:mb-0",children:[e.jsx("p",{className:"text-sm font-bold text-slate-800 dark:text-slate-200",children:"Battle Sounds"}),e.jsx("p",{className:"text-xs font-medium text-slate-500 dark:text-slate-400",children:"Cues for countdowns and results."})]})]}),e.jsx(sa,{checked:ee,onCheckedChange:Dt})]}),e.jsxs(y.div,{initial:!1,animate:{opacity:ee?1:.45,y:ee?0:-2},className:x("rounded-[16px] border bg-white/40 p-4 shadow-sm dark:bg-black/40",l.mode==="online"?"border-[#8A3FD3]/20 dark:border-[#8A3FD3]/20":"border-[#1FA7E1]/20 dark:border-[#1FA7E1]/20"),children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[e.jsx("p",{className:"text-xs font-black uppercase tracking-[0.14em] text-slate-700 dark:text-slate-200",children:"SFX Volume"}),e.jsxs("p",{className:"text-xs font-bold text-slate-500 dark:text-slate-400",children:[Math.round(he*100),"%"]})]}),e.jsx("input",{type:"range",min:0,max:100,step:1,value:Math.round(he*100),disabled:!ee,onChange:t=>{const o=Ze(Number(t.target.value)/100,0,1);Ca(o)},onMouseUp:()=>D("tick"),onTouchEnd:()=>D("tick"),className:"h-2 w-full cursor-pointer accent-violet-500 disabled:cursor-not-allowed disabled:opacity-50","aria-label":"Battle sound effects volume"})]})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{"aria-live":"polite",className:"min-h-[24px] text-sm font-medium",children:[k.status==="queued"&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:x("inline-flex items-center gap-1 text-[13px] font-bold px-3 py-1.5 rounded-lg",l.mode==="online"?"text-[#8A3FD3] bg-[#8A3FD3]/10":"text-[#1FA7E1] bg-[#1FA7E1]/10"),children:k.message}),l.mode==="online"&&l.queueType==="private_room"&&u?.roomCode&&e.jsxs(A,{type:"button",variant:"outline",className:x("h-8 rounded-full border-emerald-500/50 bg-emerald-50 px-4 text-xs font-black uppercase tracking-[0.16em] text-emerald-900 shadow-sm hover:bg-emerald-100 hover:scale-105 transition-all dark:border-emerald-500/40 dark:bg-emerald-500/10 dark:text-emerald-300 dark:hover:bg-emerald-500/20",E===u.roomCode&&"scale-105 bg-emerald-200 dark:bg-emerald-500/30"),onClick:()=>void Wt(u.roomCode),"aria-label":`Copy room code ${u.roomCode}`,children:[E===u.roomCode?e.jsx(vt,{className:"h-4 w-4"}):e.jsx(aa,{className:"h-4 w-4"}),u.roomCode]}),(j||Jt)&&ae>0&&e.jsxs("span",{className:x("inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-bold animate-pulse",l.mode==="online"?"bg-[#8A3FD3]/10 text-[#8A3FD3]":"bg-[#1FA7E1]/10 text-[#1FA7E1]"),children:["Waiting ",ua(ae)]})]}),k.status==="error"&&e.jsx("span",{className:"inline-flex items-center gap-1.5 text-[13px] font-bold text-rose-600 dark:text-rose-400 bg-rose-50 dark:bg-rose-500/10 px-3 py-1.5 rounded-lg border border-rose-200 dark:border-rose-500/20",children:k.message}),k.status==="validating"&&e.jsxs("span",{className:x("inline-flex items-center gap-2 font-bold px-3 py-1.5 rounded-lg",l.mode==="online"?"text-[#8A3FD3] bg-[#8A3FD3]/10":"text-[#1FA7E1] bg-[#1FA7E1]/10"),children:[e.jsx(Je,{className:"h-4 w-4 animate-spin"})," Validating..."]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[Ha&&e.jsx(A,{type:"button",variant:"outline",onClick:Kt,disabled:k.status==="validating",className:"rounded-xl h-14 flex-1 sm:flex-none border-slate-300 hover:bg-slate-100 dark:border-slate-700 dark:hover:bg-slate-800 font-bold px-6",children:u?"Cancel room":"Leave queue"}),e.jsx(A,{type:"button",onClick:Oa,disabled:k.status==="validating"||j||Jt,className:x("rounded-xl h-14 flex-1 px-8 font-black uppercase tracking-wide text-sm shadow-xl hover:scale-[1.02] active:scale-95 transition-all text-white border-0",l.mode==="online"?"bg-[#8A3FD3] hover:bg-[#7b35c0] shadow-[#8A3FD3]/40":"bg-[#1FA7E1] hover:bg-[#1a95c9] shadow-[#1FA7E1]/40"),children:k.status==="validating"?e.jsxs("span",{className:"inline-flex items-center gap-2",children:[e.jsx(Je,{className:"h-5 w-5 animate-spin"})," Starting..."]}):l.mode==="online"&&l.queueType==="private_room"?U.trim()?"Join Room":"Create Room":"Start Battle"})]})]})]})]})})]},"setup")}),e.jsx(ze,{value:"battle",className:"mt-0 outline-none",children:e.jsx(y.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:-12},className:"space-y-4",children:s?e.jsxs(te,{className:x(O,"rounded-[18px]"),children:[e.jsxs(le,{children:[e.jsxs(ie,{className:"text-base flex items-center justify-between gap-3",children:[e.jsxs("span",{className:"inline-flex items-center gap-2",children:[s.mode==="bot"?e.jsx(Pe,{className:"h-4 w-4 text-primary dark:text-[#9e8fff]"}):e.jsx(ve,{className:"h-4 w-4 text-primary dark:text-[#9e8fff]"}),"vs ",s.opponentName]}),e.jsxs("div",{className:"inline-flex items-center gap-2",children:[gt,e.jsxs("span",{className:"text-sm font-bold tabular-nums",children:[s.scoreFor," - ",s.scoreAgainst]})]})]}),e.jsx(pe,{className:"text-muted-foreground dark:text-[#b2bad0]",children:s.status==="completed"?`Completed in ${s.totalRounds} rounds.`:s.status==="ready"?s.mode==="online"?"Waiting for both players to confirm and start together.":"Finalizing practice bot session start.":`Round ${s.currentRound} of ${s.totalRounds}${B?" (paused for design)":""}`}),ma(s.lifecycle,n?.uid)&&e.jsx("p",{className:"text-xs font-medium text-muted-foreground dark:text-[#9aa4be]",children:ma(s.lifecycle,n?.uid)})]}),e.jsxs(ge,{className:"space-y-4",children:[s.status==="ready"&&e.jsxs("div",{className:"rounded-xl border border-border bg-muted/30 p-4 dark:border-[#2f3547] dark:bg-[#11151d] flex flex-col gap-3",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground dark:text-[#ecf0fb]",children:s.mode==="online"?"Waiting for both players to lock in start...":"Starting practice bot round..."}),s.mode==="online"&&s.expiresAtMs&&e.jsxs("p",{className:"text-xs font-medium text-muted-foreground dark:text-[#9aa4be]",children:["Public match expires in ",e.jsx("span",{className:"font-semibold tabular-nums",children:ua(ae)})," if the synchronized start does not happen."]}),e.jsx(A,{variant:"outline",size:"sm",className:"w-full text-rose-500 border-rose-200 hover:bg-rose-50 dark:border-rose-900 dark:hover:bg-rose-900/30",onClick:()=>{_(null),v(null),h(!1),b({status:"idle"}),d("setup")},children:"Force Cancel"})]}),s.status==="in_progress"&&s.currentQuestion&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"rounded-xl border border-border bg-muted/40 p-3 dark:border-[#2f3547] dark:bg-[#11151d]",children:[e.jsxs("p",{className:"text-xs text-muted-foreground dark:text-[#9aa4be]",children:["Time left: ",e.jsxs("span",{className:"font-semibold tabular-nums",children:[P,"s"]}),B?" (paused)":""]}),B&&e.jsx("p",{className:"mt-1 text-[11px] font-medium text-amber-700 dark:text-amber-300",children:"Design pause keeps this battle screen static while you edit UI."})]}),e.jsx("p",{className:"text-lg font-bold text-foreground dark:text-[#f5f7fb]",children:s.currentQuestion.prompt}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:s.currentQuestion.choices.map((t,o)=>e.jsxs(A,{type:"button",variant:ye===o?"default":"outline",onClick:()=>X(o),disabled:G||Z||B,className:x("h-auto min-h-[48px] justify-start text-left font-medium px-4 py-3 rounded-xl whitespace-normal",ye===o?"ring-2 ring-primary ring-offset-2 dark:ring-offset-[#0B0F19]":""),children:[e.jsxs("span",{className:"mr-2 font-semibold",children:[String.fromCharCode(65+o),"."]}),t]},o))}),e.jsx("div",{className:"flex justify-end",children:e.jsx(A,{type:"button",onClick:()=>void Ue(ye),disabled:G||Z||B,className:"rounded-xl",children:B?e.jsxs("span",{className:"inline-flex items-center gap-2",children:[e.jsx(cs,{className:"h-4 w-4"})," Paused for design"]}):G?e.jsxs("span",{className:"inline-flex items-center gap-2",children:[e.jsx(Je,{className:"h-4 w-4 animate-spin"})," Submitting..."]}):Z?"Waiting for opponent...":"Lock Answer"})})]}),M&&e.jsxs("div",{className:"rounded-xl border border-border bg-muted/30 p-3 dark:border-[#2f3547] dark:bg-[#11151d]",children:[e.jsxs("p",{className:"text-sm font-semibold text-foreground dark:text-[#ecf0fb]",children:["Last round: ",M.studentCorrect?"Correct":"Incorrect"," · ",s.mode==="bot"?"Bot":"Opponent"," ",M.botCorrect?"Correct":"Incorrect"]}),e.jsxs("p",{className:"text-xs text-muted-foreground dark:text-[#9aa4be]",children:["Correct option: ",String.fromCharCode(65+M.correctOptionIndex)]})]}),s.status==="completed"&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:x("rounded-2xl border p-4",s.outcome==="win"?"border-emerald-300 bg-emerald-50 dark:border-emerald-400/40 dark:bg-emerald-900/20":s.outcome==="loss"?"border-rose-300 bg-rose-50 dark:border-rose-400/40 dark:bg-rose-900/20":"border-amber-300 bg-amber-50 dark:border-amber-400/40 dark:bg-amber-900/20"),children:[e.jsx("p",{className:"text-lg font-black tracking-wide text-foreground dark:text-[#ecf0fb]",children:s.outcome==="win"?"Victory!":s.outcome==="loss"?"Match Complete":"Draw Match"}),e.jsxs("p",{className:"mt-1 text-sm font-semibold text-foreground dark:text-[#ecf0fb]",children:["Final Score: ",s.scoreFor," - ",s.scoreAgainst]}),e.jsxs("p",{className:"text-xs text-muted-foreground dark:text-[#9aa4be]",children:["XP Earned: +",s.xpBreakdown?.totalXPAwarded??s.xpEarned??0,s.xpBreakdown&&e.jsxs("span",{className:"block",children:["Base: +",s.xpBreakdown.baseMatchXP," + Performance: +",s.xpBreakdown.performanceXP]})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx(A,{type:"button",variant:"outline",onClick:()=>{_(null),v(null),h(!1),d("setup")},className:"rounded-xl",children:"Start New Match"}),s.mode==="bot"&&e.jsx(A,{type:"button",onClick:()=>void Gt(),disabled:G,className:"rounded-xl",children:"Rematch"})]})]})]})]}):u?e.jsxs(te,{className:x(O,"rounded-[18px]"),children:[e.jsxs(le,{children:[e.jsxs(ie,{className:"text-base flex items-center gap-2",children:[e.jsx(ve,{className:"h-4 w-4 text-primary dark:text-[#9e8fff]"}),"Private Room Lobby"]}),e.jsxs(pe,{className:"text-muted-foreground dark:text-[#b2bad0]",children:["Room ",u.roomCode," · ",u.participantCount,"/2 students connected."]})]}),e.jsx(ge,{className:"space-y-3",children:e.jsxs("div",{className:"rounded-xl border border-border bg-muted/30 p-3 dark:border-[#2f3547] dark:bg-[#11151d]",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground dark:text-[#ecf0fb]",children:u.status==="ready"?"Opponent connected. Syncing start...":"Waiting for another student to join this room."}),e.jsxs("p",{className:"text-xs text-muted-foreground dark:text-[#9aa4be]",children:["Share room code ",u.roomCode," with your classmate."]}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center justify-end gap-2",children:[(u.status==="waiting"||u.status==="ready")&&e.jsx(A,{type:"button",variant:"outline",className:"h-8 rounded-lg",onClick:Kt,disabled:k.status==="validating",children:"Cancel room"}),e.jsxs(A,{type:"button",variant:"outline",className:"h-8 rounded-lg",onClick:()=>void Wt(u.roomCode),children:[E===u.roomCode?e.jsx(vt,{className:"h-4 w-4"}):e.jsx(aa,{className:"h-4 w-4"}),E===u.roomCode?"Copied":"Copy code"]})]})]})})]}):j?e.jsx(te,{className:x(O,"rounded-[18px]"),children:e.jsxs(le,{children:[e.jsxs(ie,{className:"text-base flex items-center gap-2",children:[e.jsx(ve,{className:"h-4 w-4 text-primary dark:text-[#9e8fff]"}),"Public Matchmaking"]}),e.jsx(pe,{className:"text-muted-foreground dark:text-[#b2bad0]",children:"Searching for a student with the same setup..."})]})}):e.jsx(te,{className:x(O,"rounded-[18px]"),children:e.jsxs(le,{children:[e.jsxs(ie,{className:"text-base flex items-center gap-2",children:[e.jsx(jt,{className:"h-4 w-4 text-primary dark:text-[#9e8fff]"}),"No active battle"]}),e.jsx(pe,{className:"text-muted-foreground dark:text-[#b2bad0]",children:"Start from Setup to create a bot match, private room, or public queue session."})]})})},"battle")}),e.jsx(ze,{value:"history",className:"mt-0 outline-none",children:e.jsxs(y.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:-12},className:"space-y-4",children:[e.jsxs(y.div,{className:x(O,"relative overflow-hidden rounded-[24px] mb-6 border-emerald-500/20 shadow-[0_0_40px_-10px_rgba(16,185,129,0.2)]"),whileHover:{scale:1.01},transition:{type:"spring",stiffness:300,damping:20},children:[e.jsx("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-r from-emerald-500/20 via-teal-500/10 to-emerald-600/5 dark:from-emerald-500/20 dark:via-teal-500/10 dark:to-teal-900/10"}),e.jsx("div",{className:"pointer-events-none absolute -top-24 -right-24 h-64 w-64 rounded-full bg-emerald-400/20 blur-3xl animate-orb-pulse"}),e.jsx("div",{className:"pointer-events-none absolute -bottom-12 -left-12 h-40 w-40 rounded-full bg-teal-400/20 blur-2xl animate-orb-pulse-delayed"}),e.jsx("div",{className:"relative z-10 p-6 sm:p-8 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(A,{variant:"ghost",onClick:()=>d("hub"),className:"h-12 w-12 p-0 rounded-full bg-white/50 dark:bg-black/40 hover:bg-white/80 dark:hover:bg-black/60 hover:scale-105 transition-all backdrop-blur-md border border-emerald-500/30 shadow-[0_0_15px_rgba(16,185,129,0.2)] shrink-0",children:e.jsx(Ye,{className:"h-6 w-6 rotate-180 text-emerald-800 dark:text-emerald-300"})}),e.jsxs("div",{children:[e.jsxs("h2",{className:"flex items-center gap-3 text-3xl sm:text-4xl font-black tracking-tight text-transparent bg-clip-text bg-gradient-to-br from-emerald-600 to-teal-500 dark:from-emerald-300 dark:to-teal-200 drop-shadow-sm",children:[e.jsx("div",{className:"bg-emerald-100 dark:bg-emerald-900/50 p-2 rounded-2xl shadow-inner border border-emerald-200 dark:border-emerald-700/50 animate-icon-rotate",children:e.jsx(na,{className:"h-8 w-8 text-emerald-600 dark:text-emerald-400 drop-shadow-[0_0_8px_rgba(16,185,129,0.5)]"})}),"Matches History"]}),e.jsx("p",{className:"text-sm font-bold text-emerald-800/80 dark:text-emerald-100/70 mt-2 tracking-wide uppercase",children:"Review your past duels and track your progress."})]})]})})]}),e.jsxs(te,{className:x(O,"rounded-[18px]"),children:[e.jsxs(le,{children:[e.jsx(ie,{className:"text-base",children:"Match History"}),e.jsx(pe,{className:"text-muted-foreground dark:text-[#b2bad0]",children:"Your recent student battles only."})]}),e.jsxs(ge,{className:"space-y-3",children:[e.jsx("div",{className:"flex gap-2",children:[{value:"all",label:"All"},{value:"online",label:"Online"},{value:"bot",label:"Bot"}].map(t=>e.jsx(A,{type:"button",variant:je===t.value?"default":"outline",onClick:()=>za(t.value),className:"rounded-xl h-8 px-3",children:t.label},t.value))}),qt?e.jsxs("div",{className:"space-y-2",children:[e.jsx(we,{className:"h-12 w-full rounded-xl bg-muted dark:bg-[#2a3143]"}),e.jsx(we,{className:"h-12 w-full rounded-xl bg-muted dark:bg-[#2a3143]"})]}):Ve.length===0?e.jsx("p",{className:"text-sm text-muted-foreground dark:text-[#a8b2c9]",children:"No matches in this filter yet."}):Ve.map(t=>e.jsxs("div",{className:"rounded-xl border border-border bg-muted/40 px-3 py-2 flex items-center justify-between gap-3 dark:border-[#2f3547] dark:bg-[#11151d]",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm font-semibold text-foreground dark:text-[#f5f7fb]",children:["vs ",t.opponentName]}),e.jsxs("p",{className:"text-xs text-muted-foreground dark:text-[#95a0bb] tabular-nums",children:[t.scoreFor,"-",t.scoreAgainst," · ",t.accuracy.toFixed(0),"% · +",t.xpEarned," XP"]})]}),e.jsx("span",{className:x("text-xs font-semibold rounded-full px-2.5 py-1 border",t.outcome==="win"?"text-emerald-700 border-emerald-200 bg-emerald-50 dark:text-emerald-300 dark:border-emerald-300/40 dark:bg-emerald-900/20":t.outcome==="loss"?"text-rose-700 border-rose-200 bg-rose-50 dark:text-rose-300 dark:border-rose-300/40 dark:bg-rose-900/20":"text-amber-700 border-amber-200 bg-amber-50 dark:text-amber-300 dark:border-amber-300/40 dark:bg-amber-900/20"),children:Ds(t.outcome)})]},t.matchId))]})]})]},"history")}),e.jsx(ze,{value:"stats",className:"mt-0 outline-none",children:e.jsxs(y.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:-12},className:"space-y-4",children:[e.jsxs(y.div,{className:x(O,"relative overflow-hidden rounded-[24px] mb-6 border-indigo-500/20 shadow-[0_0_40px_-10px_rgba(99,102,241,0.2)]"),whileHover:{scale:1.01},transition:{type:"spring",stiffness:300,damping:20},children:[e.jsx("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-r from-indigo-500/20 via-purple-500/10 to-indigo-600/5 dark:from-indigo-500/20 dark:via-purple-500/10 dark:to-purple-900/10"}),e.jsx("div",{className:"pointer-events-none absolute -top-24 -right-24 h-64 w-64 rounded-full bg-indigo-400/20 blur-3xl animate-orb-pulse"}),e.jsx("div",{className:"pointer-events-none absolute -bottom-12 -left-12 h-40 w-40 rounded-full bg-purple-400/20 blur-2xl animate-orb-pulse-delayed"}),e.jsx("div",{className:"relative z-10 p-6 sm:p-8 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(A,{variant:"ghost",onClick:()=>d("hub"),className:"h-12 w-12 p-0 rounded-full bg-white/50 dark:bg-black/40 hover:bg-white/80 dark:hover:bg-black/60 hover:scale-105 transition-all backdrop-blur-md border border-indigo-500/30 shadow-[0_0_15px_rgba(99,102,241,0.2)] shrink-0",children:e.jsx(Ye,{className:"h-6 w-6 rotate-180 text-indigo-800 dark:text-indigo-300"})}),e.jsxs("div",{children:[e.jsxs("h2",{className:"flex items-center gap-3 text-3xl sm:text-4xl font-black tracking-tight text-transparent bg-clip-text bg-gradient-to-br from-indigo-600 to-purple-500 dark:from-indigo-300 dark:to-purple-200 drop-shadow-sm",children:[e.jsx("div",{className:"bg-indigo-100 dark:bg-indigo-900/50 p-2 rounded-2xl shadow-inner border border-indigo-200 dark:border-indigo-700/50 animate-icon-bob",children:e.jsx(Bt,{className:"h-8 w-8 text-indigo-600 dark:text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]"})}),"My Statistics"]}),e.jsx("p",{className:"text-sm font-bold text-indigo-800/80 dark:text-indigo-100/70 mt-2 tracking-wide uppercase",children:"Analyzing your battlefield performance."})]})]})})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4",children:[{label:"Wins",value:se?.wins??0,icon:kt},{label:"Current streak",value:se?.currentStreak??0,icon:et},{label:"Avg accuracy",value:`${(se?.averageAccuracy||0).toFixed(1)}%`,icon:os},{label:"Avg response",value:Ps(se?.averageResponseMs||0),icon:ra}].map(t=>e.jsx(te,{className:x(O,"rounded-[18px]"),children:e.jsxs(ge,{className:"pt-6",children:[e.jsx("p",{className:"text-xs text-muted-foreground dark:text-[#9da7bf]",children:t.label}),e.jsx("p",{className:"mt-1 tabular-nums text-2xl font-black text-foreground dark:text-[#f5f7fb]",children:t.value}),e.jsx(t.icon,{className:"mt-3 h-4 w-4 text-primary dark:text-[#9e8fff]"})]})},t.label))})]},"stats")}),e.jsx(ze,{value:"leaderboard",className:"mt-0 outline-none",children:e.jsxs(y.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:-12},className:"space-y-4",children:[e.jsxs(y.div,{className:x(O,"relative overflow-hidden rounded-[24px] mb-6 border-amber-500/20 shadow-[0_0_40px_-10px_rgba(245,158,11,0.2)]"),whileHover:{scale:1.01},transition:{type:"spring",stiffness:300,damping:20},children:[e.jsx("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-r from-amber-500/20 via-orange-500/10 to-amber-600/5 dark:from-amber-600/20 dark:via-orange-500/10 dark:to-orange-900/10"}),e.jsx("div",{className:"pointer-events-none absolute -top-24 -right-24 h-64 w-64 rounded-full bg-amber-400/20 blur-3xl animate-orb-pulse"}),e.jsx("div",{className:"pointer-events-none absolute -bottom-12 -left-12 h-40 w-40 rounded-full bg-orange-400/20 blur-2xl animate-orb-pulse-delayed"}),e.jsx("div",{className:"relative z-10 p-6 sm:p-8 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(A,{variant:"ghost",onClick:()=>d("hub"),className:"h-12 w-12 p-0 rounded-full bg-white/50 dark:bg-black/40 hover:bg-white/80 dark:hover:bg-black/60 hover:scale-105 transition-all backdrop-blur-md border border-amber-500/30 shadow-[0_0_15px_rgba(245,158,11,0.2)] shrink-0",children:e.jsx(Ye,{className:"h-6 w-6 rotate-180 text-amber-800 dark:text-amber-300"})}),e.jsxs("div",{children:[e.jsxs("h2",{className:"flex items-center gap-3 text-3xl sm:text-4xl font-black tracking-tight text-transparent bg-clip-text bg-gradient-to-br from-amber-600 to-orange-500 dark:from-amber-300 dark:to-orange-200 drop-shadow-sm",children:[e.jsx(y.div,{animate:{scale:[1,1.1,1]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"bg-amber-100 dark:bg-amber-900/50 p-2 rounded-2xl shadow-inner border border-amber-200 dark:border-amber-700/50",children:e.jsx(kt,{className:"h-8 w-8 text-amber-600 dark:text-amber-400 drop-shadow-[0_0_12px_rgba(245,158,11,0.6)]"})}),"Hall of Fame"]}),e.jsx("p",{className:"text-sm font-bold text-amber-800/80 dark:text-amber-100/70 mt-2 tracking-wide uppercase",children:"The top-ranked minds across the globe."})]})]})})]}),e.jsxs(te,{className:x(O,"rounded-[18px]"),children:[e.jsxs(le,{children:[e.jsxs(ie,{className:"text-base flex items-center gap-2",children:[e.jsx(Xa,{className:"h-4 w-4 text-primary dark:text-[#9e8fff]"})," Hall of Fame"]}),e.jsx(pe,{className:"text-muted-foreground dark:text-[#b2bad0]",children:"Student-only ranking using trusted backend aggregates."})]}),e.jsx(ge,{children:Ia?e.jsxs("div",{className:"space-y-2",children:[e.jsx(we,{className:"h-12 w-full rounded-xl bg-muted dark:bg-[#2a3143]"}),e.jsx(we,{className:"h-12 w-full rounded-xl bg-muted dark:bg-[#2a3143]"}),e.jsx(we,{className:"h-12 w-full rounded-xl bg-muted dark:bg-[#2a3143]"})]}):Xt.length===0?e.jsx("p",{className:"text-sm text-muted-foreground dark:text-[#a9b3ca]",children:"No leaderboard entries yet. Finish a battle to place on the board."}):e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-2",children:[e.jsxs("div",{className:"rounded-xl border border-border bg-muted/30 p-2.5 dark:border-[#2f3547] dark:bg-[#11151d]",children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground dark:text-[#98a2bc]",children:"Name display"}),e.jsxs(_e,{value:qe,onValueChange:t=>Ba(t),children:[e.jsx(Se,{className:"mt-1 h-8 rounded-lg",children:e.jsx(Ae,{})}),e.jsxs(Ce,{children:[e.jsx(J,{value:"alias",children:"Alias"}),e.jsx(J,{value:"initials",children:"Initials"}),e.jsx(J,{value:"full",children:"Full name"})]})]})]}),e.jsxs("label",{className:"rounded-xl border border-border bg-muted/30 p-2.5 flex items-center justify-between gap-3 dark:border-[#2f3547] dark:bg-[#11151d]",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground dark:text-[#98a2bc]",children:"Score detail"}),e.jsx("p",{className:"text-xs text-muted-foreground dark:text-[#98a2bc]",children:"Show exact score values"})]}),e.jsx(sa,{checked:ct,onCheckedChange:Fa})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground dark:text-[#95a0bb]",children:"Privacy mode keeps classmate identities and scores obfuscated by default while preserving your own exact rank and score."}),Xt.map(t=>e.jsxs("div",{className:x("rounded-xl border bg-muted/30 px-3 py-2 flex items-center justify-between dark:bg-[#11151d]",t.isSelf?"border-primary/60 dark:border-[#8d7fff]":"border-border dark:border-[#2f3547]"),children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm font-semibold text-foreground dark:text-[#f5f7fb]",children:["#",t.rank," ",t.displayName,t.isSelf?" (You)":""]}),e.jsxs("p",{className:"text-xs text-muted-foreground dark:text-[#95a0bb]",children:["Win rate ",t.winRate.toFixed(1),"% · Best streak ",t.bestStreak]})]}),e.jsx("p",{className:"tabular-nums text-sm font-semibold text-foreground dark:text-[#f5f7fb]",children:t.scoreLabel})]},t.userId))]})})]})]},"leaderboard")})]})})})})]})};export{wr as default}; diff --git a/assets/QuizBattlePage-DP7m_bnv.js b/assets/QuizBattlePage-DP7m_bnv.js deleted file mode 100644 index 30172e9329bb06c2aab2ce2b1f62b27385c09870..0000000000000000000000000000000000000000 --- a/assets/QuizBattlePage-DP7m_bnv.js +++ /dev/null @@ -1,131 +0,0 @@ -import{c as ye,f as p,m as w,d as rt,ap as Le,O as lt,aq as q,F as Wa,M as Ua,B as Qe,h as tt,u as Ya,_ as Xa,E as Ga}from"./index-fWY85Kyg.js";import{r as l,j as e,d as Tt}from"./vendor-react-B4AQeu28.js";import{q as jt}from"./quiz_battle_avatar-BXHPSput.js";import{g as Za,s as ta}from"./subjects-BlAP40QQ.js";import{u as Ka}from"./useSubjectAvailability-Wk6vHhYW.js";import{d as Ja,g as es,w as aa,o as ha,l as Mt,h as It,q as Bt,e as Ft}from"./vendor-firebase-firestore-52DD1vc9.js";import{Z as Q,$ as ba,a0 as fa,a1 as Be,a2 as ts}from"./vendor-firebase-core-y3En_kpN.js";import{B as z}from"./button-BSRmUN27.js";import{a as te,b as le,c as ie,e as he,d as we,C as sa}from"./card-SHcaFLA_.js";import{f as as,g as ss}from"./vendor-radix-DnWAlVSW.js";import{S as Ae,a as ze,b as Ce,c as Me,d as J}from"./select-BwzsWVap.js";import{I as rs}from"./input-B3NSXxdz.js";import{S as ra}from"./switch-CiNZ7HsE.js";import{S as ve}from"./skeleton-ISwUzksB.js";import{T as Et}from"./target-B6MOj4Ln.js";import{C as ns}from"./CompositeAvatar-Col05lJc.js";import{U as je}from"./users-CX_H_2cY.js";import{L as at}from"./loader-circle-id_hZlNw.js";import{S as st}from"./sparkles-BY90tCLG.js";import{C as yt}from"./check-Cs-4n4yC.js";import{S as kt}from"./swords-Btzyg4ct.js";import{S as Nt}from"./star-BKdRsvg1.js";import{T as _t}from"./trophy-fJOOsc_0.js";import{C as Ze}from"./chevron-right-mxUv3EB7.js";import{L as os}from"./lock-6q-juSdu.js";import{S as ls}from"./shield-check-DJHCbiaj.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";import"./chart-column-V8fKqOo0.js";import"./chevron-up-Bup_RJHP.js";import"./avatarData-BuQSOXo3.js";/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const is=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]],na=ye("clock-3",is);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ds=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],oa=ye("history",ds);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const cs=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],us=ye("maximize",cs);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ms=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]],xs=ye("minimize",ms);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ps=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],hs=ye("pause",ps);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bs=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],ga=ye("volume-2",bs);/** - * @license lucide-react v0.487.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fs=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]],wa=ye("volume-x",fs),Ke=({width:a,x:r,delay:n,duration:u})=>{const c=["#9956DE","#7274ED","#1FA7E1","#6ED1CF","#75D06A","#FFB356","#FF8B8B","#FB96BB"],d=c[Math.floor(Math.random()*c.length)],i=Math.floor(Math.random()*10)+1;return e.jsx(w.div,{style:{"--x":`${r}`,"--width":`${a}`,"--aspect-ratio":`${i}`,"--background":`linear-gradient(${d}cc, transparent)`},className:"absolute left-[var(--x)] top-0 [aspect-ratio:1/var(--aspect-ratio)] [background:var(--background)] [width:var(--width)]",initial:{y:"100cqmax",x:"-50%"},animate:{y:"-100%",x:"-50%"},transition:{duration:u,delay:n,repeat:Number.POSITIVE_INFINITY,ease:"linear"}})},la=({children:a,perspective:r=100,className:n,bgVideo:u,beamsPerSide:c=6,beamSize:d=4,beamDelayMax:i=1.5,beamDelayMin:k=0,beamDuration:v=4,gridColor:_="rgba(100, 116, 139, 0.08)",...M})=>{const x=l.useCallback(()=>{const A=[],$=Math.floor(100/d)/c;for(let ue=0;uex(),[x]),f=l.useMemo(()=>x(),[x]),h=l.useMemo(()=>x(),[x]),j=l.useMemo(()=>x(),[x]);return e.jsxs("div",{className:p("relative w-full h-full",n),...M,children:[u?e.jsx("video",{autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"pointer-events-none absolute inset-0 w-full h-full object-cover -z-10",src:u}):e.jsxs("div",{style:{"--perspective":`${r}px`,"--grid-color":_,"--beam-size":`${d}%`},className:"pointer-events-none absolute inset-0 overflow-hidden [clip-path:inset(0)] [container-type:size] [perspective:var(--perspective)] [transform-style:preserve-3d] -z-10 bg-[#42389d]",children:[e.jsx("div",{className:"absolute [transform-style:preserve-3d] [background-size:var(--beam-size)_var(--beam-size)] [background:linear-gradient(var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_-0.5px_/var(--beam-size)_var(--beam-size),linear-gradient(90deg,_var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_50%_/var(--beam-size)_var(--beam-size)] [container-type:inline-size] [height:100cqmax] [transform-origin:50%_0%] [transform:rotateX(-90deg)] [width:100cqi]",children:N.map((A,R)=>e.jsx(Ke,{width:`${d}%`,x:`${A.x*d}%`,delay:A.delay,duration:v},`top-${R}`))}),e.jsx("div",{className:"absolute top-full [transform-style:preserve-3d] [background-size:var(--beam-size)_var(--beam-size)] [background:linear-gradient(var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_-0.5px_/var(--beam-size)_var(--beam-size),linear-gradient(90deg,_var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_50%_/var(--beam-size)_var(--beam-size)] [container-type:inline-size] [height:100cqmax] [transform-origin:50%_0%] [transform:rotateX(-90deg)] [width:100cqi]",children:h.map((A,R)=>e.jsx(Ke,{width:`${d}%`,x:`${A.x*d}%`,delay:A.delay,duration:v},`bottom-${R}`))}),e.jsx("div",{className:"absolute left-0 top-0 [transform-style:preserve-3d] [background-size:var(--beam-size)_var(--beam-size)] [background:linear-gradient(var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_-0.5px_/var(--beam-size)_var(--beam-size),linear-gradient(90deg,_var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_50%_/var(--beam-size)_var(--beam-size)] [container-type:inline-size] [height:100cqmax] [transform-origin:0%_0%] [transform:rotate(90deg)_rotateX(-90deg)] [width:100cqh]",children:j.map((A,R)=>e.jsx(Ke,{width:`${d}%`,x:`${A.x*d}%`,delay:A.delay,duration:v},`left-${R}`))}),e.jsx("div",{className:"absolute right-0 top-0 [transform-style:preserve-3d] [background-size:var(--beam-size)_var(--beam-size)] [background:linear-gradient(var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_-0.5px_/var(--beam-size)_var(--beam-size),linear-gradient(90deg,_var(--grid-color)_0_1px,_transparent_1px_var(--beam-size))_50%_50%_/var(--beam-size)_var(--beam-size)] [container-type:inline-size] [height:100cqmax] [width:100cqh] [transform-origin:100%_0%] [transform:rotate(-90deg)_rotateX(-90deg)]",children:f.map((A,R)=>e.jsx(Ke,{width:`${d}%`,x:`${A.x*d}%`,delay:A.delay,duration:v},`right-${R}`))})]}),e.jsx("div",{className:"relative z-10 w-full h-full",children:a})]})},gs=15e3,ws="mathpulse.quizBattle.local",ia="".toLowerCase()==="true",it=typeof window<"u",nt=()=>it&&!1,Pt=()=>{const a=lt.currentUser?.uid;return a||"local-student"},va=a=>`${ws}.${a}`,$e=a=>{const r={stats:Fe(a),history:[],queueStatus:"idle"};if(!it)return r;try{const n=window.localStorage.getItem(va(a));if(!n)return r;const u=JSON.parse(n),c=Array.isArray(u.history)?u.history.map(i=>Rt(i.matchId||"local-match",i)):[];return{stats:u.stats?{...Fe(a),...u.stats,userId:a,updatedAt:ot(u.stats.updatedAt)}:Fe(a),history:c,queueStatus:u.queueStatus==="queued"||u.queueStatus==="matched"?u.queueStatus:"idle"}}catch(n){return console.error("Error reading local Quiz Battle fallback store:",n),r}},ja=(a,r)=>{if(it)try{window.localStorage.setItem(va(a),JSON.stringify(r))}catch(n){console.error("Error writing local Quiz Battle fallback store:",n)}},ya=a=>{const r=a||{},n=typeof r.code=="string"?r.code:"";return n?n.startsWith("functions/")?n.replace("functions/",""):n:""},ce=a=>{if(!nt())return!1;const r=ya(a);if(["internal","not-found","unavailable","deadline-exceeded"].includes(r))return!0;const n=a||{},u=(typeof n.message=="string"?n.message:a instanceof Error?a.message:"").toLowerCase();return u?u.includes("cors policy")||u.includes("no access-control-allow-origin")||u.includes("failed to fetch")||u.includes("network error")||u.includes("err_failed"):!1},Je=(a,r)=>Math.floor(Math.random()*(r-a+1))+a,vs=(a,r)=>{const n=Math.max(3,a),u=r==="easy"?0:r==="medium"?1:r==="hard"?2:1,c=Je(Math.max(0,n-3-u),n),d=Je(Math.max(0,n-4+u),n),i=Math.min(n,Math.max(0,c)),k=Math.min(n,Math.max(0,d)),v=Math.max(0,Math.min(100,i/n*100+Je(-8,6))),_=Je(1800,6200);return{scoreFor:i,scoreAgainst:k,accuracy:v,averageResponseMs:_}},js=a=>{const r=Pt(),n=$e(r),u=`local-bot-${Date.now()}-${Math.random().toString(16).slice(2,8)}`,c=vs(a.rounds,a.botDifficulty),d=c.scoreFor>c.scoreAgainst?"win":c.scoreFor0?f/N*100:0,averageAccuracy:N>0?(n.stats.averageAccuracy*n.stats.matchesPlayed+c.accuracy)/N:c.accuracy,averageResponseMs:N>0?Math.round((n.stats.averageResponseMs*n.stats.matchesPlayed+c.averageResponseMs)/N):c.averageResponseMs,currentStreak:A,bestStreak:R,favoriteTopicId:a.topicId,leaderboardScore:n.stats.leaderboardScore+x.xpEarned,updatedAt:i};return ja(r,{stats:$,history:[x,...n.history].slice(0,50),queueStatus:"idle"}),{success:!0,matchId:u,status:"ready",botDifficulty:a.botDifficulty}},ka=a=>{const r=Pt(),n=$e(r);ja(r,{...n,queueStatus:a})},ys=()=>Math.random().toString(36).slice(2,8).toUpperCase(),Dt=a=>{const r=Pt();return{roomId:`local-room-${Date.now()}`,roomCode:a||ys(),ownerStudentId:r,participantIds:[r],participantCount:1,status:"waiting",subjectId:"gen-math",topicId:"functions",difficulty:"medium",rounds:5,timePerQuestionSec:30,isOwner:!0}},Na=()=>it&&!!lt.currentUser?.uid&&!!Le,_a=(a,r,n)=>`quizBattlePresence/${a}/${r}/${n}`,ks=async(a,r)=>{if(!Na()||!r.trim()||!Le)return;const n=lt.currentUser?.uid;if(!n)return;const u=ba(Le,_a(a,r,n));try{await fa(u,{studentId:n,scope:a,resourceId:r,online:!0,heartbeatAt:Be(),updatedAt:Be()}),await ts(u).update({online:!1,updatedAt:Be(),disconnectedAt:Be()})}catch(c){console.warn("Realtime presence connect failed:",c)}},Ns=async(a,r)=>{if(!Na()||!r.trim()||!Le)return;const n=lt.currentUser?.uid;if(!n)return;const u=ba(Le,_a(a,r,n));try{await fa(u,{studentId:n,scope:a,resourceId:r,online:!1,updatedAt:Be(),disconnectedAt:Be()})}catch(c){console.warn("Realtime presence disconnect failed:",c)}},V=(a,r)=>{const n=`Unable to continue while ${a}. Please try again.`;if(r instanceof Error&&r.message.startsWith("Timed out while"))return r.message;const u=r||{},c=ya(r),d=typeof u.message=="string"?u.message.trim():"";return c==="unauthenticated"?"Your session has expired. Sign in again before starting a battle.":c==="permission-denied"?"Only student accounts can access Quiz Battle matchmaking.":c==="invalid-argument"?d||"Battle setup is invalid. Review the selected options and try again.":c==="already-exists"?d||"This room is already full. Try another room code.":c==="failed-precondition"?d||"Battle state changed. Please refresh and continue.":c==="unavailable"||c==="internal"||c==="not-found"||c==="deadline-exceeded"?/question generation temporarily unavailable/i.test(d)?d:"Quiz Battle service is temporarily unavailable. Please retry in a moment.":n},L=async(a,r,n=gs)=>{let u;try{return await Promise.race([r,new Promise((c,d)=>{u=setTimeout(()=>{d(new Error(`Timed out while ${a}. Please try again.`))},n)})])}finally{u&&clearTimeout(u)}},ot=a=>{if(!a)return new Date;if(a instanceof Date)return a;if(typeof a=="string"){const r=Date.parse(a);return Number.isNaN(r)?new Date:new Date(r)}if(typeof a=="number")return new Date(a);if(typeof a=="object"){const r=a;if(typeof r.toDate=="function")return r.toDate();if(typeof r.seconds=="number")return new Date(r.seconds*1e3)}return new Date},_s=()=>({mode:"online",subjectId:"gen-math",topicId:"",difficulty:"medium",rounds:5,timePerQuestionSec:30,queueType:"public_matchmaking",botDifficulty:"medium",adaptiveBot:!1}),Ss=a=>{const r=[];return a.subjectId.trim()||r.push({field:"subjectId",message:"Choose a category before starting."}),a.topicId.trim()||r.push({field:"topicId",message:"Choose a strand or topic before starting."}),(a.rounds<3||a.rounds>20)&&r.push({field:"rounds",message:"Questions must be between 3 and 20."}),(a.timePerQuestionSec<10||a.timePerQuestionSec>180)&&r.push({field:"timePerQuestionSec",message:"Timer must be between 10s and 180s."}),a.mode==="bot"&&a.queueType!=="public_matchmaking"&&r.push({field:"queueType",message:"Bot battles use instant start and do not support private room mode."}),r},Fe=a=>({userId:a,matchesPlayed:0,wins:0,losses:0,draws:0,winRate:0,averageAccuracy:0,averageResponseMs:0,bestStreak:0,currentStreak:0,favoriteTopicId:void 0,leaderboardScore:0,updatedAt:new Date}),As=async a=>{try{const r=Ja(rt,"studentBattleStats",a),n=await es(r),u=nt()?$e(a).stats:null;if(!n.exists())return u&&u.matchesPlayed>0?u:Fe(a);const c=n.data(),d={...Fe(a),...c,userId:a,updatedAt:ot(c.updatedAt)};return u&&u.matchesPlayed>d.matchesPlayed?u:d}catch(r){if(console.error("Error loading battle stats:",r),nt()){const n=$e(a).stats;if(n.matchesPlayed>0)return n}return Fe(a)}},Rt=(a,r)=>({matchId:r.matchId||a,mode:r.mode||"online",status:r.status||"completed",subjectId:r.subjectId||"gen-math",topicId:r.topicId||"unknown-topic",difficulty:r.difficulty||"medium",rounds:r.rounds||0,timePerQuestionSec:r.timePerQuestionSec||0,scoreFor:r.scoreFor||0,scoreAgainst:r.scoreAgainst||0,outcome:r.outcome||"draw",accuracy:r.accuracy||0,averageResponseMs:r.averageResponseMs||0,bestStreak:r.bestStreak||0,xpEarned:r.xpEarned||0,opponentName:r.opponentName||"Unknown opponent",opponentType:r.opponentType||"student",createdAt:ot(r.createdAt),endedAt:ot(r.endedAt)}),zs=async(a,r={})=>{const n=r.limitCount||25,u=nt()?$e(a).history:[],c=i=>i.filter(v=>!(r.mode&&r.mode!=="all"&&v.mode!==r.mode||r.subjectId&&v.subjectId!==r.subjectId||r.startDate&&v.endedAtr.endDate)).sort((v,_)=>_.endedAt.getTime()-v.endedAt.getTime()).slice(0,n),d=i=>{if(u.length===0)return c(i);const k=new Map;return[...u,...i].forEach(v=>{k.set(v.matchId,v)}),c(Array.from(k.values()))};try{const i=[aa("studentId","==",a),ha("endedAt","desc"),Mt(n)],v=(await It(Bt(Ft(rt,"quizBattleHistory"),...i))).docs.map(_=>Rt(_.id,_.data()));return d(v)}catch(i){try{const v=(await It(Bt(Ft(rt,"quizBattleHistory"),aa("studentId","==",a),Mt(n)))).docs.map(_=>Rt(_.id,_.data())).sort((_,M)=>M.endedAt.getTime()-_.endedAt.getTime());return d(v)}catch(k){return console.error("Error loading battle history:",i,k),c(u)}}},Cs=async a=>{const r=Q(q,"quizBattleJoinQueue");try{return(await L("joining Quiz Battle matchmaking queue",r({setup:a}))).data}catch(n){if(ce(n))return ka("queued"),{success:!0,status:"queued",queueEntryId:`local-queue-${Date.now()}`};throw new Error(V("joining Quiz Battle matchmaking queue",n))}},da=async()=>{const a=Q(q,"quizBattleLeaveQueue");try{return(await L("leaving Quiz Battle matchmaking queue",a({}))).data}catch(r){if(ce(r))return ka("idle"),{success:!0,status:"idle"};throw new Error(V("leaving Quiz Battle matchmaking queue",r))}},Ms=async a=>{const r=Q(q,"quizBattleCreatePrivateRoom");try{return(await L("creating Quiz Battle private room",r({setup:a}))).data}catch(n){if(ce(n))return{success:!0,room:Dt()};throw new Error(V("creating Quiz Battle private room",n))}},Is=async a=>{const r=Q(q,"quizBattleJoinPrivateRoom");try{return(await L("joining Quiz Battle private room",r({roomCode:a}),2e4)).data}catch(n){if(ce(n))return{success:!0,room:Dt(a.trim().toUpperCase()||void 0)};throw new Error(V("joining Quiz Battle private room",n))}},Bs=async a=>{const r=Q(q,"quizBattleGetPrivateRoomState");try{return(await L("loading Quiz Battle private room state",r(a),2e4)).data}catch(n){if(ce(n))return{success:!0,room:Dt(a.roomCode?.trim().toUpperCase()||void 0)};throw new Error(V("loading Quiz Battle private room state",n))}},Fs=async(a={})=>{const r=Q(q,"quizBattleLeavePrivateRoom");try{return(await L("leaving Quiz Battle private room",r(a),2e4)).data}catch(n){if(ce(n))return{success:!0,status:"idle"};throw new Error(V("leaving Quiz Battle private room",n))}},ca=async()=>{const a=Q(q,"quizBattleResumeSession");try{return(await L("resuming Quiz Battle session",a({}),2e4)).data}catch(r){if(ce(r))return{success:!0,sessionType:"idle"};throw new Error(V("resuming Quiz Battle session",r))}},Es=async(a,r)=>{if(!r.trim())return;const n=Q(q,"quizBattleHeartbeat");await ks(a,r);try{await L("sending Quiz Battle heartbeat",n({scope:a,resourceId:r}),12e3)}catch(u){if(!ce(u))throw new Error(V("sending Quiz Battle heartbeat",u))}},Rs=async a=>{const r=Q(q,"quizBattleCreateBotMatch");try{return(await L("starting Quiz Battle bot match",r({setup:a}))).data}catch(n){if(ce(n))return js(a);throw new Error(V("starting Quiz Battle bot match",n))}},Ts=async a=>{const r=Q(q,"quizBattleGetGenerationAudit");return(await L("verifying Quiz Battle generation metadata",r({matchId:a}),2e4)).data},de=async a=>{const r=Q(q,"quizBattleStartMatch");try{const u=(await L("starting Quiz Battle match",r({matchId:a}),2e4)).data.match;if(u.mode==="online")try{const c=await Ts(a);if(ia&&!c.isAiSource)throw new Error(`Quiz Battle generation audit failed: expected AI source, got "${c.questionSetSource||"unknown"}".`)}catch(c){if(c instanceof Error&&c.message.startsWith("Quiz Battle generation audit failed"))throw c;if(console.warn("Quiz Battle generation audit unavailable:",c),ia)throw new Error("Unable to verify Quiz Battle generation metadata. Please retry in a moment.")}return u}catch(n){throw new Error(V("starting Quiz Battle match",n))}},St=async a=>{const r=Q(q,"quizBattleGetMatchState");try{return(await L("loading Quiz Battle match state",r({matchId:a}),2e4)).data.match}catch(n){throw new Error(V("loading Quiz Battle match state",n))}},Ps=async a=>{const r=Q(q,"quizBattleSubmitAnswer");try{return(await L("submitting Quiz Battle answer",r({...a,idempotencyKey:a.idempotencyKey||`client-${Date.now()}-${Math.random().toString(16).slice(2,8)}`}),2e4)).data}catch(n){throw new Error(V("submitting Quiz Battle answer",n))}},Ds=async a=>{const r=Q(q,"quizBattleRequestRematch");try{return(await L("creating Quiz Battle rematch",r({matchId:a}),2e4)).data}catch(n){throw new Error(V("creating Quiz Battle rematch",n))}},qs=async(a=20)=>{try{const r=Bt(Ft(rt,"studentBattleLeaderboard"),ha("leaderboardScore","desc"),Mt(a));return(await It(r)).docs.map((u,c)=>{const d=u.data();return{userId:d.userId||u.id,displayName:d.displayName||"Student",photo:d.photo,rank:d.rank||c+1,leaderboardScore:d.leaderboardScore||0,winRate:d.winRate||0,bestStreak:d.bestStreak||0}})}catch(r){return console.error("Error loading Quiz Battle leaderboard:",r),[]}};function Qs({className:a,...r}){return e.jsx(as,{"data-slot":"tabs",className:p("flex flex-col gap-2",a),...r})}function Ie({className:a,...r}){return e.jsx(ss,{"data-slot":"tabs-content",className:p("flex-1 outline-none",a),...r})}const Sa=Tt.memo(({playerRoundStreak:a,playerVisualMultiplier:r,liveXpEarned:n,activeMatch:u,subjects:c,battleSoundEnabled:d,onToggleSound:i,isFullscreen:k,onToggleFullscreen:v,isDesignPauseAvailable:_,onTogglePause:M})=>e.jsxs("header",{className:"flex items-center justify-between shrink-0 h-16 relative gap-4",children:[e.jsx("div",{className:"flex items-center min-w-0",children:e.jsxs("div",{className:"flex items-center gap-3 md:gap-4 px-4 py-2 md:px-5 md:py-2.5 rounded-full bg-white/5 border border-white/10 backdrop-blur-md min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-amber-400 font-bold text-sm shrink-0",children:[e.jsx(Wa,{className:"w-4 h-4"})," ",a]}),e.jsx("div",{className:"w-px h-4 bg-white/10 shrink-0"}),e.jsxs("div",{className:"flex items-center gap-1.5 text-violet-300 font-bold text-sm shrink-0",children:[e.jsx(Et,{className:"w-4 h-4"})," ",r.toFixed(2),"x"]}),e.jsx("div",{className:"w-px h-4 bg-white/10 shrink-0"}),e.jsxs(w.div,{animate:n>0?{scale:[1,1.25,1]}:{},transition:{duration:.35},className:"flex flex-col items-center text-emerald-400 bg-emerald-500/10 px-3 py-0.5 rounded-full border border-emerald-500/20 font-bold shadow-[0_0_10px_rgba(16,185,129,0.15)] shrink-0",children:[e.jsxs("span",{className:"text-sm leading-none tabular-nums",children:[n," pts"]}),e.jsx("span",{className:"text-[8px] leading-none text-emerald-500/70 uppercase tracking-widest font-black whitespace-nowrap",children:"Battle Score"})]},n)]})}),e.jsxs("div",{className:"absolute left-1/2 -translate-x-1/2 hidden md:flex items-center gap-3 bg-black/20 px-5 py-2 rounded-full border border-white/5 min-w-0 max-w-[48%]",children:[e.jsx("div",{className:"w-3.5 h-3.5 rounded-sm bg-orange-400 shadow-[0_0_10px_rgba(251,146,60,0.5)] shrink-0"}),e.jsx("div",{className:"flex flex-col items-start justify-center -space-y-0.5 min-w-0",children:(()=>{if(!u?.topicId)return e.jsx("span",{className:"font-bold text-white/90 tracking-wide text-sm leading-none truncate",children:"Practice Match"});for(const x of c){const N=x.modules?.find(f=>f.id===u.topicId);if(N)return e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-[9px] font-black text-white/40 uppercase tracking-widest leading-none",children:x.title}),e.jsx("span",{className:"font-bold text-white/90 tracking-wide text-sm leading-none pt-1 truncate",children:N.title})]})}return e.jsx("span",{className:"font-bold text-white/90 tracking-wide text-sm leading-none truncate",children:u.topicId.split("-").map(x=>x.charAt(0).toUpperCase()+x.slice(1)).join(" ")})})()})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(z,{variant:"outline",size:"icon",className:"h-12 w-12 rounded-full border-white/20 bg-black/20 hover:bg-white/10 text-white",onClick:i,children:d?e.jsx(ga,{className:"h-5 w-5"}):e.jsx(wa,{className:"h-5 w-5"})}),e.jsx(z,{variant:"outline",size:"icon",className:"h-12 w-12 rounded-full border-white/20 bg-black/20 hover:bg-white/10 text-white",onClick:v,children:k?e.jsx(xs,{className:"h-5 w-5"}):e.jsx(us,{className:"h-5 w-5"})}),e.jsx(z,{variant:"outline",size:"icon",className:p("h-12 w-12 rounded-full border-white/20 text-white",_?"bg-black/20 hover:bg-white/10":"bg-black/10 opacity-50 cursor-not-allowed"),onClick:M,disabled:!_,children:e.jsx(Ua,{className:"h-5 w-5"})})]})]}));Sa.displayName="BattleHeader";const Aa=Tt.memo(({studentProfile:a,activeMatch:r,scorePulseTarget:n,quizBattleAvatar:u})=>e.jsxs("div",{className:"absolute bottom-0 left-0 right-0 w-full xl:max-w-[1400px] mx-auto px-4 md:px-8 shrink-0 h-32 md:h-48 flex justify-between items-end pb-0 pointer-events-none z-30",children:[e.jsxs("div",{className:"flex items-end gap-3 sm:gap-6 relative pointer-events-auto",children:[e.jsx("div",{className:"relative w-28 h-28 md:w-40 md:h-40 rounded-t-[40px] flex items-end",children:e.jsx(ns,{layers:a?.avatarLayers||{},className:"w-full h-full object-contain origin-bottom scale-[1.15]"})}),e.jsxs("div",{className:"bg-black/40 backdrop-blur-xl border border-white/20 rounded-2xl px-4 py-3 md:px-5 shadow-[0_8px_30px_rgba(0,0,0,0.5)] flex items-center gap-3 md:gap-4 mb-4 max-w-[220px] md:max-w-[280px]",children:[e.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[e.jsx("span",{className:"text-white font-black text-base md:text-lg truncate tracking-wide",children:a?.name||"Player"}),e.jsxs("span",{className:"text-xs md:text-sm text-white/50 font-bold uppercase tracking-wider",children:["Level ",a?.level||1]})]}),e.jsx("div",{className:"h-10 w-px bg-white/20"}),e.jsxs("div",{className:"flex flex-col items-center justify-center shrink-0 w-10 md:w-12",children:[e.jsx(w.span,{animate:n==="player"?{scale:[1,1.4,1],color:["#fff","#34d399","#fff"]}:{},transition:{duration:.5},className:"text-2xl md:text-3xl font-black text-white leading-none",children:r.scoreFor}),e.jsx("span",{className:"text-[9px] md:text-[10px] text-emerald-400 font-bold uppercase tracking-widest mt-1 leading-none",children:"Score"})]})]})]}),e.jsxs("div",{className:"flex items-end gap-3 sm:gap-6 relative flex-row-reverse pointer-events-auto",children:[e.jsx("div",{className:"relative w-28 h-28 md:w-40 md:h-40 bg-[#1a2030] rounded-t-[40px] flex items-end justify-center border-t-4 border-slate-700/50 shadow-inner",children:r.mode==="bot"?e.jsx(Qe,{className:"h-16 w-16 md:h-20 md:w-20 text-rose-400 mb-6 drop-shadow-xl",strokeWidth:1.5}):e.jsx(je,{className:"h-16 w-16 md:h-20 md:w-20 text-slate-500 mb-6 drop-shadow-xl",strokeWidth:1.5})}),e.jsxs("div",{className:"bg-black/40 backdrop-blur-xl border border-white/20 rounded-2xl px-4 py-3 md:px-5 shadow-[0_8px_30px_rgba(0,0,0,0.5)] flex items-center gap-3 md:gap-4 mb-4 flex-row-reverse text-right max-w-[220px] md:max-w-[280px]",children:[e.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[e.jsx("span",{className:"text-white font-black text-base md:text-lg truncate tracking-wide",children:r.opponentName||"Anonymous"}),e.jsx("span",{className:"text-xs md:text-sm text-rose-400 font-bold uppercase tracking-wider",children:r.mode==="bot"?"System Bot":"Challenger"})]}),e.jsx("div",{className:"h-10 w-px bg-white/20"}),e.jsxs("div",{className:"flex flex-col items-center justify-center shrink-0 w-10 md:w-12",children:[e.jsx(w.span,{animate:n==="opponent"?{scale:[1,1.4,1],color:["#fff","#fb7185","#fff"]}:{},transition:{duration:.5},className:"text-2xl md:text-3xl font-black text-white leading-none",children:r.scoreAgainst}),e.jsx("span",{className:"text-[9px] md:text-[10px] text-rose-400 font-bold uppercase tracking-widest mt-1 leading-none",children:"Score"})]})]})]})]}));Aa.displayName="BattleFooter";const za=Tt.memo(({activeMatch:a,roundSecondsLeft:r,lastRoundResult:n,selectedOptionIndex:u,roundLocked:c,answerSubmitting:d,designPauseActive:i,onOptionSelect:k,floatingMomentum:v,lastRoundMomentumDelta:_,studentProfile:M,quizBattleAvatar:x})=>e.jsxs("div",{className:"flex-1 flex flex-col justify-center items-center gap-4 md:gap-6 w-full min-h-0 overflow-y-auto pt-4 pb-28 z-20 no-scrollbar",children:[e.jsxs("div",{className:p("relative bg-[#1e2536] border shadow-[0_20px_60px_rgba(0,0,0,0.4)] rounded-[1.5rem] p-5 md:p-6 w-full max-w-4xl text-center flex flex-col items-center",r<=3?"border-rose-400/50":"border-white/10"),children:[e.jsxs("div",{className:"absolute -top-3.5 bg-[#2f3547] border border-white/10 text-white/80 px-4 py-1 rounded-full text-xs font-black shadow-lg uppercase tracking-wider",children:[a.currentRound," / ",a.totalRounds]}),e.jsx(tt,{children:v&&v.tone==="positive"&&e.jsx(w.div,{initial:{opacity:0,y:14,scale:.92},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.9},className:p("absolute -top-12 rounded-full border px-3 py-1 text-[10px] font-black uppercase tracking-[0.15em] backdrop-blur-lg",v.tone==="positive"?"border-emerald-300/70 bg-emerald-500/20 text-emerald-100":v.tone==="negative"?"border-rose-300/70 bg-rose-500/20 text-rose-100":"border-slate-300/50 bg-slate-500/20 text-slate-100"),children:v.label},v.id)}),e.jsx("p",{className:"text-base sm:text-lg md:text-xl text-white font-extrabold leading-tight tracking-tight mt-1 min-h-[40px] flex items-center justify-center",children:a.currentQuestion?.prompt}),typeof window<"u"&&window.location.search.includes("debug=true")&&a.currentQuestion?.varianceApplied&&e.jsx("div",{className:"flex flex-wrap gap-1 mt-2 justify-center",children:a.currentQuestion.varianceApplied.map(N=>e.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-[10px] font-medium bg-blue-500/20 text-blue-200 border border-blue-400/30",children:N.replace(/_/g," ")},N))})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 md:gap-4 w-full max-w-4xl px-4",children:a.currentQuestion?.choices.map((N,f)=>{const h=u===f,j=d||c,A=!!n&&n.roundNumber===a.currentRound,R=A&&n.correctOptionIndex===f;let $=-1;if(A)if(a.mode==="bot")if(n.botCorrect)$=n.correctOptionIndex;else{const W=[0,1,2,3].filter(ae=>ae!==n.correctOptionIndex);$=W[n.roundNumber%W.length]}else $=typeof n.botSelectedIndex=="number"?n.botSelectedIndex:-1;const ue=$===f;let Y="bg-[#1e2433] hover:bg-[#283042] border-[#2f384e] text-white shadow-[0_6px_0_rgba(15,20,30,0.5)]";return A?R?Y="bg-emerald-500 text-emerald-950 border-emerald-400 shadow-[0_6px_0_rgba(5,150,105,1)]":h?Y="bg-rose-500 text-white border-rose-400 shadow-[0_6px_0_rgba(225,29,72,1)]":Y="bg-[#1e2433] opacity-40 border-[#2f384e] shadow-[0_6px_0_rgba(15,20,30,0.5)] text-white":h&&(Y="bg-indigo-500 text-white border-indigo-400 shadow-[0_6px_0_rgba(79,70,229,1)]"),e.jsxs(w.button,{whileTap:{y:8,scale:.98},whileHover:!A&&!j?{scale:1.02}:{},disabled:j||c||i,onClick:()=>k(f),className:p("relative h-16 md:h-20 rounded-2xl md:rounded-3xl font-black text-base md:text-lg pl-6 pr-20 border-[2px] border-b-[4px] flex items-center justify-start text-left transition-all disabled:cursor-not-allowed",Y,h&&!A?"ring-[4px] ring-white/20 ring-offset-[4px] ring-offset-[#0B0F19]":"",r<=3&&!j&&!A?"shadow-[0_0_0_2px_rgba(251,113,133,0.45),0_6px_0_rgba(127,29,29,1)]":""),children:[e.jsx("span",{className:"mr-3 md:mr-4 text-xs md:text-sm opacity-60 bg-black/20 px-3 py-1 rounded-full",children:String.fromCharCode(65+f)}),e.jsx("span",{className:"line-clamp-2",children:N}),e.jsxs("div",{className:"absolute right-3 md:right-4 flex items-center gap-1.5 md:gap-2",children:[ue&&e.jsx(w.div,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},className:"w-8 h-8 md:w-10 md:h-10 rounded-full border-[3px] border-[#0B0F19] overflow-hidden bg-rose-500 shadow-lg flex items-center justify-center z-10",children:a.mode==="bot"?e.jsx(Qe,{className:"w-4 h-4 md:w-5 md:h-5 text-white"}):e.jsx(je,{className:"w-4 h-4 md:w-5 md:h-5 text-white"})}),h&&e.jsx(w.div,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},className:"w-8 h-8 md:w-10 md:h-10 rounded-full border-[3px] border-[#0B0F19] overflow-hidden bg-indigo-200 shadow-lg z-20",children:e.jsx("img",{src:M?.photo||x,alt:"You",className:"w-full h-full object-cover"})})]})]},f)})}),e.jsx(tt,{children:c&&!n&&a.mode==="online"&&e.jsxs(w.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},className:"mt-4 flex flex-col items-center gap-1",children:[e.jsxs("div",{className:"flex items-center gap-2 text-white/70 font-semibold bg-black/30 px-6 py-2 rounded-full border border-white/10",children:[e.jsx(at,{className:"w-4 h-4 animate-spin text-amber-400"}),"Waiting for opponent..."]}),e.jsx("p",{className:"text-white/30 text-[11px] mt-1",children:"Choices locked until round resolves"})]})}),e.jsx(tt,{children:n?.studentCorrect&&e.jsx(w.div,{initial:{opacity:0,scale:.8,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:1.1,filter:"blur(10px)"},transition:{type:"spring",damping:20,stiffness:300},className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-[100] pointer-events-none flex flex-col items-center justify-center",children:e.jsxs("div",{className:"bg-[#1e2433]/95 backdrop-blur-xl border border-white/10 rounded-[2rem] p-6 md:p-8 shadow-[0_30px_80px_rgba(0,0,0,0.6)] flex flex-col items-center min-w-[280px] md:min-w-[320px]",children:[e.jsx("img",{src:x,alt:"Mascot",className:"w-24 h-24 md:w-32 md:h-32 mb-4 drop-shadow-xl"}),e.jsx("h2",{className:p("text-3xl md:text-4xl font-black mb-4 uppercase tracking-widest",n.studentCorrect?"text-emerald-400":"text-rose-400"),children:n.studentCorrect?"Correct!":"Incorrect"}),n.studentCorrect?e.jsxs("div",{className:"flex items-center gap-3 w-full justify-center",children:[e.jsx("div",{className:"flex items-center gap-2 bg-emerald-500/20 text-emerald-400 px-4 py-2 rounded-2xl font-bold border border-emerald-500/30",children:e.jsx("span",{children:"+ 10 XP"})}),_!==null&&_>0&&e.jsx("div",{className:"flex items-center gap-2 bg-amber-500/20 text-amber-400 px-4 py-2 rounded-2xl font-bold border border-amber-500/30",children:e.jsxs("span",{children:["+ ",_," ",e.jsx(st,{className:"w-4 h-4 inline"})]})})]}):e.jsxs("div",{className:"bg-rose-500/20 border border-rose-500/30 text-rose-400 font-bold px-5 py-2 rounded-xl text-center",children:["Correct: ",String.fromCharCode(65+n.correctOptionIndex)]})]})})})]}));za.displayName="BattleActiveContent";const At={width:1280,height:720},zt=` - @keyframes mascot-float { - 0%, 100% { transform: translateY(0) rotate(-3deg); } - 50% { transform: translateY(-24px) rotate(3deg); } - } - @keyframes vs-pulse { - 0%, 100% { transform: scale(1.1); } - 50% { transform: scale(1.15); } - } - @keyframes avatar-left { - 0%, 100% { transform: translateY(0); } - 50% { transform: translateY(-5px); } - } - @keyframes avatar-right { - 0%, 100% { transform: translateY(0); } - 50% { transform: translateY(-4px); } - } - @keyframes ghost-left { - 0%, 100% { transform: translateY(0); } - 50% { transform: translateY(-3px); } - } - @keyframes ghost-right { - 0%, 100% { transform: translateY(0); } - 50% { transform: translateY(-3px); } - } - @keyframes main-avatar { - 0%, 100% { transform: translateY(0); } - 50% { transform: translateY(-5px); } - } - @keyframes star-float { - 0%, 100% { transform: translateY(-4px); } - 50% { transform: translateY(4px); } - } - @keyframes marquee { - 0% { transform: translateX(0); } - 100% { transform: translateX(-50%); } - } - @keyframes orb-pulse { - 0%, 100% { transform: scale(1); opacity: 0.3; } - 50% { transform: scale(1.2); opacity: 0.6; } - } - @keyframes orb-pulse-delayed { - 0%, 100% { transform: scale(1); opacity: 0.2; } - 50% { transform: scale(1.3); opacity: 0.5; } - } - @keyframes icon-bob { - 0%, 100% { transform: translateY(-3px); } - 50% { transform: translateY(3px); } - } - @keyframes icon-rotate { - 0%, 100% { transform: rotate(-5deg); } - 50% { transform: rotate(5deg); } - } - @keyframes reward-pop { - 0% { transform: scale(0.9) translateY(10px); opacity: 0; } - 100% { transform: scale(1) translateY(0); opacity: 1; } - } - @keyframes score-pop { - 0% { transform: scale(1); } - 50% { transform: scale(1.4); } - 100% { transform: scale(1); } - } - @keyframes overlay-fade-in { - 0% { opacity: 0; } - 100% { opacity: 1; } - } - @keyframes overlay-slide-up { - 0% { transform: translateY(40px) scale(0.85); opacity: 0; } - 100% { transform: translateY(0) scale(1); opacity: 1; } - } - @keyframes badge-float-in { - 0% { transform: translateY(14px) scale(0.92); opacity: 0; } - 100% { transform: translateY(0) scale(1); opacity: 1; } - } - @keyframes badge-float-out { - 0% { transform: translateY(0) scale(1); opacity: 1; } - 100% { transform: translateY(-10px) scale(0.9); opacity: 0; } - } - .animate-mascot-float { animation: mascot-float 4s ease-in-out infinite; } - .animate-vs-pulse { animation: vs-pulse 2s ease-in-out infinite; } - .animate-avatar-left { animation: avatar-left 4s ease-in-out infinite; } - .animate-avatar-right { animation: avatar-right 4s ease-in-out infinite 0.4s; } - .animate-ghost-left { animation: ghost-left 3.5s ease-in-out infinite 0.3s; } - .animate-ghost-right { animation: ghost-right 3.5s ease-in-out infinite 0.6s; } - .animate-main-avatar { animation: main-avatar 3.5s ease-in-out infinite; } - .animate-star-float { animation: star-float 3s ease-in-out infinite; } - .animate-marquee { animation: marquee 15s linear infinite; } - .animate-orb-pulse { animation: orb-pulse 5s ease-in-out infinite; } - .animate-orb-pulse-delayed { animation: orb-pulse-delayed 4s ease-in-out infinite 1.5s; } - .animate-icon-bob { animation: icon-bob 3s ease-in-out infinite; } - .animate-icon-rotate { animation: icon-rotate 4s ease-in-out infinite; } - .animate-reward-pop { animation: reward-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards; } - .animate-score-pop { animation: score-pop 0.5s ease-out forwards; } - .animate-overlay-slide-up { animation: overlay-slide-up 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards; } -`,Ls=300*1e3,$s=({viewportHeight:a})=>e.jsx("div",{className:"absolute inset-0 pointer-events-none z-[50] overflow-hidden flex justify-between bg-slate-900/10",children:l.useMemo(()=>[...Array(40)].map((r,n)=>({id:n,left:`${Math.random()*100}%`,duration:.6+Math.random()*.4,delay:Math.random()*.4})),[a]).map(r=>e.jsx(w.div,{className:"absolute w-0.5 h-16 bg-blue-300/40 rounded-full e-left-top",style:{"--left":r.left,"--top":"-10%"},animate:{y:[0,a*1.2]},transition:{duration:r.duration,ease:"linear",delay:r.delay}},r.id))}),Hs=({viewportHeight:a,viewportWidth:r})=>{const n=["#10b981","#8b5cf6","#0ea5e9","#f43f5e","#f59e0b"],u=l.useMemo(()=>[...Array(60)].map((c,d)=>({id:d,left:`${20+Math.random()*60}%`,xShift:(Math.random()-.5)*r*.8,spin:Math.random()*720,duration:3+Math.random()*2,delay:Math.random()*.35})),[a,r]);return e.jsx("div",{className:"absolute inset-0 pointer-events-none z-[50] overflow-hidden",children:u.map(c=>e.jsx(w.div,{className:"absolute bottom-[-10%] w-3 h-5 rounded-sm shadow-md e-left-top e-bg",style:{"--left":c.left,"--bg":n[c.id%n.length]},animate:{y:[0,-a*(.6+Math.random()*.4),a*.5],x:[0,c.xShift],rotate:[0,c.spin]},transition:{duration:c.duration,ease:"easeInOut",delay:c.delay}},c.id))})},Os=({viewportHeight:a,viewportWidth:r})=>{const n=l.useMemo(()=>[...Array(30)].map((u,c)=>({id:c,xShift:(Math.random()-.5)*r*.8,yShift:(Math.random()-.5)*a*.8,scale:Math.random()*1.5+.5,duration:2+Math.random()*1.5,delay:Math.random()*.35})),[a,r]);return e.jsx("div",{className:"absolute inset-0 pointer-events-none z-[50] overflow-hidden flex items-center justify-center",children:n.map(u=>e.jsx(w.div,{className:"absolute w-2 h-2 bg-amber-400 rounded-full shadow-[0_0_10px_rgba(251,191,36,0.8)] e-left-top",style:{"--left":"50%","--top":"50%"},animate:{y:[0,u.yShift],x:[0,u.xShift],scale:[0,u.scale,0],opacity:[0,1,0]},transition:{duration:u.duration,ease:"easeOut",delay:u.delay}},u.id))})},ua=({value:a,label:r,delay:n=0,icon:u})=>{const[c,d]=l.useState(0);return l.useEffect(()=>{if(a<=0)return;const i=1e3,k=30,v=Math.abs(Math.floor(i/k));let _=0;const M=setTimeout(()=>{const x=setInterval(()=>{_+=Math.max(1,Math.floor(a/k)),_>=a?(d(a),clearInterval(x)):d(_)},v);return()=>clearInterval(x)},n);return()=>clearTimeout(M)},[a,n]),a<=0?null:e.jsxs(w.div,{initial:{opacity:0,transform:"translateX(-20px)"},animate:{opacity:1,transform:"translateX(0)"},transition:{delay:n/1e3,duration:.5},className:"flex items-center justify-between bg-white/5 border border-white/10 rounded-xl p-3",children:[e.jsxs("div",{className:"flex items-center gap-3 text-white/80 font-bold uppercase tracking-wider text-sm",children:[u,r]}),e.jsxs("div",{className:"text-2xl font-black text-amber-400 tabular-nums",children:["+",c]})]})},O="border border-border bg-card text-card-foreground shadow-sm dark:border-[#2b3140] dark:bg-[#181d27] dark:text-[#f5f7fb] dark:shadow-[0_12px_24px_rgba(0,0,0,0.22)]",Vs=a=>a<=0?"--":`${(a/1e3).toFixed(2)}s`,Ws=a=>a==="win"?"Win":a==="loss"?"Loss":"Draw",et=(a,r,n)=>Math.max(r,Math.min(n,a)),ma=a=>{const r=Math.floor(a/60),n=a%60;return`${r}:${String(n).padStart(2,"0")}`},Us=a=>{const r=a.trim().split(/\s+/).filter(Boolean).slice(0,2);return r.length===0?"ST":r.map(n=>n[0]?.toUpperCase()||"").join("")},xa=(a,r)=>a?a.eventType==="round_started"?`Round ${a.roundNumber} started.`:a.eventType==="answer_locked"?a.lockedByStudentId&&r&&a.lockedByStudentId===r?`Round ${a.roundNumber}: your answer is locked.`:`Round ${a.roundNumber}: opponent answer locked.`:a.eventType==="round_result"?`Round ${a.roundNumber} resolved.`:"Match completed.":null;let Ct=null;const pa=()=>{if(typeof window>"u")return null;if(!Ct){const a=window.AudioContext||window.webkitAudioContext;a&&(Ct=new a)}return Ct},zr=()=>{const{userProfile:a,userRole:r}=Ya(),n=a,{isSubjectAvailable:u}=Ka(),[c,d]=l.useState("hub"),[i,k]=l.useState(_s),[v,_]=l.useState([]),[M,x]=l.useState({status:"idle"}),[N,f]=l.useState(!1),[h,j]=l.useState(null),[A,R]=l.useState(""),[$,ue]=l.useState(null),[Y,W]=l.useState(0),[ae,C]=l.useState(null),[ee,qt]=l.useState(()=>typeof window>"u"?!0:window.localStorage.getItem("quiz_battle_sound_enabled")!=="0"),[be,Ca]=l.useState(()=>{if(typeof window>"u")return .7;const t=Number(window.localStorage.getItem("quiz_battle_sound_volume")||"0.7");return Number.isFinite(t)?et(t,0,1):.7}),[Qt,I]=l.useState("connected"),[ke,Ma]=l.useState("all"),[Lt,dt]=l.useState(!0),[se,ct]=l.useState(null),[ut,mt]=l.useState([]),[Ia,$t]=l.useState(!1),[Ht,Ba]=l.useState([]),[He,Fa]=l.useState("alias"),[xt,Ea]=l.useState(!1),[s,S]=l.useState(null),[Ne,X]=l.useState(null),[G,Ee]=l.useState(!1),[P,Re]=l.useState(0),[Z,K]=l.useState(!1),[F,pt]=l.useState(!1),[Ra,Ta]=l.useState(!1),[Te,Pa]=l.useState(At),[B,re]=l.useState(null),[Da,ht]=l.useState(!1),[Oe,bt]=l.useState(null),[qa,ft]=l.useState(null),[Qa,Ve]=l.useState(null),Ot=l.useRef(""),gt=l.useRef(null),_e=l.useRef(null),me=l.useRef(0),Vt=l.useRef(""),Pe=l.useRef(0),wt=l.useRef(0),We=l.useRef(null),De=l.useRef(null),Ue=l.useRef(-1),vt=!1,xe=l.useMemo(()=>{const t=Za(n?.grade);return ta.filter(o=>t.includes(o.id))},[n?.grade]),La=l.useMemo(()=>(xe.find(o=>o.id===i.subjectId)?.modules||[]).map(o=>({value:o.id,label:o.title})),[xe,i.subjectId]),H=l.useMemo(()=>{const t=s?.roundResults||[];let o=0;return t.forEach(b=>{o=b.studentCorrect?o+1:0}),o},[s?.roundResults]),$a=l.useMemo(()=>{const t=Math.max(0,H-1)*.12;return Number((1+Math.min(.72,t)).toFixed(2))},[H]),Ha=l.useMemo(()=>{if(!s)return 0;if(s.status==="completed")return s.xpEarned||0;const t=s.roundResults||[];let o=0,b=0;for(const m of t)if(m.studentCorrect){o++;const y=o>=2?Math.min(25,(o-1)*5):0;b+=10+y}else o=0;return b},[s?.status,s?.xpEarned,s?.roundResults]),Wt=l.useMemo(()=>{const t=s?.roundResults||[];let o=0;return t.forEach(b=>{o=b.botCorrect?o+1:0}),o},[s?.roundResults]);l.useMemo(()=>{const t=Math.max(0,Wt-1)*.1;return Number((1+Math.min(.5,t)).toFixed(2))},[Wt]),l.useMemo(()=>H>=5?{label:"Inferno",badgeClass:"text-amber-300 border-amber-300/50 bg-amber-500/20 shadow-[0_0_18px_rgba(251,191,36,0.35)]"}:H>=3?{label:"Heating Up",badgeClass:"text-orange-300 border-orange-300/50 bg-orange-500/15 shadow-[0_0_16px_rgba(249,115,22,0.3)]"}:B?.studentCorrect?{label:"Steady",badgeClass:"text-emerald-300 border-emerald-300/40 bg-emerald-500/15 shadow-[0_0_14px_rgba(16,185,129,0.25)]"}:{label:"Rebuild",badgeClass:"text-slate-300 border-slate-300/30 bg-slate-500/15 shadow-[0_0_14px_rgba(148,163,184,0.2)]"},[B?.studentCorrect,H]);const pe=l.useMemo(()=>{if(!B)return null;const t=B.studentCorrect?12:-8,o=B.studentCorrect&&!B.botCorrect?6:0,b=B.studentCorrect?Math.max(0,(H-1)*2):0;return t+o+b},[B,H]),D=l.useCallback(t=>{if(!(!ee||be<=0||typeof window>"u"))try{const o=pa();if(!o)return;o.state==="suspended"&&o.resume().catch(()=>{});const m={tick:{notes:[740],duration:.06,type:"triangle",volume:.03},lock:{notes:[520],duration:.08,type:"square",volume:.04},result:{notes:[660,720],duration:.08,type:"sine",volume:.04},win:{notes:[920,1040,1180],duration:.12,type:"triangle",volume:.05},loss:{notes:[260,220],duration:.14,type:"sawtooth",volume:.045},streak:{notes:[780,920],duration:.09,type:"triangle",volume:.045},multiplier:{notes:[660,880,1120],duration:.08,type:"triangle",volume:.05}}[t],y=o.currentTime,T=.07,g=et(m.volume*be,.004,.08);m.notes.forEach((E,oe)=>{const ge=o.createOscillator(),qe=o.createGain(),Se=y+oe*T;ge.type=m.type,ge.frequency.setValueAtTime(E,Se),qe.gain.setValueAtTime(1e-4,Se),qe.gain.exponentialRampToValueAtTime(g,Se+.012),qe.gain.exponentialRampToValueAtTime(1e-4,Se+m.duration),ge.connect(qe),qe.connect(o.destination),ge.start(Se),ge.stop(Se+m.duration+.02)})}catch(o){console.warn("Battle tone playback skipped or blocked:",o)}},[ee,be]),Ut=l.useCallback(async t=>{if(!(!t||typeof window>"u"))try{await window.navigator.clipboard.writeText(t),ue(t),window.setTimeout(()=>{ue(o=>o===t?null:o)},1600)}catch{x({status:"error",message:"Unable to copy room code automatically. Please copy it manually."})}},[]),Yt=l.useCallback(()=>{},[vt]),Xt=l.useCallback(t=>{f(!1),j(null),S(null),W(0),C(null),x({status:"error",message:t}),d("setup")},[]),ne=l.useCallback(async()=>{if(!n?.uid)return null;const[t,o]=await Promise.all([As(n.uid),zs(n.uid,{mode:ke,limitCount:8})]);return{stats:t,history:o}},[ke,n?.uid]);l.useEffect(()=>{if(xe.length===0)return;const o=xe.some(y=>y.id===i.subjectId)?i.subjectId:xe[0].id,b=xe.find(y=>y.id===o),m=b?.modules?.[0]?.id||"";k(y=>{const T=b?.modules?.some(g=>g.id===y.topicId)?y.topicId:m;return y.subjectId===o&&y.topicId===T?y:{...y,subjectId:o,topicId:T}})},[xe,i.subjectId]),l.useEffect(()=>{if(!n?.uid){ct(null),mt([]),dt(!1);return}let t=!0;return dt(!0),(async()=>{const b=await ne();t&&(b&&(ct(b.stats),mt(b.history)),dt(!1))})(),()=>{t=!1}},[ne,n?.uid]);const Ye=l.useMemo(()=>ke==="all"?ut:ut.filter(t=>t.mode===ke),[ut,ke]),Gt=l.useMemo(()=>Ht.map((t,o)=>{const b=t.rank||o+1,m=t.userId===n?.uid,y=`Student-${t.userId.slice(-4).toUpperCase()}`,T=He==="full"?t.displayName:He==="initials"?Us(t.displayName):y,g=Math.floor(t.leaderboardScore/25)*25,E=xt||m?`${t.leaderboardScore} pts`:`${g}-${g+24} pts`;return{...t,rank:b,isSelf:m,displayName:T,scoreLabel:E}}),[Ht,He,xt,n?.uid]);l.useEffect(()=>{if(c!=="leaderboard"&&c!=="hub")return;let t=!0;return $t(!0),(async()=>{const b=await qs(20);t&&(Ba(b),$t(!1))})(),()=>{t=!1}},[c]);const Xe=l.useCallback(async()=>{if(n?.uid)try{const t=await ca();if(t.sessionType==="match"&&t.match){let o=t.match;if(t.match.mode==="bot"&&t.match.status==="ready")try{o=await de(t.match.matchId),Pe.current=0}catch(b){const m=b;f(!1),j(null),S(null),d("setup"),I(typeof window<"u"&&window.navigator.onLine?"connected":"disconnected"),x({status:"error",message:m?.message||"Unable to resume bot battle. Please start a new match."});return}f(!1),j(t.room||null),S(o),C(t.queue?.expiresAtMs||o.expiresAtMs||null),d("battle"),I("connected");return}if(t.sessionType==="room"&&t.room){f(!1),j(t.room),S(o=>o?.mode==="bot"?o:null),C(null),I("connected");return}if(t.sessionType==="queue"){f(!0),j(null),S(o=>o?.mode==="bot"?o:null),C(t.queue?.expiresAtMs||null),I("connected");return}f(!1),j(null),S(o=>o?.mode==="bot"?o:null),C(null),I("connected")}catch(t){console.warn("Quiz Battle session resume failed:",t),I("reconnecting")}},[n?.uid]);l.useEffect(()=>{n?.uid&&Xe()},[n?.uid,Xe]),l.useEffect(()=>{typeof window>"u"||window.localStorage.setItem("quiz_battle_sound_enabled",ee?"1":"0")},[ee]),l.useEffect(()=>{typeof window>"u"||window.localStorage.setItem("quiz_battle_sound_volume",be.toFixed(2))},[be]),l.useEffect(()=>{if(typeof window>"u")return;const t=()=>{const o=window.innerWidth,b=window.innerHeight;Pa({width:Number.isFinite(o)&&o>0?o:At.width,height:Number.isFinite(b)&&b>0?b:At.height})};return t(),window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),l.useEffect(()=>{if(typeof document>"u")return;const t=()=>{Ta(!!document.fullscreenElement)};return t(),document.addEventListener("fullscreenchange",t),()=>{document.removeEventListener("fullscreenchange",t)}},[]),l.useEffect(()=>{const t=ae!==null;if(!(N||h&&(h.status==="waiting"||h.status==="ready")||t)){W(0);return}const o=()=>{if(!ae){W(m=>m+1);return}W(Math.max(0,Math.ceil((ae-Date.now())/1e3)))};o();const b=window.setInterval(o,1e3);return()=>{window.clearInterval(b)}},[N,h?.status,h?.roomId,ae]),l.useEffect(()=>{if(!ae)return;const t=window.setInterval(()=>{ae-Date.now()<=0&&(window.clearInterval(t),(async()=>{try{(N||!h)&&await da()}catch{}finally{Xt("Public matchmaking timed out after 5 minutes. Please start again.")}})())},1e3);return()=>{window.clearInterval(t)}},[h,Xt,N,ae]),l.useEffect(()=>{if(typeof window>"u")return;I(window.navigator.onLine?"connected":"disconnected");const t=()=>{I("reconnecting"),Xe()},o=()=>{I("disconnected")};return window.addEventListener("online",t),window.addEventListener("offline",o),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",o)}},[Xe]),l.useEffect(()=>{const t=s?.mode==="online"&&(s.status==="ready"||s.status==="in_progress"),o=s?.mode==="bot"&&s.status==="ready",b=!!(h&&(h.status==="waiting"||h.status==="ready"));if(o||(Pe.current=0),!N&&!b&&!t&&!o||F)return;let m=!1;const y=async()=>{try{if(s?.mode==="bot"&&s.status==="ready"){const g=await de(s.matchId);if(m)return;S(g),I("connected"),C(g.expiresAtMs||null),Pe.current=0,g.status==="in_progress"&&x({status:"queued",message:"Practice bot match started."});return}if(s?.mode==="online"){if(s.status==="ready"){const oe=await de(s.matchId);if(m)return;S(oe),I("connected"),C(oe.expiresAtMs||null),oe.status==="in_progress"&&x({status:"queued",message:"Match started. Round timer is live."});return}const g=await St(s.matchId);if(m)return;const E=g.roundResults.filter(oe=>oe.roundNumber>Ue.current).sort((oe,ge)=>oe.roundNumber-ge.roundNumber)[0];E?(Ue.current=E.roundNumber,re(E),bt(g)):(S(g),g.status==="completed"&&(f(!1),j(null),C(null)),g.status==="cancelled"&&s.status==="in_progress"&&(ht(!0),K(!1))),I("connected");return}if(h?.roomId){const g=await Bs({roomId:h.roomId});if(m)return;if(j(g.room),g.match){const E=await de(g.match.matchId);if(m)return;S(E),j(g.room),f(!1),C(E.expiresAtMs||null),d("battle"),I("connected"),x({status:"queued",message:E.status==="ready"?"Opponent connected. Waiting for synchronized start...":"Private room match started."})}return}if(N){const g=await ca();if(m)return;if(g.sessionType==="match"&&g.match){const E=await de(g.match.matchId);if(m)return;S(E),j(g.room||null),f(!1),C(E.expiresAtMs||null),d("battle"),I("connected"),x({status:"queued",message:"Opponent found. Preparing synchronized start..."});return}if(g.sessionType==="room"&&g.room){f(!1),j(g.room),C(null),I("connected");return}I("connected")}}catch(g){if(!m){if(console.warn("Quiz Battle sync poll failed:",g),s?.mode==="bot"&&s.status==="ready"&&(Pe.current+=1,Pe.current>=3)){const E=g;f(!1),j(null),S(null),d("setup"),x({status:"error",message:E?.message||"Unable to start bot battle. Please try again."}),I("disconnected");return}I("reconnecting")}}};y();const T=window.setInterval(()=>{y()},3e3);return()=>{m=!0,window.clearInterval(T)}},[s?.matchId,s?.mode,s?.status,h?.roomId,h?.status,F,N]);const fe=l.useMemo(()=>s?.mode==="online"&&(s.status==="ready"||s.status==="in_progress")?{scope:"match",resourceId:s.matchId}:h&&(h.status==="waiting"||h.status==="ready")?{scope:"room",resourceId:h.roomId}:N&&n?.uid?{scope:"queue",resourceId:n.uid}:null,[s,h,N,n?.uid]);l.useEffect(()=>{if(!fe)return;let t=!1;const o=async()=>{try{await Es(fe.scope,fe.resourceId),t||I("connected")}catch(m){t||(console.warn("Quiz Battle heartbeat failed:",m),I("reconnecting"))}};o();const b=window.setInterval(()=>{o()},8e3);return()=>{t=!0,window.clearInterval(b),Ns(fe.scope,fe.resourceId)}},[fe?.scope,fe?.resourceId]),l.useEffect(()=>{if(!s||s.status!=="in_progress"){K(!1),_e.current=null,me.current=0;return}_e.current=null,me.current=0;const t=s.roundDeadlineAtMs?Math.max(0,Math.ceil((s.roundDeadlineAtMs-Date.now())/1e3)):s.timePerQuestionSec;Re(t),X(null),K(!1)},[s?.matchId,s?.status,s?.currentRound,s?.timePerQuestionSec]),l.useEffect(()=>{F&&(!s||s.status!=="in_progress")&&pt(!1)},[s?.matchId,s?.status,F]),l.useEffect(()=>{const t=s?.lifecycle;if(!t?.eventType)return;const o=`${t.eventType}:${t.sequence}`;Ot.current!==o&&(Ot.current=o,t.eventType==="answer_locked"?D("lock"):t.eventType==="round_result"&&D("result"))},[s?.lifecycle?.eventType,s?.lifecycle?.sequence,D]),l.useEffect(()=>{!s||s.status!=="completed"||Vt.current!==s.matchId&&(Vt.current=s.matchId,D(s.outcome==="loss"?"loss":"win"),s.outcome==="win"&&Xa(()=>import("./confetti.module-C94ZD2ww.js"),[]).then(t=>{t.default({particleCount:110,spread:78,origin:{y:.62},ticks:160})}).catch(()=>{}))},[s?.matchId,s?.status,s?.outcome,D]),l.useEffect(()=>{if(!s||s.status!=="in_progress"||Z||G||F){gt.current=null;return}P<=3&&P>0&>.current!==P&&(gt.current=P,D("tick"))},[s?.status,P,Z,G,F,D]),l.useEffect(()=>{if(!s||s.status!=="in_progress"){wt.current=0;return}H>wt.current&&H>=2&&D(H>=4?"multiplier":"streak"),wt.current=H},[s?.matchId,s?.status,H,D]),l.useEffect(()=>{if(!s){We.current=null,Ve(null);return}const t=We.current;if(!t||t.matchId!==s.matchId){We.current={matchId:s.matchId,scoreFor:s.scoreFor,scoreAgainst:s.scoreAgainst},Ve(null);return}if(s.scoreFor!==t.scoreFor||s.scoreAgainst!==t.scoreAgainst){const o=s.scoreFor>t.scoreFor?"player":"opponent";Ve(o),De.current&&window.clearTimeout(De.current),De.current=window.setTimeout(()=>{Ve(null)},850)}We.current={matchId:s.matchId,scoreFor:s.scoreFor,scoreAgainst:s.scoreAgainst}},[s?.matchId,s?.scoreAgainst,s?.scoreFor]),l.useEffect(()=>()=>{De.current&&window.clearTimeout(De.current)},[]),l.useEffect(()=>{if(!B?.studentCorrect||pe===null||pe<=0){ft(null);return}const t=pe>0?"positive":pe<0?"negative":"neutral";ft({id:Date.now(),label:`${pe>=0?"+":""}${pe} Momentum`,tone:t});const o=window.setTimeout(()=>{ft(null)},1400);return()=>{window.clearTimeout(o)}},[pe,B]),l.useEffect(()=>{if(B&&Oe){B.studentCorrect?D("win"):D("loss");const t=window.setTimeout(()=>{S(Oe),re(null),X(null),K(!1),bt(null),Oe.status==="completed"&&(f(!1),j(null),ne(),Ue.current=-1)},1500);return()=>window.clearTimeout(t)}},[B,Oe,D,ne]);const Ge=l.useCallback(async t=>{if(!s||s.status!=="in_progress"||Z||F)return;Ee(!0);const o=window.setTimeout(()=>{Ee(!1),x({status:"error",message:"Submission took too long. Syncing latest match state now..."}),St(s.matchId).then(b=>{S(b),b.status==="completed"&&(f(!1),j(null),C(null))}).catch(()=>{})},12e3);try{const b=s.roundDeadlineAtMs?et(s.timePerQuestionSec*1e3-Math.max(0,s.roundDeadlineAtMs-Date.now()),0,s.timePerQuestionSec*1e3):Math.max(0,(s.timePerQuestionSec-P)*1e3),m=await Ps({matchId:s.matchId,roundNumber:s.currentRound,selectedOptionIndex:t,responseMs:b});_e.current=null,me.current=0,m.roundResult?(Ue.current=m.roundResult.roundNumber,re(m.roundResult),bt(m.match)):(S(m.match),re(null),m.match.mode==="online"&&m.match.status==="in_progress"?(K(!0),x({status:"queued",message:"Answer locked. Waiting for opponent to finish the round..."})):X(null)),m.match.status==="completed"&&(f(!1),j(null),C(null),ne(),x({status:"queued",message:m.completion?`Match finished (${m.completion.outcome.toUpperCase()}) +${m.completion.xpEarned} XP`:"Match finished. Results saved."}))}catch(b){const y=b?.message||"Unable to submit answer right now. Please try again.";if(t===null||y.includes("Round timer elapsed")||y.includes("Expected round")||y.includes("Match is not currently active"))try{const g=await St(s.matchId),E=g.currentRound!==s.currentRound;if(S(g),X(null),K(!1),E||g.status==="completed"?(_e.current=null,me.current=0):t===null&&(me.current=Date.now()+3e3),g.status==="completed"){f(!1),j(null),C(null),ne(),x({status:"queued",message:"Match finished. Results synchronized."});return}x({status:"queued",message:"Round timed out. Synced to the latest battle state."});return}catch{}t===null&&(me.current=Date.now()+3e3),x({status:"error",message:y})}finally{window.clearTimeout(o),Ee(!1)}},[s,F,ne,Z,P]);l.useEffect(()=>{if(!s||s.status!=="in_progress"||F||G||Z)return;const t=s.roundDeadlineAtMs?Math.max(0,Math.ceil((s.roundDeadlineAtMs-Date.now())/1e3)):P;if(s.roundDeadlineAtMs&&t!==P&&Re(t),Ne===null?t<=1:t<=0){if(_e.current===s.currentRound&&Date.now(){s.roundDeadlineAtMs?Re(Math.max(0,Math.ceil((s.roundDeadlineAtMs-Date.now())/1e3))):Re(m=>Math.max(0,m-1))},1e3);return()=>{window.clearTimeout(b)}},[s,G,F,Z,P,Ne,Ge]);const Zt=l.useCallback(async()=>{if(!(!s||s.mode!=="bot")){Ee(!0),x({status:"validating"});try{const t=await Ds(s.matchId),o=await de(t.matchId);S(o),j(null),f(!1),C(null),re(null),X(null),K(!1),d("battle"),x({status:"queued",message:`Rematch ready (${t.botDifficulty}). Good luck!`})}catch(t){x({status:"error",message:t?.message||"Unable to start rematch right now."})}finally{Ee(!1)}}},[s]);if(r!=="student")return e.jsxs(e.Fragment,{children:[e.jsx("style",{children:zt}),e.jsx("div",{className:"px-4 sm:px-6 xl:px-10 py-6 sm:py-8",children:e.jsx(te,{className:p(O,"max-w-2xl"),children:e.jsxs(le,{children:[e.jsx(ie,{children:"Quiz Battle is student-only"}),e.jsx(he,{className:"text-muted-foreground dark:text-[#aab3c7]",children:"Your account role does not have access to this module."})]})})})]});const Kt=t=>{_([]),x({status:"idle"}),pt(!1),f(!1),j(null),R(""),S(null),re(null),X(null),K(!1),C(null),k(o=>({...o,mode:t,queueType:t==="online"?o.queueType:"public_matchmaking"})),W(0),d("setup")},Jt=async()=>{x({status:"validating"});try{h?.roomId?await Fs({roomId:h.roomId}):await da(),f(!1),j(null),S(t=>!t||t.mode!=="online"?t:t.status==="ready"||t.status==="cancelled"?null:t),R(""),W(0),C(null),x({status:"queued",message:h?.roomId?"Private room cancelled.":"Left matchmaking queue."})}catch(t){x({status:"error",message:t?.message||"Unable to cancel this online session right now. Please try again."})}},Oa=async()=>{x({status:"validating"});const t=Ss(i);if(t.length>0){_(t),x({status:"error",message:"Fix the highlighted setup fields before starting."});return}_([]);try{if(i.mode==="online"){if(i.queueType==="private_room"){const y=A.trim().toUpperCase(),T=y?await Is(y):await Ms(i);if(f(!1),j(T.room),R(""),C(T.match?.expiresAtMs||null),T.match){const g=await de(T.match.matchId);S(g),re(null),X(null),K(!1),d("battle"),C(g.expiresAtMs||null),x({status:"queued",message:g.status==="ready"?`Room ${T.room.roomCode} linked. Waiting for synchronized start...`:"Private room match started."});return}S(null),C(null),x({status:"queued",message:y?"Joined private room. Waiting for opponent...":"Private room created. Share code:"});return}const m=await Cs(i);if(m.status==="matched"&&m.matchId){const y=await de(m.matchId);f(!1),j(null),S(y),re(null),X(null),K(!1),d("battle"),C(y.expiresAtMs||null),x({status:"queued",message:"Opponent found. Preparing synchronized start..."});return}f(!0),j(null),S(null),C(m.expiresAtMs||Date.now()+Ls),W(0),x({status:"queued",message:"Joined matchmaking queue. Waiting for an opponent..."});return}const o=await Rs(i),b=await de(o.matchId);f(!1),j(null),S(b),re(null),X(null),K(!1),Re(b.timePerQuestionSec),C(null),d("battle"),x({status:"queued",message:`Bot match ${o.matchId.slice(0,8)} live (${o.botDifficulty}).`}),ne().then(m=>{m&&(ct(m.stats),mt(m.history))})}catch(o){f(!1),x({status:"error",message:o?.message||"Unable to start battle. Please try again."})}},U=t=>v.find(o=>o.field===t)?.message;se?.winRate;const ea=!!(i.mode==="online"&&h&&(h.status==="waiting"||h.status==="ready")&&(!s||s.status!=="completed")),Va=!!(N||h&&(h.status==="waiting"||h.status==="ready")&&(!s||s.status==="ready"||s.status==="cancelled"));return s&&(s.status==="in_progress"||s.status==="completed")?e.jsxs(e.Fragment,{children:[e.jsx("style",{children:zt}),e.jsxs("div",{className:"fixed inset-0 z-[100] bg-[#0B0F19] text-white flex flex-col overflow-hidden",children:[s.status==="completed"&&s.outcome==="win"&&e.jsx(Hs,{viewportHeight:Te.height,viewportWidth:Te.width}),s.status==="completed"&&s.outcome==="loss"&&e.jsx($s,{viewportHeight:Te.height}),s.status==="completed"&&s.outcome==="draw"&&e.jsx(Os,{viewportHeight:Te.height,viewportWidth:Te.width}),e.jsx("div",{className:"absolute inset-0 z-0 opacity-40",children:e.jsx(la,{children:e.jsx("div",{className:"h-full w-full"})})}),e.jsx(tt,{children:Da&&e.jsx(w.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 z-[120] bg-black/70 backdrop-blur-md flex flex-col items-center justify-center px-6",children:e.jsxs(w.div,{initial:{opacity:0,transform:"translateY(40px) scale(0.85)"},animate:{opacity:1,transform:"translateY(0) scale(1)"},transition:{type:"spring",damping:18,stiffness:250,delay:.1},className:"bg-[#1e2433] border border-white/10 rounded-[2rem] p-8 flex flex-col items-center gap-5 max-w-sm w-full shadow-[0_30px_80px_rgba(0,0,0,0.6)]",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-24 h-24 rounded-full bg-[#1a2030] border-4 border-rose-500/50 overflow-hidden flex items-end justify-center shadow-xl",children:s.mode==="bot"?e.jsx(Qe,{className:"h-16 w-16 text-rose-400 mb-2",strokeWidth:1.5}):e.jsx(je,{className:"h-14 w-14 text-slate-500 mb-2",strokeWidth:1.5})}),e.jsx(w.div,{initial:{opacity:0,transform:"scale(0.5) translateX(-10px)"},animate:{opacity:1,transform:"scale(1) translateX(0)"},transition:{delay:.4,type:"spring",stiffness:300},className:"absolute -top-2 left-full ml-2 bg-white text-slate-900 text-xs font-black px-3 py-1.5 rounded-2xl rounded-bl-none whitespace-nowrap shadow-lg",children:"I give up! 🏳️"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("h2",{className:"text-2xl font-black text-white mb-1",children:"Opponent Surrendered"}),e.jsxs("p",{className:"text-white/50 text-sm",children:[e.jsx("span",{className:"font-bold text-white/70",children:s.opponentName||"Your opponent"})," left the match. You win! 🏆"]})]}),e.jsxs("div",{className:"flex flex-col gap-3 w-full",children:[e.jsx(z,{size:"lg",className:"w-full h-12 bg-emerald-500 hover:bg-emerald-400 text-white font-black rounded-xl",onClick:()=>{ht(!1),S(null),j(null),f(!1),x({status:"idle"}),d("hub"),ne()},children:"🏆 Claim Victory"}),e.jsx(z,{size:"lg",variant:"outline",className:"w-full h-12 border-white/20 text-white/70 hover:bg-white/10 rounded-xl",onClick:()=>{ht(!1),S(null),j(null),f(!1),x({status:"idle"}),d("hub")},children:"Back to Arena"})]})]})})}),F&&e.jsx("div",{className:"absolute inset-0 z-[110] bg-black/60 backdrop-blur-md flex items-center justify-center",children:e.jsxs(te,{className:"w-full max-w-sm border-border/50 bg-[#181d27] shadow-[0_20px_50px_rgba(0,0,0,0.5)]",children:[e.jsxs(le,{className:"text-center",children:[e.jsx(ie,{className:"text-3xl font-black text-white",children:"PAUSED"}),e.jsx(he,{className:"text-base text-muted-foreground mt-2",children:s.mode==="online"?"Online match - timer continues in the background! Hurry!":"Bot match - round timer frozen."})]}),e.jsxs(we,{className:"flex flex-col gap-3",children:[e.jsx(z,{variant:"default",size:"lg",className:"w-full text-lg h-12",onClick:Yt,children:"Resume Match"}),e.jsx(z,{variant:"outline",size:"lg",className:"w-full text-lg h-12 border-rose-500/20 text-rose-500 hover:bg-rose-500/10",onClick:()=>{pt(!1),S(null),j(null),f(!1),x({status:"idle"}),d("setup")},children:"Leave Match"})]})]})}),e.jsxs("div",{className:"relative z-10 flex flex-col h-full w-full max-w-[1400px] mx-auto px-4 md:px-8 py-4",children:[e.jsx(Sa,{playerRoundStreak:H,playerVisualMultiplier:$a,liveXpEarned:Ha,activeMatch:s,subjects:ta,battleSoundEnabled:ee,onToggleSound:()=>qt(t=>!t),isFullscreen:Ra,onToggleFullscreen:()=>{typeof document>"u"||(document.fullscreenElement?document.exitFullscreen().catch(t=>{console.warn("Fullscreen mode unavailable or blocked by browser (exit):",t)}):document.documentElement.requestFullscreen().catch(t=>{console.warn("Fullscreen mode unavailable or blocked by browser (enter):",t)}))},isDesignPauseAvailable:vt,onTogglePause:Yt}),s.status==="in_progress"?e.jsx("div",{className:"shrink-0 w-full max-w-4xl mx-auto h-2 bg-white/10 rounded-full overflow-hidden mt-6 mb-4",children:e.jsx(w.div,{className:"h-full",animate:{width:`${Math.max(0,P/s.timePerQuestionSec*100)}%`,backgroundColor:P>Math.floor(s.timePerQuestionSec/2)?"#10b981":P>3?"#f59e0b":"#ef4444"},transition:{duration:1,ease:"linear"}})}):e.jsx("div",{className:"shrink-0 h-6 md:h-10 w-full"}),e.jsx("div",{className:"flex-1 flex flex-col justify-center items-center w-full min-h-0 relative",children:s.status==="completed"?e.jsx("div",{className:"fixed inset-0 z-[200] flex flex-col items-center justify-center bg-slate-900/50 backdrop-blur-md px-4",children:e.jsxs(w.div,{initial:{opacity:0,scale:.9,y:10},animate:{opacity:1,scale:1,y:0},className:"w-full max-w-sm sm:max-w-md bg-[#161a25]/90 border border-white/20 shadow-[0_30px_80px_rgba(0,0,0,0.8)] rounded-[1.5rem] p-6 text-center",children:[e.jsx("h2",{className:p("text-3xl font-black uppercase tracking-widest drop-shadow-md mb-2",s.outcome==="win"?"text-emerald-400":s.outcome==="loss"?"text-rose-400":"text-amber-400"),children:s.outcome==="win"?"VICTORY!":s.outcome==="loss"?"DEFEAT":"DRAW MATCH"}),e.jsxs("p",{className:"text-white/80 font-bold text-sm mb-4 uppercase tracking-widest",children:["Final Score: ",s.scoreFor," - ",s.scoreAgainst]}),e.jsxs("div",{className:"bg-black/50 rounded-xl p-4 mb-5 border border-white/5 flex flex-col gap-3",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-white/40 text-[10px] font-black uppercase tracking-widest text-left mb-2",children:"Battle Score"}),(()=>{const t=s.roundResults||[];let o=0,b=0,m=0;for(const y of t)if(y.studentCorrect){o++;const T=o>=2?Math.min(15,(o-1)*5):0;b+=10,m+=T}else o=0;return e.jsxs(e.Fragment,{children:[e.jsx(ua,{value:b,label:"Correct Answers",delay:300,icon:e.jsx(yt,{className:"h-3 w-3 text-emerald-400"})}),e.jsx(ua,{value:m,label:"Streak Bonus",delay:900,icon:e.jsx(st,{className:"h-3 w-3 text-amber-400"})}),e.jsxs(w.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:1.5,duration:.4},className:"flex items-center justify-between pt-1 mt-1 border-t border-white/5",children:[e.jsx("span",{className:"text-white/50 text-xs font-bold uppercase tracking-widest",children:"Total"}),e.jsxs("span",{className:"text-base font-black text-white/80",children:[b+m," pts"]})]})]})})()]}),e.jsx("div",{className:"w-full h-px bg-white/10"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-white/40 text-[10px] font-black uppercase tracking-widest text-left mb-2",children:"Match Reward"}),e.jsxs(w.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:2,duration:.5,type:"spring"},className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-white/70 text-sm font-bold",children:s.outcome==="win"?"🏆 Victory Reward":s.outcome==="draw"?"🤝 Draw Reward":"📘 Participation Reward"}),e.jsxs("span",{className:"text-2xl font-black text-amber-400 drop-shadow-md",children:["+",s.xpEarned||(s.outcome==="win"?80:s.outcome==="draw"?55:35)," XP"]})]}),e.jsx("p",{className:"text-white/25 text-[9px] mt-1 text-right uppercase tracking-widest",children:"Credited to your profile"})]})]}),e.jsxs("div",{className:"flex flex-col gap-3 justify-center",children:[e.jsx(z,{size:"lg",onClick:()=>{S(null),j(null),f(!1),d("hub")},className:"w-full h-12 rounded-xl text-sm font-black bg-white/10 hover:bg-white/20 text-white border border-white/20",children:"BACK TO ARENA"}),s.mode==="bot"&&e.jsx(z,{size:"lg",onClick:()=>void Zt(),disabled:G,className:"w-full h-12 rounded-xl text-sm font-black bg-violet-600 hover:bg-violet-500 text-white border-b-2 border-violet-800 active:border-b-0 active:translate-y-[2px]",children:"REMATCH"})]})]})}):e.jsx(za,{activeMatch:s,roundSecondsLeft:P,lastRoundResult:B,selectedOptionIndex:Ne,roundLocked:Z,answerSubmitting:G,designPauseActive:F,onOptionSelect:t=>{B&&B.roundNumber===s.currentRound||G||Z||(pa()?.resume().catch(()=>{}),D("lock"),X(t),Ge(t))},floatingMomentum:qa,lastRoundMomentumDelta:pe,studentProfile:n,quizBattleAvatar:jt})}),e.jsx(Aa,{studentProfile:n,activeMatch:s,scorePulseTarget:Qa,quizBattleAvatar:jt})]})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("style",{children:zt}),e.jsx(la,{bgVideo:"/videos/warp_bg.mp4",className:"-mx-3 lg:-mx-4 -mt-3 lg:-mt-4 -mb-8 px-4 sm:px-6 xl:px-10 py-6 sm:py-8 min-h-[calc(100vh-3.5rem)] !w-auto overflow-hidden relative",children:e.jsx("div",{className:"h-full flex flex-col max-w-[1400px] mx-auto w-full",children:e.jsx(w.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.24,ease:[.22,1,.36,1]},className:"space-y-3 lg:space-y-4",children:e.jsxs(Qs,{value:c,onValueChange:t=>d(t),children:[e.jsx(Ie,{value:"hub",className:"mt-0 outline-none",children:e.jsx(w.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:-12},className:"space-y-5",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_300px] xl:grid-cols-[1fr_320px] gap-6 sm:gap-8 lg:gap-10",children:[e.jsxs("div",{className:"space-y-3 lg:space-y-4",children:[e.jsxs("div",{className:"relative select-none isolate bg-indigo-600 rounded-[2rem] shadow-[0_20px_45px_-15px_rgba(0,0,0,0.3)] shrink-0",children:[e.jsx("div",{className:"absolute inset-0 bg-black/60 pointer-events-none z-0 rounded-[2rem]"}),e.jsx("div",{className:"absolute inset-0 opacity-10 pointer-events-none rounded-[2rem] overflow-hidden repeating-stripe-bg"}),e.jsx("div",{className:"absolute top-0 right-0 w-[400px] h-[400px] bg-sky-500/20 blur-[100px] rounded-full pointer-events-none"}),e.jsxs("div",{className:"relative z-10 flex flex-col md:flex-row items-center justify-between p-6 lg:p-8 h-full min-h-[140px] lg:min-h-[160px]",children:[e.jsx("div",{className:"flex-1 space-y-3 w-full pr-0 md:pr-[240px] lg:pr-[280px]",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"flex items-center gap-3 text-3xl sm:text-4xl lg:text-[46px] font-black tracking-tight text-white mb-2 sm:mb-4",children:[e.jsx(kt,{className:"h-8 w-8 sm:h-10 sm:w-10 lg:h-12 lg:w-12 text-[#d1abff]",strokeWidth:2.5}),"Quiz Battle"]}),e.jsx("p",{className:"text-base sm:text-lg lg:text-xl text-white mt-1.5 sm:mt-2 max-w-2xl leading-relaxed",children:"Timed student duels with synchronized rounds, instant feedback, and progression rewards."}),e.jsxs("p",{className:"text-xs lg:text-sm font-semibold uppercase tracking-[0.15em] text-[#8a7fbc] mt-3",children:["Connection: ",e.jsx("span",{className:Qt==="connected"?"text-emerald-400":"text-amber-400",children:Qt})]})]})}),e.jsx("div",{className:"hidden md:block absolute right-[-5px] lg:right-[-15px] top-0 lg:top-[5px] w-[200px] lg:w-[260px] shrink-0 pointer-events-none z-20",children:e.jsx("img",{src:jt,alt:"Mascot",className:"w-full h-full object-contain animate-mascot-float"})})]})]}),e.jsxs("div",{className:"pt-4 lg:pt-6",children:[e.jsxs("h2",{className:"flex items-center gap-2 pb-4 text-xl lg:text-2xl font-black tracking-wide uppercase text-white drop-shadow-[0_0_12px_rgba(255,255,255,0.4)]",children:[e.jsx(kt,{className:"h-6 w-6 lg:h-8 lg:w-8 text-amber-400 drop-shadow-[0_0_8px_rgba(251,191,36,0.9)]"})," BATTLE MODES"]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 lg:gap-6 relative z-10 w-full mb-2",children:[e.jsxs(w.button,{type:"button",onClick:()=>Kt("online"),whileHover:{scale:1.025},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:15},className:"w-full h-[205px] sm:h-[245px] lg:h-[265px] bg-[#8A3FD3] rounded-[22px] border-none relative text-left shadow-[0_8px_30px_rgba(138,63,211,0.2)] hover:shadow-[0_12px_45px_rgba(138,63,211,0.4)] block flex-col group",children:[e.jsx("div",{className:"absolute inset-0 rounded-[22px] shadow-[inset_0_6px_15px_rgba(255,255,255,0.4)] pointer-events-none z-40"}),e.jsxs("div",{className:"absolute top-4 -left-4 z-20 w-[100px] h-[40px] opacity-100",children:[e.jsx("svg",{viewBox:"0 0 100 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-full h-full block drop-shadow-md",children:e.jsx("path",{d:"M0 0 H94 Q100 0 100 6 V34 Q100 40 94 40 H0 L14 20 Z",fill:"#b91c1c"})}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-end pr-3 font-black text-[13px] text-white tracking-[0.3px] opacity-100 font-nunito",children:"VS Player"})]}),e.jsxs("div",{className:"rounded-[22px] overflow-hidden relative isolate h-full flex flex-col justify-end",children:[e.jsx("div",{className:"absolute top-0 -left-[150%] w-[100%] h-full bg-gradient-to-r from-transparent via-white/40 to-transparent -skew-x-12 z-50 pointer-events-none transition-all duration-0 group-hover:duration-[800ms] ease-in-out group-hover:left-[150%]"}),e.jsxs("div",{className:"flex-1 w-full flex items-end justify-center relative pt-2 pointer-events-none",children:[e.jsx("div",{className:"absolute bottom-0 left-0 w-full h-[70px] sm:h-[95px] bg-[#662AA8] rounded-[50%_50%_0_0/100%_100%_0_0] scale-[1.05] z-0"}),e.jsxs("div",{className:"relative z-10 flex items-center justify-center mb-[2px] h-[120px] sm:h-[140px] w-full",children:[e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"",className:"h-[120%] sm:h-[125%] object-contain relative z-20 origin-bottom right-[-15px] drop-shadow-[0_12px_15px_rgba(0,0,0,0.3)] animate-avatar-left"}),e.jsx("div",{className:"relative z-30 flex flex-col items-center mx-[-20px] scale-[1.1] animate-vs-pulse",children:e.jsxs("span",{className:"font-black italic text-[40px] text-gray-200 tracking-tighter leading-none drop-shadow-[-2px_3px_0px_rgba(0,0,0,0.8)] webkit-text-stroke",children:[e.jsx("span",{className:"text-gray-300",children:"V"}),e.jsx("span",{className:"text-gray-400",children:"S"})]})}),e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"",className:"h-[120%] sm:h-[125%] object-contain relative z-10 scale-x-[-1] origin-bottom left-[-20px] drop-shadow-[0_12px_15px_rgba(0,0,0,0.3)] animate-avatar-right"})]})]}),e.jsx("div",{className:"relative z-10 w-full px-5 py-3 sm:py-4 text-center bg-[#662AA8]",children:e.jsx("p",{className:"text-[13px] font-bold text-white leading-[1.45] font-nunito",children:"Queue or room-code match with another student."})})]})]}),e.jsxs(w.button,{type:"button",onClick:()=>Kt("bot"),whileHover:{scale:1.025},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:15},className:"w-full h-[205px] sm:h-[245px] lg:h-[265px] bg-[#1FA7E1] rounded-[22px] border-none relative text-left shadow-[0_8px_30px_rgba(31,167,225,0.2)] hover:shadow-[0_12px_45px_rgba(31,167,225,0.4)] block flex-col group",children:[e.jsx("div",{className:"absolute inset-0 rounded-[22px] shadow-[inset_0_6px_15px_rgba(255,255,255,0.4)] pointer-events-none z-40"}),e.jsxs("div",{className:"absolute top-4 -left-4 z-20 w-[100px] h-[40px] opacity-100",children:[e.jsx("svg",{viewBox:"0 0 100 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-full h-full block drop-shadow-md",children:e.jsx("path",{d:"M0 0 H94 Q100 0 100 6 V34 Q100 40 94 40 H0 L14 20 Z",fill:"#b91c1c"})}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-end pr-3 font-black text-[13px] text-white tracking-[0.3px] opacity-100 font-nunito",children:"VS Bot"})]}),e.jsxs("div",{className:"rounded-[22px] overflow-hidden relative isolate h-full flex flex-col justify-end",children:[e.jsx("div",{className:"absolute top-0 -left-[150%] w-[100%] h-full bg-gradient-to-r from-transparent via-white/40 to-transparent -skew-x-12 z-50 pointer-events-none transition-all duration-0 group-hover:duration-[800ms] ease-in-out group-hover:left-[150%]"}),e.jsxs("div",{className:"flex-1 w-full flex items-end justify-center relative pt-2 pointer-events-none",children:[e.jsx("div",{className:"absolute bottom-0 left-0 w-full h-[70px] sm:h-[95px] bg-[#127DA6] rounded-[50%_50%_0_0/100%_100%_0_0] scale-[1.05] z-0"}),e.jsxs("div",{className:"relative z-10 flex items-end justify-center mb-[2px] h-[125px] sm:h-[145px] w-full",children:[e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"",className:"absolute opacity-40 blur-[1px] h-full object-contain origin-bottom -translate-x-[45px] sm:-translate-x-[60px] scale-[0.80] sm:scale-[0.85] animate-ghost-left"}),e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"",className:"absolute opacity-40 blur-[1px] h-full object-contain origin-bottom translate-x-[45px] sm:translate-x-[60px] scale-[0.80] sm:scale-[0.85] animate-ghost-right"}),e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"VS Bot",className:"relative opacity-100 scale-100 h-[105%] sm:h-[115%] object-contain drop-shadow-[0_15px_15px_rgba(0,0,0,0.3)] z-20 origin-bottom animate-main-avatar"})]})]}),e.jsx("div",{className:"relative z-10 w-full px-5 py-3 sm:py-4 text-center bg-[#127DA6]",children:e.jsx("p",{className:"text-[13px] font-bold text-white leading-[1.45] font-nunito",children:"Instant solo duel with selectable bot difficulty."})})]})]})]})]})]}),e.jsxs("div",{className:"space-y-3 lg:space-y-4 flex flex-col h-full justify-between",children:[e.jsx("div",{onClick:()=>d("leaderboard"),className:"relative w-full h-[155px] sm:h-[165px] cursor-pointer group flex items-end justify-center overflow-visible mt-1 mb-2 scale-[0.75] origin-bottom sm:scale-[0.80] lg:scale-[0.85] lg:origin-center",children:e.jsxs(w.div,{className:"relative w-full h-full flex flex-col items-center justify-end",whileHover:{scale:1.03},whileTap:{scale:.98},children:[e.jsxs("div",{className:"absolute top-[1px] sm:-top-[30px] w-full flex justify-center items-end px-2 z-0",children:[e.jsx(Nt,{strokeWidth:0,fill:"currentColor",className:"w-[35px] h-[35px] text-[#fde047] -rotate-[15deg] -mr-3 mb-1 z-0 drop-shadow-[0_0_15px_rgba(253,224,71,0.6)]"}),e.jsx("div",{className:"z-10 relative animate-star-float",children:e.jsx(Nt,{strokeWidth:0,fill:"currentColor",className:"w-[60px] h-[60px] text-[#fcd34d] drop-shadow-[0_0_25px_rgba(252,211,77,0.9)]"})}),e.jsx(Nt,{strokeWidth:0,fill:"currentColor",className:"w-[35px] h-[35px] text-[#fde047] rotate-[15deg] -ml-3 mb-1 z-0 drop-shadow-[0_0_15px_rgba(253,224,71,0.6)]"})]}),e.jsx("div",{className:`absolute inset-x-0 bottom-[40px] top-0 z-10 flex flex-col items-center justify-end - filter drop-shadow-[0px_3px_0px_white] drop-shadow-[0px_-3px_0px_white] drop-shadow-[3px_0px_0px_white] drop-shadow-[-3px_0px_0px_white] drop-shadow-[2px_2px_0px_white] drop-shadow-[-2px_-2px_0px_white] drop-shadow-[2px_-2px_0px_white] drop-shadow-[-2px_2px_0px_white]`,children:e.jsxs("div",{className:"flex items-end justify-center z-20 relative px-4",children:[e.jsxs("div",{className:"flex flex-col items-center w-[65px] relative",children:[e.jsx("div",{className:"w-full h-[14px] bg-[#d24b4b] rounded-[2px] relative z-10 -mb-[1px]"}),e.jsxs("div",{className:"w-[85%] h-[50px] bg-[#fe5c5c] rounded-b-[2px] flex flex-col justify-center items-center gap-1.5 pb-1.5",children:[e.jsx("div",{className:"w-6 h-1.5 bg-white rounded-full opacity-95"}),e.jsx("div",{className:"w-6 h-1.5 bg-white rounded-full opacity-95"})]})]}),e.jsxs("div",{className:"flex flex-col items-center w-[75px] -mx-[4px] z-20 relative",children:[e.jsx("div",{className:"w-full h-[18px] bg-[#f2812d] rounded-[2px] relative z-10 -mb-[1px]"}),e.jsxs("div",{className:"w-[85%] h-[75px] bg-[#fa9746] rounded-b-[2px] flex flex-col justify-start items-center pt-4 gap-1.5",children:[e.jsx("div",{className:"w-9 h-1.5 bg-white rounded-full opacity-95"}),e.jsx("div",{className:"w-9 h-1.5 bg-white rounded-full opacity-95"})]})]}),e.jsxs("div",{className:"flex flex-col items-center w-[65px] relative",children:[e.jsx("div",{className:"w-full h-[14px] bg-[#d24b4b] rounded-[2px] relative z-10 -mb-[1px]"}),e.jsxs("div",{className:"w-[85%] h-[50px] bg-[#fe5c5c] rounded-b-[2px] flex flex-col justify-center items-center gap-1.5 pb-1.5",children:[e.jsx("div",{className:"w-6 h-1.5 bg-white rounded-full opacity-95"}),e.jsx("div",{className:"w-6 h-1.5 bg-white rounded-full opacity-95"})]})]})]})}),e.jsx("div",{className:"absolute bottom-2 w-[110%] max-w-[280px] z-30 drop-shadow-2xl",children:e.jsxs("div",{className:"relative w-full h-[52px] flex justify-center items-center",children:[e.jsx("div",{className:"absolute -left-1 top-2 w-[55px] h-[40px] bg-[#8b0d0d] z-0 clip-poly-left"}),e.jsx("div",{className:"absolute -right-1 top-2 w-[55px] h-[40px] bg-[#8b0d0d] z-0 clip-poly-right"}),e.jsxs("div",{className:"absolute inset-x-6 top-0 bottom-0 bg-[#b61515] shadow-[inset_0_2px_4px_rgba(255,255,255,0.1),_inset_0_-4px_4px_rgba(0,0,0,0.2)] z-10 flex flex-col items-center justify-center",children:[e.jsx("h3",{className:"text-lg sm:text-xl font-black text-white tracking-widest leading-none drop-shadow-md font-nunito",children:"Hall of Fame"}),e.jsx("span",{className:"text-[9px] sm:text-[10px] font-bold text-white/90 tracking-widest mt-0.5",children:"View Page >"})]})]})})]})}),e.jsxs("div",{className:"relative w-full bg-[#3b3a82] dark:bg-[#2b2b5f] rounded-[24px] overflow-hidden flex flex-col shadow-[0_8px_30px_rgba(59,58,130,0.3)]",children:[e.jsxs("div",{className:"flex flex-row items-end justify-between px-5 pt-4 pb-2 relative z-10",children:[e.jsx("h3",{className:"text-[18px] font-black text-white tracking-wide leading-none drop-shadow-md font-nunito",children:"My Stats"}),e.jsx(z,{variant:"link",className:"text-white/80 hover:text-white p-0 h-auto font-semibold text-[13px] tracking-wide",onClick:()=>d("stats"),children:"View Stats >"})]}),e.jsxs("div",{className:"relative z-10 w-full overflow-hidden pb-4",children:[e.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-6 bg-gradient-to-r from-[#3b3a82] to-transparent z-20 pointer-events-none dark:from-[#2b2b5f]"}),e.jsx("div",{className:"absolute right-0 top-0 bottom-0 w-6 bg-gradient-to-l from-[#3b3a82] to-transparent z-20 pointer-events-none dark:from-[#2b2b5f]"}),e.jsx("div",{className:"flex w-max pl-3 animate-marquee",children:[0,1].map(t=>e.jsxs("div",{className:"flex gap-2.5 pr-2.5",children:[e.jsxs("div",{className:"flex-none w-[60px] sm:w-[65px] lg:w-[70px] xl:w-[75px] aspect-square rounded-[12px] bg-[#f0eaff] p-1.5 flex flex-col justify-between relative overflow-hidden group shadow-sm dark:bg-[#d6ccf5]",children:[e.jsx(_t,{className:"absolute -bottom-1 -right-2 w-6 h-6 sm:w-8 sm:h-8 text-[#a06aec]/10 -rotate-12 transition-transform group-hover:scale-110"}),e.jsx("span",{className:"text-[12px] drop-shadow-sm leading-none",children:"🏆"}),e.jsxs("div",{className:"relative z-10 space-y-[1px]",children:[e.jsxs("h4",{className:"text-[12px] sm:text-[14px] lg:text-[16px] font-black text-[#8f5ae2] leading-none tracking-tight",children:[Math.round(se?.winRate||0)," %"]}),e.jsx("p",{className:"text-[6px] lg:text-[7px] font-extrabold text-[#baa4df] uppercase tracking-wider leading-none",children:"Win Rate"})]})]}),e.jsxs("div",{className:"flex-none w-[60px] sm:w-[65px] lg:w-[70px] xl:w-[75px] aspect-square rounded-[12px] bg-[#e1f5f7] p-1.5 flex flex-col justify-between relative overflow-hidden group shadow-sm dark:bg-[#b0e6eb]",children:[e.jsx(Et,{className:"absolute -bottom-1 -right-2 w-6 h-6 sm:w-8 sm:h-8 text-[#35a8bc]/10 rotate-12 transition-transform group-hover:scale-110"}),e.jsx("span",{className:"text-[12px] drop-shadow-sm leading-none",children:"🎯"}),e.jsxs("div",{className:"relative z-10 space-y-[1px]",children:[e.jsx("h4",{className:"text-[12px] sm:text-[14px] lg:text-[16px] font-black text-[#319ab4] leading-none tracking-tight",children:se?.matchesPlayed||0}),e.jsx("p",{className:"text-[6px] lg:text-[7px] font-extrabold text-[#7eafbe] uppercase tracking-wider leading-none",children:"Matches"})]})]}),e.jsxs("div",{className:"flex-none w-[60px] sm:w-[65px] lg:w-[70px] xl:w-[75px] aspect-square rounded-[12px] bg-[#fef5e7] p-1.5 flex flex-col justify-between relative overflow-hidden group shadow-sm dark:bg-[#f6ebd2]",children:[e.jsx(na,{className:"absolute -bottom-1 -right-2 w-6 h-6 sm:w-8 sm:h-8 text-[#e87a42]/10 -rotate-12 transition-transform group-hover:scale-110"}),e.jsx("span",{className:"text-[12px] drop-shadow-sm leading-none",children:"⏱️"}),e.jsxs("div",{className:"relative z-10 space-y-[1px]",children:[e.jsxs("h4",{className:"text-[12px] sm:text-[14px] lg:text-[16px] font-black text-[#db734b] leading-none tracking-tight",children:[se?.averageResponseMs?(se.averageResponseMs/1e3).toFixed(1):0,"s"]}),e.jsx("p",{className:"text-[6px] lg:text-[7px] font-extrabold text-[#d2a893] uppercase tracking-wider leading-none whitespace-nowrap",children:"Response"})]})]}),e.jsxs("div",{className:"flex-none w-[60px] sm:w-[65px] lg:w-[70px] xl:w-[75px] aspect-square rounded-[12px] bg-[#fdeceb] p-1.5 flex flex-col justify-between relative overflow-hidden group shadow-sm dark:bg-[#fbd3d3]",children:[e.jsx(st,{className:"absolute -bottom-1 -right-2 w-6 h-6 sm:w-8 sm:h-8 text-[#df655a]/10 rotate-12 transition-transform group-hover:scale-110"}),e.jsx("span",{className:"text-[12px] drop-shadow-sm leading-none",children:"✨"}),e.jsxs("div",{className:"relative z-10 space-y-[1px]",children:[e.jsx("h4",{className:"text-[12px] sm:text-[14px] lg:text-[16px] font-black text-[#d05c54] leading-none tracking-tight",children:n?.currentXP||0}),e.jsx("p",{className:"text-[6px] lg:text-[7px] font-extrabold text-[#dd9a9a] uppercase tracking-wider leading-none whitespace-nowrap",children:"Total XP"})]})]})]},t))})]})]}),e.jsxs(te,{className:p(O,"rounded-[18px] flex flex-col min-h-[200px]"),children:[e.jsxs(le,{className:"pb-0 pt-3 px-4 flex flex-row items-center justify-between",children:[e.jsxs(ie,{className:"text-[14px] font-black flex items-center gap-2 text-[#2e2b5e] dark:text-[#f5f7fb]",children:[e.jsx(oa,{className:"h-[16px] w-[16px] text-[#2e2b5e] dark:text-[#9e8fff]"})," Match History"]}),e.jsx(z,{variant:"link",size:"sm",className:"h-auto p-0 text-[12px] font-semibold text-muted-foreground dark:text-[#95a0bb] hover:text-primary transition-colors",onClick:()=>d("history"),children:"View All"})]}),e.jsxs(we,{className:"space-y-1.5 px-4 pt-1 pb-3 overflow-y-auto",children:[e.jsx("div",{className:"text-[11px] text-muted-foreground dark:text-[#8b95ad] mb-1.5 leading-relaxed",children:"Your recent student battles only."}),Lt?e.jsxs("div",{className:"space-y-2",children:[e.jsx(ve,{className:"h-10 w-full rounded-xl bg-muted dark:bg-[#2a3143]"}),e.jsx(ve,{className:"h-10 w-full rounded-xl bg-muted dark:bg-[#2a3143]"})]}):Ye.length===0?e.jsx("p",{className:"text-xs text-center text-muted-foreground dark:text-[#a8b2c9] py-2",children:"No battle history yet."}):Ye.slice(0,3).map(t=>{const o=t.outcome==="win",b=t.outcome==="loss",m=t.opponentName.split(" ").map(y=>y[0]).join("").substring(0,2).toUpperCase()||"OP";return e.jsxs("div",{className:"group relative overflow-hidden rounded-[14px] border border-muted-foreground/15 bg-white dark:bg-[#11151d] dark:border-[#2f3547] p-2 shadow-sm transition-all hover:scale-[1.01] hover:shadow-md",children:[e.jsx("div",{className:p("absolute inset-y-0 right-0 w-[55%] pointer-events-none opacity-[0.2] dark:opacity-[0.25] mix-blend-multiply dark:mix-blend-screen transition-all",o?"bg-gradient-to-l from-emerald-500 via-emerald-500/40 to-transparent":b?"bg-gradient-to-l from-rose-500 via-rose-500/40 to-transparent":"bg-gradient-to-l from-amber-400 via-amber-400/40 to-transparent")}),e.jsxs("div",{className:"flex items-center gap-2.5 relative z-10 w-full",children:[e.jsx("div",{className:p("w-9 h-9 rounded-full flex items-center justify-center font-black text-[12px] tracking-wide text-white flex-shrink-0 shadow-inner",o?"bg-[#34d399] dark:bg-[#15803d]":b?"bg-[#fb7185] dark:bg-[#be123c]":"bg-[#fbbf24] dark:bg-[#b45309]"),children:m}),e.jsxs("div",{className:"flex-grow min-w-0 flex flex-col justify-center",children:[e.jsxs("p",{className:"text-[13px] font-extrabold text-[#36326e] dark:text-[#e4e7f1] truncate leading-tight",children:["vs ",t.opponentName]}),e.jsxs("p",{className:"text-[10px] font-bold text-muted-foreground/60 dark:text-[#7f88a3] truncate flex items-center gap-1 mt-0.5",children:[t.subjectId," ",e.jsx("span",{className:"w-1 h-1 rounded-full bg-muted-foreground/30"})," ",t.difficulty||"Medium"," ",e.jsx("span",{className:"w-1 h-1 rounded-full bg-muted-foreground/30"})," ",t.rounds||"5"," rnds"]})]}),e.jsxs("div",{className:"text-right flex flex-col items-end justify-center pl-2 flex-shrink-0",children:[e.jsxs("p",{className:"tabular-nums text-[16px] leading-[1.1] font-black text-[#2e2b5e] dark:text-[#f5f7fb] tracking-tighter",children:[t.scoreFor,e.jsx("span",{className:"text-muted-foreground/40 mx-[1px]",children:"-"}),t.scoreAgainst]}),e.jsx("p",{className:p("text-[9px] font-black uppercase tracking-[0.1em]",o?"text-emerald-500 dark:text-emerald-400":b?"text-rose-500 dark:text-rose-400":"text-amber-500 dark:text-amber-400"),children:t.outcome})]})]})]},t.matchId)})]})]})]})]})},"hub")}),e.jsx(Ie,{value:"setup",className:"mt-0 outline-none",children:e.jsxs(w.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:-12},className:"w-full space-y-6",children:[e.jsxs(w.div,{className:p(O,"relative overflow-hidden rounded-[24px] mb-6 shadow-lg",i.mode==="online"?"border-purple-500/20 shadow-[0_0_40px_-10px_rgba(138,63,211,0.2)]":"border-sky-500/20 shadow-[0_0_40px_-10px_rgba(31,167,225,0.2)]"),whileHover:{scale:1.01},transition:{type:"spring",stiffness:300,damping:20},children:[e.jsx("div",{className:p("pointer-events-none absolute inset-0 bg-gradient-to-r",i.mode==="online"?"from-purple-500/20 via-fuchsia-500/10 to-purple-600/5 dark:from-purple-500/20 dark:via-fuchsia-500/10 dark:to-purple-900/10":"from-sky-500/20 via-cyan-500/10 to-sky-600/5 dark:from-sky-500/20 dark:via-cyan-500/10 dark:to-sky-900/10")}),e.jsx("div",{className:p("pointer-events-none absolute -top-24 -right-24 h-64 w-64 rounded-full blur-3xl animate-orb-pulse",i.mode==="online"?"bg-purple-400/20":"bg-sky-400/20")}),e.jsx("div",{className:p("pointer-events-none absolute -bottom-12 -left-12 h-40 w-40 rounded-full blur-2xl animate-orb-pulse-delayed",i.mode==="online"?"bg-fuchsia-400/30":"bg-cyan-400/30")}),e.jsx("div",{className:"absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAiLz4KPHBhdGggZD0iTTAgMEgxdjFIMHoiIGZpbGw9IiM2MzY2ZjEiIGZpbGwtb3BhY2l0eT0iMC4wNSIvPgo8L3N2Zz4=')] opacity-30 dark:opacity-10 mix-blend-overlay"}),e.jsxs("div",{className:"relative p-6 sm:p-8 md:px-10 flex items-center gap-5 sm:gap-8 z-10",children:[e.jsx(z,{variant:"ghost",onClick:()=>d("hub"),className:p("h-12 w-12 sm:h-14 sm:w-14 p-0 rounded-full hover:scale-105 transition-all backdrop-blur-md shadow-lg shrink-0 flex items-center justify-center group",i.mode==="online"?"bg-white/50 dark:bg-black/40 hover:bg-white/80 dark:hover:bg-black/60 border border-purple-500/30":"bg-white/50 dark:bg-black/40 hover:bg-white/80 dark:hover:bg-black/60 border border-sky-500/30"),children:e.jsx(Ze,{className:p("h-6 w-6 sm:h-8 sm:w-8 rotate-180 transition-transform group-hover:-translate-x-0.5",i.mode==="online"?"text-purple-800 dark:text-purple-300":"text-sky-800 dark:text-sky-300")})}),e.jsxs("div",{children:[e.jsxs("h2",{className:p("flex items-center gap-3 text-3xl sm:text-4xl font-black tracking-tight text-transparent bg-clip-text bg-gradient-to-br drop-shadow-sm",i.mode==="online"?"from-purple-600 to-fuchsia-500 dark:from-purple-300 dark:to-fuchsia-200":"from-sky-600 to-cyan-500 dark:from-sky-300 dark:to-cyan-200"),children:[e.jsx("div",{className:p("p-2 rounded-2xl shadow-inner border animate-icon-bob",i.mode==="online"?"bg-purple-100 dark:bg-purple-900/50 border-purple-200 dark:border-purple-700/50":"bg-sky-100 dark:bg-sky-900/50 border-sky-200 dark:border-sky-700/50"),children:i.mode==="online"?e.jsx(je,{className:"h-8 w-8 text-purple-600 dark:text-purple-400 drop-shadow-[0_0_8px_rgba(138,63,211,0.5)]"}):e.jsx(Qe,{className:"h-8 w-8 text-sky-600 dark:text-sky-400 drop-shadow-[0_0_8px_rgba(31,167,225,0.5)]"})}),i.mode==="online"?"1v1 Online":"1v1 vs Bot"]}),e.jsx("p",{className:p("text-[10px] sm:text-[12px] font-black uppercase tracking-[0.2em] mt-1.5 drop-shadow-sm",i.mode==="online"?"text-purple-600/80 dark:text-purple-400/80":"text-sky-600/80 dark:text-sky-400/80"),children:i.mode==="online"?"CHALLENGE YOUR SCHOOLMATES AND PROVE YOUR SKILLS.":"CHALLENGE THE AI AND SHARPEN YOUR SKILLS."})]})]})]}),e.jsx("div",{className:"rounded-[24px] border border-white/40 bg-white/85 dark:border-white/10 dark:bg-black/80 backdrop-blur-xl p-5 sm:p-7 shadow-xl",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 lg:gap-10",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1.5 group",children:[e.jsx("label",{className:p("text-[11px] font-black uppercase tracking-[0.12em] ml-1",i.mode==="online"?"text-[#8A3FD3] dark:text-[#a35ceb]":"text-[#1FA7E1] dark:text-[#4bc1f2]"),children:"Category"}),e.jsxs(Ae,{value:i.subjectId,onValueChange:t=>k(o=>({...o,subjectId:t})),children:[e.jsx(ze,{className:p("rounded-xl h-11 border-white/20 bg-white/60 dark:bg-black/50 dark:border-white/10 transition-colors shadow-inner",i.mode==="online"?"hover:border-[#8A3FD3]/50":"hover:border-[#1FA7E1]/50",U("subjectId")&&"border-rose-400"),children:e.jsx(Ce,{placeholder:"Select category"})}),e.jsx(Me,{className:"rounded-xl backdrop-blur-xl bg-white/90 dark:bg-[#1a1f2e]/90",children:xe.map(t=>{const o=u(t.id);return e.jsx(J,{value:t.id,className:"rounded-lg",disabled:!o,children:e.jsxs("span",{className:"flex items-center gap-2",children:[t.title,!o&&e.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-bold text-slate-400 ml-1",children:[e.jsx(os,{size:10})," Coming Soon"]})]})},t.id)})})]}),U("subjectId")&&e.jsx("p",{className:"text-xs text-destructive dark:text-rose-300 ml-1",children:U("subjectId")})]}),e.jsxs("div",{className:"space-y-1.5 group",children:[e.jsx("label",{className:p("text-[11px] font-black uppercase tracking-[0.12em] ml-1",i.mode==="online"?"text-[#8A3FD3] dark:text-[#a35ceb]":"text-[#1FA7E1] dark:text-[#4bc1f2]"),children:"Strand / Topic Group"}),e.jsxs(Ae,{value:i.topicId,onValueChange:t=>k(o=>({...o,topicId:t})),children:[e.jsx(ze,{className:p("rounded-xl h-11 border-white/20 bg-white/60 dark:bg-black/50 dark:border-white/10 transition-colors shadow-inner",i.mode==="online"?"hover:border-[#8A3FD3]/50":"hover:border-[#1FA7E1]/50",U("topicId")&&"border-rose-400"),children:e.jsx(Ce,{placeholder:"Select topic group"})}),e.jsx(Me,{className:"rounded-xl backdrop-blur-xl bg-white/90 dark:bg-[#1a1f2e]/90",children:La.map(t=>e.jsx(J,{value:t.value,className:"rounded-lg",children:t.label},t.value))})]}),U("topicId")&&e.jsx("p",{className:"text-xs text-destructive dark:text-rose-300 ml-1",children:U("topicId")})]}),e.jsxs("div",{className:"space-y-1.5 group",children:[e.jsx("label",{className:p("text-[11px] font-black uppercase tracking-[0.12em] ml-1",i.mode==="online"?"text-[#8A3FD3] dark:text-[#a35ceb]":"text-[#1FA7E1] dark:text-[#4bc1f2]"),children:i.mode==="online"?"Difficulty":"Bot Difficulty"}),e.jsxs(Ae,{value:i.mode==="bot"?i.adaptiveBot?"adaptive":i.botDifficulty:i.difficulty,onValueChange:t=>k(o=>o.mode==="bot"?{...o,botDifficulty:t,adaptiveBot:t==="adaptive"}:{...o,difficulty:t}),children:[e.jsx(ze,{className:p("rounded-xl h-11 border-white/20 bg-white/60 dark:bg-black/50 dark:border-white/10 transition-colors shadow-inner",i.mode==="online"?"hover:border-[#8A3FD3]/50":"hover:border-[#1FA7E1]/50"),children:e.jsx(Ce,{})}),e.jsxs(Me,{className:"rounded-xl backdrop-blur-xl bg-white/90 dark:bg-[#1a1f2e]/90",children:[e.jsx(J,{value:"easy",className:"rounded-lg",children:"Easy"}),e.jsx(J,{value:"medium",className:"rounded-lg",children:"Medium"}),e.jsx(J,{value:"hard",className:"rounded-lg",children:"Hard"}),i.mode==="bot"&&e.jsx(J,{value:"adaptive",className:"rounded-lg",children:"Adaptive"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1.5 group",children:[e.jsx("label",{className:p("text-[10px] sm:text-[11px] font-black uppercase tracking-[0.12em] ml-1",i.mode==="online"?"text-[#8A3FD3] dark:text-[#a35ceb]":"text-[#1FA7E1] dark:text-[#4bc1f2]"),children:"Questions"}),e.jsxs(Ae,{value:String(i.rounds),onValueChange:t=>k(o=>({...o,rounds:Number(t)})),children:[e.jsx(ze,{className:p("rounded-xl h-11 border-white/20 bg-white/60 dark:bg-black/50 dark:border-white/10 transition-colors shadow-inner",i.mode==="online"?"hover:border-[#8A3FD3]/50":"hover:border-[#1FA7E1]/50",U("rounds")&&"border-rose-400"),children:e.jsx(Ce,{})}),e.jsx(Me,{className:"rounded-xl backdrop-blur-xl bg-white/90 dark:bg-[#1a1f2e]/90",children:[3,5,7,10,12,15].map(t=>e.jsx(J,{value:String(t),className:"rounded-lg",children:t},t))})]}),U("rounds")&&e.jsx("p",{className:"text-xs text-destructive dark:text-rose-300 ml-1",children:U("rounds")})]}),e.jsxs("div",{className:"space-y-1.5 group",children:[e.jsx("label",{className:p("text-[10px] sm:text-[11px] font-black uppercase tracking-[0.12em] ml-1 line-clamp-1",i.mode==="online"?"text-[#8A3FD3] dark:text-[#a35ceb]":"text-[#1FA7E1] dark:text-[#4bc1f2]"),children:"Time / Q"}),e.jsxs(Ae,{value:String(i.timePerQuestionSec),onValueChange:t=>k(o=>({...o,timePerQuestionSec:Number(t)})),children:[e.jsx(ze,{className:p("rounded-xl h-11 border-white/20 bg-white/60 dark:bg-black/50 dark:border-white/10 transition-colors shadow-inner",i.mode==="online"?"hover:border-[#8A3FD3]/50":"hover:border-[#1FA7E1]/50",U("timePerQuestionSec")&&"border-rose-400"),children:e.jsx(Ce,{})}),e.jsx(Me,{className:"rounded-xl backdrop-blur-xl bg-white/90 dark:bg-[#1a1f2e]/90",children:[15,20,30,45,60,90].map(t=>e.jsxs(J,{value:String(t),className:"rounded-lg",children:[t," sec"]},t))})]}),U("timePerQuestionSec")&&e.jsx("p",{className:"text-xs text-destructive dark:text-rose-300 ml-1",children:U("timePerQuestionSec")})]})]})]}),e.jsxs("div",{className:"flex flex-col justify-between space-y-6",children:[e.jsxs("div",{className:"space-y-5",children:[i.mode==="online"&&e.jsxs("div",{className:"space-y-3 rounded-2xl border border-[#8A3FD3]/20 bg-[#8A3FD3]/5 dark:border-[#8A3FD3]/20 p-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-[11px] font-black uppercase tracking-[0.12em] text-[#8A3FD3] dark:text-[#a35ceb] ml-1",children:"Online Match Type"}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:[{value:"public_matchmaking",label:"Public Queue"},{value:"private_room",label:"Private Room"}].map(t=>e.jsx(z,{type:"button",variant:i.queueType===t.value?"default":"outline",className:p("rounded-xl h-11 transition-all border-none font-bold text-xs",i.queueType===t.value?"bg-[#8A3FD3] hover:bg-[#7b35c0] text-white shadow-md shadow-[#8A3FD3]/30":"bg-white/50 hover:bg-white/80 dark:bg-black/30 dark:hover:bg-black/50 text-[#8A3FD3] dark:text-[#d3a8ff]"),onClick:()=>k(o=>({...o,queueType:t.value})),children:t.label},t.value))})]}),i.queueType==="private_room"&&e.jsxs(w.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"pt-2 space-y-2",children:[e.jsx("label",{className:"text-[11px] font-black uppercase tracking-[0.12em] text-[#8A3FD3] dark:text-[#a35ceb] ml-1",children:"Room Code (optional)"}),e.jsx(rs,{value:A,onChange:t=>R(t.target.value.toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,6)),placeholder:"Leave blank to create a room",className:"rounded-xl h-12 text-center text-lg uppercase font-bold tracking-[0.25em] border-[#8A3FD3]/30 bg-white/80 dark:bg-black/50 dark:border-[#8A3FD3]/20 focus-visible:ring-[#8A3FD3]/50 shadow-inner",maxLength:6}),e.jsx("div",{className:"rounded-xl border border-[#8A3FD3]/30 bg-[#8A3FD3]/10 px-3 py-3 text-[12px] font-semibold text-[#6620a2] leading-snug dark:border-[#8A3FD3]/30 dark:bg-[#8A3FD3]/10 dark:text-[#d3a8ff]",children:"Enter a room code to join an existing battle, or leave it blank to create a new room and share your code."})]})]}),e.jsxs("label",{className:p("flex flex-col sm:flex-row sm:items-center justify-between rounded-[16px] border bg-white/50 p-4 transition-colors cursor-pointer shadow-sm dark:bg-black/50 group",i.mode==="online"?"border-[#8A3FD3]/20 hover:bg-[#8A3FD3]/5 dark:border-[#8A3FD3]/20 dark:hover:bg-[#8A3FD3]/10":"border-[#1FA7E1]/20 hover:bg-[#1FA7E1]/5 dark:border-[#1FA7E1]/20 dark:hover:bg-[#1FA7E1]/10"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:p("h-11 w-11 rounded-full flex items-center justify-center group-hover:scale-110 transition-transform",i.mode==="online"?"bg-[#8A3FD3]/10 text-[#8A3FD3] dark:text-[#c48bfc]":"bg-[#1FA7E1]/10 text-[#1FA7E1] dark:text-[#7ad8ff]"),children:ee?e.jsx(ga,{className:"h-5 w-5"}):e.jsx(wa,{className:"h-5 w-5 opacity-60"})}),e.jsxs("div",{className:"mb-3 sm:mb-0",children:[e.jsx("p",{className:"text-sm font-bold text-slate-800 dark:text-slate-200",children:"Battle Sounds"}),e.jsx("p",{className:"text-xs font-medium text-slate-500 dark:text-slate-400",children:"Cues for countdowns and results."})]})]}),e.jsx(ra,{checked:ee,onCheckedChange:qt})]}),e.jsxs(w.div,{initial:!1,animate:{opacity:ee?1:.45,y:ee?0:-2},className:p("rounded-[16px] border bg-white/40 p-4 shadow-sm dark:bg-black/40",i.mode==="online"?"border-[#8A3FD3]/20 dark:border-[#8A3FD3]/20":"border-[#1FA7E1]/20 dark:border-[#1FA7E1]/20"),children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[e.jsx("p",{className:"text-xs font-black uppercase tracking-[0.14em] text-slate-700 dark:text-slate-200",children:"SFX Volume"}),e.jsxs("p",{className:"text-xs font-bold text-slate-500 dark:text-slate-400",children:[Math.round(be*100),"%"]})]}),e.jsx("input",{type:"range",min:0,max:100,step:1,value:Math.round(be*100),disabled:!ee,onChange:t=>{const o=et(Number(t.target.value)/100,0,1);Ca(o)},onMouseUp:()=>D("tick"),onTouchEnd:()=>D("tick"),className:"h-2 w-full cursor-pointer accent-violet-500 disabled:cursor-not-allowed disabled:opacity-50","aria-label":"Battle sound effects volume"})]})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{"aria-live":"polite",className:"min-h-[24px] text-sm font-medium",children:[M.status==="queued"&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:p("inline-flex items-center gap-1 text-[13px] font-bold px-3 py-1.5 rounded-lg",i.mode==="online"?"text-[#8A3FD3] bg-[#8A3FD3]/10":"text-[#1FA7E1] bg-[#1FA7E1]/10"),children:M.message}),i.mode==="online"&&i.queueType==="private_room"&&h?.roomCode&&e.jsxs(z,{type:"button",variant:"outline",className:p("h-8 rounded-full border-emerald-500/50 bg-emerald-50 px-4 text-xs font-black uppercase tracking-[0.16em] text-emerald-900 shadow-sm hover:bg-emerald-100 hover:scale-105 transition-all dark:border-emerald-500/40 dark:bg-emerald-500/10 dark:text-emerald-300 dark:hover:bg-emerald-500/20",$===h.roomCode&&"scale-105 bg-emerald-200 dark:bg-emerald-500/30"),onClick:()=>void Ut(h.roomCode),"aria-label":`Copy room code ${h.roomCode}`,children:[$===h.roomCode?e.jsx(yt,{className:"h-4 w-4"}):e.jsx(sa,{className:"h-4 w-4"}),h.roomCode]}),(N||ea)&&Y>0&&e.jsxs("span",{className:p("inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-bold animate-pulse",i.mode==="online"?"bg-[#8A3FD3]/10 text-[#8A3FD3]":"bg-[#1FA7E1]/10 text-[#1FA7E1]"),children:["Waiting ",ma(Y)]})]}),M.status==="error"&&e.jsx("span",{className:"inline-flex items-center gap-1.5 text-[13px] font-bold text-rose-600 dark:text-rose-400 bg-rose-50 dark:bg-rose-500/10 px-3 py-1.5 rounded-lg border border-rose-200 dark:border-rose-500/20",children:M.message}),M.status==="validating"&&e.jsxs("span",{className:p("inline-flex items-center gap-2 font-bold px-3 py-1.5 rounded-lg",i.mode==="online"?"text-[#8A3FD3] bg-[#8A3FD3]/10":"text-[#1FA7E1] bg-[#1FA7E1]/10"),children:[e.jsx(at,{className:"h-4 w-4 animate-spin"})," Validating..."]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[Va&&e.jsx(z,{type:"button",variant:"outline",onClick:Jt,disabled:M.status==="validating",className:"rounded-xl h-14 flex-1 sm:flex-none border-slate-300 hover:bg-slate-100 dark:border-slate-700 dark:hover:bg-slate-800 font-bold px-6",children:h?"Cancel room":"Leave queue"}),e.jsx(z,{type:"button",onClick:Oa,disabled:M.status==="validating"||N||ea,className:p("rounded-xl h-14 flex-1 px-8 font-black uppercase tracking-wide text-sm shadow-xl hover:scale-[1.02] active:scale-95 transition-all text-white border-0",i.mode==="online"?"bg-[#8A3FD3] hover:bg-[#7b35c0] shadow-[#8A3FD3]/40":"bg-[#1FA7E1] hover:bg-[#1a95c9] shadow-[#1FA7E1]/40"),children:M.status==="validating"?e.jsxs("span",{className:"inline-flex items-center gap-2",children:[e.jsx(at,{className:"h-5 w-5 animate-spin"})," Starting..."]}):i.mode==="online"&&i.queueType==="private_room"?A.trim()?"Join Room":"Create Room":"Start Battle"})]})]})]})]})})]},"setup")}),e.jsx(Ie,{value:"battle",className:"mt-0 outline-none",children:e.jsx(w.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:-12},className:"space-y-4",children:s?e.jsxs(te,{className:p(O,"rounded-[18px]"),children:[e.jsxs(le,{children:[e.jsxs(ie,{className:"text-base flex items-center justify-between gap-3",children:[e.jsxs("span",{className:"inline-flex items-center gap-2",children:[s.mode==="bot"?e.jsx(Qe,{className:"h-4 w-4 text-primary dark:text-[#9e8fff]"}):e.jsx(je,{className:"h-4 w-4 text-primary dark:text-[#9e8fff]"}),"vs ",s.opponentName]}),e.jsxs("div",{className:"inline-flex items-center gap-2",children:[vt,e.jsxs("span",{className:"text-sm font-bold tabular-nums",children:[s.scoreFor," - ",s.scoreAgainst]})]})]}),e.jsx(he,{className:"text-muted-foreground dark:text-[#b2bad0]",children:s.status==="completed"?`Completed in ${s.totalRounds} rounds.`:s.status==="ready"?s.mode==="online"?"Waiting for both players to confirm and start together.":"Finalizing practice bot session start.":`Round ${s.currentRound} of ${s.totalRounds}${F?" (paused for design)":""}`}),xa(s.lifecycle,n?.uid)&&e.jsx("p",{className:"text-xs font-medium text-muted-foreground dark:text-[#9aa4be]",children:xa(s.lifecycle,n?.uid)})]}),e.jsxs(we,{className:"space-y-4",children:[s.status==="ready"&&e.jsxs("div",{className:"rounded-xl border border-border bg-muted/30 p-4 dark:border-[#2f3547] dark:bg-[#11151d] flex flex-col gap-3",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground dark:text-[#ecf0fb]",children:s.mode==="online"?"Waiting for both players to lock in start...":"Starting practice bot round..."}),s.mode==="online"&&s.expiresAtMs&&e.jsxs("p",{className:"text-xs font-medium text-muted-foreground dark:text-[#9aa4be]",children:["Public match expires in ",e.jsx("span",{className:"font-semibold tabular-nums",children:ma(Y)})," if the synchronized start does not happen."]}),e.jsx(z,{variant:"outline",size:"sm",className:"w-full text-rose-500 border-rose-200 hover:bg-rose-50 dark:border-rose-900 dark:hover:bg-rose-900/30",onClick:()=>{S(null),j(null),f(!1),x({status:"idle"}),d("setup")},children:"Force Cancel"})]}),s.status==="in_progress"&&s.currentQuestion&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"rounded-xl border border-border bg-muted/40 p-3 dark:border-[#2f3547] dark:bg-[#11151d]",children:[e.jsxs("p",{className:"text-xs text-muted-foreground dark:text-[#9aa4be]",children:["Time left: ",e.jsxs("span",{className:"font-semibold tabular-nums",children:[P,"s"]}),F?" (paused)":""]}),F&&e.jsx("p",{className:"mt-1 text-[11px] font-medium text-amber-700 dark:text-amber-300",children:"Design pause keeps this battle screen static while you edit UI."})]}),e.jsx("p",{className:"text-lg font-bold text-foreground dark:text-[#f5f7fb]",children:s.currentQuestion.prompt}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:s.currentQuestion.choices.map((t,o)=>e.jsxs(z,{type:"button",variant:Ne===o?"default":"outline",onClick:()=>X(o),disabled:G||Z||F,className:p("h-auto min-h-[48px] justify-start text-left font-medium px-4 py-3 rounded-xl whitespace-normal",Ne===o?"ring-2 ring-primary ring-offset-2 dark:ring-offset-[#0B0F19]":""),children:[e.jsxs("span",{className:"mr-2 font-semibold",children:[String.fromCharCode(65+o),"."]}),t]},o))}),e.jsx("div",{className:"flex justify-end",children:e.jsx(z,{type:"button",onClick:()=>void Ge(Ne),disabled:G||Z||F,className:"rounded-xl",children:F?e.jsxs("span",{className:"inline-flex items-center gap-2",children:[e.jsx(hs,{className:"h-4 w-4"})," Paused for design"]}):G?e.jsxs("span",{className:"inline-flex items-center gap-2",children:[e.jsx(at,{className:"h-4 w-4 animate-spin"})," Submitting..."]}):Z?"Waiting for opponent...":"Lock Answer"})})]}),B&&e.jsxs("div",{className:"rounded-xl border border-border bg-muted/30 p-3 dark:border-[#2f3547] dark:bg-[#11151d]",children:[e.jsxs("p",{className:"text-sm font-semibold text-foreground dark:text-[#ecf0fb]",children:["Last round: ",B.studentCorrect?"Correct":"Incorrect"," · ",s.mode==="bot"?"Bot":"Opponent"," ",B.botCorrect?"Correct":"Incorrect"]}),e.jsxs("p",{className:"text-xs text-muted-foreground dark:text-[#9aa4be]",children:["Correct option: ",String.fromCharCode(65+B.correctOptionIndex)]})]}),s.status==="completed"&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:p("rounded-2xl border p-4",s.outcome==="win"?"border-emerald-300 bg-emerald-50 dark:border-emerald-400/40 dark:bg-emerald-900/20":s.outcome==="loss"?"border-rose-300 bg-rose-50 dark:border-rose-400/40 dark:bg-rose-900/20":"border-amber-300 bg-amber-50 dark:border-amber-400/40 dark:bg-amber-900/20"),children:[e.jsx("p",{className:"text-lg font-black tracking-wide text-foreground dark:text-[#ecf0fb]",children:s.outcome==="win"?"Victory!":s.outcome==="loss"?"Match Complete":"Draw Match"}),e.jsxs("p",{className:"mt-1 text-sm font-semibold text-foreground dark:text-[#ecf0fb]",children:["Final Score: ",s.scoreFor," - ",s.scoreAgainst]}),e.jsxs("p",{className:"text-xs text-muted-foreground dark:text-[#9aa4be]",children:["XP Earned: +",s.xpBreakdown?.totalXPAwarded??s.xpEarned??0,s.xpBreakdown&&e.jsxs("span",{className:"block",children:["Base: +",s.xpBreakdown.baseMatchXP," + Performance: +",s.xpBreakdown.performanceXP]})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx(z,{type:"button",variant:"outline",onClick:()=>{S(null),j(null),f(!1),d("setup")},className:"rounded-xl",children:"Start New Match"}),s.mode==="bot"&&e.jsx(z,{type:"button",onClick:()=>void Zt(),disabled:G,className:"rounded-xl",children:"Rematch"})]})]})]})]}):h?e.jsxs(te,{className:p(O,"rounded-[18px]"),children:[e.jsxs(le,{children:[e.jsxs(ie,{className:"text-base flex items-center gap-2",children:[e.jsx(je,{className:"h-4 w-4 text-primary dark:text-[#9e8fff]"}),"Private Room Lobby"]}),e.jsxs(he,{className:"text-muted-foreground dark:text-[#b2bad0]",children:["Room ",h.roomCode," · ",h.participantCount,"/2 students connected."]})]}),e.jsx(we,{className:"space-y-3",children:e.jsxs("div",{className:"rounded-xl border border-border bg-muted/30 p-3 dark:border-[#2f3547] dark:bg-[#11151d]",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground dark:text-[#ecf0fb]",children:h.status==="ready"?"Opponent connected. Syncing start...":"Waiting for another student to join this room."}),e.jsxs("p",{className:"text-xs text-muted-foreground dark:text-[#9aa4be]",children:["Share room code ",h.roomCode," with your classmate."]}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center justify-end gap-2",children:[(h.status==="waiting"||h.status==="ready")&&e.jsx(z,{type:"button",variant:"outline",className:"h-8 rounded-lg",onClick:Jt,disabled:M.status==="validating",children:"Cancel room"}),e.jsxs(z,{type:"button",variant:"outline",className:"h-8 rounded-lg",onClick:()=>void Ut(h.roomCode),children:[$===h.roomCode?e.jsx(yt,{className:"h-4 w-4"}):e.jsx(sa,{className:"h-4 w-4"}),$===h.roomCode?"Copied":"Copy code"]})]})]})})]}):N?e.jsx(te,{className:p(O,"rounded-[18px]"),children:e.jsxs(le,{children:[e.jsxs(ie,{className:"text-base flex items-center gap-2",children:[e.jsx(je,{className:"h-4 w-4 text-primary dark:text-[#9e8fff]"}),"Public Matchmaking"]}),e.jsx(he,{className:"text-muted-foreground dark:text-[#b2bad0]",children:"Searching for a student with the same setup..."})]})}):e.jsx(te,{className:p(O,"rounded-[18px]"),children:e.jsxs(le,{children:[e.jsxs(ie,{className:"text-base flex items-center gap-2",children:[e.jsx(kt,{className:"h-4 w-4 text-primary dark:text-[#9e8fff]"}),"No active battle"]}),e.jsx(he,{className:"text-muted-foreground dark:text-[#b2bad0]",children:"Start from Setup to create a bot match, private room, or public queue session."})]})})},"battle")}),e.jsx(Ie,{value:"history",className:"mt-0 outline-none",children:e.jsxs(w.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:-12},className:"space-y-4",children:[e.jsxs(w.div,{className:p(O,"relative overflow-hidden rounded-[24px] mb-6 border-emerald-500/20 shadow-[0_0_40px_-10px_rgba(16,185,129,0.2)]"),whileHover:{scale:1.01},transition:{type:"spring",stiffness:300,damping:20},children:[e.jsx("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-r from-emerald-500/20 via-teal-500/10 to-emerald-600/5 dark:from-emerald-500/20 dark:via-teal-500/10 dark:to-teal-900/10"}),e.jsx("div",{className:"pointer-events-none absolute -top-24 -right-24 h-64 w-64 rounded-full bg-emerald-400/20 blur-3xl animate-orb-pulse"}),e.jsx("div",{className:"pointer-events-none absolute -bottom-12 -left-12 h-40 w-40 rounded-full bg-teal-400/20 blur-2xl animate-orb-pulse-delayed"}),e.jsx("div",{className:"relative z-10 p-6 sm:p-8 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(z,{variant:"ghost",onClick:()=>d("hub"),className:"h-12 w-12 p-0 rounded-full bg-white/50 dark:bg-black/40 hover:bg-white/80 dark:hover:bg-black/60 hover:scale-105 transition-all backdrop-blur-md border border-emerald-500/30 shadow-[0_0_15px_rgba(16,185,129,0.2)] shrink-0",children:e.jsx(Ze,{className:"h-6 w-6 rotate-180 text-emerald-800 dark:text-emerald-300"})}),e.jsxs("div",{children:[e.jsxs("h2",{className:"flex items-center gap-3 text-3xl sm:text-4xl font-black tracking-tight text-transparent bg-clip-text bg-gradient-to-br from-emerald-600 to-teal-500 dark:from-emerald-300 dark:to-teal-200 drop-shadow-sm",children:[e.jsx("div",{className:"bg-emerald-100 dark:bg-emerald-900/50 p-2 rounded-2xl shadow-inner border border-emerald-200 dark:border-emerald-700/50 animate-icon-rotate",children:e.jsx(oa,{className:"h-8 w-8 text-emerald-600 dark:text-emerald-400 drop-shadow-[0_0_8px_rgba(16,185,129,0.5)]"})}),"Matches History"]}),e.jsx("p",{className:"text-sm font-bold text-emerald-800/80 dark:text-emerald-100/70 mt-2 tracking-wide uppercase",children:"Review your past duels and track your progress."})]})]})})]}),e.jsxs(te,{className:p(O,"rounded-[18px]"),children:[e.jsxs(le,{children:[e.jsx(ie,{className:"text-base",children:"Match History"}),e.jsx(he,{className:"text-muted-foreground dark:text-[#b2bad0]",children:"Your recent student battles only."})]}),e.jsxs(we,{className:"space-y-3",children:[e.jsx("div",{className:"flex gap-2",children:[{value:"all",label:"All"},{value:"online",label:"Online"},{value:"bot",label:"Bot"}].map(t=>e.jsx(z,{type:"button",variant:ke===t.value?"default":"outline",onClick:()=>Ma(t.value),className:"rounded-xl h-8 px-3",children:t.label},t.value))}),Lt?e.jsxs("div",{className:"space-y-2",children:[e.jsx(ve,{className:"h-12 w-full rounded-xl bg-muted dark:bg-[#2a3143]"}),e.jsx(ve,{className:"h-12 w-full rounded-xl bg-muted dark:bg-[#2a3143]"})]}):Ye.length===0?e.jsx("p",{className:"text-sm text-muted-foreground dark:text-[#a8b2c9]",children:"No matches in this filter yet."}):Ye.map(t=>e.jsxs("div",{className:"rounded-xl border border-border bg-muted/40 px-3 py-2 flex items-center justify-between gap-3 dark:border-[#2f3547] dark:bg-[#11151d]",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm font-semibold text-foreground dark:text-[#f5f7fb]",children:["vs ",t.opponentName]}),e.jsxs("p",{className:"text-xs text-muted-foreground dark:text-[#95a0bb] tabular-nums",children:[t.scoreFor,"-",t.scoreAgainst," · ",t.accuracy.toFixed(0),"% · +",t.xpEarned," XP"]})]}),e.jsx("span",{className:p("text-xs font-semibold rounded-full px-2.5 py-1 border",t.outcome==="win"?"text-emerald-700 border-emerald-200 bg-emerald-50 dark:text-emerald-300 dark:border-emerald-300/40 dark:bg-emerald-900/20":t.outcome==="loss"?"text-rose-700 border-rose-200 bg-rose-50 dark:text-rose-300 dark:border-rose-300/40 dark:bg-rose-900/20":"text-amber-700 border-amber-200 bg-amber-50 dark:text-amber-300 dark:border-amber-300/40 dark:bg-amber-900/20"),children:Ws(t.outcome)})]},t.matchId))]})]})]},"history")}),e.jsx(Ie,{value:"stats",className:"mt-0 outline-none",children:e.jsxs(w.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:-12},className:"space-y-4",children:[e.jsxs(w.div,{className:p(O,"relative overflow-hidden rounded-[24px] mb-6 border-indigo-500/20 shadow-[0_0_40px_-10px_rgba(99,102,241,0.2)]"),whileHover:{scale:1.01},transition:{type:"spring",stiffness:300,damping:20},children:[e.jsx("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-r from-indigo-500/20 via-purple-500/10 to-indigo-600/5 dark:from-indigo-500/20 dark:via-purple-500/10 dark:to-purple-900/10"}),e.jsx("div",{className:"pointer-events-none absolute -top-24 -right-24 h-64 w-64 rounded-full bg-indigo-400/20 blur-3xl animate-orb-pulse"}),e.jsx("div",{className:"pointer-events-none absolute -bottom-12 -left-12 h-40 w-40 rounded-full bg-purple-400/20 blur-2xl animate-orb-pulse-delayed"}),e.jsx("div",{className:"relative z-10 p-6 sm:p-8 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(z,{variant:"ghost",onClick:()=>d("hub"),className:"h-12 w-12 p-0 rounded-full bg-white/50 dark:bg-black/40 hover:bg-white/80 dark:hover:bg-black/60 hover:scale-105 transition-all backdrop-blur-md border border-indigo-500/30 shadow-[0_0_15px_rgba(99,102,241,0.2)] shrink-0",children:e.jsx(Ze,{className:"h-6 w-6 rotate-180 text-indigo-800 dark:text-indigo-300"})}),e.jsxs("div",{children:[e.jsxs("h2",{className:"flex items-center gap-3 text-3xl sm:text-4xl font-black tracking-tight text-transparent bg-clip-text bg-gradient-to-br from-indigo-600 to-purple-500 dark:from-indigo-300 dark:to-purple-200 drop-shadow-sm",children:[e.jsx("div",{className:"bg-indigo-100 dark:bg-indigo-900/50 p-2 rounded-2xl shadow-inner border border-indigo-200 dark:border-indigo-700/50 animate-icon-bob",children:e.jsx(Et,{className:"h-8 w-8 text-indigo-600 dark:text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]"})}),"My Statistics"]}),e.jsx("p",{className:"text-sm font-bold text-indigo-800/80 dark:text-indigo-100/70 mt-2 tracking-wide uppercase",children:"Analyzing your battlefield performance."})]})]})})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4",children:[{label:"Wins",value:se?.wins??0,icon:_t},{label:"Current streak",value:se?.currentStreak??0,icon:st},{label:"Avg accuracy",value:`${(se?.averageAccuracy||0).toFixed(1)}%`,icon:ls},{label:"Avg response",value:Vs(se?.averageResponseMs||0),icon:na}].map(t=>e.jsx(te,{className:p(O,"rounded-[18px]"),children:e.jsxs(we,{className:"pt-6",children:[e.jsx("p",{className:"text-xs text-muted-foreground dark:text-[#9da7bf]",children:t.label}),e.jsx("p",{className:"mt-1 tabular-nums text-2xl font-black text-foreground dark:text-[#f5f7fb]",children:t.value}),e.jsx(t.icon,{className:"mt-3 h-4 w-4 text-primary dark:text-[#9e8fff]"})]})},t.label))})]},"stats")}),e.jsx(Ie,{value:"leaderboard",className:"mt-0 outline-none",children:e.jsxs(w.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:-12},className:"space-y-4",children:[e.jsxs(w.div,{className:p(O,"relative overflow-hidden rounded-[24px] mb-6 border-amber-500/20 shadow-[0_0_40px_-10px_rgba(245,158,11,0.2)]"),whileHover:{scale:1.01},transition:{type:"spring",stiffness:300,damping:20},children:[e.jsx("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-r from-amber-500/20 via-orange-500/10 to-amber-600/5 dark:from-amber-600/20 dark:via-orange-500/10 dark:to-orange-900/10"}),e.jsx("div",{className:"pointer-events-none absolute -top-24 -right-24 h-64 w-64 rounded-full bg-amber-400/20 blur-3xl animate-orb-pulse"}),e.jsx("div",{className:"pointer-events-none absolute -bottom-12 -left-12 h-40 w-40 rounded-full bg-orange-400/20 blur-2xl animate-orb-pulse-delayed"}),e.jsx("div",{className:"relative z-10 p-6 sm:p-8 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx(z,{variant:"ghost",onClick:()=>d("hub"),className:"h-12 w-12 p-0 rounded-full bg-white/50 dark:bg-black/40 hover:bg-white/80 dark:hover:bg-black/60 hover:scale-105 transition-all backdrop-blur-md border border-amber-500/30 shadow-[0_0_15px_rgba(245,158,11,0.2)] shrink-0",children:e.jsx(Ze,{className:"h-6 w-6 rotate-180 text-amber-800 dark:text-amber-300"})}),e.jsxs("div",{children:[e.jsxs("h2",{className:"flex items-center gap-3 text-3xl sm:text-4xl font-black tracking-tight text-transparent bg-clip-text bg-gradient-to-br from-amber-600 to-orange-500 dark:from-amber-300 dark:to-orange-200 drop-shadow-sm",children:[e.jsx(w.div,{animate:{scale:[1,1.1,1]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"bg-amber-100 dark:bg-amber-900/50 p-2 rounded-2xl shadow-inner border border-amber-200 dark:border-amber-700/50",children:e.jsx(_t,{className:"h-8 w-8 text-amber-600 dark:text-amber-400 drop-shadow-[0_0_12px_rgba(245,158,11,0.6)]"})}),"Hall of Fame"]}),e.jsx("p",{className:"text-sm font-bold text-amber-800/80 dark:text-amber-100/70 mt-2 tracking-wide uppercase",children:"The top-ranked minds across the globe."})]})]})})]}),e.jsxs(te,{className:p(O,"rounded-[18px]"),children:[e.jsxs(le,{children:[e.jsxs(ie,{className:"text-base flex items-center gap-2",children:[e.jsx(Ga,{className:"h-4 w-4 text-primary dark:text-[#9e8fff]"})," Hall of Fame"]}),e.jsx(he,{className:"text-muted-foreground dark:text-[#b2bad0]",children:"Student-only ranking using trusted backend aggregates."})]}),e.jsx(we,{children:Ia?e.jsxs("div",{className:"space-y-2",children:[e.jsx(ve,{className:"h-12 w-full rounded-xl bg-muted dark:bg-[#2a3143]"}),e.jsx(ve,{className:"h-12 w-full rounded-xl bg-muted dark:bg-[#2a3143]"}),e.jsx(ve,{className:"h-12 w-full rounded-xl bg-muted dark:bg-[#2a3143]"})]}):Gt.length===0?e.jsx("p",{className:"text-sm text-muted-foreground dark:text-[#a9b3ca]",children:"No leaderboard entries yet. Finish a battle to place on the board."}):e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-2",children:[e.jsxs("div",{className:"rounded-xl border border-border bg-muted/30 p-2.5 dark:border-[#2f3547] dark:bg-[#11151d]",children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground dark:text-[#98a2bc]",children:"Name display"}),e.jsxs(Ae,{value:He,onValueChange:t=>Fa(t),children:[e.jsx(ze,{className:"mt-1 h-8 rounded-lg",children:e.jsx(Ce,{})}),e.jsxs(Me,{children:[e.jsx(J,{value:"alias",children:"Alias"}),e.jsx(J,{value:"initials",children:"Initials"}),e.jsx(J,{value:"full",children:"Full name"})]})]})]}),e.jsxs("label",{className:"rounded-xl border border-border bg-muted/30 p-2.5 flex items-center justify-between gap-3 dark:border-[#2f3547] dark:bg-[#11151d]",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground dark:text-[#98a2bc]",children:"Score detail"}),e.jsx("p",{className:"text-xs text-muted-foreground dark:text-[#98a2bc]",children:"Show exact score values"})]}),e.jsx(ra,{checked:xt,onCheckedChange:Ea})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground dark:text-[#95a0bb]",children:"Privacy mode keeps classmate identities and scores obfuscated by default while preserving your own exact rank and score."}),Gt.map(t=>e.jsxs("div",{className:p("rounded-xl border bg-muted/30 px-3 py-2 flex items-center justify-between dark:bg-[#11151d]",t.isSelf?"border-primary/60 dark:border-[#8d7fff]":"border-border dark:border-[#2f3547]"),children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm font-semibold text-foreground dark:text-[#f5f7fb]",children:["#",t.rank," ",t.displayName,t.isSelf?" (You)":""]}),e.jsxs("p",{className:"text-xs text-muted-foreground dark:text-[#95a0bb]",children:["Win rate ",t.winRate.toFixed(1),"% · Best streak ",t.bestStreak]})]}),e.jsx("p",{className:"tabular-nums text-sm font-semibold text-foreground dark:text-[#f5f7fb]",children:t.scoreLabel})]},t.userId))]})})]})]},"leaderboard")})]})})})})]})};export{zr as default}; diff --git a/assets/RewardsModal-C5DMk9fO.js b/assets/RewardsModal-MXZjyis_.js similarity index 94% rename from assets/RewardsModal-C5DMk9fO.js rename to assets/RewardsModal-MXZjyis_.js index 5cde12372962a99f24ea85986c4ad80b38b36f4a..cc30df1fbdbbde1069d6a4ecd791e591b5e5432e 100644 --- a/assets/RewardsModal-C5DMk9fO.js +++ b/assets/RewardsModal-MXZjyis_.js @@ -1 +1 @@ -import{j as e}from"./vendor-react-B4AQeu28.js";import{X as f}from"./x-BLLfAvOF.js";import{E as o,F as d,Z as h}from"./index-fWY85Kyg.js";import{S as n}from"./star-BKdRsvg1.js";import{T as g}from"./trophy-fJOOsc_0.js";import{T as j}from"./target-B6MOj4Ln.js";import{B as u}from"./book-open-D5mR6gz9.js";import{A as N}from"./award-DBHp-ybd.js";import{C as v}from"./calendar-ClpJmmLI.js";import{U as w}from"./users-CX_H_2cY.js";import{T as y}from"./trending-up-Do7UgIZi.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";const W=({isOpen:c,onClose:r,userLevel:t,currentXP:i,xpToNextLevel:a,totalXP:x,streak:m})=>{if(!c)return null;const p=[{id:"1",icon:n,title:"First Steps",description:"Complete your first video lesson",unlocked:!0,color:"text-[#9956DE]",bgColor:"bg-[#FB96BB]/20"},{id:"2",icon:g,title:"Quiz Master",description:"Score 100% on any quiz",unlocked:!1,color:"text-slate-500",bgColor:"bg-slate-100"},{id:"3",icon:d,title:"Week Warrior",description:"Maintain a 7-day login streak",progress:2,total:7,unlocked:!1,color:"text-slate-500",bgColor:"bg-slate-100"},{id:"4",icon:j,title:"Practice Makes Perfect",description:"Complete 10 practice sets",progress:2,total:10,unlocked:!1,color:"text-slate-500",bgColor:"bg-slate-100"},{id:"5",icon:u,title:"Knowledge Seeker",description:"Watch 20 video lessons",unlocked:!0,color:"text-[#1FA7E1]",bgColor:"bg-[#6ED1CF]/20"},{id:"6",icon:h,title:"Speed Learner",description:"Complete 5 lessons in one day",unlocked:!0,color:"text-[#FFB356]",bgColor:"bg-[#FFB356]/20"},{id:"7",icon:o,title:"Crown Achiever",description:"Reach Level 10",progress:4,total:10,unlocked:!1,color:"text-slate-500",bgColor:"bg-slate-100"},{id:"8",icon:N,title:"XP Hunter",description:"Earn 1000 XP",unlocked:!0,color:"text-[#7274ED]",bgColor:"bg-[#7274ED]/15"},{id:"9",icon:v,title:"Dedicated Learner",description:"Maintain a 14-day streak",progress:2,total:14,unlocked:!1,color:"text-slate-500",bgColor:"bg-slate-100"},{id:"10",icon:w,title:"Monthly Champion",description:"Maintain a 30-day streak",progress:2,total:30,unlocked:!1,color:"text-slate-500",bgColor:"bg-slate-100"}],b=[{activity:"Complete a video lesson",xp:50},{activity:"Complete exercises",xp:100},{activity:"Perfect quiz score",xp:150},{activity:"Finish a quiz",xp:75},{activity:"Daily login streak",xp:25}];return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-8",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:r}),e.jsxs("div",{className:"relative bg-[#f7f9fc] rounded-2xl shadow-2xl border border-[#dde3eb] w-full max-w-2xl max-h-[85vh] overflow-hidden",children:[e.jsxs("div",{className:"bg-gradient-to-r from-[#9956DE] via-[#7274ED] to-[#1FA7E1] p-6 text-white relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_14%_12%,rgba(251,150,187,0.35),transparent_42%),radial-gradient(circle_at_80%_80%,rgba(117,208,106,0.25),transparent_38%)]"}),e.jsxs("div",{className:"flex items-center justify-between mb-4 relative z-10",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-display font-bold",children:"Rewards & Achievements"}),e.jsx("p",{className:"text-white/90 text-sm font-body",children:"Track your learning progress and unlock badges"})]}),e.jsx("button",{onClick:r,className:"text-white/90 hover:text-white hover:bg-white/20 p-2 rounded-xl transition-colors",children:e.jsx(f,{size:24})})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-3 relative z-10",children:[e.jsxs("div",{className:"bg-white/15 backdrop-blur-sm rounded-xl p-4 border border-white/25",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(o,{size:18,className:"text-[#FFB356]"}),e.jsx("span",{className:"text-xs font-medium text-white/90 font-body",children:"Level"})]}),e.jsx("p",{className:"text-2xl font-bold",children:t})]}),e.jsxs("div",{className:"bg-white/15 backdrop-blur-sm rounded-xl p-4 border border-white/25",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(n,{size:18,className:"text-[#6ED1CF]"}),e.jsx("span",{className:"text-xs font-medium text-white/90 font-body",children:"Total XP"})]}),e.jsx("p",{className:"text-2xl font-bold",children:x.toLocaleString()})]}),e.jsxs("div",{className:"bg-white/15 backdrop-blur-sm rounded-xl p-4 border border-white/25",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(d,{size:18,className:"text-[#FF8B8B]"}),e.jsx("span",{className:"text-xs font-medium text-white/90 font-body",children:"Day Streak"})]}),e.jsxs("p",{className:"text-2xl font-bold",children:[m," days"]})]})]}),e.jsxs("div",{className:"mt-4 relative z-10",children:[e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[e.jsxs("span",{className:"text-sm font-bold text-white font-body",children:["Level ",t]}),e.jsxs("span",{className:"text-sm font-bold text-white font-body",children:["Level ",t+1]})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"flex justify-between items-center mb-1",children:e.jsxs("span",{className:"text-xs text-white/90",children:[i," / ",a," XP"]})}),e.jsx("div",{className:"h-3 bg-white/20 rounded-full overflow-hidden border border-white/20",children:e.jsx("div",{className:"h-full bg-gradient-to-r from-[#6ED1CF] via-[#75D06A] to-[#FFB356] rounded-full transition-all duration-500 e-w",style:{"--w":`${i/a*100}%`}})})]})]})]}),e.jsxs("div",{className:"p-6 overflow-y-auto max-h-[calc(85vh-280px)]",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h3",{className:"text-lg font-display font-bold text-[#0a1628] mb-4",children:"Achievements"}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:p.map(s=>{const l=s.icon;return e.jsx("div",{className:`${s.unlocked?"bg-white border-[#9956DE]/25":"bg-[#edf1f7] border-[#dde3eb]"} border-2 rounded-xl p-4 transition-all ${s.unlocked?"shadow-md":"opacity-60"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`w-12 h-12 ${s.bgColor} rounded-xl flex items-center justify-center flex-shrink-0`,children:e.jsx(l,{size:24,className:s.color})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("h4",{className:`text-sm font-bold ${s.unlocked?"text-[#0a1628]":"text-slate-500"} font-body`,children:s.title}),s.unlocked&&e.jsx("span",{className:"px-2 py-0.5 bg-[#75D06A] text-white text-[9px] font-bold rounded-full",children:"Unlocked"})]}),e.jsx("p",{className:`text-xs ${s.unlocked?"text-[#5a6578]":"text-slate-500"} mb-2`,children:s.description}),s.progress!==void 0&&s.total!==void 0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between items-center mb-1",children:[e.jsx("span",{className:"text-[10px] text-slate-500",children:"Progress"}),e.jsxs("span",{className:"text-[10px] font-bold text-[#5a6578]",children:[s.progress," / ",s.total]})]}),e.jsx("div",{className:"h-1.5 bg-[#dde3eb] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-gradient-to-r from-[#7274ED] to-[#1FA7E1] rounded-full transition-all e-w",style:{"--w":`${s.progress/s.total*100}%`}})})]})]})]})},s.id)})})]}),e.jsxs("div",{className:"bg-white rounded-xl p-5 border border-[#dde3eb]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-[#7274ED] to-[#1FA7E1] rounded-lg flex items-center justify-center",children:e.jsx(y,{size:16,className:"text-white"})}),e.jsx("h3",{className:"text-base font-display font-bold text-[#0a1628]",children:"How to Earn XP"})]}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:b.map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-1.5 h-1.5 bg-[#1FA7E1] rounded-full"}),e.jsxs("span",{className:"text-xs text-[#5a6578] font-body",children:[s.activity,":"]}),e.jsxs("span",{className:"text-xs font-bold text-[#7274ED]",children:["+",s.xp," XP"]})]},l))})]})]})]})]})};export{W as default}; +import{j as e}from"./vendor-react-B4AQeu28.js";import{X as f}from"./x-Cwkkamrh.js";import{E as o,F as d,Z as h}from"./index-Du57tmo9.js";import{S as n}from"./star-BBetp7Wf.js";import{T as g}from"./trophy-8udS7pQx.js";import{T as j}from"./target-B_JwHjFq.js";import{B as u}from"./book-open-cmOvedFO.js";import{A as N}from"./award-ZQxHm68j.js";import{C as v}from"./calendar-DguKdDEr.js";import{U as w}from"./users--M0GUX5u.js";import{T as y}from"./trending-up-BgWHLAjl.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";const W=({isOpen:c,onClose:r,userLevel:t,currentXP:i,xpToNextLevel:a,totalXP:x,streak:m})=>{if(!c)return null;const p=[{id:"1",icon:n,title:"First Steps",description:"Complete your first video lesson",unlocked:!0,color:"text-[#9956DE]",bgColor:"bg-[#FB96BB]/20"},{id:"2",icon:g,title:"Quiz Master",description:"Score 100% on any quiz",unlocked:!1,color:"text-slate-500",bgColor:"bg-slate-100"},{id:"3",icon:d,title:"Week Warrior",description:"Maintain a 7-day login streak",progress:2,total:7,unlocked:!1,color:"text-slate-500",bgColor:"bg-slate-100"},{id:"4",icon:j,title:"Practice Makes Perfect",description:"Complete 10 practice sets",progress:2,total:10,unlocked:!1,color:"text-slate-500",bgColor:"bg-slate-100"},{id:"5",icon:u,title:"Knowledge Seeker",description:"Watch 20 video lessons",unlocked:!0,color:"text-[#1FA7E1]",bgColor:"bg-[#6ED1CF]/20"},{id:"6",icon:h,title:"Speed Learner",description:"Complete 5 lessons in one day",unlocked:!0,color:"text-[#FFB356]",bgColor:"bg-[#FFB356]/20"},{id:"7",icon:o,title:"Crown Achiever",description:"Reach Level 10",progress:4,total:10,unlocked:!1,color:"text-slate-500",bgColor:"bg-slate-100"},{id:"8",icon:N,title:"XP Hunter",description:"Earn 1000 XP",unlocked:!0,color:"text-[#7274ED]",bgColor:"bg-[#7274ED]/15"},{id:"9",icon:v,title:"Dedicated Learner",description:"Maintain a 14-day streak",progress:2,total:14,unlocked:!1,color:"text-slate-500",bgColor:"bg-slate-100"},{id:"10",icon:w,title:"Monthly Champion",description:"Maintain a 30-day streak",progress:2,total:30,unlocked:!1,color:"text-slate-500",bgColor:"bg-slate-100"}],b=[{activity:"Complete a video lesson",xp:50},{activity:"Complete exercises",xp:100},{activity:"Perfect quiz score",xp:150},{activity:"Finish a quiz",xp:75},{activity:"Daily login streak",xp:25}];return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-8",children:[e.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:r}),e.jsxs("div",{className:"relative bg-[#f7f9fc] rounded-2xl shadow-2xl border border-[#dde3eb] w-full max-w-2xl max-h-[85vh] overflow-hidden",children:[e.jsxs("div",{className:"bg-gradient-to-r from-[#9956DE] via-[#7274ED] to-[#1FA7E1] p-6 text-white relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_14%_12%,rgba(251,150,187,0.35),transparent_42%),radial-gradient(circle_at_80%_80%,rgba(117,208,106,0.25),transparent_38%)]"}),e.jsxs("div",{className:"flex items-center justify-between mb-4 relative z-10",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-display font-bold",children:"Rewards & Achievements"}),e.jsx("p",{className:"text-white/90 text-sm font-body",children:"Track your learning progress and unlock badges"})]}),e.jsx("button",{onClick:r,className:"text-white/90 hover:text-white hover:bg-white/20 p-2 rounded-xl transition-colors",children:e.jsx(f,{size:24})})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-3 relative z-10",children:[e.jsxs("div",{className:"bg-white/15 backdrop-blur-sm rounded-xl p-4 border border-white/25",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(o,{size:18,className:"text-[#FFB356]"}),e.jsx("span",{className:"text-xs font-medium text-white/90 font-body",children:"Level"})]}),e.jsx("p",{className:"text-2xl font-bold",children:t})]}),e.jsxs("div",{className:"bg-white/15 backdrop-blur-sm rounded-xl p-4 border border-white/25",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(n,{size:18,className:"text-[#6ED1CF]"}),e.jsx("span",{className:"text-xs font-medium text-white/90 font-body",children:"Total XP"})]}),e.jsx("p",{className:"text-2xl font-bold",children:x.toLocaleString()})]}),e.jsxs("div",{className:"bg-white/15 backdrop-blur-sm rounded-xl p-4 border border-white/25",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(d,{size:18,className:"text-[#FF8B8B]"}),e.jsx("span",{className:"text-xs font-medium text-white/90 font-body",children:"Day Streak"})]}),e.jsxs("p",{className:"text-2xl font-bold",children:[m," days"]})]})]}),e.jsxs("div",{className:"mt-4 relative z-10",children:[e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[e.jsxs("span",{className:"text-sm font-bold text-white font-body",children:["Level ",t]}),e.jsxs("span",{className:"text-sm font-bold text-white font-body",children:["Level ",t+1]})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"flex justify-between items-center mb-1",children:e.jsxs("span",{className:"text-xs text-white/90",children:[i," / ",a," XP"]})}),e.jsx("div",{className:"h-3 bg-white/20 rounded-full overflow-hidden border border-white/20",children:e.jsx("div",{className:"h-full bg-gradient-to-r from-[#6ED1CF] via-[#75D06A] to-[#FFB356] rounded-full transition-all duration-500 e-w",style:{"--w":`${i/a*100}%`}})})]})]})]}),e.jsxs("div",{className:"p-6 overflow-y-auto max-h-[calc(85vh-280px)]",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h3",{className:"text-lg font-display font-bold text-[#0a1628] mb-4",children:"Achievements"}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:p.map(s=>{const l=s.icon;return e.jsx("div",{className:`${s.unlocked?"bg-white border-[#9956DE]/25":"bg-[#edf1f7] border-[#dde3eb]"} border-2 rounded-xl p-4 transition-all ${s.unlocked?"shadow-md":"opacity-60"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`w-12 h-12 ${s.bgColor} rounded-xl flex items-center justify-center flex-shrink-0`,children:e.jsx(l,{size:24,className:s.color})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("h4",{className:`text-sm font-bold ${s.unlocked?"text-[#0a1628]":"text-slate-500"} font-body`,children:s.title}),s.unlocked&&e.jsx("span",{className:"px-2 py-0.5 bg-[#75D06A] text-white text-[9px] font-bold rounded-full",children:"Unlocked"})]}),e.jsx("p",{className:`text-xs ${s.unlocked?"text-[#5a6578]":"text-slate-500"} mb-2`,children:s.description}),s.progress!==void 0&&s.total!==void 0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between items-center mb-1",children:[e.jsx("span",{className:"text-[10px] text-slate-500",children:"Progress"}),e.jsxs("span",{className:"text-[10px] font-bold text-[#5a6578]",children:[s.progress," / ",s.total]})]}),e.jsx("div",{className:"h-1.5 bg-[#dde3eb] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-gradient-to-r from-[#7274ED] to-[#1FA7E1] rounded-full transition-all e-w",style:{"--w":`${s.progress/s.total*100}%`}})})]})]})]})},s.id)})})]}),e.jsxs("div",{className:"bg-white rounded-xl p-5 border border-[#dde3eb]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("div",{className:"w-8 h-8 bg-gradient-to-br from-[#7274ED] to-[#1FA7E1] rounded-lg flex items-center justify-center",children:e.jsx(y,{size:16,className:"text-white"})}),e.jsx("h3",{className:"text-base font-display font-bold text-[#0a1628]",children:"How to Earn XP"})]}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:b.map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-1.5 h-1.5 bg-[#1FA7E1] rounded-full"}),e.jsxs("span",{className:"text-xs text-[#5a6578] font-body",children:[s.activity,":"]}),e.jsxs("span",{className:"text-xs font-bold text-[#7274ED]",children:["+",s.xp," XP"]})]},l))})]})]})]})]})};export{W as default}; diff --git a/assets/RightSidebar-CB4PJstQ.js b/assets/RightSidebar-CfqBTJ6T.js similarity index 96% rename from assets/RightSidebar-CB4PJstQ.js rename to assets/RightSidebar-CfqBTJ6T.js index 66e61f7ba58f124c3dd03219a84d4e9121f611ea..5c4864b4c77f36b914901228f37a77343ad6241e 100644 --- a/assets/RightSidebar-CB4PJstQ.js +++ b/assets/RightSidebar-CfqBTJ6T.js @@ -1 +1 @@ -import{r as m,j as e}from"./vendor-react-B4AQeu28.js";import{q as R}from"./quiz_battle_avatar-BXHPSput.js";import{h as q,m as h,Z as P,F as $,z as W,E as N}from"./index-fWY85Kyg.js";import{S as Y}from"./swords-Btzyg4ct.js";import{C as M}from"./circle-check-big-Qn5jJKfH.js";import{T as O,a as X,b as Z}from"./tooltip-DQuc9Ksp.js";import{T as H}from"./trophy-fJOOsc_0.js";import{C}from"./chevron-right-mxUv3EB7.js";import{S as J}from"./star-BKdRsvg1.js";import{L as K}from"./loader-circle-id_hZlNw.js";import{U as k}from"./user-Cp86-wJG.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";const D=[{id:1,title:"Quiz Battle",subtitle:"Challenge players worldwide!",bgColor:"bg-[#9956de]",orbColor:"bg-[#6D28D9]",icon:e.jsx(Y,{size:24,className:"text-white"}),buttonText:"Join Battle",actionType:"quiz-battle",avatarText:"Waiting for you to join..."},{id:2,title:"Keep It Up!",subtitle:"Maintain your daily learning streak",bgColor:"bg-[#FF8B8B]",orbColor:"bg-[#E06A6A]",icon:e.jsx($,{size:24,fill:"currentColor",className:"text-white"}),buttonText:null,actionType:null,avatarText:"You are doing great!"},{id:3,title:"Speed Runner",subtitle:"Finish a quiz in under 5 mins",bgColor:"bg-[#75D06A]",orbColor:"bg-[#58B34D]",icon:e.jsx(M,{size:24,className:"text-white"}),buttonText:null,actionType:null,avatarText:"Ready for action!"}],G=(r=[])=>{const a=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],o=new Date,d=o.getDay(),l=[];for(let i=0;i<7;i++){const t=new Date(o);t.setDate(o.getDate()-d+i);const s=i===d,n=`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`,g=r.includes(n);l.push({dayName:a[i],dateNumber:t.getDate(),isToday:s,hasDot:g})}return l},Q=({streakHistory:r=[],onNavigateToQuizBattle:a,userPhoto:o})=>{const[d,l]=m.useState(0),i=G(r);m.useEffect(()=>{const s=setInterval(()=>{l(n=>(n+1)%D.length)},5e3);return()=>clearInterval(s)},[]);const t=D[d];return e.jsxs("div",{className:"bg-white rounded-[24px] p-4 shadow-sm border border-slate-100 flex flex-col gap-6 mt-4 relative overflow-hidden",children:[e.jsx("div",{className:"relative h-[185px] rounded-[-20px] rounded-2xl overflow-hidden cursor-pointer group",children:e.jsx(q,{mode:"wait",children:e.jsxs(h.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.3},className:`absolute inset-0 ${t.bgColor} p-4 sm:p-5 flex flex-col justify-between overflow-hidden`,children:[e.jsxs("div",{className:"absolute top-4 right-4 flex gap-1 items-center z-20",children:[e.jsx("div",{className:"w-3 h-1.5 rounded-full bg-white/60"}),e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-white/40"}),e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-white/40"})]}),t.actionType==="quiz-battle"&&e.jsx("div",{className:"absolute -right-4 -bottom-6 w-32 h-32 opacity-25 mix-blend-overlay pointer-events-none z-0 transform group-hover:scale-105 transition-transform duration-700",children:e.jsx("img",{src:R,alt:"",className:"w-full h-full object-contain"})}),e.jsx("div",{className:`absolute -right-4 -top-8 w-36 h-36 rounded-full ${t.orbColor} opacity-90 blur-2xl group-hover:scale-110 transition-transform duration-700 pointer-events-none`}),e.jsx("div",{className:"absolute right-4 top-1/2 -translate-y-1/2 w-[48px] h-[48px] rounded-2xl rotate-12 bg-white/20 backdrop-blur-md shadow-sm border border-white/20 group-hover:rotate-[25deg] group-hover:scale-110 transition-transform duration-700 flex items-center justify-center z-10",children:t.icon}),e.jsxs("div",{className:"relative z-10 w-full pr-[60px]",children:[e.jsx("h3",{className:"font-display font-bold text-[20px] leading-tight text-white mb-0.5",children:t.title}),e.jsx("p",{className:"text-[12px] font-medium text-white/90 leading-snug",children:t.subtitle}),t.buttonText&&e.jsx("button",{onClick:s=>{s.stopPropagation(),t.actionType==="quiz-battle"&&a&&a()},className:"mt-2.5 bg-white text-[#0a1628] px-2 py-1 rounded-lg font-bold text-xs shadow-sm hover:scale-105 transition-transform uppercase tracking-wider whitespace-nowrap w-fit",children:t.buttonText})]}),e.jsxs("div",{className:"flex items-center gap-2.5 relative z-10 mt-auto pt-2",children:[o?e.jsxs("div",{className:"relative group/avatar shrink-0",children:[e.jsx("div",{className:"absolute inset-0 bg-white/40 blur-md rounded-full animate-pulse"}),e.jsx("img",{src:o,alt:"You",className:"w-8 h-8 rounded-full border-[2px] border-white object-cover relative z-10 shadow-md group-hover/avatar:scale-110 transition-transform"}),t.actionType==="quiz-battle"&&e.jsx("div",{className:"absolute -bottom-1 -right-1 w-[16px] h-[16px] bg-[#75D06A] border-2 border-[#7C3AED] rounded-full z-20 flex items-center justify-center",children:e.jsx(P,{size:8,className:"text-white",fill:"currentColor"})})]}):null,e.jsx("span",{className:"text-[12px] font-bold text-white tracking-wide leading-tight flex-1 pr-[60px]",children:t.avatarText})]})]},t.id)})}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-display text-[15px] font-bold text-[#141b2d] mb-4 px-1",children:"Your streak"}),e.jsx("div",{className:"flex justify-between items-center gap-1.5 px-0.5",children:i.map((s,n)=>e.jsxs("div",{className:`flex flex-col items-center pt-2 pb-3 w-[46px] h-[72px] rounded-[24px] border ${s.isToday?"bg-[#12192b] text-white border-transparent shadow-[0_8px_16px_rgba(18,25,43,0.3)] transform -translate-y-1":"bg-white text-slate-400 border-slate-200/80 hover:border-slate-300"} transition-all duration-200 cursor-pointer`,children:[e.jsx("div",{className:"h-1.5 flex items-center justify-center mb-1.5",children:s.hasDot?e.jsx("div",{className:`w-[5px] h-[5px] rounded-full ${s.isToday?"bg-white":"bg-slate-300"}`}):e.jsx("div",{className:`text-[10px] ${s.isToday?"text-white/50":"text-slate-200"} font-bold`,children:"+"})}),e.jsx("span",{className:`text-[11px] font-bold mb-1 ${s.isToday?"text-slate-300":"text-slate-400/80"}`,children:s.dayName}),e.jsx("span",{className:`text-[15px] font-bold leading-none ${s.isToday?"text-white":"text-[#334155]"}`,children:s.dateNumber})]},n))})]})]})},U=r=>{if(r>=1e3){const a=r/1e3;return a>=10?`${Math.round(a)}k`:`${a.toFixed(1)}k`}return`${r}`},V=({entry:r,rank:a,isYou:o,userPhoto:d,rankColor:l})=>{const i=o&&d||r?.photo,t=o?"You":r?.name||"---",s=r?.xp||0;return e.jsxs(e.Fragment,{children:[e.jsxs(h.div,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{delay:.3+a*.1},className:"relative mb-2",children:[a===1&&e.jsx("div",{className:"absolute -top-4 left-1/2 -translate-x-1/2 z-20",children:e.jsx(N,{size:22,className:"text-amber-400 drop-shadow-md mb-1",fill:"#fbbf24",strokeWidth:1.5})}),e.jsx("div",{className:`w-10 h-10 rounded-full border-[3px] ${a===1?"w-[52px] h-[52px]":""} ${l.border} z-10 relative overflow-hidden ${l.shadow} bg-white`,children:i?e.jsx("img",{src:i,alt:t,className:"w-full h-full object-cover",onError:n=>{n.target.style.display="none"}}):e.jsx("div",{className:"w-full h-full bg-gradient-to-br from-slate-200 to-slate-300 flex items-center justify-center",children:e.jsx(k,{size:a===1?22:16,className:"text-slate-400"})})}),e.jsx("div",{className:`absolute -bottom-2 left-1/2 -translate-x-1/2 ${l.badge} text-white text-[10px] font-bold px-2 py-0.5 rounded-full z-20 shadow-sm`,children:a})]}),e.jsxs("div",{className:"mt-2 text-center",children:[e.jsx("span",{className:`block ${a===1?"text-[13px] font-black":"text-[12px] font-bold"} text-[#0a1628] truncate max-w-[80px]`,children:t}),e.jsxs("span",{className:`block ${a===1?"text-[11px]":"text-[10px]"} ${l.badge.replace("bg-","text-").replace("-500","-600").replace("-400","-600").replace("amber","amber")} font-bold`,children:[U(s)," XP"]})]})]})},ge=({currentUserId:r,onOpenRewards:a,onOpenLeaderboard:o,onNavigateToModules:d,onNavigateToQuizBattle:l,userLevel:i,userPhoto:t,currentXP:s,xpToNextLevel:n,streak:g,streakHistory:_=[]})=>{const y=s/n*100,[F,S]=m.useState([]),[E,b]=m.useState(!0),[T,j]=m.useState(null),u=m.useRef(null);m.useEffect(()=>{if(!r){b(!1);return}b(!0),j(null);const x=W(f=>{S(f),b(!1),j(null)},r,!1,"all",3);u.current=x;const p=setTimeout(()=>{b&&(b(!1),j("Leaderboard data unavailable"))},12e3);return()=>{clearTimeout(p),u.current&&(u.current(),u.current=null)}},[r]);const c=F.slice(0,3);c.some(x=>x.userId===r);const z=[{bg:"from-amber-100 to-amber-50",border:"border-amber-400",badge:"bg-amber-500",shadow:"shadow-md"},{bg:"from-slate-200 to-slate-100",border:"border-sky-400",badge:"bg-sky-500",shadow:"shadow-sm"},{bg:"from-orange-50 to-slate-50",border:"border-orange-400",badge:"bg-orange-500",shadow:"shadow-sm"}],L=["74px","54px","38px"],A=["w-[78px]","w-[70px]","w-[70px]"],w=(x,p,f,B,v)=>e.jsxs("div",{className:"flex flex-col items-center relative z-10",children:[e.jsx(V,{entry:x,rank:f,isYou:B==="You",userPhoto:t,rankColor:z[v]}),e.jsxs(h.div,{initial:{height:0},animate:{height:L[p]},transition:{delay:.2+p*.1,duration:.5,ease:"easeOut"},className:`${A[p]} bg-gradient-to-b ${z[v].bg} rounded-t-xl rounded-b-md border-t-2 border-white/20 flex items-center justify-center relative shadow-[inset_0_-4px_6px_rgba(0,0,0,0.05),0_4px_6px_rgba(0,0,0,0.05)]`,children:[e.jsx("span",{className:`${v===0?"text-amber-400 text-3xl":"text-slate-400 text-2xl"} font-black opacity-40 translate-y-1`,children:f}),e.jsx("div",{className:"absolute top-0 left-0 right-0 h-1.5 bg-white/70 rounded-t-xl"})]})]});return e.jsxs("div",{className:"space-y-2.5",children:[e.jsxs(h.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.1,duration:.4,ease:[.22,1,.36,1]},onClick:a,className:"rounded-2xl border border-[#9956DE]/25 cursor-pointer transition-all group relative overflow-hidden bg-gradient-to-br from-[#9956DE] via-[#7274ED] to-[#1FA7E1] hover:shadow-[0_16px_40px_rgba(114,116,237,0.28)] hover:-translate-y-0.5",children:[e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_18%_8%,rgba(251,150,187,0.32),transparent_42%),radial-gradient(circle_at_85%_84%,rgba(117,208,106,0.24),transparent_40%)]"}),e.jsxs("div",{className:"relative z-10 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"shrink-0 w-8 h-8 bg-white/20 rounded-xl flex items-center justify-center border border-white/35 backdrop-blur-sm",children:e.jsx(H,{size:14,className:"text-white"})}),e.jsxs("h3",{className:"font-display font-bold text-[13px] leading-tight text-white tracking-wide",children:["Rewards & ",e.jsx("br",{className:"hidden 2xl:block"})," Achievements"]})]}),e.jsx(C,{size:14,className:"shrink-0 text-white/80 group-hover:text-white group-hover:translate-x-0.5 transition-all"})]}),e.jsxs("div",{className:"flex items-center justify-between gap-1 mb-3 bg-white/10 p-1.5 rounded-xl border border-white/20 backdrop-blur-sm",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-body px-1 text-white",children:[e.jsx(N,{size:12,className:"text-[#FFB356]"}),e.jsxs("span",{className:"font-bold",children:["Lv ",i]})]}),e.jsx("div",{className:"w-px h-3 bg-white/35"}),e.jsxs(O,{children:[e.jsx(X,{asChild:!0,children:e.jsxs("button",{onClick:x=>{x.stopPropagation(),d?.()},className:"flex items-center gap-1.5 text-xs font-body px-1 text-white cursor-pointer transition-colors active:scale-95",children:[e.jsx(J,{size:12,className:"text-[#6ED1CF]"}),e.jsxs("span",{className:"font-bold whitespace-nowrap",children:[s," XP"]})]})}),e.jsx(Z,{side:"top",className:"bg-slate-900 text-white border border-slate-700",children:"Review more lessons to earn more XP!"})]}),e.jsx("div",{className:"w-px h-3 bg-white/35"}),e.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-body px-1 text-white",children:[e.jsx($,{size:12,className:"text-[#FF8B8B]"}),e.jsxs("span",{className:"font-bold",children:[g,"d"]})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between items-center mb-1.5",children:[e.jsxs("span",{className:"text-[11px] font-body text-white/90",children:["Next: Level ",i+1]}),e.jsxs("span",{className:"text-[11px] font-body font-semibold text-white",children:[Math.round(y),"%"]})]}),e.jsx("div",{className:"h-2 bg-white/25 rounded-full overflow-hidden border border-white/20",children:e.jsx(h.div,{initial:{width:0},animate:{width:`${y}%`},transition:{duration:1,ease:"easeOut"},className:"h-full bg-gradient-to-r from-[#6ED1CF] via-[#75D06A] to-[#FFB356] rounded-full"})})]})]})]}),e.jsx(h.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.2,duration:.4,ease:[.22,1,.36,1]},children:e.jsx(Q,{streakHistory:_,onNavigateToQuizBattle:l,userPhoto:t})}),e.jsxs(h.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.3,duration:.4,ease:[.22,1,.36,1]},onClick:o,className:"bg-white rounded-xl border border-slate-200/80 hover:shadow-md hover:border-amber-200/60 transition-all group overflow-hidden cursor-pointer",children:[e.jsxs("div",{className:"p-3 border-b border-slate-100 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-7 h-7 bg-amber-50 rounded-lg flex items-center justify-center border border-amber-200/60 transition-colors group-hover:bg-amber-100/50",children:e.jsx(N,{size:14,className:"text-amber-500"})}),e.jsx("h3",{className:"font-display font-bold text-sm text-[#0a1628]",children:"Leaderboards"})]}),e.jsx(C,{size:14,className:"text-slate-400 group-hover:translate-x-0.5 group-hover:text-amber-500 transition-transform"})]}),e.jsx("div",{className:"pt-8 pb-3 px-2 bg-gradient-to-b from-slate-50/30 to-white flex items-end justify-center gap-1.5 min-h-[170px]",children:E?e.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-8",children:[e.jsx(K,{className:"w-5 h-5 animate-spin text-amber-400 mb-2"}),e.jsx("span",{className:"text-xs text-slate-400",children:"Loading rankings..."})]}):T||c.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-8",children:[e.jsx(k,{className:"w-8 h-8 text-slate-300 mb-2"}),e.jsx("span",{className:"text-xs text-slate-400 text-center",children:T||"No rankings available yet"})]}):e.jsxs(e.Fragment,{children:[w(c[1],1,2,c[1]?.name||"---",1),w(c[0],0,1,c[0]?.name||"---",0),w(c[2],2,3,c[2]?.name||"---",2)]})})]})]})};export{ge as default}; +import{r as m,j as e}from"./vendor-react-B4AQeu28.js";import{q as R}from"./quiz_battle_avatar-BXHPSput.js";import{h as q,m as h,Z as P,F as $,z as W,E as N}from"./index-Du57tmo9.js";import{S as Y}from"./swords-Bu0_wc8h.js";import{C as M}from"./circle-check-big-DC9utj0Y.js";import{T as O,a as X,b as Z}from"./tooltip-C0JcTMbS.js";import{T as H}from"./trophy-8udS7pQx.js";import{C}from"./chevron-right-CFOFOVBg.js";import{S as J}from"./star-BBetp7Wf.js";import{L as K}from"./loader-circle-Bluo8e0c.js";import{U as k}from"./user-DPqSTqXe.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";const D=[{id:1,title:"Quiz Battle",subtitle:"Challenge players worldwide!",bgColor:"bg-[#9956de]",orbColor:"bg-[#6D28D9]",icon:e.jsx(Y,{size:24,className:"text-white"}),buttonText:"Join Battle",actionType:"quiz-battle",avatarText:"Waiting for you to join..."},{id:2,title:"Keep It Up!",subtitle:"Maintain your daily learning streak",bgColor:"bg-[#FF8B8B]",orbColor:"bg-[#E06A6A]",icon:e.jsx($,{size:24,fill:"currentColor",className:"text-white"}),buttonText:null,actionType:null,avatarText:"You are doing great!"},{id:3,title:"Speed Runner",subtitle:"Finish a quiz in under 5 mins",bgColor:"bg-[#75D06A]",orbColor:"bg-[#58B34D]",icon:e.jsx(M,{size:24,className:"text-white"}),buttonText:null,actionType:null,avatarText:"Ready for action!"}],G=(r=[])=>{const a=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],o=new Date,d=o.getDay(),l=[];for(let i=0;i<7;i++){const t=new Date(o);t.setDate(o.getDate()-d+i);const s=i===d,n=`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}`,g=r.includes(n);l.push({dayName:a[i],dateNumber:t.getDate(),isToday:s,hasDot:g})}return l},Q=({streakHistory:r=[],onNavigateToQuizBattle:a,userPhoto:o})=>{const[d,l]=m.useState(0),i=G(r);m.useEffect(()=>{const s=setInterval(()=>{l(n=>(n+1)%D.length)},5e3);return()=>clearInterval(s)},[]);const t=D[d];return e.jsxs("div",{className:"bg-white rounded-[24px] p-4 shadow-sm border border-slate-100 flex flex-col gap-6 mt-4 relative overflow-hidden",children:[e.jsx("div",{className:"relative h-[185px] rounded-[-20px] rounded-2xl overflow-hidden cursor-pointer group",children:e.jsx(q,{mode:"wait",children:e.jsxs(h.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.3},className:`absolute inset-0 ${t.bgColor} p-4 sm:p-5 flex flex-col justify-between overflow-hidden`,children:[e.jsxs("div",{className:"absolute top-4 right-4 flex gap-1 items-center z-20",children:[e.jsx("div",{className:"w-3 h-1.5 rounded-full bg-white/60"}),e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-white/40"}),e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-white/40"})]}),t.actionType==="quiz-battle"&&e.jsx("div",{className:"absolute -right-4 -bottom-6 w-32 h-32 opacity-25 mix-blend-overlay pointer-events-none z-0 transform group-hover:scale-105 transition-transform duration-700",children:e.jsx("img",{src:R,alt:"",className:"w-full h-full object-contain"})}),e.jsx("div",{className:`absolute -right-4 -top-8 w-36 h-36 rounded-full ${t.orbColor} opacity-90 blur-2xl group-hover:scale-110 transition-transform duration-700 pointer-events-none`}),e.jsx("div",{className:"absolute right-4 top-1/2 -translate-y-1/2 w-[48px] h-[48px] rounded-2xl rotate-12 bg-white/20 backdrop-blur-md shadow-sm border border-white/20 group-hover:rotate-[25deg] group-hover:scale-110 transition-transform duration-700 flex items-center justify-center z-10",children:t.icon}),e.jsxs("div",{className:"relative z-10 w-full pr-[60px]",children:[e.jsx("h3",{className:"font-display font-bold text-[20px] leading-tight text-white mb-0.5",children:t.title}),e.jsx("p",{className:"text-[12px] font-medium text-white/90 leading-snug",children:t.subtitle}),t.buttonText&&e.jsx("button",{onClick:s=>{s.stopPropagation(),t.actionType==="quiz-battle"&&a&&a()},className:"mt-2.5 bg-white text-[#0a1628] px-2 py-1 rounded-lg font-bold text-xs shadow-sm hover:scale-105 transition-transform uppercase tracking-wider whitespace-nowrap w-fit",children:t.buttonText})]}),e.jsxs("div",{className:"flex items-center gap-2.5 relative z-10 mt-auto pt-2",children:[o?e.jsxs("div",{className:"relative group/avatar shrink-0",children:[e.jsx("div",{className:"absolute inset-0 bg-white/40 blur-md rounded-full animate-pulse"}),e.jsx("img",{src:o,alt:"You",className:"w-8 h-8 rounded-full border-[2px] border-white object-cover relative z-10 shadow-md group-hover/avatar:scale-110 transition-transform"}),t.actionType==="quiz-battle"&&e.jsx("div",{className:"absolute -bottom-1 -right-1 w-[16px] h-[16px] bg-[#75D06A] border-2 border-[#7C3AED] rounded-full z-20 flex items-center justify-center",children:e.jsx(P,{size:8,className:"text-white",fill:"currentColor"})})]}):null,e.jsx("span",{className:"text-[12px] font-bold text-white tracking-wide leading-tight flex-1 pr-[60px]",children:t.avatarText})]})]},t.id)})}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-display text-[15px] font-bold text-[#141b2d] mb-4 px-1",children:"Your streak"}),e.jsx("div",{className:"flex justify-between items-center gap-1.5 px-0.5",children:i.map((s,n)=>e.jsxs("div",{className:`flex flex-col items-center pt-2 pb-3 w-[46px] h-[72px] rounded-[24px] border ${s.isToday?"bg-[#12192b] text-white border-transparent shadow-[0_8px_16px_rgba(18,25,43,0.3)] transform -translate-y-1":"bg-white text-slate-400 border-slate-200/80 hover:border-slate-300"} transition-all duration-200 cursor-pointer`,children:[e.jsx("div",{className:"h-1.5 flex items-center justify-center mb-1.5",children:s.hasDot?e.jsx("div",{className:`w-[5px] h-[5px] rounded-full ${s.isToday?"bg-white":"bg-slate-300"}`}):e.jsx("div",{className:`text-[10px] ${s.isToday?"text-white/50":"text-slate-200"} font-bold`,children:"+"})}),e.jsx("span",{className:`text-[11px] font-bold mb-1 ${s.isToday?"text-slate-300":"text-slate-400/80"}`,children:s.dayName}),e.jsx("span",{className:`text-[15px] font-bold leading-none ${s.isToday?"text-white":"text-[#334155]"}`,children:s.dateNumber})]},n))})]})]})},U=r=>{if(r>=1e3){const a=r/1e3;return a>=10?`${Math.round(a)}k`:`${a.toFixed(1)}k`}return`${r}`},V=({entry:r,rank:a,isYou:o,userPhoto:d,rankColor:l})=>{const i=o&&d||r?.photo,t=o?"You":r?.name||"---",s=r?.xp||0;return e.jsxs(e.Fragment,{children:[e.jsxs(h.div,{initial:{y:20,opacity:0},animate:{y:0,opacity:1},transition:{delay:.3+a*.1},className:"relative mb-2",children:[a===1&&e.jsx("div",{className:"absolute -top-4 left-1/2 -translate-x-1/2 z-20",children:e.jsx(N,{size:22,className:"text-amber-400 drop-shadow-md mb-1",fill:"#fbbf24",strokeWidth:1.5})}),e.jsx("div",{className:`w-10 h-10 rounded-full border-[3px] ${a===1?"w-[52px] h-[52px]":""} ${l.border} z-10 relative overflow-hidden ${l.shadow} bg-white`,children:i?e.jsx("img",{src:i,alt:t,className:"w-full h-full object-cover",onError:n=>{n.target.style.display="none"}}):e.jsx("div",{className:"w-full h-full bg-gradient-to-br from-slate-200 to-slate-300 flex items-center justify-center",children:e.jsx(k,{size:a===1?22:16,className:"text-slate-400"})})}),e.jsx("div",{className:`absolute -bottom-2 left-1/2 -translate-x-1/2 ${l.badge} text-white text-[10px] font-bold px-2 py-0.5 rounded-full z-20 shadow-sm`,children:a})]}),e.jsxs("div",{className:"mt-2 text-center",children:[e.jsx("span",{className:`block ${a===1?"text-[13px] font-black":"text-[12px] font-bold"} text-[#0a1628] truncate max-w-[80px]`,children:t}),e.jsxs("span",{className:`block ${a===1?"text-[11px]":"text-[10px]"} ${l.badge.replace("bg-","text-").replace("-500","-600").replace("-400","-600").replace("amber","amber")} font-bold`,children:[U(s)," XP"]})]})]})},ge=({currentUserId:r,onOpenRewards:a,onOpenLeaderboard:o,onNavigateToModules:d,onNavigateToQuizBattle:l,userLevel:i,userPhoto:t,currentXP:s,xpToNextLevel:n,streak:g,streakHistory:_=[]})=>{const y=s/n*100,[F,S]=m.useState([]),[E,b]=m.useState(!0),[T,j]=m.useState(null),u=m.useRef(null);m.useEffect(()=>{if(!r){b(!1);return}b(!0),j(null);const x=W(f=>{S(f),b(!1),j(null)},r,!1,"all",3);u.current=x;const p=setTimeout(()=>{b&&(b(!1),j("Leaderboard data unavailable"))},12e3);return()=>{clearTimeout(p),u.current&&(u.current(),u.current=null)}},[r]);const c=F.slice(0,3);c.some(x=>x.userId===r);const z=[{bg:"from-amber-100 to-amber-50",border:"border-amber-400",badge:"bg-amber-500",shadow:"shadow-md"},{bg:"from-slate-200 to-slate-100",border:"border-sky-400",badge:"bg-sky-500",shadow:"shadow-sm"},{bg:"from-orange-50 to-slate-50",border:"border-orange-400",badge:"bg-orange-500",shadow:"shadow-sm"}],L=["74px","54px","38px"],A=["w-[78px]","w-[70px]","w-[70px]"],w=(x,p,f,B,v)=>e.jsxs("div",{className:"flex flex-col items-center relative z-10",children:[e.jsx(V,{entry:x,rank:f,isYou:B==="You",userPhoto:t,rankColor:z[v]}),e.jsxs(h.div,{initial:{height:0},animate:{height:L[p]},transition:{delay:.2+p*.1,duration:.5,ease:"easeOut"},className:`${A[p]} bg-gradient-to-b ${z[v].bg} rounded-t-xl rounded-b-md border-t-2 border-white/20 flex items-center justify-center relative shadow-[inset_0_-4px_6px_rgba(0,0,0,0.05),0_4px_6px_rgba(0,0,0,0.05)]`,children:[e.jsx("span",{className:`${v===0?"text-amber-400 text-3xl":"text-slate-400 text-2xl"} font-black opacity-40 translate-y-1`,children:f}),e.jsx("div",{className:"absolute top-0 left-0 right-0 h-1.5 bg-white/70 rounded-t-xl"})]})]});return e.jsxs("div",{className:"space-y-2.5",children:[e.jsxs(h.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.1,duration:.4,ease:[.22,1,.36,1]},onClick:a,className:"rounded-2xl border border-[#9956DE]/25 cursor-pointer transition-all group relative overflow-hidden bg-gradient-to-br from-[#9956DE] via-[#7274ED] to-[#1FA7E1] hover:shadow-[0_16px_40px_rgba(114,116,237,0.28)] hover:-translate-y-0.5",children:[e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_18%_8%,rgba(251,150,187,0.32),transparent_42%),radial-gradient(circle_at_85%_84%,rgba(117,208,106,0.24),transparent_40%)]"}),e.jsxs("div",{className:"relative z-10 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"shrink-0 w-8 h-8 bg-white/20 rounded-xl flex items-center justify-center border border-white/35 backdrop-blur-sm",children:e.jsx(H,{size:14,className:"text-white"})}),e.jsxs("h3",{className:"font-display font-bold text-[13px] leading-tight text-white tracking-wide",children:["Rewards & ",e.jsx("br",{className:"hidden 2xl:block"})," Achievements"]})]}),e.jsx(C,{size:14,className:"shrink-0 text-white/80 group-hover:text-white group-hover:translate-x-0.5 transition-all"})]}),e.jsxs("div",{className:"flex items-center justify-between gap-1 mb-3 bg-white/10 p-1.5 rounded-xl border border-white/20 backdrop-blur-sm",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-body px-1 text-white",children:[e.jsx(N,{size:12,className:"text-[#FFB356]"}),e.jsxs("span",{className:"font-bold",children:["Lv ",i]})]}),e.jsx("div",{className:"w-px h-3 bg-white/35"}),e.jsxs(O,{children:[e.jsx(X,{asChild:!0,children:e.jsxs("button",{onClick:x=>{x.stopPropagation(),d?.()},className:"flex items-center gap-1.5 text-xs font-body px-1 text-white cursor-pointer transition-colors active:scale-95",children:[e.jsx(J,{size:12,className:"text-[#6ED1CF]"}),e.jsxs("span",{className:"font-bold whitespace-nowrap",children:[s," XP"]})]})}),e.jsx(Z,{side:"top",className:"bg-slate-900 text-white border border-slate-700",children:"Review more lessons to earn more XP!"})]}),e.jsx("div",{className:"w-px h-3 bg-white/35"}),e.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-body px-1 text-white",children:[e.jsx($,{size:12,className:"text-[#FF8B8B]"}),e.jsxs("span",{className:"font-bold",children:[g,"d"]})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between items-center mb-1.5",children:[e.jsxs("span",{className:"text-[11px] font-body text-white/90",children:["Next: Level ",i+1]}),e.jsxs("span",{className:"text-[11px] font-body font-semibold text-white",children:[Math.round(y),"%"]})]}),e.jsx("div",{className:"h-2 bg-white/25 rounded-full overflow-hidden border border-white/20",children:e.jsx(h.div,{initial:{width:0},animate:{width:`${y}%`},transition:{duration:1,ease:"easeOut"},className:"h-full bg-gradient-to-r from-[#6ED1CF] via-[#75D06A] to-[#FFB356] rounded-full"})})]})]})]}),e.jsx(h.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.2,duration:.4,ease:[.22,1,.36,1]},children:e.jsx(Q,{streakHistory:_,onNavigateToQuizBattle:l,userPhoto:t})}),e.jsxs(h.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.3,duration:.4,ease:[.22,1,.36,1]},onClick:o,className:"bg-white rounded-xl border border-slate-200/80 hover:shadow-md hover:border-amber-200/60 transition-all group overflow-hidden cursor-pointer",children:[e.jsxs("div",{className:"p-3 border-b border-slate-100 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-7 h-7 bg-amber-50 rounded-lg flex items-center justify-center border border-amber-200/60 transition-colors group-hover:bg-amber-100/50",children:e.jsx(N,{size:14,className:"text-amber-500"})}),e.jsx("h3",{className:"font-display font-bold text-sm text-[#0a1628]",children:"Leaderboards"})]}),e.jsx(C,{size:14,className:"text-slate-400 group-hover:translate-x-0.5 group-hover:text-amber-500 transition-transform"})]}),e.jsx("div",{className:"pt-8 pb-3 px-2 bg-gradient-to-b from-slate-50/30 to-white flex items-end justify-center gap-1.5 min-h-[170px]",children:E?e.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-8",children:[e.jsx(K,{className:"w-5 h-5 animate-spin text-amber-400 mb-2"}),e.jsx("span",{className:"text-xs text-slate-400",children:"Loading rankings..."})]}):T||c.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-8",children:[e.jsx(k,{className:"w-8 h-8 text-slate-300 mb-2"}),e.jsx("span",{className:"text-xs text-slate-400 text-center",children:T||"No rankings available yet"})]}):e.jsxs(e.Fragment,{children:[w(c[1],1,2,c[1]?.name||"---",1),w(c[0],0,1,c[0]?.name||"---",0),w(c[2],2,3,c[2]?.name||"---",2)]})})]})]})};export{ge as default}; diff --git a/assets/ScientificCalculator-YnJAbv_n.js b/assets/ScientificCalculator-3ObnUHS8.js similarity index 99% rename from assets/ScientificCalculator-YnJAbv_n.js rename to assets/ScientificCalculator-3ObnUHS8.js index 62286cf500fd9c9fb40f016ec81fc0c8e2eec27d..29bfe2dd3639b2627aaeb39cd576ec3b1d74bd71 100644 --- a/assets/ScientificCalculator-YnJAbv_n.js +++ b/assets/ScientificCalculator-3ObnUHS8.js @@ -1,4 +1,4 @@ -import{r as c,j as e}from"./vendor-react-B4AQeu28.js";import{c as Z,e as de,h as U,m as ue}from"./index-fWY85Kyg.js";import{C as fe,a as pe}from"./chevron-up-Bup_RJHP.js";import{X as be}from"./x-BLLfAvOF.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";/** +import{r as c,j as e}from"./vendor-react-B4AQeu28.js";import{c as Z,e as de,h as U,m as ue}from"./index-Du57tmo9.js";import{C as fe,a as pe}from"./chevron-up-Dmffgx6p.js";import{X as be}from"./x-Cwkkamrh.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SettingsModal-D8-maWNc.js b/assets/SettingsModal-BlGAAMMC.js similarity index 96% rename from assets/SettingsModal-D8-maWNc.js rename to assets/SettingsModal-BlGAAMMC.js index 506d85e0550817fcafc8639a677a259a53050cad..22050864e7de98e6776253229733f5b15d3a53d5 100644 --- a/assets/SettingsModal-D8-maWNc.js +++ b/assets/SettingsModal-BlGAAMMC.js @@ -1,4 +1,4 @@ -import{r,j as e}from"./vendor-react-B4AQeu28.js";import{c as se,h as be,m as E,D as pe,t as d}from"./index-fWY85Kyg.js";import{B as x}from"./button-BSRmUN27.js";import{I as l}from"./input-B3NSXxdz.js";import{S as m}from"./switch-CiNZ7HsE.js";import Z from"./ConfirmModal-Bs6qCyoa.js";import{G as ye,P as je}from"./ProfilePictureUploader-BVT_TKTZ.js";import{U as ge}from"./user-Cp86-wJG.js";import{B as Ne}from"./bell-BwBudSvY.js";import{S as ve}from"./shield-vTl0KLH8.js";import{D as ee}from"./download-Dl_jNVXs.js";import{X as te}from"./x-BLLfAvOF.js";import{L as we}from"./lock-6q-juSdu.js";import{C as ke}from"./clock-BJCraYVD.js";import{T as Ce}from"./trash-2-PgvGautk.js";import{E as Se,a as Ee}from"./eye-DQlJQwuY.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";import"./log-out-aQvvB_kG.js";import"./minus-Db4XvxwC.js";import"./plus-CRabOymo.js";import"./upload-DodiG981.js";/** +import{r,j as e}from"./vendor-react-B4AQeu28.js";import{c as se,h as be,m as E,D as pe,t as d}from"./index-Du57tmo9.js";import{B as x}from"./button-C6pFOjcg.js";import{I as l}from"./input-DtBdbulD.js";import{S as m}from"./switch-YVS1owKs.js";import Z from"./ConfirmModal-CGEO_l_6.js";import{G as ye,P as je}from"./ProfilePictureUploader-CmusgPWl.js";import{U as ge}from"./user-DPqSTqXe.js";import{B as Ne}from"./bell-CVB0-Rn1.js";import{S as ve}from"./shield-QK9XTLqm.js";import{D as ee}from"./download-VEXmhhD6.js";import{X as te}from"./x-Cwkkamrh.js";import{L as we}from"./lock-CtsU7Hj2.js";import{C as ke}from"./clock-BtWjBj1h.js";import{T as Ce}from"./trash-2-uIChez5o.js";import{E as Se,a as Ee}from"./eye-Duf559JU.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";import"./log-out-SC88Jnul.js";import"./minus-DyrqHtmD.js";import"./plus-gReuWg-C.js";import"./upload-CONq3UoZ.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/Sidebar-D_VIy77A.js b/assets/Sidebar-SiyazvIi.js similarity index 89% rename from assets/Sidebar-D_VIy77A.js rename to assets/Sidebar-SiyazvIi.js index a992b2250af3995e14b04b728bdd4d2afcc21024..040c005fa4ef651b1d7a68a54f7b4df397e90f2d 100644 --- a/assets/Sidebar-D_VIy77A.js +++ b/assets/Sidebar-SiyazvIi.js @@ -1,4 +1,4 @@ -import{r as h,j as e}from"./vendor-react-B4AQeu28.js";import{S as N,a as $,L as u,M as D}from"./LogoutActionButton-w1PkauXp.js";import{c as G,m as c,f as P}from"./index-fWY85Kyg.js";import{T as S,a as M,b as L}from"./tooltip-DQuc9Ksp.js";import{X as U}from"./x-BLLfAvOF.js";import{C as _}from"./chevron-right-mxUv3EB7.js";import{C as q}from"./chevron-left-KucdseP8.js";import{U as C}from"./users-CX_H_2cY.js";import{G as A}from"./graduation-cap-B4Q4YTk8.js";import{B as f}from"./book-open-D5mR6gz9.js";import{C as T}from"./chart-column-V8fKqOo0.js";import{S as F}from"./shield-vTl0KLH8.js";import{S as Q}from"./swords-Btzyg4ct.js";import{T as W}from"./trophy-fJOOsc_0.js";import{S as X}from"./shirt-hGG3zHVe.js";import"./log-out-aQvvB_kG.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";/** +import{r as h,j as e}from"./vendor-react-B4AQeu28.js";import{S as N,a as $,L as u,M as D}from"./LogoutActionButton-XXsvBOAH.js";import{c as G,m as c,f as P}from"./index-Du57tmo9.js";import{T as S,a as M,b as L}from"./tooltip-C0JcTMbS.js";import{X as U}from"./x-Cwkkamrh.js";import{C as _}from"./chevron-right-CFOFOVBg.js";import{C as q}from"./chevron-left-mWdIDmIc.js";import{U as C}from"./users--M0GUX5u.js";import{G as A}from"./graduation-cap-D6QMIGIe.js";import{B as f}from"./book-open-cmOvedFO.js";import{C as T}from"./chart-column-Cqncpeum.js";import{S as F}from"./shield-QK9XTLqm.js";import{S as Q}from"./swords-Bu0_wc8h.js";import{T as W}from"./trophy-8udS7pQx.js";import{S as X}from"./shirt-wJF8-Ry8.js";import"./log-out-SC88Jnul.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SupplementalBanner-BWRH1BJK.js b/assets/SupplementalBanner-2F2CcBwT.js similarity index 95% rename from assets/SupplementalBanner-BWRH1BJK.js rename to assets/SupplementalBanner-2F2CcBwT.js index 3f86b8d455609cfe02073ea794e616016da99c7f..49a83a360cc65d0d81ac6ddfe11ba9c3ea5e43e1 100644 --- a/assets/SupplementalBanner-BWRH1BJK.js +++ b/assets/SupplementalBanner-2F2CcBwT.js @@ -1 +1 @@ -import{j as e,r as y}from"./vendor-react-B4AQeu28.js";import{h as j,m as p,T as h}from"./index-fWY85Kyg.js";import{X as v}from"./x-BLLfAvOF.js";import{S as w}from"./sparkles-BY90tCLG.js";import{C as f}from"./chevron-right-mxUv3EB7.js";import{B as g}from"./book-open-D5mR6gz9.js";import{T as m}from"./trending-up-Do7UgIZi.js";import{B as x}from"./brain-COga8OrM.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";const b={"General Mathematics":[{label:"Functions Deep Dive",description:"Interactive review of function types and graphs",icon:e.jsx(m,{size:14})},{label:"Business Math Basics",description:"Simple & compound interest practice",icon:e.jsx(g,{size:14})}],"Statistics and Probability":[{label:"Distribution Visualizer",description:"Explore normal distribution curves",icon:e.jsx(m,{size:14})},{label:"Hypothesis Practice",description:"Step-by-step hypothesis testing",icon:e.jsx(x,{size:14})}],"Pre-Calculus":[{label:"Conic Sections Explorer",description:"Visual parabola, ellipse, hyperbola tool",icon:e.jsx(m,{size:14})},{label:"Trig Identity Practice",description:"Identity verification drill set",icon:e.jsx(x,{size:14})}],"Basic Calculus":[{label:"Limits Visualizer",description:"Graphical approach to limits",icon:e.jsx(m,{size:14})},{label:"Derivative Rules Drill",description:"Practice chain rule & implicit diff",icon:e.jsx(x,{size:14})}]};function u(i){const s=i.toLowerCase();return s==="functions"||s.includes("function")||s==="businessmath"||s.includes("business")||s==="logic"||s.includes("reason")||s.includes("general")||s.includes("gen-math")||s.includes("gen math")?"General Mathematics":s.includes("stat")||s.includes("prob")?"Statistics and Probability":s.includes("pre-calc")||s.includes("pre calc")||s.includes("precalc")?"Pre-Calculus":s.includes("basic")||s.includes("calc")?"Basic Calculus":null}function N(i){const s=i.trim().toLowerCase();return s==="functions"?"Functions and Graphs":s==="businessmath"?"Business and Financial Mathematics":s==="logic"?"Logic and Reasoning":i}const k=({atRiskSubjects:i=[],onAction:s,onDismiss:n})=>{const[l,a]=y.useState(!1);if(l||i.length===0)return null;const r=()=>{a(!0),n?.()};return e.jsx(j,{children:!l&&e.jsx(p.div,{initial:{opacity:0,y:-10,height:0},animate:{opacity:1,y:0,height:"auto"},exit:{opacity:0,y:-10,height:0},className:"overflow-hidden",children:e.jsxs("div",{className:"relative bg-gradient-to-r from-sky-600 via-sky-500 to-sky-600 rounded-2xl p-5 text-white shadow-lg shadow-sky-500/20",children:[e.jsx("button",{onClick:r,className:"absolute top-3 right-3 w-7 h-7 bg-white/20 hover:bg-white/30 rounded-full flex items-center justify-center transition-colors",children:e.jsx(v,{size:14})}),e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-12 h-12 bg-white/20 rounded-xl flex items-center justify-center flex-shrink-0",children:e.jsx(w,{size:24})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-bold text-lg mb-1",children:"Supplemental Materials Available"}),e.jsx("p",{className:"text-sky-100 text-sm mb-3",children:"Based on your diagnostic assessment, we've identified topics that could use extra practice. Strengthening these areas will improve your overall performance."}),e.jsx("div",{className:"flex flex-wrap gap-2 mb-3",children:i.map(t=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 bg-white/20 backdrop-blur-sm px-3 py-1 rounded-full text-xs font-semibold",children:[e.jsx(h,{size:12}),N(t)]},t))}),e.jsxs("button",{onClick:s,className:"inline-flex items-center gap-2 bg-white text-sky-600 font-bold text-sm px-4 py-2 rounded-xl hover:bg-sky-50 transition-colors",children:["Review Topics",e.jsx(f,{size:16})]})]})]})]})})})},z=({quizSubject:i,atRiskSubjects:s=[]})=>{const n=i?u(i):null;if(!s.some(r=>{const t=u(r);return t&&t===n})||!n)return null;const a=b[n]||[];return e.jsx(p.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"mb-4 overflow-hidden",children:e.jsxs("div",{className:"bg-gradient-to-r from-rose-50 to-orange-50 border border-rose-200 rounded-xl p-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsx(h,{size:14,className:"text-rose-600"}),e.jsxs("span",{className:"text-xs font-bold text-rose-800",children:["Supplemental Focus Area — ",n]})]}),e.jsx("p",{className:"text-xs text-rose-700 mb-2",children:"This topic was flagged in your diagnostic. Take your time and review the explanations carefully."}),a.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5",children:a.slice(0,2).map((r,t)=>e.jsxs("span",{className:"inline-flex items-center gap-1 bg-rose-100 text-rose-700 px-2 py-0.5 rounded-md text-xs font-medium",children:[r.icon,r.label]},t))})]})})},C=({quizSubject:i,quizScore:s=0,atRiskSubjects:n=[],onAction:l})=>{const a=i?u(i):null,r=n.some(c=>{const d=u(c);return d&&d===a});if(s>=70&&!r)return null;const t=a?b[a]||[]:[],o=s<70;return e.jsx(p.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.5},className:"mt-4",children:e.jsx("div",{className:`rounded-2xl p-4 border-2 ${o?"bg-orange-50 border-orange-200":"bg-sky-50 border-sky-200"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0 ${o?"bg-orange-500":"bg-sky-500"}`,children:e.jsx(g,{size:20,className:"text-white"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h4",{className:"font-display font-bold text-[#0a1628] text-sm mb-1",children:o?"Review Recommended":"Supplemental Materials"}),e.jsx("p",{className:"text-xs text-[#5a6578] mb-2",children:o?`You scored ${s}% on this quiz. We recommend reviewing the following resources to strengthen your understanding.`:"This topic was identified as an area for growth. Check out these additional resources."}),t.length>0&&e.jsx("div",{className:"space-y-1.5 mb-3",children:t.map((c,d)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:`w-5 h-5 rounded flex items-center justify-center ${o?"bg-orange-100 text-orange-600":"bg-sky-100 text-sky-600"}`,children:c.icon}),e.jsx("span",{className:"font-medium text-[#0a1628]",children:c.label}),e.jsxs("span",{className:"text-slate-500",children:["— ",c.description]})]},d))}),l&&e.jsxs("button",{onClick:l,className:`inline-flex items-center gap-1.5 text-xs font-bold px-3 py-1.5 rounded-lg transition-colors ${o?"bg-orange-500 hover:bg-orange-600 text-white":"bg-sky-500 hover:bg-sky-600 text-white"}`,children:["Review Topics",e.jsx(f,{size:12})]})]})]})})})},V=i=>{switch(i.variant){case"compact":return e.jsx(z,{...i});case"results":return e.jsx(C,{...i});case"full":default:return e.jsx(k,{...i})}};export{V as default}; +import{j as e,r as y}from"./vendor-react-B4AQeu28.js";import{h as j,m as p,T as h}from"./index-Du57tmo9.js";import{X as v}from"./x-Cwkkamrh.js";import{S as w}from"./sparkles-DseoQb3m.js";import{C as f}from"./chevron-right-CFOFOVBg.js";import{B as g}from"./book-open-cmOvedFO.js";import{T as m}from"./trending-up-BgWHLAjl.js";import{B as x}from"./brain-CEG2uNCc.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";const b={"General Mathematics":[{label:"Functions Deep Dive",description:"Interactive review of function types and graphs",icon:e.jsx(m,{size:14})},{label:"Business Math Basics",description:"Simple & compound interest practice",icon:e.jsx(g,{size:14})}],"Statistics and Probability":[{label:"Distribution Visualizer",description:"Explore normal distribution curves",icon:e.jsx(m,{size:14})},{label:"Hypothesis Practice",description:"Step-by-step hypothesis testing",icon:e.jsx(x,{size:14})}],"Pre-Calculus":[{label:"Conic Sections Explorer",description:"Visual parabola, ellipse, hyperbola tool",icon:e.jsx(m,{size:14})},{label:"Trig Identity Practice",description:"Identity verification drill set",icon:e.jsx(x,{size:14})}],"Basic Calculus":[{label:"Limits Visualizer",description:"Graphical approach to limits",icon:e.jsx(m,{size:14})},{label:"Derivative Rules Drill",description:"Practice chain rule & implicit diff",icon:e.jsx(x,{size:14})}]};function u(i){const s=i.toLowerCase();return s==="functions"||s.includes("function")||s==="businessmath"||s.includes("business")||s==="logic"||s.includes("reason")||s.includes("general")||s.includes("gen-math")||s.includes("gen math")?"General Mathematics":s.includes("stat")||s.includes("prob")?"Statistics and Probability":s.includes("pre-calc")||s.includes("pre calc")||s.includes("precalc")?"Pre-Calculus":s.includes("basic")||s.includes("calc")?"Basic Calculus":null}function N(i){const s=i.trim().toLowerCase();return s==="functions"?"Functions and Graphs":s==="businessmath"?"Business and Financial Mathematics":s==="logic"?"Logic and Reasoning":i}const k=({atRiskSubjects:i=[],onAction:s,onDismiss:n})=>{const[l,a]=y.useState(!1);if(l||i.length===0)return null;const r=()=>{a(!0),n?.()};return e.jsx(j,{children:!l&&e.jsx(p.div,{initial:{opacity:0,y:-10,height:0},animate:{opacity:1,y:0,height:"auto"},exit:{opacity:0,y:-10,height:0},className:"overflow-hidden",children:e.jsxs("div",{className:"relative bg-gradient-to-r from-sky-600 via-sky-500 to-sky-600 rounded-2xl p-5 text-white shadow-lg shadow-sky-500/20",children:[e.jsx("button",{onClick:r,className:"absolute top-3 right-3 w-7 h-7 bg-white/20 hover:bg-white/30 rounded-full flex items-center justify-center transition-colors",children:e.jsx(v,{size:14})}),e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-12 h-12 bg-white/20 rounded-xl flex items-center justify-center flex-shrink-0",children:e.jsx(w,{size:24})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h3",{className:"font-bold text-lg mb-1",children:"Supplemental Materials Available"}),e.jsx("p",{className:"text-sky-100 text-sm mb-3",children:"Based on your diagnostic assessment, we've identified topics that could use extra practice. Strengthening these areas will improve your overall performance."}),e.jsx("div",{className:"flex flex-wrap gap-2 mb-3",children:i.map(t=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 bg-white/20 backdrop-blur-sm px-3 py-1 rounded-full text-xs font-semibold",children:[e.jsx(h,{size:12}),N(t)]},t))}),e.jsxs("button",{onClick:s,className:"inline-flex items-center gap-2 bg-white text-sky-600 font-bold text-sm px-4 py-2 rounded-xl hover:bg-sky-50 transition-colors",children:["Review Topics",e.jsx(f,{size:16})]})]})]})]})})})},z=({quizSubject:i,atRiskSubjects:s=[]})=>{const n=i?u(i):null;if(!s.some(r=>{const t=u(r);return t&&t===n})||!n)return null;const a=b[n]||[];return e.jsx(p.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"mb-4 overflow-hidden",children:e.jsxs("div",{className:"bg-gradient-to-r from-rose-50 to-orange-50 border border-rose-200 rounded-xl p-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsx(h,{size:14,className:"text-rose-600"}),e.jsxs("span",{className:"text-xs font-bold text-rose-800",children:["Supplemental Focus Area — ",n]})]}),e.jsx("p",{className:"text-xs text-rose-700 mb-2",children:"This topic was flagged in your diagnostic. Take your time and review the explanations carefully."}),a.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5",children:a.slice(0,2).map((r,t)=>e.jsxs("span",{className:"inline-flex items-center gap-1 bg-rose-100 text-rose-700 px-2 py-0.5 rounded-md text-xs font-medium",children:[r.icon,r.label]},t))})]})})},C=({quizSubject:i,quizScore:s=0,atRiskSubjects:n=[],onAction:l})=>{const a=i?u(i):null,r=n.some(c=>{const d=u(c);return d&&d===a});if(s>=70&&!r)return null;const t=a?b[a]||[]:[],o=s<70;return e.jsx(p.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.5},className:"mt-4",children:e.jsx("div",{className:`rounded-2xl p-4 border-2 ${o?"bg-orange-50 border-orange-200":"bg-sky-50 border-sky-200"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0 ${o?"bg-orange-500":"bg-sky-500"}`,children:e.jsx(g,{size:20,className:"text-white"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h4",{className:"font-display font-bold text-[#0a1628] text-sm mb-1",children:o?"Review Recommended":"Supplemental Materials"}),e.jsx("p",{className:"text-xs text-[#5a6578] mb-2",children:o?`You scored ${s}% on this quiz. We recommend reviewing the following resources to strengthen your understanding.`:"This topic was identified as an area for growth. Check out these additional resources."}),t.length>0&&e.jsx("div",{className:"space-y-1.5 mb-3",children:t.map((c,d)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:`w-5 h-5 rounded flex items-center justify-center ${o?"bg-orange-100 text-orange-600":"bg-sky-100 text-sky-600"}`,children:c.icon}),e.jsx("span",{className:"font-medium text-[#0a1628]",children:c.label}),e.jsxs("span",{className:"text-slate-500",children:["— ",c.description]})]},d))}),l&&e.jsxs("button",{onClick:l,className:`inline-flex items-center gap-1.5 text-xs font-bold px-3 py-1.5 rounded-lg transition-colors ${o?"bg-orange-500 hover:bg-orange-600 text-white":"bg-sky-500 hover:bg-sky-600 text-white"}`,children:["Review Topics",e.jsx(f,{size:12})]})]})]})})})},V=i=>{switch(i.variant){case"compact":return e.jsx(z,{...i});case"results":return e.jsx(C,{...i});case"full":default:return e.jsx(k,{...i})}};export{V as default}; diff --git a/assets/TeacherDashboard-DNWwq_ue.js b/assets/TeacherDashboard-DlC2jUJq.js similarity index 84% rename from assets/TeacherDashboard-DNWwq_ue.js rename to assets/TeacherDashboard-DlC2jUJq.js index c2b0e3ddbaf3d6ea36bfa75736addc4bf8e07f4d..c5bd2d731cdd28d11126c3e92726f21c828ac7d7 100644 --- a/assets/TeacherDashboard-DNWwq_ue.js +++ b/assets/TeacherDashboard-DlC2jUJq.js @@ -1,42 +1,47 @@ -import{d as re,j as e,r as b,c as Ti}from"./vendor-react-B4AQeu28.js";import{c as Ii,B as Ve}from"./button-BSRmUN27.js";import{I as pt}from"./input-B3NSXxdz.js";import Ei from"./ConfirmModal-Bs6qCyoa.js";import{M as Ri,L as Mi,S as Ai,a as Li}from"./LogoutActionButton-w1PkauXp.js";import{c as bs,d as Ye,g as Di,e as We,f as Jn,h as es,m as Ie,Z as er,u as Us,t as ue,i as Fs,C as zi,j as Pr,k as Fi,T as gs,l as _r,n as Bi,B as $i,M as Oi,U as Pi,o as _i}from"./index-fWY85Kyg.js";import{e as Ot,q as Rt,l as Zn,w as Mt,h as Gt,o as Hi,f as eo,s as Pt,d as ut,u as _t,g as xs,a as lt,c as Gi}from"./vendor-firebase-firestore-52DD1vc9.js";import{S as Qi,a as Ui}from"./vendor-radix-DnWAlVSW.js";import{T as Vi,a as Wi,b as qi}from"./tooltip-DQuc9Ksp.js";import{B as ss}from"./book-open-D5mR6gz9.js";import{G as to}from"./graduation-cap-B4Q4YTk8.js";import{X as ca}from"./x-BLLfAvOF.js";import{B as so}from"./brain-COga8OrM.js";import{E as Yi,s as Hr,f as Ki,d as Xi,L as Ji,p as Zi,a as el,P as ao}from"./quizService-hKqxJjxh.js";import{C as Bt}from"./chevron-left-KucdseP8.js";import{L as at}from"./loader-circle-id_hZlNw.js";import{E as tl,a as sl}from"./eye-DQlJQwuY.js";import{S as Ls}from"./send-86vsPrek.js";import{T as ro}from"./trash-2-PgvGautk.js";import{C as no,a as al}from"./circle-alert-KkqOOEPJ.js";import{C as us}from"./check-Cs-4n4yC.js";import{I as Ha,F as tr,T as rl,a as nl,b as Ea,c as is,d as ol,e as Kt,D as il,f as ll,g as cl,h as dl,i as ml,j as ul,k as xl,l as hl}from"./dialog-TlKhS4yO.js";import{C as da,a as ts}from"./chevron-up-Bup_RJHP.js";import{M as fl}from"./minus-Db4XvxwC.js";import{P as sa}from"./plus-CRabOymo.js";import{C as pl,a as Cs,b as ks,c as Ts,d as Is}from"./card-SHcaFLA_.js";import{D as oo}from"./download-Dl_jNVXs.js";import{C as Ht}from"./chevron-right-mxUv3EB7.js";import{S as io}from"./save-_nGsRc5b.js";import{T as sr}from"./trending-up-Do7UgIZi.js";import{U as Ga}from"./users-CX_H_2cY.js";import{S as ha}from"./search-DoNO8thr.js";import{R as Qa}from"./refresh-cw-Dr342wB2.js";import{U as gl}from"./upload-DodiG981.js";import{u as bl}from"./useQuery-Dajy9lf6.js";import{S as Gr,g as vl,G as Nl,s as Qr}from"./subjects-BlAP40QQ.js";import{u as jl}from"./useCurriculum-DKgroDSx.js";import{C as Bs}from"./chart-column-V8fKqOo0.js";import{C as lo}from"./circle-check-big-Qn5jJKfH.js";import{U as Ur}from"./user-Cp86-wJG.js";import{A as yl}from"./award-DBHp-ybd.js";import co from"./ChatMarkdown-C-_pyfsw.js";import{B as aa}from"./bell-BwBudSvY.js";import{C as mo}from"./clock-BJCraYVD.js";import{T as wl}from"./trophy-fJOOsc_0.js";import{S as ce}from"./skeleton-ISwUzksB.js";import{u as vt,r as Sl}from"./vendor-xlsx-uZelXSz_.js";import{T as Cl}from"./target-B6MOj4Ln.js";import{C as uo}from"./clipboard-check-DbpvA-N4.js";import{C as kl}from"./calendar-ClpJmmLI.js";import{R as Vr,B as Wr,C as qr,X as Yr,Y as Kr,T as Xr,a as Jr,b as Tl}from"./vendor-charts-BHw0fhqZ.js";import"./log-out-aQvvB_kG.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-markdown-yqZQ_iQm.js";/** +import{d as re,j as e,r as b,c as Ti}from"./vendor-react-B4AQeu28.js";import{c as Ii,B as Ve}from"./button-C6pFOjcg.js";import{I as pt}from"./input-DtBdbulD.js";import Ei from"./ConfirmModal-CGEO_l_6.js";import{M as Ri,L as Mi,S as Ai,a as Li}from"./LogoutActionButton-XXsvBOAH.js";import{c as rs,d as Ye,g as Di,e as We,f as Jn,h as es,m as Ie,Z as er,u as Us,t as ue,i as Fs,C as zi,j as Pr,k as Fi,T as bs,l as _r,n as Bi,B as $i,M as Oi,U as Pi,o as _i}from"./index-Du57tmo9.js";import{e as Ot,q as Rt,l as Zn,w as Mt,h as Gt,o as Hi,f as eo,s as Pt,d as ut,u as _t,g as hs,a as lt,c as Gi}from"./vendor-firebase-firestore-52DD1vc9.js";import{S as Qi,a as Ui}from"./vendor-radix-DnWAlVSW.js";import{T as Vi,a as Wi,b as qi}from"./tooltip-C0JcTMbS.js";import{B as ss}from"./book-open-cmOvedFO.js";import{G as to}from"./graduation-cap-D6QMIGIe.js";import{X as ca}from"./x-Cwkkamrh.js";import{B as so}from"./brain-CEG2uNCc.js";import{E as Yi,s as Hr,f as Ki,d as Xi,L as Ji,p as Zi,a as el}from"./quizService-DQwJWsyM.js";import{C as Bt}from"./chevron-left-mWdIDmIc.js";import{L as at}from"./loader-circle-Bluo8e0c.js";import{E as tl,a as sl}from"./eye-Duf559JU.js";import{S as Ls}from"./send-DWW_bMCz.js";import{T as ao}from"./trash-2-uIChez5o.js";import{C as ro,a as al}from"./circle-alert-mPiSlvKL.js";import{C as xs}from"./check-BAMSfVKd.js";import{I as Ha,F as tr,T as rl,a as nl,b as Ea,c as ls,d as ol,e as Kt,D as il,f as ll,g as cl,h as dl,i as ml,j as ul,k as xl,l as hl}from"./dialog-fRGvTlwY.js";import{C as da,a as ts}from"./chevron-up-Dmffgx6p.js";import{M as fl}from"./minus-DyrqHtmD.js";import{P as sa}from"./plus-gReuWg-C.js";import{C as pl,a as ks,b as Cs,c as Ts,d as Is}from"./card-BdmZcu-T.js";import{D as no}from"./download-VEXmhhD6.js";import{C as Ht}from"./chevron-right-CFOFOVBg.js";import{S as oo}from"./save-BYv1sqTn.js";import{T as sr}from"./trending-up-BgWHLAjl.js";import{U as Ga}from"./users--M0GUX5u.js";import{S as ha}from"./search-Dz1wkXyZ.js";import{R as Qa}from"./refresh-cw-BDWpfygR.js";import{U as gl}from"./upload-CONq3UoZ.js";import{u as bl}from"./useQuery-CDdIlAcl.js";import{S as Gr,g as vl,G as Nl,s as Qr}from"./subjects-DLaBFkP9.js";import{u as jl}from"./useCurriculum-7SWvm23j.js";import{C as Bs}from"./chart-column-Cqncpeum.js";import{C as io}from"./circle-check-big-DC9utj0Y.js";import{U as Ur}from"./user-DPqSTqXe.js";import{A as yl}from"./award-ZQxHm68j.js";import lo from"./ChatMarkdown-Dqp-2Avv.js";import{B as aa}from"./bell-CVB0-Rn1.js";import{C as co}from"./clock-BtWjBj1h.js";import{T as wl}from"./trophy-8udS7pQx.js";import{S as ce}from"./skeleton-08qYl7s6.js";import{u as vt,r as Sl}from"./vendor-xlsx-uZelXSz_.js";import{T as kl}from"./target-B_JwHjFq.js";import{C as mo}from"./clipboard-check-fEagN09v.js";import{C as Cl}from"./calendar-DguKdDEr.js";import{R as Vr,B as Wr,C as qr,X as Yr,Y as Kr,T as Xr,a as Jr,b as Tl}from"./vendor-charts-BHw0fhqZ.js";import"./log-out-SC88Jnul.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-markdown-yqZQ_iQm.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Il=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],El=bs("calendar-days",Il);/** + */const Il=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],El=rs("calendar-days",Il);/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Rl=[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]],Ml=bs("chart-no-axes-column",Rl);/** + */const Rl=[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]],Ml=rs("chart-no-axes-column",Rl);/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Al=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],Ll=bs("file-spreadsheet",Al);/** + */const Al=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],Ll=rs("file-spreadsheet",Al);/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Dl=[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]],Zr=bs("library",Dl);/** + */const Dl=[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]],Zr=rs("library",Dl);/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const zl=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],Fl=bs("video",zl);/** + */const zl=[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]],uo=rs("pen-line",zl);/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Bl=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],$l=bs("wand-sparkles",Bl),fa=0,Ut=1,vs=2,xo=4;function en(t){return()=>t}function Ol(t){t()}function ho(t,s){return a=>t(s(a))}function tn(t,s){return()=>t(s)}function Pl(t,s){return a=>t(s,a)}function ar(t){return t!==void 0}function _l(...t){return()=>{t.map(Ol)}}function Ns(){}function pa(t,s){return s(t),t}function Hl(t,s){return s(t)}function He(...t){return t}function Ae(t,s){return t(Ut,s)}function we(t,s){t(fa,s)}function rr(t){t(vs)}function Qe(t){return t(xo)}function oe(t,s){return Ae(t,Pl(s,fa))}function wt(t,s){const a=t(Ut,r=>{a(),s(r)});return a}function sn(t){let s,a;return r=>n=>{s=n,a&&clearTimeout(a),a=setTimeout(()=>{r(s)},t)}}function fo(t,s){return t===s}function _e(t=fo){let s;return a=>r=>{t(s,r)||(s=r,a(r))}}function he(t){return s=>a=>{t(a)&&s(a)}}function Z(t){return s=>ho(s,t)}function Tt(t){return s=>()=>{s(t)}}function O(t,...s){const a=Gl(...s);return((r,n)=>{switch(r){case vs:rr(t);return;case Ut:return Ae(t,a(n))}})}function It(t,s){return a=>r=>{a(s=t(s,r))}}function as(t){return s=>a=>{t>0?t--:s(a)}}function $t(t){let s=null,a;return r=>n=>{s=n,!a&&(a=setTimeout(()=>{a=void 0,r(s)},t))}}function Se(...t){const s=new Array(t.length);let a=0,r=null;const n=2**t.length-1;return t.forEach((o,i)=>{const l=2**i;Ae(o,c=>{const d=a;a|=l,s[i]=c,d!==n&&a===n&&r&&(r(),r=null)})}),o=>i=>{const l=()=>{o([i].concat(s))};a===n?l():r=l}}function Gl(...t){return s=>t.reduceRight(Hl,s)}function Ql(t){let s,a;const r=()=>s?.();return function(n,o){switch(n){case Ut:return o?a===o?void 0:(r(),a=o,s=Ae(t,o),s):(r(),Ns);case vs:r(),a=null;return}}}function Q(t){let s=t;const a=ke();return((r,n)=>{switch(r){case fa:s=n;break;case Ut:{n(s);break}case xo:return s}return a(r,n)})}function ot(t,s){return pa(Q(s),a=>oe(t,a))}function ke(){const t=[];return((s,a)=>{switch(s){case fa:t.slice().forEach(r=>{r(a)});return;case vs:t.splice(0,t.length);return;case Ut:return t.push(a),()=>{const r=t.indexOf(a);r>-1&&t.splice(r,1)}}})}function xt(t){return pa(ke(),s=>oe(t,s))}function Re(t,s=[],{singleton:a}={singleton:!0}){return{constructor:t,dependencies:s,id:Ul(),singleton:a}}const Ul=()=>Symbol();function Vl(t){const s=new Map,a=({constructor:r,dependencies:n,id:o,singleton:i})=>{if(i&&s.has(o))return s.get(o);const l=r(n.map(c=>a(c)));return i&&s.set(o,l),l};return a(t)}function qe(...t){const s=ke(),a=new Array(t.length);let r=0;const n=2**t.length-1;return t.forEach((o,i)=>{const l=2**i;Ae(o,c=>{a[i]=c,r|=l,r===n&&we(s,a)})}),function(o,i){switch(o){case vs:{rr(s);return}case Ut:return r===n&&i(a),Ae(s,i)}}}function xe(t,s=fo){return O(t,_e(s))}function Ua(...t){return function(s,a){switch(s){case vs:return;case Ut:return _l(...t.map(r=>Ae(r,a)))}}}const Xe={DEBUG:0,INFO:1,WARN:2,ERROR:3},Wl={[Xe.DEBUG]:"debug",[Xe.ERROR]:"error",[Xe.INFO]:"log",[Xe.WARN]:"warn"},ql=()=>typeof globalThis>"u"?window:globalThis,Vt=Re(()=>{const t=Q(Xe.ERROR);return{log:Q((s,a,r=Xe.INFO)=>{const n=ql().VIRTUOSO_LOG_LEVEL??Qe(t);r>=n&&console[Wl[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",s,a)}),logLevel:t}},[],{singleton:!0});function rs(t,s,a){return nr(t,s,a).callbackRef}function nr(t,s,a){const r=re.useRef(null);let n=i=>{};const o=re.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(i=>{const l=()=>{const c=i[0].target;c.offsetParent!==null&&t(c)};a?l():requestAnimationFrame(l)}):null,[t,a]);return n=i=>{i&&s?(o?.observe(i),r.current=i):(r.current&&o?.unobserve(r.current),r.current=null)},{callbackRef:n,ref:r}}function Yl(t,s,a,r,n,o,i,l,c){const d=re.useCallback(x=>{const N=Kl(x.children,s,l?"offsetWidth":"offsetHeight",n);let m=x.parentElement;for(;m.dataset.virtuosoScroller===void 0;)m=m.parentElement;const f=m.lastElementChild.dataset.viewportType==="window";let w;f&&(w=m.ownerDocument.defaultView);const T=i?l?i.scrollLeft:i.scrollTop:f?l?w.scrollX||w.document.documentElement.scrollLeft:w.scrollY||w.document.documentElement.scrollTop:l?m.scrollLeft:m.scrollTop,j=i?l?i.scrollWidth:i.scrollHeight:f?l?w.document.documentElement.scrollWidth:w.document.documentElement.scrollHeight:l?m.scrollWidth:m.scrollHeight,h=i?l?i.offsetWidth:i.offsetHeight:f?l?w.innerWidth:w.innerHeight:l?m.offsetWidth:m.offsetHeight;r({scrollHeight:j,scrollTop:Math.max(T,0),viewportHeight:h}),o?.(l?an("column-gap",getComputedStyle(x).columnGap,n):an("row-gap",getComputedStyle(x).rowGap,n)),N!==null&&t(N)},[t,s,n,o,i,r,l]);return nr(d,a,c)}function Kl(t,s,a,r){const n=t.length;if(n===0)return null;const o=[];for(let i=0;i{if(!c?.offsetParent)return;const d=c.getBoundingClientRect(),x=d.width;let N,m;if(s){const f=s.getBoundingClientRect(),w=d.top-f.top;m=f.height-Math.max(0,w),N=w+s.scrollTop}else{const f=i.current.ownerDocument.defaultView;m=f.innerHeight-Math.max(0,d.top),N=d.top+f.scrollY}r.current={listHeight:d.height,offsetTop:N,visibleHeight:m,visibleWidth:x},t(r.current)},[t,s]),{callbackRef:o,ref:i}=nr(n,!0,a),l=re.useCallback(()=>{n(i.current)},[n,i]);return re.useEffect(()=>{if(s){s.addEventListener("scroll",l);const d=new ResizeObserver(()=>{requestAnimationFrame(l)});return d.observe(s),()=>{s.removeEventListener("scroll",l),d.unobserve(s)}}const c=i.current?.ownerDocument.defaultView;return c?.addEventListener("scroll",l),c?.addEventListener("resize",l),()=>{c?.removeEventListener("scroll",l),c?.removeEventListener("resize",l)}},[l,s,i]),o}const ct=Re(()=>{const t=ke(),s=ke(),a=Q(0),r=ke(),n=Q(0),o=ke(),i=ke(),l=Q(0),c=Q(0),d=Q(0),x=Q(0),N=ke(),m=ke(),f=Q(!1),w=Q(!1),T=Q(!1);return oe(O(t,Z(({scrollTop:j})=>j)),s),oe(O(t,Z(({scrollHeight:j})=>j)),i),oe(s,n),{deviation:a,fixedFooterHeight:d,fixedHeaderHeight:c,footerHeight:x,headerHeight:l,horizontalDirection:w,scrollBy:m,scrollContainerState:t,scrollHeight:i,scrollingInProgress:f,scrollTo:N,scrollTop:s,skipAnimationFrameInResizeObserver:T,smoothScrollTargetReached:r,statefulScrollTop:n,viewportHeight:o}},[],{singleton:!0}),$s={lvl:0};function go(t,s){const a=t.length;if(a===0)return[];let{index:r,value:n}=s(t[0]);const o=[];for(let i=1;is&&(l=l.concat(Wa(n,s,a))),r>=s&&r<=a&&l.push({k:r,v:i}),r<=a&&(l=l.concat(Wa(o,s,a))),l}function ra(t){const{l:s,lvl:a,r}=t;if(r.lvl>=a-1&&s.lvl>=a-1)return t;if(a>r.lvl+1){if(Ra(s))return jo(Ke(t,{lvl:a-1}));if(!ze(s)&&!ze(s.r))return Ke(s.r,{l:Ke(s,{r:s.r.l}),lvl:a,r:Ke(t,{l:s.r.r,lvl:a-1})});throw new Error("Unexpected empty nodes")}if(Ra(t))return qa(Ke(t,{lvl:a-1}));if(!ze(r)&&!ze(r.l)){const n=r.l,o=Ra(n)?r.lvl-1:r.lvl;return Ke(n,{l:Ke(t,{lvl:a-1,r:n.l}),lvl:n.lvl+1,r:qa(Ke(r,{l:n.r,lvl:o}))})}throw new Error("Unexpected empty nodes")}function Ke(t,s){return No(s.k!==void 0?s.k:t.k,s.v!==void 0?s.v:t.v,s.lvl!==void 0?s.lvl:t.lvl,s.l!==void 0?s.l:t.l,s.r!==void 0?s.r:t.r)}function bo(t){return ze(t.r)?t.l:ra(Ke(t,{r:bo(t.r)}))}function Ra(t){return ze(t)||t.lvl>t.r.lvl}function vo(t){return ze(t.r)?[t.k,t.v]:vo(t.r)}function No(t,s,a,r=$s,n=$s){return{k:t,l:r,lvl:a,r:n,v:s}}function rn(t){return qa(jo(t))}function jo(t){const{l:s}=t;return!ze(s)&&s.lvl===t.lvl?Ke(s,{r:Ke(t,{l:s.r})}):t}function qa(t){const{lvl:s,r:a}=t;return!ze(a)&&!ze(a.r)&&a.lvl===s&&a.r.lvl===s?Ke(a,{l:Ke(t,{r:a.l}),lvl:s+1}):t}function Xl(t){return go(t,({k:s,v:a})=>({index:s,value:a}))}function yo(t,s){return!!(t&&t.startIndex===s.startIndex&&t.endIndex===s.endIndex)}function Ps(t,s){return!!(t&&t[0]===s[0]&&t[1]===s[1])}const or=Re(()=>({recalcInProgress:Q(!1)}),[],{singleton:!0});function wo(t,s,a){return t[ma(t,s,a)]}function ma(t,s,a,r=0){let n=t.length-1;for(;r<=n;){const o=Math.floor((r+n)/2),i=t[o],l=a(i,s);if(l===0)return o;if(l===-1){if(n-r<2)return o-1;n=o-1}else{if(n===r)return o;r=o+1}}throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${s}`)}function Jl(t,s,a,r){const n=ma(t,s,r),o=ma(t,a,r,n);return t.slice(n,o+1)}function Qt(t,s){return Math.round(t.getBoundingClientRect()[s])}function ga(t){return!ze(t.groupOffsetTree)}function ir({index:t},s){return s===t?0:s=N||o===m)&&(t=Va(t,N)):(d=m!==o,c=!0),x>n&&n>=N&&m!==o&&(t=mt(t,n+1,m));d&&(t=mt(t,i,o))}return[t,a]}function tc(t){return typeof t.groupIndex<"u"}function sc({offset:t},s){return s===t?0:s0?l+a:l}function So(t,s){if(!ga(s))return t;let a=0;for(;s.groupIndices[a]<=t+a;)a++;return t+a}function Co(t,s,a){if(tc(t))return s.groupIndices[t.groupIndex]+1;const r=t.index==="LAST"?a:t.index;let n=So(r,s);return n=Math.max(0,n,Math.min(a,n)),n}function ac(t,s,a,r=0){return r>0&&(s=Math.max(s,wo(t,r,ir).offset)),go(Jl(t,s,a,sc),oc)}function rc(t,[s,a,r,n]){s.length>0&&r("received item sizes",s,Xe.DEBUG);const o=t.sizeTree;let i=o,l=0;if(a.length>0&&ze(o)&&s.length===2){const m=s[0].size,f=s[1].size;i=a.reduce((w,T)=>mt(mt(w,T,m),T+1,f),i)}else[i,l]=ec(i,s);if(i===o)return t;const{lastIndex:c,lastOffset:d,lastSize:x,offsetTree:N}=Ya(t.offsetTree,l,i,n);return{groupIndices:a,groupOffsetTree:a.reduce((m,f)=>mt(m,f,_s(f,N,n)),hs()),lastIndex:c,lastOffset:d,lastSize:x,offsetTree:N,sizeTree:i}}function nc(t){return Zt(t).map(({k:s,v:a},r,n)=>{const o=n[r+1];return{endIndex:o!==void 0?o.k-1:1/0,size:a,startIndex:s}})}function nn(t,s){let a=0,r=0;for(;an.start===r&&(n.end===s||n.end===1/0)&&n.value===a}const lc={offsetHeight:"height",offsetWidth:"width"},At=Re(([{log:t},{recalcInProgress:s}])=>{const a=ke(),r=ke(),n=ot(r,0),o=ke(),i=ke(),l=Q(0),c=Q([]),d=Q(void 0),x=Q(void 0),N=Q(void 0),m=Q(void 0),f=Q((g,S)=>Qt(g,lc[S])),w=Q(void 0),T=Q(0),j=Zl(),h=ot(O(a,Se(c,t,T),It(rc,j),_e()),j),y=ot(O(c,_e(),It((g,S)=>({current:S,prev:g.current}),{current:[],prev:[]}),Z(({prev:g})=>g)),[]);oe(O(c,he(g=>g.length>0),Se(h,T),Z(([g,S,I])=>{const B=g.reduce((P,J,ne)=>mt(P,J,_s(J,S.offsetTree,I)||ne),hs());return{...S,groupIndices:g,groupOffsetTree:B}})),h),oe(O(r,Se(h),he(([g,{lastIndex:S}])=>g[{endIndex:S,size:I,startIndex:g}])),a),oe(d,x);const k=ot(O(d,Z(g=>g===void 0)),!0);oe(O(x,he(g=>g!==void 0&&ze(Qe(h).sizeTree)),Z(g=>{const S=Qe(N),I=Qe(c).length>0;return S!==void 0&&S!==0?I?[{endIndex:0,size:S,startIndex:0},{endIndex:1,size:g,startIndex:1}]:[]:[{endIndex:0,size:g,startIndex:0}]})),a),oe(O(m,he(g=>g!==void 0&&g.length>0&&ze(Qe(h).sizeTree)),Z(g=>{const S=[];let I=g[0],B=0;for(let P=1;Pg!==void 0&&S!==void 0),Z(([g,S,I])=>{const B=[];for(let P=0;P({changed:I!==g,sizes:I}),{changed:!1,sizes:j}),Z(g=>g.changed)));Ae(O(l,It((g,S)=>({diff:g.prev-S,prev:S}),{diff:0,prev:0}),Z(g=>g.diff)),g=>{const{groupIndices:S}=Qe(h);if(g>0)we(s,!0),we(o,g+nn(g,S));else if(g<0){const I=Qe(y);I.length>0&&(g-=nn(-g,I)),we(i,g)}}),Ae(O(l,Se(t)),([g,S])=>{g<0&&S("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:l},Xe.ERROR)});const p=xt(o);oe(O(o,Se(h),Z(([g,S])=>{const I=S.groupIndices.length>0,B=[],P=S.lastSize;if(I){const J=Os(S.sizeTree,0);let ne=0,X=0;for(;ne{let E=se.ranges;return se.prevSize!==0&&(E=[...se.ranges,{endIndex:$+g-1,size:se.prevSize,startIndex:se.prevIndex}]),{prevIndex:$+g,prevSize:Y,ranges:E}},{prevIndex:g,prevSize:0,ranges:B}).ranges}return Zt(S.sizeTree).reduce((J,{k:ne,v:X})=>({prevIndex:ne+g,prevSize:X,ranges:[...J.ranges,{endIndex:ne+g-1,size:J.prevSize,startIndex:J.prevIndex}]}),{prevIndex:0,prevSize:P,ranges:[]}).ranges})),a);const z=xt(O(i,Se(h,T),Z(([g,{offsetTree:S},I])=>{const B=-g;return _s(B,S,I)})));return oe(O(i,Se(h,T),Z(([g,S,I])=>{if(S.groupIndices.length>0){if(ze(S.sizeTree))return S;let P=hs();const J=Qe(y);let ne=0,X=0,te=0;for(;ne<-g;){te=J[X];const se=J[X+1]-te-1;X++,ne+=se+1}if(P=Zt(S.sizeTree).reduce((se,{k:$,v:Y})=>mt(se,Math.max(0,$+g),Y),P),ne!==-g){const se=Os(S.sizeTree,te);P=mt(P,0,se);const $=Ct(S.sizeTree,-g+1)[1];P=mt(P,1,$)}return{...S,sizeTree:P,...Ya(S.offsetTree,0,P,I)}}const B=Zt(S.sizeTree).reduce((P,{k:J,v:ne})=>mt(P,Math.max(0,J+g),ne),hs());return{...S,sizeTree:B,...Ya(S.offsetTree,0,B,I)}})),h),{beforeUnshiftWith:p,data:w,defaultItemSize:x,firstItemIndex:l,fixedItemSize:d,fixedGroupSize:N,gap:T,groupIndices:c,heightEstimates:m,itemSize:f,listRefresh:D,shiftWith:i,shiftWithOffset:z,sizeRanges:a,sizes:h,statefulTotalCount:n,totalCount:r,trackItemSizes:k,unshiftWith:o}},He(Vt,or),{singleton:!0});function cc(t){return t.reduce((s,a)=>(s.groupIndices.push(s.totalCount),s.totalCount+=a+1,s),{groupIndices:[],totalCount:0})}const ko=Re(([{groupIndices:t,sizes:s,totalCount:a},{headerHeight:r,scrollTop:n}])=>{const o=ke(),i=ke(),l=xt(O(o,Z(cc)));return oe(O(l,Z(c=>c.totalCount)),a),oe(O(l,Z(c=>c.groupIndices)),t),oe(O(qe(n,s,r),he(([c,d])=>ga(d)),Z(([c,d,x])=>Ct(d.groupOffsetTree,Math.max(c-x,0),"v")[0]),_e(),Z(c=>[c])),i),{groupCounts:o,topItemsIndexes:i}},He(At,ct)),Wt=Re(([{log:t}])=>{const s=Q(!1),a=xt(O(s,he(r=>r),_e()));return Ae(s,r=>{r&&Qe(t)("props updated",{},Xe.DEBUG)}),{didMount:a,propsReady:s}},He(Vt),{singleton:!0}),dc=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function To(t){const s=typeof t=="number"?{index:t}:t;return s.align||(s.align="start"),(!s.behavior||!dc)&&(s.behavior="auto"),s.offset===void 0&&(s.offset=0),s}const Vs=Re(([{gap:t,listRefresh:s,sizes:a,totalCount:r},{fixedFooterHeight:n,fixedHeaderHeight:o,footerHeight:i,headerHeight:l,scrollingInProgress:c,scrollTo:d,smoothScrollTargetReached:x,viewportHeight:N},{log:m}])=>{const f=ke(),w=ke(),T=Q(0);let j=null,h=null,y=null;function k(){j!==null&&(j(),j=null),y!==null&&(y(),y=null),h&&(clearTimeout(h),h=null),we(c,!1)}return oe(O(f,Se(a,N,r,T,l,i,m),Se(t,o,n),Z(([[D,p,z,g,S,I,B,P],J,ne,X])=>{const te=To(D),{align:se,behavior:$,offset:Y}=te,E=g-1,U=Co(te,p,E);let W=_s(U,p.offsetTree,J)+I;se==="end"?(W+=ne+Ct(p.sizeTree,U)[1]-z+X,U===E&&(W+=B)):se==="center"?W+=(ne+Ct(p.sizeTree,U)[1]-z+X)/2:W-=S,Y!==void 0&&Y!==0&&(W+=Y);const ge=L=>{k(),L?(P("retrying to scroll to",{location:D},Xe.DEBUG),we(f,D)):(we(w,!0),P("list did not change, scroll successful",{},Xe.DEBUG))};if(k(),$==="smooth"){let L=!1;y=Ae(s,C=>{L=L||C}),j=wt(x,()=>{ge(L)})}else j=wt(O(s,mc(150)),ge);return h=setTimeout(()=>{k()},1200),we(c,!0),P("scrolling from index to",{behavior:$,index:U,top:W},Xe.DEBUG),{behavior:$,top:W}})),d),{scrollTargetReached:w,scrollToIndex:f,topListHeight:T}},He(At,ct,Vt),{singleton:!0});function mc(t){return s=>{const a=setTimeout(()=>{s(!1)},t);return r=>{r&&(s(!0),clearTimeout(a))}}}function lr(t,s){t===0?s():requestAnimationFrame(()=>{lr(t-1,s)})}function cr(t,s){const a=s-1;return typeof t=="number"?t:t.index==="LAST"?a:t.index}const Ws=Re(([{defaultItemSize:t,listRefresh:s,sizes:a},{scrollTop:r},{scrollTargetReached:n,scrollToIndex:o},{didMount:i}])=>{const l=Q(!0),c=Q(0),d=Q(!0);return oe(O(i,Se(c),he(([x,N])=>N!==0),Tt(!1)),l),oe(O(i,Se(c),he(([x,N])=>N!==0),Tt(!1)),d),Ae(O(qe(s,i),Se(l,a,t,d),he(([[,x],N,{sizeTree:m},f,w])=>x&&(!ze(m)||ar(f))&&!N&&!w),Se(c)),([,x])=>{wt(n,()=>{we(d,!0)}),lr(4,()=>{wt(r,()=>{we(l,!0)}),we(o,x)})}),{initialItemFinalLocationReached:d,initialTopMostItemIndex:c,scrolledToInitialItem:l}},He(At,ct,Vs,Wt),{singleton:!0});function Io(t,s){return Math.abs(t-s)<1.01}const Hs="up",Ds="down",uc="none",xc={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},hc=0,qs=Re(([{footerHeight:t,headerHeight:s,scrollBy:a,scrollContainerState:r,scrollTop:n,viewportHeight:o}])=>{const i=Q(!1),l=Q(!0),c=ke(),d=ke(),x=Q(4),N=Q(hc),m=ot(O(Ua(O(xe(n),as(1),Tt(!0)),O(xe(n),as(1),Tt(!1),sn(100))),_e()),!1),f=ot(O(Ua(O(a,Tt(!0)),O(a,Tt(!1),sn(200))),_e()),!1);oe(O(qe(xe(n),xe(N)),Z(([y,k])=>y<=k),_e()),l),oe(O(l,$t(50)),d);const w=xt(O(qe(r,xe(o),xe(s),xe(t),xe(x)),It((y,[{scrollHeight:k,scrollTop:D},p,z,g,S])=>{const I=D+p-k>-S,B={scrollHeight:k,scrollTop:D,viewportHeight:p};if(I){let J,ne;return D>y.state.scrollTop?(J="SCROLLED_DOWN",ne=y.state.scrollTop-D):(J="SIZE_DECREASED",ne=y.state.scrollTop-D||y.scrollTopDelta),{atBottom:!0,atBottomBecause:J,scrollTopDelta:ne,state:B}}let P;return B.scrollHeight>y.state.scrollHeight?P="SIZE_INCREASED":py!==void 0&&y.atBottom===k.atBottom))),T=ot(O(r,It((y,{scrollHeight:k,scrollTop:D,viewportHeight:p})=>{if(!Io(y.scrollHeight,k)){const z=k-(D+p)<1;return y.scrollTop!==D&&z?{changed:!0,jump:y.scrollTop-D,scrollHeight:k,scrollTop:D}:{changed:!0,jump:0,scrollHeight:k,scrollTop:D}}return{changed:!1,jump:0,scrollHeight:k,scrollTop:D}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),he(y=>y.changed),Z(y=>y.jump)),0);oe(O(w,Z(y=>y.atBottom)),i),oe(O(i,$t(50)),c);const j=Q(Ds);oe(O(r,Z(({scrollTop:y})=>y),_e(),It((y,k)=>Qe(f)?{direction:y.direction,prevScrollTop:k}:{direction:ky.direction)),j),oe(O(r,$t(50),Tt(uc)),j);const h=Q(0);return oe(O(m,he(y=>!y),Tt(0)),h),oe(O(n,$t(100),Se(m),he(([y,k])=>k),It(([y,k],[D])=>[k,D],[0,0]),Z(([y,k])=>k-y)),h),{atBottomState:w,atBottomStateChange:c,atBottomThreshold:x,atTopStateChange:d,atTopThreshold:N,isAtBottom:i,isAtTop:l,isScrolling:m,lastJumpDueToItemResize:T,scrollDirection:j,scrollVelocity:h}},He(ct)),Gs="top",Qs="bottom",on="none";function ln(t,s,a){return typeof t=="number"?a===Hs&&s===Gs||a===Ds&&s===Qs?t:0:a===Hs?s===Gs?t.main:t.reverse:s===Qs?t.main:t.reverse}function cn(t,s){return typeof t=="number"?t:t[s]??0}const dr=Re(([{deviation:t,fixedHeaderHeight:s,headerHeight:a,scrollTop:r,viewportHeight:n}])=>{const o=ke(),i=Q(0),l=Q(0),c=Q(0),d=ot(O(qe(xe(r),xe(n),xe(a),xe(o,Ps),xe(c),xe(i),xe(s),xe(t),xe(l)),Z(([x,N,m,[f,w],T,j,h,y,k])=>{const D=x-y,p=j+h,z=Math.max(m-D,0);let g=on;const S=cn(k,Gs),I=cn(k,Qs);return f-=y,f+=m+h,w+=m+h,w-=y,f>x+p-S&&(g=Hs),wx!==null),_e(Ps)),[0,0]);return{increaseViewportBy:l,listBoundary:o,overscan:c,topListHeight:i,visibleRange:d}},He(ct),{singleton:!0});function fc(t,s,a){if(ga(s)){const r=So(t,s);return[{index:Ct(s.groupOffsetTree,r)[0],offset:0,size:0},{data:a?.[0],index:r,offset:0,size:0}]}return[{data:a?.[0],index:t,offset:0,size:0}]}const Ma={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function na(t,s,a,r,n,o){const{lastIndex:i,lastOffset:l,lastSize:c}=n;let d=0,x=0;if(t.length>0){d=t[0].offset;const T=t[t.length-1];x=T.offset+T.size}const N=a-i,m=l+N*c+(N-1)*r,f=d,w=m-x;return{bottom:x,firstItemIndex:o,items:dn(t,n,o),offsetBottom:w,offsetTop:d,top:f,topItems:dn(s,n,o),topListHeight:s.reduce((T,j)=>j.size+T,0),totalCount:a}}function Eo(t,s,a,r,n,o){let i=0;if(a.groupIndices.length>0)for(const x of a.groupIndices){if(x-i>=t)break;i++}const l=t+i,c=cr(s,l),d=Array.from({length:l}).map((x,N)=>({data:o[N+c],index:N+c,offset:0,size:0}));return na(d,[],l,n,a,r)}function dn(t,s,a){if(t.length===0)return[];if(!ga(s))return t.map(d=>({...d,index:d.index+a,originalIndex:d.index}));const r=t[0].index,n=t[t.length-1].index,o=[],i=fs(s.groupOffsetTree,r,n);let l,c=0;for(const d of t){(!l||l.end{const T=Q([]),j=Q(0),h=ke(),y=Q(0);oe(o.topItemsIndexes,T);const k=ot(O(qe(f,w,xe(c,Ps),xe(n),xe(r),xe(d),x,xe(T),xe(s),xe(a),xe(y),t),he(([g,S,,I,,,,,,,,B])=>{const P=B!==void 0&&B.length!==I;return g&&!S&&!P}),Z(([,,[g,S],I,B,P,J,ne,X,te,se,$])=>{const Y=B,{offsetTree:E,sizeTree:U}=Y,W=Qe(j);if(I===0)return{...Ma,totalCount:I};if(g===0&&S===0)return W===0?{...Ma,totalCount:I}:Eo(W,P,B,X,te,$||[]);if(ze(U))return W>0?null:na(fc(cr(P,I),Y,$),[],I,te,Y,X);const ge=[];if(ne.length>0){const H=ne[0],q=ne[ne.length-1];let ae=0;for(const ee of fs(U,H,q)){const V=ee.value,pe=Math.max(ee.start,H),Me=Math.min(ee.end,q);for(let ye=pe;ye<=Me;ye++)ge.push({data:$?.[ye],index:ye,offset:ae,size:V}),ae+=V}}if(!J)return na([],ge,I,te,Y,X);const L=ne.length>0?ne[ne.length-1]+1:0,C=ac(E,g,S,L);if(C.length===0)return null;const G=I-1,F=pa([],H=>{for(const q of C){const ae=q.value;let ee=ae.offset,V=q.start;const pe=ae.size;if(ae.offset=S);ye++)H.push({data:$?.[ye],index:ye,offset:ee,size:pe}),ee+=pe+te}}),ie=mn(se,Gs),R=mn(se,Qs);if(F.length>0&&(ie>0||R>0)){const H=F[0],q=F[F.length-1];if(ie>0&&H.index>L){const ae=Math.min(ie,H.index-L),ee=[];let V=H.offset;for(let pe=H.index-1;pe>=H.index-ae;pe--){const Me=fs(U,pe,pe)[0]?.value??H.size;V-=Me+te,ee.unshift({data:$?.[pe],index:pe,offset:V,size:Me})}F.unshift(...ee)}if(R>0&&q.indexg!==null),_e()),Ma);oe(O(t,he(ar),Z(g=>g?.length)),n),oe(O(k,Z(g=>g.topListHeight)),N),oe(N,l),oe(O(k,Z(g=>[g.top,g.bottom])),i),oe(O(k,Z(g=>g.items)),h);const D=xt(O(k,he(({items:g})=>g.length>0),Se(n,t),he(([{items:g},S])=>g[g.length-1].originalIndex===S-1),Z(([,g,S])=>[g-1,S]),_e(Ps),Z(([g])=>g))),p=xt(O(k,$t(200),he(({items:g,topItems:S})=>g.length>0&&g[0].originalIndex===S.length),Z(({items:g})=>g[0].index),_e())),z=xt(O(k,he(({items:g})=>g.length>0),Z(({items:g})=>{let S=0,I=g.length-1;for(;g[S].type==="group"&&SS;)I--;return{endIndex:g[I].index,startIndex:g[S].index}}),_e(yo)));return{endReached:D,initialItemCount:j,itemsRendered:h,listState:k,minOverscanItemCount:y,rangeChanged:z,startReached:p,topItemsIndexes:T,...m}},He(At,ko,dr,Ws,Vs,qs,Wt,or),{singleton:!0}),Ro=Re(([{fixedFooterHeight:t,fixedHeaderHeight:s,footerHeight:a,headerHeight:r},{listState:n}])=>{const o=ke(),i=ot(O(qe(a,t,r,s,n),Z(([l,c,d,x,N])=>l+c+d+x+N.offsetBottom+N.bottom)),0);return oe(xe(i),o),{totalListHeight:i,totalListHeightChanged:o}},He(ct,ns),{singleton:!0}),pc=Re(([{viewportHeight:t},{totalListHeight:s}])=>{const a=Q(!1),r=ot(O(qe(a,t,s),he(([n])=>n),Z(([,n,o])=>Math.max(0,n-o)),$t(0),_e()),0);return{alignToBottom:a,paddingTopAddition:r}},He(ct,Ro),{singleton:!0}),Mo=Re(()=>({context:Q(null)})),gc=({itemBottom:t,itemTop:s,locationParams:{align:a,behavior:r,...n},viewportBottom:o,viewportTop:i})=>so?{...n,align:a??"end",...r!==void 0?{behavior:r}:{}}:null,Ao=Re(([{gap:t,sizes:s,totalCount:a},{fixedFooterHeight:r,fixedHeaderHeight:n,headerHeight:o,scrollingInProgress:i,scrollTop:l,viewportHeight:c},{scrollToIndex:d}])=>{const x=ke();return oe(O(x,Se(s,c,a,o,n,r,l),Se(t),Z(([[N,m,f,w,T,j,h,y],k])=>{const{calculateViewLocation:D=gc,done:p,...z}=N,g=Co(N,m,w-1),S=_s(g,m.offsetTree,k)+T+j,I=S+Ct(m.sizeTree,g)[1],B=y+j,P=y+f-h,J=D({itemBottom:I,itemTop:S,locationParams:z,viewportBottom:P,viewportTop:B});return J!==null?p&&wt(O(i,he(ne=>!ne),as(Qe(i)?1:2)),p):p?.(),J}),he(N=>N!==null)),d),{scrollIntoView:x}},He(At,ct,Vs,ns,Vt),{singleton:!0});function un(t){return t===!1?!1:t==="smooth"?"smooth":"auto"}const bc=(t,s)=>typeof t=="function"?un(t(s)):s&&un(t),vc=Re(([{listRefresh:t,totalCount:s,fixedItemSize:a,data:r},{atBottomState:n,isAtBottom:o},{scrollToIndex:i},{scrolledToInitialItem:l},{didMount:c,propsReady:d},{log:x},{scrollingInProgress:N},{context:m},{scrollIntoView:f}])=>{const w=Q(!1),T=ke();let j=null;function h(p){we(i,{align:"end",behavior:p,index:"LAST"})}Ae(O(qe(O(xe(s),as(1)),c),Se(xe(w),o,l,N),Z(([[p,z],g,S,I,B])=>{let P=z&&I,J="auto";return P&&(J=bc(g,S||B),P=P&&J!==!1),{followOutputBehavior:J,shouldFollow:P,totalCount:p}}),he(({shouldFollow:p})=>p)),({followOutputBehavior:p,totalCount:z})=>{j!==null&&(j(),j=null),Qe(a)!==void 0?requestAnimationFrame(()=>{Qe(x)("following output to ",{totalCount:z},Xe.DEBUG),h(p)}):j=wt(t,()=>{Qe(x)("following output to ",{totalCount:z},Xe.DEBUG),h(p),j=null})});function y(p){const z=wt(n,g=>{p&&!g.atBottom&&g.notAtBottomBecause==="SIZE_INCREASED"&&j===null&&(Qe(x)("scrolling to bottom due to increased size",{},Xe.DEBUG),h("auto"))});setTimeout(z,100)}Ae(O(qe(xe(w),s,d),he(([p,,z])=>p!==!1&&z),It(({value:p},[,z])=>({refreshed:p===z,value:z}),{refreshed:!1,value:0}),he(({refreshed:p})=>p),Se(w,s)),([,p])=>{Qe(l)&&y(p!==!1)}),Ae(T,()=>{y(Qe(w)!==!1)}),Ae(qe(xe(w),n),([p,z])=>{p!==!1&&!z.atBottom&&z.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")});const k=Q(null),D=ke();return oe(Ua(O(xe(r),Z(p=>p?.length??0)),O(xe(s))),D),Ae(O(qe(O(D,as(1)),c),Se(xe(k),l,N,m),Z(([[p,z],g,S,I,B])=>z&&S&&g?.({context:B,totalCount:p,scrollingInProgress:I})),he(p=>!!p),$t(0)),p=>{j!==null&&(j(),j=null),Qe(a)!==void 0?requestAnimationFrame(()=>{Qe(x)("scrolling into view",{}),we(f,p)}):j=wt(t,()=>{Qe(x)("scrolling into view",{}),we(f,p),j=null})}),{autoscrollToBottom:T,followOutput:w,scrollIntoViewOnChange:k}},He(At,qs,Vs,Ws,Wt,Vt,ct,Mo,Ao)),Nc=Re(([{data:t,firstItemIndex:s,gap:a,sizes:r},{initialTopMostItemIndex:n},{initialItemCount:o,listState:i},{didMount:l}])=>(oe(O(l,Se(o),he(([,c])=>c!==0),Se(n,r,s,a,t),Z(([[,c],d,x,N,m,f=[]])=>Eo(c,d,x,N,m,f))),i),{}),He(At,Ws,ns,Wt),{singleton:!0}),jc=Re(([{didMount:t},{scrollTo:s},{listState:a}])=>{const r=Q(0);return Ae(O(t,Se(r),he(([,n])=>n!==0),Z(([,n])=>({top:n}))),n=>{wt(O(a,as(1),he(o=>o.items.length>1)),()=>{requestAnimationFrame(()=>{we(s,n)})})}),{initialScrollTop:r}},He(Wt,ct,ns),{singleton:!0}),Lo=Re(([{scrollVelocity:t}])=>{const s=Q(!1),a=ke(),r=Q(!1);return oe(O(t,Se(r,s,a),he(([n,o])=>o!==!1&&o!==void 0),Z(([n,o,i,l])=>{const{enter:c,exit:d}=o;if(i){if(d(n,l))return!1}else if(c(n,l))return!0;return i}),_e()),s),Ae(O(qe(s,t,a),Se(r)),([[n,o,i],l])=>{n&&l!==!1&&l!==void 0&&l.change&&l.change(o,i)}),{isSeeking:s,scrollSeekConfiguration:r,scrollSeekRangeChanged:a,scrollVelocity:t}},He(qs),{singleton:!0}),mr=Re(([{scrollContainerState:t,scrollTo:s}])=>{const a=ke(),r=ke(),n=ke(),o=Q(!1),i=Q(void 0);return oe(O(qe(a,r),Z(([{scrollTop:l,viewportHeight:c},{offsetTop:d,listHeight:x}])=>({scrollHeight:x,scrollTop:Math.max(0,l-d),viewportHeight:c}))),t),oe(O(s,Se(r),Z(([l,{offsetTop:c}])=>({...l,top:l.top+c}))),n),{customScrollParent:i,useWindowScroll:o,windowScrollContainerState:a,windowScrollTo:n,windowViewportRect:r}},He(ct)),yc=Re(([{sizeRanges:t,sizes:s},{headerHeight:a,scrollTop:r},{initialTopMostItemIndex:n},{didMount:o},{useWindowScroll:i,windowScrollContainerState:l,windowViewportRect:c}])=>{const d=ke(),x=Q(void 0),N=Q(null),m=Q(null);return oe(l,N),oe(c,m),Ae(O(d,Se(s,r,i,N,m,a)),([f,w,T,j,h,y,k])=>{const D=nc(w.sizeTree);j&&h!==null&&y!==null&&(T=h.scrollTop-y.offsetTop),T-=k,f({ranges:D,scrollTop:T})}),oe(O(x,he(ar),Z(wc)),n),oe(O(o,Se(x),he(([,f])=>f!==void 0),_e(),Z(([,f])=>f.ranges)),t),{getState:d,restoreStateFrom:x}},He(At,ct,Ws,Wt,mr));function wc(t){return{align:"start",index:0,offset:t.scrollTop}}const Sc=Re(([{topItemsIndexes:t}])=>{const s=Q(0);return oe(O(s,he(a=>a>=0),Z(a=>Array.from({length:a}).map((r,n)=>n))),t),{topItemCount:s}},He(ns));function Do(t){let s=!1,a;return(()=>(s||(s=!0,a=t()),a))}const Cc=Do(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),kc=Re(([{deviation:t,scrollBy:s,scrollingInProgress:a,scrollTop:r},{isAtBottom:n,isScrolling:o,lastJumpDueToItemResize:i,scrollDirection:l},{listState:c},{beforeUnshiftWith:d,gap:x,shiftWithOffset:N,sizes:m},{log:f},{recalcInProgress:w}])=>{const T=xt(O(c,Se(i),It(([,h,y,k],[{bottom:D,items:p,offsetBottom:z,totalCount:g},S])=>{const I=D+z;let B=0;return y===g&&h.length>0&&p.length>0&&(p[0].originalIndex===0&&h[0].originalIndex===0||(B=I-k,B!==0&&(B+=S))),[B,p,g,I]},[0,[],0,0]),he(([h])=>h!==0),Se(r,l,a,n,f,w),he(([,h,y,k,,,D])=>!D&&!k&&h!==0&&y===Hs),Z(([[h],,,,,y])=>(y("Upward scrolling compensation",{amount:h},Xe.DEBUG),h))));function j(h){h>0?(we(s,{behavior:"auto",top:-h}),we(t,0)):(we(t,0),we(s,{behavior:"auto",top:-h}))}return Ae(O(T,Se(t,o)),([h,y,k])=>{k&&Cc()?we(t,y-h):j(-h)}),Ae(O(qe(ot(o,!1),t,w),he(([h,y,k])=>!h&&!k&&y!==0),Z(([h,y])=>y),$t(1)),j),oe(O(N,Z(h=>({top:-h}))),s),Ae(O(d,Se(m,x),Z(([h,{groupIndices:y,lastSize:k,sizeTree:D},p])=>{function z(P){return P*(k+p)}if(y.length===0)return z(h);let g=0;const S=Os(D,0);let I=0,B=0;for(;Ih&&(g-=S,P=h-I+1),I+=P,g+=z(P),B++}return g})),h=>{we(t,h),requestAnimationFrame(()=>{we(s,{top:h}),requestAnimationFrame(()=>{we(t,0),we(w,!1)})})}),{deviation:t}},He(ct,qs,ns,At,Vt,or)),Tc=Re(([t,s,a,r,n,o,i,l,c,d,x])=>({...t,...s,...a,...r,...n,...o,...i,...l,...c,...d,...x}),He(dr,Nc,Wt,Lo,Ro,jc,pc,mr,Ao,Vt,Mo)),zo=Re(([{data:t,defaultItemSize:s,firstItemIndex:a,fixedItemSize:r,fixedGroupSize:n,gap:o,groupIndices:i,heightEstimates:l,itemSize:c,sizeRanges:d,sizes:x,statefulTotalCount:N,totalCount:m,trackItemSizes:f},{initialItemFinalLocationReached:w,initialTopMostItemIndex:T,scrolledToInitialItem:j},h,y,k,D,{scrollToIndex:p},z,{topItemCount:g},{groupCounts:S},I])=>{const{listState:B,minOverscanItemCount:P,topItemsIndexes:J,rangeChanged:ne,...X}=D;return oe(ne,I.scrollSeekRangeChanged),oe(O(I.windowViewportRect,Z(te=>te.visibleHeight)),h.viewportHeight),{data:t,defaultItemHeight:s,firstItemIndex:a,fixedItemHeight:r,fixedGroupHeight:n,gap:o,groupCounts:S,heightEstimates:l,initialItemFinalLocationReached:w,initialTopMostItemIndex:T,scrolledToInitialItem:j,sizeRanges:d,topItemCount:g,topItemsIndexes:J,totalCount:m,...k,groupIndices:i,itemSize:c,listState:B,minOverscanItemCount:P,scrollToIndex:p,statefulTotalCount:N,trackItemSizes:f,rangeChanged:ne,...X,...I,...h,sizes:x,...y}},He(At,Ws,ct,yc,vc,ns,Vs,kc,Sc,ko,Tc));function Ic(t,s){const a={},r={};let n=0;const o=t.length;for(;n(h[y]=k=>{const D=j[s.methods[y]];we(D,k)},h),{})}function x(j){return i.reduce((h,y)=>(h[y]=Ql(j[s.events[y]]),h),{})}const N=re.forwardRef(function(j,h){const{children:y,...k}=j,[D]=re.useState(()=>pa(Vl(t),g=>{c(g,k)})),[p]=re.useState(tn(x,D));Js(()=>{for(const g of i)g in k&&Ae(p[g],k[g]);return()=>{Object.values(p).map(rr)}},[k,p,D]),Js(()=>{c(D,k)}),re.useImperativeHandle(h,en(d(D)));const z=a;return e.jsx(l.Provider,{value:D,children:a!==void 0?e.jsx(z,{...Ic([...r,...n,...i],k),children:y}):y})}),m=j=>{const h=re.useContext(l);return re.useCallback(y=>{we(h[j],y)},[h,j])},f=j=>{const h=re.useContext(l)[j],y=re.useCallback(k=>Ae(h,k),[h]);return re.useSyncExternalStore(y,()=>Qe(h),()=>Qe(h))},w=j=>{const h=re.useContext(l)[j],[y,k]=re.useState(tn(Qe,h));return Js(()=>Ae(h,D=>{D!==y&&k(en(D))}),[h,y]),y},T=parseInt(re.version)>=18?f:w;return{Component:N,useEmitter:(j,h)=>{const y=re.useContext(l)[j];Js(()=>Ae(y,h),[h,y])},useEmitterValue:T,usePublisher:m}}const Bo=re.createContext(void 0),$o=re.createContext(void 0),Aa="-webkit-sticky",xn="sticky",ur=Do(()=>{if(typeof document>"u")return xn;const t=document.createElement("div");return t.style.position=Aa,t.style.position===Aa?Aa:xn}),Oo=typeof document<"u"?re.useLayoutEffect:re.useEffect;function La(t){return"self"in t}function Ec(t){return"body"in t}function Po(t,s,a,r=Ns,n,o){const i=re.useRef(null),l=re.useRef(null),c=re.useRef(null),d=re.useCallback(m=>{let f,w,T;const j=m.target;if(Ec(j)||La(j)){const y=La(j)?j:j.defaultView;T=o===!0?y.scrollX:y.scrollY,f=o===!0?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight,w=o===!0?y.innerWidth:y.innerHeight}else T=o===!0?j.scrollLeft:j.scrollTop,f=o===!0?j.scrollWidth:j.scrollHeight,w=o===!0?j.offsetWidth:j.offsetHeight;const h=()=>{t({scrollHeight:f,scrollTop:Math.max(T,0),viewportHeight:w})};m.suppressFlushSync===!0?h():Ti.flushSync(h),l.current!==null&&(T===l.current||T<=0||T===f-w)&&(l.current=null,s(!0),c.current&&(clearTimeout(c.current),c.current=null))},[t,s,o]);re.useEffect(()=>{const m=n||i.current;return r(n||i.current),d({suppressFlushSync:!0,target:m}),m.addEventListener("scroll",d,{passive:!0}),()=>{r(null),m.removeEventListener("scroll",d)}},[i,d,a,r,n]);function x(m){const f=i.current;if(!f||(o===!0?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const w=m.behavior==="smooth";let T,j,h;La(f)?(j=Math.max(Qt(f.document.documentElement,o===!0?"width":"height"),o===!0?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),T=o===!0?f.innerWidth:f.innerHeight,h=o===!0?window.scrollX:window.scrollY):(j=f[o===!0?"scrollWidth":"scrollHeight"],T=Qt(f,o===!0?"width":"height"),h=f[o===!0?"scrollLeft":"scrollTop"]);const y=j-T;if(m.top=Math.ceil(Math.max(Math.min(y,m.top),0)),Io(T,j)||m.top===h){t({scrollHeight:j,scrollTop:h,viewportHeight:T}),w&&s(!0);return}w?(l.current=m.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,l.current=null,s(!0)},1e3)):l.current=null,o===!0&&(m={...m.behavior!==void 0?{behavior:m.behavior}:{},left:m.top}),f.scrollTo(m)}function N(m){o===!0&&(m={...m.behavior!==void 0?{behavior:m.behavior}:{},...m.top!==void 0?{left:m.top}:{}}),i.current.scrollBy(m)}return{scrollByCallback:N,scrollerRef:i,scrollToCallback:x}}function xr(t){return t}const Rc=Re(()=>{const t=Q(l=>`Item ${l}`),s=Q(l=>`Group ${l}`),a=Q({}),r=Q(xr),n=Q("div"),o=Q(Ns),i=(l,c=null)=>ot(O(a,Z(d=>d[l]),_e()),c);return{components:a,computeItemKey:r,EmptyPlaceholder:i("EmptyPlaceholder"),FooterComponent:i("Footer"),GroupComponent:i("Group","div"),groupContent:s,HeaderComponent:i("Header"),HeaderFooterTag:n,ItemComponent:i("Item","div"),itemContent:t,ListComponent:i("List","div"),ScrollerComponent:i("Scroller","div"),scrollerRef:o,ScrollSeekPlaceholder:i("ScrollSeekPlaceholder"),TopItemListComponent:i("TopItemList")}}),Mc=Re(([t,s])=>({...t,...s}),He(zo,Rc)),Ac=({height:t})=>e.jsx("div",{style:{height:t}}),Lc={overflowAnchor:"none",position:ur(),zIndex:1},_o={overflowAnchor:"none"},Dc={..._o,display:"inline-block",height:"100%"},hn=re.memo(function({showTopList:t=!1}){const s=ve("listState"),a=gt("sizeRanges"),r=ve("useWindowScroll"),n=ve("customScrollParent"),o=gt("windowScrollContainerState"),i=gt("scrollContainerState"),l=n||r?o:i,c=ve("itemContent"),d=ve("context"),x=ve("groupContent"),N=ve("trackItemSizes"),m=ve("itemSize"),f=ve("log"),w=gt("gap"),T=ve("horizontalDirection"),{callbackRef:j}=Yl(a,m,N,t?Ns:l,f,w,n,T,ve("skipAnimationFrameInResizeObserver")),[h,y]=re.useState(0);fr("deviation",X=>{h!==X&&y(X)});const k=ve("EmptyPlaceholder"),D=ve("ScrollSeekPlaceholder")??Ac,p=ve("ListComponent"),z=ve("ItemComponent"),g=ve("GroupComponent"),S=ve("computeItemKey"),I=ve("isSeeking"),B=ve("groupIndices").length>0,P=ve("alignToBottom"),J=ve("initialItemFinalLocationReached"),ne=t?{}:{boxSizing:"border-box",...T?{display:"inline-block",height:"100%",marginLeft:h!==0?h:P?"auto":0,paddingLeft:s.offsetTop,paddingRight:s.offsetBottom,whiteSpace:"nowrap"}:{marginTop:h!==0?h:P?"auto":0,paddingBottom:s.offsetBottom,paddingTop:s.offsetTop},...J?{}:{visibility:"hidden"}};return!t&&s.totalCount===0&&k!==null&&k!==void 0?e.jsx(k,{...nt(k,d)}):e.jsx(p,{...nt(p,d),"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list",ref:j,style:ne,children:(t?s.topItems:s.items).map(X=>{const te=X.originalIndex,se=S(te+s.firstItemIndex,X.data,d);return I?b.createElement(D,{...nt(D,d),height:X.size,index:X.index,key:se,type:X.type||"item",...X.type==="group"?{}:{groupIndex:X.groupIndex}}):X.type==="group"?b.createElement(g,{...nt(g,d),"data-index":te,"data-item-index":X.index,"data-known-size":X.size,key:se,style:Lc},x(X.index,d)):b.createElement(z,{...nt(z,d),...$c(z,X.data),"data-index":te,"data-item-group-index":X.groupIndex,"data-item-index":X.index,"data-known-size":X.size,key:se,style:T?Dc:_o},B?c(X.index,X.groupIndex,X.data,d):c(X.index,X.data,d))})})}),zc={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Fc={outline:"none",overflowX:"auto",position:"relative"},hr=t=>({height:"100%",position:"absolute",top:0,width:"100%",...t?{display:"flex",flexDirection:"column"}:void 0}),Ho=(t,s,a=0)=>({...hr(t),position:s?"relative":"absolute",top:s?-a:0}),Bc={position:ur(),top:0,width:"100%",zIndex:1};function nt(t,s){if(typeof t!="string")return{context:s}}function $c(t,s){return{item:typeof t=="string"?void 0:s}}const Oc=re.memo(function(){const t=ve("HeaderComponent"),s=gt("headerHeight"),a=ve("HeaderFooterTag"),r=rs(re.useMemo(()=>o=>{s(Qt(o,"height"))},[s]),!0,ve("skipAnimationFrameInResizeObserver")),n=ve("context");return t!=null?e.jsx(a,{ref:r,children:e.jsx(t,{...nt(t,n)})}):null}),Pc=re.memo(function(){const t=ve("FooterComponent"),s=gt("footerHeight"),a=ve("HeaderFooterTag"),r=rs(re.useMemo(()=>o=>{s(Qt(o,"height"))},[s]),!0,ve("skipAnimationFrameInResizeObserver")),n=ve("context");return t!=null?e.jsx(a,{ref:r,children:e.jsx(t,{...nt(t,n)})}):null});function Go({useEmitter:t,useEmitterValue:s,usePublisher:a}){return re.memo(function({children:r,style:n,context:o,...i}){const l=a("scrollContainerState"),c=s("ScrollerComponent"),d=a("smoothScrollTargetReached"),x=s("scrollerRef"),N=s("horizontalDirection")||!1,{scrollByCallback:m,scrollerRef:f,scrollToCallback:w}=Po(l,d,c,x,void 0,N);return t("scrollTo",w),t("scrollBy",m),e.jsx(c,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...N?Fc:zc,...n},tabIndex:0,...i,...nt(c,o),children:r})})}function Qo({useEmitter:t,useEmitterValue:s,usePublisher:a}){return re.memo(function({children:r,style:n,context:o,...i}){const l=a("windowScrollContainerState"),c=s("ScrollerComponent"),d=a("smoothScrollTargetReached"),x=s("totalListHeight"),N=s("deviation"),m=s("customScrollParent"),f=re.useRef(null),w=s("scrollerRef"),{scrollByCallback:T,scrollerRef:j,scrollToCallback:h}=Po(l,d,c,w,m);return Oo(()=>(j.current=m||f.current?.ownerDocument.defaultView,()=>{j.current=null}),[j,m]),t("windowScrollTo",h),t("scrollBy",T),e.jsx(c,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...n,...x!==0?{height:x+N}:void 0},...i,...nt(c,o),children:r})})}const _c=({children:t})=>{const s=re.useContext(Bo),a=gt("viewportHeight"),r=gt("fixedItemHeight"),n=ve("alignToBottom"),o=ve("horizontalDirection"),i=re.useMemo(()=>ho(a,c=>Qt(c,o?"width":"height")),[a,o]),l=rs(i,!0,ve("skipAnimationFrameInResizeObserver"));return re.useEffect(()=>{s&&(a(s.viewportHeight),r(s.itemHeight))},[s,a,r]),e.jsx("div",{"data-viewport-type":"element",ref:l,style:hr(n),children:t})},Hc=({children:t})=>{const s=re.useContext(Bo),a=gt("windowViewportRect"),r=gt("fixedItemHeight"),n=ve("customScrollParent"),o=ve("useWindowScroll"),i=ve("topListHeight"),l=po(a,n,ve("skipAnimationFrameInResizeObserver")),c=ve("alignToBottom");return re.useEffect(()=>{s&&(r(s.itemHeight),a({listHeight:0,offsetTop:0,visibleHeight:s.viewportHeight,visibleWidth:100}))},[s,a,r]),e.jsx("div",{"data-viewport-type":"window",ref:l,style:Ho(c,o,i),children:t})},Gc=({children:t})=>{const s=ve("TopItemListComponent")??"div",a=ve("headerHeight"),r={...Bc,marginTop:`${a}px`},n=ve("context");return e.jsx(s,{style:r,...nt(s,n),children:t})},Qc=re.memo(function(t){const s=ve("useWindowScroll"),a=ve("topItemsIndexes").length>0,r=ve("customScrollParent"),n=ve("context");return e.jsxs(r||s?Wc:Vc,{...t,context:n,children:[a&&e.jsx(Gc,{children:e.jsx(hn,{showTopList:!0})}),e.jsxs(r||s?Hc:_c,{children:[e.jsx(Oc,{}),e.jsx(hn,{}),e.jsx(Pc,{})]})]})}),{Component:Uc,useEmitter:fr,useEmitterValue:ve,usePublisher:gt}=Fo(Mc,{optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},Qc),Vc=Go({useEmitter:fr,useEmitterValue:ve,usePublisher:gt}),Wc=Qo({useEmitter:fr,useEmitterValue:ve,usePublisher:gt}),qc=Uc,Yc=Re(()=>{const t=Q(d=>e.jsxs("td",{children:["Item $",d]})),s=Q(null),a=Q(d=>e.jsxs("td",{colSpan:1e3,children:["Group ",d]})),r=Q(null),n=Q(null),o=Q({}),i=Q(xr),l=Q(Ns),c=(d,x=null)=>ot(O(o,Z(N=>N[d]),_e()),x);return{components:o,computeItemKey:i,context:s,EmptyPlaceholder:c("EmptyPlaceholder"),FillerRow:c("FillerRow"),fixedFooterContent:n,fixedHeaderContent:r,itemContent:t,groupContent:a,ScrollerComponent:c("Scroller","div"),scrollerRef:l,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder"),TableBodyComponent:c("TableBody","tbody"),TableComponent:c("Table","table"),TableFooterComponent:c("TableFoot","tfoot"),TableHeadComponent:c("TableHead","thead"),TableRowComponent:c("TableRow","tr"),GroupComponent:c("Group","tr")}});He(zo,Yc);ur();const fn={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},Kc={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:pn,floor:ua,max:zs,min:Da,round:gn}=Math;function bn(t,s,a){return Array.from({length:s-t+1}).map((r,n)=>({data:a===null?null:a[n+t],index:n+t}))}function Xc(t){return{...Kc,items:t}}function Zs(t,s){return t!==void 0&&t.width===s.width&&t.height===s.height}function Jc(t,s){return t!==void 0&&t.column===s.column&&t.row===s.row}const Zc=Re(([{increaseViewportBy:t,listBoundary:s,overscan:a,visibleRange:r},{footerHeight:n,headerHeight:o,scrollBy:i,scrollContainerState:l,scrollTo:c,scrollTop:d,smoothScrollTargetReached:x,viewportHeight:N},m,f,{didMount:w,propsReady:T},{customScrollParent:j,useWindowScroll:h,windowScrollContainerState:y,windowScrollTo:k,windowViewportRect:D},p])=>{const z=Q(0),g=Q(0),S=Q(fn),I=Q({height:0,width:0}),B=Q({height:0,width:0}),P=ke(),J=ke(),ne=Q(0),X=Q(null),te=Q({column:0,row:0}),se=ke(),$=ke(),Y=Q(!1),E=Q(0),U=Q(!0),W=Q(!1),ge=Q(!1);Ae(O(w,Se(E),he(([R,H])=>H!==0)),()=>{we(U,!1)}),Ae(O(qe(w,U,B,I,E,W),he(([R,H,q,ae,,ee])=>R&&!H&&q.height!==0&&ae.height!==0&&!ee)),([,,,,R])=>{we(W,!0),lr(1,()=>{we(P,R)}),wt(O(d),()=>{we(s,[0,0]),we(U,!0)})}),oe(O($,he(R=>R!=null&&R.scrollTop>0),Tt(0)),g),Ae(O(w,Se($),he(([,R])=>R!=null)),([,R])=>{R&&(we(I,R.viewport),we(B,R.item),we(te,R.gap),R.scrollTop>0&&(we(Y,!0),wt(O(d,as(1)),H=>{we(Y,!1)}),we(c,{top:R.scrollTop})))}),oe(O(I,Z(({height:R})=>R)),N),oe(O(qe(xe(I,Zs),xe(B,Zs),xe(te,(R,H)=>R!==void 0&&R.column===H.column&&R.row===H.row),xe(d)),Z(([R,H,q,ae])=>({gap:q,item:H,scrollTop:ae,viewport:R}))),se),oe(O(qe(xe(z),r,xe(te,Jc),xe(B,Zs),xe(I,Zs),xe(X),xe(g),xe(Y),xe(U),xe(E)),he(([,,,,,,,R])=>!R),Z(([R,[H,q],ae,ee,V,pe,Me,,ye,De])=>{const{column:Ge,row:v}=ae,{height:_,width:le}=ee,{width:de}=V;if(Me===0&&(R===0||de===0))return fn;if(le===0){const Dt=cr(De,R),K=Dt+Math.max(Me-1,0);return Xc(bn(Dt,K,pe))}const Fe=Uo(de,le,Ge);let be,Oe;ye?H===0&&q===0&&Me>0?(be=0,Oe=Me-1):(be=Fe*ua((H+v)/(_+v)),Oe=Fe*pn((q+v)/(_+v))-1,Oe=Da(R-1,zs(Oe,Fe-1)),be=Da(Oe,zs(0,be))):(be=0,Oe=-1);const Ue=bn(be,Oe,pe),{bottom:Ne,top:it}=vn(V,ae,ee,Ue),ht=pn(R/Fe),Lt=ht*_+(ht-1)*v-Ne;return{bottom:Ne,itemHeight:_,items:Ue,itemWidth:le,offsetBottom:Lt,offsetTop:it,top:it}})),S),oe(O(X,he(R=>R!==null),Z(R=>R.length)),z),oe(O(qe(I,B,S,te),he(([R,H,{items:q}])=>q.length>0&&H.height!==0&&R.height!==0),Z(([R,H,{items:q},ae])=>{const{bottom:ee,top:V}=vn(R,ae,H,q);return[V,ee]}),_e(Ps)),s);const L=Q(!1);oe(O(d,Se(L),Z(([R,H])=>H||R!==0)),L);const C=xt(O(qe(S,z),he(([{items:R}])=>R.length>0),Se(L),he(([[R,H],q])=>{const ae=R.items[R.items.length-1].index===H-1;return(q||R.bottom>0&&R.itemHeight>0&&R.offsetBottom===0&&R.items.length===H)&&ae}),Z(([[,R]])=>R-1),_e())),G=xt(O(xe(S),he(({items:R})=>R.length>0&&R[0].index===0),Tt(0),_e())),F=xt(O(xe(S),Se(Y),he(([{items:R},H])=>R.length>0&&!H),Z(([{items:R}])=>({endIndex:R[R.length-1].index,startIndex:R[0].index})),_e(yo),$t(0)));oe(F,f.scrollSeekRangeChanged),oe(O(P,Se(I,B,z,te),Z(([R,H,q,ae,ee])=>{const V=To(R),{align:pe,behavior:Me,offset:ye}=V;let De=V.index;De==="LAST"&&(De=ae-1),De=zs(0,De,Da(ae-1,De));let Ge=Ka(H,ee,q,De);return pe==="end"?Ge=gn(Ge-H.height+q.height):pe==="center"&&(Ge=gn(Ge-H.height/2+q.height/2)),ye!==void 0&&ye!==0&&(Ge+=ye),{behavior:Me,top:Ge}})),c);const ie=ot(O(S,Z(R=>R.offsetBottom+R.bottom)),0);return oe(O(D,Z(R=>({height:R.visibleHeight,width:R.visibleWidth}))),I),{customScrollParent:j,data:X,deviation:ne,footerHeight:n,gap:te,headerHeight:o,increaseViewportBy:t,initialItemCount:g,itemDimensions:B,overscan:a,restoreStateFrom:$,scrollBy:i,scrollContainerState:l,scrollHeight:J,scrollTo:c,scrollToIndex:P,scrollTop:d,smoothScrollTargetReached:x,totalCount:z,useWindowScroll:h,viewportDimensions:I,windowScrollContainerState:y,windowScrollTo:k,windowViewportRect:D,...f,gridState:S,horizontalDirection:ge,initialTopMostItemIndex:E,totalListHeight:ie,...m,endReached:C,propsReady:T,rangeChanged:F,startReached:G,stateChanged:se,stateRestoreInProgress:Y,...p}},He(dr,ct,qs,Lo,Wt,mr,Vt));function Uo(t,s,a){return zs(1,ua((t+a)/(ua(s)+a)))}function vn(t,s,a,r){const{height:n}=a;if(n===void 0||r.length===0)return{bottom:0,top:0};const o=Ka(t,s,a,r[0].index);return{bottom:Ka(t,s,a,r[r.length-1].index)+n,top:o}}function Ka(t,s,a,r){const n=Uo(t.width,a.width,s.column),o=ua(r/n),i=o*a.height+zs(0,o-1)*s.row;return i>0?i+s.row:i}const ed=Re(()=>{const t=Q(N=>`Item ${N}`),s=Q({}),a=Q(null),r=Q("virtuoso-grid-item"),n=Q("virtuoso-grid-list"),o=Q(xr),i=Q("div"),l=Q(Ns),c=(N,m=null)=>ot(O(s,Z(f=>f[N]),_e()),m),d=Q(!1),x=Q(!1);return oe(xe(x),d),{components:s,computeItemKey:o,context:a,FooterComponent:c("Footer"),HeaderComponent:c("Header"),headerFooterTag:i,itemClassName:r,ItemComponent:c("Item","div"),itemContent:t,listClassName:n,ListComponent:c("List","div"),readyStateChanged:d,reportReadyState:x,ScrollerComponent:c("Scroller","div"),scrollerRef:l,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),td=Re(([t,s])=>({...t,...s}),He(Zc,ed)),sd=re.memo(function(){const t=Pe("gridState"),s=Pe("listClassName"),a=Pe("itemClassName"),r=Pe("itemContent"),n=Pe("computeItemKey"),o=Pe("isSeeking"),i=bt("scrollHeight"),l=Pe("ItemComponent"),c=Pe("ListComponent"),d=Pe("ScrollSeekPlaceholder"),x=Pe("context"),N=bt("itemDimensions"),m=bt("gap"),f=Pe("log"),w=Pe("stateRestoreInProgress"),T=bt("reportReadyState"),j=rs(re.useMemo(()=>h=>{const y=h.parentElement.parentElement.scrollHeight;i(y);const k=h.firstChild;if(k!==null){const{height:D,width:p}=k.getBoundingClientRect();N({height:D,width:p})}m({column:Nn("column-gap",getComputedStyle(h).columnGap,f),row:Nn("row-gap",getComputedStyle(h).rowGap,f)})},[i,N,m,f]),!0,!1);return Oo(()=>{t.itemHeight>0&&t.itemWidth>0&&T(!0)},[t]),w?null:e.jsx(c,{className:s,ref:j,...nt(c,x),"data-testid":"virtuoso-item-list",style:{paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},children:t.items.map(h=>{const y=n(h.index,h.data,x);return o?e.jsx(d,{...nt(d,x),height:t.itemHeight,index:h.index,width:t.itemWidth},y):b.createElement(l,{...nt(l,x),className:a,"data-index":h.index,key:y},r(h.index,h.data,x))})})}),ad=re.memo(function(){const t=Pe("HeaderComponent"),s=bt("headerHeight"),a=Pe("headerFooterTag"),r=rs(re.useMemo(()=>o=>{s(Qt(o,"height"))},[s]),!0,!1),n=Pe("context");return t!=null?e.jsx(a,{ref:r,children:e.jsx(t,{...nt(t,n)})}):null}),rd=re.memo(function(){const t=Pe("FooterComponent"),s=bt("footerHeight"),a=Pe("headerFooterTag"),r=rs(re.useMemo(()=>o=>{s(Qt(o,"height"))},[s]),!0,!1),n=Pe("context");return t!=null?e.jsx(a,{ref:r,children:e.jsx(t,{...nt(t,n)})}):null}),nd=({children:t})=>{const s=re.useContext($o),a=bt("itemDimensions"),r=bt("viewportDimensions"),n=rs(re.useMemo(()=>o=>{r(o.getBoundingClientRect())},[r]),!0,!1);return re.useEffect(()=>{s&&(r({height:s.viewportHeight,width:s.viewportWidth}),a({height:s.itemHeight,width:s.itemWidth}))},[s,r,a]),e.jsx("div",{ref:n,style:hr(!1),children:t})},od=({children:t})=>{const s=re.useContext($o),a=bt("windowViewportRect"),r=bt("itemDimensions"),n=Pe("customScrollParent"),o=Pe("useWindowScroll"),i=po(a,n,!1);return re.useEffect(()=>{s&&(r({height:s.itemHeight,width:s.itemWidth}),a({listHeight:0,offsetTop:0,visibleHeight:s.viewportHeight,visibleWidth:s.viewportWidth}))},[s,a,r]),e.jsx("div",{ref:i,style:Ho(!1,o),children:t})},id=re.memo(function({...t}){const s=Pe("useWindowScroll"),a=Pe("customScrollParent"),r=a||s?cd:ld,n=a||s?od:nd,o=Pe("context");return e.jsx(r,{...t,...nt(r,o),children:e.jsxs(n,{children:[e.jsx(ad,{}),e.jsx(sd,{}),e.jsx(rd,{})]})})}),{useEmitter:Vo,useEmitterValue:Pe,usePublisher:bt}=Fo(td,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},id),ld=Go({useEmitter:Vo,useEmitterValue:Pe,usePublisher:bt}),cd=Qo({useEmitter:Vo,useEmitterValue:Pe,usePublisher:bt});function Nn(t,s,a){return s!=="normal"&&s?.endsWith("px")!==!0&&a(`${t} was not resolved to pixel value correctly`,s,Xe.WARN),s==="normal"?0:parseInt(s??"0",10)}function jn(t){if(Array.isArray(t)){if(t.length<5||t.length>6)throw new Error(`Invalid bone format: expected [x,y,w,h,r,c?] but got ${t.length} elements`);const s=t;return{x:s[0],y:s[1],w:s[2],h:s[3],r:s[4],c:s[5]||void 0}}return t}const yn=new Set(["p","h1","h2","h3","h4","h5","h6","li","td","th"]);function dd(t,s="component",a){const r=t.getBoundingClientRect(),n=[],o=a?.leafTags?new Set([...yn,...a.leafTags]):yn,i=a?.captureRoundedBorders??!0,l=a?.excludeTags?new Set(a.excludeTags):null,c=a?.excludeSelectors??null;function d(x){const N=getComputedStyle(x);if(N.display==="none"||N.visibility==="hidden"||N.opacity==="0")return;const m=x.tagName.toLowerCase();if(l?.has(m)||c?.some(I=>x.matches(I)))return;const f=[...x.children].filter(I=>{const B=getComputedStyle(I);return B.display!=="none"&&B.visibility!=="hidden"&&B.opacity!=="0"}),w=m==="img"||m==="svg"||m==="video"||m==="canvas",T=m==="input"||m==="button"||m==="textarea"||m==="select",j=f.length===0||w||T||o.has(m),h=N.backgroundColor,y=h!=="rgba(0, 0, 0, 0)"&&h!=="transparent",k=N.backgroundImage!=="none",D=parseFloat(N.borderTopWidth)||0,p=i&&D>0&&N.borderTopColor!=="rgba(0, 0, 0, 0)"&&N.borderTopColor!=="transparent",z=(parseFloat(N.borderTopLeftRadius)||0)>0,g=y||k||p&&z,S=m==="tr"||m==="td"||m==="th"||m==="thead"||m==="tbody"||m==="table";if(j){const I=x.getBoundingClientRect();if(I.width<1||I.height<1)return;const B=w&&I.width>0&&I.height>0&&Math.abs(I.width-I.height)<4,P=S?0:B?"50%":wn(N,x)??8,J=r.width;n.push({x:J>0?+((I.left-r.left)/J*100).toFixed(4):0,y:Math.round(I.top-r.top),w:J>0?+(I.width/J*100).toFixed(4):0,h:Math.round(I.height),r:P});return}if(g){const I=x.getBoundingClientRect();if(I.width>=1&&I.height>=1){const B=S?0:wn(N,x)??8,P=r.width;n.push({x:P>0?+((I.left-r.left)/P*100).toFixed(4):0,y:Math.round(I.top-r.top),w:P>0?+(I.width/P*100).toFixed(4):0,h:Math.round(I.height),r:B,c:!0})}}for(const I of f)d(I)}for(const x of t.children)d(x);return{name:s,viewportWidth:Math.round(r.width),width:Math.round(r.width),height:Math.round(r.height),bones:n}}function wn(t,s){const a=parseFloat(t.borderTopLeftRadius)||0,r=parseFloat(t.borderTopRightRadius)||0,n=parseFloat(t.borderBottomRightRadius)||0,o=parseFloat(t.borderBottomLeftRadius)||0;if(a===0&&r===0&&n===0&&o===0)return;const i=s?(()=>{const d=s.getBoundingClientRect();return d.width>0&&d.height>0&&Math.abs(d.width-d.height)<4})():!1;return t.borderRadius==="50%"?"50%":Math.max(a,r,n,o)>9998?i?"50%":9999:a===r&&r===n&&n===o?a!==8?a:void 0:`${a}px ${r}px ${n}px ${o}px`}const md=new Map;function ud(t){return md.get(t)}function xd(){typeof window<"u"&&window.__BONEYARD_BUILD&&(window.__BONEYARD_SNAPSHOT=dd)}function hd(){return typeof window<"u"&&window.__BONEYARD_BUILD===!0}function fd(t,s){if(!("breakpoints"in t))return t;const a=Object.keys(t.breakpoints).map(Number).sort((n,o)=>n-o);if(a.length===0)return null;const r=[...a].reverse().find(n=>s>=n)??a[0];return t.breakpoints[r]??null}const ls={angle:110,start:30,end:70,speed:"2s",lightHighlight:"#f7f7f7",darkHighlight:"#2c2c2c"},Es={speed:"1.8s",lightAdjust:.3,darkAdjust:.02},Sn={web:{light:"#f0f0f0",dark:"#222222"}},pd=/rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*(?:,\s*([\d.]+))?\s*\)/;function Cn(t,s){const a=t.match(pd);if(a){const[,r,n,o,i="1"]=a,l=Math.min(1,parseFloat(i)+s*.5);return`rgba(${r},${n},${o},${l.toFixed(3)})`}if(t.startsWith("#")&&t.length>=7){const r=parseInt(t.slice(1,3),16),n=parseInt(t.slice(3,5),16),o=parseInt(t.slice(5,7),16);if(!isNaN(r)&&!isNaN(n)&&!isNaN(o)){const i=Math.round(r+(255-r)*s),l=Math.round(n+(255-n)*s),c=Math.round(o+(255-o)*s);return`#${i.toString(16).padStart(2,"0")}${l.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`}}return t}xd();let kt={};function oa({loading:t,children:s,name:a,initialBones:r,color:n,darkColor:o,animate:i,stagger:l=!1,transition:c=!1,boneClass:d,className:x,fallback:N,fixture:m,snapshotConfig:f}){const w=b.useRef(null),T=b.useRef(Math.random().toString(36).slice(2,8)).current,[j,h]=b.useState(0),[y,k]=b.useState(0),[D,p]=b.useState(!1);b.useEffect(()=>{if(typeof window>"u")return;const q=()=>{const V=document.documentElement.classList.contains("dark")||!!w.current?.closest(".dark");p(V)};q();const ae=new MutationObserver(q);ae.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]});const ee=window.matchMedia("(prefers-color-scheme: dark)");return ee.addEventListener("change",q),()=>{ae.disconnect(),ee.removeEventListener("change",q)}},[]);const z=n??kt.color??Sn.web.light,g=o??kt.darkColor??Sn.web.dark,S=D?g:z,I=i??kt.animate??"pulse",B=I===!0?"pulse":I===!1?"solid":I;b.useEffect(()=>{const q=w.current;if(!q)return;const ae=new ResizeObserver(V=>{const pe=V[0]?.contentRect;h(Math.round(pe?.width??0)),pe&&pe.height>0&&k(Math.round(pe.height))});ae.observe(q);const ee=q.getBoundingClientRect();return h(Math.round(ee.width)),ee.height>0&&k(Math.round(ee.height)),()=>ae.disconnect()},[]);const P={};if(a&&(P["data-boneyard"]=a,f&&(P["data-boneyard-config"]=JSON.stringify(f))),hd())return e.jsx("div",{ref:w,className:x,style:{position:"relative"},...P,children:e.jsx("div",{children:m??s})});const[J,ne]=b.useState(!1);b.useLayoutEffect(()=>{ne(!0)},[]);const X=r??(a?ud(a):void 0),te=J&&typeof window<"u"?window.innerWidth:0,se=j>0?j:te,$=X&&se>0?fd(X,se):null,Y=d??kt.boneClass,E=(()=>{const q=l??kt.stagger;return q===!0?80:q===!1||!q?0:q})(),U=(()=>{const q=c??kt.transition;return q===!0?300:q===!1||!q?0:q})(),[W,ge]=b.useState(!1),L=b.useRef(t),C=b.useRef(null);b.useEffect(()=>(L.current&&!t&&U>0&&$&&(C.current&&clearTimeout(C.current),ge(!0),C.current=setTimeout(()=>{ge(!1),C.current=null},U)),L.current=t,()=>{C.current&&clearTimeout(C.current)}),[t,U,$]);const G=(t||W)&&$,F=t&&!$&&!W,ie=y>0?y:$?.height??0,R=$?.height??0,H=ie>0&&R>0?ie/R:1;return e.jsxs("div",{ref:w,className:x,style:{position:"relative"},...P,children:[e.jsx("div",{"data-boneyard-content":"true",style:G&&!W?{visibility:"hidden"}:void 0,children:F?N:s}),G&&e.jsx("div",{"data-boneyard-overlay":"true",style:{position:"absolute",inset:0,overflow:"hidden",opacity:W?0:1,transition:U>0?`opacity ${U}ms ease-out`:void 0},children:e.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},children:[$.bones.filter(q=>!jn(q).c).map((q,ae)=>{const ee=jn(q),V=S;Cn(S,D?Es.darkAdjust:Es.lightAdjust);const pe=ee.w/100*($.width??0),Me=ee.r==="50%"&&Math.abs(pe-ee.h)<4,ye={position:"absolute",left:`${ee.x}%`,top:ee.y*H,width:Me?ee.h*H:`${ee.w}%`,height:ee.h*H,borderRadius:typeof ee.r=="string"?ee.r:`${ee.r}px`,backgroundColor:V},De=kt.speed;if(B==="pulse")ye.animation=`bp-${T} ${De??Es.speed} ease-in-out infinite`;else if(B==="shimmer"){const Ge=D?kt.darkShimmerColor??ls.darkHighlight:kt.shimmerColor??ls.lightHighlight,v=kt.shimmerAngle??ls.angle;delete ye.backgroundColor,ye.backgroundImage=`linear-gradient(${v}deg, ${V} ${ls.start}%, ${Ge} 50%, ${V} ${ls.end}%)`,ye.backgroundSize="200% 100%",ye.animation=`bs-${T} ${De??ls.speed} linear infinite`}return E>0&&(ye.opacity=0,ye.animation=`${ye.animation?ye.animation+",":""} by-${T} 0.3s ease-out ${ae*E}ms forwards`),e.jsx("div",{"data-boneyard-bone":"true",className:Y,style:ye},ae)}),B==="pulse"&&e.jsx("style",{children:`@keyframes bp-${T}{0%,100%{background-color:${S}}50%{background-color:${Cn(S,D?Es.darkAdjust:Es.lightAdjust)}}}`}),B==="shimmer"&&e.jsx("style",{children:`@keyframes bs-${T}{0%{background-position:200% 0}100%{background-position:-200% 0}}`}),E>0&&e.jsx("style",{children:`@keyframes by-${T}{from{opacity:0}to{opacity:1}}`})]})})]})}async function pr(t){const s=Ot(Ye,"managedStudents");try{const o=Rt(s,Mt("teacherId","==",t)),i=await Gt(o);if(!i.empty)return i.docs.map(c=>({id:c.id,...c.data()})).sort((c,d)=>String(c.name||"").localeCompare(String(d.name||"")))}catch{}const r=(await qo(t)).map(o=>o.id);if(r.length===0)return[];const n=new Map;for(let o=0;o{n.set(d.id,{id:d.id,...d.data()})})}return Array.from(n.values()).sort((o,i)=>String(o.name||"").localeCompare(String(i.name||"")))}async function gd(t,s,a){const r=ut(Ye,"managedStudents",t);await _t(r,{riskLevel:s,...a!==void 0?{riskConfidence:a}:{},updatedAt:lt()})}async function Wo(t,s,a){const r=St(s,a),n=ut(Ye,"managedStudents",t);await _t(n,{grade:s,section:a,classSectionId:r,updatedAt:lt()})}function St(t,s){return[t,s].filter(Boolean).join("_").replace(/\s+/g,"_").toLowerCase()}function Xa(t){const s=Object.entries(t).filter(([,a])=>a!==void 0);return Object.fromEntries(s)}function os(t){const s=(t||"").trim();if(!s)return null;const a=s.match(/(\d{1,2})/);return a?`Grade ${a[1]}`:/^grade\s+/i.test(s)?s.replace(/\s+/g," ").trim().replace(/^grade/i,"Grade"):s}function js(t){const a=os(t)?.match(/(\d{1,2})/),r=a?Number.parseInt(a[1],10):Number.NaN;return Number.isFinite(r)?r>=11?"Senior High School":"Junior High School":null}function ys(t,s){const a=`${t||""} ${s||""}`.toUpperCase();if(!a.trim())return null;const r=["STEM","ABM","HUMSS","GAS","TVL","ICT"];for(const n of r)if(new RegExp(`\\b${n}\\b`).test(a))return n;return null}function Et(t){const s=(t||"").trim();if(!s)return{grade:"Grade 11",section:"Section A"};const[a="Grade 11",r="Section A"]=s.split(" - ").map(n=>n.trim());return{grade:a||"Grade 11",section:r||"Section A"}}function et(t){const s=t.metadata||{},a=t.className||s.className,r=Et(a),n=(t.grade||s.grade||r.grade||"").trim()||null,o=(t.section||s.section||r.section||"").trim()||null,i=(t.classSectionId||s.classSectionId||"").trim()||(n&&o?St(n,o):"")||null,l=(a||"").trim()||(n&&o?`${n} - ${o}`:"")||null,c=os(t.gradeLevel||s.gradeLevel||n),d=(t.classification||s.classification||"").trim()||js(c)||null,x=(t.strand||s.strand||"").trim()||ys(l,o)||null;return{classSectionId:i,className:l,grade:n,section:o,gradeLevel:c,classification:d,strand:x,schoolYear:(t.schoolYear||s.schoolYear||"").trim()||null,ownerTeacherId:(t.ownerTeacherId||s.ownerTeacherId||"").trim()||null,ownerTeacherName:(t.ownerTeacherName||s.ownerTeacherName||"").trim()||null,adviserTeacherId:(t.adviserTeacherId||s.adviserTeacherId||"").trim()||null,adviserTeacherName:(t.adviserTeacherName||s.adviserTeacherName||"").trim()||null,managerId:(t.managerId||s.managerId||"").trim()||null,managerName:(t.managerName||s.managerName||"").trim()||null}}function bd(t){const s=(t.className||"").trim(),[a="",r=""]=s.split(" - "),n=(t.grade||a||"").trim()||null,o=(t.section||r||"").trim()||null,i=(t.classSectionId||"").trim()||(n&&o?St(n,o):"")||null,l=s||(n&&o?`${n} - ${o}`:null),c=os(t.gradeLevel||n),d=(t.classification||"").trim()||js(c),x=(t.strand||"").trim()||ys(l,o);return{classSectionId:i,className:l,grade:n,section:o,gradeLevel:c,classification:d,strand:x,schoolYear:(t.schoolYear||"").trim()||null,ownerTeacherId:(t.ownerTeacherId||"").trim()||null,ownerTeacherName:(t.ownerTeacherName||"").trim()||null,adviserTeacherId:(t.adviserTeacherId||"").trim()||null,adviserTeacherName:(t.adviserTeacherName||"").trim()||null,managerId:(t.managerId||"").trim()||null,managerName:(t.managerName||"").trim()||null}}async function qo(t){const s=Ot(Ye,"classrooms"),a=new Map,r=Rt(s,Mt("teacherId","==",t));(await Gt(r)).docs.forEach(l=>{a.set(l.id,{id:l.id,...l.data()})});const o=Rt(s,Mt("managerId","==",t));return(await Gt(o)).docs.forEach(l=>{a.set(l.id,{id:l.id,...l.data()})}),Array.from(a.values()).sort((l,c)=>String(l.name||"").localeCompare(String(c.name||"")))}async function Yo(t){const s=t.classSectionId||St(t.grade,t.section),a=ut(Ye,"classSectionOwnership",s),r=await xs(a),n=r.exists()?r.data().studentUids||[]:[],o=Array.from(new Set([...t.studentUids||[],...n])),i=Xa(t);return r.exists()?await _t(a,{...i,classSectionId:s,studentUids:o,updatedAt:lt()}):await Pt(a,{...i,classSectionId:s,studentUids:o,createdAt:lt(),updatedAt:lt()}),s}async function vd(t){const s=(t.classSectionId||"").trim()||St(t.grade,t.section),a=(t.className||"").trim()||`${t.grade} - ${t.section}`,r=bd({classSectionId:s,className:a,grade:t.grade,section:t.section,schoolYear:t.schoolYear,ownerTeacherId:t.ownerTeacherId,ownerTeacherName:t.ownerTeacherName,adviserTeacherId:t.ownerTeacherId,adviserTeacherName:t.ownerTeacherName,managerId:t.managerId,managerName:t.managerName,classification:t.classification,strand:t.strand,gradeLevel:t.gradeLevel});await Yo({classSectionId:s,className:a,grade:r.grade||t.grade,gradeLevel:r.gradeLevel||t.gradeLevel||t.grade,classification:r.classification||t.classification,strand:r.strand||t.strand,section:r.section||t.section,schoolYear:t.schoolYear,ownerTeacherId:t.ownerTeacherId,ownerTeacherName:t.ownerTeacherName,managerId:t.managerId,managerName:t.managerName,studentUids:[]});const n=Ot(Ye,"classrooms"),o=Rt(n,Mt("classSectionId","==",s)),i=await Gt(o);if(i.empty){const l=Xa({name:a,teacherId:t.ownerTeacherId,grade:r.grade,gradeLevel:r.gradeLevel,classification:r.classification,strand:r.strand,section:r.section,classSectionId:s,schoolYear:t.schoolYear,ownerTeacherId:t.ownerTeacherId,ownerTeacherName:t.ownerTeacherName||"",adviserTeacherId:t.ownerTeacherId,adviserTeacherName:t.ownerTeacherName||"",managerId:t.managerId,managerName:t.managerName||"",classMetadata:r,schedule:"Mon-Fri",studentCount:0,avgScore:0,atRiskCount:0,createdAt:lt(),updatedAt:lt()});await Pt(ut(Ye,"classrooms",s),l,{merge:!0})}else for(const l of i.docs){const c=Xa({name:a,grade:r.grade,gradeLevel:r.gradeLevel,classification:r.classification,strand:r.strand,section:r.section,schoolYear:t.schoolYear,ownerTeacherId:t.ownerTeacherId,ownerTeacherName:t.ownerTeacherName||"",adviserTeacherId:t.ownerTeacherId,adviserTeacherName:t.ownerTeacherName||"",managerId:t.managerId,managerName:t.managerName||"",classMetadata:r,updatedAt:lt()});await _t(l.ref,c)}return s}async function Ko(t,s,a,r,n,o){const i=St(s,a);await Yo({classSectionId:i,grade:s,section:a,schoolYear:n,ownerTeacherId:r,ownerTeacherName:o,studentUids:[t]}),await Pt(ut(Ye,"users",t),{grade:s,section:a,classSectionId:i,adviserTeacherId:r,adviserTeacherName:o||"",updatedAt:lt()},{merge:!0})}async function Nd(t){const s=Ot(Ye,"classSectionOwnership"),a=new Map,r=Rt(s,Mt("ownerTeacherId","==",t));(await Gt(r)).docs.forEach(l=>{a.set(l.id,{id:l.id,...l.data()})});const o=Rt(s,Mt("managerId","==",t));return(await Gt(o)).docs.forEach(l=>{a.set(l.id,{id:l.id,...l.data()})}),Array.from(a.values()).sort((l,c)=>String(l.classSectionId||"").localeCompare(String(c.classSectionId||"")))}async function jd(t="",s=25){const a=Ot(Ye,"users"),r=Math.max(1,Math.min(100,s)),n=Rt(a,Mt("role","==","teacher"),Zn(r*4)),o=await Gt(n),i=t.trim().toLowerCase();return o.docs.map(c=>{const d=c.data(),x=String(d.name||"").trim(),N=String(d.email||"").trim();return{uid:c.id,name:x||"Teacher",email:N,photo:String(d.photo||d.photoURL||"").trim()||void 0}}).filter(c=>i?c.name.toLowerCase().includes(i)||c.email.toLowerCase().includes(i):!0).sort((c,d)=>c.name.localeCompare(d.name)).slice(0,r)}function yd(t,s,a=20){if(t.length===0)return s([]),()=>{};const r=Ot(Ye,"activities"),n=Rt(r,Mt("classroomId","in",t),Hi("timestamp","desc"));return eo(n,o=>{const i=o.docs.slice(0,a).map(l=>({id:l.id,...l.data()}));s(i)})}async function wd(t,s,a){const r=ut(Ot(Ye,"generatedLessonPlans"));return await Pt(r,{...t,teacherId:s,teacherName:a?.teacherName||null,studentId:a?.studentId||null,studentName:a?.studentName||null,status:"draft",createdAt:lt(),updatedAt:lt()}),r.id}async function Sd(t){const s=ut(Ye,"generatedLessonPlans",t),a=await xs(s);if(!a.exists())throw new Error("Lesson draft not found. Save draft before publishing.");if(!a.data().publishReady)throw new Error("Lesson is not publish-ready. Resolve source legitimacy and validation issues first.");await _t(s,{status:"published",publishedAt:lt(),updatedAt:lt()})}async function Cd(t,s=!0){const a=t.learningCompetency||t.lessonTitle||t.focusTopics&&t.focusTopics[0]||"general mathematics",r=t.subject||"general_math",n=t.quarter??1;let o="",i=[],l,c,d,x=!1;if(s)try{const f=await Di(a,r,n,{lessonTitle:t.lessonTitle,learningCompetency:t.learningCompetency,moduleUnit:t.moduleUnit,learnerLevel:t.learnerLevel});i=f.sources||[],o=f.explanation||"",l=f.retrievalConfidence,c=f.retrievalBand,d=f.retrievalQuery,x=f.needsReview??!1}catch{o="",i=[]}const N={...t,subject:r,quarter:n,curriculumContext:o?`[CURRICULUM CONTEXT] -${o}`:void 0,curriculumRetrievalConfidence:l,curriculumRetrievalBand:c,curriculumRetrievalQuery:d,needsReview:x};return{...await We.generateLessonPlan(N),curriculumSources:i,curriculumContext:o}}const kd=Ii("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Td({className:t,variant:s,asChild:a=!1,...r}){const n=a?Qi:"span";return e.jsx(n,{"data-slot":"badge",className:Jn(kd({variant:s}),t),...r})}function Id(t){return t.length<=42?t:`${t.slice(0,18)}...${t.slice(-20)}`}const kn=({sources:t=[],className:s})=>t.length?e.jsxs(Vi,{children:[e.jsx(Wi,{asChild:!0,children:e.jsxs(Td,{className:["bg-[#75D06A]/15 text-[#2E7D32] border-[#75D06A]/40 font-body font-semibold text-[11px] px-2.5 py-1 rounded-full cursor-help",s||""].join(" "),variant:"outline",children:[e.jsx(ss,{size:12}),"DepEd Aligned"]})}),e.jsxs(qi,{side:"top",sideOffset:6,className:"max-w-sm bg-white border border-[#dde3eb] text-[#0a1628] shadow-lg p-3",children:[e.jsx("p",{className:"text-[11px] font-display font-bold uppercase tracking-wide text-[#5a6578] mb-2",children:"Curriculum Sources"}),e.jsx("div",{className:"space-y-2",children:t.slice(0,5).map((a,r)=>e.jsxs("div",{className:"text-xs leading-relaxed",children:[e.jsxs("p",{className:"font-semibold text-[#0a1628]",children:[a.subject," | Q",a.quarter]}),e.jsxs("p",{className:"text-[#5a6578]",children:[Id(a.sourceFile)," | p.",a.page]}),e.jsxs("p",{className:"text-[#5a6578]",children:["Similarity: ",(a.score*100).toFixed(1),"%"]})]},`${a.sourceFile}-${a.page}-${r}`))})]})]}):null,Ed=[{level:"Remember",icon:so,bgColor:"bg-sky-500/20",borderColor:"border-sky-500/40",textColor:"text-sky-400",description:"Recall facts, formulas, definitions, and basic procedures.",mathExample:"State the quadratic formula.",mapsTo:"Identification, Enumeration",defaultWeight:"Included by default"},{level:"Understand",icon:ss,bgColor:"bg-sky-500/20",borderColor:"border-sky-500/40",textColor:"text-sky-400",description:"Explain concepts, interpret graphs, classify mathematical objects.",mathExample:"Explain why the discriminant determines the number of roots.",mapsTo:"Multiple Choice, Identification",defaultWeight:"Included by default"},{level:"Apply",icon:er,bgColor:"bg-green-500/20",borderColor:"border-green-500/40",textColor:"text-green-400",description:"Use formulas and procedures to solve routine problems.",mathExample:"Solve: 2x² + 5x - 3 = 0 using the quadratic formula.",mapsTo:"Equation-Based, Word Problem",defaultWeight:"Included by default"},{level:"Analyze",icon:Ml,bgColor:"bg-orange-500/20",borderColor:"border-orange-500/40",textColor:"text-orange-400",description:"Break down problems, compare solution methods, identify patterns.",mathExample:"Given f(x) = x³ - 3x, find and classify all critical points.",mapsTo:"Word Problem, Equation-Based",defaultWeight:"Included by default"}],Rd=({isOpen:t,onClose:s})=>t?e.jsx(es,{children:t&&e.jsx(Ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-[70] flex items-center justify-center p-4",onClick:s,children:e.jsxs(Ie.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},className:"bg-white border border-slate-200 rounded-2xl shadow-2xl w-full max-w-3xl max-h-[85vh] flex flex-col overflow-hidden",onClick:a=>a.stopPropagation(),children:[e.jsxs("div",{className:"bg-gradient-to-r from-sky-600 to-sky-500 px-6 py-4 flex items-center justify-between flex-shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-white/20 rounded-xl flex items-center justify-center",children:e.jsx(to,{size:22,className:"text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-bold text-white",children:"Bloom's Taxonomy in MathPulse AI"}),e.jsx("p",{className:"text-cyan-200 text-xs",children:"Understanding cognitive levels in assessments"})]})]}),e.jsx("button",{onClick:s,className:"w-8 h-8 bg-white/20 hover:bg-white/30 rounded-lg flex items-center justify-center transition-colors",children:e.jsx(ca,{size:16,className:"text-white"})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-bold text-rose-400 uppercase tracking-wide mb-2",children:"What is Bloom's Taxonomy?"}),e.jsx("p",{className:"text-sm text-slate-500 leading-relaxed",children:"Bloom's Taxonomy is an educational framework developed by Benjamin Bloom in 1956 and revised in 2001. It classifies learning objectives into six cognitive levels, from basic recall of facts up to complex evaluation and creation. MathPulse AI uses the first four levels most relevant to Senior High School mathematics."})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-bold text-rose-400 uppercase tracking-wide mb-2",children:"Why MathPulse AI Uses It"}),e.jsx("p",{className:"text-sm text-slate-500 leading-relaxed",children:"Using Bloom's Taxonomy ensures that assessments do not only test memorization. A well-balanced math quiz should challenge students at multiple cognitive levels: remembering formulas, understanding concepts, applying procedures, and analyzing relationships. This mirrors the DepEd K-12 competency framework which requires higher-order thinking skills (HOTS) alongside foundational knowledge."})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-bold text-rose-400 uppercase tracking-wide mb-3",children:"Level-by-Level Breakdown"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:Ed.map(a=>{const r=a.icon;return e.jsxs("div",{className:`${a.bgColor} border ${a.borderColor} rounded-xl p-4 space-y-2`,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(r,{size:18,className:a.textColor}),e.jsx("span",{className:`font-bold text-sm ${a.textColor}`,children:a.level})]}),e.jsx("p",{className:"text-xs text-slate-500",children:a.description}),e.jsxs("div",{className:"bg-black/20 rounded-lg p-2",children:[e.jsx("p",{className:"text-[10px] font-semibold text-slate-500 uppercase tracking-wide mb-0.5",children:"Math Example"}),e.jsx("p",{className:"text-xs text-[#dde3eb] italic",children:a.mathExample})]}),e.jsxs("div",{className:"flex items-center justify-between text-[10px]",children:[e.jsxs("span",{className:"text-slate-500",children:["Maps to: ",e.jsx("span",{className:"text-slate-500 font-medium",children:a.mapsTo})]}),e.jsx("span",{className:"text-green-400 font-medium",children:a.defaultWeight})]})]},a.level)})})]}),e.jsx("div",{className:"bg-slate-50 border border-slate-200 rounded-xl p-4",children:e.jsxs("p",{className:"text-xs text-slate-500 leading-relaxed",children:[e.jsx("span",{className:"font-semibold text-slate-600",children:"Note:"})," ","All four levels are selected by default to produce a balanced, HOTS-aligned assessment. Deselecting a level will remove questions of that cognitive depth from the generated quiz."]})})]}),e.jsxs("div",{className:"border-t border-slate-200 px-6 py-3 flex items-center justify-between flex-shrink-0 bg-slate-50",children:[e.jsxs("a",{href:"https://cft.vanderbilt.edu/guides-sub-pages/blooms-taxonomy/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-xs text-rose-400 hover:text-rose-300 font-medium transition-colors",children:[e.jsx(Yi,{size:12}),"Learn More"]}),e.jsx("button",{onClick:s,className:"px-5 py-2 bg-sky-600 hover:bg-rose-500 text-white text-sm font-bold rounded-xl transition-colors",children:"Got it"})]})]})})}):null,Md={draft:"bg-[#edf1f7] text-[#5a6578]",published:"bg-green-100 text-green-700",assigned:"bg-sky-100 text-sky-700",completed:"bg-rose-100 text-rose-700"},ea={identification:{label:"Identification",icon:e.jsx(tr,{size:16}),description:"Define or identify concepts"},enumeration:{label:"Enumeration",icon:e.jsx(Ji,{size:16}),description:"List steps or properties"},multiple_choice:{label:"Multiple Choice",icon:e.jsx(us,{size:16}),description:"Choose from 4 options"},word_problem:{label:"Word Problem",icon:e.jsx(ss,{size:16}),description:"Real-world scenarios"},equation_based:{label:"Equation-Based",icon:e.jsx(zi,{size:16}),description:"Solve equations"}},za={remember:{label:"Remember",color:"bg-sky-100 text-sky-700 border-sky-300",description:"Recall facts & formulas"},understand:{label:"Understand",color:"bg-emerald-100 text-emerald-700 border-emerald-300",description:"Explain concepts"},apply:{label:"Apply",color:"bg-rose-100 text-rose-700 border-rose-300",description:"Use in new contexts"},analyze:{label:"Analyze",color:"bg-rose-100 text-rose-700 border-rose-300",description:"Examine & compare"}},Ad=["Grade 11","Grade 12"],Fa=t=>{const s=(t||"").trim().toLowerCase();return s==="grade 12"||s==="12"||s.includes("12")?"Grade 12":"Grade 11"},Ld={"Grade 11":{"General Mathematics - Patterns, Relations, and Functions":["Patterns and Real-Life Relationships","Functions as Mathematical Models","Function Notation and Evaluation","Domain and Range of Functions","Operations on Functions","Composite Functions","Inverse Functions","Graphs of Rational Functions","Graphs of Exponential Functions","Graphs of Logarithmic Functions"],"General Mathematics - Financial Mathematics":["Simple and Compound Interest","Simple and General Annuities","Present and Future Value","Loans, Amortization, and Sinking Funds","Stocks, Bonds, and Market Indices","Business Decision-Making with Mathematical Models"],"General Mathematics - Logic and Mathematical Reasoning":["Propositions and Logical Connectives","Truth Values and Truth Tables","Logical Equivalence and Implication","Quantifiers and Negation","Validity of Arguments"]},"Grade 12":{"Pre-Calculus - Analytic Geometry":["Conic Sections - Parabola","Conic Sections - Ellipse","Conic Sections - Hyperbola","Conic Sections - Circle","Systems of Nonlinear Equations"],"Pre-Calculus - Series and Induction":["Sequences and Series","Arithmetic Sequences","Geometric Sequences","Mathematical Induction","Binomial Theorem"],"Pre-Calculus - Trigonometry":["Angles and Unit Circle","Trigonometric Functions","Trigonometric Identities","Sum and Difference Formulas","Inverse Trigonometric Functions","Polar Coordinates"],"Basic Calculus - Limits":["Limits of Functions","Limit Theorems","One-Sided Limits","Infinite Limits and Limits at Infinity","Continuity of Functions"],"Basic Calculus - Derivatives":["Definition of the Derivative","Differentiation Rules","Chain Rule","Implicit Differentiation","Higher-Order Derivatives","Related Rates","Extrema and the First Derivative Test","Concavity and the Second Derivative Test","Optimization Problems"],"Basic Calculus - Integration":["Antiderivatives and Indefinite Integrals","Definite Integrals and the FTC","Integration by Substitution","Area Under a Curve"]}},Dd={"Grade 11":["General Mathematics - "],"Grade 12":["Pre-Calculus - ","Basic Calculus - "]},Tn=(t,s)=>{const a=Dd[s];return Object.fromEntries(Object.entries(t).filter(([r])=>a.some(n=>r.startsWith(n))))},Rs=30,cs=12,Ba="mathpulse:quiz-maker:active-task",In={easy:"text-green-600",medium:"text-rose-600",hard:"text-red-600"},zd=({onBack:t,gradeLevel:s,selectedClassId:a,selectedClassName:r})=>{const{currentUser:n,loading:o}=Us(),i=b.useMemo(()=>We.getImportGroundedRolloutFlags(),[]),[l,c]=b.useState("create"),[d,x]=b.useState("setup"),[N,m]=b.useState(Fa(s)),[f,w]=b.useState(10),[T,j]=b.useState([]),[h,y]=b.useState([]),[k,D]=b.useState(["multiple_choice","word_problem","identification"]),[p,z]=b.useState(["remember","understand","apply","analyze"]),[g,S]=b.useState(!1),[I,B]=b.useState({easy:30,medium:50,hard:20}),[P,J]=b.useState({}),[ne,X]=b.useState(!1),[te,se]=b.useState([]),[$,Y]=b.useState(!1),[E,U]=b.useState(""),[W,ge]=b.useState(!1),[L,C]=b.useState(!1),[G,F]=b.useState(null),[ie,R]=b.useState(0),[H,q]=b.useState("queued"),[ae,ee]=b.useState("Waiting to start generation..."),[V,pe]=b.useState(null),[Me,ye]=b.useState(null),[De,Ge]=b.useState(""),[v,_]=b.useState(!1),le=b.useRef(!1),[de,Fe]=b.useState("topics"),[be,Oe]=b.useState(null),[Ue,Ne]=b.useState(!1),[it,ht]=b.useState("all"),[Lt,Dt]=b.useState("all"),[K,me]=b.useState(!1),[Be,Ce]=b.useState(null),[Ze,dt]=b.useState(!1),[oi,ws]=b.useState(!1),[va,Nr]=b.useState(!1),[jr,ii]=b.useState([]),[li,yr]=b.useState(!1),[Na,wr]=b.useState(""),[Yt,Sr]=b.useState(null),[Cr,Ss]=b.useState([]),[ci,kr]=b.useState(!1),[ja,di]=b.useState("all"),[mi,Tr]=b.useState(null),[Ir,Ks]=b.useState(null),Er=b.useCallback(async()=>{X(!0);const u=Fa(N);try{const M=await We.getQuizTopics(u);M.topics&&J(Tn(M.topics,u))}catch{J(Tn(Ld[u],u))}finally{X(!1)}},[N]),Rr=b.useCallback(async()=>{if(!i.quizEnabled){se([]),U("Import-grounded quiz generation is disabled by rollout flag; using curriculum defaults."),Y(!1);return}Y(!0),U("");try{const u=await We.getCourseMaterialTopics({classSectionId:a,limit:20}),M=(u.topics||[]).filter(A=>A.title?.trim());se(M),u.warnings&&u.warnings.length>0&&U(u.warnings.join(" "))}catch{se([]),U("Imported topics are currently unavailable; quiz generation will use curriculum defaults.")}finally{Y(!1)}},[a,i.quizEnabled]);b.useEffect(()=>{Er(),j([]),y([])},[Er]),b.useEffect(()=>{Rr()},[Rr]);const ya=b.useMemo(()=>{const u=Array.from(new Set(te.map(M=>M.title.trim()).filter(Boolean)));return u.length===0?P:{"Imported Course Materials":u,...P}},[P,te]);b.useEffect(()=>{ht("all"),Dt("all")},[V]);const Mr=b.useMemo(()=>{if(!V)return[];const u=V.questions.map(A=>A.provenance?.sourceFile?.trim()).filter(A=>!!A),M=(V.metadata.topicProvenance||[]).map(A=>A.sourceFile?.trim()).filter(A=>!!A);return Array.from(new Set([...u,...M])).sort((A,fe)=>A.localeCompare(fe))},[V]),Ar=b.useMemo(()=>{if(!V)return[];const u=V.questions.map(A=>A.provenance?.materialId?.trim()).filter(A=>!!A),M=(V.metadata.topicProvenance||[]).map(A=>A.materialId?.trim()).filter(A=>!!A);return Array.from(new Set([...u,...M])).sort((A,fe)=>A.localeCompare(fe))},[V]),wa=b.useMemo(()=>V?V.questions.filter(u=>{const M=it==="all"||(u.provenance?.sourceFile||"").trim()===it,A=Lt==="all"||(u.provenance?.materialId||"").trim()===Lt;return M&&A}):[],[V,it,Lt]),Lr=(u,M)=>{const A={...I},fe=Math.max(0,Math.min(100,A[u]+M)),$e=fe-A[u];A[u]=fe;const Le=Object.keys(A).filter(st=>st!==u),Nt=Le.reduce((st,jt)=>st+A[jt],0);if(Nt>0)for(const st of Le)A[st]=Math.max(0,Math.round(A[st]-$e*A[st]/Nt));const Xs=Object.values(A).reduce((st,jt)=>st+jt,0);if(Xs!==100){const st=Le.reduce((jt,Or)=>A[jt]>=A[Or]?jt:Or);A[st]+=100-Xs}B(A)},ui=u=>{j(M=>M.includes(u)?M.filter(A=>A!==u):[...M,u]),y(M=>M.filter(A=>A!==u))},xi=u=>{D(M=>M.includes(u)?M.length>1?M.filter(A=>A!==u):M:[...M,u])},hi=u=>{z(M=>M.includes(u)?M.length>1?M.filter(A=>A!==u):M:[...M,u])},fi=()=>{let u=T.length>0?T.filter(A=>!h.includes(A)):Object.values(ya).flat().filter(A=>!h.includes(A)).slice(0,3);u.length>cs&&(u=u.slice(0,cs));const M=Math.min(f,Rs);return{topics:u,gradeLevel:N,numQuestions:M,questionTypes:k,includeGraphs:g,difficultyDistribution:I,bloomLevels:p,excludeTopics:h,classSectionId:a,className:r,preferImportedTopics:i.quizEnabled}},pi=b.useCallback((u,M)=>{const A={taskId:u,request:M,createdAt:new Date().toISOString(),ownerUid:n?.uid};try{sessionStorage.setItem(Ba,JSON.stringify(A))}catch{}},[n]),zt=b.useCallback(()=>{try{sessionStorage.removeItem(Ba)}catch{}},[]),Sa=b.useCallback(u=>{const M=Math.max(0,Math.min(100,Math.round(typeof u.progressPercent=="number"?u.progressPercent:u.status==="queued"?10:u.status==="running"?65:u.status==="completed"?100:u.status==="cancelling"?95:100)));R(A=>{let fe=Math.max(A,M);if(u.status==="running"&&M<=A){const $e=String(u.progressStage||"").toLowerCase(),Le=$e.includes("assembling")||$e.includes("final")?97:$e.includes("generating")?89:95;fe=Math.min(Le,A+1)}return fe}),q(u.progressStage||u.status),ee(u.progressMessage||(u.status==="queued"?"Task queued for generation.":u.status==="running"?"Generating quiz in the background...":u.status==="completed"?"Generation complete.":u.status==="cancelling"?"Cancelling generation...":"Generation finished with an error."))},[]);b.useEffect(()=>{if(o||le.current)return;if(le.current=!0,!n){zt();return}let u=!1;const M=sessionStorage.getItem(Ba);if(!M)return;let A=null;try{A=JSON.parse(M)}catch{zt();return}if(!A?.taskId){zt();return}if(A.ownerUid&&A.ownerUid!==n.uid){zt();return}return ge(!0),F(A.taskId),Ge(""),We.waitForTaskResult(A.taskId,{timeoutMs:24e4,pollIntervalMs:1500,onProgress:Sa}).then(async fe=>{if(u)return;const $e=fe.result;if(!$e||typeof $e!="object")throw new Error("Quiz generation completed without a valid result payload.");const Le=$e;pe(Le),x("results"),R(100),q("completed"),ee("Generation complete."),F(null),zt();try{await Fr(Le,A.request),ue.success("Quiz auto-saved to your library as draft.")}catch(Nt){ue.error(Nt instanceof Error?Nt.message:"Quiz generated but failed to save to library")}}).catch(fe=>{if(!u){if(fe instanceof Fs&&(fe.status===401||fe.status===403)){le.current=!1,ge(!1);return}Ge(fe instanceof Error?fe.message:"Failed to resume quiz generation"),F(null),zt()}}).finally(()=>{u||ge(!1)}),()=>{u=!0}},[Sa,o,zt,n]);const Ca=()=>{if(W){window.confirm("Quiz generation is in progress. Are you sure you want to leave?")&&(x("setup"),pe(null),Ge(""),t());return}x("setup"),pe(null),Ge(""),t()},gi=async()=>{Ge(""),ge(!0),Ks(null),R(8),q("queued"),ee("Submitting quiz generation task..."),pe(null);const u=fi();try{const M=await We.generateQuiz(u,{onTaskCreated:A=>{F(A),pi(A,u),R(fe=>Math.max(fe,12)),q("queued"),ee("Task queued. Generation is running in the background.")},onProgress:A=>{Sa(A),A.taskId&&A.taskId!==G&&F(A.taskId)}});pe(M),x("results"),R(100),q("completed"),ee("Generation complete."),F(null),zt();try{await Fr(M,u),ue.success("Quiz auto-saved to your library as draft.")}catch(A){ue.error(A instanceof Error?A.message:"Quiz generated but failed to save to library")}We.reportImportGroundedFeedback({flow:"quiz",status:"success",classSectionId:u.classSectionId,className:u.className,metadata:{totalQuestions:M.metadata.totalQuestions,usedImportedTopics:!!M.metadata.usedImportedTopics,importedTopicCount:M.metadata.importedTopicCount??0,importGroundingEnabled:i.quizEnabled}})}catch(M){Ge(M instanceof Error?M.message:"Quiz generation failed"),R(100),q("failed"),ee("Generation failed."),F(null),zt(),We.reportImportGroundedFeedback({flow:"quiz",status:"failed",classSectionId:u.classSectionId,className:u.className,metadata:{error:M instanceof Error?M.message:"Quiz generation failed",importGroundingEnabled:i.quizEnabled}})}finally{ge(!1)}},bi=()=>{if(!V)return;const u=V.questions.map((M,A)=>{let fe=`${A+1}. [${M.difficulty.toUpperCase()}] [${M.bloomLevel}] (${M.points} pts) + */const Fl=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],Bl=rs("video",Fl);/** + * @license lucide-react v0.487.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const $l=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],Ol=rs("wand-sparkles",$l),fa=0,Ut=1,vs=2,xo=4;function en(t){return()=>t}function Pl(t){t()}function ho(t,s){return a=>t(s(a))}function tn(t,s){return()=>t(s)}function _l(t,s){return a=>t(s,a)}function ar(t){return t!==void 0}function Hl(...t){return()=>{t.map(Pl)}}function Ns(){}function pa(t,s){return s(t),t}function Gl(t,s){return s(t)}function He(...t){return t}function Ae(t,s){return t(Ut,s)}function we(t,s){t(fa,s)}function rr(t){t(vs)}function Qe(t){return t(xo)}function oe(t,s){return Ae(t,_l(s,fa))}function wt(t,s){const a=t(Ut,r=>{a(),s(r)});return a}function sn(t){let s,a;return r=>n=>{s=n,a&&clearTimeout(a),a=setTimeout(()=>{r(s)},t)}}function fo(t,s){return t===s}function _e(t=fo){let s;return a=>r=>{t(s,r)||(s=r,a(r))}}function he(t){return s=>a=>{t(a)&&s(a)}}function Z(t){return s=>ho(s,t)}function Tt(t){return s=>()=>{s(t)}}function O(t,...s){const a=Ql(...s);return((r,n)=>{switch(r){case vs:rr(t);return;case Ut:return Ae(t,a(n))}})}function It(t,s){return a=>r=>{a(s=t(s,r))}}function as(t){return s=>a=>{t>0?t--:s(a)}}function $t(t){let s=null,a;return r=>n=>{s=n,!a&&(a=setTimeout(()=>{a=void 0,r(s)},t))}}function Se(...t){const s=new Array(t.length);let a=0,r=null;const n=2**t.length-1;return t.forEach((o,i)=>{const l=2**i;Ae(o,c=>{const d=a;a|=l,s[i]=c,d!==n&&a===n&&r&&(r(),r=null)})}),o=>i=>{const l=()=>{o([i].concat(s))};a===n?l():r=l}}function Ql(...t){return s=>t.reduceRight(Gl,s)}function Ul(t){let s,a;const r=()=>s?.();return function(n,o){switch(n){case Ut:return o?a===o?void 0:(r(),a=o,s=Ae(t,o),s):(r(),Ns);case vs:r(),a=null;return}}}function Q(t){let s=t;const a=Ce();return((r,n)=>{switch(r){case fa:s=n;break;case Ut:{n(s);break}case xo:return s}return a(r,n)})}function ot(t,s){return pa(Q(s),a=>oe(t,a))}function Ce(){const t=[];return((s,a)=>{switch(s){case fa:t.slice().forEach(r=>{r(a)});return;case vs:t.splice(0,t.length);return;case Ut:return t.push(a),()=>{const r=t.indexOf(a);r>-1&&t.splice(r,1)}}})}function xt(t){return pa(Ce(),s=>oe(t,s))}function Re(t,s=[],{singleton:a}={singleton:!0}){return{constructor:t,dependencies:s,id:Vl(),singleton:a}}const Vl=()=>Symbol();function Wl(t){const s=new Map,a=({constructor:r,dependencies:n,id:o,singleton:i})=>{if(i&&s.has(o))return s.get(o);const l=r(n.map(c=>a(c)));return i&&s.set(o,l),l};return a(t)}function qe(...t){const s=Ce(),a=new Array(t.length);let r=0;const n=2**t.length-1;return t.forEach((o,i)=>{const l=2**i;Ae(o,c=>{a[i]=c,r|=l,r===n&&we(s,a)})}),function(o,i){switch(o){case vs:{rr(s);return}case Ut:return r===n&&i(a),Ae(s,i)}}}function xe(t,s=fo){return O(t,_e(s))}function Ua(...t){return function(s,a){switch(s){case vs:return;case Ut:return Hl(...t.map(r=>Ae(r,a)))}}}const Xe={DEBUG:0,INFO:1,WARN:2,ERROR:3},ql={[Xe.DEBUG]:"debug",[Xe.ERROR]:"error",[Xe.INFO]:"log",[Xe.WARN]:"warn"},Yl=()=>typeof globalThis>"u"?window:globalThis,Vt=Re(()=>{const t=Q(Xe.ERROR);return{log:Q((s,a,r=Xe.INFO)=>{const n=Yl().VIRTUOSO_LOG_LEVEL??Qe(t);r>=n&&console[ql[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",s,a)}),logLevel:t}},[],{singleton:!0});function ns(t,s,a){return nr(t,s,a).callbackRef}function nr(t,s,a){const r=re.useRef(null);let n=i=>{};const o=re.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(i=>{const l=()=>{const c=i[0].target;c.offsetParent!==null&&t(c)};a?l():requestAnimationFrame(l)}):null,[t,a]);return n=i=>{i&&s?(o?.observe(i),r.current=i):(r.current&&o?.unobserve(r.current),r.current=null)},{callbackRef:n,ref:r}}function Kl(t,s,a,r,n,o,i,l,c){const d=re.useCallback(x=>{const N=Xl(x.children,s,l?"offsetWidth":"offsetHeight",n);let m=x.parentElement;for(;m.dataset.virtuosoScroller===void 0;)m=m.parentElement;const f=m.lastElementChild.dataset.viewportType==="window";let w;f&&(w=m.ownerDocument.defaultView);const T=i?l?i.scrollLeft:i.scrollTop:f?l?w.scrollX||w.document.documentElement.scrollLeft:w.scrollY||w.document.documentElement.scrollTop:l?m.scrollLeft:m.scrollTop,j=i?l?i.scrollWidth:i.scrollHeight:f?l?w.document.documentElement.scrollWidth:w.document.documentElement.scrollHeight:l?m.scrollWidth:m.scrollHeight,h=i?l?i.offsetWidth:i.offsetHeight:f?l?w.innerWidth:w.innerHeight:l?m.offsetWidth:m.offsetHeight;r({scrollHeight:j,scrollTop:Math.max(T,0),viewportHeight:h}),o?.(l?an("column-gap",getComputedStyle(x).columnGap,n):an("row-gap",getComputedStyle(x).rowGap,n)),N!==null&&t(N)},[t,s,n,o,i,r,l]);return nr(d,a,c)}function Xl(t,s,a,r){const n=t.length;if(n===0)return null;const o=[];for(let i=0;i{if(!c?.offsetParent)return;const d=c.getBoundingClientRect(),x=d.width;let N,m;if(s){const f=s.getBoundingClientRect(),w=d.top-f.top;m=f.height-Math.max(0,w),N=w+s.scrollTop}else{const f=i.current.ownerDocument.defaultView;m=f.innerHeight-Math.max(0,d.top),N=d.top+f.scrollY}r.current={listHeight:d.height,offsetTop:N,visibleHeight:m,visibleWidth:x},t(r.current)},[t,s]),{callbackRef:o,ref:i}=nr(n,!0,a),l=re.useCallback(()=>{n(i.current)},[n,i]);return re.useEffect(()=>{if(s){s.addEventListener("scroll",l);const d=new ResizeObserver(()=>{requestAnimationFrame(l)});return d.observe(s),()=>{s.removeEventListener("scroll",l),d.unobserve(s)}}const c=i.current?.ownerDocument.defaultView;return c?.addEventListener("scroll",l),c?.addEventListener("resize",l),()=>{c?.removeEventListener("scroll",l),c?.removeEventListener("resize",l)}},[l,s,i]),o}const ct=Re(()=>{const t=Ce(),s=Ce(),a=Q(0),r=Ce(),n=Q(0),o=Ce(),i=Ce(),l=Q(0),c=Q(0),d=Q(0),x=Q(0),N=Ce(),m=Ce(),f=Q(!1),w=Q(!1),T=Q(!1);return oe(O(t,Z(({scrollTop:j})=>j)),s),oe(O(t,Z(({scrollHeight:j})=>j)),i),oe(s,n),{deviation:a,fixedFooterHeight:d,fixedHeaderHeight:c,footerHeight:x,headerHeight:l,horizontalDirection:w,scrollBy:m,scrollContainerState:t,scrollHeight:i,scrollingInProgress:f,scrollTo:N,scrollTop:s,skipAnimationFrameInResizeObserver:T,smoothScrollTargetReached:r,statefulScrollTop:n,viewportHeight:o}},[],{singleton:!0}),$s={lvl:0};function go(t,s){const a=t.length;if(a===0)return[];let{index:r,value:n}=s(t[0]);const o=[];for(let i=1;is&&(l=l.concat(Wa(n,s,a))),r>=s&&r<=a&&l.push({k:r,v:i}),r<=a&&(l=l.concat(Wa(o,s,a))),l}function ra(t){const{l:s,lvl:a,r}=t;if(r.lvl>=a-1&&s.lvl>=a-1)return t;if(a>r.lvl+1){if(Ra(s))return jo(Ke(t,{lvl:a-1}));if(!ze(s)&&!ze(s.r))return Ke(s.r,{l:Ke(s,{r:s.r.l}),lvl:a,r:Ke(t,{l:s.r.r,lvl:a-1})});throw new Error("Unexpected empty nodes")}if(Ra(t))return qa(Ke(t,{lvl:a-1}));if(!ze(r)&&!ze(r.l)){const n=r.l,o=Ra(n)?r.lvl-1:r.lvl;return Ke(n,{l:Ke(t,{lvl:a-1,r:n.l}),lvl:n.lvl+1,r:qa(Ke(r,{l:n.r,lvl:o}))})}throw new Error("Unexpected empty nodes")}function Ke(t,s){return No(s.k!==void 0?s.k:t.k,s.v!==void 0?s.v:t.v,s.lvl!==void 0?s.lvl:t.lvl,s.l!==void 0?s.l:t.l,s.r!==void 0?s.r:t.r)}function bo(t){return ze(t.r)?t.l:ra(Ke(t,{r:bo(t.r)}))}function Ra(t){return ze(t)||t.lvl>t.r.lvl}function vo(t){return ze(t.r)?[t.k,t.v]:vo(t.r)}function No(t,s,a,r=$s,n=$s){return{k:t,l:r,lvl:a,r:n,v:s}}function rn(t){return qa(jo(t))}function jo(t){const{l:s}=t;return!ze(s)&&s.lvl===t.lvl?Ke(s,{r:Ke(t,{l:s.r})}):t}function qa(t){const{lvl:s,r:a}=t;return!ze(a)&&!ze(a.r)&&a.lvl===s&&a.r.lvl===s?Ke(a,{l:Ke(t,{r:a.l}),lvl:s+1}):t}function Jl(t){return go(t,({k:s,v:a})=>({index:s,value:a}))}function yo(t,s){return!!(t&&t.startIndex===s.startIndex&&t.endIndex===s.endIndex)}function Ps(t,s){return!!(t&&t[0]===s[0]&&t[1]===s[1])}const or=Re(()=>({recalcInProgress:Q(!1)}),[],{singleton:!0});function wo(t,s,a){return t[ma(t,s,a)]}function ma(t,s,a,r=0){let n=t.length-1;for(;r<=n;){const o=Math.floor((r+n)/2),i=t[o],l=a(i,s);if(l===0)return o;if(l===-1){if(n-r<2)return o-1;n=o-1}else{if(n===r)return o;r=o+1}}throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${s}`)}function Zl(t,s,a,r){const n=ma(t,s,r),o=ma(t,a,r,n);return t.slice(n,o+1)}function Qt(t,s){return Math.round(t.getBoundingClientRect()[s])}function ga(t){return!ze(t.groupOffsetTree)}function ir({index:t},s){return s===t?0:s=N||o===m)&&(t=Va(t,N)):(d=m!==o,c=!0),x>n&&n>=N&&m!==o&&(t=mt(t,n+1,m));d&&(t=mt(t,i,o))}return[t,a]}function sc(t){return typeof t.groupIndex<"u"}function ac({offset:t},s){return s===t?0:s0?l+a:l}function So(t,s){if(!ga(s))return t;let a=0;for(;s.groupIndices[a]<=t+a;)a++;return t+a}function ko(t,s,a){if(sc(t))return s.groupIndices[t.groupIndex]+1;const r=t.index==="LAST"?a:t.index;let n=So(r,s);return n=Math.max(0,n,Math.min(a,n)),n}function rc(t,s,a,r=0){return r>0&&(s=Math.max(s,wo(t,r,ir).offset)),go(Zl(t,s,a,ac),ic)}function nc(t,[s,a,r,n]){s.length>0&&r("received item sizes",s,Xe.DEBUG);const o=t.sizeTree;let i=o,l=0;if(a.length>0&&ze(o)&&s.length===2){const m=s[0].size,f=s[1].size;i=a.reduce((w,T)=>mt(mt(w,T,m),T+1,f),i)}else[i,l]=tc(i,s);if(i===o)return t;const{lastIndex:c,lastOffset:d,lastSize:x,offsetTree:N}=Ya(t.offsetTree,l,i,n);return{groupIndices:a,groupOffsetTree:a.reduce((m,f)=>mt(m,f,_s(f,N,n)),fs()),lastIndex:c,lastOffset:d,lastSize:x,offsetTree:N,sizeTree:i}}function oc(t){return Zt(t).map(({k:s,v:a},r,n)=>{const o=n[r+1];return{endIndex:o!==void 0?o.k-1:1/0,size:a,startIndex:s}})}function nn(t,s){let a=0,r=0;for(;an.start===r&&(n.end===s||n.end===1/0)&&n.value===a}const cc={offsetHeight:"height",offsetWidth:"width"},At=Re(([{log:t},{recalcInProgress:s}])=>{const a=Ce(),r=Ce(),n=ot(r,0),o=Ce(),i=Ce(),l=Q(0),c=Q([]),d=Q(void 0),x=Q(void 0),N=Q(void 0),m=Q(void 0),f=Q((g,S)=>Qt(g,cc[S])),w=Q(void 0),T=Q(0),j=ec(),h=ot(O(a,Se(c,t,T),It(nc,j),_e()),j),y=ot(O(c,_e(),It((g,S)=>({current:S,prev:g.current}),{current:[],prev:[]}),Z(({prev:g})=>g)),[]);oe(O(c,he(g=>g.length>0),Se(h,T),Z(([g,S,I])=>{const B=g.reduce((P,J,ne)=>mt(P,J,_s(J,S.offsetTree,I)||ne),fs());return{...S,groupIndices:g,groupOffsetTree:B}})),h),oe(O(r,Se(h),he(([g,{lastIndex:S}])=>g[{endIndex:S,size:I,startIndex:g}])),a),oe(d,x);const C=ot(O(d,Z(g=>g===void 0)),!0);oe(O(x,he(g=>g!==void 0&&ze(Qe(h).sizeTree)),Z(g=>{const S=Qe(N),I=Qe(c).length>0;return S!==void 0&&S!==0?I?[{endIndex:0,size:S,startIndex:0},{endIndex:1,size:g,startIndex:1}]:[]:[{endIndex:0,size:g,startIndex:0}]})),a),oe(O(m,he(g=>g!==void 0&&g.length>0&&ze(Qe(h).sizeTree)),Z(g=>{const S=[];let I=g[0],B=0;for(let P=1;Pg!==void 0&&S!==void 0),Z(([g,S,I])=>{const B=[];for(let P=0;P({changed:I!==g,sizes:I}),{changed:!1,sizes:j}),Z(g=>g.changed)));Ae(O(l,It((g,S)=>({diff:g.prev-S,prev:S}),{diff:0,prev:0}),Z(g=>g.diff)),g=>{const{groupIndices:S}=Qe(h);if(g>0)we(s,!0),we(o,g+nn(g,S));else if(g<0){const I=Qe(y);I.length>0&&(g-=nn(-g,I)),we(i,g)}}),Ae(O(l,Se(t)),([g,S])=>{g<0&&S("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:l},Xe.ERROR)});const p=xt(o);oe(O(o,Se(h),Z(([g,S])=>{const I=S.groupIndices.length>0,B=[],P=S.lastSize;if(I){const J=Os(S.sizeTree,0);let ne=0,X=0;for(;ne{let E=se.ranges;return se.prevSize!==0&&(E=[...se.ranges,{endIndex:$+g-1,size:se.prevSize,startIndex:se.prevIndex}]),{prevIndex:$+g,prevSize:Y,ranges:E}},{prevIndex:g,prevSize:0,ranges:B}).ranges}return Zt(S.sizeTree).reduce((J,{k:ne,v:X})=>({prevIndex:ne+g,prevSize:X,ranges:[...J.ranges,{endIndex:ne+g-1,size:J.prevSize,startIndex:J.prevIndex}]}),{prevIndex:0,prevSize:P,ranges:[]}).ranges})),a);const z=xt(O(i,Se(h,T),Z(([g,{offsetTree:S},I])=>{const B=-g;return _s(B,S,I)})));return oe(O(i,Se(h,T),Z(([g,S,I])=>{if(S.groupIndices.length>0){if(ze(S.sizeTree))return S;let P=fs();const J=Qe(y);let ne=0,X=0,te=0;for(;ne<-g;){te=J[X];const se=J[X+1]-te-1;X++,ne+=se+1}if(P=Zt(S.sizeTree).reduce((se,{k:$,v:Y})=>mt(se,Math.max(0,$+g),Y),P),ne!==-g){const se=Os(S.sizeTree,te);P=mt(P,0,se);const $=kt(S.sizeTree,-g+1)[1];P=mt(P,1,$)}return{...S,sizeTree:P,...Ya(S.offsetTree,0,P,I)}}const B=Zt(S.sizeTree).reduce((P,{k:J,v:ne})=>mt(P,Math.max(0,J+g),ne),fs());return{...S,sizeTree:B,...Ya(S.offsetTree,0,B,I)}})),h),{beforeUnshiftWith:p,data:w,defaultItemSize:x,firstItemIndex:l,fixedItemSize:d,fixedGroupSize:N,gap:T,groupIndices:c,heightEstimates:m,itemSize:f,listRefresh:D,shiftWith:i,shiftWithOffset:z,sizeRanges:a,sizes:h,statefulTotalCount:n,totalCount:r,trackItemSizes:C,unshiftWith:o}},He(Vt,or),{singleton:!0});function dc(t){return t.reduce((s,a)=>(s.groupIndices.push(s.totalCount),s.totalCount+=a+1,s),{groupIndices:[],totalCount:0})}const Co=Re(([{groupIndices:t,sizes:s,totalCount:a},{headerHeight:r,scrollTop:n}])=>{const o=Ce(),i=Ce(),l=xt(O(o,Z(dc)));return oe(O(l,Z(c=>c.totalCount)),a),oe(O(l,Z(c=>c.groupIndices)),t),oe(O(qe(n,s,r),he(([c,d])=>ga(d)),Z(([c,d,x])=>kt(d.groupOffsetTree,Math.max(c-x,0),"v")[0]),_e(),Z(c=>[c])),i),{groupCounts:o,topItemsIndexes:i}},He(At,ct)),Wt=Re(([{log:t}])=>{const s=Q(!1),a=xt(O(s,he(r=>r),_e()));return Ae(s,r=>{r&&Qe(t)("props updated",{},Xe.DEBUG)}),{didMount:a,propsReady:s}},He(Vt),{singleton:!0}),mc=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function To(t){const s=typeof t=="number"?{index:t}:t;return s.align||(s.align="start"),(!s.behavior||!mc)&&(s.behavior="auto"),s.offset===void 0&&(s.offset=0),s}const Vs=Re(([{gap:t,listRefresh:s,sizes:a,totalCount:r},{fixedFooterHeight:n,fixedHeaderHeight:o,footerHeight:i,headerHeight:l,scrollingInProgress:c,scrollTo:d,smoothScrollTargetReached:x,viewportHeight:N},{log:m}])=>{const f=Ce(),w=Ce(),T=Q(0);let j=null,h=null,y=null;function C(){j!==null&&(j(),j=null),y!==null&&(y(),y=null),h&&(clearTimeout(h),h=null),we(c,!1)}return oe(O(f,Se(a,N,r,T,l,i,m),Se(t,o,n),Z(([[D,p,z,g,S,I,B,P],J,ne,X])=>{const te=To(D),{align:se,behavior:$,offset:Y}=te,E=g-1,U=ko(te,p,E);let W=_s(U,p.offsetTree,J)+I;se==="end"?(W+=ne+kt(p.sizeTree,U)[1]-z+X,U===E&&(W+=B)):se==="center"?W+=(ne+kt(p.sizeTree,U)[1]-z+X)/2:W-=S,Y!==void 0&&Y!==0&&(W+=Y);const ge=L=>{C(),L?(P("retrying to scroll to",{location:D},Xe.DEBUG),we(f,D)):(we(w,!0),P("list did not change, scroll successful",{},Xe.DEBUG))};if(C(),$==="smooth"){let L=!1;y=Ae(s,k=>{L=L||k}),j=wt(x,()=>{ge(L)})}else j=wt(O(s,uc(150)),ge);return h=setTimeout(()=>{C()},1200),we(c,!0),P("scrolling from index to",{behavior:$,index:U,top:W},Xe.DEBUG),{behavior:$,top:W}})),d),{scrollTargetReached:w,scrollToIndex:f,topListHeight:T}},He(At,ct,Vt),{singleton:!0});function uc(t){return s=>{const a=setTimeout(()=>{s(!1)},t);return r=>{r&&(s(!0),clearTimeout(a))}}}function lr(t,s){t===0?s():requestAnimationFrame(()=>{lr(t-1,s)})}function cr(t,s){const a=s-1;return typeof t=="number"?t:t.index==="LAST"?a:t.index}const Ws=Re(([{defaultItemSize:t,listRefresh:s,sizes:a},{scrollTop:r},{scrollTargetReached:n,scrollToIndex:o},{didMount:i}])=>{const l=Q(!0),c=Q(0),d=Q(!0);return oe(O(i,Se(c),he(([x,N])=>N!==0),Tt(!1)),l),oe(O(i,Se(c),he(([x,N])=>N!==0),Tt(!1)),d),Ae(O(qe(s,i),Se(l,a,t,d),he(([[,x],N,{sizeTree:m},f,w])=>x&&(!ze(m)||ar(f))&&!N&&!w),Se(c)),([,x])=>{wt(n,()=>{we(d,!0)}),lr(4,()=>{wt(r,()=>{we(l,!0)}),we(o,x)})}),{initialItemFinalLocationReached:d,initialTopMostItemIndex:c,scrolledToInitialItem:l}},He(At,ct,Vs,Wt),{singleton:!0});function Io(t,s){return Math.abs(t-s)<1.01}const Hs="up",Ds="down",xc="none",hc={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},fc=0,qs=Re(([{footerHeight:t,headerHeight:s,scrollBy:a,scrollContainerState:r,scrollTop:n,viewportHeight:o}])=>{const i=Q(!1),l=Q(!0),c=Ce(),d=Ce(),x=Q(4),N=Q(fc),m=ot(O(Ua(O(xe(n),as(1),Tt(!0)),O(xe(n),as(1),Tt(!1),sn(100))),_e()),!1),f=ot(O(Ua(O(a,Tt(!0)),O(a,Tt(!1),sn(200))),_e()),!1);oe(O(qe(xe(n),xe(N)),Z(([y,C])=>y<=C),_e()),l),oe(O(l,$t(50)),d);const w=xt(O(qe(r,xe(o),xe(s),xe(t),xe(x)),It((y,[{scrollHeight:C,scrollTop:D},p,z,g,S])=>{const I=D+p-C>-S,B={scrollHeight:C,scrollTop:D,viewportHeight:p};if(I){let J,ne;return D>y.state.scrollTop?(J="SCROLLED_DOWN",ne=y.state.scrollTop-D):(J="SIZE_DECREASED",ne=y.state.scrollTop-D||y.scrollTopDelta),{atBottom:!0,atBottomBecause:J,scrollTopDelta:ne,state:B}}let P;return B.scrollHeight>y.state.scrollHeight?P="SIZE_INCREASED":py!==void 0&&y.atBottom===C.atBottom))),T=ot(O(r,It((y,{scrollHeight:C,scrollTop:D,viewportHeight:p})=>{if(!Io(y.scrollHeight,C)){const z=C-(D+p)<1;return y.scrollTop!==D&&z?{changed:!0,jump:y.scrollTop-D,scrollHeight:C,scrollTop:D}:{changed:!0,jump:0,scrollHeight:C,scrollTop:D}}return{changed:!1,jump:0,scrollHeight:C,scrollTop:D}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),he(y=>y.changed),Z(y=>y.jump)),0);oe(O(w,Z(y=>y.atBottom)),i),oe(O(i,$t(50)),c);const j=Q(Ds);oe(O(r,Z(({scrollTop:y})=>y),_e(),It((y,C)=>Qe(f)?{direction:y.direction,prevScrollTop:C}:{direction:Cy.direction)),j),oe(O(r,$t(50),Tt(xc)),j);const h=Q(0);return oe(O(m,he(y=>!y),Tt(0)),h),oe(O(n,$t(100),Se(m),he(([y,C])=>C),It(([y,C],[D])=>[C,D],[0,0]),Z(([y,C])=>C-y)),h),{atBottomState:w,atBottomStateChange:c,atBottomThreshold:x,atTopStateChange:d,atTopThreshold:N,isAtBottom:i,isAtTop:l,isScrolling:m,lastJumpDueToItemResize:T,scrollDirection:j,scrollVelocity:h}},He(ct)),Gs="top",Qs="bottom",on="none";function ln(t,s,a){return typeof t=="number"?a===Hs&&s===Gs||a===Ds&&s===Qs?t:0:a===Hs?s===Gs?t.main:t.reverse:s===Qs?t.main:t.reverse}function cn(t,s){return typeof t=="number"?t:t[s]??0}const dr=Re(([{deviation:t,fixedHeaderHeight:s,headerHeight:a,scrollTop:r,viewportHeight:n}])=>{const o=Ce(),i=Q(0),l=Q(0),c=Q(0),d=ot(O(qe(xe(r),xe(n),xe(a),xe(o,Ps),xe(c),xe(i),xe(s),xe(t),xe(l)),Z(([x,N,m,[f,w],T,j,h,y,C])=>{const D=x-y,p=j+h,z=Math.max(m-D,0);let g=on;const S=cn(C,Gs),I=cn(C,Qs);return f-=y,f+=m+h,w+=m+h,w-=y,f>x+p-S&&(g=Hs),wx!==null),_e(Ps)),[0,0]);return{increaseViewportBy:l,listBoundary:o,overscan:c,topListHeight:i,visibleRange:d}},He(ct),{singleton:!0});function pc(t,s,a){if(ga(s)){const r=So(t,s);return[{index:kt(s.groupOffsetTree,r)[0],offset:0,size:0},{data:a?.[0],index:r,offset:0,size:0}]}return[{data:a?.[0],index:t,offset:0,size:0}]}const Ma={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function na(t,s,a,r,n,o){const{lastIndex:i,lastOffset:l,lastSize:c}=n;let d=0,x=0;if(t.length>0){d=t[0].offset;const T=t[t.length-1];x=T.offset+T.size}const N=a-i,m=l+N*c+(N-1)*r,f=d,w=m-x;return{bottom:x,firstItemIndex:o,items:dn(t,n,o),offsetBottom:w,offsetTop:d,top:f,topItems:dn(s,n,o),topListHeight:s.reduce((T,j)=>j.size+T,0),totalCount:a}}function Eo(t,s,a,r,n,o){let i=0;if(a.groupIndices.length>0)for(const x of a.groupIndices){if(x-i>=t)break;i++}const l=t+i,c=cr(s,l),d=Array.from({length:l}).map((x,N)=>({data:o[N+c],index:N+c,offset:0,size:0}));return na(d,[],l,n,a,r)}function dn(t,s,a){if(t.length===0)return[];if(!ga(s))return t.map(d=>({...d,index:d.index+a,originalIndex:d.index}));const r=t[0].index,n=t[t.length-1].index,o=[],i=ps(s.groupOffsetTree,r,n);let l,c=0;for(const d of t){(!l||l.end{const T=Q([]),j=Q(0),h=Ce(),y=Q(0);oe(o.topItemsIndexes,T);const C=ot(O(qe(f,w,xe(c,Ps),xe(n),xe(r),xe(d),x,xe(T),xe(s),xe(a),xe(y),t),he(([g,S,,I,,,,,,,,B])=>{const P=B!==void 0&&B.length!==I;return g&&!S&&!P}),Z(([,,[g,S],I,B,P,J,ne,X,te,se,$])=>{const Y=B,{offsetTree:E,sizeTree:U}=Y,W=Qe(j);if(I===0)return{...Ma,totalCount:I};if(g===0&&S===0)return W===0?{...Ma,totalCount:I}:Eo(W,P,B,X,te,$||[]);if(ze(U))return W>0?null:na(pc(cr(P,I),Y,$),[],I,te,Y,X);const ge=[];if(ne.length>0){const H=ne[0],q=ne[ne.length-1];let ae=0;for(const ee of ps(U,H,q)){const V=ee.value,pe=Math.max(ee.start,H),Me=Math.min(ee.end,q);for(let ye=pe;ye<=Me;ye++)ge.push({data:$?.[ye],index:ye,offset:ae,size:V}),ae+=V}}if(!J)return na([],ge,I,te,Y,X);const L=ne.length>0?ne[ne.length-1]+1:0,k=rc(E,g,S,L);if(k.length===0)return null;const G=I-1,F=pa([],H=>{for(const q of k){const ae=q.value;let ee=ae.offset,V=q.start;const pe=ae.size;if(ae.offset=S);ye++)H.push({data:$?.[ye],index:ye,offset:ee,size:pe}),ee+=pe+te}}),ie=mn(se,Gs),R=mn(se,Qs);if(F.length>0&&(ie>0||R>0)){const H=F[0],q=F[F.length-1];if(ie>0&&H.index>L){const ae=Math.min(ie,H.index-L),ee=[];let V=H.offset;for(let pe=H.index-1;pe>=H.index-ae;pe--){const Me=ps(U,pe,pe)[0]?.value??H.size;V-=Me+te,ee.unshift({data:$?.[pe],index:pe,offset:V,size:Me})}F.unshift(...ee)}if(R>0&&q.indexg!==null),_e()),Ma);oe(O(t,he(ar),Z(g=>g?.length)),n),oe(O(C,Z(g=>g.topListHeight)),N),oe(N,l),oe(O(C,Z(g=>[g.top,g.bottom])),i),oe(O(C,Z(g=>g.items)),h);const D=xt(O(C,he(({items:g})=>g.length>0),Se(n,t),he(([{items:g},S])=>g[g.length-1].originalIndex===S-1),Z(([,g,S])=>[g-1,S]),_e(Ps),Z(([g])=>g))),p=xt(O(C,$t(200),he(({items:g,topItems:S})=>g.length>0&&g[0].originalIndex===S.length),Z(({items:g})=>g[0].index),_e())),z=xt(O(C,he(({items:g})=>g.length>0),Z(({items:g})=>{let S=0,I=g.length-1;for(;g[S].type==="group"&&SS;)I--;return{endIndex:g[I].index,startIndex:g[S].index}}),_e(yo)));return{endReached:D,initialItemCount:j,itemsRendered:h,listState:C,minOverscanItemCount:y,rangeChanged:z,startReached:p,topItemsIndexes:T,...m}},He(At,Co,dr,Ws,Vs,qs,Wt,or),{singleton:!0}),Ro=Re(([{fixedFooterHeight:t,fixedHeaderHeight:s,footerHeight:a,headerHeight:r},{listState:n}])=>{const o=Ce(),i=ot(O(qe(a,t,r,s,n),Z(([l,c,d,x,N])=>l+c+d+x+N.offsetBottom+N.bottom)),0);return oe(xe(i),o),{totalListHeight:i,totalListHeightChanged:o}},He(ct,os),{singleton:!0}),gc=Re(([{viewportHeight:t},{totalListHeight:s}])=>{const a=Q(!1),r=ot(O(qe(a,t,s),he(([n])=>n),Z(([,n,o])=>Math.max(0,n-o)),$t(0),_e()),0);return{alignToBottom:a,paddingTopAddition:r}},He(ct,Ro),{singleton:!0}),Mo=Re(()=>({context:Q(null)})),bc=({itemBottom:t,itemTop:s,locationParams:{align:a,behavior:r,...n},viewportBottom:o,viewportTop:i})=>so?{...n,align:a??"end",...r!==void 0?{behavior:r}:{}}:null,Ao=Re(([{gap:t,sizes:s,totalCount:a},{fixedFooterHeight:r,fixedHeaderHeight:n,headerHeight:o,scrollingInProgress:i,scrollTop:l,viewportHeight:c},{scrollToIndex:d}])=>{const x=Ce();return oe(O(x,Se(s,c,a,o,n,r,l),Se(t),Z(([[N,m,f,w,T,j,h,y],C])=>{const{calculateViewLocation:D=bc,done:p,...z}=N,g=ko(N,m,w-1),S=_s(g,m.offsetTree,C)+T+j,I=S+kt(m.sizeTree,g)[1],B=y+j,P=y+f-h,J=D({itemBottom:I,itemTop:S,locationParams:z,viewportBottom:P,viewportTop:B});return J!==null?p&&wt(O(i,he(ne=>!ne),as(Qe(i)?1:2)),p):p?.(),J}),he(N=>N!==null)),d),{scrollIntoView:x}},He(At,ct,Vs,os,Vt),{singleton:!0});function un(t){return t===!1?!1:t==="smooth"?"smooth":"auto"}const vc=(t,s)=>typeof t=="function"?un(t(s)):s&&un(t),Nc=Re(([{listRefresh:t,totalCount:s,fixedItemSize:a,data:r},{atBottomState:n,isAtBottom:o},{scrollToIndex:i},{scrolledToInitialItem:l},{didMount:c,propsReady:d},{log:x},{scrollingInProgress:N},{context:m},{scrollIntoView:f}])=>{const w=Q(!1),T=Ce();let j=null;function h(p){we(i,{align:"end",behavior:p,index:"LAST"})}Ae(O(qe(O(xe(s),as(1)),c),Se(xe(w),o,l,N),Z(([[p,z],g,S,I,B])=>{let P=z&&I,J="auto";return P&&(J=vc(g,S||B),P=P&&J!==!1),{followOutputBehavior:J,shouldFollow:P,totalCount:p}}),he(({shouldFollow:p})=>p)),({followOutputBehavior:p,totalCount:z})=>{j!==null&&(j(),j=null),Qe(a)!==void 0?requestAnimationFrame(()=>{Qe(x)("following output to ",{totalCount:z},Xe.DEBUG),h(p)}):j=wt(t,()=>{Qe(x)("following output to ",{totalCount:z},Xe.DEBUG),h(p),j=null})});function y(p){const z=wt(n,g=>{p&&!g.atBottom&&g.notAtBottomBecause==="SIZE_INCREASED"&&j===null&&(Qe(x)("scrolling to bottom due to increased size",{},Xe.DEBUG),h("auto"))});setTimeout(z,100)}Ae(O(qe(xe(w),s,d),he(([p,,z])=>p!==!1&&z),It(({value:p},[,z])=>({refreshed:p===z,value:z}),{refreshed:!1,value:0}),he(({refreshed:p})=>p),Se(w,s)),([,p])=>{Qe(l)&&y(p!==!1)}),Ae(T,()=>{y(Qe(w)!==!1)}),Ae(qe(xe(w),n),([p,z])=>{p!==!1&&!z.atBottom&&z.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&h("auto")});const C=Q(null),D=Ce();return oe(Ua(O(xe(r),Z(p=>p?.length??0)),O(xe(s))),D),Ae(O(qe(O(D,as(1)),c),Se(xe(C),l,N,m),Z(([[p,z],g,S,I,B])=>z&&S&&g?.({context:B,totalCount:p,scrollingInProgress:I})),he(p=>!!p),$t(0)),p=>{j!==null&&(j(),j=null),Qe(a)!==void 0?requestAnimationFrame(()=>{Qe(x)("scrolling into view",{}),we(f,p)}):j=wt(t,()=>{Qe(x)("scrolling into view",{}),we(f,p),j=null})}),{autoscrollToBottom:T,followOutput:w,scrollIntoViewOnChange:C}},He(At,qs,Vs,Ws,Wt,Vt,ct,Mo,Ao)),jc=Re(([{data:t,firstItemIndex:s,gap:a,sizes:r},{initialTopMostItemIndex:n},{initialItemCount:o,listState:i},{didMount:l}])=>(oe(O(l,Se(o),he(([,c])=>c!==0),Se(n,r,s,a,t),Z(([[,c],d,x,N,m,f=[]])=>Eo(c,d,x,N,m,f))),i),{}),He(At,Ws,os,Wt),{singleton:!0}),yc=Re(([{didMount:t},{scrollTo:s},{listState:a}])=>{const r=Q(0);return Ae(O(t,Se(r),he(([,n])=>n!==0),Z(([,n])=>({top:n}))),n=>{wt(O(a,as(1),he(o=>o.items.length>1)),()=>{requestAnimationFrame(()=>{we(s,n)})})}),{initialScrollTop:r}},He(Wt,ct,os),{singleton:!0}),Lo=Re(([{scrollVelocity:t}])=>{const s=Q(!1),a=Ce(),r=Q(!1);return oe(O(t,Se(r,s,a),he(([n,o])=>o!==!1&&o!==void 0),Z(([n,o,i,l])=>{const{enter:c,exit:d}=o;if(i){if(d(n,l))return!1}else if(c(n,l))return!0;return i}),_e()),s),Ae(O(qe(s,t,a),Se(r)),([[n,o,i],l])=>{n&&l!==!1&&l!==void 0&&l.change&&l.change(o,i)}),{isSeeking:s,scrollSeekConfiguration:r,scrollSeekRangeChanged:a,scrollVelocity:t}},He(qs),{singleton:!0}),mr=Re(([{scrollContainerState:t,scrollTo:s}])=>{const a=Ce(),r=Ce(),n=Ce(),o=Q(!1),i=Q(void 0);return oe(O(qe(a,r),Z(([{scrollTop:l,viewportHeight:c},{offsetTop:d,listHeight:x}])=>({scrollHeight:x,scrollTop:Math.max(0,l-d),viewportHeight:c}))),t),oe(O(s,Se(r),Z(([l,{offsetTop:c}])=>({...l,top:l.top+c}))),n),{customScrollParent:i,useWindowScroll:o,windowScrollContainerState:a,windowScrollTo:n,windowViewportRect:r}},He(ct)),wc=Re(([{sizeRanges:t,sizes:s},{headerHeight:a,scrollTop:r},{initialTopMostItemIndex:n},{didMount:o},{useWindowScroll:i,windowScrollContainerState:l,windowViewportRect:c}])=>{const d=Ce(),x=Q(void 0),N=Q(null),m=Q(null);return oe(l,N),oe(c,m),Ae(O(d,Se(s,r,i,N,m,a)),([f,w,T,j,h,y,C])=>{const D=oc(w.sizeTree);j&&h!==null&&y!==null&&(T=h.scrollTop-y.offsetTop),T-=C,f({ranges:D,scrollTop:T})}),oe(O(x,he(ar),Z(Sc)),n),oe(O(o,Se(x),he(([,f])=>f!==void 0),_e(),Z(([,f])=>f.ranges)),t),{getState:d,restoreStateFrom:x}},He(At,ct,Ws,Wt,mr));function Sc(t){return{align:"start",index:0,offset:t.scrollTop}}const kc=Re(([{topItemsIndexes:t}])=>{const s=Q(0);return oe(O(s,he(a=>a>=0),Z(a=>Array.from({length:a}).map((r,n)=>n))),t),{topItemCount:s}},He(os));function Do(t){let s=!1,a;return(()=>(s||(s=!0,a=t()),a))}const Cc=Do(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),Tc=Re(([{deviation:t,scrollBy:s,scrollingInProgress:a,scrollTop:r},{isAtBottom:n,isScrolling:o,lastJumpDueToItemResize:i,scrollDirection:l},{listState:c},{beforeUnshiftWith:d,gap:x,shiftWithOffset:N,sizes:m},{log:f},{recalcInProgress:w}])=>{const T=xt(O(c,Se(i),It(([,h,y,C],[{bottom:D,items:p,offsetBottom:z,totalCount:g},S])=>{const I=D+z;let B=0;return y===g&&h.length>0&&p.length>0&&(p[0].originalIndex===0&&h[0].originalIndex===0||(B=I-C,B!==0&&(B+=S))),[B,p,g,I]},[0,[],0,0]),he(([h])=>h!==0),Se(r,l,a,n,f,w),he(([,h,y,C,,,D])=>!D&&!C&&h!==0&&y===Hs),Z(([[h],,,,,y])=>(y("Upward scrolling compensation",{amount:h},Xe.DEBUG),h))));function j(h){h>0?(we(s,{behavior:"auto",top:-h}),we(t,0)):(we(t,0),we(s,{behavior:"auto",top:-h}))}return Ae(O(T,Se(t,o)),([h,y,C])=>{C&&Cc()?we(t,y-h):j(-h)}),Ae(O(qe(ot(o,!1),t,w),he(([h,y,C])=>!h&&!C&&y!==0),Z(([h,y])=>y),$t(1)),j),oe(O(N,Z(h=>({top:-h}))),s),Ae(O(d,Se(m,x),Z(([h,{groupIndices:y,lastSize:C,sizeTree:D},p])=>{function z(P){return P*(C+p)}if(y.length===0)return z(h);let g=0;const S=Os(D,0);let I=0,B=0;for(;Ih&&(g-=S,P=h-I+1),I+=P,g+=z(P),B++}return g})),h=>{we(t,h),requestAnimationFrame(()=>{we(s,{top:h}),requestAnimationFrame(()=>{we(t,0),we(w,!1)})})}),{deviation:t}},He(ct,qs,os,At,Vt,or)),Ic=Re(([t,s,a,r,n,o,i,l,c,d,x])=>({...t,...s,...a,...r,...n,...o,...i,...l,...c,...d,...x}),He(dr,jc,Wt,Lo,Ro,yc,gc,mr,Ao,Vt,Mo)),zo=Re(([{data:t,defaultItemSize:s,firstItemIndex:a,fixedItemSize:r,fixedGroupSize:n,gap:o,groupIndices:i,heightEstimates:l,itemSize:c,sizeRanges:d,sizes:x,statefulTotalCount:N,totalCount:m,trackItemSizes:f},{initialItemFinalLocationReached:w,initialTopMostItemIndex:T,scrolledToInitialItem:j},h,y,C,D,{scrollToIndex:p},z,{topItemCount:g},{groupCounts:S},I])=>{const{listState:B,minOverscanItemCount:P,topItemsIndexes:J,rangeChanged:ne,...X}=D;return oe(ne,I.scrollSeekRangeChanged),oe(O(I.windowViewportRect,Z(te=>te.visibleHeight)),h.viewportHeight),{data:t,defaultItemHeight:s,firstItemIndex:a,fixedItemHeight:r,fixedGroupHeight:n,gap:o,groupCounts:S,heightEstimates:l,initialItemFinalLocationReached:w,initialTopMostItemIndex:T,scrolledToInitialItem:j,sizeRanges:d,topItemCount:g,topItemsIndexes:J,totalCount:m,...C,groupIndices:i,itemSize:c,listState:B,minOverscanItemCount:P,scrollToIndex:p,statefulTotalCount:N,trackItemSizes:f,rangeChanged:ne,...X,...I,...h,sizes:x,...y}},He(At,Ws,ct,wc,Nc,os,Vs,Tc,kc,Co,Ic));function Ec(t,s){const a={},r={};let n=0;const o=t.length;for(;n(h[y]=C=>{const D=j[s.methods[y]];we(D,C)},h),{})}function x(j){return i.reduce((h,y)=>(h[y]=Ul(j[s.events[y]]),h),{})}const N=re.forwardRef(function(j,h){const{children:y,...C}=j,[D]=re.useState(()=>pa(Wl(t),g=>{c(g,C)})),[p]=re.useState(tn(x,D));Js(()=>{for(const g of i)g in C&&Ae(p[g],C[g]);return()=>{Object.values(p).map(rr)}},[C,p,D]),Js(()=>{c(D,C)}),re.useImperativeHandle(h,en(d(D)));const z=a;return e.jsx(l.Provider,{value:D,children:a!==void 0?e.jsx(z,{...Ec([...r,...n,...i],C),children:y}):y})}),m=j=>{const h=re.useContext(l);return re.useCallback(y=>{we(h[j],y)},[h,j])},f=j=>{const h=re.useContext(l)[j],y=re.useCallback(C=>Ae(h,C),[h]);return re.useSyncExternalStore(y,()=>Qe(h),()=>Qe(h))},w=j=>{const h=re.useContext(l)[j],[y,C]=re.useState(tn(Qe,h));return Js(()=>Ae(h,D=>{D!==y&&C(en(D))}),[h,y]),y},T=parseInt(re.version)>=18?f:w;return{Component:N,useEmitter:(j,h)=>{const y=re.useContext(l)[j];Js(()=>Ae(y,h),[h,y])},useEmitterValue:T,usePublisher:m}}const Bo=re.createContext(void 0),$o=re.createContext(void 0),Aa="-webkit-sticky",xn="sticky",ur=Do(()=>{if(typeof document>"u")return xn;const t=document.createElement("div");return t.style.position=Aa,t.style.position===Aa?Aa:xn}),Oo=typeof document<"u"?re.useLayoutEffect:re.useEffect;function La(t){return"self"in t}function Rc(t){return"body"in t}function Po(t,s,a,r=Ns,n,o){const i=re.useRef(null),l=re.useRef(null),c=re.useRef(null),d=re.useCallback(m=>{let f,w,T;const j=m.target;if(Rc(j)||La(j)){const y=La(j)?j:j.defaultView;T=o===!0?y.scrollX:y.scrollY,f=o===!0?y.document.documentElement.scrollWidth:y.document.documentElement.scrollHeight,w=o===!0?y.innerWidth:y.innerHeight}else T=o===!0?j.scrollLeft:j.scrollTop,f=o===!0?j.scrollWidth:j.scrollHeight,w=o===!0?j.offsetWidth:j.offsetHeight;const h=()=>{t({scrollHeight:f,scrollTop:Math.max(T,0),viewportHeight:w})};m.suppressFlushSync===!0?h():Ti.flushSync(h),l.current!==null&&(T===l.current||T<=0||T===f-w)&&(l.current=null,s(!0),c.current&&(clearTimeout(c.current),c.current=null))},[t,s,o]);re.useEffect(()=>{const m=n||i.current;return r(n||i.current),d({suppressFlushSync:!0,target:m}),m.addEventListener("scroll",d,{passive:!0}),()=>{r(null),m.removeEventListener("scroll",d)}},[i,d,a,r,n]);function x(m){const f=i.current;if(!f||(o===!0?"offsetWidth"in f&&f.offsetWidth===0:"offsetHeight"in f&&f.offsetHeight===0))return;const w=m.behavior==="smooth";let T,j,h;La(f)?(j=Math.max(Qt(f.document.documentElement,o===!0?"width":"height"),o===!0?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight),T=o===!0?f.innerWidth:f.innerHeight,h=o===!0?window.scrollX:window.scrollY):(j=f[o===!0?"scrollWidth":"scrollHeight"],T=Qt(f,o===!0?"width":"height"),h=f[o===!0?"scrollLeft":"scrollTop"]);const y=j-T;if(m.top=Math.ceil(Math.max(Math.min(y,m.top),0)),Io(T,j)||m.top===h){t({scrollHeight:j,scrollTop:h,viewportHeight:T}),w&&s(!0);return}w?(l.current=m.top,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{c.current=null,l.current=null,s(!0)},1e3)):l.current=null,o===!0&&(m={...m.behavior!==void 0?{behavior:m.behavior}:{},left:m.top}),f.scrollTo(m)}function N(m){o===!0&&(m={...m.behavior!==void 0?{behavior:m.behavior}:{},...m.top!==void 0?{left:m.top}:{}}),i.current.scrollBy(m)}return{scrollByCallback:N,scrollerRef:i,scrollToCallback:x}}function xr(t){return t}const Mc=Re(()=>{const t=Q(l=>`Item ${l}`),s=Q(l=>`Group ${l}`),a=Q({}),r=Q(xr),n=Q("div"),o=Q(Ns),i=(l,c=null)=>ot(O(a,Z(d=>d[l]),_e()),c);return{components:a,computeItemKey:r,EmptyPlaceholder:i("EmptyPlaceholder"),FooterComponent:i("Footer"),GroupComponent:i("Group","div"),groupContent:s,HeaderComponent:i("Header"),HeaderFooterTag:n,ItemComponent:i("Item","div"),itemContent:t,ListComponent:i("List","div"),ScrollerComponent:i("Scroller","div"),scrollerRef:o,ScrollSeekPlaceholder:i("ScrollSeekPlaceholder"),TopItemListComponent:i("TopItemList")}}),Ac=Re(([t,s])=>({...t,...s}),He(zo,Mc)),Lc=({height:t})=>e.jsx("div",{style:{height:t}}),Dc={overflowAnchor:"none",position:ur(),zIndex:1},_o={overflowAnchor:"none"},zc={..._o,display:"inline-block",height:"100%"},hn=re.memo(function({showTopList:t=!1}){const s=ve("listState"),a=gt("sizeRanges"),r=ve("useWindowScroll"),n=ve("customScrollParent"),o=gt("windowScrollContainerState"),i=gt("scrollContainerState"),l=n||r?o:i,c=ve("itemContent"),d=ve("context"),x=ve("groupContent"),N=ve("trackItemSizes"),m=ve("itemSize"),f=ve("log"),w=gt("gap"),T=ve("horizontalDirection"),{callbackRef:j}=Kl(a,m,N,t?Ns:l,f,w,n,T,ve("skipAnimationFrameInResizeObserver")),[h,y]=re.useState(0);fr("deviation",X=>{h!==X&&y(X)});const C=ve("EmptyPlaceholder"),D=ve("ScrollSeekPlaceholder")??Lc,p=ve("ListComponent"),z=ve("ItemComponent"),g=ve("GroupComponent"),S=ve("computeItemKey"),I=ve("isSeeking"),B=ve("groupIndices").length>0,P=ve("alignToBottom"),J=ve("initialItemFinalLocationReached"),ne=t?{}:{boxSizing:"border-box",...T?{display:"inline-block",height:"100%",marginLeft:h!==0?h:P?"auto":0,paddingLeft:s.offsetTop,paddingRight:s.offsetBottom,whiteSpace:"nowrap"}:{marginTop:h!==0?h:P?"auto":0,paddingBottom:s.offsetBottom,paddingTop:s.offsetTop},...J?{}:{visibility:"hidden"}};return!t&&s.totalCount===0&&C!==null&&C!==void 0?e.jsx(C,{...nt(C,d)}):e.jsx(p,{...nt(p,d),"data-testid":t?"virtuoso-top-item-list":"virtuoso-item-list",ref:j,style:ne,children:(t?s.topItems:s.items).map(X=>{const te=X.originalIndex,se=S(te+s.firstItemIndex,X.data,d);return I?b.createElement(D,{...nt(D,d),height:X.size,index:X.index,key:se,type:X.type||"item",...X.type==="group"?{}:{groupIndex:X.groupIndex}}):X.type==="group"?b.createElement(g,{...nt(g,d),"data-index":te,"data-item-index":X.index,"data-known-size":X.size,key:se,style:Dc},x(X.index,d)):b.createElement(z,{...nt(z,d),...Oc(z,X.data),"data-index":te,"data-item-group-index":X.groupIndex,"data-item-index":X.index,"data-known-size":X.size,key:se,style:T?zc:_o},B?c(X.index,X.groupIndex,X.data,d):c(X.index,X.data,d))})})}),Fc={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Bc={outline:"none",overflowX:"auto",position:"relative"},hr=t=>({height:"100%",position:"absolute",top:0,width:"100%",...t?{display:"flex",flexDirection:"column"}:void 0}),Ho=(t,s,a=0)=>({...hr(t),position:s?"relative":"absolute",top:s?-a:0}),$c={position:ur(),top:0,width:"100%",zIndex:1};function nt(t,s){if(typeof t!="string")return{context:s}}function Oc(t,s){return{item:typeof t=="string"?void 0:s}}const Pc=re.memo(function(){const t=ve("HeaderComponent"),s=gt("headerHeight"),a=ve("HeaderFooterTag"),r=ns(re.useMemo(()=>o=>{s(Qt(o,"height"))},[s]),!0,ve("skipAnimationFrameInResizeObserver")),n=ve("context");return t!=null?e.jsx(a,{ref:r,children:e.jsx(t,{...nt(t,n)})}):null}),_c=re.memo(function(){const t=ve("FooterComponent"),s=gt("footerHeight"),a=ve("HeaderFooterTag"),r=ns(re.useMemo(()=>o=>{s(Qt(o,"height"))},[s]),!0,ve("skipAnimationFrameInResizeObserver")),n=ve("context");return t!=null?e.jsx(a,{ref:r,children:e.jsx(t,{...nt(t,n)})}):null});function Go({useEmitter:t,useEmitterValue:s,usePublisher:a}){return re.memo(function({children:r,style:n,context:o,...i}){const l=a("scrollContainerState"),c=s("ScrollerComponent"),d=a("smoothScrollTargetReached"),x=s("scrollerRef"),N=s("horizontalDirection")||!1,{scrollByCallback:m,scrollerRef:f,scrollToCallback:w}=Po(l,d,c,x,void 0,N);return t("scrollTo",w),t("scrollBy",m),e.jsx(c,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:f,style:{...N?Bc:Fc,...n},tabIndex:0,...i,...nt(c,o),children:r})})}function Qo({useEmitter:t,useEmitterValue:s,usePublisher:a}){return re.memo(function({children:r,style:n,context:o,...i}){const l=a("windowScrollContainerState"),c=s("ScrollerComponent"),d=a("smoothScrollTargetReached"),x=s("totalListHeight"),N=s("deviation"),m=s("customScrollParent"),f=re.useRef(null),w=s("scrollerRef"),{scrollByCallback:T,scrollerRef:j,scrollToCallback:h}=Po(l,d,c,w,m);return Oo(()=>(j.current=m||f.current?.ownerDocument.defaultView,()=>{j.current=null}),[j,m]),t("windowScrollTo",h),t("scrollBy",T),e.jsx(c,{ref:f,"data-virtuoso-scroller":!0,style:{position:"relative",...n,...x!==0?{height:x+N}:void 0},...i,...nt(c,o),children:r})})}const Hc=({children:t})=>{const s=re.useContext(Bo),a=gt("viewportHeight"),r=gt("fixedItemHeight"),n=ve("alignToBottom"),o=ve("horizontalDirection"),i=re.useMemo(()=>ho(a,c=>Qt(c,o?"width":"height")),[a,o]),l=ns(i,!0,ve("skipAnimationFrameInResizeObserver"));return re.useEffect(()=>{s&&(a(s.viewportHeight),r(s.itemHeight))},[s,a,r]),e.jsx("div",{"data-viewport-type":"element",ref:l,style:hr(n),children:t})},Gc=({children:t})=>{const s=re.useContext(Bo),a=gt("windowViewportRect"),r=gt("fixedItemHeight"),n=ve("customScrollParent"),o=ve("useWindowScroll"),i=ve("topListHeight"),l=po(a,n,ve("skipAnimationFrameInResizeObserver")),c=ve("alignToBottom");return re.useEffect(()=>{s&&(r(s.itemHeight),a({listHeight:0,offsetTop:0,visibleHeight:s.viewportHeight,visibleWidth:100}))},[s,a,r]),e.jsx("div",{"data-viewport-type":"window",ref:l,style:Ho(c,o,i),children:t})},Qc=({children:t})=>{const s=ve("TopItemListComponent")??"div",a=ve("headerHeight"),r={...$c,marginTop:`${a}px`},n=ve("context");return e.jsx(s,{style:r,...nt(s,n),children:t})},Uc=re.memo(function(t){const s=ve("useWindowScroll"),a=ve("topItemsIndexes").length>0,r=ve("customScrollParent"),n=ve("context");return e.jsxs(r||s?qc:Wc,{...t,context:n,children:[a&&e.jsx(Qc,{children:e.jsx(hn,{showTopList:!0})}),e.jsxs(r||s?Gc:Hc,{children:[e.jsx(Pc,{}),e.jsx(hn,{}),e.jsx(_c,{})]})]})}),{Component:Vc,useEmitter:fr,useEmitterValue:ve,usePublisher:gt}=Fo(Ac,{optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},Uc),Wc=Go({useEmitter:fr,useEmitterValue:ve,usePublisher:gt}),qc=Qo({useEmitter:fr,useEmitterValue:ve,usePublisher:gt}),Yc=Vc,Kc=Re(()=>{const t=Q(d=>e.jsxs("td",{children:["Item $",d]})),s=Q(null),a=Q(d=>e.jsxs("td",{colSpan:1e3,children:["Group ",d]})),r=Q(null),n=Q(null),o=Q({}),i=Q(xr),l=Q(Ns),c=(d,x=null)=>ot(O(o,Z(N=>N[d]),_e()),x);return{components:o,computeItemKey:i,context:s,EmptyPlaceholder:c("EmptyPlaceholder"),FillerRow:c("FillerRow"),fixedFooterContent:n,fixedHeaderContent:r,itemContent:t,groupContent:a,ScrollerComponent:c("Scroller","div"),scrollerRef:l,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder"),TableBodyComponent:c("TableBody","tbody"),TableComponent:c("Table","table"),TableFooterComponent:c("TableFoot","tfoot"),TableHeadComponent:c("TableHead","thead"),TableRowComponent:c("TableRow","tr"),GroupComponent:c("Group","tr")}});He(zo,Kc);ur();const fn={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},Xc={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:pn,floor:ua,max:zs,min:Da,round:gn}=Math;function bn(t,s,a){return Array.from({length:s-t+1}).map((r,n)=>({data:a===null?null:a[n+t],index:n+t}))}function Jc(t){return{...Xc,items:t}}function Zs(t,s){return t!==void 0&&t.width===s.width&&t.height===s.height}function Zc(t,s){return t!==void 0&&t.column===s.column&&t.row===s.row}const ed=Re(([{increaseViewportBy:t,listBoundary:s,overscan:a,visibleRange:r},{footerHeight:n,headerHeight:o,scrollBy:i,scrollContainerState:l,scrollTo:c,scrollTop:d,smoothScrollTargetReached:x,viewportHeight:N},m,f,{didMount:w,propsReady:T},{customScrollParent:j,useWindowScroll:h,windowScrollContainerState:y,windowScrollTo:C,windowViewportRect:D},p])=>{const z=Q(0),g=Q(0),S=Q(fn),I=Q({height:0,width:0}),B=Q({height:0,width:0}),P=Ce(),J=Ce(),ne=Q(0),X=Q(null),te=Q({column:0,row:0}),se=Ce(),$=Ce(),Y=Q(!1),E=Q(0),U=Q(!0),W=Q(!1),ge=Q(!1);Ae(O(w,Se(E),he(([R,H])=>H!==0)),()=>{we(U,!1)}),Ae(O(qe(w,U,B,I,E,W),he(([R,H,q,ae,,ee])=>R&&!H&&q.height!==0&&ae.height!==0&&!ee)),([,,,,R])=>{we(W,!0),lr(1,()=>{we(P,R)}),wt(O(d),()=>{we(s,[0,0]),we(U,!0)})}),oe(O($,he(R=>R!=null&&R.scrollTop>0),Tt(0)),g),Ae(O(w,Se($),he(([,R])=>R!=null)),([,R])=>{R&&(we(I,R.viewport),we(B,R.item),we(te,R.gap),R.scrollTop>0&&(we(Y,!0),wt(O(d,as(1)),H=>{we(Y,!1)}),we(c,{top:R.scrollTop})))}),oe(O(I,Z(({height:R})=>R)),N),oe(O(qe(xe(I,Zs),xe(B,Zs),xe(te,(R,H)=>R!==void 0&&R.column===H.column&&R.row===H.row),xe(d)),Z(([R,H,q,ae])=>({gap:q,item:H,scrollTop:ae,viewport:R}))),se),oe(O(qe(xe(z),r,xe(te,Zc),xe(B,Zs),xe(I,Zs),xe(X),xe(g),xe(Y),xe(U),xe(E)),he(([,,,,,,,R])=>!R),Z(([R,[H,q],ae,ee,V,pe,Me,,ye,De])=>{const{column:Ge,row:v}=ae,{height:_,width:le}=ee,{width:de}=V;if(Me===0&&(R===0||de===0))return fn;if(le===0){const Dt=cr(De,R),K=Dt+Math.max(Me-1,0);return Jc(bn(Dt,K,pe))}const Fe=Uo(de,le,Ge);let be,Oe;ye?H===0&&q===0&&Me>0?(be=0,Oe=Me-1):(be=Fe*ua((H+v)/(_+v)),Oe=Fe*pn((q+v)/(_+v))-1,Oe=Da(R-1,zs(Oe,Fe-1)),be=Da(Oe,zs(0,be))):(be=0,Oe=-1);const Ue=bn(be,Oe,pe),{bottom:Ne,top:it}=vn(V,ae,ee,Ue),ht=pn(R/Fe),Lt=ht*_+(ht-1)*v-Ne;return{bottom:Ne,itemHeight:_,items:Ue,itemWidth:le,offsetBottom:Lt,offsetTop:it,top:it}})),S),oe(O(X,he(R=>R!==null),Z(R=>R.length)),z),oe(O(qe(I,B,S,te),he(([R,H,{items:q}])=>q.length>0&&H.height!==0&&R.height!==0),Z(([R,H,{items:q},ae])=>{const{bottom:ee,top:V}=vn(R,ae,H,q);return[V,ee]}),_e(Ps)),s);const L=Q(!1);oe(O(d,Se(L),Z(([R,H])=>H||R!==0)),L);const k=xt(O(qe(S,z),he(([{items:R}])=>R.length>0),Se(L),he(([[R,H],q])=>{const ae=R.items[R.items.length-1].index===H-1;return(q||R.bottom>0&&R.itemHeight>0&&R.offsetBottom===0&&R.items.length===H)&&ae}),Z(([[,R]])=>R-1),_e())),G=xt(O(xe(S),he(({items:R})=>R.length>0&&R[0].index===0),Tt(0),_e())),F=xt(O(xe(S),Se(Y),he(([{items:R},H])=>R.length>0&&!H),Z(([{items:R}])=>({endIndex:R[R.length-1].index,startIndex:R[0].index})),_e(yo),$t(0)));oe(F,f.scrollSeekRangeChanged),oe(O(P,Se(I,B,z,te),Z(([R,H,q,ae,ee])=>{const V=To(R),{align:pe,behavior:Me,offset:ye}=V;let De=V.index;De==="LAST"&&(De=ae-1),De=zs(0,De,Da(ae-1,De));let Ge=Ka(H,ee,q,De);return pe==="end"?Ge=gn(Ge-H.height+q.height):pe==="center"&&(Ge=gn(Ge-H.height/2+q.height/2)),ye!==void 0&&ye!==0&&(Ge+=ye),{behavior:Me,top:Ge}})),c);const ie=ot(O(S,Z(R=>R.offsetBottom+R.bottom)),0);return oe(O(D,Z(R=>({height:R.visibleHeight,width:R.visibleWidth}))),I),{customScrollParent:j,data:X,deviation:ne,footerHeight:n,gap:te,headerHeight:o,increaseViewportBy:t,initialItemCount:g,itemDimensions:B,overscan:a,restoreStateFrom:$,scrollBy:i,scrollContainerState:l,scrollHeight:J,scrollTo:c,scrollToIndex:P,scrollTop:d,smoothScrollTargetReached:x,totalCount:z,useWindowScroll:h,viewportDimensions:I,windowScrollContainerState:y,windowScrollTo:C,windowViewportRect:D,...f,gridState:S,horizontalDirection:ge,initialTopMostItemIndex:E,totalListHeight:ie,...m,endReached:k,propsReady:T,rangeChanged:F,startReached:G,stateChanged:se,stateRestoreInProgress:Y,...p}},He(dr,ct,qs,Lo,Wt,mr,Vt));function Uo(t,s,a){return zs(1,ua((t+a)/(ua(s)+a)))}function vn(t,s,a,r){const{height:n}=a;if(n===void 0||r.length===0)return{bottom:0,top:0};const o=Ka(t,s,a,r[0].index);return{bottom:Ka(t,s,a,r[r.length-1].index)+n,top:o}}function Ka(t,s,a,r){const n=Uo(t.width,a.width,s.column),o=ua(r/n),i=o*a.height+zs(0,o-1)*s.row;return i>0?i+s.row:i}const td=Re(()=>{const t=Q(N=>`Item ${N}`),s=Q({}),a=Q(null),r=Q("virtuoso-grid-item"),n=Q("virtuoso-grid-list"),o=Q(xr),i=Q("div"),l=Q(Ns),c=(N,m=null)=>ot(O(s,Z(f=>f[N]),_e()),m),d=Q(!1),x=Q(!1);return oe(xe(x),d),{components:s,computeItemKey:o,context:a,FooterComponent:c("Footer"),HeaderComponent:c("Header"),headerFooterTag:i,itemClassName:r,ItemComponent:c("Item","div"),itemContent:t,listClassName:n,ListComponent:c("List","div"),readyStateChanged:d,reportReadyState:x,ScrollerComponent:c("Scroller","div"),scrollerRef:l,ScrollSeekPlaceholder:c("ScrollSeekPlaceholder","div")}}),sd=Re(([t,s])=>({...t,...s}),He(ed,td)),ad=re.memo(function(){const t=Pe("gridState"),s=Pe("listClassName"),a=Pe("itemClassName"),r=Pe("itemContent"),n=Pe("computeItemKey"),o=Pe("isSeeking"),i=bt("scrollHeight"),l=Pe("ItemComponent"),c=Pe("ListComponent"),d=Pe("ScrollSeekPlaceholder"),x=Pe("context"),N=bt("itemDimensions"),m=bt("gap"),f=Pe("log"),w=Pe("stateRestoreInProgress"),T=bt("reportReadyState"),j=ns(re.useMemo(()=>h=>{const y=h.parentElement.parentElement.scrollHeight;i(y);const C=h.firstChild;if(C!==null){const{height:D,width:p}=C.getBoundingClientRect();N({height:D,width:p})}m({column:Nn("column-gap",getComputedStyle(h).columnGap,f),row:Nn("row-gap",getComputedStyle(h).rowGap,f)})},[i,N,m,f]),!0,!1);return Oo(()=>{t.itemHeight>0&&t.itemWidth>0&&T(!0)},[t]),w?null:e.jsx(c,{className:s,ref:j,...nt(c,x),"data-testid":"virtuoso-item-list",style:{paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},children:t.items.map(h=>{const y=n(h.index,h.data,x);return o?e.jsx(d,{...nt(d,x),height:t.itemHeight,index:h.index,width:t.itemWidth},y):b.createElement(l,{...nt(l,x),className:a,"data-index":h.index,key:y},r(h.index,h.data,x))})})}),rd=re.memo(function(){const t=Pe("HeaderComponent"),s=bt("headerHeight"),a=Pe("headerFooterTag"),r=ns(re.useMemo(()=>o=>{s(Qt(o,"height"))},[s]),!0,!1),n=Pe("context");return t!=null?e.jsx(a,{ref:r,children:e.jsx(t,{...nt(t,n)})}):null}),nd=re.memo(function(){const t=Pe("FooterComponent"),s=bt("footerHeight"),a=Pe("headerFooterTag"),r=ns(re.useMemo(()=>o=>{s(Qt(o,"height"))},[s]),!0,!1),n=Pe("context");return t!=null?e.jsx(a,{ref:r,children:e.jsx(t,{...nt(t,n)})}):null}),od=({children:t})=>{const s=re.useContext($o),a=bt("itemDimensions"),r=bt("viewportDimensions"),n=ns(re.useMemo(()=>o=>{r(o.getBoundingClientRect())},[r]),!0,!1);return re.useEffect(()=>{s&&(r({height:s.viewportHeight,width:s.viewportWidth}),a({height:s.itemHeight,width:s.itemWidth}))},[s,r,a]),e.jsx("div",{ref:n,style:hr(!1),children:t})},id=({children:t})=>{const s=re.useContext($o),a=bt("windowViewportRect"),r=bt("itemDimensions"),n=Pe("customScrollParent"),o=Pe("useWindowScroll"),i=po(a,n,!1);return re.useEffect(()=>{s&&(r({height:s.itemHeight,width:s.itemWidth}),a({listHeight:0,offsetTop:0,visibleHeight:s.viewportHeight,visibleWidth:s.viewportWidth}))},[s,a,r]),e.jsx("div",{ref:i,style:Ho(!1,o),children:t})},ld=re.memo(function({...t}){const s=Pe("useWindowScroll"),a=Pe("customScrollParent"),r=a||s?dd:cd,n=a||s?id:od,o=Pe("context");return e.jsx(r,{...t,...nt(r,o),children:e.jsxs(n,{children:[e.jsx(rd,{}),e.jsx(ad,{}),e.jsx(nd,{})]})})}),{useEmitter:Vo,useEmitterValue:Pe,usePublisher:bt}=Fo(sd,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},ld),cd=Go({useEmitter:Vo,useEmitterValue:Pe,usePublisher:bt}),dd=Qo({useEmitter:Vo,useEmitterValue:Pe,usePublisher:bt});function Nn(t,s,a){return s!=="normal"&&s?.endsWith("px")!==!0&&a(`${t} was not resolved to pixel value correctly`,s,Xe.WARN),s==="normal"?0:parseInt(s??"0",10)}function jn(t){if(Array.isArray(t)){if(t.length<5||t.length>6)throw new Error(`Invalid bone format: expected [x,y,w,h,r,c?] but got ${t.length} elements`);const s=t;return{x:s[0],y:s[1],w:s[2],h:s[3],r:s[4],c:s[5]||void 0}}return t}const yn=new Set(["p","h1","h2","h3","h4","h5","h6","li","td","th"]);function md(t,s="component",a){const r=t.getBoundingClientRect(),n=[],o=a?.leafTags?new Set([...yn,...a.leafTags]):yn,i=a?.captureRoundedBorders??!0,l=a?.excludeTags?new Set(a.excludeTags):null,c=a?.excludeSelectors??null;function d(x){const N=getComputedStyle(x);if(N.display==="none"||N.visibility==="hidden"||N.opacity==="0")return;const m=x.tagName.toLowerCase();if(l?.has(m)||c?.some(I=>x.matches(I)))return;const f=[...x.children].filter(I=>{const B=getComputedStyle(I);return B.display!=="none"&&B.visibility!=="hidden"&&B.opacity!=="0"}),w=m==="img"||m==="svg"||m==="video"||m==="canvas",T=m==="input"||m==="button"||m==="textarea"||m==="select",j=f.length===0||w||T||o.has(m),h=N.backgroundColor,y=h!=="rgba(0, 0, 0, 0)"&&h!=="transparent",C=N.backgroundImage!=="none",D=parseFloat(N.borderTopWidth)||0,p=i&&D>0&&N.borderTopColor!=="rgba(0, 0, 0, 0)"&&N.borderTopColor!=="transparent",z=(parseFloat(N.borderTopLeftRadius)||0)>0,g=y||C||p&&z,S=m==="tr"||m==="td"||m==="th"||m==="thead"||m==="tbody"||m==="table";if(j){const I=x.getBoundingClientRect();if(I.width<1||I.height<1)return;const B=w&&I.width>0&&I.height>0&&Math.abs(I.width-I.height)<4,P=S?0:B?"50%":wn(N,x)??8,J=r.width;n.push({x:J>0?+((I.left-r.left)/J*100).toFixed(4):0,y:Math.round(I.top-r.top),w:J>0?+(I.width/J*100).toFixed(4):0,h:Math.round(I.height),r:P});return}if(g){const I=x.getBoundingClientRect();if(I.width>=1&&I.height>=1){const B=S?0:wn(N,x)??8,P=r.width;n.push({x:P>0?+((I.left-r.left)/P*100).toFixed(4):0,y:Math.round(I.top-r.top),w:P>0?+(I.width/P*100).toFixed(4):0,h:Math.round(I.height),r:B,c:!0})}}for(const I of f)d(I)}for(const x of t.children)d(x);return{name:s,viewportWidth:Math.round(r.width),width:Math.round(r.width),height:Math.round(r.height),bones:n}}function wn(t,s){const a=parseFloat(t.borderTopLeftRadius)||0,r=parseFloat(t.borderTopRightRadius)||0,n=parseFloat(t.borderBottomRightRadius)||0,o=parseFloat(t.borderBottomLeftRadius)||0;if(a===0&&r===0&&n===0&&o===0)return;const i=s?(()=>{const d=s.getBoundingClientRect();return d.width>0&&d.height>0&&Math.abs(d.width-d.height)<4})():!1;return t.borderRadius==="50%"?"50%":Math.max(a,r,n,o)>9998?i?"50%":9999:a===r&&r===n&&n===o?a!==8?a:void 0:`${a}px ${r}px ${n}px ${o}px`}const ud=new Map;function xd(t){return ud.get(t)}function hd(){typeof window<"u"&&window.__BONEYARD_BUILD&&(window.__BONEYARD_SNAPSHOT=md)}function fd(){return typeof window<"u"&&window.__BONEYARD_BUILD===!0}function pd(t,s){if(!("breakpoints"in t))return t;const a=Object.keys(t.breakpoints).map(Number).sort((n,o)=>n-o);if(a.length===0)return null;const r=[...a].reverse().find(n=>s>=n)??a[0];return t.breakpoints[r]??null}const cs={angle:110,start:30,end:70,speed:"2s",lightHighlight:"#f7f7f7",darkHighlight:"#2c2c2c"},Es={speed:"1.8s",lightAdjust:.3,darkAdjust:.02},Sn={web:{light:"#f0f0f0",dark:"#222222"}},gd=/rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*(?:,\s*([\d.]+))?\s*\)/;function kn(t,s){const a=t.match(gd);if(a){const[,r,n,o,i="1"]=a,l=Math.min(1,parseFloat(i)+s*.5);return`rgba(${r},${n},${o},${l.toFixed(3)})`}if(t.startsWith("#")&&t.length>=7){const r=parseInt(t.slice(1,3),16),n=parseInt(t.slice(3,5),16),o=parseInt(t.slice(5,7),16);if(!isNaN(r)&&!isNaN(n)&&!isNaN(o)){const i=Math.round(r+(255-r)*s),l=Math.round(n+(255-n)*s),c=Math.round(o+(255-o)*s);return`#${i.toString(16).padStart(2,"0")}${l.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`}}return t}hd();let Ct={};function oa({loading:t,children:s,name:a,initialBones:r,color:n,darkColor:o,animate:i,stagger:l=!1,transition:c=!1,boneClass:d,className:x,fallback:N,fixture:m,snapshotConfig:f}){const w=b.useRef(null),T=b.useRef(Math.random().toString(36).slice(2,8)).current,[j,h]=b.useState(0),[y,C]=b.useState(0),[D,p]=b.useState(!1);b.useEffect(()=>{if(typeof window>"u")return;const q=()=>{const V=document.documentElement.classList.contains("dark")||!!w.current?.closest(".dark");p(V)};q();const ae=new MutationObserver(q);ae.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]});const ee=window.matchMedia("(prefers-color-scheme: dark)");return ee.addEventListener("change",q),()=>{ae.disconnect(),ee.removeEventListener("change",q)}},[]);const z=n??Ct.color??Sn.web.light,g=o??Ct.darkColor??Sn.web.dark,S=D?g:z,I=i??Ct.animate??"pulse",B=I===!0?"pulse":I===!1?"solid":I;b.useEffect(()=>{const q=w.current;if(!q)return;const ae=new ResizeObserver(V=>{const pe=V[0]?.contentRect;h(Math.round(pe?.width??0)),pe&&pe.height>0&&C(Math.round(pe.height))});ae.observe(q);const ee=q.getBoundingClientRect();return h(Math.round(ee.width)),ee.height>0&&C(Math.round(ee.height)),()=>ae.disconnect()},[]);const P={};if(a&&(P["data-boneyard"]=a,f&&(P["data-boneyard-config"]=JSON.stringify(f))),fd())return e.jsx("div",{ref:w,className:x,style:{position:"relative"},...P,children:e.jsx("div",{children:m??s})});const[J,ne]=b.useState(!1);b.useLayoutEffect(()=>{ne(!0)},[]);const X=r??(a?xd(a):void 0),te=J&&typeof window<"u"?window.innerWidth:0,se=j>0?j:te,$=X&&se>0?pd(X,se):null,Y=d??Ct.boneClass,E=(()=>{const q=l??Ct.stagger;return q===!0?80:q===!1||!q?0:q})(),U=(()=>{const q=c??Ct.transition;return q===!0?300:q===!1||!q?0:q})(),[W,ge]=b.useState(!1),L=b.useRef(t),k=b.useRef(null);b.useEffect(()=>(L.current&&!t&&U>0&&$&&(k.current&&clearTimeout(k.current),ge(!0),k.current=setTimeout(()=>{ge(!1),k.current=null},U)),L.current=t,()=>{k.current&&clearTimeout(k.current)}),[t,U,$]);const G=(t||W)&&$,F=t&&!$&&!W,ie=y>0?y:$?.height??0,R=$?.height??0,H=ie>0&&R>0?ie/R:1;return e.jsxs("div",{ref:w,className:x,style:{position:"relative"},...P,children:[e.jsx("div",{"data-boneyard-content":"true",style:G&&!W?{visibility:"hidden"}:void 0,children:F?N:s}),G&&e.jsx("div",{"data-boneyard-overlay":"true",style:{position:"absolute",inset:0,overflow:"hidden",opacity:W?0:1,transition:U>0?`opacity ${U}ms ease-out`:void 0},children:e.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},children:[$.bones.filter(q=>!jn(q).c).map((q,ae)=>{const ee=jn(q),V=S;kn(S,D?Es.darkAdjust:Es.lightAdjust);const pe=ee.w/100*($.width??0),Me=ee.r==="50%"&&Math.abs(pe-ee.h)<4,ye={position:"absolute",left:`${ee.x}%`,top:ee.y*H,width:Me?ee.h*H:`${ee.w}%`,height:ee.h*H,borderRadius:typeof ee.r=="string"?ee.r:`${ee.r}px`,backgroundColor:V},De=Ct.speed;if(B==="pulse")ye.animation=`bp-${T} ${De??Es.speed} ease-in-out infinite`;else if(B==="shimmer"){const Ge=D?Ct.darkShimmerColor??cs.darkHighlight:Ct.shimmerColor??cs.lightHighlight,v=Ct.shimmerAngle??cs.angle;delete ye.backgroundColor,ye.backgroundImage=`linear-gradient(${v}deg, ${V} ${cs.start}%, ${Ge} 50%, ${V} ${cs.end}%)`,ye.backgroundSize="200% 100%",ye.animation=`bs-${T} ${De??cs.speed} linear infinite`}return E>0&&(ye.opacity=0,ye.animation=`${ye.animation?ye.animation+",":""} by-${T} 0.3s ease-out ${ae*E}ms forwards`),e.jsx("div",{"data-boneyard-bone":"true",className:Y,style:ye},ae)}),B==="pulse"&&e.jsx("style",{children:`@keyframes bp-${T}{0%,100%{background-color:${S}}50%{background-color:${kn(S,D?Es.darkAdjust:Es.lightAdjust)}}}`}),B==="shimmer"&&e.jsx("style",{children:`@keyframes bs-${T}{0%{background-position:200% 0}100%{background-position:-200% 0}}`}),E>0&&e.jsx("style",{children:`@keyframes by-${T}{from{opacity:0}to{opacity:1}}`})]})})]})}async function pr(t){const s=Ot(Ye,"managedStudents");try{const o=Rt(s,Mt("teacherId","==",t)),i=await Gt(o);if(!i.empty)return i.docs.map(c=>({id:c.id,...c.data()})).sort((c,d)=>String(c.name||"").localeCompare(String(d.name||"")))}catch{}const r=(await qo(t)).map(o=>o.id);if(r.length===0)return[];const n=new Map;for(let o=0;o{n.set(d.id,{id:d.id,...d.data()})})}return Array.from(n.values()).sort((o,i)=>String(o.name||"").localeCompare(String(i.name||"")))}async function bd(t,s,a){const r=ut(Ye,"managedStudents",t);await _t(r,{riskLevel:s,...a!==void 0?{riskConfidence:a}:{},updatedAt:lt()})}async function Wo(t,s,a){const r=St(s,a),n=ut(Ye,"managedStudents",t);await _t(n,{grade:s,section:a,classSectionId:r,updatedAt:lt()})}function St(t,s){return[t,s].filter(Boolean).join("_").replace(/\s+/g,"_").toLowerCase()}function Xa(t){const s=Object.entries(t).filter(([,a])=>a!==void 0);return Object.fromEntries(s)}function is(t){const s=(t||"").trim();if(!s)return null;const a=s.match(/(\d{1,2})/);return a?`Grade ${a[1]}`:/^grade\s+/i.test(s)?s.replace(/\s+/g," ").trim().replace(/^grade/i,"Grade"):s}function js(t){const a=is(t)?.match(/(\d{1,2})/),r=a?Number.parseInt(a[1],10):Number.NaN;return Number.isFinite(r)?r>=11?"Senior High School":"Junior High School":null}function ys(t,s){const a=`${t||""} ${s||""}`.toUpperCase();if(!a.trim())return null;const r=["STEM","ABM","HUMSS","GAS","TVL","ICT"];for(const n of r)if(new RegExp(`\\b${n}\\b`).test(a))return n;return null}function Et(t){const s=(t||"").trim();if(!s)return{grade:"Grade 11",section:"Section A"};const[a="Grade 11",r="Section A"]=s.split(" - ").map(n=>n.trim());return{grade:a||"Grade 11",section:r||"Section A"}}function et(t){const s=t.metadata||{},a=t.className||s.className,r=Et(a),n=(t.grade||s.grade||r.grade||"").trim()||null,o=(t.section||s.section||r.section||"").trim()||null,i=(t.classSectionId||s.classSectionId||"").trim()||(n&&o?St(n,o):"")||null,l=(a||"").trim()||(n&&o?`${n} - ${o}`:"")||null,c=is(t.gradeLevel||s.gradeLevel||n),d=(t.classification||s.classification||"").trim()||js(c)||null,x=(t.strand||s.strand||"").trim()||ys(l,o)||null;return{classSectionId:i,className:l,grade:n,section:o,gradeLevel:c,classification:d,strand:x,schoolYear:(t.schoolYear||s.schoolYear||"").trim()||null,ownerTeacherId:(t.ownerTeacherId||s.ownerTeacherId||"").trim()||null,ownerTeacherName:(t.ownerTeacherName||s.ownerTeacherName||"").trim()||null,adviserTeacherId:(t.adviserTeacherId||s.adviserTeacherId||"").trim()||null,adviserTeacherName:(t.adviserTeacherName||s.adviserTeacherName||"").trim()||null,managerId:(t.managerId||s.managerId||"").trim()||null,managerName:(t.managerName||s.managerName||"").trim()||null}}function vd(t){const s=(t.className||"").trim(),[a="",r=""]=s.split(" - "),n=(t.grade||a||"").trim()||null,o=(t.section||r||"").trim()||null,i=(t.classSectionId||"").trim()||(n&&o?St(n,o):"")||null,l=s||(n&&o?`${n} - ${o}`:null),c=is(t.gradeLevel||n),d=(t.classification||"").trim()||js(c),x=(t.strand||"").trim()||ys(l,o);return{classSectionId:i,className:l,grade:n,section:o,gradeLevel:c,classification:d,strand:x,schoolYear:(t.schoolYear||"").trim()||null,ownerTeacherId:(t.ownerTeacherId||"").trim()||null,ownerTeacherName:(t.ownerTeacherName||"").trim()||null,adviserTeacherId:(t.adviserTeacherId||"").trim()||null,adviserTeacherName:(t.adviserTeacherName||"").trim()||null,managerId:(t.managerId||"").trim()||null,managerName:(t.managerName||"").trim()||null}}async function qo(t){const s=Ot(Ye,"classrooms"),a=new Map,r=Rt(s,Mt("teacherId","==",t));(await Gt(r)).docs.forEach(l=>{a.set(l.id,{id:l.id,...l.data()})});const o=Rt(s,Mt("managerId","==",t));return(await Gt(o)).docs.forEach(l=>{a.set(l.id,{id:l.id,...l.data()})}),Array.from(a.values()).sort((l,c)=>String(l.name||"").localeCompare(String(c.name||"")))}async function Yo(t){const s=t.classSectionId||St(t.grade,t.section),a=ut(Ye,"classSectionOwnership",s),r=await hs(a),n=r.exists()?r.data().studentUids||[]:[],o=Array.from(new Set([...t.studentUids||[],...n])),i=Xa(t);return r.exists()?await _t(a,{...i,classSectionId:s,studentUids:o,updatedAt:lt()}):await Pt(a,{...i,classSectionId:s,studentUids:o,createdAt:lt(),updatedAt:lt()}),s}async function Nd(t){const s=(t.classSectionId||"").trim()||St(t.grade,t.section),a=(t.className||"").trim()||`${t.grade} - ${t.section}`,r=vd({classSectionId:s,className:a,grade:t.grade,section:t.section,schoolYear:t.schoolYear,ownerTeacherId:t.ownerTeacherId,ownerTeacherName:t.ownerTeacherName,adviserTeacherId:t.ownerTeacherId,adviserTeacherName:t.ownerTeacherName,managerId:t.managerId,managerName:t.managerName,classification:t.classification,strand:t.strand,gradeLevel:t.gradeLevel});await Yo({classSectionId:s,className:a,grade:r.grade||t.grade,gradeLevel:r.gradeLevel||t.gradeLevel||t.grade,classification:r.classification||t.classification,strand:r.strand||t.strand,section:r.section||t.section,schoolYear:t.schoolYear,ownerTeacherId:t.ownerTeacherId,ownerTeacherName:t.ownerTeacherName,managerId:t.managerId,managerName:t.managerName,studentUids:[]});const n=Ot(Ye,"classrooms"),o=Rt(n,Mt("classSectionId","==",s)),i=await Gt(o);if(i.empty){const l=Xa({name:a,teacherId:t.ownerTeacherId,grade:r.grade,gradeLevel:r.gradeLevel,classification:r.classification,strand:r.strand,section:r.section,classSectionId:s,schoolYear:t.schoolYear,ownerTeacherId:t.ownerTeacherId,ownerTeacherName:t.ownerTeacherName||"",adviserTeacherId:t.ownerTeacherId,adviserTeacherName:t.ownerTeacherName||"",managerId:t.managerId,managerName:t.managerName||"",classMetadata:r,schedule:"Mon-Fri",studentCount:0,avgScore:0,atRiskCount:0,createdAt:lt(),updatedAt:lt()});await Pt(ut(Ye,"classrooms",s),l,{merge:!0})}else for(const l of i.docs){const c=Xa({name:a,grade:r.grade,gradeLevel:r.gradeLevel,classification:r.classification,strand:r.strand,section:r.section,schoolYear:t.schoolYear,ownerTeacherId:t.ownerTeacherId,ownerTeacherName:t.ownerTeacherName||"",adviserTeacherId:t.ownerTeacherId,adviserTeacherName:t.ownerTeacherName||"",managerId:t.managerId,managerName:t.managerName||"",classMetadata:r,updatedAt:lt()});await _t(l.ref,c)}return s}async function Ko(t,s,a,r,n,o){const i=St(s,a);await Yo({classSectionId:i,grade:s,section:a,schoolYear:n,ownerTeacherId:r,ownerTeacherName:o,studentUids:[t]}),await Pt(ut(Ye,"users",t),{grade:s,section:a,classSectionId:i,adviserTeacherId:r,adviserTeacherName:o||"",updatedAt:lt()},{merge:!0})}async function jd(t){const s=Ot(Ye,"classSectionOwnership"),a=new Map,r=Rt(s,Mt("ownerTeacherId","==",t));(await Gt(r)).docs.forEach(l=>{a.set(l.id,{id:l.id,...l.data()})});const o=Rt(s,Mt("managerId","==",t));return(await Gt(o)).docs.forEach(l=>{a.set(l.id,{id:l.id,...l.data()})}),Array.from(a.values()).sort((l,c)=>String(l.classSectionId||"").localeCompare(String(c.classSectionId||"")))}async function yd(t="",s=25){const a=Ot(Ye,"users"),r=Math.max(1,Math.min(100,s)),n=Rt(a,Mt("role","==","teacher"),Zn(r*4)),o=await Gt(n),i=t.trim().toLowerCase();return o.docs.map(c=>{const d=c.data(),x=String(d.name||"").trim(),N=String(d.email||"").trim();return{uid:c.id,name:x||"Teacher",email:N,photo:String(d.photo||d.photoURL||"").trim()||void 0}}).filter(c=>i?c.name.toLowerCase().includes(i)||c.email.toLowerCase().includes(i):!0).sort((c,d)=>c.name.localeCompare(d.name)).slice(0,r)}function wd(t,s,a=20){if(t.length===0)return s([]),()=>{};const r=Ot(Ye,"activities"),n=Rt(r,Mt("classroomId","in",t),Hi("timestamp","desc"));return eo(n,o=>{const i=o.docs.slice(0,a).map(l=>({id:l.id,...l.data()}));s(i)})}async function Sd(t,s,a){const r=ut(Ot(Ye,"generatedLessonPlans"));return await Pt(r,{...t,teacherId:s,teacherName:a?.teacherName||null,studentId:a?.studentId||null,studentName:a?.studentName||null,status:"draft",createdAt:lt(),updatedAt:lt()}),r.id}async function kd(t){const s=ut(Ye,"generatedLessonPlans",t),a=await hs(s);if(!a.exists())throw new Error("Lesson draft not found. Save draft before publishing.");if(!a.data().publishReady)throw new Error("Lesson is not publish-ready. Resolve source legitimacy and validation issues first.");await _t(s,{status:"published",publishedAt:lt(),updatedAt:lt()})}async function Cd(t,s=!0){const a=t.learningCompetency||t.lessonTitle||t.focusTopics&&t.focusTopics[0]||"general mathematics",r=t.subject||"general_math",n=t.quarter??1;let o="",i=[],l,c,d,x=!1;if(s)try{const f=await Di(a,r,n,{lessonTitle:t.lessonTitle,learningCompetency:t.learningCompetency,moduleUnit:t.moduleUnit,learnerLevel:t.learnerLevel});i=f.sources||[],o=f.explanation||"",l=f.retrievalConfidence,c=f.retrievalBand,d=f.retrievalQuery,x=f.needsReview??!1}catch{o="",i=[]}const N={...t,subject:r,quarter:n,curriculumContext:o?`[CURRICULUM CONTEXT] +${o}`:void 0,curriculumRetrievalConfidence:l,curriculumRetrievalBand:c,curriculumRetrievalQuery:d,needsReview:x};return{...await We.generateLessonPlan(N),curriculumSources:i,curriculumContext:o}}const Td=Ii("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Id({className:t,variant:s,asChild:a=!1,...r}){const n=a?Qi:"span";return e.jsx(n,{"data-slot":"badge",className:Jn(Td({variant:s}),t),...r})}function Ed(t){return t.length<=42?t:`${t.slice(0,18)}...${t.slice(-20)}`}const Cn=({sources:t=[],className:s})=>t.length?e.jsxs(Vi,{children:[e.jsx(Wi,{asChild:!0,children:e.jsxs(Id,{className:["bg-[#75D06A]/15 text-[#2E7D32] border-[#75D06A]/40 font-body font-semibold text-[11px] px-2.5 py-1 rounded-full cursor-help",s||""].join(" "),variant:"outline",children:[e.jsx(ss,{size:12}),"DepEd Aligned"]})}),e.jsxs(qi,{side:"top",sideOffset:6,className:"max-w-sm bg-white border border-[#dde3eb] text-[#0a1628] shadow-lg p-3",children:[e.jsx("p",{className:"text-[11px] font-display font-bold uppercase tracking-wide text-[#5a6578] mb-2",children:"Curriculum Sources"}),e.jsx("div",{className:"space-y-2",children:t.slice(0,5).map((a,r)=>e.jsxs("div",{className:"text-xs leading-relaxed",children:[e.jsxs("p",{className:"font-semibold text-[#0a1628]",children:[a.subject," | Q",a.quarter]}),e.jsxs("p",{className:"text-[#5a6578]",children:[Ed(a.sourceFile)," | p.",a.page]}),e.jsxs("p",{className:"text-[#5a6578]",children:["Similarity: ",(a.score*100).toFixed(1),"%"]})]},`${a.sourceFile}-${a.page}-${r}`))})]})]}):null,Rd=[{level:"Remember",icon:so,bgColor:"bg-sky-500/20",borderColor:"border-sky-500/40",textColor:"text-sky-400",description:"Recall facts, formulas, definitions, and basic procedures.",mathExample:"State the quadratic formula.",mapsTo:"Identification, Enumeration",defaultWeight:"Included by default"},{level:"Understand",icon:ss,bgColor:"bg-sky-500/20",borderColor:"border-sky-500/40",textColor:"text-sky-400",description:"Explain concepts, interpret graphs, classify mathematical objects.",mathExample:"Explain why the discriminant determines the number of roots.",mapsTo:"Multiple Choice, Identification",defaultWeight:"Included by default"},{level:"Apply",icon:er,bgColor:"bg-green-500/20",borderColor:"border-green-500/40",textColor:"text-green-400",description:"Use formulas and procedures to solve routine problems.",mathExample:"Solve: 2x² + 5x - 3 = 0 using the quadratic formula.",mapsTo:"Equation-Based, Word Problem",defaultWeight:"Included by default"},{level:"Analyze",icon:Ml,bgColor:"bg-orange-500/20",borderColor:"border-orange-500/40",textColor:"text-orange-400",description:"Break down problems, compare solution methods, identify patterns.",mathExample:"Given f(x) = x³ - 3x, find and classify all critical points.",mapsTo:"Word Problem, Equation-Based",defaultWeight:"Included by default"}],Md=({isOpen:t,onClose:s})=>t?e.jsx(es,{children:t&&e.jsx(Ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-[70] flex items-center justify-center p-4",onClick:s,children:e.jsxs(Ie.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},className:"bg-white border border-slate-200 rounded-2xl shadow-2xl w-full max-w-3xl max-h-[85vh] flex flex-col overflow-hidden",onClick:a=>a.stopPropagation(),children:[e.jsxs("div",{className:"bg-gradient-to-r from-sky-600 to-sky-500 px-6 py-4 flex items-center justify-between flex-shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-white/20 rounded-xl flex items-center justify-center",children:e.jsx(to,{size:22,className:"text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-bold text-white",children:"Bloom's Taxonomy in MathPulse AI"}),e.jsx("p",{className:"text-cyan-200 text-xs",children:"Understanding cognitive levels in assessments"})]})]}),e.jsx("button",{onClick:s,className:"w-8 h-8 bg-white/20 hover:bg-white/30 rounded-lg flex items-center justify-center transition-colors",children:e.jsx(ca,{size:16,className:"text-white"})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-bold text-rose-400 uppercase tracking-wide mb-2",children:"What is Bloom's Taxonomy?"}),e.jsx("p",{className:"text-sm text-slate-500 leading-relaxed",children:"Bloom's Taxonomy is an educational framework developed by Benjamin Bloom in 1956 and revised in 2001. It classifies learning objectives into six cognitive levels, from basic recall of facts up to complex evaluation and creation. MathPulse AI uses the first four levels most relevant to Senior High School mathematics."})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-bold text-rose-400 uppercase tracking-wide mb-2",children:"Why MathPulse AI Uses It"}),e.jsx("p",{className:"text-sm text-slate-500 leading-relaxed",children:"Using Bloom's Taxonomy ensures that assessments do not only test memorization. A well-balanced math quiz should challenge students at multiple cognitive levels: remembering formulas, understanding concepts, applying procedures, and analyzing relationships. This mirrors the DepEd K-12 competency framework which requires higher-order thinking skills (HOTS) alongside foundational knowledge."})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-bold text-rose-400 uppercase tracking-wide mb-3",children:"Level-by-Level Breakdown"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:Rd.map(a=>{const r=a.icon;return e.jsxs("div",{className:`${a.bgColor} border ${a.borderColor} rounded-xl p-4 space-y-2`,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(r,{size:18,className:a.textColor}),e.jsx("span",{className:`font-bold text-sm ${a.textColor}`,children:a.level})]}),e.jsx("p",{className:"text-xs text-slate-500",children:a.description}),e.jsxs("div",{className:"bg-black/20 rounded-lg p-2",children:[e.jsx("p",{className:"text-[10px] font-semibold text-slate-500 uppercase tracking-wide mb-0.5",children:"Math Example"}),e.jsx("p",{className:"text-xs text-[#dde3eb] italic",children:a.mathExample})]}),e.jsxs("div",{className:"flex items-center justify-between text-[10px]",children:[e.jsxs("span",{className:"text-slate-500",children:["Maps to: ",e.jsx("span",{className:"text-slate-500 font-medium",children:a.mapsTo})]}),e.jsx("span",{className:"text-green-400 font-medium",children:a.defaultWeight})]})]},a.level)})})]}),e.jsx("div",{className:"bg-slate-50 border border-slate-200 rounded-xl p-4",children:e.jsxs("p",{className:"text-xs text-slate-500 leading-relaxed",children:[e.jsx("span",{className:"font-semibold text-slate-600",children:"Note:"})," ","All four levels are selected by default to produce a balanced, HOTS-aligned assessment. Deselecting a level will remove questions of that cognitive depth from the generated quiz."]})})]}),e.jsxs("div",{className:"border-t border-slate-200 px-6 py-3 flex items-center justify-between flex-shrink-0 bg-slate-50",children:[e.jsxs("a",{href:"https://cft.vanderbilt.edu/guides-sub-pages/blooms-taxonomy/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-xs text-rose-400 hover:text-rose-300 font-medium transition-colors",children:[e.jsx(Yi,{size:12}),"Learn More"]}),e.jsx("button",{onClick:s,className:"px-5 py-2 bg-sky-600 hover:bg-rose-500 text-white text-sm font-bold rounded-xl transition-colors",children:"Got it"})]})]})})}):null,Ad={draft:"bg-[#edf1f7] text-[#5a6578]",published:"bg-green-100 text-green-700",assigned:"bg-sky-100 text-sky-700",completed:"bg-rose-100 text-rose-700"},ea={identification:{label:"Identification",icon:e.jsx(tr,{size:16}),description:"Define or identify concepts"},enumeration:{label:"Enumeration",icon:e.jsx(Ji,{size:16}),description:"List steps or properties"},multiple_choice:{label:"Multiple Choice",icon:e.jsx(xs,{size:16}),description:"Choose from 4 options"},word_problem:{label:"Word Problem",icon:e.jsx(ss,{size:16}),description:"Real-world scenarios"},equation_based:{label:"Equation-Based",icon:e.jsx(zi,{size:16}),description:"Solve equations"}},za={remember:{label:"Remember",color:"bg-sky-100 text-sky-700 border-sky-300",description:"Recall facts & formulas"},understand:{label:"Understand",color:"bg-emerald-100 text-emerald-700 border-emerald-300",description:"Explain concepts"},apply:{label:"Apply",color:"bg-rose-100 text-rose-700 border-rose-300",description:"Use in new contexts"},analyze:{label:"Analyze",color:"bg-rose-100 text-rose-700 border-rose-300",description:"Examine & compare"}},Ld=["Grade 11","Grade 12"],Fa=t=>{const s=(t||"").trim().toLowerCase();return s==="grade 12"||s==="12"||s.includes("12")?"Grade 12":"Grade 11"},Dd={"Grade 11":{"General Mathematics - Patterns, Relations, and Functions":["Patterns and Real-Life Relationships","Functions as Mathematical Models","Function Notation and Evaluation","Domain and Range of Functions","Operations on Functions","Composite Functions","Inverse Functions","Graphs of Rational Functions","Graphs of Exponential Functions","Graphs of Logarithmic Functions"],"General Mathematics - Financial Mathematics":["Simple and Compound Interest","Simple and General Annuities","Present and Future Value","Loans, Amortization, and Sinking Funds","Stocks, Bonds, and Market Indices","Business Decision-Making with Mathematical Models"],"General Mathematics - Logic and Mathematical Reasoning":["Propositions and Logical Connectives","Truth Values and Truth Tables","Logical Equivalence and Implication","Quantifiers and Negation","Validity of Arguments"]},"Grade 12":{"Pre-Calculus - Analytic Geometry":["Conic Sections - Parabola","Conic Sections - Ellipse","Conic Sections - Hyperbola","Conic Sections - Circle","Systems of Nonlinear Equations"],"Pre-Calculus - Series and Induction":["Sequences and Series","Arithmetic Sequences","Geometric Sequences","Mathematical Induction","Binomial Theorem"],"Pre-Calculus - Trigonometry":["Angles and Unit Circle","Trigonometric Functions","Trigonometric Identities","Sum and Difference Formulas","Inverse Trigonometric Functions","Polar Coordinates"],"Basic Calculus - Limits":["Limits of Functions","Limit Theorems","One-Sided Limits","Infinite Limits and Limits at Infinity","Continuity of Functions"],"Basic Calculus - Derivatives":["Definition of the Derivative","Differentiation Rules","Chain Rule","Implicit Differentiation","Higher-Order Derivatives","Related Rates","Extrema and the First Derivative Test","Concavity and the Second Derivative Test","Optimization Problems"],"Basic Calculus - Integration":["Antiderivatives and Indefinite Integrals","Definite Integrals and the FTC","Integration by Substitution","Area Under a Curve"]}},zd={"Grade 11":["General Mathematics - "],"Grade 12":["Pre-Calculus - ","Basic Calculus - "]},Tn=(t,s)=>{const a=zd[s];return Object.fromEntries(Object.entries(t).filter(([r])=>a.some(n=>r.startsWith(n))))},Rs=30,ds=12,Ba="mathpulse:quiz-maker:active-task",In={easy:"text-green-600",medium:"text-rose-600",hard:"text-red-600"},Fd=({onBack:t,gradeLevel:s,selectedClassId:a,selectedClassName:r})=>{const{currentUser:n,loading:o}=Us(),i=b.useMemo(()=>We.getImportGroundedRolloutFlags(),[]),[l,c]=b.useState("create"),[d,x]=b.useState("setup"),[N,m]=b.useState(Fa(s)),[f,w]=b.useState(10),[T,j]=b.useState([]),[h,y]=b.useState([]),[C,D]=b.useState(["multiple_choice","word_problem","identification"]),[p,z]=b.useState(["remember","understand","apply","analyze"]),[g,S]=b.useState(!1),[I,B]=b.useState({easy:30,medium:50,hard:20}),[P,J]=b.useState({}),[ne,X]=b.useState(!1),[te,se]=b.useState([]),[$,Y]=b.useState(!1),[E,U]=b.useState(""),[W,ge]=b.useState(!1),[L,k]=b.useState(!1),[G,F]=b.useState(null),[ie,R]=b.useState(0),[H,q]=b.useState("queued"),[ae,ee]=b.useState("Waiting to start generation..."),[V,pe]=b.useState(null),[Me,ye]=b.useState(null),[De,Ge]=b.useState(""),[v,_]=b.useState(!1),le=b.useRef(!1),[de,Fe]=b.useState("topics"),[be,Oe]=b.useState(null),[Ue,Ne]=b.useState(!1),[it,ht]=b.useState("all"),[Lt,Dt]=b.useState("all"),[K,me]=b.useState(!1),[Be,ke]=b.useState(null),[Ze,dt]=b.useState(!1),[oi,ws]=b.useState(!1),[va,Nr]=b.useState(!1),[jr,ii]=b.useState([]),[li,yr]=b.useState(!1),[Na,wr]=b.useState(""),[Yt,Sr]=b.useState(null),[kr,Ss]=b.useState([]),[ci,Cr]=b.useState(!1),[ja,di]=b.useState("all"),[mi,Tr]=b.useState(null),[Ir,Ks]=b.useState(null),Er=b.useCallback(async()=>{X(!0);const u=Fa(N);try{const M=await We.getQuizTopics(u);M.topics&&J(Tn(M.topics,u))}catch{J(Tn(Dd[u],u))}finally{X(!1)}},[N]),Rr=b.useCallback(async()=>{if(!i.quizEnabled){se([]),U("Import-grounded quiz generation is disabled by rollout flag; using curriculum defaults."),Y(!1);return}Y(!0),U("");try{const u=await We.getCourseMaterialTopics({classSectionId:a,limit:20}),M=(u.topics||[]).filter(A=>A.title?.trim());se(M),u.warnings&&u.warnings.length>0&&U(u.warnings.join(" "))}catch{se([]),U("Imported topics are currently unavailable; quiz generation will use curriculum defaults.")}finally{Y(!1)}},[a,i.quizEnabled]);b.useEffect(()=>{Er(),j([]),y([])},[Er]),b.useEffect(()=>{Rr()},[Rr]);const ya=b.useMemo(()=>{const u=Array.from(new Set(te.map(M=>M.title.trim()).filter(Boolean)));return u.length===0?P:{"Imported Course Materials":u,...P}},[P,te]);b.useEffect(()=>{ht("all"),Dt("all")},[V]);const Mr=b.useMemo(()=>{if(!V)return[];const u=V.questions.map(A=>A.provenance?.sourceFile?.trim()).filter(A=>!!A),M=(V.metadata.topicProvenance||[]).map(A=>A.sourceFile?.trim()).filter(A=>!!A);return Array.from(new Set([...u,...M])).sort((A,fe)=>A.localeCompare(fe))},[V]),Ar=b.useMemo(()=>{if(!V)return[];const u=V.questions.map(A=>A.provenance?.materialId?.trim()).filter(A=>!!A),M=(V.metadata.topicProvenance||[]).map(A=>A.materialId?.trim()).filter(A=>!!A);return Array.from(new Set([...u,...M])).sort((A,fe)=>A.localeCompare(fe))},[V]),wa=b.useMemo(()=>V?V.questions.filter(u=>{const M=it==="all"||(u.provenance?.sourceFile||"").trim()===it,A=Lt==="all"||(u.provenance?.materialId||"").trim()===Lt;return M&&A}):[],[V,it,Lt]),Lr=(u,M)=>{const A={...I},fe=Math.max(0,Math.min(100,A[u]+M)),$e=fe-A[u];A[u]=fe;const Le=Object.keys(A).filter(st=>st!==u),Nt=Le.reduce((st,jt)=>st+A[jt],0);if(Nt>0)for(const st of Le)A[st]=Math.max(0,Math.round(A[st]-$e*A[st]/Nt));const Xs=Object.values(A).reduce((st,jt)=>st+jt,0);if(Xs!==100){const st=Le.reduce((jt,Or)=>A[jt]>=A[Or]?jt:Or);A[st]+=100-Xs}B(A)},ui=u=>{j(M=>M.includes(u)?M.filter(A=>A!==u):[...M,u]),y(M=>M.filter(A=>A!==u))},xi=u=>{D(M=>M.includes(u)?M.length>1?M.filter(A=>A!==u):M:[...M,u])},hi=u=>{z(M=>M.includes(u)?M.length>1?M.filter(A=>A!==u):M:[...M,u])},fi=()=>{let u=T.length>0?T.filter(A=>!h.includes(A)):Object.values(ya).flat().filter(A=>!h.includes(A)).slice(0,3);u.length>ds&&(u=u.slice(0,ds));const M=Math.min(f,Rs);return{topics:u,gradeLevel:N,numQuestions:M,questionTypes:C,includeGraphs:g,difficultyDistribution:I,bloomLevels:p,excludeTopics:h,classSectionId:a,className:r,preferImportedTopics:i.quizEnabled}},pi=b.useCallback((u,M)=>{const A={taskId:u,request:M,createdAt:new Date().toISOString(),ownerUid:n?.uid};try{sessionStorage.setItem(Ba,JSON.stringify(A))}catch{}},[n]),zt=b.useCallback(()=>{try{sessionStorage.removeItem(Ba)}catch{}},[]),Sa=b.useCallback(u=>{const M=Math.max(0,Math.min(100,Math.round(typeof u.progressPercent=="number"?u.progressPercent:u.status==="queued"?10:u.status==="running"?65:u.status==="completed"?100:u.status==="cancelling"?95:100)));R(A=>{let fe=Math.max(A,M);if(u.status==="running"&&M<=A){const $e=String(u.progressStage||"").toLowerCase(),Le=$e.includes("assembling")||$e.includes("final")?97:$e.includes("generating")?89:95;fe=Math.min(Le,A+1)}return fe}),q(u.progressStage||u.status),ee(u.progressMessage||(u.status==="queued"?"Task queued for generation.":u.status==="running"?"Generating quiz in the background...":u.status==="completed"?"Generation complete.":u.status==="cancelling"?"Cancelling generation...":"Generation finished with an error."))},[]);b.useEffect(()=>{if(o||le.current)return;if(le.current=!0,!n){zt();return}let u=!1;const M=sessionStorage.getItem(Ba);if(!M)return;let A=null;try{A=JSON.parse(M)}catch{zt();return}if(!A?.taskId){zt();return}if(A.ownerUid&&A.ownerUid!==n.uid){zt();return}return ge(!0),F(A.taskId),Ge(""),We.waitForTaskResult(A.taskId,{timeoutMs:24e4,pollIntervalMs:1500,onProgress:Sa}).then(async fe=>{if(u)return;const $e=fe.result;if(!$e||typeof $e!="object")throw new Error("Quiz generation completed without a valid result payload.");const Le=$e;pe(Le),x("results"),R(100),q("completed"),ee("Generation complete."),F(null),zt();try{await Fr(Le,A.request),ue.success("Quiz auto-saved to your library as draft.")}catch(Nt){ue.error(Nt instanceof Error?Nt.message:"Quiz generated but failed to save to library")}}).catch(fe=>{if(!u){if(fe instanceof Fs&&(fe.status===401||fe.status===403)){le.current=!1,ge(!1);return}Ge(fe instanceof Error?fe.message:"Failed to resume quiz generation"),F(null),zt()}}).finally(()=>{u||ge(!1)}),()=>{u=!0}},[Sa,o,zt,n]);const ka=()=>{if(W){window.confirm("Quiz generation is in progress. Are you sure you want to leave?")&&(x("setup"),pe(null),Ge(""),t());return}x("setup"),pe(null),Ge(""),t()},gi=async()=>{Ge(""),ge(!0),Ks(null),R(8),q("queued"),ee("Submitting quiz generation task..."),pe(null);const u=fi();try{const M=await We.generateQuiz(u,{onTaskCreated:A=>{F(A),pi(A,u),R(fe=>Math.max(fe,12)),q("queued"),ee("Task queued. Generation is running in the background.")},onProgress:A=>{Sa(A),A.taskId&&A.taskId!==G&&F(A.taskId)}});pe(M),x("results"),R(100),q("completed"),ee("Generation complete."),F(null),zt();try{await Fr(M,u),ue.success("Quiz auto-saved to your library as draft.")}catch(A){ue.error(A instanceof Error?A.message:"Quiz generated but failed to save to library")}We.reportImportGroundedFeedback({flow:"quiz",status:"success",classSectionId:u.classSectionId,className:u.className,metadata:{totalQuestions:M.metadata.totalQuestions,usedImportedTopics:!!M.metadata.usedImportedTopics,importedTopicCount:M.metadata.importedTopicCount??0,importGroundingEnabled:i.quizEnabled}})}catch(M){Ge(M instanceof Error?M.message:"Quiz generation failed"),R(100),q("failed"),ee("Generation failed."),F(null),zt(),We.reportImportGroundedFeedback({flow:"quiz",status:"failed",classSectionId:u.classSectionId,className:u.className,metadata:{error:M instanceof Error?M.message:"Quiz generation failed",importGroundingEnabled:i.quizEnabled}})}finally{ge(!1)}},bi=()=>{if(!V)return;const u=V.questions.map((M,A)=>{let fe=`${A+1}. [${M.difficulty.toUpperCase()}] [${M.bloomLevel}] (${M.points} pts) `;return fe+=` ${M.question} `,M.options&&(fe+=M.options.map($e=>` ${$e}`).join(` `)+` `),fe+=` Answer: ${M.correctAnswer} `,fe+=` Explanation: ${M.explanation} `,fe}).join(` -`);navigator.clipboard.writeText(u),_(!0),setTimeout(()=>_(!1),2e3)},vi=()=>{if(!V)return;const u=new Blob([JSON.stringify(V,null,2)],{type:"application/json"}),M=URL.createObjectURL(u),A=document.createElement("a");A.href=M,A.download=`quiz_${N.replace(/\s/g,"_")}_${Date.now()}.json`,A.click(),URL.revokeObjectURL(M)};T.length>0||Object.values(ya).flat().length>0;const Dr=(u,M)=>{const A=M?.gradeLevel||N,fe=M?.topics||T,$e=u.questions.map((Le,Nt)=>({id:`q_${Date.now()}_${Nt}`,questionType:Le.questionType||"identification",question:Le.question,...Le.options?{options:Le.options}:{},correctAnswer:Le.correctAnswer,bloomLevel:Le.bloomLevel||"understand",difficulty:Le.difficulty||"medium",topic:Le.topic,subject:A,points:Le.points,explanation:Le.explanation}));return{title:`${A} Quiz – ${fe.length>0?fe.slice(0,2).join(", "):"Mixed Topics"}`,gradeLevel:A,questions:$e,totalPoints:u.totalPoints,metadata:{topicsCovered:Object.keys(u.metadata.topicsCovered),difficultyBreakdown:{easy:u.metadata.difficultyBreakdown.easy??0,medium:u.metadata.difficultyBreakdown.medium??0,hard:u.metadata.difficultyBreakdown.hard??0},bloomDistribution:u.metadata.bloomTaxonomyDistribution,questionTypeBreakdown:u.metadata.questionTypeBreakdown,supplementalPurpose:u.metadata.supplementalPurpose,recommendedTeacherActions:u.metadata.recommendedTeacherActions??[],generatedAt:new Date().toISOString(),generatedBy:"teacher_generated"},status:"draft",source:"teacher_generated"}},zr=b.useCallback(u=>{Ss(M=>[u,...M.filter(A=>A.id!==u.id)])},[]);async function Fr(u,M){if(!n)return null;const A=Dr(u,M),fe=await Hr(A,n.uid,Be?{documentId:Be}:void 0);return Ce(fe),zr({id:fe,...A,teacherId:n.uid}),fe}const Ni=async()=>{if(!V){ue.error("No quiz to save. Generate a quiz first.");return}if(!n){ue.error("You must be signed in to save quizzes.");return}me(!0);try{const u=Dr(V),M=await Hr(u,n.uid,Be?{documentId:Be}:void 0);Ce(M),zr({id:M,...u,teacherId:n.uid}),ue.success("Quiz saved to your library!")}catch(u){ue.error(u instanceof Error?u.message:"Failed to save quiz")}finally{me(!1)}},ji=async()=>{if(Be){dt(!0);try{await Zi(Be),Ss(u=>u.map(M=>M.id===Be?{...M,status:"published"}:M)),ue.success("Quiz published to Quiz Bank!")}catch(u){ue.error(u instanceof Error?u.message:"Failed to publish quiz")}finally{dt(!1)}}},ka=async u=>{const M=u??Be;if(!M){ue.error("Save the quiz first before assigning.");return}if(Tr(M),ws(!0),Sr(null),wr(""),jr.length===0&&n){yr(!0);try{const A=await pr(n.uid);ii(A)}catch{ue.error("Failed to load students")}finally{yr(!1)}}},yi=async()=>{const u=mi??Be;if(!(!Yt||!u||!n)){Nr(!0);try{await el(u,Yt,n.uid),Ss(M=>M.map(A=>A.id===u?{...A,status:"assigned",metadata:{...A.metadata,assignedTo:Yt}}:A)),ue.success("Quiz assigned to student!"),ws(!1),Tr(null),l==="bank"&&Ta()}catch(M){ue.error(M instanceof Error?M.message:"Failed to assign quiz")}finally{Nr(!1)}}},Ta=b.useCallback(async()=>{if(n){kr(!0);try{const u=await Ki(n.uid);Ss(u)}catch{ue.error("Failed to load quiz bank")}finally{kr(!1)}}},[n]);b.useEffect(()=>{l==="bank"&&Ta()},[l,Ta]);const wi=async u=>{try{await Xi(u),Ss(M=>M.filter(A=>A.id!==u)),ue.success("Quiz deleted")}catch{ue.error("Failed to delete quiz")}},Br=jr.filter(u=>u.name.toLowerCase().includes(Na.toLowerCase())||u.email.toLowerCase().includes(Na.toLowerCase())),$r=ja==="all"?Cr:Cr.filter(u=>u.status===ja),Si=u=>{const M=(u.metadata.topicsCovered||[]).reduce((A,fe)=>(A[fe]=(A[fe]||0)+1,A),{});return{questions:u.questions.map(A=>({questionType:A.questionType,question:A.question,correctAnswer:A.correctAnswer,options:A.options??null,bloomLevel:A.bloomLevel,difficulty:A.difficulty,topic:A.topic,points:A.points,explanation:A.explanation})),totalPoints:u.totalPoints,metadata:{topicsCovered:M,difficultyBreakdown:u.metadata.difficultyBreakdown,bloomTaxonomyDistribution:u.metadata.bloomDistribution,questionTypeBreakdown:u.metadata.questionTypeBreakdown,gradeLevel:u.gradeLevel,totalQuestions:u.questions.length,includesGraphQuestions:!1,supplementalPurpose:u.metadata.supplementalPurpose,bloomTaxonomyRationale:"Loaded from saved quiz bank entry.",recommendedTeacherActions:u.metadata.recommendedTeacherActions||[]}}},Ia=u=>{Ce(u.id),pe(Si(u)),ye(null),Ks(u.id),ht("all"),Dt("all"),Oe(null),x("results"),c("create")},Ci={remember:"bg-sky-100 text-sky-700 border-sky-300",understand:"bg-rose-100 text-rose-700 border-rose-300",apply:"bg-emerald-100 text-emerald-700 border-emerald-300",analyze:"bg-rose-100 text-rose-700 border-rose-300"},ki=(u,M,A)=>{const fe=be===M,$e=Ci[u.bloomLevel]||"bg-[#edf1f7] text-[#5a6578] border-[#dde3eb]";return e.jsxs(Ie.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:M*.05},className:"border border-[#dde3eb] rounded-xl overflow-hidden relative",children:[e.jsx("div",{className:`absolute top-2 right-2 text-[10px] font-bold uppercase px-2 py-0.5 rounded border ${$e} z-10`,children:u.bloomLevel}),e.jsx("div",{className:"p-4 cursor-pointer hover:bg-[#edf1f7] transition-colors",onClick:()=>Oe(fe?null:M),children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2 flex-wrap",children:[e.jsxs("span",{className:"text-xs font-bold text-white bg-sky-600 px-2 py-0.5 rounded",children:["Q",M+1]}),e.jsx("span",{className:`text-xs font-medium px-2 py-0.5 rounded border ${za[u.bloomLevel]?.color||"bg-[#edf1f7] text-[#5a6578]"}`,children:u.bloomLevel}),e.jsx("span",{className:`text-xs font-medium ${In[u.difficulty]||"text-[#5a6578]"}`,children:u.difficulty}),e.jsxs("span",{className:"text-xs text-slate-500",children:[u.points," pts"]}),e.jsx("span",{className:"text-xs bg-[#edf1f7] text-[#5a6578] px-2 py-0.5 rounded",children:u.topic})]}),e.jsx("p",{className:"text-sm text-[#0a1628] font-medium",children:u.question})]}),e.jsx("div",{className:"flex-shrink-0 mt-1",children:fe?e.jsx(da,{size:16,className:"text-slate-500"}):e.jsx(ts,{size:16,className:"text-slate-500"})})]})}),e.jsx(es,{children:fe&&e.jsx(Ie.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"border-t border-[#dde3eb] overflow-hidden",children:e.jsxs("div",{className:"p-4 space-y-3 bg-[#edf1f7]/50",children:[u.options&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold text-[#5a6578] mb-1",children:"Options:"}),e.jsx("div",{className:"space-y-1",children:u.options.map((Le,Nt)=>e.jsx("div",{className:`text-sm px-3 py-1.5 rounded-lg ${Le.includes(u.correctAnswer)?"bg-green-100 text-green-800 font-medium":"bg-white text-[#0a1628]"}`,children:Le},Nt))})]}),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-semibold text-green-700 mb-1",children:"Correct Answer:"}),e.jsx("p",{className:"text-sm text-green-800 font-medium",children:u.correctAnswer})]}),e.jsxs("div",{className:"bg-sky-50 border border-sky-200 rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-semibold text-sky-700 mb-1",children:"Explanation:"}),e.jsx("p",{className:"text-sm text-sky-800",children:u.explanation})]})]}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-slate-500",children:[e.jsxs("span",{children:["Type: ",ea[u.questionType]?.label||u.questionType]}),e.jsxs("span",{children:["Bloom: ",u.bloomLevel]})]}),u.provenance&&e.jsxs("div",{className:"bg-[#f7fbff] border border-sky-100 rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-semibold text-sky-700 mb-1",children:"Item Provenance"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-1 text-xs text-[#5a6578]",children:[u.provenance.title&&e.jsxs("p",{children:["Topic: ",u.provenance.title]}),u.provenance.topicId&&e.jsxs("p",{children:["Topic ID: ",u.provenance.topicId]}),u.provenance.materialId&&e.jsxs("p",{children:["Material ID: ",u.provenance.materialId]}),u.provenance.sourceFile&&e.jsxs("p",{children:["Source File: ",u.provenance.sourceFile]}),u.provenance.sectionId&&e.jsxs("p",{children:["Section ID: ",u.provenance.sectionId]})]})]})]})})})]},M)};return e.jsxs("div",{className:"w-full flex flex-col bg-[#f7f9fc] min-h-screen",children:[e.jsxs("div",{className:"bg-white border-b border-[#dde3eb] px-6 py-4 flex-shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("button",{onClick:Ca,className:"p-2 hover:bg-[#edf1f7] rounded-lg transition-colors text-slate-500",children:e.jsx(Bt,{size:20})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-display font-bold text-[#0a1628]",children:"AI Quiz Maker"}),e.jsx("p",{className:"text-[#5a6578] text-sm mt-1",children:"Generate AI-powered assessments with Bloom's Taxonomy"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>c("create"),className:`flex items-center gap-1.5 px-4 py-2 rounded-xl text-sm font-semibold transition-colors ${l==="create"?"bg-sky-100 text-sky-700 border border-sky-300":"bg-[#edf1f7] text-[#5a6578] hover:bg-[#dde3eb]"}`,children:[e.jsx($l,{size:16})," Create Quiz"]}),e.jsxs("button",{onClick:()=>c("bank"),className:`flex items-center gap-1.5 px-4 py-2 rounded-xl text-sm font-semibold transition-colors ${l==="bank"?"bg-sky-100 text-sky-700 border border-sky-300":"bg-[#edf1f7] text-[#5a6578] hover:bg-[#dde3eb]"}`,children:[e.jsx(Zr,{size:16})," Quiz Bank"]})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto px-6 sm:px-8 xl:px-10 py-8",children:[l==="bank"&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:["all","draft","published","assigned","completed"].map(u=>e.jsx("button",{onClick:()=>di(u),className:`px-3 py-1.5 rounded-full text-xs font-semibold capitalize transition-colors ${ja===u?"bg-sky-100 text-sky-700 border border-sky-300":"bg-[#edf1f7] text-[#5a6578] hover:bg-[#dde3eb]"}`,children:u},u))}),ci?e.jsxs("div",{className:"flex items-center justify-center py-16",children:[e.jsx(at,{size:24,className:"animate-spin text-sky-500"}),e.jsx("span",{className:"ml-2 text-sm text-[#5a6578]",children:"Loading quiz bank…"})]}):$r.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-slate-500",children:[e.jsx(Zr,{size:40,className:"mb-3"}),e.jsx("p",{className:"font-medium",children:"No quizzes found"}),e.jsx("p",{className:"text-xs mt-1",children:"Generate your first quiz in the Create tab"})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:$r.map(u=>e.jsxs(Ie.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},onClick:()=>Ia(u),role:"button",tabIndex:0,onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),Ia(u))},className:"border border-[#dde3eb] rounded-xl p-4 hover:shadow-md transition-shadow cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-400",children:[e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsx("h4",{className:"text-sm font-bold text-[#0a1628] leading-tight",children:u.title}),e.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-full capitalize ${Md[u.status]}`,children:u.status})]}),e.jsx("div",{className:"flex flex-wrap gap-1 mb-3",children:u.metadata.topicsCovered.slice(0,3).map(M=>e.jsx("span",{className:"text-[10px] bg-[#edf1f7] text-[#5a6578] px-2 py-0.5 rounded",children:M},M))}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-[#5a6578] mb-3",children:[e.jsxs("span",{children:[u.questions.length," questions"]}),e.jsxs("span",{children:[u.totalPoints," pts"]}),e.jsx("span",{children:u.gradeLevel})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:M=>{M.stopPropagation(),Ia(u)},className:"flex items-center gap-1 px-3 py-1.5 text-xs font-semibold bg-[#edf1f7] text-[#5a6578] rounded-lg hover:bg-[#dde3eb] transition-colors",children:[e.jsx(tl,{size:12})," View"]}),e.jsxs("button",{onClick:M=>{M.stopPropagation(),ka(u.id)},className:"flex items-center gap-1 px-3 py-1.5 text-xs font-semibold bg-sky-50 text-sky-700 rounded-lg hover:bg-sky-100 transition-colors",children:[e.jsx(Ls,{size:12})," Assign"]}),e.jsxs("button",{onClick:M=>{M.stopPropagation(),wi(u.id)},className:"flex items-center gap-1 px-3 py-1.5 text-xs font-semibold bg-red-50 text-red-600 rounded-lg hover:bg-red-100 transition-colors",children:[e.jsx(ro,{size:12})," Delete"]})]})]},u.id))})]}),l==="create"&&e.jsxs(e.Fragment,{children:[De&&e.jsxs(Ie.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"mb-4 bg-red-50 border border-red-200 rounded-xl p-4 flex items-start gap-3",children:[e.jsx(no,{size:18,className:"text-red-500 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-red-800 font-medium",children:"Error"}),e.jsx("p",{className:"text-sm text-red-600",children:De})]}),e.jsx("button",{onClick:()=>Ge(""),className:"ml-auto",children:e.jsx(ca,{size:14,className:"text-red-400"})})]}),W&&e.jsxs(Ie.div,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},className:"mb-4 bg-white border border-sky-200 rounded-xl p-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(at,{size:16,className:"animate-spin text-sky-600"}),e.jsx("p",{className:"text-sm font-semibold text-[#0a1628]",children:"Generating Quiz in Background"})]}),e.jsxs("span",{className:"text-xs font-bold text-sky-700",children:[ie,"%"]})]}),e.jsx("div",{className:"h-2 bg-[#edf1f7] rounded-full overflow-hidden",children:e.jsx(Ie.div,{animate:{width:`${ie}%`},transition:{duration:.35,ease:"easeOut"},className:"h-full bg-gradient-to-r from-sky-600 to-cyan-500"})}),e.jsxs("p",{className:"mt-2 text-xs text-[#5a6578] capitalize",children:["Stage: ",H.replace(/_/g," ")]}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:ae}),G&&e.jsxs("p",{className:"text-[11px] text-[#7b8798] mt-1",children:["Task ID: ",G]})]}),!W&&d!=="results"&&e.jsx("div",{className:"flex bg-white rounded-xl border border-[#dde3eb] mb-6 overflow-hidden shadow-sm",children:[{id:"setup",label:"Setup"},{id:"topics",label:"Topics"},{id:"style",label:"Question style"},{id:"preview",label:"Preview"}].map((u,M)=>{const fe=["setup","topics","style","preview"].indexOf(d),$e=fe>M,Le=fe===M;return e.jsxs("div",{className:`flex-1 flex items-center justify-center py-3 border-r last:border-r-0 border-[#dde3eb] ${Le?"bg-purple-50":"bg-white"}`,children:[$e?e.jsx("div",{className:"w-5 h-5 rounded-full bg-green-500 text-white flex items-center justify-center mr-2",children:e.jsx(us,{size:12,strokeWidth:3})}):e.jsx("div",{className:`w-5 h-5 rounded-full flex items-center justify-center text-xs font-bold mr-2 ${Le?"bg-[#9b51e0] text-white":"bg-[#edf1f7] text-slate-500"}`,children:M+1}),e.jsx("span",{className:`text-sm font-semibold ${Le?"text-[#9b51e0]":$e?"text-slate-700":"text-slate-400"}`,children:u.label})]},u.id)})}),d==="setup"&&!W&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"bg-purple-50 border border-purple-200 rounded-xl p-4 flex items-start gap-3",children:[e.jsx(Ha,{size:18,className:"text-[#9b51e0] flex-shrink-0 mt-0.5"}),e.jsx("div",{children:e.jsxs("p",{className:"text-sm text-purple-800",children:["This quiz maker generates ",e.jsx("span",{className:"font-bold",children:"supplemental assessments"})," to support classroom instruction. Questions follow Bloom's Taxonomy for comprehensive skill evaluation. Generation limit: up to ",Rs," questions and ",cs," topics per quiz."]})})]}),e.jsxs("div",{className:"bg-white border border-[#dde3eb] rounded-xl overflow-hidden shadow-sm",children:[e.jsx("div",{className:"px-5 py-4 border-b border-[#dde3eb]",children:e.jsx("p",{className:"text-xs font-bold text-slate-400 uppercase tracking-wider",children:"BASIC SETTINGS"})}),e.jsxs("div",{className:"p-5 grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"quiz-grade-level",className:"text-sm font-semibold text-[#0a1628] mb-2 block",children:"Grade level"}),e.jsx("select",{id:"quiz-grade-level",value:N,onChange:u=>m(Fa(u.target.value)),className:"w-full bg-white text-[#0a1628] rounded-lg px-4 py-3 text-sm outline-none border border-[#dde3eb] focus:ring-2 focus:ring-purple-500",children:Ad.map(u=>e.jsx("option",{value:u,children:u},u))})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"quiz-num-questions",className:"text-sm font-semibold text-[#0a1628] mb-2 block",children:"Number of questions"}),e.jsxs("div",{className:"flex items-center",children:[e.jsx("button",{onClick:()=>w(Math.max(1,f-1)),className:"w-12 h-12 border border-[#dde3eb] rounded-l-lg flex items-center justify-center hover:bg-[#edf1f7] text-[#edf1f7] transition-colors bg-white font-bold text-xl",children:e.jsx("span",{className:"text-[#dde3eb]",children:"-"})}),e.jsx("input",{id:"quiz-num-questions",type:"number",min:1,max:Rs,value:f,onChange:u=>w(Math.min(Rs,Math.max(1,parseInt(u.target.value)||1))),className:"flex-1 h-12 text-center border-y border-[#dde3eb] px-3 text-base font-bold focus:outline-none bg-white text-[#0a1628]"}),e.jsx("button",{onClick:()=>w(Math.min(Rs,f+1)),className:"w-12 h-12 border border-[#dde3eb] rounded-r-lg flex items-center justify-center hover:bg-[#edf1f7] text-[#edf1f7] transition-colors bg-white font-bold text-xl",children:e.jsx("span",{className:"text-[#dde3eb]",children:"+"})})]})]})]})]})]}),d==="topics"&&!W&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-[#0a1628]",children:"Select topics"}),e.jsxs("p",{className:"text-sm text-[#5a6578]",children:["Choose up to ",cs," topics across all strands"]})]}),e.jsxs("div",{className:"bg-purple-50 text-[#9b51e0] px-3 py-1 rounded-full text-sm font-bold",children:[T.filter(u=>!h.includes(u)).length," of ",cs," selected"]})]}),ne?e.jsxs("div",{className:"flex items-center justify-center py-10 text-sm text-[#5a6578]",children:[e.jsx(at,{size:24,className:"animate-spin text-[#9b51e0] mr-2"})," Loading topics..."]}):e.jsx("div",{className:"space-y-3",children:Object.entries(ya).map(([u,M])=>{const A=M.filter($e=>T.includes($e)&&!h.includes($e)).length,fe=de===u;return e.jsxs("div",{className:"border border-[#dde3eb] rounded-xl bg-white overflow-hidden shadow-sm",children:[e.jsxs("button",{onClick:()=>Fe(fe?null:u),className:"w-full flex items-center justify-between p-4 hover:bg-[#f7f9fc] transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-1 h-6 bg-[#9b51e0] rounded-full"}),e.jsxs("div",{className:"text-left",children:[e.jsx("p",{className:"font-bold text-[#0a1628] text-sm",children:u}),e.jsxs("p",{className:"text-xs text-slate-500",children:[M.length," topics"]})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"bg-purple-100 text-[#9b51e0] px-2.5 py-0.5 rounded-full text-xs font-semibold",children:[A," selected"]}),fe?e.jsx(da,{size:18,className:"text-slate-400"}):e.jsx(ts,{size:18,className:"text-slate-400"})]})]}),e.jsx(es,{children:fe&&e.jsx(Ie.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},className:"overflow-hidden border-t border-[#edf1f7]",children:e.jsx("div",{className:"py-2",children:M.map(($e,Le)=>{const Nt=T.includes($e),Xs=h.includes($e),st=Nt&&!Xs;let jt="Core";return Le%3===0&&(jt="Foundation"),Le%3===2&&(jt="Advanced"),e.jsxs("div",{className:"flex items-center justify-between px-6 py-3 hover:bg-[#f7f9fc]",children:[e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer flex-1",children:[e.jsx("div",{className:`w-5 h-5 rounded flex items-center justify-center transition-colors ${st?"bg-[#9b51e0] border-[#9b51e0]":"border-2 border-[#dde3eb] bg-white"}`,children:st&&e.jsx(us,{size:14,className:"text-white"})}),e.jsx("input",{type:"checkbox",className:"hidden",checked:st,onChange:()=>ui($e)}),e.jsx("span",{className:`text-sm font-semibold ${st?"text-[#0a1628]":"text-[#5a6578]"}`,children:$e})]}),e.jsx("span",{className:`border px-3 py-1 rounded-full text-[10px] uppercase font-bold tracking-wider ${jt==="Advanced"?"bg-white text-slate-400 border-[#dde3eb]":"bg-purple-50 text-[#9b51e0] border-purple-100"}`,children:jt})]},$e)})})})})]},u)})})]}),d==="style"&&!W&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"bg-white border border-[#dde3eb] rounded-xl overflow-hidden shadow-sm",children:[e.jsx("div",{className:"px-5 py-4 border-b border-[#dde3eb]",children:e.jsx("p",{className:"text-xs font-bold text-slate-400 uppercase tracking-wider",children:"QUESTION TYPES"})}),e.jsx("div",{className:"p-5 grid grid-cols-1 md:grid-cols-3 gap-4",children:Object.entries(ea).map(([u,M])=>{const A=k.includes(u);return e.jsxs("button",{onClick:()=>xi(u),className:`flex flex-col items-center justify-center p-4 rounded-xl border-2 transition-all ${A?"bg-purple-50 border-purple-300":"bg-white border-[#dde3eb] hover:border-purple-200"}`,children:[e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center mb-2 ${A?"bg-purple-200 text-[#9b51e0]":"bg-[#edf1f7] text-slate-400"}`,children:M.icon}),e.jsx("span",{className:`text-sm font-semibold ${A?"text-purple-800":"text-[#5a6578]"}`,children:M.label})]},u)})})]}),e.jsxs("div",{className:"bg-white border border-[#dde3eb] rounded-xl overflow-hidden shadow-sm",children:[e.jsx("div",{className:"px-5 py-4 border-b border-[#dde3eb]",children:e.jsx("p",{className:"text-xs font-bold text-slate-400 uppercase tracking-wider",children:"BLOOM'S TAXONOMY LEVELS"})}),e.jsx("div",{className:"p-5 flex flex-wrap gap-3",children:Object.entries(za).map(([u,M])=>{const A=p.includes(u);return e.jsx("button",{onClick:()=>hi(u),className:`px-5 py-2.5 rounded-full border-2 transition-all text-sm font-semibold capitalize ${A?"bg-white text-[#9b51e0] border-purple-300":"bg-white border-[#dde3eb] text-[#5a6578] hover:border-purple-200"}`,children:u},u)})})]}),e.jsxs("div",{className:"bg-white border border-[#dde3eb] rounded-xl overflow-hidden shadow-sm",children:[e.jsx("div",{className:"px-5 py-4 border-b border-[#dde3eb]",children:e.jsx("p",{className:"text-xs font-bold text-slate-400 uppercase tracking-wider",children:"DIFFICULTY DISTRIBUTION"})}),e.jsx("div",{className:"p-5 space-y-5",children:Object.entries(I).map(([u,M])=>{const fe={easy:"bg-[#55b963]",medium:"bg-[#faa541]",hard:"bg-[#f47a75]"}[u];return e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("span",{className:"text-sm font-semibold w-16 capitalize text-[#5a6578]",children:u}),e.jsx("div",{className:"flex-1 h-2 bg-[#edf1f7] rounded-full overflow-hidden",children:e.jsx(Ie.div,{animate:{width:`${M}%`},className:`h-full rounded-full ${fe}`})}),e.jsxs("div",{className:"flex items-center gap-1 w-20 justify-end",children:[e.jsx("button",{onClick:()=>Lr(u,-5),className:"w-6 h-6 rounded border border-[#dde3eb] flex items-center justify-center hover:bg-[#edf1f7] text-slate-500",children:e.jsx(fl,{size:10})}),e.jsxs("span",{className:"text-sm font-bold w-10 text-center text-slate-500",children:[M,"%"]}),e.jsx("button",{onClick:()=>Lr(u,5),className:"w-6 h-6 rounded border border-[#dde3eb] flex items-center justify-center hover:bg-[#edf1f7] text-slate-500",children:e.jsx(sa,{size:10})})]})]},u)})})]})]}),d==="preview"&&!W&&!V&&e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"bg-white border border-[#dde3eb] rounded-xl overflow-hidden shadow-sm",children:[e.jsx("div",{className:"px-5 py-4 border-b border-[#dde3eb]",children:e.jsx("p",{className:"text-xs font-bold text-slate-400 uppercase tracking-wider",children:"QUIZ SUMMARY"})}),e.jsxs("div",{className:"p-5",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-6",children:[e.jsxs("div",{className:"bg-purple-50 rounded-xl p-6 text-center border border-purple-100",children:[e.jsx("p",{className:"text-3xl font-bold text-purple-800 mb-1",children:f}),e.jsx("p",{className:"text-sm text-purple-600 font-medium",children:"questions"})]}),e.jsxs("div",{className:"bg-purple-50 rounded-xl p-6 text-center border border-purple-100",children:[e.jsx("p",{className:"text-3xl font-bold text-purple-800 mb-1",children:T.filter(u=>!h.includes(u)).length}),e.jsx("p",{className:"text-sm text-purple-600 font-medium",children:"topics"})]}),e.jsxs("div",{className:"bg-purple-50 rounded-xl p-6 text-center border border-purple-100",children:[e.jsx("p",{className:"text-3xl font-bold text-purple-800 mb-1",children:N.replace("Grade ","Gr. ")}),e.jsx("p",{className:"text-sm text-purple-600 font-medium",children:"level"})]})]}),e.jsxs("div",{className:"bg-[#f7f9fc] rounded-lg p-5 border border-[#dde3eb] text-sm text-[#5a6578] leading-relaxed",children:[k.map(u=>ea[u]?.label).join(" and ")," questions across ",T.filter(u=>!h.includes(u)).length," topics — aligned to ",p.map(u=>za[u]?.label).join(", ")," levels of Bloom's Taxonomy. Easy ",I.easy,"% · Medium ",I.medium,"% · Hard ",I.hard,"%."]})]})]})}),d==="results"&&V&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"bg-gradient-to-br from-sky-50 to-cyan-50 border border-sky-200 rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h3",{className:"text-lg font-bold font-display text-[#0a1628]",children:"Quiz Generated"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:bi,className:"flex items-center gap-1.5 px-3 py-1.5 bg-white border border-[#dde3eb] rounded-lg text-xs font-medium text-[#5a6578] hover:bg-[#edf1f7] transition-colors",children:[v?e.jsx(us,{size:14,className:"text-green-500"}):e.jsx(pl,{size:14}),v?"Copied!":"Copy All"]}),e.jsxs("button",{onClick:vi,className:"flex items-center gap-1.5 px-3 py-1.5 bg-white border border-[#dde3eb] rounded-lg text-xs font-medium text-[#5a6578] hover:bg-[#edf1f7] transition-colors",children:[e.jsx(oo,{size:14}),"Export JSON"]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsxs("div",{className:"bg-white rounded-xl p-3 text-center",children:[e.jsx("p",{className:"text-2xl font-bold text-sky-600",children:V.questions.length}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"Questions"})]}),e.jsxs("div",{className:"bg-white rounded-xl p-3 text-center",children:[e.jsx("p",{className:"text-2xl font-bold text-rose-600",children:V.totalPoints}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"Total Points"})]}),e.jsxs("div",{className:"bg-white rounded-xl p-3 text-center",children:[e.jsx("p",{className:"text-2xl font-bold text-rose-600",children:Object.keys(V.metadata.topicsCovered).length}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"Topics"})]}),e.jsxs("div",{className:"bg-white rounded-xl p-3 text-center",children:[e.jsx("p",{className:"text-2xl font-bold text-emerald-600",children:Object.keys(V.metadata.bloomTaxonomyDistribution).length}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"Bloom Levels"})]})]}),(V.metadata.usedImportedTopics||(V.metadata.topicProvenance||[]).length>0)&&e.jsxs("div",{className:"mt-4 bg-white rounded-lg p-3 border border-[#dde3eb]",children:[e.jsx("p",{className:"text-xs font-semibold text-[#5a6578] mb-2",children:"Imported Topic Provenance"}),e.jsxs("p",{className:"text-xs text-[#5a6578] mb-2",children:["Imported topics used: ",V.metadata.usedImportedTopics?"Yes":"No"," • ","Materials: ",V.metadata.importedMaterialsCount??0," • ","Topics: ",V.metadata.importedTopicCount??0]}),(V.metadata.topicProvenance||[]).slice(0,5).map((u,M)=>e.jsxs("div",{className:"text-xs text-[#5a6578]",children:[u.title||"Untitled topic",u.sourceFile?` • ${u.sourceFile}`:""]},`${u.topicId||u.title||"topic"}_${M}`)),(Mr.length>0||Ar.length>0)&&e.jsxs("div",{className:"mt-3 grid grid-cols-1 md:grid-cols-2 gap-2",children:[e.jsxs("label",{className:"text-xs text-[#5a6578] flex flex-col gap-1",children:[e.jsx("span",{className:"font-semibold",children:"Filter by Source File"}),e.jsxs("select",{value:it,onChange:u=>ht(u.target.value),className:"bg-white border border-[#dde3eb] rounded-md px-2 py-1.5 text-xs",children:[e.jsx("option",{value:"all",children:"All sources"}),Mr.map(u=>e.jsx("option",{value:u,children:u},u))]})]}),e.jsxs("label",{className:"text-xs text-[#5a6578] flex flex-col gap-1",children:[e.jsx("span",{className:"font-semibold",children:"Filter by Material ID"}),e.jsxs("select",{value:Lt,onChange:u=>Dt(u.target.value),className:"bg-white border border-[#dde3eb] rounded-md px-2 py-1.5 text-xs",children:[e.jsx("option",{value:"all",children:"All materials"}),Ar.map(u=>e.jsx("option",{value:u,children:u},u))]})]})]}),e.jsxs("p",{className:"text-[11px] text-[#5a6578] mt-2",children:["Showing ",wa.length," of ",V.questions.length," questions after provenance filters."]})]}),e.jsxs("div",{className:"mt-4 grid grid-cols-1 md:grid-cols-3 gap-3",children:[e.jsxs("div",{className:"bg-white rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-semibold text-[#5a6578] mb-2",children:"Difficulty"}),Object.entries(V.metadata.difficultyBreakdown).map(([u,M])=>e.jsxs("div",{className:"flex justify-between text-xs",children:[e.jsx("span",{className:`capitalize ${In[u]||"text-[#5a6578]"}`,children:u}),e.jsx("span",{className:"font-medium",children:M})]},u))]}),e.jsxs("div",{className:"bg-white rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-semibold text-[#5a6578] mb-2",children:"Bloom's Taxonomy"}),Object.entries(V.metadata.bloomTaxonomyDistribution).map(([u,M])=>e.jsxs("div",{className:"flex justify-between text-xs",children:[e.jsx("span",{className:"capitalize",children:u}),e.jsx("span",{className:"font-medium",children:M})]},u))]}),e.jsxs("div",{className:"bg-white rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-semibold text-[#5a6578] mb-2",children:"Question Types"}),Object.entries(V.metadata.questionTypeBreakdown).map(([u,M])=>e.jsxs("div",{className:"flex justify-between text-xs",children:[e.jsx("span",{children:ea[u]?.label||u}),e.jsx("span",{className:"font-medium",children:M})]},u))]})]}),e.jsxs("div",{className:"mt-3 bg-sky-50 rounded-lg p-3 flex items-start gap-2",children:[e.jsx(Ha,{size:14,className:"text-sky-400 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-xs text-sky-600",children:V.metadata.supplementalPurpose})]}),V.metadata.recommendedTeacherActions&&e.jsxs("div",{className:"mt-3",children:[e.jsx("p",{className:"text-xs font-semibold text-[#5a6578] mb-1",children:"Recommended Actions:"}),e.jsx("ul",{className:"list-disc list-inside text-xs text-[#5a6578] space-y-0.5",children:V.metadata.recommendedTeacherActions.map((u,M)=>e.jsx("li",{children:u},M))})]})]}),e.jsx("div",{className:"space-y-3",children:wa.length>0?wa.map((u,M)=>ki(u,M)):e.jsx("div",{className:"border border-[#dde3eb] rounded-xl p-4 bg-white text-sm text-[#5a6578]",children:"No questions match the selected provenance filters. Clear one or both filters to view all questions."})})]})]})]}),l==="create"&&e.jsxs("div",{className:"border-t border-[#dde3eb] px-6 sm:px-6 xl:px-10 py-4 bg-[#f7f9fc] flex items-center justify-between flex-shrink-0",children:[d==="setup"&&!W&&e.jsxs(e.Fragment,{children:[e.jsx("div",{}),e.jsxs("button",{onClick:()=>x("topics"),className:"bg-white border border-[#dde3eb] text-[#edf1f7] px-6 py-2.5 rounded-lg text-sm font-semibold transition-colors hover:text-slate-600 flex items-center",children:[e.jsx("span",{className:"text-[#edf1f7]",children:"Next: Topics"})," ",e.jsx(Ht,{size:16,className:"ml-2 text-slate-300"})]})]}),d==="topics"&&!W&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("button",{onClick:()=>{j([]),y([])},className:"text-[#9b51e0] text-sm font-semibold hover:underline",children:"Clear all"}),e.jsxs("span",{className:"text-sm text-[#9b51e0]",children:[T.filter(u=>!h.includes(u)).length," of ",cs," topics selected"]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{onClick:()=>x("setup"),className:"bg-white border border-[#dde3eb] text-[#5a6578] px-5 py-2.5 rounded-lg text-sm font-semibold transition-colors hover:bg-[#edf1f7] flex items-center",children:[e.jsx(Bt,{size:16,className:"mr-2 text-slate-400"})," Back"]}),e.jsxs("button",{onClick:()=>x("style"),className:"bg-[#9b51e0] text-white px-6 py-2.5 rounded-lg text-sm font-semibold transition-colors hover:bg-purple-700 flex items-center shadow-md",children:["Next: Question style ",e.jsx(Ht,{size:16,className:"ml-2 text-purple-200"})]})]})]}),d==="style"&&!W&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>x("topics"),className:"bg-white border border-[#dde3eb] text-[#5a6578] px-5 py-2.5 rounded-lg text-sm font-semibold transition-colors hover:bg-[#edf1f7] flex items-center",children:[e.jsx(Bt,{size:16,className:"mr-2 text-slate-400"})," Back"]}),e.jsxs("button",{onClick:()=>x("preview"),className:"bg-[#9b51e0] text-white px-6 py-2.5 rounded-lg text-sm font-semibold transition-colors hover:bg-purple-700 flex items-center shadow-md",children:["Preview ",e.jsx(Ht,{size:16,className:"ml-2 text-purple-200"})]})]}),d==="preview"&&!W&&!V&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>x("style"),className:"bg-white border border-[#dde3eb] text-[#5a6578] px-5 py-2.5 rounded-lg text-sm font-semibold transition-colors hover:bg-[#edf1f7] flex items-center",children:[e.jsx(Bt,{size:16,className:"mr-2 text-slate-400"})," Back"]}),e.jsxs("button",{onClick:gi,className:"bg-[#9b51e0] text-white px-6 py-2.5 rounded-lg text-sm font-bold transition-colors hover:bg-purple-700 flex items-center shadow-md",children:[e.jsx(us,{size:16,className:"mr-2"})," Generate quiz"]})]}),W&&e.jsx("div",{className:"w-full flex items-center justify-center",children:e.jsxs("div",{className:"flex items-center gap-3 text-slate-500 font-medium text-sm",children:[e.jsx(at,{size:16,className:"animate-spin"})," Generating quiz... Please wait."]})}),d==="results"&&(Ir?e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>{c("bank"),Ks(null)},className:"px-4 py-2.5 rounded-xl text-sm font-medium bg-white border border-[#dde3eb] text-[#5a6578] hover:bg-[#edf1f7] transition-colors",children:"Back to Quiz Bank"}),e.jsxs("button",{onClick:()=>ka(Ir),className:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-semibold bg-sky-50 border border-sky-300 text-sky-700 hover:bg-sky-100 transition-colors",children:[e.jsx(Ls,{size:16})," Assign"]}),e.jsx("button",{onClick:Ca,className:"px-5 py-2.5 rounded-xl text-sm font-bold bg-gradient-to-r from-sky-600 to-sky-500 hover:from-sky-700 hover:to-sky-600 text-white transition-all",children:"Done"})]}):e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>{x("setup"),pe(null),ye(null),Ce(null),Ks(null)},className:"px-4 py-2.5 rounded-xl text-sm font-medium bg-white border border-[#dde3eb] text-[#5a6578] hover:bg-[#edf1f7] transition-colors",children:"Create Another"}),Be?e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:ji,disabled:Ze,className:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-semibold bg-green-50 border border-green-300 text-green-700 hover:bg-green-100 transition-colors",children:[Ze?e.jsx(at,{size:16,className:"animate-spin"}):e.jsx(sr,{size:16}),"Publish"]}),e.jsxs("button",{onClick:()=>ka(),className:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-semibold bg-sky-50 border border-sky-300 text-sky-700 hover:bg-sky-100 transition-colors",children:[e.jsx(Ls,{size:16})," Assign"]})]}):e.jsxs("button",{onClick:Ni,disabled:K,className:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-semibold bg-emerald-50 border border-emerald-300 text-emerald-700 hover:bg-emerald-100 transition-colors",children:[K?e.jsx(at,{size:16,className:"animate-spin"}):e.jsx(io,{size:16}),"Save to Library"]}),e.jsx("button",{onClick:Ca,className:"px-5 py-2.5 rounded-xl text-sm font-bold bg-gradient-to-r from-sky-600 to-sky-500 hover:from-sky-700 hover:to-sky-600 text-white transition-all",children:"Done"})]}))]}),e.jsx(Rd,{isOpen:Ue,onClose:()=>Ne(!1)}),e.jsx(es,{children:oi&&e.jsx(Ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/40 z-[60] flex items-center justify-center p-4",onClick:()=>ws(!1),children:e.jsxs(Ie.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},className:"bg-[#f7f9fc] rounded-2xl shadow-2xl w-full max-w-md max-h-[70vh] flex flex-col overflow-hidden border border-[#dde3eb]",onClick:u=>u.stopPropagation(),children:[e.jsxs("div",{className:"px-5 py-4 border-b border-[#dde3eb] flex items-center justify-between",children:[e.jsxs("h3",{className:"text-base font-bold font-display text-[#0a1628] flex items-center gap-2",children:[e.jsx(Ga,{size:18,className:"text-sky-600"}),"Assign to Student"]}),e.jsx("button",{onClick:()=>ws(!1),className:"p-1 hover:bg-[#edf1f7] rounded-lg transition-colors",children:e.jsx(ca,{size:16,className:"text-slate-500"})})]}),e.jsx("div",{className:"px-5 py-3 border-b border-[#dde3eb]",children:e.jsxs("div",{className:"flex items-center gap-2 bg-[#edf1f7] rounded-xl px-3 py-2",children:[e.jsx(ha,{size:14,className:"text-slate-500"}),e.jsx("input",{type:"text",placeholder:"Search students…",value:Na,onChange:u=>wr(u.target.value),className:"flex-1 bg-transparent text-sm outline-none placeholder:text-slate-500"})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto p-3 space-y-1",children:li?e.jsx("div",{className:"flex items-center justify-center py-10",children:e.jsx(at,{size:20,className:"animate-spin text-sky-500"})}):Br.length===0?e.jsx("p",{className:"text-center text-sm text-slate-500 py-10",children:"No students found"}):Br.map(u=>e.jsxs("button",{onClick:()=>Sr(u.id),className:`w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-left transition-colors ${Yt===u.id?"bg-sky-50 border border-sky-300":"hover:bg-[#edf1f7] border border-transparent"}`,children:[e.jsx("img",{src:u.avatar||`https://ui-avatars.com/api/?name=${encodeURIComponent(u.name)}&background=random&size=32`,alt:u.name,className:"w-8 h-8 rounded-lg object-cover"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-semibold text-[#0a1628] truncate",children:u.name}),e.jsx("p",{className:"text-xs text-slate-500 truncate",children:u.email})]}),Yt===u.id&&e.jsx(us,{size:16,className:"text-sky-600 flex-shrink-0"})]},u.id))}),e.jsxs("div",{className:"px-5 py-3 border-t border-[#dde3eb] flex justify-end gap-2",children:[e.jsx("button",{onClick:()=>ws(!1),className:"px-4 py-2 text-sm font-medium text-[#5a6578] hover:bg-[#edf1f7] rounded-xl transition-colors",children:"Cancel"}),e.jsxs("button",{onClick:yi,disabled:!Yt||va,className:`flex items-center gap-2 px-4 py-2 rounded-xl text-sm font-bold transition-all ${Yt&&!va?"bg-gradient-to-r from-sky-600 to-sky-500 text-white shadow-sm":"bg-[#dde3eb] text-slate-500 cursor-not-allowed"}`,children:[va?e.jsx(at,{size:14,className:"animate-spin"}):e.jsx(Ls,{size:14}),"Assign"]})]})]})})})]})};function $a({className:t,...s}){return e.jsx(Ui,{"data-slot":"label",className:Jn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...s})}const Fd=()=>{const[t,s]=b.useState([]),[a,r]=b.useState(!1),[n,o]=b.useState(!1),[i,l]=b.useState(""),[c,d]=b.useState(11),[x,N]=b.useState("general_mathematics"),m=b.useCallback(async()=>{r(!0);try{const j=await Pr("/api/quiz-battle/bank-status");s(j.pdfs)}catch(j){const h=j instanceof Fs?j.message:"Failed to load bank status";ue.error(h)}finally{r(!1)}},[]);b.useEffect(()=>{m()},[m]);const f=async()=>{if(!i.trim()){ue.error("Please enter a storage path");return}o(!0);try{await Pr("/api/quiz-battle/ingest-pdf",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({storage_path:i.trim(),grade_level:c,topic:x.trim(),force_reingest:!1})}),ue.success("PDF ingestion completed"),await m(),l("")}catch(j){const h=j instanceof Fs?j.message:"Ingestion failed";ue.error(h)}finally{o(!1)}},w=t.reduce((j,h)=>j+h.question_count,0),T=t.filter(j=>j.processed).length;return e.jsxs("div",{className:"space-y-6 p-6 max-w-6xl mx-auto",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 bg-[#9956DE]/12 rounded-xl border border-[#9956DE]/30",children:e.jsx(ss,{className:"h-5 w-5 text-[#9956DE]"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-display font-bold text-foreground",children:"Question Bank"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage PDF-ingested quiz questions for battle sessions"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsxs(Cs,{children:[e.jsx(ks,{className:"pb-2",children:e.jsxs(Ts,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[e.jsx(tr,{className:"h-4 w-4"}),"Total PDFs"]})}),e.jsx(Is,{children:e.jsx("div",{className:"text-3xl font-display font-bold text-foreground",children:t.length})})]}),e.jsxs(Cs,{children:[e.jsx(ks,{className:"pb-2",children:e.jsxs(Ts,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[e.jsx(ss,{className:"h-4 w-4"}),"Total Questions"]})}),e.jsx(Is,{children:e.jsx("div",{className:"text-3xl font-display font-bold text-foreground",children:w})})]}),e.jsxs(Cs,{children:[e.jsx(ks,{className:"pb-2",children:e.jsxs(Ts,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[e.jsx(Qa,{className:"h-4 w-4"}),"Processed"]})}),e.jsx(Is,{children:e.jsx("div",{className:"text-3xl font-display font-bold text-foreground",children:T})})]})]}),e.jsxs(Cs,{children:[e.jsx(ks,{children:e.jsx(Ts,{className:"text-base font-display font-bold",children:"Ingest New PDF"})}),e.jsxs(Is,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx($a,{htmlFor:"storagePath",children:"Firebase Storage Path"}),e.jsx(pt,{id:"storagePath",placeholder:"quiz_pdfs/grade_11/general_math.pdf",value:i,onChange:j=>l(j.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx($a,{htmlFor:"gradeLevel",children:"Grade Level"}),e.jsx(pt,{id:"gradeLevel",type:"number",min:7,max:12,value:c,onChange:j=>d(Number(j.target.value))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx($a,{htmlFor:"topic",children:"Topic Slug"}),e.jsx(pt,{id:"topic",placeholder:"general_mathematics",value:x,onChange:j=>N(j.target.value)})]})]}),e.jsxs(Ve,{onClick:f,disabled:n,className:"bg-[#9956DE] hover:bg-[#9956DE]/90",children:[n?e.jsx(at,{className:"mr-2 h-4 w-4 animate-spin"}):e.jsx(gl,{className:"mr-2 h-4 w-4"}),"Ingest PDF"]})]})]}),e.jsxs(Cs,{children:[e.jsxs(ks,{className:"flex flex-row items-center justify-between",children:[e.jsx(Ts,{className:"text-base font-display font-bold",children:"Processing Status"}),e.jsx(Ve,{variant:"outline",size:"sm",onClick:m,disabled:a,children:e.jsx(Qa,{className:`h-4 w-4 ${a?"animate-spin":""}`})})]}),e.jsx(Is,{children:e.jsxs(rl,{children:[e.jsx(nl,{children:e.jsxs(Ea,{children:[e.jsx(is,{children:"Filename"}),e.jsx(is,{children:"Grade"}),e.jsx(is,{children:"Topic"}),e.jsx(is,{children:"Questions"}),e.jsx(is,{children:"Status"}),e.jsx(is,{children:"Processed At"})]})}),e.jsxs(ol,{children:[t.map(j=>e.jsxs(Ea,{children:[e.jsx(Kt,{className:"font-medium",children:j.filename}),e.jsx(Kt,{children:j.grade_level}),e.jsx(Kt,{children:j.topic}),e.jsx(Kt,{children:j.question_count}),e.jsx(Kt,{children:e.jsx("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${j.processed?"bg-emerald-100 text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-300":"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300"}`,children:j.processed?"Processed":"Pending"})}),e.jsx(Kt,{children:j.timestamp?new Date(j.timestamp).toLocaleDateString():"-"})]},j.filename)),t.length===0&&e.jsx(Ea,{children:e.jsx(Kt,{colSpan:6,className:"text-center text-muted-foreground py-8",children:"No PDFs processed yet. Upload a PDF to get started."})})]})]})})]})]})},En={totalTopicsTracked:0,masteredCount:0,needsAttentionCount:0,excludedCount:0},Bd={"gen-math":{label:"GEN MATH",color:"bg-sky-100 text-sky-700"},"stats-prob":{label:"STAT&PROB",color:"bg-sky-100 text-sky-700"},"pre-calc":{label:"PRE-CALC",color:"bg-orange-100 text-orange-700"},"basic-calc":{label:"BASIC CALC",color:"bg-red-100 text-red-700"}},$d={mastered:{label:"MASTERED BY CLASS",color:"bg-green-100 text-green-700 border-green-300"},on_track:{label:"ON TRACK",color:"bg-sky-100 text-sky-700 border-sky-300"},needs_attention:{label:"NEEDS ATTENTION",color:"bg-red-100 text-red-700 border-red-300"},no_data:{label:"NO DATA YET",color:"bg-[#edf1f7] text-[#5a6578] border-[#dde3eb]"}},Rn={needs_attention:0,on_track:1,no_data:2,mastered:3},Od=({classSectionId:t})=>{const{currentUser:s}=Us(),[a,r]=b.useState([]),[n,o]=b.useState(En),[i,l]=b.useState(!0),[c,d]=b.useState("all"),[x,N]=b.useState("all"),[m,f]=b.useState(""),[w,T]=b.useState("classAverage"),[j,h]=b.useState("asc"),y=Gr.map(E=>E.id),k=Gr.reduce((E,U)=>(E[U.id]=U.name,E),{}),{isLoading:D,refetch:p}=jl();b.useEffect(()=>{D||(console.log("[TopicMasteryView] Curriculum ready"),p())},[D,p]);const[z,g]=b.useState(new Set),[S,I]=b.useState([]),B=bl({queryKey:Fi.topicMastery(s?.uid||"anonymous",t),enabled:!!s,staleTime:120*1e3,gcTime:900*1e3,queryFn:async()=>{try{if(!s)return{excluded:[],topics:[],summary:{totalTopicsTracked:0,masteredCount:0,needsAttentionCount:0,excludedCount:0}};const E=ut(Ye,"teachers",s.uid,"settings","quizSettings"),U=await xs(E),W=U.exists()?U.data()?.excludedTopics||[]:[],ge="https://deign86-mathpulse-api-v3test.hf.space",L=new URLSearchParams({teacherId:s.uid});t&&L.set("classSectionId",t);const C=await s.getIdToken(),G=await fetch(`${ge}/api/analytics/topic-mastery?${L.toString()}`,{headers:{Authorization:`Bearer ${C}`}});if(!G.ok)return{excluded:W,topics:[],summary:{totalTopicsTracked:0,masteredCount:0,needsAttentionCount:0,excludedCount:W.length}};const F=await G.json(),ie=(F.topics||[]).map(R=>({...R,isExcluded:W.includes(R.topicName)}));return{excluded:W,topics:ie,summary:F.summary||{totalTopicsTracked:0,masteredCount:0,needsAttentionCount:0,excludedCount:W.length}}}catch{return{excluded:[],topics:[],summary:{totalTopicsTracked:0,masteredCount:0,needsAttentionCount:0,excludedCount:0}}}}});b.useEffect(()=>{if(l(B.isLoading||B.isFetching),!B.data){I([]),r([]),o(En),g(new Set);return}I(B.data.excluded),r(B.data.topics),o(B.data.summary)},[B.data,B.isFetching,B.isLoading]);const P=async E=>{if(!s)return;const U=S.includes(E)?S.filter(W=>W!==E):[...S,E];I(U),r(W=>W.map(ge=>ge.topicName===E?{...ge,isExcluded:!ge.isExcluded}:ge)),o(W=>({...W,excludedCount:U.length}));try{const W=ut(Ye,"teachers",s.uid,"settings","quizSettings");(await xs(W)).exists()?await _t(W,{excludedTopics:U}):await Pt(W,{excludedTopics:U})}catch{ue.error("Failed to update excluded topics")}},J=async()=>{if(!s)return;const E=[...new Set([...S,...z])];I(E),r(U=>U.map(W=>z.has(W.topicName)?{...W,isExcluded:!0}:W)),o(U=>({...U,excludedCount:E.length})),g(new Set);try{const U=ut(Ye,"teachers",s.uid,"settings","quizSettings");(await xs(U)).exists()?await _t(U,{excludedTopics:E}):await Pt(U,{excludedTopics:E}),ue.success(`${z.size} topics excluded from quizzes`)}catch{ue.error("Failed to update")}},ne=async()=>{if(!s)return;const E=S.filter(U=>!z.has(U));I(E),r(U=>U.map(W=>z.has(W.topicName)?{...W,isExcluded:!1}:W)),o(U=>({...U,excludedCount:E.length})),g(new Set);try{const U=ut(Ye,"teachers",s.uid,"settings","quizSettings");(await xs(U)).exists()?await _t(U,{excludedTopics:E}):await Pt(U,{excludedTopics:E}),ue.success(`${z.size} topics re-included in quizzes`)}catch{ue.error("Failed to update")}},X=E=>{w===E?h(U=>U==="asc"?"desc":"asc"):(T(E),h("asc"))},te=x==="all"?y:vl(x);b.useEffect(()=>{c!=="all"&&(te.includes(c)||d("all"))},[te,c]);const se=a.filter(E=>!(c!=="all"&&E.subjectId!==c||!te.includes(E.subjectId)||m&&!E.topicName.toLowerCase().includes(m.toLowerCase()))).sort((E,U)=>{const W=j==="asc"?1:-1;switch(w){case"topicName":return W*E.topicName.localeCompare(U.topicName);case"classAverage":return W*(E.classAverage-U.classAverage);case"studentsAttempted":return W*(E.studentsAttempted-U.studentsAttempted);case"masteryStatus":return W*((Rn[E.masteryStatus]||0)-(Rn[U.masteryStatus]||0));default:return 0}}),$=()=>{z.size===se.length?g(new Set):g(new Set(se.map(E=>E.topicName)))},Y=({field:E})=>w!==E?e.jsx(ts,{size:12,className:"text-slate-500"}):j==="asc"?e.jsx(da,{size:12,className:"text-sky-600"}):e.jsx(ts,{size:12,className:"text-sky-600"});return i?e.jsxs("div",{className:"flex items-center justify-center py-20",children:[e.jsx(at,{size:24,className:"animate-spin text-sky-500"}),e.jsx("span",{className:"ml-2 text-[#5a6578]",children:"Loading topic mastery data..."})]}):e.jsxs(Ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold text-[#0a1628]",children:"Class Topic Mastery"}),e.jsx("p",{className:"text-sm text-[#5a6578] mt-1",children:"Topics where 75% or more of the class scored 85%+ are marked as mastered and can be excluded from future quiz generation."})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"bg-white rounded-2xl p-5 shadow-sm border border-[#dde3eb]",children:[e.jsx("div",{className:"flex items-center gap-3 mb-2",children:e.jsx("div",{className:"w-10 h-10 bg-sky-100 rounded-xl flex items-center justify-center",children:e.jsx(Bs,{size:20,className:"text-sky-600"})})}),e.jsx("p",{className:"text-2xl font-bold text-[#0a1628]",children:n.totalTopicsTracked}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"Total Topics Tracked"})]}),e.jsxs("div",{className:"bg-white rounded-2xl p-5 shadow-sm border border-green-200",children:[e.jsx("div",{className:"flex items-center gap-3 mb-2",children:e.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-xl flex items-center justify-center",children:e.jsx(lo,{size:20,className:"text-green-600"})})}),e.jsx("p",{className:"text-2xl font-bold text-green-600",children:n.masteredCount}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"Mastered by Class"})]}),e.jsxs("div",{className:"bg-white rounded-2xl p-5 shadow-sm border border-red-200",children:[e.jsx("div",{className:"flex items-center gap-3 mb-2",children:e.jsx("div",{className:"w-10 h-10 bg-red-100 rounded-xl flex items-center justify-center",children:e.jsx(gs,{size:20,className:"text-red-600"})})}),e.jsx("p",{className:"text-2xl font-bold text-red-600",children:n.needsAttentionCount}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"Needs Work"})]}),e.jsxs("div",{className:"bg-white rounded-2xl p-5 shadow-sm border border-[#dde3eb]",children:[e.jsx("div",{className:"flex items-center gap-3 mb-2",children:e.jsx("div",{className:"w-10 h-10 bg-[#edf1f7] rounded-xl flex items-center justify-center",children:e.jsx(sl,{size:20,className:"text-[#5a6578]"})})}),e.jsx("p",{className:"text-2xl font-bold text-[#5a6578]",children:n.excludedCount}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"Excluded Topics"})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 bg-white rounded-xl px-3 py-2 border border-[#dde3eb]",children:[e.jsx(ha,{size:14,className:"text-slate-500"}),e.jsx("input",{type:"text",placeholder:"Search topics...",value:m,onChange:E=>f(E.target.value),className:"bg-transparent text-sm outline-none w-40 placeholder:text-slate-500"})]}),e.jsxs("select",{value:c,onChange:E=>d(E.target.value),className:"bg-white border border-[#dde3eb] rounded-xl px-3 py-2 text-sm outline-none",children:[e.jsx("option",{value:"all",children:"All Subjects"}),te.map(E=>e.jsx("option",{value:E,children:k[E]||E},E))]}),e.jsxs("select",{value:x,onChange:E=>N(E.target.value),className:"bg-white border border-[#dde3eb] rounded-xl px-3 py-2 text-sm outline-none",children:[e.jsx("option",{value:"all",children:"All Grades"}),Nl.map(E=>e.jsx("option",{value:E,children:E},E))]})]}),e.jsx(es,{children:z.size>0&&e.jsxs(Ie.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"bg-sky-50 border border-sky-200 rounded-xl p-3 flex items-center gap-3 flex-wrap overflow-hidden",children:[e.jsxs("span",{className:"text-sm font-semibold text-sky-700",children:[z.size," topics selected"]}),e.jsx("button",{onClick:J,className:"px-3 py-1.5 bg-[#5a6578] text-white text-xs font-bold rounded-lg hover:bg-sky-600 transition-colors",children:"Exclude Selected Topics"}),e.jsx("button",{onClick:ne,className:"px-3 py-1.5 bg-green-600 text-white text-xs font-bold rounded-lg hover:bg-green-700 transition-colors",children:"Include Selected Topics"}),e.jsx("button",{onClick:()=>g(new Set),className:"px-3 py-1.5 bg-white border border-[#dde3eb] text-[#5a6578] text-xs font-bold rounded-lg hover:bg-[#edf1f7] transition-colors",children:"Clear Selection"})]})}),e.jsx("div",{className:"bg-white rounded-2xl shadow-sm border border-[#dde3eb] overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-[#edf1f7] border-b border-[#dde3eb]",children:[e.jsx("th",{className:"px-4 py-3 w-10",children:e.jsx("input",{type:"checkbox",checked:z.size===se.length&&se.length>0,onChange:$,className:"w-4 h-4 rounded border-[#dde3eb] text-sky-600 focus:ring-sky-500"})}),e.jsx("th",{className:"px-4 py-3 text-xs font-bold text-[#5a6578] uppercase tracking-wide cursor-pointer hover:text-sky-600",onClick:()=>X("topicName"),children:e.jsxs("span",{className:"flex items-center gap-1",children:["Topic Name ",e.jsx(Y,{field:"topicName"})]})}),e.jsx("th",{className:"px-4 py-3 text-xs font-bold text-[#5a6578] uppercase tracking-wide",children:"Unit"}),e.jsx("th",{className:"px-4 py-3 text-xs font-bold text-[#5a6578] uppercase tracking-wide cursor-pointer hover:text-sky-600",onClick:()=>X("classAverage"),children:e.jsxs("span",{className:"flex items-center gap-1",children:["Class Avg % ",e.jsx(Y,{field:"classAverage"})]})}),e.jsx("th",{className:"px-4 py-3 text-xs font-bold text-[#5a6578] uppercase tracking-wide cursor-pointer hover:text-sky-600",onClick:()=>X("studentsAttempted"),children:e.jsxs("span",{className:"flex items-center gap-1",children:["Students ",e.jsx(Y,{field:"studentsAttempted"})]})}),e.jsx("th",{className:"px-4 py-3 text-xs font-bold text-[#5a6578] uppercase tracking-wide cursor-pointer hover:text-sky-600",onClick:()=>X("masteryStatus"),children:e.jsxs("span",{className:"flex items-center gap-1",children:["Status ",e.jsx(Y,{field:"masteryStatus"})]})}),e.jsx("th",{className:"px-4 py-3 text-xs font-bold text-[#5a6578] uppercase tracking-wide",children:"Exclude"})]})}),e.jsx("tbody",{children:se.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:"px-4 py-16 text-center",children:a.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx(Bs,{size:32,className:"text-[#dde3eb]"}),e.jsx("p",{className:"text-sm font-medium text-[#5a6578]",children:"No topic data available yet"}),e.jsx("p",{className:"text-xs text-[#a0aec0]",children:"Import student quiz data to see class topic mastery analytics."})]}):e.jsx("span",{className:"text-sm text-slate-500",children:"No topics match the current filters."})})}):se.map(E=>{const U=z.has(E.topicName),W=$d[E.masteryStatus],ge=Bd[E.subjectId]||{label:E.subjectId.toUpperCase(),color:"bg-[#edf1f7] text-[#5a6578]"},L=E.classAverage<60?"bg-red-500":E.classAverage<85?"bg-rose-500":"bg-green-500",C=E.isExcluded?"bg-[#edf1f7] opacity-60":E.masteryStatus==="needs_attention"?"bg-red-50/30":E.masteryStatus==="mastered"?"bg-green-50/30":"";return e.jsxs("tr",{className:`border-b border-[#dde3eb] hover:bg-[#edf1f7] transition-colors ${C} ${E.isExcluded?"line-through decoration-slate-400":""}`,children:[e.jsx("td",{className:"px-4 py-3",children:e.jsx("input",{type:"checkbox",checked:U,onChange:()=>{const G=new Set(z);U?G.delete(E.topicName):G.add(E.topicName),g(G)},className:"w-4 h-4 rounded border-[#dde3eb] text-sky-600 focus:ring-sky-500"})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium text-[#0a1628]",children:E.topicName}),e.jsx("span",{className:`text-[10px] font-bold px-1.5 py-0.5 rounded ${ge.color}`,children:ge.label})]})}),e.jsx("td",{className:"px-4 py-3 text-xs text-[#5a6578]",children:E.unit}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-1 h-2 bg-[#edf1f7] rounded-full overflow-hidden max-w-20",children:e.jsx("div",{className:`h-full rounded-full e-w ${L}`,style:{"--w":`${E.classAverage}%`}})}),e.jsxs("span",{className:"text-xs font-bold text-[#0a1628] w-8 text-right",children:[E.classAverage,"%"]})]})}),e.jsxs("td",{className:"px-4 py-3 text-xs text-[#5a6578]",children:[E.studentsAttempted,"/",E.totalStudents]}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded border ${W.color}`,children:W.label})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"group relative",children:[e.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:E.isExcluded,onChange:()=>P(E.topicName),className:"sr-only peer"}),e.jsx("div",{className:"w-9 h-5 bg-[#dde3eb] peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-[#dde3eb] after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-[#5a6578]"})]}),e.jsx("div",{className:"hidden group-hover:block absolute z-20 bottom-full left-0 mb-1 px-2 py-1 bg-slate-800 text-white text-[10px] rounded whitespace-nowrap",children:"Excluded topics will not appear in AI-generated quizzes for your class"})]})})]},E.topicName)})})]})})})]})};function Xo(t){return(t||"").trim().toLowerCase()}function Mn(t){const s=(t.lrn||"").trim().toLowerCase();if(s)return`lrn:${s}`;const a=(t.email||"").trim().toLowerCase();if(a)return`email:${a}`;const r=t.name.trim().toLowerCase();if(r)return`name:${r}`;const n=Xo(t.classSectionId),o=(t.id||"").trim().toLowerCase();return n&&o?`${n}|id:${o}`:o?`id:${o}`:`${n}|anonymous`}function Pd(t,s){const a=[],r=(t.lrn||"").trim().toLowerCase(),n=(t.email||"").trim().toLowerCase(),o=t.name.trim().toLowerCase(),i=(t.id||"").trim().toLowerCase();return r&&a.push(`${s}|lrn:${r}`),n&&a.push(`${s}|email:${n}`),o&&a.push(`${s}|name:${o}`),i&&a.push(`${s}|id:${i}`),a.length===0&&a.push(`${s}|anonymous`),a}function _d(t,s){const a=[t.riskLevel,s.riskLevel].includes("High")?"High":[t.riskLevel,s.riskLevel].includes("Medium")?"Medium":"Low";return{...t,lrn:t.lrn||s.lrn,classSectionId:t.classSectionId??s.classSectionId,avgQuizScore:s.avgQuizScore>0?s.avgQuizScore:t.avgQuizScore,engagementScore:s.engagementScore>0?s.engagementScore:t.engagementScore,weakestTopic:t.weakestTopic&&t.weakestTopic!=="Foundational Skills"?t.weakestTopic:s.weakestTopic,riskLevel:a}}function Jo(t,s){const a=new Map,r=new Map,n=s?Xo(s):"all";return t.forEach(o=>{const i=Pd(o,n),l=i.map(x=>r.get(x)).find(Boolean)||i[0],c=a.get(l),d=c?_d(c,o):o;a.set(l,d),i.forEach(x=>r.set(x,l))}),Array.from(a.values())}function An(t,s){return Jo([...t,...s])}function Jt(t){return Number.isFinite(t)?Math.max(0,Math.min(100,t)):0}function Hd(t){if(!t)return null;const s="gen-math",a=Qr.find(i=>i.id===s)?.modules||[];if(a.length===0)return null;const r={mastery:0,concept:0,application:0,engagement:0,consistency:0},n=t.lessons??{};a.forEach(i=>{const l=Qr.find(j=>j.modules.some(h=>h.id===i.id)),c=l?t?.subjects?.[l.id]?.modulesProgress?.[i.id]:null,d=Jt(c?.progress||0),x=i.lessons.length?i.lessons.reduce((j,h)=>{const y=n?.[h.id]?.score;if(typeof y=="number"&&Number.isFinite(y))return j+Jt(y);const k=!!c?.lessonsCompleted?.includes?.(h.id);return j+(k?100:0)},0)/i.lessons.length:0,N=i.quizzes.length?(c?.quizzesCompleted?.length||0)/i.quizzes.length*100:0,m=Jt(x),f=Jt(N),w=Jt(Math.min(100,(m+f*2)/1.5)),T=Jt(Math.min(100,40+d*.6));r.mastery+=d,r.concept+=m,r.application+=f,r.engagement+=w,r.consistency+=T});const o=a.length;return{mastery:Math.round(r.mastery/o),concept:Math.round(r.concept/o),application:Math.round(r.application/o),engagement:Math.round(r.engagement/o),consistency:Math.round(r.consistency/o)}}const Oa={High:{bg:"bg-red-100",text:"text-red-700",ring:"ring-red-300"},Medium:{bg:"bg-rose-100",text:"text-rose-700",ring:"ring-rose-300"},Low:{bg:"bg-green-100",text:"text-green-700",ring:"ring-green-300"}},Ln={advanced:{bg:"bg-emerald-100",text:"text-emerald-700",bar:"bg-emerald-500"},proficient:{bg:"bg-sky-100",text:"text-sky-700",bar:"bg-sky-500"},developing:{bg:"bg-rose-100",text:"text-rose-700",bar:"bg-rose-500"},beginner:{bg:"bg-red-100",text:"text-red-700",bar:"bg-red-500"}},Dn=[{key:"mastery",short:"M",label:"Overall Mastery",header:"Mastery"},{key:"concept",short:"C",label:"Concept Grasp",header:"Concept"},{key:"application",short:"A",label:"Application",header:"Application"},{key:"engagement",short:"E",label:"Engagement",header:"Engagement"},{key:"consistency",short:"S",label:"Consistency",header:"Consistency"}];function Gd(t){const s=Jt(t);return s>=80?{bg:"bg-[color-mix(in_srgb,var(--chart-3)_14%,transparent)]",text:"text-[var(--chart-3)]",ring:"ring-[color-mix(in_srgb,var(--chart-3)_40%,transparent)]"}:s>=60?{bg:"bg-[color-mix(in_srgb,var(--chart-4)_14%,transparent)]",text:"text-[var(--chart-4)]",ring:"ring-[color-mix(in_srgb,var(--chart-4)_40%,transparent)]"}:{bg:"bg-[color-mix(in_srgb,var(--chart-2)_14%,transparent)]",text:"text-[var(--chart-2)]",ring:"ring-[color-mix(in_srgb,var(--chart-2)_40%,transparent)]"}}const Qd=({classSectionId:t,className:s,fallbackStudents:a=[]})=>{const{currentUser:r}=Us(),n=b.useRef(0),[o,i]=b.useState([]),[l,c]=b.useState(!0),[d,x]=b.useState(""),[N,m]=b.useState("riskLevel"),[f,w]=b.useState("desc"),[T,j]=b.useState("all"),[h,y]=b.useState([]),[k,D]=b.useState(!1),[p,z]=b.useState(""),[g,S]=b.useState(""),I=b.useCallback(C=>({id:C.id,lrn:C.lrn||void 0,name:C.name,email:C.email||"",avatar:`https://ui-avatars.com/api/?name=${encodeURIComponent(C.name)}&background=random`,classSectionId:C.classSectionId??null,riskLevel:C.riskLevel||"Low",engagementScore:C.engagementScore,avgQuizScore:C.avgQuizScore,weakestTopic:C.weakestTopic||"Foundational Skills"}),[]),B=b.useCallback(C=>({id:C.id,lrn:C.lrn,name:C.name,email:C.email||"",avatar:C.avatar||`https://ui-avatars.com/api/?name=${encodeURIComponent(C.name)}&background=random`,classSectionId:C.classSectionId??null,riskLevel:String(C.riskLevel).charAt(0).toUpperCase()+String(C.riskLevel).slice(1).toLowerCase(),engagementScore:C.engagementScore,avgQuizScore:Number(C.avgQuizScore??C.avgScore??0),weakestTopic:C.weakestTopic||"Foundational Skills"}),[]),P=b.useCallback(async(C,G)=>{const F=new Map;C.forEach(R=>F.set(R.id,null));const ie=25;for(let R=0;R{try{const ee=await _r(ae.id);return{studentId:ae.id,summary:Hd(ee)}}catch{return{studentId:ae.id,summary:null}}}))).forEach((ae,ee)=>{const V=H[ee]?.id;V&&(ae.status==="fulfilled"?F.set(V,ae.value.summary):F.set(V,null))})}n.current===G&&i(R=>R.map(H=>F.has(H.student.id)?{...H,competencyMatrix:F.get(H.student.id)??null,competencyMatrixLoading:!1}:H))},[]),J=b.useCallback(async()=>{if(r?.uid){c(!0),S("");try{let G=(await pr(r.uid)).map(H=>({id:H.id,name:H.name,email:H.email||"",avatar:H.avatar||`https://ui-avatars.com/api/?name=${encodeURIComponent(H.name)}&background=random`,classSectionId:H.classSectionId??null,riskLevel:H.riskLevel,engagementScore:H.engagementScore,avgQuizScore:H.avgQuizScore,weakestTopic:H.weakestTopic||"Foundational Skills"}));a.length>0&&(G=An(G,a.map(B))),t&&(G=G.filter(H=>H.classSectionId===t));const F=await We.getImportedClassOverview({classSectionId:t,limit:3e3});F.warnings.length>0&&S(F.warnings.join(" ")),G=An(G,F.students.map(I));const ie=Jo(G,t),R=n.current+=1;i(ie.map((H,q)=>({rowKey:`${Mn(H)}|row:${q}`,student:H,competency:null,competencyMatrix:null,competencyMatrixLoading:!0,loading:!1,expanded:!1}))),P(ie,R)}catch(C){if(console.error("Failed to load students:",C),a.length>0){const G=a.map(B).filter(F=>!t||F.classSectionId===t).map((F,ie)=>({rowKey:`${Mn(F)}|row:${ie}`,student:F,competency:null,competencyMatrix:null,competencyMatrixLoading:!1,loading:!1,expanded:!1}));i(G),S("Showing recently imported students while backend roster sync catches up.")}else i([]),S("Student competency roster is unavailable right now.")}finally{c(!1)}}},[t,r?.uid,a,P,B,I]);b.useEffect(()=>{J()},[J]),b.useEffect(()=>{(async()=>{if(!t){y([]),z("");return}D(!0),z("");try{const G=await We.getCourseMaterialTopics({classSectionId:t,limit:20}),F=(G.topics||[]).filter(ie=>ie.title?.trim());y(F),G.warnings.length>0&&z(G.warnings.join(" "))}catch{y([]),z("Imported topic context is unavailable right now.")}finally{D(!1)}})()},[t]);const ne=async C=>{i(G=>G.map(F=>{if(F.rowKey!==C)return F;const ie=!F.expanded,R=F.student.id,H={weakestTopic:F.student.weakestTopic,avgQuizScore:F.student.avgQuizScore};return ie&&!F.competency&&!F.loading?(X(C,R,H),{...F,expanded:!0,loading:!0}):{...F,expanded:ie}}))},X=async(C,G,F)=>{try{const R=((await _r(G))?.quizAttempts??[]).map(q=>({topic:q.quizId,score:q.score,total:100,timeTaken:q.timeSpent})),H=await We.getStudentCompetency(G,R.length>0?R:void 0);i(q=>q.map(ae=>ae.rowKey===C?{...ae,competency:H,loading:!1}:ae))}catch{const R=F.avgQuizScore||50,H={studentId:G,competencies:[{topic:F.weakestTopic||"Unknown",efficiencyScore:Math.max(15,R-20),competencyLevel:R<50?"beginner":"developing",perspective:`Student needs focused practice in ${F.weakestTopic}.`},{topic:"Functions and Relations",efficiencyScore:Math.min(95,R+10),competencyLevel:R>70?"proficient":"developing",perspective:"Shows solid understanding of function concepts."},{topic:"Problem Solving",efficiencyScore:R,competencyLevel:R>80?"advanced":R>60?"proficient":"developing",perspective:"Applies mathematical reasoning consistently."}],recommendedTopics:[F.weakestTopic||"Review fundamentals"],excludeTopics:[]};i(q=>q.map(ae=>ae.rowKey===C?{...ae,competency:H,loading:!1}:ae))}},te=C=>{N===C?w(G=>G==="asc"?"desc":"asc"):(m(C),w("asc"))},se={High:0,Medium:1,Low:2},$=o.filter(C=>{if(T!=="all"&&C.student.riskLevel!==T)return!1;if(d){const G=d.toLowerCase();return C.student.name.toLowerCase().includes(G)||C.student.email.toLowerCase().includes(G)}return!0}).sort((C,G)=>{let F=0;switch(N){case"name":F=C.student.name.localeCompare(G.student.name);break;case"avgQuizScore":F=C.student.avgQuizScore-G.student.avgQuizScore;break;case"riskLevel":F=se[C.student.riskLevel]-se[G.student.riskLevel];break;case"engagementScore":F=C.student.engagementScore-G.student.engagementScore;break}return f==="asc"?F:-F}),Y=o.length,E=o.filter(C=>C.student.riskLevel==="High").length,U=Y>0?Math.round(o.reduce((C,G)=>C+G.student.avgQuizScore,0)/Y):0,W=Y>0?Math.round(o.reduce((C,G)=>C+G.student.engagementScore,0)/Y):0,ge=Array.from(new Set(h.map(C=>C.title).filter(Boolean))).slice(0,10),L=({field:C})=>N!==C?e.jsx(ts,{size:14,className:"text-slate-500"}):f==="asc"?e.jsx(da,{size:14,className:"text-sky-600"}):e.jsx(ts,{size:14,className:"text-sky-600"});return l?e.jsxs("div",{className:"flex items-center justify-center py-20 p-6",children:[e.jsx(at,{size:32,className:"animate-spin text-[var(--primary)]"}),e.jsx("span",{className:"ml-3 text-muted-foreground",children:"Loading student data..."})]}):e.jsxs(Ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"p-6 space-y-6",children:[e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:[{label:"Total Students",value:Y,icon:e.jsx(Ur,{size:20}),color:"bg-[color-mix(in_srgb,var(--primary)_10%,transparent)] text-[var(--primary)]"},{label:"At-Risk Students",value:E,icon:e.jsx(gs,{size:20}),color:"bg-[color-mix(in_srgb,var(--chart-2)_10%,transparent)] text-[var(--chart-2)]"},{label:"Class Average",value:`${U}%`,icon:e.jsx(Bs,{size:20}),color:"bg-[color-mix(in_srgb,var(--chart-3)_10%,transparent)] text-[var(--chart-3)]"},{label:"Avg. Engagement",value:`${W}%`,icon:e.jsx(sr,{size:20}),color:"bg-[color-mix(in_srgb,var(--chart-1)_10%,transparent)] text-[var(--chart-1)]"}].map((C,G)=>e.jsxs("div",{className:"bg-card rounded-xl border border-border p-4 flex items-center gap-3",children:[e.jsx("div",{className:`w-10 h-10 rounded-lg flex items-center justify-center ${C.color}`,children:C.icon}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold text-foreground",children:C.value}),e.jsx("p",{className:"text-xs text-muted-foreground",children:C.label})]})]},G))}),e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"relative flex-1 w-full sm:max-w-xs",children:[e.jsx("label",{htmlFor:"student-search",className:"sr-only",children:"Search for students by name or email"}),e.jsx(ha,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),e.jsx("input",{id:"student-search",type:"text",placeholder:"Search students...",value:d,onChange:C=>x(C.target.value),className:"w-full pl-9 pr-4 py-2 border border-border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-sky-500/20 focus:border-sky-400"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:["all","High","Medium","Low"].map(C=>e.jsx("button",{onClick:()=>j(C),className:`px-3 py-1.5 rounded-lg text-xs font-semibold transition-all ${T===C?"bg-[var(--primary)] text-white":"bg-muted text-muted-foreground hover:bg-accent"}`,children:C==="all"?"All":`${C} Risk`},C))}),e.jsxs("button",{onClick:J,className:"sm:ml-auto w-full sm:w-auto flex items-center justify-center gap-1.5 px-3 py-1.5 bg-muted hover:bg-accent rounded-lg text-xs font-semibold text-muted-foreground transition-colors",children:[e.jsx(Qa,{size:14}),"Refresh"]})]}),e.jsxs("div",{className:"bg-[color-mix(in_srgb,var(--primary)_10%,transparent)] border border-[color-mix(in_srgb,var(--primary)_30%,transparent)] rounded-xl p-4",children:[e.jsxs("p",{className:"text-sm font-semibold text-[var(--primary)]",children:["Imported Topic Context",s?` for ${s}`:""]}),e.jsx("p",{className:"text-xs text-[var(--primary)] mt-1 opacity-80",children:k?"Loading class-scoped imported topics...":ge.length>0?`${ge.length} imported topics loaded for competency guidance`:"No imported topics found for this class context"}),p&&e.jsx("p",{className:"text-[11px] text-[var(--chart-4)] mt-1",children:p}),g&&e.jsx("p",{className:"text-[11px] text-[var(--chart-4)] mt-1",children:g}),ge.length>0&&e.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:ge.map(C=>e.jsx("span",{className:"text-[11px] bg-[color-mix(in_srgb,var(--primary)_10%,transparent)] text-[var(--primary)] px-2 py-0.5 rounded",children:C},C))})]}),e.jsx("div",{className:"bg-card rounded-xl border border-border",children:e.jsx("div",{className:"overflow-x-auto pb-2",children:e.jsxs("div",{className:"min-w-[1920px]",children:[e.jsxs("div",{className:"grid grid-cols-[48px_280px_120px_120px_120px_120px_120px_140px_170px_170px_220px] items-center gap-6 px-6 py-4 bg-muted/60 border-b border-border text-xs font-semibold text-muted-foreground tracking-normal",children:[e.jsx("div",{}),e.jsxs("button",{className:"flex items-center gap-1 hover:text-foreground",onClick:()=>te("name"),children:["Student ",e.jsx(L,{field:"name"})]}),Dn.map(C=>e.jsx("div",{className:"text-center leading-none whitespace-nowrap tracking-normal",children:C.header},C.key)),e.jsxs("button",{className:"flex items-center gap-1 hover:text-foreground",onClick:()=>te("riskLevel"),children:["Risk Level ",e.jsx(L,{field:"riskLevel"})]}),e.jsxs("button",{className:"flex items-center gap-1 hover:text-foreground",onClick:()=>te("avgQuizScore"),children:["Avg. Score ",e.jsx(L,{field:"avgQuizScore"})]}),e.jsxs("button",{className:"flex items-center gap-1 hover:text-foreground",onClick:()=>te("engagementScore"),children:["Engagement ",e.jsx(L,{field:"engagementScore"})]}),e.jsx("div",{className:"flex justify-end pr-2",children:"Weakest Topic"})]}),$.length===0?e.jsxs("div",{className:"py-12 text-center text-slate-500",children:[e.jsx(Ur,{size:32,className:"mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No students match the current filters"})]}):e.jsx("div",{className:"divide-y divide-border",children:$.map(C=>{const G=C.student.riskLevel==="High"?{card:"bg-rose-50 border-rose-200",title:"text-rose-800",chip:"bg-rose-100 text-rose-700"}:C.student.riskLevel==="Medium"?{card:"bg-amber-50 border-amber-200",title:"text-amber-800",chip:"bg-amber-100 text-amber-700"}:{card:"bg-sky-50 border-sky-200",title:"text-sky-800",chip:"bg-sky-100 text-sky-700"};return e.jsxs("div",{className:"border-b border-border last:border-0",children:[e.jsxs("button",{onClick:()=>void ne(C.rowKey),className:"w-full grid grid-cols-[48px_280px_120px_120px_120px_120px_120px_140px_170px_170px_220px] gap-6 px-6 py-5 items-center hover:bg-muted transition-colors text-left",children:[e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center text-slate-500",children:C.expanded?e.jsx(ts,{size:16}):e.jsx(Ht,{size:16})})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:C.student.avatar,alt:C.student.name,className:"w-8 h-8 rounded-full bg-border object-cover"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:C.student.name}),e.jsx("p",{className:"text-xs text-slate-500",children:C.student.email})]})]}),Dn.map(F=>{const ie=C.competencyMatrix?.[F.key]??0,R=Gd(ie);return e.jsx("div",{className:"flex items-center justify-center",children:C.competencyMatrixLoading?e.jsx(at,{size:14,className:"animate-spin text-muted-foreground"}):C.competencyMatrix?e.jsxs("span",{title:`${F.label}: ${ie}%`,className:`inline-flex items-center justify-center rounded-md px-2 py-1 text-xs font-semibold ring-1 ${R.bg} ${R.text} ${R.ring}`,children:[ie,"%"]}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"—"})},F.key)}),e.jsx("div",{children:e.jsxs("span",{className:`inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-xs font-bold ring-1 ${Oa[C.student.riskLevel]?.bg} ${Oa[C.student.riskLevel]?.text} ${Oa[C.student.riskLevel]?.ring}`,children:[C.student.riskLevel==="High"&&e.jsx(gs,{size:10}),C.student.riskLevel]})}),e.jsx("div",{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-1 h-2 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:`h-full rounded-full e-w ${C.student.avgQuizScore>=80?"bg-[var(--chart-3)]":C.student.avgQuizScore>=60?"bg-[var(--chart-4)]":"bg-[var(--chart-2)]"}`,style:{"--w":`${C.student.avgQuizScore}%`}})}),e.jsxs("span",{className:"text-xs font-bold text-muted-foreground w-8 text-right",children:[C.student.avgQuizScore,"%"]})]})}),e.jsx("div",{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-1 h-2 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:`h-full rounded-full e-w ${C.student.engagementScore>=75?"bg-[var(--primary)]":C.student.engagementScore>=50?"bg-[var(--primary)]/60":"bg-muted-foreground"}`,style:{"--w":`${C.student.engagementScore}%`}})}),e.jsxs("span",{className:"text-xs font-bold text-muted-foreground w-8 text-right",children:[C.student.engagementScore,"%"]})]})}),e.jsx("div",{className:"flex justify-end pr-2",children:e.jsx("span",{className:"text-xs font-medium text-muted-foreground bg-muted px-2 py-1 rounded-md",children:C.student.weakestTopic})})]}),e.jsx(es,{children:C.expanded&&e.jsx(Ie.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"overflow-hidden",children:e.jsx("div",{className:"px-6 py-4 bg-muted border-t border-border",children:C.loading?e.jsxs("div",{className:"flex items-center justify-center py-6",children:[e.jsx(at,{size:20,className:"animate-spin text-sky-500"}),e.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:"Analyzing competency data..."})]}):C.competency?e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:C.competency.competencies.map((F,ie)=>e.jsx(Ud,{competency:F},ie))}),C.competency.recommendedTopics.length>0&&e.jsxs("div",{className:`border rounded-lg p-3 ${G.card}`,children:[e.jsxs("h5",{className:`text-xs font-bold mb-1.5 flex items-center gap-1 ${G.title}`,children:[e.jsx(ss,{size:12}),"Recommended Focus Areas"]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:C.competency.recommendedTopics.map((F,ie)=>e.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-xs font-medium ${G.chip}`,children:F},ie))})]}),ge.length>0&&e.jsxs("div",{className:"bg-sky-50 border border-sky-200 rounded-lg p-3",children:[e.jsxs("h5",{className:"text-xs font-bold text-sky-800 mb-1.5 flex items-center gap-1",children:[e.jsx(so,{size:12}),"Class Imported Topics"]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:ge.slice(0,8).map((F,ie)=>e.jsx("span",{className:"inline-flex items-center bg-sky-100 text-sky-700 px-2 py-0.5 rounded text-xs font-medium",children:F},`${F}_${ie}`))})]}),C.competency.excludeTopics.length>0&&e.jsxs("div",{className:"bg-emerald-50 border border-emerald-200 rounded-lg p-3",children:[e.jsxs("h5",{className:"text-xs font-bold text-emerald-800 mb-1.5 flex items-center gap-1",children:[e.jsx(yl,{size:12}),"Mastered Topics (can exclude from quizzes)"]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:C.competency.excludeTopics.map((F,ie)=>e.jsx("span",{className:"inline-flex items-center bg-emerald-100 text-emerald-700 px-2 py-0.5 rounded text-xs font-medium",children:F},ie))})]})]}):e.jsx("p",{className:"text-sm text-slate-500 text-center py-4",children:"No competency data available. Student needs to complete quizzes first."})})})})]},C.rowKey)})})]})})})]})},Ud=({competency:t})=>{const s=Ln[t.competencyLevel]||Ln.developing;return e.jsxs("div",{className:"bg-card rounded-lg border border-border p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("h6",{className:"text-xs font-bold text-foreground truncate flex-1",children:t.topic}),e.jsx("span",{className:`ml-2 px-2 py-0.5 rounded text-[10px] font-bold uppercase ${s.bg} ${s.text}`,children:t.competencyLevel})]}),e.jsxs("div",{className:"mb-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs mb-1",children:[e.jsx("span",{className:"text-slate-500",children:"Efficiency"}),e.jsxs("span",{className:"font-bold text-muted-foreground",children:[t.efficiencyScore,"%"]})]}),e.jsx("div",{className:"h-1.5 bg-muted rounded-full overflow-hidden",children:e.jsx(Ie.div,{initial:{width:0},animate:{width:`${t.efficiencyScore}%`},transition:{duration:.6,delay:.1},className:`h-full rounded-full ${s.bar}`})})]}),e.jsx("p",{className:"text-[11px] text-muted-foreground leading-snug line-clamp-2",children:t.perspective})]})},Vd=({liveActivity:t,atRiskStudents:s})=>{const{notifications:a,unreadCount:r,isLoading:n,markAsRead:o,markAllAsRead:i}=Bi(),l=x=>{const N=Date.now()-x.getTime(),m=Math.floor(N/6e4);if(m<1)return"Just now";if(m<60)return`${m} min ago`;const f=Math.floor(m/60);if(f<24)return`${f} hour${f===1?"":"s"} ago`;const w=Math.floor(f/24);return`${w} day${w===1?"":"s"} ago`},c=x=>{switch(x){case"achievement_unlocked":case"achievement":return wl;case"message":return Ri;case"grade":case"quiz_result":return to;case"reminder":case"streak_reminder":return mo;case"risk_alert":return gs;case"automation":case"system_alert":return $i;default:return aa}},d=x=>{switch(x){case"risk_alert":return"bg-destructive/10 text-destructive";case"achievement_unlocked":case"achievement":return"bg-rose-500/10 text-rose-600 dark:text-rose-400";case"message":return"bg-sky-500/10 text-sky-700 dark:text-sky-400";case"grade":case"quiz_result":return"bg-emerald-500/10 text-emerald-700 dark:text-emerald-400";case"reminder":case"streak_reminder":return"bg-amber-500/10 text-amber-700 dark:text-amber-400";case"automation":case"system_alert":return"bg-violet-500/10 text-violet-700 dark:text-violet-400";default:return"bg-muted text-muted-foreground"}};return e.jsxs(Ie.div,{initial:{opacity:0,y:18},animate:{opacity:1,y:0},exit:{opacity:0,y:-18},className:"p-4 sm:p-6 space-y-4",children:[e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsx("div",{className:"min-w-0",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-sky-100 text-sky-700 dark:bg-sky-500/15 dark:text-sky-300 flex items-center justify-center flex-shrink-0",children:e.jsx(aa,{size:20})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"text-2xl font-display font-bold text-foreground",children:"Notifications"}),e.jsx("p",{className:"text-sm text-muted-foreground font-body",children:"Classroom alerts and updates"})]})]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"text-xs text-muted-foreground font-body",children:r>0?`${r} unread`:"All caught up"}),r>0&&e.jsxs(Ve,{variant:"outline",size:"sm",onClick:i,children:[e.jsx(al,{}),"Mark all as read"]})]})]}),e.jsx("div",{className:"bg-card border border-border rounded-2xl shadow-sm overflow-hidden",children:n?e.jsxs("div",{className:"p-8 flex items-center justify-center gap-2 text-muted-foreground",children:[e.jsx(at,{size:18,className:"animate-spin"}),e.jsx("span",{className:"text-sm font-body",children:"Loading notifications…"})]}):a.length===0?e.jsx("div",{className:"p-10",children:e.jsxs("div",{className:"max-w-xl",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-muted text-muted-foreground flex items-center justify-center mb-4",children:e.jsx(aa,{size:22})}),e.jsx("h3",{className:"text-lg font-display font-bold text-foreground mb-1",children:"No notifications"}),e.jsx("p",{className:"text-sm text-muted-foreground font-body",children:"Teacher alerts and classroom updates will appear here."})]})}):e.jsxs("div",{children:[t&&t.length>0&&e.jsx("div",{children:t.map(x=>e.jsx("div",{className:"w-full text-left px-4 py-4 border-b border-border transition-colors hover:bg-accent/40",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:`w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0 ${x.type==="success"?"bg-[#75D06A]/15 text-[#4D9F46]":x.type==="warning"?"bg-[#F08386]/15 text-[#C65E63]":"bg-[#9956DE]/15 text-[#9956DE]"}`,children:e.jsx(er,{size:18})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs("h4",{className:"text-sm font-body font-bold text-foreground line-clamp-1",children:[x.student," — ",x.action]})}),e.jsxs("p",{className:"mt-1 text-xs text-muted-foreground font-body leading-relaxed line-clamp-2",children:["Topic: ",x.topic]})]}),e.jsx("div",{className:"text-xs text-muted-foreground font-body flex-shrink-0",children:x.time})]})})]})},x.id))}),a.map(x=>{const N=c(x.type),m=d(x.type),f=l(x.createdAt);return e.jsx("button",{onClick:()=>o(x.id),className:`w-full text-left px-4 py-4 border-b border-border last:border-b-0 transition-colors hover:bg-accent/40 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 ${x.isRead?"":"bg-sky-50/40 dark:bg-sky-500/5"}`,children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:`w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0 ${m}`,children:e.jsx(N,{size:18})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h4",{className:"text-sm font-body font-bold text-foreground line-clamp-1",children:x.title}),!x.isRead&&e.jsx("span",{className:"w-2 h-2 rounded-full bg-sky-500 flex-shrink-0"})]}),e.jsx("p",{className:"mt-1 text-xs text-muted-foreground font-body leading-relaxed line-clamp-2",children:x.message})]}),e.jsx("div",{className:"text-xs text-muted-foreground font-body flex-shrink-0",children:f})]}),x.actionUrl&&e.jsx("div",{className:"mt-2 text-xs text-sky-600 dark:text-sky-400 font-body",children:"Opens link"})]})]})},x.id)})]})})]})},Wd=t=>{const s=t.data(),a=s.startTime,r=s.endTime,n=s.createdAt,o=s.updatedAt,i=l=>{if(l){if(typeof l?.toDate=="function")return l.toDate();if(l instanceof Date)return l}};return{...s,id:t.id,startTime:i(a)||new Date,endTime:i(r),createdAt:i(n)||new Date,updatedAt:i(o)}},qd=async(t,s)=>{const a=ut(Ot(Ye,"calendarEvents")),r={id:a.id,userId:t,title:s.title,description:s.description,startTime:s.startTime,endTime:s.endTime,createdAt:new Date};return await Pt(a,{...r,createdAt:lt(),updatedAt:lt()}),r},Yd=async t=>{await Gi(ut(Ye,"calendarEvents",t))},Kd=(t,s={},a,r)=>{if(!t)return a([]),()=>{};const{limitCount:n=500}=s,o=Rt(Ot(Ye,"calendarEvents"),Mt("userId","==",t),Zn(n));return eo(o,i=>{a(i.docs.map(l=>Wd(l)))},i=>{console.error("Error subscribing to calendar events:",i),r?.(i)})},zn=t=>String(t).padStart(2,"0"),ds=t=>`${t.getFullYear()}-${zn(t.getMonth()+1)}-${zn(t.getDate())}`,Ja=t=>new Date(t.getFullYear(),t.getMonth(),1),Fn=t=>new Date(t.getFullYear(),t.getMonth()+1,0),Xd=t=>{const s=Ja(t),a=s.getDay(),r=new Date(s);return r.setDate(s.getDate()-a),r.setHours(0,0,0,0),r},Jd=(t,s)=>{const a=new Date(t);return a.setDate(a.getDate()+s),a},Bn=(t,s)=>t.getFullYear()===s.getFullYear()&&t.getMonth()===s.getMonth()&&t.getDate()===s.getDate(),Zd=(t,s)=>t.getFullYear()===s.getFullYear()&&t.getMonth()===s.getMonth(),em=t=>t.toLocaleDateString(void 0,{month:"long",year:"numeric"}),$n=t=>t.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"}),On=(t,s)=>{const[a,r,n]=t.split("-").map(l=>parseInt(l,10)),[o,i]=s.split(":").map(l=>parseInt(l,10));return new Date(a,(r||1)-1,n||1,o||0,i||0,0,0)},Pa=[{names:["sun","sunday"],day:0},{names:["mon","monday"],day:1},{names:["tue","tues","tuesday"],day:2},{names:["wed","wednesday"],day:3},{names:["thu","thurs","thursday"],day:4},{names:["fri","friday"],day:5},{names:["sat","saturday"],day:6}];function tm(t){const s=t.toLowerCase(),a=new Set;if(s.includes("daily")||s.includes("everyday"))return[0,1,2,3,4,5,6];if(s.includes("weekends"))return[0,6];if(s.includes("weekdays"))return[1,2,3,4,5];const r=s.match(/(mon|tue|wed|thu|fri|sat|sun)[\s/-]*(mon|tue|wed|thu|fri|sat|sun)/);if(r){const n=Pa.find(i=>i.names.includes(r[1]))?.day,o=Pa.find(i=>i.names.includes(r[2]))?.day;if(n!==void 0&&o!==void 0){let i=n;for(;a.add(i),i!==o;)i=(i+1)%7;return Array.from(a)}}return Pa.forEach(({names:n,day:o})=>{n.some(i=>s.includes(i))&&a.add(o)}),Array.from(a).sort((n,o)=>n-o)}const sm=({classes:t,teacherId:s})=>{const{currentUser:a}=Us(),[r,n]=b.useState([]),[o,i]=b.useState(!0),[l,c]=b.useState(""),[d,x]=b.useState(()=>{const L=new Date;return L.setHours(0,0,0,0),L}),[N,m]=b.useState(()=>{const L=new Date;return L.setHours(0,0,0,0),L}),[f,w]=b.useState(!1),[T,j]=b.useState(!1),[h,y]=b.useState(""),[k,D]=b.useState(""),[p,z]=b.useState(()=>ds(new Date)),[g,S]=b.useState("09:00"),[I,B]=b.useState("");b.useEffect(()=>{if(!a?.uid){n([]),i(!1);return}c(""),i(!0);const L=Kd(a.uid,{limitCount:500},C=>{n(C),i(!1)},()=>{c("Unable to load calendar events right now."),i(!1)});return()=>L()},[a?.uid]);const P=b.useMemo(()=>{const L=Ja(d);return L.setHours(0,0,0,0),L},[d]),J=b.useMemo(()=>{const L=Fn(d);return L.setHours(23,59,59,999),L},[d]),ne=b.useMemo(()=>{if(!t||t.length===0)return[];const L=[],C=Ja(d),G=Fn(d),F=new Date(C);for(;F<=G;){const ie=F.getDay();t.forEach(R=>{tm(R.schedule).includes(ie)&&L.push({id:`schedule-${R.id}-${ds(F)}`,userId:s||"",title:R.name,startTime:new Date(F),createdAt:new Date})}),F.setDate(F.getDate()+1)}return L},[t,d,s]),X=b.useMemo(()=>[...r,...ne],[r,ne]),te=b.useMemo(()=>X.filter(L=>L.startTime>=P&&L.startTime<=J).sort((L,C)=>L.startTime.getTime()-C.startTime.getTime()),[X,P,J]),se=b.useMemo(()=>{const L=new Map;for(const C of te){const G=ds(C.startTime),F=L.get(G)||[];F.push(C),L.set(G,F)}return L},[te]),$=b.useMemo(()=>ds(N),[N]),Y=b.useMemo(()=>[...se.get($)||[]].sort((C,G)=>C.startTime.getTime()-G.startTime.getTime()),[se,$]),E=b.useMemo(()=>{const L=Xd(d);return Array.from({length:42}).map((C,G)=>Jd(L,G))},[d]),U=L=>{const C=ds(L);y(""),D(""),z(C),S("09:00"),B(""),w(!0)},W=async()=>{if(a?.uid){if(!h.trim()){c("Event title is required.");return}j(!0),c("");try{const L=On(p,g),C=I?On(p,I):void 0;await qd(a.uid,{title:h.trim(),description:k.trim()?k.trim():void 0,startTime:L,endTime:C&&C.getTime()>L.getTime()?C:void 0}),w(!1)}catch(L){console.error(L),c("Failed to create event.")}finally{j(!1)}}},ge=async L=>{c("");try{await Yd(L)}catch(C){console.error(C),c("Failed to delete event.")}};return e.jsxs(Ie.div,{initial:{opacity:0,y:18},animate:{opacity:1,y:0},exit:{opacity:0,y:-18},className:"p-4 sm:p-6 space-y-4",children:[e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsx("div",{className:"min-w-0",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-secondary text-secondary-foreground flex items-center justify-center flex-shrink-0",children:e.jsx(El,{size:20})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"text-2xl font-display font-bold text-foreground",children:"Calendar"}),e.jsx("p",{className:"text-sm text-muted-foreground font-body",children:"Check upcoming class events and schedule"})]})]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ve,{variant:"outline",size:"sm",onClick:()=>{const L=new Date;L.setHours(0,0,0,0),x(L),m(L)},children:"Today"}),e.jsxs(Ve,{size:"sm",onClick:()=>U(N),children:[e.jsx(sa,{}),"Add event"]})]})]}),l&&e.jsx("div",{className:"bg-destructive/10 text-destructive border border-destructive/20 rounded-xl px-4 py-3 text-sm font-body",children:l}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-4",children:[e.jsxs("div",{className:"lg:col-span-8 bg-card border border-border rounded-2xl shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-border flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ve,{variant:"ghost",size:"icon",onClick:()=>{const L=new Date(d.getFullYear(),d.getMonth()-1,1);x(L)},"aria-label":"Previous month",children:e.jsx(Bt,{})}),e.jsx("div",{className:"text-sm sm:text-base font-display font-bold text-foreground",children:em(d)}),e.jsx(Ve,{variant:"ghost",size:"icon",onClick:()=>{const L=new Date(d.getFullYear(),d.getMonth()+1,1);x(L)},"aria-label":"Next month",children:e.jsx(Ht,{})})]}),e.jsxs("div",{className:"text-xs text-muted-foreground font-body",children:[te.length," event",te.length===1?"":"s"]})]}),e.jsxs("div",{className:"grid grid-cols-7 gap-px bg-border",children:[["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(L=>e.jsx("div",{className:"bg-card px-3 py-2 text-xs font-body font-bold text-muted-foreground",children:L},L)),E.map(L=>{const C=ds(L),G=se.get(C)?.length||0,F=Bn(L,N),ie=Bn(L,new Date),R=Zd(L,d);return e.jsxs("button",{onClick:()=>{const H=new Date(L);H.setHours(0,0,0,0),m(H)},className:"bg-card px-3 py-3 min-h-[78px] text-left transition-colors hover:bg-accent/40 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 "+(F?"ring-2 ring-primary/40 ":"")+(R?"":"opacity-50 "),children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center text-sm font-body font-bold "+(ie?"bg-primary text-primary-foreground ":"text-foreground ")+(F&&!ie?"bg-secondary text-secondary-foreground ":""),children:L.getDate()}),G>0&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-primary"}),e.jsx("span",{className:"text-xs font-body text-muted-foreground",children:G})]})]}),G>0&&e.jsxs("div",{className:"mt-2 flex flex-wrap gap-1",children:[(se.get(C)||[]).slice(0,3).map(H=>e.jsx("span",{className:"inline-flex items-center rounded-md bg-secondary text-secondary-foreground px-2 py-0.5 text-[10px] font-body font-bold truncate max-w-full",title:H.title,children:H.title},H.id)),(se.get(C)?.length||0)>3&&e.jsxs("span",{className:"text-[10px] font-body text-muted-foreground",children:["+",(se.get(C)?.length||0)-3," more"]})]})]},C)})]}),o&&e.jsxs("div",{className:"px-4 py-4 border-t border-border flex items-center gap-2 text-muted-foreground",children:[e.jsx(at,{size:18,className:"animate-spin"}),e.jsx("span",{className:"text-sm font-body",children:"Syncing events…"})]})]}),e.jsxs("div",{className:"lg:col-span-4 bg-card border border-border rounded-2xl shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-border flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-display font-bold text-foreground",children:N.toLocaleDateString(void 0,{weekday:"long"})}),e.jsx("div",{className:"text-xs text-muted-foreground font-body",children:N.toLocaleDateString()})]}),e.jsxs(Ve,{variant:"outline",size:"sm",onClick:()=>U(N),children:[e.jsx(sa,{}),"Add"]})]}),e.jsx("div",{className:"p-4",children:Y.length===0?e.jsxs("div",{className:"rounded-xl border border-border bg-muted/30 p-4",children:[e.jsx("div",{className:"text-sm font-body font-bold text-foreground",children:"No events"}),e.jsx("div",{className:"text-xs text-muted-foreground font-body mt-1",children:"Add reminders for quizzes, meetings, or deadlines."})]}):e.jsx("div",{className:"space-y-2",children:Y.map(L=>e.jsxs("div",{className:"rounded-xl border border-border bg-background p-3 flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-primary flex-shrink-0"}),e.jsx("div",{className:"text-sm font-body font-bold text-foreground truncate",children:L.title})]}),e.jsxs("div",{className:"text-xs text-muted-foreground font-body mt-1",children:[$n(L.startTime),L.endTime?` – ${$n(L.endTime)}`:""]}),L.description&&e.jsx("div",{className:"text-xs text-muted-foreground font-body mt-2 line-clamp-2",children:L.description})]}),e.jsx(Ve,{variant:"ghost",size:"icon",onClick:()=>ge(L.id),"aria-label":"Delete event",children:e.jsx(ro,{})})]},L.id))})})]})]}),e.jsx(il,{open:f,onOpenChange:w,children:e.jsxs(ll,{className:"sm:max-w-xl",children:[e.jsxs(cl,{children:[e.jsx(dl,{className:"font-display",children:"Add event"}),e.jsx(ml,{className:"font-body",children:"Create a reminder for your class schedule."})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{className:"sm:col-span-2",children:[e.jsx("label",{className:"text-xs font-body font-bold text-muted-foreground",children:"Title"}),e.jsx(pt,{value:h,onChange:L=>y(L.target.value),placeholder:"e.g., Quiz review session"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-body font-bold text-muted-foreground",children:"Date"}),e.jsx(pt,{type:"date",value:p,onChange:L=>z(L.target.value)})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-body font-bold text-muted-foreground",children:"Start time"}),e.jsx(pt,{type:"time",value:g,onChange:L=>S(L.target.value)})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-body font-bold text-muted-foreground",children:"End time (optional)"}),e.jsx(pt,{type:"time",value:I,onChange:L=>B(L.target.value)})]}),e.jsxs("div",{className:"sm:col-span-2",children:[e.jsx("label",{className:"text-xs font-body font-bold text-muted-foreground",children:"Notes (optional)"}),e.jsx(ul,{value:k,onChange:L=>D(L.target.value),placeholder:"Add context: class, room, agenda…",className:"min-h-24"})]})]}),e.jsxs(xl,{children:[e.jsx(Ve,{variant:"outline",onClick:()=>w(!1),disabled:T,children:"Cancel"}),e.jsx(Ve,{onClick:W,disabled:T,children:T?e.jsxs(e.Fragment,{children:[e.jsx(at,{className:"animate-spin"}),"Saving…"]}):e.jsxs(e.Fragment,{children:[e.jsx(sa,{}),"Create event"]})})]})]})})]})},Zo="PH_SHS_OFFICIAL_CLASS_RECORD",am=.85,Za=.85,rm="2026.04.24",ei=4,ia=["INPUT DATA","SENIOR HIGH SCHOOL CLASS RECORD","LEARNERS NAMES","WRITTEN WORK","PERFORMANCE TASKS","QUARTERLY ASSESSMENT","REMARK","FINAL SEMESTRAL GRADES"],nm=[...ia,"Pursuant to DepEd Order 8 series of 2015","INITIAL GRADE","QUARTERLY GRADE","ADDITIONAL REMARKS","MALE","FEMALE","SUBMITTED BY","CHECKED BY","VERIFIED BY","RECOMMENDED BY","APPROVED BY","WEIGHT OF COMPONENTS","LOOK UP","HELPER","ATTACHMENTS"],om=["SUBMITTED BY","CHECKED BY","VERIFIED BY","RECOMMENDED BY","APPROVED BY"],Ys=["WITH ATTACHMENTS","OFFICIALLY DROPPED","WITHDRAWN","UNOFFICIALLY DROPPED","TRANSFEREE","SHIFTER"],im=["TOTAL","SUBMITTED BY","CHECKED BY","VERIFIED BY","RECOMMENDED BY","APPROVED BY","WEIGHT OF COMPONENTS"],lm={SECOND:["SECOND QUARTER","2ND QUARTER","Q2"]},ms={inputData:["input data"],firstQuarter:["first quarter","1st quarter","q1"],secondQuarter:["second quarter","2nd quarter","q2"],finalSemestral:["final semestral","final grades","semestral"],helper:["helper","weight","attachments"],lookup:["look up","lookup","reference"]},ft={region:["REGION"],division:["DIVISION"],schoolName:["SCHOOL NAME"],schoolId:["SCHOOL ID"],schoolYear:["SCHOOL YEAR"],gradeSection:["GRADE / SECTION","GRADE/SECTION"],semester:["SEMESTER"],track:["TRACK"],subjectCode:["SUBJECT CODE"],subjectName:["SUBJECT NAME","SUBJECT"],teacherName:["TEACHER","NAME OF TEACHER"]},Te={learnerNo:["NO","NO.","#"],learnerName:["LEARNERS NAMES","LEARNER NAME","NAME"],writtenWork:["WRITTEN WORK","WW"],performanceTasks:["PERFORMANCE TASKS","PT"],quarterlyAssessment:["QUARTERLY ASSESSMENT","QA"],total:["TOTAL"],ps:["PS"],ws:["WS"],initialGrade:["INITIAL GRADE"],quarterlyGrade:["QUARTERLY GRADE"],firstQuarter:["FIRST QUARTER","1ST QUARTER"],secondQuarter:["SECOND QUARTER","2ND QUARTER"],firstSemester:["FIRST SEMESTER"],finalGrades:["FINAL GRADES","FINAL GRADE"],remark:["REMARK","REMARKS"],additionalRemarks:["ADDITIONAL REMARKS","ADDITIONAL REMARK"]};function cm(t){return t==null?null:typeof t=="string"||typeof t=="number"||typeof t=="boolean"?t:String(t)}function tt(t){return String(t??"").replace(/[\u00a0\t\r\n]+/g," ").replace(/[|]+/g," ").replace(/\s+/g," ").trim().toUpperCase()}function Pn(t){return tt(t).replace(/[^A-Z0-9]+/g,"")}function je(t,s){const a=tt(t),r=tt(s);if(!a||!r)return!1;if(a.includes(r))return!0;const n=Pn(t),o=Pn(s);return!n||!o?!1:n.includes(o)}function la(t){if(typeof t=="number"&&Number.isFinite(t))return t;if(typeof t=="string"){const s=t.replace(/,/g,"").trim();if(!s)return;const a=Number(s);if(Number.isFinite(a))return a}}function _a(t){return tt(t).toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"").slice(0,80)}function ti(t){const s={};return t.forEach(a=>{const r=vt.encode_cell(a.s);for(let n=a.s.r;n<=a.e.r;n+=1)for(let o=a.s.c;o<=a.e.c;o+=1){const i=vt.encode_cell({r:n,c:o});s[i]=r}}),s}function dm(t,s,a){const n=(a||ti(t.merges))[s]||s;return t.cells[n]||t.cells[s]}const si="A1:A1",_n=1200,Hn=200,Gn=2e5;function mm(t){const s=Math.max(0,t.s.r),a=Math.max(0,t.s.c);let r=Math.max(s,t.e.r),n=Math.max(a,t.e.c);r-s+1>_n&&(r=s+_n-1),n-a+1>Hn&&(n=a+Hn-1);const o=r-s+1,i=n-a+1;if(o*i>Gn){const c=Math.max(1,Math.floor(Gn/i));r=s+Math.min(o,c)-1}return{s:{r:s,c:a},e:{r,c:n}}}function um(t){try{return vt.decode_range(t)}catch{return vt.decode_range(si)}}function xm(t){let s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return Object.keys(t.cells).forEach(o=>{try{const i=vt.decode_cell(o);s=Math.min(s,i.r),a=Math.min(a,i.c),r=Math.max(r,i.r),n=Math.max(n,i.c)}catch{}}),t.merges.forEach(o=>{s=Math.min(s,o.s.r,o.e.r),a=Math.min(a,o.s.c,o.e.c),r=Math.max(r,o.s.r,o.e.r),n=Math.max(n,o.s.c,o.e.c)}),!Number.isFinite(s)||!Number.isFinite(a)||!Number.isFinite(r)||!Number.isFinite(n)?null:{s:{r:Math.max(0,Math.trunc(s)),c:Math.max(0,Math.trunc(a))},e:{r:Math.max(0,Math.trunc(r)),c:Math.max(0,Math.trunc(n))}}}function hm(t){const s=um(t.ref||si),a=xm(t);return mm(a||s)}function fm(t,s){const a=hm(s),r=`${vt.encode_cell(a.s)}:${vt.encode_cell(a.e)}`,n=ti(s.merges),o=a.e.r-a.s.r+1,i=a.e.c-a.s.c+1,l=[];for(let c=0;ct.endRow||at.endCol?null:t.cells[s-t.startRow]?.[a-t.startCol]??null}function qt(t,s){return st.endRow?"":(t.cells[s-t.startRow]||[]).map(r=>r?.normalizedText||"").filter(Boolean).join(" ").trim()}function Ms(t){return vt.encode_col(t)}function ta(t){const s=String(t||"").trim().toUpperCase();if(!s||!/^[A-Z]+$/.test(s))return-1;try{return vt.decode_col(s)}catch{return-1}}function pm(t){return`${vt.encode_cell(t.s)}:${vt.encode_cell(t.e)}`}function gm(t,s){const a=[];for(let r=s.s.r;r<=s.e.r;r+=1){const n=[];for(let o=s.s.c;o<=s.e.c;o+=1){const i=Ee(t,r,o);n.push(i?.displayValue??null)}a.push(n)}return a}function bm(t,s){const a=tt(t),r=tt(s);return!a||!r?0:a===r?1:a.includes(r)?.9:.75}function gr(t,s){const a=[];for(let r=0;r{je(l.normalizedText,c)&&a.push({sheetName:t.sheetName,anchor:c,row:l.row,col:l.col,address:l.address,value:String(l.displayValue??""),confidence:bm(l.displayValue,c)})})}const n=t.startRow+r,o=qt(t,n);o&&s.forEach(i=>{if(!je(o,i))return;const l=t.cells[r].find(c=>c?.normalizedText);l&&a.push({sheetName:t.sheetName,anchor:i,row:n,col:l.col,address:l.address,value:o,confidence:.8})})}return a}function vm(t,s){return Object.values(t).flatMap(a=>gr(a,s))}function rt(t,s){return gr(t,[s]).sort((a,r)=>a.row-r.row||a.col-r.col)}function ai(t,s,a,r=6){for(let n=1;n<=r;n+=1){const i=Ee(t,s,a+n)?.displayValue;if(i!=null&&String(i).trim())return String(i).trim()}for(let n=1;n<=r;n+=1){const i=Ee(t,s+n,a)?.displayValue;if(i!=null&&String(i).trim())return String(i).trim()}}function ri(t,s,a=5){let r=s,n=-1;for(let o=Math.max(t.startRow,s-a);o<=Math.min(t.endRow,s+a);o+=1){const i=qt(t,o),l=["LEARNERS NAMES","WRITTEN WORK","PERFORMANCE TASKS","QUARTERLY ASSESSMENT","REMARK"].reduce((c,d)=>i.includes(d)?c+1:c,0);l>n&&(n=l,r=o)}return r}function Nm(t,s){const a=tt(t).toLowerCase(),r=n=>[...s].some(o=>je(o,n));return ms.inputData.some(n=>a.includes(n))||r("INPUT DATA")?"inputData":ms.finalSemestral.some(n=>a.includes(n))||r("FINAL SEMESTRAL GRADES")||r("FINAL GRADES")?"finalSemestral":ms.firstQuarter.some(n=>a.includes(n))||r("FIRST QUARTER")?"firstQuarter":ms.secondQuarter.some(n=>a.includes(n))||r("SECOND QUARTER")?"secondQuarter":r("SENIOR HIGH SCHOOL CLASS RECORD")||r("WRITTEN WORK")&&r("PERFORMANCE TASKS")?"firstQuarter":ms.helper.some(n=>a.includes(n))||r("WEIGHT OF COMPONENTS")||r("ATTACHMENTS")||r("HELPER")?"helper":ms.lookup.some(n=>a.includes(n))||r("LOOK UP")?"lookup":"other"}function jm(t){const s=t.criticalTotal>0?t.criticalFound/t.criticalTotal:0,a=t.totalSheets>0?t.recognizedSheets/t.totalSheets:0,r=t.hasDepedAnchor?1:0,n=.65*s+.2*a+.15*r;return Number(Math.max(0,Math.min(1,n)).toFixed(4))}function ym(t){const s=vm(t.matrices,nm),a=new Set,r=[];ia.forEach(f=>{s.some(T=>je(T.anchor,f))&&(a.add(f),r.push(`Found critical anchor: ${f}`))});const n=ia.filter(f=>!a.has(f)),o=new Map;s.forEach(f=>{o.has(f.sheetName)||o.set(f.sheetName,new Set),o.get(f.sheetName)?.add(f.anchor)});const i=t.sheetNames.map(f=>{const w=o.get(f)||new Set,T=Nm(f,w),j=Math.min(1,.35+Math.min(.55,w.size*.08)),h=[`sheet:${f}`,`signals:${w.size}`,...[...w].slice(0,5)];return{sheetName:f,role:T,confidence:Number(j.toFixed(3)),evidence:h}}),l={firstQuarter:[],secondQuarter:[],finalSemestral:[],helper:[],lookup:[],other:[]};i.forEach(f=>{switch(f.role){case"inputData":l.inputData?l.other.push(f.sheetName):l.inputData=f.sheetName;break;case"firstQuarter":l.firstQuarter.push(f.sheetName);break;case"secondQuarter":l.secondQuarter.push(f.sheetName);break;case"finalSemestral":l.finalSemestral.push(f.sheetName);break;case"helper":l.helper.push(f.sheetName);break;case"lookup":l.lookup.push(f.sheetName);break;case"other":default:l.other.push(f.sheetName);break}});const c=(l.inputData?1:0)+l.firstQuarter.length+l.secondQuarter.length+l.finalSemestral.length+l.helper.length+l.lookup.length,d=jm({criticalFound:a.size,criticalTotal:ia.length,recognizedSheets:c,totalSheets:t.sheetNames.length,hasDepedAnchor:s.some(f=>je(f.anchor,"Pursuant to DepEd Order 8 series of 2015"))}),x=l.firstQuarter.length>0||l.secondQuarter.length>0,N=!!l.inputData&&x&&l.finalSemestral.length>0,m=d>=.55&&N;return l.inputData||r.push("Input Data sheet not confidently detected."),x||r.push("No quarter class record sheet detected."),l.finalSemestral.length===0&&r.push("No Final Semestral Grades sheet detected."),{format:Zo,isOfficialFormatLikely:m,confidence:d,evidence:r,missingCriticalAnchors:n,detectedSheets:l,anchorMatches:s}}function xa(t){if(typeof t=="number"&&Number.isFinite(t))return t;const s=String(t??"").trim();if(!s)return;const a=Number(s.replace(/[^0-9]/g,""));if(!(!Number.isFinite(a)||a<=0))return a}function br(t){const s=tt(t);if(s.includes("FEMALE"))return"FEMALE";if(s.includes("MALE"))return"MALE"}function vr(t){const s=tt(t.rowText);return s?s==="MALE"||s==="FEMALE"?"sex-header":om.some(a=>s.includes(a))?"signature":im.some(a=>s.includes(a))?"helper":s.includes("LEARNERS NAMES")||s.includes("WRITTEN WORK")||s.includes("PERFORMANCE TASKS")||s.includes("QUARTERLY ASSESSMENT")||s.includes("INITIAL GRADE")||s.includes("QUARTERLY GRADE")?"header":t.hasLearnerName||t.hasLearnerNumber?"learner":s.includes("ATTACHMENTS")||s.includes("LOOK UP")?"helper":"unknown":"blank"}function wm(t){const s=["SUBMITTED BY","CHECKED BY","VERIFIED BY","RECOMMENDED BY","APPROVED BY"],a=[];return s.forEach(r=>{rt(t,r).forEach(n=>{a.push({role:r,name:String(Ee(t,n.row,n.col+1)?.displayValue||"").trim()||void 0,sourceSheet:t.sheetName,sourceRow:n.row+1})})}),a}function Sm(t){const s=[],a=rt(t,"LEARNERS NAMES")[0],r=a?ri(t,a.row,5):t.startRow,n=(j,h)=>rt(t,j).find(k=>Math.abs(k.row-r)<=2)?.col??h,o=n(Te.learnerNo[0],t.startCol),i=n(Te.learnerName[0],t.startCol+1),l=n(Te.firstQuarter[0],i+1),c=n(Te.secondQuarter[0],l+1),d=n(Te.firstSemester[0],c+1),x=n(Te.finalGrades[0],d+1),N=n(Te.remark[0],x+1),m=n(Te.additionalRemarks[0],N+1),f=[];let w="UNKNOWN",T=0;for(let j=r+1;j<=t.endRow;j+=1){const h=qt(t,j),y=vr({rowText:h,hasLearnerNumber:/\b\d{1,2}\b/.test(h),hasLearnerName:/[A-Z]{2,}/.test(h)});if(y==="sex-header"){w=br(h)||w;continue}if(y==="signature"||y==="helper")break;if(y==="blank"){if(T+=1,T>=ei)break;continue}if(y!=="learner")continue;T=0;const k=xa(Ee(t,j,o)?.displayValue),D=String(Ee(t,j,i)?.displayValue||"").trim();if(!D&&k===void 0)continue;const p=Ee(t,j,l)?.displayValue??null,z=Ee(t,j,c)?.displayValue??null,g=Ee(t,j,d)?.displayValue??null,S=Ee(t,j,x)?.displayValue??null,I=Ee(t,j,N)?.displayValue??null;let B=Ee(t,j,m)?.displayValue??null;const P=Ys.filter(J=>je(h,J));P.length>0&&(B=[B,P.join("; ")].filter(Boolean).join("; ")||null),!D&&k!==void 0&&s.push(`Row ${j+1} has learner number ${k} but empty learner name.`),f.push({learnerNo:k,fullName:D||`Unnamed Learner ${k||j+1}`,sex:w,firstQuarter:p,secondQuarter:z,firstSemester:g,finalGrades:S,remark:I,additionalRemarks:B,sourceRow:j+1})}return{sheetName:t.sheetName,learnerGrades:f,signatures:wm(t),warnings:s}}function yt(t,s){for(const a of s){const r=rt(t,a);for(const n of r){const o=ai(t,n.row,n.col,8);if(o&&o.trim())return o.trim()}}}function Cm(t){const s=["SUBMITTED BY","CHECKED BY","VERIFIED BY","RECOMMENDED BY","APPROVED BY"],a=[];return s.forEach(r=>{rt(t,r).forEach(o=>{const i=ai(t,o.row,o.col,10);a.push({role:r,name:i,sourceSheet:t.sheetName,sourceRow:o.row+1})})}),a}function km(t){const s=rt(t,"LEARNERS NAMES")[0];if(!s)return[];const a=s.row+1,r=s.col,n=Math.max(t.startCol,r-1),o=Math.min(t.endCol,r+1),i=Math.min(t.endCol,r+2),l=[];let c="UNKNOWN",d=0;for(let x=a;x<=t.endRow;x+=1){const N=qt(t,x),m=vr({rowText:N,hasLearnerNumber:!!xa(Ee(t,x,n)?.displayValue),hasLearnerName:!!String(Ee(t,x,r)?.displayValue||"").trim()});if(m==="sex-header"){c=br(N)||c,d=0;continue}if(m==="signature"||m==="helper")break;if(m!=="learner"){if(m==="blank"&&(d+=1),d>=5)break;continue}d=0;const f=xa(Ee(t,x,n)?.displayValue),w=String(Ee(t,x,r)?.displayValue||"").trim(),T=String(Ee(t,x,o)?.displayValue||"").trim()||void 0,j=String(Ee(t,x,i)?.displayValue||"").trim()||void 0,h=Ys.filter(y=>je(N,y));!w&&f===void 0||l.push({learnerNo:f,sex:c,fullName:w||`Unnamed Learner ${f||x}`,sourceSheet:t.sheetName,sourceRow:x+1,remarks:T,additionalRemarks:j,statuses:h.length>0?h:void 0})}return l}function Tm(t){const s=[],a=[];for(let r=t.startRow;r<=t.endRow;r+=1){const n=qt(t,r);if(n){if(Ys.some(o=>je(n,o))){s.push(n);continue}(je(n,"IMPORTANT")||je(n,"NOTE")||je(n,"ATTACHMENT")||je(n,"LOOK UP"))&&a.push(n)}}return{attachmentRules:Array.from(new Set(s)),helperNotes:Array.from(new Set(a))}}function Im(t){const s=[],a={region:yt(t,ft.region),division:yt(t,ft.division),schoolName:yt(t,ft.schoolName),schoolId:yt(t,ft.schoolId),schoolYear:yt(t,ft.schoolYear),gradeSection:yt(t,ft.gradeSection),semester:yt(t,ft.semester),track:yt(t,ft.track),subjectCode:yt(t,ft.subjectCode),subjectName:yt(t,ft.subjectName),teacherName:yt(t,ft.teacherName)},r=km(t),n=Cm(t),{attachmentRules:o,helperNotes:i}=Tm(t);return a.schoolName||s.push("Input Data metadata is missing School Name."),a.schoolYear||s.push("Input Data metadata is missing School Year."),r.length===0&&s.push("No learners detected in Input Data sheet."),gr(t,Object.values(ft).flat()).length<4&&s.push("Input Data sheet contains limited metadata anchors; layout may have drifted."),{sheetName:t.sheetName,schoolContext:a,learners:r,signatures:n,attachmentRules:o,helperNotes:i,warnings:s}}function Em(t){const s=tt(t.sheetName);return lm.SECOND.some(a=>je(s,a))?"SECOND":"FIRST"}function Rm(t,s){const a=[],r=[],n=[];let o,i="NONE";for(let l=t.startCol;l<=t.endCol;l+=1){const c=Ee(t,s,l),d=tt(c?.displayValue||""),x=Ee(t,s+1,l),N=String(x?.displayValue||c?.displayValue||"").trim();if(!d&&!N)continue;if(je(d,Te.writtenWork[0])){i="WW";continue}if(je(d,Te.performanceTasks[0])){i="PT";continue}if(je(d,Te.quarterlyAssessment[0])){o={key:_a(N||"quarterly_assessment"),label:N||"Quarterly Assessment",column:Ms(l)},i="DERIVED";continue}if(je(d,Te.initialGrade[0])||je(d,Te.quarterlyGrade[0])||je(d,Te.remark[0])||je(d,Te.additionalRemarks[0])||je(d,Te.firstQuarter[0])||je(d,Te.secondQuarter[0])||je(d,Te.firstSemester[0])||je(d,Te.finalGrades[0])||je(d,Te.ps[0])||je(d,Te.ws[0])||je(d,Te.total[0])){i="DERIVED",n.push({key:_a(N||d),label:N||d,column:Ms(l)});continue}const m={key:_a(N||d||Ms(l)),label:N||d||Ms(l),maxScore:la(x?.displayValue),column:Ms(l)};i==="WW"?a.push(m):i==="PT"?r.push(m):i==="DERIVED"&&n.push(m)}return{writtenWorks:a,performanceTasks:r,quarterlyAssessment:o,derived:n}}function Mm(t){const s=["SUBMITTED BY","CHECKED BY","VERIFIED BY","RECOMMENDED BY","APPROVED BY"],a=[];return s.forEach(r=>{rt(t,r).forEach(n=>{const o=Ee(t,n.row,n.col+1),i=String(o?.displayValue||"").trim()||void 0;a.push({role:r,name:i,sourceSheet:t.sheetName,sourceRow:n.row+1})})}),a}function Qn(t,s,a){for(let r=t.startCol;r<=t.endCol;r+=1){const n=tt(Ee(t,s,r)?.displayValue||""),o=tt(Ee(t,s+1,r)?.displayValue||"");if(a.some(i=>je(n,i)||je(o,i)))return r}}function Am(t,s,a,r){const n={learnerNo:xa(Ee(t,s,r.numberCol)?.displayValue),fullName:String(Ee(t,s,r.nameCol)?.displayValue||"").trim(),sourceRow:s+1},o={};a.writtenWorks.forEach(d=>{const x=d.column?ta(d.column):-1;if(x<0)return;const N=Ee(t,s,x)?.displayValue;o[d.key]=N??null}),Object.keys(o).length>0&&(n.writtenWorks=o);const i={};if(a.performanceTasks.forEach(d=>{const x=d.column?ta(d.column):-1;if(x<0)return;const N=Ee(t,s,x)?.displayValue;i[d.key]=N??null}),Object.keys(i).length>0&&(n.performanceTasks=i),a.quarterlyAssessment?.column){const d=ta(a.quarterlyAssessment.column);n.quarterlyAssessment=Ee(t,s,d)?.displayValue??null}const l=a.derived||[],c={};return l.forEach(d=>{if(!d.column)return;const x=ta(d.column);if(x<0)return;const N=Ee(t,s,x)?.displayValue??null;c[d.key]=N,je(d.label,Te.initialGrade[0])&&(n.initialGrade=N),je(d.label,Te.quarterlyGrade[0])&&(n.quarterlyGrade=N),je(d.label,Te.firstQuarter[0])&&(n.firstQuarter=N),je(d.label,Te.secondQuarter[0])&&(n.secondQuarter=N),je(d.label,Te.firstSemester[0])&&(n.firstSemester=N),je(d.label,Te.finalGrades[0])&&(n.finalGrades=N),je(d.label,Te.remark[0])&&(n.remark=N!==null?String(N):null),je(d.label,Te.additionalRemarks[0])&&(n.additionalRemarks=N!==null?String(N):null)}),Object.keys(c).length>0&&(n.totals=c),n}function Lm(t){const s=Em(t),a=[],r=rt(t,Te.learnerName[0])[0]||rt(t,Te.learnerName[1])[0],n=r?ri(t,r.row,4):t.startRow,o=Rm(t,n),i=Qn(t,n,Te.learnerNo)??t.startCol,l=Qn(t,n,Te.learnerName)??Math.min(t.endCol,i+1),c=[];let d="UNKNOWN",x=0;for(let w=n+1;w<=t.endRow;w+=1){const T=qt(t,w),j=vr({rowText:T,hasLearnerNumber:/\b\d{1,2}\b/.test(T),hasLearnerName:/[A-Z]{2,}/.test(T)});if(j==="sex-header"){d=br(T)||d;continue}if(j==="signature"||j==="helper")break;if(j==="blank"){if(x+=1,x>=ei)break;continue}if(j!=="learner")continue;x=0;const h=Am(t,w,o,{numberCol:i,nameCol:l});if(h.sex=d,!h.fullName&&h.learnerNo===void 0)continue;const y=Ys.filter(k=>je(T,k));y.length>0&&!h.additionalRemarks&&(h.additionalRemarks=y.join("; ")),!h.fullName&&h.learnerNo!==void 0&&(a.push(`Row ${w+1} has learner number ${h.learnerNo} but empty name.`),h.fullName=`Unnamed Learner ${h.learnerNo}`),c.push(h)}o.writtenWorks.length===0&&o.performanceTasks.length===0&&a.push(`No detailed assessment columns detected in ${t.sheetName}.`);const N=la(rt(t,"WRITTEN WORK %")[0]?.value||rt(t,"WRITTEN WORK")[0]?.value),m=la(rt(t,"PERFORMANCE TASKS %")[0]?.value||rt(t,"PERFORMANCE TASKS")[0]?.value),f=la(rt(t,"QUARTERLY ASSESSMENT %")[0]?.value||rt(t,"QUARTERLY ASSESSMENT")[0]?.value);return{sheetName:t.sheetName,quarter:s,gradingWeights:{writtenWork:N,performanceTasks:m,quarterlyAssessment:f},assessmentColumns:o,learnerGrades:c,signatures:Mm(t),warnings:a}}function Dm(t){const s=["SUBMITTED BY","CHECKED BY","VERIFIED BY","RECOMMENDED BY","APPROVED BY"],a=[];return s.forEach(r=>{rt(t,r).forEach(n=>{a.push({role:r,name:String(Ee(t,n.row,n.col+1)?.displayValue||"").trim()||void 0,sourceSheet:t.sheetName,sourceRow:n.row+1})})}),a}function zm(t){const s=[];let a=!1;for(let r=t.startRow;r<=t.endRow;r+=1){const n=qt(t,r);if(!n){if(a&&s.length>0)break;continue}if(je(n,"WEIGHT OF COMPONENTS")){a=!0;continue}if(!a)continue;const o={sourceRow:r+1,raw:n};for(let i=t.startCol;i<=t.endCol;i+=1){const l=Ee(t,r,i)?.displayValue;l==null||String(l).trim()===""||(o[`c${i}`]=l)}Object.keys(o).length>2&&s.push(o)}return s}function Fm(t){const s=[],a=[],r=[],n=[],o=[];return t.forEach(i=>{Dm(i).forEach(l=>a.push(l)),zm(i).forEach(l=>r.push({...l,sourceSheet:i.sheetName}));for(let l=i.startRow;l<=i.endRow;l+=1){const c=qt(i,l);if(c){if(Ys.some(d=>je(c,d))){n.push(`${i.sheetName}: ${c}`);continue}(je(c,"HELPER")||je(c,"LOOK UP")||je(c,"IMPORTANT")||je(c,"REFERENCE")||je(c,"ATTACHMENT"))&&o.push(`${i.sheetName}: ${c}`)}}}),r.length===0&&s.push("No component weight rows were parsed from reference sheets."),{sheetName:t.map(i=>i.sheetName).join(", "),componentWeights:r,attachmentRules:Array.from(new Set(n)),helperNotes:Array.from(new Set(o)),signatures:a,warnings:s}}function Bm(t,s,a){const r=new Map,n=o=>{const i=`${tt(o.fullName)}|${o.learnerNo||""}|${o.sourceSheet}`,l=r.get(i);if(!l){r.set(i,o);return}const c=Array.from(new Set([...l.statuses||[],...o.statuses||[]]));r.set(i,{...l,...o,remarks:o.remarks||l.remarks,additionalRemarks:o.additionalRemarks||l.additionalRemarks,statuses:c.length>0?c:void 0})};return t.forEach(n),s.forEach(o=>{o.learnerGrades.forEach(i=>{n({learnerNo:i.learnerNo,sex:i.sex,fullName:i.fullName,sourceSheet:o.sheetName,sourceRow:i.sourceRow,remarks:i.remark||void 0,additionalRemarks:i.additionalRemarks||void 0})})}),a.forEach(o=>{o.learnerGrades.forEach(i=>{n({learnerNo:i.learnerNo,sex:i.sex,fullName:i.fullName,sourceSheet:o.sheetName,sourceRow:i.sourceRow,remarks:i.remark||void 0,additionalRemarks:i.additionalRemarks||void 0})})}),Array.from(r.values())}function $m(t,s,a,r){const n=[...t.signatures,...s.flatMap(i=>i.signatures),...a.flatMap(i=>i.signatures),...r.signatures],o=new Map;return n.forEach(i=>{const l=`${tt(i.role)}|${tt(i.name||"")}|${i.sourceSheet}`;o.set(l,i)}),Array.from(o.values())}function Om(t){const s=Bm(t.inputData.learners,t.quarterSheets,t.finalSheets);return{format:Zo,version:rm,workbookMeta:{fileName:t.workbook.fileName,sheetNames:t.workbook.sheetNames,detectedSheets:{inputData:t.detection.detectedSheets.inputData,firstQuarter:t.detection.detectedSheets.firstQuarter,secondQuarter:t.detection.detectedSheets.secondQuarter,finalSemestral:t.detection.detectedSheets.finalSemestral,helper:t.detection.detectedSheets.helper,lookup:t.detection.detectedSheets.lookup,other:t.detection.detectedSheets.other}},schoolContext:{...t.inputData.schoolContext},learners:s,quarterlyRecords:t.quarterSheets.map(a=>({sheetName:a.sheetName,quarter:a.quarter,gradingWeights:a.gradingWeights,assessmentColumns:a.assessmentColumns,learnerGrades:a.learnerGrades})),finalSemestralRecords:t.finalSheets.map(a=>({sheetName:a.sheetName,learnerGrades:a.learnerGrades})),references:{componentWeights:t.references.componentWeights,attachmentRules:Array.from(new Set([...t.inputData.attachmentRules||[],...t.references.attachmentRules||[]])),helperNotes:Array.from(new Set([...t.inputData.helperNotes||[],...t.references.helperNotes||[]])),signatures:$m(t.inputData,t.quarterSheets,t.finalSheets,t.references),unclassifiedBlocks:t.unclassifiedBlocks},validation:t.validation,raw:t.workbook.raw}}function Pm(t){return!t||t.length===0?[]:t.map(s=>({s:{r:s.s.r,c:s.s.c},e:{r:s.e.r,c:s.e.c}}))}function _m(t){const s={ref:t["!ref"],merges:Pm(t["!merges"]),cells:{}};return Object.keys(t).filter(a=>!a.startsWith("!")).forEach(a=>{const r=t[a];!r||!(r.v!==void 0||typeof r.w=="string"&&r.w.trim().length>0||typeof r.f=="string"&&r.f.trim().length>0)||(s.cells[a]={v:r.v,w:r.w,t:r.t,f:r.f})}),s}function Hm(t,s){const a=Sl(s,{type:"array",cellFormula:!0,cellNF:!0,cellText:!0,cellDates:!0,raw:!1}),r={},n={};return a.SheetNames.forEach(o=>{const i=a.Sheets[o];if(!i)return;const l=_m(i);n[o]=l,r[o]=fm(o,l)}),{fileName:t,sheetNames:a.SheetNames,raw:{sheets:n},matrices:r}}async function Gm(t){const s=await t.arrayBuffer();return Hm(t.name,s)}class Qm{state={};markRange(s,a,r){const n=s;this.state[n]||(this.state[n]={mappedAddresses:new Set,mappings:[]});for(let o=a.s.r;o<=a.e.r;o+=1)for(let i=a.s.c;i<=a.e.c;i+=1)this.state[n].mappedAddresses.add(`${o}:${i}`);this.state[n].mappings.push({sheetName:s,range:a,reason:r})}getMappings(){return Object.values(this.state).flatMap(s=>s.mappings)}getMappedRegionCount(){return this.getMappings().length}getUnmappedBlocks(s,a="unclassified"){const r=[];return Object.values(s).forEach(n=>{const o=new Set,i=this.state[n.sheetName]?.mappedAddresses??new Set;for(let l=n.startRow;l<=n.endRow;l+=1)for(let c=n.startCol;c<=n.endCol;c+=1){const d=`${l}:${c}`;if(o.has(d)||i.has(d))continue;const x=Ee(n,l,c);if(!(x&&x.displayValue!==null&&x.displayValue!==void 0&&String(x.displayValue).trim())){o.add(d);continue}const m=this.collectComponent(n,l,c,i,o);m&&r.push({sheetName:n.sheetName,range:pm(m),purposeGuess:a,raw2D:gm(n,m)})}}),r}collectComponent(s,a,r,n,o){const i=[{row:a,col:r}];let l=a,c=a,d=r,x=r,N=!1;for(;i.length>0;){const m=i.shift();if(!m)break;const f=`${m.row}:${m.col}`;if(o.has(f)||n.has(f))continue;o.add(f);const w=Ee(s,m.row,m.col);w&&w.displayValue!==null&&w.displayValue!==void 0&&String(w.displayValue).trim()&&(N=!0,l=Math.min(l,m.row),c=Math.max(c,m.row),d=Math.min(d,m.col),x=Math.max(x,m.col),[{row:m.row-1,col:m.col},{row:m.row+1,col:m.col},{row:m.row,col:m.col-1},{row:m.row,col:m.col+1}].forEach(j=>{j.rows.endRow||j.cols.endCol||i.push(j)}))}return N?{s:{r:l,c:d},e:{r:c,c:x}}:null}}function Um(t){const s=t.detection.detectedSheets,a=[s.inputData?1:0,s.firstQuarter.length,s.secondQuarter.length,s.finalSemestral.length,s.helper.length,s.lookup.length].reduce((r,n)=>r+n,0);return{totalSheets:t.totalSheets,recognizedSheets:a,unclassifiedSheets:s.other.length,mappedCellRegions:t.mappedCellRegions,unmappedCellRegions:t.unmappedCellRegions}}function Vm(t){const s=new Map;t.forEach(r=>{const n=`${r.learnerNo||""}|${r.fullName.trim().toUpperCase()}`;s.has(n)||s.set(n,[]),s.get(n)?.push(r.sourceRow)});const a=[];return s.forEach((r,n)=>{r.length>1&&a.push(`Duplicate learner entry detected for ${n} at rows ${r.join(", ")}.`)}),a}function Wm(t){const s=[];return t.forEach(a=>{a.learnerGrades.forEach(r=>{r.fullName.trim()||s.push(`${a.sheetName} row ${r.sourceRow}: learner name is blank.`);const n=r.writtenWorks&&Object.values(r.writtenWorks).some(i=>i!==null&&i!==""),o=r.performanceTasks&&Object.values(r.performanceTasks).some(i=>i!==null&&i!=="");!n&&!o&&r.quarterlyAssessment==null&&s.push(`${a.sheetName} row ${r.sourceRow}: all grade blocks are empty.`)})}),s}function qm(t){const s=[];return t.forEach(a=>{a.learnerGrades.forEach(r=>{r.fullName.trim()||s.push(`${a.sheetName} row ${r.sourceRow}: learner name is blank.`),r.finalGrades==null&&r.firstSemester==null&&r.firstQuarter==null&&r.secondQuarter==null&&s.push(`${a.sheetName} row ${r.sourceRow}: no semestral/final values detected.`)})}),s}function Ym(t){const s=[],a=[];t.detection.detectedSheets.inputData||a.push("Missing Input Data sheet."),t.quarterSheets.length===0&&a.push("No quarter class record sheets were extracted."),t.finalSheets.length===0&&a.push("No Final Semestral sheet was extracted."),t.detection.missingCriticalAnchors.length>0&&s.push(`Missing critical anchors: ${t.detection.missingCriticalAnchors.join(", ")}.`),Vm(t.inputData.learners).forEach(o=>s.push(o)),Wm(t.quarterSheets).forEach(o=>s.push(o)),qm(t.finalSheets).forEach(o=>s.push(o)),s.push(...t.inputData.warnings),t.quarterSheets.forEach(o=>s.push(...o.warnings)),t.finalSheets.forEach(o=>s.push(...o.warnings)),t.unmappedCellRegions>t.mappedCellRegions&&s.push("A significant portion of workbook regions are unclassified; review diagnostics before confirming import.");const r=t.detection.confidence,n=t.detection.isOfficialFormatLikely&&a.length===0;return r({fullName:i.fullName,learnerNo:i.learnerNo,sex:i.sex,remarks:i.remarks,additionalRemarks:i.additionalRemarks,statuses:i.statuses,sourceSheet:i.sourceSheet,sourceRow:i.sourceRow})),r=t.quarterlyRecords.flatMap(i=>i.learnerGrades.map(l=>({fullName:l.fullName,sourceSheet:i.sheetName,sourceRow:l.sourceRow,quarter:i.quarter,firstQuarter:l.firstQuarter,secondQuarter:l.secondQuarter,firstSemester:l.firstSemester,finalGrades:l.finalGrades,quarterlyGrade:l.quarterlyGrade,initialGrade:l.initialGrade,remark:l.remark,additionalRemarks:l.additionalRemarks}))),n=t.finalSemestralRecords.flatMap(i=>i.learnerGrades.map(l=>({fullName:l.fullName,sourceSheet:i.sheetName,sourceRow:l.sourceRow,firstQuarter:l.firstQuarter,secondQuarter:l.secondQuarter,firstSemester:l.firstSemester,finalGrades:l.finalGrades,remark:l.remark,additionalRemarks:l.additionalRemarks}))),o=[...t.learners,...t.quarterlyRecords.flatMap(i=>i.learnerGrades.map(l=>({learnerNo:l.learnerNo,sex:l.sex,fullName:l.fullName,sourceSheet:i.sheetName,sourceRow:l.sourceRow,remarks:l.remark||void 0,additionalRemarks:l.additionalRemarks||void 0})))].map(i=>({fullName:i.fullName,remark:i.remarks||null,additionalRemarks:i.additionalRemarks||null,statuses:"statuses"in i?i.statuses:void 0,sourceSheet:i.sourceSheet,sourceRow:i.sourceRow}));return{classEntity:s,studentEntities:a,gradeEntities:[...r,...n],remarksEntities:o}}const Un=1500;function Vn(t){return t?Object.values(t.matrices).reduce((s,a)=>s+a.rowCount*a.colCount,0):0}function Wn(t){const s=`[shs-import] parse ${t.stage} file=${t.fileName} duration=${t.durationMs}ms sheets=${t.sheetCount} matrixCells=${t.matrixCellCount}`;if(t.stage==="failed"){console.error(`${s}${t.errorMessage?` error=${t.errorMessage}`:""}`);return}if(t.durationMs>=Un){console.warn(`${s} slow=true threshold=${Un}ms`);return}}function Xt(t,s){t?.onProgress?.(s)}function Xm(t,s){return Array.from(new Set(t.filter(a=>Number.isFinite(a)).map(a=>Math.max(s.startRow,Math.min(s.endRow,Math.trunc(a))))))}function As(t,s,a,r){Xm(a,s).forEach(n=>{t.markRange(s.sheetName,{s:{r:n,c:s.startCol},e:{r:n,c:s.endCol}},r)})}async function Jm(t,s){const a=s?.confidenceThreshold??am,r=Date.now();let n=null;try{if(Xt(s,{stage:"reading",message:"Reading workbook structure and raw sheets..."}),n=await Gm(t),!n)throw new Error("Workbook read returned null");Xt(s,{stage:"detecting-format",message:"Detecting DepEd SHS workbook format..."});const o=ym(n);Xt(s,{stage:"extracting",message:"Extracting metadata, learners, grades, and references..."});const i=o.detectedSheets.inputData||n.sheetNames[0],l=n.matrices[i],c=l?Im(l):{sheetName:i,schoolContext:{},learners:[],signatures:[],attachmentRules:[],helperNotes:[],warnings:["Input data sheet was not available in matrix map."]},x=[...o.detectedSheets.firstQuarter||[],...o.detectedSheets.secondQuarter||[]].map(k=>n.matrices[k]).filter(k=>!!k).map(k=>Lm(k)),N=(o.detectedSheets.finalSemestral||[]).map(k=>n.matrices[k]).filter(k=>!!k).map(k=>Sm(k)),m=[...o.detectedSheets.helper||[],...o.detectedSheets.lookup||[]].map(k=>n.matrices[k]).filter(k=>!!k),f=Fm(m),w=new Qm;o.anchorMatches.forEach(k=>{const D=n.matrices[k.sheetName];D&&As(w,D,[k.row],`Anchor match: ${k.anchor}`)}),[c.sheetName].forEach(k=>{const D=n.matrices[k];if(!D)return;const p=Array.from({length:Math.min(14,D.rowCount)},(S,I)=>D.startRow+I),z=c.learners.map(S=>S.sourceRow-1),g=c.signatures.map(S=>S.sourceRow).filter(S=>typeof S=="number").map(S=>S-1);As(w,D,[...p,...z,...g],"Input Data parsed rows")}),x.forEach(k=>{const D=n.matrices[k.sheetName];if(!D)return;const p=k.learnerGrades.map(S=>S.sourceRow-1),z=k.signatures.map(S=>S.sourceRow).filter(S=>typeof S=="number").map(S=>S-1),g=p.length>0?Math.max(D.startRow,Math.min(...p)-2):D.startRow;As(w,D,[g,g+1,...p,...z],"Quarter sheet parsed rows")}),N.forEach(k=>{const D=n.matrices[k.sheetName];if(!D)return;const p=k.learnerGrades.map(S=>S.sourceRow-1),z=k.signatures.map(S=>S.sourceRow).filter(S=>typeof S=="number").map(S=>S-1),g=p.length>0?Math.max(D.startRow,Math.min(...p)-2):D.startRow;As(w,D,[g,g+1,...p,...z],"Final semestral parsed rows")}),m.forEach(k=>{const D=f.componentWeights.filter(g=>g.sourceSheet===k.sheetName).map(g=>g.sourceRow).filter(g=>typeof g=="number").map(g=>g-1),p=f.signatures?.filter(g=>g.sourceSheet===k.sheetName).map(g=>g.sourceRow).filter(g=>typeof g=="number").map(g=>g-1)||[],z=D.length===0&&p.length===0?[k.startRow,k.startRow+1,k.startRow+2]:[];As(w,k,[...D,...p,...z],"Reference/helper parsed rows")});const T=w.getUnmappedBlocks(n.matrices);Xt(s,{stage:"validating",message:"Validating completeness and structural integrity..."});const j=Ym({detection:o,inputData:c,quarterSheets:x,finalSheets:N,mappedCellRegions:w.getMappedRegionCount(),unmappedCellRegions:T.length,totalSheets:n.sheetNames.length});Xt(s,{stage:"normalizing",message:"Normalizing parsed workbook and creating entity mapping..."});const h=Om({workbook:n,detection:o,inputData:c,quarterSheets:x,finalSheets:N,references:f,validation:j,unclassifiedBlocks:T});h.validation.confidence=5?"high":t.atRiskCount>=2?"medium":"low",a=et({metadata:t.classMetadata,classSectionId:t.classSectionId,className:t.name,grade:t.grade,gradeLevel:t.gradeLevel,classification:t.classification,strand:t.strand,section:t.section,schoolYear:t.schoolYear,ownerTeacherId:t.ownerTeacherId||t.teacherId,ownerTeacherName:t.ownerTeacherName,adviserTeacherId:t.adviserTeacherId||t.teacherId,adviserTeacherName:t.adviserTeacherName||t.ownerTeacherName,managerId:t.managerId,managerName:t.managerName});return{id:t.id,name:a.className||t.name,classSectionId:a.classSectionId||t.classSectionId,classMetadata:a,gradeLevel:a.gradeLevel||void 0,classification:a.classification||void 0,strand:a.strand||void 0,managerId:a.managerId||void 0,managerName:a.managerName||void 0,schedule:t.schedule,studentCount:t.studentCount,avgScore:t.avgScore,atRiskCount:t.atRiskCount,riskLevel:s}}function eu(t,s){const a=t.riskLevel.toLowerCase(),r=t.lastActive?ni(t.lastActive.toDate()):"Unknown",n=t.className||s||"Imported Class",o=Et(n),i=t.grade||o.grade,l=t.section||o.section,c=et({metadata:t.classMetadata,classSectionId:t.classSectionId||t.classroomId,className:[i,l].filter(Boolean).join(" - ")||n,grade:i,gradeLevel:t.gradeLevel,classification:t.classification,strand:t.strand,section:l,adviserTeacherId:t.teacherId,ownerTeacherId:t.teacherId,managerId:t.classMetadata?.managerId||t.managerId,managerName:t.classMetadata?.managerName||t.managerName});return{id:t.id,lrn:t.lrn,name:t.name,avatar:t.avatar||`https://ui-avatars.com/api/?name=${encodeURIComponent(t.name)}&background=random`,avgScore:t.avgQuizScore,riskLevel:a,weakestTopic:t.weakestTopic||"N/A",classroomId:t.classroomId||c.classSectionId||n,className:c.className||[i,l].filter(Boolean).join(" - ")||n,grade:i,gradeLevel:c.gradeLevel||os(i)||void 0,classification:c.classification||js(c.gradeLevel||i)||void 0,strand:c.strand||ys(c.className,l)||void 0,section:l,classSectionId:c.classSectionId||t.classSectionId,classMetadata:c,managerId:c.managerId||void 0,managerName:c.managerName||void 0,lastActive:r,struggles:t.struggles||[],engagementScore:t.engagementScore,attendance:t.attendance,assignmentCompletion:t.assignmentCompletion}}function tu(t){const s=t.atRiskCount>=5?"high":t.atRiskCount>=2?"medium":"low",a=et({metadata:t.classMetadata,classSectionId:t.classSectionId,className:t.name,grade:t.grade,gradeLevel:t.gradeLevel||t.classMetadata?.gradeLevel,classification:t.classification||t.classMetadata?.classification,strand:t.strand||t.classMetadata?.strand,section:t.section,managerId:t.managerId||t.classMetadata?.managerId,managerName:t.managerName||t.classMetadata?.managerName});return{id:t.id,name:a.className||t.name,classSectionId:a.classSectionId||t.classSectionId||void 0,classMetadata:a,gradeLevel:a.gradeLevel||void 0,classification:a.classification||void 0,strand:a.strand||void 0,managerId:a.managerId||void 0,managerName:a.managerName||void 0,schedule:t.schedule||"Mon-Fri",studentCount:t.studentCount,avgScore:t.avgScore,atRiskCount:t.atRiskCount,riskLevel:s}}function su(t){const s=(t.riskLevel||"Low").toLowerCase(),a=et({metadata:t.classMetadata,classSectionId:t.classSectionId,className:t.className||[t.grade,t.section].filter(Boolean).join(" - ")||"Imported Class",grade:t.grade,gradeLevel:t.gradeLevel||t.classMetadata?.gradeLevel,classification:t.classification||t.classMetadata?.classification,strand:t.strand||t.classMetadata?.strand,section:t.section,managerId:t.managerId||t.classMetadata?.managerId,managerName:t.managerName||t.classMetadata?.managerName}),r=a.className||"Imported Class";return{id:t.id,lrn:t.lrn||void 0,name:t.name,avatar:`https://ui-avatars.com/api/?name=${encodeURIComponent(t.name)}&background=random`,avgScore:t.avgQuizScore,riskLevel:s,weakestTopic:t.weakestTopic||"Foundational Skills",classroomId:a.classSectionId||t.classSectionId||r,className:r,grade:a.grade||Et(r).grade,gradeLevel:a.gradeLevel||os(a.grade||Et(r).grade)||void 0,classification:a.classification||js(a.gradeLevel||a.grade)||void 0,strand:a.strand||ys(r,a.section||t.section)||void 0,section:a.section||Et(r).section,classSectionId:a.classSectionId||t.classSectionId||void 0,classMetadata:a,managerId:a.managerId||void 0,managerName:a.managerName||void 0,lastActive:"Recently imported",struggles:[t.weakestTopic||"Foundational Skills"],engagementScore:t.engagementScore,attendance:t.attendance,assignmentCompletion:t.assignmentCompletion}}function au(t,s,a){return t<60||s<75||a<55?"high":t<75||s<85||a<70?"medium":"low"}function ru(t,s,a,r){const n=et({metadata:r,classSectionId:s,className:a}),o=n.className||"Imported Class",i=n.classSectionId||"imported_class",l=Number(t.avgQuizScore||0),c=Number(t.attendance||0),d=Number(t.engagementScore||0),x=Number(t.assignmentCompletion||0),N=t.unknownFields?.weakestTopic||t.unknownFields?.topic||"Foundational Skills",m=au(l,c,d),f=t.studentId||t.lrn||t.email||t.name||Math.random().toString(36).slice(2);return{id:`upload-${i}-${f}`,lrn:t.lrn,name:t.name,avatar:`https://ui-avatars.com/api/?name=${encodeURIComponent(t.name)}&background=random`,avgScore:l,riskLevel:m,weakestTopic:N,classroomId:i,className:o,grade:n.grade||Et(o).grade,gradeLevel:n.gradeLevel||os(n.grade||Et(o).grade)||void 0,classification:n.classification||js(n.gradeLevel||n.grade)||void 0,strand:n.strand||ys(o,n.section)||void 0,section:n.section||Et(o).section,classSectionId:i,classMetadata:n,managerId:n.managerId||void 0,managerName:n.managerName||void 0,lastActive:"Recently imported",struggles:[N],engagementScore:d,attendance:c,assignmentCompletion:x}}function nu(t,s,a,r){const n=et({metadata:t.dashboardSync?.classMetadata||t.classMetadata||r,classSectionId:t.dashboardSync?.classSectionId||s,className:t.dashboardSync?.className||a}),o=n.classSectionId||"imported_class",i=n.className||"Imported Class";return{classSectionId:o,className:i,classMetadata:{...n,classSectionId:o,className:i}}}function ni(t){const s=Date.now()-t.getTime(),a=Math.floor(s/6e4);if(a<1)return"Just now";if(a<60)return`${a} min${a>1?"s":""} ago`;const r=Math.floor(a/60);if(r<24)return`${r} hour${r>1?"s":""} ago`;const n=Math.floor(r/24);return`${n} day${n>1?"s":""} ago`}function Je(t){return(t||"").trim().toLowerCase()}function qn(t){const s=Je(t.classSectionId);if(s)return`section:${s}`;const a=(t.id||"").trim().toLowerCase();return a?`id:${a}`:`name:${(t.name||"").trim().toLowerCase()}`}function Yn(t,s){const a=new Map;return t.forEach(r=>{a.set(qn(r),r)}),s.forEach(r=>{const n=qn(r),o=a.get(n);if(!o){a.set(n,r);return}const i=Math.max(o.atRiskCount||0,r.atRiskCount||0),l=Math.max(o.studentCount||0,r.studentCount||0),c=r.avgScore>0?r.avgScore:o.avgScore,d=i>=5?"high":i>=2?"medium":"low",x=et({metadata:o.classMetadata,classSectionId:o.classSectionId||r.classSectionId,className:o.name||r.name,grade:o.classMetadata?.grade||r.classMetadata?.grade,gradeLevel:o.classMetadata?.gradeLevel||r.classMetadata?.gradeLevel,classification:o.classMetadata?.classification||r.classMetadata?.classification,strand:o.classMetadata?.strand||r.classMetadata?.strand,section:o.classMetadata?.section||r.classMetadata?.section,schoolYear:o.classMetadata?.schoolYear||r.classMetadata?.schoolYear,ownerTeacherId:o.classMetadata?.ownerTeacherId||r.classMetadata?.ownerTeacherId,ownerTeacherName:o.classMetadata?.ownerTeacherName||r.classMetadata?.ownerTeacherName,adviserTeacherId:o.classMetadata?.adviserTeacherId||r.classMetadata?.adviserTeacherId,adviserTeacherName:o.classMetadata?.adviserTeacherName||r.classMetadata?.adviserTeacherName,managerId:o.classMetadata?.managerId||r.classMetadata?.managerId,managerName:o.classMetadata?.managerName||r.classMetadata?.managerName});a.set(n,{...o,classSectionId:x.classSectionId||o.classSectionId||r.classSectionId,name:x.className||o.name||r.name,classMetadata:x,gradeLevel:x.gradeLevel||void 0,classification:x.classification||void 0,strand:x.strand||void 0,managerId:x.managerId||void 0,managerName:x.managerName||void 0,schedule:o.schedule||r.schedule,studentCount:l,atRiskCount:i,avgScore:c,riskLevel:d})}),Array.from(a.values())}function Kn(t){const s=(t.lrn||"").trim().toLowerCase();if(s)return`lrn:${s}`;const a=t.name.trim().toLowerCase();if(a)return`name:${a}`;const r=Je(t.classSectionId)||Je(t.classroomId),n=(t.id||"").trim().toLowerCase();return r&&n?`${r}|id:${n}`:`${r}|anonymous`}function ps(t){const s=Je(t.classSectionId)||Je(t.classroomId),a=(t.lrn||"").trim().toLowerCase(),r=(t.id||"").trim().toLowerCase(),n=t.name.trim().toLowerCase().replace(/\s+/g,"_");return s&&a?`${s}|lrn:${a}`:s&&r?`${s}|id:${r}`:a?`lrn:${a}`:r&&n?`id:${r}|name:${n}`:r?`id:${r}`:s&&n?`${s}|name:${n}`:`name:${n||"unknown"}`}function Xn(t,s){const a=new Map;return t.forEach(r=>{a.set(Kn(r),r)}),s.forEach(r=>{const n=Kn(r),o=a.get(n);if(!o){a.set(n,r);return}const i=[o.riskLevel,r.riskLevel].includes("high")?"high":[o.riskLevel,r.riskLevel].includes("medium")?"medium":"low",l=et({metadata:o.classMetadata,classSectionId:o.classSectionId||r.classSectionId,className:o.className||r.className,grade:o.grade||r.grade,gradeLevel:o.gradeLevel||r.gradeLevel,classification:o.classification||r.classification,strand:o.strand||r.strand,section:o.section||r.section,managerId:o.managerId||r.managerId,managerName:o.managerName||r.managerName});a.set(n,{...o,lrn:o.lrn||r.lrn,classSectionId:l.classSectionId||o.classSectionId||r.classSectionId,classroomId:o.classroomId||r.classroomId,className:l.className||o.className||r.className,grade:l.grade||o.grade||r.grade,gradeLevel:l.gradeLevel||o.gradeLevel||r.gradeLevel,classification:l.classification||o.classification||r.classification,strand:l.strand||o.strand||r.strand,section:l.section||o.section||r.section,managerId:l.managerId||o.managerId||r.managerId,managerName:l.managerName||o.managerName||r.managerName,classMetadata:l,avgScore:r.avgScore>0?r.avgScore:o.avgScore,attendance:r.attendance>0?r.attendance:o.attendance,engagementScore:r.engagementScore>0?r.engagementScore:o.engagementScore,assignmentCompletion:r.assignmentCompletion>0?r.assignmentCompletion:o.assignmentCompletion,weakestTopic:o.weakestTopic&&o.weakestTopic!=="N/A"?o.weakestTopic:r.weakestTopic,riskLevel:i,struggles:o.struggles.length>0?o.struggles:r.struggles})}),Array.from(a.values())}const gx=({onLogout:t,onOpenProfile:s,onOpenSettings:a})=>{const{currentUser:r,userProfile:n}=Us(),[o,i]=b.useState("dashboard"),[l,c]=b.useState(!1),[d,x]=b.useState(!1),[N,m]=b.useState(!1),[f,w]=b.useState(!1),[T,j]=b.useState(!1),[h,y]=b.useState(null),[k,D]=b.useState(null),[p,z]=b.useState([]),[g,S]=b.useState([]),[I,B]=b.useState([]),[P,J]=b.useState(""),[ne,X]=b.useState(!0),[te,se]=b.useState(!1),[$,Y]=b.useState(0),[E,U]=b.useState([]),[W,ge]=b.useState(!1),L=b.useRef(new Map);b.useEffect(()=>{if(!r)return;const v=r.uid;let _=!0,le;return(async()=>{X(!0);try{const Fe=await qo(v);let be=Fe.map(Zm);const Oe=await Nd(v).catch(()=>[]),Ue=new Map;Oe.forEach(K=>{const me=Je(K.classSectionId);me&&Ue.set(me,K)}),be=be.map(K=>{const me=Ue.get(Je(K.classSectionId));if(!me)return K;const Be=et({metadata:K.classMetadata,classSectionId:me.classSectionId||K.classSectionId,className:me.className||K.name,grade:me.grade||K.classMetadata?.grade,gradeLevel:me.gradeLevel||K.classMetadata?.gradeLevel,classification:me.classification||K.classMetadata?.classification,strand:me.strand||K.classMetadata?.strand,section:me.section||K.classMetadata?.section,schoolYear:me.schoolYear||K.classMetadata?.schoolYear,ownerTeacherId:me.ownerTeacherId||K.classMetadata?.ownerTeacherId,ownerTeacherName:me.ownerTeacherName||K.classMetadata?.ownerTeacherName,managerId:me.managerId||K.classMetadata?.managerId,managerName:me.managerName||K.classMetadata?.managerName});return{...K,name:Be.className||K.name,classSectionId:Be.classSectionId||K.classSectionId,classMetadata:Be,gradeLevel:Be.gradeLevel||K.gradeLevel,classification:Be.classification||K.classification,strand:Be.strand||K.strand,managerId:Be.managerId||K.managerId,managerName:Be.managerName||K.managerName}});const Ne=new Map,it=new Map;Fe.forEach(K=>{const me=et({metadata:K.classMetadata,classSectionId:K.classSectionId,className:K.name,grade:K.grade,gradeLevel:K.gradeLevel,classification:K.classification,strand:K.strand,section:K.section,schoolYear:K.schoolYear,ownerTeacherId:K.ownerTeacherId||K.teacherId,ownerTeacherName:K.ownerTeacherName,adviserTeacherId:K.adviserTeacherId||K.teacherId,adviserTeacherName:K.adviserTeacherName,managerId:K.managerId,managerName:K.managerName});Ne.set(K.id,me.className||K.name),it.set(K.id,me);const Be=Je(K.classSectionId);if(Be){const Ce=Ue.get(Be),Ze=et({metadata:me,classSectionId:Ce?.classSectionId||Be,className:Ce?.className||me.className,grade:Ce?.grade||me.grade,gradeLevel:Ce?.gradeLevel||me.gradeLevel,classification:Ce?.classification||me.classification,strand:Ce?.strand||me.strand,section:Ce?.section||me.section,schoolYear:Ce?.schoolYear||me.schoolYear,ownerTeacherId:Ce?.ownerTeacherId||me.ownerTeacherId,ownerTeacherName:Ce?.ownerTeacherName||me.ownerTeacherName,managerId:Ce?.managerId||me.managerId,managerName:Ce?.managerName||me.managerName});Ne.set(Be,Ze.className||K.name),it.set(Be,Ze)}});const Lt=(await pr(v)).map(K=>{const me=Je(K.classSectionId||K.classroomId),Be=Ne.get(K.classroomId)||(me?Ne.get(me):void 0)||K.className||"Unknown",Ce=eu(K,Be);if(!me)return Ce;const Ze=it.get(me);if(!Ze)return Ce;const dt=et({metadata:Ze,classSectionId:Ce.classSectionId||Ze.classSectionId,className:Ce.className||Ze.className,grade:Ce.grade||Ze.grade,gradeLevel:Ce.gradeLevel||Ze.gradeLevel,classification:Ce.classification||Ze.classification,strand:Ce.strand||Ze.strand,section:Ce.section||Ze.section,managerId:Ce.managerId||Ze.managerId,managerName:Ce.managerName||Ze.managerName});return{...Ce,className:dt.className||Ce.className,grade:dt.grade||Ce.grade,gradeLevel:dt.gradeLevel||Ce.gradeLevel,classification:dt.classification||Ce.classification,strand:dt.strand||Ce.strand,section:dt.section||Ce.section,classSectionId:dt.classSectionId||Ce.classSectionId,classMetadata:dt,managerId:dt.managerId||Ce.managerId,managerName:dt.managerName||Ce.managerName}});if(!_)return;z(K=>be.length===0&&K.length>0?K:be),S(K=>Lt.length===0&&K.length>0?K:Lt),We.getImportedClassOverview({limit:3e3,forceRefresh:$>0}).then(K=>{_&&(K.warnings.length>0&&console.warn("Imported class overview warnings:",K.warnings.join(" ")),z(me=>Yn(me,K.classrooms.map(tu))),S(me=>Xn(me,K.students.map(su))))}).catch(K=>{console.warn("Imported class overview merge unavailable:",K)});const Dt=Fe.map(K=>K.id);Dt.length>0&&(le=yd(Dt,K=>{_&&B(K.map(me=>({id:me.id,student:me.studentName,action:me.action,topic:me.topic,time:ni(me.timestamp.toDate()),type:me.type})))}))}catch(Fe){console.error("Failed to load teacher data:",Fe),ue.error("Failed to load dashboard data")}finally{X(!1)}})(),()=>{_=!1,le&&le()}},[r,$]),b.useEffect(()=>{if(!r)return;let v=!0;return jd("",80).then(_=>{v&&U(_)}).catch(_=>{console.warn("Failed to load teacher directory options:",_)}),()=>{v=!1}},[r]),b.useEffect(()=>{if(g.length===0)return;(async()=>{se(!0);try{const _=g.map(de=>({name:de.name,engagementScore:de.engagementScore,avgQuizScore:de.avgScore,attendance:de.attendance,riskLevel:de.riskLevel})),le=await We.getDailyInsight({students:_});J(le.insight)}catch{J(`${g.filter(_=>_.riskLevel==="high").length} students are at high risk of falling behind. Review their progress in the analytics view.`)}finally{se(!1)}})()},[g]);const C=p.reduce((v,_)=>v+_.studentCount,0),G=p.reduce((v,_)=>v+_.atRiskCount,0),F=p.length>0?Math.round(p.reduce((v,_)=>v+_.avgScore,0)/p.length):0,ie=[{name:"High Risk",value:g.filter(v=>v.riskLevel==="high").length,color:"#FF8B8B"},{name:"Medium Risk",value:g.filter(v=>v.riskLevel==="medium").length,color:"#F08386"},{name:"Low Risk",value:g.filter(v=>v.riskLevel==="low").length,color:"#75D06A"}],R={};g.forEach(v=>{v.weakestTopic&&v.weakestTopic!=="N/A"&&(R[v.weakestTopic]||(R[v.weakestTopic]={total:0,sum:0}),R[v.weakestTopic].total+=1,R[v.weakestTopic].sum+=v.avgScore)});const H=Object.entries(R).map(([v,_])=>({topic:v,score:Math.round(_.sum/_.total)})).sort((v,_)=>v.score-_.score).slice(0,6),q=v=>{y(v),i("analytics")},ae=v=>{D(v),i("intervention")},ee=()=>{D(null),i("analytics")},V=()=>{y(null),D(null),i("dashboard")},pe=async(v,_)=>{if(!r){ue.error("Unable to assign manager: teacher context is missing.");return}const le=Et(v.classMetadata?.className||v.name),de=et({metadata:v.classMetadata,classSectionId:v.classSectionId,className:v.name,grade:v.classMetadata?.grade||le.grade,gradeLevel:v.classMetadata?.gradeLevel,classification:v.classMetadata?.classification,strand:v.classMetadata?.strand,section:v.classMetadata?.section||le.section,schoolYear:v.classMetadata?.schoolYear||String(new Date().getFullYear()),ownerTeacherId:v.classMetadata?.ownerTeacherId||r.uid,ownerTeacherName:v.classMetadata?.ownerTeacherName||Me,adviserTeacherId:v.classMetadata?.adviserTeacherId||r.uid,adviserTeacherName:v.classMetadata?.adviserTeacherName||Me,managerId:_.uid,managerName:_.name}),Fe=de.classSectionId||St(de.grade||le.grade,de.section||le.section);if(!Fe){ue.error("Unable to assign manager: missing class section ID.");return}ge(!0);try{await vd({classSectionId:Fe,className:de.className||v.name,grade:de.grade||le.grade,gradeLevel:de.gradeLevel||os(de.grade||le.grade)||de.grade||le.grade,classification:de.classification||js(de.gradeLevel||de.grade)||void 0,strand:de.strand||ys(de.className,de.section)||void 0,section:de.section||le.section,schoolYear:de.schoolYear||String(new Date().getFullYear()),ownerTeacherId:de.ownerTeacherId||r.uid,ownerTeacherName:de.ownerTeacherName||Me,managerId:_.uid,managerName:_.name});const be=et({metadata:de,classSectionId:Fe,managerId:_.uid,managerName:_.name}),Oe=Je(Fe);z(Ue=>Ue.map(Ne=>Je(Ne.classSectionId)!==Oe?Ne:{...Ne,name:be.className||Ne.name,classSectionId:be.classSectionId||Ne.classSectionId,classMetadata:be,gradeLevel:be.gradeLevel||Ne.gradeLevel,classification:be.classification||Ne.classification,strand:be.strand||Ne.strand,managerId:_.uid,managerName:_.name})),S(Ue=>Ue.map(Ne=>{if(Je(Ne.classSectionId||Ne.classroomId)!==Oe)return Ne;const ht=et({metadata:Ne.classMetadata,classSectionId:be.classSectionId||Ne.classSectionId,className:Ne.className||be.className,grade:Ne.grade||be.grade,gradeLevel:Ne.gradeLevel||be.gradeLevel,classification:Ne.classification||be.classification,strand:Ne.strand||be.strand,section:Ne.section||be.section,managerId:_.uid,managerName:_.name});return{...Ne,classMetadata:ht,gradeLevel:ht.gradeLevel||Ne.gradeLevel,classification:ht.classification||Ne.classification,strand:ht.strand||Ne.strand,managerId:_.uid,managerName:_.name}})),y(Ue=>!Ue||Je(Ue.classSectionId)!==Oe?Ue:{...Ue,classMetadata:be,managerId:_.uid,managerName:_.name,gradeLevel:be.gradeLevel||Ue.gradeLevel,classification:be.classification||Ue.classification,strand:be.strand||Ue.strand}),ue.success(`Assigned ${_.name} as section manager.`)}catch(be){console.error("Failed to assign class manager:",be),ue.error(be instanceof Error?be.message:"Failed to assign class manager")}finally{ge(!1)}};b.useEffect(()=>{const v=()=>{const _=window.innerWidth<1024;w(_),_?c(!1):m(!1)};return v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[]),b.useEffect(()=>{f&&m(!1)},[o,f]);const Me=n?.name||"Teacher",ye=b.useMemo(()=>{if(!h)return;if(h.classMetadata?.classSectionId)return h.classMetadata.classSectionId||void 0;if(h.classSectionId)return h.classSectionId;const v=Et(h.classMetadata?.className||h.name);return St(v.grade,v.section)||void 0},[h]),De=b.useMemo(()=>h||p[0]||null,[h,p]),Ge=b.useMemo(()=>{if(!De)return g;const v=(De.id||"").trim().toLowerCase(),_=Je(De.classSectionId),le=(De.name||"").trim().toLowerCase();return g.filter(de=>{const Fe=Je(de.classroomId),be=Je(de.classSectionId),Oe=(de.className||"").trim().toLowerCase();return _&&(be===_||Fe===_)||v&&(Fe===v||be===v)||le&&Oe===le})},[De,g]);return ne?e.jsxs("div",{className:"flex h-screen w-full bg-background p-6",children:[e.jsx("div",{className:"hidden lg:flex w-[280px] shrink-0 rounded-3xl border border-border bg-card p-5",children:e.jsxs("div",{className:"w-full space-y-4",children:[e.jsx(ce,{className:"h-12 w-40"}),e.jsx(ce,{className:"h-10 w-full"}),e.jsx(ce,{className:"h-10 w-full"}),e.jsx(ce,{className:"h-10 w-full"}),e.jsx(ce,{className:"h-10 w-full"})]})}),e.jsxs("div",{className:"flex-1 space-y-4 lg:pl-6",children:[e.jsx(ce,{className:"h-20 w-full rounded-2xl"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsx(ce,{className:"h-28 w-full rounded-2xl"}),e.jsx(ce,{className:"h-28 w-full rounded-2xl"}),e.jsx(ce,{className:"h-28 w-full rounded-2xl"})]}),e.jsx(ce,{className:"h-[420px] w-full rounded-2xl"})]})]}):e.jsxs("div",{className:"relative flex h-screen w-full bg-background overflow-hidden",children:[f&&N&&e.jsx("button",{"aria-label":"Close navigation",className:"fixed inset-0 z-30 bg-slate-900/40 backdrop-blur-[1px]",onClick:()=>m(!1)}),e.jsxs(Ie.aside,{initial:!1,animate:{width:f?280:l&&!d?80:280,x:f?N?0:-300:0},transition:{type:"spring",stiffness:360,damping:34},onMouseEnter:()=>!f&&l&&x(!0),onMouseLeave:()=>x(!1),className:"fixed inset-y-0 left-0 z-40 bg-[#f7f9fc] rounded-3xl border border-[#dde3eb] flex flex-col shadow-sm lg:static lg:z-auto p-5",children:[e.jsxs("div",{className:`mb-8 flex items-center ${l&&!d?"justify-center":"justify-between"}`,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-12 h-12 bg-gradient-to-r from-[#7274ED] to-[#9956DE] rounded-2xl flex items-center justify-center shadow-md flex-shrink-0",children:e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"MathPulse AI",className:"w-10 h-10 object-contain drop-shadow-md"})}),(!l||d)&&e.jsx("div",{children:e.jsx("h1",{className:"text-base font-bold font-display text-[#0a1628] whitespace-nowrap",children:"MathPulse AI"})})]}),!f&&(!l||d)&&e.jsx(Ie.button,{whileHover:{scale:1.1},whileTap:{scale:.95},onClick:()=>c(!l),className:"p-2 hover:bg-[#dde3eb] rounded-lg transition-colors text-[#5a6578]","aria-label":l?"Expand sidebar":"Collapse sidebar",children:l?e.jsx(Ht,{size:20}):e.jsx(Bt,{size:20})}),f&&e.jsx("button",{onClick:()=>m(!1),className:"p-2 hover:bg-[#dde3eb] rounded-lg transition-colors text-[#5a6578]","aria-label":"Close navigation",children:e.jsx(ca,{size:20})})]}),e.jsxs("nav",{className:"flex-1 space-y-5",children:[e.jsxs("div",{children:[l&&!d?e.jsx("div",{className:"px-4 mb-2 flex items-center gap-2",children:e.jsx("div",{className:"flex-1 h-[1px] bg-[#dde3eb]"})}):e.jsx("p",{className:"px-4 mb-2 text-[10px] font-bold text-[#5a6578] uppercase tracking-widest",children:"Overview"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(Ft,{icon:Mi,label:"Dashboard",active:o==="dashboard",collapsed:l&&!d,onClick:V,forceExpanded:f}),e.jsx(Ft,{icon:Bs,label:"Class Analytics",active:o==="analytics",collapsed:l&&!d,onClick:()=>i("analytics"),forceExpanded:f})]})]}),e.jsxs("div",{children:[l&&!d?e.jsx("div",{className:"px-4 mb-2 flex items-center gap-2",children:e.jsx("div",{className:"flex-1 h-[1px] bg-[#dde3eb]"})}):e.jsx("p",{className:"px-4 mb-2 text-[10px] font-bold text-[#5a6578] uppercase tracking-widest",children:"Students"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(Ft,{icon:Cl,label:"Topic Mastery",active:o==="topic_mastery",collapsed:l&&!d,onClick:()=>i("topic_mastery"),forceExpanded:f}),e.jsx(Ft,{icon:Ga,label:"Competency",active:o==="competency",collapsed:l&&!d,onClick:()=>i("competency"),forceExpanded:f})]})]}),e.jsxs("div",{children:[l&&!d?e.jsx("div",{className:"px-4 mb-2 flex items-center gap-2",children:e.jsx("div",{className:"flex-1 h-[1px] bg-[#dde3eb]"})}):e.jsx("p",{className:"px-4 mb-2 text-[10px] font-bold text-[#5a6578] uppercase tracking-widest",children:"Tools"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(Ft,{icon:hl,label:"Data Import",active:o==="import",collapsed:l&&!d,onClick:()=>i("import"),forceExpanded:f}),e.jsx(Ft,{icon:uo,label:"AI Quiz Maker",active:o==="quiz_maker",collapsed:l&&!d,onClick:()=>i("quiz_maker"),forceExpanded:f}),e.jsx(Ft,{icon:ss,label:"Question Bank",active:o==="question_bank",collapsed:l&&!d,onClick:()=>i("question_bank"),forceExpanded:f}),e.jsx(Ft,{icon:aa,label:"Notifications",active:o==="notifications",collapsed:l&&!d,onClick:()=>i("notifications"),forceExpanded:f}),e.jsx(Ft,{icon:kl,label:"Calendar",active:o==="calendar",collapsed:l&&!d,onClick:()=>i("calendar"),forceExpanded:f})]})]})]}),e.jsxs("div",{className:"space-y-2 border-t border-[#dde3eb] pt-4",children:[e.jsxs(Ie.button,{whileHover:{x:2},whileTap:{scale:.98},className:`w-full flex items-center gap-3 px-4 py-3 rounded-2xl text-[#5a6578] font-bold border border-transparent hover:bg-[#dde3eb] hover:border-[#dde3eb] hover:text-[#0a1628] transition-all duration-200 whitespace-nowrap ${l&&!d?"justify-center":""}`,onClick:a,title:l&&!d?"Settings":"",children:[e.jsx(Ai,{size:18,strokeWidth:2,className:"flex-shrink-0"}),(!l||d)&&e.jsx("span",{className:"font-body text-xs",children:"Settings"})]}),e.jsx("div",{className:"text-[#5a6578]",children:e.jsx(Li,{onClick:()=>j(!0),collapsed:l&&!d})})]})]}),e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsx("header",{className:"bg-card/80 backdrop-blur-md border-b border-border px-6 py-3 sticky top-0 z-30",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[f&&e.jsx("button",{onClick:()=>m(!0),className:"mt-1 p-2 rounded-lg border border-border text-muted-foreground hover:text-[#9956DE] hover:border-[#9956DE]/30 hover:bg-[#9956DE]/12 transition-colors","aria-label":"Open navigation",children:e.jsx(Oi,{size:18})}),e.jsxs("div",{children:[e.jsxs("h1",{className:"text-xl font-display font-bold text-foreground leading-tight",children:[o==="dashboard"&&"Teacher Dashboard",o==="analytics"&&(h?h.name:"Class Analytics"),o==="intervention"&&"Student Intervention",o==="topic_mastery"&&"Topic Mastery",o==="competency"&&"Student Competency",o==="import"&&"Data Import",o==="notifications"&&"Notifications",o==="calendar"&&"Calendar",o==="quiz_maker"&&"AI Quiz Maker",o==="question_bank"&&"Question Bank"]}),e.jsxs("p",{className:"text-xs text-muted-foreground font-body",children:[o==="dashboard"&&`Welcome back, ${Me}`,o==="analytics"&&"Deep dive into class performance",o==="intervention"&&k?.name,o==="topic_mastery"&&"Monitor class-wide topic mastery",o==="competency"&&"Per-student topic-level breakdown",o==="import"&&"Upload class records and materials",o==="quiz_maker"&&"Create and manage AI-powered quizzes",o==="question_bank"&&"Manage RAG-powered quiz question bank",o==="notifications"&&"View classroom alerts and updates",o==="calendar"&&"Check upcoming class events and schedule"]})]}),o==="dashboard"&&e.jsxs("div",{className:"hidden xl:flex items-center gap-2 ml-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 bg-[#9956DE]/12 border border-[#9956DE]/30 rounded-lg",children:[e.jsx(Ga,{size:13,className:"text-[#9956DE]"}),e.jsxs("span",{className:"text-xs font-display font-bold text-[#9956DE]",children:[C," students"]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 bg-[#F08386]/12 border border-[#F08386]/30 rounded-lg",children:[e.jsx(gs,{size:13,className:"text-[#F08386]"}),e.jsxs("span",{className:"text-xs font-display font-bold text-[#C65E63]",children:[G," at risk"]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 bg-[#75D06A]/14 border border-[#75D06A]/35 rounded-lg",children:[e.jsx(sr,{size:13,className:"text-[#75D06A]"}),e.jsxs("span",{className:"text-xs font-display font-bold text-[#4D9F46]",children:[F,"% avg"]})]})]})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs("button",{onClick:s,className:"flex items-center gap-2.5 bg-muted p-1.5 pr-3 rounded-lg cursor-pointer hover:bg-accent transition-all group max-w-[220px]",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg overflow-hidden ring-1 ring-[#9956DE]/45 bg-card flex items-center justify-center",children:e.jsx(Pi,{src:n?.photo,name:Me,className:"w-full h-full rounded-lg"})}),e.jsxs("div",{className:"hidden md:block min-w-0 text-left",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground leading-none group-hover:text-[#9956DE] transition-colors truncate",children:Me}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-none",children:"Teacher"})]})]})})]})}),e.jsx("main",{className:"flex-1 overflow-y-auto",children:e.jsxs(es,{mode:"wait",children:[o==="dashboard"&&e.jsx(iu,{classes:p,liveActivity:I,onViewClass:q,onViewAllClasses:()=>i("analytics"),onViewActivityStudent:v=>{const _=g.find(le=>le.name===v);_&&ae(_)},dailyInsight:P,insightLoading:te,totalStudents:C,totalAtRisk:G,avgPerformance:F}),o==="analytics"&&De&&e.jsx(cu,{selectedClass:De,students:Ge,riskDistribution:ie,topicPerformance:H,onViewStudent:ae,onBack:V,teacherOptions:E,managerUpdating:W,onAssignManager:v=>pe(De,v)}),o==="analytics"&&!De&&e.jsx(ou,{icon:Bs,title:"Class Analytics",description:"No classes available yet. Import class records to unlock analytics views."}),o==="intervention"&&k&&e.jsx(du,{student:k,teacherId:r?.uid||"",teacherName:Me,initialCache:L.current.get(k.id),onCacheUpdate:(v,_)=>L.current.set(v,_),onStudentUpdated:v=>{const _=k?ps(k):null;D(v),S(le=>le.map(de=>{const Fe=ps(de),be=_?Fe===_:!1,Oe=de.id===v.id&&Je(de.classSectionId)===Je(v.classSectionId);return be||Oe?v:de}))},onBack:ee}),o==="topic_mastery"&&e.jsx(Od,{classSectionId:ye}),o==="competency"&&e.jsx(Qd,{classSectionId:ye,className:h?.name,fallbackStudents:g}),o==="import"&&e.jsx(mu,{onEditRecords:()=>i("edit_records"),classSectionId:ye,className:h?.name,classMetadata:h?.classMetadata,onImportedClassRecords:v=>{const _=v.students.map(Ne=>ru(Ne,v.classSectionId,v.className,v.classMetadata)),le=et({metadata:v.classMetadata,classSectionId:v.classSectionId,className:v.className}),de=le.classSectionId||"imported_class",Fe=le.className||"Imported Class",be=_.filter(Ne=>Ne.riskLevel==="high").length,Oe=_.length>0?Math.round(_.reduce((Ne,it)=>Ne+it.avgScore,0)/_.length):0,Ue={id:de,name:Fe,classSectionId:de,classMetadata:{...le,classSectionId:de,className:Fe},schedule:"Mon-Fri",studentCount:_.length,avgScore:Oe,atRiskCount:be,riskLevel:be>=5?"high":be>=2?"medium":"low"};S(Ne=>Xn(Ne,_)),z(Ne=>Yn(Ne,[Ue]))},onDataChanged:()=>Y(v=>v+1)}),o==="notifications"&&e.jsx(Vd,{liveActivity:I,atRiskStudents:g.filter(v=>v.riskLevel==="high").map(v=>({name:v.name,riskLevel:v.riskLevel,weakestTopic:v.weakestTopic}))}),o==="calendar"&&e.jsx(sm,{classes:p,teacherId:r?.uid}),o==="edit_records"&&e.jsx(uu,{students:g,teacherId:r?.uid||"",teacherName:Me,onBack:()=>i("import")}),o==="quiz_maker"&&e.jsx(zd,{onBack:()=>i("dashboard")}),o==="question_bank"&&e.jsx(Fd,{})]})})]}),e.jsx(Ei,{isOpen:T,onClose:()=>j(!1),onConfirm:t,title:"Logout",message:"Are you sure you want to logout?",confirmText:"Logout",cancelText:"Cancel"})]})},Ft=({icon:t,label:s,active:a,collapsed:r,forceExpanded:n=!1,onClick:o})=>e.jsxs(Ie.button,{onClick:o,whileHover:{x:2},whileTap:{scale:.98},className:`w-full flex items-center gap-3 px-4 py-3 rounded-2xl cursor-pointer transition-all duration-200 border whitespace-nowrap ${r&&!n?"justify-center":""} ${a?"bg-[#9956DE]/12 border-[#9956DE]/30 shadow-sm text-[#9956DE]":"bg-transparent border-transparent text-[#5a6578] hover:bg-[#dde3eb] hover:border-[#dde3eb] hover:text-[#0a1628]"}`,children:[e.jsx(t,{size:18,strokeWidth:a?2.5:2,className:"flex-shrink-0"}),(!r||n)&&e.jsx("span",{className:"font-body font-bold text-xs",children:s}),a&&!r&&e.jsx(Ie.div,{layoutId:"sidebar-active-indicator",className:"ml-auto w-2 h-2 rounded-full bg-[#9956DE]",transition:{type:"spring",duration:.4}})]}),ou=({icon:t,title:s,description:a})=>e.jsx(Ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"p-6",children:e.jsxs("div",{className:"bg-card border border-border rounded-2xl p-8 shadow-sm max-w-2xl",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-[#9956DE]/20 text-[#9956DE] flex items-center justify-center mb-4",children:e.jsx(t,{size:24})}),e.jsx("h2",{className:"text-2xl font-display font-bold text-foreground mb-2",children:s}),e.jsx("p",{className:"text-sm text-muted-foreground font-body leading-relaxed",children:a})]})}),iu=({classes:t,liveActivity:s,onViewClass:a,onViewAllClasses:r,onViewActivityStudent:n,dailyInsight:o,insightLoading:i,totalStudents:l,totalAtRisk:c,avgPerformance:d})=>{const x=l>0?Math.round(c/l*100):0,N=l>0?Math.round((l-c)/l*100):0;return e.jsxs(Ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"p-6 space-y-6",children:[e.jsx("div",{className:"bg-gradient-to-r from-[#7274ED] to-[#9956DE] rounded-2xl p-5 text-white shadow-md",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-card/20 rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx(gs,{size:20})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h2",{className:"text-base font-display font-bold mb-1",children:"AI Insight"}),e.jsx(oa,{name:"teacher-dashboard-ai-insight",loading:i,fixture:e.jsxs("div",{className:"space-y-2 pt-1",children:[e.jsx(ce,{className:"h-3.5 w-11/12 bg-white/25"}),e.jsx(ce,{className:"h-3.5 w-10/12 bg-white/20"}),e.jsx(ce,{className:"h-3.5 w-8/12 bg-white/15"})]}),fallback:e.jsxs("div",{className:"space-y-2 pt-1",children:[e.jsx(ce,{className:"h-3.5 w-11/12 bg-white/25"}),e.jsx(ce,{className:"h-3.5 w-10/12 bg-white/20"}),e.jsx(ce,{className:"h-3.5 w-8/12 bg-white/15"})]}),children:e.jsx("div",{children:e.jsx("div",{"aria-live":"polite","aria-atomic":"true",className:"text-[#F1E4FF] text-sm leading-relaxed [&_p]:m-0 [&_strong]:font-semibold",children:e.jsx(co,{children:o||`${c} students (${x}%) are at high risk of falling behind`})})})})]})]})}),e.jsxs("div",{className:"grid grid-cols-2 xl:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"bg-card rounded-xl p-4 border border-border shadow-sm",children:[e.jsx("p",{className:"text-xs text-muted-foreground font-body mb-1",children:"Total Students"}),e.jsx("p",{className:"text-2xl font-display font-bold text-foreground",children:l})]}),e.jsxs("div",{className:"bg-card rounded-xl p-4 border border-border shadow-sm",children:[e.jsx("p",{className:"text-xs text-muted-foreground font-body mb-1",children:"Class Average"}),e.jsxs("p",{className:"text-2xl font-display font-bold text-[#9956DE]",children:[d,"%"]})]}),e.jsxs("div",{className:"bg-card rounded-xl p-4 border border-border shadow-sm",children:[e.jsx("p",{className:"text-xs text-muted-foreground font-body mb-1",children:"Engagement Rate"}),e.jsxs("p",{className:"text-2xl font-display font-bold text-[#75D06A]",children:[N,"%"]})]}),e.jsxs("div",{className:"bg-card rounded-xl p-4 border border-[#FF8B8B]/35 shadow-sm",children:[e.jsx("p",{className:"text-xs text-muted-foreground font-body mb-1",children:"At Risk"}),e.jsx("p",{className:"text-2xl font-display font-bold text-[#FF8B8B]",children:c})]})]}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"xl:col-span-2 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-xl font-display font-bold text-foreground",children:"My Classes"}),e.jsxs("button",{onClick:r,className:"text-sm font-bold text-[#9956DE] hover:text-[#9956DE] flex items-center gap-1 group",children:["View All",e.jsx(Ht,{size:16,className:"group-hover:translate-x-1 transition-transform"})]})]}),e.jsx("div",{className:"space-y-4",children:t.map(m=>e.jsxs(Ie.div,{whileHover:{scale:1.01},className:"bg-card border border-border rounded-2xl p-6 shadow-sm hover:shadow-md transition-all cursor-pointer",onClick:()=>a(m),children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("h3",{className:"text-lg font-display font-bold text-foreground",children:m.name}),e.jsx("span",{className:`px-3 py-1 rounded-lg text-xs font-bold border ${ba(m.riskLevel)}`,children:m.riskLevel==="high"?"High Risk":m.riskLevel==="medium"?"Medium Risk":"Low Risk"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(mo,{size:14}),e.jsx("span",{children:m.schedule})]}),e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:[m.gradeLevel,m.classification,m.strand].filter(Boolean).map(f=>e.jsx("span",{className:"px-2 py-0.5 rounded-md bg-[#9956DE]/12 border border-[#9956DE]/30 text-[#9956DE] text-[11px] font-semibold",children:f},`${m.id}-${f}`))}),e.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Manager: ",m.managerName||m.classMetadata?.managerName||"Not assigned"]})]}),e.jsx(Ve,{className:"bg-[#9956DE] hover:bg-[#7A44B3] text-white font-bold px-6 py-2 rounded-xl",children:"View Class"})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Total Students"}),e.jsx("p",{className:"text-xl font-bold text-foreground",children:m.studentCount})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"At Risk"}),e.jsx("p",{className:"text-xl font-bold text-[#FF8B8B]",children:m.atRiskCount})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Avg Score"}),e.jsxs("p",{className:"text-xl font-bold text-[#9956DE]",children:[m.avgScore,"%"]})]})]})]},m.id))})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-10 h-10 bg-[#F08386]/20 rounded-xl flex items-center justify-center",children:e.jsx(er,{size:20,className:"text-[#F08386]"})}),e.jsx("h2",{className:"text-xl font-display font-bold text-foreground",children:"Live Classroom Pulse"})]}),e.jsxs("div",{className:"bg-card rounded-2xl p-5 shadow-sm border border-border space-y-3 max-h-[600px] overflow-y-auto",children:[s.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"No live classroom events yet. Activity appears here in real time."}),s.map(m=>e.jsxs("div",{onClick:()=>n?.(m.student),className:`p-4 rounded-xl border-l-4 cursor-pointer hover:shadow-md transition-shadow ${m.type==="success"?"bg-[#75D06A]/14 border-[#75D06A]":m.type==="warning"?"bg-[#F08386]/12 border-[#F08386]":"bg-[#9956DE]/12 border-[#9956DE]"}`,children:[e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsx("p",{className:"font-bold text-foreground text-sm",children:m.student}),e.jsx("span",{className:"text-xs text-slate-500",children:m.time})]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[m.action," ",e.jsx("span",{className:"font-bold text-foreground",children:m.topic})]})]},m.id))]})]})]})]})},lu=re.memo(({student:t,onViewStudent:s})=>e.jsxs(Ie.div,{whileHover:{scale:1.02},onClick:()=>s(t),className:`p-4 rounded-2xl border-2 cursor-pointer hover:shadow-md transition-all ${xu(t.riskLevel)}`,children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("img",{src:t.avatar,alt:t.name,className:"w-12 h-12 rounded-xl object-cover border-2 border-current"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h4",{className:"font-bold text-foreground",children:t.name}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t.lastActive})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-xs font-bold text-muted-foreground",children:"Avg Score"}),e.jsxs("span",{className:"text-xs font-bold text-foreground",children:[t.avgScore,"%"]})]}),e.jsx("div",{className:"h-2 bg-card rounded-full overflow-hidden e-w",style:{"--w":`${t.avgScore}%`},children:e.jsx("div",{className:`h-full rounded-full ${t.riskLevel==="high"?"bg-[#FF8B8B]":t.riskLevel==="medium"?"bg-[#F08386]":"bg-[#75D06A]"}`})})]})]})),cu=({selectedClass:t,students:s,riskDistribution:a,topicPerformance:r,onViewStudent:n,onBack:o,teacherOptions:i,managerUpdating:l,onAssignManager:c})=>{const[d,x]=b.useState(""),[N,m]=b.useState("");b.useEffect(()=>{m(t.classMetadata?.managerId||t.managerId||"")},[t]);const f=b.useMemo(()=>{const p=d.trim().toLowerCase();return p?s.filter(z=>z.name.toLowerCase().includes(p)||(z.lrn||"").toLowerCase().includes(p)||(z.weakestTopic||"").toLowerCase().includes(p)):s},[d,s]),w=b.useMemo(()=>{if(s.length===0)return 0;const p=s.reduce((z,g)=>z+(g.assignmentCompletion||0),0);return Math.round(p/s.length)},[s]),T=b.useMemo(()=>{if(s.length===0)return 0;const p=s.reduce((g,S)=>g+(S.attendance||0),0)/s.length,z=s.reduce((g,S)=>g+(S.engagementScore||0),0)/s.length;return Math.round(p*.6+z*.4)},[s]),j=b.useMemo(()=>[...s].sort((p,z)=>z.avgScore-p.avgScore).slice(0,5),[s]),h=b.useMemo(()=>[...s].filter(p=>p.riskLevel==="high"||p.avgScore<70||p.assignmentCompletion<65).sort((p,z)=>{if(p.riskLevel!==z.riskLevel){const g={high:3,medium:2,low:1};return g[z.riskLevel]-g[p.riskLevel]}return p.avgScore-z.avgScore}).slice(0,6),[s]),y=b.useMemo(()=>i.find(p=>p.uid===N),[i,N]),k=()=>{if(!y){ue.error("Select a teacher manager first.");return}c(y)},D=[t.classMetadata?.gradeLevel||t.gradeLevel,t.classMetadata?.classification||t.classification,t.classMetadata?.strand||t.strand].filter(Boolean);return e.jsxs(Ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"p-6",children:[e.jsxs("button",{onClick:o,className:"flex items-center gap-2 text-muted-foreground hover:text-[#9956DE] font-bold mb-6 transition-colors group",children:[e.jsx(Bt,{size:20,className:"group-hover:-translate-x-1 transition-transform"}),"Back to Dashboard"]}),e.jsx("div",{className:"bg-card rounded-2xl border border-border p-5 shadow-sm mb-6",children:e.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-2xl font-display font-bold text-foreground",children:t.name}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:`px-3 py-1 rounded-lg text-xs font-bold border ${ba(t.riskLevel)}`,children:t.riskLevel==="high"?"High Risk Cohort":t.riskLevel==="medium"?"Medium Risk Cohort":"Low Risk Cohort"}),D.map(p=>e.jsx("span",{className:"px-3 py-1 rounded-lg text-xs font-semibold border bg-[#9956DE]/12 border-[#9956DE]/30 text-[#9956DE]",children:p},p))]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Manager: ",t.classMetadata?.managerName||t.managerName||"Not assigned"]})]}),e.jsxs("div",{className:"min-w-[260px] bg-muted rounded-xl p-3 border border-border",children:[e.jsx("p",{className:"text-xs font-semibold text-muted-foreground mb-2 uppercase tracking-wide",children:"Section Manager"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("select",{id:"analytics-section-manager-select",name:"analytics-section-manager-select","aria-label":"Select section manager",value:N||"",onChange:p=>m(p.target.value),className:"h-10 flex-1 rounded-lg border border-border bg-card px-3 text-sm focus:outline-none focus:ring-2 focus:ring-[#9956DE]/40 transition-colors",children:[e.jsx("option",{value:"",children:"Select teacher"}),i.map(p=>e.jsxs("option",{value:p.uid,children:[p.name," (",p.email,")"]},p.uid))]}),e.jsx(Ve,{onClick:k,disabled:!N||l,className:"bg-[#9956DE] hover:bg-[#7A44B3] text-white",children:l?e.jsx(ce,{className:"h-4 w-12 bg-white/35"}):"Assign"})]})]})]})}),e.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[e.jsxs("div",{className:"bg-card border border-border rounded-xl p-4 shadow-sm",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Class Average"}),e.jsxs("p",{className:"text-2xl font-display font-bold text-[#9956DE]",children:[t.avgScore,"%"]})]}),e.jsxs("div",{className:"bg-card border border-border rounded-xl p-4 shadow-sm",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Completion Rate"}),e.jsxs("p",{className:"text-2xl font-display font-bold text-[#75D06A]",children:[w,"%"]})]}),e.jsxs("div",{className:"bg-card border border-border rounded-xl p-4 shadow-sm",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Participation"}),e.jsxs("p",{className:"text-2xl font-display font-bold text-[#9956DE]",children:[T,"%"]})]}),e.jsxs("div",{className:"bg-card border border-[#FF8B8B]/35 rounded-xl p-4 shadow-sm",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Needs Attention"}),e.jsx("p",{className:"text-2xl font-display font-bold text-[#FF8B8B]",children:h.length})]})]}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-5 gap-6",children:[e.jsxs("div",{className:"xl:col-span-2 bg-card rounded-2xl p-6 shadow-sm border border-border",children:[e.jsxs("div",{className:"flex items-center justify-between mb-5",children:[e.jsxs("h2",{className:"text-lg font-display font-bold text-foreground",children:["Students (",f.length,")"]}),e.jsxs("div",{className:"relative",children:[e.jsx(ha,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-400",size:16}),e.jsx(pt,{id:"analytics-student-search",name:"analytics-student-search","aria-label":"Search students",type:"text",placeholder:"Search...",value:d,onChange:p=>x(p.target.value),className:"w-40 pl-9 pr-4 py-2 rounded-xl border-border text-sm"})]})]}),f.length===0?e.jsx("div",{className:"border border-dashed border-border rounded-xl p-4 text-sm text-muted-foreground",children:"No students match your search."}):e.jsx(qc,{style:{height:"700px"},data:f,itemContent:(p,z)=>e.jsx(lu,{student:z,onViewStudent:n}),computeItemKey:(p,z)=>ps(z)})]}),e.jsxs("div",{className:"xl:col-span-3 space-y-6",children:[e.jsxs("div",{className:"bg-card rounded-2xl p-6 shadow-sm border border-border",children:[e.jsx("h2",{className:"text-lg font-display font-bold text-foreground mb-5",children:"Risk Distribution"}),e.jsx(Vr,{width:"100%",height:250,children:e.jsxs(Wr,{data:a,children:[e.jsx(qr,{strokeDasharray:"3 3",stroke:"#e5e7eb"}),e.jsx(Yr,{dataKey:"name",tick:{fontSize:12}}),e.jsx(Kr,{tick:{fontSize:12}}),e.jsx(Xr,{}),e.jsx(Jr,{dataKey:"value",radius:[8,8,0,0],children:a.map((p,z)=>e.jsx(Tl,{fill:p.color},`cell-${z}`))})]})})]}),e.jsxs("div",{className:"bg-card rounded-2xl p-6 shadow-sm border border-border",children:[e.jsx("h2",{className:"text-lg font-display font-bold text-foreground mb-5",children:"Topic Performance"}),e.jsx(Vr,{width:"100%",height:250,children:e.jsxs(Wr,{data:r,children:[e.jsx(qr,{strokeDasharray:"3 3",stroke:"var(--border)"}),e.jsx(Yr,{dataKey:"topic",tick:{fontSize:12}}),e.jsx(Kr,{tick:{fontSize:12},domain:[0,100]}),e.jsx(Xr,{}),e.jsx(Jr,{dataKey:"score",fill:"#9956DE",radius:[8,8,0,0]})]})})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-card border border-border rounded-2xl p-4",children:[e.jsx("h3",{className:"text-sm font-display font-bold text-foreground mb-3",children:"Top Performers"}),e.jsxs("div",{className:"space-y-2",children:[j.slice(0,4).map(p=>e.jsxs("button",{onClick:()=>n(p),className:"w-full flex items-center justify-between rounded-lg border border-border px-3 py-2 hover:bg-[#9956DE]/12 transition-colors",children:[e.jsx("span",{className:"text-sm font-semibold text-foreground",children:p.name}),e.jsxs("span",{className:"text-xs font-bold text-[#75D06A]",children:[p.avgScore,"%"]})]},`top-${ps(p)}`)),j.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"No students available yet."})]})]}),e.jsxs("div",{className:"bg-card border border-border rounded-2xl p-4",children:[e.jsx("h3",{className:"text-sm font-display font-bold text-foreground mb-3",children:"Students Needing Attention"}),e.jsxs("div",{className:"space-y-2",children:[h.slice(0,4).map(p=>e.jsxs("button",{onClick:()=>n(p),className:"w-full flex items-center justify-between rounded-lg border border-[#FF8B8B]/35 bg-[#FF8B8B]/14 px-3 py-2 hover:bg-[#FF8B8B]/20 transition-colors",children:[e.jsx("span",{className:"text-sm font-semibold text-foreground",children:p.name}),e.jsx("span",{className:"text-xs font-bold text-[#FF8B8B]",children:p.riskLevel.toUpperCase()})]},`attention-${ps(p)}`)),h.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"No urgent students in this class right now."})]})]})]})]})]})]})},du=({student:t,teacherId:s,teacherName:a,onStudentUpdated:r,onBack:n,initialCache:o,onCacheUpdate:i})=>{const l=(t.riskLevel||"low").toLowerCase(),c=l==="high"||l==="medium",d=c?{card:"bg-[#FF8B8B]/14 border-[#FF8B8B]/35",icon:"bg-red-600",bullet:"text-[#FF8B8B]"}:{card:"bg-[#9956DE]/12 border-[#9956DE]/30",icon:"bg-[#9956DE]",bullet:"text-[#9956DE]"},x=b.useMemo(()=>We.getImportGroundedRolloutFlags(),[]),[N,m]=b.useState(o?.learningPath||""),[f,w]=b.useState(!0),[T,j]=b.useState(o?.gradeDraft||t.grade||"Grade 11"),[h,y]=b.useState(o?.sectionDraft||t.section||"Section A"),[k,D]=b.useState(!1),[p,z]=b.useState(o?.lessonPlan??null),[g,S]=b.useState([]),[I,B]=b.useState(""),[P,J]=b.useState(!1),[ne,X]=b.useState(""),[te,se]=b.useState("all"),[$,Y]=b.useState("all"),[E,U]=b.useState(!1),[W,ge]=b.useState(!1),[L,C]=b.useState(null),[G,F]=b.useState(!1),[ie,R]=b.useState(!1),[H,q]=b.useState(0);b.useEffect(()=>{j(t.grade||"Grade 11"),y(t.section||"Section A")},[t.grade,t.section]),b.useEffect(()=>{i?.(t.id,{lessonPlan:p,learningPath:N,gradeDraft:T,sectionDraft:h})},[p,N,T,h,t.id,i]),b.useEffect(()=>{(async()=>{w(!0);try{let _="";try{_=await _i(t.struggles.length>0?t.struggles:[t.weakestTopic],"general_math"),B(_)}catch{B("")}const le=await We.getLearningPath({weaknesses:t.struggles.length>0?t.struggles:[t.weakestTopic],gradeLevel:"High School",subject:"general_math"}),de=_?`${le.learningPath} +`);navigator.clipboard.writeText(u),_(!0),setTimeout(()=>_(!1),2e3)},vi=()=>{if(!V)return;const u=new Blob([JSON.stringify(V,null,2)],{type:"application/json"}),M=URL.createObjectURL(u),A=document.createElement("a");A.href=M,A.download=`quiz_${N.replace(/\s/g,"_")}_${Date.now()}.json`,A.click(),URL.revokeObjectURL(M)};T.length>0||Object.values(ya).flat().length>0;const Dr=(u,M)=>{const A=M?.gradeLevel||N,fe=M?.topics||T,$e=u.questions.map((Le,Nt)=>({id:`q_${Date.now()}_${Nt}`,questionType:Le.questionType||"identification",question:Le.question,...Le.options?{options:Le.options}:{},correctAnswer:Le.correctAnswer,bloomLevel:Le.bloomLevel||"understand",difficulty:Le.difficulty||"medium",topic:Le.topic,subject:A,points:Le.points,explanation:Le.explanation}));return{title:`${A} Quiz – ${fe.length>0?fe.slice(0,2).join(", "):"Mixed Topics"}`,gradeLevel:A,questions:$e,totalPoints:u.totalPoints,metadata:{topicsCovered:Object.keys(u.metadata.topicsCovered),difficultyBreakdown:{easy:u.metadata.difficultyBreakdown.easy??0,medium:u.metadata.difficultyBreakdown.medium??0,hard:u.metadata.difficultyBreakdown.hard??0},bloomDistribution:u.metadata.bloomTaxonomyDistribution,questionTypeBreakdown:u.metadata.questionTypeBreakdown,supplementalPurpose:u.metadata.supplementalPurpose,recommendedTeacherActions:u.metadata.recommendedTeacherActions??[],generatedAt:new Date().toISOString(),generatedBy:"teacher_generated"},status:"draft",source:"teacher_generated"}},zr=b.useCallback(u=>{Ss(M=>[u,...M.filter(A=>A.id!==u.id)])},[]);async function Fr(u,M){if(!n)return null;const A=Dr(u,M),fe=await Hr(A,n.uid,Be?{documentId:Be}:void 0);return ke(fe),zr({id:fe,...A,teacherId:n.uid}),fe}const Ni=async()=>{if(!V){ue.error("No quiz to save. Generate a quiz first.");return}if(!n){ue.error("You must be signed in to save quizzes.");return}me(!0);try{const u=Dr(V),M=await Hr(u,n.uid,Be?{documentId:Be}:void 0);ke(M),zr({id:M,...u,teacherId:n.uid}),ue.success("Quiz saved to your library!")}catch(u){ue.error(u instanceof Error?u.message:"Failed to save quiz")}finally{me(!1)}},ji=async()=>{if(Be){dt(!0);try{await Zi(Be),Ss(u=>u.map(M=>M.id===Be?{...M,status:"published"}:M)),ue.success("Quiz published to Quiz Bank!")}catch(u){ue.error(u instanceof Error?u.message:"Failed to publish quiz")}finally{dt(!1)}}},Ca=async u=>{const M=u??Be;if(!M){ue.error("Save the quiz first before assigning.");return}if(Tr(M),ws(!0),Sr(null),wr(""),jr.length===0&&n){yr(!0);try{const A=await pr(n.uid);ii(A)}catch{ue.error("Failed to load students")}finally{yr(!1)}}},yi=async()=>{const u=mi??Be;if(!(!Yt||!u||!n)){Nr(!0);try{await el(u,Yt,n.uid),Ss(M=>M.map(A=>A.id===u?{...A,status:"assigned",metadata:{...A.metadata,assignedTo:Yt}}:A)),ue.success("Quiz assigned to student!"),ws(!1),Tr(null),l==="bank"&&Ta()}catch(M){ue.error(M instanceof Error?M.message:"Failed to assign quiz")}finally{Nr(!1)}}},Ta=b.useCallback(async()=>{if(n){Cr(!0);try{const u=await Ki(n.uid);Ss(u)}catch{ue.error("Failed to load quiz bank")}finally{Cr(!1)}}},[n]);b.useEffect(()=>{l==="bank"&&Ta()},[l,Ta]);const wi=async u=>{try{await Xi(u),Ss(M=>M.filter(A=>A.id!==u)),ue.success("Quiz deleted")}catch{ue.error("Failed to delete quiz")}},Br=jr.filter(u=>u.name.toLowerCase().includes(Na.toLowerCase())||u.email.toLowerCase().includes(Na.toLowerCase())),$r=ja==="all"?kr:kr.filter(u=>u.status===ja),Si=u=>{const M=(u.metadata.topicsCovered||[]).reduce((A,fe)=>(A[fe]=(A[fe]||0)+1,A),{});return{questions:u.questions.map(A=>({questionType:A.questionType,question:A.question,correctAnswer:A.correctAnswer,options:A.options??null,bloomLevel:A.bloomLevel,difficulty:A.difficulty,topic:A.topic,points:A.points,explanation:A.explanation})),totalPoints:u.totalPoints,metadata:{topicsCovered:M,difficultyBreakdown:u.metadata.difficultyBreakdown,bloomTaxonomyDistribution:u.metadata.bloomDistribution,questionTypeBreakdown:u.metadata.questionTypeBreakdown,gradeLevel:u.gradeLevel,totalQuestions:u.questions.length,includesGraphQuestions:!1,supplementalPurpose:u.metadata.supplementalPurpose,bloomTaxonomyRationale:"Loaded from saved quiz bank entry.",recommendedTeacherActions:u.metadata.recommendedTeacherActions||[]}}},Ia=u=>{ke(u.id),pe(Si(u)),ye(null),Ks(u.id),ht("all"),Dt("all"),Oe(null),x("results"),c("create")},ki={remember:"bg-sky-100 text-sky-700 border-sky-300",understand:"bg-rose-100 text-rose-700 border-rose-300",apply:"bg-emerald-100 text-emerald-700 border-emerald-300",analyze:"bg-rose-100 text-rose-700 border-rose-300"},Ci=(u,M,A)=>{const fe=be===M,$e=ki[u.bloomLevel]||"bg-[#edf1f7] text-[#5a6578] border-[#dde3eb]";return e.jsxs(Ie.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:M*.05},className:"border border-[#dde3eb] rounded-xl overflow-hidden relative",children:[e.jsx("div",{className:`absolute top-2 right-2 text-[10px] font-bold uppercase px-2 py-0.5 rounded border ${$e} z-10`,children:u.bloomLevel}),e.jsx("div",{className:"p-4 cursor-pointer hover:bg-[#edf1f7] transition-colors",onClick:()=>Oe(fe?null:M),children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2 flex-wrap",children:[e.jsxs("span",{className:"text-xs font-bold text-white bg-sky-600 px-2 py-0.5 rounded",children:["Q",M+1]}),e.jsx("span",{className:`text-xs font-medium px-2 py-0.5 rounded border ${za[u.bloomLevel]?.color||"bg-[#edf1f7] text-[#5a6578]"}`,children:u.bloomLevel}),e.jsx("span",{className:`text-xs font-medium ${In[u.difficulty]||"text-[#5a6578]"}`,children:u.difficulty}),e.jsxs("span",{className:"text-xs text-slate-500",children:[u.points," pts"]}),e.jsx("span",{className:"text-xs bg-[#edf1f7] text-[#5a6578] px-2 py-0.5 rounded",children:u.topic})]}),e.jsx("p",{className:"text-sm text-[#0a1628] font-medium",children:u.question})]}),e.jsx("div",{className:"flex-shrink-0 mt-1",children:fe?e.jsx(da,{size:16,className:"text-slate-500"}):e.jsx(ts,{size:16,className:"text-slate-500"})})]})}),e.jsx(es,{children:fe&&e.jsx(Ie.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"border-t border-[#dde3eb] overflow-hidden",children:e.jsxs("div",{className:"p-4 space-y-3 bg-[#edf1f7]/50",children:[u.options&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold text-[#5a6578] mb-1",children:"Options:"}),e.jsx("div",{className:"space-y-1",children:u.options.map((Le,Nt)=>e.jsx("div",{className:`text-sm px-3 py-1.5 rounded-lg ${Le.includes(u.correctAnswer)?"bg-green-100 text-green-800 font-medium":"bg-white text-[#0a1628]"}`,children:Le},Nt))})]}),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-semibold text-green-700 mb-1",children:"Correct Answer:"}),e.jsx("p",{className:"text-sm text-green-800 font-medium",children:u.correctAnswer})]}),e.jsxs("div",{className:"bg-sky-50 border border-sky-200 rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-semibold text-sky-700 mb-1",children:"Explanation:"}),e.jsx("p",{className:"text-sm text-sky-800",children:u.explanation})]})]}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-slate-500",children:[e.jsxs("span",{children:["Type: ",ea[u.questionType]?.label||u.questionType]}),e.jsxs("span",{children:["Bloom: ",u.bloomLevel]})]}),u.provenance&&e.jsxs("div",{className:"bg-[#f7fbff] border border-sky-100 rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-semibold text-sky-700 mb-1",children:"Item Provenance"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-1 text-xs text-[#5a6578]",children:[u.provenance.title&&e.jsxs("p",{children:["Topic: ",u.provenance.title]}),u.provenance.topicId&&e.jsxs("p",{children:["Topic ID: ",u.provenance.topicId]}),u.provenance.materialId&&e.jsxs("p",{children:["Material ID: ",u.provenance.materialId]}),u.provenance.sourceFile&&e.jsxs("p",{children:["Source File: ",u.provenance.sourceFile]}),u.provenance.sectionId&&e.jsxs("p",{children:["Section ID: ",u.provenance.sectionId]})]})]})]})})})]},M)};return e.jsxs("div",{className:"w-full flex flex-col bg-[#f7f9fc] min-h-screen",children:[e.jsxs("div",{className:"bg-white border-b border-[#dde3eb] px-6 py-4 flex-shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("button",{onClick:ka,className:"p-2 hover:bg-[#edf1f7] rounded-lg transition-colors text-slate-500",children:e.jsx(Bt,{size:20})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-display font-bold text-[#0a1628]",children:"AI Quiz Maker"}),e.jsx("p",{className:"text-[#5a6578] text-sm mt-1",children:"Generate AI-powered assessments with Bloom's Taxonomy"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>c("create"),className:`flex items-center gap-1.5 px-4 py-2 rounded-xl text-sm font-semibold transition-colors ${l==="create"?"bg-sky-100 text-sky-700 border border-sky-300":"bg-[#edf1f7] text-[#5a6578] hover:bg-[#dde3eb]"}`,children:[e.jsx(Ol,{size:16})," Create Quiz"]}),e.jsxs("button",{onClick:()=>c("bank"),className:`flex items-center gap-1.5 px-4 py-2 rounded-xl text-sm font-semibold transition-colors ${l==="bank"?"bg-sky-100 text-sky-700 border border-sky-300":"bg-[#edf1f7] text-[#5a6578] hover:bg-[#dde3eb]"}`,children:[e.jsx(Zr,{size:16})," Quiz Bank"]})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto px-6 sm:px-8 xl:px-10 py-8",children:[l==="bank"&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:["all","draft","published","assigned","completed"].map(u=>e.jsx("button",{onClick:()=>di(u),className:`px-3 py-1.5 rounded-full text-xs font-semibold capitalize transition-colors ${ja===u?"bg-sky-100 text-sky-700 border border-sky-300":"bg-[#edf1f7] text-[#5a6578] hover:bg-[#dde3eb]"}`,children:u},u))}),ci?e.jsxs("div",{className:"flex items-center justify-center py-16",children:[e.jsx(at,{size:24,className:"animate-spin text-sky-500"}),e.jsx("span",{className:"ml-2 text-sm text-[#5a6578]",children:"Loading quiz bank…"})]}):$r.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-slate-500",children:[e.jsx(Zr,{size:40,className:"mb-3"}),e.jsx("p",{className:"font-medium",children:"No quizzes found"}),e.jsx("p",{className:"text-xs mt-1",children:"Generate your first quiz in the Create tab"})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:$r.map(u=>e.jsxs(Ie.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},onClick:()=>Ia(u),role:"button",tabIndex:0,onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),Ia(u))},className:"border border-[#dde3eb] rounded-xl p-4 hover:shadow-md transition-shadow cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-400",children:[e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsx("h4",{className:"text-sm font-bold text-[#0a1628] leading-tight",children:u.title}),e.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-full capitalize ${Ad[u.status]}`,children:u.status})]}),e.jsx("div",{className:"flex flex-wrap gap-1 mb-3",children:u.metadata.topicsCovered.slice(0,3).map(M=>e.jsx("span",{className:"text-[10px] bg-[#edf1f7] text-[#5a6578] px-2 py-0.5 rounded",children:M},M))}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-[#5a6578] mb-3",children:[e.jsxs("span",{children:[u.questions.length," questions"]}),e.jsxs("span",{children:[u.totalPoints," pts"]}),e.jsx("span",{children:u.gradeLevel})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:M=>{M.stopPropagation(),Ia(u)},className:"flex items-center gap-1 px-3 py-1.5 text-xs font-semibold bg-[#edf1f7] text-[#5a6578] rounded-lg hover:bg-[#dde3eb] transition-colors",children:[e.jsx(tl,{size:12})," View"]}),e.jsxs("button",{onClick:M=>{M.stopPropagation(),Ca(u.id)},className:"flex items-center gap-1 px-3 py-1.5 text-xs font-semibold bg-sky-50 text-sky-700 rounded-lg hover:bg-sky-100 transition-colors",children:[e.jsx(Ls,{size:12})," Assign"]}),e.jsxs("button",{onClick:M=>{M.stopPropagation(),wi(u.id)},className:"flex items-center gap-1 px-3 py-1.5 text-xs font-semibold bg-red-50 text-red-600 rounded-lg hover:bg-red-100 transition-colors",children:[e.jsx(ao,{size:12})," Delete"]})]})]},u.id))})]}),l==="create"&&e.jsxs(e.Fragment,{children:[De&&e.jsxs(Ie.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"mb-4 bg-red-50 border border-red-200 rounded-xl p-4 flex items-start gap-3",children:[e.jsx(ro,{size:18,className:"text-red-500 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-red-800 font-medium",children:"Error"}),e.jsx("p",{className:"text-sm text-red-600",children:De})]}),e.jsx("button",{onClick:()=>Ge(""),className:"ml-auto",children:e.jsx(ca,{size:14,className:"text-red-400"})})]}),W&&e.jsxs(Ie.div,{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},className:"mb-4 bg-white border border-sky-200 rounded-xl p-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3 mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(at,{size:16,className:"animate-spin text-sky-600"}),e.jsx("p",{className:"text-sm font-semibold text-[#0a1628]",children:"Generating Quiz in Background"})]}),e.jsxs("span",{className:"text-xs font-bold text-sky-700",children:[ie,"%"]})]}),e.jsx("div",{className:"h-2 bg-[#edf1f7] rounded-full overflow-hidden",children:e.jsx(Ie.div,{animate:{width:`${ie}%`},transition:{duration:.35,ease:"easeOut"},className:"h-full bg-gradient-to-r from-sky-600 to-cyan-500"})}),e.jsxs("p",{className:"mt-2 text-xs text-[#5a6578] capitalize",children:["Stage: ",H.replace(/_/g," ")]}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:ae}),G&&e.jsxs("p",{className:"text-[11px] text-[#7b8798] mt-1",children:["Task ID: ",G]})]}),!W&&d!=="results"&&e.jsx("div",{className:"flex bg-white rounded-xl border border-[#dde3eb] mb-6 overflow-hidden shadow-sm",children:[{id:"setup",label:"Setup"},{id:"topics",label:"Topics"},{id:"style",label:"Question style"},{id:"preview",label:"Preview"}].map((u,M)=>{const fe=["setup","topics","style","preview"].indexOf(d),$e=fe>M,Le=fe===M;return e.jsxs("div",{className:`flex-1 flex items-center justify-center py-3 border-r last:border-r-0 border-[#dde3eb] ${Le?"bg-purple-50":"bg-white"}`,children:[$e?e.jsx("div",{className:"w-5 h-5 rounded-full bg-green-500 text-white flex items-center justify-center mr-2",children:e.jsx(xs,{size:12,strokeWidth:3})}):e.jsx("div",{className:`w-5 h-5 rounded-full flex items-center justify-center text-xs font-bold mr-2 ${Le?"bg-[#9b51e0] text-white":"bg-[#edf1f7] text-slate-500"}`,children:M+1}),e.jsx("span",{className:`text-sm font-semibold ${Le?"text-[#9b51e0]":$e?"text-slate-700":"text-slate-400"}`,children:u.label})]},u.id)})}),d==="setup"&&!W&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"bg-purple-50 border border-purple-200 rounded-xl p-4 flex items-start gap-3",children:[e.jsx(Ha,{size:18,className:"text-[#9b51e0] flex-shrink-0 mt-0.5"}),e.jsx("div",{children:e.jsxs("p",{className:"text-sm text-purple-800",children:["This quiz maker generates ",e.jsx("span",{className:"font-bold",children:"supplemental assessments"})," to support classroom instruction. Questions follow Bloom's Taxonomy for comprehensive skill evaluation. Generation limit: up to ",Rs," questions and ",ds," topics per quiz."]})})]}),e.jsxs("div",{className:"bg-white border border-[#dde3eb] rounded-xl overflow-hidden shadow-sm",children:[e.jsx("div",{className:"px-5 py-4 border-b border-[#dde3eb]",children:e.jsx("p",{className:"text-xs font-bold text-slate-400 uppercase tracking-wider",children:"BASIC SETTINGS"})}),e.jsxs("div",{className:"p-5 grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"quiz-grade-level",className:"text-sm font-semibold text-[#0a1628] mb-2 block",children:"Grade level"}),e.jsx("select",{id:"quiz-grade-level",value:N,onChange:u=>m(Fa(u.target.value)),className:"w-full bg-white text-[#0a1628] rounded-lg px-4 py-3 text-sm outline-none border border-[#dde3eb] focus:ring-2 focus:ring-purple-500",children:Ld.map(u=>e.jsx("option",{value:u,children:u},u))})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"quiz-num-questions",className:"text-sm font-semibold text-[#0a1628] mb-2 block",children:"Number of questions"}),e.jsxs("div",{className:"flex items-center",children:[e.jsx("button",{onClick:()=>w(Math.max(1,f-1)),className:"w-12 h-12 border border-[#dde3eb] rounded-l-lg flex items-center justify-center hover:bg-[#edf1f7] text-[#edf1f7] transition-colors bg-white font-bold text-xl",children:e.jsx("span",{className:"text-[#dde3eb]",children:"-"})}),e.jsx("input",{id:"quiz-num-questions",type:"number",min:1,max:Rs,value:f,onChange:u=>w(Math.min(Rs,Math.max(1,parseInt(u.target.value)||1))),className:"flex-1 h-12 text-center border-y border-[#dde3eb] px-3 text-base font-bold focus:outline-none bg-white text-[#0a1628]"}),e.jsx("button",{onClick:()=>w(Math.min(Rs,f+1)),className:"w-12 h-12 border border-[#dde3eb] rounded-r-lg flex items-center justify-center hover:bg-[#edf1f7] text-[#edf1f7] transition-colors bg-white font-bold text-xl",children:e.jsx("span",{className:"text-[#dde3eb]",children:"+"})})]})]})]})]})]}),d==="topics"&&!W&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-bold text-[#0a1628]",children:"Select topics"}),e.jsxs("p",{className:"text-sm text-[#5a6578]",children:["Choose up to ",ds," topics across all strands"]})]}),e.jsxs("div",{className:"bg-purple-50 text-[#9b51e0] px-3 py-1 rounded-full text-sm font-bold",children:[T.filter(u=>!h.includes(u)).length," of ",ds," selected"]})]}),ne?e.jsxs("div",{className:"flex items-center justify-center py-10 text-sm text-[#5a6578]",children:[e.jsx(at,{size:24,className:"animate-spin text-[#9b51e0] mr-2"})," Loading topics..."]}):e.jsx("div",{className:"space-y-3",children:Object.entries(ya).map(([u,M])=>{const A=M.filter($e=>T.includes($e)&&!h.includes($e)).length,fe=de===u;return e.jsxs("div",{className:"border border-[#dde3eb] rounded-xl bg-white overflow-hidden shadow-sm",children:[e.jsxs("button",{onClick:()=>Fe(fe?null:u),className:"w-full flex items-center justify-between p-4 hover:bg-[#f7f9fc] transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-1 h-6 bg-[#9b51e0] rounded-full"}),e.jsxs("div",{className:"text-left",children:[e.jsx("p",{className:"font-bold text-[#0a1628] text-sm",children:u}),e.jsxs("p",{className:"text-xs text-slate-500",children:[M.length," topics"]})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"bg-purple-100 text-[#9b51e0] px-2.5 py-0.5 rounded-full text-xs font-semibold",children:[A," selected"]}),fe?e.jsx(da,{size:18,className:"text-slate-400"}):e.jsx(ts,{size:18,className:"text-slate-400"})]})]}),e.jsx(es,{children:fe&&e.jsx(Ie.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},className:"overflow-hidden border-t border-[#edf1f7]",children:e.jsx("div",{className:"py-2",children:M.map(($e,Le)=>{const Nt=T.includes($e),Xs=h.includes($e),st=Nt&&!Xs;let jt="Core";return Le%3===0&&(jt="Foundation"),Le%3===2&&(jt="Advanced"),e.jsxs("div",{className:"flex items-center justify-between px-6 py-3 hover:bg-[#f7f9fc]",children:[e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer flex-1",children:[e.jsx("div",{className:`w-5 h-5 rounded flex items-center justify-center transition-colors ${st?"bg-[#9b51e0] border-[#9b51e0]":"border-2 border-[#dde3eb] bg-white"}`,children:st&&e.jsx(xs,{size:14,className:"text-white"})}),e.jsx("input",{type:"checkbox",className:"hidden",checked:st,onChange:()=>ui($e)}),e.jsx("span",{className:`text-sm font-semibold ${st?"text-[#0a1628]":"text-[#5a6578]"}`,children:$e})]}),e.jsx("span",{className:`border px-3 py-1 rounded-full text-[10px] uppercase font-bold tracking-wider ${jt==="Advanced"?"bg-white text-slate-400 border-[#dde3eb]":"bg-purple-50 text-[#9b51e0] border-purple-100"}`,children:jt})]},$e)})})})})]},u)})})]}),d==="style"&&!W&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"bg-white border border-[#dde3eb] rounded-xl overflow-hidden shadow-sm",children:[e.jsx("div",{className:"px-5 py-4 border-b border-[#dde3eb]",children:e.jsx("p",{className:"text-xs font-bold text-slate-400 uppercase tracking-wider",children:"QUESTION TYPES"})}),e.jsx("div",{className:"p-5 grid grid-cols-1 md:grid-cols-3 gap-4",children:Object.entries(ea).map(([u,M])=>{const A=C.includes(u);return e.jsxs("button",{onClick:()=>xi(u),className:`flex flex-col items-center justify-center p-4 rounded-xl border-2 transition-all ${A?"bg-purple-50 border-purple-300":"bg-white border-[#dde3eb] hover:border-purple-200"}`,children:[e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center mb-2 ${A?"bg-purple-200 text-[#9b51e0]":"bg-[#edf1f7] text-slate-400"}`,children:M.icon}),e.jsx("span",{className:`text-sm font-semibold ${A?"text-purple-800":"text-[#5a6578]"}`,children:M.label})]},u)})})]}),e.jsxs("div",{className:"bg-white border border-[#dde3eb] rounded-xl overflow-hidden shadow-sm",children:[e.jsx("div",{className:"px-5 py-4 border-b border-[#dde3eb]",children:e.jsx("p",{className:"text-xs font-bold text-slate-400 uppercase tracking-wider",children:"BLOOM'S TAXONOMY LEVELS"})}),e.jsx("div",{className:"p-5 flex flex-wrap gap-3",children:Object.entries(za).map(([u,M])=>{const A=p.includes(u);return e.jsx("button",{onClick:()=>hi(u),className:`px-5 py-2.5 rounded-full border-2 transition-all text-sm font-semibold capitalize ${A?"bg-white text-[#9b51e0] border-purple-300":"bg-white border-[#dde3eb] text-[#5a6578] hover:border-purple-200"}`,children:u},u)})})]}),e.jsxs("div",{className:"bg-white border border-[#dde3eb] rounded-xl overflow-hidden shadow-sm",children:[e.jsx("div",{className:"px-5 py-4 border-b border-[#dde3eb]",children:e.jsx("p",{className:"text-xs font-bold text-slate-400 uppercase tracking-wider",children:"DIFFICULTY DISTRIBUTION"})}),e.jsx("div",{className:"p-5 space-y-5",children:Object.entries(I).map(([u,M])=>{const fe={easy:"bg-[#55b963]",medium:"bg-[#faa541]",hard:"bg-[#f47a75]"}[u];return e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("span",{className:"text-sm font-semibold w-16 capitalize text-[#5a6578]",children:u}),e.jsx("div",{className:"flex-1 h-2 bg-[#edf1f7] rounded-full overflow-hidden",children:e.jsx(Ie.div,{animate:{width:`${M}%`},className:`h-full rounded-full ${fe}`})}),e.jsxs("div",{className:"flex items-center gap-1 w-20 justify-end",children:[e.jsx("button",{onClick:()=>Lr(u,-5),className:"w-6 h-6 rounded border border-[#dde3eb] flex items-center justify-center hover:bg-[#edf1f7] text-slate-500",children:e.jsx(fl,{size:10})}),e.jsxs("span",{className:"text-sm font-bold w-10 text-center text-slate-500",children:[M,"%"]}),e.jsx("button",{onClick:()=>Lr(u,5),className:"w-6 h-6 rounded border border-[#dde3eb] flex items-center justify-center hover:bg-[#edf1f7] text-slate-500",children:e.jsx(sa,{size:10})})]})]},u)})})]})]}),d==="preview"&&!W&&!V&&e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"bg-white border border-[#dde3eb] rounded-xl overflow-hidden shadow-sm",children:[e.jsx("div",{className:"px-5 py-4 border-b border-[#dde3eb]",children:e.jsx("p",{className:"text-xs font-bold text-slate-400 uppercase tracking-wider",children:"QUIZ SUMMARY"})}),e.jsxs("div",{className:"p-5",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-6",children:[e.jsxs("div",{className:"bg-purple-50 rounded-xl p-6 text-center border border-purple-100",children:[e.jsx("p",{className:"text-3xl font-bold text-purple-800 mb-1",children:f}),e.jsx("p",{className:"text-sm text-purple-600 font-medium",children:"questions"})]}),e.jsxs("div",{className:"bg-purple-50 rounded-xl p-6 text-center border border-purple-100",children:[e.jsx("p",{className:"text-3xl font-bold text-purple-800 mb-1",children:T.filter(u=>!h.includes(u)).length}),e.jsx("p",{className:"text-sm text-purple-600 font-medium",children:"topics"})]}),e.jsxs("div",{className:"bg-purple-50 rounded-xl p-6 text-center border border-purple-100",children:[e.jsx("p",{className:"text-3xl font-bold text-purple-800 mb-1",children:N.replace("Grade ","Gr. ")}),e.jsx("p",{className:"text-sm text-purple-600 font-medium",children:"level"})]})]}),e.jsxs("div",{className:"bg-[#f7f9fc] rounded-lg p-5 border border-[#dde3eb] text-sm text-[#5a6578] leading-relaxed",children:[C.map(u=>ea[u]?.label).join(" and ")," questions across ",T.filter(u=>!h.includes(u)).length," topics — aligned to ",p.map(u=>za[u]?.label).join(", ")," levels of Bloom's Taxonomy. Easy ",I.easy,"% · Medium ",I.medium,"% · Hard ",I.hard,"%."]})]})]})}),d==="results"&&V&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"bg-gradient-to-br from-sky-50 to-cyan-50 border border-sky-200 rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h3",{className:"text-lg font-bold font-display text-[#0a1628]",children:"Quiz Generated"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:bi,className:"flex items-center gap-1.5 px-3 py-1.5 bg-white border border-[#dde3eb] rounded-lg text-xs font-medium text-[#5a6578] hover:bg-[#edf1f7] transition-colors",children:[v?e.jsx(xs,{size:14,className:"text-green-500"}):e.jsx(pl,{size:14}),v?"Copied!":"Copy All"]}),e.jsxs("button",{onClick:vi,className:"flex items-center gap-1.5 px-3 py-1.5 bg-white border border-[#dde3eb] rounded-lg text-xs font-medium text-[#5a6578] hover:bg-[#edf1f7] transition-colors",children:[e.jsx(no,{size:14}),"Export JSON"]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsxs("div",{className:"bg-white rounded-xl p-3 text-center",children:[e.jsx("p",{className:"text-2xl font-bold text-sky-600",children:V.questions.length}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"Questions"})]}),e.jsxs("div",{className:"bg-white rounded-xl p-3 text-center",children:[e.jsx("p",{className:"text-2xl font-bold text-rose-600",children:V.totalPoints}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"Total Points"})]}),e.jsxs("div",{className:"bg-white rounded-xl p-3 text-center",children:[e.jsx("p",{className:"text-2xl font-bold text-rose-600",children:Object.keys(V.metadata.topicsCovered).length}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"Topics"})]}),e.jsxs("div",{className:"bg-white rounded-xl p-3 text-center",children:[e.jsx("p",{className:"text-2xl font-bold text-emerald-600",children:Object.keys(V.metadata.bloomTaxonomyDistribution).length}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"Bloom Levels"})]})]}),(V.metadata.usedImportedTopics||(V.metadata.topicProvenance||[]).length>0)&&e.jsxs("div",{className:"mt-4 bg-white rounded-lg p-3 border border-[#dde3eb]",children:[e.jsx("p",{className:"text-xs font-semibold text-[#5a6578] mb-2",children:"Imported Topic Provenance"}),e.jsxs("p",{className:"text-xs text-[#5a6578] mb-2",children:["Imported topics used: ",V.metadata.usedImportedTopics?"Yes":"No"," • ","Materials: ",V.metadata.importedMaterialsCount??0," • ","Topics: ",V.metadata.importedTopicCount??0]}),(V.metadata.topicProvenance||[]).slice(0,5).map((u,M)=>e.jsxs("div",{className:"text-xs text-[#5a6578]",children:[u.title||"Untitled topic",u.sourceFile?` • ${u.sourceFile}`:""]},`${u.topicId||u.title||"topic"}_${M}`)),(Mr.length>0||Ar.length>0)&&e.jsxs("div",{className:"mt-3 grid grid-cols-1 md:grid-cols-2 gap-2",children:[e.jsxs("label",{className:"text-xs text-[#5a6578] flex flex-col gap-1",children:[e.jsx("span",{className:"font-semibold",children:"Filter by Source File"}),e.jsxs("select",{value:it,onChange:u=>ht(u.target.value),className:"bg-white border border-[#dde3eb] rounded-md px-2 py-1.5 text-xs",children:[e.jsx("option",{value:"all",children:"All sources"}),Mr.map(u=>e.jsx("option",{value:u,children:u},u))]})]}),e.jsxs("label",{className:"text-xs text-[#5a6578] flex flex-col gap-1",children:[e.jsx("span",{className:"font-semibold",children:"Filter by Material ID"}),e.jsxs("select",{value:Lt,onChange:u=>Dt(u.target.value),className:"bg-white border border-[#dde3eb] rounded-md px-2 py-1.5 text-xs",children:[e.jsx("option",{value:"all",children:"All materials"}),Ar.map(u=>e.jsx("option",{value:u,children:u},u))]})]})]}),e.jsxs("p",{className:"text-[11px] text-[#5a6578] mt-2",children:["Showing ",wa.length," of ",V.questions.length," questions after provenance filters."]})]}),e.jsxs("div",{className:"mt-4 grid grid-cols-1 md:grid-cols-3 gap-3",children:[e.jsxs("div",{className:"bg-white rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-semibold text-[#5a6578] mb-2",children:"Difficulty"}),Object.entries(V.metadata.difficultyBreakdown).map(([u,M])=>e.jsxs("div",{className:"flex justify-between text-xs",children:[e.jsx("span",{className:`capitalize ${In[u]||"text-[#5a6578]"}`,children:u}),e.jsx("span",{className:"font-medium",children:M})]},u))]}),e.jsxs("div",{className:"bg-white rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-semibold text-[#5a6578] mb-2",children:"Bloom's Taxonomy"}),Object.entries(V.metadata.bloomTaxonomyDistribution).map(([u,M])=>e.jsxs("div",{className:"flex justify-between text-xs",children:[e.jsx("span",{className:"capitalize",children:u}),e.jsx("span",{className:"font-medium",children:M})]},u))]}),e.jsxs("div",{className:"bg-white rounded-lg p-3",children:[e.jsx("p",{className:"text-xs font-semibold text-[#5a6578] mb-2",children:"Question Types"}),Object.entries(V.metadata.questionTypeBreakdown).map(([u,M])=>e.jsxs("div",{className:"flex justify-between text-xs",children:[e.jsx("span",{children:ea[u]?.label||u}),e.jsx("span",{className:"font-medium",children:M})]},u))]})]}),e.jsxs("div",{className:"mt-3 bg-sky-50 rounded-lg p-3 flex items-start gap-2",children:[e.jsx(Ha,{size:14,className:"text-sky-400 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-xs text-sky-600",children:V.metadata.supplementalPurpose})]}),V.metadata.recommendedTeacherActions&&e.jsxs("div",{className:"mt-3",children:[e.jsx("p",{className:"text-xs font-semibold text-[#5a6578] mb-1",children:"Recommended Actions:"}),e.jsx("ul",{className:"list-disc list-inside text-xs text-[#5a6578] space-y-0.5",children:V.metadata.recommendedTeacherActions.map((u,M)=>e.jsx("li",{children:u},M))})]})]}),e.jsx("div",{className:"space-y-3",children:wa.length>0?wa.map((u,M)=>Ci(u,M)):e.jsx("div",{className:"border border-[#dde3eb] rounded-xl p-4 bg-white text-sm text-[#5a6578]",children:"No questions match the selected provenance filters. Clear one or both filters to view all questions."})})]})]})]}),l==="create"&&e.jsxs("div",{className:"border-t border-[#dde3eb] px-6 sm:px-6 xl:px-10 py-4 bg-[#f7f9fc] flex items-center justify-between flex-shrink-0",children:[d==="setup"&&!W&&e.jsxs(e.Fragment,{children:[e.jsx("div",{}),e.jsxs("button",{onClick:()=>x("topics"),className:"bg-white border border-[#dde3eb] text-[#edf1f7] px-6 py-2.5 rounded-lg text-sm font-semibold transition-colors hover:text-slate-600 flex items-center",children:[e.jsx("span",{className:"text-[#edf1f7]",children:"Next: Topics"})," ",e.jsx(Ht,{size:16,className:"ml-2 text-slate-300"})]})]}),d==="topics"&&!W&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("button",{onClick:()=>{j([]),y([])},className:"text-[#9b51e0] text-sm font-semibold hover:underline",children:"Clear all"}),e.jsxs("span",{className:"text-sm text-[#9b51e0]",children:[T.filter(u=>!h.includes(u)).length," of ",ds," topics selected"]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("button",{onClick:()=>x("setup"),className:"bg-white border border-[#dde3eb] text-[#5a6578] px-5 py-2.5 rounded-lg text-sm font-semibold transition-colors hover:bg-[#edf1f7] flex items-center",children:[e.jsx(Bt,{size:16,className:"mr-2 text-slate-400"})," Back"]}),e.jsxs("button",{onClick:()=>x("style"),className:"bg-[#9b51e0] text-white px-6 py-2.5 rounded-lg text-sm font-semibold transition-colors hover:bg-purple-700 flex items-center shadow-md",children:["Next: Question style ",e.jsx(Ht,{size:16,className:"ml-2 text-purple-200"})]})]})]}),d==="style"&&!W&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>x("topics"),className:"bg-white border border-[#dde3eb] text-[#5a6578] px-5 py-2.5 rounded-lg text-sm font-semibold transition-colors hover:bg-[#edf1f7] flex items-center",children:[e.jsx(Bt,{size:16,className:"mr-2 text-slate-400"})," Back"]}),e.jsxs("button",{onClick:()=>x("preview"),className:"bg-[#9b51e0] text-white px-6 py-2.5 rounded-lg text-sm font-semibold transition-colors hover:bg-purple-700 flex items-center shadow-md",children:["Preview ",e.jsx(Ht,{size:16,className:"ml-2 text-purple-200"})]})]}),d==="preview"&&!W&&!V&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>x("style"),className:"bg-white border border-[#dde3eb] text-[#5a6578] px-5 py-2.5 rounded-lg text-sm font-semibold transition-colors hover:bg-[#edf1f7] flex items-center",children:[e.jsx(Bt,{size:16,className:"mr-2 text-slate-400"})," Back"]}),e.jsxs("button",{onClick:gi,className:"bg-[#9b51e0] text-white px-6 py-2.5 rounded-lg text-sm font-bold transition-colors hover:bg-purple-700 flex items-center shadow-md",children:[e.jsx(xs,{size:16,className:"mr-2"})," Generate quiz"]})]}),W&&e.jsx("div",{className:"w-full flex items-center justify-center",children:e.jsxs("div",{className:"flex items-center gap-3 text-slate-500 font-medium text-sm",children:[e.jsx(at,{size:16,className:"animate-spin"})," Generating quiz... Please wait."]})}),d==="results"&&(Ir?e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>{c("bank"),Ks(null)},className:"px-4 py-2.5 rounded-xl text-sm font-medium bg-white border border-[#dde3eb] text-[#5a6578] hover:bg-[#edf1f7] transition-colors",children:"Back to Quiz Bank"}),e.jsxs("button",{onClick:()=>Ca(Ir),className:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-semibold bg-sky-50 border border-sky-300 text-sky-700 hover:bg-sky-100 transition-colors",children:[e.jsx(Ls,{size:16})," Assign"]}),e.jsx("button",{onClick:ka,className:"px-5 py-2.5 rounded-xl text-sm font-bold bg-gradient-to-r from-sky-600 to-sky-500 hover:from-sky-700 hover:to-sky-600 text-white transition-all",children:"Done"})]}):e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>{x("setup"),pe(null),ye(null),ke(null),Ks(null)},className:"px-4 py-2.5 rounded-xl text-sm font-medium bg-white border border-[#dde3eb] text-[#5a6578] hover:bg-[#edf1f7] transition-colors",children:"Create Another"}),Be?e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:ji,disabled:Ze,className:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-semibold bg-green-50 border border-green-300 text-green-700 hover:bg-green-100 transition-colors",children:[Ze?e.jsx(at,{size:16,className:"animate-spin"}):e.jsx(sr,{size:16}),"Publish"]}),e.jsxs("button",{onClick:()=>Ca(),className:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-semibold bg-sky-50 border border-sky-300 text-sky-700 hover:bg-sky-100 transition-colors",children:[e.jsx(Ls,{size:16})," Assign"]})]}):e.jsxs("button",{onClick:Ni,disabled:K,className:"flex items-center gap-2 px-4 py-2.5 rounded-xl text-sm font-semibold bg-emerald-50 border border-emerald-300 text-emerald-700 hover:bg-emerald-100 transition-colors",children:[K?e.jsx(at,{size:16,className:"animate-spin"}):e.jsx(oo,{size:16}),"Save to Library"]}),e.jsx("button",{onClick:ka,className:"px-5 py-2.5 rounded-xl text-sm font-bold bg-gradient-to-r from-sky-600 to-sky-500 hover:from-sky-700 hover:to-sky-600 text-white transition-all",children:"Done"})]}))]}),e.jsx(Md,{isOpen:Ue,onClose:()=>Ne(!1)}),e.jsx(es,{children:oi&&e.jsx(Ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/40 z-[60] flex items-center justify-center p-4",onClick:()=>ws(!1),children:e.jsxs(Ie.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},className:"bg-[#f7f9fc] rounded-2xl shadow-2xl w-full max-w-md max-h-[70vh] flex flex-col overflow-hidden border border-[#dde3eb]",onClick:u=>u.stopPropagation(),children:[e.jsxs("div",{className:"px-5 py-4 border-b border-[#dde3eb] flex items-center justify-between",children:[e.jsxs("h3",{className:"text-base font-bold font-display text-[#0a1628] flex items-center gap-2",children:[e.jsx(Ga,{size:18,className:"text-sky-600"}),"Assign to Student"]}),e.jsx("button",{onClick:()=>ws(!1),className:"p-1 hover:bg-[#edf1f7] rounded-lg transition-colors",children:e.jsx(ca,{size:16,className:"text-slate-500"})})]}),e.jsx("div",{className:"px-5 py-3 border-b border-[#dde3eb]",children:e.jsxs("div",{className:"flex items-center gap-2 bg-[#edf1f7] rounded-xl px-3 py-2",children:[e.jsx(ha,{size:14,className:"text-slate-500"}),e.jsx("input",{type:"text",placeholder:"Search students…",value:Na,onChange:u=>wr(u.target.value),className:"flex-1 bg-transparent text-sm outline-none placeholder:text-slate-500"})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto p-3 space-y-1",children:li?e.jsx("div",{className:"flex items-center justify-center py-10",children:e.jsx(at,{size:20,className:"animate-spin text-sky-500"})}):Br.length===0?e.jsx("p",{className:"text-center text-sm text-slate-500 py-10",children:"No students found"}):Br.map(u=>e.jsxs("button",{onClick:()=>Sr(u.id),className:`w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-left transition-colors ${Yt===u.id?"bg-sky-50 border border-sky-300":"hover:bg-[#edf1f7] border border-transparent"}`,children:[e.jsx("img",{src:u.avatar||`https://ui-avatars.com/api/?name=${encodeURIComponent(u.name)}&background=random&size=32`,alt:u.name,className:"w-8 h-8 rounded-lg object-cover"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-semibold text-[#0a1628] truncate",children:u.name}),e.jsx("p",{className:"text-xs text-slate-500 truncate",children:u.email})]}),Yt===u.id&&e.jsx(xs,{size:16,className:"text-sky-600 flex-shrink-0"})]},u.id))}),e.jsxs("div",{className:"px-5 py-3 border-t border-[#dde3eb] flex justify-end gap-2",children:[e.jsx("button",{onClick:()=>ws(!1),className:"px-4 py-2 text-sm font-medium text-[#5a6578] hover:bg-[#edf1f7] rounded-xl transition-colors",children:"Cancel"}),e.jsxs("button",{onClick:yi,disabled:!Yt||va,className:`flex items-center gap-2 px-4 py-2 rounded-xl text-sm font-bold transition-all ${Yt&&!va?"bg-gradient-to-r from-sky-600 to-sky-500 text-white shadow-sm":"bg-[#dde3eb] text-slate-500 cursor-not-allowed"}`,children:[va?e.jsx(at,{size:14,className:"animate-spin"}):e.jsx(Ls,{size:14}),"Assign"]})]})]})})})]})};function $a({className:t,...s}){return e.jsx(Ui,{"data-slot":"label",className:Jn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...s})}const Bd=()=>{const[t,s]=b.useState([]),[a,r]=b.useState(!1),[n,o]=b.useState(!1),[i,l]=b.useState(""),[c,d]=b.useState(11),[x,N]=b.useState("general_mathematics"),m=b.useCallback(async()=>{r(!0);try{const j=await Pr("/api/quiz-battle/bank-status");s(j.pdfs)}catch(j){const h=j instanceof Fs?j.message:"Failed to load bank status";ue.error(h)}finally{r(!1)}},[]);b.useEffect(()=>{m()},[m]);const f=async()=>{if(!i.trim()){ue.error("Please enter a storage path");return}o(!0);try{await Pr("/api/quiz-battle/ingest-pdf",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({storage_path:i.trim(),grade_level:c,topic:x.trim(),force_reingest:!1})}),ue.success("PDF ingestion completed"),await m(),l("")}catch(j){const h=j instanceof Fs?j.message:"Ingestion failed";ue.error(h)}finally{o(!1)}},w=t.reduce((j,h)=>j+h.question_count,0),T=t.filter(j=>j.processed).length;return e.jsxs("div",{className:"space-y-6 p-6 max-w-6xl mx-auto",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2.5 bg-[#9956DE]/12 rounded-xl border border-[#9956DE]/30",children:e.jsx(ss,{className:"h-5 w-5 text-[#9956DE]"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-display font-bold text-foreground",children:"Question Bank"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage PDF-ingested quiz questions for battle sessions"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsxs(ks,{children:[e.jsx(Cs,{className:"pb-2",children:e.jsxs(Ts,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[e.jsx(tr,{className:"h-4 w-4"}),"Total PDFs"]})}),e.jsx(Is,{children:e.jsx("div",{className:"text-3xl font-display font-bold text-foreground",children:t.length})})]}),e.jsxs(ks,{children:[e.jsx(Cs,{className:"pb-2",children:e.jsxs(Ts,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[e.jsx(ss,{className:"h-4 w-4"}),"Total Questions"]})}),e.jsx(Is,{children:e.jsx("div",{className:"text-3xl font-display font-bold text-foreground",children:w})})]}),e.jsxs(ks,{children:[e.jsx(Cs,{className:"pb-2",children:e.jsxs(Ts,{className:"text-sm font-medium text-muted-foreground flex items-center gap-2",children:[e.jsx(Qa,{className:"h-4 w-4"}),"Processed"]})}),e.jsx(Is,{children:e.jsx("div",{className:"text-3xl font-display font-bold text-foreground",children:T})})]})]}),e.jsxs(ks,{children:[e.jsx(Cs,{children:e.jsx(Ts,{className:"text-base font-display font-bold",children:"Ingest New PDF"})}),e.jsxs(Is,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx($a,{htmlFor:"storagePath",children:"Firebase Storage Path"}),e.jsx(pt,{id:"storagePath",placeholder:"quiz_pdfs/grade_11/general_math.pdf",value:i,onChange:j=>l(j.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx($a,{htmlFor:"gradeLevel",children:"Grade Level"}),e.jsx(pt,{id:"gradeLevel",type:"number",min:7,max:12,value:c,onChange:j=>d(Number(j.target.value))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx($a,{htmlFor:"topic",children:"Topic Slug"}),e.jsx(pt,{id:"topic",placeholder:"general_mathematics",value:x,onChange:j=>N(j.target.value)})]})]}),e.jsxs(Ve,{onClick:f,disabled:n,className:"bg-[#9956DE] hover:bg-[#9956DE]/90",children:[n?e.jsx(at,{className:"mr-2 h-4 w-4 animate-spin"}):e.jsx(gl,{className:"mr-2 h-4 w-4"}),"Ingest PDF"]})]})]}),e.jsxs(ks,{children:[e.jsxs(Cs,{className:"flex flex-row items-center justify-between",children:[e.jsx(Ts,{className:"text-base font-display font-bold",children:"Processing Status"}),e.jsx(Ve,{variant:"outline",size:"sm",onClick:m,disabled:a,children:e.jsx(Qa,{className:`h-4 w-4 ${a?"animate-spin":""}`})})]}),e.jsx(Is,{children:e.jsxs(rl,{children:[e.jsx(nl,{children:e.jsxs(Ea,{children:[e.jsx(ls,{children:"Filename"}),e.jsx(ls,{children:"Grade"}),e.jsx(ls,{children:"Topic"}),e.jsx(ls,{children:"Questions"}),e.jsx(ls,{children:"Status"}),e.jsx(ls,{children:"Processed At"})]})}),e.jsxs(ol,{children:[t.map(j=>e.jsxs(Ea,{children:[e.jsx(Kt,{className:"font-medium",children:j.filename}),e.jsx(Kt,{children:j.grade_level}),e.jsx(Kt,{children:j.topic}),e.jsx(Kt,{children:j.question_count}),e.jsx(Kt,{children:e.jsx("span",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${j.processed?"bg-emerald-100 text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-300":"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300"}`,children:j.processed?"Processed":"Pending"})}),e.jsx(Kt,{children:j.timestamp?new Date(j.timestamp).toLocaleDateString():"-"})]},j.filename)),t.length===0&&e.jsx(Ea,{children:e.jsx(Kt,{colSpan:6,className:"text-center text-muted-foreground py-8",children:"No PDFs processed yet. Upload a PDF to get started."})})]})]})})]})]})},En={totalTopicsTracked:0,masteredCount:0,needsAttentionCount:0,excludedCount:0},$d={"gen-math":{label:"GEN MATH",color:"bg-sky-100 text-sky-700"},"stats-prob":{label:"STAT&PROB",color:"bg-sky-100 text-sky-700"},"pre-calc":{label:"PRE-CALC",color:"bg-orange-100 text-orange-700"},"basic-calc":{label:"BASIC CALC",color:"bg-red-100 text-red-700"}},Od={mastered:{label:"MASTERED BY CLASS",color:"bg-green-100 text-green-700 border-green-300"},on_track:{label:"ON TRACK",color:"bg-sky-100 text-sky-700 border-sky-300"},needs_attention:{label:"NEEDS ATTENTION",color:"bg-red-100 text-red-700 border-red-300"},no_data:{label:"NO DATA YET",color:"bg-[#edf1f7] text-[#5a6578] border-[#dde3eb]"}},Rn={needs_attention:0,on_track:1,no_data:2,mastered:3},Pd=({classSectionId:t})=>{const{currentUser:s}=Us(),[a,r]=b.useState([]),[n,o]=b.useState(En),[i,l]=b.useState(!0),[c,d]=b.useState("all"),[x,N]=b.useState("all"),[m,f]=b.useState(""),[w,T]=b.useState("classAverage"),[j,h]=b.useState("asc"),y=Gr.map(E=>E.id),C=Gr.reduce((E,U)=>(E[U.id]=U.name,E),{}),{isLoading:D,refetch:p}=jl();b.useEffect(()=>{D||(console.log("[TopicMasteryView] Curriculum ready"),p())},[D,p]);const[z,g]=b.useState(new Set),[S,I]=b.useState([]),B=bl({queryKey:Fi.topicMastery(s?.uid||"anonymous",t),enabled:!!s,staleTime:120*1e3,gcTime:900*1e3,queryFn:async()=>{try{if(!s)return{excluded:[],topics:[],summary:{totalTopicsTracked:0,masteredCount:0,needsAttentionCount:0,excludedCount:0}};const E=ut(Ye,"teachers",s.uid,"settings","quizSettings"),U=await hs(E),W=U.exists()?U.data()?.excludedTopics||[]:[],ge="https://deign86-mathpulse-api-v3test.hf.space",L=new URLSearchParams({teacherId:s.uid});t&&L.set("classSectionId",t);const k=await s.getIdToken(),G=await fetch(`${ge}/api/analytics/topic-mastery?${L.toString()}`,{headers:{Authorization:`Bearer ${k}`}});if(!G.ok)return{excluded:W,topics:[],summary:{totalTopicsTracked:0,masteredCount:0,needsAttentionCount:0,excludedCount:W.length}};const F=await G.json(),ie=(F.topics||[]).map(R=>({...R,isExcluded:W.includes(R.topicName)}));return{excluded:W,topics:ie,summary:F.summary||{totalTopicsTracked:0,masteredCount:0,needsAttentionCount:0,excludedCount:W.length}}}catch{return{excluded:[],topics:[],summary:{totalTopicsTracked:0,masteredCount:0,needsAttentionCount:0,excludedCount:0}}}}});b.useEffect(()=>{if(l(B.isLoading||B.isFetching),!B.data){I([]),r([]),o(En),g(new Set);return}I(B.data.excluded),r(B.data.topics),o(B.data.summary)},[B.data,B.isFetching,B.isLoading]);const P=async E=>{if(!s)return;const U=S.includes(E)?S.filter(W=>W!==E):[...S,E];I(U),r(W=>W.map(ge=>ge.topicName===E?{...ge,isExcluded:!ge.isExcluded}:ge)),o(W=>({...W,excludedCount:U.length}));try{const W=ut(Ye,"teachers",s.uid,"settings","quizSettings");(await hs(W)).exists()?await _t(W,{excludedTopics:U}):await Pt(W,{excludedTopics:U})}catch{ue.error("Failed to update excluded topics")}},J=async()=>{if(!s)return;const E=[...new Set([...S,...z])];I(E),r(U=>U.map(W=>z.has(W.topicName)?{...W,isExcluded:!0}:W)),o(U=>({...U,excludedCount:E.length})),g(new Set);try{const U=ut(Ye,"teachers",s.uid,"settings","quizSettings");(await hs(U)).exists()?await _t(U,{excludedTopics:E}):await Pt(U,{excludedTopics:E}),ue.success(`${z.size} topics excluded from quizzes`)}catch{ue.error("Failed to update")}},ne=async()=>{if(!s)return;const E=S.filter(U=>!z.has(U));I(E),r(U=>U.map(W=>z.has(W.topicName)?{...W,isExcluded:!1}:W)),o(U=>({...U,excludedCount:E.length})),g(new Set);try{const U=ut(Ye,"teachers",s.uid,"settings","quizSettings");(await hs(U)).exists()?await _t(U,{excludedTopics:E}):await Pt(U,{excludedTopics:E}),ue.success(`${z.size} topics re-included in quizzes`)}catch{ue.error("Failed to update")}},X=E=>{w===E?h(U=>U==="asc"?"desc":"asc"):(T(E),h("asc"))},te=x==="all"?y:vl(x);b.useEffect(()=>{c!=="all"&&(te.includes(c)||d("all"))},[te,c]);const se=a.filter(E=>!(c!=="all"&&E.subjectId!==c||!te.includes(E.subjectId)||m&&!E.topicName.toLowerCase().includes(m.toLowerCase()))).sort((E,U)=>{const W=j==="asc"?1:-1;switch(w){case"topicName":return W*E.topicName.localeCompare(U.topicName);case"classAverage":return W*(E.classAverage-U.classAverage);case"studentsAttempted":return W*(E.studentsAttempted-U.studentsAttempted);case"masteryStatus":return W*((Rn[E.masteryStatus]||0)-(Rn[U.masteryStatus]||0));default:return 0}}),$=()=>{z.size===se.length?g(new Set):g(new Set(se.map(E=>E.topicName)))},Y=({field:E})=>w!==E?e.jsx(ts,{size:12,className:"text-slate-500"}):j==="asc"?e.jsx(da,{size:12,className:"text-sky-600"}):e.jsx(ts,{size:12,className:"text-sky-600"});return i?e.jsxs("div",{className:"flex items-center justify-center py-20",children:[e.jsx(at,{size:24,className:"animate-spin text-sky-500"}),e.jsx("span",{className:"ml-2 text-[#5a6578]",children:"Loading topic mastery data..."})]}):e.jsxs(Ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-bold text-[#0a1628]",children:"Class Topic Mastery"}),e.jsx("p",{className:"text-sm text-[#5a6578] mt-1",children:"Topics where 75% or more of the class scored 85%+ are marked as mastered and can be excluded from future quiz generation."})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"bg-white rounded-2xl p-5 shadow-sm border border-[#dde3eb]",children:[e.jsx("div",{className:"flex items-center gap-3 mb-2",children:e.jsx("div",{className:"w-10 h-10 bg-sky-100 rounded-xl flex items-center justify-center",children:e.jsx(Bs,{size:20,className:"text-sky-600"})})}),e.jsx("p",{className:"text-2xl font-bold text-[#0a1628]",children:n.totalTopicsTracked}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"Total Topics Tracked"})]}),e.jsxs("div",{className:"bg-white rounded-2xl p-5 shadow-sm border border-green-200",children:[e.jsx("div",{className:"flex items-center gap-3 mb-2",children:e.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-xl flex items-center justify-center",children:e.jsx(io,{size:20,className:"text-green-600"})})}),e.jsx("p",{className:"text-2xl font-bold text-green-600",children:n.masteredCount}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"Mastered by Class"})]}),e.jsxs("div",{className:"bg-white rounded-2xl p-5 shadow-sm border border-red-200",children:[e.jsx("div",{className:"flex items-center gap-3 mb-2",children:e.jsx("div",{className:"w-10 h-10 bg-red-100 rounded-xl flex items-center justify-center",children:e.jsx(bs,{size:20,className:"text-red-600"})})}),e.jsx("p",{className:"text-2xl font-bold text-red-600",children:n.needsAttentionCount}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"Needs Work"})]}),e.jsxs("div",{className:"bg-white rounded-2xl p-5 shadow-sm border border-[#dde3eb]",children:[e.jsx("div",{className:"flex items-center gap-3 mb-2",children:e.jsx("div",{className:"w-10 h-10 bg-[#edf1f7] rounded-xl flex items-center justify-center",children:e.jsx(sl,{size:20,className:"text-[#5a6578]"})})}),e.jsx("p",{className:"text-2xl font-bold text-[#5a6578]",children:n.excludedCount}),e.jsx("p",{className:"text-xs text-[#5a6578]",children:"Excluded Topics"})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2 bg-white rounded-xl px-3 py-2 border border-[#dde3eb]",children:[e.jsx(ha,{size:14,className:"text-slate-500"}),e.jsx("input",{type:"text",placeholder:"Search topics...",value:m,onChange:E=>f(E.target.value),className:"bg-transparent text-sm outline-none w-40 placeholder:text-slate-500"})]}),e.jsxs("select",{value:c,onChange:E=>d(E.target.value),className:"bg-white border border-[#dde3eb] rounded-xl px-3 py-2 text-sm outline-none",children:[e.jsx("option",{value:"all",children:"All Subjects"}),te.map(E=>e.jsx("option",{value:E,children:C[E]||E},E))]}),e.jsxs("select",{value:x,onChange:E=>N(E.target.value),className:"bg-white border border-[#dde3eb] rounded-xl px-3 py-2 text-sm outline-none",children:[e.jsx("option",{value:"all",children:"All Grades"}),Nl.map(E=>e.jsx("option",{value:E,children:E},E))]})]}),e.jsx(es,{children:z.size>0&&e.jsxs(Ie.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"bg-sky-50 border border-sky-200 rounded-xl p-3 flex items-center gap-3 flex-wrap overflow-hidden",children:[e.jsxs("span",{className:"text-sm font-semibold text-sky-700",children:[z.size," topics selected"]}),e.jsx("button",{onClick:J,className:"px-3 py-1.5 bg-[#5a6578] text-white text-xs font-bold rounded-lg hover:bg-sky-600 transition-colors",children:"Exclude Selected Topics"}),e.jsx("button",{onClick:ne,className:"px-3 py-1.5 bg-green-600 text-white text-xs font-bold rounded-lg hover:bg-green-700 transition-colors",children:"Include Selected Topics"}),e.jsx("button",{onClick:()=>g(new Set),className:"px-3 py-1.5 bg-white border border-[#dde3eb] text-[#5a6578] text-xs font-bold rounded-lg hover:bg-[#edf1f7] transition-colors",children:"Clear Selection"})]})}),e.jsx("div",{className:"bg-white rounded-2xl shadow-sm border border-[#dde3eb] overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-[#edf1f7] border-b border-[#dde3eb]",children:[e.jsx("th",{className:"px-4 py-3 w-10",children:e.jsx("input",{type:"checkbox",checked:z.size===se.length&&se.length>0,onChange:$,className:"w-4 h-4 rounded border-[#dde3eb] text-sky-600 focus:ring-sky-500"})}),e.jsx("th",{className:"px-4 py-3 text-xs font-bold text-[#5a6578] uppercase tracking-wide cursor-pointer hover:text-sky-600",onClick:()=>X("topicName"),children:e.jsxs("span",{className:"flex items-center gap-1",children:["Topic Name ",e.jsx(Y,{field:"topicName"})]})}),e.jsx("th",{className:"px-4 py-3 text-xs font-bold text-[#5a6578] uppercase tracking-wide",children:"Unit"}),e.jsx("th",{className:"px-4 py-3 text-xs font-bold text-[#5a6578] uppercase tracking-wide cursor-pointer hover:text-sky-600",onClick:()=>X("classAverage"),children:e.jsxs("span",{className:"flex items-center gap-1",children:["Class Avg % ",e.jsx(Y,{field:"classAverage"})]})}),e.jsx("th",{className:"px-4 py-3 text-xs font-bold text-[#5a6578] uppercase tracking-wide cursor-pointer hover:text-sky-600",onClick:()=>X("studentsAttempted"),children:e.jsxs("span",{className:"flex items-center gap-1",children:["Students ",e.jsx(Y,{field:"studentsAttempted"})]})}),e.jsx("th",{className:"px-4 py-3 text-xs font-bold text-[#5a6578] uppercase tracking-wide cursor-pointer hover:text-sky-600",onClick:()=>X("masteryStatus"),children:e.jsxs("span",{className:"flex items-center gap-1",children:["Status ",e.jsx(Y,{field:"masteryStatus"})]})}),e.jsx("th",{className:"px-4 py-3 text-xs font-bold text-[#5a6578] uppercase tracking-wide",children:"Exclude"})]})}),e.jsx("tbody",{children:se.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:"px-4 py-16 text-center",children:a.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx(Bs,{size:32,className:"text-[#dde3eb]"}),e.jsx("p",{className:"text-sm font-medium text-[#5a6578]",children:"No topic data available yet"}),e.jsx("p",{className:"text-xs text-[#a0aec0]",children:"Import student quiz data to see class topic mastery analytics."})]}):e.jsx("span",{className:"text-sm text-slate-500",children:"No topics match the current filters."})})}):se.map(E=>{const U=z.has(E.topicName),W=Od[E.masteryStatus],ge=$d[E.subjectId]||{label:E.subjectId.toUpperCase(),color:"bg-[#edf1f7] text-[#5a6578]"},L=E.classAverage<60?"bg-red-500":E.classAverage<85?"bg-rose-500":"bg-green-500",k=E.isExcluded?"bg-[#edf1f7] opacity-60":E.masteryStatus==="needs_attention"?"bg-red-50/30":E.masteryStatus==="mastered"?"bg-green-50/30":"";return e.jsxs("tr",{className:`border-b border-[#dde3eb] hover:bg-[#edf1f7] transition-colors ${k} ${E.isExcluded?"line-through decoration-slate-400":""}`,children:[e.jsx("td",{className:"px-4 py-3",children:e.jsx("input",{type:"checkbox",checked:U,onChange:()=>{const G=new Set(z);U?G.delete(E.topicName):G.add(E.topicName),g(G)},className:"w-4 h-4 rounded border-[#dde3eb] text-sky-600 focus:ring-sky-500"})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium text-[#0a1628]",children:E.topicName}),e.jsx("span",{className:`text-[10px] font-bold px-1.5 py-0.5 rounded ${ge.color}`,children:ge.label})]})}),e.jsx("td",{className:"px-4 py-3 text-xs text-[#5a6578]",children:E.unit}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-1 h-2 bg-[#edf1f7] rounded-full overflow-hidden max-w-20",children:e.jsx("div",{className:`h-full rounded-full e-w ${L}`,style:{"--w":`${E.classAverage}%`}})}),e.jsxs("span",{className:"text-xs font-bold text-[#0a1628] w-8 text-right",children:[E.classAverage,"%"]})]})}),e.jsxs("td",{className:"px-4 py-3 text-xs text-[#5a6578]",children:[E.studentsAttempted,"/",E.totalStudents]}),e.jsx("td",{className:"px-4 py-3",children:e.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded border ${W.color}`,children:W.label})}),e.jsx("td",{className:"px-4 py-3",children:e.jsxs("div",{className:"group relative",children:[e.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:E.isExcluded,onChange:()=>P(E.topicName),className:"sr-only peer"}),e.jsx("div",{className:"w-9 h-5 bg-[#dde3eb] peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-[#dde3eb] after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-[#5a6578]"})]}),e.jsx("div",{className:"hidden group-hover:block absolute z-20 bottom-full left-0 mb-1 px-2 py-1 bg-slate-800 text-white text-[10px] rounded whitespace-nowrap",children:"Excluded topics will not appear in AI-generated quizzes for your class"})]})})]},E.topicName)})})]})})})]})};function Xo(t){return(t||"").trim().toLowerCase()}function Mn(t){const s=(t.lrn||"").trim().toLowerCase();if(s)return`lrn:${s}`;const a=(t.email||"").trim().toLowerCase();if(a)return`email:${a}`;const r=t.name.trim().toLowerCase();if(r)return`name:${r}`;const n=Xo(t.classSectionId),o=(t.id||"").trim().toLowerCase();return n&&o?`${n}|id:${o}`:o?`id:${o}`:`${n}|anonymous`}function _d(t,s){const a=[],r=(t.lrn||"").trim().toLowerCase(),n=(t.email||"").trim().toLowerCase(),o=t.name.trim().toLowerCase(),i=(t.id||"").trim().toLowerCase();return r&&a.push(`${s}|lrn:${r}`),n&&a.push(`${s}|email:${n}`),o&&a.push(`${s}|name:${o}`),i&&a.push(`${s}|id:${i}`),a.length===0&&a.push(`${s}|anonymous`),a}function Hd(t,s){const a=[t.riskLevel,s.riskLevel].includes("High")?"High":[t.riskLevel,s.riskLevel].includes("Medium")?"Medium":"Low";return{...t,lrn:t.lrn||s.lrn,classSectionId:t.classSectionId??s.classSectionId,avgQuizScore:s.avgQuizScore>0?s.avgQuizScore:t.avgQuizScore,engagementScore:s.engagementScore>0?s.engagementScore:t.engagementScore,weakestTopic:t.weakestTopic&&t.weakestTopic!=="Foundational Skills"?t.weakestTopic:s.weakestTopic,riskLevel:a}}function Jo(t,s){const a=new Map,r=new Map,n=s?Xo(s):"all";return t.forEach(o=>{const i=_d(o,n),l=i.map(x=>r.get(x)).find(Boolean)||i[0],c=a.get(l),d=c?Hd(c,o):o;a.set(l,d),i.forEach(x=>r.set(x,l))}),Array.from(a.values())}function An(t,s){return Jo([...t,...s])}function Jt(t){return Number.isFinite(t)?Math.max(0,Math.min(100,t)):0}function Gd(t){if(!t)return null;const s="gen-math",a=Qr.find(i=>i.id===s)?.modules||[];if(a.length===0)return null;const r={mastery:0,concept:0,application:0,engagement:0,consistency:0},n=t.lessons??{};a.forEach(i=>{const l=Qr.find(j=>j.modules.some(h=>h.id===i.id)),c=l?t?.subjects?.[l.id]?.modulesProgress?.[i.id]:null,d=Jt(c?.progress||0),x=i.lessons.length?i.lessons.reduce((j,h)=>{const y=n?.[h.id]?.score;if(typeof y=="number"&&Number.isFinite(y))return j+Jt(y);const C=!!c?.lessonsCompleted?.includes?.(h.id);return j+(C?100:0)},0)/i.lessons.length:0,N=i.quizzes.length?(c?.quizzesCompleted?.length||0)/i.quizzes.length*100:0,m=Jt(x),f=Jt(N),w=Jt(Math.min(100,(m+f*2)/1.5)),T=Jt(Math.min(100,40+d*.6));r.mastery+=d,r.concept+=m,r.application+=f,r.engagement+=w,r.consistency+=T});const o=a.length;return{mastery:Math.round(r.mastery/o),concept:Math.round(r.concept/o),application:Math.round(r.application/o),engagement:Math.round(r.engagement/o),consistency:Math.round(r.consistency/o)}}const Oa={High:{bg:"bg-red-100",text:"text-red-700",ring:"ring-red-300"},Medium:{bg:"bg-rose-100",text:"text-rose-700",ring:"ring-rose-300"},Low:{bg:"bg-green-100",text:"text-green-700",ring:"ring-green-300"}},Ln={advanced:{bg:"bg-emerald-100",text:"text-emerald-700",bar:"bg-emerald-500"},proficient:{bg:"bg-sky-100",text:"text-sky-700",bar:"bg-sky-500"},developing:{bg:"bg-rose-100",text:"text-rose-700",bar:"bg-rose-500"},beginner:{bg:"bg-red-100",text:"text-red-700",bar:"bg-red-500"}},Dn=[{key:"mastery",short:"M",label:"Overall Mastery",header:"Mastery"},{key:"concept",short:"C",label:"Concept Grasp",header:"Concept"},{key:"application",short:"A",label:"Application",header:"Application"},{key:"engagement",short:"E",label:"Engagement",header:"Engagement"},{key:"consistency",short:"S",label:"Consistency",header:"Consistency"}];function Qd(t){const s=Jt(t);return s>=80?{bg:"bg-[color-mix(in_srgb,var(--chart-3)_14%,transparent)]",text:"text-[var(--chart-3)]",ring:"ring-[color-mix(in_srgb,var(--chart-3)_40%,transparent)]"}:s>=60?{bg:"bg-[color-mix(in_srgb,var(--chart-4)_14%,transparent)]",text:"text-[var(--chart-4)]",ring:"ring-[color-mix(in_srgb,var(--chart-4)_40%,transparent)]"}:{bg:"bg-[color-mix(in_srgb,var(--chart-2)_14%,transparent)]",text:"text-[var(--chart-2)]",ring:"ring-[color-mix(in_srgb,var(--chart-2)_40%,transparent)]"}}const Ud=({classSectionId:t,className:s,fallbackStudents:a=[]})=>{const{currentUser:r}=Us(),n=b.useRef(0),[o,i]=b.useState([]),[l,c]=b.useState(!0),[d,x]=b.useState(""),[N,m]=b.useState("riskLevel"),[f,w]=b.useState("desc"),[T,j]=b.useState("all"),[h,y]=b.useState([]),[C,D]=b.useState(!1),[p,z]=b.useState(""),[g,S]=b.useState(""),I=b.useCallback(k=>({id:k.id,lrn:k.lrn||void 0,name:k.name,email:k.email||"",avatar:`https://ui-avatars.com/api/?name=${encodeURIComponent(k.name)}&background=random`,classSectionId:k.classSectionId??null,riskLevel:k.riskLevel||"Low",engagementScore:k.engagementScore,avgQuizScore:k.avgQuizScore,weakestTopic:k.weakestTopic||"Foundational Skills"}),[]),B=b.useCallback(k=>({id:k.id,lrn:k.lrn,name:k.name,email:k.email||"",avatar:k.avatar||`https://ui-avatars.com/api/?name=${encodeURIComponent(k.name)}&background=random`,classSectionId:k.classSectionId??null,riskLevel:String(k.riskLevel).charAt(0).toUpperCase()+String(k.riskLevel).slice(1).toLowerCase(),engagementScore:k.engagementScore,avgQuizScore:Number(k.avgQuizScore??k.avgScore??0),weakestTopic:k.weakestTopic||"Foundational Skills"}),[]),P=b.useCallback(async(k,G)=>{const F=new Map;k.forEach(R=>F.set(R.id,null));const ie=25;for(let R=0;R{try{const ee=await _r(ae.id);return{studentId:ae.id,summary:Gd(ee)}}catch{return{studentId:ae.id,summary:null}}}))).forEach((ae,ee)=>{const V=H[ee]?.id;V&&(ae.status==="fulfilled"?F.set(V,ae.value.summary):F.set(V,null))})}n.current===G&&i(R=>R.map(H=>F.has(H.student.id)?{...H,competencyMatrix:F.get(H.student.id)??null,competencyMatrixLoading:!1}:H))},[]),J=b.useCallback(async()=>{if(r?.uid){c(!0),S("");try{let G=(await pr(r.uid)).map(H=>({id:H.id,name:H.name,email:H.email||"",avatar:H.avatar||`https://ui-avatars.com/api/?name=${encodeURIComponent(H.name)}&background=random`,classSectionId:H.classSectionId??null,riskLevel:H.riskLevel,engagementScore:H.engagementScore,avgQuizScore:H.avgQuizScore,weakestTopic:H.weakestTopic||"Foundational Skills"}));a.length>0&&(G=An(G,a.map(B))),t&&(G=G.filter(H=>H.classSectionId===t));const F=await We.getImportedClassOverview({classSectionId:t,limit:3e3});F.warnings.length>0&&S(F.warnings.join(" ")),G=An(G,F.students.map(I));const ie=Jo(G,t),R=n.current+=1;i(ie.map((H,q)=>({rowKey:`${Mn(H)}|row:${q}`,student:H,competency:null,competencyMatrix:null,competencyMatrixLoading:!0,loading:!1,expanded:!1}))),P(ie,R)}catch(k){if(console.error("Failed to load students:",k),a.length>0){const G=a.map(B).filter(F=>!t||F.classSectionId===t).map((F,ie)=>({rowKey:`${Mn(F)}|row:${ie}`,student:F,competency:null,competencyMatrix:null,competencyMatrixLoading:!1,loading:!1,expanded:!1}));i(G),S("Showing recently imported students while backend roster sync catches up.")}else i([]),S("Student competency roster is unavailable right now.")}finally{c(!1)}}},[t,r?.uid,a,P,B,I]);b.useEffect(()=>{J()},[J]),b.useEffect(()=>{(async()=>{if(!t){y([]),z("");return}D(!0),z("");try{const G=await We.getCourseMaterialTopics({classSectionId:t,limit:20}),F=(G.topics||[]).filter(ie=>ie.title?.trim());y(F),G.warnings.length>0&&z(G.warnings.join(" "))}catch{y([]),z("Imported topic context is unavailable right now.")}finally{D(!1)}})()},[t]);const ne=async k=>{i(G=>G.map(F=>{if(F.rowKey!==k)return F;const ie=!F.expanded,R=F.student.id,H={weakestTopic:F.student.weakestTopic,avgQuizScore:F.student.avgQuizScore};return ie&&!F.competency&&!F.loading?(X(k,R,H),{...F,expanded:!0,loading:!0}):{...F,expanded:ie}}))},X=async(k,G,F)=>{try{const R=((await _r(G))?.quizAttempts??[]).map(q=>({topic:q.quizId,score:q.score,total:100,timeTaken:q.timeSpent})),H=await We.getStudentCompetency(G,R.length>0?R:void 0);i(q=>q.map(ae=>ae.rowKey===k?{...ae,competency:H,loading:!1}:ae))}catch{const R=F.avgQuizScore||50,H={studentId:G,competencies:[{topic:F.weakestTopic||"Unknown",efficiencyScore:Math.max(15,R-20),competencyLevel:R<50?"beginner":"developing",perspective:`Student needs focused practice in ${F.weakestTopic}.`},{topic:"Functions and Relations",efficiencyScore:Math.min(95,R+10),competencyLevel:R>70?"proficient":"developing",perspective:"Shows solid understanding of function concepts."},{topic:"Problem Solving",efficiencyScore:R,competencyLevel:R>80?"advanced":R>60?"proficient":"developing",perspective:"Applies mathematical reasoning consistently."}],recommendedTopics:[F.weakestTopic||"Review fundamentals"],excludeTopics:[]};i(q=>q.map(ae=>ae.rowKey===k?{...ae,competency:H,loading:!1}:ae))}},te=k=>{N===k?w(G=>G==="asc"?"desc":"asc"):(m(k),w("asc"))},se={High:0,Medium:1,Low:2},$=o.filter(k=>{if(T!=="all"&&k.student.riskLevel!==T)return!1;if(d){const G=d.toLowerCase();return k.student.name.toLowerCase().includes(G)||k.student.email.toLowerCase().includes(G)}return!0}).sort((k,G)=>{let F=0;switch(N){case"name":F=k.student.name.localeCompare(G.student.name);break;case"avgQuizScore":F=k.student.avgQuizScore-G.student.avgQuizScore;break;case"riskLevel":F=se[k.student.riskLevel]-se[G.student.riskLevel];break;case"engagementScore":F=k.student.engagementScore-G.student.engagementScore;break}return f==="asc"?F:-F}),Y=o.length,E=o.filter(k=>k.student.riskLevel==="High").length,U=Y>0?Math.round(o.reduce((k,G)=>k+G.student.avgQuizScore,0)/Y):0,W=Y>0?Math.round(o.reduce((k,G)=>k+G.student.engagementScore,0)/Y):0,ge=Array.from(new Set(h.map(k=>k.title).filter(Boolean))).slice(0,10),L=({field:k})=>N!==k?e.jsx(ts,{size:14,className:"text-slate-500"}):f==="asc"?e.jsx(da,{size:14,className:"text-sky-600"}):e.jsx(ts,{size:14,className:"text-sky-600"});return l?e.jsxs("div",{className:"flex items-center justify-center py-20 p-6",children:[e.jsx(at,{size:32,className:"animate-spin text-[var(--primary)]"}),e.jsx("span",{className:"ml-3 text-muted-foreground",children:"Loading student data..."})]}):e.jsxs(Ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"p-6 space-y-6",children:[e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:[{label:"Total Students",value:Y,icon:e.jsx(Ur,{size:20}),color:"bg-[color-mix(in_srgb,var(--primary)_10%,transparent)] text-[var(--primary)]"},{label:"At-Risk Students",value:E,icon:e.jsx(bs,{size:20}),color:"bg-[color-mix(in_srgb,var(--chart-2)_10%,transparent)] text-[var(--chart-2)]"},{label:"Class Average",value:`${U}%`,icon:e.jsx(Bs,{size:20}),color:"bg-[color-mix(in_srgb,var(--chart-3)_10%,transparent)] text-[var(--chart-3)]"},{label:"Avg. Engagement",value:`${W}%`,icon:e.jsx(sr,{size:20}),color:"bg-[color-mix(in_srgb,var(--chart-1)_10%,transparent)] text-[var(--chart-1)]"}].map((k,G)=>e.jsxs("div",{className:"bg-card rounded-xl border border-border p-4 flex items-center gap-3",children:[e.jsx("div",{className:`w-10 h-10 rounded-lg flex items-center justify-center ${k.color}`,children:k.icon}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl font-bold text-foreground",children:k.value}),e.jsx("p",{className:"text-xs text-muted-foreground",children:k.label})]})]},G))}),e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"relative flex-1 w-full sm:max-w-xs",children:[e.jsx("label",{htmlFor:"student-search",className:"sr-only",children:"Search for students by name or email"}),e.jsx(ha,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),e.jsx("input",{id:"student-search",type:"text",placeholder:"Search students...",value:d,onChange:k=>x(k.target.value),className:"w-full pl-9 pr-4 py-2 border border-border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-sky-500/20 focus:border-sky-400"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:["all","High","Medium","Low"].map(k=>e.jsx("button",{onClick:()=>j(k),className:`px-3 py-1.5 rounded-lg text-xs font-semibold transition-all ${T===k?"bg-[var(--primary)] text-white":"bg-muted text-muted-foreground hover:bg-accent"}`,children:k==="all"?"All":`${k} Risk`},k))}),e.jsxs("button",{onClick:J,className:"sm:ml-auto w-full sm:w-auto flex items-center justify-center gap-1.5 px-3 py-1.5 bg-muted hover:bg-accent rounded-lg text-xs font-semibold text-muted-foreground transition-colors",children:[e.jsx(Qa,{size:14}),"Refresh"]})]}),e.jsxs("div",{className:"bg-[color-mix(in_srgb,var(--primary)_10%,transparent)] border border-[color-mix(in_srgb,var(--primary)_30%,transparent)] rounded-xl p-4",children:[e.jsxs("p",{className:"text-sm font-semibold text-[var(--primary)]",children:["Imported Topic Context",s?` for ${s}`:""]}),e.jsx("p",{className:"text-xs text-[var(--primary)] mt-1 opacity-80",children:C?"Loading class-scoped imported topics...":ge.length>0?`${ge.length} imported topics loaded for competency guidance`:"No imported topics found for this class context"}),p&&e.jsx("p",{className:"text-[11px] text-[var(--chart-4)] mt-1",children:p}),g&&e.jsx("p",{className:"text-[11px] text-[var(--chart-4)] mt-1",children:g}),ge.length>0&&e.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:ge.map(k=>e.jsx("span",{className:"text-[11px] bg-[color-mix(in_srgb,var(--primary)_10%,transparent)] text-[var(--primary)] px-2 py-0.5 rounded",children:k},k))})]}),e.jsx("div",{className:"bg-card rounded-xl border border-border",children:e.jsx("div",{className:"overflow-x-auto pb-2",children:e.jsxs("div",{className:"min-w-[1920px]",children:[e.jsxs("div",{className:"grid grid-cols-[48px_280px_120px_120px_120px_120px_120px_140px_170px_170px_220px] items-center gap-6 px-6 py-4 bg-muted/60 border-b border-border text-xs font-semibold text-muted-foreground tracking-normal",children:[e.jsx("div",{}),e.jsxs("button",{className:"flex items-center gap-1 hover:text-foreground",onClick:()=>te("name"),children:["Student ",e.jsx(L,{field:"name"})]}),Dn.map(k=>e.jsx("div",{className:"text-center leading-none whitespace-nowrap tracking-normal",children:k.header},k.key)),e.jsxs("button",{className:"flex items-center gap-1 hover:text-foreground",onClick:()=>te("riskLevel"),children:["Risk Level ",e.jsx(L,{field:"riskLevel"})]}),e.jsxs("button",{className:"flex items-center gap-1 hover:text-foreground",onClick:()=>te("avgQuizScore"),children:["Avg. Score ",e.jsx(L,{field:"avgQuizScore"})]}),e.jsxs("button",{className:"flex items-center gap-1 hover:text-foreground",onClick:()=>te("engagementScore"),children:["Engagement ",e.jsx(L,{field:"engagementScore"})]}),e.jsx("div",{className:"flex justify-end pr-2",children:"Weakest Topic"})]}),$.length===0?e.jsxs("div",{className:"py-12 text-center text-slate-500",children:[e.jsx(Ur,{size:32,className:"mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No students match the current filters"})]}):e.jsx("div",{className:"divide-y divide-border",children:$.map(k=>{const G=k.student.riskLevel==="High"?{card:"bg-rose-50 border-rose-200",title:"text-rose-800",chip:"bg-rose-100 text-rose-700"}:k.student.riskLevel==="Medium"?{card:"bg-amber-50 border-amber-200",title:"text-amber-800",chip:"bg-amber-100 text-amber-700"}:{card:"bg-sky-50 border-sky-200",title:"text-sky-800",chip:"bg-sky-100 text-sky-700"};return e.jsxs("div",{className:"border-b border-border last:border-0",children:[e.jsxs("button",{onClick:()=>void ne(k.rowKey),className:"w-full grid grid-cols-[48px_280px_120px_120px_120px_120px_120px_140px_170px_170px_220px] gap-6 px-6 py-5 items-center hover:bg-muted transition-colors text-left",children:[e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center text-slate-500",children:k.expanded?e.jsx(ts,{size:16}):e.jsx(Ht,{size:16})})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:k.student.avatar,alt:k.student.name,className:"w-8 h-8 rounded-full bg-border object-cover"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:k.student.name}),e.jsx("p",{className:"text-xs text-slate-500",children:k.student.email})]})]}),Dn.map(F=>{const ie=k.competencyMatrix?.[F.key]??0,R=Qd(ie);return e.jsx("div",{className:"flex items-center justify-center",children:k.competencyMatrixLoading?e.jsx(at,{size:14,className:"animate-spin text-muted-foreground"}):k.competencyMatrix?e.jsxs("span",{title:`${F.label}: ${ie}%`,className:`inline-flex items-center justify-center rounded-md px-2 py-1 text-xs font-semibold ring-1 ${R.bg} ${R.text} ${R.ring}`,children:[ie,"%"]}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"—"})},F.key)}),e.jsx("div",{children:e.jsxs("span",{className:`inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-xs font-bold ring-1 ${Oa[k.student.riskLevel]?.bg} ${Oa[k.student.riskLevel]?.text} ${Oa[k.student.riskLevel]?.ring}`,children:[k.student.riskLevel==="High"&&e.jsx(bs,{size:10}),k.student.riskLevel]})}),e.jsx("div",{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-1 h-2 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:`h-full rounded-full e-w ${k.student.avgQuizScore>=80?"bg-[var(--chart-3)]":k.student.avgQuizScore>=60?"bg-[var(--chart-4)]":"bg-[var(--chart-2)]"}`,style:{"--w":`${k.student.avgQuizScore}%`}})}),e.jsxs("span",{className:"text-xs font-bold text-muted-foreground w-8 text-right",children:[k.student.avgQuizScore,"%"]})]})}),e.jsx("div",{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-1 h-2 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:`h-full rounded-full e-w ${k.student.engagementScore>=75?"bg-[var(--primary)]":k.student.engagementScore>=50?"bg-[var(--primary)]/60":"bg-muted-foreground"}`,style:{"--w":`${k.student.engagementScore}%`}})}),e.jsxs("span",{className:"text-xs font-bold text-muted-foreground w-8 text-right",children:[k.student.engagementScore,"%"]})]})}),e.jsx("div",{className:"flex justify-end pr-2",children:e.jsx("span",{className:"text-xs font-medium text-muted-foreground bg-muted px-2 py-1 rounded-md",children:k.student.weakestTopic})})]}),e.jsx(es,{children:k.expanded&&e.jsx(Ie.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"overflow-hidden",children:e.jsx("div",{className:"px-6 py-4 bg-muted border-t border-border",children:k.loading?e.jsxs("div",{className:"flex items-center justify-center py-6",children:[e.jsx(at,{size:20,className:"animate-spin text-sky-500"}),e.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:"Analyzing competency data..."})]}):k.competency?e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:k.competency.competencies.map((F,ie)=>e.jsx(Vd,{competency:F},ie))}),k.competency.recommendedTopics.length>0&&e.jsxs("div",{className:`border rounded-lg p-3 ${G.card}`,children:[e.jsxs("h5",{className:`text-xs font-bold mb-1.5 flex items-center gap-1 ${G.title}`,children:[e.jsx(ss,{size:12}),"Recommended Focus Areas"]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:k.competency.recommendedTopics.map((F,ie)=>e.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-xs font-medium ${G.chip}`,children:F},ie))})]}),ge.length>0&&e.jsxs("div",{className:"bg-sky-50 border border-sky-200 rounded-lg p-3",children:[e.jsxs("h5",{className:"text-xs font-bold text-sky-800 mb-1.5 flex items-center gap-1",children:[e.jsx(so,{size:12}),"Class Imported Topics"]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:ge.slice(0,8).map((F,ie)=>e.jsx("span",{className:"inline-flex items-center bg-sky-100 text-sky-700 px-2 py-0.5 rounded text-xs font-medium",children:F},`${F}_${ie}`))})]}),k.competency.excludeTopics.length>0&&e.jsxs("div",{className:"bg-emerald-50 border border-emerald-200 rounded-lg p-3",children:[e.jsxs("h5",{className:"text-xs font-bold text-emerald-800 mb-1.5 flex items-center gap-1",children:[e.jsx(yl,{size:12}),"Mastered Topics (can exclude from quizzes)"]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:k.competency.excludeTopics.map((F,ie)=>e.jsx("span",{className:"inline-flex items-center bg-emerald-100 text-emerald-700 px-2 py-0.5 rounded text-xs font-medium",children:F},ie))})]})]}):e.jsx("p",{className:"text-sm text-slate-500 text-center py-4",children:"No competency data available. Student needs to complete quizzes first."})})})})]},k.rowKey)})})]})})})]})},Vd=({competency:t})=>{const s=Ln[t.competencyLevel]||Ln.developing;return e.jsxs("div",{className:"bg-card rounded-lg border border-border p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("h6",{className:"text-xs font-bold text-foreground truncate flex-1",children:t.topic}),e.jsx("span",{className:`ml-2 px-2 py-0.5 rounded text-[10px] font-bold uppercase ${s.bg} ${s.text}`,children:t.competencyLevel})]}),e.jsxs("div",{className:"mb-2",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs mb-1",children:[e.jsx("span",{className:"text-slate-500",children:"Efficiency"}),e.jsxs("span",{className:"font-bold text-muted-foreground",children:[t.efficiencyScore,"%"]})]}),e.jsx("div",{className:"h-1.5 bg-muted rounded-full overflow-hidden",children:e.jsx(Ie.div,{initial:{width:0},animate:{width:`${t.efficiencyScore}%`},transition:{duration:.6,delay:.1},className:`h-full rounded-full ${s.bar}`})})]}),e.jsx("p",{className:"text-[11px] text-muted-foreground leading-snug line-clamp-2",children:t.perspective})]})},Wd=({liveActivity:t,atRiskStudents:s})=>{const{notifications:a,unreadCount:r,isLoading:n,markAsRead:o,markAllAsRead:i}=Bi(),l=x=>{const N=Date.now()-x.getTime(),m=Math.floor(N/6e4);if(m<1)return"Just now";if(m<60)return`${m} min ago`;const f=Math.floor(m/60);if(f<24)return`${f} hour${f===1?"":"s"} ago`;const w=Math.floor(f/24);return`${w} day${w===1?"":"s"} ago`},c=x=>{switch(x){case"achievement_unlocked":case"achievement":return wl;case"message":return Ri;case"grade":case"quiz_result":return to;case"reminder":case"streak_reminder":return co;case"risk_alert":return bs;case"automation":case"system_alert":return $i;default:return aa}},d=x=>{switch(x){case"risk_alert":return"bg-destructive/10 text-destructive";case"achievement_unlocked":case"achievement":return"bg-rose-500/10 text-rose-600 dark:text-rose-400";case"message":return"bg-sky-500/10 text-sky-700 dark:text-sky-400";case"grade":case"quiz_result":return"bg-emerald-500/10 text-emerald-700 dark:text-emerald-400";case"reminder":case"streak_reminder":return"bg-amber-500/10 text-amber-700 dark:text-amber-400";case"automation":case"system_alert":return"bg-violet-500/10 text-violet-700 dark:text-violet-400";default:return"bg-muted text-muted-foreground"}};return e.jsxs(Ie.div,{initial:{opacity:0,y:18},animate:{opacity:1,y:0},exit:{opacity:0,y:-18},className:"p-4 sm:p-6 space-y-4",children:[e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsx("div",{className:"min-w-0",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-sky-100 text-sky-700 dark:bg-sky-500/15 dark:text-sky-300 flex items-center justify-center flex-shrink-0",children:e.jsx(aa,{size:20})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"text-2xl font-display font-bold text-foreground",children:"Notifications"}),e.jsx("p",{className:"text-sm text-muted-foreground font-body",children:"Classroom alerts and updates"})]})]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"text-xs text-muted-foreground font-body",children:r>0?`${r} unread`:"All caught up"}),r>0&&e.jsxs(Ve,{variant:"outline",size:"sm",onClick:i,children:[e.jsx(al,{}),"Mark all as read"]})]})]}),e.jsx("div",{className:"bg-card border border-border rounded-2xl shadow-sm overflow-hidden",children:n?e.jsxs("div",{className:"p-8 flex items-center justify-center gap-2 text-muted-foreground",children:[e.jsx(at,{size:18,className:"animate-spin"}),e.jsx("span",{className:"text-sm font-body",children:"Loading notifications…"})]}):a.length===0?e.jsx("div",{className:"p-10",children:e.jsxs("div",{className:"max-w-xl",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-muted text-muted-foreground flex items-center justify-center mb-4",children:e.jsx(aa,{size:22})}),e.jsx("h3",{className:"text-lg font-display font-bold text-foreground mb-1",children:"No notifications"}),e.jsx("p",{className:"text-sm text-muted-foreground font-body",children:"Teacher alerts and classroom updates will appear here."})]})}):e.jsxs("div",{children:[t&&t.length>0&&e.jsx("div",{children:t.map(x=>e.jsx("div",{className:"w-full text-left px-4 py-4 border-b border-border transition-colors hover:bg-accent/40",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:`w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0 ${x.type==="success"?"bg-[#75D06A]/15 text-[#4D9F46]":x.type==="warning"?"bg-[#F08386]/15 text-[#C65E63]":"bg-[#9956DE]/15 text-[#9956DE]"}`,children:e.jsx(er,{size:18})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs("h4",{className:"text-sm font-body font-bold text-foreground line-clamp-1",children:[x.student," — ",x.action]})}),e.jsxs("p",{className:"mt-1 text-xs text-muted-foreground font-body leading-relaxed line-clamp-2",children:["Topic: ",x.topic]})]}),e.jsx("div",{className:"text-xs text-muted-foreground font-body flex-shrink-0",children:x.time})]})})]})},x.id))}),a.map(x=>{const N=c(x.type),m=d(x.type),f=l(x.createdAt);return e.jsx("button",{onClick:()=>o(x.id),className:`w-full text-left px-4 py-4 border-b border-border last:border-b-0 transition-colors hover:bg-accent/40 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 ${x.isRead?"":"bg-sky-50/40 dark:bg-sky-500/5"}`,children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:`w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0 ${m}`,children:e.jsx(N,{size:18})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h4",{className:"text-sm font-body font-bold text-foreground line-clamp-1",children:x.title}),!x.isRead&&e.jsx("span",{className:"w-2 h-2 rounded-full bg-sky-500 flex-shrink-0"})]}),e.jsx("p",{className:"mt-1 text-xs text-muted-foreground font-body leading-relaxed line-clamp-2",children:x.message})]}),e.jsx("div",{className:"text-xs text-muted-foreground font-body flex-shrink-0",children:f})]}),x.actionUrl&&e.jsx("div",{className:"mt-2 text-xs text-sky-600 dark:text-sky-400 font-body",children:"Opens link"})]})]})},x.id)})]})})]})},qd=t=>{const s=t.data(),a=s.startTime,r=s.endTime,n=s.createdAt,o=s.updatedAt,i=l=>{if(l){if(typeof l?.toDate=="function")return l.toDate();if(l instanceof Date)return l}};return{...s,id:t.id,startTime:i(a)||new Date,endTime:i(r),createdAt:i(n)||new Date,updatedAt:i(o)}},Yd=async(t,s)=>{const a=ut(Ot(Ye,"calendarEvents")),r={id:a.id,userId:t,title:s.title,description:s.description,startTime:s.startTime,endTime:s.endTime,createdAt:new Date};return await Pt(a,{...r,createdAt:lt(),updatedAt:lt()}),r},Kd=async t=>{await Gi(ut(Ye,"calendarEvents",t))},Xd=(t,s={},a,r)=>{if(!t)return a([]),()=>{};const{limitCount:n=500}=s,o=Rt(Ot(Ye,"calendarEvents"),Mt("userId","==",t),Zn(n));return eo(o,i=>{a(i.docs.map(l=>qd(l)))},i=>{console.error("Error subscribing to calendar events:",i),r?.(i)})},zn=t=>String(t).padStart(2,"0"),ms=t=>`${t.getFullYear()}-${zn(t.getMonth()+1)}-${zn(t.getDate())}`,Ja=t=>new Date(t.getFullYear(),t.getMonth(),1),Fn=t=>new Date(t.getFullYear(),t.getMonth()+1,0),Jd=t=>{const s=Ja(t),a=s.getDay(),r=new Date(s);return r.setDate(s.getDate()-a),r.setHours(0,0,0,0),r},Zd=(t,s)=>{const a=new Date(t);return a.setDate(a.getDate()+s),a},Bn=(t,s)=>t.getFullYear()===s.getFullYear()&&t.getMonth()===s.getMonth()&&t.getDate()===s.getDate(),em=(t,s)=>t.getFullYear()===s.getFullYear()&&t.getMonth()===s.getMonth(),tm=t=>t.toLocaleDateString(void 0,{month:"long",year:"numeric"}),$n=t=>t.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"}),On=(t,s)=>{const[a,r,n]=t.split("-").map(l=>parseInt(l,10)),[o,i]=s.split(":").map(l=>parseInt(l,10));return new Date(a,(r||1)-1,n||1,o||0,i||0,0,0)},Pa=[{names:["sun","sunday"],day:0},{names:["mon","monday"],day:1},{names:["tue","tues","tuesday"],day:2},{names:["wed","wednesday"],day:3},{names:["thu","thurs","thursday"],day:4},{names:["fri","friday"],day:5},{names:["sat","saturday"],day:6}];function sm(t){const s=t.toLowerCase(),a=new Set;if(s.includes("daily")||s.includes("everyday"))return[0,1,2,3,4,5,6];if(s.includes("weekends"))return[0,6];if(s.includes("weekdays"))return[1,2,3,4,5];const r=s.match(/(mon|tue|wed|thu|fri|sat|sun)[\s/-]*(mon|tue|wed|thu|fri|sat|sun)/);if(r){const n=Pa.find(i=>i.names.includes(r[1]))?.day,o=Pa.find(i=>i.names.includes(r[2]))?.day;if(n!==void 0&&o!==void 0){let i=n;for(;a.add(i),i!==o;)i=(i+1)%7;return Array.from(a)}}return Pa.forEach(({names:n,day:o})=>{n.some(i=>s.includes(i))&&a.add(o)}),Array.from(a).sort((n,o)=>n-o)}const am=({classes:t,teacherId:s})=>{const{currentUser:a}=Us(),[r,n]=b.useState([]),[o,i]=b.useState(!0),[l,c]=b.useState(""),[d,x]=b.useState(()=>{const L=new Date;return L.setHours(0,0,0,0),L}),[N,m]=b.useState(()=>{const L=new Date;return L.setHours(0,0,0,0),L}),[f,w]=b.useState(!1),[T,j]=b.useState(!1),[h,y]=b.useState(""),[C,D]=b.useState(""),[p,z]=b.useState(()=>ms(new Date)),[g,S]=b.useState("09:00"),[I,B]=b.useState("");b.useEffect(()=>{if(!a?.uid){n([]),i(!1);return}c(""),i(!0);const L=Xd(a.uid,{limitCount:500},k=>{n(k),i(!1)},()=>{c("Unable to load calendar events right now."),i(!1)});return()=>L()},[a?.uid]);const P=b.useMemo(()=>{const L=Ja(d);return L.setHours(0,0,0,0),L},[d]),J=b.useMemo(()=>{const L=Fn(d);return L.setHours(23,59,59,999),L},[d]),ne=b.useMemo(()=>{if(!t||t.length===0)return[];const L=[],k=Ja(d),G=Fn(d),F=new Date(k);for(;F<=G;){const ie=F.getDay();t.forEach(R=>{sm(R.schedule).includes(ie)&&L.push({id:`schedule-${R.id}-${ms(F)}`,userId:s||"",title:R.name,startTime:new Date(F),createdAt:new Date})}),F.setDate(F.getDate()+1)}return L},[t,d,s]),X=b.useMemo(()=>[...r,...ne],[r,ne]),te=b.useMemo(()=>X.filter(L=>L.startTime>=P&&L.startTime<=J).sort((L,k)=>L.startTime.getTime()-k.startTime.getTime()),[X,P,J]),se=b.useMemo(()=>{const L=new Map;for(const k of te){const G=ms(k.startTime),F=L.get(G)||[];F.push(k),L.set(G,F)}return L},[te]),$=b.useMemo(()=>ms(N),[N]),Y=b.useMemo(()=>[...se.get($)||[]].sort((k,G)=>k.startTime.getTime()-G.startTime.getTime()),[se,$]),E=b.useMemo(()=>{const L=Jd(d);return Array.from({length:42}).map((k,G)=>Zd(L,G))},[d]),U=L=>{const k=ms(L);y(""),D(""),z(k),S("09:00"),B(""),w(!0)},W=async()=>{if(a?.uid){if(!h.trim()){c("Event title is required.");return}j(!0),c("");try{const L=On(p,g),k=I?On(p,I):void 0;await Yd(a.uid,{title:h.trim(),description:C.trim()?C.trim():void 0,startTime:L,endTime:k&&k.getTime()>L.getTime()?k:void 0}),w(!1)}catch(L){console.error(L),c("Failed to create event.")}finally{j(!1)}}},ge=async L=>{c("");try{await Kd(L)}catch(k){console.error(k),c("Failed to delete event.")}};return e.jsxs(Ie.div,{initial:{opacity:0,y:18},animate:{opacity:1,y:0},exit:{opacity:0,y:-18},className:"p-4 sm:p-6 space-y-4",children:[e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsx("div",{className:"min-w-0",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-secondary text-secondary-foreground flex items-center justify-center flex-shrink-0",children:e.jsx(El,{size:20})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"text-2xl font-display font-bold text-foreground",children:"Calendar"}),e.jsx("p",{className:"text-sm text-muted-foreground font-body",children:"Check upcoming class events and schedule"})]})]})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ve,{variant:"outline",size:"sm",onClick:()=>{const L=new Date;L.setHours(0,0,0,0),x(L),m(L)},children:"Today"}),e.jsxs(Ve,{size:"sm",onClick:()=>U(N),children:[e.jsx(sa,{}),"Add event"]})]})]}),l&&e.jsx("div",{className:"bg-destructive/10 text-destructive border border-destructive/20 rounded-xl px-4 py-3 text-sm font-body",children:l}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-4",children:[e.jsxs("div",{className:"lg:col-span-8 bg-card border border-border rounded-2xl shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-border flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ve,{variant:"ghost",size:"icon",onClick:()=>{const L=new Date(d.getFullYear(),d.getMonth()-1,1);x(L)},"aria-label":"Previous month",children:e.jsx(Bt,{})}),e.jsx("div",{className:"text-sm sm:text-base font-display font-bold text-foreground",children:tm(d)}),e.jsx(Ve,{variant:"ghost",size:"icon",onClick:()=>{const L=new Date(d.getFullYear(),d.getMonth()+1,1);x(L)},"aria-label":"Next month",children:e.jsx(Ht,{})})]}),e.jsxs("div",{className:"text-xs text-muted-foreground font-body",children:[te.length," event",te.length===1?"":"s"]})]}),e.jsxs("div",{className:"grid grid-cols-7 gap-px bg-border",children:[["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(L=>e.jsx("div",{className:"bg-card px-3 py-2 text-xs font-body font-bold text-muted-foreground",children:L},L)),E.map(L=>{const k=ms(L),G=se.get(k)?.length||0,F=Bn(L,N),ie=Bn(L,new Date),R=em(L,d);return e.jsxs("button",{onClick:()=>{const H=new Date(L);H.setHours(0,0,0,0),m(H)},className:"bg-card px-3 py-3 min-h-[78px] text-left transition-colors hover:bg-accent/40 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 "+(F?"ring-2 ring-primary/40 ":"")+(R?"":"opacity-50 "),children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsx("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center text-sm font-body font-bold "+(ie?"bg-primary text-primary-foreground ":"text-foreground ")+(F&&!ie?"bg-secondary text-secondary-foreground ":""),children:L.getDate()}),G>0&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-primary"}),e.jsx("span",{className:"text-xs font-body text-muted-foreground",children:G})]})]}),G>0&&e.jsxs("div",{className:"mt-2 flex flex-wrap gap-1",children:[(se.get(k)||[]).slice(0,3).map(H=>e.jsx("span",{className:"inline-flex items-center rounded-md bg-secondary text-secondary-foreground px-2 py-0.5 text-[10px] font-body font-bold truncate max-w-full",title:H.title,children:H.title},H.id)),(se.get(k)?.length||0)>3&&e.jsxs("span",{className:"text-[10px] font-body text-muted-foreground",children:["+",(se.get(k)?.length||0)-3," more"]})]})]},k)})]}),o&&e.jsxs("div",{className:"px-4 py-4 border-t border-border flex items-center gap-2 text-muted-foreground",children:[e.jsx(at,{size:18,className:"animate-spin"}),e.jsx("span",{className:"text-sm font-body",children:"Syncing events…"})]})]}),e.jsxs("div",{className:"lg:col-span-4 bg-card border border-border rounded-2xl shadow-sm overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-border flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-display font-bold text-foreground",children:N.toLocaleDateString(void 0,{weekday:"long"})}),e.jsx("div",{className:"text-xs text-muted-foreground font-body",children:N.toLocaleDateString()})]}),e.jsxs(Ve,{variant:"outline",size:"sm",onClick:()=>U(N),children:[e.jsx(sa,{}),"Add"]})]}),e.jsx("div",{className:"p-4",children:Y.length===0?e.jsxs("div",{className:"rounded-xl border border-border bg-muted/30 p-4",children:[e.jsx("div",{className:"text-sm font-body font-bold text-foreground",children:"No events"}),e.jsx("div",{className:"text-xs text-muted-foreground font-body mt-1",children:"Add reminders for quizzes, meetings, or deadlines."})]}):e.jsx("div",{className:"space-y-2",children:Y.map(L=>e.jsxs("div",{className:"rounded-xl border border-border bg-background p-3 flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-primary flex-shrink-0"}),e.jsx("div",{className:"text-sm font-body font-bold text-foreground truncate",children:L.title})]}),e.jsxs("div",{className:"text-xs text-muted-foreground font-body mt-1",children:[$n(L.startTime),L.endTime?` – ${$n(L.endTime)}`:""]}),L.description&&e.jsx("div",{className:"text-xs text-muted-foreground font-body mt-2 line-clamp-2",children:L.description})]}),e.jsx(Ve,{variant:"ghost",size:"icon",onClick:()=>ge(L.id),"aria-label":"Delete event",children:e.jsx(ao,{})})]},L.id))})})]})]}),e.jsx(il,{open:f,onOpenChange:w,children:e.jsxs(ll,{className:"sm:max-w-xl",children:[e.jsxs(cl,{children:[e.jsx(dl,{className:"font-display",children:"Add event"}),e.jsx(ml,{className:"font-body",children:"Create a reminder for your class schedule."})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{className:"sm:col-span-2",children:[e.jsx("label",{className:"text-xs font-body font-bold text-muted-foreground",children:"Title"}),e.jsx(pt,{value:h,onChange:L=>y(L.target.value),placeholder:"e.g., Quiz review session"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-body font-bold text-muted-foreground",children:"Date"}),e.jsx(pt,{type:"date",value:p,onChange:L=>z(L.target.value)})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-body font-bold text-muted-foreground",children:"Start time"}),e.jsx(pt,{type:"time",value:g,onChange:L=>S(L.target.value)})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-body font-bold text-muted-foreground",children:"End time (optional)"}),e.jsx(pt,{type:"time",value:I,onChange:L=>B(L.target.value)})]}),e.jsxs("div",{className:"sm:col-span-2",children:[e.jsx("label",{className:"text-xs font-body font-bold text-muted-foreground",children:"Notes (optional)"}),e.jsx(ul,{value:C,onChange:L=>D(L.target.value),placeholder:"Add context: class, room, agenda…",className:"min-h-24"})]})]}),e.jsxs(xl,{children:[e.jsx(Ve,{variant:"outline",onClick:()=>w(!1),disabled:T,children:"Cancel"}),e.jsx(Ve,{onClick:W,disabled:T,children:T?e.jsxs(e.Fragment,{children:[e.jsx(at,{className:"animate-spin"}),"Saving…"]}):e.jsxs(e.Fragment,{children:[e.jsx(sa,{}),"Create event"]})})]})]})})]})},Zo="PH_SHS_OFFICIAL_CLASS_RECORD",rm=.85,Za=.85,nm="2026.04.24",ei=4,ia=["INPUT DATA","SENIOR HIGH SCHOOL CLASS RECORD","LEARNERS NAMES","WRITTEN WORK","PERFORMANCE TASKS","QUARTERLY ASSESSMENT","REMARK","FINAL SEMESTRAL GRADES"],om=[...ia,"Pursuant to DepEd Order 8 series of 2015","INITIAL GRADE","QUARTERLY GRADE","ADDITIONAL REMARKS","MALE","FEMALE","SUBMITTED BY","CHECKED BY","VERIFIED BY","RECOMMENDED BY","APPROVED BY","WEIGHT OF COMPONENTS","LOOK UP","HELPER","ATTACHMENTS"],im=["SUBMITTED BY","CHECKED BY","VERIFIED BY","RECOMMENDED BY","APPROVED BY"],Ys=["WITH ATTACHMENTS","OFFICIALLY DROPPED","WITHDRAWN","UNOFFICIALLY DROPPED","TRANSFEREE","SHIFTER"],lm=["TOTAL","SUBMITTED BY","CHECKED BY","VERIFIED BY","RECOMMENDED BY","APPROVED BY","WEIGHT OF COMPONENTS"],cm={SECOND:["SECOND QUARTER","2ND QUARTER","Q2"]},us={inputData:["input data"],firstQuarter:["first quarter","1st quarter","q1"],secondQuarter:["second quarter","2nd quarter","q2"],finalSemestral:["final semestral","final grades","semestral"],helper:["helper","weight","attachments"],lookup:["look up","lookup","reference"]},ft={region:["REGION"],division:["DIVISION"],schoolName:["SCHOOL NAME"],schoolId:["SCHOOL ID"],schoolYear:["SCHOOL YEAR"],gradeSection:["GRADE / SECTION","GRADE/SECTION"],semester:["SEMESTER"],track:["TRACK"],subjectCode:["SUBJECT CODE"],subjectName:["SUBJECT NAME","SUBJECT"],teacherName:["TEACHER","NAME OF TEACHER"]},Te={learnerNo:["NO","NO.","#"],learnerName:["LEARNERS NAMES","LEARNER NAME","NAME"],writtenWork:["WRITTEN WORK","WW"],performanceTasks:["PERFORMANCE TASKS","PT"],quarterlyAssessment:["QUARTERLY ASSESSMENT","QA"],total:["TOTAL"],ps:["PS"],ws:["WS"],initialGrade:["INITIAL GRADE"],quarterlyGrade:["QUARTERLY GRADE"],firstQuarter:["FIRST QUARTER","1ST QUARTER"],secondQuarter:["SECOND QUARTER","2ND QUARTER"],firstSemester:["FIRST SEMESTER"],finalGrades:["FINAL GRADES","FINAL GRADE"],remark:["REMARK","REMARKS"],additionalRemarks:["ADDITIONAL REMARKS","ADDITIONAL REMARK"]};function dm(t){return t==null?null:typeof t=="string"||typeof t=="number"||typeof t=="boolean"?t:String(t)}function tt(t){return String(t??"").replace(/[\u00a0\t\r\n]+/g," ").replace(/[|]+/g," ").replace(/\s+/g," ").trim().toUpperCase()}function Pn(t){return tt(t).replace(/[^A-Z0-9]+/g,"")}function je(t,s){const a=tt(t),r=tt(s);if(!a||!r)return!1;if(a.includes(r))return!0;const n=Pn(t),o=Pn(s);return!n||!o?!1:n.includes(o)}function la(t){if(typeof t=="number"&&Number.isFinite(t))return t;if(typeof t=="string"){const s=t.replace(/,/g,"").trim();if(!s)return;const a=Number(s);if(Number.isFinite(a))return a}}function _a(t){return tt(t).toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/^_+|_+$/g,"").slice(0,80)}function ti(t){const s={};return t.forEach(a=>{const r=vt.encode_cell(a.s);for(let n=a.s.r;n<=a.e.r;n+=1)for(let o=a.s.c;o<=a.e.c;o+=1){const i=vt.encode_cell({r:n,c:o});s[i]=r}}),s}function mm(t,s,a){const n=(a||ti(t.merges))[s]||s;return t.cells[n]||t.cells[s]}const si="A1:A1",_n=1200,Hn=200,Gn=2e5;function um(t){const s=Math.max(0,t.s.r),a=Math.max(0,t.s.c);let r=Math.max(s,t.e.r),n=Math.max(a,t.e.c);r-s+1>_n&&(r=s+_n-1),n-a+1>Hn&&(n=a+Hn-1);const o=r-s+1,i=n-a+1;if(o*i>Gn){const c=Math.max(1,Math.floor(Gn/i));r=s+Math.min(o,c)-1}return{s:{r:s,c:a},e:{r,c:n}}}function xm(t){try{return vt.decode_range(t)}catch{return vt.decode_range(si)}}function hm(t){let s=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return Object.keys(t.cells).forEach(o=>{try{const i=vt.decode_cell(o);s=Math.min(s,i.r),a=Math.min(a,i.c),r=Math.max(r,i.r),n=Math.max(n,i.c)}catch{}}),t.merges.forEach(o=>{s=Math.min(s,o.s.r,o.e.r),a=Math.min(a,o.s.c,o.e.c),r=Math.max(r,o.s.r,o.e.r),n=Math.max(n,o.s.c,o.e.c)}),!Number.isFinite(s)||!Number.isFinite(a)||!Number.isFinite(r)||!Number.isFinite(n)?null:{s:{r:Math.max(0,Math.trunc(s)),c:Math.max(0,Math.trunc(a))},e:{r:Math.max(0,Math.trunc(r)),c:Math.max(0,Math.trunc(n))}}}function fm(t){const s=xm(t.ref||si),a=hm(t);return um(a||s)}function pm(t,s){const a=fm(s),r=`${vt.encode_cell(a.s)}:${vt.encode_cell(a.e)}`,n=ti(s.merges),o=a.e.r-a.s.r+1,i=a.e.c-a.s.c+1,l=[];for(let c=0;ct.endRow||at.endCol?null:t.cells[s-t.startRow]?.[a-t.startCol]??null}function qt(t,s){return st.endRow?"":(t.cells[s-t.startRow]||[]).map(r=>r?.normalizedText||"").filter(Boolean).join(" ").trim()}function Ms(t){return vt.encode_col(t)}function ta(t){const s=String(t||"").trim().toUpperCase();if(!s||!/^[A-Z]+$/.test(s))return-1;try{return vt.decode_col(s)}catch{return-1}}function gm(t){return`${vt.encode_cell(t.s)}:${vt.encode_cell(t.e)}`}function bm(t,s){const a=[];for(let r=s.s.r;r<=s.e.r;r+=1){const n=[];for(let o=s.s.c;o<=s.e.c;o+=1){const i=Ee(t,r,o);n.push(i?.displayValue??null)}a.push(n)}return a}function vm(t,s){const a=tt(t),r=tt(s);return!a||!r?0:a===r?1:a.includes(r)?.9:.75}function gr(t,s){const a=[];for(let r=0;r{je(l.normalizedText,c)&&a.push({sheetName:t.sheetName,anchor:c,row:l.row,col:l.col,address:l.address,value:String(l.displayValue??""),confidence:vm(l.displayValue,c)})})}const n=t.startRow+r,o=qt(t,n);o&&s.forEach(i=>{if(!je(o,i))return;const l=t.cells[r].find(c=>c?.normalizedText);l&&a.push({sheetName:t.sheetName,anchor:i,row:n,col:l.col,address:l.address,value:o,confidence:.8})})}return a}function Nm(t,s){return Object.values(t).flatMap(a=>gr(a,s))}function rt(t,s){return gr(t,[s]).sort((a,r)=>a.row-r.row||a.col-r.col)}function ai(t,s,a,r=6){for(let n=1;n<=r;n+=1){const i=Ee(t,s,a+n)?.displayValue;if(i!=null&&String(i).trim())return String(i).trim()}for(let n=1;n<=r;n+=1){const i=Ee(t,s+n,a)?.displayValue;if(i!=null&&String(i).trim())return String(i).trim()}}function ri(t,s,a=5){let r=s,n=-1;for(let o=Math.max(t.startRow,s-a);o<=Math.min(t.endRow,s+a);o+=1){const i=qt(t,o),l=["LEARNERS NAMES","WRITTEN WORK","PERFORMANCE TASKS","QUARTERLY ASSESSMENT","REMARK"].reduce((c,d)=>i.includes(d)?c+1:c,0);l>n&&(n=l,r=o)}return r}function jm(t,s){const a=tt(t).toLowerCase(),r=n=>[...s].some(o=>je(o,n));return us.inputData.some(n=>a.includes(n))||r("INPUT DATA")?"inputData":us.finalSemestral.some(n=>a.includes(n))||r("FINAL SEMESTRAL GRADES")||r("FINAL GRADES")?"finalSemestral":us.firstQuarter.some(n=>a.includes(n))||r("FIRST QUARTER")?"firstQuarter":us.secondQuarter.some(n=>a.includes(n))||r("SECOND QUARTER")?"secondQuarter":r("SENIOR HIGH SCHOOL CLASS RECORD")||r("WRITTEN WORK")&&r("PERFORMANCE TASKS")?"firstQuarter":us.helper.some(n=>a.includes(n))||r("WEIGHT OF COMPONENTS")||r("ATTACHMENTS")||r("HELPER")?"helper":us.lookup.some(n=>a.includes(n))||r("LOOK UP")?"lookup":"other"}function ym(t){const s=t.criticalTotal>0?t.criticalFound/t.criticalTotal:0,a=t.totalSheets>0?t.recognizedSheets/t.totalSheets:0,r=t.hasDepedAnchor?1:0,n=.65*s+.2*a+.15*r;return Number(Math.max(0,Math.min(1,n)).toFixed(4))}function wm(t){const s=Nm(t.matrices,om),a=new Set,r=[];ia.forEach(f=>{s.some(T=>je(T.anchor,f))&&(a.add(f),r.push(`Found critical anchor: ${f}`))});const n=ia.filter(f=>!a.has(f)),o=new Map;s.forEach(f=>{o.has(f.sheetName)||o.set(f.sheetName,new Set),o.get(f.sheetName)?.add(f.anchor)});const i=t.sheetNames.map(f=>{const w=o.get(f)||new Set,T=jm(f,w),j=Math.min(1,.35+Math.min(.55,w.size*.08)),h=[`sheet:${f}`,`signals:${w.size}`,...[...w].slice(0,5)];return{sheetName:f,role:T,confidence:Number(j.toFixed(3)),evidence:h}}),l={firstQuarter:[],secondQuarter:[],finalSemestral:[],helper:[],lookup:[],other:[]};i.forEach(f=>{switch(f.role){case"inputData":l.inputData?l.other.push(f.sheetName):l.inputData=f.sheetName;break;case"firstQuarter":l.firstQuarter.push(f.sheetName);break;case"secondQuarter":l.secondQuarter.push(f.sheetName);break;case"finalSemestral":l.finalSemestral.push(f.sheetName);break;case"helper":l.helper.push(f.sheetName);break;case"lookup":l.lookup.push(f.sheetName);break;case"other":default:l.other.push(f.sheetName);break}});const c=(l.inputData?1:0)+l.firstQuarter.length+l.secondQuarter.length+l.finalSemestral.length+l.helper.length+l.lookup.length,d=ym({criticalFound:a.size,criticalTotal:ia.length,recognizedSheets:c,totalSheets:t.sheetNames.length,hasDepedAnchor:s.some(f=>je(f.anchor,"Pursuant to DepEd Order 8 series of 2015"))}),x=l.firstQuarter.length>0||l.secondQuarter.length>0,N=!!l.inputData&&x&&l.finalSemestral.length>0,m=d>=.55&&N;return l.inputData||r.push("Input Data sheet not confidently detected."),x||r.push("No quarter class record sheet detected."),l.finalSemestral.length===0&&r.push("No Final Semestral Grades sheet detected."),{format:Zo,isOfficialFormatLikely:m,confidence:d,evidence:r,missingCriticalAnchors:n,detectedSheets:l,anchorMatches:s}}function xa(t){if(typeof t=="number"&&Number.isFinite(t))return t;const s=String(t??"").trim();if(!s)return;const a=Number(s.replace(/[^0-9]/g,""));if(!(!Number.isFinite(a)||a<=0))return a}function br(t){const s=tt(t);if(s.includes("FEMALE"))return"FEMALE";if(s.includes("MALE"))return"MALE"}function vr(t){const s=tt(t.rowText);return s?s==="MALE"||s==="FEMALE"?"sex-header":im.some(a=>s.includes(a))?"signature":lm.some(a=>s.includes(a))?"helper":s.includes("LEARNERS NAMES")||s.includes("WRITTEN WORK")||s.includes("PERFORMANCE TASKS")||s.includes("QUARTERLY ASSESSMENT")||s.includes("INITIAL GRADE")||s.includes("QUARTERLY GRADE")?"header":t.hasLearnerName||t.hasLearnerNumber?"learner":s.includes("ATTACHMENTS")||s.includes("LOOK UP")?"helper":"unknown":"blank"}function Sm(t){const s=["SUBMITTED BY","CHECKED BY","VERIFIED BY","RECOMMENDED BY","APPROVED BY"],a=[];return s.forEach(r=>{rt(t,r).forEach(n=>{a.push({role:r,name:String(Ee(t,n.row,n.col+1)?.displayValue||"").trim()||void 0,sourceSheet:t.sheetName,sourceRow:n.row+1})})}),a}function km(t){const s=[],a=rt(t,"LEARNERS NAMES")[0],r=a?ri(t,a.row,5):t.startRow,n=(j,h)=>rt(t,j).find(C=>Math.abs(C.row-r)<=2)?.col??h,o=n(Te.learnerNo[0],t.startCol),i=n(Te.learnerName[0],t.startCol+1),l=n(Te.firstQuarter[0],i+1),c=n(Te.secondQuarter[0],l+1),d=n(Te.firstSemester[0],c+1),x=n(Te.finalGrades[0],d+1),N=n(Te.remark[0],x+1),m=n(Te.additionalRemarks[0],N+1),f=[];let w="UNKNOWN",T=0;for(let j=r+1;j<=t.endRow;j+=1){const h=qt(t,j),y=vr({rowText:h,hasLearnerNumber:/\b\d{1,2}\b/.test(h),hasLearnerName:/[A-Z]{2,}/.test(h)});if(y==="sex-header"){w=br(h)||w;continue}if(y==="signature"||y==="helper")break;if(y==="blank"){if(T+=1,T>=ei)break;continue}if(y!=="learner")continue;T=0;const C=xa(Ee(t,j,o)?.displayValue),D=String(Ee(t,j,i)?.displayValue||"").trim();if(!D&&C===void 0)continue;const p=Ee(t,j,l)?.displayValue??null,z=Ee(t,j,c)?.displayValue??null,g=Ee(t,j,d)?.displayValue??null,S=Ee(t,j,x)?.displayValue??null,I=Ee(t,j,N)?.displayValue??null;let B=Ee(t,j,m)?.displayValue??null;const P=Ys.filter(J=>je(h,J));P.length>0&&(B=[B,P.join("; ")].filter(Boolean).join("; ")||null),!D&&C!==void 0&&s.push(`Row ${j+1} has learner number ${C} but empty learner name.`),f.push({learnerNo:C,fullName:D||`Unnamed Learner ${C||j+1}`,sex:w,firstQuarter:p,secondQuarter:z,firstSemester:g,finalGrades:S,remark:I,additionalRemarks:B,sourceRow:j+1})}return{sheetName:t.sheetName,learnerGrades:f,signatures:Sm(t),warnings:s}}function yt(t,s){for(const a of s){const r=rt(t,a);for(const n of r){const o=ai(t,n.row,n.col,8);if(o&&o.trim())return o.trim()}}}function Cm(t){const s=["SUBMITTED BY","CHECKED BY","VERIFIED BY","RECOMMENDED BY","APPROVED BY"],a=[];return s.forEach(r=>{rt(t,r).forEach(o=>{const i=ai(t,o.row,o.col,10);a.push({role:r,name:i,sourceSheet:t.sheetName,sourceRow:o.row+1})})}),a}function Tm(t){const s=rt(t,"LEARNERS NAMES")[0];if(!s)return[];const a=s.row+1,r=s.col,n=Math.max(t.startCol,r-1),o=Math.min(t.endCol,r+1),i=Math.min(t.endCol,r+2),l=[];let c="UNKNOWN",d=0;for(let x=a;x<=t.endRow;x+=1){const N=qt(t,x),m=vr({rowText:N,hasLearnerNumber:!!xa(Ee(t,x,n)?.displayValue),hasLearnerName:!!String(Ee(t,x,r)?.displayValue||"").trim()});if(m==="sex-header"){c=br(N)||c,d=0;continue}if(m==="signature"||m==="helper")break;if(m!=="learner"){if(m==="blank"&&(d+=1),d>=5)break;continue}d=0;const f=xa(Ee(t,x,n)?.displayValue),w=String(Ee(t,x,r)?.displayValue||"").trim(),T=String(Ee(t,x,o)?.displayValue||"").trim()||void 0,j=String(Ee(t,x,i)?.displayValue||"").trim()||void 0,h=Ys.filter(y=>je(N,y));!w&&f===void 0||l.push({learnerNo:f,sex:c,fullName:w||`Unnamed Learner ${f||x}`,sourceSheet:t.sheetName,sourceRow:x+1,remarks:T,additionalRemarks:j,statuses:h.length>0?h:void 0})}return l}function Im(t){const s=[],a=[];for(let r=t.startRow;r<=t.endRow;r+=1){const n=qt(t,r);if(n){if(Ys.some(o=>je(n,o))){s.push(n);continue}(je(n,"IMPORTANT")||je(n,"NOTE")||je(n,"ATTACHMENT")||je(n,"LOOK UP"))&&a.push(n)}}return{attachmentRules:Array.from(new Set(s)),helperNotes:Array.from(new Set(a))}}function Em(t){const s=[],a={region:yt(t,ft.region),division:yt(t,ft.division),schoolName:yt(t,ft.schoolName),schoolId:yt(t,ft.schoolId),schoolYear:yt(t,ft.schoolYear),gradeSection:yt(t,ft.gradeSection),semester:yt(t,ft.semester),track:yt(t,ft.track),subjectCode:yt(t,ft.subjectCode),subjectName:yt(t,ft.subjectName),teacherName:yt(t,ft.teacherName)},r=Tm(t),n=Cm(t),{attachmentRules:o,helperNotes:i}=Im(t);return a.schoolName||s.push("Input Data metadata is missing School Name."),a.schoolYear||s.push("Input Data metadata is missing School Year."),r.length===0&&s.push("No learners detected in Input Data sheet."),gr(t,Object.values(ft).flat()).length<4&&s.push("Input Data sheet contains limited metadata anchors; layout may have drifted."),{sheetName:t.sheetName,schoolContext:a,learners:r,signatures:n,attachmentRules:o,helperNotes:i,warnings:s}}function Rm(t){const s=tt(t.sheetName);return cm.SECOND.some(a=>je(s,a))?"SECOND":"FIRST"}function Mm(t,s){const a=[],r=[],n=[];let o,i="NONE";for(let l=t.startCol;l<=t.endCol;l+=1){const c=Ee(t,s,l),d=tt(c?.displayValue||""),x=Ee(t,s+1,l),N=String(x?.displayValue||c?.displayValue||"").trim();if(!d&&!N)continue;if(je(d,Te.writtenWork[0])){i="WW";continue}if(je(d,Te.performanceTasks[0])){i="PT";continue}if(je(d,Te.quarterlyAssessment[0])){o={key:_a(N||"quarterly_assessment"),label:N||"Quarterly Assessment",column:Ms(l)},i="DERIVED";continue}if(je(d,Te.initialGrade[0])||je(d,Te.quarterlyGrade[0])||je(d,Te.remark[0])||je(d,Te.additionalRemarks[0])||je(d,Te.firstQuarter[0])||je(d,Te.secondQuarter[0])||je(d,Te.firstSemester[0])||je(d,Te.finalGrades[0])||je(d,Te.ps[0])||je(d,Te.ws[0])||je(d,Te.total[0])){i="DERIVED",n.push({key:_a(N||d),label:N||d,column:Ms(l)});continue}const m={key:_a(N||d||Ms(l)),label:N||d||Ms(l),maxScore:la(x?.displayValue),column:Ms(l)};i==="WW"?a.push(m):i==="PT"?r.push(m):i==="DERIVED"&&n.push(m)}return{writtenWorks:a,performanceTasks:r,quarterlyAssessment:o,derived:n}}function Am(t){const s=["SUBMITTED BY","CHECKED BY","VERIFIED BY","RECOMMENDED BY","APPROVED BY"],a=[];return s.forEach(r=>{rt(t,r).forEach(n=>{const o=Ee(t,n.row,n.col+1),i=String(o?.displayValue||"").trim()||void 0;a.push({role:r,name:i,sourceSheet:t.sheetName,sourceRow:n.row+1})})}),a}function Qn(t,s,a){for(let r=t.startCol;r<=t.endCol;r+=1){const n=tt(Ee(t,s,r)?.displayValue||""),o=tt(Ee(t,s+1,r)?.displayValue||"");if(a.some(i=>je(n,i)||je(o,i)))return r}}function Lm(t,s,a,r){const n={learnerNo:xa(Ee(t,s,r.numberCol)?.displayValue),fullName:String(Ee(t,s,r.nameCol)?.displayValue||"").trim(),sourceRow:s+1},o={};a.writtenWorks.forEach(d=>{const x=d.column?ta(d.column):-1;if(x<0)return;const N=Ee(t,s,x)?.displayValue;o[d.key]=N??null}),Object.keys(o).length>0&&(n.writtenWorks=o);const i={};if(a.performanceTasks.forEach(d=>{const x=d.column?ta(d.column):-1;if(x<0)return;const N=Ee(t,s,x)?.displayValue;i[d.key]=N??null}),Object.keys(i).length>0&&(n.performanceTasks=i),a.quarterlyAssessment?.column){const d=ta(a.quarterlyAssessment.column);n.quarterlyAssessment=Ee(t,s,d)?.displayValue??null}const l=a.derived||[],c={};return l.forEach(d=>{if(!d.column)return;const x=ta(d.column);if(x<0)return;const N=Ee(t,s,x)?.displayValue??null;c[d.key]=N,je(d.label,Te.initialGrade[0])&&(n.initialGrade=N),je(d.label,Te.quarterlyGrade[0])&&(n.quarterlyGrade=N),je(d.label,Te.firstQuarter[0])&&(n.firstQuarter=N),je(d.label,Te.secondQuarter[0])&&(n.secondQuarter=N),je(d.label,Te.firstSemester[0])&&(n.firstSemester=N),je(d.label,Te.finalGrades[0])&&(n.finalGrades=N),je(d.label,Te.remark[0])&&(n.remark=N!==null?String(N):null),je(d.label,Te.additionalRemarks[0])&&(n.additionalRemarks=N!==null?String(N):null)}),Object.keys(c).length>0&&(n.totals=c),n}function Dm(t){const s=Rm(t),a=[],r=rt(t,Te.learnerName[0])[0]||rt(t,Te.learnerName[1])[0],n=r?ri(t,r.row,4):t.startRow,o=Mm(t,n),i=Qn(t,n,Te.learnerNo)??t.startCol,l=Qn(t,n,Te.learnerName)??Math.min(t.endCol,i+1),c=[];let d="UNKNOWN",x=0;for(let w=n+1;w<=t.endRow;w+=1){const T=qt(t,w),j=vr({rowText:T,hasLearnerNumber:/\b\d{1,2}\b/.test(T),hasLearnerName:/[A-Z]{2,}/.test(T)});if(j==="sex-header"){d=br(T)||d;continue}if(j==="signature"||j==="helper")break;if(j==="blank"){if(x+=1,x>=ei)break;continue}if(j!=="learner")continue;x=0;const h=Lm(t,w,o,{numberCol:i,nameCol:l});if(h.sex=d,!h.fullName&&h.learnerNo===void 0)continue;const y=Ys.filter(C=>je(T,C));y.length>0&&!h.additionalRemarks&&(h.additionalRemarks=y.join("; ")),!h.fullName&&h.learnerNo!==void 0&&(a.push(`Row ${w+1} has learner number ${h.learnerNo} but empty name.`),h.fullName=`Unnamed Learner ${h.learnerNo}`),c.push(h)}o.writtenWorks.length===0&&o.performanceTasks.length===0&&a.push(`No detailed assessment columns detected in ${t.sheetName}.`);const N=la(rt(t,"WRITTEN WORK %")[0]?.value||rt(t,"WRITTEN WORK")[0]?.value),m=la(rt(t,"PERFORMANCE TASKS %")[0]?.value||rt(t,"PERFORMANCE TASKS")[0]?.value),f=la(rt(t,"QUARTERLY ASSESSMENT %")[0]?.value||rt(t,"QUARTERLY ASSESSMENT")[0]?.value);return{sheetName:t.sheetName,quarter:s,gradingWeights:{writtenWork:N,performanceTasks:m,quarterlyAssessment:f},assessmentColumns:o,learnerGrades:c,signatures:Am(t),warnings:a}}function zm(t){const s=["SUBMITTED BY","CHECKED BY","VERIFIED BY","RECOMMENDED BY","APPROVED BY"],a=[];return s.forEach(r=>{rt(t,r).forEach(n=>{a.push({role:r,name:String(Ee(t,n.row,n.col+1)?.displayValue||"").trim()||void 0,sourceSheet:t.sheetName,sourceRow:n.row+1})})}),a}function Fm(t){const s=[];let a=!1;for(let r=t.startRow;r<=t.endRow;r+=1){const n=qt(t,r);if(!n){if(a&&s.length>0)break;continue}if(je(n,"WEIGHT OF COMPONENTS")){a=!0;continue}if(!a)continue;const o={sourceRow:r+1,raw:n};for(let i=t.startCol;i<=t.endCol;i+=1){const l=Ee(t,r,i)?.displayValue;l==null||String(l).trim()===""||(o[`c${i}`]=l)}Object.keys(o).length>2&&s.push(o)}return s}function Bm(t){const s=[],a=[],r=[],n=[],o=[];return t.forEach(i=>{zm(i).forEach(l=>a.push(l)),Fm(i).forEach(l=>r.push({...l,sourceSheet:i.sheetName}));for(let l=i.startRow;l<=i.endRow;l+=1){const c=qt(i,l);if(c){if(Ys.some(d=>je(c,d))){n.push(`${i.sheetName}: ${c}`);continue}(je(c,"HELPER")||je(c,"LOOK UP")||je(c,"IMPORTANT")||je(c,"REFERENCE")||je(c,"ATTACHMENT"))&&o.push(`${i.sheetName}: ${c}`)}}}),r.length===0&&s.push("No component weight rows were parsed from reference sheets."),{sheetName:t.map(i=>i.sheetName).join(", "),componentWeights:r,attachmentRules:Array.from(new Set(n)),helperNotes:Array.from(new Set(o)),signatures:a,warnings:s}}function $m(t,s,a){const r=new Map,n=o=>{const i=`${tt(o.fullName)}|${o.learnerNo||""}|${o.sourceSheet}`,l=r.get(i);if(!l){r.set(i,o);return}const c=Array.from(new Set([...l.statuses||[],...o.statuses||[]]));r.set(i,{...l,...o,remarks:o.remarks||l.remarks,additionalRemarks:o.additionalRemarks||l.additionalRemarks,statuses:c.length>0?c:void 0})};return t.forEach(n),s.forEach(o=>{o.learnerGrades.forEach(i=>{n({learnerNo:i.learnerNo,sex:i.sex,fullName:i.fullName,sourceSheet:o.sheetName,sourceRow:i.sourceRow,remarks:i.remark||void 0,additionalRemarks:i.additionalRemarks||void 0})})}),a.forEach(o=>{o.learnerGrades.forEach(i=>{n({learnerNo:i.learnerNo,sex:i.sex,fullName:i.fullName,sourceSheet:o.sheetName,sourceRow:i.sourceRow,remarks:i.remark||void 0,additionalRemarks:i.additionalRemarks||void 0})})}),Array.from(r.values())}function Om(t,s,a,r){const n=[...t.signatures,...s.flatMap(i=>i.signatures),...a.flatMap(i=>i.signatures),...r.signatures],o=new Map;return n.forEach(i=>{const l=`${tt(i.role)}|${tt(i.name||"")}|${i.sourceSheet}`;o.set(l,i)}),Array.from(o.values())}function Pm(t){const s=$m(t.inputData.learners,t.quarterSheets,t.finalSheets);return{format:Zo,version:nm,workbookMeta:{fileName:t.workbook.fileName,sheetNames:t.workbook.sheetNames,detectedSheets:{inputData:t.detection.detectedSheets.inputData,firstQuarter:t.detection.detectedSheets.firstQuarter,secondQuarter:t.detection.detectedSheets.secondQuarter,finalSemestral:t.detection.detectedSheets.finalSemestral,helper:t.detection.detectedSheets.helper,lookup:t.detection.detectedSheets.lookup,other:t.detection.detectedSheets.other}},schoolContext:{...t.inputData.schoolContext},learners:s,quarterlyRecords:t.quarterSheets.map(a=>({sheetName:a.sheetName,quarter:a.quarter,gradingWeights:a.gradingWeights,assessmentColumns:a.assessmentColumns,learnerGrades:a.learnerGrades})),finalSemestralRecords:t.finalSheets.map(a=>({sheetName:a.sheetName,learnerGrades:a.learnerGrades})),references:{componentWeights:t.references.componentWeights,attachmentRules:Array.from(new Set([...t.inputData.attachmentRules||[],...t.references.attachmentRules||[]])),helperNotes:Array.from(new Set([...t.inputData.helperNotes||[],...t.references.helperNotes||[]])),signatures:Om(t.inputData,t.quarterSheets,t.finalSheets,t.references),unclassifiedBlocks:t.unclassifiedBlocks},validation:t.validation,raw:t.workbook.raw}}function _m(t){return!t||t.length===0?[]:t.map(s=>({s:{r:s.s.r,c:s.s.c},e:{r:s.e.r,c:s.e.c}}))}function Hm(t){const s={ref:t["!ref"],merges:_m(t["!merges"]),cells:{}};return Object.keys(t).filter(a=>!a.startsWith("!")).forEach(a=>{const r=t[a];!r||!(r.v!==void 0||typeof r.w=="string"&&r.w.trim().length>0||typeof r.f=="string"&&r.f.trim().length>0)||(s.cells[a]={v:r.v,w:r.w,t:r.t,f:r.f})}),s}function Gm(t,s){const a=Sl(s,{type:"array",cellFormula:!0,cellNF:!0,cellText:!0,cellDates:!0,raw:!1}),r={},n={};return a.SheetNames.forEach(o=>{const i=a.Sheets[o];if(!i)return;const l=Hm(i);n[o]=l,r[o]=pm(o,l)}),{fileName:t,sheetNames:a.SheetNames,raw:{sheets:n},matrices:r}}async function Qm(t){const s=await t.arrayBuffer();return Gm(t.name,s)}class Um{state={};markRange(s,a,r){const n=s;this.state[n]||(this.state[n]={mappedAddresses:new Set,mappings:[]});for(let o=a.s.r;o<=a.e.r;o+=1)for(let i=a.s.c;i<=a.e.c;i+=1)this.state[n].mappedAddresses.add(`${o}:${i}`);this.state[n].mappings.push({sheetName:s,range:a,reason:r})}getMappings(){return Object.values(this.state).flatMap(s=>s.mappings)}getMappedRegionCount(){return this.getMappings().length}getUnmappedBlocks(s,a="unclassified"){const r=[];return Object.values(s).forEach(n=>{const o=new Set,i=this.state[n.sheetName]?.mappedAddresses??new Set;for(let l=n.startRow;l<=n.endRow;l+=1)for(let c=n.startCol;c<=n.endCol;c+=1){const d=`${l}:${c}`;if(o.has(d)||i.has(d))continue;const x=Ee(n,l,c);if(!(x&&x.displayValue!==null&&x.displayValue!==void 0&&String(x.displayValue).trim())){o.add(d);continue}const m=this.collectComponent(n,l,c,i,o);m&&r.push({sheetName:n.sheetName,range:gm(m),purposeGuess:a,raw2D:bm(n,m)})}}),r}collectComponent(s,a,r,n,o){const i=[{row:a,col:r}];let l=a,c=a,d=r,x=r,N=!1;for(;i.length>0;){const m=i.shift();if(!m)break;const f=`${m.row}:${m.col}`;if(o.has(f)||n.has(f))continue;o.add(f);const w=Ee(s,m.row,m.col);w&&w.displayValue!==null&&w.displayValue!==void 0&&String(w.displayValue).trim()&&(N=!0,l=Math.min(l,m.row),c=Math.max(c,m.row),d=Math.min(d,m.col),x=Math.max(x,m.col),[{row:m.row-1,col:m.col},{row:m.row+1,col:m.col},{row:m.row,col:m.col-1},{row:m.row,col:m.col+1}].forEach(j=>{j.rows.endRow||j.cols.endCol||i.push(j)}))}return N?{s:{r:l,c:d},e:{r:c,c:x}}:null}}function Vm(t){const s=t.detection.detectedSheets,a=[s.inputData?1:0,s.firstQuarter.length,s.secondQuarter.length,s.finalSemestral.length,s.helper.length,s.lookup.length].reduce((r,n)=>r+n,0);return{totalSheets:t.totalSheets,recognizedSheets:a,unclassifiedSheets:s.other.length,mappedCellRegions:t.mappedCellRegions,unmappedCellRegions:t.unmappedCellRegions}}function Wm(t){const s=new Map;t.forEach(r=>{const n=`${r.learnerNo||""}|${r.fullName.trim().toUpperCase()}`;s.has(n)||s.set(n,[]),s.get(n)?.push(r.sourceRow)});const a=[];return s.forEach((r,n)=>{r.length>1&&a.push(`Duplicate learner entry detected for ${n} at rows ${r.join(", ")}.`)}),a}function qm(t){const s=[];return t.forEach(a=>{a.learnerGrades.forEach(r=>{r.fullName.trim()||s.push(`${a.sheetName} row ${r.sourceRow}: learner name is blank.`);const n=r.writtenWorks&&Object.values(r.writtenWorks).some(i=>i!==null&&i!==""),o=r.performanceTasks&&Object.values(r.performanceTasks).some(i=>i!==null&&i!=="");!n&&!o&&r.quarterlyAssessment==null&&s.push(`${a.sheetName} row ${r.sourceRow}: all grade blocks are empty.`)})}),s}function Ym(t){const s=[];return t.forEach(a=>{a.learnerGrades.forEach(r=>{r.fullName.trim()||s.push(`${a.sheetName} row ${r.sourceRow}: learner name is blank.`),r.finalGrades==null&&r.firstSemester==null&&r.firstQuarter==null&&r.secondQuarter==null&&s.push(`${a.sheetName} row ${r.sourceRow}: no semestral/final values detected.`)})}),s}function Km(t){const s=[],a=[];t.detection.detectedSheets.inputData||a.push("Missing Input Data sheet."),t.quarterSheets.length===0&&a.push("No quarter class record sheets were extracted."),t.finalSheets.length===0&&a.push("No Final Semestral sheet was extracted."),t.detection.missingCriticalAnchors.length>0&&s.push(`Missing critical anchors: ${t.detection.missingCriticalAnchors.join(", ")}.`),Wm(t.inputData.learners).forEach(o=>s.push(o)),qm(t.quarterSheets).forEach(o=>s.push(o)),Ym(t.finalSheets).forEach(o=>s.push(o)),s.push(...t.inputData.warnings),t.quarterSheets.forEach(o=>s.push(...o.warnings)),t.finalSheets.forEach(o=>s.push(...o.warnings)),t.unmappedCellRegions>t.mappedCellRegions&&s.push("A significant portion of workbook regions are unclassified; review diagnostics before confirming import.");const r=t.detection.confidence,n=t.detection.isOfficialFormatLikely&&a.length===0;return r({fullName:i.fullName,learnerNo:i.learnerNo,sex:i.sex,remarks:i.remarks,additionalRemarks:i.additionalRemarks,statuses:i.statuses,sourceSheet:i.sourceSheet,sourceRow:i.sourceRow})),r=t.quarterlyRecords.flatMap(i=>i.learnerGrades.map(l=>({fullName:l.fullName,sourceSheet:i.sheetName,sourceRow:l.sourceRow,quarter:i.quarter,firstQuarter:l.firstQuarter,secondQuarter:l.secondQuarter,firstSemester:l.firstSemester,finalGrades:l.finalGrades,quarterlyGrade:l.quarterlyGrade,initialGrade:l.initialGrade,remark:l.remark,additionalRemarks:l.additionalRemarks}))),n=t.finalSemestralRecords.flatMap(i=>i.learnerGrades.map(l=>({fullName:l.fullName,sourceSheet:i.sheetName,sourceRow:l.sourceRow,firstQuarter:l.firstQuarter,secondQuarter:l.secondQuarter,firstSemester:l.firstSemester,finalGrades:l.finalGrades,remark:l.remark,additionalRemarks:l.additionalRemarks}))),o=[...t.learners,...t.quarterlyRecords.flatMap(i=>i.learnerGrades.map(l=>({learnerNo:l.learnerNo,sex:l.sex,fullName:l.fullName,sourceSheet:i.sheetName,sourceRow:l.sourceRow,remarks:l.remark||void 0,additionalRemarks:l.additionalRemarks||void 0})))].map(i=>({fullName:i.fullName,remark:i.remarks||null,additionalRemarks:i.additionalRemarks||null,statuses:"statuses"in i?i.statuses:void 0,sourceSheet:i.sourceSheet,sourceRow:i.sourceRow}));return{classEntity:s,studentEntities:a,gradeEntities:[...r,...n],remarksEntities:o}}const Un=1500;function Vn(t){return t?Object.values(t.matrices).reduce((s,a)=>s+a.rowCount*a.colCount,0):0}function Wn(t){const s=`[shs-import] parse ${t.stage} file=${t.fileName} duration=${t.durationMs}ms sheets=${t.sheetCount} matrixCells=${t.matrixCellCount}`;if(t.stage==="failed"){console.error(`${s}${t.errorMessage?` error=${t.errorMessage}`:""}`);return}if(t.durationMs>=Un){console.warn(`${s} slow=true threshold=${Un}ms`);return}}function Xt(t,s){t?.onProgress?.(s)}function Jm(t,s){return Array.from(new Set(t.filter(a=>Number.isFinite(a)).map(a=>Math.max(s.startRow,Math.min(s.endRow,Math.trunc(a))))))}function As(t,s,a,r){Jm(a,s).forEach(n=>{t.markRange(s.sheetName,{s:{r:n,c:s.startCol},e:{r:n,c:s.endCol}},r)})}async function Zm(t,s){const a=s?.confidenceThreshold??rm,r=Date.now();let n=null;try{if(Xt(s,{stage:"reading",message:"Reading workbook structure and raw sheets..."}),n=await Qm(t),!n)throw new Error("Workbook read returned null");Xt(s,{stage:"detecting-format",message:"Detecting DepEd SHS workbook format..."});const o=wm(n);Xt(s,{stage:"extracting",message:"Extracting metadata, learners, grades, and references..."});const i=o.detectedSheets.inputData||n.sheetNames[0],l=n.matrices[i],c=l?Em(l):{sheetName:i,schoolContext:{},learners:[],signatures:[],attachmentRules:[],helperNotes:[],warnings:["Input data sheet was not available in matrix map."]},x=[...o.detectedSheets.firstQuarter||[],...o.detectedSheets.secondQuarter||[]].map(C=>n.matrices[C]).filter(C=>!!C).map(C=>Dm(C)),N=(o.detectedSheets.finalSemestral||[]).map(C=>n.matrices[C]).filter(C=>!!C).map(C=>km(C)),m=[...o.detectedSheets.helper||[],...o.detectedSheets.lookup||[]].map(C=>n.matrices[C]).filter(C=>!!C),f=Bm(m),w=new Um;o.anchorMatches.forEach(C=>{const D=n.matrices[C.sheetName];D&&As(w,D,[C.row],`Anchor match: ${C.anchor}`)}),[c.sheetName].forEach(C=>{const D=n.matrices[C];if(!D)return;const p=Array.from({length:Math.min(14,D.rowCount)},(S,I)=>D.startRow+I),z=c.learners.map(S=>S.sourceRow-1),g=c.signatures.map(S=>S.sourceRow).filter(S=>typeof S=="number").map(S=>S-1);As(w,D,[...p,...z,...g],"Input Data parsed rows")}),x.forEach(C=>{const D=n.matrices[C.sheetName];if(!D)return;const p=C.learnerGrades.map(S=>S.sourceRow-1),z=C.signatures.map(S=>S.sourceRow).filter(S=>typeof S=="number").map(S=>S-1),g=p.length>0?Math.max(D.startRow,Math.min(...p)-2):D.startRow;As(w,D,[g,g+1,...p,...z],"Quarter sheet parsed rows")}),N.forEach(C=>{const D=n.matrices[C.sheetName];if(!D)return;const p=C.learnerGrades.map(S=>S.sourceRow-1),z=C.signatures.map(S=>S.sourceRow).filter(S=>typeof S=="number").map(S=>S-1),g=p.length>0?Math.max(D.startRow,Math.min(...p)-2):D.startRow;As(w,D,[g,g+1,...p,...z],"Final semestral parsed rows")}),m.forEach(C=>{const D=f.componentWeights.filter(g=>g.sourceSheet===C.sheetName).map(g=>g.sourceRow).filter(g=>typeof g=="number").map(g=>g-1),p=f.signatures?.filter(g=>g.sourceSheet===C.sheetName).map(g=>g.sourceRow).filter(g=>typeof g=="number").map(g=>g-1)||[],z=D.length===0&&p.length===0?[C.startRow,C.startRow+1,C.startRow+2]:[];As(w,C,[...D,...p,...z],"Reference/helper parsed rows")});const T=w.getUnmappedBlocks(n.matrices);Xt(s,{stage:"validating",message:"Validating completeness and structural integrity..."});const j=Km({detection:o,inputData:c,quarterSheets:x,finalSheets:N,mappedCellRegions:w.getMappedRegionCount(),unmappedCellRegions:T.length,totalSheets:n.sheetNames.length});Xt(s,{stage:"normalizing",message:"Normalizing parsed workbook and creating entity mapping..."});const h=Pm({workbook:n,detection:o,inputData:c,quarterSheets:x,finalSheets:N,references:f,validation:j,unclassifiedBlocks:T});h.validation.confidence=5?"high":t.atRiskCount>=2?"medium":"low",a=et({metadata:t.classMetadata,classSectionId:t.classSectionId,className:t.name,grade:t.grade,gradeLevel:t.gradeLevel,classification:t.classification,strand:t.strand,section:t.section,schoolYear:t.schoolYear,ownerTeacherId:t.ownerTeacherId||t.teacherId,ownerTeacherName:t.ownerTeacherName,adviserTeacherId:t.adviserTeacherId||t.teacherId,adviserTeacherName:t.adviserTeacherName||t.ownerTeacherName,managerId:t.managerId,managerName:t.managerName});return{id:t.id,name:a.className||t.name,classSectionId:a.classSectionId||t.classSectionId,classMetadata:a,gradeLevel:a.gradeLevel||void 0,classification:a.classification||void 0,strand:a.strand||void 0,managerId:a.managerId||void 0,managerName:a.managerName||void 0,schedule:t.schedule,studentCount:t.studentCount,avgScore:t.avgScore,atRiskCount:t.atRiskCount,riskLevel:s}}function tu(t,s){const a=t.riskLevel.toLowerCase(),r=t.lastActive?ni(t.lastActive.toDate()):"Unknown",n=t.className||s||"Imported Class",o=Et(n),i=t.grade||o.grade,l=t.section||o.section,c=et({metadata:t.classMetadata,classSectionId:t.classSectionId||t.classroomId,className:[i,l].filter(Boolean).join(" - ")||n,grade:i,gradeLevel:t.gradeLevel,classification:t.classification,strand:t.strand,section:l,adviserTeacherId:t.teacherId,ownerTeacherId:t.teacherId,managerId:t.classMetadata?.managerId||t.managerId,managerName:t.classMetadata?.managerName||t.managerName});return{id:t.id,lrn:t.lrn,name:t.name,avatar:t.avatar||`https://ui-avatars.com/api/?name=${encodeURIComponent(t.name)}&background=random`,avgScore:t.avgQuizScore,riskLevel:a,weakestTopic:t.weakestTopic||"N/A",classroomId:t.classroomId||c.classSectionId||n,className:c.className||[i,l].filter(Boolean).join(" - ")||n,grade:i,gradeLevel:c.gradeLevel||is(i)||void 0,classification:c.classification||js(c.gradeLevel||i)||void 0,strand:c.strand||ys(c.className,l)||void 0,section:l,classSectionId:c.classSectionId||t.classSectionId,classMetadata:c,managerId:c.managerId||void 0,managerName:c.managerName||void 0,lastActive:r,struggles:t.struggles||[],engagementScore:t.engagementScore,attendance:t.attendance,assignmentCompletion:t.assignmentCompletion}}function su(t){const s=t.atRiskCount>=5?"high":t.atRiskCount>=2?"medium":"low",a=et({metadata:t.classMetadata,classSectionId:t.classSectionId,className:t.name,grade:t.grade,gradeLevel:t.gradeLevel||t.classMetadata?.gradeLevel,classification:t.classification||t.classMetadata?.classification,strand:t.strand||t.classMetadata?.strand,section:t.section,managerId:t.managerId||t.classMetadata?.managerId,managerName:t.managerName||t.classMetadata?.managerName});return{id:t.id,name:a.className||t.name,classSectionId:a.classSectionId||t.classSectionId||void 0,classMetadata:a,gradeLevel:a.gradeLevel||void 0,classification:a.classification||void 0,strand:a.strand||void 0,managerId:a.managerId||void 0,managerName:a.managerName||void 0,schedule:t.schedule||"Mon-Fri",studentCount:t.studentCount,avgScore:t.avgScore,atRiskCount:t.atRiskCount,riskLevel:s}}function au(t){const s=(t.riskLevel||"Low").toLowerCase(),a=et({metadata:t.classMetadata,classSectionId:t.classSectionId,className:t.className||[t.grade,t.section].filter(Boolean).join(" - ")||"Imported Class",grade:t.grade,gradeLevel:t.gradeLevel||t.classMetadata?.gradeLevel,classification:t.classification||t.classMetadata?.classification,strand:t.strand||t.classMetadata?.strand,section:t.section,managerId:t.managerId||t.classMetadata?.managerId,managerName:t.managerName||t.classMetadata?.managerName}),r=a.className||"Imported Class";return{id:t.id,lrn:t.lrn||void 0,name:t.name,avatar:`https://ui-avatars.com/api/?name=${encodeURIComponent(t.name)}&background=random`,avgScore:t.avgQuizScore,riskLevel:s,weakestTopic:t.weakestTopic||"Foundational Skills",classroomId:a.classSectionId||t.classSectionId||r,className:r,grade:a.grade||Et(r).grade,gradeLevel:a.gradeLevel||is(a.grade||Et(r).grade)||void 0,classification:a.classification||js(a.gradeLevel||a.grade)||void 0,strand:a.strand||ys(r,a.section||t.section)||void 0,section:a.section||Et(r).section,classSectionId:a.classSectionId||t.classSectionId||void 0,classMetadata:a,managerId:a.managerId||void 0,managerName:a.managerName||void 0,lastActive:"Recently imported",struggles:[t.weakestTopic||"Foundational Skills"],engagementScore:t.engagementScore,attendance:t.attendance,assignmentCompletion:t.assignmentCompletion}}function ru(t,s,a){return t<60||s<75||a<55?"high":t<75||s<85||a<70?"medium":"low"}function nu(t,s,a,r){const n=et({metadata:r,classSectionId:s,className:a}),o=n.className||"Imported Class",i=n.classSectionId||"imported_class",l=Number(t.avgQuizScore||0),c=Number(t.attendance||0),d=Number(t.engagementScore||0),x=Number(t.assignmentCompletion||0),N=t.unknownFields?.weakestTopic||t.unknownFields?.topic||"Foundational Skills",m=ru(l,c,d),f=t.studentId||t.lrn||t.email||t.name||Math.random().toString(36).slice(2);return{id:`upload-${i}-${f}`,lrn:t.lrn,name:t.name,avatar:`https://ui-avatars.com/api/?name=${encodeURIComponent(t.name)}&background=random`,avgScore:l,riskLevel:m,weakestTopic:N,classroomId:i,className:o,grade:n.grade||Et(o).grade,gradeLevel:n.gradeLevel||is(n.grade||Et(o).grade)||void 0,classification:n.classification||js(n.gradeLevel||n.grade)||void 0,strand:n.strand||ys(o,n.section)||void 0,section:n.section||Et(o).section,classSectionId:i,classMetadata:n,managerId:n.managerId||void 0,managerName:n.managerName||void 0,lastActive:"Recently imported",struggles:[N],engagementScore:d,attendance:c,assignmentCompletion:x}}function ou(t,s,a,r){const n=et({metadata:t.dashboardSync?.classMetadata||t.classMetadata||r,classSectionId:t.dashboardSync?.classSectionId||s,className:t.dashboardSync?.className||a}),o=n.classSectionId||"imported_class",i=n.className||"Imported Class";return{classSectionId:o,className:i,classMetadata:{...n,classSectionId:o,className:i}}}function ni(t){const s=Date.now()-t.getTime(),a=Math.floor(s/6e4);if(a<1)return"Just now";if(a<60)return`${a} min${a>1?"s":""} ago`;const r=Math.floor(a/60);if(r<24)return`${r} hour${r>1?"s":""} ago`;const n=Math.floor(r/24);return`${n} day${n>1?"s":""} ago`}function Je(t){return(t||"").trim().toLowerCase()}function qn(t){const s=Je(t.classSectionId);if(s)return`section:${s}`;const a=(t.id||"").trim().toLowerCase();return a?`id:${a}`:`name:${(t.name||"").trim().toLowerCase()}`}function Yn(t,s){const a=new Map;return t.forEach(r=>{a.set(qn(r),r)}),s.forEach(r=>{const n=qn(r),o=a.get(n);if(!o){a.set(n,r);return}const i=Math.max(o.atRiskCount||0,r.atRiskCount||0),l=Math.max(o.studentCount||0,r.studentCount||0),c=r.avgScore>0?r.avgScore:o.avgScore,d=i>=5?"high":i>=2?"medium":"low",x=et({metadata:o.classMetadata,classSectionId:o.classSectionId||r.classSectionId,className:o.name||r.name,grade:o.classMetadata?.grade||r.classMetadata?.grade,gradeLevel:o.classMetadata?.gradeLevel||r.classMetadata?.gradeLevel,classification:o.classMetadata?.classification||r.classMetadata?.classification,strand:o.classMetadata?.strand||r.classMetadata?.strand,section:o.classMetadata?.section||r.classMetadata?.section,schoolYear:o.classMetadata?.schoolYear||r.classMetadata?.schoolYear,ownerTeacherId:o.classMetadata?.ownerTeacherId||r.classMetadata?.ownerTeacherId,ownerTeacherName:o.classMetadata?.ownerTeacherName||r.classMetadata?.ownerTeacherName,adviserTeacherId:o.classMetadata?.adviserTeacherId||r.classMetadata?.adviserTeacherId,adviserTeacherName:o.classMetadata?.adviserTeacherName||r.classMetadata?.adviserTeacherName,managerId:o.classMetadata?.managerId||r.classMetadata?.managerId,managerName:o.classMetadata?.managerName||r.classMetadata?.managerName});a.set(n,{...o,classSectionId:x.classSectionId||o.classSectionId||r.classSectionId,name:x.className||o.name||r.name,classMetadata:x,gradeLevel:x.gradeLevel||void 0,classification:x.classification||void 0,strand:x.strand||void 0,managerId:x.managerId||void 0,managerName:x.managerName||void 0,schedule:o.schedule||r.schedule,studentCount:l,atRiskCount:i,avgScore:c,riskLevel:d})}),Array.from(a.values())}function Kn(t){const s=(t.lrn||"").trim().toLowerCase();if(s)return`lrn:${s}`;const a=t.name.trim().toLowerCase();if(a)return`name:${a}`;const r=Je(t.classSectionId)||Je(t.classroomId),n=(t.id||"").trim().toLowerCase();return r&&n?`${r}|id:${n}`:`${r}|anonymous`}function gs(t){const s=Je(t.classSectionId)||Je(t.classroomId),a=(t.lrn||"").trim().toLowerCase(),r=(t.id||"").trim().toLowerCase(),n=t.name.trim().toLowerCase().replace(/\s+/g,"_");return s&&a?`${s}|lrn:${a}`:s&&r?`${s}|id:${r}`:a?`lrn:${a}`:r&&n?`id:${r}|name:${n}`:r?`id:${r}`:s&&n?`${s}|name:${n}`:`name:${n||"unknown"}`}function Xn(t,s){const a=new Map;return t.forEach(r=>{a.set(Kn(r),r)}),s.forEach(r=>{const n=Kn(r),o=a.get(n);if(!o){a.set(n,r);return}const i=[o.riskLevel,r.riskLevel].includes("high")?"high":[o.riskLevel,r.riskLevel].includes("medium")?"medium":"low",l=et({metadata:o.classMetadata,classSectionId:o.classSectionId||r.classSectionId,className:o.className||r.className,grade:o.grade||r.grade,gradeLevel:o.gradeLevel||r.gradeLevel,classification:o.classification||r.classification,strand:o.strand||r.strand,section:o.section||r.section,managerId:o.managerId||r.managerId,managerName:o.managerName||r.managerName});a.set(n,{...o,lrn:o.lrn||r.lrn,classSectionId:l.classSectionId||o.classSectionId||r.classSectionId,classroomId:o.classroomId||r.classroomId,className:l.className||o.className||r.className,grade:l.grade||o.grade||r.grade,gradeLevel:l.gradeLevel||o.gradeLevel||r.gradeLevel,classification:l.classification||o.classification||r.classification,strand:l.strand||o.strand||r.strand,section:l.section||o.section||r.section,managerId:l.managerId||o.managerId||r.managerId,managerName:l.managerName||o.managerName||r.managerName,classMetadata:l,avgScore:r.avgScore>0?r.avgScore:o.avgScore,attendance:r.attendance>0?r.attendance:o.attendance,engagementScore:r.engagementScore>0?r.engagementScore:o.engagementScore,assignmentCompletion:r.assignmentCompletion>0?r.assignmentCompletion:o.assignmentCompletion,weakestTopic:o.weakestTopic&&o.weakestTopic!=="N/A"?o.weakestTopic:r.weakestTopic,riskLevel:i,struggles:o.struggles.length>0?o.struggles:r.struggles})}),Array.from(a.values())}const bx=({onLogout:t,onOpenProfile:s,onOpenSettings:a})=>{const{currentUser:r,userProfile:n}=Us(),[o,i]=b.useState("dashboard"),[l,c]=b.useState(!1),[d,x]=b.useState(!1),[N,m]=b.useState(!1),[f,w]=b.useState(!1),[T,j]=b.useState(!1),[h,y]=b.useState(null),[C,D]=b.useState(null),[p,z]=b.useState([]),[g,S]=b.useState([]),[I,B]=b.useState([]),[P,J]=b.useState(""),[ne,X]=b.useState(!0),[te,se]=b.useState(!1),[$,Y]=b.useState(0),[E,U]=b.useState([]),[W,ge]=b.useState(!1),L=b.useRef(new Map);b.useEffect(()=>{if(!r)return;const v=r.uid;let _=!0,le;return(async()=>{X(!0);try{const Fe=await qo(v);let be=Fe.map(eu);const Oe=await jd(v).catch(()=>[]),Ue=new Map;Oe.forEach(K=>{const me=Je(K.classSectionId);me&&Ue.set(me,K)}),be=be.map(K=>{const me=Ue.get(Je(K.classSectionId));if(!me)return K;const Be=et({metadata:K.classMetadata,classSectionId:me.classSectionId||K.classSectionId,className:me.className||K.name,grade:me.grade||K.classMetadata?.grade,gradeLevel:me.gradeLevel||K.classMetadata?.gradeLevel,classification:me.classification||K.classMetadata?.classification,strand:me.strand||K.classMetadata?.strand,section:me.section||K.classMetadata?.section,schoolYear:me.schoolYear||K.classMetadata?.schoolYear,ownerTeacherId:me.ownerTeacherId||K.classMetadata?.ownerTeacherId,ownerTeacherName:me.ownerTeacherName||K.classMetadata?.ownerTeacherName,managerId:me.managerId||K.classMetadata?.managerId,managerName:me.managerName||K.classMetadata?.managerName});return{...K,name:Be.className||K.name,classSectionId:Be.classSectionId||K.classSectionId,classMetadata:Be,gradeLevel:Be.gradeLevel||K.gradeLevel,classification:Be.classification||K.classification,strand:Be.strand||K.strand,managerId:Be.managerId||K.managerId,managerName:Be.managerName||K.managerName}});const Ne=new Map,it=new Map;Fe.forEach(K=>{const me=et({metadata:K.classMetadata,classSectionId:K.classSectionId,className:K.name,grade:K.grade,gradeLevel:K.gradeLevel,classification:K.classification,strand:K.strand,section:K.section,schoolYear:K.schoolYear,ownerTeacherId:K.ownerTeacherId||K.teacherId,ownerTeacherName:K.ownerTeacherName,adviserTeacherId:K.adviserTeacherId||K.teacherId,adviserTeacherName:K.adviserTeacherName,managerId:K.managerId,managerName:K.managerName});Ne.set(K.id,me.className||K.name),it.set(K.id,me);const Be=Je(K.classSectionId);if(Be){const ke=Ue.get(Be),Ze=et({metadata:me,classSectionId:ke?.classSectionId||Be,className:ke?.className||me.className,grade:ke?.grade||me.grade,gradeLevel:ke?.gradeLevel||me.gradeLevel,classification:ke?.classification||me.classification,strand:ke?.strand||me.strand,section:ke?.section||me.section,schoolYear:ke?.schoolYear||me.schoolYear,ownerTeacherId:ke?.ownerTeacherId||me.ownerTeacherId,ownerTeacherName:ke?.ownerTeacherName||me.ownerTeacherName,managerId:ke?.managerId||me.managerId,managerName:ke?.managerName||me.managerName});Ne.set(Be,Ze.className||K.name),it.set(Be,Ze)}});const Lt=(await pr(v)).map(K=>{const me=Je(K.classSectionId||K.classroomId),Be=Ne.get(K.classroomId)||(me?Ne.get(me):void 0)||K.className||"Unknown",ke=tu(K,Be);if(!me)return ke;const Ze=it.get(me);if(!Ze)return ke;const dt=et({metadata:Ze,classSectionId:ke.classSectionId||Ze.classSectionId,className:ke.className||Ze.className,grade:ke.grade||Ze.grade,gradeLevel:ke.gradeLevel||Ze.gradeLevel,classification:ke.classification||Ze.classification,strand:ke.strand||Ze.strand,section:ke.section||Ze.section,managerId:ke.managerId||Ze.managerId,managerName:ke.managerName||Ze.managerName});return{...ke,className:dt.className||ke.className,grade:dt.grade||ke.grade,gradeLevel:dt.gradeLevel||ke.gradeLevel,classification:dt.classification||ke.classification,strand:dt.strand||ke.strand,section:dt.section||ke.section,classSectionId:dt.classSectionId||ke.classSectionId,classMetadata:dt,managerId:dt.managerId||ke.managerId,managerName:dt.managerName||ke.managerName}});if(!_)return;z(K=>be.length===0&&K.length>0?K:be),S(K=>Lt.length===0&&K.length>0?K:Lt),We.getImportedClassOverview({limit:3e3,forceRefresh:$>0}).then(K=>{_&&(K.warnings.length>0&&console.warn("Imported class overview warnings:",K.warnings.join(" ")),z(me=>Yn(me,K.classrooms.map(su))),S(me=>Xn(me,K.students.map(au))))}).catch(K=>{console.warn("Imported class overview merge unavailable:",K)});const Dt=Fe.map(K=>K.id);Dt.length>0&&(le=wd(Dt,K=>{_&&B(K.map(me=>({id:me.id,student:me.studentName,action:me.action,topic:me.topic,time:ni(me.timestamp.toDate()),type:me.type})))}))}catch(Fe){console.error("Failed to load teacher data:",Fe),ue.error("Failed to load dashboard data")}finally{X(!1)}})(),()=>{_=!1,le&&le()}},[r,$]),b.useEffect(()=>{if(!r)return;let v=!0;return yd("",80).then(_=>{v&&U(_)}).catch(_=>{console.warn("Failed to load teacher directory options:",_)}),()=>{v=!1}},[r]),b.useEffect(()=>{if(g.length===0)return;(async()=>{se(!0);try{const _=g.map(de=>({name:de.name,engagementScore:de.engagementScore,avgQuizScore:de.avgScore,attendance:de.attendance,riskLevel:de.riskLevel})),le=await We.getDailyInsight({students:_});J(le.insight)}catch{J(`${g.filter(_=>_.riskLevel==="high").length} students are at high risk of falling behind. Review their progress in the analytics view.`)}finally{se(!1)}})()},[g]);const k=p.reduce((v,_)=>v+_.studentCount,0),G=p.reduce((v,_)=>v+_.atRiskCount,0),F=p.length>0?Math.round(p.reduce((v,_)=>v+_.avgScore,0)/p.length):0,ie=[{name:"High Risk",value:g.filter(v=>v.riskLevel==="high").length,color:"#FF8B8B"},{name:"Medium Risk",value:g.filter(v=>v.riskLevel==="medium").length,color:"#F08386"},{name:"Low Risk",value:g.filter(v=>v.riskLevel==="low").length,color:"#75D06A"}],R={};g.forEach(v=>{v.weakestTopic&&v.weakestTopic!=="N/A"&&(R[v.weakestTopic]||(R[v.weakestTopic]={total:0,sum:0}),R[v.weakestTopic].total+=1,R[v.weakestTopic].sum+=v.avgScore)});const H=Object.entries(R).map(([v,_])=>({topic:v,score:Math.round(_.sum/_.total)})).sort((v,_)=>v.score-_.score).slice(0,6),q=v=>{y(v),i("analytics")},ae=v=>{D(v),i("intervention")},ee=()=>{D(null),i("analytics")},V=()=>{y(null),D(null),i("dashboard")},pe=async(v,_)=>{if(!r){ue.error("Unable to assign manager: teacher context is missing.");return}const le=Et(v.classMetadata?.className||v.name),de=et({metadata:v.classMetadata,classSectionId:v.classSectionId,className:v.name,grade:v.classMetadata?.grade||le.grade,gradeLevel:v.classMetadata?.gradeLevel,classification:v.classMetadata?.classification,strand:v.classMetadata?.strand,section:v.classMetadata?.section||le.section,schoolYear:v.classMetadata?.schoolYear||String(new Date().getFullYear()),ownerTeacherId:v.classMetadata?.ownerTeacherId||r.uid,ownerTeacherName:v.classMetadata?.ownerTeacherName||Me,adviserTeacherId:v.classMetadata?.adviserTeacherId||r.uid,adviserTeacherName:v.classMetadata?.adviserTeacherName||Me,managerId:_.uid,managerName:_.name}),Fe=de.classSectionId||St(de.grade||le.grade,de.section||le.section);if(!Fe){ue.error("Unable to assign manager: missing class section ID.");return}ge(!0);try{await Nd({classSectionId:Fe,className:de.className||v.name,grade:de.grade||le.grade,gradeLevel:de.gradeLevel||is(de.grade||le.grade)||de.grade||le.grade,classification:de.classification||js(de.gradeLevel||de.grade)||void 0,strand:de.strand||ys(de.className,de.section)||void 0,section:de.section||le.section,schoolYear:de.schoolYear||String(new Date().getFullYear()),ownerTeacherId:de.ownerTeacherId||r.uid,ownerTeacherName:de.ownerTeacherName||Me,managerId:_.uid,managerName:_.name});const be=et({metadata:de,classSectionId:Fe,managerId:_.uid,managerName:_.name}),Oe=Je(Fe);z(Ue=>Ue.map(Ne=>Je(Ne.classSectionId)!==Oe?Ne:{...Ne,name:be.className||Ne.name,classSectionId:be.classSectionId||Ne.classSectionId,classMetadata:be,gradeLevel:be.gradeLevel||Ne.gradeLevel,classification:be.classification||Ne.classification,strand:be.strand||Ne.strand,managerId:_.uid,managerName:_.name})),S(Ue=>Ue.map(Ne=>{if(Je(Ne.classSectionId||Ne.classroomId)!==Oe)return Ne;const ht=et({metadata:Ne.classMetadata,classSectionId:be.classSectionId||Ne.classSectionId,className:Ne.className||be.className,grade:Ne.grade||be.grade,gradeLevel:Ne.gradeLevel||be.gradeLevel,classification:Ne.classification||be.classification,strand:Ne.strand||be.strand,section:Ne.section||be.section,managerId:_.uid,managerName:_.name});return{...Ne,classMetadata:ht,gradeLevel:ht.gradeLevel||Ne.gradeLevel,classification:ht.classification||Ne.classification,strand:ht.strand||Ne.strand,managerId:_.uid,managerName:_.name}})),y(Ue=>!Ue||Je(Ue.classSectionId)!==Oe?Ue:{...Ue,classMetadata:be,managerId:_.uid,managerName:_.name,gradeLevel:be.gradeLevel||Ue.gradeLevel,classification:be.classification||Ue.classification,strand:be.strand||Ue.strand}),ue.success(`Assigned ${_.name} as section manager.`)}catch(be){console.error("Failed to assign class manager:",be),ue.error(be instanceof Error?be.message:"Failed to assign class manager")}finally{ge(!1)}};b.useEffect(()=>{const v=()=>{const _=window.innerWidth<1024;w(_),_?c(!1):m(!1)};return v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[]),b.useEffect(()=>{f&&m(!1)},[o,f]);const Me=n?.name||"Teacher",ye=b.useMemo(()=>{if(!h)return;if(h.classMetadata?.classSectionId)return h.classMetadata.classSectionId||void 0;if(h.classSectionId)return h.classSectionId;const v=Et(h.classMetadata?.className||h.name);return St(v.grade,v.section)||void 0},[h]),De=b.useMemo(()=>h||p[0]||null,[h,p]),Ge=b.useMemo(()=>{if(!De)return g;const v=(De.id||"").trim().toLowerCase(),_=Je(De.classSectionId),le=(De.name||"").trim().toLowerCase();return g.filter(de=>{const Fe=Je(de.classroomId),be=Je(de.classSectionId),Oe=(de.className||"").trim().toLowerCase();return _&&(be===_||Fe===_)||v&&(Fe===v||be===v)||le&&Oe===le})},[De,g]);return ne?e.jsxs("div",{className:"flex h-screen w-full bg-background p-6",children:[e.jsx("div",{className:"hidden lg:flex w-[280px] shrink-0 rounded-3xl border border-border bg-card p-5",children:e.jsxs("div",{className:"w-full space-y-4",children:[e.jsx(ce,{className:"h-12 w-40"}),e.jsx(ce,{className:"h-10 w-full"}),e.jsx(ce,{className:"h-10 w-full"}),e.jsx(ce,{className:"h-10 w-full"}),e.jsx(ce,{className:"h-10 w-full"})]})}),e.jsxs("div",{className:"flex-1 space-y-4 lg:pl-6",children:[e.jsx(ce,{className:"h-20 w-full rounded-2xl"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsx(ce,{className:"h-28 w-full rounded-2xl"}),e.jsx(ce,{className:"h-28 w-full rounded-2xl"}),e.jsx(ce,{className:"h-28 w-full rounded-2xl"})]}),e.jsx(ce,{className:"h-[420px] w-full rounded-2xl"})]})]}):e.jsxs("div",{className:"relative flex h-screen w-full bg-background overflow-hidden",children:[f&&N&&e.jsx("button",{"aria-label":"Close navigation",className:"fixed inset-0 z-30 bg-slate-900/40 backdrop-blur-[1px]",onClick:()=>m(!1)}),e.jsxs(Ie.aside,{initial:!1,animate:{width:f?280:l&&!d?80:280,x:f?N?0:-300:0},transition:{type:"spring",stiffness:360,damping:34},onMouseEnter:()=>!f&&l&&x(!0),onMouseLeave:()=>x(!1),className:"fixed inset-y-0 left-0 z-40 bg-[#f7f9fc] rounded-3xl border border-[#dde3eb] flex flex-col shadow-sm lg:static lg:z-auto p-5",children:[e.jsxs("div",{className:`mb-8 flex items-center ${l&&!d?"justify-center":"justify-between"}`,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-12 h-12 bg-gradient-to-r from-[#7274ED] to-[#9956DE] rounded-2xl flex items-center justify-center shadow-md flex-shrink-0",children:e.jsx("img",{src:"/avatar/avatar_icon.png",alt:"MathPulse AI",className:"w-10 h-10 object-contain drop-shadow-md"})}),(!l||d)&&e.jsx("div",{children:e.jsx("h1",{className:"text-base font-bold font-display text-[#0a1628] whitespace-nowrap",children:"MathPulse AI"})})]}),!f&&(!l||d)&&e.jsx(Ie.button,{whileHover:{scale:1.1},whileTap:{scale:.95},onClick:()=>c(!l),className:"p-2 hover:bg-[#dde3eb] rounded-lg transition-colors text-[#5a6578]","aria-label":l?"Expand sidebar":"Collapse sidebar",children:l?e.jsx(Ht,{size:20}):e.jsx(Bt,{size:20})}),f&&e.jsx("button",{onClick:()=>m(!1),className:"p-2 hover:bg-[#dde3eb] rounded-lg transition-colors text-[#5a6578]","aria-label":"Close navigation",children:e.jsx(ca,{size:20})})]}),e.jsxs("nav",{className:"flex-1 space-y-5",children:[e.jsxs("div",{children:[l&&!d?e.jsx("div",{className:"px-4 mb-2 flex items-center gap-2",children:e.jsx("div",{className:"flex-1 h-[1px] bg-[#dde3eb]"})}):e.jsx("p",{className:"px-4 mb-2 text-[10px] font-bold text-[#5a6578] uppercase tracking-widest",children:"Overview"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(Ft,{icon:Mi,label:"Dashboard",active:o==="dashboard",collapsed:l&&!d,onClick:V,forceExpanded:f}),e.jsx(Ft,{icon:Bs,label:"Class Analytics",active:o==="analytics",collapsed:l&&!d,onClick:()=>i("analytics"),forceExpanded:f})]})]}),e.jsxs("div",{children:[l&&!d?e.jsx("div",{className:"px-4 mb-2 flex items-center gap-2",children:e.jsx("div",{className:"flex-1 h-[1px] bg-[#dde3eb]"})}):e.jsx("p",{className:"px-4 mb-2 text-[10px] font-bold text-[#5a6578] uppercase tracking-widest",children:"Students"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(Ft,{icon:kl,label:"Topic Mastery",active:o==="topic_mastery",collapsed:l&&!d,onClick:()=>i("topic_mastery"),forceExpanded:f}),e.jsx(Ft,{icon:Ga,label:"Competency",active:o==="competency",collapsed:l&&!d,onClick:()=>i("competency"),forceExpanded:f})]})]}),e.jsxs("div",{children:[l&&!d?e.jsx("div",{className:"px-4 mb-2 flex items-center gap-2",children:e.jsx("div",{className:"flex-1 h-[1px] bg-[#dde3eb]"})}):e.jsx("p",{className:"px-4 mb-2 text-[10px] font-bold text-[#5a6578] uppercase tracking-widest",children:"Tools"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(Ft,{icon:hl,label:"Data Import",active:o==="import",collapsed:l&&!d,onClick:()=>i("import"),forceExpanded:f}),e.jsx(Ft,{icon:mo,label:"AI Quiz Maker",active:o==="quiz_maker",collapsed:l&&!d,onClick:()=>i("quiz_maker"),forceExpanded:f}),e.jsx(Ft,{icon:ss,label:"Question Bank",active:o==="question_bank",collapsed:l&&!d,onClick:()=>i("question_bank"),forceExpanded:f}),e.jsx(Ft,{icon:aa,label:"Notifications",active:o==="notifications",collapsed:l&&!d,onClick:()=>i("notifications"),forceExpanded:f}),e.jsx(Ft,{icon:Cl,label:"Calendar",active:o==="calendar",collapsed:l&&!d,onClick:()=>i("calendar"),forceExpanded:f})]})]})]}),e.jsxs("div",{className:"space-y-2 border-t border-[#dde3eb] pt-4",children:[e.jsxs(Ie.button,{whileHover:{x:2},whileTap:{scale:.98},className:`w-full flex items-center gap-3 px-4 py-3 rounded-2xl text-[#5a6578] font-bold border border-transparent hover:bg-[#dde3eb] hover:border-[#dde3eb] hover:text-[#0a1628] transition-all duration-200 whitespace-nowrap ${l&&!d?"justify-center":""}`,onClick:a,title:l&&!d?"Settings":"",children:[e.jsx(Ai,{size:18,strokeWidth:2,className:"flex-shrink-0"}),(!l||d)&&e.jsx("span",{className:"font-body text-xs",children:"Settings"})]}),e.jsx("div",{className:"text-[#5a6578]",children:e.jsx(Li,{onClick:()=>j(!0),collapsed:l&&!d})})]})]}),e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsx("header",{className:"bg-card/80 backdrop-blur-md border-b border-border px-6 py-3 sticky top-0 z-30",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[f&&e.jsx("button",{onClick:()=>m(!0),className:"mt-1 p-2 rounded-lg border border-border text-muted-foreground hover:text-[#9956DE] hover:border-[#9956DE]/30 hover:bg-[#9956DE]/12 transition-colors","aria-label":"Open navigation",children:e.jsx(Oi,{size:18})}),e.jsxs("div",{children:[e.jsxs("h1",{className:"text-xl font-display font-bold text-foreground leading-tight",children:[o==="dashboard"&&"Teacher Dashboard",o==="analytics"&&(h?h.name:"Class Analytics"),o==="intervention"&&"Student Intervention",o==="topic_mastery"&&"Topic Mastery",o==="competency"&&"Student Competency",o==="import"&&"Data Import",o==="notifications"&&"Notifications",o==="calendar"&&"Calendar",o==="quiz_maker"&&"AI Quiz Maker",o==="question_bank"&&"Question Bank"]}),e.jsxs("p",{className:"text-xs text-muted-foreground font-body",children:[o==="dashboard"&&`Welcome back, ${Me}`,o==="analytics"&&"Deep dive into class performance",o==="intervention"&&C?.name,o==="topic_mastery"&&"Monitor class-wide topic mastery",o==="competency"&&"Per-student topic-level breakdown",o==="import"&&"Upload class records and materials",o==="quiz_maker"&&"Create and manage AI-powered quizzes",o==="question_bank"&&"Manage RAG-powered quiz question bank",o==="notifications"&&"View classroom alerts and updates",o==="calendar"&&"Check upcoming class events and schedule"]})]}),o==="dashboard"&&e.jsxs("div",{className:"hidden xl:flex items-center gap-2 ml-2",children:[e.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 bg-[#9956DE]/12 border border-[#9956DE]/30 rounded-lg",children:[e.jsx(Ga,{size:13,className:"text-[#9956DE]"}),e.jsxs("span",{className:"text-xs font-display font-bold text-[#9956DE]",children:[k," students"]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 bg-[#F08386]/12 border border-[#F08386]/30 rounded-lg",children:[e.jsx(bs,{size:13,className:"text-[#F08386]"}),e.jsxs("span",{className:"text-xs font-display font-bold text-[#C65E63]",children:[G," at risk"]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 bg-[#75D06A]/14 border border-[#75D06A]/35 rounded-lg",children:[e.jsx(sr,{size:13,className:"text-[#75D06A]"}),e.jsxs("span",{className:"text-xs font-display font-bold text-[#4D9F46]",children:[F,"% avg"]})]})]})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs("button",{onClick:s,className:"flex items-center gap-2.5 bg-muted p-1.5 pr-3 rounded-lg cursor-pointer hover:bg-accent transition-all group max-w-[220px]",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg overflow-hidden ring-1 ring-[#9956DE]/45 bg-card flex items-center justify-center",children:e.jsx(Pi,{src:n?.photo,name:Me,className:"w-full h-full rounded-lg"})}),e.jsxs("div",{className:"hidden md:block min-w-0 text-left",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground leading-none group-hover:text-[#9956DE] transition-colors truncate",children:Me}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-none",children:"Teacher"})]})]})})]})}),e.jsx("main",{className:"flex-1 overflow-y-auto",children:e.jsxs(es,{mode:"wait",children:[o==="dashboard"&&e.jsx(lu,{classes:p,liveActivity:I,onViewClass:q,onViewAllClasses:()=>i("analytics"),onViewActivityStudent:v=>{const _=g.find(le=>le.name===v);_&&ae(_)},dailyInsight:P,insightLoading:te,totalStudents:k,totalAtRisk:G,avgPerformance:F}),o==="analytics"&&De&&e.jsx(du,{selectedClass:De,students:Ge,riskDistribution:ie,topicPerformance:H,onViewStudent:ae,onBack:V,teacherOptions:E,managerUpdating:W,onAssignManager:v=>pe(De,v)}),o==="analytics"&&!De&&e.jsx(iu,{icon:Bs,title:"Class Analytics",description:"No classes available yet. Import class records to unlock analytics views."}),o==="intervention"&&C&&e.jsx(mu,{student:C,teacherId:r?.uid||"",teacherName:Me,initialCache:L.current.get(C.id),onCacheUpdate:(v,_)=>L.current.set(v,_),onStudentUpdated:v=>{const _=C?gs(C):null;D(v),S(le=>le.map(de=>{const Fe=gs(de),be=_?Fe===_:!1,Oe=de.id===v.id&&Je(de.classSectionId)===Je(v.classSectionId);return be||Oe?v:de}))},onBack:ee}),o==="topic_mastery"&&e.jsx(Pd,{classSectionId:ye}),o==="competency"&&e.jsx(Ud,{classSectionId:ye,className:h?.name,fallbackStudents:g}),o==="import"&&e.jsx(uu,{onEditRecords:()=>i("edit_records"),classSectionId:ye,className:h?.name,classMetadata:h?.classMetadata,onImportedClassRecords:v=>{const _=v.students.map(Ne=>nu(Ne,v.classSectionId,v.className,v.classMetadata)),le=et({metadata:v.classMetadata,classSectionId:v.classSectionId,className:v.className}),de=le.classSectionId||"imported_class",Fe=le.className||"Imported Class",be=_.filter(Ne=>Ne.riskLevel==="high").length,Oe=_.length>0?Math.round(_.reduce((Ne,it)=>Ne+it.avgScore,0)/_.length):0,Ue={id:de,name:Fe,classSectionId:de,classMetadata:{...le,classSectionId:de,className:Fe},schedule:"Mon-Fri",studentCount:_.length,avgScore:Oe,atRiskCount:be,riskLevel:be>=5?"high":be>=2?"medium":"low"};S(Ne=>Xn(Ne,_)),z(Ne=>Yn(Ne,[Ue]))},onDataChanged:()=>Y(v=>v+1)}),o==="notifications"&&e.jsx(Wd,{liveActivity:I,atRiskStudents:g.filter(v=>v.riskLevel==="high").map(v=>({name:v.name,riskLevel:v.riskLevel,weakestTopic:v.weakestTopic}))}),o==="calendar"&&e.jsx(am,{classes:p,teacherId:r?.uid}),o==="edit_records"&&e.jsx(xu,{students:g,teacherId:r?.uid||"",teacherName:Me,onBack:()=>i("import")}),o==="quiz_maker"&&e.jsx(Fd,{onBack:()=>i("dashboard")}),o==="question_bank"&&e.jsx(Bd,{})]})})]}),e.jsx(Ei,{isOpen:T,onClose:()=>j(!1),onConfirm:t,title:"Logout",message:"Are you sure you want to logout?",confirmText:"Logout",cancelText:"Cancel"})]})},Ft=({icon:t,label:s,active:a,collapsed:r,forceExpanded:n=!1,onClick:o})=>e.jsxs(Ie.button,{onClick:o,whileHover:{x:2},whileTap:{scale:.98},className:`w-full flex items-center gap-3 px-4 py-3 rounded-2xl cursor-pointer transition-all duration-200 border whitespace-nowrap ${r&&!n?"justify-center":""} ${a?"bg-[#9956DE]/12 border-[#9956DE]/30 shadow-sm text-[#9956DE]":"bg-transparent border-transparent text-[#5a6578] hover:bg-[#dde3eb] hover:border-[#dde3eb] hover:text-[#0a1628]"}`,children:[e.jsx(t,{size:18,strokeWidth:a?2.5:2,className:"flex-shrink-0"}),(!r||n)&&e.jsx("span",{className:"font-body font-bold text-xs",children:s}),a&&!r&&e.jsx(Ie.div,{layoutId:"sidebar-active-indicator",className:"ml-auto w-2 h-2 rounded-full bg-[#9956DE]",transition:{type:"spring",duration:.4}})]}),iu=({icon:t,title:s,description:a})=>e.jsx(Ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"p-6",children:e.jsxs("div",{className:"bg-card border border-border rounded-2xl p-8 shadow-sm max-w-2xl",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-[#9956DE]/20 text-[#9956DE] flex items-center justify-center mb-4",children:e.jsx(t,{size:24})}),e.jsx("h2",{className:"text-2xl font-display font-bold text-foreground mb-2",children:s}),e.jsx("p",{className:"text-sm text-muted-foreground font-body leading-relaxed",children:a})]})}),lu=({classes:t,liveActivity:s,onViewClass:a,onViewAllClasses:r,onViewActivityStudent:n,dailyInsight:o,insightLoading:i,totalStudents:l,totalAtRisk:c,avgPerformance:d})=>{const x=l>0?Math.round(c/l*100):0,N=l>0?Math.round((l-c)/l*100):0;return e.jsxs(Ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"p-6 space-y-6",children:[e.jsx("div",{className:"bg-gradient-to-r from-[#7274ED] to-[#9956DE] rounded-2xl p-5 text-white shadow-md",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-card/20 rounded-lg flex items-center justify-center flex-shrink-0",children:e.jsx(bs,{size:20})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("h2",{className:"text-base font-display font-bold mb-1",children:"AI Insight"}),e.jsx(oa,{name:"teacher-dashboard-ai-insight",loading:i,fixture:e.jsxs("div",{className:"space-y-2 pt-1",children:[e.jsx(ce,{className:"h-3.5 w-11/12 bg-white/25"}),e.jsx(ce,{className:"h-3.5 w-10/12 bg-white/20"}),e.jsx(ce,{className:"h-3.5 w-8/12 bg-white/15"})]}),fallback:e.jsxs("div",{className:"space-y-2 pt-1",children:[e.jsx(ce,{className:"h-3.5 w-11/12 bg-white/25"}),e.jsx(ce,{className:"h-3.5 w-10/12 bg-white/20"}),e.jsx(ce,{className:"h-3.5 w-8/12 bg-white/15"})]}),children:e.jsx("div",{children:e.jsx("div",{"aria-live":"polite","aria-atomic":"true",className:"text-[#F1E4FF] text-sm leading-relaxed [&_p]:m-0 [&_strong]:font-semibold",children:e.jsx(lo,{children:o||`${c} students (${x}%) are at high risk of falling behind`})})})})]})]})}),e.jsxs("div",{className:"grid grid-cols-2 xl:grid-cols-4 gap-4",children:[e.jsxs("div",{className:"bg-card rounded-xl p-4 border border-border shadow-sm",children:[e.jsx("p",{className:"text-xs text-muted-foreground font-body mb-1",children:"Total Students"}),e.jsx("p",{className:"text-2xl font-display font-bold text-foreground",children:l})]}),e.jsxs("div",{className:"bg-card rounded-xl p-4 border border-border shadow-sm",children:[e.jsx("p",{className:"text-xs text-muted-foreground font-body mb-1",children:"Class Average"}),e.jsxs("p",{className:"text-2xl font-display font-bold text-[#9956DE]",children:[d,"%"]})]}),e.jsxs("div",{className:"bg-card rounded-xl p-4 border border-border shadow-sm",children:[e.jsx("p",{className:"text-xs text-muted-foreground font-body mb-1",children:"Engagement Rate"}),e.jsxs("p",{className:"text-2xl font-display font-bold text-[#75D06A]",children:[N,"%"]})]}),e.jsxs("div",{className:"bg-card rounded-xl p-4 border border-[#FF8B8B]/35 shadow-sm",children:[e.jsx("p",{className:"text-xs text-muted-foreground font-body mb-1",children:"At Risk"}),e.jsx("p",{className:"text-2xl font-display font-bold text-[#FF8B8B]",children:c})]})]}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"xl:col-span-2 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h2",{className:"text-xl font-display font-bold text-foreground",children:"My Classes"}),e.jsxs("button",{onClick:r,className:"text-sm font-bold text-[#9956DE] hover:text-[#9956DE] flex items-center gap-1 group",children:["View All",e.jsx(Ht,{size:16,className:"group-hover:translate-x-1 transition-transform"})]})]}),e.jsx("div",{className:"space-y-4",children:t.map(m=>e.jsxs(Ie.div,{whileHover:{scale:1.01},className:"bg-card border border-border rounded-2xl p-6 shadow-sm hover:shadow-md transition-all cursor-pointer",onClick:()=>a(m),children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("h3",{className:"text-lg font-display font-bold text-foreground",children:m.name}),e.jsx("span",{className:`px-3 py-1 rounded-lg text-xs font-bold border ${ba(m.riskLevel)}`,children:m.riskLevel==="high"?"High Risk":m.riskLevel==="medium"?"Medium Risk":"Low Risk"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(co,{size:14}),e.jsx("span",{children:m.schedule})]}),e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:[m.gradeLevel,m.classification,m.strand].filter(Boolean).map(f=>e.jsx("span",{className:"px-2 py-0.5 rounded-md bg-[#9956DE]/12 border border-[#9956DE]/30 text-[#9956DE] text-[11px] font-semibold",children:f},`${m.id}-${f}`))}),e.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:["Manager: ",m.managerName||m.classMetadata?.managerName||"Not assigned"]})]}),e.jsx(Ve,{className:"bg-[#9956DE] hover:bg-[#7A44B3] text-white font-bold px-6 py-2 rounded-xl",children:"View Class"})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Total Students"}),e.jsx("p",{className:"text-xl font-bold text-foreground",children:m.studentCount})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"At Risk"}),e.jsx("p",{className:"text-xl font-bold text-[#FF8B8B]",children:m.atRiskCount})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Avg Score"}),e.jsxs("p",{className:"text-xl font-bold text-[#9956DE]",children:[m.avgScore,"%"]})]})]})]},m.id))})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-10 h-10 bg-[#F08386]/20 rounded-xl flex items-center justify-center",children:e.jsx(er,{size:20,className:"text-[#F08386]"})}),e.jsx("h2",{className:"text-xl font-display font-bold text-foreground",children:"Live Classroom Pulse"})]}),e.jsxs("div",{className:"bg-card rounded-2xl p-5 shadow-sm border border-border space-y-3 max-h-[600px] overflow-y-auto",children:[s.length===0&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"No live classroom events yet. Activity appears here in real time."}),s.map(m=>e.jsxs("div",{onClick:()=>n?.(m.student),className:`p-4 rounded-xl border-l-4 cursor-pointer hover:shadow-md transition-shadow ${m.type==="success"?"bg-[#75D06A]/14 border-[#75D06A]":m.type==="warning"?"bg-[#F08386]/12 border-[#F08386]":"bg-[#9956DE]/12 border-[#9956DE]"}`,children:[e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsx("p",{className:"font-bold text-foreground text-sm",children:m.student}),e.jsx("span",{className:"text-xs text-slate-500",children:m.time})]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[m.action," ",e.jsx("span",{className:"font-bold text-foreground",children:m.topic})]})]},m.id))]})]})]})]})},cu=re.memo(({student:t,onViewStudent:s})=>e.jsxs(Ie.div,{whileHover:{scale:1.02},onClick:()=>s(t),className:`p-4 rounded-2xl border-2 cursor-pointer hover:shadow-md transition-all ${hu(t.riskLevel)}`,children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("img",{src:t.avatar,alt:t.name,className:"w-12 h-12 rounded-xl object-cover border-2 border-current"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h4",{className:"font-bold text-foreground",children:t.name}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t.lastActive})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-xs font-bold text-muted-foreground",children:"Avg Score"}),e.jsxs("span",{className:"text-xs font-bold text-foreground",children:[t.avgScore,"%"]})]}),e.jsx("div",{className:"h-2 bg-card rounded-full overflow-hidden e-w",style:{"--w":`${t.avgScore}%`},children:e.jsx("div",{className:`h-full rounded-full ${t.riskLevel==="high"?"bg-[#FF8B8B]":t.riskLevel==="medium"?"bg-[#F08386]":"bg-[#75D06A]"}`})})]})]})),du=({selectedClass:t,students:s,riskDistribution:a,topicPerformance:r,onViewStudent:n,onBack:o,teacherOptions:i,managerUpdating:l,onAssignManager:c})=>{const[d,x]=b.useState(""),[N,m]=b.useState("");b.useEffect(()=>{m(t.classMetadata?.managerId||t.managerId||"")},[t]);const f=b.useMemo(()=>{const p=d.trim().toLowerCase();return p?s.filter(z=>z.name.toLowerCase().includes(p)||(z.lrn||"").toLowerCase().includes(p)||(z.weakestTopic||"").toLowerCase().includes(p)):s},[d,s]),w=b.useMemo(()=>{if(s.length===0)return 0;const p=s.reduce((z,g)=>z+(g.assignmentCompletion||0),0);return Math.round(p/s.length)},[s]),T=b.useMemo(()=>{if(s.length===0)return 0;const p=s.reduce((g,S)=>g+(S.attendance||0),0)/s.length,z=s.reduce((g,S)=>g+(S.engagementScore||0),0)/s.length;return Math.round(p*.6+z*.4)},[s]),j=b.useMemo(()=>[...s].sort((p,z)=>z.avgScore-p.avgScore).slice(0,5),[s]),h=b.useMemo(()=>[...s].filter(p=>p.riskLevel==="high"||p.avgScore<70||p.assignmentCompletion<65).sort((p,z)=>{if(p.riskLevel!==z.riskLevel){const g={high:3,medium:2,low:1};return g[z.riskLevel]-g[p.riskLevel]}return p.avgScore-z.avgScore}).slice(0,6),[s]),y=b.useMemo(()=>i.find(p=>p.uid===N),[i,N]),C=()=>{if(!y){ue.error("Select a teacher manager first.");return}c(y)},D=[t.classMetadata?.gradeLevel||t.gradeLevel,t.classMetadata?.classification||t.classification,t.classMetadata?.strand||t.strand].filter(Boolean);return e.jsxs(Ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"p-6",children:[e.jsxs("button",{onClick:o,className:"flex items-center gap-2 text-muted-foreground hover:text-[#9956DE] font-bold mb-6 transition-colors group",children:[e.jsx(Bt,{size:20,className:"group-hover:-translate-x-1 transition-transform"}),"Back to Dashboard"]}),e.jsx("div",{className:"bg-card rounded-2xl border border-border p-5 shadow-sm mb-6",children:e.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-2xl font-display font-bold text-foreground",children:t.name}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:`px-3 py-1 rounded-lg text-xs font-bold border ${ba(t.riskLevel)}`,children:t.riskLevel==="high"?"High Risk Cohort":t.riskLevel==="medium"?"Medium Risk Cohort":"Low Risk Cohort"}),D.map(p=>e.jsx("span",{className:"px-3 py-1 rounded-lg text-xs font-semibold border bg-[#9956DE]/12 border-[#9956DE]/30 text-[#9956DE]",children:p},p))]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Manager: ",t.classMetadata?.managerName||t.managerName||"Not assigned"]})]}),e.jsxs("div",{className:"min-w-[260px] bg-muted rounded-xl p-3 border border-border",children:[e.jsx("p",{className:"text-xs font-semibold text-muted-foreground mb-2 uppercase tracking-wide",children:"Section Manager"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("select",{id:"analytics-section-manager-select",name:"analytics-section-manager-select","aria-label":"Select section manager",value:N||"",onChange:p=>m(p.target.value),className:"h-10 flex-1 rounded-lg border border-border bg-card px-3 text-sm focus:outline-none focus:ring-2 focus:ring-[#9956DE]/40 transition-colors",children:[e.jsx("option",{value:"",children:"Select teacher"}),i.map(p=>e.jsxs("option",{value:p.uid,children:[p.name," (",p.email,")"]},p.uid))]}),e.jsx(Ve,{onClick:C,disabled:!N||l,className:"bg-[#9956DE] hover:bg-[#7A44B3] text-white",children:l?e.jsx(ce,{className:"h-4 w-12 bg-white/35"}):"Assign"})]})]})]})}),e.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[e.jsxs("div",{className:"bg-card border border-border rounded-xl p-4 shadow-sm",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Class Average"}),e.jsxs("p",{className:"text-2xl font-display font-bold text-[#9956DE]",children:[t.avgScore,"%"]})]}),e.jsxs("div",{className:"bg-card border border-border rounded-xl p-4 shadow-sm",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Completion Rate"}),e.jsxs("p",{className:"text-2xl font-display font-bold text-[#75D06A]",children:[w,"%"]})]}),e.jsxs("div",{className:"bg-card border border-border rounded-xl p-4 shadow-sm",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Participation"}),e.jsxs("p",{className:"text-2xl font-display font-bold text-[#9956DE]",children:[T,"%"]})]}),e.jsxs("div",{className:"bg-card border border-[#FF8B8B]/35 rounded-xl p-4 shadow-sm",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Needs Attention"}),e.jsx("p",{className:"text-2xl font-display font-bold text-[#FF8B8B]",children:h.length})]})]}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-5 gap-6",children:[e.jsxs("div",{className:"xl:col-span-2 bg-card rounded-2xl p-6 shadow-sm border border-border",children:[e.jsxs("div",{className:"flex items-center justify-between mb-5",children:[e.jsxs("h2",{className:"text-lg font-display font-bold text-foreground",children:["Students (",f.length,")"]}),e.jsxs("div",{className:"relative",children:[e.jsx(ha,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-400",size:16}),e.jsx(pt,{id:"analytics-student-search",name:"analytics-student-search","aria-label":"Search students",type:"text",placeholder:"Search...",value:d,onChange:p=>x(p.target.value),className:"w-40 pl-9 pr-4 py-2 rounded-xl border-border text-sm"})]})]}),f.length===0?e.jsx("div",{className:"border border-dashed border-border rounded-xl p-4 text-sm text-muted-foreground",children:"No students match your search."}):e.jsx(Yc,{style:{height:"700px"},data:f,itemContent:(p,z)=>e.jsx(cu,{student:z,onViewStudent:n}),computeItemKey:(p,z)=>gs(z)})]}),e.jsxs("div",{className:"xl:col-span-3 space-y-6",children:[e.jsxs("div",{className:"bg-card rounded-2xl p-6 shadow-sm border border-border",children:[e.jsx("h2",{className:"text-lg font-display font-bold text-foreground mb-5",children:"Risk Distribution"}),e.jsx(Vr,{width:"100%",height:250,children:e.jsxs(Wr,{data:a,children:[e.jsx(qr,{strokeDasharray:"3 3",stroke:"#e5e7eb"}),e.jsx(Yr,{dataKey:"name",tick:{fontSize:12}}),e.jsx(Kr,{tick:{fontSize:12}}),e.jsx(Xr,{}),e.jsx(Jr,{dataKey:"value",radius:[8,8,0,0],children:a.map((p,z)=>e.jsx(Tl,{fill:p.color},`cell-${z}`))})]})})]}),e.jsxs("div",{className:"bg-card rounded-2xl p-6 shadow-sm border border-border",children:[e.jsx("h2",{className:"text-lg font-display font-bold text-foreground mb-5",children:"Topic Performance"}),e.jsx(Vr,{width:"100%",height:250,children:e.jsxs(Wr,{data:r,children:[e.jsx(qr,{strokeDasharray:"3 3",stroke:"var(--border)"}),e.jsx(Yr,{dataKey:"topic",tick:{fontSize:12}}),e.jsx(Kr,{tick:{fontSize:12},domain:[0,100]}),e.jsx(Xr,{}),e.jsx(Jr,{dataKey:"score",fill:"#9956DE",radius:[8,8,0,0]})]})})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-card border border-border rounded-2xl p-4",children:[e.jsx("h3",{className:"text-sm font-display font-bold text-foreground mb-3",children:"Top Performers"}),e.jsxs("div",{className:"space-y-2",children:[j.slice(0,4).map(p=>e.jsxs("button",{onClick:()=>n(p),className:"w-full flex items-center justify-between rounded-lg border border-border px-3 py-2 hover:bg-[#9956DE]/12 transition-colors",children:[e.jsx("span",{className:"text-sm font-semibold text-foreground",children:p.name}),e.jsxs("span",{className:"text-xs font-bold text-[#75D06A]",children:[p.avgScore,"%"]})]},`top-${gs(p)}`)),j.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"No students available yet."})]})]}),e.jsxs("div",{className:"bg-card border border-border rounded-2xl p-4",children:[e.jsx("h3",{className:"text-sm font-display font-bold text-foreground mb-3",children:"Students Needing Attention"}),e.jsxs("div",{className:"space-y-2",children:[h.slice(0,4).map(p=>e.jsxs("button",{onClick:()=>n(p),className:"w-full flex items-center justify-between rounded-lg border border-[#FF8B8B]/35 bg-[#FF8B8B]/14 px-3 py-2 hover:bg-[#FF8B8B]/20 transition-colors",children:[e.jsx("span",{className:"text-sm font-semibold text-foreground",children:p.name}),e.jsx("span",{className:"text-xs font-bold text-[#FF8B8B]",children:p.riskLevel.toUpperCase()})]},`attention-${gs(p)}`)),h.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"No urgent students in this class right now."})]})]})]})]})]})]})},mu=({student:t,teacherId:s,teacherName:a,onStudentUpdated:r,onBack:n,initialCache:o,onCacheUpdate:i})=>{const l=(t.riskLevel||"low").toLowerCase(),c=l==="high"||l==="medium",d=c?{card:"bg-[#FF8B8B]/14 border-[#FF8B8B]/35",icon:"bg-red-600",bullet:"text-[#FF8B8B]"}:{card:"bg-[#9956DE]/12 border-[#9956DE]/30",icon:"bg-[#9956DE]",bullet:"text-[#9956DE]"},x=b.useMemo(()=>We.getImportGroundedRolloutFlags(),[]),[N,m]=b.useState(o?.learningPath||""),[f,w]=b.useState(!0),[T,j]=b.useState(o?.gradeDraft||t.grade||"Grade 11"),[h,y]=b.useState(o?.sectionDraft||t.section||"Section A"),[C,D]=b.useState(!1),[p,z]=b.useState(o?.lessonPlan??null),[g,S]=b.useState([]),[I,B]=b.useState(""),[P,J]=b.useState(!1),[ne,X]=b.useState(""),[te,se]=b.useState("all"),[$,Y]=b.useState("all"),[E,U]=b.useState(!1),[W,ge]=b.useState(!1),[L,k]=b.useState(null),[G,F]=b.useState(!1),[ie,R]=b.useState(!1),[H,q]=b.useState(0);b.useEffect(()=>{j(t.grade||"Grade 11"),y(t.section||"Section A")},[t.grade,t.section]),b.useEffect(()=>{i?.(t.id,{lessonPlan:p,learningPath:N,gradeDraft:T,sectionDraft:h})},[p,N,T,h,t.id,i]),b.useEffect(()=>{(async()=>{w(!0);try{let _="";try{_=await _i(t.struggles.length>0?t.struggles:[t.weakestTopic],"general_math"),B(_)}catch{B("")}const le=await We.getLearningPath({weaknesses:t.struggles.length>0?t.struggles:[t.weakestTopic],gradeLevel:"High School",subject:"general_math"}),de=_?`${le.learningPath} -${_}`:le.learningPath;m(de)}catch{m("Unable to generate learning path. Please try again later."),B("")}finally{w(!1)}})()},[t]);const ae=b.useCallback(async()=>{J(!0),X("");try{const v=t.classSectionId||St(T||"Grade 11",h||"Section A"),_=t.struggles.length>0?t.struggles[0]:t.weakestTopic,le=await Cd({gradeLevel:T||t.grade||"Grade 11",subject:"general_math",quarter:1,moduleUnit:[T,h].filter(Boolean).join(" - ")||t.className,lessonTitle:`Grounded Lesson: ${_}`,learningCompetency:_,learnerLevel:t.avgScore<60?"support":t.avgScore<80?"developing":"advanced",classSectionId:v,className:[T,h].filter(Boolean).join(" - ")||t.className,focusTopics:t.struggles.length>0?t.struggles:[t.weakestTopic],topicCount:5,preferImportedTopics:x.lessonEnabled,allowReviewSources:E,allowUnverifiedLesson:W},!0);z(le),S(le.curriculumSources||[]),C(null),We.reportImportGroundedFeedback({flow:"lesson",status:"success",classSectionId:v,className:[T,h].filter(Boolean).join(" - ")||t.className,metadata:{usedImportedTopics:le.usedImportedTopics,importedTopicCount:le.importedTopicCount,blockCount:le.blocks.length,publishReady:le.publishReady,sourceLegitimacyStatus:le.sourceLegitimacy.status,selfValidationPassed:le.selfValidation.passed,importGroundingEnabled:x.lessonEnabled}})}catch(v){let _=v instanceof Error?v.message:"Unable to generate lesson plan at this time.";if(v instanceof Fs&&v.status===422)try{const de=JSON.parse(v.responseBody)?.detail;de?.message&&(_=de.message);const Fe=de?.sourceLegitimacy?.issues||[],be=de?.selfValidation?.issues||[],Oe=[...Fe,...be].filter(Boolean).slice(0,3);Oe.length>0&&(_=`${_} ${Oe.join(" ")}`)}catch{}X(_),z(null),S([]),We.reportImportGroundedFeedback({flow:"lesson",status:"failed",classSectionId:t.classSectionId||St(T||"Grade 11",h||"Section A"),className:[T,h].filter(Boolean).join(" - ")||t.className,metadata:{error:_,allowReviewSources:E,allowUnverifiedLesson:W,importGroundingEnabled:x.lessonEnabled}})}finally{J(!1)}},[t,T,h,x.lessonEnabled,E,W]),ee=b.useCallback(async()=>{if(!p)return ue.error("Generate a lesson plan first."),null;F(!0);try{const v=await wd(p,s,{teacherName:a,studentId:t.id,studentName:t.name});return C(v),ue.success("Lesson plan saved as draft."),v}catch(v){return console.error("Failed to save lesson draft:",v),ue.error(v instanceof Error?v.message:"Failed to save lesson draft."),null}finally{F(!1)}},[p,s,a,t.id,t.name]),V=b.useCallback(async()=>{if(!p){ue.error("Generate a lesson plan first.");return}if(!p.publishReady){const v=[...p.sourceLegitimacy.issues,...p.selfValidation.issues].filter(Boolean).slice(0,2).join(" ");ue.error(v||"Lesson is not publish-ready. Resolve legitimacy and validation checks first.");return}R(!0);try{let v=L;if(v||(v=await ee()),!v)return;await Sd(v),ue.success("Lesson plan published to class content."),We.reportImportGroundedFeedback({flow:"lesson",status:"success",classSectionId:p.classSectionId||t.classSectionId,className:p.className||t.className,metadata:{action:"publish_lesson_plan",lessonPlanId:v,publishReady:p.publishReady,sourceLegitimacyStatus:p.sourceLegitimacy.status,selfValidationPassed:p.selfValidation.passed}})}catch(v){console.error("Failed to publish lesson plan:",v),ue.error(v instanceof Error?v.message:"Failed to publish lesson plan."),We.reportImportGroundedFeedback({flow:"lesson",status:"failed",classSectionId:p.classSectionId||t.classSectionId,className:p.className||t.className,metadata:{action:"publish_lesson_plan",error:v instanceof Error?v.message:"Failed to publish lesson plan."}})}finally{R(!1)}},[p,L,ee,t.className,t.classSectionId]);b.useEffect(()=>{ae()},[H]),b.useEffect(()=>{q(v=>v+1)},[t.id]),b.useEffect(()=>{se("all"),Y("all")},[p]);const pe=b.useMemo(()=>p?Array.from(new Set(p.blocks.map(v=>v.provenance?.sourceFile?.trim()).filter(v=>!!v))).sort((v,_)=>v.localeCompare(_)):[],[p]),Me=b.useMemo(()=>p?Array.from(new Set(p.blocks.map(v=>v.provenance?.materialId?.trim()).filter(v=>!!v))).sort((v,_)=>v.localeCompare(_)):[],[p]),ye=b.useMemo(()=>p?p.blocks.filter(v=>{const _=te==="all"||(v.provenance?.sourceFile||"").trim()===te,le=$==="all"||(v.provenance?.materialId||"").trim()===$;return _&&le}):[],[p,te,$]),De=[{id:1,type:"video",title:`${t.weakestTopic} Fundamentals`,duration:"8 mins",icon:Fl},{id:2,type:"quiz",title:`${t.weakestTopic} Practice`,questions:10,icon:uo},{id:3,type:"assessment",title:"Final Check",questions:5,icon:lo}],Ge=async()=>{if(!s){ue.error("Unable to update section: teacher context missing");return}D(!0);try{await Ko(t.id,T,h,s,new Date().getFullYear().toString(),a),await Wo(t.id,T,h);const v={...t,grade:T,section:h,className:[T,h].filter(Boolean).join(" - "),classSectionId:St(T,h)};r(v),ue.success("Student section assignment updated")}catch(v){console.error("Failed to update student section assignment:",v),ue.error("Failed to update section assignment")}finally{D(!1)}};return e.jsxs(Ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"p-6",children:[e.jsxs("button",{onClick:n,className:"flex items-center gap-2 text-muted-foreground hover:text-[#9956DE] font-bold mb-6 transition-colors group",children:[e.jsx(Bt,{size:20,className:"group-hover:-translate-x-1 transition-transform"}),"Back to Analytics"]}),e.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[e.jsx("div",{className:"bg-card rounded-2xl p-8 shadow-sm border border-border",children:e.jsxs("div",{className:"flex items-start gap-6",children:[e.jsx("img",{src:t.avatar,alt:t.name,className:"w-24 h-24 rounded-2xl object-cover"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("h1",{className:"text-3xl font-display font-bold text-foreground",children:t.name}),e.jsx("span",{className:`px-4 py-1.5 rounded-xl text-sm font-bold border-2 ${ba(t.riskLevel)}`,children:t.riskLevel==="high"?"High Risk":t.riskLevel==="medium"?"Medium Risk":"Low Risk"})]}),e.jsx("p",{className:"text-muted-foreground mb-4",children:t.className}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{className:"bg-muted rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Avg Score"}),e.jsxs("p",{className:"text-2xl font-bold text-foreground",children:[t.avgScore,"%"]})]}),e.jsxs("div",{className:"bg-muted rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Last Active"}),e.jsx("p",{className:"text-sm font-bold text-foreground",children:t.lastActive})]}),e.jsxs("div",{className:"bg-muted rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Weakest Topic"}),e.jsx("p",{className:"text-sm font-bold text-[#FF8B8B]",children:t.weakestTopic})]})]}),e.jsxs("div",{className:"mt-5 p-4 bg-[#9956DE]/12 border border-[#9956DE]/30 rounded-xl",children:[e.jsx("p",{className:"text-xs font-semibold text-[#9956DE] mb-3 uppercase tracking-wider",children:"Section Assignment"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[e.jsx(pt,{value:T,onChange:v=>j(v.target.value),placeholder:"Grade",className:"h-10"}),e.jsx(pt,{value:h,onChange:v=>y(v.target.value),placeholder:"Section",className:"h-10"}),e.jsx(Ve,{onClick:Ge,disabled:k||!T.trim()||!h.trim(),className:"bg-[#9956DE] hover:bg-[#7A44B3] text-white h-10",children:k?e.jsx(ce,{className:"h-4 w-20 bg-white/35"}):"Save Section"})]})]})]})]})}),e.jsx("div",{className:`${d.card} border-2 rounded-2xl p-6`,children:e.jsxs("div",{className:"flex items-start gap-4 mb-4",children:[e.jsx("div",{className:`w-12 h-12 ${d.icon} rounded-xl flex items-center justify-center flex-shrink-0`,children:e.jsx(no,{size:24,className:"text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-display font-bold text-foreground mb-2",children:c?"AI Analysis - Learning Barriers":"AI Analysis - Learning Strengths & Next Steps"}),I&&e.jsx(kn,{sources:g,className:"mt-1"}),e.jsx(oa,{name:"teacher-intervention-analysis",loading:f,fixture:e.jsxs("div",{className:"space-y-2 pt-1",children:[e.jsx(ce,{className:"h-3.5 w-64"}),e.jsx(ce,{className:"h-3.5 w-56"}),e.jsx(ce,{className:"h-3.5 w-44"})]}),fallback:e.jsxs("div",{className:"space-y-2 pt-1",children:[e.jsx(ce,{className:"h-3.5 w-64"}),e.jsx(ce,{className:"h-3.5 w-56"}),e.jsx(ce,{className:"h-3.5 w-44"})]}),children:e.jsx("ul",{className:"space-y-2 text-foreground",children:t.struggles.length>0?t.struggles.map((v,_)=>e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:`${d.bullet} inline-flex h-5 items-center`,children:"•"}),e.jsxs("span",{children:[c?"Struggles with ":"Continue strengthening ",e.jsx("strong",{children:v})]})]},_)):e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:`${d.bullet} inline-flex h-5 items-center`,children:"•"}),e.jsxs("span",{children:[c?"Needs support in ":"Maintain momentum in ",e.jsx("strong",{children:t.weakestTopic})]})]})})})]})]})}),e.jsxs("div",{className:"bg-card rounded-2xl p-8 shadow-sm border border-border",children:[e.jsx("h2",{className:"text-xl font-display font-bold text-foreground mb-6",children:"AI-Generated Learning Path"}),e.jsxs(oa,{name:"teacher-intervention-learning-path",loading:f,fixture:e.jsxs("div",{className:"space-y-4",children:[e.jsx(ce,{className:"h-24 w-full rounded-xl"}),e.jsx(ce,{className:"h-20 w-full rounded-2xl"}),e.jsx(ce,{className:"h-20 w-full rounded-2xl"}),e.jsx(ce,{className:"h-20 w-full rounded-2xl"})]}),fallback:e.jsxs("div",{className:"space-y-4",children:[e.jsx(ce,{className:"h-24 w-full rounded-xl"}),e.jsx(ce,{className:"h-20 w-full rounded-2xl"}),e.jsx(ce,{className:"h-20 w-full rounded-2xl"}),e.jsx(ce,{className:"h-20 w-full rounded-2xl"})]}),children:[N?e.jsx("div",{className:"bg-[#9956DE]/12 border border-[#9956DE]/30 rounded-xl p-5 mb-6 text-sm text-foreground",children:e.jsx(co,{children:N})}):null,e.jsxs("div",{className:"space-y-4 relative",children:[e.jsx("div",{className:"absolute left-6 top-8 bottom-8 w-0.5 bg-border"}),De.map((v,_)=>{const le=v.icon;return e.jsxs(Ie.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:_*.1},className:"relative pl-16",children:[e.jsx("div",{className:"absolute left-0 w-12 h-12 bg-gradient-to-br from-[#7274ED] to-[#9956DE] rounded-xl flex items-center justify-center shadow-md",children:e.jsx(le,{size:24,className:"text-white"})}),e.jsx("div",{className:"bg-gradient-to-br from-[#9956DE]/12 to-[#6ED1CF]/18 border border-[#9956DE]/30 rounded-2xl p-5 hover:shadow-md transition-all",children:e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-display font-bold text-foreground mb-1",children:v.title}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[v.type==="video"&&`${v.duration} video lesson`,v.type==="quiz"&&`${v.questions} practice questions`,v.type==="assessment"&&`${v.questions} assessment questions`]})]}),e.jsx("span",{className:`px-3 py-1 rounded-lg text-xs font-bold ${v.type==="video"?"bg-[#F08386]/20 text-[#C65E63]":v.type==="quiz"?"bg-[#9956DE]/20 text-[#9956DE]":"bg-[#75D06A]/22 text-[#4D9F46]"}`,children:v.type==="video"?"Video":v.type==="quiz"?"Quiz":"Assessment"})]})})]},v.id)})]})]})]}),e.jsxs("div",{className:"bg-card rounded-2xl p-8 shadow-sm border border-border",children:[e.jsxs("div",{className:"flex items-center justify-between mb-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-display font-bold text-foreground",children:"Targeted Lesson Plan"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Class records drive risk signals. Import-grounded lesson generation needs uploaded course materials for topic context."})]}),e.jsx(Ve,{onClick:()=>q(v=>v+1),disabled:P,className:"bg-[#9956DE] hover:bg-[#7A44B3] text-white",children:P?e.jsx(ce,{className:"h-4 w-20 bg-white/35"}):"Regenerate"})]}),e.jsx("p",{className:"mb-4 text-xs text-muted-foreground bg-[#9956DE]/12 border border-[#9956DE]/30 rounded-lg px-3 py-2",children:"Class records alone are not enough for import-grounded lesson plans. Upload course materials in Data Import to provide lesson topic grounding."}),e.jsxs("div",{className:"mb-4 grid grid-cols-1 md:grid-cols-2 gap-2",children:[e.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground bg-[#f8fafc] border border-border rounded-lg px-3 py-2",children:[e.jsx("input",{type:"checkbox",checked:E,onChange:v=>U(v.target.checked)}),"Allow sources requiring manual review"]}),e.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground bg-[#f8fafc] border border-border rounded-lg px-3 py-2",children:[e.jsx("input",{type:"checkbox",checked:W,onChange:v=>ge(v.target.checked)}),"Allow unverified lesson draft (publish remains blocked)"]})]}),e.jsxs(oa,{name:"teacher-intervention-lesson-plan",loading:P,fixture:e.jsxs("div",{className:"space-y-4",children:[e.jsx(ce,{className:"h-20 w-full rounded-xl"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsx(ce,{className:"h-24 w-full rounded-xl"}),e.jsx(ce,{className:"h-24 w-full rounded-xl"})]}),e.jsx(ce,{className:"h-28 w-full rounded-xl"}),e.jsx(ce,{className:"h-28 w-full rounded-xl"})]}),fallback:e.jsxs("div",{className:"space-y-4",children:[e.jsx(ce,{className:"h-20 w-full rounded-xl"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsx(ce,{className:"h-24 w-full rounded-xl"}),e.jsx(ce,{className:"h-24 w-full rounded-xl"})]}),e.jsx(ce,{className:"h-28 w-full rounded-xl"}),e.jsx(ce,{className:"h-28 w-full rounded-xl"})]}),children:[ne&&e.jsx("div",{className:"bg-[#FF8B8B]/14 border border-[#FF8B8B]/35 rounded-xl p-3 text-sm text-[#D66A6A]",children:ne}),p&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"bg-secondary border border-border rounded-xl p-4",children:[e.jsx("div",{className:"mb-2",children:e.jsx(kn,{sources:g})}),e.jsx("p",{className:"text-sm font-semibold text-foreground",children:p.lessonTitle}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Imported topics used: ",p.usedImportedTopics?"Yes":"No"," • ","Imported topic count: ",p.importedTopicCount]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Subject: ",p.subject||"general_math"," "," • ","Quarter: Q",p.quarter||1]}),p.curriculumCompetency&&e.jsxs("p",{className:"text-xs text-[#9956DE] font-semibold mt-1",children:["Competency: ",p.curriculumCompetency]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Publish readiness: ",p.publishReady?"Ready":"Blocked"]}),p.warnings.length>0&&e.jsx("p",{className:"text-xs text-[#CC8A37] mt-1",children:p.warnings.join(" ")})]}),e.jsxs("div",{className:"bg-card border border-border rounded-xl p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Curriculum Grounding"}),e.jsx("p",{className:"text-sm font-bold text-foreground mt-1",children:"Source-backed lesson basis"})]}),p.curriculumGrounding&&e.jsxs("span",{className:`px-3 py-1 rounded-full text-[11px] font-semibold border ${p.curriculumGrounding.confidenceBand==="high"?"bg-[#75D06A]/15 text-[#2E7D32] border-[#75D06A]/40":p.curriculumGrounding.confidenceBand==="medium"?"bg-amber-100 text-amber-800 border-amber-200":"bg-[#FF8B8B]/14 text-[#C65E63] border-[#FF8B8B]/35"}`,children:[p.curriculumGrounding.confidenceBand.toUpperCase()," confidence"]})]}),p.lessonObjective&&e.jsxs("div",{className:"bg-muted/60 rounded-xl p-3",children:[e.jsx("p",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Lesson objective"}),e.jsx("p",{className:"text-sm text-foreground mt-1",children:p.lessonObjective})]}),p.realWorldHook&&e.jsxs("div",{className:"bg-[#9956DE]/10 border border-[#9956DE]/20 rounded-xl p-3",children:[e.jsx("p",{className:"text-[11px] font-semibold text-[#9956DE] uppercase tracking-wider",children:"Real-life application"}),e.jsx("p",{className:"text-sm text-foreground mt-1",children:p.realWorldHook})]}),p.curriculumGrounding&&e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 text-xs",children:[e.jsxs("div",{className:"bg-muted/50 rounded-xl p-3",children:[e.jsx("p",{className:"text-muted-foreground font-semibold",children:"Retrieval confidence"}),e.jsxs("p",{className:"text-sm font-bold text-foreground mt-1",children:[Math.round((p.curriculumGrounding.confidence||0)*100),"%"]})]}),e.jsxs("div",{className:"bg-muted/50 rounded-xl p-3",children:[e.jsx("p",{className:"text-muted-foreground font-semibold",children:"Retrieved chunks"}),e.jsx("p",{className:"text-sm font-bold text-foreground mt-1",children:p.curriculumGrounding.retrievedChunks})]}),e.jsxs("div",{className:"bg-muted/50 rounded-xl p-3",children:[e.jsx("p",{className:"text-muted-foreground font-semibold",children:"Review state"}),e.jsx("p",{className:"text-sm font-bold text-foreground mt-1",children:p.needsReview?"Needs review":"Ready for review"})]})]}),p.explanation&&e.jsxs("div",{className:"bg-card border border-border rounded-xl p-3",children:[e.jsx("p",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider mb-1",children:"Explanation"}),e.jsx("p",{className:"text-sm text-foreground leading-relaxed",children:p.explanation})]}),e.jsxs("details",{className:"group rounded-xl border border-border bg-card p-3",children:[e.jsxs("summary",{className:"cursor-pointer list-none text-xs font-semibold text-muted-foreground uppercase tracking-wider flex items-center justify-between gap-2",children:["Retrieved source snippets",e.jsx("span",{className:"text-[11px] text-[#9956DE] group-open:rotate-180 transition-transform",children:"▾"})]}),e.jsx("div",{className:"mt-3 space-y-2",children:(p.retrievedEvidence?.length||0)>0?p.retrievedEvidence?.map((v,_)=>e.jsxs("div",{className:"rounded-xl bg-muted/60 border border-border p-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[11px] text-muted-foreground",children:[e.jsx("span",{className:"font-semibold text-foreground",children:v.sourceFile||"Curriculum source"}),e.jsxs("span",{children:["p.",v.page||"?"]}),e.jsx("span",{children:v.contentDomain||"n/a"}),e.jsxs("span",{children:["score ",(v.score*100).toFixed(1),"%"]})]}),e.jsx("p",{className:"text-sm text-foreground mt-2 leading-relaxed",children:v.content})]},`${v.sourceFile||"source"}-${v.page||_}`)):e.jsx("p",{className:"text-xs text-muted-foreground",children:"No retrieved snippets were returned."})})]}),p.sourceCitations&&p.sourceCitations.length>0&&e.jsxs("div",{className:"rounded-xl bg-muted/50 border border-border p-3",children:[e.jsx("p",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider mb-2",children:"Source citations"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:p.sourceCitations.slice(0,6).map(v=>e.jsx("span",{className:"px-2 py-1 rounded-full bg-card border border-border text-[11px] text-foreground",children:v},v))})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("div",{className:"bg-card border border-border rounded-xl p-3",children:[e.jsx("p",{className:"text-xs font-semibold text-muted-foreground",children:"Source Legitimacy"}),e.jsxs("p",{className:"text-sm font-bold text-foreground mt-1",children:[p.sourceLegitimacy.status," (",Math.round(p.sourceLegitimacy.score*100),"%)"]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Verified: ",p.sourceLegitimacy.verifiedMaterials," "," • ","Review: ",p.sourceLegitimacy.reviewMaterials," "," • ","Rejected: ",p.sourceLegitimacy.rejectedMaterials]}),p.sourceLegitimacy.issues.length>0&&e.jsx("p",{className:"text-xs text-[#CC8A37] mt-1",children:p.sourceLegitimacy.issues.slice(0,2).join(" ")})]}),e.jsxs("div",{className:"bg-card border border-border rounded-xl p-3",children:[e.jsx("p",{className:"text-xs font-semibold text-muted-foreground",children:"Self Validation"}),e.jsxs("p",{className:"text-sm font-bold text-foreground mt-1",children:[p.selfValidation.passed?"Passed":"Failed"," (",Math.round(p.selfValidation.score*100),"%)"]}),p.selfValidation.issues.length>0&&e.jsx("p",{className:"text-xs text-[#CC8A37] mt-1",children:p.selfValidation.issues.slice(0,2).join(" ")})]})]}),(pe.length>0||Me.length>0)&&e.jsxs("div",{className:"bg-card border border-border rounded-xl p-3",children:[e.jsx("p",{className:"text-xs font-semibold text-muted-foreground mb-2",children:"Provenance Filters"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:[e.jsxs("label",{className:"text-xs text-muted-foreground flex flex-col gap-1",children:[e.jsx("span",{className:"font-semibold",children:"Source File"}),e.jsxs("select",{value:te,onChange:v=>se(v.target.value),className:"bg-card border border-border rounded-md px-2 py-1.5 text-xs",children:[e.jsx("option",{value:"all",children:"All sources"}),pe.map(v=>e.jsx("option",{value:v,children:v},v))]})]}),e.jsxs("label",{className:"text-xs text-muted-foreground flex flex-col gap-1",children:[e.jsx("span",{className:"font-semibold",children:"Material ID"}),e.jsxs("select",{value:$,onChange:v=>Y(v.target.value),className:"bg-card border border-border rounded-md px-2 py-1.5 text-xs",children:[e.jsx("option",{value:"all",children:"All materials"}),Me.map(v=>e.jsx("option",{value:v,children:v},v))]})]})]}),e.jsxs("p",{className:"text-[11px] text-muted-foreground mt-2",children:["Showing ",ye.length," of ",p.blocks.length," lesson blocks after provenance filters."]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:ye.map(v=>e.jsxs("div",{className:"border border-border rounded-xl p-4 bg-[#fcfdff]",children:[e.jsx("h3",{className:"text-sm font-bold text-foreground",children:v.title}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[v.estimatedMinutes," mins "," • "," ",v.strategy]}),e.jsx("p",{className:"text-sm text-foreground mt-2",children:v.objective}),e.jsxs("div",{className:"mt-3",children:[e.jsx("p",{className:"text-xs font-semibold text-muted-foreground mb-1",children:"Activities"}),v.activities.slice(0,2).map((_,le)=>e.jsxs("p",{className:"text-xs text-muted-foreground",children:["•"," ",_]},le))]}),v.provenance&&e.jsxs("div",{className:"mt-3 bg-[#9956DE]/12 border border-[#9956DE]/30 rounded-lg p-2",children:[e.jsx("p",{className:"text-[11px] font-semibold text-[#9956DE]",children:"Provenance"}),v.provenance.sourceFile&&e.jsxs("p",{className:"text-[11px] text-[#5E3388]",children:["Source: ",v.provenance.sourceFile]}),v.provenance.materialId&&e.jsxs("p",{className:"text-[11px] text-[#5E3388]",children:["Material: ",v.provenance.materialId]})]})]},v.blockId))}),ye.length===0&&e.jsx("div",{className:"border border-border rounded-xl p-4 bg-card text-sm text-muted-foreground",children:"No lesson blocks match the selected provenance filters. Clear one or both filters to view all blocks."}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(Ve,{variant:"outline",onClick:()=>void ee(),disabled:G||!p,className:"border-[#9956DE]/45 text-[#9956DE]",children:G?e.jsx(ce,{className:"h-4 w-16"}):"Save Draft"}),e.jsx(Ve,{onClick:()=>void V(),disabled:ie||!p||!p.publishReady,className:"bg-[#75D06A] hover:bg-[#5AB84E] text-white",children:ie?e.jsx(ce,{className:"h-4 w-24 bg-white/35"}):"Publish Lesson Plan"}),L&&e.jsxs("p",{className:"text-xs text-muted-foreground self-center",children:["Draft ID: ",L]})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs(Ve,{className:"bg-[#9956DE] hover:bg-[#7A44B3] text-white font-bold py-4 rounded-xl flex items-center justify-center gap-2",children:[e.jsx(Ls,{size:20}),"Schedule One-on-One Session"]}),e.jsxs(Ve,{variant:"outline",className:"border-2 border-[#9956DE] text-[#9956DE] hover:bg-[#9956DE]/12 font-bold py-4 rounded-xl flex items-center justify-center gap-2",children:[e.jsx(oo,{size:20}),"Export Printed Materials"]})]})]})]})]})},mu=({onEditRecords:t,classSectionId:s,className:a,classMetadata:r,onImportedClassRecords:n,onDataChanged:o})=>{const[i,l]=b.useState(null),[c,d]=b.useState(!1),[x,N]=b.useState(!1),[m,f]=b.useState(!1),[w,T]=b.useState(!1),[j,h]=b.useState(""),[y,k]=b.useState(null),D=b.useRef(null),p=b.useRef(null),z=$=>$.trim().toLowerCase().replace(/\s+/g," "),g=$=>{if(typeof $=="number"&&Number.isFinite($))return $;const Y=Number(String($??"").replace(/[^0-9.-]+/g,""));return Number.isFinite(Y)?Y:null},S=($,Y)=>{const E=Number.isFinite($)?$:Y;return Math.max(0,Math.min(100,E))},I=$=>{const Y=String($??"");return/[",\n]/.test(Y)?`"${Y.replace(/"/g,'""')}"`:Y},B=($,Y)=>{const E=new Map,U=["quarterlyGrade","finalGrades","firstSemester","firstQuarter","secondQuarter","initialGrade"];$.mapping.gradeEntities.forEach(R=>{const H=z(R.fullName||"");if(!H)return;const q=U.map(ee=>g(R[ee])).filter(ee=>ee!==null);if(q.length===0)return;const ae=E.get(H)||[];E.set(H,ae.concat(q))});const W=$.mapping.studentEntities||[];if(W.length===0)return null;const ge=($.imported.schoolContext.semester||$.imported.schoolContext.schoolYear||"First Semester").trim(),L=($.imported.schoolContext.subjectName||"Class Record Import").trim(),C=(s||a||"import").replace(/[^a-zA-Z0-9]+/g,"").toUpperCase().slice(0,12)||"IMPORT",F=[["name","lrn","email","engagementScore","avgQuizScore","attendance","assignmentCompletion","term","assessmentName"].join(",")];if(W.forEach((R,H)=>{const q=z(R.fullName||""),ae=E.get(q)||[],ee=ae.length>0?ae.reduce((_,le)=>_+le,0)/ae.length:75,V=S(ee,75),pe=S(V+5,85),Me=S(V*.7+pe*.3,80),ye=S(pe*.6+V*.4,82),De=R.learnerNo||H+1,Ge=`IMP-${C}-${String(De).padStart(4,"0")}`,v=R.fullName||`Learner ${H+1}`;F.push([I(v),I(Ge),I(""),I(Number(Me.toFixed(1))),I(Number(V.toFixed(1))),I(Number(pe.toFixed(1))),I(Number(ye.toFixed(1))),I(ge),I(L)].join(","))}),F.length<=1)return null;const ie=Y.replace(/\.(xlsx|xls)$/i,"");return new File([F.join(` -`)],`${ie}-normalized.csv`,{type:"text/csv"})},P=async $=>{f(!0),h(""),k(null);let Y=$;if(/\.(xlsx|xls)$/i.test($.name))try{const E=await Jm($,{confidenceThreshold:Za});l(E);const U=B(E,$.name);U&&(Y=U)}catch{l(null)}else l(null);try{const E=await We.uploadClassRecords(Y,{classSectionId:s,className:a,datasetIntent:"synthetic_student_records"}),U=E.students.length,W=E.warnings&&E.warnings.length>0?E.warnings.slice(0,3).join(" "):"",ge=E.dashboardSync?` Dashboard sync: ${E.dashboardSync.synced?"ok":"pending"} (created ${E.dashboardSync.createdStudents}, updated ${E.dashboardSync.updatedStudents}).`:"",L=nu(E,s,a,r);if(U>0&&n?.({students:E.students,classSectionId:L.classSectionId,className:L.className,classMetadata:L.classMetadata}),E.success){ue.success(`Successfully imported ${U} student records. Next step: upload course materials for AI lesson-plan grounding.`);const C=E.riskRefresh?.queued?` Risk refresh queued for ${E.riskRefresh.studentsQueued} students (job ${E.riskRefresh.refreshId||"n/a"}).`:` Risk refresh not queued${E.riskRefresh?.reason?`: ${E.riskRefresh.reason}`:""}.`,G=E.interpretationSummary,F=G?` Interpreted columns - scoring: ${G.scoringColumns}, display: ${G.displayColumns}, storage-only: ${G.storageOnlyColumns}, low-confidence: ${G.lowConfidenceColumns}.`:"",ie=W?` Warnings: ${W}`:"";h(`Imported ${U} students. Next step: upload course materials to give AI lesson generation topic context.${C}${ge}${F}${ie} Column mapping: ${JSON.stringify(E.columnMapping)}`),k({datasetIntent:E.datasetIntent,summary:E.interpretationSummary,columns:E.columnInterpretations?.map(R=>({columnName:R.columnName,mappedField:R.mappedField,usagePolicy:R.usagePolicy,confidenceBand:R.confidenceBand,domainSignals:R.domainSignals}))||[]}),o?.()}else{const G=(E.files||[]).flatMap(F=>F.warnings||[]).slice(0,3).join(" ")||W||"Import completed but no usable student rows were detected. Check required columns and retry.";h(G),ue.error(G)}}catch(E){let U=E instanceof Error?E.message:"Upload failed";const W=U.toLowerCase();E instanceof Fs&&W.includes("missing required educational columns after mapping")&&W.includes("assignmentcompletion")&&(U="Your file matches the minimal import schema, but the connected backend is running an older validator that still requires assignmentCompletion. Update/redeploy the backend or point VITE_API_URL to this updated backend."),ue.error(U),h(U),k(null)}finally{f(!1)}},J=async $=>{T(!0),h("");try{const Y=await We.uploadCourseMaterials($,{classSectionId:s,className:a});if(Y.success){const E=Y.topics?.length??0;ue.success(`Course material imported (${E} topics extracted). Lesson generation now has material context.`),h(`Imported course material ${Y.fileName} with ${E} topics and ${Y.sections.length} section(s). Lesson generation is now ready with material context.`),o?.()}}catch(Y){ue.error(Y instanceof Error?Y.message:"Course material upload failed"),h("Course material upload failed. Please check the file format and try again.")}finally{T(!1)}},ne=$=>{$.preventDefault(),d(!1);const Y=$.dataTransfer.files[0];Y&&P(Y)},X=$=>{const Y=$.target.files?.[0];Y&&P(Y)},te=$=>{$.preventDefault(),N(!1);const Y=$.dataTransfer.files[0];Y&&J(Y)},se=$=>{const Y=$.target.files?.[0];Y&&J(Y)};return e.jsx(Ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"p-6",children:e.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[e.jsxs("div",{className:"mb-2",children:[e.jsx("h2",{className:"text-xl font-display font-bold text-foreground",children:"Import Data"}),e.jsx("p",{className:"text-muted-foreground",children:"Class records drive analytics and at-risk signals. Course materials provide topic grounding for AI lesson plans."}),e.jsxs("div",{className:"mt-2 flex flex-wrap gap-2 items-center text-xs text-muted-foreground",children:[e.jsxs("span",{className:"px-2 py-1 rounded-md bg-muted border border-border",children:["Class scope: ",a||s||"All classes"]}),[r?.gradeLevel,r?.classification,r?.strand].filter(Boolean).map($=>e.jsx("span",{className:"px-2 py-1 rounded-md bg-[#9956DE]/12 border border-[#9956DE]/30 text-[#9956DE] font-medium",children:$},`import-meta-${$}`))]})]}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6",children:[e.jsx("div",{className:`bg-card border-4 border-dashed rounded-3xl p-6 transition-all ${c?"border-[#9956DE] bg-[#9956DE]/12":"border-border"}`,children:e.jsxs("div",{onDragOver:$=>{$.preventDefault(),d(!0)},onDragLeave:()=>d(!1),onDrop:ne,onClick:()=>D.current?.click(),className:"rounded-2xl border-2 border-dashed border-border p-8 text-center transition-all cursor-pointer hover:border-[#9956DE]/60 hover:bg-[#9956DE]/8",children:[e.jsx("input",{ref:D,type:"file",accept:".csv,.xlsx,.pdf",onChange:X,className:"hidden"}),e.jsx("div",{className:"w-20 h-20 bg-[#9956DE]/20 rounded-2xl flex items-center justify-center mx-auto mb-6",children:m?e.jsx(ce,{className:"h-10 w-10 rounded-2xl bg-[#9956DE]/32"}):e.jsx(Ll,{size:40,className:"text-[#9956DE]"})}),e.jsx("h3",{className:"text-xl font-display font-bold text-foreground mb-2",children:"Class Records"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:m?e.jsxs("span",{className:"inline-flex flex-col items-center gap-2",children:[e.jsx(ce,{className:"h-4 w-44 bg-[#9956DE]/32"}),e.jsx(ce,{className:"h-4 w-36 bg-[#9956DE]/20"})]}):"Upload student grades, attendance, and quiz scores"}),e.jsxs("p",{className:"text-xs text-muted-foreground mb-4 flex items-center justify-center gap-2",children:[e.jsx("span",{className:"bg-muted px-2 py-1 rounded text-muted-foreground font-medium",children:".csv"}),e.jsx("span",{className:"bg-muted px-2 py-1 rounded text-muted-foreground font-medium",children:".xlsx"}),e.jsx("span",{className:"bg-muted px-2 py-1 rounded text-muted-foreground font-medium",children:".xls"}),e.jsx("span",{className:"bg-muted px-2 py-1 rounded text-muted-foreground font-medium",children:".pdf"})]}),e.jsx(Ve,{className:"bg-card border-2 border-border text-muted-foreground hover:border-[#9956DE] hover:text-[#9956DE] font-bold px-6 py-3 rounded-xl w-full transition-colors",children:"Click or drag & drop"})]})}),e.jsxs("div",{onDragOver:$=>{$.preventDefault(),N(!0)},onDragLeave:()=>N(!1),onDrop:te,onClick:()=>p.current?.click(),className:`bg-card border-4 border-dashed rounded-3xl p-12 text-center transition-all cursor-pointer hover:border-[#F08386]/60 hover:bg-[#F08386]/12 ${x?"border-[#F08386] bg-[#F08386]/12 scale-105":"border-border"}`,children:[e.jsx("input",{ref:p,type:"file",accept:".pdf,.docx,.txt",onChange:se,className:"hidden"}),e.jsx("div",{className:"w-20 h-20 bg-[#F08386]/20 rounded-2xl flex items-center justify-center mx-auto mb-6",children:w?e.jsx(ce,{className:"h-10 w-10 rounded-2xl bg-rose-200"}):e.jsx(tr,{size:40,className:"text-[#F08386]"})}),e.jsx("h3",{className:"text-xl font-display font-bold text-foreground mb-2",children:"Course Materials"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:w?e.jsxs("span",{className:"inline-flex flex-col items-center gap-2",children:[e.jsx(ce,{className:"h-4 w-48 bg-rose-200"}),e.jsx(ce,{className:"h-4 w-40 bg-[#F08386]/20"})]}):"Upload syllabus, lesson plans, and curriculum documents"}),e.jsxs("p",{className:"text-xs text-slate-500 mb-4 flex items-center justify-center gap-2",children:[e.jsx("span",{className:"bg-muted px-2 py-1 rounded text-muted-foreground font-medium",children:".pdf"}),e.jsx("span",{className:"bg-muted px-2 py-1 rounded text-muted-foreground font-medium",children:".docx"}),e.jsx("span",{className:"bg-muted px-2 py-1 rounded text-muted-foreground font-medium",children:".txt"})]}),e.jsx(Ve,{className:"bg-card border-2 border-border text-muted-foreground hover:border-[#F08386] hover:text-[#F08386] font-bold px-6 py-3 rounded-xl w-full transition-colors",children:"Click or drag & drop"})]})]}),i&&e.jsxs("div",{className:"bg-card border border-border rounded-2xl p-4",children:[e.jsx("h3",{className:"text-base font-display font-bold text-foreground mb-2",children:"Workbook Preview Summary"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-3 text-sm",children:[e.jsxs("div",{className:"bg-muted rounded-lg p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"School"}),e.jsx("p",{className:"font-semibold text-foreground",children:i.imported.schoolContext.schoolName||"N/A"})]}),e.jsxs("div",{className:"bg-muted rounded-lg p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Subject"}),e.jsx("p",{className:"font-semibold text-foreground",children:i.imported.schoolContext.subjectName||"N/A"})]}),e.jsxs("div",{className:"bg-muted rounded-lg p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Learners"}),e.jsx("p",{className:"font-semibold text-foreground",children:i.imported.learners.length})]}),e.jsxs("div",{className:"bg-muted rounded-lg p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Confidence"}),e.jsx("p",{className:"font-semibold text-foreground",children:i.imported.validation.confidence.toFixed(2)})]})]})]}),e.jsxs("div",{className:"bg-[#9956DE]/12 border border-[#9956DE]/30 rounded-2xl p-6",children:[e.jsx("h3",{className:"text-lg font-display font-bold text-[#7A44B3] mb-3",children:"How AI Uses Your Data"}),e.jsxs("div",{className:"space-y-2 text-[#5E3388]/80 text-sm",children:[e.jsxs("p",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-[#9956DE] font-bold",children:"•"}),e.jsxs("span",{children:[e.jsx("strong",{className:"text-[#7A44B3]",children:"Smart Format Detection:"})," AI understands various spreadsheet formats and column names"]})]}),e.jsxs("p",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-[#9956DE] font-bold",children:"•"}),e.jsx("span",{children:"Analyzes historical performance patterns to predict at-risk students"})]}),e.jsxs("p",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-[#9956DE] font-bold",children:"•"}),e.jsx("span",{children:"Maps curriculum topics to student knowledge gaps"})]}),e.jsxs("p",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-[#9956DE] font-bold",children:"•"}),e.jsx("span",{children:"Generates personalized remedial learning paths"})]}),e.jsxs("p",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-[#9956DE] font-bold",children:"•"}),e.jsx("span",{children:"All data is processed securely and never shared"})]})]})]}),j&&e.jsx("div",{className:"bg-[#75D06A]/14 border border-[#75D06A]/35 rounded-2xl p-4 text-sm text-[#3E8538]",children:j}),y&&e.jsxs("div",{className:"bg-card rounded-2xl p-6 shadow-sm border border-border",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("h3",{className:"text-lg font-display font-bold text-foreground",children:"Import Interpretation"}),e.jsxs("span",{className:"text-xs px-2 py-1 rounded bg-muted text-[#334155]",children:["Intent: ",y.datasetIntent||"synthetic_student_records"]})]}),y.summary&&e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-3 mb-4",children:[e.jsxs("div",{className:"bg-[#f8fbff] border border-border rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Scoring"}),e.jsx("p",{className:"text-lg font-bold text-foreground",children:y.summary.scoringColumns})]}),e.jsxs("div",{className:"bg-[#f8fbff] border border-border rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Display"}),e.jsx("p",{className:"text-lg font-bold text-foreground",children:y.summary.displayColumns})]}),e.jsxs("div",{className:"bg-[#FFB356]/16 border border-[#FFB356]/38 rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-[#CC8A37]",children:"Storage-only"}),e.jsx("p",{className:"text-lg font-bold text-[#A56D29]",children:y.summary.storageOnlyColumns})]}),e.jsxs("div",{className:"bg-[#F08386]/12 border border-[#F08386]/30 rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-[#C65E63]",children:"Low confidence"}),e.jsx("p",{className:"text-lg font-bold text-[#A74B50]",children:y.summary.lowConfidenceColumns})]}),e.jsxs("div",{className:"bg-[#f8fbff] border border-border rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Domain warnings"}),e.jsx("p",{className:"text-lg font-bold text-foreground",children:y.summary.domainMismatchWarnings})]})]}),y.columns.length>0?e.jsx("div",{className:"space-y-2 max-h-64 overflow-auto pr-1",children:y.columns.slice(0,40).map($=>e.jsxs("div",{className:"bg-[#f8fafc] border border-border rounded-lg px-3 py-2",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:$.columnName}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["mapped: ",$.mappedField||"none"," • ","usage: ",$.usagePolicy," • ","confidence: ",$.confidenceBand]}),$.domainSignals&&$.domainSignals.length>0&&e.jsxs("p",{className:"text-xs text-[#CC8A37] mt-1",children:["domain signals: ",$.domainSignals.join(", ")]})]},$.columnName))}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"No per-column interpretation data was returned for this upload."})]}),e.jsxs("div",{className:"bg-card rounded-2xl p-6 shadow-sm border border-border",children:[e.jsx("h3",{className:"text-lg font-display font-bold text-foreground mb-4",children:"Manage Imported Data"}),e.jsxs("button",{onClick:t,className:"w-full bg-[#00a86b] hover:bg-[#008f5d] text-white rounded-xl p-5 flex items-center justify-between transition-all shadow-sm hover:shadow-md group",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-12 h-12 bg-card/20 rounded-xl flex items-center justify-center backdrop-blur-sm",children:e.jsx(ao,{size:24,className:"text-white"})}),e.jsxs("div",{className:"text-left",children:[e.jsx("h4",{className:"font-bold text-lg",children:"Edit Class Records"}),e.jsx("p",{className:"text-white/90 text-sm",children:"Review and correct AI-analyzed student data"})]})]}),e.jsx(Ht,{size:24,className:"text-white/80 group-hover:text-[#9956DE] group-hover:translate-x-1 transition-all"})]})]})]})})},uu=({students:t,teacherId:s,teacherName:a,onBack:r})=>{const[n,o]=b.useState(t),[i,l]=b.useState(!1),c=b.useCallback(m=>ps(m),[]),[d,x]=b.useState(()=>Object.fromEntries(t.map(m=>[c(m),{grade:m.grade||"Grade 11",section:m.section||"Section A"}])));b.useEffect(()=>{o(t),x(Object.fromEntries(t.map(m=>[c(m),{grade:m.grade||"Grade 11",section:m.section||"Section A"}])))},[c,t]);const N=async()=>{l(!0);try{for(const m of n){const f=d[c(m)],w=f?.grade||m.grade,T=f?.section||m.section;s&&(w!==m.grade||T!==m.section)&&(await Ko(m.id,w,T,s,new Date().getFullYear().toString(),a),await Wo(m.id,w,T));try{const j=await We.predictRisk({engagementScore:m.engagementScore,avgQuizScore:m.avgScore,attendance:m.attendance,assignmentCompletion:m.assignmentCompletion});await gd(m.id,j.riskLevel,j.confidence)}catch{}}o(m=>m.map(f=>{const w=d[c(f)];if(!w)return f;const T=et({metadata:f.classMetadata,classSectionId:f.classSectionId,className:[w.grade,w.section].filter(Boolean).join(" - "),grade:w.grade,section:w.section});return{...f,grade:w.grade,section:w.section,className:T.className||[w.grade,w.section].filter(Boolean).join(" - "),classSectionId:T.classSectionId||f.classSectionId,classMetadata:T}})),ue.success("Records saved and risk levels updated"),r()}catch{ue.error("Failed to save changes")}finally{l(!1)}};return e.jsxs(Ie.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"p-6 h-full flex flex-col",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("button",{onClick:r,className:"p-2 hover:bg-muted rounded-lg transition-colors text-muted-foreground",children:e.jsx(Bt,{size:24})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-display font-bold text-foreground",children:"Edit Class Records"}),e.jsx("p",{className:"text-muted-foreground",children:"Review and modify student data manually"})]})]}),e.jsxs("div",{className:"flex gap-3 justify-end",children:[e.jsx(Ve,{variant:"outline",onClick:r,className:"border-border",children:"Cancel"}),e.jsxs(Ve,{onClick:N,disabled:i,className:"bg-[#75D06A] hover:bg-[#5AB84E] text-white gap-2",children:[i?e.jsx(ce,{className:"h-5 w-5 rounded-full bg-white/35"}):e.jsx(io,{size:18}),i?"Saving...":"Save Changes"]})]})]}),e.jsxs("div",{className:"bg-card border border-border rounded-2xl shadow-sm flex-1 overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"p-4 border-b border-border bg-background flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e.jsx(Ha,{size:18}),e.jsx("span",{className:"text-sm",children:"Click on any field to edit"})]}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:["Showing ",n.length," records"]})]}),e.jsx("div",{className:"overflow-auto flex-1",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{className:"bg-background sticky top-0 z-10",children:e.jsxs("tr",{children:[e.jsx("th",{className:"p-4 font-bold text-muted-foreground border-b border-border bg-background",children:"Student Name"}),e.jsx("th",{className:"p-4 font-bold text-muted-foreground border-b border-border bg-background",children:"LRN"}),e.jsx("th",{className:"p-4 font-bold text-muted-foreground border-b border-border bg-background",children:"Grade"}),e.jsx("th",{className:"p-4 font-bold text-muted-foreground border-b border-border bg-background",children:"Section"}),e.jsx("th",{className:"p-4 font-bold text-muted-foreground border-b border-border bg-background",children:"Avg Score"}),e.jsx("th",{className:"p-4 font-bold text-muted-foreground border-b border-border bg-background",children:"Risk Level"}),e.jsx("th",{className:"p-4 font-bold text-muted-foreground border-b border-border bg-background",children:"Weakest Topic"}),e.jsx("th",{className:"p-4 font-bold text-muted-foreground border-b border-border bg-background",children:"Actions"})]})}),e.jsx("tbody",{children:n.map(m=>{const f=c(m);return e.jsxs("tr",{className:"border-b border-border hover:bg-[#9956DE]/12 group transition-colors",children:[e.jsx("td",{className:"p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:m.avatar,alt:"",className:"w-8 h-8 rounded-full object-cover"}),e.jsx("span",{className:"font-medium text-foreground",children:m.name})]})}),e.jsx("td",{className:"p-4 text-muted-foreground font-mono text-sm",children:m.lrn||"Not set"}),e.jsx("td",{className:"p-4 min-w-[140px]",children:e.jsx(pt,{id:`edit-record-grade-${f}`,name:`edit-record-grade-${f}`,"aria-label":`Edit grade for ${m.name}`,value:d[f]?.grade||m.grade,onChange:w=>x(T=>({...T,[f]:{...T[f],grade:w.target.value}})),className:"h-9 text-sm"})}),e.jsx("td",{className:"p-4 min-w-[140px]",children:e.jsx(pt,{id:`edit-record-section-${f}`,name:`edit-record-section-${f}`,"aria-label":`Edit section for ${m.name}`,value:d[f]?.section||m.section,onChange:w=>x(T=>({...T,[f]:{...T[f],section:w.target.value}})),className:"h-9 text-sm"})}),e.jsx("td",{className:"p-4",children:e.jsxs("span",{className:`font-bold ${m.avgScore<60?"text-[#FF8B8B]":m.avgScore<80?"text-[#F08386]":"text-green-600"}`,children:[m.avgScore,"%"]})}),e.jsx("td",{className:"p-4",children:e.jsx("span",{className:`px-2 py-1 rounded text-xs font-bold ${ba(m.riskLevel)}`,children:m.riskLevel.toUpperCase()})}),e.jsx("td",{className:"p-4 text-muted-foreground",children:m.weakestTopic}),e.jsx("td",{className:"p-4",children:e.jsx("button",{className:"p-2 hover:bg-muted rounded-lg text-slate-500 hover:text-[#9956DE] transition-colors",children:e.jsx(ao,{size:16})})})]},f)})})]})})]})]})};function ba(t){switch(t){case"high":return"bg-[#FF8B8B]/22 text-[#D66A6A] border-[#FF8B8B]/35";case"medium":return"bg-[#F08386]/20 text-[#C65E63] border-[#F08386]/30";case"low":return"bg-[#75D06A]/22 text-[#4D9F46] border-[#75D06A]/35"}}function xu(t){switch(t){case"high":return"border-red-500 bg-[#FF8B8B]/14";case"medium":return"border-[#F08386] bg-[#F08386]/12";case"low":return"border-[#75D06A] bg-[#75D06A]/14"}}export{gx as default}; +${_}`:le.learningPath;m(de)}catch{m("Unable to generate learning path. Please try again later."),B("")}finally{w(!1)}})()},[t]);const ae=b.useCallback(async()=>{J(!0),X("");try{const v=t.classSectionId||St(T||"Grade 11",h||"Section A"),_=t.struggles.length>0?t.struggles[0]:t.weakestTopic,le=await Cd({gradeLevel:T||t.grade||"Grade 11",subject:"general_math",quarter:1,moduleUnit:[T,h].filter(Boolean).join(" - ")||t.className,lessonTitle:`Grounded Lesson: ${_}`,learningCompetency:_,learnerLevel:t.avgScore<60?"support":t.avgScore<80?"developing":"advanced",classSectionId:v,className:[T,h].filter(Boolean).join(" - ")||t.className,focusTopics:t.struggles.length>0?t.struggles:[t.weakestTopic],topicCount:5,preferImportedTopics:x.lessonEnabled,allowReviewSources:E,allowUnverifiedLesson:W},!0);z(le),S(le.curriculumSources||[]),k(null),We.reportImportGroundedFeedback({flow:"lesson",status:"success",classSectionId:v,className:[T,h].filter(Boolean).join(" - ")||t.className,metadata:{usedImportedTopics:le.usedImportedTopics,importedTopicCount:le.importedTopicCount,blockCount:le.blocks.length,publishReady:le.publishReady,sourceLegitimacyStatus:le.sourceLegitimacy.status,selfValidationPassed:le.selfValidation.passed,importGroundingEnabled:x.lessonEnabled}})}catch(v){let _=v instanceof Error?v.message:"Unable to generate lesson plan at this time.";if(v instanceof Fs&&v.status===422)try{const de=JSON.parse(v.responseBody)?.detail;de?.message&&(_=de.message);const Fe=de?.sourceLegitimacy?.issues||[],be=de?.selfValidation?.issues||[],Oe=[...Fe,...be].filter(Boolean).slice(0,3);Oe.length>0&&(_=`${_} ${Oe.join(" ")}`)}catch{}X(_),z(null),S([]),We.reportImportGroundedFeedback({flow:"lesson",status:"failed",classSectionId:t.classSectionId||St(T||"Grade 11",h||"Section A"),className:[T,h].filter(Boolean).join(" - ")||t.className,metadata:{error:_,allowReviewSources:E,allowUnverifiedLesson:W,importGroundingEnabled:x.lessonEnabled}})}finally{J(!1)}},[t,T,h,x.lessonEnabled,E,W]),ee=b.useCallback(async()=>{if(!p)return ue.error("Generate a lesson plan first."),null;F(!0);try{const v=await Sd(p,s,{teacherName:a,studentId:t.id,studentName:t.name});return k(v),ue.success("Lesson plan saved as draft."),v}catch(v){return console.error("Failed to save lesson draft:",v),ue.error(v instanceof Error?v.message:"Failed to save lesson draft."),null}finally{F(!1)}},[p,s,a,t.id,t.name]),V=b.useCallback(async()=>{if(!p){ue.error("Generate a lesson plan first.");return}if(!p.publishReady){const v=[...p.sourceLegitimacy.issues,...p.selfValidation.issues].filter(Boolean).slice(0,2).join(" ");ue.error(v||"Lesson is not publish-ready. Resolve legitimacy and validation checks first.");return}R(!0);try{let v=L;if(v||(v=await ee()),!v)return;await kd(v),ue.success("Lesson plan published to class content."),We.reportImportGroundedFeedback({flow:"lesson",status:"success",classSectionId:p.classSectionId||t.classSectionId,className:p.className||t.className,metadata:{action:"publish_lesson_plan",lessonPlanId:v,publishReady:p.publishReady,sourceLegitimacyStatus:p.sourceLegitimacy.status,selfValidationPassed:p.selfValidation.passed}})}catch(v){console.error("Failed to publish lesson plan:",v),ue.error(v instanceof Error?v.message:"Failed to publish lesson plan."),We.reportImportGroundedFeedback({flow:"lesson",status:"failed",classSectionId:p.classSectionId||t.classSectionId,className:p.className||t.className,metadata:{action:"publish_lesson_plan",error:v instanceof Error?v.message:"Failed to publish lesson plan."}})}finally{R(!1)}},[p,L,ee,t.className,t.classSectionId]);b.useEffect(()=>{ae()},[H]),b.useEffect(()=>{q(v=>v+1)},[t.id]),b.useEffect(()=>{se("all"),Y("all")},[p]);const pe=b.useMemo(()=>p?Array.from(new Set(p.blocks.map(v=>v.provenance?.sourceFile?.trim()).filter(v=>!!v))).sort((v,_)=>v.localeCompare(_)):[],[p]),Me=b.useMemo(()=>p?Array.from(new Set(p.blocks.map(v=>v.provenance?.materialId?.trim()).filter(v=>!!v))).sort((v,_)=>v.localeCompare(_)):[],[p]),ye=b.useMemo(()=>p?p.blocks.filter(v=>{const _=te==="all"||(v.provenance?.sourceFile||"").trim()===te,le=$==="all"||(v.provenance?.materialId||"").trim()===$;return _&&le}):[],[p,te,$]),De=[{id:1,type:"video",title:`${t.weakestTopic} Fundamentals`,duration:"8 mins",icon:Bl},{id:2,type:"quiz",title:`${t.weakestTopic} Practice`,questions:10,icon:mo},{id:3,type:"assessment",title:"Final Check",questions:5,icon:io}],Ge=async()=>{if(!s){ue.error("Unable to update section: teacher context missing");return}D(!0);try{await Ko(t.id,T,h,s,new Date().getFullYear().toString(),a),await Wo(t.id,T,h);const v={...t,grade:T,section:h,className:[T,h].filter(Boolean).join(" - "),classSectionId:St(T,h)};r(v),ue.success("Student section assignment updated")}catch(v){console.error("Failed to update student section assignment:",v),ue.error("Failed to update section assignment")}finally{D(!1)}};return e.jsxs(Ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"p-6",children:[e.jsxs("button",{onClick:n,className:"flex items-center gap-2 text-muted-foreground hover:text-[#9956DE] font-bold mb-6 transition-colors group",children:[e.jsx(Bt,{size:20,className:"group-hover:-translate-x-1 transition-transform"}),"Back to Analytics"]}),e.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[e.jsx("div",{className:"bg-card rounded-2xl p-8 shadow-sm border border-border",children:e.jsxs("div",{className:"flex items-start gap-6",children:[e.jsx("img",{src:t.avatar,alt:t.name,className:"w-24 h-24 rounded-2xl object-cover"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("h1",{className:"text-3xl font-display font-bold text-foreground",children:t.name}),e.jsx("span",{className:`px-4 py-1.5 rounded-xl text-sm font-bold border-2 ${ba(t.riskLevel)}`,children:t.riskLevel==="high"?"High Risk":t.riskLevel==="medium"?"Medium Risk":"Low Risk"})]}),e.jsx("p",{className:"text-muted-foreground mb-4",children:t.className}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{className:"bg-muted rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Avg Score"}),e.jsxs("p",{className:"text-2xl font-bold text-foreground",children:[t.avgScore,"%"]})]}),e.jsxs("div",{className:"bg-muted rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Last Active"}),e.jsx("p",{className:"text-sm font-bold text-foreground",children:t.lastActive})]}),e.jsxs("div",{className:"bg-muted rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Weakest Topic"}),e.jsx("p",{className:"text-sm font-bold text-[#FF8B8B]",children:t.weakestTopic})]})]}),e.jsxs("div",{className:"mt-5 p-4 bg-[#9956DE]/12 border border-[#9956DE]/30 rounded-xl",children:[e.jsx("p",{className:"text-xs font-semibold text-[#9956DE] mb-3 uppercase tracking-wider",children:"Section Assignment"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[e.jsx(pt,{value:T,onChange:v=>j(v.target.value),placeholder:"Grade",className:"h-10"}),e.jsx(pt,{value:h,onChange:v=>y(v.target.value),placeholder:"Section",className:"h-10"}),e.jsx(Ve,{onClick:Ge,disabled:C||!T.trim()||!h.trim(),className:"bg-[#9956DE] hover:bg-[#7A44B3] text-white h-10",children:C?e.jsx(ce,{className:"h-4 w-20 bg-white/35"}):"Save Section"})]})]})]})]})}),e.jsx("div",{className:`${d.card} border-2 rounded-2xl p-6`,children:e.jsxs("div",{className:"flex items-start gap-4 mb-4",children:[e.jsx("div",{className:`w-12 h-12 ${d.icon} rounded-xl flex items-center justify-center flex-shrink-0`,children:e.jsx(ro,{size:24,className:"text-white"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-display font-bold text-foreground mb-2",children:c?"AI Analysis - Learning Barriers":"AI Analysis - Learning Strengths & Next Steps"}),I&&e.jsx(Cn,{sources:g,className:"mt-1"}),e.jsx(oa,{name:"teacher-intervention-analysis",loading:f,fixture:e.jsxs("div",{className:"space-y-2 pt-1",children:[e.jsx(ce,{className:"h-3.5 w-64"}),e.jsx(ce,{className:"h-3.5 w-56"}),e.jsx(ce,{className:"h-3.5 w-44"})]}),fallback:e.jsxs("div",{className:"space-y-2 pt-1",children:[e.jsx(ce,{className:"h-3.5 w-64"}),e.jsx(ce,{className:"h-3.5 w-56"}),e.jsx(ce,{className:"h-3.5 w-44"})]}),children:e.jsx("ul",{className:"space-y-2 text-foreground",children:t.struggles.length>0?t.struggles.map((v,_)=>e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:`${d.bullet} inline-flex h-5 items-center`,children:"•"}),e.jsxs("span",{children:[c?"Struggles with ":"Continue strengthening ",e.jsx("strong",{children:v})]})]},_)):e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:`${d.bullet} inline-flex h-5 items-center`,children:"•"}),e.jsxs("span",{children:[c?"Needs support in ":"Maintain momentum in ",e.jsx("strong",{children:t.weakestTopic})]})]})})})]})]})}),e.jsxs("div",{className:"bg-card rounded-2xl p-8 shadow-sm border border-border",children:[e.jsx("h2",{className:"text-xl font-display font-bold text-foreground mb-6",children:"AI-Generated Learning Path"}),e.jsxs(oa,{name:"teacher-intervention-learning-path",loading:f,fixture:e.jsxs("div",{className:"space-y-4",children:[e.jsx(ce,{className:"h-24 w-full rounded-xl"}),e.jsx(ce,{className:"h-20 w-full rounded-2xl"}),e.jsx(ce,{className:"h-20 w-full rounded-2xl"}),e.jsx(ce,{className:"h-20 w-full rounded-2xl"})]}),fallback:e.jsxs("div",{className:"space-y-4",children:[e.jsx(ce,{className:"h-24 w-full rounded-xl"}),e.jsx(ce,{className:"h-20 w-full rounded-2xl"}),e.jsx(ce,{className:"h-20 w-full rounded-2xl"}),e.jsx(ce,{className:"h-20 w-full rounded-2xl"})]}),children:[N?e.jsx("div",{className:"bg-[#9956DE]/12 border border-[#9956DE]/30 rounded-xl p-5 mb-6 text-sm text-foreground",children:e.jsx(lo,{children:N})}):null,e.jsxs("div",{className:"space-y-4 relative",children:[e.jsx("div",{className:"absolute left-6 top-8 bottom-8 w-0.5 bg-border"}),De.map((v,_)=>{const le=v.icon;return e.jsxs(Ie.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:_*.1},className:"relative pl-16",children:[e.jsx("div",{className:"absolute left-0 w-12 h-12 bg-gradient-to-br from-[#7274ED] to-[#9956DE] rounded-xl flex items-center justify-center shadow-md",children:e.jsx(le,{size:24,className:"text-white"})}),e.jsx("div",{className:"bg-gradient-to-br from-[#9956DE]/12 to-[#6ED1CF]/18 border border-[#9956DE]/30 rounded-2xl p-5 hover:shadow-md transition-all",children:e.jsxs("div",{className:"flex items-start justify-between mb-2",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-display font-bold text-foreground mb-1",children:v.title}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[v.type==="video"&&`${v.duration} video lesson`,v.type==="quiz"&&`${v.questions} practice questions`,v.type==="assessment"&&`${v.questions} assessment questions`]})]}),e.jsx("span",{className:`px-3 py-1 rounded-lg text-xs font-bold ${v.type==="video"?"bg-[#F08386]/20 text-[#C65E63]":v.type==="quiz"?"bg-[#9956DE]/20 text-[#9956DE]":"bg-[#75D06A]/22 text-[#4D9F46]"}`,children:v.type==="video"?"Video":v.type==="quiz"?"Quiz":"Assessment"})]})})]},v.id)})]})]})]}),e.jsxs("div",{className:"bg-card rounded-2xl p-8 shadow-sm border border-border",children:[e.jsxs("div",{className:"flex items-center justify-between mb-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-display font-bold text-foreground",children:"Targeted Lesson Plan"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Class records drive risk signals. Import-grounded lesson generation needs uploaded course materials for topic context."})]}),e.jsx(Ve,{onClick:()=>q(v=>v+1),disabled:P,className:"bg-[#9956DE] hover:bg-[#7A44B3] text-white",children:P?e.jsx(ce,{className:"h-4 w-20 bg-white/35"}):"Regenerate"})]}),e.jsx("p",{className:"mb-4 text-xs text-muted-foreground bg-[#9956DE]/12 border border-[#9956DE]/30 rounded-lg px-3 py-2",children:"Class records alone are not enough for import-grounded lesson plans. Upload course materials in Data Import to provide lesson topic grounding."}),e.jsxs("div",{className:"mb-4 grid grid-cols-1 md:grid-cols-2 gap-2",children:[e.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground bg-[#f8fafc] border border-border rounded-lg px-3 py-2",children:[e.jsx("input",{type:"checkbox",checked:E,onChange:v=>U(v.target.checked)}),"Allow sources requiring manual review"]}),e.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground bg-[#f8fafc] border border-border rounded-lg px-3 py-2",children:[e.jsx("input",{type:"checkbox",checked:W,onChange:v=>ge(v.target.checked)}),"Allow unverified lesson draft (publish remains blocked)"]})]}),e.jsxs(oa,{name:"teacher-intervention-lesson-plan",loading:P,fixture:e.jsxs("div",{className:"space-y-4",children:[e.jsx(ce,{className:"h-20 w-full rounded-xl"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsx(ce,{className:"h-24 w-full rounded-xl"}),e.jsx(ce,{className:"h-24 w-full rounded-xl"})]}),e.jsx(ce,{className:"h-28 w-full rounded-xl"}),e.jsx(ce,{className:"h-28 w-full rounded-xl"})]}),fallback:e.jsxs("div",{className:"space-y-4",children:[e.jsx(ce,{className:"h-20 w-full rounded-xl"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsx(ce,{className:"h-24 w-full rounded-xl"}),e.jsx(ce,{className:"h-24 w-full rounded-xl"})]}),e.jsx(ce,{className:"h-28 w-full rounded-xl"}),e.jsx(ce,{className:"h-28 w-full rounded-xl"})]}),children:[ne&&e.jsx("div",{className:"bg-[#FF8B8B]/14 border border-[#FF8B8B]/35 rounded-xl p-3 text-sm text-[#D66A6A]",children:ne}),p&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"bg-secondary border border-border rounded-xl p-4",children:[e.jsx("div",{className:"mb-2",children:e.jsx(Cn,{sources:g})}),e.jsx("p",{className:"text-sm font-semibold text-foreground",children:p.lessonTitle}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Imported topics used: ",p.usedImportedTopics?"Yes":"No"," • ","Imported topic count: ",p.importedTopicCount]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Subject: ",p.subject||"general_math"," "," • ","Quarter: Q",p.quarter||1]}),p.curriculumCompetency&&e.jsxs("p",{className:"text-xs text-[#9956DE] font-semibold mt-1",children:["Competency: ",p.curriculumCompetency]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Publish readiness: ",p.publishReady?"Ready":"Blocked"]}),p.warnings.length>0&&e.jsx("p",{className:"text-xs text-[#CC8A37] mt-1",children:p.warnings.join(" ")})]}),e.jsxs("div",{className:"bg-card border border-border rounded-xl p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Curriculum Grounding"}),e.jsx("p",{className:"text-sm font-bold text-foreground mt-1",children:"Source-backed lesson basis"})]}),p.curriculumGrounding&&e.jsxs("span",{className:`px-3 py-1 rounded-full text-[11px] font-semibold border ${p.curriculumGrounding.confidenceBand==="high"?"bg-[#75D06A]/15 text-[#2E7D32] border-[#75D06A]/40":p.curriculumGrounding.confidenceBand==="medium"?"bg-amber-100 text-amber-800 border-amber-200":"bg-[#FF8B8B]/14 text-[#C65E63] border-[#FF8B8B]/35"}`,children:[p.curriculumGrounding.confidenceBand.toUpperCase()," confidence"]})]}),p.lessonObjective&&e.jsxs("div",{className:"bg-muted/60 rounded-xl p-3",children:[e.jsx("p",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider",children:"Lesson objective"}),e.jsx("p",{className:"text-sm text-foreground mt-1",children:p.lessonObjective})]}),p.realWorldHook&&e.jsxs("div",{className:"bg-[#9956DE]/10 border border-[#9956DE]/20 rounded-xl p-3",children:[e.jsx("p",{className:"text-[11px] font-semibold text-[#9956DE] uppercase tracking-wider",children:"Real-life application"}),e.jsx("p",{className:"text-sm text-foreground mt-1",children:p.realWorldHook})]}),p.curriculumGrounding&&e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 text-xs",children:[e.jsxs("div",{className:"bg-muted/50 rounded-xl p-3",children:[e.jsx("p",{className:"text-muted-foreground font-semibold",children:"Retrieval confidence"}),e.jsxs("p",{className:"text-sm font-bold text-foreground mt-1",children:[Math.round((p.curriculumGrounding.confidence||0)*100),"%"]})]}),e.jsxs("div",{className:"bg-muted/50 rounded-xl p-3",children:[e.jsx("p",{className:"text-muted-foreground font-semibold",children:"Retrieved chunks"}),e.jsx("p",{className:"text-sm font-bold text-foreground mt-1",children:p.curriculumGrounding.retrievedChunks})]}),e.jsxs("div",{className:"bg-muted/50 rounded-xl p-3",children:[e.jsx("p",{className:"text-muted-foreground font-semibold",children:"Review state"}),e.jsx("p",{className:"text-sm font-bold text-foreground mt-1",children:p.needsReview?"Needs review":"Ready for review"})]})]}),p.explanation&&e.jsxs("div",{className:"bg-card border border-border rounded-xl p-3",children:[e.jsx("p",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider mb-1",children:"Explanation"}),e.jsx("p",{className:"text-sm text-foreground leading-relaxed",children:p.explanation})]}),e.jsxs("details",{className:"group rounded-xl border border-border bg-card p-3",children:[e.jsxs("summary",{className:"cursor-pointer list-none text-xs font-semibold text-muted-foreground uppercase tracking-wider flex items-center justify-between gap-2",children:["Retrieved source snippets",e.jsx("span",{className:"text-[11px] text-[#9956DE] group-open:rotate-180 transition-transform",children:"▾"})]}),e.jsx("div",{className:"mt-3 space-y-2",children:(p.retrievedEvidence?.length||0)>0?p.retrievedEvidence?.map((v,_)=>e.jsxs("div",{className:"rounded-xl bg-muted/60 border border-border p-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-[11px] text-muted-foreground",children:[e.jsx("span",{className:"font-semibold text-foreground",children:v.sourceFile||"Curriculum source"}),e.jsxs("span",{children:["p.",v.page||"?"]}),e.jsx("span",{children:v.contentDomain||"n/a"}),e.jsxs("span",{children:["score ",(v.score*100).toFixed(1),"%"]})]}),e.jsx("p",{className:"text-sm text-foreground mt-2 leading-relaxed",children:v.content})]},`${v.sourceFile||"source"}-${v.page||_}`)):e.jsx("p",{className:"text-xs text-muted-foreground",children:"No retrieved snippets were returned."})})]}),p.sourceCitations&&p.sourceCitations.length>0&&e.jsxs("div",{className:"rounded-xl bg-muted/50 border border-border p-3",children:[e.jsx("p",{className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider mb-2",children:"Source citations"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:p.sourceCitations.slice(0,6).map(v=>e.jsx("span",{className:"px-2 py-1 rounded-full bg-card border border-border text-[11px] text-foreground",children:v},v))})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("div",{className:"bg-card border border-border rounded-xl p-3",children:[e.jsx("p",{className:"text-xs font-semibold text-muted-foreground",children:"Source Legitimacy"}),e.jsxs("p",{className:"text-sm font-bold text-foreground mt-1",children:[p.sourceLegitimacy.status," (",Math.round(p.sourceLegitimacy.score*100),"%)"]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Verified: ",p.sourceLegitimacy.verifiedMaterials," "," • ","Review: ",p.sourceLegitimacy.reviewMaterials," "," • ","Rejected: ",p.sourceLegitimacy.rejectedMaterials]}),p.sourceLegitimacy.issues.length>0&&e.jsx("p",{className:"text-xs text-[#CC8A37] mt-1",children:p.sourceLegitimacy.issues.slice(0,2).join(" ")})]}),e.jsxs("div",{className:"bg-card border border-border rounded-xl p-3",children:[e.jsx("p",{className:"text-xs font-semibold text-muted-foreground",children:"Self Validation"}),e.jsxs("p",{className:"text-sm font-bold text-foreground mt-1",children:[p.selfValidation.passed?"Passed":"Failed"," (",Math.round(p.selfValidation.score*100),"%)"]}),p.selfValidation.issues.length>0&&e.jsx("p",{className:"text-xs text-[#CC8A37] mt-1",children:p.selfValidation.issues.slice(0,2).join(" ")})]})]}),(pe.length>0||Me.length>0)&&e.jsxs("div",{className:"bg-card border border-border rounded-xl p-3",children:[e.jsx("p",{className:"text-xs font-semibold text-muted-foreground mb-2",children:"Provenance Filters"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:[e.jsxs("label",{className:"text-xs text-muted-foreground flex flex-col gap-1",children:[e.jsx("span",{className:"font-semibold",children:"Source File"}),e.jsxs("select",{value:te,onChange:v=>se(v.target.value),className:"bg-card border border-border rounded-md px-2 py-1.5 text-xs",children:[e.jsx("option",{value:"all",children:"All sources"}),pe.map(v=>e.jsx("option",{value:v,children:v},v))]})]}),e.jsxs("label",{className:"text-xs text-muted-foreground flex flex-col gap-1",children:[e.jsx("span",{className:"font-semibold",children:"Material ID"}),e.jsxs("select",{value:$,onChange:v=>Y(v.target.value),className:"bg-card border border-border rounded-md px-2 py-1.5 text-xs",children:[e.jsx("option",{value:"all",children:"All materials"}),Me.map(v=>e.jsx("option",{value:v,children:v},v))]})]})]}),e.jsxs("p",{className:"text-[11px] text-muted-foreground mt-2",children:["Showing ",ye.length," of ",p.blocks.length," lesson blocks after provenance filters."]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:ye.map(v=>e.jsxs("div",{className:"border border-border rounded-xl p-4 bg-[#fcfdff]",children:[e.jsx("h3",{className:"text-sm font-bold text-foreground",children:v.title}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[v.estimatedMinutes," mins "," • "," ",v.strategy]}),e.jsx("p",{className:"text-sm text-foreground mt-2",children:v.objective}),e.jsxs("div",{className:"mt-3",children:[e.jsx("p",{className:"text-xs font-semibold text-muted-foreground mb-1",children:"Activities"}),v.activities.slice(0,2).map((_,le)=>e.jsxs("p",{className:"text-xs text-muted-foreground",children:["•"," ",_]},le))]}),v.provenance&&e.jsxs("div",{className:"mt-3 bg-[#9956DE]/12 border border-[#9956DE]/30 rounded-lg p-2",children:[e.jsx("p",{className:"text-[11px] font-semibold text-[#9956DE]",children:"Provenance"}),v.provenance.sourceFile&&e.jsxs("p",{className:"text-[11px] text-[#5E3388]",children:["Source: ",v.provenance.sourceFile]}),v.provenance.materialId&&e.jsxs("p",{className:"text-[11px] text-[#5E3388]",children:["Material: ",v.provenance.materialId]})]})]},v.blockId))}),ye.length===0&&e.jsx("div",{className:"border border-border rounded-xl p-4 bg-card text-sm text-muted-foreground",children:"No lesson blocks match the selected provenance filters. Clear one or both filters to view all blocks."}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(Ve,{variant:"outline",onClick:()=>void ee(),disabled:G||!p,className:"border-[#9956DE]/45 text-[#9956DE]",children:G?e.jsx(ce,{className:"h-4 w-16"}):"Save Draft"}),e.jsx(Ve,{onClick:()=>void V(),disabled:ie||!p||!p.publishReady,className:"bg-[#75D06A] hover:bg-[#5AB84E] text-white",children:ie?e.jsx(ce,{className:"h-4 w-24 bg-white/35"}):"Publish Lesson Plan"}),L&&e.jsxs("p",{className:"text-xs text-muted-foreground self-center",children:["Draft ID: ",L]})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs(Ve,{className:"bg-[#9956DE] hover:bg-[#7A44B3] text-white font-bold py-4 rounded-xl flex items-center justify-center gap-2",children:[e.jsx(Ls,{size:20}),"Schedule One-on-One Session"]}),e.jsxs(Ve,{variant:"outline",className:"border-2 border-[#9956DE] text-[#9956DE] hover:bg-[#9956DE]/12 font-bold py-4 rounded-xl flex items-center justify-center gap-2",children:[e.jsx(no,{size:20}),"Export Printed Materials"]})]})]})]})]})},uu=({onEditRecords:t,classSectionId:s,className:a,classMetadata:r,onImportedClassRecords:n,onDataChanged:o})=>{const[i,l]=b.useState(null),[c,d]=b.useState(!1),[x,N]=b.useState(!1),[m,f]=b.useState(!1),[w,T]=b.useState(!1),[j,h]=b.useState(""),[y,C]=b.useState(null),D=b.useRef(null),p=b.useRef(null),z=$=>$.trim().toLowerCase().replace(/\s+/g," "),g=$=>{if(typeof $=="number"&&Number.isFinite($))return $;const Y=Number(String($??"").replace(/[^0-9.-]+/g,""));return Number.isFinite(Y)?Y:null},S=($,Y)=>{const E=Number.isFinite($)?$:Y;return Math.max(0,Math.min(100,E))},I=$=>{const Y=String($??"");return/[",\n]/.test(Y)?`"${Y.replace(/"/g,'""')}"`:Y},B=($,Y)=>{const E=new Map,U=["quarterlyGrade","finalGrades","firstSemester","firstQuarter","secondQuarter","initialGrade"];$.mapping.gradeEntities.forEach(R=>{const H=z(R.fullName||"");if(!H)return;const q=U.map(ee=>g(R[ee])).filter(ee=>ee!==null);if(q.length===0)return;const ae=E.get(H)||[];E.set(H,ae.concat(q))});const W=$.mapping.studentEntities||[];if(W.length===0)return null;const ge=($.imported.schoolContext.semester||$.imported.schoolContext.schoolYear||"First Semester").trim(),L=($.imported.schoolContext.subjectName||"Class Record Import").trim(),k=(s||a||"import").replace(/[^a-zA-Z0-9]+/g,"").toUpperCase().slice(0,12)||"IMPORT",F=[["name","lrn","email","engagementScore","avgQuizScore","attendance","assignmentCompletion","term","assessmentName"].join(",")];if(W.forEach((R,H)=>{const q=z(R.fullName||""),ae=E.get(q)||[],ee=ae.length>0?ae.reduce((_,le)=>_+le,0)/ae.length:75,V=S(ee,75),pe=S(V+5,85),Me=S(V*.7+pe*.3,80),ye=S(pe*.6+V*.4,82),De=R.learnerNo||H+1,Ge=`IMP-${k}-${String(De).padStart(4,"0")}`,v=R.fullName||`Learner ${H+1}`;F.push([I(v),I(Ge),I(""),I(Number(Me.toFixed(1))),I(Number(V.toFixed(1))),I(Number(pe.toFixed(1))),I(Number(ye.toFixed(1))),I(ge),I(L)].join(","))}),F.length<=1)return null;const ie=Y.replace(/\.(xlsx|xls)$/i,"");return new File([F.join(` +`)],`${ie}-normalized.csv`,{type:"text/csv"})},P=async $=>{f(!0),h(""),C(null);let Y=$;if(/\.(xlsx|xls)$/i.test($.name))try{const E=await Zm($,{confidenceThreshold:Za});l(E);const U=B(E,$.name);U&&(Y=U)}catch{l(null)}else l(null);try{const E=await We.uploadClassRecords(Y,{classSectionId:s,className:a,datasetIntent:"synthetic_student_records"}),U=E.students.length,W=E.warnings&&E.warnings.length>0?E.warnings.slice(0,3).join(" "):"",ge=E.dashboardSync?` Dashboard sync: ${E.dashboardSync.synced?"ok":"pending"} (created ${E.dashboardSync.createdStudents}, updated ${E.dashboardSync.updatedStudents}).`:"",L=ou(E,s,a,r);if(U>0&&n?.({students:E.students,classSectionId:L.classSectionId,className:L.className,classMetadata:L.classMetadata}),E.success){ue.success(`Successfully imported ${U} student records. Next step: upload course materials for AI lesson-plan grounding.`);const k=E.riskRefresh?.queued?` Risk refresh queued for ${E.riskRefresh.studentsQueued} students (job ${E.riskRefresh.refreshId||"n/a"}).`:` Risk refresh not queued${E.riskRefresh?.reason?`: ${E.riskRefresh.reason}`:""}.`,G=E.interpretationSummary,F=G?` Interpreted columns - scoring: ${G.scoringColumns}, display: ${G.displayColumns}, storage-only: ${G.storageOnlyColumns}, low-confidence: ${G.lowConfidenceColumns}.`:"",ie=W?` Warnings: ${W}`:"";h(`Imported ${U} students. Next step: upload course materials to give AI lesson generation topic context.${k}${ge}${F}${ie} Column mapping: ${JSON.stringify(E.columnMapping)}`),C({datasetIntent:E.datasetIntent,summary:E.interpretationSummary,columns:E.columnInterpretations?.map(R=>({columnName:R.columnName,mappedField:R.mappedField,usagePolicy:R.usagePolicy,confidenceBand:R.confidenceBand,domainSignals:R.domainSignals}))||[]}),o?.()}else{const G=(E.files||[]).flatMap(F=>F.warnings||[]).slice(0,3).join(" ")||W||"Import completed but no usable student rows were detected. Check required columns and retry.";h(G),ue.error(G)}}catch(E){let U=E instanceof Error?E.message:"Upload failed";const W=U.toLowerCase();E instanceof Fs&&W.includes("missing required educational columns after mapping")&&W.includes("assignmentcompletion")&&(U="Your file matches the minimal import schema, but the connected backend is running an older validator that still requires assignmentCompletion. Update/redeploy the backend or point VITE_API_URL to this updated backend."),ue.error(U),h(U),C(null)}finally{f(!1)}},J=async $=>{T(!0),h("");try{const Y=await We.uploadCourseMaterials($,{classSectionId:s,className:a});if(Y.success){const E=Y.topics?.length??0;ue.success(`Course material imported (${E} topics extracted). Lesson generation now has material context.`),h(`Imported course material ${Y.fileName} with ${E} topics and ${Y.sections.length} section(s). Lesson generation is now ready with material context.`),o?.()}}catch(Y){ue.error(Y instanceof Error?Y.message:"Course material upload failed"),h("Course material upload failed. Please check the file format and try again.")}finally{T(!1)}},ne=$=>{$.preventDefault(),d(!1);const Y=$.dataTransfer.files[0];Y&&P(Y)},X=$=>{const Y=$.target.files?.[0];Y&&P(Y)},te=$=>{$.preventDefault(),N(!1);const Y=$.dataTransfer.files[0];Y&&J(Y)},se=$=>{const Y=$.target.files?.[0];Y&&J(Y)};return e.jsx(Ie.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"p-6",children:e.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[e.jsxs("div",{className:"mb-2",children:[e.jsx("h2",{className:"text-xl font-display font-bold text-foreground",children:"Import Data"}),e.jsx("p",{className:"text-muted-foreground",children:"Class records drive analytics and at-risk signals. Course materials provide topic grounding for AI lesson plans."}),e.jsxs("div",{className:"mt-2 flex flex-wrap gap-2 items-center text-xs text-muted-foreground",children:[e.jsxs("span",{className:"px-2 py-1 rounded-md bg-muted border border-border",children:["Class scope: ",a||s||"All classes"]}),[r?.gradeLevel,r?.classification,r?.strand].filter(Boolean).map($=>e.jsx("span",{className:"px-2 py-1 rounded-md bg-[#9956DE]/12 border border-[#9956DE]/30 text-[#9956DE] font-medium",children:$},`import-meta-${$}`))]})]}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6",children:[e.jsx("div",{className:`bg-card border-4 border-dashed rounded-3xl p-6 transition-all ${c?"border-[#9956DE] bg-[#9956DE]/12":"border-border"}`,children:e.jsxs("div",{onDragOver:$=>{$.preventDefault(),d(!0)},onDragLeave:()=>d(!1),onDrop:ne,onClick:()=>D.current?.click(),className:"rounded-2xl border-2 border-dashed border-border p-8 text-center transition-all cursor-pointer hover:border-[#9956DE]/60 hover:bg-[#9956DE]/8",children:[e.jsx("input",{ref:D,type:"file",accept:".csv,.xlsx,.pdf",onChange:X,className:"hidden"}),e.jsx("div",{className:"w-20 h-20 bg-[#9956DE]/20 rounded-2xl flex items-center justify-center mx-auto mb-6",children:m?e.jsx(ce,{className:"h-10 w-10 rounded-2xl bg-[#9956DE]/32"}):e.jsx(Ll,{size:40,className:"text-[#9956DE]"})}),e.jsx("h3",{className:"text-xl font-display font-bold text-foreground mb-2",children:"Class Records"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:m?e.jsxs("span",{className:"inline-flex flex-col items-center gap-2",children:[e.jsx(ce,{className:"h-4 w-44 bg-[#9956DE]/32"}),e.jsx(ce,{className:"h-4 w-36 bg-[#9956DE]/20"})]}):"Upload student grades, attendance, and quiz scores"}),e.jsxs("p",{className:"text-xs text-muted-foreground mb-4 flex items-center justify-center gap-2",children:[e.jsx("span",{className:"bg-muted px-2 py-1 rounded text-muted-foreground font-medium",children:".csv"}),e.jsx("span",{className:"bg-muted px-2 py-1 rounded text-muted-foreground font-medium",children:".xlsx"}),e.jsx("span",{className:"bg-muted px-2 py-1 rounded text-muted-foreground font-medium",children:".xls"}),e.jsx("span",{className:"bg-muted px-2 py-1 rounded text-muted-foreground font-medium",children:".pdf"})]}),e.jsx(Ve,{className:"bg-card border-2 border-border text-muted-foreground hover:border-[#9956DE] hover:text-[#9956DE] font-bold px-6 py-3 rounded-xl w-full transition-colors",children:"Click or drag & drop"})]})}),e.jsxs("div",{onDragOver:$=>{$.preventDefault(),N(!0)},onDragLeave:()=>N(!1),onDrop:te,onClick:()=>p.current?.click(),className:`bg-card border-4 border-dashed rounded-3xl p-12 text-center transition-all cursor-pointer hover:border-[#F08386]/60 hover:bg-[#F08386]/12 ${x?"border-[#F08386] bg-[#F08386]/12 scale-105":"border-border"}`,children:[e.jsx("input",{ref:p,type:"file",accept:".pdf,.docx,.txt",onChange:se,className:"hidden"}),e.jsx("div",{className:"w-20 h-20 bg-[#F08386]/20 rounded-2xl flex items-center justify-center mx-auto mb-6",children:w?e.jsx(ce,{className:"h-10 w-10 rounded-2xl bg-rose-200"}):e.jsx(tr,{size:40,className:"text-[#F08386]"})}),e.jsx("h3",{className:"text-xl font-display font-bold text-foreground mb-2",children:"Course Materials"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:w?e.jsxs("span",{className:"inline-flex flex-col items-center gap-2",children:[e.jsx(ce,{className:"h-4 w-48 bg-rose-200"}),e.jsx(ce,{className:"h-4 w-40 bg-[#F08386]/20"})]}):"Upload syllabus, lesson plans, and curriculum documents"}),e.jsxs("p",{className:"text-xs text-slate-500 mb-4 flex items-center justify-center gap-2",children:[e.jsx("span",{className:"bg-muted px-2 py-1 rounded text-muted-foreground font-medium",children:".pdf"}),e.jsx("span",{className:"bg-muted px-2 py-1 rounded text-muted-foreground font-medium",children:".docx"}),e.jsx("span",{className:"bg-muted px-2 py-1 rounded text-muted-foreground font-medium",children:".txt"})]}),e.jsx(Ve,{className:"bg-card border-2 border-border text-muted-foreground hover:border-[#F08386] hover:text-[#F08386] font-bold px-6 py-3 rounded-xl w-full transition-colors",children:"Click or drag & drop"})]})]}),i&&e.jsxs("div",{className:"bg-card border border-border rounded-2xl p-4",children:[e.jsx("h3",{className:"text-base font-display font-bold text-foreground mb-2",children:"Workbook Preview Summary"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-3 text-sm",children:[e.jsxs("div",{className:"bg-muted rounded-lg p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"School"}),e.jsx("p",{className:"font-semibold text-foreground",children:i.imported.schoolContext.schoolName||"N/A"})]}),e.jsxs("div",{className:"bg-muted rounded-lg p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Subject"}),e.jsx("p",{className:"font-semibold text-foreground",children:i.imported.schoolContext.subjectName||"N/A"})]}),e.jsxs("div",{className:"bg-muted rounded-lg p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Learners"}),e.jsx("p",{className:"font-semibold text-foreground",children:i.imported.learners.length})]}),e.jsxs("div",{className:"bg-muted rounded-lg p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Confidence"}),e.jsx("p",{className:"font-semibold text-foreground",children:i.imported.validation.confidence.toFixed(2)})]})]})]}),e.jsxs("div",{className:"bg-[#9956DE]/12 border border-[#9956DE]/30 rounded-2xl p-6",children:[e.jsx("h3",{className:"text-lg font-display font-bold text-[#7A44B3] mb-3",children:"How AI Uses Your Data"}),e.jsxs("div",{className:"space-y-2 text-[#5E3388]/80 text-sm",children:[e.jsxs("p",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-[#9956DE] font-bold",children:"•"}),e.jsxs("span",{children:[e.jsx("strong",{className:"text-[#7A44B3]",children:"Smart Format Detection:"})," AI understands various spreadsheet formats and column names"]})]}),e.jsxs("p",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-[#9956DE] font-bold",children:"•"}),e.jsx("span",{children:"Analyzes historical performance patterns to predict at-risk students"})]}),e.jsxs("p",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-[#9956DE] font-bold",children:"•"}),e.jsx("span",{children:"Maps curriculum topics to student knowledge gaps"})]}),e.jsxs("p",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-[#9956DE] font-bold",children:"•"}),e.jsx("span",{children:"Generates personalized remedial learning paths"})]}),e.jsxs("p",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-[#9956DE] font-bold",children:"•"}),e.jsx("span",{children:"All data is processed securely and never shared"})]})]})]}),j&&e.jsx("div",{className:"bg-[#75D06A]/14 border border-[#75D06A]/35 rounded-2xl p-4 text-sm text-[#3E8538]",children:j}),y&&e.jsxs("div",{className:"bg-card rounded-2xl p-6 shadow-sm border border-border",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("h3",{className:"text-lg font-display font-bold text-foreground",children:"Import Interpretation"}),e.jsxs("span",{className:"text-xs px-2 py-1 rounded bg-muted text-[#334155]",children:["Intent: ",y.datasetIntent||"synthetic_student_records"]})]}),y.summary&&e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-3 mb-4",children:[e.jsxs("div",{className:"bg-[#f8fbff] border border-border rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Scoring"}),e.jsx("p",{className:"text-lg font-bold text-foreground",children:y.summary.scoringColumns})]}),e.jsxs("div",{className:"bg-[#f8fbff] border border-border rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Display"}),e.jsx("p",{className:"text-lg font-bold text-foreground",children:y.summary.displayColumns})]}),e.jsxs("div",{className:"bg-[#FFB356]/16 border border-[#FFB356]/38 rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-[#CC8A37]",children:"Storage-only"}),e.jsx("p",{className:"text-lg font-bold text-[#A56D29]",children:y.summary.storageOnlyColumns})]}),e.jsxs("div",{className:"bg-[#F08386]/12 border border-[#F08386]/30 rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-[#C65E63]",children:"Low confidence"}),e.jsx("p",{className:"text-lg font-bold text-[#A74B50]",children:y.summary.lowConfidenceColumns})]}),e.jsxs("div",{className:"bg-[#f8fbff] border border-border rounded-xl p-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Domain warnings"}),e.jsx("p",{className:"text-lg font-bold text-foreground",children:y.summary.domainMismatchWarnings})]})]}),y.columns.length>0?e.jsx("div",{className:"space-y-2 max-h-64 overflow-auto pr-1",children:y.columns.slice(0,40).map($=>e.jsxs("div",{className:"bg-[#f8fafc] border border-border rounded-lg px-3 py-2",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:$.columnName}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["mapped: ",$.mappedField||"none"," • ","usage: ",$.usagePolicy," • ","confidence: ",$.confidenceBand]}),$.domainSignals&&$.domainSignals.length>0&&e.jsxs("p",{className:"text-xs text-[#CC8A37] mt-1",children:["domain signals: ",$.domainSignals.join(", ")]})]},$.columnName))}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"No per-column interpretation data was returned for this upload."})]}),e.jsxs("div",{className:"bg-card rounded-2xl p-6 shadow-sm border border-border",children:[e.jsx("h3",{className:"text-lg font-display font-bold text-foreground mb-4",children:"Manage Imported Data"}),e.jsxs("button",{onClick:t,className:"w-full bg-[#00a86b] hover:bg-[#008f5d] text-white rounded-xl p-5 flex items-center justify-between transition-all shadow-sm hover:shadow-md group",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-12 h-12 bg-card/20 rounded-xl flex items-center justify-center backdrop-blur-sm",children:e.jsx(uo,{size:24,className:"text-white"})}),e.jsxs("div",{className:"text-left",children:[e.jsx("h4",{className:"font-bold text-lg",children:"Edit Class Records"}),e.jsx("p",{className:"text-white/90 text-sm",children:"Review and correct AI-analyzed student data"})]})]}),e.jsx(Ht,{size:24,className:"text-white/80 group-hover:text-[#9956DE] group-hover:translate-x-1 transition-all"})]})]})]})})},xu=({students:t,teacherId:s,teacherName:a,onBack:r})=>{const[n,o]=b.useState(t),[i,l]=b.useState(!1),c=b.useCallback(m=>gs(m),[]),[d,x]=b.useState(()=>Object.fromEntries(t.map(m=>[c(m),{grade:m.grade||"Grade 11",section:m.section||"Section A"}])));b.useEffect(()=>{o(t),x(Object.fromEntries(t.map(m=>[c(m),{grade:m.grade||"Grade 11",section:m.section||"Section A"}])))},[c,t]);const N=async()=>{l(!0);try{for(const m of n){const f=d[c(m)],w=f?.grade||m.grade,T=f?.section||m.section;s&&(w!==m.grade||T!==m.section)&&(await Ko(m.id,w,T,s,new Date().getFullYear().toString(),a),await Wo(m.id,w,T));try{const j=await We.predictRisk({engagementScore:m.engagementScore,avgQuizScore:m.avgScore,attendance:m.attendance,assignmentCompletion:m.assignmentCompletion});await bd(m.id,j.riskLevel,j.confidence)}catch{}}o(m=>m.map(f=>{const w=d[c(f)];if(!w)return f;const T=et({metadata:f.classMetadata,classSectionId:f.classSectionId,className:[w.grade,w.section].filter(Boolean).join(" - "),grade:w.grade,section:w.section});return{...f,grade:w.grade,section:w.section,className:T.className||[w.grade,w.section].filter(Boolean).join(" - "),classSectionId:T.classSectionId||f.classSectionId,classMetadata:T}})),ue.success("Records saved and risk levels updated"),r()}catch{ue.error("Failed to save changes")}finally{l(!1)}};return e.jsxs(Ie.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"p-6 h-full flex flex-col",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("button",{onClick:r,className:"p-2 hover:bg-muted rounded-lg transition-colors text-muted-foreground",children:e.jsx(Bt,{size:24})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-display font-bold text-foreground",children:"Edit Class Records"}),e.jsx("p",{className:"text-muted-foreground",children:"Review and modify student data manually"})]})]}),e.jsxs("div",{className:"flex gap-3 justify-end",children:[e.jsx(Ve,{variant:"outline",onClick:r,className:"border-border",children:"Cancel"}),e.jsxs(Ve,{onClick:N,disabled:i,className:"bg-[#75D06A] hover:bg-[#5AB84E] text-white gap-2",children:[i?e.jsx(ce,{className:"h-5 w-5 rounded-full bg-white/35"}):e.jsx(oo,{size:18}),i?"Saving...":"Save Changes"]})]})]}),e.jsxs("div",{className:"bg-card border border-border rounded-2xl shadow-sm flex-1 overflow-hidden flex flex-col",children:[e.jsxs("div",{className:"p-4 border-b border-border bg-background flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e.jsx(Ha,{size:18}),e.jsx("span",{className:"text-sm",children:"Click on any field to edit"})]}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:["Showing ",n.length," records"]})]}),e.jsx("div",{className:"overflow-auto flex-1",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{className:"bg-background sticky top-0 z-10",children:e.jsxs("tr",{children:[e.jsx("th",{className:"p-4 font-bold text-muted-foreground border-b border-border bg-background",children:"Student Name"}),e.jsx("th",{className:"p-4 font-bold text-muted-foreground border-b border-border bg-background",children:"LRN"}),e.jsx("th",{className:"p-4 font-bold text-muted-foreground border-b border-border bg-background",children:"Grade"}),e.jsx("th",{className:"p-4 font-bold text-muted-foreground border-b border-border bg-background",children:"Section"}),e.jsx("th",{className:"p-4 font-bold text-muted-foreground border-b border-border bg-background",children:"Avg Score"}),e.jsx("th",{className:"p-4 font-bold text-muted-foreground border-b border-border bg-background",children:"Risk Level"}),e.jsx("th",{className:"p-4 font-bold text-muted-foreground border-b border-border bg-background",children:"Weakest Topic"}),e.jsx("th",{className:"p-4 font-bold text-muted-foreground border-b border-border bg-background",children:"Actions"})]})}),e.jsx("tbody",{children:n.map(m=>{const f=c(m);return e.jsxs("tr",{className:"border-b border-border hover:bg-[#9956DE]/12 group transition-colors",children:[e.jsx("td",{className:"p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:m.avatar,alt:"",className:"w-8 h-8 rounded-full object-cover"}),e.jsx("span",{className:"font-medium text-foreground",children:m.name})]})}),e.jsx("td",{className:"p-4 text-muted-foreground font-mono text-sm",children:m.lrn||"Not set"}),e.jsx("td",{className:"p-4 min-w-[140px]",children:e.jsx(pt,{id:`edit-record-grade-${f}`,name:`edit-record-grade-${f}`,"aria-label":`Edit grade for ${m.name}`,value:d[f]?.grade||m.grade,onChange:w=>x(T=>({...T,[f]:{...T[f],grade:w.target.value}})),className:"h-9 text-sm"})}),e.jsx("td",{className:"p-4 min-w-[140px]",children:e.jsx(pt,{id:`edit-record-section-${f}`,name:`edit-record-section-${f}`,"aria-label":`Edit section for ${m.name}`,value:d[f]?.section||m.section,onChange:w=>x(T=>({...T,[f]:{...T[f],section:w.target.value}})),className:"h-9 text-sm"})}),e.jsx("td",{className:"p-4",children:e.jsxs("span",{className:`font-bold ${m.avgScore<60?"text-[#FF8B8B]":m.avgScore<80?"text-[#F08386]":"text-green-600"}`,children:[m.avgScore,"%"]})}),e.jsx("td",{className:"p-4",children:e.jsx("span",{className:`px-2 py-1 rounded text-xs font-bold ${ba(m.riskLevel)}`,children:m.riskLevel.toUpperCase()})}),e.jsx("td",{className:"p-4 text-muted-foreground",children:m.weakestTopic}),e.jsx("td",{className:"p-4",children:e.jsx("button",{className:"p-2 hover:bg-muted rounded-lg text-slate-500 hover:text-[#9956DE] transition-colors",children:e.jsx(uo,{size:16})})})]},f)})})]})})]})]})};function ba(t){switch(t){case"high":return"bg-[#FF8B8B]/22 text-[#D66A6A] border-[#FF8B8B]/35";case"medium":return"bg-[#F08386]/20 text-[#C65E63] border-[#F08386]/30";case"low":return"bg-[#75D06A]/22 text-[#4D9F46] border-[#75D06A]/35"}}function hu(t){switch(t){case"high":return"border-red-500 bg-[#FF8B8B]/14";case"medium":return"border-[#F08386] bg-[#F08386]/12";case"low":return"border-[#75D06A] bg-[#75D06A]/14"}}export{bx as default}; diff --git a/assets/XPNotification-B39PrFBD.js b/assets/XPNotification-CRyPsEGd.js similarity index 92% rename from assets/XPNotification-B39PrFBD.js rename to assets/XPNotification-CRyPsEGd.js index 9603785121f78c117d5155a3d760c4282c549938..c4cd815b848452f42fa2439e3515ee73848b8efe 100644 --- a/assets/XPNotification-B39PrFBD.js +++ b/assets/XPNotification-CRyPsEGd.js @@ -1 +1 @@ -import{r as l,j as e}from"./vendor-react-B4AQeu28.js";import{h as n,m as s}from"./index-fWY85Kyg.js";import{S as m}from"./star-BKdRsvg1.js";import{S as c}from"./sparkles-BY90tCLG.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";const w=({xp:r,message:a,show:t,onComplete:i})=>(l.useEffect(()=>{if(t){const o=setTimeout(()=>{i()},3e3);return()=>clearTimeout(o)}},[t,i]),e.jsx(n,{children:t&&e.jsx(s.div,{initial:{opacity:0,y:-50,scale:.8},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-20,scale:.9},transition:{type:"spring",damping:25,stiffness:200},className:"fixed top-8 left-1/2 -translate-x-1/2 z-50",style:{willChange:"transform, opacity"},children:e.jsxs("div",{className:"bg-gradient-to-r from-rose-400 via-orange-500 to-rose-500 text-white px-6 py-4 rounded-2xl shadow-2xl border-2 border-rose-300 flex items-center gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-10 h-10 bg-white/20 rounded-xl flex items-center justify-center",children:e.jsx(m,{size:20,className:"text-white",fill:"currentColor"})}),e.jsx(s.div,{className:"absolute -top-1 -right-1",animate:{rotate:[0,360]},transition:{duration:2,repeat:1/0,ease:"linear"},style:{willChange:"transform"},children:e.jsx(c,{size:16,className:"text-rose-200"})})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold",children:a}),e.jsxs("p",{className:"text-2xl font-black",children:["+",r," XP"]})]})]})})}));export{w as default}; +import{r as l,j as e}from"./vendor-react-B4AQeu28.js";import{h as n,m as s}from"./index-Du57tmo9.js";import{S as m}from"./star-BBetp7Wf.js";import{S as c}from"./sparkles-DseoQb3m.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";const w=({xp:r,message:a,show:t,onComplete:i})=>(l.useEffect(()=>{if(t){const o=setTimeout(()=>{i()},3e3);return()=>clearTimeout(o)}},[t,i]),e.jsx(n,{children:t&&e.jsx(s.div,{initial:{opacity:0,y:-50,scale:.8},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-20,scale:.9},transition:{type:"spring",damping:25,stiffness:200},className:"fixed top-8 left-1/2 -translate-x-1/2 z-50",style:{willChange:"transform, opacity"},children:e.jsxs("div",{className:"bg-gradient-to-r from-rose-400 via-orange-500 to-rose-500 text-white px-6 py-4 rounded-2xl shadow-2xl border-2 border-rose-300 flex items-center gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-10 h-10 bg-white/20 rounded-xl flex items-center justify-center",children:e.jsx(m,{size:20,className:"text-white",fill:"currentColor"})}),e.jsx(s.div,{className:"absolute -top-1 -right-1",animate:{rotate:[0,360]},transition:{duration:2,repeat:1/0,ease:"linear"},style:{willChange:"transform"},children:e.jsx(c,{size:16,className:"text-rose-200"})})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold",children:a}),e.jsxs("p",{className:"text-2xl font-black",children:["+",r," XP"]})]})]})})}));export{w as default}; diff --git a/assets/automationService-DoO5SNeM.js b/assets/automationService-ChmA_Dh7.js similarity index 98% rename from assets/automationService-DoO5SNeM.js rename to assets/automationService-ChmA_Dh7.js index c0792a4fb334d3dfe4c96234f8c3fa25477b24e3..7f081b44d4f420136f55fdd97591c24061b34427 100644 --- a/assets/automationService-DoO5SNeM.js +++ b/assets/automationService-ChmA_Dh7.js @@ -1 +1 @@ -import{d as g,e as a,a as c,s as l,m as D,q as z,w as b,h as A,u as C,n as Q}from"./vendor-firebase-firestore-52DD1vc9.js";import{d as r,aw as $}from"./index-fWY85Kyg.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-react-B4AQeu28.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";const m=async(e,n,o,u,i)=>{try{const t=g(a(r,"notifications")),s={id:t.id,userId:e,type:n,title:o,message:u,read:!1,...i?{actionUrl:i}:{},createdAt:new Date},d={id:s.id,userId:s.userId,type:s.type,title:s.title,message:s.message,read:s.read,createdAt:c(),link:i||null};return await l(t,{...d}),s}catch(t){throw console.error("Error creating notification:",t),t}};async function E(e){if(!e)return 0;const n=a(r,"deepDiagnosticAssignments"),o=z(n,b("lrn","==",e));return(await A(o)).docs.filter(i=>{const t=i.data().status;return t==="pending"||t==="queued"||t==="in_progress"||t==="expired"}).length}async function M(e,n,o="Grade 11",u,i="iar_only",t="initial_assessment"){if(t==="followup_diagnostic"){const s=a(r,"deepDiagnosticAssignments"),d=z(s,b("lrn","==",e)),f=await A(d);if(!f.empty){const p=Q(r);let w=!1;for(const h of f.docs){const I=h.data().status;(I==="pending"||I==="queued")&&(p.update(h.ref,{status:"in_progress",startedAt:c()}),w=!0)}w&&await p.commit()}}return await l(g(r,"diagnosticResults",e),{lrn:e,results:n,gradeLevel:o,workflowMode:i,assessmentType:t,questionBreakdown:u||null,completedAt:c(),processed:!1,processing:!1}),{success:!0,event:"diagnostic_completed",lrn:e,message:`Diagnostic submitted for ${e}. Processing will begin automatically.`,remedialQuizzesCreated:0,notifications:["Your diagnostic results are being processed. Check back shortly!"]}}async function x(e){return await D(a(r,"quizResults"),{lrn:e.lrn,studentId:e.lrn,quizId:e.quizId,subject:e.subject,score:e.score,totalQuestions:e.totalQuestions,correctAnswers:e.correctAnswers,timeSpentSeconds:e.timeSpentSeconds,answers:e.answers||null,submittedAt:c()}),{success:!0,event:"quiz_submitted",lrn:e.lrn,message:`Quiz submitted for ${e.lrn}. Risk recalculation will run automatically.`,remedialQuizzesCreated:0,notifications:[`Quiz result recorded for ${e.subject}.`]}}async function N(e){return await $(e.lrn),await m(e.lrn,"reminder","Welcome to MathPulse AI!","Complete your diagnostic assessment to get started with personalised learning."),e.teacherId&&await m(e.teacherId,"message","New Student Enrolled",`${e.name} has joined. Diagnostic assessment is pending.`),{success:!0,event:"student_enrolled",lrn:e.lrn,message:`Student ${e.name} enrolled and initialised`,remedialQuizzesCreated:0,notifications:[`Welcome ${e.name}! Please complete the diagnostic assessment.`]}}async function W(e){return await D(a(r,"dataImports"),{teacherId:e.teacherId,studentCount:e.students.length,columnMapping:e.columnMapping,importedAt:c(),processed:!1}),await m(e.teacherId,"message","Data Import Processed",`Data import complete — ${e.students.length} student records processed.`),{success:!0,event:"data_imported",message:`Data import processed for ${e.students.length} students`,remedialQuizzesCreated:0,notifications:[`Data import complete — ${e.students.length} student records processed.`]}}async function G(e){const n=g(r,"curriculumContent",e.contentId);return e.action==="delete"?await C(n,{deleted:!0,deletedBy:e.adminId,deletedAt:c(),contentType:e.contentType,subjectId:e.subjectId||null}):await l(n,{contentType:e.contentType,subjectId:e.subjectId||null,details:e.details||null,updatedBy:e.adminId,action:e.action,updatedAt:c()},{merge:!0}),{success:!0,event:"content_updated",message:`Content ${e.action} processed for ${e.contentType}`,remedialQuizzesCreated:0,notifications:[]}}export{E as getPendingDeepDiagnosticCount,G as triggerContentUpdated,W as triggerDataImported,M as triggerDiagnosticCompleted,x as triggerQuizSubmitted,N as triggerStudentEnrolled}; +import{d as g,e as a,a as c,s as l,m as D,q as z,w as b,h as A,u as C,n as Q}from"./vendor-firebase-firestore-52DD1vc9.js";import{d as r,av as $}from"./index-Du57tmo9.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-react-B4AQeu28.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";const m=async(e,n,o,u,i)=>{try{const t=g(a(r,"notifications")),s={id:t.id,userId:e,type:n,title:o,message:u,read:!1,...i?{actionUrl:i}:{},createdAt:new Date},d={id:s.id,userId:s.userId,type:s.type,title:s.title,message:s.message,read:s.read,createdAt:c(),link:i||null};return await l(t,{...d}),s}catch(t){throw console.error("Error creating notification:",t),t}};async function E(e){if(!e)return 0;const n=a(r,"deepDiagnosticAssignments"),o=z(n,b("lrn","==",e));return(await A(o)).docs.filter(i=>{const t=i.data().status;return t==="pending"||t==="queued"||t==="in_progress"||t==="expired"}).length}async function M(e,n,o="Grade 11",u,i="iar_only",t="initial_assessment"){if(t==="followup_diagnostic"){const s=a(r,"deepDiagnosticAssignments"),d=z(s,b("lrn","==",e)),f=await A(d);if(!f.empty){const p=Q(r);let w=!1;for(const h of f.docs){const I=h.data().status;(I==="pending"||I==="queued")&&(p.update(h.ref,{status:"in_progress",startedAt:c()}),w=!0)}w&&await p.commit()}}return await l(g(r,"diagnosticResults",e),{lrn:e,results:n,gradeLevel:o,workflowMode:i,assessmentType:t,questionBreakdown:u||null,completedAt:c(),processed:!1,processing:!1}),{success:!0,event:"diagnostic_completed",lrn:e,message:`Diagnostic submitted for ${e}. Processing will begin automatically.`,remedialQuizzesCreated:0,notifications:["Your diagnostic results are being processed. Check back shortly!"]}}async function x(e){return await D(a(r,"quizResults"),{lrn:e.lrn,studentId:e.lrn,quizId:e.quizId,subject:e.subject,score:e.score,totalQuestions:e.totalQuestions,correctAnswers:e.correctAnswers,timeSpentSeconds:e.timeSpentSeconds,answers:e.answers||null,submittedAt:c()}),{success:!0,event:"quiz_submitted",lrn:e.lrn,message:`Quiz submitted for ${e.lrn}. Risk recalculation will run automatically.`,remedialQuizzesCreated:0,notifications:[`Quiz result recorded for ${e.subject}.`]}}async function N(e){return await $(e.lrn),await m(e.lrn,"reminder","Welcome to MathPulse AI!","Complete your diagnostic assessment to get started with personalised learning."),e.teacherId&&await m(e.teacherId,"message","New Student Enrolled",`${e.name} has joined. Diagnostic assessment is pending.`),{success:!0,event:"student_enrolled",lrn:e.lrn,message:`Student ${e.name} enrolled and initialised`,remedialQuizzesCreated:0,notifications:[`Welcome ${e.name}! Please complete the diagnostic assessment.`]}}async function W(e){return await D(a(r,"dataImports"),{teacherId:e.teacherId,studentCount:e.students.length,columnMapping:e.columnMapping,importedAt:c(),processed:!1}),await m(e.teacherId,"message","Data Import Processed",`Data import complete — ${e.students.length} student records processed.`),{success:!0,event:"data_imported",message:`Data import processed for ${e.students.length} students`,remedialQuizzesCreated:0,notifications:[`Data import complete — ${e.students.length} student records processed.`]}}async function G(e){const n=g(r,"curriculumContent",e.contentId);return e.action==="delete"?await C(n,{deleted:!0,deletedBy:e.adminId,deletedAt:c(),contentType:e.contentType,subjectId:e.subjectId||null}):await l(n,{contentType:e.contentType,subjectId:e.subjectId||null,details:e.details||null,updatedBy:e.adminId,action:e.action,updatedAt:c()},{merge:!0}),{success:!0,event:"content_updated",message:`Content ${e.action} processed for ${e.contentType}`,remedialQuizzesCreated:0,notifications:[]}}export{E as getPendingDeepDiagnosticCount,G as triggerContentUpdated,W as triggerDataImported,M as triggerDiagnosticCompleted,x as triggerQuizSubmitted,N as triggerStudentEnrolled}; diff --git a/assets/award-DBHp-ybd.js b/assets/award-ZQxHm68j.js similarity index 91% rename from assets/award-DBHp-ybd.js rename to assets/award-ZQxHm68j.js index 51f3d9129c6829b3016fa66c06e7d408acec0a99..51a4a3d057bf4dc9064bbc6889be61f29f4b9957 100644 --- a/assets/award-DBHp-ybd.js +++ b/assets/award-ZQxHm68j.js @@ -1,4 +1,4 @@ -import{c}from"./index-fWY85Kyg.js";/** +import{c}from"./index-Du57tmo9.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/bell-BwBudSvY.js b/assets/bell-CVB0-Rn1.js similarity index 90% rename from assets/bell-BwBudSvY.js rename to assets/bell-CVB0-Rn1.js index e19aafbec0d39ae6f6a263b0232eddd7c4f6b65c..ebb38ec2585d66fd6352d529c8acede40bca5d65 100644 --- a/assets/bell-BwBudSvY.js +++ b/assets/bell-CVB0-Rn1.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-fWY85Kyg.js";/** +import{c as e}from"./index-Du57tmo9.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/book-open-D5mR6gz9.js b/assets/book-open-cmOvedFO.js similarity index 90% rename from assets/book-open-D5mR6gz9.js rename to assets/book-open-cmOvedFO.js index dcd4cda92b7d782af0a7cc0ffb4f684247da6188..b485dbbacc527e109c9769c73b94676e748d5127 100644 --- a/assets/book-open-D5mR6gz9.js +++ b/assets/book-open-cmOvedFO.js @@ -1,4 +1,4 @@ -import{c as o}from"./index-fWY85Kyg.js";/** +import{c as o}from"./index-Du57tmo9.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/brain-COga8OrM.js b/assets/brain-CEG2uNCc.js similarity index 95% rename from assets/brain-COga8OrM.js rename to assets/brain-CEG2uNCc.js index e85f70589c538fbc25945cab3a4668651e3029ef..566f56cb3a7148e6ef42d08d4c3f55a724102ec0 100644 --- a/assets/brain-COga8OrM.js +++ b/assets/brain-CEG2uNCc.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-fWY85Kyg.js";/** +import{c as a}from"./index-Du57tmo9.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/button-BSRmUN27.js b/assets/button-C6pFOjcg.js similarity index 97% rename from assets/button-BSRmUN27.js rename to assets/button-C6pFOjcg.js index 471e910ba4f1a2ecaef485d26617ac3c7b1f0a5e..240969be5263c3d550122e833c050ac8f57a839e 100644 --- a/assets/button-BSRmUN27.js +++ b/assets/button-C6pFOjcg.js @@ -1 +1 @@ -import{j as y}from"./vendor-react-B4AQeu28.js";import{S as k}from"./vendor-radix-DnWAlVSW.js";import{c as V}from"./vendor-charts-BHw0fhqZ.js";import{f as p}from"./index-fWY85Kyg.js";const g=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,m=V,j=(n,r)=>e=>{var o;if(r?.variants==null)return m(n,e?.class,e?.className);const{variants:u,defaultVariants:i}=r,b=Object.keys(u).map(t=>{const a=e?.[t],d=i?.[t];if(a===null)return null;const s=g(a)||g(d);return u[t][s]}),v=e&&Object.entries(e).reduce((t,a)=>{let[d,s]=a;return s===void 0||(t[d]=s),t},{}),f=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((t,a)=>{let{class:d,className:s,...h}=a;return Object.entries(h).every(x=>{let[c,l]=x;return Array.isArray(l)?l.includes({...i,...v}[c]):{...i,...v}[c]===l})?[...t,d,s]:t},[]);return m(n,b,f,e?.class,e?.className)},N=j("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background text-foreground hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9 rounded-md"}},defaultVariants:{variant:"default",size:"default"}});function w({className:n,variant:r,size:e,asChild:o=!1,...u}){const i=o?k:"button";return y.jsx(i,{"data-slot":"button",className:p(N({variant:r,size:e,className:n})),...u})}export{w as B,j as c}; +import{j as y}from"./vendor-react-B4AQeu28.js";import{S as k}from"./vendor-radix-DnWAlVSW.js";import{c as V}from"./vendor-charts-BHw0fhqZ.js";import{f as p}from"./index-Du57tmo9.js";const g=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,m=V,j=(n,r)=>e=>{var o;if(r?.variants==null)return m(n,e?.class,e?.className);const{variants:u,defaultVariants:i}=r,b=Object.keys(u).map(t=>{const a=e?.[t],d=i?.[t];if(a===null)return null;const s=g(a)||g(d);return u[t][s]}),v=e&&Object.entries(e).reduce((t,a)=>{let[d,s]=a;return s===void 0||(t[d]=s),t},{}),f=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((t,a)=>{let{class:d,className:s,...h}=a;return Object.entries(h).every(x=>{let[c,l]=x;return Array.isArray(l)?l.includes({...i,...v}[c]):{...i,...v}[c]===l})?[...t,d,s]:t},[]);return m(n,b,f,e?.class,e?.className)},N=j("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background text-foreground hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9 rounded-md"}},defaultVariants:{variant:"default",size:"default"}});function w({className:n,variant:r,size:e,asChild:o=!1,...u}){const i=o?k:"button";return y.jsx(i,{"data-slot":"button",className:p(N({variant:r,size:e,className:n})),...u})}export{w as B,j as c}; diff --git a/assets/calendar-ClpJmmLI.js b/assets/calendar-DguKdDEr.js similarity index 89% rename from assets/calendar-ClpJmmLI.js rename to assets/calendar-DguKdDEr.js index 9357d834826fc76fc073efac60ce0971e80ef642..1012f868198bad962db0d2bfd3cd3827b9f3ed66 100644 --- a/assets/calendar-ClpJmmLI.js +++ b/assets/calendar-DguKdDEr.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-fWY85Kyg.js";/** +import{c as e}from"./index-Du57tmo9.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/card-SHcaFLA_.js b/assets/card-BdmZcu-T.js similarity index 95% rename from assets/card-SHcaFLA_.js rename to assets/card-BdmZcu-T.js index 7f699290e8d4bf118a94d1a5cc1baaf7be62d409..bbc788b8fb3522dc969d57c18592a8c1b8a76f31 100644 --- a/assets/card-SHcaFLA_.js +++ b/assets/card-BdmZcu-T.js @@ -1,4 +1,4 @@ -import{c as o,f as r}from"./index-fWY85Kyg.js";import{j as e}from"./vendor-react-B4AQeu28.js";/** +import{c as o,f as r}from"./index-Du57tmo9.js";import{j as e}from"./vendor-react-B4AQeu28.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/chart-column-V8fKqOo0.js b/assets/chart-column-Cqncpeum.js similarity index 89% rename from assets/chart-column-V8fKqOo0.js rename to assets/chart-column-Cqncpeum.js index 09b6423cd298c035e1e405b680e26ae60648aab5..5d3be3726dfd620ef29b3585461e93282962c33c 100644 --- a/assets/chart-column-V8fKqOo0.js +++ b/assets/chart-column-Cqncpeum.js @@ -1,4 +1,4 @@ -import{c as t}from"./index-fWY85Kyg.js";/** +import{c as t}from"./index-Du57tmo9.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/chatService-DzDq5mQE.js b/assets/chatService-CNolNpDv.js similarity index 97% rename from assets/chatService-DzDq5mQE.js rename to assets/chatService-CNolNpDv.js index 8b8571d1165929ff4e90c3cce8e0b8b2b3e42cf2..5eb394a077bbfc019bcb5ec0fb619b3da8b9bc5a 100644 --- a/assets/chatService-DzDq5mQE.js +++ b/assets/chatService-CNolNpDv.js @@ -1 +1 @@ -import{d as c,e as u,g,a as i,s as w,u as p,q as l,w as d,o as y,h as A}from"./vendor-firebase-firestore-52DD1vc9.js";import{d as o}from"./index-fWY85Kyg.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-react-B4AQeu28.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";const q=async(s,t="New Conversation")=>{try{const e=c(u(o,"chatSessions")),n={id:e.id,userId:s,title:t,messages:[],createdAt:new Date,updatedAt:new Date,isActive:!0};return await w(e,{...n,createdAt:i(),updatedAt:i()}),n}catch(e){throw console.error("Error creating chat session:",e),e}},Q=async s=>{try{const t=l(u(o,"chatSessions"),d("userId","==",s),d("isActive","==",!0),y("updatedAt","desc"));return(await A(t)).docs.map(n=>{const r=n.data();return{...r,createdAt:r.createdAt?.toDate()||new Date,updatedAt:r.updatedAt?.toDate()||new Date}})}catch(t){return console.error("Error getting chat sessions:",t),[]}},R=async s=>{try{const t=await g(c(o,"chatSessions",s));if(t.exists()){const e=t.data();return{...e,createdAt:e.createdAt?.toDate()||new Date,updatedAt:e.updatedAt?.toDate()||new Date}}return null}catch(t){return console.error("Error getting chat session:",t),null}},b=async(s,t,e,n)=>{try{const r=c(u(o,"chatMessages")),a={id:r.id,userId:"",role:t,content:e,timestamp:new Date,...n?{context:n}:{}},h=await g(c(o,"chatSessions",s));h.exists()&&(a.userId=h.data().userId);const m={id:a.id,userId:a.userId,role:a.role,content:a.content,sessionId:s,timestamp:i()};return a.context&&(m.context=a.context),await w(r,m),await p(c(o,"chatSessions",s),{updatedAt:i()}),a}catch(r){throw console.error("Error adding message:",r),r}},B=async(s,t)=>{try{const e=l(u(o,"chatMessages"),d("sessionId","==",s),d("userId","==",t),y("timestamp","asc"));return(await A(e)).docs.map(r=>{const a=r.data();return{...a,timestamp:a.timestamp?.toDate()||new Date}})}catch(e){return console.error("Error getting session messages:",e),[]}},N=async(s,t)=>{try{await p(c(o,"chatSessions",s),{title:t,updatedAt:i()})}catch(e){throw console.error("Error updating session title:",e),e}},U=async s=>{try{await p(c(o,"chatSessions",s),{isActive:!1,updatedAt:i()})}catch(t){throw console.error("Error deleting session:",t),t}};export{b as addMessageToSession,q as createChatSession,U as deleteSession,R as getChatSession,B as getSessionMessages,Q as getUserChatSessions,N as updateSessionTitle}; +import{d as c,e as u,g,a as i,s as w,u as p,q as l,w as d,o as y,h as A}from"./vendor-firebase-firestore-52DD1vc9.js";import{d as o}from"./index-Du57tmo9.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-react-B4AQeu28.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";const q=async(s,t="New Conversation")=>{try{const e=c(u(o,"chatSessions")),n={id:e.id,userId:s,title:t,messages:[],createdAt:new Date,updatedAt:new Date,isActive:!0};return await w(e,{...n,createdAt:i(),updatedAt:i()}),n}catch(e){throw console.error("Error creating chat session:",e),e}},Q=async s=>{try{const t=l(u(o,"chatSessions"),d("userId","==",s),d("isActive","==",!0),y("updatedAt","desc"));return(await A(t)).docs.map(n=>{const r=n.data();return{...r,createdAt:r.createdAt?.toDate()||new Date,updatedAt:r.updatedAt?.toDate()||new Date}})}catch(t){return console.error("Error getting chat sessions:",t),[]}},R=async s=>{try{const t=await g(c(o,"chatSessions",s));if(t.exists()){const e=t.data();return{...e,createdAt:e.createdAt?.toDate()||new Date,updatedAt:e.updatedAt?.toDate()||new Date}}return null}catch(t){return console.error("Error getting chat session:",t),null}},b=async(s,t,e,n)=>{try{const r=c(u(o,"chatMessages")),a={id:r.id,userId:"",role:t,content:e,timestamp:new Date,...n?{context:n}:{}},h=await g(c(o,"chatSessions",s));h.exists()&&(a.userId=h.data().userId);const m={id:a.id,userId:a.userId,role:a.role,content:a.content,sessionId:s,timestamp:i()};return a.context&&(m.context=a.context),await w(r,m),await p(c(o,"chatSessions",s),{updatedAt:i()}),a}catch(r){throw console.error("Error adding message:",r),r}},B=async(s,t)=>{try{const e=l(u(o,"chatMessages"),d("sessionId","==",s),d("userId","==",t),y("timestamp","asc"));return(await A(e)).docs.map(r=>{const a=r.data();return{...a,timestamp:a.timestamp?.toDate()||new Date}})}catch(e){return console.error("Error getting session messages:",e),[]}},N=async(s,t)=>{try{await p(c(o,"chatSessions",s),{title:t,updatedAt:i()})}catch(e){throw console.error("Error updating session title:",e),e}},U=async s=>{try{await p(c(o,"chatSessions",s),{isActive:!1,updatedAt:i()})}catch(t){throw console.error("Error deleting session:",t),t}};export{b as addMessageToSession,q as createChatSession,U as deleteSession,R as getChatSession,B as getSessionMessages,Q as getUserChatSessions,N as updateSessionTitle}; diff --git a/assets/check-Cs-4n4yC.js b/assets/check-BAMSfVKd.js similarity index 86% rename from assets/check-Cs-4n4yC.js rename to assets/check-BAMSfVKd.js index 9563d3b0a1e373b691bba1ffeafd16e77a521814..b0ba48bd608efbd1a6c48bafb479083e735a152c 100644 --- a/assets/check-Cs-4n4yC.js +++ b/assets/check-BAMSfVKd.js @@ -1,4 +1,4 @@ -import{c}from"./index-fWY85Kyg.js";/** +import{c}from"./index-Du57tmo9.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/chevron-left-KucdseP8.js b/assets/chevron-left-mWdIDmIc.js similarity index 85% rename from assets/chevron-left-KucdseP8.js rename to assets/chevron-left-mWdIDmIc.js index 1b3b0dbd19c56055a15426578257b766cdffa009..920fcce9c9f2b6b9e7dcaa09265d6377f5898758 100644 --- a/assets/chevron-left-KucdseP8.js +++ b/assets/chevron-left-mWdIDmIc.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-fWY85Kyg.js";/** +import{c as e}from"./index-Du57tmo9.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/chevron-right-mxUv3EB7.js b/assets/chevron-right-CFOFOVBg.js similarity index 85% rename from assets/chevron-right-mxUv3EB7.js rename to assets/chevron-right-CFOFOVBg.js index 8efefd818191968d00c23a93d775025163a7c12e..1bdc96b204eb813a7f86d64dc232e879ec19b3ac 100644 --- a/assets/chevron-right-mxUv3EB7.js +++ b/assets/chevron-right-CFOFOVBg.js @@ -1,4 +1,4 @@ -import{c as o}from"./index-fWY85Kyg.js";/** +import{c as o}from"./index-Du57tmo9.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/chevron-up-Bup_RJHP.js b/assets/chevron-up-Dmffgx6p.js similarity index 92% rename from assets/chevron-up-Bup_RJHP.js rename to assets/chevron-up-Dmffgx6p.js index e396d8e01f02844bbc4094d64f1db84833e7e6cc..593012e1a2bc1c1117238a295a98ba87ba18bd5f 100644 --- a/assets/chevron-up-Bup_RJHP.js +++ b/assets/chevron-up-Dmffgx6p.js @@ -1,4 +1,4 @@ -import{c as o}from"./index-fWY85Kyg.js";/** +import{c as o}from"./index-Du57tmo9.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/circle-alert-KkqOOEPJ.js b/assets/circle-alert-mPiSlvKL.js similarity index 93% rename from assets/circle-alert-KkqOOEPJ.js rename to assets/circle-alert-mPiSlvKL.js index 018c510d182eba8c8db708cf674187ac9af58ab2..4abf1c3e3ae89bf6d06c8b5f2f718991cfaded56 100644 --- a/assets/circle-alert-KkqOOEPJ.js +++ b/assets/circle-alert-mPiSlvKL.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-fWY85Kyg.js";/** +import{c as e}from"./index-Du57tmo9.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/circle-check-big-Qn5jJKfH.js b/assets/circle-check-big-DC9utj0Y.js similarity index 89% rename from assets/circle-check-big-Qn5jJKfH.js rename to assets/circle-check-big-DC9utj0Y.js index 626b55b7cc8fa093d4d2f192b08dc2e2f1491578..746b060729d27f389dde83844933c4c5fc91a5a5 100644 --- a/assets/circle-check-big-Qn5jJKfH.js +++ b/assets/circle-check-big-DC9utj0Y.js @@ -1,4 +1,4 @@ -import{c}from"./index-fWY85Kyg.js";/** +import{c}from"./index-Du57tmo9.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/clipboard-check-DbpvA-N4.js b/assets/clipboard-check-fEagN09v.js similarity index 91% rename from assets/clipboard-check-DbpvA-N4.js rename to assets/clipboard-check-fEagN09v.js index 57cdb793d7e20d768af1d24d6ea3ee3842577fe1..97e67f5d1ecc60e95db606f23e45c1d7904d6431 100644 --- a/assets/clipboard-check-DbpvA-N4.js +++ b/assets/clipboard-check-fEagN09v.js @@ -1,4 +1,4 @@ -import{c}from"./index-fWY85Kyg.js";/** +import{c}from"./index-Du57tmo9.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/clock-BJCraYVD.js b/assets/clock-BtWjBj1h.js similarity index 88% rename from assets/clock-BJCraYVD.js rename to assets/clock-BtWjBj1h.js index c47c62a6e5d6f0f99684a3cd84ec8ef532f8d09d..90d0b0b6ecc6c31f38e99b4d4b4380e8918c06a7 100644 --- a/assets/clock-BJCraYVD.js +++ b/assets/clock-BtWjBj1h.js @@ -1,4 +1,4 @@ -import{c}from"./index-fWY85Kyg.js";/** +import{c}from"./index-Du57tmo9.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/diagnosticService-BbwguGxN.js b/assets/diagnosticService-EjsgXhrt.js similarity index 84% rename from assets/diagnosticService-BbwguGxN.js rename to assets/diagnosticService-EjsgXhrt.js index a5b8f8e98d1cf6d2688d92c404401dab0f37ce28..8dbb8a61f30eb7c9bbd1fe9c5eca6e6499ca0c9b 100644 --- a/assets/diagnosticService-BbwguGxN.js +++ b/assets/diagnosticService-EjsgXhrt.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-fWY85Kyg.js","assets/vendor-react-B4AQeu28.js","assets/vendor-firebase-auth-BW5XT768.js","assets/vendor-firebase-core-y3En_kpN.js","assets/vendor-firebase-firestore-52DD1vc9.js","assets/vendor-firebase-storage-DNmrKfQ-.js","assets/vendor-firebase-analytics-DZd0u9yk.js","assets/vendor-radix-DnWAlVSW.js","assets/vendor-charts-BHw0fhqZ.js","assets/vendor-markdown-yqZQ_iQm.js","assets/vendor-markdown-CfVKi3_s.css","assets/index-CcVKs9hN.css"])))=>i.map(i=>d[i]); -import{_ as u}from"./index-fWY85Kyg.js";const d="https://deign86-mathpulse-api-v3test.hf.space";async function f(r,s){const i=`${d}/api/diagnostic/generate`,n=new Headers({"Content-Type":"application/json"}),{auth:c}=await u(async()=>{const{auth:t}=await import("./index-fWY85Kyg.js").then(e=>e.ay);return{auth:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),o=c.currentUser;if(o){const t=await o.getIdToken(!1);t&&n.set("Authorization",`Bearer ${t}`)}const a=new AbortController,l=setTimeout(()=>a.abort(),9e4);try{const t=await fetch(i,{method:"POST",headers:n,body:JSON.stringify({strand:r,grade_level:s}),signal:a.signal});if(!t.ok){const e=await t.text().catch(()=>"Unknown error");throw new Error(`Diagnostic generation failed (${t.status}): ${e.slice(0,300)}`)}return t.json()}finally{clearTimeout(l)}}async function g(r,s){const i=`${d}/api/diagnostic/submit`,n=new Headers({"Content-Type":"application/json"}),{auth:c}=await u(async()=>{const{auth:t}=await import("./index-fWY85Kyg.js").then(e=>e.ay);return{auth:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),o=c.currentUser;if(o){const t=await o.getIdToken(!1);t&&n.set("Authorization",`Bearer ${t}`)}const a=new AbortController,l=setTimeout(()=>a.abort(),6e4);try{const t=await fetch(i,{method:"POST",headers:n,body:JSON.stringify({test_id:r,responses:s}),signal:a.signal});if(!t.ok){const e=await t.text().catch(()=>"Unknown error");throw new Error(`Diagnostic submission failed (${t.status}): ${e.slice(0,300)}`)}return t.json()}finally{clearTimeout(l)}}export{f as g,g as s}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Du57tmo9.js","assets/vendor-react-B4AQeu28.js","assets/vendor-firebase-auth-BW5XT768.js","assets/vendor-firebase-core-y3En_kpN.js","assets/vendor-firebase-firestore-52DD1vc9.js","assets/vendor-firebase-storage-DNmrKfQ-.js","assets/vendor-firebase-analytics-DZd0u9yk.js","assets/vendor-radix-DnWAlVSW.js","assets/vendor-charts-BHw0fhqZ.js","assets/vendor-markdown-yqZQ_iQm.js","assets/vendor-markdown-CfVKi3_s.css","assets/index-BQ2D57Uc.css"])))=>i.map(i=>d[i]); +import{_ as u}from"./index-Du57tmo9.js";const d="https://deign86-mathpulse-api-v3test.hf.space";async function f(r,s){const i=`${d}/api/diagnostic/generate`,n=new Headers({"Content-Type":"application/json"}),{auth:c}=await u(async()=>{const{auth:t}=await import("./index-Du57tmo9.js").then(e=>e.ax);return{auth:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),o=c.currentUser;if(o){const t=await o.getIdToken(!1);t&&n.set("Authorization",`Bearer ${t}`)}const a=new AbortController,l=setTimeout(()=>a.abort(),9e4);try{const t=await fetch(i,{method:"POST",headers:n,body:JSON.stringify({strand:r,grade_level:s}),signal:a.signal});if(!t.ok){const e=await t.text().catch(()=>"Unknown error");throw new Error(`Diagnostic generation failed (${t.status}): ${e.slice(0,300)}`)}return t.json()}finally{clearTimeout(l)}}async function g(r,s){const i=`${d}/api/diagnostic/submit`,n=new Headers({"Content-Type":"application/json"}),{auth:c}=await u(async()=>{const{auth:t}=await import("./index-Du57tmo9.js").then(e=>e.ax);return{auth:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),o=c.currentUser;if(o){const t=await o.getIdToken(!1);t&&n.set("Authorization",`Bearer ${t}`)}const a=new AbortController,l=setTimeout(()=>a.abort(),6e4);try{const t=await fetch(i,{method:"POST",headers:n,body:JSON.stringify({test_id:r,responses:s}),signal:a.signal});if(!t.ok){const e=await t.text().catch(()=>"Unknown error");throw new Error(`Diagnostic submission failed (${t.status}): ${e.slice(0,300)}`)}return t.json()}finally{clearTimeout(l)}}export{f as g,g as s}; diff --git a/assets/dialog-TlKhS4yO.js b/assets/dialog-fRGvTlwY.js similarity index 98% rename from assets/dialog-TlKhS4yO.js rename to assets/dialog-fRGvTlwY.js index 7ed1fc5c5a1752f36bd868da75555f9a68a56099..f760fcb62ae2fcce8c10f56e750c4433e447bf8f 100644 --- a/assets/dialog-TlKhS4yO.js +++ b/assets/dialog-fRGvTlwY.js @@ -1,4 +1,4 @@ -import{c as r,f as o}from"./index-fWY85Kyg.js";import{j as t,r as l}from"./vendor-react-B4AQeu28.js";import{c as p,d as n,e as x,T as d,D as i,P as m,O as c}from"./vendor-radix-DnWAlVSW.js";import{X as g}from"./x-BLLfAvOF.js";/** +import{c as r,f as o}from"./index-Du57tmo9.js";import{j as t,r as l}from"./vendor-react-B4AQeu28.js";import{c as p,d as n,e as x,T as d,D as i,P as m,O as c}from"./vendor-radix-DnWAlVSW.js";import{X as g}from"./x-Cwkkamrh.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/download-Dl_jNVXs.js b/assets/download-VEXmhhD6.js similarity index 89% rename from assets/download-Dl_jNVXs.js rename to assets/download-VEXmhhD6.js index 4da48d40e5cb1c51870e1fabb8af8080ae08dd56..a60c555ae2e3a9fe00110bfc5a9d3db253ead317 100644 --- a/assets/download-Dl_jNVXs.js +++ b/assets/download-VEXmhhD6.js @@ -1,4 +1,4 @@ -import{c as o}from"./index-fWY85Kyg.js";/** +import{c as o}from"./index-Du57tmo9.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/eye-DQlJQwuY.js b/assets/eye-Duf559JU.js similarity index 95% rename from assets/eye-DQlJQwuY.js rename to assets/eye-Duf559JU.js index ba676f02ca836f51793e1b1ba9a1129ca02bc147..69c9ffb80d3a136490bedf3df1b3640412ab3e59 100644 --- a/assets/eye-DQlJQwuY.js +++ b/assets/eye-Duf559JU.js @@ -1,4 +1,4 @@ -import{c as e}from"./index-fWY85Kyg.js";/** +import{c as e}from"./index-Du57tmo9.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/funnel-DjeGbYf2.js b/assets/funnel-N-2rOOix.js similarity index 90% rename from assets/funnel-DjeGbYf2.js rename to assets/funnel-N-2rOOix.js index f36c26a771e2e0204791f5b5b666089c8fccc712..3510bcd1e222aa226e29ac374371dc9324001edd 100644 --- a/assets/funnel-DjeGbYf2.js +++ b/assets/funnel-N-2rOOix.js @@ -1,4 +1,4 @@ -import{c}from"./index-fWY85Kyg.js";/** +import{c}from"./index-Du57tmo9.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/graduation-cap-B4Q4YTk8.js b/assets/graduation-cap-D6QMIGIe.js similarity index 91% rename from assets/graduation-cap-B4Q4YTk8.js rename to assets/graduation-cap-D6QMIGIe.js index b7116b2dc73f502281a8dff4628f67fa8edfa8d7..c700eb7a79da49f3f5482e1d5e582dd76523979a 100644 --- a/assets/graduation-cap-B4Q4YTk8.js +++ b/assets/graduation-cap-D6QMIGIe.js @@ -1,4 +1,4 @@ -import{c as a}from"./index-fWY85Kyg.js";/** +import{c as a}from"./index-Du57tmo9.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/index-BQ2D57Uc.css b/assets/index-BQ2D57Uc.css new file mode 100644 index 0000000000000000000000000000000000000000..681d7f0f48ea4d5c0ad2ff38c7f571f63f20f016 --- /dev/null +++ b/assets/index-BQ2D57Uc.css @@ -0,0 +1 @@ +/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-scroll-snap-strictness:proximity;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-900:oklch(40.8% .123 38.172);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-emerald-950:oklch(26.2% .051 172.552);--color-teal-50:oklch(98.4% .014 180.72);--color-teal-100:oklch(95.3% .051 180.801);--color-teal-200:oklch(91% .096 180.426);--color-teal-300:oklch(85.5% .138 181.071);--color-teal-400:oklch(77.7% .152 181.912);--color-teal-500:oklch(70.4% .14 182.503);--color-teal-600:oklch(60% .118 184.704);--color-teal-700:oklch(51.1% .096 186.391);--color-teal-900:oklch(38.6% .063 188.416);--color-cyan-50:oklch(98.4% .019 200.873);--color-cyan-100:oklch(95.6% .045 203.388);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-sky-200:var(--color-violet-200);--color-sky-700:var(--color-violet-700);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-indigo-800:oklch(39.8% .195 277.366);--color-indigo-900:oklch(35.9% .144 278.697);--color-violet-50:oklch(96.9% .016 293.756);--color-violet-100:oklch(94.3% .029 294.588);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-600:oklch(54.1% .281 293.009);--color-violet-700:oklch(49.1% .27 292.581);--color-violet-800:oklch(43.2% .232 292.759);--color-violet-900:oklch(38% .189 293.745);--color-violet-950:oklch(28.3% .141 291.089);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-purple-800:oklch(43.8% .218 303.724);--color-purple-900:oklch(38.1% .176 304.987);--color-fuchsia-50:oklch(97.7% .017 320.058);--color-fuchsia-200:oklch(90.3% .076 319.62);--color-fuchsia-400:oklch(74% .238 322.16);--color-fuchsia-500:oklch(66.7% .295 322.15);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-500:oklch(65.6% .241 354.308);--color-pink-600:oklch(59.2% .249 .584);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-rose-700:oklch(51.4% .222 16.935);--color-rose-800:oklch(45.5% .188 13.697);--color-rose-900:oklch(41% .159 10.272);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-700:oklch(37% .013 285.805);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--drop-shadow-sm:0 1px 2px #00000026;--drop-shadow-md:0 3px 3px #0000001f;--drop-shadow-lg:0 4px 4px #00000026;--drop-shadow-xl:0 9px 7px #0000001a;--drop-shadow-2xl:0 25px 25px #00000026;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--animate-bounce:bounce 1s infinite;--blur-sm:8px;--blur-md:12px;--blur-lg:16px;--blur-xl:24px;--blur-2xl:40px;--blur-3xl:64px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-border:var(--border)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}body{background-color:var(--background);color:var(--foreground);font-family:var(--font-body);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;overflow-x:hidden}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h1{font-family:var(--font-display);font-size:var(--text-2xl);letter-spacing:-.02em;font-weight:700;line-height:1.3}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h2{font-family:var(--font-display);font-size:var(--text-xl);letter-spacing:-.01em;font-weight:700;line-height:1.35}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h3{font-family:var(--font-display);font-size:var(--text-lg);font-weight:600;line-height:1.4}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h4{font-family:var(--font-display);font-size:var(--text-base);font-weight:600;line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) label{font-size:var(--text-base);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) button{font-family:var(--font-body);font-size:var(--text-base);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) input{font-family:var(--font-body);font-size:var(--text-base);font-weight:var(--font-weight-normal);line-height:1.5}}@layer components;@layer utilities{.\@container\/card-header{container:card-header/inline-size}.\[container-type\:inline-size\]{container-type:inline-size}.\[container-type\:size\]{container-type:size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.inset-x-6{inset-inline:calc(var(--spacing) * 6)}.inset-x-\[-30px\]{inset-inline:-30px}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.end-1{inset-inline-end:calc(var(--spacing) * 1)}.-top-1{top:calc(var(--spacing) * -1)}.-top-2{top:calc(var(--spacing) * -2)}.-top-3{top:calc(var(--spacing) * -3)}.-top-3\.5{top:calc(var(--spacing) * -3.5)}.-top-4{top:calc(var(--spacing) * -4)}.-top-5{top:calc(var(--spacing) * -5)}.-top-6{top:calc(var(--spacing) * -6)}.-top-8{top:calc(var(--spacing) * -8)}.-top-12{top:calc(var(--spacing) * -12)}.-top-24{top:calc(var(--spacing) * -24)}.-top-40{top:calc(var(--spacing) * -40)}.top-0{top:calc(var(--spacing) * 0)}.top-0\.5{top:calc(var(--spacing) * .5)}.top-1{top:calc(var(--spacing) * 1)}.top-1\.5{top:calc(var(--spacing) * 1.5)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-3{top:calc(var(--spacing) * 3)}.top-3\.5{top:calc(var(--spacing) * 3.5)}.top-4{top:calc(var(--spacing) * 4)}.top-5{top:calc(var(--spacing) * 5)}.top-6{top:calc(var(--spacing) * 6)}.top-8{top:calc(var(--spacing) * 8)}.top-24{top:calc(var(--spacing) * 24)}.top-\[-10\%\]{top:-10%}.top-\[-30px\]{top:-30px}.top-\[1px\]{top:1px}.top-\[10\%\]{top:10%}.top-\[40\%\]{top:40%}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-\[540px\]{top:540px}.top-full{top:100%}.-right-1{right:calc(var(--spacing) * -1)}.-right-2{right:calc(var(--spacing) * -2)}.-right-2\.5{right:calc(var(--spacing) * -2.5)}.-right-3{right:calc(var(--spacing) * -3)}.-right-4{right:calc(var(--spacing) * -4)}.-right-5{right:calc(var(--spacing) * -5)}.-right-8{right:calc(var(--spacing) * -8)}.-right-12{right:calc(var(--spacing) * -12)}.-right-24{right:calc(var(--spacing) * -24)}.-right-40{right:calc(var(--spacing) * -40)}.right-0{right:calc(var(--spacing) * 0)}.right-0\.5{right:calc(var(--spacing) * .5)}.right-1{right:calc(var(--spacing) * 1)}.right-2{right:calc(var(--spacing) * 2)}.right-2\.5{right:calc(var(--spacing) * 2.5)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.right-6{right:calc(var(--spacing) * 6)}.right-8{right:calc(var(--spacing) * 8)}.right-12{right:calc(var(--spacing) * 12)}.right-16{right:calc(var(--spacing) * 16)}.right-\[-5px\]{right:-5px}.right-\[-10\%\]{right:-10%}.right-\[-15px\]{right:-15px}.right-\[-20\%\]{right:-20%}.right-\[150px\]{right:150px}.right-full{right:100%}.-bottom-1{bottom:calc(var(--spacing) * -1)}.-bottom-2{bottom:calc(var(--spacing) * -2)}.-bottom-2\.5{bottom:calc(var(--spacing) * -2.5)}.-bottom-4{bottom:calc(var(--spacing) * -4)}.-bottom-5{bottom:calc(var(--spacing) * -5)}.-bottom-6{bottom:calc(var(--spacing) * -6)}.-bottom-8{bottom:calc(var(--spacing) * -8)}.-bottom-12{bottom:calc(var(--spacing) * -12)}.-bottom-40{bottom:calc(var(--spacing) * -40)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-5{bottom:calc(var(--spacing) * 5)}.bottom-8{bottom:calc(var(--spacing) * 8)}.bottom-12{bottom:calc(var(--spacing) * 12)}.bottom-16{bottom:calc(var(--spacing) * 16)}.bottom-\[-10\%\]{bottom:-10%}.bottom-\[40px\]{bottom:40px}.bottom-full{bottom:100%}.-left-1{left:calc(var(--spacing) * -1)}.-left-2{left:calc(var(--spacing) * -2)}.-left-2\.5{left:calc(var(--spacing) * -2.5)}.-left-4{left:calc(var(--spacing) * -4)}.-left-10{left:calc(var(--spacing) * -10)}.-left-12{left:calc(var(--spacing) * -12)}.-left-40{left:calc(var(--spacing) * -40)}.-left-\[150\%\]{left:-150%}.left-0{left:calc(var(--spacing) * 0)}.left-1{left:calc(var(--spacing) * 1)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.left-4{left:calc(var(--spacing) * 4)}.left-6{left:calc(var(--spacing) * 6)}.left-12{left:calc(var(--spacing) * 12)}.left-\[-10\%\]{left:-10%}.left-\[-20px\]{left:-20px}.left-\[40\%\]{left:40%}.left-\[50\%\]{left:50%}.left-\[54px\]{left:54px}.left-\[var\(--x\)\]{left:var(--x)}.left-full{left:100%}.isolate{isolation:isolate}.-z-10{z-index:-10}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[-1\]{z-index:-1}.z-\[1\]{z-index:1}.z-\[2\]{z-index:2}.z-\[3\]{z-index:3}.z-\[4\]{z-index:4}.z-\[11\]{z-index:11}.z-\[12\]{z-index:12}.z-\[13\]{z-index:13}.z-\[50\]{z-index:50}.z-\[51\]{z-index:51}.z-\[60\]{z-index:60}.z-\[70\]{z-index:70}.z-\[75\]{z-index:75}.z-\[80\]{z-index:80}.z-\[100\]{z-index:100}.z-\[110\]{z-index:110}.z-\[120\]{z-index:120}.z-\[130\]{z-index:130}.z-\[200\]{z-index:200}.z-\[250\]{z-index:250}.z-\[300\]{z-index:300}.z-\[9999\]{z-index:9999}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-12{grid-column:span 12/span 12}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-2{margin:calc(var(--spacing) * 2)}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.-mx-3{margin-inline:calc(var(--spacing) * -3)}.-mx-4{margin-inline:calc(var(--spacing) * -4)}.-mx-\[4px\]{margin-inline:-4px}.mx-0\.5{margin-inline:calc(var(--spacing) * .5)}.mx-1{margin-inline:calc(var(--spacing) * 1)}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mx-3\.5{margin-inline:calc(var(--spacing) * 3.5)}.mx-\[-20px\]{margin-inline:-20px}.mx-\[1px\]{margin-inline:1px}.mx-auto{margin-inline:auto}.my-0\.5{margin-block:calc(var(--spacing) * .5)}.my-1{margin-block:calc(var(--spacing) * 1)}.my-2{margin-block:calc(var(--spacing) * 2)}.my-4{margin-block:calc(var(--spacing) * 4)}.-mt-0\.5{margin-top:calc(var(--spacing) * -.5)}.-mt-1{margin-top:calc(var(--spacing) * -1)}.-mt-3{margin-top:calc(var(--spacing) * -3)}.-mt-4{margin-top:calc(var(--spacing) * -4)}.-mt-10{margin-top:calc(var(--spacing) * -10)}.-mt-24{margin-top:calc(var(--spacing) * -24)}.mt-0{margin-top:calc(var(--spacing) * 0)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-\[-5px\]{margin-top:-5px}.mt-\[-15px\]{margin-top:-15px}.mt-\[5px\]{margin-top:5px}.mt-auto{margin-top:auto}.-mr-3{margin-right:calc(var(--spacing) * -3)}.-mr-10{margin-right:calc(var(--spacing) * -10)}.-mr-24{margin-right:calc(var(--spacing) * -24)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-3{margin-right:calc(var(--spacing) * 3)}.mr-4{margin-right:calc(var(--spacing) * 4)}.-mb-8{margin-bottom:calc(var(--spacing) * -8)}.-mb-10{margin-bottom:calc(var(--spacing) * -10)}.-mb-18{margin-bottom:calc(var(--spacing) * -18)}.-mb-\[1px\]{margin-bottom:-1px}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.mb-\[-10px\]{margin-bottom:-10px}.mb-\[2px\]{margin-bottom:2px}.-ml-3{margin-left:calc(var(--spacing) * -3)}.-ml-4{margin-left:calc(var(--spacing) * -4)}.-ml-10{margin-left:calc(var(--spacing) * -10)}.-ml-18{margin-left:calc(var(--spacing) * -18)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-3{margin-left:calc(var(--spacing) * 3)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-11{margin-left:calc(var(--spacing) * 11)}.ml-12{margin-left:calc(var(--spacing) * 12)}.ml-auto{margin-left:auto}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-row{display:table-row}.field-sizing-content{field-sizing:content}.\[aspect-ratio\:1\/var\(--aspect-ratio\)\]{aspect-ratio:1/var(--aspect-ratio)}.aspect-\[4\/5\]{aspect-ratio:4/5}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-16{width:calc(var(--spacing) * 16);height:calc(var(--spacing) * 16)}.size-full{width:100%;height:100%}.\[height\:100cqmax\]{height:100cqmax}.h-0{height:calc(var(--spacing) * 0)}.h-1{height:calc(var(--spacing) * 1)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-3\/4{height:75%}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-24{height:calc(var(--spacing) * 24)}.h-28{height:calc(var(--spacing) * 28)}.h-32{height:calc(var(--spacing) * 32)}.h-36{height:calc(var(--spacing) * 36)}.h-40{height:calc(var(--spacing) * 40)}.h-48{height:calc(var(--spacing) * 48)}.h-64{height:calc(var(--spacing) * 64)}.h-80{height:calc(var(--spacing) * 80)}.h-96{height:calc(var(--spacing) * 96)}.h-\[1\.15rem\]{height:1.15rem}.h-\[1px\]{height:1px}.h-\[3px\]{height:3px}.h-\[5px\]{height:5px}.h-\[6px\]{height:6px}.h-\[14px\]{height:14px}.h-\[16px\]{height:16px}.h-\[18px\]{height:18px}.h-\[25px\]{height:25px}.h-\[35px\]{height:35px}.h-\[40\%\]{height:40%}.h-\[40px\]{height:40px}.h-\[48px\]{height:48px}.h-\[50px\]{height:50px}.h-\[52px\]{height:52px}.h-\[54px\]{height:54px}.h-\[60\%\]{height:60%}.h-\[60px\]{height:60px}.h-\[70\%\]{height:70%}.h-\[70px\]{height:70px}.h-\[72px\]{height:72px}.h-\[75px\]{height:75px}.h-\[80\%\]{height:80%}.h-\[100px\]{height:100px}.h-\[100vh\]{height:100vh}.h-\[105\%\]{height:105%}.h-\[110\%\]{height:110%}.h-\[120\%\]{height:120%}.h-\[120px\]{height:120px}.h-\[125px\]{height:125px}.h-\[140px\]{height:140px}.h-\[155px\]{height:155px}.h-\[185px\]{height:185px}.h-\[205px\]{height:205px}.h-\[250px\]{height:250px}.h-\[280px\]{height:280px}.h-\[300px\]{height:300px}.h-\[350px\]{height:350px}.h-\[400px\]{height:400px}.h-\[420px\]{height:420px}.h-\[500px\]{height:500px}.h-\[calc\(100\%-1px\)\]{height:calc(100% - 1px)}.h-\[calc\(100\%-24px\)\]{height:calc(100% - 24px)}.h-\[var\(--radix-navigation-menu-viewport-height\)\]{height:var(--radix-navigation-menu-viewport-height)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-fit{height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.h-svh{height:100svh}.max-h-\(--radix-context-menu-content-available-height\){max-height:var(--radix-context-menu-content-available-height)}.max-h-\(--radix-dropdown-menu-content-available-height\){max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-\(--radix-select-content-available-height\){max-height:var(--radix-select-content-available-height)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[70vh\]{max-height:70vh}.max-h-\[80vh\]{max-height:80vh}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[300px\]{max-height:300px}.max-h-\[600px\]{max-height:600px}.max-h-\[calc\(85vh-280px\)\]{max-height:calc(85vh - 280px)}.max-h-\[calc\(90vh-200px\)\]{max-height:calc(90vh - 200px)}.max-h-\[calc\(90vh-320px\)\]{max-height:calc(90vh - 320px)}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-24{min-height:calc(var(--spacing) * 24)}.min-h-\[24px\]{min-height:24px}.min-h-\[40px\]{min-height:40px}.min-h-\[44px\]{min-height:44px}.min-h-\[48px\]{min-height:48px}.min-h-\[50vh\]{min-height:50vh}.min-h-\[75px\]{min-height:75px}.min-h-\[78px\]{min-height:78px}.min-h-\[80px\]{min-height:80px}.min-h-\[110px\]{min-height:110px}.min-h-\[140px\]{min-height:140px}.min-h-\[170px\]{min-height:170px}.min-h-\[200px\]{min-height:200px}.min-h-\[240px\]{min-height:240px}.min-h-\[250px\]{min-height:250px}.min-h-\[290px\]{min-height:290px}.min-h-\[320px\]{min-height:320px}.min-h-\[500px\]{min-height:500px}.min-h-\[calc\(100vh-3\.5rem\)\]{min-height:calc(100vh - 3.5rem)}.min-h-dvh{min-height:100dvh}.min-h-screen{min-height:100vh}.min-h-svh{min-height:100svh}.\!w-auto{width:auto!important}.\[width\:100cqh\]{width:100cqh}.\[width\:100cqi\]{width:100cqi}.\[width\:var\(--width\)\]{width:var(--width)}.w-\(--sidebar-width\){width:var(--sidebar-width)}.w-0{width:calc(var(--spacing) * 0)}.w-0\.5{width:calc(var(--spacing) * .5)}.w-1{width:calc(var(--spacing) * 1)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-1\/2{width:50%}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-3\/4{width:75%}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-8\/12{width:66.6667%}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-10\/12{width:83.3333%}.w-11{width:calc(var(--spacing) * 11)}.w-11\/12{width:91.6667%}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-96{width:calc(var(--spacing) * 96)}.w-\[2px\]{width:2px}.w-\[5px\]{width:5px}.w-\[16px\]{width:16px}.w-\[28\%\]{width:28%}.w-\[35\%\]{width:35%}.w-\[35px\]{width:35px}.w-\[40\%\]{width:40%}.w-\[46px\]{width:46px}.w-\[48px\]{width:48px}.w-\[52px\]{width:52px}.w-\[55\%\]{width:55%}.w-\[55px\]{width:55px}.w-\[56px\]{width:56px}.w-\[60\%\]{width:60%}.w-\[60px\]{width:60px}.w-\[65px\]{width:65px}.w-\[70\%\]{width:70%}.w-\[70px\]{width:70px}.w-\[75px\]{width:75px}.w-\[78px\]{width:78px}.w-\[85\%\]{width:85%}.w-\[90\%\]{width:90%}.w-\[95\%\]{width:95%}.w-\[100\%\]{width:100%}.w-\[100px\]{width:100px}.w-\[110\%\]{width:110%}.w-\[150px\]{width:150px}.w-\[150vw\]{width:150vw}.w-\[180px\]{width:180px}.w-\[200px\]{width:200px}.w-\[220px\]{width:220px}.w-\[260px\]{width:260px}.w-\[280px\]{width:280px}.w-\[300px\]{width:300px}.w-\[320px\]{width:320px}.w-\[400px\]{width:400px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.max-w-\(--skeleton-width\){max-width:var(--skeleton-width)}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-20{max-width:calc(var(--spacing) * 20)}.max-w-\[18rem\]{max-width:18rem}.max-w-\[19rem\]{max-width:19rem}.max-w-\[22rem\]{max-width:22rem}.max-w-\[36rem\]{max-width:36rem}.max-w-\[48\%\]{max-width:48%}.max-w-\[50rem\]{max-width:50rem}.max-w-\[54rem\]{max-width:54rem}.max-w-\[70\%\]{max-width:70%}.max-w-\[75\%\]{max-width:75%}.max-w-\[80px\]{max-width:80px}.max-w-\[90\%\]{max-width:90%}.max-w-\[120px\]{max-width:120px}.max-w-\[140px\]{max-width:140px}.max-w-\[145px\]{max-width:145px}.max-w-\[180px\]{max-width:180px}.max-w-\[190px\]{max-width:190px}.max-w-\[200px\]{max-width:200px}.max-w-\[220px\]{max-width:220px}.max-w-\[280px\]{max-width:280px}.max-w-\[320px\]{max-width:320px}.max-w-\[340px\]{max-width:340px}.max-w-\[420px\]{max-width:420px}.max-w-\[450px\]{max-width:450px}.max-w-\[800px\]{max-width:800px}.max-w-\[1000px\]{max-width:1000px}.max-w-\[1400px\]{max-width:1400px}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.max-w-\[calc\(100vw-24px\)\]{max-width:calc(100vw - 24px)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-max{max-width:max-content}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-5{min-width:calc(var(--spacing) * 5)}.min-w-8{min-width:calc(var(--spacing) * 8)}.min-w-9{min-width:calc(var(--spacing) * 9)}.min-w-10{min-width:calc(var(--spacing) * 10)}.min-w-\[8rem\]{min-width:8rem}.min-w-\[12rem\]{min-width:12rem}.min-w-\[18px\]{min-width:18px}.min-w-\[40px\]{min-width:40px}.min-w-\[60px\]{min-width:60px}.min-w-\[72px\]{min-width:72px}.min-w-\[100px\]{min-width:100px}.min-w-\[120px\]{min-width:120px}.min-w-\[140px\]{min-width:140px}.min-w-\[260px\]{min-width:260px}.min-w-\[280px\]{min-width:280px}.min-w-\[760px\]{min-width:760px}.min-w-\[980px\]{min-width:980px}.min-w-\[1920px\]{min-width:1920px}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-full{flex-basis:100%}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.border-spacing-y-2{--tw-border-spacing-y:calc(var(--spacing) * 2);border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.\[transform-origin\:0\%_0\%\]{transform-origin:0 0}.\[transform-origin\:50\%_0\%\]{transform-origin:50% 0}.\[transform-origin\:100\%_0\%\]{transform-origin:100% 0}.origin-\(--radix-context-menu-content-transform-origin\){transform-origin:var(--radix-context-menu-content-transform-origin)}.origin-\(--radix-dropdown-menu-content-transform-origin\){transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.origin-\(--radix-hover-card-content-transform-origin\){transform-origin:var(--radix-hover-card-content-transform-origin)}.origin-\(--radix-menubar-content-transform-origin\){transform-origin:var(--radix-menubar-content-transform-origin)}.origin-\(--radix-popover-content-transform-origin\){transform-origin:var(--radix-popover-content-transform-origin)}.origin-\(--radix-select-content-transform-origin\){transform-origin:var(--radix-select-content-transform-origin)}.origin-\(--radix-tooltip-content-transform-origin\){transform-origin:var(--radix-tooltip-content-transform-origin)}.origin-bottom{transform-origin:bottom}.origin-bottom-right{transform-origin:100% 100%}.origin-left{transform-origin:0}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-1\/3{--tw-translate-x:calc(calc(1 / 3 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-1\/4{--tw-translate-x: -25% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-4{--tw-translate-x:calc(var(--spacing) * -4);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-\[45px\]{--tw-translate-x: -45px ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-px{--tw-translate-x:-1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1\/2{--tw-translate-x: 50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1\/3{--tw-translate-x:calc(1 / 3 * 100%);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1\/4{--tw-translate-x: 25% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[-100\%\]{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[45px\]{--tw-translate-x:45px;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-px{--tw-translate-x:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0\.5{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-1{--tw-translate-y:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-1\/2{--tw-translate-y: 50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-1\/3{--tw-translate-y:calc(1 / 3 * 100%);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-10{--tw-translate-y:calc(var(--spacing) * 10);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[21\%\]{--tw-translate-y:21%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-50\%_-_2px\)\]{--tw-translate-y: calc(-50% - 2px) ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-x-\[-1\]{--tw-scale-x:-1;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-y-75{--tw-scale-y:75%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-\[0\.75\]{scale:.75}.scale-\[0\.80\]{scale:.8}.scale-\[1\.1\]{scale:1.1}.scale-\[1\.02\]{scale:1.02}.scale-\[1\.05\]{scale:1.05}.scale-\[1\.15\]{scale:1.15}.scale-\[1\.25\]{scale:1.25}.-rotate-12{rotate:-12deg}.-rotate-\[15deg\]{rotate:-15deg}.rotate-12{rotate:12deg}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.rotate-\[-3deg\]{rotate:-3deg}.rotate-\[-5deg\]{rotate:-5deg}.rotate-\[15deg\]{rotate:15deg}.-skew-x-12{--tw-skew-x:skewX( -12deg );transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.\[transform\:rotate\(-90deg\)_rotateX\(-90deg\)\]{transform:rotate(-90deg)rotateX(-90deg)}.\[transform\:rotate\(90deg\)_rotateX\(-90deg\)\]{transform:rotate(90deg)rotateX(-90deg)}.\[transform\:rotateX\(-90deg\)\]{transform:rotateX(-90deg)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-bounce{animation:var(--animate-bounce)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-manipulation{touch-action:manipulation}.touch-none{touch-action:none}.resize{resize:both}.resize-none{resize:none}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness:mandatory}.snap-center{scroll-snap-align:center}.scroll-my-1{scroll-margin-block:calc(var(--spacing) * 1)}.scroll-py-1{scroll-padding-block:calc(var(--spacing) * 1)}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{appearance:none}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-\[0_1fr\]{grid-template-columns:0 1fr}.grid-cols-\[48px_280px_120px_120px_120px_120px_120px_140px_170px_170px_220px\]{grid-template-columns:48px 280px 120px 120px 120px 120px 120px 140px 170px 170px 220px}.grid-rows-\[auto_auto\]{grid-template-rows:auto auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-items-start{justify-items:start}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-10{gap:calc(var(--spacing) * 10)}.gap-px{gap:1px}:where(.-space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * -.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * -.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-7>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 7) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 7) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-10>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 10) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 10) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-\[1px\]>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(1px * var(--tw-space-y-reverse));margin-block-end:calc(1px * calc(1 - var(--tw-space-y-reverse)))}.gap-x-4{column-gap:calc(var(--spacing) * 4)}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 1) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-x-reverse)))}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:calc(var(--spacing) * 1)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-\[\#dde3eb\]>:not(:last-child)){border-color:#dde3eb}:where(.divide-\[\#edf1f7\]>:not(:last-child)){border-color:#edf1f7}:where(.divide-border>:not(:last-child)){border-color:var(--border)}.self-center{align-self:center}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overflow-y-hidden{overflow-y:hidden}.overscroll-contain{overscroll-behavior:contain}.scroll-smooth{scroll-behavior:smooth}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\[-20px\]{border-radius:-20px}.rounded-\[1\.4rem\]{border-radius:1.4rem}.rounded-\[1\.5rem\]{border-radius:1.5rem}.rounded-\[1rem\]{border-radius:1rem}.rounded-\[2px\]{border-radius:2px}.rounded-\[2rem\]{border-radius:2rem}.rounded-\[4px\]{border-radius:4px}.rounded-\[6px\]{border-radius:6px}.rounded-\[12px\]{border-radius:12px}.rounded-\[14px\]{border-radius:14px}.rounded-\[16px\]{border-radius:16px}.rounded-\[18px\]{border-radius:18px}.rounded-\[22px\]{border-radius:22px}.rounded-\[24px\]{border-radius:24px}.rounded-\[32px\]{border-radius:32px}.rounded-\[50\%\]{border-radius:50%}.rounded-\[50\%_50\%_0_0\/100\%_100\%_0_0\]{border-radius:50% 50% 0 0/100% 100% 0 0}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-xs{border-radius:var(--radius-xs)}.rounded-t-2xl{border-top-left-radius:var(--radius-2xl);border-top-right-radius:var(--radius-2xl)}.rounded-t-\[2\.5rem\]{border-top-left-radius:2.5rem;border-top-right-radius:2.5rem}.rounded-t-\[32px\]{border-top-left-radius:32px;border-top-right-radius:32px}.rounded-t-\[40px\]{border-top-left-radius:40px;border-top-right-radius:40px}.rounded-t-xl{border-top-left-radius:calc(var(--radius) + 4px);border-top-right-radius:calc(var(--radius) + 4px)}.rounded-l-2xl{border-top-left-radius:var(--radius-2xl);border-bottom-left-radius:var(--radius-2xl)}.rounded-l-\[1\.5rem\]{border-top-left-radius:1.5rem;border-bottom-left-radius:1.5rem}.rounded-l-full{border-top-left-radius:3.40282e38px;border-bottom-left-radius:3.40282e38px}.rounded-l-lg{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius)}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.rounded-r-2xl{border-top-right-radius:var(--radius-2xl);border-bottom-right-radius:var(--radius-2xl)}.rounded-r-full{border-top-right-radius:3.40282e38px;border-bottom-right-radius:3.40282e38px}.rounded-r-lg{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius)}.rounded-b-2xl{border-bottom-right-radius:var(--radius-2xl);border-bottom-left-radius:var(--radius-2xl)}.rounded-b-\[2px\]{border-bottom-right-radius:2px;border-bottom-left-radius:2px}.rounded-b-\[32px\]{border-bottom-right-radius:32px;border-bottom-left-radius:32px}.rounded-b-md{border-bottom-right-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-br-sm{border-bottom-right-radius:calc(var(--radius) - 4px)}.rounded-bl-none{border-bottom-left-radius:0}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-\[2px\]{border-style:var(--tw-border-style);border-width:2px}.border-\[3px\]{border-style:var(--tw-border-style);border-width:3px}.border-\[4px\]{border-style:var(--tw-border-style);border-width:4px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0{border-top-style:var(--tw-border-style);border-top-width:0}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-t-4{border-top-style:var(--tw-border-style);border-top-width:4px}.border-t-\[6px\]{border-top-style:var(--tw-border-style);border-top-width:6px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-0{border-right-style:var(--tw-border-style);border-right-width:0}.border-r-4{border-right-style:var(--tw-border-style);border-right-width:4px}.border-r-\[6px\]{border-right-style:var(--tw-border-style);border-right-width:6px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-b-4,.border-b-\[4px\]{border-bottom-style:var(--tw-border-style);border-bottom-width:4px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-l-\[6px\]{border-left-style:var(--tw-border-style);border-left-width:6px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-\(--color-border\){border-color:var(--color-border)}.border-\[\#0B0F19\]{border-color:#0b0f19}.border-\[\#1FA7E1\]\/20{border-color:#1fa7e133}.border-\[\#1FA7E1\]\/30{border-color:#1fa7e14d}.border-\[\#1FA7E1\]\/40{border-color:#1fa7e166}.border-\[\#2a3648\]{border-color:#2a3648}.border-\[\#2f384e\]{border-color:#2f384e}.border-\[\#7C3AED\]{border-color:#7c3aed}.border-\[\#8A3FD3\]\/20{border-color:#8a3fd333}.border-\[\#8A3FD3\]\/30{border-color:#8a3fd34d}.border-\[\#8B5CF6\]\/40{border-color:#8b5cf666}.border-\[\#9b51e0\]{border-color:#9b51e0}.border-\[\#75D06A\]{border-color:#75d06a}.border-\[\#75D06A\]\/30{border-color:#75d06a4d}.border-\[\#75D06A\]\/35{border-color:#75d06a59}.border-\[\#75D06A\]\/40{border-color:#75d06a66}.border-\[\#7274ED\]\/30{border-color:#7274ed4d}.border-\[\#9956DE\]{border-color:#9956de}.border-\[\#9956DE\]\/20{border-color:#9956de33}.border-\[\#9956DE\]\/25{border-color:#9956de40}.border-\[\#9956DE\]\/30{border-color:#9956de4d}.border-\[\#9956DE\]\/45{border-color:#9956de73}.border-\[\#F1F5F9\]{border-color:#f1f5f9}.border-\[\#F08386\]{border-color:#f08386}.border-\[\#F08386\]\/30{border-color:#f083864d}.border-\[\#FF8B8B\]{border-color:#ff8b8b}.border-\[\#FF8B8B\]\/35{border-color:#ff8b8b59}.border-\[\#FFB356\]{border-color:#ffb356}.border-\[\#FFB356\]\/38{border-color:#ffb35661}.border-\[\#d1cec6\]{border-color:#d1cec6}.border-\[\#dadce0\]{border-color:#dadce0}.border-\[\#dde3eb\]{border-color:#dde3eb}.border-\[\#e67e00\]{border-color:#e67e00}.border-\[\#edf1f7\]{border-color:#edf1f7}.border-\[\#fde68a\]{border-color:#fde68a}.border-\[color-mix\(in_srgb\,var\(--primary\)_30\%\,transparent\)\]{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.border-\[color-mix\(in_srgb\,var\(--primary\)_30\%\,transparent\)\]{border-color:color-mix(in srgb,var(--primary) 30%,transparent)}}.border-amber-200{border-color:var(--color-amber-200)}.border-amber-200\/60{border-color:#fee68599}@supports (color:color-mix(in lab,red,red)){.border-amber-200\/60{border-color:color-mix(in oklab,var(--color-amber-200) 60%,transparent)}}.border-amber-300{border-color:var(--color-amber-300)}.border-amber-300\/50{border-color:#ffd23680}@supports (color:color-mix(in lab,red,red)){.border-amber-300\/50{border-color:color-mix(in oklab,var(--color-amber-300) 50%,transparent)}}.border-amber-400{border-color:var(--color-amber-400)}.border-amber-500{border-color:var(--color-amber-500)}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/20{border-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500) 30%,transparent)}}.border-blue-300{border-color:var(--color-blue-300)}.border-blue-400\/30{border-color:#54a2ff4d}@supports (color:color-mix(in lab,red,red)){.border-blue-400\/30{border-color:color-mix(in oklab,var(--color-blue-400) 30%,transparent)}}.border-blue-500{border-color:var(--color-blue-500)}.border-border,.border-border\/50{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,var(--border) 50%,transparent)}}.border-border\/80{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/80{border-color:color-mix(in oklab,var(--border) 80%,transparent)}}.border-current{border-color:currentColor}.border-destructive\/20{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/20{border-color:color-mix(in oklab,var(--destructive) 20%,transparent)}}.border-emerald-100{border-color:var(--color-emerald-100)}.border-emerald-200{border-color:var(--color-emerald-200)}.border-emerald-200\/50{border-color:#a4f4cf80}@supports (color:color-mix(in lab,red,red)){.border-emerald-200\/50{border-color:color-mix(in oklab,var(--color-emerald-200) 50%,transparent)}}.border-emerald-200\/60{border-color:#a4f4cf99}@supports (color:color-mix(in lab,red,red)){.border-emerald-200\/60{border-color:color-mix(in oklab,var(--color-emerald-200) 60%,transparent)}}.border-emerald-300{border-color:var(--color-emerald-300)}.border-emerald-300\/40{border-color:#5ee9b566}@supports (color:color-mix(in lab,red,red)){.border-emerald-300\/40{border-color:color-mix(in oklab,var(--color-emerald-300) 40%,transparent)}}.border-emerald-300\/70{border-color:#5ee9b5b3}@supports (color:color-mix(in lab,red,red)){.border-emerald-300\/70{border-color:color-mix(in oklab,var(--color-emerald-300) 70%,transparent)}}.border-emerald-400{border-color:var(--color-emerald-400)}.border-emerald-400\/30{border-color:#00d2944d}@supports (color:color-mix(in lab,red,red)){.border-emerald-400\/30{border-color:color-mix(in oklab,var(--color-emerald-400) 30%,transparent)}}.border-emerald-500{border-color:var(--color-emerald-500)}.border-emerald-500\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/20{border-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.border-emerald-500\/50{border-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/50{border-color:color-mix(in oklab,var(--color-emerald-500) 50%,transparent)}}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-green-200{border-color:var(--color-green-200)}.border-green-300{border-color:var(--color-green-300)}.border-green-500\/40{border-color:#00c75866}@supports (color:color-mix(in lab,red,red)){.border-green-500\/40{border-color:color-mix(in oklab,var(--color-green-500) 40%,transparent)}}.border-indigo-100{border-color:var(--color-indigo-100)}.border-indigo-200{border-color:var(--color-indigo-200)}.border-indigo-400{border-color:var(--color-indigo-400)}.border-indigo-500{border-color:var(--color-indigo-500)}.border-indigo-500\/20{border-color:#625fff33}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/20{border-color:color-mix(in oklab,var(--color-indigo-500) 20%,transparent)}}.border-indigo-500\/30{border-color:#625fff4d}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/30{border-color:color-mix(in oklab,var(--color-indigo-500) 30%,transparent)}}.border-input{border-color:var(--input)}.border-muted-foreground\/15{border-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.border-muted-foreground\/15{border-color:color-mix(in oklab,var(--muted-foreground) 15%,transparent)}}.border-orange-200{border-color:var(--color-orange-200)}.border-orange-200\/60{border-color:#ffd7a899}@supports (color:color-mix(in lab,red,red)){.border-orange-200\/60{border-color:color-mix(in oklab,var(--color-orange-200) 60%,transparent)}}.border-orange-300\/50{border-color:#ffb96d80}@supports (color:color-mix(in lab,red,red)){.border-orange-300\/50{border-color:color-mix(in oklab,var(--color-orange-300) 50%,transparent)}}.border-orange-400{border-color:var(--color-orange-400)}.border-orange-500{border-color:var(--color-orange-500)}.border-orange-500\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/30{border-color:color-mix(in oklab,var(--color-orange-500) 30%,transparent)}}.border-orange-500\/40{border-color:#fe6e0066}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/40{border-color:color-mix(in oklab,var(--color-orange-500) 40%,transparent)}}.border-primary,.border-primary\/60{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\/60{border-color:color-mix(in oklab,var(--primary) 60%,transparent)}}.border-purple-100{border-color:var(--color-purple-100)}.border-purple-200{border-color:var(--color-purple-200)}.border-purple-300{border-color:var(--color-purple-300)}.border-purple-500{border-color:var(--color-purple-500)}.border-purple-500\/20{border-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/20{border-color:color-mix(in oklab,var(--color-purple-500) 20%,transparent)}}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500) 30%,transparent)}}.border-purple-600{border-color:var(--color-purple-600)}.border-red-100{border-color:var(--color-red-100)}.border-red-200{border-color:var(--color-red-200)}.border-red-300{border-color:var(--color-red-300)}.border-red-500{border-color:var(--color-red-500)}.border-rose-100{border-color:var(--color-rose-100)}.border-rose-200{border-color:var(--color-rose-200)}.border-rose-200\/50{border-color:#ffccd380}@supports (color:color-mix(in lab,red,red)){.border-rose-200\/50{border-color:color-mix(in oklab,var(--color-rose-200) 50%,transparent)}}.border-rose-200\/60{border-color:#ffccd399}@supports (color:color-mix(in lab,red,red)){.border-rose-200\/60{border-color:color-mix(in oklab,var(--color-rose-200) 60%,transparent)}}.border-rose-300{border-color:var(--color-rose-300)}.border-rose-300\/70{border-color:#ffa2aeb3}@supports (color:color-mix(in lab,red,red)){.border-rose-300\/70{border-color:color-mix(in oklab,var(--color-rose-300) 70%,transparent)}}.border-rose-400{border-color:var(--color-rose-400)}.border-rose-400\/50{border-color:#ff667f80}@supports (color:color-mix(in lab,red,red)){.border-rose-400\/50{border-color:color-mix(in oklab,var(--color-rose-400) 50%,transparent)}}.border-rose-500{border-color:var(--color-rose-500)}.border-rose-500\/20{border-color:#ff235733}@supports (color:color-mix(in lab,red,red)){.border-rose-500\/20{border-color:color-mix(in oklab,var(--color-rose-500) 20%,transparent)}}.border-rose-500\/30{border-color:#ff23574d}@supports (color:color-mix(in lab,red,red)){.border-rose-500\/30{border-color:color-mix(in oklab,var(--color-rose-500) 30%,transparent)}}.border-rose-500\/50{border-color:#ff235780}@supports (color:color-mix(in lab,red,red)){.border-rose-500\/50{border-color:color-mix(in oklab,var(--color-rose-500) 50%,transparent)}}.border-sidebar-border{border-color:var(--sidebar-border)}.border-sky-100{border-color:var(--color-violet-100)}.border-sky-100\/80{border-color:#ede9fecc}@supports (color:color-mix(in lab,red,red)){.border-sky-100\/80{border-color:color-mix(in oklab,var(--color-violet-100) 80%,transparent)}}.border-sky-200{border-color:var(--color-violet-200)}.border-sky-200\/50{border-color:#ddd6ff80}@supports (color:color-mix(in lab,red,red)){.border-sky-200\/50{border-color:color-mix(in oklab,var(--color-violet-200) 50%,transparent)}}.border-sky-200\/60{border-color:#ddd6ff99}@supports (color:color-mix(in lab,red,red)){.border-sky-200\/60{border-color:color-mix(in oklab,var(--color-violet-200) 60%,transparent)}}.border-sky-300{border-color:var(--color-violet-300)}.border-sky-400{border-color:var(--color-violet-400)}.border-sky-500{border-color:var(--color-violet-500)}.border-sky-500\/20{border-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.border-sky-500\/20{border-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.border-sky-500\/30{border-color:#8d54ff4d}@supports (color:color-mix(in lab,red,red)){.border-sky-500\/30{border-color:color-mix(in oklab,var(--color-violet-500) 30%,transparent)}}.border-sky-500\/40{border-color:#8d54ff66}@supports (color:color-mix(in lab,red,red)){.border-sky-500\/40{border-color:color-mix(in oklab,var(--color-violet-500) 40%,transparent)}}.border-slate-50{border-color:var(--color-slate-50)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-100\/50{border-color:#f1f5f980}@supports (color:color-mix(in lab,red,red)){.border-slate-100\/50{border-color:color-mix(in oklab,var(--color-slate-100) 50%,transparent)}}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-200\/60{border-color:#e2e8f099}@supports (color:color-mix(in lab,red,red)){.border-slate-200\/60{border-color:color-mix(in oklab,var(--color-slate-200) 60%,transparent)}}.border-slate-200\/70{border-color:#e2e8f0b3}@supports (color:color-mix(in lab,red,red)){.border-slate-200\/70{border-color:color-mix(in oklab,var(--color-slate-200) 70%,transparent)}}.border-slate-200\/80{border-color:#e2e8f0cc}@supports (color:color-mix(in lab,red,red)){.border-slate-200\/80{border-color:color-mix(in oklab,var(--color-slate-200) 80%,transparent)}}.border-slate-300{border-color:var(--color-slate-300)}.border-slate-300\/30{border-color:#cad5e24d}@supports (color:color-mix(in lab,red,red)){.border-slate-300\/30{border-color:color-mix(in oklab,var(--color-slate-300) 30%,transparent)}}.border-slate-300\/50{border-color:#cad5e280}@supports (color:color-mix(in lab,red,red)){.border-slate-300\/50{border-color:color-mix(in oklab,var(--color-slate-300) 50%,transparent)}}.border-slate-300\/70{border-color:#cad5e2b3}@supports (color:color-mix(in lab,red,red)){.border-slate-300\/70{border-color:color-mix(in oklab,var(--color-slate-300) 70%,transparent)}}.border-slate-700{border-color:var(--color-slate-700)}.border-slate-700\/50{border-color:#31415880}@supports (color:color-mix(in lab,red,red)){.border-slate-700\/50{border-color:color-mix(in oklab,var(--color-slate-700) 50%,transparent)}}.border-slate-800{border-color:var(--color-slate-800)}.border-slate-800\/10{border-color:#1d293d1a}@supports (color:color-mix(in lab,red,red)){.border-slate-800\/10{border-color:color-mix(in oklab,var(--color-slate-800) 10%,transparent)}}.border-teal-200{border-color:var(--color-teal-200)}.border-transparent{border-color:#0000}.border-violet-200{border-color:var(--color-violet-200)}.border-violet-200\/60{border-color:#ddd6ff99}@supports (color:color-mix(in lab,red,red)){.border-violet-200\/60{border-color:color-mix(in oklab,var(--color-violet-200) 60%,transparent)}}.border-violet-800{border-color:var(--color-violet-800)}.border-white{border-color:var(--color-white)}.border-white\/5{border-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.border-white\/5{border-color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.border-white\/10{border-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.border-white\/20{border-color:#fff3}@supports (color:color-mix(in lab,red,red)){.border-white\/20{border-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.border-white\/25{border-color:#ffffff40}@supports (color:color-mix(in lab,red,red)){.border-white\/25{border-color:color-mix(in oklab,var(--color-white) 25%,transparent)}}.border-white\/35{border-color:#ffffff59}@supports (color:color-mix(in lab,red,red)){.border-white\/35{border-color:color-mix(in oklab,var(--color-white) 35%,transparent)}}.border-white\/40{border-color:#fff6}@supports (color:color-mix(in lab,red,red)){.border-white\/40{border-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.border-white\/50{border-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.border-white\/50{border-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.border-yellow-300{border-color:var(--color-yellow-300)}.border-zinc-200{border-color:var(--color-zinc-200)}.border-t-slate-800{border-top-color:var(--color-slate-800)}.border-t-transparent{border-top-color:#0000}.border-t-violet-500{border-top-color:var(--color-violet-500)}.border-t-white{border-top-color:var(--color-white)}.border-r-amber-300{border-right-color:var(--color-amber-300)}.border-r-transparent{border-right-color:#0000}.border-b-amber-300{border-bottom-color:var(--color-amber-300)}.border-l-transparent{border-left-color:#0000}.\!bg-\[\#6ED1CF\]\/35{background-color:#6ed1cf59!important}.\!bg-\[\#7274ED\]{background-color:#7274ed!important}.bg-\(--color-bg\){background-color:var(--color-bg)}.bg-\[\#0B0F19\]{background-color:#0b0f19}.bg-\[\#0a1628\]{background-color:#0a1628}.bg-\[\#0f1422\]{background-color:#0f1422}.bg-\[\#00a86b\]{background-color:#00a86b}.bg-\[\#1FA7E1\]{background-color:#1fa7e1}.bg-\[\#1FA7E1\]\/10{background-color:#1fa7e11a}.bg-\[\#1FA7E1\]\/80{background-color:#1fa7e1cc}.bg-\[\#1a85a4\]{background-color:#1a85a4}.bg-\[\#1a2030\]{background-color:#1a2030}.bg-\[\#1e2433\]{background-color:#1e2433}.bg-\[\#1e2433\]\/95{background-color:#1e2433f2}.bg-\[\#1e2536\]{background-color:#1e2536}.bg-\[\#2f3547\]{background-color:#2f3547}.bg-\[\#3b3a82\]{background-color:#3b3a82}.bg-\[\#5a6578\]{background-color:#5a6578}.bg-\[\#6D28D9\]{background-color:#6d28d9}.bg-\[\#6ED1CF\]\/20{background-color:#6ed1cf33}.bg-\[\#6ED1CF\]\/30{background-color:#6ed1cf4d}.bg-\[\#6F2BAF\]{background-color:#6f2baf}.bg-\[\#7ec16d\]{background-color:#7ec16d}.bg-\[\#8A3FD3\]{background-color:#8a3fd3}.bg-\[\#8A3FD3\]\/5{background-color:#8a3fd30d}.bg-\[\#8A3FD3\]\/10{background-color:#8a3fd31a}.bg-\[\#8B5CF6\]{background-color:#8b5cf6}.bg-\[\#8b0d0d\]{background-color:#8b0d0d}.bg-\[\#9a67d0\]{background-color:#9a67d0}.bg-\[\#9b51e0\]{background-color:#9b51e0}.bg-\[\#34d399\]{background-color:#34d399}.bg-\[\#48bca6\]{background-color:#48bca6}.bg-\[\#55b963\]{background-color:#55b963}.bg-\[\#58B34D\]{background-color:#58b34d}.bg-\[\#62b658\]{background-color:#62b658}.bg-\[\#75D06A\]{background-color:#75d06a}.bg-\[\#75D06A\]\/10{background-color:#75d06a1a}.bg-\[\#75D06A\]\/14{background-color:#75d06a24}.bg-\[\#75D06A\]\/15{background-color:#75d06a26}.bg-\[\#75D06A\]\/22{background-color:#75d06a38}.bg-\[\#75D06A\]\/100{background-color:#75d06a}.bg-\[\#127DA6\]{background-color:#127da6}.bg-\[\#158abf\]{background-color:#158abf}.bg-\[\#161a25\]\/90{background-color:#161a25e6}.bg-\[\#181d27\]{background-color:#181d27}.bg-\[\#533ab6\]{background-color:#533ab6}.bg-\[\#662AA8\]{background-color:#662aa8}.bg-\[\#7274ED\]{background-color:#7274ed}.bg-\[\#7274ED\]\/10{background-color:#7274ed1a}.bg-\[\#7274ED\]\/15{background-color:#7274ed26}.bg-\[\#7274ED\]\/80{background-color:#7274edcc}.bg-\[\#7274ED\]\/100{background-color:#7274ed}.bg-\[\#8544c7\]{background-color:#8544c7}.bg-\[\#9956DE\]{background-color:#9956de}.bg-\[\#9956DE\]\/10{background-color:#9956de1a}.bg-\[\#9956DE\]\/12{background-color:#9956de1f}.bg-\[\#9956DE\]\/15{background-color:#9956de26}.bg-\[\#9956DE\]\/16{background-color:#9956de29}.bg-\[\#9956DE\]\/20{background-color:#9956de33}.bg-\[\#9956DE\]\/32{background-color:#9956de52}.bg-\[\#9956DE\]\/80{background-color:#9956decc}.bg-\[\#9956de\]{background-color:#9956de}.bg-\[\#10709b\]{background-color:#10709b}.bg-\[\#12192b\]{background-color:#12192b}.bg-\[\#42389d\]{background-color:#42389d}.bg-\[\#111827\]{background-color:#111827}.bg-\[\#633299\]{background-color:#633299}.bg-\[\#D96C6A\]{background-color:#d96c6a}.bg-\[\#DE7949\]{background-color:#de7949}.bg-\[\#E06A6A\]{background-color:#e06a6a}.bg-\[\#F08386\]{background-color:#f08386}.bg-\[\#F08386\]\/12{background-color:#f083861f}.bg-\[\#F08386\]\/15{background-color:#f0838626}.bg-\[\#F08386\]\/20{background-color:#f0838633}.bg-\[\#FB96BB\]{background-color:#fb96bb}.bg-\[\#FB96BB\]\/20{background-color:#fb96bb33}.bg-\[\#FF8B8B\]{background-color:#ff8b8b}.bg-\[\#FF8B8B\]\/10{background-color:#ff8b8b1a}.bg-\[\#FF8B8B\]\/14{background-color:#ff8b8b24}.bg-\[\#FF8B8B\]\/22{background-color:#ff8b8b38}.bg-\[\#FFB356\]{background-color:#ffb356}.bg-\[\#FFB356\]\/10{background-color:#ffb3561a}.bg-\[\#FFB356\]\/16{background-color:#ffb35629}.bg-\[\#FFB356\]\/20{background-color:#ffb35633}.bg-\[\#FFB356\]\/90{background-color:#ffb356e6}.bg-\[\#a8a5b3\]{background-color:#a8a5b3}.bg-\[\#b61515\]{background-color:#b61515}.bg-\[\#d24b4b\]{background-color:#d24b4b}.bg-\[\#dde3eb\]{background-color:#dde3eb}.bg-\[\#df7b9e\]{background-color:#df7b9e}.bg-\[\#e1f5f7\]{background-color:#e1f5f7}.bg-\[\#e66a5e\]{background-color:#e66a5e}.bg-\[\#e67070\]{background-color:#e67070}.bg-\[\#e69940\]{background-color:#e69940}.bg-\[\#eb74a6\]{background-color:#eb74a6}.bg-\[\#edf1f7\]{background-color:#edf1f7}.bg-\[\#edf1f7\]\/50{background-color:#edf1f780}.bg-\[\#f0eaff\]{background-color:#f0eaff}.bg-\[\#f5ecff\]{background-color:#f5ecff}.bg-\[\#f7f9fc\]{background-color:#f7f9fc}.bg-\[\#f7fbff\]{background-color:#f7fbff}.bg-\[\#f8fafc\]{background-color:#f8fafc}.bg-\[\#f8faff\]{background-color:#f8faff}.bg-\[\#f8fbff\]{background-color:#f8fbff}.bg-\[\#f47a75\]{background-color:#f47a75}.bg-\[\#f2812d\]{background-color:#f2812d}.bg-\[\#fa9746\]{background-color:#fa9746}.bg-\[\#faa541\]{background-color:#faa541}.bg-\[\#fb7185\]{background-color:#fb7185}.bg-\[\#fbab41\]{background-color:#fbab41}.bg-\[\#fbbf24\]{background-color:#fbbf24}.bg-\[\#fcfdff\]{background-color:#fcfdff}.bg-\[\#fdeceb\]{background-color:#fdeceb}.bg-\[\#fdfdfd\]{background-color:#fdfdfd}.bg-\[\#fe5c5c\]{background-color:#fe5c5c}.bg-\[\#fef5e7\]{background-color:#fef5e7}.bg-\[color-mix\(in_srgb\,var\(--chart-1\)_10\%\,transparent\)\]{background-color:var(--chart-1)}@supports (color:color-mix(in lab,red,red)){.bg-\[color-mix\(in_srgb\,var\(--chart-1\)_10\%\,transparent\)\]{background-color:color-mix(in srgb,var(--chart-1) 10%,transparent)}}.bg-\[color-mix\(in_srgb\,var\(--chart-2\)_10\%\,transparent\)\]{background-color:var(--chart-2)}@supports (color:color-mix(in lab,red,red)){.bg-\[color-mix\(in_srgb\,var\(--chart-2\)_10\%\,transparent\)\]{background-color:color-mix(in srgb,var(--chart-2) 10%,transparent)}}.bg-\[color-mix\(in_srgb\,var\(--chart-2\)_14\%\,transparent\)\]{background-color:var(--chart-2)}@supports (color:color-mix(in lab,red,red)){.bg-\[color-mix\(in_srgb\,var\(--chart-2\)_14\%\,transparent\)\]{background-color:color-mix(in srgb,var(--chart-2) 14%,transparent)}}.bg-\[color-mix\(in_srgb\,var\(--chart-3\)_10\%\,transparent\)\]{background-color:var(--chart-3)}@supports (color:color-mix(in lab,red,red)){.bg-\[color-mix\(in_srgb\,var\(--chart-3\)_10\%\,transparent\)\]{background-color:color-mix(in srgb,var(--chart-3) 10%,transparent)}}.bg-\[color-mix\(in_srgb\,var\(--chart-3\)_14\%\,transparent\)\]{background-color:var(--chart-3)}@supports (color:color-mix(in lab,red,red)){.bg-\[color-mix\(in_srgb\,var\(--chart-3\)_14\%\,transparent\)\]{background-color:color-mix(in srgb,var(--chart-3) 14%,transparent)}}.bg-\[color-mix\(in_srgb\,var\(--chart-4\)_14\%\,transparent\)\]{background-color:var(--chart-4)}@supports (color:color-mix(in lab,red,red)){.bg-\[color-mix\(in_srgb\,var\(--chart-4\)_14\%\,transparent\)\]{background-color:color-mix(in srgb,var(--chart-4) 14%,transparent)}}.bg-\[color-mix\(in_srgb\,var\(--primary\)_10\%\,transparent\)\]{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-\[color-mix\(in_srgb\,var\(--primary\)_10\%\,transparent\)\]{background-color:color-mix(in srgb,var(--primary) 10%,transparent)}}.bg-\[var\(--chart-2\)\]{background-color:var(--chart-2)}.bg-\[var\(--chart-3\)\]{background-color:var(--chart-3)}.bg-\[var\(--chart-4\)\]{background-color:var(--chart-4)}.bg-\[var\(--primary\)\],.bg-\[var\(--primary\)\]\/60{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--primary\)\]\/60{background-color:color-mix(in oklab,var(--primary) 60%,transparent)}}.bg-accent{background-color:var(--accent)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-400\/20{background-color:#fcbb0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-400\/20{background-color:color-mix(in oklab,var(--color-amber-400) 20%,transparent)}}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.bg-amber-600{background-color:var(--color-amber-600)}.bg-background{background-color:var(--background)}.bg-black\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.bg-black\/0{background-color:color-mix(in oklab,var(--color-black) 0%,transparent)}}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.bg-black\/10{background-color:color-mix(in oklab,var(--color-black) 10%,transparent)}}.bg-black\/15{background-color:#00000026}@supports (color:color-mix(in lab,red,red)){.bg-black\/15{background-color:color-mix(in oklab,var(--color-black) 15%,transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black) 30%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.bg-black\/70{background-color:color-mix(in oklab,var(--color-black) 70%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-100\/40{background-color:#dbeafe66}@supports (color:color-mix(in lab,red,red)){.bg-blue-100\/40{background-color:color-mix(in oklab,var(--color-blue-100) 40%,transparent)}}.bg-blue-300\/40{background-color:#90c5ff66}@supports (color:color-mix(in lab,red,red)){.bg-blue-300\/40{background-color:color-mix(in oklab,var(--color-blue-300) 40%,transparent)}}.bg-blue-400\/30{background-color:#54a2ff4d}@supports (color:color-mix(in lab,red,red)){.bg-blue-400\/30{background-color:color-mix(in oklab,var(--color-blue-400) 30%,transparent)}}.bg-blue-400\/40{background-color:#54a2ff66}@supports (color:color-mix(in lab,red,red)){.bg-blue-400\/40{background-color:color-mix(in oklab,var(--color-blue-400) 40%,transparent)}}.bg-blue-500\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/10{background-color:color-mix(in oklab,var(--color-blue-500) 10%,transparent)}}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500) 20%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-border{background-color:var(--border)}.bg-card,.bg-card\/20{background-color:var(--card)}@supports (color:color-mix(in lab,red,red)){.bg-card\/20{background-color:color-mix(in oklab,var(--card) 20%,transparent)}}.bg-card\/80{background-color:var(--card)}@supports (color:color-mix(in lab,red,red)){.bg-card\/80{background-color:color-mix(in oklab,var(--card) 80%,transparent)}}.bg-cyan-400\/30{background-color:#00d2ef4d}@supports (color:color-mix(in lab,red,red)){.bg-cyan-400\/30{background-color:color-mix(in oklab,var(--color-cyan-400) 30%,transparent)}}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500) 10%,transparent)}}.bg-destructive,.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.bg-destructive\/10{background-color:color-mix(in oklab,var(--destructive) 10%,transparent)}}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-100\/50{background-color:#d0fae580}@supports (color:color-mix(in lab,red,red)){.bg-emerald-100\/50{background-color:color-mix(in oklab,var(--color-emerald-100) 50%,transparent)}}.bg-emerald-200{background-color:var(--color-emerald-200)}.bg-emerald-300{background-color:var(--color-emerald-300)}.bg-emerald-400\/20{background-color:#00d29433}@supports (color:color-mix(in lab,red,red)){.bg-emerald-400\/20{background-color:color-mix(in oklab,var(--color-emerald-400) 20%,transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-foreground{background-color:var(--foreground)}.bg-fuchsia-400\/30{background-color:#ec6cff4d}@supports (color:color-mix(in lab,red,red)){.bg-fuchsia-400\/30{background-color:color-mix(in oklab,var(--color-fuchsia-400) 30%,transparent)}}.bg-fuchsia-500{background-color:var(--color-fuchsia-500)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-50\/30{background-color:#f0fdf44d}@supports (color:color-mix(in lab,red,red)){.bg-green-50\/30{background-color:color-mix(in oklab,var(--color-green-50) 30%,transparent)}}.bg-green-100{background-color:var(--color-green-100)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\/20{background-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/20{background-color:color-mix(in oklab,var(--color-green-500) 20%,transparent)}}.bg-green-600{background-color:var(--color-green-600)}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-100\/50{background-color:#e0e7ff80}@supports (color:color-mix(in lab,red,red)){.bg-indigo-100\/50{background-color:color-mix(in oklab,var(--color-indigo-100) 50%,transparent)}}.bg-indigo-200{background-color:var(--color-indigo-200)}.bg-indigo-300\/10{background-color:#a4b3ff1a}@supports (color:color-mix(in lab,red,red)){.bg-indigo-300\/10{background-color:color-mix(in oklab,var(--color-indigo-300) 10%,transparent)}}.bg-indigo-400\/20{background-color:#7d87ff33}@supports (color:color-mix(in lab,red,red)){.bg-indigo-400\/20{background-color:color-mix(in oklab,var(--color-indigo-400) 20%,transparent)}}.bg-indigo-400\/30{background-color:#7d87ff4d}@supports (color:color-mix(in lab,red,red)){.bg-indigo-400\/30{background-color:color-mix(in oklab,var(--color-indigo-400) 30%,transparent)}}.bg-indigo-500{background-color:var(--color-indigo-500)}.bg-indigo-500\/10{background-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/10{background-color:color-mix(in oklab,var(--color-indigo-500) 10%,transparent)}}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-input-background{background-color:var(--input-background)}.bg-muted{background-color:var(--muted)}.bg-muted-foreground,.bg-muted-foreground\/30{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/30{background-color:color-mix(in oklab,var(--muted-foreground) 30%,transparent)}}.bg-muted\/20{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/20{background-color:color-mix(in oklab,var(--muted) 20%,transparent)}}.bg-muted\/30{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/30{background-color:color-mix(in oklab,var(--muted) 30%,transparent)}}.bg-muted\/40{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/40{background-color:color-mix(in oklab,var(--muted) 40%,transparent)}}.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/50{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.bg-muted\/60{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/60{background-color:color-mix(in oklab,var(--muted) 60%,transparent)}}.bg-orange-50{background-color:var(--color-orange-50)}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-400{background-color:var(--color-orange-400)}.bg-orange-400\/20{background-color:#ff8b1a33}@supports (color:color-mix(in lab,red,red)){.bg-orange-400\/20{background-color:color-mix(in oklab,var(--color-orange-400) 20%,transparent)}}.bg-orange-500{background-color:var(--color-orange-500)}.bg-orange-500\/10{background-color:#fe6e001a}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/10{background-color:color-mix(in oklab,var(--color-orange-500) 10%,transparent)}}.bg-orange-500\/15{background-color:#fe6e0026}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/15{background-color:color-mix(in oklab,var(--color-orange-500) 15%,transparent)}}.bg-orange-500\/20{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/20{background-color:color-mix(in oklab,var(--color-orange-500) 20%,transparent)}}.bg-popover{background-color:var(--popover)}.bg-primary,.bg-primary\/10{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\/10{background-color:color-mix(in oklab,var(--primary) 10%,transparent)}}.bg-primary\/20{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\/20{background-color:color-mix(in oklab,var(--primary) 20%,transparent)}}.bg-purple-50{background-color:var(--color-purple-50)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-100\/30{background-color:#f3e8ff4d}@supports (color:color-mix(in lab,red,red)){.bg-purple-100\/30{background-color:color-mix(in oklab,var(--color-purple-100) 30%,transparent)}}.bg-purple-200{background-color:var(--color-purple-200)}.bg-purple-300\/10{background-color:#d9b3ff1a}@supports (color:color-mix(in lab,red,red)){.bg-purple-300\/10{background-color:color-mix(in oklab,var(--color-purple-300) 10%,transparent)}}.bg-purple-400\/20{background-color:#c07eff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-400\/20{background-color:color-mix(in oklab,var(--color-purple-400) 20%,transparent)}}.bg-purple-500{background-color:var(--color-purple-500)}.bg-purple-500\/10{background-color:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/10{background-color:color-mix(in oklab,var(--color-purple-500) 10%,transparent)}}.bg-purple-600{background-color:var(--color-purple-600)}.bg-purple-900\/20{background-color:#59168b33}@supports (color:color-mix(in lab,red,red)){.bg-purple-900\/20{background-color:color-mix(in oklab,var(--color-purple-900) 20%,transparent)}}.bg-purple-900\/40{background-color:#59168b66}@supports (color:color-mix(in lab,red,red)){.bg-purple-900\/40{background-color:color-mix(in oklab,var(--color-purple-900) 40%,transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-50\/30{background-color:#fef2f24d}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/30{background-color:color-mix(in oklab,var(--color-red-50) 30%,transparent)}}.bg-red-100{background-color:var(--color-red-100)}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-red-600{background-color:var(--color-red-600)}.bg-rose-50{background-color:var(--color-rose-50)}.bg-rose-100{background-color:var(--color-rose-100)}.bg-rose-100\/30{background-color:#ffe4e64d}@supports (color:color-mix(in lab,red,red)){.bg-rose-100\/30{background-color:color-mix(in oklab,var(--color-rose-100) 30%,transparent)}}.bg-rose-100\/40{background-color:#ffe4e666}@supports (color:color-mix(in lab,red,red)){.bg-rose-100\/40{background-color:color-mix(in oklab,var(--color-rose-100) 40%,transparent)}}.bg-rose-200{background-color:var(--color-rose-200)}.bg-rose-200\/60{background-color:#ffccd399}@supports (color:color-mix(in lab,red,red)){.bg-rose-200\/60{background-color:color-mix(in oklab,var(--color-rose-200) 60%,transparent)}}.bg-rose-300{background-color:var(--color-rose-300)}.bg-rose-300\/60{background-color:#ffa2ae99}@supports (color:color-mix(in lab,red,red)){.bg-rose-300\/60{background-color:color-mix(in oklab,var(--color-rose-300) 60%,transparent)}}.bg-rose-400{background-color:var(--color-rose-400)}.bg-rose-400\/5{background-color:#ff667f0d}@supports (color:color-mix(in lab,red,red)){.bg-rose-400\/5{background-color:color-mix(in oklab,var(--color-rose-400) 5%,transparent)}}.bg-rose-500{background-color:var(--color-rose-500)}.bg-rose-500\/5{background-color:#ff23570d}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/5{background-color:color-mix(in oklab,var(--color-rose-500) 5%,transparent)}}.bg-rose-500\/10{background-color:#ff23571a}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/10{background-color:color-mix(in oklab,var(--color-rose-500) 10%,transparent)}}.bg-rose-500\/20{background-color:#ff235733}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/20{background-color:color-mix(in oklab,var(--color-rose-500) 20%,transparent)}}.bg-rose-600{background-color:var(--color-rose-600)}.bg-secondary{background-color:var(--secondary)}.bg-sidebar{background-color:var(--sidebar)}.bg-sidebar-border{background-color:var(--sidebar-border)}.bg-sky-50{background-color:var(--color-violet-50)}.bg-sky-50\/40{background-color:#f5f3ff66}@supports (color:color-mix(in lab,red,red)){.bg-sky-50\/40{background-color:color-mix(in oklab,var(--color-violet-50) 40%,transparent)}}.bg-sky-50\/50{background-color:#f5f3ff80}@supports (color:color-mix(in lab,red,red)){.bg-sky-50\/50{background-color:color-mix(in oklab,var(--color-violet-50) 50%,transparent)}}.bg-sky-50\/70{background-color:#f5f3ffb3}@supports (color:color-mix(in lab,red,red)){.bg-sky-50\/70{background-color:color-mix(in oklab,var(--color-violet-50) 70%,transparent)}}.bg-sky-100{background-color:var(--color-violet-100)}.bg-sky-100\/40{background-color:#ede9fe66}@supports (color:color-mix(in lab,red,red)){.bg-sky-100\/40{background-color:color-mix(in oklab,var(--color-violet-100) 40%,transparent)}}.bg-sky-200{background-color:var(--color-violet-200)}.bg-sky-300{background-color:var(--color-violet-300)}.bg-sky-300\/10{background-color:#c4b4ff1a}@supports (color:color-mix(in lab,red,red)){.bg-sky-300\/10{background-color:color-mix(in oklab,var(--color-violet-300) 10%,transparent)}}.bg-sky-400{background-color:var(--color-violet-400)}.bg-sky-400\/20{background-color:#a685ff33}@supports (color:color-mix(in lab,red,red)){.bg-sky-400\/20{background-color:color-mix(in oklab,var(--color-violet-400) 20%,transparent)}}.bg-sky-500{background-color:var(--color-violet-500)}.bg-sky-500\/5{background-color:#8d54ff0d}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/5{background-color:color-mix(in oklab,var(--color-violet-500) 5%,transparent)}}.bg-sky-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/10{background-color:color-mix(in oklab,var(--color-violet-500) 10%,transparent)}}.bg-sky-500\/20{background-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/20{background-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.bg-sky-600{background-color:var(--color-violet-600)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\/50{background-color:#f8fafc80}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/50{background-color:color-mix(in oklab,var(--color-slate-50) 50%,transparent)}}.bg-slate-50\/80{background-color:#f8fafccc}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/80{background-color:color-mix(in oklab,var(--color-slate-50) 80%,transparent)}}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-100\/70{background-color:#f1f5f9b3}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\/70{background-color:color-mix(in oklab,var(--color-slate-100) 70%,transparent)}}.bg-slate-100\/80{background-color:#f1f5f9cc}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\/80{background-color:color-mix(in oklab,var(--color-slate-100) 80%,transparent)}}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-200\/50{background-color:#e2e8f080}@supports (color:color-mix(in lab,red,red)){.bg-slate-200\/50{background-color:color-mix(in oklab,var(--color-slate-200) 50%,transparent)}}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-slate-500{background-color:var(--color-slate-500)}.bg-slate-500\/15{background-color:#62748e26}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/15{background-color:color-mix(in oklab,var(--color-slate-500) 15%,transparent)}}.bg-slate-500\/20{background-color:#62748e33}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/20{background-color:color-mix(in oklab,var(--color-slate-500) 20%,transparent)}}.bg-slate-700{background-color:var(--color-slate-700)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-800\/5{background-color:#1d293d0d}@supports (color:color-mix(in lab,red,red)){.bg-slate-800\/5{background-color:color-mix(in oklab,var(--color-slate-800) 5%,transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\/5{background-color:#0f172b0d}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/5{background-color:color-mix(in oklab,var(--color-slate-900) 5%,transparent)}}.bg-slate-900\/10{background-color:#0f172b1a}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/10{background-color:color-mix(in oklab,var(--color-slate-900) 10%,transparent)}}.bg-slate-900\/40{background-color:#0f172b66}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/40{background-color:color-mix(in oklab,var(--color-slate-900) 40%,transparent)}}.bg-slate-900\/50{background-color:#0f172b80}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/50{background-color:color-mix(in oklab,var(--color-slate-900) 50%,transparent)}}.bg-slate-900\/60{background-color:#0f172b99}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/60{background-color:color-mix(in oklab,var(--color-slate-900) 60%,transparent)}}.bg-slate-900\/85{background-color:#0f172bd9}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/85{background-color:color-mix(in oklab,var(--color-slate-900) 85%,transparent)}}.bg-teal-50{background-color:var(--color-teal-50)}.bg-teal-100{background-color:var(--color-teal-100)}.bg-teal-400\/20{background-color:#00d3bd33}@supports (color:color-mix(in lab,red,red)){.bg-teal-400\/20{background-color:color-mix(in oklab,var(--color-teal-400) 20%,transparent)}}.bg-teal-500{background-color:var(--color-teal-500)}.bg-teal-600{background-color:var(--color-teal-600)}.bg-transparent{background-color:#0000}.bg-violet-50{background-color:var(--color-violet-50)}.bg-violet-100{background-color:var(--color-violet-100)}.bg-violet-300{background-color:var(--color-violet-300)}.bg-violet-400{background-color:var(--color-violet-400)}.bg-violet-400\/5{background-color:#a685ff0d}@supports (color:color-mix(in lab,red,red)){.bg-violet-400\/5{background-color:color-mix(in oklab,var(--color-violet-400) 5%,transparent)}}.bg-violet-500{background-color:var(--color-violet-500)}.bg-violet-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/10{background-color:color-mix(in oklab,var(--color-violet-500) 10%,transparent)}}.bg-violet-600{background-color:var(--color-violet-600)}.bg-white{background-color:var(--color-white)}.bg-white\/5{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.bg-white\/5{background-color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\/10{background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.bg-white\/15{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.bg-white\/15{background-color:color-mix(in oklab,var(--color-white) 15%,transparent)}}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.bg-white\/25{background-color:#ffffff40}@supports (color:color-mix(in lab,red,red)){.bg-white\/25{background-color:color-mix(in oklab,var(--color-white) 25%,transparent)}}.bg-white\/30{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.bg-white\/30{background-color:color-mix(in oklab,var(--color-white) 30%,transparent)}}.bg-white\/35{background-color:#ffffff59}@supports (color:color-mix(in lab,red,red)){.bg-white\/35{background-color:color-mix(in oklab,var(--color-white) 35%,transparent)}}.bg-white\/40{background-color:#fff6}@supports (color:color-mix(in lab,red,red)){.bg-white\/40{background-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.bg-white\/50{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.bg-white\/50{background-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.bg-white\/60{background-color:#fff9}@supports (color:color-mix(in lab,red,red)){.bg-white\/60{background-color:color-mix(in oklab,var(--color-white) 60%,transparent)}}.bg-white\/70{background-color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.bg-white\/70{background-color:color-mix(in oklab,var(--color-white) 70%,transparent)}}.bg-white\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\/80{background-color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.bg-white\/85{background-color:#ffffffd9}@supports (color:color-mix(in lab,red,red)){.bg-white\/85{background-color:color-mix(in oklab,var(--color-white) 85%,transparent)}}.bg-white\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.bg-white\/90{background-color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.bg-white\/95{background-color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.bg-white\/95{background-color:color-mix(in oklab,var(--color-white) 95%,transparent)}}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-400{background-color:var(--color-yellow-400)}.bg-zinc-100{background-color:var(--color-zinc-100)}.\!bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab!important;background-image:linear-gradient(var(--tw-gradient-stops))!important}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-l{--tw-gradient-position:to left in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-\[radial-gradient\(circle_at_14\%_12\%\,rgba\(251\,150\,187\,0\.35\)\,transparent_42\%\)\,radial-gradient\(circle_at_80\%_80\%\,rgba\(117\,208\,106\,0\.25\)\,transparent_38\%\)\]{background-image:radial-gradient(circle at 14% 12%,#fb96bb59,#0000 42%),radial-gradient(circle at 80% 80%,#75d06a40,#0000 38%)}.bg-\[radial-gradient\(circle_at_18\%_8\%\,rgba\(251\,150\,187\,0\.32\)\,transparent_42\%\)\,radial-gradient\(circle_at_85\%_84\%\,rgba\(117\,208\,106\,0\.24\)\,transparent_40\%\)\]{background-image:radial-gradient(circle at 18% 8%,#fb96bb52,#0000 42%),radial-gradient(circle at 85% 84%,#75d06a3d,#0000 40%)}.bg-\[radial-gradient\(circle_at_top_right\,rgba\(153\,86\,222\,0\.08\)\,transparent_45\%\)\,radial-gradient\(circle_at_bottom_left\,rgba\(31\,167\,225\,0\.08\)\,transparent_45\%\)\]{background-image:radial-gradient(circle at 100% 0,#9956de14,#0000 45%),radial-gradient(circle at 0 100%,#1fa7e114,#0000 45%)}.bg-\[radial-gradient\(ellipse_at_50\%_100\%\,\#7e22ce_10\%\,transparent_60\%\)\]{background-image:radial-gradient(at 50% 100%,#7e22ce 10%,#0000 60%)}.bg-\[radial-gradient\(ellipse_at_50\%_100\%\,\#9333ea_0\%\,\#c084fc_50\%\,transparent_100\%\)\]{background-image:radial-gradient(at 50% 100%,#9333ea,#c084fc,#0000)}.bg-\[url\(\'data\:image\/svg\+xml\;base64\,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAiLz4KPHBhdGggZD0iTTAgMEgxdjFIMHoiIGZpbGw9IiM2MzY2ZjEiIGZpbGwtb3BhY2l0eT0iMC4wNSIvPgo8L3N2Zz4\=\'\)\]{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAiLz4KPHBhdGggZD0iTTAgMEgxdjFIMHoiIGZpbGw9IiM2MzY2ZjEiIGZpbGwtb3BhY2l0eT0iMC4wNSIvPgo8L3N2Zz4=)}.bg-\[url\(\'data\:image\/svg\+xml\;base64\,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4IiBoZWlnaHQ9IjgiPgo8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMSI\+PC9yZWN0Pgo8L3N2Zz4\=\'\)\]{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4IiBoZWlnaHQ9IjgiPgo8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMSI+PC9yZWN0Pgo8L3N2Zz4=)}.\!from-\[\#6ED1CF\]{--tw-gradient-from:#6ed1cf!important;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))!important}.from-\[\#1a85a4\]{--tw-gradient-from:#1a85a4;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#3b3a82\]{--tw-gradient-from:#3b3a82;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#6ED1CF\]{--tw-gradient-from:#6ed1cf;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#7ec16d\]{--tw-gradient-from:#7ec16d;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#9a67d0\]{--tw-gradient-from:#9a67d0;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#48bca6\]{--tw-gradient-from:#48bca6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#75D06A\]{--tw-gradient-from:#75d06a;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#7274ED\]{--tw-gradient-from:#7274ed;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#9956DE\]{--tw-gradient-from:#9956de;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#9956DE\]\/12{--tw-gradient-from:oklab(59.4745% .111053 -.167638/.12);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#FFB356\]{--tw-gradient-from:#ffb356;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#e66a5e\]{--tw-gradient-from:#e66a5e;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#eb74a6\]{--tw-gradient-from:#eb74a6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#fbab41\]{--tw-gradient-from:#fbab41;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-100{--tw-gradient-from:var(--color-amber-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-400{--tw-gradient-from:var(--color-amber-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-500{--tw-gradient-from:var(--color-amber-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-500\/20{--tw-gradient-from:#f99c0033}@supports (color:color-mix(in lab,red,red)){.from-amber-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.from-amber-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-600{--tw-gradient-from:var(--color-amber-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-blue-500{--tw-gradient-from:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-400{--tw-gradient-from:var(--color-emerald-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-500{--tw-gradient-from:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-500\/20{--tw-gradient-from:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.from-emerald-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-emerald-500) 20%, transparent)}}.from-emerald-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-600{--tw-gradient-from:var(--color-emerald-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-green-500{--tw-gradient-from:var(--color-green-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-50{--tw-gradient-from:var(--color-indigo-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-200{--tw-gradient-from:var(--color-indigo-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-500{--tw-gradient-from:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-500\/20{--tw-gradient-from:#625fff33}@supports (color:color-mix(in lab,red,red)){.from-indigo-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-indigo-500) 20%, transparent)}}.from-indigo-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-600{--tw-gradient-from:var(--color-indigo-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-orange-50{--tw-gradient-from:var(--color-orange-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-orange-500{--tw-gradient-from:var(--color-orange-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-400\/20{--tw-gradient-from:#c07eff33}@supports (color:color-mix(in lab,red,red)){.from-purple-400\/20{--tw-gradient-from:color-mix(in oklab, var(--color-purple-400) 20%, transparent)}}.from-purple-400\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-500{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-500\/20{--tw-gradient-from:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.from-purple-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-purple-500) 20%, transparent)}}.from-purple-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-600{--tw-gradient-from:var(--color-purple-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-rose-50{--tw-gradient-from:var(--color-rose-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-rose-400{--tw-gradient-from:var(--color-rose-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-rose-500{--tw-gradient-from:var(--color-rose-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-50{--tw-gradient-from:var(--color-violet-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-100{--tw-gradient-from:var(--color-violet-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-400{--tw-gradient-from:var(--color-violet-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-500{--tw-gradient-from:var(--color-violet-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-500\/20{--tw-gradient-from:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.from-sky-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-violet-500) 20%, transparent)}}.from-sky-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-600{--tw-gradient-from:var(--color-violet-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-700{--tw-gradient-from:var(--color-violet-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-slate-50\/30{--tw-gradient-from:#f8fafc4d}@supports (color:color-mix(in lab,red,red)){.from-slate-50\/30{--tw-gradient-from:color-mix(in oklab, var(--color-slate-50) 30%, transparent)}}.from-slate-50\/30{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-slate-200{--tw-gradient-from:var(--color-slate-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500{--tw-gradient-from:var(--color-teal-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-violet-500{--tw-gradient-from:var(--color-violet-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-white{--tw-gradient-from:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-white\/0{--tw-gradient-from:#0000}@supports (color:color-mix(in lab,red,red)){.from-white\/0{--tw-gradient-from:color-mix(in oklab, var(--color-white) 0%, transparent)}}.from-white\/0{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-\[\#6ED1CF\]{--tw-gradient-via:#6ed1cf;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#75D06A\]{--tw-gradient-via:#75d06a;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#7274ED\]{--tw-gradient-via:#7274ed;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#9956DE\]{--tw-gradient-via:#9956de;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-amber-400\/40{--tw-gradient-via:#fcbb0066}@supports (color:color-mix(in lab,red,red)){.via-amber-400\/40{--tw-gradient-via:color-mix(in oklab, var(--color-amber-400) 40%, transparent)}}.via-amber-400\/40{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-cyan-500{--tw-gradient-via:var(--color-cyan-500);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-cyan-500\/10{--tw-gradient-via:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.via-cyan-500\/10{--tw-gradient-via:color-mix(in oklab, var(--color-cyan-500) 10%, transparent)}}.via-cyan-500\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-emerald-500\/40{--tw-gradient-via:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.via-emerald-500\/40{--tw-gradient-via:color-mix(in oklab, var(--color-emerald-500) 40%, transparent)}}.via-emerald-500\/40{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-fuchsia-50{--tw-gradient-via:var(--color-fuchsia-50);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-fuchsia-500\/10{--tw-gradient-via:#e12afb1a}@supports (color:color-mix(in lab,red,red)){.via-fuchsia-500\/10{--tw-gradient-via:color-mix(in oklab, var(--color-fuchsia-500) 10%, transparent)}}.via-fuchsia-500\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-orange-500{--tw-gradient-via:var(--color-orange-500);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-orange-500\/10{--tw-gradient-via:#fe6e001a}@supports (color:color-mix(in lab,red,red)){.via-orange-500\/10{--tw-gradient-via:color-mix(in oklab, var(--color-orange-500) 10%, transparent)}}.via-orange-500\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-pink-500{--tw-gradient-via:var(--color-pink-500);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-pink-600{--tw-gradient-via:var(--color-pink-600);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-purple-500\/10{--tw-gradient-via:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.via-purple-500\/10{--tw-gradient-via:color-mix(in oklab, var(--color-purple-500) 10%, transparent)}}.via-purple-500\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-rose-500\/40{--tw-gradient-via:#ff235766}@supports (color:color-mix(in lab,red,red)){.via-rose-500\/40{--tw-gradient-via:color-mix(in oklab, var(--color-rose-500) 40%, transparent)}}.via-rose-500\/40{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-sky-50\/30{--tw-gradient-via:#f5f3ff4d}@supports (color:color-mix(in lab,red,red)){.via-sky-50\/30{--tw-gradient-via:color-mix(in oklab, var(--color-violet-50) 30%, transparent)}}.via-sky-50\/30{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-sky-50\/50{--tw-gradient-via:#f5f3ff80}@supports (color:color-mix(in lab,red,red)){.via-sky-50\/50{--tw-gradient-via:color-mix(in oklab, var(--color-violet-50) 50%, transparent)}}.via-sky-50\/50{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-sky-400\/30{--tw-gradient-via:#a685ff4d}@supports (color:color-mix(in lab,red,red)){.via-sky-400\/30{--tw-gradient-via:color-mix(in oklab, var(--color-violet-400) 30%, transparent)}}.via-sky-400\/30{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-sky-400\/50{--tw-gradient-via:#a685ff80}@supports (color:color-mix(in lab,red,red)){.via-sky-400\/50{--tw-gradient-via:color-mix(in oklab, var(--color-violet-400) 50%, transparent)}}.via-sky-400\/50{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-sky-500{--tw-gradient-via:var(--color-violet-500);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-teal-500\/10{--tw-gradient-via:#00baa71a}@supports (color:color-mix(in lab,red,red)){.via-teal-500\/10{--tw-gradient-via:color-mix(in oklab, var(--color-teal-500) 10%, transparent)}}.via-teal-500\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\/15{--tw-gradient-via:#ffffff26}@supports (color:color-mix(in lab,red,red)){.via-white\/15{--tw-gradient-via:color-mix(in oklab, var(--color-white) 15%, transparent)}}.via-white\/15{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\/30{--tw-gradient-via:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.via-white\/30{--tw-gradient-via:color-mix(in oklab, var(--color-white) 30%, transparent)}}.via-white\/30{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\/40{--tw-gradient-via:#fff6}@supports (color:color-mix(in lab,red,red)){.via-white\/40{--tw-gradient-via:color-mix(in oklab, var(--color-white) 40%, transparent)}}.via-white\/40{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.\!to-\[\#1FA7E1\]{--tw-gradient-to:#1fa7e1!important;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))!important}.to-\[\#1FA7E1\]{--tw-gradient-to:#1fa7e1;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#6ED1CF\]\/18{--tw-gradient-to:oklab(80.0346% -.0906707 -.0221346/.18);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#8a5cc0\]{--tw-gradient-to:#8a5cc0;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#40a794\]{--tw-gradient-to:#40a794;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#71ad62\]{--tw-gradient-to:#71ad62;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#75D06A\]{--tw-gradient-to:#75d06a;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#126b84\]{--tw-gradient-to:#126b84;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#7274ED\]{--tw-gradient-to:#7274ed;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#9956DE\]{--tw-gradient-to:#9956de;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#FF8B8B\]{--tw-gradient-to:#ff8b8b;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#FF8C00\]{--tw-gradient-to:#ff8c00;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#FFB356\]{--tw-gradient-to:#ffb356;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#ce5e53\]{--tw-gradient-to:#ce5e53;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#d46895\]{--tw-gradient-to:#d46895;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#e0983a\]{--tw-gradient-to:#e0983a;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-50{--tw-gradient-to:var(--color-amber-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-600{--tw-gradient-to:var(--color-amber-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-600\/5{--tw-gradient-to:#dd74000d}@supports (color:color-mix(in lab,red,red)){.to-amber-600\/5{--tw-gradient-to:color-mix(in oklab, var(--color-amber-600) 5%, transparent)}}.to-amber-600\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-blue-600{--tw-gradient-to:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-cyan-50{--tw-gradient-to:var(--color-cyan-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-cyan-100{--tw-gradient-to:var(--color-cyan-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-cyan-500{--tw-gradient-to:var(--color-cyan-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-600{--tw-gradient-to:var(--color-emerald-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-600\/5{--tw-gradient-to:#0097670d}@supports (color:color-mix(in lab,red,red)){.to-emerald-600\/5{--tw-gradient-to:color-mix(in oklab, var(--color-emerald-600) 5%, transparent)}}.to-emerald-600\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-fuchsia-500{--tw-gradient-to:var(--color-fuchsia-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-indigo-400{--tw-gradient-to:var(--color-indigo-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-indigo-600{--tw-gradient-to:var(--color-indigo-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-indigo-600\/5{--tw-gradient-to:#4f39f60d}@supports (color:color-mix(in lab,red,red)){.to-indigo-600\/5{--tw-gradient-to:color-mix(in oklab, var(--color-indigo-600) 5%, transparent)}}.to-indigo-600\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-indigo-700{--tw-gradient-to:var(--color-indigo-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-50{--tw-gradient-to:var(--color-orange-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-100{--tw-gradient-to:var(--color-orange-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-400{--tw-gradient-to:var(--color-orange-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-500{--tw-gradient-to:var(--color-orange-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-600{--tw-gradient-to:var(--color-orange-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-pink-400\/20{--tw-gradient-to:#fb64b633}@supports (color:color-mix(in lab,red,red)){.to-pink-400\/20{--tw-gradient-to:color-mix(in oklab, var(--color-pink-400) 20%, transparent)}}.to-pink-400\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-pink-500{--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-50{--tw-gradient-to:var(--color-purple-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-500{--tw-gradient-to:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-600{--tw-gradient-to:var(--color-purple-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-600\/5{--tw-gradient-to:#9810fa0d}@supports (color:color-mix(in lab,red,red)){.to-purple-600\/5{--tw-gradient-to:color-mix(in oklab, var(--color-purple-600) 5%, transparent)}}.to-purple-600\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-700{--tw-gradient-to:var(--color-purple-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-red-500{--tw-gradient-to:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-rose-500{--tw-gradient-to:var(--color-rose-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-rose-600{--tw-gradient-to:var(--color-rose-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-400{--tw-gradient-to:var(--color-violet-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-500{--tw-gradient-to:var(--color-violet-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-600{--tw-gradient-to:var(--color-violet-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-600\/5{--tw-gradient-to:#7f22fe0d}@supports (color:color-mix(in lab,red,red)){.to-sky-600\/5{--tw-gradient-to:color-mix(in oklab, var(--color-violet-600) 5%, transparent)}}.to-sky-600\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-slate-50{--tw-gradient-to:var(--color-slate-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-slate-100{--tw-gradient-to:var(--color-slate-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-slate-300{--tw-gradient-to:var(--color-slate-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-teal-300{--tw-gradient-to:var(--color-teal-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-teal-500{--tw-gradient-to:var(--color-teal-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-teal-600{--tw-gradient-to:var(--color-teal-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-violet-700{--tw-gradient-to:var(--color-violet-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-white{--tw-gradient-to:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-white\/0{--tw-gradient-to:#0000}@supports (color:color-mix(in lab,red,red)){.to-white\/0{--tw-gradient-to:color-mix(in oklab, var(--color-white) 0%, transparent)}}.to-white\/0{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.\[background-size\:var\(--beam-size\)_var\(--beam-size\)\]{background-size:var(--beam-size) var(--beam-size)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-amber-300{fill:var(--color-amber-300)}.fill-blue-500{fill:var(--color-blue-500)}.fill-current{fill:currentColor}.fill-primary{fill:var(--primary)}.fill-white{fill:var(--color-white)}.fill-yellow-300{fill:var(--color-yellow-300)}.stroke-\[2\.5\]{stroke-width:2.5px}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.object-bottom{object-position:bottom}.p-0{padding:calc(var(--spacing) * 0)}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-7{padding:calc(var(--spacing) * 7)}.p-8{padding:calc(var(--spacing) * 8)}.p-10{padding:calc(var(--spacing) * 10)}.p-12{padding:calc(var(--spacing) * 12)}.p-\[3px\]{padding:3px}.p-px{padding:1px}.px-0\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-0{padding-top:calc(var(--spacing) * 0)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-1\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pr-0{padding-right:calc(var(--spacing) * 0)}.pr-1{padding-right:calc(var(--spacing) * 1)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-2\.5{padding-right:calc(var(--spacing) * 2.5)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pr-11{padding-right:calc(var(--spacing) * 11)}.pr-20{padding-right:calc(var(--spacing) * 20)}.pr-40{padding-right:calc(var(--spacing) * 40)}.pr-\[60px\]{padding-right:60px}.pb-0{padding-bottom:calc(var(--spacing) * 0)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pb-24{padding-bottom:calc(var(--spacing) * 24)}.pb-28{padding-bottom:calc(var(--spacing) * 28)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.pl-10{padding-left:calc(var(--spacing) * 10)}.pl-11{padding-left:calc(var(--spacing) * 11)}.pl-16{padding-left:calc(var(--spacing) * 16)}.pl-\[18px\]{padding-left:18px}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.8rem\]{font-size:.8rem}.text-\[6px\]{font-size:6px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.text-\[18px\]{font-size:18px}.text-\[20px\]{font-size:20px}.text-\[22px\]{font-size:22px}.text-\[24px\]{font-size:24px}.text-\[36px\]{font-size:36px}.text-\[40px\]{font-size:40px}.text-\[50px\]{font-size:50px}.text-\[60px\]{font-size:60px}.text-\[80px\]{font-size:80px}.text-\[140px\]{font-size:140px}.leading-\[1\.1\]{--tw-leading:1.1;line-height:1.1}.leading-\[1\.7\]{--tw-leading:1.7;line-height:1.7}.leading-\[1\.45\]{--tw-leading:1.45;line-height:1.45}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[-0\.02em\]{--tw-tracking:-.02em;letter-spacing:-.02em}.tracking-\[0\.1em\]{--tw-tracking:.1em;letter-spacing:.1em}.tracking-\[0\.2em\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\[0\.3px\]{--tw-tracking:.3px;letter-spacing:.3px}.tracking-\[0\.12em\]{--tw-tracking:.12em;letter-spacing:.12em}.tracking-\[0\.14em\]{--tw-tracking:.14em;letter-spacing:.14em}.tracking-\[0\.15em\]{--tw-tracking:.15em;letter-spacing:.15em}.tracking-\[0\.16em\]{--tw-tracking:.16em;letter-spacing:.16em}.tracking-\[0\.18em\]{--tw-tracking:.18em;letter-spacing:.18em}.tracking-\[0\.25em\]{--tw-tracking:.25em;letter-spacing:.25em}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.\!text-\[\#1FA7E1\]{color:#1fa7e1!important}.\!text-white{color:var(--color-white)!important}.text-\[\#0a1628\]{color:#0a1628}.text-\[\#1E293B\]{color:#1e293b}.text-\[\#1FA7E1\]{color:#1fa7e1}.text-\[\#2E7D32\]{color:#2e7d32}.text-\[\#2e2b5e\]{color:#2e2b5e}.text-\[\#3E8538\]{color:#3e8538}.text-\[\#3c4043\]{color:#3c4043}.text-\[\#4D9F46\]{color:#4d9f46}.text-\[\#5E3388\]{color:#5e3388}.text-\[\#5E3388\]\/80{color:#5e3388cc}.text-\[\#5a6578\]{color:#5a6578}.text-\[\#5f6368\]{color:#5f6368}.text-\[\#6ED1CF\]{color:#6ed1cf}.text-\[\#7A44B3\]{color:#7a44b3}.text-\[\#7C3AED\]{color:#7c3aed}.text-\[\#7b8798\]{color:#7b8798}.text-\[\#7eafbe\]{color:#7eafbe}.text-\[\#7ec16d\]{color:#7ec16d}.text-\[\#8A1A1A\]{color:#8a1a1a}.text-\[\#8A3FD3\]{color:#8a3fd3}.text-\[\#8a7fbc\]{color:#8a7fbc}.text-\[\#8f5ae2\]{color:#8f5ae2}.text-\[\#9b51e0\]{color:#9b51e0}.text-\[\#35a8bc\]\/10{color:#35a8bc1a}.text-\[\#75D06A\]{color:#75d06a}.text-\[\#141b2d\]{color:#141b2d}.text-\[\#319ab4\]{color:#319ab4}.text-\[\#6620a2\]{color:#6620a2}.text-\[\#7274ED\]{color:#7274ed}.text-\[\#9956DE\]{color:#9956de}.text-\[\#36326e\]{color:#36326e}.text-\[\#202124\]{color:#202124}.text-\[\#334155\]{color:#334155}.text-\[\#A56D29\]{color:#a56d29}.text-\[\#A74B50\]{color:#a74b50}.text-\[\#C65E63\]{color:#c65e63}.text-\[\#CC8A37\]{color:#cc8a37}.text-\[\#D66A6A\]{color:#d66a6a}.text-\[\#EAFBFF\]{color:#eafbff}.text-\[\#F1E4FF\]{color:#f1e4ff}.text-\[\#F08386\]{color:#f08386}.text-\[\#FF8B8B\]{color:#ff8b8b}.text-\[\#FFB356\]{color:#ffb356}.text-\[\#a0aec0\]{color:#a0aec0}.text-\[\#a3b1ee\]{color:#a3b1ee}.text-\[\#a06aec\]\/10{color:#a06aec1a}.text-\[\#a8a5b3\]{color:#a8a5b3}.text-\[\#baa4df\]{color:#baa4df}.text-\[\#c2cad8\]{color:#c2cad8}.text-\[\#d1abff\]{color:#d1abff}.text-\[\#d1cec6\]{color:#d1cec6}.text-\[\#d2a893\]{color:#d2a893}.text-\[\#d05c54\]{color:#d05c54}.text-\[\#db734b\]{color:#db734b}.text-\[\#dd9a9a\]{color:#dd9a9a}.text-\[\#dde3eb\]{color:#dde3eb}.text-\[\#df655a\]\/10{color:#df655a1a}.text-\[\#e87a42\]\/10{color:#e87a421a}.text-\[\#edf1f7\]{color:#edf1f7}.text-\[\#f8fafc\]{color:#f8fafc}.text-\[\#fcd34d\]{color:#fcd34d}.text-\[\#fde047\]{color:#fde047}.text-\[var\(--chart-1\)\]{color:var(--chart-1)}.text-\[var\(--chart-2\)\]{color:var(--chart-2)}.text-\[var\(--chart-3\)\]{color:var(--chart-3)}.text-\[var\(--chart-4\)\]{color:var(--chart-4)}.text-\[var\(--primary\)\]{color:var(--primary)}.text-accent-foreground{color:var(--accent-foreground)}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-amber-800\/80{color:#953d00cc}@supports (color:color-mix(in lab,red,red)){.text-amber-800\/80{color:color-mix(in oklab,var(--color-amber-800) 80%,transparent)}}.text-amber-900{color:var(--color-amber-900)}.text-amber-900\/80{color:#7b3306cc}@supports (color:color-mix(in lab,red,red)){.text-amber-900\/80{color:color-mix(in oklab,var(--color-amber-900) 80%,transparent)}}.text-amber-900\/85{color:#7b3306d9}@supports (color:color-mix(in lab,red,red)){.text-amber-900\/85{color:color-mix(in oklab,var(--color-amber-900) 85%,transparent)}}.text-black\/25{color:#00000040}@supports (color:color-mix(in lab,red,red)){.text-black\/25{color:color-mix(in oklab,var(--color-black) 25%,transparent)}}.text-blue-200{color:var(--color-blue-200)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-cyan-100{color:var(--color-cyan-100)}.text-cyan-200{color:var(--color-cyan-200)}.text-destructive{color:var(--destructive)}.text-emerald-100{color:var(--color-emerald-100)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-500\/70{color:#00bb7fb3}@supports (color:color-mix(in lab,red,red)){.text-emerald-500\/70{color:color-mix(in oklab,var(--color-emerald-500) 70%,transparent)}}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-800{color:var(--color-emerald-800)}.text-emerald-800\/80{color:#005f46cc}@supports (color:color-mix(in lab,red,red)){.text-emerald-800\/80{color:color-mix(in oklab,var(--color-emerald-800) 80%,transparent)}}.text-emerald-900{color:var(--color-emerald-900)}.text-emerald-950{color:var(--color-emerald-950)}.text-foreground{color:var(--foreground)}.text-gray-200{color:var(--color-gray-200)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-green-400{color:var(--color-green-400)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-800{color:var(--color-green-800)}.text-indigo-400{color:var(--color-indigo-400)}.text-indigo-500{color:var(--color-indigo-500)}.text-indigo-600{color:var(--color-indigo-600)}.text-indigo-700{color:var(--color-indigo-700)}.text-indigo-800{color:var(--color-indigo-800)}.text-indigo-800\/80{color:#372aaccc}@supports (color:color-mix(in lab,red,red)){.text-indigo-800\/80{color:color-mix(in oklab,var(--color-indigo-800) 80%,transparent)}}.text-indigo-900{color:var(--color-indigo-900)}.text-muted-foreground,.text-muted-foreground\/40{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/40{color:color-mix(in oklab,var(--muted-foreground) 40%,transparent)}}.text-muted-foreground\/60{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,var(--muted-foreground) 60%,transparent)}}.text-orange-300{color:var(--color-orange-300)}.text-orange-400{color:var(--color-orange-400)}.text-orange-500{color:var(--color-orange-500)}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-pink-500{color:var(--color-pink-500)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-purple-200{color:var(--color-purple-200)}.text-purple-500{color:var(--color-purple-500)}.text-purple-600{color:var(--color-purple-600)}.text-purple-600\/80{color:#9810facc}@supports (color:color-mix(in lab,red,red)){.text-purple-600\/80{color:color-mix(in oklab,var(--color-purple-600) 80%,transparent)}}.text-purple-700{color:var(--color-purple-700)}.text-purple-800{color:var(--color-purple-800)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-red-900{color:var(--color-red-900)}.text-rose-100{color:var(--color-rose-100)}.text-rose-200{color:var(--color-rose-200)}.text-rose-300{color:var(--color-rose-300)}.text-rose-400{color:var(--color-rose-400)}.text-rose-500{color:var(--color-rose-500)}.text-rose-600{color:var(--color-rose-600)}.text-rose-700{color:var(--color-rose-700)}.text-rose-800{color:var(--color-rose-800)}.text-rose-900{color:var(--color-rose-900)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-sidebar-foreground,.text-sidebar-foreground\/70{color:var(--sidebar-foreground)}@supports (color:color-mix(in lab,red,red)){.text-sidebar-foreground\/70{color:color-mix(in oklab,var(--sidebar-foreground) 70%,transparent)}}.text-sky-100{color:var(--color-violet-100)}.text-sky-200{color:var(--color-violet-200)}.text-sky-300{color:var(--color-violet-300)}.text-sky-400{color:var(--color-violet-400)}.text-sky-500{color:var(--color-violet-500)}.text-sky-600{color:var(--color-violet-600)}.text-sky-600\/80{color:#7f22fecc}@supports (color:color-mix(in lab,red,red)){.text-sky-600\/80{color:color-mix(in oklab,var(--color-violet-600) 80%,transparent)}}.text-sky-700{color:var(--color-violet-700)}.text-sky-800{color:var(--color-violet-800)}.text-sky-900{color:var(--color-violet-900)}.text-slate-100{color:var(--color-slate-100)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-400\/80{color:#90a1b9cc}@supports (color:color-mix(in lab,red,red)){.text-slate-400\/80{color:color-mix(in oklab,var(--color-slate-400) 80%,transparent)}}.text-slate-500{color:var(--color-slate-500)}.text-slate-500\/60{color:#62748e99}@supports (color:color-mix(in lab,red,red)){.text-slate-500\/60{color:color-mix(in oklab,var(--color-slate-500) 60%,transparent)}}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-teal-400{color:var(--color-teal-400)}.text-teal-500{color:var(--color-teal-500)}.text-teal-600{color:var(--color-teal-600)}.text-teal-700{color:var(--color-teal-700)}.text-transparent{color:#0000}.text-violet-300{color:var(--color-violet-300)}.text-violet-400{color:var(--color-violet-400)}.text-violet-500{color:var(--color-violet-500)}.text-violet-600{color:var(--color-violet-600)}.text-violet-700{color:var(--color-violet-700)}.text-white{color:var(--color-white)}.text-white\/5{color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.text-white\/5{color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.text-white\/10{color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.text-white\/10{color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.text-white\/20{color:#fff3}@supports (color:color-mix(in lab,red,red)){.text-white\/20{color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.text-white\/25{color:#ffffff40}@supports (color:color-mix(in lab,red,red)){.text-white\/25{color:color-mix(in oklab,var(--color-white) 25%,transparent)}}.text-white\/30{color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.text-white\/30{color:color-mix(in oklab,var(--color-white) 30%,transparent)}}.text-white\/40{color:#fff6}@supports (color:color-mix(in lab,red,red)){.text-white\/40{color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.text-white\/50{color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.text-white\/50{color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.text-white\/65{color:#ffffffa6}@supports (color:color-mix(in lab,red,red)){.text-white\/65{color:color-mix(in oklab,var(--color-white) 65%,transparent)}}.text-white\/70{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.text-white\/70{color:color-mix(in oklab,var(--color-white) 70%,transparent)}}.text-white\/80{color:#fffc}@supports (color:color-mix(in lab,red,red)){.text-white\/80{color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.text-white\/85{color:#ffffffd9}@supports (color:color-mix(in lab,red,red)){.text-white\/85{color:color-mix(in oklab,var(--color-white) 85%,transparent)}}.text-white\/90{color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.text-white\/90{color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.text-white\/95{color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.text-white\/95{color:color-mix(in oklab,var(--color-white) 95%,transparent)}}.text-yellow-300{color:var(--color-yellow-300)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-700{color:var(--color-yellow-700)}.text-yellow-800{color:var(--color-yellow-800)}.text-zinc-700{color:var(--color-zinc-700)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-slate-400{-webkit-text-decoration-color:var(--color-slate-400);text-decoration-color:var(--color-slate-400)}.underline-offset-4{text-underline-offset:4px}.accent-violet-500{accent-color:var(--color-violet-500)}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-20{opacity:.2}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-65{opacity:.65}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.opacity-95{opacity:.95}.opacity-100{opacity:1}.opacity-\[0\.2\]{opacity:.2}.opacity-\[0\.03\]{opacity:.03}.opacity-\[0\.15\]{opacity:.15}.mix-blend-multiply{mix-blend-mode:multiply}.mix-blend-overlay{mix-blend-mode:overlay}.mix-blend-plus-lighter{mix-blend-mode:plus-lighter}.mix-blend-screen{mix-blend-mode:screen}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_-10px_30px_rgba\(0\,0\,0\,0\.1\)\]{--tw-shadow:0 -10px 30px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_-10px_40px_rgba\(0\,0\,0\,0\.15\)\]{--tw-shadow:0 -10px 40px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_0_1px_hsl\(var\(--sidebar-border\)\)\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,hsl(var(--sidebar-border)));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_0_2px_rgba\(251\,113\,133\,0\.45\)\,0_6px_0_rgba\(127\,29\,29\,1\)\]{--tw-shadow:0 0 0 2px var(--tw-shadow-color,#fb718573), 0 6px 0 var(--tw-shadow-color,#7f1d1d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_8px_rgba\(255\,255\,255\,0\.8\)\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#fffc);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_10px_rgba\(16\,185\,129\,0\.15\)\]{--tw-shadow:0 0 10px var(--tw-shadow-color,#10b98126);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_10px_rgba\(250\,204\,21\,0\.6\)\]{--tw-shadow:0 0 10px var(--tw-shadow-color,#facc1599);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_10px_rgba\(251\,146\,60\,0\.5\)\]{--tw-shadow:0 0 10px var(--tw-shadow-color,#fb923c80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_10px_rgba\(251\,191\,36\,0\.5\)\]{--tw-shadow:0 0 10px var(--tw-shadow-color,#fbbf2480);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_10px_rgba\(251\,191\,36\,0\.6\)\]{--tw-shadow:0 0 10px var(--tw-shadow-color,#fbbf2499);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_10px_rgba\(251\,191\,36\,0\.8\)\]{--tw-shadow:0 0 10px var(--tw-shadow-color,#fbbf24cc);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_14px_rgba\(16\,185\,129\,0\.25\)\]{--tw-shadow:0 0 14px var(--tw-shadow-color,#10b98140);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_14px_rgba\(148\,163\,184\,0\.2\)\]{--tw-shadow:0 0 14px var(--tw-shadow-color,#94a3b833);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(16\,185\,129\,0\.2\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#10b98133);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(99\,102\,241\,0\.2\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#6366f133);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(245\,158\,11\,0\.2\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#f59e0b33);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(251\,191\,36\,0\.25\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#fbbf2440);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_16px_rgba\(249\,115\,22\,0\.3\)\]{--tw-shadow:0 0 16px var(--tw-shadow-color,#f973164d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_18px_rgba\(251\,191\,36\,0\.35\)\]{--tw-shadow:0 0 18px var(--tw-shadow-color,#fbbf2459);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_18px_rgba\(255\,139\,139\,0\.6\)\]{--tw-shadow:0 0 18px var(--tw-shadow-color,#ff8b8b99);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_18px_rgba\(255\,179\,86\,0\.6\)\]{--tw-shadow:0 0 18px var(--tw-shadow-color,#ffb35699);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_20px_rgba\(251\,191\,36\,0\.3\)\]{--tw-shadow:0 0 20px var(--tw-shadow-color,#fbbf244d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_24px_rgba\(250\,204\,21\,0\.6\)\]{--tw-shadow:0 0 24px var(--tw-shadow-color,#facc1599);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_40px_-10px_rgba\(16\,185\,129\,0\.2\)\]{--tw-shadow:0 0 40px -10px var(--tw-shadow-color,#10b98133);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_40px_-10px_rgba\(31\,167\,225\,0\.2\)\]{--tw-shadow:0 0 40px -10px var(--tw-shadow-color,#1fa7e133);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_40px_-10px_rgba\(99\,102\,241\,0\.2\)\]{--tw-shadow:0 0 40px -10px var(--tw-shadow-color,#6366f133);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_40px_-10px_rgba\(138\,63\,211\,0\.2\)\]{--tw-shadow:0 0 40px -10px var(--tw-shadow-color,#8a3fd333);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_40px_-10px_rgba\(245\,158\,11\,0\.2\)\]{--tw-shadow:0 0 40px -10px var(--tw-shadow-color,#f59e0b33);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_2px_15px_-3px_rgba\(0\,0\,0\,0\.1\)\]{--tw-shadow:0 2px 15px -3px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_4px_8px_rgba\(0\,0\,0\,0\.3\)\]{--tw-shadow:0 4px 8px var(--tw-shadow-color,#0000004d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_5px_12px_rgba\(0\,0\,0\,0\.4\)\]{--tw-shadow:0 5px 12px var(--tw-shadow-color,#0006);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_6px_0_rgba\(5\,150\,105\,1\)\]{--tw-shadow:0 6px 0 var(--tw-shadow-color,#059669);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_6px_0_rgba\(15\,20\,30\,0\.5\)\]{--tw-shadow:0 6px 0 var(--tw-shadow-color,#0f141e80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_6px_0_rgba\(79\,70\,229\,1\)\]{--tw-shadow:0 6px 0 var(--tw-shadow-color,#4f46e5);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_6px_0_rgba\(225\,29\,72\,1\)\]{--tw-shadow:0 6px 0 var(--tw-shadow-color,#e11d48);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_16px_rgba\(0\,0\,0\,0\.15\)\]{--tw-shadow:0 8px 16px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_16px_rgba\(18\,25\,43\,0\.3\)\]{--tw-shadow:0 8px 16px var(--tw-shadow-color,#12192b4d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_20px_-8px_rgba\(79\,70\,229\,0\.5\)\]{--tw-shadow:0 8px 20px -8px var(--tw-shadow-color,#4f46e580);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_24px_-10px_rgba\(0\,0\,0\,0\.05\)\]{--tw-shadow:0 8px 24px -10px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_30px_-12px_rgba\(0\,0\,0\,0\.06\)\]{--tw-shadow:0 8px 30px -12px var(--tw-shadow-color,#0000000f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_30px_rgb\(0\,0\,0\,0\.04\)\]{--tw-shadow:0 8px 30px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_30px_rgba\(0\,0\,0\,0\.5\)\]{--tw-shadow:0 8px 30px var(--tw-shadow-color,#00000080);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_30px_rgba\(31\,167\,225\,0\.2\)\]{--tw-shadow:0 8px 30px var(--tw-shadow-color,#1fa7e133);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_30px_rgba\(59\,58\,130\,0\.3\)\]{--tw-shadow:0 8px 30px var(--tw-shadow-color,#3b3a824d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_30px_rgba\(138\,63\,211\,0\.2\)\]{--tw-shadow:0 8px 30px var(--tw-shadow-color,#8a3fd333);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_10px_40px_-10px_rgba\(0\,0\,0\,0\.15\)\]{--tw-shadow:0 10px 40px -10px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_10px_40px_rgba\(0\,0\,0\,0\.2\)\]{--tw-shadow:0 10px 40px var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_10px_40px_rgba\(0\,0\,0\,0\.3\)\]{--tw-shadow:0 10px 40px var(--tw-shadow-color,#0000004d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_12px_25px_rgba\(0\,0\,0\,0\.08\)\]{--tw-shadow:0 12px 25px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_12px_30px_-10px_rgba\(79\,70\,229\,0\.5\)\]{--tw-shadow:0 12px 30px -10px var(--tw-shadow-color,#4f46e580);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_15px_25px_rgba\(0\,0\,0\,0\.4\)\]{--tw-shadow:0 15px 25px var(--tw-shadow-color,#0006);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_18px_30px_-20px_rgba\(0\,0\,0\,0\.45\)\]{--tw-shadow:0 18px 30px -20px var(--tw-shadow-color,#00000073);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_20px_30px_rgba\(0\,0\,0\,0\.5\)\]{--tw-shadow:0 20px 30px var(--tw-shadow-color,#00000080);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_20px_40px_-15px_rgba\(0\,0\,0\,0\.3\)\]{--tw-shadow:0 20px 40px -15px var(--tw-shadow-color,#0000004d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_20px_45px_-15px_rgba\(0\,0\,0\,0\.3\)\]{--tw-shadow:0 20px 45px -15px var(--tw-shadow-color,#0000004d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_20px_50px_rgba\(0\,0\,0\,0\.5\)\]{--tw-shadow:0 20px 50px var(--tw-shadow-color,#00000080);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_20px_50px_rgba\(15\,20\,34\,0\.2\)\]{--tw-shadow:0 20px 50px var(--tw-shadow-color,#0f142233);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_20px_60px_-15px_rgba\(168\,85\,247\,0\.15\)\]{--tw-shadow:0 20px 60px -15px var(--tw-shadow-color,#a855f726);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_20px_60px_rgba\(0\,0\,0\,0\.4\)\]{--tw-shadow:0 20px 60px var(--tw-shadow-color,#0006);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_25px_60px_rgba\(0\,0\,0\,0\.15\)\]{--tw-shadow:0 25px 60px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_30px_80px_rgba\(0\,0\,0\,0\.6\)\]{--tw-shadow:0 30px 80px var(--tw-shadow-color,#0009);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_30px_80px_rgba\(0\,0\,0\,0\.8\)\]{--tw-shadow:0 30px 80px var(--tw-shadow-color,#000c);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_30px_80px_rgba\(0\,0\,0\,0\.15\)\]{--tw-shadow:0 30px 80px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_-4px_6px_rgba\(0\,0\,0\,0\.05\)\,0_4px_6px_rgba\(0\,0\,0\,0\.05\)\]{--tw-shadow:inset 0 -4px 6px var(--tw-shadow-color,#0000000d), 0 4px 6px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_2px_4px_rgba\(0\,0\,0\,0\.05\)\]{--tw-shadow:inset 0 2px 4px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_2px_4px_rgba\(255\,255\,255\,0\.1\)\,_inset_0_-4px_4px_rgba\(0\,0\,0\,0\.2\)\]{--tw-shadow:inset 0 2px 4px var(--tw-shadow-color,#ffffff1a), inset 0 -4px 4px var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_6px_15px_rgba\(255\,255\,255\,0\.4\)\]{--tw-shadow:inset 0 6px 15px var(--tw-shadow-color,#fff6);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-4,.ring-\[4px\]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[\#1FA7E1\]\/20{--tw-shadow-color:#1fa7e133}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#1FA7E1\]\/20{--tw-shadow-color:color-mix(in oklab, oklab(68.7044% -.0807821 -.10979/.2) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#1FA7E1\]\/30{--tw-shadow-color:#1fa7e14d}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#1FA7E1\]\/30{--tw-shadow-color:color-mix(in oklab, oklab(68.7044% -.0807821 -.10979/.3) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#1FA7E1\]\/40{--tw-shadow-color:#1fa7e166}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#1FA7E1\]\/40{--tw-shadow-color:color-mix(in oklab, oklab(68.7044% -.0807821 -.10979/.4) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#8A3FD3\]\/30{--tw-shadow-color:#8a3fd34d}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#8A3FD3\]\/30{--tw-shadow-color:color-mix(in oklab, oklab(54.1025% .117281 -.181162/.3) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#8A3FD3\]\/40{--tw-shadow-color:#8a3fd366}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#8A3FD3\]\/40{--tw-shadow-color:color-mix(in oklab, oklab(54.1025% .117281 -.181162/.4) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#8B5CF6\]\/20{--tw-shadow-color:#8b5cf633}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#8B5CF6\]\/20{--tw-shadow-color:color-mix(in oklab, oklab(60.5631% .0845415 -.201932/.2) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#75D06A\]\/30{--tw-shadow-color:#75d06a4d}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#75D06A\]\/30{--tw-shadow-color:color-mix(in oklab, oklab(77.7281% -.128439 .101669/.3) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#9956DE\]\/20{--tw-shadow-color:#9956de33}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#9956DE\]\/20{--tw-shadow-color:color-mix(in oklab, oklab(59.4745% .111053 -.167638/.2) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#9956DE\]\/30{--tw-shadow-color:#9956de4d}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#9956DE\]\/30{--tw-shadow-color:color-mix(in oklab, oklab(59.4745% .111053 -.167638/.3) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#FB96BB\]\/30{--tw-shadow-color:#fb96bb4d}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#FB96BB\]\/30{--tw-shadow-color:color-mix(in oklab, oklab(78.801% .12777 -.00670064/.3) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#FF8B8B\]\/30{--tw-shadow-color:#ff8b8b4d}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#FF8B8B\]\/30{--tw-shadow-color:color-mix(in oklab, oklab(76.3223% .131566 .050208/.3) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#FFB356\]\/30{--tw-shadow-color:#ffb3564d}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#FFB356\]\/30{--tw-shadow-color:color-mix(in oklab, oklab(82.2219% .0499055 .130321/.3) var(--tw-shadow-alpha), transparent)}}.shadow-\[rgba\(124\,58\,237\,0\.05\)_0px_0px_30px_inset\]{--tw-shadow-color:#7c3aed0d}@supports (color:color-mix(in lab,red,red)){.shadow-\[rgba\(124\,58\,237\,0\.05\)_0px_0px_30px_inset\]{--tw-shadow-color:color-mix(in oklab, #7c3aed0d 0px 0px 30px inset var(--tw-shadow-alpha), transparent)}}.shadow-purple-200{--tw-shadow-color:oklch(90.2% .063 306.703)}@supports (color:color-mix(in lab,red,red)){.shadow-purple-200{--tw-shadow-color:color-mix(in oklab, var(--color-purple-200) var(--tw-shadow-alpha), transparent)}}.shadow-purple-500\/20{--tw-shadow-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.shadow-purple-500\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-purple-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-purple-600\/25{--tw-shadow-color:#9810fa40}@supports (color:color-mix(in lab,red,red)){.shadow-purple-600\/25{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-purple-600) 25%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-900\/10{--tw-shadow-color:#82181a1a}@supports (color:color-mix(in lab,red,red)){.shadow-red-900\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-900) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-sky-200{--tw-shadow-color:oklch(89.4% .057 293.283)}@supports (color:color-mix(in lab,red,red)){.shadow-sky-200{--tw-shadow-color:color-mix(in oklab, var(--color-violet-200) var(--tw-shadow-alpha), transparent)}}.shadow-sky-500\/20{--tw-shadow-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.shadow-sky-500\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-violet-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-slate-900\/\[0\.04\]{--tw-shadow-color:#0f172b0a}@supports (color:color-mix(in lab,red,red)){.shadow-slate-900\/\[0\.04\]{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-slate-900) 4%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-\[\#1FA7E1\]\/35{--tw-ring-color:oklab(68.7044% -.0807821 -.10979/.35)}.ring-\[\#8B5CF6\]\/10{--tw-ring-color:oklab(60.5631% .0845415 -.201932/.1)}.ring-\[\#9956DE\]\/45{--tw-ring-color:oklab(59.4745% .111053 -.167638/.45)}.ring-\[\#9956DE\]\/50{--tw-ring-color:oklab(59.4745% .111053 -.167638/.5)}.ring-\[color-mix\(in_srgb\,var\(--chart-2\)_40\%\,transparent\)\]{--tw-ring-color:var(--chart-2)}@supports (color:color-mix(in lab,red,red)){.ring-\[color-mix\(in_srgb\,var\(--chart-2\)_40\%\,transparent\)\]{--tw-ring-color:color-mix(in srgb,var(--chart-2) 40%,transparent)}}.ring-\[color-mix\(in_srgb\,var\(--chart-3\)_40\%\,transparent\)\]{--tw-ring-color:var(--chart-3)}@supports (color:color-mix(in lab,red,red)){.ring-\[color-mix\(in_srgb\,var\(--chart-3\)_40\%\,transparent\)\]{--tw-ring-color:color-mix(in srgb,var(--chart-3) 40%,transparent)}}.ring-\[color-mix\(in_srgb\,var\(--chart-4\)_40\%\,transparent\)\]{--tw-ring-color:var(--chart-4)}@supports (color:color-mix(in lab,red,red)){.ring-\[color-mix\(in_srgb\,var\(--chart-4\)_40\%\,transparent\)\]{--tw-ring-color:color-mix(in srgb,var(--chart-4) 40%,transparent)}}.ring-green-300{--tw-ring-color:var(--color-green-300)}.ring-primary,.ring-primary\/40{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.ring-primary\/40{--tw-ring-color:color-mix(in oklab, var(--primary) 40%, transparent)}}.ring-red-300{--tw-ring-color:var(--color-red-300)}.ring-red-500{--tw-ring-color:var(--color-red-500)}.ring-ring\/50{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.ring-ring\/50{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.ring-rose-300{--tw-ring-color:var(--color-rose-300)}.ring-sidebar-ring{--tw-ring-color:var(--sidebar-ring)}.ring-sky-50{--tw-ring-color:var(--color-violet-50)}.ring-slate-200{--tw-ring-color:var(--color-slate-200)}.ring-white{--tw-ring-color:var(--color-white)}.ring-white\/10{--tw-ring-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.ring-white\/10{--tw-ring-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.ring-white\/20{--tw-ring-color:#fff3}@supports (color:color-mix(in lab,red,red)){.ring-white\/20{--tw-ring-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.ring-offset-\[4px\]{--tw-ring-offset-width:4px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.ring-offset-\[\#0B0F19\]{--tw-ring-offset-color:#0b0f19}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-2xl{--tw-blur:blur(var(--blur-2xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-3xl{--tw-blur:blur(var(--blur-3xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[1px\]{--tw-blur:blur(1px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[32px\]{--tw-blur:blur(32px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[60px\]{--tw-blur:blur(60px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[100px\]{--tw-blur:blur(100px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[120px\]{--tw-blur:blur(120px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[140px\]{--tw-blur:blur(140px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[160px\]{--tw-blur:blur(160px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-md{--tw-blur:blur(var(--blur-md));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-xl{--tw-blur:blur(var(--blur-xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.brightness-105{--tw-brightness:brightness(105%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.contrast-50{--tw-contrast:contrast(50%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-2xl{--tw-drop-shadow-size:drop-shadow(0 25px 25px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:drop-shadow(var(--drop-shadow-2xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[-2px_-2px_0px_white\]{--tw-drop-shadow-size:drop-shadow(-2px -2px 0px var(--tw-drop-shadow-color,white));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[-2px_2px_0px_white\]{--tw-drop-shadow-size:drop-shadow(-2px 2px 0px var(--tw-drop-shadow-color,white));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[-2px_3px_0px_rgba\(0\,0\,0\,0\.8\)\]{--tw-drop-shadow-size:drop-shadow(-2px 3px 0px var(--tw-drop-shadow-color,#000c));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[-3px_0px_0px_white\]{--tw-drop-shadow-size:drop-shadow(-3px 0px 0px var(--tw-drop-shadow-color,white));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_8px_rgba\(16\,185\,129\,0\.5\)\]{--tw-drop-shadow-size:drop-shadow(0 0 8px var(--tw-drop-shadow-color,#10b98180));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_8px_rgba\(31\,167\,225\,0\.5\)\]{--tw-drop-shadow-size:drop-shadow(0 0 8px var(--tw-drop-shadow-color,#1fa7e180));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_8px_rgba\(99\,102\,241\,0\.5\)\]{--tw-drop-shadow-size:drop-shadow(0 0 8px var(--tw-drop-shadow-color,#6366f180));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_8px_rgba\(138\,63\,211\,0\.5\)\]{--tw-drop-shadow-size:drop-shadow(0 0 8px var(--tw-drop-shadow-color,#8a3fd380));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_8px_rgba\(251\,191\,36\,0\.9\)\]{--tw-drop-shadow-size:drop-shadow(0 0 8px var(--tw-drop-shadow-color,#fbbf24e6));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_12px_rgba\(245\,158\,11\,0\.6\)\]{--tw-drop-shadow-size:drop-shadow(0 0 12px var(--tw-drop-shadow-color,#f59e0b99));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_12px_rgba\(250\,204\,21\,0\.9\)\]{--tw-drop-shadow-size:drop-shadow(0 0 12px var(--tw-drop-shadow-color,#facc15e6));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_12px_rgba\(255\,255\,255\,0\.4\)\]{--tw-drop-shadow-size:drop-shadow(0 0 12px var(--tw-drop-shadow-color,#fff6));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_15px_rgba\(253\,224\,71\,0\.6\)\]{--tw-drop-shadow-size:drop-shadow(0 0 15px var(--tw-drop-shadow-color,#fde04799));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_25px_rgba\(252\,211\,77\,0\.9\)\]{--tw-drop-shadow-size:drop-shadow(0 0 25px var(--tw-drop-shadow-color,#fcd34de6));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_10px_20px_rgba\(0\,0\,0\,0\.15\)\]{--tw-drop-shadow-size:drop-shadow(0 10px 20px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_12px_15px_rgba\(0\,0\,0\,0\.3\)\]{--tw-drop-shadow-size:drop-shadow(0 12px 15px var(--tw-drop-shadow-color,#0000004d));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_15px_15px_rgba\(0\,0\,0\,0\.3\)\]{--tw-drop-shadow-size:drop-shadow(0 15px 15px var(--tw-drop-shadow-color,#0000004d));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0px_-3px_0px_white\]{--tw-drop-shadow-size:drop-shadow(0px -3px 0px var(--tw-drop-shadow-color,white));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0px_3px_0px_white\]{--tw-drop-shadow-size:drop-shadow(0px 3px 0px var(--tw-drop-shadow-color,white));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[2px_-2px_0px_white\]{--tw-drop-shadow-size:drop-shadow(2px -2px 0px var(--tw-drop-shadow-color,white));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[2px_2px_0px_white\]{--tw-drop-shadow-size:drop-shadow(2px 2px 0px var(--tw-drop-shadow-color,white));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[3px_0px_0px_white\]{--tw-drop-shadow-size:drop-shadow(3px 0px 0px var(--tw-drop-shadow-color,white));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-lg{--tw-drop-shadow-size:drop-shadow(0 4px 4px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:drop-shadow(var(--drop-shadow-lg));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-md{--tw-drop-shadow-size:drop-shadow(0 3px 3px var(--tw-drop-shadow-color,#0000001f));--tw-drop-shadow:drop-shadow(var(--drop-shadow-md));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-sm{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:drop-shadow(var(--drop-shadow-sm));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-xl{--tw-drop-shadow-size:drop-shadow(0 9px 7px var(--tw-drop-shadow-color,#0000001a));--tw-drop-shadow:drop-shadow(var(--drop-shadow-xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.saturate-50{--tw-saturate:saturate(50%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-2xl{--tw-backdrop-blur:blur(var(--blur-2xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-\[1px\]{--tw-backdrop-blur:blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-\[2px\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[left\,right\,width\]{transition-property:left,right,width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[margin\,opacity\]{transition-property:margin,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\,height\,padding\]{transition-property:width,height,padding;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.delay-75{transition-delay:75ms}.duration-0{--tw-duration:0s;transition-duration:0s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.duration-1000{--tw-duration:1s;transition-duration:1s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-linear{--tw-ease:linear;transition-timing-function:linear}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\[-ms-overflow-style\:none\]{-ms-overflow-style:none}.\[animation-delay\:150ms\]{animation-delay:.15s}.\[animation-delay\:300ms\]{animation-delay:.3s}.\[background\:linear-gradient\(var\(--grid-color\)_0_1px\,_transparent_1px_var\(--beam-size\)\)_50\%_-0\.5px_\/var\(--beam-size\)_var\(--beam-size\)\,linear-gradient\(90deg\,_var\(--grid-color\)_0_1px\,_transparent_1px_var\(--beam-size\)\)_50\%_50\%_\/var\(--beam-size\)_var\(--beam-size\)\]{background:linear-gradient(var(--grid-color) 0 1px,transparent 1px var(--beam-size)) 50% -.5px /var(--beam-size) var(--beam-size),linear-gradient(90deg,var(--grid-color) 0 1px,transparent 1px var(--beam-size)) 50% 50% /var(--beam-size) var(--beam-size)}.\[background\:var\(--background\)\]{background:var(--background)}.\[clip-path\:inset\(0\)\]{clip-path:inset(0)}.\[perspective\:var\(--perspective\)\]{perspective:var(--perspective)}.\[scrollbar-width\:none\]{scrollbar-width:none}.\[transform-style\:preserve-3d\]{transform-style:preserve-3d}.ring-inset{--tw-ring-inset:inset}.group-open\:rotate-180:is(:where(.group):is([open],:popover-open,:open) *){rotate:180deg}.group-focus-within\/menu-item\:opacity-100:is(:where(.group\/menu-item):focus-within *){opacity:1}@media(hover:hover){.group-hover\:left-\[150\%\]:is(:where(.group):hover *){left:150%}.group-hover\:block:is(:where(.group):hover *){display:block}.group-hover\:-translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:-translate-x-1:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:translate-x-1:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:translate-x-4:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:-translate-y-1:is(:where(.group):hover *){--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:-translate-y-2:is(:where(.group):hover *){--tw-translate-y:calc(var(--spacing) * -2);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:-translate-y-4:is(:where(.group):hover *){--tw-translate-y:calc(var(--spacing) * -4);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:scale-110:is(:where(.group):hover *){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:scale-125:is(:where(.group):hover *){--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:scale-\[1\.3\]:is(:where(.group):hover *){scale:1.3}.group-hover\:-rotate-6:is(:where(.group):hover *){rotate:-6deg}.group-hover\:rotate-3:is(:where(.group):hover *){rotate:3deg}.group-hover\:rotate-12:is(:where(.group):hover *){rotate:12deg}.group-hover\:rotate-\[25deg\]:is(:where(.group):hover *){rotate:25deg}.group-hover\:animate-\[shimmer_1\.5s_ease-out\]:is(:where(.group):hover *){animation:1.5s ease-out shimmer}.group-hover\:border-amber-400:is(:where(.group):hover *){border-color:var(--color-amber-400)}.group-hover\:border-sky-300:is(:where(.group):hover *){border-color:var(--color-violet-300)}.group-hover\:border-r-amber-400:is(:where(.group):hover *){border-right-color:var(--color-amber-400)}.group-hover\:border-b-amber-400:is(:where(.group):hover *){border-bottom-color:var(--color-amber-400)}.group-hover\:bg-amber-50:is(:where(.group):hover *){background-color:var(--color-amber-50)}.group-hover\:bg-amber-100\/50:is(:where(.group):hover *){background-color:#fef3c680}@supports (color:color-mix(in lab,red,red)){.group-hover\:bg-amber-100\/50:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-amber-100) 50%,transparent)}}.group-hover\:bg-black\/20:is(:where(.group):hover *){background-color:#0003}@supports (color:color-mix(in lab,red,red)){.group-hover\:bg-black\/20:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.group-hover\:bg-slate-50:is(:where(.group):hover *){background-color:var(--color-slate-50)}.group-hover\:bg-slate-600:is(:where(.group):hover *){background-color:var(--color-slate-600)}.group-hover\:bg-slate-700:is(:where(.group):hover *){background-color:var(--color-slate-700)}.group-hover\:bg-white\/20:is(:where(.group):hover *){background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.group-hover\:bg-white\/20:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.group-hover\:bg-white\/30:is(:where(.group):hover *){background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.group-hover\:bg-white\/30:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-white) 30%,transparent)}}.group-hover\:p-2\.5:is(:where(.group):hover *){padding:calc(var(--spacing) * 2.5)}.group-hover\:text-\[\#9956DE\]:is(:where(.group):hover *){color:#9956de}.group-hover\:text-amber-500:is(:where(.group):hover *){color:var(--color-amber-500)}.group-hover\:text-primary:is(:where(.group):hover *){color:var(--primary)}.group-hover\:text-sky-500:is(:where(.group):hover *){color:var(--color-violet-500)}.group-hover\:text-sky-600:is(:where(.group):hover *){color:var(--color-violet-600)}.group-hover\:text-white:is(:where(.group):hover *){color:var(--color-white)}.group-hover\:opacity-90:is(:where(.group):hover *){opacity:.9}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\:shadow-\[0_24px_40px_-15px_rgba\(0\,0\,0\,0\.5\)\]:is(:where(.group):hover *){--tw-shadow:0 24px 40px -15px var(--tw-shadow-color,#00000080);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-hover\:duration-\[800ms\]:is(:where(.group):hover *){--tw-duration:.8s;transition-duration:.8s}.group-hover\/avatar\:scale-110:is(:where(.group\/avatar):hover *){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\/menu-item\:opacity-100:is(:where(.group\/menu-item):hover *){opacity:1}}.group-has-data-\[sidebar\=menu-action\]\/menu-item\:pr-8:is(:where(.group\/menu-item):has([data-sidebar=menu-action]) *){padding-right:calc(var(--spacing) * 8)}.group-data-\[collapsible\=icon\]\:-mt-8:is(:where(.group)[data-collapsible=icon] *){margin-top:calc(var(--spacing) * -8)}.group-data-\[collapsible\=icon\]\:hidden:is(:where(.group)[data-collapsible=icon] *){display:none}.group-data-\[collapsible\=icon\]\:size-8\!:is(:where(.group)[data-collapsible=icon] *){width:calc(var(--spacing) * 8)!important;height:calc(var(--spacing) * 8)!important}.group-data-\[collapsible\=icon\]\:w-\(--sidebar-width-icon\):is(:where(.group)[data-collapsible=icon] *){width:var(--sidebar-width-icon)}.group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)\+\(--spacing\(4\)\)\)\]:is(:where(.group)[data-collapsible=icon] *){width:calc(var(--sidebar-width-icon) + (calc(var(--spacing) * 4)))}.group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)\+\(--spacing\(4\)\)\+2px\)\]:is(:where(.group)[data-collapsible=icon] *){width:calc(var(--sidebar-width-icon) + (calc(var(--spacing) * 4)) + 2px)}.group-data-\[collapsible\=icon\]\:overflow-hidden:is(:where(.group)[data-collapsible=icon] *){overflow:hidden}.group-data-\[collapsible\=icon\]\:p-0\!:is(:where(.group)[data-collapsible=icon] *){padding:calc(var(--spacing) * 0)!important}.group-data-\[collapsible\=icon\]\:p-2\!:is(:where(.group)[data-collapsible=icon] *){padding:calc(var(--spacing) * 2)!important}.group-data-\[collapsible\=icon\]\:opacity-0:is(:where(.group)[data-collapsible=icon] *){opacity:0}.group-data-\[collapsible\=offcanvas\]\:right-\[calc\(var\(--sidebar-width\)\*-1\)\]:is(:where(.group)[data-collapsible=offcanvas] *){right:calc(var(--sidebar-width) * -1)}.group-data-\[collapsible\=offcanvas\]\:left-\[calc\(var\(--sidebar-width\)\*-1\)\]:is(:where(.group)[data-collapsible=offcanvas] *){left:calc(var(--sidebar-width) * -1)}.group-data-\[collapsible\=offcanvas\]\:w-0:is(:where(.group)[data-collapsible=offcanvas] *){width:calc(var(--spacing) * 0)}.group-data-\[collapsible\=offcanvas\]\:translate-x-0:is(:where(.group)[data-collapsible=offcanvas] *){--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.group-data-\[side\=left\]\:-right-4:is(:where(.group)[data-side=left] *){right:calc(var(--spacing) * -4)}.group-data-\[side\=left\]\:border-r:is(:where(.group)[data-side=left] *){border-right-style:var(--tw-border-style);border-right-width:1px}.group-data-\[side\=right\]\:left-0:is(:where(.group)[data-side=right] *){left:calc(var(--spacing) * 0)}.group-data-\[side\=right\]\:rotate-180:is(:where(.group)[data-side=right] *){rotate:180deg}.group-data-\[side\=right\]\:border-l:is(:where(.group)[data-side=right] *){border-left-style:var(--tw-border-style);border-left-width:1px}.group-data-\[state\=open\]\:rotate-180:is(:where(.group)[data-state=open] *){rotate:180deg}.group-data-\[variant\=floating\]\:rounded-lg:is(:where(.group)[data-variant=floating] *){border-radius:var(--radius)}.group-data-\[variant\=floating\]\:border:is(:where(.group)[data-variant=floating] *){border-style:var(--tw-border-style);border-width:1px}.group-data-\[variant\=floating\]\:border-sidebar-border:is(:where(.group)[data-variant=floating] *){border-color:var(--sidebar-border)}.group-data-\[variant\=floating\]\:shadow-sm:is(:where(.group)[data-variant=floating] *){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-data-\[vaul-drawer-direction\=bottom\]\/drawer-content\:block:is(:where(.group\/drawer-content)[data-vaul-drawer-direction=bottom] *){display:block}.group-data-\[viewport\=false\]\/navigation-menu\:top-full:is(:where(.group\/navigation-menu)[data-viewport=false] *){top:100%}.group-data-\[viewport\=false\]\/navigation-menu\:mt-1\.5:is(:where(.group\/navigation-menu)[data-viewport=false] *){margin-top:calc(var(--spacing) * 1.5)}.group-data-\[viewport\=false\]\/navigation-menu\:overflow-hidden:is(:where(.group\/navigation-menu)[data-viewport=false] *){overflow:hidden}.group-data-\[viewport\=false\]\/navigation-menu\:rounded-md:is(:where(.group\/navigation-menu)[data-viewport=false] *){border-radius:calc(var(--radius) - 2px)}.group-data-\[viewport\=false\]\/navigation-menu\:border:is(:where(.group\/navigation-menu)[data-viewport=false] *){border-style:var(--tw-border-style);border-width:1px}.group-data-\[viewport\=false\]\/navigation-menu\:bg-popover:is(:where(.group\/navigation-menu)[data-viewport=false] *){background-color:var(--popover)}.group-data-\[viewport\=false\]\/navigation-menu\:text-popover-foreground:is(:where(.group\/navigation-menu)[data-viewport=false] *){color:var(--popover-foreground)}.group-data-\[viewport\=false\]\/navigation-menu\:shadow:is(:where(.group\/navigation-menu)[data-viewport=false] *){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-data-\[viewport\=false\]\/navigation-menu\:duration-200:is(:where(.group\/navigation-menu)[data-viewport=false] *){--tw-duration:.2s;transition-duration:.2s}.peer-checked\:bg-\[\#5a6578\]:is(:where(.peer):checked~*){background-color:#5a6578}@media(hover:hover){.peer-hover\/menu-button\:text-sidebar-accent-foreground:is(:where(.peer\/menu-button):hover~*){color:var(--sidebar-accent-foreground)}}.peer-focus\:outline-none:is(:where(.peer):focus~*){--tw-outline-style:none;outline-style:none}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.peer-data-\[active\=true\]\/menu-button\:text-sidebar-accent-foreground:is(:where(.peer\/menu-button)[data-active=true]~*){color:var(--sidebar-accent-foreground)}.peer-data-\[size\=default\]\/menu-button\:top-1\.5:is(:where(.peer\/menu-button)[data-size=default]~*){top:calc(var(--spacing) * 1.5)}.peer-data-\[size\=lg\]\/menu-button\:top-2\.5:is(:where(.peer\/menu-button)[data-size=lg]~*){top:calc(var(--spacing) * 2.5)}.peer-data-\[size\=sm\]\/menu-button\:top-1:is(:where(.peer\/menu-button)[data-size=sm]~*){top:calc(var(--spacing) * 1)}.selection\:bg-primary ::selection{background-color:var(--primary)}.selection\:bg-primary::selection{background-color:var(--primary)}.selection\:text-primary-foreground ::selection{color:var(--primary-foreground)}.selection\:text-primary-foreground::selection{color:var(--primary-foreground)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-7::file-selector-button{height:calc(var(--spacing) * 7)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.placeholder\:text-slate-400::placeholder{color:var(--color-slate-400)}.placeholder\:text-slate-500::placeholder{color:var(--color-slate-500)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-inset-2:after{content:var(--tw-content);inset:calc(var(--spacing) * -2)}.after\:inset-y-0:after{content:var(--tw-content);inset-block:calc(var(--spacing) * 0)}.after\:top-0\.5:after{content:var(--tw-content);top:calc(var(--spacing) * .5)}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:left-\[2px\]:after{content:var(--tw-content);left:2px}.after\:h-4:after{content:var(--tw-content);height:calc(var(--spacing) * 4)}.after\:w-1:after{content:var(--tw-content);width:calc(var(--spacing) * 1)}.after\:w-4:after{content:var(--tw-content);width:calc(var(--spacing) * 4)}.after\:w-\[2px\]:after{content:var(--tw-content);width:2px}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.after\:rounded-full:after{content:var(--tw-content);border-radius:3.40282e38px}.after\:border:after{content:var(--tw-content);border-style:var(--tw-border-style);border-width:1px}.after\:border-\[\#dde3eb\]:after{content:var(--tw-content);border-color:#dde3eb}.after\:bg-white:after{content:var(--tw-content);background-color:var(--color-white)}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.group-data-\[collapsible\=offcanvas\]\:after\:left-full:is(:where(.group)[data-collapsible=offcanvas] *):after{content:var(--tw-content);left:100%}.peer-checked\:after\:translate-x-full:is(:where(.peer):checked~*):after{content:var(--tw-content);--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.peer-checked\:after\:border-white:is(:where(.peer):checked~*):after{content:var(--tw-content);border-color:var(--color-white)}.first\:rounded-l-md:first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.first\:border-l:first-child{border-left-style:var(--tw-border-style);border-left-width:1px}.last\:mb-0:last-child{margin-bottom:calc(var(--spacing) * 0)}.last\:rounded-r-md:last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.last\:border-r-0:last-child{border-right-style:var(--tw-border-style);border-right-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}@media(hover:hover){.hover\:z-10:hover{z-index:10}.hover\:h-20:hover{height:calc(var(--spacing) * 20)}.hover\:w-24:hover{width:calc(var(--spacing) * 24)}.hover\:-translate-x-1:hover{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:-translate-x-4:hover{--tw-translate-x:calc(var(--spacing) * -4);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:-translate-y-0\.5:hover{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:-translate-y-1:hover{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:scale-\[1\.01\]:hover{scale:1.01}.hover\:scale-\[1\.02\]:hover{scale:1.02}.hover\:rotate-0:hover{rotate:0deg}.hover\:gap-2:hover{gap:calc(var(--spacing) * 2)}.hover\:border-\[\#1FA7E1\]\/50:hover{border-color:#1fa7e180}.hover\:border-\[\#8A3FD3\]\/50:hover{border-color:#8a3fd380}.hover\:border-\[\#9956DE\]:hover{border-color:#9956de}.hover\:border-\[\#9956DE\]\/30:hover{border-color:#9956de4d}.hover\:border-\[\#9956DE\]\/50:hover{border-color:#9956de80}.hover\:border-\[\#9956DE\]\/60:hover{border-color:#9956de99}.hover\:border-\[\#F08386\]:hover{border-color:#f08386}.hover\:border-\[\#F08386\]\/60:hover{border-color:#f0838699}.hover\:border-\[\#d1cec6\]:hover{border-color:#d1cec6}.hover\:border-\[\#dde3eb\]:hover{border-color:#dde3eb}.hover\:border-amber-200\/60:hover{border-color:#fee68599}@supports (color:color-mix(in lab,red,red)){.hover\:border-amber-200\/60:hover{border-color:color-mix(in oklab,var(--color-amber-200) 60%,transparent)}}.hover\:border-emerald-100:hover{border-color:var(--color-emerald-100)}.hover\:border-emerald-300:hover{border-color:var(--color-emerald-300)}.hover\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\:border-indigo-100:hover{border-color:var(--color-indigo-100)}.hover\:border-indigo-300:hover{border-color:var(--color-indigo-300)}.hover\:border-indigo-600:hover{border-color:var(--color-indigo-600)}.hover\:border-orange-300:hover{border-color:var(--color-orange-300)}.hover\:border-purple-200:hover{border-color:var(--color-purple-200)}.hover\:border-purple-400:hover{border-color:var(--color-purple-400)}.hover\:border-rose-300:hover{border-color:var(--color-rose-300)}.hover\:border-sky-200:hover{border-color:var(--color-violet-200)}.hover\:border-sky-300:hover{border-color:var(--color-violet-300)}.hover\:border-sky-400:hover{border-color:var(--color-violet-400)}.hover\:border-slate-200:hover{border-color:var(--color-slate-200)}.hover\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\:border-teal-300:hover{border-color:var(--color-teal-300)}.hover\:border-violet-100:hover{border-color:var(--color-violet-100)}.hover\:bg-\[\#1C96CB\]:hover{background-color:#1c96cb}.hover\:bg-\[\#1FA7E1\]\/5:hover{background-color:#1fa7e10d}.hover\:bg-\[\#1a95c9\]:hover{background-color:#1a95c9}.hover\:bg-\[\#5AB84E\]:hover{background-color:#5ab84e}.hover\:bg-\[\#6ab359\]:hover{background-color:#6ab359}.hover\:bg-\[\#7A44B3\]:hover{background-color:#7a44b3}.hover\:bg-\[\#7b35c0\]:hover{background-color:#7b35c0}.hover\:bg-\[\#008f5d\]:hover{background-color:#008f5d}.hover\:bg-\[\#8A3FD3\]\/5:hover{background-color:#8a3fd30d}.hover\:bg-\[\#8A4DCA\]:hover{background-color:#8a4dca}.hover\:bg-\[\#126b84\]:hover{background-color:#126b84}.hover\:bg-\[\#8544c7\]:hover{background-color:#8544c7}.hover\:bg-\[\#9956DE\]\/6:hover{background-color:#9956de0f}.hover\:bg-\[\#9956DE\]\/8:hover{background-color:#9956de14}.hover\:bg-\[\#9956DE\]\/12:hover{background-color:#9956de1f}.hover\:bg-\[\#9956DE\]\/90:hover{background-color:#9956dee6}.hover\:bg-\[\#283042\]:hover{background-color:#283042}.hover\:bg-\[\#F08386\]\/12:hover{background-color:#f083861f}.hover\:bg-\[\#FA7DA9\]:hover{background-color:#fa7da9}.hover\:bg-\[\#FF8B8B\]\/20:hover{background-color:#ff8b8b33}.hover\:bg-\[\#FF7373\]:hover{background-color:#ff7373}.hover\:bg-\[\#dde3eb\]:hover{background-color:#dde3eb}.hover\:bg-\[\#edf1f7\]:hover{background-color:#edf1f7}.hover\:bg-\[\#edf1f7\]\/50:hover{background-color:#edf1f780}.hover\:bg-\[\#f7f9fc\]:hover{background-color:#f7f9fc}.hover\:bg-\[\#f8fafc\]:hover{background-color:#f8fafc}.hover\:bg-accent:hover,.hover\:bg-accent\/40:hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-accent\/40:hover{background-color:color-mix(in oklab,var(--accent) 40%,transparent)}}.hover\:bg-amber-50:hover{background-color:var(--color-amber-50)}.hover\:bg-amber-700:hover{background-color:var(--color-amber-700)}.hover\:bg-black\/40:hover{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.hover\:bg-black\/40:hover{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.hover\:bg-blue-500:hover{background-color:var(--color-blue-500)}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive) 90%,transparent)}}.hover\:bg-emerald-100:hover{background-color:var(--color-emerald-100)}.hover\:bg-emerald-400:hover{background-color:var(--color-emerald-400)}.hover\:bg-green-50:hover{background-color:var(--color-green-50)}.hover\:bg-green-100:hover{background-color:var(--color-green-100)}.hover\:bg-green-700:hover{background-color:var(--color-green-700)}.hover\:bg-indigo-700:hover{background-color:var(--color-indigo-700)}.hover\:bg-muted:hover,.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.hover\:bg-orange-50:hover{background-color:var(--color-orange-50)}.hover\:bg-orange-600:hover{background-color:var(--color-orange-600)}.hover\:bg-primary:hover,.hover\:bg-primary\/20:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/20:hover{background-color:color-mix(in oklab,var(--primary) 20%,transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary) 90%,transparent)}}.hover\:bg-purple-50:hover{background-color:var(--color-purple-50)}.hover\:bg-purple-50\/50:hover{background-color:#faf5ff80}@supports (color:color-mix(in lab,red,red)){.hover\:bg-purple-50\/50:hover{background-color:color-mix(in oklab,var(--color-purple-50) 50%,transparent)}}.hover\:bg-purple-200:hover{background-color:var(--color-purple-200)}.hover\:bg-purple-700:hover{background-color:var(--color-purple-700)}.hover\:bg-purple-900\/40:hover{background-color:#59168b66}@supports (color:color-mix(in lab,red,red)){.hover\:bg-purple-900\/40:hover{background-color:color-mix(in oklab,var(--color-purple-900) 40%,transparent)}}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-red-100:hover{background-color:var(--color-red-100)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\:bg-rose-50:hover{background-color:var(--color-rose-50)}.hover\:bg-rose-100:hover{background-color:var(--color-rose-100)}.hover\:bg-rose-500:hover{background-color:var(--color-rose-500)}.hover\:bg-rose-500\/10:hover{background-color:#ff23571a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-rose-500\/10:hover{background-color:color-mix(in oklab,var(--color-rose-500) 10%,transparent)}}.hover\:bg-rose-600:hover{background-color:var(--color-rose-600)}.hover\:bg-rose-700:hover{background-color:var(--color-rose-700)}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary) 80%,transparent)}}.hover\:bg-sidebar-accent:hover{background-color:var(--sidebar-accent)}.hover\:bg-sky-50:hover{background-color:var(--color-violet-50)}.hover\:bg-sky-50\/50:hover{background-color:#f5f3ff80}@supports (color:color-mix(in lab,red,red)){.hover\:bg-sky-50\/50:hover{background-color:color-mix(in oklab,var(--color-violet-50) 50%,transparent)}}.hover\:bg-sky-50\/80:hover{background-color:#f5f3ffcc}@supports (color:color-mix(in lab,red,red)){.hover\:bg-sky-50\/80:hover{background-color:color-mix(in oklab,var(--color-violet-50) 80%,transparent)}}.hover\:bg-sky-100:hover{background-color:var(--color-violet-100)}.hover\:bg-sky-300:hover{background-color:var(--color-violet-300)}.hover\:bg-sky-600:hover{background-color:var(--color-violet-600)}.hover\:bg-sky-700:hover{background-color:var(--color-violet-700)}.hover\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\:bg-slate-50\/70:hover{background-color:#f8fafcb3}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-50\/70:hover{background-color:color-mix(in oklab,var(--color-slate-50) 70%,transparent)}}.hover\:bg-slate-50\/80:hover{background-color:#f8fafccc}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-50\/80:hover{background-color:color-mix(in oklab,var(--color-slate-50) 80%,transparent)}}.hover\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\:bg-slate-200:hover{background-color:var(--color-slate-200)}.hover\:bg-slate-200\/50:hover{background-color:#e2e8f080}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-200\/50:hover{background-color:color-mix(in oklab,var(--color-slate-200) 50%,transparent)}}.hover\:bg-slate-200\/70:hover{background-color:#e2e8f0b3}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-200\/70:hover{background-color:color-mix(in oklab,var(--color-slate-200) 70%,transparent)}}.hover\:bg-violet-100:hover{background-color:var(--color-violet-100)}.hover\:bg-violet-500:hover{background-color:var(--color-violet-500)}.hover\:bg-white:hover{background-color:var(--color-white)}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.hover\:bg-white\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/20:hover{background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.hover\:bg-white\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/30:hover{background-color:color-mix(in oklab,var(--color-white) 30%,transparent)}}.hover\:bg-white\/50:hover{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/50:hover{background-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.hover\:bg-white\/80:hover{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/80:hover{background-color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.hover\:\!from-\[\#8FE4DA\]:hover{--tw-gradient-from:#8fe4da!important;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))!important}.hover\:from-\[\#FFA500\]:hover{--tw-gradient-from:orange;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:from-amber-600:hover{--tw-gradient-from:var(--color-amber-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:from-purple-500:hover{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:from-purple-700:hover{--tw-gradient-from:var(--color-purple-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:from-sky-700:hover{--tw-gradient-from:var(--color-violet-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:\!to-\[\#49BDEB\]:hover{--tw-gradient-to:#49bdeb!important;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))!important}.hover\:to-\[\#FF7F00\]:hover{--tw-gradient-to:#ff7f00;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:to-orange-600:hover{--tw-gradient-to:var(--color-orange-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:to-pink-400:hover{--tw-gradient-to:var(--color-pink-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:to-purple-600:hover{--tw-gradient-to:var(--color-purple-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:to-sky-600:hover{--tw-gradient-to:var(--color-violet-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:text-\[\#0a1628\]:hover{color:#0a1628}.hover\:text-\[\#5a6578\]:hover{color:#5a6578}.hover\:text-\[\#9956DE\]:hover{color:#9956de}.hover\:text-\[\#F08386\]:hover{color:#f08386}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-amber-500:hover{color:var(--color-amber-500)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-green-600:hover{color:var(--color-green-600)}.hover\:text-indigo-600:hover{color:var(--color-indigo-600)}.hover\:text-muted-foreground:hover{color:var(--muted-foreground)}.hover\:text-orange-600:hover{color:var(--color-orange-600)}.hover\:text-primary:hover{color:var(--primary)}.hover\:text-primary-foreground:hover{color:var(--primary-foreground)}.hover\:text-purple-700:hover{color:var(--color-purple-700)}.hover\:text-red-500:hover{color:var(--color-red-500)}.hover\:text-red-600:hover{color:var(--color-red-600)}.hover\:text-rose-300:hover{color:var(--color-rose-300)}.hover\:text-rose-700:hover{color:var(--color-rose-700)}.hover\:text-sidebar-accent-foreground:hover{color:var(--sidebar-accent-foreground)}.hover\:text-sky-300:hover{color:var(--color-violet-300)}.hover\:text-sky-500:hover{color:var(--color-violet-500)}.hover\:text-sky-600:hover{color:var(--color-violet-600)}.hover\:text-sky-700:hover{color:var(--color-violet-700)}.hover\:text-slate-600:hover{color:var(--color-slate-600)}.hover\:text-slate-700:hover{color:var(--color-slate-700)}.hover\:text-slate-800:hover{color:var(--color-slate-800)}.hover\:text-slate-900:hover{color:var(--color-slate-900)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-\[0_0_0_1px_hsl\(var\(--sidebar-accent\)\)\]:hover{--tw-shadow:0 0 0 1px var(--tw-shadow-color,hsl(var(--sidebar-accent)));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_8px_24px_rgba\(0\,0\,0\,0\.2\)\]:hover{--tw-shadow:0 8px 24px var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_12px_45px_rgba\(31\,167\,225\,0\.4\)\]:hover{--tw-shadow:0 12px 45px var(--tw-shadow-color,#1fa7e166);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_12px_45px_rgba\(138\,63\,211\,0\.4\)\]:hover{--tw-shadow:0 12px 45px var(--tw-shadow-color,#8a3fd366);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_16px_30px_rgba\(0\,0\,0\,0\.12\)\]:hover{--tw-shadow:0 16px 30px var(--tw-shadow-color,#0000001f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_16px_40px_-15px_rgba\(0\,0\,0\,0\.12\)\]:hover{--tw-shadow:0 16px 40px -15px var(--tw-shadow-color,#0000001f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_16px_40px_rgba\(114\,116\,237\,0\.28\)\]:hover{--tw-shadow:0 16px 40px var(--tw-shadow-color,#7274ed47);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:ring-4:hover{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-pink-500\/35:hover{--tw-shadow-color:#f6339a59}@supports (color:color-mix(in lab,red,red)){.hover\:shadow-pink-500\/35:hover{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-pink-500) 35%, transparent) var(--tw-shadow-alpha), transparent)}}.hover\:shadow-purple-500\/30:hover{--tw-shadow-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.hover\:shadow-purple-500\/30:hover{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-purple-500) 30%, transparent) var(--tw-shadow-alpha), transparent)}}.hover\:shadow-sky-300\/50:hover{--tw-shadow-color:#c4b4ff80}@supports (color:color-mix(in lab,red,red)){.hover\:shadow-sky-300\/50:hover{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-violet-300) 50%, transparent) var(--tw-shadow-alpha), transparent)}}.hover\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.hover\:group-data-\[collapsible\=offcanvas\]\:bg-sidebar:hover:is(:where(.group)[data-collapsible=offcanvas] *){background-color:var(--sidebar)}.hover\:after\:bg-sidebar-border:hover:after{content:var(--tw-content);background-color:var(--sidebar-border)}}.focus\:z-10:focus{z-index:10}.focus\:border-\[\#7C3AED\]:focus{border-color:#7c3aed}.focus\:border-\[\#75D06A\]:focus{border-color:#75d06a}.focus\:border-indigo-600:focus{border-color:var(--color-indigo-600)}.focus\:border-primary:focus{border-color:var(--primary)}.focus\:border-rose-400:focus{border-color:var(--color-rose-400)}.focus\:border-sky-400:focus{border-color:var(--color-violet-400)}.focus\:border-sky-500:focus{border-color:var(--color-violet-500)}.focus\:border-sky-600:focus{border-color:var(--color-violet-600)}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:bg-primary:focus{background-color:var(--primary)}.focus\:bg-white:focus{background-color:var(--color-white)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:text-primary-foreground:focus{color:var(--primary-foreground)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-\[\#9956DE\]\/40:focus{--tw-ring-color:oklab(59.4745% .111053 -.167638/.4)}.focus\:ring-indigo-500\/30:focus{--tw-ring-color:#625fff4d}@supports (color:color-mix(in lab,red,red)){.focus\:ring-indigo-500\/30:focus{--tw-ring-color:color-mix(in oklab, var(--color-indigo-500) 30%, transparent)}}.focus\:ring-primary\/20:focus{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.focus\:ring-primary\/20:focus{--tw-ring-color:color-mix(in oklab, var(--primary) 20%, transparent)}}.focus\:ring-purple-500:focus{--tw-ring-color:var(--color-purple-500)}.focus\:ring-red-500:focus{--tw-ring-color:var(--color-red-500)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-sky-100:focus{--tw-ring-color:var(--color-violet-100)}.focus\:ring-sky-200:focus{--tw-ring-color:var(--color-violet-200)}.focus\:ring-sky-400\/20:focus{--tw-ring-color:#a685ff33}@supports (color:color-mix(in lab,red,red)){.focus\:ring-sky-400\/20:focus{--tw-ring-color:color-mix(in oklab, var(--color-violet-400) 20%, transparent)}}.focus\:ring-sky-500:focus{--tw-ring-color:var(--color-violet-500)}.focus\:ring-sky-500\/20:focus{--tw-ring-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.focus\:ring-sky-500\/20:focus{--tw-ring-color:color-mix(in oklab, var(--color-violet-500) 20%, transparent)}}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:z-10:focus-visible{z-index:10}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-4:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[\#8A3FD3\]\/50:focus-visible{--tw-ring-color:oklab(54.1025% .117281 -.181162/.5)}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.focus-visible\:ring-red-500:focus-visible{--tw-ring-color:var(--color-red-500)}.focus-visible\:ring-ring:focus-visible,.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.focus-visible\:ring-sky-400:focus-visible{--tw-ring-color:var(--color-violet-400)}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus-visible\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-ring:focus-visible{outline-color:var(--ring)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:translate-y-0:active{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.active\:translate-y-\[2px\]:active{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.active\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\:scale-\[0\.98\]:active{scale:.98}.active\:border-b-0:active{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.active\:bg-sidebar-accent:active{background-color:var(--sidebar-accent)}.active\:text-sidebar-accent-foreground:active{color:var(--sidebar-accent-foreground)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-default:disabled{cursor:default}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.disabled\:opacity-70:disabled{opacity:.7}.disabled\:opacity-100:disabled{opacity:1}:where([data-side=left]) .in-data-\[side\=left\]\:cursor-w-resize{cursor:w-resize}:where([data-side=right]) .in-data-\[side\=right\]\:cursor-e-resize{cursor:e-resize}.has-disabled\:opacity-50:has(:disabled){opacity:.5}.has-data-\[slot\=card-action\]\:grid-cols-\[1fr_auto\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-data-\[variant\=inset\]\:bg-sidebar:has([data-variant=inset]){background-color:var(--sidebar)}.has-\[\>svg\]\:grid-cols-\[calc\(var\(--spacing\)\*4\)_1fr\]:has(>svg){grid-template-columns:calc(var(--spacing) * 4) 1fr}.has-\[\>svg\]\:gap-x-3:has(>svg){column-gap:calc(var(--spacing) * 3)}.has-\[\>svg\]\:px-2\.5:has(>svg){padding-inline:calc(var(--spacing) * 2.5)}.has-\[\>svg\]\:px-3:has(>svg){padding-inline:calc(var(--spacing) * 3)}.has-\[\>svg\]\:px-4:has(>svg){padding-inline:calc(var(--spacing) * 4)}.aria-disabled\:pointer-events-none[aria-disabled=true]{pointer-events:none}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.aria-selected\:bg-accent[aria-selected=true]{background-color:var(--accent)}.aria-selected\:bg-primary[aria-selected=true]{background-color:var(--primary)}.aria-selected\:text-accent-foreground[aria-selected=true]{color:var(--accent-foreground)}.aria-selected\:text-muted-foreground[aria-selected=true]{color:var(--muted-foreground)}.aria-selected\:text-primary-foreground[aria-selected=true]{color:var(--primary-foreground)}.aria-selected\:opacity-100[aria-selected=true]{opacity:1}.data-\[active\=true\]\:z-10[data-active=true]{z-index:10}.data-\[active\=true\]\:border-ring[data-active=true]{border-color:var(--ring)}.data-\[active\=true\]\:bg-accent\/50[data-active=true]{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.data-\[active\=true\]\:bg-accent\/50[data-active=true]{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.data-\[active\=true\]\:bg-sidebar-accent[data-active=true]{background-color:var(--sidebar-accent)}.data-\[active\=true\]\:font-medium[data-active=true]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.data-\[active\=true\]\:text-accent-foreground[data-active=true]{color:var(--accent-foreground)}.data-\[active\=true\]\:text-sidebar-accent-foreground[data-active=true]{color:var(--sidebar-accent-foreground)}.data-\[active\=true\]\:ring-\[3px\][data-active=true]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[active\=true\]\:ring-ring\/50[data-active=true]{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.data-\[active\=true\]\:ring-ring\/50[data-active=true]{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}@media(hover:hover){.data-\[active\=true\]\:hover\:bg-accent[data-active=true]:hover{background-color:var(--accent)}}.data-\[active\=true\]\:focus\:bg-accent[data-active=true]:focus{background-color:var(--accent)}.data-\[active\=true\]\:aria-invalid\:border-destructive[data-active=true][aria-invalid=true]{border-color:var(--destructive)}.data-\[active\=true\]\:aria-invalid\:ring-destructive\/20[data-active=true][aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.data-\[active\=true\]\:aria-invalid\:ring-destructive\/20[data-active=true][aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[error\=true\]\:text-destructive[data-error=true]{color:var(--destructive)}.data-\[inset\]\:pl-8[data-inset]{padding-left:calc(var(--spacing) * 8)}.data-\[orientation\=horizontal\]\:h-4[data-orientation=horizontal]{height:calc(var(--spacing) * 4)}.data-\[orientation\=horizontal\]\:h-full[data-orientation=horizontal]{height:100%}.data-\[orientation\=horizontal\]\:h-px[data-orientation=horizontal]{height:1px}.data-\[orientation\=horizontal\]\:w-full[data-orientation=horizontal]{width:100%}.data-\[orientation\=vertical\]\:h-full[data-orientation=vertical]{height:100%}.data-\[orientation\=vertical\]\:min-h-44[data-orientation=vertical]{min-height:calc(var(--spacing) * 44)}.data-\[orientation\=vertical\]\:w-1\.5[data-orientation=vertical]{width:calc(var(--spacing) * 1.5)}.data-\[orientation\=vertical\]\:w-auto[data-orientation=vertical]{width:auto}.data-\[orientation\=vertical\]\:w-full[data-orientation=vertical]{width:100%}.data-\[orientation\=vertical\]\:w-px[data-orientation=vertical]{width:1px}.data-\[orientation\=vertical\]\:flex-col[data-orientation=vertical]{flex-direction:column}.data-\[panel-group-direction\=vertical\]\:h-px[data-panel-group-direction=vertical]{height:1px}.data-\[panel-group-direction\=vertical\]\:w-full[data-panel-group-direction=vertical]{width:100%}.data-\[panel-group-direction\=vertical\]\:flex-col[data-panel-group-direction=vertical]{flex-direction:column}.data-\[panel-group-direction\=vertical\]\:after\:left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);left:calc(var(--spacing) * 0)}.data-\[panel-group-direction\=vertical\]\:after\:h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content);height:calc(var(--spacing) * 1)}.data-\[panel-group-direction\=vertical\]\:after\:w-full[data-panel-group-direction=vertical]:after{content:var(--tw-content);width:100%}.data-\[panel-group-direction\=vertical\]\:after\:translate-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[panel-group-direction\=vertical\]\:after\:-translate-y-1\/2[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[size\=default\]\:h-9[data-size=default]{height:calc(var(--spacing) * 9)}.data-\[size\=sm\]\:h-8[data-size=sm]{height:calc(var(--spacing) * 8)}:is(.\*\:data-\[slot\=alert-description\]\:text-destructive\/90>*)[data-slot=alert-description]{color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){:is(.\*\:data-\[slot\=alert-description\]\:text-destructive\/90>*)[data-slot=alert-description]{color:color-mix(in oklab,var(--destructive) 90%,transparent)}}:is(.\*\*\:data-\[slot\=command-input-wrapper\]\:h-12 *)[data-slot=command-input-wrapper]{height:calc(var(--spacing) * 12)}:is(.\*\*\:data-\[slot\=navigation-menu-link\]\:focus\:ring-0 *)[data-slot=navigation-menu-link]:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}:is(.\*\*\:data-\[slot\=navigation-menu-link\]\:focus\:outline-none *)[data-slot=navigation-menu-link]:focus{--tw-outline-style:none;outline-style:none}:is(.\*\:data-\[slot\=select-value\]\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\*\:data-\[slot\=select-value\]\:flex>*)[data-slot=select-value]{display:flex}:is(.\*\:data-\[slot\=select-value\]\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\*\:data-\[slot\=select-value\]\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing) * 2)}.data-\[state\=active\]\:bg-card[data-state=active]{background-color:var(--card)}.data-\[state\=active\]\:bg-gradient-to-r[data-state=active]{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.data-\[state\=active\]\:from-blue-600[data-state=active]{--tw-gradient-from:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.data-\[state\=active\]\:to-sky-500[data-state=active]{--tw-gradient-to:var(--color-violet-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.data-\[state\=active\]\:text-white[data-state=active]{color:var(--color-white)}.data-\[state\=checked\]\:translate-x-\[calc\(100\%-2px\)\][data-state=checked]{--tw-translate-x: calc(100% - 2px) ;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=checked\]\:border-primary[data-state=checked]{border-color:var(--primary)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=checked\]\:bg-red-600[data-state=checked]{background-color:var(--color-red-600)}.data-\[state\=checked\]\:bg-sky-600[data-state=checked]{background-color:var(--color-violet-600)}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\[state\=closed\]\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\[state\=on\]\:bg-accent[data-state=on]{background-color:var(--accent)}.data-\[state\=on\]\:text-accent-foreground[data-state=on]{color:var(--accent-foreground)}.data-\[state\=open\]\:bg-accent[data-state=open],.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:var(--secondary)}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:var(--accent-foreground)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:opacity-100[data-state=open]{opacity:1}.data-\[state\=open\]\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}@media(hover:hover){.data-\[state\=open\]\:hover\:bg-accent[data-state=open]:hover{background-color:var(--accent)}.data-\[state\=open\]\:hover\:bg-sidebar-accent[data-state=open]:hover{background-color:var(--sidebar-accent)}.data-\[state\=open\]\:hover\:text-sidebar-accent-foreground[data-state=open]:hover{color:var(--sidebar-accent-foreground)}}.data-\[state\=open\]\:focus\:bg-accent[data-state=open]:focus{background-color:var(--accent)}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:var(--muted)}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-\[\#dde3eb\][data-state=unchecked]{background-color:#dde3eb}.data-\[state\=unchecked\]\:bg-switch-background[data-state=unchecked]{background-color:var(--switch-background)}.data-\[variant\=destructive\]\:text-destructive[data-variant=destructive]{color:var(--destructive)}.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--destructive) 10%,transparent)}}.data-\[variant\=destructive\]\:focus\:text-destructive[data-variant=destructive]:focus{color:var(--destructive)}.data-\[variant\=outline\]\:border-l-0[data-variant=outline]{border-left-style:var(--tw-border-style);border-left-width:0}.data-\[variant\=outline\]\:shadow-xs[data-variant=outline]{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[variant\=outline\]\:first\:border-l[data-variant=outline]:first-child{border-left-style:var(--tw-border-style);border-left-width:1px}.data-\[vaul-drawer-direction\=bottom\]\:inset-x-0[data-vaul-drawer-direction=bottom]{inset-inline:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=bottom\]\:bottom-0[data-vaul-drawer-direction=bottom]{bottom:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=bottom\]\:mt-24[data-vaul-drawer-direction=bottom]{margin-top:calc(var(--spacing) * 24)}.data-\[vaul-drawer-direction\=bottom\]\:max-h-\[80vh\][data-vaul-drawer-direction=bottom]{max-height:80vh}.data-\[vaul-drawer-direction\=bottom\]\:rounded-t-lg[data-vaul-drawer-direction=bottom]{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.data-\[vaul-drawer-direction\=bottom\]\:border-t[data-vaul-drawer-direction=bottom]{border-top-style:var(--tw-border-style);border-top-width:1px}.data-\[vaul-drawer-direction\=left\]\:inset-y-0[data-vaul-drawer-direction=left]{inset-block:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=left\]\:left-0[data-vaul-drawer-direction=left]{left:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=left\]\:w-3\/4[data-vaul-drawer-direction=left]{width:75%}.data-\[vaul-drawer-direction\=left\]\:border-r[data-vaul-drawer-direction=left]{border-right-style:var(--tw-border-style);border-right-width:1px}.data-\[vaul-drawer-direction\=right\]\:inset-y-0[data-vaul-drawer-direction=right]{inset-block:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=right\]\:right-0[data-vaul-drawer-direction=right]{right:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=right\]\:w-3\/4[data-vaul-drawer-direction=right]{width:75%}.data-\[vaul-drawer-direction\=right\]\:border-l[data-vaul-drawer-direction=right]{border-left-style:var(--tw-border-style);border-left-width:1px}.data-\[vaul-drawer-direction\=top\]\:inset-x-0[data-vaul-drawer-direction=top]{inset-inline:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=top\]\:top-0[data-vaul-drawer-direction=top]{top:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=top\]\:mb-24[data-vaul-drawer-direction=top]{margin-bottom:calc(var(--spacing) * 24)}.data-\[vaul-drawer-direction\=top\]\:max-h-\[80vh\][data-vaul-drawer-direction=top]{max-height:80vh}.data-\[vaul-drawer-direction\=top\]\:rounded-b-lg[data-vaul-drawer-direction=top]{border-bottom-right-radius:var(--radius);border-bottom-left-radius:var(--radius)}.data-\[vaul-drawer-direction\=top\]\:border-b[data-vaul-drawer-direction=top]{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}@media(min-width:40rem){.sm\:-top-\[30px\]{top:-30px}.sm\:right-8{right:calc(var(--spacing) * 8)}.sm\:bottom-8{bottom:calc(var(--spacing) * 8)}.sm\:col-span-2{grid-column:span 2/span 2}.sm\:col-span-3{grid-column:span 3/span 3}.sm\:-mx-6{margin-inline:calc(var(--spacing) * -6)}.sm\:mt-2{margin-top:calc(var(--spacing) * 2)}.sm\:mb-0{margin-bottom:calc(var(--spacing) * 0)}.sm\:mb-4{margin-bottom:calc(var(--spacing) * 4)}.sm\:mb-6{margin-bottom:calc(var(--spacing) * 6)}.sm\:ml-0{margin-left:calc(var(--spacing) * 0)}.sm\:ml-auto{margin-left:auto}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:inline{display:inline}.sm\:size-20{width:calc(var(--spacing) * 20);height:calc(var(--spacing) * 20)}.sm\:h-2{height:calc(var(--spacing) * 2)}.sm\:h-4{height:calc(var(--spacing) * 4)}.sm\:h-6{height:calc(var(--spacing) * 6)}.sm\:h-8{height:calc(var(--spacing) * 8)}.sm\:h-10{height:calc(var(--spacing) * 10)}.sm\:h-11{height:calc(var(--spacing) * 11)}.sm\:h-12{height:calc(var(--spacing) * 12)}.sm\:h-14{height:calc(var(--spacing) * 14)}.sm\:h-20{height:calc(var(--spacing) * 20)}.sm\:h-\[95px\]{height:95px}.sm\:h-\[115\%\]{height:115%}.sm\:h-\[125\%\]{height:125%}.sm\:h-\[140px\]{height:140px}.sm\:h-\[145px\]{height:145px}.sm\:h-\[165px\]{height:165px}.sm\:h-\[245px\]{height:245px}.sm\:h-\[360px\]{height:360px}.sm\:h-\[450px\]{height:450px}.sm\:min-h-\[130px\]{min-height:130px}.sm\:w-4{width:calc(var(--spacing) * 4)}.sm\:w-6{width:calc(var(--spacing) * 6)}.sm\:w-8{width:calc(var(--spacing) * 8)}.sm\:w-10{width:calc(var(--spacing) * 10)}.sm\:w-12{width:calc(var(--spacing) * 12)}.sm\:w-14{width:calc(var(--spacing) * 14)}.sm\:w-20{width:calc(var(--spacing) * 20)}.sm\:w-32{width:calc(var(--spacing) * 32)}.sm\:w-\[30\%\]{width:30%}.sm\:w-\[38\%\]{width:38%}.sm\:w-\[65px\]{width:65px}.sm\:w-\[140px\]{width:140px}.sm\:w-\[150px\]{width:150px}.sm\:w-\[160px\]{width:160px}.sm\:w-\[170px\]{width:170px}.sm\:w-\[300px\]{width:300px}.sm\:w-auto{width:auto}.sm\:w-max{width:max-content}.sm\:max-w-\[300px\]{max-width:300px}.sm\:max-w-\[425px\]{max-width:425px}.sm\:max-w-\[480px\]{max-width:480px}.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:max-w-md{max-width:var(--container-md)}.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:max-w-xl{max-width:var(--container-xl)}.sm\:max-w-xs{max-width:var(--container-xs)}.sm\:flex-none{flex:none}.sm\:-translate-x-\[60px\]{--tw-translate-x: -60px ;translate:var(--tw-translate-x) var(--tw-translate-y)}.sm\:translate-x-\[60px\]{--tw-translate-x:60px;translate:var(--tw-translate-x) var(--tw-translate-y)}.sm\:scale-\[0\.80\]{scale:.8}.sm\:scale-\[0\.85\]{scale:.85}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:items-start{align-items:flex-start}.sm\:justify-between{justify-content:space-between}.sm\:justify-end{justify-content:flex-end}.sm\:justify-start{justify-content:flex-start}.sm\:gap-2\.5{gap:calc(var(--spacing) * 2.5)}.sm\:gap-3{gap:calc(var(--spacing) * 3)}.sm\:gap-4{gap:calc(var(--spacing) * 4)}.sm\:gap-5{gap:calc(var(--spacing) * 5)}.sm\:gap-6{gap:calc(var(--spacing) * 6)}.sm\:gap-8{gap:calc(var(--spacing) * 8)}:where(.sm\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-t-\[40px\]{border-top-left-radius:40px;border-top-right-radius:40px}.sm\:rounded-b-\[40px\]{border-bottom-right-radius:40px;border-bottom-left-radius:40px}.sm\:p-5{padding:calc(var(--spacing) * 5)}.sm\:p-6{padding:calc(var(--spacing) * 6)}.sm\:p-7{padding:calc(var(--spacing) * 7)}.sm\:p-8{padding:calc(var(--spacing) * 8)}.sm\:px-4{padding-inline:calc(var(--spacing) * 4)}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}.sm\:px-8{padding-inline:calc(var(--spacing) * 8)}.sm\:px-10{padding-inline:calc(var(--spacing) * 10)}.sm\:py-3{padding-block:calc(var(--spacing) * 3)}.sm\:py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.sm\:py-4{padding-block:calc(var(--spacing) * 4)}.sm\:py-6{padding-block:calc(var(--spacing) * 6)}.sm\:py-8{padding-block:calc(var(--spacing) * 8)}.sm\:pt-6{padding-top:calc(var(--spacing) * 6)}.sm\:pr-2\.5{padding-right:calc(var(--spacing) * 2.5)}.sm\:pb-28{padding-bottom:calc(var(--spacing) * 28)}.sm\:pl-2\.5{padding-left:calc(var(--spacing) * 2.5)}.sm\:pl-6{padding-left:calc(var(--spacing) * 6)}.sm\:text-left{text-align:left}.sm\:text-right{text-align:right}.sm\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.sm\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.sm\:text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.sm\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.sm\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.sm\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.sm\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.sm\:text-\[10px\]{font-size:10px}.sm\:text-\[11px\]{font-size:11px}.sm\:text-\[12px\]{font-size:12px}.sm\:text-\[14px\]{font-size:14px}.data-\[vaul-drawer-direction\=left\]\:sm\:max-w-sm[data-vaul-drawer-direction=left],.data-\[vaul-drawer-direction\=right\]\:sm\:max-w-sm[data-vaul-drawer-direction=right]{max-width:var(--container-sm)}}@media(min-width:48rem){.md\:absolute{position:absolute}.md\:-top-7{top:calc(var(--spacing) * -7)}.md\:-top-8{top:calc(var(--spacing) * -8)}.md\:top-\[600px\]{top:600px}.md\:right-4{right:calc(var(--spacing) * 4)}.md\:right-10{right:calc(var(--spacing) * 10)}.md\:-bottom-7{bottom:calc(var(--spacing) * -7)}.md\:-bottom-8{bottom:calc(var(--spacing) * -8)}.md\:left-16{left:calc(var(--spacing) * 16)}.md\:col-span-2{grid-column:span 2/span 2}.md\:col-span-3{grid-column:span 3/span 3}.md\:col-span-9{grid-column:span 9/span 9}.md\:mt-2{margin-top:calc(var(--spacing) * 2)}.md\:mt-12{margin-top:calc(var(--spacing) * 12)}.md\:mt-\[-30px\]{margin-top:-30px}.md\:mr-2{margin-right:calc(var(--spacing) * 2)}.md\:mr-4{margin-right:calc(var(--spacing) * 4)}.md\:mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.md\:mb-4{margin-bottom:calc(var(--spacing) * 4)}.md\:mb-5{margin-bottom:calc(var(--spacing) * 5)}.md\:mb-8{margin-bottom:calc(var(--spacing) * 8)}.md\:ml-2{margin-left:calc(var(--spacing) * 2)}.md\:ml-16{margin-left:calc(var(--spacing) * 16)}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-2{height:calc(var(--spacing) * 2)}.md\:h-5{height:calc(var(--spacing) * 5)}.md\:h-9{height:calc(var(--spacing) * 9)}.md\:h-10{height:calc(var(--spacing) * 10)}.md\:h-11{height:calc(var(--spacing) * 11)}.md\:h-12{height:calc(var(--spacing) * 12)}.md\:h-14{height:calc(var(--spacing) * 14)}.md\:h-16{height:calc(var(--spacing) * 16)}.md\:h-20{height:calc(var(--spacing) * 20)}.md\:h-32{height:calc(var(--spacing) * 32)}.md\:h-40{height:calc(var(--spacing) * 40)}.md\:h-48{height:calc(var(--spacing) * 48)}.md\:h-\[72px\]{height:72px}.md\:h-\[86px\]{height:86px}.md\:h-\[100px\]{height:100px}.md\:h-\[130px\]{height:130px}.md\:h-\[180px\]{height:180px}.md\:h-\[310px\]{height:310px}.md\:w-2{width:calc(var(--spacing) * 2)}.md\:w-5{width:calc(var(--spacing) * 5)}.md\:w-9{width:calc(var(--spacing) * 9)}.md\:w-10{width:calc(var(--spacing) * 10)}.md\:w-11{width:calc(var(--spacing) * 11)}.md\:w-12{width:calc(var(--spacing) * 12)}.md\:w-14{width:calc(var(--spacing) * 14)}.md\:w-20{width:calc(var(--spacing) * 20)}.md\:w-32{width:calc(var(--spacing) * 32)}.md\:w-40{width:calc(var(--spacing) * 40)}.md\:w-\[72px\]{width:72px}.md\:w-\[86px\]{width:86px}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-\[280px\]{max-width:280px}.md\:min-w-\[320px\]{min-width:320px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.md\:flex-col{flex-direction:column}.md\:flex-row{flex-direction:row}.md\:flex-nowrap{flex-wrap:nowrap}.md\:items-center{align-items:center}.md\:gap-2{gap:calc(var(--spacing) * 2)}.md\:gap-3{gap:calc(var(--spacing) * 3)}.md\:gap-4{gap:calc(var(--spacing) * 4)}.md\:gap-5{gap:calc(var(--spacing) * 5)}.md\:gap-6{gap:calc(var(--spacing) * 6)}.md\:gap-8{gap:calc(var(--spacing) * 8)}.md\:rounded-3xl{border-radius:var(--radius-3xl)}.md\:p-3{padding:calc(var(--spacing) * 3)}.md\:p-4{padding:calc(var(--spacing) * 4)}.md\:p-5{padding:calc(var(--spacing) * 5)}.md\:p-6{padding:calc(var(--spacing) * 6)}.md\:p-8{padding:calc(var(--spacing) * 8)}.md\:p-10{padding:calc(var(--spacing) * 10)}.md\:px-4{padding-inline:calc(var(--spacing) * 4)}.md\:px-5{padding-inline:calc(var(--spacing) * 5)}.md\:px-8{padding-inline:calc(var(--spacing) * 8)}.md\:px-10{padding-inline:calc(var(--spacing) * 10)}.md\:py-2{padding-block:calc(var(--spacing) * 2)}.md\:py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.md\:py-6{padding-block:calc(var(--spacing) * 6)}.md\:pr-4{padding-right:calc(var(--spacing) * 4)}.md\:pr-10{padding-right:calc(var(--spacing) * 10)}.md\:pr-12{padding-right:calc(var(--spacing) * 12)}.md\:pr-\[240px\]{padding-right:240px}.md\:pl-16{padding-left:calc(var(--spacing) * 16)}.md\:pl-24{padding-left:calc(var(--spacing) * 24)}.md\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.md\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.md\:text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.md\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.md\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.md\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.md\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.md\:text-\[10px\]{font-size:10px}.md\:text-\[11px\]{font-size:11px}.md\:text-\[12px\]{font-size:12px}.md\:text-\[13px\]{font-size:13px}.md\:text-\[15px\]{font-size:15px}.md\:text-\[16px\]{font-size:16px}.md\:text-\[17px\]{font-size:17px}.md\:text-\[18px\]{font-size:18px}.md\:text-\[22px\]{font-size:22px}.md\:text-\[26px\]{font-size:26px}.md\:text-\[32px\]{font-size:32px}.md\:text-\[44px\]{font-size:44px}.md\:text-\[70px\]{font-size:70px}.md\:text-\[80px\]{font-size:80px}.md\:text-\[110px\]{font-size:110px}.md\:opacity-0{opacity:0}.md\:peer-data-\[variant\=inset\]\:m-2:is(:where(.peer)[data-variant=inset]~*){margin:calc(var(--spacing) * 2)}.md\:peer-data-\[variant\=inset\]\:ml-0:is(:where(.peer)[data-variant=inset]~*){margin-left:calc(var(--spacing) * 0)}.md\:peer-data-\[variant\=inset\]\:rounded-xl:is(:where(.peer)[data-variant=inset]~*){border-radius:calc(var(--radius) + 4px)}.md\:peer-data-\[variant\=inset\]\:shadow-sm:is(:where(.peer)[data-variant=inset]~*){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.md\:peer-data-\[variant\=inset\]\:peer-data-\[state\=collapsed\]\:ml-2:is(:where(.peer)[data-variant=inset]~*):is(:where(.peer)[data-state=collapsed]~*){margin-left:calc(var(--spacing) * 2)}.md\:after\:hidden:after{content:var(--tw-content);display:none}}@media(min-width:64rem){.lg\:static{position:static}.lg\:top-\[5px\]{top:5px}.lg\:right-10{right:calc(var(--spacing) * 10)}.lg\:right-\[-15px\]{right:-15px}.lg\:right-\[250px\]{right:250px}.lg\:bottom-20{bottom:calc(var(--spacing) * 20)}.lg\:z-auto{z-index:auto}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-4{grid-column:span 4/span 4}.lg\:col-span-8{grid-column:span 8/span 8}.lg\:-mx-4{margin-inline:calc(var(--spacing) * -4)}.lg\:-mt-4{margin-top:calc(var(--spacing) * -4)}.lg\:mt-0{margin-top:calc(var(--spacing) * 0)}.lg\:mb-8{margin-bottom:calc(var(--spacing) * 8)}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:h-8{height:calc(var(--spacing) * 8)}.lg\:h-12{height:calc(var(--spacing) * 12)}.lg\:h-\[265px\]{height:265px}.lg\:min-h-\[160px\]{min-height:160px}.lg\:w-8{width:calc(var(--spacing) * 8)}.lg\:w-12{width:calc(var(--spacing) * 12)}.lg\:w-\[70px\]{width:70px}.lg\:w-\[260px\]{width:260px}.lg\:w-\[270px\]{width:270px}.lg\:w-\[350px\]{width:350px}.lg\:w-auto{width:auto}.lg\:origin-center{transform-origin:50%}.lg\:translate-y-\[19\%\]{--tw-translate-y:19%;translate:var(--tw-translate-x) var(--tw-translate-y)}.lg\:scale-\[0\.85\]{scale:.85}.lg\:scale-\[1\.3\]{scale:1.3}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:grid-cols-\[1fr_300px\]{grid-template-columns:1fr 300px}.lg\:flex-row{flex-direction:row}.lg\:items-center{align-items:center}.lg\:items-start{align-items:flex-start}.lg\:justify-between{justify-content:space-between}.lg\:justify-end{justify-content:flex-end}.lg\:gap-5{gap:calc(var(--spacing) * 5)}.lg\:gap-6{gap:calc(var(--spacing) * 6)}.lg\:gap-10{gap:calc(var(--spacing) * 10)}.lg\:gap-12{gap:calc(var(--spacing) * 12)}.lg\:gap-14{gap:calc(var(--spacing) * 14)}:where(.lg\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.lg\:space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}.lg\:p-4{padding:calc(var(--spacing) * 4)}.lg\:p-8{padding:calc(var(--spacing) * 8)}.lg\:pt-6{padding-top:calc(var(--spacing) * 6)}.lg\:pr-\[280px\]{padding-right:280px}.lg\:pl-6{padding-left:calc(var(--spacing) * 6)}.lg\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.lg\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.lg\:text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.lg\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.lg\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.lg\:text-\[7px\]{font-size:7px}.lg\:text-\[16px\]{font-size:16px}.lg\:text-\[46px\]{font-size:46px}}@media(min-width:80rem){.xl\:col-span-2{grid-column:span 2/span 2}.xl\:col-span-3{grid-column:span 3/span 3}.xl\:col-span-4{grid-column:span 4/span 4}.xl\:col-span-5{grid-column:span 5/span 5}.xl\:col-span-7{grid-column:span 7/span 7}.xl\:col-span-8{grid-column:span 8/span 8}.xl\:col-span-9{grid-column:span 9/span 9}.xl\:-mx-10{margin-inline:calc(var(--spacing) * -10)}.xl\:mx-0{margin-inline:calc(var(--spacing) * 0)}.xl\:mb-8{margin-bottom:calc(var(--spacing) * 8)}.xl\:flex{display:flex}.xl\:h-\[80vh\]{height:80vh}.xl\:h-full{height:100%}.xl\:max-h-\[700px\]{max-height:700px}.xl\:w-\[50\%\]{width:50%}.xl\:w-\[75px\]{width:75px}.xl\:w-\[200px\]{width:200px}.xl\:w-\[350px\]{width:350px}.xl\:max-w-\[1400px\]{max-width:1400px}.xl\:max-w-none{max-width:none}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.xl\:grid-cols-\[1fr_320px\]{grid-template-columns:1fr 320px}.xl\:flex-row{flex-direction:row}.xl\:items-center{align-items:center}.xl\:justify-start{justify-content:flex-start}.xl\:gap-12{gap:calc(var(--spacing) * 12)}.xl\:self-center{align-self:center}.xl\:overflow-hidden{overflow:hidden}.xl\:px-10{padding-inline:calc(var(--spacing) * 10)}.xl\:text-\[3\.4rem\]{font-size:3.4rem}}@media(min-width:96rem){.\32xl\:block{display:block}}.dark\:border-\[\#1FA7E1\]\/20:is(.dark *){border-color:#1fa7e133}.dark\:border-\[\#2b3140\]:is(.dark *){border-color:#2b3140}.dark\:border-\[\#2f3547\]:is(.dark *){border-color:#2f3547}.dark\:border-\[\#8A3FD3\]\/20:is(.dark *){border-color:#8a3fd333}.dark\:border-\[\#8A3FD3\]\/30:is(.dark *){border-color:#8a3fd34d}.dark\:border-\[\#8d7fff\]:is(.dark *){border-color:#8d7fff}.dark\:border-amber-300\/40:is(.dark *){border-color:#ffd23666}@supports (color:color-mix(in lab,red,red)){.dark\:border-amber-300\/40:is(.dark *){border-color:color-mix(in oklab,var(--color-amber-300) 40%,transparent)}}.dark\:border-amber-400\/40:is(.dark *){border-color:#fcbb0066}@supports (color:color-mix(in lab,red,red)){.dark\:border-amber-400\/40:is(.dark *){border-color:color-mix(in oklab,var(--color-amber-400) 40%,transparent)}}.dark\:border-amber-700\/50:is(.dark *){border-color:#b7500080}@supports (color:color-mix(in lab,red,red)){.dark\:border-amber-700\/50:is(.dark *){border-color:color-mix(in oklab,var(--color-amber-700) 50%,transparent)}}.dark\:border-emerald-300\/40:is(.dark *){border-color:#5ee9b566}@supports (color:color-mix(in lab,red,red)){.dark\:border-emerald-300\/40:is(.dark *){border-color:color-mix(in oklab,var(--color-emerald-300) 40%,transparent)}}.dark\:border-emerald-400\/40:is(.dark *){border-color:#00d29466}@supports (color:color-mix(in lab,red,red)){.dark\:border-emerald-400\/40:is(.dark *){border-color:color-mix(in oklab,var(--color-emerald-400) 40%,transparent)}}.dark\:border-emerald-500\/40:is(.dark *){border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.dark\:border-emerald-500\/40:is(.dark *){border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.dark\:border-emerald-700\/50:is(.dark *){border-color:#00795680}@supports (color:color-mix(in lab,red,red)){.dark\:border-emerald-700\/50:is(.dark *){border-color:color-mix(in oklab,var(--color-emerald-700) 50%,transparent)}}.dark\:border-gray-600:is(.dark *){border-color:var(--color-gray-600)}.dark\:border-indigo-700\/50:is(.dark *){border-color:#432dd780}@supports (color:color-mix(in lab,red,red)){.dark\:border-indigo-700\/50:is(.dark *){border-color:color-mix(in oklab,var(--color-indigo-700) 50%,transparent)}}.dark\:border-input:is(.dark *){border-color:var(--input)}.dark\:border-purple-700\/50:is(.dark *){border-color:#8200da80}@supports (color:color-mix(in lab,red,red)){.dark\:border-purple-700\/50:is(.dark *){border-color:color-mix(in oklab,var(--color-purple-700) 50%,transparent)}}.dark\:border-rose-300\/40:is(.dark *){border-color:#ffa2ae66}@supports (color:color-mix(in lab,red,red)){.dark\:border-rose-300\/40:is(.dark *){border-color:color-mix(in oklab,var(--color-rose-300) 40%,transparent)}}.dark\:border-rose-400\/40:is(.dark *){border-color:#ff667f66}@supports (color:color-mix(in lab,red,red)){.dark\:border-rose-400\/40:is(.dark *){border-color:color-mix(in oklab,var(--color-rose-400) 40%,transparent)}}.dark\:border-rose-500\/20:is(.dark *){border-color:#ff235733}@supports (color:color-mix(in lab,red,red)){.dark\:border-rose-500\/20:is(.dark *){border-color:color-mix(in oklab,var(--color-rose-500) 20%,transparent)}}.dark\:border-rose-900:is(.dark *){border-color:var(--color-rose-900)}.dark\:border-sky-700\/50:is(.dark *){border-color:#7008e780}@supports (color:color-mix(in lab,red,red)){.dark\:border-sky-700\/50:is(.dark *){border-color:color-mix(in oklab,var(--color-violet-700) 50%,transparent)}}.dark\:border-slate-700:is(.dark *){border-color:var(--color-slate-700)}.dark\:border-white\/10:is(.dark *){border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.dark\:border-white\/10:is(.dark *){border-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.dark\:bg-\[\#1a1f2e\]\/90:is(.dark *){background-color:#1a1f2ee6}.dark\:bg-\[\#2a3143\]:is(.dark *){background-color:#2a3143}.dark\:bg-\[\#2b2b5f\]:is(.dark *){background-color:#2b2b5f}.dark\:bg-\[\#8A3FD3\]\/10:is(.dark *){background-color:#8a3fd31a}.dark\:bg-\[\#181d27\]:is(.dark *){background-color:#181d27}.dark\:bg-\[\#11151d\]:is(.dark *){background-color:#11151d}.dark\:bg-\[\#15803d\]:is(.dark *){background-color:#15803d}.dark\:bg-\[\#b0e6eb\]:is(.dark *){background-color:#b0e6eb}.dark\:bg-\[\#b45309\]:is(.dark *){background-color:#b45309}.dark\:bg-\[\#be123c\]:is(.dark *){background-color:#be123c}.dark\:bg-\[\#d6ccf5\]:is(.dark *){background-color:#d6ccf5}.dark\:bg-\[\#f6ebd2\]:is(.dark *){background-color:#f6ebd2}.dark\:bg-\[\#fbd3d3\]:is(.dark *){background-color:#fbd3d3}.dark\:bg-amber-100\/20:is(.dark *){background-color:#fef3c633}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-100\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-100) 20%,transparent)}}.dark\:bg-amber-400\/10:is(.dark *){background-color:#fcbb001a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-400\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-400) 10%,transparent)}}.dark\:bg-amber-900\/20:is(.dark *){background-color:#7b330633}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-900) 20%,transparent)}}.dark\:bg-amber-900\/50:is(.dark *){background-color:#7b330680}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-900\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-900) 50%,transparent)}}.dark\:bg-black\/30:is(.dark *){background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-black\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-black) 30%,transparent)}}.dark\:bg-black\/40:is(.dark *){background-color:#0006}@supports (color:color-mix(in lab,red,red)){.dark\:bg-black\/40:is(.dark *){background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.dark\:bg-black\/50:is(.dark *){background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.dark\:bg-black\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.dark\:bg-black\/80:is(.dark *){background-color:#000c}@supports (color:color-mix(in lab,red,red)){.dark\:bg-black\/80:is(.dark *){background-color:color-mix(in oklab,var(--color-black) 80%,transparent)}}.dark\:bg-destructive\/60:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-destructive\/60:is(.dark *){background-color:color-mix(in oklab,var(--destructive) 60%,transparent)}}.dark\:bg-emerald-500\/10:is(.dark *){background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-emerald-500\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.dark\:bg-emerald-500\/30:is(.dark *){background-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-emerald-500\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.dark\:bg-emerald-900\/20:is(.dark *){background-color:#004e3b33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-emerald-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-emerald-900) 20%,transparent)}}.dark\:bg-emerald-900\/30:is(.dark *){background-color:#004e3b4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-emerald-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-emerald-900) 30%,transparent)}}.dark\:bg-emerald-900\/50:is(.dark *){background-color:#004e3b80}@supports (color:color-mix(in lab,red,red)){.dark\:bg-emerald-900\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-emerald-900) 50%,transparent)}}.dark\:bg-gray-800:is(.dark *){background-color:var(--color-gray-800)}.dark\:bg-gray-900:is(.dark *){background-color:var(--color-gray-900)}.dark\:bg-indigo-900\/50:is(.dark *){background-color:#312c8580}@supports (color:color-mix(in lab,red,red)){.dark\:bg-indigo-900\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-indigo-900) 50%,transparent)}}.dark\:bg-input\/30:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-input\/30:is(.dark *){background-color:color-mix(in oklab,var(--input) 30%,transparent)}}.dark\:bg-purple-900\/50:is(.dark *){background-color:#59168b80}@supports (color:color-mix(in lab,red,red)){.dark\:bg-purple-900\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-purple-900) 50%,transparent)}}.dark\:bg-rose-500\/10:is(.dark *){background-color:#ff23571a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-rose-500\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-rose-500) 10%,transparent)}}.dark\:bg-rose-900\/20:is(.dark *){background-color:#8b083633}@supports (color:color-mix(in lab,red,red)){.dark\:bg-rose-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-rose-900) 20%,transparent)}}.dark\:bg-sky-500\/5:is(.dark *){background-color:#8d54ff0d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-sky-500\/5:is(.dark *){background-color:color-mix(in oklab,var(--color-violet-500) 5%,transparent)}}.dark\:bg-sky-500\/15:is(.dark *){background-color:#8d54ff26}@supports (color:color-mix(in lab,red,red)){.dark\:bg-sky-500\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-violet-500) 15%,transparent)}}.dark\:bg-sky-900\/50:is(.dark *){background-color:#4d179a80}@supports (color:color-mix(in lab,red,red)){.dark\:bg-sky-900\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-violet-900) 50%,transparent)}}.dark\:bg-slate-800\/50:is(.dark *){background-color:#1d293d80}@supports (color:color-mix(in lab,red,red)){.dark\:bg-slate-800\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-slate-800) 50%,transparent)}}.dark\:bg-yellow-900\/30:is(.dark *){background-color:#733e0a4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-yellow-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-yellow-900) 30%,transparent)}}.dark\:from-\[\#2b2b5f\]:is(.dark *){--tw-gradient-from:#2b2b5f;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-amber-300:is(.dark *){--tw-gradient-from:var(--color-amber-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-amber-600\/20:is(.dark *){--tw-gradient-from:#dd740033}@supports (color:color-mix(in lab,red,red)){.dark\:from-amber-600\/20:is(.dark *){--tw-gradient-from:color-mix(in oklab, var(--color-amber-600) 20%, transparent)}}.dark\:from-amber-600\/20:is(.dark *){--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-emerald-300:is(.dark *){--tw-gradient-from:var(--color-emerald-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-emerald-500\/20:is(.dark *){--tw-gradient-from:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.dark\:from-emerald-500\/20:is(.dark *){--tw-gradient-from:color-mix(in oklab, var(--color-emerald-500) 20%, transparent)}}.dark\:from-emerald-500\/20:is(.dark *){--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-indigo-300:is(.dark *){--tw-gradient-from:var(--color-indigo-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-indigo-500\/20:is(.dark *){--tw-gradient-from:#625fff33}@supports (color:color-mix(in lab,red,red)){.dark\:from-indigo-500\/20:is(.dark *){--tw-gradient-from:color-mix(in oklab, var(--color-indigo-500) 20%, transparent)}}.dark\:from-indigo-500\/20:is(.dark *){--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-purple-300:is(.dark *){--tw-gradient-from:var(--color-purple-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-purple-500\/20:is(.dark *){--tw-gradient-from:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.dark\:from-purple-500\/20:is(.dark *){--tw-gradient-from:color-mix(in oklab, var(--color-purple-500) 20%, transparent)}}.dark\:from-purple-500\/20:is(.dark *){--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-sky-300:is(.dark *){--tw-gradient-from:var(--color-violet-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-sky-500\/20:is(.dark *){--tw-gradient-from:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.dark\:from-sky-500\/20:is(.dark *){--tw-gradient-from:color-mix(in oklab, var(--color-violet-500) 20%, transparent)}}.dark\:from-sky-500\/20:is(.dark *){--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:via-cyan-500\/10:is(.dark *){--tw-gradient-via:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.dark\:via-cyan-500\/10:is(.dark *){--tw-gradient-via:color-mix(in oklab, var(--color-cyan-500) 10%, transparent)}}.dark\:via-cyan-500\/10:is(.dark *){--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.dark\:via-fuchsia-500\/10:is(.dark *){--tw-gradient-via:#e12afb1a}@supports (color:color-mix(in lab,red,red)){.dark\:via-fuchsia-500\/10:is(.dark *){--tw-gradient-via:color-mix(in oklab, var(--color-fuchsia-500) 10%, transparent)}}.dark\:via-fuchsia-500\/10:is(.dark *){--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.dark\:via-orange-500\/10:is(.dark *){--tw-gradient-via:#fe6e001a}@supports (color:color-mix(in lab,red,red)){.dark\:via-orange-500\/10:is(.dark *){--tw-gradient-via:color-mix(in oklab, var(--color-orange-500) 10%, transparent)}}.dark\:via-orange-500\/10:is(.dark *){--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.dark\:via-purple-500\/10:is(.dark *){--tw-gradient-via:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.dark\:via-purple-500\/10:is(.dark *){--tw-gradient-via:color-mix(in oklab, var(--color-purple-500) 10%, transparent)}}.dark\:via-purple-500\/10:is(.dark *){--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.dark\:via-teal-500\/10:is(.dark *){--tw-gradient-via:#00baa71a}@supports (color:color-mix(in lab,red,red)){.dark\:via-teal-500\/10:is(.dark *){--tw-gradient-via:color-mix(in oklab, var(--color-teal-500) 10%, transparent)}}.dark\:via-teal-500\/10:is(.dark *){--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.dark\:to-cyan-200:is(.dark *){--tw-gradient-to:var(--color-cyan-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:to-fuchsia-200:is(.dark *){--tw-gradient-to:var(--color-fuchsia-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:to-orange-200:is(.dark *){--tw-gradient-to:var(--color-orange-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:to-orange-900\/10:is(.dark *){--tw-gradient-to:#7e2a0c1a}@supports (color:color-mix(in lab,red,red)){.dark\:to-orange-900\/10:is(.dark *){--tw-gradient-to:color-mix(in oklab, var(--color-orange-900) 10%, transparent)}}.dark\:to-orange-900\/10:is(.dark *){--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:to-purple-200:is(.dark *){--tw-gradient-to:var(--color-purple-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:to-purple-900\/10:is(.dark *){--tw-gradient-to:#59168b1a}@supports (color:color-mix(in lab,red,red)){.dark\:to-purple-900\/10:is(.dark *){--tw-gradient-to:color-mix(in oklab, var(--color-purple-900) 10%, transparent)}}.dark\:to-purple-900\/10:is(.dark *){--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:to-sky-900\/10:is(.dark *){--tw-gradient-to:#4d179a1a}@supports (color:color-mix(in lab,red,red)){.dark\:to-sky-900\/10:is(.dark *){--tw-gradient-to:color-mix(in oklab, var(--color-violet-900) 10%, transparent)}}.dark\:to-sky-900\/10:is(.dark *){--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:to-teal-200:is(.dark *){--tw-gradient-to:var(--color-teal-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:to-teal-900\/10:is(.dark *){--tw-gradient-to:#0b4f4a1a}@supports (color:color-mix(in lab,red,red)){.dark\:to-teal-900\/10:is(.dark *){--tw-gradient-to:color-mix(in oklab, var(--color-teal-900) 10%, transparent)}}.dark\:to-teal-900\/10:is(.dark *){--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:text-\[\#4bc1f2\]:is(.dark *){color:#4bc1f2}.dark\:text-\[\#7ad8ff\]:is(.dark *){color:#7ad8ff}.dark\:text-\[\#7f88a3\]:is(.dark *){color:#7f88a3}.dark\:text-\[\#8b95ad\]:is(.dark *){color:#8b95ad}.dark\:text-\[\#9aa4be\]:is(.dark *){color:#9aa4be}.dark\:text-\[\#9da7bf\]:is(.dark *){color:#9da7bf}.dark\:text-\[\#9e8fff\]:is(.dark *){color:#9e8fff}.dark\:text-\[\#95a0bb\]:is(.dark *){color:#95a0bb}.dark\:text-\[\#98a2bc\]:is(.dark *){color:#98a2bc}.dark\:text-\[\#a8b2c9\]:is(.dark *){color:#a8b2c9}.dark\:text-\[\#a9b3ca\]:is(.dark *){color:#a9b3ca}.dark\:text-\[\#a35ceb\]:is(.dark *){color:#a35ceb}.dark\:text-\[\#aab3c7\]:is(.dark *){color:#aab3c7}.dark\:text-\[\#b2bad0\]:is(.dark *){color:#b2bad0}.dark\:text-\[\#c48bfc\]:is(.dark *){color:#c48bfc}.dark\:text-\[\#d3a8ff\]:is(.dark *){color:#d3a8ff}.dark\:text-\[\#e4e7f1\]:is(.dark *){color:#e4e7f1}.dark\:text-\[\#ecf0fb\]:is(.dark *){color:#ecf0fb}.dark\:text-\[\#f5f7fb\]:is(.dark *){color:#f5f7fb}.dark\:text-amber-100:is(.dark *){color:var(--color-amber-100)}.dark\:text-amber-100\/70:is(.dark *){color:#fef3c6b3}@supports (color:color-mix(in lab,red,red)){.dark\:text-amber-100\/70:is(.dark *){color:color-mix(in oklab,var(--color-amber-100) 70%,transparent)}}.dark\:text-amber-100\/90:is(.dark *){color:#fef3c6e6}@supports (color:color-mix(in lab,red,red)){.dark\:text-amber-100\/90:is(.dark *){color:color-mix(in oklab,var(--color-amber-100) 90%,transparent)}}.dark\:text-amber-200:is(.dark *){color:var(--color-amber-200)}.dark\:text-amber-300:is(.dark *){color:var(--color-amber-300)}.dark\:text-amber-400:is(.dark *){color:var(--color-amber-400)}.dark\:text-emerald-100\/70:is(.dark *){color:#d0fae5b3}@supports (color:color-mix(in lab,red,red)){.dark\:text-emerald-100\/70:is(.dark *){color:color-mix(in oklab,var(--color-emerald-100) 70%,transparent)}}.dark\:text-emerald-300:is(.dark *){color:var(--color-emerald-300)}.dark\:text-emerald-400:is(.dark *){color:var(--color-emerald-400)}.dark\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.dark\:text-indigo-100\/70:is(.dark *){color:#e0e7ffb3}@supports (color:color-mix(in lab,red,red)){.dark\:text-indigo-100\/70:is(.dark *){color:color-mix(in oklab,var(--color-indigo-100) 70%,transparent)}}.dark\:text-indigo-300:is(.dark *){color:var(--color-indigo-300)}.dark\:text-indigo-400:is(.dark *){color:var(--color-indigo-400)}.dark\:text-muted-foreground:is(.dark *){color:var(--muted-foreground)}.dark\:text-purple-300:is(.dark *){color:var(--color-purple-300)}.dark\:text-purple-400:is(.dark *){color:var(--color-purple-400)}.dark\:text-purple-400\/80:is(.dark *){color:#c07effcc}@supports (color:color-mix(in lab,red,red)){.dark\:text-purple-400\/80:is(.dark *){color:color-mix(in oklab,var(--color-purple-400) 80%,transparent)}}.dark\:text-rose-300:is(.dark *){color:var(--color-rose-300)}.dark\:text-rose-400:is(.dark *){color:var(--color-rose-400)}.dark\:text-sky-300:is(.dark *){color:var(--color-violet-300)}.dark\:text-sky-400:is(.dark *){color:var(--color-violet-400)}.dark\:text-sky-400\/80:is(.dark *){color:#a685ffcc}@supports (color:color-mix(in lab,red,red)){.dark\:text-sky-400\/80:is(.dark *){color:color-mix(in oklab,var(--color-violet-400) 80%,transparent)}}.dark\:text-slate-200:is(.dark *){color:var(--color-slate-200)}.dark\:text-slate-400:is(.dark *){color:var(--color-slate-400)}.dark\:text-violet-400:is(.dark *){color:var(--color-violet-400)}.dark\:text-yellow-300:is(.dark *){color:var(--color-yellow-300)}.dark\:opacity-10:is(.dark *){opacity:.1}.dark\:opacity-\[0\.25\]:is(.dark *){opacity:.25}.dark\:mix-blend-screen:is(.dark *){mix-blend-mode:screen}.dark\:shadow-\[0_12px_24px_rgba\(0\,0\,0\,0\.22\)\]:is(.dark *){--tw-shadow:0 12px 24px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.dark\:ring-offset-\[\#0B0F19\]:is(.dark *){--tw-ring-offset-color:#0b0f19}@media(hover:hover){.dark\:hover\:bg-\[\#1FA7E1\]\/10:is(.dark *):hover{background-color:#1fa7e11a}.dark\:hover\:bg-\[\#8A3FD3\]\/10:is(.dark *):hover{background-color:#8a3fd31a}.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.dark\:hover\:bg-black\/50:is(.dark *):hover{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-black\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.dark\:hover\:bg-black\/60:is(.dark *):hover{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-black\/60:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.dark\:hover\:bg-emerald-500\/20:is(.dark *):hover{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-emerald-500\/20:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--input) 50%,transparent)}}.dark\:hover\:bg-rose-900\/30:is(.dark *):hover{background-color:#8b08364d}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-rose-900\/30:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-rose-900) 30%,transparent)}}.dark\:hover\:bg-slate-800:is(.dark *):hover{background-color:var(--color-slate-800)}}.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:data-\[active\=true\]\:aria-invalid\:ring-destructive\/40:is(.dark *)[data-active=true][aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[active\=true\]\:aria-invalid\:ring-destructive\/40:is(.dark *)[data-active=true][aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:data-\[state\=active\]\:border-input:is(.dark *)[data-state=active]{border-color:var(--input)}.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:color-mix(in oklab,var(--input) 30%,transparent)}}.dark\:data-\[state\=active\]\:text-foreground:is(.dark *)[data-state=active]{color:var(--foreground)}.dark\:data-\[state\=checked\]\:bg-primary:is(.dark *)[data-state=checked]{background-color:var(--primary)}.dark\:data-\[state\=checked\]\:bg-primary-foreground:is(.dark *)[data-state=checked]{background-color:var(--primary-foreground)}.dark\:data-\[state\=unchecked\]\:bg-card-foreground:is(.dark *)[data-state=unchecked]{background-color:var(--card-foreground)}.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:color-mix(in oklab,var(--input) 80%,transparent)}}.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--destructive) 20%,transparent)}}.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:var(--muted-foreground)}.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke="#ccc"]{stroke:var(--border)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke="#ccc"]{stroke:color-mix(in oklab,var(--border) 50%,transparent)}}.\[\&_\.recharts-curve\.recharts-tooltip-cursor\]\:stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:var(--border)}.\[\&_\.recharts-dot\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-dot[stroke="#fff"]{stroke:#0000}.\[\&_\.recharts-layer\]\:outline-hidden .recharts-layer{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.\[\&_\.recharts-layer\]\:outline-hidden .recharts-layer{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.recharts-polar-grid_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-polar-grid [stroke="#ccc"]{stroke:var(--border)}.\[\&_\.recharts-radial-bar-background-sector\]\:fill-muted .recharts-radial-bar-background-sector,.\[\&_\.recharts-rectangle\.recharts-tooltip-cursor\]\:fill-muted .recharts-rectangle.recharts-tooltip-cursor{fill:var(--muted)}.\[\&_\.recharts-reference-line_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-reference-line [stroke="#ccc"]{stroke:var(--border)}.\[\&_\.recharts-sector\]\:outline-hidden .recharts-sector{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.\[\&_\.recharts-sector\]\:outline-hidden .recharts-sector{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.recharts-sector\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-sector[stroke="#fff"]{stroke:#0000}.\[\&_\.recharts-surface\]\:outline-hidden .recharts-surface{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.\[\&_\.recharts-surface\]\:outline-hidden .recharts-surface{outline-offset:2px;outline:2px solid #0000}}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing) * 0)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing) * 12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-block:calc(var(--spacing) * 3)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing) * 5)}.\[\&_p\]\:m-0 p{margin:calc(var(--spacing) * 0)}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_strong\]\:font-semibold strong{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:var(--muted-foreground)}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display:none}.\[\&\:has\(\>\.day-range-end\)\]\:rounded-r-md:has(>.day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\>\.day-range-start\)\]\:rounded-l-md:has(>.day-range-start){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:rounded-md:has([aria-selected]){border-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){background-color:var(--accent)}.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:first-child:has([aria-selected]){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:last-child:has([aria-selected]),.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:calc(var(--spacing) * 0)}.\[\.border-b\]\:pb-6.border-b{padding-bottom:calc(var(--spacing) * 6)}.\[\.border-t\]\:pt-6.border-t{padding-top:calc(var(--spacing) * 6)}:is(.\*\:\[span\]\:last\:flex>*):is(span):last-child{display:flex}:is(.\*\:\[span\]\:last\:items-center>*):is(span):last-child{align-items:center}:is(.\*\:\[span\]\:last\:gap-2>*):is(span):last-child{gap:calc(var(--spacing) * 2)}:is(.data-\[variant\=destructive\]\:\*\:\[svg\]\:\!text-destructive[data-variant=destructive]>*):is(svg){color:var(--destructive)!important}.\[\&\:last-child\]\:pb-6:last-child{padding-bottom:calc(var(--spacing) * 6)}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>button\]\:hidden>button{display:none}.\[\&\>span\:last-child\]\:truncate>span:last-child{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.\[\&\>svg\]\:pointer-events-none>svg{pointer-events:none}.\[\&\>svg\]\:size-3>svg{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&\>svg\]\:size-3\.5>svg{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&\>svg\]\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\>svg\]\:h-2\.5>svg{height:calc(var(--spacing) * 2.5)}.\[\&\>svg\]\:h-3>svg{height:calc(var(--spacing) * 3)}.\[\&\>svg\]\:w-2\.5>svg{width:calc(var(--spacing) * 2.5)}.\[\&\>svg\]\:w-3>svg{width:calc(var(--spacing) * 3)}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>svg\]\:translate-y-0\.5>svg{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>svg\]\:text-current>svg{color:currentColor}.\[\&\>svg\]\:text-muted-foreground>svg{color:var(--muted-foreground)}.\[\&\>svg\]\:text-sidebar-accent-foreground>svg{color:var(--sidebar-accent-foreground)}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&\[data-panel-group-direction\=vertical\]\>div\]\:rotate-90[data-panel-group-direction=vertical]>div{rotate:90deg}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{rotate:180deg}[data-side=left][data-collapsible=offcanvas] .\[\[data-side\=left\]\[data-collapsible\=offcanvas\]_\&\]\:-right-2{right:calc(var(--spacing) * -2)}[data-side=left][data-state=collapsed] .\[\[data-side\=left\]\[data-state\=collapsed\]_\&\]\:cursor-e-resize{cursor:e-resize}[data-side=right][data-collapsible=offcanvas] .\[\[data-side\=right\]\[data-collapsible\=offcanvas\]_\&\]\:-left-2{left:calc(var(--spacing) * -2)}[data-side=right][data-state=collapsed] .\[\[data-side\=right\]\[data-state\=collapsed\]_\&\]\:cursor-w-resize{cursor:w-resize}@media(hover:hover){a.\[a\&\]\:hover\:bg-accent:hover{background-color:var(--accent)}a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive) 90%,transparent)}}a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary) 90%,transparent)}}a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:color-mix(in oklab,var(--secondary) 90%,transparent)}}a.\[a\&\]\:hover\:text-accent-foreground:hover{color:var(--accent-foreground)}}}:root{--font-size:16px;--font-display:"Nunito", ui-sans-serif, system-ui, sans-serif;--font-body:"Nunito", ui-sans-serif, system-ui, sans-serif;--background:#f7f9fc;--foreground:#0a1628;--card:#fff;--card-foreground:#0a1628;--popover:#fff;--popover-foreground:#0a1628;--amethyst:#9956de;--slate-blue:#7274ed;--summer-sky:#1fa7e1;--downy:#6ed1cf;--pastel-green:#75d06a;--texas-rose:#ffb356;--mona-lisa:#ff8b8b;--illusion:#fb96bb;--primary:#9956de;--primary-foreground:#fff;--secondary:#7274ed;--secondary-foreground:#fff;--muted:#f4f4f5;--muted-foreground:#71717a;--accent:#1fa7e1;--accent-foreground:#fff;--destructive:#ff8b8b;--destructive-foreground:#fff;--border:#e4e4e7;--input:transparent;--input-background:#f4f4f5;--switch-background:#d4d4d8;--font-weight-medium:500;--font-weight-normal:400;--ring:#9956de;--chart-1:#9956de;--chart-2:#ff8b8b;--chart-3:#75d06a;--chart-4:#ffb356;--chart-5:#1fa7e1;--radius:1.25rem;--sidebar:#fff;--sidebar-foreground:#09090b;--sidebar-primary:#7c3aed;--sidebar-primary-foreground:#fff;--sidebar-accent:#f3f0ff;--sidebar-accent-foreground:#5b21b6;--sidebar-border:#e4e4e7;--sidebar-ring:#7c3aed}.dark{--background:#050d18;--foreground:#f0f7ff;--card:#0a1628;--card-foreground:#f0f7ff;--popover:#0a1628;--popover-foreground:#f0f7ff;--primary:#a78bfa;--primary-foreground:#fff;--secondary:#2e1065;--secondary-foreground:#c4b5fd;--muted:#27272a;--muted-foreground:#a1a1aa;--accent:#27272a;--accent-foreground:#f43f5e;--destructive:#ef4444;--destructive-foreground:#09090b;--border:#27272a;--input:#27272a;--input-background:#27272a;--switch-background:#3f3f46;--ring:#a78bfa;--font-weight-medium:500;--font-weight-normal:400;--chart-1:#a78bfa;--chart-2:#fb7185;--chart-3:#34d399;--chart-4:#fb923c;--chart-5:#38bdf8;--sidebar:#09090b;--sidebar-foreground:#fafafa;--sidebar-primary:#a78bfa;--sidebar-primary-foreground:#fff;--sidebar-accent:#27272a;--sidebar-accent-foreground:#fafafa;--sidebar-border:#27272a;--sidebar-ring:#a78bfa}html{font-size:var(--font-size)}html,body,#root{height:100%}html[data-density=compact]{--radius:.9rem}html.reduced-motion *,html.reduced-motion :before,html.reduced-motion :after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}html.smart-dark{filter:invert()hue-rotate(180deg);background:#101217}html.smart-dark img,html.smart-dark picture,html.smart-dark video,html.smart-dark canvas,html.smart-dark svg,html.smart-dark iframe,html.smart-dark [data-preserve-color=true]{filter:invert()hue-rotate(180deg)}.font-display{font-family:var(--font-display)}.font-body{font-family:var(--font-body)}.glow-blue{box-shadow:0 0 24px #0284c71f,0 0 64px #0284c70a}.glow-violet{box-shadow:0 0 24px #7c3aed1f,0 0 64px #7c3aed0a}.glow-rose{box-shadow:0 0 24px #f43f5e1f,0 0 64px #f43f5e0a}.glow-emerald{box-shadow:0 0 24px #0596691f,0 0 64px #0596690a}.bg-dot-pattern{background-image:radial-gradient(circle,#7c3aed14 1px,#0000 1px);background-size:24px 24px}.dark .bg-dot-pattern{background-image:radial-gradient(circle,#a78bfa1f 1px,#0000 1px)}.bg-math-pattern{background-color:var(--background);background-image:url("data:image/svg+xml,%3Csvg width='150' height='150' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='rgba(124, 58, 237, 0.05)' font-family='sans-serif' font-weight='bold' font-size='28'%3E%3Ctext x='20' y='40'%3E%2B%3C/text%3E%3Ctext x='90' y='60'%3E%3D%3C/text%3E%3Ctext x='40' y='110'%3E%25%3C/text%3E%3Ctext x='110' y='130'%3E%C3%97%3C/text%3E%3Ctext x='130' y='30'%3E%C3%B7%3C/text%3E%3C/g%3E%3C/svg%3E");background-size:150px 150px}.bg-noise{position:relative}.bg-noise:before{content:"";opacity:.03;pointer-events:none;z-index:1;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");position:absolute;inset:0}.card-elevated{box-shadow:0 16px 40px -8px #7c3aed26,0 0 24px -5px #7c3aed14}.card-elevated-lg{box-shadow:0 24px 60px -12px #7c3aed33,0 0 32px -10px #7c3aed1a}.shadow-3d-button{box-shadow:0 12px 24px -6px var(--tw-shadow-color,#f9731666),0 6px 12px -4px var(--tw-shadow-color,#f973164d)}.dark .card-elevated{box-shadow:0 1px 2px #0003,0 4px 16px #00000026}.dark .card-elevated-lg{box-shadow:0 2px 4px #0003,0 8px 32px #0003}*{scrollbar-width:thin;scrollbar-color:transparent transparent}:hover{scrollbar-color:#0284c733 transparent}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background-color:#0000;border-radius:10px;transition:background-color .3s}:hover::-webkit-scrollbar-thumb{background-color:#0284c733}::-webkit-scrollbar-thumb:hover{background-color:#0284c766}.scrollbar-hide{scrollbar-width:none;-ms-overflow-style:none}.scrollbar-hide::-webkit-scrollbar{display:none}.accent-line{position:relative}.accent-line:after{content:"";background:linear-gradient(90deg,#0284c7,#f43f5e);border-radius:2px;width:48px;height:3px;position:absolute;bottom:0;left:0}.surface-raised{background:linear-gradient(135deg,#fff,#f8fafc);border:1px solid #e2e8f0cc}.surface-inset{background:linear-gradient(135deg,#f1f5f9,#e8eef6);border:1px solid #cbd5e180}.bg-white-20{background-color:#fff3}.bg-white-15{background-color:#ffffff26}.bg-black-15{background-color:#00000026}.e-w{width:var(--w)}.e-bg{background-color:var(--bg)}.e-color{color:var(--c);fill:var(--c);stroke:var(--c)}.e-grid-cols{grid-template-columns:var(--grid-cols)}.e-perspective{perspective:var(--perspective)}.e-transform{transform:var(--tr)}.e-left-top{left:var(--left);top:var(--top)}.e-z{z-index:var(--z)}.e-filter{filter:var(--filter)}.e-opacity{opacity:var(--o)}.no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.no-scrollbar::-webkit-scrollbar{display:none}.module-detail-grid-pattern{opacity:.1;pointer-events:none;background-image:repeating-linear-gradient(0deg,#0000,#0000 39px,#fff 39px 40px),repeating-linear-gradient(90deg,#0000,#0000 39px,#fff 39px 40px)}.leaderboard-mask{-webkit-mask-image:linear-gradient(#0000,#000 15%);mask-image:linear-gradient(#0000,#000 15%)}.app-loader-screen{z-index:50;background:#f7f9fc;justify-content:center;align-items:center;padding:1rem;display:flex;position:fixed;inset:0}.app-loader-card{background:#fff;border:1px solid #dde3eb;border-radius:2rem;flex-direction:column;align-items:center;gap:1.5rem;width:min(100%,24rem);padding:2rem;display:flex;box-shadow:0 24px 40px #38bdf81f}.app-loader-avatar-shell{background:linear-gradient(135deg,#e0f2fe,#e0e7ff);border:2px solid #fff;border-radius:1.5rem;justify-content:center;align-items:center;width:6rem;height:6rem;display:flex;box-shadow:0 12px 24px #0f172a1f}.app-loader-avatar{object-fit:contain;filter:drop-shadow(0 8px 12px #0f172a33);width:4rem;height:4rem}.app-loader-bot-icon{width:4rem;height:4rem}.app-loader-title{color:#0a1628;margin:0;font-size:1.25rem;font-weight:700}.app-loader-message-row{justify-content:center;align-items:center;gap:.5rem;margin-top:.5rem;display:flex}.app-loader-spinner{border:2px solid #0284c7;border-top-color:#0000;border-radius:999px;width:1rem;height:1rem}.app-loader-message{color:#64748b;margin:0;font-size:.875rem;font-weight:600}.avatar-gloss{clip-path:polygon(15% 0,85% 0,65% 100%,35% 100%);pointer-events:none;background:linear-gradient(#fff6,#ffffff0d 60%,#0000)}.login-bg{background:linear-gradient(135deg,#f0f9ff,#f8fafc,#fff1f2 60%,#f0f9ff)}.login-frost-overlay{pointer-events:none;background:radial-gradient(at 30%,#f0f9ff33,#f8fafc80 50%,#fff1f266 80%,#f8fafcd9)}.login-orb-purple{background:radial-gradient(circle,#a855f74d,#0000 70%)}.login-orb-pink{background:radial-gradient(circle,#ec489940,#0000 70%)}.login-orb-blue{background:radial-gradient(circle,#38bdf833,#0000 70%)}.dynamic-header{background-color:var(--bg);-webkit-backdrop-filter:blur(var(--blur));backdrop-filter:blur(var(--blur));box-shadow:var(--shadow)}.e-max-h{max-height:var(--max-h);transition:max-height .22s;overflow:hidden}.hero-clip-inset{clip-path:inset(-100% -50% 0)}.card-3d{transform-origin:0;backface-visibility:hidden;transition:transform 2s ease-in-out}.card-accent-sky{border-left:3px solid #0284c7}.card-accent-rose{border-left:3px solid #f43f5e}.card-accent-emerald{border-left:3px solid #059669}.app-loader-copy{text-align:center}@keyframes float{0%,to{transform:translateY(0)}50%{transform:translateY(-10px)}}@keyframes sunburst-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-sunburst-spin{animation:30s linear infinite sunburst-spin}.chat-markdown{font-family:var(--font-body);overflow-wrap:anywhere;word-break:break-word;font-size:.875rem;line-height:1.625}.chat-markdown h1{font-family:var(--font-display);color:var(--foreground);margin-top:.75rem;margin-bottom:.5rem;font-size:1.25rem;font-weight:700}.chat-markdown h2{font-family:var(--font-display);color:var(--foreground);margin-top:.75rem;margin-bottom:.375rem;font-size:1.1rem;font-weight:700}.chat-markdown h3{font-family:var(--font-display);color:var(--muted-foreground);margin-top:.5rem;margin-bottom:.25rem;font-size:1rem;font-weight:600}.chat-markdown p{margin-top:.375rem;margin-bottom:.375rem}.chat-markdown ul,.chat-markdown ol{margin-top:.375rem;margin-bottom:.375rem;padding-left:1.25rem}.chat-markdown ul{list-style-type:disc}.chat-markdown ol{list-style-type:decimal}.chat-markdown li{margin-top:.125rem;margin-bottom:.125rem}.chat-markdown strong{color:var(--foreground);font-weight:700}.chat-markdown em{font-style:italic}.chat-markdown code{background:var(--secondary);color:var(--primary);border-radius:.25rem;padding:.125rem .375rem;font-size:.8125rem}.chat-markdown pre{background:var(--muted);border:1px solid var(--border);border-radius:.5rem;margin-top:.5rem;margin-bottom:.5rem;padding:.75rem;overflow-x:auto}.chat-markdown pre code{color:inherit;background:0 0;padding:0}.chat-markdown hr{border-color:#94a3b873;margin:.75rem 0}.chat-markdown table{border-collapse:collapse;width:100%;margin:.5rem 0;font-size:.8125rem}.chat-markdown th{background:var(--muted);text-align:left;border:1px solid var(--border);padding:.375rem .5rem;font-weight:600}.chat-markdown td{border:1px solid var(--border);padding:.375rem .5rem}.chat-markdown blockquote{border-left:3px solid var(--primary);color:var(--muted-foreground);margin:.5rem 0;padding-left:.75rem;font-style:italic}.chat-markdown a{color:var(--primary);text-decoration:underline}.chat-markdown>:first-child{margin-top:0}.chat-markdown>:last-child{margin-bottom:0}.chat-markdown .katex-display{padding-bottom:.15rem;overflow:auto hidden}@property --tw-border-spacing-x{syntax:"";inherits:false;initial-value:0}@property --tw-border-spacing-y{syntax:"";inherits:false;initial-value:0}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-scroll-snap-strictness{syntax:"*";inherits:false;initial-value:proximity}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}} diff --git a/assets/index-D6SUtGjv.js b/assets/index-CPnajj72.js similarity index 96% rename from assets/index-D6SUtGjv.js rename to assets/index-CPnajj72.js index 7a182a1de5996911e6d781e1cb8403e0376ceb20..0200715663c710771340755a305fc108dca2f206 100644 --- a/assets/index-D6SUtGjv.js +++ b/assets/index-CPnajj72.js @@ -1,4 +1,4 @@ -import{c as C,G as l,H as S,n as j,Z as W,F as _}from"./index-fWY85Kyg.js";import{N as it,I as ct}from"./index-fWY85Kyg.js";import{j as i,r as x}from"./vendor-react-B4AQeu28.js";import{C as T,a as F}from"./circle-alert-KkqOOEPJ.js";import{B as A}from"./book-open-D5mR6gz9.js";import{B as M}from"./bell-BwBudSvY.js";import{C as O}from"./circle-check-big-Qn5jJKfH.js";import{C as R}from"./clipboard-check-DbpvA-N4.js";import{T as z}from"./trending-up-Do7UgIZi.js";import{T as X}from"./trophy-fJOOsc_0.js";import{T as E}from"./trash-2-PgvGautk.js";import{X as I}from"./x-BLLfAvOF.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";/** +import{c as C,G as l,H as S,n as j,Z as W,F as _}from"./index-Du57tmo9.js";import{N as it,I as ct}from"./index-Du57tmo9.js";import{j as i,r as x}from"./vendor-react-B4AQeu28.js";import{C as T,a as F}from"./circle-alert-mPiSlvKL.js";import{B as A}from"./book-open-cmOvedFO.js";import{B as M}from"./bell-CVB0-Rn1.js";import{C as O}from"./circle-check-big-DC9utj0Y.js";import{C as R}from"./clipboard-check-fEagN09v.js";import{T as z}from"./trending-up-BgWHLAjl.js";import{T as X}from"./trophy-8udS7pQx.js";import{T as E}from"./trash-2-uIChez5o.js";import{X as I}from"./x-Cwkkamrh.js";import"./vendor-firebase-auth-BW5XT768.js";import"./vendor-firebase-core-y3En_kpN.js";import"./vendor-firebase-firestore-52DD1vc9.js";import"./vendor-firebase-storage-DNmrKfQ-.js";import"./vendor-firebase-analytics-DZd0u9yk.js";import"./vendor-radix-DnWAlVSW.js";import"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";/** * @license lucide-react v0.487.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/index-CcVKs9hN.css b/assets/index-CcVKs9hN.css deleted file mode 100644 index feb4d5f7b3cf40530d206030372d39c9589225fe..0000000000000000000000000000000000000000 --- a/assets/index-CcVKs9hN.css +++ /dev/null @@ -1 +0,0 @@ -/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-scroll-snap-strictness:proximity;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-900:oklch(40.8% .123 38.172);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-emerald-950:oklch(26.2% .051 172.552);--color-teal-50:oklch(98.4% .014 180.72);--color-teal-100:oklch(95.3% .051 180.801);--color-teal-200:oklch(91% .096 180.426);--color-teal-300:oklch(85.5% .138 181.071);--color-teal-400:oklch(77.7% .152 181.912);--color-teal-500:oklch(70.4% .14 182.503);--color-teal-600:oklch(60% .118 184.704);--color-teal-700:oklch(51.1% .096 186.391);--color-teal-800:oklch(43.7% .078 188.216);--color-teal-900:oklch(38.6% .063 188.416);--color-cyan-50:oklch(98.4% .019 200.873);--color-cyan-100:oklch(95.6% .045 203.388);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-sky-200:var(--color-violet-200);--color-sky-700:var(--color-violet-700);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-indigo-800:oklch(39.8% .195 277.366);--color-indigo-900:oklch(35.9% .144 278.697);--color-violet-50:oklch(96.9% .016 293.756);--color-violet-100:oklch(94.3% .029 294.588);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-600:oklch(54.1% .281 293.009);--color-violet-700:oklch(49.1% .27 292.581);--color-violet-800:oklch(43.2% .232 292.759);--color-violet-900:oklch(38% .189 293.745);--color-violet-950:oklch(28.3% .141 291.089);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-purple-800:oklch(43.8% .218 303.724);--color-purple-900:oklch(38.1% .176 304.987);--color-fuchsia-50:oklch(97.7% .017 320.058);--color-fuchsia-200:oklch(90.3% .076 319.62);--color-fuchsia-400:oklch(74% .238 322.16);--color-fuchsia-500:oklch(66.7% .295 322.15);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-500:oklch(65.6% .241 354.308);--color-pink-600:oklch(59.2% .249 .584);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-rose-700:oklch(51.4% .222 16.935);--color-rose-800:oklch(45.5% .188 13.697);--color-rose-900:oklch(41% .159 10.272);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-700:oklch(37% .013 285.805);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--drop-shadow-sm:0 1px 2px #00000026;--drop-shadow-md:0 3px 3px #0000001f;--drop-shadow-lg:0 4px 4px #00000026;--drop-shadow-xl:0 9px 7px #0000001a;--drop-shadow-2xl:0 25px 25px #00000026;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--animate-bounce:bounce 1s infinite;--blur-sm:8px;--blur-md:12px;--blur-lg:16px;--blur-xl:24px;--blur-2xl:40px;--blur-3xl:64px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-border:var(--border)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}body{background-color:var(--background);color:var(--foreground);font-family:var(--font-body);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;overflow-x:hidden}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h1{font-family:var(--font-display);font-size:var(--text-2xl);letter-spacing:-.02em;font-weight:700;line-height:1.3}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h2{font-family:var(--font-display);font-size:var(--text-xl);letter-spacing:-.01em;font-weight:700;line-height:1.35}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h3{font-family:var(--font-display);font-size:var(--text-lg);font-weight:600;line-height:1.4}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h4{font-family:var(--font-display);font-size:var(--text-base);font-weight:600;line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) label{font-size:var(--text-base);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) button{font-family:var(--font-body);font-size:var(--text-base);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) input{font-family:var(--font-body);font-size:var(--text-base);font-weight:var(--font-weight-normal);line-height:1.5}}@layer components;@layer utilities{.\@container\/card-header{container:card-header/inline-size}.\[container-type\:inline-size\]{container-type:inline-size}.\[container-type\:size\]{container-type:size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.inset-x-6{inset-inline:calc(var(--spacing) * 6)}.inset-x-\[-30px\]{inset-inline:-30px}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.end-1{inset-inline-end:calc(var(--spacing) * 1)}.-top-1{top:calc(var(--spacing) * -1)}.-top-2{top:calc(var(--spacing) * -2)}.-top-3{top:calc(var(--spacing) * -3)}.-top-3\.5{top:calc(var(--spacing) * -3.5)}.-top-4{top:calc(var(--spacing) * -4)}.-top-5{top:calc(var(--spacing) * -5)}.-top-6{top:calc(var(--spacing) * -6)}.-top-8{top:calc(var(--spacing) * -8)}.-top-12{top:calc(var(--spacing) * -12)}.-top-24{top:calc(var(--spacing) * -24)}.-top-40{top:calc(var(--spacing) * -40)}.top-0{top:calc(var(--spacing) * 0)}.top-0\.5{top:calc(var(--spacing) * .5)}.top-1{top:calc(var(--spacing) * 1)}.top-1\.5{top:calc(var(--spacing) * 1.5)}.top-1\/2{top:50%}.top-1\/4{top:25%}.top-2{top:calc(var(--spacing) * 2)}.top-3{top:calc(var(--spacing) * 3)}.top-3\.5{top:calc(var(--spacing) * 3.5)}.top-4{top:calc(var(--spacing) * 4)}.top-5{top:calc(var(--spacing) * 5)}.top-6{top:calc(var(--spacing) * 6)}.top-8{top:calc(var(--spacing) * 8)}.top-24{top:calc(var(--spacing) * 24)}.top-\[-10\%\]{top:-10%}.top-\[-30px\]{top:-30px}.top-\[1px\]{top:1px}.top-\[10\%\]{top:10%}.top-\[40\%\]{top:40%}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-\[540px\]{top:540px}.top-full{top:100%}.-right-1{right:calc(var(--spacing) * -1)}.-right-2{right:calc(var(--spacing) * -2)}.-right-2\.5{right:calc(var(--spacing) * -2.5)}.-right-3{right:calc(var(--spacing) * -3)}.-right-4{right:calc(var(--spacing) * -4)}.-right-5{right:calc(var(--spacing) * -5)}.-right-8{right:calc(var(--spacing) * -8)}.-right-12{right:calc(var(--spacing) * -12)}.-right-24{right:calc(var(--spacing) * -24)}.-right-40{right:calc(var(--spacing) * -40)}.right-0{right:calc(var(--spacing) * 0)}.right-0\.5{right:calc(var(--spacing) * .5)}.right-1{right:calc(var(--spacing) * 1)}.right-1\/3{right:33.3333%}.right-1\/4{right:25%}.right-2{right:calc(var(--spacing) * 2)}.right-2\.5{right:calc(var(--spacing) * 2.5)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.right-6{right:calc(var(--spacing) * 6)}.right-8{right:calc(var(--spacing) * 8)}.right-12{right:calc(var(--spacing) * 12)}.right-16{right:calc(var(--spacing) * 16)}.right-\[-5px\]{right:-5px}.right-\[-10\%\]{right:-10%}.right-\[-15px\]{right:-15px}.right-\[-20\%\]{right:-20%}.right-\[150px\]{right:150px}.right-full{right:100%}.-bottom-1{bottom:calc(var(--spacing) * -1)}.-bottom-2{bottom:calc(var(--spacing) * -2)}.-bottom-2\.5{bottom:calc(var(--spacing) * -2.5)}.-bottom-4{bottom:calc(var(--spacing) * -4)}.-bottom-5{bottom:calc(var(--spacing) * -5)}.-bottom-6{bottom:calc(var(--spacing) * -6)}.-bottom-8{bottom:calc(var(--spacing) * -8)}.-bottom-10{bottom:calc(var(--spacing) * -10)}.-bottom-12{bottom:calc(var(--spacing) * -12)}.-bottom-40{bottom:calc(var(--spacing) * -40)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-2{bottom:calc(var(--spacing) * 2)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-5{bottom:calc(var(--spacing) * 5)}.bottom-8{bottom:calc(var(--spacing) * 8)}.bottom-12{bottom:calc(var(--spacing) * 12)}.bottom-16{bottom:calc(var(--spacing) * 16)}.bottom-\[-10\%\]{bottom:-10%}.bottom-\[40px\]{bottom:40px}.bottom-full{bottom:100%}.-left-1{left:calc(var(--spacing) * -1)}.-left-2{left:calc(var(--spacing) * -2)}.-left-2\.5{left:calc(var(--spacing) * -2.5)}.-left-4{left:calc(var(--spacing) * -4)}.-left-10{left:calc(var(--spacing) * -10)}.-left-12{left:calc(var(--spacing) * -12)}.-left-40{left:calc(var(--spacing) * -40)}.-left-\[150\%\]{left:-150%}.left-0{left:calc(var(--spacing) * 0)}.left-1{left:calc(var(--spacing) * 1)}.left-1\/2{left:50%}.left-1\/3{left:33.3333%}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.left-4{left:calc(var(--spacing) * 4)}.left-6{left:calc(var(--spacing) * 6)}.left-12{left:calc(var(--spacing) * 12)}.left-\[-10\%\]{left:-10%}.left-\[-20px\]{left:-20px}.left-\[40\%\]{left:40%}.left-\[50\%\]{left:50%}.left-\[var\(--x\)\]{left:var(--x)}.left-full{left:100%}.isolate{isolation:isolate}.-z-10{z-index:-10}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[-1\]{z-index:-1}.z-\[1\]{z-index:1}.z-\[2\]{z-index:2}.z-\[3\]{z-index:3}.z-\[4\]{z-index:4}.z-\[11\]{z-index:11}.z-\[12\]{z-index:12}.z-\[13\]{z-index:13}.z-\[50\]{z-index:50}.z-\[51\]{z-index:51}.z-\[60\]{z-index:60}.z-\[70\]{z-index:70}.z-\[80\]{z-index:80}.z-\[100\]{z-index:100}.z-\[110\]{z-index:110}.z-\[120\]{z-index:120}.z-\[130\]{z-index:130}.z-\[200\]{z-index:200}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-12{grid-column:span 12/span 12}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-2{margin:calc(var(--spacing) * 2)}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.-mx-3{margin-inline:calc(var(--spacing) * -3)}.-mx-4{margin-inline:calc(var(--spacing) * -4)}.-mx-\[4px\]{margin-inline:-4px}.mx-0\.5{margin-inline:calc(var(--spacing) * .5)}.mx-1{margin-inline:calc(var(--spacing) * 1)}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mx-3\.5{margin-inline:calc(var(--spacing) * 3.5)}.mx-\[-20px\]{margin-inline:-20px}.mx-\[1px\]{margin-inline:1px}.mx-auto{margin-inline:auto}.my-0\.5{margin-block:calc(var(--spacing) * .5)}.my-1{margin-block:calc(var(--spacing) * 1)}.my-2{margin-block:calc(var(--spacing) * 2)}.my-4{margin-block:calc(var(--spacing) * 4)}.-mt-0\.5{margin-top:calc(var(--spacing) * -.5)}.-mt-1{margin-top:calc(var(--spacing) * -1)}.-mt-3{margin-top:calc(var(--spacing) * -3)}.-mt-4{margin-top:calc(var(--spacing) * -4)}.-mt-10{margin-top:calc(var(--spacing) * -10)}.-mt-24{margin-top:calc(var(--spacing) * -24)}.mt-0{margin-top:calc(var(--spacing) * 0)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-\[-5px\]{margin-top:-5px}.mt-\[-15px\]{margin-top:-15px}.mt-\[5px\]{margin-top:5px}.mt-auto{margin-top:auto}.-mr-3{margin-right:calc(var(--spacing) * -3)}.-mr-10{margin-right:calc(var(--spacing) * -10)}.-mr-24{margin-right:calc(var(--spacing) * -24)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-3{margin-right:calc(var(--spacing) * 3)}.mr-4{margin-right:calc(var(--spacing) * 4)}.-mb-8{margin-bottom:calc(var(--spacing) * -8)}.-mb-10{margin-bottom:calc(var(--spacing) * -10)}.-mb-18{margin-bottom:calc(var(--spacing) * -18)}.-mb-\[1px\]{margin-bottom:-1px}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.mb-\[-10px\]{margin-bottom:-10px}.mb-\[2px\]{margin-bottom:2px}.-ml-3{margin-left:calc(var(--spacing) * -3)}.-ml-4{margin-left:calc(var(--spacing) * -4)}.-ml-10{margin-left:calc(var(--spacing) * -10)}.-ml-18{margin-left:calc(var(--spacing) * -18)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-3{margin-left:calc(var(--spacing) * 3)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-11{margin-left:calc(var(--spacing) * 11)}.ml-12{margin-left:calc(var(--spacing) * 12)}.ml-auto{margin-left:auto}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-3{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-row{display:table-row}.field-sizing-content{field-sizing:content}.\[aspect-ratio\:1\/var\(--aspect-ratio\)\]{aspect-ratio:1/var(--aspect-ratio)}.aspect-\[4\/5\]{aspect-ratio:4/5}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-16{width:calc(var(--spacing) * 16);height:calc(var(--spacing) * 16)}.size-full{width:100%;height:100%}.\[height\:100cqmax\]{height:100cqmax}.h-0{height:calc(var(--spacing) * 0)}.h-1{height:calc(var(--spacing) * 1)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-3\/4{height:75%}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-24{height:calc(var(--spacing) * 24)}.h-28{height:calc(var(--spacing) * 28)}.h-32{height:calc(var(--spacing) * 32)}.h-36{height:calc(var(--spacing) * 36)}.h-40{height:calc(var(--spacing) * 40)}.h-48{height:calc(var(--spacing) * 48)}.h-64{height:calc(var(--spacing) * 64)}.h-80{height:calc(var(--spacing) * 80)}.h-96{height:calc(var(--spacing) * 96)}.h-\[1\.15rem\]{height:1.15rem}.h-\[1px\]{height:1px}.h-\[3px\]{height:3px}.h-\[5px\]{height:5px}.h-\[6px\]{height:6px}.h-\[14px\]{height:14px}.h-\[16px\]{height:16px}.h-\[18px\]{height:18px}.h-\[25px\]{height:25px}.h-\[35px\]{height:35px}.h-\[40\%\]{height:40%}.h-\[40px\]{height:40px}.h-\[45vh\]{height:45vh}.h-\[48px\]{height:48px}.h-\[50px\]{height:50px}.h-\[52px\]{height:52px}.h-\[54px\]{height:54px}.h-\[60\%\]{height:60%}.h-\[60px\]{height:60px}.h-\[70\%\]{height:70%}.h-\[70px\]{height:70px}.h-\[72px\]{height:72px}.h-\[75px\]{height:75px}.h-\[80\%\]{height:80%}.h-\[95vh\]{height:95vh}.h-\[100px\]{height:100px}.h-\[100vh\]{height:100vh}.h-\[105\%\]{height:105%}.h-\[110\%\]{height:110%}.h-\[120\%\]{height:120%}.h-\[120px\]{height:120px}.h-\[125px\]{height:125px}.h-\[140px\]{height:140px}.h-\[155px\]{height:155px}.h-\[185px\]{height:185px}.h-\[205px\]{height:205px}.h-\[250px\]{height:250px}.h-\[280px\]{height:280px}.h-\[300px\]{height:300px}.h-\[350px\]{height:350px}.h-\[400px\]{height:400px}.h-\[420px\]{height:420px}.h-\[500px\]{height:500px}.h-\[calc\(100\%-1px\)\]{height:calc(100% - 1px)}.h-\[calc\(100\%-24px\)\]{height:calc(100% - 24px)}.h-\[var\(--radix-navigation-menu-viewport-height\)\]{height:var(--radix-navigation-menu-viewport-height)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-fit{height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.h-svh{height:100svh}.max-h-\(--radix-context-menu-content-available-height\){max-height:var(--radix-context-menu-content-available-height)}.max-h-\(--radix-dropdown-menu-content-available-height\){max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-\(--radix-select-content-available-height\){max-height:var(--radix-select-content-available-height)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[70vh\]{max-height:70vh}.max-h-\[80vh\]{max-height:80vh}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[300px\]{max-height:300px}.max-h-\[600px\]{max-height:600px}.max-h-\[calc\(85vh-280px\)\]{max-height:calc(85vh - 280px)}.max-h-\[calc\(90vh-200px\)\]{max-height:calc(90vh - 200px)}.max-h-\[calc\(90vh-320px\)\]{max-height:calc(90vh - 320px)}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-24{min-height:calc(var(--spacing) * 24)}.min-h-\[4rem\]{min-height:4rem}.min-h-\[24px\]{min-height:24px}.min-h-\[40px\]{min-height:40px}.min-h-\[44px\]{min-height:44px}.min-h-\[48px\]{min-height:48px}.min-h-\[50vh\]{min-height:50vh}.min-h-\[75px\]{min-height:75px}.min-h-\[78px\]{min-height:78px}.min-h-\[80px\]{min-height:80px}.min-h-\[140px\]{min-height:140px}.min-h-\[170px\]{min-height:170px}.min-h-\[200px\]{min-height:200px}.min-h-\[240px\]{min-height:240px}.min-h-\[250px\]{min-height:250px}.min-h-\[290px\]{min-height:290px}.min-h-\[320px\]{min-height:320px}.min-h-\[450px\]{min-height:450px}.min-h-\[500px\]{min-height:500px}.min-h-\[calc\(100vh-3\.5rem\)\]{min-height:calc(100vh - 3.5rem)}.min-h-dvh{min-height:100dvh}.min-h-screen{min-height:100vh}.min-h-svh{min-height:100svh}.\!w-auto{width:auto!important}.\[width\:100cqh\]{width:100cqh}.\[width\:100cqi\]{width:100cqi}.\[width\:var\(--width\)\]{width:var(--width)}.w-\(--sidebar-width\){width:var(--sidebar-width)}.w-0{width:calc(var(--spacing) * 0)}.w-0\.5{width:calc(var(--spacing) * .5)}.w-1{width:calc(var(--spacing) * 1)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-1\/2{width:50%}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-3\/4{width:75%}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-8\/12{width:66.6667%}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-10\/12{width:83.3333%}.w-11{width:calc(var(--spacing) * 11)}.w-11\/12{width:91.6667%}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-96{width:calc(var(--spacing) * 96)}.w-\[2px\]{width:2px}.w-\[5px\]{width:5px}.w-\[16px\]{width:16px}.w-\[28\%\]{width:28%}.w-\[35\%\]{width:35%}.w-\[35px\]{width:35px}.w-\[40\%\]{width:40%}.w-\[46px\]{width:46px}.w-\[48px\]{width:48px}.w-\[52px\]{width:52px}.w-\[55\%\]{width:55%}.w-\[55px\]{width:55px}.w-\[56px\]{width:56px}.w-\[60\%\]{width:60%}.w-\[60px\]{width:60px}.w-\[65px\]{width:65px}.w-\[70\%\]{width:70%}.w-\[70px\]{width:70px}.w-\[75px\]{width:75px}.w-\[78px\]{width:78px}.w-\[85\%\]{width:85%}.w-\[90\%\]{width:90%}.w-\[95\%\]{width:95%}.w-\[100\%\]{width:100%}.w-\[100px\]{width:100px}.w-\[110\%\]{width:110%}.w-\[150px\]{width:150px}.w-\[150vw\]{width:150vw}.w-\[180px\]{width:180px}.w-\[200px\]{width:200px}.w-\[220px\]{width:220px}.w-\[260px\]{width:260px}.w-\[280px\]{width:280px}.w-\[300px\]{width:300px}.w-\[320px\]{width:320px}.w-\[400px\]{width:400px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.max-w-\(--skeleton-width\){max-width:var(--skeleton-width)}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-20{max-width:calc(var(--spacing) * 20)}.max-w-\[18rem\]{max-width:18rem}.max-w-\[19rem\]{max-width:19rem}.max-w-\[22rem\]{max-width:22rem}.max-w-\[36rem\]{max-width:36rem}.max-w-\[48\%\]{max-width:48%}.max-w-\[50rem\]{max-width:50rem}.max-w-\[70\%\]{max-width:70%}.max-w-\[75\%\]{max-width:75%}.max-w-\[80px\]{max-width:80px}.max-w-\[90\%\]{max-width:90%}.max-w-\[120px\]{max-width:120px}.max-w-\[140px\]{max-width:140px}.max-w-\[145px\]{max-width:145px}.max-w-\[180px\]{max-width:180px}.max-w-\[190px\]{max-width:190px}.max-w-\[220px\]{max-width:220px}.max-w-\[280px\]{max-width:280px}.max-w-\[340px\]{max-width:340px}.max-w-\[420px\]{max-width:420px}.max-w-\[450px\]{max-width:450px}.max-w-\[800px\]{max-width:800px}.max-w-\[1000px\]{max-width:1000px}.max-w-\[1400px\]{max-width:1400px}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.max-w-\[calc\(100vw-24px\)\]{max-width:calc(100vw - 24px)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-max{max-width:max-content}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-5{min-width:calc(var(--spacing) * 5)}.min-w-8{min-width:calc(var(--spacing) * 8)}.min-w-9{min-width:calc(var(--spacing) * 9)}.min-w-10{min-width:calc(var(--spacing) * 10)}.min-w-\[8rem\]{min-width:8rem}.min-w-\[12rem\]{min-width:12rem}.min-w-\[18px\]{min-width:18px}.min-w-\[40px\]{min-width:40px}.min-w-\[60px\]{min-width:60px}.min-w-\[72px\]{min-width:72px}.min-w-\[100px\]{min-width:100px}.min-w-\[120px\]{min-width:120px}.min-w-\[140px\]{min-width:140px}.min-w-\[260px\]{min-width:260px}.min-w-\[280px\]{min-width:280px}.min-w-\[760px\]{min-width:760px}.min-w-\[980px\]{min-width:980px}.min-w-\[1920px\]{min-width:1920px}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-full{flex-basis:100%}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.border-spacing-y-2{--tw-border-spacing-y:calc(var(--spacing) * 2);border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.\[transform-origin\:0\%_0\%\]{transform-origin:0 0}.\[transform-origin\:50\%_0\%\]{transform-origin:50% 0}.\[transform-origin\:100\%_0\%\]{transform-origin:100% 0}.origin-\(--radix-context-menu-content-transform-origin\){transform-origin:var(--radix-context-menu-content-transform-origin)}.origin-\(--radix-dropdown-menu-content-transform-origin\){transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.origin-\(--radix-hover-card-content-transform-origin\){transform-origin:var(--radix-hover-card-content-transform-origin)}.origin-\(--radix-menubar-content-transform-origin\){transform-origin:var(--radix-menubar-content-transform-origin)}.origin-\(--radix-popover-content-transform-origin\){transform-origin:var(--radix-popover-content-transform-origin)}.origin-\(--radix-select-content-transform-origin\){transform-origin:var(--radix-select-content-transform-origin)}.origin-\(--radix-tooltip-content-transform-origin\){transform-origin:var(--radix-tooltip-content-transform-origin)}.origin-bottom{transform-origin:bottom}.origin-bottom-right{transform-origin:100% 100%}.origin-left{transform-origin:0}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-1\/3{--tw-translate-x:calc(calc(1 / 3 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-1\/4{--tw-translate-x: -25% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-4{--tw-translate-x:calc(var(--spacing) * -4);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-\[45px\]{--tw-translate-x: -45px ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-px{--tw-translate-x:-1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1\/2{--tw-translate-x: 50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1\/3{--tw-translate-x:calc(1 / 3 * 100%);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1\/4{--tw-translate-x: 25% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[-100\%\]{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[45px\]{--tw-translate-x:45px;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-px{--tw-translate-x:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0\.5{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-1{--tw-translate-y:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-1\/2{--tw-translate-y: 50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-1\/3{--tw-translate-y:calc(1 / 3 * 100%);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-10{--tw-translate-y:calc(var(--spacing) * 10);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[21\%\]{--tw-translate-y:21%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-50\%_-_2px\)\]{--tw-translate-y: calc(-50% - 2px) ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-x-\[-1\]{--tw-scale-x:-1;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-y-75{--tw-scale-y:75%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-y-125{--tw-scale-y:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-y-150{--tw-scale-y:150%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-\[0\.75\]{scale:.75}.scale-\[0\.80\]{scale:.8}.scale-\[0\.98\]{scale:.98}.scale-\[1\.1\]{scale:1.1}.scale-\[1\.02\]{scale:1.02}.scale-\[1\.05\]{scale:1.05}.scale-\[1\.15\]{scale:1.15}.scale-\[1\.25\]{scale:1.25}.-rotate-12{rotate:-12deg}.-rotate-\[15deg\]{rotate:-15deg}.rotate-12{rotate:12deg}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.rotate-\[-3deg\]{rotate:-3deg}.rotate-\[-5deg\]{rotate:-5deg}.rotate-\[15deg\]{rotate:15deg}.-skew-x-12{--tw-skew-x:skewX( -12deg );transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.\[transform\:rotate\(-90deg\)_rotateX\(-90deg\)\]{transform:rotate(-90deg)rotateX(-90deg)}.\[transform\:rotate\(90deg\)_rotateX\(-90deg\)\]{transform:rotate(90deg)rotateX(-90deg)}.\[transform\:rotateX\(-90deg\)\]{transform:rotateX(-90deg)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-bounce{animation:var(--animate-bounce)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-move{cursor:move}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-manipulation{touch-action:manipulation}.touch-none{touch-action:none}.resize{resize:both}.resize-none{resize:none}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness:mandatory}.snap-center{scroll-snap-align:center}.scroll-my-1{scroll-margin-block:calc(var(--spacing) * 1)}.scroll-py-1{scroll-padding-block:calc(var(--spacing) * 1)}.list-inside{list-style-position:inside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{appearance:none}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-\[0_1fr\]{grid-template-columns:0 1fr}.grid-cols-\[48px_280px_120px_120px_120px_120px_120px_140px_170px_170px_220px\]{grid-template-columns:48px 280px 120px 120px 120px 120px 120px 140px 170px 170px 220px}.grid-rows-\[auto_auto\]{grid-template-rows:auto auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-items-start{justify-items:start}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-10{gap:calc(var(--spacing) * 10)}.gap-px{gap:1px}:where(.-space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * -.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * -.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-7>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 7) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 7) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-10>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 10) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 10) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-\[1px\]>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(1px * var(--tw-space-y-reverse));margin-block-end:calc(1px * calc(1 - var(--tw-space-y-reverse)))}.gap-x-4{column-gap:calc(var(--spacing) * 4)}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 1) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-x-reverse)))}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:calc(var(--spacing) * 1)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-\[\#dde3eb\]>:not(:last-child)){border-color:#dde3eb}:where(.divide-\[\#edf1f7\]>:not(:last-child)){border-color:#edf1f7}:where(.divide-border>:not(:last-child)){border-color:var(--border)}.self-center{align-self:center}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overflow-y-hidden{overflow-y:hidden}.overscroll-contain{overscroll-behavior:contain}.scroll-smooth{scroll-behavior:smooth}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\[-20px\]{border-radius:-20px}.rounded-\[1\.4rem\]{border-radius:1.4rem}.rounded-\[1\.5rem\]{border-radius:1.5rem}.rounded-\[1rem\]{border-radius:1rem}.rounded-\[2px\]{border-radius:2px}.rounded-\[2rem\]{border-radius:2rem}.rounded-\[4px\]{border-radius:4px}.rounded-\[12px\]{border-radius:12px}.rounded-\[14px\]{border-radius:14px}.rounded-\[16px\]{border-radius:16px}.rounded-\[18px\]{border-radius:18px}.rounded-\[20px\]{border-radius:20px}.rounded-\[22px\]{border-radius:22px}.rounded-\[24px\]{border-radius:24px}.rounded-\[28px\]{border-radius:28px}.rounded-\[32px\]{border-radius:32px}.rounded-\[50\%\]{border-radius:50%}.rounded-\[50\%_50\%_0_0\/100\%_100\%_0_0\]{border-radius:50% 50% 0 0/100% 100% 0 0}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-xs{border-radius:var(--radius-xs)}.rounded-t-2xl{border-top-left-radius:var(--radius-2xl);border-top-right-radius:var(--radius-2xl)}.rounded-t-\[2\.5rem\]{border-top-left-radius:2.5rem;border-top-right-radius:2.5rem}.rounded-t-\[40px\]{border-top-left-radius:40px;border-top-right-radius:40px}.rounded-t-xl{border-top-left-radius:calc(var(--radius) + 4px);border-top-right-radius:calc(var(--radius) + 4px)}.rounded-l-2xl{border-top-left-radius:var(--radius-2xl);border-bottom-left-radius:var(--radius-2xl)}.rounded-l-\[1\.5rem\]{border-top-left-radius:1.5rem;border-bottom-left-radius:1.5rem}.rounded-l-full{border-top-left-radius:3.40282e38px;border-bottom-left-radius:3.40282e38px}.rounded-l-lg{border-top-left-radius:var(--radius);border-bottom-left-radius:var(--radius)}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.rounded-r-2xl{border-top-right-radius:var(--radius-2xl);border-bottom-right-radius:var(--radius-2xl)}.rounded-r-full{border-top-right-radius:3.40282e38px;border-bottom-right-radius:3.40282e38px}.rounded-r-lg{border-top-right-radius:var(--radius);border-bottom-right-radius:var(--radius)}.rounded-b-2xl{border-bottom-right-radius:var(--radius-2xl);border-bottom-left-radius:var(--radius-2xl)}.rounded-b-3xl{border-bottom-right-radius:var(--radius-3xl);border-bottom-left-radius:var(--radius-3xl)}.rounded-b-\[2px\]{border-bottom-right-radius:2px;border-bottom-left-radius:2px}.rounded-b-\[50\%\]{border-bottom-right-radius:50%;border-bottom-left-radius:50%}.rounded-b-\[60px\]{border-bottom-right-radius:60px;border-bottom-left-radius:60px}.rounded-b-md{border-bottom-right-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-br-sm{border-bottom-right-radius:calc(var(--radius) - 4px)}.rounded-bl-none{border-bottom-left-radius:0}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-\[2px\]{border-style:var(--tw-border-style);border-width:2px}.border-\[3px\]{border-style:var(--tw-border-style);border-width:3px}.border-\[4px\]{border-style:var(--tw-border-style);border-width:4px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0{border-top-style:var(--tw-border-style);border-top-width:0}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-t-4{border-top-style:var(--tw-border-style);border-top-width:4px}.border-t-\[6px\]{border-top-style:var(--tw-border-style);border-top-width:6px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-0{border-right-style:var(--tw-border-style);border-right-width:0}.border-r-4{border-right-style:var(--tw-border-style);border-right-width:4px}.border-r-\[6px\]{border-right-style:var(--tw-border-style);border-right-width:6px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-b-4,.border-b-\[4px\]{border-bottom-style:var(--tw-border-style);border-bottom-width:4px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-l-\[6px\]{border-left-style:var(--tw-border-style);border-left-width:6px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-\(--color-border\){border-color:var(--color-border)}.border-\[\#0B0F19\]{border-color:#0b0f19}.border-\[\#1FA7E1\]\/20{border-color:#1fa7e133}.border-\[\#1FA7E1\]\/30{border-color:#1fa7e14d}.border-\[\#1FA7E1\]\/40{border-color:#1fa7e166}.border-\[\#2a3648\]{border-color:#2a3648}.border-\[\#2f384e\]{border-color:#2f384e}.border-\[\#7C3AED\]{border-color:#7c3aed}.border-\[\#8A3FD3\]\/20{border-color:#8a3fd333}.border-\[\#8A3FD3\]\/30{border-color:#8a3fd34d}.border-\[\#8B5CF6\]\/40{border-color:#8b5cf666}.border-\[\#9b51e0\]{border-color:#9b51e0}.border-\[\#75D06A\]{border-color:#75d06a}.border-\[\#75D06A\]\/30{border-color:#75d06a4d}.border-\[\#75D06A\]\/35{border-color:#75d06a59}.border-\[\#75D06A\]\/40{border-color:#75d06a66}.border-\[\#7274ED\]\/30{border-color:#7274ed4d}.border-\[\#9956DE\]{border-color:#9956de}.border-\[\#9956DE\]\/20{border-color:#9956de33}.border-\[\#9956DE\]\/25{border-color:#9956de40}.border-\[\#9956DE\]\/30{border-color:#9956de4d}.border-\[\#9956DE\]\/45{border-color:#9956de73}.border-\[\#F1F5F9\]{border-color:#f1f5f9}.border-\[\#F08386\]{border-color:#f08386}.border-\[\#F08386\]\/30{border-color:#f083864d}.border-\[\#FF8B8B\]{border-color:#ff8b8b}.border-\[\#FF8B8B\]\/35{border-color:#ff8b8b59}.border-\[\#FFB356\]{border-color:#ffb356}.border-\[\#FFB356\]\/30{border-color:#ffb3564d}.border-\[\#FFB356\]\/38{border-color:#ffb35661}.border-\[\#d1cec6\]{border-color:#d1cec6}.border-\[\#dadce0\]{border-color:#dadce0}.border-\[\#dde3eb\]{border-color:#dde3eb}.border-\[\#e67e00\]{border-color:#e67e00}.border-\[\#edf1f7\]{border-color:#edf1f7}.border-\[\#fde68a\]{border-color:#fde68a}.border-\[color-mix\(in_srgb\,var\(--primary\)_30\%\,transparent\)\]{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.border-\[color-mix\(in_srgb\,var\(--primary\)_30\%\,transparent\)\]{border-color:color-mix(in srgb,var(--primary) 30%,transparent)}}.border-amber-200{border-color:var(--color-amber-200)}.border-amber-200\/60{border-color:#fee68599}@supports (color:color-mix(in lab,red,red)){.border-amber-200\/60{border-color:color-mix(in oklab,var(--color-amber-200) 60%,transparent)}}.border-amber-300{border-color:var(--color-amber-300)}.border-amber-300\/50{border-color:#ffd23680}@supports (color:color-mix(in lab,red,red)){.border-amber-300\/50{border-color:color-mix(in oklab,var(--color-amber-300) 50%,transparent)}}.border-amber-400{border-color:var(--color-amber-400)}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/20{border-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500) 30%,transparent)}}.border-blue-300{border-color:var(--color-blue-300)}.border-blue-400\/30{border-color:#54a2ff4d}@supports (color:color-mix(in lab,red,red)){.border-blue-400\/30{border-color:color-mix(in oklab,var(--color-blue-400) 30%,transparent)}}.border-blue-500{border-color:var(--color-blue-500)}.border-border,.border-border\/50{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,var(--border) 50%,transparent)}}.border-border\/80{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/80{border-color:color-mix(in oklab,var(--border) 80%,transparent)}}.border-current{border-color:currentColor}.border-destructive\/20{border-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.border-destructive\/20{border-color:color-mix(in oklab,var(--destructive) 20%,transparent)}}.border-emerald-100{border-color:var(--color-emerald-100)}.border-emerald-200{border-color:var(--color-emerald-200)}.border-emerald-200\/60{border-color:#a4f4cf99}@supports (color:color-mix(in lab,red,red)){.border-emerald-200\/60{border-color:color-mix(in oklab,var(--color-emerald-200) 60%,transparent)}}.border-emerald-300{border-color:var(--color-emerald-300)}.border-emerald-300\/40{border-color:#5ee9b566}@supports (color:color-mix(in lab,red,red)){.border-emerald-300\/40{border-color:color-mix(in oklab,var(--color-emerald-300) 40%,transparent)}}.border-emerald-300\/70{border-color:#5ee9b5b3}@supports (color:color-mix(in lab,red,red)){.border-emerald-300\/70{border-color:color-mix(in oklab,var(--color-emerald-300) 70%,transparent)}}.border-emerald-400{border-color:var(--color-emerald-400)}.border-emerald-400\/30{border-color:#00d2944d}@supports (color:color-mix(in lab,red,red)){.border-emerald-400\/30{border-color:color-mix(in oklab,var(--color-emerald-400) 30%,transparent)}}.border-emerald-500{border-color:var(--color-emerald-500)}.border-emerald-500\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/20{border-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.border-emerald-500\/50{border-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/50{border-color:color-mix(in oklab,var(--color-emerald-500) 50%,transparent)}}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-green-200{border-color:var(--color-green-200)}.border-green-300{border-color:var(--color-green-300)}.border-green-500\/40{border-color:#00c75866}@supports (color:color-mix(in lab,red,red)){.border-green-500\/40{border-color:color-mix(in oklab,var(--color-green-500) 40%,transparent)}}.border-indigo-100{border-color:var(--color-indigo-100)}.border-indigo-200{border-color:var(--color-indigo-200)}.border-indigo-400{border-color:var(--color-indigo-400)}.border-indigo-500{border-color:var(--color-indigo-500)}.border-indigo-500\/20{border-color:#625fff33}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/20{border-color:color-mix(in oklab,var(--color-indigo-500) 20%,transparent)}}.border-indigo-500\/30{border-color:#625fff4d}@supports (color:color-mix(in lab,red,red)){.border-indigo-500\/30{border-color:color-mix(in oklab,var(--color-indigo-500) 30%,transparent)}}.border-input{border-color:var(--input)}.border-muted-foreground\/15{border-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.border-muted-foreground\/15{border-color:color-mix(in oklab,var(--muted-foreground) 15%,transparent)}}.border-orange-200{border-color:var(--color-orange-200)}.border-orange-200\/60{border-color:#ffd7a899}@supports (color:color-mix(in lab,red,red)){.border-orange-200\/60{border-color:color-mix(in oklab,var(--color-orange-200) 60%,transparent)}}.border-orange-300\/50{border-color:#ffb96d80}@supports (color:color-mix(in lab,red,red)){.border-orange-300\/50{border-color:color-mix(in oklab,var(--color-orange-300) 50%,transparent)}}.border-orange-400{border-color:var(--color-orange-400)}.border-orange-500{border-color:var(--color-orange-500)}.border-orange-500\/40{border-color:#fe6e0066}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/40{border-color:color-mix(in oklab,var(--color-orange-500) 40%,transparent)}}.border-primary,.border-primary\/60{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\/60{border-color:color-mix(in oklab,var(--primary) 60%,transparent)}}.border-purple-100{border-color:var(--color-purple-100)}.border-purple-200{border-color:var(--color-purple-200)}.border-purple-300{border-color:var(--color-purple-300)}.border-purple-500\/20{border-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/20{border-color:color-mix(in oklab,var(--color-purple-500) 20%,transparent)}}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500) 30%,transparent)}}.border-purple-600{border-color:var(--color-purple-600)}.border-red-100{border-color:var(--color-red-100)}.border-red-200{border-color:var(--color-red-200)}.border-red-300{border-color:var(--color-red-300)}.border-red-400{border-color:var(--color-red-400)}.border-red-500{border-color:var(--color-red-500)}.border-rose-100{border-color:var(--color-rose-100)}.border-rose-200{border-color:var(--color-rose-200)}.border-rose-200\/50{border-color:#ffccd380}@supports (color:color-mix(in lab,red,red)){.border-rose-200\/50{border-color:color-mix(in oklab,var(--color-rose-200) 50%,transparent)}}.border-rose-200\/60{border-color:#ffccd399}@supports (color:color-mix(in lab,red,red)){.border-rose-200\/60{border-color:color-mix(in oklab,var(--color-rose-200) 60%,transparent)}}.border-rose-300{border-color:var(--color-rose-300)}.border-rose-300\/70{border-color:#ffa2aeb3}@supports (color:color-mix(in lab,red,red)){.border-rose-300\/70{border-color:color-mix(in oklab,var(--color-rose-300) 70%,transparent)}}.border-rose-400{border-color:var(--color-rose-400)}.border-rose-400\/50{border-color:#ff667f80}@supports (color:color-mix(in lab,red,red)){.border-rose-400\/50{border-color:color-mix(in oklab,var(--color-rose-400) 50%,transparent)}}.border-rose-500{border-color:var(--color-rose-500)}.border-rose-500\/20{border-color:#ff235733}@supports (color:color-mix(in lab,red,red)){.border-rose-500\/20{border-color:color-mix(in oklab,var(--color-rose-500) 20%,transparent)}}.border-rose-500\/30{border-color:#ff23574d}@supports (color:color-mix(in lab,red,red)){.border-rose-500\/30{border-color:color-mix(in oklab,var(--color-rose-500) 30%,transparent)}}.border-rose-500\/50{border-color:#ff235780}@supports (color:color-mix(in lab,red,red)){.border-rose-500\/50{border-color:color-mix(in oklab,var(--color-rose-500) 50%,transparent)}}.border-sidebar-border{border-color:var(--sidebar-border)}.border-sky-100{border-color:var(--color-violet-100)}.border-sky-100\/80{border-color:#ede9fecc}@supports (color:color-mix(in lab,red,red)){.border-sky-100\/80{border-color:color-mix(in oklab,var(--color-violet-100) 80%,transparent)}}.border-sky-200{border-color:var(--color-violet-200)}.border-sky-200\/50{border-color:#ddd6ff80}@supports (color:color-mix(in lab,red,red)){.border-sky-200\/50{border-color:color-mix(in oklab,var(--color-violet-200) 50%,transparent)}}.border-sky-200\/60{border-color:#ddd6ff99}@supports (color:color-mix(in lab,red,red)){.border-sky-200\/60{border-color:color-mix(in oklab,var(--color-violet-200) 60%,transparent)}}.border-sky-300{border-color:var(--color-violet-300)}.border-sky-400{border-color:var(--color-violet-400)}.border-sky-500{border-color:var(--color-violet-500)}.border-sky-500\/20{border-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.border-sky-500\/20{border-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.border-sky-500\/30{border-color:#8d54ff4d}@supports (color:color-mix(in lab,red,red)){.border-sky-500\/30{border-color:color-mix(in oklab,var(--color-violet-500) 30%,transparent)}}.border-sky-500\/40{border-color:#8d54ff66}@supports (color:color-mix(in lab,red,red)){.border-sky-500\/40{border-color:color-mix(in oklab,var(--color-violet-500) 40%,transparent)}}.border-slate-50{border-color:var(--color-slate-50)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-100\/50{border-color:#f1f5f980}@supports (color:color-mix(in lab,red,red)){.border-slate-100\/50{border-color:color-mix(in oklab,var(--color-slate-100) 50%,transparent)}}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-200\/60{border-color:#e2e8f099}@supports (color:color-mix(in lab,red,red)){.border-slate-200\/60{border-color:color-mix(in oklab,var(--color-slate-200) 60%,transparent)}}.border-slate-200\/70{border-color:#e2e8f0b3}@supports (color:color-mix(in lab,red,red)){.border-slate-200\/70{border-color:color-mix(in oklab,var(--color-slate-200) 70%,transparent)}}.border-slate-200\/80{border-color:#e2e8f0cc}@supports (color:color-mix(in lab,red,red)){.border-slate-200\/80{border-color:color-mix(in oklab,var(--color-slate-200) 80%,transparent)}}.border-slate-300{border-color:var(--color-slate-300)}.border-slate-300\/30{border-color:#cad5e24d}@supports (color:color-mix(in lab,red,red)){.border-slate-300\/30{border-color:color-mix(in oklab,var(--color-slate-300) 30%,transparent)}}.border-slate-300\/50{border-color:#cad5e280}@supports (color:color-mix(in lab,red,red)){.border-slate-300\/50{border-color:color-mix(in oklab,var(--color-slate-300) 50%,transparent)}}.border-slate-300\/70{border-color:#cad5e2b3}@supports (color:color-mix(in lab,red,red)){.border-slate-300\/70{border-color:color-mix(in oklab,var(--color-slate-300) 70%,transparent)}}.border-slate-700{border-color:var(--color-slate-700)}.border-slate-700\/50{border-color:#31415880}@supports (color:color-mix(in lab,red,red)){.border-slate-700\/50{border-color:color-mix(in oklab,var(--color-slate-700) 50%,transparent)}}.border-slate-800{border-color:var(--color-slate-800)}.border-slate-800\/10{border-color:#1d293d1a}@supports (color:color-mix(in lab,red,red)){.border-slate-800\/10{border-color:color-mix(in oklab,var(--color-slate-800) 10%,transparent)}}.border-teal-400{border-color:var(--color-teal-400)}.border-transparent{border-color:#0000}.border-violet-200{border-color:var(--color-violet-200)}.border-violet-200\/60{border-color:#ddd6ff99}@supports (color:color-mix(in lab,red,red)){.border-violet-200\/60{border-color:color-mix(in oklab,var(--color-violet-200) 60%,transparent)}}.border-violet-800{border-color:var(--color-violet-800)}.border-white{border-color:var(--color-white)}.border-white\/5{border-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.border-white\/5{border-color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.border-white\/10{border-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.border-white\/20{border-color:#fff3}@supports (color:color-mix(in lab,red,red)){.border-white\/20{border-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.border-white\/25{border-color:#ffffff40}@supports (color:color-mix(in lab,red,red)){.border-white\/25{border-color:color-mix(in oklab,var(--color-white) 25%,transparent)}}.border-white\/35{border-color:#ffffff59}@supports (color:color-mix(in lab,red,red)){.border-white\/35{border-color:color-mix(in oklab,var(--color-white) 35%,transparent)}}.border-white\/40{border-color:#fff6}@supports (color:color-mix(in lab,red,red)){.border-white\/40{border-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.border-white\/50{border-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.border-white\/50{border-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.border-yellow-300{border-color:var(--color-yellow-300)}.border-zinc-200{border-color:var(--color-zinc-200)}.border-t-slate-800{border-top-color:var(--color-slate-800)}.border-t-transparent{border-top-color:#0000}.border-t-violet-500{border-top-color:var(--color-violet-500)}.border-t-white{border-top-color:var(--color-white)}.border-r-amber-300{border-right-color:var(--color-amber-300)}.border-r-transparent{border-right-color:#0000}.border-b-amber-300{border-bottom-color:var(--color-amber-300)}.border-l-transparent{border-left-color:#0000}.\!bg-\[\#6ED1CF\]\/35{background-color:#6ed1cf59!important}.\!bg-\[\#7274ED\]{background-color:#7274ed!important}.bg-\(--color-bg\){background-color:var(--color-bg)}.bg-\[\#0B0F19\]{background-color:#0b0f19}.bg-\[\#0a1628\]{background-color:#0a1628}.bg-\[\#0f1422\]{background-color:#0f1422}.bg-\[\#00a86b\]{background-color:#00a86b}.bg-\[\#1FA7E1\]{background-color:#1fa7e1}.bg-\[\#1FA7E1\]\/10{background-color:#1fa7e11a}.bg-\[\#1FA7E1\]\/80{background-color:#1fa7e1cc}.bg-\[\#1a85a4\]{background-color:#1a85a4}.bg-\[\#1a2030\]{background-color:#1a2030}.bg-\[\#1e2433\]{background-color:#1e2433}.bg-\[\#1e2433\]\/95{background-color:#1e2433f2}.bg-\[\#1e2536\]{background-color:#1e2536}.bg-\[\#2f3547\]{background-color:#2f3547}.bg-\[\#3b3a82\]{background-color:#3b3a82}.bg-\[\#5a6578\]{background-color:#5a6578}.bg-\[\#6D28D9\]{background-color:#6d28d9}.bg-\[\#6ED1CF\]\/20{background-color:#6ed1cf33}.bg-\[\#6ED1CF\]\/30{background-color:#6ed1cf4d}.bg-\[\#6F2BAF\]{background-color:#6f2baf}.bg-\[\#7C3AED\]{background-color:#7c3aed}.bg-\[\#7ec16d\]{background-color:#7ec16d}.bg-\[\#8A3FD3\]{background-color:#8a3fd3}.bg-\[\#8A3FD3\]\/5{background-color:#8a3fd30d}.bg-\[\#8A3FD3\]\/10{background-color:#8a3fd31a}.bg-\[\#8B5CF6\]{background-color:#8b5cf6}.bg-\[\#8b0d0d\]{background-color:#8b0d0d}.bg-\[\#9a67d0\]{background-color:#9a67d0}.bg-\[\#9b51e0\]{background-color:#9b51e0}.bg-\[\#34d399\]{background-color:#34d399}.bg-\[\#48bca6\]{background-color:#48bca6}.bg-\[\#55b963\]{background-color:#55b963}.bg-\[\#58B34D\]{background-color:#58b34d}.bg-\[\#62b658\]{background-color:#62b658}.bg-\[\#75D06A\]{background-color:#75d06a}.bg-\[\#75D06A\]\/10{background-color:#75d06a1a}.bg-\[\#75D06A\]\/14{background-color:#75d06a24}.bg-\[\#75D06A\]\/15{background-color:#75d06a26}.bg-\[\#75D06A\]\/22{background-color:#75d06a38}.bg-\[\#75D06A\]\/100{background-color:#75d06a}.bg-\[\#127DA6\]{background-color:#127da6}.bg-\[\#158abf\]{background-color:#158abf}.bg-\[\#161a25\]\/90{background-color:#161a25e6}.bg-\[\#181d27\]{background-color:#181d27}.bg-\[\#533ab6\]{background-color:#533ab6}.bg-\[\#662AA8\]{background-color:#662aa8}.bg-\[\#7274ED\]{background-color:#7274ed}.bg-\[\#7274ED\]\/10{background-color:#7274ed1a}.bg-\[\#7274ED\]\/15{background-color:#7274ed26}.bg-\[\#7274ED\]\/80{background-color:#7274edcc}.bg-\[\#7274ED\]\/100{background-color:#7274ed}.bg-\[\#8544c7\]{background-color:#8544c7}.bg-\[\#9956DE\]{background-color:#9956de}.bg-\[\#9956DE\]\/10{background-color:#9956de1a}.bg-\[\#9956DE\]\/12{background-color:#9956de1f}.bg-\[\#9956DE\]\/15{background-color:#9956de26}.bg-\[\#9956DE\]\/16{background-color:#9956de29}.bg-\[\#9956DE\]\/20{background-color:#9956de33}.bg-\[\#9956DE\]\/32{background-color:#9956de52}.bg-\[\#9956DE\]\/80{background-color:#9956decc}.bg-\[\#9956de\]{background-color:#9956de}.bg-\[\#10709b\]{background-color:#10709b}.bg-\[\#12192b\]{background-color:#12192b}.bg-\[\#42389d\]{background-color:#42389d}.bg-\[\#111827\]{background-color:#111827}.bg-\[\#633299\]{background-color:#633299}.bg-\[\#D96C6A\]{background-color:#d96c6a}.bg-\[\#DE7949\]{background-color:#de7949}.bg-\[\#E06A6A\]{background-color:#e06a6a}.bg-\[\#F08386\]{background-color:#f08386}.bg-\[\#F08386\]\/12{background-color:#f083861f}.bg-\[\#F08386\]\/15{background-color:#f0838626}.bg-\[\#F08386\]\/20{background-color:#f0838633}.bg-\[\#FB96BB\]{background-color:#fb96bb}.bg-\[\#FB96BB\]\/20{background-color:#fb96bb33}.bg-\[\#FF8B8B\]{background-color:#ff8b8b}.bg-\[\#FF8B8B\]\/10{background-color:#ff8b8b1a}.bg-\[\#FF8B8B\]\/14{background-color:#ff8b8b24}.bg-\[\#FF8B8B\]\/22{background-color:#ff8b8b38}.bg-\[\#FFB356\]{background-color:#ffb356}.bg-\[\#FFB356\]\/10{background-color:#ffb3561a}.bg-\[\#FFB356\]\/16{background-color:#ffb35629}.bg-\[\#FFB356\]\/20{background-color:#ffb35633}.bg-\[\#FFB356\]\/90{background-color:#ffb356e6}.bg-\[\#a8a5b3\]{background-color:#a8a5b3}.bg-\[\#b61515\]{background-color:#b61515}.bg-\[\#d24b4b\]{background-color:#d24b4b}.bg-\[\#dde3eb\]{background-color:#dde3eb}.bg-\[\#df7b9e\]{background-color:#df7b9e}.bg-\[\#e1f5f7\]{background-color:#e1f5f7}.bg-\[\#e66a5e\]{background-color:#e66a5e}.bg-\[\#e67070\]{background-color:#e67070}.bg-\[\#e69940\]{background-color:#e69940}.bg-\[\#eb74a6\]{background-color:#eb74a6}.bg-\[\#edf1f7\]{background-color:#edf1f7}.bg-\[\#edf1f7\]\/50{background-color:#edf1f780}.bg-\[\#edf1f7\]\/80{background-color:#edf1f7cc}.bg-\[\#f0eaff\]{background-color:#f0eaff}.bg-\[\#f5ecff\]{background-color:#f5ecff}.bg-\[\#f7f9fc\]{background-color:#f7f9fc}.bg-\[\#f7fbff\]{background-color:#f7fbff}.bg-\[\#f8fafc\]{background-color:#f8fafc}.bg-\[\#f8faff\]{background-color:#f8faff}.bg-\[\#f8fbff\]{background-color:#f8fbff}.bg-\[\#f47a75\]{background-color:#f47a75}.bg-\[\#f2812d\]{background-color:#f2812d}.bg-\[\#fa9746\]{background-color:#fa9746}.bg-\[\#faa541\]{background-color:#faa541}.bg-\[\#fb7185\]{background-color:#fb7185}.bg-\[\#fbab41\]{background-color:#fbab41}.bg-\[\#fbbf24\]{background-color:#fbbf24}.bg-\[\#fcfdff\]{background-color:#fcfdff}.bg-\[\#fdeceb\]{background-color:#fdeceb}.bg-\[\#fdfdfd\]{background-color:#fdfdfd}.bg-\[\#fe5c5c\]{background-color:#fe5c5c}.bg-\[\#fef5e7\]{background-color:#fef5e7}.bg-\[color-mix\(in_srgb\,var\(--chart-1\)_10\%\,transparent\)\]{background-color:var(--chart-1)}@supports (color:color-mix(in lab,red,red)){.bg-\[color-mix\(in_srgb\,var\(--chart-1\)_10\%\,transparent\)\]{background-color:color-mix(in srgb,var(--chart-1) 10%,transparent)}}.bg-\[color-mix\(in_srgb\,var\(--chart-2\)_10\%\,transparent\)\]{background-color:var(--chart-2)}@supports (color:color-mix(in lab,red,red)){.bg-\[color-mix\(in_srgb\,var\(--chart-2\)_10\%\,transparent\)\]{background-color:color-mix(in srgb,var(--chart-2) 10%,transparent)}}.bg-\[color-mix\(in_srgb\,var\(--chart-2\)_14\%\,transparent\)\]{background-color:var(--chart-2)}@supports (color:color-mix(in lab,red,red)){.bg-\[color-mix\(in_srgb\,var\(--chart-2\)_14\%\,transparent\)\]{background-color:color-mix(in srgb,var(--chart-2) 14%,transparent)}}.bg-\[color-mix\(in_srgb\,var\(--chart-3\)_10\%\,transparent\)\]{background-color:var(--chart-3)}@supports (color:color-mix(in lab,red,red)){.bg-\[color-mix\(in_srgb\,var\(--chart-3\)_10\%\,transparent\)\]{background-color:color-mix(in srgb,var(--chart-3) 10%,transparent)}}.bg-\[color-mix\(in_srgb\,var\(--chart-3\)_14\%\,transparent\)\]{background-color:var(--chart-3)}@supports (color:color-mix(in lab,red,red)){.bg-\[color-mix\(in_srgb\,var\(--chart-3\)_14\%\,transparent\)\]{background-color:color-mix(in srgb,var(--chart-3) 14%,transparent)}}.bg-\[color-mix\(in_srgb\,var\(--chart-4\)_14\%\,transparent\)\]{background-color:var(--chart-4)}@supports (color:color-mix(in lab,red,red)){.bg-\[color-mix\(in_srgb\,var\(--chart-4\)_14\%\,transparent\)\]{background-color:color-mix(in srgb,var(--chart-4) 14%,transparent)}}.bg-\[color-mix\(in_srgb\,var\(--primary\)_10\%\,transparent\)\]{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-\[color-mix\(in_srgb\,var\(--primary\)_10\%\,transparent\)\]{background-color:color-mix(in srgb,var(--primary) 10%,transparent)}}.bg-\[var\(--chart-2\)\]{background-color:var(--chart-2)}.bg-\[var\(--chart-3\)\]{background-color:var(--chart-3)}.bg-\[var\(--chart-4\)\]{background-color:var(--chart-4)}.bg-\[var\(--primary\)\],.bg-\[var\(--primary\)\]\/60{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--primary\)\]\/60{background-color:color-mix(in oklab,var(--primary) 60%,transparent)}}.bg-accent{background-color:var(--accent)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-400\/20{background-color:#fcbb0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-400\/20{background-color:color-mix(in oklab,var(--color-amber-400) 20%,transparent)}}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500) 10%,transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.bg-amber-600{background-color:var(--color-amber-600)}.bg-background{background-color:var(--background)}.bg-black\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.bg-black\/0{background-color:color-mix(in oklab,var(--color-black) 0%,transparent)}}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.bg-black\/10{background-color:color-mix(in oklab,var(--color-black) 10%,transparent)}}.bg-black\/15{background-color:#00000026}@supports (color:color-mix(in lab,red,red)){.bg-black\/15{background-color:color-mix(in oklab,var(--color-black) 15%,transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\/30{background-color:color-mix(in oklab,var(--color-black) 30%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.bg-black\/70{background-color:color-mix(in oklab,var(--color-black) 70%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-100\/40{background-color:#dbeafe66}@supports (color:color-mix(in lab,red,red)){.bg-blue-100\/40{background-color:color-mix(in oklab,var(--color-blue-100) 40%,transparent)}}.bg-blue-300\/40{background-color:#90c5ff66}@supports (color:color-mix(in lab,red,red)){.bg-blue-300\/40{background-color:color-mix(in oklab,var(--color-blue-300) 40%,transparent)}}.bg-blue-500\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/10{background-color:color-mix(in oklab,var(--color-blue-500) 10%,transparent)}}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500) 20%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-border{background-color:var(--border)}.bg-card,.bg-card\/20{background-color:var(--card)}@supports (color:color-mix(in lab,red,red)){.bg-card\/20{background-color:color-mix(in oklab,var(--card) 20%,transparent)}}.bg-card\/80{background-color:var(--card)}@supports (color:color-mix(in lab,red,red)){.bg-card\/80{background-color:color-mix(in oklab,var(--card) 80%,transparent)}}.bg-current{background-color:currentColor}.bg-cyan-400\/30{background-color:#00d2ef4d}@supports (color:color-mix(in lab,red,red)){.bg-cyan-400\/30{background-color:color-mix(in oklab,var(--color-cyan-400) 30%,transparent)}}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500) 10%,transparent)}}.bg-destructive,.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.bg-destructive\/10{background-color:color-mix(in oklab,var(--destructive) 10%,transparent)}}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-100\/50{background-color:#d0fae580}@supports (color:color-mix(in lab,red,red)){.bg-emerald-100\/50{background-color:color-mix(in oklab,var(--color-emerald-100) 50%,transparent)}}.bg-emerald-200{background-color:var(--color-emerald-200)}.bg-emerald-300{background-color:var(--color-emerald-300)}.bg-emerald-400\/20{background-color:#00d29433}@supports (color:color-mix(in lab,red,red)){.bg-emerald-400\/20{background-color:color-mix(in oklab,var(--color-emerald-400) 20%,transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-foreground{background-color:var(--foreground)}.bg-fuchsia-400\/30{background-color:#ec6cff4d}@supports (color:color-mix(in lab,red,red)){.bg-fuchsia-400\/30{background-color:color-mix(in oklab,var(--color-fuchsia-400) 30%,transparent)}}.bg-fuchsia-500{background-color:var(--color-fuchsia-500)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-50\/30{background-color:#f0fdf44d}@supports (color:color-mix(in lab,red,red)){.bg-green-50\/30{background-color:color-mix(in oklab,var(--color-green-50) 30%,transparent)}}.bg-green-100{background-color:var(--color-green-100)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\/20{background-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/20{background-color:color-mix(in oklab,var(--color-green-500) 20%,transparent)}}.bg-green-600{background-color:var(--color-green-600)}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-100\/50{background-color:#e0e7ff80}@supports (color:color-mix(in lab,red,red)){.bg-indigo-100\/50{background-color:color-mix(in oklab,var(--color-indigo-100) 50%,transparent)}}.bg-indigo-200{background-color:var(--color-indigo-200)}.bg-indigo-300\/10{background-color:#a4b3ff1a}@supports (color:color-mix(in lab,red,red)){.bg-indigo-300\/10{background-color:color-mix(in oklab,var(--color-indigo-300) 10%,transparent)}}.bg-indigo-400\/20{background-color:#7d87ff33}@supports (color:color-mix(in lab,red,red)){.bg-indigo-400\/20{background-color:color-mix(in oklab,var(--color-indigo-400) 20%,transparent)}}.bg-indigo-400\/30{background-color:#7d87ff4d}@supports (color:color-mix(in lab,red,red)){.bg-indigo-400\/30{background-color:color-mix(in oklab,var(--color-indigo-400) 30%,transparent)}}.bg-indigo-500{background-color:var(--color-indigo-500)}.bg-indigo-500\/10{background-color:#625fff1a}@supports (color:color-mix(in lab,red,red)){.bg-indigo-500\/10{background-color:color-mix(in oklab,var(--color-indigo-500) 10%,transparent)}}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-input-background{background-color:var(--input-background)}.bg-muted{background-color:var(--muted)}.bg-muted-foreground,.bg-muted-foreground\/30{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.bg-muted-foreground\/30{background-color:color-mix(in oklab,var(--muted-foreground) 30%,transparent)}}.bg-muted\/20{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/20{background-color:color-mix(in oklab,var(--muted) 20%,transparent)}}.bg-muted\/30{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/30{background-color:color-mix(in oklab,var(--muted) 30%,transparent)}}.bg-muted\/40{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/40{background-color:color-mix(in oklab,var(--muted) 40%,transparent)}}.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/50{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.bg-muted\/60{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/60{background-color:color-mix(in oklab,var(--muted) 60%,transparent)}}.bg-orange-50{background-color:var(--color-orange-50)}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-400{background-color:var(--color-orange-400)}.bg-orange-400\/20{background-color:#ff8b1a33}@supports (color:color-mix(in lab,red,red)){.bg-orange-400\/20{background-color:color-mix(in oklab,var(--color-orange-400) 20%,transparent)}}.bg-orange-500{background-color:var(--color-orange-500)}.bg-orange-500\/10{background-color:#fe6e001a}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/10{background-color:color-mix(in oklab,var(--color-orange-500) 10%,transparent)}}.bg-orange-500\/15{background-color:#fe6e0026}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/15{background-color:color-mix(in oklab,var(--color-orange-500) 15%,transparent)}}.bg-orange-500\/20{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/20{background-color:color-mix(in oklab,var(--color-orange-500) 20%,transparent)}}.bg-popover{background-color:var(--popover)}.bg-primary,.bg-primary\/10{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\/10{background-color:color-mix(in oklab,var(--primary) 10%,transparent)}}.bg-primary\/20{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\/20{background-color:color-mix(in oklab,var(--primary) 20%,transparent)}}.bg-purple-50{background-color:var(--color-purple-50)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-100\/30{background-color:#f3e8ff4d}@supports (color:color-mix(in lab,red,red)){.bg-purple-100\/30{background-color:color-mix(in oklab,var(--color-purple-100) 30%,transparent)}}.bg-purple-200{background-color:var(--color-purple-200)}.bg-purple-300\/10{background-color:#d9b3ff1a}@supports (color:color-mix(in lab,red,red)){.bg-purple-300\/10{background-color:color-mix(in oklab,var(--color-purple-300) 10%,transparent)}}.bg-purple-400\/20{background-color:#c07eff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-400\/20{background-color:color-mix(in oklab,var(--color-purple-400) 20%,transparent)}}.bg-purple-500{background-color:var(--color-purple-500)}.bg-purple-500\/10{background-color:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/10{background-color:color-mix(in oklab,var(--color-purple-500) 10%,transparent)}}.bg-purple-600{background-color:var(--color-purple-600)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-50\/30{background-color:#fef2f24d}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/30{background-color:color-mix(in oklab,var(--color-red-50) 30%,transparent)}}.bg-red-100{background-color:var(--color-red-100)}.bg-red-300{background-color:var(--color-red-300)}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500) 10%,transparent)}}.bg-red-600{background-color:var(--color-red-600)}.bg-rose-50{background-color:var(--color-rose-50)}.bg-rose-100{background-color:var(--color-rose-100)}.bg-rose-100\/30{background-color:#ffe4e64d}@supports (color:color-mix(in lab,red,red)){.bg-rose-100\/30{background-color:color-mix(in oklab,var(--color-rose-100) 30%,transparent)}}.bg-rose-200{background-color:var(--color-rose-200)}.bg-rose-300{background-color:var(--color-rose-300)}.bg-rose-300\/60{background-color:#ffa2ae99}@supports (color:color-mix(in lab,red,red)){.bg-rose-300\/60{background-color:color-mix(in oklab,var(--color-rose-300) 60%,transparent)}}.bg-rose-400{background-color:var(--color-rose-400)}.bg-rose-400\/5{background-color:#ff667f0d}@supports (color:color-mix(in lab,red,red)){.bg-rose-400\/5{background-color:color-mix(in oklab,var(--color-rose-400) 5%,transparent)}}.bg-rose-500{background-color:var(--color-rose-500)}.bg-rose-500\/5{background-color:#ff23570d}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/5{background-color:color-mix(in oklab,var(--color-rose-500) 5%,transparent)}}.bg-rose-500\/10{background-color:#ff23571a}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/10{background-color:color-mix(in oklab,var(--color-rose-500) 10%,transparent)}}.bg-rose-500\/20{background-color:#ff235733}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/20{background-color:color-mix(in oklab,var(--color-rose-500) 20%,transparent)}}.bg-rose-600{background-color:var(--color-rose-600)}.bg-secondary{background-color:var(--secondary)}.bg-sidebar{background-color:var(--sidebar)}.bg-sidebar-border{background-color:var(--sidebar-border)}.bg-sky-50{background-color:var(--color-violet-50)}.bg-sky-50\/40{background-color:#f5f3ff66}@supports (color:color-mix(in lab,red,red)){.bg-sky-50\/40{background-color:color-mix(in oklab,var(--color-violet-50) 40%,transparent)}}.bg-sky-50\/50{background-color:#f5f3ff80}@supports (color:color-mix(in lab,red,red)){.bg-sky-50\/50{background-color:color-mix(in oklab,var(--color-violet-50) 50%,transparent)}}.bg-sky-50\/70{background-color:#f5f3ffb3}@supports (color:color-mix(in lab,red,red)){.bg-sky-50\/70{background-color:color-mix(in oklab,var(--color-violet-50) 70%,transparent)}}.bg-sky-100{background-color:var(--color-violet-100)}.bg-sky-100\/40{background-color:#ede9fe66}@supports (color:color-mix(in lab,red,red)){.bg-sky-100\/40{background-color:color-mix(in oklab,var(--color-violet-100) 40%,transparent)}}.bg-sky-200{background-color:var(--color-violet-200)}.bg-sky-300{background-color:var(--color-violet-300)}.bg-sky-300\/10{background-color:#c4b4ff1a}@supports (color:color-mix(in lab,red,red)){.bg-sky-300\/10{background-color:color-mix(in oklab,var(--color-violet-300) 10%,transparent)}}.bg-sky-400{background-color:var(--color-violet-400)}.bg-sky-400\/20{background-color:#a685ff33}@supports (color:color-mix(in lab,red,red)){.bg-sky-400\/20{background-color:color-mix(in oklab,var(--color-violet-400) 20%,transparent)}}.bg-sky-500{background-color:var(--color-violet-500)}.bg-sky-500\/5{background-color:#8d54ff0d}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/5{background-color:color-mix(in oklab,var(--color-violet-500) 5%,transparent)}}.bg-sky-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/10{background-color:color-mix(in oklab,var(--color-violet-500) 10%,transparent)}}.bg-sky-500\/20{background-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.bg-sky-500\/20{background-color:color-mix(in oklab,var(--color-violet-500) 20%,transparent)}}.bg-sky-600{background-color:var(--color-violet-600)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\/50{background-color:#f8fafc80}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/50{background-color:color-mix(in oklab,var(--color-slate-50) 50%,transparent)}}.bg-slate-50\/80{background-color:#f8fafccc}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/80{background-color:color-mix(in oklab,var(--color-slate-50) 80%,transparent)}}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-100\/70{background-color:#f1f5f9b3}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\/70{background-color:color-mix(in oklab,var(--color-slate-100) 70%,transparent)}}.bg-slate-100\/80{background-color:#f1f5f9cc}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\/80{background-color:color-mix(in oklab,var(--color-slate-100) 80%,transparent)}}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-200\/50{background-color:#e2e8f080}@supports (color:color-mix(in lab,red,red)){.bg-slate-200\/50{background-color:color-mix(in oklab,var(--color-slate-200) 50%,transparent)}}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-slate-500{background-color:var(--color-slate-500)}.bg-slate-500\/15{background-color:#62748e26}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/15{background-color:color-mix(in oklab,var(--color-slate-500) 15%,transparent)}}.bg-slate-500\/20{background-color:#62748e33}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/20{background-color:color-mix(in oklab,var(--color-slate-500) 20%,transparent)}}.bg-slate-700{background-color:var(--color-slate-700)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-800\/5{background-color:#1d293d0d}@supports (color:color-mix(in lab,red,red)){.bg-slate-800\/5{background-color:color-mix(in oklab,var(--color-slate-800) 5%,transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\/10{background-color:#0f172b1a}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/10{background-color:color-mix(in oklab,var(--color-slate-900) 10%,transparent)}}.bg-slate-900\/40{background-color:#0f172b66}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/40{background-color:color-mix(in oklab,var(--color-slate-900) 40%,transparent)}}.bg-slate-900\/50{background-color:#0f172b80}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/50{background-color:color-mix(in oklab,var(--color-slate-900) 50%,transparent)}}.bg-slate-900\/60{background-color:#0f172b99}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/60{background-color:color-mix(in oklab,var(--color-slate-900) 60%,transparent)}}.bg-slate-900\/85{background-color:#0f172bd9}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/85{background-color:color-mix(in oklab,var(--color-slate-900) 85%,transparent)}}.bg-teal-50{background-color:var(--color-teal-50)}.bg-teal-100{background-color:var(--color-teal-100)}.bg-teal-400\/20{background-color:#00d3bd33}@supports (color:color-mix(in lab,red,red)){.bg-teal-400\/20{background-color:color-mix(in oklab,var(--color-teal-400) 20%,transparent)}}.bg-teal-600{background-color:var(--color-teal-600)}.bg-transparent{background-color:#0000}.bg-violet-50{background-color:var(--color-violet-50)}.bg-violet-100{background-color:var(--color-violet-100)}.bg-violet-300{background-color:var(--color-violet-300)}.bg-violet-400{background-color:var(--color-violet-400)}.bg-violet-400\/5{background-color:#a685ff0d}@supports (color:color-mix(in lab,red,red)){.bg-violet-400\/5{background-color:color-mix(in oklab,var(--color-violet-400) 5%,transparent)}}.bg-violet-500{background-color:var(--color-violet-500)}.bg-violet-500\/10{background-color:#8d54ff1a}@supports (color:color-mix(in lab,red,red)){.bg-violet-500\/10{background-color:color-mix(in oklab,var(--color-violet-500) 10%,transparent)}}.bg-violet-600{background-color:var(--color-violet-600)}.bg-white{background-color:var(--color-white)}.bg-white\/5{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.bg-white\/5{background-color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\/10{background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.bg-white\/15{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.bg-white\/15{background-color:color-mix(in oklab,var(--color-white) 15%,transparent)}}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.bg-white\/25{background-color:#ffffff40}@supports (color:color-mix(in lab,red,red)){.bg-white\/25{background-color:color-mix(in oklab,var(--color-white) 25%,transparent)}}.bg-white\/30{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.bg-white\/30{background-color:color-mix(in oklab,var(--color-white) 30%,transparent)}}.bg-white\/35{background-color:#ffffff59}@supports (color:color-mix(in lab,red,red)){.bg-white\/35{background-color:color-mix(in oklab,var(--color-white) 35%,transparent)}}.bg-white\/40{background-color:#fff6}@supports (color:color-mix(in lab,red,red)){.bg-white\/40{background-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.bg-white\/50{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.bg-white\/50{background-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.bg-white\/60{background-color:#fff9}@supports (color:color-mix(in lab,red,red)){.bg-white\/60{background-color:color-mix(in oklab,var(--color-white) 60%,transparent)}}.bg-white\/70{background-color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.bg-white\/70{background-color:color-mix(in oklab,var(--color-white) 70%,transparent)}}.bg-white\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\/80{background-color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.bg-white\/85{background-color:#ffffffd9}@supports (color:color-mix(in lab,red,red)){.bg-white\/85{background-color:color-mix(in oklab,var(--color-white) 85%,transparent)}}.bg-white\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.bg-white\/90{background-color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.bg-white\/95{background-color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.bg-white\/95{background-color:color-mix(in oklab,var(--color-white) 95%,transparent)}}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-zinc-100{background-color:var(--color-zinc-100)}.\!bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab!important;background-image:linear-gradient(var(--tw-gradient-stops))!important}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-l{--tw-gradient-position:to left in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-\[radial-gradient\(circle_at_14\%_12\%\,rgba\(251\,150\,187\,0\.35\)\,transparent_42\%\)\,radial-gradient\(circle_at_80\%_80\%\,rgba\(117\,208\,106\,0\.25\)\,transparent_38\%\)\]{background-image:radial-gradient(circle at 14% 12%,#fb96bb59,#0000 42%),radial-gradient(circle at 80% 80%,#75d06a40,#0000 38%)}.bg-\[radial-gradient\(circle_at_18\%_8\%\,rgba\(251\,150\,187\,0\.32\)\,transparent_42\%\)\,radial-gradient\(circle_at_85\%_84\%\,rgba\(117\,208\,106\,0\.24\)\,transparent_40\%\)\]{background-image:radial-gradient(circle at 18% 8%,#fb96bb52,#0000 42%),radial-gradient(circle at 85% 84%,#75d06a3d,#0000 40%)}.bg-\[radial-gradient\(circle_at_top_right\,rgba\(153\,86\,222\,0\.08\)\,transparent_45\%\)\,radial-gradient\(circle_at_bottom_left\,rgba\(31\,167\,225\,0\.08\)\,transparent_45\%\)\]{background-image:radial-gradient(circle at 100% 0,#9956de14,#0000 45%),radial-gradient(circle at 0 100%,#1fa7e114,#0000 45%)}.bg-\[radial-gradient\(ellipse_at_50\%_100\%\,\#7e22ce_10\%\,transparent_60\%\)\]{background-image:radial-gradient(at 50% 100%,#7e22ce 10%,#0000 60%)}.bg-\[radial-gradient\(ellipse_at_50\%_100\%\,\#9333ea_0\%\,\#c084fc_50\%\,transparent_100\%\)\]{background-image:radial-gradient(at 50% 100%,#9333ea,#c084fc,#0000)}.bg-\[url\(\'data\:image\/svg\+xml\;base64\,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAiLz4KPHBhdGggZD0iTTAgMEgxdjFIMHoiIGZpbGw9IiM2MzY2ZjEiIGZpbGwtb3BhY2l0eT0iMC4wNSIvPgo8L3N2Zz4\=\'\)\]{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAiLz4KPHBhdGggZD0iTTAgMEgxdjFIMHoiIGZpbGw9IiM2MzY2ZjEiIGZpbGwtb3BhY2l0eT0iMC4wNSIvPgo8L3N2Zz4=)}.bg-\[url\(\'data\:image\/svg\+xml\;base64\,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4IiBoZWlnaHQ9IjgiPgo8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMSI\+PC9yZWN0Pgo8L3N2Zz4\=\'\)\]{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4IiBoZWlnaHQ9IjgiPgo8cmVjdCB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMSI+PC9yZWN0Pgo8L3N2Zz4=)}.\!from-\[\#6ED1CF\]{--tw-gradient-from:#6ed1cf!important;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))!important}.from-\[\#1FA7E1\]\/10{--tw-gradient-from:oklab(68.7044% -.0807821 -.10979/.1);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#1a85a4\]{--tw-gradient-from:#1a85a4;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#3b3a82\]{--tw-gradient-from:#3b3a82;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#6ED1CF\]{--tw-gradient-from:#6ed1cf;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#7ec16d\]{--tw-gradient-from:#7ec16d;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#9a67d0\]{--tw-gradient-from:#9a67d0;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#48bca6\]{--tw-gradient-from:#48bca6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#75D06A\]{--tw-gradient-from:#75d06a;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#7274ED\]{--tw-gradient-from:#7274ed;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#9956DE\]{--tw-gradient-from:#9956de;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#9956DE\]\/12{--tw-gradient-from:oklab(59.4745% .111053 -.167638/.12);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#FB96BB\]{--tw-gradient-from:#fb96bb;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#FFB356\]{--tw-gradient-from:#ffb356;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#e66a5e\]{--tw-gradient-from:#e66a5e;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#eb74a6\]{--tw-gradient-from:#eb74a6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-\[\#fbab41\]{--tw-gradient-from:#fbab41;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-100{--tw-gradient-from:var(--color-amber-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-400{--tw-gradient-from:var(--color-amber-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-500{--tw-gradient-from:var(--color-amber-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-500\/20{--tw-gradient-from:#f99c0033}@supports (color:color-mix(in lab,red,red)){.from-amber-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-amber-500) 20%, transparent)}}.from-amber-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-amber-600{--tw-gradient-from:var(--color-amber-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-blue-500{--tw-gradient-from:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-400{--tw-gradient-from:var(--color-emerald-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-500{--tw-gradient-from:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-500\/20{--tw-gradient-from:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.from-emerald-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-emerald-500) 20%, transparent)}}.from-emerald-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-emerald-600{--tw-gradient-from:var(--color-emerald-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-green-500{--tw-gradient-from:var(--color-green-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-50{--tw-gradient-from:var(--color-indigo-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-200{--tw-gradient-from:var(--color-indigo-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-500{--tw-gradient-from:var(--color-indigo-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-500\/20{--tw-gradient-from:#625fff33}@supports (color:color-mix(in lab,red,red)){.from-indigo-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-indigo-500) 20%, transparent)}}.from-indigo-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-indigo-600{--tw-gradient-from:var(--color-indigo-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-orange-50{--tw-gradient-from:var(--color-orange-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-orange-400{--tw-gradient-from:var(--color-orange-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-orange-500{--tw-gradient-from:var(--color-orange-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-400\/20{--tw-gradient-from:#c07eff33}@supports (color:color-mix(in lab,red,red)){.from-purple-400\/20{--tw-gradient-from:color-mix(in oklab, var(--color-purple-400) 20%, transparent)}}.from-purple-400\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-500{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-500\/20{--tw-gradient-from:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.from-purple-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-purple-500) 20%, transparent)}}.from-purple-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-600{--tw-gradient-from:var(--color-purple-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-rose-50{--tw-gradient-from:var(--color-rose-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-rose-400{--tw-gradient-from:var(--color-rose-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-rose-500{--tw-gradient-from:var(--color-rose-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-50{--tw-gradient-from:var(--color-violet-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-100{--tw-gradient-from:var(--color-violet-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-400{--tw-gradient-from:var(--color-violet-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-500{--tw-gradient-from:var(--color-violet-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-500\/20{--tw-gradient-from:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.from-sky-500\/20{--tw-gradient-from:color-mix(in oklab, var(--color-violet-500) 20%, transparent)}}.from-sky-500\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-sky-600{--tw-gradient-from:var(--color-violet-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-slate-50\/30{--tw-gradient-from:#f8fafc4d}@supports (color:color-mix(in lab,red,red)){.from-slate-50\/30{--tw-gradient-from:color-mix(in oklab, var(--color-slate-50) 30%, transparent)}}.from-slate-50\/30{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-slate-200{--tw-gradient-from:var(--color-slate-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-50{--tw-gradient-from:var(--color-teal-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-teal-500{--tw-gradient-from:var(--color-teal-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-violet-500{--tw-gradient-from:var(--color-violet-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-white{--tw-gradient-from:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-white\/0{--tw-gradient-from:#0000}@supports (color:color-mix(in lab,red,red)){.from-white\/0{--tw-gradient-from:color-mix(in oklab, var(--color-white) 0%, transparent)}}.from-white\/0{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-\[\#6ED1CF\]{--tw-gradient-via:#6ed1cf;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#75D06A\]{--tw-gradient-via:#75d06a;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#7274ED\]{--tw-gradient-via:#7274ed;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#9956DE\]{--tw-gradient-via:#9956de;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-amber-400\/40{--tw-gradient-via:#fcbb0066}@supports (color:color-mix(in lab,red,red)){.via-amber-400\/40{--tw-gradient-via:color-mix(in oklab, var(--color-amber-400) 40%, transparent)}}.via-amber-400\/40{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-cyan-500{--tw-gradient-via:var(--color-cyan-500);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-cyan-500\/10{--tw-gradient-via:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.via-cyan-500\/10{--tw-gradient-via:color-mix(in oklab, var(--color-cyan-500) 10%, transparent)}}.via-cyan-500\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-emerald-500\/40{--tw-gradient-via:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.via-emerald-500\/40{--tw-gradient-via:color-mix(in oklab, var(--color-emerald-500) 40%, transparent)}}.via-emerald-500\/40{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-fuchsia-50{--tw-gradient-via:var(--color-fuchsia-50);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-fuchsia-500\/10{--tw-gradient-via:#e12afb1a}@supports (color:color-mix(in lab,red,red)){.via-fuchsia-500\/10{--tw-gradient-via:color-mix(in oklab, var(--color-fuchsia-500) 10%, transparent)}}.via-fuchsia-500\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-orange-500{--tw-gradient-via:var(--color-orange-500);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-orange-500\/10{--tw-gradient-via:#fe6e001a}@supports (color:color-mix(in lab,red,red)){.via-orange-500\/10{--tw-gradient-via:color-mix(in oklab, var(--color-orange-500) 10%, transparent)}}.via-orange-500\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-pink-500{--tw-gradient-via:var(--color-pink-500);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-pink-600{--tw-gradient-via:var(--color-pink-600);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-purple-500\/10{--tw-gradient-via:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.via-purple-500\/10{--tw-gradient-via:color-mix(in oklab, var(--color-purple-500) 10%, transparent)}}.via-purple-500\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-rose-500\/40{--tw-gradient-via:#ff235766}@supports (color:color-mix(in lab,red,red)){.via-rose-500\/40{--tw-gradient-via:color-mix(in oklab, var(--color-rose-500) 40%, transparent)}}.via-rose-500\/40{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-sky-50\/30{--tw-gradient-via:#f5f3ff4d}@supports (color:color-mix(in lab,red,red)){.via-sky-50\/30{--tw-gradient-via:color-mix(in oklab, var(--color-violet-50) 30%, transparent)}}.via-sky-50\/30{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-sky-50\/50{--tw-gradient-via:#f5f3ff80}@supports (color:color-mix(in lab,red,red)){.via-sky-50\/50{--tw-gradient-via:color-mix(in oklab, var(--color-violet-50) 50%, transparent)}}.via-sky-50\/50{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-sky-400\/30{--tw-gradient-via:#a685ff4d}@supports (color:color-mix(in lab,red,red)){.via-sky-400\/30{--tw-gradient-via:color-mix(in oklab, var(--color-violet-400) 30%, transparent)}}.via-sky-400\/30{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-sky-400\/50{--tw-gradient-via:#a685ff80}@supports (color:color-mix(in lab,red,red)){.via-sky-400\/50{--tw-gradient-via:color-mix(in oklab, var(--color-violet-400) 50%, transparent)}}.via-sky-400\/50{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-sky-500{--tw-gradient-via:var(--color-violet-500);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-teal-500\/10{--tw-gradient-via:#00baa71a}@supports (color:color-mix(in lab,red,red)){.via-teal-500\/10{--tw-gradient-via:color-mix(in oklab, var(--color-teal-500) 10%, transparent)}}.via-teal-500\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\/15{--tw-gradient-via:#ffffff26}@supports (color:color-mix(in lab,red,red)){.via-white\/15{--tw-gradient-via:color-mix(in oklab, var(--color-white) 15%, transparent)}}.via-white\/15{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\/30{--tw-gradient-via:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.via-white\/30{--tw-gradient-via:color-mix(in oklab, var(--color-white) 30%, transparent)}}.via-white\/30{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\/40{--tw-gradient-via:#fff6}@supports (color:color-mix(in lab,red,red)){.via-white\/40{--tw-gradient-via:color-mix(in oklab, var(--color-white) 40%, transparent)}}.via-white\/40{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.\!to-\[\#1FA7E1\]{--tw-gradient-to:#1fa7e1!important;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))!important}.to-\[\#1FA7E1\]{--tw-gradient-to:#1fa7e1;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#6ED1CF\]{--tw-gradient-to:#6ed1cf;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#6ED1CF\]\/10{--tw-gradient-to:oklab(80.0346% -.0906707 -.0221346/.1);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#6ED1CF\]\/18{--tw-gradient-to:oklab(80.0346% -.0906707 -.0221346/.18);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#8a5cc0\]{--tw-gradient-to:#8a5cc0;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#40a794\]{--tw-gradient-to:#40a794;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#71ad62\]{--tw-gradient-to:#71ad62;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#75D06A\]{--tw-gradient-to:#75d06a;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#126b84\]{--tw-gradient-to:#126b84;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#7274ED\]{--tw-gradient-to:#7274ed;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#9956DE\]{--tw-gradient-to:#9956de;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#FF8B8B\]{--tw-gradient-to:#ff8b8b;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#FF8C00\]{--tw-gradient-to:#ff8c00;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#FFB356\]{--tw-gradient-to:#ffb356;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#ce5e53\]{--tw-gradient-to:#ce5e53;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#d46895\]{--tw-gradient-to:#d46895;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-\[\#e0983a\]{--tw-gradient-to:#e0983a;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-50{--tw-gradient-to:var(--color-amber-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-600{--tw-gradient-to:var(--color-amber-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-amber-600\/5{--tw-gradient-to:#dd74000d}@supports (color:color-mix(in lab,red,red)){.to-amber-600\/5{--tw-gradient-to:color-mix(in oklab, var(--color-amber-600) 5%, transparent)}}.to-amber-600\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-blue-600{--tw-gradient-to:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-cyan-50{--tw-gradient-to:var(--color-cyan-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-cyan-100{--tw-gradient-to:var(--color-cyan-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-cyan-500{--tw-gradient-to:var(--color-cyan-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-600{--tw-gradient-to:var(--color-emerald-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-600\/5{--tw-gradient-to:#0097670d}@supports (color:color-mix(in lab,red,red)){.to-emerald-600\/5{--tw-gradient-to:color-mix(in oklab, var(--color-emerald-600) 5%, transparent)}}.to-emerald-600\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-fuchsia-500{--tw-gradient-to:var(--color-fuchsia-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-indigo-100{--tw-gradient-to:var(--color-indigo-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-indigo-600{--tw-gradient-to:var(--color-indigo-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-indigo-600\/5{--tw-gradient-to:#4f39f60d}@supports (color:color-mix(in lab,red,red)){.to-indigo-600\/5{--tw-gradient-to:color-mix(in oklab, var(--color-indigo-600) 5%, transparent)}}.to-indigo-600\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-50{--tw-gradient-to:var(--color-orange-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-100{--tw-gradient-to:var(--color-orange-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-400{--tw-gradient-to:var(--color-orange-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-500{--tw-gradient-to:var(--color-orange-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-600{--tw-gradient-to:var(--color-orange-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-pink-400\/20{--tw-gradient-to:#fb64b633}@supports (color:color-mix(in lab,red,red)){.to-pink-400\/20{--tw-gradient-to:color-mix(in oklab, var(--color-pink-400) 20%, transparent)}}.to-pink-400\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-pink-500{--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-50{--tw-gradient-to:var(--color-purple-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-500{--tw-gradient-to:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-600{--tw-gradient-to:var(--color-purple-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-600\/5{--tw-gradient-to:#9810fa0d}@supports (color:color-mix(in lab,red,red)){.to-purple-600\/5{--tw-gradient-to:color-mix(in oklab, var(--color-purple-600) 5%, transparent)}}.to-purple-600\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-purple-700{--tw-gradient-to:var(--color-purple-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-red-500{--tw-gradient-to:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-rose-500{--tw-gradient-to:var(--color-rose-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-rose-600{--tw-gradient-to:var(--color-rose-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-100{--tw-gradient-to:var(--color-violet-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-400{--tw-gradient-to:var(--color-violet-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-500{--tw-gradient-to:var(--color-violet-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-600{--tw-gradient-to:var(--color-violet-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-600\/5{--tw-gradient-to:#7f22fe0d}@supports (color:color-mix(in lab,red,red)){.to-sky-600\/5{--tw-gradient-to:color-mix(in oklab, var(--color-violet-600) 5%, transparent)}}.to-sky-600\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-slate-50{--tw-gradient-to:var(--color-slate-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-slate-100{--tw-gradient-to:var(--color-slate-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-slate-300{--tw-gradient-to:var(--color-slate-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-teal-100{--tw-gradient-to:var(--color-teal-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-teal-300{--tw-gradient-to:var(--color-teal-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-teal-500{--tw-gradient-to:var(--color-teal-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-teal-600{--tw-gradient-to:var(--color-teal-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-violet-700{--tw-gradient-to:var(--color-violet-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-white{--tw-gradient-to:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-white\/0{--tw-gradient-to:#0000}@supports (color:color-mix(in lab,red,red)){.to-white\/0{--tw-gradient-to:color-mix(in oklab, var(--color-white) 0%, transparent)}}.to-white\/0{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.\[background-size\:var\(--beam-size\)_var\(--beam-size\)\]{background-size:var(--beam-size) var(--beam-size)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-amber-300{fill:var(--color-amber-300)}.fill-blue-500{fill:var(--color-blue-500)}.fill-current{fill:currentColor}.fill-primary{fill:var(--primary)}.fill-white{fill:var(--color-white)}.fill-yellow-300{fill:var(--color-yellow-300)}.stroke-\[2\.5\]{stroke-width:2.5px}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.object-bottom{object-position:bottom}.p-0{padding:calc(var(--spacing) * 0)}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-7{padding:calc(var(--spacing) * 7)}.p-8{padding:calc(var(--spacing) * 8)}.p-10{padding:calc(var(--spacing) * 10)}.p-12{padding:calc(var(--spacing) * 12)}.p-\[3px\]{padding:3px}.p-px{padding:1px}.px-0\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-10{padding-inline:calc(var(--spacing) * 10)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-7{padding-block:calc(var(--spacing) * 7)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-0{padding-top:calc(var(--spacing) * 0)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-1\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pr-0{padding-right:calc(var(--spacing) * 0)}.pr-1{padding-right:calc(var(--spacing) * 1)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-2\.5{padding-right:calc(var(--spacing) * 2.5)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pr-11{padding-right:calc(var(--spacing) * 11)}.pr-20{padding-right:calc(var(--spacing) * 20)}.pr-40{padding-right:calc(var(--spacing) * 40)}.pr-\[60px\]{padding-right:60px}.pb-0{padding-bottom:calc(var(--spacing) * 0)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.pb-24{padding-bottom:calc(var(--spacing) * 24)}.pb-28{padding-bottom:calc(var(--spacing) * 28)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.pl-10{padding-left:calc(var(--spacing) * 10)}.pl-11{padding-left:calc(var(--spacing) * 11)}.pl-16{padding-left:calc(var(--spacing) * 16)}.pl-\[18px\]{padding-left:18px}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.8rem\]{font-size:.8rem}.text-\[6px\]{font-size:6px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.text-\[18px\]{font-size:18px}.text-\[20px\]{font-size:20px}.text-\[22px\]{font-size:22px}.text-\[24px\]{font-size:24px}.text-\[36px\]{font-size:36px}.text-\[40px\]{font-size:40px}.text-\[50px\]{font-size:50px}.text-\[60px\]{font-size:60px}.text-\[80px\]{font-size:80px}.text-\[140px\]{font-size:140px}.leading-\[1\.1\]{--tw-leading:1.1;line-height:1.1}.leading-\[1\.7\]{--tw-leading:1.7;line-height:1.7}.leading-\[1\.45\]{--tw-leading:1.45;line-height:1.45}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[-0\.02em\]{--tw-tracking:-.02em;letter-spacing:-.02em}.tracking-\[0\.1em\]{--tw-tracking:.1em;letter-spacing:.1em}.tracking-\[0\.2em\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\[0\.3px\]{--tw-tracking:.3px;letter-spacing:.3px}.tracking-\[0\.12em\]{--tw-tracking:.12em;letter-spacing:.12em}.tracking-\[0\.14em\]{--tw-tracking:.14em;letter-spacing:.14em}.tracking-\[0\.15em\]{--tw-tracking:.15em;letter-spacing:.15em}.tracking-\[0\.16em\]{--tw-tracking:.16em;letter-spacing:.16em}.tracking-\[0\.18em\]{--tw-tracking:.18em;letter-spacing:.18em}.tracking-\[0\.25em\]{--tw-tracking:.25em;letter-spacing:.25em}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.\!text-\[\#1FA7E1\]{color:#1fa7e1!important}.\!text-white{color:var(--color-white)!important}.text-\[\#0a1628\]{color:#0a1628}.text-\[\#1E293B\]{color:#1e293b}.text-\[\#1FA7E1\]{color:#1fa7e1}.text-\[\#2E7D32\]{color:#2e7d32}.text-\[\#2e2b5e\]{color:#2e2b5e}.text-\[\#3E8538\]{color:#3e8538}.text-\[\#3c4043\]{color:#3c4043}.text-\[\#4D9F46\]{color:#4d9f46}.text-\[\#5E3388\]{color:#5e3388}.text-\[\#5E3388\]\/80{color:#5e3388cc}.text-\[\#5a6578\]{color:#5a6578}.text-\[\#5f6368\]{color:#5f6368}.text-\[\#6ED1CF\]{color:#6ed1cf}.text-\[\#7A44B3\]{color:#7a44b3}.text-\[\#7C3AED\]{color:#7c3aed}.text-\[\#7b8798\]{color:#7b8798}.text-\[\#7eafbe\]{color:#7eafbe}.text-\[\#7ec16d\]{color:#7ec16d}.text-\[\#8A1A1A\]{color:#8a1a1a}.text-\[\#8A3FD3\]{color:#8a3fd3}.text-\[\#8a7fbc\]{color:#8a7fbc}.text-\[\#8f5ae2\]{color:#8f5ae2}.text-\[\#9b51e0\]{color:#9b51e0}.text-\[\#35a8bc\]\/10{color:#35a8bc1a}.text-\[\#75D06A\]{color:#75d06a}.text-\[\#141b2d\]{color:#141b2d}.text-\[\#319ab4\]{color:#319ab4}.text-\[\#6620a2\]{color:#6620a2}.text-\[\#7274ED\]{color:#7274ed}.text-\[\#9956DE\]{color:#9956de}.text-\[\#36326e\]{color:#36326e}.text-\[\#202124\]{color:#202124}.text-\[\#334155\]{color:#334155}.text-\[\#A56D29\]{color:#a56d29}.text-\[\#A74B50\]{color:#a74b50}.text-\[\#C65E63\]{color:#c65e63}.text-\[\#CC8A37\]{color:#cc8a37}.text-\[\#D66A6A\]{color:#d66a6a}.text-\[\#EAFBFF\]{color:#eafbff}.text-\[\#F1E4FF\]{color:#f1e4ff}.text-\[\#F08386\]{color:#f08386}.text-\[\#FF8B8B\]{color:#ff8b8b}.text-\[\#FFB356\]{color:#ffb356}.text-\[\#a0aec0\]{color:#a0aec0}.text-\[\#a3b1ee\]{color:#a3b1ee}.text-\[\#a06aec\]\/10{color:#a06aec1a}.text-\[\#a8a5b3\]{color:#a8a5b3}.text-\[\#baa4df\]{color:#baa4df}.text-\[\#c2cad8\]{color:#c2cad8}.text-\[\#d1abff\]{color:#d1abff}.text-\[\#d1cec6\]{color:#d1cec6}.text-\[\#d2a893\]{color:#d2a893}.text-\[\#d05c54\]{color:#d05c54}.text-\[\#db734b\]{color:#db734b}.text-\[\#dd9a9a\]{color:#dd9a9a}.text-\[\#dde3eb\]{color:#dde3eb}.text-\[\#df655a\]\/10{color:#df655a1a}.text-\[\#e87a42\]\/10{color:#e87a421a}.text-\[\#edf1f7\]{color:#edf1f7}.text-\[\#f8fafc\]{color:#f8fafc}.text-\[\#fcd34d\]{color:#fcd34d}.text-\[\#fde047\]{color:#fde047}.text-\[var\(--chart-1\)\]{color:var(--chart-1)}.text-\[var\(--chart-2\)\]{color:var(--chart-2)}.text-\[var\(--chart-3\)\]{color:var(--chart-3)}.text-\[var\(--chart-4\)\]{color:var(--chart-4)}.text-\[var\(--primary\)\]{color:var(--primary)}.text-accent-foreground{color:var(--accent-foreground)}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-amber-800\/80{color:#953d00cc}@supports (color:color-mix(in lab,red,red)){.text-amber-800\/80{color:color-mix(in oklab,var(--color-amber-800) 80%,transparent)}}.text-amber-900{color:var(--color-amber-900)}.text-amber-900\/80{color:#7b3306cc}@supports (color:color-mix(in lab,red,red)){.text-amber-900\/80{color:color-mix(in oklab,var(--color-amber-900) 80%,transparent)}}.text-amber-900\/85{color:#7b3306d9}@supports (color:color-mix(in lab,red,red)){.text-amber-900\/85{color:color-mix(in oklab,var(--color-amber-900) 85%,transparent)}}.text-black\/25{color:#00000040}@supports (color:color-mix(in lab,red,red)){.text-black\/25{color:color-mix(in oklab,var(--color-black) 25%,transparent)}}.text-blue-200{color:var(--color-blue-200)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-cyan-200{color:var(--color-cyan-200)}.text-destructive{color:var(--destructive)}.text-emerald-100{color:var(--color-emerald-100)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-500\/70{color:#00bb7fb3}@supports (color:color-mix(in lab,red,red)){.text-emerald-500\/70{color:color-mix(in oklab,var(--color-emerald-500) 70%,transparent)}}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-600\/80{color:#009767cc}@supports (color:color-mix(in lab,red,red)){.text-emerald-600\/80{color:color-mix(in oklab,var(--color-emerald-600) 80%,transparent)}}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-800{color:var(--color-emerald-800)}.text-emerald-800\/80{color:#005f46cc}@supports (color:color-mix(in lab,red,red)){.text-emerald-800\/80{color:color-mix(in oklab,var(--color-emerald-800) 80%,transparent)}}.text-emerald-900{color:var(--color-emerald-900)}.text-emerald-950{color:var(--color-emerald-950)}.text-foreground{color:var(--foreground)}.text-gray-200{color:var(--color-gray-200)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-green-400{color:var(--color-green-400)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-800{color:var(--color-green-800)}.text-indigo-400{color:var(--color-indigo-400)}.text-indigo-500{color:var(--color-indigo-500)}.text-indigo-600{color:var(--color-indigo-600)}.text-indigo-700{color:var(--color-indigo-700)}.text-indigo-800{color:var(--color-indigo-800)}.text-indigo-800\/80{color:#372aaccc}@supports (color:color-mix(in lab,red,red)){.text-indigo-800\/80{color:color-mix(in oklab,var(--color-indigo-800) 80%,transparent)}}.text-indigo-900{color:var(--color-indigo-900)}.text-muted-foreground,.text-muted-foreground\/40{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/40{color:color-mix(in oklab,var(--muted-foreground) 40%,transparent)}}.text-muted-foreground\/60{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,var(--muted-foreground) 60%,transparent)}}.text-orange-300{color:var(--color-orange-300)}.text-orange-400{color:var(--color-orange-400)}.text-orange-500{color:var(--color-orange-500)}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-pink-500{color:var(--color-pink-500)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-purple-200{color:var(--color-purple-200)}.text-purple-600{color:var(--color-purple-600)}.text-purple-600\/80{color:#9810facc}@supports (color:color-mix(in lab,red,red)){.text-purple-600\/80{color:color-mix(in oklab,var(--color-purple-600) 80%,transparent)}}.text-purple-700{color:var(--color-purple-700)}.text-purple-800{color:var(--color-purple-800)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-red-900{color:var(--color-red-900)}.text-rose-100{color:var(--color-rose-100)}.text-rose-200{color:var(--color-rose-200)}.text-rose-300{color:var(--color-rose-300)}.text-rose-400{color:var(--color-rose-400)}.text-rose-500{color:var(--color-rose-500)}.text-rose-600{color:var(--color-rose-600)}.text-rose-700{color:var(--color-rose-700)}.text-rose-800{color:var(--color-rose-800)}.text-rose-900{color:var(--color-rose-900)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-sidebar-foreground,.text-sidebar-foreground\/70{color:var(--sidebar-foreground)}@supports (color:color-mix(in lab,red,red)){.text-sidebar-foreground\/70{color:color-mix(in oklab,var(--sidebar-foreground) 70%,transparent)}}.text-sky-100{color:var(--color-violet-100)}.text-sky-200{color:var(--color-violet-200)}.text-sky-300{color:var(--color-violet-300)}.text-sky-400{color:var(--color-violet-400)}.text-sky-500{color:var(--color-violet-500)}.text-sky-600{color:var(--color-violet-600)}.text-sky-600\/80{color:#7f22fecc}@supports (color:color-mix(in lab,red,red)){.text-sky-600\/80{color:color-mix(in oklab,var(--color-violet-600) 80%,transparent)}}.text-sky-700{color:var(--color-violet-700)}.text-sky-800{color:var(--color-violet-800)}.text-sky-900{color:var(--color-violet-900)}.text-slate-100{color:var(--color-slate-100)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-400\/80{color:#90a1b9cc}@supports (color:color-mix(in lab,red,red)){.text-slate-400\/80{color:color-mix(in oklab,var(--color-slate-400) 80%,transparent)}}.text-slate-500{color:var(--color-slate-500)}.text-slate-500\/60{color:#62748e99}@supports (color:color-mix(in lab,red,red)){.text-slate-500\/60{color:color-mix(in oklab,var(--color-slate-500) 60%,transparent)}}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-teal-400{color:var(--color-teal-400)}.text-teal-500{color:var(--color-teal-500)}.text-teal-600{color:var(--color-teal-600)}.text-teal-700{color:var(--color-teal-700)}.text-teal-800{color:var(--color-teal-800)}.text-transparent{color:#0000}.text-violet-300{color:var(--color-violet-300)}.text-violet-400{color:var(--color-violet-400)}.text-violet-500{color:var(--color-violet-500)}.text-violet-600{color:var(--color-violet-600)}.text-violet-700{color:var(--color-violet-700)}.text-white{color:var(--color-white)}.text-white\/5{color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.text-white\/5{color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.text-white\/10{color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.text-white\/10{color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.text-white\/20{color:#fff3}@supports (color:color-mix(in lab,red,red)){.text-white\/20{color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.text-white\/25{color:#ffffff40}@supports (color:color-mix(in lab,red,red)){.text-white\/25{color:color-mix(in oklab,var(--color-white) 25%,transparent)}}.text-white\/30{color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.text-white\/30{color:color-mix(in oklab,var(--color-white) 30%,transparent)}}.text-white\/40{color:#fff6}@supports (color:color-mix(in lab,red,red)){.text-white\/40{color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.text-white\/50{color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.text-white\/50{color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.text-white\/60{color:#fff9}@supports (color:color-mix(in lab,red,red)){.text-white\/60{color:color-mix(in oklab,var(--color-white) 60%,transparent)}}.text-white\/65{color:#ffffffa6}@supports (color:color-mix(in lab,red,red)){.text-white\/65{color:color-mix(in oklab,var(--color-white) 65%,transparent)}}.text-white\/70{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.text-white\/70{color:color-mix(in oklab,var(--color-white) 70%,transparent)}}.text-white\/80{color:#fffc}@supports (color:color-mix(in lab,red,red)){.text-white\/80{color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.text-white\/85{color:#ffffffd9}@supports (color:color-mix(in lab,red,red)){.text-white\/85{color:color-mix(in oklab,var(--color-white) 85%,transparent)}}.text-white\/90{color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.text-white\/90{color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.text-white\/95{color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.text-white\/95{color:color-mix(in oklab,var(--color-white) 95%,transparent)}}.text-yellow-300{color:var(--color-yellow-300)}.text-yellow-400{color:var(--color-yellow-400)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-700{color:var(--color-yellow-700)}.text-yellow-800{color:var(--color-yellow-800)}.text-zinc-700{color:var(--color-zinc-700)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-slate-400{-webkit-text-decoration-color:var(--color-slate-400);text-decoration-color:var(--color-slate-400)}.underline-offset-4{text-underline-offset:4px}.accent-violet-500{accent-color:var(--color-violet-500)}.opacity-0{opacity:0}.opacity-5{opacity:.05}.opacity-10{opacity:.1}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-65{opacity:.65}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.opacity-95{opacity:.95}.opacity-100{opacity:1}.opacity-\[0\.2\]{opacity:.2}.opacity-\[0\.03\]{opacity:.03}.opacity-\[0\.15\]{opacity:.15}.mix-blend-multiply{mix-blend-mode:multiply}.mix-blend-overlay{mix-blend-mode:overlay}.mix-blend-plus-lighter{mix-blend-mode:plus-lighter}.mix-blend-screen{mix-blend-mode:screen}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_-10px_30px_rgba\(0\,0\,0\,0\.1\)\]{--tw-shadow:0 -10px 30px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_0_1px_hsl\(var\(--sidebar-border\)\)\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,hsl(var(--sidebar-border)));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_0_2px_rgba\(251\,113\,133\,0\.45\)\,0_6px_0_rgba\(127\,29\,29\,1\)\]{--tw-shadow:0 0 0 2px var(--tw-shadow-color,#fb718573), 0 6px 0 var(--tw-shadow-color,#7f1d1d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_8px_white\]{--tw-shadow:0 0 8px var(--tw-shadow-color,white);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_10px_rgba\(16\,185\,129\,0\.15\)\]{--tw-shadow:0 0 10px var(--tw-shadow-color,#10b98126);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_10px_rgba\(251\,146\,60\,0\.5\)\]{--tw-shadow:0 0 10px var(--tw-shadow-color,#fb923c80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_10px_rgba\(251\,191\,36\,0\.8\)\]{--tw-shadow:0 0 10px var(--tw-shadow-color,#fbbf24cc);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_14px_rgba\(16\,185\,129\,0\.25\)\]{--tw-shadow:0 0 14px var(--tw-shadow-color,#10b98140);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_14px_rgba\(148\,163\,184\,0\.2\)\]{--tw-shadow:0 0 14px var(--tw-shadow-color,#94a3b833);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(16\,185\,129\,0\.2\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#10b98133);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(99\,102\,241\,0\.2\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#6366f133);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(245\,158\,11\,0\.2\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#f59e0b33);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_15px_rgba\(251\,191\,36\,0\.25\)\]{--tw-shadow:0 0 15px var(--tw-shadow-color,#fbbf2440);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_16px_rgba\(249\,115\,22\,0\.3\)\]{--tw-shadow:0 0 16px var(--tw-shadow-color,#f973164d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_18px_rgba\(251\,191\,36\,0\.35\)\]{--tw-shadow:0 0 18px var(--tw-shadow-color,#fbbf2459);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_18px_rgba\(255\,139\,139\,0\.6\)\]{--tw-shadow:0 0 18px var(--tw-shadow-color,#ff8b8b99);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_18px_rgba\(255\,179\,86\,0\.6\)\]{--tw-shadow:0 0 18px var(--tw-shadow-color,#ffb35699);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_20px_rgba\(251\,191\,36\,0\.3\)\]{--tw-shadow:0 0 20px var(--tw-shadow-color,#fbbf244d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_24px_rgba\(250\,204\,21\,0\.6\)\]{--tw-shadow:0 0 24px var(--tw-shadow-color,#facc1599);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_40px_-10px_rgba\(16\,185\,129\,0\.2\)\]{--tw-shadow:0 0 40px -10px var(--tw-shadow-color,#10b98133);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_40px_-10px_rgba\(31\,167\,225\,0\.2\)\]{--tw-shadow:0 0 40px -10px var(--tw-shadow-color,#1fa7e133);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_40px_-10px_rgba\(99\,102\,241\,0\.2\)\]{--tw-shadow:0 0 40px -10px var(--tw-shadow-color,#6366f133);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_40px_-10px_rgba\(138\,63\,211\,0\.2\)\]{--tw-shadow:0 0 40px -10px var(--tw-shadow-color,#8a3fd333);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_40px_-10px_rgba\(245\,158\,11\,0\.2\)\]{--tw-shadow:0 0 40px -10px var(--tw-shadow-color,#f59e0b33);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_50px_rgba\(0\,0\,0\,0\.3\)\]{--tw-shadow:0 0 50px var(--tw-shadow-color,#0000004d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_2px_15px_-3px_rgba\(0\,0\,0\,0\.1\)\]{--tw-shadow:0 2px 15px -3px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_4px_8px_rgba\(0\,0\,0\,0\.3\)\]{--tw-shadow:0 4px 8px var(--tw-shadow-color,#0000004d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_5px_12px_rgba\(0\,0\,0\,0\.4\)\]{--tw-shadow:0 5px 12px var(--tw-shadow-color,#0006);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_6px_0_rgba\(5\,150\,105\,1\)\]{--tw-shadow:0 6px 0 var(--tw-shadow-color,#059669);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_6px_0_rgba\(15\,20\,30\,0\.5\)\]{--tw-shadow:0 6px 0 var(--tw-shadow-color,#0f141e80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_6px_0_rgba\(79\,70\,229\,1\)\]{--tw-shadow:0 6px 0 var(--tw-shadow-color,#4f46e5);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_6px_0_rgba\(225\,29\,72\,1\)\]{--tw-shadow:0 6px 0 var(--tw-shadow-color,#e11d48);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_16px_rgba\(0\,0\,0\,0\.15\)\]{--tw-shadow:0 8px 16px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_16px_rgba\(18\,25\,43\,0\.3\)\]{--tw-shadow:0 8px 16px var(--tw-shadow-color,#12192b4d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_20px_-8px_rgba\(79\,70\,229\,0\.5\)\]{--tw-shadow:0 8px 20px -8px var(--tw-shadow-color,#4f46e580);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_24px_-10px_rgba\(0\,0\,0\,0\.05\)\]{--tw-shadow:0 8px 24px -10px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_30px_-12px_rgba\(0\,0\,0\,0\.06\)\]{--tw-shadow:0 8px 30px -12px var(--tw-shadow-color,#0000000f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_30px_rgb\(0\,0\,0\,0\.04\)\]{--tw-shadow:0 8px 30px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_30px_rgba\(0\,0\,0\,0\.5\)\]{--tw-shadow:0 8px 30px var(--tw-shadow-color,#00000080);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_30px_rgba\(31\,167\,225\,0\.2\)\]{--tw-shadow:0 8px 30px var(--tw-shadow-color,#1fa7e133);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_30px_rgba\(59\,58\,130\,0\.3\)\]{--tw-shadow:0 8px 30px var(--tw-shadow-color,#3b3a824d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_30px_rgba\(138\,63\,211\,0\.2\)\]{--tw-shadow:0 8px 30px var(--tw-shadow-color,#8a3fd333);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_10px_40px_-10px_rgba\(0\,0\,0\,0\.15\)\]{--tw-shadow:0 10px 40px -10px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_12px_25px_rgba\(0\,0\,0\,0\.08\)\]{--tw-shadow:0 12px 25px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_12px_30px_-10px_rgba\(79\,70\,229\,0\.5\)\]{--tw-shadow:0 12px 30px -10px var(--tw-shadow-color,#4f46e580);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_15px_25px_rgba\(0\,0\,0\,0\.4\)\]{--tw-shadow:0 15px 25px var(--tw-shadow-color,#0006);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_18px_30px_-20px_rgba\(0\,0\,0\,0\.45\)\]{--tw-shadow:0 18px 30px -20px var(--tw-shadow-color,#00000073);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_20px_30px_rgba\(0\,0\,0\,0\.5\)\]{--tw-shadow:0 20px 30px var(--tw-shadow-color,#00000080);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_20px_40px_-15px_rgba\(0\,0\,0\,0\.3\)\]{--tw-shadow:0 20px 40px -15px var(--tw-shadow-color,#0000004d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_20px_45px_-15px_rgba\(0\,0\,0\,0\.3\)\]{--tw-shadow:0 20px 45px -15px var(--tw-shadow-color,#0000004d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_20px_50px_rgba\(0\,0\,0\,0\.5\)\]{--tw-shadow:0 20px 50px var(--tw-shadow-color,#00000080);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_20px_50px_rgba\(15\,20\,34\,0\.2\)\]{--tw-shadow:0 20px 50px var(--tw-shadow-color,#0f142233);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_20px_60px_-15px_rgba\(0\,0\,0\,0\.2\)\]{--tw-shadow:0 20px 60px -15px var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_20px_60px_-15px_rgba\(168\,85\,247\,0\.15\)\]{--tw-shadow:0 20px 60px -15px var(--tw-shadow-color,#a855f726);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_20px_60px_rgba\(0\,0\,0\,0\.4\)\]{--tw-shadow:0 20px 60px var(--tw-shadow-color,#0006);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_30px_80px_rgba\(0\,0\,0\,0\.6\)\]{--tw-shadow:0 30px 80px var(--tw-shadow-color,#0009);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_30px_80px_rgba\(0\,0\,0\,0\.8\)\]{--tw-shadow:0 30px 80px var(--tw-shadow-color,#000c);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_-4px_6px_rgba\(0\,0\,0\,0\.05\)\,0_4px_6px_rgba\(0\,0\,0\,0\.05\)\]{--tw-shadow:inset 0 -4px 6px var(--tw-shadow-color,#0000000d), 0 4px 6px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_2px_4px_rgba\(0\,0\,0\,0\.05\)\]{--tw-shadow:inset 0 2px 4px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_2px_4px_rgba\(255\,255\,255\,0\.1\)\,_inset_0_-4px_4px_rgba\(0\,0\,0\,0\.2\)\]{--tw-shadow:inset 0 2px 4px var(--tw-shadow-color,#ffffff1a), inset 0 -4px 4px var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_6px_15px_rgba\(255\,255\,255\,0\.4\)\]{--tw-shadow:inset 0 6px 15px var(--tw-shadow-color,#fff6);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-4,.ring-\[4px\]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[\#1FA7E1\]\/20{--tw-shadow-color:#1fa7e133}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#1FA7E1\]\/20{--tw-shadow-color:color-mix(in oklab, oklab(68.7044% -.0807821 -.10979/.2) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#1FA7E1\]\/30{--tw-shadow-color:#1fa7e14d}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#1FA7E1\]\/30{--tw-shadow-color:color-mix(in oklab, oklab(68.7044% -.0807821 -.10979/.3) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#1FA7E1\]\/40{--tw-shadow-color:#1fa7e166}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#1FA7E1\]\/40{--tw-shadow-color:color-mix(in oklab, oklab(68.7044% -.0807821 -.10979/.4) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#7C3AED\]\/20{--tw-shadow-color:#7c3aed33}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#7C3AED\]\/20{--tw-shadow-color:color-mix(in oklab, oklab(54.1337% .0963843 -.226968/.2) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#8A3FD3\]\/30{--tw-shadow-color:#8a3fd34d}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#8A3FD3\]\/30{--tw-shadow-color:color-mix(in oklab, oklab(54.1025% .117281 -.181162/.3) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#8A3FD3\]\/40{--tw-shadow-color:#8a3fd366}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#8A3FD3\]\/40{--tw-shadow-color:color-mix(in oklab, oklab(54.1025% .117281 -.181162/.4) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#8B5CF6\]\/20{--tw-shadow-color:#8b5cf633}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#8B5CF6\]\/20{--tw-shadow-color:color-mix(in oklab, oklab(60.5631% .0845415 -.201932/.2) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#75D06A\]\/30{--tw-shadow-color:#75d06a4d}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#75D06A\]\/30{--tw-shadow-color:color-mix(in oklab, oklab(77.7281% -.128439 .101669/.3) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#9956DE\]\/20{--tw-shadow-color:#9956de33}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#9956DE\]\/20{--tw-shadow-color:color-mix(in oklab, oklab(59.4745% .111053 -.167638/.2) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#9956DE\]\/30{--tw-shadow-color:#9956de4d}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#9956DE\]\/30{--tw-shadow-color:color-mix(in oklab, oklab(59.4745% .111053 -.167638/.3) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#FB96BB\]\/30{--tw-shadow-color:#fb96bb4d}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#FB96BB\]\/30{--tw-shadow-color:color-mix(in oklab, oklab(78.801% .12777 -.00670064/.3) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#FF8B8B\]\/30{--tw-shadow-color:#ff8b8b4d}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#FF8B8B\]\/30{--tw-shadow-color:color-mix(in oklab, oklab(76.3223% .131566 .050208/.3) var(--tw-shadow-alpha), transparent)}}.shadow-\[\#FFB356\]\/30{--tw-shadow-color:#ffb3564d}@supports (color:color-mix(in lab,red,red)){.shadow-\[\#FFB356\]\/30{--tw-shadow-color:color-mix(in oklab, oklab(82.2219% .0499055 .130321/.3) var(--tw-shadow-alpha), transparent)}}.shadow-\[rgba\(124\,58\,237\,0\.05\)_0px_0px_30px_inset\]{--tw-shadow-color:#7c3aed0d}@supports (color:color-mix(in lab,red,red)){.shadow-\[rgba\(124\,58\,237\,0\.05\)_0px_0px_30px_inset\]{--tw-shadow-color:color-mix(in oklab, #7c3aed0d 0px 0px 30px inset var(--tw-shadow-alpha), transparent)}}.shadow-purple-200{--tw-shadow-color:oklch(90.2% .063 306.703)}@supports (color:color-mix(in lab,red,red)){.shadow-purple-200{--tw-shadow-color:color-mix(in oklab, var(--color-purple-200) var(--tw-shadow-alpha), transparent)}}.shadow-purple-500\/20{--tw-shadow-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.shadow-purple-500\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-purple-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-purple-600\/25{--tw-shadow-color:#9810fa40}@supports (color:color-mix(in lab,red,red)){.shadow-purple-600\/25{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-purple-600) 25%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-100{--tw-shadow-color:oklch(93.6% .032 17.717)}@supports (color:color-mix(in lab,red,red)){.shadow-red-100{--tw-shadow-color:color-mix(in oklab, var(--color-red-100) var(--tw-shadow-alpha), transparent)}}.shadow-red-900\/10{--tw-shadow-color:#82181a1a}@supports (color:color-mix(in lab,red,red)){.shadow-red-900\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-900) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-rose-200{--tw-shadow-color:oklch(89.2% .058 10.001)}@supports (color:color-mix(in lab,red,red)){.shadow-rose-200{--tw-shadow-color:color-mix(in oklab, var(--color-rose-200) var(--tw-shadow-alpha), transparent)}}.shadow-sky-200{--tw-shadow-color:oklch(89.4% .057 293.283)}@supports (color:color-mix(in lab,red,red)){.shadow-sky-200{--tw-shadow-color:color-mix(in oklab, var(--color-violet-200) var(--tw-shadow-alpha), transparent)}}.shadow-sky-500\/20{--tw-shadow-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.shadow-sky-500\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-violet-500) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-slate-900\/\[0\.04\]{--tw-shadow-color:#0f172b0a}@supports (color:color-mix(in lab,red,red)){.shadow-slate-900\/\[0\.04\]{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-slate-900) 4%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-teal-100{--tw-shadow-color:oklch(95.3% .051 180.801)}@supports (color:color-mix(in lab,red,red)){.shadow-teal-100{--tw-shadow-color:color-mix(in oklab, var(--color-teal-100) var(--tw-shadow-alpha), transparent)}}.shadow-teal-200{--tw-shadow-color:oklch(91% .096 180.426)}@supports (color:color-mix(in lab,red,red)){.shadow-teal-200{--tw-shadow-color:color-mix(in oklab, var(--color-teal-200) var(--tw-shadow-alpha), transparent)}}.ring-\[\#1FA7E1\]\/35{--tw-ring-color:oklab(68.7044% -.0807821 -.10979/.35)}.ring-\[\#8B5CF6\]\/10{--tw-ring-color:oklab(60.5631% .0845415 -.201932/.1)}.ring-\[\#9956DE\]\/45{--tw-ring-color:oklab(59.4745% .111053 -.167638/.45)}.ring-\[\#9956DE\]\/50{--tw-ring-color:oklab(59.4745% .111053 -.167638/.5)}.ring-\[color-mix\(in_srgb\,var\(--chart-2\)_40\%\,transparent\)\]{--tw-ring-color:var(--chart-2)}@supports (color:color-mix(in lab,red,red)){.ring-\[color-mix\(in_srgb\,var\(--chart-2\)_40\%\,transparent\)\]{--tw-ring-color:color-mix(in srgb,var(--chart-2) 40%,transparent)}}.ring-\[color-mix\(in_srgb\,var\(--chart-3\)_40\%\,transparent\)\]{--tw-ring-color:var(--chart-3)}@supports (color:color-mix(in lab,red,red)){.ring-\[color-mix\(in_srgb\,var\(--chart-3\)_40\%\,transparent\)\]{--tw-ring-color:color-mix(in srgb,var(--chart-3) 40%,transparent)}}.ring-\[color-mix\(in_srgb\,var\(--chart-4\)_40\%\,transparent\)\]{--tw-ring-color:var(--chart-4)}@supports (color:color-mix(in lab,red,red)){.ring-\[color-mix\(in_srgb\,var\(--chart-4\)_40\%\,transparent\)\]{--tw-ring-color:color-mix(in srgb,var(--chart-4) 40%,transparent)}}.ring-green-300{--tw-ring-color:var(--color-green-300)}.ring-indigo-100{--tw-ring-color:var(--color-indigo-100)}.ring-primary,.ring-primary\/40{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.ring-primary\/40{--tw-ring-color:color-mix(in oklab, var(--primary) 40%, transparent)}}.ring-red-200{--tw-ring-color:var(--color-red-200)}.ring-red-300{--tw-ring-color:var(--color-red-300)}.ring-red-500{--tw-ring-color:var(--color-red-500)}.ring-ring\/50{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.ring-ring\/50{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.ring-rose-300{--tw-ring-color:var(--color-rose-300)}.ring-sidebar-ring{--tw-ring-color:var(--sidebar-ring)}.ring-sky-50{--tw-ring-color:var(--color-violet-50)}.ring-slate-200{--tw-ring-color:var(--color-slate-200)}.ring-teal-200{--tw-ring-color:var(--color-teal-200)}.ring-white{--tw-ring-color:var(--color-white)}.ring-white\/10{--tw-ring-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.ring-white\/10{--tw-ring-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.ring-white\/20{--tw-ring-color:#fff3}@supports (color:color-mix(in lab,red,red)){.ring-white\/20{--tw-ring-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.ring-white\/50{--tw-ring-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.ring-white\/50{--tw-ring-color:color-mix(in oklab, var(--color-white) 50%, transparent)}}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.ring-offset-\[4px\]{--tw-ring-offset-width:4px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.ring-offset-\[\#0B0F19\]{--tw-ring-offset-color:#0b0f19}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-2xl{--tw-blur:blur(var(--blur-2xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-3xl{--tw-blur:blur(var(--blur-3xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[1px\]{--tw-blur:blur(1px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[32px\]{--tw-blur:blur(32px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[60px\]{--tw-blur:blur(60px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[100px\]{--tw-blur:blur(100px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[120px\]{--tw-blur:blur(120px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[140px\]{--tw-blur:blur(140px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-\[160px\]{--tw-blur:blur(160px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-md{--tw-blur:blur(var(--blur-md));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-xl{--tw-blur:blur(var(--blur-xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.brightness-105{--tw-brightness:brightness(105%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.contrast-50{--tw-contrast:contrast(50%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-2xl{--tw-drop-shadow-size:drop-shadow(0 25px 25px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:drop-shadow(var(--drop-shadow-2xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[-2px_-2px_0px_white\]{--tw-drop-shadow-size:drop-shadow(-2px -2px 0px var(--tw-drop-shadow-color,white));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[-2px_2px_0px_white\]{--tw-drop-shadow-size:drop-shadow(-2px 2px 0px var(--tw-drop-shadow-color,white));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[-2px_3px_0px_rgba\(0\,0\,0\,0\.8\)\]{--tw-drop-shadow-size:drop-shadow(-2px 3px 0px var(--tw-drop-shadow-color,#000c));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[-3px_0px_0px_white\]{--tw-drop-shadow-size:drop-shadow(-3px 0px 0px var(--tw-drop-shadow-color,white));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_6px_rgba\(251\,146\,60\,0\.5\)\]{--tw-drop-shadow-size:drop-shadow(0 0 6px var(--tw-drop-shadow-color,#fb923c80));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_8px_rgba\(16\,185\,129\,0\.5\)\]{--tw-drop-shadow-size:drop-shadow(0 0 8px var(--tw-drop-shadow-color,#10b98180));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_8px_rgba\(31\,167\,225\,0\.5\)\]{--tw-drop-shadow-size:drop-shadow(0 0 8px var(--tw-drop-shadow-color,#1fa7e180));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_8px_rgba\(99\,102\,241\,0\.5\)\]{--tw-drop-shadow-size:drop-shadow(0 0 8px var(--tw-drop-shadow-color,#6366f180));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_8px_rgba\(138\,63\,211\,0\.5\)\]{--tw-drop-shadow-size:drop-shadow(0 0 8px var(--tw-drop-shadow-color,#8a3fd380));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_8px_rgba\(249\,115\,22\,0\.6\)\]{--tw-drop-shadow-size:drop-shadow(0 0 8px var(--tw-drop-shadow-color,#f9731699));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_8px_rgba\(251\,191\,36\,0\.9\)\]{--tw-drop-shadow-size:drop-shadow(0 0 8px var(--tw-drop-shadow-color,#fbbf24e6));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_10px_rgba\(239\,68\,68\,0\.7\)\]{--tw-drop-shadow-size:drop-shadow(0 0 10px var(--tw-drop-shadow-color,#ef4444b3));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_12px_rgba\(245\,158\,11\,0\.6\)\]{--tw-drop-shadow-size:drop-shadow(0 0 12px var(--tw-drop-shadow-color,#f59e0b99));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_12px_rgba\(250\,204\,21\,0\.9\)\]{--tw-drop-shadow-size:drop-shadow(0 0 12px var(--tw-drop-shadow-color,#facc15e6));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_12px_rgba\(255\,255\,255\,0\.4\)\]{--tw-drop-shadow-size:drop-shadow(0 0 12px var(--tw-drop-shadow-color,#fff6));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_15px_rgba\(220\,38\,38\,0\.8\)\]{--tw-drop-shadow-size:drop-shadow(0 0 15px var(--tw-drop-shadow-color,#dc2626cc));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_15px_rgba\(253\,224\,71\,0\.6\)\]{--tw-drop-shadow-size:drop-shadow(0 0 15px var(--tw-drop-shadow-color,#fde04799));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_0_25px_rgba\(252\,211\,77\,0\.9\)\]{--tw-drop-shadow-size:drop-shadow(0 0 25px var(--tw-drop-shadow-color,#fcd34de6));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_12px_15px_rgba\(0\,0\,0\,0\.3\)\]{--tw-drop-shadow-size:drop-shadow(0 12px 15px var(--tw-drop-shadow-color,#0000004d));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0_15px_15px_rgba\(0\,0\,0\,0\.3\)\]{--tw-drop-shadow-size:drop-shadow(0 15px 15px var(--tw-drop-shadow-color,#0000004d));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0px_-3px_0px_white\]{--tw-drop-shadow-size:drop-shadow(0px -3px 0px var(--tw-drop-shadow-color,white));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[0px_3px_0px_white\]{--tw-drop-shadow-size:drop-shadow(0px 3px 0px var(--tw-drop-shadow-color,white));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[2px_-2px_0px_white\]{--tw-drop-shadow-size:drop-shadow(2px -2px 0px var(--tw-drop-shadow-color,white));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[2px_2px_0px_white\]{--tw-drop-shadow-size:drop-shadow(2px 2px 0px var(--tw-drop-shadow-color,white));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\[3px_0px_0px_white\]{--tw-drop-shadow-size:drop-shadow(3px 0px 0px var(--tw-drop-shadow-color,white));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-lg{--tw-drop-shadow-size:drop-shadow(0 4px 4px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:drop-shadow(var(--drop-shadow-lg));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-md{--tw-drop-shadow-size:drop-shadow(0 3px 3px var(--tw-drop-shadow-color,#0000001f));--tw-drop-shadow:drop-shadow(var(--drop-shadow-md));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-sm{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#00000026));--tw-drop-shadow:drop-shadow(var(--drop-shadow-sm));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-xl{--tw-drop-shadow-size:drop-shadow(0 9px 7px var(--tw-drop-shadow-color,#0000001a));--tw-drop-shadow:drop-shadow(var(--drop-shadow-xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.saturate-50{--tw-saturate:saturate(50%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-2xl{--tw-backdrop-blur:blur(var(--blur-2xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-\[1px\]{--tw-backdrop-blur:blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-\[2px\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[left\,right\,width\]{transition-property:left,right,width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[margin\,opacity\]{transition-property:margin,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\,height\,padding\]{transition-property:width,height,padding;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.delay-75{transition-delay:75ms}.duration-0{--tw-duration:0s;transition-duration:0s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.duration-1000{--tw-duration:1s;transition-duration:1s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-linear{--tw-ease:linear;transition-timing-function:linear}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\[-ms-overflow-style\:none\]{-ms-overflow-style:none}.\[animation-delay\:150ms\]{animation-delay:.15s}.\[animation-delay\:300ms\]{animation-delay:.3s}.\[background\:linear-gradient\(var\(--grid-color\)_0_1px\,_transparent_1px_var\(--beam-size\)\)_50\%_-0\.5px_\/var\(--beam-size\)_var\(--beam-size\)\,linear-gradient\(90deg\,_var\(--grid-color\)_0_1px\,_transparent_1px_var\(--beam-size\)\)_50\%_50\%_\/var\(--beam-size\)_var\(--beam-size\)\]{background:linear-gradient(var(--grid-color) 0 1px,transparent 1px var(--beam-size)) 50% -.5px /var(--beam-size) var(--beam-size),linear-gradient(90deg,var(--grid-color) 0 1px,transparent 1px var(--beam-size)) 50% 50% /var(--beam-size) var(--beam-size)}.\[background\:var\(--background\)\]{background:var(--background)}.\[clip-path\:inset\(0\)\]{clip-path:inset(0)}.\[perspective\:var\(--perspective\)\]{perspective:var(--perspective)}.\[scrollbar-width\:none\]{scrollbar-width:none}.\[transform-style\:preserve-3d\]{transform-style:preserve-3d}.ring-inset{--tw-ring-inset:inset}.group-open\:rotate-180:is(:where(.group):is([open],:popover-open,:open) *){rotate:180deg}.group-focus-within\/menu-item\:opacity-100:is(:where(.group\/menu-item):focus-within *){opacity:1}@media(hover:hover){.group-hover\:left-\[150\%\]:is(:where(.group):hover *){left:150%}.group-hover\:block:is(:where(.group):hover *){display:block}.group-hover\:-translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:-translate-x-1:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:translate-x-1:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:translate-x-4:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:-translate-y-1:is(:where(.group):hover *){--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:-translate-y-2:is(:where(.group):hover *){--tw-translate-y:calc(var(--spacing) * -2);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:-translate-y-4:is(:where(.group):hover *){--tw-translate-y:calc(var(--spacing) * -4);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:scale-110:is(:where(.group):hover *){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:scale-125:is(:where(.group):hover *){--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:scale-\[1\.3\]:is(:where(.group):hover *){scale:1.3}.group-hover\:-rotate-6:is(:where(.group):hover *){rotate:-6deg}.group-hover\:rotate-12:is(:where(.group):hover *){rotate:12deg}.group-hover\:rotate-\[25deg\]:is(:where(.group):hover *){rotate:25deg}.group-hover\:animate-\[shimmer_1\.5s_ease-out\]:is(:where(.group):hover *){animation:1.5s ease-out shimmer}.group-hover\:border-\[\#dde3eb\]:is(:where(.group):hover *){border-color:#dde3eb}.group-hover\:border-amber-400:is(:where(.group):hover *){border-color:var(--color-amber-400)}.group-hover\:border-sky-300:is(:where(.group):hover *){border-color:var(--color-violet-300)}.group-hover\:border-r-amber-400:is(:where(.group):hover *){border-right-color:var(--color-amber-400)}.group-hover\:border-b-amber-400:is(:where(.group):hover *){border-bottom-color:var(--color-amber-400)}.group-hover\:bg-amber-50:is(:where(.group):hover *){background-color:var(--color-amber-50)}.group-hover\:bg-amber-100\/50:is(:where(.group):hover *){background-color:#fef3c680}@supports (color:color-mix(in lab,red,red)){.group-hover\:bg-amber-100\/50:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-amber-100) 50%,transparent)}}.group-hover\:bg-black\/20:is(:where(.group):hover *){background-color:#0003}@supports (color:color-mix(in lab,red,red)){.group-hover\:bg-black\/20:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.group-hover\:bg-slate-700:is(:where(.group):hover *){background-color:var(--color-slate-700)}.group-hover\:bg-white\/20:is(:where(.group):hover *){background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.group-hover\:bg-white\/20:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.group-hover\:bg-white\/30:is(:where(.group):hover *){background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.group-hover\:bg-white\/30:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-white) 30%,transparent)}}.group-hover\:p-2\.5:is(:where(.group):hover *){padding:calc(var(--spacing) * 2.5)}.group-hover\:text-\[\#9956DE\]:is(:where(.group):hover *){color:#9956de}.group-hover\:text-amber-500:is(:where(.group):hover *){color:var(--color-amber-500)}.group-hover\:text-primary:is(:where(.group):hover *){color:var(--primary)}.group-hover\:text-sky-500:is(:where(.group):hover *){color:var(--color-violet-500)}.group-hover\:text-sky-600:is(:where(.group):hover *){color:var(--color-violet-600)}.group-hover\:text-white:is(:where(.group):hover *){color:var(--color-white)}.group-hover\:opacity-90:is(:where(.group):hover *){opacity:.9}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\:shadow-\[0_24px_40px_-15px_rgba\(0\,0\,0\,0\.5\)\]:is(:where(.group):hover *){--tw-shadow:0 24px 40px -15px var(--tw-shadow-color,#00000080);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-hover\:duration-\[800ms\]:is(:where(.group):hover *){--tw-duration:.8s;transition-duration:.8s}.group-hover\/avatar\:scale-110:is(:where(.group\/avatar):hover *){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\/menu-item\:opacity-100:is(:where(.group\/menu-item):hover *){opacity:1}}.group-has-data-\[sidebar\=menu-action\]\/menu-item\:pr-8:is(:where(.group\/menu-item):has([data-sidebar=menu-action]) *){padding-right:calc(var(--spacing) * 8)}.group-data-\[collapsible\=icon\]\:-mt-8:is(:where(.group)[data-collapsible=icon] *){margin-top:calc(var(--spacing) * -8)}.group-data-\[collapsible\=icon\]\:hidden:is(:where(.group)[data-collapsible=icon] *){display:none}.group-data-\[collapsible\=icon\]\:size-8\!:is(:where(.group)[data-collapsible=icon] *){width:calc(var(--spacing) * 8)!important;height:calc(var(--spacing) * 8)!important}.group-data-\[collapsible\=icon\]\:w-\(--sidebar-width-icon\):is(:where(.group)[data-collapsible=icon] *){width:var(--sidebar-width-icon)}.group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)\+\(--spacing\(4\)\)\)\]:is(:where(.group)[data-collapsible=icon] *){width:calc(var(--sidebar-width-icon) + (calc(var(--spacing) * 4)))}.group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)\+\(--spacing\(4\)\)\+2px\)\]:is(:where(.group)[data-collapsible=icon] *){width:calc(var(--sidebar-width-icon) + (calc(var(--spacing) * 4)) + 2px)}.group-data-\[collapsible\=icon\]\:overflow-hidden:is(:where(.group)[data-collapsible=icon] *){overflow:hidden}.group-data-\[collapsible\=icon\]\:p-0\!:is(:where(.group)[data-collapsible=icon] *){padding:calc(var(--spacing) * 0)!important}.group-data-\[collapsible\=icon\]\:p-2\!:is(:where(.group)[data-collapsible=icon] *){padding:calc(var(--spacing) * 2)!important}.group-data-\[collapsible\=icon\]\:opacity-0:is(:where(.group)[data-collapsible=icon] *){opacity:0}.group-data-\[collapsible\=offcanvas\]\:right-\[calc\(var\(--sidebar-width\)\*-1\)\]:is(:where(.group)[data-collapsible=offcanvas] *){right:calc(var(--sidebar-width) * -1)}.group-data-\[collapsible\=offcanvas\]\:left-\[calc\(var\(--sidebar-width\)\*-1\)\]:is(:where(.group)[data-collapsible=offcanvas] *){left:calc(var(--sidebar-width) * -1)}.group-data-\[collapsible\=offcanvas\]\:w-0:is(:where(.group)[data-collapsible=offcanvas] *){width:calc(var(--spacing) * 0)}.group-data-\[collapsible\=offcanvas\]\:translate-x-0:is(:where(.group)[data-collapsible=offcanvas] *){--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.group-data-\[side\=left\]\:-right-4:is(:where(.group)[data-side=left] *){right:calc(var(--spacing) * -4)}.group-data-\[side\=left\]\:border-r:is(:where(.group)[data-side=left] *){border-right-style:var(--tw-border-style);border-right-width:1px}.group-data-\[side\=right\]\:left-0:is(:where(.group)[data-side=right] *){left:calc(var(--spacing) * 0)}.group-data-\[side\=right\]\:rotate-180:is(:where(.group)[data-side=right] *){rotate:180deg}.group-data-\[side\=right\]\:border-l:is(:where(.group)[data-side=right] *){border-left-style:var(--tw-border-style);border-left-width:1px}.group-data-\[state\=open\]\:rotate-180:is(:where(.group)[data-state=open] *){rotate:180deg}.group-data-\[variant\=floating\]\:rounded-lg:is(:where(.group)[data-variant=floating] *){border-radius:var(--radius)}.group-data-\[variant\=floating\]\:border:is(:where(.group)[data-variant=floating] *){border-style:var(--tw-border-style);border-width:1px}.group-data-\[variant\=floating\]\:border-sidebar-border:is(:where(.group)[data-variant=floating] *){border-color:var(--sidebar-border)}.group-data-\[variant\=floating\]\:shadow-sm:is(:where(.group)[data-variant=floating] *){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-data-\[vaul-drawer-direction\=bottom\]\/drawer-content\:block:is(:where(.group\/drawer-content)[data-vaul-drawer-direction=bottom] *){display:block}.group-data-\[viewport\=false\]\/navigation-menu\:top-full:is(:where(.group\/navigation-menu)[data-viewport=false] *){top:100%}.group-data-\[viewport\=false\]\/navigation-menu\:mt-1\.5:is(:where(.group\/navigation-menu)[data-viewport=false] *){margin-top:calc(var(--spacing) * 1.5)}.group-data-\[viewport\=false\]\/navigation-menu\:overflow-hidden:is(:where(.group\/navigation-menu)[data-viewport=false] *){overflow:hidden}.group-data-\[viewport\=false\]\/navigation-menu\:rounded-md:is(:where(.group\/navigation-menu)[data-viewport=false] *){border-radius:calc(var(--radius) - 2px)}.group-data-\[viewport\=false\]\/navigation-menu\:border:is(:where(.group\/navigation-menu)[data-viewport=false] *){border-style:var(--tw-border-style);border-width:1px}.group-data-\[viewport\=false\]\/navigation-menu\:bg-popover:is(:where(.group\/navigation-menu)[data-viewport=false] *){background-color:var(--popover)}.group-data-\[viewport\=false\]\/navigation-menu\:text-popover-foreground:is(:where(.group\/navigation-menu)[data-viewport=false] *){color:var(--popover-foreground)}.group-data-\[viewport\=false\]\/navigation-menu\:shadow:is(:where(.group\/navigation-menu)[data-viewport=false] *){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-data-\[viewport\=false\]\/navigation-menu\:duration-200:is(:where(.group\/navigation-menu)[data-viewport=false] *){--tw-duration:.2s;transition-duration:.2s}.peer-checked\:bg-\[\#5a6578\]:is(:where(.peer):checked~*){background-color:#5a6578}@media(hover:hover){.peer-hover\/menu-button\:text-sidebar-accent-foreground:is(:where(.peer\/menu-button):hover~*){color:var(--sidebar-accent-foreground)}}.peer-focus\:outline-none:is(:where(.peer):focus~*){--tw-outline-style:none;outline-style:none}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.peer-data-\[active\=true\]\/menu-button\:text-sidebar-accent-foreground:is(:where(.peer\/menu-button)[data-active=true]~*){color:var(--sidebar-accent-foreground)}.peer-data-\[size\=default\]\/menu-button\:top-1\.5:is(:where(.peer\/menu-button)[data-size=default]~*){top:calc(var(--spacing) * 1.5)}.peer-data-\[size\=lg\]\/menu-button\:top-2\.5:is(:where(.peer\/menu-button)[data-size=lg]~*){top:calc(var(--spacing) * 2.5)}.peer-data-\[size\=sm\]\/menu-button\:top-1:is(:where(.peer\/menu-button)[data-size=sm]~*){top:calc(var(--spacing) * 1)}.selection\:bg-primary ::selection{background-color:var(--primary)}.selection\:bg-primary::selection{background-color:var(--primary)}.selection\:text-primary-foreground ::selection{color:var(--primary-foreground)}.selection\:text-primary-foreground::selection{color:var(--primary-foreground)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-7::file-selector-button{height:calc(var(--spacing) * 7)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.placeholder\:text-slate-400::placeholder{color:var(--color-slate-400)}.placeholder\:text-slate-500::placeholder{color:var(--color-slate-500)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-inset-2:after{content:var(--tw-content);inset:calc(var(--spacing) * -2)}.after\:inset-y-0:after{content:var(--tw-content);inset-block:calc(var(--spacing) * 0)}.after\:top-0\.5:after{content:var(--tw-content);top:calc(var(--spacing) * .5)}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:left-\[2px\]:after{content:var(--tw-content);left:2px}.after\:h-4:after{content:var(--tw-content);height:calc(var(--spacing) * 4)}.after\:w-1:after{content:var(--tw-content);width:calc(var(--spacing) * 1)}.after\:w-4:after{content:var(--tw-content);width:calc(var(--spacing) * 4)}.after\:w-\[2px\]:after{content:var(--tw-content);width:2px}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.after\:rounded-full:after{content:var(--tw-content);border-radius:3.40282e38px}.after\:border:after{content:var(--tw-content);border-style:var(--tw-border-style);border-width:1px}.after\:border-\[\#dde3eb\]:after{content:var(--tw-content);border-color:#dde3eb}.after\:bg-white:after{content:var(--tw-content);background-color:var(--color-white)}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.group-data-\[collapsible\=offcanvas\]\:after\:left-full:is(:where(.group)[data-collapsible=offcanvas] *):after{content:var(--tw-content);left:100%}.peer-checked\:after\:translate-x-full:is(:where(.peer):checked~*):after{content:var(--tw-content);--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.peer-checked\:after\:border-white:is(:where(.peer):checked~*):after{content:var(--tw-content);border-color:var(--color-white)}.first\:rounded-l-md:first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.first\:border-l:first-child{border-left-style:var(--tw-border-style);border-left-width:1px}.last\:mb-0:last-child{margin-bottom:calc(var(--spacing) * 0)}.last\:rounded-r-md:last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.last\:border-r-0:last-child{border-right-style:var(--tw-border-style);border-right-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}@media(hover:hover){.hover\:z-10:hover{z-index:10}.hover\:h-20:hover{height:calc(var(--spacing) * 20)}.hover\:w-24:hover{width:calc(var(--spacing) * 24)}.hover\:-translate-x-1:hover{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:-translate-x-4:hover{--tw-translate-x:calc(var(--spacing) * -4);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:-translate-y-0\.5:hover{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:-translate-y-1:hover{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:scale-\[1\.01\]:hover{scale:1.01}.hover\:scale-\[1\.02\]:hover{scale:1.02}.hover\:rotate-0:hover{rotate:0deg}.hover\:gap-2:hover{gap:calc(var(--spacing) * 2)}.hover\:border-\[\#1FA7E1\]\/50:hover{border-color:#1fa7e180}.hover\:border-\[\#8A3FD3\]\/50:hover{border-color:#8a3fd380}.hover\:border-\[\#9956DE\]:hover{border-color:#9956de}.hover\:border-\[\#9956DE\]\/30:hover{border-color:#9956de4d}.hover\:border-\[\#9956DE\]\/50:hover{border-color:#9956de80}.hover\:border-\[\#9956DE\]\/60:hover{border-color:#9956de99}.hover\:border-\[\#F08386\]:hover{border-color:#f08386}.hover\:border-\[\#F08386\]\/60:hover{border-color:#f0838699}.hover\:border-\[\#d1cec6\]:hover{border-color:#d1cec6}.hover\:border-\[\#dde3eb\]:hover{border-color:#dde3eb}.hover\:border-amber-200\/60:hover{border-color:#fee68599}@supports (color:color-mix(in lab,red,red)){.hover\:border-amber-200\/60:hover{border-color:color-mix(in oklab,var(--color-amber-200) 60%,transparent)}}.hover\:border-emerald-100:hover{border-color:var(--color-emerald-100)}.hover\:border-emerald-300:hover{border-color:var(--color-emerald-300)}.hover\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\:border-indigo-100:hover{border-color:var(--color-indigo-100)}.hover\:border-indigo-600:hover{border-color:var(--color-indigo-600)}.hover\:border-purple-200:hover{border-color:var(--color-purple-200)}.hover\:border-purple-400:hover{border-color:var(--color-purple-400)}.hover\:border-rose-300:hover{border-color:var(--color-rose-300)}.hover\:border-sky-200:hover{border-color:var(--color-violet-200)}.hover\:border-sky-300:hover{border-color:var(--color-violet-300)}.hover\:border-sky-400:hover{border-color:var(--color-violet-400)}.hover\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\:border-violet-100:hover{border-color:var(--color-violet-100)}.hover\:bg-\[\#1C96CB\]:hover{background-color:#1c96cb}.hover\:bg-\[\#1FA7E1\]\/5:hover{background-color:#1fa7e10d}.hover\:bg-\[\#1a95c9\]:hover{background-color:#1a95c9}.hover\:bg-\[\#5AB84E\]:hover{background-color:#5ab84e}.hover\:bg-\[\#6D28D9\]:hover{background-color:#6d28d9}.hover\:bg-\[\#6ab359\]:hover{background-color:#6ab359}.hover\:bg-\[\#7A44B3\]:hover{background-color:#7a44b3}.hover\:bg-\[\#7b35c0\]:hover{background-color:#7b35c0}.hover\:bg-\[\#008f5d\]:hover{background-color:#008f5d}.hover\:bg-\[\#8A3FD3\]\/5:hover{background-color:#8a3fd30d}.hover\:bg-\[\#8A4DCA\]:hover{background-color:#8a4dca}.hover\:bg-\[\#68c05c\]:hover{background-color:#68c05c}.hover\:bg-\[\#126b84\]:hover{background-color:#126b84}.hover\:bg-\[\#8544c7\]:hover{background-color:#8544c7}.hover\:bg-\[\#9956DE\]\/6:hover{background-color:#9956de0f}.hover\:bg-\[\#9956DE\]\/8:hover{background-color:#9956de14}.hover\:bg-\[\#9956DE\]\/12:hover{background-color:#9956de1f}.hover\:bg-\[\#9956DE\]\/90:hover{background-color:#9956dee6}.hover\:bg-\[\#283042\]:hover{background-color:#283042}.hover\:bg-\[\#F08386\]\/12:hover{background-color:#f083861f}.hover\:bg-\[\#FA7DA9\]:hover{background-color:#fa7da9}.hover\:bg-\[\#FF8B8B\]\/20:hover{background-color:#ff8b8b33}.hover\:bg-\[\#FF7373\]:hover{background-color:#ff7373}.hover\:bg-\[\#dde3eb\]:hover{background-color:#dde3eb}.hover\:bg-\[\#edf1f7\]:hover{background-color:#edf1f7}.hover\:bg-\[\#edf1f7\]\/50:hover{background-color:#edf1f780}.hover\:bg-\[\#f7f9fc\]:hover{background-color:#f7f9fc}.hover\:bg-\[\#f8fafc\]:hover{background-color:#f8fafc}.hover\:bg-accent:hover,.hover\:bg-accent\/40:hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-accent\/40:hover{background-color:color-mix(in oklab,var(--accent) 40%,transparent)}}.hover\:bg-amber-50:hover{background-color:var(--color-amber-50)}.hover\:bg-amber-700:hover{background-color:var(--color-amber-700)}.hover\:bg-black\/40:hover{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.hover\:bg-black\/40:hover{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.hover\:bg-blue-500:hover{background-color:var(--color-blue-500)}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive) 90%,transparent)}}.hover\:bg-emerald-100:hover{background-color:var(--color-emerald-100)}.hover\:bg-emerald-400:hover{background-color:var(--color-emerald-400)}.hover\:bg-green-50:hover{background-color:var(--color-green-50)}.hover\:bg-green-100:hover{background-color:var(--color-green-100)}.hover\:bg-green-700:hover{background-color:var(--color-green-700)}.hover\:bg-indigo-700:hover{background-color:var(--color-indigo-700)}.hover\:bg-muted:hover,.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.hover\:bg-orange-50:hover{background-color:var(--color-orange-50)}.hover\:bg-orange-200:hover{background-color:var(--color-orange-200)}.hover\:bg-orange-600:hover{background-color:var(--color-orange-600)}.hover\:bg-primary:hover,.hover\:bg-primary\/20:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/20:hover{background-color:color-mix(in oklab,var(--primary) 20%,transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary) 90%,transparent)}}.hover\:bg-purple-50\/50:hover{background-color:#faf5ff80}@supports (color:color-mix(in lab,red,red)){.hover\:bg-purple-50\/50:hover{background-color:color-mix(in oklab,var(--color-purple-50) 50%,transparent)}}.hover\:bg-purple-200:hover{background-color:var(--color-purple-200)}.hover\:bg-purple-700:hover{background-color:var(--color-purple-700)}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-red-100:hover{background-color:var(--color-red-100)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\:bg-rose-50:hover{background-color:var(--color-rose-50)}.hover\:bg-rose-100:hover{background-color:var(--color-rose-100)}.hover\:bg-rose-500:hover{background-color:var(--color-rose-500)}.hover\:bg-rose-500\/10:hover{background-color:#ff23571a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-rose-500\/10:hover{background-color:color-mix(in oklab,var(--color-rose-500) 10%,transparent)}}.hover\:bg-rose-600:hover{background-color:var(--color-rose-600)}.hover\:bg-rose-700:hover{background-color:var(--color-rose-700)}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary) 80%,transparent)}}.hover\:bg-sidebar-accent:hover{background-color:var(--sidebar-accent)}.hover\:bg-sky-50:hover{background-color:var(--color-violet-50)}.hover\:bg-sky-50\/50:hover{background-color:#f5f3ff80}@supports (color:color-mix(in lab,red,red)){.hover\:bg-sky-50\/50:hover{background-color:color-mix(in oklab,var(--color-violet-50) 50%,transparent)}}.hover\:bg-sky-50\/80:hover{background-color:#f5f3ffcc}@supports (color:color-mix(in lab,red,red)){.hover\:bg-sky-50\/80:hover{background-color:color-mix(in oklab,var(--color-violet-50) 80%,transparent)}}.hover\:bg-sky-100:hover{background-color:var(--color-violet-100)}.hover\:bg-sky-300:hover{background-color:var(--color-violet-300)}.hover\:bg-sky-600:hover{background-color:var(--color-violet-600)}.hover\:bg-sky-700:hover{background-color:var(--color-violet-700)}.hover\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\:bg-slate-50\/70:hover{background-color:#f8fafcb3}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-50\/70:hover{background-color:color-mix(in oklab,var(--color-slate-50) 70%,transparent)}}.hover\:bg-slate-50\/80:hover{background-color:#f8fafccc}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-50\/80:hover{background-color:color-mix(in oklab,var(--color-slate-50) 80%,transparent)}}.hover\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\:bg-slate-200:hover{background-color:var(--color-slate-200)}.hover\:bg-slate-200\/50:hover{background-color:#e2e8f080}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-200\/50:hover{background-color:color-mix(in oklab,var(--color-slate-200) 50%,transparent)}}.hover\:bg-slate-200\/70:hover{background-color:#e2e8f0b3}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-200\/70:hover{background-color:color-mix(in oklab,var(--color-slate-200) 70%,transparent)}}.hover\:bg-teal-600:hover{background-color:var(--color-teal-600)}.hover\:bg-violet-100:hover{background-color:var(--color-violet-100)}.hover\:bg-violet-500:hover{background-color:var(--color-violet-500)}.hover\:bg-white:hover{background-color:var(--color-white)}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.hover\:bg-white\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/20:hover{background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.hover\:bg-white\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/30:hover{background-color:color-mix(in oklab,var(--color-white) 30%,transparent)}}.hover\:bg-white\/50:hover{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/50:hover{background-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.hover\:bg-white\/80:hover{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/80:hover{background-color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.hover\:\!from-\[\#8FE4DA\]:hover{--tw-gradient-from:#8fe4da!important;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))!important}.hover\:from-\[\#FFA500\]:hover{--tw-gradient-from:orange;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:from-amber-600:hover{--tw-gradient-from:var(--color-amber-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:from-purple-500:hover{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:from-purple-700:hover{--tw-gradient-from:var(--color-purple-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:from-sky-700:hover{--tw-gradient-from:var(--color-violet-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:\!to-\[\#49BDEB\]:hover{--tw-gradient-to:#49bdeb!important;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))!important}.hover\:to-\[\#FF7F00\]:hover{--tw-gradient-to:#ff7f00;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:to-orange-600:hover{--tw-gradient-to:var(--color-orange-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:to-pink-400:hover{--tw-gradient-to:var(--color-pink-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:to-purple-600:hover{--tw-gradient-to:var(--color-purple-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:to-sky-600:hover{--tw-gradient-to:var(--color-violet-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:text-\[\#0a1628\]:hover{color:#0a1628}.hover\:text-\[\#5a6578\]:hover{color:#5a6578}.hover\:text-\[\#9956DE\]:hover{color:#9956de}.hover\:text-\[\#F08386\]:hover{color:#f08386}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-amber-500:hover{color:var(--color-amber-500)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-green-600:hover{color:var(--color-green-600)}.hover\:text-indigo-600:hover{color:var(--color-indigo-600)}.hover\:text-muted-foreground:hover{color:var(--muted-foreground)}.hover\:text-orange-600:hover{color:var(--color-orange-600)}.hover\:text-primary:hover{color:var(--primary)}.hover\:text-primary-foreground:hover{color:var(--primary-foreground)}.hover\:text-purple-700:hover{color:var(--color-purple-700)}.hover\:text-red-500:hover{color:var(--color-red-500)}.hover\:text-red-600:hover{color:var(--color-red-600)}.hover\:text-rose-300:hover{color:var(--color-rose-300)}.hover\:text-rose-700:hover{color:var(--color-rose-700)}.hover\:text-sidebar-accent-foreground:hover{color:var(--sidebar-accent-foreground)}.hover\:text-sky-300:hover{color:var(--color-violet-300)}.hover\:text-sky-500:hover{color:var(--color-violet-500)}.hover\:text-sky-600:hover{color:var(--color-violet-600)}.hover\:text-sky-700:hover{color:var(--color-violet-700)}.hover\:text-slate-600:hover{color:var(--color-slate-600)}.hover\:text-slate-700:hover{color:var(--color-slate-700)}.hover\:text-slate-800:hover{color:var(--color-slate-800)}.hover\:text-slate-900:hover{color:var(--color-slate-900)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-2xl:hover{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_0_0_1px_hsl\(var\(--sidebar-accent\)\)\]:hover{--tw-shadow:0 0 0 1px var(--tw-shadow-color,hsl(var(--sidebar-accent)));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_8px_24px_rgba\(0\,0\,0\,0\.2\)\]:hover{--tw-shadow:0 8px 24px var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_12px_45px_rgba\(31\,167\,225\,0\.4\)\]:hover{--tw-shadow:0 12px 45px var(--tw-shadow-color,#1fa7e166);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_12px_45px_rgba\(138\,63\,211\,0\.4\)\]:hover{--tw-shadow:0 12px 45px var(--tw-shadow-color,#8a3fd366);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_16px_30px_rgba\(0\,0\,0\,0\.12\)\]:hover{--tw-shadow:0 16px 30px var(--tw-shadow-color,#0000001f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_16px_40px_-15px_rgba\(0\,0\,0\,0\.12\)\]:hover{--tw-shadow:0 16px 40px -15px var(--tw-shadow-color,#0000001f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_16px_40px_rgba\(114\,116\,237\,0\.28\)\]:hover{--tw-shadow:0 16px 40px var(--tw-shadow-color,#7274ed47);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:ring-4:hover{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-pink-500\/35:hover{--tw-shadow-color:#f6339a59}@supports (color:color-mix(in lab,red,red)){.hover\:shadow-pink-500\/35:hover{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-pink-500) 35%, transparent) var(--tw-shadow-alpha), transparent)}}.hover\:shadow-purple-500\/30:hover{--tw-shadow-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.hover\:shadow-purple-500\/30:hover{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-purple-500) 30%, transparent) var(--tw-shadow-alpha), transparent)}}.hover\:shadow-sky-300\/50:hover{--tw-shadow-color:#c4b4ff80}@supports (color:color-mix(in lab,red,red)){.hover\:shadow-sky-300\/50:hover{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-violet-300) 50%, transparent) var(--tw-shadow-alpha), transparent)}}.hover\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.hover\:group-data-\[collapsible\=offcanvas\]\:bg-sidebar:hover:is(:where(.group)[data-collapsible=offcanvas] *){background-color:var(--sidebar)}.hover\:after\:bg-sidebar-border:hover:after{content:var(--tw-content);background-color:var(--sidebar-border)}}.focus\:z-10:focus{z-index:10}.focus\:border-\[\#7C3AED\]:focus{border-color:#7c3aed}.focus\:border-\[\#75D06A\]:focus{border-color:#75d06a}.focus\:border-primary:focus{border-color:var(--primary)}.focus\:border-rose-400:focus{border-color:var(--color-rose-400)}.focus\:border-sky-400:focus{border-color:var(--color-violet-400)}.focus\:border-sky-500:focus{border-color:var(--color-violet-500)}.focus\:border-sky-600:focus{border-color:var(--color-violet-600)}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:bg-primary:focus{background-color:var(--primary)}.focus\:bg-white:focus{background-color:var(--color-white)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:text-primary-foreground:focus{color:var(--primary-foreground)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-\[\#9956DE\]\/40:focus{--tw-ring-color:oklab(59.4745% .111053 -.167638/.4)}.focus\:ring-indigo-500\/30:focus{--tw-ring-color:#625fff4d}@supports (color:color-mix(in lab,red,red)){.focus\:ring-indigo-500\/30:focus{--tw-ring-color:color-mix(in oklab, var(--color-indigo-500) 30%, transparent)}}.focus\:ring-primary\/20:focus{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.focus\:ring-primary\/20:focus{--tw-ring-color:color-mix(in oklab, var(--primary) 20%, transparent)}}.focus\:ring-purple-500:focus{--tw-ring-color:var(--color-purple-500)}.focus\:ring-red-500:focus{--tw-ring-color:var(--color-red-500)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-sky-100:focus{--tw-ring-color:var(--color-violet-100)}.focus\:ring-sky-200:focus{--tw-ring-color:var(--color-violet-200)}.focus\:ring-sky-400\/20:focus{--tw-ring-color:#a685ff33}@supports (color:color-mix(in lab,red,red)){.focus\:ring-sky-400\/20:focus{--tw-ring-color:color-mix(in oklab, var(--color-violet-400) 20%, transparent)}}.focus\:ring-sky-500:focus{--tw-ring-color:var(--color-violet-500)}.focus\:ring-sky-500\/20:focus{--tw-ring-color:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.focus\:ring-sky-500\/20:focus{--tw-ring-color:color-mix(in oklab, var(--color-violet-500) 20%, transparent)}}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:z-10:focus-visible{z-index:10}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-4:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[\#8A3FD3\]\/50:focus-visible{--tw-ring-color:oklab(54.1025% .117281 -.181162/.5)}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.focus-visible\:ring-red-500:focus-visible{--tw-ring-color:var(--color-red-500)}.focus-visible\:ring-ring:focus-visible,.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.focus-visible\:ring-sky-400:focus-visible{--tw-ring-color:var(--color-violet-400)}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus-visible\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-ring:focus-visible{outline-color:var(--ring)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:translate-y-\[2px\]:active{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.active\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\:scale-\[0\.98\]:active{scale:.98}.active\:border-b-0:active{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.active\:bg-sidebar-accent:active{background-color:var(--sidebar-accent)}.active\:text-sidebar-accent-foreground:active{color:var(--sidebar-accent-foreground)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-default:disabled{cursor:default}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.disabled\:opacity-70:disabled{opacity:.7}.disabled\:opacity-100:disabled{opacity:1}.disabled\:shadow-none:disabled{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media(hover:hover){.disabled\:hover\:translate-y-0:disabled:hover{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}}:where([data-side=left]) .in-data-\[side\=left\]\:cursor-w-resize{cursor:w-resize}:where([data-side=right]) .in-data-\[side\=right\]\:cursor-e-resize{cursor:e-resize}.has-disabled\:opacity-50:has(:disabled){opacity:.5}.has-data-\[slot\=card-action\]\:grid-cols-\[1fr_auto\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-data-\[variant\=inset\]\:bg-sidebar:has([data-variant=inset]){background-color:var(--sidebar)}.has-\[\>svg\]\:grid-cols-\[calc\(var\(--spacing\)\*4\)_1fr\]:has(>svg){grid-template-columns:calc(var(--spacing) * 4) 1fr}.has-\[\>svg\]\:gap-x-3:has(>svg){column-gap:calc(var(--spacing) * 3)}.has-\[\>svg\]\:px-2\.5:has(>svg){padding-inline:calc(var(--spacing) * 2.5)}.has-\[\>svg\]\:px-3:has(>svg){padding-inline:calc(var(--spacing) * 3)}.has-\[\>svg\]\:px-4:has(>svg){padding-inline:calc(var(--spacing) * 4)}.aria-disabled\:pointer-events-none[aria-disabled=true]{pointer-events:none}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.aria-selected\:bg-accent[aria-selected=true]{background-color:var(--accent)}.aria-selected\:bg-primary[aria-selected=true]{background-color:var(--primary)}.aria-selected\:text-accent-foreground[aria-selected=true]{color:var(--accent-foreground)}.aria-selected\:text-muted-foreground[aria-selected=true]{color:var(--muted-foreground)}.aria-selected\:text-primary-foreground[aria-selected=true]{color:var(--primary-foreground)}.aria-selected\:opacity-100[aria-selected=true]{opacity:1}.data-\[active\=true\]\:z-10[data-active=true]{z-index:10}.data-\[active\=true\]\:border-ring[data-active=true]{border-color:var(--ring)}.data-\[active\=true\]\:bg-accent\/50[data-active=true]{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.data-\[active\=true\]\:bg-accent\/50[data-active=true]{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.data-\[active\=true\]\:bg-sidebar-accent[data-active=true]{background-color:var(--sidebar-accent)}.data-\[active\=true\]\:font-medium[data-active=true]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.data-\[active\=true\]\:text-accent-foreground[data-active=true]{color:var(--accent-foreground)}.data-\[active\=true\]\:text-sidebar-accent-foreground[data-active=true]{color:var(--sidebar-accent-foreground)}.data-\[active\=true\]\:ring-\[3px\][data-active=true]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[active\=true\]\:ring-ring\/50[data-active=true]{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.data-\[active\=true\]\:ring-ring\/50[data-active=true]{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}@media(hover:hover){.data-\[active\=true\]\:hover\:bg-accent[data-active=true]:hover{background-color:var(--accent)}}.data-\[active\=true\]\:focus\:bg-accent[data-active=true]:focus{background-color:var(--accent)}.data-\[active\=true\]\:aria-invalid\:border-destructive[data-active=true][aria-invalid=true]{border-color:var(--destructive)}.data-\[active\=true\]\:aria-invalid\:ring-destructive\/20[data-active=true][aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.data-\[active\=true\]\:aria-invalid\:ring-destructive\/20[data-active=true][aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[error\=true\]\:text-destructive[data-error=true]{color:var(--destructive)}.data-\[inset\]\:pl-8[data-inset]{padding-left:calc(var(--spacing) * 8)}.data-\[orientation\=horizontal\]\:h-4[data-orientation=horizontal]{height:calc(var(--spacing) * 4)}.data-\[orientation\=horizontal\]\:h-full[data-orientation=horizontal]{height:100%}.data-\[orientation\=horizontal\]\:h-px[data-orientation=horizontal]{height:1px}.data-\[orientation\=horizontal\]\:w-full[data-orientation=horizontal]{width:100%}.data-\[orientation\=vertical\]\:h-full[data-orientation=vertical]{height:100%}.data-\[orientation\=vertical\]\:min-h-44[data-orientation=vertical]{min-height:calc(var(--spacing) * 44)}.data-\[orientation\=vertical\]\:w-1\.5[data-orientation=vertical]{width:calc(var(--spacing) * 1.5)}.data-\[orientation\=vertical\]\:w-auto[data-orientation=vertical]{width:auto}.data-\[orientation\=vertical\]\:w-full[data-orientation=vertical]{width:100%}.data-\[orientation\=vertical\]\:w-px[data-orientation=vertical]{width:1px}.data-\[orientation\=vertical\]\:flex-col[data-orientation=vertical]{flex-direction:column}.data-\[panel-group-direction\=vertical\]\:h-px[data-panel-group-direction=vertical]{height:1px}.data-\[panel-group-direction\=vertical\]\:w-full[data-panel-group-direction=vertical]{width:100%}.data-\[panel-group-direction\=vertical\]\:flex-col[data-panel-group-direction=vertical]{flex-direction:column}.data-\[panel-group-direction\=vertical\]\:after\:left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);left:calc(var(--spacing) * 0)}.data-\[panel-group-direction\=vertical\]\:after\:h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content);height:calc(var(--spacing) * 1)}.data-\[panel-group-direction\=vertical\]\:after\:w-full[data-panel-group-direction=vertical]:after{content:var(--tw-content);width:100%}.data-\[panel-group-direction\=vertical\]\:after\:translate-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[panel-group-direction\=vertical\]\:after\:-translate-y-1\/2[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[size\=default\]\:h-9[data-size=default]{height:calc(var(--spacing) * 9)}.data-\[size\=sm\]\:h-8[data-size=sm]{height:calc(var(--spacing) * 8)}:is(.\*\:data-\[slot\=alert-description\]\:text-destructive\/90>*)[data-slot=alert-description]{color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){:is(.\*\:data-\[slot\=alert-description\]\:text-destructive\/90>*)[data-slot=alert-description]{color:color-mix(in oklab,var(--destructive) 90%,transparent)}}:is(.\*\*\:data-\[slot\=command-input-wrapper\]\:h-12 *)[data-slot=command-input-wrapper]{height:calc(var(--spacing) * 12)}:is(.\*\*\:data-\[slot\=navigation-menu-link\]\:focus\:ring-0 *)[data-slot=navigation-menu-link]:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}:is(.\*\*\:data-\[slot\=navigation-menu-link\]\:focus\:outline-none *)[data-slot=navigation-menu-link]:focus{--tw-outline-style:none;outline-style:none}:is(.\*\:data-\[slot\=select-value\]\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\*\:data-\[slot\=select-value\]\:flex>*)[data-slot=select-value]{display:flex}:is(.\*\:data-\[slot\=select-value\]\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\*\:data-\[slot\=select-value\]\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing) * 2)}.data-\[state\=active\]\:bg-card[data-state=active]{background-color:var(--card)}.data-\[state\=active\]\:bg-gradient-to-r[data-state=active]{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.data-\[state\=active\]\:from-blue-600[data-state=active]{--tw-gradient-from:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.data-\[state\=active\]\:to-sky-500[data-state=active]{--tw-gradient-to:var(--color-violet-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.data-\[state\=active\]\:text-white[data-state=active]{color:var(--color-white)}.data-\[state\=checked\]\:translate-x-\[calc\(100\%-2px\)\][data-state=checked]{--tw-translate-x: calc(100% - 2px) ;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=checked\]\:border-primary[data-state=checked]{border-color:var(--primary)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=checked\]\:bg-red-600[data-state=checked]{background-color:var(--color-red-600)}.data-\[state\=checked\]\:bg-sky-600[data-state=checked]{background-color:var(--color-violet-600)}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\[state\=closed\]\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\[state\=on\]\:bg-accent[data-state=on]{background-color:var(--accent)}.data-\[state\=on\]\:text-accent-foreground[data-state=on]{color:var(--accent-foreground)}.data-\[state\=open\]\:bg-accent[data-state=open],.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:var(--secondary)}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:var(--accent-foreground)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:opacity-100[data-state=open]{opacity:1}.data-\[state\=open\]\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}@media(hover:hover){.data-\[state\=open\]\:hover\:bg-accent[data-state=open]:hover{background-color:var(--accent)}.data-\[state\=open\]\:hover\:bg-sidebar-accent[data-state=open]:hover{background-color:var(--sidebar-accent)}.data-\[state\=open\]\:hover\:text-sidebar-accent-foreground[data-state=open]:hover{color:var(--sidebar-accent-foreground)}}.data-\[state\=open\]\:focus\:bg-accent[data-state=open]:focus{background-color:var(--accent)}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:var(--muted)}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-\[\#dde3eb\][data-state=unchecked]{background-color:#dde3eb}.data-\[state\=unchecked\]\:bg-switch-background[data-state=unchecked]{background-color:var(--switch-background)}.data-\[variant\=destructive\]\:text-destructive[data-variant=destructive]{color:var(--destructive)}.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--destructive) 10%,transparent)}}.data-\[variant\=destructive\]\:focus\:text-destructive[data-variant=destructive]:focus{color:var(--destructive)}.data-\[variant\=outline\]\:border-l-0[data-variant=outline]{border-left-style:var(--tw-border-style);border-left-width:0}.data-\[variant\=outline\]\:shadow-xs[data-variant=outline]{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[variant\=outline\]\:first\:border-l[data-variant=outline]:first-child{border-left-style:var(--tw-border-style);border-left-width:1px}.data-\[vaul-drawer-direction\=bottom\]\:inset-x-0[data-vaul-drawer-direction=bottom]{inset-inline:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=bottom\]\:bottom-0[data-vaul-drawer-direction=bottom]{bottom:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=bottom\]\:mt-24[data-vaul-drawer-direction=bottom]{margin-top:calc(var(--spacing) * 24)}.data-\[vaul-drawer-direction\=bottom\]\:max-h-\[80vh\][data-vaul-drawer-direction=bottom]{max-height:80vh}.data-\[vaul-drawer-direction\=bottom\]\:rounded-t-lg[data-vaul-drawer-direction=bottom]{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.data-\[vaul-drawer-direction\=bottom\]\:border-t[data-vaul-drawer-direction=bottom]{border-top-style:var(--tw-border-style);border-top-width:1px}.data-\[vaul-drawer-direction\=left\]\:inset-y-0[data-vaul-drawer-direction=left]{inset-block:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=left\]\:left-0[data-vaul-drawer-direction=left]{left:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=left\]\:w-3\/4[data-vaul-drawer-direction=left]{width:75%}.data-\[vaul-drawer-direction\=left\]\:border-r[data-vaul-drawer-direction=left]{border-right-style:var(--tw-border-style);border-right-width:1px}.data-\[vaul-drawer-direction\=right\]\:inset-y-0[data-vaul-drawer-direction=right]{inset-block:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=right\]\:right-0[data-vaul-drawer-direction=right]{right:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=right\]\:w-3\/4[data-vaul-drawer-direction=right]{width:75%}.data-\[vaul-drawer-direction\=right\]\:border-l[data-vaul-drawer-direction=right]{border-left-style:var(--tw-border-style);border-left-width:1px}.data-\[vaul-drawer-direction\=top\]\:inset-x-0[data-vaul-drawer-direction=top]{inset-inline:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=top\]\:top-0[data-vaul-drawer-direction=top]{top:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=top\]\:mb-24[data-vaul-drawer-direction=top]{margin-bottom:calc(var(--spacing) * 24)}.data-\[vaul-drawer-direction\=top\]\:max-h-\[80vh\][data-vaul-drawer-direction=top]{max-height:80vh}.data-\[vaul-drawer-direction\=top\]\:rounded-b-lg[data-vaul-drawer-direction=top]{border-bottom-right-radius:var(--radius);border-bottom-left-radius:var(--radius)}.data-\[vaul-drawer-direction\=top\]\:border-b[data-vaul-drawer-direction=top]{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}@media(min-width:40rem){.sm\:-top-\[30px\]{top:-30px}.sm\:right-8{right:calc(var(--spacing) * 8)}.sm\:bottom-8{bottom:calc(var(--spacing) * 8)}.sm\:col-span-2{grid-column:span 2/span 2}.sm\:col-span-3{grid-column:span 3/span 3}.sm\:-mx-6{margin-inline:calc(var(--spacing) * -6)}.sm\:mt-2{margin-top:calc(var(--spacing) * 2)}.sm\:mt-4{margin-top:calc(var(--spacing) * 4)}.sm\:mb-0{margin-bottom:calc(var(--spacing) * 0)}.sm\:mb-4{margin-bottom:calc(var(--spacing) * 4)}.sm\:mb-6{margin-bottom:calc(var(--spacing) * 6)}.sm\:mb-7{margin-bottom:calc(var(--spacing) * 7)}.sm\:mb-8{margin-bottom:calc(var(--spacing) * 8)}.sm\:ml-0{margin-left:calc(var(--spacing) * 0)}.sm\:ml-auto{margin-left:auto}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:size-20{width:calc(var(--spacing) * 20);height:calc(var(--spacing) * 20)}.sm\:h-8{height:calc(var(--spacing) * 8)}.sm\:h-10{height:calc(var(--spacing) * 10)}.sm\:h-14{height:calc(var(--spacing) * 14)}.sm\:h-\[90vh\]{height:90vh}.sm\:h-\[95px\]{height:95px}.sm\:h-\[115\%\]{height:115%}.sm\:h-\[125\%\]{height:125%}.sm\:h-\[140px\]{height:140px}.sm\:h-\[145px\]{height:145px}.sm\:h-\[165px\]{height:165px}.sm\:h-\[245px\]{height:245px}.sm\:h-\[360px\]{height:360px}.sm\:h-\[450px\]{height:450px}.sm\:min-h-\[5rem\]{min-height:5rem}.sm\:w-8{width:calc(var(--spacing) * 8)}.sm\:w-10{width:calc(var(--spacing) * 10)}.sm\:w-14{width:calc(var(--spacing) * 14)}.sm\:w-32{width:calc(var(--spacing) * 32)}.sm\:w-\[30\%\]{width:30%}.sm\:w-\[38\%\]{width:38%}.sm\:w-\[65px\]{width:65px}.sm\:w-\[140px\]{width:140px}.sm\:w-\[150px\]{width:150px}.sm\:w-\[160px\]{width:160px}.sm\:w-\[170px\]{width:170px}.sm\:w-\[300px\]{width:300px}.sm\:w-auto{width:auto}.sm\:w-max{width:max-content}.sm\:max-w-\[425px\]{max-width:425px}.sm\:max-w-\[480px\]{max-width:480px}.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:max-w-md{max-width:var(--container-md)}.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:max-w-xl{max-width:var(--container-xl)}.sm\:max-w-xs{max-width:var(--container-xs)}.sm\:flex-none{flex:none}.sm\:-translate-x-\[60px\]{--tw-translate-x: -60px ;translate:var(--tw-translate-x) var(--tw-translate-y)}.sm\:translate-x-\[60px\]{--tw-translate-x:60px;translate:var(--tw-translate-x) var(--tw-translate-y)}.sm\:scale-\[0\.80\]{scale:.8}.sm\:scale-\[0\.85\]{scale:.85}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:items-start{align-items:flex-start}.sm\:justify-between{justify-content:space-between}.sm\:justify-end{justify-content:flex-end}.sm\:gap-2\.5{gap:calc(var(--spacing) * 2.5)}.sm\:gap-4{gap:calc(var(--spacing) * 4)}.sm\:gap-6{gap:calc(var(--spacing) * 6)}.sm\:gap-8{gap:calc(var(--spacing) * 8)}:where(.sm\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-\[40px\]{border-radius:40px}.sm\:p-4{padding:calc(var(--spacing) * 4)}.sm\:p-5{padding:calc(var(--spacing) * 5)}.sm\:p-6{padding:calc(var(--spacing) * 6)}.sm\:p-7{padding:calc(var(--spacing) * 7)}.sm\:p-8{padding:calc(var(--spacing) * 8)}.sm\:px-4{padding-inline:calc(var(--spacing) * 4)}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}.sm\:px-8{padding-inline:calc(var(--spacing) * 8)}.sm\:px-10{padding-inline:calc(var(--spacing) * 10)}.sm\:py-4{padding-block:calc(var(--spacing) * 4)}.sm\:py-8{padding-block:calc(var(--spacing) * 8)}.sm\:pr-2\.5{padding-right:calc(var(--spacing) * 2.5)}.sm\:pb-28{padding-bottom:calc(var(--spacing) * 28)}.sm\:pl-2\.5{padding-left:calc(var(--spacing) * 2.5)}.sm\:text-left{text-align:left}.sm\:text-right{text-align:right}.sm\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.sm\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.sm\:text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.sm\:text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.sm\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.sm\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.sm\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.sm\:text-\[10px\]{font-size:10px}.sm\:text-\[11px\]{font-size:11px}.sm\:text-\[12px\]{font-size:12px}.sm\:text-\[14px\]{font-size:14px}.sm\:font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.data-\[vaul-drawer-direction\=left\]\:sm\:max-w-sm[data-vaul-drawer-direction=left],.data-\[vaul-drawer-direction\=right\]\:sm\:max-w-sm[data-vaul-drawer-direction=right]{max-width:var(--container-sm)}}@media(min-width:48rem){.md\:absolute{position:absolute}.md\:-top-7{top:calc(var(--spacing) * -7)}.md\:-top-8{top:calc(var(--spacing) * -8)}.md\:top-\[600px\]{top:600px}.md\:right-4{right:calc(var(--spacing) * 4)}.md\:right-10{right:calc(var(--spacing) * 10)}.md\:-bottom-7{bottom:calc(var(--spacing) * -7)}.md\:-bottom-8{bottom:calc(var(--spacing) * -8)}.md\:left-16{left:calc(var(--spacing) * 16)}.md\:col-span-2{grid-column:span 2/span 2}.md\:col-span-3{grid-column:span 3/span 3}.md\:col-span-9{grid-column:span 9/span 9}.md\:mt-2{margin-top:calc(var(--spacing) * 2)}.md\:mt-12{margin-top:calc(var(--spacing) * 12)}.md\:mt-\[-30px\]{margin-top:-30px}.md\:mr-2{margin-right:calc(var(--spacing) * 2)}.md\:mr-4{margin-right:calc(var(--spacing) * 4)}.md\:mb-4{margin-bottom:calc(var(--spacing) * 4)}.md\:mb-5{margin-bottom:calc(var(--spacing) * 5)}.md\:mb-8{margin-bottom:calc(var(--spacing) * 8)}.md\:ml-2{margin-left:calc(var(--spacing) * 2)}.md\:ml-16{margin-left:calc(var(--spacing) * 16)}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-5{height:calc(var(--spacing) * 5)}.md\:h-9{height:calc(var(--spacing) * 9)}.md\:h-10{height:calc(var(--spacing) * 10)}.md\:h-11{height:calc(var(--spacing) * 11)}.md\:h-14{height:calc(var(--spacing) * 14)}.md\:h-16{height:calc(var(--spacing) * 16)}.md\:h-20{height:calc(var(--spacing) * 20)}.md\:h-32{height:calc(var(--spacing) * 32)}.md\:h-40{height:calc(var(--spacing) * 40)}.md\:h-48{height:calc(var(--spacing) * 48)}.md\:h-\[72px\]{height:72px}.md\:h-\[85vh\]{height:85vh}.md\:h-\[86px\]{height:86px}.md\:h-\[100px\]{height:100px}.md\:h-\[130px\]{height:130px}.md\:h-\[180px\]{height:180px}.md\:h-\[310px\]{height:310px}.md\:w-5{width:calc(var(--spacing) * 5)}.md\:w-9{width:calc(var(--spacing) * 9)}.md\:w-10{width:calc(var(--spacing) * 10)}.md\:w-11{width:calc(var(--spacing) * 11)}.md\:w-12{width:calc(var(--spacing) * 12)}.md\:w-14{width:calc(var(--spacing) * 14)}.md\:w-20{width:calc(var(--spacing) * 20)}.md\:w-32{width:calc(var(--spacing) * 32)}.md\:w-40{width:calc(var(--spacing) * 40)}.md\:w-\[72px\]{width:72px}.md\:w-\[86px\]{width:86px}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-\[280px\]{max-width:280px}.md\:min-w-\[320px\]{min-width:320px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.md\:flex-col{flex-direction:column}.md\:flex-row{flex-direction:row}.md\:flex-nowrap{flex-wrap:nowrap}.md\:items-center{align-items:center}.md\:gap-2{gap:calc(var(--spacing) * 2)}.md\:gap-4{gap:calc(var(--spacing) * 4)}.md\:gap-5{gap:calc(var(--spacing) * 5)}.md\:gap-6{gap:calc(var(--spacing) * 6)}.md\:gap-8{gap:calc(var(--spacing) * 8)}.md\:rounded-3xl{border-radius:var(--radius-3xl)}.md\:rounded-\[20px\]{border-radius:20px}.md\:rounded-b-\[80px\]{border-bottom-right-radius:80px;border-bottom-left-radius:80px}.md\:p-3{padding:calc(var(--spacing) * 3)}.md\:p-4{padding:calc(var(--spacing) * 4)}.md\:p-5{padding:calc(var(--spacing) * 5)}.md\:p-6{padding:calc(var(--spacing) * 6)}.md\:p-8{padding:calc(var(--spacing) * 8)}.md\:p-10{padding:calc(var(--spacing) * 10)}.md\:px-4{padding-inline:calc(var(--spacing) * 4)}.md\:px-5{padding-inline:calc(var(--spacing) * 5)}.md\:px-8{padding-inline:calc(var(--spacing) * 8)}.md\:px-10{padding-inline:calc(var(--spacing) * 10)}.md\:py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.md\:py-6{padding-block:calc(var(--spacing) * 6)}.md\:pt-8{padding-top:calc(var(--spacing) * 8)}.md\:pr-4{padding-right:calc(var(--spacing) * 4)}.md\:pr-10{padding-right:calc(var(--spacing) * 10)}.md\:pr-12{padding-right:calc(var(--spacing) * 12)}.md\:pr-\[240px\]{padding-right:240px}.md\:pl-16{padding-left:calc(var(--spacing) * 16)}.md\:pl-24{padding-left:calc(var(--spacing) * 24)}.md\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.md\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.md\:text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.md\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.md\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.md\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.md\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.md\:text-\[10px\]{font-size:10px}.md\:text-\[11px\]{font-size:11px}.md\:text-\[12px\]{font-size:12px}.md\:text-\[13px\]{font-size:13px}.md\:text-\[15px\]{font-size:15px}.md\:text-\[17px\]{font-size:17px}.md\:text-\[18px\]{font-size:18px}.md\:text-\[22px\]{font-size:22px}.md\:text-\[26px\]{font-size:26px}.md\:text-\[32px\]{font-size:32px}.md\:text-\[44px\]{font-size:44px}.md\:text-\[70px\]{font-size:70px}.md\:text-\[80px\]{font-size:80px}.md\:text-\[110px\]{font-size:110px}.md\:opacity-0{opacity:0}.md\:peer-data-\[variant\=inset\]\:m-2:is(:where(.peer)[data-variant=inset]~*){margin:calc(var(--spacing) * 2)}.md\:peer-data-\[variant\=inset\]\:ml-0:is(:where(.peer)[data-variant=inset]~*){margin-left:calc(var(--spacing) * 0)}.md\:peer-data-\[variant\=inset\]\:rounded-xl:is(:where(.peer)[data-variant=inset]~*){border-radius:calc(var(--radius) + 4px)}.md\:peer-data-\[variant\=inset\]\:shadow-sm:is(:where(.peer)[data-variant=inset]~*){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.md\:peer-data-\[variant\=inset\]\:peer-data-\[state\=collapsed\]\:ml-2:is(:where(.peer)[data-variant=inset]~*):is(:where(.peer)[data-state=collapsed]~*){margin-left:calc(var(--spacing) * 2)}.md\:after\:hidden:after{content:var(--tw-content);display:none}}@media(min-width:64rem){.lg\:static{position:static}.lg\:top-\[5px\]{top:5px}.lg\:right-10{right:calc(var(--spacing) * 10)}.lg\:right-\[-15px\]{right:-15px}.lg\:right-\[250px\]{right:250px}.lg\:bottom-20{bottom:calc(var(--spacing) * 20)}.lg\:z-auto{z-index:auto}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-4{grid-column:span 4/span 4}.lg\:col-span-8{grid-column:span 8/span 8}.lg\:-mx-4{margin-inline:calc(var(--spacing) * -4)}.lg\:-mt-4{margin-top:calc(var(--spacing) * -4)}.lg\:mt-0{margin-top:calc(var(--spacing) * 0)}.lg\:mb-8{margin-bottom:calc(var(--spacing) * 8)}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:h-8{height:calc(var(--spacing) * 8)}.lg\:h-12{height:calc(var(--spacing) * 12)}.lg\:h-\[265px\]{height:265px}.lg\:min-h-\[160px\]{min-height:160px}.lg\:w-8{width:calc(var(--spacing) * 8)}.lg\:w-12{width:calc(var(--spacing) * 12)}.lg\:w-\[70px\]{width:70px}.lg\:w-\[260px\]{width:260px}.lg\:w-\[270px\]{width:270px}.lg\:w-\[350px\]{width:350px}.lg\:w-auto{width:auto}.lg\:origin-center{transform-origin:50%}.lg\:translate-y-\[19\%\]{--tw-translate-y:19%;translate:var(--tw-translate-x) var(--tw-translate-y)}.lg\:scale-\[0\.85\]{scale:.85}.lg\:scale-\[1\.3\]{scale:1.3}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:grid-cols-\[1fr_300px\]{grid-template-columns:1fr 300px}.lg\:flex-row{flex-direction:row}.lg\:items-center{align-items:center}.lg\:items-start{align-items:flex-start}.lg\:justify-between{justify-content:space-between}.lg\:justify-end{justify-content:flex-end}.lg\:gap-6{gap:calc(var(--spacing) * 6)}.lg\:gap-10{gap:calc(var(--spacing) * 10)}.lg\:gap-12{gap:calc(var(--spacing) * 12)}.lg\:gap-14{gap:calc(var(--spacing) * 14)}:where(.lg\:space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.lg\:space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}.lg\:p-4{padding:calc(var(--spacing) * 4)}.lg\:p-8{padding:calc(var(--spacing) * 8)}.lg\:pt-6{padding-top:calc(var(--spacing) * 6)}.lg\:pr-\[280px\]{padding-right:280px}.lg\:pl-6{padding-left:calc(var(--spacing) * 6)}.lg\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.lg\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.lg\:text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.lg\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.lg\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.lg\:text-\[7px\]{font-size:7px}.lg\:text-\[16px\]{font-size:16px}.lg\:text-\[46px\]{font-size:46px}}@media(min-width:80rem){.xl\:col-span-2{grid-column:span 2/span 2}.xl\:col-span-3{grid-column:span 3/span 3}.xl\:col-span-4{grid-column:span 4/span 4}.xl\:col-span-5{grid-column:span 5/span 5}.xl\:col-span-7{grid-column:span 7/span 7}.xl\:col-span-8{grid-column:span 8/span 8}.xl\:col-span-9{grid-column:span 9/span 9}.xl\:-mx-10{margin-inline:calc(var(--spacing) * -10)}.xl\:mx-0{margin-inline:calc(var(--spacing) * 0)}.xl\:mb-8{margin-bottom:calc(var(--spacing) * 8)}.xl\:flex{display:flex}.xl\:h-\[80vh\]{height:80vh}.xl\:h-full{height:100%}.xl\:max-h-\[700px\]{max-height:700px}.xl\:w-\[50\%\]{width:50%}.xl\:w-\[75px\]{width:75px}.xl\:w-\[200px\]{width:200px}.xl\:w-\[350px\]{width:350px}.xl\:max-w-\[1400px\]{max-width:1400px}.xl\:max-w-none{max-width:none}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.xl\:grid-cols-\[1fr_320px\]{grid-template-columns:1fr 320px}.xl\:flex-row{flex-direction:row}.xl\:items-center{align-items:center}.xl\:justify-start{justify-content:flex-start}.xl\:gap-12{gap:calc(var(--spacing) * 12)}.xl\:self-center{align-self:center}.xl\:overflow-hidden{overflow:hidden}.xl\:px-10{padding-inline:calc(var(--spacing) * 10)}.xl\:text-\[3\.4rem\]{font-size:3.4rem}}@media(min-width:96rem){.\32xl\:block{display:block}}.dark\:border-\[\#1FA7E1\]\/20:is(.dark *){border-color:#1fa7e133}.dark\:border-\[\#2b3140\]:is(.dark *){border-color:#2b3140}.dark\:border-\[\#2f3547\]:is(.dark *){border-color:#2f3547}.dark\:border-\[\#8A3FD3\]\/20:is(.dark *){border-color:#8a3fd333}.dark\:border-\[\#8A3FD3\]\/30:is(.dark *){border-color:#8a3fd34d}.dark\:border-\[\#8d7fff\]:is(.dark *){border-color:#8d7fff}.dark\:border-amber-300\/40:is(.dark *){border-color:#ffd23666}@supports (color:color-mix(in lab,red,red)){.dark\:border-amber-300\/40:is(.dark *){border-color:color-mix(in oklab,var(--color-amber-300) 40%,transparent)}}.dark\:border-amber-400\/40:is(.dark *){border-color:#fcbb0066}@supports (color:color-mix(in lab,red,red)){.dark\:border-amber-400\/40:is(.dark *){border-color:color-mix(in oklab,var(--color-amber-400) 40%,transparent)}}.dark\:border-amber-700\/50:is(.dark *){border-color:#b7500080}@supports (color:color-mix(in lab,red,red)){.dark\:border-amber-700\/50:is(.dark *){border-color:color-mix(in oklab,var(--color-amber-700) 50%,transparent)}}.dark\:border-emerald-300\/40:is(.dark *){border-color:#5ee9b566}@supports (color:color-mix(in lab,red,red)){.dark\:border-emerald-300\/40:is(.dark *){border-color:color-mix(in oklab,var(--color-emerald-300) 40%,transparent)}}.dark\:border-emerald-400\/40:is(.dark *){border-color:#00d29466}@supports (color:color-mix(in lab,red,red)){.dark\:border-emerald-400\/40:is(.dark *){border-color:color-mix(in oklab,var(--color-emerald-400) 40%,transparent)}}.dark\:border-emerald-500\/40:is(.dark *){border-color:#00bb7f66}@supports (color:color-mix(in lab,red,red)){.dark\:border-emerald-500\/40:is(.dark *){border-color:color-mix(in oklab,var(--color-emerald-500) 40%,transparent)}}.dark\:border-emerald-700\/50:is(.dark *){border-color:#00795680}@supports (color:color-mix(in lab,red,red)){.dark\:border-emerald-700\/50:is(.dark *){border-color:color-mix(in oklab,var(--color-emerald-700) 50%,transparent)}}.dark\:border-gray-600:is(.dark *){border-color:var(--color-gray-600)}.dark\:border-indigo-700\/50:is(.dark *){border-color:#432dd780}@supports (color:color-mix(in lab,red,red)){.dark\:border-indigo-700\/50:is(.dark *){border-color:color-mix(in oklab,var(--color-indigo-700) 50%,transparent)}}.dark\:border-input:is(.dark *){border-color:var(--input)}.dark\:border-purple-700\/50:is(.dark *){border-color:#8200da80}@supports (color:color-mix(in lab,red,red)){.dark\:border-purple-700\/50:is(.dark *){border-color:color-mix(in oklab,var(--color-purple-700) 50%,transparent)}}.dark\:border-rose-300\/40:is(.dark *){border-color:#ffa2ae66}@supports (color:color-mix(in lab,red,red)){.dark\:border-rose-300\/40:is(.dark *){border-color:color-mix(in oklab,var(--color-rose-300) 40%,transparent)}}.dark\:border-rose-400\/40:is(.dark *){border-color:#ff667f66}@supports (color:color-mix(in lab,red,red)){.dark\:border-rose-400\/40:is(.dark *){border-color:color-mix(in oklab,var(--color-rose-400) 40%,transparent)}}.dark\:border-rose-500\/20:is(.dark *){border-color:#ff235733}@supports (color:color-mix(in lab,red,red)){.dark\:border-rose-500\/20:is(.dark *){border-color:color-mix(in oklab,var(--color-rose-500) 20%,transparent)}}.dark\:border-rose-900:is(.dark *){border-color:var(--color-rose-900)}.dark\:border-sky-700\/50:is(.dark *){border-color:#7008e780}@supports (color:color-mix(in lab,red,red)){.dark\:border-sky-700\/50:is(.dark *){border-color:color-mix(in oklab,var(--color-violet-700) 50%,transparent)}}.dark\:border-slate-700:is(.dark *){border-color:var(--color-slate-700)}.dark\:border-white\/10:is(.dark *){border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.dark\:border-white\/10:is(.dark *){border-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.dark\:bg-\[\#1a1f2e\]\/90:is(.dark *){background-color:#1a1f2ee6}.dark\:bg-\[\#2a3143\]:is(.dark *){background-color:#2a3143}.dark\:bg-\[\#2b2b5f\]:is(.dark *){background-color:#2b2b5f}.dark\:bg-\[\#8A3FD3\]\/10:is(.dark *){background-color:#8a3fd31a}.dark\:bg-\[\#181d27\]:is(.dark *){background-color:#181d27}.dark\:bg-\[\#11151d\]:is(.dark *){background-color:#11151d}.dark\:bg-\[\#15803d\]:is(.dark *){background-color:#15803d}.dark\:bg-\[\#b0e6eb\]:is(.dark *){background-color:#b0e6eb}.dark\:bg-\[\#b45309\]:is(.dark *){background-color:#b45309}.dark\:bg-\[\#be123c\]:is(.dark *){background-color:#be123c}.dark\:bg-\[\#d6ccf5\]:is(.dark *){background-color:#d6ccf5}.dark\:bg-\[\#f6ebd2\]:is(.dark *){background-color:#f6ebd2}.dark\:bg-\[\#fbd3d3\]:is(.dark *){background-color:#fbd3d3}.dark\:bg-amber-100\/20:is(.dark *){background-color:#fef3c633}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-100\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-100) 20%,transparent)}}.dark\:bg-amber-400\/10:is(.dark *){background-color:#fcbb001a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-400\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-400) 10%,transparent)}}.dark\:bg-amber-900\/20:is(.dark *){background-color:#7b330633}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-900) 20%,transparent)}}.dark\:bg-amber-900\/50:is(.dark *){background-color:#7b330680}@supports (color:color-mix(in lab,red,red)){.dark\:bg-amber-900\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-amber-900) 50%,transparent)}}.dark\:bg-black\/30:is(.dark *){background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-black\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-black) 30%,transparent)}}.dark\:bg-black\/40:is(.dark *){background-color:#0006}@supports (color:color-mix(in lab,red,red)){.dark\:bg-black\/40:is(.dark *){background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.dark\:bg-black\/50:is(.dark *){background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.dark\:bg-black\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.dark\:bg-black\/80:is(.dark *){background-color:#000c}@supports (color:color-mix(in lab,red,red)){.dark\:bg-black\/80:is(.dark *){background-color:color-mix(in oklab,var(--color-black) 80%,transparent)}}.dark\:bg-destructive\/60:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-destructive\/60:is(.dark *){background-color:color-mix(in oklab,var(--destructive) 60%,transparent)}}.dark\:bg-emerald-500\/10:is(.dark *){background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-emerald-500\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-emerald-500) 10%,transparent)}}.dark\:bg-emerald-500\/30:is(.dark *){background-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-emerald-500\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-emerald-500) 30%,transparent)}}.dark\:bg-emerald-900\/20:is(.dark *){background-color:#004e3b33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-emerald-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-emerald-900) 20%,transparent)}}.dark\:bg-emerald-900\/30:is(.dark *){background-color:#004e3b4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-emerald-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-emerald-900) 30%,transparent)}}.dark\:bg-emerald-900\/50:is(.dark *){background-color:#004e3b80}@supports (color:color-mix(in lab,red,red)){.dark\:bg-emerald-900\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-emerald-900) 50%,transparent)}}.dark\:bg-gray-800:is(.dark *){background-color:var(--color-gray-800)}.dark\:bg-gray-900:is(.dark *){background-color:var(--color-gray-900)}.dark\:bg-indigo-900\/50:is(.dark *){background-color:#312c8580}@supports (color:color-mix(in lab,red,red)){.dark\:bg-indigo-900\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-indigo-900) 50%,transparent)}}.dark\:bg-input\/30:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-input\/30:is(.dark *){background-color:color-mix(in oklab,var(--input) 30%,transparent)}}.dark\:bg-purple-900\/50:is(.dark *){background-color:#59168b80}@supports (color:color-mix(in lab,red,red)){.dark\:bg-purple-900\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-purple-900) 50%,transparent)}}.dark\:bg-rose-500\/10:is(.dark *){background-color:#ff23571a}@supports (color:color-mix(in lab,red,red)){.dark\:bg-rose-500\/10:is(.dark *){background-color:color-mix(in oklab,var(--color-rose-500) 10%,transparent)}}.dark\:bg-rose-900\/20:is(.dark *){background-color:#8b083633}@supports (color:color-mix(in lab,red,red)){.dark\:bg-rose-900\/20:is(.dark *){background-color:color-mix(in oklab,var(--color-rose-900) 20%,transparent)}}.dark\:bg-sky-500\/5:is(.dark *){background-color:#8d54ff0d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-sky-500\/5:is(.dark *){background-color:color-mix(in oklab,var(--color-violet-500) 5%,transparent)}}.dark\:bg-sky-500\/15:is(.dark *){background-color:#8d54ff26}@supports (color:color-mix(in lab,red,red)){.dark\:bg-sky-500\/15:is(.dark *){background-color:color-mix(in oklab,var(--color-violet-500) 15%,transparent)}}.dark\:bg-sky-900\/50:is(.dark *){background-color:#4d179a80}@supports (color:color-mix(in lab,red,red)){.dark\:bg-sky-900\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-violet-900) 50%,transparent)}}.dark\:bg-slate-800\/50:is(.dark *){background-color:#1d293d80}@supports (color:color-mix(in lab,red,red)){.dark\:bg-slate-800\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-slate-800) 50%,transparent)}}.dark\:bg-yellow-900\/30:is(.dark *){background-color:#733e0a4d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-yellow-900\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-yellow-900) 30%,transparent)}}.dark\:from-\[\#2b2b5f\]:is(.dark *){--tw-gradient-from:#2b2b5f;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-amber-300:is(.dark *){--tw-gradient-from:var(--color-amber-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-amber-600\/20:is(.dark *){--tw-gradient-from:#dd740033}@supports (color:color-mix(in lab,red,red)){.dark\:from-amber-600\/20:is(.dark *){--tw-gradient-from:color-mix(in oklab, var(--color-amber-600) 20%, transparent)}}.dark\:from-amber-600\/20:is(.dark *){--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-emerald-300:is(.dark *){--tw-gradient-from:var(--color-emerald-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-emerald-500\/20:is(.dark *){--tw-gradient-from:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.dark\:from-emerald-500\/20:is(.dark *){--tw-gradient-from:color-mix(in oklab, var(--color-emerald-500) 20%, transparent)}}.dark\:from-emerald-500\/20:is(.dark *){--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-indigo-300:is(.dark *){--tw-gradient-from:var(--color-indigo-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-indigo-500\/20:is(.dark *){--tw-gradient-from:#625fff33}@supports (color:color-mix(in lab,red,red)){.dark\:from-indigo-500\/20:is(.dark *){--tw-gradient-from:color-mix(in oklab, var(--color-indigo-500) 20%, transparent)}}.dark\:from-indigo-500\/20:is(.dark *){--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-purple-300:is(.dark *){--tw-gradient-from:var(--color-purple-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-purple-500\/20:is(.dark *){--tw-gradient-from:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.dark\:from-purple-500\/20:is(.dark *){--tw-gradient-from:color-mix(in oklab, var(--color-purple-500) 20%, transparent)}}.dark\:from-purple-500\/20:is(.dark *){--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-sky-300:is(.dark *){--tw-gradient-from:var(--color-violet-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:from-sky-500\/20:is(.dark *){--tw-gradient-from:#8d54ff33}@supports (color:color-mix(in lab,red,red)){.dark\:from-sky-500\/20:is(.dark *){--tw-gradient-from:color-mix(in oklab, var(--color-violet-500) 20%, transparent)}}.dark\:from-sky-500\/20:is(.dark *){--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:via-cyan-500\/10:is(.dark *){--tw-gradient-via:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.dark\:via-cyan-500\/10:is(.dark *){--tw-gradient-via:color-mix(in oklab, var(--color-cyan-500) 10%, transparent)}}.dark\:via-cyan-500\/10:is(.dark *){--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.dark\:via-fuchsia-500\/10:is(.dark *){--tw-gradient-via:#e12afb1a}@supports (color:color-mix(in lab,red,red)){.dark\:via-fuchsia-500\/10:is(.dark *){--tw-gradient-via:color-mix(in oklab, var(--color-fuchsia-500) 10%, transparent)}}.dark\:via-fuchsia-500\/10:is(.dark *){--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.dark\:via-orange-500\/10:is(.dark *){--tw-gradient-via:#fe6e001a}@supports (color:color-mix(in lab,red,red)){.dark\:via-orange-500\/10:is(.dark *){--tw-gradient-via:color-mix(in oklab, var(--color-orange-500) 10%, transparent)}}.dark\:via-orange-500\/10:is(.dark *){--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.dark\:via-purple-500\/10:is(.dark *){--tw-gradient-via:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.dark\:via-purple-500\/10:is(.dark *){--tw-gradient-via:color-mix(in oklab, var(--color-purple-500) 10%, transparent)}}.dark\:via-purple-500\/10:is(.dark *){--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.dark\:via-teal-500\/10:is(.dark *){--tw-gradient-via:#00baa71a}@supports (color:color-mix(in lab,red,red)){.dark\:via-teal-500\/10:is(.dark *){--tw-gradient-via:color-mix(in oklab, var(--color-teal-500) 10%, transparent)}}.dark\:via-teal-500\/10:is(.dark *){--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.dark\:to-cyan-200:is(.dark *){--tw-gradient-to:var(--color-cyan-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:to-fuchsia-200:is(.dark *){--tw-gradient-to:var(--color-fuchsia-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:to-orange-200:is(.dark *){--tw-gradient-to:var(--color-orange-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:to-orange-900\/10:is(.dark *){--tw-gradient-to:#7e2a0c1a}@supports (color:color-mix(in lab,red,red)){.dark\:to-orange-900\/10:is(.dark *){--tw-gradient-to:color-mix(in oklab, var(--color-orange-900) 10%, transparent)}}.dark\:to-orange-900\/10:is(.dark *){--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:to-purple-200:is(.dark *){--tw-gradient-to:var(--color-purple-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:to-purple-900\/10:is(.dark *){--tw-gradient-to:#59168b1a}@supports (color:color-mix(in lab,red,red)){.dark\:to-purple-900\/10:is(.dark *){--tw-gradient-to:color-mix(in oklab, var(--color-purple-900) 10%, transparent)}}.dark\:to-purple-900\/10:is(.dark *){--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:to-sky-900\/10:is(.dark *){--tw-gradient-to:#4d179a1a}@supports (color:color-mix(in lab,red,red)){.dark\:to-sky-900\/10:is(.dark *){--tw-gradient-to:color-mix(in oklab, var(--color-violet-900) 10%, transparent)}}.dark\:to-sky-900\/10:is(.dark *){--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:to-teal-200:is(.dark *){--tw-gradient-to:var(--color-teal-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:to-teal-900\/10:is(.dark *){--tw-gradient-to:#0b4f4a1a}@supports (color:color-mix(in lab,red,red)){.dark\:to-teal-900\/10:is(.dark *){--tw-gradient-to:color-mix(in oklab, var(--color-teal-900) 10%, transparent)}}.dark\:to-teal-900\/10:is(.dark *){--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.dark\:text-\[\#4bc1f2\]:is(.dark *){color:#4bc1f2}.dark\:text-\[\#7ad8ff\]:is(.dark *){color:#7ad8ff}.dark\:text-\[\#7f88a3\]:is(.dark *){color:#7f88a3}.dark\:text-\[\#8b95ad\]:is(.dark *){color:#8b95ad}.dark\:text-\[\#9aa4be\]:is(.dark *){color:#9aa4be}.dark\:text-\[\#9da7bf\]:is(.dark *){color:#9da7bf}.dark\:text-\[\#9e8fff\]:is(.dark *){color:#9e8fff}.dark\:text-\[\#95a0bb\]:is(.dark *){color:#95a0bb}.dark\:text-\[\#98a2bc\]:is(.dark *){color:#98a2bc}.dark\:text-\[\#a8b2c9\]:is(.dark *){color:#a8b2c9}.dark\:text-\[\#a9b3ca\]:is(.dark *){color:#a9b3ca}.dark\:text-\[\#a35ceb\]:is(.dark *){color:#a35ceb}.dark\:text-\[\#aab3c7\]:is(.dark *){color:#aab3c7}.dark\:text-\[\#b2bad0\]:is(.dark *){color:#b2bad0}.dark\:text-\[\#c48bfc\]:is(.dark *){color:#c48bfc}.dark\:text-\[\#d3a8ff\]:is(.dark *){color:#d3a8ff}.dark\:text-\[\#e4e7f1\]:is(.dark *){color:#e4e7f1}.dark\:text-\[\#ecf0fb\]:is(.dark *){color:#ecf0fb}.dark\:text-\[\#f5f7fb\]:is(.dark *){color:#f5f7fb}.dark\:text-amber-100:is(.dark *){color:var(--color-amber-100)}.dark\:text-amber-100\/70:is(.dark *){color:#fef3c6b3}@supports (color:color-mix(in lab,red,red)){.dark\:text-amber-100\/70:is(.dark *){color:color-mix(in oklab,var(--color-amber-100) 70%,transparent)}}.dark\:text-amber-100\/90:is(.dark *){color:#fef3c6e6}@supports (color:color-mix(in lab,red,red)){.dark\:text-amber-100\/90:is(.dark *){color:color-mix(in oklab,var(--color-amber-100) 90%,transparent)}}.dark\:text-amber-200:is(.dark *){color:var(--color-amber-200)}.dark\:text-amber-300:is(.dark *){color:var(--color-amber-300)}.dark\:text-amber-400:is(.dark *){color:var(--color-amber-400)}.dark\:text-emerald-100\/70:is(.dark *){color:#d0fae5b3}@supports (color:color-mix(in lab,red,red)){.dark\:text-emerald-100\/70:is(.dark *){color:color-mix(in oklab,var(--color-emerald-100) 70%,transparent)}}.dark\:text-emerald-300:is(.dark *){color:var(--color-emerald-300)}.dark\:text-emerald-400:is(.dark *){color:var(--color-emerald-400)}.dark\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.dark\:text-indigo-100\/70:is(.dark *){color:#e0e7ffb3}@supports (color:color-mix(in lab,red,red)){.dark\:text-indigo-100\/70:is(.dark *){color:color-mix(in oklab,var(--color-indigo-100) 70%,transparent)}}.dark\:text-indigo-300:is(.dark *){color:var(--color-indigo-300)}.dark\:text-indigo-400:is(.dark *){color:var(--color-indigo-400)}.dark\:text-muted-foreground:is(.dark *){color:var(--muted-foreground)}.dark\:text-purple-300:is(.dark *){color:var(--color-purple-300)}.dark\:text-purple-400:is(.dark *){color:var(--color-purple-400)}.dark\:text-purple-400\/80:is(.dark *){color:#c07effcc}@supports (color:color-mix(in lab,red,red)){.dark\:text-purple-400\/80:is(.dark *){color:color-mix(in oklab,var(--color-purple-400) 80%,transparent)}}.dark\:text-rose-300:is(.dark *){color:var(--color-rose-300)}.dark\:text-rose-400:is(.dark *){color:var(--color-rose-400)}.dark\:text-sky-300:is(.dark *){color:var(--color-violet-300)}.dark\:text-sky-400:is(.dark *){color:var(--color-violet-400)}.dark\:text-sky-400\/80:is(.dark *){color:#a685ffcc}@supports (color:color-mix(in lab,red,red)){.dark\:text-sky-400\/80:is(.dark *){color:color-mix(in oklab,var(--color-violet-400) 80%,transparent)}}.dark\:text-slate-200:is(.dark *){color:var(--color-slate-200)}.dark\:text-slate-400:is(.dark *){color:var(--color-slate-400)}.dark\:text-violet-400:is(.dark *){color:var(--color-violet-400)}.dark\:text-yellow-300:is(.dark *){color:var(--color-yellow-300)}.dark\:opacity-10:is(.dark *){opacity:.1}.dark\:opacity-\[0\.25\]:is(.dark *){opacity:.25}.dark\:mix-blend-screen:is(.dark *){mix-blend-mode:screen}.dark\:shadow-\[0_12px_24px_rgba\(0\,0\,0\,0\.22\)\]:is(.dark *){--tw-shadow:0 12px 24px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.dark\:ring-offset-\[\#0B0F19\]:is(.dark *){--tw-ring-offset-color:#0b0f19}@media(hover:hover){.dark\:hover\:bg-\[\#1FA7E1\]\/10:is(.dark *):hover{background-color:#1fa7e11a}.dark\:hover\:bg-\[\#8A3FD3\]\/10:is(.dark *):hover{background-color:#8a3fd31a}.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.dark\:hover\:bg-black\/50:is(.dark *):hover{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-black\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.dark\:hover\:bg-black\/60:is(.dark *):hover{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-black\/60:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.dark\:hover\:bg-emerald-500\/20:is(.dark *):hover{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-emerald-500\/20:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--input) 50%,transparent)}}.dark\:hover\:bg-rose-900\/30:is(.dark *):hover{background-color:#8b08364d}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-rose-900\/30:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-rose-900) 30%,transparent)}}.dark\:hover\:bg-slate-800:is(.dark *):hover{background-color:var(--color-slate-800)}}.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:data-\[active\=true\]\:aria-invalid\:ring-destructive\/40:is(.dark *)[data-active=true][aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[active\=true\]\:aria-invalid\:ring-destructive\/40:is(.dark *)[data-active=true][aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:data-\[state\=active\]\:border-input:is(.dark *)[data-state=active]{border-color:var(--input)}.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:color-mix(in oklab,var(--input) 30%,transparent)}}.dark\:data-\[state\=active\]\:text-foreground:is(.dark *)[data-state=active]{color:var(--foreground)}.dark\:data-\[state\=checked\]\:bg-primary:is(.dark *)[data-state=checked]{background-color:var(--primary)}.dark\:data-\[state\=checked\]\:bg-primary-foreground:is(.dark *)[data-state=checked]{background-color:var(--primary-foreground)}.dark\:data-\[state\=unchecked\]\:bg-card-foreground:is(.dark *)[data-state=unchecked]{background-color:var(--card-foreground)}.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:color-mix(in oklab,var(--input) 80%,transparent)}}.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--destructive) 20%,transparent)}}.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:var(--muted-foreground)}.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke="#ccc"]{stroke:var(--border)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke="#ccc"]{stroke:color-mix(in oklab,var(--border) 50%,transparent)}}.\[\&_\.recharts-curve\.recharts-tooltip-cursor\]\:stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:var(--border)}.\[\&_\.recharts-dot\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-dot[stroke="#fff"]{stroke:#0000}.\[\&_\.recharts-layer\]\:outline-hidden .recharts-layer{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.\[\&_\.recharts-layer\]\:outline-hidden .recharts-layer{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.recharts-polar-grid_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-polar-grid [stroke="#ccc"]{stroke:var(--border)}.\[\&_\.recharts-radial-bar-background-sector\]\:fill-muted .recharts-radial-bar-background-sector,.\[\&_\.recharts-rectangle\.recharts-tooltip-cursor\]\:fill-muted .recharts-rectangle.recharts-tooltip-cursor{fill:var(--muted)}.\[\&_\.recharts-reference-line_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-reference-line [stroke="#ccc"]{stroke:var(--border)}.\[\&_\.recharts-sector\]\:outline-hidden .recharts-sector{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.\[\&_\.recharts-sector\]\:outline-hidden .recharts-sector{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.recharts-sector\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-sector[stroke="#fff"]{stroke:#0000}.\[\&_\.recharts-surface\]\:outline-hidden .recharts-surface{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.\[\&_\.recharts-surface\]\:outline-hidden .recharts-surface{outline-offset:2px;outline:2px solid #0000}}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing) * 0)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing) * 12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-block:calc(var(--spacing) * 3)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing) * 5)}.\[\&_p\]\:m-0 p{margin:calc(var(--spacing) * 0)}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_strong\]\:font-semibold strong{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:var(--muted-foreground)}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display:none}.\[\&\:has\(\>\.day-range-end\)\]\:rounded-r-md:has(>.day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\>\.day-range-start\)\]\:rounded-l-md:has(>.day-range-start){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:rounded-md:has([aria-selected]){border-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){background-color:var(--accent)}.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:first-child:has([aria-selected]){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:last-child:has([aria-selected]),.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:calc(var(--spacing) * 0)}.\[\.border-b\]\:pb-6.border-b{padding-bottom:calc(var(--spacing) * 6)}.\[\.border-t\]\:pt-6.border-t{padding-top:calc(var(--spacing) * 6)}:is(.\*\:\[span\]\:last\:flex>*):is(span):last-child{display:flex}:is(.\*\:\[span\]\:last\:items-center>*):is(span):last-child{align-items:center}:is(.\*\:\[span\]\:last\:gap-2>*):is(span):last-child{gap:calc(var(--spacing) * 2)}:is(.data-\[variant\=destructive\]\:\*\:\[svg\]\:\!text-destructive[data-variant=destructive]>*):is(svg){color:var(--destructive)!important}.\[\&\:last-child\]\:pb-6:last-child{padding-bottom:calc(var(--spacing) * 6)}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>button\]\:hidden>button{display:none}.\[\&\>span\:last-child\]\:truncate>span:last-child{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.\[\&\>svg\]\:pointer-events-none>svg{pointer-events:none}.\[\&\>svg\]\:size-3>svg{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&\>svg\]\:size-3\.5>svg{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&\>svg\]\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\>svg\]\:h-2\.5>svg{height:calc(var(--spacing) * 2.5)}.\[\&\>svg\]\:h-3>svg{height:calc(var(--spacing) * 3)}.\[\&\>svg\]\:w-2\.5>svg{width:calc(var(--spacing) * 2.5)}.\[\&\>svg\]\:w-3>svg{width:calc(var(--spacing) * 3)}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>svg\]\:translate-y-0\.5>svg{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>svg\]\:text-current>svg{color:currentColor}.\[\&\>svg\]\:text-muted-foreground>svg{color:var(--muted-foreground)}.\[\&\>svg\]\:text-sidebar-accent-foreground>svg{color:var(--sidebar-accent-foreground)}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&\[data-panel-group-direction\=vertical\]\>div\]\:rotate-90[data-panel-group-direction=vertical]>div{rotate:90deg}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{rotate:180deg}[data-side=left][data-collapsible=offcanvas] .\[\[data-side\=left\]\[data-collapsible\=offcanvas\]_\&\]\:-right-2{right:calc(var(--spacing) * -2)}[data-side=left][data-state=collapsed] .\[\[data-side\=left\]\[data-state\=collapsed\]_\&\]\:cursor-e-resize{cursor:e-resize}[data-side=right][data-collapsible=offcanvas] .\[\[data-side\=right\]\[data-collapsible\=offcanvas\]_\&\]\:-left-2{left:calc(var(--spacing) * -2)}[data-side=right][data-state=collapsed] .\[\[data-side\=right\]\[data-state\=collapsed\]_\&\]\:cursor-w-resize{cursor:w-resize}@media(hover:hover){a.\[a\&\]\:hover\:bg-accent:hover{background-color:var(--accent)}a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive) 90%,transparent)}}a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary) 90%,transparent)}}a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:color-mix(in oklab,var(--secondary) 90%,transparent)}}a.\[a\&\]\:hover\:text-accent-foreground:hover{color:var(--accent-foreground)}}}:root{--font-size:16px;--font-display:"Nunito", ui-sans-serif, system-ui, sans-serif;--font-body:"Nunito", ui-sans-serif, system-ui, sans-serif;--background:#f7f9fc;--foreground:#0a1628;--card:#fff;--card-foreground:#0a1628;--popover:#fff;--popover-foreground:#0a1628;--amethyst:#9956de;--slate-blue:#7274ed;--summer-sky:#1fa7e1;--downy:#6ed1cf;--pastel-green:#75d06a;--texas-rose:#ffb356;--mona-lisa:#ff8b8b;--illusion:#fb96bb;--primary:#9956de;--primary-foreground:#fff;--secondary:#7274ed;--secondary-foreground:#fff;--muted:#f4f4f5;--muted-foreground:#71717a;--accent:#1fa7e1;--accent-foreground:#fff;--destructive:#ff8b8b;--destructive-foreground:#fff;--border:#e4e4e7;--input:transparent;--input-background:#f4f4f5;--switch-background:#d4d4d8;--font-weight-medium:500;--font-weight-normal:400;--ring:#9956de;--chart-1:#9956de;--chart-2:#ff8b8b;--chart-3:#75d06a;--chart-4:#ffb356;--chart-5:#1fa7e1;--radius:1.25rem;--sidebar:#fff;--sidebar-foreground:#09090b;--sidebar-primary:#7c3aed;--sidebar-primary-foreground:#fff;--sidebar-accent:#f3f0ff;--sidebar-accent-foreground:#5b21b6;--sidebar-border:#e4e4e7;--sidebar-ring:#7c3aed}.dark{--background:#050d18;--foreground:#f0f7ff;--card:#0a1628;--card-foreground:#f0f7ff;--popover:#0a1628;--popover-foreground:#f0f7ff;--primary:#a78bfa;--primary-foreground:#fff;--secondary:#2e1065;--secondary-foreground:#c4b5fd;--muted:#27272a;--muted-foreground:#a1a1aa;--accent:#27272a;--accent-foreground:#f43f5e;--destructive:#ef4444;--destructive-foreground:#09090b;--border:#27272a;--input:#27272a;--input-background:#27272a;--switch-background:#3f3f46;--ring:#a78bfa;--font-weight-medium:500;--font-weight-normal:400;--chart-1:#a78bfa;--chart-2:#fb7185;--chart-3:#34d399;--chart-4:#fb923c;--chart-5:#38bdf8;--sidebar:#09090b;--sidebar-foreground:#fafafa;--sidebar-primary:#a78bfa;--sidebar-primary-foreground:#fff;--sidebar-accent:#27272a;--sidebar-accent-foreground:#fafafa;--sidebar-border:#27272a;--sidebar-ring:#a78bfa}html{font-size:var(--font-size)}html,body,#root{height:100%}html[data-density=compact]{--radius:.9rem}html.reduced-motion *,html.reduced-motion :before,html.reduced-motion :after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}html.smart-dark{filter:invert()hue-rotate(180deg);background:#101217}html.smart-dark img,html.smart-dark picture,html.smart-dark video,html.smart-dark canvas,html.smart-dark svg,html.smart-dark iframe,html.smart-dark [data-preserve-color=true]{filter:invert()hue-rotate(180deg)}.font-display{font-family:var(--font-display)}.font-body{font-family:var(--font-body)}.glow-blue{box-shadow:0 0 24px #0284c71f,0 0 64px #0284c70a}.glow-violet{box-shadow:0 0 24px #7c3aed1f,0 0 64px #7c3aed0a}.glow-rose{box-shadow:0 0 24px #f43f5e1f,0 0 64px #f43f5e0a}.glow-emerald{box-shadow:0 0 24px #0596691f,0 0 64px #0596690a}.bg-dot-pattern{background-image:radial-gradient(circle,#7c3aed14 1px,#0000 1px);background-size:24px 24px}.dark .bg-dot-pattern{background-image:radial-gradient(circle,#a78bfa1f 1px,#0000 1px)}.bg-math-pattern{background-color:var(--background);background-image:url("data:image/svg+xml,%3Csvg width='150' height='150' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='rgba(124, 58, 237, 0.05)' font-family='sans-serif' font-weight='bold' font-size='28'%3E%3Ctext x='20' y='40'%3E%2B%3C/text%3E%3Ctext x='90' y='60'%3E%3D%3C/text%3E%3Ctext x='40' y='110'%3E%25%3C/text%3E%3Ctext x='110' y='130'%3E%C3%97%3C/text%3E%3Ctext x='130' y='30'%3E%C3%B7%3C/text%3E%3C/g%3E%3C/svg%3E");background-size:150px 150px}.bg-noise{position:relative}.bg-noise:before{content:"";opacity:.03;pointer-events:none;z-index:1;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");position:absolute;inset:0}.card-elevated{box-shadow:0 16px 40px -8px #7c3aed26,0 0 24px -5px #7c3aed14}.card-elevated-lg{box-shadow:0 24px 60px -12px #7c3aed33,0 0 32px -10px #7c3aed1a}.shadow-3d-button{box-shadow:0 12px 24px -6px var(--tw-shadow-color,#f9731666),0 6px 12px -4px var(--tw-shadow-color,#f973164d)}.dark .card-elevated{box-shadow:0 1px 2px #0003,0 4px 16px #00000026}.dark .card-elevated-lg{box-shadow:0 2px 4px #0003,0 8px 32px #0003}*{scrollbar-width:thin;scrollbar-color:transparent transparent}:hover{scrollbar-color:#0284c733 transparent}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background-color:#0000;border-radius:10px;transition:background-color .3s}:hover::-webkit-scrollbar-thumb{background-color:#0284c733}::-webkit-scrollbar-thumb:hover{background-color:#0284c766}.scrollbar-hide{scrollbar-width:none;-ms-overflow-style:none}.scrollbar-hide::-webkit-scrollbar{display:none}.accent-line{position:relative}.accent-line:after{content:"";background:linear-gradient(90deg,#0284c7,#f43f5e);border-radius:2px;width:48px;height:3px;position:absolute;bottom:0;left:0}.surface-raised{background:linear-gradient(135deg,#fff,#f8fafc);border:1px solid #e2e8f0cc}.surface-inset{background:linear-gradient(135deg,#f1f5f9,#e8eef6);border:1px solid #cbd5e180}.bg-white-20{background-color:#fff3}.bg-white-15{background-color:#ffffff26}.bg-black-15{background-color:#00000026}.e-w{width:var(--w)}.e-bg{background-color:var(--bg)}.e-color{color:var(--c);fill:var(--c);stroke:var(--c)}.e-grid-cols{grid-template-columns:var(--grid-cols)}.e-perspective{perspective:var(--perspective)}.e-transform{transform:var(--tr)}.e-left-top{left:var(--left);top:var(--top)}.e-z{z-index:var(--z)}.e-filter{filter:var(--filter)}.e-opacity{opacity:var(--o)}.no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.no-scrollbar::-webkit-scrollbar{display:none}.module-detail-grid-pattern{opacity:.1;pointer-events:none;background-image:repeating-linear-gradient(0deg,#0000,#0000 39px,#fff 39px 40px),repeating-linear-gradient(90deg,#0000,#0000 39px,#fff 39px 40px)}.leaderboard-mask{-webkit-mask-image:linear-gradient(#0000,#000 15%);mask-image:linear-gradient(#0000,#000 15%)}.app-loader-screen{z-index:50;background:#f7f9fc;justify-content:center;align-items:center;padding:1rem;display:flex;position:fixed;inset:0}.app-loader-card{background:#fff;border:1px solid #dde3eb;border-radius:2rem;flex-direction:column;align-items:center;gap:1.5rem;width:min(100%,24rem);padding:2rem;display:flex;box-shadow:0 24px 40px #38bdf81f}.app-loader-avatar-shell{background:linear-gradient(135deg,#e0f2fe,#e0e7ff);border:2px solid #fff;border-radius:1.5rem;justify-content:center;align-items:center;width:6rem;height:6rem;display:flex;box-shadow:0 12px 24px #0f172a1f}.app-loader-avatar{object-fit:contain;filter:drop-shadow(0 8px 12px #0f172a33);width:4rem;height:4rem}.app-loader-bot-icon{width:4rem;height:4rem}.app-loader-title{color:#0a1628;margin:0;font-size:1.25rem;font-weight:700}.app-loader-message-row{justify-content:center;align-items:center;gap:.5rem;margin-top:.5rem;display:flex}.app-loader-spinner{border:2px solid #0284c7;border-top-color:#0000;border-radius:999px;width:1rem;height:1rem}.app-loader-message{color:#64748b;margin:0;font-size:.875rem;font-weight:600}.avatar-gloss{clip-path:polygon(15% 0,85% 0,65% 100%,35% 100%);pointer-events:none;background:linear-gradient(#fff6,#ffffff0d 60%,#0000)}.login-bg{background:linear-gradient(135deg,#f0f9ff,#f8fafc,#fff1f2 60%,#f0f9ff)}.login-frost-overlay{pointer-events:none;background:radial-gradient(at 30%,#f0f9ff33,#f8fafc80 50%,#fff1f266 80%,#f8fafcd9)}.login-orb-purple{background:radial-gradient(circle,#a855f74d,#0000 70%)}.login-orb-pink{background:radial-gradient(circle,#ec489940,#0000 70%)}.login-orb-blue{background:radial-gradient(circle,#38bdf833,#0000 70%)}.dynamic-header{background-color:var(--bg);-webkit-backdrop-filter:blur(var(--blur));backdrop-filter:blur(var(--blur));box-shadow:var(--shadow)}.e-max-h{max-height:var(--max-h);transition:max-height .22s;overflow:hidden}.hero-clip-inset{clip-path:inset(-100% -50% 0)}.card-3d{transform-origin:0;backface-visibility:hidden;transition:transform 2s ease-in-out}.card-accent-sky{border-left:3px solid #0284c7}.card-accent-rose{border-left:3px solid #f43f5e}.card-accent-emerald{border-left:3px solid #059669}.app-loader-copy{text-align:center}@keyframes float{0%,to{transform:translateY(0)}50%{transform:translateY(-10px)}}@keyframes sunburst-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-sunburst-spin{animation:30s linear infinite sunburst-spin}.chat-markdown{font-family:var(--font-body);overflow-wrap:anywhere;word-break:break-word;font-size:.875rem;line-height:1.625}.chat-markdown h1{font-family:var(--font-display);color:var(--foreground);margin-top:.75rem;margin-bottom:.5rem;font-size:1.25rem;font-weight:700}.chat-markdown h2{font-family:var(--font-display);color:var(--foreground);margin-top:.75rem;margin-bottom:.375rem;font-size:1.1rem;font-weight:700}.chat-markdown h3{font-family:var(--font-display);color:var(--muted-foreground);margin-top:.5rem;margin-bottom:.25rem;font-size:1rem;font-weight:600}.chat-markdown p{margin-top:.375rem;margin-bottom:.375rem}.chat-markdown ul,.chat-markdown ol{margin-top:.375rem;margin-bottom:.375rem;padding-left:1.25rem}.chat-markdown ul{list-style-type:disc}.chat-markdown ol{list-style-type:decimal}.chat-markdown li{margin-top:.125rem;margin-bottom:.125rem}.chat-markdown strong{color:var(--foreground);font-weight:700}.chat-markdown em{font-style:italic}.chat-markdown code{background:var(--secondary);color:var(--primary);border-radius:.25rem;padding:.125rem .375rem;font-size:.8125rem}.chat-markdown pre{background:var(--muted);border:1px solid var(--border);border-radius:.5rem;margin-top:.5rem;margin-bottom:.5rem;padding:.75rem;overflow-x:auto}.chat-markdown pre code{color:inherit;background:0 0;padding:0}.chat-markdown hr{border-color:#94a3b873;margin:.75rem 0}.chat-markdown table{border-collapse:collapse;width:100%;margin:.5rem 0;font-size:.8125rem}.chat-markdown th{background:var(--muted);text-align:left;border:1px solid var(--border);padding:.375rem .5rem;font-weight:600}.chat-markdown td{border:1px solid var(--border);padding:.375rem .5rem}.chat-markdown blockquote{border-left:3px solid var(--primary);color:var(--muted-foreground);margin:.5rem 0;padding-left:.75rem;font-style:italic}.chat-markdown a{color:var(--primary);text-decoration:underline}.chat-markdown>:first-child{margin-top:0}.chat-markdown>:last-child{margin-bottom:0}.chat-markdown .katex-display{padding-bottom:.15rem;overflow:auto hidden}@property --tw-border-spacing-x{syntax:"";inherits:false;initial-value:0}@property --tw-border-spacing-y{syntax:"";inherits:false;initial-value:0}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-scroll-snap-strictness{syntax:"*";inherits:false;initial-value:proximity}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}} diff --git a/assets/index-fWY85Kyg.js b/assets/index-Du57tmo9.js similarity index 50% rename from assets/index-fWY85Kyg.js rename to assets/index-Du57tmo9.js index 4495a573be85f121b1d4b65068786ccf3338b2d9..8fd929a233e24477bc7662fe821f9135d02ccc71 100644 --- a/assets/index-fWY85Kyg.js +++ b/assets/index-Du57tmo9.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/automationService-DoO5SNeM.js","assets/vendor-firebase-firestore-52DD1vc9.js","assets/vendor-firebase-core-y3En_kpN.js","assets/vendor-react-B4AQeu28.js","assets/vendor-firebase-auth-BW5XT768.js","assets/vendor-firebase-storage-DNmrKfQ-.js","assets/vendor-firebase-analytics-DZd0u9yk.js","assets/vendor-radix-DnWAlVSW.js","assets/vendor-charts-BHw0fhqZ.js","assets/vendor-markdown-yqZQ_iQm.js","assets/vendor-markdown-CfVKi3_s.css","assets/chatService-DzDq5mQE.js","assets/LoginPage-C8bC1ar4.js","assets/button-BSRmUN27.js","assets/input-B3NSXxdz.js","assets/sparkles-BY90tCLG.js","assets/brain-COga8OrM.js","assets/trending-up-Do7UgIZi.js","assets/award-DBHp-ybd.js","assets/users-CX_H_2cY.js","assets/graduation-cap-B4Q4YTk8.js","assets/book-open-D5mR6gz9.js","assets/mail-BS9lcBqF.js","assets/lock-6q-juSdu.js","assets/eye-DQlJQwuY.js","assets/shield-check-DJHCbiaj.js","assets/TeacherDashboard-DNWwq_ue.js","assets/ConfirmModal-Bs6qCyoa.js","assets/x-BLLfAvOF.js","assets/trash-2-PgvGautk.js","assets/log-out-aQvvB_kG.js","assets/LogoutActionButton-w1PkauXp.js","assets/tooltip-DQuc9Ksp.js","assets/quizService-hKqxJjxh.js","assets/chevron-left-KucdseP8.js","assets/loader-circle-id_hZlNw.js","assets/send-86vsPrek.js","assets/circle-alert-KkqOOEPJ.js","assets/check-Cs-4n4yC.js","assets/dialog-TlKhS4yO.js","assets/chevron-up-Bup_RJHP.js","assets/minus-Db4XvxwC.js","assets/plus-CRabOymo.js","assets/card-SHcaFLA_.js","assets/download-Dl_jNVXs.js","assets/chevron-right-mxUv3EB7.js","assets/save-_nGsRc5b.js","assets/search-DoNO8thr.js","assets/refresh-cw-Dr342wB2.js","assets/upload-DodiG981.js","assets/useQuery-Dajy9lf6.js","assets/subjects-BlAP40QQ.js","assets/chart-column-V8fKqOo0.js","assets/useCurriculum-DKgroDSx.js","assets/circle-check-big-Qn5jJKfH.js","assets/user-Cp86-wJG.js","assets/ChatMarkdown-C-_pyfsw.js","assets/bell-BwBudSvY.js","assets/clock-BJCraYVD.js","assets/trophy-fJOOsc_0.js","assets/skeleton-ISwUzksB.js","assets/vendor-xlsx-uZelXSz_.js","assets/target-B6MOj4Ln.js","assets/clipboard-check-DbpvA-N4.js","assets/calendar-ClpJmmLI.js","assets/AdminDashboard-C42SbQoX.js","assets/Sidebar-D_VIy77A.js","assets/shield-vTl0KLH8.js","assets/swords-Btzyg4ct.js","assets/shirt-hGG3zHVe.js","assets/select-BwzsWVap.js","assets/lightbulb-D3kdQgij.js","assets/switch-CiNZ7HsE.js","assets/funnel-DjeGbYf2.js","assets/useSubjectAvailability-Wk6vHhYW.js","assets/HeroBanner-B-jp-_T1.js","assets/RightSidebar-CB4PJstQ.js","assets/quiz_battle_avatar-BXHPSput.js","assets/star-BKdRsvg1.js","assets/XPNotification-B39PrFBD.js","assets/index-D6SUtGjv.js","assets/SupplementalBanner-BWRH1BJK.js","assets/LearningPath-D6nfM5qD.js","assets/ModuleFolderCard-BJl0S3M8.js","assets/CompetencyRadarChart-Dj3tHzDW.js","assets/ModulesPage-DHibj58D.js","assets/confetti.module-C94ZD2ww.js","assets/ScientificCalculator-YnJAbv_n.js","assets/AIChatPage-DcGfVQjX.js","assets/GradesPage-OZOkejf2.js","assets/LeaderboardPage-fMeUqEhL.js","assets/QuizBattlePage-DP7m_bnv.js","assets/CompositeAvatar-Col05lJc.js","assets/avatarData-BuQSOXo3.js","assets/AvatarShop-BfAC4iSo.js","assets/FloatingAITutor-CZdidaqQ.js","assets/RewardsModal-C5DMk9fO.js","assets/ProfileModal-CCkbSstb.js","assets/ProfilePictureUploader-BVT_TKTZ.js","assets/SettingsModal-D8-maWNc.js","assets/InitialAssessmentModal-B6OcOqjq.js","assets/diagnosticService-BbwguGxN.js","assets/AssessmentPage-Bf02LBPz.js","assets/testResetService-Dj2svZFr.js"])))=>i.map(i=>d[i]); -import{r as h,j as x,d as M,c as Gd,f as Hd}from"./vendor-react-B4AQeu28.js";import{getAuth as Wd,GoogleAuthProvider as Kd,createUserWithEmailAndPassword as Qd,updateProfile as Xd,signInWithEmailAndPassword as Yd,signOut as Jd,deleteUser as Zd,updatePassword as ef,onAuthStateChanged as tf}from"./vendor-firebase-auth-BW5XT768.js";import{T as nf,U as sf,V as rf,Y as af}from"./vendor-firebase-core-y3En_kpN.js";import{i as of,p as lf,s as $e,d as se,a as ue,g as ve,b as cf,c as Gl,q as $t,l as Ks,o as Fi,e as Ze,f as Ni,h as bn,u as Rt,j as ji,w as Ct,k as Fn,T as uf}from"./vendor-firebase-firestore-52DD1vc9.js";import{g as df}from"./vendor-firebase-storage-DNmrKfQ-.js";import{g as ff}from"./vendor-firebase-analytics-DZd0u9yk.js";import{R as hf,I as mf,F as pf}from"./vendor-radix-DnWAlVSW.js";import{c as gf}from"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();var Qs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},yf=class extends Qs{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Hl=new yf,bf={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},vf=class{#e=bf;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Yr=new vf;function wf(e){setTimeout(e,0)}var xf=typeof window>"u"||"Deno"in globalThis;function ot(){}function Sf(e,t){return typeof e=="function"?e(t):e}function Tf(e){return typeof e=="number"&&e>=0&&e!==1/0}function Pf(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Jr(e,t){return typeof e=="function"?e(t):e}function Ef(e,t){return typeof e=="function"?e(t):e}function ja(e,t){const{type:n="all",exact:s,fetchStatus:r,predicate:i,queryKey:a,stale:o}=e;if(a){if(s){if(t.queryHash!==Vi(a,t.options))return!1}else if(!jn(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||r&&r!==t.state.fetchStatus||i&&!i(t))}function Va(e,t){const{exact:n,status:s,predicate:r,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Nn(t.options.mutationKey)!==Nn(i))return!1}else if(!jn(t.options.mutationKey,i))return!1}return!(s&&t.state.status!==s||r&&!r(t))}function Vi(e,t){return(t?.queryKeyHashFn||Nn)(e)}function Nn(e){return JSON.stringify(e,(t,n)=>Zr(n)?Object.keys(n).sort().reduce((s,r)=>(s[r]=n[r],s),{}):n)}function jn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>jn(e[n],t[n])):!1}var Cf=Object.prototype.hasOwnProperty;function Wl(e,t,n=0){if(e===t)return e;if(n>500)return t;const s=Ba(e)&&Ba(t);if(!s&&!(Zr(e)&&Zr(t)))return t;const i=(s?e:Object.keys(e)).length,a=s?t:Object.keys(t),o=a.length,l=s?new Array(o):{};let d=0;for(let u=0;u{Yr.setTimeout(t,e)})}function kf(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Wl(e,t):t}function Rf(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function Mf(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var Bi=Symbol();function Kl(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Bi?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function TT(e,t){return typeof e=="function"?e(...t):!!e}function Df(e,t,n){let s=!1,r;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(r??=t(),s||(s=!0,r.aborted?n():r.addEventListener("abort",n,{once:!0})),r)}),e}var Ql=(()=>{let e=()=>xf;return{isServer(){return e()},setIsServer(t){e=t}}})();function If(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});n.status="pending",n.catch(()=>{});function s(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{s({status:"fulfilled",value:r}),e(r)},n.reject=r=>{s({status:"rejected",reason:r}),t(r)},n}var Lf=wf;function _f(){let e=[],t=0,n=o=>{o()},s=o=>{o()},r=Lf;const i=o=>{t?e.push(o):r(()=>{n(o)})},a=()=>{const o=e;e=[],o.length&&r(()=>{s(()=>{o.forEach(l=>{n(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||a()}return l},batchCalls:o=>(...l)=>{i(()=>{o(...l)})},schedule:i,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{s=o},setScheduler:o=>{r=o}}}var je=_f(),Of=class extends Qs{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Ls=new Of;function Ff(e){return Math.min(1e3*2**e,3e4)}function Xl(e){return(e??"online")==="online"?Ls.isOnline():!0}var ei=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Yl(e){let t=!1,n=0,s;const r=If(),i=()=>r.status!=="pending",a=y=>{if(!i()){const g=new ei(y);f(g),e.onCancel?.(g)}},o=()=>{t=!0},l=()=>{t=!1},d=()=>Hl.isFocused()&&(e.networkMode==="always"||Ls.isOnline())&&e.canRun(),u=()=>Xl(e.networkMode)&&e.canRun(),c=y=>{i()||(s?.(),r.resolve(y))},f=y=>{i()||(s?.(),r.reject(y))},m=()=>new Promise(y=>{s=g=>{(i()||d())&&y(g)},e.onPause?.()}).then(()=>{s=void 0,i()||e.onContinue?.()}),p=()=>{if(i())return;let y;const g=n===0?e.initialPromise:void 0;try{y=g??e.fn()}catch(b){y=Promise.reject(b)}Promise.resolve(y).then(c).catch(b=>{if(i())return;const T=e.retry??(Ql.isServer()?0:3),w=e.retryDelay??Ff,S=typeof w=="function"?w(n,b):w,E=T===!0||typeof T=="number"&&nd()?void 0:m()).then(()=>{t?f(b):p()})})};return{promise:r,status:()=>r.status,cancel:a,continue:()=>(s?.(),r),cancelRetry:o,continueRetry:l,canStart:u,start:()=>(u()?p():m().then(p),r)}}var Jl=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Tf(this.gcTime)&&(this.#e=Yr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ql.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Yr.clearTimeout(this.#e),this.#e=void 0)}};function Nf(e){return{onFetch:(t,n)=>{const s=t.options,r=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let o={pages:[],pageParams:[]},l=0;const d=async()=>{let u=!1;const c=p=>{Df(p,()=>t.signal,()=>u=!0)},f=Kl(t.options,t.fetchOptions),m=async(p,y,g)=>{if(u)return Promise.reject(t.signal.reason);if(y==null&&p.pages.length)return Promise.resolve(p);const T=(()=>{const P={client:t.client,queryKey:t.queryKey,pageParam:y,direction:g?"backward":"forward",meta:t.options.meta};return c(P),P})(),w=await f(T),{maxPages:S}=t.options,E=g?Mf:Rf;return{pages:E(p.pages,w,S),pageParams:E(p.pageParams,y,S)}};if(r&&i.length){const p=r==="backward",y=p?jf:Ua,g={pages:i,pageParams:a},b=y(s,g);o=await m(g,b,p)}else{const p=e??i.length;do{const y=l===0?a[0]??s.initialPageParam:Ua(s,o);if(l>0&&y==null)break;o=await m(o,y),l++}while(lt.options.persister?.(d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=d}}}function Ua(e,{pages:t,pageParams:n}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,n[s],n):void 0}function jf(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Vf=class extends Jl{#e;#t;#n;#r;#i;#s;#l;#a;constructor(e){super(),this.#a=!1,this.#l=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=qa(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#s?.promise}setOptions(e){if(this.options={...this.#l,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=qa(this.options);t.data!==void 0&&(this.setState(za(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=kf(this.state.data,e,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#o({type:"setState",state:e})}cancel(e){const t=this.#s?.promise;return this.#s?.cancel(e),t?t.then(ot).catch(ot):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Ef(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Bi||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Jr(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Pf(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#s&&(this.#a||this.#c()?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(e&&this.setOptions(e),!this.options.queryFn){const l=this.observers.find(d=>d.options.queryFn);l&&this.setOptions(l.options)}const n=new AbortController,s=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},r=()=>{const l=Kl(this.options,t),u=(()=>{const c={client:this.#i,queryKey:this.queryKey,meta:this.meta};return s(c),c})();return this.#a=!1,this.options.persister?this.options.persister(l,u,this):l(u)},a=(()=>{const l={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:r};return s(l),l})();(this.#e==="infinite"?Nf(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#o({type:"fetch",meta:a.fetchOptions?.meta}),this.#s=Yl({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:l=>{l instanceof ei&&l.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(l,d)=>{this.#o({type:"failed",failureCount:l,error:d})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const l=await this.#s.start();if(l===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(l),this.#r.config.onSuccess?.(l,this),this.#r.config.onSettled?.(l,this.state.error,this),l}catch(l){if(l instanceof ei){if(l.silent)return this.#s.promise;if(l.revert){if(this.state.data===void 0)throw l;return this.state.data}}throw this.#o({type:"error",error:l}),this.#r.config.onError?.(l,this),this.#r.config.onSettled?.(this.state.data,l,this),l}finally{this.scheduleGc()}}#o(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Bf(n.data,this.options),fetchMeta:e.meta??null};case"success":const s={...n,...za(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?s:void 0,s;case"error":const r=e.error;return{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),je.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function Bf(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Xl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function za(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function qa(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,s=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var $f=class extends Jl{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Uf(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#i({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Yl({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,a)=>{this.#i({type:"failed",failureCount:i,error:a})},onPause:()=>{this.#i({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const s=this.state.status==="pending",r=!this.#r.canStart();try{if(s)t();else{this.#i({type:"pending",variables:e,isPaused:r}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const a=await this.options.onMutate?.(e,n);a!==this.state.context&&this.#i({type:"pending",context:a,variables:e,isPaused:r})}const i=await this.#r.start();return await this.#n.config.onSuccess?.(i,e,this.state.context,this,n),await this.options.onSuccess?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(i,null,e,this.state.context,n),this.#i({type:"success",data:i}),i}catch(i){try{await this.#n.config.onError?.(i,e,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(i,e,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,i,e,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#i({type:"error",error:i}),i}finally{this.#n.runNext(this)}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),je.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Uf(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var zf=class extends Qs{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const s=new $f({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(s),s}add(e){this.#e.add(e);const t=as(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=as(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const s=n.indexOf(e);s!==-1&&n.splice(s,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=as(e);if(typeof t=="string"){const s=this.#t.get(t)?.find(r=>r.state.status==="pending");return!s||s===e}else return!0}runNext(e){const t=as(e);return typeof t=="string"?this.#t.get(t)?.find(s=>s!==e&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){je.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Va(t,n))}findAll(e={}){return this.getAll().filter(t=>Va(e,t))}notify(e){je.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return je.batch(()=>Promise.all(e.map(t=>t.continue().catch(ot))))}};function as(e){return e.options.scope?.id}var qf=class extends Qs{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const s=t.queryKey,r=t.queryHash??Vi(s,t);let i=this.get(r);return i||(i=new Vf({client:e,queryKey:s,queryHash:r,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(i)),i}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){je.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>ja(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>ja(e,n)):t}notify(e){je.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){je.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){je.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Gf=class{#e;#t;#n;#r;#i;#s;#l;#a;constructor(e={}){this.#e=e.queryCache||new qf,this.#t=e.mutationCache||new zf,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#l=Hl.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Ls.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#l?.(),this.#l=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),s=n.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Jr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const s=n.data;return[t,s]})}setQueryData(e,t,n){const s=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(s.queryHash)?.state.data,a=Sf(t,i);if(a!==void 0)return this.#e.build(this,s).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return je.batch(()=>this.#e.findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;je.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return je.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=je.batch(()=>this.#e.findAll(e).map(r=>r.cancel(n)));return Promise.all(s).then(ot).catch(ot)}invalidateQueries(e,t={}){return je.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},s=je.batch(()=>this.#e.findAll(e).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let i=r.fetch(void 0,n);return n.throwOnError||(i=i.catch(ot)),r.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(s).then(ot)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Jr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ot).catch(ot)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ot).catch(ot)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Ls.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Nn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(s=>{jn(e,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Nn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(s=>{jn(e,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Vi(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Bi&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Zl=h.createContext(void 0),PT=e=>{const t=h.useContext(Zl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Hf=({client:e,children:t})=>(h.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(Zl.Provider,{value:e,children:t}));/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/automationService-ChmA_Dh7.js","assets/vendor-firebase-firestore-52DD1vc9.js","assets/vendor-firebase-core-y3En_kpN.js","assets/vendor-react-B4AQeu28.js","assets/vendor-firebase-auth-BW5XT768.js","assets/vendor-firebase-storage-DNmrKfQ-.js","assets/vendor-firebase-analytics-DZd0u9yk.js","assets/vendor-radix-DnWAlVSW.js","assets/vendor-charts-BHw0fhqZ.js","assets/vendor-markdown-yqZQ_iQm.js","assets/vendor-markdown-CfVKi3_s.css","assets/chatService-CNolNpDv.js","assets/LoginPage-BmZHRSsl.js","assets/button-C6pFOjcg.js","assets/input-DtBdbulD.js","assets/sparkles-DseoQb3m.js","assets/brain-CEG2uNCc.js","assets/trending-up-BgWHLAjl.js","assets/award-ZQxHm68j.js","assets/users--M0GUX5u.js","assets/graduation-cap-D6QMIGIe.js","assets/book-open-cmOvedFO.js","assets/mail-B4r1HZjf.js","assets/lock-CtsU7Hj2.js","assets/eye-Duf559JU.js","assets/shield-check-DJtXN0Ez.js","assets/TeacherDashboard-DlC2jUJq.js","assets/ConfirmModal-CGEO_l_6.js","assets/x-Cwkkamrh.js","assets/trash-2-uIChez5o.js","assets/log-out-SC88Jnul.js","assets/LogoutActionButton-XXsvBOAH.js","assets/tooltip-C0JcTMbS.js","assets/quizService-DQwJWsyM.js","assets/chevron-left-mWdIDmIc.js","assets/loader-circle-Bluo8e0c.js","assets/send-DWW_bMCz.js","assets/circle-alert-mPiSlvKL.js","assets/check-BAMSfVKd.js","assets/dialog-fRGvTlwY.js","assets/chevron-up-Dmffgx6p.js","assets/minus-DyrqHtmD.js","assets/plus-gReuWg-C.js","assets/card-BdmZcu-T.js","assets/download-VEXmhhD6.js","assets/chevron-right-CFOFOVBg.js","assets/save-BYv1sqTn.js","assets/search-Dz1wkXyZ.js","assets/refresh-cw-BDWpfygR.js","assets/upload-CONq3UoZ.js","assets/useQuery-CDdIlAcl.js","assets/subjects-DLaBFkP9.js","assets/chart-column-Cqncpeum.js","assets/useCurriculum-7SWvm23j.js","assets/circle-check-big-DC9utj0Y.js","assets/user-DPqSTqXe.js","assets/ChatMarkdown-Dqp-2Avv.js","assets/bell-CVB0-Rn1.js","assets/clock-BtWjBj1h.js","assets/trophy-8udS7pQx.js","assets/skeleton-08qYl7s6.js","assets/vendor-xlsx-uZelXSz_.js","assets/target-B_JwHjFq.js","assets/clipboard-check-fEagN09v.js","assets/calendar-DguKdDEr.js","assets/AdminDashboard-B3V_f98_.js","assets/Sidebar-SiyazvIi.js","assets/shield-QK9XTLqm.js","assets/swords-Bu0_wc8h.js","assets/shirt-wJF8-Ry8.js","assets/select-BO-JyJ96.js","assets/lightbulb-2ipA_Yda.js","assets/switch-YVS1owKs.js","assets/funnel-N-2rOOix.js","assets/useSubjectAvailability-BhYsHQ11.js","assets/HeroBanner-C7eH_2x2.js","assets/RightSidebar-CfqBTJ6T.js","assets/quiz_battle_avatar-BXHPSput.js","assets/star-BBetp7Wf.js","assets/XPNotification-CRyPsEGd.js","assets/index-CPnajj72.js","assets/SupplementalBanner-2F2CcBwT.js","assets/LearningPath-CnmA03m9.js","assets/ModuleFolderCard-DFi0m1Zn.js","assets/CompetencyRadarChart-Czkg0oSg.js","assets/ModulesPage-CaIkpigw.js","assets/ScientificCalculator-3ObnUHS8.js","assets/volume-x-Bj_FF_0v.js","assets/confetti.module-C94ZD2ww.js","assets/AIChatPage-CZPJTGvo.js","assets/GradesPage-BANrJIHK.js","assets/LeaderboardPage-8P9vlsJH.js","assets/QuizBattlePage-1dVgBLvH.js","assets/CompositeAvatar-Col05lJc.js","assets/avatarData-BuQSOXo3.js","assets/AvatarShop-Bn9Ru-By.js","assets/FloatingAITutor-CK0p1jTY.js","assets/RewardsModal-MXZjyis_.js","assets/ProfileModal-D0s9Ytgo.js","assets/ProfilePictureUploader-CmusgPWl.js","assets/SettingsModal-BlGAAMMC.js","assets/InitialAssessmentModal-CKoRHDsn.js","assets/diagnosticService-EjsgXhrt.js","assets/AssessmentPage-B-axolaD.js","assets/testResetService-nMd5-K9y.js"])))=>i.map(i=>d[i]); +import{r as h,j as x,d as M,c as Wd,f as Kd}from"./vendor-react-B4AQeu28.js";import{getAuth as Qd,GoogleAuthProvider as Xd,createUserWithEmailAndPassword as Yd,updateProfile as Jd,signInWithEmailAndPassword as Zd,signOut as ef,deleteUser as tf,updatePassword as nf,onAuthStateChanged as sf}from"./vendor-firebase-auth-BW5XT768.js";import{T as rf,U as af,V as of,Y as lf}from"./vendor-firebase-core-y3En_kpN.js";import{i as cf,p as uf,s as qe,d as re,a as de,g as xe,b as df,c as Wl,q as Bt,l as Ks,o as Ni,e as Ze,f as ji,h as bn,u as Rt,j as Vi,w as Ct,k as Nn,T as ff}from"./vendor-firebase-firestore-52DD1vc9.js";import{g as hf}from"./vendor-firebase-storage-DNmrKfQ-.js";import{g as mf}from"./vendor-firebase-analytics-DZd0u9yk.js";import{R as pf,I as gf,F as yf}from"./vendor-radix-DnWAlVSW.js";import{c as bf}from"./vendor-charts-BHw0fhqZ.js";import"./vendor-markdown-yqZQ_iQm.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&s(a)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();var Qs=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},vf=class extends Qs{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Kl=new vf,wf={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},xf=class{#e=wf;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Jr=new xf;function Sf(e){setTimeout(e,0)}var Tf=typeof window>"u"||"Deno"in globalThis;function ot(){}function Pf(e,t){return typeof e=="function"?e(t):e}function Ef(e){return typeof e=="number"&&e>=0&&e!==1/0}function Cf(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Zr(e,t){return typeof e=="function"?e(t):e}function Af(e,t){return typeof e=="function"?e(t):e}function Ba(e,t){const{type:n="all",exact:s,fetchStatus:r,predicate:i,queryKey:a,stale:o}=e;if(a){if(s){if(t.queryHash!==Bi(a,t.options))return!1}else if(!Vn(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||r&&r!==t.state.fetchStatus||i&&!i(t))}function $a(e,t){const{exact:n,status:s,predicate:r,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(jn(t.options.mutationKey)!==jn(i))return!1}else if(!Vn(t.options.mutationKey,i))return!1}return!(s&&t.state.status!==s||r&&!r(t))}function Bi(e,t){return(t?.queryKeyHashFn||jn)(e)}function jn(e){return JSON.stringify(e,(t,n)=>ei(n)?Object.keys(n).sort().reduce((s,r)=>(s[r]=n[r],s),{}):n)}function Vn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Vn(e[n],t[n])):!1}var kf=Object.prototype.hasOwnProperty;function Ql(e,t,n=0){if(e===t)return e;if(n>500)return t;const s=Ua(e)&&Ua(t);if(!s&&!(ei(e)&&ei(t)))return t;const i=(s?e:Object.keys(e)).length,a=s?t:Object.keys(t),o=a.length,l=s?new Array(o):{};let d=0;for(let u=0;u{Jr.setTimeout(t,e)})}function Mf(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Ql(e,t):t}function Df(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function If(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var $i=Symbol();function Xl(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===$i?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ET(e,t){return typeof e=="function"?e(...t):!!e}function Lf(e,t,n){let s=!1,r;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(r??=t(),s||(s=!0,r.aborted?n():r.addEventListener("abort",n,{once:!0})),r)}),e}var Yl=(()=>{let e=()=>Tf;return{isServer(){return e()},setIsServer(t){e=t}}})();function _f(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});n.status="pending",n.catch(()=>{});function s(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{s({status:"fulfilled",value:r}),e(r)},n.reject=r=>{s({status:"rejected",reason:r}),t(r)},n}var Of=Sf;function Ff(){let e=[],t=0,n=o=>{o()},s=o=>{o()},r=Of;const i=o=>{t?e.push(o):r(()=>{n(o)})},a=()=>{const o=e;e=[],o.length&&r(()=>{s(()=>{o.forEach(l=>{n(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||a()}return l},batchCalls:o=>(...l)=>{i(()=>{o(...l)})},schedule:i,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{s=o},setScheduler:o=>{r=o}}}var je=Ff(),Nf=class extends Qs{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Ls=new Nf;function jf(e){return Math.min(1e3*2**e,3e4)}function Jl(e){return(e??"online")==="online"?Ls.isOnline():!0}var ti=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Zl(e){let t=!1,n=0,s;const r=_f(),i=()=>r.status!=="pending",a=y=>{if(!i()){const g=new ti(y);f(g),e.onCancel?.(g)}},o=()=>{t=!0},l=()=>{t=!1},d=()=>Kl.isFocused()&&(e.networkMode==="always"||Ls.isOnline())&&e.canRun(),u=()=>Jl(e.networkMode)&&e.canRun(),c=y=>{i()||(s?.(),r.resolve(y))},f=y=>{i()||(s?.(),r.reject(y))},m=()=>new Promise(y=>{s=g=>{(i()||d())&&y(g)},e.onPause?.()}).then(()=>{s=void 0,i()||e.onContinue?.()}),p=()=>{if(i())return;let y;const g=n===0?e.initialPromise:void 0;try{y=g??e.fn()}catch(b){y=Promise.reject(b)}Promise.resolve(y).then(c).catch(b=>{if(i())return;const T=e.retry??(Yl.isServer()?0:3),w=e.retryDelay??jf,S=typeof w=="function"?w(n,b):w,E=T===!0||typeof T=="number"&&nd()?void 0:m()).then(()=>{t?f(b):p()})})};return{promise:r,status:()=>r.status,cancel:a,continue:()=>(s?.(),r),cancelRetry:o,continueRetry:l,canStart:u,start:()=>(u()?p():m().then(p),r)}}var ec=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ef(this.gcTime)&&(this.#e=Jr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Yl.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Jr.clearTimeout(this.#e),this.#e=void 0)}};function Vf(e){return{onFetch:(t,n)=>{const s=t.options,r=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let o={pages:[],pageParams:[]},l=0;const d=async()=>{let u=!1;const c=p=>{Lf(p,()=>t.signal,()=>u=!0)},f=Xl(t.options,t.fetchOptions),m=async(p,y,g)=>{if(u)return Promise.reject(t.signal.reason);if(y==null&&p.pages.length)return Promise.resolve(p);const T=(()=>{const P={client:t.client,queryKey:t.queryKey,pageParam:y,direction:g?"backward":"forward",meta:t.options.meta};return c(P),P})(),w=await f(T),{maxPages:S}=t.options,E=g?If:Df;return{pages:E(p.pages,w,S),pageParams:E(p.pageParams,y,S)}};if(r&&i.length){const p=r==="backward",y=p?Bf:qa,g={pages:i,pageParams:a},b=y(s,g);o=await m(g,b,p)}else{const p=e??i.length;do{const y=l===0?a[0]??s.initialPageParam:qa(s,o);if(l>0&&y==null)break;o=await m(o,y),l++}while(lt.options.persister?.(d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=d}}}function qa(e,{pages:t,pageParams:n}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,n[s],n):void 0}function Bf(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var $f=class extends ec{#e;#t;#n;#r;#i;#s;#l;#a;constructor(e){super(),this.#a=!1,this.#l=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Ha(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#s?.promise}setOptions(e){if(this.options={...this.#l,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Ha(this.options);t.data!==void 0&&(this.setState(Ga(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=Mf(this.state.data,e,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#o({type:"setState",state:e})}cancel(e){const t=this.#s?.promise;return this.#s?.cancel(e),t?t.then(ot).catch(ot):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Af(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===$i||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Zr(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Cf(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#s&&(this.#a||this.#c()?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(e&&this.setOptions(e),!this.options.queryFn){const l=this.observers.find(d=>d.options.queryFn);l&&this.setOptions(l.options)}const n=new AbortController,s=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>(this.#a=!0,n.signal)})},r=()=>{const l=Xl(this.options,t),u=(()=>{const c={client:this.#i,queryKey:this.queryKey,meta:this.meta};return s(c),c})();return this.#a=!1,this.options.persister?this.options.persister(l,u,this):l(u)},a=(()=>{const l={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:r};return s(l),l})();(this.#e==="infinite"?Vf(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#o({type:"fetch",meta:a.fetchOptions?.meta}),this.#s=Zl({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:l=>{l instanceof ti&&l.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(l,d)=>{this.#o({type:"failed",failureCount:l,error:d})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const l=await this.#s.start();if(l===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(l),this.#r.config.onSuccess?.(l,this),this.#r.config.onSettled?.(l,this.state.error,this),l}catch(l){if(l instanceof ti){if(l.silent)return this.#s.promise;if(l.revert){if(this.state.data===void 0)throw l;return this.state.data}}throw this.#o({type:"error",error:l}),this.#r.config.onError?.(l,this),this.#r.config.onSettled?.(this.state.data,l,this),l}finally{this.scheduleGc()}}#o(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Uf(n.data,this.options),fetchMeta:e.meta??null};case"success":const s={...n,...Ga(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?s:void 0,s;case"error":const r=e.error;return{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),je.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function Uf(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Jl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ga(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ha(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,s=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var zf=class extends ec{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||qf(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#i({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Zl({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,a)=>{this.#i({type:"failed",failureCount:i,error:a})},onPause:()=>{this.#i({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const s=this.state.status==="pending",r=!this.#r.canStart();try{if(s)t();else{this.#i({type:"pending",variables:e,isPaused:r}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const a=await this.options.onMutate?.(e,n);a!==this.state.context&&this.#i({type:"pending",context:a,variables:e,isPaused:r})}const i=await this.#r.start();return await this.#n.config.onSuccess?.(i,e,this.state.context,this,n),await this.options.onSuccess?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(i,null,e,this.state.context,n),this.#i({type:"success",data:i}),i}catch(i){try{await this.#n.config.onError?.(i,e,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(i,e,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,i,e,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#i({type:"error",error:i}),i}finally{this.#n.runNext(this)}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),je.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function qf(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Gf=class extends Qs{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const s=new zf({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(s),s}add(e){this.#e.add(e);const t=as(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=as(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const s=n.indexOf(e);s!==-1&&n.splice(s,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=as(e);if(typeof t=="string"){const s=this.#t.get(t)?.find(r=>r.state.status==="pending");return!s||s===e}else return!0}runNext(e){const t=as(e);return typeof t=="string"?this.#t.get(t)?.find(s=>s!==e&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){je.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>$a(t,n))}findAll(e={}){return this.getAll().filter(t=>$a(e,t))}notify(e){je.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return je.batch(()=>Promise.all(e.map(t=>t.continue().catch(ot))))}};function as(e){return e.options.scope?.id}var Hf=class extends Qs{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const s=t.queryKey,r=t.queryHash??Bi(s,t);let i=this.get(r);return i||(i=new $f({client:e,queryKey:s,queryHash:r,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(i)),i}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){je.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Ba(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Ba(e,n)):t}notify(e){je.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){je.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){je.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Wf=class{#e;#t;#n;#r;#i;#s;#l;#a;constructor(e={}){this.#e=e.queryCache||new Hf,this.#t=e.mutationCache||new Gf,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#l=Kl.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Ls.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#l?.(),this.#l=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),s=n.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Zr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const s=n.data;return[t,s]})}setQueryData(e,t,n){const s=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(s.queryHash)?.state.data,a=Pf(t,i);if(a!==void 0)return this.#e.build(this,s).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return je.batch(()=>this.#e.findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;je.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return je.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=je.batch(()=>this.#e.findAll(e).map(r=>r.cancel(n)));return Promise.all(s).then(ot).catch(ot)}invalidateQueries(e,t={}){return je.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},s=je.batch(()=>this.#e.findAll(e).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let i=r.fetch(void 0,n);return n.throwOnError||(i=i.catch(ot)),r.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(s).then(ot)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Zr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ot).catch(ot)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ot).catch(ot)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Ls.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(jn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(s=>{Vn(e,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(jn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(s=>{Vn(e,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Bi(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===$i&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},tc=h.createContext(void 0),CT=e=>{const t=h.useContext(tc);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Kf=({client:e,children:t})=>(h.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(tc.Provider,{value:e,children:t}));/** * react-router v7.14.2 * * Copyright (c) Remix Software Inc. @@ -8,9 +8,9 @@ import{r as h,j as x,d as M,c as Gd,f as Hd}from"./vendor-react-B4AQeu28.js";imp * LICENSE.md file in the root directory of this source tree. * * @license MIT - */var Ga="popstate";function Ha(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Wf(e={}){function t(s,r){let i=r.state?.masked,{pathname:a,search:o,hash:l}=i||s.location;return ti("",{pathname:a,search:o,hash:l},r.state&&r.state.usr||null,r.state&&r.state.key||"default",i?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function n(s,r){return typeof r=="string"?r:Vn(r)}return Qf(t,n,null,e)}function Me(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function vt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Kf(){return Math.random().toString(36).substring(2,10)}function Wa(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ti(e,t,n=null,s,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Hn(t):t,state:n,key:t&&t.key||s||Kf(),unstable_mask:r}}function Vn({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Hn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let s=e.indexOf("?");s>=0&&(t.search=e.substring(s),e=e.substring(0,s)),e&&(t.pathname=e)}return t}function Qf(e,t,n,s={}){let{window:r=document.defaultView,v5Compat:i=!1}=s,a=r.history,o="POP",l=null,d=u();d==null&&(d=0,a.replaceState({...a.state,idx:d},""));function u(){return(a.state||{idx:null}).idx}function c(){o="POP";let g=u(),b=g==null?null:g-d;d=g,l&&l({action:o,location:y.location,delta:b})}function f(g,b){o="PUSH";let T=Ha(g)?g:ti(y.location,g,b);d=u()+1;let w=Wa(T,d),S=y.createHref(T.unstable_mask||T);try{a.pushState(w,"",S)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;r.location.assign(S)}i&&l&&l({action:o,location:y.location,delta:1})}function m(g,b){o="REPLACE";let T=Ha(g)?g:ti(y.location,g,b);d=u();let w=Wa(T,d),S=y.createHref(T.unstable_mask||T);a.replaceState(w,"",S),i&&l&&l({action:o,location:y.location,delta:0})}function p(g){return Xf(g)}let y={get action(){return o},get location(){return e(r,a)},listen(g){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(Ga,c),l=g,()=>{r.removeEventListener(Ga,c),l=null}},createHref(g){return t(r,g)},createURL:p,encodeLocation(g){let b=p(g);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:f,replace:m,go(g){return a.go(g)}};return y}function Xf(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Me(n,"No window.location.(origin|href) available to create URL");let s=typeof e=="string"?e:Vn(e);return s=s.replace(/ $/,"%20"),!t&&s.startsWith("//")&&(s=n+s),new URL(s,n)}function ec(e,t,n="/"){return Yf(e,t,n,!1)}function Yf(e,t,n,s){let r=typeof t=="string"?Hn(t):t,i=kt(r.pathname||"/",n);if(i==null)return null;let a=tc(e);Jf(a);let o=null;for(let l=0;o==null&&l{let u={relativePath:d===void 0?a.path||"":d,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(s)&&l)return;Me(u.relativePath.startsWith(s),`Absolute route path "${u.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(s.length)}let c=lt([s,u.relativePath]),f=n.concat(u);a.children&&a.children.length>0&&(Me(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),tc(a.children,t,f,c,l)),!(a.path==null&&!a.index)&&t.push({path:c,score:ih(c,a.index),routesMeta:f})};return e.forEach((a,o)=>{if(a.path===""||!a.path?.includes("?"))i(a,o);else for(let l of nc(a.path))i(a,o,!0,l)}),t}function nc(e){let t=e.split("/");if(t.length===0)return[];let[n,...s]=t,r=n.endsWith("?"),i=n.replace(/\?$/,"");if(s.length===0)return r?[i,""]:[i];let a=nc(s.join("/")),o=[];return o.push(...a.map(l=>l===""?i:[i,l].join("/"))),r&&o.push(...a),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function Jf(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:ah(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}var Zf=/^:[\w-]+$/,eh=3,th=2,nh=1,sh=10,rh=-2,Ka=e=>e==="*";function ih(e,t){let n=e.split("/"),s=n.length;return n.some(Ka)&&(s+=rh),t&&(s+=th),n.filter(r=>!Ka(r)).reduce((r,i)=>r+(Zf.test(i)?eh:i===""?nh:sh),s)}function ah(e,t){return e.length===t.length&&e.slice(0,-1).every((s,r)=>s===t[r])?e[e.length-1]-t[t.length-1]:0}function oh(e,t,n=!1){let{routesMeta:s}=e,r={},i="/",a=[];for(let o=0;o{if(u==="*"){let p=o[f]||"";a=i.slice(0,i.length-p.length).replace(/(.)\/+$/,"$1")}const m=o[f];return c&&!m?d[u]=void 0:d[u]=(m||"").replace(/%2F/g,"/"),d},{}),pathname:i,pathnameBase:a,pattern:e}}function lh(e,t=!1,n=!0){vt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let s=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,l,d,u)=>{if(s.push({paramName:o,isOptional:l!=null}),l){let c=u.charAt(d+a.length);return c&&c!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(s.push({paramName:"*"}),r+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":e!==""&&e!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,t?void 0:"i"),s]}function ch(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return vt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function kt(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=e.charAt(n);return s&&s!=="/"?null:e.slice(n)||"/"}var uh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function dh(e,t="/"){let{pathname:n,search:s="",hash:r=""}=typeof e=="string"?Hn(e):e,i;return n?(n=rc(n),n.startsWith("/")?i=Qa(n.substring(1),"/"):i=Qa(n,t)):i=t,{pathname:i,search:mh(s),hash:ph(r)}}function Qa(e,t){let n=Os(t).split("/");return e.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}function vr(e,t,n,s){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function fh(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function sc(e){let t=fh(e);return t.map((n,s)=>s===t.length-1?n.pathname:n.pathnameBase)}function $i(e,t,n,s=!1){let r;typeof e=="string"?r=Hn(e):(r={...e},Me(!r.pathname||!r.pathname.includes("?"),vr("?","pathname","search",r)),Me(!r.pathname||!r.pathname.includes("#"),vr("#","pathname","hash",r)),Me(!r.search||!r.search.includes("#"),vr("#","search","hash",r)));let i=e===""||r.pathname==="",a=i?"/":r.pathname,o;if(a==null)o=n;else{let c=t.length-1;if(!s&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),c-=1;r.pathname=f.join("/")}o=c>=0?t[c]:"/"}let l=dh(r,o),d=a&&a!=="/"&&a.endsWith("/"),u=(i||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(d||u)&&(l.pathname+="/"),l}var rc=e=>e.replace(/\/\/+/g,"/"),lt=e=>rc(e.join("/")),Os=e=>e.replace(/\/+$/,""),hh=e=>Os(e).replace(/^\/*/,"/"),mh=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ph=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,gh=class{constructor(e,t,n,s=!1){this.status=e,this.statusText=t||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function yh(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function bh(e){let t=e.map(n=>n.route.path).filter(Boolean);return lt(t)||"/"}var ic=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ac(e,t){let n=e;if(typeof n!="string"||!uh.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let s=n,r=!1;if(ic)try{let i=new URL(window.location.href),a=n.startsWith("//")?new URL(i.protocol+n):new URL(n),o=kt(a.pathname,t);a.origin===i.origin&&o!=null?n=o+a.search+a.hash:r=!0}catch{vt(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:r,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var oc=["POST","PUT","PATCH","DELETE"];new Set(oc);var vh=["GET",...oc];new Set(vh);var vn=h.createContext(null);vn.displayName="DataRouter";var Xs=h.createContext(null);Xs.displayName="DataRouterState";var lc=h.createContext(!1);function wh(){return h.useContext(lc)}var cc=h.createContext({isTransitioning:!1});cc.displayName="ViewTransition";var xh=h.createContext(new Map);xh.displayName="Fetchers";var Sh=h.createContext(null);Sh.displayName="Await";var et=h.createContext(null);et.displayName="Navigation";var Ys=h.createContext(null);Ys.displayName="Location";var Mt=h.createContext({outlet:null,matches:[],isDataRoute:!1});Mt.displayName="Route";var Ui=h.createContext(null);Ui.displayName="RouteError";var uc="REACT_ROUTER_ERROR",Th="REDIRECT",Ph="ROUTE_ERROR_RESPONSE";function Eh(e){if(e.startsWith(`${uc}:${Th}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function Ch(e){if(e.startsWith(`${uc}:${Ph}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new gh(t.status,t.statusText,t.data)}catch{}}function Ah(e,{relative:t}={}){Me(Wn(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:s}=h.useContext(et),{hash:r,pathname:i,search:a}=Kn(e,{relative:t}),o=i;return n!=="/"&&(o=i==="/"?n:lt([n,i])),s.createHref({pathname:o,search:a,hash:r})}function Wn(){return h.useContext(Ys)!=null}function xt(){return Me(Wn(),"useLocation() may be used only in the context of a component."),h.useContext(Ys).location}var dc="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function fc(e){h.useContext(et).static||h.useLayoutEffect(e)}function hc(){let{isDataRoute:e}=h.useContext(Mt);return e?Bh():kh()}function kh(){Me(Wn(),"useNavigate() may be used only in the context of a component.");let e=h.useContext(vn),{basename:t,navigator:n}=h.useContext(et),{matches:s}=h.useContext(Mt),{pathname:r}=xt(),i=JSON.stringify(sc(s)),a=h.useRef(!1);return fc(()=>{a.current=!0}),h.useCallback((l,d={})=>{if(vt(a.current,dc),!a.current)return;if(typeof l=="number"){n.go(l);return}let u=$i(l,JSON.parse(i),r,d.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:lt([t,u.pathname])),(d.replace?n.replace:n.push)(u,d.state,d)},[t,n,i,r,e])}h.createContext(null);function Kn(e,{relative:t}={}){let{matches:n}=h.useContext(Mt),{pathname:s}=xt(),r=JSON.stringify(sc(n));return h.useMemo(()=>$i(e,JSON.parse(r),s,t==="path"),[e,r,s,t])}function Rh(e,t,n){Me(Wn(),"useRoutes() may be used only in the context of a component.");let{navigator:s}=h.useContext(et),{matches:r}=h.useContext(Mt),i=r[r.length-1],a=i?i.params:{},o=i?i.pathname:"/",l=i?i.pathnameBase:"/",d=i&&i.route;{let g=d&&d.path||"";pc(o,!d||g.endsWith("*")||g.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${o}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + */var Wa="popstate";function Ka(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Qf(e={}){function t(s,r){let i=r.state?.masked,{pathname:a,search:o,hash:l}=i||s.location;return ni("",{pathname:a,search:o,hash:l},r.state&&r.state.usr||null,r.state&&r.state.key||"default",i?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function n(s,r){return typeof r=="string"?r:Bn(r)}return Yf(t,n,null,e)}function Re(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function yt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Xf(){return Math.random().toString(36).substring(2,10)}function Qa(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ni(e,t,n=null,s,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Wn(t):t,state:n,key:t&&t.key||s||Xf(),unstable_mask:r}}function Bn({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Wn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let s=e.indexOf("?");s>=0&&(t.search=e.substring(s),e=e.substring(0,s)),e&&(t.pathname=e)}return t}function Yf(e,t,n,s={}){let{window:r=document.defaultView,v5Compat:i=!1}=s,a=r.history,o="POP",l=null,d=u();d==null&&(d=0,a.replaceState({...a.state,idx:d},""));function u(){return(a.state||{idx:null}).idx}function c(){o="POP";let g=u(),b=g==null?null:g-d;d=g,l&&l({action:o,location:y.location,delta:b})}function f(g,b){o="PUSH";let T=Ka(g)?g:ni(y.location,g,b);d=u()+1;let w=Qa(T,d),S=y.createHref(T.unstable_mask||T);try{a.pushState(w,"",S)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;r.location.assign(S)}i&&l&&l({action:o,location:y.location,delta:1})}function m(g,b){o="REPLACE";let T=Ka(g)?g:ni(y.location,g,b);d=u();let w=Qa(T,d),S=y.createHref(T.unstable_mask||T);a.replaceState(w,"",S),i&&l&&l({action:o,location:y.location,delta:0})}function p(g){return Jf(g)}let y={get action(){return o},get location(){return e(r,a)},listen(g){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(Wa,c),l=g,()=>{r.removeEventListener(Wa,c),l=null}},createHref(g){return t(r,g)},createURL:p,encodeLocation(g){let b=p(g);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:f,replace:m,go(g){return a.go(g)}};return y}function Jf(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Re(n,"No window.location.(origin|href) available to create URL");let s=typeof e=="string"?e:Bn(e);return s=s.replace(/ $/,"%20"),!t&&s.startsWith("//")&&(s=n+s),new URL(s,n)}function nc(e,t,n="/"){return Zf(e,t,n,!1)}function Zf(e,t,n,s){let r=typeof t=="string"?Wn(t):t,i=kt(r.pathname||"/",n);if(i==null)return null;let a=sc(e);eh(a);let o=null;for(let l=0;o==null&&l{let u={relativePath:d===void 0?a.path||"":d,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(s)&&l)return;Re(u.relativePath.startsWith(s),`Absolute route path "${u.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(s.length)}let c=lt([s,u.relativePath]),f=n.concat(u);a.children&&a.children.length>0&&(Re(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),sc(a.children,t,f,c,l)),!(a.path==null&&!a.index)&&t.push({path:c,score:oh(c,a.index),routesMeta:f})};return e.forEach((a,o)=>{if(a.path===""||!a.path?.includes("?"))i(a,o);else for(let l of rc(a.path))i(a,o,!0,l)}),t}function rc(e){let t=e.split("/");if(t.length===0)return[];let[n,...s]=t,r=n.endsWith("?"),i=n.replace(/\?$/,"");if(s.length===0)return r?[i,""]:[i];let a=rc(s.join("/")),o=[];return o.push(...a.map(l=>l===""?i:[i,l].join("/"))),r&&o.push(...a),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function eh(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:lh(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}var th=/^:[\w-]+$/,nh=3,sh=2,rh=1,ih=10,ah=-2,Xa=e=>e==="*";function oh(e,t){let n=e.split("/"),s=n.length;return n.some(Xa)&&(s+=ah),t&&(s+=sh),n.filter(r=>!Xa(r)).reduce((r,i)=>r+(th.test(i)?nh:i===""?rh:ih),s)}function lh(e,t){return e.length===t.length&&e.slice(0,-1).every((s,r)=>s===t[r])?e[e.length-1]-t[t.length-1]:0}function ch(e,t,n=!1){let{routesMeta:s}=e,r={},i="/",a=[];for(let o=0;o{if(u==="*"){let p=o[f]||"";a=i.slice(0,i.length-p.length).replace(/(.)\/+$/,"$1")}const m=o[f];return c&&!m?d[u]=void 0:d[u]=(m||"").replace(/%2F/g,"/"),d},{}),pathname:i,pathnameBase:a,pattern:e}}function uh(e,t=!1,n=!0){yt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let s=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,l,d,u)=>{if(s.push({paramName:o,isOptional:l!=null}),l){let c=u.charAt(d+a.length);return c&&c!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(s.push({paramName:"*"}),r+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":e!==""&&e!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,t?void 0:"i"),s]}function dh(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return yt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function kt(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=e.charAt(n);return s&&s!=="/"?null:e.slice(n)||"/"}var fh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function hh(e,t="/"){let{pathname:n,search:s="",hash:r=""}=typeof e=="string"?Wn(e):e,i;return n?(n=ac(n),n.startsWith("/")?i=Ya(n.substring(1),"/"):i=Ya(n,t)):i=t,{pathname:i,search:gh(s),hash:yh(r)}}function Ya(e,t){let n=Os(t).split("/");return e.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}function wr(e,t,n,s){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function mh(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ic(e){let t=mh(e);return t.map((n,s)=>s===t.length-1?n.pathname:n.pathnameBase)}function Ui(e,t,n,s=!1){let r;typeof e=="string"?r=Wn(e):(r={...e},Re(!r.pathname||!r.pathname.includes("?"),wr("?","pathname","search",r)),Re(!r.pathname||!r.pathname.includes("#"),wr("#","pathname","hash",r)),Re(!r.search||!r.search.includes("#"),wr("#","search","hash",r)));let i=e===""||r.pathname==="",a=i?"/":r.pathname,o;if(a==null)o=n;else{let c=t.length-1;if(!s&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),c-=1;r.pathname=f.join("/")}o=c>=0?t[c]:"/"}let l=hh(r,o),d=a&&a!=="/"&&a.endsWith("/"),u=(i||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(d||u)&&(l.pathname+="/"),l}var ac=e=>e.replace(/\/\/+/g,"/"),lt=e=>ac(e.join("/")),Os=e=>e.replace(/\/+$/,""),ph=e=>Os(e).replace(/^\/*/,"/"),gh=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,yh=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,bh=class{constructor(e,t,n,s=!1){this.status=e,this.statusText=t||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function vh(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function wh(e){let t=e.map(n=>n.route.path).filter(Boolean);return lt(t)||"/"}var oc=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function lc(e,t){let n=e;if(typeof n!="string"||!fh.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let s=n,r=!1;if(oc)try{let i=new URL(window.location.href),a=n.startsWith("//")?new URL(i.protocol+n):new URL(n),o=kt(a.pathname,t);a.origin===i.origin&&o!=null?n=o+a.search+a.hash:r=!0}catch{yt(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:r,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var cc=["POST","PUT","PATCH","DELETE"];new Set(cc);var xh=["GET",...cc];new Set(xh);var vn=h.createContext(null);vn.displayName="DataRouter";var Xs=h.createContext(null);Xs.displayName="DataRouterState";var uc=h.createContext(!1);function Sh(){return h.useContext(uc)}var dc=h.createContext({isTransitioning:!1});dc.displayName="ViewTransition";var Th=h.createContext(new Map);Th.displayName="Fetchers";var Ph=h.createContext(null);Ph.displayName="Await";var et=h.createContext(null);et.displayName="Navigation";var Ys=h.createContext(null);Ys.displayName="Location";var Mt=h.createContext({outlet:null,matches:[],isDataRoute:!1});Mt.displayName="Route";var zi=h.createContext(null);zi.displayName="RouteError";var fc="REACT_ROUTER_ERROR",Eh="REDIRECT",Ch="ROUTE_ERROR_RESPONSE";function Ah(e){if(e.startsWith(`${fc}:${Eh}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function kh(e){if(e.startsWith(`${fc}:${Ch}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new bh(t.status,t.statusText,t.data)}catch{}}function Rh(e,{relative:t}={}){Re(Kn(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:s}=h.useContext(et),{hash:r,pathname:i,search:a}=Qn(e,{relative:t}),o=i;return n!=="/"&&(o=i==="/"?n:lt([n,i])),s.createHref({pathname:o,search:a,hash:r})}function Kn(){return h.useContext(Ys)!=null}function vt(){return Re(Kn(),"useLocation() may be used only in the context of a component."),h.useContext(Ys).location}var hc="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function mc(e){h.useContext(et).static||h.useLayoutEffect(e)}function pc(){let{isDataRoute:e}=h.useContext(Mt);return e?Uh():Mh()}function Mh(){Re(Kn(),"useNavigate() may be used only in the context of a component.");let e=h.useContext(vn),{basename:t,navigator:n}=h.useContext(et),{matches:s}=h.useContext(Mt),{pathname:r}=vt(),i=JSON.stringify(ic(s)),a=h.useRef(!1);return mc(()=>{a.current=!0}),h.useCallback((l,d={})=>{if(yt(a.current,hc),!a.current)return;if(typeof l=="number"){n.go(l);return}let u=Ui(l,JSON.parse(i),r,d.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:lt([t,u.pathname])),(d.replace?n.replace:n.push)(u,d.state,d)},[t,n,i,r,e])}h.createContext(null);function Qn(e,{relative:t}={}){let{matches:n}=h.useContext(Mt),{pathname:s}=vt(),r=JSON.stringify(ic(n));return h.useMemo(()=>Ui(e,JSON.parse(r),s,t==="path"),[e,r,s,t])}function Dh(e,t,n){Re(Kn(),"useRoutes() may be used only in the context of a component.");let{navigator:s}=h.useContext(et),{matches:r}=h.useContext(Mt),i=r[r.length-1],a=i?i.params:{},o=i?i.pathname:"/",l=i?i.pathnameBase:"/",d=i&&i.route;{let g=d&&d.path||"";yc(o,!d||g.endsWith("*")||g.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${o}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. -Please change the parent to .`)}let u=xt(),c;c=u;let f=c.pathname||"/",m=f;if(l!=="/"){let g=l.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(g.length).join("/")}let p=ec(e,{pathname:m});return vt(d||p!=null,`No routes matched location "${c.pathname}${c.search}${c.hash}" `),vt(p==null||p[p.length-1].route.element!==void 0||p[p.length-1].route.Component!==void 0||p[p.length-1].route.lazy!==void 0,`Matched leaf route at location "${c.pathname}${c.search}${c.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`),_h(p&&p.map(g=>Object.assign({},g,{params:Object.assign({},a,g.params),pathname:lt([l,s.encodeLocation?s.encodeLocation(g.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:lt([l,s.encodeLocation?s.encodeLocation(g.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathnameBase])})),r,n)}function Mh(){let e=Vh(),t=yh(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:s},i={padding:"2px 4px",backgroundColor:s},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=h.createElement(h.Fragment,null,h.createElement("p",null,"💿 Hey developer 👋"),h.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",h.createElement("code",{style:i},"ErrorBoundary")," or"," ",h.createElement("code",{style:i},"errorElement")," prop on your route.")),h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},t),n?h.createElement("pre",{style:r},n):null,a)}var Dh=h.createElement(Mh,null),mc=class extends h.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=Ch(e.digest);n&&(e=n)}let t=e!==void 0?h.createElement(Mt.Provider,{value:this.props.routeContext},h.createElement(Ui.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?h.createElement(Ih,{error:e},t):t}};mc.contextType=lc;var wr=new WeakMap;function Ih({children:e,error:t}){let{basename:n}=h.useContext(et);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let s=Eh(t.digest);if(s){let r=wr.get(t);if(r)throw r;let i=ac(s.location,n);if(ic&&!wr.get(t))if(i.isExternal||s.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const a=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:s.replace}));throw wr.set(t,a),a}return h.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function Lh({routeContext:e,match:t,children:n}){let s=h.useContext(vn);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),h.createElement(Mt.Provider,{value:e},n)}function _h(e,t=[],n){let s=n?.state;if(e==null){if(!s)return null;if(s.errors)e=s.matches;else if(t.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let r=e,i=s?.errors;if(i!=null){let u=r.findIndex(c=>c.route.id&&i?.[c.route.id]!==void 0);Me(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),r=r.slice(0,Math.min(r.length,u+1))}let a=!1,o=-1;if(n&&s){a=s.renderFallback;for(let u=0;u=0?r=r.slice(0,o+1):r=[r[0]];break}}}}let l=n?.onError,d=s&&l?(u,c)=>{l(u,{location:s.location,params:s.matches?.[0]?.params??{},unstable_pattern:bh(s.matches),errorInfo:c})}:void 0;return r.reduceRight((u,c,f)=>{let m,p=!1,y=null,g=null;s&&(m=i&&c.route.id?i[c.route.id]:void 0,y=c.route.errorElement||Dh,a&&(o<0&&f===0?(pc("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,g=null):o===f&&(p=!0,g=c.route.hydrateFallbackElement||null)));let b=t.concat(r.slice(0,f+1)),T=()=>{let w;return m?w=y:p?w=g:c.route.Component?w=h.createElement(c.route.Component,null):c.route.element?w=c.route.element:w=u,h.createElement(Lh,{match:c,routeContext:{outlet:u,matches:b,isDataRoute:s!=null},children:w})};return s&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?h.createElement(mc,{location:s.location,revalidation:s.revalidation,component:y,error:m,children:T(),routeContext:{outlet:null,matches:b,isDataRoute:!0},onError:d}):T()},null)}function zi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Oh(e){let t=h.useContext(vn);return Me(t,zi(e)),t}function Fh(e){let t=h.useContext(Xs);return Me(t,zi(e)),t}function Nh(e){let t=h.useContext(Mt);return Me(t,zi(e)),t}function qi(e){let t=Nh(e),n=t.matches[t.matches.length-1];return Me(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function jh(){return qi("useRouteId")}function Vh(){let e=h.useContext(Ui),t=Fh("useRouteError"),n=qi("useRouteError");return e!==void 0?e:t.errors?.[n]}function Bh(){let{router:e}=Oh("useNavigate"),t=qi("useNavigate"),n=h.useRef(!1);return fc(()=>{n.current=!0}),h.useCallback(async(r,i={})=>{vt(n.current,dc),n.current&&(typeof r=="number"?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Xa={};function pc(e,t,n){!t&&!Xa[e]&&(Xa[e]=!0,vt(!1,n))}h.memo($h);function $h({routes:e,future:t,state:n,isStatic:s,onError:r}){return Rh(e,void 0,{state:n,isStatic:s,onError:r})}function Uh({basename:e="/",children:t=null,location:n,navigationType:s="POP",navigator:r,static:i=!1,unstable_useTransitions:a}){Me(!Wn(),"You cannot render a inside another . You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),l=h.useMemo(()=>({basename:o,navigator:r,static:i,unstable_useTransitions:a,future:{}}),[o,r,i,a]);typeof n=="string"&&(n=Hn(n));let{pathname:d="/",search:u="",hash:c="",state:f=null,key:m="default",unstable_mask:p}=n,y=h.useMemo(()=>{let g=kt(d,o);return g==null?null:{location:{pathname:g,search:u,hash:c,state:f,key:m,unstable_mask:p},navigationType:s}},[o,d,u,c,f,m,s,p]);return vt(y!=null,` is not able to match the URL "${d}${u}${c}" because it does not start with the basename, so the won't render anything.`),y==null?null:h.createElement(et.Provider,{value:l},h.createElement(Ys.Provider,{children:t,value:y}))}var ws="get",xs="application/x-www-form-urlencoded";function Js(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function zh(e){return Js(e)&&e.tagName.toLowerCase()==="button"}function qh(e){return Js(e)&&e.tagName.toLowerCase()==="form"}function Gh(e){return Js(e)&&e.tagName.toLowerCase()==="input"}function Hh(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Wh(e,t){return e.button===0&&(!t||t==="_self")&&!Hh(e)}var os=null;function Kh(){if(os===null)try{new FormData(document.createElement("form"),0),os=!1}catch{os=!0}return os}var Qh=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function xr(e){return e!=null&&!Qh.has(e)?(vt(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${xs}"`),null):e}function Xh(e,t){let n,s,r,i,a;if(qh(e)){let o=e.getAttribute("action");s=o?kt(o,t):null,n=e.getAttribute("method")||ws,r=xr(e.getAttribute("enctype"))||xs,i=new FormData(e)}else if(zh(e)||Gh(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a