',databases:'',cloud_development:'',web_frameworks_technologies:'',dev_ides:'',large_language_models:'',operating_systems:''},o=document.getElementById("modal-container"),s=document.getElementById("modal-backdrop"),c=document.getElementById("modal-panel"),i=document.getElementById("modal-title"),p=document.getElementById("modal-description"),l=document.getElementById("modal-close-btn"),g=()=>{s.style.opacity="0",c.style.opacity="0",c.style.transform="scale(0.95)",setTimeout(()=>{o.classList.add("hidden"),s.classList.add("hidden"),c.classList.add("hidden")},300)};l.addEventListener("click",g),s.addEventListener("click",g),window.addEventListener("keydown",e=>{"Escape"!==e.key||o.classList.contains("hidden")||g()}),e.innerHTML="",Object.keys(n).forEach((a,t)=>{const o=n[a],s=document.createElement("div");s.className="reveal glass-card rounded-2xl shadow-lg overflow-hidden survey-section",s.style.transitionDelay=100*t+"ms";const c=new Intl.NumberFormat("en-US").format(o.responses.count),i=(o.technologies||o.operating_systems||[]).slice(0,5).map(e=>`${e.name}`).join("");s.innerHTML=`\n
\n
\n
\n ${r[a]||""}\n
\n
${o.title}
\n
\n \n
\n “${o.highlight}”
\n
\n\n
\n
調查問題:
\n
${o.question}
\n
\n \n
\n 總回應數: ${c}\n |\n 回應率: ${o.responses.percentage}%\n
\n \n
\n \n
\n\n
\n
\n `,e.appendChild(s)}),(()=>{Object.values(a).forEach(e=>e.destroy());const e="#c9d1d9",t="rgba(255, 255, 255, 0.1)";Object.keys(n).forEach(r=>{const o=n[r];document.getElementById(`chart-${r}`)&&(o.technologies?((n,r)=>{const o=document.getElementById(`chart-${n}`).getContext("2d"),s=r.technologies.slice(0,15);a[n]=new Chart(o,{type:"bar",data:{labels:s.map(e=>e.name),datasets:[{label:"使用率 (%)",data:s.map(e=>e.percentage),backgroundColor:"rgba(34, 211, 238, 0.4)",borderColor:"rgba(34, 211, 238, 1)",borderWidth:1,borderRadius:4}]},options:{indexAxis:"y",responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},title:{display:!0,text:"熱門技術(前 15 名)",padding:{bottom:20},font:{size:16,weight:"700"},color:e}},scales:{x:{beginAtZero:!0,title:{display:!0,text:"百分比 (%)",color:e},ticks:{color:e},grid:{color:t}},y:{ticks:{color:e},grid:{color:"transparent"}}}}})})(r,o):o.operating_systems&&((n,r)=>{const o=document.getElementById(`chart-${n}`).getContext("2d"),s=r.operating_systems;a[n]=new Chart(o,{type:"bar",data:{labels:s.map(e=>e.name),datasets:[{label:"個人使用",data:s.map(e=>e.personal_use),backgroundColor:"rgba(34, 211, 238, 0.4)",borderColor:"rgba(34, 211, 238, 1)",borderWidth:1,borderRadius:4},{label:"專業使用",data:s.map(e=>e.professional_use),backgroundColor:"rgba(168, 85, 247, 0.4)",borderColor:"rgba(168, 85, 247, 1)",borderWidth:1,borderRadius:4}]},options:{indexAxis:"y",responsive:!0,maintainAspectRatio:!1,plugins:{title:{display:!0,text:"作業系統使用情況",padding:{bottom:20},font:{size:16,weight:"700"},color:e},legend:{labels:{color:e}}},scales:{x:{beginAtZero:!0,title:{display:!0,text:"百分比 (%)",color:e},ticks:{color:e},grid:{color:t}},y:{ticks:{color:e},grid:{color:"transparent"}}}}})})(r,o))})})(),e.addEventListener("click",e=>{e.target.matches(".interactive-keyword")&&(e=>{const n=t[e]||t.default;i.textContent=e,p.innerHTML=n,o.classList.remove("hidden"),s.classList.remove("hidden"),requestAnimationFrame(()=>{s.style.opacity="1",c.classList.remove("hidden"),c.style.opacity="1",c.style.transform="scale(1)"})})(e.target.dataset.keyword)});const m=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(e.target.classList.add("visible"),m.unobserve(e.target))})},{threshold:.1});document.querySelectorAll(".reveal").forEach(e=>{m.observe(e)})})