(function(){
  // v3.0.4.2.17: legacy notification poll disabled to prevent duplicate popups and duplicate AJAX polling.
  // Kept only v3 chart rendering support.
  function renderCharts(){document.querySelectorAll('[data-mj-v3-chart]').forEach(function(card){if(card.dataset.done)return;card.dataset.done='1';var data=[];try{data=JSON.parse(card.getAttribute('data-mj-v3-chart')||'[]');}catch(e){}if(!data.length){card.innerHTML+='<p class="text-muted">No chart data yet.</p>';return;}var max=Math.max.apply(null,data.map(function(x){return Number(x.value)||0;}));if(max<=0)max=1;var html='<div class="mj-v3-bars">';data.forEach(function(x){var pct=Math.max(2,(Number(x.value)||0)/max*100);html+='<div class="mj-v3-bar-row"><b>'+String(x.label||'')+'</b><div class="mj-v3-bar-track"><div class="mj-v3-bar-fill" style="width:'+pct+'%"></div></div><span>'+String(x.value||0)+'</span></div>';});card.innerHTML+=html+'</div>';});}
  document.addEventListener('DOMContentLoaded',renderCharts);
})();
