/** * @name jQuery-Absolute-Progressbar * @author: AbsolutePlugins * @authorURL https://absoluteplugins.com * @version 1.0.0 * @license GPL-3.0-or-later * */ !function(t,n){"use strict";function o(o,e={}){const r=this;r.el=t(o);const i=e.value,s=void 0===i?r.el.data("value"):i,a=e.showTitle,l=void 0===a||a,d=e.titleEl,c=void 0===d?t("

"):d,p=e.titleContent,u=void 0===p?r.el.data("title"):p,f=e.style,g=void 0===f?r.el.data("tooltip")?"tooltip":"inline":f,v=e.easing,m=void 0===v?r.el.data("easing")||"swing":v,b=e.duration,h=void 0===b?r.el.data("duration")||1500:b,w=e.autoplay,y=void 0===w?!1!==r.el.data("autoplay"):w,P=e.useWayPoint,C=void 0===P?!1!==r.el.data("waypoint"):P,F=e.wayPointOffset,W=void 0===F?r.el.data("waypoint-offset")||"bottom-in-view":F,B=e.isRtl,E=void 0===B?"rtl"===document.dir:B,x=e.onInit,A=void 0===x?function(){}:x,T=e.onAnimatinStart,j=void 0===T?function(){}:T,I=e.onProgress,M=void 0===I?function(){}:I,O=e.onAfterProgress,Q=void 0===O?function(){}:O,R=e.onComplete,S=void 0===R?function(){}:R,k=e.onError,q=void 0===k?function(){}:k,z=e.onEnd,D=void 0===z?function(){}:z;console.log(y),r.el.addClass("progress-"+g),r.bar=r.el.find(".ab-progress-bar"),r.title=r.el.find(".progress-title"),r.indecator=r.el.find(".progress-indecator"),r.numWrap=r.indecator.find(".progress-indecator-inner"),r.number=r.indecator.find(".percent");r.started=!1,r.stopped=null,r.animator=null,r.progress=0,r.start=function(){r.started||(r.animator=t({Progress:r.progress}).animate({Progress:s},{duration:h,easing:m,start:function(){t.isFunction(j)&&j.call(r,arguments)},step:function(){t.isFunction(M)&&M.call(r,arguments)},progress:function(){const n=this;r.progress=n.Progress,r.number.text((E?"%#":"#%").replace("#",Math.ceil(n.Progress))),r.bar.css({width:n.Progress+"%"}),r.numWrap.css({left:n.Progress+"%"}),t.isFunction(Q)&&Q.call(r,arguments)},complete:function(){t.isFunction(S)&&S.call(r,arguments)},fail:function(){t.isFunction(q)&&q.call(r,arguments)},always:function(){t.isFunction(D)&&D.call(r,arguments)}}),r.started=!0,r.stopped=!1)},r.stop=function(t=!1,n=!1){r.stopped||(r.animator.stop(t,n),r.started=!1,r.stopped=!0)},t.isFunction(A)&&A.call(r),!r.title.length&&l&&(r.title=t(c).addClass("progress-title"),r.title.text(u),r.el.html(r.title)),r.indecator.length||(r.indecator=t("
").addClass("progress-indecator"),r.title.after(r.indecator)),r.number.length||(r.number=t(''),r.number.appendTo(r.indecator),r.number.wrap('
'),r.numWrap=r.number.parent(),"tooltip"===g&&r.number.after('')),r.bar.length||(r.bar=t("
").addClass("ab-progress-bar"),r.indecator.after(r.bar),r.bar.wrap('
')),E&&r.el.addClass("progress-rtl"),y&&(C&&n.Waypoint?new Waypoint({element:r.el[0],handler:function(){r.start(),this.destroy()},offset:W}):r.start())}t.fn.progressBar=function(n={}){t(this).each((function(){const e=new o(this,n);t(this).data("progressBar",e)}))},t(document).on("ready",(function(){t("[data-progress]").progressBar()}))}(jQuery,window); //# sourceMappingURL=progressBar.min.js.map