PluginProbe
Getwid – Gutenberg Blocks / 3.0.2
Getwid – Gutenberg Blocks v3.0.2
3.0.2 3.0.1 3.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.2.0 trunk 1.8.7 1.9.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.14 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9
getwid / assets / blocks / counter / view.js

view.js in Getwid – Gutenberg Blocks 3.0.2, at assets/blocks/counter/view.js

1 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (()=>{"use strict";const e={n:n=>{const t=n&&n.__esModule?()=>n.default:()=>n;return e.d(t,{a:t}),t},d:(n,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var a=t[r++],o=t[r++];e.o(n,a)?0===o&&r++:0===o?Object.defineProperty(n,a,{enumerable:!0,value:t[r++]}):Object.defineProperty(n,a,{enumerable:!0,get:o})}else for(var a in t)e.o(t,a)&&!e.o(n,a)&&Object.defineProperty(n,a,{enumerable:!0,get:t[a]})},o:(e,n)=>Object.hasOwn(e,n)},n=window.jQuery;var t=e.n(n);const r=window.wp.dom,a=window.wp.htmlEntities;function o(e){return"true"===e}function i(e){return e?(0,r.safeHTML)((0,a.decodeEntities)(e)):""}function u(e){return o(e.useEasing)?"outQuintic"===e.easing?(e,n,t,r)=>t*((e=e/r-1)*e*e*e*e+1)+n:"outCubic"===e.easing?(e,n,t,r)=>t*((e=e/r-1)*e*e+1)+n:(e,n,t,r)=>t*(1-Math.pow(2,-10*e/r))*1024/1023+n:null}const s=".wp-block-getwid-counter";function d(e,n,t=""){const r=e.data(n);return void 0===r?t:String(r)}function c(){const e=t()(".wp-block-getwid-counter:not(.getwid-init)"),n=window.CountUp,r=window.Waypoint;"function"==typeof n&&"function"==typeof r&&e.each((e,a)=>{const c=t()(a),l=c.find(`${s}__wrapper`),p=c.find(`${s}__number`).get(0),f=l.get(0);if(!p||!f)return;c.addClass("getwid-init");const g=new r({element:p,handler:()=>{new n(p,Number.parseFloat(d(l,"end","100")),function(e){return n=function(e){return{start:d(e,"start","0"),end:d(e,"end","100"),decimalPlaces:d(e,"decimal-places","0"),duration:d(e,"duration","3"),useEasing:d(e,"use-easing","true"),useGrouping:d(e,"use-grouping","true"),separator:d(e,"separator",","),decimal:d(e,"decimal","."),easing:d(e,"easing-fn","outExpo"),numerals:d(e,"numerals","default")}}(e),{startVal:Number.parseFloat(n.start),decimalPlaces:Number.parseInt(n.decimalPlaces,10),duration:Number.parseInt(n.duration,10),useEasing:o(n.useEasing),useGrouping:o(n.useGrouping),separator:i(n.separator),decimal:i(n.decimal),easingFn:u(n),numerals:(t=n.numerals,"eastern_arabic"===t?["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"]:"farsi"===t?["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"]:null)};var n,t}(l)).start(),g.destroy()},offset:"100%"})})}t()(document).ready(()=>{t()(document.body).on("post-load",()=>{c()}),c()})})();