1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,11241,51757,e=>{"use strict";var t=e.i(56420);let r=(0,t.default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,r],11241);let o=(0,t.default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",0,o],51757)},35077,e=>{"use strict";var t=e.i(43476),r=e.i(71645),o=e.i(53145),a=e.i(11241),s=e.i(51757),l=e.i(22016);let n={Never:1,No:1,"Not at all":1,Rarely:1,"No issues":1,"No changes":1,Occasionally:2,Sometimes:2,"A little":2,Maybe:2,"Slight changes":2,Often:3,Frequently:3,"Most days":3,"Quite a bit":3,Probably:3,Regularly:3,"Noticeable change":3,"Nearly every day":4,Constantly:4,"Every day":4,"Every night":4,Always:4,"Very often":4,"Almost always":4,Yes:4,"Yes, completely":4,"Extreme change":4,Daily:4,"Most nights":4},i=[{id:1,text:'How often have you felt emotionally overwhelmed or "not yourself" lately?',options:["Never","Occasionally","More than half the days","Nearly every day"]},{id:2,text:"How often do you feel anxious or on edge, even when there's no clear reason?",options:["Never","Sometimes","Often","Constantly"]},{id:3,text:"Are you finding it hard to enjoy things you used to enjoy?",options:["No","A little","Quite a bit","Yes, completely"]},{id:4,text:"Have you had trouble falling asleep, staying asleep, or waking too early?",options:["No issues","Occasionally","Most nights","Every night"]},{id:5,text:"How often do you feel tired or drained, even after a full night's sleep?",options:["Rarely","Sometimes","Most days","Every day"]},{id:6,text:"Are you experiencing difficulty concentrating or staying focused?",options:["Not at all","Occasionally","Often","Very often"]},{id:7,text:"Do you experience racing thoughts or an inability to calm your mind?",options:["No","Sometimes","Regularly","Constantly"]},{id:8,text:"How often do you feel irritable, agitated, or unusually impatient?",options:["Rarely","Occasionally","Often","Very often"]},{id:9,text:"Have you been withdrawing from social situations or avoiding people?",options:["No","A little","Frequently","Almost always"]},{id:10,text:"Do you feel overwhelmed by everyday tasks or decisions?",options:["Never","Occasionally","Most days","Daily"]},{id:11,text:"Have you experienced any changes in appetite?",options:["No changes","Slight changes","Noticeable change","Extreme change"]},{id:12,text:'Are you having thoughts like "What\'s the point?" or feeling hopeless?',options:["Never","Occasionally","Frequently","Constantly"]},{id:13,text:"Do you feel physically tense, like your body won't relax?",options:["Not at all","Occasionally","Often","Always"]},{id:14,text:"Are you feeling emotionally numb or disconnected from your surroundings?",options:["Not at all","Sometimes","Often","Constantly"]},{id:15,text:"Would it feel helpful just to talk to a doctor and understand what's going on?",options:["No","Maybe","Probably","Yes"]}],d=i.length+1;function c({current:e,total:r}){return(0,t.jsx)("div",{className:"flex gap-1.5 mb-8",children:Array.from({length:r}).map((r,o)=>(0,t.jsx)("div",{className:`h-1.5 flex-1 rounded-full transition-colors duration-300 ${o<e?"bg-[var(--color-primary)]":"bg-gray-300"}`},o))})}function m({label:e,checked:r,onChange:o}){return(0,t.jsxs)("button",{type:"button",onClick:o,className:`flex items-center gap-3 w-full text-left px-4 py-3.5 rounded-xl border-2 transition-all duration-150 cursor-pointer ${r?"bg-[var(--color-primary-light)] border-[var(--color-primary)]":"bg-white border-transparent hover:border-gray-200"}`,children:[(0,t.jsx)("span",{className:`w-5 h-5 shrink-0 rounded border-2 flex items-center justify-center transition-colors ${r?"bg-[var(--color-primary)] border-[var(--color-primary)]":"border-gray-400 bg-white"}`,children:r&&(0,t.jsx)("svg",{className:"w-3 h-3 text-white",viewBox:"0 0 12 12",fill:"none",children:(0,t.jsx)("path",{d:"M2 6l3 3 5-5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,t.jsx)("span",{className:"text-[var(--color-dark)] font-medium text-sm sm:text-base",children:e})]})}function x(e){let t=Object.values(e).reduce((e,t)=>
1e+(n[t]??0),0),r=Math.round(t/60*100);return{total:t,percentage:r}}e.s(["GeneralQuiz",0,function(){let[e,n]=(0,r.useState)(0),{register:u,handleSubmit:p,getValues:y,formState:{errors:h}}=(0,o.useForm)({mode:"onTouched"}),[b,g]=(0,r.useState)({}),[f,v]=(0,r.useState)(!1),N=0===e,j=e===d,w=N||j?null:i[e-1];if(j){let{total:e,percentage:r}=x(b),o=r>=90?{label:"Extremely Severe",badge:"bg-red-100 text-red-800",bar:"bg-red-500",description:"Very significant symptoms detected. We strongly recommend speaking with a licensed physician as soon as possible."}:r>=75?{label:"Severe",badge:"bg-red-100 text-red-700",bar:"bg-red-400",description:"Significant symptoms detected. Professional support is strongly recommended."}:r>=50?{label:"Moderate",badge:"bg-orange-100 text-orange-700",bar:"bg-orange-400",description:"Noticeable symptoms present. Speaking with a professional could help."}:r>=25?{label:"Mild",badge:"bg-yellow-100 text-yellow-700",bar:"bg-yellow-400",description:"Some symptoms present. Consider reaching out for support."}:{label:"Minimal",badge:"bg-green-100 text-green-700",bar:"bg-green-400",description:"Few or no significant symptoms detected at this time."};return(0,t.jsx)("div",{className:"flex items-center justify-center min-h-[calc(100vh-72px)] px-4 py-12",children:(0,t.jsxs)("div",{className:"bg-[var(--color-primary-light)] rounded-3xl p-8 sm:p-12 max-w-xl w-full text-center shadow-sm",children:[(0,t.jsx)("div",{className:"flex justify-center mb-6",children:(0,t.jsx)(s.CheckCircle2,{className:"w-16 h-16 text-[var(--color-primary)]"})}),(0,t.jsx)("h2",{className:"text-2xl sm:text-3xl font-bold text-[var(--color-primary-dark)] mb-6",children:"Your results are on the way!"}),(0,t.jsxs)("div",{className:"bg-white rounded-2xl px-6 py-5 mb-6 shadow-sm",children:[(0,t.jsx)("p",{className:"text-sm font-semibold text-[var(--color-muted)] uppercase tracking-wide mb-2",children:"Your Score"}),(0,t.jsxs)("p",{className:"text-5xl font-bold text-[var(--color-primary)] mb-1",children:[r,"%"]}),(0,t.jsx)("div",{className:"mt-4 h-2.5 w-full bg-gray-200 rounded-full overflow-hidden",children:(0,t.jsx)("div",{className:`h-full ${o.bar} rounded-full transition-all duration-700`,style:{width:`${r}%`}})}),(0,t.jsxs)("div",{className:"mt-4 pt-4 border-t border-gray-100",children:[(0,t.jsx)("span",{className:`inline-block px-4 py-1.5 rounded-full text-sm font-semibold ${o.badge}`,children:o.label}),(0,t.jsx)("p",{className:"mt-2 text-xs text-[var(--color-muted)]",children:o.description})]})]}),(0,t.jsxs)("p",{className:"text-[var(--color-muted)] mb-2",children:["Check your inbox at ",(0,t.jsx)("span",{className:"font-semibold text-[var(--color-dark)]",children:y("email")}),"."]}),(0,t.jsx)("p",{className:"text-[var(--color-muted)] mb-8",children:"Your quiz is just the starting point. Our team will review your responses and help you find the right support."}),(0,t.jsx)(l.default,{href:"https://innovacare.tech/easecare/patient/book-appointments/select-user?guest=true",className:"inline-block bg-[var(--color-primary)] hover:bg-[var(--color-primary-dark)] text-white font-semibold px-8 py-3 rounded-full transition-colors",children:"Book a Free Consultation"})]})})}return(0,t.jsx)("div",{className:"flex items-center justify-center min-h-[calc(100vh-72px)] px-4 py-12",children:(0,t.jsxs)("div",{className:"bg-[var(--color-primary-light)] rounded-3xl p-8 sm:p-10 max-w-2xl w-full shadow-sm",children:[(0,t.jsx)(c,{current:e+1,total:d}),N?(0,t.jsxs)("form",{onSubmit:p(()=>n(1)),children:[(0,t.jsx)("h1",{className:"text-xl sm:text-2xl font-bold text-[var(--color-primary-dark)] text-center mb-8",children:"Please fill in your personal information to get started"}),(0,t.jsxs)("div",{className:"space-y-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-semibold text-[var(--color-dark)] mb-1.5",children:["Full Name ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("input",{type:"text",...u("name",{required:"Full name is required.",minLength:{value:2,message:"Name must be at least 2 characters."}}),className:`w-full bg-[#e8f4f8] rounded-xl px-4 py-3 text-[var(--color-dark)] placeholder-gray-400 outline-none focus:ring-2 focus:ring-[var(--color-primary)] border ${h.name?"border-red-400":"border-transparent"}`,placeholder:"Your full name"}),h.name&&(0,t.jsx)("p",{className:"mt-1 text-xs text-red-500",children:h.name.message})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-semibold text-[var(--color-dark)] mb-1.5",children:["Email Address ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("input",{type:"email",...u("email",{required:"Email address is required.",pattern:{value:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,message:"Please enter a valid email."}}),className:`w-full bg-[#e8f4f8] rounded-xl px-4 py-3 text-[var(--color-dark)] placeholder-gray-400 outline-none focus:ring-2 focus:ring-[var(--color-primary)] border ${h.email?"border-red-400":"border-transparent"}`,placeholder:"[email protected]"}),h.email&&(0,t.jsx)("p",{className:"mt-1 text-xs text-red-500",children:h.email.message})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-sm font-semibold text-[var(--color-dark)] mb-1.5",children:["Phone ",(0,t.jsx)("span",{className:"text-gray-400 font-normal",children:"(optional)"})]}),(0,t.jsx)("input",{type:"tel",...u("phone",{pattern:{value:/^[\d\s\-()+]{7,15}$/,message:"Please enter a valid phone number."}}),className:`w-full bg-[#e8f4f8] rounded-xl px-4 py-3 text-[var(--color-dark)] placeholder-gray-400 outline-none focus:ring-2 focus:ring-[var(--color-primary)] border ${h.phone?"border-red-400":"border-transparent"}`,placeholder:"(555) 000-0000"}),h.phone&&(0,t.jsx)("p",{className:"mt-1 text-xs text-red-500",children:h.phone.message})]})]}),(0,t.jsx)("div",{className:"flex justify-center mt-8",children:(0,t.jsx)("button",{type:"submit",className:"bg-[var(--color-primary)] hover:bg-[var(--color-primary-dark)] text-white font-semibold px-10 py-3 rounded-full transition-colors cursor-pointer",children:"Next"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"mb-3 text-center",children:(0,t.jsxs)("span",{className:"inline-flex rounded-full border border-gray-200 bg-white px-3 py-1 text-[11px] font-semibold uppercase tracking-[0.16em] text-[var(--color-muted)]",children:["Question ",w.id," of ",i.length]})}),(0,t.jsxs)("h2",{className:"text-xl sm:text-2xl font-bold text-[var(--color-primary-dark)] text-center mb-7",children:[w.text," ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,t.jsx)("div",{className:"space-y-3",children:w.options.map(e=>(0,t.jsx)(m,{label:e,checked:b[w.id]===e,onChange:()=>{g(t=>({...t,[w.id]:e})),v(!1)}},e))}),(0,t.jsxs)("div",{className:"flex items-center justify-between mt-8",children:[(0,t.jsxs)("button",{onClick:function(){v(!1),n(e=>e-1)},className:"flex items-center gap-2 bg-gray-200 hover:bg-gray-300 text-[var(--color-dark)] font-semibold px-6 py-3 rounded-full transition-colors cursor-pointer",children:[(0,t.jsx)(a.ArrowLeft,{className:"w-4 h-4"}),"Previous question"]}),(0,t.jsx)("button",{onClick:function(){if(!w)return;if(!b[w.id])return void v(!0);v(!1);let t=e+1;if(n(t),t===d){let{total:e,percentage:t}=x(b);fetch("/api/quiz-submissions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({quizType:"general",name:y("name"),email:y("email"),phone:y("phone"),answers:b,totalScore:e,maxScore:60,percentage:t})}).catch(e=>console.error("Failed to save quiz submission:",e))}},className:"bg-[var(--color-primary)] hover:bg-[var(--color-primary-dark)] text-white font-semibold px-10 py-3 rounded-full transition-colors cursor-pointer",children:"Next"})]}),f&&(0,t.jsx)("p",{className:"mt-3 text-sm text-red-500",children:"Please select an option to continue."})]})]})})}])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.