import"./hoisted.yFz1BYXO.js";const d=[{id:1,text:"Do you control when the worker works?",detail:"You set the worker's schedule, hours, or specific times they must be available."},{id:2,text:"Do you control how the work is done?",detail:"You dictate the methods, processes, or procedures the worker must follow — not just the end result."},{id:3,text:"Do you provide tools or equipment?",detail:"You supply the worker with computers, software, vehicles, or other tools needed to perform the work."},{id:4,text:"Does the worker work exclusively for you?",detail:"The worker performs services only for your company and does not have other clients."},{id:5,text:"Do you provide training to the worker?",detail:"You train the worker on how to do the job, rather than hiring someone who already has the expertise."},{id:6,text:"Is the worker integrated into your business operations?",detail:"The worker uses a company email, attends staff meetings, or is presented to clients as an employee."},{id:7,text:"Do you set the pay rate?",detail:"You determine compensation rather than the worker quoting a rate for the project or service."},{id:8,text:"Can you terminate the worker without cause?",detail:"You can end the relationship at any time without a breach of contract, similar to at-will employment."},{id:9,text:"Does the worker perform key business functions?",detail:"The worker's tasks are central to your core business rather than auxiliary or specialized services."},{id:10,text:"Do you restrict the worker from working for others?",detail:"You have a non-compete or exclusivity clause, or otherwise discourage the worker from taking other clients."}];function u(){const o=document.getElementById("questions-container");o&&(o.innerHTML=d.map((e,t)=>`
${e.id}

${e.text}

${e.detail}

`).join(""))}function h(){let o=0;const e=[];return d.forEach(t=>{const r=document.querySelector(`input[name="q${t.id}"]:checked`);r&&r.value==="yes"&&(o++,e.push(t.text))}),{yesCount:o,flagged:e}}function p(o,e){const t=document.getElementById("results"),r=document.getElementById("result-card"),n=document.getElementById("result-icon"),s=document.getElementById("result-title"),a=document.getElementById("result-score"),i=document.getElementById("result-description"),l=document.getElementById("result-details"),c=document.getElementById("quiz-form");!t||!r||!n||!s||!a||!i||!l||!c||(c.classList.add("hidden"),t.classList.remove("hidden"),o<=2?(r.className="rounded-xl p-8 border-2 text-center bg-green-50 border-green-300",n.textContent="✅",s.textContent="Low Risk",s.className="text-2xl font-bold mb-3 text-green-800",a.textContent=`You answered "Yes" to ${o} of 10 questions.`,a.className="text-sm font-medium mb-4 text-green-700",i.textContent="Based on your answers, your contractor relationships appear to have a low risk of misclassification. You seem to be treating your workers as independent contractors rather than employees. However, classification rules vary by state and can change. Periodic reviews are still recommended."):o<=5?(r.className="rounded-xl p-8 border-2 text-center bg-amber-50 border-amber-300",n.textContent="⚠️",s.textContent="Medium Risk",s.className="text-2xl font-bold mb-3 text-amber-800",a.textContent=`You answered "Yes" to ${o} of 10 questions.`,a.className="text-sm font-medium mb-4 text-amber-700",i.textContent="Your answers suggest some characteristics of an employer-employee relationship. This puts you in a gray area where the IRS, DOL, or state agencies could challenge your classification. You should review these relationships with a compliance professional before an audit occurs."):(r.className="rounded-xl p-8 border-2 text-center bg-red-50 border-red-300",n.textContent="🚨",s.textContent="High Risk",s.className="text-2xl font-bold mb-3 text-red-800",a.textContent=`You answered "Yes" to ${o} of 10 questions.`,a.className="text-sm font-medium mb-4 text-red-700",i.textContent="Your answers indicate a high likelihood that one or more of your contractors may be legally classified as employees. This exposes your business to back taxes, penalties, and potential lawsuits. Immediate professional review is strongly recommended."),e.length>0&&(l.innerHTML='

Areas of concern:

'+e.map(m=>`
${m}
`).join("")),t.scrollIntoView({behavior:"smooth",block:"start"}))}document.addEventListener("DOMContentLoaded",()=>{u(),document.getElementById("quiz-form")?.addEventListener("submit",e=>{e.preventDefault();let t=!0;if(d.forEach(s=>{document.querySelector(`input[name="q${s.id}"]:checked`)||(t=!1)}),!t){alert("Please answer all 10 questions before submitting.");return}const{yesCount:r,flagged:n}=h();p(r,n)}),document.getElementById("retake-btn")?.addEventListener("click",()=>{const e=document.getElementById("quiz-form"),t=document.getElementById("results");e&&t&&(e.classList.remove("hidden"),t.classList.add("hidden"),e.querySelectorAll('input[type="radio"]').forEach(n=>n.checked=!1),u(),window.scrollTo({top:0,behavior:"smooth"}))})});