(function(){"use strict";window.kadenceCountUp={cache:{},countUpItems:{},listenerCache:{},isInViewport(a){const b=a.getBoundingClientRect();return 0<=b.top&&-300<=b.left&&b.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&b.right<=(window.innerWidth||document.documentElement.clientWidth)+300},stripHtml(a){const b=new DOMParser().parseFromString(`<pre>${a}</pre>`,"text/html");return b.body.textContent||""},initScrollSpy(){if(window.kadenceCountUp.countUpItems=document.querySelectorAll(".kb-count-up"),!!window.kadenceCountUp.countUpItems.length)for(let a=0;a<window.kadenceCountUp.countUpItems.length;a++){const b=window.kadenceCountUp.countUpItems[a],c=b.dataset.start,d=b.dataset.end,e=window.kadenceCountUp.stripHtml(b.dataset.prefix),f=window.kadenceCountUp.stripHtml(b.dataset.suffix),g=b.dataset.duration,h=window.kadenceCountUp.stripHtml(b.dataset.separator),i=!!b.dataset.decimal&&b.dataset.decimal,j=!!b.dataset.decimalSpaces&&b.dataset.decimalSpaces,k=b.querySelector(".kb-count-up-process");let l="true"===h?",":h;l="false"===l?"":l;const m={startVal:c?c:0,duration:g?g:2,prefix:e?e:"",suffix:f?f:"",separator:l,decimal:i,decimalPlaces:j};window.kadenceCountUp.cache[a]=new countUp.CountUp(k,d,m),window.kadenceCountUp.accessabilityModifications(k,d,e,f),window.kadenceCountUp.listenerCache[a]=window.kadenceCountUp.listener(a),document.addEventListener("scroll",window.kadenceCountUp.listenerCache[a],{passive:!0}),window.kadenceCountUp.startCountUp(a)}},accessabilityModifications(a,b,c,d){const e=document.createElement("div");e.classList.add("screen-reader-text"),e.innerHTML=c+b+d,a.before(e),a.setAttribute("aria-hidden","true")},listener(a){return function(){window.kadenceCountUp.startCountUp(a)}},startCountUp(a){window.kadenceCountUp.isInViewport(window.kadenceCountUp.countUpItems[a])&&(!window.kadenceCountUp.cache[a].error&&window.kadenceCountUp.cache[a].start(),document.removeEventListener("scroll",window.kadenceCountUp.listenerCache[a],!1))},init(){window.kadenceCountUp.initScrollSpy()}},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",window.kadenceCountUp.init):window.kadenceCountUp.init()})();