PageSourceSearch

https://www.morsakabi.com/wp-content/plugins/widgetkit-for-elementor/assets/js/countdown.js?ver=5.1.26

js morsakabi.com collected 2026-10-02 00:31:50 UTC 44,968 bytes, 821 lines download raw bytes

1(function(){var j=false;window.JQClass=function(){};JQClass.classes={};JQClass.extend=function extender(f){var g=this.prototype;j=true;var h=new this();j=false;for(var i in f){h[i]=typeof f[i]=='function'&&typeof g[i]=='function'?(function(d,e){return function(){var b=this._super;this._super=function(a){return g[d].apply(this,a)};var c=e.apply(this,arguments);this._super=b;return c}})(i,f[i]):f[i]}function JQClass(){if(!j&&this._init){this._init.apply(this,arguments)}}JQClass.prototype=h;JQClass.prototype.constructor=JQClass;JQClass.extend=extender;return JQClass}})();(function($){JQClass.classes.JQPlugin=JQClass.extend({name:'plugin',defaultOptions:{},regionalOptions:{},_getters:[],_getMarker:function(){return'is-'+this.name},_init:function(){$.extend(this.defaultOptions,(this.regionalOptions&&this.regionalOptions[''])||{});var c=camelCase(this.name);$[c]=this;$.fn[c]=function(a){var b=Array.prototype.slice.call(arguments,1);if($[c]._isNotChained(a,b)){return $[c][a].apply($[c],[this[0]].concat(b))}return this.each(function(){if(typeof a==='string'){if(a[0]==='_'||!$[c][a]){throw'Unknown method: '+a;}$[c][a].apply($[c],[this].concat(b))}else{$[c]._attach(this,a)}})}},setDefaults:function(a){$.extend(this.defaultOptions,a||{})},_isNotChained:function(a,b){if(a==='option'&&(b.length===0||(b.length===1&&typeof b[0]==='string'))){return true}return $.inArray(a,this._getters)>-1},_attach:function(a,b){a=$(a);if(a.hasClass(this._getMarker())){return}a.addClass(this._getMarker());b=$.extend({},this.defaultOptions,this._getMetadata(a),b||{});var c=$.extend({name:this.name,elem:a,options:b},this._instSettings(a,b));a.data(this.name,c);this._postAttach(a,c);this.option(a,b)},_instSettings:function(a,b){return{}},_postAttach:function(a,b){},_getMetadata:function(d){try{var f=d.data(this.name.toLowerCase())||'';f=f.replace(/'/g,'"');f=f.replace(/([a-zA-Z0-9]+):/g,function(a,b,i){var c=f.substring(0,i).match(/"/g);return(!c||c.length%2===0?'"'+b+'":':b+':')});f=$.parseJSON('{'+f+'}');for(var g in f){var h=f[g];if(typeof h==='string'&&h.match(/^new Date\((.*)\)$/)){f[g]=eval(h)}}return f}catch(e){return{}}},_getInst:function(a){return $(a).data(this.name)||{}},option:function(a,b,c){a=$(a);var d=a.data(this.name);if(!b||(typeof b==='string'&&c==null)){var e=(d||{}).options;return(e&&b?e[b]:e)}if(!a.hasClass(this._getMarker())){return}var e=b||{};if(typeof b==='string'){e={};e[b]=c}this._optionsChanged(a,d,e);$.extend(d.options,e)},_optionsChanged:function(a,b,c){},destroy:function(a){a=$(a);if(!a.hasClass(this._getMarker())){return}this._preDestroy(a,this._getInst(a));a.removeData(this.name).removeClass(this._getMarker())},_preDestroy:function(a,b){}});function camelCase(c){return c.replace(/-([a-z])/g,function(a,b){return b.toUpperCase()})}$.JQPlugin={createPlugin:function(a,b){if(typeof a==='object'){b=a;a='JQPlugin'}a=camelCase(a);var c=camelCase(b.name);JQClass.classes[c]=JQClass.classes[a].extend(b);new JQClass.classes[c]()}}})(jQuery);
2/* http://keith-wood.name/countdown.html
3   Countdown for jQuery v2.0.0.
4   Written by Keith Wood (kbwood{at}iinet.com.au) January 2008.
5   Available under the MIT (https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt) license. 
6   Please attribute the author if you use it. */
7(function($) { // Hide scope, no $ conflict
8	var pluginName = 'widgetkit_countdown';
9	var Y = 0; // Years
10	var O = 1; // Months
11	var W = 2; // Weeks
12	var D = 3; // Days
13	var H = 4; // Hours
14	var M = 5; // Minutes
15	var S = 6; // Seconds
16	/** Create the countdown plugin.
17		<p>Sets an element to show the time remaining until a given instant.</p>
18		<p>Expects HTML like:</p>
19		<pre>&lt;div>&lt;/div></pre>
20		<p>Provide inline configuration like:</p>
21		<pre>&lt;div data-countdown="name: 'value'">&lt;/div></pre>
22	 	@module Countdown
23		@augments JQPlugin
24		@example $(selector).countdown({until: +300}) */
25	$.JQPlugin.createPlugin({
26		/** The name of the plugin. */
27		name: pluginName,
28		/** Countdown expiry callback.
29			Triggered when the countdown expires.
30			@callback expiryCallback */
31		/** Countdown server synchronisation callback.
32			Triggered when the countdown is initialised.
33			@callback serverSyncCallback
34			@return {Date} The current date/time on the server as expressed in the local timezone. */
35		/** Countdown tick callback.
36			Triggered on every <code>tickInterval</code> ticks of the countdown.
37			@callback tickCallback
38			@param periods {number[]} The breakdown by period (years, months, weeks, days,
39					hours, minutes, seconds) of the time remaining/passed. */
40		/** Countdown which labels callback.
41			Triggered when the countdown is being display to determine which set of labels
42			(<code>labels</code>, <code>labels1</code>, ...) are to be used for the current period value.
43			@callback whichLabelsCallback
44			@param num {number} The current period value.
45			@return {number} The suffix for the label set to use. */
46		/** Default settings for the plugin.
47			@property until {Date|number|string} The date/time to count down to, or number of seconds
48						offset from now, or string of amounts and units for offset(s) from now:
49						'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds.
50			@example until: new Date(2013, 12-1, 25, 13, 30)
51 until: +300
52 until: '+1O -2D'
53			@property [since] {Date|number|string} The date/time to count up from, or
54						number of seconds offset from now, or string for unit offset(s):
55						'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds.
56			@example since: new Date(2013, 1-1, 1)
57 since: -300
58 since: '-1O +2D'
59			@property [timezone=null] {number} The timezone (hours or minutes from GMT) for the target times,
60						or null for client local timezone.
61			@example timezone: +10
62 timezone: -60
63			@property [serverSync=null] {serverSyncCallback} A function to retrieve the current server time
64						for synchronisation.
65			@property [format='dHMS'] {string} The format for display - upper case for always, lower case only if non-zero,
66						'Y' years, 'O' months, 'W' weeks, 'D' days, 'H' hours, 'M' minutes, 'S' seconds.
67			@property [layout=''] {string} Build your own layout for the countdown.
68			@example layout: '{d<}{dn} {dl}{d>} {hnn}:{mnn}:{snn}'
69			@property [compact=false] {boolean} True to display in a compact format, false for an expanded one.
70			@property [padZeroes=false] {boolean} True to add leading zeroes
71			@property [significant=0] {number} The number of periods with non-zero values to show, zero for all.
72			@property [description=''] {string} The description displayed for the countdown.
73			@property [expiryUrl=''] {string} A URL to load upon expiry, replacing the current page.
74			@property [expiryText=''] {string} Text to display upon expiry, replacing the countdown. This may be HTML.
75			@property [alwaysExpire=false] {boolean} True to trigger <code>onExpiry</code> even if target time has passed.
76			@property [onExpiry=null] {expiryCallback} Callback when the countdown expires -
77						receives no parameters and <code>this</code> is the containing division.
78			@example onExpiry: function() {
79	...
80 }
81			@property [onTick=null] {tickCallback} Callback when the countdown is updated -
82						receives <code>number[7]</code> being the breakdown by period
83						(years, months, weeks, days, hours, minutes, seconds - based on
84						<code>format</code>) and <code>this</code> is the containing division.
85			@example onTick: function(periods) {
86 	var secs = $.countdown.periodsToSeconds(periods);
87 	if (secs < 300) { // Last five minutes
88		...
89 	}
90 }
91			@property [tickInterval=1] {number} The interval (seconds) between <code>onTick</code> callbacks. */
92		defaultOptions: {
93			until: null,
94			since: null,
95			timezone: null,
96			serverSync: null,
97			format: 'dHMS',
98			layout: '',
99			compact: false,
100			padZeroes: false,
101			significant: 0,
102			description: '',
103			expiryUrl: '',
104			expiryText: '',
105			alwaysExpire: false,
106			onExpiry: null,
107			onTick: null,
108			tickInterval: 1
109		},
110		/** Localisations for the plugin.
111			Entries are objects indexed by the language code ('' being the default US/English).
112			Each object has the following attributes.
113			@property [labels=['Years','Months','Weeks','Days','Hours','Minutes','Seconds']] {string[]}
114						The display texts for the counter periods.
115			@property [labels1=['Year','Month','Week','Day','Hour','Minute','Second']] {string[]}
116						The display texts for the counter periods if they have a value of 1.
117						Add other <code>labels<em>n</em></code> attributes as necessary to
118						cater for other numeric idiosyncrasies of the localisation.
119			@property [compactLabels=['y','m','w','d']] {string[]} The compact texts for the counter periods.
120			@property [whichLabels=null] {whichLabelsCallback} A function to determine which
121						<code>labels<em>n</em></code> to use.
122			@example whichLabels: function(num) {
123	return (num > 1 ? 0 : 1);
124 }
125			@property [digits=['0','1',...,'9']] {number[]} The digits to display (0-9).
126			@property [timeSeparator=':'] {string} Separator for time periods in the compact layout.
127			@property [isRTL=false] {boolean} True for right-to-left languages, false for left-to-right. */
128		regionalOptions: { // Available regional settings, indexed by language/country code
129			'': { // Default regional settings - English/US
130		labels: ['Years', 'Months', 'Weeks', 'Days', 'Hours', 'Minutes', 'Seconds'],
131		labels1: ['Year', 'Month', 'Week', 'Day', 'Hour', 'Minute', 'Second'],
132				compactLabels: ['y', 'm', 'w', 'd'],
133				whichLabels: null,
134				digits: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
135				timeSeparator: ':',
136				isRTL: false
137			}
138		},
139		/** Names of getter methods - those that can't be chained. */
140		_getters: ['getTimes'],
141		/* Class name for the right-to-left marker. */
142		_rtlClass: pluginName + '-rtl',
143		/* Class name for the countdown section marker. */
144		_sectionClass: pluginName + '-section',
145		/* Class name for the period amount marker. */
146		_amountClass: pluginName + '-amount',
147		/* Class name for the period name marker. */
148		_periodClass: pluginName + '-period',
149		/* Class name for the countdown row marker. */
150		_rowClass: pluginName + '-row',
151		/* Class name for the holding countdown marker. */
152		_holdingClass: pluginName + '-holding',
153		/* Class name for the showing countdown marker. */
154		_showClass: pluginName + '-show',
155		/* Class name for the description marker. */
156		_descrClass: pluginName + '-descr',
157		/* List of currently active countdown elements. */
158		_timerElems: [],
159		/** Additional setup for the countdown.
160			Apply default localisations.
161			Create the timer. */
162		_init: function() {
163			var self = this;
164			this._super();
165	this._serverSyncs = [];
166	var now = (typeof Date.now == 'function' ? Date.now :
167		function() { return new Date().getTime(); });
168	var perfAvail = (window.performance && typeof window.performance.now == 'function');
169	// Shared timer for all countdowns
170	function timerCallBack(timestamp) {
171		var drawStart = (timestamp < 1e12 ? // New HTML5 high resolution timer
172			(perfAvail ? (performance.now() + performance.timing.navigationStart) : now()) :
173			// Integer milliseconds since unix epoch
174			timestamp || now());
175		if (drawStart - animationStartTime >= 1000) {
176					self._updateElems();
177			animationStartTime = drawStart;
178		}
179		requestAnimationFrame(timerCallBack);
180	}
181	var requestAnimationFrame = window.requestAnimationFrame ||
182		window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame ||
183		window.oRequestAnimationFrame || window.msRequestAnimationFrame || null;
184		// This is when we expect a fall-back to setInterval as it's much more fluid
185	var animationStartTime = 0;
186	if (!requestAnimationFrame || $.noRequestAnimationFrame) {
187		$.noRequestAnimationFrame = null;
188				setInterval(function() { self._updateElems(); }, 980); // Fall back to good old setInterval
189	}
190	else {
191		animationStartTime = window.animationStartTime ||
192			window.webkitAnimationStartTime || window.mozAnimationStartTime ||
193			window.oAnimationStartTime || window.msAnimationStartTime || now();
194		requestAnimationFrame(timerCallBack);
195	}
196		},
197		/** Convert a date/time to UTC.
198			@param tz {number} The hour or minute offset from GMT, e.g. +9, -360.
199			@param year {Date|number} the date/time in that timezone or the year in that timezone.
200			@param [month] {number} The month (0 - 11) (omit if <code>year</code> is a <code>Date</code>).
201			@param [day] {number} The day (omit if <code>year</code> is a <code>Date</code>).
202			@param [hours] {number} The hour (omit if <code>year</code> is a <code>Date</code>).
203			@param [mins] {number} The minute (omit if <code>year</code> is a <code>Date</code>).
204			@param [secs] {number} The second (omit if <code>year</code> is a <code>Date</code>).
205			@param [ms] {number} The millisecond (omit if <code>year</code> is a <code>Date</code>).
206			@return {Date} The equivalent UTC date/time.
207			@example $.countdown.UTCDate(+10, 2013, 12-1, 25, 12, 0)
208 $.countdown.UTCDate(-7, new Date(2013, 12-1, 25, 12, 0)) */
209	UTCDate: function(tz, year, month, day, hours, mins, secs, ms) {
210		if (typeof year == 'object' && year.constructor == Date) {
211			ms = year.getMilliseconds();
212			secs = year.getSeconds();
213			mins = year.getMinutes();
214			hours = year.getHours();
215			day = year.getDate();
216			month = year.getMonth();
217			year = year.getFullYear();
218		}
219		var d = new Date();
220		d.setUTCFullYear(year);
221		d.setUTCDate(1);
222		d.setUTCMonth(month || 0);
223		d.setUTCDate(day || 1);
224		d.setUTCHours(hours || 0);
225		d.setUTCMinutes((mins || 0) - (Math.abs(tz) < 30 ? tz * 60 : tz));
226		d.setUTCSeconds(secs || 0);
227		d.setUTCMilliseconds(ms || 0);
228		return d;
229	},
230		/** Convert a set of periods into seconds.
231	   Averaged for months and years.
232			@param periods {number[]} The periods per year/month/week/day/hour/minute/second.
233			@return {number} The corresponding number of seconds.
234			@example var secs = $.countdown.periodsToSeconds(periods) */
235	periodsToSeconds: function(periods) {
236		return periods[0] * 31557600 + periods[1] * 2629800 + periods[2] * 604800 +
237			periods[3] * 86400 + periods[4] * 3600 + periods[5] * 60 + periods[6];
238	},
239		_instSettings: function(elem, options) {
240			return {_periods: [0, 0, 0, 0, 0, 0, 0]};
241	},
242		/** Add an element to the list of active ones.
243			@private
244			@param elem {Element} The countdown element. */
245		_addElem: function(elem) {
246			if (!this._hasElem(elem)) {
247				this._timerElems.push(elem);
248		}
249	},
250		/** See if an element is in the list of active ones.
251			@private
252			@param elem {Element} The countdown element.
253			@return {boolean} True if present, false if not. */
254		_hasElem: function(elem) {
255			return ($.inArray(elem, this._timerElems) > -1);
256	},
257		/** Remove an element from the list of active ones.
258			@private
259			@param elem {Element} The countdown element. */
260		_removeElem: function(elem) {
261			this._timerElems = $.map(this._timerElems,
262				function(value) { return (value == elem ? null : value); }); // delete entry
263	},
264		/** Update each active timer element.
265			@private */
266		_updateElems: function() {
267			for (var i = this._timerElems.length - 1; i >= 0; i--) {
268				this._updateCountdown(this._timerElems[i]);
269		}
270	},
271		_optionsChanged: function(elem, inst, options) {
272		if (options.layout) {
273			options.layout = options.layout.replace(/&lt;/g, '<').replace(/&gt;/g, '>');
274		}
275		this._resetExtraLabels(inst.options, options);
276		var timezoneChanged = (inst.options.timezone != options.timezone);
277		$.extend(inst.options, options);
278			this._adjustSettings(elem, inst,
279			options.until != null || options.since != null || timezoneChanged);
280		var now = new Date();
281		if ((inst._since && inst._since < now) || (inst._until && inst._until > now)) {
282				this._addElem(elem[0]);
283		}
284			this._updateCountdown(elem, inst);
285	},
286		/** Redisplay the countdown with an updated display.
287			@private
288			@param elem {Element|jQuery} The containing division.
289			@param inst {object} The current settings for this instance. */
290		_updateCountdown: function(elem, inst) {
291			elem = elem.jquery ? elem : $(elem);
292			inst = inst || elem.data(this.name);
293		if (!inst) {
294			return;
295		}
296			elem.html(this._generateHTML(inst)).toggleClass(this._rtlClass, inst.options.isRTL);
297		if ($.isFunction(inst.options.onTick)) {
298			var periods = inst._hold != 'lap' ? inst._periods :
299				this._calculatePeriods(inst, inst._show, inst.options.significant, new Date());
300			if (inst.options.tickInterval == 1 ||
301					this.periodsToSeconds(periods) % inst.options.tickInterval == 0) {
302					inst.options.onTick.apply(elem[0], [periods]);
303			}
304		}
305		var expired = inst._hold != 'pause' &&
306			(inst._since ? inst._now.getTime() < inst._since.getTime() :
307			inst._now.getTime() >= inst._until.getTime());
308		if (expired && !inst._expiring) {
309			inst._expiring = true;
310				if (this._hasElem(elem[0]) || inst.options.alwaysExpire) {
311					this._removeElem(elem[0]);
312				if ($.isFunction(inst.options.onExpiry)) {
313						inst.options.onExpiry.apply(elem[0], []);
314				}
315				if (inst.options.expiryText) {
316					var layout = inst.options.layout;
317					inst.options.layout = inst.options.expiryText;
318						this._updateCountdown(elem[0], inst);
319					inst.options.layout = layout;
320				}
321				if (inst.options.expiryUrl) {
322					window.location = inst.options.expiryUrl;
323				}
324			}
325			inst._expiring = false;
326		}
327		else if (inst._hold == 'pause') {
328				this._removeElem(elem[0]);
329		}
330	},
331		/** Reset any extra labelsn and compactLabelsn entries if changing labels.
332			@private
333			@param base {object} The options to be updated.
334			@param options {object} The new option values. */
335	_resetExtraLabels: function(base, options) {
336		var changingLabels = false;
337		for (var n in options) {
338			if (n != 'whichLabels' && n.match(/[Ll]abels/)) {
339				changingLabels = true;
340				break;
341			}
342		}
343		if (changingLabels) {
344			for (var n in base) { // Remove custom numbered labels
345				if (n.match(/[Ll]abels[02-9]|compactLabels1/)) {
346					base[n] = null;
347				}
348			}
349		}
350	},
351		/** Calculate internal settings for an instance.
352			@private
353			@param elem {jQuery} The containing division.
354			@param inst {object} The current settings for this instance.
355			@param recalc {boolean} True if until or since are set. */
356		_adjustSettings: function(elem, inst, recalc) {
357		var now;
358		var serverOffset = 0;
359		var serverEntry = null;
360		for (var i = 0; i < this._serverSyncs.length; i++) {
361			if (this._serverSyncs[i][0] == inst.options.serverSync) {
362				serverEntry = this._serverSyncs[i][1];
363				break;
364			}
365		}
366		if (serverEntry != null) {
367			serverOffset = (inst.options.serverSync ? serverEntry : 0);
368			now = new Date();
369		}
370		else {
371			var serverResult = ($.isFunction(inst.options.serverSync) ?
372					inst.options.serverSync.apply(elem[0], []) : null);
373			now = new Date();
374			serverOffset = (serverResult ? now.getTime() - serverResult.getTime() : 0);
375			this._serverSyncs.push([inst.options.serverSync, serverOffset]);
376		}
377		var timezone = inst.options.timezone;
378		timezone = (timezone == null ? -now.getTimezoneOffset() : timezone);
379		if (recalc || (!recalc && inst._until == null && inst._since == null)) {
380			inst._since = inst.options.since;
381			if (inst._since != null) {
382				inst._since = this.UTCDate(timezone, this._determineTime(inst._since, null));
383				if (inst._since && serverOffset) {
384					inst._since.setMilliseconds(inst._since.getMilliseconds() + serverOffset);
385				}
386			}
387			inst._until = this.UTCDate(timezone, this._determineTime(inst.options.until, now));
388			if (serverOffset) {
389				inst._until.setMilliseconds(inst._until.getMilliseconds() + serverOffset);
390			}
391		}
392		inst._show = this._determineShow(inst);
393	},
394		/** Remove the countdown widget from a div.
395			@param elem {jQuery} The containing division.
396			@param inst {object} The current instance object. */
397		_preDestroy: function(elem, inst) {
398			this._removeElem(elem[0]);
399			elem.empty();
400	},
401		/** Pause a countdown widget at the current time.
402	   Stop it running but remember and display the current time.
403			@param elem {Element} The containing division.
404			@example $(selector).countdown('pause') */
405		pause: function(elem) {
406			this._hold(elem, 'pause');
407	},
408		/** Pause a countdown widget at the current time.
409	   Stop the display but keep the countdown running.
410			@param elem {Element} The containing division.
411			@example $(selector).countdown('lap') */
412		lap: function(elem) {
413			this._hold(elem, 'lap');
414		},
415		/** Resume a paused countdown widget.
416			@param elem {Element} The containing division.
417			@example $(selector).countdown('resume') */
418		resume: function(elem) {
419			this._hold(elem, null);
420		},
421		/** Toggle a paused countdown widget.
422			@param elem {Element} The containing division.
423			@example $(selector).countdown('toggle') */
424		toggle: function(elem) {
425			var inst = $.data(elem, this.name) || {};
426			this[!inst._hold ? 'pause' : 'resume'](elem);
427		},
428		/** Toggle a lapped countdown widget.
429			@param elem {Element} The containing division.
430			@example $(selector).countdown('toggleLap') */
431		toggleLap: function(elem) {
432			var inst = $.data(elem, this.name) || {};
433			this[!inst._hold ? 'lap' : 'resume'](elem);
434		},
435		/** Pause or resume a countdown widget.
436			@private
437			@param elem {Element} The containing division.
438			@param hold {string} The new hold setting. */
439		_hold: function(elem, hold) {
440			var inst = $.data(elem, this.name);
441		if (inst) {
442			if (inst._hold == 'pause' && !hold) {
443				inst._periods = inst._savePeriods;
444				var sign = (inst._since ? '-' : '+');
445				inst[inst._since ? '_since' : '_until'] =
446					this._determineTime(sign + inst._periods[0] + 'y' +
447						sign + inst._periods[1] + 'o' + sign + inst._periods[2] + 'w' +
448						sign + inst._periods[3] + 'd' + sign + inst._periods[4] + 'h' + 
449						sign + inst._periods[5] + 'm' + sign + inst._periods[6] + 's');
450					this._addElem(elem);
451			}
452			inst._hold = hold;
453			inst._savePeriods = (hold == 'pause' ? inst._periods : null);
454				$.data(elem, this.name, inst);
455				this._updateCountdown(elem, inst);
456		}
457	},
458		/** Return the current time periods.
459			@param elem {Element} The containing division.
460			@return {number[]} The current periods for the countdown.
461			@example var periods = $(selector).countdown('getTimes') */
462		getTimes: function(elem) {
463			var inst = $.data(elem, this.name);
464		return (!inst ? null : (inst._hold == 'pause' ? inst._savePeriods : (!inst._hold ? inst._periods :
465			this._calculatePeriods(inst, inst._show, inst.options.significant, new Date()))));
466	},
467		/** A time may be specified as an exact value or a relative one.
468			@private
469			@param setting {string|number|Date} The date/time value as a relative or absolute value.
470			@param defaultTime {Date} The date/time to use if no other is supplied.
471			@return {Date} The corresponding date/time. */
472	_determineTime: function(setting, defaultTime) {
473			var self = this;
474		var offsetNumeric = function(offset) { // e.g. +300, -2
475			var time = new Date();
476			time.setTime(time.getTime() + offset * 1000);
477			return time;
478		};
479		var offsetString = function(offset) { // e.g. '+2d', '-4w', '+3h +30m'
480			offset = offset.toLowerCase();
481			var time = new Date();
482			var year = time.getFullYear();
483			var month = time.getMonth();
484			var day = time.getDate();
485			var hour = time.getHours();
486			var minute = time.getMinutes();
487			var second = time.getSeconds();
488			var pattern = /([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g;
489			var matches = pattern.exec(offset);
490			while (matches) {
491				switch (matches[2] || 's') {
492					case 's': second += parseInt(matches[1], 10); break;
493					case 'm': minute += parseInt(matches[1], 10); break;
494					case 'h': hour += parseInt(matches[1], 10); break;
495					case 'd': day += parseInt(matches[1], 10); break;
496					case 'w': day += parseInt(matches[1], 10) * 7; break;
497					case 'o':
498						month += parseInt(matches[1], 10); 
499							day = Math.min(day, self._getDaysInMonth(year, month));
500						break;
501					case 'y':
502						year += parseInt(matches[1], 10);
503							day = Math.min(day, self._getDaysInMonth(year, month));
504						break;
505				}
506				matches = pattern.exec(offset);
507			}
508			return new Date(year, month, day, hour, minute, second, 0);
509		};
510		var time = (setting == null ? defaultTime :
511			(typeof setting == 'string' ? offsetString(setting) :
512			(typeof setting == 'number' ? offsetNumeric(setting) : setting)));
513		if (time) time.setMilliseconds(0);
514		return time;
515	},
516		/** Determine the number of days in a month.
517			@private
518			@param year {number} The year.
519			@param month {number} The month.
520			@return {number} The days in that month. */
521	_getDaysInMonth: function(year, month) {
522		return 32 - new Date(year, month, 32).getDate();
523	},
524		/** Default implementation to determine which set of labels should be used for an amount.
525			Use the <code>labels</code> attribute with the same numeric suffix (if it exists).
526			@private
527			@param num {number} The amount to be displayed.
528			@return {number} The set of labels to be used for this amount. */
529	_normalLabels: function(num) {
530		return num;
531	},
532		/** Generate the HTML to display the countdown widget.
533			@private
534			@param inst {object} The current settings for this instance.
535			@return {string} The new HTML for the countdown display. */
536	_generateHTML: function(inst) {
537		var self = this;
538		// Determine what to show
539		inst._periods = (inst._hold ? inst._periods :
540			this._calculatePeriods(inst, inst._show, inst.options.significant, new Date()));
541		// Show all 'asNeeded' after first non-zero value
542		var shownNonZero = false;
543		var showCount = 0;
544		var sigCount = inst.options.significant;
545		var show = $.extend({}, inst._show);
546		for (var period = Y; period <= S; period++) {
547			shownNonZero |= (inst._show[period] == '?' && inst._periods[period] > 0);
548			show[period] = (inst._show[period] == '?' && !shownNonZero ? null : inst._show[period]);
549			showCount += (show[period] ? 1 : 0);
550			sigCount -= (inst._periods[period] > 0 ? 1 : 0);
551		}
552		var showSignificant = [false, false, false, false, false, false, false];
553		for (var period = S; period >= Y; period--) { // Determine significant periods
554			if (inst._show[period]) {
555				if (inst._periods[period]) {
556					showSignificant[period] = true;
557				}
558				else {
559					showSignificant[period] = sigCount > 0;
560					sigCount--;
561				}
562			}
563		}
564		var labels = (inst.options.compact ? inst.options.compactLabels : inst.options.labels);
565		var whichLabels = inst.options.whichLabels || this._normalLabels;
566		var showCompact = function(period) {
567			var labelsNum = inst.options['compactLabels' + whichLabels(inst._periods[period])];
568			return (show[period] ? self._translateDigits(inst, inst._periods[period]) +
569				(labelsNum ? labelsNum[period] : labels[period]) + ' ' : '');
570		};
571		var minDigits = (inst.options.padZeroes ? 2 : 1);
572		var showFull = function(period) {
573			var labelsNum = inst.options['labels' + whichLabels(inst._periods[period])];
574			return ((!inst.options.significant && show[period]) ||
575				(inst.options.significant && showSignificant[period]) ?
576					'<span class="' + self._sectionClass + '">' +
577					//SID EDIT
578					'<span class="pre_time-mid">' +
579					'<span class="' + self._amountClass + '">' +
580				self._minDigits(inst, inst._periods[period], minDigits) + '</span>' +
581				'<span class="' + self._periodClass + '">' +
582				(labelsNum ? labelsNum[period] : labels[period]) + '</span></span></span>' : '');
583		};
584		return (inst.options.layout ? this._buildLayout(inst, show, inst.options.layout,
585			inst.options.compact, inst.options.significant, showSignificant) :
586			((inst.options.compact ? // Compact version
587			'<span class="' + this._rowClass + ' ' + this._amountClass +
588			(inst._hold ? ' ' + this._holdingClass : '') + '">' + 
589			showCompact(Y) + showCompact(O) + showCompact(W) + showCompact(D) + 
590			(show[H] ? this._minDigits(inst, inst._periods[H], 2) : '') +
591			(show[M] ? (show[H] ? inst.options.timeSeparator : '') +
592			this._minDigits(inst, inst._periods[M], 2) : '') +
593			(show[S] ? (show[H] || show[M] ? inst.options.timeSeparator : '') +
594			this._minDigits(inst, inst._periods[S], 2) : '') :
595			// Full version
596			'<span class="' + this._rowClass + ' ' + this._showClass + (inst.options.significant || showCount) +
597			(inst._hold ? ' ' + this._holdingClass : '') + '">' +
598			showFull(Y) + showFull(O) + showFull(W) + showFull(D) +
599			showFull(H) + showFull(M) + showFull(S)) + '</span>' +
600			(inst.options.description ? '<span class="' + this._rowClass + ' ' + this._descrClass + '">' +
601			inst.options.description + '</span>' : '')));
602	},
603		/** Construct a custom layout.
604			@private
605			@param inst {object} The current settings for this instance.
606			@param show {boolean[]} Flags indicating which periods are requested.
607			@param layout {string} The customised layout.
608			@param compact {boolean} True if using compact labels.
609			@param significant {number} The number of periods with values to show, zero for all.
610			@param showSignificant {boolean[]} Other periods to show for significance.
611			@return {string} The custom HTML. */
612	_buildLayout: function(inst, show, layout, compact, significant, showSignificant) {
613		var labels = inst.options[compact ? 'compactLabels' : 'labels'];
614		var whichLabels = inst.options.whichLabels || this._normalLabels;
615		var labelFor = function(index) {
616			return (inst.options[(compact ? 'compactLabels' : 'labels') +
617				whichLabels(inst._periods[index])] || labels)[index];
618		};
619		var digit = function(value, position) {
620			return inst.options.digits[Math.floor(value / position) % 10];
621		};
622		var subs = {desc: inst.options.description, sep: inst.options.timeSeparator,
623			yl: labelFor(Y), yn: this._minDigits(inst, inst._periods[Y], 1),
624			ynn: this._minDigits(inst, inst._periods[Y], 2),
625			ynnn: this._minDigits(inst, inst._periods[Y], 3), y1: digit(inst._periods[Y], 1),
626			y10: digit(inst._periods[Y], 10), y100: digit(inst._periods[Y], 100),
627			y1000: digit(inst._periods[Y], 1000),
628			ol: labelFor(O), on: this._minDigits(inst, inst._periods[O], 1),
629			onn: this._minDigits(inst, inst._periods[O], 2),
630			onnn: this._minDigits(inst, inst._periods[O], 3), o1: digit(inst._periods[O], 1),
631			o10: digit(inst._periods[O], 10), o100: digit(inst._periods[O], 100),
632			o1000: digit(inst._periods[O], 1000),
633			wl: labelFor(W), wn: this._minDigits(inst, inst._periods[W], 1),
634			wnn: this._minDigits(inst, inst._periods[W], 2),
635			wnnn: this._minDigits(inst, inst._periods[W], 3), w1: digit(inst._periods[W], 1),
636			w10: digit(inst._periods[W], 10), w100: digit(inst._periods[W], 100),
637			w1000: digit(inst._periods[W], 1000),
638			dl: labelFor(D), dn: this._minDigits(inst, inst._periods[D], 1),
639			dnn: this._minDigits(inst, inst._periods[D], 2),
640			dnnn: this._minDigits(inst, inst._periods[D], 3), d1: digit(inst._periods[D], 1),
641			d10: digit(inst._periods[D], 10), d100: digit(inst._periods[D], 100),
642			d1000: digit(inst._periods[D], 1000),
643			hl: labelFor(H), hn: this._minDigits(inst, inst._periods[H], 1),
644			hnn: this._minDigits(inst, inst._periods[H], 2),
645			hnnn: this._minDigits(inst, inst._periods[H], 3), h1: digit(inst._periods[H], 1),
646			h10: digit(inst._periods[H], 10), h100: digit(inst._periods[H], 100),
647			h1000: digit(inst._periods[H], 1000),
648			ml: labelFor(M), mn: this._minDigits(inst, inst._periods[M], 1),
649			mnn: this._minDigits(inst, inst._periods[M], 2),
650			mnnn: this._minDigits(inst, inst._periods[M], 3), m1: digit(inst._periods[M], 1),
651			m10: digit(inst._periods[M], 10), m100: digit(inst._periods[M], 100),
652			m1000: digit(inst._periods[M], 1000),
653			sl: labelFor(S), sn: this._minDigits(inst, inst._periods[S], 1),
654			snn: this._minDigits(inst, inst._periods[S], 2),
655			snnn: this._minDigits(inst, inst._periods[S], 3), s1: digit(inst._periods[S], 1),
656			s10: digit(inst._periods[S], 10), s100: digit(inst._periods[S], 100),
657			s1000: digit(inst._periods[S], 1000)};
658		var html = layout;
659		// Replace period containers: {p<}...{p>}
660		for (var i = Y; i <= S; i++) {
661			var period = 'yowdhms'.charAt(i);
662			var re = new RegExp('\\{' + period + '<\\}([\\s\\S]*)\\{' + period + '>\\}', 'g');
663			html = html.replace(re, ((!significant && show[i]) ||
664				(significant && showSignificant[i]) ? '$1' : ''));
665		}
666		// Replace period values: {pn}
667		$.each(subs, function(n, v) {
668			var re = new RegExp('\\{' + n + '\\}', 'g');
669			html = html.replace(re, v);
670		});
671		return html;
672	},
673		/** Ensure a numeric value has at least n digits for display.
674			@private
675			@param inst {object} The current settings for this instance.
676			@param value {number} The value to display.
677			@param len {number} The minimum length.
678			@return {string} The display text. */
679	_minDigits: function(inst, value, len) {
680		value = '' + value;
681		if (value.length >= len) {
682			return this._translateDigits(inst, value);
683		}
684		value = '0000000000' + value;
685		return this._translateDigits(inst, value.substr(value.length - len));
686	},
687		/** Translate digits into other representations.
688			@private
689			@param inst {object} The current settings for this instance.
690			@param value {string} The text to translate.
691			@return {string} The translated text. */
692	_translateDigits: function(inst, value) {
693		return ('' + value).replace(/[0-9]/g, function(digit) {
694				return inst.options.digits[digit];
695			});
696	},
697		/** Translate the format into flags for each period.
698			@private
699			@param inst {object} The current settings for this instance.
700			@return {string[]} Flags indicating which periods are requested (?) or
701					required (!) by year, month, week, day, hour, minute, second. */
702	_determineShow: function(inst) {
703		var format = inst.options.format;
704		var show = [];
705		show[Y] = (format.match('y') ? '?' : (format.match('Y') ? '!' : null));
706		show[O] = (format.match('o') ? '?' : (format.match('O') ? '!' : null));
707		show[W] = (format.match('w') ? '?' : (format.match('W') ? '!' : null));
708		show[D] = (format.match('d') ? '?' : (format.match('D') ? '!' : null));
709		show[H] = (format.match('h') ? '?' : (format.match('H') ? '!' : null));
710		show[M] = (format.match('m') ? '?' : (format.match('M') ? '!' : null));
711		show[S] = (format.match('s') ? '?' : (format.match('S') ? '!' : null));
712		return show;
713	},
714		/** Calculate the requested periods between now and the target time.
715			@private
716			@param inst {object} The current settings for this instance.
717			@param show {string[]} Flags indicating which periods are requested/required.
718			@param significant {number} The number of periods with values to show, zero for all.
719			@param now {Date} The current date and time.
720			@return {number[]} The current time periods (always positive)
721					by year, month, week, day, hour, minute, second. */
722	_calculatePeriods: function(inst, show, significant, now) {
723		// Find endpoints
724		inst._now = now;
725		inst._now.setMilliseconds(0);
726		var until = new Date(inst._now.getTime());
727		if (inst._since) {
728			if (now.getTime() < inst._since.getTime()) {
729				inst._now = now = until;
730			}
731			else {
732				now = inst._since;
733			}
734		}
735		else {
736			until.setTime(inst._until.getTime());
737			if (now.getTime() > inst._until.getTime()) {
738				inst._now = now = until;
739			}
740		}
741		// Calculate differences by period
742		var periods = [0, 0, 0, 0, 0, 0, 0];
743		if (show[Y] || show[O]) {
744			// Treat end of months as the same
745				var lastNow = this._getDaysInMonth(now.getFullYear(), now.getMonth());
746				var lastUntil = this._getDaysInMonth(until.getFullYear(), until.getMonth());
747			var sameDay = (until.getDate() == now.getDate() ||
748				(until.getDate() >= Math.min(lastNow, lastUntil) &&
749				now.getDate() >= Math.min(lastNow, lastUntil)));
750			var getSecs = function(date) {
751				return (date.getHours() * 60 + date.getMinutes()) * 60 + date.getSeconds();
752			};
753			var months = Math.max(0,
754				(until.getFullYear() - now.getFullYear()) * 12 + until.getMonth() - now.getMonth() +
755				((until.getDate() < now.getDate() && !sameDay) ||
756				(sameDay && getSecs(until) < getSecs(now)) ? -1 : 0));
757			periods[Y] = (show[Y] ? Math.floor(months / 12) : 0);
758			periods[O] = (show[O] ? months - periods[Y] * 12 : 0);
759			// Adjust for months difference and end of month if necessary
760			now = new Date(now.getTime());
761			var wasLastDay = (now.getDate() == lastNow);
762				var lastDay = this._getDaysInMonth(now.getFullYear() + periods[Y],
763				now.getMonth() + periods[O]);
764			if (now.getDate() > lastDay) {
765				now.setDate(lastDay);
766			}
767			now.setFullYear(now.getFullYear() + periods[Y]);
768			now.setMonth(now.getMonth() + periods[O]);
769			if (wasLastDay) {
770				now.setDate(lastDay);
771			}
772		}
773		var diff = Math.floor((until.getTime() - now.getTime()) / 1000);
774		var extractPeriod = function(period, numSecs) {
775			periods[period] = (show[period] ? Math.floor(diff / numSecs) : 0);
776			diff -= periods[period] * numSecs;
777		};
778		extractPeriod(W, 604800);
779		extractPeriod(D, 86400);
780		extractPeriod(H, 3600);
781		extractPeriod(M, 60);
782		extractPeriod(S, 1);
783		if (diff > 0 && !inst._since) { // Round up if left overs
784			var multiplier = [1, 12, 4.3482, 7, 24, 60, 60];
785			var lastShown = S;
786			var max = 1;
787			for (var period = S; period >= Y; period--) {
788				if (show[period]) {
789					if (periods[lastShown] >= max) {
790						periods[lastShown] = 0;
791						diff = 1;
792					}
793					if (diff > 0) {
794						periods[period]++;
795						diff = 0;
796						lastShown = period;
797						max = 1;
798					}
799				}
800				max *= multiplier[period];
801			}
802		}
803		if (significant) { // Zero out insignificant periods
804			for (var period = Y; period <= S; period++) {
805				if (significant && periods[period]) {
806					significant--;
807				}
808				else if (!significant) {
809					periods[period] = 0;
810				}
811			}
812		}
813		return periods;
814	}
815	});
816
817!function(a,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):a.CountUp=e()}(this,function(a,e,n){var t=function(a,e,n,t,i,r){function o(a){a=a.toFixed(s.decimals),a+="";var e,n,t,i;if(e=a.split("."),n=e[0],t=e.length>1?s.options.decimal+e[1]:"",i=/(\d+)(\d{3})/,s.options.useGrouping)for(;i.test(n);)n=n.replace(i,"$1"+s.options.separator+"$2");return s.options.numerals.length&&(n=n.replace(/[0-9]/g,function(a){return s.options.numerals[+a]}),t=t.replace(/[0-9]/g,function(a){return s.options.numerals[+a]})),s.options.prefix+n+t+s.options.suffix}function u(a,e,n,t){return n*(-Math.pow(2,-10*a/t)+1)*1024/1023+e}function l(a){return"number"==typeof a&&!isNaN(a)}var s=this;if(s.version=function(){return"1.9.1"},s.options={useEasing:!0,useGrouping:!0,separator:",",decimal:".",easingFn:u,formattingFn:o,prefix:"",suffix:"",numerals:[]},r&&"object"==typeof r)for(var m in s.options)r.hasOwnProperty(m)&&null!==r[m]&&(s.options[m]=r[m]);""===s.options.separator&&(s.options.useGrouping=!1);for(var d=0,c=["webkit","moz","ms","o"],f=0;f<c.length&&!window.requestAnimationFrame;++f)window.requestAnimationFrame=window[c[f]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[c[f]+"CancelAnimationFrame"]||window[c[f]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(a,e){var n=(new Date).getTime(),t=Math.max(0,16-(n-d)),i=window.setTimeout(function(){a(n+t)},t);return d=n+t,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(a){clearTimeout(a)}),s.initialize=function(){return!!s.initialized||(s.error="",s.d="string"==typeof a?document.getElementById(a):a,s.d?(s.startVal=Number(e),s.endVal=Number(n),l(s.startVal)&&l(s.endVal)?(s.decimals=Math.max(0,t||0),s.dec=Math.pow(10,s.decimals),s.duration=1e3*Number(i)||2e3,s.countDown=s.startVal>s.endVal,s.frameVal=s.startVal,s.initialized=!0,!0):(s.error="[CountUp] startVal ("+e+") or endVal ("+n+") is not a number",!1)):(s.error="[CountUp] target is null or undefined",!1))},s.printValue=function(a){var e=s.options.formattingFn(a);"INPUT"===s.d.tagName?this.d.value=e:"text"===s.d.tagName||"tspan"===s.d.tagName?this.d.textContent=e:this.d.innerHTML=e}
817,s.count=function(a){s.startTime||(s.startTime=a),s.timestamp=a;var e=a-s.startTime;s.remaining=s.duration-e,s.options.useEasing?s.countDown?s.frameVal=s.startVal-s.options.easingFn(e,0,s.startVal-s.endVal,s.duration):s.frameVal=s.options.easingFn(e,s.startVal,s.endVal-s.startVal,s.duration):s.countDown?s.frameVal=s.startVal-(s.startVal-s.endVal)*(e/s.duration):s.frameVal=s.startVal+(s.endVal-s.startVal)*(e/s.duration),s.countDown?s.frameVal=s.frameVal<s.endVal?s.endVal:s.frameVal:s.frameVal=s.frameVal>s.endVal?s.endVal:s.frameVal,s.frameVal=Math.round(s.frameVal*s.dec)/s.dec,s.printValue(s.frameVal),e<s.duration?s.rAF=requestAnimationFrame(s.count):s.callback&&s.callback()},s.start=function(a){s.initialize()&&(s.callback=a,s.rAF=requestAnimationFrame(s.count))},s.pauseResume=function(){s.paused?(s.paused=!1,delete s.startTime,s.duration=s.remaining,s.startVal=s.frameVal,requestAnimationFrame(s.count)):(s.paused=!0,cancelAnimationFrame(s.rAF))},s.reset=function(){s.paused=!1,delete s.startTime,s.initialized=!1,s.initialize()&&(cancelAnimationFrame(s.rAF),s.printValue(s.startVal))},s.update=function(a){if(s.initialize()){if(a=Number(a),!l(a))return void(s.error="[CountUp] update() - new endVal is not a number: "+a);s.error="",a!==s.frameVal&&(cancelAnimationFrame(s.rAF),s.paused=!1,delete s.startTime,s.startVal=s.frameVal,s.endVal=a,s.countDown=s.startVal>s.endVal,s.rAF=requestAnimationFrame(s.count))}},s.initialize()&&s.printValue(s.startVal)};return t});
818})(jQuery);
819
820
821!function(a,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):a.CountUp=e()}(this,function(a,e,n){var t=function(a,e,n,t,i,r){function o(a){a=a.toFixed(s.decimals),a+="";var e,n,t,i;if(e=a.split("."),n=e[0],t=e.length>1?s.options.decimal+e[1]:"",i=/(\d+)(\d{3})/,s.options.useGrouping)for(;i.test(n);)n=n.replace(i,"$1"+s.options.separator+"$2");return s.options.numerals.length&&(n=n.replace(/[0-9]/g,function(a){return s.options.numerals[+a]}),t=t.replace(/[0-9]/g,function(a){return s.options.numerals[+a]})),s.options.prefix+n+t+s.options.suffix}function u(a,e,n,t){return n*(-Math.pow(2,-10*a/t)+1)*1024/1023+e}function l(a){return"number"==typeof a&&!isNaN(a)}var s=this;if(s.version=function(){return"1.9.1"},s.options={useEasing:!0,useGrouping:!0,separator:",",decimal:".",easingFn:u,formattingFn:o,prefix:"",suffix:"",numerals:[]},r&&"object"==typeof r)for(var m in s.options)r.hasOwnProperty(m)&&null!==r[m]&&(s.options[m]=r[m]);""===s.options.separator&&(s.options.useGrouping=!1);for(var d=0,c=["webkit","moz","ms","o"],f=0;f<c.length&&!window.requestAnimationFrame;++f)window.requestAnimationFrame=window[c[f]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[c[f]+"CancelAnimationFrame"]||window[c[f]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(a,e){var n=(new Date).getTime(),t=Math.max(0,16-(n-d)),i=window.setTimeout(function(){a(n+t)},t);return d=n+t,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(a){clearTimeout(a)}),s.initialize=function(){return!!s.initialized||(s.error="",s.d="string"==typeof a?document.getElementById(a):a,s.d?(s.startVal=Number(e),s.endVal=Number(n),l(s.startVal)&&l(s.endVal)?(s.decimals=Math.max(0,t||0),s.dec=Math.pow(10,s.decimals),s.duration=1e3*Number(i)||2e3,s.countDown=s.startVal>s.endVal,s.frameVal=s.startVal,s.initialized=!0,!0):(s.error="[CountUp] startVal ("+e+") or endVal ("+n+") is not a number",!1)):(s.error="[CountUp] target is null or undefined",!1))},s.printValue=function(a){var e=s.options.formattingFn(a);"INPUT"===s.d.tagName?this.d.value=e:"text"===s.d.tagName||"tspan"===s.d.tagName?this.d.textContent=e:this.d.innerHTML=e},s.count=function(a){s.startTime||(s.startTime=a),s.timestamp=a;var e=a-s.startTime;s.remaining=s.duration-e,s.options.useEasing?s.countDown?s.frameVal=s.startVal-s.options.easingFn(e,0,s.startVal-s.endVal,s.duration):s.frameVal=s.options.easingFn(e,s.startVal,s.endVal-s.startVal,s.duration):s.countDown?s.frameVal=s.startVal-(s.startVal-s.endVal)*(e/s.duration):s.frameVal=s.startVal+(s.endVal-s.startVal)*(e/s.duration),s.countDown?s.frameVal=s.frameVal<s.endVal?s.endVal:s.frameVal:s.frameVal=s.frameVal>s.endVal?s.endVal:s.frameVal,s.frameVal=Math.round(s.frameVal*s.dec)/s.dec,s.printValue(s.frameVal),e<s.duration?s.rAF=requestAnimationFrame(s.count):s.callback&&s.callback()},s.start=function(a){s.initialize()&&(s.callback=a,s.rAF=requestAnimationFrame(s.count))},s.pauseResume=function(){s.paused?(s.paused=!1,delete s.startTime,s.duration=s.remaining,s.startVal=s.frameVal,requestAnimationFrame(s.count)):(s.paused=!0,cancelAnimationFrame(s.rAF))},s.reset=function(){s.paused=!1,delete s.startTime,s.initialized=!1,s.initialize()&&(cancelAnimationFrame(s.rAF),s.printValue(s.startVal))}
821,s.update=function(a){if(s.initialize()){if(a=Number(a),!l(a))return void(s.error="[CountUp] update() - new endVal is not a number: "+a);s.error="",a!==s.frameVal&&(cancelAnimationFrame(s.rAF),s.paused=!1,delete s.startTime,s.startVal=s.frameVal,s.endVal=a,s.countDown=s.startVal>s.endVal,s.rAF=requestAnimationFrame(s.count))}},s.initialize()&&s.printValue(s.startVal)};return t});

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.