From 013a86cbb2bbe5a95b33a8f45e997f4d3ee8805f Mon Sep 17 00:00:00 2001 From: josdejong Date: Thu, 25 Apr 2013 15:13:49 +0200 Subject: [PATCH] Released version 0.0.7 --- .npmignore | 8 + HISTORY.md | 5 + component.json | 9 +- lib/moment.js | 1400 --------------------------------------------- lib/moment.min.js | 6 - package.json | 9 +- vis.js | 402 ++++++------- vis.min.js | 8 +- 8 files changed, 228 insertions(+), 1619 deletions(-) create mode 100644 .npmignore delete mode 100644 lib/moment.js delete mode 100644 lib/moment.min.js diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..7767f310 --- /dev/null +++ b/.npmignore @@ -0,0 +1,8 @@ +node_modules +src +test +.idea +component.json +Jakefile.js +.npmignore +.gitignore diff --git a/HISTORY.md b/HISTORY.md index efbdc0bd..0d8ad428 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,6 +2,11 @@ vis.js history http://visjs.org +## 2012-04-25, version 0.0.7 + +- Sanitized the published packages on npm and bower. + + ## 2012-04-25, version 0.0.6 - Css is now packaged in the javascript file, and automatically loaded. diff --git a/component.json b/component.json index 95b89148..a2f8a4b8 100644 --- a/component.json +++ b/component.json @@ -1,6 +1,6 @@ { "name": "vis", - "version": "0.0.6", + "version": "0.0.7", "description": "A dynamic, browser-based visualization library.", "homepage": "http://visjs.org/", "repository": { @@ -8,11 +8,14 @@ "url": "git://github.com/almende/vis.git" }, "ignore": [ + "node_modules", "src", - "lib", "test", + ".idea", "Jakefile.js", - "package.json" + "package.json", + ".npmignore", + ".gitignore" ], "dependencies": {}, "devDependencies": {} diff --git a/lib/moment.js b/lib/moment.js deleted file mode 100644 index 9ff57aac..00000000 --- a/lib/moment.js +++ /dev/null @@ -1,1400 +0,0 @@ -// moment.js -// version : 2.0.0 -// author : Tim Wood -// license : MIT -// momentjs.com - -(function (undefined) { - - /************************************ - Constants - ************************************/ - - var moment, - VERSION = "2.0.0", - round = Math.round, i, - // internal storage for language config files - languages = {}, - - // check for nodeJS - hasModule = (typeof module !== 'undefined' && module.exports), - - // ASP.NET json date format regex - aspNetJsonRegex = /^\/?Date\((\-?\d+)/i, - - // format tokens - formattingTokens = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g, - localFormattingTokens = /(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g, - - // parsing tokens - parseMultipleFormatChunker = /([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi, - - // parsing token regexes - parseTokenOneOrTwoDigits = /\d\d?/, // 0 - 99 - parseTokenOneToThreeDigits = /\d{1,3}/, // 0 - 999 - parseTokenThreeDigits = /\d{3}/, // 000 - 999 - parseTokenFourDigits = /\d{1,4}/, // 0 - 9999 - parseTokenSixDigits = /[+\-]?\d{1,6}/, // -999,999 - 999,999 - parseTokenWord = /[0-9]*[a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF]+\s*?[\u0600-\u06FF]+/i, // any word (or two) characters or numbers including two word month in arabic. - parseTokenTimezone = /Z|[\+\-]\d\d:?\d\d/i, // +00:00 -00:00 +0000 -0000 or Z - parseTokenT = /T/i, // T (ISO seperator) - parseTokenTimestampMs = /[\+\-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123 - - // preliminary iso regex - // 0000-00-00 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 - isoRegex = /^\s*\d{4}-\d\d-\d\d((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/, - isoFormat = 'YYYY-MM-DDTHH:mm:ssZ', - - // iso time formats and regexes - isoTimes = [ - ['HH:mm:ss.S', /(T| )\d\d:\d\d:\d\d\.\d{1,3}/], - ['HH:mm:ss', /(T| )\d\d:\d\d:\d\d/], - ['HH:mm', /(T| )\d\d:\d\d/], - ['HH', /(T| )\d\d/] - ], - - // timezone chunker "+10:00" > ["10", "00"] or "-1530" > ["-15", "30"] - parseTimezoneChunker = /([\+\-]|\d\d)/gi, - - // getter and setter names - proxyGettersAndSetters = 'Month|Date|Hours|Minutes|Seconds|Milliseconds'.split('|'), - unitMillisecondFactors = { - 'Milliseconds' : 1, - 'Seconds' : 1e3, - 'Minutes' : 6e4, - 'Hours' : 36e5, - 'Days' : 864e5, - 'Months' : 2592e6, - 'Years' : 31536e6 - }, - - // format function strings - formatFunctions = {}, - - // tokens to ordinalize and pad - ordinalizeTokens = 'DDD w W M D d'.split(' '), - paddedTokens = 'M D H h m s w W'.split(' '), - - formatTokenFunctions = { - M : function () { - return this.month() + 1; - }, - MMM : function (format) { - return this.lang().monthsShort(this, format); - }, - MMMM : function (format) { - return this.lang().months(this, format); - }, - D : function () { - return this.date(); - }, - DDD : function () { - return this.dayOfYear(); - }, - d : function () { - return this.day(); - }, - dd : function (format) { - return this.lang().weekdaysMin(this, format); - }, - ddd : function (format) { - return this.lang().weekdaysShort(this, format); - }, - dddd : function (format) { - return this.lang().weekdays(this, format); - }, - w : function () { - return this.week(); - }, - W : function () { - return this.isoWeek(); - }, - YY : function () { - return leftZeroFill(this.year() % 100, 2); - }, - YYYY : function () { - return leftZeroFill(this.year(), 4); - }, - YYYYY : function () { - return leftZeroFill(this.year(), 5); - }, - a : function () { - return this.lang().meridiem(this.hours(), this.minutes(), true); - }, - A : function () { - return this.lang().meridiem(this.hours(), this.minutes(), false); - }, - H : function () { - return this.hours(); - }, - h : function () { - return this.hours() % 12 || 12; - }, - m : function () { - return this.minutes(); - }, - s : function () { - return this.seconds(); - }, - S : function () { - return ~~(this.milliseconds() / 100); - }, - SS : function () { - return leftZeroFill(~~(this.milliseconds() / 10), 2); - }, - SSS : function () { - return leftZeroFill(this.milliseconds(), 3); - }, - Z : function () { - var a = -this.zone(), - b = "+"; - if (a < 0) { - a = -a; - b = "-"; - } - return b + leftZeroFill(~~(a / 60), 2) + ":" + leftZeroFill(~~a % 60, 2); - }, - ZZ : function () { - var a = -this.zone(), - b = "+"; - if (a < 0) { - a = -a; - b = "-"; - } - return b + leftZeroFill(~~(10 * a / 6), 4); - }, - X : function () { - return this.unix(); - } - }; - - function padToken(func, count) { - return function (a) { - return leftZeroFill(func.call(this, a), count); - }; - } - function ordinalizeToken(func) { - return function (a) { - return this.lang().ordinal(func.call(this, a)); - }; - } - - while (ordinalizeTokens.length) { - i = ordinalizeTokens.pop(); - formatTokenFunctions[i + 'o'] = ordinalizeToken(formatTokenFunctions[i]); - } - while (paddedTokens.length) { - i = paddedTokens.pop(); - formatTokenFunctions[i + i] = padToken(formatTokenFunctions[i], 2); - } - formatTokenFunctions.DDDD = padToken(formatTokenFunctions.DDD, 3); - - - /************************************ - Constructors - ************************************/ - - function Language() { - - } - - // Moment prototype object - function Moment(config) { - extend(this, config); - } - - // Duration Constructor - function Duration(duration) { - var data = this._data = {}, - years = duration.years || duration.year || duration.y || 0, - months = duration.months || duration.month || duration.M || 0, - weeks = duration.weeks || duration.week || duration.w || 0, - days = duration.days || duration.day || duration.d || 0, - hours = duration.hours || duration.hour || duration.h || 0, - minutes = duration.minutes || duration.minute || duration.m || 0, - seconds = duration.seconds || duration.second || duration.s || 0, - milliseconds = duration.milliseconds || duration.millisecond || duration.ms || 0; - - // representation for dateAddRemove - this._milliseconds = milliseconds + - seconds * 1e3 + // 1000 - minutes * 6e4 + // 1000 * 60 - hours * 36e5; // 1000 * 60 * 60 - // Because of dateAddRemove treats 24 hours as different from a - // day when working around DST, we need to store them separately - this._days = days + - weeks * 7; - // It is impossible translate months into days without knowing - // which months you are are talking about, so we have to store - // it separately. - this._months = months + - years * 12; - - // The following code bubbles up values, see the tests for - // examples of what that means. - data.milliseconds = milliseconds % 1000; - seconds += absRound(milliseconds / 1000); - - data.seconds = seconds % 60; - minutes += absRound(seconds / 60); - - data.minutes = minutes % 60; - hours += absRound(minutes / 60); - - data.hours = hours % 24; - days += absRound(hours / 24); - - days += weeks * 7; - data.days = days % 30; - - months += absRound(days / 30); - - data.months = months % 12; - years += absRound(months / 12); - - data.years = years; - } - - - /************************************ - Helpers - ************************************/ - - - function extend(a, b) { - for (var i in b) { - if (b.hasOwnProperty(i)) { - a[i] = b[i]; - } - } - return a; - } - - function absRound(number) { - if (number < 0) { - return Math.ceil(number); - } else { - return Math.floor(number); - } - } - - // left zero fill a number - // see http://jsperf.com/left-zero-filling for performance comparison - function leftZeroFill(number, targetLength) { - var output = number + ''; - while (output.length < targetLength) { - output = '0' + output; - } - return output; - } - - // helper function for _.addTime and _.subtractTime - function addOrSubtractDurationFromMoment(mom, duration, isAdding) { - var ms = duration._milliseconds, - d = duration._days, - M = duration._months, - currentDate; - - if (ms) { - mom._d.setTime(+mom + ms * isAdding); - } - if (d) { - mom.date(mom.date() + d * isAdding); - } - if (M) { - currentDate = mom.date(); - mom.date(1) - .month(mom.month() + M * isAdding) - .date(Math.min(currentDate, mom.daysInMonth())); - } - } - - // check if is an array - function isArray(input) { - return Object.prototype.toString.call(input) === '[object Array]'; - } - - // compare two arrays, return the number of differences - function compareArrays(array1, array2) { - var len = Math.min(array1.length, array2.length), - lengthDiff = Math.abs(array1.length - array2.length), - diffs = 0, - i; - for (i = 0; i < len; i++) { - if (~~array1[i] !== ~~array2[i]) { - diffs++; - } - } - return diffs + lengthDiff; - } - - - /************************************ - Languages - ************************************/ - - - Language.prototype = { - set : function (config) { - var prop, i; - for (i in config) { - prop = config[i]; - if (typeof prop === 'function') { - this[i] = prop; - } else { - this['_' + i] = prop; - } - } - }, - - _months : "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), - months : function (m) { - return this._months[m.month()]; - }, - - _monthsShort : "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), - monthsShort : function (m) { - return this._monthsShort[m.month()]; - }, - - monthsParse : function (monthName) { - var i, mom, regex, output; - - if (!this._monthsParse) { - this._monthsParse = []; - } - - for (i = 0; i < 12; i++) { - // make the regex if we don't have it already - if (!this._monthsParse[i]) { - mom = moment([2000, i]); - regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); - this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); - } - // test the regex - if (this._monthsParse[i].test(monthName)) { - return i; - } - } - }, - - _weekdays : "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), - weekdays : function (m) { - return this._weekdays[m.day()]; - }, - - _weekdaysShort : "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), - weekdaysShort : function (m) { - return this._weekdaysShort[m.day()]; - }, - - _weekdaysMin : "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), - weekdaysMin : function (m) { - return this._weekdaysMin[m.day()]; - }, - - _longDateFormat : { - LT : "h:mm A", - L : "MM/DD/YYYY", - LL : "MMMM D YYYY", - LLL : "MMMM D YYYY LT", - LLLL : "dddd, MMMM D YYYY LT" - }, - longDateFormat : function (key) { - var output = this._longDateFormat[key]; - if (!output && this._longDateFormat[key.toUpperCase()]) { - output = this._longDateFormat[key.toUpperCase()].replace(/MMMM|MM|DD|dddd/g, function (val) { - return val.slice(1); - }); - this._longDateFormat[key] = output; - } - return output; - }, - - meridiem : function (hours, minutes, isLower) { - if (hours > 11) { - return isLower ? 'pm' : 'PM'; - } else { - return isLower ? 'am' : 'AM'; - } - }, - - _calendar : { - sameDay : '[Today at] LT', - nextDay : '[Tomorrow at] LT', - nextWeek : 'dddd [at] LT', - lastDay : '[Yesterday at] LT', - lastWeek : '[last] dddd [at] LT', - sameElse : 'L' - }, - calendar : function (key, mom) { - var output = this._calendar[key]; - return typeof output === 'function' ? output.apply(mom) : output; - }, - - _relativeTime : { - future : "in %s", - past : "%s ago", - s : "a few seconds", - m : "a minute", - mm : "%d minutes", - h : "an hour", - hh : "%d hours", - d : "a day", - dd : "%d days", - M : "a month", - MM : "%d months", - y : "a year", - yy : "%d years" - }, - relativeTime : function (number, withoutSuffix, string, isFuture) { - var output = this._relativeTime[string]; - return (typeof output === 'function') ? - output(number, withoutSuffix, string, isFuture) : - output.replace(/%d/i, number); - }, - pastFuture : function (diff, output) { - var format = this._relativeTime[diff > 0 ? 'future' : 'past']; - return typeof format === 'function' ? format(output) : format.replace(/%s/i, output); - }, - - ordinal : function (number) { - return this._ordinal.replace("%d", number); - }, - _ordinal : "%d", - - preparse : function (string) { - return string; - }, - - postformat : function (string) { - return string; - }, - - week : function (mom) { - return weekOfYear(mom, this._week.dow, this._week.doy); - }, - _week : { - dow : 0, // Sunday is the first day of the week. - doy : 6 // The week that contains Jan 1st is the first week of the year. - } - }; - - // Loads a language definition into the `languages` cache. The function - // takes a key and optionally values. If not in the browser and no values - // are provided, it will load the language file module. As a convenience, - // this function also returns the language values. - function loadLang(key, values) { - values.abbr = key; - if (!languages[key]) { - languages[key] = new Language(); - } - languages[key].set(values); - return languages[key]; - } - - // Determines which language definition to use and returns it. - // - // With no parameters, it will return the global language. If you - // pass in a language key, such as 'en', it will return the - // definition for 'en', so long as 'en' has already been loaded using - // moment.lang. - function getLangDefinition(key) { - if (!key) { - return moment.fn._lang; - } - if (!languages[key] && hasModule) { - require('./lang/' + key); - } - return languages[key]; - } - - - /************************************ - Formatting - ************************************/ - - - function removeFormattingTokens(input) { - if (input.match(/\[.*\]/)) { - return input.replace(/^\[|\]$/g, ""); - } - return input.replace(/\\/g, ""); - } - - function makeFormatFunction(format) { - var array = format.match(formattingTokens), i, length; - - for (i = 0, length = array.length; i < length; i++) { - if (formatTokenFunctions[array[i]]) { - array[i] = formatTokenFunctions[array[i]]; - } else { - array[i] = removeFormattingTokens(array[i]); - } - } - - return function (mom) { - var output = ""; - for (i = 0; i < length; i++) { - output += typeof array[i].call === 'function' ? array[i].call(mom, format) : array[i]; - } - return output; - }; - } - - // format date using native date object - function formatMoment(m, format) { - var i = 5; - - function replaceLongDateFormatTokens(input) { - return m.lang().longDateFormat(input) || input; - } - - while (i-- && localFormattingTokens.test(format)) { - format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); - } - - if (!formatFunctions[format]) { - formatFunctions[format] = makeFormatFunction(format); - } - - return formatFunctions[format](m); - } - - - /************************************ - Parsing - ************************************/ - - - // get the regex to find the next token - function getParseRegexForToken(token) { - switch (token) { - case 'DDDD': - return parseTokenThreeDigits; - case 'YYYY': - return parseTokenFourDigits; - case 'YYYYY': - return parseTokenSixDigits; - case 'S': - case 'SS': - case 'SSS': - case 'DDD': - return parseTokenOneToThreeDigits; - case 'MMM': - case 'MMMM': - case 'dd': - case 'ddd': - case 'dddd': - case 'a': - case 'A': - return parseTokenWord; - case 'X': - return parseTokenTimestampMs; - case 'Z': - case 'ZZ': - return parseTokenTimezone; - case 'T': - return parseTokenT; - case 'MM': - case 'DD': - case 'YY': - case 'HH': - case 'hh': - case 'mm': - case 'ss': - case 'M': - case 'D': - case 'd': - case 'H': - case 'h': - case 'm': - case 's': - return parseTokenOneOrTwoDigits; - default : - return new RegExp(token.replace('\\', '')); - } - } - - // function to convert string input to date - function addTimeToArrayFromToken(token, input, config) { - var a, b, - datePartArray = config._a; - - switch (token) { - // MONTH - case 'M' : // fall through to MM - case 'MM' : - datePartArray[1] = (input == null) ? 0 : ~~input - 1; - break; - case 'MMM' : // fall through to MMMM - case 'MMMM' : - a = getLangDefinition(config._l).monthsParse(input); - // if we didn't find a month name, mark the date as invalid. - if (a != null) { - datePartArray[1] = a; - } else { - config._isValid = false; - } - break; - // DAY OF MONTH - case 'D' : // fall through to DDDD - case 'DD' : // fall through to DDDD - case 'DDD' : // fall through to DDDD - case 'DDDD' : - if (input != null) { - datePartArray[2] = ~~input; - } - break; - // YEAR - case 'YY' : - datePartArray[0] = ~~input + (~~input > 68 ? 1900 : 2000); - break; - case 'YYYY' : - case 'YYYYY' : - datePartArray[0] = ~~input; - break; - // AM / PM - case 'a' : // fall through to A - case 'A' : - config._isPm = ((input + '').toLowerCase() === 'pm'); - break; - // 24 HOUR - case 'H' : // fall through to hh - case 'HH' : // fall through to hh - case 'h' : // fall through to hh - case 'hh' : - datePartArray[3] = ~~input; - break; - // MINUTE - case 'm' : // fall through to mm - case 'mm' : - datePartArray[4] = ~~input; - break; - // SECOND - case 's' : // fall through to ss - case 'ss' : - datePartArray[5] = ~~input; - break; - // MILLISECOND - case 'S' : - case 'SS' : - case 'SSS' : - datePartArray[6] = ~~ (('0.' + input) * 1000); - break; - // UNIX TIMESTAMP WITH MS - case 'X': - config._d = new Date(parseFloat(input) * 1000); - break; - // TIMEZONE - case 'Z' : // fall through to ZZ - case 'ZZ' : - config._useUTC = true; - a = (input + '').match(parseTimezoneChunker); - if (a && a[1]) { - config._tzh = ~~a[1]; - } - if (a && a[2]) { - config._tzm = ~~a[2]; - } - // reverse offsets - if (a && a[0] === '+') { - config._tzh = -config._tzh; - config._tzm = -config._tzm; - } - break; - } - - // if the input is null, the date is not valid - if (input == null) { - config._isValid = false; - } - } - - // convert an array to a date. - // the array should mirror the parameters below - // note: all values past the year are optional and will default to the lowest possible value. - // [year, month, day , hour, minute, second, millisecond] - function dateFromArray(config) { - var i, date, input = []; - - if (config._d) { - return; - } - - for (i = 0; i < 7; i++) { - config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; - } - - // add the offsets to the time to be parsed so that we can have a clean array for checking isValid - input[3] += config._tzh || 0; - input[4] += config._tzm || 0; - - date = new Date(0); - - if (config._useUTC) { - date.setUTCFullYear(input[0], input[1], input[2]); - date.setUTCHours(input[3], input[4], input[5], input[6]); - } else { - date.setFullYear(input[0], input[1], input[2]); - date.setHours(input[3], input[4], input[5], input[6]); - } - - config._d = date; - } - - // date from string and format string - function makeDateFromStringAndFormat(config) { - // This array is used to make a Date, either with `new Date` or `Date.UTC` - var tokens = config._f.match(formattingTokens), - string = config._i, - i, parsedInput; - - config._a = []; - - for (i = 0; i < tokens.length; i++) { - parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0]; - if (parsedInput) { - string = string.slice(string.indexOf(parsedInput) + parsedInput.length); - } - // don't parse if its not a known token - if (formatTokenFunctions[tokens[i]]) { - addTimeToArrayFromToken(tokens[i], parsedInput, config); - } - } - // handle am pm - if (config._isPm && config._a[3] < 12) { - config._a[3] += 12; - } - // if is 12 am, change hours to 0 - if (config._isPm === false && config._a[3] === 12) { - config._a[3] = 0; - } - // return - dateFromArray(config); - } - - // date from string and array of format strings - function makeDateFromStringAndArray(config) { - var tempConfig, - tempMoment, - bestMoment, - - scoreToBeat = 99, - i, - currentDate, - currentScore; - - while (config._f.length) { - tempConfig = extend({}, config); - tempConfig._f = config._f.pop(); - makeDateFromStringAndFormat(tempConfig); - tempMoment = new Moment(tempConfig); - - if (tempMoment.isValid()) { - bestMoment = tempMoment; - break; - } - - currentScore = compareArrays(tempConfig._a, tempMoment.toArray()); - - if (currentScore < scoreToBeat) { - scoreToBeat = currentScore; - bestMoment = tempMoment; - } - } - - extend(config, bestMoment); - } - - // date from iso format - function makeDateFromString(config) { - var i, - string = config._i; - if (isoRegex.exec(string)) { - config._f = 'YYYY-MM-DDT'; - for (i = 0; i < 4; i++) { - if (isoTimes[i][1].exec(string)) { - config._f += isoTimes[i][0]; - break; - } - } - if (parseTokenTimezone.exec(string)) { - config._f += " Z"; - } - makeDateFromStringAndFormat(config); - } else { - config._d = new Date(string); - } - } - - function makeDateFromInput(config) { - var input = config._i, - matched = aspNetJsonRegex.exec(input); - - if (input === undefined) { - config._d = new Date(); - } else if (matched) { - config._d = new Date(+matched[1]); - } else if (typeof input === 'string') { - makeDateFromString(config); - } else if (isArray(input)) { - config._a = input.slice(0); - dateFromArray(config); - } else { - config._d = input instanceof Date ? new Date(+input) : new Date(input); - } - } - - - /************************************ - Relative Time - ************************************/ - - - // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize - function substituteTimeAgo(string, number, withoutSuffix, isFuture, lang) { - return lang.relativeTime(number || 1, !!withoutSuffix, string, isFuture); - } - - function relativeTime(milliseconds, withoutSuffix, lang) { - var seconds = round(Math.abs(milliseconds) / 1000), - minutes = round(seconds / 60), - hours = round(minutes / 60), - days = round(hours / 24), - years = round(days / 365), - args = seconds < 45 && ['s', seconds] || - minutes === 1 && ['m'] || - minutes < 45 && ['mm', minutes] || - hours === 1 && ['h'] || - hours < 22 && ['hh', hours] || - days === 1 && ['d'] || - days <= 25 && ['dd', days] || - days <= 45 && ['M'] || - days < 345 && ['MM', round(days / 30)] || - years === 1 && ['y'] || ['yy', years]; - args[2] = withoutSuffix; - args[3] = milliseconds > 0; - args[4] = lang; - return substituteTimeAgo.apply({}, args); - } - - - /************************************ - Week of Year - ************************************/ - - - // firstDayOfWeek 0 = sun, 6 = sat - // the day of the week that starts the week - // (usually sunday or monday) - // firstDayOfWeekOfYear 0 = sun, 6 = sat - // the first week is the week that contains the first - // of this day of the week - // (eg. ISO weeks use thursday (4)) - function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) { - var end = firstDayOfWeekOfYear - firstDayOfWeek, - daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(); - - - if (daysToDayOfWeek > end) { - daysToDayOfWeek -= 7; - } - - if (daysToDayOfWeek < end - 7) { - daysToDayOfWeek += 7; - } - - return Math.ceil(moment(mom).add('d', daysToDayOfWeek).dayOfYear() / 7); - } - - - /************************************ - Top Level Functions - ************************************/ - - function makeMoment(config) { - var input = config._i, - format = config._f; - - if (input === null || input === '') { - return null; - } - - if (typeof input === 'string') { - config._i = input = getLangDefinition().preparse(input); - } - - if (moment.isMoment(input)) { - config = extend({}, input); - config._d = new Date(+input._d); - } else if (format) { - if (isArray(format)) { - makeDateFromStringAndArray(config); - } else { - makeDateFromStringAndFormat(config); - } - } else { - makeDateFromInput(config); - } - - return new Moment(config); - } - - moment = function (input, format, lang) { - return makeMoment({ - _i : input, - _f : format, - _l : lang, - _isUTC : false - }); - }; - - // creating with utc - moment.utc = function (input, format, lang) { - return makeMoment({ - _useUTC : true, - _isUTC : true, - _l : lang, - _i : input, - _f : format - }); - }; - - // creating with unix timestamp (in seconds) - moment.unix = function (input) { - return moment(input * 1000); - }; - - // duration - moment.duration = function (input, key) { - var isDuration = moment.isDuration(input), - isNumber = (typeof input === 'number'), - duration = (isDuration ? input._data : (isNumber ? {} : input)), - ret; - - if (isNumber) { - if (key) { - duration[key] = input; - } else { - duration.milliseconds = input; - } - } - - ret = new Duration(duration); - - if (isDuration && input.hasOwnProperty('_lang')) { - ret._lang = input._lang; - } - - return ret; - }; - - // version number - moment.version = VERSION; - - // default format - moment.defaultFormat = isoFormat; - - // This function will load languages and then set the global language. If - // no arguments are passed in, it will simply return the current global - // language key. - moment.lang = function (key, values) { - var i; - - if (!key) { - return moment.fn._lang._abbr; - } - if (values) { - loadLang(key, values); - } else if (!languages[key]) { - getLangDefinition(key); - } - moment.duration.fn._lang = moment.fn._lang = getLangDefinition(key); - }; - - // returns language data - moment.langData = function (key) { - if (key && key._lang && key._lang._abbr) { - key = key._lang._abbr; - } - return getLangDefinition(key); - }; - - // compare moment object - moment.isMoment = function (obj) { - return obj instanceof Moment; - }; - - // for typechecking Duration objects - moment.isDuration = function (obj) { - return obj instanceof Duration; - }; - - - /************************************ - Moment Prototype - ************************************/ - - - moment.fn = Moment.prototype = { - - clone : function () { - return moment(this); - }, - - valueOf : function () { - return +this._d; - }, - - unix : function () { - return Math.floor(+this._d / 1000); - }, - - toString : function () { - return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ"); - }, - - toDate : function () { - return this._d; - }, - - toJSON : function () { - return moment.utc(this).format('YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); - }, - - toArray : function () { - var m = this; - return [ - m.year(), - m.month(), - m.date(), - m.hours(), - m.minutes(), - m.seconds(), - m.milliseconds() - ]; - }, - - isValid : function () { - if (this._isValid == null) { - if (this._a) { - this._isValid = !compareArrays(this._a, (this._isUTC ? moment.utc(this._a) : moment(this._a)).toArray()); - } else { - this._isValid = !isNaN(this._d.getTime()); - } - } - return !!this._isValid; - }, - - utc : function () { - this._isUTC = true; - return this; - }, - - local : function () { - this._isUTC = false; - return this; - }, - - format : function (inputString) { - var output = formatMoment(this, inputString || moment.defaultFormat); - return this.lang().postformat(output); - }, - - add : function (input, val) { - var dur; - // switch args to support add('s', 1) and add(1, 's') - if (typeof input === 'string') { - dur = moment.duration(+val, input); - } else { - dur = moment.duration(input, val); - } - addOrSubtractDurationFromMoment(this, dur, 1); - return this; - }, - - subtract : function (input, val) { - var dur; - // switch args to support subtract('s', 1) and subtract(1, 's') - if (typeof input === 'string') { - dur = moment.duration(+val, input); - } else { - dur = moment.duration(input, val); - } - addOrSubtractDurationFromMoment(this, dur, -1); - return this; - }, - - diff : function (input, units, asFloat) { - var that = this._isUTC ? moment(input).utc() : moment(input).local(), - zoneDiff = (this.zone() - that.zone()) * 6e4, - diff, output; - - if (units) { - // standardize on singular form - units = units.replace(/s$/, ''); - } - - if (units === 'year' || units === 'month') { - diff = (this.daysInMonth() + that.daysInMonth()) * 432e5; // 24 * 60 * 60 * 1000 / 2 - output = ((this.year() - that.year()) * 12) + (this.month() - that.month()); - output += ((this - moment(this).startOf('month')) - (that - moment(that).startOf('month'))) / diff; - if (units === 'year') { - output = output / 12; - } - } else { - diff = (this - that) - zoneDiff; - output = units === 'second' ? diff / 1e3 : // 1000 - units === 'minute' ? diff / 6e4 : // 1000 * 60 - units === 'hour' ? diff / 36e5 : // 1000 * 60 * 60 - units === 'day' ? diff / 864e5 : // 1000 * 60 * 60 * 24 - units === 'week' ? diff / 6048e5 : // 1000 * 60 * 60 * 24 * 7 - diff; - } - return asFloat ? output : absRound(output); - }, - - from : function (time, withoutSuffix) { - return moment.duration(this.diff(time)).lang(this.lang()._abbr).humanize(!withoutSuffix); - }, - - fromNow : function (withoutSuffix) { - return this.from(moment(), withoutSuffix); - }, - - calendar : function () { - var diff = this.diff(moment().startOf('day'), 'days', true), - format = diff < -6 ? 'sameElse' : - diff < -1 ? 'lastWeek' : - diff < 0 ? 'lastDay' : - diff < 1 ? 'sameDay' : - diff < 2 ? 'nextDay' : - diff < 7 ? 'nextWeek' : 'sameElse'; - return this.format(this.lang().calendar(format, this)); - }, - - isLeapYear : function () { - var year = this.year(); - return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; - }, - - isDST : function () { - return (this.zone() < moment([this.year()]).zone() || - this.zone() < moment([this.year(), 5]).zone()); - }, - - day : function (input) { - var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); - return input == null ? day : - this.add({ d : input - day }); - }, - - startOf: function (units) { - units = units.replace(/s$/, ''); - // the following switch intentionally omits break keywords - // to utilize falling through the cases. - switch (units) { - case 'year': - this.month(0); - /* falls through */ - case 'month': - this.date(1); - /* falls through */ - case 'week': - case 'day': - this.hours(0); - /* falls through */ - case 'hour': - this.minutes(0); - /* falls through */ - case 'minute': - this.seconds(0); - /* falls through */ - case 'second': - this.milliseconds(0); - /* falls through */ - } - - // weeks are a special case - if (units === 'week') { - this.day(0); - } - - return this; - }, - - endOf: function (units) { - return this.startOf(units).add(units.replace(/s?$/, 's'), 1).subtract('ms', 1); - }, - - isAfter: function (input, units) { - units = typeof units !== 'undefined' ? units : 'millisecond'; - return +this.clone().startOf(units) > +moment(input).startOf(units); - }, - - isBefore: function (input, units) { - units = typeof units !== 'undefined' ? units : 'millisecond'; - return +this.clone().startOf(units) < +moment(input).startOf(units); - }, - - isSame: function (input, units) { - units = typeof units !== 'undefined' ? units : 'millisecond'; - return +this.clone().startOf(units) === +moment(input).startOf(units); - }, - - zone : function () { - return this._isUTC ? 0 : this._d.getTimezoneOffset(); - }, - - daysInMonth : function () { - return moment.utc([this.year(), this.month() + 1, 0]).date(); - }, - - dayOfYear : function (input) { - var dayOfYear = round((moment(this).startOf('day') - moment(this).startOf('year')) / 864e5) + 1; - return input == null ? dayOfYear : this.add("d", (input - dayOfYear)); - }, - - isoWeek : function (input) { - var week = weekOfYear(this, 1, 4); - return input == null ? week : this.add("d", (input - week) * 7); - }, - - week : function (input) { - var week = this.lang().week(this); - return input == null ? week : this.add("d", (input - week) * 7); - }, - - // If passed a language key, it will set the language for this - // instance. Otherwise, it will return the language configuration - // variables for this instance. - lang : function (key) { - if (key === undefined) { - return this._lang; - } else { - this._lang = getLangDefinition(key); - return this; - } - } - }; - - // helper for adding shortcuts - function makeGetterAndSetter(name, key) { - moment.fn[name] = moment.fn[name + 's'] = function (input) { - var utc = this._isUTC ? 'UTC' : ''; - if (input != null) { - this._d['set' + utc + key](input); - return this; - } else { - return this._d['get' + utc + key](); - } - }; - } - - // loop through and add shortcuts (Month, Date, Hours, Minutes, Seconds, Milliseconds) - for (i = 0; i < proxyGettersAndSetters.length; i ++) { - makeGetterAndSetter(proxyGettersAndSetters[i].toLowerCase().replace(/s$/, ''), proxyGettersAndSetters[i]); - } - - // add shortcut for year (uses different syntax than the getter/setter 'year' == 'FullYear') - makeGetterAndSetter('year', 'FullYear'); - - // add plural methods - moment.fn.days = moment.fn.day; - moment.fn.weeks = moment.fn.week; - moment.fn.isoWeeks = moment.fn.isoWeek; - - /************************************ - Duration Prototype - ************************************/ - - - moment.duration.fn = Duration.prototype = { - weeks : function () { - return absRound(this.days() / 7); - }, - - valueOf : function () { - return this._milliseconds + - this._days * 864e5 + - this._months * 2592e6; - }, - - humanize : function (withSuffix) { - var difference = +this, - output = relativeTime(difference, !withSuffix, this.lang()); - - if (withSuffix) { - output = this.lang().pastFuture(difference, output); - } - - return this.lang().postformat(output); - }, - - lang : moment.fn.lang - }; - - function makeDurationGetter(name) { - moment.duration.fn[name] = function () { - return this._data[name]; - }; - } - - function makeDurationAsGetter(name, factor) { - moment.duration.fn['as' + name] = function () { - return +this / factor; - }; - } - - for (i in unitMillisecondFactors) { - if (unitMillisecondFactors.hasOwnProperty(i)) { - makeDurationAsGetter(i, unitMillisecondFactors[i]); - makeDurationGetter(i.toLowerCase()); - } - } - - makeDurationAsGetter('Weeks', 6048e5); - - - /************************************ - Default Lang - ************************************/ - - - // Set default language, other languages will inherit from English. - moment.lang('en', { - ordinal : function (number) { - var b = number % 10, - output = (~~ (number % 100 / 10) === 1) ? 'th' : - (b === 1) ? 'st' : - (b === 2) ? 'nd' : - (b === 3) ? 'rd' : 'th'; - return number + output; - } - }); - - - /************************************ - Exposing Moment - ************************************/ - - - // CommonJS module is defined - if (hasModule) { - module.exports = moment; - } - /*global ender:false */ - if (typeof ender === 'undefined') { - // here, `this` means `window` in the browser, or `global` on the server - // add `moment` as a global object via a string identifier, - // for Closure Compiler "advanced" mode - this['moment'] = moment; - } - /*global define:false */ - if (typeof define === "function" && define.amd) { - define("moment", [], function () { - return moment; - }); - } -}).call(this); diff --git a/lib/moment.min.js b/lib/moment.min.js deleted file mode 100644 index 4e8497a9..00000000 --- a/lib/moment.min.js +++ /dev/null @@ -1,6 +0,0 @@ -// moment.js -// version : 2.0.0 -// author : Tim Wood -// license : MIT -// momentjs.com -(function(e){function O(e,t){return function(n){return j(e.call(this,n),t)}}function M(e){return function(t){return this.lang().ordinal(e.call(this,t))}}function _(){}function D(e){H(this,e)}function P(e){var t=this._data={},n=e.years||e.year||e.y||0,r=e.months||e.month||e.M||0,i=e.weeks||e.week||e.w||0,s=e.days||e.day||e.d||0,o=e.hours||e.hour||e.h||0,u=e.minutes||e.minute||e.m||0,a=e.seconds||e.second||e.s||0,f=e.milliseconds||e.millisecond||e.ms||0;this._milliseconds=f+a*1e3+u*6e4+o*36e5,this._days=s+i*7,this._months=r+n*12,t.milliseconds=f%1e3,a+=B(f/1e3),t.seconds=a%60,u+=B(a/60),t.minutes=u%60,o+=B(u/60),t.hours=o%24,s+=B(o/24),s+=i*7,t.days=s%30,r+=B(s/30),t.months=r%12,n+=B(r/12),t.years=n}function H(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function B(e){return e<0?Math.ceil(e):Math.floor(e)}function j(e,t){var n=e+"";while(n.length68?1900:2e3);break;case"YYYY":case"YYYYY":s[0]=~~t;break;case"a":case"A":n._isPm=(t+"").toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":s[3]=~~t;break;case"m":case"mm":s[4]=~~t;break;case"s":case"ss":s[5]=~~t;break;case"S":case"SS":case"SSS":s[6]=~~(("0."+t)*1e3);break;case"X":n._d=new Date(parseFloat(t)*1e3);break;case"Z":case"ZZ":n._useUTC=!0,r=(t+"").match(x),r&&r[1]&&(n._tzh=~~r[1]),r&&r[2]&&(n._tzm=~~r[2]),r&&r[0]==="+"&&(n._tzh=-n._tzh,n._tzm=-n._tzm)}t==null&&(n._isValid=!1)}function J(e){var t,n,r=[];if(e._d)return;for(t=0;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];r[3]+=e._tzh||0,r[4]+=e._tzm||0,n=new Date(0),e._useUTC?(n.setUTCFullYear(r[0],r[1],r[2]),n.setUTCHours(r[3],r[4],r[5],r[6])):(n.setFullYear(r[0],r[1],r[2]),n.setHours(r[3],r[4],r[5],r[6])),e._d=n}function K(e){var t=e._f.match(a),n=e._i,r,i;e._a=[];for(r=0;r0,f[4]=n,Z.apply({},f)}function tt(e,n,r){var i=r-n,s=r-e.day();return s>i&&(s-=7),s11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},calendar:function(e,t){var n=this._calendar[e];return typeof n=="function"?n.apply(t):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(e,t,n,r){var i=this._relativeTime[n];return typeof i=="function"?i(e,t,n,r):i.replace(/%d/i,e)},pastFuture:function(e,t){var n=this._relativeTime[e>0?"future":"past"];return typeof n=="function"?n(t):n.replace(/%s/i,t)},ordinal:function(e){return this._ordinal.replace("%d",e)},_ordinal:"%d",preparse:function(e){return e},postformat:function(e){return e},week:function(e){return tt(e,this._week.dow,this._week.doy)},_week:{dow:0,doy:6}},t=function(e,t,n){return nt({_i:e,_f:t,_l:n,_isUTC:!1})},t.utc=function(e,t,n){return nt({_useUTC:!0,_isUTC:!0,_l:n,_i:e,_f:t})},t.unix=function(e){return t(e*1e3)},t.duration=function(e,n){var r=t.isDuration(e),i=typeof e=="number",s=r?e._data:i?{}:e,o;return i&&(n?s[n]=e:s.milliseconds=e),o=new P(s),r&&e.hasOwnProperty("_lang")&&(o._lang=e._lang),o},t.version=n,t.defaultFormat=E,t.lang=function(e,n){var r;if(!e)return t.fn._lang._abbr;n?R(e,n):s[e]||U(e),t.duration.fn._lang=t.fn._lang=U(e)},t.langData=function(e){return e&&e._lang&&e._lang._abbr&&(e=e._lang._abbr),U(e)},t.isMoment=function(e){return e instanceof D},t.isDuration=function(e){return e instanceof P},t.fn=D.prototype={clone:function(){return t(this)},valueOf:function(){return+this._d},unix:function(){return Math.floor(+this._d/1e3)},toString:function(){return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._d},toJSON:function(){return t.utc(this).format("YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds()]},isValid:function(){return this._isValid==null&&(this._a?this._isValid=!q(this._a,(this._isUTC?t.utc(this._a):t(this._a)).toArray()):this._isValid=!isNaN(this._d.getTime())),!!this._isValid},utc:function(){return this._isUTC=!0,this},local:function(){return this._isUTC=!1,this},format:function(e){var n=X(this,e||t.defaultFormat);return this.lang().postformat(n)},add:function(e,n){var r;return typeof e=="string"?r=t.duration(+n,e):r=t.duration(e,n),F(this,r,1),this},subtract:function(e,n){var r;return typeof e=="string"?r=t.duration(+n,e):r=t.duration(e,n),F(this,r,-1),this},diff:function(e,n,r){var i=this._isUTC?t(e).utc():t(e).local(),s=(this.zone()-i.zone())*6e4,o,u;return n&&(n=n.replace(/s$/,"")),n==="year"||n==="month"?(o=(this.daysInMonth()+i.daysInMonth())*432e5,u=(this.year()-i.year())*12+(this.month()-i.month()),u+=(this-t(this).startOf("month")-(i-t(i).startOf("month")))/o,n==="year"&&(u/=12)):(o=this-i-s,u=n==="second"?o/1e3:n==="minute"?o/6e4:n==="hour"?o/36e5:n==="day"?o/864e5:n==="week"?o/6048e5:o),r?u:B(u)},from:function(e,n){return t.duration(this.diff(e)).lang(this.lang()._abbr).humanize(!n)},fromNow:function(e){return this.from(t(),e)},calendar:function(){var e=this.diff(t().startOf("day"),"days",!0),n=e<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse";return this.format(this.lang().calendar(n,this))},isLeapYear:function(){var e=this.year();return e%4===0&&e%100!==0||e%400===0},isDST:function(){return this.zone()+t(e).startOf(n)},isBefore:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)<+t(e).startOf(n)},isSame:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)===+t(e).startOf(n)},zone:function(){return this._isUTC?0:this._d.getTimezoneOffset()},daysInMonth:function(){return t.utc([this.year(),this.month()+1,0]).date()},dayOfYear:function(e){var n=r((t(this).startOf("day")-t(this).startOf("year"))/864e5)+1;return e==null?n:this.add("d",e-n)},isoWeek:function(e){var t=tt(this,1,4);return e==null?t:this.add("d",(e-t)*7)},week:function(e){var t=this.lang().week(this);return e==null?t:this.add("d",(e-t)*7)},lang:function(t){return t===e?this._lang:(this._lang=U(t),this)}};for(i=0;i= 0.5.9", "jake-utils": ">= 0.0.18", - "uglify-js": ">= 2.2.5" + "uglify-js": ">= 2.2.5", + "moment": "latest" } } diff --git a/vis.js b/vis.js index 9ee5b359..dd1e4fe1 100644 --- a/vis.js +++ b/vis.js @@ -4,7 +4,7 @@ * * A dynamic, browser-based visualization library. * - * @version 0.0.6 + * @version 0.0.7 * @date 2013-04-25 * * @license @@ -56,7 +56,7 @@ var vis = { module.exports = exports = vis; -},{"./controller":2,"./range":3,"./dataset":4,"./events":5,"./stack":6,"./util":7,"./timestep":8,"./component/component":9,"./component/panel":10,"./component/rootpanel":11,"./component/itemset":12,"./component/timeaxis":13,"./visualization/timeline":14}],5:[function(require,module,exports){ +},{"./dataset":2,"./events":3,"./controller":4,"./range":5,"./stack":6,"./timestep":7,"./util":8,"./component/component":9,"./component/rootpanel":10,"./component/panel":11,"./component/itemset":12,"./component/timeaxis":13,"./visualization/timeline":14}],3:[function(require,module,exports){ /** * Event listener (singleton) */ @@ -176,7 +176,7 @@ var events = { // exports module.exports = exports = events; -},{}],7:[function(require,module,exports){ +},{}],8:[function(require,module,exports){ // create namespace var util = {}; @@ -962,7 +962,7 @@ if(!Array.isArray) { // exports module.exports = exports = util; -},{}],2:[function(require,module,exports){ +},{}],4:[function(require,module,exports){ var util = require('./util'), Component = require('./component/component'); @@ -1110,7 +1110,7 @@ Controller.prototype.reflow = function () { module.exports = exports = Controller; -},{"./util":7,"./component/component":9}],4:[function(require,module,exports){ +},{"./util":8,"./component/component":9}],2:[function(require,module,exports){ var util = require('./util'); /** @@ -1664,7 +1664,7 @@ DataSet.prototype._appendRow = function (dataTable, columns, item) { // exports module.exports = exports = DataSet; -},{"./util":7}],3:[function(require,module,exports){ +},{"./util":8}],5:[function(require,module,exports){ var util = require('./util'), events = require('./events'); @@ -2196,7 +2196,7 @@ Range.prototype.move = function(moveFactor) { // exports module.exports = exports = Range; -},{"./util":7,"./events":5}],6:[function(require,module,exports){ +},{"./util":8,"./events":3}],6:[function(require,module,exports){ var util = require('./util'); /** @@ -2360,7 +2360,7 @@ Stack.prototype.collision = function(a, b, margin) { // exports module.exports = exports = Stack; -},{"./util":7}],9:[function(require,module,exports){ +},{"./util":8}],9:[function(require,module,exports){ var util = require('./../util'); /** @@ -2483,7 +2483,7 @@ Component.prototype.on = function (event, callback) { // exports module.exports = exports = Component; -},{"./../util":7}],10:[function(require,module,exports){ +},{"./../util":8}],11:[function(require,module,exports){ var util = require('../util'), Component = require('./component'); @@ -2592,7 +2592,7 @@ Panel.prototype.reflow = function () { // exports module.exports = exports = Panel; -},{"../util":7,"./component":9}],11:[function(require,module,exports){ +},{"../util":8,"./component":9}],10:[function(require,module,exports){ var util = require('../util'), Panel = require('./panel'); @@ -2800,7 +2800,7 @@ RootPanel.prototype._updateEventEmitters = function () { // exports module.exports = exports = RootPanel; -},{"../util":7,"./panel":10}],12:[function(require,module,exports){ +},{"../util":8,"./panel":11}],12:[function(require,module,exports){ var util = require('../util'), DataSet = require('../dataset'), Panel = require('./panel'), @@ -3319,7 +3319,7 @@ ItemSet.prototype.toScreen = function(time) { // exports module.exports = exports = ItemSet; -},{"../dataset":4,"../util":7,"./panel":10,"../stack":6,"./item/itembox":15,"./item/itemrange":16,"./item/itempoint":17}],13:[function(require,module,exports){ +},{"../util":8,"../dataset":2,"./panel":11,"../stack":6,"./item/itembox":15,"./item/itemrange":16,"./item/itempoint":17}],13:[function(require,module,exports){ var util = require('../util'), TimeStep = require('../timestep'), Component = require('./component'); @@ -3852,7 +3852,7 @@ TimeAxis.prototype._updateConversion = function() { // exports module.exports = exports = TimeAxis; -},{"../util":7,"../timestep":8,"./component":9}],8:[function(require,module,exports){ +},{"../util":8,"../timestep":7,"./component":9}],7:[function(require,module,exports){ var util = require('./util'), moment = require('moment'); @@ -4310,37 +4310,45 @@ TimeStep.prototype.getLabelMajor = function(date) { // exports module.exports = exports = TimeStep; -},{"./util":7,"moment":18}],16:[function(require,module,exports){ +},{"./util":8,"moment":18}],15:[function(require,module,exports){ var util = require('../../util'), Item = require('./item'); /** - * @constructor ItemRange + * @constructor ItemBox * @extends Item * @param {ItemSet} parent - * @param {Object} data Object containing parameters start, end + * @param {Object} data Object containing parameters start * content, className. * @param {Object} [options] Options to set initial property values * // TODO: describe available options */ -function ItemRange (parent, data, options) { +function ItemBox (parent, data, options) { this.props = { - content: { + dot: { left: 0, - width: 0 + top: 0, + width: 0, + height: 0 + }, + line: { + top: 0, + left: 0, + width: 0, + height: 0 } }; Item.call(this, parent, data, options); } -ItemRange.prototype = new Item (null, null); +ItemBox.prototype = new Item (null, null); /** * Select the item * @override */ -ItemRange.prototype.select = function () { +ItemBox.prototype.select = function () { this.selected = true; // TODO: select and unselect }; @@ -4349,7 +4357,7 @@ ItemRange.prototype.select = function () { * Unselect the item * @override */ -ItemRange.prototype.unselect = function () { +ItemBox.prototype.unselect = function () { this.selected = false; // TODO: select and unselect }; @@ -4358,7 +4366,7 @@ ItemRange.prototype.unselect = function () { * Repaint the item * @return {Boolean} changed */ -ItemRange.prototype.repaint = function () { +ItemBox.prototype.repaint = function () { // TODO: make an efficient repaint var changed = false; var dom = this.dom; @@ -4371,7 +4379,7 @@ ItemRange.prototype.repaint = function () { dom = this.dom; if (dom) { - if (!this.options && !this.options.parent) { + if (!this.options && !this.parent) { throw new Error('Cannot repaint item: no parent attached'); } var foreground = this.parent.getForeground(); @@ -4379,13 +4387,26 @@ ItemRange.prototype.repaint = function () { throw new Error('Cannot repaint time axis: ' + 'parent has no foreground container element'); } + var background = this.parent.getBackground(); + if (!background) { + throw new Error('Cannot repaint time axis: ' + + 'parent has no background container element'); + } if (!dom.box.parentNode) { foreground.appendChild(dom.box); changed = true; } + if (!dom.line.parentNode) { + background.appendChild(dom.line); + changed = true; + } + if (!dom.dot.parentNode) { + this.parent.dom.axis.appendChild(dom.dot); + changed = true; + } - // update content + // update contents if (this.data.content != this.content) { this.content = this.data.content; if (this.content instanceof Element) { @@ -4402,10 +4423,13 @@ ItemRange.prototype.repaint = function () { } // update class - var className = this.data.className ? ('' + this.data.className) : ''; + var className = (this.data.className? ' ' + this.data.className : '') + + (this.selected ? ' selected' : ''); if (this.className != className) { this.className = className; - dom.box.className = 'item range' + className; + dom.box.className = 'item box' + className; + dom.line.className = 'item line' + className; + dom.dot.className = 'item dot' + className; changed = true; } } @@ -4417,6 +4441,14 @@ ItemRange.prototype.repaint = function () { dom.box.parentNode.removeChild(dom.box); changed = true; } + if (dom.line.parentNode) { + dom.line.parentNode.removeChild(dom.line); + changed = true; + } + if (dom.dot.parentNode) { + dom.dot.parentNode.removeChild(dom.dot); + changed = true; + } } } @@ -4424,69 +4456,65 @@ ItemRange.prototype.repaint = function () { }; /** - * Reflow the item: calculate its actual size from the DOM + * Reflow the item: calculate its actual size and position from the DOM * @return {boolean} resized returns true if the axis is resized * @override */ -ItemRange.prototype.reflow = function () { +ItemBox.prototype.reflow = function () { if (this.data.start == undefined) { throw new Error('Property "start" missing in item ' + this.data.id); } - if (this.data.end == undefined) { - throw new Error('Property "end" missing in item ' + this.data.id); - } - var dom = this.dom, + var update = util.updateProperty, + dom = this.dom, props = this.props, options = this.options, - parent = this.parent, - start = parent.toScreen(this.data.start), - end = parent.toScreen(this.data.end), - changed = 0; + start = this.parent.toScreen(this.data.start), + align = options && options.align, + orientation = options.orientation, + changed = 0, + top, + left; if (dom) { - var update = util.updateProperty, - box = dom.box, - parentWidth = parent.width, - orientation = options.orientation, - contentLeft, - top; - - changed += update(props.content, 'width', dom.content.offsetWidth); - - changed += update(this, 'height', box.offsetHeight); - - // limit the width of the this, as browsers cannot draw very wide divs - if (start < -parentWidth) { - start = -parentWidth; - } - if (end > 2 * parentWidth) { - end = 2 * parentWidth; + changed += update(props.dot, 'height', dom.dot.offsetHeight); + changed += update(props.dot, 'width', dom.dot.offsetWidth); + changed += update(props.line, 'width', dom.line.offsetWidth); + changed += update(props.line, 'width', dom.line.offsetWidth); + changed += update(this, 'width', dom.box.offsetWidth); + changed += update(this, 'height', dom.box.offsetHeight); + if (align == 'right') { + left = start - this.width; } - - // when range exceeds left of the window, position the contents at the left of the visible area - if (start < 0) { - contentLeft = Math.min(-start, - (end - start - props.content.width - 2 * options.padding)); - // TODO: remove the need for options.padding. it's terrible. + else if (align == 'left') { + left = start; } else { - contentLeft = 0; + // default or 'center' + left = start - this.width / 2; } - changed += update(props.content, 'left', contentLeft); + changed += update(this, 'left', left); + changed += update(props.line, 'left', start - props.line.width / 2); + changed += update(props.dot, 'left', start - props.dot.width / 2); if (orientation == 'top') { top = options.margin.axis; + changed += update(this, 'top', top); + changed += update(props.line, 'top', 0); + changed += update(props.line, 'height', top); + changed += update(props.dot, 'top', -props.dot.height / 2); } else { // default or 'bottom' - top = parent.height - this.height - options.margin.axis; + var parentHeight = this.parent.height; + top = parentHeight - this.height - options.margin.axis; + changed += update(this, 'top', top); + changed += update(props.line, 'top', top + this.height); + changed += update(props.line, 'height', Math.max(options.margin.axis, 0)); + changed += update(props.dot, 'top', parentHeight - props.dot.height / 2); } - - changed += update(this, 'left', start); - changed += update(this, 'width', Math.max(end - start, 1)); // TODO: reckon with border width; } else { changed += 1; @@ -4499,18 +4527,27 @@ ItemRange.prototype.reflow = function () { * Create an items DOM * @private */ -ItemRange.prototype._create = function () { +ItemBox.prototype._create = function () { var dom = this.dom; if (!dom) { this.dom = dom = {}; - // background box - dom.box = document.createElement('div'); + + // create the box + dom.box = document.createElement('DIV'); // className is updated in repaint() - // contents box - dom.content = document.createElement('div'); + // contents box (inside the background box). used for making margins + dom.content = document.createElement('DIV'); dom.content.className = 'content'; dom.box.appendChild(dom.content); + + // line to axis + dom.line = document.createElement('DIV'); + dom.line.className = 'line'; + + // dot on axis + dom.dot = document.createElement('DIV'); + dom.dot.className = 'dot'; } }; @@ -4519,61 +4556,71 @@ ItemRange.prototype._create = function () { * range and size of the items itemset * @override */ -ItemRange.prototype.reposition = function () { +ItemBox.prototype.reposition = function () { var dom = this.dom, - props = this.props; + props = this.props, + orientation = this.options.orientation; if (dom) { - dom.box.style.top = this.top + 'px'; - dom.box.style.left = this.left + 'px'; - dom.box.style.width = this.width + 'px'; + var box = dom.box, + line = dom.line, + dot = dom.dot; - dom.content.style.left = props.content.left + 'px'; + box.style.left = this.left + 'px'; + box.style.top = this.top + 'px'; + + line.style.left = props.line.left + 'px'; + if (orientation == 'top') { + line.style.top = 0 + 'px'; + line.style.height = this.top + 'px'; + } + else { + // orientation 'bottom' + line.style.top = props.line.top + 'px'; + line.style.top = (this.top + this.height) + 'px'; + line.style.height = Math.max(props.dot.top - this.top - this.height, 0) + 'px'; + + } + + dot.style.left = props.dot.left + 'px'; + dot.style.top = props.dot.top + 'px'; } }; // exports -module.exports = exports = ItemRange; +module.exports = exports = ItemBox; -},{"../../util":7,"./item":19}],15:[function(require,module,exports){ +},{"./item":19,"../../util":8}],16:[function(require,module,exports){ var util = require('../../util'), Item = require('./item'); /** - * @constructor ItemBox + * @constructor ItemRange * @extends Item * @param {ItemSet} parent - * @param {Object} data Object containing parameters start + * @param {Object} data Object containing parameters start, end * content, className. * @param {Object} [options] Options to set initial property values * // TODO: describe available options */ -function ItemBox (parent, data, options) { +function ItemRange (parent, data, options) { this.props = { - dot: { - left: 0, - top: 0, - width: 0, - height: 0 - }, - line: { - top: 0, + content: { left: 0, - width: 0, - height: 0 + width: 0 } }; Item.call(this, parent, data, options); } -ItemBox.prototype = new Item (null, null); +ItemRange.prototype = new Item (null, null); /** * Select the item * @override */ -ItemBox.prototype.select = function () { +ItemRange.prototype.select = function () { this.selected = true; // TODO: select and unselect }; @@ -4582,7 +4629,7 @@ ItemBox.prototype.select = function () { * Unselect the item * @override */ -ItemBox.prototype.unselect = function () { +ItemRange.prototype.unselect = function () { this.selected = false; // TODO: select and unselect }; @@ -4591,7 +4638,7 @@ ItemBox.prototype.unselect = function () { * Repaint the item * @return {Boolean} changed */ -ItemBox.prototype.repaint = function () { +ItemRange.prototype.repaint = function () { // TODO: make an efficient repaint var changed = false; var dom = this.dom; @@ -4604,7 +4651,7 @@ ItemBox.prototype.repaint = function () { dom = this.dom; if (dom) { - if (!this.options && !this.parent) { + if (!this.options && !this.options.parent) { throw new Error('Cannot repaint item: no parent attached'); } var foreground = this.parent.getForeground(); @@ -4612,26 +4659,13 @@ ItemBox.prototype.repaint = function () { throw new Error('Cannot repaint time axis: ' + 'parent has no foreground container element'); } - var background = this.parent.getBackground(); - if (!background) { - throw new Error('Cannot repaint time axis: ' + - 'parent has no background container element'); - } if (!dom.box.parentNode) { foreground.appendChild(dom.box); changed = true; } - if (!dom.line.parentNode) { - background.appendChild(dom.line); - changed = true; - } - if (!dom.dot.parentNode) { - this.parent.dom.axis.appendChild(dom.dot); - changed = true; - } - // update contents + // update content if (this.data.content != this.content) { this.content = this.data.content; if (this.content instanceof Element) { @@ -4648,13 +4682,10 @@ ItemBox.prototype.repaint = function () { } // update class - var className = (this.data.className? ' ' + this.data.className : '') + - (this.selected ? ' selected' : ''); + var className = this.data.className ? ('' + this.data.className) : ''; if (this.className != className) { this.className = className; - dom.box.className = 'item box' + className; - dom.line.className = 'item line' + className; - dom.dot.className = 'item dot' + className; + dom.box.className = 'item range' + className; changed = true; } } @@ -4666,14 +4697,6 @@ ItemBox.prototype.repaint = function () { dom.box.parentNode.removeChild(dom.box); changed = true; } - if (dom.line.parentNode) { - dom.line.parentNode.removeChild(dom.line); - changed = true; - } - if (dom.dot.parentNode) { - dom.dot.parentNode.removeChild(dom.dot); - changed = true; - } } } @@ -4681,65 +4704,69 @@ ItemBox.prototype.repaint = function () { }; /** - * Reflow the item: calculate its actual size and position from the DOM + * Reflow the item: calculate its actual size from the DOM * @return {boolean} resized returns true if the axis is resized * @override */ -ItemBox.prototype.reflow = function () { +ItemRange.prototype.reflow = function () { if (this.data.start == undefined) { throw new Error('Property "start" missing in item ' + this.data.id); } + if (this.data.end == undefined) { + throw new Error('Property "end" missing in item ' + this.data.id); + } - var update = util.updateProperty, - dom = this.dom, + var dom = this.dom, props = this.props, options = this.options, - start = this.parent.toScreen(this.data.start), - align = options && options.align, - orientation = options.orientation, - changed = 0, - top, - left; + parent = this.parent, + start = parent.toScreen(this.data.start), + end = parent.toScreen(this.data.end), + changed = 0; if (dom) { - changed += update(props.dot, 'height', dom.dot.offsetHeight); - changed += update(props.dot, 'width', dom.dot.offsetWidth); - changed += update(props.line, 'width', dom.line.offsetWidth); - changed += update(props.line, 'width', dom.line.offsetWidth); - changed += update(this, 'width', dom.box.offsetWidth); - changed += update(this, 'height', dom.box.offsetHeight); - if (align == 'right') { - left = start - this.width; + var update = util.updateProperty, + box = dom.box, + parentWidth = parent.width, + orientation = options.orientation, + contentLeft, + top; + + changed += update(props.content, 'width', dom.content.offsetWidth); + + changed += update(this, 'height', box.offsetHeight); + + // limit the width of the this, as browsers cannot draw very wide divs + if (start < -parentWidth) { + start = -parentWidth; } - else if (align == 'left') { - left = start; + if (end > 2 * parentWidth) { + end = 2 * parentWidth; + } + + // when range exceeds left of the window, position the contents at the left of the visible area + if (start < 0) { + contentLeft = Math.min(-start, + (end - start - props.content.width - 2 * options.padding)); + // TODO: remove the need for options.padding. it's terrible. } else { - // default or 'center' - left = start - this.width / 2; + contentLeft = 0; } - changed += update(this, 'left', left); + changed += update(props.content, 'left', contentLeft); - changed += update(props.line, 'left', start - props.line.width / 2); - changed += update(props.dot, 'left', start - props.dot.width / 2); if (orientation == 'top') { top = options.margin.axis; - changed += update(this, 'top', top); - changed += update(props.line, 'top', 0); - changed += update(props.line, 'height', top); - changed += update(props.dot, 'top', -props.dot.height / 2); } else { // default or 'bottom' - var parentHeight = this.parent.height; - top = parentHeight - this.height - options.margin.axis; - + top = parent.height - this.height - options.margin.axis; changed += update(this, 'top', top); - changed += update(props.line, 'top', top + this.height); - changed += update(props.line, 'height', Math.max(options.margin.axis, 0)); - changed += update(props.dot, 'top', parentHeight - props.dot.height / 2); } + + changed += update(this, 'left', start); + changed += update(this, 'width', Math.max(end - start, 1)); // TODO: reckon with border width; } else { changed += 1; @@ -4752,27 +4779,18 @@ ItemBox.prototype.reflow = function () { * Create an items DOM * @private */ -ItemBox.prototype._create = function () { +ItemRange.prototype._create = function () { var dom = this.dom; if (!dom) { this.dom = dom = {}; - - // create the box - dom.box = document.createElement('DIV'); + // background box + dom.box = document.createElement('div'); // className is updated in repaint() - // contents box (inside the background box). used for making margins - dom.content = document.createElement('DIV'); + // contents box + dom.content = document.createElement('div'); dom.content.className = 'content'; dom.box.appendChild(dom.content); - - // line to axis - dom.line = document.createElement('DIV'); - dom.line.className = 'line'; - - // dot on axis - dom.dot = document.createElement('DIV'); - dom.dot.className = 'dot'; } }; @@ -4781,41 +4799,23 @@ ItemBox.prototype._create = function () { * range and size of the items itemset * @override */ -ItemBox.prototype.reposition = function () { +ItemRange.prototype.reposition = function () { var dom = this.dom, - props = this.props, - orientation = this.options.orientation; + props = this.props; if (dom) { - var box = dom.box, - line = dom.line, - dot = dom.dot; - - box.style.left = this.left + 'px'; - box.style.top = this.top + 'px'; - - line.style.left = props.line.left + 'px'; - if (orientation == 'top') { - line.style.top = 0 + 'px'; - line.style.height = this.top + 'px'; - } - else { - // orientation 'bottom' - line.style.top = props.line.top + 'px'; - line.style.top = (this.top + this.height) + 'px'; - line.style.height = Math.max(props.dot.top - this.top - this.height, 0) + 'px'; - - } + dom.box.style.top = this.top + 'px'; + dom.box.style.left = this.left + 'px'; + dom.box.style.width = this.width + 'px'; - dot.style.left = props.dot.left + 'px'; - dot.style.top = props.dot.top + 'px'; + dom.content.style.left = props.content.left + 'px'; } }; // exports -module.exports = exports = ItemBox; +module.exports = exports = ItemRange; -},{"../../util":7,"./item":19}],17:[function(require,module,exports){ +},{"../../util":8,"./item":19}],17:[function(require,module,exports){ var util = require('../../util'), Item = require('./item'); @@ -5031,7 +5031,7 @@ ItemPoint.prototype.reposition = function () { // exports module.exports = exports = ItemPoint; -},{"../../util":7,"./item":19}],18:[function(require,module,exports){ +},{"../../util":8,"./item":19}],18:[function(require,module,exports){ (function(){// moment.js // version : 2.0.0 // author : Tim Wood @@ -6588,7 +6588,7 @@ Timeline.prototype.setData = function(data) { // exports module.exports = exports = Timeline; -},{"./../util":7,"../range":3,"../controller":2,"../component/component":9,"../component/rootpanel":11,"../component/timeaxis":13,"../component/itemset":12,"moment":18}],19:[function(require,module,exports){ +},{"./../util":8,"../range":5,"../controller":4,"../component/component":9,"../component/rootpanel":10,"../component/timeaxis":13,"../component/itemset":12,"moment":18}],19:[function(require,module,exports){ var Component = require('../component'); /** diff --git a/vis.min.js b/vis.min.js index 1d183290..8a661ca6 100644 --- a/vis.min.js +++ b/vis.min.js @@ -4,7 +4,7 @@ * * A dynamic, browser-based visualization library. * - * @version 0.0.6 + * @version 0.0.7 * @date 2013-04-25 * * @license @@ -22,6 +22,6 @@ * License for the specific language governing permissions and limitations under * the License. */ -(function(t){if("function"==typeof bootstrap)bootstrap("vis",t);else if("object"==typeof exports)module.exports=t();else if("function"==typeof define&&define.amd)define(t);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeVis=t}else"undefined"!=typeof window?window.vis=t():global.vis=t()})(function(){var t;return function(t,e,n){function i(n,r){if(!e[n]){if(!t[n]){var s="function"==typeof require&&require;if(!r&&s)return s(n,!0);if(o)return o(n,!0);throw Error("Cannot find module '"+n+"'")}var a=e[n]={exports:{}};t[n][0].call(a.exports,function(e){var o=t[n][1][e];return i(o?o:e)},a,a.exports)}return e[n].exports}for(var o="function"==typeof require&&require,r=0;n.length>r;r++)i(n[r]);return i}({1:[function(t,e,n){var i={Controller:t("./controller"),DataSet:t("./dataset"),events:t("./events"),Range:t("./range"),Stack:t("./stack"),TimeStep:t("./timestep"),util:t("./util"),component:{item:{Item:"../../Item",ItemBox:"../../ItemBox",ItemPoint:"../../ItemPoint",ItemRange:"../../ItemRange"},Component:t("./component/component"),Panel:t("./component/panel"),RootPanel:t("./component/rootpanel"),ItemSet:t("./component/itemset"),TimeAxis:t("./component/timeaxis")},Timeline:t("./visualization/timeline")};e.exports=n=i},{"./controller":2,"./range":3,"./dataset":4,"./events":5,"./stack":6,"./util":7,"./timestep":8,"./component/component":9,"./component/panel":10,"./component/rootpanel":11,"./component/itemset":12,"./component/timeaxis":13,"./visualization/timeline":14}],5:[function(t,e,n){var i={listeners:[],indexOf:function(t){for(var e=this.listeners,n=0,i=this.listeners.length;i>n;n++){var o=e[n];if(o&&o.object==t)return n}return-1},addListener:function(t,e,n){var i=this.indexOf(t),o=this.listeners[i];o||(o={object:t,events:{}},this.listeners.push(o));var r=o.events[e];r||(r=[],o.events[e]=r),-1==r.indexOf(n)&&r.push(n)},removeListener:function(t,e,n){var i=this.indexOf(t),o=this.listeners[i];if(o){var r=o.events[e];r&&(i=r.indexOf(n),-1!=i&&r.splice(i,1),0==r.length&&delete o.events[e]);var s=0,a=o.events;for(var h in a)a.hasOwnProperty(h)&&s++;0==s&&delete this.listeners[i]}},removeAllListeners:function(){this.listeners=[]},trigger:function(t,e,n){var i=this.indexOf(t),o=this.listeners[i];if(o){var r=o.events[e];if(r)for(var s=0,a=r.length;a>s;s++)r[s](n)}}};e.exports=n=i},{}],7:[function(t,e,n){var i={};i.isNumber=function(t){return t instanceof Number||"number"==typeof t},i.isString=function(t){return t instanceof String||"string"==typeof t},i.isDate=function(t){if(t instanceof Date)return!0;if(i.isString(t)){var e=o.exec(t);if(e)return!0;if(!isNaN(Date.parse(t)))return!0}return!1},i.isDataTable=function(t){return"undefined"!=typeof google&&google.visualization&&google.visualization.DataTable&&t instanceof google.visualization.DataTable},i.randomUUID=function(){var t=function(){return Math.floor(65536*Math.random()).toString(16)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},i.extend=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},i.cast=function(t,e){if(void 0===t)return void 0;if(null===t)return null;if(!e)return t;if("function"==typeof e)return e(t);switch(e){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return Number(t);case"string":case"String":return t+"";case"Date":if(i.isNumber(t))return new Date(t);if(t instanceof Date)return new Date(t.valueOf());if(i.isString(t)){var n=o.exec(t);return n?new Date(Number(n[1])):moment(t).toDate()}throw Error("Cannot cast object of type "+i.getType(t)+" to type Date");case"ISODate":if(t instanceof Date)return t.toISOString();if(i.isNumber(t)||i.isString(t))return moment(t).toDate().toISOString();throw Error("Cannot cast object of type "+i.getType(t)+" to type ISODate");case"ASPDate":if(t instanceof Date)return"/Date("+t.valueOf()+")/";if(i.isNumber(t)||i.isString(t))return"/Date("+moment(t).valueOf()+")/";throw Error("Cannot cast object of type "+i.getType(t)+" to type ASPDate");default:throw Error("Cannot cast object of type "+i.getType(t)+' to type "'+e+'"')}};var o=/^\/?Date\((\-?\d+)/i;if(i.getType=function(t){var e=typeof t;return"object"==e?null==t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":t instanceof Array?"Array":t instanceof Date?"Date":"Object":"number"==e?"Number":"boolean"==e?"Boolean":"string"==e?"String":e},i.getAbsoluteLeft=function(t){for(var e=document.documentElement,n=document.body,i=t.offsetLeft,o=t.offsetParent;null!=o&&o!=n&&o!=e;)i+=o.offsetLeft,i-=o.scrollLeft,o=o.offsetParent;return i},i.getAbsoluteTop=function(t){for(var e=document.documentElement,n=document.body,i=t.offsetTop,o=t.offsetParent;null!=o&&o!=n&&o!=e;)i+=o.offsetTop,i-=o.scrollTop,o=o.offsetParent;return i},i.getPageY=function(t){if("pageY"in t)return t.pageY;var e;e="targetTouches"in t&&t.targetTouches.length?t.targetTouches[0].clientY:t.clientY;var n=document.documentElement,i=document.body;return e+(n&&n.scrollTop||i&&i.scrollTop||0)-(n&&n.clientTop||i&&i.clientTop||0)},i.getPageX=function(t){if("pageY"in t)return t.pageX;var e;e="targetTouches"in t&&t.targetTouches.length?t.targetTouches[0].clientX:t.clientX;var n=document.documentElement,i=document.body;return e+(n&&n.scrollLeft||i&&i.scrollLeft||0)-(n&&n.clientLeft||i&&i.clientLeft||0)},i.addClassName=function(t,e){var n=t.className.split(" ");-1==n.indexOf(e)&&(n.push(e),t.className=n.join(" "))},i.removeClassName=function(t,e){var n=t.className.split(" "),i=n.indexOf(e);-1!=i&&(n.splice(i,1),t.className=n.join(" "))},i.forEach=function(t,e){if(t instanceof Array)t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n,t)},i.updateProperty=function(t,e,n){return t[e]!==n?(t[e]=n,!0):!1},i.addEventListener=function(t,e,n,i){t.addEventListener?(void 0===i&&(i=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.addEventListener(e,n,i)):t.attachEvent("on"+e,n)},i.removeEventListener=function(t,e,n,i){t.removeEventListener?(void 0===i&&(i=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.removeEventListener(e,n,i)):t.detachEvent("on"+e,n)},i.getTarget=function(t){t||(t=window.event);var e;return t.target?e=t.target:t.srcElement&&(e=t.srcElement),void 0!=e.nodeType&&3==e.nodeType&&(e=e.parentNode),e},i.stopPropagation=function(t){t||(t=window.event),t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},i.preventDefault=function(t){t||(t=window.event),t.preventDefault?t.preventDefault():t.returnValue=!1},i.option={},i.option.asBoolean=function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},i.option.asNumber=function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t):e||null},i.option.asString=function(t,e){return"function"==typeof t&&(t=t()),null!=t?t+"":e||null},i.option.asSize=function(t,e){return"function"==typeof t&&(t=t()),i.isString(t)?t:i.isNumber(t)?t+"px":e||null},i.option.asElement=function(t,e){return"function"==typeof t&&(t=t()),t||e||null},!Array.prototype.indexOf){Array.prototype.indexOf=function(t){for(var e=0;this.length>e;e++)if(this[e]==t)return e;return-1};try{console.log("Warning: Ancient browser detected. Please update your browser")}catch(r){}}Array.prototype.forEach||(Array.prototype.forEach=function(t,e){for(var n=0,i=this.length;i>n;++n)t.call(e||this,this[n],n,this)}),Array.prototype.map||(Array.prototype.map=function(t,e){var n,i,o;if(null==this)throw new TypeError(" this is null or not defined");var r=Object(this),s=r.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(e&&(n=e),i=Array(s),o=0;s>o;){var a,h;o in r&&(a=r[o],h=t.call(n,a,o,r),i[o]=h),o++}return i}),Array.prototype.filter||(Array.prototype.filter=function(t){"use strict";if(null==this)throw new TypeError;var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var i=[],o=arguments[1],r=0;n>r;r++)if(r in e){var s=e[r];t.call(o,s,r,e)&&i.push(s)}return i}),Object.keys||(Object.keys=function(){var t=Object.prototype.hasOwnProperty,e=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],i=n.length;return function(o){if("object"!=typeof o&&"function"!=typeof o||null===o)throw new TypeError("Object.keys called on non-object");var r=[];for(var s in o)t.call(o,s)&&r.push(s);if(e)for(var a=0;i>a;a++)t.call(o,n[a])&&r.push(n[a]);return r}}()),Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),e.exports=n=i},{}],2:[function(t,e,n){function i(){this.id=o.randomUUID(),this.components={},this.repaintTimer=void 0,this.reflowTimer=void 0}var o=t("./util"),r=t("./component/component");i.prototype.add=function(t){if(void 0==t.id)throw Error("Component has no field id");if(!(t instanceof r||t instanceof i))throw new TypeError("Component must be an instance of prototype Component or Controller");t.controller=this,this.components[t.id]=t},i.prototype.requestReflow=function(){if(!this.reflowTimer){var t=this;this.reflowTimer=setTimeout(function(){t.reflowTimer=void 0,t.reflow()},0)}},i.prototype.requestRepaint=function(){if(!this.repaintTimer){var t=this;this.repaintTimer=setTimeout(function(){t.repaintTimer=void 0,t.repaint()},0)}},i.prototype.repaint=function(){function t(i,o){o in n||(i.depends&&i.depends.forEach(function(e){t(e,e.id)}),i.parent&&t(i.parent,i.parent.id),e=i.repaint()||e,n[o]=!0)}var e=!1;this.repaintTimer&&(clearTimeout(this.repaintTimer),this.repaintTimer=void 0);var n={};o.forEach(this.components,t),e&&this.reflow()},i.prototype.reflow=function(){function t(i,o){o in n||(i.depends&&i.depends.forEach(function(e){t(e,e.id)}),i.parent&&t(i.parent,i.parent.id),e=i.reflow()||e,n[o]=!0)}var e=!1;this.reflowTimer&&(clearTimeout(this.reflowTimer),this.reflowTimer=void 0);var n={};o.forEach(this.components,t),e&&this.repaint()},e.exports=n=i},{"./util":7,"./component/component":9}],4:[function(t,e,n){function i(t){var e=this;this.options=t||{},this.data={},this.fieldId=this.options.fieldId||"id",this.fieldTypes={},this.options.fieldTypes&&o.forEach(this.options.fieldTypes,function(t,n){e.fieldTypes[n]="Date"==t||"ISODate"==t||"ASPDate"==t?"Date":t}),this.subscribers={},this.internalIds={}}var o=t("./util");i.prototype.subscribe=function(t,e,n){var i=this.subscribers[t];i||(i=[],this.subscribers[t]=i),i.push({id:n?n+"":null,callback:e})},i.prototype.unsubscribe=function(t,e){var n=this.subscribers[t];n&&(this.subscribers[t]=n.filter(function(t){return t.callback!=e}))},i.prototype._trigger=function(t,e,n){if("*"==t)throw Error("Cannot trigger event *");var i=[];t in this.subscribers&&(i=i.concat(this.subscribers[t])),"*"in this.subscribers&&(i=i.concat(this.subscribers["*"])),i.forEach(function(i){i.id!=n&&i.callback&&i.callback(t,e,n||null)})},i.prototype.add=function(t,e){var n,i=[],r=this;if(t instanceof Array)t.forEach(function(t){var e=r._addItem(t);i.push(e)});else if(o.isDataTable(t))for(var s=this._getColumnNames(t),a=0,h=t.getNumberOfRows();h>a;a++){var c={};s.forEach(function(e,n){c[e]=t.getValue(a,n)}),n=r._addItem(c),i.push(n)}else{if(!(t instanceof Object))throw Error("Unknown dataType");n=r._addItem(t),i.push(n)}this._trigger("add",{items:i},e)},i.prototype.update=function(t,e){var n,i=[],r=this;if(t instanceof Array)t.forEach(function(t){var e=r._updateItem(t);i.push(e)});else if(o.isDataTable(t))for(var s=this._getColumnNames(t),a=0,h=t.getNumberOfRows();h>a;a++){var c={};s.forEach(function(e,n){c[e]=t.getValue(a,n)}),n=r._updateItem(c),i.push(n)}else{if(!(t instanceof Object))throw Error("Unknown dataType");n=r._updateItem(t),i.push(n)}this._trigger("update",{items:i},e)},i.prototype.get=function(t,e,n){var i=this;"Object"==o.getType(t)&&(n=e,e=t,t=void 0);var r={};this.options&&this.options.fieldTypes&&o.forEach(this.options.fieldTypes,function(t,e){r[e]=t}),e&&e.fieldTypes&&o.forEach(e.fieldTypes,function(t,e){r[e]=t});var s,a=e?e.fields:void 0;if(e&&e.type){if(s="DataTable"==e.type?"DataTable":"Array",n&&s!=o.getType(n))throw Error('Type of parameter "data" ('+o.getType(n)+") "+"does not correspond with specified options.type ("+e.type+")");if("DataTable"==s&&!o.isDataTable(n))throw Error('Parameter "data" must be a DataTable when options.type is "DataTable"')}else s=n?"DataTable"==o.getType(n)?"DataTable":"Array":"Array";if("DataTable"==s){var h=this._getColumnNames(n);if(void 0==t)o.forEach(this.data,function(t){i._appendRow(n,h,i._castItem(t))});else if(o.isNumber(t)||o.isString(t)){var c=i._castItem(i.data[t],r,a);this._appendRow(n,h,c)}else{if(!(t instanceof Array))throw new TypeError('Parameter "ids" must be undefined, a String, Number, or Array');t.forEach(function(t){var e=i._castItem(i.data[t],r,a);i._appendRow(n,h,e)})}}else if(n=n||[],void 0==t)o.forEach(this.data,function(t){n.push(i._castItem(t,r,a))});else{if(o.isNumber(t)||o.isString(t))return this._castItem(i.data[t],r,a);if(!(t instanceof Array))throw new TypeError('Parameter "ids" must be undefined, a String, Number, or Array');t.forEach(function(t){n.push(i._castItem(i.data[t],r,a))})}return n},i.prototype.remove=function(t,e){var n=[],i=this;if(o.isNumber(t)||o.isString(t))delete this.data[t],delete this.internalIds[t],n.push(t);else if(t instanceof Array)t.forEach(function(t){i.remove(t)}),n=n.concat(t);else if(t instanceof Object)for(var r in this.data)this.data.hasOwnProperty(r)&&this.data[r]==t&&(delete this.data[r],delete this.internalIds[r],n.push(r));this._trigger("remove",{items:n},e)},i.prototype.clear=function(t){var e=Object.keys(this.data);this.data={},this.internalIds={},this._trigger("remove",{items:e},t)},i.prototype.max=function(t){var e=this.data,n=Object.keys(e),i=null,o=null;return n.forEach(function(n){var r=e[n],s=r[t];null!=s&&(!i||s>o)&&(i=r,o=s)}),i},i.prototype.min=function(t){var e=this.data,n=Object.keys(e),i=null,o=null;return n.forEach(function(n){var r=e[n],s=r[t];null!=s&&(!i||o>s)&&(i=r,o=s)}),i},i.prototype._addItem=function(t){var e=t[this.fieldId];void 0==e&&(e=o.randomUUID(),t[this.fieldId]=e,this.internalIds[e]=t);var n={};for(var i in t)if(t.hasOwnProperty(i)){var r=this.fieldTypes[i];n[i]=o.cast(t[i],r)}return this.data[e]=n,e},i.prototype._castItem=function(t,e,n){var i,r=this.fieldId,s=this.internalIds;return t?(i={},e=e||{},n?o.forEach(t,function(t,r){-1!=n.indexOf(r)&&(i[r]=o.cast(t,e[r]))}):o.forEach(t,function(t,n){n==r&&t in s||(i[n]=o.cast(t,e[n]))})):i=null,i},i.prototype._updateItem=function(t){var e=t[this.fieldId];if(void 0==e)throw Error("Item has no id (item: "+JSON.stringify(t)+")");var n=this.data[e];if(n){for(var i in t)if(t.hasOwnProperty(i)){var r=this.fieldTypes[i];n[i]=o.cast(t[i],r)}}else this._addItem(t);return e},i.prototype._getColumnNames=function(t){for(var e=[],n=0,i=t.getNumberOfColumns();i>n;n++)e[n]=t.getColumnId(n)||t.getColumnLabel(n);return e},i.prototype._appendRow=function(t,e,n){var i=t.addRow();e.forEach(function(e,o){t.setValue(i,o,n[e])})},e.exports=n=i},{"./util":7}],3:[function(t,e,n){function i(t){this.id=o.randomUUID(),this.start=0,this.end=0,this.options={min:null,max:null,zoomMin:null,zoomMax:null},this.setOptions(t),this.listeners=[]}var o=t("./util"),r=t("./events");i.prototype.setOptions=function(t){o.extend(this.options,t),(null!=t.start||null!=t.end)&&this.setRange(t.start,t.end)},i.prototype.subscribe=function(t,e,n){var i,o=this;if("horizontal"!=n&&"vertical"!=n)throw new TypeError('Unknown direction "'+n+'". '+'Choose "horizontal" or "vertical".');if("move"==e)i={component:t,event:e,direction:n,callback:function(t){o._onMouseDown(t,i)},params:{}},t.on("mousedown",i.callback),o.listeners.push(i);else{if("zoom"!=e)throw new TypeError('Unknown event "'+e+'". '+'Choose "move" or "zoom".');i={component:t,event:e,direction:n,callback:function(t){o._onMouseWheel(t,i)},params:{}},t.on("mousewheel",i.callback),o.listeners.push(i)}},i.prototype.on=function(t,e){r.addListener(this,t,e)},i.prototype._trigger=function(t){r.trigger(this,t,{start:this.start,end:this.end})},i.prototype.setRange=function(t,e){var n=this._applyRange(t,e);n&&(this._trigger("rangechange"),this._trigger("rangechanged"))},i.prototype._applyRange=function(t,e){var n,i=null!=t?o.cast(t,"Number"):this.start,r=null!=e?o.cast(e,"Number"):this.end;if(isNaN(i))throw Error('Invalid start "'+t+'"');if(isNaN(r))throw Error('Invalid end "'+e+'"');if(i>r&&(r=i),null!=this.options.min){var s=this.options.min.valueOf();s>i&&(n=s-i,i+=n,r+=n)}if(null!=this.options.max){var a=this.options.max.valueOf();r>a&&(n=r-a,i-=n,r-=n)}if(null!=this.options.zoomMin){var h=this.options.zoomMin.valueOf();0>h&&(h=0),h>r-i&&(this.end-this.start>h?(n=h-(r-i),i-=n/2,r+=n/2):(i=this.start,r=this.end))}if(null!=this.options.zoomMax){var c=this.options.zoomMax.valueOf();0>c&&(c=0),r-i>c&&(c>this.end-this.start?(n=r-i-c,i+=n/2,r-=n/2):(i=this.start,r=this.end))}var p=this.start!=i||this.end!=r;return this.start=i,this.end=r,p},i.prototype.getRange=function(){return{start:this.start,end:this.end}},i.prototype.conversion=function(t){return this.start,this.end,i.conversion(this.start,this.end,t)},i.conversion=function(t,e,n){return 0!=n&&0!=e-t?{offset:t,factor:n/(e-t)}:{offset:0,factor:1}},i.prototype._onMouseDown=function(t,e){t=t||window.event;var n=e.params,i=t.which?1==t.which:1==t.button;if(i){n.mouseX=o.getPageX(t),n.mouseY=o.getPageY(t),n.previousLeft=0,n.previousOffset=0,n.moved=!1,n.start=this.start,n.end=this.end;var r=e.component.frame;r&&(r.style.cursor="move");var s=this;n.onMouseMove||(n.onMouseMove=function(t){s._onMouseMove(t,e)},o.addEventListener(document,"mousemove",n.onMouseMove)),n.onMouseUp||(n.onMouseUp=function(t){s._onMouseUp(t,e)},o.addEventListener(document,"mouseup",n.onMouseUp)),o.preventDefault(t)}},i.prototype._onMouseMove=function(t,e){t=t||window.event;var n=e.params,i=o.getPageX(t),r=o.getPageY(t);void 0==n.mouseX&&(n.mouseX=i),void 0==n.mouseY&&(n.mouseY=r);var s=i-n.mouseX,a=r-n.mouseY,h="horizontal"==e.direction?s:a;Math.abs(h)>=1&&(n.moved=!0);var c=n.end-n.start,p="horizontal"==e.direction?e.component.width:e.component.height,u=-h/p*c;this._applyRange(n.start+u,n.end+u),this._trigger("rangechange"),o.preventDefault(t)},i.prototype._onMouseUp=function(t,e){t=t||window.event;var n=e.params;e.component.frame&&(e.component.frame.style.cursor="auto"),n.onMouseMove&&(o.removeEventListener(document,"mousemove",n.onMouseMove),n.onMouseMove=null),n.onMouseUp&&(o.removeEventListener(document,"mouseup",n.onMouseUp),n.onMouseUp=null),n.moved&&this._trigger("rangechanged")},i.prototype._onMouseWheel=function(t,e){t=t||window.event;var n=0;if(t.wheelDelta?n=t.wheelDelta/120:t.detail&&(n=-t.detail/3),n){var i=this,r=function(){var r=n/5,s=null,a=e.component.frame;if(a){var h,c;if("horizontal"==e.direction){h=e.component.width,c=i.conversion(h);var p=o.getAbsoluteLeft(a),u=o.getPageX(t);s=(u-p)/c.factor+c.offset}else{h=e.component.height,c=i.conversion(h);var l=o.getAbsoluteTop(a),d=o.getPageY(t);s=(l+h-d-l)/c.factor+c.offset}}i.zoom(r,s)};r()}o.preventDefault(t)},i.prototype.zoom=function(t,e){null==e&&(e=(this.start+this.end)/2),t>=1&&(t=.9),-1>=t&&(t=-.9),0>t&&(t/=1+t);var n=this.start-e,i=this.end-e,o=this.start-n*t,r=this.end-i*t;this.setRange(o,r)},i.prototype.move=function(t){var e=this.end-this.start,n=this.start+e*t,i=this.end+e*t;this.start=n,this.end=i},e.exports=n=i},{"./util":7,"./events":5}],6:[function(t,e,n){function i(t,e){this.parent=t,this.options={order:function(t,e){return e.width-t.width||t.left-e.left}},this.ordered=[],this.setOptions(e)}var o=t("./util");i.prototype.setOptions=function(t){o.extend(this.options,t)},i.prototype.update=function(){this._order(),this._stack()},i.prototype._order=function(){var t=this.parent.items;if(!t)throw Error("Cannot stack items: parent does not contain items");var e=[],n=0;o.forEach(t,function(t){e[n]=t,n++});var i=this.options.order;if("function"!=typeof this.options.order)throw Error("Option order must be a function");e.sort(i),this.ordered=e},i.prototype._stack=function(){var t,e,n=this.ordered,i=this.options,o="top"==i.orientation,r=i.margin&&i.margin.item||0;for(t=0,e=n.length;e>t;t++){var s=n[t],a=null;do a=this.checkOverlap(n,t,0,t-1,r),null!=a&&(s.top=o?a.top+a.height+r:a.top-s.height-r);while(a)}},i.prototype.checkOverlap=function(t,e,n,i,o){for(var r=this.collision,s=t[e],a=i;a>=n;a--){var h=t[a];if(r(s,h,o)&&a!=e)return h}return null},i.prototype.collision=function(t,e,n){return t.left-ne.left&&t.top-ne.top},e.exports=n=i},{"./util":7}],9:[function(t,e,n){function i(){this.id=null,this.parent=null,this.depends=null,this.controller=null,this.options=null,this.frame=null,this.top=0,this.left=0,this.width=0,this.height=0}var o=t("./../util");i.prototype.setOptions=function(t){t&&o.extend(this.options,t),this.controller&&(this.requestRepaint(),this.requestReflow())},i.prototype.getContainer=function(){return null},i.prototype.getFrame=function(){return this.frame},i.prototype.repaint=function(){return!1},i.prototype.reflow=function(){return!1},i.prototype.requestRepaint=function(){if(!this.controller)throw Error("Cannot request a repaint: no controller configured");this.controller.requestRepaint()},i.prototype.requestReflow=function(){if(!this.controller)throw Error("Cannot request a reflow: no controller configured");this.controller.requestReflow()},i.prototype.on=function(t,e){if(!this.parent)throw Error("Cannot attach event: no root panel found");this.parent.on(t,e)},e.exports=n=i},{"./../util":7}],10:[function(t,e,n){function i(t,e,n){this.id=o.randomUUID(),this.parent=t,this.depends=e,this.options={},this.setOptions(n)}var o=t("../util"),r=t("./component");i.prototype=new r,i.prototype.getContainer=function(){return this.frame},i.prototype.repaint=function(){var t=0,e=o.updateProperty,n=o.option.asSize,i=this.options,r=this.frame;if(r||(r=document.createElement("div"),r.className="panel",i.className&&("function"==typeof i.className?o.addClassName(r,i.className()+""):o.addClassName(r,i.className+"")),this.frame=r,t+=1),!r.parentNode){if(!this.parent)throw Error("Cannot repaint panel: no parent attached");var s=this.parent.getContainer();if(!s)throw Error("Cannot repaint panel: parent has no container element");s.appendChild(r),t+=1}return t+=e(r.style,"top",n(i.top,"0px")),t+=e(r.style,"left",n(i.left,"0px")),t+=e(r.style,"width",n(i.width,"100%")),t+=e(r.style,"height",n(i.height,"100%")),t>0},i.prototype.reflow=function(){var t=0,e=o.updateProperty,n=this.frame;return n?(t+=e(this,"top",n.offsetTop),t+=e(this,"left",n.offsetLeft),t+=e(this,"width",n.offsetWidth),t+=e(this,"height",n.offsetHeight)):t+=1,t>0},e.exports=n=i},{"../util":7,"./component":9}],11:[function(t,e,n){function i(t,e){this.id=o.randomUUID(),this.container=t,this.options={autoResize:!0},this.listeners={},this.setOptions(e)}var o=t("../util"),r=t("./panel");i.prototype=new r,i.prototype.setOptions=function(t){o.extend(this.options,t),this.options.autoResize?this._watch():this._unwatch()},i.prototype.repaint=function(){var t=0,e=o.updateProperty,n=o.option.asSize,i=this.options,r=this.frame;if(r||(r=document.createElement("div"),r.className="graph panel",i.className&&o.addClassName(r,o.option.asString(i.className)),this.frame=r,t+=1),!r.parentNode){if(!this.container)throw Error("Cannot repaint root panel: no container attached");this.container.appendChild(r),t+=1}return t+=e(r.style,"top",n(i.top,"0px")),t+=e(r.style,"left",n(i.left,"0px")),t+=e(r.style,"width",n(i.width,"100%")),t+=e(r.style,"height",n(i.height,"100%")),this._updateEventEmitters(),t>0},i.prototype.reflow=function(){var t=0,e=o.updateProperty,n=this.frame;return n?(t+=e(this,"top",n.offsetTop),t+=e(this,"left",n.offsetLeft),t+=e(this,"width",n.offsetWidth),t+=e(this,"height",n.offsetHeight)):t+=1,t>0},i.prototype._watch=function(){var t=this;this._unwatch();var e=function(){return t.options.autoResize?(t.frame&&(t.frame.clientWidth!=t.width||t.frame.clientHeight!=t.height)&&t.requestReflow(),void 0):(t._unwatch(),void 0)};o.addEventListener(window,"resize",e),this.watchTimer=setInterval(e,1e3)},i.prototype._unwatch=function(){this.watchTimer&&(clearInterval(this.watchTimer),this.watchTimer=void 0)},i.prototype.on=function(t,e){var n=this.listeners[t];n||(n=[],this.listeners[t]=n),n.push(e),this._updateEventEmitters()},i.prototype._updateEventEmitters=function(){if(this.listeners){var t=this;o.forEach(this.listeners,function(e,n){if(t.emitters||(t.emitters={}),!(n in t.emitters)){var i=t.frame;if(i){var r=function(t){e.forEach(function(e){e(t)})};t.emitters[n]=r,o.addEventListener(i,n,r)}}})}},e.exports=n=i},{"../util":7,"./panel":10}],12:[function(t,e,n){function i(t,e,n){this.id=o.randomUUID(),this.parent=t,this.depends=e,this.options={style:"box",align:"center",orientation:"bottom",margin:{axis:20,item:10},padding:5},this.dom={};var i=this;this.data=null,this.range=null,this.listeners={add:function(t,e){i._onAdd(e.items)},update:function(t,e){i._onUpdate(e.items)},remove:function(t,e){i._onRemove(e.items)}},this.items={},this.queue={},this.stack=new a(this),this.conversion=null,this.setOptions(n)}var o=t("../util"),r=t("../dataset"),s=t("./panel"),a=t("../stack"),h=t("./item/itembox"),c=t("./item/itemrange"),p=t("./item/itempoint");i.prototype=new s,i.types={box:h,range:c,point:p},i.prototype.setOptions=function(t){o.extend(this.options,t),this.stack.setOptions(this.options)},i.prototype.setRange=function(t){if(!(t instanceof Range||t&&t.start&&t.end))throw new TypeError("Range must be an instance of Range, or an object containing start and end.");this.range=t},i.prototype.repaint=function(){var t=0,e=o.updateProperty,n=o.option.asSize,r=this.options,s=this.frame;if(!s){s=document.createElement("div"),s.className="itemset",r.className&&o.addClassName(s,o.option.asString(r.className));var a=document.createElement("div");a.className="background",s.appendChild(a),this.dom.background=a;var h=document.createElement("div");h.className="foreground",s.appendChild(h),this.dom.foreground=h;var c=document.createElement("div");c.className="itemset-axis",this.dom.axis=c,this.frame=s,t+=1}if(!this.parent)throw Error("Cannot repaint itemset: no parent attached");var p=this.parent.getContainer();if(!p)throw Error("Cannot repaint itemset: parent has no container element");s.parentNode||(p.appendChild(s),t+=1),this.dom.axis.parentNode||(p.appendChild(this.dom.axis),t+=1),t+=e(s.style,"height",n(r.height,this.height+"px")),t+=e(s.style,"top",n(r.top,"0px")),t+=e(s.style,"left",n(r.left,"0px")),t+=e(s.style,"width",n(r.width,"100%")),t+=e(this.dom.axis.style,"top",n(r.top,"0px")),this._updateConversion();var u=this,l=this.queue,d=this.data,f=this.items,m={fields:["id","start","end","content","type"]};return Object.keys(l).forEach(function(e){var n=l[e],o=n.item;switch(n.action){case"add":case"update":var s=d.get(e,m),a=s.type||s.start&&s.end&&"range"||"box",h=i.types[a];if(o&&(h&&o instanceof h?(o.data=s,t+=o.repaint()):(o.visible=!1,t+=o.repaint(),o=null)),!o){if(!h)throw new TypeError('Unknown item type "'+a+'"');o=new h(u,s,r),t+=o.repaint()}f[e]=o,delete l[e];break;case"remove":o&&(o.visible=!1,t+=o.repaint()),delete f[e],delete l[e];break;default:console.log('Error: unknown action "'+n.action+'"')}}),o.forEach(this.items,function(t){t.reposition()}),t>0},i.prototype.getForeground=function(){return this.dom.foreground},i.prototype.getBackground=function(){return this.dom.background},i.prototype.reflow=function(){var t=0,e=this.options,n=o.updateProperty,i=o.option.asNumber,r=this.frame;if(r){this._updateConversion(),o.forEach(this.items,function(e){t+=e.reflow()}),this.stack.update();var s,a=i(e.maxHeight);if(null!=e.height)s=r.offsetHeight,null!=a&&(s=Math.min(s,a)),t+=n(this,"height",s);else{var h=this.height;s=0,"top"==e.orientation?o.forEach(this.items,function(t){s=Math.max(s,t.top+t.height)}):o.forEach(this.items,function(t){s=Math.max(s,h-t.top)}),s+=e.margin.axis,null!=a&&(s=Math.min(s,a)),t+=n(this,"height",s)}t+=n(this,"top",r.offsetTop),t+=n(this,"left",r.offsetLeft),t+=n(this,"width",r.offsetWidth)}else t+=1;return t>0},i.prototype.setData=function(t){var e=this.data;e&&o.forEach(this.listeners,function(t,n){e.unsubscribe(n,t)}),t instanceof r?this.data=t:(this.data=new r({fieldTypes:{start:"Date",end:"Date"}}),this.data.add(t));var n=this.id,i=this;o.forEach(this.listeners,function(t,e){i.data.subscribe(e,t,n)});var s=this.data.get({filter:["id"]}),a=[];o.forEach(s,function(t,e){a[e]=t.id}),this._onAdd(a)},i.prototype.getDataRange=function(){var t=this.data,e=t.min("start");e=e?e.start.valueOf():null;var n=t.max("start"),i=t.max("end");n=n?n.start.valueOf():null,i=i?i.end.valueOf():null;var o=Math.max(n,i);return{min:new Date(e),max:new Date(o)}},i.prototype._onUpdate=function(t){this._toQueue(t,"update")},i.prototype._onAdd=function(t){this._toQueue(t,"add")},i.prototype._onRemove=function(t){this._toQueue(t,"remove")},i.prototype._toQueue=function(t,e){var n=this.items,i=this.queue;t.forEach(function(t){var o=i[t];o?o.action=e:i[t]={item:n[t]||null,action:e}}),this.controller&&this.requestRepaint()},i.prototype._updateConversion=function(){var t=this.range;if(!t)throw Error("No range configured");this.conversion=t.conversion?t.conversion(this.width):Range.conversion(t.start,t.end,this.width)},i.prototype.toTime=function(t){var e=this.conversion;return new Date(t/e.factor+e.offset)},i.prototype.toScreen=function(t){var e=this.conversion;return(t.valueOf()-e.offset)*e.factor},e.exports=n=i},{"../dataset":4,"../util":7,"./panel":10,"../stack":6,"./item/itembox":15,"./item/itemrange":16,"./item/itempoint":17}],13:[function(t,e,n){function i(t,e,n){this.id=o.randomUUID(),this.parent=t,this.depends=e,this.dom={majorLines:[],majorTexts:[],minorLines:[],minorTexts:[],redundant:{majorLines:[],majorTexts:[],minorLines:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.options={orientation:"bottom",showMinorLabels:!0,showMajorLabels:!0},this.conversion=null,this.range=null,this.setOptions(n)}var o=t("../util"),r=t("../timestep"),s=t("./component");i.prototype=new s,i.prototype.setOptions=function(t){o.extend(this.options,t)},i.prototype.setRange=function(t){if(!(t instanceof Range||t&&t.start&&t.end))throw new TypeError("Range must be an instance of Range, or an object containing start and end.");this.range=t},i.prototype.toTime=function(t){var e=this.conversion;return new Date(t/e.factor+e.offset)},i.prototype.toScreen=function(t){var e=this.conversion;return(t.valueOf()-e.offset)*e.factor},i.prototype.repaint=function(){var t=0,e=o.updateProperty,n=o.option.asSize,i=this.options,r=this.props,s=this.step,a=this.frame;if(a||(a=document.createElement("div"),this.frame=a,t+=1),a.className="axis "+i.orientation,!a.parentNode){if(!this.parent)throw Error("Cannot repaint time axis: no parent attached");var h=this.parent.getContainer();if(!h)throw Error("Cannot repaint time axis: parent has no container element");h.appendChild(a),t+=1}var c=a.parentNode;if(c){var p=a.nextSibling;c.removeChild(a);var u=i.orientation,l="bottom"==u&&this.props.parentHeight&&this.height?this.props.parentHeight-this.height+"px":"0px";if(t+=e(a.style,"top",n(i.top,l)),t+=e(a.style,"left",n(i.left,"0px")),t+=e(a.style,"width",n(i.width,"100%")),t+=e(a.style,"height",n(i.height,this.height+"px")),this._repaintMeasureChars(),this.step){this._repaintStart(),s.first();for(var d=void 0,f=0;s.hasNext()&&1e3>f;){f++;var m=s.getCurrent(),g=this.toScreen(m),v=s.isMajor();i.showMinorLabels&&this._repaintMinorText(g,s.getLabelMinor()),v&&i.showMajorLabels?(g>0&&(void 0==d&&(d=g),this._repaintMajorText(g,s.getLabelMajor())),this._repaintMajorLine(g)):this._repaintMinorLine(g),s.next()}if(i.showMajorLabels){var y=this.toTime(0),S=s.getLabelMajor(y),T=S.length*(r.majorCharWidth||10)+10;(void 0==d||d>T)&&this._repaintMajorText(0,S)}this._repaintEnd()}this._repaintLine(),p?c.insertBefore(a,p):c.appendChild(a)}return t>0 -},i.prototype._repaintStart=function(){var t=this.dom,e=t.redundant;e.majorLines=t.majorLines,e.majorTexts=t.majorTexts,e.minorLines=t.minorLines,e.minorTexts=t.minorTexts,t.majorLines=[],t.majorTexts=[],t.minorLines=[],t.minorTexts=[]},i.prototype._repaintEnd=function(){o.forEach(this.dom.redundant,function(t){for(;t.length;){var e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}})},i.prototype._repaintMinorText=function(t,e){var n=this.dom.redundant.minorTexts.shift();if(!n){var i=document.createTextNode("");n=document.createElement("div"),n.appendChild(i),n.className="text minor",this.frame.appendChild(n)}this.dom.minorTexts.push(n),n.childNodes[0].nodeValue=e,n.style.left=t+"px",n.style.top=this.props.minorLabelTop+"px"},i.prototype._repaintMajorText=function(t,e){var n=this.dom.redundant.majorTexts.shift();if(!n){var i=document.createTextNode(e);n=document.createElement("div"),n.className="text major",n.appendChild(i),this.frame.appendChild(n)}this.dom.majorTexts.push(n),n.childNodes[0].nodeValue=e,n.style.top=this.props.majorLabelTop+"px",n.style.left=t+"px"},i.prototype._repaintMinorLine=function(t){var e=this.dom.redundant.minorLines.shift();e||(e=document.createElement("div"),e.className="grid vertical minor",this.frame.appendChild(e)),this.dom.minorLines.push(e);var n=this.props;e.style.top=n.minorLineTop+"px",e.style.height=n.minorLineHeight+"px",e.style.left=t-n.minorLineWidth/2+"px"},i.prototype._repaintMajorLine=function(t){var e=this.dom.redundant.majorLines.shift();e||(e=document.createElement("DIV"),e.className="grid vertical major",this.frame.appendChild(e)),this.dom.majorLines.push(e);var n=this.props;e.style.top=n.majorLineTop+"px",e.style.left=t-n.majorLineWidth/2+"px",e.style.height=n.majorLineHeight+"px"},i.prototype._repaintLine=function(){var t=this.dom.line,e=this.frame,n=this.options;n.showMinorLabels||n.showMajorLabels?(t?(e.removeChild(t),e.appendChild(t)):(t=document.createElement("div"),t.className="grid horizontal major",e.appendChild(t),this.dom.line=t),t.style.top=this.props.lineTop+"px"):t&&axis.parentElement&&(e.removeChild(axis.line),delete this.dom.line)},i.prototype._repaintMeasureChars=function(){var t,e=this.dom;if(!e.characterMinor){t=document.createTextNode("0");var n=document.createElement("DIV");n.className="text minor measure",n.appendChild(t),this.frame.appendChild(n),e.measureCharMinor=n}if(!e.characterMajor){t=document.createTextNode("0");var i=document.createElement("DIV");i.className="text major measure",i.appendChild(t),this.frame.appendChild(i),e.measureCharMajor=i}},i.prototype.reflow=function(){var t=0,e=o.updateProperty,n=this.frame,i=this.range;if(!i)throw Error("Cannot repaint time axis: no range configured");if(n){t+=e(this,"top",n.offsetTop),t+=e(this,"left",n.offsetLeft);var s=this.props,a=this.options.showMinorLabels,h=this.options.showMajorLabels,c=this.dom.measureCharMinor,p=this.dom.measureCharMajor;c&&(s.minorCharHeight=c.clientHeight,s.minorCharWidth=c.clientWidth),p&&(s.majorCharHeight=p.clientHeight,s.majorCharWidth=p.clientWidth);var u=n.parentNode?n.parentNode.offsetHeight:0;switch(u!=s.parentHeight&&(s.parentHeight=u,t+=1),this.options.orientation){case"bottom":s.minorLabelHeight=a?s.minorCharHeight:0,s.majorLabelHeight=h?s.majorCharHeight:0,s.minorLabelTop=0,s.majorLabelTop=s.minorLabelTop+s.minorLabelHeight,s.minorLineTop=-this.top,s.minorLineHeight=Math.max(this.top+s.majorLabelHeight,0),s.minorLineWidth=1,s.majorLineTop=-this.top,s.majorLineHeight=Math.max(this.top+s.minorLabelHeight+s.majorLabelHeight,0),s.majorLineWidth=1,s.lineTop=0;break;case"top":s.minorLabelHeight=a?s.minorCharHeight:0,s.majorLabelHeight=h?s.majorCharHeight:0,s.majorLabelTop=0,s.minorLabelTop=s.majorLabelTop+s.majorLabelHeight,s.minorLineTop=s.minorLabelTop,s.minorLineHeight=Math.max(u-s.majorLabelHeight-this.top),s.minorLineWidth=1,s.majorLineTop=0,s.majorLineHeight=Math.max(u-this.top),s.majorLineWidth=1,s.lineTop=s.majorLabelHeight+s.minorLabelHeight;break;default:throw Error('Unkown orientation "'+this.options.orientation+'"')}var l=s.minorLabelHeight+s.majorLabelHeight;t+=e(this,"width",n.offsetWidth),t+=e(this,"height",l),this._updateConversion();var d=o.cast(i.start,"Date"),f=o.cast(i.end,"Date"),m=this.toTime(5*(s.minorCharWidth||10))-this.toTime(0);this.step=new r(d,f,m),t+=e(s.range,"start",d.valueOf()),t+=e(s.range,"end",f.valueOf()),t+=e(s.range,"minimumStep",m.valueOf())}return t>0},i.prototype._updateConversion=function(){var t=this.range;if(!t)throw Error("No range configured");this.conversion=t.conversion?t.conversion(this.width):Range.conversion(t.start,t.end,this.width)},e.exports=n=i},{"../util":7,"../timestep":8,"./component":9}],8:[function(t,e,n){var i=(t("./util"),t("moment"));TimeStep=function(t,e,n){this.current=new Date,this._start=new Date,this._end=new Date,this.autoScale=!0,this.scale=TimeStep.SCALE.DAY,this.step=1,this.setRange(t,e,n)},TimeStep.SCALE={MILLISECOND:1,SECOND:2,MINUTE:3,HOUR:4,DAY:5,WEEKDAY:6,MONTH:7,YEAR:8},TimeStep.prototype.setRange=function(t,e,n){t instanceof Date&&e instanceof Date&&(this._start=void 0!=t?new Date(t.valueOf()):new Date,this._end=void 0!=e?new Date(e.valueOf()):new Date,this.autoScale&&this.setMinimumStep(n))},TimeStep.prototype.first=function(){this.current=new Date(this._start.valueOf()),this.roundToMinor()},TimeStep.prototype.roundToMinor=function(){switch(this.scale){case TimeStep.SCALE.YEAR:this.current.setFullYear(this.step*Math.floor(this.current.getFullYear()/this.step)),this.current.setMonth(0);case TimeStep.SCALE.MONTH:this.current.setDate(1);case TimeStep.SCALE.DAY:case TimeStep.SCALE.WEEKDAY:this.current.setHours(0);case TimeStep.SCALE.HOUR:this.current.setMinutes(0);case TimeStep.SCALE.MINUTE:this.current.setSeconds(0);case TimeStep.SCALE.SECOND:this.current.setMilliseconds(0)}if(1!=this.step)switch(this.scale){case TimeStep.SCALE.MILLISECOND:this.current.setMilliseconds(this.current.getMilliseconds()-this.current.getMilliseconds()%this.step);break;case TimeStep.SCALE.SECOND:this.current.setSeconds(this.current.getSeconds()-this.current.getSeconds()%this.step);break;case TimeStep.SCALE.MINUTE:this.current.setMinutes(this.current.getMinutes()-this.current.getMinutes()%this.step);break;case TimeStep.SCALE.HOUR:this.current.setHours(this.current.getHours()-this.current.getHours()%this.step);break;case TimeStep.SCALE.WEEKDAY:case TimeStep.SCALE.DAY:this.current.setDate(this.current.getDate()-1-(this.current.getDate()-1)%this.step+1);break;case TimeStep.SCALE.MONTH:this.current.setMonth(this.current.getMonth()-this.current.getMonth()%this.step);break;case TimeStep.SCALE.YEAR:this.current.setFullYear(this.current.getFullYear()-this.current.getFullYear()%this.step);break;default:}},TimeStep.prototype.hasNext=function(){return this.current.valueOf()<=this._end.valueOf()},TimeStep.prototype.next=function(){var t=this.current.valueOf();if(6>this.current.getMonth())switch(this.scale){case TimeStep.SCALE.MILLISECOND:this.current=new Date(this.current.valueOf()+this.step);break;case TimeStep.SCALE.SECOND:this.current=new Date(this.current.valueOf()+1e3*this.step);break;case TimeStep.SCALE.MINUTE:this.current=new Date(this.current.valueOf()+60*1e3*this.step);break;case TimeStep.SCALE.HOUR:this.current=new Date(this.current.valueOf()+60*60*1e3*this.step);var e=this.current.getHours();this.current.setHours(e-e%this.step);break;case TimeStep.SCALE.WEEKDAY:case TimeStep.SCALE.DAY:this.current.setDate(this.current.getDate()+this.step);break;case TimeStep.SCALE.MONTH:this.current.setMonth(this.current.getMonth()+this.step);break;case TimeStep.SCALE.YEAR:this.current.setFullYear(this.current.getFullYear()+this.step);break;default:}else switch(this.scale){case TimeStep.SCALE.MILLISECOND:this.current=new Date(this.current.valueOf()+this.step);break;case TimeStep.SCALE.SECOND:this.current.setSeconds(this.current.getSeconds()+this.step);break;case TimeStep.SCALE.MINUTE:this.current.setMinutes(this.current.getMinutes()+this.step);break;case TimeStep.SCALE.HOUR:this.current.setHours(this.current.getHours()+this.step);break;case TimeStep.SCALE.WEEKDAY:case TimeStep.SCALE.DAY:this.current.setDate(this.current.getDate()+this.step);break;case TimeStep.SCALE.MONTH:this.current.setMonth(this.current.getMonth()+this.step);break;case TimeStep.SCALE.YEAR:this.current.setFullYear(this.current.getFullYear()+this.step);break;default:}if(1!=this.step)switch(this.scale){case TimeStep.SCALE.MILLISECOND:this.current.getMilliseconds()0&&(this.step=e),this.autoScale=!1},TimeStep.prototype.setAutoScale=function(t){this.autoScale=t},TimeStep.prototype.setMinimumStep=function(t){if(void 0!=t){var e=31104e6,n=2592e6,i=864e5,o=36e5,r=6e4,s=1e3,a=1;1e3*e>t&&(this.scale=TimeStep.SCALE.YEAR,this.step=1e3),500*e>t&&(this.scale=TimeStep.SCALE.YEAR,this.step=500),100*e>t&&(this.scale=TimeStep.SCALE.YEAR,this.step=100),50*e>t&&(this.scale=TimeStep.SCALE.YEAR,this.step=50),10*e>t&&(this.scale=TimeStep.SCALE.YEAR,this.step=10),5*e>t&&(this.scale=TimeStep.SCALE.YEAR,this.step=5),e>t&&(this.scale=TimeStep.SCALE.YEAR,this.step=1),3*n>t&&(this.scale=TimeStep.SCALE.MONTH,this.step=3),n>t&&(this.scale=TimeStep.SCALE.MONTH,this.step=1),5*i>t&&(this.scale=TimeStep.SCALE.DAY,this.step=5),2*i>t&&(this.scale=TimeStep.SCALE.DAY,this.step=2),i>t&&(this.scale=TimeStep.SCALE.DAY,this.step=1),i/2>t&&(this.scale=TimeStep.SCALE.WEEKDAY,this.step=1),4*o>t&&(this.scale=TimeStep.SCALE.HOUR,this.step=4),o>t&&(this.scale=TimeStep.SCALE.HOUR,this.step=1),15*r>t&&(this.scale=TimeStep.SCALE.MINUTE,this.step=15),10*r>t&&(this.scale=TimeStep.SCALE.MINUTE,this.step=10),5*r>t&&(this.scale=TimeStep.SCALE.MINUTE,this.step=5),r>t&&(this.scale=TimeStep.SCALE.MINUTE,this.step=1),15*s>t&&(this.scale=TimeStep.SCALE.SECOND,this.step=15),10*s>t&&(this.scale=TimeStep.SCALE.SECOND,this.step=10),5*s>t&&(this.scale=TimeStep.SCALE.SECOND,this.step=5),s>t&&(this.scale=TimeStep.SCALE.SECOND,this.step=1),200*a>t&&(this.scale=TimeStep.SCALE.MILLISECOND,this.step=200),100*a>t&&(this.scale=TimeStep.SCALE.MILLISECOND,this.step=100),50*a>t&&(this.scale=TimeStep.SCALE.MILLISECOND,this.step=50),10*a>t&&(this.scale=TimeStep.SCALE.MILLISECOND,this.step=10),5*a>t&&(this.scale=TimeStep.SCALE.MILLISECOND,this.step=5),a>t&&(this.scale=TimeStep.SCALE.MILLISECOND,this.step=1)}},TimeStep.prototype.snap=function(t){if(this.scale==TimeStep.SCALE.YEAR){var e=t.getFullYear()+Math.round(t.getMonth()/12);t.setFullYear(Math.round(e/this.step)*this.step),t.setMonth(0),t.setDate(0),t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0)}else if(this.scale==TimeStep.SCALE.MONTH)t.getDate()>15?(t.setDate(1),t.setMonth(t.getMonth()+1)):t.setDate(1),t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0);else if(this.scale==TimeStep.SCALE.DAY||this.scale==TimeStep.SCALE.WEEKDAY){switch(this.step){case 5:case 2:t.setHours(24*Math.round(t.getHours()/24));break;default:t.setHours(12*Math.round(t.getHours()/12))}t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0)}else if(this.scale==TimeStep.SCALE.HOUR){switch(this.step){case 4:t.setMinutes(60*Math.round(t.getMinutes()/60));break;default:t.setMinutes(30*Math.round(t.getMinutes()/30))}t.setSeconds(0),t.setMilliseconds(0)}else if(this.scale==TimeStep.SCALE.MINUTE){switch(this.step){case 15:case 10:t.setMinutes(5*Math.round(t.getMinutes()/5)),t.setSeconds(0);break;case 5:t.setSeconds(60*Math.round(t.getSeconds()/60));break;default:t.setSeconds(30*Math.round(t.getSeconds()/30))}t.setMilliseconds(0)}else if(this.scale==TimeStep.SCALE.SECOND)switch(this.step){case 15:case 10:t.setSeconds(5*Math.round(t.getSeconds()/5)),t.setMilliseconds(0);break;case 5:t.setMilliseconds(1e3*Math.round(t.getMilliseconds()/1e3));break;default:t.setMilliseconds(500*Math.round(t.getMilliseconds()/500))}else if(this.scale==TimeStep.SCALE.MILLISECOND){var n=this.step>5?this.step/2:1;t.setMilliseconds(Math.round(t.getMilliseconds()/n)*n)}},TimeStep.prototype.isMajor=function(){switch(this.scale){case TimeStep.SCALE.MILLISECOND:return 0==this.current.getMilliseconds();case TimeStep.SCALE.SECOND:return 0==this.current.getSeconds();case TimeStep.SCALE.MINUTE:return 0==this.current.getHours()&&0==this.current.getMinutes();case TimeStep.SCALE.HOUR:return 0==this.current.getHours();case TimeStep.SCALE.WEEKDAY:case TimeStep.SCALE.DAY:return 1==this.current.getDate();case TimeStep.SCALE.MONTH:return 0==this.current.getMonth();case TimeStep.SCALE.YEAR:return!1;default:return!1}},TimeStep.prototype.getLabelMinor=function(t){switch(void 0==t&&(t=this.current),this.scale){case TimeStep.SCALE.MILLISECOND:return i(t).format("SSS");case TimeStep.SCALE.SECOND:return i(t).format("s");case TimeStep.SCALE.MINUTE:return i(t).format("HH:mm");case TimeStep.SCALE.HOUR:return i(t).format("HH:mm");case TimeStep.SCALE.WEEKDAY:return i(t).format("ddd D");case TimeStep.SCALE.DAY:return i(t).format("D");case TimeStep.SCALE.MONTH:return i(t).format("MMM");case TimeStep.SCALE.YEAR:return i(t).format("YYYY");default:return""}},TimeStep.prototype.getLabelMajor=function(t){switch(void 0==t&&(t=this.current),this.scale){case TimeStep.SCALE.MILLISECOND:return i(t).format("HH:mm:ss");case TimeStep.SCALE.SECOND:return i(t).format("D MMMM HH:mm");case TimeStep.SCALE.MINUTE:case TimeStep.SCALE.HOUR:return i(t).format("ddd D MMMM");case TimeStep.SCALE.WEEKDAY:case TimeStep.SCALE.DAY:return i(t).format("MMMM YYYY");case TimeStep.SCALE.MONTH:return i(t).format("YYYY");case TimeStep.SCALE.YEAR:return"";default:return""}},e.exports=n=TimeStep},{"./util":7,moment:18}],16:[function(t,e,n){function i(t,e,n){this.props={content:{left:0,width:0}},r.call(this,t,e,n)}var o=t("../../util"),r=t("./item");i.prototype=new r(null,null),i.prototype.select=function(){this.selected=!0},i.prototype.unselect=function(){this.selected=!1},i.prototype.repaint=function(){var t=!1,e=this.dom;if(this.visible){if(e||(this._create(),t=!0),e=this.dom){if(!this.options&&!this.options.parent)throw Error("Cannot repaint item: no parent attached");var n=this.parent.getForeground();if(!n)throw Error("Cannot repaint time axis: parent has no foreground container element");if(e.box.parentNode||(n.appendChild(e.box),t=!0),this.data.content!=this.content){if(this.content=this.data.content,this.content instanceof Element)e.content.innerHTML="",e.content.appendChild(this.content);else{if(void 0==this.data.content)throw Error('Property "content" missing in item '+this.data.id);e.content.innerHTML=this.content}t=!0}var i=this.data.className?""+this.data.className:"";this.className!=i&&(this.className=i,e.box.className="item range"+i,t=!0)}}else e&&e.box.parentNode&&(e.box.parentNode.removeChild(e.box),t=!0);return t},i.prototype.reflow=function(){if(void 0==this.data.start)throw Error('Property "start" missing in item '+this.data.id);if(void 0==this.data.end)throw Error('Property "end" missing in item '+this.data.id);var t=this.dom,e=this.props,n=this.options,i=this.parent,r=i.toScreen(this.data.start),s=i.toScreen(this.data.end),a=0;if(t){var h,c,p=o.updateProperty,u=t.box,l=i.width,d=n.orientation;a+=p(e.content,"width",t.content.offsetWidth),a+=p(this,"height",u.offsetHeight),-l>r&&(r=-l),s>2*l&&(s=2*l),h=0>r?Math.min(-r,s-r-e.content.width-2*n.padding):0,a+=p(e.content,"left",h),"top"==d?(c=n.margin.axis,a+=p(this,"top",c)):(c=i.height-this.height-n.margin.axis,a+=p(this,"top",c)),a+=p(this,"left",r),a+=p(this,"width",Math.max(s-r,1))}else a+=1;return a>0},i.prototype._create=function(){var t=this.dom;t||(this.dom=t={},t.box=document.createElement("div"),t.content=document.createElement("div"),t.content.className="content",t.box.appendChild(t.content))},i.prototype.reposition=function(){var t=this.dom,e=this.props;t&&(t.box.style.top=this.top+"px",t.box.style.left=this.left+"px",t.box.style.width=this.width+"px",t.content.style.left=e.content.left+"px")},e.exports=n=i},{"../../util":7,"./item":19}],15:[function(t,e,n){function i(t,e,n){this.props={dot:{left:0,top:0,width:0,height:0},line:{top:0,left:0,width:0,height:0}},r.call(this,t,e,n)}var o=t("../../util"),r=t("./item");i.prototype=new r(null,null),i.prototype.select=function(){this.selected=!0},i.prototype.unselect=function(){this.selected=!1},i.prototype.repaint=function(){var t=!1,e=this.dom;if(this.visible){if(e||(this._create(),t=!0),e=this.dom){if(!this.options&&!this.parent)throw Error("Cannot repaint item: no parent attached");var n=this.parent.getForeground();if(!n)throw Error("Cannot repaint time axis: parent has no foreground container element");var i=this.parent.getBackground();if(!i)throw Error("Cannot repaint time axis: parent has no background container element");if(e.box.parentNode||(n.appendChild(e.box),t=!0),e.line.parentNode||(i.appendChild(e.line),t=!0),e.dot.parentNode||(this.parent.dom.axis.appendChild(e.dot),t=!0),this.data.content!=this.content){if(this.content=this.data.content,this.content instanceof Element)e.content.innerHTML="",e.content.appendChild(this.content);else{if(void 0==this.data.content)throw Error('Property "content" missing in item '+this.data.id);e.content.innerHTML=this.content}t=!0}var o=(this.data.className?" "+this.data.className:"")+(this.selected?" selected":"");this.className!=o&&(this.className=o,e.box.className="item box"+o,e.line.className="item line"+o,e.dot.className="item dot"+o,t=!0)}}else e&&(e.box.parentNode&&(e.box.parentNode.removeChild(e.box),t=!0),e.line.parentNode&&(e.line.parentNode.removeChild(e.line),t=!0),e.dot.parentNode&&(e.dot.parentNode.removeChild(e.dot),t=!0));return t},i.prototype.reflow=function(){if(void 0==this.data.start)throw Error('Property "start" missing in item '+this.data.id);var t,e,n=o.updateProperty,i=this.dom,r=this.props,s=this.options,a=this.parent.toScreen(this.data.start),h=s&&s.align,c=s.orientation,p=0;if(i)if(p+=n(r.dot,"height",i.dot.offsetHeight),p+=n(r.dot,"width",i.dot.offsetWidth),p+=n(r.line,"width",i.line.offsetWidth),p+=n(r.line,"width",i.line.offsetWidth),p+=n(this,"width",i.box.offsetWidth),p+=n(this,"height",i.box.offsetHeight),e="right"==h?a-this.width:"left"==h?a:a-this.width/2,p+=n(this,"left",e),p+=n(r.line,"left",a-r.line.width/2),p+=n(r.dot,"left",a-r.dot.width/2),"top"==c)t=s.margin.axis,p+=n(this,"top",t),p+=n(r.line,"top",0),p+=n(r.line,"height",t),p+=n(r.dot,"top",-r.dot.height/2);else{var u=this.parent.height;t=u-this.height-s.margin.axis,p+=n(this,"top",t),p+=n(r.line,"top",t+this.height),p+=n(r.line,"height",Math.max(s.margin.axis,0)),p+=n(r.dot,"top",u-r.dot.height/2)}else p+=1;return p>0},i.prototype._create=function(){var t=this.dom;t||(this.dom=t={},t.box=document.createElement("DIV"),t.content=document.createElement("DIV"),t.content.className="content",t.box.appendChild(t.content),t.line=document.createElement("DIV"),t.line.className="line",t.dot=document.createElement("DIV"),t.dot.className="dot")},i.prototype.reposition=function(){var t=this.dom,e=this.props,n=this.options.orientation;if(t){var i=t.box,o=t.line,r=t.dot;i.style.left=this.left+"px",i.style.top=this.top+"px",o.style.left=e.line.left+"px","top"==n?(o.style.top="0px",o.style.height=this.top+"px"):(o.style.top=e.line.top+"px",o.style.top=this.top+this.height+"px",o.style.height=Math.max(e.dot.top-this.top-this.height,0)+"px"),r.style.left=e.dot.left+"px",r.style.top=e.dot.top+"px"}},e.exports=n=i},{"../../util":7,"./item":19}],17:[function(t,e,n){function i(t,e,n){this.props={dot:{top:0,width:0,height:0},content:{height:0,marginLeft:0}},r.call(this,t,e,n)}var o=t("../../util"),r=t("./item");i.prototype=new r(null,null),i.prototype.select=function(){this.selected=!0},i.prototype.unselect=function(){this.selected=!1},i.prototype.repaint=function(){var t=!1,e=this.dom;if(this.visible){if(e||(this._create(),t=!0),e=this.dom){if(!this.options&&!this.options.parent)throw Error("Cannot repaint item: no parent attached");var n=this.parent.getForeground();if(!n)throw Error("Cannot repaint time axis: parent has no foreground container element");if(e.point.parentNode||(n.appendChild(e.point),n.appendChild(e.point),t=!0),this.data.content!=this.content){if(this.content=this.data.content,this.content instanceof Element)e.content.innerHTML="",e.content.appendChild(this.content);else{if(void 0==this.data.content)throw Error('Property "content" missing in item '+this.data.id);e.content.innerHTML=this.content}t=!0}var i=(this.data.className?" "+this.data.className:"")+(this.selected?" selected":"");this.className!=i&&(this.className=i,e.point.className="item point"+i,t=!0)}}else e&&e.point.parentNode&&(e.point.parentNode.removeChild(e.point),t=!0);return t},i.prototype.reflow=function(){if(void 0==this.data.start)throw Error('Property "start" missing in item '+this.data.id);var t,e=o.updateProperty,n=this.dom,i=this.props,r=this.options,s=r.orientation,a=this.parent.toScreen(this.data.start),h=0;if(n){if(h+=e(this,"width",n.point.offsetWidth),h+=e(this,"height",n.point.offsetHeight),h+=e(i.dot,"width",n.dot.offsetWidth),h+=e(i.dot,"height",n.dot.offsetHeight),h+=e(i.content,"height",n.content.offsetHeight),"top"==s)t=r.margin.axis;else{var c=this.parent.height;t=Math.max(c-this.height-r.margin.axis,0)}h+=e(this,"top",t),h+=e(this,"left",a-i.dot.width/2),h+=e(i.content,"marginLeft",1.5*i.dot.width),h+=e(i.dot,"top",(this.height-i.dot.height)/2)}else h+=1;return h>0},i.prototype._create=function(){var t=this.dom;t||(this.dom=t={},t.point=document.createElement("div"),t.content=document.createElement("div"),t.content.className="content",t.point.appendChild(t.content),t.dot=document.createElement("div"),t.dot.className="dot",t.point.appendChild(t.dot))},i.prototype.reposition=function(){var t=this.dom,e=this.props;t&&(t.point.style.top=this.top+"px",t.point.style.left=this.left+"px",t.content.style.marginLeft=e.content.marginLeft+"px",t.dot.style.top=e.dot.top+"px")},e.exports=n=i},{"../../util":7,"./item":19}],18:[function(e,n){(function(){(function(i){function o(t,e){return function(n){return u(t.call(this,n),e)}}function r(t){return function(e){return this.lang().ordinal(t.call(this,e))}}function s(){}function a(t){c(this,t)}function h(t){var e=this._data={},n=t.years||t.year||t.y||0,i=t.months||t.month||t.M||0,o=t.weeks||t.week||t.w||0,r=t.days||t.day||t.d||0,s=t.hours||t.hour||t.h||0,a=t.minutes||t.minute||t.m||0,h=t.seconds||t.second||t.s||0,c=t.milliseconds||t.millisecond||t.ms||0;this._milliseconds=c+1e3*h+6e4*a+36e5*s,this._days=r+7*o,this._months=i+12*n,e.milliseconds=c%1e3,h+=p(c/1e3),e.seconds=h%60,a+=p(h/60),e.minutes=a%60,s+=p(a/60),e.hours=s%24,r+=p(s/24),r+=7*o,e.days=r%30,i+=p(r/30),e.months=i%12,n+=p(i/12),e.years=n}function c(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function p(t){return 0>t?Math.ceil(t):Math.floor(t)}function u(t,e){for(var n=t+"";e>n.length;)n="0"+n;return n}function l(t,e,n){var i,o=e._milliseconds,r=e._days,s=e._months;o&&t._d.setTime(+t+o*n),r&&t.date(t.date()+r*n),s&&(i=t.date(),t.date(1).month(t.month()+s*n).date(Math.min(i,t.daysInMonth())))}function d(t){return"[object Array]"===Object.prototype.toString.call(t)}function f(t,e){var n,i=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),r=0;for(n=0;i>n;n++)~~t[n]!==~~e[n]&&r++;return r+o}function m(t,e){return e.abbr=t,R[t]||(R[t]=new s),R[t].set(e),R[t]}function g(t){return t?(!R[t]&&U&&e("./lang/"+t),R[t]):k.fn._lang}function v(t){return t.match(/\[.*\]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function y(t){var e,n,i=t.match(z);for(e=0,n=i.length;n>e;e++)i[e]=ae[i[e]]?ae[i[e]]:v(i[e]);return function(o){var r="";for(e=0;n>e;e++)r+="function"==typeof i[e].call?i[e].call(o,t):i[e];return r}}function S(t,e){function n(e){return t.lang().longDateFormat(e)||e}for(var i=5;i--&&P.test(e);)e=e.replace(P,n);return oe[e]||(oe[e]=y(e)),oe[e](t)}function T(t){switch(t){case"DDDD":return V;case"YYYY":return B;case"YYYYY":return Z;case"S":case"SS":case"SSS":case"DDD":return q;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":case"a":case"A":return X;case"X":return $;case"Z":case"ZZ":return K;case"T":return J;case"MM":case"DD":case"YY":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":return W;default:return RegExp(t.replace("\\",""))}}function w(t,e,n){var i,o=n._a;switch(t){case"M":case"MM":o[1]=null==e?0:~~e-1;break;case"MMM":case"MMMM":i=g(n._l).monthsParse(e),null!=i?o[1]=i:n._isValid=!1;break;case"D":case"DD":case"DDD":case"DDDD":null!=e&&(o[2]=~~e);break;case"YY":o[0]=~~e+(~~e>68?1900:2e3);break;case"YYYY":case"YYYYY":o[0]=~~e;break;case"a":case"A":n._isPm="pm"===(e+"").toLowerCase();break;case"H":case"HH":case"h":case"hh":o[3]=~~e;break;case"m":case"mm":o[4]=~~e;break;case"s":case"ss":o[5]=~~e;break;case"S":case"SS":case"SSS":o[6]=~~(1e3*("0."+e));break;case"X":n._d=new Date(1e3*parseFloat(e));break;case"Z":case"ZZ":n._useUTC=!0,i=(e+"").match(ee),i&&i[1]&&(n._tzh=~~i[1]),i&&i[2]&&(n._tzm=~~i[2]),i&&"+"===i[0]&&(n._tzh=-n._tzh,n._tzm=-n._tzm)}null==e&&(n._isValid=!1)}function E(t){var e,n,i=[];if(!t._d){for(e=0;7>e;e++)t._a[e]=i[e]=null==t._a[e]?2===e?1:0:t._a[e];i[3]+=t._tzh||0,i[4]+=t._tzm||0,n=new Date(0),t._useUTC?(n.setUTCFullYear(i[0],i[1],i[2]),n.setUTCHours(i[3],i[4],i[5],i[6])):(n.setFullYear(i[0],i[1],i[2]),n.setHours(i[3],i[4],i[5],i[6])),t._d=n}}function b(t){var e,n,i=t._f.match(z),o=t._i;for(t._a=[],e=0;i.length>e;e++)n=(T(i[e]).exec(o)||[])[0],n&&(o=o.slice(o.indexOf(n)+n.length)),ae[i[e]]&&w(i[e],n,t);t._isPm&&12>t._a[3]&&(t._a[3]+=12),t._isPm===!1&&12===t._a[3]&&(t._a[3]=0),E(t)}function M(t){for(var e,n,i,o,r=99;t._f.length;){if(e=c({},t),e._f=t._f.pop(),b(e),n=new a(e),n.isValid()){i=n;break}o=f(e._a,n.toArray()),r>o&&(r=o,i=n)}c(t,i)}function _(t){var e,n=t._i;if(Q.exec(n)){for(t._f="YYYY-MM-DDT",e=0;4>e;e++)if(te[e][1].exec(n)){t._f+=te[e][0];break}K.exec(n)&&(t._f+=" Z"),b(t)}else t._d=new Date(n)}function D(t){var e=t._i,n=F.exec(e);e===i?t._d=new Date:n?t._d=new Date(+n[1]):"string"==typeof e?_(t):d(e)?(t._a=e.slice(0),E(t)):t._d=e instanceof Date?new Date(+e):new Date(e)}function L(t,e,n,i,o){return o.relativeTime(e||1,!!n,t,i)}function C(t,e,n){var i=j(Math.abs(t)/1e3),o=j(i/60),r=j(o/60),s=j(r/24),a=j(s/365),h=45>i&&["s",i]||1===o&&["m"]||45>o&&["mm",o]||1===r&&["h"]||22>r&&["hh",r]||1===s&&["d"]||25>=s&&["dd",s]||45>=s&&["M"]||345>s&&["MM",j(s/30)]||1===a&&["y"]||["yy",a];return h[2]=e,h[3]=t>0,h[4]=n,L.apply({},h)}function x(t,e,n){var i=n-e,o=n-t.day();return o>i&&(o-=7),i-7>o&&(o+=7),Math.ceil(k(t).add("d",o).dayOfYear()/7)}function A(t){var e=t._i,n=t._f;return null===e||""===e?null:("string"==typeof e&&(t._i=e=g().preparse(e)),k.isMoment(e)?(t=c({},e),t._d=new Date(+e._d)):n?d(n)?M(t):b(t):D(t),new a(t))}function N(t,e){k.fn[t]=k.fn[t+"s"]=function(t){var n=this._isUTC?"UTC":"";return null!=t?(this._d["set"+n+e](t),this):this._d["get"+n+e]()}}function O(t){k.duration.fn[t]=function(){return this._data[t]}}function Y(t,e){k.duration.fn["as"+t]=function(){return+this/e}}for(var k,H,I="2.0.0",j=Math.round,R={},U=n!==i&&n.exports,F=/^\/?Date\((\-?\d+)/i,z=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g,P=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,W=/\d\d?/,q=/\d{1,3}/,V=/\d{3}/,B=/\d{1,4}/,Z=/[+\-]?\d{1,6}/,X=/[0-9]*[a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF]+\s*?[\u0600-\u06FF]+/i,K=/Z|[\+\-]\d\d:?\d\d/i,J=/T/i,$=/[\+\-]?\d+(\.\d{1,3})?/,Q=/^\s*\d{4}-\d\d-\d\d((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,G="YYYY-MM-DDTHH:mm:ssZ",te=[["HH:mm:ss.S",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],ee=/([\+\-]|\d\d)/gi,ne="Month|Date|Hours|Minutes|Seconds|Milliseconds".split("|"),ie={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},oe={},re="DDD w W M D d".split(" "),se="M D H h m s w W".split(" "),ae={M:function(){return this.month()+1},MMM:function(t){return this.lang().monthsShort(this,t)},MMMM:function(t){return this.lang().months(this,t)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(t){return this.lang().weekdaysMin(this,t)},ddd:function(t){return this.lang().weekdaysShort(this,t)},dddd:function(t){return this.lang().weekdays(this,t)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return u(this.year()%100,2)},YYYY:function(){return u(this.year(),4)},YYYYY:function(){return u(this.year(),5)},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return~~(this.milliseconds()/100)},SS:function(){return u(~~(this.milliseconds()/10),2)},SSS:function(){return u(this.milliseconds(),3)},Z:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+u(~~(t/60),2)+":"+u(~~t%60,2)},ZZ:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+u(~~(10*t/6),4)},X:function(){return this.unix()}};re.length;)H=re.pop(),ae[H+"o"]=r(ae[H]);for(;se.length;)H=se.pop(),ae[H+H]=o(ae[H],2);for(ae.DDDD=o(ae.DDD,3),s.prototype={set:function(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(t){return this._months[t.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(t){return this._monthsShort[t.month()]},monthsParse:function(t){var e,n,i;for(this._monthsParse||(this._monthsParse=[]),e=0;12>e;e++)if(this._monthsParse[e]||(n=k([2e3,e]),i="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[e]=RegExp(i.replace(".",""),"i")),this._monthsParse[e].test(t))return e},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(t){return this._weekdays[t.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(t){return this._weekdaysShort[t.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(t){return this._weekdaysMin[t.day()]},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e},meridiem:function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},calendar:function(t,e){var n=this._calendar[t];return"function"==typeof n?n.apply(e):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(t,e,n,i){var o=this._relativeTime[n];return"function"==typeof o?o(t,e,n,i):o.replace(/%d/i,t)},pastFuture:function(t,e){var n=this._relativeTime[t>0?"future":"past"]; -return"function"==typeof n?n(e):n.replace(/%s/i,e)},ordinal:function(t){return this._ordinal.replace("%d",t)},_ordinal:"%d",preparse:function(t){return t},postformat:function(t){return t},week:function(t){return x(t,this._week.dow,this._week.doy)},_week:{dow:0,doy:6}},k=function(t,e,n){return A({_i:t,_f:e,_l:n,_isUTC:!1})},k.utc=function(t,e,n){return A({_useUTC:!0,_isUTC:!0,_l:n,_i:t,_f:e})},k.unix=function(t){return k(1e3*t)},k.duration=function(t,e){var n,i=k.isDuration(t),o="number"==typeof t,r=i?t._data:o?{}:t;return o&&(e?r[e]=t:r.milliseconds=t),n=new h(r),i&&t.hasOwnProperty("_lang")&&(n._lang=t._lang),n},k.version=I,k.defaultFormat=G,k.lang=function(t,e){return t?(e?m(t,e):R[t]||g(t),k.duration.fn._lang=k.fn._lang=g(t),i):k.fn._lang._abbr},k.langData=function(t){return t&&t._lang&&t._lang._abbr&&(t=t._lang._abbr),g(t)},k.isMoment=function(t){return t instanceof a},k.isDuration=function(t){return t instanceof h},k.fn=a.prototype={clone:function(){return k(this)},valueOf:function(){return+this._d},unix:function(){return Math.floor(+this._d/1e3)},toString:function(){return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._d},toJSON:function(){return k.utc(this).format("YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var t=this;return[t.year(),t.month(),t.date(),t.hours(),t.minutes(),t.seconds(),t.milliseconds()]},isValid:function(){return null==this._isValid&&(this._isValid=this._a?!f(this._a,(this._isUTC?k.utc(this._a):k(this._a)).toArray()):!isNaN(this._d.getTime())),!!this._isValid},utc:function(){return this._isUTC=!0,this},local:function(){return this._isUTC=!1,this},format:function(t){var e=S(this,t||k.defaultFormat);return this.lang().postformat(e)},add:function(t,e){var n;return n="string"==typeof t?k.duration(+e,t):k.duration(t,e),l(this,n,1),this},subtract:function(t,e){var n;return n="string"==typeof t?k.duration(+e,t):k.duration(t,e),l(this,n,-1),this},diff:function(t,e,n){var i,o,r=this._isUTC?k(t).utc():k(t).local(),s=6e4*(this.zone()-r.zone());return e&&(e=e.replace(/s$/,"")),"year"===e||"month"===e?(i=432e5*(this.daysInMonth()+r.daysInMonth()),o=12*(this.year()-r.year())+(this.month()-r.month()),o+=(this-k(this).startOf("month")-(r-k(r).startOf("month")))/i,"year"===e&&(o/=12)):(i=this-r-s,o="second"===e?i/1e3:"minute"===e?i/6e4:"hour"===e?i/36e5:"day"===e?i/864e5:"week"===e?i/6048e5:i),n?o:p(o)},from:function(t,e){return k.duration(this.diff(t)).lang(this.lang()._abbr).humanize(!e)},fromNow:function(t){return this.from(k(),t)},calendar:function(){var t=this.diff(k().startOf("day"),"days",!0),e=-6>t?"sameElse":-1>t?"lastWeek":0>t?"lastDay":1>t?"sameDay":2>t?"nextDay":7>t?"nextWeek":"sameElse";return this.format(this.lang().calendar(e,this))},isLeapYear:function(){var t=this.year();return 0===t%4&&0!==t%100||0===t%400},isDST:function(){return this.zone()+k(t).startOf(e)},isBefore:function(t,e){return e=e!==i?e:"millisecond",+this.clone().startOf(e)<+k(t).startOf(e)},isSame:function(t,e){return e=e!==i?e:"millisecond",+this.clone().startOf(e)===+k(t).startOf(e)},zone:function(){return this._isUTC?0:this._d.getTimezoneOffset()},daysInMonth:function(){return k.utc([this.year(),this.month()+1,0]).date()},dayOfYear:function(t){var e=j((k(this).startOf("day")-k(this).startOf("year"))/864e5)+1;return null==t?e:this.add("d",t-e)},isoWeek:function(t){var e=x(this,1,4);return null==t?e:this.add("d",7*(t-e))},week:function(t){var e=this.lang().week(this);return null==t?e:this.add("d",7*(t-e))},lang:function(t){return t===i?this._lang:(this._lang=g(t),this)}},H=0;ne.length>H;H++)N(ne[H].toLowerCase().replace(/s$/,""),ne[H]);N("year","FullYear"),k.fn.days=k.fn.day,k.fn.weeks=k.fn.week,k.fn.isoWeeks=k.fn.isoWeek,k.duration.fn=h.prototype={weeks:function(){return p(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+2592e6*this._months},humanize:function(t){var e=+this,n=C(e,!t,this.lang());return t&&(n=this.lang().pastFuture(e,n)),this.lang().postformat(n)},lang:k.fn.lang};for(H in ie)ie.hasOwnProperty(H)&&(Y(H,ie[H]),O(H.toLowerCase()));Y("Weeks",6048e5),k.lang("en",{ordinal:function(t){var e=t%10,n=1===~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),U&&(n.exports=k),"undefined"==typeof ender&&(this.moment=k),"function"==typeof t&&t.amd&&t("moment",[],function(){return k})}).call(this)})()},{}],14:[function(t,e,n){function i(t,e,n){var i=this;if(this.options={orientation:"bottom",zoomMin:10,zoomMax:31536e10,moveable:!0,zoomable:!0},this.controller=new a,!t)throw Error("No container element provided");this.main=new h(t,{autoResize:!1,height:function(){return i.timeaxis.height+i.itemset.height}}),this.controller.add(this.main);var o=r().hours(0).minutes(0).seconds(0).milliseconds(0);this.range=new s({start:o.clone().add("days",-3).valueOf(),end:o.clone().add("days",4).valueOf()}),this.range.subscribe(this.main,"move","horizontal"),this.range.subscribe(this.main,"zoom","horizontal"),this.range.on("rangechange",function(){i.controller.requestReflow()}),this.range.on("rangechanged",function(){i.controller.requestReflow()}),this.timeaxis=new c(this.main,[],{orientation:this.options.orientation,range:this.range}),this.timeaxis.setRange(this.range),this.controller.add(this.timeaxis),this.itemset=new p(this.main,[this.timeaxis],{orientation:this.options.orientation}),this.itemset.setRange(this.range),this.controller.add(this.itemset),e&&this.setData(e),this.setOptions(n)}var o=t("./../util"),r=t("moment"),s=t("../range"),a=t("../controller"),h=(t("../component/component"),t("../component/rootpanel")),c=t("../component/timeaxis"),p=t("../component/itemset");i.prototype.setOptions=function(t){o.extend(this.options,t),this.timeaxis.setOptions(this.options),this.range.setOptions(this.options);var e,n=this;e="top"==this.options.orientation?function(){return n.timeaxis.height}:function(){return n.main.height-n.timeaxis.height-n.itemset.height},this.itemset.setOptions({orientation:this.options.orientation,top:e}),this.controller.repaint()},i.prototype.setData=function(t){var e=this.itemset.data;if(e)this.itemset.setData(t);else{this.itemset.setData(t);var n=this.itemset.getDataRange(),i=n.min,o=n.max;if(null!=i&&null!=o){var r=o.valueOf()-i.valueOf();i=new Date(i.valueOf()-.05*r),o=new Date(o.valueOf()+.05*r)}(null!=i||null!=o)&&this.range.setRange(i,o)}},e.exports=n=i},{"./../util":7,"../range":3,"../controller":2,"../component/component":9,"../component/rootpanel":11,"../component/timeaxis":13,"../component/itemset":12,moment:18}],19:[function(t,e,n){function i(t,e,n){this.parent=t,this.data=e,this.selected=!1,this.visible=!0,this.dom=null,this.options=n}var o=t("../component");i.prototype=new o,i.prototype.select=function(){this.selected=!0},i.prototype.unselect=function(){this.selected=!1},e.exports=n=i},{"../component":9}]},{},[1])(1)}),"function"==typeof define&&define(function(){return vis});var loadCss=function(t){document.getElementsByTagName("script");var e=document.createElement("style");e.type="text/css",e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t)),document.getElementsByTagName("head")[0].appendChild(e)};loadCss("/* vis.js stylesheet */\n\n.graph {\n position: relative;\n border: 1px solid #bfbfbf;\n}\n\n.graph .panel {\n position: absolute;\n}\n\n.graph .itemset {\n position: absolute;\n padding: 0;\n margin: 0;\n overflow: hidden;\n}\n\n.graph .background {\n}\n\n.graph .foreground {\n}\n\n.graph .itemset-axis {\n position: absolute;\n}\n\n.graph .item {\n position: absolute;\n color: #1A1A1A;\n border-color: #97B0F8;\n background-color: #D5DDF6;\n display: inline-block;\n}\n\n.graph .item.selected {\n border-color: #FFC200;\n background-color: #FFF785;\n z-index: 999;\n}\n\n.graph .item.cluster {\n /* TODO: use another color or pattern? */\n background: #97B0F8 url('img/cluster_bg.png');\n color: white;\n}\n.graph .item.cluster.point {\n border-color: #D5DDF6;\n}\n\n.graph .item.box {\n text-align: center;\n border-style: solid;\n border-width: 1px;\n border-radius: 5px;\n -moz-border-radius: 5px; /* For Firefox 3.6 and older */\n}\n\n.graph .item.point {\n background: none;\n}\n\n.graph .dot {\n border: 5px solid #97B0F8;\n position: absolute;\n border-radius: 5px;\n -moz-border-radius: 5px; /* For Firefox 3.6 and older */\n}\n\n.graph .item.range {\n overflow: hidden;\n border-style: solid;\n border-width: 1px;\n border-radius: 2px;\n -moz-border-radius: 2px; /* For Firefox 3.6 and older */\n}\n\n.graph .item.range .drag-left {\n cursor: w-resize;\n z-index: 1000;\n}\n\n.graph .item.range .drag-right {\n cursor: e-resize;\n z-index: 1000;\n}\n\n.graph .item.range .content {\n position: relative;\n display: inline-block;\n}\n\n.graph .item.line {\n position: absolute;\n width: 0;\n border-left-width: 1px;\n border-left-style: solid;\n}\n\n.graph .item .content {\n margin: 5px;\n white-space: nowrap;\n overflow: hidden;\n}\n\n/* TODO: better css name, 'graph' is way to generic */\n\n.graph {\n overflow: hidden;\n}\n\n.graph .axis {\n position: relative;\n}\n\n.graph .axis .text {\n position: absolute;\n color: #4d4d4d;\n padding: 3px;\n white-space: nowrap;\n}\n\n.graph .axis .text.measure {\n position: absolute;\n padding-left: 0;\n padding-right: 0;\n margin-left: 0;\n margin-right: 0;\n visibility: hidden;\n}\n\n.graph .axis .grid.vertical {\n position: absolute;\n width: 0;\n border-right: 1px solid;\n}\n\n.graph .axis .grid.horizontal {\n position: absolute;\n left: 0;\n width: 100%;\n height: 0;\n border-bottom: 1px solid;\n}\n\n.graph .axis .grid.minor {\n border-color: #e5e5e5;\n}\n\n.graph .axis .grid.major {\n border-color: #bfbfbf;\n}\n\n"); \ No newline at end of file +(function(t){if("function"==typeof bootstrap)bootstrap("vis",t);else if("object"==typeof exports)module.exports=t();else if("function"==typeof define&&define.amd)define(t);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeVis=t}else"undefined"!=typeof window?window.vis=t():global.vis=t()})(function(){var t;return function(t,e,n){function i(n,r){if(!e[n]){if(!t[n]){var s="function"==typeof require&&require;if(!r&&s)return s(n,!0);if(o)return o(n,!0);throw Error("Cannot find module '"+n+"'")}var a=e[n]={exports:{}};t[n][0].call(a.exports,function(e){var o=t[n][1][e];return i(o?o:e)},a,a.exports)}return e[n].exports}for(var o="function"==typeof require&&require,r=0;n.length>r;r++)i(n[r]);return i}({1:[function(t,e,n){var i={Controller:t("./controller"),DataSet:t("./dataset"),events:t("./events"),Range:t("./range"),Stack:t("./stack"),TimeStep:t("./timestep"),util:t("./util"),component:{item:{Item:"../../Item",ItemBox:"../../ItemBox",ItemPoint:"../../ItemPoint",ItemRange:"../../ItemRange"},Component:t("./component/component"),Panel:t("./component/panel"),RootPanel:t("./component/rootpanel"),ItemSet:t("./component/itemset"),TimeAxis:t("./component/timeaxis")},Timeline:t("./visualization/timeline")};e.exports=n=i},{"./dataset":2,"./events":3,"./controller":4,"./range":5,"./stack":6,"./timestep":7,"./util":8,"./component/component":9,"./component/rootpanel":10,"./component/panel":11,"./component/itemset":12,"./component/timeaxis":13,"./visualization/timeline":14}],3:[function(t,e,n){var i={listeners:[],indexOf:function(t){for(var e=this.listeners,n=0,i=this.listeners.length;i>n;n++){var o=e[n];if(o&&o.object==t)return n}return-1},addListener:function(t,e,n){var i=this.indexOf(t),o=this.listeners[i];o||(o={object:t,events:{}},this.listeners.push(o));var r=o.events[e];r||(r=[],o.events[e]=r),-1==r.indexOf(n)&&r.push(n)},removeListener:function(t,e,n){var i=this.indexOf(t),o=this.listeners[i];if(o){var r=o.events[e];r&&(i=r.indexOf(n),-1!=i&&r.splice(i,1),0==r.length&&delete o.events[e]);var s=0,a=o.events;for(var h in a)a.hasOwnProperty(h)&&s++;0==s&&delete this.listeners[i]}},removeAllListeners:function(){this.listeners=[]},trigger:function(t,e,n){var i=this.indexOf(t),o=this.listeners[i];if(o){var r=o.events[e];if(r)for(var s=0,a=r.length;a>s;s++)r[s](n)}}};e.exports=n=i},{}],8:[function(t,e,n){var i={};i.isNumber=function(t){return t instanceof Number||"number"==typeof t},i.isString=function(t){return t instanceof String||"string"==typeof t},i.isDate=function(t){if(t instanceof Date)return!0;if(i.isString(t)){var e=o.exec(t);if(e)return!0;if(!isNaN(Date.parse(t)))return!0}return!1},i.isDataTable=function(t){return"undefined"!=typeof google&&google.visualization&&google.visualization.DataTable&&t instanceof google.visualization.DataTable},i.randomUUID=function(){var t=function(){return Math.floor(65536*Math.random()).toString(16)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()},i.extend=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},i.cast=function(t,e){if(void 0===t)return void 0;if(null===t)return null;if(!e)return t;if("function"==typeof e)return e(t);switch(e){case"boolean":case"Boolean":return Boolean(t);case"number":case"Number":return Number(t);case"string":case"String":return t+"";case"Date":if(i.isNumber(t))return new Date(t);if(t instanceof Date)return new Date(t.valueOf());if(i.isString(t)){var n=o.exec(t);return n?new Date(Number(n[1])):moment(t).toDate()}throw Error("Cannot cast object of type "+i.getType(t)+" to type Date");case"ISODate":if(t instanceof Date)return t.toISOString();if(i.isNumber(t)||i.isString(t))return moment(t).toDate().toISOString();throw Error("Cannot cast object of type "+i.getType(t)+" to type ISODate");case"ASPDate":if(t instanceof Date)return"/Date("+t.valueOf()+")/";if(i.isNumber(t)||i.isString(t))return"/Date("+moment(t).valueOf()+")/";throw Error("Cannot cast object of type "+i.getType(t)+" to type ASPDate");default:throw Error("Cannot cast object of type "+i.getType(t)+' to type "'+e+'"')}};var o=/^\/?Date\((\-?\d+)/i;if(i.getType=function(t){var e=typeof t;return"object"==e?null==t?"null":t instanceof Boolean?"Boolean":t instanceof Number?"Number":t instanceof String?"String":t instanceof Array?"Array":t instanceof Date?"Date":"Object":"number"==e?"Number":"boolean"==e?"Boolean":"string"==e?"String":e},i.getAbsoluteLeft=function(t){for(var e=document.documentElement,n=document.body,i=t.offsetLeft,o=t.offsetParent;null!=o&&o!=n&&o!=e;)i+=o.offsetLeft,i-=o.scrollLeft,o=o.offsetParent;return i},i.getAbsoluteTop=function(t){for(var e=document.documentElement,n=document.body,i=t.offsetTop,o=t.offsetParent;null!=o&&o!=n&&o!=e;)i+=o.offsetTop,i-=o.scrollTop,o=o.offsetParent;return i},i.getPageY=function(t){if("pageY"in t)return t.pageY;var e;e="targetTouches"in t&&t.targetTouches.length?t.targetTouches[0].clientY:t.clientY;var n=document.documentElement,i=document.body;return e+(n&&n.scrollTop||i&&i.scrollTop||0)-(n&&n.clientTop||i&&i.clientTop||0)},i.getPageX=function(t){if("pageY"in t)return t.pageX;var e;e="targetTouches"in t&&t.targetTouches.length?t.targetTouches[0].clientX:t.clientX;var n=document.documentElement,i=document.body;return e+(n&&n.scrollLeft||i&&i.scrollLeft||0)-(n&&n.clientLeft||i&&i.clientLeft||0)},i.addClassName=function(t,e){var n=t.className.split(" ");-1==n.indexOf(e)&&(n.push(e),t.className=n.join(" "))},i.removeClassName=function(t,e){var n=t.className.split(" "),i=n.indexOf(e);-1!=i&&(n.splice(i,1),t.className=n.join(" "))},i.forEach=function(t,e){if(t instanceof Array)t.forEach(e);else for(var n in t)t.hasOwnProperty(n)&&e(t[n],n,t)},i.updateProperty=function(t,e,n){return t[e]!==n?(t[e]=n,!0):!1},i.addEventListener=function(t,e,n,i){t.addEventListener?(void 0===i&&(i=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.addEventListener(e,n,i)):t.attachEvent("on"+e,n)},i.removeEventListener=function(t,e,n,i){t.removeEventListener?(void 0===i&&(i=!1),"mousewheel"===e&&navigator.userAgent.indexOf("Firefox")>=0&&(e="DOMMouseScroll"),t.removeEventListener(e,n,i)):t.detachEvent("on"+e,n)},i.getTarget=function(t){t||(t=window.event);var e;return t.target?e=t.target:t.srcElement&&(e=t.srcElement),void 0!=e.nodeType&&3==e.nodeType&&(e=e.parentNode),e},i.stopPropagation=function(t){t||(t=window.event),t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},i.preventDefault=function(t){t||(t=window.event),t.preventDefault?t.preventDefault():t.returnValue=!1},i.option={},i.option.asBoolean=function(t,e){return"function"==typeof t&&(t=t()),null!=t?0!=t:e||null},i.option.asNumber=function(t,e){return"function"==typeof t&&(t=t()),null!=t?Number(t):e||null},i.option.asString=function(t,e){return"function"==typeof t&&(t=t()),null!=t?t+"":e||null},i.option.asSize=function(t,e){return"function"==typeof t&&(t=t()),i.isString(t)?t:i.isNumber(t)?t+"px":e||null},i.option.asElement=function(t,e){return"function"==typeof t&&(t=t()),t||e||null},!Array.prototype.indexOf){Array.prototype.indexOf=function(t){for(var e=0;this.length>e;e++)if(this[e]==t)return e;return-1};try{console.log("Warning: Ancient browser detected. Please update your browser")}catch(r){}}Array.prototype.forEach||(Array.prototype.forEach=function(t,e){for(var n=0,i=this.length;i>n;++n)t.call(e||this,this[n],n,this)}),Array.prototype.map||(Array.prototype.map=function(t,e){var n,i,o;if(null==this)throw new TypeError(" this is null or not defined");var r=Object(this),s=r.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(e&&(n=e),i=Array(s),o=0;s>o;){var a,h;o in r&&(a=r[o],h=t.call(n,a,o,r),i[o]=h),o++}return i}),Array.prototype.filter||(Array.prototype.filter=function(t){"use strict";if(null==this)throw new TypeError;var e=Object(this),n=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var i=[],o=arguments[1],r=0;n>r;r++)if(r in e){var s=e[r];t.call(o,s,r,e)&&i.push(s)}return i}),Object.keys||(Object.keys=function(){var t=Object.prototype.hasOwnProperty,e=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],i=n.length;return function(o){if("object"!=typeof o&&"function"!=typeof o||null===o)throw new TypeError("Object.keys called on non-object");var r=[];for(var s in o)t.call(o,s)&&r.push(s);if(e)for(var a=0;i>a;a++)t.call(o,n[a])&&r.push(n[a]);return r}}()),Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),e.exports=n=i},{}],4:[function(t,e,n){function i(){this.id=o.randomUUID(),this.components={},this.repaintTimer=void 0,this.reflowTimer=void 0}var o=t("./util"),r=t("./component/component");i.prototype.add=function(t){if(void 0==t.id)throw Error("Component has no field id");if(!(t instanceof r||t instanceof i))throw new TypeError("Component must be an instance of prototype Component or Controller");t.controller=this,this.components[t.id]=t},i.prototype.requestReflow=function(){if(!this.reflowTimer){var t=this;this.reflowTimer=setTimeout(function(){t.reflowTimer=void 0,t.reflow()},0)}},i.prototype.requestRepaint=function(){if(!this.repaintTimer){var t=this;this.repaintTimer=setTimeout(function(){t.repaintTimer=void 0,t.repaint()},0)}},i.prototype.repaint=function(){function t(i,o){o in n||(i.depends&&i.depends.forEach(function(e){t(e,e.id)}),i.parent&&t(i.parent,i.parent.id),e=i.repaint()||e,n[o]=!0)}var e=!1;this.repaintTimer&&(clearTimeout(this.repaintTimer),this.repaintTimer=void 0);var n={};o.forEach(this.components,t),e&&this.reflow()},i.prototype.reflow=function(){function t(i,o){o in n||(i.depends&&i.depends.forEach(function(e){t(e,e.id)}),i.parent&&t(i.parent,i.parent.id),e=i.reflow()||e,n[o]=!0)}var e=!1;this.reflowTimer&&(clearTimeout(this.reflowTimer),this.reflowTimer=void 0);var n={};o.forEach(this.components,t),e&&this.repaint()},e.exports=n=i},{"./util":8,"./component/component":9}],2:[function(t,e,n){function i(t){var e=this;this.options=t||{},this.data={},this.fieldId=this.options.fieldId||"id",this.fieldTypes={},this.options.fieldTypes&&o.forEach(this.options.fieldTypes,function(t,n){e.fieldTypes[n]="Date"==t||"ISODate"==t||"ASPDate"==t?"Date":t}),this.subscribers={},this.internalIds={}}var o=t("./util");i.prototype.subscribe=function(t,e,n){var i=this.subscribers[t];i||(i=[],this.subscribers[t]=i),i.push({id:n?n+"":null,callback:e})},i.prototype.unsubscribe=function(t,e){var n=this.subscribers[t];n&&(this.subscribers[t]=n.filter(function(t){return t.callback!=e}))},i.prototype._trigger=function(t,e,n){if("*"==t)throw Error("Cannot trigger event *");var i=[];t in this.subscribers&&(i=i.concat(this.subscribers[t])),"*"in this.subscribers&&(i=i.concat(this.subscribers["*"])),i.forEach(function(i){i.id!=n&&i.callback&&i.callback(t,e,n||null)})},i.prototype.add=function(t,e){var n,i=[],r=this;if(t instanceof Array)t.forEach(function(t){var e=r._addItem(t);i.push(e)});else if(o.isDataTable(t))for(var s=this._getColumnNames(t),a=0,h=t.getNumberOfRows();h>a;a++){var c={};s.forEach(function(e,n){c[e]=t.getValue(a,n)}),n=r._addItem(c),i.push(n)}else{if(!(t instanceof Object))throw Error("Unknown dataType");n=r._addItem(t),i.push(n)}this._trigger("add",{items:i},e)},i.prototype.update=function(t,e){var n,i=[],r=this;if(t instanceof Array)t.forEach(function(t){var e=r._updateItem(t);i.push(e)});else if(o.isDataTable(t))for(var s=this._getColumnNames(t),a=0,h=t.getNumberOfRows();h>a;a++){var c={};s.forEach(function(e,n){c[e]=t.getValue(a,n)}),n=r._updateItem(c),i.push(n)}else{if(!(t instanceof Object))throw Error("Unknown dataType");n=r._updateItem(t),i.push(n)}this._trigger("update",{items:i},e)},i.prototype.get=function(t,e,n){var i=this;"Object"==o.getType(t)&&(n=e,e=t,t=void 0);var r={};this.options&&this.options.fieldTypes&&o.forEach(this.options.fieldTypes,function(t,e){r[e]=t}),e&&e.fieldTypes&&o.forEach(e.fieldTypes,function(t,e){r[e]=t});var s,a=e?e.fields:void 0;if(e&&e.type){if(s="DataTable"==e.type?"DataTable":"Array",n&&s!=o.getType(n))throw Error('Type of parameter "data" ('+o.getType(n)+") "+"does not correspond with specified options.type ("+e.type+")");if("DataTable"==s&&!o.isDataTable(n))throw Error('Parameter "data" must be a DataTable when options.type is "DataTable"')}else s=n?"DataTable"==o.getType(n)?"DataTable":"Array":"Array";if("DataTable"==s){var h=this._getColumnNames(n);if(void 0==t)o.forEach(this.data,function(t){i._appendRow(n,h,i._castItem(t))});else if(o.isNumber(t)||o.isString(t)){var c=i._castItem(i.data[t],r,a);this._appendRow(n,h,c)}else{if(!(t instanceof Array))throw new TypeError('Parameter "ids" must be undefined, a String, Number, or Array');t.forEach(function(t){var e=i._castItem(i.data[t],r,a);i._appendRow(n,h,e)})}}else if(n=n||[],void 0==t)o.forEach(this.data,function(t){n.push(i._castItem(t,r,a))});else{if(o.isNumber(t)||o.isString(t))return this._castItem(i.data[t],r,a);if(!(t instanceof Array))throw new TypeError('Parameter "ids" must be undefined, a String, Number, or Array');t.forEach(function(t){n.push(i._castItem(i.data[t],r,a))})}return n},i.prototype.remove=function(t,e){var n=[],i=this;if(o.isNumber(t)||o.isString(t))delete this.data[t],delete this.internalIds[t],n.push(t);else if(t instanceof Array)t.forEach(function(t){i.remove(t)}),n=n.concat(t);else if(t instanceof Object)for(var r in this.data)this.data.hasOwnProperty(r)&&this.data[r]==t&&(delete this.data[r],delete this.internalIds[r],n.push(r));this._trigger("remove",{items:n},e)},i.prototype.clear=function(t){var e=Object.keys(this.data);this.data={},this.internalIds={},this._trigger("remove",{items:e},t)},i.prototype.max=function(t){var e=this.data,n=Object.keys(e),i=null,o=null;return n.forEach(function(n){var r=e[n],s=r[t];null!=s&&(!i||s>o)&&(i=r,o=s)}),i},i.prototype.min=function(t){var e=this.data,n=Object.keys(e),i=null,o=null;return n.forEach(function(n){var r=e[n],s=r[t];null!=s&&(!i||o>s)&&(i=r,o=s)}),i},i.prototype._addItem=function(t){var e=t[this.fieldId];void 0==e&&(e=o.randomUUID(),t[this.fieldId]=e,this.internalIds[e]=t);var n={};for(var i in t)if(t.hasOwnProperty(i)){var r=this.fieldTypes[i];n[i]=o.cast(t[i],r)}return this.data[e]=n,e},i.prototype._castItem=function(t,e,n){var i,r=this.fieldId,s=this.internalIds;return t?(i={},e=e||{},n?o.forEach(t,function(t,r){-1!=n.indexOf(r)&&(i[r]=o.cast(t,e[r]))}):o.forEach(t,function(t,n){n==r&&t in s||(i[n]=o.cast(t,e[n]))})):i=null,i},i.prototype._updateItem=function(t){var e=t[this.fieldId];if(void 0==e)throw Error("Item has no id (item: "+JSON.stringify(t)+")");var n=this.data[e];if(n){for(var i in t)if(t.hasOwnProperty(i)){var r=this.fieldTypes[i];n[i]=o.cast(t[i],r)}}else this._addItem(t);return e},i.prototype._getColumnNames=function(t){for(var e=[],n=0,i=t.getNumberOfColumns();i>n;n++)e[n]=t.getColumnId(n)||t.getColumnLabel(n);return e},i.prototype._appendRow=function(t,e,n){var i=t.addRow();e.forEach(function(e,o){t.setValue(i,o,n[e])})},e.exports=n=i},{"./util":8}],5:[function(t,e,n){function i(t){this.id=o.randomUUID(),this.start=0,this.end=0,this.options={min:null,max:null,zoomMin:null,zoomMax:null},this.setOptions(t),this.listeners=[]}var o=t("./util"),r=t("./events");i.prototype.setOptions=function(t){o.extend(this.options,t),(null!=t.start||null!=t.end)&&this.setRange(t.start,t.end)},i.prototype.subscribe=function(t,e,n){var i,o=this;if("horizontal"!=n&&"vertical"!=n)throw new TypeError('Unknown direction "'+n+'". '+'Choose "horizontal" or "vertical".');if("move"==e)i={component:t,event:e,direction:n,callback:function(t){o._onMouseDown(t,i)},params:{}},t.on("mousedown",i.callback),o.listeners.push(i);else{if("zoom"!=e)throw new TypeError('Unknown event "'+e+'". '+'Choose "move" or "zoom".');i={component:t,event:e,direction:n,callback:function(t){o._onMouseWheel(t,i)},params:{}},t.on("mousewheel",i.callback),o.listeners.push(i)}},i.prototype.on=function(t,e){r.addListener(this,t,e)},i.prototype._trigger=function(t){r.trigger(this,t,{start:this.start,end:this.end})},i.prototype.setRange=function(t,e){var n=this._applyRange(t,e);n&&(this._trigger("rangechange"),this._trigger("rangechanged"))},i.prototype._applyRange=function(t,e){var n,i=null!=t?o.cast(t,"Number"):this.start,r=null!=e?o.cast(e,"Number"):this.end;if(isNaN(i))throw Error('Invalid start "'+t+'"');if(isNaN(r))throw Error('Invalid end "'+e+'"');if(i>r&&(r=i),null!=this.options.min){var s=this.options.min.valueOf();s>i&&(n=s-i,i+=n,r+=n)}if(null!=this.options.max){var a=this.options.max.valueOf();r>a&&(n=r-a,i-=n,r-=n)}if(null!=this.options.zoomMin){var h=this.options.zoomMin.valueOf();0>h&&(h=0),h>r-i&&(this.end-this.start>h?(n=h-(r-i),i-=n/2,r+=n/2):(i=this.start,r=this.end))}if(null!=this.options.zoomMax){var c=this.options.zoomMax.valueOf();0>c&&(c=0),r-i>c&&(c>this.end-this.start?(n=r-i-c,i+=n/2,r-=n/2):(i=this.start,r=this.end))}var p=this.start!=i||this.end!=r;return this.start=i,this.end=r,p},i.prototype.getRange=function(){return{start:this.start,end:this.end}},i.prototype.conversion=function(t){return this.start,this.end,i.conversion(this.start,this.end,t)},i.conversion=function(t,e,n){return 0!=n&&0!=e-t?{offset:t,factor:n/(e-t)}:{offset:0,factor:1}},i.prototype._onMouseDown=function(t,e){t=t||window.event;var n=e.params,i=t.which?1==t.which:1==t.button;if(i){n.mouseX=o.getPageX(t),n.mouseY=o.getPageY(t),n.previousLeft=0,n.previousOffset=0,n.moved=!1,n.start=this.start,n.end=this.end;var r=e.component.frame;r&&(r.style.cursor="move");var s=this;n.onMouseMove||(n.onMouseMove=function(t){s._onMouseMove(t,e)},o.addEventListener(document,"mousemove",n.onMouseMove)),n.onMouseUp||(n.onMouseUp=function(t){s._onMouseUp(t,e)},o.addEventListener(document,"mouseup",n.onMouseUp)),o.preventDefault(t)}},i.prototype._onMouseMove=function(t,e){t=t||window.event;var n=e.params,i=o.getPageX(t),r=o.getPageY(t);void 0==n.mouseX&&(n.mouseX=i),void 0==n.mouseY&&(n.mouseY=r);var s=i-n.mouseX,a=r-n.mouseY,h="horizontal"==e.direction?s:a;Math.abs(h)>=1&&(n.moved=!0);var c=n.end-n.start,p="horizontal"==e.direction?e.component.width:e.component.height,u=-h/p*c;this._applyRange(n.start+u,n.end+u),this._trigger("rangechange"),o.preventDefault(t)},i.prototype._onMouseUp=function(t,e){t=t||window.event;var n=e.params;e.component.frame&&(e.component.frame.style.cursor="auto"),n.onMouseMove&&(o.removeEventListener(document,"mousemove",n.onMouseMove),n.onMouseMove=null),n.onMouseUp&&(o.removeEventListener(document,"mouseup",n.onMouseUp),n.onMouseUp=null),n.moved&&this._trigger("rangechanged")},i.prototype._onMouseWheel=function(t,e){t=t||window.event;var n=0;if(t.wheelDelta?n=t.wheelDelta/120:t.detail&&(n=-t.detail/3),n){var i=this,r=function(){var r=n/5,s=null,a=e.component.frame;if(a){var h,c;if("horizontal"==e.direction){h=e.component.width,c=i.conversion(h);var p=o.getAbsoluteLeft(a),u=o.getPageX(t);s=(u-p)/c.factor+c.offset}else{h=e.component.height,c=i.conversion(h);var l=o.getAbsoluteTop(a),d=o.getPageY(t);s=(l+h-d-l)/c.factor+c.offset}}i.zoom(r,s)};r()}o.preventDefault(t)},i.prototype.zoom=function(t,e){null==e&&(e=(this.start+this.end)/2),t>=1&&(t=.9),-1>=t&&(t=-.9),0>t&&(t/=1+t);var n=this.start-e,i=this.end-e,o=this.start-n*t,r=this.end-i*t;this.setRange(o,r)},i.prototype.move=function(t){var e=this.end-this.start,n=this.start+e*t,i=this.end+e*t;this.start=n,this.end=i},e.exports=n=i},{"./util":8,"./events":3}],6:[function(t,e,n){function i(t,e){this.parent=t,this.options={order:function(t,e){return e.width-t.width||t.left-e.left}},this.ordered=[],this.setOptions(e)}var o=t("./util");i.prototype.setOptions=function(t){o.extend(this.options,t)},i.prototype.update=function(){this._order(),this._stack()},i.prototype._order=function(){var t=this.parent.items;if(!t)throw Error("Cannot stack items: parent does not contain items");var e=[],n=0;o.forEach(t,function(t){e[n]=t,n++});var i=this.options.order;if("function"!=typeof this.options.order)throw Error("Option order must be a function");e.sort(i),this.ordered=e},i.prototype._stack=function(){var t,e,n=this.ordered,i=this.options,o="top"==i.orientation,r=i.margin&&i.margin.item||0;for(t=0,e=n.length;e>t;t++){var s=n[t],a=null;do a=this.checkOverlap(n,t,0,t-1,r),null!=a&&(s.top=o?a.top+a.height+r:a.top-s.height-r);while(a)}},i.prototype.checkOverlap=function(t,e,n,i,o){for(var r=this.collision,s=t[e],a=i;a>=n;a--){var h=t[a];if(r(s,h,o)&&a!=e)return h}return null},i.prototype.collision=function(t,e,n){return t.left-ne.left&&t.top-ne.top},e.exports=n=i},{"./util":8}],9:[function(t,e,n){function i(){this.id=null,this.parent=null,this.depends=null,this.controller=null,this.options=null,this.frame=null,this.top=0,this.left=0,this.width=0,this.height=0}var o=t("./../util");i.prototype.setOptions=function(t){t&&o.extend(this.options,t),this.controller&&(this.requestRepaint(),this.requestReflow())},i.prototype.getContainer=function(){return null},i.prototype.getFrame=function(){return this.frame},i.prototype.repaint=function(){return!1},i.prototype.reflow=function(){return!1},i.prototype.requestRepaint=function(){if(!this.controller)throw Error("Cannot request a repaint: no controller configured");this.controller.requestRepaint()},i.prototype.requestReflow=function(){if(!this.controller)throw Error("Cannot request a reflow: no controller configured");this.controller.requestReflow()},i.prototype.on=function(t,e){if(!this.parent)throw Error("Cannot attach event: no root panel found");this.parent.on(t,e)},e.exports=n=i},{"./../util":8}],11:[function(t,e,n){function i(t,e,n){this.id=o.randomUUID(),this.parent=t,this.depends=e,this.options={},this.setOptions(n)}var o=t("../util"),r=t("./component");i.prototype=new r,i.prototype.getContainer=function(){return this.frame},i.prototype.repaint=function(){var t=0,e=o.updateProperty,n=o.option.asSize,i=this.options,r=this.frame;if(r||(r=document.createElement("div"),r.className="panel",i.className&&("function"==typeof i.className?o.addClassName(r,i.className()+""):o.addClassName(r,i.className+"")),this.frame=r,t+=1),!r.parentNode){if(!this.parent)throw Error("Cannot repaint panel: no parent attached");var s=this.parent.getContainer();if(!s)throw Error("Cannot repaint panel: parent has no container element");s.appendChild(r),t+=1}return t+=e(r.style,"top",n(i.top,"0px")),t+=e(r.style,"left",n(i.left,"0px")),t+=e(r.style,"width",n(i.width,"100%")),t+=e(r.style,"height",n(i.height,"100%")),t>0},i.prototype.reflow=function(){var t=0,e=o.updateProperty,n=this.frame;return n?(t+=e(this,"top",n.offsetTop),t+=e(this,"left",n.offsetLeft),t+=e(this,"width",n.offsetWidth),t+=e(this,"height",n.offsetHeight)):t+=1,t>0},e.exports=n=i},{"../util":8,"./component":9}],10:[function(t,e,n){function i(t,e){this.id=o.randomUUID(),this.container=t,this.options={autoResize:!0},this.listeners={},this.setOptions(e)}var o=t("../util"),r=t("./panel");i.prototype=new r,i.prototype.setOptions=function(t){o.extend(this.options,t),this.options.autoResize?this._watch():this._unwatch()},i.prototype.repaint=function(){var t=0,e=o.updateProperty,n=o.option.asSize,i=this.options,r=this.frame;if(r||(r=document.createElement("div"),r.className="graph panel",i.className&&o.addClassName(r,o.option.asString(i.className)),this.frame=r,t+=1),!r.parentNode){if(!this.container)throw Error("Cannot repaint root panel: no container attached");this.container.appendChild(r),t+=1}return t+=e(r.style,"top",n(i.top,"0px")),t+=e(r.style,"left",n(i.left,"0px")),t+=e(r.style,"width",n(i.width,"100%")),t+=e(r.style,"height",n(i.height,"100%")),this._updateEventEmitters(),t>0},i.prototype.reflow=function(){var t=0,e=o.updateProperty,n=this.frame;return n?(t+=e(this,"top",n.offsetTop),t+=e(this,"left",n.offsetLeft),t+=e(this,"width",n.offsetWidth),t+=e(this,"height",n.offsetHeight)):t+=1,t>0},i.prototype._watch=function(){var t=this;this._unwatch();var e=function(){return t.options.autoResize?(t.frame&&(t.frame.clientWidth!=t.width||t.frame.clientHeight!=t.height)&&t.requestReflow(),void 0):(t._unwatch(),void 0)};o.addEventListener(window,"resize",e),this.watchTimer=setInterval(e,1e3)},i.prototype._unwatch=function(){this.watchTimer&&(clearInterval(this.watchTimer),this.watchTimer=void 0)},i.prototype.on=function(t,e){var n=this.listeners[t];n||(n=[],this.listeners[t]=n),n.push(e),this._updateEventEmitters()},i.prototype._updateEventEmitters=function(){if(this.listeners){var t=this;o.forEach(this.listeners,function(e,n){if(t.emitters||(t.emitters={}),!(n in t.emitters)){var i=t.frame;if(i){var r=function(t){e.forEach(function(e){e(t)})};t.emitters[n]=r,o.addEventListener(i,n,r)}}})}},e.exports=n=i},{"../util":8,"./panel":11}],12:[function(t,e,n){function i(t,e,n){this.id=o.randomUUID(),this.parent=t,this.depends=e,this.options={style:"box",align:"center",orientation:"bottom",margin:{axis:20,item:10},padding:5},this.dom={};var i=this;this.data=null,this.range=null,this.listeners={add:function(t,e){i._onAdd(e.items)},update:function(t,e){i._onUpdate(e.items)},remove:function(t,e){i._onRemove(e.items)}},this.items={},this.queue={},this.stack=new a(this),this.conversion=null,this.setOptions(n)}var o=t("../util"),r=t("../dataset"),s=t("./panel"),a=t("../stack"),h=t("./item/itembox"),c=t("./item/itemrange"),p=t("./item/itempoint");i.prototype=new s,i.types={box:h,range:c,point:p},i.prototype.setOptions=function(t){o.extend(this.options,t),this.stack.setOptions(this.options)},i.prototype.setRange=function(t){if(!(t instanceof Range||t&&t.start&&t.end))throw new TypeError("Range must be an instance of Range, or an object containing start and end.");this.range=t},i.prototype.repaint=function(){var t=0,e=o.updateProperty,n=o.option.asSize,r=this.options,s=this.frame;if(!s){s=document.createElement("div"),s.className="itemset",r.className&&o.addClassName(s,o.option.asString(r.className));var a=document.createElement("div");a.className="background",s.appendChild(a),this.dom.background=a;var h=document.createElement("div");h.className="foreground",s.appendChild(h),this.dom.foreground=h;var c=document.createElement("div");c.className="itemset-axis",this.dom.axis=c,this.frame=s,t+=1}if(!this.parent)throw Error("Cannot repaint itemset: no parent attached");var p=this.parent.getContainer();if(!p)throw Error("Cannot repaint itemset: parent has no container element");s.parentNode||(p.appendChild(s),t+=1),this.dom.axis.parentNode||(p.appendChild(this.dom.axis),t+=1),t+=e(s.style,"height",n(r.height,this.height+"px")),t+=e(s.style,"top",n(r.top,"0px")),t+=e(s.style,"left",n(r.left,"0px")),t+=e(s.style,"width",n(r.width,"100%")),t+=e(this.dom.axis.style,"top",n(r.top,"0px")),this._updateConversion();var u=this,l=this.queue,d=this.data,f=this.items,m={fields:["id","start","end","content","type"]};return Object.keys(l).forEach(function(e){var n=l[e],o=n.item;switch(n.action){case"add":case"update":var s=d.get(e,m),a=s.type||s.start&&s.end&&"range"||"box",h=i.types[a];if(o&&(h&&o instanceof h?(o.data=s,t+=o.repaint()):(o.visible=!1,t+=o.repaint(),o=null)),!o){if(!h)throw new TypeError('Unknown item type "'+a+'"');o=new h(u,s,r),t+=o.repaint()}f[e]=o,delete l[e];break;case"remove":o&&(o.visible=!1,t+=o.repaint()),delete f[e],delete l[e];break;default:console.log('Error: unknown action "'+n.action+'"')}}),o.forEach(this.items,function(t){t.reposition()}),t>0},i.prototype.getForeground=function(){return this.dom.foreground},i.prototype.getBackground=function(){return this.dom.background},i.prototype.reflow=function(){var t=0,e=this.options,n=o.updateProperty,i=o.option.asNumber,r=this.frame;if(r){this._updateConversion(),o.forEach(this.items,function(e){t+=e.reflow()}),this.stack.update();var s,a=i(e.maxHeight);if(null!=e.height)s=r.offsetHeight,null!=a&&(s=Math.min(s,a)),t+=n(this,"height",s);else{var h=this.height;s=0,"top"==e.orientation?o.forEach(this.items,function(t){s=Math.max(s,t.top+t.height)}):o.forEach(this.items,function(t){s=Math.max(s,h-t.top)}),s+=e.margin.axis,null!=a&&(s=Math.min(s,a)),t+=n(this,"height",s)}t+=n(this,"top",r.offsetTop),t+=n(this,"left",r.offsetLeft),t+=n(this,"width",r.offsetWidth)}else t+=1;return t>0},i.prototype.setData=function(t){var e=this.data;e&&o.forEach(this.listeners,function(t,n){e.unsubscribe(n,t)}),t instanceof r?this.data=t:(this.data=new r({fieldTypes:{start:"Date",end:"Date"}}),this.data.add(t));var n=this.id,i=this;o.forEach(this.listeners,function(t,e){i.data.subscribe(e,t,n)});var s=this.data.get({filter:["id"]}),a=[];o.forEach(s,function(t,e){a[e]=t.id}),this._onAdd(a)},i.prototype.getDataRange=function(){var t=this.data,e=t.min("start");e=e?e.start.valueOf():null;var n=t.max("start"),i=t.max("end");n=n?n.start.valueOf():null,i=i?i.end.valueOf():null;var o=Math.max(n,i);return{min:new Date(e),max:new Date(o)}},i.prototype._onUpdate=function(t){this._toQueue(t,"update")},i.prototype._onAdd=function(t){this._toQueue(t,"add")},i.prototype._onRemove=function(t){this._toQueue(t,"remove")},i.prototype._toQueue=function(t,e){var n=this.items,i=this.queue;t.forEach(function(t){var o=i[t];o?o.action=e:i[t]={item:n[t]||null,action:e}}),this.controller&&this.requestRepaint()},i.prototype._updateConversion=function(){var t=this.range;if(!t)throw Error("No range configured");this.conversion=t.conversion?t.conversion(this.width):Range.conversion(t.start,t.end,this.width)},i.prototype.toTime=function(t){var e=this.conversion;return new Date(t/e.factor+e.offset)},i.prototype.toScreen=function(t){var e=this.conversion;return(t.valueOf()-e.offset)*e.factor},e.exports=n=i},{"../util":8,"../dataset":2,"./panel":11,"../stack":6,"./item/itembox":15,"./item/itemrange":16,"./item/itempoint":17}],13:[function(t,e,n){function i(t,e,n){this.id=o.randomUUID(),this.parent=t,this.depends=e,this.dom={majorLines:[],majorTexts:[],minorLines:[],minorTexts:[],redundant:{majorLines:[],majorTexts:[],minorLines:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.options={orientation:"bottom",showMinorLabels:!0,showMajorLabels:!0},this.conversion=null,this.range=null,this.setOptions(n)}var o=t("../util"),r=t("../timestep"),s=t("./component");i.prototype=new s,i.prototype.setOptions=function(t){o.extend(this.options,t)},i.prototype.setRange=function(t){if(!(t instanceof Range||t&&t.start&&t.end))throw new TypeError("Range must be an instance of Range, or an object containing start and end.");this.range=t},i.prototype.toTime=function(t){var e=this.conversion;return new Date(t/e.factor+e.offset)},i.prototype.toScreen=function(t){var e=this.conversion;return(t.valueOf()-e.offset)*e.factor},i.prototype.repaint=function(){var t=0,e=o.updateProperty,n=o.option.asSize,i=this.options,r=this.props,s=this.step,a=this.frame;if(a||(a=document.createElement("div"),this.frame=a,t+=1),a.className="axis "+i.orientation,!a.parentNode){if(!this.parent)throw Error("Cannot repaint time axis: no parent attached");var h=this.parent.getContainer();if(!h)throw Error("Cannot repaint time axis: parent has no container element");h.appendChild(a),t+=1}var c=a.parentNode;if(c){var p=a.nextSibling;c.removeChild(a);var u=i.orientation,l="bottom"==u&&this.props.parentHeight&&this.height?this.props.parentHeight-this.height+"px":"0px";if(t+=e(a.style,"top",n(i.top,l)),t+=e(a.style,"left",n(i.left,"0px")),t+=e(a.style,"width",n(i.width,"100%")),t+=e(a.style,"height",n(i.height,this.height+"px")),this._repaintMeasureChars(),this.step){this._repaintStart(),s.first();for(var d=void 0,f=0;s.hasNext()&&1e3>f;){f++;var m=s.getCurrent(),g=this.toScreen(m),v=s.isMajor();i.showMinorLabels&&this._repaintMinorText(g,s.getLabelMinor()),v&&i.showMajorLabels?(g>0&&(void 0==d&&(d=g),this._repaintMajorText(g,s.getLabelMajor())),this._repaintMajorLine(g)):this._repaintMinorLine(g),s.next()}if(i.showMajorLabels){var y=this.toTime(0),S=s.getLabelMajor(y),T=S.length*(r.majorCharWidth||10)+10;(void 0==d||d>T)&&this._repaintMajorText(0,S)}this._repaintEnd()}this._repaintLine(),p?c.insertBefore(a,p):c.appendChild(a)}return t>0 +},i.prototype._repaintStart=function(){var t=this.dom,e=t.redundant;e.majorLines=t.majorLines,e.majorTexts=t.majorTexts,e.minorLines=t.minorLines,e.minorTexts=t.minorTexts,t.majorLines=[],t.majorTexts=[],t.minorLines=[],t.minorTexts=[]},i.prototype._repaintEnd=function(){o.forEach(this.dom.redundant,function(t){for(;t.length;){var e=t.pop();e&&e.parentNode&&e.parentNode.removeChild(e)}})},i.prototype._repaintMinorText=function(t,e){var n=this.dom.redundant.minorTexts.shift();if(!n){var i=document.createTextNode("");n=document.createElement("div"),n.appendChild(i),n.className="text minor",this.frame.appendChild(n)}this.dom.minorTexts.push(n),n.childNodes[0].nodeValue=e,n.style.left=t+"px",n.style.top=this.props.minorLabelTop+"px"},i.prototype._repaintMajorText=function(t,e){var n=this.dom.redundant.majorTexts.shift();if(!n){var i=document.createTextNode(e);n=document.createElement("div"),n.className="text major",n.appendChild(i),this.frame.appendChild(n)}this.dom.majorTexts.push(n),n.childNodes[0].nodeValue=e,n.style.top=this.props.majorLabelTop+"px",n.style.left=t+"px"},i.prototype._repaintMinorLine=function(t){var e=this.dom.redundant.minorLines.shift();e||(e=document.createElement("div"),e.className="grid vertical minor",this.frame.appendChild(e)),this.dom.minorLines.push(e);var n=this.props;e.style.top=n.minorLineTop+"px",e.style.height=n.minorLineHeight+"px",e.style.left=t-n.minorLineWidth/2+"px"},i.prototype._repaintMajorLine=function(t){var e=this.dom.redundant.majorLines.shift();e||(e=document.createElement("DIV"),e.className="grid vertical major",this.frame.appendChild(e)),this.dom.majorLines.push(e);var n=this.props;e.style.top=n.majorLineTop+"px",e.style.left=t-n.majorLineWidth/2+"px",e.style.height=n.majorLineHeight+"px"},i.prototype._repaintLine=function(){var t=this.dom.line,e=this.frame,n=this.options;n.showMinorLabels||n.showMajorLabels?(t?(e.removeChild(t),e.appendChild(t)):(t=document.createElement("div"),t.className="grid horizontal major",e.appendChild(t),this.dom.line=t),t.style.top=this.props.lineTop+"px"):t&&axis.parentElement&&(e.removeChild(axis.line),delete this.dom.line)},i.prototype._repaintMeasureChars=function(){var t,e=this.dom;if(!e.characterMinor){t=document.createTextNode("0");var n=document.createElement("DIV");n.className="text minor measure",n.appendChild(t),this.frame.appendChild(n),e.measureCharMinor=n}if(!e.characterMajor){t=document.createTextNode("0");var i=document.createElement("DIV");i.className="text major measure",i.appendChild(t),this.frame.appendChild(i),e.measureCharMajor=i}},i.prototype.reflow=function(){var t=0,e=o.updateProperty,n=this.frame,i=this.range;if(!i)throw Error("Cannot repaint time axis: no range configured");if(n){t+=e(this,"top",n.offsetTop),t+=e(this,"left",n.offsetLeft);var s=this.props,a=this.options.showMinorLabels,h=this.options.showMajorLabels,c=this.dom.measureCharMinor,p=this.dom.measureCharMajor;c&&(s.minorCharHeight=c.clientHeight,s.minorCharWidth=c.clientWidth),p&&(s.majorCharHeight=p.clientHeight,s.majorCharWidth=p.clientWidth);var u=n.parentNode?n.parentNode.offsetHeight:0;switch(u!=s.parentHeight&&(s.parentHeight=u,t+=1),this.options.orientation){case"bottom":s.minorLabelHeight=a?s.minorCharHeight:0,s.majorLabelHeight=h?s.majorCharHeight:0,s.minorLabelTop=0,s.majorLabelTop=s.minorLabelTop+s.minorLabelHeight,s.minorLineTop=-this.top,s.minorLineHeight=Math.max(this.top+s.majorLabelHeight,0),s.minorLineWidth=1,s.majorLineTop=-this.top,s.majorLineHeight=Math.max(this.top+s.minorLabelHeight+s.majorLabelHeight,0),s.majorLineWidth=1,s.lineTop=0;break;case"top":s.minorLabelHeight=a?s.minorCharHeight:0,s.majorLabelHeight=h?s.majorCharHeight:0,s.majorLabelTop=0,s.minorLabelTop=s.majorLabelTop+s.majorLabelHeight,s.minorLineTop=s.minorLabelTop,s.minorLineHeight=Math.max(u-s.majorLabelHeight-this.top),s.minorLineWidth=1,s.majorLineTop=0,s.majorLineHeight=Math.max(u-this.top),s.majorLineWidth=1,s.lineTop=s.majorLabelHeight+s.minorLabelHeight;break;default:throw Error('Unkown orientation "'+this.options.orientation+'"')}var l=s.minorLabelHeight+s.majorLabelHeight;t+=e(this,"width",n.offsetWidth),t+=e(this,"height",l),this._updateConversion();var d=o.cast(i.start,"Date"),f=o.cast(i.end,"Date"),m=this.toTime(5*(s.minorCharWidth||10))-this.toTime(0);this.step=new r(d,f,m),t+=e(s.range,"start",d.valueOf()),t+=e(s.range,"end",f.valueOf()),t+=e(s.range,"minimumStep",m.valueOf())}return t>0},i.prototype._updateConversion=function(){var t=this.range;if(!t)throw Error("No range configured");this.conversion=t.conversion?t.conversion(this.width):Range.conversion(t.start,t.end,this.width)},e.exports=n=i},{"../util":8,"../timestep":7,"./component":9}],7:[function(t,e,n){var i=(t("./util"),t("moment"));TimeStep=function(t,e,n){this.current=new Date,this._start=new Date,this._end=new Date,this.autoScale=!0,this.scale=TimeStep.SCALE.DAY,this.step=1,this.setRange(t,e,n)},TimeStep.SCALE={MILLISECOND:1,SECOND:2,MINUTE:3,HOUR:4,DAY:5,WEEKDAY:6,MONTH:7,YEAR:8},TimeStep.prototype.setRange=function(t,e,n){t instanceof Date&&e instanceof Date&&(this._start=void 0!=t?new Date(t.valueOf()):new Date,this._end=void 0!=e?new Date(e.valueOf()):new Date,this.autoScale&&this.setMinimumStep(n))},TimeStep.prototype.first=function(){this.current=new Date(this._start.valueOf()),this.roundToMinor()},TimeStep.prototype.roundToMinor=function(){switch(this.scale){case TimeStep.SCALE.YEAR:this.current.setFullYear(this.step*Math.floor(this.current.getFullYear()/this.step)),this.current.setMonth(0);case TimeStep.SCALE.MONTH:this.current.setDate(1);case TimeStep.SCALE.DAY:case TimeStep.SCALE.WEEKDAY:this.current.setHours(0);case TimeStep.SCALE.HOUR:this.current.setMinutes(0);case TimeStep.SCALE.MINUTE:this.current.setSeconds(0);case TimeStep.SCALE.SECOND:this.current.setMilliseconds(0)}if(1!=this.step)switch(this.scale){case TimeStep.SCALE.MILLISECOND:this.current.setMilliseconds(this.current.getMilliseconds()-this.current.getMilliseconds()%this.step);break;case TimeStep.SCALE.SECOND:this.current.setSeconds(this.current.getSeconds()-this.current.getSeconds()%this.step);break;case TimeStep.SCALE.MINUTE:this.current.setMinutes(this.current.getMinutes()-this.current.getMinutes()%this.step);break;case TimeStep.SCALE.HOUR:this.current.setHours(this.current.getHours()-this.current.getHours()%this.step);break;case TimeStep.SCALE.WEEKDAY:case TimeStep.SCALE.DAY:this.current.setDate(this.current.getDate()-1-(this.current.getDate()-1)%this.step+1);break;case TimeStep.SCALE.MONTH:this.current.setMonth(this.current.getMonth()-this.current.getMonth()%this.step);break;case TimeStep.SCALE.YEAR:this.current.setFullYear(this.current.getFullYear()-this.current.getFullYear()%this.step);break;default:}},TimeStep.prototype.hasNext=function(){return this.current.valueOf()<=this._end.valueOf()},TimeStep.prototype.next=function(){var t=this.current.valueOf();if(6>this.current.getMonth())switch(this.scale){case TimeStep.SCALE.MILLISECOND:this.current=new Date(this.current.valueOf()+this.step);break;case TimeStep.SCALE.SECOND:this.current=new Date(this.current.valueOf()+1e3*this.step);break;case TimeStep.SCALE.MINUTE:this.current=new Date(this.current.valueOf()+60*1e3*this.step);break;case TimeStep.SCALE.HOUR:this.current=new Date(this.current.valueOf()+60*60*1e3*this.step);var e=this.current.getHours();this.current.setHours(e-e%this.step);break;case TimeStep.SCALE.WEEKDAY:case TimeStep.SCALE.DAY:this.current.setDate(this.current.getDate()+this.step);break;case TimeStep.SCALE.MONTH:this.current.setMonth(this.current.getMonth()+this.step);break;case TimeStep.SCALE.YEAR:this.current.setFullYear(this.current.getFullYear()+this.step);break;default:}else switch(this.scale){case TimeStep.SCALE.MILLISECOND:this.current=new Date(this.current.valueOf()+this.step);break;case TimeStep.SCALE.SECOND:this.current.setSeconds(this.current.getSeconds()+this.step);break;case TimeStep.SCALE.MINUTE:this.current.setMinutes(this.current.getMinutes()+this.step);break;case TimeStep.SCALE.HOUR:this.current.setHours(this.current.getHours()+this.step);break;case TimeStep.SCALE.WEEKDAY:case TimeStep.SCALE.DAY:this.current.setDate(this.current.getDate()+this.step);break;case TimeStep.SCALE.MONTH:this.current.setMonth(this.current.getMonth()+this.step);break;case TimeStep.SCALE.YEAR:this.current.setFullYear(this.current.getFullYear()+this.step);break;default:}if(1!=this.step)switch(this.scale){case TimeStep.SCALE.MILLISECOND:this.current.getMilliseconds()0&&(this.step=e),this.autoScale=!1},TimeStep.prototype.setAutoScale=function(t){this.autoScale=t},TimeStep.prototype.setMinimumStep=function(t){if(void 0!=t){var e=31104e6,n=2592e6,i=864e5,o=36e5,r=6e4,s=1e3,a=1;1e3*e>t&&(this.scale=TimeStep.SCALE.YEAR,this.step=1e3),500*e>t&&(this.scale=TimeStep.SCALE.YEAR,this.step=500),100*e>t&&(this.scale=TimeStep.SCALE.YEAR,this.step=100),50*e>t&&(this.scale=TimeStep.SCALE.YEAR,this.step=50),10*e>t&&(this.scale=TimeStep.SCALE.YEAR,this.step=10),5*e>t&&(this.scale=TimeStep.SCALE.YEAR,this.step=5),e>t&&(this.scale=TimeStep.SCALE.YEAR,this.step=1),3*n>t&&(this.scale=TimeStep.SCALE.MONTH,this.step=3),n>t&&(this.scale=TimeStep.SCALE.MONTH,this.step=1),5*i>t&&(this.scale=TimeStep.SCALE.DAY,this.step=5),2*i>t&&(this.scale=TimeStep.SCALE.DAY,this.step=2),i>t&&(this.scale=TimeStep.SCALE.DAY,this.step=1),i/2>t&&(this.scale=TimeStep.SCALE.WEEKDAY,this.step=1),4*o>t&&(this.scale=TimeStep.SCALE.HOUR,this.step=4),o>t&&(this.scale=TimeStep.SCALE.HOUR,this.step=1),15*r>t&&(this.scale=TimeStep.SCALE.MINUTE,this.step=15),10*r>t&&(this.scale=TimeStep.SCALE.MINUTE,this.step=10),5*r>t&&(this.scale=TimeStep.SCALE.MINUTE,this.step=5),r>t&&(this.scale=TimeStep.SCALE.MINUTE,this.step=1),15*s>t&&(this.scale=TimeStep.SCALE.SECOND,this.step=15),10*s>t&&(this.scale=TimeStep.SCALE.SECOND,this.step=10),5*s>t&&(this.scale=TimeStep.SCALE.SECOND,this.step=5),s>t&&(this.scale=TimeStep.SCALE.SECOND,this.step=1),200*a>t&&(this.scale=TimeStep.SCALE.MILLISECOND,this.step=200),100*a>t&&(this.scale=TimeStep.SCALE.MILLISECOND,this.step=100),50*a>t&&(this.scale=TimeStep.SCALE.MILLISECOND,this.step=50),10*a>t&&(this.scale=TimeStep.SCALE.MILLISECOND,this.step=10),5*a>t&&(this.scale=TimeStep.SCALE.MILLISECOND,this.step=5),a>t&&(this.scale=TimeStep.SCALE.MILLISECOND,this.step=1)}},TimeStep.prototype.snap=function(t){if(this.scale==TimeStep.SCALE.YEAR){var e=t.getFullYear()+Math.round(t.getMonth()/12);t.setFullYear(Math.round(e/this.step)*this.step),t.setMonth(0),t.setDate(0),t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0)}else if(this.scale==TimeStep.SCALE.MONTH)t.getDate()>15?(t.setDate(1),t.setMonth(t.getMonth()+1)):t.setDate(1),t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0);else if(this.scale==TimeStep.SCALE.DAY||this.scale==TimeStep.SCALE.WEEKDAY){switch(this.step){case 5:case 2:t.setHours(24*Math.round(t.getHours()/24));break;default:t.setHours(12*Math.round(t.getHours()/12))}t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0)}else if(this.scale==TimeStep.SCALE.HOUR){switch(this.step){case 4:t.setMinutes(60*Math.round(t.getMinutes()/60));break;default:t.setMinutes(30*Math.round(t.getMinutes()/30))}t.setSeconds(0),t.setMilliseconds(0)}else if(this.scale==TimeStep.SCALE.MINUTE){switch(this.step){case 15:case 10:t.setMinutes(5*Math.round(t.getMinutes()/5)),t.setSeconds(0);break;case 5:t.setSeconds(60*Math.round(t.getSeconds()/60));break;default:t.setSeconds(30*Math.round(t.getSeconds()/30))}t.setMilliseconds(0)}else if(this.scale==TimeStep.SCALE.SECOND)switch(this.step){case 15:case 10:t.setSeconds(5*Math.round(t.getSeconds()/5)),t.setMilliseconds(0);break;case 5:t.setMilliseconds(1e3*Math.round(t.getMilliseconds()/1e3));break;default:t.setMilliseconds(500*Math.round(t.getMilliseconds()/500))}else if(this.scale==TimeStep.SCALE.MILLISECOND){var n=this.step>5?this.step/2:1;t.setMilliseconds(Math.round(t.getMilliseconds()/n)*n)}},TimeStep.prototype.isMajor=function(){switch(this.scale){case TimeStep.SCALE.MILLISECOND:return 0==this.current.getMilliseconds();case TimeStep.SCALE.SECOND:return 0==this.current.getSeconds();case TimeStep.SCALE.MINUTE:return 0==this.current.getHours()&&0==this.current.getMinutes();case TimeStep.SCALE.HOUR:return 0==this.current.getHours();case TimeStep.SCALE.WEEKDAY:case TimeStep.SCALE.DAY:return 1==this.current.getDate();case TimeStep.SCALE.MONTH:return 0==this.current.getMonth();case TimeStep.SCALE.YEAR:return!1;default:return!1}},TimeStep.prototype.getLabelMinor=function(t){switch(void 0==t&&(t=this.current),this.scale){case TimeStep.SCALE.MILLISECOND:return i(t).format("SSS");case TimeStep.SCALE.SECOND:return i(t).format("s");case TimeStep.SCALE.MINUTE:return i(t).format("HH:mm");case TimeStep.SCALE.HOUR:return i(t).format("HH:mm");case TimeStep.SCALE.WEEKDAY:return i(t).format("ddd D");case TimeStep.SCALE.DAY:return i(t).format("D");case TimeStep.SCALE.MONTH:return i(t).format("MMM");case TimeStep.SCALE.YEAR:return i(t).format("YYYY");default:return""}},TimeStep.prototype.getLabelMajor=function(t){switch(void 0==t&&(t=this.current),this.scale){case TimeStep.SCALE.MILLISECOND:return i(t).format("HH:mm:ss");case TimeStep.SCALE.SECOND:return i(t).format("D MMMM HH:mm");case TimeStep.SCALE.MINUTE:case TimeStep.SCALE.HOUR:return i(t).format("ddd D MMMM");case TimeStep.SCALE.WEEKDAY:case TimeStep.SCALE.DAY:return i(t).format("MMMM YYYY");case TimeStep.SCALE.MONTH:return i(t).format("YYYY");case TimeStep.SCALE.YEAR:return"";default:return""}},e.exports=n=TimeStep},{"./util":8,moment:18}],15:[function(t,e,n){function i(t,e,n){this.props={dot:{left:0,top:0,width:0,height:0},line:{top:0,left:0,width:0,height:0}},r.call(this,t,e,n)}var o=t("../../util"),r=t("./item");i.prototype=new r(null,null),i.prototype.select=function(){this.selected=!0},i.prototype.unselect=function(){this.selected=!1},i.prototype.repaint=function(){var t=!1,e=this.dom;if(this.visible){if(e||(this._create(),t=!0),e=this.dom){if(!this.options&&!this.parent)throw Error("Cannot repaint item: no parent attached");var n=this.parent.getForeground();if(!n)throw Error("Cannot repaint time axis: parent has no foreground container element");var i=this.parent.getBackground();if(!i)throw Error("Cannot repaint time axis: parent has no background container element");if(e.box.parentNode||(n.appendChild(e.box),t=!0),e.line.parentNode||(i.appendChild(e.line),t=!0),e.dot.parentNode||(this.parent.dom.axis.appendChild(e.dot),t=!0),this.data.content!=this.content){if(this.content=this.data.content,this.content instanceof Element)e.content.innerHTML="",e.content.appendChild(this.content);else{if(void 0==this.data.content)throw Error('Property "content" missing in item '+this.data.id);e.content.innerHTML=this.content}t=!0}var o=(this.data.className?" "+this.data.className:"")+(this.selected?" selected":"");this.className!=o&&(this.className=o,e.box.className="item box"+o,e.line.className="item line"+o,e.dot.className="item dot"+o,t=!0)}}else e&&(e.box.parentNode&&(e.box.parentNode.removeChild(e.box),t=!0),e.line.parentNode&&(e.line.parentNode.removeChild(e.line),t=!0),e.dot.parentNode&&(e.dot.parentNode.removeChild(e.dot),t=!0));return t},i.prototype.reflow=function(){if(void 0==this.data.start)throw Error('Property "start" missing in item '+this.data.id);var t,e,n=o.updateProperty,i=this.dom,r=this.props,s=this.options,a=this.parent.toScreen(this.data.start),h=s&&s.align,c=s.orientation,p=0;if(i)if(p+=n(r.dot,"height",i.dot.offsetHeight),p+=n(r.dot,"width",i.dot.offsetWidth),p+=n(r.line,"width",i.line.offsetWidth),p+=n(r.line,"width",i.line.offsetWidth),p+=n(this,"width",i.box.offsetWidth),p+=n(this,"height",i.box.offsetHeight),e="right"==h?a-this.width:"left"==h?a:a-this.width/2,p+=n(this,"left",e),p+=n(r.line,"left",a-r.line.width/2),p+=n(r.dot,"left",a-r.dot.width/2),"top"==c)t=s.margin.axis,p+=n(this,"top",t),p+=n(r.line,"top",0),p+=n(r.line,"height",t),p+=n(r.dot,"top",-r.dot.height/2);else{var u=this.parent.height;t=u-this.height-s.margin.axis,p+=n(this,"top",t),p+=n(r.line,"top",t+this.height),p+=n(r.line,"height",Math.max(s.margin.axis,0)),p+=n(r.dot,"top",u-r.dot.height/2)}else p+=1;return p>0},i.prototype._create=function(){var t=this.dom;t||(this.dom=t={},t.box=document.createElement("DIV"),t.content=document.createElement("DIV"),t.content.className="content",t.box.appendChild(t.content),t.line=document.createElement("DIV"),t.line.className="line",t.dot=document.createElement("DIV"),t.dot.className="dot")},i.prototype.reposition=function(){var t=this.dom,e=this.props,n=this.options.orientation;if(t){var i=t.box,o=t.line,r=t.dot;i.style.left=this.left+"px",i.style.top=this.top+"px",o.style.left=e.line.left+"px","top"==n?(o.style.top="0px",o.style.height=this.top+"px"):(o.style.top=e.line.top+"px",o.style.top=this.top+this.height+"px",o.style.height=Math.max(e.dot.top-this.top-this.height,0)+"px"),r.style.left=e.dot.left+"px",r.style.top=e.dot.top+"px"}},e.exports=n=i},{"./item":19,"../../util":8}],16:[function(t,e,n){function i(t,e,n){this.props={content:{left:0,width:0}},r.call(this,t,e,n)}var o=t("../../util"),r=t("./item");i.prototype=new r(null,null),i.prototype.select=function(){this.selected=!0},i.prototype.unselect=function(){this.selected=!1},i.prototype.repaint=function(){var t=!1,e=this.dom;if(this.visible){if(e||(this._create(),t=!0),e=this.dom){if(!this.options&&!this.options.parent)throw Error("Cannot repaint item: no parent attached");var n=this.parent.getForeground();if(!n)throw Error("Cannot repaint time axis: parent has no foreground container element");if(e.box.parentNode||(n.appendChild(e.box),t=!0),this.data.content!=this.content){if(this.content=this.data.content,this.content instanceof Element)e.content.innerHTML="",e.content.appendChild(this.content);else{if(void 0==this.data.content)throw Error('Property "content" missing in item '+this.data.id);e.content.innerHTML=this.content}t=!0}var i=this.data.className?""+this.data.className:"";this.className!=i&&(this.className=i,e.box.className="item range"+i,t=!0)}}else e&&e.box.parentNode&&(e.box.parentNode.removeChild(e.box),t=!0);return t},i.prototype.reflow=function(){if(void 0==this.data.start)throw Error('Property "start" missing in item '+this.data.id);if(void 0==this.data.end)throw Error('Property "end" missing in item '+this.data.id);var t=this.dom,e=this.props,n=this.options,i=this.parent,r=i.toScreen(this.data.start),s=i.toScreen(this.data.end),a=0;if(t){var h,c,p=o.updateProperty,u=t.box,l=i.width,d=n.orientation;a+=p(e.content,"width",t.content.offsetWidth),a+=p(this,"height",u.offsetHeight),-l>r&&(r=-l),s>2*l&&(s=2*l),h=0>r?Math.min(-r,s-r-e.content.width-2*n.padding):0,a+=p(e.content,"left",h),"top"==d?(c=n.margin.axis,a+=p(this,"top",c)):(c=i.height-this.height-n.margin.axis,a+=p(this,"top",c)),a+=p(this,"left",r),a+=p(this,"width",Math.max(s-r,1))}else a+=1;return a>0},i.prototype._create=function(){var t=this.dom;t||(this.dom=t={},t.box=document.createElement("div"),t.content=document.createElement("div"),t.content.className="content",t.box.appendChild(t.content))},i.prototype.reposition=function(){var t=this.dom,e=this.props;t&&(t.box.style.top=this.top+"px",t.box.style.left=this.left+"px",t.box.style.width=this.width+"px",t.content.style.left=e.content.left+"px")},e.exports=n=i},{"../../util":8,"./item":19}],17:[function(t,e,n){function i(t,e,n){this.props={dot:{top:0,width:0,height:0},content:{height:0,marginLeft:0}},r.call(this,t,e,n)}var o=t("../../util"),r=t("./item");i.prototype=new r(null,null),i.prototype.select=function(){this.selected=!0},i.prototype.unselect=function(){this.selected=!1},i.prototype.repaint=function(){var t=!1,e=this.dom;if(this.visible){if(e||(this._create(),t=!0),e=this.dom){if(!this.options&&!this.options.parent)throw Error("Cannot repaint item: no parent attached");var n=this.parent.getForeground();if(!n)throw Error("Cannot repaint time axis: parent has no foreground container element");if(e.point.parentNode||(n.appendChild(e.point),n.appendChild(e.point),t=!0),this.data.content!=this.content){if(this.content=this.data.content,this.content instanceof Element)e.content.innerHTML="",e.content.appendChild(this.content);else{if(void 0==this.data.content)throw Error('Property "content" missing in item '+this.data.id);e.content.innerHTML=this.content}t=!0}var i=(this.data.className?" "+this.data.className:"")+(this.selected?" selected":"");this.className!=i&&(this.className=i,e.point.className="item point"+i,t=!0)}}else e&&e.point.parentNode&&(e.point.parentNode.removeChild(e.point),t=!0);return t},i.prototype.reflow=function(){if(void 0==this.data.start)throw Error('Property "start" missing in item '+this.data.id);var t,e=o.updateProperty,n=this.dom,i=this.props,r=this.options,s=r.orientation,a=this.parent.toScreen(this.data.start),h=0;if(n){if(h+=e(this,"width",n.point.offsetWidth),h+=e(this,"height",n.point.offsetHeight),h+=e(i.dot,"width",n.dot.offsetWidth),h+=e(i.dot,"height",n.dot.offsetHeight),h+=e(i.content,"height",n.content.offsetHeight),"top"==s)t=r.margin.axis;else{var c=this.parent.height;t=Math.max(c-this.height-r.margin.axis,0)}h+=e(this,"top",t),h+=e(this,"left",a-i.dot.width/2),h+=e(i.content,"marginLeft",1.5*i.dot.width),h+=e(i.dot,"top",(this.height-i.dot.height)/2)}else h+=1;return h>0},i.prototype._create=function(){var t=this.dom;t||(this.dom=t={},t.point=document.createElement("div"),t.content=document.createElement("div"),t.content.className="content",t.point.appendChild(t.content),t.dot=document.createElement("div"),t.dot.className="dot",t.point.appendChild(t.dot))},i.prototype.reposition=function(){var t=this.dom,e=this.props;t&&(t.point.style.top=this.top+"px",t.point.style.left=this.left+"px",t.content.style.marginLeft=e.content.marginLeft+"px",t.dot.style.top=e.dot.top+"px")},e.exports=n=i},{"../../util":8,"./item":19}],18:[function(e,n){(function(){(function(i){function o(t,e){return function(n){return u(t.call(this,n),e)}}function r(t){return function(e){return this.lang().ordinal(t.call(this,e))}}function s(){}function a(t){c(this,t)}function h(t){var e=this._data={},n=t.years||t.year||t.y||0,i=t.months||t.month||t.M||0,o=t.weeks||t.week||t.w||0,r=t.days||t.day||t.d||0,s=t.hours||t.hour||t.h||0,a=t.minutes||t.minute||t.m||0,h=t.seconds||t.second||t.s||0,c=t.milliseconds||t.millisecond||t.ms||0;this._milliseconds=c+1e3*h+6e4*a+36e5*s,this._days=r+7*o,this._months=i+12*n,e.milliseconds=c%1e3,h+=p(c/1e3),e.seconds=h%60,a+=p(h/60),e.minutes=a%60,s+=p(a/60),e.hours=s%24,r+=p(s/24),r+=7*o,e.days=r%30,i+=p(r/30),e.months=i%12,n+=p(i/12),e.years=n}function c(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function p(t){return 0>t?Math.ceil(t):Math.floor(t)}function u(t,e){for(var n=t+"";e>n.length;)n="0"+n;return n}function l(t,e,n){var i,o=e._milliseconds,r=e._days,s=e._months;o&&t._d.setTime(+t+o*n),r&&t.date(t.date()+r*n),s&&(i=t.date(),t.date(1).month(t.month()+s*n).date(Math.min(i,t.daysInMonth())))}function d(t){return"[object Array]"===Object.prototype.toString.call(t)}function f(t,e){var n,i=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),r=0;for(n=0;i>n;n++)~~t[n]!==~~e[n]&&r++;return r+o}function m(t,e){return e.abbr=t,R[t]||(R[t]=new s),R[t].set(e),R[t]}function g(t){return t?(!R[t]&&U&&e("./lang/"+t),R[t]):k.fn._lang}function v(t){return t.match(/\[.*\]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function y(t){var e,n,i=t.match(z);for(e=0,n=i.length;n>e;e++)i[e]=ae[i[e]]?ae[i[e]]:v(i[e]);return function(o){var r="";for(e=0;n>e;e++)r+="function"==typeof i[e].call?i[e].call(o,t):i[e];return r}}function S(t,e){function n(e){return t.lang().longDateFormat(e)||e}for(var i=5;i--&&P.test(e);)e=e.replace(P,n);return oe[e]||(oe[e]=y(e)),oe[e](t)}function T(t){switch(t){case"DDDD":return V;case"YYYY":return B;case"YYYYY":return Z;case"S":case"SS":case"SSS":case"DDD":return q;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":case"a":case"A":return X;case"X":return $;case"Z":case"ZZ":return K;case"T":return J;case"MM":case"DD":case"YY":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":return W;default:return RegExp(t.replace("\\",""))}}function w(t,e,n){var i,o=n._a;switch(t){case"M":case"MM":o[1]=null==e?0:~~e-1;break;case"MMM":case"MMMM":i=g(n._l).monthsParse(e),null!=i?o[1]=i:n._isValid=!1;break;case"D":case"DD":case"DDD":case"DDDD":null!=e&&(o[2]=~~e);break;case"YY":o[0]=~~e+(~~e>68?1900:2e3);break;case"YYYY":case"YYYYY":o[0]=~~e;break;case"a":case"A":n._isPm="pm"===(e+"").toLowerCase();break;case"H":case"HH":case"h":case"hh":o[3]=~~e;break;case"m":case"mm":o[4]=~~e;break;case"s":case"ss":o[5]=~~e;break;case"S":case"SS":case"SSS":o[6]=~~(1e3*("0."+e));break;case"X":n._d=new Date(1e3*parseFloat(e));break;case"Z":case"ZZ":n._useUTC=!0,i=(e+"").match(ee),i&&i[1]&&(n._tzh=~~i[1]),i&&i[2]&&(n._tzm=~~i[2]),i&&"+"===i[0]&&(n._tzh=-n._tzh,n._tzm=-n._tzm)}null==e&&(n._isValid=!1)}function E(t){var e,n,i=[];if(!t._d){for(e=0;7>e;e++)t._a[e]=i[e]=null==t._a[e]?2===e?1:0:t._a[e];i[3]+=t._tzh||0,i[4]+=t._tzm||0,n=new Date(0),t._useUTC?(n.setUTCFullYear(i[0],i[1],i[2]),n.setUTCHours(i[3],i[4],i[5],i[6])):(n.setFullYear(i[0],i[1],i[2]),n.setHours(i[3],i[4],i[5],i[6])),t._d=n}}function b(t){var e,n,i=t._f.match(z),o=t._i;for(t._a=[],e=0;i.length>e;e++)n=(T(i[e]).exec(o)||[])[0],n&&(o=o.slice(o.indexOf(n)+n.length)),ae[i[e]]&&w(i[e],n,t);t._isPm&&12>t._a[3]&&(t._a[3]+=12),t._isPm===!1&&12===t._a[3]&&(t._a[3]=0),E(t)}function M(t){for(var e,n,i,o,r=99;t._f.length;){if(e=c({},t),e._f=t._f.pop(),b(e),n=new a(e),n.isValid()){i=n;break}o=f(e._a,n.toArray()),r>o&&(r=o,i=n)}c(t,i)}function _(t){var e,n=t._i;if(Q.exec(n)){for(t._f="YYYY-MM-DDT",e=0;4>e;e++)if(te[e][1].exec(n)){t._f+=te[e][0];break}K.exec(n)&&(t._f+=" Z"),b(t)}else t._d=new Date(n)}function D(t){var e=t._i,n=F.exec(e);e===i?t._d=new Date:n?t._d=new Date(+n[1]):"string"==typeof e?_(t):d(e)?(t._a=e.slice(0),E(t)):t._d=e instanceof Date?new Date(+e):new Date(e)}function L(t,e,n,i,o){return o.relativeTime(e||1,!!n,t,i)}function C(t,e,n){var i=j(Math.abs(t)/1e3),o=j(i/60),r=j(o/60),s=j(r/24),a=j(s/365),h=45>i&&["s",i]||1===o&&["m"]||45>o&&["mm",o]||1===r&&["h"]||22>r&&["hh",r]||1===s&&["d"]||25>=s&&["dd",s]||45>=s&&["M"]||345>s&&["MM",j(s/30)]||1===a&&["y"]||["yy",a];return h[2]=e,h[3]=t>0,h[4]=n,L.apply({},h)}function x(t,e,n){var i=n-e,o=n-t.day();return o>i&&(o-=7),i-7>o&&(o+=7),Math.ceil(k(t).add("d",o).dayOfYear()/7)}function A(t){var e=t._i,n=t._f;return null===e||""===e?null:("string"==typeof e&&(t._i=e=g().preparse(e)),k.isMoment(e)?(t=c({},e),t._d=new Date(+e._d)):n?d(n)?M(t):b(t):D(t),new a(t))}function N(t,e){k.fn[t]=k.fn[t+"s"]=function(t){var n=this._isUTC?"UTC":"";return null!=t?(this._d["set"+n+e](t),this):this._d["get"+n+e]()}}function O(t){k.duration.fn[t]=function(){return this._data[t]}}function Y(t,e){k.duration.fn["as"+t]=function(){return+this/e}}for(var k,H,I="2.0.0",j=Math.round,R={},U=n!==i&&n.exports,F=/^\/?Date\((\-?\d+)/i,z=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g,P=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,W=/\d\d?/,q=/\d{1,3}/,V=/\d{3}/,B=/\d{1,4}/,Z=/[+\-]?\d{1,6}/,X=/[0-9]*[a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF]+\s*?[\u0600-\u06FF]+/i,K=/Z|[\+\-]\d\d:?\d\d/i,J=/T/i,$=/[\+\-]?\d+(\.\d{1,3})?/,Q=/^\s*\d{4}-\d\d-\d\d((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,G="YYYY-MM-DDTHH:mm:ssZ",te=[["HH:mm:ss.S",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],ee=/([\+\-]|\d\d)/gi,ne="Month|Date|Hours|Minutes|Seconds|Milliseconds".split("|"),ie={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},oe={},re="DDD w W M D d".split(" "),se="M D H h m s w W".split(" "),ae={M:function(){return this.month()+1},MMM:function(t){return this.lang().monthsShort(this,t)},MMMM:function(t){return this.lang().months(this,t)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(t){return this.lang().weekdaysMin(this,t)},ddd:function(t){return this.lang().weekdaysShort(this,t)},dddd:function(t){return this.lang().weekdays(this,t)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return u(this.year()%100,2)},YYYY:function(){return u(this.year(),4)},YYYYY:function(){return u(this.year(),5)},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return~~(this.milliseconds()/100)},SS:function(){return u(~~(this.milliseconds()/10),2)},SSS:function(){return u(this.milliseconds(),3)},Z:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+u(~~(t/60),2)+":"+u(~~t%60,2)},ZZ:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+u(~~(10*t/6),4)},X:function(){return this.unix()}};re.length;)H=re.pop(),ae[H+"o"]=r(ae[H]);for(;se.length;)H=se.pop(),ae[H+H]=o(ae[H],2);for(ae.DDDD=o(ae.DDD,3),s.prototype={set:function(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(t){return this._months[t.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(t){return this._monthsShort[t.month()]},monthsParse:function(t){var e,n,i;for(this._monthsParse||(this._monthsParse=[]),e=0;12>e;e++)if(this._monthsParse[e]||(n=k([2e3,e]),i="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[e]=RegExp(i.replace(".",""),"i")),this._monthsParse[e].test(t))return e},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(t){return this._weekdays[t.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(t){return this._weekdaysShort[t.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(t){return this._weekdaysMin[t.day()]},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e},meridiem:function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},calendar:function(t,e){var n=this._calendar[t];return"function"==typeof n?n.apply(e):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(t,e,n,i){var o=this._relativeTime[n];return"function"==typeof o?o(t,e,n,i):o.replace(/%d/i,t)},pastFuture:function(t,e){var n=this._relativeTime[t>0?"future":"past"]; +return"function"==typeof n?n(e):n.replace(/%s/i,e)},ordinal:function(t){return this._ordinal.replace("%d",t)},_ordinal:"%d",preparse:function(t){return t},postformat:function(t){return t},week:function(t){return x(t,this._week.dow,this._week.doy)},_week:{dow:0,doy:6}},k=function(t,e,n){return A({_i:t,_f:e,_l:n,_isUTC:!1})},k.utc=function(t,e,n){return A({_useUTC:!0,_isUTC:!0,_l:n,_i:t,_f:e})},k.unix=function(t){return k(1e3*t)},k.duration=function(t,e){var n,i=k.isDuration(t),o="number"==typeof t,r=i?t._data:o?{}:t;return o&&(e?r[e]=t:r.milliseconds=t),n=new h(r),i&&t.hasOwnProperty("_lang")&&(n._lang=t._lang),n},k.version=I,k.defaultFormat=G,k.lang=function(t,e){return t?(e?m(t,e):R[t]||g(t),k.duration.fn._lang=k.fn._lang=g(t),i):k.fn._lang._abbr},k.langData=function(t){return t&&t._lang&&t._lang._abbr&&(t=t._lang._abbr),g(t)},k.isMoment=function(t){return t instanceof a},k.isDuration=function(t){return t instanceof h},k.fn=a.prototype={clone:function(){return k(this)},valueOf:function(){return+this._d},unix:function(){return Math.floor(+this._d/1e3)},toString:function(){return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._d},toJSON:function(){return k.utc(this).format("YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var t=this;return[t.year(),t.month(),t.date(),t.hours(),t.minutes(),t.seconds(),t.milliseconds()]},isValid:function(){return null==this._isValid&&(this._isValid=this._a?!f(this._a,(this._isUTC?k.utc(this._a):k(this._a)).toArray()):!isNaN(this._d.getTime())),!!this._isValid},utc:function(){return this._isUTC=!0,this},local:function(){return this._isUTC=!1,this},format:function(t){var e=S(this,t||k.defaultFormat);return this.lang().postformat(e)},add:function(t,e){var n;return n="string"==typeof t?k.duration(+e,t):k.duration(t,e),l(this,n,1),this},subtract:function(t,e){var n;return n="string"==typeof t?k.duration(+e,t):k.duration(t,e),l(this,n,-1),this},diff:function(t,e,n){var i,o,r=this._isUTC?k(t).utc():k(t).local(),s=6e4*(this.zone()-r.zone());return e&&(e=e.replace(/s$/,"")),"year"===e||"month"===e?(i=432e5*(this.daysInMonth()+r.daysInMonth()),o=12*(this.year()-r.year())+(this.month()-r.month()),o+=(this-k(this).startOf("month")-(r-k(r).startOf("month")))/i,"year"===e&&(o/=12)):(i=this-r-s,o="second"===e?i/1e3:"minute"===e?i/6e4:"hour"===e?i/36e5:"day"===e?i/864e5:"week"===e?i/6048e5:i),n?o:p(o)},from:function(t,e){return k.duration(this.diff(t)).lang(this.lang()._abbr).humanize(!e)},fromNow:function(t){return this.from(k(),t)},calendar:function(){var t=this.diff(k().startOf("day"),"days",!0),e=-6>t?"sameElse":-1>t?"lastWeek":0>t?"lastDay":1>t?"sameDay":2>t?"nextDay":7>t?"nextWeek":"sameElse";return this.format(this.lang().calendar(e,this))},isLeapYear:function(){var t=this.year();return 0===t%4&&0!==t%100||0===t%400},isDST:function(){return this.zone()+k(t).startOf(e)},isBefore:function(t,e){return e=e!==i?e:"millisecond",+this.clone().startOf(e)<+k(t).startOf(e)},isSame:function(t,e){return e=e!==i?e:"millisecond",+this.clone().startOf(e)===+k(t).startOf(e)},zone:function(){return this._isUTC?0:this._d.getTimezoneOffset()},daysInMonth:function(){return k.utc([this.year(),this.month()+1,0]).date()},dayOfYear:function(t){var e=j((k(this).startOf("day")-k(this).startOf("year"))/864e5)+1;return null==t?e:this.add("d",t-e)},isoWeek:function(t){var e=x(this,1,4);return null==t?e:this.add("d",7*(t-e))},week:function(t){var e=this.lang().week(this);return null==t?e:this.add("d",7*(t-e))},lang:function(t){return t===i?this._lang:(this._lang=g(t),this)}},H=0;ne.length>H;H++)N(ne[H].toLowerCase().replace(/s$/,""),ne[H]);N("year","FullYear"),k.fn.days=k.fn.day,k.fn.weeks=k.fn.week,k.fn.isoWeeks=k.fn.isoWeek,k.duration.fn=h.prototype={weeks:function(){return p(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+2592e6*this._months},humanize:function(t){var e=+this,n=C(e,!t,this.lang());return t&&(n=this.lang().pastFuture(e,n)),this.lang().postformat(n)},lang:k.fn.lang};for(H in ie)ie.hasOwnProperty(H)&&(Y(H,ie[H]),O(H.toLowerCase()));Y("Weeks",6048e5),k.lang("en",{ordinal:function(t){var e=t%10,n=1===~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),U&&(n.exports=k),"undefined"==typeof ender&&(this.moment=k),"function"==typeof t&&t.amd&&t("moment",[],function(){return k})}).call(this)})()},{}],14:[function(t,e,n){function i(t,e,n){var i=this;if(this.options={orientation:"bottom",zoomMin:10,zoomMax:31536e10,moveable:!0,zoomable:!0},this.controller=new a,!t)throw Error("No container element provided");this.main=new h(t,{autoResize:!1,height:function(){return i.timeaxis.height+i.itemset.height}}),this.controller.add(this.main);var o=r().hours(0).minutes(0).seconds(0).milliseconds(0);this.range=new s({start:o.clone().add("days",-3).valueOf(),end:o.clone().add("days",4).valueOf()}),this.range.subscribe(this.main,"move","horizontal"),this.range.subscribe(this.main,"zoom","horizontal"),this.range.on("rangechange",function(){i.controller.requestReflow()}),this.range.on("rangechanged",function(){i.controller.requestReflow()}),this.timeaxis=new c(this.main,[],{orientation:this.options.orientation,range:this.range}),this.timeaxis.setRange(this.range),this.controller.add(this.timeaxis),this.itemset=new p(this.main,[this.timeaxis],{orientation:this.options.orientation}),this.itemset.setRange(this.range),this.controller.add(this.itemset),e&&this.setData(e),this.setOptions(n)}var o=t("./../util"),r=t("moment"),s=t("../range"),a=t("../controller"),h=(t("../component/component"),t("../component/rootpanel")),c=t("../component/timeaxis"),p=t("../component/itemset");i.prototype.setOptions=function(t){o.extend(this.options,t),this.timeaxis.setOptions(this.options),this.range.setOptions(this.options);var e,n=this;e="top"==this.options.orientation?function(){return n.timeaxis.height}:function(){return n.main.height-n.timeaxis.height-n.itemset.height},this.itemset.setOptions({orientation:this.options.orientation,top:e}),this.controller.repaint()},i.prototype.setData=function(t){var e=this.itemset.data;if(e)this.itemset.setData(t);else{this.itemset.setData(t);var n=this.itemset.getDataRange(),i=n.min,o=n.max;if(null!=i&&null!=o){var r=o.valueOf()-i.valueOf();i=new Date(i.valueOf()-.05*r),o=new Date(o.valueOf()+.05*r)}(null!=i||null!=o)&&this.range.setRange(i,o)}},e.exports=n=i},{"./../util":8,"../range":5,"../controller":4,"../component/component":9,"../component/rootpanel":10,"../component/timeaxis":13,"../component/itemset":12,moment:18}],19:[function(t,e,n){function i(t,e,n){this.parent=t,this.data=e,this.selected=!1,this.visible=!0,this.dom=null,this.options=n}var o=t("../component");i.prototype=new o,i.prototype.select=function(){this.selected=!0},i.prototype.unselect=function(){this.selected=!1},e.exports=n=i},{"../component":9}]},{},[1])(1)}),"function"==typeof define&&define(function(){return vis});var loadCss=function(t){document.getElementsByTagName("script");var e=document.createElement("style");e.type="text/css",e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t)),document.getElementsByTagName("head")[0].appendChild(e)};loadCss("/* vis.js stylesheet */\n\n.graph {\n position: relative;\n border: 1px solid #bfbfbf;\n}\n\n.graph .panel {\n position: absolute;\n}\n\n.graph .itemset {\n position: absolute;\n padding: 0;\n margin: 0;\n overflow: hidden;\n}\n\n.graph .background {\n}\n\n.graph .foreground {\n}\n\n.graph .itemset-axis {\n position: absolute;\n}\n\n.graph .item {\n position: absolute;\n color: #1A1A1A;\n border-color: #97B0F8;\n background-color: #D5DDF6;\n display: inline-block;\n}\n\n.graph .item.selected {\n border-color: #FFC200;\n background-color: #FFF785;\n z-index: 999;\n}\n\n.graph .item.cluster {\n /* TODO: use another color or pattern? */\n background: #97B0F8 url('img/cluster_bg.png');\n color: white;\n}\n.graph .item.cluster.point {\n border-color: #D5DDF6;\n}\n\n.graph .item.box {\n text-align: center;\n border-style: solid;\n border-width: 1px;\n border-radius: 5px;\n -moz-border-radius: 5px; /* For Firefox 3.6 and older */\n}\n\n.graph .item.point {\n background: none;\n}\n\n.graph .dot {\n border: 5px solid #97B0F8;\n position: absolute;\n border-radius: 5px;\n -moz-border-radius: 5px; /* For Firefox 3.6 and older */\n}\n\n.graph .item.range {\n overflow: hidden;\n border-style: solid;\n border-width: 1px;\n border-radius: 2px;\n -moz-border-radius: 2px; /* For Firefox 3.6 and older */\n}\n\n.graph .item.range .drag-left {\n cursor: w-resize;\n z-index: 1000;\n}\n\n.graph .item.range .drag-right {\n cursor: e-resize;\n z-index: 1000;\n}\n\n.graph .item.range .content {\n position: relative;\n display: inline-block;\n}\n\n.graph .item.line {\n position: absolute;\n width: 0;\n border-left-width: 1px;\n border-left-style: solid;\n}\n\n.graph .item .content {\n margin: 5px;\n white-space: nowrap;\n overflow: hidden;\n}\n\n/* TODO: better css name, 'graph' is way to generic */\n\n.graph {\n overflow: hidden;\n}\n\n.graph .axis {\n position: relative;\n}\n\n.graph .axis .text {\n position: absolute;\n color: #4d4d4d;\n padding: 3px;\n white-space: nowrap;\n}\n\n.graph .axis .text.measure {\n position: absolute;\n padding-left: 0;\n padding-right: 0;\n margin-left: 0;\n margin-right: 0;\n visibility: hidden;\n}\n\n.graph .axis .grid.vertical {\n position: absolute;\n width: 0;\n border-right: 1px solid;\n}\n\n.graph .axis .grid.horizontal {\n position: absolute;\n left: 0;\n width: 100%;\n height: 0;\n border-bottom: 1px solid;\n}\n\n.graph .axis .grid.minor {\n border-color: #e5e5e5;\n}\n\n.graph .axis .grid.major {\n border-color: #bfbfbf;\n}\n\n"); \ No newline at end of file