PageSourceSearch

https://www.belfor.com/be/wp-content/themes/digitalexpress/assets/_dist/js/ds-counter.js?ver=1

js belfor.com collected 2026-10-03 22:04:26 UTC 6,900 bytes, 1 lines download raw bytes

vendor: 5,855 bytes, line 1
1!function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function r(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,n(i.key),i)}}function n(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(r)?r:String(r)}var i=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.defaults={start:0,end:100,duration:2e3,delay:10,once:!0,pulse:!1,decimals:0,legacy:!0,filesizing:!1,currency:!1,separator:!1,formater:"us-US",selector:".purecounter"},this.configOptions=this.setOptions(t,this.defaults),this.elements=document.querySelectorAll(this.configOptions.selector),this.intersectionSupport=this.intersectionListenerSupported(),this.registerEventListeners()}var i,o;return i=e,o=[{key:"setOptions",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={};for(var n in e)if(0===Object.keys(t).length||t.hasOwnProperty(n)){var i=this.parseValue(e[n]);r[n]=i,n.match(/duration|pulse/)&&(r[n]="boolean"!=typeof i?1e3*i:i)}return Object.assign({},t,r)}},{key:"registerEventListeners",value:function(){var e=this.elements;if(0!==e.length)if(this.intersectionSupport){var t=new IntersectionObserver(this.animateElements.bind(this),{root:null,rootMargin:"20px",threshold:.5});e.forEach((function(e){t.observe(e)}))}else window.addEventListener&&(this.animateLegacy(e),window.addEventListener("scroll",(function(t){this.animateLegacy(e)}),{passive:!0}))}},{key:"animateLegacy",value:function(e){var t=this;e.forEach((function(e){!0===t.parseConfig(e).legacy&&t.elementIsInView(e)&&t.animateElements([e])}))}},{key:"animateElements",value:function(e,t){var r=this;e.forEach((function(e){var n=e.target||e,i=r.parseConfig(n);if(i.duration<=0)return n.innerHTML=r.formatNumber(i.end,i);if(!t&&!r.elementIsInView(e)||t&&e.intersectionRatio<.5){var o=i.start>i.end?i.end:i.start;return n.innerHTML=r.formatNumber(o,i)}setTimeout((function(){return r.startCounter(n,i)}),i.delay)}))}},{key:"startCounter",value:function(e,t){var r=this,n=(t.end-t.start)/(t.duration/t.delay),i="inc";t.start>t.end&&(i="dec",n*=-1);var o=this.parseValue(t.start);e.innerHTML=this.formatNumber(o,t),!0===t.once&&e.setAttribute("data-purecounter-duration",0);var a=setInterval((function(){var s=r.nextNumber(o,n,i);e.innerHTML=r.formatNumber(s,t),((o=s)>=t.end&&"inc"===i||o<=t.end&&"dec"===i)&&(e.innerHTML=r.formatNumber(t.end,t),t.pulse&&(e.setAttribute("data-purecounter-duration",0),setTimeout((function(){e.setAttribute("data-purecounter-duration",t.duration/1e3)}),t.pulse)),clearInterval(a))}),t.delay)}},{key:"parseConfig",value:function(e){var r,i=this,o=[].filter.call(e.attributes,(function(e){return/^data-purecounter-/.test(e.name)})),a=0!=o.length?Object.assign.apply(Object,[{}].concat(function(e){if(Array.isArray(e))return t(e)}(r=o.map((function(e){var t=e.name,r=e.value;return function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},t.replace("data-purecounter-","").toLowerCase(),i.parseValue(r))})))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())):{};return this.setOptions(a,this.configOptions)}},{key:"nextNumber",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"inc";return e=this.parseValue(e),t=this.parseValue(t),parseFloat("inc"===r?e+t:e-t)}},{key:"convertNumber",value:function(e,t){if(t.filesizing||t.currency){e=Math.abs(Number(e));var r=1e3,n=t.currency&&"string"==typeof t.currency?t.currency:"",i=t.decimals||1,o=["","K","M","B","T"],a="";t.filesizing&&(r=1024,o=["bytes","KB","MB","GB","TB"]);for(var s=4;s>=0;s--)if(0===s&&(a="".concat(e.toFixed(i)," ").concat(o[s])),e>=this.getFilesizeThreshold(r,s)){a="".concat((e/this.getFilesizeThreshold(r,s)).toFixed(i)," ").concat(o[s]);break}return n+a}return parseFloat(e)}},{key:"getFilesizeThreshold",value:function(e,t){return Math.pow(e,t)}},{key:"applySeparator",value:function(e,t){if(t.formater){var r=t.separator?"string"==typeof t.separator?t.separator:",":"";return"en-US"!==t.formater&&!0===t.separator?e:(n=r,e.replace(/^(?:(\d{1,3},(?:\d{1,3},?)*)|(\d{1,3}\.(?:\d{1,3}\.?)*)|(\d{1,3}(?:\s\d{1,3})*))([\.,]?\d{0,2}?)$/gi,(function(e,t,r,i,o){var a="",s="";if(void 0!==t?(a=t.replace(new RegExp(/,/gi,"gi"),n),s=","):void 0!==r?a=r.replace(new RegExp(/\./gi,"gi"),n):void 0!==i&&(a=i.replace(new RegExp(/ /gi,"gi"),n)),void 0!==o){var u=","!==s&&","!==n?",":".";a+=o.replace(new RegExp(/\.|,/gi,"gi"),u)}return a})))}var n;return e}},{key:"formatNumber",value:function(e,t){var r={minimumFractionDigits:t.decimals,maximumFractionDigits:t.decimals},n="string"==typeof t.formater?t.formater:void 0;
1return e=this.convertNumber(e,t),e=t.formater?e.toLocaleString(n,r):parseInt(e).toString(),this.applySeparator(e,t)}},{key:"getLocaleSeparator",value:function(){}},{key:"parseValue",value:function(e){return/^[0-9]+\.[0-9]+$/.test(e)?parseFloat(e):/^[0-9]+$/.test(e)?parseInt(e):/^true|false/i.test(e)?/^true/i.test(e):e}},{key:"elementIsInView",value:function(e){for(var t=e.offsetTop,r=e.offsetLeft,n=e.offsetWidth,i=e.offsetHeight;e.offsetParent;)t+=(e=e.offsetParent).offsetTop,r+=e.offsetLeft;return t>=window.pageYOffset&&r>=window.pageXOffset&&t+i<=window.pageYOffset+window.innerHeight&&r+n<=window.pageXOffset+window.innerWidth}},{key:"intersectionListenerSupported",value:function(){return"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype}}],o&&r(i.prototype,o),Object.defineProperty(i,"prototype",{writable:!1}),e}();document.addEventListener("DOMContentLoaded",(function(){new i({selector:".c-counter__number",separator:!0,formater:"en-US"})}))}();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.