Dashboard
PHP:
8.4.22
OS:
Linux
User:
provencez
/
/
home
/
provencez
/
www
/
wp-content
/
plugins
/
flexa-block
/
build
/
blocks
/
process-bar
📤 Upload
📝 New File
📁 New Folder
Close
Editing: view.js
(()=>{"use strict";function t(t){const e=parseInt(t.getAttribute("data-duration")||"1500",10)||1500;!function(t,e){const o=window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;if("line"===(t.getAttribute("data-bar-type")||"line")){const n=t.querySelector(".flexa-process-bar__fill");if(!n)return;const r=n.style.width||"0%";return o||e<=0||(n.style.transition="none",n.style.width="0%",n.offsetWidth,n.style.transition=`width ${e}ms ease-out`),void(n.style.width=r)}const n=t.querySelector(".flexa-process-bar__ring-fill");if(!n)return;const r=n.getAttribute("stroke-dasharray")||"0",a=n.getAttribute("stroke-dashoffset")||"0";if(o||e<=0)return void(n.style.strokeDashoffset=a);const i=n.style;i.transition="none",i.strokeDashoffset=r,n.getBoundingClientRect(),i.transition=`stroke-dashoffset ${e}ms ease-out`,i.strokeDashoffset=a}(t,e),t.querySelectorAll(".flexa-process-bar__counter-value[data-target]").forEach(t=>function(t,e){const o=t.getAttribute("data-target")||"",n=parseFloat(o);if(Number.isNaN(n))return;const r=function(t){const e=t.indexOf(".");return-1===e?0:t.length-e-1}(o);if(window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches||e<=0)return void(t.textContent=n.toFixed(r));const a=performance.now(),i=o=>{const s=Math.min(1,(o-a)/e),c=1-Math.pow(1-s,3);t.textContent=(n*c).toFixed(r),s<1?window.requestAnimationFrame(i):t.textContent=n.toFixed(r)};t.textContent=(0).toFixed(r),window.requestAnimationFrame(i)}(t,e))}function e(t){t.classList.add("flexa-bg-loaded"),t.removeAttribute("data-flexa-lazy-bg")}function o(){const o=document.querySelectorAll("[data-flexa-process-bar]"),n=document.querySelectorAll("[data-flexa-lazy-bg]");if(void 0===window.IntersectionObserver)return o.forEach(t),void n.forEach(e);if(o.length){const e=new window.IntersectionObserver((e,o)=>{e.forEach(e=>{e.isIntersecting&&(t(e.target),o.unobserve(e.target))})},{rootMargin:"0px 0px -10% 0px"});o.forEach(t=>e.observe(t))}if(n.length){const t=new window.IntersectionObserver((t,o)=>{t.forEach(t=>{t.isIntersecting&&(e(t.target),o.unobserve(t.target))})},{rootMargin:"200px 0px"});n.forEach(e=>t.observe(e))}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",o):o()})();
Save
Cancel