(()=>{"use strict";var t,n,i=function(t){var n=t(".rtsb-progressbar");if(n.length){n.each(function(){var n=this,i=t(this),o=!1,a=i.data("layout"),c=parseInt(i.data("count"),10),s=parseInt(i.data("duration"),10),l=function(){setTimeout(function(){!o&&r(n)&&(e({duration:s,timing:function(t){return t},draw:function(t){var n=Math.floor(100*t);if(n<=c){if("line"===a)i.find(".rtsb-pb-line-fill").css("width","".concat(n,"%"));else if("circle"===a){var r=3.6*n;i.find(".rtsb-pb-circle-left").css("transform","rotate(".concat(r,"deg)")),r>180&&(i.find(".rtsb-pb-circle-pie").css("clipPath","inset(0)"),i.find(".rtsb-pb-circle-right").css("visibility","visible"))}else if("half_circle"===a){var e=1.8*n;i.find(".rtsb-pb-circle-half").css("transform","rotate(".concat(e,"deg)"))}i.find(".rtsb-pb-count").text(n)}}}),o=!0)},20)};r(this)&&l(),t(window).on("scroll",function(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return function(){for(var e=arguments.length,o=new Array(e),a=0;a<e;a++)o[a]=arguments[a];var c=this,s=r&&!n;clearTimeout(n),n=setTimeout(function(){n=null,r||t.apply(c,o)},i),s&&t.apply(c,o)}}(l))})}},r=function(t){var n=t.getBoundingClientRect();return n.top>=0&&n.left>=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&n.right<=(window.innerWidth||document.documentElement.clientWidth)},e=function(t){var n=t.duration,i=t.draw,r=t.timing,e=performance.now(),o=function(t){var a=(t-e)/n;a>1&&(a=1);var c=r(a);i(c),a<1&&requestAnimationFrame(o)};requestAnimationFrame(o)};t=jQuery,window.RTSB&&window.RTSB._initialized&&(null===(n=window.RTSB.modules.registerAfterElementor("progressBar",function(){return{name:"progressBar",version:"1.0.0",init:function(){return i(t),this},refresh:function(){i(t)}}}))||void 0===n||n.init())})();