(()=>{"use strict";const e=e=>{const t=e instanceof jQuery?e[0]:e,n=t.querySelector(".bdt-ep-advanced-counter");if(!n)return;const r=n.dataset.settings;if(!r)return;let o;try{o="string"==typeof r?JSON.parse(r):r}catch(e){return void console.error("Failed to parse counter settings:",e)}const{countNumber:i=0,countStart:a=0,language:u,decimalPlaces:s=0,duration:l=0,useEasing:c=null,useGrouping:d=null,counterSeparator:f="",decimalSymbol:p="",counterPrefix:m="",counterSuffix:g="",id:y}=o;if("undefined"==typeof CountUp)return void console.error("CountUp.js library is not loaded");const b={startVal:a,numerals:u,decimalPlaces:s,duration:l,useEasing:null!==c,useGrouping:null!==d,separator:f,decimal:p,prefix:m,suffix:g},v=()=>{const e=t.querySelector(".bdt-count-this")||n.querySelector(".bdt-count-this")||(y?document.getElementById(y):null);if(!e)return;const r=new CountUp(e,i,b);r.error?console.error("CountUp initialization error:",r.error):r.start()};"function"==typeof epObserveTarget?epObserveTarget(t,v):(console.warn("epObserveTarget is not available, initializing counter immediately"),v())};window.addEventListener("elementor/frontend/init",(()=>{window.elementorFrontend?.hooks&&elementorFrontend.hooks.addAction("frontend/element_ready/bdt-advanced-counter.default",e)}))})();