1/* 2 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development"). 3 * This devtool is neither made for production nor for readable output files. 4 * It uses "eval()" calls to create a separate source file in the browser devtools. 5 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) 6 * or disable the default devtool with "devtool: false". 7 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). 8 */ 9(self["webpackChunklanding_page"] = self["webpackChunklanding_page"] || []).push([["src_assets_js_common_main_js"],{ 10
11/***/ "./src/assets/js/common/cookie.js": 12/*!****************************************!*\ 13 !*** ./src/assets/js/common/cookie.js ***! 14 \****************************************/ 15/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 16 17"use strict"; 18eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ getcookie: function() { return /* binding */ getcookie; },\n/* harmony export */ setcookie: function() { return /* binding */ setcookie; }\n/* harmony export */ });\nfunction setcookie(a,b,c) {if(c){var d = new Date();d.setDate(d.getDate()+c);}if(a && b) document.cookie = a+'='+b+(c ? '; expires='+d.toUTCString() : '')+';path=/';else return false;}\nfunction getcookie(a) {var b = new RegExp(a+'=([^;]){1,}');var c = b.exec(document.cookie);if(c) c = c[0].split('=');else return false;return c[1] ? c[1] : false;}\n\n\n//# sourceURL=webpack://landing-page/./src/assets/js/common/cookie.js?\n}"); 19 20/***/ }), 21
22/***/ "./src/assets/js/common/main.js": 23/*!**************************************!*\ 24 !*** ./src/assets/js/common/main.js ***! 25 \**************************************/ 26/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 27 28"use strict"; 29eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _plugins_jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../plugins/jquery */ \"./src/assets/js/plugins/jquery/index.js\");\n/* harmony import */ var _libs_feedback_form__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../libs/feedback-form */ \"./src/assets/js/libs/feedback-form.js\");\n/* harmony import */ var _cookie_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cookie.js */ \"./src/assets/js/common/cookie.js\");\n/* harmony import */ var _libs_countdown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../libs/countdown */ \"./src/assets/js/libs/countdown.js\");\n/* harmony import */ var _libs_countdown__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_libs_countdown__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\n\n\n(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function() {\n// Cache selectors\n\tvar hamburgerMenuButtonOpen = (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.hamburger-menu-button-open'),\n \thamburgerMenuButtonClose = (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.hamburger-menu-button-close'),\n\t\thamburgerMenu = (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.hamburger-menu'),\n\t\tmenuBlackout = (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.blackout-menu'),\n\t\tbfCommingBanner = (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.countdown-banner'),\n\t\tbfBanner = (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.bf-banner'),\n\t\tbfEnds = new Date('Dec 1, 2025 23:59:59'),\n\t\tbfStarts = new Date('Nov 13, 2025 23:00:00');\n\thamburgerMenuButtonOpen.click(function() {\n\t\thamburgerMenu.addClass('active');\n\t\tmenuBlackout.fadeIn();\n\t});\n\thamburgerMenuButtonClose.click(function() {\n\t\thamburgerMenu.removeClass('active');\n\t\tmenuBlackout.fadeOut();\n\t});\n\tmenuBlackout.click(function() {\n\t\thamburgerMenu.removeClass('active');\n\t\tmenuBlackout.fadeOut();\n\t});\n\n\tfunction checkIfBFEnded() {\n\t\tvar now = new Date();\n\t\tvar nowTS = now.getTime();\n\t\tvar bfEndsTS = bfEnds.getTime();\n\t\tvar bfStartsTs = bfStarts.getTime();\n\n\t\tif (bfEndsTS <= nowTS) {\n\t\t\t(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.hello-banner-wrap').css('display', 'none');\n\t\t\tbfBanner.css('display', 'none');\n\t\t} else {\n\t\t\tif(bfStartsTs < nowTS) {\n\t\t\t\t(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.hello-banner-wrap').addClass('sale');\n\t\t\t}\n\t\t}\n\t}\n\n\tvar timerId =\n\t\t_libs_countdown__WEBPACK_IMPORTED_MODULE_3___default()(\n\t\t\tbfStarts,\n\t\t\tfunction(ts) {\n\t\t\t\tif(ts.value >= 0) {\n\t\t\t\t\tbfCommingBanner.remove();\n\t\t\t\t\tbfBanner.css('display', 'block');\n\t\t\t\t\twindow.clearInterval(timerId);\n\t\t\t\t\tcheckIfBFEnded();\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\t(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('#bf-timer').html(ts.toHTML('span'));\n\n\t\t\t}, (_libs_countdown__WEBPACK_IMPORTED_MODULE_3___default().DAYS)|(_libs_countdown__WEBPACK_IMPORTED_MODULE_3___default().HOURS)|(_libs_countdown__WEBPACK_IMPORTED_MODULE_3___default().MINUTES)|(_libs_countdown__WEBPACK_IMPORTED_MODULE_3___default().SECONDS));\n\n\t(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.book-a-demo-link').click(function() {\n\t\t(0,_cookie_js__WEBPACK_IMPORTED_MODULE_2__.setcookie)(\"ChantyCookie\",\"true\",7);\n\t});\n\n\t(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(window).scroll(function(){\n\t\tif ((0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).scrollTop() > 134) {\n\t\t\t(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('#header-sticky').addClass('opened');\n\t\t} else {\n\t\t\t(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('#header-sticky').removeClass('opened');\n\t\t}\n\t});\n\n\tif((0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.lang-change')) {\n\t\t(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.lang-change').on('change', function(){\n\t\t\tdocument.location = (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).find(\":selected\").val();\n\t\t})\n\t}\n\n\t(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.menu-section').click(function(){\n\t\tif((0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).parent().hasClass('active')) {\n\t\t\t(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).parent().removeClass('active');\n\t\t} else {\n\t\t\t(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.menu').removeClass('active');\n\t\t\t(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).parent().addClass('active');\n\t\t}\n\t});\n\n\t(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.close-banner').click(function(event){\n\t\tevent.stopPropagation();\n\t\t(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.hello-banner-wrap').hide();\n\t})\n\n\t;(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.use-cases-item').click(function(){\n\t\tif((0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).hasClass('active')) {\n\t\t\t(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).removeClass('active');\n\t\t} else {\n\t\t\t(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).addClass('active');\n\t\t}\n\t})\n});\n\n\n//# sourceURL=webpack://landing-page/./src/assets/js/common/main.js?\n}"); 30 31/***/ }), 32
33/***/ "./src/assets/js/libs/countdown.js": 34/*!*****************************************!*\ 35 !*** ./src/assets/js/libs/countdown.js ***! 36 \*****************************************/ 37/***/ (function(module) { 38 39eval("{/*global window module */\n/**\n * @license countdown.js v2.6.1 http://countdownjs.org\n * Copyright (c)2006-2014 Stephen M. McKamey.\n * Licensed under The MIT License.\n */\n/*jshint bitwise:false */\n\n/**\n * API entry\n * @public\n * @param {function(Object)|Date|number} start the starting date\n * @param {function(Object)|Date|number} end the ending date\n * @param {number} units the units to populate\n * @return {Object|number}\n */\nvar countdown = (\n\n\tfunction() {\n\t\t/*jshint smarttabs:true */\n\t\n\t\t'use strict';\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar MILLISECONDS\t= 0x001;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar SECONDS\t\t\t= 0x002;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar MINUTES\t\t\t= 0x004;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar HOURS\t\t\t= 0x008;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar DAYS\t\t\t= 0x010;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar WEEKS\t\t\t= 0x020;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar MONTHS\t\t\t= 0x040;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar YEARS\t\t\t= 0x080;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar DECADES\t\t\t= 0x100;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar CENTURIES\t\t= 0x200;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar MILLENNIA\t\t= 0x400;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar DEFAULTS\t\t= YEARS|MONTHS|DAYS|HOURS|MINUTES|SECONDS;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar MILLISECONDS_PER_SECOND = 1000;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar SECONDS_PER_MINUTE = 60;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar MINUTES_PER_HOUR = 60;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar HOURS_PER_DAY = 24;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar MILLISECONDS_PER_DAY = HOURS_PER_DAY * MINUTES_PER_HOUR * SECONDS_PER_MINUTE * MILLISECONDS_PER_SECOND;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar DAYS_PER_WEEK = 7;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar MONTHS_PER_YEAR = 12;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar YEARS_PER_DECADE = 10;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar DECADES_PER_CENTURY = 10;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar CENTURIES_PER_MILLENNIUM = 10;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @param {number} x number\n\t\t * @return {number}\n\t\t */\n\t\tvar ceil = Math.ceil;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @param {number} x number\n\t\t * @return {number}\n\t\t */\n\t\tvar floor = Math.floor;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @param {Date} ref reference date\n\t\t * @param {number} shift number of months to shift\n\t\t * @return {number} number of days shifted\n\t\t */\n\t\tfunction borrowMonths(ref, shift) {\n\t\t\tvar prevTime = ref.getTime();\n\t\n\t\t\t// increment month by shift\n\t\t\tref.setMonth( ref.getMonth() + shift );\n\t\n\t\t\t// this is the trickiest since months vary in length\n\t\t\treturn Math.round( (ref.getTime() - prevTime) / MILLISECONDS_PER_DAY );\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t * @param {Date} ref reference date\n\t\t * @return {number} number of days\n\t\t */\n\t\tfunction daysPerMonth(ref) {\n\t\t\tvar a = ref.getTime();\n\t\n\t\t\t// increment month by 1\n\t\t\tvar b = new Date(a);\n\t\t\tb.setMonth( ref.getMonth() + 1 );\n\t\n\t\t\t// this is the trickiest since months vary in length\n\t\t\treturn Math.round( (b.getTime() - a) / MILLISECONDS_PER_DAY );\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t * @param {Date} ref reference date\n\t\t * @return {number} number of days\n\t\t */\n\t\tfunction daysPerYear(ref) {\n\t\t\tvar a = ref.getTime();\n\t\n\t\t\t// increment year by 1\n\t\t\tvar b = new Date(a);\n\t\t\tb.setFullYear( ref.getFullYear() + 1 );\n\t\n\t\t\t// this is the trickiest since years (periodically) vary in length\n\t\t\treturn Math.round( (b.getTime() - a) / MILLISECONDS_PER_DAY );\n\t\t}\n\t\n\t\t/**\n\t\t * Applies the Timespan to the given date.\n\t\t * \n\t\t * @private\n\t\t * @param {Timespan} ts\n\t\t * @param {Date=} date\n\t\t * @return {Date}\n\t\t */\n\t\tfunction addToDate(ts, date) {\n\t\t\tdate = (date instanceof Date) || ((date !== null) && isFinite(date)) ? new Date(+date) : new Date();\n\t\t\tif (!ts) {\n\t\t\t\treturn date;\n\t\t\t}\n\t\n\t\t\t// if there is a value field, use it directly\n\t\t\tvar value = +ts.value || 0;\n\t\t\tif (value) {\n\t\t\t\tdate.setTime(date.getTime() + value);\n\t\t\t\treturn date;\n\t\t\t}\n\t\n\t\t\tvalue = +ts.milliseconds || 0;\n\t\t\tif (value) {\n\t\t\t\tdate.setMilliseconds(date.getMilliseconds() + value);\n\t\t\t}\n\t\n\t\t\tvalue = +ts.seconds || 0;\n\t\t\tif (value) {\n\t\t\t\tdate.setSeconds(date.getSeconds() + value);\n\t\t\t}\n\t\n\t\t\tvalue = +ts.minutes || 0;\n\t\t\tif (value) {\n\t\t\t\tdate.setMinutes(date.getMinutes() + value);\n\t\t\t}\n\t\n\t\t\tvalue = +ts.hours || 0;\n\t\t\tif (value) {\n\t\t\t\tdate.setHours(date.getHours() + value);\n\t\t\t}\n\t\n\t\t\tvalue = +ts.weeks || 0;\n\t\t\tif (value) {\n\t\t\t\tvalue *= DAYS_PER_WEEK;\n\t\t\t}\n\t\n\t\t\tvalue += +ts.days || 0;\n\t\t\tif (value) {\n\t\t\t\tdate.setDate(date.getDate() + value);\n\t\t\t}\n\t\n\t\t\tvalue = +ts.months || 0;\n\t\t\tif (value) {\n\t\t\t\tdate.setMonth(date.getMonth() + value);\n\t\t\t}\n\t\n\t\t\tvalue = +ts.millennia || 0;\n\t\t\tif (value) {\n\t\t\t\tvalue *= CENTURIES_PER_MILLENNIUM;\n\t\t\t}\n\t\n\t\t\tvalue += +ts.centuries || 0;\n\t\t\tif (value) {\n\t\t\t\tvalue *= DECADES_PER_CENTURY;\n\t\t\t}\n\t\n\t\t\tvalue += +ts.decades || 0;\n\t\t\tif (value) {\n\t\t\t\tvalue *= YEARS_PER_DECADE;\n\t\t\t}\n\t\n\t\t\tvalue += +ts.years || 0;\n\t\t\tif (value) {\n\t\t\t\tdate.setFullYear(date.getFullYear() + value);\n\t\t\t}\n\t\n\t\t\treturn date;\n\t\t}\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar LABEL_MILLISECONDS\t= 0;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar LABEL_SECONDS\t\t= 1;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar LABEL_MINUTES\t\t= 2;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar LABEL_HOURS\t\t\t= 3;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar LABEL_DAYS\t\t\t= 4;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar LABEL_WEEKS\t\t\t= 5;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar LABEL_MONTHS\t\t= 6;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar LABEL_YEARS\t\t\t= 7;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar LABEL_DECADES\t\t= 8;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar LABEL_CENTURIES\t\t= 9;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tvar LABEL_MILLENNIA\t\t= 10;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @type {Array}\n\t\t */\n\t\tvar LABELS_SINGLUAR;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @type {Array}\n\t\t */\n\t\tvar LABELS_PLURAL;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @type {string}\n\t\t */\n\t\tvar LABEL_LAST;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @type {string}\n\t\t */\n\t\tvar LABEL_DELIM;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @type {string}\n\t\t */\n\t\tvar LABEL_NOW;\n\t\n\t\t/**\n\t\t * Formats a number & unit as a string\n\t\t * \n\t\t * @param {number}
39 value\n\t\t * @param {number} unit\n\t\t * @return {string}\n\t\t */\n\t\tvar formatter;\n\t\n\t\t/**\n\t\t * Formats a number as a string\n\t\t * \n\t\t * @private\n\t\t * @param {number} value\n\t\t * @return {string}\n\t\t */\n\t\tvar formatNumber;\n\t\n\t\t/**\n\t\t * @private\n\t\t * @param {number} value\n\t\t * @param {number} unit unit index into label list\n\t\t * @return {string}\n\t\t */\n\t\tfunction plurality(value, unit) {\n\t\t\treturn formatNumber(value)+((value === 1) ? LABELS_SINGLUAR[unit] : LABELS_PLURAL[unit]);\n\t\t}\n\t\n\t\t/**\n\t\t * Formats the entries with singular or plural labels\n\t\t * \n\t\t * @private\n\t\t * @param {Timespan} ts\n\t\t * @return {Array}\n\t\t */\n\t\tvar formatList;\n\t\n\t\t/**\n\t\t * Timespan representation of a duration of time\n\t\t * \n\t\t * @private\n\t\t * @this {Timespan}\n\t\t * @constructor\n\t\t */\n\t\tfunction Timespan() {}\n\t\n\t\t/**\n\t\t * Formats the Timespan as a sentence\n\t\t * \n\t\t * @param {string=} emptyLabel the string to use when no values returned\n\t\t * @return {string}\n\t\t */\n\t\tTimespan.prototype.toString = function(emptyLabel) {\n\t\t\tvar label = formatList(this);\n\t\n\t\t\tvar count = label.length;\n\t\t\tif (!count) {\n\t\t\t\treturn emptyLabel ? ''+emptyLabel : LABEL_NOW;\n\t\t\t}\n\t\t\tif (count === 1) {\n\t\t\t\treturn label[0];\n\t\t\t}\n\t\n\t\t\tvar last = LABEL_LAST+label.pop();\n\t\t\treturn label.join(LABEL_DELIM)+last;\n\t\t};\n\t\n\t\t/**\n\t\t * Formats the Timespan as a sentence in HTML\n\t\t * \n\t\t * @param {string=} tag HTML tag name to wrap each value\n\t\t * @param {string=} emptyLabel the string to use when no values returned\n\t\t * @return {string}\n\t\t */\n\t\tTimespan.prototype.toHTML = function(tag, emptyLabel) {\n\t\t\ttag = tag || 'span';\n\t\t\tvar label = formatList(this);\n\t\n\t\t\tvar count = label.length;\n\t\t\tif (!count) {\n\t\t\t\temptyLabel = emptyLabel || LABEL_NOW;\n\t\t\t\treturn emptyLabel ? '<'+tag+'>'+emptyLabel+'</'+tag+'>' : emptyLabel;\n\t\t\t}\n\t\t\tfor (var i=0; i<count; i++) {\n\t\t\t\t// wrap each unit in tag\n\t\t\t\tlabel[i] = '<'+tag+'>'+label[i]+'</'+tag+'>';\n\t\t\t}\n\t\t\tif (count === 1) {\n\t\t\t\treturn label[0];\n\t\t\t}\n\t\n\t\t\tvar last = LABEL_LAST+label.pop();\n\t\t\treturn label.join(LABEL_DELIM)+last;\n\t\t};\n\t\n\t\t/**\n\t\t * Applies the Timespan to the given date\n\t\t * \n\t\t * @param {Date=} date the date to which the timespan is added.\n\t\t * @return {Date}\n\t\t */\n\t\tTimespan.prototype.addTo = function(date) {\n\t\t\treturn addToDate(this, date);\n\t\t};\n\t\n\t\t/**\n\t\t * Formats the entries as English labels\n\t\t * \n\t\t * @private\n\t\t * @param {Timespan} ts\n\t\t * @return {Array}\n\t\t */\n\t\tformatList = function(ts) {\n\t\t\tvar list = [];\n\t\n var value = ts.millennia;\n if (value || value === 0) {\n list.push(formatter(value, LABEL_MILLENNIA));\n }\n\t\n value = ts.centuries;\n if (value || value === 0) {\n list.push(formatter(value, LABEL_CENTURIES));\n }\n\t\n value = ts.decades;\n if (value || value === 0) {\n list.push(formatter(value, LABEL_DECADES));\n }\n\t\n value = ts.years;\n\t\t\tif (value || value === 0) {\n list.push(formatter(value, LABEL_YEARS));\n }\n\t\n value = ts.months;\n\t\t\tif (value || value === 0) {\n list.push(formatter(value, LABEL_MONTHS));\n }\n\t\n value = ts.weeks;\n if (value || value === 0) {\n list.push(formatter(value, LABEL_WEEKS));\n }\n\n\t\t\tvalue = ts.days;\n\t\t\tif (value) {\n\t\t\t\tlist.push(formatter(value, LABEL_DAYS));\n\t\t\t}\n\t\n\t\t\tvalue = ts.hours;\n\t\t\tif (value) {\n\t\t\t\tlist.push(formatter(value, LABEL_HOURS));\n\t\t\t}\n\t\n\t\t\tvalue = ts.minutes;\n\t\t\tif (value) {\n\t\t\t\tlist.push(formatter(value, LABEL_MINUTES));\n\t\t\t}\n\t\n\t\t\tvalue = ts.seconds;\n\t\t\tif (value || value === 0) {\n\t\t\t\tlist.push(formatter(value, LABEL_SECONDS));\n\t\t\t}\n\t\n\t\t\tvalue = ts.milliseconds;\n\t\t\tif (value || value === 0) {\n\t\t\t\tlist.push(formatter(value, LABEL_MILLISECONDS));\n\t\t\t}\n\t\n\t\t\treturn list;\n\t\t};\n\t\n\t\t/**\n\t\t * Borrow any underflow units, carry any overflow units\n\t\t * \n\t\t * @private\n\t\t * @param {Timespan} ts\n\t\t * @param {string} toUnit\n\t\t */\n\t\tfunction rippleRounded(ts, toUnit) {\n\t\t\tswitch (toUnit) {\n\t\t\t\tcase 'seconds':\n\t\t\t\t\tif (ts.seconds !== SECONDS_PER_MINUTE || isNaN(ts.minutes)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// ripple seconds up to minutes\n\t\t\t\t\tts.minutes++;\n\t\t\t\t\tts.seconds = 0;\n\t\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 'minutes':\n\t\t\t\t\tif (ts.minutes !== MINUTES_PER_HOUR || isNaN(ts.hours)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// ripple minutes up to hours\n\t\t\t\t\tts.hours++;\n\t\t\t\t\tts.minutes = 0;\n\t\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 'hours':\n\t\t\t\t\tif (ts.hours !== HOURS_PER_DAY || isNaN(ts.days)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// ripple hours up to days\n\t\t\t\t\tts.days++;\n\t\t\t\t\tts.hours = 0;\n\t\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 'days':\n\t\t\t\t\tif (ts.days !== DAYS_PER_WEEK || isNaN(ts.weeks)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// ripple days up to weeks\n\t\t\t\t\tts.weeks++;\n\t\t\t\t\tts.days = 0;\n\t\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 'weeks':\n\t\t\t\t\tif (ts.weeks !== daysPerMonth(ts.refMonth)/DAYS_PER_WEEK || isNaN(ts.months)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// ripple weeks up to months\n\t\t\t\t\tts.months++;\n\t\t\t\t\tts.weeks = 0;\n\t\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 'months':\n\t\t\t\t\tif (ts.months !== MONTHS_PER_YEAR || isNaN(ts.years)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// ripple months up to years\n\t\t\t\t\tts.years++;\n\t\t\t\t\tts.months = 0;
39\n\t\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 'years':\n\t\t\t\t\tif (ts.years !== YEARS_PER_DECADE || isNaN(ts.decades)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// ripple years up to decades\n\t\t\t\t\tts.decades++;\n\t\t\t\t\tts.years = 0;\n\t\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 'decades':\n\t\t\t\t\tif (ts.decades !== DECADES_PER_CENTURY || isNaN(ts.centuries)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// ripple decades up to centuries\n\t\t\t\t\tts.centuries++;\n\t\t\t\t\tts.decades = 0;\n\t\n\t\t\t\t\t/* falls through */\n\t\t\t\tcase 'centuries':\n\t\t\t\t\tif (ts.centuries !== CENTURIES_PER_MILLENNIUM || isNaN(ts.millennia)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// ripple centuries up to millennia\n\t\t\t\t\tts.millennia++;\n\t\t\t\t\tts.centuries = 0;\n\t\t\t\t\t/* falls through */\n\t\t\t\t}\n\t\t}\n\t\n\t\t/**\n\t\t * Ripple up partial units one place\n\t\t * \n\t\t * @private\n\t\t * @param {Timespan} ts timespan\n\t\t * @param {number} frac accumulated fractional value\n\t\t * @param {string} fromUnit source unit name\n\t\t * @param {string} toUnit target unit name\n\t\t * @param {number} conversion multiplier between units\n\t\t * @param {number} digits max number of decimal digits to output\n\t\t * @return {number} new fractional value\n\t\t */\n\t\tfunction fraction(ts, frac, fromUnit, toUnit, conversion, digits) {\n\t\t\tif (ts[fromUnit] >= 0) {\n\t\t\t\tfrac += ts[fromUnit];\n\t\t\t\tdelete ts[fromUnit];\n\t\t\t}\n\t\n\t\t\tfrac /= conversion;\n\t\t\tif (frac + 1 <= 1) {\n\t\t\t\t// drop if below machine epsilon\n\t\t\t\treturn 0;\n\t\t\t}\n\t\n\t\t\tif (ts[toUnit] >= 0) {\n\t\t\t\t// ensure does not have more than specified number of digits\n\t\t\t\tts[toUnit] = +(ts[toUnit] + frac).toFixed(digits);\n\t\t\t\trippleRounded(ts, toUnit);\n\t\t\t\treturn 0;\n\t\t\t}\n\t\n\t\t\treturn frac;\n\t\t}\n\t\n\t\t/**\n\t\t * Ripple up partial units to next existing\n\t\t * \n\t\t * @private\n\t\t * @param {Timespan} ts\n\t\t * @param {number} digits max number of decimal digits to output\n\t\t */\n\t\tfunction fractional(ts, digits) {\n\t\t\tvar frac = fraction(ts, 0, 'milliseconds', 'seconds', MILLISECONDS_PER_SECOND, digits);\n\t\t\tif (!frac) { return; }\n\t\n\t\t\tfrac = fraction(ts, frac, 'seconds', 'minutes', SECONDS_PER_MINUTE, digits);\n\t\t\tif (!frac) { return; }\n\t\n\t\t\tfrac = fraction(ts, frac, 'minutes', 'hours', MINUTES_PER_HOUR, digits);\n\t\t\tif (!frac) { return; }\n\t\n\t\t\tfrac = fraction(ts, frac, 'hours', 'days', HOURS_PER_DAY, digits);\n\t\t\tif (!frac) { return; }\n\t\n\t\t\tfrac = fraction(ts, frac, 'days', 'weeks', DAYS_PER_WEEK, digits);\n\t\t\tif (!frac) { return; }\n\t\n\t\t\tfrac = fraction(ts, frac, 'weeks', 'months', daysPerMonth(ts.refMonth)/DAYS_PER_WEEK, digits);\n\t\t\tif (!frac) { return; }\n\t\n\t\t\tfrac = fraction(ts, frac, 'months', 'years', daysPerYear(ts.refMonth)/daysPerMonth(ts.refMonth), digits);\n\t\t\tif (!frac) { return; }\n\t\n\t\t\tfrac = fraction(ts, frac, 'years', 'decades', YEARS_PER_DECADE, digits);\n\t\t\tif (!frac) { return; }\n\t\n\t\t\tfrac = fraction(ts, frac, 'decades', 'centuries', DECADES_PER_CENTURY, digits);\n\t\t\tif (!frac) { return; }\n\t\n\t\t\tfrac = fraction(ts, frac, 'centuries', 'millennia', CENTURIES_PER_MILLENNIUM, digits);\n\t\n\t\t\t// should never reach this with remaining fractional value\n\t\t\tif (frac) { throw new Error('Fractional unit overflow'); }\n\t\t}\n\t\n\t\t/**\n\t\t * Borrow any underflow units, carry any overflow units\n\t\t * \n\t\t * @private\n\t\t * @param {Timespan} ts\n\t\t */\n\t\tfunction ripple(ts) {\n\t\t\tvar x;\n\t\n\t\t\tif (ts.milliseconds < 0) {\n\t\t\t\t// ripple seconds down to milliseconds\n\t\t\t\tx = ceil(-ts.milliseconds / MILLISECONDS_PER_SECOND);\n\t\t\t\tts.seconds -= x;\n\t\t\t\tts.milliseconds += x * MILLISECONDS_PER_SECOND;\n\t\n\t\t\t} else if (ts.milliseconds >= MILLISECONDS_PER_SECOND) {\n\t\t\t\t// ripple milliseconds up to seconds\n\t\t\t\tts.seconds += floor(ts.milliseconds / MILLISECONDS_PER_SECOND);\n\t\t\t\tts.milliseconds %= MILLISECONDS_PER_SECOND;\n\t\t\t}\n\t\n\t\t\tif (ts.seconds < 0) {\n\t\t\t\t// ripple minutes down to seconds\n\t\t\t\tx = ceil(-ts.seconds / SECONDS_PER_MINUTE);\n\t\t\t\tts.minutes -= x;\n\t\t\t\tts.seconds += x * SECONDS_PER_MINUTE;\n\t\n\t\t\t} else if (ts.seconds >= SECONDS_PER_MINUTE) {\n\t\t\t\t// ripple seconds up to minutes\n\t\t\t\tts.minutes += floor(ts.seconds / SECONDS_PER_MINUTE);\n\t\t\t\tts.seconds %= SECONDS_PER_MINUTE;\n\t\t\t}\n\t\n\t\t\tif (ts.minutes < 0) {\n\t\t\t\t// ripple hours down to minutes\n\t\t\t\tx = ceil(-ts.minutes / MINUTES_PER_HOUR);\n\t\t\t\tts.hours -= x;\n\t\t\t\tts.minutes += x * MINUTES_PER_HOUR;\n\t\n\t\t\t} else if (ts.minutes >= MINUTES_PER_HOUR) {\n\t\t\t\t// ripple minutes up to hours\n\t\t\t\tts.hours += floor(ts.minutes / MINUTES_PER_HOUR);\n\t\t\t\tts.minutes %= MINUTES_PER_HOUR;\n\t\t\t}\n\t\n\t\t\tif (ts.hours < 0) {\n\t\t\t\t// ripple days down to hours\n\t\t\t\tx = ceil(-ts.hours / HOURS_PER_DAY);\n\t\t\t\tts.days -= x;\n\t\t\t\tts.hours += x * HOURS_PER_DAY;\n\t\n\t\t\t} else if (ts.hours >= HOURS_PER_DAY) {\n\t\t\t\t// ripple hours up to days\n\t\t\t\tts.days += floor(ts.hours / HOURS_PER_DAY);\n\t\t\t\tts.hours %= HOURS_PER_DAY;\n\t\t\t}\n\t\n\t\t\twhile (ts.days < 0) {\n\t\t\t\t// NOTE: never actually seen this loop more than once\n\t\n\t\t\t\t// ripple months down to days\n\t\t\t\tts.months--;\n\t\t\t\tts.days += borrowMonths(ts.refMonth, 1);\n\t\t\t}\n\t\n\t\t\t// weeks is always zero here\n\t\n\t\t\tif (ts.days >= DAYS_PER_WEEK) {\n\t\t\t\t// ripple days up to weeks\n\t\t\t\tts.weeks += floor(ts.days / DAYS_PER_WEEK);\n\t\t\t\tts.days %= DAYS_PER_WEEK;\n\t\t\t}\n\t\n\t\t\tif (ts.months < 0) {\n\t\t\t\t// ripple years down to months\n\t\t\t\tx = ceil(-ts.months / MONTHS_PER_YEAR);\n\t\t\t\tts.years -= x;\n\t\t\t\tts.months += x * MONTHS_PER_YEAR;\n\t\n\t\t\t} else if (ts.months >= MONTHS_PER_YEAR) {\n\t\t\t\t// ripple months up to years\n\t\t\t\tts.years += floor(ts.months / MONTHS_PER_YEAR);\n\t\t\t\tts.months %= MONTHS_PER_YEAR;\n\t\t\t}\n\t\n\t\t\t// years is always non-negative here\n\t\t\t// decades, centuries and millennia are always zero here\n\t\n\t\t\tif (ts.years >= YEARS_PER_DECADE) {\n\t\t\t\t// ripple years up to decades\n\t\t\t\tts.decades += floor(ts.years / YEARS_PER_DECADE);\n\t\t\t\tts.years %= YEARS_PER_DECADE;\n\t\n\t\t\t\tif (ts.decades >= DECADES_PER_CENTURY) {\n\t\t\t\t\t// ripple decades up to centuries\n\t\t\t\t\tts.centuries += floor(ts.decades / DECADES_PER_CENTURY);\n\t\t\t\t\tts.decades %= DECADES_PER_CENTURY;\n\t\n\t\t\t\t\tif (ts.centuries >= CENTURIES_PER_MILLENNIUM) {\n\t\t\t\t\t\t// ripple centuries up to millennia\n\t\t\t\t\t\tts.millennia += floor(ts.centuries / CENTURIES_PER_MILLENNIUM);\n\t\t\t\t\t\tts.centuries %= CENTURIES_PER_MILLENNIUM;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\t/**\n\t\t * Remove any units not requested\n\t\t * \n\t\t * @private\n\t\t * @param {Timespan} ts\n\t\t * @param {number} units the units to populate\n\t\t * @param {number} max number of labels to output\n\t\t * @param {number} digits max number of decimal digits to output\n\t\t */\n\t\tfunction pruneUnits(ts, units, max, digits) {\n\t\t\tvar count = 0;\n\t\n\t\t\t// Calc from largest unit to smallest to prevent underflow\n\t\t\tif (!(u
39nits & MILLENNIA) || (count >= max)) {\n\t\t\t\t// ripple millennia down to centuries\n\t\t\t\tts.centuries += ts.millennia * CENTURIES_PER_MILLENNIUM;\n\t\t\t\tdelete ts.millennia;\n\t\n\t\t\t} else if (ts.millennia) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\n\t\t\tif (!(units & CENTURIES) || (count >= max)) {\n\t\t\t\t// ripple centuries down to decades\n\t\t\t\tts.decades += ts.centuries * DECADES_PER_CENTURY;\n\t\t\t\tdelete ts.centuries;\n\t\n\t\t\t} else if (ts.centuries) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\n\t\t\tif (!(units & DECADES) || (count >= max)) {\n\t\t\t\t// ripple decades down to years\n\t\t\t\tts.years += ts.decades * YEARS_PER_DECADE;\n\t\t\t\tdelete ts.decades;\n\t\n\t\t\t} else if (ts.decades) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\n\t\t\tif (!(units & YEARS) || (count >= max)) {\n\t\t\t\t// ripple years down to months\n\t\t\t\tts.months += ts.years * MONTHS_PER_YEAR;\n\t\t\t\tdelete ts.years;\n\t\n\t\t\t} else if (ts.years) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\n\t\t\tif (!(units & MONTHS) || (count >= max)) {\n\t\t\t\t// ripple months down to days\n\t\t\t\tif (ts.months) {\n\t\t\t\t\tts.days += borrowMonths(ts.refMonth, ts.months);\n\t\t\t\t}\n\t\t\t\tdelete ts.months;\n\t\n\t\t\t\tif (ts.days >= DAYS_PER_WEEK) {\n\t\t\t\t\t// ripple day overflow back up to weeks\n\t\t\t\t\tts.weeks += floor(ts.days / DAYS_PER_WEEK);\n\t\t\t\t\tts.days %= DAYS_PER_WEEK;\n\t\t\t\t}\n\t\n\t\t\t} else if (ts.months) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\n\t\t\tif (!(units & WEEKS) || (count >= max)) {\n\t\t\t\t// ripple weeks down to days\n\t\t\t\tts.days += ts.weeks * DAYS_PER_WEEK;\n\t\t\t\tdelete ts.weeks;\n\t\n\t\t\t} else if (ts.weeks) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\n\t\t\tif (!(units & DAYS) || (count >= max)) {\n\t\t\t\t//ripple days down to hours\n\t\t\t\tts.hours += ts.days * HOURS_PER_DAY;\n\t\t\t\tdelete ts.days;\n\t\n\t\t\t} else if (ts.days) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\n\t\t\tif (!(units & HOURS) || (count >= max)) {\n\t\t\t\t// ripple hours down to minutes\n\t\t\t\tts.minutes += ts.hours * MINUTES_PER_HOUR;\n\t\t\t\tdelete ts.hours;\n\t\n\t\t\t} else if (ts.hours) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\n\t\t\tif (!(units & MINUTES) || (count >= max)) {\n\t\t\t\t// ripple minutes down to seconds\n\t\t\t\tts.seconds += ts.minutes * SECONDS_PER_MINUTE;\n\t\t\t\tdelete ts.minutes;\n\t\n\t\t\t} else if (ts.minutes) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\n\t\t\tif (!(units & SECONDS) || (count >= max)) {\n\t\t\t\t// ripple seconds down to milliseconds\n\t\t\t\tts.milliseconds += ts.seconds * MILLISECONDS_PER_SECOND;\n\t\t\t\tdelete ts.seconds;\n\t\n\t\t\t} else if (ts.seconds) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\n\t\t\t// nothing to ripple milliseconds down to\n\t\t\t// so ripple back up to smallest existing unit as a fractional value\n\t\t\tif (!(units & MILLISECONDS) || (count >= max)) {\n\t\t\t\tfractional(ts, digits);\n\t\t\t}\n\t\t}\n\t\n\t\t/**\n\t\t * Populates the Timespan object\n\t\t * \n\t\t * @private\n\t\t * @param {Timespan} ts\n\t\t * @param {?Date} start the starting date\n\t\t * @param {?Date} end the ending date\n\t\t * @param {number} units the units to populate\n\t\t * @param {number} max number of labels to output\n\t\t * @param {number} digits max number of decimal digits to output\n\t\t */\n\t\tfunction populate(ts, start, end, units, max, digits) {\n\t\t\tvar now = new Date();\n\t\n\t\t\tts.start = start = start || now;\n\t\t\tts.end = end = end || now;\n\t\t\tts.units = units;\n\t\n\t\t\tts.value = end.getTime() - start.getTime();\n\t\t\tif (ts.value < 0) {\n\t\t\t\t// swap if reversed\n\t\t\t\tvar tmp = end;\n\t\t\t\tend = start;\n\t\t\t\tstart = tmp;\n\t\t\t}\n\t\n\t\t\t// reference month for determining days in month\n\t\t\tts.refMonth = new Date(start.getFullYear(), start.getMonth(), 15, 12, 0, 0);\n\t\t\ttry {\n\t\t\t\t// reset to initial deltas\n\t\t\t\tts.millennia = 0;\n\t\t\t\tts.centuries = 0;\n\t\t\t\tts.decades = 0;\n\t\t\t\tts.years = end.getFullYear() - start.getFullYear();\n\t\t\t\tts.months = end.getMonth() - start.getMonth();\n\t\t\t\tts.weeks = 0;\n\t\t\t\tts.days = end.getDate() - start.getDate();\n\t\t\t\tts.hours = end.getHours() - start.getHours();\n\t\t\t\tts.minutes = end.getMinutes() - start.getMinutes();\n\t\t\t\tts.seconds = end.getSeconds() - start.getSeconds();\n\t\t\t\tts.milliseconds = end.getMilliseconds() - start.getMilliseconds();\n\t\n\t\t\t\tripple(ts);\n\t\t\t\tpruneUnits(ts, units, max, digits);\n\t\n\t\t\t} finally {\n\t\t\t\tdelete ts.refMonth;\n\t\t\t}\n\t\n\t\t\treturn ts;\n\t\t}\n\t\n\t\t/**\n\t\t * Determine an appropriate refresh rate based upon units\n\t\t * \n\t\t * @private\n\t\t * @param {number} units the units to populate\n\t\t * @return {number}
39 milliseconds to delay\n\t\t */\n\t\tfunction getDelay(units) {\n\t\t\tif (units & MILLISECONDS) {\n\t\t\t\t// refresh very quickly\n\t\t\t\treturn MILLISECONDS_PER_SECOND / 30; //30Hz\n\t\t\t}\n\t\n\t\t\tif (units & SECONDS) {\n\t\t\t\t// refresh every second\n\t\t\t\treturn MILLISECONDS_PER_SECOND; //1Hz\n\t\t\t}\n\t\n\t\t\tif (units & MINUTES) {\n\t\t\t\t// refresh every minute\n\t\t\t\treturn MILLISECONDS_PER_SECOND * SECONDS_PER_MINUTE;\n\t\t\t}\n\t\n\t\t\tif (units & HOURS) {\n\t\t\t\t// refresh hourly\n\t\t\t\treturn MILLISECONDS_PER_SECOND * SECONDS_PER_MINUTE * MINUTES_PER_HOUR;\n\t\t\t}\n\t\t\t\n\t\t\tif (units & DAYS) {\n\t\t\t\t// refresh daily\n\t\t\t\treturn MILLISECONDS_PER_SECOND * SECONDS_PER_MINUTE * MINUTES_PER_HOUR * HOURS_PER_DAY;\n\t\t\t}\n\t\n\t\t\t// refresh the rest weekly\n\t\t\treturn MILLISECONDS_PER_SECOND * SECONDS_PER_MINUTE * MINUTES_PER_HOUR * HOURS_PER_DAY * DAYS_PER_WEEK;\n\t\t}\n\t\n\t\t/**\n\t\t * API entry point\n\t\t * \n\t\t * @public\n\t\t * @param {Date|number|Timespan|null|function(Timespan,number)} start the starting date\n\t\t * @param {Date|number|Timespan|null|function(Timespan,number)} end the ending date\n\t\t * @param {number=} units the units to populate\n\t\t * @param {number=} max number of labels to output\n\t\t * @param {number=} digits max number of decimal digits to output\n\t\t * @return {Timespan|number}\n\t\t */\n\t\tfunction countdown(start, end, units, max, digits) {\n\t\t\tvar callback;\n\t\n\t\t\t// ensure some units or use defaults\n\t\t\tunits = +units || DEFAULTS;\n\t\t\t// max must be positive\n\t\t\tmax = (max > 0) ? max : NaN;\n\t\t\t// clamp digits to an integer between [0, 20]\n\t\t\tdigits = (digits > 0) ? (digits < 20) ? Math.round(digits) : 20 : 0;\n\t\n\t\t\t// ensure start date\n\t\t\tvar startTS = null;\n\t\t\tif ('function' === typeof start) {\n\t\t\t\tcallback = start;\n\t\t\t\tstart = null;\n\t\n\t\t\t} else if (!(start instanceof Date)) {\n\t\t\t\tif ((start !== null) && isFinite(start)) {\n\t\t\t\t\tstart = new Date(+start);\n\t\t\t\t} else {\n\t\t\t\t\tif ('object' === typeof startTS) {\n\t\t\t\t\t\tstartTS = /** @type{Timespan} */(start);\n\t\t\t\t\t}\n\t\t\t\t\tstart = null;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// ensure end date\n\t\t\tvar endTS = null;\n\t\t\tif ('function' === typeof end) {\n\t\t\t\tcallback = end;\n\t\t\t\tend = null;\n\t\n\t\t\t} else if (!(end instanceof Date)) {\n\t\t\t\tif ((end !== null) && isFinite(end)) {\n\t\t\t\t\tend = new Date(+end);\n\t\t\t\t} else {\n\t\t\t\t\tif ('object' === typeof end) {\n\t\t\t\t\t\tendTS = /** @type{Timespan} */(end);\n\t\t\t\t\t}\n\t\t\t\t\tend = null;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// must wait to interpret timespans until after resolving dates\n\t\t\tif (startTS) {\n\t\t\t\tstart = addToDate(startTS, end);\n\t\t\t}\n\t\t\tif (endTS) {\n\t\t\t\tend = addToDate(endTS, start);\n\t\t\t}\n\t\n\t\t\tif (!start && !end) {\n\t\t\t\t// used for unit testing\n\t\t\t\treturn new Timespan();\n\t\t\t}\n\t\n\t\t\tif (!callback) {\n\t\t\t\treturn populate(new Timespan(), /** @type{Date} */(start), /** @type{Date} */(end), /** @type{number} */(units), /** @type{number} */(max), /** @type{number} */(digits));\n\t\t\t}\n\t\n\t\t\t// base delay off units\n\t\t\tvar delay = getDelay(units),\n\t\t\t\ttimerId,\n\t\t\t\tfn = function() {\n\t\t\t\t\tcallback(\n\t\t\t\t\t\tpopulate(new Timespan(), /** @type{Date} */(start), /** @type{Date} */(end), /** @type{number} */(units), /** @type{number} */(max), /** @type{number} */(digits)),\n\t\t\t\t\t\ttimerId\n\t\t\t\t\t);\n\t\t\t\t};\n\t\n\t\t\tfn();\n\t\t\treturn (timerId = setInterval(fn, delay));\n\t\t}\n\t\n\t\t/**\n\t\t * @public\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tcountdown.MILLISECONDS = MILLISECONDS;\n\t\n\t\t/**\n\t\t * @public\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tcountdown.SECONDS = SECONDS;\n\t\n\t\t/**\n\t\t * @public\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tcountdown.MINUTES = MINUTES;\n\t\n\t\t/**\n\t\t * @public\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tcountdown.HOURS = HOURS;\n\t\n\t\t/**\n\t\t * @public\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tcountdown.DAYS = DAYS;\n\t\n\t\t/**\n\t\t * @public\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tcountdown.WEEKS = WEEKS;\n\t\n\t\t/**\n\t\t * @public\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tcountdown.MONTHS = MONTHS;\n\t\n\t\t/**\n\t\t * @public\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tcountdown.YEARS = YEARS;\n\t\n\t\t/**\n\t\t * @public\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tcountdown.DECADES = DECADES;\n\t\n\t\t/**\n\t\t * @public\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tcountdown.CENTURIES = CENTURIES;\n\t\n\t\t/**\n\t\t * @public\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tcountdown.MILLENNIA = MILLENNIA;\n\t\n\t\t/**\n\t\t * @public\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tcountdown.DEFAULTS = DEFAULTS;\n\t\n\t\t/**\n\t\t * @public\n\t\t * @const\n\t\t * @type {number}\n\t\t */\n\t\tcountdown.ALL = MILLENNIA|CENTURIES|DECADES|YEARS|MONTHS|WEEKS|DAYS|HOURS|MINUTES|SECONDS|MILLISECONDS;\n\t\n\t\t/**\n\t\t * Customize the format settings.\n\t\t * @public\n\t\t * @param {Object} format settings object\n\t\t */\n\t\tvar setFormat = countdown.setFormat = function(format) {\n\t\t\tif (!format) { return; }\n\t\n\t\t\tif ('singular' in format || 'plural' in format) {\n\t\t\t\tvar singular = format.singular || [];\n\t\t\t\tif (singular.split) {\n\t\t\t\t\tsingular = singular.split('|');\n\t\t\t\t}\n\t\t\t\tvar plural = format.plural || [];\n\t\t\t\tif (plural.split) {\n\t\t\t\t\tplural = plural.split('|');\n\t\t\t\t}\n\t\n\t\t\t\tfor (var i=LABEL_MILLISECONDS; i<=LABEL_MILLENNIA;
39 i++) {\n\t\t\t\t\t// override any specified units\n\t\t\t\t\tLABELS_SINGLUAR[i] = singular[i] || LABELS_SINGLUAR[i];\n\t\t\t\t\tLABELS_PLURAL[i] = plural[i] || LABELS_PLURAL[i];\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tif ('string' === typeof format.last) {\n\t\t\t\tLABEL_LAST = format.last;\n\t\t\t}\n\t\t\tif ('string' === typeof format.delim) {\n\t\t\t\tLABEL_DELIM = format.delim;\n\t\t\t}\n\t\t\tif ('string' === typeof format.empty) {\n\t\t\t\tLABEL_NOW = format.empty;\n\t\t\t}\n\t\t\tif ('function' === typeof format.formatNumber) {\n\t\t\t\tformatNumber = format.formatNumber;\n\t\t\t}\n\t\t\tif ('function' === typeof format.formatter) {\n\t\t\t\tformatter = format.formatter;\n\t\t\t}\n\t\t};\n\t\n\t\t/**\n\t\t * Revert to the default formatting.\n\t\t * @public\n\t\t */\n\t\tvar resetFormat = countdown.resetFormat = function() {\n\t\t\tLABELS_SINGLUAR = ' millisecond|<span class=\"time\">sec</span>|<span class=\"time\">min</span>|<span class=\"time\">hr</span>|<span class=\"time\">day</span>| week| month| year| decade| century| millennium'.split('|');\n\t\t\tLABELS_PLURAL = ' milliseconds|<span class=\"time\">sec</span>|<span class=\"time\">mins</span>|<span class=\"time\">hrs</span>|<span class=\"time\">days</span>| weeks| months| years| decades| centuries| millennia'.split('|');\n\t\t\tLABEL_LAST = ' ';\n\t\t\tLABEL_DELIM = ' ';\n\t\t\tLABEL_NOW = '';\n\t\t\tformatNumber = function(value) { return value; };\n\t\t\tformatter = plurality;\n\t\t};\n\t\n\t\t/**\n\t\t * Override the unit labels.\n\t\t * @public\n\t\t * @param {string|Array=} singular a pipe ('|') delimited list of singular unit name overrides\n\t\t * @param {string|Array=} plural a pipe ('|') delimited list of plural unit name overrides\n\t\t * @param {string=} last a delimiter before the last unit (default: ' and ')\n\t\t * @param {string=} delim a delimiter to use between all other units (default: ', ')\n\t\t * @param {string=} empty a label to use when all units are zero (default: '')\n\t\t * @param {function(number):string=}
39 formatNumber a function which formats numbers as a string\n\t\t * @param {function(number,number):string=} formatter a function which formats a number/unit pair as a string\n\t\t * @deprecated since version 2.6.0\n\t\t */\n\t\tcountdown.setLabels = function(singular, plural, last, delim, empty, formatNumber, formatter) {\n\t\t\tsetFormat({\n\t\t\t\tsingular: singular,\n\t\t\t\tplural: plural,\n\t\t\t\tlast: last,\n\t\t\t\tdelim: delim,\n\t\t\t\tempty: empty,\n\t\t\t\tformatNumber: formatNumber,\n\t\t\t\tformatter: formatter\n\t\t\t});\n\t\t};\n\t\n\t\t/**\n\t\t * Revert to the default unit labels.\n\t\t * @public\n\t\t * @deprecated since version 2.6.0\n\t\t */\n\t\tcountdown.resetLabels = resetFormat;\n\t\n\t\tresetFormat();\n\t\n\t\tif ( true && module.exports) {\n\t\t\tmodule.exports = countdown;\n\t\n\t\t} else if (typeof window !== 'undefined' && typeof window.define === 'function' && typeof window.define.amd !== 'undefined') {\n\t\t\twindow.define('countdown', [], function() {\n\t\t\t\treturn countdown;\n\t\t\t});\n\t\t}\n\t\n\t\treturn countdown;\n\t\n\t})();\n\n//# sourceURL=webpack://landing-page/./src/assets/js/libs/countdown.js?\n}"); 40 41/***/ }), 42
43/***/ "./src/assets/js/libs/feedback-form.js": 44/*!*********************************************!*\ 45 !*** ./src/assets/js/libs/feedback-form.js ***! 46 \*********************************************/ 47/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { 48 49"use strict"; 50eval("{__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _plugins_jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../plugins/jquery */ \"./src/assets/js/plugins/jquery/index.js\");\n\n\n(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(function() {\n// Cache selectors\n var contactForms = (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('#email-feedback'),\n contactFormInputs = contactForms.find('.input'),\n errorClass = contactForms.find('.feedback-error'),\n errorEmail = contactForms.find('.feedback-email-error'),\n errorMsg = contactForms.find('.feedback-message-error'),\n blackout = (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.blackout'),\n feedbackModal = (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.feedback-modal'),\n thankYou = (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.thank-you'),\n formSendInProgress = false;\n\n contactFormInputs.each(function () {\n (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).keyup(function () {\n (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).removeClass('error');\n if ((0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).val().length !== 0) {\n (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).addClass('not-empty');\n \n } else {\n (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).removeClass('not-empty');\n }\n });\n });\n contactForms.submit(function (e) {\n e.preventDefault();\n var values = {};\n var errorExist = false;\n var contactForm = (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this);\n var currentContactFormInputs = contactForm.find('.input');\n var currentContactFormEmail = contactForm.find('.input-email');\n var currentContactFormText = contactForm.find('.input-text');\n\n if (formSendInProgress) return;\n\n currentContactFormInputs.each(function () {\n (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).removeClass('error');\n\n switch (this.name.split('-')[0]) {\n case 'email':\n if (!(0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).val().replace(/ /g, '').match(/^[-!#$%&'*+\\/0-9=?A-Z^_a-z{|}~](\\.?[-!#$%&'*+\\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-?\\.?[a-zA-Z0-9])*\\.[a-zA-Z](-?[a-zA-Z0-9])+$/) || (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).val().replace(/ /g, '').length > 254) {\n currentContactFormEmail.addClass('error');\n errorEmail.addClass('error');\n errorExist = true;\n }\n break;\n case 'message':\n if ((0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).val().length < 5) {\n currentContactFormText.addClass('error');\n errorMsg.addClass('error');\n errorExist = true;\n }\n break;\n }\n values[this.name] = (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).val().replace(/ /g, '');\n });\n\n if (errorExist) {\n return false;\n } else {\n formSendInProgress = true;\n _plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"].ajax({\n type: \"POST\",\n url: contactForm.attr('data-action-xhr'),\n data: new FormData(this),\n enctype: 'multipart/form-data',\n contentType: false,\n processData: false,\n cache: false,\n success: function (msg) {\n cleanForm();\n formSendInProgress = false;
50\n\n contactFormInputs.each(function() {\n (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).addClass('complete');\n thankYou.fadeIn();\n (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).attr('readonly', 'readonly');\n (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).blur();\n (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).hide();\n (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.btn-feedback').hide();\n });\n\n errorClass.hide();\n\n blackout.fadeIn();\n setTimeout( function(){\n feedbackModal.fadeOut();\n blackout.fadeOut();\n } , 5000 );\n },\n error: function (msg) {\n formSendInProgress = false;\n currentContactFormInputs.each(function () {\n (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).addClass('error');\n });\n contactFormInputs.each(function() {\n (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).parent().removeClass('in-progress');\n });\n }\n });\n }\n });\n function cleanForm() {\n contactFormInputs.each(function () {\n (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).val('');\n (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this).attr('class', '');\n });\n }\n\n (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('#open-feedback-modal').click(function() {\n feedbackModal.fadeIn();\n blackout.fadeIn();\n });\n\n (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.call-support-team-popup').click(function() {\n feedbackModal.fadeIn();\n blackout.fadeIn();\n });\n\n blackout.click(function() {\n feedbackModal.fadeOut();\n blackout.fadeOut();\n });\n\n\n (0,_plugins_jquery__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('.feedback-modal .close').click(function() {\n feedbackModal.fadeOut();\n blackout.fadeOut();\n });\n\n});\n\n\n//# sourceURL=webpack://landing-page/./src/assets/js/libs/feedback-form.js?\n}"); 51 52/***/ })
52 53 54}]);
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.