1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8043],{38043:(e,t,r)=>{r.d(t,{default:()=>c});var s=r(55698),o=r(83610);let n=[{number:1,text:"How often do you have trouble wrapping up the final details of a project, once the challenging parts have been done?",part:"A"},{number:2,text:"How often do you have difficulty getting things in order when you have to do a task that requires organization?",part:"A"},{number:3,text:"How often do you have problems remembering appointments or obligations?",part:"A"},{number:4,text:"When you have a task that requires a lot of thought, how often do you avoid or delay getting started?",part:"A"},{number:5,text:"How often do you fidget or squirm with your hands or feet when you have to sit down for a long time?",part:"A"},{number:6,text:"How often do you feel overly active and compelled to do things, like you were driven by a motor?",part:"A"},{number:7,text:"How often do you make careless mistakes when you have to work on a boring or difficult project?",part:"B"},{number:8,text:"How often do you have difficulty keeping your attention when you are doing boring or repetitive work?",part:"B"},{number:9,text:"How often do you have difficulty concentrating on what people say to you, even when they are speaking to you directly?",part:"B"},{number:10,text:"How often do you misplace or have difficulty finding things at home or at work?",part:"B"},{number:11,text:"How often are you distracted by activity or noise around you?",part:"B"},{number:12,text:"How often do you leave your seat in meetings or other situations in which you are expected to remain seated?",part:"B"},{number:13,text:"How often do you feel restless or fidgety?",part:"B"},{number:14,text:"How often do you have difficulty unwinding and relaxing when you have time to yourself?",part:"B"},{number:15,text:"How often do you find yourself talking too much when you are in social situations?",part:"B"},{number:16,text:"When you're in a conversation, how often do you find yourself finishing the sentences of the people you are talking to, before they can finish them themselves?",part:"B"},{number:17,text:"How often do you have difficulty waiting your turn in situations when turn taking is required?",part:"B"},{number:18,text:"How often do you interrupt others when they are busy?",part:"B"}],a=["Never","Rarely","Sometimes","Often","Very Often"];function i(e){switch(e){case"Never":default:return 0;case"Rarely":return 1;case"Sometimes":return 2;case"Often":return 3;case"Very Often":return 4}}var l=r(74728);let d=e=>{let{isOpen:t,onClose:r,results:n}=e;if((0,o.useEffect)(()=>{let e=e=>{"Escape"===e.key&&t&&r()};return t&&(document.addEventListener("keydown",e),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",e),document.body.style.overflow="unset"}},[t,r]),!t||!n)return null;let a="Positive ADHD Screen"===n.screen_result;return(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm transition-opacity duration-300",onClick:r,"aria-hidden":"true"}),(0,s.jsxs)("div",{className:"relative bg-white rounded-xl shadow-2xl max-w-2xl w-full max-h-[90vh] overflow-y-auto animate-in fade-in zoom-in duration-300",children:[(0,s.jsx)("div",{className:"p-6 border-b ".concat(a?"bg-orange/30":"bg-green/30"),children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:"Assessment Results"}),(0,s.jsx)("button",{onClick:r,className:"text-gray-500 hover:text-gray-700 transition-colors p-1","aria-label":"Close modal",children:(0,s.jsx)("svg",{className:"w-6 h-6",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,s.jsx)("path",{d:"M6 18L18 6M6 6l12 12"})})})]})}),(0,s.jsxs)("div",{className:"p-6 space-y-6",children:[(0,s.jsxs)("div",{className:"p-4 rounded-lg border-2 ".concat(a?"bg-orange/20 border-orange":"bg-green/20 border-green"),children:[(0,s.jsx)("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:"Screening Result"}),(0,s.jsx)("p",{className:"text-xl font-bold ".concat(a?"text-orange-700":"text-green-700"),children:n.screen_result})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{className:"p-4 bg-blue/20 rounded-lg border border-blue",children:[(0,s.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-1",children:"Part A Positive Responses"}),(0,s.jsxs)("p",{className:"text-3xl font-bold text-primary",children:[n.partA_positive_count," ",(0,s.jsx)("span",{className:"text-lg text-gray-600",children:"out of 6"})]}),(0,s.jsx)("p",{className:"text-xs text-gray-600 mt-2",children:"4+ indicates positive screen"})]}),(0,s.jsxs)("div",{className:"p-4 bg-accent/40 rounded-lg border border-accent",children:[(0,s.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-1",children:"Total Score"}),(0,s.jsxs)("p",{className:"text-3xl font-bold text-primary",children:[n.total_score," ",(0,s.jsx)("span",{className:"text-lg text-gray-600",children:"out of 72"})]}),(0,s.jsx)("p",{className:"text-xs text-gray-600 mt-2",children:"Sum of all responses"})]})]}),(0,s.jsxs)("div",{className:"p-4 bg-gray-50 rounded-lg border border-gray-200",children:[(0,s.jsx)("h4",{className:"font-semibold text-gray-900 mb-2",children:"What does this mean?"}),a?(0,s.jsxs)("div",{className:"space-y-2 text-sm text-gray-700",children:[(0,s.jsx)("p",{children:"Your responses suggest that you may have symptoms consistent with Adult ADHD. The ASRS is a screening tool designed to identify individuals who may benefit from further evaluation."}),(0,s.jsx)("p",{className:"font-medium",children:"This is not a diagnosis. We recommend consulting with a healthcare professional for a comprehensive evaluation."})]}):(0,s.jsx)("div",{className:"space-y-2 text-sm text-gray-700",children:(0,s.jsx)("p",{children:"Your responses suggest that your symptoms are not consistent with Adult ADHD at this time. However, if you continue to experience difficulties with attention, organization, or hyperactivity, consider speaking with a healthcare professional."})})]}),(0,s.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,s.jsxs)("p",{className:"text-xs text-gray-700",children:[(0,s.jsx)("strong",{children:"Important:"})," This screening tool is not a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition."]})})]}),(0,s.jsx)("div",{className:"p-6 border-t bg-gray-50 flex justify-end gap-3",children:(0,s.jsx)(l.default,{onClick:r,variant:"primary",size:"md",children:"Close"})})]})]})},c=()=>{let[e,t]=(0,o.useState)(Array(18).fill(null)),[r,c]=(0,o.useState)(""),[u,m]=(0,o.useState)(!1),[h,x]=(0,o.useState)(null),y=(0,o.useRef)(null),f=(s,o)=>{let n=[...e];n[s]=o,t(n),r&&c("")},p=n.filter(e=>"A"===e.part),g=n.filter(e=>"B"===e.part),b=(t,o)=>{let n=null===e[o]&&r;return(0,s.jsxs)("tr",{id:"question-".concat(t.number),className:"border-b border-gray-200 hover:bg-gray-50 transition-colors ".concat(n?"bg-red-50":""),children:[(0,s.jsxs)("td",{className:"py-4 px-4 text-sm text-gray-800 font-medium",children:[(0,s.jsxs)("span",{className:"text-gray-600 mr-2",children:[t.number,"."]}),t.text]}),a.map(r=>(0,s.jsx)("td",{className:"py-4 px-2 text-center",children:(0,s.jsxs)("label",{className:"inline-flex items-center justify-center cursor-pointer",children:[(0,s.jsx)("input",{type:"radio",name:"question-".concat(t.number),value:r,checked:e[o]===r,onChange:()=>f(o,r),className:"w-5 h-5 text-primary focus:ring-primary focus:ring-2 cursor-pointer"}),(0,s.jsx)("span",{className:"sr-only",children:r})]})},r))]},t.number)},v=()=>(0,s.jsx)("thead",{className:"bg-gray-100 sticky top-0 z-10",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"py-3 px-4 text-left text-sm font-semibold text-gray-700",children:"Question"}),a.map(e=>(0,s.jsx)("th",{className:"py-3 px-2 text-center text-sm font-semibold text-gray-700 min-w-[80px]",children:e},e))]})});return(0,s.jsxs)("div",{ref:y,className:"max-w-7xl mx-auto px-4 py-8",children:[(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow-md",children:[(0,s.jsxs)("div",{className:"p-6 border-b border-gray-200",children:[(0,s.jsx)("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Adult ADHD Self-Report Scale (ASRS v1.1)"}),(0,s.jsx)("p",{className:"text-gray-600",children:"Please answer all questions by selecting the option that best describes how you have felt and conducted yourself over the past 6 months."})]}),(0,s.jsxs)("form",{onSubmit:t=>{t.preventDefault();let r=e.findIndex(e=>null===e);if(-1!==r){c("Please answer all questions before scoring");let e=document.getElementById("question-".concat(r+1));e&&e.scrollIntoView({behavior:"smooth",block:"center"});return}try{let t=function(e){if(18!==e.length)throw Error("All 18 questions must be answered");if(e.some(e=>null===e))throw Error("All questions must be answered");let t=0,r=0;for(let s=0;s<18;s++){let o=e[s];null!==o&&(r+=i(o),s<6&&function(e,t){let r=i(t);return e>=1&&e<=3?r>=2:e>=4&&e<=6&&r>=3}(s+1,o)&&(t+=1))}let s=t>=4?"Positive ADHD Screen":"Negative ADHD Screen";return{partA_positive_count:t,screen_result:s,total_score:r}}(e);x(t),m(!0)}catch(e){console.error("Error calculating score:",e),c("An error occurred while calculating your score. Please try again.")}},children:[(0,s.jsxs)("div",{className:"p-6 border-b border-gray-200",children:[(0,s.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Part A"}),(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full",children:[v(),(0,s.jsx)("tbody",{children:p.map((e,t)=>b(e,t))})]})})]}),(0,s.jsxs)("div",{className:"p-6 border-b border-gray-200",children:[(0,s.jsx)("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Part B"}),(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full",children:[v(),(0,s.jsx)("tbody",{children:g.map((e,t)=>b(e,t+6))})]})})]}),r&&(0,s.jsx)("div",{className:"p-4 mx-6 mt-6 bg-red-50 border border-red-200 rounded-lg",children:(0,s.jsx)("p",{className:"text-red-700 text-sm font-medium",children:r})}),(0,s.jsx)("div",{className:"p-6 bg-gray-50 flex justify-center",children:(0,s.jsx)(l.default,{type:"submit",variant:"primary",size:"lg",className:"min-w-[200px]",children:"Score my Answers"})})]})]}),(0,s.jsx)(d,{isOpen:u,onClose:()=>m(!1),results:h})]})}}}]);
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.