/* Scoped to: ss-dental-services-stats */
(function() {
  'use strict';
  var componentRoots = document.querySelectorAll('[data-component-slug="ss-dental-services-stats"]');
  componentRoots.forEach(function(componentRoot) {
    // Helper to query within component, with fallback to document for sibling elements
    var $ = function(sel) { 
      return componentRoot.querySelector(sel) || document.querySelector('[data-component-slug="ss-dental-services-stats"] ~ ' + sel) || document.querySelector(sel);
    };
    var $$ = function(sel) { 
      var results = componentRoot.querySelectorAll(sel);
      return results.length ? results : document.querySelectorAll(sel);
    };
    // Original component JS runs in this scope
    (function () { setTimeout(function () { var counters = document.querySelectorAll("[data-counter]"); var observer = new IntersectionObserver( function (entries) { entries.forEach(function (entry) { if (entry.isIntersecting) { var counter = entry.target; var target = parseInt( counter.getAttribute("data-node-default") || "0" ); var duration = 2000; var startTime = null; function animate(currentTime) { if (!startTime) startTime = currentTime; var progress = Math.min( (currentTime - startTime) / duration, 1 ); var easeOut = 1 - Math.pow(1 - progress, 3); counter.textContent = Math.floor( easeOut * target ).toLocaleString(); if (progress < 1) { requestAnimationFrame(animate); } else { counter.textContent = target.toLocaleString(); } } requestAnimationFrame(animate); observer.unobserve(counter); } }); }, { threshold: 0.5 } ); counters.forEach(function (counter) { observer.observe(counter); }); }, 0); })();
  });
})();